@deephaven/plugin 1.7.2-beta.1 → 1.7.2-react-18-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,6 @@ export function PersistentStateProvider(props) {
28
28
  state: new Map(),
29
29
  isTracking: true // We want to start tracking on the first render
30
30
  });
31
-
32
31
  var addState = useCallback((id, state) => {
33
32
  if (persistentData.current.isTracking) {
34
33
  persistentData.current.state.set(id, state);
@@ -1 +1 @@
1
- {"version":3,"file":"PersistentStateContext.js","names":["React","createContext","useCallback","useEffect","useMemo","useRef","jsx","_jsx","PersistentStateContext","displayName","PersistentStateProvider","props","initialState","onChange","children","updateId","setUpdateId","useState","persistentData","initial","initialStateMap","Map","state","isTracking","addState","id","current","set","scheduleStateUpdate","prev","initialStateIterator","Symbol","iterator","getInitialState","getState","initialStateForId","get","value","done","next","stateVal","persistState","values","contextValue","Provider"],"sources":["../src/PersistentStateContext.tsx"],"sourcesContent":["import React, {\n createContext,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\n\nexport type PersistentStateContextType = {\n /**\n *\n * @param id A unique ID generated by the caller.\n * This identifies the specific state internally and is used to prevent duplicate state\n * @param state The state to persist. Needs to be JSON serializable.\n */\n addState: (\n id: string,\n state: { type: string; version: number; state: unknown }\n ) => void;\n\n /**\n * Schedules a persistent state update.\n * Will re-render the components that have persistent state to capture their current state.\n */\n scheduleStateUpdate: () => void;\n\n /**\n * Gets the next item from the initial state iterator.\n * It is expected that each hook will call this once to get its initial state.\n * @param id A unique ID generated by the caller.\n * This is used to prevent one caller from consuming multiple values from the initial state.\n * @returns The iterator result containing the initial state value (state, version, type) and a done flag.\n */\n getInitialState: <S>(id: string) => {\n value: { state: S; version: number; type: string };\n done: boolean;\n };\n};\n\n/**\n * Context that holds methods to track the state of all calls to usePersistentState below this provider.\n */\nexport const PersistentStateContext =\n createContext<PersistentStateContextType | null>(null);\nPersistentStateContext.displayName = 'PersistentStateContext';\n\nexport type PersistentStateProviderProps = React.PropsWithChildren<{\n /**\n * The initial state of all calls to usePersistentState.\n * If there are more calls to usePersistentState than there are elements in this array,\n * the state initializer of the usePersistentState call will be used for the rest.\n */\n initialState: unknown[];\n\n /**\n * Called when the state changes.\n * The state is passed as an array of the values of all calls to usePersistentState.\n * The order of the values is the same as the order of the calls to usePersistentState.\n * @param state The state of all calls to usePersistentState.\n */\n onChange: (state: unknown[]) => void;\n}>;\n\n/**\n * Tracks all calls to the usePersistentState hook below this provider.\n * Keeps track of the state in call order so and calls onChange when the state changes.\n */\nexport function PersistentStateProvider(\n props: PersistentStateProviderProps\n): JSX.Element {\n const { initialState, onChange, children } = props;\n const [updateId, setUpdateId] = React.useState(0);\n\n // We store the previous and next state in a map in case a component calls setState in its render function.\n // This would cause an immediate re-render and usePersistentState may be called multiple times from 1 component\n // before the render finishes and we run the effect to persist the state.\n // JS Maps iterate based on insertion order, so if a component renders multiple times its original position will be maintained\n // while updating its state if it changed in that re-render.\n const persistentData = useRef({\n initial: initialState,\n initialStateMap: new Map<string, { value: unknown; done: boolean }>(),\n state: new Map<string, unknown>(),\n isTracking: true, // We want to start tracking on the first render\n });\n\n const addState = useCallback((id: string, state: unknown) => {\n if (persistentData.current.isTracking) {\n persistentData.current.state.set(id, state);\n }\n }, []);\n\n const scheduleStateUpdate = useCallback(() => {\n // Don't trigger again if we are already tracking a render\n if (!persistentData.current.isTracking) {\n persistentData.current.isTracking = true;\n persistentData.current.state = new Map<string, unknown>();\n setUpdateId(prev => prev + 1);\n }\n }, []);\n\n const initialStateIterator = useRef(\n persistentData.current.initial[Symbol.iterator]()\n );\n\n const getInitialState = useCallback(function getState<S>(id: string): {\n value: S;\n done: boolean;\n } {\n // Prevents a component re-rendering multiple times in the same render cycle from taking multiple values from the iterator\n const initialStateForId = persistentData.current.initialStateMap.get(id);\n if (initialStateForId) {\n return initialStateForId as { value: S; done: boolean };\n }\n const { value, done } = initialStateIterator.current.next();\n const stateVal = { value: value as S, done: done ?? false };\n persistentData.current.initialStateMap.set(id, stateVal);\n return stateVal;\n }, []);\n\n useEffect(\n function persistState() {\n if (persistentData.current.isTracking) {\n onChange([...persistentData.current.state.values()]);\n persistentData.current.isTracking = false;\n }\n },\n [updateId, onChange]\n );\n\n const contextValue = useMemo(\n () => ({\n addState,\n scheduleStateUpdate,\n getInitialState,\n updateId,\n }),\n [addState, getInitialState, scheduleStateUpdate, updateId]\n );\n\n return (\n <PersistentStateContext.Provider value={contextValue}>\n {children}\n </PersistentStateContext.Provider>\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAK,IACVC,aAAa,EACbC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,QACD,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAiCf;AACA;AACA;AACA,OAAO,IAAMC,sBAAsB,gBACjCP,aAAa,CAAoC,IAAI,CAAC;AACxDO,sBAAsB,CAACC,WAAW,GAAG,wBAAwB;AAmB7D;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,KAAmC,EACtB;EACb,IAAM;IAAEC,YAAY;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGH,KAAK;EAClD,IAAM,CAACI,QAAQ,EAAEC,WAAW,CAAC,GAAGhB,KAAK,CAACiB,QAAQ,CAAC,CAAC,CAAC;;EAEjD;EACA;EACA;EACA;EACA;EACA,IAAMC,cAAc,GAAGb,MAAM,CAAC;IAC5Bc,OAAO,EAAEP,YAAY;IACrBQ,eAAe,EAAE,IAAIC,GAAG,CAA4C,CAAC;IACrEC,KAAK,EAAE,IAAID,GAAG,CAAkB,CAAC;IACjCE,UAAU,EAAE,IAAI,CAAE;EACpB,CAAC,CAAC;;EAEF,IAAMC,QAAQ,GAAGtB,WAAW,CAAC,CAACuB,EAAU,EAAEH,KAAc,KAAK;IAC3D,IAAIJ,cAAc,CAACQ,OAAO,CAACH,UAAU,EAAE;MACrCL,cAAc,CAACQ,OAAO,CAACJ,KAAK,CAAC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AAGK,cAAc,CAACQ,OAAO,CAACJ,KAAK,CAACoB,MAAM,CAAC,CAAC,CAAC,CAAC;MACpDxB,cAAc,CAACQ,OAAO,CAACH,UAAU,GAAG,KAAK;IAC3C;EACF,CAAC,EACD,CAACR,QAAQ,EAAEF,QAAQ,CACrB,CAAC;EAED,IAAM8B,YAAY,GAAGvC,OAAO,CAC1B,OAAO;IACLoB,QAAQ;IACRI,mBAAmB;IACnBK,eAAe;IACflB;EACF,CAAC,CAAC,EACF,CAACS,QAAQ,EAAES,eAAe,EAAEL,mBAAmB,EAAEb,QAAQ,CAC3D,CAAC;EAED,oBACER,IAAA,CAACC,sBAAsB,CAACoC,QAAQ;IAACP,KAAK,EAAEM,YAAa;IAAA7B,QAAA,EAClDA;EAAQ,CACsB,CAAC;AAEtC"}
1
+ {"version":3,"file":"PersistentStateContext.js","names":["React","createContext","useCallback","useEffect","useMemo","useRef","jsx","_jsx","PersistentStateContext","displayName","PersistentStateProvider","props","initialState","onChange","children","updateId","setUpdateId","useState","persistentData","initial","initialStateMap","Map","state","isTracking","addState","id","current","set","scheduleStateUpdate","prev","initialStateIterator","Symbol","iterator","getInitialState","getState","initialStateForId","get","value","done","next","stateVal","persistState","values","contextValue","Provider"],"sources":["../src/PersistentStateContext.tsx"],"sourcesContent":["import React, {\n createContext,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\n\nexport type PersistentStateContextType = {\n /**\n *\n * @param id A unique ID generated by the caller.\n * This identifies the specific state internally and is used to prevent duplicate state\n * @param state The state to persist. Needs to be JSON serializable.\n */\n addState: (\n id: string,\n state: { type: string; version: number; state: unknown }\n ) => void;\n\n /**\n * Schedules a persistent state update.\n * Will re-render the components that have persistent state to capture their current state.\n */\n scheduleStateUpdate: () => void;\n\n /**\n * Gets the next item from the initial state iterator.\n * It is expected that each hook will call this once to get its initial state.\n * @param id A unique ID generated by the caller.\n * This is used to prevent one caller from consuming multiple values from the initial state.\n * @returns The iterator result containing the initial state value (state, version, type) and a done flag.\n */\n getInitialState: <S>(id: string) => {\n value: { state: S; version: number; type: string };\n done: boolean;\n };\n};\n\n/**\n * Context that holds methods to track the state of all calls to usePersistentState below this provider.\n */\nexport const PersistentStateContext =\n createContext<PersistentStateContextType | null>(null);\nPersistentStateContext.displayName = 'PersistentStateContext';\n\nexport type PersistentStateProviderProps = React.PropsWithChildren<{\n /**\n * The initial state of all calls to usePersistentState.\n * If there are more calls to usePersistentState than there are elements in this array,\n * the state initializer of the usePersistentState call will be used for the rest.\n */\n initialState: unknown[];\n\n /**\n * Called when the state changes.\n * The state is passed as an array of the values of all calls to usePersistentState.\n * The order of the values is the same as the order of the calls to usePersistentState.\n * @param state The state of all calls to usePersistentState.\n */\n onChange: (state: unknown[]) => void;\n}>;\n\n/**\n * Tracks all calls to the usePersistentState hook below this provider.\n * Keeps track of the state in call order so and calls onChange when the state changes.\n */\nexport function PersistentStateProvider(\n props: PersistentStateProviderProps\n): JSX.Element {\n const { initialState, onChange, children } = props;\n const [updateId, setUpdateId] = React.useState(0);\n\n // We store the previous and next state in a map in case a component calls setState in its render function.\n // This would cause an immediate re-render and usePersistentState may be called multiple times from 1 component\n // before the render finishes and we run the effect to persist the state.\n // JS Maps iterate based on insertion order, so if a component renders multiple times its original position will be maintained\n // while updating its state if it changed in that re-render.\n const persistentData = useRef({\n initial: initialState,\n initialStateMap: new Map<string, { value: unknown; done: boolean }>(),\n state: new Map<string, unknown>(),\n isTracking: true, // We want to start tracking on the first render\n });\n\n const addState = useCallback((id: string, state: unknown) => {\n if (persistentData.current.isTracking) {\n persistentData.current.state.set(id, state);\n }\n }, []);\n\n const scheduleStateUpdate = useCallback(() => {\n // Don't trigger again if we are already tracking a render\n if (!persistentData.current.isTracking) {\n persistentData.current.isTracking = true;\n persistentData.current.state = new Map<string, unknown>();\n setUpdateId(prev => prev + 1);\n }\n }, []);\n\n const initialStateIterator = useRef(\n persistentData.current.initial[Symbol.iterator]()\n );\n\n const getInitialState = useCallback(function getState<S>(id: string): {\n value: S;\n done: boolean;\n } {\n // Prevents a component re-rendering multiple times in the same render cycle from taking multiple values from the iterator\n const initialStateForId = persistentData.current.initialStateMap.get(id);\n if (initialStateForId) {\n return initialStateForId as { value: S; done: boolean };\n }\n const { value, done } = initialStateIterator.current.next();\n const stateVal = { value: value as S, done: done ?? false };\n persistentData.current.initialStateMap.set(id, stateVal);\n return stateVal;\n }, []);\n\n useEffect(\n function persistState() {\n if (persistentData.current.isTracking) {\n onChange([...persistentData.current.state.values()]);\n persistentData.current.isTracking = false;\n }\n },\n [updateId, onChange]\n );\n\n const contextValue = useMemo(\n () => ({\n addState,\n scheduleStateUpdate,\n getInitialState,\n updateId,\n }),\n [addState, getInitialState, scheduleStateUpdate, updateId]\n );\n\n return (\n <PersistentStateContext.Provider value={contextValue}>\n {children}\n </PersistentStateContext.Provider>\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAK,IACVC,aAAa,EACbC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,QACD,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAiCf;AACA;AACA;AACA,OAAO,IAAMC,sBAAsB,gBACjCP,aAAa,CAAoC,IAAI,CAAC;AACxDO,sBAAsB,CAACC,WAAW,GAAG,wBAAwB;AAmB7D;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,KAAmC,EACtB;EACb,IAAM;IAAEC,YAAY;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGH,KAAK;EAClD,IAAM,CAACI,QAAQ,EAAEC,WAAW,CAAC,GAAGhB,KAAK,CAACiB,QAAQ,CAAC,CAAC,CAAC;;EAEjD;EACA;EACA;EACA;EACA;EACA,IAAMC,cAAc,GAAGb,MAAM,CAAC;IAC5Bc,OAAO,EAAEP,YAAY;IACrBQ,eAAe,EAAE,IAAIC,GAAG,CAA4C,CAAC;IACrEC,KAAK,EAAE,IAAID,GAAG,CAAkB,CAAC;IACjCE,UAAU,EAAE,IAAI,CAAE;EACpB,C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CAAC;IACxD,OAAOA,QAAQ;EACjB,CAAC,EAAE,EAAE,CAAC;EAENrC,SAAS,CACP,SAASsC,YAAYA,CAAA,EAAG;IACtB,IAAIvB,cAAc,CAACQ,OAAO,CAACH,UAAU,EAAE;MACrCV,QAAQ,CAAC,CAAC,GAAGK,cAAc,CAACQ,OAAO,CAACJ,KAAK,CAACoB,MAAM,CAAC,CAAC,CAAC,CAAC;MACpDxB,cAAc,CAACQ,OAAO,CAACH,UAAU,GAAG,KAAK;IAC3C;EACF,CAAC,EACD,CAACR,QAAQ,EAAEF,QAAQ,CACrB,CAAC;EAED,IAAM8B,YAAY,GAAGvC,OAAO,CAC1B,OAAO;IACLoB,QAAQ;IACRI,mBAAmB;IACnBK,eAAe;IACflB;EACF,CAAC,CAAC,EACF,CAACS,QAAQ,EAAES,eAAe,EAAEL,mBAAmB,EAAEb,QAAQ,CAC3D,CAAC;EAED,oBACER,IAAA,CAACC,sBAAsB,CAACoC,QAAQ;IAACP,KAAK,EAAEM,YAAa;IAAA7B,QAAA,EAClDA;EAAQ,CACsB,CAAC;AAEtC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"PluginTypes.js","names":["PluginType","Object","freeze","AUTH_PLUGIN","DASHBOARD_PLUGIN","WIDGET_PLUGIN","TABLE_PLUGIN","THEME_PLUGIN","ELEMENT_PLUGIN","isLegacyDashboardPlugin","plugin","isLegacyAuthPlugin","isLegacyTablePlugin","isLegacyPlugin","isDashboardPlugin","type","isWidgetPlugin","isTablePlugin","isAuthPlugin","isThemePlugin","isElementPlugin","isPlugin"],"sources":["../src/PluginTypes.ts"],"sourcesContent":["import type { BaseThemeType } from '@deephaven/components';\nimport {\n type EventEmitter,\n type ItemContainer,\n} from '@deephaven/golden-layout';\nimport type { dh } from '@deephaven/jsapi-types';\nimport type { IconDefinition } from '@fortawesome/fontawesome-common-types';\nimport type { TablePluginComponent } from './TablePlugin';\n\nexport const PluginType = Object.freeze({\n AUTH_PLUGIN: 'AuthPlugin',\n DASHBOARD_PLUGIN: 'DashboardPlugin',\n WIDGET_PLUGIN: 'WidgetPlugin',\n TABLE_PLUGIN: 'TablePlugin',\n THEME_PLUGIN: 'ThemePlugin',\n ELEMENT_PLUGIN: 'ElementPlugin',\n});\n\n/**\n * @deprecated Use DashboardPlugin instead\n */\nexport type LegacyDashboardPlugin = { DashboardPlugin: React.ComponentType };\n\nexport function isLegacyDashboardPlugin(\n plugin: PluginModule\n): plugin is LegacyDashboardPlugin {\n return 'DashboardPlugin' in plugin;\n}\n\n/**\n * @deprecated Use AuthPlugin instead\n */\nexport type LegacyAuthPlugin = {\n AuthPlugin: {\n Component: React.ComponentType<AuthPluginProps>;\n isAvailable: (authHandlers: string[], authConfig: AuthConfigMap) => boolean;\n };\n};\n\nexport function isLegacyAuthPlugin(\n plugin: PluginModule\n): plugin is LegacyAuthPlugin {\n return 'AuthPlugin' in plugin;\n}\n\nexport type PluginModuleMap = Map<string, VersionedPluginModule>;\n\n/**\n * @deprecated Use TablePlugin instead\n */\nexport type LegacyTablePlugin = {\n TablePlugin: TablePluginComponent;\n};\n\nexport function isLegacyTablePlugin(\n plugin: PluginModule\n): plugin is LegacyTablePlugin {\n return 'TablePlugin' in plugin;\n}\n\n/**\n * @deprecated Use Plugin instead\n */\nexport type LegacyPlugin =\n | LegacyDashboardPlugin\n | LegacyAuthPlugin\n | LegacyTablePlugin;\n\nexport function isLegacyPlugin(plugin: unknown): plugin is LegacyPlugin {\n return (\n isLegacyDashboardPlugin(plugin as PluginModule) ||\n isLegacyAuthPlugin(plugin as PluginModule) ||\n isLegacyTablePlugin(plugin as PluginModule)\n );\n}\n\nexport type PluginModule = Plugin | LegacyPlugin;\n\nexport type VersionedPluginModule = PluginModule & { version?: string };\n\nexport interface Plugin {\n /**\n * The name of the plugin. This will be used as an identifier for the plugin and should be unique.\n */\n name: string;\n\n /**\n * The type of plugin.\n */\n type: (typeof PluginType)[keyof typeof PluginType];\n}\n\n/**\n * A plugin that will be mounted to the dashboard.\n */\nexport interface DashboardPlugin extends Plugin {\n type: typeof PluginType.DASHBOARD_PLUGIN;\n /**\n * The component to mount for the dashboard plugin.\n * This component is used to initialize the plugin and will only be mounted to the dashboard once.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n component: React.ComponentType<any>;\n}\n\nexport function isDashboardPlugin(\n plugin: PluginModule\n): plugin is DashboardPlugin {\n return 'type' in plugin && plugin.type === PluginType.DASHBOARD_PLUGIN;\n}\n\nexport interface WidgetComponentProps<T = unknown> {\n /**\n * Function to fetch the widget data.\n * @returns A promise that resolves to the widget data.\n */\n fetch: () => Promise<T>;\n /**\n * A unique identifier for the widget.\n * dh.ui uses this to identify widgets within a dashboard or panel.\n */\n __dhId?: string;\n}\n\nexport interface WidgetPanelProps<T = unknown> extends WidgetComponentProps<T> {\n metadata?: dh.ide.VariableDescriptor;\n localDashboardId: string;\n glContainer: ItemContainer;\n glEventHub: EventEmitter;\n}\n\nexport interface WidgetPlugin<T = unknown> extends Plugin {\n type: typeof PluginType.WIDGET_PLUGIN;\n /**\n * The component that can render the widget types the plugin supports.\n *\n * If the widget should be opened as a panel by itself (determined by the UI),\n * then `panelComponent` will be used instead.\n * The component will be wrapped in a default panel if `panelComponent` is not provided.\n */\n component: React.ComponentType<WidgetComponentProps<T>>;\n\n /**\n * The server widget types that this plugin will handle.\n */\n supportedTypes: string | string[];\n\n /**\n * The title to display for widgets handled by the plugin.\n * This is a user friendly name to denote the type of widget.\n * Does not have to be unique across plugins.\n * If not specified, the plugin name will be used as the title.\n *\n * A plugin may have a name of `@deehaven/pandas` and a title of `Pandas`.\n * This way, the user will just see `Pandas panel` instead of `@deephaven/pandas panel`.\n */\n title?: string;\n\n /**\n * The component to use if the widget should be mounted as a panel.\n * If omitted, the default panel will be used.\n * This provides access to panel events such as onHide and onTabFocus.\n *\n * See @deephaven/dashboard-core-plugins WidgetPanel for the component that should be used here.\n */\n panelComponent?: React.ComponentType<WidgetPanelProps<T>>;\n\n /**\n * The icon to display next to the console button.\n * If a react node is provided (including a string), it will be rendered directly.\n * If no icon is specified, the default widget icon will be used.\n */\n icon?: IconDefinition | React.ReactElement<unknown>;\n}\n\nexport function isWidgetPlugin(plugin: PluginModule): plugin is WidgetPlugin {\n return 'type' in plugin && plugin.type === PluginType.WIDGET_PLUGIN;\n}\n\nexport interface TablePlugin extends Plugin {\n type: typeof PluginType.TABLE_PLUGIN;\n component: TablePluginComponent;\n}\n\nexport function isTablePlugin(plugin: PluginModule): plugin is TablePlugin {\n return 'type' in plugin && plugin.type === PluginType.TABLE_PLUGIN;\n}\n\n/**\n * Map from auth config keys to their values\n * E.g. Map { AuthHandlers → \"io.deephaven.auth.AnonymousAuthenticationHandler\" }\n */\nexport type AuthConfigMap = Map<string, string>;\n\n/**\n * Props for the auth plugin component to render\n */\nexport type AuthPluginProps = {\n /** Map from config keys to their values */\n authConfigValues: AuthConfigMap;\n\n /**\n * The children to render after authentication is completed.\n */\n children: React.ReactNode;\n};\n\nexport type AuthPluginComponent = React.ComponentType<AuthPluginProps>;\n\nexport interface AuthPlugin extends Plugin {\n type: typeof PluginType.AUTH_PLUGIN;\n /**\n * The component to mount if the AuthPlugin is available\n */\n component: AuthPluginComponent;\n /**\n * Whether the auth plugin is available given the current configuration\n */\n isAvailable: (authHandlers: string[], authConfig: AuthConfigMap) => boolean;\n}\n\nexport function isAuthPlugin(plugin: PluginModule): plugin is AuthPlugin {\n return 'type' in plugin && plugin.type === PluginType.AUTH_PLUGIN;\n}\n\nexport interface ThemeConfig {\n name: string;\n baseTheme?: BaseThemeType;\n styleContent: string;\n}\n\nexport interface ThemePlugin extends Plugin {\n type: typeof PluginType.THEME_PLUGIN;\n themes: ThemeConfig | ThemeConfig[];\n}\n\n/** Type guard to check if given plugin is a `ThemePlugin` */\nexport function isThemePlugin(plugin: PluginModule): plugin is ThemePlugin {\n return 'type' in plugin && plugin.type === PluginType.THEME_PLUGIN;\n}\n\nexport type ElementName = string;\n\n/** A mapping of element names to their React components. */\nexport type ElementPluginMappingDefinition<\n P extends Record<ElementName, unknown> = Record<string, never>,\n> = {\n [K in keyof P]: React.ComponentType<P[K]>;\n};\n\nexport type ElementMap<\n P extends Record<string, unknown> = Record<string, never>,\n> = ReadonlyMap<\n keyof P extends never ? string : keyof P,\n React.ComponentType<P[keyof P]>\n>;\n\n/** An element plugin is used by deephaven.ui to render custom components\n * The mapping contains the element names as keys and the React components as values.\n */\nexport interface ElementPlugin extends Plugin {\n type: typeof PluginType.ELEMENT_PLUGIN;\n mapping: ElementPluginMappingDefinition;\n}\n\nexport function isElementPlugin(plugin: PluginModule): plugin is ElementPlugin {\n return 'type' in plugin && plugin.type === PluginType.ELEMENT_PLUGIN;\n}\n\nexport function isPlugin(plugin: unknown): plugin is Plugin {\n return (\n isDashboardPlugin(plugin as PluginModule) ||\n isAuthPlugin(plugin as PluginModule) ||\n isTablePlugin(plugin as PluginModule) ||\n isThemePlugin(plugin as PluginModule) ||\n isWidgetPlugin(plugin as PluginModule) ||\n isElementPlugin(plugin as PluginModule)\n );\n}\n"],"mappings":"AASA,OAAO,IAAMA,UAAU,GAAGC,MAAM,CAACC,MAAM,CAAC;EACtCC,WAAW,EAAE,YAAY;EACzBC,gBAAgB,EAAE,iBAAiB;EACnCC,aAAa,EAAE,cAAc;EAC7BC,YAAY,EAAE,aAAa;EAC3BC,YAAY,EAAE,aAAa;EAC3BC,cAAc,EAAE;AAClB,CAAC,CAAC;;AAEF;AACA;AACA;;AAGA,OAAO,SAASC,uBAAuBA,CACrCC,MAAoB,EACa;EACjC,OAAO,iBAAiB,IAAIA,MAAM;AACpC;;AAEA;AACA;AACA;;AAQA,OAAO,SAASC,kBAAkBA,CAChCD,MAAoB,EACQ;EAC5B,OAAO,YAAY,IAAIA,MAAM;AAC/B;;AAIA;AACA;AACA;;AAKA,OAAO,SAASE,mBAAmBA,CACjCF,MAAoB,EACS;EAC7B,OAAO,aAAa,IAAIA,MAAM;AAChC;;AAEA;AACA;AACA;;AAMA,OAAO,SAASG,cA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IACrCM,cAAc,CAACN,MAAsB,CAAC,IACtCU,eAAe,CAACV,MAAsB,CAAC;AAE3C"}
1
+ {"version":3,"file":"PluginTypes.js","names":["PluginType","Object","freeze","AUTH_PLUGIN","DASHBOARD_PLUGIN","WIDGET_PLUGIN","TABLE_PLUGIN","THEME_PLUGIN","ELEMENT_PLUGIN","isLegacyDashboardPlugin","plugin","isLegacyAuthPlugin","isLegacyTablePlugin","isLegacyPlugin","isDashboardPlugin","type","isWidgetPlugin","isTablePlugin","isAuthPlugin","isThemePlugin","isElementPlugin","isPlugin"],"sources":["../src/PluginTypes.ts"],"sourcesContent":["import type { BaseThemeType } from '@deephaven/components';\nimport {\n type EventEmitter,\n type ItemContainer,\n} from '@deephaven/golden-layout';\nimport type { dh } from '@deephaven/jsapi-types';\nimport type { IconDefinition } from '@fortawesome/fontawesome-common-types';\nimport type { TablePluginComponent } from './TablePlugin';\n\nexport const PluginType = Object.freeze({\n AUTH_PLUGIN: 'AuthPlugin',\n DASHBOARD_PLUGIN: 'DashboardPlugin',\n WIDGET_PLUGIN: 'WidgetPlugin',\n TABLE_PLUGIN: 'TablePlugin',\n THEME_PLUGIN: 'ThemePlugin',\n ELEMENT_PLUGIN: 'ElementPlugin',\n});\n\n/**\n * @deprecated Use DashboardPlugin instead\n */\nexport type LegacyDashboardPlugin = { DashboardPlugin: React.ComponentType };\n\nexport function isLegacyDashboardPlugin(\n plugin: PluginModule\n): plugin is LegacyDashboardPlugin {\n return 'DashboardPlugin' in plugin;\n}\n\n/**\n * @deprecated Use AuthPlugin instead\n */\nexport type LegacyAuthPlugin = {\n AuthPlugin: {\n Component: React.ComponentType<AuthPluginProps>;\n isAvailable: (authHandlers: string[], authConfig: AuthConfigMap) => boolean;\n };\n};\n\nexport function isLegacyAuthPlugin(\n plugin: PluginModule\n): plugin is LegacyAuthPlugin {\n return 'AuthPlugin' in plugin;\n}\n\nexport type PluginModuleMap = Map<string, VersionedPluginModule>;\n\n/**\n * @deprecated Use TablePlugin instead\n */\nexport type LegacyTablePlugin = {\n TablePlugin: TablePluginComponent;\n};\n\nexport function isLegacyTablePlugin(\n plugin: PluginModule\n): plugin is LegacyTablePlugin {\n return 'TablePlugin' in plugin;\n}\n\n/**\n * @deprecated Use Plugin instead\n */\nexport type LegacyPlugin =\n | LegacyDashboardPlugin\n | LegacyAuthPlugin\n | LegacyTablePlugin;\n\nexport function isLegacyPlugin(plugin: unknown): plugin is LegacyPlugin {\n return (\n isLegacyDashboardPlugin(plugin as PluginModule) ||\n isLegacyAuthPlugin(plugin as PluginModule) ||\n isLegacyTablePlugin(plugin as PluginModule)\n );\n}\n\nexport type PluginModule = Plugin | LegacyPlugin;\n\nexport type VersionedPluginModule = PluginModule & { version?: string };\n\nexport interface Plugin {\n /**\n * The name of the plugin. This will be used as an identifier for the plugin and should be unique.\n */\n name: string;\n\n /**\n * The type of plugin.\n */\n type: (typeof PluginType)[keyof typeof PluginType];\n}\n\n/**\n * A plugin that will be mounted to the dashboard.\n */\nexport interface DashboardPlugin extends Plugin {\n type: typeof PluginType.DASHBOARD_PLUGIN;\n /**\n * The component to mount for the dashboard plugin.\n * This component is used to initialize the plugin and will only be mounted to the dashboard once.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n component: React.ComponentType<any>;\n}\n\nexport function isDashboardPlugin(\n plugin: PluginModule\n): plugin is DashboardPlugin {\n return 'type' in plugin && plugin.type === PluginType.DASHBOARD_PLUGIN;\n}\n\nexport interface WidgetComponentProps<T = unknown> {\n /**\n * Function to fetch the widget data.\n * @returns A promise that resolves to the widget data.\n */\n fetch: () => Promise<T>;\n /**\n * A unique identifier for the widget.\n * dh.ui uses this to identify widgets within a dashboard or panel.\n */\n __dhId?: string;\n}\n\nexport interface WidgetPanelProps<T = unknown> extends WidgetComponentProps<T> {\n metadata?: dh.ide.VariableDescriptor;\n localDashboardId: string;\n glContainer: ItemContainer;\n glEventHub: EventEmitter;\n}\n\nexport interface WidgetPlugin<T = unknown> extends Plugin {\n type: typeof PluginType.WIDGET_PLUGIN;\n /**\n * The component that can render the widget types the plugin supports.\n *\n * If the widget should be opened as a panel by itself (determined by the UI),\n * then `panelComponent` will be used instead.\n * The component will be wrapped in a default panel if `panelComponent` is not provided.\n */\n component: React.ComponentType<WidgetComponentProps<T>>;\n\n /**\n * The server widget types that this plugin will handle.\n */\n supportedTypes: string | string[];\n\n /**\n * The title to display for widgets handled by the plugin.\n * This is a user friendly name to denote the type of widget.\n * Does not have to be unique across plugins.\n * If not specified, the plugin name will be used as the title.\n *\n * A plugin may have a name of `@deehaven/pandas` and a title of `Pandas`.\n * This way, the user will just see `Pandas panel` instead of `@deephaven/pandas panel`.\n */\n title?: string;\n\n /**\n * The component to use if the widget should be mounted as a panel.\n * If omitted, the default panel will be used.\n * This provides access to panel events such as onHide and onTabFocus.\n *\n * See @deephaven/dashboard-core-plugins WidgetPanel for the component that should be used here.\n */\n panelComponent?: React.ComponentType<WidgetPanelProps<T>>;\n\n /**\n * The icon to display next to the console button.\n * If a react node is provided (including a string), it will be rendered directly.\n * If no icon is specified, the default widget icon will be used.\n */\n icon?: IconDefinition | React.ReactElement<unknown>;\n}\n\nexport function isWidgetPlugin(plugin: PluginModule): plugin is WidgetPlugin {\n return 'type' in plugin && plugin.type === PluginType.WIDGET_PLUGIN;\n}\n\nexport interface TablePlugin extends Plugin {\n type: typeof PluginType.TABLE_PLUGIN;\n component: TablePluginComponent;\n}\n\nexport function isTablePlugin(plugin: PluginModule): plugin is TablePlugin {\n return 'type' in plugin && plugin.type === PluginType.TABLE_PLUGIN;\n}\n\n/**\n * Map from auth config keys to their values\n * E.g. Map { AuthHandlers → \"io.deephaven.auth.AnonymousAuthenticationHandler\" }\n */\nexport type AuthConfigMap = Map<string, string>;\n\n/**\n * Props for the auth plugin component to render\n */\nexport type AuthPluginProps = {\n /** Map from config keys to their values */\n authConfigValues: AuthConfigMap;\n\n /**\n * The children to render after authentication is completed.\n */\n children: React.ReactNode;\n};\n\nexport type AuthPluginComponent = React.ComponentType<AuthPluginProps>;\n\nexport interface AuthPlugin extends Plugin {\n type: typeof PluginType.AUTH_PLUGIN;\n /**\n * The component to mount if the AuthPlugin is available\n */\n component: AuthPluginComponent;\n /**\n * Whether the auth plugin is available given the current configuration\n */\n isAvailable: (authHandlers: string[], authConfig: AuthConfigMap) => boolean;\n}\n\nexport function isAuthPlugin(plugin: PluginModule): plugin is AuthPlugin {\n return 'type' in plugin && plugin.type === PluginType.AUTH_PLUGIN;\n}\n\nexport interface ThemeConfig {\n name: string;\n baseTheme?: BaseThemeType;\n styleContent: string;\n}\n\nexport interface ThemePlugin extends Plugin {\n type: typeof PluginType.THEME_PLUGIN;\n themes: ThemeConfig | ThemeConfig[];\n}\n\n/** Type guard to check if given plugin is a `ThemePlugin` */\nexport function isThemePlugin(plugin: PluginModule): plugin is ThemePlugin {\n return 'type' in plugin && plugin.type === PluginType.THEME_PLUGIN;\n}\n\nexport type ElementName = string;\n\n/** A mapping of element names to their React components. */\nexport type ElementPluginMappingDefinition<\n P extends Record<ElementName, unknown> = Record<string, never>,\n> = {\n [K in keyof P]: React.ComponentType<P[K]>;\n};\n\nexport type ElementMap<\n P extends Record<string, unknown> = Record<string, never>,\n> = ReadonlyMap<\n keyof P extends never ? string : keyof P,\n React.ComponentType<P[keyof P]>\n>;\n\n/** An element plugin is used by deephaven.ui to render custom components\n * The mapping contains the element names as keys and the React components as values.\n */\nexport interface ElementPlugin extends Plugin {\n type: typeof PluginType.ELEMENT_PLUGIN;\n mapping: ElementPluginMappingDefinition;\n}\n\nexport function isElementPlugin(plugin: PluginModule): plugin is ElementPlugin {\n return 'type' in plugin && plugin.type === PluginType.ELEMENT_PLUGIN;\n}\n\nexport function isPlugin(plugin: unknown): plugin is Plugin {\n return (\n isDashboardPlugin(plugin as PluginModule) ||\n isAuthPlugin(plugin as PluginModule) ||\n isTablePlugin(plugin as PluginModule) ||\n isThemePlugin(plugin as PluginModule) ||\n isWidgetPlugin(plugin as PluginModule) ||\n isElementPlugin(plugin as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AASY,YAAYA,CAACR,MAAoB,EAAwB;EACvE,OAAO,MAAM,IAAIA,MAAM,IAAIA,MAAM,CAACK,IAAI,KAAKf,UAAU,CAACG,WAAW;AACnE;AAaA;AACA,OAAO,SAASgB,aAAaA,CAACT,MAAoB,EAAyB;EACzE,OAAO,MAAM,IAAIA,MAAM,IAAIA,MAAM,CAACK,IAAI,KAAKf,UAAU,CAACO,YAAY;AACpE;;AAIA;;AAcA;AACA;AACA;;AAMA,OAAO,SAASa,eAAeA,CAACV,MAAoB,EAA2B;EAC7E,OAAO,MAAM,IAAIA,MAAM,IAAIA,MAAM,CAACK,IAAI,KAAKf,UAAU,CAACQ,cAAc;AACtE;AAEA,OAAO,SAASa,QAAQA,CAACX,MAAe,EAAoB;EAC1D,OACEI,iBAAiB,CAACJ,MAAsB,CAAC,IACzCQ,YAAY,CAACR,MAAsB,CAAC,IACpCO,aAAa,CAACP,MAAsB,CAAC,IACrCS,aAAa,CAACT,MAAsB,CAAC,IACrCM,cAAc,CAACN,MAAsB,CAAC,IACtCU,eAAe,CAACV,MAAsB,CAAC;AAE3C","ignoreList":[]}
@@ -25,7 +25,7 @@ export function getIconForPlugin(plugin) {
25
25
  if (icon == null) {
26
26
  return defaultIcon;
27
27
  }
28
- if ( /*#__PURE__*/isValidElement(icon)) {
28
+ if (/*#__PURE__*/isValidElement(icon)) {
29
29
  return icon;
30
30
  }
31
31
  return /*#__PURE__*/_jsx(FontAwesomeIcon, {
@@ -1 +1 @@
1
- {"version":3,"file":"PluginUtils.js","names":["isValidElement","FontAwesomeIcon","getThemeKey","vsPreview","Log","isWidgetPlugin","isThemePlugin","isElementPlugin","jsx","_jsx","log","module","pluginSupportsType","plugin","type","supportedTypes","flat","some","t","getIconForPlugin","defaultIcon","icon","getThemeDataFromPlugins","pluginMap","themePluginEntries","entries","filter","entry","debug","map","_ref","pluginName","configs","Array","isArray","themes","_ref2","name","baseTheme","styleContent","baseThemeKey","concat","themeKey","getPluginsElementMap","elementPluginEntries","mapping","Map","flatMap","_ref3","Object"],"sources":["../src/PluginUtils.tsx"],"sourcesContent":["import { isValidElement } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { getThemeKey, type ThemeData } from '@deephaven/components';\nimport { vsPreview } from '@deephaven/icons';\nimport Log from '@deephaven/log';\nimport {\n type PluginModule,\n isWidgetPlugin,\n type PluginModuleMap,\n type ThemePlugin,\n isThemePlugin,\n isElementPlugin,\n type ElementPlugin,\n type ElementMap,\n} from './PluginTypes';\n\nconst log = Log.module('@deephaven/plugin.PluginUtils');\n\nexport function pluginSupportsType(\n plugin: PluginModule | undefined,\n type: string\n): boolean {\n if (plugin == null || !isWidgetPlugin(plugin)) {\n return false;\n }\n\n return [plugin.supportedTypes].flat().some(t => t === type);\n}\n\nexport function getIconForPlugin(plugin: PluginModule): React.ReactElement {\n const defaultIcon = <FontAwesomeIcon icon={vsPreview} />;\n if (!isWidgetPlugin(plugin)) {\n return defaultIcon;\n }\n\n const { icon } = plugin;\n\n if (icon == null) {\n return defaultIcon;\n }\n\n if (isValidElement(icon)) {\n return icon;\n }\n\n return <FontAwesomeIcon icon={icon} />;\n}\n\n/**\n * Extract theme data from theme plugins in the given plugin map.\n * @param pluginMap\n */\nexport function getThemeDataFromPlugins(\n pluginMap: PluginModuleMap\n): ThemeData[] {\n const themePluginEntries = [...pluginMap.entries()].filter(\n (entry): entry is [string, ThemePlugin] => isThemePlugin(entry[1])\n );\n\n log.debug('Getting theme data from plugins', themePluginEntries);\n\n return themePluginEntries\n .map(([pluginName, plugin]) => {\n // Normalize to an array since config can be an array of configs or a\n // single config\n const configs = Array.isArray(plugin.themes)\n ? plugin.themes\n : [plugin.themes];\n\n return configs.map(\n ({ name, baseTheme, styleContent }) =>\n ({\n baseThemeKey: `default-${baseTheme ?? 'dark'}`,\n themeKey: getThemeKey(pluginName, name),\n name,\n styleContent,\n }) as const\n );\n })\n .flat();\n}\n\n/**\n * Get a mapping of element names to their React components from the given plugin map.\n * @param pluginMap The plugin map to extract element plugins from.\n * @returns A Map of element names to their React components.\n */\nexport function getPluginsElementMap(pluginMap: PluginModuleMap): ElementMap {\n const elementPluginEntries = [...pluginMap.entries()].filter(\n (entry): entry is [string, ElementPlugin] =>\n isElementPlugin(entry[1]) && entry[1].mapping != null\n );\n\n log.debug('Getting element plugin mapping', elementPluginEntries);\n\n return new Map(\n elementPluginEntries.flatMap(([, plugin]) => Object.entries(plugin.mapping))\n );\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,OAAO;AACtC,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,WAAW,QAAwB,uBAAuB;AACnE,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SAG/BC,cAAc,EAGdC,aAAa,EACbC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAKjB,IAAMC,GAAG,GAAGN,GAAG,CAACO,MAAM,CAAC,+BAA+B,CAAC;AAEvD,OAAO,SAASC,kBAAkBA,CAChCC,MAAgC,EAChCC,IAAY,EACH;EACT,IAAID,MAAM,IAAI,IAAI,IAAI,CAACR,cAAc,CAACQ,MAAM,CAAC,EAAE;IAC7C,OAAO,KAAK;EACd;EAEA,OAAO,CAACA,MAAM,CAACE,cAAc,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAKJ,IAAI,CAAC;AAC7D;AAEA,OAAO,SAASK,gBAAgBA,CAACN,MAAoB,EAAsB;EACzE,IAAMO,WAAW,gBAAGX,IAAA,CAACR,eAAe;IAACoB,IAAI,EAAElB;EAAU,CAAE,CAAC;EACxD,IAAI,CAACE,cAAc,CAACQ,MAAM,CAAC,EAAE;IAC3B,OAAOO,WAAW;EACpB;EAEA,IAAM;IAAEC;EAAK,CAAC,GAAGR,MAAM;EAEvB,IAAIQ,IAAI,IAAI,IAAI,EAAE;IAChB,OAAOD,WAAW;EACpB;EAEA,kBAAIpB,cAAc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K,IACJpB,eAAe,CAACoB,KAAK,CAAC,CAAC,CAAC,CAAC,IAAIA,KAAK,CAAC,CAAC,CAAC,CAACkB,OAAO,IAAI,IACrD,CAAC;EAEDnC,GAAG,CAACkB,KAAK,CAAC,gCAAgC,EAAEgB,oBAAoB,CAAC;EAEjE,OAAO,IAAIE,GAAG,CACZF,oBAAoB,CAACG,OAAO,CAACC,KAAA;IAAA,IAAC,GAAGnC,MAAM,CAAC,GAAAmC,KAAA;IAAA,OAAKC,MAAM,CAACxB,OAAO,CAACZ,MAAM,CAACgC,OAAO,CAAC;EAAA,EAC7E,CAAC;AACH"}
1
+ {"version":3,"file":"PluginUtils.js","names":["isValidElement","FontAwesomeIcon","getThemeKey","vsPreview","Log","isWidgetPlugin","isThemePlugin","isElementPlugin","jsx","_jsx","log","module","pluginSupportsType","plugin","type","supportedTypes","flat","some","t","getIconForPlugin","defaultIcon","icon","getThemeDataFromPlugins","pluginMap","themePluginEntries","entries","filter","entry","debug","map","_ref","pluginName","configs","Array","isArray","themes","_ref2","name","baseTheme","styleContent","baseThemeKey","concat","themeKey","getPluginsElementMap","elementPluginEntries","mapping","Map","flatMap","_ref3","Object"],"sources":["../src/PluginUtils.tsx"],"sourcesContent":["import { isValidElement } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { getThemeKey, type ThemeData } from '@deephaven/components';\nimport { vsPreview } from '@deephaven/icons';\nimport Log from '@deephaven/log';\nimport {\n type PluginModule,\n isWidgetPlugin,\n type PluginModuleMap,\n type ThemePlugin,\n isThemePlugin,\n isElementPlugin,\n type ElementPlugin,\n type ElementMap,\n} from './PluginTypes';\n\nconst log = Log.module('@deephaven/plugin.PluginUtils');\n\nexport function pluginSupportsType(\n plugin: PluginModule | undefined,\n type: string\n): boolean {\n if (plugin == null || !isWidgetPlugin(plugin)) {\n return false;\n }\n\n return [plugin.supportedTypes].flat().some(t => t === type);\n}\n\nexport function getIconForPlugin(plugin: PluginModule): React.ReactElement {\n const defaultIcon = <FontAwesomeIcon icon={vsPreview} />;\n if (!isWidgetPlugin(plugin)) {\n return defaultIcon;\n }\n\n const { icon } = plugin;\n\n if (icon == null) {\n return defaultIcon;\n }\n\n if (isValidElement(icon)) {\n return icon;\n }\n\n return <FontAwesomeIcon icon={icon} />;\n}\n\n/**\n * Extract theme data from theme plugins in the given plugin map.\n * @param pluginMap\n */\nexport function getThemeDataFromPlugins(\n pluginMap: PluginModuleMap\n): ThemeData[] {\n const themePluginEntries = [...pluginMap.entries()].filter(\n (entry): entry is [string, ThemePlugin] => isThemePlugin(entry[1])\n );\n\n log.debug('Getting theme data from plugins', themePluginEntries);\n\n return themePluginEntries\n .map(([pluginName, plugin]) => {\n // Normalize to an array since config can be an array of configs or a\n // single config\n const configs = Array.isArray(plugin.themes)\n ? plugin.themes\n : [plugin.themes];\n\n return configs.map(\n ({ name, baseTheme, styleContent }) =>\n ({\n baseThemeKey: `default-${baseTheme ?? 'dark'}`,\n themeKey: getThemeKey(pluginName, name),\n name,\n styleContent,\n }) as const\n );\n })\n .flat();\n}\n\n/**\n * Get a mapping of element names to their React components from the given plugin map.\n * @param pluginMap The plugin map to extract element plugins from.\n * @returns A Map of element names to their React components.\n */\nexport function getPluginsElementMap(pluginMap: PluginModuleMap): ElementMap {\n const elementPluginEntries = [...pluginMap.entries()].filter(\n (entry): entry is [string, ElementPlugin] =>\n isElementPlugin(entry[1]) && entry[1].mapping != null\n );\n\n log.debug('Getting element plugin mapping', elementPluginEntries);\n\n return new Map(\n elementPluginEntries.flatMap(([, plugin]) => Object.entries(plugin.mapping))\n );\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,OAAO;AACtC,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,WAAW,QAAwB,uBAAuB;AACnE,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SAG/BC,cAAc,EAGdC,aAAa,EACbC,eAAe;AAAA,SAAAC,GAAA,IAAA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AAA;IACxB;IACA;IACA,IAAME,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACrB,MAAM,CAACsB,MAAM,CAAC,GACxCtB,MAAM,CAACsB,MAAM,GACb,CAACtB,MAAM,CAACsB,MAAM,CAAC;IAEnB,OAAOH,OAAO,CAACH,GAAG,CAChBO,KAAA;MAAA,IAAC;QAAEC,IAAI;QAAEC,SAAS;QAAEC;MAAa,CAAC,GAAAH,KAAA;MAAA,OAC/B;QACCI,YAAY,aAAAC,MAAA,CAAaH,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,MAAM,CAAE;QAC9CI,QAAQ,EAAExC,WAAW,CAAC6B,UAAU,EAAEM,IAAI,CAAC;QACvCA,IAAI;QACJE;MACF,CAAC;IAAA,CACL,CAAC;EACH,CAAC,CAAC,CACDvB,IAAI,CAAC,CAAC;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS2B,oBAAoBA,CAACpB,SAA0B,EAAc;EAC3E,IAAMqB,oBAAoB,GAAG,CAAC,GAAGrB,SAAS,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,MAAM,CACzDC,KAAK,IACJpB,eAAe,CAACoB,KAAK,CAAC,CAAC,CAAC,CAAC,IAAIA,KAAK,CAAC,CAAC,CAAC,CAACkB,OAAO,IAAI,IACrD,CAAC;EAEDnC,GAAG,CAACkB,KAAK,CAAC,gCAAgC,EAAEgB,oBAAoB,CAAC;EAEjE,OAAO,IAAIE,GAAG,CACZF,oBAAoB,CAACG,OAAO,CAACC,KAAA;IAAA,IAAC,GAAGnC,MAAM,CAAC,GAAAmC,KAAA;IAAA,OAAKC,MAAM,CAACxB,OAAO,CAACZ,MAAM,CAACgC,OAAO,CAAC;EAAA,EAC7E,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"PluginsContext.js","names":["createContext","PluginsContext","displayName"],"sources":["../src/PluginsContext.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { type PluginModuleMap } from './PluginTypes';\n\nexport const PluginsContext = createContext<PluginModuleMap | null>(null);\nPluginsContext.displayName = 'PluginsContext';\n\nexport default PluginsContext;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,OAAO;AAGrC,OAAO,IAAMC,cAAc,gBAAGD,aAAa,CAAyB,IAAI,CAAC;AACzEC,cAAc,CAACC,WAAW,GAAG,gBAAgB;AAE7C,eAAeD,cAAc"}
1
+ {"version":3,"file":"PluginsContext.js","names":["createContext","PluginsContext","displayName"],"sources":["../src/PluginsContext.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { type PluginModuleMap } from './PluginTypes';\n\nexport const PluginsContext = createContext<PluginModuleMap | null>(null);\nPluginsContext.displayName = 'PluginsContext';\n\nexport default PluginsContext;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,OAAO;AAGrC,OAAO,IAAMC,cAAc,gBAAGD,aAAa,CAAyB,IAAI,CAAC;AACzEC,cAAc,CAACC,WAAW,GAAG,gBAAgB;AAE7C,eAAeD,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"TablePlugin.js","names":[],"sources":["../src/TablePlugin.ts"],"sourcesContent":["import type React from 'react';\nimport type {\n ColumnName,\n InputFilter,\n IrisGridContextMenuData,\n IrisGridTableModelTemplate,\n} from '@deephaven/iris-grid';\nimport { type GridRange } from '@deephaven/grid';\nimport type { ResolvableContextAction } from '@deephaven/components';\nimport type { dh } from '@deephaven/jsapi-types';\n\nexport interface TablePluginElement {\n getMenu?: (data: IrisGridContextMenuData) => ResolvableContextAction[];\n}\n\nexport interface TablePluginProps<S = unknown> {\n /**\n * Apply filters to the table\n * @param filters Filters to apply to the table\n */\n filter: (filters: InputFilter[]) => void;\n\n /**\n * Set columns that should always be fetched, even if they're outside the viewport\n * @param pluginFetchColumns Names of columns to always fetch\n */\n fetchColumns: (pluginFetchColumns: ColumnName[]) => void;\n\n /**\n * The model for the table this plugin is associated with.\n */\n model: IrisGridTableModelTemplate;\n\n /**\n * The table this plugin was associated with.\n */\n table: dh.Table;\n\n /**\n * The name of the table this plugin is associated with.\n */\n tableName: string;\n\n /**\n * The currently selected ranges in the table.\n */\n selectedRanges: readonly GridRange[] | undefined;\n\n /**\n * Notify of a state change in the plugin state. Will be saved with the panel data.\n * Should be an object that can be serialized to JSON.\n * @param pluginState State of the plugin to save\n */\n onStateChange: (pluginState: S) => void;\n\n /**\n * Current plugin state. Use to load.\n */\n pluginState: S;\n}\n\nexport type TablePluginComponent<S = unknown> = React.ComponentType<\n TablePluginProps<S> & React.RefAttributes<TablePluginElement>\n>;\n"],"mappings":""}
1
+ {"version":3,"file":"TablePlugin.js","names":[],"sources":["../src/TablePlugin.ts"],"sourcesContent":["import type React from 'react';\nimport type {\n ColumnName,\n InputFilter,\n IrisGridContextMenuData,\n IrisGridTableModelTemplate,\n} from '@deephaven/iris-grid';\nimport { type GridRange } from '@deephaven/grid';\nimport type { ResolvableContextAction } from '@deephaven/components';\nimport type { dh } from '@deephaven/jsapi-types';\n\nexport interface TablePluginElement {\n getMenu?: (data: IrisGridContextMenuData) => ResolvableContextAction[];\n}\n\nexport interface TablePluginProps<S = unknown> {\n /**\n * Apply filters to the table\n * @param filters Filters to apply to the table\n */\n filter: (filters: InputFilter[]) => void;\n\n /**\n * Set columns that should always be fetched, even if they're outside the viewport\n * @param pluginFetchColumns Names of columns to always fetch\n */\n fetchColumns: (pluginFetchColumns: ColumnName[]) => void;\n\n /**\n * The model for the table this plugin is associated with.\n */\n model: IrisGridTableModelTemplate;\n\n /**\n * The table this plugin was associated with.\n */\n table: dh.Table;\n\n /**\n * The name of the table this plugin is associated with.\n */\n tableName: string;\n\n /**\n * The currently selected ranges in the table.\n */\n selectedRanges: readonly GridRange[] | undefined;\n\n /**\n * Notify of a state change in the plugin state. Will be saved with the panel data.\n * Should be an object that can be serialized to JSON.\n * @param pluginState State of the plugin to save\n */\n onStateChange: (pluginState: S) => void;\n\n /**\n * Current plugin state. Use to load.\n */\n pluginState: S;\n}\n\nexport type TablePluginComponent<S = unknown> = React.ComponentType<\n TablePluginProps<S> & React.RefAttributes<TablePluginElement>\n>;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetView.js","names":["React","useMemo","usePlugins","isWidgetPlugin","jsx","_jsx","WidgetView","_ref","fetch","type","plugins","plugin","values","filter","find","p","supportedTypes","flat","includes","Component","component","Error","concat"],"sources":["../src/WidgetView.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport usePlugins from './usePlugins';\nimport { isWidgetPlugin } from './PluginTypes';\n\nexport type WidgetViewProps = {\n /** Fetch function to return the widget */\n fetch: () => Promise<unknown>;\n\n /** Type of the widget */\n type: string;\n};\n\nexport function WidgetView({ fetch, type }: WidgetViewProps): JSX.Element {\n const plugins = usePlugins();\n const plugin = useMemo(\n () =>\n [...plugins.values()]\n .filter(isWidgetPlugin)\n .find(p => [p.supportedTypes].flat().includes(type)),\n [plugins, type]\n );\n\n if (plugin != null) {\n const Component = plugin.component;\n return <Component fetch={fetch} />;\n }\n\n throw new Error(`Unknown widget type '${type}'`);\n}\n\nexport default WidgetView;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAAC,OAChCC,UAAU;AAAA,SACRC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUvB,OAAO,SAASC,UAAUA,CAAAC,IAAA,EAAgD;EAAA,IAA/C;IAAEC,KAAK;IAAEC;EAAsB,CAAC,GAAAF,IAAA;EACzD,IAAMG,OAAO,GAAGR,UAAU,CAAC,CAAC;EAC5B,IAAMS,MAAM,GAAGV,OAAO,CACpB,MACE,CAAC,GAAGS,OAAO,CAACE,MAAM,CAAC,CAAC,CAAC,CAClBC,MAAM,CAACV,cAAc,CAAC,CACtBW,IAAI,CAACC,CAAC,IAAI,CAACA,CAAC,CAACC,cAAc,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,QAAQ,CAACT,IAAI,CAAC,CAAC,EACxD,CAACC,OAAO,EAAED,IAAI,CAChB,CAAC;EAED,IAAIE,MAAM,IAAI,IAAI,EAAE;IAClB,IAAMQ,SAAS,GAAGR,MAAM,CAACS,SAAS;IAClC,oBAAOf,IAAA,CAACc,SAAS;MAACX,KAAK,EAAEA;IAAM,CAAE,CAAC;EACpC;EAEA,MAAM,IAAIa,KAAK,yBAAAC,MAAA,CAAyBb,IAAI,MAAG,CAAC;AAClD;AAEA,eAAeH,UAAU"}
1
+ {"version":3,"file":"WidgetView.js","names":["React","useMemo","usePlugins","isWidgetPlugin","jsx","_jsx","WidgetView","_ref","fetch","type","plugins","plugin","values","filter","find","p","supportedTypes","flat","includes","Component","component","Error","concat"],"sources":["../src/WidgetView.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport usePlugins from './usePlugins';\nimport { isWidgetPlugin } from './PluginTypes';\n\nexport type WidgetViewProps = {\n /** Fetch function to return the widget */\n fetch: () => Promise<unknown>;\n\n /** Type of the widget */\n type: string;\n};\n\nexport function WidgetView({ fetch, type }: WidgetViewProps): JSX.Element {\n const plugins = usePlugins();\n const plugin = useMemo(\n () =>\n [...plugins.values()]\n .filter(isWidgetPlugin)\n .find(p => [p.supportedTypes].flat().includes(type)),\n [plugins, type]\n );\n\n if (plugin != null) {\n const Component = plugin.component;\n return <Component fetch={fetch} />;\n }\n\n throw new Error(`Unknown widget type '${type}'`);\n}\n\nexport default WidgetView;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAAC,OAChCC,UAAU;AAAA,SACRC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUvB,OAAO,SAASC,UAAUA,CAAAC,IAAA,EAAgD;EAAA,IAA/C;IAAEC,KAAK;IAAEC;EAAsB,CAAC,GAAAF,IAAA;EACzD,IAAMG,OAAO,GAAGR,UAAU,CAAC,CAAC;EAC5B,IAAMS,MAAM,GAAGV,OAAO,CACpB,MACE,CAAC,GAAGS,OAAO,CAACE,MAAM,CAAC,CAAC,CAAC,CAClBC,MAAM,CAACV,cAAc,CAAC,CACtBW,IAAI,CAACC,CAAC,IAAI,CAACA,CAAC,CAACC,cAAc,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,QAAQ,CAACT,IAAI,CAAC,CAAC,EACxD,CAACC,OAAO,EAAED,IAAI,CAChB,CAAC;EAED,IAAIE,MAAM,IAAI,IAAI,EAAE;IAClB,IAAMQ,SAAS,GAAGR,MAAM,CAACS,SAAS;IAClC,oBAAOf,IAAA,CAACc,SAAS;MAACX,KAAK,EAAEA;IAAM,CAAE,CAAC;EACpC;EAEA,MAAM,IAAIa,KAAK,yBAAAC,MAAA,CAAyBb,IAAI,MAAG,CAAC;AAClD;AAEA,eAAeH,UAAU","ignoreList":[]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './PluginsContext';\nexport * from './PluginTypes';\nexport * from './PluginUtils';\nexport * from './TablePlugin';\nexport * from './useCustomThemes';\nexport * from './useDashboardPlugins';\nexport * from './usePlugins';\nexport * from './WidgetView';\nexport * from './PersistentStateContext';\nexport * from './usePersistentState';\nexport * from './usePluginsElementMap';\n"],"mappings":""}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './PluginsContext';\nexport * from './PluginTypes';\nexport * from './PluginUtils';\nexport * from './TablePlugin';\nexport * from './useCustomThemes';\nexport * from './useDashboardPlugins';\nexport * from './usePlugins';\nexport * from './WidgetView';\nexport * from './PersistentStateContext';\nexport * from './usePersistentState';\nexport * from './usePluginsElementMap';\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useCustomThemes.js","names":["useMemo","useExternalTheme","getThemeDataFromPlugins","useCustomThemes","pluginModules","isEnabled","isExternalThemeEnabled","isPending","isExternalThemePending","themeData","externalThemeData"],"sources":["../src/useCustomThemes.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useExternalTheme, type ThemeData } from '@deephaven/components';\nimport type { PluginModuleMap } from './PluginTypes';\nimport { getThemeDataFromPlugins } from './PluginUtils';\n\n/**\n * Use custom external or plugin themes.\n * @param pluginModules The plugin modules to get themes from when external\n * themes are disabled.\n */\nexport function useCustomThemes(\n pluginModules?: PluginModuleMap | null\n): ThemeData[] | null {\n const {\n isEnabled: isExternalThemeEnabled,\n isPending: isExternalThemePending,\n themeData: externalThemeData,\n } = useExternalTheme();\n\n return useMemo(() => {\n // Get theme from parent window via `postMessage` apis\n if (isExternalThemeEnabled) {\n if (isExternalThemePending) {\n return null;\n }\n\n return externalThemeData ? [externalThemeData] : [];\n }\n\n // Get themes from plugins\n return pluginModules == null\n ? null\n : getThemeDataFromPlugins(pluginModules);\n }, [\n isExternalThemeEnabled,\n isExternalThemePending,\n externalThemeData,\n pluginModules,\n ]);\n}\n\nexport default useCustomThemes;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,gBAAgB,QAAwB,uBAAuB;AAAC,SAEhEC,uBAAuB;AAEhC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAC7BC,aAAsC,EAClB;EACpB,IAAM;IACJC,SAAS,EAAEC,sBAAsB;IACjCC,SAAS,EAAEC,sBAAsB;IACjCC,SAAS,EAAEC;EACb,CAAC,GAAGT,gBAAgB,CAAC,CAAC;EAEtB,OAAOD,OAAO,CAAC,MAAM;IACnB;IACA,IAAIM,sBAAsB,EAAE;MAC1B,IAAIE,sBAAsB,EAAE;QAC1B,OAAO,IAAI;MACb;MAEA,OAAOE,iBAAiB,GAAG,CAACA,iBAAiB,CAAC,GAAG,EAAE;IACrD;;IAEA;IACA,OAAON,aAAa,IAAI,IAAI,GACxB,IAAI,GACJF,uBAAuB,CAACE,aAAa,CAAC;EAC5C,CAAC,EAAE,CACDE,sBAAsB,EACtBE,sBAAsB,EACtBE,iBAAiB,EACjBN,aAAa,CACd,CAAC;AACJ;AAEA,eAAeD,eAAe"}
1
+ {"version":3,"file":"useCustomThemes.js","names":["useMemo","useExternalTheme","getThemeDataFromPlugins","useCustomThemes","pluginModules","isEnabled","isExternalThemeEnabled","isPending","isExternalThemePending","themeData","externalThemeData"],"sources":["../src/useCustomThemes.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useExternalTheme, type ThemeData } from '@deephaven/components';\nimport type { PluginModuleMap } from './PluginTypes';\nimport { getThemeDataFromPlugins } from './PluginUtils';\n\n/**\n * Use custom external or plugin themes.\n * @param pluginModules The plugin modules to get themes from when external\n * themes are disabled.\n */\nexport function useCustomThemes(\n pluginModules?: PluginModuleMap | null\n): ThemeData[] | null {\n const {\n isEnabled: isExternalThemeEnabled,\n isPending: isExternalThemePending,\n themeData: externalThemeData,\n } = useExternalTheme();\n\n return useMemo(() => {\n // Get theme from parent window via `postMessage` apis\n if (isExternalThemeEnabled) {\n if (isExternalThemePending) {\n return null;\n }\n\n return externalThemeData ? [externalThemeData] : [];\n }\n\n // Get themes from plugins\n return pluginModules == null\n ? null\n : getThemeDataFromPlugins(pluginModules);\n }, [\n isExternalThemeEnabled,\n isExternalThemePending,\n externalThemeData,\n pluginModules,\n ]);\n}\n\nexport default useCustomThemes;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,gBAAgB,QAAwB,uBAAuB;AAAC,SAEhEC,uBAAuB;AAEhC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAC7BC,aAAsC,EAClB;EACpB,IAAM;IACJC,SAAS,EAAEC,sBAAsB;IACjCC,SAAS,EAAEC,sBAAsB;IACjCC,SAAS,EAAEC;EACb,CAAC,GAAGT,gBAAgB,CAAC,CAAC;EAEtB,OAAOD,OAAO,CAAC,MAAM;IACnB;IACA,IAAIM,sBAAsB,EAAE;MAC1B,IAAIE,sBAAsB,EAAE;QAC1B,OAAO,IAAI;MACb;MAEA,OAAOE,iBAAiB,GAAG,CAACA,iBAAiB,CAAC,GAAG,EAAE;IACrD;;IAEA;IACA,OAAON,aAAa,IAAI,IAAI,GACxB,IAAI,GACJF,uBAAuB,CAACE,aAAa,CAAC;EAC5C,CAAC,EAAE,CACDE,sBAAsB,EACtBE,sBAAsB,EACtBE,iBAAiB,EACjBN,aAAa,CACd,CAAC;AACJ;AAEA,eAAeD,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useDashboardPlugins.js","names":["useMemo","isDashboardPlugin","isLegacyDashboardPlugin","usePlugins","jsx","_jsx","getDashboardPlugins","plugins","dbPlugins","entries","filter","_ref","plugin","map","_ref2","pluginName","DashboardPlugin","DPlugin","_DPlugin","component","useDashboardPlugins","dashboardPlugins"],"sources":["../src/useDashboardPlugins.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n isDashboardPlugin,\n isLegacyDashboardPlugin,\n type PluginModuleMap,\n type DashboardPlugin,\n type LegacyDashboardPlugin,\n} from './PluginTypes';\nimport { usePlugins } from './usePlugins';\n\nexport function getDashboardPlugins(plugins: PluginModuleMap): JSX.Element[] {\n const dbPlugins = [...plugins.entries()].filter(\n ([, plugin]) => isDashboardPlugin(plugin) || isLegacyDashboardPlugin(plugin)\n ) as [string, DashboardPlugin | LegacyDashboardPlugin][];\n\n return dbPlugins.map(([pluginName, plugin]) => {\n if (isLegacyDashboardPlugin(plugin)) {\n const { DashboardPlugin: DPlugin } = plugin;\n return <DPlugin key={pluginName} />;\n }\n\n const { component: DPlugin } = plugin;\n return <DPlugin key={pluginName} />;\n });\n}\n\n/**\n * Get all DashboardPlugin elements from the plugins context\n * @returns Array of DashboardPlugin elements\n */\nexport function useDashboardPlugins(): JSX.Element[] {\n const plugins = usePlugins();\n\n const dashboardPlugins = useMemo(\n () => getDashboardPlugins(plugins),\n [plugins]\n );\n\n return dashboardPlugins;\n}\n\nexport default useDashboardPlugins;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAAC,SAE9BC,iBAAiB,EACjBC,uBAAuB;AAAA,SAKhBC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEnB,OAAO,SAASC,mBAAmBA,CAACC,OAAwB,EAAiB;EAC3E,IAAMC,SAAS,GAAG,CAAC,GAAGD,OAAO,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,MAAM,CAC7CC,IAAA;IAAA,IAAC,GAAGC,MAAM,CAAC,GAAAD,IAAA;IAAA,OAAKV,iBAAiB,CAACW,MAAM,CAAC,IAAIV,uBAAuB,CAACU,MAAM,CAAC;EAAA,CAC9E,CAAwD;EAExD,OAAOJ,SAAS,CAACK,GAAG,CAACC,KAAA,IAA0B;IAAA,IAAzB,CAACC,UAAU,EAAEH,MAAM,CAAC,GAAAE,KAAA;IACxC,IAAIZ,uBAAuB,CAACU,MAAM,CAAC,EAAE;MACnC,IAAM;QAAEI,eAAe,EAAEC;MAAQ,CAAC,GAAGL,MAAM;MAC3C,oBAAOP,IAAA,CAACa,QAAO,MAAMH,UAAa,CAAC;IACrC;IAEA,IAAM;MAAEI,SAAS,EAAEF;IAAQ,CAAC,GAAGL,MAAM;IACrC,oBAAOP,IAAA,CAACY,OAAO,MAAMF,UAAa,CAAC;EACrC,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASK,mBAAmBA,CAAA,EAAkB;EACnD,IAAMb,OAAO,GAAGJ,UAAU,CAAC,CAAC;EAE5B,IAAMkB,gBAAgB,GAAGrB,OAAO,CAC9B,MAAMM,mBAAmB,CAACC,OAAO,CAAC,EAClC,CAACA,OAAO,CACV,CAAC;EAED,OAAOc,gBAAgB;AACzB;AAEA,eAAeD,mBAAmB"}
1
+ {"version":3,"file":"useDashboardPlugins.js","names":["useMemo","isDashboardPlugin","isLegacyDashboardPlugin","usePlugins","jsx","_jsx","getDashboardPlugins","plugins","dbPlugins","entries","filter","_ref","plugin","map","_ref2","pluginName","DashboardPlugin","DPlugin","_DPlugin","component","useDashboardPlugins","dashboardPlugins"],"sources":["../src/useDashboardPlugins.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n isDashboardPlugin,\n isLegacyDashboardPlugin,\n type PluginModuleMap,\n type DashboardPlugin,\n type LegacyDashboardPlugin,\n} from './PluginTypes';\nimport { usePlugins } from './usePlugins';\n\nexport function getDashboardPlugins(plugins: PluginModuleMap): JSX.Element[] {\n const dbPlugins = [...plugins.entries()].filter(\n ([, plugin]) => isDashboardPlugin(plugin) || isLegacyDashboardPlugin(plugin)\n ) as [string, DashboardPlugin | LegacyDashboardPlugin][];\n\n return dbPlugins.map(([pluginName, plugin]) => {\n if (isLegacyDashboardPlugin(plugin)) {\n const { DashboardPlugin: DPlugin } = plugin;\n return <DPlugin key={pluginName} />;\n }\n\n const { component: DPlugin } = plugin;\n return <DPlugin key={pluginName} />;\n });\n}\n\n/**\n * Get all DashboardPlugin elements from the plugins context\n * @returns Array of DashboardPlugin elements\n */\nexport function useDashboardPlugins(): JSX.Element[] {\n const plugins = usePlugins();\n\n const dashboardPlugins = useMemo(\n () => getDashboardPlugins(plugins),\n [plugins]\n );\n\n return dashboardPlugins;\n}\n\nexport default useDashboardPlugins;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAAC,SAE9BC,iBAAiB,EACjBC,uBAAuB;AAAA,SAKhBC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEnB,OAAO,SAASC,mBAAmBA,CAACC,OAAwB,EAAiB;EAC3E,IAAMC,SAAS,GAAG,CAAC,GAAGD,OAAO,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,MAAM,CAC7CC,IAAA;IAAA,IAAC,GAAGC,MAAM,CAAC,GAAAD,IAAA;IAAA,OAAKV,iBAAiB,CAACW,MAAM,CAAC,IAAIV,uBAAuB,CAACU,MAAM,CAAC;EAAA,CAC9E,CAAwD;EAExD,OAAOJ,SAAS,CAACK,GAAG,CAACC,KAAA,IAA0B;IAAA,IAAzB,CAACC,UAAU,EAAEH,MAAM,CAAC,GAAAE,KAAA;IACxC,IAAIZ,uBAAuB,CAACU,MAAM,CAAC,EAAE;MACnC,IAAM;QAAEI,eAAe,EAAEC;MAAQ,CAAC,GAAGL,MAAM;MAC3C,oBAAOP,IAAA,CAACa,QAAO,MAAMH,UAAa,CAAC;IACrC;IAEA,IAAM;MAAEI,SAAS,EAAEF;IAAQ,CAAC,GAAGL,MAAM;IACrC,oBAAOP,IAAA,CAACY,OAAO,MAAMF,UAAa,CAAC;EACrC,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASK,mBAAmBA,CAAA,EAAkB;EACnD,IAAMb,OAAO,GAAGJ,UAAU,CAAC,CAAC;EAE5B,IAAMkB,gBAAgB,GAAGrB,OAAO,CAC9B,MAAMM,mBAAmB,CAACC,OAAO,CAAC,EAClC,CAACA,OAAO,CACV,CAAC;EAED,OAAOc,gBAAgB;AACzB;AAEA,eAAeD,mBAAmB","ignoreList":[]}
@@ -78,17 +78,17 @@ export function usePersistentState(initialState, config) {
78
78
  state
79
79
  };
80
80
  useDebugValue(stateWithConfig);
81
- context === null || context === void 0 ? void 0 : context.addState(id, stateWithConfig);
81
+ context === null || context === void 0 || context.addState(id, stateWithConfig);
82
82
 
83
83
  // This won't cause unnecessary renders on initial mount because the state is already tracking,
84
84
  // so calls to scheduleStateUpdate will be no-ops since tracking finishes in an effect at the provider after this effect.
85
85
  // When a component mounts after the parents have already rendered, this will trigger a re-render to track the new state immediately.
86
86
  useEffect(function scheduleUpdateOnMountAndChange() {
87
- context === null || context === void 0 ? void 0 : context.scheduleStateUpdate();
87
+ context === null || context === void 0 || context.scheduleStateUpdate();
88
88
  }, [context, state]);
89
89
  useEffect(function scheduleUpdateOnUnmount() {
90
90
  return () => {
91
- context === null || context === void 0 ? void 0 : context.scheduleStateUpdate();
91
+ context === null || context === void 0 || context.scheduleStateUpdate();
92
92
  };
93
93
  }, [context]);
94
94
  return [state, setState];
@@ -1 +1 @@
1
- {"version":3,"file":"usePersistentState.js","names":["useContext","useDebugValue","useEffect","useState","nanoid","PersistentStateContext","migrateState","state","from","to","migrations","type","Error","concat","migratedState","currentVersion","possibleMigration","filter","m","length","migration","migrate","e","cause","usePersistentState","initialState","config","_context$getInitialSt","id","context","value","persistedData","done","getInitialState","undefined","setState","version","_config$migrations","stateWithConfig","addState","scheduleUpdateOnMountAndChange","scheduleStateUpdate","scheduleUpdateOnUnmount"],"sources":["../src/usePersistentState.ts"],"sourcesContent":["import {\n useContext,\n useDebugValue,\n useEffect,\n useState,\n type Dispatch,\n type SetStateAction,\n} from 'react';\nimport { nanoid } from 'nanoid';\nimport { PersistentStateContext } from './PersistentStateContext';\n\nexport type PersistentStateMigration = {\n from: number;\n migrate: (state: unknown) => unknown;\n};\n\nfunction migrateState(\n state: unknown,\n from: number,\n to: number,\n migrations: PersistentStateMigration[],\n type: string\n): unknown {\n if (from > to) {\n throw new Error(\n `Persisted state ${type} is a newer version than the current version. Persisted version: ${from}. Current version: ${to}`\n );\n }\n\n let migratedState = state;\n let currentVersion = from;\n while (currentVersion < to) {\n // eslint-disable-next-line no-loop-func\n const possibleMigration = migrations.filter(m => m.from === currentVersion);\n if (possibleMigration.length === 0) {\n throw new Error(\n `No migration found for persisted state ${type} from version ${currentVersion}`\n );\n }\n\n if (possibleMigration.length > 1) {\n throw new Error(\n `Multiple migrations found for persisted state ${type} from version ${currentVersion}`\n );\n }\n\n const migration = possibleMigration[0];\n\n try {\n migratedState = migration.migrate(migratedState);\n currentVersion += 1;\n } catch (e) {\n throw new Error(\n `Error migrating persisted state ${type} from version ${migration.from}: ${e}`,\n { cause: e }\n );\n }\n }\n return migratedState;\n}\n\n/**\n * Functions identically to useState except that a PersistentStateProvider can be used to\n * track all calls to this hook and persist the value for future page loads.\n * Primarily used in Deephaven UI so we can persist state of multiple components within a panel.\n *\n * @param initialState The initial state if there is no previously persisted state.\n * @param config.type The type of the state. This identifier is used to validate the state being rehydrated. Should be unique to your component.\n * @param config.version The version of the state. This should be an integer, and is used to determine if the state needs to be migrated. Value should be incremented when data structure changes for this type.\n * @param config.migrations An array of migrations to apply to the state if the version of the persisted state is below the current version. Each migration increments the version by 1.\n * @param config.migrations.from The starting version of the migration. The migration will increment the version by 1.\n * @param config.migrations.migrate The function to call to migrate the state.\n * @returns [state, setState] tuple just like useState.\n */\nexport function usePersistentState<S>(\n initialState: S | (() => S),\n config: {\n type: string;\n version: number;\n migrations?: PersistentStateMigration[];\n }\n): [state: S, setState: Dispatch<SetStateAction<S>>] {\n // We use this id to track if the component re-renders due to calling setState in its render function.\n // Otherwise, usePersistentState might be called twice by the same component in the same render cycle before flushing in the provider.\n const [id] = useState(() => nanoid());\n const context = useContext(PersistentStateContext);\n const { value: persistedData, done } = context?.getInitialState<S>(id) ?? {\n value: undefined,\n done: true,\n };\n\n // If not done, then we can use the persisted state\n // Otherwise, we have exhausted the persisted state\n // By checking done, we are able to explicitly save undefined as a state value\n const [state, setState] = useState<S>(() => {\n if (persistedData == null || done) {\n return typeof initialState === 'function'\n ? (initialState as () => S)()\n : initialState;\n }\n\n if (persistedData.type !== config.type) {\n throw new Error(\n `usePersistentState type mismatch. Expected ${config.type} but got ${persistedData.type}.`\n );\n }\n\n if (persistedData.version !== config.version) {\n return migrateState(\n persistedData.state,\n persistedData.version,\n config.version,\n config.migrations ?? [],\n config.type\n ) as S;\n }\n\n return persistedData.state;\n });\n\n const stateWithConfig = { type: config.type, version: config.version, state };\n\n useDebugValue(stateWithConfig);\n\n context?.addState(id, stateWithConfig);\n\n // This won't cause unnecessary renders on initial mount because the state is already tracking,\n // so calls to scheduleStateUpdate will be no-ops since tracking finishes in an effect at the provider after this effect.\n // When a component mounts after the parents have already rendered, this will trigger a re-render to track the new state immediately.\n useEffect(\n function scheduleUpdateOnMountAndChange() {\n context?.scheduleStateUpdate();\n },\n [context, state]\n );\n\n useEffect(\n function scheduleUpdateOnUnmount() {\n return () => {\n context?.scheduleStateUpdate();\n };\n },\n [context]\n );\n\n return [state, setState];\n}\n\nexport default usePersistentState;\n"],"mappings":"AAAA,SACEA,UAAU,EACVC,a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X,MAAM,CAACf,IACT,CAAC;IACH;IAEA,OAAOoB,aAAa,CAACxB,KAAK;EAC5B,CAAC,CAAC;EAEF,IAAM+B,eAAe,GAAG;IAAE3B,IAAI,EAAEe,MAAM,CAACf,IAAI;IAAEyB,OAAO,EAAEV,MAAM,CAACU,OAAO;IAAE7B;EAAM,CAAC;EAE7EN,aAAa,CAACqC,eAAe,CAAC;EAE9BT,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEU,QAAQ,CAACX,EAAE,EAAEU,eAAe,CAAC;;EAEtC;EACA;EACA;EACApC,SAAS,CACP,SAASsC,8BAA8BA,CAAA,EAAG;IACxCX,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEY,mBAAmB,CAAC,CAAC;EAChC,CAAC,EACD,CAACZ,OAAO,EAAEtB,KAAK,CACjB,CAAC;EAEDL,SAAS,CACP,SAASwC,uBAAuBA,CAAA,EAAG;IACjC,OAAO,MAAM;MACXb,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEY,mBAAmB,CAAC,CAAC;IAChC,CAAC;EACH,CAAC,EACD,CAACZ,OAAO,CACV,CAAC;EAED,OAAO,CAACtB,KAAK,EAAE4B,QAAQ,CAAC;AAC1B;AAEA,eAAeX,kBAAkB"}
1
+ {"version":3,"file":"usePersistentState.js","names":["useContext","useDebugValue","useEffect","useState","nanoid","PersistentStateContext","migrateState","state","from","to","migrations","type","Error","concat","migratedState","currentVersion","possibleMigration","filter","m","length","migration","migrate","e","cause","usePersistentState","initialState","config","_context$getInitialSt","id","context","value","persistedData","done","getInitialState","undefined","setState","version","_config$migrations","stateWithConfig","addState","scheduleUpdateOnMountAndChange","scheduleStateUpdate","scheduleUpdateOnUnmount"],"sources":["../src/usePersistentState.ts"],"sourcesContent":["import {\n useContext,\n useDebugValue,\n useEffect,\n useState,\n type Dispatch,\n type SetStateAction,\n} from 'react';\nimport { nanoid } from 'nanoid';\nimport { PersistentStateContext } from './PersistentStateContext';\n\nexport type PersistentStateMigration = {\n from: number;\n migrate: (state: unknown) => unknown;\n};\n\nfunction migrateState(\n state: unknown,\n from: number,\n to: number,\n migrations: PersistentStateMigration[],\n type: string\n): unknown {\n if (from > to) {\n throw new Error(\n `Persisted state ${type} is a newer version than the current version. Persisted version: ${from}. Current version: ${to}`\n );\n }\n\n let migratedState = state;\n let currentVersion = from;\n while (currentVersion < to) {\n // eslint-disable-next-line no-loop-func\n const possibleMigration = migrations.filter(m => m.from === currentVersion);\n if (possibleMigration.length === 0) {\n throw new Error(\n `No migration found for persisted state ${type} from version ${currentVersion}`\n );\n }\n\n if (possibleMigration.length > 1) {\n throw new Error(\n `Multiple migrations found for persisted state ${type} from version ${currentVersion}`\n );\n }\n\n const migration = possibleMigration[0];\n\n try {\n migratedState = migration.migrate(migratedState);\n currentVersion += 1;\n } catch (e) {\n throw new Error(\n `Error migrating persisted state ${type} from version ${migration.from}: ${e}`,\n { cause: e }\n );\n }\n }\n return migratedState;\n}\n\n/**\n * Functions identically to useState except that a PersistentStateProvider can be used to\n * track all calls to this hook and persist the value for future page loads.\n * Primarily used in Deephaven UI so we can persist state of multiple components within a panel.\n *\n * @param initialState The initial state if there is no previously persisted state.\n * @param config.type The type of the state. This identifier is used to validate the state being rehydrated. Should be unique to your component.\n * @param config.version The version of the state. This should be an integer, and is used to determine if the state needs to be migrated. Value should be incremented when data structure changes for this type.\n * @param config.migrations An array of migrations to apply to the state if the version of the persisted state is below the current version. Each migration increments the version by 1.\n * @param config.migrations.from The starting version of the migration. The migration will increment the version by 1.\n * @param config.migrations.migrate The function to call to migrate the state.\n * @returns [state, setState] tuple just like useState.\n */\nexport function usePersistentState<S>(\n initialState: S | (() => S),\n config: {\n type: string;\n version: number;\n migrations?: PersistentStateMigration[];\n }\n): [state: S, setState: Dispatch<SetStateAction<S>>] {\n // We use this id to track if the component re-renders due to calling setState in its render function.\n // Otherwise, usePersistentState might be called twice by the same component in the same render cycle before flushing in the provider.\n const [id] = useState(() => nanoid());\n const context = useContext(PersistentStateContext);\n const { value: persistedData, done } = context?.getInitialState<S>(id) ?? {\n value: undefined,\n done: true,\n };\n\n // If not done, then we can use the persisted state\n // Otherwise, we have exhausted the persisted state\n // By checking done, we are able to explicitly save undefined as a state value\n const [state, setState] = useState<S>(() => {\n if (persistedData == null || done) {\n return typeof initialState === 'function'\n ? (initialState as () => S)()\n : initialState;\n }\n\n if (persistedData.type !== config.type) {\n throw new Error(\n `usePersistentState type mismatch. Expected ${config.type} but got ${persistedData.type}.`\n );\n }\n\n if (persistedData.version !== config.version) {\n return migrateState(\n persistedData.state,\n persistedData.version,\n config.version,\n config.migrations ?? [],\n config.type\n ) as S;\n }\n\n return persistedData.state;\n });\n\n const stateWithConfig = { type: config.type, version: config.version, state };\n\n useDebugValue(stateWithConfig);\n\n context?.addState(id, stateWithConfig);\n\n // This won't cause unnecessary renders on initial mount because the state is already tracking,\n // so calls to scheduleStateUpdate will be no-ops since tracking finishes in an effect at the provider after this effect.\n // When a component mounts after the parents have already rendered, this will trigger a re-render to track the new state immediately.\n useEffect(\n function scheduleUpdateOnMountAndChange() {\n context?.scheduleStateUpdate();\n },\n [context, state]\n );\n\n useEffect(\n function scheduleUpdateOnUnmount() {\n return () => {\n context?.scheduleStateUpdate();\n };\n },\n [context]\n );\n\n return [state, setState];\n}\n\nexport default usePersistentState;\n"],"mappings":"AAAA,SACEA,UAAU,EACVC,aAAa,EACbC,SAAS,EACTC,QAAQ,QAGH,OAAO;AACd,SAASC,MAAM,QAAQ,QAAQ;AAAC,SACvBC,sBAAsB;AAO/B,SAASC,YAAYA,CACnBC,KAAc,EACdC,IAAY,EACZC,EAAU,EACVC,UAAsC,EACtCC,IAAY,EACH;EACT,IAAIH,IAAI,GAAGC,EAAE,EAAE;IACb,MAAM,IAAIG,KAAK,oBAAAC,MAAA,CACMF,IAAI,uEAAAE,MAAA,CAAoEL,IAAI,yBAAAK,MAAA,CAAsBJ,EAAE,CACzH,CAAC;EACH;EAEA,IAAIK,aAAa,GAAGP,KAAK;EAC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AAA,EAAG;IACxCX,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEY,mBAAmB,CAAC,CAAC;EAChC,CAAC,EACD,CAACZ,OAAO,EAAEtB,KAAK,CACjB,CAAC;EAEDL,SAAS,CACP,SAASwC,uBAAuBA,CAAA,EAAG;IACjC,OAAO,MAAM;MACXb,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEY,mBAAmB,CAAC,CAAC;IAChC,CAAC;EACH,CAAC,EACD,CAACZ,OAAO,CACV,CAAC;EAED,OAAO,CAACtB,KAAK,EAAE4B,QAAQ,CAAC;AAC1B;AAEA,eAAeX,kBAAkB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"usePlugins.js","names":["useContextOrThrow","PluginsContext","usePlugins"],"sources":["../src/usePlugins.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport { PluginsContext } from './PluginsContext';\nimport { type PluginModuleMap } from './PluginTypes';\n\nexport function usePlugins(): PluginModuleMap {\n return useContextOrThrow(\n PluginsContext,\n 'No Plugins available in usePlugins. This can happen when plugins have not finished loading or if code is not wrapped in PluginsContext.Provider.'\n );\n}\n\nexport default usePlugins;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,cAAc;AAGvB,OAAO,SAASC,UAAUA,CAAA,EAAoB;EAC5C,OAAOF,iBAAiB,CACtBC,cAAc,EACd,kJACF,CAAC;AACH;AAEA,eAAeC,UAAU"}
1
+ {"version":3,"file":"usePlugins.js","names":["useContextOrThrow","PluginsContext","usePlugins"],"sources":["../src/usePlugins.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport { PluginsContext } from './PluginsContext';\nimport { type PluginModuleMap } from './PluginTypes';\n\nexport function usePlugins(): PluginModuleMap {\n return useContextOrThrow(\n PluginsContext,\n 'No Plugins available in usePlugins. This can happen when plugins have not finished loading or if code is not wrapped in PluginsContext.Provider.'\n );\n}\n\nexport default usePlugins;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,cAAc;AAGvB,OAAO,SAASC,UAAUA,CAAA,EAAoB;EAC5C,OAAOF,iBAAiB,CACtBC,cAAc,EACd,kJACF,CAAC;AACH;AAEA,eAAeC,UAAU","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"usePluginsElementMap.js","names":["useMemo","usePlugins","getPluginsElementMap","usePluginsElementMap","plugins","elementPlugins"],"sources":["../src/usePluginsElementMap.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { usePlugins } from './usePlugins';\nimport { getPluginsElementMap } from './PluginUtils';\nimport type { ElementMap } from './PluginTypes';\n\n/**\n * Get all ElementPlugin elements from the plugins context\n * @returns ElementPlugin mapping as a Map of plugin name to component type\n */\nexport function usePluginsElementMap(): ElementMap {\n // Get all plugins from the context\n const plugins = usePlugins();\n\n const elementPlugins = useMemo(\n () => getPluginsElementMap(plugins),\n [plugins]\n );\n\n return elementPlugins;\n}\n\nexport default usePluginsElementMap;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAAC,SACvBC,UAAU;AAAA,SACVC,oBAAoB;AAG7B;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAAA,EAAe;EACjD;EACA,IAAMC,OAAO,GAAGH,UAAU,CAAC,CAAC;EAE5B,IAAMI,cAAc,GAAGL,OAAO,CAC5B,MAAME,oBAAoB,CAACE,OAAO,CAAC,EACnC,CAACA,OAAO,CACV,CAAC;EAED,OAAOC,cAAc;AACvB;AAEA,eAAeF,oBAAoB"}
1
+ {"version":3,"file":"usePluginsElementMap.js","names":["useMemo","usePlugins","getPluginsElementMap","usePluginsElementMap","plugins","elementPlugins"],"sources":["../src/usePluginsElementMap.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { usePlugins } from './usePlugins';\nimport { getPluginsElementMap } from './PluginUtils';\nimport type { ElementMap } from './PluginTypes';\n\n/**\n * Get all ElementPlugin elements from the plugins context\n * @returns ElementPlugin mapping as a Map of plugin name to component type\n */\nexport function usePluginsElementMap(): ElementMap {\n // Get all plugins from the context\n const plugins = usePlugins();\n\n const elementPlugins = useMemo(\n () => getPluginsElementMap(plugins),\n [plugins]\n );\n\n return elementPlugins;\n}\n\nexport default usePluginsElementMap;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAAC,SACvBC,UAAU;AAAA,SACVC,oBAAoB;AAG7B;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAAA,EAAe;EACjD;EACA,IAAMC,OAAO,GAAGH,UAAU,CAAC,CAAC;EAE5B,IAAMI,cAAc,GAAGL,OAAO,CAC5B,MAAME,oBAAoB,CAACE,OAAO,CAAC,EACnC,CAACA,OAAO,CACV,CAAC;EAED,OAAOC,cAAc;AACvB;AAEA,eAAeF,oBAAoB","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/plugin",
3
- "version": "1.7.2-beta.1+a19bc114",
3
+ "version": "1.7.2-react-18-alpha.3+b369a51e",
4
4
  "description": "Deephaven JS Plugin Core",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -22,14 +22,14 @@
22
22
  "build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward"
23
23
  },
24
24
  "dependencies": {
25
- "@deephaven/components": "^1.7.2-beta.1+a19bc114",
26
- "@deephaven/golden-layout": "^1.7.2-beta.1+a19bc114",
27
- "@deephaven/grid": "^1.7.2-beta.1+a19bc114",
28
- "@deephaven/icons": "^1.7.2-beta.1+a19bc114",
29
- "@deephaven/iris-grid": "^1.7.2-beta.1+a19bc114",
25
+ "@deephaven/components": "^1.7.2-react-18-alpha.3+b369a51e",
26
+ "@deephaven/golden-layout": "^1.7.2-react-18-alpha.3+b369a51e",
27
+ "@deephaven/grid": "^1.7.2-react-18-alpha.3+b369a51e",
28
+ "@deephaven/icons": "^1.7.2-react-18-alpha.3+b369a51e",
29
+ "@deephaven/iris-grid": "^1.7.2-react-18-alpha.3+b369a51e",
30
30
  "@deephaven/jsapi-types": "^1.0.0-dev0.39.4",
31
- "@deephaven/log": "^1.7.2-beta.1+a19bc114",
32
- "@deephaven/react-hooks": "^1.7.2-beta.1+a19bc114",
31
+ "@deephaven/log": "^1.7.2-react-18-alpha.3+b369a51e",
32
+ "@deephaven/react-hooks": "^1.7.2-react-18-alpha.3+b369a51e",
33
33
  "@fortawesome/fontawesome-common-types": "^6.1.1",
34
34
  "@fortawesome/react-fontawesome": "^0.2.0",
35
35
  "nanoid": "^5.0.7"
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "a19bc11446da4328bc5c216064ec810b24ee0312"
46
+ "gitHead": "b369a51ee94d212641a14c6ce1f19fcc85168339"
47
47
  }