@toolbox-web/grid-react 0.6.0 → 0.8.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 +158 -2
- package/chunks/feature-registry-Y3KvnN54.js +26 -0
- package/chunks/multi-sort-Ae2VVdZb.js +3 -0
- package/features/clipboard.d.ts +18 -0
- package/features/clipboard.d.ts.map +1 -0
- package/features/clipboard.js +6 -0
- package/features/column-virtualization.d.ts +16 -0
- package/features/column-virtualization.d.ts.map +1 -0
- package/features/column-virtualization.js +6 -0
- package/features/context-menu.d.ts +16 -0
- package/features/context-menu.d.ts.map +1 -0
- package/features/context-menu.js +6 -0
- package/features/editing.d.ts +16 -0
- package/features/editing.d.ts.map +1 -0
- package/features/editing.js +3 -0
- package/features/export.d.ts +16 -0
- package/features/export.d.ts.map +1 -0
- package/features/export.js +6 -0
- package/features/filtering.d.ts +16 -0
- package/features/filtering.d.ts.map +1 -0
- package/features/filtering.js +6 -0
- package/features/grouping-columns.d.ts +16 -0
- package/features/grouping-columns.d.ts.map +1 -0
- package/features/grouping-columns.js +6 -0
- package/features/grouping-rows.d.ts +16 -0
- package/features/grouping-rows.d.ts.map +1 -0
- package/features/grouping-rows.js +6 -0
- package/features/index.d.ts +1 -0
- package/features/index.d.ts.map +1 -0
- package/features/index.js +22 -0
- package/features/master-detail.d.ts +18 -0
- package/features/master-detail.d.ts.map +1 -0
- package/features/master-detail.js +6 -0
- package/features/multi-sort.d.ts +22 -0
- package/features/multi-sort.d.ts.map +1 -0
- package/features/pinned-columns.d.ts +16 -0
- package/features/pinned-columns.d.ts.map +1 -0
- package/features/pinned-columns.js +6 -0
- package/features/pinned-rows.d.ts +16 -0
- package/features/pinned-rows.d.ts.map +1 -0
- package/features/pinned-rows.js +6 -0
- package/features/pivot.d.ts +16 -0
- package/features/pivot.d.ts.map +1 -0
- package/features/pivot.js +3 -0
- package/features/print.d.ts +16 -0
- package/features/print.d.ts.map +1 -0
- package/features/print.js +3 -0
- package/features/reorder.d.ts +16 -0
- package/features/reorder.d.ts.map +1 -0
- package/features/reorder.js +6 -0
- package/features/responsive.d.ts +16 -0
- package/features/responsive.d.ts.map +1 -0
- package/features/responsive.js +6 -0
- package/features/row-reorder.d.ts +16 -0
- package/features/row-reorder.d.ts.map +1 -0
- package/features/row-reorder.js +3 -0
- package/features/selection.d.ts +16 -0
- package/features/selection.d.ts.map +1 -0
- package/features/selection.js +3 -0
- package/features/server-side.d.ts +16 -0
- package/features/server-side.d.ts.map +1 -0
- package/features/server-side.js +3 -0
- package/features/sorting.d.ts +1 -0
- package/features/sorting.d.ts.map +1 -0
- package/features/sorting.js +1 -0
- package/features/tree.d.ts +16 -0
- package/features/tree.d.ts.map +1 -0
- package/features/tree.js +6 -0
- package/features/undo-redo.d.ts +18 -0
- package/features/undo-redo.d.ts.map +1 -0
- package/features/undo-redo.js +6 -0
- package/features/visibility.d.ts +16 -0
- package/features/visibility.d.ts.map +1 -0
- package/features/visibility.js +6 -0
- package/index.d.ts +6 -3
- package/index.d.ts.map +1 -1
- package/index.js +625 -430
- package/lib/column-shorthand.d.ts +59 -0
- package/lib/column-shorthand.d.ts.map +1 -0
- package/lib/context-types.d.ts +1 -1
- package/lib/data-grid.d.ts +118 -26
- package/lib/data-grid.d.ts.map +1 -1
- package/lib/event-props.d.ts +305 -0
- package/lib/event-props.d.ts.map +1 -0
- package/lib/feature-props.d.ts +329 -0
- package/lib/feature-props.d.ts.map +1 -0
- package/lib/feature-registry.d.ts +56 -0
- package/lib/feature-registry.d.ts.map +1 -0
- package/lib/grid-column.d.ts +1 -1
- package/lib/grid-detail-panel.d.ts +3 -0
- package/lib/grid-detail-panel.d.ts.map +1 -1
- package/lib/grid-responsive-card.d.ts +3 -0
- package/lib/grid-responsive-card.d.ts.map +1 -1
- package/lib/grid-type-registry.d.ts +1 -1
- package/lib/grid-type-registry.d.ts.map +1 -1
- package/lib/react-column-config.d.ts +1 -1
- package/lib/react-grid-adapter.d.ts +1 -1
- package/lib/react-grid-adapter.d.ts.map +1 -1
- package/lib/use-grid-event.d.ts +23 -19
- package/lib/use-grid-event.d.ts.map +1 -1
- package/lib/use-grid.d.ts +46 -2
- package/lib/use-grid.d.ts.map +1 -1
- package/lib/use-sync-plugins.d.ts +21 -0
- package/lib/use-sync-plugins.d.ts.map +1 -0
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ React adapter for `@toolbox-web/grid` data grid component. Provides components a
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
11
|
- ✅ **Full React integration** - Use JSX for cell renderers and editors
|
|
12
|
+
- ✅ **Declarative feature props** - Enable plugins with simple props like `selection="range"`
|
|
13
|
+
- ✅ **Tree-shakeable features** - Only import the features you use
|
|
12
14
|
- ✅ **Declarative columns** - Define columns via props or `GridColumn` components
|
|
13
15
|
- ✅ **Render props** - Clean `children` syntax for custom cells
|
|
14
16
|
- ✅ **Type-level defaults** - App-wide renderers/editors via `GridTypeProvider`
|
|
@@ -80,6 +82,126 @@ function EmployeeGrid() {
|
|
|
80
82
|
}
|
|
81
83
|
```
|
|
82
84
|
|
|
85
|
+
## Enabling Features
|
|
86
|
+
|
|
87
|
+
Features are enabled using **declarative props** with **side-effect imports**. This gives you the best of both worlds: clean, intuitive JSX and tree-shakeable bundles.
|
|
88
|
+
|
|
89
|
+
### How It Works
|
|
90
|
+
|
|
91
|
+
1. **Import the feature** - A side-effect import registers the feature factory
|
|
92
|
+
2. **Use the prop** - DataGrid detects the prop and creates the plugin instance
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
// 1. Import features you need (once, typically in main.tsx or the component file)
|
|
96
|
+
import '@toolbox-web/grid-react/features/selection';
|
|
97
|
+
import '@toolbox-web/grid-react/features/sorting';
|
|
98
|
+
import '@toolbox-web/grid-react/features/filtering';
|
|
99
|
+
|
|
100
|
+
// 2. Use declarative props - no manual plugin instantiation!
|
|
101
|
+
<DataGrid
|
|
102
|
+
rows={employees}
|
|
103
|
+
columns={columns}
|
|
104
|
+
selection="range" // SelectionPlugin with mode: 'range'
|
|
105
|
+
sorting="multi" // MultiSortPlugin
|
|
106
|
+
filtering // FilteringPlugin with defaults
|
|
107
|
+
/>;
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Why Side-Effect Imports?
|
|
111
|
+
|
|
112
|
+
- **Tree-shakeable** - Only the features you import are bundled
|
|
113
|
+
- **Synchronous** - No loading states, no HTTP requests, no spinners
|
|
114
|
+
- **Type-safe** - Full TypeScript support for feature props
|
|
115
|
+
- **Clean JSX** - No `plugins: [new SelectionPlugin({ mode: 'range' })]` boilerplate
|
|
116
|
+
|
|
117
|
+
### Available Features
|
|
118
|
+
|
|
119
|
+
Import from `@toolbox-web/grid-react/features/<name>`:
|
|
120
|
+
|
|
121
|
+
| Feature | Prop | Example |
|
|
122
|
+
| ----------------------- | ---------------------- | -------------------------------------------------------------------- |
|
|
123
|
+
| `selection` | `selection` | `selection="range"` or `selection={{ mode: 'row', checkbox: true }}` |
|
|
124
|
+
| `sorting` | `sorting` | `sorting="multi"` or `sorting={{ maxSortLevels: 3 }}` |
|
|
125
|
+
| `filtering` | `filtering` | `filtering` or `filtering={{ debounceMs: 200 }}` |
|
|
126
|
+
| `editing` | `editing` | `editing="dblclick"` or `editing="click"` |
|
|
127
|
+
| `clipboard` | `clipboard` | `clipboard` (requires selection) |
|
|
128
|
+
| `undo-redo` | `undoRedo` | `undoRedo` (requires editing) |
|
|
129
|
+
| `context-menu` | `contextMenu` | `contextMenu` |
|
|
130
|
+
| `reorder` | `reorder` | `reorder` (column drag-to-reorder) |
|
|
131
|
+
| `row-reorder` | `rowReorder` | `rowReorder` (row drag-to-reorder) |
|
|
132
|
+
| `visibility` | `visibility` | `visibility` (column visibility panel) |
|
|
133
|
+
| `pinned-columns` | `pinnedColumns` | `pinnedColumns` |
|
|
134
|
+
| `pinned-rows` | `pinnedRows` | `pinnedRows` |
|
|
135
|
+
| `grouping-columns` | `groupingColumns` | `groupingColumns` |
|
|
136
|
+
| `grouping-rows` | `groupingRows` | `groupingRows={{ groupBy: 'department' }}` |
|
|
137
|
+
| `tree` | `tree` | `tree={{ childrenField: 'children' }}` |
|
|
138
|
+
| `column-virtualization` | `columnVirtualization` | `columnVirtualization` |
|
|
139
|
+
| `export` | `export` | `export` |
|
|
140
|
+
| `print` | `print` | `print` |
|
|
141
|
+
| `responsive` | `responsive` | `responsive` (card layout on mobile) |
|
|
142
|
+
| `master-detail` | `masterDetail` | `masterDetail` (use with `<GridDetailPanel>`) |
|
|
143
|
+
| `pivot` | `pivot` | `pivot={{ rowFields: [...], columnFields: [...] }}` |
|
|
144
|
+
| `server-side` | `serverSide` | `serverSide={{ ... }}` (server-side data) |
|
|
145
|
+
|
|
146
|
+
### Import All Features
|
|
147
|
+
|
|
148
|
+
For prototyping or when bundle size isn't critical, import all features at once:
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
// Import all features (larger bundle)
|
|
152
|
+
import '@toolbox-web/grid-react/features';
|
|
153
|
+
|
|
154
|
+
// Now all feature props work
|
|
155
|
+
<DataGrid
|
|
156
|
+
selection="range"
|
|
157
|
+
sorting
|
|
158
|
+
filtering
|
|
159
|
+
editing="dblclick"
|
|
160
|
+
clipboard
|
|
161
|
+
undoRedo
|
|
162
|
+
contextMenu
|
|
163
|
+
// ... any feature prop
|
|
164
|
+
/>;
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Full Example
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
import '@toolbox-web/grid-react/features/selection';
|
|
171
|
+
import '@toolbox-web/grid-react/features/sorting';
|
|
172
|
+
import '@toolbox-web/grid-react/features/editing';
|
|
173
|
+
import '@toolbox-web/grid-react/features/filtering';
|
|
174
|
+
import '@toolbox-web/grid-react/features/clipboard';
|
|
175
|
+
|
|
176
|
+
import { DataGrid, type ReactGridConfig } from '@toolbox-web/grid-react';
|
|
177
|
+
|
|
178
|
+
interface Employee {
|
|
179
|
+
id: number;
|
|
180
|
+
name: string;
|
|
181
|
+
department: string;
|
|
182
|
+
salary: number;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function EmployeeGrid({ employees }: { employees: Employee[] }) {
|
|
186
|
+
return (
|
|
187
|
+
<DataGrid
|
|
188
|
+
rows={employees}
|
|
189
|
+
columns={[
|
|
190
|
+
{ field: 'id', header: 'ID', width: 60 },
|
|
191
|
+
{ field: 'name', header: 'Name', editable: true },
|
|
192
|
+
{ field: 'department', header: 'Department', editable: true },
|
|
193
|
+
{ field: 'salary', header: 'Salary', type: 'number' },
|
|
194
|
+
]}
|
|
195
|
+
selection="range"
|
|
196
|
+
sorting="multi"
|
|
197
|
+
editing="dblclick"
|
|
198
|
+
filtering
|
|
199
|
+
clipboard
|
|
200
|
+
/>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
83
205
|
## Custom Cell Renderers
|
|
84
206
|
|
|
85
207
|
There are two ways to define custom renderers: inline in the configuration, or via `GridColumn` components.
|
|
@@ -412,9 +534,12 @@ function Dashboard() {
|
|
|
412
534
|
| `useGridTypeDefaults()` | Get all type defaults from context |
|
|
413
535
|
| `useTypeDefault(type)` | Get defaults for a specific type |
|
|
414
536
|
|
|
415
|
-
## Using Plugins
|
|
537
|
+
## Using Plugins (Advanced)
|
|
416
538
|
|
|
417
|
-
|
|
539
|
+
> **Note:** For most use cases, prefer the [declarative feature props](#enabling-features) approach above.
|
|
540
|
+
> The manual plugin approach is useful for advanced scenarios like custom plugin configuration or custom plugins.
|
|
541
|
+
|
|
542
|
+
Import plugins directly when you need full control over plugin configuration:
|
|
418
543
|
|
|
419
544
|
```tsx
|
|
420
545
|
import { DataGrid } from '@toolbox-web/grid-react';
|
|
@@ -493,6 +618,9 @@ import type {
|
|
|
493
618
|
ToolPanelContext,
|
|
494
619
|
DataGridRef,
|
|
495
620
|
DataGridProps,
|
|
621
|
+
// Feature props
|
|
622
|
+
FeatureProps,
|
|
623
|
+
SSRProps,
|
|
496
624
|
// Type-level defaults
|
|
497
625
|
ReactTypeDefault,
|
|
498
626
|
TypeDefaultsMap,
|
|
@@ -509,10 +637,38 @@ import type {
|
|
|
509
637
|
| `gridConfig` | `GridConfig` | Full configuration object |
|
|
510
638
|
| `fitMode` | `'stretch' \| 'fit-columns' \| 'auto-fit'` | Column sizing mode |
|
|
511
639
|
| `customStyles` | `string` | CSS to inject into grid |
|
|
640
|
+
| `ssr` | `boolean` | Disable features for SSR |
|
|
512
641
|
| `onRowsChange` | `(rows: TRow[]) => void` | Rows changed callback |
|
|
513
642
|
| `onCellEdit` | `(event: CustomEvent) => void` | Cell edited callback |
|
|
514
643
|
| `onRowClick` | `(event: CustomEvent) => void` | Row clicked callback |
|
|
515
644
|
|
|
645
|
+
**Feature Props** (require corresponding feature import):
|
|
646
|
+
|
|
647
|
+
| Prop | Type | Feature Import |
|
|
648
|
+
| ---------------------- | --------------------------------------------------- | -------------------------------- |
|
|
649
|
+
| `selection` | `'cell' \| 'row' \| 'range' \| SelectionConfig` | `features/selection` |
|
|
650
|
+
| `sorting` | `boolean \| 'single' \| 'multi' \| MultiSortConfig` | `features/sorting` |
|
|
651
|
+
| `filtering` | `boolean \| FilterConfig` | `features/filtering` |
|
|
652
|
+
| `editing` | `boolean \| 'click' \| 'dblclick' \| 'manual'` | `features/editing` |
|
|
653
|
+
| `clipboard` | `boolean \| ClipboardConfig` | `features/clipboard` |
|
|
654
|
+
| `undoRedo` | `boolean \| UndoRedoConfig` | `features/undo-redo` |
|
|
655
|
+
| `contextMenu` | `boolean \| ContextMenuConfig` | `features/context-menu` |
|
|
656
|
+
| `reorder` | `boolean \| ReorderConfig` | `features/reorder` |
|
|
657
|
+
| `rowReorder` | `boolean \| RowReorderConfig` | `features/row-reorder` |
|
|
658
|
+
| `visibility` | `boolean \| VisibilityConfig` | `features/visibility` |
|
|
659
|
+
| `pinnedColumns` | `boolean` | `features/pinned-columns` |
|
|
660
|
+
| `pinnedRows` | `boolean \| PinnedRowsConfig` | `features/pinned-rows` |
|
|
661
|
+
| `groupingColumns` | `boolean \| GroupingColumnsConfig` | `features/grouping-columns` |
|
|
662
|
+
| `groupingRows` | `boolean \| GroupingRowsConfig` | `features/grouping-rows` |
|
|
663
|
+
| `tree` | `boolean \| TreeConfig` | `features/tree` |
|
|
664
|
+
| `columnVirtualization` | `boolean \| ColumnVirtualizationConfig` | `features/column-virtualization` |
|
|
665
|
+
| `export` | `boolean \| ExportConfig` | `features/export` |
|
|
666
|
+
| `print` | `boolean \| PrintConfig` | `features/print` |
|
|
667
|
+
| `responsive` | `boolean \| ResponsivePluginConfig` | `features/responsive` |
|
|
668
|
+
| `masterDetail` | `boolean \| MasterDetailConfig` | `features/master-detail` |
|
|
669
|
+
| `pivot` | `boolean \| PivotConfig` | `features/pivot` |
|
|
670
|
+
| `serverSide` | `boolean \| ServerSideConfig` | `features/server-side` |
|
|
671
|
+
|
|
516
672
|
### GridColumn Props
|
|
517
673
|
|
|
518
674
|
| Prop | Type | Description |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const i = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
|
|
2
|
+
function s(t, e) {
|
|
3
|
+
i.set(t, {
|
|
4
|
+
factory: e,
|
|
5
|
+
name: t
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
function a(t, e) {
|
|
9
|
+
const o = i.get(t);
|
|
10
|
+
if (!o) {
|
|
11
|
+
const n = typeof window < "u" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1");
|
|
12
|
+
!r.has(t) && n && (r.add(t), console.warn(
|
|
13
|
+
`[DataGrid] Feature "${t}" prop is set but the feature is not registered.
|
|
14
|
+
Add this import to enable it:
|
|
15
|
+
|
|
16
|
+
import '@toolbox-web/grid-react/features/${t}';
|
|
17
|
+
`
|
|
18
|
+
));
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
return o.factory(e);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
a as c,
|
|
25
|
+
s as r
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clipboard feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `clipboard` prop on DataGrid.
|
|
5
|
+
* Requires the selection feature to be enabled.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* import '@toolbox-web/grid-react/features/selection';
|
|
10
|
+
* import '@toolbox-web/grid-react/features/clipboard';
|
|
11
|
+
*
|
|
12
|
+
* <DataGrid selection="range" clipboard />
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @packageDocumentation
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column Virtualization feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `columnVirtualization` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/column-virtualization';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid columnVirtualization />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=column-virtualization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-virtualization.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/column-virtualization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ColumnVirtualizationPlugin as t } from "@toolbox-web/grid/plugins/column-virtualization";
|
|
2
|
+
import { r as i } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
+
i("columnVirtualization", (o) => {
|
|
4
|
+
const r = typeof o == "boolean" ? {} : o ?? {};
|
|
5
|
+
return new t(r);
|
|
6
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context Menu feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `contextMenu` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/context-menu';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid contextMenu />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/context-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editing feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `editing` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/editing';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid editing="dblclick" />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=editing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/editing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { EditingPlugin as e } from "@toolbox-web/grid/plugins/editing";
|
|
2
|
+
import { r as t } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
+
t("editing", (r) => r === !0 ? new e({ editOn: "dblclick" }) : r === "click" || r === "dblclick" || r === "manual" ? new e({ editOn: r }) : new e(r ?? void 0));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Export feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `export` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/export';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid export />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filtering feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `filtering` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/filtering';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid filtering={{ debounceMs: 200 }} />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=filtering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/filtering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column Grouping feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `groupingColumns` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/grouping-columns';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid groupingColumns />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=grouping-columns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouping-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/grouping-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Row Grouping feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `groupingRows` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/grouping-rows';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid groupingRows={{ groupBy: ['department'] }} />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=grouping-rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouping-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/grouping-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,aAAa,CAAC;AACrB,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AACxB,OAAO,WAAW,CAAC;AACnB,OAAO,UAAU,CAAC;AAClB,OAAO,aAAa,CAAC;AACrB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,SAAS,CAAC;AACjB,OAAO,SAAS,CAAC;AACjB,OAAO,WAAW,CAAC;AACnB,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,eAAe,CAAC;AAEvB,OAAO,QAAQ,CAAC;AAChB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./clipboard.js";
|
|
2
|
+
import "./column-virtualization.js";
|
|
3
|
+
import "./context-menu.js";
|
|
4
|
+
import "./editing.js";
|
|
5
|
+
import "./export.js";
|
|
6
|
+
import "./filtering.js";
|
|
7
|
+
import "./grouping-columns.js";
|
|
8
|
+
import "./grouping-rows.js";
|
|
9
|
+
import "./master-detail.js";
|
|
10
|
+
import "../chunks/multi-sort-Ae2VVdZb.js";
|
|
11
|
+
import "./pinned-columns.js";
|
|
12
|
+
import "./pinned-rows.js";
|
|
13
|
+
import "./pivot.js";
|
|
14
|
+
import "./print.js";
|
|
15
|
+
import "./reorder.js";
|
|
16
|
+
import "./responsive.js";
|
|
17
|
+
import "./row-reorder.js";
|
|
18
|
+
import "./selection.js";
|
|
19
|
+
import "./server-side.js";
|
|
20
|
+
import "./tree.js";
|
|
21
|
+
import "./undo-redo.js";
|
|
22
|
+
import "./visibility.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Master-Detail feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `masterDetail` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/master-detail';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid masterDetail={{ showExpandColumn: true }}>
|
|
11
|
+
* <GridDetailPanel>{({ row }) => <DetailView row={row} />}</GridDetailPanel>
|
|
12
|
+
* </DataGrid>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @packageDocumentation
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=master-detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/master-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-sort feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `multiSort` prop on DataGrid.
|
|
5
|
+
* Multi-sort allows sorting by multiple columns simultaneously.
|
|
6
|
+
*
|
|
7
|
+
* For basic single-column sorting, columns with `sortable: true` work without this plugin.
|
|
8
|
+
* Use `sortable={false}` on the grid to disable all sorting.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import '@toolbox-web/grid-react/features/multi-sort';
|
|
13
|
+
*
|
|
14
|
+
* <DataGrid multiSort />
|
|
15
|
+
* <DataGrid multiSort="single" />
|
|
16
|
+
* <DataGrid multiSort={{ maxSortColumns: 3 }} />
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=multi-sort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-sort.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/multi-sort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pinned Columns feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `pinnedColumns` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/pinned-columns';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid pinnedColumns />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=pinned-columns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinned-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/pinned-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pinned Rows feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `pinnedRows` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/pinned-rows';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid pinnedRows={{ position: 'bottom', showRowCount: true }} />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=pinned-rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinned-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/pinned-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pivot feature for @toolbox-web/grid-react
|
|
3
|
+
*
|
|
4
|
+
* Import this module to enable the `pivot` prop on DataGrid.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import '@toolbox-web/grid-react/features/pivot';
|
|
9
|
+
*
|
|
10
|
+
* <DataGrid pivot={{ rowFields: ['category'], valueField: 'sales' }} />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=pivot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pivot.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/pivot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|