@toolbox-web/grid-react 1.9.0 → 2.0.0-beta
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 +0 -2
- package/chunks/{react-grid-adapter-LBf2Mqhn.js → react-grid-adapter-C9gIJ33-.js} +2 -4
- package/features/filtering.js +1 -1
- package/features/index.d.ts.map +1 -1
- package/features/index.js +0 -1
- package/features/master-detail.js +1 -1
- package/features/pinned-rows.d.ts.map +1 -1
- package/features/pinned-rows.js +12 -20
- package/features/responsive.js +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +310 -312
- package/lib/data-grid.d.ts +8 -2
- package/lib/data-grid.d.ts.map +1 -1
- package/lib/feature-props.d.ts +5 -50
- package/lib/feature-props.d.ts.map +1 -1
- package/lib/grid-column.d.ts +2 -0
- package/lib/grid-column.d.ts.map +1 -1
- package/lib/grid-header-content.d.ts +1 -1
- package/lib/grid-header-content.d.ts.map +1 -1
- package/lib/grid-toolbar-content.d.ts +1 -1
- package/lib/grid-toolbar-content.d.ts.map +1 -1
- package/lib/internal/feature-augmentations.d.ts +0 -1
- package/lib/internal/feature-augmentations.d.ts.map +1 -1
- package/package.json +2 -2
- package/features/reorder-rows.d.ts +0 -2
- package/features/reorder-rows.d.ts.map +0 -1
- package/features/reorder-rows.js +0 -1
package/README.md
CHANGED
|
@@ -683,7 +683,6 @@ import type {
|
|
|
683
683
|
DataGridProps,
|
|
684
684
|
// Feature props
|
|
685
685
|
FeatureProps,
|
|
686
|
-
SSRProps,
|
|
687
686
|
// Type-level defaults (TypeDefault is primary)
|
|
688
687
|
TypeDefault,
|
|
689
688
|
TypeDefaultsMap,
|
|
@@ -705,7 +704,6 @@ import type {
|
|
|
705
704
|
| `gridConfig` | `GridConfig` | Full configuration object |
|
|
706
705
|
| `fitMode` | `'stretch' \| 'fit-columns' \| 'auto-fit'` | Column sizing mode |
|
|
707
706
|
| `customStyles` | `string` | CSS injected via `document.adoptedStyleSheets` |
|
|
708
|
-
| `ssr` | `boolean` | **Deprecated** — no-op, will be removed |
|
|
709
707
|
| `onRowsChange` | `(rows: TRow[]) => void` | Rows changed callback |
|
|
710
708
|
| `onCellEdit` | `(event: CustomEvent) => void` | Cell edited callback |
|
|
711
709
|
| `onRowClick` | `(event: CustomEvent) => void` | Row clicked callback |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useRef as
|
|
1
|
+
import { useRef as K, useCallback as w, useEffect as T } from "react";
|
|
2
2
|
import { p as E, n as k, c as B } from "./react-column-config-BOe_PgL1.js";
|
|
3
3
|
import { jsx as D } from "react/jsx-runtime";
|
|
4
4
|
import { a as u, r as g, b as M, e as A } from "./portal-bridge-CvxNt40O.js";
|
|
@@ -18,8 +18,6 @@ const F = [
|
|
|
18
18
|
"clipboard",
|
|
19
19
|
"contextMenu",
|
|
20
20
|
"reorderColumns",
|
|
21
|
-
// @deprecated v1.x — remove in `@toolbox-web/grid-react` 2.0.0 (gh #261 / #263). Superseded by `rowDragDrop`.
|
|
22
|
-
"reorderRows",
|
|
23
21
|
"rowDragDrop",
|
|
24
22
|
"visibility",
|
|
25
23
|
"undoRedo",
|
|
@@ -48,7 +46,7 @@ function U(o) {
|
|
|
48
46
|
return b.get(t);
|
|
49
47
|
}
|
|
50
48
|
function z(o) {
|
|
51
|
-
const { id: e, title: t, icon: r, tooltip: n, order: s = 100, children: i } = o, l =
|
|
49
|
+
const { id: e, title: t, icon: r, tooltip: n, order: s = 100, children: i } = o, l = K(null), y = w(
|
|
52
50
|
(a) => {
|
|
53
51
|
l.current = a, a && (P.set(a, i), e && b.set(e, i));
|
|
54
52
|
},
|
package/features/filtering.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useContext as h, useCallback as n } from "react";
|
|
|
3
3
|
import { registerFeature as E } from "@toolbox-web/grid/features/registry";
|
|
4
4
|
import { G as k } from "../chunks/grid-element-context-BU3WvNtM.js";
|
|
5
5
|
import { r as v, a as m } from "../chunks/portal-bridge-CvxNt40O.js";
|
|
6
|
-
import { r as C } from "../chunks/react-grid-adapter-
|
|
6
|
+
import { r as C } from "../chunks/react-grid-adapter-C9gIJ33-.js";
|
|
7
7
|
E(
|
|
8
8
|
"filtering",
|
|
9
9
|
(l) => {
|
package/features/index.d.ts.map
CHANGED
|
@@ -1 +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,mBAAmB,CAAC;AAC3B,OAAO,
|
|
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,mBAAmB,CAAC;AAC3B,OAAO,cAAc,CAAC;AACtB,OAAO,iBAAiB,CAAC;AACzB,OAAO,aAAa,CAAC;AACrB,OAAO,eAAe,CAAC;AACvB,OAAO,SAAS,CAAC;AACjB,OAAO,eAAe,CAAC;AACvB,OAAO,WAAW,CAAC;AACnB,OAAO,QAAQ,CAAC;AAChB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC"}
|
package/features/index.js
CHANGED
|
@@ -15,7 +15,6 @@ import "./pinned-rows.js";
|
|
|
15
15
|
import "@toolbox-web/grid/features/pivot";
|
|
16
16
|
import "@toolbox-web/grid/features/print";
|
|
17
17
|
import "@toolbox-web/grid/features/reorder-columns";
|
|
18
|
-
import "@toolbox-web/grid/features/reorder-rows";
|
|
19
18
|
import "./responsive.js";
|
|
20
19
|
import "@toolbox-web/grid/features/row-drag-drop";
|
|
21
20
|
import "@toolbox-web/grid/features/selection";
|
|
@@ -4,7 +4,7 @@ import { registerFeature as m } from "@toolbox-web/grid/features/registry";
|
|
|
4
4
|
import { g as f } from "../chunks/grid-detail-panel-BZFcujsZ.js";
|
|
5
5
|
import { r as p, a as d } from "../chunks/portal-bridge-CvxNt40O.js";
|
|
6
6
|
import { r as g } from "../chunks/post-mount-refresh-hooks-Dt7mPoZC.js";
|
|
7
|
-
import { a as y } from "../chunks/react-grid-adapter-
|
|
7
|
+
import { a as y } from "../chunks/react-grid-adapter-C9gIJ33-.js";
|
|
8
8
|
y((t, { trackPortal: e }) => {
|
|
9
9
|
const n = f(t);
|
|
10
10
|
if (n)
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,wCAAwC,CAAC;AAIhD,YAAY,EAAE,aAAa,IAAI,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAevG,YAAY,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,gBAAgB,EAEhB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC"}
|
package/features/pinned-rows.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import "@toolbox-web/grid/features/pinned-rows";
|
|
2
2
|
import { PinnedRowsPlugin as u } from "@toolbox-web/grid/plugins/pinned-rows";
|
|
3
|
-
import { registerFeature as
|
|
4
|
-
import { a as
|
|
3
|
+
import { registerFeature as d } from "@toolbox-web/grid/features/registry";
|
|
4
|
+
import { a as f, r as l } from "../chunks/portal-bridge-CvxNt40O.js";
|
|
5
5
|
function c(e, n) {
|
|
6
6
|
let r = null, t = !1;
|
|
7
|
-
return (
|
|
8
|
-
const o = e(
|
|
7
|
+
return (i) => {
|
|
8
|
+
const o = e(i);
|
|
9
9
|
if (o == null || o === !1) return null;
|
|
10
10
|
if (o instanceof HTMLElement) return o;
|
|
11
11
|
if (!r) {
|
|
12
12
|
const s = document.createElement("div");
|
|
13
13
|
s.style.display = "contents", r = { host: s, portalKey: null };
|
|
14
14
|
}
|
|
15
|
-
return r.portalKey =
|
|
16
|
-
r?.portalKey &&
|
|
15
|
+
return r.portalKey = f(r.host, o, r.portalKey ?? void 0), t || (t = !0, n(() => {
|
|
16
|
+
r?.portalKey && l(r.portalKey, { sync: !1 }), r = null;
|
|
17
17
|
})), r.host;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function p(e, n) {
|
|
21
21
|
if (!("render" in e) || e.render == null) return e;
|
|
22
22
|
if (Array.isArray(e.render)) {
|
|
23
23
|
const r = e.render.map((t) => typeof t?.render != "function" ? t : { zone: t.zone, render: c(t.render, n) });
|
|
@@ -25,7 +25,7 @@ function h(e, n) {
|
|
|
25
25
|
}
|
|
26
26
|
return typeof e.render == "function" ? { ...e, render: c(e.render, n) } : e;
|
|
27
27
|
}
|
|
28
|
-
class
|
|
28
|
+
class h extends u {
|
|
29
29
|
#e;
|
|
30
30
|
constructor(n, r) {
|
|
31
31
|
super(n), this.#e = r;
|
|
@@ -40,23 +40,15 @@ class P extends u {
|
|
|
40
40
|
this.#e.length = 0;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
d(
|
|
44
44
|
"pinnedRows",
|
|
45
45
|
(e) => {
|
|
46
46
|
if (typeof e == "boolean") return new u();
|
|
47
47
|
if (!e) return new u();
|
|
48
|
-
const n = e, { slots: r,
|
|
49
|
-
|
|
48
|
+
const n = e, { slots: r, ...t } = n, i = { ...t }, o = [], s = (a) => {
|
|
49
|
+
o.push(a);
|
|
50
50
|
};
|
|
51
|
-
return Array.isArray(
|
|
52
|
-
if (typeof i.render != "function") return i;
|
|
53
|
-
const f = c(i.render, d);
|
|
54
|
-
return {
|
|
55
|
-
...i,
|
|
56
|
-
// customPanels expect HTMLElement (not nullable); coerce null → empty wrapper.
|
|
57
|
-
render: (l) => f(l) ?? document.createElement("div")
|
|
58
|
-
};
|
|
59
|
-
})), Array.isArray(r) && (o.slots = r.map((i) => h(i, d))), new P(o, s);
|
|
51
|
+
return Array.isArray(r) && (i.slots = r.map((a) => p(a, s))), new h(i, o);
|
|
60
52
|
},
|
|
61
53
|
{ override: !0 }
|
|
62
54
|
);
|
package/features/responsive.js
CHANGED
|
@@ -4,7 +4,7 @@ import { registerFeature as l } from "@toolbox-web/grid/features/registry";
|
|
|
4
4
|
import { g as p } from "../chunks/grid-responsive-card-CSZhDCoN.js";
|
|
5
5
|
import { r as v, a as f } from "../chunks/portal-bridge-CvxNt40O.js";
|
|
6
6
|
import { r as R } from "../chunks/post-mount-refresh-hooks-Dt7mPoZC.js";
|
|
7
|
-
import { b as y } from "../chunks/react-grid-adapter-
|
|
7
|
+
import { b as y } from "../chunks/react-grid-adapter-C9gIJ33-.js";
|
|
8
8
|
y((e, { trackPortal: r }) => {
|
|
9
9
|
const t = p(e);
|
|
10
10
|
if (t)
|
package/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { GridResponsiveCard, type GridResponsiveCardProps, type ResponsiveCardCo
|
|
|
8
8
|
export { GridToolButtons, type GridToolButtonsProps } from './lib/grid-tool-button';
|
|
9
9
|
export { GridToolPanel, type GridToolPanelProps, type ToolPanelContext } from './lib/grid-tool-panel';
|
|
10
10
|
export { GridToolbarContent, type GridToolbarContentProps } from './lib/grid-toolbar-content';
|
|
11
|
-
export type { AllFeatureProps, ColumnGroupDefinition, FeatureProps, FilterConfig, GroupingColumnsConfig, GroupingRowsConfig, MasterDetailConfig, PanelRender, PanelSlot, PinnedRowSlot, PinnedRowsConfig, ReactColumnGroupDefinition, ReactFilterConfig, ReactGroupingColumnsConfig, ReactGroupingRowsConfig, ReactPanelRender, ReactPanelSlot, ReactPinnedRowSlot, ReactPinnedRowsConfig, ReactZonedPanelRender, ResponsivePluginConfig,
|
|
11
|
+
export type { AllFeatureProps, ColumnGroupDefinition, FeatureProps, FilterConfig, GroupingColumnsConfig, GroupingRowsConfig, MasterDetailConfig, PanelRender, PanelSlot, PinnedRowSlot, PinnedRowsConfig, ReactColumnGroupDefinition, ReactFilterConfig, ReactGroupingColumnsConfig, ReactGroupingRowsConfig, ReactPanelRender, ReactPanelSlot, ReactPinnedRowSlot, ReactPinnedRowsConfig, ReactZonedPanelRender, ResponsivePluginConfig, ZonedPanelRender, } from './lib/feature-props';
|
|
12
12
|
export { applyColumnDefaults, hasColumnShorthands, normalizeColumns, parseColumnShorthand, } from './lib/column-shorthand';
|
|
13
13
|
export type { ColumnShorthand } from './lib/column-shorthand';
|
|
14
14
|
export type { EventHandler, EventProps } from './lib/event-props';
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../libs/grid-react/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,YAAY,CAAC;AAGpB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACtG,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAG9F,YAAY,EACV,eAAe,EAIf,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,aAAa,EACb,gBAAgB,EAEhB,0BAA0B,EAC1B,iBAAiB,EACjB,0BAA0B,EAC1B,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../libs/grid-react/src/index.ts"],"names":[],"mappings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