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