@gears-frontx/ui-kit 0.4.4 → 0.4.5

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