@opencorestack/opengridx 3.2.1 → 3.2.2

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.
@@ -1270,7 +1270,7 @@ function Ms(e) {
1270
1270
  const ol = Di(null), Ns = 52, Ps = 56, Is = 32, Ts = 72;
1271
1271
  function Rn(e) {
1272
1272
  if (e === void 0) return;
1273
- const t = /^\s*(\d+(?:\.\d+)?)\s*(px)?\s*$/.exec(e);
1273
+ const t = /^(\d+(?:\.\d+)?)(?:\s*px)?$/.exec(e.trim());
1274
1274
  if (!t) return;
1275
1275
  const n = Number(t[1]);
1276
1276
  return n > 0 ? n : void 0;
@@ -6156,7 +6156,7 @@ function gi(e, t) {
6156
6156
  Object.prototype.hasOwnProperty.call(e, o.field) && (n[o.field] = e[o.field]);
6157
6157
  }), n;
6158
6158
  }
6159
- const vu = /^[=+\-@\t\r]/, yu = /^[-+]?[\d.,\s]*\d[\d.,\s]*%?$/;
6159
+ const vu = /^[=+\-@\t\r]/, yu = /^[-+]?(?=[\d.,\s]*\d)[\d.,\s]*%?$/;
6160
6160
  function Tn(e, t = !1) {
6161
6161
  return t || !vu.test(e) || yu.test(e) ? e : `'${e}`;
6162
6162
  }
