Skip to content

Commit 5cf3ad1

Browse files
authored
feat: DH-20656: Update AG Grid to v34 (#1263)
- Used CodeMod to update packages `npx @ag-grid-devtools/cli@latest migrate --from=32.3.9 --to=34.0.0` - Needed to manually update package.json, and clean up some of the imports - Did a smoke test to make sure table, tree tables were working as expected - Unit tests and e2e tests updated
1 parent cb43627 commit 5cf3ad1

24 files changed

+125
-162
lines changed

package-lock.json

Lines changed: 85 additions & 128 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/ag-grid/src/js/package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,9 @@
4848
"react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0"
4949
},
5050
"dependencies": {
51-
"@ag-grid-community/core": "^32.3.9",
52-
"@ag-grid-community/react": "^32.3.9",
53-
"@ag-grid-community/styles": "^32.3.9",
54-
"@ag-grid-community/theming": "^32.3.9",
55-
"@ag-grid-enterprise/column-tool-panel": "^32.3.9",
56-
"@ag-grid-enterprise/core": "^32.3.9",
57-
"@ag-grid-enterprise/row-grouping": "^32.3.9",
58-
"@ag-grid-enterprise/server-side-row-model": "^32.3.9",
59-
"@ag-grid-enterprise/viewport-row-model": "^32.3.9",
51+
"ag-grid-community": "^34.3.1",
52+
"ag-grid-react": "^34.3.1",
53+
"ag-grid-enterprise": "^34.3.1",
6054
"@deephaven/icons": "^0.106.0",
6155
"@deephaven/jsapi-bootstrap": "^0.106.2",
6256
"@deephaven/jsapi-utils": "^0.106.2",

plugins/ag-grid/src/js/src/AgGridPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type WidgetPlugin, PluginType } from '@deephaven/plugin';
22
import { vsTable } from '@deephaven/icons';
33
import type { dh } from '@deephaven/jsapi-types';
4-
import { LicenseManager } from '@ag-grid-enterprise/core';
4+
import { LicenseManager } from 'ag-grid-enterprise';
55
import { AgGridWidget } from './components';
66

77
const key = import.meta.env?.VITE_AG_GRID_LICENSE_KEY ?? '';

plugins/ag-grid/src/js/src/components/AgGridView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
GridSizeChangedEvent,
99
FirstDataRenderedEvent,
1010
GetRowIdParams,
11-
} from '@ag-grid-community/core';
12-
import { AgGridReact, AgGridReactProps } from '@ag-grid-community/react';
11+
} from 'ag-grid-community';
12+
import { AgGridReact, AgGridReactProps } from 'ag-grid-react';
1313
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
1414
import {
1515
AgGridFormatter,

plugins/ag-grid/src/js/src/components/AgGridWidget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import type { dh as DhType } from '@deephaven/jsapi-types';
33
import { type WidgetComponentProps } from '@deephaven/plugin';
44
import { useApi } from '@deephaven/jsapi-bootstrap';
55
import { getSettings, RootState } from '@deephaven/redux';
6+
import { themeQuartz } from 'ag-grid-community';
67
import { useSelector } from 'react-redux';
7-
import { themeQuartz } from '@ag-grid-community/theming';
8-
import type { AgGridReactProps } from '@ag-grid-community/react';
8+
import type { AgGridReactProps } from 'ag-grid-react';
99
import AgGridView from './AgGridView';
1010
import { AgGridDhTheme, getDefaultProps } from '../utils';
1111
import useWidgetFetch from '../hooks/useWidgetFetch';

plugins/ag-grid/src/js/src/datasources/DeephavenViewportDatasource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
IViewportDatasourceParams,
1313
SortChangedEvent,
1414
SortModelItem,
15-
} from '@ag-grid-community/core';
15+
} from 'ag-grid-community';
1616
import Log from '@deephaven/log';
1717
import { assertNotNull, Pending } from '@deephaven/utils';
1818
import { getAggregatedColumns, getRollupConfig } from '../utils/AgGridAggUtils';

plugins/ag-grid/src/js/src/renderers/TreeCellRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useCallback } from 'react';
22
import classNames from 'classnames';
3-
import { CustomCellRendererProps } from '@ag-grid-community/react';
3+
import { CustomCellRendererProps } from 'ag-grid-react';
44
import { TREE_NODE_KEY, TreeNode } from '../utils/AgGridTableUtils';
55
import DeephavenViewportDatasource from '../datasources/DeephavenViewportDatasource';
66

plugins/ag-grid/src/js/src/utils/AgGridAggUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Column, ColumnState, GridApi } from '@ag-grid-community/core';
1+
import { Column, ColumnState, GridApi } from 'ag-grid-community';
22
import type { dh as DhType } from '@deephaven/jsapi-types';
33

44
export type AggregatedColumn = {

plugins/ag-grid/src/js/src/utils/AgGridDhTheme.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type {
22
CheckboxStyleParams,
33
InputStyleParams,
44
TabStyleParams,
5-
} from '@ag-grid-community/theming';
6-
import type { CoreParams } from '@ag-grid-community/theming/dist/types/src/styles/core/core-css';
5+
CoreParams,
6+
} from 'ag-grid-community';
77
import { AgGridThemeColors } from './AgGridColors';
88

99
type GridDensity = 'compact' | 'regular' | 'spacious';

plugins/ag-grid/src/js/src/utils/AgGridFilterUtils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
DateFilterModel,
77
ICombinedSimpleModel,
88
ISimpleFilterModel,
9-
} from '@ag-grid-community/core';
9+
} from 'ag-grid-community';
1010
import AgGridFilterUtils from './AgGridFilterUtils';
1111

1212
describe('AgGridFilterUtils', () => {

0 commit comments

Comments
 (0)