@gears-frontx/ui-kit 0.4.7 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/chunks/data-grid-portal-container-context.js +10 -0
  2. package/dist/chunks/data-grid-portal-container-context.js.map +1 -0
  3. package/dist/components/data-grid/data-grid-types.d.ts +10 -0
  4. package/dist/components/data-grid/data-grid-types.d.ts.map +1 -1
  5. package/dist/components/data-grid/data-grid.d.ts +1 -1
  6. package/dist/components/data-grid/data-grid.d.ts.map +1 -1
  7. package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts.map +1 -1
  8. package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts.map +1 -1
  9. package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts.map +1 -1
  10. package/dist/components/data-grid/plugins/order/components/data-grid-order-button.d.ts.map +1 -1
  11. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts.map +1 -1
  12. package/dist/components/data-grid/services/core/data-grid-portal-container-context.d.ts +9 -0
  13. package/dist/components/data-grid/services/core/data-grid-portal-container-context.d.ts.map +1 -0
  14. package/dist/data-grid/actions-menu.js +99 -98
  15. package/dist/data-grid/actions-menu.js.map +1 -1
  16. package/dist/data-grid/filters.js +369 -366
  17. package/dist/data-grid/filters.js.map +1 -1
  18. package/dist/data-grid/order.js +111 -110
  19. package/dist/data-grid/order.js.map +1 -1
  20. package/dist/data-grid/table-configuration.js +49 -37
  21. package/dist/data-grid/table-configuration.js.map +1 -1
  22. package/dist/data-grid.js +462 -460
  23. package/dist/data-grid.js.map +1 -1
  24. package/dist/docs/data-grid.md +29 -4
  25. package/package.json +1 -1
package/dist/data-grid.js CHANGED
@@ -1,15 +1,15 @@
1
1
  "use client";
2
- import { jsx as S, jsxs as G, Fragment as N } from "react/jsx-runtime";
2
+ import { jsx as m, jsxs as G, Fragment as N } from "react/jsx-runtime";
3
3
  import { useRef as $, useState as ut, useEffect as M, useMemo as vt, Suspense as kt } from "react";
4
4
  import { b as R, u as j, i as U, D as xt } from "./chunks/plugins-helpers.js";
5
- import { c as $n, a as jn } from "./chunks/plugins-helpers.js";
5
+ import { c as Kn, a as Un } from "./chunks/plugins-helpers.js";
6
6
  import { cx as W } from "class-variance-authority";
7
7
  import { Spinner as Lt } from "./spinner.js";
8
- import { SearchXIcon as _t, OctagonAlertIcon as Et, TablePropertiesIcon as It } from "lucide-react";
8
+ import { SearchXIcon as _t, OctagonAlertIcon as Et, TablePropertiesIcon as Dt } from "lucide-react";
9
9
  import { m as H } from "./chunks/messages.js";
10
10
  import { Empty as dt, EmptyHeader as ft, EmptyMedia as pt, EmptyTitle as mt, EmptyDescription as St } from "./empty.js";
11
11
  import { create as V } from "zustand";
12
- import { c as Dt } from "./chunks/hooked.js";
12
+ import { c as It } from "./chunks/hooked.js";
13
13
  import { S as Gt, u as Mt, D as Rt } from "./chunks/segment.js";
14
14
  import { ToggleGroupItem as Ot } from "./toggle-group.js";
15
15
  import { i as z } from "./chunks/is-record.js";
@@ -20,76 +20,77 @@ import { u as P } from "./chunks/table-context.js";
20
20
  import { s as Ht, D as et, r as Nt, a as X, b as Vt } from "./chunks/resolve-body-cell-props.js";
21
21
  import { TableHead as Pt, TableRow as Y, TableBody as Tt, TableHeader as Ft, Table as Bt } from "./table.js";
22
22
  import { D as zt } from "./chunks/data-grid-record-context.js";
