diff --git a/package-lock.json b/package-lock.json index b5bc1b94e9..7d142c3b3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "@deephaven/jsapi-components": "file:packages/jsapi-components", "@deephaven/jsapi-nodejs": "file:packages/jsapi-nodejs", "@deephaven/jsapi-shim": "file:packages/jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:packages/jsapi-utils", "@deephaven/log": "file:packages/log", "@deephaven/mocks": "file:packages/mocks", @@ -2115,9 +2115,9 @@ "link": true }, "node_modules/@deephaven/jsapi-types": { - "version": "1.0.0-dev0.34.0", - "resolved": "https://registry.npmjs.org/@deephaven/jsapi-types/-/jsapi-types-1.0.0-dev0.34.0.tgz", - "integrity": "sha512-UiIbmCaMx5mPOGCWdgOCfZtccMhh55jv3qzeN3qBp3YUi46uGfWY5kfCU3hWRtaQvUgO7n0XhBKTd4K/pxv9ng==" + "version": "1.0.0-dev0.37.2", + "resolved": "https://registry.npmjs.org/@deephaven/jsapi-types/-/jsapi-types-1.0.0-dev0.37.2.tgz", + "integrity": "sha512-lvY4dJlsm/fiM+U5Y48zrTcqOS5nhJmoCCQNsjs2F2XGUbQTe0nq9Q2zyUywot9WmdcOn5PXMuirluxCCH7aHQ==" }, "node_modules/@deephaven/jsapi-utils": { "resolved": "packages/jsapi-utils", @@ -29124,7 +29124,7 @@ "@deephaven/iris-grid": "file:../iris-grid", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", @@ -29209,7 +29209,7 @@ "@deephaven/components": "file:../components", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/redux": "file:../redux", @@ -29251,7 +29251,7 @@ "dependencies": { "@deephaven/components": "file:../components", "@deephaven/icons": "file:../icons", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", @@ -29324,7 +29324,7 @@ "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", @@ -29456,7 +29456,7 @@ "@deephaven/components": "file:../components", "@deephaven/icons": "file:../icons", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", @@ -29537,7 +29537,7 @@ "@deephaven/iris-grid": "file:../iris-grid", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", @@ -29973,7 +29973,7 @@ "@deephaven/dashboard-core-plugins": "file:../dashboard-core-plugins", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", @@ -30117,7 +30117,7 @@ "@deephaven/grid": "file:../grid", "@deephaven/icons": "file:../icons", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", @@ -30160,7 +30160,7 @@ "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/utils": "file:../utils" @@ -30183,7 +30183,7 @@ "dependencies": { "@deephaven/components": "file:../components", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", @@ -30255,7 +30255,7 @@ "version": "0.102.0", "license": "Apache-2.0", "dependencies": { - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "prop-types": "^15.7.2" }, "engines": { @@ -30277,7 +30277,7 @@ "license": "Apache-2.0", "dependencies": { "@deephaven/filters": "file:../filters", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/log": "file:../log", "@deephaven/utils": "file:../utils", "lodash.clamp": "^4.0.3", @@ -30321,7 +30321,7 @@ "@deephaven/grid": "file:../grid", "@deephaven/icons": "file:../icons", "@deephaven/iris-grid": "file:../iris-grid", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", "@fortawesome/fontawesome-common-types": "^6.1.1", @@ -30418,7 +30418,7 @@ "version": "0.102.0", "license": "Apache-2.0", "dependencies": { - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", @@ -31762,7 +31762,7 @@ "@deephaven/iris-grid": "file:../iris-grid", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", @@ -31791,7 +31791,7 @@ "@deephaven/components": "file:../components", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/redux": "file:../redux", @@ -31821,7 +31821,7 @@ "@deephaven/components": "file:../components", "@deephaven/icons": "file:../icons", "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", @@ -31872,7 +31872,7 @@ "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", @@ -31970,7 +31970,7 @@ "@deephaven/icons": "file:../icons", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", @@ -32040,7 +32040,7 @@ "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", @@ -32354,7 +32354,7 @@ "@deephaven/eslint-config": "file:../eslint-config", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", @@ -32444,7 +32444,7 @@ "@deephaven/icons": "file:../icons", "@deephaven/jsapi-components": "file:../jsapi-components", "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", @@ -32475,7 +32475,7 @@ "version": "file:packages/jsapi-bootstrap", "requires": { "@deephaven/components": "file:../components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/test-utils": "file:../test-utils", @@ -32489,7 +32489,7 @@ "@deephaven/components": "file:../components", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", @@ -32531,21 +32531,21 @@ "@deephaven/jsapi-shim": { "version": "file:packages/jsapi-shim", "requires": { - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "prop-types": "^15.7.2" } }, "@deephaven/jsapi-types": { - "version": "1.0.0-dev0.34.0", - "resolved": "https://registry.npmjs.org/@deephaven/jsapi-types/-/jsapi-types-1.0.0-dev0.34.0.tgz", - "integrity": "sha512-UiIbmCaMx5mPOGCWdgOCfZtccMhh55jv3qzeN3qBp3YUi46uGfWY5kfCU3hWRtaQvUgO7n0XhBKTd4K/pxv9ng==" + "version": "1.0.0-dev0.37.2", + "resolved": "https://registry.npmjs.org/@deephaven/jsapi-types/-/jsapi-types-1.0.0-dev0.37.2.tgz", + "integrity": "sha512-lvY4dJlsm/fiM+U5Y48zrTcqOS5nhJmoCCQNsjs2F2XGUbQTe0nq9Q2zyUywot9WmdcOn5PXMuirluxCCH7aHQ==" }, "@deephaven/jsapi-utils": { "version": "file:packages/jsapi-utils", "requires": { "@deephaven/filters": "file:../filters", "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/log": "file:../log", "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", @@ -32572,7 +32572,7 @@ "@deephaven/grid": "file:../grid", "@deephaven/icons": "file:../icons", "@deephaven/iris-grid": "file:../iris-grid", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", "@fortawesome/fontawesome-common-types": "^6.1.1", @@ -32611,7 +32611,7 @@ "@deephaven/redux": { "version": "file:packages/redux", "requires": { - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", diff --git a/package.json b/package.json index 2b90a0a01e..ba24e3bf6b 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,7 @@ "@deephaven/jsapi-components": "file:packages/jsapi-components", "@deephaven/jsapi-nodejs": "file:packages/jsapi-nodejs", "@deephaven/jsapi-shim": "file:packages/jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:packages/jsapi-utils", "@deephaven/log": "file:packages/log", "@deephaven/mocks": "file:packages/mocks", diff --git a/packages/app-utils/package.json b/packages/app-utils/package.json index 4ca26cb062..1ffa959584 100644 --- a/packages/app-utils/package.json +++ b/packages/app-utils/package.json @@ -42,7 +42,7 @@ "@deephaven/iris-grid": "file:../iris-grid", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", diff --git a/packages/app-utils/src/components/ConnectionBootstrap.tsx b/packages/app-utils/src/components/ConnectionBootstrap.tsx index c0e8a55b94..7a9c1d9526 100644 --- a/packages/app-utils/src/components/ConnectionBootstrap.tsx +++ b/packages/app-utils/src/components/ConnectionBootstrap.tsx @@ -85,7 +85,7 @@ export function ConnectionBootstrap({ if (connection == null || isShutdown) return; // handles the disconnect event - function handleDisconnect(event: CustomEvent): void { + function handleDisconnect(event: dh.Event): void { const { detail } = event; log.info('Disconnect', `${JSON.stringify(detail)}`); setConnectionState('reconnecting'); @@ -105,7 +105,7 @@ export function ConnectionBootstrap({ if (connection == null || isShutdown) return; // handles the reconnect event - function handleReconnect(event: CustomEvent): void { + function handleReconnect(event: dh.Event): void { const { detail } = event; log.info('Reconnect', `${JSON.stringify(detail)}`); setConnectionState('connected'); @@ -125,7 +125,7 @@ export function ConnectionBootstrap({ if (connection == null) return; // handles the shutdown event - function handleShutdown(event: CustomEvent): void { + function handleShutdown(event: dh.Event): void { const { detail } = event; log.info('Shutdown', `${JSON.stringify(detail)}`); setError(`Server shutdown: ${detail ?? 'Unknown reason'}`); @@ -146,7 +146,7 @@ export function ConnectionBootstrap({ if (connection == null || isShutdown) return; // handles the auth failed event - function handleAuthFailed(event: CustomEvent): void { + function handleAuthFailed(event: dh.Event): void { const { detail } = event; log.warn( 'Reconnect authentication failed', diff --git a/packages/auth-plugins/package.json b/packages/auth-plugins/package.json index 81b37548f7..a2655f0964 100644 --- a/packages/auth-plugins/package.json +++ b/packages/auth-plugins/package.json @@ -36,7 +36,7 @@ "@deephaven/components": "file:../components", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/redux": "file:../redux", diff --git a/packages/chart/package.json b/packages/chart/package.json index 4e805a00c4..c9e52a13cf 100644 --- a/packages/chart/package.json +++ b/packages/chart/package.json @@ -29,7 +29,7 @@ "dependencies": { "@deephaven/components": "file:../components", "@deephaven/icons": "file:../icons", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", diff --git a/packages/chart/src/Chart.tsx b/packages/chart/src/Chart.tsx index d35eef6a80..654481cf28 100644 --- a/packages/chart/src/Chart.tsx +++ b/packages/chart/src/Chart.tsx @@ -19,6 +19,7 @@ import { type DateTimeFormatSettings, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; +import type { dh as DhType } from '@deephaven/jsapi-types'; import { type Config as PlotlyConfig, type Layout, @@ -440,7 +441,7 @@ class Chart extends Component { this.setState({ downsamplingError: null }); } - handleModelEvent(event: CustomEvent): void { + handleModelEvent(event: DhType.Event): void { const { type, detail } = event; log.debug2('Received data update', type, detail); @@ -453,7 +454,7 @@ class Chart extends Component { layout.datarevision += 1; } return { - data: detail, + data: detail as Partial[] | null, layout, revision: revision + 1, }; @@ -497,7 +498,8 @@ class Chart extends Component { } case ChartModel.EVENT_DOWNSAMPLENEEDED: case ChartModel.EVENT_DOWNSAMPLEFAILED: { - const downsamplingError = detail.message ?? detail; + const downsamplingError = + (detail as { message?: string }).message ?? detail; this.setState({ isDownsampleFinished: false, isDownsampleInProgress: false, @@ -506,7 +508,11 @@ class Chart extends Component { }); const { onError } = this.props; - onError(new DownsamplingError(downsamplingError)); + onError( + new DownsamplingError( + downsamplingError == null ? undefined : `${downsamplingError}` + ) + ); break; } case ChartModel.EVENT_ERROR: { diff --git a/packages/chart/src/ChartModel.ts b/packages/chart/src/ChartModel.ts index efaf1f28b4..edee1619d8 100644 --- a/packages/chart/src/ChartModel.ts +++ b/packages/chart/src/ChartModel.ts @@ -6,7 +6,16 @@ import { type Formatter } from '@deephaven/jsapi-utils'; import type { Layout, Data } from 'plotly.js'; import { type FilterColumnMap, type FilterMap } from './ChartUtils'; -export type ChartEvent = CustomEvent; +export type ChartEvent = DhType.Event; + +export interface FigureUpdateEventData { + series: DhType.plot.Series[]; + getArray: ( + series: DhType.plot.Series, + sourceType: number, + mappingFunc: (value: unknown) => unknown + ) => unknown[]; +} export type RenderOptions = { /** Allow WebGL as an option. Defaults to `true`, explicitly set to `false` to disable. */ diff --git a/packages/chart/src/FigureChartModel.ts b/packages/chart/src/FigureChartModel.ts index 95c4531f2d..018cd17a89 100644 --- a/packages/chart/src/FigureChartModel.ts +++ b/packages/chart/src/FigureChartModel.ts @@ -17,7 +17,11 @@ import type { DateTimeColumnFormatter, Formatter, } from '@deephaven/jsapi-utils'; -import ChartModel, { type ChartEvent, type RenderOptions } from './ChartModel'; +import ChartModel, { + type ChartEvent, + type FigureUpdateEventData, + type RenderOptions, +} from './ChartModel'; import ChartUtils, { type AxisTypeMap, type ChartModelSettings, @@ -472,7 +476,7 @@ class FigureChartModel extends ChartModel { this.fireDownsampleNeeded(event.detail); } - handleFigureUpdated(event: ChartEvent): void { + handleFigureUpdated(event: DhType.Event): void { const { detail: figureUpdateEvent } = event; const { series: seriesArray } = figureUpdateEvent; @@ -549,7 +553,7 @@ class FigureChartModel extends ChartModel { this.resubscribe(); } - handleFigureDisconnected(event: CustomEvent): void { + handleFigureDisconnected(event: DhType.Event): void { log.debug('Figure disconnected', event); this.isConnected = false; @@ -561,7 +565,7 @@ class FigureChartModel extends ChartModel { this.fireDisconnect(); } - handleFigureReconnected(event: CustomEvent): void { + handleFigureReconnected(event: DhType.Event): void { log.debug('Figure reconnected', event); this.isConnected = true; diff --git a/packages/code-studio/package.json b/packages/code-studio/package.json index db7bd93f23..ef1d02f16c 100644 --- a/packages/code-studio/package.json +++ b/packages/code-studio/package.json @@ -28,7 +28,7 @@ "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", diff --git a/packages/console/package.json b/packages/console/package.json index a336839779..36e6f98b82 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -28,7 +28,7 @@ "@deephaven/components": "file:../components", "@deephaven/icons": "file:../icons", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", diff --git a/packages/console/src/Console.tsx b/packages/console/src/Console.tsx index ffc6936020..32c7dc7dca 100644 --- a/packages/console/src/Console.tsx +++ b/packages/console/src/Console.tsx @@ -339,10 +339,20 @@ export class Console extends PureComponent { this.consoleInput.current?.clear(); } - handleCommandStarted(event: CustomEvent): void { + handleCommandStarted( + event: DhType.Event<{ + code: string; + result: { + message: string; + error?: string; + changes: DhType.ide.VariableChanges; + cancel: () => unknown; + }; + }> + ): void { const { code, result } = event.detail; const wrappedResult = this.pending.add(result); - const historyItem = { + const historyItem: ConsoleHistoryActionItem = { command: code, disabledObjects: [], startTime: Date.now(), diff --git a/packages/console/src/ConsoleStatusBar.tsx b/packages/console/src/ConsoleStatusBar.tsx index d80942328d..302bbc7312 100644 --- a/packages/console/src/ConsoleStatusBar.tsx +++ b/packages/console/src/ConsoleStatusBar.tsx @@ -35,18 +35,21 @@ function ConsoleStatusBar({ }: ConsoleStatusBarProps): ReactElement { const [pendingCommandCount, setPendingCommandCount] = useState(0); - const handleCommandStarted = useCallback(async (event: CustomEvent) => { - setPendingCommandCount(count => count + 1); + const handleCommandStarted = useCallback( + async (event: DhType.Event<{ result: Promise }>) => { + setPendingCommandCount(count => count + 1); - try { - const { result } = event.detail; - await result; - } catch (error) { - // No-op, fall through - } + try { + const { result } = event.detail; + await result; + } catch (error) { + // No-op, fall through + } - setPendingCommandCount(count => count - 1); - }, []); + setPendingCommandCount(count => count - 1); + }, + [] + ); useEffect( function startListening() { diff --git a/packages/dashboard-core-plugins/package.json b/packages/dashboard-core-plugins/package.json index 267b391497..485352eed5 100644 --- a/packages/dashboard-core-plugins/package.json +++ b/packages/dashboard-core-plugins/package.json @@ -34,7 +34,7 @@ "@deephaven/iris-grid": "file:../iris-grid", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", diff --git a/packages/embed-widget/package.json b/packages/embed-widget/package.json index 3b4251c97d..96a1cc47d2 100644 --- a/packages/embed-widget/package.json +++ b/packages/embed-widget/package.json @@ -22,7 +22,7 @@ "@deephaven/dashboard-core-plugins": "file:../dashboard-core-plugins", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin", diff --git a/packages/iris-grid/package.json b/packages/iris-grid/package.json index fb9332b332..accdb52533 100644 --- a/packages/iris-grid/package.json +++ b/packages/iris-grid/package.json @@ -37,7 +37,7 @@ "@deephaven/grid": "file:../grid", "@deephaven/icons": "file:../icons", "@deephaven/jsapi-components": "file:../jsapi-components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", diff --git a/packages/iris-grid/src/AdvancedFilterCreatorSelectValueList.tsx b/packages/iris-grid/src/AdvancedFilterCreatorSelectValueList.tsx index 9d19078b6a..36c7c32d5b 100644 --- a/packages/iris-grid/src/AdvancedFilterCreatorSelectValueList.tsx +++ b/packages/iris-grid/src/AdvancedFilterCreatorSelectValueList.tsx @@ -167,7 +167,7 @@ class AdvancedFilterCreatorSelectValueList extends PureComponent< this.updateItemSelection(); } - handleTableUpdate(event: CustomEvent): void { + handleTableUpdate(event: DhType.Event): void { const { table, formatter } = this.props; if (!table) return; diff --git a/packages/iris-grid/src/IrisGrid.tsx b/packages/iris-grid/src/IrisGrid.tsx index c63f98ffa2..c108d12c66 100644 --- a/packages/iris-grid/src/IrisGrid.tsx +++ b/packages/iris-grid/src/IrisGrid.tsx @@ -2101,7 +2101,7 @@ class IrisGrid extends Component { // It's possible that the key table does not have any rows of data yet, so just wait until it does have one keyTable.addEventListener( dh.Table.EVENT_UPDATED, - (event: CustomEvent) => { + (event: DhType.Event) => { try { const { detail: data } = event; if (data.rows.length === 0) { diff --git a/packages/iris-grid/src/IrisGridTableModelTemplate.ts b/packages/iris-grid/src/IrisGridTableModelTemplate.ts index 3baf6a71a9..93f4cc5715 100644 --- a/packages/iris-grid/src/IrisGridTableModelTemplate.ts +++ b/packages/iris-grid/src/IrisGridTableModelTemplate.ts @@ -337,19 +337,19 @@ class IrisGridTableModelTemplate< this.dispatchEvent(new EventShimCustomEvent(IrisGridModel.EVENT.RECONNECT)); } - handleTableUpdate(event: CustomEvent): void { + handleTableUpdate(event: DhType.Event): void { this.copyViewportData(event.detail); this.dispatchEvent(new EventShimCustomEvent(IrisGridModel.EVENT.UPDATED)); } - handleTotalsUpdate(event: CustomEvent): void { + handleTotalsUpdate(event: DhType.Event): void { this.copyTotalsData(event.detail); this.dispatchEvent(new EventShimCustomEvent(IrisGridModel.EVENT.UPDATED)); } - handleRequestFailed(event: CustomEvent): void { + handleRequestFailed(event: DhType.Event): void { this.dispatchEvent( new EventShimCustomEvent(IrisGridModel.EVENT.REQUEST_FAILED, event) ); diff --git a/packages/jsapi-bootstrap/package.json b/packages/jsapi-bootstrap/package.json index 48866cd887..4be38b6a1b 100644 --- a/packages/jsapi-bootstrap/package.json +++ b/packages/jsapi-bootstrap/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@deephaven/components": "file:../components", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/utils": "file:../utils" diff --git a/packages/jsapi-components/package.json b/packages/jsapi-components/package.json index 740c9b927b..4f02170d64 100644 --- a/packages/jsapi-components/package.json +++ b/packages/jsapi-components/package.json @@ -24,7 +24,7 @@ "dependencies": { "@deephaven/components": "file:../components", "@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", diff --git a/packages/jsapi-components/src/TableDropdown.tsx b/packages/jsapi-components/src/TableDropdown.tsx index 6e21767f23..dd786ae7a0 100644 --- a/packages/jsapi-components/src/TableDropdown.tsx +++ b/packages/jsapi-components/src/TableDropdown.tsx @@ -80,7 +80,7 @@ export function TableDropdown({ subscription.addEventListener( dh.Table.EVENT_UPDATED, - (event: CustomEvent) => { + (event: DhType.Event) => { const { detail } = event; // Core JSAPI returns undefined for null table values, // coalesce with null to differentiate null from no selection in the dropdown diff --git a/packages/jsapi-components/src/useTableListener.ts b/packages/jsapi-components/src/useTableListener.ts index a5450904eb..323edb7b3c 100644 --- a/packages/jsapi-components/src/useTableListener.ts +++ b/packages/jsapi-components/src/useTableListener.ts @@ -7,7 +7,7 @@ const log = Log.module('useTableListener'); export const useTableListener = ( eventEmitter: dh.HasEventHandling | undefined | null, eventName: string, - callback: (event: CustomEvent) => void + callback: (event: dh.Event) => void ): void => useEffect( function initEventEmitter() { diff --git a/packages/jsapi-shim/package.json b/packages/jsapi-shim/package.json index 51ec85c4f1..5fef45940d 100644 --- a/packages/jsapi-shim/package.json +++ b/packages/jsapi-shim/package.json @@ -21,7 +21,7 @@ "build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward" }, "dependencies": { - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "prop-types": "^15.7.2" }, "files": [ diff --git a/packages/jsapi-utils/package.json b/packages/jsapi-utils/package.json index c0548f55b0..4535d3f907 100644 --- a/packages/jsapi-utils/package.json +++ b/packages/jsapi-utils/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@deephaven/filters": "file:../filters", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/log": "file:../log", "@deephaven/utils": "file:../utils", "lodash.clamp": "^4.0.3", diff --git a/packages/jsapi-utils/src/SessionUtils.ts b/packages/jsapi-utils/src/SessionUtils.ts index 4b3228700e..dc68f7dab8 100644 --- a/packages/jsapi-utils/src/SessionUtils.ts +++ b/packages/jsapi-utils/src/SessionUtils.ts @@ -24,18 +24,6 @@ export interface SessionWrapper { dh: typeof DhType; } -/** - * @returns New connection to the server - */ -export function createConnection( - dh: typeof DhType, - websocketUrl: string -): DhType.IdeConnection { - log.info(`Starting connection to '${websocketUrl}'...`); - - return new dh.IdeConnection(websocketUrl); -} - /** * Create a new session using the default URL * @returns A session and config that is ready to use diff --git a/packages/jsapi-utils/src/TableUtils.ts b/packages/jsapi-utils/src/TableUtils.ts index 6b16267c07..ab4bb38cce 100644 --- a/packages/jsapi-utils/src/TableUtils.ts +++ b/packages/jsapi-utils/src/TableUtils.ts @@ -628,8 +628,8 @@ export class TableUtils { table: DhType.Table | DhType.TreeTable, eventName: string, timeout = 0, - matcher: ((event: CustomEvent) => boolean) | null = null - ): CancelablePromise { + matcher: ((event: DhType.Event) => boolean) | null = null + ): CancelablePromise> { let eventCleanup: () => void; let timeoutId: ReturnType; let isPending = true; @@ -650,7 +650,7 @@ export class TableUtils { isPending = false; resolve(event); }); - }) as CancelablePromise; + }) as CancelablePromise>; wrappedPromise.cancel = () => { if (isPending) { log.debug2('Pending promise cleanup.'); diff --git a/packages/jsapi-utils/src/ViewportDataUtils.ts b/packages/jsapi-utils/src/ViewportDataUtils.ts index c0d55324c4..48f5ebc624 100644 --- a/packages/jsapi-utils/src/ViewportDataUtils.ts +++ b/packages/jsapi-utils/src/ViewportDataUtils.ts @@ -6,7 +6,7 @@ import { type KeyedItem, type ValueOf } from '@deephaven/utils'; export const ITEM_KEY_PREFIX = 'DH_ITEM_KEY'; -export type OnTableUpdatedEvent = CustomEvent<{ +export type OnTableUpdatedEvent = dh.Event<{ offset: number; columns: dh.Column[]; rows: dh.Row[]; diff --git a/packages/plugin/package.json b/packages/plugin/package.json index af2b5961e7..b3c79ff14f 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -27,7 +27,7 @@ "@deephaven/grid": "file:../grid", "@deephaven/icons": "file:../icons", "@deephaven/iris-grid": "file:../iris-grid", - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", "@fortawesome/fontawesome-common-types": "^6.1.1", diff --git a/packages/redux/package.json b/packages/redux/package.json index c777075f17..9636640671 100644 --- a/packages/redux/package.json +++ b/packages/redux/package.json @@ -22,7 +22,7 @@ "build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward" }, "dependencies": { - "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", + "@deephaven/jsapi-types": "^1.0.0-dev0.37.2", "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/plugin": "file:../plugin",