@opencorestack/opengridx 0.1.5 → 0.1.6

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,6 +1,6 @@
1
1
  import xe, { useState as Z, useRef as ne, useCallback as O, useEffect as te, useMemo as ce, useReducer as Cr, useLayoutEffect as kr } from "react";
2
2
  import Lt from "react-dom";
3
- var kn = { exports: {} }, ln = {};
3
+ var Sn = { exports: {} }, ln = {};
4
4
  var yo;
5
5
  function Sr() {
6
6
  if (yo) return ln;
@@ -109,7 +109,7 @@ function jr() {
109
109
  return Error("react-stack-top-frame");
110
110
  }
111
111
  function d(v) {
112
- if (q.call(v, "key")) {
112
+ if (Y.call(v, "key")) {
113
113
  var D = Object.getOwnPropertyDescriptor(v, "key").get;
114
114
  if (D && D.isReactWarning) return !1;
115
115
  }
@@ -117,7 +117,7 @@ function jr() {
117
117
  }
118
118
  function s(v, D) {
119
119
  function H() {
120
- Y || (Y = !0, console.error(
120
+ X || (X = !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
  D
123
123
  ));
@@ -133,7 +133,7 @@ function jr() {
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
  )), v = this.props.ref, v !== void 0 ? v : null;
135
135
  }
136
- function g(v, D, H, W, F, X) {
136
+ function g(v, D, H, W, F, q) {
137
137
  var K = H.ref;
138
138
  return v = {
139
139
  $$typeof: w,
@@ -163,10 +163,10 @@ function jr() {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: X
166
+ value: q
167
167
  }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
168
168
  }
169
- function h(v, D, H, W, F, X) {
169
+ function h(v, D, H, W, F, q) {
170
170
  var K = D.children;
171
171
  if (K !== void 0)
172
172
  if (W)
@@ -179,7 +179,7 @@ function jr() {
179
179
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
180
180
  );
181
181
  else x(K);
182
- if (q.call(D, "key")) {
182
+ if (Y.call(D, "key")) {
183
183
  K = n(v);
184
184
  var M = Object.keys(D).filter(function(le) {
185
185
  return le !== "key";
@@ -211,7 +211,7 @@ React keys must be passed directly to JSX without using spread:
211
211
  H,
212
212
  i(),
213
213
  F,
214
- X
214
+ q
215
215
  );
216
216
  }
217
217
  function x(v) {
@@ -220,7 +220,7 @@ React keys must be passed directly to JSX without using spread:
220
220
  function c(v) {
221
221
  return typeof v == "object" && v !== null && v.$$typeof === w;
222
222
  }
223
- var f = xe, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), N = /* @__PURE__ */ Symbol.for("react.fragment"), I = /* @__PURE__ */ Symbol.for("react.strict_mode"), j = /* @__PURE__ */ Symbol.for("react.profiler"), C = /* @__PURE__ */ Symbol.for("react.consumer"), _ = /* @__PURE__ */ Symbol.for("react.context"), b = /* @__PURE__ */ Symbol.for("react.forward_ref"), y = /* @__PURE__ */ Symbol.for("react.suspense"), E = /* @__PURE__ */ Symbol.for("react.suspense_list"), k = /* @__PURE__ */ Symbol.for("react.memo"), p = /* @__PURE__ */ Symbol.for("react.lazy"), S = /* @__PURE__ */ Symbol.for("react.activity"), L = /* @__PURE__ */ Symbol.for("react.client.reference"), B = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, q = Object.prototype.hasOwnProperty, A = Array.isArray, U = console.createTask ? console.createTask : function() {
223
+ var f = xe, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), N = /* @__PURE__ */ Symbol.for("react.fragment"), I = /* @__PURE__ */ Symbol.for("react.strict_mode"), j = /* @__PURE__ */ Symbol.for("react.profiler"), C = /* @__PURE__ */ Symbol.for("react.consumer"), _ = /* @__PURE__ */ Symbol.for("react.context"), b = /* @__PURE__ */ Symbol.for("react.forward_ref"), y = /* @__PURE__ */ Symbol.for("react.suspense"), E = /* @__PURE__ */ Symbol.for("react.suspense_list"), k = /* @__PURE__ */ Symbol.for("react.memo"), p = /* @__PURE__ */ Symbol.for("react.lazy"), S = /* @__PURE__ */ Symbol.for("react.activity"), L = /* @__PURE__ */ Symbol.for("react.client.reference"), B = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, A = Array.isArray, U = console.createTask ? console.createTask : function() {
224
224
  return null;
225
225
  };
226
226
  f = {
@@ -228,7 +228,7 @@ React keys must be passed directly to JSX without using spread:
228
228
  return v();
229
229
  }
230
230
  };
231
- var Y, G = {}, oe = f.react_stack_bottom_frame.bind(
231
+ var X, G = {}, oe = f.react_stack_bottom_frame.bind(
232
232
  f,
233
233
  l
234
234
  )(), Q = U(r(l)), ve = {};
@@ -257,7 +257,7 @@ React keys must be passed directly to JSX without using spread:
257
257
  }
258
258
  var ko;
259
259
  function Rr() {
260
- return ko || (ko = 1, process.env.NODE_ENV === "production" ? kn.exports = Sr() : kn.exports = jr()), kn.exports;
260
+ return ko || (ko = 1, process.env.NODE_ENV === "production" ? Sn.exports = Sr() : Sn.exports = jr()), Sn.exports;
261
261
  }
262
262
  var t = Rr();
263
263
  function Er({
@@ -304,7 +304,7 @@ function Er({
304
304
  }
305
305
  );
306
306
  }
307
- const En = ({
307
+ const Nn = ({
308
308
  indeterminate: n = !1,
309
309
  label: o,
310
310
  className: e = "",
@@ -376,13 +376,13 @@ function Nr(n) {
376
376
  }
377
377
  );
378
378
  }
379
- function Nn(n, o) {
379
+ function In(n, o) {
380
380
  return o ? o.left?.includes(n) ? "left" : o.right?.includes(n) ? "right" : null : null;
381
381
  }
382
382
  function Ir(n, o) {
383
383
  const e = [], r = [], i = [];
384
384
  return o ? (n.forEach((l) => {
385
- const d = Nn(l.field, o);
385
+ const d = In(l.field, o);
386
386
  d === "left" ? e.push(l) : d === "right" ? i.push(l) : r.push(l);
387
387
  }), o.left && e.sort((l, d) => {
388
388
  const s = o.left.indexOf(l.field), u = o.left.indexOf(d.field);
@@ -499,8 +499,8 @@ function Br({ colDef: n, sortModel: o, onSort: e, onHide: r, onPin: i, pinnedCol
499
499
  function y(E) {
500
500
  E.key === "Escape" && s();
501
501
  }
502
- return document.addEventListener("mousedown", b), document.addEventListener("keydown", y), () => {
503
- document.removeEventListener("mousedown", b), document.removeEventListener("keydown", y);
502
+ return document.addEventListener("mousedown", b), document.addEventListener("keydown", y), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), () => {
503
+ document.removeEventListener("mousedown", b), document.removeEventListener("keydown", y), window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
504
504
  };
505
505
  }, [u, s]);
506
506
  const c = (b) => {
@@ -512,7 +512,7 @@ function Br({ colDef: n, sortModel: o, onSort: e, onHide: r, onPin: i, pinnedCol
512
512
  }, m = o?.find((b) => b.field === n.field)?.sort, N = m == null, I = l?.left?.includes(n.field) ?? !1, j = l?.right?.includes(n.field) ?? !1, C = !I && !j, _ = n.headerName || n.field;
513
513
  return Lt.createPortal(
514
514
  /* @__PURE__ */ t.jsxs("div", { ref: g, className: "ogx-column-menu", style: h, role: "menu", "aria-label": `Column options for ${_}`, children: [
515
- e && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
515
+ e && n.sortable !== !1 && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
516
516
  /* @__PURE__ */ t.jsxs(
517
517
  "button",
518
518
  {
@@ -618,7 +618,7 @@ function Br({ colDef: n, sortModel: o, onSort: e, onHide: r, onPin: i, pinnedCol
618
618
  "Manage columns"
619
619
  ] })
620
620
  ] }),
621
- document.body
621
+ u?.closest(".ogx-theme-provider") || document.body
622
622
  );
623
623
  }
624
624
  function $r() {
@@ -704,14 +704,14 @@ function Vr(n) {
704
704
  onHideColumn: S,
705
705
  onPinColumn: L,
706
706
  onManageColumns: B
707
- } = n, q = xe.useRef({}), [A, U] = xe.useState(null), Y = (M) => (ue) => {
707
+ } = n, Y = xe.useRef({}), [A, U] = xe.useState(null), X = (M) => (ue) => {
708
708
  ue.stopPropagation(), U({ colDef: M, anchorEl: ue.currentTarget });
709
709
  }, G = () => {
710
710
  U(null);
711
711
  };
712
712
  xe.useLayoutEffect(() => {
713
713
  if (k?.id === "HEADER") {
714
- const M = q.current[k.field];
714
+ const M = Y.current[k.field];
715
715
  M && M.focus();
716
716
  }
717
717
  }, [k]);
@@ -810,7 +810,7 @@ function Vr(n) {
810
810
  left: w ? (N ? 48 : 0) + (f && m ? 48 : 0) : void 0
811
811
  },
812
812
  children: /* @__PURE__ */ t.jsx(
813
- En,
813
+ Nn,
814
814
  {
815
815
  id: "ogx-select-all",
816
816
  name: "ogx-select-all",
@@ -821,7 +821,7 @@ function Vr(n) {
821
821
  tabIndex: k?.id === "HEADER" && k.field === "__checkbox_col__" ? 0 : -1,
822
822
  onMouseDown: (M) => M.preventDefault(),
823
823
  inputRef: (M) => {
824
- q.current.__checkbox_col__ = M;
824
+ Y.current.__checkbox_col__ = M;
825
825
  }
826
826
  }
827
827
  )
@@ -837,7 +837,7 @@ function Vr(n) {
837
837
  },
838
838
  M.field
839
839
  );
840
- const le = M.sortable !== !1, _e = g.some((He) => He.field === M.field), ot = M.resizable !== !1, z = Nn(M.field, c), Pe = z !== null, Me = j === M.field, ft = C === M.field, Ue = [
840
+ const le = M.sortable !== !1, _e = g.some((He) => He.field === M.field), ot = M.resizable !== !1, z = In(M.field, c), Pe = z !== null, Me = j === M.field, pt = C === M.field, Ue = [
841
841
  "ogx__header-cell",
842
842
  `ogx__header-cell--align-${M.headerAlign || M.align || "left"}`,
843
843
  le && "ogx__header-cell--sortable",
@@ -845,11 +845,11 @@ function Vr(n) {
845
845
  Pe && "ogx__header-cell--pinned",
846
846
  Pe && `ogx__header-cell--pinned-${z}`,
847
847
  Me && "ogx__header-cell--dragging",
848
- ft && "ogx__header-cell--drag-over",
848
+ pt && "ogx__header-cell--drag-over",
849
849
  k?.id === "HEADER" && k.field === M.field && "ogx__header-cell--focused",
850
850
  M.headerClassName
851
- ].filter(Boolean).join(" "), ht = x[M.field] ?? M.width ?? 100, pt = {
852
- width: ht,
851
+ ].filter(Boolean).join(" "), rt = x[M.field] ?? M.width ?? 100, it = {
852
+ width: rt,
853
853
  minWidth: M.minWidth,
854
854
  maxWidth: M.maxWidth,
855
855
  flexGrow: M.flex ?? 0,
@@ -862,7 +862,7 @@ function Vr(n) {
862
862
  };
863
863
  if (Pe && z) {
864
864
  const He = ve[M.field];
865
- z === "left" ? pt.left = He : pt.right = He;
865
+ z === "left" ? it.left = He : it.right = He;
866
866
  }
867
867
  const Qt = M.renderHeader ? M.renderHeader({ field: M.field, colDef: M, colIndex: ue }) : M.headerName || M.field, Tt = (He) => {
868
868
  if (He.target.closest(".ogx-column-resize-handle")) {
@@ -875,7 +875,7 @@ function Vr(n) {
875
875
  "div",
876
876
  {
877
877
  className: Ue,
878
- style: pt,
878
+ style: it,
879
879
  onClick: Tt,
880
880
  role: "columnheader",
881
881
  draggable: !!_,
@@ -888,7 +888,7 @@ function Vr(n) {
888
888
  "data-field": M.field,
889
889
  tabIndex: -1,
890
890
  ref: (He) => {
891
- q.current[M.field] = He;
891
+ Y.current[M.field] = He;
892
892
  },
893
893
  children: [
894
894
  /* @__PURE__ */ t.jsxs("div", { className: "ogx__header-cell-content", children: [
@@ -902,7 +902,7 @@ function Vr(n) {
902
902
  "button",
903
903
  {
904
904
  className: "ogx__menu-icon-btn",
905
- onClick: Y(M),
905
+ onClick: X(M),
906
906
  "aria-label": `Open column menu for ${M.headerName || M.field}`,
907
907
  "aria-haspopup": "menu",
908
908
  tabIndex: -1,
@@ -914,7 +914,7 @@ function Vr(n) {
914
914
  Nr,
915
915
  {
916
916
  field: M.field,
917
- currentWidth: ht,
917
+ currentWidth: rt,
918
918
  onResize: h,
919
919
  minWidth: M.minWidth,
920
920
  maxWidth: M.maxWidth
@@ -1153,19 +1153,19 @@ function Qr(n) {
1153
1153
  colDef: d,
1154
1154
  rowIndex: s,
1155
1155
  colIndex: u
1156
- }) : L, [i, l, d, s, u, L, I, p, C, r, _]), q = c != null, A = xe.useMemo(() => d.cellClassName ? typeof d.cellClassName == "function" ? d.cellClassName({ value: i, row: l, field: d.field, colDef: d, rowIndex: s, colIndex: u }) || "" : d.cellClassName : "", [d, i, l, s, u]), U = [
1156
+ }) : L, [i, l, d, s, u, L, I, p, C, r, _]), Y = c != null, A = xe.useMemo(() => d.cellClassName ? typeof d.cellClassName == "function" ? d.cellClassName({ value: i, row: l, field: d.field, colDef: d, rowIndex: s, colIndex: u }) || "" : d.cellClassName : "", [d, i, l, s, u]), U = [
1157
1157
  "ogx__cell",
1158
1158
  `ogx__cell--align-${d.align || "left"}`,
1159
1159
  g && "ogx__cell--selected",
1160
1160
  w && "ogx__cell--focused",
1161
1161
  w && m && "ogx__cell--focus-visible",
1162
1162
  d.type && `ogx__cell--type-${d.type}`,
1163
- q && "ogx__cell--pinned",
1164
- q && `ogx__cell--pinned-${c}`,
1163
+ Y && "ogx__cell--pinned",
1164
+ Y && `ogx__cell--pinned-${c}`,
1165
1165
  I && "ogx__cell--editing",
1166
1166
  y && y > 1 && "ogx__cell--spanned",
1167
1167
  A
1168
- ].filter(Boolean).join(" "), Y = b?.cellProps?.colSpan || 1, G = y || 1, oe = b?.cellProps?.width ?? x ?? d.width ?? 100, Q = {
1168
+ ].filter(Boolean).join(" "), X = b?.cellProps?.colSpan || 1, G = y || 1, oe = b?.cellProps?.width ?? x ?? d.width ?? 100, Q = {
1169
1169
  width: "var(--width)",
1170
1170
  "--width": typeof oe == "number" ? `${oe}px` : oe,
1171
1171
  flexGrow: d.flex ?? 0,
@@ -1174,11 +1174,11 @@ function Qr(n) {
1174
1174
  boxSizing: "border-box",
1175
1175
  minWidth: d.minWidth,
1176
1176
  maxWidth: d.maxWidth,
1177
- position: q ? "sticky" : void 0,
1178
- zIndex: d.zIndex ?? (q ? 3 : void 0),
1177
+ position: Y ? "sticky" : void 0,
1178
+ zIndex: d.zIndex ?? (Y ? 3 : void 0),
1179
1179
  padding: I ? 0 : void 0
1180
1180
  };
1181
- G > 1 && (Q.height = `calc(var(--height) * ${G} - var(--border-width, 1px))`, Q.zIndex = 10, q && (Q.zIndex = 40)), q && f !== void 0 && (c === "left" ? Q.left = f : Q.right = f);
1181
+ G > 1 && (Q.height = `calc(var(--height) * ${G} - var(--border-width, 1px))`, Q.zIndex = 10, Y && (Q.zIndex = 40)), Y && f !== void 0 && (c === "left" ? Q.left = f : Q.right = f);
1182
1182
  const ve = xe.useRef(null);
1183
1183
  return xe.useLayoutEffect(() => {
1184
1184
  w && ve.current && ve.current.focus({ preventScroll: !0 });
@@ -1196,7 +1196,7 @@ function Qr(n) {
1196
1196
  tabIndex: -1,
1197
1197
  "data-field": d.field,
1198
1198
  "data-colindex": u,
1199
- ...Y > 1 ? { "aria-colspan": Y } : {},
1199
+ ...X > 1 ? { "aria-colspan": X } : {},
1200
1200
  ...G > 1 ? { "aria-rowspan": G } : {},
1201
1201
  children: /* @__PURE__ */ t.jsx("div", { className: "ogx__cell-content", children: B })
1202
1202
  }
@@ -1296,7 +1296,7 @@ function ti(n) {
1296
1296
  };
1297
1297
  return /* @__PURE__ */ t.jsx("div", { className: "ogx__detail-panel", style: i, children: /* @__PURE__ */ t.jsx("div", { className: "ogx__detail-panel-content", children: o }) });
1298
1298
  }
1299
- function Sn(n) {
1299
+ function jn(n) {
1300
1300
  const {
1301
1301
  row: o,
1302
1302
  columns: e,
@@ -1326,10 +1326,10 @@ function Sn(n) {
1326
1326
  editingCell: S,
1327
1327
  onEditStart: L,
1328
1328
  onEditStop: B,
1329
- onEditCellValueChange: q,
1329
+ onEditCellValueChange: Y,
1330
1330
  focusedCellField: A,
1331
1331
  isFocusVisible: U,
1332
- colspanMap: Y,
1332
+ colspanMap: X,
1333
1333
  rowSpanningCaches: G,
1334
1334
  rowHeight: oe = 52
1335
1335
  } = n, Q = xe.useRef(null), ve = xe.useRef(null);
@@ -1364,18 +1364,18 @@ function Sn(n) {
1364
1364
  c,
1365
1365
  j,
1366
1366
  C
1367
- ), [e, g, h, l, I, c, j, C]), F = Qn(o.id, x), X = F === "top", K = F === "bottom", M = o._hasChildren === !0, ue = xe.useCallback((z, Pe) => {
1367
+ ), [e, g, h, l, I, c, j, C]), F = Qn(o.id, x), q = F === "top", K = F === "bottom", M = o._hasChildren === !0, ue = xe.useCallback((z, Pe) => {
1368
1368
  M || L?.({ id: o.id, field: z, value: Pe });
1369
1369
  }, [M, o.id, L]), le = xe.useCallback((z, Pe) => {
1370
- q?.({ id: o.id, field: z, value: Pe });
1371
- }, [q, o.id]), _e = xe.useCallback((z) => {
1370
+ Y?.({ id: o.id, field: z, value: Pe });
1371
+ }, [Y, o.id]), _e = xe.useCallback((z) => {
1372
1372
  B?.({ cancel: z });
1373
1373
  }, [B]), ot = [
1374
1374
  "ogx__row",
1375
1375
  i && "ogx__row--selected",
1376
1376
  r % 2 === 0 && "ogx__row--even",
1377
1377
  r % 2 === 1 && "ogx__row--odd",
1378
- X && "ogx__row--pinned-top",
1378
+ q && "ogx__row--pinned-top",
1379
1379
  K && "ogx__row--pinned-bottom",
1380
1380
  k && "ogx__row--dragging",
1381
1381
  p && "ogx__row--drag-over",
@@ -1475,7 +1475,7 @@ function Sn(n) {
1475
1475
  });
1476
1476
  },
1477
1477
  children: /* @__PURE__ */ t.jsx(
1478
- En,
1478
+ Nn,
1479
1479
  {
1480
1480
  id: `ogx-select-row-${o.id}`,
1481
1481
  name: `ogx-select-row-${o.id}`,
@@ -1499,7 +1499,7 @@ function Sn(n) {
1499
1499
  },
1500
1500
  z.field
1501
1501
  );
1502
- const Me = z.valueGetter ? z.valueGetter({ row: o, field: z.field, value: o[z.field] }) : o[z.field], ft = g[z.field] ?? z.width, Ue = Nn(z.field, h), ht = Ue ? W[z.field] : void 0, pt = S?.id === o.id && S?.field === z.field, Qt = pt ? S?.value : Me, Tt = Y?.get(o.id)?.[z.field], Et = G?.spannedCells[o.id]?.[z.field], Ot = G?.hiddenCells[o.id]?.[z.field] || !1;
1502
+ const Me = z.valueGetter ? z.valueGetter({ row: o, field: z.field, value: o[z.field] }) : o[z.field], pt = g[z.field] ?? z.width, Ue = In(z.field, h), rt = Ue ? W[z.field] : void 0, it = S?.id === o.id && S?.field === z.field, Qt = it ? S?.value : Me, Tt = X?.get(o.id)?.[z.field], Et = G?.spannedCells[o.id]?.[z.field], Ot = G?.hiddenCells[o.id]?.[z.field] || !1;
1503
1503
  return /* @__PURE__ */ t.jsx(
1504
1504
  Zr,
1505
1505
  {
@@ -1510,13 +1510,13 @@ function Sn(n) {
1510
1510
  colIndex: Pe,
1511
1511
  isSelected: i,
1512
1512
  onCellClick: s,
1513
- width: ft,
1513
+ width: pt,
1514
1514
  pinnedPosition: Ue,
1515
- pinnedOffset: ht,
1515
+ pinnedOffset: rt,
1516
1516
  isFocused: A === z.field,
1517
1517
  isFocusVisible: U,
1518
1518
  isEditable: z.editable,
1519
- isEditing: pt,
1519
+ isEditing: it,
1520
1520
  onCellEditStart: ue,
1521
1521
  onEditStop: _e,
1522
1522
  onCellValueChange: le,
@@ -1612,7 +1612,7 @@ const ni = ({
1612
1612
  })
1613
1613
  ]
1614
1614
  }
1615
- ), jn = ({
1615
+ ), Rn = ({
1616
1616
  variant: n = "text",
1617
1617
  size: o = "medium",
1618
1618
  color: e = "default",
@@ -1683,7 +1683,7 @@ function So(n) {
1683
1683
  ] }),
1684
1684
  /* @__PURE__ */ t.jsxs("div", { className: "ogx-pagination__actions", children: [
1685
1685
  s && /* @__PURE__ */ t.jsx(
1686
- jn,
1686
+ Rn,
1687
1687
  {
1688
1688
  variant: "text",
1689
1689
  size: "small",
@@ -1695,7 +1695,7 @@ function So(n) {
1695
1695
  }
1696
1696
  ),
1697
1697
  /* @__PURE__ */ t.jsx(
1698
- jn,
1698
+ Rn,
1699
1699
  {
1700
1700
  variant: "text",
1701
1701
  size: "small",
@@ -1713,7 +1713,7 @@ function So(n) {
1713
1713
  g
1714
1714
  ] }),
1715
1715
  /* @__PURE__ */ t.jsx(
1716
- jn,
1716
+ Rn,
1717
1717
  {
1718
1718
  variant: "text",
1719
1719
  size: "small",
@@ -1725,7 +1725,7 @@ function So(n) {
1725
1725
  }
1726
1726
  ),
1727
1727
  u && /* @__PURE__ */ t.jsx(
1728
- jn,
1728
+ Rn,
1729
1729
  {
1730
1730
  variant: "text",
1731
1731
  size: "small",
@@ -2232,9 +2232,9 @@ function hi(n) {
2232
2232
  }
2233
2233
  const B = (A) => {
2234
2234
  if (A.length <= 1) return;
2235
- const U = A.slice(0, -1), Y = k(U);
2236
- let G = E.get(Y);
2237
- if (G === void 0 && (G = `auto-group-${Y}`, !_.has(G))) {
2235
+ const U = A.slice(0, -1), X = k(U);
2236
+ let G = E.get(X);
2237
+ if (G === void 0 && (G = `auto-group-${X}`, !_.has(G))) {
2238
2238
  const oe = U[U.length - 1];
2239
2239
  _.set(G, {
2240
2240
  id: G,
@@ -2244,7 +2244,7 @@ function hi(n) {
2244
2244
  isExpanded: !1,
2245
2245
  children: [],
2246
2246
  label: oe
2247
- }), E.set(Y, G);
2247
+ }), E.set(X, G);
2248
2248
  const Q = {
2249
2249
  id: G,
2250
2250
  name: oe,
@@ -2253,20 +2253,20 @@ function hi(n) {
2253
2253
  y.push(Q), U.length === 1 && b.push(G), B(U);
2254
2254
  }
2255
2255
  return G;
2256
- }, q = B(L);
2257
- if (q !== void 0) {
2258
- const A = _.get(q), U = _.get(S);
2259
- A && U && (U.parentId = q, A.children = A.children || [], A.children.includes(S) || A.children.push(S));
2256
+ }, Y = B(L);
2257
+ if (Y !== void 0) {
2258
+ const A = _.get(Y), U = _.get(S);
2259
+ A && U && (U.parentId = Y, A.children = A.children || [], A.children.includes(S) || A.children.push(S));
2260
2260
  }
2261
2261
  }), y.forEach((p) => {
2262
2262
  const S = p.id, L = _.get(S);
2263
2263
  if (!L) return;
2264
- const q = S.replace("auto-group-", "").split("/");
2265
- if (q.length > 1) {
2266
- const A = q.slice(0, -1), U = k(A), Y = E.get(U);
2267
- if (Y && _.has(Y)) {
2268
- L.parentId = Y;
2269
- const G = _.get(Y);
2264
+ const Y = S.replace("auto-group-", "").split("/");
2265
+ if (Y.length > 1) {
2266
+ const A = Y.slice(0, -1), U = k(A), X = E.get(U);
2267
+ if (X && _.has(X)) {
2268
+ L.parentId = X;
2269
+ const G = _.get(X);
2270
2270
  G && (G.children = G.children || [], G.children.includes(S) || G.children.push(S));
2271
2271
  }
2272
2272
  }
@@ -2296,36 +2296,36 @@ function hi(n) {
2296
2296
  o.forEach((B) => _.set(e(B), B)), x.forEach((B) => _.set(B.id, B));
2297
2297
  const b = (B) => Zn(B, d), y = /* @__PURE__ */ new Map(), E = (B) => {
2298
2298
  if (y.has(B)) return y.get(B);
2299
- const q = _.get(B);
2300
- if (!q) return !1;
2301
- if (b(q))
2299
+ const Y = _.get(B);
2300
+ if (!Y) return !1;
2301
+ if (b(Y))
2302
2302
  return y.set(B, !0), !0;
2303
2303
  const U = g.get(B);
2304
2304
  return U && U.children && U.children.some((G) => E(G)) ? (y.set(B, !0), !0) : (y.set(B, !1), !1);
2305
- }, k = (B, q) => {
2305
+ }, k = (B, Y) => {
2306
2306
  if (!s || s.length === 0) return 0;
2307
- const A = _.get(B), U = _.get(q);
2307
+ const A = _.get(B), U = _.get(Y);
2308
2308
  if (!A || !U) return 0;
2309
- for (const Y of s) {
2310
- const G = A[Y.field], oe = U[Y.field], Q = eo(G, oe, Y.sort);
2309
+ for (const X of s) {
2310
+ const G = A[X.field], oe = U[X.field], Q = eo(G, oe, X.sort);
2311
2311
  if (Q !== 0) return Q;
2312
2312
  }
2313
2313
  return 0;
2314
2314
  }, p = [], S = /* @__PURE__ */ new Set(), L = (B) => {
2315
- const q = B.filter((A) => E(A));
2316
- q.sort(k), q.forEach((A) => {
2315
+ const Y = B.filter((A) => E(A));
2316
+ Y.sort(k), Y.forEach((A) => {
2317
2317
  if (S.has(A)) return;
2318
- const U = _.get(A), Y = g.get(A);
2319
- if (U && Y) {
2318
+ const U = _.get(A), X = g.get(A);
2319
+ if (U && X) {
2320
2320
  S.add(A);
2321
2321
  const G = {
2322
2322
  ...U,
2323
- _treeDepth: Y.depth,
2323
+ _treeDepth: X.depth,
2324
2324
  _isExpanded: f.has(A),
2325
- _hasChildren: Y.children && Y.children.length > 0 || Y.serverChildrenCount && Y.serverChildrenCount > 0,
2326
- _descendantCount: Y.children ? Y.children.length : 0
2325
+ _hasChildren: X.children && X.children.length > 0 || X.serverChildrenCount && X.serverChildrenCount > 0,
2326
+ _descendantCount: X.children ? X.children.length : 0
2327
2327
  };
2328
- p.push(G), f.has(A) && Y.children && Y.children.length > 0 && L(Y.children);
2328
+ p.push(G), f.has(A) && X.children && X.children.length > 0 && L(X.children);
2329
2329
  }
2330
2330
  });
2331
2331
  };
@@ -2379,26 +2379,26 @@ function xi(n) {
2379
2379
  });
2380
2380
  const L = r[p], B = /* @__PURE__ */ new Map();
2381
2381
  k.forEach((A) => {
2382
- const U = A[L], Y = String(U);
2383
- B.has(Y) || B.set(Y, []), B.get(Y).push(A);
2382
+ const U = A[L], X = String(U);
2383
+ B.has(X) || B.set(X, []), B.get(X).push(A);
2384
2384
  });
2385
- const q = [];
2385
+ const Y = [];
2386
2386
  return B.forEach((A, U) => {
2387
2387
  const G = A[0][L], oe = b(L, U, S);
2388
- q.push(oe);
2388
+ Y.push(oe);
2389
2389
  const Q = {};
2390
2390
  i && Object.entries(i).forEach(([W, F]) => {
2391
- const X = A.map((K) => K[W]);
2391
+ const q = A.map((K) => K[W]);
2392
2392
  if (F === "sum")
2393
- Q[W] = X.reduce((K, M) => (Number(K) || 0) + (Number(M) || 0), 0);
2393
+ Q[W] = q.reduce((K, M) => (Number(K) || 0) + (Number(M) || 0), 0);
2394
2394
  else if (F === "min")
2395
- Q[W] = Math.min(...X.map((K) => Number(K) || 0));
2395
+ Q[W] = Math.min(...q.map((K) => Number(K) || 0));
2396
2396
  else if (F === "max")
2397
- Q[W] = Math.max(...X.map((K) => Number(K) || 0));
2397
+ Q[W] = Math.max(...q.map((K) => Number(K) || 0));
2398
2398
  else if (F === "avg") {
2399
- const K = X.reduce((M, ue) => (Number(M) || 0) + (Number(ue) || 0), 0);
2400
- Q[W] = X.length ? K / X.length : 0;
2401
- } else F === "count" && (Q[W] = X.length);
2399
+ const K = q.reduce((M, ue) => (Number(M) || 0) + (Number(ue) || 0), 0);
2400
+ Q[W] = q.length ? K / q.length : 0;
2401
+ } else F === "count" && (Q[W] = q.length);
2402
2402
  });
2403
2403
  const ve = {
2404
2404
  [L]: G,
@@ -2423,7 +2423,7 @@ function xi(n) {
2423
2423
  j.get(oe).children = D;
2424
2424
  const H = A.length;
2425
2425
  j.get(oe).descendantCount = H;
2426
- }), q;
2426
+ }), Y;
2427
2427
  }, E = y(o, 0, null);
2428
2428
  return _.push(...E), { treeNodes: j, rootIds: _, groupingRows: C };
2429
2429
  }, [o, r, i, e, u]);
@@ -2461,20 +2461,20 @@ function xi(n) {
2461
2461
  }, y = (k) => {
2462
2462
  let p = k;
2463
2463
  d && (p = k.filter(b)), s && s.length > 0 && p.sort((S, L) => {
2464
- const B = f.get(S) || _.get(S), q = f.get(L) || _.get(L);
2465
- if (!B || !q) return 0;
2464
+ const B = f.get(S) || _.get(S), Y = f.get(L) || _.get(L);
2465
+ if (!B || !Y) return 0;
2466
2466
  for (const A of s) {
2467
- const U = B[A.field], Y = q[A.field], G = eo(U, Y, A.sort);
2467
+ const U = B[A.field], X = Y[A.field], G = eo(U, X, A.sort);
2468
2468
  if (G !== 0) return G;
2469
2469
  }
2470
2470
  return 0;
2471
2471
  }), p.forEach((S) => {
2472
2472
  if (C.has(S)) return;
2473
- const L = x.get(S), B = L?.children && L.children.length > 0, q = B ? f.get(S) : _.get(S);
2474
- if (q && L) {
2473
+ const L = x.get(S), B = L?.children && L.children.length > 0, Y = B ? f.get(S) : _.get(S);
2474
+ if (Y && L) {
2475
2475
  C.add(S);
2476
2476
  const A = {
2477
- ...q,
2477
+ ...Y,
2478
2478
  _treeDepth: L.depth,
2479
2479
  _isExpanded: g.has(S),
2480
2480
  _hasChildren: B,
@@ -3157,7 +3157,7 @@ function Po(n) {
3157
3157
  style: { display: "flex", alignItems: "center", gap: "var(--ogx-spacing-md)", flex: 1, cursor: E ? "pointer" : "not-allowed" },
3158
3158
  children: [
3159
3159
  /* @__PURE__ */ t.jsx(
3160
- En,
3160
+ Nn,
3161
3161
  {
3162
3162
  checked: y,
3163
3163
  onChange: (S) => r(b.field, S.target.checked),
@@ -3176,7 +3176,7 @@ function Po(n) {
3176
3176
  /* @__PURE__ */ t.jsxs("div", { className: "ogx-column-visibility-panel__footer", children: [
3177
3177
  /* @__PURE__ */ t.jsxs("label", { className: "ogx-column-visibility-panel__item", children: [
3178
3178
  /* @__PURE__ */ t.jsx(
3179
- En,
3179
+ Nn,
3180
3180
  {
3181
3181
  checked: f,
3182
3182
  onChange: m
@@ -3225,10 +3225,10 @@ function tl(n) {
3225
3225
  onDetailPanelExpandedRowIdsChange: S,
3226
3226
  pinCheckboxColumn: L = !0,
3227
3227
  pinExpandColumn: B = !0,
3228
- disableColumnReorder: q = !1,
3228
+ disableColumnReorder: Y = !1,
3229
3229
  columnOrder: A,
3230
3230
  onColumnOrderChange: U,
3231
- height: Y,
3231
+ height: X,
3232
3232
  rowReordering: G = !1,
3233
3233
  onRowOrderChange: oe,
3234
3234
  loading: Q = !1,
@@ -3238,7 +3238,7 @@ function tl(n) {
3238
3238
  rowGroupingModel: H,
3239
3239
  aggregationModel: W,
3240
3240
  onAggregationModelChange: F,
3241
- getAggregationPosition: X,
3241
+ getAggregationPosition: q,
3242
3242
  isCellEditable: K,
3243
3243
  processRowUpdate: M,
3244
3244
  onProcessRowUpdateError: ue,
@@ -3248,10 +3248,10 @@ function tl(n) {
3248
3248
  paginationMode: z = "client",
3249
3249
  rowCount: Pe,
3250
3250
  slots: Me,
3251
- slotProps: ft,
3251
+ slotProps: pt,
3252
3252
  pivotMode: Ue = !1,
3253
- pivotModel: ht,
3254
- onPivotModelChange: pt,
3253
+ pivotModel: rt,
3254
+ onPivotModelChange: it,
3255
3255
  className: Qt = "",
3256
3256
  style: Tt,
3257
3257
  onRowsScrollEnd: Et,
@@ -3264,34 +3264,34 @@ function tl(n) {
3264
3264
  listView: an = !1,
3265
3265
  listViewColumn: ro,
3266
3266
  columnGroupingModel: Nt,
3267
- noRowsLabel: In = "No Data",
3268
- apiRef: Pn
3267
+ noRowsLabel: Pn = "No Data",
3268
+ apiRef: Mn
3269
3269
  } = n, Oo = ce(() => ({ items: [] }), []), Xe = c || Oo, [Wo, Fo] = Z(
3270
3270
  () => yt?.sorting?.sortModel ?? []
3271
- ), Mn = w !== void 0, rt = Mn ? w : Wo, Ao = ce(() => [], []), Ln = H || Ao, Tn = W !== void 0, io = ce(() => Me?.toolbar, [Me?.toolbar]), [zo, Bo] = Z(
3271
+ ), Ln = w !== void 0, lt = Ln ? w : Wo, Ao = ce(() => [], []), Tn = H || Ao, On = W !== void 0, io = ce(() => Me?.toolbar, [Me?.toolbar]), [zo, Bo] = Z(
3272
3272
  () => W ?? {}
3273
- ), it = Tn ? W : zo, $o = O((a) => {
3274
- Tn || Bo(a), F?.(a);
3275
- }, [Tn, F]), [Do, Ho] = Z(
3273
+ ), st = On ? W : zo, $o = O((a) => {
3274
+ On || Bo(a), F?.(a);
3275
+ }, [On, F]), [Do, Ho] = Z(
3276
3276
  () => yt?.columns?.columnVisibilityModel ?? {}
3277
- ), On = no !== void 0, Ze = On ? no : Do, Zt = O((a) => {
3278
- On || Ho(a), oo?.(a);
3279
- }, [On, oo]), [Go, Vo] = Z(
3277
+ ), Wn = no !== void 0, Ze = Wn ? no : Do, Zt = O((a) => {
3278
+ Wn || Ho(a), oo?.(a);
3279
+ }, [Wn, oo]), [Go, Vo] = Z(
3280
3280
  () => yt?.columns?.pinnedColumns ?? {}
3281
- ), Wn = _ !== void 0, lt = Wn ? _ : Go, Fn = O((a) => {
3282
- Wn || Vo(a), b?.(a);
3283
- }, [Wn, b]), Uo = ce(() => ({ rowFields: [], columnFields: [], valueFields: [] }), []), [Ko, Yo] = Z(ht ?? Uo), lo = ht ?? Ko, Xo = O((a) => {
3284
- Yo(a), pt?.(a);
3285
- }, [pt]), dn = Ci(o, e, lo, Ue), An = Ue && dn.isValid ? dn.pivotRows : o, st = Ue && dn.isValid ? dn.pivotColumns : e, [qo, so] = Z(null);
3281
+ ), Fn = _ !== void 0, at = Fn ? _ : Go, An = O((a) => {
3282
+ Fn || Vo(a), b?.(a);
3283
+ }, [Fn, b]), Uo = ce(() => ({ rowFields: [], columnFields: [], valueFields: [] }), []), [Ko, Yo] = Z(rt ?? Uo), lo = rt ?? Ko, Xo = O((a) => {
3284
+ Yo(a), it?.(a);
3285
+ }, [it]), dn = Ci(o, e, lo, Ue), zn = Ue && dn.isValid ? dn.pivotRows : o, dt = Ue && dn.isValid ? dn.pivotColumns : e, [qo, so] = Z(null);
3286
3286
  te(() => {
3287
3287
  so(null);
3288
- }, [it]);
3288
+ }, [st]);
3289
3289
  const [Jo, Qo] = Z(
3290
3290
  () => yt?.pagination?.paginationModel ?? I
3291
- ), zn = n.paginationModel !== void 0, me = zn ? I : Jo, cn = O((a) => {
3292
- zn || Qo(a), j?.(a);
3293
- }, [zn, j]), [Zo, ao] = Z([]), en = u !== void 0, co = en ? u : Zo, Le = ce(() => new Set(co), [co]), un = g, It = ne(null), er = ne(null), gn = ne(null), tr = O((a) => a.id, []), fn = r || tr, [et, Wt] = Z(null), Ft = O((a) => {
3294
- Yn.current?.classList.toggle("ogx--kb", a);
3291
+ ), Bn = n.paginationModel !== void 0, me = Bn ? I : Jo, cn = O((a) => {
3292
+ Bn || Qo(a), j?.(a);
3293
+ }, [Bn, j]), [Zo, ao] = Z([]), en = u !== void 0, co = en ? u : Zo, Le = ce(() => new Set(co), [co]), un = g, It = ne(null), er = ne(null), gn = ne(null), tr = O((a) => a.id, []), fn = r || tr, [et, Wt] = Z(null), Ft = O((a) => {
3294
+ _n.current?.classList.toggle("ogx--kb", a);
3295
3295
  }, []), uo = ne(le);
3296
3296
  uo.current = le;
3297
3297
  const go = ne(null), fo = ne(null), nr = O((a) => {
@@ -3299,9 +3299,9 @@ function tl(n) {
3299
3299
  const R = fo.current?.getNodePath(a.id) || [a.groupingKey];
3300
3300
  go.current?.(a.id, R);
3301
3301
  }
3302
- }, [ve]), at = ii({
3303
- rows: An,
3304
- columns: st,
3302
+ }, [ve]), ct = ii({
3303
+ rows: zn,
3304
+ columns: dt,
3305
3305
  rowHeight: i,
3306
3306
  headerHeight: l,
3307
3307
  rowCount: Pe,
@@ -3310,72 +3310,72 @@ function tl(n) {
3310
3310
  }), {
3311
3311
  state: ge,
3312
3312
  apiRef: At,
3313
- setRows: Bn,
3313
+ setRows: $n,
3314
3314
  setColumns: ho,
3315
3315
  setScroll: po,
3316
3316
  setDimensions: xo,
3317
3317
  setDataSourceLoading: or,
3318
3318
  setDataSourceError: rr,
3319
3319
  setRowCount: ir
3320
- } = at;
3320
+ } = ct;
3321
3321
  te(() => {
3322
- Pn && (Pn.current = At.current);
3323
- }, [Pn, At]);
3322
+ Mn && (Mn.current = At.current);
3323
+ }, [Mn, At]);
3324
3324
  const { copySelectedRows: mo } = ji({
3325
3325
  selectedRowIds: Le,
3326
- columns: st,
3326
+ columns: dt,
3327
3327
  getVisibleRows: () => At.current.getVisibleRows(),
3328
3328
  getRowId: fn
3329
3329
  });
3330
3330
  te(() => {
3331
3331
  At.current.copySelectedRows = mo, At.current.getSelectedRows = () => Array.from(Le);
3332
3332
  }, [mo, Le, At]);
3333
- const lr = ge.dataSource.loading, tn = Q || lr, nn = ce(() => ge.rows.allRows.map((a) => ge.rows.idRowsLookup.get(a)), [ge.rows]), $n = hi({
3333
+ const lr = ge.dataSource.loading, tn = Q || lr, nn = ce(() => ge.rows.allRows.map((a) => ge.rows.idRowsLookup.get(a)), [ge.rows]), Dn = hi({
3334
3334
  rows: nn,
3335
3335
  getRowId: fn,
3336
3336
  getTreeDataPath: v,
3337
3337
  treeData: ve,
3338
3338
  defaultGroupingExpansionDepth: D,
3339
3339
  filterModel: Xe,
3340
- sortModel: rt,
3340
+ sortModel: lt,
3341
3341
  onRowExpansionChange: nr
3342
3342
  });
3343
3343
  te(() => {
3344
- fo.current = $n;
3345
- }, [$n]);
3344
+ fo.current = Dn;
3345
+ }, [Dn]);
3346
3346
  const sr = xi({
3347
3347
  rows: nn,
3348
3348
  getRowId: fn,
3349
- rowGroupingModel: Ln,
3350
- aggregationModel: it,
3349
+ rowGroupingModel: Tn,
3350
+ aggregationModel: st,
3351
3351
  defaultGroupingExpansionDepth: D,
3352
3352
  filterModel: Xe,
3353
- sortModel: rt,
3354
- getAggregationPosition: X
3353
+ sortModel: lt,
3354
+ getAggregationPosition: q
3355
3355
  }), Ge = mi({
3356
3356
  rows: nn,
3357
3357
  getRowId: fn,
3358
3358
  processRowUpdate: M,
3359
3359
  onProcessRowUpdateError: ue,
3360
3360
  onRowChange: (a) => {
3361
- const { dispatch: R } = at, $ = Array.from(at.state.rows.idRowsLookup.values()).map(
3361
+ const { dispatch: R } = ct, $ = Array.from(ct.state.rows.idRowsLookup.values()).map(
3362
3362
  (ee) => ee.id === a.id ? a : ee
3363
3363
  );
3364
3364
  R({ type: "SET_ROWS", payload: $ });
3365
3365
  }
3366
- }), Dn = ve, zt = !!(Ln && Ln.length > 0), hn = Dn || zt, Ve = Dn ? $n : zt ? sr : null, Te = N && !zt, pn = O((a) => {
3366
+ }), Hn = ve, zt = !!(Tn && Tn.length > 0), hn = Hn || zt, Ve = Hn ? Dn : zt ? sr : null, Te = N && !zt, pn = O((a) => {
3367
3367
  const { row: R, id: P } = a;
3368
3368
  if (hn && R._hasChildren) {
3369
3369
  Ve?.toggleExpansion(P);
3370
3370
  return;
3371
3371
  }
3372
3372
  h?.(a);
3373
- }, [hn, Ve, h]), Re = ce(() => hn ? st.map((a, R) => R === 0 ? {
3373
+ }, [hn, Ve, h]), Re = ce(() => hn ? dt.map((a, R) => R === 0 ? {
3374
3374
  ...a,
3375
3375
  renderCell: (P) => {
3376
3376
  const { _treeDepth: $, _hasChildren: ee, _isExpanded: se, _groupingField: he, _groupingValue: ze, _descendantCount: Be } = P.row, be = ($ || 0) * 24;
3377
3377
  let de = a.renderCell ? a.renderCell(P) : P.value;
3378
- return Dn && ee && P.row._isGroupRow && (de = /* @__PURE__ */ t.jsxs("div", { className: "ogx__group-cell-content", children: [
3378
+ return Hn && ee && P.row._isGroupRow && (de = /* @__PURE__ */ t.jsxs("div", { className: "ogx__group-cell-content", children: [
3379
3379
  P.value,
3380
3380
  Be !== void 0 && Be > 0 ? ` (${Be})` : ""
3381
3381
  ] })), zt && ee && he && (de = /* @__PURE__ */ t.jsxs("div", { className: "ogx__group-cell-content", children: [
@@ -3436,50 +3436,50 @@ function tl(n) {
3436
3436
  const { _hasChildren: $, _groupingField: ee } = P.row;
3437
3437
  return zt && $ ? a.field === ee ? null : P.value !== void 0 && P.value !== null ? a.renderCell ? a.renderCell(P) : P.value : null : a.renderCell ? a.renderCell(P) : P.value;
3438
3438
  }
3439
- }) : st, [st, hn, zt, Ve]), Hn = vi({
3439
+ }) : dt, [dt, hn, zt, Ve]), Gn = vi({
3440
3440
  dataSource: le,
3441
- sortModel: rt,
3441
+ sortModel: lt,
3442
3442
  filterModel: Xe,
3443
3443
  paginationModel: me,
3444
3444
  paginationMode: z,
3445
3445
  sortingMode: _e,
3446
3446
  filterMode: ot,
3447
- aggregationModel: it,
3448
- setRows: Bn,
3447
+ aggregationModel: st,
3448
+ setRows: $n,
3449
3449
  setRowCount: ir,
3450
3450
  setDataSourceLoading: or,
3451
3451
  setDataSourceError: rr,
3452
3452
  onAggregationResults: so
3453
3453
  });
3454
3454
  te(() => {
3455
- Hn.fetchChildren && (go.current = Hn.fetchChildren);
3456
- }, [Hn.fetchChildren]);
3455
+ Gn.fetchChildren && (go.current = Gn.fetchChildren);
3456
+ }, [Gn.fetchChildren]);
3457
3457
  const [qe, ar] = Z(
3458
3458
  () => yt?.columns?.columnWidths ?? {}
3459
3459
  ), [dr, xn] = Z(
3460
- () => yt?.columns?.columnOrder ?? st.map((a) => a.field)
3460
+ () => yt?.columns?.columnOrder ?? dt.map((a) => a.field)
3461
3461
  ), Ct = A || dr;
3462
3462
  te(() => {
3463
- le || Bn(An);
3464
- }, [An, Bn, le]), te(() => {
3465
- ho(st);
3466
- }, [st, ho]), te(() => {
3467
- Ue && xn(st.map((a) => a.field));
3468
- }, [Ue, st]);
3463
+ le || $n(zn);
3464
+ }, [zn, $n, le]), te(() => {
3465
+ ho(dt);
3466
+ }, [dt, ho]), te(() => {
3467
+ Ue && xn(dt.map((a) => a.field));
3468
+ }, [Ue, dt]);
3469
3469
  const Bt = ce(() => {
3470
- if (q) return Re;
3470
+ if (Y) return Re;
3471
3471
  const a = new Map(Ct.map((R, P) => [R, P]));
3472
3472
  return [...Re].sort((R, P) => {
3473
3473
  const $ = a.get(R.field) ?? Re.indexOf(R), ee = a.get(P.field) ?? Re.indexOf(P);
3474
3474
  return $ - ee;
3475
3475
  });
3476
- }, [Re, Ct, q]), wo = ce(() => Bt.filter((a) => Ze[a.field] !== !1), [Bt, Ze]), $t = li({
3476
+ }, [Re, Ct, Y]), wo = ce(() => Bt.filter((a) => Ze[a.field] !== !1), [Bt, Ze]), $t = li({
3477
3477
  columns: Bt,
3478
3478
  onColumnOrderChange: O((a) => {
3479
3479
  const { oldIndex: R, targetIndex: P } = a, $ = [...Ct], [ee] = $.splice(R, 1);
3480
3480
  $.splice(P, 0, ee), A || xn($), U?.(a);
3481
3481
  }, [Ct, A, U]),
3482
- disableColumnReorder: q
3482
+ disableColumnReorder: Y
3483
3483
  }), [cr, ur] = Z(/* @__PURE__ */ new Set()), kt = p ?? cr, tt = !!E, on = O((a) => {
3484
3484
  const R = new Set(kt);
3485
3485
  R.has(a) ? R.delete(a) : R.add(a), p === void 0 && ur(R), S?.(R);
@@ -3488,39 +3488,39 @@ function tl(n) {
3488
3488
  return G && a.push({ field: "__reorder_col__" }), tt && a.push({ field: "__expand_col__" }), s && a.push({ field: "__checkbox_col__" }), [...a, ...Bt];
3489
3489
  }, [Bt, s, tt, G]), gr = O((a, R) => {
3490
3490
  ar((P) => ({ ...P, [a]: R }));
3491
- }, []), Gn = ne(He);
3492
- Gn.current = He, te(() => {
3493
- if (!Gn.current) return;
3491
+ }, []), Vn = ne(He);
3492
+ Vn.current = He, te(() => {
3493
+ if (!Vn.current) return;
3494
3494
  const a = {
3495
- sorting: { sortModel: rt },
3495
+ sorting: { sortModel: lt },
3496
3496
  filter: { filterModel: Xe },
3497
3497
  pagination: { paginationModel: me },
3498
3498
  columns: {
3499
3499
  columnWidths: qe,
3500
3500
  columnOrder: Ct,
3501
3501
  columnVisibilityModel: Ze,
3502
- pinnedColumns: lt
3502
+ pinnedColumns: at
3503
3503
  }
3504
3504
  };
3505
- Gn.current(a);
3505
+ Vn.current(a);
3506
3506
  }, [
3507
- rt,
3507
+ lt,
3508
3508
  Xe,
3509
3509
  me,
3510
3510
  qe,
3511
3511
  Ct,
3512
3512
  Ze,
3513
- lt
3513
+ at
3514
3514
  ]);
3515
- const mn = ce(() => nn, [nn]), Ke = ce(() => Ve ? Ve.getVisibleRows() || [] : ot === "server" && le ? mn : ui(mn, Xe), [mn, Xe, Ve, ot, le]), { top: Je, center: Dt, bottom: dt } = ce(() => Ve ? { top: [], center: Ke, bottom: [] } : Pr(Ke, y), [Ke, y, Ve]), Oe = ce(() => Ve || _e === "server" && le ? Dt : fi(Dt, rt), [Dt, rt, Ve, _e, le]), xt = ce(() => {
3515
+ const mn = ce(() => nn, [nn]), Ke = ce(() => Ve ? Ve.getVisibleRows() || [] : ot === "server" && le ? mn : ui(mn, Xe), [mn, Xe, Ve, ot, le]), { top: Je, center: Dt, bottom: ut } = ce(() => Ve ? { top: [], center: Ke, bottom: [] } : Pr(Ke, y), [Ke, y, Ve]), Oe = ce(() => Ve || _e === "server" && le ? Dt : fi(Dt, lt), [Dt, lt, Ve, _e, le]), xt = ce(() => {
3516
3516
  if (!Te || z === "server" && le)
3517
3517
  return Oe;
3518
3518
  const a = me.page * me.pageSize, R = a + me.pageSize;
3519
3519
  return Oe.slice(a, R);
3520
3520
  }, [Oe, Te, me.page, me.pageSize, z, le]);
3521
3521
  te(() => {
3522
- at.apiRef.current.getVisibleRows = () => Oe, at.apiRef.current.getVisibleColumns = () => Re;
3523
- }, [Oe, Re, at.apiRef]);
3522
+ ct.apiRef.current.getVisibleRows = () => Oe, ct.apiRef.current.getVisibleColumns = () => Re;
3523
+ }, [Oe, Re, ct.apiRef]);
3524
3524
  const Ht = si({
3525
3525
  rows: Te ? xt : Oe,
3526
3526
  getRowId: (a) => a.id,
@@ -3529,7 +3529,7 @@ function tl(n) {
3529
3529
  }), Ee = ce(() => {
3530
3530
  if (Ve)
3531
3531
  return Dt;
3532
- const a = Te ? xt : Oe, R = [...Je, ...a, ...dt];
3532
+ const a = Te ? xt : Oe, R = [...Je, ...a, ...ut];
3533
3533
  if (z === "infinite" && ge.dataSource.loading && R.length > 0) {
3534
3534
  const P = Math.min(me.pageSize, 20), $ = Array.from({ length: P }, (ee, se) => ({
3535
3535
  id: `__skeleton_${se}__`,
@@ -3542,7 +3542,7 @@ function tl(n) {
3542
3542
  Je,
3543
3543
  xt,
3544
3544
  Oe,
3545
- dt,
3545
+ ut,
3546
3546
  Te,
3547
3547
  Ve,
3548
3548
  Dt,
@@ -3553,19 +3553,19 @@ function tl(n) {
3553
3553
  Ee,
3554
3554
  Ce,
3555
3555
  qe
3556
- ), { aggregationResult: Vn } = _i({
3556
+ ), { aggregationResult: Un } = _i({
3557
3557
  rows: Ke,
3558
- aggregationModel: it,
3558
+ aggregationModel: st,
3559
3559
  isServerSide: !!(le && (z === "server" || _e === "server")),
3560
3560
  dataSource: le,
3561
3561
  filterModel: Xe,
3562
- sortModel: rt,
3562
+ sortModel: lt,
3563
3563
  serverAggregationResults: qo
3564
- }), wn = Object.keys(it).length > 0;
3564
+ }), wn = Object.keys(st).length > 0;
3565
3565
  te(() => {
3566
- at.apiRef.current.getAggregationResult = () => wn ? Vn : null, at.apiRef.current.getAggregationModel = () => wn ? it : null;
3567
- }, [Vn, it, wn, at.apiRef]);
3568
- const Un = ce(() => {
3566
+ ct.apiRef.current.getAggregationResult = () => wn ? Un : null, ct.apiRef.current.getAggregationModel = () => wn ? st : null;
3567
+ }, [Un, st, wn, ct.apiRef]);
3568
+ const Kn = ce(() => {
3569
3569
  const a = i, R = Te ? xt : Oe, P = R.map((T, J) => {
3570
3570
  let re = a;
3571
3571
  if (kt.has(T.id)) {
@@ -3573,9 +3573,9 @@ function tl(n) {
3573
3573
  re += typeof Ie == "number" ? Ie : parseInt(String(Ie), 10) || 200;
3574
3574
  }
3575
3575
  return re;
3576
- }), $ = P.reduce((T, J, re) => (T.push((T[re - 1] || 0) + J), T), []), se = (z === "infinite" && ge.dataSource.loading && R.length > 0 ? Math.min(me.pageSize, 20) : 0) * a, he = ($[$.length - 1] || 0) + se, ze = Je.length * a, Be = dt.length * a, ae = [], be = [], de = [], V = [];
3576
+ }), $ = P.reduce((T, J, re) => (T.push((T[re - 1] || 0) + J), T), []), se = (z === "infinite" && ge.dataSource.loading && R.length > 0 ? Math.min(me.pageSize, 20) : 0) * a, he = ($[$.length - 1] || 0) + se, ze = Je.length * a, Be = ut.length * a, ae = [], be = [], de = [], V = [];
3577
3577
  wo.forEach((T) => {
3578
- const J = Nn(T.field, lt);
3578
+ const J = In(T.field, at);
3579
3579
  J === "left" ? ae.push(T) : J === "right" ? be.push(T) : de.push(T);
3580
3580
  });
3581
3581
  const we = ge.dimensions.viewportWidth || 1e3, je = (s ? 48 : 0) + (tt ? 48 : 0) + (G ? 48 : 0), ye = (T) => qe[T.field] ?? T.width, We = (T) => {
@@ -3605,7 +3605,7 @@ function tl(n) {
3605
3605
  }, 0), mt = Math.max(
3606
3606
  we - je - Fe - pe,
3607
3607
  fe
3608
- ), ct = [], $e = [], Ne = [];
3608
+ ), gt = [], $e = [], Ne = [];
3609
3609
  let De = 0;
3610
3610
  de.forEach((T) => {
3611
3611
  const J = Object.prototype.hasOwnProperty.call(qe, T.field), re = We(ye(T));
@@ -3613,14 +3613,14 @@ function tl(n) {
3613
3613
  Ne.push({ col: T, flex: T.flex }), De += T.flex;
3614
3614
  return;
3615
3615
  }
3616
- re.type === "fixed" ? ct.push({ col: T, width: re.value }) : re.type === "percentage" ? $e.push({ col: T, percentage: re.value }) : (Ne.push({ col: T, flex: 1 }), De += 1);
3616
+ re.type === "fixed" ? gt.push({ col: T, width: re.value }) : re.type === "percentage" ? $e.push({ col: T, percentage: re.value }) : (Ne.push({ col: T, flex: 1 }), De += 1);
3617
3617
  });
3618
- const Ye = ct.reduce((T, { width: J }) => T + J, 0);
3618
+ const Ye = gt.reduce((T, { width: J }) => T + J, 0);
3619
3619
  let Ae = Math.max(0, mt - Ye);
3620
- const ut = /* @__PURE__ */ new Map();
3620
+ const ft = /* @__PURE__ */ new Map();
3621
3621
  $e.forEach(({ col: T, percentage: J }) => {
3622
3622
  const re = J / 100 * Ae;
3623
- ut.set(T.field, re), Ae -= re;
3623
+ ft.set(T.field, re), Ae -= re;
3624
3624
  }), Ae = Math.max(0, Ae);
3625
3625
  const St = /* @__PURE__ */ new Map(), wt = Ne.map((T) => ({
3626
3626
  ...T,
@@ -3636,7 +3636,7 @@ function tl(n) {
3636
3636
  T++;
3637
3637
  const re = wt.filter((ie) => !ie.frozen);
3638
3638
  if (re.length === 0) break;
3639
- const Ie = re.reduce((ie, gt) => ie + gt.flex, 0), bt = wt.reduce((ie, gt) => gt.frozen ? ie + gt.computedWidth : ie, 0), Xn = Math.max(0, Ae - bt);
3639
+ const Ie = re.reduce((ie, ht) => ie + ht.flex, 0), bt = wt.reduce((ie, ht) => ht.frozen ? ie + ht.computedWidth : ie, 0), Xn = Math.max(0, Ae - bt);
3640
3640
  if (Ie <= 0) {
3641
3641
  re.forEach((ie) => {
3642
3642
  ie.computedWidth = ie.minWidth, ie.frozen = !0;
@@ -3644,29 +3644,29 @@ function tl(n) {
3644
3644
  break;
3645
3645
  }
3646
3646
  const yr = Xn / Ie;
3647
- let _n = 0;
3648
- const yn = [], Cn = [];
3647
+ let yn = 0;
3648
+ const Cn = [], kn = [];
3649
3649
  if (re.forEach((ie) => {
3650
- const gt = yr * ie.flex;
3651
- if (gt < ie.minWidth) {
3652
- const qn = ie.minWidth - gt;
3653
- _n += qn, yn.push(ie);
3654
- } else if (gt > ie.maxWidth) {
3655
- const qn = ie.maxWidth - gt;
3656
- _n += qn, Cn.push(ie);
3650
+ const ht = yr * ie.flex;
3651
+ if (ht < ie.minWidth) {
3652
+ const qn = ie.minWidth - ht;
3653
+ yn += qn, Cn.push(ie);
3654
+ } else if (ht > ie.maxWidth) {
3655
+ const qn = ie.maxWidth - ht;
3656
+ yn += qn, kn.push(ie);
3657
3657
  } else
3658
- ie.computedWidth = gt;
3659
- }), yn.length === 0 && Cn.length === 0) {
3658
+ ie.computedWidth = ht;
3659
+ }), Cn.length === 0 && kn.length === 0) {
3660
3660
  re.forEach((ie) => ie.frozen = !0);
3661
3661
  break;
3662
3662
  }
3663
- _n > 0 ? yn.forEach((ie) => {
3663
+ yn > 0 ? Cn.forEach((ie) => {
3664
3664
  ie.computedWidth = ie.minWidth, ie.frozen = !0;
3665
- }) : _n < 0 ? Cn.forEach((ie) => {
3665
+ }) : yn < 0 ? kn.forEach((ie) => {
3666
3666
  ie.computedWidth = ie.maxWidth, ie.frozen = !0;
3667
- }) : (yn.forEach((ie) => {
3667
+ }) : (Cn.forEach((ie) => {
3668
3668
  ie.computedWidth = ie.minWidth, ie.frozen = !0;
3669
- }), Cn.forEach((ie) => {
3669
+ }), kn.forEach((ie) => {
3670
3670
  ie.computedWidth = ie.maxWidth, ie.frozen = !0;
3671
3671
  }));
3672
3672
  }
@@ -3677,11 +3677,11 @@ function tl(n) {
3677
3677
  if (St.has(T.field))
3678
3678
  J = St.get(T.field);
3679
3679
  else {
3680
- const re = ct.find((bt) => bt.col.field === T.field), Ie = $e.find((bt) => bt.col.field === T.field);
3680
+ const re = gt.find((bt) => bt.col.field === T.field), Ie = $e.find((bt) => bt.col.field === T.field);
3681
3681
  if (re)
3682
3682
  J = re.width;
3683
3683
  else if (Ie) {
3684
- const bt = ut.get(T.field) || 0;
3684
+ const bt = ft.get(T.field) || 0;
3685
3685
  J = Math.max(T.minWidth ?? 50, bt || 100);
3686
3686
  } else
3687
3687
  J = 100;
@@ -3727,7 +3727,7 @@ function tl(n) {
3727
3727
  unpinnedTotalWidth: nt,
3728
3728
  systemColumnsWidth: je,
3729
3729
  pinnedTopRowsLength: Je.length,
3730
- pinnedBottomRowsLength: dt.length,
3730
+ pinnedBottomRowsLength: ut.length,
3731
3731
  unpinnedRowsLength: R.length
3732
3732
  };
3733
3733
  }, [
@@ -3738,13 +3738,13 @@ function tl(n) {
3738
3738
  kt,
3739
3739
  k,
3740
3740
  Je.length,
3741
- dt.length,
3741
+ ut.length,
3742
3742
  kt,
3743
3743
  k,
3744
3744
  Je.length,
3745
- dt.length,
3745
+ ut.length,
3746
3746
  wo,
3747
- lt,
3747
+ at,
3748
3748
  qe,
3749
3749
  ge.dimensions.viewportWidth,
3750
3750
  s,
@@ -3773,7 +3773,7 @@ function tl(n) {
3773
3773
  unpinnedRowsHeight: V,
3774
3774
  rowHeights: we,
3775
3775
  unpinnedRowsLength: je
3776
- } = Un, ye = ge.virtualization.scrollLeft, We = ge.virtualization.scrollTop, Fe = ge.dimensions.viewportWidth || 1e3, pe = d ? be + V + de + 50 : ge.dimensions.viewportHeight || 600, fe = 6, mt = Math.max(0, ye - se), ct = ye + Fe - se;
3776
+ } = Kn, ye = ge.virtualization.scrollLeft, We = ge.virtualization.scrollTop, Fe = ge.dimensions.viewportWidth || 1e3, pe = d ? be + V + de + 50 : ge.dimensions.viewportHeight || 600, fe = 6, mt = Math.max(0, ye - se), gt = ye + Fe - se;
3777
3777
  let $e = 0, Ne = R.length - 1, De = 0, Ye = a.length - 1;
3778
3778
  for (; De <= Ye; ) {
3779
3779
  const ke = De + Ye >>> 1;
@@ -3781,17 +3781,17 @@ function tl(n) {
3781
3781
  }
3782
3782
  $e = Math.max(0, De - fe);
3783
3783
  for (let ke = $e; ke < a.length; ke++) {
3784
- if ((ke === 0 ? 0 : a[ke - 1]) > ct) {
3784
+ if ((ke === 0 ? 0 : a[ke - 1]) > gt) {
3785
3785
  Ne = Math.min(R.length - 1, ke + fe);
3786
3786
  break;
3787
3787
  }
3788
3788
  Ne = Math.min(R.length - 1, ke + fe);
3789
3789
  }
3790
- const Ae = $e > 0 ? a[$e - 1] : 0, ut = ze - a[Ne], St = [
3790
+ const Ae = $e > 0 ? a[$e - 1] : 0, ft = ze - a[Ne], St = [
3791
3791
  ...P,
3792
3792
  ...Ae > 0 ? [{ field: "__spacer_left__", width: Ae, isSpacer: !0 }] : [],
3793
3793
  ...R.slice($e, Ne + 1),
3794
- ...ut > 0 ? [{ field: "__spacer_right__", width: ut, isSpacer: !0 }] : [],
3794
+ ...ft > 0 ? [{ field: "__spacer_right__", width: ft, isSpacer: !0 }] : [],
3795
3795
  ...$
3796
3796
  ], rn = Fe > 0 && ee > Fe ? 16 : 0, Ut = be + V + de + rn + 2, vt = 5;
3797
3797
  let Qe = 0, Pt = je - 1, Kt = 0, jt = 0, nt = ae.length - 1;
@@ -3831,7 +3831,7 @@ function tl(n) {
3831
3831
  }
3832
3832
  };
3833
3833
  }, [
3834
- Un,
3834
+ Kn,
3835
3835
  ge.virtualization.scrollTop,
3836
3836
  ge.virtualization.scrollLeft,
3837
3837
  ge.dimensions.viewportHeight,
@@ -3870,8 +3870,8 @@ function tl(n) {
3870
3870
  a && (R = mn.map((P) => P.id)), en || ao(R), un?.(R);
3871
3871
  }, [o, en, un]), vo = O((a, R) => {
3872
3872
  const P = R ? [{ field: a, sort: R }] : [];
3873
- Mn || Fo(P), m?.(P);
3874
- }, [Mn, m]), Kn = O((a) => {
3873
+ Ln || Fo(P), m?.(P);
3874
+ }, [Ln, m]), Yn = O((a) => {
3875
3875
  Ft(!1), Wt({ id: a.row.id, field: a.field }), gn.current?.focus({ preventScroll: !0 }), x?.(a);
3876
3876
  }, [x, Ft]), bo = ne(Ge.editingCell);
3877
3877
  te(() => {
@@ -3879,7 +3879,7 @@ function tl(n) {
3879
3879
  a && !R && gn.current?.focus({ preventScroll: !0 }), bo.current = Ge.editingCell;
3880
3880
  }, [Ge.editingCell]);
3881
3881
  const _o = ce(() => {
3882
- const { firstRowIndex: a, lastRowIndex: R } = Se.renderContext, P = Je.length, $ = Je.map((de, V) => ({ row: de, rowIndex: V })), ee = dt.map((de, V) => ({
3882
+ const { firstRowIndex: a, lastRowIndex: R } = Se.renderContext, P = Je.length, $ = Je.map((de, V) => ({ row: de, rowIndex: V })), ee = ut.map((de, V) => ({
3883
3883
  row: de,
3884
3884
  rowIndex: P + (Te ? xt.length : Oe.length) + V
3885
3885
  })), se = Math.max(0, a - P), he = Math.min(
@@ -3893,7 +3893,7 @@ function tl(n) {
3893
3893
  }, [
3894
3894
  Se.renderContext,
3895
3895
  Je,
3896
- dt,
3896
+ ut,
3897
3897
  xt,
3898
3898
  Oe,
3899
3899
  Te,
@@ -3941,7 +3941,7 @@ function tl(n) {
3941
3941
  a.preventDefault();
3942
3942
  const V = Ce.find((we) => we.field === P);
3943
3943
  if (V && V.sortable !== !1) {
3944
- const we = rt.find((ye) => ye.field === P);
3944
+ const we = lt.find((ye) => ye.field === P);
3945
3945
  let je = "asc";
3946
3946
  we && (we.sort === "asc" ? je = "desc" : je = null), vo(P, je);
3947
3947
  }
@@ -3960,16 +3960,16 @@ function tl(n) {
3960
3960
  return We && ye !== 0 && (ye > 0 && fe >= Ce.length ? (fe = 0, pe++) : ye < 0 && fe < 0 && (fe = Ce.length - 1, pe--)), !We && (fe < 0 || fe >= Ce.length) || pe < (Fe ? -1 : 0) || pe >= Ee.length ? null : { r: pe, c: fe };
3961
3961
  }, Be = (V, we, je, ye, We, Fe = !1) => {
3962
3962
  let pe = V, fe = we, mt = 0;
3963
- const ct = Ee.length * Ce.length + Ce.length;
3964
- for (; mt < ct; ) {
3963
+ const gt = Ee.length * Ce.length + Ce.length;
3964
+ for (; mt < gt; ) {
3965
3965
  if (mt++, pe += je, fe += ye, ye !== 0)
3966
3966
  ye > 0 ? fe >= Ce.length && (fe = 0, pe++) : fe < 0 && (fe = Ce.length - 1, pe--);
3967
3967
  else if (fe < 0 || fe >= Ce.length) return null;
3968
3968
  if (pe < -1 || pe >= Ee.length) return null;
3969
3969
  if (pe === -1) {
3970
3970
  if (!Fe) continue;
3971
- const Ae = Ce[fe], ut = Ae.sortable !== !1;
3972
- if (["__checkbox_col__"].includes(Ae.field) || ut) return { r: pe, c: fe };
3971
+ const Ae = Ce[fe], ft = Ae.sortable !== !1;
3972
+ if (["__checkbox_col__"].includes(Ae.field) || ft) return { r: pe, c: fe };
3973
3973
  continue;
3974
3974
  }
3975
3975
  const $e = Ee[pe], Ne = Ce[fe], De = ["__checkbox_col__", "__expand_col__", "__reorder_col__"].includes(Ne.field);
@@ -4027,19 +4027,19 @@ function tl(n) {
4027
4027
  Wt({ id: we.id, field: V.field });
4028
4028
  }
4029
4029
  if (It.current) {
4030
- const { cumulativeHeights: we, pinnedTopHeight: je } = Se, { clientHeight: ye, clientWidth: We, scrollTop: Fe, scrollLeft: pe } = It.current, fe = ae === 0 ? 0 : we[ae - 1], mt = we[ae], ct = je, $e = Fe + ct, Ne = Fe + ye;
4030
+ const { cumulativeHeights: we, pinnedTopHeight: je } = Se, { clientHeight: ye, clientWidth: We, scrollTop: Fe, scrollLeft: pe } = It.current, fe = ae === 0 ? 0 : we[ae - 1], mt = we[ae], gt = je, $e = Fe + gt, Ne = Fe + ye;
4031
4031
  let De = Fe;
4032
- if (fe < $e ? De = Math.max(0, fe - ct) : mt > Ne && (De = mt - ye), De !== Fe && (It.current.scrollTop = De), Se.columnMetrics) {
4033
- const { leftPinnedWidth: Ye, rightPinnedWidth: Ae, unpinnedAccWidths: ut, unpinnedCols: St, totalSpecialsWidth: wt, pinnedSpecialsWidth: rn } = Se.columnMetrics, Ut = V.field, vt = St.findIndex((Qe) => Qe.field === Ut);
4032
+ if (fe < $e ? De = Math.max(0, fe - gt) : mt > Ne && (De = mt - ye), De !== Fe && (It.current.scrollTop = De), Se.columnMetrics) {
4033
+ const { leftPinnedWidth: Ye, rightPinnedWidth: Ae, unpinnedAccWidths: ft, unpinnedCols: St, totalSpecialsWidth: wt, pinnedSpecialsWidth: rn } = Se.columnMetrics, Ut = V.field, vt = St.findIndex((Qe) => Qe.field === Ut);
4034
4034
  if (vt !== -1) {
4035
- const Qe = wt + Ye + (vt > 0 ? ut[vt - 1] : 0), Pt = wt + Ye + ut[vt], Kt = pe + rn + Ye, jt = pe + We - Ae;
4035
+ const Qe = wt + Ye + (vt > 0 ? ft[vt - 1] : 0), Pt = wt + Ye + ft[vt], Kt = pe + rn + Ye, jt = pe + We - Ae;
4036
4036
  let nt = pe;
4037
4037
  Qe < Kt ? nt = Math.max(0, Qe - rn - Ye) : Pt > jt && (nt = Pt - We + Ae), nt !== pe && (It.current.scrollLeft = nt);
4038
4038
  }
4039
4039
  }
4040
4040
  }
4041
4041
  }
4042
- }, [et, Ee, Ce, Ge, Se, Le, Vt, on]), br = xe.useMemo(() => Re.some((a) => !!a.rowSpan), [Re]), [vn, bn] = xe.useState(!1), Yn = xe.useRef(null);
4042
+ }, [et, Ee, Ce, Ge, Se, Le, Vt, on]), br = xe.useMemo(() => Re.some((a) => !!a.rowSpan), [Re]), [vn, bn] = xe.useState(!1), _n = xe.useRef(null);
4043
4043
  return te(() => {
4044
4044
  if (!vn || Me?.toolbar) return;
4045
4045
  function a(R) {
@@ -4050,11 +4050,11 @@ function tl(n) {
4050
4050
  }, [vn, Me?.toolbar]), /* @__PURE__ */ t.jsxs(
4051
4051
  "div",
4052
4052
  {
4053
- ref: Yn,
4053
+ ref: _n,
4054
4054
  className: `ogx ${Qt} ${d ? "ogx--auto-height" : ""} ${br ? "ogx--row-spanning" : ""} ${an ? "ogx--list-view" : ""}`,
4055
4055
  style: {
4056
4056
  ...Tt,
4057
- height: Y ?? Tt?.height,
4057
+ height: X ?? Tt?.height,
4058
4058
  "--ogx-row-height": `${i}px`,
4059
4059
  "--ogx-header-height": `${l}px`
4060
4060
  },
@@ -4062,11 +4062,11 @@ function tl(n) {
4062
4062
  children: [
4063
4063
  io && (() => {
4064
4064
  const a = {
4065
- apiRef: at.apiRef,
4065
+ apiRef: ct.apiRef,
4066
4066
  columns: Re,
4067
- aggregationModel: it,
4067
+ aggregationModel: st,
4068
4068
  onAggregationModelChange: $o,
4069
- ...Ue ? {
4069
+ ...Ue || rt || it ? {
4070
4070
  pivotModel: lo,
4071
4071
  onPivotModelChange: Xo
4072
4072
  } : {},
@@ -4074,7 +4074,7 @@ function tl(n) {
4074
4074
  onFilterModelChange: f,
4075
4075
  columnVisibilityModel: Ze,
4076
4076
  onColumnVisibilityModelChange: Zt,
4077
- onColumnReorder: (R, P) => {
4077
+ onColumnReorder: Y ? void 0 : (R, P) => {
4078
4078
  const $ = [...Ct], ee = $.indexOf(R), se = $.indexOf(P);
4079
4079
  if (ee === -1 || se === -1) return;
4080
4080
  const he = [...$];
@@ -4084,7 +4084,7 @@ function tl(n) {
4084
4084
  },
4085
4085
  forceColumnsOpen: vn,
4086
4086
  onColumnsPanelClose: () => bn(!1),
4087
- ...ft?.toolbar
4087
+ ...pt?.toolbar
4088
4088
  };
4089
4089
  return /* @__PURE__ */ t.jsx(io, { ...a });
4090
4090
  })(),
@@ -4094,7 +4094,7 @@ function tl(n) {
4094
4094
  {
4095
4095
  id: "ogx-standalone-col-panel",
4096
4096
  style: (() => {
4097
- const a = Yn.current?.getBoundingClientRect();
4097
+ const a = _n.current?.getBoundingClientRect();
4098
4098
  return {
4099
4099
  position: "fixed",
4100
4100
  top: a ? a.top + 8 : 16,
@@ -4153,7 +4153,7 @@ function tl(n) {
4153
4153
  R.hideable !== !1 && (a[R.field] = !1);
4154
4154
  }), Zt(a);
4155
4155
  },
4156
- onColumnReorder: (a, R) => {
4156
+ onColumnReorder: Y ? void 0 : (a, R) => {
4157
4157
  const P = [...Ct], $ = P.indexOf(a), ee = P.indexOf(R);
4158
4158
  if ($ === -1 || ee === -1) return;
4159
4159
  const se = [...P];
@@ -4164,7 +4164,7 @@ function tl(n) {
4164
4164
  ]
4165
4165
  }
4166
4166
  ),
4167
- document.body
4167
+ _n.current?.closest(".ogx-theme-provider") || document.body
4168
4168
  ),
4169
4169
  an && ro && /* @__PURE__ */ t.jsxs(
4170
4170
  "div",
@@ -4186,7 +4186,7 @@ function tl(n) {
4186
4186
  /* @__PURE__ */ t.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
4187
4187
  /* @__PURE__ */ t.jsx("path", { d: "M3 9h18M9 21V9" })
4188
4188
  ] }),
4189
- In
4189
+ Pn
4190
4190
  ] }) : Ee.map((a, R) => /* @__PURE__ */ t.jsx(
4191
4191
  Er,
4192
4192
  {
@@ -4209,7 +4209,7 @@ function tl(n) {
4209
4209
  pageSizeOptions: C,
4210
4210
  onPageChange: ($) => cn({ ...me, page: $ }),
4211
4211
  onPageSizeChange: ($) => cn({ ...me, pageSize: $, page: 0 }),
4212
- ...ft?.pagination
4212
+ ...pt?.pagination
4213
4213
  };
4214
4214
  return /* @__PURE__ */ t.jsx(a, { ...P });
4215
4215
  })()
@@ -4259,11 +4259,11 @@ function tl(n) {
4259
4259
  allSelected: pr,
4260
4260
  someSelected: xr,
4261
4261
  onSelectAll: hr,
4262
- sortModel: rt,
4262
+ sortModel: lt,
4263
4263
  onSort: vo,
4264
4264
  onColumnResize: gr,
4265
4265
  columnWidths: qe,
4266
- pinnedColumns: lt,
4266
+ pinnedColumns: at,
4267
4267
  focusedCell: et,
4268
4268
  onHeaderClick: (a) => {
4269
4269
  Wt({ id: "HEADER", field: a }), Ft(!1), gn.current?.focus({ preventScroll: !0 });
@@ -4278,7 +4278,7 @@ function tl(n) {
4278
4278
  hasDetailPanel: tt,
4279
4279
  pinCheckboxColumn: L,
4280
4280
  pinExpandColumn: B,
4281
- aggregationModel: it,
4281
+ aggregationModel: st,
4282
4282
  onHideColumn: (a) => {
4283
4283
  Zt({
4284
4284
  ...Ze,
@@ -4287,8 +4287,8 @@ function tl(n) {
4287
4287
  },
4288
4288
  onManageColumns: () => bn(!0),
4289
4289
  onPinColumn: (a, R) => {
4290
- const P = [...lt?.left ?? []], $ = [...lt?.right ?? []], ee = P.filter((he) => he !== a), se = $.filter((he) => he !== a);
4291
- Fn(R === "left" ? { left: [...ee, a], right: se } : R === "right" ? { left: ee, right: [...se, a] } : { left: ee, right: se });
4290
+ const P = [...at?.left ?? []], $ = [...at?.right ?? []], ee = P.filter((he) => he !== a), se = $.filter((he) => he !== a);
4291
+ An(R === "left" ? { left: [...ee, a], right: se } : R === "right" ? { left: ee, right: [...se, a] } : { left: ee, right: se });
4292
4292
  }
4293
4293
  }
4294
4294
  ),
@@ -4297,10 +4297,10 @@ function tl(n) {
4297
4297
  /* @__PURE__ */ t.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
4298
4298
  /* @__PURE__ */ t.jsx("path", { d: "M3 9h18M9 21V9" })
4299
4299
  ] }),
4300
- /* @__PURE__ */ t.jsx("span", { children: In })
4300
+ /* @__PURE__ */ t.jsx("span", { children: Pn })
4301
4301
  ] }),
4302
4302
  Je.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "ogx__pinned-rows ogx__pinned-rows--top", role: "rowgroup", children: Je.map((a, R) => /* @__PURE__ */ t.jsx(
4303
- Sn,
4303
+ jn,
4304
4304
  {
4305
4305
  row: a,
4306
4306
  columns: Se.virtualColumns,
@@ -4308,10 +4308,10 @@ function tl(n) {
4308
4308
  isSelected: Le.has(a.id),
4309
4309
  checkboxSelection: s,
4310
4310
  onRowClick: pn,
4311
- onCellClick: Kn,
4311
+ onCellClick: Yn,
4312
4312
  onSelectionChange: Vt,
4313
4313
  columnWidths: qe,
4314
- pinnedColumns: lt,
4314
+ pinnedColumns: at,
4315
4315
  pinnedRows: y,
4316
4316
  hasDetailPanel: tt,
4317
4317
  isDetailPanelExpanded: kt.has(a.id),
@@ -4367,7 +4367,7 @@ function tl(n) {
4367
4367
  })() : _o.filter(({ row: a }) => !Qn(a.id, y)).filter(
4368
4368
  (a, R, P) => R === P.findIndex(($) => $.row.id === a.row.id)
4369
4369
  ).map(({ row: a, rowIndex: R }) => /* @__PURE__ */ t.jsx(
4370
- Sn,
4370
+ jn,
4371
4371
  {
4372
4372
  row: a,
4373
4373
  columns: Se.virtualColumns,
@@ -4375,10 +4375,10 @@ function tl(n) {
4375
4375
  isSelected: Le.has(a.id),
4376
4376
  checkboxSelection: s,
4377
4377
  onRowClick: pn,
4378
- onCellClick: Kn,
4378
+ onCellClick: Yn,
4379
4379
  onSelectionChange: Vt,
4380
4380
  columnWidths: qe,
4381
- pinnedColumns: lt,
4381
+ pinnedColumns: at,
4382
4382
  pinnedRows: y,
4383
4383
  hasDetailPanel: tt,
4384
4384
  isDetailPanelExpanded: kt.has(a.id),
@@ -4406,9 +4406,9 @@ function tl(n) {
4406
4406
  `${a.id}-${Se.totalWidth}`
4407
4407
  )),
4408
4408
  z === "infinite" && ge.dataSource.loading && Oe.length > 0 && (() => {
4409
- const a = Math.min(me.pageSize, 20), R = Un.unpinnedRowsLength;
4409
+ const a = Math.min(me.pageSize, 20), R = Kn.unpinnedRowsLength;
4410
4410
  return /* @__PURE__ */ t.jsx("div", { className: "ogx__skeleton-group", children: Array.from({ length: a }).map((P, $) => /* @__PURE__ */ t.jsx(
4411
- Sn,
4411
+ jn,
4412
4412
  {
4413
4413
  row: { id: `__skeleton_${$}__`, _isSkeleton: !0 },
4414
4414
  columns: Se.virtualColumns,
@@ -4423,8 +4423,8 @@ function tl(n) {
4423
4423
  )
4424
4424
  }
4425
4425
  ),
4426
- dt.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "ogx__pinned-rows ogx__pinned-rows--bottom", role: "rowgroup", children: dt.map((a, R) => /* @__PURE__ */ t.jsx(
4427
- Sn,
4426
+ ut.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "ogx__pinned-rows ogx__pinned-rows--bottom", role: "rowgroup", children: ut.map((a, R) => /* @__PURE__ */ t.jsx(
4427
+ jn,
4428
4428
  {
4429
4429
  row: a,
4430
4430
  columns: Se.virtualColumns,
@@ -4432,10 +4432,10 @@ function tl(n) {
4432
4432
  isSelected: Le.has(a.id),
4433
4433
  checkboxSelection: s,
4434
4434
  onRowClick: pn,
4435
- onCellClick: Kn,
4435
+ onCellClick: Yn,
4436
4436
  onSelectionChange: Vt,
4437
4437
  columnWidths: qe,
4438
- pinnedColumns: lt,
4438
+ pinnedColumns: at,
4439
4439
  pinnedRows: y,
4440
4440
  hasDetailPanel: tt,
4441
4441
  isDetailPanelExpanded: kt.has(a.id),
@@ -4466,7 +4466,7 @@ function tl(n) {
4466
4466
  tt && /* @__PURE__ */ t.jsx("div", { style: { width: 48, flexShrink: 0 } }),
4467
4467
  G && /* @__PURE__ */ t.jsx("div", { style: { width: 48, flexShrink: 0 } }),
4468
4468
  Bt.map((a) => {
4469
- const R = it[a.field], P = Vn[a.field], $ = qe[a.field] ?? (typeof a.width == "number" ? a.width : 120);
4469
+ const R = st[a.field], P = Un[a.field], $ = qe[a.field] ?? (typeof a.width == "number" ? a.width : 120);
4470
4470
  return /* @__PURE__ */ t.jsx(
4471
4471
  "div",
4472
4472
  {
@@ -4502,14 +4502,14 @@ function tl(n) {
4502
4502
  pageSizeOptions: C,
4503
4503
  onPageChange: (P) => cn({ ...me, page: P }),
4504
4504
  onPageSizeChange: (P) => cn({ ...me, pageSize: P, page: 0 }),
4505
- ...ft?.pagination
4505
+ ...pt?.pagination
4506
4506
  };
4507
4507
  return /* @__PURE__ */ t.jsx(a, { ...R });
4508
4508
  })(),
4509
4509
  /* @__PURE__ */ t.jsxs("div", { className: "ogx-aria-live-status", role: "status", "aria-live": "polite", children: [
4510
4510
  tn ? "Loading data..." : "",
4511
4511
  ge.dataSource.error ? `Error: ${ge.dataSource.error.message || "Unknown error"}` : "",
4512
- !Q && !ge.dataSource.error && (Ke.length === 0 ? In : Xe && ((Xe.quickFilterValues?.length || 0) > 0 || (Xe.items?.length || 0) > 0) ? `${Ke.length} ${Ke.length === 1 ? "row" : "rows"} found` : "")
4512
+ !Q && !ge.dataSource.error && (Ke.length === 0 ? Pn : Xe && ((Xe.quickFilterValues?.length || 0) > 0 || (Xe.items?.length || 0) > 0) ? `${Ke.length} ${Ke.length === 1 ? "row" : "rows"} found` : "")
4513
4513
  ] }),
4514
4514
  ge.dataSource.error && /* @__PURE__ */ t.jsxs("div", { className: "ogx-error-overlay", "aria-live": "assertive", role: "alert", children: [
4515
4515
  /* @__PURE__ */ t.jsxs("svg", { width: "56", height: "56", viewBox: "0 0 24 24", fill: "none", stroke: "var(--ogx-color-error)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
@@ -4827,7 +4827,7 @@ function Li({ anchorRef: n, columns: o, model: e, onChange: r, onClose: i }) {
4827
4827
  ]
4828
4828
  }
4829
4829
  );
4830
- return Lt.createPortal(k, document.body);
4830
+ return Lt.createPortal(k, n.current?.closest(".ogx-theme-provider") || document.body);
4831
4831
  }
4832
4832
  function Ti() {
4833
4833
  return /* @__PURE__ */ t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
@@ -4894,7 +4894,7 @@ function Wi({ value: n = "", onChange: o, placeholder: e = "Search...", debounce
4894
4894
  }
4895
4895
  );
4896
4896
  }
4897
- function Rn({
4897
+ function En({
4898
4898
  title: n,
4899
4899
  children: o,
4900
4900
  placement: e = "top",
@@ -5065,7 +5065,7 @@ function zi({
5065
5065
  ]
5066
5066
  }
5067
5067
  );
5068
- return Lt.createPortal(x, document.body);
5068
+ return Lt.createPortal(x, n.current?.closest(".ogx-theme-provider") || document.body);
5069
5069
  }
5070
5070
  function Bi({
5071
5071
  anchorRef: n,
@@ -5118,7 +5118,7 @@ function Bi({
5118
5118
  )
5119
5119
  }
5120
5120
  );
5121
- return Lt.createPortal(c, document.body);
5121
+ return Lt.createPortal(c, n.current?.closest(".ogx-theme-provider") || document.body);
5122
5122
  }
5123
5123
  function $i({
5124
5124
  anchorRef: n,
@@ -5190,7 +5190,7 @@ function $i({
5190
5190
  ]
5191
5191
  }
5192
5192
  );
5193
- return Lt.createPortal(x, document.body);
5193
+ return Lt.createPortal(x, n.current?.closest(".ogx-theme-provider") || document.body);
5194
5194
  }
5195
5195
  const Di = { rowFields: [], columnFields: [], valueFields: [] };
5196
5196
  function ol({
@@ -5214,33 +5214,33 @@ function ol({
5214
5214
  te(() => {
5215
5215
  h && (_(!0), N(!1), j(!1), y(!1));
5216
5216
  }, [h]);
5217
- const E = ne(null), k = ne(null), p = ne(null), S = ne(null), L = r ?? Di, B = L.rowFields.length > 0 || L.columnFields.length > 0 || L.valueFields.length > 0, q = n.filter(
5217
+ const E = ne(null), k = ne(null), p = ne(null), S = ne(null), L = r ?? Di, B = L.rowFields.length > 0 || L.columnFields.length > 0 || L.valueFields.length > 0, Y = n.filter(
5218
5218
  (W) => W.aggregable !== !1 && (W.type === "number" || W.aggregable === !0)
5219
5219
  ), A = Object.keys(o).filter(
5220
5220
  (W) => o[W] && o[W] !== "none"
5221
5221
  ).length, U = O(
5222
5222
  (W, F) => {
5223
5223
  if (!e) return;
5224
- const X = { ...o };
5225
- F === "none" ? delete X[W] : X[W] = F, e(X);
5224
+ const q = { ...o };
5225
+ F === "none" ? delete q[W] : q[W] = F, e(q);
5226
5226
  },
5227
5227
  [o, e]
5228
- ), Y = O(() => {
5228
+ ), X = O(() => {
5229
5229
  e?.({});
5230
5230
  }, [e]), G = O((W) => {
5231
5231
  if (!d) return;
5232
- const X = {
5232
+ const q = {
5233
5233
  ...l || {},
5234
5234
  quickFilterValues: W ? [W] : [],
5235
5235
  items: l?.items || []
5236
5236
  };
5237
- d(X);
5237
+ d(q);
5238
5238
  }, [l, d]), oe = l?.quickFilterValues?.[0] || "", Q = l?.items?.length || 0, ve = new Set(
5239
5239
  n.filter((W) => s[W.field] !== !1).map((W) => W.field)
5240
5240
  ), v = O((W, F) => {
5241
5241
  if (!u) return;
5242
- const X = { ...s, [W]: F };
5243
- u(X);
5242
+ const q = { ...s, [W]: F };
5243
+ u(q);
5244
5244
  }, [s, u]), D = O(() => {
5245
5245
  if (!u) return;
5246
5246
  const W = { ...s };
@@ -5267,7 +5267,7 @@ function ol({
5267
5267
  }
5268
5268
  ) }),
5269
5269
  u && /* @__PURE__ */ t.jsxs("div", { className: "ogx-toolbar__dropdown-wrapper", style: { marginRight: 4 }, children: [
5270
- /* @__PURE__ */ t.jsx(Rn, { title: "Columns", children: /* @__PURE__ */ t.jsx(
5270
+ /* @__PURE__ */ t.jsx(En, { title: "Columns", children: /* @__PURE__ */ t.jsx(
5271
5271
  "button",
5272
5272
  {
5273
5273
  ref: p,
@@ -5296,7 +5296,7 @@ function ol({
5296
5296
  )
5297
5297
  ] }),
5298
5298
  d && /* @__PURE__ */ t.jsxs("div", { className: "ogx-toolbar__dropdown-wrapper", style: { marginRight: 4 }, children: [
5299
- /* @__PURE__ */ t.jsx(Rn, { title: "Filters", children: /* @__PURE__ */ t.jsxs(
5299
+ /* @__PURE__ */ t.jsx(En, { title: "Filters", children: /* @__PURE__ */ t.jsxs(
5300
5300
  "button",
5301
5301
  {
5302
5302
  ref: S,
@@ -5323,7 +5323,7 @@ function ol({
5323
5323
  )
5324
5324
  ] }),
5325
5325
  i && /* @__PURE__ */ t.jsxs("div", { className: "ogx-toolbar__dropdown-wrapper", style: { marginRight: 4 }, children: [
5326
- /* @__PURE__ */ t.jsx(Rn, { title: "Pivot", children: /* @__PURE__ */ t.jsxs(
5326
+ /* @__PURE__ */ t.jsx(En, { title: "Pivot", children: /* @__PURE__ */ t.jsxs(
5327
5327
  "button",
5328
5328
  {
5329
5329
  ref: k,
@@ -5355,7 +5355,7 @@ function ol({
5355
5355
  )
5356
5356
  ] }),
5357
5357
  /* @__PURE__ */ t.jsxs("div", { className: "ogx-toolbar__dropdown-wrapper", style: { marginRight: 4 }, children: [
5358
- /* @__PURE__ */ t.jsx(Rn, { title: "Summaries", children: /* @__PURE__ */ t.jsxs(
5358
+ /* @__PURE__ */ t.jsx(En, { title: "Summaries", children: /* @__PURE__ */ t.jsxs(
5359
5359
  "button",
5360
5360
  {
5361
5361
  ref: E,
@@ -5378,9 +5378,9 @@ function ol({
5378
5378
  {
5379
5379
  anchorRef: E,
5380
5380
  aggregationModel: o,
5381
- aggregableColumns: q,
5381
+ aggregableColumns: Y,
5382
5382
  onFunctionChange: U,
5383
- onClearAll: Y,
5383
+ onClearAll: X,
5384
5384
  onClose: () => N(!1),
5385
5385
  activeCount: A
5386
5386
  }
@@ -5707,9 +5707,9 @@ async function cl(n, o, e = {}) {
5707
5707
  }), m.forEach((H) => {
5708
5708
  const W = x[H.field], F = h[H.field];
5709
5709
  if (W == null || F == null) return;
5710
- let X = F;
5711
- H.valueFormatter ? X = H.valueFormatter({ value: F, row: {}, field: H.field }) : X = Mt(F, W);
5712
- const K = v.addRow([H.headerName ?? H.field, W.toUpperCase(), X]);
5710
+ let q = F;
5711
+ H.valueFormatter ? q = H.valueFormatter({ value: F, row: {}, field: H.field }) : q = Mt(F, W);
5712
+ const K = v.addRow([H.headerName ?? H.field, W.toUpperCase(), q]);
5713
5713
  K.getCell(3).alignment = { horizontal: "right" }, K.getCell(3).font = { bold: !0, size: g };
5714
5714
  }), v.getColumn(1).width = 20, v.getColumn(2).width = 12, v.getColumn(3).width = 18;
5715
5715
  continue;
@@ -5718,10 +5718,10 @@ async function cl(n, o, e = {}) {
5718
5718
  name: S = "Data",
5719
5719
  rows: L = "all",
5720
5720
  includeHeaders: B = !0,
5721
- includeSummary: q = !1,
5721
+ includeSummary: Y = !1,
5722
5722
  autoFilter: A = !0,
5723
5723
  frozenHeader: U = !0,
5724
- alternateRowColor: Y = "#f8fafc"
5724
+ alternateRowColor: X = "#f8fafc"
5725
5725
  } = p, G = L === "selected" ? I : N, oe = m.filter((v) => l[v.field]?.embedImage);
5726
5726
  if (oe.length > 0) {
5727
5727
  const v = [], D = /* @__PURE__ */ new Set();
@@ -5732,8 +5732,8 @@ async function cl(n, o, e = {}) {
5732
5732
  });
5733
5733
  }), v.length > 0) {
5734
5734
  const H = await Ki(v);
5735
- for (const [W, { buffer: F, extension: X }] of H) {
5736
- const K = w.addImage({ buffer: F, extension: X });
5735
+ for (const [W, { buffer: F, extension: q }] of H) {
5736
+ const K = w.addImage({ buffer: F, extension: q });
5737
5737
  C.set(W, K);
5738
5738
  }
5739
5739
  }
@@ -5762,32 +5762,32 @@ async function cl(n, o, e = {}) {
5762
5762
  if (G.forEach((v, D) => {
5763
5763
  const H = m.map((F) => {
5764
5764
  if (l[F.field]?.embedImage) return "";
5765
- let X = v[F.field];
5766
- return F.valueGetter && (X = F.valueGetter({ row: v, field: F.field, value: X })), Hi(F, X) === "string" && F.valueFormatter && X != null && (X = F.valueFormatter({ value: X, row: v, field: F.field })), X;
5765
+ let q = v[F.field];
5766
+ return F.valueGetter && (q = F.valueGetter({ row: v, field: F.field, value: q })), Hi(F, q) === "string" && F.valueFormatter && q != null && (q = F.valueFormatter({ value: q, row: v, field: F.field })), q;
5767
5767
  }), W = Q.addRow(H);
5768
- if (W.font = { size: g }, Y && D % 2 === 1 && W.eachCell((F) => {
5769
- F.fill = { type: "pattern", pattern: "solid", fgColor: { argb: Rt(Y) } };
5770
- }), W.eachCell((F, X) => {
5771
- const K = m[X - 1];
5768
+ if (W.font = { size: g }, X && D % 2 === 1 && W.eachCell((F) => {
5769
+ F.fill = { type: "pattern", pattern: "solid", fgColor: { argb: Rt(X) } };
5770
+ }), W.eachCell((F, q) => {
5771
+ const K = m[q - 1];
5772
5772
  K && (F.alignment = {
5773
5773
  horizontal: l[K.field]?.alignment ?? (K.type === "number" ? "right" : "left"),
5774
5774
  vertical: "middle"
5775
5775
  }, F.border = { bottom: { style: "thin", color: { argb: "FFf1f5f9" } } });
5776
5776
  }), oe.length > 0) {
5777
- const F = oe.reduce((M, ue) => Math.max(M, l[ue.field]?.imageHeight ?? 40), 0), X = Math.ceil(F / 1.333), K = X * 1.333;
5778
- W.height = X, oe.forEach((M) => {
5777
+ const F = oe.reduce((M, ue) => Math.max(M, l[ue.field]?.imageHeight ?? 40), 0), q = Math.ceil(F / 1.333), K = q * 1.333;
5778
+ W.height = q, oe.forEach((M) => {
5779
5779
  const ue = m.indexOf(M), le = v[M.field], _e = typeof le == "string" ? C.get(le) : void 0;
5780
5780
  if (_e === void 0) {
5781
5781
  W.getCell(ue + 1).value = typeof le == "string" ? le : "";
5782
5782
  return;
5783
5783
  }
5784
- const ot = l[M.field], z = ot?.imageWidth ?? 40, Pe = ot?.imageHeight ?? 40, ft = (Q.getColumn(ue + 1).width ?? 8) * 7 + 5, Ue = Math.max(0, ft - z) / 2, ht = Math.max(0, K - Pe) / 2;
5784
+ const ot = l[M.field], z = ot?.imageWidth ?? 40, Pe = ot?.imageHeight ?? 40, pt = (Q.getColumn(ue + 1).width ?? 8) * 7 + 5, Ue = Math.max(0, pt - z) / 2, rt = Math.max(0, K - Pe) / 2;
5785
5785
  Q.addImage(_e, {
5786
5786
  tl: {
5787
5787
  col: ue,
5788
5788
  row: ve,
5789
5789
  nativeColOff: Math.floor(Ue * 9525),
5790
- nativeRowOff: Math.floor(ht * 9525)
5790
+ nativeRowOff: Math.floor(rt * 9525)
5791
5791
  },
5792
5792
  ext: { width: z, height: Pe },
5793
5793
  editAs: "oneCell"
@@ -5796,17 +5796,17 @@ async function cl(n, o, e = {}) {
5796
5796
  } else
5797
5797
  W.height = 16;
5798
5798
  ve++;
5799
- }), q && h && x) {
5799
+ }), Y && h && x) {
5800
5800
  const v = m.map((F) => {
5801
- const X = x[F.field];
5802
- return X ? X.toUpperCase() : "";
5801
+ const q = x[F.field];
5802
+ return q ? q.toUpperCase() : "";
5803
5803
  }), D = Q.addRow(v);
5804
5804
  D.height = 16, D.font = { size: g - 1, italic: !0, color: { argb: "FF94a3b8" } }, D.eachCell((F) => {
5805
5805
  F.alignment = { horizontal: "right", vertical: "middle" }, F.border = { top: { style: "thin", color: { argb: "FFcbd5e1" } } };
5806
5806
  });
5807
5807
  const H = m.map((F) => {
5808
- const X = x[F.field], K = h[F.field];
5809
- return X == null || K == null ? "" : F.valueFormatter ? F.valueFormatter({ value: K, row: {}, field: F.field }) : Mt(K, X);
5808
+ const q = x[F.field], K = h[F.field];
5809
+ return q == null || K == null ? "" : F.valueFormatter ? F.valueFormatter({ value: K, row: {}, field: F.field }) : Mt(K, q);
5810
5810
  }), W = Q.addRow(H);
5811
5811
  W.height = 18, W.font = { bold: !0, size: g, color: { argb: Rt(s) } }, W.eachCell((F) => {
5812
5812
  F.fill = { type: "pattern", pattern: "solid", fgColor: { argb: Rt(d) } }, F.alignment = { horizontal: "right", vertical: "middle" }, F.border = Yi();
@@ -5963,7 +5963,7 @@ function ul({
5963
5963
  return /* @__PURE__ */ t.jsx(
5964
5964
  "div",
5965
5965
  {
5966
- className: e,
5966
+ className: `ogx-theme-provider ${e || ""}`.trim(),
5967
5967
  style: { ...r, ...i },
5968
5968
  children: o
5969
5969
  }
@@ -6150,17 +6150,17 @@ function ml(n) {
6150
6150
  return { initialState: d, onStateChange: h, clearState: x };
6151
6151
  }
6152
6152
  export {
6153
- jn as Button,
6153
+ Rn as Button,
6154
6154
  Zr as Cell,
6155
- En as Checkbox,
6155
+ Nn as Checkbox,
6156
6156
  tl as DataGrid,
6157
6157
  ul as DataGridThemeProvider,
6158
6158
  Pi as FilterPanel,
6159
6159
  ol as GridToolbar,
6160
- Rn as GridTooltip,
6160
+ En as GridTooltip,
6161
6161
  Vr as Header,
6162
6162
  il as Input,
6163
- Sn as Row,
6163
+ jn as Row,
6164
6164
  nl as Skeleton,
6165
6165
  pl as amberTheme,
6166
6166
  xl as compactTheme,