@toolbox-web/grid-react 0.15.1 → 0.17.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/chunks/{data-grid-O97pdLCY.js → data-grid-Cpa5kukM.js} +322 -295
- package/features/clipboard.d.ts +0 -17
- package/features/clipboard.d.ts.map +1 -1
- package/features/clipboard.js +1 -6
- package/features/column-virtualization.d.ts +0 -15
- package/features/column-virtualization.d.ts.map +1 -1
- package/features/column-virtualization.js +1 -6
- package/features/context-menu.d.ts +0 -15
- package/features/context-menu.d.ts.map +1 -1
- package/features/context-menu.js +1 -6
- package/features/editing.d.ts +0 -15
- package/features/editing.d.ts.map +1 -1
- package/features/editing.js +1 -3
- package/features/export.d.ts.map +1 -1
- package/features/export.js +9 -14
- package/features/filtering.js +15 -15
- package/features/grouping-columns.d.ts +9 -0
- package/features/grouping-columns.d.ts.map +1 -1
- package/features/grouping-columns.js +19 -4
- package/features/grouping-rows.d.ts +9 -0
- package/features/grouping-rows.d.ts.map +1 -1
- package/features/grouping-rows.js +20 -5
- package/features/index.js +18 -18
- package/features/master-detail.d.ts +0 -17
- package/features/master-detail.d.ts.map +1 -1
- package/features/master-detail.js +1 -6
- package/features/multi-sort.d.ts +0 -21
- package/features/multi-sort.d.ts.map +1 -1
- package/features/multi-sort.js +1 -3
- package/features/pinned-columns.d.ts +0 -15
- package/features/pinned-columns.d.ts.map +1 -1
- package/features/pinned-columns.js +1 -6
- package/features/pinned-rows.d.ts +0 -15
- package/features/pinned-rows.d.ts.map +1 -1
- package/features/pinned-rows.js +24 -5
- package/features/pivot.d.ts +0 -15
- package/features/pivot.d.ts.map +1 -1
- package/features/pivot.js +1 -3
- package/features/print.d.ts.map +1 -1
- package/features/print.js +10 -12
- package/features/reorder-columns.d.ts +1 -0
- package/features/reorder-columns.d.ts.map +1 -0
- package/features/reorder-columns.js +1 -0
- package/features/reorder-rows.d.ts +1 -0
- package/features/reorder-rows.d.ts.map +1 -0
- package/features/reorder-rows.js +1 -0
- package/features/reorder.d.ts +3 -13
- package/features/reorder.d.ts.map +1 -1
- package/features/reorder.js +1 -6
- package/features/responsive.d.ts +0 -15
- package/features/responsive.d.ts.map +1 -1
- package/features/responsive.js +1 -6
- package/features/row-reorder.d.ts +3 -13
- package/features/row-reorder.d.ts.map +1 -1
- package/features/row-reorder.js +1 -3
- package/features/selection.d.ts.map +1 -1
- package/features/selection.js +26 -28
- package/features/server-side.d.ts +0 -15
- package/features/server-side.d.ts.map +1 -1
- package/features/server-side.js +1 -3
- package/features/sorting.js +1 -1
- package/features/tree.d.ts +0 -15
- package/features/tree.d.ts.map +1 -1
- package/features/tree.js +1 -6
- package/features/undo-redo.d.ts.map +1 -1
- package/features/undo-redo.js +12 -17
- package/features/visibility.d.ts +0 -15
- package/features/visibility.d.ts.map +1 -1
- package/features/visibility.js +1 -6
- package/index.js +2 -2
- package/lib/data-grid.d.ts.map +1 -1
- package/lib/feature-props.d.ts +12 -4
- package/lib/feature-props.d.ts.map +1 -1
- package/lib/feature-registry.d.ts +13 -47
- package/lib/feature-registry.d.ts.map +1 -1
- package/lib/react-column-config.d.ts +33 -3
- package/lib/react-column-config.d.ts.map +1 -1
- package/lib/use-sync-plugins.d.ts +2 -1
- package/lib/use-sync-plugins.d.ts.map +1 -1
- package/package.json +1 -1
- package/chunks/feature-registry-Y3KvnN54.js +0 -26
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorder-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/reorder-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,4CAA4C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@toolbox-web/grid/features/reorder-columns";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=reorder-rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorder-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/reorder-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,yCAAyC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@toolbox-web/grid/features/reorder-rows";
|
package/features/reorder.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Import this module to enable the `reorder` prop on DataGrid.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* import '@toolbox-web/grid-react/features/reorder';
|
|
9
|
-
*
|
|
10
|
-
* <DataGrid reorder />
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @packageDocumentation
|
|
2
|
+
* @deprecated Import from `@toolbox-web/grid-react/features/reorder-columns` instead.
|
|
3
|
+
* This re-export will be removed in v2.0.
|
|
14
4
|
*/
|
|
15
|
-
export {};
|
|
5
|
+
export {} from './reorder-columns';
|
|
16
6
|
//# sourceMappingURL=reorder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/reorder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/reorder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
package/features/reorder.js
CHANGED
package/features/responsive.d.ts
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Responsive feature for @toolbox-web/grid-react
|
|
3
|
-
*
|
|
4
|
-
* Import this module to enable the `responsive` prop on DataGrid.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* import '@toolbox-web/grid-react/features/responsive';
|
|
9
|
-
*
|
|
10
|
-
* <DataGrid responsive={{ breakpoint: 700 }} />
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @packageDocumentation
|
|
14
|
-
*/
|
|
15
|
-
export {};
|
|
16
1
|
//# sourceMappingURL=responsive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/responsive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/responsive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,uCAAuC,CAAC"}
|
package/features/responsive.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r as s } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
-
s("responsive", (e) => {
|
|
4
|
-
const o = typeof e == "boolean" ? {} : e ?? {};
|
|
5
|
-
return new r(o);
|
|
6
|
-
});
|
|
1
|
+
import "@toolbox-web/grid/features/responsive";
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Import this module to enable the `rowReorder` prop on DataGrid.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* import '@toolbox-web/grid-react/features/row-reorder';
|
|
9
|
-
*
|
|
10
|
-
* <DataGrid rowReorder />
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @packageDocumentation
|
|
2
|
+
* @deprecated Import from `@toolbox-web/grid-react/features/reorder-rows` instead.
|
|
3
|
+
* This re-export will be removed in v2.0.
|
|
14
4
|
*/
|
|
15
|
-
export {};
|
|
5
|
+
export {} from './reorder-rows';
|
|
16
6
|
//# sourceMappingURL=row-reorder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row-reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/row-reorder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"row-reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/row-reorder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
package/features/row-reorder.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAAwB,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAKjH,OAAO,sCAAsC,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,OAAO;IAC9C;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B;;;OAGG;IACH,YAAY,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAEtD;;OAEG;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAEzC;;;;;;;;OAQG;IACH,eAAe,EAAE,MAAM,IAAI,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAG,OAAO,KAAK,gBAAgB,CAAC,IAAI,CAAC,CAuEzE"}
|
package/features/selection.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const n = e();
|
|
9
|
-
if (!n) {
|
|
1
|
+
import { useContext as m, useCallback as n } from "react";
|
|
2
|
+
import { G as S } from "../chunks/data-grid-Cpa5kukM.js";
|
|
3
|
+
import "@toolbox-web/grid/features/selection";
|
|
4
|
+
function h() {
|
|
5
|
+
const l = m(S), e = n(() => l?.current?.getPluginByName("selection"), [l]), g = n(() => {
|
|
6
|
+
const t = e();
|
|
7
|
+
if (!t) {
|
|
10
8
|
console.warn(
|
|
11
9
|
`[tbw-grid:selection] SelectionPlugin not found.
|
|
12
10
|
|
|
@@ -15,35 +13,35 @@ function b() {
|
|
|
15
13
|
);
|
|
16
14
|
return;
|
|
17
15
|
}
|
|
18
|
-
const
|
|
16
|
+
const o = l?.current, i = t.config?.mode;
|
|
19
17
|
if (i === "row") {
|
|
20
|
-
const
|
|
21
|
-
for (let
|
|
22
|
-
|
|
18
|
+
const c = o?.rows?.length ?? 0, r = /* @__PURE__ */ new Set();
|
|
19
|
+
for (let s = 0; s < c; s++) r.add(s);
|
|
20
|
+
t.selected = r, t.requestAfterRender?.();
|
|
23
21
|
} else if (i === "range") {
|
|
24
|
-
const
|
|
25
|
-
|
|
22
|
+
const c = o?.rows?.length ?? 0, r = o?._columns?.length ?? 0;
|
|
23
|
+
c > 0 && r > 0 && t.setRanges([{ from: { row: 0, col: 0 }, to: { row: c - 1, col: r - 1 } }]);
|
|
26
24
|
}
|
|
27
|
-
}, [e,
|
|
25
|
+
}, [e, l]), u = n(() => {
|
|
28
26
|
e()?.clearSelection();
|
|
29
|
-
}, [e]),
|
|
30
|
-
(
|
|
27
|
+
}, [e]), d = n(() => e()?.getSelection() ?? null, [e]), a = n(
|
|
28
|
+
(t, o) => e()?.isCellSelected(t, o) ?? !1,
|
|
31
29
|
[e]
|
|
32
|
-
),
|
|
33
|
-
(
|
|
34
|
-
e()?.setRanges(
|
|
30
|
+
), f = n(
|
|
31
|
+
(t) => {
|
|
32
|
+
e()?.setRanges(t);
|
|
35
33
|
},
|
|
36
34
|
[e]
|
|
37
|
-
),
|
|
35
|
+
), w = n(() => e()?.getSelectedRows() ?? [], [e]);
|
|
38
36
|
return {
|
|
39
37
|
selectAll: g,
|
|
40
|
-
clearSelection:
|
|
41
|
-
getSelection:
|
|
42
|
-
isCellSelected:
|
|
43
|
-
setRanges:
|
|
44
|
-
getSelectedRows:
|
|
38
|
+
clearSelection: u,
|
|
39
|
+
getSelection: d,
|
|
40
|
+
isCellSelected: a,
|
|
41
|
+
setRanges: f,
|
|
42
|
+
getSelectedRows: w
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
45
|
export {
|
|
48
|
-
|
|
46
|
+
h as useGridSelection
|
|
49
47
|
};
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Server-side feature for @toolbox-web/grid-react
|
|
3
|
-
*
|
|
4
|
-
* Import this module to enable the `serverSide` prop on DataGrid.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* import '@toolbox-web/grid-react/features/server-side';
|
|
9
|
-
*
|
|
10
|
-
* <DataGrid serverSide={{ dataSource: async (params) => fetchData(params) }} />
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @packageDocumentation
|
|
14
|
-
*/
|
|
15
|
-
export {};
|
|
16
1
|
//# sourceMappingURL=server-side.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/server-side.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"server-side.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/server-side.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,wCAAwC,CAAC"}
|
package/features/server-side.js
CHANGED
package/features/sorting.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import "@toolbox-web/grid/features/multi-sort";
|
package/features/tree.d.ts
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tree Data feature for @toolbox-web/grid-react
|
|
3
|
-
*
|
|
4
|
-
* Import this module to enable the `tree` prop on DataGrid.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* import '@toolbox-web/grid-react/features/tree';
|
|
9
|
-
*
|
|
10
|
-
* <DataGrid tree={{ childrenField: 'children' }} />
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @packageDocumentation
|
|
14
|
-
*/
|
|
15
|
-
export {};
|
|
16
1
|
//# sourceMappingURL=tree.d.ts.map
|
package/features/tree.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,iCAAiC,CAAC"}
|
package/features/tree.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r as t } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
-
t("tree", (e) => {
|
|
4
|
-
const r = typeof e == "boolean" ? {} : e ?? {};
|
|
5
|
-
return new o(r);
|
|
6
|
-
});
|
|
1
|
+
import "@toolbox-web/grid/features/tree";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"undo-redo.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/undo-redo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"undo-redo.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/undo-redo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAK/F,OAAO,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,IAAI,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IAElC;;;OAGG;IACH,IAAI,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IAEvB;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IAEvB;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IAEzB;;OAEG;IACH,YAAY,EAAE,MAAM,cAAc,EAAE,CAAC;IAErC;;OAEG;IACH,YAAY,EAAE,MAAM,cAAc,EAAE,CAAC;IAErC;;;OAGG;IACH,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5F;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAE7B;;;;;OAKG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,IAAI,eAAe,CA6GjD"}
|
package/features/undo-redo.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const n = typeof e == "boolean" ? {} : e ?? {};
|
|
7
|
-
return new U(n);
|
|
8
|
-
});
|
|
9
|
-
function y() {
|
|
10
|
-
const e = k(m), n = d(() => e?.current?.getPluginByName("undoRedo"), [e]), r = d(() => {
|
|
1
|
+
import { useContext as U, useCallback as d } from "react";
|
|
2
|
+
import { G as p } from "../chunks/data-grid-Cpa5kukM.js";
|
|
3
|
+
import "@toolbox-web/grid/features/undo-redo";
|
|
4
|
+
function m() {
|
|
5
|
+
const e = U(p), n = d(() => e?.current?.getPluginByName("undoRedo"), [e]), r = d(() => {
|
|
11
6
|
const o = n();
|
|
12
7
|
return o ? o.undo() : (console.warn(
|
|
13
8
|
`[tbw-grid:undoRedo] UndoRedoPlugin not found.
|
|
@@ -23,7 +18,7 @@ function y() {
|
|
|
23
18
|
→ Enable undo/redo on the grid:
|
|
24
19
|
<DataGrid editing="dblclick" undoRedo />`
|
|
25
20
|
), null);
|
|
26
|
-
}, [n]), u = d(() => n()?.canUndo() ?? !1, [n]), c = d(() => n()?.canRedo() ?? !1, [n]),
|
|
21
|
+
}, [n]), u = d(() => n()?.canUndo() ?? !1, [n]), c = d(() => n()?.canRedo() ?? !1, [n]), l = d(() => {
|
|
27
22
|
const o = n();
|
|
28
23
|
if (!o) {
|
|
29
24
|
console.warn(
|
|
@@ -35,8 +30,8 @@ function y() {
|
|
|
35
30
|
return;
|
|
36
31
|
}
|
|
37
32
|
o.clearHistory();
|
|
38
|
-
}, [n]),
|
|
39
|
-
(o, f,
|
|
33
|
+
}, [n]), a = d(() => n()?.getUndoStack() ?? [], [n]), g = d(() => n()?.getRedoStack() ?? [], [n]), s = d(
|
|
34
|
+
(o, f, w, k) => {
|
|
40
35
|
const t = n();
|
|
41
36
|
if (!t) {
|
|
42
37
|
console.warn(
|
|
@@ -47,7 +42,7 @@ function y() {
|
|
|
47
42
|
);
|
|
48
43
|
return;
|
|
49
44
|
}
|
|
50
|
-
t.recordEdit(o, f,
|
|
45
|
+
t.recordEdit(o, f, w, k);
|
|
51
46
|
},
|
|
52
47
|
[n]
|
|
53
48
|
), R = d(() => {
|
|
@@ -80,8 +75,8 @@ function y() {
|
|
|
80
75
|
redo: i,
|
|
81
76
|
canUndo: u,
|
|
82
77
|
canRedo: c,
|
|
83
|
-
clearHistory:
|
|
84
|
-
getUndoStack:
|
|
78
|
+
clearHistory: l,
|
|
79
|
+
getUndoStack: a,
|
|
85
80
|
getRedoStack: g,
|
|
86
81
|
recordEdit: s,
|
|
87
82
|
beginTransaction: R,
|
|
@@ -89,5 +84,5 @@ function y() {
|
|
|
89
84
|
};
|
|
90
85
|
}
|
|
91
86
|
export {
|
|
92
|
-
|
|
87
|
+
m as useGridUndoRedo
|
|
93
88
|
};
|
package/features/visibility.d.ts
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Column Visibility feature for @toolbox-web/grid-react
|
|
3
|
-
*
|
|
4
|
-
* Import this module to enable the `visibility` prop on DataGrid.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* import '@toolbox-web/grid-react/features/visibility';
|
|
9
|
-
*
|
|
10
|
-
* <DataGrid visibility />
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @packageDocumentation
|
|
14
|
-
*/
|
|
15
|
-
export {};
|
|
16
1
|
//# sourceMappingURL=visibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/visibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/visibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,uCAAuC,CAAC"}
|
package/features/visibility.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r as o } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
-
o("visibility", (i) => {
|
|
4
|
-
const r = typeof i == "boolean" ? {} : i ?? {};
|
|
5
|
-
return new t(r);
|
|
6
|
-
});
|
|
1
|
+
import "@toolbox-web/grid/features/visibility";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as T, a as B, b as k, c as A } from "./chunks/data-grid-
|
|
2
|
-
import { D as H, i as U, d as $, e as K, f as M, R as O, h as Q, u as X, g as Y } from "./chunks/data-grid-
|
|
1
|
+
import { r as T, a as B, b as k, c as A } from "./chunks/data-grid-Cpa5kukM.js";
|
|
2
|
+
import { D as H, i as U, d as $, e as K, f as M, R as O, h as Q, u as X, g as Y } from "./chunks/data-grid-Cpa5kukM.js";
|
|
3
3
|
import { jsx as w, Fragment as I } from "react/jsx-runtime";
|
|
4
4
|
import { useRef as R, useCallback as i, useState as P, useEffect as S } from "react";
|
|
5
5
|
function J(n) {
|
package/lib/data-grid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-grid.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/data-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAUL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,KAAK,eAAe,EAAqB,MAAM,iBAAiB,CAAC;AAK1E,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAiC9F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,wEAA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AgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,2CAA2C;IAC3C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,4CAA4C;IAC5C,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,yCAAyC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACzC,0CAA0C;IAC1C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACzD,uDAAuD;IACvD,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AACH,eAAO,MAAM,QAAQ,EAwcf,CAAC,IAAI,GAAG,OAAO,EAAE,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAA;CAAE,KAAK,KAAK,CAAC,YAAY,CAAC"}
|
package/lib/feature-props.d.ts
CHANGED
|
@@ -123,13 +123,17 @@ export interface FeatureProps<TRow = unknown> {
|
|
|
123
123
|
/**
|
|
124
124
|
* Enable column drag-to-reorder.
|
|
125
125
|
*
|
|
126
|
-
* @requires `import '@toolbox-web/grid-react/features/reorder';`
|
|
126
|
+
* @requires `import '@toolbox-web/grid-react/features/reorder-columns';`
|
|
127
127
|
*
|
|
128
128
|
* @example
|
|
129
129
|
* ```tsx
|
|
130
|
-
* <DataGrid
|
|
130
|
+
* <DataGrid reorderColumns />
|
|
131
131
|
* ```
|
|
132
132
|
*/
|
|
133
|
+
reorderColumns?: boolean | ReorderConfig;
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated Use `reorderColumns` instead. Will be removed in v2.0.
|
|
136
|
+
*/
|
|
133
137
|
reorder?: boolean | ReorderConfig;
|
|
134
138
|
/**
|
|
135
139
|
* Enable column visibility toggle panel.
|
|
@@ -187,13 +191,17 @@ export interface FeatureProps<TRow = unknown> {
|
|
|
187
191
|
/**
|
|
188
192
|
* Enable row drag-to-reorder.
|
|
189
193
|
*
|
|
190
|
-
* @requires `import '@toolbox-web/grid-react/features/
|
|
194
|
+
* @requires `import '@toolbox-web/grid-react/features/reorder-rows';`
|
|
191
195
|
*
|
|
192
196
|
* @example
|
|
193
197
|
* ```tsx
|
|
194
|
-
* <DataGrid
|
|
198
|
+
* <DataGrid reorderRows />
|
|
195
199
|
* ```
|
|
196
200
|
*/
|
|
201
|
+
reorderRows?: boolean | RowReorderConfig;
|
|
202
|
+
/**
|
|
203
|
+
* @deprecated Use `reorderRows` instead. Will be removed in v2.0.
|
|
204
|
+
*/
|
|
197
205
|
rowReorder?: boolean | RowReorderConfig;
|
|
198
206
|
/**
|
|
199
207
|
* Enable row grouping by field values.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-props.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAi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;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC;IAMpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;IAEhC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAM9B;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,IAAI,GAAG,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC"}
|
|
@@ -1,56 +1,22 @@
|
|
|
1
1
|
import { FeatureProps } from './feature-props';
|
|
2
2
|
/**
|
|
3
|
-
* Feature
|
|
4
|
-
*/
|
|
5
|
-
export type FeatureName = keyof FeatureProps;
|
|
6
|
-
/**
|
|
7
|
-
* Plugin factory function type.
|
|
8
|
-
* Takes configuration and returns a plugin instance.
|
|
9
|
-
*/
|
|
10
|
-
export type PluginFactory<TConfig = unknown> = (config: TConfig) => unknown;
|
|
11
|
-
/**
|
|
12
|
-
* Register a feature's plugin factory.
|
|
13
|
-
* Called by side-effect feature imports.
|
|
3
|
+
* Feature Registry for @toolbox-web/grid-react
|
|
14
4
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
5
|
+
* Delegates to the core registry at `@toolbox-web/grid/features/registry`.
|
|
6
|
+
* This module re-exports core functions so existing feature modules continue
|
|
7
|
+
* to work without changing their import paths.
|
|
17
8
|
*
|
|
18
9
|
* @example
|
|
19
|
-
* ```
|
|
20
|
-
* // features
|
|
21
|
-
* import
|
|
22
|
-
* import
|
|
10
|
+
* ```tsx
|
|
11
|
+
* // Import features you need (side-effect imports)
|
|
12
|
+
* import '@toolbox-web/grid-react/features/selection';
|
|
13
|
+
* import '@toolbox-web/grid-react/features/filtering';
|
|
23
14
|
*
|
|
24
|
-
*
|
|
15
|
+
* // Props work automatically - no async loading, no HTTP requests
|
|
16
|
+
* <DataGrid selection="range" filtering={{ debounceMs: 200 }} />
|
|
25
17
|
* ```
|
|
26
18
|
*/
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*/
|
|
31
|
-
export declare function isFeatureRegistered(name: FeatureName): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Get a registered feature's factory.
|
|
34
|
-
* Returns undefined if not registered.
|
|
35
|
-
*/
|
|
36
|
-
export declare function getFeatureFactory(name: FeatureName): PluginFactory | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* Get all registered feature names.
|
|
39
|
-
* Useful for debugging.
|
|
40
|
-
*/
|
|
41
|
-
export declare function getRegisteredFeatures(): FeatureName[];
|
|
42
|
-
/**
|
|
43
|
-
* Create a plugin instance for a feature.
|
|
44
|
-
* Shows a helpful warning if the feature is not registered.
|
|
45
|
-
*
|
|
46
|
-
* @param name - Feature name
|
|
47
|
-
* @param config - Plugin configuration
|
|
48
|
-
* @returns Plugin instance or undefined if not registered
|
|
49
|
-
*/
|
|
50
|
-
export declare function createPluginFromFeature<TConfig = unknown>(name: FeatureName, config: TConfig): unknown | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* Clear the registry. For testing only.
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
export declare function clearFeatureRegistry(): void;
|
|
19
|
+
export { clearFeatureRegistry, createPluginFromFeature, getFeatureFactory, getRegisteredFeatures, isFeatureRegistered, registerFeature } from '@toolbox-web/grid/features/registry';
|
|
20
|
+
export type { PluginFactory } from '@toolbox-web/grid/features/registry';
|
|
21
|
+
export type FeatureName = keyof FeatureProps;
|
|
56
22
|
//# sourceMappingURL=feature-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"feature-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,oBAAoB,EAAE,uBAAuB,EAAE,iBAAiB,EAChE,qBAAqB,EAAE,mBAAmB,EAAE,eAAe,EAC5D,MAAM,qCAAqC,CAAC;AAE7C,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,MAAM,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnConfig as BaseColumnConfig, GridConfig as BaseGridConfig, CellRenderContext, ColumnEditorContext } from '@toolbox-web/grid';
|
|
1
|
+
import { ColumnConfig as BaseColumnConfig, GridConfig as BaseGridConfig, CellRenderContext, ColumnEditorContext, HeaderCellContext, HeaderLabelContext, LoadingContext } from '@toolbox-web/grid';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Column configuration for React applications.
|
|
@@ -27,7 +27,7 @@ import { ReactNode } from 'react';
|
|
|
27
27
|
* ];
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
export interface ColumnConfig<TRow = unknown> extends Omit<BaseColumnConfig<TRow>, 'renderer' | 'viewRenderer' | 'editor'> {
|
|
30
|
+
export interface ColumnConfig<TRow = unknown> extends Omit<BaseColumnConfig<TRow>, 'renderer' | 'viewRenderer' | 'editor' | 'headerRenderer' | 'headerLabelRenderer'> {
|
|
31
31
|
/**
|
|
32
32
|
* React component renderer for cell display.
|
|
33
33
|
* Receives cell context and returns a React node (JSX).
|
|
@@ -42,6 +42,16 @@ export interface ColumnConfig<TRow = unknown> extends Omit<BaseColumnConfig<TRow
|
|
|
42
42
|
* Same property name as vanilla JS, but accepts React components.
|
|
43
43
|
*/
|
|
44
44
|
editor?: (ctx: ColumnEditorContext<TRow>) => ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* React component header renderer for full header cell control.
|
|
47
|
+
* Receives header cell context and returns a React node (JSX).
|
|
48
|
+
*/
|
|
49
|
+
headerRenderer?: (ctx: HeaderCellContext<TRow>) => ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* React component header label renderer for customizing just the label portion.
|
|
52
|
+
* Receives header label context and returns a React node (JSX).
|
|
53
|
+
*/
|
|
54
|
+
headerLabelRenderer?: (ctx: HeaderLabelContext<TRow>) => ReactNode;
|
|
45
55
|
}
|
|
46
56
|
/**
|
|
47
57
|
* @deprecated Use `ColumnConfig` instead.
|
|
@@ -68,8 +78,12 @@ export type ReactColumnConfig<TRow = unknown> = ColumnConfig<TRow>;
|
|
|
68
78
|
* };
|
|
69
79
|
* ```
|
|
70
80
|
*/
|
|
71
|
-
export type GridConfig<TRow = unknown> = Omit<BaseGridConfig<TRow>, 'columns'> & {
|
|
81
|
+
export type GridConfig<TRow = unknown> = Omit<BaseGridConfig<TRow>, 'columns' | 'loadingRenderer'> & {
|
|
72
82
|
columns?: ColumnConfig<TRow>[];
|
|
83
|
+
/**
|
|
84
|
+
* Custom loading renderer - can be a vanilla DOM function or a React render function returning JSX.
|
|
85
|
+
*/
|
|
86
|
+
loadingRenderer?: BaseGridConfig<TRow>['loadingRenderer'] | ((ctx: LoadingContext) => ReactNode);
|
|
73
87
|
};
|
|
74
88
|
/**
|
|
75
89
|
* @deprecated Use `GridConfig` instead.
|
|
@@ -97,6 +111,22 @@ export declare function wrapReactRenderer<TRow>(renderFn: (ctx: CellRenderContex
|
|
|
97
111
|
* Used internally by DataGrid to process reactEditor properties.
|
|
98
112
|
*/
|
|
99
113
|
export declare function wrapReactEditor<TRow>(editorFn: (ctx: ColumnEditorContext<TRow>) => ReactNode): (ctx: ColumnEditorContext<TRow>) => HTMLElement;
|
|
114
|
+
/**
|
|
115
|
+
* Wraps a React header renderer function into a DOM-returning function.
|
|
116
|
+
* Used internally by DataGrid to process headerRenderer properties.
|
|
117
|
+
*/
|
|
118
|
+
export declare function wrapReactHeaderRenderer<TRow>(renderFn: (ctx: HeaderCellContext<TRow>) => ReactNode): (ctx: HeaderCellContext<TRow>) => HTMLElement;
|
|
119
|
+
/**
|
|
120
|
+
* Wraps a React header label renderer function into a DOM-returning function.
|
|
121
|
+
* Used internally by DataGrid to process headerLabelRenderer properties.
|
|
122
|
+
*/
|
|
123
|
+
export declare function wrapReactHeaderLabelRenderer<TRow>(renderFn: (ctx: HeaderLabelContext<TRow>) => ReactNode): (ctx: HeaderLabelContext<TRow>) => HTMLElement;
|
|
124
|
+
/**
|
|
125
|
+
* Wraps a React loading renderer function into a DOM-returning function.
|
|
126
|
+
* Used internally by processGridConfig to process loadingRenderer properties.
|
|
127
|
+
* Skips wrapping if the function already returns an HTMLElement or string (vanilla DOM renderer).
|
|
128
|
+
*/
|
|
129
|
+
export declare function wrapReactLoadingRenderer(renderFn: (ctx: LoadingContext) => ReactNode): (ctx: LoadingContext) => HTMLElement | string;
|
|
100
130
|
/**
|
|
101
131
|
* Processes a GridConfig, converting React renderer/editor functions
|
|
102
132
|
* to DOM-returning functions that the grid core understands.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-column-config.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-column-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,iBAAiB,EACjB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"react-column-config.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-column-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB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AU,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,SAAS,CA6C9G;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,0BAAoB,CAAC"}
|
|
@@ -7,7 +7,8 @@ import { FeatureName } from './feature-registry';
|
|
|
7
7
|
export declare function validateFeatureDependencies(featureNames: FeatureName[]): void;
|
|
8
8
|
/**
|
|
9
9
|
* Creates plugin instances synchronously from feature props.
|
|
10
|
-
*
|
|
10
|
+
* Delegates to core registry's `createPluginsFromFeatures` for alias resolution,
|
|
11
|
+
* dependency ordering, and plugin instantiation.
|
|
11
12
|
*
|
|
12
13
|
* @param featureProps - The feature props from DataGrid
|
|
13
14
|
* @returns Array of plugin instances
|