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