@deephaven/dashboard 0.15.5 → 0.15.6-beta.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.
@@ -23,13 +23,13 @@ export interface DashboardPanelDefinition {
23
23
  definition: ComponentType;
24
24
  }
25
25
  export declare type DeregisterComponentFunction = () => void;
26
- export declare type PanelHydrateFunction = (props: PanelProps, dashboardId: string) => PanelProps;
26
+ export declare type PanelHydrateFunction<T = PanelProps> = (props: T, dashboardId: string) => PanelProps;
27
27
  export declare type PanelDehydrateFunction = (config: PanelConfig, dashboardId: string) => PanelConfig | null;
28
28
  export declare type DashboardPluginComponentProps = {
29
29
  id: string;
30
30
  layout: GoldenLayout;
31
31
  panelManager: PanelManager;
32
- registerComponent: <P extends PanelProps, C extends ComponentType<P>>(name: string, ComponentType: PanelComponentType<P, C>, hydrate?: PanelHydrateFunction, dehydrate?: PanelDehydrateFunction) => DeregisterComponentFunction;
32
+ registerComponent: <P extends PanelProps, C extends ComponentType<P>>(name: string, ComponentType: PanelComponentType<P, C>, hydrate?: PanelHydrateFunction<P>, dehydrate?: PanelDehydrateFunction) => DeregisterComponentFunction;
33
33
  };
