@toolbox-web/grid-react 0.11.0 → 0.12.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.
@@ -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 y } from "react-dom";
5
- import { createRoot as v } from "react-dom/client";
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 De = Q, $ = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new Map();
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 Pe(n) {
76
- const { children: t, cardRowHeight: e = "auto" } = n, r = S(null), i = Z(
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 c = s.closest("tbw-grid");
81
- if (c) {
82
- const u = c.id || c.getAttribute("data-grid-id");
83
- u && W.set(u, t);
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 c = s.closest("tbw-grid");
93
- if (c) {
94
- const u = c.id || c.getAttribute("data-grid-id");
95
- u && W.delete(u);
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 d = e === "auto" ? "auto" : String(e);
100
- return /* @__PURE__ */ b("tbw-grid-responsive-card", { ref: i, cardRowHeight: d });
99
+ const c = e === "auto" ? "auto" : String(e);
100
+ return /* @__PURE__ */ b("tbw-grid-responsive-card", { ref: o, cardRowHeight: c });
101
101
  }
102
- Pe.displayName = "GridResponsiveCard";
103
- const T = Y(null), Ye = ({ defaults: n, children: t }) => /* @__PURE__ */ b(T.Provider, { value: n, children: t });
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(T);
105
+ return I(L);
106
106
  }
107
107
  function Qe(n) {
108
- return I(T)?.[n];
108
+ return I(L)?.[n];
109
109
  }
110
- const Se = T;
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 y(() => {
118
+ return m(() => {
119
119
  s.root.render(n(e));
120
120
  }), s.container;
121
121
  }
122
- const i = document.createElement("div");
123
- i.className = "react-cell-renderer", i.style.display = "contents";
124
- const d = v(i);
125
- return y(() => {
126
- d.render(n(e));
127
- }), r && t.set(r, { root: d, container: i }), i;
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 = v(e);
135
- return y(() => {
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: i, ...d } = e, s = { ...d };
145
- return r && (s.renderer = xe(r)), i && (s.editor = Ae(i)), s;
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, i = S(null), d = Z(
165
- (c) => {
166
- if (i.current = c, !c) return;
167
- q.set(c, t);
168
- const u = c.closest("tbw-grid");
169
- if (u) {
170
- const g = u.id || u.getAttribute("data-grid-id");
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 c = i.current;
178
- if (c) {
179
- q.delete(c);
180
- const u = c.closest("tbw-grid");
181
- if (u) {
182
- const h = u.id || u.getAttribute("data-grid-id");
183
- h && B.delete(h);
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 = c.parentNode;
186
- g && g.contains(c);
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: d,
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: i, order: d = 100, children: s } = n, c = S(null), u = Z(
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
- c.current = g, g && (K.set(g, s), t && U.set(t, s));
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 = c.current;
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: u,
219
+ ref: l,
220
220
  id: t,
221
221
  title: e,
222
222
  icon: r,
223
- tooltip: i,
224
- order: d?.toString()
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 i = E.get(e) ?? {};
233
- i.renderer = t, E.set(e, i);
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 i = E.get(e) ?? {};
240
- i.editor = t, E.set(e, i);
239
+ const o = E.get(e) ?? {};
240
+ o.editor = t, E.set(e, o);
241
241
  }
242
242
  }
243
- function Le(n) {
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 Te(n) {
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 ue {
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 i = r?.renderer !== void 0, d = r?.editor !== void 0;
283
- return r !== void 0 && (i || d);
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 = Le(t);
297
+ const e = Fe(t);
298
298
  if (!e)
299
299
  return;
300
300
  const r = /* @__PURE__ */ new WeakMap();
301
- return (i) => {
302
- const d = i.cellEl;
303
- if (d) {
304
- const u = r.get(d);
305
- if (u)
306
- return y(() => {
307
- u.root.render(e(i));
308
- }), u.container;
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 h = v(g);
312
- return y(() => {
313
- h.render(e(i));
314
- }), r.set(d, { root: h, container: g, lastRowIndex: i.rowIndex ?? -1 }), this.mountedViews.push({ root: h, container: g }), g;
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 c = v(s);
319
- return y(() => {
320
- c.render(e(i));
321
- }), this.mountedViews.push({ root: c, container: s }), s;
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 = Te(t);
329
+ const e = Le(t);
330
330
  return e ? (r) => {
331
- const i = document.createElement("div");
332
- i.className = "react-cell-editor", i.style.display = "contents";
333
- const d = v(i);
334
- return y(() => {
335
- d.render(e(r));
336
- }), this.mountedViews.push({ root: d, container: i }), i;
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, i) => {
347
- const d = document.createElement("div");
348
- d.className = "react-detail-panel";
349
- const s = { row: r, rowIndex: i }, c = v(d);
350
- return y(() => {
351
- c.render(e(s));
352
- }), this.mountedViews.push({ root: c, container: d }), d;
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, i) => {
372
- const d = document.createElement("div");
373
- d.className = "react-responsive-card";
374
- const s = { row: r, index: i }, c = v(d);
375
- return y(() => {
376
- c.render(e(s));
377
- }), this.mountedViews.push({ root: c, container: d }), d;
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 (i) => {
390
- const d = {
391
- grid: r ?? i
392
- }, s = v(i);
393
- return y(() => {
394
- s.render(e(d));
395
- }), this.mountedViews.push({ root: s, container: i }), () => {
396
- const c = this.mountedViews.findIndex((u) => u.container === i);
397
- if (c !== -1) {
398
- const { root: u } = this.mountedViews[c];
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
- u.unmount();
400
+ l.unmount();
401
401
  } catch {
402
402
  }
403
- this.mountedViews.splice(c, 1);
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 i = v(r);
452
- return this.mountedViews.push({ root: i, container: r }), y(() => {
453
- i.render(t(e));
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 i = v(r);
466
- return this.mountedViews.push({ root: i, container: r }), y(() => {
467
- i.render(t(e));
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 = ue, ke = {
512
+ const rt = le, Te = {
499
513
  undoRedo: ["editing"],
500
514
  clipboard: ["selection"]
501
515
  };
502
- function Fe(n) {
516
+ function ke(n) {
503
517
  const t = new Set(n);
504
518
  for (const e of n) {
505
- const r = ke[e];
519
+ const r = Te[e];
506
520
  if (r)
507
- for (const i of r)
508
- t.has(i) || console.warn(
509
- `[DataGrid] Feature "${e}" requires "${i}" to be enabled. Add the "${i}" prop to your DataGrid.`
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, c] of Object.entries(r)) {
517
- if (c === void 0 || c === !1) continue;
518
- const u = s;
519
- e.push(u);
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
- Fe(e);
522
- const i = [
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
- ], d = [...new Set(i)].filter((s) => e.includes(s));
528
- for (const s of d) {
529
- const c = n[s];
530
- if (c === void 0 || c === !1) continue;
531
- const u = we(s, c);
532
- u && t.push(u);
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 ue(), pe.registerAdapter(_), ae = !0), _;
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 d = e.getPluginByName?.("responsive");
550
- if (d && typeof d.setCardRenderer == "function") {
563
+ const c = e.getPluginByName?.("responsive");
564
+ if (c && typeof c.setCardRenderer == "function") {
551
565
  const s = t.createResponsiveCardRenderer(n);
552
- s && d.setCardRenderer(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: i,
577
- columns: d,
590
+ gridConfig: o,
591
+ columns: c,
578
592
  columnDefaults: s,
579
- fitMode: c,
580
- sortable: u,
593
+ fitMode: a,
594
+ sortable: l,
581
595
  filterable: g,
582
- selectable: h,
583
- loading: k,
584
- editOn: F,
596
+ selectable: v,
597
+ loading: T,
598
+ editOn: k,
585
599
  customStyles: N,
586
- className: le,
600
+ className: ue,
587
601
  style: fe,
588
602
  children: M,
589
603
  // Plugin props
590
- plugins: D,
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, l = S(null), V = S(null), ee = I(Se), j = I(De), te = [
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((o) => {
623
- const a = C[o];
624
- return a !== void 0 ? `${o}:${JSON.stringify(a)}` : "";
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 o = {};
627
- for (const a of te)
628
- a in C && C[a] !== void 0 && (o[a] = C[a]);
629
- return o;
630
- }, [ge]), ne = w(() => ze(M), [M]), oe = w(() => ({ ...ne, ...re }), [re, ne]), H = w(() => D || X ? [] : Me(oe), [oe, D, X]), x = w(() => {
631
- if (D) {
632
- const o = new Set(D.map((f) => f.name)), a = H.filter((f) => !o.has(f.name));
633
- return [...D, ...a];
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
- }, [D, H]), A = w(() => {
637
- if (!d) return d;
638
- const o = Ee(d);
639
- return s ? o.map((a) => ({
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
- ...a
655
+ ...d
642
656
  // Individual column props override defaults
643
- })) : o;
644
- }, [d, s]), G = w(() => {
645
- const o = Ge(i), a = {};
646
- if (u !== void 0 && (a.sortable = u), g !== void 0 && (a.filterable = g), h !== void 0 && (a.selectable = h), j) {
647
- const f = o?.icons || i?.icons || {};
648
- a.icons = { ...j, ...f };
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 && o) {
651
- const f = o.plugins || [], m = new Set(f.map((P) => P.name)), L = x.filter((P) => !m.has(P.name));
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
- ...o,
654
- ...a,
655
- plugins: [...f, ...L]
667
+ ...i,
668
+ ...d,
669
+ plugins: [...f, ...F]
656
670
  };
657
671
  }
658
- return x.length > 0 && !o ? { ...a, plugins: x } : Object.keys(a).length > 0 ? { ...o, ...a } : o;
659
- }, [i, x, u, g, h, j]);
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
- l.current && (l.current.rows = r);
677
+ u.current && (u.current.rows = r);
664
678
  }, [r]), p(() => {
665
- l.current && G && (l.current.gridConfig = G);
679
+ u.current && G && (u.current.gridConfig = G);
666
680
  }, [G]), p(() => {
667
- l.current && A && (l.current.columns = A);
681
+ u.current && A && (u.current.columns = A);
668
682
  }, [A]), p(() => {
669
- l.current && c !== void 0 && (l.current.fitMode = c);
670
- }, [c]), p(() => {
671
- l.current && F !== void 0 && (l.current.editOn = F);
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
- const o = l.current;
676
- if (!o) return;
677
- const a = J();
678
- o.__frameworkAdapter = a, je(o), He(o, a);
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 m = requestAnimationFrame(() => {
681
- f || (typeof o.refreshColumns == "function" && o.refreshColumns(), typeof o.refreshShellHeader == "function" && o.refreshShellHeader());
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(m);
698
+ f = !0, cancelAnimationFrame(y);
685
699
  };
686
700
  }, []), p(() => {
687
- if (!l.current || !N) return;
688
- const o = l.current, a = "react-custom-styles";
701
+ if (!u.current || !N) return;
702
+ const i = u.current, d = "react-custom-styles";
689
703
  let f = !0;
690
- return o.ready?.().then(() => {
691
- f && N && (o.registerStyles?.(a, N), V.current = a);
704
+ return i.ready?.().then(() => {
705
+ f && N && (i.registerStyles?.(d, N), V.current = d);
692
706
  }), () => {
693
- f = !1, V.current && (o.unregisterStyles?.(V.current), V.current = null);
707
+ f = !1, V.current && (i.unregisterStyles?.(V.current), V.current = null);
694
708
  };
695
709
  }, [N]), p(() => {
696
- const o = l.current;
697
- if (!o) return;
698
- const a = [];
710
+ const i = u.current;
711
+ if (!i) return;
712
+ const d = [];
699
713
  if (O) {
700
- const f = ((m) => O(m.detail.rows));
701
- o.addEventListener("rows-change", f), a.push(["rows-change", f]);
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
- a.forEach(([f, m]) => {
705
- o.removeEventListener(f, m);
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((o) => typeof C[o] == "function").sort().join("|"), [C]), se = S({});
710
- for (const o of Object.keys(z))
711
- se.current[o] = C[o];
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 o = l.current;
714
- if (!o) return;
715
- const a = [];
716
- for (const [f, m] of Object.entries(z))
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 L = ((P) => {
719
- se.current[f]?.(P.detail, P);
732
+ const F = ((D) => {
733
+ se.current[f]?.(D.detail, D);
720
734
  });
721
- o.addEventListener(m, L), a.push([m, L]);
735
+ i.addEventListener(y, F), d.push([y, F]);
722
736
  }
723
737
  return () => {
724
- a.forEach(([f, m]) => {
725
- o.removeEventListener(f, m);
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 l.current;
746
+ return u.current;
733
747
  },
734
748
  async getConfig() {
735
- return l.current?.getConfig?.() ?? {};
749
+ return u.current?.getConfig?.() ?? {};
736
750
  },
737
751
  async ready() {
738
- return l.current?.ready?.();
752
+ return u.current?.ready?.();
739
753
  },
740
754
  async forceLayout() {
741
- return l.current?.forceLayout?.();
755
+ return u.current?.forceLayout?.();
742
756
  },
743
- async toggleGroup(o) {
744
- return l.current?.toggleGroup?.(o);
757
+ async toggleGroup(i) {
758
+ return u.current?.toggleGroup?.(i);
745
759
  },
746
- registerStyles(o, a) {
747
- l.current?.registerStyles?.(o, a);
760
+ registerStyles(i, d) {
761
+ u.current?.registerStyles?.(i, d);
748
762
  },
749
- unregisterStyles(o) {
750
- l.current?.unregisterStyles?.(o);
763
+ unregisterStyles(i) {
764
+ u.current?.unregisterStyles?.(i);
751
765
  },
752
- setRowLoading(o, a) {
753
- l.current?.setRowLoading?.(o, a);
766
+ setRowLoading(i, d) {
767
+ u.current?.setRowLoading?.(i, d);
754
768
  },
755
- setCellLoading(o, a, f) {
756
- l.current?.setCellLoading?.(o, a, f);
769
+ setCellLoading(i, d, f) {
770
+ u.current?.setCellLoading?.(i, d, f);
757
771
  },
758
- isRowLoading(o) {
759
- return l.current?.isRowLoading?.(o) ?? !1;
772
+ isRowLoading(i) {
773
+ return u.current?.isRowLoading?.(i) ?? !1;
760
774
  },
761
- isCellLoading(o, a) {
762
- return l.current?.isCellLoading?.(o, a) ?? !1;
775
+ isCellLoading(i, d) {
776
+ return u.current?.isCellLoading?.(i, d) ?? !1;
763
777
  },
764
778
  clearAllLoading() {
765
- l.current?.clearAllLoading?.();
779
+ u.current?.clearAllLoading?.();
766
780
  }
767
781
  }),
768
782
  []
769
783
  ), /* @__PURE__ */ b(
770
784
  "tbw-grid",
771
785
  {
772
- ref: (o) => {
773
- if (l.current = o, o) {
774
- const a = o;
775
- G && (a.gridConfig = G), r && (a.rows = r), A && (a.columns = A);
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: le,
792
+ class: ue,
779
793
  style: fe,
780
- children: /* @__PURE__ */ b(Oe.Provider, { value: l, children: M })
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
- Pe as e,
806
+ De as e,
793
807
  Xe as f,
794
808
  Qe as g,
795
809
  Je as h,
796
- ue as i,
810
+ le as i,
797
811
  et as r,
798
812
  Ze as u
799
813
  };
@@ -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-GKyKxE6c.js";
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,EAAmB,KAAK,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAUxF;;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,IAA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;;OAEG;IACH,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,CA0FnD"}
@@ -1,16 +1,31 @@
1
- import { FilteringPlugin as o } from "@toolbox-web/grid/plugins/filtering";
2
- import { useContext as w, useCallback as i } from "react";
3
- import { G as b } from "../chunks/data-grid-GKyKxE6c.js";
4
- import { r as m } from "../chunks/feature-registry-Y3KvnN54.js";
5
- m("filtering", (r) => {
6
- const t = typeof r == "boolean" ? {} : r ?? {};
7
- return new o(t);
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 h() {
10
- const r = w(b), t = i(() => r?.current?.getPlugin(o), [r]), g = i(
11
- (e, n) => {
12
- const l = t();
13
- if (!l) {
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
- l.setFilter(e, n);
37
+ u.setFilter(t, r);
23
38
  },
24
- [t]
25
- ), s = i((e) => t()?.getFilter(e), [t]), u = i(() => t()?.getFilters() ?? [], [t]), d = i(
26
- (e) => {
27
- const n = t();
28
- if (!n) {
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
- n.setFilterModel(e);
52
+ r.setFilterModel(t);
38
53
  },
39
- [t]
40
- ), a = i(() => {
41
- const e = t();
42
- if (!e) {
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
- e.clearAllFilters();
52
- }, [t]), f = i(
53
- (e) => {
54
- const n = t();
55
- if (!n) {
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
- n.clearFieldFilter(e);
79
+ r.clearFieldFilter(t);
65
80
  },
66
- [t]
67
- ), c = i((e) => t()?.isFieldFiltered(e) ?? !1, [t]), F = i(() => t()?.getFilteredRowCount() ?? 0, [t]), p = i((e) => t()?.getUniqueValues(e) ?? [], [t]);
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: g,
84
+ setFilter: o,
70
85
  getFilter: s,
71
- getFilters: u,
72
- setFilterModel: d,
73
- clearAllFilters: a,
86
+ getFilters: d,
87
+ setFilterModel: c,
88
+ clearAllFilters: l,
74
89
  clearFieldFilter: f,
75
- isFieldFiltered: c,
90
+ isFieldFiltered: a,
76
91
  getFilteredRowCount: F,
77
92
  getUniqueValues: p
78
93
  };
79
94
  }
80
95
  export {
81
- h as useGridFiltering
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-GKyKxE6c.js";
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() {
@@ -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-GKyKxE6c.js";
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() {
@@ -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-GKyKxE6c.js";
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-GKyKxE6c.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-GKyKxE6c.js";
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) {
@@ -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,CAAC;IAC3B,4CAA4C;IAC5C,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,oCAAoC;IACpC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;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"}
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,CAAC;IAC3B,4FAA4F;IAC5F,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,oCAAoC;IACpC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;;OAGG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC5C;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,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"}
@@ -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 | FilterConfig<TRow>;
122
+ filtering?: boolean | ReactFilterConfig<TRow>;
111
123
  /**
112
124
  * Enable column drag-to-reorder.
113
125
  *
@@ -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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;;;OASG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAExC;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAMxC;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAE5B;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAMlC;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,sBAAsB,CAAC;IAM9C;;;;;;;;;;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
+ {"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,WA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AW,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,CAAC,IAAI,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO;IAC3D,gEAAgE;IAChE,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,SAAS,CAAC;IAC/D,8DAA8D;IAC9D,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,SAAS,CAAC;IAC/D,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,IAAI,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAG3F;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAO1D;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;;;;;;;;OA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9B,eAAe,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,WAAW,GAChD,eAAe,CAAC,IAAI,CAAC,CA4BvB;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,SAAS,EACjD,eAAe,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,WAAW,GAChD,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAK7D;AAED;;;GAGG;AACH,eAAO,MAAM,iCAAiC,qCAA+B,CAAC;AAE9E;;;;GAIG;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;AAC3B,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,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2
2
  "name": "@toolbox-web/grid-react",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "React adapter for @toolbox-web/grid data grid component",
5
5
  "type": "module",
6
6
  "main": "./index.js",