@toolbox-web/grid-react 0.10.0 → 0.12.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 +17 -9
- package/chunks/data-grid-B0FOIoOo.js +813 -0
- package/features/export.d.ts +50 -7
- package/features/export.d.ts.map +1 -1
- package/features/export.js +65 -5
- package/features/filtering.d.ts +62 -7
- package/features/filtering.d.ts.map +1 -1
- package/features/filtering.js +96 -5
- package/features/print.d.ts +34 -7
- package/features/print.d.ts.map +1 -1
- package/features/print.js +27 -3
- package/features/selection.d.ts +47 -7
- package/features/selection.d.ts.map +1 -1
- package/features/selection.js +48 -3
- package/features/undo-redo.d.ts +51 -9
- package/features/undo-redo.d.ts.map +1 -1
- package/features/undo-redo.js +42 -5
- package/index.d.ts +10 -2
- package/index.d.ts.map +1 -1
- package/index.js +127 -904
- package/lib/context-types.d.ts +15 -0
- package/lib/context-types.d.ts.map +1 -1
- package/lib/data-grid.d.ts +10 -4
- package/lib/data-grid.d.ts.map +1 -1
- package/lib/feature-props.d.ts +14 -1
- package/lib/feature-props.d.ts.map +1 -1
- package/lib/grid-type-registry.d.ts +61 -8
- package/lib/grid-type-registry.d.ts.map +1 -1
- package/lib/react-column-config.d.ts +59 -29
- package/lib/react-column-config.d.ts.map +1 -1
- package/lib/react-grid-adapter.d.ts +13 -3
- package/lib/react-grid-adapter.d.ts.map +1 -1
- package/lib/use-grid.d.ts +37 -0
- package/lib/use-grid.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -174,7 +174,7 @@ import '@toolbox-web/grid-react/features/editing';
|
|
|
174
174
|
import '@toolbox-web/grid-react/features/filtering';
|
|
175
175
|
import '@toolbox-web/grid-react/features/clipboard';
|
|
176
176
|
|
|
177
|
-
import { DataGrid, type
|
|
177
|
+
import { DataGrid, type GridConfig } from '@toolbox-web/grid-react';
|
|
178
178
|
|
|
179
179
|
interface Employee {
|
|
180
180
|
id: number;
|
|
@@ -209,12 +209,12 @@ There are two ways to define custom renderers: inline in the configuration, or v
|
|
|
209
209
|
|
|
210
210
|
### Inline Configuration (Recommended)
|
|
211
211
|
|
|
212
|
-
Define renderers directly in your `
|
|
212
|
+
Define renderers directly in your `GridConfig`:
|
|
213
213
|
|
|
214
214
|
```tsx
|
|
215
|
-
import { DataGrid, type
|
|
215
|
+
import { DataGrid, type GridConfig } from '@toolbox-web/grid-react';
|
|
216
216
|
|
|
217
|
-
const config:
|
|
217
|
+
const config: GridConfig<Employee> = {
|
|
218
218
|
columns: [
|
|
219
219
|
{ field: 'name', header: 'Name' },
|
|
220
220
|
{
|
|
@@ -267,7 +267,7 @@ Define editors inline in your configuration or via `GridColumn`:
|
|
|
267
267
|
### Inline Configuration
|
|
268
268
|
|
|
269
269
|
```tsx
|
|
270
|
-
const config:
|
|
270
|
+
const config: GridConfig<Employee> = {
|
|
271
271
|
columns: [
|
|
272
272
|
{
|
|
273
273
|
field: 'status',
|
|
@@ -331,7 +331,7 @@ import { DataGrid, GridDetailPanel } from '@toolbox-web/grid-react';
|
|
|
331
331
|
import { MasterDetailPlugin } from '@toolbox-web/grid/all';
|
|
332
332
|
|
|
333
333
|
function EmployeeGrid() {
|
|
334
|
-
const config:
|
|
334
|
+
const config: GridConfig<Employee> = {
|
|
335
335
|
columns: [...],
|
|
336
336
|
plugins: [new MasterDetailPlugin()],
|
|
337
337
|
};
|
|
@@ -369,7 +369,7 @@ import { DataGrid, GridToolPanel, GridToolButtons } from '@toolbox-web/grid-reac
|
|
|
369
369
|
import { ShellPlugin } from '@toolbox-web/grid/all';
|
|
370
370
|
|
|
371
371
|
function EmployeeGrid() {
|
|
372
|
-
const config:
|
|
372
|
+
const config: GridConfig<Employee> = {
|
|
373
373
|
columns: [...],
|
|
374
374
|
plugins: [new ShellPlugin()],
|
|
375
375
|
};
|
|
@@ -688,8 +688,14 @@ Inject custom CSS into the grid:
|
|
|
688
688
|
|
|
689
689
|
```typescript
|
|
690
690
|
import type {
|
|
691
|
+
// Primary config exports (use these)
|
|
692
|
+
GridConfig,
|
|
693
|
+
ColumnConfig,
|
|
694
|
+
// Deprecated aliases (use GridConfig/ColumnConfig instead)
|
|
695
|
+
// Deprecated aliases
|
|
691
696
|
ReactGridConfig,
|
|
692
697
|
ReactColumnConfig,
|
|
698
|
+
// Context types
|
|
693
699
|
CellRenderContext,
|
|
694
700
|
ColumnEditorContext,
|
|
695
701
|
DetailPanelContext,
|
|
@@ -699,10 +705,12 @@ import type {
|
|
|
699
705
|
// Feature props
|
|
700
706
|
FeatureProps,
|
|
701
707
|
SSRProps,
|
|
702
|
-
// Type-level defaults
|
|
703
|
-
|
|
708
|
+
// Type-level defaults (TypeDefault is primary)
|
|
709
|
+
TypeDefault,
|
|
704
710
|
TypeDefaultsMap,
|
|
705
711
|
GridTypeProviderProps,
|
|
712
|
+
// Deprecated
|
|
713
|
+
ReactTypeDefault,
|
|
706
714
|
// Icon overrides
|
|
707
715
|
GridIconProviderProps,
|
|
708
716
|
GridProviderProps,
|