34
34
  export interface DashboardPlugin {
35
35
  panels?: DashboardPanelDefinition[];
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardPlugin.d.ts","sourceRoot":"","sources":["../src/DashboardPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,YAAY,EAAE,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,oBAAY,oBAAoB,CAC9B,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,IACxB,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAA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pC,KAAK,EAAE,OAAO,CAAC,6BAA6B,CAAC,GAC5C,KAAK,IAAI,6BAA6B,CAOxC;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,CAAC,6BAA6B,CAAC,GAC5C,OAAO,CAAC,KAAK,IAAI,6BAA6B,CAMhD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/DashboardPlugin.ts"],"names":["ComponentType","GoldenLayout","PanelManager","isWrappedComponent","type","WrappedComponent","undefined","isDashboardPluginProps","props","id","layout","panelManager","registerComponent","assertIsDashboardPluginProps","Error"],"mappings":"AAAA,SAAoBA,aAApB,QAAyC,OAAzC;AAEA,OAAOC,YAAP,MAAmD,0BAAnD;OACOC,Y;AAYP,OAAO,SAASC,kBAAT,CAGLC,IAHK,EAG+D;AACpE,SAAO,CAACA,IAAD,aAACA,IAAD,uBAACA,IAAD,CAAsCC,gBAAtC,MAA2DC,SAAlE;AACD;;AAmED;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAT,CACLC,KADK,EAEmC;AACxC,SACE,OAAOA,KAAK,CAACC,EAAb,KAAoB,QAApB,IACAD,KAAK,CAACE,MAAN,YAAwBT,YADxB,IAEAO,KAAK,CAACG,YAAN,YAA8BT,YAF9B,IAGA,OAAOM,KAAK,CAACI,iBAAb,KAAmC,UAJrC;AAMD;AAED,OAAO,SAASC,4BAAT,CACLL,KADK,EAE2C;AAChD,MAAI,CAACD,sBAAsB,CAACC,KAAD,CAA3B,EAAoC;AAClC,UAAM,IAAIM,KAAJ,iEACqDN,KADrD,EAAN;AAGD;AACF","sourcesContent":["import { Component, ComponentType } from 'react';\nimport { ConnectedComponent } from 'react-redux';\nimport GoldenLayout, { ReactComponentConfig } from '@deephaven/golden-layout';\nimport PanelManager from './PanelManager';\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>;\n\nexport function isWrappedComponent<\n P extends PanelProps,\n C extends ComponentType<P>\n>(type: PanelComponentType<P, C>): type is WrappedComponentType<P, C> {\n return (type as WrappedComponentType<P, C>)?.WrappedComponent !== undefined;\n}\n\nexport type PanelProps = {\n glContainer: GoldenLayout.Container;\n glEventHub: GoldenLayout.EventEmitter;\n};\n\nexport type PanelComponent<T extends PanelProps = PanelProps> = Component<T>;\n\nexport type PanelConfig = ReactComponentConfig & {\n componentState?: Record<string, unknown> | null;\n};\n\nexport type DashboardConfig = {\n id: string;\n layout: GoldenLayout;\n panelManager: PanelManager;\n};\n\nexport interface DashboardPanelDefinition {\n name: string;\n definition: ComponentType;\n}\n\nexport type DeregisterComponentFunction = () => void;\n\nexport type PanelHydrateFunction = (\n props: PanelProps,\n dashboardId: string\n) => PanelProps;\n\nexport type PanelDehydrateFunction = (\n config: PanelConfig,\n dashboardId: string\n) => PanelConfig | null;\n\nexport type DashboardPluginComponentProps = {\n id: string;\n layout: GoldenLayout;\n panelManager: PanelManager;\n registerComponent: <P extends PanelProps, C extends ComponentType<P>>(\n name: string,\n ComponentType: PanelComponentType<P, C>,\n hydrate?: PanelHydrateFunction,\n dehydrate?: PanelDehydrateFunction\n ) => DeregisterComponentFunction;\n};\n\nexport interface DashboardPlugin {\n panels?: DashboardPanelDefinition[];\n\n /** Hydrate the provided panel and props. Return the same object if no changes made. */\n hydrateComponent?: (name: string, props: PanelProps) => PanelProps;\n\n /** Dehydrate a component. Return the same object if no changes made, or `null` if the component should not be saved */\n dehydrateComponent?: (\n name: string,\n config: PanelConfig\n ) => PanelConfig | null;\n\n /** Called when the dashboard is initialized and layout is ready. */\n initialize?: (config: DashboardConfig) => void;\n\n /** Called when the dashboard is unintialized and layout is about to be destroyed */\n deinitialize?: (config: DashboardConfig) => void;\n}\n\n/**\n * Takes a partial DashboardPluginComponentProps and verifies all the dashboard component fields are filled in.\n * @param props The props to check\n * @returns True if the props are valid DashboardPluginComponentProps, false otherwise\n */\nexport function isDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): props is DashboardPluginComponentProps {\n return (\n typeof props.id === 'string' &&\n props.layout instanceof GoldenLayout &&\n props.panelManager instanceof PanelManager &&\n typeof props.registerComponent === 'function'\n );\n}\n\nexport function assertIsDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): asserts props is DashboardPluginComponentProps {\n if (!isDashboardPluginProps(props)) {\n throw new Error(\n `Expected dashboard plugin props, but instead received ${props}`\n );\n }\n}\n"],"file":"DashboardPlugin.js"}
1
+ {"version":3,"sources":["../src/DashboardPlugin.ts"],"names":["ComponentType","GoldenLayout","PanelManager","isWrappedComponent","type","WrappedComponent","undefined","isDashboardPluginProps","props","id","layout","panelManager","registerComponent","assertIsDashboardPluginProps","Error"],"mappings":"AAAA,SAAoBA,aAApB,QAAyC,OAAzC;AAEA,OAAOC,YAAP,MAAmD,0BAAnD;OACOC,Y;AAYP,OAAO,SAASC,kBAAT,CAGLC,IAHK,EAG+D;AACpE,SAAO,CAACA,IAAD,aAACA,IAAD,uBAACA,IAAD,CAAsCC,gBAAtC,MAA2DC,SAAlE;AACD;;AAmED;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAT,CACLC,KADK,EAEmC;AACxC,SACE,OAAOA,KAAK,CAACC,EAAb,KAAoB,QAApB,IACAD,KAAK,CAACE,MAAN,YAAwBT,YADxB,IAEAO,KAAK,CAACG,YAAN,YAA8BT,YAF9B,IAGA,OAAOM,KAAK,CAACI,iBAAb,KAAmC,UAJrC;AAMD;AAED,OAAO,SAASC,4BAAT,CACLL,KADK,EAE2C;AAChD,MAAI,CAACD,sBAAsB,CAACC,KAAD,CAA3B,EAAoC;AAClC,UAAM,IAAIM,KAAJ,iEACqDN,KADrD,EAAN;AAGD;AACF","sourcesContent":["import { Component, ComponentType } from 'react';\nimport { ConnectedComponent } from 'react-redux';\nimport GoldenLayout, { ReactComponentConfig } from '@deephaven/golden-layout';\nimport PanelManager from './PanelManager';\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>;\n\nexport function isWrappedComponent<\n P extends PanelProps,\n C extends ComponentType<P>\n>(type: PanelComponentType<P, C>): type is WrappedComponentType<P, C> {\n return (type as WrappedComponentType<P, C>)?.WrappedComponent !== undefined;\n}\n\nexport type PanelProps = {\n glContainer: GoldenLayout.Container;\n glEventHub: GoldenLayout.EventEmitter;\n};\n\nexport type PanelComponent<T extends PanelProps = PanelProps> = Component<T>;\n\nexport type PanelConfig = ReactComponentConfig & {\n componentState?: Record<string, unknown> | null;\n};\n\nexport type DashboardConfig = {\n id: string;\n layout: GoldenLayout;\n panelManager: PanelManager;\n};\n\nexport interface DashboardPanelDefinition {\n name: string;\n definition: ComponentType;\n}\n\nexport type DeregisterComponentFunction = () => void;\n\nexport type PanelHydrateFunction<T = PanelProps> = (\n props: T,\n dashboardId: string\n) => PanelProps;\n\nexport type PanelDehydrateFunction = (\n config: PanelConfig,\n dashboardId: string\n) => PanelConfig | null;\n\nexport type DashboardPluginComponentProps = {\n id: string;\n layout: GoldenLayout;\n panelManager: PanelManager;\n registerComponent: <P extends PanelProps, C extends ComponentType<P>>(\n name: string,\n ComponentType: PanelComponentType<P, C>,\n hydrate?: PanelHydrateFunction<P>,\n dehydrate?: PanelDehydrateFunction\n ) => DeregisterComponentFunction;\n};\n\nexport interface DashboardPlugin {\n panels?: DashboardPanelDefinition[];\n\n /** Hydrate the provided panel and props. Return the same object if no changes made. */\n hydrateComponent?: (name: string, props: PanelProps) => PanelProps;\n\n /** Dehydrate a component. Return the same object if no changes made, or `null` if the component should not be saved */\n dehydrateComponent?: (\n name: string,\n config: PanelConfig\n ) => PanelConfig | null;\n\n /** Called when the dashboard is initialized and layout is ready. */\n initialize?: (config: DashboardConfig) => void;\n\n /** Called when the dashboard is unintialized and layout is about to be destroyed */\n deinitialize?: (config: DashboardConfig) => void;\n}\n\n/**\n * Takes a partial DashboardPluginComponentProps and verifies all the dashboard component fields are filled in.\n * @param props The props to check\n * @returns True if the props are valid DashboardPluginComponentProps, false otherwise\n */\nexport function isDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): props is DashboardPluginComponentProps {\n return (\n typeof props.id === 'string' &&\n props.layout instanceof GoldenLayout &&\n props.panelManager instanceof PanelManager &&\n typeof props.registerComponent === 'function'\n );\n}\n\nexport function assertIsDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): asserts props is DashboardPluginComponentProps {\n if (!isDashboardPluginProps(props)) {\n throw new Error(\n `Expected dashboard plugin props, but instead received ${props}`\n );\n }\n}\n"],"file":"DashboardPlugin.js"}
@@ -18,7 +18,7 @@ export declare function dehydrate(config: PanelConfig): PanelConfig | null;
18
18
  * @param localDashboardId The local dashboard ID to hydrate the panel with