23
- import { u as Un } from "./chunks/data-grid-record-context.js";
24
- import { i as D } from "./chunks/table-types.js";
25
- import { u as $t } from "./chunks/use-latest.js";
26
- import './chunks/data-grid.DSkYrsay.css';const jt = "_delayed_1ys81_5", Kt = {
27
- delayed: jt
23
+ import { u as Jn } from "./chunks/data-grid-record-context.js";
24
+ import { i as I } from "./chunks/table-types.js";
25
+ import { D as $t } from "./chunks/data-grid-portal-container-context.js";
26
+ import { u as jt } from "./chunks/use-latest.js";
27
+ import './chunks/data-grid.DSkYrsay.css';const Kt = "_delayed_1ys81_5", Ut = {
28
+ delayed: Kt
28
29
  };
29
30
  function Q({ className: t }) {
30
- return /* @__PURE__ */ S("span", { className: W(Kt.delayed, t), children: /* @__PURE__ */ S(Lt, { size: "lg" }) });
31
+ return /* @__PURE__ */ m("span", { className: W(Ut.delayed, t), children: /* @__PURE__ */ m(Lt, { size: "lg" }) });
31
32
  }
32
- const Ut = "_root_9f4nk_13", Yt = {
33
- root: Ut
33
+ const Yt = "_root_9f4nk_13", Jt = {
34
+ root: Yt
34
35
  };
35
- function Jt() {
36
+ function qt() {
36
37
  const t = R(), e = t.load.useLoadStateStore((o) => o.recordsLoadState), n = t.core.useExternalLoadingStore((o) => o.loading);
37
38
  return e === "loading" || n;
38
39
  }
39
- const qt = "_loaderOverlay_ff48v_31", Xt = {
40
- loaderOverlay: qt
40
+ const Xt = "_loaderOverlay_ff48v_31", Qt = {
41
+ loaderOverlay: Xt
41
42
  };
42
- function Qt({ children: t }) {
43
- const n = R().core.useLoadStateStore((m) => m.loadState), s = Jt() && n === "loaded", a = s || n === "loading";
44
- return /* @__PURE__ */ G("div", { className: Yt.root, "aria-busy": a ? "true" : void 0, children: [
43
+ function Zt({ children: t }) {
44
+ const n = R().core.useLoadStateStore((p) => p.loadState), s = qt() && n === "loaded", a = s || n === "loading";
45
+ return /* @__PURE__ */ G("div", { className: Jt.root, "aria-busy": a ? "true" : void 0, children: [
45
46
  t,
46
- s && /* @__PURE__ */ S("div", { className: Xt.loaderOverlay, children: /* @__PURE__ */ S(Q, {}) })
47
+ s && /* @__PURE__ */ m("div", { className: Qt.loaderOverlay, children: /* @__PURE__ */ m(Q, {}) })
47
48
  ] });
48
49
  }
49
- const Zt = "_emptyState_1tt1k_3", te = {
50
- emptyState: Zt
50
+ const te = "_emptyState_1tt1k_3", ee = {
51
+ emptyState: te
51
52
  };
52
- function ee() {
53
+ function ne() {
53
54
  const { useStore: t } = j(), e = t((n) => n.hasActiveFilters);
54
- return /* @__PURE__ */ S(dt, { className: te.emptyState, children: /* @__PURE__ */ G(ft, { children: [
55
- /* @__PURE__ */ S(pt, { variant: "icon", children: /* @__PURE__ */ S(_t, {}) }),
56
- /* @__PURE__ */ S(mt, { children: H.emptyState.noResultsFound }),
57
- e && /* @__PURE__ */ S(St, { children: H.emptyState.noResultsFoundDescription })
55
+ return /* @__PURE__ */ m(dt, { className: ee.emptyState, children: /* @__PURE__ */ G(ft, { children: [
56
+ /* @__PURE__ */ m(pt, { variant: "icon", children: /* @__PURE__ */ m(_t, {}) }),
57
+ /* @__PURE__ */ m(mt, { children: H.emptyState.noResultsFound }),
58
+ e && /* @__PURE__ */ m(St, { children: H.emptyState.noResultsFoundDescription })
58
59
  ] }) });
59
60
  }
60
- const ne = "_dataGridLayoutMain_ta8be_5", oe = {
61
- dataGridLayoutMain: ne
61
+ const oe = "_dataGridLayoutMain_ta8be_5", re = {
62
+ dataGridLayoutMain: oe
62
63
  };
63
- function re() {
64
- const { useStore: t } = j(), e = R(), n = t((f) => f.visibleRecords), o = t((f) => f.hasActiveFilters), s = e.layout.useLayoutStore((f) => f.activeSlotIds.get("main")), a = e.layout.useLayoutStore((f) => f.slots.get("main")), m = a == null ? void 0 : a.find((f) => f.id === s), g = e.layout.useLayoutStore((f) => f.slots.get("empty")), c = g == null ? void 0 : g[0], u = n.length === 0, l = m && (!u || o), d = u;
65
- return /* @__PURE__ */ G("div", { className: oe.dataGridLayoutMain, children: [
66
- l && /* @__PURE__ */ S(m.component, {}),
67
- d && (c ? /* @__PURE__ */ S(c.component, {}) : /* @__PURE__ */ S(ee, {}))
64
+ function se() {
65
+ const { useStore: t } = j(), e = R(), n = t((S) => S.visibleRecords), o = t((S) => S.hasActiveFilters), s = e.layout.useLayoutStore((S) => S.activeSlotIds.get("main")), a = e.layout.useLayoutStore((S) => S.slots.get("main")), p = a == null ? void 0 : a.find((S) => S.id === s), g = e.layout.useLayoutStore((S) => S.slots.get("empty")), c = g == null ? void 0 : g[0], d = n.length === 0, l = p && (!d || o), f = d;
66
+ return /* @__PURE__ */ G("div", { className: re.dataGridLayoutMain, children: [
67
+ l && /* @__PURE__ */ m(p.component, {}),
68
+ f && (c ? /* @__PURE__ */ m(c.component, {}) : /* @__PURE__ */ m(ne, {}))
68
69
  ] });
69
70
  }
70
- function se({ name: t }) {
71
+ function ie({ name: t }) {
71
72
  const n = R().layout.useLayoutStore((o) => o.slots.get(t));
72
- return !n || n.length === 0 ? null : /* @__PURE__ */ S(N, { children: n.map((o) => /* @__PURE__ */ S(o.component, {}, o.id)) });
73
+ return !n || n.length === 0 ? null : /* @__PURE__ */ m(N, { children: n.map((o) => /* @__PURE__ */ m(o.component, {}, o.id)) });
73
74
  }
74
- const ie = "_dataGridTopDefault_5t4tt_1", ae = "_topStartSlots_5t4tt_16", ce = "_topStartSlot_5t4tt_16", le = "_topEndSlot_5t4tt_32", ue = "_topEndSlots_5t4tt_36", F = {
75
- dataGridTopDefault: ie,
76
- topStartSlots: ae,
77
- topStartSlot: ce,
78
- topEndSlot: le,
79
- topEndSlots: ue
75
+ const ae = "_dataGridTopDefault_5t4tt_1", ce = "_topStartSlots_5t4tt_16", le = "_topStartSlot_5t4tt_16", ue = "_topEndSlot_5t4tt_32", de = "_topEndSlots_5t4tt_36", F = {
76
+ dataGridTopDefault: ae,
77
+ topStartSlots: ce,
78
+ topStartSlot: le,
79
+ topEndSlot: ue,
80
+ topEndSlots: de
80
81
  };
81
- function de() {
82
+ function fe() {
82
83
  const t = R(), e = t.layout.useLayoutStore(
83
84
  (a) => a.slots.get("top-start")
84
85
  ), n = t.layout.useLayoutStore((a) => a.slots.get("top-end")), o = ((e == null ? void 0 : e.length) ?? 0) > 0, s = ((n == null ? void 0 : n.length) ?? 0) > 0;
85
86
  return !o && !s ? null : /* @__PURE__ */ G("div", { className: F.dataGridTopDefault, children: [
86
- o && /* @__PURE__ */ S("div", { className: F.topStartSlots, children: e == null ? void 0 : e.map((a) => /* @__PURE__ */ S("div", { className: F.topStartSlot, children: /* @__PURE__ */ S(a.component, {}) }, a.id)) }),
87
- s && /* @__PURE__ */ S("div", { className: F.topEndSlots, children: n == null ? void 0 : n.map((a) => /* @__PURE__ */ S("div", { className: F.topEndSlot, children: /* @__PURE__ */ S(a.component, {}) }, a.id)) })
87
+ o && /* @__PURE__ */ m("div", { className: F.topStartSlots, children: e == null ? void 0 : e.map((a) => /* @__PURE__ */ m("div", { className: F.topStartSlot, children: /* @__PURE__ */ m(a.component, {}) }, a.id)) }),
88
+ s && /* @__PURE__ */ m("div", { className: F.topEndSlots, children: n == null ? void 0 : n.map((a) => /* @__PURE__ */ m("div", { className: F.topEndSlot, children: /* @__PURE__ */ m(a.component, {}) }, a.id)) })
88
89
  ] });
89
90
  }
90
- const fe = "_wrapper_1h8lw_7", pe = "_replacement_1h8lw_18", nt = {
91
- wrapper: fe,
92
- replacement: pe
91
+ const pe = "_wrapper_1h8lw_7", me = "_replacement_1h8lw_18", nt = {
92
+ wrapper: pe,
93
+ replacement: me
93
94
  };
94
95
  function ht(t) {
95
96
  const e = [];
@@ -99,64 +100,64 @@ function ht(t) {
99
100
  }
100
101
  return e;
101
102
  }
102
- function me(t) {
103
+ function Se(t) {
103
104
  const { display: e, flexWrap: n } = getComputedStyle(t);
104
105
  return e.includes("flex") && n !== "" && n !== "nowrap";
105
106
  }
106
- function Se(t) {
107
+ function he(t) {
107
108
  let e = Number.NEGATIVE_INFINITY, n = Number.POSITIVE_INFINITY;
108
109
  for (const o of ht(t)) {
109
- const { top: s, bottom: a, width: m, height: g } = o.getBoundingClientRect();
110
- m === 0 && g === 0 || (e = Math.max(e, s), n = Math.min(n, a));
110
+ const { top: s, bottom: a, width: p, height: g } = o.getBoundingClientRect();
111
+ p === 0 && g === 0 || (e = Math.max(e, s), n = Math.min(n, a));
111
112
  }
112
113
  return e <= n + 0.5;
113
114
  }
114
- function he(t) {
115
+ function ye(t) {
115
116
  return [t, ...Array.from(t.querySelectorAll("*"))].every(
116
- (e) => !me(e) || Se(e)
117
+ (e) => !Se(e) || he(e)
117
118
  );
118
119
  }
119
- function ye() {
120
- const t = R(), e = t.layout.useLayoutStore((u) => u.activeSlotIds.get("top")), n = t.layout.useLayoutStore((u) => u.slots.get("top")), o = n == null ? void 0 : n.find((u) => u.id === e), s = (o == null ? void 0 : o.id) === "default", a = $(null), [m, g] = ut();
120
+ function ge() {
121
+ const t = R(), e = t.layout.useLayoutStore((d) => d.activeSlotIds.get("top")), n = t.layout.useLayoutStore((d) => d.slots.get("top")), o = n == null ? void 0 : n.find((d) => d.id === e), s = (o == null ? void 0 : o.id) === "default", a = $(null), [p, g] = ut();
121
122
  if (M(() => {
122
- const u = a.current;
123
- if (!s || !u) return;
124
- const l = new ResizeObserver((d) => {
123
+ const d = a.current;
124
+ if (!s || !d) return;
125
+ const l = new ResizeObserver((f) => {
125
126
  var r, i;
126
- const f = d[d.length - 1], p = ((i = (r = f.borderBoxSize) == null ? void 0 : r[0]) == null ? void 0 : i.blockSize) ?? f.contentRect.height;
127
- g(he(u) ? p : void 0);
127
+ const S = f[f.length - 1], u = ((i = (r = S.borderBoxSize) == null ? void 0 : r[0]) == null ? void 0 : i.blockSize) ?? S.contentRect.height;
128
+ g(ye(d) ? u : void 0);
128
129
  });
129
- return l.observe(u), () => l.disconnect();
130
+ return l.observe(d), () => l.disconnect();
130
131
  }, [s]), !o) return null;
131
- const c = s ? de : o.component;
132
- return /* @__PURE__ */ S(
132
+ const c = s ? fe : o.component;
133
+ return /* @__PURE__ */ m(
133
134
  "div",
134
135
  {
135
136
  ref: a,
136
137
  className: W(nt.wrapper, !s && nt.replacement),
137
- style: !s && m ? { minBlockSize: m } : void 0,
138
- children: /* @__PURE__ */ S(c, {})
138
+ style: !s && p ? { minBlockSize: p } : void 0,
139
+ children: /* @__PURE__ */ m(c, {})
139
140
  }
140
141
  );
141
142
  }
142
- const ge = "_center_s4klt_3", ot = {
143
- center: ge
143
+ const Ce = "_center_s4klt_3", ot = {
144
+ center: Ce
144
145
  };
145
- function Ce({ loadState: t, children: e }) {
146
- return t === "loaded" ? /* @__PURE__ */ S(N, { children: e }) : t === "error" ? /* @__PURE__ */ S(dt, { className: ot.center, children: /* @__PURE__ */ G(ft, { children: [
147
- /* @__PURE__ */ S(pt, { variant: "icon", children: /* @__PURE__ */ S(Et, {}) }),
148
- /* @__PURE__ */ S(mt, { children: H.loadError.headerDefault }),
149
- /* @__PURE__ */ S(St, { children: H.loadError.bodyDefault })
150
- ] }) }) : /* @__PURE__ */ S(Q, { className: ot.center });
146
+ function be({ loadState: t, children: e }) {
147
+ return t === "loaded" ? /* @__PURE__ */ m(N, { children: e }) : t === "error" ? /* @__PURE__ */ m(dt, { className: ot.center, children: /* @__PURE__ */ G(ft, { children: [
148
+ /* @__PURE__ */ m(pt, { variant: "icon", children: /* @__PURE__ */ m(Et, {}) }),
149
+ /* @__PURE__ */ m(mt, { children: H.loadError.headerDefault }),
150
+ /* @__PURE__ */ m(St, { children: H.loadError.bodyDefault })
151
+ ] }) }) : /* @__PURE__ */ m(Q, { className: ot.center });
151
152
  }
152
- function be() {
153
- const t = j(), { useStore: e } = t, { core: n } = R(), o = e((m) => m.visibleRecords), s = n.useLoadStateStore((m) => m.loadState), a = o.length === 0;
154
- return M(() => (t.init().catch((m) => {
155
- process.env.NODE_ENV !== "production" && console.error("[DataGrid] Initial load failed:", m);
156
- }), () => t.destroy()), [t]), /* @__PURE__ */ S(Qt, { children: /* @__PURE__ */ G(Ce, { loadState: s, children: [
157
- /* @__PURE__ */ S(ye, {}),
158
- /* @__PURE__ */ S(re, {}),
159
- !a && /* @__PURE__ */ S(se, { name: "bottom" })
153
+ function we() {
154
+ const t = j(), { useStore: e } = t, { core: n } = R(), o = e((p) => p.visibleRecords), s = n.useLoadStateStore((p) => p.loadState), a = o.length === 0;
155
+ return M(() => (t.init().catch((p) => {
156
+ process.env.NODE_ENV !== "production" && console.error("[DataGrid] Initial load failed:", p);
157
+ }), () => t.destroy()), [t]), /* @__PURE__ */ m(Zt, { children: /* @__PURE__ */ G(be, { loadState: s, children: [
158
+ /* @__PURE__ */ m(ge, {}),
159
+ /* @__PURE__ */ m(se, {}),
160
+ !a && /* @__PURE__ */ m(ie, { name: "bottom" })
160
161
  ] }) });
161
162
  }
162
163
  function yt() {
@@ -170,7 +171,7 @@ function yt() {
170
171
  setLoaded: o,
171
172
  setError: s,
172
173
  setBlank: a,
173
- reset: m,
174
+ reset: p,
174
175
  loadPromise: g
175
176
  };
176
177
  function n() {
@@ -185,21 +186,21 @@ function yt() {
185
186
  function a() {
186
187
  t.setState({ loadState: "blank" });
187
188
  }
188
- function m() {
189
+ function p() {
189
190
  e += 1, a();
190
191
  }
191
192
  async function g(c) {
192
- const u = ++e;
193
+ const d = ++e;
193
194
  n();
194
195
  try {
195
196
  const l = await c;
196
- return u === e && o(), l;
197
+ return d === e && o(), l;
197
198
  } catch (l) {
198
- throw u === e && s(), l;
199
+ throw d === e && s(), l;
199
200
  }
200
201
  }
201
202
  }
202
- function we() {
203
+ function ve() {
203
204
  const { useLoadState: t, loadPromise: e, reset: n } = yt(), o = V()(() => ({
204
205
  loading: !1
205
206
  }));
@@ -214,8 +215,8 @@ function we() {
214
215
  o.setState({ loading: a });
215
216
  }
216
217
  }
217
- function ve() {
218
- const t = Dt();
218
+ function ke() {
219
+ const t = It();
219
220
  return {
220
221
  hook: t.hook,
221
222
  callHook: t.callHook,
@@ -223,21 +224,21 @@ function ve() {
223
224
  callHookSync: t.callHookSync
224
225
  };
225
226
  }
226
- const Z = "table_layout", gt = "cards_layout", rt = "view_selector", ke = /* @__PURE__ */ new Map([
227
+ const Z = "table_layout", gt = "cards_layout", rt = "view_selector", xe = /* @__PURE__ */ new Map([
227
228
  [Z, H.layoutMainSlotSelector.table],
228
229
  [gt, H.layoutMainSlotSelector.cards]
229
230
  ]);
230
- function xe() {
231
+ function Le() {
231
232
  const t = R(), e = t.layout.useLayoutStore((s) => s.slots.get("main")), n = t.layout.useLayoutStore((s) => s.activeSlotIds.get("main"));
232
233
  if (!e || e.length < 2) return null;
233
- return /* @__PURE__ */ S(Gt, { size: "sm", iconOnly: !0, value: n, onValueChange: o, children: e.map((s) => {
234
+ return /* @__PURE__ */ m(Gt, { size: "sm", iconOnly: !0, value: n, onValueChange: o, children: e.map((s) => {
234
235
  const a = "icon" in s ? s.icon : void 0;
235
- return /* @__PURE__ */ S(
236
+ return /* @__PURE__ */ m(
236
237
  Ot,
237
238
  {
238
239
  value: s.id,
239
- "aria-label": ke.get(s.id) ?? s.id,
240
- children: a ? /* @__PURE__ */ S(a, {}) : null
240
+ "aria-label": xe.get(s.id) ?? s.id,
241
+ children: a ? /* @__PURE__ */ m(a, {}) : null
241
242
  },
242
243
  s.id
243
244
  );
@@ -246,61 +247,61 @@ function xe() {
246
247
  s && t.layout.setActiveSlotId("main", s);
247
248
  }
248
249
  }
249
- function Le(t) {
250
+ function _e(t) {
250
251
  const e = V()(() => ({
251
252
  slots: /* @__PURE__ */ new Map(),
252
253
  activeSlotIds: /* @__PURE__ */ new Map()
253
254
  })), n = {
254
255
  registerSlot: a,
255
- setActiveSlotId: m,
256
+ setActiveSlotId: p,
256
257
  getActiveSlotId: g
257
258
  };
258
259
  return t.plugins.registerPublicApi(n), {
259
260
  ...n,
260
261
  useLayoutStore: e
261
262
  };
262
- function o(c, u) {
263
- return s(c).find((l) => l.id === u);
263
+ function o(c, d) {
264
+ return s(c).find((l) => l.id === d);
264
265
  }
265
266
  function s(c) {
266
267
  return e.getState().slots.get(c) ?? [];
267
268
  }
268
- function a(c, u) {
269
+ function a(c, d) {
269
270
  (c === "top-start" || c === "top-end") && !o("top", "default") && a("top", {
270
271
  id: "default",
271
272
  active: !0,
272
273
  component: () => null
273
274
  });
274
- const l = u.id ?? Math.random().toString(), d = s(c), f = u.order ?? (d.length + 1) * 10, p = { id: l, name: c, ...u, order: f }, r = [...d, p].sort((i, h) => i.order - h.order);
275
+ const l = d.id ?? Math.random().toString(), f = s(c), S = d.order ?? (f.length + 1) * 10, u = { id: l, name: c, ...d, order: S }, r = [...f, u].sort((i, h) => i.order - h.order);
275
276
  e.setState((i) => {
276
277
  const h = new Map(i.slots);
277
278
  return h.set(c, r), { slots: h };
278
- }), ("active" in u && u.active || r.length === 1) && m(c, p.id), c === "main" && r.length >= 2 && !o("top-end", rt) && a("top-end", {
279
+ }), ("active" in d && d.active || r.length === 1) && p(c, u.id), c === "main" && r.length >= 2 && !o("top-end", rt) && a("top-end", {
279
280
  id: rt,
280
- component: xe
281
+ component: Le
281
282
  });
282
283
  }
283
- function m(c, u) {
284
+ function p(c, d) {
284
285
  e.setState((l) => {
285
- const d = new Map(l.activeSlotIds);
286
- return d.set(c, u), { activeSlotIds: d };
286
+ const f = new Map(l.activeSlotIds);
287
+ return f.set(c, d), { activeSlotIds: f };
287
288
  });
288
289
  }
289
290
  function g(c) {
290
291
  return e.getState().activeSlotIds.get(c);
291
292
  }
292
293
  }
293
- function _e(t, e) {
294
+ function Ee(t, e) {
294
295
  const n = ((e == null ? void 0 : e.id) ?? Math.random()).toString(), o = new AbortController(), s = yt(), a = structuredClone((e == null ? void 0 : e.loadContext) ?? {});
295
- let m, g, c;
296
- const u = {}, l = {
296
+ let p, g, c;
297
+ const d = {}, l = {
297
298
  id: n,
298
299
  useLoadState: s.useLoadState,
299
300
  signal: o.signal,
300
- abort: d,
301
+ abort: f,
301
302
  refresh: (e == null ? void 0 : e.refresh) ?? null,
302
303
  get promise() {
303
- return u.promise;
304
+ return d.promise;
304
305
  },
305
306
  get loadContext() {
306
307
  return a;
@@ -309,17 +310,17 @@ function _e(t, e) {
309
310
  return g;
310
311
  },
311
312
  get fetchResult() {
312
- return m;
313
+ return p;
313
314
  },
314
315
  get error() {
315
316
  return c;
316
317
  }
317
318
  };
318
- return u.promise = s.loadPromise(f()), l;
319
- function d() {
319
+ return d.promise = s.loadPromise(S()), l;
320
+ function f() {
320
321
  o.abort();
321
322
  }
322
- async function f() {
323
+ async function S() {
323
324
  try {
324
325
  await t.hooked.callHookParallel("load:prepare", l);
325
326
  const i = await t.hooked.callHookParallel("load:context", l);
@@ -328,7 +329,7 @@ function _e(t, e) {
328
329
  ...l.loadContext,
329
330
  signal: l.signal
330
331
  };
331
- if (m = await t.config.load.current(h), p(m), g = (await t.hooked.callHook("load:process", l))[0] ?? m, p(g), (e == null ? void 0 : e.store) !== !1) {
332
+ if (p = await t.config.load.current(h), u(p), g = (await t.hooked.callHook("load:process", l))[0] ?? p, u(g), (e == null ? void 0 : e.store) !== !1) {
332
333
  const y = t.hooked.callHookSync("load:store", l);
333
334
  (!y.length || y.every((C) => C !== !0)) && (t.storage.clearSections(), t.storage.createSection({ loadContext: a }, g.results));
334
335
  }
@@ -337,7 +338,7 @@ function _e(t, e) {
337
338
  throw c = i, await t.hooked.callHook("load:error", l), c;
338
339
  }
339
340
  }
340
- function p(i) {
341
+ function u(i) {
341
342
  if (typeof i != "object" || i === null || !("results" in i))
342
343
  throw new Error(
343
344
  `Load result must be an object with "results" and "total?" properties. Got ${JSON.stringify(i)}`
@@ -359,7 +360,7 @@ function _e(t, e) {
359
360
  }
360
361
  }
361
362
  }
362
- function Ee(t) {
363
+ function De(t) {
363
364
  const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
364
365
  let o;
365
366
  const s = V()(() => ({
@@ -367,16 +368,16 @@ function Ee(t) {
367
368
  recordsLoadState: "blank"
368
369
  })), a = {
369
370
  triggerLoad: r,
370
- refresh: f,
371
- abort: u,
371
+ refresh: S,
372
+ abort: d,
372
373
  getLoadInstances: c,
373
374
  useLoadStateStore: s
374
375
  };
375
376
  return t.plugins.registerPublicApi(a), {
376
377
  ...a,
377
- init: d
378
+ init: f
378
379
  };
379
- function m() {
380
+ function p() {
380
381
  s.setState({
381
382
  loadState: e.size > 0 ? "loading" : "blank",
382
383
  recordsLoadState: n.size > 0 ? "loading" : "blank"
@@ -389,7 +390,7 @@ function Ee(t) {
389
390
  function c() {
390
391
  return [...e.values()];
391
392
  }
392
- function u() {
393
+ function d() {
393
394
  for (const i of e.values())
394
395
  i.abort();
395
396
  }
@@ -401,7 +402,7 @@ function Ee(t) {
401
402
  throw h;
402
403
  }
403
404
  }
404
- async function d() {
405
+ async function f() {
405
406
  await t.hooked.callHook("init");
406
407
  const i = o;
407
408
  if (!await l(r())) return;
@@ -409,18 +410,18 @@ function Ee(t) {
409
410
  for (; o !== h; )
410
411
  h = o, await h;
411
412
  }
412
- function f(i = {}) {
413
- return o = p(i), o;
413
+ function S(i = {}) {
414
+ return o = u(i), o;
414
415
  }
415
- async function p(i) {
416
- u();
416
+ async function u(i) {
417
+ d();
417
418
  const h = { resetFilters: i.resetFilters ?? !0 };
418
419
  await t.hooked.callHook("refresh", h), await l(r({ refresh: h }));
419
420
  }
420
421
  function r(i) {
421
- const h = _e(t, i);
422
- return e.set(h.id, h), g(i) && n.add(h.id), m(), h.promise.finally(() => {
423
- e.delete(h.id), n.delete(h.id), m();
422
+ const h = Ee(t, i);
423
+ return e.set(h.id, h), g(i) && n.add(h.id), p(), h.promise.finally(() => {
424
+ e.delete(h.id), n.delete(h.id), p();
424
425
  }).catch(() => {
425
426
  }), h;
426
427
  }
@@ -430,19 +431,19 @@ function Ie(t) {
430
431
  registerPersistentState: c
431
432
  };
432
433
  return t.plugins.registerPublicApi(a), a;
433
- function m(u) {
434
- return `dataGrid:${o}:${u}`;
434
+ function p(d) {
435
+ return `dataGrid:${o}:${d}`;
435
436
  }
436
- function g(u) {
437
+ function g(d) {
437
438
  if (typeof window > "u") return null;
438
439
  try {
439
- return u === "localStorage" ? localStorage : sessionStorage;
440
+ return d === "localStorage" ? localStorage : sessionStorage;
440
441
  } catch {
441
442
  return null;
442
443
  }
443
444
  }
444
- function c(u, l = {}) {
445
- const d = m(u), f = l.storage ?? s, p = f === "router" && l.router === !1;
445
+ function c(d, l = {}) {
446
+ const f = p(d), S = l.storage ?? s, u = S === "router" && l.router === !1;
446
447
  return {
447
448
  get value() {
448
449
  return r();
@@ -451,41 +452,41 @@ function Ie(t) {
451
452
  buildStorageItem: h
452
453
  };
453
454
  function r() {
454
- if (p)
455
+ if (u)
455
456
  return;
456
- if (f === "memory")
457
- return n.get(u);
458
- if (f === "router") {
457
+ if (S === "memory")
458
+ return n.get(d);
459
+ if (S === "router") {
459
460
  const C = new URLSearchParams(window.location.search);
460
- return st(C.get(u));
461
+ return st(C.get(d));
461
462
  }
462
- const y = g(f);
463
+ const y = g(S);
463
464
  if (y)
464
- return st(De(y, d));
465
+ return st(Ge(y, f));
465
466
  }
466
467
  function i(y) {
467
468
  var C;
468
- if (!p) {
469
- if (f === "memory")
470
- y === void 0 ? n.delete(u) : n.set(u, y);
471
- else if (f === "router") {
469
+ if (!u) {
470
+ if (S === "memory")
471
+ y === void 0 ? n.delete(d) : n.set(d, y);
472
+ else if (S === "router") {
472
473
  const w = new URLSearchParams(window.location.search);
473
- y === void 0 ? w.delete(u) : w.set(u, JSON.stringify(y));
474
+ y === void 0 ? w.delete(d) : w.set(d, JSON.stringify(y));
474
475
  const k = `${window.location.pathname}?${w.toString()}`;
475
476
  window.history.replaceState(null, "", k);
476
477
  } else {
477
- const w = g(f);
478
+ const w = g(S);
478
479
  if (!w) return;
479
480
  try {
480
- y === void 0 ? w.removeItem(d) : w.setItem(d, JSON.stringify(y));
481
+ y === void 0 ? w.removeItem(f) : w.setItem(f, JSON.stringify(y));
481
482
  } catch {
482
483
  }
483
484
  }
484
- (C = e.get(u)) == null || C.forEach((w) => w());
485
+ (C = e.get(d)) == null || C.forEach((w) => w());
485
486
  }
486
487
  }
487
488
  function h(y) {
488
- if (!l.schema) return { [u]: y };
489
+ if (!l.schema) return { [d]: y };
489
490
  const C = {};
490
491
  return Object.entries(l.schema).forEach(([w]) => {
491
492
  const k = z(y) ? y[w] : void 0;
@@ -494,7 +495,7 @@ function Ie(t) {
494
495
  }
495
496
  }
496
497
  }
497
- function De(t, e) {
498
+ function Ge(t, e) {
498
499
  try {
499
500
  return t.getItem(e);
500
501
  } catch {
@@ -509,7 +510,7 @@ function st(t) {
509
510
  return;
510
511
  }
511
512
  }
512
- function Ge(t) {
513
+ function Me(t) {
513
514
  const e = /* @__PURE__ */ new Map(), n = {
514
515
  hook: t.hooked.hook,
515
516
  getPlugin: g
@@ -517,7 +518,7 @@ function Ge(t) {
517
518
  return {
518
519
  ...n,
519
520
  registerPlugin: a,
520
- registerPlugins: m,
521
+ registerPlugins: p,
521
522
  registerPublicApi: s,
522
523
  pluginContext: o
523
524
  };
@@ -531,17 +532,17 @@ function Ge(t) {
531
532
  );
532
533
  return;
533
534
  }
534
- const u = c.setup(o);
535
- u !== void 0 && e.set(c.name, u);
535
+ const d = c.setup(o);
536
+ d !== void 0 && e.set(c.name, d);
536
537
  }
537
- function m(c) {
538
- c.forEach((u) => a(u));
538
+ function p(c) {
539
+ c.forEach((d) => a(d));
539
540
  }
540
541
  function g(c) {
541
542
  return e.get(c);
542
543
  }
543
544
  }
544
- function Me(t) {
545
+ function Re(t) {
545
546
  const e = V()(() => ({
546
547
  sections: /* @__PURE__ */ new Map(),
547
548
  recordSections: /* @__PURE__ */ new Map(),
@@ -555,13 +556,13 @@ function Me(t) {
555
556
  useStore: e,
556
557
  clearSections: a,
557
558
  createSection: s,
558
- getSections: m,
559
+ getSections: p,
559
560
  getRecord: g,
560
561
  getSectionsByParentId: c,
561
- getRecordsByParentId: u,
562
+ getRecordsByParentId: d,
562
563
  getItemId: l
563
564
  };
564
- return t.plugins.registerPublicApi(o), { ...o, updateImplicitFilterKeys: f };
565
+ return t.plugins.registerPublicApi(o), { ...o, updateImplicitFilterKeys: S };
565
566
  function s(r, i) {
566
567
  const h = Math.random().toString(), y = r.parentId ?? null, C = {
567
568
  id: h,
@@ -577,7 +578,7 @@ function Me(t) {
577
578
  return e.setState((k) => {
578
579
  const _ = new Map(k.sections), b = new Map(k.recordSections);
579
580
  _.set(h, C), b.set(y, [...b.get(y) ?? [], h]);
580
- const { visibleRecords: x, rootSections: L, visibleSections: E, hasActiveFilters: v } = p(_, b);
581
+ const { visibleRecords: x, rootSections: L, visibleSections: E, hasActiveFilters: v } = u(_, b);
581
582
  return {
582
583
  sections: _,
583
584
  recordSections: b,
@@ -598,7 +599,7 @@ function Me(t) {
598
599
  hasActiveFilters: !1
599
600
  });
600
601
  }
601
- function m() {
602
+ function p() {
602
603
  return [...e.getState().sections.values()];
603
604
  }
604
605
  function g(r) {
@@ -612,24 +613,24 @@ function Me(t) {
612
613
  const i = e.getState();
613
614
  return (i.recordSections.get(r) ?? []).map((y) => i.sections.get(y)).filter(Boolean);
614
615
  }
615
- function u(r) {
616
+ function d(r) {
616
617
  return c(r).flatMap((i) => i.records);
617
618
  }
618
619
  function l(r) {
619
620
  const i = t.config.itemKey ?? "id";
620
621
  return tt(r, i);
621
622
  }
622
- function d(r) {
623
+ function f(r) {
623
624
  return r == null ? !1 : typeof r == "boolean" ? !0 : Array.isArray(r) ? r.length > 0 : !!r;
624
625
  }
625
- function f(r) {
626
- n !== r && (n = r, e.setState((i) => p(i.sections, i.recordSections)));
626
+ function S(r) {
627
+ n !== r && (n = r, e.setState((i) => u(i.sections, i.recordSections)));
627
628
  }
628
- function p(r, i) {
629
+ function u(r, i) {
629
630
  const y = [...r.values()].filter((b) => b.visible), w = (i.get(null) ?? []).map((b) => r.get(b)).filter((b) => b.visible), k = y.flatMap((b) => b.records), _ = y.some((b) => {
630
631
  const { filters: x } = b.loadContext;
631
632
  return x ? Object.entries(x).some(
632
- ([L, E]) => !n.includes(L) && d(E == null ? void 0 : E.value)
633
+ ([L, E]) => !n.includes(L) && f(E == null ? void 0 : E.value)
633
634
  ) : !1;
634
635
  });
635
636
  return {
@@ -640,29 +641,29 @@ function Me(t) {
640
641
  };
641
642
  }
642
643
  }
643
- function Re({ children: t }) {
644
- return /* @__PURE__ */ S(N, { children: t });
644
+ function Oe({ children: t }) {
645
+ return /* @__PURE__ */ m(N, { children: t });
645
646
  }
646
- function Oe({
647
+ function Ae({
647
648
  column: t
648
649
  }) {
649
- return /* @__PURE__ */ S("span", { children: q(t.label) });
650
+ return /* @__PURE__ */ m("span", { children: q(t.label) });
650
651
  }
651
- const Ae = "_headerCell_18ulc_1", We = "_headerCellContent_18ulc_13", He = "_extraHeaderCell_18ulc_21", K = {
652
- headerCell: Ae,
653
- headerCellContent: We,
654
- extraHeaderCell: He
652
+ const We = "_headerCell_18ulc_1", He = "_headerCellContent_18ulc_13", Ne = "_extraHeaderCell_18ulc_21", K = {
653
+ headerCell: We,
654
+ headerCellContent: He,
655
+ extraHeaderCell: Ne
655
656
  };
656
657
  function Ct({ children: t }) {
657
- return /* @__PURE__ */ S("span", { className: K.headerCellContent, children: t });
658
+ return /* @__PURE__ */ m("span", { className: K.headerCellContent, children: t });
658
659
  }
659
660
  function bt({
660
661
  group: t,
661
662
  colspan: e,
662
663
  className: n
663
664
  }) {
664
- const s = P().useGroupStickyOffset(t.id), a = s !== void 0, m = t.component, g = m ? /* @__PURE__ */ S(m, { group: t }) : /* @__PURE__ */ S(Ct, { children: q(t.label) });
665
- return /* @__PURE__ */ S(
665
+ const s = P().useGroupStickyOffset(t.id), a = s !== void 0, p = t.component, g = p ? /* @__PURE__ */ m(p, { group: t }) : /* @__PURE__ */ m(Ct, { children: q(t.label) });
666
+ return /* @__PURE__ */ m(
666
667
  Pt,
667
668
  {
668
669
  className: W(Ht.cell, K.headerCell, n),
@@ -674,47 +675,47 @@ function bt({
674
675
  }
675
676
  );
676
677
  }
677
- function Ne({ record: t }) {
678
+ function Ve({ record: t }) {
678
679
  const e = P(), n = e.useVisibleColumns(), o = e.useTableLayout(), s = e.useComponent(
679
680
  "body-cell-content"
680
681
  );
681
- return /* @__PURE__ */ S(zt, { value: t, children: /* @__PURE__ */ G(Y, { children: [
682
- /* @__PURE__ */ S(et, { position: "start" }),
682
+ return /* @__PURE__ */ m(zt, { value: t, children: /* @__PURE__ */ G(Y, { children: [
683
+ /* @__PURE__ */ m(et, { position: "start" }),
683
684
  n.map((a) => {
684
685
  var c;
685
- const m = (c = a.getClassName) == null ? void 0 : c.call(a, t.item), g = Nt(a, t.item, o);
686
- return /* @__PURE__ */ S(
686
+ const p = (c = a.getClassName) == null ? void 0 : c.call(a, t.item), g = Nt(a, t.item, o);
687
+ return /* @__PURE__ */ m(
687
688
  X,
688
689
  {
689
690
  columnId: a.id,
690
- className: m,
691
+ className: p,
691
692
  ...g,
692
- children: /* @__PURE__ */ S(s, { column: a, item: t.item })
693
+ children: /* @__PURE__ */ m(s, { column: a, item: t.item })
693
694
  },
694
695
  a.id
695
696
  );
696
697
  }),
697
- /* @__PURE__ */ S(et, { position: "end" })
698
+ /* @__PURE__ */ m(et, { position: "end" })
698
699
  ] }) });
699
700
  }
700
- const Ve = "_tableWrapper_6b0cm_6", Pe = "_table_6b0cm_6", Te = "_layoutFixed_6b0cm_39", Fe = "_layoutAuto_6b0cm_46", Be = "_tableBordered_6b0cm_53", B = {
701
- tableWrapper: Ve,
702
- table: Pe,
703
- layoutFixed: Te,
704
- layoutAuto: Fe,
705
- tableBordered: Be
701
+ const Pe = "_tableWrapper_6b0cm_6", Te = "_table_6b0cm_6", Fe = "_layoutFixed_6b0cm_39", Be = "_layoutAuto_6b0cm_46", ze = "_tableBordered_6b0cm_53", B = {
702
+ tableWrapper: Pe,
703
+ table: Te,
704
+ layoutFixed: Fe,
705
+ layoutAuto: Be,
706
+ tableBordered: ze
706
707
  };
707
- function ze() {
708
+ function $e() {
708
709
  const e = j().useStore((n) => n.rootSections);
709
- return /* @__PURE__ */ S(N, { children: e.map((n) => /* @__PURE__ */ S(Tt, { children: /* @__PURE__ */ S(At, { records: n.records }) }, n.id)) });
710
+ return /* @__PURE__ */ m(N, { children: e.map((n) => /* @__PURE__ */ m(Tt, { children: /* @__PURE__ */ m(At, { records: n.records }) }, n.id)) });
710
711
  }
711
- function $e({
712
+ function je({
712
713
  column: t,
713
714
  rowspan: e,
714
715
  className: n,
715
716
  children: o
716
717
  }) {
717
- return /* @__PURE__ */ S(
718
+ return /* @__PURE__ */ m(
718
719
  X,
719
720
  {
720
721
  header: !0,
@@ -723,7 +724,7 @@ function $e({
723
724
  width: t.width,
724
725
  rowspan: e,
725
726
  ignoreRowClick: t.ignoreRowClick,
726
- children: o ? /* @__PURE__ */ S(Ct, { children: o }) : null
727
+ children: o ? /* @__PURE__ */ m(Ct, { children: o }) : null
727
728
  }
728
729
  );
729
730
  }
@@ -732,19 +733,19 @@ function it({
732
733
  isGroupRow: e,
733
734
  className: n
734
735
  }) {
735
- const o = P(), s = o.useHasGroups(), a = o.useExtraColumns(t), m = !s || e;
736
- return /* @__PURE__ */ S(N, { children: a.map((g) => /* @__PURE__ */ S(
737
- $e,
736
+ const o = P(), s = o.useHasGroups(), a = o.useExtraColumns(t), p = !s || e;
737
+ return /* @__PURE__ */ m(N, { children: a.map((g) => /* @__PURE__ */ m(
738
+ je,
738
739
  {
739
740
  column: g,
740
- rowspan: m && s ? 2 : void 0,
741
+ rowspan: p && s ? 2 : void 0,
741
742
  className: n,
742
- children: m && g.header ? /* @__PURE__ */ S(g.header, {}) : null
743
+ children: p && g.header ? /* @__PURE__ */ m(g.header, {}) : null
743
744
  },
744
745
  g.id
745
746
  )) });
746
747
  }
747
- function je(t) {
748
+ function Ke(t) {
748
749
  return {
749
750
  setMinContentWidth: e,
750
751
  useMinContentWidth: n
@@ -752,14 +753,14 @@ function je(t) {
752
753
  function e(o, s) {
753
754
  const a = t.getState().minContentWidths;
754
755
  if (a.get(o) === s) return;
755
- const m = new Map(a);
756
- m.set(o, s), t.setState({ minContentWidths: m });
756
+ const p = new Map(a);
757
+ p.set(o, s), t.setState({ minContentWidths: p });
757
758
  }
758
759
  function n(o) {
759
760
  return t((s) => s.minContentWidths.get(o));
760
761
  }
761
762
  }
762
- function Ke(t, e) {
763
+ function Ue(t, e) {
763
764
  const n = e ? window.getComputedStyle(e) : void 0, o = n ? parseFloat(n.paddingInlineStart || "0") + parseFloat(n.paddingInlineEnd || "0") : 0, s = n ? parseFloat(n.borderInlineStartWidth || "0") + parseFloat(n.borderInlineEndWidth || "0") : 0;
764
765
  return Math.ceil(t.contentRect.width + o + s);
765
766
  }
@@ -769,96 +770,96 @@ function at({
769
770
  headerCellEndSlots: n,
770
771
  className: o
771
772
  }) {
772
- const s = P(), a = $(null), m = s.useComponent("header-cell-label"), g = s.useTableLayout(), c = s.useMinContentWidth(t.id), u = t.headerComponent ? /* @__PURE__ */ S(t.headerComponent, { column: t }) : (
773
+ const s = P(), a = $(null), p = s.useComponent("header-cell-label"), g = s.useTableLayout(), c = s.useMinContentWidth(t.id), d = t.headerComponent ? /* @__PURE__ */ m(t.headerComponent, { column: t }) : (
773
774
  // eslint-disable-next-line react-hooks/static-components -- LabelComponent comes from the grid's component registry (a store lookup), so it is the same component on every render; the rule cannot see through the lookup.
774
- /* @__PURE__ */ S(m, { column: t })
775
- ), l = t.headerOverflow ?? "nowrap", d = t.width === "min-content", f = d ? void 0 : l, { headerStyle: p, contentVars: r, isCapped: i } = Vt(
775
+ /* @__PURE__ */ m(p, { column: t })
776
+ ), l = t.headerOverflow ?? "nowrap", f = t.width === "min-content", S = f ? void 0 : l, { headerStyle: u, contentVars: r, isCapped: i } = Vt(
776
777
  t,
777
778
  g,
778
779
  c
779
- ), h = !t.headerComponent && l === "nowrap" ? q(t.label) : void 0, y = !!t.headerComponent && !d;
780
+ ), h = !t.headerComponent && l === "nowrap" ? q(t.label) : void 0, y = !!t.headerComponent && !f;
780
781
  return M(() => {
781
- if (!d) return;
782
+ if (!f) return;
782
783
  const C = a.current;
783
784
  if (!C) return;
784
785
  const w = C.closest("th, td"), k = new ResizeObserver((_) => {
785
786
  const b = _[_.length - 1];
786
- s.setMinContentWidth(t.id, Ke(b, w));
787
+ s.setMinContentWidth(t.id, Ue(b, w));
787
788
  });
788
789
  return k.observe(C), () => k.disconnect();
789
- }, [d, t.id, s]), /* @__PURE__ */ S(
790
+ }, [f, t.id, s]), /* @__PURE__ */ m(
790
791
  X,
791
792
  {
792
793
  header: !0,
793
794
  columnId: t.id,
794
795
  className: W(K.headerCell, o),
795
- style: { ...p, ...r },
796
+ style: { ...u, ...r },
796
797
  rowspan: e,
797
- overflow: f,
798
- capped: d ? void 0 : i,
798
+ overflow: S,
799
+ capped: f ? void 0 : i,
799
800
  title: h,
800
- contentRowRef: d ? a : void 0,
801
+ contentRowRef: f ? a : void 0,
801
802
  fillContent: y,
802
803
  endSlot: n.map((C) => {
803
804
  const w = C.component;
804
- return /* @__PURE__ */ S(w, { column: t }, C.id);
805
+ return /* @__PURE__ */ m(w, { column: t }, C.id);
805
806
  }),
806
- children: u
807
+ children: d
807
808
  }
808
809
  );
809
810
  }
810
- const Ue = "_theadSticky_167rm_11", Ye = {
811
- theadSticky: Ue
811
+ const Ye = "_theadSticky_167rm_11", Je = {
812
+ theadSticky: Ye
812
813
  };
813
- function Je() {
814
- const t = P(), e = $(null), n = $(null), o = t.useHasGroups(), s = t.useStickyHeader(), a = t.useFirstRowHeaderCells(), m = t.useSecondRowHeaderColumns(), g = t.useSlots("header-cell-end");
814
+ function qe() {
815
+ const t = P(), e = $(null), n = $(null), o = t.useHasGroups(), s = t.useStickyHeader(), a = t.useFirstRowHeaderCells(), p = t.useSecondRowHeaderColumns(), g = t.useSlots("header-cell-end");
815
816
  return M(() => {
816
817
  const c = e.current;
817
818
  if (!c) return;
818
819
  n.current = new ResizeObserver((l) => {
819
- var d, f;
820
- for (const p of l) {
821
- const { columnId: r } = p.target.dataset;
820
+ var f, S;
821
+ for (const u of l) {
822
+ const { columnId: r } = u.target.dataset;
822
823
  if (r) {
823
- const i = ((f = (d = p.borderBoxSize) == null ? void 0 : d[0]) == null ? void 0 : f.inlineSize) ?? p.contentRect.width;
824
+ const i = ((S = (f = u.borderBoxSize) == null ? void 0 : f[0]) == null ? void 0 : S.inlineSize) ?? u.contentRect.width;
824
825
  t.onResizeColumn(r, i);
825
826
  }
826
827
  }
827
828
  });
828
- const u = c.querySelectorAll("[data-column-id]");
829
- for (const l of u)
829
+ const d = c.querySelectorAll("[data-column-id]");
830
+ for (const l of d)
830
831
  n.current.observe(l);
831
832
  return () => {
832
833
  var l;
833
834
  (l = n.current) == null || l.disconnect();
834
835
  };
835
- }, [t, a, m]), /* @__PURE__ */ G(
836
+ }, [t, a, p]), /* @__PURE__ */ G(
836
837
  Ft,
837
838
  {
838
839
  ref: e,
839
- className: W(s && o && Ye.theadSticky),
840
+ className: W(s && o && Je.theadSticky),
840
841
  children: [
841
842
  /* @__PURE__ */ G(Y, { children: [
842
- /* @__PURE__ */ S(it, { position: "start", isGroupRow: !0 }),
843
+ /* @__PURE__ */ m(it, { position: "start", isGroupRow: !0 }),
843
844
  a.map((c) => {
844
845
  if (c.type === "group") {
845
846
  const l = c.item;
846
- return /* @__PURE__ */ S(bt, { group: l, colspan: c.colspan }, l.id);
847
+ return /* @__PURE__ */ m(bt, { group: l, colspan: c.colspan }, l.id);
847
848
  }
848
- const u = c.item;
849
- return /* @__PURE__ */ S(
849
+ const d = c.item;
850
+ return /* @__PURE__ */ m(
850
851
  at,
851
852
  {
852
- column: u,
853
+ column: d,
853
854
  rowspan: c.rowspan,
854
855
  headerCellEndSlots: g
855
856
  },
856
- u.id
857
+ d.id
857
858
  );
858
859
  }),
859
- /* @__PURE__ */ S(it, { position: "end", isGroupRow: !0 })
860
+ /* @__PURE__ */ m(it, { position: "end", isGroupRow: !0 })
860
861
  ] }),
861
- o && m.length > 0 && /* @__PURE__ */ S(Y, { children: m.map((c) => /* @__PURE__ */ S(
862
+ o && p.length > 0 && /* @__PURE__ */ m(Y, { children: p.map((c) => /* @__PURE__ */ m(
862
863
  at,
863
864
  {
864
865
  column: c,
@@ -871,46 +872,46 @@ function Je() {
871
872
  );
872
873
  }
873
874
  function ct({ slots: t }) {
874
- return t.length === 0 ? null : /* @__PURE__ */ S(N, { children: t.map((e) => {
875
+ return t.length === 0 ? null : /* @__PURE__ */ m(N, { children: t.map((e) => {
875
876
  const n = e.component;
876
- return /* @__PURE__ */ S(n, {}, e.id);
877
+ return /* @__PURE__ */ m(n, {}, e.id);
877
878
  }) });
878
879
  }
879
- const qe = {
880
+ const Xe = {
880
881
  fixed: B.layoutFixed,
881
882
  auto: B.layoutAuto
882
883
  };
883
- function Xe() {
884
- const t = P(), e = Mt(), n = t.useHasGroups(), o = t.useSlots("subheader"), s = t.useSlots("footer"), a = t.useTableLayout(), m = t.useStickyHeader(), g = t.useComponent("content");
884
+ function Qe() {
885
+ const t = P(), e = Mt(), n = t.useHasGroups(), o = t.useSlots("subheader"), s = t.useSlots("footer"), a = t.useTableLayout(), p = t.useStickyHeader(), g = t.useComponent("content");
885
886
  return (
886
887
  // eslint-disable-next-line react-hooks/static-components -- ContentWrapper comes from the grid's component registry (a store lookup), so it is the same component on every render; the rule cannot see through the lookup.
887
- /* @__PURE__ */ S(g, { children: /* @__PURE__ */ G(
888
+ /* @__PURE__ */ m(g, { children: /* @__PURE__ */ G(
888
889
  Bt,
889
890
  {
890
- stickyHeader: m,
891
+ stickyHeader: p,
891
892
  label: e,
892
893
  containerClassName: B.tableWrapper,
893
- className: W(B.table, qe[a], n && B.tableBordered),
894
+ className: W(B.table, Xe[a], n && B.tableBordered),
894
895
  children: [
895
- /* @__PURE__ */ S(Je, {}),
896
- /* @__PURE__ */ S(ct, { slots: o }),
897
- /* @__PURE__ */ S(ze, {}),
898
- /* @__PURE__ */ S(ct, { slots: s })
896
+ /* @__PURE__ */ m(qe, {}),
897
+ /* @__PURE__ */ m(ct, { slots: o }),
898
+ /* @__PURE__ */ m($e, {}),
899
+ /* @__PURE__ */ m(ct, { slots: s })
899
900
  ]
900
901
  }
901
902
  ) })
902
903
  );
903
904
  }
904
- const Qe = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;
905
- function Ze(t, e, n) {
905
+ const Ze = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;
906
+ function tn(t, e, n) {
906
907
  const o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
907
908
  let a = !1;
908
909
  return {
909
- initializeColumns: p,
910
- useVisibleColumns: f
910
+ initializeColumns: u,
911
+ useVisibleColumns: S
911
912
  };
912
- function m(r) {
913
- if (!Qe.test(r))
913
+ function p(r) {
914
+ if (!Ze.test(r))
914
915
  throw new Error(`Column id "${r}" must be snake_case (e.g., "user_name", "is_active").`);
915
916
  }
916
917
  function g(r) {
@@ -925,7 +926,7 @@ function Ze(t, e, n) {
925
926
  `[DataGrid] Column "${r.id}": width, minWidth, and maxWidth cannot all apply under tableLayout="fixed" -- they collapse to a single track (width wins when set). Use tableLayout="auto" for independent min/max constraints, or drop the extra prop(s).`
926
927
  ));
927
928
  }
928
- function u(r, i) {
929
+ function d(r, i) {
929
930
  i !== "auto" || process.env.NODE_ENV === "production" || a || r.length === 0 || !r.every(
930
931
  (y) => y.width !== void 0 || y.maxWidth !== void 0
931
932
  ) || (a = !0, console.warn(
@@ -935,20 +936,20 @@ function Ze(t, e, n) {
935
936
  function l(r) {
936
937
  const i = [];
937
938
  for (const h of r)
938
- if (D(h))
939
+ if (I(h))
939
940
  for (const y of h.columns)
940
941
  i.push(g({ ...y, groupId: h.id }));
941
942
  else
942
943
  i.push(g(h));
943
944
  return i;
944
945
  }
945
- function d(r) {
946
+ function f(r) {
946
947
  const i = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Set();
947
948
  function y(C) {
948
949
  i.set(C.id, C.visible ?? !0), C.visibleToggleDisabled && h.add(C.id);
949
950
  }
950
951
  for (const C of r)
951
- if (D(C))
952
+ if (I(C))
952
953
  for (const w of C.columns)
953
954
  y(w);
954
955
  else
@@ -957,7 +958,7 @@ function Ze(t, e, n) {
957
958
  i.has(C) && !h.has(C) && i.set(C, w);
958
959
  return i;
959
960
  }
960
- function f() {
961
+ function S() {
961
962
  return t(
962
963
  J((r) => {
963
964
  const i = r.flatColumns.filter((h) => r.columnVisibility.get(h.id) !== !1);
@@ -965,22 +966,22 @@ function Ze(t, e, n) {
965
966
  })
966
967
  );
967
968
  }
968
- function p(r) {
969
+ function u(r) {
969
970
  const i = l(r), { tableLayout: h } = t.getState();
970
971
  for (const y of i)
971
- m(y.id), c(y, h);
972
- return u(i, h), {
972
+ p(y.id), c(y, h);
973
+ return d(i, h), {
973
974
  columns: r,
974
975
  flatColumns: i,
975
- columnVisibility: d(r)
976
+ columnVisibility: f(r)
976
977
  };
977
978
  }
978
979
  }
979
- const tn = "columnVisibility";
980
- function en(t) {
980
+ const en = "columnVisibility";
981
+ function nn(t) {
981
982
  if (!t.config.persistentColumnVisibility) return;
982
983
  const e = t.persistentState.registerPersistentState(
983
- tn,
984
+ en,
984
985
  { storage: "localStorage" }
985
986
  );
986
987
  return { read: n, record: o };
@@ -988,101 +989,101 @@ function en(t) {
988
989
  var a;
989
990
  const s = (a = e.value) == null ? void 0 : a.columns;
990
991
  return typeof s != "object" || s === null || Array.isArray(s) ? {} : Object.fromEntries(
991
- Object.entries(s).filter(([, m]) => typeof m == "boolean")
992
+ Object.entries(s).filter(([, p]) => typeof p == "boolean")
992
993
  );
993
994
  }
994
995
  function o(s, a) {
995
996
  e.setValue({ columns: { ...n(), [s]: a } });
996
997
  }
997
998
  }
998
- function nn(t) {
999
+ function on(t) {
999
1000
  const e = /* @__PURE__ */ new Set();
1000
1001
  return {
1001
1002
  registerExtraColumn: n,
1002
1003
  updateExtraColumnWidth: s,
1003
1004
  updateExtraColumnOrder: a,
1004
- updateExtraColumnSticky: m,
1005
+ updateExtraColumnSticky: p,
1005
1006
  useExtraColumns: g
1006
1007
  };
1007
1008
  function n(c) {
1008
- const u = t.getState(), l = c.position ?? "end", d = l === "start" ? u.extraColumnsStart : u.extraColumnsEnd, f = c.order ?? (d.length + 1) * 10, p = {
1009
+ const d = t.getState(), l = c.position ?? "end", f = l === "start" ? d.extraColumnsStart : d.extraColumnsEnd, S = c.order ?? (f.length + 1) * 10, u = {
1009
1010
  id: c.id ?? Math.random().toString(36).slice(2),
1010
1011
  header: c.header,
1011
1012
  body: c.body,
1012
1013
  width: c.width,
1013
1014
  sticky: c.sticky,
1014
1015
  ignoreRowClick: c.ignoreRowClick,
1015
- order: f,
1016
+ order: S,
1016
1017
  position: l
1017
- }, r = [...d, p].sort((i, h) => i.order - h.order);
1018
- l === "start" ? (o(p.id, p.sticky), t.setState({ extraColumnsStart: r })) : t.setState({ extraColumnsEnd: r });
1018
+ }, r = [...f, u].sort((i, h) => i.order - h.order);
1019
+ l === "start" ? (o(u.id, u.sticky), t.setState({ extraColumnsStart: r })) : t.setState({ extraColumnsEnd: r });
1019
1020
  }
1020
- function o(c, u) {
1021
- process.env.NODE_ENV !== "production" && u && (e.has(c) || (e.add(c), console.warn(
1021
+ function o(c, d) {
1022
+ process.env.NODE_ENV !== "production" && d && (e.has(c) || (e.add(c), console.warn(
1022
1023
  `[DataGrid] Extra column "${c}": \`sticky\` pins to the table's inline-end edge and is read only for columns at the \`end\` position -- on a \`start\` column it does nothing. Drop the flag, or register the column at the \`end\` position.`
1023
1024
  )));
1024
1025
  }
1025
- function s(c, u) {
1026
+ function s(c, d) {
1026
1027
  const l = t.getState();
1027
- function d(r) {
1028
+ function f(r) {
1028
1029
  const i = r.findIndex((y) => y.id === c);
1029
1030
  if (i === -1) return;
1030
1031
  const h = [...r];
1031
- return h[i] = { ...h[i], width: u }, h;
1032
+ return h[i] = { ...h[i], width: d }, h;
1032
1033
  }
1033
- const f = d(l.extraColumnsStart);
1034
- if (f) {
1035
- t.setState({ extraColumnsStart: f });
1034
+ const S = f(l.extraColumnsStart);
1035
+ if (S) {
1036
+ t.setState({ extraColumnsStart: S });
1036
1037
  return;
1037
1038
  }
1038
- const p = d(l.extraColumnsEnd);
1039
- p && t.setState({ extraColumnsEnd: p });
1039
+ const u = f(l.extraColumnsEnd);
1040
+ u && t.setState({ extraColumnsEnd: u });
1040
1041
  }
1041
- function a(c, u) {
1042
+ function a(c, d) {
1042
1043
  const l = t.getState();
1043
- function d(r) {
1044
+ function f(r) {
1044
1045
  const i = r.findIndex((y) => y.id === c);
1045
1046
  if (i === -1) return;
1046
1047
  const h = [...r];
1047
- return h[i] = { ...h[i], order: u }, h.sort((y, C) => y.order - C.order);
1048
+ return h[i] = { ...h[i], order: d }, h.sort((y, C) => y.order - C.order);
1048
1049
  }
1049
- const f = d(l.extraColumnsStart);
1050
- if (f) {
1051
- t.setState({ extraColumnsStart: f });
1050
+ const S = f(l.extraColumnsStart);
1051
+ if (S) {
1052
+ t.setState({ extraColumnsStart: S });
1052
1053
  return;
1053
1054
  }
1054
- const p = d(l.extraColumnsEnd);
1055
- p && t.setState({ extraColumnsEnd: p });
1055
+ const u = f(l.extraColumnsEnd);
1056
+ u && t.setState({ extraColumnsEnd: u });
1056
1057
  }
1057
- function m(c, u) {
1058
- const l = t.getState(), d = l.extraColumnsStart.some((h) => h.id === c), f = d ? "extraColumnsStart" : "extraColumnsEnd", p = l[f], r = p.findIndex((h) => h.id === c);
1059
- if (r === -1 || (d && o(c, u), (p[r].sticky ?? !1) === u)) return;
1060
- const i = [...p];
1061
- i[r] = { ...i[r], sticky: u }, t.setState({ [f]: i });
1058
+ function p(c, d) {
1059
+ const l = t.getState(), f = l.extraColumnsStart.some((h) => h.id === c), S = f ? "extraColumnsStart" : "extraColumnsEnd", u = l[S], r = u.findIndex((h) => h.id === c);
1060
+ if (r === -1 || (f && o(c, d), (u[r].sticky ?? !1) === d)) return;
1061
+ const i = [...u];
1062
+ i[r] = { ...i[r], sticky: d }, t.setState({ [S]: i });
1062
1063
  }
1063
1064
  function g(c) {
1064
- return t((u) => c === "start" ? u.extraColumnsStart : u.extraColumnsEnd);
1065
+ return t((d) => c === "start" ? d.extraColumnsStart : d.extraColumnsEnd);
1065
1066
  }
1066
1067
  }
1067
- function on(t, e, n) {
1068
+ function rn(t, e, n) {
1068
1069
  const o = [];
1069
1070
  let s = null, a = null;
1070
1071
  return {
1071
1072
  useHasGroups: l,
1072
- useFirstRowHeaderCells: d,
1073
- useSecondRowHeaderColumns: f
1073
+ useFirstRowHeaderCells: f,
1074
+ useSecondRowHeaderColumns: S
1074
1075
  };
1075
- function m() {
1076
- const p = t.getState(), r = p.flatColumns.filter((i) => p.columnVisibility.get(i.id) !== !1);
1077
- return e.getOrderedColumnsWithSticky(r, p.columnSticky);
1076
+ function p() {
1077
+ const u = t.getState(), r = u.flatColumns.filter((i) => u.columnVisibility.get(i.id) !== !1);
1078
+ return e.getOrderedColumnsWithSticky(r, u.columnSticky);
1078
1079
  }
1079
1080
  function g() {
1080
- return t.getState().columns.some(D);
1081
+ return t.getState().columns.some(I);
1081
1082
  }
1082
1083
  function c() {
1083
- const p = t.getState(), r = m();
1084
+ const u = t.getState(), r = p();
1084
1085
  if (!g()) {
1085
- const y = p.components.get("header-cell") ?? n.get("header-cell");
1086
+ const y = u.components.get("header-cell") ?? n.get("header-cell");
1086
1087
  return r.map((C) => ({
1087
1088
  type: "column",
1088
1089
  item: C,
@@ -1090,107 +1091,107 @@ function on(t, e, n) {
1090
1091
  }));
1091
1092
  }
1092
1093
  const i = new Map(r.map((y, C) => [y.id, C]));
1093
- return [...p.columns].sort((y, C) => {
1094
- const w = D(y) ? Math.min(...y.columns.map((_) => i.get(_.id) ?? 1 / 0)) : i.get(y.id) ?? 1 / 0, k = D(C) ? Math.min(...C.columns.map((_) => i.get(_.id) ?? 1 / 0)) : i.get(C.id) ?? 1 / 0;
1094
+ return [...u.columns].sort((y, C) => {
1095
+ const w = I(y) ? Math.min(...y.columns.map((_) => i.get(_.id) ?? 1 / 0)) : i.get(y.id) ?? 1 / 0, k = I(C) ? Math.min(...C.columns.map((_) => i.get(_.id) ?? 1 / 0)) : i.get(C.id) ?? 1 / 0;
1095
1096
  return w - k;
1096
1097
  }).flatMap((y) => {
1097
- if (D(y)) {
1098
+ if (I(y)) {
1098
1099
  const C = y.columns.filter(
1099
- (w) => p.columnVisibility.get(w.id) !== !1
1100
+ (w) => u.columnVisibility.get(w.id) !== !1
1100
1101
  ).length;
1101
1102
  return C === 0 ? [] : {
1102
1103
  type: "group",
1103
1104
  item: y,
1104
- component: p.components.get("header-group") ?? n.get("header-group"),
1105
+ component: u.components.get("header-group") ?? n.get("header-group"),
1105
1106
  colspan: C
1106
1107
  };
1107
1108
  }
1108
- return p.columnVisibility.get(y.id) === !1 ? [] : {
1109
+ return u.columnVisibility.get(y.id) === !1 ? [] : {
1109
1110
  type: "column",
1110
1111
  item: y,
1111
- component: p.components.get("header-cell") ?? n.get("header-cell"),
1112
+ component: u.components.get("header-cell") ?? n.get("header-cell"),
1112
1113
  rowspan: 2
1113
1114
  };
1114
1115
  });
1115
1116
  }
1116
- function u() {
1117
+ function d() {
1117
1118
  if (!g()) return o;
1118
- const p = t.getState();
1119
- return m().filter((i) => i.groupId && p.columnVisibility.get(i.id) !== !1);
1119
+ const u = t.getState();
1120
+ return p().filter((i) => i.groupId && u.columnVisibility.get(i.id) !== !1);
1120
1121
  }
1121
1122
  function l() {
1122
- return t((p) => p.columns.some(D));
1123
+ return t((u) => u.columns.some(I));
1123
1124
  }
1124
- function d() {
1125
- return t((p) => {
1126
- if (s !== null && s.state === p)
1125
+ function f() {
1126
+ return t((u) => {
1127
+ if (s !== null && s.state === u)
1127
1128
  return s.result;
1128
1129
  const r = c();
1129
- return s = { state: p, result: r }, r;
1130
+ return s = { state: u, result: r }, r;
1130
1131
  });
1131
1132
  }
1132
- function f() {
1133
- return t((p) => {
1134
- if (a !== null && a.state === p)
1133
+ function S() {
1134
+ return t((u) => {
1135
+ if (a !== null && a.state === u)
1135
1136
  return a.result;
1136
- const r = u();
1137
- return a = { state: p, result: r }, r;
1137
+ const r = d();
1138
+ return a = { state: u, result: r }, r;
1138
1139
  });
1139
1140
  }
1140
1141
  }
1141
1142
  const lt = [];
1142
- function rn(t) {
1143
+ function sn(t) {
1143
1144
  return {
1144
1145
  registerSlot: e,
1145
1146
  useSlots: n
1146
1147
  };
1147
1148
  function e(o, s) {
1148
- const a = t.getState(), m = Math.random().toString(36).slice(2), g = a.slots.get(o) ?? lt, c = s.order ?? (g.length + 1) * 10, u = {
1149
- id: m,
1149
+ const a = t.getState(), p = Math.random().toString(36).slice(2), g = a.slots.get(o) ?? lt, c = s.order ?? (g.length + 1) * 10, d = {
1150
+ id: p,
1150
1151
  name: o,
1151
1152
  component: s.component,
1152
1153
  order: c
1153
- }, l = [...g, u].sort((f, p) => f.order - p.order), d = new Map(a.slots);
1154
- d.set(o, l), t.setState({ slots: d });
1154
+ }, l = [...g, d].sort((S, u) => S.order - u.order), f = new Map(a.slots);
1155
+ f.set(o, l), t.setState({ slots: f });
1155
1156
  }
1156
1157
  function n(o) {
1157
1158
  return t(J((s) => s.slots.get(o) ?? lt));
1158
1159
  }
1159
1160
  }
1160
- const sn = /^\s*(\d+(?:\.\d+)?)px\s*$/;
1161
- function an(t) {
1161
+ const an = /^\s*(\d+(?:\.\d+)?)px\s*$/;
1162
+ function cn(t) {
1162
1163
  return {
1163
1164
  initializeStickyState: e,
1164
1165
  getOrderedColumnsWithSticky: n,
1165
1166
  onResizeColumn: o,
1166
1167
  isColumnSticky: s,
1167
1168
  isGroupSticky: a,
1168
- useColumnStickyOffset: m,
1169
+ useColumnStickyOffset: p,
1169
1170
  useColumnEndStickyOffset: g,
1170
1171
  useGroupStickyOffset: c
1171
1172
  };
1172
1173
  function e(l) {
1173
- const d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1174
- for (const p of l)
1175
- if (D(p)) {
1176
- f.set(p.id, p.sticky ?? !1);
1177
- for (const r of p.columns)
1178
- d.set(r.id, r.sticky ?? p.sticky ?? !1);
1174
+ const f = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
1175
+ for (const u of l)
1176
+ if (I(u)) {
1177
+ S.set(u.id, u.sticky ?? !1);
1178
+ for (const r of u.columns)
1179
+ f.set(r.id, r.sticky ?? u.sticky ?? !1);
1179
1180
  } else
1180
- d.set(p.id, p.sticky ?? !1);
1181
- return { columnSticky: d, groupSticky: f };
1181
+ f.set(u.id, u.sticky ?? !1);
1182
+ return { columnSticky: f, groupSticky: S };
1182
1183
  }
1183
- function n(l, d) {
1184
- const f = [], p = [];
1184
+ function n(l, f) {
1185
+ const S = [], u = [];
1185
1186
  for (const r of l)
1186
- d.get(r.id) ? f.push(r) : p.push(r);
1187
- return [...f, ...p];
1187
+ f.get(r.id) ? S.push(r) : u.push(r);
1188
+ return [...S, ...u];
1188
1189
  }
1189
- function o(l, d) {
1190
- const f = t.getState().columnWidths;
1191
- if (f.get(l) === d) return;
1192
- const p = new Map(f);
1193
- p.set(l, d), t.setState({ columnWidths: p });
1190
+ function o(l, f) {
1191
+ const S = t.getState().columnWidths;
1192
+ if (S.get(l) === f) return;
1193
+ const u = new Map(S);
1194
+ u.set(l, f), t.setState({ columnWidths: u });
1194
1195
  }
1195
1196
  function s(l) {
1196
1197
  return t.getState().columnSticky.get(l) === !0;
@@ -1198,45 +1199,45 @@ function an(t) {
1198
1199
  function a(l) {
1199
1200
  return t.getState().groupSticky.get(l) === !0;
1200
1201
  }
1201
- function m(l) {
1202
- return t((d) => {
1203
- if (!d.columnSticky.get(l)) return cn(d, l);
1204
- let f = u(d);
1205
- const p = d.flatColumns.filter((r) => d.columnVisibility.get(r.id) !== !1);
1206
- for (const r of p) {
1202
+ function p(l) {
1203
+ return t((f) => {
1204
+ if (!f.columnSticky.get(l)) return ln(f, l);
1205
+ let S = d(f);
1206
+ const u = f.flatColumns.filter((r) => f.columnVisibility.get(r.id) !== !1);
1207
+ for (const r of u) {
1207
1208
  if (r.id === l) break;
1208
- d.columnSticky.get(r.id) && (f += d.columnWidths.get(r.id) ?? 0);
1209
+ f.columnSticky.get(r.id) && (S += f.columnWidths.get(r.id) ?? 0);
1209
1210
  }
1210
- return f;
1211
+ return S;
1211
1212
  });
1212
1213
  }
1213
1214
  function g(l) {
1214
- return t((d) => un(d, l));
1215
+ return t((f) => dn(f, l));
1215
1216
  }
1216
1217
  function c(l) {
1217
- return t((d) => {
1218
- if (!d.groupSticky.get(l)) return;
1219
- let f = u(d);
1220
- const p = d.flatColumns.filter((r) => d.columnVisibility.get(r.id) !== !1);
1221
- for (const r of p) {
1218
+ return t((f) => {
1219
+ if (!f.groupSticky.get(l)) return;
1220
+ let S = d(f);
1221
+ const u = f.flatColumns.filter((r) => f.columnVisibility.get(r.id) !== !1);
1222
+ for (const r of u) {
1222
1223
  if (r.groupId === l) break;
1223
- d.columnSticky.get(r.id) && (f += d.columnWidths.get(r.id) ?? 0);
1224
+ f.columnSticky.get(r.id) && (S += f.columnWidths.get(r.id) ?? 0);
1224
1225
  }
1225
- return f;
1226
+ return S;
1226
1227
  });
1227
1228
  }
1228
- function u(l) {
1229
- let d = 0;
1230
- for (const f of l.extraColumnsStart)
1231
- d += wt(f);
1232
- return d;
1229
+ function d(l) {
1230
+ let f = 0;
1231
+ for (const S of l.extraColumnsStart)
1232
+ f += wt(S);
1233
+ return f;
1233
1234
  }
1234
1235
  }
1235
1236
  function wt(t) {
1236
1237
  return t.width && parseInt(t.width, 10) || 0;
1237
1238
  }
1238
- function cn(t, e) {
1239
- if (!t.extraColumnsStart.some((o) => o.id === e) || !ln(t))
1239
+ function ln(t, e) {
1240
+ if (!t.extraColumnsStart.some((o) => o.id === e) || !un(t))
1240
1241
  return;
1241
1242
  let n = 0;
1242
1243
  for (const o of t.extraColumnsStart) {
@@ -1244,29 +1245,29 @@ function cn(t, e) {
1244
1245
  n += wt(o);
1245
1246
  }
1246
1247
  }
1247
- function ln(t) {
1248
+ function un(t) {
1248
1249
  const e = (n) => t.columnVisibility.get(n.id) !== !1;
1249
1250
  return t.flatColumns.some((n) => e(n) && t.columnSticky.get(n.id)) || t.columns.some(
1250
- (n) => D(n) && t.groupSticky.get(n.id) && n.columns.some(e)
1251
+ (n) => I(n) && t.groupSticky.get(n.id) && n.columns.some(e)
1251
1252
  );
1252
1253
  }
1253
- function un(t, e) {
1254
+ function dn(t, e) {
1254
1255
  let n = 0;
1255
1256
  for (let o = t.extraColumnsEnd.length - 1; o >= 0; o--) {
1256
1257
  const s = t.extraColumnsEnd[o];
1257
1258
  if (s.sticky) {
1258
1259
  if (s.id === e) return n;
1259
- n += dn(t, s);
1260
+ n += fn(t, s);
1260
1261
  }
1261
1262
  }
1262
1263
  }
1263
- function dn(t, e) {
1264
+ function fn(t, e) {
1264
1265
  const n = t.columnWidths.get(e.id);
1265
1266
  if (n !== void 0) return n;
1266
- const o = sn.exec(e.width ?? "");
1267
+ const o = an.exec(e.width ?? "");
1267
1268
  return o ? Number(o[1]) : 0;
1268
1269
  }
1269
- function fn() {
1270
+ function pn() {
1270
1271
  return V(() => ({
1271
1272
  columns: [],
1272
1273
  flatColumns: [],
@@ -1283,30 +1284,30 @@ function fn() {
1283
1284
  stickyHeader: !1
1284
1285
  }));
1285
1286
  }
1286
- function pn(t) {
1287
- const e = fn(), n = mn();
1287
+ function mn(t) {
1288
+ const e = pn(), n = Sn();
1288
1289
  t.layout.registerSlot("main", {
1289
1290
  id: Z,
1290
- component: Xe,
1291
+ component: Qe,
1291
1292
  active: !0,
1292
- icon: It
1293
+ icon: Dt
1293
1294
  });
1294
- const o = rn(e), s = nn(e), a = an(e), m = en(t), g = Ze(e, a, m), c = on(e, a, n), u = je(e), l = {
1295
+ const o = sn(e), s = on(e), a = cn(e), p = nn(t), g = tn(e, a, p), c = rn(e, a, n), d = Ke(e), l = {
1295
1296
  registerTableSlot: o.registerSlot,
1296
1297
  registerExtraColumn: s.registerExtraColumn,
1297
1298
  updateExtraColumnWidth: s.updateExtraColumnWidth,
1298
1299
  updateExtraColumnOrder: s.updateExtraColumnOrder,
1299
1300
  updateExtraColumnSticky: s.updateExtraColumnSticky,
1300
1301
  registerComponent: C,
1301
- updateColumns: d,
1302
- updateColumnVisibility: f,
1302
+ updateColumns: f,
1303
+ updateColumnVisibility: S,
1303
1304
  updateColumnSticky: y,
1304
- updateTableLayout: p,
1305
+ updateTableLayout: u,
1305
1306
  updateStickyHeader: i
1306
1307
  };
1307
1308
  return t.plugins.registerPublicApi(l), {
1308
1309
  ...l,
1309
- updateColumns: d,
1310
+ updateColumns: f,
1310
1311
  useComponent: w,
1311
1312
  useConfigurationColumns: _,
1312
1313
  useTableLayout: r,
@@ -1316,9 +1317,9 @@ function pn(t) {
1316
1317
  ...a,
1317
1318
  ...g,
1318
1319
  ...c,
1319
- ...u
1320
+ ...d
1320
1321
  };
1321
- function d(b) {
1322
+ function f(b) {
1322
1323
  const x = g.initializeColumns(b), { columnSticky: L, groupSticky: E } = a.initializeStickyState(b), v = e.getState();
1323
1324
  e.setState({
1324
1325
  ...x,
@@ -1332,11 +1333,11 @@ function pn(t) {
1332
1333
  minContentWidths: v.minContentWidths
1333
1334
  });
1334
1335
  }
1335
- function f(b, x) {
1336
+ function S(b, x) {
1336
1337
  const L = e.getState(), E = new Map(L.columnVisibility);
1337
- E.set(b, x), e.setState({ columnVisibility: E }), m == null || m.record(b, x);
1338
+ E.set(b, x), e.setState({ columnVisibility: E }), p == null || p.record(b, x);
1338
1339
  }
1339
- function p(b) {
1340
+ function u(b) {
1340
1341
  e.setState({ tableLayout: b });
1341
1342
  }
1342
1343
  function r() {
@@ -1350,13 +1351,13 @@ function pn(t) {
1350
1351
  }
1351
1352
  function y(b, x) {
1352
1353
  const L = e.getState();
1353
- if (L.columns.some((v) => D(v) && v.id === b)) {
1354
- const v = L.columns.find((O) => D(O) && O.id === b), T = new Map(L.groupSticky);
1354
+ if (L.columns.some((v) => I(v) && v.id === b)) {
1355
+ const v = L.columns.find((O) => I(O) && O.id === b), T = new Map(L.groupSticky);
1355
1356
  T.set(b, x);
1356
- const I = new Map(L.columnSticky);
1357
- if (v && D(v))
1358
- for (const O of v.columns) I.set(O.id, x);
1359
- e.setState({ groupSticky: T, columnSticky: I });
1357
+ const D = new Map(L.columnSticky);
1358
+ if (v && I(v))
1359
+ for (const O of v.columns) D.set(O.id, x);
1360
+ e.setState({ groupSticky: T, columnSticky: D });
1360
1361
  } else {
1361
1362
  const v = new Map(L.columnSticky);
1362
1363
  v.set(b, x), e.setState({ columnSticky: v });
@@ -1385,32 +1386,32 @@ function pn(t) {
1385
1386
  );
1386
1387
  return vt(() => {
1387
1388
  const v = Array.from(x.values()).filter(Boolean).length;
1388
- function T(I) {
1389
- const O = x.get(I.id) ?? !0;
1389
+ function T(D) {
1390
+ const O = x.get(D.id) ?? !0;
1390
1391
  return {
1391
- id: I.id,
1392
- label: k(I.label),
1392
+ id: D.id,
1393
+ label: k(D.label),
1393
1394
  visible: O,
1394
- sticky: L.get(I.id) ?? !1,
1395
- visibleToggleDisabled: I.visibleToggleDisabled ?? (O && v === 1)
1395
+ sticky: L.get(D.id) ?? !1,
1396
+ visibleToggleDisabled: D.visibleToggleDisabled ?? (O && v === 1)
1396
1397
  };
1397
1398
  }
1398
- return b.map((I) => D(I) ? {
1399
- id: I.id,
1400
- label: k(I.label),
1401
- visible: I.visible ?? !0,
1402
- sticky: E.get(I.id) ?? !1,
1403
- columns: I.columns.map(T)
1404
- } : T(I));
1399
+ return b.map((D) => I(D) ? {
1400
+ id: D.id,
1401
+ label: k(D.label),
1402
+ visible: D.visible ?? !0,
1403
+ sticky: E.get(D.id) ?? !1,
1404
+ columns: D.columns.map(T)
1405
+ } : T(D));
1405
1406
  }, [b, x, L, E]);
1406
1407
  }
1407
1408
  }
1408
- function mn() {
1409
+ function Sn() {
1409
1410
  const t = /* @__PURE__ */ new Map();
1410
- return t.set("body-cell-content", Wt), t.set("content", Re), t.set("header-cell-label", Oe), t.set("header-group", bt), t.set("row", Ne), t;
1411
+ return t.set("body-cell-content", Wt), t.set("content", Oe), t.set("header-cell-label", Ae), t.set("header-group", bt), t.set("row", Ve), t;
1411
1412
  }
1412
- function Sn(t) {
1413
- const e = ve(), n = {}, o = {
1413
+ function hn(t) {
1414
+ const e = ke(), n = {}, o = {
1414
1415
  hooked: e,
1415
1416
  config: t,
1416
1417
  get plugins() {
@@ -1435,7 +1436,7 @@ function Sn(t) {
1435
1436
  return A(n.table, "table");
1436
1437
  }
1437
1438
  };
1438
- return n.plugins = Ge(o), n.core = we(), n.load = Ee(o), n.storage = Me(o), n.persistentState = Ie(o), n.layout = Le(o), n.table = pn(o), {
1439
+ return n.plugins = Me(o), n.core = ve(), n.load = De(o), n.storage = Re(o), n.persistentState = Ie(o), n.layout = _e(o), n.table = mn(o), {
1439
1440
  init: a,
1440
1441
  destroy: s,
1441
1442
  ...o.plugins.pluginContext,
@@ -1443,12 +1444,12 @@ function Sn(t) {
1443
1444
  };
1444
1445
  function s() {
1445
1446
  e.callHookSync("destroy");
1446
- const m = o.core.useLoadStateStore.getState().loadState === "loading" && o.load.getLoadInstances().length > 0;
1447
- o.load.abort(), m && o.core.resetLoadState();
1447
+ const p = o.core.useLoadStateStore.getState().loadState === "loading" && o.load.getLoadInstances().length > 0;
1448
+ o.load.abort(), p && o.core.resetLoadState();
1448
1449
  }
1449
1450
  async function a() {
1450
- const { loadState: m } = o.core.useLoadStateStore.getState();
1451
- m === "loaded" || m === "loading" || await o.core.loadPromise(o.load.init());
1451
+ const { loadState: p } = o.core.useLoadStateStore.getState();
1452
+ p === "loaded" || p === "loading" || await o.core.loadPromise(o.load.init());
1452
1453
  }
1453
1454
  }
1454
1455
  function A(t, e) {
@@ -1456,59 +1457,60 @@ function A(t, e) {
1456
1457
  throw new Error(`[DataGrid] The ${e} service was used before it was created.`);
1457
1458
  return t;
1458
1459
  }
1459
- const hn = [];
1460
- function Pn({
1460
+ const yn = [];
1461
+ function Fn({
1461
1462
  name: t,
1462
1463
  load: e,
1463
1464
  columns: n,
1464
1465
  children: o,
1465
1466
  persistent: s,
1466
1467
  persistentColumnVisibility: a,
1467
- tableLayout: m = "fixed",
1468
+ tableLayout: p = "fixed",
1468
1469
  stickyHeader: g = !1,
1469
1470
  loading: c = !1,
1470
- implicitFilterKeys: u,
1471
- label: l
1471
+ implicitFilterKeys: d,
1472
+ label: l,
1473
+ portalContainer: f
1472
1474
  }) {
1473
- const d = $t(e), [f] = ut(
1474
- () => Sn({
1475
+ const S = jt(e), [u] = ut(
1476
+ () => hn({
1475
1477
  name: t,
1476
- load: d,
1478
+ load: S,
1477
1479
  persistent: s,
1478
1480
  persistentColumnVisibility: a
1479
1481
  })
1480
1482
  );
1481
1483
  return M(() => {
1482
- f.updateTableLayout(m);
1483
- }, [f, m]), M(() => {
1484
- f.updateColumns(n);
1485
- }, [f, n]), M(() => {
1486
- f.updateStickyHeader(g);
1487
- }, [f, g]), M(() => {
1488
- f[U].core.updateLoading(c);
1489
- }, [f, c]), M(() => {
1490
- f[U].storage.updateImplicitFilterKeys(
1491
- u ?? hn
1484
+ u.updateTableLayout(p);
1485
+ }, [u, p]), M(() => {
1486
+ u.updateColumns(n);
1487
+ }, [u, n]), M(() => {
1488
+ u.updateStickyHeader(g);
1489
+ }, [u, g]), M(() => {
1490
+ u[U].core.updateLoading(c);
1491
+ }, [u, c]), M(() => {
1492
+ u[U].storage.updateImplicitFilterKeys(
1493
+ d ?? yn
1492
1494
  );
1493
- }, [f, u]), /* @__PURE__ */ S(xt, { value: f, children: /* @__PURE__ */ G(Rt, { value: (l == null ? void 0 : l.trim()) || void 0, children: [
1495
+ }, [u, d]), /* @__PURE__ */ m(xt, { value: u, children: /* @__PURE__ */ m(Rt, { value: (l == null ? void 0 : l.trim()) || void 0, children: /* @__PURE__ */ G($t, { value: f, children: [
1494
1496
  o,
1495
- /* @__PURE__ */ S(kt, { fallback: /* @__PURE__ */ S(Q, {}), children: /* @__PURE__ */ S(be, {}) })
1496
- ] }) });
1497
+ /* @__PURE__ */ m(kt, { fallback: /* @__PURE__ */ m(Q, {}), children: /* @__PURE__ */ m(we, {}) })
1498
+ ] }) }) });
1497
1499
  }
1498
- const Tn = {
1500
+ const Bn = {
1499
1501
  table: Z,
1500
1502
  cards: gt
1501
1503
  };
1502
- function Fn() {
1504
+ function zn() {
1503
1505
  return R().layout.useLayoutStore((e) => e.activeSlotIds.get("main"));
1504
1506
  }
1505
1507
  export {
1506
- Tn as DATA_GRID_VIEW,
1507
- Pn as DataGrid,
1508
- $n as createDataGridPlugin,
1508
+ Bn as DATA_GRID_VIEW,
1509
+ Fn as DataGrid,
1510
+ Kn as createDataGridPlugin,
1509
1511
  j as useDataGrid,
1510
- Fn as useDataGridActiveView,
1511
- jn as useDataGridPluginContext,
1512
- Un as useDataGridRecord
1512
+ zn as useDataGridActiveView,
1513
+ Un as useDataGridPluginContext,
1514
+ Jn as useDataGridRecord
1513
1515
  };
1514
1516
  //# sourceMappingURL=data-grid.js.map