@toolbox-web/grid-react 1.8.2 → 1.9.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.
Files changed (64) hide show
  1. package/README.md +1 -0
  2. package/features/clipboard.d.ts +1 -0
  3. package/features/clipboard.d.ts.map +1 -1
  4. package/features/column-virtualization.d.ts +1 -0
  5. package/features/column-virtualization.d.ts.map +1 -1
  6. package/features/context-menu.d.ts +1 -0
  7. package/features/context-menu.d.ts.map +1 -1
  8. package/features/editing.d.ts +1 -0
  9. package/features/editing.d.ts.map +1 -1
  10. package/features/export.d.ts +1 -0
  11. package/features/export.d.ts.map +1 -1
  12. package/features/filtering.d.ts +1 -0
  13. package/features/filtering.d.ts.map +1 -1
  14. package/features/grouping-columns.d.ts +1 -1
  15. package/features/grouping-columns.d.ts.map +1 -1
  16. package/features/grouping-rows.d.ts +1 -1
  17. package/features/grouping-rows.d.ts.map +1 -1
  18. package/features/index.d.ts.map +1 -1
  19. package/features/index.js +1 -0
  20. package/features/master-detail.d.ts +1 -0
  21. package/features/master-detail.d.ts.map +1 -1
  22. package/features/multi-sort.d.ts +1 -0
  23. package/features/multi-sort.d.ts.map +1 -1
  24. package/features/pinned-columns.d.ts +1 -0
  25. package/features/pinned-columns.d.ts.map +1 -1
  26. package/features/pinned-rows.d.ts +1 -0
  27. package/features/pinned-rows.d.ts.map +1 -1
  28. package/features/pivot.d.ts +1 -0
  29. package/features/pivot.d.ts.map +1 -1
  30. package/features/print.d.ts +1 -0
  31. package/features/print.d.ts.map +1 -1
  32. package/features/reorder-columns.d.ts +1 -0
  33. package/features/reorder-columns.d.ts.map +1 -1
  34. package/features/reorder-rows.d.ts +1 -0
  35. package/features/reorder-rows.d.ts.map +1 -1
  36. package/features/responsive.d.ts +1 -0
  37. package/features/responsive.d.ts.map +1 -1
  38. package/features/row-drag-drop.d.ts +1 -0
  39. package/features/row-drag-drop.d.ts.map +1 -1
  40. package/features/selection.d.ts +1 -0
  41. package/features/selection.d.ts.map +1 -1
  42. package/features/server-side.d.ts +1 -0
  43. package/features/server-side.d.ts.map +1 -1
  44. package/features/shell.d.ts +2 -0
  45. package/features/shell.d.ts.map +1 -0
  46. package/features/shell.js +1 -0
  47. package/features/sticky-rows.d.ts +1 -0
  48. package/features/sticky-rows.d.ts.map +1 -1
  49. package/features/tooltip.d.ts +1 -0
  50. package/features/tooltip.d.ts.map +1 -1
  51. package/features/tree.d.ts +1 -0
  52. package/features/tree.d.ts.map +1 -1
  53. package/features/undo-redo.d.ts +1 -0
  54. package/features/undo-redo.d.ts.map +1 -1
  55. package/features/visibility.d.ts +1 -0
  56. package/features/visibility.d.ts.map +1 -1
  57. package/index.js +226 -222
  58. package/lib/feature-props.d.ts +12 -0
  59. package/lib/feature-props.d.ts.map +1 -1
  60. package/lib/grid-header-content.d.ts.map +1 -1
  61. package/lib/grid-toolbar-content.d.ts.map +1 -1
  62. package/lib/internal/feature-augmentations.d.ts +1 -0
  63. package/lib/internal/feature-augmentations.d.ts.map +1 -1
  64. package/package.json +1 -1
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { jsx as S, Fragment as U, jsxs as he } from "react/jsx-runtime";
1
+ import { jsx as x, Fragment as U, jsxs as he } from "react/jsx-runtime";
2
2
  import { DataGridElement as ue } from "@toolbox-web/grid";
3
- import { Children as ve, isValidElement as we, createContext as ae, useContext as T, forwardRef as le, useRef as P, useReducer as Re, useImperativeHandle as fe, useLayoutEffect as de, Component as be, useMemo as F, useEffect as b, createElement as Pe, useCallback as D, useId as ge, useState as O } from "react";
3
+ import { Children as ve, isValidElement as we, createContext as ae, useContext as T, forwardRef as le, useRef as P, useReducer as Re, useImperativeHandle as fe, useLayoutEffect as de, Component as be, useMemo as F, useEffect as b, createElement as Pe, useCallback as D, useId as ge, useState as N } from "react";
4
4
  import { g as te, G as Ge, c as Se, d as xe } from "./chunks/react-grid-adapter-LBf2Mqhn.js";
5
5
  import { e as hr, f as vr } from "./chunks/react-grid-adapter-LBf2Mqhn.js";
6
6
  import { s as ne, r as pe, a as me } from "./chunks/portal-bridge-CvxNt40O.js";
@@ -10,22 +10,22 @@ import { r as Rr } from "./chunks/post-mount-refresh-hooks-Dt7mPoZC.js";
10
10
  import { p as Fe } from "./chunks/react-column-config-BOe_PgL1.js";
