@opencorestack/opengridx 1.0.4 → 1.0.5

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
- import ae, { useMemo as le, useState as Q, useCallback as z, useRef as J, useEffect as re, useLayoutEffect as Ee, useReducer as So } from "react";
1
+ import ae, { useMemo as le, useState as Z, useCallback as z, useRef as J, useEffect as re, useLayoutEffect as Ee, useReducer as jo } from "react";
2
2
  import Ge from "react-dom";
3
3
  var Tt = { exports: {} }, ht = {};
4
4
  var Pn;
5
- function jo() {
5
+ function Ro() {
6
6
  if (Pn) return ht;
7
7
  Pn = 1;
8
8
  var n = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
@@ -25,7 +25,7 @@ function jo() {
25
25
  }
26
26
  var pt = {};
27
27
  var Ln;
28
- function Ro() {
28
+ function Eo() {
29
29
  return Ln || (Ln = 1, process.env.NODE_ENV !== "production" && (function() {
30
30
  function n(C) {
31
31
  if (C == null) return null;
@@ -82,11 +82,11 @@ function Ro() {
82
82
  }
83
83
  if (B) {
84
84
  B = console;
85
- var O = B.error, W = typeof Symbol == "function" && Symbol.toStringTag && C[Symbol.toStringTag] || C.constructor.name || "Object";
86
- return O.call(
85
+ var W = B.error, O = typeof Symbol == "function" && Symbol.toStringTag && C[Symbol.toStringTag] || C.constructor.name || "Object";
86
+ return W.call(
87
87
  B,
88
88
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
89
- W
89
+ O
90
90
  ), t(C);
91
91
  }
92
92
  }
@@ -116,14 +116,14 @@ function Ro() {
116
116
  return C.key !== void 0;
117
117
  }
118
118
  function s(C, B) {
119
- function O() {
119
+ function W() {
120
120
  H || (H = !0, console.error(
121
121
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
122
122
  B
123
123
  ));
124
124
  }
125
- O.isReactWarning = !0, Object.defineProperty(C, "key", {
126
- get: O,
125
+ W.isReactWarning = !0, Object.defineProperty(C, "key", {
126
+ get: W,
127
127
  configurable: !0
128
128
  });
129
129
  }
@@ -133,14 +133,14 @@ function Ro() {
133
133
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
134
134
  )), C = this.props.ref, C !== void 0 ? C : null;
135
135
  }
136
- function d(C, B, O, W, V, G) {
137
- var D = O.ref;
136
+ function d(C, B, W, O, V, G) {
137
+ var D = W.ref;
138
138
  return C = {
139
139
  $$typeof: v,
140
140
  type: C,
141
141
  key: B,
142
- props: O,
143
- _owner: W
142
+ props: W,
143
+ _owner: O
144
144
  }, (D !== void 0 ? D : null) !== null ? Object.defineProperty(C, "ref", {
145
145
  enumerable: !1,
146
146
  get: c
@@ -166,13 +166,13 @@ function Ro() {
166
166
  value: G
167
167
  }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
168
168
  }
169
- function g(C, B, O, W, V, G) {
169
+ function g(C, B, W, O, V, G) {
170
170
  var D = B.children;
171
171
  if (D !== void 0)
172
- if (W)
172
+ if (O)
173
173
  if (I(D)) {
174
- for (W = 0; W < D.length; W++)
175
- x(D[W]);
174
+ for (O = 0; O < D.length; O++)
175
+ x(D[O]);
176
176
  Object.freeze && Object.freeze(D);
177
177
  } else
178
178
  console.error(
@@ -184,31 +184,31 @@ function Ro() {
184
184
  var P = Object.keys(B).filter(function(te) {
185
185
  return te !== "key";
186
186
  });
187
- W = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", K[D + W] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
187
+ O = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", K[D + O] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
188
188
  `A props object containing a "key" prop is being spread into JSX:
189
189
  let props = %s;
190
190
  <%s {...props} />
191
191
  React keys must be passed directly to JSX without using spread:
192
192
  let props = %s;
193
193
  <%s key={someKey} {...props} />`,
194
- W,
194
+ O,
195
195
  D,
196
196
  P,
197
197
  D
198
- ), K[D + W] = !0);
198
+ ), K[D + O] = !0);
199
199
  }
200
- if (D = null, O !== void 0 && (e(O), D = "" + O), a(B) && (e(B.key), D = "" + B.key), "key" in B) {
201
- O = {};
200
+ if (D = null, W !== void 0 && (e(W), D = "" + W), a(B) && (e(B.key), D = "" + B.key), "key" in B) {
201
+ W = {};
202
202
  for (var ne in B)
203
- ne !== "key" && (O[ne] = B[ne]);
204
- } else O = B;
203
+ ne !== "key" && (W[ne] = B[ne]);
204
+ } else W = B;
205
205
  return D && s(
206
- O,
206
+ W,
207
207
  typeof C == "function" ? C.displayName || C.name || "Unknown" : C
208
208
  ), d(
209
209
  C,
210
210
  D,
211
- O,
211
+ W,
212
212
  i(),
213
213
  V,
214
214
  G
@@ -232,38 +232,38 @@ React keys must be passed directly to JSX without using spread:
232
232
  m,
233
233
  l
234
234
  )(), q = F(o(l)), K = {};
235
- pt.Fragment = S, pt.jsx = function(C, B, O) {
236
- var W = 1e4 > M.recentlyCreatedOwnerStacks++;
235
+ pt.Fragment = S, pt.jsx = function(C, B, W) {
236
+ var O = 1e4 > M.recentlyCreatedOwnerStacks++;
237
237
  return g(
238
238
  C,
239
239
  B,
240
- O,
240
+ W,
241
241
  !1,
242
- W ? Error("react-stack-top-frame") : U,
243
- W ? F(o(C)) : q
242
+ O ? Error("react-stack-top-frame") : U,
243
+ O ? F(o(C)) : q
244
244
  );
245
- }, pt.jsxs = function(C, B, O) {
246
- var W = 1e4 > M.recentlyCreatedOwnerStacks++;
245
+ }, pt.jsxs = function(C, B, W) {
246
+ var O = 1e4 > M.recentlyCreatedOwnerStacks++;
247
247
  return g(
248
248
  C,
249
249
  B,
250
- O,
250
+ W,
251
251
  !0,
252
- W ? Error("react-stack-top-frame") : U,
253
- W ? F(o(C)) : q
252
+ O ? Error("react-stack-top-frame") : U,
253
+ O ? F(o(C)) : q
254
254
  );
255
255
  };
256
256
  })()), pt;
257
257
  }
258
258
  var Tn;
259
- function Eo() {
260
- return Tn || (Tn = 1, process.env.NODE_ENV === "production" ? Tt.exports = jo() : Tt.exports = Ro()), Tt.exports;
259
+ function No() {
260
+ return Tn || (Tn = 1, process.env.NODE_ENV === "production" ? Tt.exports = Ro() : Tt.exports = Eo()), Tt.exports;
261
261
  }
262
- var r = Eo();
262
+ var r = No();
263
263
  function zt(n, t) {
264
264
  return t ? t.left?.includes(n) ? "left" : t.right?.includes(n) ? "right" : null : null;
265
265
  }
266
- function No(n, t) {
266
+ function Mo(n, t) {
267
267
  const e = [], o = [], i = [];
268
268
  return t ? (n.forEach((l) => {
269
269
  const a = zt(l.field, t);
@@ -279,7 +279,7 @@ function No(n, t) {
279
279
  function An(n, t, e, o, i, l, a, s) {
280
280
  const c = {};
281
281
  if (!e) return c;
282
- const d = No(n, e);
282
+ const d = Mo(n, e);
283
283
  let g = 0;
284
284
  s && (g += 48), l && a && (g += 48), o && i && (g += 48), d.left.forEach((h) => {
285
285
  c[h.field] = g;
@@ -295,7 +295,7 @@ function An(n, t, e, o, i, l, a, s) {
295
295
  function cn(n, t) {
296
296
  return t ? t.top?.includes(n) ? "top" : t.bottom?.includes(n) ? "bottom" : null : null;
297
297
  }
298
- function Mo(n, t) {
298
+ function Io(n, t) {
299
299
  const e = [], o = [], i = [];
300
300
  return t ? (n.forEach((l) => {
301
301
  const a = cn(l.id, t);
@@ -320,7 +320,7 @@ function it(n) {
320
320
  }
321
321
  return { type: "fixed", value: 100 };
322
322
  }
323
- function Io(n) {
323
+ function Po(n) {
324
324
  const {
325
325
  rowHeight: t,
326
326
  pagination: e,
@@ -379,13 +379,13 @@ function Io(n) {
379
379
  }
380
380
  oe.type === "fixed" ? K.push({ col: A, width: oe.value }) : oe.type === "percentage" ? C.push({ col: A, percentage: oe.value }) : B.push({ col: A, flex: 1 });
381
381
  });
382
- const O = K.reduce((A, { width: X }) => A + X, 0);
383
- let W = Math.max(0, q - O);
382
+ const W = K.reduce((A, { width: X }) => A + X, 0);
383
+ let O = Math.max(0, q - W);
384
384
  const V = /* @__PURE__ */ new Map();
385
385
  C.forEach(({ col: A, percentage: X }) => {
386
- const oe = X / 100 * W;
387
- V.set(A.field, oe), W -= oe;
388
- }), W = Math.max(0, W);
386
+ const oe = X / 100 * O;
387
+ V.set(A.field, oe), O -= oe;
388
+ }), O = Math.max(0, O);
389
389
  const G = /* @__PURE__ */ new Map(), D = B.map((A) => ({
390
390
  ...A,
391
391
  minWidth: A.col.minWidth ?? 50,
@@ -400,7 +400,7 @@ function Io(n) {
400
400
  A++;
401
401
  const oe = D.filter((ie) => !ie.frozen);
402
402
  if (oe.length === 0) break;
403
- const ue = oe.reduce((ie, ye) => ie + ye.flex, 0), fe = D.reduce((ie, ye) => ye.frozen ? ie + ye.computedWidth : ie, 0), Ie = Math.max(0, W - fe);
403
+ const ue = oe.reduce((ie, Ce) => ie + Ce.flex, 0), fe = D.reduce((ie, Ce) => Ce.frozen ? ie + Ce.computedWidth : ie, 0), Ie = Math.max(0, O - fe);
404
404
  if (ue <= 0) {
405
405
  oe.forEach((ie) => {
406
406
  ie.computedWidth = ie.minWidth, ie.frozen = !0;
@@ -411,8 +411,8 @@ function Io(n) {
411
411
  let xe = 0;
412
412
  const Ue = [], Ke = [];
413
413
  if (oe.forEach((ie) => {
414
- const ye = Ve * ie.flex;
415
- ye < ie.minWidth ? (xe += ie.minWidth - ye, Ue.push(ie)) : ye > ie.maxWidth ? (xe += ie.maxWidth - ye, Ke.push(ie)) : ie.computedWidth = ye;
414
+ const Ce = Ve * ie.flex;
415
+ Ce < ie.minWidth ? (xe += ie.minWidth - Ce, Ue.push(ie)) : Ce > ie.maxWidth ? (xe += ie.maxWidth - Ce, Ke.push(ie)) : ie.computedWidth = Ce;
416
416
  }), Ue.length === 0 && Ke.length === 0) {
417
417
  oe.forEach((ie) => ie.frozen = !0);
418
418
  break;
@@ -452,9 +452,9 @@ function Io(n) {
452
452
  width: ne.get(A.field) ?? (typeof A.width == "number" ? A.width : 100),
453
453
  flex: X ? X.flex : A.flex
454
454
  };
455
- }), Z = 11, pe = R.map((A, X) => {
455
+ }), ee = 11, pe = R.map((A, X) => {
456
456
  const oe = it(F(A));
457
- return { ...A, width: oe.type === "fixed" ? oe.value : 100, zIndex: Z + X };
457
+ return { ...A, width: oe.type === "fixed" ? oe.value : 100, zIndex: ee + X };
458
458
  }), $ = 11, ge = _.map((A, X) => {
459
459
  const oe = it(F(A));
460
460
  return {
@@ -462,7 +462,7 @@ function Io(n) {
462
462
  width: oe.type === "fixed" ? oe.value : 100,
463
463
  zIndex: $ + (_.length - 1 - X)
464
464
  };
465
- }), de = T.reduce((A, X) => A + X, 0), ve = H + de + L + I, ce = T.reduce((A, X, oe) => (A.push((A[oe - 1] || 0) + X), A), []);
465
+ }), de = T.reduce((A, X) => A + X, 0), be = H + de + L + I, ce = T.reduce((A, X, oe) => (A.push((A[oe - 1] || 0) + X), A), []);
466
466
  return {
467
467
  rowHeights: y,
468
468
  cumulativeHeights: w,
@@ -474,7 +474,7 @@ function Io(n) {
474
474
  unpinnedColsWithWidth: te,
475
475
  unpinnedColWidths: T,
476
476
  unpinnedAccWidths: ce,
477
- totalWidth: ve,
477
+ totalWidth: be,
478
478
  leftWidth: H,
479
479
  rightWidth: L,
480
480
  unpinnedTotalWidth: de,
@@ -504,7 +504,7 @@ function Io(n) {
504
504
  f
505
505
  ]);
506
506
  }
507
- function Po(n) {
507
+ function Lo(n) {
508
508
  const {
509
509
  allRenderableRows: t,
510
510
  navigationColumns: e,
@@ -521,7 +521,7 @@ function Po(n) {
521
521
  pageSize: m,
522
522
  virtualization: v,
523
523
  viewportRef: b
524
- } = n, [S, N] = Q(null), f = z((w) => {
524
+ } = n, [S, N] = Z(null), f = z((w) => {
525
525
  w.target === w.currentTarget && N((u) => {
526
526
  if (u) return u;
527
527
  if (o)
@@ -571,23 +571,23 @@ function Po(n) {
571
571
  const E = u === "HEADER", R = E ? -1 : t.findIndex((L) => L.id === u), _ = e.findIndex((L) => L.field === p);
572
572
  if (!E && R === -1 || _ === -1) return;
573
573
  const M = (L, U, q, K, C, B = !1) => {
574
- let O = L + q, W = U + K;
575
- return C && K !== 0 && (K > 0 && W >= e.length ? (W = 0, O++) : K < 0 && W < 0 && (W = e.length - 1, O--)), !C && (W < 0 || W >= e.length) || O < (B ? -1 : 0) || O >= t.length ? null : { r: O, c: W };
574
+ let W = L + q, O = U + K;
575
+ return C && K !== 0 && (K > 0 && O >= e.length ? (O = 0, W++) : K < 0 && O < 0 && (O = e.length - 1, W--)), !C && (O < 0 || O >= e.length) || W < (B ? -1 : 0) || W >= t.length ? null : { r: W, c: O };
576
576
  }, T = (L, U, q, K, C, B = !1) => {
577
- let O = L, W = U, V = 0;
577
+ let W = L, O = U, V = 0;
578
578
  const G = t.length * e.length + e.length;
579
579
  for (; V < G; ) {
580
- if (V++, O += q, W += K, K !== 0)
581
- K > 0 ? W >= e.length && (W = 0, O++) : W < 0 && (W = e.length - 1, O--);
582
- else if (W < 0 || W >= e.length) return null;
583
- if (O < -1 || O >= t.length) return null;
584
- if (O === -1) {
580
+ if (V++, W += q, O += K, K !== 0)
581
+ K > 0 ? O >= e.length && (O = 0, W++) : O < 0 && (O = e.length - 1, W--);
582
+ else if (O < 0 || O >= e.length) return null;
583
+ if (W < -1 || W >= t.length) return null;
584
+ if (W === -1) {
585
585
  if (!B) continue;
586
- const Z = e[W], pe = Z.sortable !== !1;
587
- if (["__checkbox_col__"].includes(Z.field) || pe) return { r: O, c: W };
586
+ const ee = e[O], pe = ee.sortable !== !1;
587
+ if (["__checkbox_col__"].includes(ee.field) || pe) return { r: W, c: O };
588
588
  continue;
589
589
  }
590
- const D = t[O], P = e[W], ne = ["__checkbox_col__", "__expand_col__", "__reorder_col__"].includes(P.field);
590
+ const D = t[W], P = e[O], ne = ["__checkbox_col__", "__expand_col__", "__reorder_col__"].includes(P.field);
591
591
  let te = P.editable || ne;
592
592
  if (x && !ne)
593
593
  try {
@@ -596,12 +596,12 @@ function Po(n) {
596
596
  field: P.field,
597
597
  value: D[P.field],
598
598
  colDef: P,
599
- rowIndex: O,
600
- colIndex: W
599
+ rowIndex: W,
600
+ colIndex: O
601
601
  });
602
602
  } catch {
603
603
  }
604
- if (te) return { r: O, c: W };
604
+ if (te) return { r: W, c: O };
605
605
  }
606
606
  return null;
607
607
  };
@@ -636,14 +636,14 @@ function Po(n) {
636
636
  N(I === -1 ? { id: "HEADER", field: L.field } : { id: t[I].id, field: L.field });
637
637
  const U = b.current;
638
638
  if (U) {
639
- const { cumulativeHeights: q, pinnedTopHeight: K, columnMetrics: C } = v, { clientHeight: B, clientWidth: O, scrollTop: W, scrollLeft: V } = U, G = I <= 0 ? 0 : q[I - 1], D = q[I], P = W + K, ne = W + B;
640
- let te = W;
641
- if (G < P ? te = Math.max(0, G - K) : D > ne && (te = D - B), te !== W && (U.scrollTop = te), C) {
642
- const { leftPinnedWidth: Z, rightPinnedWidth: pe, unpinnedAccWidths: $, unpinnedCols: ge, totalSpecialsWidth: de, pinnedSpecialsWidth: ve } = C, ce = ge.findIndex((A) => A.field === L.field);
639
+ const { cumulativeHeights: q, pinnedTopHeight: K, columnMetrics: C } = v, { clientHeight: B, clientWidth: W, scrollTop: O, scrollLeft: V } = U, G = I <= 0 ? 0 : q[I - 1], D = q[I], P = O + K, ne = O + B;
640
+ let te = O;
641
+ if (G < P ? te = Math.max(0, G - K) : D > ne && (te = D - B), te !== O && (U.scrollTop = te), C) {
642
+ const { leftPinnedWidth: ee, rightPinnedWidth: pe, unpinnedAccWidths: $, unpinnedCols: ge, totalSpecialsWidth: de, pinnedSpecialsWidth: be } = C, ce = ge.findIndex((A) => A.field === L.field);
643
643
  if (ce !== -1) {
644
- const A = de + Z + (ce > 0 ? $[ce - 1] : 0), X = de + Z + $[ce], oe = V + ve + Z, ue = V + O - pe;
644
+ const A = de + ee + (ce > 0 ? $[ce - 1] : 0), X = de + ee + $[ce], oe = V + be + ee, ue = V + W - pe;
645
645
  let fe = V;
646
- A < oe ? fe = Math.max(0, A - ve - Z) : X > ue && (fe = X - O + pe), fe !== V && (U.scrollLeft = fe);
646
+ A < oe ? fe = Math.max(0, A - be - ee) : X > ue && (fe = X - W + pe), fe !== V && (U.scrollLeft = fe);
647
647
  }
648
648
  }
649
649
  }
@@ -667,8 +667,8 @@ function Po(n) {
667
667
  ]);
668
668
  return { focusedCell: S, setFocusedCell: N, handleFocus: f, handleBlur: k, handleKeyDown: y };
669
669
  }
670
- const Lo = { rowFields: [], columnFields: [], valueFields: [] };
671
- function To(n) {
670
+ const To = { rowFields: [], columnFields: [], valueFields: [] };
671
+ function Wo(n) {
672
672
  const {
673
673
  initialState: t,
674
674
  sortModel: e,
@@ -683,29 +683,29 @@ function To(n) {
683
683
  paginationModel: x = { page: 0, pageSize: 100 },
684
684
  onPaginationModelChange: h,
685
685
  rowSelectionModel: m
686
- } = n, [v, b] = Q(
686
+ } = n, [v, b] = Z(
687
687
  () => t?.sorting?.sortModel ?? []
688
- ), S = e !== void 0, N = S ? e : v, f = o !== void 0, [k, y] = Q(
688
+ ), S = e !== void 0, N = S ? e : v, f = o !== void 0, [k, y] = Z(
689
689
  () => o ?? {}
690
- ), w = f ? o : k, u = z((Z) => {
691
- f || y(Z), i?.(Z);
692
- }, [f, i]), p = l !== void 0, [j, E] = Q(
690
+ ), w = f ? o : k, u = z((ee) => {
691
+ f || y(ee), i?.(ee);
692
+ }, [f, i]), p = l !== void 0, [j, E] = Z(
693
693
  () => t?.columns?.columnVisibilityModel ?? {}
694
- ), R = p ? l : j, _ = z((Z) => {
695
- p || E(Z), a?.(Z);
696
- }, [p, a]), M = s !== void 0, [T, I] = Q(
694
+ ), R = p ? l : j, _ = z((ee) => {
695
+ p || E(ee), a?.(ee);
696
+ }, [p, a]), M = s !== void 0, [T, I] = Z(
697
697
  () => t?.columns?.pinnedColumns ?? {}
698
- ), F = M ? s : T, H = z((Z) => {
699
- M || I(Z), c?.(Z);
700
- }, [M, c]), [L, U] = Q(
701
- () => d ?? Lo
702
- ), q = d ?? L, K = z((Z) => {
703
- U(Z), g?.(Z);
704
- }, [g]), C = x !== void 0 && n.paginationModel !== void 0, [B, O] = Q(
698
+ ), F = M ? s : T, H = z((ee) => {
699
+ M || I(ee), c?.(ee);
700
+ }, [M, c]), [L, U] = Z(
701
+ () => d ?? To
702
+ ), q = d ?? L, K = z((ee) => {
703
+ U(ee), g?.(ee);
704
+ }, [g]), C = x !== void 0 && n.paginationModel !== void 0, [B, W] = Z(
705
705
  () => t?.pagination?.paginationModel ?? x
706
- ), W = C ? x : B, V = z((Z) => {
707
- C || O(Z), h?.(Z);
708
- }, [C, h]), G = m !== void 0, [D, P] = Q([]), ne = G ? m : D, te = le(() => new Set(ne), [ne]);
706
+ ), O = C ? x : B, V = z((ee) => {
707
+ C || W(ee), h?.(ee);
708
+ }, [C, h]), G = m !== void 0, [D, P] = Z([]), ne = G ? m : D, te = le(() => new Set(ne), [ne]);
709
709
  return {
710
710
  sortModel: N,
711
711
  isSortControlled: S,
@@ -718,7 +718,7 @@ function To(n) {
718
718
  handlePinnedColumnsChange: H,
719
719
  currentPivotModel: q,
720
720
  handlePivotModelChange: K,
721
- effectivePaginationModel: W,
721
+ effectivePaginationModel: O,
722
722
  handlePaginationModelChange: V,
723
723
  rowSelectionModel: ne,
724
724
  selectedRowIds: te,
@@ -770,11 +770,11 @@ const Oo = {
770
770
  },
771
771
  "=": (n, t) => n == null || t == null || t === "" ? !1 : Number(n) === Number(t)
772
772
  };
773
- function Wo(n, t) {
773
+ function Fo(n, t) {
774
774
  const { field: e, operator: o, value: i } = t, l = n[e], a = Oo[o];
775
775
  return a ? a(l, i) : (console.warn(`Unknown filter operator: ${o}`), !0);
776
776
  }
777
- function Fo(n, t) {
777
+ function Ao(n, t) {
778
778
  return !t || t.length === 0 ? !0 : t.every((e) => {
779
779
  const o = e.toLowerCase();
780
780
  return Object.values(n).some((i) => i == null ? !1 : String(i).toLowerCase().includes(o));
@@ -782,7 +782,7 @@ function Fo(n, t) {
782
782
  }
783
783
  function un(n, t) {
784
784
  const e = t.items ?? [], o = t.logicOperator ?? "and", i = ("quickFilterValues" in t ? t.quickFilterValues : void 0) ?? [];
785
- if (i.length > 0 && !Fo(n, i))
785
+ if (i.length > 0 && !Ao(n, i))
786
786
  return !1;
787
787
  if (e.length === 0)
788
788
  return !0;
@@ -791,16 +791,16 @@ function un(n, t) {
791
791
  const s = a, c = s.items;
792
792
  return c.length === 0 ? !0 : s.logicOperator === "and" ? c.every(l) : c.some(l);
793
793
  } else
794
- return Wo(n, a);
794
+ return Fo(n, a);
795
795
  };
796
796
  return o === "and" ? e.every(l) : e.some(l);
797
797
  }
798
- function Ao(n, t) {
798
+ function zo(n, t) {
799
799
  if (!t) return n;
800
800
  const { items: e = [], quickFilterValues: o = [] } = t;
801
801
  return e.length === 0 && (!o || o.length === 0) ? n : n.filter((i) => un(i, t));
802
802
  }
803
- function zo(n) {
803
+ function Bo(n) {
804
804
  switch (n) {
805
805
  case "number":
806
806
  return ["=", "!=", ">", ">=", "<", "<=", "isEmpty", "isNotEmpty"];
@@ -825,7 +825,7 @@ function gn(n, t, e) {
825
825
  const o = String(n).toLowerCase(), i = String(t).toLowerCase();
826
826
  return e === "asc" ? o < i ? -1 : o > i ? 1 : 0 : o > i ? -1 : o < i ? 1 : 0;
827
827
  }
828
- function Bo(n, t) {
828
+ function $o(n, t) {
829
829
  if (t.length === 0)
830
830
  return n;
831
831
  const e = [...n];
@@ -838,7 +838,7 @@ function Bo(n, t) {
838
838
  return 0;
839
839
  }), e;
840
840
  }
841
- function $o(n) {
841
+ function Do(n) {
842
842
  const {
843
843
  effectiveRows: t,
844
844
  activeHierarchyHandlers: e,
@@ -853,7 +853,7 @@ function $o(n) {
853
853
  pinnedRows: x,
854
854
  isLoading: h,
855
855
  pageSize: m
856
- } = n, v = le(() => e ? e.getVisibleRows() || [] : o === "server" && l ? t : Ao(t, i), [t, i, e, o, l]), { top: b, center: S, bottom: N } = le(() => e ? { top: [], center: v, bottom: [] } : Mo(v, x), [v, x, e]), f = le(() => e || s === "server" && l ? S : Bo(S, a), [S, a, e, s, l]), k = le(() => {
856
+ } = n, v = le(() => e ? e.getVisibleRows() || [] : o === "server" && l ? t : zo(t, i), [t, i, e, o, l]), { top: b, center: S, bottom: N } = le(() => e ? { top: [], center: v, bottom: [] } : Io(v, x), [v, x, e]), f = le(() => e || s === "server" && l ? S : $o(S, a), [S, a, e, s, l]), k = le(() => {
857
857
  if (!c || d === "server" && l) return f;
858
858
  const w = g.page * g.pageSize;
859
859
  return f.slice(w, w + g.pageSize);
@@ -890,7 +890,7 @@ function $o(n) {
890
890
  allRenderableRows: y
891
891
  };
892
892
  }
893
- function Do(n) {
893
+ function Ho(n) {
894
894
  const {
895
895
  layout: t,
896
896
  scrollTop: e,
@@ -941,11 +941,11 @@ function Do(n) {
941
941
  ...m.slice(H, L + 1),
942
942
  ...C > 0 ? [{ field: "__spacer_right__", width: C, isSpacer: !0 }] : [],
943
943
  ...b
944
- ], W = _ > 0 && S > _ ? 16 : 0, V = u + j + p + W + 2, G = 5;
945
- let D = 0, P = R - 1, ne = 0, te = 0, Z = w.length - 1;
946
- for (; te <= Z; ) {
947
- const $ = te + Z >>> 1;
948
- w[$] < e ? te = $ + 1 : Z = $ - 1;
944
+ ], O = _ > 0 && S > _ ? 16 : 0, V = u + j + p + O + 2, G = 5;
945
+ let D = 0, P = R - 1, ne = 0, te = 0, ee = w.length - 1;
946
+ for (; te <= ee; ) {
947
+ const $ = te + ee >>> 1;
948
+ w[$] < e ? te = $ + 1 : ee = $ - 1;
949
949
  }
950
950
  D = Math.max(0, te - G), ne = D > 0 ? w[D - 1] : 0;
951
951
  for (let $ = D; $ < w.length; $++)
@@ -993,8 +993,8 @@ function Do(n) {
993
993
  x
994
994
  ]);
995
995
  }
996
- function Ho(n) {
997
- const { columns: t, onColumnOrderChange: e, disableColumnReorder: o = !1 } = n, [i, l] = Q(null), [a, s] = Q(null), c = J(-1), d = z(
996
+ function Go(n) {
997
+ const { columns: t, onColumnOrderChange: e, disableColumnReorder: o = !1 } = n, [i, l] = Z(null), [a, s] = Z(null), c = J(-1), d = z(
998
998
  (m) => (v) => {
999
999
  if (o) return;
1000
1000
  const b = t.findIndex((N) => N.field === m);
@@ -1114,7 +1114,7 @@ function zn({ isExpanded: n, onClick: t, variant: e = "chevron" }) {
1114
1114
  }
1115
1115
  );
1116
1116
  }
1117
- function Go(n) {
1117
+ function Vo(n) {
1118
1118
  const {
1119
1119
  activeColumns: t,
1120
1120
  isHierarchyEnabled: e,
@@ -1147,19 +1147,19 @@ function Go(n) {
1147
1147
  /* @__PURE__ */ r.jsx("div", { style: { marginRight: 4, width: 24, height: 24, display: "flex", alignItems: "center", justifyContent: "center", cursor: H ? "pointer" : "default", flexShrink: 0 }, children: H ? /* @__PURE__ */ r.jsx(
1148
1148
  "div",
1149
1149
  {
1150
- onClick: (O) => {
1151
- O.stopPropagation(), O.preventDefault(), l?.toggleExpansion(T.row.id);
1150
+ onClick: (W) => {
1151
+ W.stopPropagation(), W.preventDefault(), l?.toggleExpansion(T.row.id);
1152
1152
  },
1153
- onMouseDown: (O) => {
1154
- O.stopPropagation();
1153
+ onMouseDown: (W) => {
1154
+ W.stopPropagation();
1155
1155
  },
1156
1156
  style: { cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", pointerEvents: "auto", zIndex: 10, position: "relative" },
1157
1157
  children: /* @__PURE__ */ r.jsx(
1158
1158
  zn,
1159
1159
  {
1160
1160
  isExpanded: L,
1161
- onClick: (O) => {
1162
- O.stopPropagation(), O.preventDefault(), l?.toggleExpansion(T.row.id);
1161
+ onClick: (W) => {
1162
+ W.stopPropagation(), W.preventDefault(), l?.toggleExpansion(T.row.id);
1163
1163
  }
1164
1164
  }
1165
1165
  )
@@ -1174,11 +1174,11 @@ function Go(n) {
1174
1174
  const I = T.row, F = !!I._hasChildren, H = typeof I._groupingField == "string" ? I._groupingField : void 0;
1175
1175
  return o && F ? _.field === H ? null : T.value !== void 0 && T.value !== null ? _.renderCell ? _.renderCell(T) : T.value : null : _.renderCell ? _.renderCell(T) : T.value;
1176
1176
  }
1177
- }) : t, [t, e, o, i, l]), [N, f] = Q(
1177
+ }) : t, [t, e, o, i, l]), [N, f] = Z(
1178
1178
  () => v?.columns?.columnWidths ?? {}
1179
1179
  ), k = z((_, M) => {
1180
1180
  f((T) => ({ ...T, [_]: M }));
1181
- }, []), [y, w] = Q(
1181
+ }, []), [y, w] = Z(
1182
1182
  () => v?.columns?.columnOrder ?? t.map((_) => _.field)
1183
1183
  ), u = s ?? y;
1184
1184
  re(() => {
@@ -1196,7 +1196,7 @@ function Go(n) {
1196
1196
  }, [S, u, d]), j = le(
1197
1197
  () => p.filter((_) => a[_.field] !== !1),
1198
1198
  [p, a]
1199
- ), E = Ho({
1199
+ ), E = Go({
1200
1200
  columns: p,
1201
1201
  onColumnOrderChange: z((_) => {
1202
1202
  const { oldIndex: M, targetIndex: T } = _, I = [...u], [F] = I.splice(M, 1);
@@ -1219,7 +1219,7 @@ function Go(n) {
1219
1219
  handleColumnResize: k
1220
1220
  };
1221
1221
  }
1222
- function Vo(n) {
1222
+ function Uo(n) {
1223
1223
  const {
1224
1224
  renderContext: t,
1225
1225
  pinnedTopRows: e,
@@ -1239,8 +1239,8 @@ function Vo(n) {
1239
1239
  return S.filter((f) => N.has(f.row.id) ? !1 : (N.add(f.row.id), !0));
1240
1240
  }, [t, e, o, i, l, a]);
1241
1241
  }
1242
- function Uo(n) {
1243
- const { onRowsScrollEnd: t } = n, e = J({ scrollTop: 0, scrollLeft: 0 }), o = J(null), [i, l] = Q({ scrollTop: 0, scrollLeft: 0 });
1242
+ function Ko(n) {
1243
+ const { onRowsScrollEnd: t } = n, e = J({ scrollTop: 0, scrollLeft: 0 }), o = J(null), [i, l] = Z({ scrollTop: 0, scrollLeft: 0 });
1244
1244
  re(() => () => {
1245
1245
  o.current !== null && cancelAnimationFrame(o.current);
1246
1246
  }, []);
@@ -1259,7 +1259,7 @@ function Uo(n) {
1259
1259
  }, [t]);
1260
1260
  return { scrollTop: i.scrollTop, scrollLeft: i.scrollLeft, handleScroll: a };
1261
1261
  }
1262
- function Ko(n) {
1262
+ function Yo(n) {
1263
1263
  const {
1264
1264
  onStateChange: t,
1265
1265
  sortModel: e,
@@ -1296,7 +1296,7 @@ function Ko(n) {
1296
1296
  c
1297
1297
  ]);
1298
1298
  }
1299
- const Yo = {
1299
+ const qo = {
1300
1300
  sum: (n) => n.filter((e) => e != null && !isNaN(Number(e))).reduce((e, o) => e + Number(o), 0),
1301
1301
  avg: (n) => {
1302
1302
  const t = n.filter((e) => e != null && !isNaN(Number(e)));
@@ -1316,7 +1316,7 @@ const Yo = {
1316
1316
  function He(n, t) {
1317
1317
  return n == null ? "—" : typeof n == "number" ? t === "avg" ? n.toLocaleString(void 0, { maximumFractionDigits: 2 }) : n.toLocaleString() : String(n);
1318
1318
  }
1319
- function qo(n) {
1319
+ function Xo(n) {
1320
1320
  const {
1321
1321
  rows: t,
1322
1322
  aggregationModel: e,
@@ -1329,7 +1329,7 @@ function qo(n) {
1329
1329
  if (o || Object.keys(e).length === 0) return {};
1330
1330
  const f = {};
1331
1331
  for (const [k, y] of Object.entries(e)) {
1332
- const w = Yo[y];
1332
+ const w = qo[y];
1333
1333
  if (!w) {
1334
1334
  console.warn(`[useAggregation] Unknown aggregation function: "${y}"`);
1335
1335
  continue;
@@ -1338,7 +1338,7 @@ function qo(n) {
1338
1338
  f[k] = w(u);
1339
1339
  }
1340
1340
  return f;
1341
- }, [t, e, o]), [d, g] = Q({}), [x, h] = Q(!1), [m, v] = Q(null), b = J(0), S = z(async () => {
1341
+ }, [t, e, o]), [d, g] = Z({}), [x, h] = Z(!1), [m, v] = Z(null), b = J(0), S = z(async () => {
1342
1342
  if (!i?.getAggregations || Object.keys(e).length === 0) return;
1343
1343
  const f = ++b.current;
1344
1344
  h(!0), v(null);
@@ -1360,7 +1360,7 @@ function qo(n) {
1360
1360
  o && i?.getAggregations && !s && S();
1361
1361
  }, [S, o, i, s]), { aggregationResult: le(() => o ? s && Object.keys(s).length > 0 ? s : d : c, [o, c, s, d]), isLoading: x, error: m };
1362
1362
  }
1363
- function Xo({
1363
+ function Jo({
1364
1364
  columns: n,
1365
1365
  aggregationModel: t,
1366
1366
  aggregationResult: e,
@@ -1407,7 +1407,7 @@ function Xo({
1407
1407
  }
1408
1408
  );
1409
1409
  }
1410
- function Jo({ noRowsLabel: n, width: t }) {
1410
+ function Qo({ noRowsLabel: n, width: t }) {
1411
1411
  return /* @__PURE__ */ r.jsxs("div", { className: "ogx__empty", style: { width: t }, children: [
1412
1412
  /* @__PURE__ */ r.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
1413
1413
  /* @__PURE__ */ r.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
@@ -1416,7 +1416,7 @@ function Jo({ noRowsLabel: n, width: t }) {
1416
1416
  /* @__PURE__ */ r.jsx("span", { children: n })
1417
1417
  ] });
1418
1418
  }
1419
- function Qo({ error: n }) {
1419
+ function Zo({ error: n }) {
1420
1420
  if (!n) return null;
1421
1421
  const t = n instanceof Error ? n.message : typeof n == "string" ? n : "An unexpected error occurred while loading the data.";
1422
1422
  return /* @__PURE__ */ r.jsxs("div", { className: "ogx-error-overlay", "aria-live": "assertive", role: "alert", children: [
@@ -1473,8 +1473,8 @@ const At = ({
1473
1473
  t && /* @__PURE__ */ r.jsx("span", { className: "ogx-checkbox__label", children: t })
1474
1474
  ] });
1475
1475
  };
1476
- function Zo(n) {
1477
- const { field: t, currentWidth: e, onResize: o, minWidth: i = 50, maxWidth: l = 1e3 } = n, [a, s] = Q(!1), c = J(0), d = J(0), g = z((m) => {
1476
+ function er(n) {
1477
+ const { field: t, currentWidth: e, onResize: o, minWidth: i = 50, maxWidth: l = 1e3 } = n, [a, s] = Z(!1), c = J(0), d = J(0), g = z((m) => {
1478
1478
  m.preventDefault(), m.stopPropagation(), s(!0), c.current = m.clientX, d.current = e;
1479
1479
  let v = 0;
1480
1480
  const b = 16, S = (f) => {
@@ -1515,7 +1515,7 @@ function lt() {
1515
1515
  function st() {
1516
1516
  return /* @__PURE__ */ r.jsx("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ r.jsx("circle", { cx: "4", cy: "4", r: "3" }) });
1517
1517
  }
1518
- function er() {
1518
+ function tr() {
1519
1519
  return /* @__PURE__ */ r.jsxs("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "13", height: "13", fill: "none", children: [
1520
1520
  /* @__PURE__ */ r.jsx("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", stroke: "currentColor", strokeWidth: "1.8" }),
1521
1521
  /* @__PURE__ */ r.jsx("rect", { x: "8.5", y: "4", width: "7", height: "16", fill: "currentColor", opacity: "0.3" }),
@@ -1525,51 +1525,51 @@ function er() {
1525
1525
  /* @__PURE__ */ r.jsx("line", { x1: "2", y1: "14", x2: "22", y2: "14", stroke: "currentColor", strokeWidth: "1.2" })
1526
1526
  ] });
1527
1527
  }
1528
- function tr() {
1528
+ function nr() {
1529
1529
  return /* @__PURE__ */ r.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
1530
1530
  /* @__PURE__ */ r.jsx("line", { x1: "12", y1: "19", x2: "12", y2: "5" }),
1531
1531
  /* @__PURE__ */ r.jsx("polyline", { points: "5 12 12 5 19 12" })
1532
1532
  ] });
1533
1533
  }
1534
- function nr() {
1534
+ function or() {
1535
1535
  return /* @__PURE__ */ r.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
1536
1536
  /* @__PURE__ */ r.jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
1537
1537
  /* @__PURE__ */ r.jsx("polyline", { points: "19 12 12 19 5 12" })
1538
1538
  ] });
1539
1539
  }
1540
- function or() {
1540
+ function rr() {
1541
1541
  return /* @__PURE__ */ r.jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", children: /* @__PURE__ */ r.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
1542
1542
  }
1543
- function rr() {
1543
+ function ir() {
1544
1544
  return /* @__PURE__ */ r.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1545
1545
  /* @__PURE__ */ r.jsx("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94" }),
1546
1546
  /* @__PURE__ */ r.jsx("path", { d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19" }),
1547
1547
  /* @__PURE__ */ r.jsx("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
1548
1548
  ] });
1549
1549
  }
1550
- function ir() {
1550
+ function lr() {
1551
1551
  return /* @__PURE__ */ r.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1552
1552
  /* @__PURE__ */ r.jsx("line", { x1: "4", y1: "2", x2: "4", y2: "22" }),
1553
1553
  /* @__PURE__ */ r.jsx("polyline", { points: "11 8 4 12 11 16" }),
1554
1554
  /* @__PURE__ */ r.jsx("line", { x1: "4", y1: "12", x2: "20", y2: "12" })
1555
1555
  ] });
1556
1556
  }
1557
- function lr() {
1557
+ function sr() {
1558
1558
  return /* @__PURE__ */ r.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1559
1559
  /* @__PURE__ */ r.jsx("line", { x1: "20", y1: "2", x2: "20", y2: "22" }),
1560
1560
  /* @__PURE__ */ r.jsx("polyline", { points: "13 8 20 12 13 16" }),
1561
1561
  /* @__PURE__ */ r.jsx("line", { x1: "20", y1: "12", x2: "4", y2: "12" })
1562
1562
  ] });
1563
1563
  }
1564
- function sr() {
1564
+ function ar() {
1565
1565
  return /* @__PURE__ */ r.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1566
1566
  /* @__PURE__ */ r.jsx("line", { x1: "2", y1: "2", x2: "22", y2: "22" }),
1567
1567
  /* @__PURE__ */ r.jsx("line", { x1: "4", y1: "4", x2: "4", y2: "20" }),
1568
1568
  /* @__PURE__ */ r.jsx("line", { x1: "4", y1: "12", x2: "20", y2: "12" })
1569
1569
  ] });
1570
1570
  }
1571
- function ar({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedColumns: l, onManageColumns: a, onClose: s, anchorEl: c }) {
1572
- const d = J(null), [g, x] = Q({ position: "fixed", zIndex: 1300, top: 0, left: 0, visibility: "hidden" });
1571
+ function dr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedColumns: l, onManageColumns: a, onClose: s, anchorEl: c }) {
1572
+ const d = J(null), [g, x] = Z({ position: "fixed", zIndex: 1300, top: 0, left: 0, visibility: "hidden" });
1573
1573
  ae.useLayoutEffect(() => {
1574
1574
  if (!c || !d.current) return;
1575
1575
  const w = c.getBoundingClientRect(), u = d.current.getBoundingClientRect(), p = window.innerWidth, j = window.innerHeight, E = 8;
@@ -1607,7 +1607,7 @@ function ar({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
1607
1607
  "aria-checked": b === "asc",
1608
1608
  children: [
1609
1609
  /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: b === "asc" ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
1610
- /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(tr, {}) }),
1610
+ /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(nr, {}) }),
1611
1611
  "Sort Ascending"
1612
1612
  ]
1613
1613
  }
@@ -1621,7 +1621,7 @@ function ar({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
1621
1621
  "aria-checked": b === "desc",
1622
1622
  children: [
1623
1623
  /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: b === "desc" ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
1624
- /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(nr, {}) }),
1624
+ /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(or, {}) }),
1625
1625
  "Sort Descending"
1626
1626
  ]
1627
1627
  }
@@ -1635,7 +1635,7 @@ function ar({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
1635
1635
  "aria-checked": S,
1636
1636
  children: [
1637
1637
  /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: S ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
1638
- /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(or, {}) }),
1638
+ /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(rr, {}) }),
1639
1639
  "Unsort"
1640
1640
  ]
1641
1641
  }
@@ -1653,7 +1653,7 @@ function ar({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
1653
1653
  "aria-label": "Pin to left",
1654
1654
  children: [
1655
1655
  /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: N ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
1656
- /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(ir, {}) }),
1656
+ /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(lr, {}) }),
1657
1657
  "Pin to Left"
1658
1658
  ]
1659
1659
  }
@@ -1668,7 +1668,7 @@ function ar({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
1668
1668
  "aria-label": "Pin to right",
1669
1669
  children: [
1670
1670
  /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: f ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
1671
- /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(lr, {}) }),
1671
+ /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(sr, {}) }),
1672
1672
  "Pin to Right"
1673
1673
  ]
1674
1674
  }
@@ -1683,7 +1683,7 @@ function ar({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
1683
1683
  "aria-label": "Unpin column",
1684
1684
  children: [
1685
1685
  /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: k ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
1686
- /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(sr, {}) }),
1686
+ /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(ar, {}) }),
1687
1687
  "Unpin"
1688
1688
  ]
1689
1689
  }
@@ -1691,7 +1691,7 @@ function ar({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
1691
1691
  /* @__PURE__ */ r.jsx("div", { className: "ogx-menu-divider" }),
1692
1692
  /* @__PURE__ */ r.jsxs("button", { className: "ogx-menu-item", onClick: m, role: "menuitem", "aria-label": `Hide ${y} column`, children: [
1693
1693
  /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true" }),
1694
- /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(rr, {}) }),
1694
+ /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(ir, {}) }),
1695
1695
  "Hide Column"
1696
1696
  ] }),
1697
1697
  /* @__PURE__ */ r.jsx("div", { className: "ogx-menu-divider" }),
@@ -1699,17 +1699,17 @@ function ar({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
1699
1699
  a?.(), s();
1700
1700
  }, role: "menuitem", "aria-label": "Manage all columns", children: [
1701
1701
  /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true" }),
1702
- /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(er, {}) }),
1702
+ /* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(tr, {}) }),
1703
1703
  "Manage columns"
1704
1704
  ] })
1705
1705
  ] }),
1706
1706
  c?.closest(".ogx-theme-provider") || document.body
1707
1707
  );
1708
1708
  }
1709
- function dr() {
1709
+ function cr() {
1710
1710
  return /* @__PURE__ */ r.jsx("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ r.jsx("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }) });
1711
1711
  }
1712
- function cr() {
1712
+ function ur() {
1713
1713
  return /* @__PURE__ */ r.jsx("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", fill: "currentColor", children: /* @__PURE__ */ r.jsx("path", { d: "M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z" }) });
1714
1714
  }
1715
1715
  function Bn(n) {
@@ -1718,7 +1718,7 @@ function Bn(n) {
1718
1718
  typeof e == "string" ? t.push(e) : t.push(...Bn(e));
1719
1719
  return t;
1720
1720
  }
1721
- function ur(n) {
1721
+ function gr(n) {
1722
1722
  let t = 0;
1723
1723
  function e(o, i) {
1724
1724
  t = Math.max(t, i);
@@ -1726,7 +1726,7 @@ function ur(n) {
1726
1726
  }
1727
1727
  return n.forEach((o) => e(o, 1)), t;
1728
1728
  }
1729
- function gr(n, t, e) {
1729
+ function fr(n, t, e) {
1730
1730
  function o(s, c, d) {
1731
1731
  if (!Bn(s).includes(c)) return null;
1732
1732
  if (d === e) return s;
@@ -1759,7 +1759,7 @@ function gr(n, t, e) {
1759
1759
  }
1760
1760
  return l;
1761
1761
  }
1762
- function fr(n) {
1762
+ function hr(n) {
1763
1763
  const {
1764
1764
  columns: t,
1765
1765
  allColumns: e,
@@ -1802,7 +1802,7 @@ function fr(n) {
1802
1802
  }, [j]);
1803
1803
  const U = (P) => () => {
1804
1804
  if (P.sortable === !1 || !c) return;
1805
- const ne = d.find((Z) => Z.field === P.field);
1805
+ const ne = d.find((ee) => ee.field === P.field);
1806
1806
  let te = "asc";
1807
1807
  ne && (ne.sort === "asc" ? te = "desc" : te = null), c(P.field, te);
1808
1808
  }, q = (P) => {
@@ -1817,7 +1817,7 @@ function fr(n) {
1817
1817
  m,
1818
1818
  b,
1819
1819
  S
1820
- ), [t, x, h, i, v, m, b, S]), C = o ? ur(o) : 0, O = (e ?? t).filter((P) => !P.isSpacer).map((P) => ({
1820
+ ), [t, x, h, i, v, m, b, S]), C = o ? gr(o) : 0, W = (e ?? t).filter((P) => !P.isSpacer).map((P) => ({
1821
1821
  field: P.field,
1822
1822
  width: x[P.field] ?? P.width ?? 100
1823
1823
  })), D = (S ? 48 : 0) + (m ? 48 : 0) + (i ? 48 : 0);
@@ -1826,9 +1826,9 @@ function fr(n) {
1826
1826
  // so they ALL stay sticky together and scroll horizontally as one unit.
1827
1827
  /* @__PURE__ */ r.jsxs("div", { className: "ogx__header-wrap", children: [
1828
1828
  C > 0 && Array.from({ length: C }, (P, ne) => {
1829
- const te = gr(
1829
+ const te = fr(
1830
1830
  o,
1831
- O,
1831
+ W,
1832
1832
  ne
1833
1833
  );
1834
1834
  return /* @__PURE__ */ r.jsxs("div", { className: "ogx-col-group-row", role: "row", children: [
@@ -1840,16 +1840,16 @@ function fr(n) {
1840
1840
  role: "columnheader"
1841
1841
  }
1842
1842
  ),
1843
- te.map((Z) => /* @__PURE__ */ r.jsx(
1843
+ te.map((ee) => /* @__PURE__ */ r.jsx(
1844
1844
  "div",
1845
1845
  {
1846
1846
  role: "columnheader",
1847
- className: `ogx-col-group-cell ${Z.isGroup ? "ogx-col-group-cell--group" : "ogx-col-group-cell--filler"}`,
1848
- style: { width: Z.width, minWidth: Z.width, flexShrink: 0 },
1849
- title: Z.isGroup ? Z.label : void 0,
1850
- children: Z.isGroup && /* @__PURE__ */ r.jsx("span", { className: "ogx-col-group-cell__label", children: Z.label })
1847
+ className: `ogx-col-group-cell ${ee.isGroup ? "ogx-col-group-cell--group" : "ogx-col-group-cell--filler"}`,
1848
+ style: { width: ee.width, minWidth: ee.width, flexShrink: 0 },
1849
+ title: ee.isGroup ? ee.label : void 0,
1850
+ children: ee.isGroup && /* @__PURE__ */ r.jsx("span", { className: "ogx-col-group-cell__label", children: ee.label })
1851
1851
  },
1852
- Z.key
1852
+ ee.key
1853
1853
  ))
1854
1854
  ] }, `ogx-grp-${ne}`);
1855
1855
  }),
@@ -1922,15 +1922,15 @@ function fr(n) {
1922
1922
  },
1923
1923
  P.field
1924
1924
  );
1925
- const te = P.sortable !== !1, Z = d.some((xe) => xe.field === P.field), pe = P.resizable !== !1, $ = zt(P.field, h), ge = $ !== null, de = f === P.field, ve = k === P.field, ce = [
1925
+ const te = P.sortable !== !1, ee = d.some((xe) => xe.field === P.field), pe = P.resizable !== !1, $ = zt(P.field, h), ge = $ !== null, de = f === P.field, be = k === P.field, ce = [
1926
1926
  "ogx__header-cell",
1927
1927
  `ogx__header-cell--align-${P.headerAlign || P.align || "left"}`,
1928
1928
  te && "ogx__header-cell--sortable",
1929
- Z && "ogx__header-cell--sorted",
1929
+ ee && "ogx__header-cell--sorted",
1930
1930
  ge && "ogx__header-cell--pinned",
1931
1931
  ge && `ogx__header-cell--pinned-${$}`,
1932
1932
  de && "ogx__header-cell--dragging",
1933
- ve && "ogx__header-cell--drag-over",
1933
+ be && "ogx__header-cell--drag-over",
1934
1934
  j?.id === "HEADER" && j.field === P.field && "ogx__header-cell--focused",
1935
1935
  P.headerClassName
1936
1936
  ].filter(Boolean).join(" "), A = x[P.field] ?? P.width ?? 100, X = {
@@ -1968,7 +1968,7 @@ function fr(n) {
1968
1968
  onDragOver: Ie,
1969
1969
  onDragEnd: u,
1970
1970
  onDrop: Ve,
1971
- "aria-sort": te ? Z ? d.find((xe) => xe.field === P.field)?.sort === "asc" ? "ascending" : "descending" : "none" : void 0,
1971
+ "aria-sort": te ? ee ? d.find((xe) => xe.field === P.field)?.sort === "asc" ? "ascending" : "descending" : "none" : void 0,
1972
1972
  "aria-colindex": ne + 1 + (i ? 1 : 0),
1973
1973
  "data-field": P.field,
1974
1974
  tabIndex: -1,
@@ -1977,7 +1977,7 @@ function fr(n) {
1977
1977
  },
1978
1978
  children: [
1979
1979
  /* @__PURE__ */ r.jsxs("div", { className: "ogx__header-cell-content", children: [
1980
- de && /* @__PURE__ */ r.jsx("div", { className: "ogx__header-drag-icon", children: /* @__PURE__ */ r.jsx(cr, {}) }),
1980
+ de && /* @__PURE__ */ r.jsx("div", { className: "ogx__header-drag-icon", children: /* @__PURE__ */ r.jsx(ur, {}) }),
1981
1981
  /* @__PURE__ */ r.jsxs("div", { className: "ogx__header-cell-title-wrapper", children: [
1982
1982
  /* @__PURE__ */ r.jsx("span", { className: "ogx__header-cell-title", children: oe }),
1983
1983
  N && N[P.field] && /* @__PURE__ */ r.jsx("span", { className: "ogx__header-cell-aggregation", children: N[P.field] })
@@ -1991,12 +1991,12 @@ function fr(n) {
1991
1991
  "aria-label": `Open column menu for ${P.headerName || P.field}`,
1992
1992
  "aria-haspopup": "menu",
1993
1993
  tabIndex: -1,
1994
- children: /* @__PURE__ */ r.jsx(dr, {})
1994
+ children: /* @__PURE__ */ r.jsx(cr, {})
1995
1995
  }
1996
1996
  )
1997
1997
  ] }),
1998
1998
  pe && g && /* @__PURE__ */ r.jsx(
1999
- Zo,
1999
+ er,
2000
2000
  {
2001
2001
  field: P.field,
2002
2002
  currentWidth: A,
@@ -2011,7 +2011,7 @@ function fr(n) {
2011
2011
  );
2012
2012
  }),
2013
2013
  I && /* @__PURE__ */ r.jsx(
2014
- ar,
2014
+ dr,
2015
2015
  {
2016
2016
  colDef: I.colDef,
2017
2017
  sortModel: d,
@@ -2028,7 +2028,7 @@ function fr(n) {
2028
2028
  ] })
2029
2029
  );
2030
2030
  }
2031
- const Ot = ({
2031
+ const Wt = ({
2032
2032
  variant: n = "text",
2033
2033
  size: t = "medium",
2034
2034
  color: e = "default",
@@ -2099,7 +2099,7 @@ function $n(n) {
2099
2099
  ] }),
2100
2100
  /* @__PURE__ */ r.jsxs("div", { className: "ogx-pagination__actions", children: [
2101
2101
  s && /* @__PURE__ */ r.jsx(
2102
- Ot,
2102
+ Wt,
2103
2103
  {
2104
2104
  variant: "text",
2105
2105
  size: "small",
@@ -2111,7 +2111,7 @@ function $n(n) {
2111
2111
  }
2112
2112
  ),
2113
2113
  /* @__PURE__ */ r.jsx(
2114
- Ot,
2114
+ Wt,
2115
2115
  {
2116
2116
  variant: "text",
2117
2117
  size: "small",
@@ -2129,7 +2129,7 @@ function $n(n) {
2129
2129
  d
2130
2130
  ] }),
2131
2131
  /* @__PURE__ */ r.jsx(
2132
- Ot,
2132
+ Wt,
2133
2133
  {
2134
2134
  variant: "text",
2135
2135
  size: "small",
@@ -2141,7 +2141,7 @@ function $n(n) {
2141
2141
  }
2142
2142
  ),
2143
2143
  c && /* @__PURE__ */ r.jsx(
2144
- Ot,
2144
+ Wt,
2145
2145
  {
2146
2146
  variant: "text",
2147
2147
  size: "small",
@@ -2155,7 +2155,7 @@ function $n(n) {
2155
2155
  ] })
2156
2156
  ] });
2157
2157
  }
2158
- function hr(n, t, e = {}) {
2158
+ function pr(n, t, e = {}) {
2159
2159
  const o = /* @__PURE__ */ new Map(), i = [];
2160
2160
  n.forEach((s) => {
2161
2161
  o.set(s.id, s), i.push(s.id);
@@ -2211,7 +2211,7 @@ function hr(n, t, e = {}) {
2211
2211
  }
2212
2212
  };
2213
2213
  }
2214
- function pr(n, t) {
2214
+ function xr(n, t) {
2215
2215
  switch (t.type) {
2216
2216
  case "SET_ROWS": {
2217
2217
  const e = Array.from(n.rows.idRowsLookup.values()), o = typeof t.payload == "function" ? t.payload(e) : t.payload, i = /* @__PURE__ */ new Map(), l = [];
@@ -2302,10 +2302,10 @@ function pr(n, t) {
2302
2302
  return n;
2303
2303
  }
2304
2304
  }
2305
- function xr(n) {
2306
- const { rows: t, columns: e, rowHeight: o = 52, headerHeight: i = 56, columnVisibilityModel: l, initialState: a } = n, [s] = Q(
2307
- () => hr(t, e, l)
2308
- ), [c, d] = So(pr, {
2305
+ function mr(n) {
2306
+ const { rows: t, columns: e, rowHeight: o = 52, headerHeight: i = 56, columnVisibilityModel: l, initialState: a } = n, [s] = Z(
2307
+ () => pr(t, e, l)
2308
+ ), [c, d] = jo(xr, {
2309
2309
  ...s,
2310
2310
  sorting: a?.sorting || s.sorting,
2311
2311
  filter: a?.filter || s.filter,
@@ -2409,8 +2409,8 @@ function xr(n) {
2409
2409
  setRowCount: w
2410
2410
  };
2411
2411
  }
2412
- function mr(n) {
2413
- const { onRowOrderChange: t, rows: e, getRowId: o, rowReordering: i = !1 } = n, [l, a] = Q(null), [s, c] = Q(null), d = z((v) => o ? o(v) : v.id, [o]), g = z((v) => (b) => {
2412
+ function wr(n) {
2413
+ const { onRowOrderChange: t, rows: e, getRowId: o, rowReordering: i = !1 } = n, [l, a] = Z(null), [s, c] = Z(null), d = z((v) => o ? o(v) : v.id, [o]), g = z((v) => (b) => {
2414
2414
  i && (a(v), b.dataTransfer.effectAllowed = "move");
2415
2415
  }, [i]), x = z((v) => (b) => {
2416
2416
  !i || !l || (b.preventDefault(), b.dataTransfer.dropEffect = "move", s !== v && c(v));
@@ -2437,7 +2437,7 @@ function mr(n) {
2437
2437
  onDrop: i ? m : void 0
2438
2438
  };
2439
2439
  }
2440
- function wr(n) {
2440
+ function vr(n) {
2441
2441
  const {
2442
2442
  rows: t,
2443
2443
  getRowId: e,
@@ -2519,7 +2519,7 @@ function wr(n) {
2519
2519
  return d.forEach((w) => {
2520
2520
  w.children && w.children.length > 0 && (l === -1 || w.depth < l) && y.add(w.id);
2521
2521
  }), y;
2522
- }, [d, i, l]), [m, v] = Q(/* @__PURE__ */ new Set());
2522
+ }, [d, i, l]), [m, v] = Z(/* @__PURE__ */ new Set());
2523
2523
  re(() => {
2524
2524
  h.size > 0 && v(h);
2525
2525
  }, [h]);
@@ -2592,8 +2592,8 @@ function wr(n) {
2592
2592
  getNodePath: k
2593
2593
  }), [d, x, b, N, S, f, k]);
2594
2594
  }
2595
- const vr = (n) => n?.depth === -1 ? "footer" : "inline";
2596
- function br(n) {
2595
+ const br = (n) => n?.depth === -1 ? "footer" : "inline";
2596
+ function _r(n) {
2597
2597
  const {
2598
2598
  rows: t,
2599
2599
  getRowId: e,
@@ -2602,8 +2602,8 @@ function br(n) {
2602
2602
  defaultGroupingExpansionDepth: l = 0,
2603
2603
  filterModel: a,
2604
2604
  sortModel: s,
2605
- getAggregationPosition: c = vr
2606
- } = n, [d, g] = Q(/* @__PURE__ */ new Set()), { treeNodes: x, rootIds: h, groupingRows: m } = le(() => {
2605
+ getAggregationPosition: c = br
2606
+ } = n, [d, g] = Z(/* @__PURE__ */ new Set()), { treeNodes: x, rootIds: h, groupingRows: m } = le(() => {
2607
2607
  const f = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), y = [];
2608
2608
  if (o.length === 0)
2609
2609
  return { treeNodes: f, rootIds: y, groupingRows: k };
@@ -2629,18 +2629,18 @@ function br(n) {
2629
2629
  const L = I[0][_], U = w(_, F, R);
2630
2630
  T.push(U);
2631
2631
  const q = {};
2632
- i && Object.entries(i).forEach(([W, V]) => {
2633
- const G = I.map((D) => D[W]);
2632
+ i && Object.entries(i).forEach(([O, V]) => {
2633
+ const G = I.map((D) => D[O]);
2634
2634
  if (V === "sum")
2635
- q[W] = G.reduce((D, P) => D + (Number(P) || 0), 0);
2635
+ q[O] = G.reduce((D, P) => D + (Number(P) || 0), 0);
2636
2636
  else if (V === "min")
2637
- q[W] = Math.min(...G.map((D) => Number(D) || 0));
2637
+ q[O] = Math.min(...G.map((D) => Number(D) || 0));
2638
2638
  else if (V === "max")
2639
- q[W] = Math.max(...G.map((D) => Number(D) || 0));
2639
+ q[O] = Math.max(...G.map((D) => Number(D) || 0));
2640
2640
  else if (V === "avg") {
2641
2641
  const D = G.reduce((P, ne) => P + (Number(ne) || 0), 0);
2642
- q[W] = G.length ? D / G.length : 0;
2643
- } else V === "count" && (q[W] = G.length);
2642
+ q[O] = G.length ? D / G.length : 0;
2643
+ } else V === "count" && (q[O] = G.length);
2644
2644
  });
2645
2645
  const K = {
2646
2646
  [_]: L,
@@ -2663,8 +2663,8 @@ function br(n) {
2663
2663
  C.aggregationPosition = c(C), f.set(U, C);
2664
2664
  const B = u(I, E + 1, U);
2665
2665
  f.get(U).children = B;
2666
- const O = I.length;
2667
- f.get(U).descendantCount = O;
2666
+ const W = I.length;
2667
+ f.get(U).descendantCount = W;
2668
2668
  }), T;
2669
2669
  }, p = u(t, 0, null);
2670
2670
  return y.push(...p), { treeNodes: f, rootIds: y, groupingRows: k };
@@ -2739,14 +2739,14 @@ function br(n) {
2739
2739
  getNode: N
2740
2740
  }), [x, m, v, b, S, N]);
2741
2741
  }
2742
- function _r(n) {
2742
+ function yr(n) {
2743
2743
  const {
2744
2744
  rows: t,
2745
2745
  getRowId: e,
2746
2746
  processRowUpdate: o,
2747
2747
  onProcessRowUpdateError: i,
2748
2748
  onRowChange: l
2749
- } = n, [a, s] = Q(null), c = J(null), d = z((m) => {
2749
+ } = n, [a, s] = Z(null), c = J(null), d = z((m) => {
2750
2750
  s(m), c.current = typeof m == "function" ? m(c.current) : m;
2751
2751
  }, []), g = z((m) => {
2752
2752
  d({
@@ -2793,8 +2793,8 @@ function _r(n) {
2793
2793
  setEditCellValue: h
2794
2794
  };
2795
2795
  }
2796
- function yr(n, t, e) {
2797
- const [o, i] = Q(/* @__PURE__ */ new Map()), [l, a] = Q({
2796
+ function Cr(n, t, e) {
2797
+ const [o, i] = Z(/* @__PURE__ */ new Map()), [l, a] = Z({
2798
2798
  caches: {
2799
2799
  spannedCells: {},
2800
2800
  hiddenCells: {},
@@ -2990,7 +2990,7 @@ function at(n, t, e, o) {
2990
2990
  let i = n.get(t);
2991
2991
  i || (i = {}, n.set(t, i)), i[e] = o;
2992
2992
  }
2993
- function Cr(n) {
2993
+ function kr(n) {
2994
2994
  const {
2995
2995
  dataSource: t,
2996
2996
  sortModel: e,
@@ -3090,7 +3090,7 @@ function Cr(n) {
3090
3090
  };
3091
3091
  }
3092
3092
  const Dn = "\0", xt = "";
3093
- function kr(n, t) {
3093
+ function Sr(n, t) {
3094
3094
  const e = n.filter((o) => o != null && !isNaN(o));
3095
3095
  if (e.length === 0) return null;
3096
3096
  switch (t) {
@@ -3106,13 +3106,13 @@ function kr(n, t) {
3106
3106
  return Math.max(...e);
3107
3107
  }
3108
3108
  }
3109
- function Wt(n, t) {
3109
+ function Ot(n, t) {
3110
3110
  return t.map((e) => String(n[e] ?? "")).join(Dn);
3111
3111
  }
3112
3112
  function an(n, t, e, o) {
3113
3113
  return o ? `${n}${xt}${t}${xt}${e}` : `${t}${xt}${e}`;
3114
3114
  }
3115
- function Sr(n, t, e, o) {
3115
+ function jr(n, t, e, o) {
3116
3116
  return le(() => {
3117
3117
  const i = { pivotRows: [], pivotColumns: [], colKeys: [], isValid: !1 };
3118
3118
  if (!o) return i;
@@ -3120,16 +3120,16 @@ function Sr(n, t, e, o) {
3120
3120
  if (l.length === 0 || s.length === 0) return i;
3121
3121
  const c = a.length > 0, d = new Map(t.map((f) => [f.field, f])), g = /* @__PURE__ */ new Set();
3122
3122
  for (const f of n)
3123
- g.add(Wt(f, a));
3123
+ g.add(Ot(f, a));
3124
3124
  const x = Array.from(g).sort(), h = /* @__PURE__ */ new Map();
3125
3125
  for (const f of n) {
3126
- const k = Wt(f, l);
3126
+ const k = Ot(f, l);
3127
3127
  if (!h.has(k)) {
3128
3128
  const p = {};
3129
3129
  for (const j of l) p[j] = f[j];
3130
3130
  h.set(k, { labelValues: p, bucket: /* @__PURE__ */ new Map() });
3131
3131
  }
3132
- const y = h.get(k), w = Wt(f, a);
3132
+ const y = h.get(k), w = Ot(f, a);
3133
3133
  y.bucket.has(w) || y.bucket.set(w, /* @__PURE__ */ new Map());
3134
3134
  const u = y.bucket.get(w);
3135
3135
  for (const p of s) {
@@ -3145,14 +3145,14 @@ function Sr(n, t, e, o) {
3145
3145
  const w = f.bucket.get(y);
3146
3146
  for (const u of s) {
3147
3147
  const p = an(y, u.field, u.aggFn, c), j = w?.get(u.field) ?? [];
3148
- k[p] = j.length > 0 ? kr(j, u.aggFn) : null;
3148
+ k[p] = j.length > 0 ? Sr(j, u.aggFn) : null;
3149
3149
  }
3150
3150
  }
3151
3151
  v.push(k);
3152
3152
  }
3153
3153
  const b = /* @__PURE__ */ new Map();
3154
3154
  for (const f of n) {
3155
- const k = Wt(f, a);
3155
+ const k = Ot(f, a);
3156
3156
  for (const y of s) {
3157
3157
  if (y.aggFn !== "avg" && y.aggFn !== "min" && y.aggFn !== "max") continue;
3158
3158
  const w = `${k}${xt}${y.field}`;
@@ -3227,7 +3227,7 @@ function Sr(n, t, e, o) {
3227
3227
  return { pivotRows: v, pivotColumns: N, colKeys: x, isValid: !0 };
3228
3228
  }, [n, t, e, o]);
3229
3229
  }
3230
- function jr(n) {
3230
+ function Rr(n) {
3231
3231
  const t = document.createElement("textarea");
3232
3232
  t.value = n, t.style.cssText = "position:fixed;top:-9999px;left:-9999px;opacity:0;", document.body.appendChild(t), t.focus(), t.select();
3233
3233
  let e = !1;
@@ -3238,10 +3238,10 @@ function jr(n) {
3238
3238
  }
3239
3239
  return e;
3240
3240
  }
3241
- async function Rr(n) {
3241
+ async function Er(n) {
3242
3242
  let t = !1;
3243
3243
  try {
3244
- t = jr(n);
3244
+ t = Rr(n);
3245
3245
  } catch {
3246
3246
  }
3247
3247
  if (navigator.clipboard && typeof navigator.clipboard.writeText == "function")
@@ -3255,7 +3255,7 @@ async function Rr(n) {
3255
3255
  else if (!t)
3256
3256
  throw new Error("Clipboard API not available and fallback failed.");
3257
3257
  }
3258
- function Er(n) {
3258
+ function Nr(n) {
3259
3259
  const { selectedRowIds: t, columns: e, getVisibleRows: o, getRowId: i } = n, l = z(async () => {
3260
3260
  if (t.size === 0) return;
3261
3261
  const s = o().filter((h) => t.has(i(h)));
@@ -3269,7 +3269,7 @@ function Er(n) {
3269
3269
  `), x = `${d}
3270
3270
  ${g}`;
3271
3271
  try {
3272
- await Rr(x);
3272
+ await Er(x);
3273
3273
  } catch (h) {
3274
3274
  console.error("[OpenGridX] Failed to copy to clipboard:", h);
3275
3275
  }
@@ -3283,7 +3283,7 @@ ${g}`;
3283
3283
  return window.addEventListener("keydown", a), () => window.removeEventListener("keydown", a);
3284
3284
  }, [l]), { copySelectedRows: l };
3285
3285
  }
3286
- function Nr({
3286
+ function Mr({
3287
3287
  row: n,
3288
3288
  rowIndex: t,
3289
3289
  listViewColumn: e,
@@ -3327,7 +3327,7 @@ function Nr({
3327
3327
  }
3328
3328
  );
3329
3329
  }
3330
- function Mr({
3330
+ function Ir({
3331
3331
  ariaLabel: n,
3332
3332
  allRenderableRows: t,
3333
3333
  filteredRows: e,
@@ -3371,7 +3371,7 @@ function Mr({
3371
3371
  ] }),
3372
3372
  c
3373
3373
  ] }) : t.map((w, u) => /* @__PURE__ */ r.jsx(
3374
- Nr,
3374
+ Mr,
3375
3375
  {
3376
3376
  row: w,
3377
3377
  rowIndex: u,
@@ -3400,8 +3400,8 @@ function Mr({
3400
3400
  }
3401
3401
  );
3402
3402
  }
3403
- function Ir({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3404
- const [i, l] = Q(String(n ?? "")), a = J(null);
3403
+ function Pr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3404
+ const [i, l] = Z(String(n ?? "")), a = J(null);
3405
3405
  return re(() => {
3406
3406
  a.current?.focus(), a.current?.select();
3407
3407
  }, []), /* @__PURE__ */ r.jsx(
@@ -3421,8 +3421,8 @@ function Ir({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3421
3421
  }
3422
3422
  );
3423
3423
  }
3424
- function Pr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3425
- const [i, l] = Q(typeof n == "number" ? n : ""), a = J(null);
3424
+ function Lr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3425
+ const [i, l] = Z(typeof n == "number" ? n : ""), a = J(null);
3426
3426
  return re(() => {
3427
3427
  a.current?.focus(), a.current?.select();
3428
3428
  }, []), /* @__PURE__ */ r.jsx(
@@ -3443,7 +3443,7 @@ function Pr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3443
3443
  }
3444
3444
  );
3445
3445
  }
3446
- function Lr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3446
+ function Tr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3447
3447
  const i = J(null);
3448
3448
  re(() => {
3449
3449
  i.current?.focus();
@@ -3465,7 +3465,7 @@ function Lr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3465
3465
  }
3466
3466
  ) });
3467
3467
  }
3468
- function Tr({ value: n, colDef: t, onValueChange: e, onCommit: o, onCancel: i }) {
3468
+ function Wr({ value: n, colDef: t, onValueChange: e, onCommit: o, onCancel: i }) {
3469
3469
  const l = J(null);
3470
3470
  re(() => {
3471
3471
  l.current?.focus();
@@ -3492,7 +3492,7 @@ function Tr({ value: n, colDef: t, onValueChange: e, onCommit: o, onCancel: i })
3492
3492
  );
3493
3493
  }
3494
3494
  function Or({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3495
- const [i, l] = Q(typeof n == "string" ? n : String(n ?? "")), a = J(null);
3495
+ const [i, l] = Z(typeof n == "string" ? n : String(n ?? "")), a = J(null);
3496
3496
  return re(() => {
3497
3497
  a.current?.focus();
3498
3498
  }, []), /* @__PURE__ */ r.jsx(
@@ -3512,22 +3512,22 @@ function Or({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
3512
3512
  }
3513
3513
  );
3514
3514
  }
3515
- function Wr(n) {
3515
+ function Fr(n) {
3516
3516
  const { colDef: t } = n;
3517
3517
  switch (t.type) {
3518
3518
  case "number":
3519
- return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Pr, { ...n }) });
3520
- case "boolean":
3521
3519
  return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Lr, { ...n }) });
3522
- case "singleSelect":
3520
+ case "boolean":
3523
3521
  return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Tr, { ...n }) });
3522
+ case "singleSelect":
3523
+ return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Wr, { ...n }) });
3524
3524
  case "date":
3525
3525
  return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Or, { ...n }) });
3526
3526
  default:
3527
- return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Ir, { ...n }) });
3527
+ return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Pr, { ...n }) });
3528
3528
  }
3529
3529
  }
3530
- function Fr(n) {
3530
+ function Ar(n) {
3531
3531
  const {
3532
3532
  onCellClick: t,
3533
3533
  onCellEditStart: e,
@@ -3566,7 +3566,7 @@ function Fr(n) {
3566
3566
  rowIndex: s,
3567
3567
  colIndex: c
3568
3568
  }) : /* @__PURE__ */ r.jsx(
3569
- Wr,
3569
+ Fr,
3570
3570
  {
3571
3571
  value: i,
3572
3572
  row: l,
@@ -3657,7 +3657,7 @@ function Fr(n) {
3657
3657
  }
3658
3658
  );
3659
3659
  }
3660
- const Ar = ae.memo(Fr), zr = ({ className: n = "", ...t }) => /* @__PURE__ */ r.jsx(
3660
+ const zr = ae.memo(Ar), Br = ({ className: n = "", ...t }) => /* @__PURE__ */ r.jsx(
3661
3661
  "button",
3662
3662
  {
3663
3663
  type: "button",
@@ -3667,7 +3667,7 @@ const Ar = ae.memo(Fr), zr = ({ className: n = "", ...t }) => /* @__PURE__ */ r.
3667
3667
  children: /* @__PURE__ */ r.jsx("svg", { viewBox: "0 0 24 24", width: "20", height: "20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx("path", { d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }) })
3668
3668
  }
3669
3669
  );
3670
- function Br(n) {
3670
+ function $r(n) {
3671
3671
  const { content: t, height: e, isExpanded: o } = n;
3672
3672
  if (!o)
3673
3673
  return null;
@@ -3726,9 +3726,9 @@ function dn(n) {
3726
3726
  h,
3727
3727
  f,
3728
3728
  k
3729
- ), [e, d, g, l, N, h, f, k]), B = t._hasChildren === !0, O = ae.useCallback(($, ge) => {
3729
+ ), [e, d, g, l, N, h, f, k]), B = t._hasChildren === !0, W = ae.useCallback(($, ge) => {
3730
3730
  B || _?.({ id: t.id, field: $, value: ge });
3731
- }, [B, t.id, _]), W = ae.useCallback(($, ge) => {
3731
+ }, [B, t.id, _]), O = ae.useCallback(($, ge) => {
3732
3732
  T?.({ id: t.id, field: $, value: ge });
3733
3733
  }, [T, t.id]), V = ae.useCallback(($) => {
3734
3734
  M?.({ cancel: $ });
@@ -3752,13 +3752,13 @@ function dn(n) {
3752
3752
  $.stopPropagation(), c?.(t.id, $.target.checked);
3753
3753
  }, P = ($) => {
3754
3754
  $.stopPropagation(), v?.(t.id);
3755
- }, ne = cn(t.id, x), te = ne === "top", Z = ne === "bottom", pe = [
3755
+ }, ne = cn(t.id, x), te = ne === "top", ee = ne === "bottom", pe = [
3756
3756
  "ogx__row",
3757
3757
  i && "ogx__row--selected",
3758
3758
  o % 2 === 0 && "ogx__row--even",
3759
3759
  o % 2 === 1 && "ogx__row--odd",
3760
3760
  te && "ogx__row--pinned-top",
3761
- Z && "ogx__row--pinned-bottom",
3761
+ ee && "ogx__row--pinned-bottom",
3762
3762
  j && "ogx__row--dragging",
3763
3763
  E && "ogx__row--drag-over",
3764
3764
  B && "ogx__row--group"
@@ -3797,7 +3797,7 @@ function dn(n) {
3797
3797
  onDragStart: y ? y(t.id) : void 0,
3798
3798
  onDragEnd: u,
3799
3799
  onClick: ($) => $.stopPropagation(),
3800
- children: /* @__PURE__ */ r.jsx(zr, {})
3800
+ children: /* @__PURE__ */ r.jsx(Br, {})
3801
3801
  }
3802
3802
  ),
3803
3803
  h && /* @__PURE__ */ r.jsx(
@@ -3881,9 +3881,9 @@ function dn(n) {
3881
3881
  },
3882
3882
  $.field
3883
3883
  );
3884
- const de = $.valueGetter ? $.valueGetter({ row: t, field: $.field, value: t[$.field] }) : t[$.field], ve = d[$.field] ?? $.width, ce = zt($.field, g), A = ce ? C[$.field] : void 0, X = R?.id === t.id && R?.field === $.field, oe = X ? R?.value : de, ue = H?.get(t.id)?.[$.field], fe = L?.spannedCells[t.id]?.[$.field], Ie = L?.hiddenCells[t.id]?.[$.field] || !1;
3884
+ const de = $.valueGetter ? $.valueGetter({ row: t, field: $.field, value: t[$.field] }) : t[$.field], be = d[$.field] ?? $.width, ce = zt($.field, g), A = ce ? C[$.field] : void 0, X = R?.id === t.id && R?.field === $.field, oe = X ? R?.value : de, ue = H?.get(t.id)?.[$.field], fe = L?.spannedCells[t.id]?.[$.field], Ie = L?.hiddenCells[t.id]?.[$.field] || !1;
3885
3885
  return /* @__PURE__ */ r.jsx(
3886
- Ar,
3886
+ zr,
3887
3887
  {
3888
3888
  value: oe,
3889
3889
  row: t,
@@ -3892,16 +3892,16 @@ function dn(n) {
3892
3892
  colIndex: ge,
3893
3893
  isSelected: i,
3894
3894
  onCellClick: s,
3895
- width: ve,
3895
+ width: be,
3896
3896
  pinnedPosition: ce,
3897
3897
  pinnedOffset: A,
3898
3898
  isFocused: I === $.field,
3899
3899
  isFocusVisible: F,
3900
3900
  isEditable: $.editable,
3901
3901
  isEditing: X,
3902
- onCellEditStart: O,
3902
+ onCellEditStart: W,
3903
3903
  onEditStop: V,
3904
- onCellValueChange: W,
3904
+ onCellValueChange: O,
3905
3905
  colSpanInfo: ue,
3906
3906
  rowSpan: fe,
3907
3907
  isHiddenByRowSpan: Ie
@@ -3913,7 +3913,7 @@ function dn(n) {
3913
3913
  }
3914
3914
  ),
3915
3915
  h && /* @__PURE__ */ r.jsx(
3916
- Br,
3916
+ $r,
3917
3917
  {
3918
3918
  row: t,
3919
3919
  rowId: t.id,
@@ -3925,7 +3925,7 @@ function dn(n) {
3925
3925
  )
3926
3926
  ] });
3927
3927
  }
3928
- function On({
3928
+ function Wn({
3929
3929
  rows: n,
3930
3930
  position: t,
3931
3931
  columns: e,
@@ -3978,7 +3978,7 @@ function On({
3978
3978
  u.id
3979
3979
  )) });
3980
3980
  }
3981
- const $r = ({
3981
+ const Dr = ({
3982
3982
  columns: n,
3983
3983
  rowHeight: t,
3984
3984
  checkboxSelection: e = !1,
@@ -4048,7 +4048,7 @@ const $r = ({
4048
4048
  ]
4049
4049
  }
4050
4050
  );
4051
- function Dr({
4051
+ function Hr({
4052
4052
  virtualContainerHeight: n,
4053
4053
  offsetTop: t,
4054
4054
  effectiveLoading: e,
@@ -4086,13 +4086,13 @@ function Dr({
4086
4086
  }) {
4087
4087
  const U = i.length > 0 ? i : (() => {
4088
4088
  const K = (a || 1e3) - (s ? 48 : 0) - (c ? 48 : 0) - (d ? 48 : 0), C = 150, B = Math.max(1, Math.ceil(K / C));
4089
- return Array.from({ length: B }, (O, W) => ({
4090
- field: `placeholder_${W}`,
4089
+ return Array.from({ length: B }, (W, O) => ({
4090
+ field: `placeholder_${O}`,
4091
4091
  headerName: "",
4092
4092
  width: C
4093
4093
  }));
4094
4094
  })(), q = o.filter(({ row: K }) => !cn(K.id, x)).filter(
4095
- (K, C, B) => C === B.findIndex((O) => O.row.id === K.row.id)
4095
+ (K, C, B) => C === B.findIndex((W) => W.row.id === K.row.id)
4096
4096
  );
4097
4097
  return /* @__PURE__ */ r.jsx(
4098
4098
  "div",
@@ -4108,7 +4108,7 @@ function Dr({
4108
4108
  role: "rowgroup",
4109
4109
  children: [
4110
4110
  e && o.length === 0 ? Array.from({ length: 10 }).map((K, C) => /* @__PURE__ */ r.jsx(
4111
- $r,
4111
+ Dr,
4112
4112
  {
4113
4113
  columns: U,
4114
4114
  rowHeight: g,
@@ -4172,13 +4172,13 @@ function Dr({
4172
4172
  }
4173
4173
  );
4174
4174
  }
4175
- function Hr() {
4175
+ function Gr() {
4176
4176
  return /* @__PURE__ */ r.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
4177
4177
  /* @__PURE__ */ r.jsx("circle", { cx: "11", cy: "11", r: "8" }),
4178
4178
  /* @__PURE__ */ r.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
4179
4179
  ] });
4180
4180
  }
4181
- function Gr() {
4181
+ function Vr() {
4182
4182
  return /* @__PURE__ */ r.jsxs(
4183
4183
  "svg",
4184
4184
  {
@@ -4199,7 +4199,7 @@ function Gr() {
4199
4199
  );
4200
4200
  }
4201
4201
  function Hn(n) {
4202
- const { columns: t, visibleColumns: e, onVisibilityChange: o, onShowAll: i, onHideAll: l, onColumnReorder: a, onColumnOrderReset: s } = n, [c, d] = Q(""), [g, x] = Q(null), h = J(null), v = le(() => t.filter((u) => u.hideable !== !1), [t]).every((u) => e.has(u.field)), b = le(() => {
4202
+ const { columns: t, visibleColumns: e, onVisibilityChange: o, onShowAll: i, onHideAll: l, onColumnReorder: a, onColumnOrderReset: s } = n, [c, d] = Z(""), [g, x] = Z(null), h = J(null), v = le(() => t.filter((u) => u.hideable !== !1), [t]).every((u) => e.has(u.field)), b = le(() => {
4203
4203
  if (!c) return t;
4204
4204
  const u = c.toLowerCase();
4205
4205
  return t.filter(
@@ -4222,7 +4222,7 @@ function Hn(n) {
4222
4222
  };
4223
4223
  return /* @__PURE__ */ r.jsxs("div", { className: "ogx-column-visibility-panel", children: [
4224
4224
  /* @__PURE__ */ r.jsx("div", { className: "ogx-column-visibility-panel__search-section", children: /* @__PURE__ */ r.jsxs("div", { className: "ogx-column-visibility-panel__search-container", children: [
4225
- /* @__PURE__ */ r.jsx(Hr, {}),
4225
+ /* @__PURE__ */ r.jsx(Gr, {}),
4226
4226
  /* @__PURE__ */ r.jsx(
4227
4227
  "input",
4228
4228
  {
@@ -4259,7 +4259,7 @@ function Hn(n) {
4259
4259
  draggable: !0,
4260
4260
  onDragStart: N(u.field),
4261
4261
  title: "Drag to reorder",
4262
- children: /* @__PURE__ */ r.jsx(Gr, {})
4262
+ children: /* @__PURE__ */ r.jsx(Vr, {})
4263
4263
  }
4264
4264
  ),
4265
4265
  /* @__PURE__ */ r.jsxs(
@@ -4309,7 +4309,7 @@ function Hn(n) {
4309
4309
  ] })
4310
4310
  ] });
4311
4311
  }
4312
- function Vr({
4312
+ function Ur({
4313
4313
  isOpen: n,
4314
4314
  containerRef: t,
4315
4315
  effectiveColumns: e,
@@ -4322,7 +4322,7 @@ function Vr({
4322
4322
  onColumnOrderChange: d,
4323
4323
  setInternalColumnOrder: g
4324
4324
  }) {
4325
- const [x, h] = Q(16), [m, v] = Q(16), [b, S] = Q(() => document.body);
4325
+ const [x, h] = Z(16), [m, v] = Z(16), [b, S] = Z(() => document.body);
4326
4326
  if (Ee(() => {
4327
4327
  if (!n || !t.current) return;
4328
4328
  const f = t.current.getBoundingClientRect();
@@ -4409,7 +4409,7 @@ function Vr({
4409
4409
  b
4410
4410
  );
4411
4411
  }
4412
- function wi(n) {
4412
+ function vi(n) {
4413
4413
  const {
4414
4414
  rows: t,
4415
4415
  columns: e,
@@ -4449,20 +4449,20 @@ function wi(n) {
4449
4449
  treeData: K = !1,
4450
4450
  getTreeDataPath: C,
4451
4451
  defaultGroupingExpansionDepth: B,
4452
- rowGroupingModel: O,
4453
- aggregationModel: W,
4452
+ rowGroupingModel: W,
4453
+ aggregationModel: O,
4454
4454
  onAggregationModelChange: V,
4455
4455
  getAggregationPosition: G,
4456
4456
  isCellEditable: D,
4457
4457
  processRowUpdate: P,
4458
4458
  onProcessRowUpdateError: ne,
4459
4459
  dataSource: te,
4460
- sortingMode: Z = "client",
4460
+ sortingMode: ee = "client",
4461
4461
  filterMode: pe = "client",
4462
4462
  paginationMode: $ = "client",
4463
4463
  rowCount: ge,
4464
4464
  slots: de,
4465
- slotProps: ve,
4465
+ slotProps: be,
4466
4466
  pivotMode: ce = !1,
4467
4467
  pivotModel: A,
4468
4468
  onPivotModelChange: X,
@@ -4476,19 +4476,19 @@ function wi(n) {
4476
4476
  columnVisibilityModel: Ue,
4477
4477
  onColumnVisibilityModelChange: Ke,
4478
4478
  listView: ie = !1,
4479
- listViewColumn: ye,
4479
+ listViewColumn: Ce,
4480
4480
  columnGroupingModel: Be,
4481
4481
  noRowsLabel: Bt = "No Data",
4482
4482
  apiRef: $t
4483
- } = n, Kn = le(() => ({ items: [] }), []), Ne = h || Kn, Yn = le(() => [], []), Dt = O || Yn, hn = J(de?.toolbar);
4483
+ } = n, Kn = le(() => ({ items: [] }), []), Ne = h || Kn, Yn = le(() => [], []), Dt = W || Yn, hn = J(de?.toolbar);
4484
4484
  hn.current = de?.toolbar;
4485
4485
  const qn = J((Y) => {
4486
- const ee = hn.current;
4487
- return ee ? ee(Y) : null;
4488
- }).current, Xn = To({
4486
+ const Q = hn.current;
4487
+ return Q ? Q(Y) : null;
4488
+ }).current, Xn = Wo({
4489
4489
  initialState: Ve,
4490
4490
  sortModel: v,
4491
- aggregationModel: W,
4491
+ aggregationModel: O,
4492
4492
  onAggregationModelChange: V,
4493
4493
  columnVisibilityModel: Ue,
4494
4494
  onColumnVisibilityModelChange: Ke,
@@ -4507,23 +4507,23 @@ function wi(n) {
4507
4507
  handleAggregationModelChange: mn,
4508
4508
  columnVisibilityModel: $e,
4509
4509
  handleColumnVisibilityModelChange: mt,
4510
- pinnedColumns: We,
4510
+ pinnedColumns: Fe,
4511
4511
  handlePinnedColumnsChange: Ht,
4512
4512
  currentPivotModel: Gt,
4513
4513
  handlePivotModelChange: wn,
4514
- effectivePaginationModel: Se,
4514
+ effectivePaginationModel: je,
4515
4515
  handlePaginationModelChange: Vt,
4516
- selectedRowIds: Ce,
4516
+ selectedRowIds: ke,
4517
4517
  isSelectionControlled: wt,
4518
4518
  setInternalRowSelectionModel: vt
4519
- } = Xn, bt = d, _t = Sr(t, e, Gt, ce), vn = ce && _t.isValid ? _t.pivotRows : t, Ut = ce && _t.isValid ? _t.pivotColumns : e, [Jn, bn] = Q(null);
4519
+ } = Xn, bt = d, _t = jr(t, e, Gt, ce), vn = ce && _t.isValid ? _t.pivotRows : t, Ut = ce && _t.isValid ? _t.pivotColumns : e, [Jn, bn] = Z(null);
4520
4520
  re(() => {
4521
4521
  bn(null);
4522
4522
  }, [Me]);
4523
4523
  const Ye = J(null), Qn = J(null), yt = J(null), Zn = z((Y) => Y.id, []), qe = o || Zn, Kt = le(
4524
4524
  () => vn.map((Y) => {
4525
- const ee = qe(Y);
4526
- return ee === Y.id ? Y : { ...Y, id: ee };
4525
+ const Q = qe(Y);
4526
+ return Q === Y.id ? Y : { ...Y, id: Q };
4527
4527
  }),
4528
4528
  [vn, qe]
4529
4529
  ), Xe = z((Y) => {
@@ -4532,10 +4532,10 @@ function wi(n) {
4532
4532
  _n.current = te;
4533
4533
  const yn = J(null), Cn = J(null), eo = z((Y) => {
4534
4534
  if (_n.current && K && (Y.serverChildrenCount ?? 0) > 0 && (Y.children ?? []).length === 0) {
4535
- const ee = Cn.current?.getNodePath(Y.id) || [Y.groupingKey];
4536
- yn.current?.(Y.id, ee);
4535
+ const Q = Cn.current?.getNodePath(Y.id) || [Y.groupingKey];
4536
+ yn.current?.(Y.id, Q);
4537
4537
  }
4538
- }, [K]), ke = xr({
4538
+ }, [K]), Se = mr({
4539
4539
  rows: Kt,
4540
4540
  columns: Ut,
4541
4541
  rowHeight: i,
@@ -4552,20 +4552,20 @@ function wi(n) {
4552
4552
  setDataSourceLoading: no,
4553
4553
  setDataSourceError: oo,
4554
4554
  setRowCount: ro
4555
- } = ke, { scrollTop: io, scrollLeft: lo, handleScroll: so } = Uo({ onRowsScrollEnd: fe });
4555
+ } = Se, { scrollTop: io, scrollLeft: lo, handleScroll: so } = Ko({ onRowsScrollEnd: fe });
4556
4556
  re(() => {
4557
4557
  $t && ($t.current = Je.current);
4558
4558
  }, [$t, Je]);
4559
- const { copySelectedRows: Sn } = Er({
4560
- selectedRowIds: Ce,
4559
+ const { copySelectedRows: Sn } = Nr({
4560
+ selectedRowIds: ke,
4561
4561
  columns: Ut,
4562
4562
  getVisibleRows: () => Je.current.getVisibleRows(),
4563
4563
  getRowId: qe
4564
4564
  });
4565
4565
  re(() => {
4566
- Je.current.copySelectedRows = Sn, Je.current.getSelectedRows = () => Array.from(Ce);
4567
- }, [Sn, Ce, Je]);
4568
- const ao = he.dataSource.loading, ct = q || ao, Qe = le(() => he.rows.allRows.map((Y) => he.rows.idRowsLookup.get(Y)), [he.rows]), qt = wr({
4566
+ Je.current.copySelectedRows = Sn, Je.current.getSelectedRows = () => Array.from(ke);
4567
+ }, [Sn, ke, Je]);
4568
+ const ao = he.dataSource.loading, ct = q || ao, Qe = le(() => he.rows.allRows.map((Y) => he.rows.idRowsLookup.get(Y)), [he.rows]), qt = vr({
4569
4569
  rows: Qe,
4570
4570
  getRowId: qe,
4571
4571
  getTreeDataPath: C,
@@ -4578,7 +4578,7 @@ function wi(n) {
4578
4578
  re(() => {
4579
4579
  Cn.current = qt;
4580
4580
  }, [qt]);
4581
- const co = br({
4581
+ const co = _r({
4582
4582
  rows: Qe,
4583
4583
  getRowId: qe,
4584
4584
  rowGroupingModel: Dt,
@@ -4587,31 +4587,31 @@ function wi(n) {
4587
4587
  filterModel: Ne,
4588
4588
  sortModel: Oe,
4589
4589
  getAggregationPosition: G
4590
- }), Ze = _r({
4590
+ }), Ze = yr({
4591
4591
  rows: Qe,
4592
4592
  getRowId: qe,
4593
4593
  processRowUpdate: P,
4594
4594
  onProcessRowUpdateError: ne,
4595
4595
  onRowChange: (Y) => {
4596
- const { dispatch: ee } = ke, we = Array.from(ke.state.rows.idRowsLookup.values()).map(
4597
- (me) => me.id === Y.id ? Y : me
4596
+ const { dispatch: Q } = Se, ve = Array.from(Se.state.rows.idRowsLookup.values()).map(
4597
+ (we) => we.id === Y.id ? Y : we
4598
4598
  );
4599
- ee({ type: "SET_ROWS", payload: we });
4599
+ Q({ type: "SET_ROWS", payload: ve });
4600
4600
  }
4601
4601
  }), Xt = K, Ct = !!(Dt && Dt.length > 0), Jt = Xt || Ct, kt = Xt ? qt : Ct ? co : null, Pe = S && !Ct, St = z((Y) => {
4602
- const { row: ee, id: se } = Y;
4603
- if (Jt && ee._hasChildren) {
4602
+ const { row: Q, id: se } = Y;
4603
+ if (Jt && Q._hasChildren) {
4604
4604
  kt?.toggleExpansion(se);
4605
4605
  return;
4606
4606
  }
4607
4607
  g?.(Y);
4608
- }, [Jt, kt, g]), Qt = Cr({
4608
+ }, [Jt, kt, g]), Qt = kr({
4609
4609
  dataSource: te,
4610
4610
  sortModel: Oe,
4611
4611
  filterModel: Ne,
4612
- paginationModel: Se,
4612
+ paginationModel: je,
4613
4613
  paginationMode: $,
4614
- sortingMode: Z,
4614
+ sortingMode: ee,
4615
4615
  filterMode: pe,
4616
4616
  aggregationModel: Me,
4617
4617
  setRows: Yt,
@@ -4625,20 +4625,20 @@ function wi(n) {
4625
4625
  }, [Qt.fetchChildren]), re(() => {
4626
4626
  te || Yt(Kt);
4627
4627
  }, [Kt, Yt, te]);
4628
- const Le = !!p, [uo, go] = Q(/* @__PURE__ */ new Set()), et = E ?? uo, jt = z((Y) => {
4629
- const ee = new Set(et);
4630
- ee.has(Y) ? ee.delete(Y) : ee.add(Y), E === void 0 && go(ee), R?.(ee);
4628
+ const Le = !!p, [uo, go] = Z(/* @__PURE__ */ new Set()), et = E ?? uo, jt = z((Y) => {
4629
+ const Q = new Set(et);
4630
+ Q.has(Y) ? Q.delete(Y) : Q.add(Y), E === void 0 && go(Q), R?.(Q);
4631
4631
  }, [et, E, R]), {
4632
- effectiveColumns: Fe,
4632
+ effectiveColumns: Ae,
4633
4633
  orderedColumns: Zt,
4634
4634
  visibleOrderedColumns: fo,
4635
4635
  navigationColumns: jn,
4636
- columnWidths: Ae,
4636
+ columnWidths: Te,
4637
4637
  effectiveColumnOrder: Rt,
4638
4638
  setInternalColumnOrder: Et,
4639
4639
  columnReorderHandlers: tt,
4640
4640
  handleColumnResize: ho
4641
- } = Go({
4641
+ } = Vo({
4642
4642
  activeColumns: Ut,
4643
4643
  isHierarchyEnabled: Jt,
4644
4644
  isRowGrouping: Ct,
@@ -4655,56 +4655,56 @@ function wi(n) {
4655
4655
  initialState: Ve,
4656
4656
  setColumns: to
4657
4657
  });
4658
- Ko({
4658
+ Yo({
4659
4659
  onStateChange: xe,
4660
4660
  sortModel: Oe,
4661
4661
  filterModel: Ne,
4662
- effectivePaginationModel: Se,
4663
- columnWidths: Ae,
4662
+ effectivePaginationModel: je,
4663
+ columnWidths: Te,
4664
4664
  effectiveColumnOrder: Rt,
4665
4665
  columnVisibilityModel: $e,
4666
- pinnedColumns: We
4666
+ pinnedColumns: Fe
4667
4667
  });
4668
- const nt = $o({
4668
+ const nt = Do({
4669
4669
  effectiveRows: Qe,
4670
4670
  activeHierarchyHandlers: kt,
4671
4671
  filterMode: pe,
4672
4672
  filterModel: Ne,
4673
4673
  dataSource: te,
4674
4674
  sortModel: Oe,
4675
- sortingMode: Z,
4675
+ sortingMode: ee,
4676
4676
  pagination: Pe,
4677
4677
  paginationMode: $,
4678
- effectivePaginationModel: Se,
4678
+ effectivePaginationModel: je,
4679
4679
  pinnedRows: u,
4680
4680
  isLoading: he.dataSource.loading,
4681
- pageSize: Se.pageSize
4681
+ pageSize: je.pageSize
4682
4682
  }), De = nt.filteredRows, en = nt.pinnedTopRows, tn = nt.pinnedBottomRows, ot = nt.sortedUnpinnedRows, ut = nt.paginatedUnpinnedRows, nn = nt.allRenderableRows;
4683
4683
  re(() => {
4684
- ke.apiRef.current.getVisibleRows = () => Pe ? ut : ot, ke.apiRef.current.getVisibleColumns = () => Fe;
4685
- }, [ot, ut, Pe, Fe, ke.apiRef]);
4686
- const po = mr({
4684
+ Se.apiRef.current.getVisibleRows = () => Pe ? ut : ot, Se.apiRef.current.getVisibleColumns = () => Ae;
4685
+ }, [ot, ut, Pe, Ae, Se.apiRef]);
4686
+ const po = wr({
4687
4687
  rows: Pe ? ut : ot,
4688
4688
  getRowId: (Y) => Y.id,
4689
4689
  onRowOrderChange: U,
4690
4690
  rowReordering: L
4691
- }), rt = yr(
4691
+ }), rt = Cr(
4692
4692
  nn,
4693
4693
  jn,
4694
- Ae
4695
- ), { aggregationResult: on } = qo({
4694
+ Te
4695
+ ), { aggregationResult: on } = Xo({
4696
4696
  rows: De,
4697
4697
  aggregationModel: Me,
4698
- isServerSide: !!(te && ($ === "server" || Z === "server")),
4698
+ isServerSide: !!(te && ($ === "server" || ee === "server")),
4699
4699
  dataSource: te,
4700
4700
  filterModel: Ne,
4701
4701
  sortModel: Oe,
4702
4702
  serverAggregationResults: Jn
4703
4703
  }), Nt = Object.keys(Me).length > 0;
4704
4704
  re(() => {
4705
- ke.apiRef.current.getAggregationResult = () => Nt ? on : null, ke.apiRef.current.getAggregationModel = () => Nt ? Me : null;
4706
- }, [on, Me, Nt, ke.apiRef]);
4707
- const je = Io({
4705
+ Se.apiRef.current.getAggregationResult = () => Nt ? on : null, Se.apiRef.current.getAggregationModel = () => Nt ? Me : null;
4706
+ }, [on, Me, Nt, Se.apiRef]);
4707
+ const me = Po({
4708
4708
  rowHeight: i,
4709
4709
  pagination: Pe,
4710
4710
  paginatedUnpinnedRows: ut,
@@ -4714,37 +4714,42 @@ function wi(n) {
4714
4714
  pinnedTopRowsLength: en.length,
4715
4715
  pinnedBottomRowsLength: tn.length,
4716
4716
  visibleOrderedColumns: fo,
4717
- pinnedColumns: We,
4718
- columnWidths: Ae,
4717
+ pinnedColumns: Fe,
4718
+ columnWidths: Te,
4719
4719
  viewportWidth: he.dimensions.viewportWidth || 1e3,
4720
4720
  checkboxSelection: s,
4721
4721
  hasDetailPanel: Le,
4722
4722
  rowReordering: L,
4723
4723
  paginationMode: $,
4724
4724
  isLoading: he.dataSource.loading,
4725
- pageSize: Se.pageSize
4726
- });
4725
+ pageSize: je.pageSize
4726
+ }), xo = le(() => {
4727
+ const Y = {};
4728
+ for (const Q of [...me.leftPinnedCols, ...me.unpinnedColsWithWidth, ...me.rightPinnedCols])
4729
+ Q.isSpacer || (Y[Q.field] = Q.width);
4730
+ return { ...Y, ...Te };
4731
+ }, [me.leftPinnedCols, me.unpinnedColsWithWidth, me.rightPinnedCols, Te]);
4727
4732
  re(() => {
4728
- ke.apiRef.current.scrollToIndexes = ({ rowIndex: Y, colIndex: ee }) => {
4733
+ Se.apiRef.current.scrollToIndexes = ({ rowIndex: Y, colIndex: Q }) => {
4729
4734
  const se = Ye.current;
4730
4735
  if (se) {
4731
4736
  if (Y !== void 0 && Y >= 0) {
4732
- const we = Y > 0 ? je.cumulativeHeights[Y - 1] : 0, me = je.cumulativeHeights[Y] ?? we, { scrollTop: be, clientHeight: _e } = se;
4733
- we < be ? se.scrollTop = we : me > be + _e && (se.scrollTop = me - _e);
4737
+ const ve = Y > 0 ? me.cumulativeHeights[Y - 1] : 0, we = me.cumulativeHeights[Y] ?? ve, { scrollTop: _e, clientHeight: ye } = se;
4738
+ ve < _e ? se.scrollTop = ve : we > _e + ye && (se.scrollTop = we - ye);
4734
4739
  }
4735
- if (ee !== void 0 && ee >= 0) {
4736
- const me = [...je.leftPinnedCols, ...je.unpinnedColsWithWidth, ...je.rightPinnedCols][ee];
4737
- if (!me) return;
4738
- const be = je.unpinnedColsWithWidth.findIndex((ko) => ko.field === me.field);
4739
- if (be === -1) return;
4740
- const _e = be > 0 ? je.unpinnedAccWidths[be - 1] : 0, Pt = je.unpinnedAccWidths[be] ?? _e, Lt = je.leftWidth + Pt, { scrollLeft: Mn, clientWidth: In } = se;
4741
- _e < Mn ? se.scrollLeft = _e : Lt > Mn + In && (se.scrollLeft = Lt - In);
4740
+ if (Q !== void 0 && Q >= 0) {
4741
+ const we = [...me.leftPinnedCols, ...me.unpinnedColsWithWidth, ...me.rightPinnedCols][Q];
4742
+ if (!we) return;
4743
+ const _e = me.unpinnedColsWithWidth.findIndex((So) => So.field === we.field);
4744
+ if (_e === -1) return;
4745
+ const ye = _e > 0 ? me.unpinnedAccWidths[_e - 1] : 0, Pt = me.unpinnedAccWidths[_e] ?? ye, Lt = me.leftWidth + Pt, { scrollLeft: Mn, clientWidth: In } = se;
4746
+ ye < Mn ? se.scrollLeft = ye : Lt > Mn + In && (se.scrollLeft = Lt - In);
4742
4747
  }
4743
4748
  }
4744
4749
  };
4745
- }, [je, Ye, ke.apiRef]);
4746
- const Re = Do({
4747
- layout: je,
4750
+ }, [me, Ye, Se.apiRef]);
4751
+ const Re = Ho({
4752
+ layout: me,
4748
4753
  scrollTop: io,
4749
4754
  scrollLeft: lo,
4750
4755
  viewportWidth: he.dimensions.viewportWidth,
@@ -4758,32 +4763,32 @@ function wi(n) {
4758
4763
  });
4759
4764
  re(() => {
4760
4765
  if (!Ye.current) return;
4761
- const Y = new ResizeObserver((ee) => {
4762
- for (const se of ee) {
4763
- const { width: we, height: me } = se.contentRect;
4764
- kn(we, me);
4766
+ const Y = new ResizeObserver((Q) => {
4767
+ for (const se of Q) {
4768
+ const { width: ve, height: we } = se.contentRect;
4769
+ kn(ve, we);
4765
4770
  }
4766
4771
  });
4767
4772
  return Y.observe(Ye.current), () => {
4768
4773
  Y.disconnect();
4769
4774
  };
4770
4775
  }, [kn]);
4771
- const gt = z((Y, ee) => {
4772
- const se = new Set(Ce);
4773
- ee ? se.add(Y) : se.delete(Y);
4774
- const we = Array.from(se);
4775
- wt || vt(we), bt?.(we);
4776
- }, [Ce, wt, bt, vt]), xo = z((Y) => {
4777
- let ee = [];
4778
- Y && (ee = Qe.map((se) => se.id)), wt || vt(ee), bt?.(ee);
4779
- }, [Qe, wt, bt, vt]), Rn = z((Y, ee) => {
4780
- const se = ee ? [{ field: Y, sort: ee }] : [];
4776
+ const gt = z((Y, Q) => {
4777
+ const se = new Set(ke);
4778
+ Q ? se.add(Y) : se.delete(Y);
4779
+ const ve = Array.from(se);
4780
+ wt || vt(ve), bt?.(ve);
4781
+ }, [ke, wt, bt, vt]), mo = z((Y) => {
4782
+ let Q = [];
4783
+ Y && (Q = Qe.map((se) => se.id)), wt || vt(Q), bt?.(Q);
4784
+ }, [Qe, wt, bt, vt]), Rn = z((Y, Q) => {
4785
+ const se = Q ? [{ field: Y, sort: Q }] : [];
4781
4786
  pn || xn(se), b?.(se);
4782
- }, [pn, b, xn]), { focusedCell: Mt, setFocusedCell: rn, handleFocus: mo, handleBlur: wo, handleKeyDown: vo } = Po({
4787
+ }, [pn, b, xn]), { focusedCell: Mt, setFocusedCell: rn, handleFocus: wo, handleBlur: vo, handleKeyDown: bo } = Lo({
4783
4788
  allRenderableRows: nn,
4784
4789
  navigationColumns: jn,
4785
4790
  checkboxSelection: s,
4786
- selectedRowIds: Ce,
4791
+ selectedRowIds: ke,
4787
4792
  handleSelectionChange: gt,
4788
4793
  handleDetailPanelToggle: jt,
4789
4794
  editingHandlers: Ze,
@@ -4792,35 +4797,35 @@ function wi(n) {
4792
4797
  handleSort: Rn,
4793
4798
  isCellEditable: D,
4794
4799
  pagination: Pe,
4795
- pageSize: Se.pageSize,
4800
+ pageSize: je.pageSize,
4796
4801
  virtualization: Re,
4797
4802
  viewportRef: Ye
4798
4803
  }), ln = z((Y) => {
4799
4804
  Xe(!1), rn({ id: Y.row.id, field: Y.field }), yt.current?.focus({ preventScroll: !0 }), x?.(Y);
4800
4805
  }, [x, Xe, rn]), En = J(Ze.editingCell);
4801
4806
  re(() => {
4802
- const Y = !!En.current, ee = !!Ze.editingCell;
4803
- Y && !ee && yt.current?.focus({ preventScroll: !0 }), En.current = Ze.editingCell;
4807
+ const Y = !!En.current, Q = !!Ze.editingCell;
4808
+ Y && !Q && yt.current?.focus({ preventScroll: !0 }), En.current = Ze.editingCell;
4804
4809
  }, [Ze.editingCell]);
4805
- const bo = Vo({
4810
+ const _o = Uo({
4806
4811
  renderContext: Re.renderContext,
4807
4812
  pinnedTopRows: en,
4808
4813
  pinnedBottomRows: tn,
4809
4814
  paginatedUnpinnedRows: ut,
4810
4815
  sortedUnpinnedRows: ot,
4811
4816
  pagination: Pe
4812
- }), _o = t.length > 0 && Ce.size === t.length, yo = Ce.size > 0 && Ce.size < t.length, Co = ae.useMemo(() => Fe.some((Y) => !!Y.rowSpan), [Fe]), [ft, It] = ae.useState(!1), sn = ae.useRef(null), Nn = ae.useMemo(() => {
4817
+ }), yo = t.length > 0 && ke.size === t.length, Co = ke.size > 0 && ke.size < t.length, ko = ae.useMemo(() => Ae.some((Y) => !!Y.rowSpan), [Ae]), [ft, It] = ae.useState(!1), sn = ae.useRef(null), Nn = ae.useMemo(() => {
4813
4818
  if (!de?.toolbar) return null;
4814
- const Y = T ? void 0 : (ee, se) => {
4815
- const we = [...Rt], me = we.indexOf(ee), be = we.indexOf(se);
4816
- if (me === -1 || be === -1) return;
4817
- const _e = [...we];
4818
- _e.splice(me, 1), _e.splice(be, 0, ee), I || Et(_e);
4819
- const Pt = Fe.find((Lt) => Lt.field === ee);
4820
- Pt && F?.({ oldIndex: me, targetIndex: be, column: Pt });
4819
+ const Y = T ? void 0 : (Q, se) => {
4820
+ const ve = [...Rt], we = ve.indexOf(Q), _e = ve.indexOf(se);
4821
+ if (we === -1 || _e === -1) return;
4822
+ const ye = [...ve];
4823
+ ye.splice(we, 1), ye.splice(_e, 0, Q), I || Et(ye);
4824
+ const Pt = Ae.find((Lt) => Lt.field === Q);
4825
+ Pt && F?.({ oldIndex: we, targetIndex: _e, column: Pt });
4821
4826
  };
4822
4827
  return {
4823
- apiRef: ke.apiRef,
4828
+ apiRef: Se.apiRef,
4824
4829
  columns: Zt,
4825
4830
  baseColumns: e,
4826
4831
  aggregationModel: Me,
@@ -4834,21 +4839,21 @@ function wi(n) {
4834
4839
  columnVisibilityModel: $e,
4835
4840
  onColumnVisibilityModelChange: mt,
4836
4841
  onColumnReorder: Y,
4837
- onColumnOrderReset: T ? void 0 : () => Et(e.map((ee) => ee.field)),
4842
+ onColumnOrderReset: T ? void 0 : () => Et(e.map((Q) => Q.field)),
4838
4843
  forceColumnsOpen: ft,
4839
4844
  onColumnsPanelClose: () => It(!1),
4840
- ...ve?.toolbar
4845
+ ...be?.toolbar
4841
4846
  };
4842
4847
  }, [
4843
4848
  de?.toolbar,
4844
4849
  T,
4845
4850
  Rt,
4846
4851
  Zt,
4847
- Fe,
4852
+ Ae,
4848
4853
  I,
4849
4854
  F,
4850
4855
  Et,
4851
- ke.apiRef,
4856
+ Se.apiRef,
4852
4857
  e,
4853
4858
  Me,
4854
4859
  mn,
@@ -4862,20 +4867,20 @@ function wi(n) {
4862
4867
  $e,
4863
4868
  mt,
4864
4869
  ft,
4865
- ve?.toolbar
4870
+ be?.toolbar
4866
4871
  ]);
4867
4872
  return re(() => {
4868
4873
  if (!ft || de?.toolbar) return;
4869
- function Y(ee) {
4874
+ function Y(Q) {
4870
4875
  const se = document.getElementById("ogx-standalone-col-panel");
4871
- se && !se.contains(ee.target) && It(!1);
4876
+ se && !se.contains(Q.target) && It(!1);
4872
4877
  }
4873
4878
  return document.addEventListener("mousedown", Y), () => document.removeEventListener("mousedown", Y);
4874
4879
  }, [ft, de?.toolbar]), /* @__PURE__ */ r.jsxs(
4875
4880
  "div",
4876
4881
  {
4877
4882
  ref: sn,
4878
- className: ["ogx", oe, a && "ogx--auto-height", Co && "ogx--row-spanning", ie && "ogx--list-view"].filter(Boolean).join(" "),
4883
+ className: ["ogx", oe, a && "ogx--auto-height", ko && "ogx--row-spanning", ie && "ogx--list-view"].filter(Boolean).join(" "),
4879
4884
  style: {
4880
4885
  ...ue,
4881
4886
  height: H ?? ue?.height,
@@ -4886,11 +4891,11 @@ function wi(n) {
4886
4891
  children: [
4887
4892
  Nn && /* @__PURE__ */ r.jsx(qn, { ...Nn }),
4888
4893
  !de?.toolbar && /* @__PURE__ */ r.jsx(
4889
- Vr,
4894
+ Ur,
4890
4895
  {
4891
4896
  isOpen: ft,
4892
4897
  containerRef: sn,
4893
- effectiveColumns: Fe,
4898
+ effectiveColumns: Ae,
4894
4899
  columnVisibilityModel: $e,
4895
4900
  effectiveColumnOrder: Rt,
4896
4901
  columnOrder: I,
@@ -4901,17 +4906,17 @@ function wi(n) {
4901
4906
  setInternalColumnOrder: Et
4902
4907
  }
4903
4908
  ),
4904
- ie && ye && /* @__PURE__ */ r.jsx(
4905
- Mr,
4909
+ ie && Ce && /* @__PURE__ */ r.jsx(
4910
+ Ir,
4906
4911
  {
4907
4912
  ariaLabel: Ie,
4908
4913
  allRenderableRows: nn,
4909
4914
  filteredRows: De,
4910
4915
  pagination: Pe,
4911
- effectivePaginationModel: Se,
4916
+ effectivePaginationModel: je,
4912
4917
  pageSizeOptions: k,
4913
- selectedRowIds: Ce,
4914
- listViewColumn: ye,
4918
+ selectedRowIds: ke,
4919
+ listViewColumn: Ce,
4915
4920
  noRowsLabel: Bt,
4916
4921
  rowHeight: i,
4917
4922
  checkboxSelection: s,
@@ -4919,7 +4924,7 @@ function wi(n) {
4919
4924
  dataSource: te,
4920
4925
  serverRowCount: he.pagination.rowCount || 0,
4921
4926
  paginationSlot: de?.pagination,
4922
- paginationSlotProps: ve?.pagination,
4927
+ paginationSlotProps: be?.pagination,
4923
4928
  onRowClick: St,
4924
4929
  onSelectionChange: gt,
4925
4930
  onPaginationModelChange: Vt
@@ -4945,9 +4950,9 @@ function wi(n) {
4945
4950
  onMouseDownCapture: () => {
4946
4951
  Xe(!1);
4947
4952
  },
4948
- onKeyDown: vo,
4949
- onFocus: mo,
4950
- onBlur: wo,
4953
+ onKeyDown: bo,
4954
+ onFocus: wo,
4955
+ onBlur: vo,
4951
4956
  children: /* @__PURE__ */ r.jsxs(
4952
4957
  "div",
4953
4958
  {
@@ -4959,20 +4964,20 @@ function wi(n) {
4959
4964
  role: "presentation",
4960
4965
  children: [
4961
4966
  /* @__PURE__ */ r.jsx(
4962
- fr,
4967
+ hr,
4963
4968
  {
4964
4969
  columns: Re.virtualColumns,
4965
- allColumns: Fe,
4970
+ allColumns: Ae,
4966
4971
  columnGroupingModel: Be,
4967
4972
  checkboxSelection: s,
4968
- allSelected: _o,
4969
- someSelected: yo,
4970
- onSelectAll: xo,
4973
+ allSelected: yo,
4974
+ someSelected: Co,
4975
+ onSelectAll: mo,
4971
4976
  sortModel: Oe,
4972
4977
  onSort: Rn,
4973
4978
  onColumnResize: ho,
4974
- columnWidths: Ae,
4975
- pinnedColumns: We,
4979
+ columnWidths: Te,
4980
+ pinnedColumns: Fe,
4976
4981
  focusedCell: Mt,
4977
4982
  onHeaderClick: (Y) => {
4978
4983
  rn({ id: "HEADER", field: Y }), Xe(!1), yt.current?.focus({ preventScroll: !0 });
@@ -4995,26 +5000,26 @@ function wi(n) {
4995
5000
  });
4996
5001
  },
4997
5002
  onManageColumns: () => It(!0),
4998
- onPinColumn: (Y, ee) => {
4999
- const se = [...We?.left ?? []], we = [...We?.right ?? []], me = se.filter((_e) => _e !== Y), be = we.filter((_e) => _e !== Y);
5000
- Ht(ee === "left" ? { left: [...me, Y], right: be } : ee === "right" ? { left: me, right: [...be, Y] } : { left: me, right: be });
5003
+ onPinColumn: (Y, Q) => {
5004
+ const se = [...Fe?.left ?? []], ve = [...Fe?.right ?? []], we = se.filter((ye) => ye !== Y), _e = ve.filter((ye) => ye !== Y);
5005
+ Ht(Q === "left" ? { left: [...we, Y], right: _e } : Q === "right" ? { left: we, right: [..._e, Y] } : { left: we, right: _e });
5001
5006
  }
5002
5007
  }
5003
5008
  ),
5004
- !ct && !he.dataSource.error && De.length === 0 && /* @__PURE__ */ r.jsx(Jo, { noRowsLabel: Bt, width: Re.totalWidth }),
5009
+ !ct && !he.dataSource.error && De.length === 0 && /* @__PURE__ */ r.jsx(Qo, { noRowsLabel: Bt, width: Re.totalWidth }),
5005
5010
  /* @__PURE__ */ r.jsx(
5006
- On,
5011
+ Wn,
5007
5012
  {
5008
5013
  rows: en,
5009
5014
  position: "top",
5010
5015
  columns: Re.virtualColumns,
5011
- selectedRowIds: Ce,
5016
+ selectedRowIds: ke,
5012
5017
  checkboxSelection: s,
5013
5018
  onRowClick: St,
5014
5019
  onCellClick: ln,
5015
5020
  onSelectionChange: gt,
5016
- columnWidths: Ae,
5017
- pinnedColumns: We,
5021
+ columnWidths: Te,
5022
+ pinnedColumns: Fe,
5018
5023
  pinnedRows: u,
5019
5024
  hasDetailPanel: Le,
5020
5025
  expandedRowIds: et,
@@ -5030,12 +5035,12 @@ function wi(n) {
5030
5035
  }
5031
5036
  ),
5032
5037
  /* @__PURE__ */ r.jsx(
5033
- Dr,
5038
+ Hr,
5034
5039
  {
5035
5040
  virtualContainerHeight: Re.totalHeight - Re.pinnedTopHeight - Re.pinnedBottomHeight,
5036
5041
  offsetTop: Re.offsetTop,
5037
5042
  effectiveLoading: ct,
5038
- visibleRows: bo,
5043
+ visibleRows: _o,
5039
5044
  baseColumns: e,
5040
5045
  virtualColumns: Re.virtualColumns,
5041
5046
  viewportWidth: he.dimensions.viewportWidth,
@@ -5044,12 +5049,12 @@ function wi(n) {
5044
5049
  rowReordering: L,
5045
5050
  rowHeight: i,
5046
5051
  pinnedRows: u,
5047
- selectedRowIds: Ce,
5052
+ selectedRowIds: ke,
5048
5053
  onRowClick: St,
5049
5054
  onCellClick: ln,
5050
5055
  onSelectionChange: gt,
5051
- columnWidths: Ae,
5052
- pinnedColumns: We,
5056
+ columnWidths: Te,
5057
+ pinnedColumns: Fe,
5053
5058
  expandedRowIds: et,
5054
5059
  getDetailPanelContent: p,
5055
5060
  getDetailPanelHeight: j,
@@ -5064,23 +5069,23 @@ function wi(n) {
5064
5069
  paginationMode: $,
5065
5070
  dataSourceLoading: he.dataSource.loading,
5066
5071
  sortedUnpinnedRowCount: ot.length,
5067
- infiniteScrollSkeletonCount: Math.min(Se.pageSize, 20),
5068
- unpinnedRowsLength: je.unpinnedRowsLength
5072
+ infiniteScrollSkeletonCount: Math.min(je.pageSize, 20),
5073
+ unpinnedRowsLength: me.unpinnedRowsLength
5069
5074
  }
5070
5075
  ),
5071
5076
  /* @__PURE__ */ r.jsx(
5072
- On,
5077
+ Wn,
5073
5078
  {
5074
5079
  rows: tn,
5075
5080
  position: "bottom",
5076
5081
  columns: Re.virtualColumns,
5077
- selectedRowIds: Ce,
5082
+ selectedRowIds: ke,
5078
5083
  checkboxSelection: s,
5079
5084
  onRowClick: St,
5080
5085
  onCellClick: ln,
5081
5086
  onSelectionChange: gt,
5082
- columnWidths: Ae,
5083
- pinnedColumns: We,
5087
+ columnWidths: Te,
5088
+ pinnedColumns: Fe,
5084
5089
  pinnedRows: u,
5085
5090
  hasDetailPanel: Le,
5086
5091
  expandedRowIds: et,
@@ -5096,12 +5101,12 @@ function wi(n) {
5096
5101
  }
5097
5102
  ),
5098
5103
  Nt && !ce && /* @__PURE__ */ r.jsx(
5099
- Xo,
5104
+ Jo,
5100
5105
  {
5101
5106
  columns: Zt,
5102
5107
  aggregationModel: Me,
5103
5108
  aggregationResult: on,
5104
- columnWidths: Ae,
5109
+ columnWidths: xo,
5105
5110
  rowHeight: i,
5106
5111
  checkboxSelection: s,
5107
5112
  hasDetailPanel: Le,
@@ -5118,13 +5123,13 @@ function wi(n) {
5118
5123
  return /* @__PURE__ */ r.jsx(
5119
5124
  Y,
5120
5125
  {
5121
- page: Se.page,
5122
- pageSize: Se.pageSize,
5126
+ page: je.page,
5127
+ pageSize: je.pageSize,
5123
5128
  rowCount: he.pagination.rowCount,
5124
5129
  pageSizeOptions: k,
5125
- onPageChange: (ee) => Vt({ ...Se, page: ee }),
5126
- onPageSizeChange: (ee) => Vt({ ...Se, pageSize: ee, page: 0 }),
5127
- ...ve?.pagination
5130
+ onPageChange: (Q) => Vt({ ...je, page: Q }),
5131
+ onPageSizeChange: (Q) => Vt({ ...je, pageSize: Q, page: 0 }),
5132
+ ...be?.pagination
5128
5133
  }
5129
5134
  );
5130
5135
  })(),
@@ -5133,20 +5138,20 @@ function wi(n) {
5133
5138
  he.dataSource.error ? `Error: ${he.dataSource.error instanceof Error ? he.dataSource.error.message : "Unknown error"}` : "",
5134
5139
  !q && !he.dataSource.error && (De.length === 0 ? Bt : Ne && ((Ne.quickFilterValues?.length || 0) > 0 || (Ne.items?.length || 0) > 0) ? `${De.length} ${De.length === 1 ? "row" : "rows"} found` : "")
5135
5140
  ] }),
5136
- /* @__PURE__ */ r.jsx(Qo, { error: he.dataSource.error })
5141
+ /* @__PURE__ */ r.jsx(Zo, { error: he.dataSource.error })
5137
5142
  ]
5138
5143
  }
5139
5144
  );
5140
5145
  }
5141
- function vi({ rows: n = 5, columns: t = 5 }) {
5146
+ function bi({ rows: n = 5, columns: t = 5 }) {
5142
5147
  return /* @__PURE__ */ r.jsx("div", { className: "ogx__skeleton", children: Array.from({ length: n }).map((e, o) => /* @__PURE__ */ r.jsx("div", { className: "ogx__skeleton-row", children: Array.from({ length: t }).map((i, l) => /* @__PURE__ */ r.jsx("div", { className: "ogx__skeleton-cell", children: /* @__PURE__ */ r.jsx("div", { className: "ogx__skeleton-content" }) }, l)) }, o)) });
5143
5148
  }
5144
- const Wn = /* @__PURE__ */ new Set(["isEmpty", "isNotEmpty"]);
5145
- function Ur(n, t) {
5149
+ const On = /* @__PURE__ */ new Set(["isEmpty", "isNotEmpty"]);
5150
+ function Kr(n, t) {
5146
5151
  return n.find((e) => "field" in e && e.field === t);
5147
5152
  }
5148
- const Kr = ({ col: n, item: t, onChange: e }) => {
5149
- const o = zo(n.type), i = !!t, l = t?.operator ?? o[0], [a, s] = Q(t?.value != null ? String(t.value) : ""), c = J(e), d = J(t), g = J(n.field), x = J(l);
5153
+ const Yr = ({ col: n, item: t, onChange: e }) => {
5154
+ const o = Bo(n.type), i = !!t, l = t?.operator ?? o[0], [a, s] = Z(t?.value != null ? String(t.value) : ""), c = J(e), d = J(t), g = J(n.field), x = J(l);
5150
5155
  Ee(() => {
5151
5156
  c.current = e, d.current = t, g.current = n.field, x.current = l;
5152
5157
  });
@@ -5166,7 +5171,7 @@ const Kr = ({ col: n, item: t, onChange: e }) => {
5166
5171
  return () => clearTimeout(f);
5167
5172
  }, [a]);
5168
5173
  const m = (f) => {
5169
- const k = Wn.has(f), y = {
5174
+ const k = On.has(f), y = {
5170
5175
  id: t?.id ?? `${n.field}-${Date.now()}`,
5171
5176
  field: n.field,
5172
5177
  operator: f,
@@ -5175,7 +5180,7 @@ const Kr = ({ col: n, item: t, onChange: e }) => {
5175
5180
  e(y);
5176
5181
  }, v = () => {
5177
5182
  s(""), e(null);
5178
- }, b = Wn.has(String(l)), S = n.type === "boolean", N = !b;
5183
+ }, b = On.has(String(l)), S = n.type === "boolean", N = !b;
5179
5184
  return /* @__PURE__ */ r.jsxs("div", { className: `ogx-filter__row${i ? " ogx-filter__row--active" : ""}`, children: [
5180
5185
  /* @__PURE__ */ r.jsx("span", { className: "ogx-filter__col-label", title: n.field, children: n.headerName || n.field }),
5181
5186
  /* @__PURE__ */ r.jsxs("div", { className: "ogx-filter__controls", children: [
@@ -5238,7 +5243,7 @@ const Kr = ({ col: n, item: t, onChange: e }) => {
5238
5243
  )
5239
5244
  ] })
5240
5245
  ] });
5241
- }, Yr = ({ filterModel: n, columns: t, onFilterModelChange: e }) => {
5246
+ }, qr = ({ filterModel: n, columns: t, onFilterModelChange: e }) => {
5242
5247
  const o = le(() => n.items ?? [], [n.items]), i = n.logicOperator ?? "and", l = z((c, d) => {
5243
5248
  const g = o.filter((h) => "field" in h && h.field !== c), x = d ? [...g, d] : g;
5244
5249
  e({ ...n, items: x });
@@ -5268,16 +5273,16 @@ const Kr = ({ col: n, item: t, onChange: e }) => {
5268
5273
  )
5269
5274
  ] }),
5270
5275
  s.length === 0 ? /* @__PURE__ */ r.jsx("div", { className: "ogx-filter__empty", children: "No filterable columns." }) : s.map((c) => /* @__PURE__ */ r.jsx(
5271
- Kr,
5276
+ Yr,
5272
5277
  {
5273
5278
  col: c,
5274
- item: Ur(o, c.field),
5279
+ item: Kr(o, c.field),
5275
5280
  onChange: (d) => l(c.field, d)
5276
5281
  },
5277
5282
  c.field
5278
5283
  ))
5279
5284
  ] });
5280
- }, qr = ["sum", "avg", "count", "min", "max"];
5285
+ }, Xr = ["sum", "avg", "count", "min", "max"];
5281
5286
  function Gn() {
5282
5287
  return /* @__PURE__ */ r.jsxs(
5283
5288
  "svg",
@@ -5301,8 +5306,8 @@ function Gn() {
5301
5306
  }
5302
5307
  );
5303
5308
  }
5304
- function Xr({ anchorRef: n, columns: t, model: e, onChange: o, onClose: i }) {
5305
- const l = J(null), [a, s] = Q({ top: 0, right: 0 }), [c, d] = Q(document.body);
5309
+ function Jr({ anchorRef: n, columns: t, model: e, onChange: o, onClose: i }) {
5310
+ const l = J(null), [a, s] = Z({ top: 0, right: 0 }), [c, d] = Z(document.body);
5306
5311
  Ee(() => {
5307
5312
  d(n.current?.closest(".ogx-theme-provider") ?? document.body);
5308
5313
  }, [n]);
@@ -5426,7 +5431,7 @@ function Xr({ anchorRef: n, columns: t, model: e, onChange: o, onClose: i }) {
5426
5431
  value: _.aggFn,
5427
5432
  onChange: (M) => w(_.field, M.target.value),
5428
5433
  title: "Aggregation function",
5429
- children: qr.map((M) => /* @__PURE__ */ r.jsx("option", { value: M, children: M.toUpperCase() }, M))
5434
+ children: Xr.map((M) => /* @__PURE__ */ r.jsx("option", { value: M, children: M.toUpperCase() }, M))
5430
5435
  }
5431
5436
  ),
5432
5437
  /* @__PURE__ */ r.jsx("button", { className: "ogx-pivot-chip__remove", onClick: () => y(_.field), title: `Remove ${E(_.field)}`, children: "×" })
@@ -5458,20 +5463,20 @@ function Xr({ anchorRef: n, columns: t, model: e, onChange: o, onClose: i }) {
5458
5463
  );
5459
5464
  return Ge.createPortal(R, c);
5460
5465
  }
5461
- function Jr() {
5466
+ function Qr() {
5462
5467
  return /* @__PURE__ */ r.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
5463
5468
  /* @__PURE__ */ r.jsx("circle", { cx: "11", cy: "11", r: "8" }),
5464
5469
  /* @__PURE__ */ r.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
5465
5470
  ] });
5466
5471
  }
5467
- function Qr() {
5472
+ function Zr() {
5468
5473
  return /* @__PURE__ */ r.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
5469
5474
  /* @__PURE__ */ r.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
5470
5475
  /* @__PURE__ */ r.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
5471
5476
  ] });
5472
5477
  }
5473
- function Zr({ value: n = "", onChange: t, placeholder: e = "Search...", debounceMs: o = 250 }) {
5474
- const [i, l] = Q(() => n.length > 0), [a, s] = Q(n), c = J(null), d = J(null), g = J(t);
5478
+ function ei({ value: n = "", onChange: t, placeholder: e = "Search...", debounceMs: o = 250 }) {
5479
+ const [i, l] = Z(() => n.length > 0), [a, s] = Z(n), c = J(null), d = J(null), g = J(t);
5475
5480
  Ee(() => {
5476
5481
  g.current = t;
5477
5482
  }, [t]);
@@ -5513,7 +5518,7 @@ function Zr({ value: n = "", onChange: t, placeholder: e = "Search...", debounce
5513
5518
  className: `ogx-global-search${i ? " ogx-global-search--expanded" : ""}`,
5514
5519
  onClick: i ? void 0 : v,
5515
5520
  children: [
5516
- /* @__PURE__ */ r.jsx("div", { className: "ogx-global-search__icon-wrapper", children: /* @__PURE__ */ r.jsx(Jr, {}) }),
5521
+ /* @__PURE__ */ r.jsx("div", { className: "ogx-global-search__icon-wrapper", children: /* @__PURE__ */ r.jsx(Qr, {}) }),
5517
5522
  /* @__PURE__ */ r.jsx(
5518
5523
  "input",
5519
5524
  {
@@ -5530,7 +5535,7 @@ function Zr({ value: n = "", onChange: t, placeholder: e = "Search...", debounce
5530
5535
  autoComplete: "off"
5531
5536
  }
5532
5537
  ),
5533
- a && /* @__PURE__ */ r.jsx("button", { className: "ogx-global-search__clear", onClick: b, "aria-label": "Clear search", children: /* @__PURE__ */ r.jsx(Qr, {}) })
5538
+ a && /* @__PURE__ */ r.jsx("button", { className: "ogx-global-search__clear", onClick: b, "aria-label": "Clear search", children: /* @__PURE__ */ r.jsx(Zr, {}) })
5534
5539
  ]
5535
5540
  }
5536
5541
  );
@@ -5542,7 +5547,7 @@ function Ft({
5542
5547
  enterDelay: o = 200,
5543
5548
  leaveDelay: i = 0
5544
5549
  }) {
5545
- const [l, a] = Q(!1), [s, c] = Q({ top: 0, left: 0 }), d = J(null), g = J(null), x = z(() => {
5550
+ const [l, a] = Z(!1), [s, c] = Z({ top: 0, left: 0 }), d = J(null), g = J(null), x = z(() => {
5546
5551
  if (!g.current) return;
5547
5552
  const b = g.current.getBoundingClientRect();
5548
5553
  let S = 0, N = 0;
@@ -5592,7 +5597,7 @@ function Ft({
5592
5597
  )
5593
5598
  ] });
5594
5599
  }
5595
- const ei = ["none", "sum", "avg", "count", "min", "max"];
5600
+ const ti = ["none", "sum", "avg", "count", "min", "max"];
5596
5601
  function Vn() {
5597
5602
  return /* @__PURE__ */ r.jsx(
5598
5603
  "svg",
@@ -5610,7 +5615,7 @@ function Vn() {
5610
5615
  }
5611
5616
  );
5612
5617
  }
5613
- function ti() {
5618
+ function ni() {
5614
5619
  return /* @__PURE__ */ r.jsxs("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", children: [
5615
5620
  /* @__PURE__ */ r.jsx("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", stroke: "currentColor", strokeWidth: "1.8" }),
5616
5621
  /* @__PURE__ */ r.jsx("rect", { x: "8.5", y: "4", width: "7", height: "16", fill: "currentColor", opacity: "0.25" }),
@@ -5623,7 +5628,7 @@ function ti() {
5623
5628
  function Un() {
5624
5629
  return /* @__PURE__ */ r.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ r.jsx("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }) });
5625
5630
  }
5626
- function ni({
5631
+ function oi({
5627
5632
  anchorRef: n,
5628
5633
  aggregationModel: t,
5629
5634
  aggregableColumns: e,
@@ -5632,7 +5637,7 @@ function ni({
5632
5637
  onClose: l,
5633
5638
  activeCount: a
5634
5639
  }) {
5635
- const s = J(null), [c, d] = Q({ top: 0, right: 0 }), [g, x] = Q(document.body);
5640
+ const s = J(null), [c, d] = Z({ top: 0, right: 0 }), [g, x] = Z(document.body);
5636
5641
  Ee(() => {
5637
5642
  x(n.current?.closest(".ogx-theme-provider") ?? document.body);
5638
5643
  }, [n]);
@@ -5695,7 +5700,7 @@ function ni({
5695
5700
  const b = t[v.field] || "none";
5696
5701
  return /* @__PURE__ */ r.jsxs("div", { className: "ogx-toolbar__agg-row", children: [
5697
5702
  /* @__PURE__ */ r.jsx("span", { className: "ogx-toolbar__agg-label", title: v.field, children: v.headerName || v.field }),
5698
- /* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__agg-pills", children: ei.map((S) => /* @__PURE__ */ r.jsx(
5703
+ /* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__agg-pills", children: ti.map((S) => /* @__PURE__ */ r.jsx(
5699
5704
  "button",
5700
5705
  {
5701
5706
  className: `ogx-toolbar__pill${b === S ? " ogx-toolbar__pill--active" : ""}`,
@@ -5712,7 +5717,7 @@ function ni({
5712
5717
  );
5713
5718
  return Ge.createPortal(m, g);
5714
5719
  }
5715
- function oi({
5720
+ function ri({
5716
5721
  anchorRef: n,
5717
5722
  columns: t,
5718
5723
  visibleColumns: e,
@@ -5723,7 +5728,7 @@ function oi({
5723
5728
  onColumnOrderReset: s,
5724
5729
  onClose: c
5725
5730
  }) {
5726
- const d = J(null), [g, x] = Q({ top: 0, right: 0 }), [h, m] = Q(document.body);
5731
+ const d = J(null), [g, x] = Z({ top: 0, right: 0 }), [h, m] = Z(document.body);
5727
5732
  Ee(() => {
5728
5733
  m(n.current?.closest(".ogx-theme-provider") ?? document.body);
5729
5734
  }, [n]);
@@ -5771,18 +5776,18 @@ function oi({
5771
5776
  );
5772
5777
  return Ge.createPortal(b, h);
5773
5778
  }
5774
- function ri({
5779
+ function ii({
5775
5780
  anchorRef: n,
5776
5781
  columns: t,
5777
5782
  filterModel: e,
5778
5783
  onFilterModelChange: o,
5779
5784
  onClose: i
5780
5785
  }) {
5781
- const l = J(null), [a, s] = Q({ top: 0, right: 0 }), c = J(i);
5786
+ const l = J(null), [a, s] = Z({ top: 0, right: 0 }), c = J(i);
5782
5787
  Ee(() => {
5783
5788
  c.current = i;
5784
5789
  }, [i]);
5785
- const [d, g] = Q(document.body);
5790
+ const [d, g] = Z(document.body);
5786
5791
  Ee(() => {
5787
5792
  g(n.current?.closest(".ogx-theme-provider") ?? document.body);
5788
5793
  }, [n]);
@@ -5846,7 +5851,7 @@ function ri({
5846
5851
  ] })
5847
5852
  ] }),
5848
5853
  /* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__panel-body ogx-toolbar__panel-body--filter", children: /* @__PURE__ */ r.jsx(
5849
- Yr,
5854
+ qr,
5850
5855
  {
5851
5856
  columns: t,
5852
5857
  filterModel: e,
@@ -5858,8 +5863,8 @@ function ri({
5858
5863
  );
5859
5864
  return Ge.createPortal(v, d);
5860
5865
  }
5861
- const ii = { rowFields: [], columnFields: [], valueFields: [] };
5862
- function bi({
5866
+ const li = { rowFields: [], columnFields: [], valueFields: [] };
5867
+ function _i({
5863
5868
  columns: n = [],
5864
5869
  baseColumns: t,
5865
5870
  aggregationModel: e = {},
@@ -5878,11 +5883,11 @@ function bi({
5878
5883
  rightContent: b,
5879
5884
  style: S
5880
5885
  }) {
5881
- const [N, f] = Q(!1), [k, y] = Q(!1), [w, u] = Q(!1), [p, j] = Q(!1);
5886
+ const [N, f] = Z(!1), [k, y] = Z(!1), [w, u] = Z(!1), [p, j] = Z(!1);
5882
5887
  re(() => {
5883
5888
  h && (u(!0), f(!1), y(!1), j(!1));
5884
5889
  }, [h]);
5885
- const E = J(null), R = J(null), _ = J(null), M = J(null), T = i ?? ii, I = T.rowFields.length > 0 || T.columnFields.length > 0 || T.valueFields.length > 0, F = n.filter(
5890
+ const E = J(null), R = J(null), _ = J(null), M = J(null), T = i ?? li, I = T.rowFields.length > 0 || T.columnFields.length > 0 || T.valueFields.length > 0, F = n.filter(
5886
5891
  (G) => G.aggregable !== !1 && (G.type === "number" || G.aggregable === !0)
5887
5892
  ), H = Object.keys(e).filter(
5888
5893
  (G) => e[G] && e[G] !== "none"
@@ -5905,11 +5910,11 @@ function bi({
5905
5910
  s(P);
5906
5911
  }, [a, s]), K = a?.quickFilterValues?.[0] || "", C = a?.items?.length || 0, B = new Set(
5907
5912
  n.filter((G) => c[G.field] !== !1).map((G) => G.field)
5908
- ), O = z((G, D) => {
5913
+ ), W = z((G, D) => {
5909
5914
  if (!d) return;
5910
5915
  const P = { ...c, [G]: D };
5911
5916
  d(P);
5912
- }, [c, d]), W = z(() => {
5917
+ }, [c, d]), O = z(() => {
5913
5918
  if (!d) return;
5914
5919
  const G = { ...c };
5915
5920
  n.forEach((D) => {
@@ -5927,7 +5932,7 @@ function bi({
5927
5932
  /* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__spacer" }),
5928
5933
  /* @__PURE__ */ r.jsxs("div", { className: "ogx-toolbar__actions", children: [
5929
5934
  s && /* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__dropdown-wrapper", style: { marginRight: 4 }, children: /* @__PURE__ */ r.jsx(
5930
- Zr,
5935
+ ei,
5931
5936
  {
5932
5937
  value: K,
5933
5938
  onChange: q,
@@ -5944,17 +5949,17 @@ function bi({
5944
5949
  onClick: () => {
5945
5950
  u(!w), f(!1), y(!1), j(!1);
5946
5951
  },
5947
- children: /* @__PURE__ */ r.jsx(ti, {})
5952
+ children: /* @__PURE__ */ r.jsx(ni, {})
5948
5953
  }
5949
5954
  ) }),
5950
5955
  w && /* @__PURE__ */ r.jsx(
5951
- oi,
5956
+ ri,
5952
5957
  {
5953
5958
  anchorRef: _,
5954
5959
  columns: n,
5955
5960
  visibleColumns: B,
5956
- onVisibilityChange: O,
5957
- onShowAll: W,
5961
+ onVisibilityChange: W,
5962
+ onShowAll: O,
5958
5963
  onHideAll: V,
5959
5964
  onColumnReorder: g,
5960
5965
  onColumnOrderReset: x,
@@ -5981,7 +5986,7 @@ function bi({
5981
5986
  }
5982
5987
  ) }),
5983
5988
  p && /* @__PURE__ */ r.jsx(
5984
- ri,
5989
+ ii,
5985
5990
  {
5986
5991
  anchorRef: M,
5987
5992
  columns: n,
@@ -6011,7 +6016,7 @@ function bi({
6011
6016
  }
6012
6017
  ) }),
6013
6018
  k && /* @__PURE__ */ r.jsx(
6014
- Xr,
6019
+ Jr,
6015
6020
  {
6016
6021
  anchorRef: R,
6017
6022
  columns: t ?? n,
@@ -6043,7 +6048,7 @@ function bi({
6043
6048
  }
6044
6049
  ) }),
6045
6050
  N && /* @__PURE__ */ r.jsx(
6046
- ni,
6051
+ oi,
6047
6052
  {
6048
6053
  anchorRef: E,
6049
6054
  aggregationModel: e,
@@ -6059,10 +6064,10 @@ function bi({
6059
6064
  ] })
6060
6065
  ] });
6061
6066
  }
6062
- function _i() {
6067
+ function yi() {
6063
6068
  return J(null);
6064
6069
  }
6065
- const yi = ({
6070
+ const Ci = ({
6066
6071
  fullWidth: n = !1,
6067
6072
  error: t = !1,
6068
6073
  startAdornment: e,
@@ -6089,7 +6094,7 @@ const yi = ({
6089
6094
  o && /* @__PURE__ */ r.jsx("div", { className: "ogx-input__adornment ogx-input__adornment--end", children: o })
6090
6095
  ] });
6091
6096
  };
6092
- function Ci(n, t, e = {}) {
6097
+ function ki(n, t, e = {}) {
6093
6098
  const {
6094
6099
  fileName: o = "export.csv",
6095
6100
  includeHeaders: i = !0,
@@ -6135,7 +6140,7 @@ function dt(n) {
6135
6140
  return n.includes(",") || n.includes('"') || n.includes(`
6136
6141
  `) ? `"${n.replace(/"/g, '""')}"` : n;
6137
6142
  }
6138
- function ki(n, t, e = {}) {
6143
+ function Si(n, t, e = {}) {
6139
6144
  const {
6140
6145
  fileName: o = "export.xls",
6141
6146
  sheetName: i = "Sheet1",
@@ -6149,31 +6154,31 @@ function ki(n, t, e = {}) {
6149
6154
  const c = t.filter((g) => !(g.exportable === !1 || g.field === "__check__" || g.field === "__actions__"));
6150
6155
  let d = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">';
6151
6156
  if (d += "<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>", d += `<x:Name>${i}</x:Name>`, d += "<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->", d += '<meta charset="UTF-8"></head><body>', d += '<table border="1">', l && (d += "<thead><tr>", c.forEach((g) => {
6152
- d += `<th>${Te(g.headerName || g.field)}</th>`;
6157
+ d += `<th>${We(g.headerName || g.field)}</th>`;
6153
6158
  }), d += "</tr></thead>"), d += "<tbody>", s.forEach((g) => {
6154
6159
  d += "<tr>", c.forEach((x) => {
6155
6160
  let h = g[x.field];
6156
- x.valueGetter && (h = x.valueGetter({ row: g, field: x.field, value: h })), x.valueFormatter && h !== void 0 && h !== null && (h = x.valueFormatter({ value: h, row: g, field: x.field })), d += `<td>${Te(String(h ?? ""))}</td>`;
6161
+ x.valueGetter && (h = x.valueGetter({ row: g, field: x.field, value: h })), x.valueFormatter && h !== void 0 && h !== null && (h = x.valueFormatter({ value: h, row: g, field: x.field })), d += `<td>${We(String(h ?? ""))}</td>`;
6157
6162
  });
6158
6163
  }), e.aggregationResult) {
6159
6164
  const g = e.aggregationResult, x = e.aggregationModel || {};
6160
6165
  d += '<tr style="font-size: 11px; color: #666; background-color: #f5f5f5;">', c.forEach((h) => {
6161
- x[h.field] ? d += `<td style="text-align: right; font-weight: bold;">${Te(x[h.field].toUpperCase())}</td>` : d += "<td></td>";
6166
+ x[h.field] ? d += `<td style="text-align: right; font-weight: bold;">${We(x[h.field].toUpperCase())}</td>` : d += "<td></td>";
6162
6167
  }), d += "</tr>", d += '<tr style="font-weight: bold; background-color: #f5f5f5;">', c.forEach((h) => {
6163
6168
  const m = g[h.field];
6164
6169
  if (m != null) {
6165
6170
  let v = m;
6166
- h.valueFormatter ? v = h.valueFormatter({ value: m, row: {}, field: h.field }) : x[h.field] && (v = He(m, x[h.field])), d += `<td style="text-align: right;">${Te(String(v))}</td>`;
6171
+ h.valueFormatter ? v = h.valueFormatter({ value: m, row: {}, field: h.field }) : x[h.field] && (v = He(m, x[h.field])), d += `<td style="text-align: right;">${We(String(v))}</td>`;
6167
6172
  } else
6168
6173
  d += "<td></td>";
6169
6174
  }), d += "</tr>";
6170
6175
  }
6171
6176
  d += "</tbody></table></body></html>", fn(d, o, "application/vnd.ms-excel");
6172
6177
  }
6173
- function Te(n) {
6178
+ function We(n) {
6174
6179
  return n.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
6175
6180
  }
6176
- function Si(n, t, e = {}) {
6181
+ function ji(n, t, e = {}) {
6177
6182
  const {
6178
6183
  fileName: o = "export.json",
6179
6184
  pretty: i = !0,
@@ -6213,7 +6218,7 @@ function Si(n, t, e = {}) {
6213
6218
  const g = i ? JSON.stringify(d, null, 2) : JSON.stringify(d);
6214
6219
  fn(g, o, "application/json;charset=utf-8;");
6215
6220
  }
6216
- async function ji(n, t, e) {
6221
+ async function Ri(n, t, e) {
6217
6222
  const o = window.open("", "_blank");
6218
6223
  if (!o) {
6219
6224
  console.error("Failed to open print window. Please check your popup blocker settings.");
@@ -6269,22 +6274,22 @@ async function ji(n, t, e) {
6269
6274
  </head>
6270
6275
  <body>
6271
6276
  `;
6272
- if (i && (g += `<h1>${Te(i)}</h1>`), g += "<table>", g += "<thead><tr>", d.forEach((h) => {
6273
- g += `<th>${Te(h.headerName || h.field)}</th>`;
6277
+ if (i && (g += `<h1>${We(i)}</h1>`), g += "<table>", g += "<thead><tr>", d.forEach((h) => {
6278
+ g += `<th>${We(h.headerName || h.field)}</th>`;
6274
6279
  }), g += "</tr></thead>", g += "<tbody>", c.forEach((h) => {
6275
6280
  g += "<tr>", d.forEach((m) => {
6276
6281
  let v = h[m.field];
6277
- m.valueGetter && (v = m.valueGetter({ row: h, field: m.field, value: v })), m.valueFormatter && v !== void 0 && v !== null && (v = m.valueFormatter({ value: v, row: h, field: m.field })), m.type === "image" && v ? g += `<td><div style="display:flex;justify-content:center;"><img src="${v}" alt="${m.headerName}" style="max-height: 40px; border-radius: 4px;"></div></td>` : g += `<td>${Te(String(v ?? ""))}</td>`;
6282
+ m.valueGetter && (v = m.valueGetter({ row: h, field: m.field, value: v })), m.valueFormatter && v !== void 0 && v !== null && (v = m.valueFormatter({ value: v, row: h, field: m.field })), m.type === "image" && v ? g += `<td><div style="display:flex;justify-content:center;"><img src="${v}" alt="${m.headerName}" style="max-height: 40px; border-radius: 4px;"></div></td>` : g += `<td>${We(String(v ?? ""))}</td>`;
6278
6283
  }), g += "</tr>";
6279
6284
  }), a) {
6280
6285
  const h = s || {};
6281
6286
  g += '<tfoot><tr style="font-size: 11px; color: #666; background-color: #f5f5f5;">', d.forEach((m) => {
6282
- h[m.field] ? g += `<td style="text-align: right; font-weight: bold;">${Te(h[m.field].toUpperCase())}</td>` : g += "<td></td>";
6287
+ h[m.field] ? g += `<td style="text-align: right; font-weight: bold;">${We(h[m.field].toUpperCase())}</td>` : g += "<td></td>";
6283
6288
  }), g += '</tr><tr style="font-weight: bold; background-color: #f5f5f5;">', d.forEach((m) => {
6284
6289
  const v = a[m.field];
6285
6290
  if (v != null) {
6286
6291
  let b = v;
6287
- m.valueFormatter ? b = m.valueFormatter({ value: v, row: {}, field: m.field }) : h[m.field] && (b = He(v, h[m.field])), g += `<td style="text-align: right;">${Te(String(b))}</td>`;
6292
+ m.valueFormatter ? b = m.valueFormatter({ value: v, row: {}, field: m.field }) : h[m.field] && (b = He(v, h[m.field])), g += `<td style="text-align: right;">${We(String(b))}</td>`;
6288
6293
  } else
6289
6294
  g += "<td></td>";
6290
6295
  }), g += "</tr></tfoot>";
@@ -6311,26 +6316,26 @@ function fn(n, t, e) {
6311
6316
  const o = new Blob([n], { type: e }), i = URL.createObjectURL(o), l = document.createElement("a");
6312
6317
  l.href = i, l.download = t, document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
6313
6318
  }
6314
- function li(n, t) {
6319
+ function si(n, t) {
6315
6320
  return n.type === "number" ? "number" : n.type === "boolean" ? "boolean" : n.type === "date" ? "date" : typeof t == "number" ? "number" : typeof t == "boolean" ? "boolean" : t instanceof Date ? "date" : "string";
6316
6321
  }
6317
- function si(n) {
6322
+ function ai(n) {
6318
6323
  if (n.type === "number") return "#,##0.##";
6319
6324
  if (n.type === "date") return "yyyy-mm-dd";
6320
6325
  }
6321
- function ai(n, t) {
6326
+ function di(n, t) {
6322
6327
  if (t != null) return t;
6323
6328
  const e = n.width ?? 120;
6324
6329
  return Math.min(60, Math.max(8, (e - 5) / 7));
6325
6330
  }
6326
- function di(n, t) {
6331
+ function ci(n, t) {
6327
6332
  const e = t ?? "";
6328
6333
  if (e.includes("jpeg") || e.includes("jpg")) return "jpeg";
6329
6334
  if (e.includes("gif")) return "gif";
6330
6335
  const o = n.split("?")[0].toLowerCase();
6331
6336
  return o.endsWith(".jpg") || o.endsWith(".jpeg") ? "jpeg" : o.endsWith(".gif") ? "gif" : "png";
6332
6337
  }
6333
- async function ci(n) {
6338
+ async function ui(n) {
6334
6339
  const t = await Promise.allSettled(
6335
6340
  n.map(async (o) => {
6336
6341
  if (o.startsWith("data:")) {
@@ -6342,7 +6347,7 @@ async function ci(n) {
6342
6347
  }
6343
6348
  const i = await fetch(o, { mode: "cors" });
6344
6349
  if (!i.ok) throw new Error(`HTTP ${i.status}`);
6345
- const l = await i.arrayBuffer(), a = di(o, i.headers.get("content-type"));
6350
+ const l = await i.arrayBuffer(), a = ci(o, i.headers.get("content-type"));
6346
6351
  return { url: o, buffer: l, ext: a };
6347
6352
  })
6348
6353
  ), e = /* @__PURE__ */ new Map();
@@ -6353,7 +6358,7 @@ async function ci(n) {
6353
6358
  );
6354
6359
  }), e;
6355
6360
  }
6356
- async function Ri(n, t, e = {}) {
6361
+ async function Ei(n, t, e = {}) {
6357
6362
  const {
6358
6363
  fileName: o = "export.xlsx",
6359
6364
  sheets: i,
@@ -6374,14 +6379,14 @@ async function Ri(n, t, e = {}) {
6374
6379
  if ("type" in j && j.type === "summary") {
6375
6380
  if (!g || !x) continue;
6376
6381
  const C = v.addWorksheet(j.name ?? "Summary");
6377
- C.addRow(["Summary / Aggregation Totals"]), C.getRow(1).font = { bold: !0, size: c + 2, color: { argb: ze(s) } }, C.addRow([]), C.addRow(["Column", "Function", "Value"]).eachCell((O) => {
6378
- O.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, O.font = { bold: !0, size: c, color: { argb: ze(s) } }, O.border = Fn();
6379
- }), b.forEach((O) => {
6380
- const W = x[O.field], V = g[O.field];
6381
- if (W == null || V == null) return;
6382
+ C.addRow(["Summary / Aggregation Totals"]), C.getRow(1).font = { bold: !0, size: c + 2, color: { argb: ze(s) } }, C.addRow([]), C.addRow(["Column", "Function", "Value"]).eachCell((W) => {
6383
+ W.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, W.font = { bold: !0, size: c, color: { argb: ze(s) } }, W.border = Fn();
6384
+ }), b.forEach((W) => {
6385
+ const O = x[W.field], V = g[W.field];
6386
+ if (O == null || V == null) return;
6382
6387
  let G = V;
6383
- O.valueFormatter ? G = O.valueFormatter({ value: V, row: {}, field: O.field }) : G = He(V, W);
6384
- const D = C.addRow([O.headerName ?? O.field, W.toUpperCase(), G]);
6388
+ W.valueFormatter ? G = W.valueFormatter({ value: V, row: {}, field: W.field }) : G = He(V, O);
6389
+ const D = C.addRow([W.headerName ?? W.field, O.toUpperCase(), G]);
6385
6390
  D.getCell(3).alignment = { horizontal: "right" }, D.getCell(3).font = { bold: !0, size: d };
6386
6391
  }), C.getColumn(1).width = 20, C.getColumn(2).width = 12, C.getColumn(3).width = 18;
6387
6392
  continue;
@@ -6397,34 +6402,34 @@ async function Ri(n, t, e = {}) {
6397
6402
  } = E, L = _ === "selected" ? N : S, U = b.filter((C) => l[C.field]?.embedImage);
6398
6403
  if (U.length > 0) {
6399
6404
  const C = [], B = /* @__PURE__ */ new Set();
6400
- if (L.forEach((O) => {
6401
- U.forEach((W) => {
6402
- const V = O[W.field];
6405
+ if (L.forEach((W) => {
6406
+ U.forEach((O) => {
6407
+ const V = W[O.field];
6403
6408
  typeof V == "string" && V && !k.has(V) && !B.has(V) && (C.push(V), B.add(V));
6404
6409
  });
6405
6410
  }), C.length > 0) {
6406
- const O = await ci(C);
6407
- for (const [W, { buffer: V, extension: G }] of O) {
6411
+ const W = await ui(C);
6412
+ for (const [O, { buffer: V, extension: G }] of W) {
6408
6413
  const D = v.addImage({ buffer: V, extension: G });
6409
- k.set(W, D);
6414
+ k.set(O, D);
6410
6415
  }
6411
6416
  }
6412
6417
  }
6413
6418
  const q = v.addWorksheet(R);
6414
6419
  if (q.columns = b.map((C) => ({
6415
6420
  key: C.field,
6416
- width: ai(C, l[C.field]?.width),
6421
+ width: di(C, l[C.field]?.width),
6417
6422
  style: {
6418
- numFmt: l[C.field]?.numFmt ?? si(C)
6423
+ numFmt: l[C.field]?.numFmt ?? ai(C)
6419
6424
  }
6420
6425
  })), M) {
6421
- const C = b.map((O) => O.headerName ?? O.field), B = q.addRow(C);
6422
- B.height = 20, B.eachCell((O, W) => {
6423
- const V = b[W - 1];
6424
- O.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, O.font = { bold: !0, size: c, color: { argb: ze(s) } }, O.alignment = {
6426
+ const C = b.map((W) => W.headerName ?? W.field), B = q.addRow(C);
6427
+ B.height = 20, B.eachCell((W, O) => {
6428
+ const V = b[O - 1];
6429
+ W.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, W.font = { bold: !0, size: c, color: { argb: ze(s) } }, W.alignment = {
6425
6430
  horizontal: l[V?.field]?.alignment ?? (V?.type === "number" ? "right" : "left"),
6426
6431
  vertical: "middle"
6427
- }, O.border = Fn();
6432
+ }, W.border = Fn();
6428
6433
  }), I && (q.autoFilter = {
6429
6434
  from: { row: 1, column: 1 },
6430
6435
  to: { row: 1, column: b.length }
@@ -6432,14 +6437,14 @@ async function Ri(n, t, e = {}) {
6432
6437
  }
6433
6438
  let K = M ? 1 : 0;
6434
6439
  if (L.forEach((C, B) => {
6435
- const O = b.map((V) => {
6440
+ const W = b.map((V) => {
6436
6441
  if (l[V.field]?.embedImage) return "";
6437
6442
  let G = C[V.field];
6438
- return V.valueGetter && (G = V.valueGetter({ row: C, field: V.field, value: G })), li(V, G) === "string" && V.valueFormatter && G != null && (G = V.valueFormatter({ value: G, row: C, field: V.field })), G;
6439
- }), W = q.addRow(O);
6440
- if (W.font = { size: d }, H && B % 2 === 1 && W.eachCell((V) => {
6443
+ return V.valueGetter && (G = V.valueGetter({ row: C, field: V.field, value: G })), si(V, G) === "string" && V.valueFormatter && G != null && (G = V.valueFormatter({ value: G, row: C, field: V.field })), G;
6444
+ }), O = q.addRow(W);
6445
+ if (O.font = { size: d }, H && B % 2 === 1 && O.eachCell((V) => {
6441
6446
  V.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(H) } };
6442
- }), W.eachCell((V, G) => {
6447
+ }), O.eachCell((V, G) => {
6443
6448
  const D = b[G - 1];
6444
6449
  D && (V.alignment = {
6445
6450
  horizontal: l[D.field]?.alignment ?? (D.type === "number" ? "right" : "left"),
@@ -6447,14 +6452,14 @@ async function Ri(n, t, e = {}) {
6447
6452
  }, V.border = { bottom: { style: "thin", color: { argb: "FFf1f5f9" } } });
6448
6453
  }), U.length > 0) {
6449
6454
  const V = U.reduce((P, ne) => Math.max(P, l[ne.field]?.imageHeight ?? 40), 0), G = Math.ceil(V / 1.333), D = G * 1.333;
6450
- W.height = G, U.forEach((P) => {
6451
- const ne = b.indexOf(P), te = C[P.field], Z = typeof te == "string" ? k.get(te) : void 0;
6452
- if (Z === void 0) {
6453
- W.getCell(ne + 1).value = typeof te == "string" ? te : "";
6455
+ O.height = G, U.forEach((P) => {
6456
+ const ne = b.indexOf(P), te = C[P.field], ee = typeof te == "string" ? k.get(te) : void 0;
6457
+ if (ee === void 0) {
6458
+ O.getCell(ne + 1).value = typeof te == "string" ? te : "";
6454
6459
  return;
6455
6460
  }
6456
- const pe = l[P.field], $ = pe?.imageWidth ?? 40, ge = pe?.imageHeight ?? 40, ve = (q.getColumn(ne + 1).width ?? 8) * 7 + 5, ce = Math.max(0, ve - $) / 2, A = Math.max(0, D - ge) / 2;
6457
- q.addImage(Z, {
6461
+ const pe = l[P.field], $ = pe?.imageWidth ?? 40, ge = pe?.imageHeight ?? 40, be = (q.getColumn(ne + 1).width ?? 8) * 7 + 5, ce = Math.max(0, be - $) / 2, A = Math.max(0, D - ge) / 2;
6462
+ q.addImage(ee, {
6458
6463
  tl: {
6459
6464
  col: ne,
6460
6465
  row: K,
@@ -6466,7 +6471,7 @@ async function Ri(n, t, e = {}) {
6466
6471
  });
6467
6472
  });
6468
6473
  } else
6469
- W.height = 16;
6474
+ O.height = 16;
6470
6475
  K++;
6471
6476
  }), T && g && x) {
6472
6477
  const C = b.map((V) => {
@@ -6476,12 +6481,12 @@ async function Ri(n, t, e = {}) {
6476
6481
  B.height = 16, B.font = { size: d - 1, italic: !0, color: { argb: "FF94a3b8" } }, B.eachCell((V) => {
6477
6482
  V.alignment = { horizontal: "right", vertical: "middle" }, V.border = { top: { style: "thin", color: { argb: "FFcbd5e1" } } };
6478
6483
  });
6479
- const O = b.map((V) => {
6484
+ const W = b.map((V) => {
6480
6485
  const G = x[V.field], D = g[V.field];
6481
6486
  return G == null || D == null ? "" : V.valueFormatter ? V.valueFormatter({ value: D, row: {}, field: V.field }) : He(D, G);
6482
- }), W = q.addRow(O);
6483
- W.height = 18, W.font = { bold: !0, size: d, color: { argb: ze(s) } }, W.eachCell((V) => {
6484
- V.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, V.alignment = { horizontal: "right", vertical: "middle" }, V.border = ui();
6487
+ }), O = q.addRow(W);
6488
+ O.height = 18, O.font = { bold: !0, size: d, color: { argb: ze(s) } }, O.eachCell((V) => {
6489
+ V.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, V.alignment = { horizontal: "right", vertical: "middle" }, V.border = gi();
6485
6490
  });
6486
6491
  }
6487
6492
  }
@@ -6497,10 +6502,10 @@ function ze(n) {
6497
6502
  function Fn() {
6498
6503
  return { bottom: { style: "medium", color: { argb: "FFcbd5e1" } } };
6499
6504
  }
6500
- function ui() {
6505
+ function gi() {
6501
6506
  return { top: { style: "medium", color: { argb: "FFcbd5e1" } } };
6502
6507
  }
6503
- const gi = {
6508
+ const fi = {
6504
6509
  "--ogx-color-primary": "#3b82f6",
6505
6510
  "--ogx-color-primary-dark": "#2563eb",
6506
6511
  "--ogx-color-primary-light": "#eff6ff",
@@ -6574,7 +6579,7 @@ const gi = {
6574
6579
  "--ogx-skeleton-dark-base": "#e2e8f0",
6575
6580
  "--ogx-skeleton-dark-highlight": "#f8fafc"
6576
6581
  };
6577
- function fi(n) {
6582
+ function hi(n) {
6578
6583
  const t = {};
6579
6584
  function e(o, i) {
6580
6585
  i !== void 0 && (t[o] = i);
@@ -6625,13 +6630,13 @@ function fi(n) {
6625
6630
  }
6626
6631
  return t;
6627
6632
  }
6628
- function Ei({
6633
+ function Ni({
6629
6634
  theme: n,
6630
6635
  children: t,
6631
6636
  className: e,
6632
6637
  style: o
6633
6638
  }) {
6634
- const i = ae.useMemo(() => ({ ...gi, ...fi(n) }), [n]);
6639
+ const i = ae.useMemo(() => ({ ...fi, ...hi(n) }), [n]);
6635
6640
  return /* @__PURE__ */ r.jsx(
6636
6641
  "div",
6637
6642
  {
@@ -6641,7 +6646,7 @@ function Ei({
6641
6646
  }
6642
6647
  );
6643
6648
  }
6644
- const Ni = {
6649
+ const Mi = {
6645
6650
  colors: {
6646
6651
  primary: "#60a5fa",
6647
6652
  primaryDark: "#3b82f6",
@@ -6717,7 +6722,7 @@ const Ni = {
6717
6722
  darkBaseColor: "#0f172a",
6718
6723
  darkHighlightColor: "#1e293b"
6719
6724
  }
6720
- }, Mi = {
6725
+ }, Ii = {
6721
6726
  colors: {
6722
6727
  primary: "#e11d48",
6723
6728
  primaryDark: "#be123c",
@@ -6733,7 +6738,7 @@ const Ni = {
6733
6738
  rowSelectedHoverBackground: "#fecdd3",
6734
6739
  cellFocusBorder: "#e11d48"
6735
6740
  }
6736
- }, Ii = {
6741
+ }, Pi = {
6737
6742
  colors: {
6738
6743
  primary: "#059669",
6739
6744
  primaryDark: "#047857",
@@ -6749,7 +6754,7 @@ const Ni = {
6749
6754
  rowSelectedHoverBackground: "#a7f3d0",
6750
6755
  cellFocusBorder: "#059669"
6751
6756
  }
6752
- }, Pi = {
6757
+ }, Li = {
6753
6758
  colors: {
6754
6759
  primary: "#d97706",
6755
6760
  primaryDark: "#b45309",
@@ -6765,7 +6770,7 @@ const Ni = {
6765
6770
  rowSelectedHoverBackground: "#fde68a",
6766
6771
  cellFocusBorder: "#d97706"
6767
6772
  }
6768
- }, Li = {
6773
+ }, Ti = {
6769
6774
  grid: {
6770
6775
  rowHeightCompact: "28px",
6771
6776
  rowHeightStandard: "36px",
@@ -6779,7 +6784,7 @@ const Ni = {
6779
6784
  fontSizeMd: "0.875rem"
6780
6785
  }
6781
6786
  };
6782
- function hi(n, t) {
6787
+ function pi(n, t) {
6783
6788
  try {
6784
6789
  const e = t.getItem(n);
6785
6790
  return e ? JSON.parse(e) : void 0;
@@ -6787,7 +6792,7 @@ function hi(n, t) {
6787
6792
  return;
6788
6793
  }
6789
6794
  }
6790
- function pi(n, t, e, o) {
6795
+ function xi(n, t, e, o) {
6791
6796
  try {
6792
6797
  const i = e ? Object.fromEntries(
6793
6798
  Object.entries(t).filter(([l]) => e.includes(l))
@@ -6796,7 +6801,7 @@ function pi(n, t, e, o) {
6796
6801
  } catch {
6797
6802
  }
6798
6803
  }
6799
- function Ti(n) {
6804
+ function Wi(n) {
6800
6805
  const t = typeof n == "string" ? { key: n } : n, {
6801
6806
  key: e,
6802
6807
  debounceMs: o = 300,
@@ -6804,9 +6809,9 @@ function Ti(n) {
6804
6809
  storage: l = typeof window < "u" ? window.localStorage : void 0
6805
6810
  } = t, a = le(() => {
6806
6811
  if (l)
6807
- return hi(e, l);
6812
+ return pi(e, l);
6808
6813
  }, [e, l]), s = J(null), c = J(null), d = z(() => {
6809
- c.current && l && pi(e, c.current, i, l);
6814
+ c.current && l && xi(e, c.current, i, l);
6810
6815
  }, [e, i, l]), g = z(
6811
6816
  (h) => {
6812
6817
  c.current = h, s.current && clearTimeout(s.current), s.current = setTimeout(d, o);
@@ -6822,32 +6827,32 @@ function Ti(n) {
6822
6827
  return { initialState: a, onStateChange: g, clearState: x };
6823
6828
  }
6824
6829
  export {
6825
- Ot as Button,
6826
- Ar as Cell,
6830
+ Wt as Button,
6831
+ zr as Cell,
6827
6832
  At as Checkbox,
6828
- wi as DataGrid,
6829
- Ei as DataGridThemeProvider,
6830
- Yr as FilterPanel,
6831
- bi as GridToolbar,
6833
+ vi as DataGrid,
6834
+ Ni as DataGridThemeProvider,
6835
+ qr as FilterPanel,
6836
+ _i as GridToolbar,
6832
6837
  Ft as GridTooltip,
6833
- fr as Header,
6834
- yi as Input,
6838
+ hr as Header,
6839
+ Ci as Input,
6835
6840
  dn as Row,
6836
- vi as Skeleton,
6837
- Pi as amberTheme,
6838
- Li as compactTheme,
6839
- Ni as darkTheme,
6840
- Ii as emeraldTheme,
6841
- Ci as exportToCsv,
6842
- ki as exportToExcel,
6843
- Ri as exportToExcelAdvanced,
6844
- Si as exportToJson,
6841
+ bi as Skeleton,
6842
+ Li as amberTheme,
6843
+ Ti as compactTheme,
6844
+ Mi as darkTheme,
6845
+ Pi as emeraldTheme,
6846
+ ki as exportToCsv,
6847
+ Si as exportToExcel,
6848
+ Ei as exportToExcelAdvanced,
6849
+ ji as exportToJson,
6845
6850
  He as formatAggregationValue,
6846
- ji as printGrid,
6847
- Mi as roseTheme,
6848
- qo as useAggregation,
6849
- _i as useGridApiRef,
6850
- Ti as useGridStateStorage,
6851
- Sr as usePivot
6851
+ Ri as printGrid,
6852
+ Ii as roseTheme,
6853
+ Xo as useAggregation,
6854
+ yi as useGridApiRef,
6855
+ Wi as useGridStateStorage,
6856
+ jr as usePivot
6852
6857
  };
6853
6858
  //# sourceMappingURL=opengridx.es.js.map