19
19
  * @returns The hydrated panel props
20
20
  */
21
- export declare function hydrate(props: PanelProps, localDashboardId?: string): DashboardPanelProps;
21
+ export declare function hydrate(props: PanelProps & Record<string, unknown>, localDashboardId?: string): DashboardPanelProps;
22
22
  declare const _default: {
23
23
  dehydrate: typeof dehydrate;
24
24
  hydrate: typeof hydrate;
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardUtils.d.ts","sourceRoot":"","sources":["../src/DashboardUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5D,oBAAY,mBAAmB,GAAG,UAAU,GAAG;IAC7C,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAqBjE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,UAAU,EACjB,gBAAgB,SAAK,GACpB,mBAAmB,CAMrB;;;;;AAED,wBAGE"}
1
+ {"version":3,"file":"DashboardUtils.d.ts","sourceRoot":"","sources":["../src/DashboardUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5D,oBAAY,mBAAmB,GAAG,UAAU,GAAG;IAC7C,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAqBjE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,gBAAgB,SAAK,GACpB,mBAAmB,CAMrB;;;;;AAED,wBAGE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/DashboardUtils.ts"],"names":["dehydrate","config","props","componentState","metadata","panelState","newProps","type","hydrate","localDashboardId"],"mappings":";;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,SAAT,CAAmBC,MAAnB,EAA4D;AACjE,MAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAA4BF,MAAlC;AACA,MAAM;AAAEG,IAAAA;AAAF,MAAeF,KAArB;AACA,MAAI;AAAEG,IAAAA,UAAU,GAAG;AAAf,MAAwBH,KAA5B;;AACA,MAAIC,cAAJ,EAAoB;AAClB,KAAC;AAAEE,MAAAA;AAAF,QAAiBF,cAAlB;AACD;;AACD,MAAMG,QAAiC,GAAG,EAA1C;;AACA,MAAIF,QAAJ,EAAc;AACZE,IAAAA,QAAQ,CAACF,QAAT,GAAoBA,QAApB;AACD;;AACD,MAAIC,UAAJ,EAAgB;AACdC,IAAAA,QAAQ,CAACD,UAAT,GAAsBA,UAAtB;AACD;;AAED,yCACKJ,MADL;AAEEE,IAAAA,cAAc,EAAE,IAFlB;AAGED,IAAAA,KAAK,EAAEI,QAHT;AAIEC,IAAAA,IAAI,EAAE;AAJR;AAMD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,OAAT,CACLN,KADK,EAGgB;AAAA,MADrBO,gBACqB,uEADF,EACE;AACrB;AACEL,IAAAA,QAAQ,EAAE;AADZ,KAEKF,KAFL;AAGEO,IAAAA;AAHF;AAKD;AAED,eAAe;AACbT,EAAAA,SADa;AAEbQ,EAAAA;AAFa,CAAf","sourcesContent":["import { PanelConfig, PanelProps } from './DashboardPlugin';\n\nexport type DashboardPanelProps = PanelProps & {\n localDashboardId: string;\n metadata?: Record<string, unknown>;\n};\n\n/**\n * Dehydrate an existing panel to allow it to be serialized/saved.\n * Just takes what's in the panels `metadata` in the props and `panelState` in\n * the component state, assumes it's serializable, and saves it.\n * @param config The panel config to dehydrate\n * @returns The dehydrated PanelConfig\n */\nexport function dehydrate(config: PanelConfig): PanelConfig | null {\n const { props, componentState } = config;\n const { metadata } = props;\n let { panelState = null } = props;\n if (componentState) {\n ({ panelState } = componentState);\n }\n const newProps: Record<string, unknown> = {};\n if (metadata) {\n newProps.metadata = metadata;\n }\n if (panelState) {\n newProps.panelState = panelState;\n }\n\n return {\n ...config,\n componentState: null,\n props: newProps,\n type: 'react-component',\n };\n}\n\n/**\n * Default hydration function. Just applies the dashboard ID. When used with dehydrate above,\n * the panels state will be stored in `panelState` prop.\n * @param props Panel props to hydrate\n * @param localDashboardId The local dashboard ID to hydrate the panel with\n * @returns The hydrated panel props\n */\nexport function hydrate(\n props: PanelProps,\n localDashboardId = ''\n): DashboardPanelProps {\n return {\n metadata: {},\n ...props,\n localDashboardId,\n };\n}\n\nexport default {\n dehydrate,\n hydrate,\n};\n"],"file":"DashboardUtils.js"}
1
+ {"version":3,"sources":["../src/DashboardUtils.ts"],"names":["dehydrate","config","props","componentState","metadata","panelState","newProps","type","hydrate","localDashboardId"],"mappings":";;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,SAAT,CAAmBC,MAAnB,EAA4D;AACjE,MAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAA4BF,MAAlC;AACA,MAAM;AAAEG,IAAAA;AAAF,MAAeF,KAArB;AACA,MAAI;AAAEG,IAAAA,UAAU,GAAG;AAAf,MAAwBH,KAA5B;;AACA,MAAIC,cAAJ,EAAoB;AAClB,KAAC;AAAEE,MAAAA;AAAF,QAAiBF,cAAlB;AACD;;AACD,MAAMG,QAAiC,GAAG,EAA1C;;AACA,MAAIF,QAAJ,EAAc;AACZE,IAAAA,QAAQ,CAACF,QAAT,GAAoBA,QAApB;AACD;;AACD,MAAIC,UAAJ,EAAgB;AACdC,IAAAA,QAAQ,CAACD,UAAT,GAAsBA,UAAtB;AACD;;AAED,yCACKJ,MADL;AAEEE,IAAAA,cAAc,EAAE,IAFlB;AAGED,IAAAA,KAAK,EAAEI,QAHT;AAIEC,IAAAA,IAAI,EAAE;AAJR;AAMD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,OAAT,CACLN,KADK,EAGgB;AAAA,MADrBO,gBACqB,uEADF,EACE;AACrB;AACEL,IAAAA,QAAQ,EAAE;AADZ,KAEKF,KAFL;AAGEO,IAAAA;AAHF;AAKD;AAED,eAAe;AACbT,EAAAA,SADa;AAEbQ,EAAAA;AAFa,CAAf","sourcesContent":["import { PanelConfig, PanelProps } from './DashboardPlugin';\n\nexport type DashboardPanelProps = PanelProps & {\n localDashboardId: string;\n metadata?: Record<string, unknown>;\n};\n\n/**\n * Dehydrate an existing panel to allow it to be serialized/saved.\n * Just takes what's in the panels `metadata` in the props and `panelState` in\n * the component state, assumes it's serializable, and saves it.\n * @param config The panel config to dehydrate\n * @returns The dehydrated PanelConfig\n */\nexport function dehydrate(config: PanelConfig): PanelConfig | null {\n const { props, componentState } = config;\n const { metadata } = props;\n let { panelState = null } = props;\n if (componentState) {\n ({ panelState } = componentState);\n }\n const newProps: Record<string, unknown> = {};\n if (metadata) {\n newProps.metadata = metadata;\n }\n if (panelState) {\n newProps.panelState = panelState;\n }\n\n return {\n ...config,\n componentState: null,\n props: newProps,\n type: 'react-component',\n };\n}\n\n/**\n * Default hydration function. Just applies the dashboard ID. When used with dehydrate above,\n * the panels state will be stored in `panelState` prop.\n * @param props Panel props to hydrate\n * @param localDashboardId The local dashboard ID to hydrate the panel with\n * @returns The hydrated panel props\n */\nexport function hydrate(\n props: PanelProps & Record<string, unknown>,\n localDashboardId = ''\n): DashboardPanelProps {\n return {\n metadata: {},\n ...props,\n localDashboardId,\n };\n}\n\nexport default {\n dehydrate,\n hydrate,\n};\n"],"file":"DashboardUtils.js"}
@@ -1,4 +1,4 @@
1
- import { RootState } from '@deephaven/redux';
1
+ import { DashboardData, RootState } from '@deephaven/redux';
2
2
  import type { Action } from 'redux';
3
3
  import type { ThunkAction } from 'redux-thunk';
4
4
  /**
@@ -7,10 +7,10 @@ import type { ThunkAction } from 'redux-thunk';
7
7
  * @param data Data for the dashboard
8
8
  * @returns The action to get dispatched
9
9
  */
10
- export declare const setDashboardData: (id: string, data: Record<string, unknown>) => {
10
+ export declare const setDashboardData: (id: string, data: DashboardData) => {
11
11
  type: string;
12
12
  id: string;
13
- payload: Record<string, unknown>;
13
+ payload: DashboardData;
14
14
  };
15
15
  /**
16
16
  * Action to update the dashboard data. Will combine the update with any existing dashboard data.
@@ -18,5 +18,5 @@ export declare const setDashboardData: (id: string, data: Record<string, unknown
18
18
  * @param updateData The data to combine with the existing dashboard data
19
19
  * @returns
20
20
  */
21
- export declare const updateDashboardData: (id: string, data: Record<string, unknown>) => ThunkAction<unknown, RootState, undefined, Action<unknown>>;
21
+ export declare const updateDashboardData: (id: string, data: DashboardData) => ThunkAction<unknown, RootState, undefined, Action<unknown>>;
22
22
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/redux/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,OACvB,MAAM,QACJ,OAAO,MAAM,EAAE,OAAO,CAAC;UAEvB,MAAM;QACR,MAAM;aACD,OAAO,MAAM,EAAE,OAAO,CAAC;CAKhC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,OAC1B,MAAM,QACJ,OAAO,MAAM,EAAE,OAAO,CAAC,KAC5B,YAAY,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,OAAO,CAAC,CAS1D,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/redux/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,OACvB,MAAM,QACJ,aAAa;UAEb,MAAM;QACR,MAAM;aACD,aAAa;CAKtB,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,OAC1B,MAAM,QACJ,aAAa,KAClB,YAAY,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,OAAO,CAAC,CAS1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/redux/actions.ts"],"names":["SET_DASHBOARD_DATA","getDashboardData","setDashboardData","id","data","type","payload","updateDashboardData","dispatch","getState"],"mappings":";;;;;;SAGSA,kB;SACAC,gB;AAET;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,IAAMC,gBAAgB,GAAG,CAC9BC,EAD8B,EAE9BC,IAF8B,MAO1B;AACJC,EAAAA,IAAI,EAAEL,kBADF;AAEJG,EAAAA,EAFI;AAGJG,EAAAA,OAAO,EAAEF;AAHL,CAP0B,CAAzB;AAaP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,IAAMG,mBAAmB,GAAG,CACjCJ,EADiC,EAEjCC,IAFiC,KAG+B,CAChEI,QADgE,EAEhEC,QAFgE,KAIhED,QAAQ,CACNN,gBAAgB,CAACC,EAAD,kCACXF,gBAAgB,CAACQ,QAAQ,EAAT,EAAaN,EAAb,CADL,GAEXC,IAFW,EADV,CAPH","sourcesContent":["import { RootState } from '@deephaven/redux';\nimport type { Action } from 'redux';\nimport type { ThunkAction } from 'redux-thunk';\nimport { SET_DASHBOARD_DATA } from './actionTypes';\nimport { getDashboardData } from './selectors';\n\n/**\n * Action to replace the dashboard data for a dashboard\n * @param id The ID of the dashboard to set the data on\n * @param data Data for the dashboard\n * @returns The action to get dispatched\n */\nexport const setDashboardData = (\n id: string,\n data: Record<string, unknown>\n): {\n type: string;\n id: string;\n payload: Record<string, unknown>;\n} => ({\n type: SET_DASHBOARD_DATA,\n id,\n payload: data,\n});\n\n/**\n * Action to update the dashboard data. Will combine the update with any existing dashboard data.\n * @param id The id of the dashboard to update the data on\n * @param updateData The data to combine with the existing dashboard data\n * @returns\n */\nexport const updateDashboardData = (\n id: string,\n data: Record<string, unknown>\n): ThunkAction<unknown, RootState, undefined, Action<unknown>> => (\n dispatch,\n getState\n) =>\n dispatch(\n setDashboardData(id, {\n ...getDashboardData(getState(), id),\n ...data,\n })\n );\n"],"file":"actions.js"}
1
+ {"version":3,"sources":["../../src/redux/actions.ts"],"names":["SET_DASHBOARD_DATA","getDashboardData","setDashboardData","id","data","type","payload","updateDashboardData","dispatch","getState"],"mappings":";;;;;;SAGSA,kB;SACAC,gB;AAET;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,IAAMC,gBAAgB,GAAG,CAC9BC,EAD8B,EAE9BC,IAF8B,MAO1B;AACJC,EAAAA,IAAI,EAAEL,kBADF;AAEJG,EAAAA,EAFI;AAGJG,EAAAA,OAAO,EAAEF;AAHL,CAP0B,CAAzB;AAaP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,IAAMG,mBAAmB,GAAG,CACjCJ,EADiC,EAEjCC,IAFiC,KAG+B,CAChEI,QADgE,EAEhEC,QAFgE,KAIhED,QAAQ,CACNN,gBAAgB,CAACC,EAAD,kCACXF,gBAAgB,CAACQ,QAAQ,EAAT,EAAaN,EAAb,CADL,GAEXC,IAFW,EADV,CAPH","sourcesContent":["import { DashboardData, RootState } from '@deephaven/redux';\nimport type { Action } from 'redux';\nimport type { ThunkAction } from 'redux-thunk';\nimport { SET_DASHBOARD_DATA } from './actionTypes';\nimport { getDashboardData } from './selectors';\n\n/**\n * Action to replace the dashboard data for a dashboard\n * @param id The ID of the dashboard to set the data on\n * @param data Data for the dashboard\n * @returns The action to get dispatched\n */\nexport const setDashboardData = (\n id: string,\n data: DashboardData\n): {\n type: string;\n id: string;\n payload: DashboardData;\n} => ({\n type: SET_DASHBOARD_DATA,\n id,\n payload: data,\n});\n\n/**\n * Action to update the dashboard data. Will combine the update with any existing dashboard data.\n * @param id The id of the dashboard to update the data on\n * @param updateData The data to combine with the existing dashboard data\n * @returns\n */\nexport const updateDashboardData = (\n id: string,\n data: DashboardData\n): ThunkAction<unknown, RootState, undefined, Action<unknown>> => (\n dispatch,\n getState\n) =>\n dispatch(\n setDashboardData(id, {\n ...getDashboardData(getState(), id),\n ...data,\n })\n );\n"],"file":"actions.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/dashboard",
3
- "version": "0.15.5",
3
+ "version": "0.15.6-beta.0+743f253",
4
4
  "description": "Deephaven Dashboard",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -30,11 +30,11 @@
30
30
  "start": "cross-env NODE_ENV=development npm run watch"
31
31
  },
32
32
  "dependencies": {
33
- "@deephaven/components": "^0.15.5",
34
- "@deephaven/golden-layout": "^0.15.2",
35
- "@deephaven/log": "^0.15.5",
36
- "@deephaven/react-hooks": "^0.15.2",
37
- "@deephaven/redux": "^0.15.5",
33
+ "@deephaven/components": "^0.15.6-beta.0+743f253",
34
+ "@deephaven/golden-layout": "^0.15.6-beta.0+743f253",
35
+ "@deephaven/log": "^0.15.6-beta.0+743f253",
36
+ "@deephaven/react-hooks": "^0.15.6-beta.0+743f253",
37
+ "@deephaven/redux": "^0.15.6-beta.0+743f253",
38
38
  "@deephaven/utils": "file:../util",
39
39
  "deep-equal": "^2.0.5",
40
40
  "jquery": "^3.6.0",
@@ -49,8 +49,8 @@
49
49
  "react-redux": "^7.2.4"
50
50
  },
51
51
  "devDependencies": {
52
- "@deephaven/mocks": "^0.15.0",
53
- "@deephaven/tsconfig": "^0.15.2",
52
+ "@deephaven/mocks": "^0.15.6-beta.0+743f253",
53
+ "@deephaven/tsconfig": "^0.15.6-beta.0+743f253",
54
54
  "@types/lodash.ismatch": "^4.4.0"
55
55
  },
56
56
  "files": [
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "0556c0fe73d2cabf66682a955950defd6130bbfa"
62
+ "gitHead": "743f253dd40b4f0dcca921ecf4f578d64202cd53"
63
63
  }