11
11
  import { r as Pr } from "./chunks/react-column-config-BOe_PgL1.js";
12
12
  import { createPluginsFromFeatures as Te } from "@toolbox-web/grid/features/registry";
13
- import { G as N } from "./chunks/grid-element-context-BU3WvNtM.js";
13
+ import { G as O } from "./chunks/grid-element-context-BU3WvNtM.js";
14
14
  import { G as Sr } from "./chunks/grid-detail-panel-BZFcujsZ.js";
15
15
  import { G as Er } from "./chunks/grid-responsive-card-CSZhDCoN.js";
16
16
  const q = /* @__PURE__ */ new Map();
17
- function ye(t, r) {
17
+ function Ce(t, r) {
18
18
  q.set(t, r);
19
19
  }
20
20
  function ke(t) {
21
21
  const r = {};
22
- return q.size === 0 || ve.forEach(t, (f) => {
23
- if (!we(f)) return;
24
- const n = f.type, c = typeof n == "string" ? void 0 : n?.displayName;
25
- if (typeof c != "string") return;
26
- const d = q.get(c);
27
- if (!d) return;
28
- const l = d(f);
22
+ return q.size === 0 || ve.forEach(t, (d) => {
23
+ if (!we(d)) return;
24
+ const n = d.type, s = typeof n == "string" ? void 0 : n?.displayName;
25
+ if (typeof s != "string") return;
26
+ const g = q.get(s);
27
+ if (!g) return;
28
+ const l = g(d);
29
29
  l && Object.assign(r, l);
30
30
  }), r;
31
31
  }
@@ -39,13 +39,13 @@ const Le = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "date
39
39
  function Ae(t) {
40
40
  const r = t.lastIndexOf(":");
41
41
  if (r > 0) {
42
- const f = t.slice(r + 1).toLowerCase();
43
- if (Le.has(f)) {
42
+ const d = t.slice(r + 1).toLowerCase();
43
+ if (Le.has(d)) {
44
44
  const n = t.slice(0, r);
45
45
  return {
46
46
  field: n,
47
47
  header: ie(n),
48
- type: f
48
+ type: d
49
49
  };
50
50
  }
51
51
  }
@@ -57,13 +57,13 @@ function Ae(t) {
57
57
  function Me(t) {
58
58
  return t.map((r) => typeof r == "string" ? Ae(r) : r);
59
59
  }
60
- function Oe(t, r) {
61
- return r ? t.map((f) => ({ ...r, ...f })) : t;
60
+ function Ne(t, r) {
61
+ return r ? t.map((d) => ({ ...r, ...d })) : t;
62
62
  }
63
63
  function or(t) {
64
64
  return t.some((r) => typeof r == "string");
65
65
  }
66
- const B = {
66
+ const K = {
67
67
  onCellClick: "cell-click",
68
68
  onRowClick: "row-click",
69
69
  onCellActivate: "cell-activate",
@@ -106,19 +106,19 @@ const B = {
106
106
  onPrintComplete: "print-complete",
107
107
  onTbwScroll: "tbw-scroll",
108
108
  onRender: "render"
109
- }, W = ae(null), Ne = ({ icons: t, children: r }) => /* @__PURE__ */ S(W.Provider, { value: t, children: r });
109
+ }, W = ae(null), Oe = ({ icons: t, children: r }) => /* @__PURE__ */ x(W.Provider, { value: t, children: r });
110
110
  function ir() {
111
111
  return T(W);
112
112
  }
113
- const $e = W, $ = ae(null), je = ({ defaults: t, children: r }) => /* @__PURE__ */ S($.Provider, { value: t, children: r });
113
+ const He = W, H = ae(null), $e = ({ defaults: t, children: r }) => /* @__PURE__ */ x(H.Provider, { value: t, children: r });
114
114
  function sr() {
115
- return T($);
115
+ return T(H);
116
116
  }
117
117
  function cr(t) {
118
- return T($)?.[t];
118
+ return T(H)?.[t];
119
119
  }
120
- const ze = $;
121
- class He extends be {
120
+ const je = H;
121
+ class Be extends be {
122
122
  state = { failed: !1 };
123
123
  static getDerivedStateFromError() {
124
124
  return { failed: !0 };
@@ -130,96 +130,96 @@ class He extends be {
130
130
  return this.state.failed ? null : this.props.children;
131
131
  }
132
132
  }
133
- const Ke = le(function(r, f) {
134
- const n = P(/* @__PURE__ */ new Map()), [, c] = Re((y) => y + 1, 0), d = P(!1), l = P(0), u = P(0), h = P(!1), g = P(!1), v = () => {
135
- d.current || (d.current = !0, queueMicrotask(() => {
136
- d.current = !1, !g.current && (oe(c), w());
133
+ const ze = le(function(r, d) {
134
+ const n = P(/* @__PURE__ */ new Map()), [, s] = Re((C) => C + 1, 0), g = P(!1), l = P(0), u = P(0), v = P(!1), f = P(!1), w = () => {
135
+ g.current || (g.current = !0, queueMicrotask(() => {
136
+ g.current = !1, !f.current && (oe(s), R());
137
137
  }));
138
- }, w = () => {
138
+ }, R = () => {
139
139
  l.current || (l.current = requestAnimationFrame(() => {
140
- l.current = 0, !g.current && c();
140
+ l.current = 0, !f.current && s();
141
141
  }));
142
- }, R = (y, o) => {
143
- console.error(`[grid-react] Portal "${y}" crashed; dropping.`, o), n.current.delete(y), w();
142
+ }, y = (C, o) => {
143
+ console.error(`[grid-react] Portal "${C}" crashed; dropping.`, o), n.current.delete(C), R();
144
144
  };
145
145
  fe(
146
- f,
146
+ d,
147
147
  () => ({
148
- renderPortal(y, o, m) {
149
- g.current || (n.current.set(y, { container: o, element: m }), v());
148
+ renderPortal(C, o, m) {
149
+ f.current || (n.current.set(C, { container: o, element: m }), w());
150
150
  },
151
- removePortal(y, o) {
152
- if (g.current) {
153
- n.current.delete(y);
151
+ removePortal(C, o) {
152
+ if (f.current) {
153
+ n.current.delete(C);
154
154
  return;
155
155
  }
156
- n.current.delete(y) && (u.current > 0 ? h.current = !0 : o ? oe(c) : v());
156
+ n.current.delete(C) && (u.current > 0 ? v.current = !0 : o ? oe(s) : w());
157
157
  },
158
158
  beginBatch() {
159
159
  u.current++;
160
160
  },
161
161
  endBatch() {
162
- u.current !== 0 && (u.current--, u.current === 0 && h.current && (h.current = !1, c()));
162
+ u.current !== 0 && (u.current--, u.current === 0 && v.current && (v.current = !1, s()));
163
163
  },
164
164
  clear() {
165
- if (g.current) {
165
+ if (f.current) {
166
166
  n.current.clear();
167
167
  return;
168
168
  }
169
- n.current.size > 0 && (n.current.clear(), l.current && (cancelAnimationFrame(l.current), l.current = 0), v());
169
+ n.current.size > 0 && (n.current.clear(), l.current && (cancelAnimationFrame(l.current), l.current = 0), w());
170
170
  }
171
171
  }),
172
172
  // forceRender is stable (useReducer dispatch), refs are stable
173
173
  // eslint-disable-next-line react-hooks/exhaustive-deps
174
174
  []
175
175
  ), de(() => {
176
- g.current = !1;
177
- const y = n.current;
176
+ f.current = !1;
177
+ const C = n.current;
178
178
  return () => {
179
- g.current = !0, l.current && (cancelAnimationFrame(l.current), l.current = 0), y.clear();
179
+ f.current = !0, l.current && (cancelAnimationFrame(l.current), l.current = 0), C.clear();
180
180
  };
181
181
  }, []);
182
182
  const G = [];
183
- let x = null;
184
- for (const [y, { container: o, element: m }] of n.current) {
183
+ let S = null;
184
+ for (const [C, { container: o, element: m }] of n.current) {
185
185
  if (!o.isConnected) {
186
- (x ??= []).push(y);
186
+ (S ??= []).push(C);
187
187
  continue;
188
188
  }
189
189
  G.push(
190
190
  Ee(
191
- /* @__PURE__ */ S(He, { portalKey: y, onError: R, children: m }),
191
+ /* @__PURE__ */ x(Be, { portalKey: C, onError: y, children: m }),
192
192
  o,
193
- y
193
+ C
194
194
  )
195
195
  );
196
196
  }
197
- if (x) {
198
- const y = x;
197
+ if (S) {
198
+ const C = S;
199
199
  queueMicrotask(() => {
200
- for (const o of y) n.current.delete(o);
200
+ for (const o of C) n.current.delete(o);
201
201
  });
202
202
  }
203
- return /* @__PURE__ */ S(U, { children: G });
204
- }), Be = {
203
+ return /* @__PURE__ */ x(U, { children: G });
204
+ }), Ke = {
205
205
  undoRedo: ["editing"],
206
206
  clipboard: ["selection"]
207
207
  };
208
208
  function _e(t) {
209
209
  const r = new Set(t);
210
- for (const f of t) {
211
- const n = Be[f];
210
+ for (const d of t) {
211
+ const n = Ke[d];
212
212
  if (n)
213
- for (const c of n)
214
- r.has(c) || console.warn(
215
- `[DataGrid] Feature "${f}" requires "${c}" to be enabled. Add the "${c}" prop to your DataGrid.`
213
+ for (const s of n)
214
+ r.has(s) || console.warn(
215
+ `[DataGrid] Feature "${d}" requires "${s}" to be enabled. Add the "${s}" prop to your DataGrid.`
216
216
  );
217
217
  }
218
218
  }
219
219
  function qe(t) {
220
220
  const r = [];
221
- for (const [f, n] of Object.entries(t))
222
- n === void 0 || n === !1 || r.push(f);
221
+ for (const [d, n] of Object.entries(t))
222
+ n === void 0 || n === !1 || r.push(d);
223
223
  return _e(r), Te(t);
224
224
  }
225
225
  let se = !1, _ = null;
@@ -233,7 +233,7 @@ function Ue(t) {
233
233
  let r = ce.get(t);
234
234
  return r === void 0 && (r = ++Ve, ce.set(t, r)), r;
235
235
  }
236
- ye("GridDetailPanel", (t) => {
236
+ Ce("GridDetailPanel", (t) => {
237
237
  const r = t.props;
238
238
  return {
239
239
  masterDetail: {
@@ -243,79 +243,79 @@ ye("GridDetailPanel", (t) => {
243
243
  }
244
244
  };
245
245
  });
246
- ye("GridResponsiveCard", () => ({
246
+ Ce("GridResponsiveCard", () => ({
247
247
  // GridResponsiveCard only carries cardRowHeight; breakpoint is set via the
248
248
  // responsive prop. Enable the plugin with defaults — user can override.
249
249
  responsive: !0
250
250
  }));
251
- const ur = le(function(r, f) {
251
+ const ur = le(function(r, d) {
252
252
  const {
253
253
  // Core props
254
254
  rows: n,
255
- gridConfig: c,
256
- columns: d,
255
+ gridConfig: s,
256
+ columns: g,
257
257
  columnDefaults: l,
258
258
  fitMode: u,
259
- sortable: h,
260
- filterable: g,
261
- selectable: v,
262
- loading: w,
263
- customStyles: R,
259
+ sortable: v,
260
+ filterable: f,
261
+ selectable: w,
262
+ loading: R,
263
+ customStyles: y,
264
264
  className: G,
265
- style: x,
266
- children: y,
265
+ style: S,
266
+ children: C,
267
267
  // Plugin props
268
268
  plugins: o,
269
269
  // SSR mode (deprecated - see SSRProps)
270
270
  ssr: m,
271
271
  // Legacy event handlers
272
- onRowsChange: C,
272
+ onRowsChange: h,
273
273
  // Feature props and event props are in ...rest
274
274
  ...p
275
- } = r, a = P(null), M = P(null), J = P(!1), Y = T(ze), j = T($e), Ce = F(() => te().map((e) => {
275
+ } = r, a = P(null), M = P(null), J = P(!1), Y = T(je), $ = T(He), ye = F(() => te().map((e) => {
276
276
  const i = p[e];
277
277
  if (i === void 0) return "";
278
- let s;
278
+ let c;
279
279
  try {
280
- s = JSON.stringify(i) ?? "undefined";
280
+ c = JSON.stringify(i) ?? "undefined";
281
281
  } catch {
282
- s = typeof i == "object" && i !== null ? `ref#${Ue(i)}` : `prim:${String(i)}`;
282
+ c = typeof i == "object" && i !== null ? `ref#${Ue(i)}` : `prim:${String(i)}`;
283
283
  }
284
- return `${e}:${s}`;
284
+ return `${e}:${c}`;
285
285
  }).filter(Boolean).join("|"), [p]), Z = F(() => {
286
286
  const e = {}, i = p;
287
- for (const s of te()) {
288
- const E = i[s];
289
- E !== void 0 && (e[s] = E);
287
+ for (const c of te()) {
288
+ const E = i[c];
289
+ E !== void 0 && (e[c] = E);
290
290
  }
291
291
  return e;
292
- }, [Ce]), Q = F(() => ke(y), [y]), X = F(() => {
293
- const e = c?.features, i = {};
294
- for (const [s, E] of Object.entries(Q))
295
- e && s in e && e[s] !== void 0 && e[s] !== !1 || (i[s] = E);
292
+ }, [ye]), Q = F(() => ke(C), [C]), X = F(() => {
293
+ const e = s?.features, i = {};
294
+ for (const [c, E] of Object.entries(Q))
295
+ e && c in e && e[c] !== void 0 && e[c] !== !1 || (i[c] = E);
296
296
  return { ...i, ...Z };
297
- }, [Z, Q, c]), z = F(() => o || m ? [] : qe(X), [X, o, m]), k = F(() => {
297
+ }, [Z, Q, s]), j = F(() => o || m ? [] : qe(X), [X, o, m]), k = F(() => {
298
298
  if (o) {
299
- const e = new Set(o.map((s) => s.name)), i = z.filter((s) => !e.has(s.name));
299
+ const e = new Set(o.map((c) => c.name)), i = j.filter((c) => !e.has(c.name));
300
300
  return [...o, ...i];
301
301
  }
302
- return z;
303
- }, [o, z]), I = F(() => d && Oe(Me(d), l), [d, l]), L = F(() => {
304
- const e = Fe(c), i = {};
305
- if (h !== void 0 && (i.sortable = h), g !== void 0 && (i.filterable = g), v !== void 0 && (i.selectable = v), j) {
306
- const s = e?.icons || c?.icons || {};
307
- i.icons = { ...j, ...s };
302
+ return j;
303
+ }, [o, j]), I = F(() => g && Ne(Me(g), l), [g, l]), L = F(() => {
304
+ const e = Fe(s), i = {};
305
+ if (v !== void 0 && (i.sortable = v), f !== void 0 && (i.filterable = f), w !== void 0 && (i.selectable = w), $) {
306
+ const c = e?.icons || s?.icons || {};
307
+ i.icons = { ...$, ...c };
308
308
  }
309
309
  if (k.length > 0 && e) {
310
- const s = e.plugins || [], E = new Set(s.map((A) => A.name)), K = k.filter((A) => !E.has(A.name));
310
+ const c = e.plugins || [], E = new Set(c.map((A) => A.name)), z = k.filter((A) => !E.has(A.name));
311
311
  return {
312
312
  ...e,
313
313
  ...i,
314
- plugins: [...s, ...K]
314
+ plugins: [...c, ...z]
315
315
  };
316
316
  }
317
317
  return k.length > 0 && !e ? { ...i, plugins: k } : Object.keys(i).length > 0 ? { ...e, ...i } : e;
318
- }, [c, k, h, g, v, j]);
318
+ }, [s, k, v, f, w, $]);
319
319
  b(() => {
320
320
  V().setTypeDefaults(Y);
321
321
  }, [Y]), b(() => {
@@ -327,54 +327,54 @@ const ur = le(function(r, f) {
327
327
  }, [I]), b(() => {
328
328
  a.current && u !== void 0 && (a.current.fitMode = u);
329
329
  }, [u]), b(() => {
330
- a.current && w !== void 0 && (a.current.loading = w);
331
- }, [w]), b(() => {
330
+ a.current && R !== void 0 && (a.current.loading = R);
331
+ }, [R]), b(() => {
332
332
  const e = a.current;
333
333
  if (!e) return;
334
334
  const i = V();
335
335
  e.__frameworkAdapter = i, De(e);
336
- let s = !1;
336
+ let c = !1;
337
337
  const E = requestAnimationFrame(() => {
338
- s || (typeof e.refreshColumns == "function" && e.refreshColumns(), typeof e.refreshShellHeader == "function" && e.refreshShellHeader());
338
+ c || (typeof e.refreshColumns == "function" && e.refreshColumns(), typeof e.refreshShellHeader == "function" && e.refreshShellHeader());
339
339
  });
340
340
  return () => {
341
- s = !0, cancelAnimationFrame(E);
341
+ c = !0, cancelAnimationFrame(E);
342
342
  };
343
343
  }, []), b(() => {
344
- if (!a.current || !R) return;
344
+ if (!a.current || !y) return;
345
345
  const e = a.current, i = "react-custom-styles";
346
- let s = !0;
346
+ let c = !0;
347
347
  return e.ready?.().then(() => {
348
- s && R && (e.registerStyles?.(i, R), M.current = i);
348
+ c && y && (e.registerStyles?.(i, y), M.current = i);
349
349
  }), () => {
350
- s = !1, M.current && (e.unregisterStyles?.(M.current), M.current = null);
350
+ c = !1, M.current && (e.unregisterStyles?.(M.current), M.current = null);
351
351
  };
352
- }, [R]), b(() => {
352
+ }, [y]), b(() => {
353
353
  const e = a.current;
354
354
  if (!e) return;
355
355
  const i = [];
356
- return C && i.push(e.on("rows-change", (s) => C(s.rows))), () => {
357
- i.forEach((s) => s());
356
+ return h && i.push(e.on("rows-change", (c) => h(c.rows))), () => {
357
+ i.forEach((c) => c());
358
358
  };
359
- }, [C]);
360
- const ee = F(() => Object.keys(B).filter((e) => typeof p[e] == "function").sort().join("|"), [p]), re = P({});
361
- for (const e of Object.keys(B))
359
+ }, [h]);
360
+ const ee = F(() => Object.keys(K).filter((e) => typeof p[e] == "function").sort().join("|"), [p]), re = P({});
361
+ for (const e of Object.keys(K))
362
362
  re.current[e] = p[e];
363
363
  b(() => {
364
364
  const e = a.current;
365
365
  if (!e) return;
366
366
  const i = [];
367
- for (const [s, E] of Object.entries(B))
368
- ee.includes(s) && i.push(
369
- e.on(E, (K, A) => {
370
- re.current[s]?.(K, A);
367
+ for (const [c, E] of Object.entries(K))
368
+ ee.includes(c) && i.push(
369
+ e.on(E, (z, A) => {
370
+ re.current[c]?.(z, A);
371
371
  })
372
372
  );
373
373
  return () => {
374
- i.forEach((s) => s());
374
+ i.forEach((c) => c());
375
375
  };
376
376
  }, [ee]), fe(
377
- f,
377
+ d,
378
378
  () => ({
379
379
  get element() {
380
380
  return a.current;
@@ -400,8 +400,8 @@ const ur = le(function(r, f) {
400
400
  setRowLoading(e, i) {
401
401
  a.current?.setRowLoading?.(e, i);
402
402
  },
403
- setCellLoading(e, i, s) {
404
- a.current?.setCellLoading?.(e, i, s);
403
+ setCellLoading(e, i, c) {
404
+ a.current?.setCellLoading?.(e, i, c);
405
405
  },
406
406
  isRowLoading(e) {
407
407
  return a.current?.isRowLoading?.(e) ?? !1;
@@ -415,14 +415,14 @@ const ur = le(function(r, f) {
415
415
  }),
416
416
  []
417
417
  );
418
- const H = P(null);
418
+ const B = P(null);
419
419
  return de(() => {
420
420
  const e = a.current;
421
- return e && H.current && ne(e, H.current), () => {
421
+ return e && B.current && ne(e, B.current), () => {
422
422
  e && ne(e, null);
423
423
  };
424
424
  }, []), /* @__PURE__ */ he(U, { children: [
425
- /* @__PURE__ */ S(Ke, { ref: H }),
425
+ /* @__PURE__ */ x(ze, { ref: B }),
426
426
  Pe(
427
427
  ue.activeTag,
428
428
  {
@@ -434,128 +434,132 @@ const ur = le(function(r, f) {
434
434
  }
435
435
  },
436
436
  class: G,
437
- style: x
437
+ style: S
438
438
  },
439
- /* @__PURE__ */ S(N.Provider, { value: a, children: y })
439
+ /* @__PURE__ */ x(O.Provider, { value: a, children: C })
440
440
  )
441
441
  ] });
442
442
  });
443
443
  function ar(t) {
444
444
  const {
445
445
  field: r,
446
- header: f,
446
+ header: d,
447
447
  type: n,
448
- editable: c,
449
- sortable: d,
448
+ editable: s,
449
+ sortable: g,
450
450
  resizable: l,
451
451
  width: u,
452
- minWidth: h,
453
- hidden: g,
454
- lockVisible: v,
455
- children: w,
456
- editor: R,
452
+ minWidth: v,
453
+ hidden: f,
454
+ lockVisible: w,
455
+ children: R,
456
+ editor: y,
457
457
  options: G,
458
- multi: x,
459
- format: y
458
+ multi: S,
459
+ format: C
460
460
  } = t, o = P(null), m = D(
461
461
  (a) => {
462
- o.current = a, a && (w && Se(a, w), R && xe(a, R));
462
+ o.current = a, a && (R && Se(a, R), y && xe(a, y));
463
463
  },
464
- [w, R]
465
- ), C = typeof u == "number" ? `${u}px` : u, p = {
464
+ [R, y]
465
+ ), h = typeof u == "number" ? `${u}px` : u, p = {
466
466
  field: r,
467
467
  ref: m
468
468
  };
469
- return f !== void 0 && (p.header = f), n !== void 0 && (p.type = n), c !== void 0 && (p.editable = c), d !== void 0 && (p.sortable = d), l !== void 0 && (p.resizable = l), C !== void 0 && (p.width = C), h !== void 0 && (p["min-width"] = h), g !== void 0 && (p.hidden = g), v !== void 0 && (p["lock-visible"] = v), x !== void 0 && (p.multi = x), y && (p["data-has-format"] = "true"), G && (p["data-has-options"] = "true"), /* @__PURE__ */ S("tbw-grid-column", { ...p });
469
+ return d !== void 0 && (p.header = d), n !== void 0 && (p.type = n), s !== void 0 && (p.editable = s), g !== void 0 && (p.sortable = g), l !== void 0 && (p.resizable = l), h !== void 0 && (p.width = h), v !== void 0 && (p["min-width"] = v), f !== void 0 && (p.hidden = f), w !== void 0 && (p["lock-visible"] = w), S !== void 0 && (p.multi = S), C && (p["data-has-format"] = "true"), G && (p["data-has-options"] = "true"), /* @__PURE__ */ x("tbw-grid-column", { ...p });
470
470
  }
471
- function lr({ id: t, order: r = 100, children: f }) {
472
- const n = ge(), c = t ?? `tbw-header-content-${n}`, d = T(N), [l, u] = O(null), h = P(null);
471
+ function lr({ id: t, order: r = 100, children: d }) {
472
+ const n = ge(), s = t ?? `tbw-header-content-${n}`, g = T(O), [l, u] = N(null), v = P(null);
473
473
  return b(() => {
474
- const g = d?.current;
475
- if (!g) return;
476
- const v = h;
477
- let w = !1;
474
+ const f = g?.current;
475
+ if (!f) return;
476
+ const w = v;
477
+ let R = !1;
478
478
  return (async () => {
479
479
  try {
480
- await g.ready?.();
480
+ await f.ready?.();
481
481
  } catch {
482
482
  return;
483
483
  }
484
- if (w) return;
485
- const R = {
486
- id: c,
484
+ if (R) return;
485
+ const y = {
486
+ id: s,
487
487
  order: r,
488
- render: (G) => (u(G), () => {
488
+ render: (S) => (u(S), () => {
489
489
  })
490
- };
491
- g.registerHeaderContent?.(R);
490
+ }, G = f.getPluginByName?.("shell");
491
+ G?.registerHeaderContent ? G.registerHeaderContent(y) : f.registerHeaderContent?.(y);
492
492
  })(), () => {
493
- w = !0, g.unregisterHeaderContent?.(c), v.current && (pe(v.current, { sync: !0 }), v.current = null), u(null);
493
+ R = !0;
494
+ const y = f.getPluginByName?.("shell");
495
+ y?.unregisterHeaderContent ? y.unregisterHeaderContent(s) : f.unregisterHeaderContent?.(s), w.current && (pe(w.current, { sync: !0 }), w.current = null), u(null);
494
496
  };
495
- }, [d, c, r]), b(() => {
497
+ }, [g, s, r]), b(() => {
496
498
  if (!l) return;
497
- const g = d?.current ?? void 0;
498
- h.current = me(l, f, h.current ?? void 0, g);
499
- }, [f, l, d]), null;
499
+ const f = g?.current ?? void 0;
500
+ v.current = me(l, d, v.current ?? void 0, f);
501
+ }, [d, l, g]), null;
500
502
  }
501
503
  function fr({ children: t }) {
502
- return /* @__PURE__ */ S("tbw-grid-tool-buttons", { children: t });
504
+ return /* @__PURE__ */ x("tbw-grid-tool-buttons", { children: t });
503
505
  }
504
- function dr({ id: t, order: r = 100, children: f }) {
505
- const n = ge(), c = t ?? `tbw-toolbar-content-${n}`, d = T(N), [l, u] = O(null), h = P(null);
506
+ function dr({ id: t, order: r = 100, children: d }) {
507
+ const n = ge(), s = t ?? `tbw-toolbar-content-${n}`, g = T(O), [l, u] = N(null), v = P(null);
506
508
  return b(() => {
507
- const g = d?.current;
508
- if (!g) return;
509
- const v = h;
510
- let w = !1;
509
+ const f = g?.current;
510
+ if (!f) return;
511
+ const w = v;
512
+ let R = !1;
511
513
  return (async () => {
512
514
  try {
513
- await g.ready?.();
515
+ await f.ready?.();
514
516
  } catch {
515
517
  return;
516
518
  }
517
- if (w) return;
518
- const R = {
519
- id: c,
519
+ if (R) return;
520
+ const y = {
521
+ id: s,
520
522
  order: r,
521
- render: (G) => (u(G), () => {
523
+ render: (S) => (u(S), () => {
522
524
  })
523
- };
524
- g.registerToolbarContent?.(R);
525
+ }, G = f.getPluginByName?.("shell");
526
+ G?.registerToolbarContent ? G.registerToolbarContent(y) : f.registerToolbarContent?.(y);
525
527
  })(), () => {
526
- w = !0, g.unregisterToolbarContent?.(c), v.current && (pe(v.current, { sync: !0 }), v.current = null), u(null);
528
+ R = !0;
529
+ const y = f.getPluginByName?.("shell");
530
+ y?.unregisterToolbarContent ? y.unregisterToolbarContent(s) : f.unregisterToolbarContent?.(s), w.current && (pe(w.current, { sync: !0 }), w.current = null), u(null);
527
531
  };
528
- }, [d, c, r]), b(() => {
532
+ }, [g, s, r]), b(() => {
529
533
  if (!l) return;
530
- const g = d?.current ?? void 0;
531
- h.current = me(l, f, h.current ?? void 0, g);
532
- }, [f, l, d]), null;
534
+ const f = g?.current ?? void 0;
535
+ v.current = me(l, d, v.current ?? void 0, f);
536
+ }, [d, l, g]), null;
533
537
  }
534
- const gr = ({ icons: t, defaults: r, children: f }) => {
535
- let n = f;
536
- return r && (n = /* @__PURE__ */ S(je, { defaults: r, children: n })), t && (n = /* @__PURE__ */ S(Ne, { icons: t, children: n })), /* @__PURE__ */ S(U, { children: n });
538
+ const gr = ({ icons: t, defaults: r, children: d }) => {
539
+ let n = d;
540
+ return r && (n = /* @__PURE__ */ x($e, { defaults: r, children: n })), t && (n = /* @__PURE__ */ x(Oe, { icons: t, children: n })), /* @__PURE__ */ x(U, { children: n });
537
541
  };
538
542
  function pr(t) {
539
- const r = P(null), [f, n] = O(!1), [c, d] = O(null), l = P(null), u = D(() => t ? (l.current ??= document.querySelector(t), l.current) : r.current?.element ?? null, [t]);
543
+ const r = P(null), [d, n] = N(!1), [s, g] = N(null), l = P(null), u = D(() => t ? (l.current ??= document.querySelector(t), l.current) : r.current?.element ?? null, [t]);
540
544
  b(() => {
541
545
  let o = !0;
542
546
  return (async () => {
543
547
  try {
544
548
  if (t) {
545
- const C = document.querySelector(t);
546
- if (!C) return;
547
- if (l.current = C, await C.ready?.(), o) {
549
+ const h = document.querySelector(t);
550
+ if (!h) return;
551
+ if (l.current = h, await h.ready?.(), o) {
548
552
  n(!0);
549
- const p = await C.getConfig?.();
550
- o && p && d(p);
553
+ const p = await h.getConfig?.();
554
+ o && p && g(p);
551
555
  }
552
556
  } else {
553
- const C = r.current;
554
- if (!C) return;
555
- if (await C.ready?.(), o) {
557
+ const h = r.current;
558
+ if (!h) return;
559
+ if (await h.ready?.(), o) {
556
560
  n(!0);
557
- const p = await C.getConfig?.();
558
- o && p && d(p);
561
+ const p = await h.getConfig?.();
562
+ o && p && g(p);
559
563
  }
560
564
  }
561
565
  } catch {
@@ -564,13 +568,13 @@ function pr(t) {
564
568
  o = !1;
565
569
  };
566
570
  }, [t]);
567
- const h = D(async () => {
571
+ const v = D(async () => {
568
572
  const o = u();
569
573
  if (o)
570
574
  return await o.getConfig?.() ?? null;
571
575
  const m = r.current;
572
576
  return m ? await m.getConfig?.() ?? null : null;
573
- }, [u]), g = D(async () => {
577
+ }, [u]), f = D(async () => {
574
578
  const o = u();
575
579
  if (o) {
576
580
  await o.forceLayout?.();
@@ -578,34 +582,34 @@ function pr(t) {
578
582
  }
579
583
  const m = r.current;
580
584
  m && await m.forceLayout?.();
581
- }, [u]), v = D(
585
+ }, [u]), w = D(
582
586
  async (o) => {
583
587
  const m = u();
584
588
  if (m) {
585
589
  await m.toggleGroup?.(o);
586
590
  return;
587
591
  }
588
- const C = r.current;
589
- C && await C.toggleGroup?.(o);
592
+ const h = r.current;
593
+ h && await h.toggleGroup?.(o);
590
594
  },
591
595
  [u]
592
- ), w = D(
596
+ ), R = D(
593
597
  (o) => u()?.getPlugin?.(o),
594
598
  [u]
595
- ), R = D(
599
+ ), y = D(
596
600
  ((o) => u()?.getPluginByName?.(o)),
597
601
  [u]
598
602
  ), G = D(
599
603
  (o, m) => {
600
- const C = u();
601
- if (C) {
602
- C.registerStyles?.(o, m);
604
+ const h = u();
605
+ if (h) {
606
+ h.registerStyles?.(o, m);
603
607
  return;
604
608
  }
605
609
  r.current?.registerStyles?.(o, m);
606
610
  },
607
611
  [u]
608
- ), x = D(
612
+ ), S = D(
609
613
  (o) => {
610
614
  const m = u();
611
615
  if (m) {
@@ -615,34 +619,34 @@ function pr(t) {
615
619
  r.current?.unregisterStyles?.(o);
616
620
  },
617
621
  [u]
618
- ), y = D(() => c?.columns ? c.columns.filter((o) => !o.hidden) : [], [c]);
622
+ ), C = D(() => s?.columns ? s.columns.filter((o) => !o.hidden) : [], [s]);
619
623
  return {
620
624
  ref: r,
621
625
  element: u(),
622
- isReady: f,
623
- config: c,
624
- getConfig: h,
625
- forceLayout: g,
626
- toggleGroup: v,
627
- getPlugin: w,
628
- getPluginByName: R,
626
+ isReady: d,
627
+ config: s,
628
+ getConfig: v,
629
+ forceLayout: f,
630
+ toggleGroup: w,
631
+ getPlugin: R,
632
+ getPluginByName: y,
629
633
  registerStyles: G,
630
- unregisterStyles: x,
631
- getVisibleColumns: y
634
+ unregisterStyles: S,
635
+ getVisibleColumns: C
632
636
  };
633
637
  }
634
638
  function mr(t, r = {}) {
635
- const { open: f = !0, gridElement: n } = r, c = T(N);
639
+ const { open: d = !0, gridElement: n } = r, s = T(O);
636
640
  b(() => {
637
- if (!f) return;
638
- const d = t.current;
639
641
  if (!d) return;
640
- const l = n ?? d.closest("tbw-grid, [data-tbw-grid]") ?? c?.current ?? null;
642
+ const g = t.current;
643
+ if (!g) return;
644
+ const l = n ?? g.closest("tbw-grid, [data-tbw-grid]") ?? s?.current ?? null;
641
645
  if (l)
642
- return l.registerExternalFocusContainer?.(d), () => {
643
- l.unregisterExternalFocusContainer?.(d);
646
+ return l.registerExternalFocusContainer?.(g), () => {
647
+ l.unregisterExternalFocusContainer?.(g);
644
648
  };
645
- }, [f, n, c, t]);
649
+ }, [d, n, s, t]);
646
650
  }
647
651
  export {
648
652
  ur as DataGrid,
@@ -650,18 +654,18 @@ export {
650
654
  ar as GridColumn,
651
655
  Sr as GridDetailPanel,
652
656
  lr as GridHeaderContent,
653
- Ne as GridIconProvider,
657
+ Oe as GridIconProvider,
654
658
  gr as GridProvider,
655
659
  Er as GridResponsiveCard,
656
660
  fr as GridToolButtons,
657
661
  hr as GridToolPanel,
658
662
  dr as GridToolbarContent,
659
- je as GridTypeProvider,
660
- Oe as applyColumnDefaults,
663
+ $e as GridTypeProvider,
664
+ Ne as applyColumnDefaults,
661
665
  or as hasColumnShorthands,
662
666
  Me as normalizeColumns,
663
667
  Ae as parseColumnShorthand,
664
- ye as registerChildFeatureDetector,
668
+ Ce as registerChildFeatureDetector,
665
669
  Pr as registerEditorMountHook,
666
670
  vr as registerFeaturePropKey,
667
671
  Rr as registerPostMountRefresh,