@gears-frontx/ui-kit 0.4.6 → 0.4.7

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