@@ -6166,9 +6166,15 @@ function it(e) {
6166
6166
  function Te(e) {
6167
6167
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
6168
6168
  }
6169
- const Cu = /[\\/?*:[\]]/g, fi = 31;
6169
+ function Cu(e) {
6170
+ let t = 0, n = e.length;
6171
+ for (; t < n && e[t] === "'"; ) t++;
6172
+ for (; n > t && e[n - 1] === "'"; ) n--;
6173
+ return e.slice(t, n);
6174
+ }
6175
+ const _u = /[\\/?*:[\]]/g, fi = 31;
6170
6176
  function Io(e, t = /* @__PURE__ */ new Set()) {
6171
- let n = String(e ?? "").replace(Cu, "-").trim().replace(/^'+|'+$/g, "").trim();
6177
+ let n = Cu(String(e ?? "").replace(_u, "-").trim()).trim();
6172
6178
  n || (n = "Sheet"), n = n.slice(0, fi).trim();
6173
6179
  const o = (i) => t.has(i.toLowerCase()) || i.toLowerCase() === "history";
6174
6180
  let r = n;
@@ -6178,14 +6184,14 @@ function Io(e, t = /* @__PURE__ */ new Set()) {
6178
6184
  }
6179
6185
  return t.add(r.toLowerCase()), r;
6180
6186
  }
6181
- const _u = /* @__PURE__ */ new Set([rt, nn, tn]), Su = /[\t\n\r"]/;
6187
+ const Su = /* @__PURE__ */ new Set([rt, nn, tn]), Ru = /[\t\n\r"]/;
6182
6188
  function pi(e) {
6183
- return Su.test(e) ? `"${e.replace(/"/g, '""')}"` : e;
6189
+ return Ru.test(e) ? `"${e.replace(/"/g, '""')}"` : e;
6184
6190
  }
6185
- function Ru(e) {
6186
- return Ct(e).filter((t) => !_u.has(t.field));
6191
+ function ku(e) {
6192
+ return Ct(e).filter((t) => !Su.has(t.field));
6187
6193
  }
6188
- function ku(e, t) {
6194
+ function Eu(e, t) {
6189
6195
  const n = t.map((r) => pi(r.headerName || r.field)).join(" "), o = e.map(
6190
6196
  (r) => t.map((i) => pi(Kn(r, i, He(r, i.field, i)))).join(" ")
6191
6197
  );
@@ -6207,7 +6213,7 @@ function hi(e) {
6207
6213
  }
6208
6214
  return i;
6209
6215
  }
6210
- async function Eu(e) {
6216
+ async function Mu(e) {
6211
6217
  const t = typeof navigator < "u" ? navigator.clipboard : void 0;
6212
6218
  if (t && typeof t.writeText == "function")
6213
6219
  try {
@@ -6220,12 +6226,12 @@ async function Eu(e) {
6220
6226
  if (!hi(e))
6221
6227
  throw new Error("Clipboard API not available and fallback failed.");
6222
6228
  }
6223
- function Mu(e) {
6229
+ function Nu(e) {
6224
6230
  if (!(e.ctrlKey || e.metaKey) || e.altKey || e.shiftKey) return !1;
6225
6231
  const t = e.key ?? "";
6226
6232
  return t.toLowerCase() === "c" ? !0 : e.code === "KeyC" && !/^[a-z]$/i.test(t);
6227
6233
  }
6228
- function Nu(e) {
6234
+ function Pu(e) {
6229
6235
  const t = ee(e);
6230
6236
  Ce(() => {
6231
6237
  t.current = e;
@@ -6235,13 +6241,13 @@ function Nu(e) {
6235
6241
  if (a.size === 0) return;
6236
6242
  const d = l().filter((h) => a.has(s(h)));
6237
6243
  if (d.length === 0) return;
6238
- const g = ku(d, Ru(i()));
6239
- await Eu(g);
6244
+ const g = Eu(d, ku(i()));
6245
+ await Mu(g);
6240
6246
  }, []), o = !!e.disableKeyboardShortcut;
6241
6247
  return xe(() => {
6242
6248
  if (o) return;
6243
6249
  const r = (i) => {
6244
- if (i.defaultPrevented || !Mu(i)) return;
6250
+ if (i.defaultPrevented || !Nu(i)) return;
6245
6251
  const l = document.activeElement, s = l?.tagName.toLowerCase(), a = l?.type;
6246
6252
  if (s === "input" && a !== "checkbox" && a !== "radio" || s === "textarea" || s === "select" || l?.isContentEditable) return;
6247
6253
  const { getRootElement: d } = t.current;
@@ -6257,8 +6263,8 @@ function Nu(e) {
6257
6263
  return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
6258
6264
  }, [n, o]), { copySelectedRows: n };
6259
6265
  }
6260
- function Pu(e) {
6261
- const { apiRef: t, columns: n, getRowId: o, containerRef: r, disableKeyboardShortcut: i } = e, l = A(() => r.current, [r]), { copySelectedRows: s } = Nu({
6266
+ function Iu(e) {
6267
+ const { apiRef: t, columns: n, getRowId: o, containerRef: r, disableKeyboardShortcut: i } = e, l = A(() => r.current, [r]), { copySelectedRows: s } = Pu({
6262
6268
  getSelectedRowIds: () => t.current.getSelectedRows(),
6263
6269
  getColumns: () => n,
6264
6270
  getRows: () => t.current.getAllFilteredRows(),
@@ -6270,7 +6276,7 @@ function Pu(e) {
6270
6276
  t.current.copySelectedRows = s;
6271
6277
  }, [s, t]);
6272
6278
  }
6273
- function Iu(e) {
6279
+ function Tu(e) {
6274
6280
  const { apiRef: t } = e, n = ee(e);
6275
6281
  Ce(() => {
6276
6282
  n.current = e;
@@ -6285,7 +6291,7 @@ function Iu(e) {
6285
6291
  };
6286
6292
  }, [t]);
6287
6293
  }
6288
- const Tu = ".ogx";
6294
+ const Fu = ".ogx";
6289
6295
  function mi(e, t) {
6290
6296
  const n = t.style.cssText;
6291
6297
  t.style.width = "max-content", t.style.minWidth = "0", t.style.maxWidth = "none", t.style.flex = "none";
@@ -6294,8 +6300,8 @@ function mi(e, t) {
6294
6300
  const r = getComputedStyle(e), i = [r.paddingLeft, r.paddingRight, r.borderLeftWidth, r.borderRightWidth].reduce((l, s) => l + (parseFloat(s) || 0), 0);
6295
6301
  return o + i;
6296
6302
  }
6297
- function Fu(e, t) {
6298
- const n = typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/"/g, '\\"'), o = (l) => l.closest(Tu) === e;
6303
+ function Ou(e, t) {
6304
+ const n = typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/["\\]/g, "\\$&"), o = (l) => l.closest(Fu) === e;
6299
6305
  let r = null;
6300
6306
  const i = (l) => {
6301
6307
  r = r === null ? l : Math.max(r, l);
@@ -6310,10 +6316,10 @@ function Fu(e, t) {
6310
6316
  s && i(mi(l, s));
6311
6317
  }), r === null ? null : Math.ceil(r);
6312
6318
  }
6313
- function Ou(e, t, n) {
6319
+ function Du(e, t, n) {
6314
6320
  return Math.max(t ?? fl, Math.min(n ?? 1 / 0, e));
6315
6321
  }
6316
- function Du(e) {
6322
+ function Lu(e) {
6317
6323
  const { apiRef: t } = e, n = ee(e);
6318
6324
  Ce(() => {
6319
6325
  n.current = e;
@@ -6325,8 +6331,8 @@ function Du(e) {
6325
6331
  for (const h of i ?? s.map((w) => w.field)) {
6326
6332
  const w = s.find((f) => f.field === h);
6327
6333
  if (!w || w.resizable === !1) continue;
6328
- const b = Fu(d, h);
6329
- b !== null && g.push([h, Ou(b, w.minWidth, w.maxWidth)]);
6334
+ const b = Ou(d, h);
6335
+ b !== null && g.push([h, Du(b, w.minWidth, w.maxWidth)]);
6330
6336
  }
6331
6337
  for (const [h, w] of g) a(h, w);
6332
6338
  }, []), r = A((i) => o([i]), [o]);
@@ -6334,12 +6340,12 @@ function Du(e) {
6334
6340
  t.current.autosizeColumn = r, t.current.autosizeColumns = o;
6335
6341
  }, [t, r, o]), r;
6336
6342
  }
6337
- function Lu(e) {
6343
+ function Au(e) {
6338
6344
  return A((t) => {
6339
6345
  e.current?.classList.toggle("ogx--kb", t);
6340
6346
  }, [e]);
6341
6347
  }
6342
- function Au(e) {
6348
+ function $u(e) {
6343
6349
  const { ensureGridFocus: t, setKeyboardMode: n, setFocusedCell: o, getRowId: r, onCellClick: i } = e, l = A((a) => {
6344
6350
  t(), n(!1), o({ id: r(a.row), field: a.field, rowIndex: a.rowIndex }), i?.(a);
6345
6351
  }, [i, n, o, t, r]), s = A((a) => {
@@ -6347,7 +6353,7 @@ function Au(e) {
6347
6353
  }, [t, o, n]);
6348
6354
  return { handleCellClick: l, handleHeaderClick: s };
6349
6355
  }
6350
- function $u({
6356
+ function Gu({
6351
6357
  paginationSlot: e,
6352
6358
  paginationSlotProps: t,
6353
6359
  page: n,
@@ -6371,14 +6377,14 @@ function $u({
6371
6377
  }
6372
6378
  );
6373
6379
  }
6374
- function Gu({ loading: e, error: t, noRowsLabel: n, filteredRowCount: o, dataRowCount: r, filterModel: i }) {
6380
+ function Wu({ loading: e, error: t, noRowsLabel: n, filteredRowCount: o, dataRowCount: r, filterModel: i }) {
6375
6381
  return /* @__PURE__ */ Y("div", { className: "ogx-aria-live-status", role: "status", "aria-live": "polite", children: [
6376
6382
  e ? "Loading data..." : "",
6377
6383
  t ? `Error: ${gl(t)}` : "",
6378
6384
  !e && !t && (o === 0 ? n : i && ((i.quickFilterValues?.length || 0) > 0 || (i.items?.length || 0) > 0) ? `${r} ${r === 1 ? "row" : "rows"} found` : "")
6379
6385
  ] });
6380
6386
  }
6381
- function Wu(e) {
6387
+ function Hu(e) {
6382
6388
  const { headerRowCount: t, pinnedTopCount: n, pinnedBottomCount: o, pageRowCount: r, totalCenterRowCount: i, pageOffset: l } = e;
6383
6389
  return {
6384
6390
  rowCount: t + n + i + o,
@@ -6388,7 +6394,7 @@ function Wu(e) {
6388
6394
  bottomRowIndexOffset: n + r
6389
6395
  };
6390
6396
  }
6391
- function Hu(e) {
6397
+ function Bu(e) {
6392
6398
  const {
6393
6399
  columnGroupingModel: t,
6394
6400
  pinnedTopCount: n,
@@ -6400,7 +6406,7 @@ function Hu(e) {
6400
6406
  paginatedUnpinnedRowCount: a,
6401
6407
  sortedUnpinnedRowCount: d
6402
6408
  } = e, { page: g, pageSize: h } = l;
6403
- return ce(() => Wu({
6409
+ return ce(() => Hu({
6404
6410
  headerRowCount: 1 + pl(t),
6405
6411
  pinnedTopCount: n,
6406
6412
  pinnedBottomCount: o,
@@ -6420,7 +6426,7 @@ function Hu(e) {
6420
6426
  h
6421
6427
  ]);
6422
6428
  }
6423
- function Bu(e) {
6429
+ function zu(e) {
6424
6430
  const {
6425
6431
  toolbar: t,
6426
6432
  toolbarSlotProps: n,
@@ -6491,7 +6497,7 @@ function Bu(e) {
6491
6497
  p
6492
6498
  ]);
6493
6499
  }
6494
- function Ug(e) {
6500
+ function qg(e) {
6495
6501
  const {
6496
6502
  rows: t,
6497
6503
  columns: n,
@@ -6651,7 +6657,7 @@ function Ug(e) {
6651
6657
  groupingColDef: D,
6652
6658
  isTreeData: pn,
6653
6659
  getTreeDataPath: ge
6654
- }), Yn = hc(gt, ct), [jl, Kl] = Id(ze), kt = ee(null), Jn = ee(null), tr = !dt && o || du, Qn = Lu(kt), Zn = Kc({
6660
+ }), Yn = hc(gt, ct), [jl, Kl] = Id(ze), kt = ee(null), Jn = ee(null), tr = !dt && o || du, Qn = Au(kt), Zn = Kc({
6655
6661
  rows: zl,
6656
6662
  getRowId: tr,
6657
6663
  columns: gt,
@@ -6933,14 +6939,14 @@ function Ug(e) {
6933
6939
  () => [...Le.leftPinnedCols, ...Le.unpinnedColsWithWidth, ...Le.rightPinnedCols],
6934
6940
  [Le.leftPinnedCols, Le.unpinnedColsWithWidth, Le.rightPinnedCols]
6935
6941
  );
6936
- Pu({
6942
+ Iu({
6937
6943
  apiRef: Et,
6938
6944
  columns: fr,
6939
6945
  getRowId: De,
6940
6946
  containerRef: kt,
6941
6947
  disableKeyboardShortcut: h
6942
- }), Iu({ apiRef: Et, viewportRef: Jn, layout: Le, rowHeight: nt });
6943
- const ca = Du({ apiRef: Et, containerRef: kt, columns: oo, onColumnResize: ur }), { scrollTop: da, scrollLeft: ua, overscanRows: ga, handleScroll: fa, setViewportElement: pa } = Ys({
6948
+ }), Tu({ apiRef: Et, viewportRef: Jn, layout: Le, rowHeight: nt });
6949
+ const ca = Lu({ apiRef: Et, containerRef: kt, columns: oo, onColumnResize: ur }), { scrollTop: da, scrollLeft: ua, overscanRows: ga, handleScroll: fa, setViewportElement: pa } = Ys({
6944
6950
  onRowsScrollEnd: Re,
6945
6951
  overscanRowCount: et,
6946
6952
  rowCount: Le.unpinnedRowsLength,
@@ -6999,7 +7005,7 @@ function Ug(e) {
6999
7005
  pinCheckboxColumn: I,
7000
7006
  pinExpandColumn: F,
7001
7007
  rowHeight: nt
7002
- }), { handleCellClick: Ca, handleHeaderClick: _a } = Au({
7008
+ }), { handleCellClick: Ca, handleHeaderClick: _a } = $u({
7003
7009
  ensureGridFocus: wa,
7004
7010
  setKeyboardMode: Qn,
7005
7011
  setFocusedCell: ha,
@@ -7010,7 +7016,7 @@ function Ug(e) {
7010
7016
  onColumnVisibilityModelChange: Un,
7011
7017
  pinnedColumns: qn,
7012
7018
  onPinnedColumnsChange: Al
7013
- }), Jt = Hu({
7019
+ }), Jt = Bu({
7014
7020
  columnGroupingModel: de,
7015
7021
  pinnedTopCount: Ve.length,
7016
7022
  pinnedBottomCount: qe.length,
@@ -7055,7 +7061,7 @@ function Ug(e) {
7055
7061
  });
7056
7062
  const { allSelected: ka, someSelected: Ea } = io, Pt = Rd(de, la), Ma = _e.useMemo(() => ir.some((ht) => !!ht.rowSpan), [ir]), pt = wc();
7057
7063
  ac(kt);
7058
- const wr = j?.noRowsOverlay, xr = j?.loadingOverlay, fo = xr ? /* @__PURE__ */ c(xr, { ...z?.loadingOverlay }) : void 0, br = wr ? /* @__PURE__ */ c(wr, { ...z?.noRowsOverlay }) : void 0, Sn = j?.footer, Na = ot && vn.length > 0 && S !== "infinite", vr = j?.toolbar, yr = Bu({
7064
+ const wr = j?.noRowsOverlay, xr = j?.loadingOverlay, fo = xr ? /* @__PURE__ */ c(xr, { ...z?.loadingOverlay }) : void 0, br = wr ? /* @__PURE__ */ c(wr, { ...z?.noRowsOverlay }) : void 0, Sn = j?.footer, Na = ot && vn.length > 0 && S !== "infinite", vr = j?.toolbar, yr = zu({
7059
7065
  toolbar: j?.toolbar,
7060
7066
  toolbarSlotProps: z?.toolbar,
7061
7067
  apiRef: Et,
@@ -7338,7 +7344,7 @@ function Ug(e) {
7338
7344
  }
7339
7345
  ),
7340
7346
  !Ut && !Sn && Ke && /* @__PURE__ */ c(
7341
- $u,
7347
+ Gu,
7342
7348
  {
7343
7349
  paginationSlot: j?.pagination,
7344
7350
  paginationSlotProps: z?.pagination,
@@ -7351,7 +7357,7 @@ function Ug(e) {
7351
7357
  }
7352
7358
  ),
7353
7359
  /* @__PURE__ */ c(
7354
- Gu,
7360
+ Wu,
7355
7361
  {
7356
7362
  loading: ot,
7357
7363
  error: Fe.dataSource.error,
@@ -7367,10 +7373,10 @@ function Ug(e) {
7367
7373
  }
7368
7374
  );
7369
7375
  }
7370
- function qg({ rows: e = 5, columns: t = 5 }) {
7376
+ function Xg({ rows: e = 5, columns: t = 5 }) {
7371
7377
  return /* @__PURE__ */ c("div", { className: "ogx__skeleton", children: Array.from({ length: e }).map((n, o) => /* @__PURE__ */ c("div", { className: "ogx__skeleton-row", children: Array.from({ length: t }).map((r, i) => /* @__PURE__ */ c("div", { className: "ogx__skeleton-cell", children: /* @__PURE__ */ c("div", { className: "ogx__skeleton-content" }) }, i)) }, o)) });
7372
7378
  }
7373
- const zu = 300;
7379
+ const Vu = 300;
7374
7380
  function $t(e) {
7375
7381
  return "field" in e && !("items" in e);
7376
7382
  }
@@ -7380,13 +7386,13 @@ function wi(e, t) {
7380
7386
  function El(e, t) {
7381
7387
  return Object.is(e, t) ? !0 : e instanceof Date && t instanceof Date ? e.getTime() === t.getTime() : Array.isArray(e) && Array.isArray(t) ? e.length === t.length && e.every((n, o) => El(n, t[o])) : !1;
7382
7388
  }
7383
- function Vu(e, t) {
7389
+ function ju(e, t) {
7384
7390
  return e === t ? !0 : $t(e) && $t(t) ? e.id === t.id && e.field === t.field && e.operator === t.operator && El(e.value, t.value) : !$t(e) && !$t(t) ? e.id === t.id && e.logicOperator === t.logicOperator && To(e.items, t.items) : !1;
7385
7391
  }
7386
7392
  function To(e, t) {
7387
- return e === t ? !0 : e.length === t.length && e.every((n, o) => Vu(n, t[o]));
7393
+ return e === t ? !0 : e.length === t.length && e.every((n, o) => ju(n, t[o]));
7388
7394
  }
7389
- function ju(e) {
7395
+ function Ku(e) {
7390
7396
  return (e.valueOptions ?? []).map((t, n) => t !== null && typeof t == "object" ? { key: String(n), value: t.value, label: t.label } : { key: String(n), value: t, label: String(t) });
7391
7397
  }
7392
7398
  function xi(e, t) {
@@ -7398,11 +7404,11 @@ function bi(e, t) {
7398
7404
  function vi(e, t) {
7399
7405
  return t === "isAnyOf" ? e.split(",").map((n) => n.trim()).filter((n) => n !== "") : e;
7400
7406
  }
7401
- function Ku(e, t) {
7407
+ function Uu(e, t) {
7402
7408
  if (!Ho.has(t))
7403
7409
  return t === "isAnyOf" ? e == null || e === "" ? [] : Array.isArray(e) ? e : [e] : Array.isArray(e) ? e.length > 0 ? e[0] : "" : e ?? "";
7404
7410
  }
7405
- const Uu = ({ col: e, item: t, resetToken: n, onChange: o }) => {
7411
+ const qu = ({ col: e, item: t, resetToken: n, onChange: o }) => {
7406
7412
  const r = bt(), i = ns(e.type), l = i[0], s = t?.operator ?? l, a = i.includes(s) ? i : [s, ...i], d = !!t, g = e.headerName || e.field, [h, w] = pe(null), [b, f] = pe(n);
7407
7413
  b !== n && (f(n), w(null));
7408
7414
  const u = ee(o), m = ee(t), x = ee(e);
@@ -7429,15 +7435,15 @@ const Uu = ({ col: e, item: t, resetToken: n, onChange: o }) => {
7429
7435
  if (h === null) return;
7430
7436
  const k = setTimeout(() => {
7431
7437
  _.current = null, v(h), w(null);
7432
- }, zu);
7438
+ }, Vu);
7433
7439
  return () => clearTimeout(k);
7434
7440
  }, [h, v]);
7435
7441
  const P = (k) => {
7436
7442
  const M = h !== null ? vi(h, k) : t?.value;
7437
- w(null), o(p(k, Ku(M, k)));
7443
+ w(null), o(p(k, Uu(M, k)));
7438
7444
  }, R = () => {
7439
7445
  w(null), o(null);
7440
- }, N = !Ho.has(s), T = ju(e), $ = `ogx-filter__value-input${d ? " ogx-filter__value-input--active" : ""}`, W = `Filter value for ${g}`;
7446
+ }, N = !Ho.has(s), T = Ku(e), $ = `ogx-filter__value-input${d ? " ogx-filter__value-input--active" : ""}`, W = `Filter value for ${g}`;
7441
7447
  let C = null;
7442
7448
  if (N && e.type === "boolean")
7443
7449
  C = /* @__PURE__ */ Y(
@@ -7539,7 +7545,7 @@ const Uu = ({ col: e, item: t, resetToken: n, onChange: o }) => {
7539
7545
  )
7540
7546
  ] })
7541
7547
  ] });
7542
- }, qu = ({ filterModel: e, columns: t, onFilterModelChange: n }) => {
7548
+ }, Xu = ({ filterModel: e, columns: t, onFilterModelChange: n }) => {
7543
7549
  const o = ce(() => e.items ?? [], [e.items]), r = e.logicOperator ?? "and", [i, l] = pe(null), [s, a] = pe(o), [d, g] = pe(0);
7544
7550
  if (s !== o) {
7545
7551
  a(o);
@@ -7583,7 +7589,7 @@ const Uu = ({ col: e, item: t, resetToken: n, onChange: o }) => {
7583
7589
  ] }),
7584
7590
  u > 0 && /* @__PURE__ */ c("div", { className: "ogx-filter__hidden-note", role: "note", children: u === 1 ? "1 more condition (a filter group or a second condition on a column) is applied and not shown here." : `${u} more conditions (filter groups or further conditions on a column) are applied and not shown here.` }),
7585
7591
  b.length === 0 ? /* @__PURE__ */ c("div", { className: "ogx-filter__empty", children: "No filterable columns." }) : b.map((m) => /* @__PURE__ */ c(
7586
- Uu,
7592
+ qu,
7587
7593
  {
7588
7594
  col: m,
7589
7595
  item: wi(o, m.field),
@@ -7617,7 +7623,7 @@ function Ml() {
7617
7623
  }
7618
7624
  );
7619
7625
  }
7620
- function Xu({ anchorRef: e, columns: t, model: n, onChange: o, onClose: r }) {
7626
+ function Yu({ anchorRef: e, columns: t, model: n, onChange: o, onClose: r }) {
7621
7627
  const i = ee(null), [l, s] = pe({ top: 0, right: 0 }), [a, d] = pe(null);
7622
7628
  Ce(() => {
7623
7629
  d(e.current?.closest(".ogx-theme-provider") ?? document.body);
@@ -7811,13 +7817,13 @@ function Xu({ anchorRef: e, columns: t, model: n, onChange: o, onClose: r }) {
7811
7817
  );
7812
7818
  return a ? yt.createPortal(M, a) : null;
7813
7819
  }
7814
- function Yu() {
7820
+ function Ju() {
7815
7821
  return /* @__PURE__ */ Y("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
7816
7822
  /* @__PURE__ */ c("circle", { cx: "11", cy: "11", r: "8" }),
7817
7823
  /* @__PURE__ */ c("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
7818
7824
  ] });
7819
7825
  }
7820
- function Ju() {
7826
+ function Qu() {
7821
7827
  return /* @__PURE__ */ Y("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
7822
7828
  /* @__PURE__ */ c("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
7823
7829
  /* @__PURE__ */ c("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
@@ -7826,7 +7832,7 @@ function Ju() {
7826
7832
  function Ci(e) {
7827
7833
  return e.trim().split(/\s+/).filter(Boolean).join(" ");
7828
7834
  }
7829
- function Qu({ value: e = "", onChange: t, placeholder: n = "Search...", debounceMs: o = 250 }) {
7835
+ function Zu({ value: e = "", onChange: t, placeholder: n = "Search...", debounceMs: o = 250 }) {
7830
7836
  const [r, i] = pe(() => e.length > 0), [l, s] = pe(e), a = ee(null), d = ee(null), g = ee(t);
7831
7837
  Ce(() => {
7832
7838
  g.current = t;
@@ -7870,7 +7876,7 @@ function Qu({ value: e = "", onChange: t, placeholder: n = "Search...", debounce
7870
7876
  className: `ogx-global-search${r ? " ogx-global-search--expanded" : ""}`,
7871
7877
  onClick: r ? void 0 : f,
7872
7878
  children: [
7873
- /* @__PURE__ */ c("div", { className: "ogx-global-search__icon-wrapper", children: /* @__PURE__ */ c(Yu, {}) }),
7879
+ /* @__PURE__ */ c("div", { className: "ogx-global-search__icon-wrapper", children: /* @__PURE__ */ c(Ju, {}) }),
7874
7880
  /* @__PURE__ */ c(
7875
7881
  "input",
7876
7882
  {
@@ -7885,7 +7891,7 @@ function Qu({ value: e = "", onChange: t, placeholder: n = "Search...", debounce
7885
7891
  autoComplete: "off"
7886
7892
  }
7887
7893
  ),
7888
- l && /* @__PURE__ */ c("button", { type: "button", className: "ogx-global-search__clear", onClick: u, "aria-label": "Clear search", children: /* @__PURE__ */ c(Ju, {}) })
7894
+ l && /* @__PURE__ */ c("button", { type: "button", className: "ogx-global-search__clear", onClick: u, "aria-label": "Clear search", children: /* @__PURE__ */ c(Qu, {}) })
7889
7895
  ]
7890
7896
  }
7891
7897
  );
@@ -7978,12 +7984,12 @@ function Nn({
7978
7984
  )
7979
7985
  ] });
7980
7986
  }
7981
- const Zu = Object.keys(Hn);
7982
- function eg(e) {
7987
+ const eg = Object.keys(Hn);
7988
+ function tg(e) {
7983
7989
  return Object.prototype.hasOwnProperty.call(Hn, e);
7984
7990
  }
7985
7991
  function Nl(e) {
7986
- return e.availableAggregationFunctions ? Array.from(new Set(e.availableAggregationFunctions.filter(eg))) : Zu;
7992
+ return e.availableAggregationFunctions ? Array.from(new Set(e.availableAggregationFunctions.filter(tg))) : eg;
7987
7993
  }
7988
7994
  function Pl() {
7989
7995
  return /* @__PURE__ */ c(
@@ -8002,7 +8008,7 @@ function Pl() {
8002
8008
  }
8003
8009
  );
8004
8010
  }
8005
- function tg() {
8011
+ function ng() {
8006
8012
  return /* @__PURE__ */ Y("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", children: [
8007
8013
  /* @__PURE__ */ c("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", stroke: "currentColor", strokeWidth: "1.8" }),
8008
8014
  /* @__PURE__ */ c("rect", { x: "8.5", y: "4", width: "7", height: "16", fill: "currentColor", opacity: "0.25" }),
@@ -8015,7 +8021,7 @@ function tg() {
8015
8021
  function Il() {
8016
8022
  return /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ c("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }) });
8017
8023
  }
8018
- function ng({
8024
+ function og({
8019
8025
  anchorRef: e,
8020
8026
  aggregationModel: t,
8021
8027
  aggregableColumns: n,
@@ -8106,7 +8112,7 @@ function ng({
8106
8112
  );
8107
8113
  return g ? yt.createPortal(b, g) : null;
8108
8114
  }
8109
- function og({
8115
+ function rg({
8110
8116
  anchorRef: e,
8111
8117
  columns: t,
8112
8118
  visibleColumns: n,
@@ -8172,7 +8178,7 @@ function og({
8172
8178
  );
8173
8179
  return b ? yt.createPortal(m, b) : null;
8174
8180
  }
8175
- function rg({
8181
+ function ig({
8176
8182
  anchorRef: e,
8177
8183
  columns: t,
8178
8184
  filterModel: n,
@@ -8249,7 +8255,7 @@ function rg({
8249
8255
  ] })
8250
8256
  ] }),
8251
8257
  /* @__PURE__ */ c("div", { className: "ogx-toolbar__panel-body ogx-toolbar__panel-body--filter", children: /* @__PURE__ */ c(
8252
- qu,
8258
+ Xu,
8253
8259
  {
8254
8260
  columns: t,
8255
8261
  filterModel: n,
@@ -8261,8 +8267,8 @@ function rg({
8261
8267
  );
8262
8268
  return d ? yt.createPortal(f, d) : null;
8263
8269
  }
8264
- const ig = { rowFields: [], columnFields: [], valueFields: [] };
8265
- function Xg({
8270
+ const lg = { rowFields: [], columnFields: [], valueFields: [] };
8271
+ function Yg({
8266
8272
  columns: e = [],
8267
8273
  baseColumns: t,
8268
8274
  aggregationModel: n = {},
@@ -8301,7 +8307,7 @@ function Xg({
8301
8307
  if (!(!F || !K))
8302
8308
  return F.registerColumnsPanel();
8303
8309
  }, [F, K]);
8304
- const G = ee(null), te = ee(null), re = ee(null), ae = ee(null), oe = ee(null), he = ee(null), fe = ee(null), le = r ?? ig, ge = le.rowFields.length > 0 || le.columnFields.length > 0 || le.valueFields.length > 0, se = t ? new Set(t.map((X) => X.field)) : null, D = e.filter(
8310
+ const G = ee(null), te = ee(null), re = ee(null), ae = ee(null), oe = ee(null), he = ee(null), fe = ee(null), le = r ?? lg, ge = le.rowFields.length > 0 || le.columnFields.length > 0 || le.valueFields.length > 0, se = t ? new Set(t.map((X) => X.field)) : null, D = e.filter(
8305
8311
  (X) => X.aggregable !== !1 && (X.type === "number" || X.aggregable === !0) && Nl(X).length > 0 && (!se || se.has(X.field))
8306
8312
  ), ne = Object.keys(n).filter(
8307
8313
  (X) => n[X] && n[X] !== "none"
@@ -8346,7 +8352,7 @@ function Xg({
8346
8352
  /* @__PURE__ */ c("div", { className: "ogx-toolbar__spacer" }),
8347
8353
  /* @__PURE__ */ Y("div", { className: "ogx-toolbar__actions", children: [
8348
8354
  s && /* @__PURE__ */ c("div", { className: "ogx-toolbar__dropdown-wrapper", style: { marginRight: 4 }, children: E ? E({ value: B, onChange: Z }) : /* @__PURE__ */ c(
8349
- Qu,
8355
+ Zu,
8350
8356
  {
8351
8357
  value: B,
8352
8358
  onChange: Z,
@@ -8368,11 +8374,11 @@ function Xg({
8368
8374
  "aria-haspopup": "dialog",
8369
8375
  "aria-expanded": C,
8370
8376
  onClick: () => y("columns"),
8371
- children: /* @__PURE__ */ c(tg, {})
8377
+ children: /* @__PURE__ */ c(ng, {})
8372
8378
  }
8373
8379
  ) }),
8374
8380
  C && /* @__PURE__ */ c(
8375
- og,
8381
+ rg,
8376
8382
  {
8377
8383
  anchorRef: x ? oe : re,
8378
8384
  columns: e,
@@ -8409,7 +8415,7 @@ function Xg({
8409
8415
  }
8410
8416
  ) }),
8411
8417
  k && /* @__PURE__ */ c(
8412
- rg,
8418
+ ig,
8413
8419
  {
8414
8420
  anchorRef: p ? he : ae,
8415
8421
  columns: e,
@@ -8437,7 +8443,7 @@ function Xg({
8437
8443
  }
8438
8444
  ) }),
8439
8445
  W && /* @__PURE__ */ c(
8440
- Xu,
8446
+ Yu,
8441
8447
  {
8442
8448
  anchorRef: te,
8443
8449
  columns: t ?? e,
@@ -8471,7 +8477,7 @@ function Xg({
8471
8477
  }
8472
8478
  ) }),
8473
8479
  $ && /* @__PURE__ */ c(
8474
- ng,
8480
+ og,
8475
8481
  {
8476
8482
  anchorRef: v ? fe : G,
8477
8483
  aggregationModel: n,
@@ -8488,11 +8494,11 @@ function Xg({
8488
8494
  ] })
8489
8495
  ] });
8490
8496
  }
8491
- function Yg() {
8497
+ function Jg() {
8492
8498
  const [e] = pe(ml);
8493
8499
  return ee(e);
8494
8500
  }
8495
- const Jg = ({
8501
+ const Qg = ({
8496
8502
  fullWidth: e = !1,
8497
8503
  error: t = !1,
8498
8504
  startAdornment: n,
@@ -8524,7 +8530,7 @@ function Vt(e, t) {
8524
8530
  const n = e.groupField ?? "", o = t.find((r) => r.field === n)?.groupingValueFormatter;
8525
8531
  return o ? o({ field: n, value: e.groupValue }) : `${n}: ${String(e.groupValue ?? "")}`;
8526
8532
  }
8527
- const lg = /* @__PURE__ */ new Set([
8533
+ const ag = /* @__PURE__ */ new Set([
8528
8534
  8364,
8529
8535
  8218,
8530
8536
  402,
@@ -8553,30 +8559,30 @@ const lg = /* @__PURE__ */ new Set([
8553
8559
  382,
8554
8560
  376
8555
8561
  ]);
8556
- function ag(e) {
8562
+ function sg(e) {
8557
8563
  return e >= 8192 && e <= 8202 || e === 8239 || e === 8287 || e === 12288 ? " " : e >= 8203 && e <= 8205 || e === 8288 || e === 65279 ? "" : e === 8208 || e === 8209 || e === 8210 || e === 8722 ? "-" : null;
8558
8564
  }
8559
- function sg(e) {
8565
+ function cg(e) {
8560
8566
  let t = "", n = !1;
8561
8567
  for (const o of e) {
8562
8568
  const r = o.codePointAt(0) ?? 0;
8563
- if (r <= 255 || lg.has(r)) {
8569
+ if (r <= 255 || ag.has(r)) {
8564
8570
  t += o;
8565
8571
  continue;
8566
8572
  }
8567
- const i = ag(r);
8573
+ const i = sg(r);
8568
8574
  i !== null ? t += i : (t += "?", n = !0);
8569
8575
  }
8570
8576
  return { text: t, lossy: n };
8571
8577
  }
8572
- const cg = { sliceMs: 30, renderChunkRows: 40 }, dg = 2e4;
8578
+ const dg = { sliceMs: 30, renderChunkRows: 40 }, ug = 2e4;
8573
8579
  function _i() {
8574
8580
  return new Promise((e) => setTimeout(e, 0));
8575
8581
  }
8576
- function ug() {
8582
+ function gg() {
8577
8583
  return new DOMException("PDF export was aborted", "AbortError");
8578
8584
  }
8579
- const Lt = () => typeof performance < "u" ? performance.now() : Date.now(), Si = (e) => Math.max(2, Math.floor(e / 2) * 2), gg = [79, 70, 229], fg = [255, 255, 255];
8585
+ const Lt = () => typeof performance < "u" ? performance.now() : Date.now(), Si = (e) => Math.max(2, Math.floor(e / 2) * 2), fg = [79, 70, 229], pg = [255, 255, 255];
8580
8586
  function Ri(e, t) {
8581
8587
  const n = e.trim().replace(/^#/, ""), o = /^[a-f\d]{3}$/i.test(n) ? n.split("").map((i) => i + i).join("") : n, r = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);
8582
8588
  return r ? [parseInt(r[1], 16), parseInt(r[2], 16), parseInt(r[3], 16)] : t;
@@ -8587,40 +8593,40 @@ function ki(e, t) {
8587
8593
  function Ei(e) {
8588
8594
  return (typeof e.width == "number" ? e.width : void 0) ?? (e.flex ?? 1) * 100;
8589
8595
  }
8590
- function pg(e, t) {
8596
+ function hg(e, t) {
8591
8597
  const n = e.reduce((r, i) => r + Ei(i), 0), o = {};
8592
8598
  return e.forEach((r, i) => {
8593
8599
  o[i] = { cellWidth: Ei(r) / n * t };
8594
8600
  }), o;
8595
8601
  }
8596
- const hg = /* @__PURE__ */ new Set(["isEmpty", "isNotEmpty"]);
8597
- function mg(e, t) {
8602
+ const mg = /* @__PURE__ */ new Set(["isEmpty", "isNotEmpty"]);
8603
+ function wg(e, t) {
8598
8604
  const o = t.find((l) => l.field === e.field)?.headerName ?? e.field;
8599
- if (hg.has(e.operator)) return `${o} ${e.operator}`;
8605
+ if (mg.has(e.operator)) return `${o} ${e.operator}`;
8600
8606
  const { value: r } = e;
8601
8607
  if (r == null || r === "" || Array.isArray(r) && r.length === 0) return null;
8602
8608
  const i = Array.isArray(r) ? r.map(String).join(", ") : String(r);
8603
8609
  return `${o} ${e.operator} "${i}"`;
8604
8610
  }
8605
8611
  function Tl(e, t, n, o) {
8606
- const r = e.map((l) => "items" in l ? Tl(l.items, l.logicOperator, n, !0) : mg(l, n)).filter((l) => !!l);
8612
+ const r = e.map((l) => "items" in l ? Tl(l.items, l.logicOperator, n, !0) : wg(l, n)).filter((l) => !!l);
8607
8613
  if (r.length === 0) return "";
8608
8614
  const i = r.join(t === "or" ? " OR " : " AND ");
8609
8615
  return o && r.length > 1 ? `(${i})` : i;
8610
8616
  }
8611
- function wg(e, t) {
8617
+ function xg(e, t) {
8612
8618
  const n = [], o = Tl(e.items ?? [], e.logicOperator ?? "and", t, !1);
8613
8619
  o && n.push(o);
8614
8620
  const r = (e.quickFilterValues ?? []).filter((i) => i.trim() !== "");
8615
8621
  return r.length > 0 && n.push(`Search: ${r.map((i) => `"${i}"`).join(" ")}`), n.join(" • ");
8616
8622
  }
8617
- const xg = 1.15 * 0.3528;
8618
- function Qg(e, t, n = {}) {
8619
- return bg(e, t, n, cg);
8623
+ const bg = 1.15 * 0.3528;
8624
+ function Zg(e, t, n = {}) {
8625
+ return vg(e, t, n, dg);
8620
8626
  }
8621
- async function bg(e, t, n, o) {
8627
+ async function vg(e, t, n, o) {
8622
8628
  const { signal: r, onProgress: i } = n, l = () => {
8623
- if (r?.aborted) throw ug();
8629
+ if (r?.aborted) throw gg();
8624
8630
  };
8625
8631
  l();
8626
8632
  let s, a;
@@ -8651,7 +8657,7 @@ async function bg(e, t, n, o) {
8651
8657
  fontSize: E = 9,
8652
8658
  groupedRows: P,
8653
8659
  font: R,
8654
- maxRows: N = dg
8660
+ maxRows: N = ug
8655
8661
  } = n;
8656
8662
  l();
8657
8663
  let T = Lt();
@@ -8665,11 +8671,11 @@ async function bg(e, t, n, o) {
8665
8671
  let K = !1;
8666
8672
  const G = (j) => {
8667
8673
  if (R) return j;
8668
- const z = sg(j);
8674
+ const z = cg(j);
8669
8675
  return z.lossy && (K = !0), z.text;
8670
8676
  }, te = (j, z, ie, me, be) => {
8671
8677
  const ve = C.splitTextToSize(G(j), me);
8672
- return C.text(ve.length === 1 ? ve[0] : ve, z, ie), Math.max(0, ve.length - 1) * be * xg;
8678
+ return C.text(ve.length === 1 ? ve[0] : ve, z, ie), Math.max(0, ve.length - 1) * be * bg;
8673
8679
  }, re = Ct(t), ae = cn(P, b), oe = sn(e, b, f);
8674
8680
  let he = y;
8675
8681
  if (g) {
@@ -8687,7 +8693,7 @@ async function bg(e, t, n, o) {
8687
8693
  j,
8688
8694
  z
8689
8695
  ), z += 5, x) {
8690
- const ve = wg(x, t);
8696
+ const ve = xg(x, t);
8691
8697
  ve && (z += te(`Filters: ${ve}`, j, z, ie, 8), z += 5);
8692
8698
  }
8693
8699
  C.setDrawColor(226, 232, 240), C.setLineWidth(0.3), C.line(y, z + 2, k - y, z + 2), he = z + 6;
@@ -8732,7 +8738,7 @@ async function bg(e, t, n, o) {
8732
8738
  ), K && console.warn(
8733
8739
  '[exportToPdf] Some characters cannot be drawn with the built-in Helvetica font and were replaced with "?". Pass the `font` option (a Unicode .ttf, e.g. Noto Sans) to draw them.'
8734
8740
  );
8735
- const Q = pg(re, I), [J, Z, B] = Ri(v, gg), [U, q, L] = Ri(_, fg), H = {
8741
+ const Q = hg(re, I), [J, Z, B] = Ri(v, fg), [U, q, L] = Ri(_, pg), H = {
8736
8742
  head: fe,
8737
8743
  styles: { fontSize: E, cellPadding: 3, font: F, overflow: "linebreak" },
8738
8744
  headStyles: {
@@ -8787,8 +8793,8 @@ function rn(e, t) {
8787
8793
  function Ht(e, t, n) {
8788
8794
  return e.map((o) => Yo(o, n[o.field], t[o.field], t));
8789
8795
  }
8790
- const vg = "\uFEFF";
8791
- function Zg(e, t, n = {}) {
8796
+ const yg = "\uFEFF";
8797
+ function ef(e, t, n = {}) {
8792
8798
  const {
8793
8799
  fileName: o = "export.csv",
8794
8800
  includeHeaders: r = !0,
@@ -8844,24 +8850,24 @@ function Zg(e, t, n = {}) {
8844
8850
  `;
8845
8851
  }
8846
8852
  }
8847
- Jo((d ? vg : "") + f, o, "text/csv;charset=utf-8;");
8853
+ Jo((d ? yg : "") + f, o, "text/csv;charset=utf-8;");
8848
8854
  }
8849
8855
  function Pn(e, t) {
8850
8856
  return t !== "" && e.includes(t) || e.includes('"') || e.includes(`
8851
8857
  `) || e.includes("\r") ? `"${e.replace(/"/g, '""')}"` : e;
8852
8858
  }
8853
8859
  const In = "ogx-xls-text";
8854
- function yg(e, t) {
8860
+ function Cg(e, t) {
8855
8861
  return e.type !== "number" && e.type !== "date" && e.type !== "boolean" && !it(t);
8856
8862
  }
8857
- function Cg(e) {
8863
+ function _g(e) {
8858
8864
  if (!/\.xlsx$/i.test(e)) return e;
8859
8865
  const t = e.replace(/\.xlsx$/i, ".xls");
8860
8866
  return console.warn(
8861
8867
  `[exportToExcel] "${e}" renamed to "${t}": exportToExcel writes an HTML table that Excel refuses to open as .xlsx. Use exportToExcelAdvanced for a real .xlsx file.`
8862
8868
  ), t;
8863
8869
  }
8864
- function ef(e, t, n = {}) {
8870
+ function tf(e, t, n = {}) {
8865
8871
  const {
8866
8872
  fileName: o = "export.xls",
8867
8873
  sheetName: r = "Sheet1",
@@ -8876,7 +8882,7 @@ function ef(e, t, n = {}) {
8876
8882
  }), f += "</tr></thead>"), f += "<tbody>";
8877
8883
  const u = (m, x, p = "") => {
8878
8884
  const v = p + h(m.text, it(m.raw));
8879
- return yg(x, m.raw) ? w(v) : `<td>${v}</td>`;
8885
+ return Cg(x, m.raw) ? w(v) : `<td>${v}</td>`;
8880
8886
  };
8881
8887
  if (cn(s, l))
8882
8888
  s.forEach((m) => {
@@ -8921,9 +8927,9 @@ function ef(e, t, n = {}) {
8921
8927
  }), f += "</tr>";
8922
8928
  }
8923
8929
  }
8924
- f += "</tbody></table></body></html>", Jo(f, Cg(o), "application/vnd.ms-excel");
8930
+ f += "</tbody></table></body></html>", Jo(f, _g(o), "application/vnd.ms-excel");
8925
8931
  }
8926
- function tf(e, t, n = {}) {
8932
+ function nf(e, t, n = {}) {
8927
8933
  const {
8928
8934
  fileName: o = "export.json",
8929
8935
  pretty: r = !0,
@@ -8973,12 +8979,12 @@ function tf(e, t, n = {}) {
8973
8979
  }
8974
8980
  Jo(r ? JSON.stringify(d, null, 2) : JSON.stringify(d), o, "application/json;charset=utf-8;");
8975
8981
  }
8976
- const _g = /^(?:https?:|data:image\/|blob:)/i, Sg = /^[a-z][a-z\d+.-]*:/i;
8977
- function Rg(e) {
8982
+ const Sg = /^(?:https?:|data:image\/|blob:)/i, Rg = /^[a-z][a-z\d+.-]*:/i;
8983
+ function kg(e) {
8978
8984
  const t = e.trim();
8979
- return t ? _g.test(t) ? t : Sg.test(t) ? null : t : null;
8985
+ return t ? Sg.test(t) ? t : Rg.test(t) ? null : t : null;
8980
8986
  }
8981
- async function nf(e, t, n) {
8987
+ async function of(e, t, n) {
8982
8988
  const o = window.open("", "_blank");
8983
8989
  if (!o) {
8984
8990
  console.error("Failed to open print window. Please check your popup blocker settings.");
@@ -9025,7 +9031,7 @@ async function nf(e, t, n) {
9025
9031
  w += `<th>${Te(u.headerName || u.field)}</th>`;
9026
9032
  }), w += "</tr></thead><tbody>";
9027
9033
  const b = (u, m, x = "", p = !1) => {
9028
- const { text: v } = rn(u, m), _ = m.type === "image" ? Rg(v) : null;
9034
+ const { text: v } = rn(u, m), _ = m.type === "image" ? kg(v) : null;
9029
9035
  if (_ !== null) {
9030
9036
  const E = `<img src="${Te(_)}" alt="${Te(m.headerName || m.field)}" style="max-height:40px;border-radius:4px;">`;
9031
9037
  return p ? `<td><div style="display:flex;justify-content:center;">${E}</div></td>` : `<td>${E}</td>`;
@@ -9093,7 +9099,7 @@ function Jo(e, t, n) {
9093
9099
  const o = new Blob([e], { type: n }), r = URL.createObjectURL(o), i = document.createElement("a");
9094
9100
  i.href = r, i.download = t, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
9095
9101
  }
9096
- function kg(e, t) {
9102
+ function Eg(e, t) {
9097
9103
  return e.type === "number" ? "number" : e.type === "boolean" ? "boolean" : e.type === "date" ? "date" : typeof t == "number" ? "number" : typeof t == "boolean" ? "boolean" : t instanceof Date ? "date" : "string";
9098
9104
  }
9099
9105
  function en(e) {
@@ -9107,22 +9113,22 @@ function en(e) {
9107
9113
  e.getMilliseconds()
9108
9114
  ));
9109
9115
  }
9110
- const Eg = /^(\d{4})-(\d{2})-(\d{2})$/, Mg = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?$/i, Ng = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?$/i;
9111
- function Pg(e) {
9116
+ const Mg = /^(\d{4})-(\d{2})-(\d{2})$/, Ng = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?$/i, Pg = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?$/i;
9117
+ function Ig(e) {
9112
9118
  if (e instanceof Date) return en(e);
9113
9119
  if (typeof e == "number") return Number.isFinite(e) ? en(new Date(e)) : null;
9114
9120
  if (typeof e != "string") return;
9115
- const t = e.trim(), n = Eg.exec(t);
9121
+ const t = e.trim(), n = Mg.exec(t);
9116
9122
  if (n) {
9117
9123
  const [o, r, i] = [Number(n[1]), Number(n[2]), Number(n[3])], l = new Date(Date.UTC(o, r - 1, i));
9118
9124
  return l.getUTCMonth() === r - 1 && l.getUTCDate() === i ? l : void 0;
9119
9125
  }
9120
- if (Mg.test(t)) {
9126
+ if (Ng.test(t)) {
9121
9127
  const o = new Date(t.replace(" ", "T"));
9122
9128
  return Number.isNaN(o.getTime()) ? void 0 : en(o);
9123
9129
  }
9124
9130
  }
9125
- function Ig(e, t) {
9131
+ function Tg(e, t) {
9126
9132
  if (t == null || t === "") return null;
9127
9133
  if (e === "number") {
9128
9134
  if (typeof t == "number") return Number.isFinite(t) ? t : null;
@@ -9130,7 +9136,7 @@ function Ig(e, t) {
9130
9136
  const n = Number(t);
9131
9137
  return Number.isSafeInteger(n) ? n : void 0;
9132
9138
  }
9133
- if (typeof t == "string" && Ng.test(t.trim())) {
9139
+ if (typeof t == "string" && Pg.test(t.trim())) {
9134
9140
  const n = Number(t.trim());
9135
9141
  return Number.isFinite(n) ? n : void 0;
9136
9142
  }
@@ -9145,7 +9151,7 @@ function Ig(e, t) {
9145
9151
  }
9146
9152
  return;
9147
9153
  }
9148
- return Pg(t);
9154
+ return Ig(t);
9149
9155
  }
9150
9156
  function Mi(e) {
9151
9157
  if (e == null) return null;
@@ -9160,18 +9166,18 @@ function Mi(e) {
9160
9166
  }
9161
9167
  return String(e);
9162
9168
  }
9163
- function Tg(e, t) {
9164
- const n = dn(e, t), o = kg(t, n);
9169
+ function Fg(e, t) {
9170
+ const n = dn(e, t), o = Eg(t, n);
9165
9171
  if (o !== "string") {
9166
- const r = Ig(o, n);
9172
+ const r = Tg(o, n);
9167
9173
  if (r != null) return r;
9168
9174
  if (!t.valueFormatter) return r === null ? null : Mi(n);
9169
9175
  }
9170
9176
  return t.valueFormatter ? Kn(e, t, n) : Mi(n);
9171
9177
  }
9172
- const Fl = "#,##0", Fg = "#,##0.##";
9173
- function Og(e) {
9174
- return Number.isInteger(e) ? Fl : Fg;
9178
+ const Fl = "#,##0", Og = "#,##0.##";
9179
+ function Dg(e) {
9180
+ return Number.isInteger(e) ? Fl : Og;
9175
9181
  }
9176
9182
  function Ni(e, t) {
9177
9183
  if (t?.numFmt) return t.numFmt;
@@ -9179,21 +9185,21 @@ function Ni(e, t) {
9179
9185
  }
9180
9186
  function Pi(e, t, n) {
9181
9187
  if (!(t?.numFmt || typeof n != "number" || e.type !== "number"))
9182
- return Og(n);
9188
+ return Dg(n);
9183
9189
  }
9184
- function Dg(e, t) {
9190
+ function Lg(e, t) {
9185
9191
  if (t != null) return t;
9186
9192
  const n = e.width ?? 120;
9187
9193
  return Math.min(60, Math.max(8, (n - 5) / 7));
9188
9194
  }
9189
- function Lg(e) {
9195
+ function Ag(e) {
9190
9196
  return e.length >= 8 && e[0] === 137 && e[1] === 80 && e[2] === 78 && e[3] === 71 ? "png" : e.length >= 3 && e[0] === 255 && e[1] === 216 && e[2] === 255 ? "jpeg" : e.length >= 6 && e[0] === 71 && e[1] === 73 && e[2] === 70 && e[3] === 56 ? "gif" : null;
9191
9197
  }
9192
9198
  function Ii(e, t) {
9193
9199
  const n = dn(e, t);
9194
9200
  return typeof n == "string" && n ? n : null;
9195
9201
  }
9196
- async function Ag(e) {
9202
+ async function $g(e) {
9197
9203
  const t = await Promise.allSettled(
9198
9204
  e.map(async (o) => {
9199
9205
  let r;
@@ -9206,7 +9212,7 @@ async function Ag(e) {
9206
9212
  if (!l.ok) throw new Error(`HTTP ${l.status}`);
9207
9213
  r = new Uint8Array(await l.arrayBuffer());
9208
9214
  }
9209
- const i = Lg(r);
9215
+ const i = Ag(r);
9210
9216
  if (!i) throw new Error("unsupported image format (only PNG, JPEG and GIF can be embedded)");
9211
9217
  return { url: o, buffer: r.slice().buffer, ext: i };
9212
9218
  })
@@ -9218,7 +9224,7 @@ async function Ag(e) {
9218
9224
  );
9219
9225
  }), n;
9220
9226
  }
9221
- async function of(e, t, n = {}) {
9227
+ async function rf(e, t, n = {}) {
9222
9228
  const {
9223
9229
  fileName: o = "export.xlsx",
9224
9230
  sheets: r,
@@ -9273,7 +9279,7 @@ async function of(e, t, n = {}) {
9273
9279
  O && !T.has(O) && !q.has(O) && (U.push(O), q.add(O));
9274
9280
  });
9275
9281
  }), U.length > 0) {
9276
- const L = await Ag(U);
9282
+ const L = await $g(U);
9277
9283
  for (const [H, { buffer: O, extension: X }] of L) {
9278
9284
  const S = p.addImage({ buffer: O, extension: X });
9279
9285
  T.set(H, S);
@@ -9283,7 +9289,7 @@ async function of(e, t, n = {}) {
9283
9289
  const ge = p.addWorksheet(Io(F, N));
9284
9290
  ge.columns = _.map((U) => ({
9285
9291
  key: U.field,
9286
- width: Dg(U, i[U.field]?.width),
9292
+ width: Lg(U, i[U.field]?.width),
9287
9293
  style: {
9288
9294
  numFmt: Ni(U, i[U.field])
9289
9295
  }
@@ -9305,7 +9311,7 @@ async function of(e, t, n = {}) {
9305
9311
  }
9306
9312
  let D = G ? 1 : 0;
9307
9313
  const ne = (U, q, L) => {
9308
- const H = _.map((S) => i[S.field]?.embedImage ? "" : Tg(U, S)), O = ge.addRow(H);
9314
+ const H = _.map((S) => i[S.field]?.embedImage ? "" : Fg(U, S)), O = ge.addRow(H);
9309
9315
  O.font = { size: d }, L > 0 && (O.outlineLevel = L);
9310
9316
  const X = !!oe && q % 2 === 1;
9311
9317
  if (se(O, (S, V, j) => {
@@ -9389,7 +9395,7 @@ function Ti() {
9389
9395
  function Fi() {
9390
9396
  return { top: { style: "medium", color: { argb: "FFcbd5e1" } } };
9391
9397
  }
9392
- function rf(e, t, n, o) {
9398
+ function lf(e, t, n, o) {
9393
9399
  return ce(
9394
9400
  () => o ? el(e, t, n) : Ko,
9395
9401
  [e, t, n, o]
@@ -9407,7 +9413,7 @@ const Ol = {
9407
9413
  "--ogx-toolbar-chip-active-text": "var(--ogx-color-primary-dark)",
9408
9414
  "--ogx-overlay-item-selected-bg": "color-mix(in srgb, var(--ogx-color-primary) 8%, transparent)",
9409
9415
  "--ogx-overlay-item-selected-text": "var(--ogx-color-primary-dark)"
9410
- }, $g = {
9416
+ }, Gg = {
9411
9417
  "--ogx-toolbar-background": "var(--ogx-grid-header-background)",
9412
9418
  "--ogx-toolbar-text": "var(--ogx-grid-header-text)",
9413
9419
  "--ogx-toolbar-border": "var(--ogx-grid-border-color)",
@@ -9457,7 +9463,7 @@ const Ol = {
9457
9463
  "--ogx-grid-pinned-left-shadow": "4px 0 24px -4px rgba(0, 0, 0, 0.05)",
9458
9464
  "--ogx-grid-pinned-right-shadow": "-4px 0 24px -4px rgba(0, 0, 0, 0.05)",
9459
9465
  // Toolbars
9460
- ...$g,
9466
+ ...Gg,
9461
9467
  "--ogx-toolbar-btn-primary-text": "#ffffff",
9462
9468
  "--ogx-toolbar-btn-danger-bg": "rgba(239, 68, 68, 0.08)",
9463
9469
  "--ogx-toolbar-btn-danger-hover": "rgba(239, 68, 68, 0.15)",
@@ -9480,7 +9486,7 @@ const Ol = {
9480
9486
  "--ogx-skeleton-base": "#f1f5f9",
9481
9487
  "--ogx-skeleton-highlight": "#ffffff",
9482
9488
  ...Ol
9483
- }, Gg = {
9489
+ }, Wg = {
9484
9490
  ...Dl,
9485
9491
  "--ogx-color-primary": "#60a5fa",
9486
9492
  "--ogx-color-primary-dark": "#3b82f6",
@@ -9535,8 +9541,8 @@ const Ol = {
9535
9541
  // On a dark surface the lighter primary reads better than primary-dark.
9536
9542
  "--ogx-toolbar-chip-active-text": "var(--ogx-color-primary)",
9537
9543
  "--ogx-overlay-item-selected-text": "var(--ogx-color-primary)"
9538
- }, Wg = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
9539
- function Hg(e) {
9544
+ }, Hg = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
9545
+ function Bg(e) {
9540
9546
  const t = {};
9541
9547
  function n(o, r) {
9542
9548
  r !== void 0 && (t[o] = r);
@@ -9544,7 +9550,7 @@ function Hg(e) {
9544
9550
  if (e.colors) {
9545
9551
  const o = e.colors;
9546
9552
  if (n("--ogx-color-primary", o.primary), n("--ogx-color-primary-dark", o.primaryDark), n("--ogx-color-primary-light", o.primaryLight), n("--ogx-color-primary-focus", o.primaryFocus), n("--ogx-color-secondary", o.secondary), n("--ogx-color-secondary-dark", o.secondaryDark), n("--ogx-color-secondary-light", o.secondaryLight), n("--ogx-color-success", o.success), n("--ogx-color-warning", o.warning), n("--ogx-color-error", o.error), n("--ogx-color-info", o.info), n("--ogx-color-white", o.white), n("--ogx-color-black", o.black), o.gray)
9547
- for (const r of Wg) n(`--ogx-color-gray-${r}`, o.gray[r]);
9553
+ for (const r of Hg) n(`--ogx-color-gray-${r}`, o.gray[r]);
9548
9554
  }
9549
9555
  if (e.typography) {
9550
9556
  const o = e.typography;
@@ -9588,14 +9594,14 @@ function Hg(e) {
9588
9594
  }
9589
9595
  return t;
9590
9596
  }
9591
- function lf({
9597
+ function af({
9592
9598
  theme: e,
9593
9599
  children: t,
9594
9600
  className: n,
9595
9601
  style: o
9596
9602
  }) {
9597
9603
  const r = _e.useMemo(
9598
- () => ({ ...e.mode === "dark" ? Gg : Dl, ...Hg(e) }),
9604
+ () => ({ ...e.mode === "dark" ? Wg : Dl, ...Bg(e) }),
9599
9605
  [e]
9600
9606
  );
9601
9607
  return /* @__PURE__ */ c(ol.Provider, { value: e, children: /* @__PURE__ */ c(
@@ -9607,7 +9613,7 @@ function lf({
9607
9613
  }
9608
9614
  ) });
9609
9615
  }
9610
- const af = {
9616
+ const sf = {
9611
9617
  mode: "dark",
9612
9618
  colors: {
9613
9619
  primary: "#60a5fa",
@@ -9682,7 +9688,7 @@ const af = {
9682
9688
  baseColor: "#1e293b",
9683
9689
  highlightColor: "#334155"
9684
9690
  }
9685
- }, sf = {
9691
+ }, cf = {
9686
9692
  colors: {
9687
9693
  primary: "#e11d48",
9688
9694
  primaryDark: "#be123c",
@@ -9698,7 +9704,7 @@ const af = {
9698
9704
  rowSelectedHoverBackground: "#fecdd3",
9699
9705
  cellFocusBorder: "#e11d48"
9700
9706
  }
9701
- }, cf = {
9707
+ }, df = {
9702
9708
  colors: {
9703
9709
  primary: "#059669",
9704
9710
  primaryDark: "#047857",
@@ -9714,7 +9720,7 @@ const af = {
9714
9720
  rowSelectedHoverBackground: "#a7f3d0",
9715
9721
  cellFocusBorder: "#059669"
9716
9722
  }
9717
- }, df = {
9723
+ }, uf = {
9718
9724
  colors: {
9719
9725
  primary: "#d97706",
9720
9726
  primaryDark: "#b45309",
@@ -9730,7 +9736,7 @@ const af = {
9730
9736
  rowSelectedHoverBackground: "#fde68a",
9731
9737
  cellFocusBorder: "#d97706"
9732
9738
  }
9733
- }, uf = {
9739
+ }, gf = {
9734
9740
  grid: {
9735
9741
  rowHeightCompact: "28px",
9736
9742
  rowHeightStandard: "36px",
@@ -9746,7 +9752,7 @@ const af = {
9746
9752
  fontSizeMd: "0.875rem"
9747
9753
  }
9748
9754
  };
9749
- function Bg() {
9755
+ function zg() {
9750
9756
  if (!(typeof window > "u"))
9751
9757
  try {
9752
9758
  return window.localStorage;
@@ -9762,7 +9768,7 @@ function Oi(e, t) {
9762
9768
  return;
9763
9769
  }
9764
9770
  }
9765
- function zg(e, t, n, o) {
9771
+ function Vg(e, t, n, o) {
9766
9772
  try {
9767
9773
  const r = n ? Object.fromEntries(
9768
9774
  Object.entries(t).filter(([i]) => n.includes(i))
@@ -9771,13 +9777,13 @@ function zg(e, t, n, o) {
9771
9777
  } catch {
9772
9778
  }
9773
9779
  }
9774
- function gf(e) {
9780
+ function ff(e) {
9775
9781
  const t = typeof e == "string" ? { key: e } : e, {
9776
9782
  key: n,
9777
9783
  debounceMs: o = 300,
9778
9784
  include: r,
9779
9785
  storage: i
9780
- } = t, [l] = pe(Bg), s = i ?? l, a = ee(r), d = ee(s);
9786
+ } = t, [l] = pe(zg), s = i ?? l, a = ee(r), d = ee(s);
9781
9787
  Ce(() => {
9782
9788
  a.current = r, d.current = s;
9783
9789
  });
@@ -9792,7 +9798,7 @@ function gf(e) {
9792
9798
  const p = f.current;
9793
9799
  f.current = null;
9794
9800
  const v = d.current;
9795
- p && v && zg(p.key, p.state, a.current, v);
9801
+ p && v && Vg(p.key, p.state, a.current, v);
9796
9802
  }, []), m = A(
9797
9803
  (p) => {
9798
9804
  f.current && f.current.key !== n && u(), f.current = { key: n, state: p }, b.current && clearTimeout(b.current), b.current = setTimeout(u, o);
@@ -9819,31 +9825,31 @@ export {
9819
9825
  Qd as Cell,
9820
9826
  $n as Checkbox,
9821
9827
  Sl as ColumnVisibilityPanel,
9822
- Ug as DataGrid,
9823
- lf as DataGridThemeProvider,
9824
- qu as FilterPanel,
9825
- Xg as GridToolbar,
9828
+ qg as DataGrid,
9829
+ af as DataGridThemeProvider,
9830
+ Xu as FilterPanel,
9831
+ Yg as GridToolbar,
9826
9832
  Nn as GridTooltip,
9827
9833
  Bc as Header,
9828
- Jg as Input,
9834
+ Qg as Input,
9829
9835
  yl as Pagination,
9830
9836
  Po as Row,
9831
- qg as Skeleton,
9832
- df as amberTheme,
9833
- uf as compactTheme,
9834
- af as darkTheme,
9835
- cf as emeraldTheme,
9836
- Zg as exportToCsv,
9837
- ef as exportToExcel,
9838
- of as exportToExcelAdvanced,
9839
- tf as exportToJson,
9840
- Qg as exportToPdf,
9837
+ Xg as Skeleton,
9838
+ uf as amberTheme,
9839
+ gf as compactTheme,
9840
+ sf as darkTheme,
9841
+ df as emeraldTheme,
9842
+ ef as exportToCsv,
9843
+ tf as exportToExcel,
9844
+ rf as exportToExcelAdvanced,
9845
+ nf as exportToJson,
9846
+ Zg as exportToPdf,
9841
9847
  kr as formatAggregationValue,
9842
- nf as printGrid,
9843
- sf as roseTheme,
9848
+ of as printGrid,
9849
+ cf as roseTheme,
9844
9850
  Td as useAggregation,
9845
- Yg as useGridApiRef,
9846
- gf as useGridStateStorage,
9847
- rf as usePivot
9851
+ Jg as useGridApiRef,
9852
+ ff as useGridStateStorage,
9853
+ lf as usePivot
9848
9854
  };
9849
9855
  //# sourceMappingURL=opengridx.es.js.map