import React, { PureComponent, type ReactElement, type RefObject } from 'react'; import { type CommandHistoryStorage, Console } from '@deephaven/console'; import { type DashboardPanelProps, LayoutManagerContext } from '@deephaven/dashboard'; import type { dh } from '@deephaven/jsapi-types'; import { type SessionWrapper } from '@deephaven/jsapi-utils'; import { type PluginModuleMap } from '@deephaven/plugin'; import type { JSZipObject } from 'jszip'; import './ConsolePanel.scss'; interface ConsoleSettings { isClosePanelsOnDisconnectEnabled?: boolean; } interface PanelState { consoleSettings: ConsoleSettings; itemIds: [string, string][]; } type ItemIds = Map; interface ConsolePanelProps extends DashboardPanelProps { commandHistoryStorage: CommandHistoryStorage; panelState?: PanelState; sessionWrapper?: SessionWrapper; timeZone: string; unzip?: (file: File) => Promise; plugins: PluginModuleMap; } interface ConsolePanelState { consoleSettings: ConsoleSettings; itemIds: ItemIds; objectMap: Map; panelState: PanelState; error: unknown; } export declare class ConsolePanel extends PureComponent { static COMPONENT: string; static TITLE: string; static contextType: React.Context; context: React.ContextType; constructor(props: ConsolePanelProps); componentDidMount(): void; componentDidUpdate(prevProps: ConsolePanelProps, prevState: ConsolePanelState): void; componentWillUnmount(): void; consoleRef: RefObject; objectSubscriptionCleanup?: () => void; subscribeToFieldUpdates(): void; setItemId(name: string, id: string): void; getItemId(name: string, createIfNecessary?: boolean): string | undefined; /** * Removes the item ID mapping from state by its ID value. * @param id The item ID to delete from the itemIds map. */ private deleteItemId; handleTabFocus(): void; handlePanelMount(panel: { props: { id: string; metadata: { sourcePanelId: string; }; }; }): void; /** * Handles a panel closed event. Removes the panel's item ID mapping unless * the panel was replaced (i.e. a panel with the same ID still exists in the layout), * in which case the mapping is retained for the replacement panel. * @param panelId The ID of the panel that was closed. */ handlePanelClosed(panelId: string): void; handleFocusCommandHistory(): void; handleResize(): void; handleShow(): void; handleOpenObject(object: dh.ide.VariableDescriptor & { title?: string; }, forceOpen?: boolean): void; handleCloseObject(object: dh.ide.VariableDefinition): void; handleSettingsChange(consoleSettings: Record): void; /** * @param widget The widget to open */ openWidget(widget: dh.ide.VariableDescriptor & { title?: string; }): void; /** * Open the given widget in a new panel. This is used for all widget types except "widget dashboard" types, which are widgets that should be opened in a new dashboard instead of a panel. * @param widget The widget to open */ private openPanelWidget; addCommand(command: string, focus?: boolean, execute?: boolean): void; /** * Close the disconnected panels from this session * @param force True to force the panels closed regardless of the current setting */ closeDisconnectedPanels(force?: boolean): void; savePanelState: import("lodash").DebouncedFunc<() => void>; updateDimensions(): void; supportsType(type: string): boolean; iconForType(type: string): JSX.Element; render(): ReactElement | null; } declare const ConnectedConsolePanel: import("react-redux").ConnectedComponent & ConsolePanelProps, "timeZone" | "commandHistoryStorage" | "sessionWrapper" | "plugins"> & { localDashboardId: string; }>; export default ConnectedConsolePanel; //# sourceMappingURL=ConsolePanel.d.ts.map