@deephaven/js-plugin-ag-grid 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -2
- package/dist/AgGridPlugin.js +2 -2
- package/dist/AgGridPlugin.js.map +1 -1
- package/dist/bundle/index.js +69076 -66895
- package/dist/components/AgGridView.d.ts +6 -4
- package/dist/components/AgGridView.d.ts.map +1 -1
- package/dist/components/AgGridView.js +1 -1
- package/dist/components/AgGridView.js.map +1 -1
- package/dist/components/AgGridWidget.d.ts +0 -1
- package/dist/components/AgGridWidget.d.ts.map +1 -1
- package/dist/components/AgGridWidget.js +2 -2
- package/dist/components/AgGridWidget.js.map +1 -1
- package/dist/components/LoadingOverlay.d.ts +0 -1
- package/dist/components/LoadingOverlay.d.ts.map +1 -1
- package/dist/components/LoadingOverlay.js +1 -1
- package/dist/components/LoadingOverlay.js.map +1 -1
- package/dist/components/LoadingSpinner.d.ts +0 -1
- package/dist/components/LoadingSpinner.d.ts.map +1 -1
- package/dist/datasources/DeephavenViewportDatasource.d.ts +1 -1
- package/dist/datasources/DeephavenViewportDatasource.d.ts.map +1 -1
- package/dist/datasources/DeephavenViewportDatasource.js.map +1 -1
- package/dist/hooks/useWidgetFetch.d.ts.map +1 -1
- package/dist/hooks/useWidgetFetch.js +18 -20
- package/dist/hooks/useWidgetFetch.js.map +1 -1
- package/dist/renderers/TreeCellRenderer.d.ts +1 -2
- package/dist/renderers/TreeCellRenderer.d.ts.map +1 -1
- package/dist/renderers/TreeCellRenderer.js +3 -3
- package/dist/renderers/TreeCellRenderer.js.map +1 -1
- package/dist/utils/AgGridAggUtils.d.ts +1 -1
- package/dist/utils/AgGridAggUtils.d.ts.map +1 -1
- package/dist/utils/AgGridAggUtils.js.map +1 -1
- package/dist/utils/AgGridDhTheme.d.ts +1 -2
- package/dist/utils/AgGridDhTheme.d.ts.map +1 -1
- package/dist/utils/AgGridDhTheme.js.map +1 -1
- package/dist/utils/AgGridFilterUtils.d.ts +1 -1
- package/dist/utils/AgGridFilterUtils.d.ts.map +1 -1
- package/dist/utils/AgGridFilterUtils.js.map +1 -1
- package/dist/utils/AgGridFormatter.d.ts +1 -1
- package/dist/utils/AgGridFormatter.d.ts.map +1 -1
- package/dist/utils/AgGridFormatter.js.map +1 -1
- package/dist/utils/AgGridPivotUtils.d.ts +1 -1
- package/dist/utils/AgGridPivotUtils.d.ts.map +1 -1
- package/dist/utils/AgGridPivotUtils.js.map +1 -1
- package/dist/utils/AgGridRenderUtils.d.ts +1 -1
- package/dist/utils/AgGridRenderUtils.d.ts.map +1 -1
- package/dist/utils/AgGridSortUtils.d.ts +1 -1
- package/dist/utils/AgGridSortUtils.d.ts.map +1 -1
- package/dist/utils/AgGridSortUtils.js.map +1 -1
- package/dist/utils/AgGridTableUtils.d.ts +1 -1
- package/dist/utils/AgGridTableUtils.d.ts.map +1 -1
- package/dist/utils/AgGridTableUtils.js +2 -0
- package/dist/utils/AgGridTableUtils.js.map +1 -1
- package/dist/utils/AgGridUtils.d.ts +1 -1
- package/dist/utils/AgGridUtils.d.ts.map +1 -1
- package/dist/utils/AgGridUtils.js +6 -4
- package/dist/utils/AgGridUtils.js.map +1 -1
- package/package.json +6 -13
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ The easiest way to use this plugin is to import and use the provided `AgGridView
|
|
|
9
9
|
```tsx
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import type { dh as DhType } from '@deephaven/jsapi-types';
|
|
12
|
+
// Only if using Core+ features
|
|
13
|
+
import type { dh as CorePlusDhType } from '@deephaven-enterprise/jsapi-coreplus-types';
|
|
12
14
|
import { AgGridView } from '@deephaven/js-plugin-ag-grid';
|
|
13
15
|
import { ApiContext } from '@deephaven/jsapi-bootstrap';
|
|
14
16
|
|
|
@@ -17,7 +19,7 @@ function DeephavenAgGridComponent({
|
|
|
17
19
|
table,
|
|
18
20
|
}: {
|
|
19
21
|
api: typeof DhType;
|
|
20
|
-
table: DhType.Table;
|
|
22
|
+
table: DhType.Table | DhType.TreeTable | CorePlusDhType.PivotTable;
|
|
21
23
|
}) {
|
|
22
24
|
return (
|
|
23
25
|
<ApiContext.Provider value={api}>
|
|
@@ -27,12 +29,48 @@ function DeephavenAgGridComponent({
|
|
|
27
29
|
}
|
|
28
30
|
```
|
|
29
31
|
|
|
32
|
+
### Formatting
|
|
33
|
+
|
|
34
|
+
You can pass in custom `Settings` to the `AgGridView` component to configure the grid's formatting. For example, to apply the Singapore time zone, display time down to the nanosecond, and show decimals to 4 places by default:
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import React, { useMemo } from 'react';
|
|
38
|
+
import type { dh as DhType } from '@deephaven/jsapi-types';
|
|
39
|
+
import { AgGridView } from '@deephaven/js-plugin-ag-grid';
|
|
40
|
+
import { ApiContext } from '@deephaven/jsapi-bootstrap';
|
|
41
|
+
|
|
42
|
+
function FormattedAgGridComponent({
|
|
43
|
+
api,
|
|
44
|
+
table,
|
|
45
|
+
}: {
|
|
46
|
+
api: typeof DhType;
|
|
47
|
+
table: DhType.Table | DhType.TreeTable;
|
|
48
|
+
}) {
|
|
49
|
+
const settings = useMemo(
|
|
50
|
+
() => ({
|
|
51
|
+
timeZone: 'Singapore',
|
|
52
|
+
defaultDateTimeFormat: 'yyyy-MM-dd HH:mm:ss.SSSSSSSSS',
|
|
53
|
+
defaultDecimalFormatOptions: {
|
|
54
|
+
defaultFormatString: '###,##0.0000',
|
|
55
|
+
},
|
|
56
|
+
}),
|
|
57
|
+
[]
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<ApiContext.Provider value={api}>
|
|
62
|
+
<AgGridView table={table} settings={settings} />
|
|
63
|
+
</ApiContext.Provider>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
30
68
|
## Advanced Usage
|
|
31
69
|
|
|
32
70
|
You can import the datasource directly if you want to manipulate the `AgGridReact` component directly. Import the DeephavenViewportDatasource and use it with your AG Grid view:
|
|
33
71
|
|
|
34
72
|
```tsx
|
|
35
|
-
import React, {
|
|
73
|
+
import React, { useMemo } from 'react';
|
|
36
74
|
import { AgGridReact } from 'ag-grid-react';
|
|
37
75
|
import type { dh as DhType } from '@deephaven/jsapi-types';
|
|
38
76
|
import { DeephavenViewportDatasource } from '@deephaven/js-plugin-ag-grid';
|
package/dist/AgGridPlugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _a, _b;
|
|
2
2
|
import { PluginType } from '@deephaven/plugin';
|
|
3
3
|
import { vsTable } from '@deephaven/icons';
|
|
4
|
-
import { LicenseManager } from '
|
|
4
|
+
import { LicenseManager } from 'ag-grid-enterprise';
|
|
5
5
|
import { AgGridWidget } from './components';
|
|
6
6
|
const key = (_b = (_a = import.meta.env) === null || _a === void 0 ? void 0 : _a.VITE_AG_GRID_LICENSE_KEY) !== null && _b !== void 0 ? _b : '';
|
|
7
7
|
if (key != null && key !== '') {
|
|
@@ -10,7 +10,7 @@ if (key != null && key !== '') {
|
|
|
10
10
|
export const AgGridPlugin = {
|
|
11
11
|
name: '@deephaven/js-plugin-ag-grid',
|
|
12
12
|
type: PluginType.WIDGET_PLUGIN,
|
|
13
|
-
supportedTypes: ['deephaven.ag_grid.AgGrid'
|
|
13
|
+
supportedTypes: ['deephaven.ag_grid.AgGrid'],
|
|
14
14
|
component: AgGridWidget,
|
|
15
15
|
icon: vsTable,
|
|
16
16
|
title: 'AG Grid',
|
package/dist/AgGridPlugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgGridPlugin.js","sourceRoot":"","sources":["../src/AgGridPlugin.ts"],"names":[],"mappings":";AAAA,OAAO,EAAqB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AgGridPlugin.js","sourceRoot":"","sources":["../src/AgGridPlugin.ts"],"names":[],"mappings":";AAAA,OAAO,EAAqB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,GAAG,GAAG,MAAA,MAAA,MAAM,CAAC,IAAI,CAAC,GAAG,0CAAE,wBAAwB,mCAAI,EAAE,CAAC;AAC5D,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;IAC9B,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAA4B;IACnD,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE,UAAU,CAAC,aAAa;IAC9B,cAAc,EAAE,CAAC,0BAA0B,CAAC;IAC5C,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|