@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
package/features/clipboard.d.ts
CHANGED
|
@@ -1,18 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,sCAAsC,CAAC"}
|
package/features/clipboard.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r as t } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
-
t("clipboard", (r) => {
|
|
4
|
-
const o = typeof r == "boolean" ? {} : r ?? {};
|
|
5
|
-
return new e(o);
|
|
6
|
-
});
|
|
1
|
+
import "@toolbox-web/grid/features/clipboard";
|
|
@@ -1,16 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=column-virtualization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-virtualization.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/column-virtualization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"column-virtualization.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/column-virtualization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,kDAAkD,CAAC"}
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
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
|
-
});
|
|
1
|
+
import "@toolbox-web/grid/features/column-virtualization";
|
|
@@ -1,16 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/context-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/context-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,yCAAyC,CAAC"}
|
package/features/context-menu.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
-
r("contextMenu", (e) => {
|
|
4
|
-
const t = typeof e == "boolean" ? {} : e ?? {};
|
|
5
|
-
return new o(t);
|
|
6
|
-
});
|
|
1
|
+
import "@toolbox-web/grid/features/context-menu";
|
package/features/editing.d.ts
CHANGED
|
@@ -1,16 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=editing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/editing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/editing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,oCAAoC,CAAC"}
|
package/features/editing.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import
|
|
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));
|
|
1
|
+
import "@toolbox-web/grid/features/editing";
|
package/features/export.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAK3G,OAAO,mCAAmC,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAEzE;;;;OAIG;IACH,aAAa,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAE3E;;;;OAIG;IACH,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAE1E;;OAEG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC;IAE3B;;OAEG;IACH,aAAa,EAAE,MAAM;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CACvE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,IAAI,aAAa,CAuE7C"}
|
package/features/export.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const t = typeof i == "boolean" ? {} : i ?? {};
|
|
7
|
-
return new g(t);
|
|
8
|
-
});
|
|
9
|
-
function w() {
|
|
10
|
-
const i = a(c), t = n(() => i?.current?.getPluginByName("export"), [i]), p = n(
|
|
1
|
+
import { useContext as g, useCallback as n } from "react";
|
|
2
|
+
import { G as c } from "../chunks/data-grid-Cpa5kukM.js";
|
|
3
|
+
import "@toolbox-web/grid/features/export";
|
|
4
|
+
function E() {
|
|
5
|
+
const i = g(c), t = n(() => i?.current?.getPluginByName("export"), [i]), x = n(
|
|
11
6
|
(r, o) => {
|
|
12
7
|
const e = t();
|
|
13
8
|
if (!e) {
|
|
@@ -22,7 +17,7 @@ function w() {
|
|
|
22
17
|
e.exportCsv({ ...o, fileName: r ?? o?.fileName ?? "export.csv" });
|
|
23
18
|
},
|
|
24
19
|
[t]
|
|
25
|
-
),
|
|
20
|
+
), p = n(
|
|
26
21
|
(r, o) => {
|
|
27
22
|
const e = t();
|
|
28
23
|
if (!e) {
|
|
@@ -54,13 +49,13 @@ function w() {
|
|
|
54
49
|
[t]
|
|
55
50
|
), s = n(() => t()?.isExporting() ?? !1, [t]), u = n(() => t()?.getLastExport() ?? null, [t]);
|
|
56
51
|
return {
|
|
57
|
-
exportToCsv:
|
|
58
|
-
exportToExcel:
|
|
52
|
+
exportToCsv: x,
|
|
53
|
+
exportToExcel: p,
|
|
59
54
|
exportToJson: l,
|
|
60
55
|
isExporting: s,
|
|
61
56
|
getLastExport: u
|
|
62
57
|
};
|
|
63
58
|
}
|
|
64
59
|
export {
|
|
65
|
-
|
|
60
|
+
E as useGridExport
|
|
66
61
|
};
|
package/features/filtering.js
CHANGED
|
@@ -2,12 +2,12 @@ import { FilteringPlugin as c } from "@toolbox-web/grid/plugins/filtering";
|
|
|
2
2
|
import { useContext as m, useCallback as n } from "react";
|
|
3
3
|
import { flushSync as w } from "react-dom";
|
|
4
4
|
import { createRoot as P } from "react-dom/client";
|
|
5
|
-
import { G as b } from "../chunks/data-grid-
|
|
6
|
-
import {
|
|
7
|
-
R("filtering", (
|
|
8
|
-
if (typeof
|
|
9
|
-
if (!
|
|
10
|
-
const e =
|
|
5
|
+
import { G as b } from "../chunks/data-grid-Cpa5kukM.js";
|
|
6
|
+
import { registerFeature as R } from "@toolbox-web/grid/features/registry";
|
|
7
|
+
R("filtering", (r) => {
|
|
8
|
+
if (typeof r == "boolean") return new c();
|
|
9
|
+
if (!r) return new c();
|
|
10
|
+
const e = r, o = { ...e };
|
|
11
11
|
if (typeof e.filterPanelRenderer == "function" && e.filterPanelRenderer.length <= 1) {
|
|
12
12
|
const g = e.filterPanelRenderer;
|
|
13
13
|
o.filterPanelRenderer = (s, d) => {
|
|
@@ -22,8 +22,8 @@ R("filtering", (i) => {
|
|
|
22
22
|
return new c(o);
|
|
23
23
|
});
|
|
24
24
|
function x() {
|
|
25
|
-
const
|
|
26
|
-
(t,
|
|
25
|
+
const r = m(b), e = n(() => r?.current?.getPluginByName("filtering"), [r]), o = n(
|
|
26
|
+
(t, i) => {
|
|
27
27
|
const u = e();
|
|
28
28
|
if (!u) {
|
|
29
29
|
console.warn(
|
|
@@ -34,13 +34,13 @@ function x() {
|
|
|
34
34
|
);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
u.setFilter(t,
|
|
37
|
+
u.setFilter(t, i);
|
|
38
38
|
},
|
|
39
39
|
[e]
|
|
40
40
|
), g = n((t) => e()?.getFilter(t), [e]), s = n(() => e()?.getFilters() ?? [], [e]), d = n(
|
|
41
41
|
(t) => {
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
42
|
+
const i = e();
|
|
43
|
+
if (!i) {
|
|
44
44
|
console.warn(
|
|
45
45
|
`[tbw-grid:filtering] FilteringPlugin not found.
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ function x() {
|
|
|
49
49
|
);
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
i.setFilterModel(t);
|
|
53
53
|
},
|
|
54
54
|
[e]
|
|
55
55
|
), l = n(() => {
|
|
@@ -66,8 +66,8 @@ function x() {
|
|
|
66
66
|
t.clearAllFilters();
|
|
67
67
|
}, [e]), f = n(
|
|
68
68
|
(t) => {
|
|
69
|
-
const
|
|
70
|
-
if (!
|
|
69
|
+
const i = e();
|
|
70
|
+
if (!i) {
|
|
71
71
|
console.warn(
|
|
72
72
|
`[tbw-grid:filtering] FilteringPlugin not found.
|
|
73
73
|
|
|
@@ -76,7 +76,7 @@ function x() {
|
|
|
76
76
|
);
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
i.clearFieldFilter(t);
|
|
80
80
|
},
|
|
81
81
|
[e]
|
|
82
82
|
), a = n((t) => e()?.isFieldFiltered(t) ?? !1, [e]), F = n(() => e()?.getFilteredRowCount() ?? 0, [e]), p = n((t) => e()?.getUniqueValues(t) ?? [], [e]);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Column Grouping feature for @toolbox-web/grid-react
|
|
3
3
|
*
|
|
4
4
|
* Import this module to enable the `groupingColumns` prop on DataGrid.
|
|
5
|
+
* Automatically bridges React JSX `groupHeaderRenderer` to vanilla DOM.
|
|
5
6
|
*
|
|
6
7
|
* @example
|
|
7
8
|
* ```tsx
|
|
@@ -10,6 +11,14 @@
|
|
|
10
11
|
* <DataGrid groupingColumns />
|
|
11
12
|
* ```
|
|
12
13
|
*
|
|
14
|
+
* @example Custom group header renderer
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <DataGrid groupingColumns={{
|
|
17
|
+
* columnGroups: [...],
|
|
18
|
+
* groupHeaderRenderer: (params) => <strong>{params.label} ({params.columns.length})</strong>,
|
|
19
|
+
* }} />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
13
22
|
* @packageDocumentation
|
|
14
23
|
*/
|
|
15
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grouping-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/grouping-columns.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"grouping-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/grouping-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG"}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { GroupingColumnsPlugin as n } from "@toolbox-web/grid/plugins/grouping-columns";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { flushSync as c } from "react-dom";
|
|
3
|
+
import { createRoot as s } from "react-dom/client";
|
|
4
|
+
import { registerFeature as m } from "@toolbox-web/grid/features/registry";
|
|
5
|
+
m("groupingColumns", (e) => {
|
|
6
|
+
if (typeof e == "boolean") return new n();
|
|
7
|
+
if (!e) return new n();
|
|
8
|
+
const r = e, t = { ...r };
|
|
9
|
+
if (typeof r.groupHeaderRenderer == "function") {
|
|
10
|
+
const u = r.groupHeaderRenderer;
|
|
11
|
+
t.groupHeaderRenderer = (p) => {
|
|
12
|
+
const o = document.createElement("div");
|
|
13
|
+
o.style.display = "contents";
|
|
14
|
+
const i = s(o);
|
|
15
|
+
return c(() => {
|
|
16
|
+
i.render(u(p));
|
|
17
|
+
}), o;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return new n(t);
|
|
6
21
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Row Grouping feature for @toolbox-web/grid-react
|
|
3
3
|
*
|
|
4
4
|
* Import this module to enable the `groupingRows` prop on DataGrid.
|
|
5
|
+
* Automatically bridges React JSX `groupRowRenderer` to vanilla DOM.
|
|
5
6
|
*
|
|
6
7
|
* @example
|
|
7
8
|
* ```tsx
|
|
@@ -10,6 +11,14 @@
|
|
|
10
11
|
* <DataGrid groupingRows={{ groupBy: ['department'] }} />
|
|
11
12
|
* ```
|
|
12
13
|
*
|
|
14
|
+
* @example Custom group row renderer
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <DataGrid groupingRows={{
|
|
17
|
+
* groupBy: ['department'],
|
|
18
|
+
* groupRowRenderer: (params) => <strong>{params.key}: {params.value} ({params.rows.length})</strong>,
|
|
19
|
+
* }} />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
13
22
|
* @packageDocumentation
|
|
14
23
|
*/
|
|
15
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grouping-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/grouping-rows.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"grouping-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/grouping-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG"}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import { GroupingRowsPlugin as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { GroupingRowsPlugin as t } from "@toolbox-web/grid/plugins/grouping-rows";
|
|
2
|
+
import { flushSync as c } from "react-dom";
|
|
3
|
+
import { createRoot as s } from "react-dom/client";
|
|
4
|
+
import { registerFeature as f } from "@toolbox-web/grid/features/registry";
|
|
5
|
+
f("groupingRows", (e) => {
|
|
6
|
+
if (typeof e == "boolean") return new t();
|
|
7
|
+
if (!e) return new t();
|
|
8
|
+
const r = e, n = { ...r };
|
|
9
|
+
if (typeof r.groupRowRenderer == "function") {
|
|
10
|
+
const p = r.groupRowRenderer;
|
|
11
|
+
n.groupRowRenderer = (i) => {
|
|
12
|
+
const o = document.createElement("div");
|
|
13
|
+
o.style.display = "contents";
|
|
14
|
+
const u = s(o);
|
|
15
|
+
return c(() => {
|
|
16
|
+
u.render(p(i));
|
|
17
|
+
}), o;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return new t(n);
|
|
6
21
|
});
|
package/features/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
1
|
+
import "@toolbox-web/grid/features/clipboard";
|
|
2
|
+
import "@toolbox-web/grid/features/column-virtualization";
|
|
3
|
+
import "@toolbox-web/grid/features/context-menu";
|
|
4
|
+
import "@toolbox-web/grid/features/editing";
|
|
5
|
+
import "react";
|
|
6
|
+
import "../chunks/data-grid-Cpa5kukM.js";
|
|
7
|
+
import "@toolbox-web/grid/features/export";
|
|
6
8
|
import "./filtering.js";
|
|
7
9
|
import "./grouping-columns.js";
|
|
8
10
|
import "./grouping-rows.js";
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
11
|
+
import "@toolbox-web/grid/features/master-detail";
|
|
12
|
+
import "@toolbox-web/grid/features/multi-sort";
|
|
13
|
+
import "@toolbox-web/grid/features/pinned-columns";
|
|
12
14
|
import "./pinned-rows.js";
|
|
13
|
-
import "
|
|
14
|
-
import "
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
18
|
-
import "
|
|
19
|
-
import "
|
|
20
|
-
import "
|
|
21
|
-
import "./undo-redo.js";
|
|
22
|
-
import "./visibility.js";
|
|
15
|
+
import "@toolbox-web/grid/features/pivot";
|
|
16
|
+
import "@toolbox-web/grid/features/print";
|
|
17
|
+
import "@toolbox-web/grid/features/responsive";
|
|
18
|
+
import "@toolbox-web/grid/features/selection";
|
|
19
|
+
import "@toolbox-web/grid/features/server-side";
|
|
20
|
+
import "@toolbox-web/grid/features/tree";
|
|
21
|
+
import "@toolbox-web/grid/features/undo-redo";
|
|
22
|
+
import "@toolbox-web/grid/features/visibility";
|
|
@@ -1,18 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=master-detail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/master-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
1
|
+
{"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/master-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,0CAA0C,CAAC"}
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r as o } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
-
o("masterDetail", (e) => {
|
|
4
|
-
const r = typeof e == "boolean" ? {} : e ?? {};
|
|
5
|
-
return new t(r);
|
|
6
|
-
});
|
|
1
|
+
import "@toolbox-web/grid/features/master-detail";
|
package/features/multi-sort.d.ts
CHANGED
|
@@ -1,22 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=multi-sort.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-sort.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/multi-sort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
|
|
1
|
+
{"version":3,"file":"multi-sort.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/multi-sort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,uCAAuC,CAAC"}
|
package/features/multi-sort.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r as e } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
-
e("multiSort", (r) => r === !0 || r === "multi" ? new t() : r === "single" ? new t({ maxSortColumns: 1 }) : new t(r));
|
|
1
|
+
import "@toolbox-web/grid/features/multi-sort";
|
|
@@ -1,16 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=pinned-columns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pinned-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/pinned-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"pinned-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/pinned-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,2CAA2C,CAAC"}
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
3
|
-
r("pinnedColumns", (n) => {
|
|
4
|
-
const o = typeof n == "boolean" ? {} : n ?? {};
|
|
5
|
-
return new e(o);
|
|
6
|
-
});
|
|
1
|
+
import "@toolbox-web/grid/features/pinned-columns";
|
|
@@ -1,16 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=pinned-rows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pinned-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/pinned-rows.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pinned-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/pinned-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,wCAAwC,CAAC"}
|
package/features/pinned-rows.js
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import "@toolbox-web/grid/features/pinned-rows";
|
|
2
|
+
import { PinnedRowsPlugin as o } from "@toolbox-web/grid/plugins/pinned-rows";
|
|
3
|
+
import { flushSync as u } from "react-dom";
|
|
4
|
+
import { createRoot as f } from "react-dom/client";
|
|
5
|
+
import { registerFeature as p } from "@toolbox-web/grid/features/registry";
|
|
6
|
+
p("pinnedRows", (e) => {
|
|
7
|
+
if (typeof e == "boolean") return new o();
|
|
8
|
+
if (!e) return new o();
|
|
9
|
+
const t = e, s = { ...t };
|
|
10
|
+
return Array.isArray(t.customPanels) && (s.customPanels = t.customPanels.map((r) => {
|
|
11
|
+
if (typeof r.render != "function") return r;
|
|
12
|
+
const i = r.render;
|
|
13
|
+
return {
|
|
14
|
+
...r,
|
|
15
|
+
render: (c) => {
|
|
16
|
+
const n = document.createElement("div");
|
|
17
|
+
n.style.display = "contents";
|
|
18
|
+
const m = f(n);
|
|
19
|
+
return u(() => {
|
|
20
|
+
m.render(i(c));
|
|
21
|
+
}), n;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
})), new o(s);
|
|
6
25
|
});
|
package/features/pivot.d.ts
CHANGED
|
@@ -1,16 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=pivot.d.ts.map
|
package/features/pivot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pivot.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/pivot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
1
|
+
{"version":3,"file":"pivot.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/pivot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,kCAAkC,CAAC"}
|
package/features/pivot.js
CHANGED
package/features/print.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/print.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/print.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAKrF,OAAO,kCAAkC,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;OAEG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,YAAY,IAAI,YAAY,CAyB3C"}
|
package/features/print.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function f() {
|
|
7
|
-
const r = a(g), t = n(() => r?.current?.getPluginByName("print"), [r]), u = n(
|
|
1
|
+
import { useContext as g, useCallback as t } from "react";
|
|
2
|
+
import { G as u } from "../chunks/data-grid-Cpa5kukM.js";
|
|
3
|
+
import "@toolbox-web/grid/features/print";
|
|
4
|
+
function l() {
|
|
5
|
+
const r = g(u), n = t(() => r?.current?.getPluginByName("print"), [r]), o = t(
|
|
8
6
|
async (i) => {
|
|
9
|
-
const e =
|
|
7
|
+
const e = n();
|
|
10
8
|
if (!e) {
|
|
11
9
|
console.warn(
|
|
12
10
|
`[tbw-grid:print] PrintPlugin not found.
|
|
@@ -18,10 +16,10 @@ function f() {
|
|
|
18
16
|
}
|
|
19
17
|
await e.print(i);
|
|
20
18
|
},
|
|
21
|
-
[
|
|
22
|
-
), s =
|
|
23
|
-
return { print:
|
|
19
|
+
[n]
|
|
20
|
+
), s = t(() => n()?.isPrinting() ?? !1, [n]);
|
|
21
|
+
return { print: o, isPrinting: s };
|
|
24
22
|
}
|
|
25
23
|
export {
|
|
26
|
-
|
|
24
|
+
l as useGridPrint
|
|
27
25
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=reorder-columns.d.ts.map
|