@toolbox-web/grid-react 0.11.0 → 0.12.1
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-GKyKxE6c.js → data-grid-B0FOIoOo.js} +261 -247
- package/features/export.js +1 -1
- package/features/filtering.d.ts.map +1 -1
- package/features/filtering.js +52 -37
- package/features/print.js +1 -1
- package/features/selection.js +1 -1
- package/features/undo-redo.js +1 -1
- package/index.js +2 -2
- package/lib/context-types.d.ts +15 -0
- package/lib/context-types.d.ts.map +1 -1
- package/lib/feature-props.d.ts +16 -3
- package/lib/feature-props.d.ts.map +1 -1
- package/lib/grid-type-registry.d.ts +29 -0
- package/lib/grid-type-registry.d.ts.map +1 -1
- package/lib/react-grid-adapter.d.ts +5 -0
- package/lib/react-grid-adapter.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import { DataGridElement as pe } from "@toolbox-web/grid";
|
|
3
3
|
import { createContext as Y, useContext as I, useRef as S, useCallback as Z, useEffect as p, forwardRef as me, useMemo as w, useImperativeHandle as ye, Children as he, isValidElement as ve } from "react";
|
|
4
|
-
import { flushSync as
|
|
5
|
-
import { createRoot as
|
|
4
|
+
import { flushSync as m } from "react-dom";
|
|
5
|
+
import { createRoot as h } from "react-dom/client";
|
|
6
6
|
import { c as we } from "./feature-registry-Y3KvnN54.js";
|
|
7
7
|
function Ce(n) {
|
|
8
8
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
@@ -61,7 +61,7 @@ const z = {
|
|
|
61
61
|
function Je() {
|
|
62
62
|
return I(Q);
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const Pe = Q, $ = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new Map();
|
|
65
65
|
function de(n) {
|
|
66
66
|
const t = n.querySelector("tbw-grid-responsive-card");
|
|
67
67
|
if (t) {
|
|
@@ -72,15 +72,15 @@ function de(n) {
|
|
|
72
72
|
if (e)
|
|
73
73
|
return W.get(e);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const { children: t, cardRowHeight: e = "auto" } = n, r = S(null),
|
|
75
|
+
function De(n) {
|
|
76
|
+
const { children: t, cardRowHeight: e = "auto" } = n, r = S(null), o = Z(
|
|
77
77
|
(s) => {
|
|
78
78
|
if (r.current = s, !s) return;
|
|
79
79
|
$.set(s, t);
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
|
|
80
|
+
const a = s.closest("tbw-grid");
|
|
81
|
+
if (a) {
|
|
82
|
+
const l = a.id || a.getAttribute("data-grid-id");
|
|
83
|
+
l && W.set(l, t);
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
[t]
|
|
@@ -89,25 +89,25 @@ function Pe(n) {
|
|
|
89
89
|
const s = r.current;
|
|
90
90
|
if (s) {
|
|
91
91
|
$.delete(s);
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
|
|
92
|
+
const a = s.closest("tbw-grid");
|
|
93
|
+
if (a) {
|
|
94
|
+
const l = a.id || a.getAttribute("data-grid-id");
|
|
95
|
+
l && W.delete(l);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}, []);
|
|
99
|
-
const
|
|
100
|
-
return /* @__PURE__ */ b("tbw-grid-responsive-card", { ref:
|
|
99
|
+
const c = e === "auto" ? "auto" : String(e);
|
|
100
|
+
return /* @__PURE__ */ b("tbw-grid-responsive-card", { ref: o, cardRowHeight: c });
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
const
|
|
102
|
+
De.displayName = "GridResponsiveCard";
|
|
103
|
+
const L = Y(null), Ye = ({ defaults: n, children: t }) => /* @__PURE__ */ b(L.Provider, { value: n, children: t });
|
|
104
104
|
function Ze() {
|
|
105
|
-
return I(
|
|
105
|
+
return I(L);
|
|
106
106
|
}
|
|
107
107
|
function Qe(n) {
|
|
108
|
-
return I(
|
|
108
|
+
return I(L)?.[n];
|
|
109
109
|
}
|
|
110
|
-
const Se =
|
|
110
|
+
const Se = L;
|
|
111
111
|
function xe(n) {
|
|
112
112
|
const t = /* @__PURE__ */ new WeakMap();
|
|
113
113
|
return (e) => {
|
|
@@ -115,24 +115,24 @@ function xe(n) {
|
|
|
115
115
|
if (r) {
|
|
116
116
|
const s = t.get(r);
|
|
117
117
|
if (s)
|
|
118
|
-
return
|
|
118
|
+
return m(() => {
|
|
119
119
|
s.root.render(n(e));
|
|
120
120
|
}), s.container;
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
return
|
|
126
|
-
|
|
127
|
-
}), r && t.set(r, { root:
|
|
122
|
+
const o = document.createElement("div");
|
|
123
|
+
o.className = "react-cell-renderer", o.style.display = "contents";
|
|
124
|
+
const c = h(o);
|
|
125
|
+
return m(() => {
|
|
126
|
+
c.render(n(e));
|
|
127
|
+
}), r && t.set(r, { root: c, container: o }), o;
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
function Ae(n) {
|
|
131
131
|
return (t) => {
|
|
132
132
|
const e = document.createElement("div");
|
|
133
133
|
e.className = "react-cell-editor", e.style.display = "contents";
|
|
134
|
-
const r =
|
|
135
|
-
return
|
|
134
|
+
const r = h(e);
|
|
135
|
+
return m(() => {
|
|
136
136
|
r.render(n(t));
|
|
137
137
|
}), e;
|
|
138
138
|
};
|
|
@@ -141,8 +141,8 @@ function Ge(n) {
|
|
|
141
141
|
if (!n) return;
|
|
142
142
|
if (!n.columns) return n;
|
|
143
143
|
const t = n.columns.map((e) => {
|
|
144
|
-
const { renderer: r, editor:
|
|
145
|
-
return r && (s.renderer = xe(r)),
|
|
144
|
+
const { renderer: r, editor: o, ...c } = e, s = { ...c };
|
|
145
|
+
return r && (s.renderer = xe(r)), o && (s.editor = Ae(o)), s;
|
|
146
146
|
});
|
|
147
147
|
return {
|
|
148
148
|
...n,
|
|
@@ -161,34 +161,34 @@ function Ie(n) {
|
|
|
161
161
|
return B.get(e);
|
|
162
162
|
}
|
|
163
163
|
function Ne(n) {
|
|
164
|
-
const { children: t, showExpandColumn: e = !0, animation: r = "slide" } = n,
|
|
165
|
-
(
|
|
166
|
-
if (
|
|
167
|
-
q.set(
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
170
|
-
const g =
|
|
164
|
+
const { children: t, showExpandColumn: e = !0, animation: r = "slide" } = n, o = S(null), c = Z(
|
|
165
|
+
(a) => {
|
|
166
|
+
if (o.current = a, !a) return;
|
|
167
|
+
q.set(a, t);
|
|
168
|
+
const l = a.closest("tbw-grid");
|
|
169
|
+
if (l) {
|
|
170
|
+
const g = l.id || l.getAttribute("data-grid-id");
|
|
171
171
|
g && B.set(g, t);
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
[t]
|
|
175
175
|
);
|
|
176
176
|
return p(() => () => {
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
q.delete(
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
const
|
|
183
|
-
|
|
177
|
+
const a = o.current;
|
|
178
|
+
if (a) {
|
|
179
|
+
q.delete(a);
|
|
180
|
+
const l = a.closest("tbw-grid");
|
|
181
|
+
if (l) {
|
|
182
|
+
const v = l.id || l.getAttribute("data-grid-id");
|
|
183
|
+
v && B.delete(v);
|
|
184
184
|
}
|
|
185
|
-
const g =
|
|
186
|
-
g && g.contains(
|
|
185
|
+
const g = a.parentNode;
|
|
186
|
+
g && g.contains(a);
|
|
187
187
|
}
|
|
188
188
|
}, []), /* @__PURE__ */ b(
|
|
189
189
|
"tbw-grid-detail",
|
|
190
190
|
{
|
|
191
|
-
ref:
|
|
191
|
+
ref: c,
|
|
192
192
|
showExpandColumn: e ? void 0 : "false",
|
|
193
193
|
animation: r === !1 ? "false" : r
|
|
194
194
|
}
|
|
@@ -204,24 +204,24 @@ function Ve(n) {
|
|
|
204
204
|
return U.get(e);
|
|
205
205
|
}
|
|
206
206
|
function Xe(n) {
|
|
207
|
-
const { id: t, title: e, icon: r, tooltip:
|
|
207
|
+
const { id: t, title: e, icon: r, tooltip: o, order: c = 100, children: s } = n, a = S(null), l = Z(
|
|
208
208
|
(g) => {
|
|
209
|
-
|
|
209
|
+
a.current = g, g && (K.set(g, s), t && U.set(t, s));
|
|
210
210
|
},
|
|
211
211
|
[s, t]
|
|
212
212
|
);
|
|
213
213
|
return p(() => () => {
|
|
214
|
-
const g =
|
|
214
|
+
const g = a.current;
|
|
215
215
|
g && (K.delete(g), t && U.delete(t));
|
|
216
216
|
}, [t]), /* @__PURE__ */ b(
|
|
217
217
|
"tbw-grid-tool-panel",
|
|
218
218
|
{
|
|
219
|
-
ref:
|
|
219
|
+
ref: l,
|
|
220
220
|
id: t,
|
|
221
221
|
title: e,
|
|
222
222
|
icon: r,
|
|
223
|
-
tooltip:
|
|
224
|
-
order:
|
|
223
|
+
tooltip: o,
|
|
224
|
+
order: c?.toString()
|
|
225
225
|
}
|
|
226
226
|
);
|
|
227
227
|
}
|
|
@@ -229,18 +229,18 @@ const R = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new Map();
|
|
|
229
229
|
function et(n, t) {
|
|
230
230
|
const e = n.getAttribute("field"), r = R.get(n) ?? {};
|
|
231
231
|
if (r.renderer = t, R.set(n, r), e) {
|
|
232
|
-
const
|
|
233
|
-
|
|
232
|
+
const o = E.get(e) ?? {};
|
|
233
|
+
o.renderer = t, E.set(e, o);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
function tt(n, t) {
|
|
237
237
|
const e = n.getAttribute("field"), r = R.get(n) ?? {};
|
|
238
238
|
if (r.editor = t, R.set(n, r), e) {
|
|
239
|
-
const
|
|
240
|
-
|
|
239
|
+
const o = E.get(e) ?? {};
|
|
240
|
+
o.editor = t, E.set(e, o);
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Fe(n) {
|
|
244
244
|
let t = R.get(n)?.renderer;
|
|
245
245
|
if (!t) {
|
|
246
246
|
const e = n.getAttribute("field");
|
|
@@ -248,7 +248,7 @@ function Le(n) {
|
|
|
248
248
|
}
|
|
249
249
|
return t;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Le(n) {
|
|
252
252
|
let t = R.get(n)?.editor;
|
|
253
253
|
if (!t) {
|
|
254
254
|
const e = n.getAttribute("field");
|
|
@@ -256,7 +256,7 @@ function Te(n) {
|
|
|
256
256
|
}
|
|
257
257
|
return t;
|
|
258
258
|
}
|
|
259
|
-
class
|
|
259
|
+
class le {
|
|
260
260
|
mountedViews = [];
|
|
261
261
|
typeDefaults = null;
|
|
262
262
|
/**
|
|
@@ -279,8 +279,8 @@ class ue {
|
|
|
279
279
|
const s = E.get(e);
|
|
280
280
|
s && (s.renderer || s.editor) && (r = s, R.set(t, r));
|
|
281
281
|
}
|
|
282
|
-
const
|
|
283
|
-
return r !== void 0 && (
|
|
282
|
+
const o = r?.renderer !== void 0, c = r?.editor !== void 0;
|
|
283
|
+
return r !== void 0 && (o || c);
|
|
284
284
|
}
|
|
285
285
|
/**
|
|
286
286
|
* Creates a view renderer function that renders a React component
|
|
@@ -294,31 +294,31 @@ class ue {
|
|
|
294
294
|
* allowing the grid to use its default rendering.
|
|
295
295
|
*/
|
|
296
296
|
createRenderer(t) {
|
|
297
|
-
const e =
|
|
297
|
+
const e = Fe(t);
|
|
298
298
|
if (!e)
|
|
299
299
|
return;
|
|
300
300
|
const r = /* @__PURE__ */ new WeakMap();
|
|
301
|
-
return (
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
306
|
-
return
|
|
307
|
-
|
|
308
|
-
}),
|
|
301
|
+
return (o) => {
|
|
302
|
+
const c = o.cellEl;
|
|
303
|
+
if (c) {
|
|
304
|
+
const l = r.get(c);
|
|
305
|
+
if (l)
|
|
306
|
+
return m(() => {
|
|
307
|
+
l.root.render(e(o));
|
|
308
|
+
}), l.container;
|
|
309
309
|
const g = document.createElement("div");
|
|
310
310
|
g.className = "react-cell-renderer", g.style.display = "contents";
|
|
311
|
-
const
|
|
312
|
-
return
|
|
313
|
-
|
|
314
|
-
}), r.set(
|
|
311
|
+
const v = h(g);
|
|
312
|
+
return m(() => {
|
|
313
|
+
v.render(e(o));
|
|
314
|
+
}), r.set(c, { root: v, container: g, lastRowIndex: o.rowIndex ?? -1 }), this.mountedViews.push({ root: v, container: g }), g;
|
|
315
315
|
}
|
|
316
316
|
const s = document.createElement("div");
|
|
317
317
|
s.className = "react-cell-renderer", s.style.display = "contents";
|
|
318
|
-
const
|
|
319
|
-
return
|
|
320
|
-
|
|
321
|
-
}), this.mountedViews.push({ root:
|
|
318
|
+
const a = h(s);
|
|
319
|
+
return m(() => {
|
|
320
|
+
a.render(e(o));
|
|
321
|
+
}), this.mountedViews.push({ root: a, container: s }), s;
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
324
|
/**
|
|
@@ -326,14 +326,14 @@ class ue {
|
|
|
326
326
|
* with commit/cancel callbacks passed as props.
|
|
327
327
|
*/
|
|
328
328
|
createEditor(t) {
|
|
329
|
-
const e =
|
|
329
|
+
const e = Le(t);
|
|
330
330
|
return e ? (r) => {
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
const
|
|
334
|
-
return
|
|
335
|
-
|
|
336
|
-
}), this.mountedViews.push({ root:
|
|
331
|
+
const o = document.createElement("div");
|
|
332
|
+
o.className = "react-cell-editor", o.style.display = "contents";
|
|
333
|
+
const c = h(o);
|
|
334
|
+
return m(() => {
|
|
335
|
+
c.render(e(r));
|
|
336
|
+
}), this.mountedViews.push({ root: c, container: o }), o;
|
|
337
337
|
} : () => document.createElement("div");
|
|
338
338
|
}
|
|
339
339
|
/**
|
|
@@ -343,13 +343,13 @@ class ue {
|
|
|
343
343
|
createDetailRenderer(t) {
|
|
344
344
|
const e = Ie(t);
|
|
345
345
|
if (e)
|
|
346
|
-
return (r,
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
const s = { row: r, rowIndex:
|
|
350
|
-
return
|
|
351
|
-
|
|
352
|
-
}), this.mountedViews.push({ root:
|
|
346
|
+
return (r, o) => {
|
|
347
|
+
const c = document.createElement("div");
|
|
348
|
+
c.className = "react-detail-panel";
|
|
349
|
+
const s = { row: r, rowIndex: o }, a = h(c);
|
|
350
|
+
return m(() => {
|
|
351
|
+
a.render(e(s));
|
|
352
|
+
}), this.mountedViews.push({ root: a, container: c }), c;
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
@@ -368,13 +368,13 @@ class ue {
|
|
|
368
368
|
createResponsiveCardRenderer(t) {
|
|
369
369
|
const e = de(t);
|
|
370
370
|
if (e)
|
|
371
|
-
return (r,
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
const s = { row: r, index:
|
|
375
|
-
return
|
|
376
|
-
|
|
377
|
-
}), this.mountedViews.push({ root:
|
|
371
|
+
return (r, o) => {
|
|
372
|
+
const c = document.createElement("div");
|
|
373
|
+
c.className = "react-responsive-card";
|
|
374
|
+
const s = { row: r, index: o }, a = h(c);
|
|
375
|
+
return m(() => {
|
|
376
|
+
a.render(e(s));
|
|
377
|
+
}), this.mountedViews.push({ root: a, container: c }), c;
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
/**
|
|
@@ -386,21 +386,21 @@ class ue {
|
|
|
386
386
|
if (!e)
|
|
387
387
|
return;
|
|
388
388
|
const r = t.closest("tbw-grid");
|
|
389
|
-
return (
|
|
390
|
-
const
|
|
391
|
-
grid: r ??
|
|
392
|
-
}, s =
|
|
393
|
-
return
|
|
394
|
-
s.render(e(
|
|
395
|
-
}), this.mountedViews.push({ root: s, container:
|
|
396
|
-
const
|
|
397
|
-
if (
|
|
398
|
-
const { root:
|
|
389
|
+
return (o) => {
|
|
390
|
+
const c = {
|
|
391
|
+
grid: r ?? o
|
|
392
|
+
}, s = h(o);
|
|
393
|
+
return m(() => {
|
|
394
|
+
s.render(e(c));
|
|
395
|
+
}), this.mountedViews.push({ root: s, container: o }), () => {
|
|
396
|
+
const a = this.mountedViews.findIndex((l) => l.container === o);
|
|
397
|
+
if (a !== -1) {
|
|
398
|
+
const { root: l } = this.mountedViews[a];
|
|
399
399
|
try {
|
|
400
|
-
|
|
400
|
+
l.unmount();
|
|
401
401
|
} catch {
|
|
402
402
|
}
|
|
403
|
-
this.mountedViews.splice(
|
|
403
|
+
this.mountedViews.splice(a, 1);
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
};
|
|
@@ -438,7 +438,7 @@ class ue {
|
|
|
438
438
|
const r = {
|
|
439
439
|
editorParams: e.editorParams
|
|
440
440
|
};
|
|
441
|
-
return e.renderer && (r.renderer = this.createTypeRenderer(e.renderer)), e.editor && (r.editor = this.createTypeEditor(e.editor)), r;
|
|
441
|
+
return e.renderer && (r.renderer = this.createTypeRenderer(e.renderer)), e.editor && (r.editor = this.createTypeEditor(e.editor)), e.filterPanelRenderer && (r.filterPanelRenderer = this.createFilterPanelRenderer(e.filterPanelRenderer)), r;
|
|
442
442
|
}
|
|
443
443
|
/**
|
|
444
444
|
* Creates a renderer function from a React render function for type defaults.
|
|
@@ -448,9 +448,9 @@ class ue {
|
|
|
448
448
|
return (e) => {
|
|
449
449
|
const r = document.createElement("span");
|
|
450
450
|
r.style.display = "contents";
|
|
451
|
-
const
|
|
452
|
-
return this.mountedViews.push({ root:
|
|
453
|
-
|
|
451
|
+
const o = h(r);
|
|
452
|
+
return this.mountedViews.push({ root: o, container: r }), m(() => {
|
|
453
|
+
o.render(t(e));
|
|
454
454
|
}), r;
|
|
455
455
|
};
|
|
456
456
|
}
|
|
@@ -462,12 +462,26 @@ class ue {
|
|
|
462
462
|
return (e) => {
|
|
463
463
|
const r = document.createElement("span");
|
|
464
464
|
r.style.display = "contents";
|
|
465
|
-
const
|
|
466
|
-
return this.mountedViews.push({ root:
|
|
467
|
-
|
|
465
|
+
const o = h(r);
|
|
466
|
+
return this.mountedViews.push({ root: o, container: r }), m(() => {
|
|
467
|
+
o.render(t(e));
|
|
468
468
|
}), r;
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Creates a filter panel renderer that mounts React content into the filter panel container.
|
|
473
|
+
* @internal
|
|
474
|
+
*/
|
|
475
|
+
createFilterPanelRenderer(t) {
|
|
476
|
+
return (e, r) => {
|
|
477
|
+
const o = document.createElement("div");
|
|
478
|
+
o.style.display = "contents";
|
|
479
|
+
const c = h(o);
|
|
480
|
+
this.mountedViews.push({ root: c, container: o }), m(() => {
|
|
481
|
+
c.render(t(r));
|
|
482
|
+
}), e.appendChild(o);
|
|
483
|
+
};
|
|
484
|
+
}
|
|
471
485
|
/**
|
|
472
486
|
* Clean up all mounted React roots.
|
|
473
487
|
* Call this when the grid is unmounted.
|
|
@@ -495,47 +509,47 @@ class ue {
|
|
|
495
509
|
}
|
|
496
510
|
}
|
|
497
511
|
}
|
|
498
|
-
const rt =
|
|
512
|
+
const rt = le, Te = {
|
|
499
513
|
undoRedo: ["editing"],
|
|
500
514
|
clipboard: ["selection"]
|
|
501
515
|
};
|
|
502
|
-
function
|
|
516
|
+
function ke(n) {
|
|
503
517
|
const t = new Set(n);
|
|
504
518
|
for (const e of n) {
|
|
505
|
-
const r =
|
|
519
|
+
const r = Te[e];
|
|
506
520
|
if (r)
|
|
507
|
-
for (const
|
|
508
|
-
t.has(
|
|
509
|
-
`[DataGrid] Feature "${e}" requires "${
|
|
521
|
+
for (const o of r)
|
|
522
|
+
t.has(o) || console.warn(
|
|
523
|
+
`[DataGrid] Feature "${e}" requires "${o}" to be enabled. Add the "${o}" prop to your DataGrid.`
|
|
510
524
|
);
|
|
511
525
|
}
|
|
512
526
|
}
|
|
513
527
|
function Me(n) {
|
|
514
528
|
const t = [], e = [], r = { ...n };
|
|
515
529
|
r.multiSort !== void 0 ? delete r.sorting : r.sorting !== void 0 && (r.multiSort = r.sorting, delete r.sorting);
|
|
516
|
-
for (const [s,
|
|
517
|
-
if (
|
|
518
|
-
const
|
|
519
|
-
e.push(
|
|
530
|
+
for (const [s, a] of Object.entries(r)) {
|
|
531
|
+
if (a === void 0 || a === !1) continue;
|
|
532
|
+
const l = s;
|
|
533
|
+
e.push(l);
|
|
520
534
|
}
|
|
521
|
-
|
|
522
|
-
const
|
|
535
|
+
ke(e);
|
|
536
|
+
const o = [
|
|
523
537
|
"selection",
|
|
524
538
|
"editing",
|
|
525
539
|
// Then everything else in the order they were specified
|
|
526
540
|
...e.filter((s) => s !== "selection" && s !== "editing")
|
|
527
|
-
],
|
|
528
|
-
for (const s of
|
|
529
|
-
const
|
|
530
|
-
if (
|
|
531
|
-
const
|
|
532
|
-
|
|
541
|
+
], c = [...new Set(o)].filter((s) => e.includes(s));
|
|
542
|
+
for (const s of c) {
|
|
543
|
+
const a = n[s];
|
|
544
|
+
if (a === void 0 || a === !1) continue;
|
|
545
|
+
const l = we(s, a);
|
|
546
|
+
l && t.push(l);
|
|
533
547
|
}
|
|
534
548
|
return t;
|
|
535
549
|
}
|
|
536
550
|
let ae = !1, _ = null;
|
|
537
551
|
function J() {
|
|
538
|
-
return ae || (_ = new
|
|
552
|
+
return ae || (_ = new le(), pe.registerAdapter(_), ae = !0), _;
|
|
539
553
|
}
|
|
540
554
|
J();
|
|
541
555
|
const Oe = Y(null);
|
|
@@ -546,10 +560,10 @@ function je(n) {
|
|
|
546
560
|
function He(n, t) {
|
|
547
561
|
const e = n;
|
|
548
562
|
if (!n.querySelector("tbw-grid-responsive-card") || !de(n)) return;
|
|
549
|
-
const
|
|
550
|
-
if (
|
|
563
|
+
const c = e.getPluginByName?.("responsive");
|
|
564
|
+
if (c && typeof c.setCardRenderer == "function") {
|
|
551
565
|
const s = t.createResponsiveCardRenderer(n);
|
|
552
|
-
s &&
|
|
566
|
+
s && c.setCardRenderer(s);
|
|
553
567
|
}
|
|
554
568
|
}
|
|
555
569
|
function ze(n) {
|
|
@@ -573,28 +587,28 @@ const nt = me(function(t, e) {
|
|
|
573
587
|
const {
|
|
574
588
|
// Core props
|
|
575
589
|
rows: r,
|
|
576
|
-
gridConfig:
|
|
577
|
-
columns:
|
|
590
|
+
gridConfig: o,
|
|
591
|
+
columns: c,
|
|
578
592
|
columnDefaults: s,
|
|
579
|
-
fitMode:
|
|
580
|
-
sortable:
|
|
593
|
+
fitMode: a,
|
|
594
|
+
sortable: l,
|
|
581
595
|
filterable: g,
|
|
582
|
-
selectable:
|
|
583
|
-
loading:
|
|
584
|
-
editOn:
|
|
596
|
+
selectable: v,
|
|
597
|
+
loading: T,
|
|
598
|
+
editOn: k,
|
|
585
599
|
customStyles: N,
|
|
586
|
-
className:
|
|
600
|
+
className: ue,
|
|
587
601
|
style: fe,
|
|
588
602
|
children: M,
|
|
589
603
|
// Plugin props
|
|
590
|
-
plugins:
|
|
604
|
+
plugins: P,
|
|
591
605
|
// SSR mode
|
|
592
606
|
ssr: X,
|
|
593
607
|
// Legacy event handlers
|
|
594
608
|
onRowsChange: O,
|
|
595
609
|
// Feature props and event props are in ...rest
|
|
596
610
|
...C
|
|
597
|
-
} = t,
|
|
611
|
+
} = t, u = S(null), V = S(null), ee = I(Se), j = I(Pe), te = [
|
|
598
612
|
"selection",
|
|
599
613
|
"editing",
|
|
600
614
|
"filtering",
|
|
@@ -619,165 +633,165 @@ const nt = me(function(t, e) {
|
|
|
619
633
|
"print",
|
|
620
634
|
"pivot",
|
|
621
635
|
"serverSide"
|
|
622
|
-
], ge = w(() => te.map((
|
|
623
|
-
const
|
|
624
|
-
return
|
|
636
|
+
], ge = w(() => te.map((i) => {
|
|
637
|
+
const d = C[i];
|
|
638
|
+
return d !== void 0 ? `${i}:${JSON.stringify(d)}` : "";
|
|
625
639
|
}).filter(Boolean).join("|"), [C]), re = w(() => {
|
|
626
|
-
const
|
|
627
|
-
for (const
|
|
628
|
-
|
|
629
|
-
return
|
|
630
|
-
}, [ge]), ne = w(() => ze(M), [M]), oe = w(() => ({ ...ne, ...re }), [re, ne]), H = w(() =>
|
|
631
|
-
if (
|
|
632
|
-
const
|
|
633
|
-
return [...
|
|
640
|
+
const i = {};
|
|
641
|
+
for (const d of te)
|
|
642
|
+
d in C && C[d] !== void 0 && (i[d] = C[d]);
|
|
643
|
+
return i;
|
|
644
|
+
}, [ge]), ne = w(() => ze(M), [M]), oe = w(() => ({ ...ne, ...re }), [re, ne]), H = w(() => P || X ? [] : Me(oe), [oe, P, X]), x = w(() => {
|
|
645
|
+
if (P) {
|
|
646
|
+
const i = new Set(P.map((f) => f.name)), d = H.filter((f) => !i.has(f.name));
|
|
647
|
+
return [...P, ...d];
|
|
634
648
|
}
|
|
635
649
|
return H;
|
|
636
|
-
}, [
|
|
637
|
-
if (!
|
|
638
|
-
const
|
|
639
|
-
return s ?
|
|
650
|
+
}, [P, H]), A = w(() => {
|
|
651
|
+
if (!c) return c;
|
|
652
|
+
const i = Ee(c);
|
|
653
|
+
return s ? i.map((d) => ({
|
|
640
654
|
...s,
|
|
641
|
-
...
|
|
655
|
+
...d
|
|
642
656
|
// Individual column props override defaults
|
|
643
|
-
})) :
|
|
644
|
-
}, [
|
|
645
|
-
const
|
|
646
|
-
if (
|
|
647
|
-
const f =
|
|
648
|
-
|
|
657
|
+
})) : i;
|
|
658
|
+
}, [c, s]), G = w(() => {
|
|
659
|
+
const i = Ge(o), d = {};
|
|
660
|
+
if (l !== void 0 && (d.sortable = l), g !== void 0 && (d.filterable = g), v !== void 0 && (d.selectable = v), j) {
|
|
661
|
+
const f = i?.icons || o?.icons || {};
|
|
662
|
+
d.icons = { ...j, ...f };
|
|
649
663
|
}
|
|
650
|
-
if (x.length > 0 &&
|
|
651
|
-
const f =
|
|
664
|
+
if (x.length > 0 && i) {
|
|
665
|
+
const f = i.plugins || [], y = new Set(f.map((D) => D.name)), F = x.filter((D) => !y.has(D.name));
|
|
652
666
|
return {
|
|
653
|
-
...
|
|
654
|
-
...
|
|
655
|
-
plugins: [...f, ...
|
|
667
|
+
...i,
|
|
668
|
+
...d,
|
|
669
|
+
plugins: [...f, ...F]
|
|
656
670
|
};
|
|
657
671
|
}
|
|
658
|
-
return x.length > 0 && !
|
|
659
|
-
}, [
|
|
672
|
+
return x.length > 0 && !i ? { ...d, plugins: x } : Object.keys(d).length > 0 ? { ...i, ...d } : i;
|
|
673
|
+
}, [o, x, l, g, v, j]);
|
|
660
674
|
p(() => {
|
|
661
675
|
J().setTypeDefaults(ee);
|
|
662
676
|
}, [ee]), p(() => {
|
|
663
|
-
|
|
677
|
+
u.current && (u.current.rows = r);
|
|
664
678
|
}, [r]), p(() => {
|
|
665
|
-
|
|
679
|
+
u.current && G && (u.current.gridConfig = G);
|
|
666
680
|
}, [G]), p(() => {
|
|
667
|
-
|
|
681
|
+
u.current && A && (u.current.columns = A);
|
|
668
682
|
}, [A]), p(() => {
|
|
669
|
-
|
|
670
|
-
}, [
|
|
671
|
-
|
|
672
|
-
}, [F]), p(() => {
|
|
673
|
-
l.current && k !== void 0 && (l.current.loading = k);
|
|
683
|
+
u.current && a !== void 0 && (u.current.fitMode = a);
|
|
684
|
+
}, [a]), p(() => {
|
|
685
|
+
u.current && k !== void 0 && (u.current.editOn = k);
|
|
674
686
|
}, [k]), p(() => {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
|
|
687
|
+
u.current && T !== void 0 && (u.current.loading = T);
|
|
688
|
+
}, [T]), p(() => {
|
|
689
|
+
const i = u.current;
|
|
690
|
+
if (!i) return;
|
|
691
|
+
const d = J();
|
|
692
|
+
i.__frameworkAdapter = d, je(i), He(i, d);
|
|
679
693
|
let f = !1;
|
|
680
|
-
const
|
|
681
|
-
f || (typeof
|
|
694
|
+
const y = requestAnimationFrame(() => {
|
|
695
|
+
f || (typeof i.refreshColumns == "function" && i.refreshColumns(), typeof i.refreshShellHeader == "function" && i.refreshShellHeader());
|
|
682
696
|
});
|
|
683
697
|
return () => {
|
|
684
|
-
f = !0, cancelAnimationFrame(
|
|
698
|
+
f = !0, cancelAnimationFrame(y);
|
|
685
699
|
};
|
|
686
700
|
}, []), p(() => {
|
|
687
|
-
if (!
|
|
688
|
-
const
|
|
701
|
+
if (!u.current || !N) return;
|
|
702
|
+
const i = u.current, d = "react-custom-styles";
|
|
689
703
|
let f = !0;
|
|
690
|
-
return
|
|
691
|
-
f && N && (
|
|
704
|
+
return i.ready?.().then(() => {
|
|
705
|
+
f && N && (i.registerStyles?.(d, N), V.current = d);
|
|
692
706
|
}), () => {
|
|
693
|
-
f = !1, V.current && (
|
|
707
|
+
f = !1, V.current && (i.unregisterStyles?.(V.current), V.current = null);
|
|
694
708
|
};
|
|
695
709
|
}, [N]), p(() => {
|
|
696
|
-
const
|
|
697
|
-
if (!
|
|
698
|
-
const
|
|
710
|
+
const i = u.current;
|
|
711
|
+
if (!i) return;
|
|
712
|
+
const d = [];
|
|
699
713
|
if (O) {
|
|
700
|
-
const f = ((
|
|
701
|
-
|
|
714
|
+
const f = ((y) => O(y.detail.rows));
|
|
715
|
+
i.addEventListener("rows-change", f), d.push(["rows-change", f]);
|
|
702
716
|
}
|
|
703
717
|
return () => {
|
|
704
|
-
|
|
705
|
-
|
|
718
|
+
d.forEach(([f, y]) => {
|
|
719
|
+
i.removeEventListener(f, y);
|
|
706
720
|
});
|
|
707
721
|
};
|
|
708
722
|
}, [O]);
|
|
709
|
-
const ie = w(() => Object.keys(z).filter((
|
|
710
|
-
for (const
|
|
711
|
-
se.current[
|
|
723
|
+
const ie = w(() => Object.keys(z).filter((i) => typeof C[i] == "function").sort().join("|"), [C]), se = S({});
|
|
724
|
+
for (const i of Object.keys(z))
|
|
725
|
+
se.current[i] = C[i];
|
|
712
726
|
return p(() => {
|
|
713
|
-
const
|
|
714
|
-
if (!
|
|
715
|
-
const
|
|
716
|
-
for (const [f,
|
|
727
|
+
const i = u.current;
|
|
728
|
+
if (!i) return;
|
|
729
|
+
const d = [];
|
|
730
|
+
for (const [f, y] of Object.entries(z))
|
|
717
731
|
if (ie.includes(f)) {
|
|
718
|
-
const
|
|
719
|
-
se.current[f]?.(
|
|
732
|
+
const F = ((D) => {
|
|
733
|
+
se.current[f]?.(D.detail, D);
|
|
720
734
|
});
|
|
721
|
-
|
|
735
|
+
i.addEventListener(y, F), d.push([y, F]);
|
|
722
736
|
}
|
|
723
737
|
return () => {
|
|
724
|
-
|
|
725
|
-
|
|
738
|
+
d.forEach(([f, y]) => {
|
|
739
|
+
i.removeEventListener(f, y);
|
|
726
740
|
});
|
|
727
741
|
};
|
|
728
742
|
}, [ie]), ye(
|
|
729
743
|
e,
|
|
730
744
|
() => ({
|
|
731
745
|
get element() {
|
|
732
|
-
return
|
|
746
|
+
return u.current;
|
|
733
747
|
},
|
|
734
748
|
async getConfig() {
|
|
735
|
-
return
|
|
749
|
+
return u.current?.getConfig?.() ?? {};
|
|
736
750
|
},
|
|
737
751
|
async ready() {
|
|
738
|
-
return
|
|
752
|
+
return u.current?.ready?.();
|
|
739
753
|
},
|
|
740
754
|
async forceLayout() {
|
|
741
|
-
return
|
|
755
|
+
return u.current?.forceLayout?.();
|
|
742
756
|
},
|
|
743
|
-
async toggleGroup(
|
|
744
|
-
return
|
|
757
|
+
async toggleGroup(i) {
|
|
758
|
+
return u.current?.toggleGroup?.(i);
|
|
745
759
|
},
|
|
746
|
-
registerStyles(
|
|
747
|
-
|
|
760
|
+
registerStyles(i, d) {
|
|
761
|
+
u.current?.registerStyles?.(i, d);
|
|
748
762
|
},
|
|
749
|
-
unregisterStyles(
|
|
750
|
-
|
|
763
|
+
unregisterStyles(i) {
|
|
764
|
+
u.current?.unregisterStyles?.(i);
|
|
751
765
|
},
|
|
752
|
-
setRowLoading(
|
|
753
|
-
|
|
766
|
+
setRowLoading(i, d) {
|
|
767
|
+
u.current?.setRowLoading?.(i, d);
|
|
754
768
|
},
|
|
755
|
-
setCellLoading(
|
|
756
|
-
|
|
769
|
+
setCellLoading(i, d, f) {
|
|
770
|
+
u.current?.setCellLoading?.(i, d, f);
|
|
757
771
|
},
|
|
758
|
-
isRowLoading(
|
|
759
|
-
return
|
|
772
|
+
isRowLoading(i) {
|
|
773
|
+
return u.current?.isRowLoading?.(i) ?? !1;
|
|
760
774
|
},
|
|
761
|
-
isCellLoading(
|
|
762
|
-
return
|
|
775
|
+
isCellLoading(i, d) {
|
|
776
|
+
return u.current?.isCellLoading?.(i, d) ?? !1;
|
|
763
777
|
},
|
|
764
778
|
clearAllLoading() {
|
|
765
|
-
|
|
779
|
+
u.current?.clearAllLoading?.();
|
|
766
780
|
}
|
|
767
781
|
}),
|
|
768
782
|
[]
|
|
769
783
|
), /* @__PURE__ */ b(
|
|
770
784
|
"tbw-grid",
|
|
771
785
|
{
|
|
772
|
-
ref: (
|
|
773
|
-
if (
|
|
774
|
-
const
|
|
775
|
-
G && (
|
|
786
|
+
ref: (i) => {
|
|
787
|
+
if (u.current = i, i) {
|
|
788
|
+
const d = i;
|
|
789
|
+
G && (d.gridConfig = G), r && (d.rows = r), A && (d.columns = A);
|
|
776
790
|
}
|
|
777
791
|
},
|
|
778
|
-
class:
|
|
792
|
+
class: ue,
|
|
779
793
|
style: fe,
|
|
780
|
-
children: /* @__PURE__ */ b(Oe.Provider, { value:
|
|
794
|
+
children: /* @__PURE__ */ b(Oe.Provider, { value: u, children: M })
|
|
781
795
|
}
|
|
782
796
|
);
|
|
783
797
|
});
|
|
@@ -789,11 +803,11 @@ export {
|
|
|
789
803
|
Ye as b,
|
|
790
804
|
Ue as c,
|
|
791
805
|
Ne as d,
|
|
792
|
-
|
|
806
|
+
De as e,
|
|
793
807
|
Xe as f,
|
|
794
808
|
Qe as g,
|
|
795
809
|
Je as h,
|
|
796
|
-
|
|
810
|
+
le as i,
|
|
797
811
|
et as r,
|
|
798
812
|
Ze as u
|
|
799
813
|
};
|
package/features/export.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExportPlugin as p } from "@toolbox-web/grid/plugins/export";
|
|
2
2
|
import { useContext as a, useCallback as n } from "react";
|
|
3
|
-
import { G as c } from "../chunks/data-grid-
|
|
3
|
+
import { G as c } from "../chunks/data-grid-B0FOIoOo.js";
|
|
4
4
|
import { r as f } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
5
5
|
f("export", (i) => {
|
|
6
6
|
const t = typeof i == "boolean" ? {} : i ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filtering.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/filtering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"filtering.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/filtering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAGL,KAAK,WAAW,EAEjB,MAAM,qCAAqC,CAAC;AAgC7C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IAE9E;;OAEG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAC;IAEtD;;OAEG;IACH,UAAU,EAAE,MAAM,WAAW,EAAE,CAAC;IAEhC;;OAEG;IACH,cAAc,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAEjD;;OAEG;IACH,eAAe,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAE1C;;OAEG;IACH,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAE5C;;OAEG;IACH,mBAAmB,EAAE,MAAM,MAAM,CAAC;IAElC;;OAEG;IACH,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,CA0FnD"}
|
package/features/filtering.js
CHANGED
|
@@ -1,16 +1,31 @@
|
|
|
1
|
-
import { FilteringPlugin as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { FilteringPlugin as g } from "@toolbox-web/grid/plugins/filtering";
|
|
2
|
+
import { useContext as m, useCallback as n } from "react";
|
|
3
|
+
import { flushSync as w } from "react-dom";
|
|
4
|
+
import { createRoot as P } from "react-dom/client";
|
|
5
|
+
import { G as b } from "../chunks/data-grid-B0FOIoOo.js";
|
|
6
|
+
import { r as R } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
7
|
+
R("filtering", (i) => {
|
|
8
|
+
if (typeof i == "boolean") return new g();
|
|
9
|
+
if (!i) return new g();
|
|
10
|
+
const e = i, o = { ...e };
|
|
11
|
+
if (typeof e.filterPanelRenderer == "function" && e.filterPanelRenderer.length <= 1) {
|
|
12
|
+
const s = e.filterPanelRenderer;
|
|
13
|
+
o.filterPanelRenderer = (d, c) => {
|
|
14
|
+
const l = document.createElement("div");
|
|
15
|
+
l.style.display = "contents";
|
|
16
|
+
const f = P(l);
|
|
17
|
+
w(() => {
|
|
18
|
+
f.render(s(c));
|
|
19
|
+
}), d.appendChild(l);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return new g(o);
|
|
8
23
|
});
|
|
9
|
-
function
|
|
10
|
-
const
|
|
11
|
-
(
|
|
12
|
-
const
|
|
13
|
-
if (!
|
|
24
|
+
function x() {
|
|
25
|
+
const i = m(b), e = n(() => i?.current?.getPlugin(g), [i]), o = n(
|
|
26
|
+
(t, r) => {
|
|
27
|
+
const u = e();
|
|
28
|
+
if (!u) {
|
|
14
29
|
console.warn(
|
|
15
30
|
`[tbw-grid:filtering] FilteringPlugin not found.
|
|
16
31
|
|
|
@@ -19,13 +34,13 @@ function h() {
|
|
|
19
34
|
);
|
|
20
35
|
return;
|
|
21
36
|
}
|
|
22
|
-
|
|
37
|
+
u.setFilter(t, r);
|
|
23
38
|
},
|
|
24
|
-
[
|
|
25
|
-
), s =
|
|
26
|
-
(
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
39
|
+
[e]
|
|
40
|
+
), s = n((t) => e()?.getFilter(t), [e]), d = n(() => e()?.getFilters() ?? [], [e]), c = n(
|
|
41
|
+
(t) => {
|
|
42
|
+
const r = e();
|
|
43
|
+
if (!r) {
|
|
29
44
|
console.warn(
|
|
30
45
|
`[tbw-grid:filtering] FilteringPlugin not found.
|
|
31
46
|
|
|
@@ -34,12 +49,12 @@ function h() {
|
|
|
34
49
|
);
|
|
35
50
|
return;
|
|
36
51
|
}
|
|
37
|
-
|
|
52
|
+
r.setFilterModel(t);
|
|
38
53
|
},
|
|
39
|
-
[
|
|
40
|
-
),
|
|
41
|
-
const
|
|
42
|
-
if (!
|
|
54
|
+
[e]
|
|
55
|
+
), l = n(() => {
|
|
56
|
+
const t = e();
|
|
57
|
+
if (!t) {
|
|
43
58
|
console.warn(
|
|
44
59
|
`[tbw-grid:filtering] FilteringPlugin not found.
|
|
45
60
|
|
|
@@ -48,11 +63,11 @@ function h() {
|
|
|
48
63
|
);
|
|
49
64
|
return;
|
|
50
65
|
}
|
|
51
|
-
|
|
52
|
-
}, [
|
|
53
|
-
(
|
|
54
|
-
const
|
|
55
|
-
if (!
|
|
66
|
+
t.clearAllFilters();
|
|
67
|
+
}, [e]), f = n(
|
|
68
|
+
(t) => {
|
|
69
|
+
const r = e();
|
|
70
|
+
if (!r) {
|
|
56
71
|
console.warn(
|
|
57
72
|
`[tbw-grid:filtering] FilteringPlugin not found.
|
|
58
73
|
|
|
@@ -61,22 +76,22 @@ function h() {
|
|
|
61
76
|
);
|
|
62
77
|
return;
|
|
63
78
|
}
|
|
64
|
-
|
|
79
|
+
r.clearFieldFilter(t);
|
|
65
80
|
},
|
|
66
|
-
[
|
|
67
|
-
),
|
|
81
|
+
[e]
|
|
82
|
+
), a = n((t) => e()?.isFieldFiltered(t) ?? !1, [e]), F = n(() => e()?.getFilteredRowCount() ?? 0, [e]), p = n((t) => e()?.getUniqueValues(t) ?? [], [e]);
|
|
68
83
|
return {
|
|
69
|
-
setFilter:
|
|
84
|
+
setFilter: o,
|
|
70
85
|
getFilter: s,
|
|
71
|
-
getFilters:
|
|
72
|
-
setFilterModel:
|
|
73
|
-
clearAllFilters:
|
|
86
|
+
getFilters: d,
|
|
87
|
+
setFilterModel: c,
|
|
88
|
+
clearAllFilters: l,
|
|
74
89
|
clearFieldFilter: f,
|
|
75
|
-
isFieldFiltered:
|
|
90
|
+
isFieldFiltered: a,
|
|
76
91
|
getFilteredRowCount: F,
|
|
77
92
|
getUniqueValues: p
|
|
78
93
|
};
|
|
79
94
|
}
|
|
80
95
|
export {
|
|
81
|
-
|
|
96
|
+
x as useGridFiltering
|
|
82
97
|
};
|
package/features/print.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PrintPlugin as i } from "@toolbox-web/grid/plugins/print";
|
|
2
2
|
import { useContext as g, useCallback as n } from "react";
|
|
3
|
-
import { G as a } from "../chunks/data-grid-
|
|
3
|
+
import { G as a } from "../chunks/data-grid-B0FOIoOo.js";
|
|
4
4
|
import { r as p } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
5
5
|
p("print", (r) => r === !0 ? new i() : new i(r ?? void 0));
|
|
6
6
|
function m() {
|
package/features/selection.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SelectionPlugin as i } from "@toolbox-web/grid/plugins/selection";
|
|
2
2
|
import { useContext as w, useCallback as o } from "react";
|
|
3
|
-
import { G as S } from "../chunks/data-grid-
|
|
3
|
+
import { G as S } from "../chunks/data-grid-B0FOIoOo.js";
|
|
4
4
|
import { r as C } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
5
5
|
C("selection", (e) => e === "cell" || e === "row" || e === "range" ? new i({ mode: e }) : new i(e ?? void 0));
|
|
6
6
|
function P() {
|
package/features/undo-redo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UndoRedoPlugin as t } from "@toolbox-web/grid/plugins/undo-redo";
|
|
2
2
|
import { useContext as g, useCallback as e } from "react";
|
|
3
|
-
import { G as R } from "../chunks/data-grid-
|
|
3
|
+
import { G as R } from "../chunks/data-grid-B0FOIoOo.js";
|
|
4
4
|
import { r as f } from "../chunks/feature-registry-Y3KvnN54.js";
|
|
5
5
|
f("undoRedo", (d) => {
|
|
6
6
|
const o = typeof d == "boolean" ? {} : d ?? {};
|
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-B0FOIoOo.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-B0FOIoOo.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/context-types.d.ts
CHANGED
|
@@ -24,10 +24,25 @@ export interface GridEditorContext<TValue = unknown, TRow = unknown> {
|
|
|
24
24
|
column: ColumnConfig<TRow>;
|
|
25
25
|
/** Field key */
|
|
26
26
|
field: keyof TRow & string;
|
|
27
|
+
/** Stable row identifier (from `getRowId`). Empty string if no `getRowId` is configured. */
|
|
28
|
+
rowId: string;
|
|
27
29
|
/** Commit the new value and close editor */
|
|
28
30
|
commit: (newValue: TValue) => void;
|
|
29
31
|
/** Cancel editing without saving */
|
|
30
32
|
cancel: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Update other fields in this row while the editor is open.
|
|
35
|
+
* Changes trigger `cell-change` events with source `'cascade'`.
|
|
36
|
+
*/
|
|
37
|
+
updateRow: (changes: Partial<TRow>) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Register a callback to receive value updates when the cell is modified
|
|
40
|
+
* externally (e.g., via `updateRow()` from another cell's commit).
|
|
41
|
+
*
|
|
42
|
+
* React editors receive the full context at render time; use this to
|
|
43
|
+
* update local state when another cell cascades a change.
|
|
44
|
+
*/
|
|
45
|
+
onValueChange?: (callback: (newValue: TValue) => void) => void;
|
|
31
46
|
}
|
|
32
47
|
/**
|
|
33
48
|
* Context object passed to detail panel components.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-types.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/context-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,MAAM,GAAG,OAAO,EAAE,IAAI,GAAG,OAAO;IAC/D,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,GAAG,EAAE,IAAI,CAAC;IACV,+BAA+B;IAC/B,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IAC3B,gBAAgB;IAChB,KAAK,EAAE,MAAM,IAAI,GAAG,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,OAAO,EAAE,IAAI,GAAG,OAAO;IACjE,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,GAAG,EAAE,IAAI,CAAC;IACV,+BAA+B;IAC/B,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IAC3B,gBAAgB;IAChB,KAAK,EAAE,MAAM,IAAI,GAAG,MAAM,CA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,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;CAChE;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,IAAI,GAAG,OAAO;IAC/C,0BAA0B;IAC1B,GAAG,EAAE,IAAI,CAAC;IACV,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,IAAI,EAAE,WAAW,CAAC;CACnB"}
|
package/lib/feature-props.d.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { ClipboardConfig, ColumnVirtualizationConfig, ContextMenuConfig, ExportConfig, FilterConfig, GroupingColumnsConfig, GroupingRowsConfig, MasterDetailConfig, MultiSortConfig, PinnedRowsConfig, PivotConfig, PrintConfig, ReorderConfig, ResponsivePluginConfig, RowReorderConfig, SelectionConfig, ServerSideConfig, TreeConfig, UndoRedoConfig, VisibilityConfig } from '@toolbox-web/grid/all';
|
|
2
2
|
import { EditingConfig } from '@toolbox-web/grid/plugins/editing';
|
|
3
|
+
import { FilterPanelParams } from '@toolbox-web/grid/plugins/filtering';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* React-specific filter config that allows React components as `filterPanelRenderer`.
|
|
7
|
+
*
|
|
8
|
+
* Extends the base FilterConfig to accept a React render function
|
|
9
|
+
* `(params: FilterPanelParams) => ReactNode` in addition to the vanilla
|
|
10
|
+
* `(container: HTMLElement, params: FilterPanelParams) => void` signature.
|
|
11
|
+
*/
|
|
12
|
+
type ReactFilterConfig<TRow = unknown> = Omit<FilterConfig<TRow>, 'filterPanelRenderer'> & {
|
|
13
|
+
filterPanelRenderer?: FilterConfig<TRow>['filterPanelRenderer'] | ((params: FilterPanelParams) => ReactNode);
|
|
14
|
+
};
|
|
3
15
|
/**
|
|
4
16
|
* Feature props for declarative plugin configuration.
|
|
5
17
|
* Each prop lazily loads its corresponding plugin when used.
|
|
@@ -107,7 +119,7 @@ export interface FeatureProps<TRow = unknown> {
|
|
|
107
119
|
* <DataGrid filtering={{ debounceMs: 200 }} />
|
|
108
120
|
* ```
|
|
109
121
|
*/
|
|
110
|
-
filtering?: boolean |
|
|
122
|
+
filtering?: boolean | ReactFilterConfig<TRow>;
|
|
111
123
|
/**
|
|
112
124
|
* Enable column drag-to-reorder.
|
|
113
125
|
*
|
|
@@ -139,9 +151,9 @@ export interface FeatureProps<TRow = unknown> {
|
|
|
139
151
|
* @example
|
|
140
152
|
* ```tsx
|
|
141
153
|
* <DataGrid pinnedColumns columns={[
|
|
142
|
-
* { field: 'id',
|
|
154
|
+
* { field: 'id', pinned: 'left' },
|
|
143
155
|
* { field: 'name' },
|
|
144
|
-
* { field: 'actions',
|
|
156
|
+
* { field: 'actions', pinned: 'right' },
|
|
145
157
|
* ]} />
|
|
146
158
|
* ```
|
|
147
159
|
*/
|
|
@@ -330,4 +342,5 @@ export interface SSRProps {
|
|
|
330
342
|
* All feature-related props combined.
|
|
331
343
|
*/
|
|
332
344
|
export type AllFeatureProps<TRow = unknown> = FeatureProps<TRow> & SSRProps;
|
|
345
|
+
export {};
|
|
333
346
|
//# sourceMappingURL=feature-props.d.ts.map
|
|
@@ -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,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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,4 +1,5 @@
|
|
|
1
1
|
import { TypeDefault as BaseTypeDefault, CellRenderContext, ColumnEditorContext } from '@toolbox-web/grid';
|
|
2
|
+
import { FilterPanelParams } from '@toolbox-web/grid/plugins/filtering';
|
|
2
3
|
import { FC, ReactNode } from 'react';
|
|
3
4
|
/**
|
|
4
5
|
* Type default configuration for React applications.
|
|
@@ -25,6 +26,25 @@ export interface TypeDefault<TRow = unknown, TValue = unknown> {
|
|
|
25
26
|
editor?: (ctx: ColumnEditorContext<TRow, TValue>) => ReactNode;
|
|
26
27
|
/** Default editorParams for this type */
|
|
27
28
|
editorParams?: Record<string, unknown>;
|
|
29
|
+
/**
|
|
30
|
+
* Custom filter panel renderer for this type. Requires FilteringPlugin.
|
|
31
|
+
*
|
|
32
|
+
* Returns JSX to render as the custom filter panel content.
|
|
33
|
+
* The rendered content is mounted into the filter panel container.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* filterPanelRenderer: (params) => (
|
|
38
|
+
* <MyFilterPanel
|
|
39
|
+
* field={params.field}
|
|
40
|
+
* uniqueValues={params.uniqueValues}
|
|
41
|
+
* onApply={(values) => params.applySetFilter(values)}
|
|
42
|
+
* onClear={params.clearFilter}
|
|
43
|
+
* />
|
|
44
|
+
* )
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
filterPanelRenderer?: (params: FilterPanelParams) => ReactNode;
|
|
28
48
|
}
|
|
29
49
|
/**
|
|
30
50
|
* @deprecated Use `TypeDefault` instead.
|
|
@@ -132,6 +152,15 @@ export declare function useTypeDefault<TRow = unknown, TValue = unknown>(type: s
|
|
|
132
152
|
* @internal
|
|
133
153
|
*/
|
|
134
154
|
export declare function typeDefaultToBaseTypeDefault<TRow = unknown>(typeDefault: TypeDefault<TRow>, renderReactNode: (node: ReactNode) => HTMLElement): BaseTypeDefault<TRow>;
|
|
155
|
+
/**
|
|
156
|
+
* Wraps a React filter panel renderer into a vanilla FilterPanelRenderer.
|
|
157
|
+
*
|
|
158
|
+
* Mounts react content into the filter panel container element.
|
|
159
|
+
* Automatically unmounts the previous root when a new panel opens.
|
|
160
|
+
*
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
163
|
+
export declare function wrapReactFilterPanelRenderer(reactFn: (params: FilterPanelParams) => ReactNode, renderReactNode: (node: ReactNode) => HTMLElement): (container: HTMLElement, params: FilterPanelParams) => void;
|
|
135
164
|
/**
|
|
136
165
|
* @deprecated Use `typeDefaultToBaseTypeDefault` instead.
|
|
137
166
|
* @see {@link typeDefaultToBaseTypeDefault}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-type-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/grid-type-registry.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAChH,OAAO,EAA6B,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,WAAW,C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G;AACH,eAAO,MAAM,uBAAuB,iDAAkB,CAAC"}
|
|
@@ -143,6 +143,11 @@ export declare class GridAdapter implements FrameworkAdapter {
|
|
|
143
143
|
* @internal
|
|
144
144
|
*/
|
|
145
145
|
private createTypeEditor;
|
|
146
|
+
/**
|
|
147
|
+
* Creates a filter panel renderer that mounts React content into the filter panel container.
|
|
148
|
+
* @internal
|
|
149
|
+
*/
|
|
150
|
+
private createFilterPanelRenderer;
|
|
146
151
|
/**
|
|
147
152
|
* Clean up all mounted React roots.
|
|
148
153
|
* Call this when the grid is unmounted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-grid-adapter.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-grid-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACZ,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"react-grid-adapter.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-grid-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAoB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAiB9E;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,SAAS,GAChE,IAAI,CAaN;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,CAAC,GAAG,EAAE,mBAAmB,CA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