@box-kite/react 2.0.1 → 2.2.0

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 (145) hide show
  1. package/.claude/rules/box-kite-rules.md +24 -2
  2. package/.claude/skills/box-kite/SKILL.md +27 -5
  3. package/.claude/skills/box-kite/references/components.md +8 -3
  4. package/.claude/skills/box-kite/references/patterns.md +24 -1
  5. package/.claude/skills/box-kite/references/styling.md +23 -0
  6. package/.cursor/rules/box-kite.mdc +25 -3
  7. package/AGENTS.md +28 -3
  8. package/BOX_AI_CONTEXT.md +732 -12
  9. package/BOX_KITE_AI_CONTEXT.md +732 -12
  10. package/README.md +41 -9
  11. package/box.cjs +1 -1
  12. package/box.d.ts +13 -2
  13. package/box.mjs +25 -18
  14. package/catalog.cjs +1 -0
  15. package/catalog.d.ts +8 -0
  16. package/catalog.mjs +2347 -0
  17. package/client.cjs +1 -1
  18. package/client.mjs +59 -53
  19. package/components/agent.cjs +1 -0
  20. package/components/agent.d.ts +215 -0
  21. package/components/agent.mjs +405 -0
  22. package/components/button.cjs +1 -1
  23. package/components/button.mjs +10 -14
  24. package/components/chart.d.ts +1 -0
  25. package/components/dashboard.cjs +1 -0
  26. package/components/dashboard.d.ts +121 -0
  27. package/components/dashboard.mjs +690 -0
  28. package/components/dataGrid/components/dataGridBody.d.ts +2 -1
  29. package/components/dataGrid/components/dataGridDetailRow.d.ts +13 -2
  30. package/components/dataGrid/components/dataGridGroupRow.d.ts +13 -2
  31. package/components/dataGrid/components/dataGridRow.d.ts +13 -2
  32. package/components/dataGrid/contracts/dataGridContract.d.ts +66 -2
  33. package/components/dataGrid/models/cellModel.d.ts +3 -0
  34. package/components/dataGrid/models/editModel.d.ts +27 -0
  35. package/components/dataGrid/models/exportModel.d.ts +2 -1
  36. package/components/dataGrid/models/gridModel.d.ts +3 -0
  37. package/components/dataGrid/models/rangeModel.d.ts +119 -0
  38. package/components/dataGrid/models/viewportModel.d.ts +23 -2
  39. package/components/dataGrid/useGridNavigation.d.ts +10 -2
  40. package/components/dataGrid.cjs +4 -1
  41. package/components/dataGrid.d.ts +3 -0
  42. package/components/dataGrid.mjs +1056 -765
  43. package/components/flex.cjs +1 -1
  44. package/components/flex.mjs +10 -13
  45. package/components/form.cjs +1 -1
  46. package/components/form.mjs +7 -7
  47. package/components/grid.cjs +1 -1
  48. package/components/grid.mjs +10 -13
  49. package/components/markdown.cjs +1 -0
  50. package/components/markdown.d.ts +55 -0
  51. package/components/markdown.mjs +179 -0
  52. package/components/menu.cjs +1 -1
  53. package/components/menu.mjs +16 -16
  54. package/components/overlay.cjs +1 -1
  55. package/components/overlay.mjs +35 -34
  56. package/components/popover.cjs +1 -1
  57. package/components/popover.mjs +4 -4
  58. package/components/semantics.cjs +1 -1
  59. package/components/semantics.d.ts +29 -29
  60. package/components/semantics.mjs +9 -13
  61. package/components/skeleton.cjs +1 -0
  62. package/components/skeleton.d.ts +34 -0
  63. package/components/skeleton.mjs +25 -0
  64. package/components/svg.cjs +1 -1
  65. package/components/svg.mjs +38 -44
  66. package/components/textarea.cjs +1 -1
  67. package/components/textarea.mjs +12 -16
  68. package/components/textbox.cjs +1 -1
  69. package/components/textbox.mjs +12 -16
  70. package/components/toaster.cjs +1 -1
  71. package/components/toaster.mjs +42 -43
  72. package/components/visuallyHidden.cjs +1 -1
  73. package/components/visuallyHidden.mjs +10 -13
  74. package/dashboardSchema.cjs +1 -0
  75. package/dashboardSchema.mjs +78 -0
  76. package/docs/a11y.md +2 -3
  77. package/docs/catalog.md +451 -0
  78. package/docs/components.md +4 -0
  79. package/docs/index.md +3 -0
  80. package/docs/interop.md +237 -0
  81. package/docs/mcp.md +70 -0
  82. package/docs/props.md +135 -23
  83. package/interop.cjs +1 -0
  84. package/interop.d.ts +51 -0
  85. package/interop.mjs +454 -0
  86. package/layer.cjs +1 -1
  87. package/layer.mjs +61 -59
  88. package/mcp/src/data.d.ts +88 -0
  89. package/mcp/src/data.test.d.ts +1 -0
  90. package/mcp/src/engine.d.ts +23 -0
  91. package/mcp/src/index.d.ts +1 -0
  92. package/mcp/src/search.d.ts +26 -0
  93. package/mcp/src/search.test.d.ts +1 -0
  94. package/mcp/src/server.d.ts +18 -0
  95. package/mcp/src/server.test.d.ts +1 -0
  96. package/mcp/src/styles.d.ts +27 -0
  97. package/mcp/src/styles.test.d.ts +1 -0
  98. package/mcp/src/tools.d.ts +18 -0
  99. package/mcp/src/vocabulary.d.ts +41 -0
  100. package/package.json +170 -37
  101. package/react/boxComponent.d.ts +10 -0
  102. package/react/popover/useTopLayer.d.ts +17 -0
  103. package/react/spec/renderSpec.d.ts +51 -0
  104. package/react/spec/specBoundary.d.ts +25 -0
  105. package/react/spec/specRegistry.d.ts +42 -0
  106. package/react/spec/specRenderer.d.ts +10 -0
  107. package/react/theme/theme.d.ts +10 -0
  108. package/react/useStyles.d.ts +2 -0
  109. package/react-shared.cjs +1 -1
  110. package/react-shared.mjs +44 -37
  111. package/registry/blocks/dashboard-shell/dashboard-shell.d.ts +22 -0
  112. package/registry/blocks/dashboard-shell/dashboard-stats.d.ts +13 -0
  113. package/registry/blocks/data-grid/invoice-rows.d.ts +15 -0
  114. package/registry/blocks/data-grid/invoices-grid.d.ts +1 -0
  115. package/registry/blocks/settings-form/settings-form.d.ts +17 -0
  116. package/rsc.cjs +1 -1
  117. package/rsc.d.ts +11 -1
  118. package/rsc.mjs +15 -12
  119. package/spec.cjs +2 -0
  120. package/spec.d.ts +12 -0
  121. package/spec.mjs +382 -0
  122. package/specData.cjs +1 -0
  123. package/specData.mjs +69 -0
  124. package/specDefs.cjs +1 -0
  125. package/specDefs.mjs +33 -0
  126. package/specSchema.cjs +1 -0
  127. package/specSchema.mjs +88 -0
  128. package/ssg.cjs +1 -1
  129. package/ssg.d.ts +8 -2
  130. package/ssg.mjs +13 -9
  131. package/utils/agent/agentUtils.d.ts +81 -0
  132. package/utils/catalog/catalogContracts.d.ts +19 -0
  133. package/utils/catalog/catalogManifest.d.ts +8 -0
  134. package/utils/dashboard/dashboardSchema.d.ts +18 -0
  135. package/utils/dashboard/dashboardUtils.d.ts +97 -0
  136. package/utils/environment/environmentUtils.d.ts +5 -0
  137. package/utils/interop/a2uiInterop.d.ts +82 -0
  138. package/utils/interop/assistantUiInterop.d.ts +34 -0
  139. package/utils/interop/toolInterop.d.ts +30 -0
  140. package/utils/spec/specData.d.ts +19 -0
  141. package/utils/spec/specDefs.d.ts +11 -0
  142. package/utils/spec/specProps.d.ts +15 -0
  143. package/utils/spec/specSchema.d.ts +23 -0
  144. package/utils/spec/specTypes.d.ts +71 -0
  145. package/utils/spec/specValidate.d.ts +10 -0
@@ -11,83 +11,83 @@ import f from "./flex.mjs";
11
11
  import p from "./checkbox.mjs";
12
12
  import m from "./overlay.mjs";
13
13
  import h from "./presence.mjs";
14
- import g from "./textbox.mjs";
15
- import _ from "./grid.mjs";
16
- import v from "./dropdown.mjs";
17
- import y from "./visuallyHidden.mjs";
14
+ import g from "./visuallyHidden.mjs";
15
+ import _ from "./textbox.mjs";
16
+ import v from "./grid.mjs";
17
+ import y from "./dropdown.mjs";
18
18
  import { Span as b } from "./semantics.mjs";
19
- import x, { Fragment as S, createContext as C, forwardRef as w, useCallback as T, useContext as E, useEffect as D, useImperativeHandle as ee, useLayoutEffect as O, useMemo as te, useRef as k, useState as A } from "react";
20
- import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
21
- import { useSyncExternalStore as P } from "use-sync-external-store/shim";
19
+ import x, { Fragment as S, createContext as C, forwardRef as w, memo as T, useCallback as E, useContext as D, useEffect as O, useImperativeHandle as k, useLayoutEffect as A, useMemo as ee, useRef as j, useState as M } from "react";
20
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
21
+ import { useSyncExternalStore as te } from "use-sync-external-store/shim";
22
22
  //#region src/components/dataGrid/components/dataGridPagination.tsx
23
- function F(e) {
24
- let { grid: t } = e, { pagination: n } = t, i = n.state, a = T(() => n.firstPage(), [n]), o = T(() => n.prevPage(), [n]), s = T(() => n.nextPage(), [n]), c = T(() => n.lastPage(), [n]);
23
+ function ne(e) {
24
+ let { grid: t } = e, { pagination: n } = t, i = n.state, a = E(() => n.firstPage(), [n]), o = E(() => n.prevPage(), [n]), s = E(() => n.nextPage(), [n]), c = E(() => n.lastPage(), [n]);
25
25
  if (!i) return null;
26
26
  let { canGoPrev: l, canGoNext: u, totalPages: d } = n;
27
- return /* @__PURE__ */ N(f, {
27
+ return /* @__PURE__ */ F(f, {
28
28
  component: `${t.componentName}.bottomBar.pagination`,
29
29
  gap: .5,
30
30
  ai: "center",
31
31
  children: [
32
- /* @__PURE__ */ M(ne, {
32
+ /* @__PURE__ */ P(re, {
33
33
  grid: t,
34
34
  pageSize: i.pageSize
35
35
  }),
36
- /* @__PURE__ */ M(I, {
36
+ /* @__PURE__ */ P(I, {
37
37
  componentName: t.componentName,
38
38
  label: "First page",
39
39
  onClick: a,
40
40
  disabled: !l,
41
- children: /* @__PURE__ */ M(oe, {})
41
+ children: /* @__PURE__ */ P(se, {})
42
42
  }),
43
- /* @__PURE__ */ M(I, {
43
+ /* @__PURE__ */ P(I, {
44
44
  componentName: t.componentName,
45
45
  label: "Previous page",
46
46
  onClick: o,
47
47
  disabled: !l,
48
- children: /* @__PURE__ */ M(ie, {})
48
+ children: /* @__PURE__ */ P(ae, {})
49
49
  }),
50
- /* @__PURE__ */ N(f, {
50
+ /* @__PURE__ */ F(f, {
51
51
  ai: "center",
52
52
  gap: 1.5,
53
53
  px: 2,
54
54
  userSelect: "none",
55
- children: [/* @__PURE__ */ M(re, {
55
+ children: [/* @__PURE__ */ P(ie, {
56
56
  grid: t,
57
57
  page: i.page,
58
58
  totalPages: d
59
- }), /* @__PURE__ */ N(r, {
59
+ }), /* @__PURE__ */ F(r, {
60
60
  component: `${t.componentName}.bottomBar.pagination.info`,
61
61
  fontSize: 12,
62
62
  opacity: .7,
63
63
  children: ["of ", d]
64
64
  })]
65
65
  }),
66
- /* @__PURE__ */ M(I, {
66
+ /* @__PURE__ */ P(I, {
67
67
  componentName: t.componentName,
68
68
  label: "Next page",
69
69
  onClick: s,
70
70
  disabled: !u,
71
- children: /* @__PURE__ */ M(ae, {})
71
+ children: /* @__PURE__ */ P(oe, {})
72
72
  }),
73
- /* @__PURE__ */ M(I, {
73
+ /* @__PURE__ */ P(I, {
74
74
  componentName: t.componentName,
75
75
  label: "Last page",
76
76
  onClick: c,
77
77
  disabled: !u,
78
- children: /* @__PURE__ */ M(se, {})
78
+ children: /* @__PURE__ */ P(ce, {})
79
79
  })
80
80
  ]
81
81
  });
82
82
  }
83
- F.displayName = "DataGridPagination";
84
- function ne({ grid: e, pageSize: t }) {
83
+ ne.displayName = "DataGridPagination";
84
+ function re({ grid: e, pageSize: t }) {
85
85
  let n = e.pagination.pageSizeOptions;
86
- return !n || n.length === 0 ? null : /* @__PURE__ */ M(f, {
86
+ return !n || n.length === 0 ? null : /* @__PURE__ */ P(f, {
87
87
  ai: "center",
88
88
  gap: 1,
89
89
  me: 1,
90
- children: /* @__PURE__ */ M(r, {
90
+ children: /* @__PURE__ */ P(r, {
91
91
  component: `${e.componentName}.bottomBar.pagination.pageSize`,
92
92
  tag: "select",
93
93
  fontSize: 12,
@@ -98,22 +98,22 @@ function ne({ grid: e, pageSize: t }) {
98
98
  value: t,
99
99
  onChange: (t) => e.pagination.changePageSize(Number(t.target.value))
100
100
  },
101
- children: n.map((e) => /* @__PURE__ */ N("option", {
101
+ children: n.map((e) => /* @__PURE__ */ F("option", {
102
102
  value: e,
103
103
  children: [e, " / page"]
104
104
  }, e))
105
105
  })
106
106
  });
107
107
  }
108
- function re({ grid: e, page: t, totalPages: n }) {
109
- let [r, i] = A(String(t)), [a, o] = A(t);
108
+ function ie({ grid: e, page: t, totalPages: n }) {
109
+ let [r, i] = M(String(t)), [a, o] = M(t);
110
110
  t !== a && (o(t), i(String(t)));
111
- let s = T(() => {
111
+ let s = E(() => {
112
112
  e.pagination.jumpToPage(r), i(String(e.pagination.page));
113
- }, [e, r]), c = T((e) => {
113
+ }, [e, r]), c = E((e) => {
114
114
  e.key === "Enter" ? s() : e.key === "Escape" && i(String(t));
115
115
  }, [s, t]);
116
- return /* @__PURE__ */ M(g, {
116
+ return /* @__PURE__ */ P(_, {
117
117
  type: "number",
118
118
  variant: "compact",
119
119
  value: r,
@@ -131,7 +131,7 @@ function re({ grid: e, page: t, totalPages: n }) {
131
131
  }
132
132
  function I(e) {
133
133
  let { componentName: t, label: n, onClick: r, disabled: i, children: a } = e;
134
- return /* @__PURE__ */ M(d, {
134
+ return /* @__PURE__ */ P(d, {
135
135
  component: `${t}.bottomBar.pagination.button`,
136
136
  props: {
137
137
  "aria-label": n,
@@ -152,7 +152,7 @@ function I(e) {
152
152
  });
153
153
  }
154
154
  function L(e) {
155
- return /* @__PURE__ */ M(l, {
155
+ return /* @__PURE__ */ P(l, {
156
156
  viewBox: "0 0 24 24",
157
157
  width: "14",
158
158
  height: "14",
@@ -161,55 +161,55 @@ function L(e) {
161
161
  strokeWidth: 2,
162
162
  strokeLinecap: "round",
163
163
  strokeLinejoin: "round",
164
- children: /* @__PURE__ */ M(c, { d: e.d })
164
+ children: /* @__PURE__ */ P(c, { d: e.d })
165
165
  });
166
166
  }
167
- function ie() {
168
- return /* @__PURE__ */ M(L, { d: "M15 18l-6-6 6-6" });
169
- }
170
167
  function ae() {
171
- return /* @__PURE__ */ M(L, { d: "M9 18l6-6-6-6" });
168
+ return /* @__PURE__ */ P(L, { d: "M15 18l-6-6 6-6" });
172
169
  }
173
170
  function oe() {
174
- return /* @__PURE__ */ M(L, { d: "M18 18l-6-6 6-6M11 18l-6-6 6-6" });
171
+ return /* @__PURE__ */ P(L, { d: "M9 18l6-6-6-6" });
175
172
  }
176
173
  function se() {
177
- return /* @__PURE__ */ M(L, { d: "M6 18l6-6-6-6M13 18l6-6-6-6" });
174
+ return /* @__PURE__ */ P(L, { d: "M18 18l-6-6 6-6M11 18l-6-6 6-6" });
175
+ }
176
+ function ce() {
177
+ return /* @__PURE__ */ P(L, { d: "M6 18l6-6-6-6M13 18l6-6-6-6" });
178
178
  }
179
179
  //#endregion
180
180
  //#region src/components/dataGrid/components/dataGridBottomBar.tsx
181
- function ce(e) {
181
+ function le(e) {
182
182
  let { grid: t } = e, { pagination: n, filter: i } = t;
183
183
  if (n.state) {
184
184
  let { totalItems: e, startItem: i, endItem: a } = n;
185
- return /* @__PURE__ */ N(f, {
185
+ return /* @__PURE__ */ F(f, {
186
186
  component: `${t.componentName}.bottomBar`,
187
187
  children: [
188
- /* @__PURE__ */ N(r, {
188
+ /* @__PURE__ */ F(r, {
189
189
  component: `${t.componentName}.bottomBar.info`,
190
190
  children: ["Rows: ", e > 0 ? `${i}–${a} of ${e}` : "0"]
191
191
  }),
192
- t.props.def.rowSelection && /* @__PURE__ */ N(r, {
192
+ t.props.def.rowSelection && /* @__PURE__ */ F(r, {
193
193
  component: `${t.componentName}.bottomBar.info`,
194
194
  children: ["Selected: ", t.selectedRows.size]
195
195
  }),
196
- /* @__PURE__ */ M(F, { grid: t })
196
+ /* @__PURE__ */ P(ne, { grid: t })
197
197
  ]
198
198
  });
199
199
  }
200
200
  let { filtered: a, total: o } = i.filterStats;
201
- return /* @__PURE__ */ N(f, {
201
+ return /* @__PURE__ */ F(f, {
202
202
  component: `${t.componentName}.bottomBar`,
203
203
  children: [
204
- /* @__PURE__ */ N(r, {
204
+ /* @__PURE__ */ F(r, {
205
205
  component: `${t.componentName}.bottomBar.info`,
206
206
  children: ["Rows: ", a === o ? o : `${a} / ${o}`]
207
207
  }),
208
- t.props.def.rowSelection && /* @__PURE__ */ N(r, {
208
+ t.props.def.rowSelection && /* @__PURE__ */ F(r, {
209
209
  component: `${t.componentName}.bottomBar.info`,
210
210
  children: ["Selected: ", t.selectedRows.size]
211
211
  }),
212
- i.hasActiveFilters && /* @__PURE__ */ M(r, {
212
+ i.hasActiveFilters && /* @__PURE__ */ P(r, {
213
213
  component: `${t.componentName}.bottomBar.clearFilters`,
214
214
  color: "blue-600",
215
215
  cursor: "pointer",
@@ -222,35 +222,135 @@ function ce(e) {
222
222
  }
223
223
  //#endregion
224
224
  //#region src/components/dataGrid/gridNavigationContext.ts
225
- var le = C(null);
225
+ var ue = C(null);
226
226
  function R() {
227
- return E(le);
227
+ return D(ue);
228
228
  }
229
229
  //#endregion
230
- //#region src/components/dataGrid/models/editModel.ts
231
- var ue = "Invalid value";
232
- function de(e, t) {
230
+ //#region src/components/dataGrid/models/viewportModel.ts
231
+ var de = class e {
232
+ grid;
233
+ static DEFAULT_VISIBLE_ROWS_COUNT = 10;
234
+ static ROWS_AHEAD = 12;
235
+ static ROWS_BEHIND = 4;
236
+ static PARTIAL_ROWS = 2;
237
+ static directionOf(e, t, n) {
238
+ return t === e ? n : t > e ? "down" : "up";
239
+ }
240
+ constructor(e) {
241
+ this.grid = e;
242
+ }
243
+ get showAll() {
244
+ return this.grid.props.def.visibleRowsCount === "all";
245
+ }
246
+ get hasDetailRows() {
247
+ return !!this.grid.props.def.rowDetail;
248
+ }
249
+ get isEmpty() {
250
+ return this.grid.source.enabled ? this.grid.flatRows.value.length === 0 : this.grid.data.length === 0;
251
+ }
252
+ get visibleRowsCount() {
253
+ if (this.showAll) return this.grid.flatRows.value.length;
254
+ let t = this.grid.props.def.visibleRowsCount;
255
+ return typeof t == "number" ? t : e.DEFAULT_VISIBLE_ROWS_COUNT;
256
+ }
257
+ get pageRows() {
258
+ let t = this.grid.props.def.visibleRowsCount;
259
+ return typeof t == "number" ? t : e.DEFAULT_VISIBLE_ROWS_COUNT;
260
+ }
261
+ get viewHeight() {
262
+ if (this.showAll) return;
263
+ let { rowHeight: e } = this.grid;
264
+ return e * this.visibleRowsCount + e / 5;
265
+ }
266
+ get totalHeight() {
267
+ return this.hasDetailRows ? this.grid.rowOffsets.value.totalHeight : this.grid.flatRows.value.length * this.grid.rowHeight;
268
+ }
269
+ get emptyHeight() {
270
+ return this.viewHeight ?? this.grid.rowHeight * e.DEFAULT_VISIBLE_ROWS_COUNT;
271
+ }
272
+ rowTop(e) {
273
+ return this.hasDetailRows ? this.grid.rowOffsets.value.offsets[e] ?? 0 : e * this.grid.rowHeight;
274
+ }
275
+ findStartIndex(e, t) {
276
+ let n = 0, r = e.length - 1;
277
+ for (; n < r;) {
278
+ let i = n + r + 1 >>> 1;
279
+ e[i] <= t ? n = i : r = i - 1;
280
+ }
281
+ return n;
282
+ }
283
+ window(t, n = "down") {
284
+ let r = this.grid.flatRows.value.length;
285
+ if (this.showAll) return {
286
+ startIndex: 0,
287
+ take: r,
288
+ translateY: 0,
289
+ totalHeight: this.totalHeight,
290
+ viewHeight: void 0
291
+ };
292
+ let { rowHeight: i } = this.grid, { ROWS_AHEAD: a, ROWS_BEHIND: o, PARTIAL_ROWS: s } = e, c = n === "down" ? o : a, { offsets: l } = this.grid.rowOffsets.value, u = this.hasDetailRows ? this.findStartIndex(l, t) : Math.floor(t / i), d = Math.max(0, u - c), f = this.hasDetailRows ? l[d] ?? 0 : d * i;
293
+ return {
294
+ startIndex: d,
295
+ take: this.visibleRowsCount + s + o + a,
296
+ translateY: f,
297
+ totalHeight: this.totalHeight,
298
+ viewHeight: this.viewHeight
299
+ };
300
+ }
301
+ }, fe = "Invalid value";
302
+ function pe(e) {
303
+ return e instanceof Error ? e.message : fe;
304
+ }
305
+ function z(e, t) {
233
306
  return JSON.stringify([e, t]);
234
307
  }
235
- var fe = 1e3;
236
- function pe(e) {
308
+ var me = 1e3;
309
+ function he(e) {
237
310
  return typeof e == "number" ? "number" : typeof e == "boolean" ? "checkbox" : "text";
238
311
  }
239
- function me(e, t) {
312
+ function ge(e, t) {
240
313
  if (e === "text") return t;
241
314
  if (e !== "number" || t.trim() === "") return;
242
315
  let n = Number(t);
243
316
  return Number.isFinite(n) ? n : void 0;
244
317
  }
245
- function he(e) {
318
+ var _e = /* @__PURE__ */ new Set([
319
+ "true",
320
+ "1",
321
+ "yes"
322
+ ]), ve = /* @__PURE__ */ new Set([
323
+ "false",
324
+ "0",
325
+ "no",
326
+ ""
327
+ ]), ye = "Wrong kind of value";
328
+ function be(e, t, n) {
329
+ if (e.type === "number") {
330
+ if (n.trim() === "") return { value: null };
331
+ let e = Number(n);
332
+ return Number.isFinite(e) ? { value: e } : void 0;
333
+ }
334
+ if (e.type === "checkbox") {
335
+ let e = n.trim().toLowerCase();
336
+ return _e.has(e) ? { value: !0 } : ve.has(e) ? { value: !1 } : void 0;
337
+ }
338
+ if (e.type === "select") {
339
+ let e = t.find((e) => String(e.value) === n);
340
+ return e ? { value: e.value } : void 0;
341
+ }
342
+ return { value: n };
343
+ }
344
+ function xe(e) {
246
345
  return e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey;
247
346
  }
248
- var ge = class {
347
+ var Se = class {
249
348
  grid;
250
349
  constructor(e) {
251
350
  this.grid = e;
252
351
  }
253
352
  values = /* @__PURE__ */ new Map();
353
+ rejected = /* @__PURE__ */ new Set();
254
354
  _edits = [];
255
355
  _active;
256
356
  _token = 0;
@@ -265,11 +365,17 @@ var ge = class {
265
365
  }
266
366
  editorFor(e, t) {
267
367
  let { editor: n } = e.def;
268
- return typeof n == "object" ? n : n ? { type: n } : { type: pe(t) };
368
+ return typeof n == "object" ? n : n ? { type: n } : { type: he(t) };
269
369
  }
270
370
  isEditing(e, t) {
271
371
  return this._active?.rowKey === e && this._active.columnKey === t;
272
372
  }
373
+ get isOpen() {
374
+ return !!this._active;
375
+ }
376
+ isRejected(e, t) {
377
+ return this.rejected.size > 0 && this.rejected.has(z(e, t));
378
+ }
273
379
  get draft() {
274
380
  return this._active?.draft;
275
381
  }
@@ -280,8 +386,8 @@ var ge = class {
280
386
  return !!this._active?.pending;
281
387
  }
282
388
  begin(e, t, n, r) {
283
- let i = r === void 0 ? void 0 : me(this.editorFor(t, n).type, r);
284
- this._active = {
389
+ let i = r === void 0 ? void 0 : ge(this.editorFor(t, n).type, r);
390
+ this.rejected.delete(z(e.key, t.key)), this._active = {
285
391
  row: e,
286
392
  rowKey: e.key,
287
393
  columnKey: t.key,
@@ -325,7 +431,7 @@ var ge = class {
325
431
  this._active = {
326
432
  ...e,
327
433
  pending: !0
328
- }, this.grid.notify(), s.then((t) => this.settle(e.token, o, t), (t) => this.settle(e.token, o, t instanceof Error ? t.message : ue));
434
+ }, this.grid.notify(), s.then((t) => this.settle(e.token, o, t), (t) => this.settle(e.token, o, pe(t)));
329
435
  return;
330
436
  }
331
437
  this.settle(e.token, o, s);
@@ -336,27 +442,77 @@ var ge = class {
336
442
  this._active = {
337
443
  ...this._active,
338
444
  pending: !1,
339
- error: typeof n == "string" ? n : ue
445
+ error: typeof n == "string" ? n : fe
340
446
  }, this.grid.notify();
341
447
  return;
342
448
  }
343
- this.values.set(de(t.rowKey, t.columnKey), t.value), this._edits = [...this._edits, t], this._active = void 0, this.grid.notify(), this.grid.props.onCellEditsChange?.(this._edits, { reason: "edit" });
449
+ this.values.set(z(t.rowKey, t.columnKey), t.value), this._edits = [...this._edits, t], this._active = void 0, this.grid.notify(), this.grid.props.onCellEditsChange?.(this._edits, { reason: "edit" });
344
450
  }
345
451
  }
346
452
  valueOf(e, t, n) {
347
453
  if (this.values.size === 0) return n;
348
- let r = de(e, t);
454
+ let r = z(e, t);
349
455
  return this.values.has(r) ? this.values.get(r) : n;
350
456
  }
351
457
  get edits() {
352
458
  return this._edits;
353
459
  }
354
460
  clearEdits = () => {
355
- (this.values.size !== 0 || this._edits.length !== 0) && (this.values.clear(), this._edits = [], this.grid.notify(), this.grid.props.onCellEditsChange?.(this._edits, { reason: "clear" }));
461
+ (this.values.size !== 0 || this._edits.length !== 0 || this.rejected.size !== 0) && (this.values.clear(), this.rejected.clear(), this._edits = [], this.grid.notify(), this.grid.props.onCellEditsChange?.(this._edits, { reason: "clear" }));
356
462
  };
463
+ paste(e, t) {
464
+ let n = this.grid.flatRows.value, r = this.grid.columns.value.visibleLeafs, i = this.grid.props.def.onCellEdit, a = ++this._token, o = [], s = [], c = 0;
465
+ for (let a = e.startRow; a <= e.endRow; a++) {
466
+ let l = n[a];
467
+ for (let n = e.startColumn; n <= e.endColumn; n++) {
468
+ let u = r[n], d = t(a - e.startRow, n - e.startColumn);
469
+ if (l?.kind !== "row" || !u || !this.isEditable(l, u)) {
470
+ c++;
471
+ continue;
472
+ }
473
+ let f = this.valueOf(l.key, u.key, l.data[u.key]), p = be(this.editorFor(u, f), this.optionsFor(u, l), d), m = {
474
+ rowKey: l.key,
475
+ columnKey: u.key,
476
+ row: l.data,
477
+ value: p?.value,
478
+ oldValue: f
479
+ };
480
+ o.push(m), s.push(p ? i?.(m) : ye);
481
+ }
482
+ }
483
+ if (s.some((e) => e instanceof Promise)) {
484
+ Promise.all(s.map((e) => Promise.resolve(e).catch(pe))).then((t) => this.settlePaste(a, e, o, t, c));
485
+ return;
486
+ }
487
+ this.settlePaste(a, e, o, s, c);
488
+ }
489
+ optionsFor(e, t) {
490
+ let { options: n } = typeof e.def.editor == "object" ? e.def.editor : {};
491
+ return (typeof n == "function" ? n(t.data) : n) ?? [];
492
+ }
493
+ settlePaste(e, t, n, r, i) {
494
+ if (this._token !== e) return;
495
+ let a = [], o = [];
496
+ this.rejected.clear(), n.forEach((e, t) => {
497
+ let n = r[t];
498
+ if (typeof n == "string" || n === !1) {
499
+ this.rejected.add(z(e.rowKey, e.columnKey)), o.push({
500
+ ...e,
501
+ error: typeof n == "string" ? n : fe
502
+ });
503
+ return;
504
+ }
505
+ Object.is(e.value, e.oldValue) || (this.values.set(z(e.rowKey, e.columnKey), e.value), a.push(e));
506
+ }), a.length > 0 && (this._edits = [...this._edits, ...a]), this.grid.notify(), a.length > 0 && this.grid.props.onCellEditsChange?.(this._edits, { reason: "paste" }), this.grid.props.onPaste?.({
507
+ range: this.grid.range.rangeOf(t),
508
+ applied: a,
509
+ rejected: o,
510
+ skipped: i
511
+ });
512
+ }
357
513
  nextEditable(e, t, n = !1) {
358
- let r = this.grid.flatRows.value, i = this.grid.columns.value.visibleLeafs, a = n ? -1 : 1, o = e * i.length + t + a, s = Math.min(r.length * i.length - 1, o + fe);
359
- for (let e = o; e >= Math.max(0, o - fe) && e <= s; e += a) {
514
+ let r = this.grid.flatRows.value, i = this.grid.columns.value.visibleLeafs, a = n ? -1 : 1, o = e * i.length + t + a, s = Math.min(r.length * i.length - 1, o + me);
515
+ for (let e = o; e >= Math.max(0, o - me) && e <= s; e += a) {
360
516
  let t = Math.floor(e / i.length), n = e % i.length, a = r[t], o = i[n];
361
517
  if (!(!o || a?.kind !== "row" || !this.isEditable(a, o))) return {
362
518
  row: t,
@@ -364,10 +520,10 @@ var ge = class {
364
520
  };
365
521
  }
366
522
  }
367
- }, z = Symbol("memo.unset"), _e = class {
523
+ }, B = Symbol("memo.unset"), Ce = class {
368
524
  action;
369
525
  deps;
370
- cache = z;
526
+ cache = B;
371
527
  dependents = /* @__PURE__ */ new Set();
372
528
  wired = !1;
373
529
  constructor(e, t) {
@@ -380,21 +536,21 @@ var ge = class {
380
536
  }
381
537
  }
382
538
  get value() {
383
- return this.wire(), this.cache === z && (this.cache = this.action()), this.cache;
539
+ return this.wire(), this.cache === B && (this.cache = this.action()), this.cache;
384
540
  }
385
541
  clear() {
386
- if (this.wire(), this.cache !== z) {
387
- this.cache = z;
542
+ if (this.wire(), this.cache !== B) {
543
+ this.cache = B;
388
544
  for (let e of this.dependents) e.clear();
389
545
  }
390
546
  }
391
547
  };
392
- function B(e, t = () => []) {
393
- return new _e(e, t);
548
+ function V(e, t = () => []) {
549
+ return new Ce(e, t);
394
550
  }
395
551
  //#endregion
396
552
  //#region src/components/dataGrid/models/cellModel.ts
397
- var ve = class {
553
+ var H = class {
398
554
  grid;
399
555
  row;
400
556
  column;
@@ -443,6 +599,9 @@ var ve = class {
443
599
  get error() {
444
600
  return this.grid.edits.error;
445
601
  }
602
+ get rejected() {
603
+ return this.grid.edits.isRejected(this.row.key, this.column.key);
604
+ }
446
605
  get pending() {
447
606
  return this.grid.edits.pending;
448
607
  }
@@ -458,7 +617,7 @@ var ve = class {
458
617
  cancelEdit = () => {
459
618
  this.grid.edits.cancel();
460
619
  };
461
- }, V = class e {
620
+ }, U = class e {
462
621
  grid;
463
622
  parentRow;
464
623
  constructor(e, t) {
@@ -491,7 +650,7 @@ var ve = class {
491
650
  get allRows() {
492
651
  return [];
493
652
  }
494
- }, H = class {
653
+ }, W = class {
495
654
  grid;
496
655
  rowIndex;
497
656
  constructor(e, t, n) {
@@ -517,7 +676,7 @@ var ve = class {
517
676
  toggleDetail = () => {
518
677
  this.grid.toggleDetailRow(this.key);
519
678
  };
520
- _cells = B(() => this.grid.columns.value.visibleLeafs.map((e) => new ve(this.grid, this, e)));
679
+ _cells = V(() => this.grid.columns.value.visibleLeafs.map((e) => new H(this.grid, this, e)));
521
680
  get cells() {
522
681
  return this._cells.value;
523
682
  }
@@ -540,7 +699,7 @@ var ve = class {
540
699
  return this.grid.expandedDetailRows.has(this.key);
541
700
  }
542
701
  get flatRows() {
543
- return this.grid.props.def.rowDetail && this.expanded ? [this, new V(this.grid, this)] : [this];
702
+ return this.grid.props.def.rowDetail && this.expanded ? [this, new U(this.grid, this)] : [this];
544
703
  }
545
704
  get allRows() {
546
705
  return this;
@@ -548,14 +707,14 @@ var ve = class {
548
707
  };
549
708
  //#endregion
550
709
  //#region src/components/dataGrid/models/treeRow.ts
551
- function U(e) {
710
+ function G(e) {
552
711
  return !!e && e.isTreeRow === !0;
553
712
  }
554
713
  //#endregion
555
714
  //#region src/components/dataGrid/useGridNavigation.ts
556
- var ye = "[role=\"gridcell\"],[role=\"columnheader\"]", be = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]", xe = 2, Se = [];
557
- function Ce(e) {
558
- let { grid: t, scrollerRef: r, scrollTop: i, onScrollTo: a } = e, s = t.headerRows.value, c = t.filter.hasFilterableColumns, l = s.length + +!!c, u = t.viewport.isEmpty ? Se : t.flatRows.value, d = t.columns.value.visibleLeafs.length, f = t.aggregation.hasFooter && !t.viewport.isEmpty ? 1 : 0, p = l + u.length + f, m = T((e) => {
715
+ var we = "[role=\"gridcell\"],[role=\"columnheader\"]", Te = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]", Ee = 2, De = [];
716
+ function Oe(e) {
717
+ let { grid: t, scrollerRef: r, scroll: i, onScrollTo: a } = e, s = t.headerRows.value, c = t.filter.hasFilterableColumns, l = s.length + +!!c, u = t.viewport.isEmpty ? De : t.flatRows.value, d = t.columns.value.visibleLeafs.length, f = t.aggregation.hasFooter && !t.viewport.isEmpty ? 1 : 0, p = l + u.length + f, m = E((e) => {
559
718
  if (e < s.length) return s[e]?.length ?? 0;
560
719
  if (e < l || e >= l + u.length) return d;
561
720
  let t = u[e - l];
@@ -565,19 +724,19 @@ function Ce(e) {
565
724
  d,
566
725
  l,
567
726
  s
568
- ]), h = T((e, t) => e < s.length ? (s[e]?.[t]?.headerCell.columnIndex ?? t + 1) - 1 : e < l ? t : u[e - l]?.columnOf(t) ?? t, [
727
+ ]), h = E((e, t) => e < s.length ? (s[e]?.[t]?.headerCell.columnIndex ?? t + 1) - 1 : e < l ? t : u[e - l]?.columnOf(t) ?? t, [
569
728
  u,
570
729
  l,
571
730
  s
572
- ]), g = k(!1), _ = T((e, n) => {
731
+ ]), g = j(!1), _ = E((e, n) => {
573
732
  let { viewport: o } = t, s = e - l, c = r.current;
574
733
  if (o.showAll || !c || s >= u.length) return;
575
734
  if (s < 0) {
576
735
  n >= l && (c.scrollTop = 0, a(0));
577
736
  return;
578
737
  }
579
- let { startIndex: d, take: f } = o.window(i);
580
- if (s >= d + xe && s < d + f - xe) return;
738
+ let { startIndex: d, take: f } = o.window(i.top, i.direction);
739
+ if (s >= d + Ee && s < d + f - Ee) return;
581
740
  let p = o.rowTop(s);
582
741
  c.scrollTop = p, a(p);
583
742
  }, [
@@ -587,127 +746,151 @@ function Ce(e) {
587
746
  a,
588
747
  i,
589
748
  r
590
- ]), v = k(0), y = o({
749
+ ]), v = j(0), y = E((e, n, r) => {
750
+ let i = e - l;
751
+ if (i < 0 || i >= u.length) {
752
+ t.range.clear();
753
+ return;
754
+ }
755
+ if (r.reason === "keyboard") {
756
+ t.range.setCurrent(i, h(e, n), !!r.event?.shiftKey);
757
+ return;
758
+ }
759
+ t.range.syncCurrent(i, h(e, n));
760
+ }, [
761
+ u.length,
762
+ h,
763
+ t,
764
+ l
765
+ ]), b = o({
591
766
  count: p,
592
767
  columns: m,
593
768
  columnIndexOf: h,
594
769
  pageSize: t.viewport.pageRows,
595
770
  onActiveCellChange: (e, t) => {
596
771
  let n = v.current;
597
- v.current = e.row, t.reason === "keyboard" && (_(e.row, n), g.current = !0);
772
+ v.current = e.row, y(e.row, e.column, t), t.reason === "keyboard" && (_(e.row, n), g.current = !0);
598
773
  }
599
- }), b = y.activeItem;
774
+ }), x = b.activeItem;
600
775
  n(() => {
601
- g.current && (g.current = !1, b()?.focus());
776
+ g.current && (g.current = !1, x()?.focus());
602
777
  });
603
- let x = T((e, n, r) => {
778
+ let S = E((e, n, r) => {
604
779
  if (!t.tree.enabled || e.key !== "ArrowRight" && e.key !== "ArrowLeft") return !1;
605
780
  let i = u[n - l];
606
- if (!U(i) || t.columns.value.visibleLeafs[r]?.key !== t.tree.columnKey) return !1;
781
+ if (!G(i) || t.columns.value.visibleLeafs[r]?.key !== t.tree.columnKey) return !1;
607
782
  if (e.key === (t.isRtl ? "ArrowLeft" : "ArrowRight")) return !i.hasChildren || i.treeExpanded ? !1 : (i.toggleTree(), !0);
608
783
  if (i.hasChildren && i.treeExpanded) return i.toggleTree(), !0;
609
784
  for (let e = n - 1; e >= l; e--) {
610
785
  let t = u[e - l];
611
- if (!(!U(t) || t.level >= i.level)) return y.setActiveCell(e, r, { reason: "keyboard" }), !0;
786
+ if (!(!G(t) || t.level >= i.level)) return b.setActiveCell(e, r, { reason: "keyboard" }), !0;
612
787
  }
613
788
  return !1;
614
789
  }, [
615
790
  u,
616
791
  t,
617
792
  l,
618
- y
619
- ]), S = T((e) => {
620
- let { activeIndex: t, activeColumn: n } = y, r = e ? -1 : 1, i = n + r;
621
- if (i >= 0 && i < m(t)) return y.setActiveCell(t, i, { reason: "keyboard" }), !0;
793
+ b
794
+ ]), C = E((e) => {
795
+ let { activeIndex: t, activeColumn: n } = b, r = e ? -1 : 1, i = n + r;
796
+ if (i >= 0 && i < m(t)) return b.setActiveCell(t, i, { reason: "keyboard" }), !0;
622
797
  let a = t + r;
623
- return a < 0 || a >= p ? !1 : (y.setActiveCell(a, e ? Math.max(0, m(a) - 1) : 0, { reason: "keyboard" }), !0);
798
+ return a < 0 || a >= p ? !1 : (b.setActiveCell(a, e ? Math.max(0, m(a) - 1) : 0, { reason: "keyboard" }), !0);
624
799
  }, [
625
800
  m,
626
- y,
801
+ b,
627
802
  p
628
- ]), C = T((e, n) => {
803
+ ]), w = E((e, n) => {
629
804
  if (!t.props.def.rowSelection) return !1;
630
805
  if (e < l) return e >= s.length || !t.columns.value.visibleLeafs[n]?.isRowSelection ? !1 : (t.toggleSelectAllRows(), !0);
631
806
  let r = t.flatRows.value[e - l];
632
- return r instanceof H && (r.toggleSelection(), !0);
807
+ return r instanceof W && (r.toggleSelection(), !0);
633
808
  }, [
634
809
  t,
635
810
  l,
636
811
  s.length
637
- ]), w = T((e, t, n) => {
638
- let r = Array.from(e.querySelectorAll(be));
812
+ ]), T = E((e, t, n) => {
813
+ let r = Array.from(e.querySelectorAll(Te));
639
814
  if (r.length < 2) return !1;
640
815
  let i = r.indexOf(t);
641
816
  return i !== -1 && (r[(i + (n ? -1 : 1) + r.length) % r.length].focus(), !0);
642
- }, []), E = y.onKeyDown, D = T((e) => {
643
- let n = e.target, r = n.closest?.(ye);
817
+ }, []), D = b.onKeyDown, O = E((e) => {
818
+ let n = e.target, r = n.closest?.(we);
644
819
  if (r) {
645
820
  if (n !== r) {
646
821
  if (e.key === "Escape" && !r.querySelector("[aria-expanded=\"true\"]")) {
647
822
  e.preventDefault(), r.focus();
648
823
  return;
649
824
  }
650
- e.key === "Tab" && w(r, n, e.shiftKey) && e.preventDefault();
825
+ e.key === "Tab" && T(r, n, e.shiftKey) && e.preventDefault();
651
826
  return;
652
827
  }
653
828
  if (e.key === "Tab" && t.props.def.tabNavigation === "cells") {
654
- S(e.shiftKey) && e.preventDefault();
829
+ C(e.shiftKey) && e.preventDefault();
655
830
  return;
656
831
  }
657
- if (e.key === " " && C(y.activeIndex, y.activeColumn)) {
832
+ if (e.key === " " && w(b.activeIndex, b.activeColumn)) {
658
833
  e.preventDefault();
659
834
  return;
660
835
  }
661
836
  if (e.key === "Enter" || e.key === " " || e.key === "F2") {
662
- let n = s[y.activeIndex]?.[y.activeColumn];
837
+ let n = s[b.activeIndex]?.[b.activeColumn];
663
838
  if (e.key !== "F2" && n?.headerCell.isSortable) {
664
839
  e.preventDefault(), n.sortColumn();
665
840
  return;
666
841
  }
667
- if (t.edits.beginAt(y.activeIndex - l, y.activeColumn)) {
842
+ if (t.edits.beginAt(b.activeIndex - l, b.activeColumn)) {
668
843
  e.preventDefault();
669
844
  return;
670
845
  }
671
- let i = r.querySelector(be);
846
+ let i = r.querySelector(Te);
672
847
  if (i) {
673
848
  e.preventDefault(), i.focus();
674
849
  return;
675
850
  }
676
851
  }
677
- if (t.edits.enabled && he(e) && t.edits.beginAt(y.activeIndex - l, y.activeColumn, e.key)) {
852
+ if (t.edits.enabled && xe(e) && t.edits.beginAt(b.activeIndex - l, b.activeColumn, e.key)) {
678
853
  e.preventDefault();
679
854
  return;
680
855
  }
681
- if (x(e, y.activeIndex, y.activeColumn)) {
856
+ if (S(e, b.activeIndex, b.activeColumn)) {
682
857
  e.preventDefault();
683
858
  return;
684
859
  }
685
- E(e);
860
+ D(e);
686
861
  }
687
862
  }, [
688
863
  t,
689
864
  l,
690
865
  s,
691
- y.activeColumn,
692
- y.activeIndex,
693
- E,
694
- S,
695
- w,
866
+ b.activeColumn,
867
+ b.activeIndex,
868
+ D,
696
869
  C,
697
- x
698
- ]);
870
+ T,
871
+ w,
872
+ S
873
+ ]), { cellProps: k, setActiveCell: A } = b;
699
874
  return {
700
- rowCount: p,
701
- columnCount: d,
702
- headerRowCount: l,
703
- cellProps: y.cellProps,
704
- setActiveCell: y.setActiveCell,
705
- onKeyDown: D
875
+ navigation: ee(() => ({
876
+ rowCount: p,
877
+ columnCount: d,
878
+ headerRowCount: l,
879
+ cellProps: k,
880
+ setActiveCell: A
881
+ }), [
882
+ k,
883
+ d,
884
+ l,
885
+ p,
886
+ A
887
+ ]),
888
+ onKeyDown: O
706
889
  };
707
890
  }
708
891
  //#endregion
709
892
  //#region src/utils/array/arrayUtils.ts
710
- var we;
893
+ var ke;
711
894
  (function(e) {
712
895
  function t(e, t, n = 0) {
713
896
  return e.slice(n, n + t);
@@ -754,36 +937,36 @@ var we;
754
937
  }));
755
938
  }
756
939
  e.groupBy = s;
757
- })(we ||= {});
758
- var W = we, Te = "row-number-cell", Ee = "row-selection-cell", G = "grouping-cell", De = "row-detail-cell";
940
+ })(ke ||= {});
941
+ var K = ke, Ae = "row-number-cell", je = "row-selection-cell", q = "grouping-cell", Me = "row-detail-cell";
759
942
  //#endregion
760
943
  //#region src/components/dataGrid/models/aggregationModel.ts
761
- function K(e) {
944
+ function J(e) {
762
945
  return e.filter((e) => typeof e == "number" && !Number.isNaN(e));
763
946
  }
764
- var Oe = (e) => e.reduce((e, t) => e + t, 0), ke = (e, t) => e.reduce((e, n) => (t ? n < e : n > e) ? n : e), Ae = {
947
+ var Ne = (e) => e.reduce((e, t) => e + t, 0), Pe = (e, t) => e.reduce((e, n) => (t ? n < e : n > e) ? n : e), Fe = {
765
948
  sum: (e) => {
766
- let t = K(e);
767
- return t.length ? Oe(t) : null;
949
+ let t = J(e);
950
+ return t.length ? Ne(t) : null;
768
951
  },
769
952
  avg: (e) => {
770
- let t = K(e);
771
- return t.length ? Math.round(Oe(t) / t.length * 100) / 100 : null;
953
+ let t = J(e);
954
+ return t.length ? Math.round(Ne(t) / t.length * 100) / 100 : null;
772
955
  },
773
956
  min: (e) => {
774
- let t = K(e);
775
- return t.length ? ke(t, !0) : null;
957
+ let t = J(e);
958
+ return t.length ? Pe(t, !0) : null;
776
959
  },
777
960
  max: (e) => {
778
- let t = K(e);
779
- return t.length ? ke(t, !1) : null;
961
+ let t = J(e);
962
+ return t.length ? Pe(t, !1) : null;
780
963
  },
781
964
  count: (e, t) => t.length
782
965
  };
783
- function je(e, t, n) {
784
- return typeof e == "function" ? e(t, n) : Ae[e]?.(t, n) ?? null;
966
+ function Ie(e, t, n) {
967
+ return typeof e == "function" ? e(t, n) : Fe[e]?.(t, n) ?? null;
785
968
  }
786
- var Me = class {
969
+ var Le = class {
787
970
  grid;
788
971
  constructor(e) {
789
972
  this.grid = e;
@@ -804,8 +987,8 @@ var Me = class {
804
987
  get footerLabelColumn() {
805
988
  return this.grid.columns.value.visibleLeafs.find((e) => (e.isData || e.isGrouping) && !e.aggregate);
806
989
  }
807
- footerCells = B(() => this.grid.columns.value.visibleLeafs.map((e) => new Ne(this.grid, e, this.grid.filteredData, "footer")), () => [this.grid.rows]);
808
- }, Ne = class {
990
+ footerCells = V(() => this.grid.columns.value.visibleLeafs.map((e) => new Re(this.grid, e, this.grid.filteredData, "footer")), () => [this.grid.rows]);
991
+ }, Re = class {
809
992
  grid;
810
993
  column;
811
994
  rows;
@@ -814,13 +997,13 @@ var Me = class {
814
997
  constructor(e, t, n, r, i) {
815
998
  this.grid = e, this.column = t, this.rows = n, this.scope = r, this.given = i;
816
999
  }
817
- _values = B(() => this.rows.map((e) => e[this.column.key]));
1000
+ _values = V(() => this.rows.map((e) => e[this.column.key]));
818
1001
  get values() {
819
1002
  return this._values.value;
820
1003
  }
821
- _value = B(() => {
1004
+ _value = V(() => {
822
1005
  let e = this.column.aggregate;
823
- return e ? je(e, this.values, this.rows) : null;
1006
+ return e ? Ie(e, this.values, this.rows) : null;
824
1007
  });
825
1008
  get value() {
826
1009
  let e = this.given?.();
@@ -835,7 +1018,7 @@ var Me = class {
835
1018
  get isLast() {
836
1019
  return !1;
837
1020
  }
838
- }, Pe = class {
1021
+ }, ze = class {
839
1022
  grid;
840
1023
  row;
841
1024
  column;
@@ -857,7 +1040,7 @@ var Me = class {
857
1040
  get cellKind() {
858
1041
  return this.column.isGrouping ? "grouping" : this.column.isRowSelection ? this.row.selectable ? "selection" : "spacer" : this.row.spans(this.column) ? "hidden" : this.column.aggregate ? "aggregate" : "spacer";
859
1042
  }
860
- _aggregate = B(() => this.column.aggregate ? new Ne(this.grid, this.column, this.row.allRows.map((e) => e.data), "group", () => this.row.aggregateValue(this.column)) : null);
1043
+ _aggregate = V(() => this.column.aggregate ? new Re(this.grid, this.column, this.row.allRows.map((e) => e.data), "group", () => this.row.aggregateValue(this.column)) : null);
861
1044
  get aggregate() {
862
1045
  return this._aggregate.value;
863
1046
  }
@@ -876,7 +1059,7 @@ var Me = class {
876
1059
  get hasGroupingBorder() {
877
1060
  return this.row.groupingColumn.pin === "START";
878
1061
  }
879
- }, Fe = class {
1062
+ }, Be = class {
880
1063
  grid;
881
1064
  groupColumn;
882
1065
  rows;
@@ -902,11 +1085,11 @@ var Me = class {
902
1085
  return `${this.parentRow?.key ?? ""}${this.groupColumn.key}${this.groupValue}`;
903
1086
  }
904
1087
  parentRow;
905
- _cells = B(() => this.grid.columns.value.visibleLeafs.map((e) => new Pe(this.grid, this, e)));
1088
+ _cells = V(() => this.grid.columns.value.visibleLeafs.map((e) => new ze(this.grid, this, e)));
906
1089
  get cells() {
907
1090
  return this._cells.value;
908
1091
  }
909
- _renderedCells = B(() => {
1092
+ _renderedCells = V(() => {
910
1093
  let e = [];
911
1094
  return this.cells.forEach((t, n) => {
912
1095
  t.cellKind !== "hidden" && e.push({
@@ -937,7 +1120,7 @@ var Me = class {
937
1120
  return this.parentRow ? this.parentRow.depth + 1 : 0;
938
1121
  }
939
1122
  get count() {
940
- return W.sumBy(this.rows, (e) => e.count, 0);
1123
+ return K.sumBy(this.rows, (e) => e.count, 0);
941
1124
  }
942
1125
  get flatRows() {
943
1126
  return this.expanded ? [this, ...this.rows.flatMap((e) => e.flatRows)] : [this];
@@ -946,7 +1129,7 @@ var Me = class {
946
1129
  return this.rows.flatMap((e) => e.allRows);
947
1130
  }
948
1131
  get groupingColumn() {
949
- return W.findOrThrow(this.grid.columns.value.leafs, (e) => e.key === G);
1132
+ return K.findOrThrow(this.grid.columns.value.leafs, (e) => e.key === q);
950
1133
  }
951
1134
  get groupingColumnGridColumn() {
952
1135
  return this.grid.groupingSpan.value.length;
@@ -964,11 +1147,11 @@ var Me = class {
964
1147
  };
965
1148
  //#endregion
966
1149
  //#region src/components/dataGrid/components/dataGridDetailRow.tsx
967
- function Ie(e) {
968
- let { row: t, index: i } = e, { grid: a, parentRow: o } = t, s = a.props.def.rowDetail, c = R(), l = (c?.headerRowCount ?? 0) + i, { ref: u, tabIndex: d, onFocus: p } = c?.cellProps(l, 0) ?? {}, m = t.isAutoHeight, h = k(null);
1150
+ function Ve(e) {
1151
+ let { row: t, index: i } = e, { grid: a, parentRow: o } = t, s = a.props.def.rowDetail, c = R(), l = (c?.headerRowCount ?? 0) + i, { ref: u, tabIndex: d, onFocus: p } = c?.cellProps(l, 0) ?? {}, m = t.isAutoHeight, h = j(null);
969
1152
  return n(() => {
970
1153
  a.takeDetailReveal(o.key) && h.current?.scrollIntoView?.({ block: "nearest" });
971
- }), /* @__PURE__ */ M(f, {
1154
+ }), /* @__PURE__ */ P(f, {
972
1155
  ref: h,
973
1156
  component: `${a.componentName}.body.detailRow`,
974
1157
  props: {
@@ -979,7 +1162,7 @@ function Ie(e) {
979
1162
  gridColumn: "1 / -1",
980
1163
  height: m ? "auto" : `${t.height}px`
981
1164
  },
982
- children: /* @__PURE__ */ M(r, {
1165
+ children: /* @__PURE__ */ P(r, {
983
1166
  ref: u,
984
1167
  component: `${a.componentName}.body.detailRow.content`,
985
1168
  position: "sticky",
@@ -998,14 +1181,15 @@ function Ie(e) {
998
1181
  })
999
1182
  });
1000
1183
  }
1001
- Ie.displayName = "DataGridDetailRow";
1184
+ Ve.displayName = "DataGridDetailRow";
1185
+ var He = T(Ve);
1002
1186
  //#endregion
1003
1187
  //#region src/components/dataGrid/components/dataGridAggregateValue.tsx
1004
- function Le(e) {
1188
+ function Ue(e) {
1005
1189
  let { cell: t } = e, { column: n } = t;
1006
- if (n.AggregateCell) return /* @__PURE__ */ M(n.AggregateCell, { cell: t });
1190
+ if (n.AggregateCell) return /* @__PURE__ */ P(n.AggregateCell, { cell: t });
1007
1191
  let i = t.scope === "footer" ? "footer.cell" : "body.groupRow.aggregate";
1008
- return /* @__PURE__ */ M(r, {
1192
+ return /* @__PURE__ */ P(r, {
1009
1193
  component: `${n.grid.componentName}.${i}`,
1010
1194
  px: 3,
1011
1195
  textOverflow: "ellipsis",
@@ -1014,39 +1198,56 @@ function Le(e) {
1014
1198
  children: t.value
1015
1199
  });
1016
1200
  }
1017
- Le.displayName = "DataGridAggregateValue";
1201
+ Ue.displayName = "DataGridAggregateValue";
1018
1202
  //#endregion
1019
1203
  //#region src/components/dataGrid/components/dataGridCell.tsx
1020
- var Re = "button,a[href],input,select,textarea";
1021
- function q(t) {
1022
- let { children: n, cell: r, row: i, columnIndex: a, ariaColIndex: o, ariaColSpan: s, style: c, ...l } = t, { column: u } = r, { ref: d, tabIndex: p, onFocus: m } = R()?.cellProps(i, a) ?? {};
1204
+ var We = "button,a[href],input,select,textarea";
1205
+ function Y(t) {
1206
+ let { children: n, cell: r, row: i, columnIndex: a, ariaColIndex: o, ariaColSpan: s, style: c, ...l } = t, { column: u } = r, d = R(), { ref: p, tabIndex: m, onFocus: h } = d?.cellProps(i, a) ?? {}, { range: g } = u.grid, _ = r instanceof H ? i - (d?.headerRowCount ?? 0) : -1, v = _ >= 0 && g.isCurrent(_, a), y = _ >= 0 && g.isSelected(_, a);
1023
1207
  u.hasAlign && (l.jc = u.align);
1024
- let h = r.isExpanded ? {
1208
+ let b = r.isExpanded ? {
1025
1209
  ...u.cellVariant.value,
1026
1210
  isExpanded: !0,
1027
1211
  isExpandedFirstLeaf: r.isFirst,
1028
1212
  isExpandedLastLeaf: r.isLast
1029
1213
  } : u.cellVariant.value;
1030
- r instanceof ve && r.editing && (h = {
1031
- ...h,
1214
+ (v || y) && (b = {
1215
+ ...b,
1216
+ isInRange: y && !v,
1217
+ isCurrentCell: v
1218
+ });
1219
+ let x = r instanceof H && !r.editing && r.rejected;
1220
+ r instanceof H && r.editing ? b = {
1221
+ ...b,
1032
1222
  isEditing: !0,
1033
1223
  isInvalid: !!r.error
1224
+ } : x && (b = {
1225
+ ...b,
1226
+ isInvalid: !0
1034
1227
  });
1035
- let g = r instanceof ve ? (t) => {
1036
- t.target.closest(Re) || (e(t.currentTarget), r.beginEdit());
1228
+ let S = r instanceof H ? (t) => {
1229
+ t.target.closest(We) || (e(t.currentTarget), r.beginEdit());
1230
+ } : void 0, C = g.enabled && _ >= 0, w = C ? (e) => {
1231
+ e.button === 0 && e.pointerType !== "touch" && (e.target.closest(We) || g.press(_, a, e.shiftKey));
1232
+ } : void 0, T = C && g.isDragging ? (e) => {
1233
+ g.dragTo(_, a), e.currentTarget.focus();
1037
1234
  } : void 0;
1038
- return /* @__PURE__ */ M(f, {
1039
- ref: d,
1235
+ return /* @__PURE__ */ P(f, {
1236
+ ref: p,
1040
1237
  component: `${u.grid.componentName}.body.cell`,
1041
1238
  props: {
1042
1239
  role: "gridcell",
1043
1240
  "aria-colindex": o ?? a + 1,
1044
1241
  "aria-colspan": s,
1045
- tabIndex: p,
1046
- onFocus: m,
1047
- onDoubleClick: g
1242
+ "aria-selected": y || void 0,
1243
+ "aria-invalid": x || void 0,
1244
+ tabIndex: m,
1245
+ onFocus: h,
1246
+ onDoubleClick: S,
1247
+ onPointerDown: w,
1248
+ onPointerEnter: T
1048
1249
  },
1049
- variant: h,
1250
+ variant: b,
1050
1251
  style: {
1051
1252
  ...u.cellStyleVars.value,
1052
1253
  ...c
@@ -1055,28 +1256,28 @@ function q(t) {
1055
1256
  children: n
1056
1257
  });
1057
1258
  }
1058
- q.displayName = "DataGridCell";
1259
+ Y.displayName = "DataGridCell";
1059
1260
  //#endregion
1060
1261
  //#region src/components/dataGrid/components/dataGridFooter.tsx
1061
- function ze(e) {
1262
+ function Ge(e) {
1062
1263
  let { grid: t } = e, { aggregation: n } = t, i = R();
1063
1264
  if (!n.hasFooter) return null;
1064
1265
  let a = (i?.rowCount ?? 1) - 1, { footerLabelColumn: o, footerLabel: s } = n;
1065
- return /* @__PURE__ */ M(_, {
1266
+ return /* @__PURE__ */ P(v, {
1066
1267
  component: `${t.componentName}.footer`,
1067
1268
  props: { role: "rowgroup" },
1068
1269
  style: { gridTemplateColumns: t.gridTemplateColumns.value },
1069
- children: /* @__PURE__ */ M(r, {
1270
+ children: /* @__PURE__ */ P(r, {
1070
1271
  display: "contents",
1071
1272
  props: {
1072
1273
  role: "row",
1073
1274
  "aria-rowindex": a + 1
1074
1275
  },
1075
- children: n.footerCells.value.map((e, n) => /* @__PURE__ */ M(q, {
1276
+ children: n.footerCells.value.map((e, n) => /* @__PURE__ */ P(Y, {
1076
1277
  cell: e,
1077
1278
  row: a,
1078
1279
  columnIndex: n,
1079
- children: e.column.aggregate ? /* @__PURE__ */ M(Le, { cell: e }) : e.column === o ? /* @__PURE__ */ M(r, {
1280
+ children: e.column.aggregate ? /* @__PURE__ */ P(Ue, { cell: e }) : e.column === o ? /* @__PURE__ */ P(r, {
1080
1281
  component: `${t.componentName}.footer.label`,
1081
1282
  px: 3,
1082
1283
  textWrap: "nowrap",
@@ -1086,16 +1287,16 @@ function ze(e) {
1086
1287
  })
1087
1288
  });
1088
1289
  }
1089
- ze.displayName = "DataGridFooter";
1290
+ Ge.displayName = "DataGridFooter";
1090
1291
  //#endregion
1091
1292
  //#region src/icons/expandIcon.tsx
1092
- function J(e) {
1093
- return /* @__PURE__ */ M(l, {
1293
+ function X(e) {
1294
+ return /* @__PURE__ */ P(l, {
1094
1295
  viewBox: "4 2 16 18",
1095
1296
  width: "1rem",
1096
1297
  fill: "currentColor",
1097
1298
  ...e,
1098
- children: /* @__PURE__ */ M(c, {
1299
+ children: /* @__PURE__ */ P(c, {
1099
1300
  fillRule: "evenodd",
1100
1301
  d: "M12.707 14.707a1 1 0 0 1-1.414 0l-5-5a1 1 0 0 1 1.414-1.414L12 12.586l4.293-4.293a1 1 0 1 1 1.414 1.414l-5 5Z",
1101
1302
  props: { clipRule: "evenodd" }
@@ -1104,32 +1305,32 @@ function J(e) {
1104
1305
  }
1105
1306
  //#endregion
1106
1307
  //#region src/components/dataGrid/components/dataGridCellPlaceholder.tsx
1107
- var Be = [
1308
+ var Ke = [
1108
1309
  "3/5",
1109
1310
  "2/5",
1110
1311
  "4/5",
1111
1312
  "1/2",
1112
1313
  "7/12"
1113
1314
  ];
1114
- function Y(e) {
1115
- let { cell: t, columnIndex: n } = e, i = Be[(t.row.rowIndex + n) % Be.length];
1116
- return /* @__PURE__ */ M(f, {
1315
+ function qe(e) {
1316
+ let { cell: t, columnIndex: n } = e, i = Ke[(t.row.rowIndex + n) % Ke.length];
1317
+ return /* @__PURE__ */ P(f, {
1117
1318
  component: `${t.grid.componentName}.body.cell.placeholder`,
1118
1319
  ai: "center",
1119
1320
  px: 3,
1120
1321
  props: { "aria-hidden": !0 },
1121
- children: /* @__PURE__ */ M(r, {
1322
+ children: /* @__PURE__ */ P(r, {
1122
1323
  component: `${t.grid.componentName}.body.cell.placeholder.bar`,
1123
1324
  width: i
1124
1325
  })
1125
1326
  });
1126
1327
  }
1127
- Y.displayName = "DataGridCellPlaceholder";
1328
+ qe.displayName = "DataGridCellPlaceholder";
1128
1329
  //#endregion
1129
1330
  //#region src/components/dataGrid/components/dataGridGroupRow.tsx
1130
- function Ve(e) {
1131
- let { row: t, index: n } = e, { selected: i, indeterminate: a, expanded: o, placeholder: s } = t, c = (R()?.headerRowCount ?? 0) + n, l = T(() => t.toggleSelectAll(), [t]);
1132
- return /* @__PURE__ */ M(f, {
1331
+ function Je(e) {
1332
+ let { row: t, index: n } = e, { selected: i, indeterminate: a, expanded: o, placeholder: s } = t, c = (R()?.headerRowCount ?? 0) + n, l = E(() => t.toggleSelectAll(), [t]);
1333
+ return /* @__PURE__ */ P(f, {
1133
1334
  component: `${t.grid.componentName}.body.groupRow`,
1134
1335
  className: "grid-row",
1135
1336
  selected: t.grid.props.def.rowSelection ? i : void 0,
@@ -1142,7 +1343,7 @@ function Ve(e) {
1142
1343
  },
1143
1344
  children: t.renderedCells.map(({ cell: e, columnIndex: n }, u) => {
1144
1345
  switch (e.cellKind) {
1145
- case "grouping": return /* @__PURE__ */ M(q, {
1346
+ case "grouping": return /* @__PURE__ */ P(Y, {
1146
1347
  cell: e,
1147
1348
  row: c,
1148
1349
  columnIndex: u,
@@ -1156,13 +1357,13 @@ function Ve(e) {
1156
1357
  gridColumn: e.gridColumnSpan,
1157
1358
  ps: e.depthPadding,
1158
1359
  overflow: "auto",
1159
- children: s ? /* @__PURE__ */ M(Y, {
1360
+ children: s ? /* @__PURE__ */ P(qe, {
1160
1361
  cell: e,
1161
1362
  columnIndex: u
1162
- }) : /* @__PURE__ */ M(r, {
1363
+ }) : /* @__PURE__ */ P(r, {
1163
1364
  textWrap: "nowrap",
1164
1365
  px: 3,
1165
- children: /* @__PURE__ */ N(d, {
1366
+ children: /* @__PURE__ */ F(d, {
1166
1367
  component: `${t.grid.componentName}.body.groupRow.expandButton`,
1167
1368
  onClick: () => t.toggleRow(),
1168
1369
  cursor: "pointer",
@@ -1173,7 +1374,7 @@ function Ve(e) {
1173
1374
  tabIndex: -1,
1174
1375
  "aria-expanded": o
1175
1376
  },
1176
- children: [/* @__PURE__ */ M(J, {
1377
+ children: [/* @__PURE__ */ P(X, {
1177
1378
  fill: "currentColor",
1178
1379
  width: "14px",
1179
1380
  height: "14px",
@@ -1182,12 +1383,12 @@ function Ve(e) {
1182
1383
  })
1183
1384
  })
1184
1385
  }, e.column.key);
1185
- case "selection": return /* @__PURE__ */ M(q, {
1386
+ case "selection": return /* @__PURE__ */ P(Y, {
1186
1387
  cell: e,
1187
1388
  row: c,
1188
1389
  columnIndex: u,
1189
1390
  ariaColIndex: n + 1,
1190
- children: /* @__PURE__ */ M(p, {
1391
+ children: /* @__PURE__ */ P(p, {
1191
1392
  variant: "datagrid",
1192
1393
  m: 1,
1193
1394
  checked: i,
@@ -1199,14 +1400,14 @@ function Ve(e) {
1199
1400
  }
1200
1401
  })
1201
1402
  }, e.column.key);
1202
- case "aggregate": return /* @__PURE__ */ M(q, {
1403
+ case "aggregate": return /* @__PURE__ */ P(Y, {
1203
1404
  cell: e,
1204
1405
  row: c,
1205
1406
  columnIndex: u,
1206
1407
  ariaColIndex: n + 1,
1207
- children: e.aggregate && /* @__PURE__ */ M(Le, { cell: e.aggregate })
1408
+ children: e.aggregate && /* @__PURE__ */ P(Ue, { cell: e.aggregate })
1208
1409
  }, e.column.key);
1209
- case "spacer": return /* @__PURE__ */ M(q, {
1410
+ case "spacer": return /* @__PURE__ */ P(Y, {
1210
1411
  cell: e,
1211
1412
  row: c,
1212
1413
  columnIndex: u,
@@ -1219,23 +1420,21 @@ function Ve(e) {
1219
1420
  })
1220
1421
  });
1221
1422
  }
1222
- Ve.displayName = "DataGridGroupRow";
1223
- //#endregion
1224
- //#region src/components/dataGrid/components/dataGridCellEditor.tsx
1225
- var He = "input,select,textarea,button";
1226
- function Ue(e) {
1423
+ Je.displayName = "DataGridGroupRow";
1424
+ var Ye = T(Je), Xe = "input,select,textarea,button";
1425
+ function Ze(e) {
1227
1426
  let { options: t } = e.editor;
1228
1427
  return typeof t == "function" ? t(e.row.data) : t ?? [];
1229
1428
  }
1230
- function We(e) {
1231
- let { cell: t, row: r, columnIndex: i } = e, { grid: a } = t, o = R(), c = k(null), l = s("datagrid-cell-error"), { error: u, pending: d } = t;
1429
+ function Qe(e) {
1430
+ let { cell: t, row: r, columnIndex: i } = e, { grid: a } = t, o = R(), c = j(null), l = s("datagrid-cell-error"), { error: u, pending: d } = t;
1232
1431
  n(() => {
1233
- let e = c.current?.querySelector(He);
1432
+ let e = c.current?.querySelector(Xe);
1234
1433
  e?.focus(), e instanceof HTMLInputElement && e.type !== "checkbox" && e.select();
1235
1434
  }, []);
1236
- let p = T(() => {
1435
+ let p = E(() => {
1237
1436
  c.current?.closest("[role=\"gridcell\"]")?.focus();
1238
- }, []), h = T((e) => {
1437
+ }, []), h = E((e) => {
1239
1438
  if (!o) return;
1240
1439
  let t = a.edits.nextEditable(r - o.headerRowCount, i, e.shiftKey);
1241
1440
  t && (e.preventDefault(), o.setActiveCell(t.row + o.headerRowCount, t.column, { reason: "programmatic" }), a.edits.beginAt(t.row, t.column));
@@ -1244,7 +1443,7 @@ function We(e) {
1244
1443
  a,
1245
1444
  o,
1246
1445
  r
1247
- ]), g = T((e) => {
1446
+ ]), g = E((e) => {
1248
1447
  if (e.key === "Escape") {
1249
1448
  if (c.current?.querySelector("[aria-expanded=\"true\"]")) return;
1250
1449
  e.preventDefault(), e.stopPropagation(), t.cancelEdit(), p();
@@ -1265,10 +1464,10 @@ function We(e) {
1265
1464
  t,
1266
1465
  p,
1267
1466
  h
1268
- ]), _ = T(() => {
1467
+ ]), _ = E(() => {
1269
1468
  !t.editing || t.pending || t.commitEdit();
1270
1469
  }, [t]);
1271
- return /* @__PURE__ */ N(f, {
1470
+ return /* @__PURE__ */ F(f, {
1272
1471
  ref: c,
1273
1472
  component: `${a.componentName}.body.cell.editor`,
1274
1473
  variant: { isPending: d },
@@ -1276,12 +1475,12 @@ function We(e) {
1276
1475
  width: "fit",
1277
1476
  height: "fit",
1278
1477
  ai: "center",
1279
- children: [/* @__PURE__ */ M(Ge, {
1478
+ children: [/* @__PURE__ */ P($e, {
1280
1479
  cell: t,
1281
1480
  errorId: u ? l : void 0,
1282
1481
  onBlur: _,
1283
1482
  onCommitted: p
1284
- }), u && /* @__PURE__ */ M(m, {
1483
+ }), u && /* @__PURE__ */ P(m, {
1285
1484
  anchor: c,
1286
1485
  side: "bottom",
1287
1486
  align: "start",
@@ -1294,14 +1493,14 @@ function We(e) {
1294
1493
  })]
1295
1494
  });
1296
1495
  }
1297
- function Ge(e) {
1496
+ function $e(e) {
1298
1497
  let { cell: t, errorId: n, onBlur: r, onCommitted: i } = e, { EditCell: a } = t.column.def, { type: o, placeholder: s, step: c, min: l, max: u } = t.editor, d = {
1299
1498
  "aria-label": `Edit ${t.column.header ?? t.column.key}`,
1300
1499
  "aria-invalid": n ? !0 : void 0,
1301
1500
  "aria-describedby": n
1302
1501
  };
1303
- if (a) return /* @__PURE__ */ M(a, { cell: t });
1304
- if (o === "checkbox") return /* @__PURE__ */ M(p, {
1502
+ if (a) return /* @__PURE__ */ P(a, { cell: t });
1503
+ if (o === "checkbox") return /* @__PURE__ */ P(p, {
1305
1504
  checked: !!t.draft,
1306
1505
  onChange: (e) => {
1307
1506
  t.setDraft(e.target.checked), t.commitEdit(), i();
@@ -1311,7 +1510,7 @@ function Ge(e) {
1311
1510
  onBlur: r
1312
1511
  }
1313
1512
  });
1314
- if (o === "select") return /* @__PURE__ */ M(v, {
1513
+ if (o === "select") return /* @__PURE__ */ P(y, {
1315
1514
  value: t.draft,
1316
1515
  defaultOpen: !0,
1317
1516
  width: "fit",
@@ -1323,13 +1522,13 @@ function Ge(e) {
1323
1522
  t.setDraft(e ?? null), t.commitEdit(), i();
1324
1523
  },
1325
1524
  props: d,
1326
- children: Ue(t).map((e) => /* @__PURE__ */ M(v.Item, {
1525
+ children: Ze(t).map((e) => /* @__PURE__ */ P(y.Item, {
1327
1526
  value: e.value,
1328
1527
  children: e.label ?? String(e.value)
1329
1528
  }, String(e.value)))
1330
1529
  });
1331
1530
  let f = o === "number";
1332
- return /* @__PURE__ */ M(g, {
1531
+ return /* @__PURE__ */ P(_, {
1333
1532
  type: f ? "number" : "text",
1334
1533
  value: t.draft === null || t.draft === void 0 ? "" : String(t.draft),
1335
1534
  placeholder: s,
@@ -1351,19 +1550,19 @@ function Ge(e) {
1351
1550
  }
1352
1551
  });
1353
1552
  }
1354
- We.displayName = "DataGridCellEditor";
1553
+ Qe.displayName = "DataGridCellEditor";
1355
1554
  //#endregion
1356
1555
  //#region src/components/dataGrid/components/dataGridCellText.tsx
1357
- function Ke(e) {
1556
+ function et(e) {
1358
1557
  let { cell: t } = e;
1359
- return /* @__PURE__ */ M(f, {
1558
+ return /* @__PURE__ */ P(f, {
1360
1559
  component: `${t.grid.componentName}.body.cell.text`,
1361
1560
  height: "fit",
1362
1561
  width: "fit",
1363
1562
  overflow: "auto",
1364
1563
  ai: "center",
1365
1564
  jc: t.column.align,
1366
- children: /* @__PURE__ */ M(r, {
1565
+ children: /* @__PURE__ */ P(r, {
1367
1566
  px: 3,
1368
1567
  textOverflow: "ellipsis",
1369
1568
  overflow: "hidden",
@@ -1372,18 +1571,18 @@ function Ke(e) {
1372
1571
  })
1373
1572
  });
1374
1573
  }
1375
- Ke.displayName = "DataGridCellText";
1574
+ et.displayName = "DataGridCellText";
1376
1575
  //#endregion
1377
1576
  //#region src/components/dataGrid/components/dataGridCellTree.tsx
1378
- function qe(e) {
1379
- let { cell: t, row: n, children: i } = e, { hasChildren: a, treeExpanded: o, level: s } = n, c = n.grid.componentName, l = T((e) => {
1577
+ function tt(e) {
1578
+ let { cell: t, row: n, children: i } = e, { hasChildren: a, treeExpanded: o, level: s } = n, c = n.grid.componentName, l = E((e) => {
1380
1579
  e.stopPropagation(), n.toggleTree();
1381
1580
  }, [n]), u = t.value == null || t.value === "" ? `row ${n.rowIndex + 1}` : String(t.value);
1382
- return /* @__PURE__ */ N(f, {
1581
+ return /* @__PURE__ */ F(f, {
1383
1582
  component: `${c}.body.cell.tree`,
1384
1583
  ai: "center",
1385
1584
  ps: s * n.grid.tree.indent,
1386
- children: [a ? /* @__PURE__ */ M(d, {
1585
+ children: [a ? /* @__PURE__ */ P(d, {
1387
1586
  component: `${c}.body.cell.tree.toggle`,
1388
1587
  variant: { isExpanded: o },
1389
1588
  type: "button",
@@ -1396,13 +1595,13 @@ function qe(e) {
1396
1595
  tabIndex: -1,
1397
1596
  "aria-label": `${o ? "Collapse" : "Expand"} ${u}`
1398
1597
  },
1399
- children: /* @__PURE__ */ M(J, {
1598
+ children: /* @__PURE__ */ P(X, {
1400
1599
  fill: "currentColor",
1401
1600
  width: "14px",
1402
1601
  height: "14px",
1403
1602
  rotate: o ? 0 : -90
1404
1603
  })
1405
- }) : /* @__PURE__ */ M(r, { component: `${c}.body.cell.tree.spacer` }), /* @__PURE__ */ M(r, {
1604
+ }) : /* @__PURE__ */ P(r, { component: `${c}.body.cell.tree.spacer` }), /* @__PURE__ */ P(r, {
1406
1605
  textOverflow: "ellipsis",
1407
1606
  overflow: "hidden",
1408
1607
  textWrap: "nowrap",
@@ -1411,29 +1610,29 @@ function qe(e) {
1411
1610
  })]
1412
1611
  });
1413
1612
  }
1414
- qe.displayName = "DataGridCellTree";
1613
+ tt.displayName = "DataGridCellTree";
1415
1614
  //#endregion
1416
1615
  //#region src/components/dataGrid/components/dataGridRow.tsx
1417
- function Je(e) {
1418
- let { row: t, index: n } = e, { selected: r, expandOnRowClick: i } = t, a = (R()?.headerRowCount ?? 0) + n, o = U(t) ? t : void 0, s = o && t.grid.tree.columnKey, c = T(() => {
1616
+ function nt(e) {
1617
+ let { row: t, index: n } = e, { selected: r, expandOnRowClick: i } = t, a = (R()?.headerRowCount ?? 0) + n, o = G(t) ? t : void 0, s = o && t.grid.tree.columnKey, c = E(() => {
1419
1618
  t.toggleDetail();
1420
1619
  }, [t]), l = (e, n) => {
1421
- if (e.editing) return /* @__PURE__ */ M(We, {
1620
+ if (e.editing) return /* @__PURE__ */ P(Qe, {
1422
1621
  cell: e,
1423
1622
  row: a,
1424
1623
  columnIndex: n
1425
1624
  });
1426
- let r = t.placeholder && !e.column.isRowNumber ? /* @__PURE__ */ M(Y, {
1625
+ let r = t.placeholder && !e.column.isRowNumber ? /* @__PURE__ */ P(qe, {
1427
1626
  cell: e,
1428
1627
  columnIndex: n
1429
- }) : e.column.Cell ? /* @__PURE__ */ M(e.column.Cell, { cell: e }) : /* @__PURE__ */ M(Ke, { cell: e });
1430
- return !o || e.column.key !== s ? r : /* @__PURE__ */ M(qe, {
1628
+ }) : e.column.Cell ? /* @__PURE__ */ P(e.column.Cell, { cell: e }) : /* @__PURE__ */ P(et, { cell: e });
1629
+ return !o || e.column.key !== s ? r : /* @__PURE__ */ P(tt, {
1431
1630
  cell: e,
1432
1631
  row: o,
1433
1632
  children: r
1434
1633
  });
1435
1634
  };
1436
- return /* @__PURE__ */ M(f, {
1635
+ return /* @__PURE__ */ P(f, {
1437
1636
  component: `${t.grid.componentName}.body.row`,
1438
1637
  className: "grid-row",
1439
1638
  selected: t.grid.props.def.rowSelection ? r : void 0,
@@ -1449,7 +1648,7 @@ function Je(e) {
1449
1648
  onClick: i ? c : void 0
1450
1649
  },
1451
1650
  cursor: i ? "pointer" : void 0,
1452
- children: t.cells.map((e, t) => /* @__PURE__ */ M(q, {
1651
+ children: t.cells.map((e, t) => /* @__PURE__ */ P(Y, {
1453
1652
  cell: e,
1454
1653
  row: a,
1455
1654
  columnIndex: t,
@@ -1457,31 +1656,36 @@ function Je(e) {
1457
1656
  }, e.column.key))
1458
1657
  });
1459
1658
  }
1460
- Je.displayName = "DataGridRow";
1659
+ nt.displayName = "DataGridRow";
1660
+ var rt = T(nt);
1461
1661
  //#endregion
1462
1662
  //#region src/components/dataGrid/components/dataGridBody.tsx
1463
- function Ye(e, t) {
1464
- return e instanceof V ? /* @__PURE__ */ M(Ie, {
1663
+ function it(e, t, n) {
1664
+ return e instanceof U ? /* @__PURE__ */ P(He, {
1465
1665
  row: e,
1466
- index: t
1467
- }, e.key) : e instanceof Fe ? /* @__PURE__ */ M(Ve, {
1666
+ index: t,
1667
+ version: n
1668
+ }, e.key) : e instanceof Be ? /* @__PURE__ */ P(Ye, {
1468
1669
  row: e,
1469
- index: t
1470
- }, e.key) : /* @__PURE__ */ M(Je, {
1670
+ index: t,
1671
+ version: n
1672
+ }, e.key) : /* @__PURE__ */ P(rt, {
1471
1673
  row: e,
1472
- index: t
1674
+ index: t,
1675
+ version: n
1473
1676
  }, e.key);
1474
1677
  }
1475
- function Xe(e) {
1476
- let { grid: t, scrollTop: n } = e, { viewport: i } = t, { startIndex: a, take: o, translateY: s, totalHeight: c, viewHeight: l } = i.window(n), u = i.showAll, d = i.isEmpty, p = t.flatRows.value, m = te(() => d ? null : W.take(p, o, a).map((e, t) => Ye(e, a + t)), [
1678
+ function at(e) {
1679
+ let { grid: t, scroll: n } = e, { viewport: i } = t, { startIndex: a, take: o, translateY: s, totalHeight: c, viewHeight: l } = i.window(n.top, n.direction), u = i.showAll, d = i.isEmpty, p = t.flatRows.value, m = t.getSnapshot(), h = ee(() => d ? null : K.take(p, o, a).map((e, t) => it(e, a + t, m)), [
1477
1680
  p,
1478
1681
  d,
1479
1682
  o,
1480
- a
1683
+ a,
1684
+ m
1481
1685
  ]);
1482
1686
  if (d) {
1483
1687
  let { noDataComponent: e } = t.props.def, n = t.props.loading ? "loading..." : "empty";
1484
- return /* @__PURE__ */ M(f, {
1688
+ return /* @__PURE__ */ P(f, {
1485
1689
  component: `${t.componentName}.body.empty`,
1486
1690
  jc: "center",
1487
1691
  ai: "center",
@@ -1490,49 +1694,51 @@ function Xe(e) {
1490
1694
  insetStart: 0,
1491
1695
  props: { role: "row" },
1492
1696
  style: { height: i.emptyHeight },
1493
- children: /* @__PURE__ */ M(r, {
1697
+ children: /* @__PURE__ */ P(r, {
1494
1698
  display: "contents",
1495
1699
  props: { role: "gridcell" },
1496
1700
  children: e ?? n
1497
1701
  })
1498
1702
  });
1499
1703
  }
1500
- return u ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(_, {
1704
+ return u ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(v, {
1501
1705
  component: `${t.componentName}.body`,
1502
1706
  width: "max-content",
1503
1707
  minWidth: "fit",
1504
1708
  transition: "none",
1709
+ userSelect: t.range.enabled ? "none" : void 0,
1505
1710
  props: { role: "rowgroup" },
1506
1711
  style: { gridTemplateColumns: t.gridTemplateColumns.value },
1507
- children: m
1508
- }), /* @__PURE__ */ M(ze, { grid: t })] }) : /* @__PURE__ */ N(r, {
1712
+ children: h
1713
+ }), /* @__PURE__ */ P(Ge, { grid: t })] }) : /* @__PURE__ */ F(r, {
1509
1714
  props: { role: "presentation" },
1510
1715
  style: { height: l },
1511
- children: [/* @__PURE__ */ M(r, {
1716
+ children: [/* @__PURE__ */ P(r, {
1512
1717
  props: { role: "presentation" },
1513
1718
  style: { height: `${c}px` },
1514
- children: /* @__PURE__ */ M(_, {
1719
+ children: /* @__PURE__ */ P(v, {
1515
1720
  component: `${t.componentName}.body`,
1516
1721
  width: "max-content",
1517
1722
  minWidth: "fit",
1518
1723
  transition: "none",
1724
+ userSelect: t.range.enabled ? "none" : void 0,
1519
1725
  props: { role: "rowgroup" },
1520
1726
  style: {
1521
1727
  transform: `translate3d(0, ${s}px, 0)`,
1522
1728
  willChange: "transform",
1523
1729
  gridTemplateColumns: t.gridTemplateColumns.value
1524
1730
  },
1525
- children: m
1731
+ children: h
1526
1732
  })
1527
- }), /* @__PURE__ */ M(ze, { grid: t })]
1733
+ }), /* @__PURE__ */ P(Ge, { grid: t })]
1528
1734
  });
1529
1735
  }
1530
- Xe.displayName = "DataGridBody";
1736
+ at.displayName = "DataGridBody";
1531
1737
  //#endregion
1532
1738
  //#region src/components/dataGrid/components/dataGridEmptyColumns.tsx
1533
- function Ze(e) {
1739
+ function ot(e) {
1534
1740
  let { grid: t } = e;
1535
- return /* @__PURE__ */ M(f, {
1741
+ return /* @__PURE__ */ P(f, {
1536
1742
  component: `${t.componentName}.emptyColumns`,
1537
1743
  d: "column",
1538
1744
  ai: "center",
@@ -1543,11 +1749,11 @@ function Ze(e) {
1543
1749
  bgColor: "gray-50",
1544
1750
  borderRadius: 4,
1545
1751
  theme: { dark: { bgColor: "gray-900" } },
1546
- children: /* @__PURE__ */ N(f, {
1752
+ children: /* @__PURE__ */ F(f, {
1547
1753
  d: "column",
1548
1754
  ai: "center",
1549
1755
  gap: 3,
1550
- children: [/* @__PURE__ */ M(r, {
1756
+ children: [/* @__PURE__ */ P(r, {
1551
1757
  width: 16,
1552
1758
  height: 16,
1553
1759
  borderRadius: 999,
@@ -1556,29 +1762,29 @@ function Ze(e) {
1556
1762
  display: "flex",
1557
1763
  ai: "center",
1558
1764
  jc: "center",
1559
- children: /* @__PURE__ */ M(l, {
1765
+ children: /* @__PURE__ */ P(l, {
1560
1766
  viewBox: "0 0 24 24",
1561
1767
  width: "40",
1562
1768
  fill: "currentColor",
1563
1769
  color: "gray-400",
1564
1770
  theme: { dark: { color: "gray-500" } },
1565
- children: /* @__PURE__ */ M(c, {
1771
+ children: /* @__PURE__ */ P(c, {
1566
1772
  fillRule: "evenodd",
1567
1773
  props: { clipRule: "evenodd" },
1568
1774
  d: "M3 6a3 3 0 013-3h12a3 3 0 013 3v12a3 3 0 01-3 3H6a3 3 0 01-3-3V6zm3-1a1 1 0 00-1 1v12a1 1 0 001 1h12a1 1 0 001-1V6a1 1 0 00-1-1H6zm2 3a1 1 0 011-1h6a1 1 0 110 2H9a1 1 0 01-1-1zm0 4a1 1 0 011-1h6a1 1 0 110 2H9a1 1 0 01-1-1zm0 4a1 1 0 011-1h4a1 1 0 110 2H9a1 1 0 01-1-1z"
1569
1775
  })
1570
1776
  })
1571
- }), /* @__PURE__ */ N(f, {
1777
+ }), /* @__PURE__ */ F(f, {
1572
1778
  d: "column",
1573
1779
  ai: "center",
1574
1780
  gap: 1,
1575
- children: [/* @__PURE__ */ M(r, {
1781
+ children: [/* @__PURE__ */ P(r, {
1576
1782
  fontSize: 18,
1577
1783
  fontWeight: 600,
1578
1784
  color: "gray-900",
1579
1785
  theme: { dark: { color: "gray-50" } },
1580
1786
  children: "No Columns Selected"
1581
- }), /* @__PURE__ */ M(r, {
1787
+ }), /* @__PURE__ */ P(r, {
1582
1788
  fontSize: 14,
1583
1789
  color: "gray-500",
1584
1790
  textAlign: "center",
@@ -1591,9 +1797,9 @@ function Ze(e) {
1591
1797
  }
1592
1798
  //#endregion
1593
1799
  //#region src/components/dataGrid/components/dataGridColumnFilter.tsx
1594
- function Qe(e) {
1800
+ function st(e) {
1595
1801
  let { columnName: t, onClear: n } = e;
1596
- return /* @__PURE__ */ M(d, {
1802
+ return /* @__PURE__ */ P(d, {
1597
1803
  clean: !0,
1598
1804
  type: "button",
1599
1805
  position: "absolute",
@@ -1608,7 +1814,7 @@ function Qe(e) {
1608
1814
  tabIndex: -1,
1609
1815
  "aria-label": `Clear the ${t} filter`
1610
1816
  },
1611
- children: /* @__PURE__ */ M(r, {
1817
+ children: /* @__PURE__ */ P(r, {
1612
1818
  fontSize: 10,
1613
1819
  color: "gray-400",
1614
1820
  hover: { color: "gray-600" },
@@ -1616,22 +1822,22 @@ function Qe(e) {
1616
1822
  })
1617
1823
  });
1618
1824
  }
1619
- function $e({ column: e }) {
1620
- let { currentFilter: t } = e, { componentName: n } = e.grid, r = e.header ?? e.key, i = t?.type === "text" ? t.value : "", [a, o] = A(i), s = k(null);
1621
- D(() => () => {
1825
+ function ct({ column: e }) {
1826
+ let { currentFilter: t } = e, { componentName: n } = e.grid, r = e.header ?? e.key, i = t?.type === "text" ? t.value : "", [a, o] = M(i), s = j(null);
1827
+ O(() => () => {
1622
1828
  s.current && clearTimeout(s.current);
1623
1829
  }, []);
1624
- let c = T((t) => {
1830
+ let c = E((t) => {
1625
1831
  let n = t.target.value;
1626
1832
  o(n), s.current && clearTimeout(s.current), s.current = setTimeout(() => {
1627
1833
  e.setTextFilter(n), s.current = null;
1628
1834
  }, 300);
1629
- }, [e]), l = T(() => {
1835
+ }, [e]), l = E(() => {
1630
1836
  o(""), e.clearFilter();
1631
1837
  }, [e]);
1632
- return /* @__PURE__ */ N(f, {
1838
+ return /* @__PURE__ */ F(f, {
1633
1839
  component: `${n}.filter.cell.input`,
1634
- children: [/* @__PURE__ */ M(g, {
1840
+ children: [/* @__PURE__ */ P(_, {
1635
1841
  width: "fit",
1636
1842
  variant: "compact",
1637
1843
  placeholder: e.filterConfig?.placeholder ?? "Filter...",
@@ -1644,18 +1850,18 @@ function $e({ column: e }) {
1644
1850
  tabIndex: -1,
1645
1851
  "aria-label": `Filter ${r}`
1646
1852
  }
1647
- }), a && /* @__PURE__ */ M(Qe, {
1853
+ }), a && /* @__PURE__ */ P(st, {
1648
1854
  columnName: r,
1649
1855
  onClear: l
1650
1856
  })]
1651
1857
  });
1652
1858
  }
1653
- function et({ column: e }) {
1654
- let { currentFilter: t } = e, { componentName: n } = e.grid, r = e.header ?? e.key, i = t?.type === "number" ? t.value : "", a = t?.type === "number" ? t.operator : "eq", o = t?.type === "number" ? t.valueTo : "", [s, c] = A(i), [l, u] = A(a), [d, p] = A(o ?? ""), m = k(null), h = k(null);
1655
- D(() => () => {
1859
+ function lt({ column: e }) {
1860
+ let { currentFilter: t } = e, { componentName: n } = e.grid, r = e.header ?? e.key, i = t?.type === "number" ? t.value : "", a = t?.type === "number" ? t.operator : "eq", o = t?.type === "number" ? t.valueTo : "", [s, c] = M(i), [l, u] = M(a), [d, p] = M(o ?? ""), m = j(null), h = j(null);
1861
+ O(() => () => {
1656
1862
  m.current && clearTimeout(m.current), h.current && clearTimeout(h.current);
1657
1863
  }, []);
1658
- let _ = e.filterConfig, y = T((t) => {
1864
+ let g = e.filterConfig, v = E((t) => {
1659
1865
  let n = t.target.value;
1660
1866
  c(n), m.current && clearTimeout(m.current), m.current = setTimeout(() => {
1661
1867
  e.setNumberFilter(l, n, d), m.current = null;
@@ -1664,13 +1870,13 @@ function et({ column: e }) {
1664
1870
  e,
1665
1871
  l,
1666
1872
  d
1667
- ]), b = T((t) => {
1873
+ ]), b = E((t) => {
1668
1874
  u(t), e.setNumberFilter(t, s, d);
1669
1875
  }, [
1670
1876
  e,
1671
1877
  s,
1672
1878
  d
1673
- ]), x = T((t) => {
1879
+ ]), x = E((t) => {
1674
1880
  let n = t.target.value;
1675
1881
  p(n), h.current && clearTimeout(h.current), h.current = setTimeout(() => {
1676
1882
  e.setNumberFilter(l, s, n), h.current = null;
@@ -1679,14 +1885,14 @@ function et({ column: e }) {
1679
1885
  e,
1680
1886
  l,
1681
1887
  s
1682
- ]), S = T(() => {
1888
+ ]), S = E(() => {
1683
1889
  c(""), p(""), u("eq"), e.clearFilter();
1684
1890
  }, [e]);
1685
- return /* @__PURE__ */ N(f, {
1891
+ return /* @__PURE__ */ F(f, {
1686
1892
  component: `${n}.filter.cell.input`,
1687
1893
  ai: l === "between" ? "start" : "center",
1688
1894
  gap: 1,
1689
- children: [/* @__PURE__ */ N(v, {
1895
+ children: [/* @__PURE__ */ F(y, {
1690
1896
  value: l,
1691
1897
  variant: "compact",
1692
1898
  onChange: (e) => e && b(e),
@@ -1700,51 +1906,51 @@ function et({ column: e }) {
1700
1906
  "aria-label": `Comparison for ${r}`
1701
1907
  },
1702
1908
  children: [
1703
- /* @__PURE__ */ M(v.Item, {
1909
+ /* @__PURE__ */ P(y.Item, {
1704
1910
  value: "eq",
1705
1911
  children: "="
1706
1912
  }),
1707
- /* @__PURE__ */ M(v.Item, {
1913
+ /* @__PURE__ */ P(y.Item, {
1708
1914
  value: "ne",
1709
1915
  children: "≠"
1710
1916
  }),
1711
- /* @__PURE__ */ M(v.Item, {
1917
+ /* @__PURE__ */ P(y.Item, {
1712
1918
  value: "gt",
1713
1919
  children: ">"
1714
1920
  }),
1715
- /* @__PURE__ */ M(v.Item, {
1921
+ /* @__PURE__ */ P(y.Item, {
1716
1922
  value: "gte",
1717
1923
  children: "≥"
1718
1924
  }),
1719
- /* @__PURE__ */ M(v.Item, {
1925
+ /* @__PURE__ */ P(y.Item, {
1720
1926
  value: "lt",
1721
1927
  children: "<"
1722
1928
  }),
1723
- /* @__PURE__ */ M(v.Item, {
1929
+ /* @__PURE__ */ P(y.Item, {
1724
1930
  value: "lte",
1725
1931
  children: "≤"
1726
1932
  }),
1727
- /* @__PURE__ */ M(v.Item, {
1933
+ /* @__PURE__ */ P(y.Item, {
1728
1934
  value: "between",
1729
1935
  children: "↔"
1730
1936
  })
1731
1937
  ]
1732
- }), l === "between" ? /* @__PURE__ */ N(f, {
1938
+ }), l === "between" ? /* @__PURE__ */ F(f, {
1733
1939
  d: "column",
1734
1940
  gap: 1,
1735
1941
  flex1: !0,
1736
- children: [/* @__PURE__ */ N(f, {
1942
+ children: [/* @__PURE__ */ F(f, {
1737
1943
  ai: "center",
1738
1944
  position: "relative",
1739
1945
  flex1: !0,
1740
- children: [/* @__PURE__ */ M(g, {
1946
+ children: [/* @__PURE__ */ P(_, {
1741
1947
  type: "number",
1742
1948
  variant: "compact",
1743
- placeholder: _?.placeholder ?? "From",
1949
+ placeholder: g?.placeholder ?? "From",
1744
1950
  value: s,
1745
- onChange: y,
1951
+ onChange: v,
1746
1952
  width: "fit",
1747
- step: _?.step,
1953
+ step: g?.step,
1748
1954
  b: 0,
1749
1955
  bgColor: "transparent",
1750
1956
  focus: { outline: 0 },
@@ -1752,21 +1958,21 @@ function et({ column: e }) {
1752
1958
  tabIndex: -1,
1753
1959
  "aria-label": `Filter ${r} from`
1754
1960
  }
1755
- }), (s !== "" || d !== "") && /* @__PURE__ */ M(Qe, {
1961
+ }), (s !== "" || d !== "") && /* @__PURE__ */ P(st, {
1756
1962
  columnName: r,
1757
1963
  onClear: S
1758
1964
  })]
1759
- }), /* @__PURE__ */ M(f, {
1965
+ }), /* @__PURE__ */ P(f, {
1760
1966
  ai: "center",
1761
1967
  flex1: !0,
1762
- children: /* @__PURE__ */ M(g, {
1968
+ children: /* @__PURE__ */ P(_, {
1763
1969
  type: "number",
1764
1970
  variant: "compact",
1765
1971
  placeholder: "To",
1766
1972
  value: d,
1767
1973
  onChange: x,
1768
1974
  width: "fit",
1769
- step: _?.step,
1975
+ step: g?.step,
1770
1976
  b: 0,
1771
1977
  bgColor: "transparent",
1772
1978
  focus: { outline: 0 },
@@ -1776,18 +1982,18 @@ function et({ column: e }) {
1776
1982
  }
1777
1983
  })
1778
1984
  })]
1779
- }) : /* @__PURE__ */ N(f, {
1985
+ }) : /* @__PURE__ */ F(f, {
1780
1986
  ai: "center",
1781
1987
  position: "relative",
1782
1988
  flex1: !0,
1783
- children: [/* @__PURE__ */ M(g, {
1989
+ children: [/* @__PURE__ */ P(_, {
1784
1990
  type: "number",
1785
1991
  variant: "compact",
1786
- placeholder: _?.placeholder ?? "Value",
1992
+ placeholder: g?.placeholder ?? "Value",
1787
1993
  value: s,
1788
- onChange: y,
1994
+ onChange: v,
1789
1995
  width: "fit",
1790
- step: _?.step,
1996
+ step: g?.step,
1791
1997
  b: 0,
1792
1998
  bgColor: "transparent",
1793
1999
  focus: { outline: 0 },
@@ -1795,20 +2001,20 @@ function et({ column: e }) {
1795
2001
  tabIndex: -1,
1796
2002
  "aria-label": `Filter ${r}`
1797
2003
  }
1798
- }), s !== "" && /* @__PURE__ */ M(Qe, {
2004
+ }), s !== "" && /* @__PURE__ */ P(st, {
1799
2005
  columnName: r,
1800
2006
  onClear: S
1801
2007
  })]
1802
2008
  })]
1803
2009
  });
1804
2010
  }
1805
- function tt({ column: e }) {
1806
- let { currentFilter: t } = e, { componentName: n } = e.grid, i = e.header ?? e.key, a = t?.type === "multiselect" ? t.values : [], o = e.filterOptions, s = T((t, n) => {
2011
+ function ut({ column: e }) {
2012
+ let { currentFilter: t } = e, { componentName: n } = e.grid, i = e.header ?? e.key, a = t?.type === "multiselect" ? t.values : [], o = e.filterOptions, s = E((t, n) => {
1807
2013
  e.setMultiselectFilter(n);
1808
2014
  }, [e]);
1809
- return /* @__PURE__ */ M(f, {
2015
+ return /* @__PURE__ */ P(f, {
1810
2016
  component: `${n}.filter.cell.input`,
1811
- children: /* @__PURE__ */ N(v, {
2017
+ children: /* @__PURE__ */ F(y, {
1812
2018
  multiple: !0,
1813
2019
  showCheckbox: !0,
1814
2020
  isSearchable: !0,
@@ -1826,14 +2032,14 @@ function tt({ column: e }) {
1826
2032
  "aria-label": `Filter ${i}`
1827
2033
  },
1828
2034
  children: [
1829
- /* @__PURE__ */ M(v.Display, { children: (t) => t.length === 0 ? /* @__PURE__ */ M(r, {
2035
+ /* @__PURE__ */ P(y.Display, { children: (t) => t.length === 0 ? /* @__PURE__ */ P(r, {
1830
2036
  tag: "span",
1831
2037
  color: "gray-400",
1832
2038
  children: e.filterConfig?.placeholder ?? "Select..."
1833
2039
  }) : t.length === 1 ? o.find((e) => e.value === t[0])?.label ?? String(t[0]) : `${t.length} selected` }),
1834
- /* @__PURE__ */ M(v.Unselect, { children: "Clear" }),
1835
- /* @__PURE__ */ M(v.SelectAll, { children: "Select All" }),
1836
- o.map((e) => /* @__PURE__ */ M(v.Item, {
2040
+ /* @__PURE__ */ P(y.Unselect, { children: "Clear" }),
2041
+ /* @__PURE__ */ P(y.SelectAll, { children: "Select All" }),
2042
+ o.map((e) => /* @__PURE__ */ P(y.Item, {
1837
2043
  value: e.value,
1838
2044
  ai: "center",
1839
2045
  gap: 2,
@@ -1843,21 +2049,21 @@ function tt({ column: e }) {
1843
2049
  })
1844
2050
  });
1845
2051
  }
1846
- function nt(e) {
2052
+ function dt(e) {
1847
2053
  let { column: t } = e, n = t.filterConfig;
1848
2054
  if (!n) return null;
1849
2055
  switch (n.type) {
1850
- case "number": return /* @__PURE__ */ M(et, { column: t });
1851
- case "multiselect": return /* @__PURE__ */ M(tt, { column: t });
1852
- default: return /* @__PURE__ */ M($e, { column: t });
2056
+ case "number": return /* @__PURE__ */ P(lt, { column: t });
2057
+ case "multiselect": return /* @__PURE__ */ P(ut, { column: t });
2058
+ default: return /* @__PURE__ */ P(ct, { column: t });
1853
2059
  }
1854
2060
  }
1855
- nt.displayName = "DataGridColumnFilter";
2061
+ dt.displayName = "DataGridColumnFilter";
1856
2062
  //#endregion
1857
2063
  //#region src/components/dataGrid/components/dataGridFilterCell.tsx
1858
- function rt(e) {
2064
+ function ft(e) {
1859
2065
  let { column: t, grid: n, row: r, columnIndex: i } = e, { widthVarName: a, inlineStartVarName: o, inlineEndVarName: s, filterable: c } = t, { isStartPinned: l, isEndPinned: u, isPinned: d, isFirstStartPinned: p, isLastStartPinned: m, isFirstEndPinned: h, isLastEndPinned: g } = t.pinFlags.value, { ref: _, tabIndex: v, onFocus: y } = R()?.cellProps(r, i) ?? {}, b = t.isGrouping || t.isRowNumber || t.isRowSelection;
1860
- return /* @__PURE__ */ M(f, {
2066
+ return /* @__PURE__ */ P(f, {
1861
2067
  ref: _,
1862
2068
  component: `${n.componentName}.filter.cell`,
1863
2069
  props: {
@@ -1879,23 +2085,23 @@ function rt(e) {
1879
2085
  insetInlineStart: l ? `var(${o})` : void 0,
1880
2086
  insetInlineEnd: u ? `var(${s})` : void 0
1881
2087
  },
1882
- children: !b && c && /* @__PURE__ */ M(nt, { column: t })
2088
+ children: !b && c && /* @__PURE__ */ P(dt, { column: t })
1883
2089
  });
1884
2090
  }
1885
- rt.displayName = "DataGridFilterCell";
2091
+ ft.displayName = "DataGridFilterCell";
1886
2092
  //#endregion
1887
2093
  //#region src/components/dataGrid/components/dataGridFilterRow.tsx
1888
- function it(e) {
2094
+ function pt(e) {
1889
2095
  let { grid: t } = e;
1890
2096
  if (!t.filter.hasFilterableColumns) return null;
1891
2097
  let n = t.headerRows.value.length;
1892
- return /* @__PURE__ */ M(r, {
2098
+ return /* @__PURE__ */ P(r, {
1893
2099
  display: "contents",
1894
2100
  props: {
1895
2101
  role: "row",
1896
2102
  "aria-rowindex": n + 1
1897
2103
  },
1898
- children: t.columns.value.visibleLeafs.map((e, r) => /* @__PURE__ */ M(rt, {
2104
+ children: t.columns.value.visibleLeafs.map((e, r) => /* @__PURE__ */ P(ft, {
1899
2105
  column: e,
1900
2106
  grid: t,
1901
2107
  row: n,
@@ -1903,25 +2109,25 @@ function it(e) {
1903
2109
  }, e.uniqueKey))
1904
2110
  });
1905
2111
  }
1906
- it.displayName = "DataGridFilterRow";
2112
+ pt.displayName = "DataGridFilterRow";
1907
2113
  //#endregion
1908
2114
  //#region src/icons/sortIcon.tsx
1909
- function at(e) {
1910
- return /* @__PURE__ */ M(l, {
2115
+ function mt(e) {
2116
+ return /* @__PURE__ */ P(l, {
1911
2117
  viewBox: "0 0 24 24",
1912
2118
  width: "1.5rem",
1913
2119
  ...e,
1914
- children: /* @__PURE__ */ M(c, { d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z" })
2120
+ children: /* @__PURE__ */ P(c, { d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z" })
1915
2121
  });
1916
2122
  }
1917
2123
  //#endregion
1918
2124
  //#region src/icons/dotsIcon.tsx
1919
- function ot(e) {
1920
- return /* @__PURE__ */ M(l, {
2125
+ function ht(e) {
2126
+ return /* @__PURE__ */ P(l, {
1921
2127
  viewBox: "0 0 16 16",
1922
2128
  width: "18",
1923
2129
  ...e,
1924
- children: /* @__PURE__ */ M(c, {
2130
+ children: /* @__PURE__ */ P(c, {
1925
2131
  strokeWidth: 4,
1926
2132
  d: "M7.936 12.128a.936.936 0 1 1 0 1.872.936.936 0 0 1 0-1.872ZM7.936 7.052a.936.936 0 1 1 0 1.873.936.936 0 0 1 0-1.873ZM7.936 1.977a.936.936 0 1 1 0 1.872.936.936 0 0 1 0-1.872Z"
1927
2133
  })
@@ -1929,54 +2135,54 @@ function ot(e) {
1929
2135
  }
1930
2136
  //#endregion
1931
2137
  //#region src/icons/groupingIcon.tsx
1932
- function st(e) {
1933
- return /* @__PURE__ */ M(l, {
2138
+ function gt(e) {
2139
+ return /* @__PURE__ */ P(l, {
1934
2140
  viewBox: "0 0 24 24",
1935
2141
  width: "1.5rem",
1936
2142
  ...e,
1937
- children: /* @__PURE__ */ M(c, { d: "M3 5h8v2H3V5zm0 6h8v2H3v-2zm0 6h8v2H3v-2zm12-12h6v6h-6V5zm1 1v4h4V6h-4zm-1 7h6v6h-6v-6zm1 1v4h4v-4h-4z" })
2143
+ children: /* @__PURE__ */ P(c, { d: "M3 5h8v2H3V5zm0 6h8v2H3v-2zm0 6h8v2H3v-2zm12-12h6v6h-6V5zm1 1v4h4V6h-4zm-1 7h6v6h-6v-6zm1 1v4h4v-4h-4z" })
1938
2144
  });
1939
2145
  }
1940
2146
  //#endregion
1941
2147
  //#region src/icons/pinIcon.tsx
1942
- function ct(e) {
1943
- return /* @__PURE__ */ M(l, {
2148
+ function _t(e) {
2149
+ return /* @__PURE__ */ P(l, {
1944
2150
  viewBox: "0 0 1024 1024",
1945
2151
  width: "1.5rem",
1946
2152
  ...e,
1947
- children: /* @__PURE__ */ M(c, { d: "M31.997 1023.957a31.699 31.699 0 0 1-22.611-9.386C3.328 1008.556 0 1000.493 0 991.96s3.328-16.596 9.386-22.611L328.25 650.484l-152.52-152.52a95.907 95.907 0 0 1-25.087-92.152 95.31 95.31 0 0 1 44.327-58.62l.896-.512a353.464 353.464 0 0 1 176.156-47.398c20.137 0 40.36 1.749 60.283 5.205L597.71 44.54A95.224 95.224 0 0 1 678.685.085c25.64 0 49.745 9.983 67.877 28.073l249.195 249.195a95.224 95.224 0 0 1 25.897 88.74 95.139 95.139 0 0 1-42.152 60.154L719.513 591.695a352.227 352.227 0 0 1-42.663 237.292A95.395 95.395 0 0 1 594 876.514a95.523 95.523 0 0 1-67.963-28.2L373.43 695.706 54.61 1014.614a31.912 31.912 0 0 1-22.612 9.343zm340.025-660.68c-50.64 0-100.685 13.566-144.798 39.207a31.57 31.57 0 0 0-14.676 19.497 31.699 31.699 0 0 0 8.362 30.675L571.344 803.09c6.059 6.059 14.122 9.386 22.697 9.386a31.699 31.699 0 0 0 27.56-15.785 287.421 287.421 0 0 0 31.06-212.676 31.997 31.997 0 0 1 13.907-34.471l278.59-177.266a31.57 31.57 0 0 0 14.037-20.051 31.699 31.699 0 0 0-8.618-29.566l-249.28-249.28a31.912 31.912 0 0 0-49.618 5.418l-177.308 278.59a31.827 31.827 0 0 1-34.472 13.908 293.778 293.778 0 0 0-67.877-8.02z" })
2153
+ children: /* @__PURE__ */ P(c, { d: "M31.997 1023.957a31.699 31.699 0 0 1-22.611-9.386C3.328 1008.556 0 1000.493 0 991.96s3.328-16.596 9.386-22.611L328.25 650.484l-152.52-152.52a95.907 95.907 0 0 1-25.087-92.152 95.31 95.31 0 0 1 44.327-58.62l.896-.512a353.464 353.464 0 0 1 176.156-47.398c20.137 0 40.36 1.749 60.283 5.205L597.71 44.54A95.224 95.224 0 0 1 678.685.085c25.64 0 49.745 9.983 67.877 28.073l249.195 249.195a95.224 95.224 0 0 1 25.897 88.74 95.139 95.139 0 0 1-42.152 60.154L719.513 591.695a352.227 352.227 0 0 1-42.663 237.292A95.395 95.395 0 0 1 594 876.514a95.523 95.523 0 0 1-67.963-28.2L373.43 695.706 54.61 1014.614a31.912 31.912 0 0 1-22.612 9.343zm340.025-660.68c-50.64 0-100.685 13.566-144.798 39.207a31.57 31.57 0 0 0-14.676 19.497 31.699 31.699 0 0 0 8.362 30.675L571.344 803.09c6.059 6.059 14.122 9.386 22.697 9.386a31.699 31.699 0 0 0 27.56-15.785 287.421 287.421 0 0 0 31.06-212.676 31.997 31.997 0 0 1 13.907-34.471l278.59-177.266a31.57 31.57 0 0 0 14.037-20.051 31.699 31.699 0 0 0-8.618-29.566l-249.28-249.28a31.912 31.912 0 0 0-49.618 5.418l-177.308 278.59a31.827 31.827 0 0 1-34.472 13.908 293.778 293.778 0 0 0-67.877-8.02z" })
1948
2154
  });
1949
2155
  }
1950
2156
  //#endregion
1951
2157
  //#region src/components/dataGrid/components/dataGridHeaderCellContextMenu.tsx
1952
- function lt(e) {
2158
+ function vt(e) {
1953
2159
  let t = e.side === "start" ? "Left" : "Right", n = e.side === "start" ? "Right" : "Left";
1954
- return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N(b, {
2160
+ return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F(b, {
1955
2161
  rtl: { display: "none" },
1956
2162
  children: ["Pin ", t]
1957
- }), /* @__PURE__ */ N(b, {
2163
+ }), /* @__PURE__ */ F(b, {
1958
2164
  ltr: { display: "none" },
1959
2165
  children: ["Pin ", n]
1960
2166
  })] });
1961
2167
  }
1962
- function ut(e) {
1963
- let { column: t } = e, { grid: c, isEndAligned: l, header: u, key: p } = t, g = t.headerCell, _ = u ?? p, v = s("datagrid-column-menu"), [y, x] = A(!1), C = k(null), w = k(null), E = k(!1), D = l ? 2 : void 0, ee = l ? void 0 : t.pin === "END" ? 2.5 : 4, O = te(() => {
1964
- let e = (e) => /* @__PURE__ */ M(b, {
2168
+ function yt(e) {
2169
+ let { column: t } = e, { grid: c, isEndAligned: l, header: u, key: p } = t, g = t.headerCell, _ = u ?? p, v = s("datagrid-column-menu"), [y, x] = M(!1), C = j(null), w = j(null), T = j(!1), D = l ? 2 : void 0, O = l ? void 0 : t.pin === "END" ? 2.5 : 4, k = ee(() => {
2170
+ let e = (e) => /* @__PURE__ */ P(b, {
1965
2171
  component: `${c.componentName}.header.cell.contextMenu.tooltip.item.icon`,
1966
2172
  children: e
1967
- }), n = (t) => e(/* @__PURE__ */ M(at, {
2173
+ }), n = (t) => e(/* @__PURE__ */ P(mt, {
1968
2174
  width: "100%",
1969
2175
  fill: "currentColor",
1970
2176
  rotate: t
1971
- })), i = (t, n) => e(/* @__PURE__ */ M(ct, {
2177
+ })), i = (t, n) => e(/* @__PURE__ */ P(_t, {
1972
2178
  width: "100%",
1973
2179
  fill: "currentColor",
1974
2180
  rotate: t,
1975
2181
  rtl: { rotate: n }
1976
- })), a = e(/* @__PURE__ */ M(st, {
2182
+ })), a = e(/* @__PURE__ */ P(gt, {
1977
2183
  width: "100%",
1978
2184
  fill: "currentColor"
1979
- })), o = /* @__PURE__ */ M(r, { width: 4 });
2185
+ })), o = /* @__PURE__ */ P(r, { width: 4 });
1980
2186
  return [
1981
2187
  [
1982
2188
  g.canSortAsc && {
@@ -2005,14 +2211,14 @@ function ut(e) {
2005
2211
  g.canPinStart && {
2006
2212
  key: "pin-start",
2007
2213
  icon: i(0, -90),
2008
- label: /* @__PURE__ */ M(lt, { side: "start" }),
2214
+ label: /* @__PURE__ */ P(vt, { side: "start" }),
2009
2215
  text: "Pin Left",
2010
2216
  run: () => t.pinColumn("START")
2011
2217
  },
2012
2218
  g.canPinEnd && {
2013
2219
  key: "pin-end",
2014
2220
  icon: i(-90, 0),
2015
- label: /* @__PURE__ */ M(lt, { side: "end" }),
2221
+ label: /* @__PURE__ */ P(vt, { side: "end" }),
2016
2222
  text: "Pin Right",
2017
2223
  run: () => t.pinColumn("END")
2018
2224
  },
@@ -2027,7 +2233,7 @@ function ut(e) {
2027
2233
  [g.canGroupBy && {
2028
2234
  key: "group",
2029
2235
  icon: a,
2030
- label: /* @__PURE__ */ N(r, {
2236
+ label: /* @__PURE__ */ F(r, {
2031
2237
  textWrap: "nowrap",
2032
2238
  children: ["Group by ", _]
2033
2239
  }),
@@ -2036,7 +2242,7 @@ function ut(e) {
2036
2242
  }, g.canUnGroupAll && {
2037
2243
  key: "ungroup",
2038
2244
  icon: a,
2039
- label: /* @__PURE__ */ M(r, {
2245
+ label: /* @__PURE__ */ P(r, {
2040
2246
  textWrap: "nowrap",
2041
2247
  children: "Un-Group All"
2042
2248
  }),
@@ -2052,41 +2258,41 @@ function ut(e) {
2052
2258
  _,
2053
2259
  c,
2054
2260
  g
2055
- ]), j = T((e = !0) => {
2056
- E.current = !1, x(!1), e && C.current?.focus();
2057
- }, []), P = o({
2058
- count: O.length,
2059
- textOf: (e) => O[e]?.text ?? "",
2261
+ ]), A = E((e = !0) => {
2262
+ T.current = !1, x(!1), e && C.current?.focus();
2263
+ }, []), N = o({
2264
+ count: k.length,
2265
+ textOf: (e) => k[e]?.text ?? "",
2060
2266
  onSelect: (e) => {
2061
- O[e]?.run(), j();
2267
+ k[e]?.run(), A();
2062
2268
  }
2063
2269
  });
2064
2270
  a({
2065
2271
  enabled: y,
2066
2272
  inside: [C, w],
2067
- onDismiss: () => j()
2273
+ onDismiss: () => A()
2068
2274
  }), i({
2069
2275
  enabled: y,
2070
2276
  returnTo: C
2071
2277
  });
2072
- let F = P.setActiveIndex, ne = P.activeItem, re = T(() => {
2073
- F(0, { reason: "programmatic" }), E.current = !0, x(!0);
2074
- }, [F]);
2278
+ let te = N.setActiveIndex, ne = N.activeItem, re = E(() => {
2279
+ te(0, { reason: "programmatic" }), T.current = !0, x(!0);
2280
+ }, [te]);
2075
2281
  return n(() => {
2076
- if (!E.current) return;
2282
+ if (!T.current) return;
2077
2283
  let e = ne();
2078
- e && (E.current = !1, e.focus());
2079
- }), /* @__PURE__ */ N(f, {
2284
+ e && (T.current = !1, e.focus());
2285
+ }), /* @__PURE__ */ F(f, {
2080
2286
  position: "absolute",
2081
2287
  insetStart: D,
2082
- insetEnd: ee,
2288
+ insetEnd: O,
2083
2289
  top: "1/2",
2084
2290
  translateY: -3,
2085
2291
  ai: "center",
2086
- children: [/* @__PURE__ */ M(d, {
2292
+ children: [/* @__PURE__ */ P(d, {
2087
2293
  ref: C,
2088
2294
  component: `${c.componentName}.header.cell.contextMenu`,
2089
- onClick: () => y ? j(!1) : re(),
2295
+ onClick: () => y ? A(!1) : re(),
2090
2296
  variant: g.contextMenuButtonVariant,
2091
2297
  type: "button",
2092
2298
  props: {
@@ -2096,13 +2302,13 @@ function ut(e) {
2096
2302
  "aria-expanded": y,
2097
2303
  "aria-controls": y ? v : void 0
2098
2304
  },
2099
- children: /* @__PURE__ */ M(b, {
2305
+ children: /* @__PURE__ */ P(b, {
2100
2306
  component: `${c.componentName}.header.cell.contextMenu.icon`,
2101
- children: /* @__PURE__ */ M(ot, { fill: "currentColor" })
2307
+ children: /* @__PURE__ */ P(ht, { fill: "currentColor" })
2102
2308
  })
2103
- }), /* @__PURE__ */ M(h, {
2309
+ }), /* @__PURE__ */ P(h, {
2104
2310
  present: y,
2105
- children: (e) => /* @__PURE__ */ M(m, {
2311
+ children: (e) => /* @__PURE__ */ P(m, {
2106
2312
  component: `${c.componentName}.header.cell.contextMenu.tooltip`,
2107
2313
  variant: { closed: !e.present },
2108
2314
  ref: w,
@@ -2115,22 +2321,22 @@ function ut(e) {
2115
2321
  props: {
2116
2322
  role: "menu",
2117
2323
  "aria-label": `Column options for ${_}`,
2118
- onKeyDown: P.onKeyDown,
2324
+ onKeyDown: N.onKeyDown,
2119
2325
  ...e.props
2120
2326
  },
2121
- children: O.map((e, t) => {
2122
- let { ref: n, tabIndex: i, onFocus: a } = P.itemProps(t);
2123
- return /* @__PURE__ */ N(S, { children: [e.startsSection && /* @__PURE__ */ M(r, {
2327
+ children: k.map((e, t) => {
2328
+ let { ref: n, tabIndex: i, onFocus: a } = N.itemProps(t);
2329
+ return /* @__PURE__ */ F(S, { children: [e.startsSection && /* @__PURE__ */ P(r, {
2124
2330
  bb: 1,
2125
2331
  my: 2,
2126
2332
  borderColor: "gray-300",
2127
2333
  component: `${c.componentName}.header.cell.contextMenu.tooltip.item.separator`
2128
- }), /* @__PURE__ */ N(d, {
2334
+ }), /* @__PURE__ */ F(d, {
2129
2335
  component: `${c.componentName}.header.cell.contextMenu.tooltip.item`,
2130
2336
  ref: n,
2131
2337
  type: "button",
2132
2338
  onClick: (t) => {
2133
- t.stopPropagation(), e.run(), j();
2339
+ t.stopPropagation(), e.run(), A();
2134
2340
  },
2135
2341
  props: {
2136
2342
  role: "menuitem",
@@ -2144,49 +2350,49 @@ function ut(e) {
2144
2350
  })]
2145
2351
  });
2146
2352
  }
2147
- ut.displayName = "DataGridHeaderCellContextMenu";
2353
+ yt.displayName = "DataGridHeaderCellContextMenu";
2148
2354
  //#endregion
2149
2355
  //#region src/components/dataGrid/components/dataGridHeaderCellResizer.tsx
2150
- var X = (e) => "touches" in e ? e.touches[0]?.pageX ?? 0 : e.pageX, dt = 16, ft = 150;
2151
- function pt(e) {
2356
+ var Z = (e) => "touches" in e ? e.touches[0]?.pageX ?? 0 : e.pageX, bt = 16, xt = 150;
2357
+ function St(e) {
2152
2358
  let t = e.sizingElement;
2153
2359
  t && Object.entries(e.sizes.value).forEach(([e, n]) => t.style.setProperty(e, n));
2154
2360
  }
2155
- function mt(e) {
2156
- let { column: t, controls: n } = e, i = t.grid.resizerStyle, a = t.headerCell, o = T((e) => {
2361
+ function Ct(e) {
2362
+ let { column: t, controls: n } = e, i = t.grid.resizerStyle, a = t.headerCell, o = E((e) => {
2157
2363
  let { grid: n } = t;
2158
- e.type === "mousedown" && e.preventDefault(), t.beginResize(X(e.nativeEvent));
2159
- let r = new AbortController(), { signal: i } = r, a = 0, o = X(e.nativeEvent), s = () => {
2160
- t.applyResize(o), pt(n);
2364
+ e.type === "mousedown" && e.preventDefault(), t.beginResize(Z(e.nativeEvent));
2365
+ let r = new AbortController(), { signal: i } = r, a = 0, o = Z(e.nativeEvent), s = () => {
2366
+ t.applyResize(o), St(n);
2161
2367
  }, c = n.resizeMode === "instant" ? (e) => {
2162
- o = X(e), s();
2368
+ o = Z(e), s();
2163
2369
  } : (e) => {
2164
- o = X(e), a ||= requestAnimationFrame(() => {
2370
+ o = Z(e), a ||= requestAnimationFrame(() => {
2165
2371
  a = 0, s();
2166
2372
  });
2167
2373
  }, l = () => {
2168
2374
  r.abort(), a && cancelAnimationFrame(a), s(), t.endResize();
2169
2375
  };
2170
2376
  window.addEventListener("mousemove", c, { signal: i }), window.addEventListener("touchmove", c, { signal: i }), window.addEventListener("mouseup", l, { signal: i }), window.addEventListener("touchend", l, { signal: i });
2171
- }, [t]), s = k(void 0), c = k(0), l = T(() => {
2377
+ }, [t]), s = j(void 0), c = j(0), l = E(() => {
2172
2378
  let { grid: e } = t;
2173
2379
  if (e.resizeMode === "instant") {
2174
- pt(e);
2380
+ St(e);
2175
2381
  return;
2176
2382
  }
2177
2383
  c.current ||= requestAnimationFrame(() => {
2178
- c.current = 0, pt(e);
2384
+ c.current = 0, St(e);
2179
2385
  });
2180
- }, [t]), u = T(() => {
2386
+ }, [t]), u = E(() => {
2181
2387
  s.current !== void 0 && (clearTimeout(s.current), s.current = void 0, c.current &&= (cancelAnimationFrame(c.current), 0), t.endResize());
2182
2388
  }, [t]);
2183
- D(() => () => {
2389
+ O(() => () => {
2184
2390
  clearTimeout(s.current), c.current && cancelAnimationFrame(c.current);
2185
2391
  }, []);
2186
- let d = T((e) => {
2392
+ let d = E((e) => {
2187
2393
  switch (e.key) {
2188
2394
  case "ArrowRight":
2189
- t.moveResizer(dt);
2395
+ t.moveResizer(bt);
2190
2396
  break;
2191
2397
  case "ArrowLeft":
2192
2398
  t.moveResizer(-16);
@@ -2199,21 +2405,21 @@ function mt(e) {
2199
2405
  break;
2200
2406
  default: return;
2201
2407
  }
2202
- e.preventDefault(), l(), clearTimeout(s.current), s.current = setTimeout(u, ft);
2408
+ e.preventDefault(), l(), clearTimeout(s.current), s.current = setTimeout(u, xt);
2203
2409
  }, [
2204
2410
  t,
2205
2411
  u,
2206
2412
  a,
2207
2413
  l
2208
2414
  ]);
2209
- return /* @__PURE__ */ M(f, {
2415
+ return /* @__PURE__ */ P(f, {
2210
2416
  height: "fit",
2211
2417
  ai: "center",
2212
2418
  position: "absolute",
2213
2419
  insetEnd: t.pin === "END" ? void 0 : 0,
2214
2420
  insetStart: t.pin === "END" ? 0 : void 0,
2215
2421
  py: 3,
2216
- children: /* @__PURE__ */ M(r, {
2422
+ children: /* @__PURE__ */ P(r, {
2217
2423
  cursor: "col-resize",
2218
2424
  px: .75,
2219
2425
  mt: -6,
@@ -2223,7 +2429,7 @@ function mt(e) {
2223
2429
  onMouseDown: o,
2224
2430
  onTouchStart: o
2225
2431
  },
2226
- children: /* @__PURE__ */ M(r, {
2432
+ children: /* @__PURE__ */ P(r, {
2227
2433
  component: `${t.grid.componentName}.header.cell.resizer`,
2228
2434
  opacity: i === "visible" ? void 0 : 0,
2229
2435
  group: i === "hover" ? { "header-cell/hover": { opacity: 1 } } : void 0,
@@ -2244,13 +2450,13 @@ function mt(e) {
2244
2450
  })
2245
2451
  });
2246
2452
  }
2247
- mt.displayName = "DataGridHeaderCellResizer";
2453
+ Ct.displayName = "DataGridHeaderCellResizer";
2248
2454
  //#endregion
2249
2455
  //#region src/components/dataGrid/components/dataGridHeaderCell.tsx
2250
- function ht(e) {
2251
- let { column: t, row: n, columnIndex: i } = e, { grid: a } = t, { isStartPinned: o, isEndPinned: c } = t.pinFlags.value, l = t.headerCell, { isSortable: u, showResizer: d, showContextMenu: m, paddingStart: h, paddingEnd: g } = l, { ref: _, tabIndex: v, onFocus: b } = R()?.cellProps(n, i) ?? {}, x = s("datagrid-columnheader"), S = T(() => {
2456
+ function wt(e) {
2457
+ let { column: t, row: n, columnIndex: i } = e, { grid: a } = t, { isStartPinned: o, isEndPinned: c } = t.pinFlags.value, l = t.headerCell, { isSortable: u, showResizer: d, showContextMenu: m, paddingStart: h, paddingEnd: _ } = l, { ref: v, tabIndex: y, onFocus: b } = R()?.cellProps(n, i) ?? {}, x = s("datagrid-columnheader"), S = E(() => {
2252
2458
  a.toggleSelectAllRows();
2253
- }, [a]), C = t.isRowSelection ? /* @__PURE__ */ M(p, {
2459
+ }, [a]), C = t.isRowSelection ? /* @__PURE__ */ P(p, {
2254
2460
  variant: "datagrid",
2255
2461
  m: 1,
2256
2462
  indeterminate: a.someRowsSelected && !a.allRowsSelected,
@@ -2260,12 +2466,12 @@ function ht(e) {
2260
2466
  tabIndex: -1,
2261
2467
  "aria-label": "Select all rows"
2262
2468
  }
2263
- }) : l.hiddenLabel ? /* @__PURE__ */ M(y, {
2469
+ }) : l.hiddenLabel ? /* @__PURE__ */ P(g, {
2264
2470
  tag: "span",
2265
2471
  children: l.hiddenLabel
2266
2472
  }) : l.label;
2267
- return /* @__PURE__ */ M(f, {
2268
- ref: _,
2473
+ return /* @__PURE__ */ P(f, {
2474
+ ref: v,
2269
2475
  id: x,
2270
2476
  props: {
2271
2477
  role: "columnheader",
@@ -2273,7 +2479,7 @@ function ht(e) {
2273
2479
  "aria-colspan": l.columnSpan,
2274
2480
  "aria-rowspan": l.rowSpan,
2275
2481
  "aria-sort": l.ariaSort,
2276
- tabIndex: v,
2482
+ tabIndex: y,
2277
2483
  onFocus: b
2278
2484
  },
2279
2485
  className: "header-cell",
@@ -2286,125 +2492,139 @@ function ht(e) {
2286
2492
  insetInlineStart: o ? `var(${t.inlineStartVarName})` : void 0,
2287
2493
  insetInlineEnd: c ? `var(${t.inlineEndVarName})` : void 0
2288
2494
  },
2289
- children: /* @__PURE__ */ N(j, { children: [
2290
- /* @__PURE__ */ M(f, {
2495
+ children: /* @__PURE__ */ F(N, { children: [
2496
+ /* @__PURE__ */ P(f, {
2291
2497
  width: "fit",
2292
2498
  height: "fit",
2293
2499
  jc: t.align,
2294
2500
  props: { onClick: u ? () => t.sortColumn() : void 0 },
2295
- children: /* @__PURE__ */ N(f, {
2501
+ children: /* @__PURE__ */ F(f, {
2296
2502
  overflow: "hidden",
2297
2503
  position: t.isLeaf ? void 0 : "sticky",
2298
2504
  ai: "center",
2299
2505
  transition: "none",
2300
2506
  ps: h,
2301
- pe: g,
2507
+ pe: _,
2302
2508
  style: { insetInlineStart: t.pin ? void 0 : `var(${a.inlineStartEdgeVarName})` },
2303
2509
  children: [
2304
- /* @__PURE__ */ M(r, {
2510
+ /* @__PURE__ */ P(r, {
2305
2511
  overflow: "hidden",
2306
2512
  textOverflow: "ellipsis",
2307
2513
  textWrap: "nowrap",
2308
2514
  children: C
2309
2515
  }),
2310
- l.isSorted && /* @__PURE__ */ M(r, {
2516
+ l.isSorted && /* @__PURE__ */ P(r, {
2311
2517
  ps: (t.inlineWidth ?? 0) < 58 ? 0 : 2,
2312
- children: /* @__PURE__ */ M(at, {
2518
+ children: /* @__PURE__ */ P(mt, {
2313
2519
  width: "16px",
2314
2520
  rotate: l.sortDirection === "ASC" ? 0 : 180,
2315
2521
  fill: "currentColor"
2316
2522
  })
2317
2523
  }),
2318
- m && /* @__PURE__ */ M(r, { minWidth: t.isEndAligned ? 4 : 10 })
2524
+ m && /* @__PURE__ */ P(r, { minWidth: t.isEndAligned ? 4 : 10 })
2319
2525
  ]
2320
2526
  })
2321
2527
  }),
2322
- d && /* @__PURE__ */ M(mt, {
2528
+ d && /* @__PURE__ */ P(Ct, {
2323
2529
  column: t,
2324
2530
  controls: x
2325
2531
  }),
2326
- m && /* @__PURE__ */ M(ut, { column: t })
2532
+ m && /* @__PURE__ */ P(yt, { column: t })
2327
2533
  ] })
2328
2534
  });
2329
2535
  }
2330
- ht.displayName = "DataGridHeaderCell";
2536
+ wt.displayName = "DataGridHeaderCell";
2331
2537
  //#endregion
2332
2538
  //#region src/components/dataGrid/components/dataGridHeader.tsx
2333
- function gt(e) {
2539
+ function Tt(e) {
2334
2540
  let { grid: t } = e;
2335
- return /* @__PURE__ */ N(_, {
2541
+ return /* @__PURE__ */ F(v, {
2336
2542
  component: `${t.componentName}.header`,
2337
2543
  props: { role: "rowgroup" },
2338
2544
  style: { gridTemplateColumns: t.gridTemplateColumns.value },
2339
- children: [t.headerRows.value.map((e, t) => /* @__PURE__ */ M(r, {
2545
+ children: [t.headerRows.value.map((e, t) => /* @__PURE__ */ P(r, {
2340
2546
  display: "contents",
2341
2547
  props: {
2342
2548
  role: "row",
2343
2549
  "aria-rowindex": t + 1
2344
2550
  },
2345
- children: e.map((e, n) => /* @__PURE__ */ M(ht, {
2551
+ children: e.map((e, n) => /* @__PURE__ */ P(wt, {
2346
2552
  column: e,
2347
2553
  row: t,
2348
2554
  columnIndex: n
2349
2555
  }, e.uniqueKey))
2350
- }, t)), /* @__PURE__ */ M(it, { grid: t })]
2556
+ }, t)), /* @__PURE__ */ P(pt, { grid: t })]
2351
2557
  });
2352
2558
  }
2353
- gt.displayName = "DataGridHeader";
2559
+ Tt.displayName = "DataGridHeader";
2354
2560
  //#endregion
2355
2561
  //#region src/components/dataGrid/components/dataGridLoader.tsx
2356
- function _t(e) {
2562
+ function Et(e) {
2357
2563
  let { grid: t } = e;
2358
- return /* @__PURE__ */ M(r, {
2564
+ return /* @__PURE__ */ P(r, {
2359
2565
  component: `${t.componentName}.loader`,
2360
2566
  props: { "aria-hidden": !0 },
2361
- children: /* @__PURE__ */ M(r, {
2567
+ children: /* @__PURE__ */ P(r, {
2362
2568
  component: `${t.componentName}.loader.track`,
2363
2569
  style: { height: 3 },
2364
- children: /* @__PURE__ */ M(r, {
2570
+ children: /* @__PURE__ */ P(r, {
2365
2571
  component: `${t.componentName}.loader.track.bar`,
2366
2572
  width: "2/5"
2367
2573
  })
2368
2574
  })
2369
2575
  });
2370
2576
  }
2371
- _t.displayName = "DataGridLoader";
2577
+ Et.displayName = "DataGridLoader";
2372
2578
  //#endregion
2373
2579
  //#region src/components/dataGrid/components/dataGridContent.tsx
2374
- function vt(e) {
2375
- let { grid: t } = e, i = k(null), [a, o] = A(0), s = k(null), c = T((e) => {
2580
+ function Dt(e) {
2581
+ let { grid: t } = e, i = j(null), [a, o] = M({
2582
+ top: 0,
2583
+ direction: "down"
2584
+ }), s = j(null), c = E((e) => {
2585
+ o((t) => e === t.top ? t : {
2586
+ top: e,
2587
+ direction: de.directionOf(t.top, e, t.direction)
2588
+ });
2589
+ }, []), l = E((e) => {
2376
2590
  s.current !== null && cancelAnimationFrame(s.current), s.current = requestAnimationFrame(() => {
2377
- o(e.target.scrollTop), s.current = null;
2591
+ c(e.target.scrollTop), s.current = null;
2378
2592
  });
2379
- }, []), l = Ce({
2593
+ }, [c]), { navigation: u, onKeyDown: d } = Oe({
2380
2594
  grid: t,
2381
2595
  scrollerRef: i,
2382
- scrollTop: a,
2383
- onScrollTo: o
2384
- }), { source: u } = t, { queryVersion: d } = u;
2385
- return n(() => {
2386
- u.enabled && i.current && (i.current.scrollTop = 0);
2387
- }, [u, d]), D(() => {
2388
- if (!u.enabled) return;
2389
- let { startIndex: e, take: n } = t.viewport.window(i.current?.scrollTop ?? 0);
2390
- u.request(e, e + n);
2596
+ scroll: a,
2597
+ onScrollTo: c
2598
+ }), { source: f } = t, { queryVersion: p } = f;
2599
+ n(() => {
2600
+ f.enabled && i.current && (i.current.scrollTop = 0);
2601
+ }, [f, p]), O(() => {
2602
+ if (!f.enabled) return;
2603
+ let { startIndex: e, take: n } = t.viewport.window(i.current?.scrollTop ?? 0, a.direction);
2604
+ f.request(e, e + n);
2391
2605
  }, [
2392
2606
  t,
2393
- u,
2394
- d,
2607
+ f,
2608
+ p,
2395
2609
  a,
2396
2610
  t.totalRowCount,
2397
2611
  t.page,
2398
2612
  t.pageSize,
2399
2613
  t.expansionVersion
2400
- ]), n(() => {
2614
+ ]);
2615
+ let { range: m } = t, { isDragging: h } = m;
2616
+ return O(() => {
2617
+ if (h) return window.addEventListener("pointerup", m.endDrag), window.addEventListener("pointercancel", m.endDrag), () => {
2618
+ window.removeEventListener("pointerup", m.endDrag), window.removeEventListener("pointercancel", m.endDrag);
2619
+ };
2620
+ }, [h, m]), n(() => {
2401
2621
  let e = i.current;
2402
2622
  if (!e) return;
2403
2623
  let n = new ResizeObserver(() => t.setContainerWidth(e.clientWidth));
2404
2624
  return n.observe(e), () => n.disconnect();
2405
- }, [t]), t.hasVisibleColumns ? /* @__PURE__ */ M(le.Provider, {
2406
- value: l,
2407
- children: /* @__PURE__ */ N(r, {
2625
+ }, [t]), t.hasVisibleColumns ? /* @__PURE__ */ P(ue.Provider, {
2626
+ value: u,
2627
+ children: /* @__PURE__ */ F(r, {
2408
2628
  ref: i,
2409
2629
  component: `${t.componentName}.content`,
2410
2630
  overflowX: "auto",
@@ -2412,39 +2632,41 @@ function vt(e) {
2412
2632
  style: { willChange: "scroll-position" },
2413
2633
  props: {
2414
2634
  role: t.tree.enabled ? "treegrid" : "grid",
2415
- "aria-rowcount": l.rowCount,
2416
- "aria-colcount": l.columnCount,
2417
- "aria-multiselectable": t.props.def.rowSelection ? !0 : void 0,
2635
+ "aria-rowcount": u.rowCount,
2636
+ "aria-colcount": u.columnCount,
2637
+ "aria-multiselectable": t.props.def.rowSelection || m.enabled ? !0 : void 0,
2418
2638
  "aria-labelledby": t.props.def.title ? t.titleId : void 0,
2419
- "aria-busy": t.props.loading || u.isLoading ? !0 : void 0,
2420
- onScroll: c,
2421
- onKeyDown: l.onKeyDown
2639
+ "aria-busy": t.props.loading || f.isLoading ? !0 : void 0,
2640
+ onScroll: l,
2641
+ onKeyDown: d,
2642
+ onCopy: m.onCopy,
2643
+ onPaste: m.onPaste
2422
2644
  },
2423
2645
  children: [
2424
- /* @__PURE__ */ M(gt, { grid: t }),
2425
- (t.props.loading || u.isLoading) && /* @__PURE__ */ M(_t, { grid: t }),
2426
- /* @__PURE__ */ M(Xe, {
2646
+ /* @__PURE__ */ P(Tt, { grid: t }),
2647
+ (t.props.loading || f.isLoading) && /* @__PURE__ */ P(Et, { grid: t }),
2648
+ /* @__PURE__ */ P(at, {
2427
2649
  grid: t,
2428
- scrollTop: a
2650
+ scroll: a
2429
2651
  })
2430
2652
  ]
2431
2653
  })
2432
- }) : /* @__PURE__ */ M(Ze, { grid: t });
2654
+ }) : /* @__PURE__ */ P(ot, { grid: t });
2433
2655
  }
2434
- vt.displayName = "DataGridContent";
2656
+ Dt.displayName = "DataGridContent";
2435
2657
  //#endregion
2436
2658
  //#region src/components/dataGrid/components/dataGridDataSourceError.tsx
2437
- function yt(e) {
2659
+ function Ot(e) {
2438
2660
  let { grid: t } = e, { error: n } = t.source;
2439
2661
  if (n === void 0) return null;
2440
2662
  let i = n instanceof Error && n.message ? n.message : "Could not load rows.";
2441
- return /* @__PURE__ */ N(f, {
2663
+ return /* @__PURE__ */ F(f, {
2442
2664
  component: `${t.componentName}.error`,
2443
2665
  props: { role: "alert" },
2444
- children: [/* @__PURE__ */ M(r, {
2666
+ children: [/* @__PURE__ */ P(r, {
2445
2667
  component: `${t.componentName}.error.message`,
2446
2668
  children: i
2447
- }), /* @__PURE__ */ M(d, {
2669
+ }), /* @__PURE__ */ P(d, {
2448
2670
  component: `${t.componentName}.error.retry`,
2449
2671
  type: "button",
2450
2672
  onClick: t.source.retry,
@@ -2452,31 +2674,31 @@ function yt(e) {
2452
2674
  })]
2453
2675
  });
2454
2676
  }
2455
- yt.displayName = "DataGridDataSourceError";
2677
+ Ot.displayName = "DataGridDataSourceError";
2456
2678
  //#endregion
2457
2679
  //#region src/components/dataGrid/components/dataGridColumnGroups.tsx
2458
- function bt(e) {
2680
+ function kt(e) {
2459
2681
  let { grid: t } = e;
2460
- return t.groupColumns.size === 0 ? null : /* @__PURE__ */ N(f, {
2682
+ return t.groupColumns.size === 0 ? null : /* @__PURE__ */ F(f, {
2461
2683
  component: `${t.componentName}.topBar.columnGroups`,
2462
- children: [/* @__PURE__ */ M(b, {
2684
+ children: [/* @__PURE__ */ P(b, {
2463
2685
  component: `${t.componentName}.topBar.columnGroups.icon`,
2464
- children: /* @__PURE__ */ M(st, {
2686
+ children: /* @__PURE__ */ P(gt, {
2465
2687
  width: "100%",
2466
2688
  fill: "currentColor"
2467
2689
  })
2468
- }), t.groupedColumns.map((e) => /* @__PURE__ */ N(x.Fragment, { children: [/* @__PURE__ */ M(J, {
2690
+ }), t.groupedColumns.map((e) => /* @__PURE__ */ F(x.Fragment, { children: [/* @__PURE__ */ P(X, {
2469
2691
  fill: "currentColor",
2470
2692
  width: "14px",
2471
2693
  height: "14px",
2472
2694
  rotate: -90
2473
- }), /* @__PURE__ */ N(f, {
2695
+ }), /* @__PURE__ */ F(f, {
2474
2696
  component: `${t.componentName}.topBar.columnGroups.item`,
2475
- children: [e.header ?? e.key, /* @__PURE__ */ M(d, {
2697
+ children: [e.header ?? e.key, /* @__PURE__ */ P(d, {
2476
2698
  component: `${t.componentName}.topBar.columnGroups.item.icon`,
2477
2699
  onClick: () => t.toggleGrouping(e.key),
2478
2700
  props: { "aria-label": `Stop grouping by ${e.header ?? e.key}` },
2479
- children: /* @__PURE__ */ M(r, {
2701
+ children: /* @__PURE__ */ P(r, {
2480
2702
  fontSize: 10,
2481
2703
  color: "gray-400",
2482
2704
  hover: { color: "gray-600" },
@@ -2486,21 +2708,21 @@ function bt(e) {
2486
2708
  })] }, e.key))]
2487
2709
  });
2488
2710
  }
2489
- bt.displayName = "DataGridColumnGroups";
2711
+ kt.displayName = "DataGridColumnGroups";
2490
2712
  //#endregion
2491
2713
  //#region src/components/dataGrid/components/dataGridExport.tsx
2492
- function xt(e) {
2493
- let { grid: t } = e, n = t.exportConfig, r = T(() => void t.exportCsv(n).catch(() => void 0), [t, n]), i = T(() => void t.exportXlsx(n).catch(() => void 0), [t, n]);
2494
- return n ? /* @__PURE__ */ N(f, {
2714
+ function At(e) {
2715
+ let { grid: t } = e, n = t.exportConfig, r = E(() => void t.exportCsv(n).catch(() => void 0), [t, n]), i = E(() => void t.exportXlsx(n).catch(() => void 0), [t, n]);
2716
+ return n ? /* @__PURE__ */ F(f, {
2495
2717
  component: `${t.componentName}.topBar.export`,
2496
2718
  ai: "center",
2497
2719
  gap: 2,
2498
- children: [n.csv !== !1 && /* @__PURE__ */ M(St, {
2720
+ children: [n.csv !== !1 && /* @__PURE__ */ P(jt, {
2499
2721
  componentName: t.componentName,
2500
2722
  onClick: r,
2501
2723
  label: "Export CSV",
2502
2724
  children: "CSV"
2503
- }), n.xlsx !== !1 && /* @__PURE__ */ M(St, {
2725
+ }), n.xlsx !== !1 && /* @__PURE__ */ P(jt, {
2504
2726
  componentName: t.componentName,
2505
2727
  onClick: i,
2506
2728
  label: "Export Excel",
@@ -2508,25 +2730,25 @@ function xt(e) {
2508
2730
  })]
2509
2731
  }) : null;
2510
2732
  }
2511
- xt.displayName = "DataGridExport";
2512
- function St(e) {
2733
+ At.displayName = "DataGridExport";
2734
+ function jt(e) {
2513
2735
  let { componentName: t, onClick: n, label: r, children: i } = e;
2514
- return /* @__PURE__ */ N(d, {
2736
+ return /* @__PURE__ */ F(d, {
2515
2737
  component: `${t}.topBar.export.button`,
2516
2738
  onClick: n,
2517
2739
  props: { "aria-label": r },
2518
- children: [/* @__PURE__ */ N(l, {
2740
+ children: [/* @__PURE__ */ F(l, {
2519
2741
  viewBox: "0 0 20 20",
2520
2742
  width: 16,
2521
2743
  height: 16,
2522
2744
  fill: "none",
2523
2745
  stroke: "currentColor",
2524
2746
  strokeWidth: 1.6,
2525
- children: [/* @__PURE__ */ M(c, {
2747
+ children: [/* @__PURE__ */ P(c, {
2526
2748
  d: "M10 3v9m0 0 3.5-3.5M10 12 6.5 8.5",
2527
2749
  strokeLinecap: "round",
2528
2750
  strokeLinejoin: "round"
2529
- }), /* @__PURE__ */ M(c, {
2751
+ }), /* @__PURE__ */ P(c, {
2530
2752
  d: "M3.5 13.5v2a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-2",
2531
2753
  strokeLinecap: "round"
2532
2754
  })]
@@ -2535,54 +2757,54 @@ function St(e) {
2535
2757
  }
2536
2758
  //#endregion
2537
2759
  //#region src/icons/searchIcon.tsx
2538
- function Ct(e) {
2539
- return /* @__PURE__ */ M(l, {
2760
+ function Mt(e) {
2761
+ return /* @__PURE__ */ P(l, {
2540
2762
  viewBox: "0 0 488.4 488.4",
2541
2763
  width: "1.5rem",
2542
2764
  ...e,
2543
- children: /* @__PURE__ */ M(c, { d: "M0 203.25c0 112.1 91.2 203.2 203.2 203.2 51.6 0 98.8-19.4 134.7-51.2l129.5 129.5c2.4 2.4 5.5 3.6 8.7 3.6s6.3-1.2 8.7-3.6c4.8-4.8 4.8-12.5 0-17.3l-129.6-129.5c31.8-35.9 51.2-83 51.2-134.7C406.4 91.15 315.2.05 203.2.05S0 91.15 0 203.25zm381.9 0c0 98.5-80.2 178.7-178.7 178.7s-178.7-80.2-178.7-178.7 80.2-178.7 178.7-178.7 178.7 80.1 178.7 178.7z" })
2765
+ children: /* @__PURE__ */ P(c, { d: "M0 203.25c0 112.1 91.2 203.2 203.2 203.2 51.6 0 98.8-19.4 134.7-51.2l129.5 129.5c2.4 2.4 5.5 3.6 8.7 3.6s6.3-1.2 8.7-3.6c4.8-4.8 4.8-12.5 0-17.3l-129.6-129.5c31.8-35.9 51.2-83 51.2-134.7C406.4 91.15 315.2.05 203.2.05S0 91.15 0 203.25zm381.9 0c0 98.5-80.2 178.7-178.7 178.7s-178.7-80.2-178.7-178.7 80.2-178.7 178.7-178.7 178.7 80.1 178.7 178.7z" })
2544
2766
  });
2545
2767
  }
2546
2768
  //#endregion
2547
2769
  //#region src/components/dataGrid/components/dataGridGlobalFilter.tsx
2548
- function wt(e) {
2549
- let { grid: t } = e, [n, i] = A(t.globalFilterValue), a = k(null);
2550
- D(() => () => {
2770
+ function Nt(e) {
2771
+ let { grid: t } = e, [n, i] = M(t.globalFilterValue), a = j(null);
2772
+ O(() => () => {
2551
2773
  a.current && clearTimeout(a.current);
2552
2774
  }, []);
2553
- let o = T((e) => {
2775
+ let o = E((e) => {
2554
2776
  let n = e.target.value;
2555
2777
  i(n), a.current && clearTimeout(a.current), a.current = setTimeout(() => {
2556
2778
  t.filter.setGlobalFilter(n), a.current = null;
2557
2779
  }, 300);
2558
- }, [t]), s = T(() => {
2780
+ }, [t]), s = E(() => {
2559
2781
  i(""), t.filter.setGlobalFilter("");
2560
2782
  }, [t]), { filtered: c, total: l } = t.filter.filterStats, u = t.filter.hasActiveFilters && c !== l;
2561
- return /* @__PURE__ */ N(f, {
2783
+ return /* @__PURE__ */ F(f, {
2562
2784
  component: `${t.componentName}.topBar.globalFilter`,
2563
- children: [u && /* @__PURE__ */ N(r, {
2785
+ children: [u && /* @__PURE__ */ F(r, {
2564
2786
  component: `${t.componentName}.topBar.globalFilter.stats`,
2565
2787
  children: [
2566
2788
  c,
2567
2789
  "/",
2568
2790
  l
2569
2791
  ]
2570
- }), /* @__PURE__ */ N(f, {
2792
+ }), /* @__PURE__ */ F(f, {
2571
2793
  position: "relative",
2572
2794
  ai: "center",
2573
2795
  children: [
2574
- /* @__PURE__ */ M(f, {
2796
+ /* @__PURE__ */ P(f, {
2575
2797
  position: "absolute",
2576
2798
  insetStart: 3,
2577
2799
  pointerEvents: "none",
2578
2800
  color: "gray-400",
2579
2801
  theme: { dark: { color: "gray-500" } },
2580
- children: /* @__PURE__ */ M(Ct, {
2802
+ children: /* @__PURE__ */ P(Mt, {
2581
2803
  fill: "currentColor",
2582
2804
  width: "14px"
2583
2805
  })
2584
2806
  }),
2585
- /* @__PURE__ */ M(g, {
2807
+ /* @__PURE__ */ P(_, {
2586
2808
  placeholder: "Search...",
2587
2809
  variant: "compact",
2588
2810
  value: n,
@@ -2590,7 +2812,7 @@ function wt(e) {
2590
2812
  ps: 8,
2591
2813
  pe: n ? 8 : 3
2592
2814
  }),
2593
- n && /* @__PURE__ */ M(r, {
2815
+ n && /* @__PURE__ */ P(r, {
2594
2816
  position: "absolute",
2595
2817
  insetEnd: 2,
2596
2818
  cursor: "pointer",
@@ -2602,7 +2824,7 @@ function wt(e) {
2602
2824
  hover: { color: "gray-300" }
2603
2825
  } },
2604
2826
  props: { onClick: s },
2605
- children: /* @__PURE__ */ M(r, {
2827
+ children: /* @__PURE__ */ P(r, {
2606
2828
  fontSize: 12,
2607
2829
  fontWeight: 600,
2608
2830
  children: "✕"
@@ -2614,9 +2836,9 @@ function wt(e) {
2614
2836
  }
2615
2837
  //#endregion
2616
2838
  //#region src/components/dataGrid/components/dataGridTopBarContextMenu.tsx
2617
- function Tt(e) {
2839
+ function Pt(e) {
2618
2840
  let { grid: t } = e, { columnVisibility: n } = t, { entries: i, selectedIds: a, total: o, hasHidden: s } = n;
2619
- return /* @__PURE__ */ N(v, {
2841
+ return /* @__PURE__ */ F(y, {
2620
2842
  component: `${t.componentName}.topBar.columnVisibility`,
2621
2843
  multiple: !0,
2622
2844
  showCheckbox: !0,
@@ -2631,17 +2853,17 @@ function Tt(e) {
2631
2853
  display: "inline-flex",
2632
2854
  props: { "aria-label": "Columns" },
2633
2855
  children: [
2634
- /* @__PURE__ */ M(v.Display, { children: (e) => {
2856
+ /* @__PURE__ */ P(y.Display, { children: (e) => {
2635
2857
  let n = e.length === 0;
2636
- return /* @__PURE__ */ N(f, {
2858
+ return /* @__PURE__ */ F(f, {
2637
2859
  ai: "center",
2638
2860
  gap: 2,
2639
- children: [/* @__PURE__ */ N(u, {
2861
+ children: [/* @__PURE__ */ F(u, {
2640
2862
  viewBox: "0 0 20 20",
2641
2863
  width: "18",
2642
2864
  height: "18",
2643
2865
  children: [
2644
- /* @__PURE__ */ M("rect", {
2866
+ /* @__PURE__ */ P("rect", {
2645
2867
  x: "2",
2646
2868
  y: "3",
2647
2869
  width: "4",
@@ -2650,7 +2872,7 @@ function Tt(e) {
2650
2872
  fill: "currentColor",
2651
2873
  opacity: .9
2652
2874
  }),
2653
- /* @__PURE__ */ M("rect", {
2875
+ /* @__PURE__ */ P("rect", {
2654
2876
  x: "8",
2655
2877
  y: "3",
2656
2878
  width: "4",
@@ -2659,7 +2881,7 @@ function Tt(e) {
2659
2881
  fill: "currentColor",
2660
2882
  opacity: .6
2661
2883
  }),
2662
- /* @__PURE__ */ M("rect", {
2884
+ /* @__PURE__ */ P("rect", {
2663
2885
  x: "14",
2664
2886
  y: "3",
2665
2887
  width: "4",
@@ -2669,7 +2891,7 @@ function Tt(e) {
2669
2891
  opacity: .3
2670
2892
  })
2671
2893
  ]
2672
- }), s && /* @__PURE__ */ N(r, {
2894
+ }), s && /* @__PURE__ */ F(r, {
2673
2895
  component: `${t.componentName}.topBar.columnVisibility.badge`,
2674
2896
  tag: "span",
2675
2897
  fontSize: 11,
@@ -2692,9 +2914,9 @@ function Tt(e) {
2692
2914
  })]
2693
2915
  });
2694
2916
  } }),
2695
- /* @__PURE__ */ M(v.SelectAll, { children: "Show All" }),
2696
- /* @__PURE__ */ M(v.Unselect, { children: "Hide All" }),
2697
- i.map((e) => /* @__PURE__ */ M(v.Item, {
2917
+ /* @__PURE__ */ P(y.SelectAll, { children: "Show All" }),
2918
+ /* @__PURE__ */ P(y.Unselect, { children: "Hide All" }),
2919
+ i.map((e) => /* @__PURE__ */ P(y.Item, {
2698
2920
  value: e.id,
2699
2921
  textWrap: "nowrap",
2700
2922
  children: e.label
@@ -2702,30 +2924,30 @@ function Tt(e) {
2702
2924
  ]
2703
2925
  });
2704
2926
  }
2705
- Tt.displayName = "DataGridTopBarContextMenu";
2927
+ Pt.displayName = "DataGridTopBarContextMenu";
2706
2928
  //#endregion
2707
2929
  //#region src/components/dataGrid/components/dataGridTopBar.tsx
2708
- function Et(e) {
2930
+ function Ft(e) {
2709
2931
  let { grid: t } = e, { title: n, topBarContent: i, globalFilter: a } = t.props.def;
2710
- return /* @__PURE__ */ N(f, {
2932
+ return /* @__PURE__ */ F(f, {
2711
2933
  component: `${t.componentName}.topBar`,
2712
2934
  position: "relative",
2713
2935
  d: "column",
2714
2936
  gap: 3,
2715
- children: [/* @__PURE__ */ N(f, {
2937
+ children: [/* @__PURE__ */ F(f, {
2716
2938
  ai: "center",
2717
2939
  jc: "space-between",
2718
2940
  gap: 4,
2719
2941
  flexWrap: "wrap",
2720
2942
  width: "fit",
2721
- children: [/* @__PURE__ */ N(f, {
2943
+ children: [/* @__PURE__ */ F(f, {
2722
2944
  ai: "center",
2723
2945
  gap: 3,
2724
2946
  flexWrap: "wrap",
2725
2947
  minWidth: 0,
2726
2948
  children: [
2727
- /* @__PURE__ */ M(Tt, { grid: t }),
2728
- n && /* @__PURE__ */ M(r, {
2949
+ /* @__PURE__ */ P(Pt, { grid: t }),
2950
+ n && /* @__PURE__ */ P(r, {
2729
2951
  id: t.titleId,
2730
2952
  fontWeight: 600,
2731
2953
  fontSize: 16,
@@ -2733,24 +2955,24 @@ function Et(e) {
2733
2955
  theme: { dark: { color: "gray-100" } },
2734
2956
  children: n
2735
2957
  }),
2736
- /* @__PURE__ */ M(bt, { grid: t })
2958
+ /* @__PURE__ */ P(kt, { grid: t })
2737
2959
  ]
2738
- }), /* @__PURE__ */ N(f, {
2960
+ }), /* @__PURE__ */ F(f, {
2739
2961
  ai: "center",
2740
2962
  gap: 3,
2741
2963
  flexWrap: "wrap",
2742
- children: [a && /* @__PURE__ */ M(wt, { grid: t }), /* @__PURE__ */ M(xt, { grid: t })]
2964
+ children: [a && /* @__PURE__ */ P(Nt, { grid: t }), /* @__PURE__ */ P(At, { grid: t })]
2743
2965
  })]
2744
- }), i && /* @__PURE__ */ M(r, {
2966
+ }), i && /* @__PURE__ */ P(r, {
2745
2967
  width: "fit",
2746
2968
  children: i
2747
2969
  })]
2748
2970
  });
2749
2971
  }
2750
- Et.displayName = "DataGridTopBar";
2972
+ Ft.displayName = "DataGridTopBar";
2751
2973
  //#endregion
2752
2974
  //#region src/utils/string/fuzzySearch.ts
2753
- function Dt(e, t) {
2975
+ function It(e, t) {
2754
2976
  if (!e) return {
2755
2977
  score: 1,
2756
2978
  matches: []
@@ -2763,16 +2985,16 @@ function Dt(e, t) {
2763
2985
  matches: o
2764
2986
  });
2765
2987
  }
2766
- function Ot(e, t) {
2767
- return Dt(e, t) !== null;
2988
+ function Lt(e, t) {
2989
+ return It(e, t) !== null;
2768
2990
  }
2769
2991
  //#endregion
2770
2992
  //#region src/components/dataGrid/components/dataGridCellRowDetail.tsx
2771
- function kt(e) {
2772
- let { cell: t } = e, n = t.isExpanded, r = T((e) => {
2993
+ function Rt(e) {
2994
+ let { cell: t } = e, n = t.isExpanded, r = E((e) => {
2773
2995
  e.stopPropagation(), t.toggleDetail();
2774
2996
  }, [t]);
2775
- return /* @__PURE__ */ M(d, {
2997
+ return /* @__PURE__ */ P(d, {
2776
2998
  component: `${t.grid.componentName}.body.cell.rowDetail`,
2777
2999
  variant: { isExpanded: n },
2778
3000
  type: "button",
@@ -2788,7 +3010,7 @@ function kt(e) {
2788
3010
  "aria-label": `${n ? "Collapse" : "Expand"} details for row ${t.row.rowIndex + 1}`,
2789
3011
  "aria-expanded": n
2790
3012
  },
2791
- children: /* @__PURE__ */ M(J, {
3013
+ children: /* @__PURE__ */ P(X, {
2792
3014
  fill: "currentColor",
2793
3015
  width: "14px",
2794
3016
  height: "14px",
@@ -2796,14 +3018,14 @@ function kt(e) {
2796
3018
  })
2797
3019
  });
2798
3020
  }
2799
- kt.displayName = "DataGridCellRowDetail";
3021
+ Rt.displayName = "DataGridCellRowDetail";
2800
3022
  //#endregion
2801
3023
  //#region src/components/dataGrid/components/dataGridCellRowSelection.tsx
2802
- function At(e) {
2803
- let { cell: t } = e, n = T(() => {
3024
+ function zt(e) {
3025
+ let { cell: t } = e, n = E(() => {
2804
3026
  t.toggleSelection();
2805
3027
  }, [t]);
2806
- return /* @__PURE__ */ M(p, {
3028
+ return /* @__PURE__ */ P(p, {
2807
3029
  variant: "datagrid",
2808
3030
  checked: t.selected,
2809
3031
  indeterminate: t.indeterminate,
@@ -2814,15 +3036,15 @@ function At(e) {
2814
3036
  }
2815
3037
  });
2816
3038
  }
2817
- At.displayName = "DataGridCellRowSelection";
3039
+ zt.displayName = "DataGridCellRowSelection";
2818
3040
  //#endregion
2819
3041
  //#region src/components/dataGrid/contracts/dataGridContract.ts
2820
- function jt(e) {
3042
+ function Bt(e) {
2821
3043
  if (e) return e === "LEFT" ? "START" : e === "RIGHT" ? "END" : e;
2822
3044
  }
2823
3045
  //#endregion
2824
3046
  //#region src/components/dataGrid/models/headerCellModel.ts
2825
- var Mt = 1e3, Nt = class {
3047
+ var Vt = 1e3, Ht = class {
2826
3048
  column;
2827
3049
  constructor(e) {
2828
3050
  this.column = e;
@@ -2835,7 +3057,7 @@ var Mt = 1e3, Nt = class {
2835
3057
  if (e.isRowNumber || e.isRowSelection) return null;
2836
3058
  if (e.isGrouping) {
2837
3059
  if (this.grid.groupColumns.size === 1) {
2838
- let e = this.grid.groupColumns.values().next().value, t = W.findOrThrow(this.grid.columns.value.leafs, (t) => t.key === e);
3060
+ let e = this.grid.groupColumns.values().next().value, t = K.findOrThrow(this.grid.columns.value.leafs, (t) => t.key === e);
2839
3061
  return t.header ?? t.key;
2840
3062
  }
2841
3063
  return "Group";
@@ -2892,7 +3114,7 @@ var Mt = 1e3, Nt = class {
2892
3114
  return Math.max(1, this.column.leafs.length) * this.grid.MIN_COLUMN_WIDTH_PX;
2893
3115
  }
2894
3116
  get maxWidth() {
2895
- return Math.max(this.grid.containerWidth || Mt, this.width, this.minWidth);
3117
+ return Math.max(this.grid.containerWidth || Vt, this.width, this.minWidth);
2896
3118
  }
2897
3119
  get paddingStart() {
2898
3120
  if (!this.column.isRowSelection) return this.column.isEndAligned ? 10 : 3;
@@ -2964,7 +3186,7 @@ var Mt = 1e3, Nt = class {
2964
3186
  get hasGroupSection() {
2965
3187
  return this.canGroupBy || this.canUnGroupAll;
2966
3188
  }
2967
- }, Z = class e {
3189
+ }, Q = class e {
2968
3190
  def;
2969
3191
  grid;
2970
3192
  parent;
@@ -2974,16 +3196,16 @@ var Mt = 1e3, Nt = class {
2974
3196
  pin: t.pin
2975
3197
  } : r, n, this)) ?? [], this.isLeaf) {
2976
3198
  let e = this.grid.columnWidths.get(this.key);
2977
- this._inlineWidth = e ?? this.def.width ?? this.grid.DEFAULT_COLUMN_WIDTH_PX, this._pin = jt(t.pin);
3199
+ this._inlineWidth = e ?? this.def.width ?? this.grid.DEFAULT_COLUMN_WIDTH_PX, this._pin = Bt(t.pin);
2978
3200
  }
2979
3201
  }
2980
3202
  columns = [];
2981
3203
  get kind() {
2982
3204
  switch (this.key) {
2983
- case Te: return "rowNumber";
2984
- case Ee: return "rowSelection";
2985
- case De: return "rowDetail";
2986
- case G: return "grouping";
3205
+ case Ae: return "rowNumber";
3206
+ case je: return "rowSelection";
3207
+ case Me: return "rowDetail";
3208
+ case q: return "grouping";
2987
3209
  default: return "data";
2988
3210
  }
2989
3211
  }
@@ -3002,7 +3224,7 @@ var Mt = 1e3, Nt = class {
3002
3224
  get isData() {
3003
3225
  return this.kind === "data";
3004
3226
  }
3005
- pinFlags = B(() => {
3227
+ pinFlags = V(() => {
3006
3228
  let e = this.pin === "START", t = this.pin === "END";
3007
3229
  return {
3008
3230
  isStartPinned: e,
@@ -3014,7 +3236,7 @@ var Mt = 1e3, Nt = class {
3014
3236
  isLastEndPinned: t && this.endOffset === 0
3015
3237
  };
3016
3238
  }, () => [this.grid.columns]);
3017
- cellVariant = B(() => {
3239
+ cellVariant = V(() => {
3018
3240
  let { isPinned: e, isFirstStartPinned: t, isLastStartPinned: n, isFirstEndPinned: r, isLastEndPinned: i } = this.pinFlags.value;
3019
3241
  return {
3020
3242
  isPinned: e,
@@ -3029,7 +3251,7 @@ var Mt = 1e3, Nt = class {
3029
3251
  isRowDetail: this.isRowDetail
3030
3252
  };
3031
3253
  }, () => [this.pinFlags]);
3032
- cellStyleVars = B(() => {
3254
+ cellStyleVars = V(() => {
3033
3255
  let { isStartPinned: e, isEndPinned: t } = this.pinFlags.value;
3034
3256
  return {
3035
3257
  width: `var(${this.widthVarName})`,
@@ -3038,7 +3260,7 @@ var Mt = 1e3, Nt = class {
3038
3260
  insetInlineEnd: t ? `var(${this.inlineEndVarName})` : void 0
3039
3261
  };
3040
3262
  }, () => [this.pinFlags]);
3041
- _headerCell = B(() => new Nt(this));
3263
+ _headerCell = V(() => new Ht(this));
3042
3264
  get headerCell() {
3043
3265
  return this._headerCell.value;
3044
3266
  }
@@ -3199,16 +3421,16 @@ var Mt = 1e3, Nt = class {
3199
3421
  get inlineWidth() {
3200
3422
  if (this.isLeaf) return this.grid.getFlexWidth(this.key) ?? this._inlineWidth;
3201
3423
  let e = this.visibleColumns.map((e) => e.inlineWidth).filter((e) => typeof e == "number");
3202
- if (e.length !== 0) return W.sumBy(e, (e) => e);
3424
+ if (e.length !== 0) return K.sumBy(e, (e) => e);
3203
3425
  }
3204
3426
  get startOffset() {
3205
3427
  let e = 0;
3206
3428
  if (this.parent) {
3207
3429
  let { visibleColumns: t, startOffset: n } = this.parent, r = t.findIndex((e) => e === this);
3208
- e += W.sumBy(t, (e, t) => t < r ? e.inlineWidth ?? 0 : 0), e += n;
3430
+ e += K.sumBy(t, (e, t) => t < r ? e.inlineWidth ?? 0 : 0), e += n;
3209
3431
  } else {
3210
3432
  let t = this.grid.columns.value.start.filter((e) => e.isVisible), n = t.findIndex((e) => e === this);
3211
- e += W.sumBy(t, (e, t) => t < n ? e.inlineWidth ?? 0 : 0);
3433
+ e += K.sumBy(t, (e, t) => t < n ? e.inlineWidth ?? 0 : 0);
3212
3434
  }
3213
3435
  return e;
3214
3436
  }
@@ -3216,10 +3438,10 @@ var Mt = 1e3, Nt = class {
3216
3438
  let e = 0;
3217
3439
  if (this.parent) {
3218
3440
  let { visibleColumns: t } = this.parent, n = t.reverse(), r = n.findIndex((e) => e === this);
3219
- e += W.sumBy(n, (e, t) => t < r ? e.inlineWidth ?? 0 : 0), e += this.parent.endOffset;
3441
+ e += K.sumBy(n, (e, t) => t < r ? e.inlineWidth ?? 0 : 0), e += this.parent.endOffset;
3220
3442
  } else {
3221
3443
  let t = this.grid.columns.value.end.filter((e) => e.isVisible).reverse(), n = t.findIndex((e) => e === this);
3222
- e += W.sumBy(t, (e, t) => t < n ? e.inlineWidth ?? 0 : 0);
3444
+ e += K.sumBy(t, (e, t) => t < n ? e.inlineWidth ?? 0 : 0);
3223
3445
  }
3224
3446
  return e;
3225
3447
  }
@@ -3257,7 +3479,7 @@ var Mt = 1e3, Nt = class {
3257
3479
  _resizeTotalWidth = 0;
3258
3480
  beginResize = (e) => {
3259
3481
  let { MIN_COLUMN_WIDTH_PX: t } = this.grid;
3260
- this._resizeStartX = e, this._resizeSizes = W.toRecord(this.leafs, (e) => [e.key, e.inlineWidth ?? e.baseWidth]), this._resizeTotalWidth = W.sumBy(this.leafs, (e) => this._resizeSizes[e.key]) - this.leafs.length * t;
3482
+ this._resizeStartX = e, this._resizeSizes = K.toRecord(this.leafs, (e) => [e.key, e.inlineWidth ?? e.baseWidth]), this._resizeTotalWidth = K.sumBy(this.leafs, (e) => this._resizeSizes[e.key]) - this.leafs.length * t;
3261
3483
  };
3262
3484
  get resizeSign() {
3263
3485
  return this.pin === "END" === this.grid.isRtl ? 1 : -1;
@@ -3283,7 +3505,7 @@ var Mt = 1e3, Nt = class {
3283
3505
  this.moveResizer((e - t) * this.resizeSign);
3284
3506
  };
3285
3507
  pinColumn = (e) => {
3286
- this.isLeaf ? this._pin = jt(e) : this.columns.forEach((t) => t.pinColumn(e)), this.grid.pinColumn(this.uniqueKey, e);
3508
+ this.isLeaf ? this._pin = Bt(e) : this.columns.forEach((t) => t.pinColumn(e)), this.grid.pinColumn(this.uniqueKey, e);
3287
3509
  };
3288
3510
  toggleGrouping = () => {
3289
3511
  this.grid.toggleGrouping(this.key);
@@ -3298,7 +3520,7 @@ var Mt = 1e3, Nt = class {
3298
3520
  toggleVisibility = () => {
3299
3521
  this.grid.toggleColumnVisibility(this.key);
3300
3522
  };
3301
- }, Pt = class {
3523
+ }, Ut = class {
3302
3524
  grid;
3303
3525
  constructor(e) {
3304
3526
  this.grid = e;
@@ -3333,19 +3555,19 @@ var Mt = 1e3, Nt = class {
3333
3555
  };
3334
3556
  //#endregion
3335
3557
  //#region src/utils/array/lazyList.ts
3336
- function Ft(e, t) {
3558
+ function Wt(e, t) {
3337
3559
  return new Proxy([], {
3338
3560
  get(n, r, i) {
3339
3561
  if (r === "length") return e;
3340
- let a = Q(r, e);
3562
+ let a = Gt(r, e);
3341
3563
  return a === void 0 ? Reflect.get(n, r, i) : t(a);
3342
3564
  },
3343
3565
  has(t, n) {
3344
- return Q(n, e) !== void 0 || Reflect.has(t, n);
3566
+ return Gt(n, e) !== void 0 || Reflect.has(t, n);
3345
3567
  },
3346
3568
  getOwnPropertyDescriptor(n, r) {
3347
- return Q(r, e) === void 0 ? Reflect.getOwnPropertyDescriptor(n, r) : {
3348
- value: t(Q(r, e)),
3569
+ return Gt(r, e) === void 0 ? Reflect.getOwnPropertyDescriptor(n, r) : {
3570
+ value: t(Gt(r, e)),
3349
3571
  writable: !0,
3350
3572
  enumerable: !0,
3351
3573
  configurable: !0
@@ -3353,7 +3575,7 @@ function Ft(e, t) {
3353
3575
  }
3354
3576
  });
3355
3577
  }
3356
- function Q(e, t) {
3578
+ function Gt(e, t) {
3357
3579
  if (typeof e != "string") return;
3358
3580
  let n = Number(e);
3359
3581
  return Number.isInteger(n) && n >= 0 && n < t ? n : void 0;
@@ -3484,7 +3706,7 @@ var $ = class e {
3484
3706
  }), this.source.changed());
3485
3707
  });
3486
3708
  }
3487
- }, It = class extends Fe {
3709
+ }, Kt = class extends Be {
3488
3710
  level;
3489
3711
  constructor(e, t, n, r) {
3490
3712
  super(e, n, [], r, ""), this.level = t;
@@ -3506,7 +3728,7 @@ var $ = class e {
3506
3728
  return [...this.level.groupKeys, this.groupValue];
3507
3729
  }
3508
3730
  get key() {
3509
- return this.placeholder ? `${this.level.placeholderKey}-group-${this.rowIndex}` : Lt(this.groupKeys);
3731
+ return this.placeholder ? `${this.level.placeholderKey}-group-${this.rowIndex}` : qt(this.groupKeys);
3510
3732
  }
3511
3733
  get depth() {
3512
3734
  return this.level.depth;
@@ -3542,21 +3764,21 @@ var $ = class e {
3542
3764
  this.placeholder || this.grid.toggleGroupRow(this.key);
3543
3765
  }
3544
3766
  };
3545
- function Lt(e) {
3767
+ function qt(e) {
3546
3768
  return `rb-group:${$.keyOf(e)}`;
3547
3769
  }
3548
3770
  //#endregion
3549
3771
  //#region src/components/dataGrid/models/sourceRowModel.ts
3550
- var Rt = {}, zt = class extends H {
3772
+ var Jt = {}, Yt = class extends W {
3551
3773
  sourceLevel;
3552
3774
  constructor(e, t, n) {
3553
- super(e, Rt, n), this.sourceLevel = t;
3775
+ super(e, Jt, n), this.sourceLevel = t;
3554
3776
  }
3555
3777
  get row() {
3556
3778
  return this.sourceLevel.rowAt(this.rowIndex);
3557
3779
  }
3558
3780
  get data() {
3559
- return this.row ?? Rt;
3781
+ return this.row ?? Jt;
3560
3782
  }
3561
3783
  get placeholder() {
3562
3784
  return this.row === void 0;
@@ -3574,7 +3796,7 @@ var Rt = {}, zt = class extends H {
3574
3796
  get selected() {
3575
3797
  return !this.placeholder && super.selected;
3576
3798
  }
3577
- }, Bt = class extends zt {
3799
+ }, Xt = class extends Yt {
3578
3800
  isTreeRow = !0;
3579
3801
  get level() {
3580
3802
  return this.sourceLevel.depth;
@@ -3594,7 +3816,7 @@ var Rt = {}, zt = class extends H {
3594
3816
  toggleTree = () => {
3595
3817
  this.hasChildren && this.grid.tree.toggle(this.key, this.level);
3596
3818
  };
3597
- }, Vt = 100, Ht = 40, Ut = class {
3819
+ }, Zt = 100, Qt = 40, $t = class {
3598
3820
  grid;
3599
3821
  constructor(e) {
3600
3822
  this.grid = e;
@@ -3620,11 +3842,11 @@ var Rt = {}, zt = class extends H {
3620
3842
  }
3621
3843
  get blockSize() {
3622
3844
  let e = this.config?.blockSize;
3623
- return e && e > 0 ? Math.floor(e) : this.grid.isPaginated ? this.grid.pageSize : Vt;
3845
+ return e && e > 0 ? Math.floor(e) : this.grid.isPaginated ? this.grid.pageSize : Zt;
3624
3846
  }
3625
3847
  get maxBlocks() {
3626
3848
  let e = this.config?.maxBlocks;
3627
- return e && e > 0 ? Math.floor(e) : Ht;
3849
+ return e && e > 0 ? Math.floor(e) : Qt;
3628
3850
  }
3629
3851
  get queryVersion() {
3630
3852
  return this._query;
@@ -3679,7 +3901,7 @@ var Rt = {}, zt = class extends H {
3679
3901
  return e.loadedBlocks().forEach(({ index: a, rows: o }) => {
3680
3902
  o.forEach((o, s) => {
3681
3903
  let c = [...e.path, o[r]];
3682
- if (!t.has(Lt(c))) return;
3904
+ if (!t.has(qt(c))) return;
3683
3905
  let l = a * n + s;
3684
3906
  i.push({
3685
3907
  rowIndex: l,
@@ -3733,20 +3955,20 @@ var Rt = {}, zt = class extends H {
3733
3955
  listLength = -1;
3734
3956
  rowList() {
3735
3957
  let { start: e } = this.visibleRange();
3736
- return this.listLength = this.visibleLength(), Ft(this.listLength, (t) => this.rowModelAt(e + t));
3958
+ return this.listLength = this.visibleLength(), Wt(this.listLength, (t) => this.rowModelAt(e + t));
3737
3959
  }
3738
3960
  flatRowList(e) {
3739
3961
  let t = this.detailPositions();
3740
- return t.length === 0 ? e : Ft(e.length + t.length, (n) => {
3741
- let r = Gt(t, n);
3742
- return t[r] === n ? new V(this.grid, e[n - r - 1]) : e[n - r];
3962
+ return t.length === 0 ? e : Wt(e.length + t.length, (n) => {
3963
+ let r = tn(t, n);
3964
+ return t[r] === n ? new U(this.grid, e[n - r - 1]) : e[n - r];
3743
3965
  });
3744
3966
  }
3745
3967
  rowOffsets(e) {
3746
3968
  let { rowHeight: t } = this.grid, n = this.detailPositions(), r = [0];
3747
3969
  return n.forEach((t, n) => r.push(r[n] + e[t].heightForOffset)), {
3748
- offsets: Ft(e.length, (e) => {
3749
- let i = Gt(n, e);
3970
+ offsets: Wt(e.length, (e) => {
3971
+ let i = tn(n, e);
3750
3972
  return (e - i) * t + r[i];
3751
3973
  }),
3752
3974
  totalHeight: (e.length - n.length) * t + r[n.length]
@@ -3775,7 +3997,7 @@ var Rt = {}, zt = class extends H {
3775
3997
  let i = this.levels.get(r);
3776
3998
  !i || i.isGroupLevel || i.loadedBlocks().forEach(({ index: r, rows: i }) => {
3777
3999
  i.forEach((i, a) => {
3778
- let o = Wt(n, r * t + a);
4000
+ let o = en(n, r * t + a);
3779
4001
  o !== void 0 && e(o, i);
3780
4002
  });
3781
4003
  });
@@ -3783,14 +4005,14 @@ var Rt = {}, zt = class extends H {
3783
4005
  }
3784
4006
  rowModelAt(e) {
3785
4007
  let t = this.segmentAt(e);
3786
- if (!t) return new zt(this.grid, this.root, e);
4008
+ if (!t) return new Yt(this.grid, this.root, e);
3787
4009
  let { level: n } = t, r = t.levelStart + (e - t.start), i = this.models.get(n.key);
3788
4010
  i || this.models.set(n.key, i = /* @__PURE__ */ new Map());
3789
4011
  let a = i.get(r);
3790
- return a || (a = n.isGroupLevel ? new It(this.grid, n, this.groupColumnAt(n.depth), r) : this.isTree ? new Bt(this.grid, n, r) : new zt(this.grid, n, r), i.set(r, a)), a;
4012
+ return a || (a = n.isGroupLevel ? new Kt(this.grid, n, this.groupColumnAt(n.depth), r) : this.isTree ? new Xt(this.grid, n, r) : new Yt(this.grid, n, r), i.set(r, a)), a;
3791
4013
  }
3792
4014
  groupColumnAt(e) {
3793
- return W.findOrThrow(this.grid.columns.value.leafs, (t) => t.key === this.groupBy[e]);
4015
+ return K.findOrThrow(this.grid.columns.value.leafs, (t) => t.key === this.groupBy[e]);
3794
4016
  }
3795
4017
  visibleLength() {
3796
4018
  let { start: e, end: t } = this.visibleRange();
@@ -3876,10 +4098,10 @@ var Rt = {}, zt = class extends H {
3876
4098
  this._segments = void 0, this._byLevel = void 0, this.listLength !== this.visibleLength() && this.grid.rows.clear(), this.grid.flatRows.clear(), this.grid.notify();
3877
4099
  }
3878
4100
  };
3879
- function Wt(e, t) {
4101
+ function en(e, t) {
3880
4102
  for (let n of e) if (t >= n.levelStart && t < n.levelStart + n.length) return n.start + (t - n.levelStart);
3881
4103
  }
3882
- function Gt(e, t) {
4104
+ function tn(e, t) {
3883
4105
  let n = 0, r = e.length;
3884
4106
  for (; n < r;) {
3885
4107
  let i = n + r >>> 1;
@@ -3889,7 +4111,7 @@ function Gt(e, t) {
3889
4111
  }
3890
4112
  //#endregion
3891
4113
  //#region src/components/dataGrid/models/exportModel.ts
3892
- var Kt = 7, qt = class {
4114
+ var nn = 7, rn = class {
3893
4115
  grid;
3894
4116
  constructor(e) {
3895
4117
  this.grid = e;
@@ -3903,7 +4125,7 @@ var Kt = 7, qt = class {
3903
4125
  }
3904
4126
  width(e) {
3905
4127
  let t = e.inlineWidth ?? this.grid.DEFAULT_COLUMN_WIDTH_PX;
3906
- return Math.min(80, Math.max(6, Math.round(t / Kt * 10) / 10));
4128
+ return Math.min(80, Math.max(6, Math.round(t / nn * 10) / 10));
3907
4129
  }
3908
4130
  value(e, t) {
3909
4131
  let { exportValue: n } = e.def, r = n ? n(t) : t[e.key];
@@ -3911,7 +4133,7 @@ var Kt = 7, qt = class {
3911
4133
  }
3912
4134
  aggregateOf(e, t) {
3913
4135
  let n = e.aggregate;
3914
- return n ? je(n, t.map((t) => this.value(e, t)), t) : null;
4136
+ return n ? Ie(n, t.map((t) => this.value(e, t)), t) : null;
3915
4137
  }
3916
4138
  table(e = {}) {
3917
4139
  let t = this.columns(e.columns), n = e.groups ?? !0, r = [], i = (e, a, o) => {
@@ -3926,7 +4148,7 @@ var Kt = 7, qt = class {
3926
4148
  }), i(s.rows, n ? a + 1 : a, o || n && e);
3927
4149
  } else {
3928
4150
  if (s.placeholder) continue;
3929
- let e = U(s) ? s.level : a;
4151
+ let e = G(s) ? s.level : a;
3930
4152
  r.push({
3931
4153
  kind: "data",
3932
4154
  level: e,
@@ -3975,7 +4197,7 @@ var Kt = 7, qt = class {
3975
4197
  let { title: t } = this.grid.props.def, n = typeof t == "string" && t.trim() ? t.trim() : "export";
3976
4198
  return e.fileName?.trim() || n;
3977
4199
  }
3978
- }, Jt = class {
4200
+ }, an = class {
3979
4201
  grid;
3980
4202
  constructor(e) {
3981
4203
  this.grid = e;
@@ -3997,7 +4219,7 @@ var Kt = 7, qt = class {
3997
4219
  }
3998
4220
  setGlobalFilter = (e) => this.grid.setGlobalFilter(e);
3999
4221
  clearAllFilters = () => this.grid.clearAllFilters();
4000
- }, Yt = class {
4222
+ }, on = class {
4001
4223
  grid;
4002
4224
  constructor(e) {
4003
4225
  this.grid = e;
@@ -4053,7 +4275,140 @@ var Kt = 7, qt = class {
4053
4275
  let t = parseInt(e, 10);
4054
4276
  isNaN(t) || this.grid.changePage(Math.max(1, Math.min(t, this.totalPages)));
4055
4277
  };
4056
- }, Xt = class extends H {
4278
+ }, sn = /["\t\r\n]/;
4279
+ function cn(e) {
4280
+ if (e == null) return "";
4281
+ let t = e instanceof Date ? e.toISOString() : String(e);
4282
+ return sn.test(t) ? `"${t.split("\"").join("\"\"")}"` : t;
4283
+ }
4284
+ function ln(e) {
4285
+ return e.map((e) => e.map(cn).join(" ")).join("\r\n");
4286
+ }
4287
+ function un(e) {
4288
+ let t = [], n = [], r = "", i = !1;
4289
+ for (let a = 0; a < e.length; a++) {
4290
+ let o = e[a];
4291
+ i ? o === "\"" && e[a + 1] === "\"" ? (r += "\"", a++) : o === "\"" ? i = !1 : r += o : o === "\"" && r === "" ? i = !0 : o === " " ? (n.push(r), r = "") : o === "\r" || o === "\n" ? (o === "\r" && e[a + 1] === "\n" && a++, n.push(r), t.push(n), n = [], r = "") : r += o;
4292
+ }
4293
+ return (r !== "" || n.length > 0) && (n.push(r), t.push(n)), t;
4294
+ }
4295
+ function dn(e, t) {
4296
+ return e?.row === t?.row && e?.column === t?.column;
4297
+ }
4298
+ var fn = class {
4299
+ grid;
4300
+ constructor(e) {
4301
+ this.grid = e;
4302
+ }
4303
+ _anchor;
4304
+ _focus;
4305
+ _dragging = !1;
4306
+ get enabled() {
4307
+ return !!this.grid.props.def.rangeSelection;
4308
+ }
4309
+ get current() {
4310
+ return this._focus;
4311
+ }
4312
+ get isDragging() {
4313
+ return this._dragging;
4314
+ }
4315
+ get bounds() {
4316
+ let e = this._anchor, t = this._focus;
4317
+ if (!(!e || !t)) return {
4318
+ startRow: Math.min(e.row, t.row),
4319
+ endRow: Math.max(e.row, t.row),
4320
+ startColumn: Math.min(e.column, t.column),
4321
+ endColumn: Math.max(e.column, t.column)
4322
+ };
4323
+ }
4324
+ get hasSelection() {
4325
+ let e = this.bounds;
4326
+ return !!e && (e.startRow !== e.endRow || e.startColumn !== e.endColumn);
4327
+ }
4328
+ isCurrent(e, t) {
4329
+ return this._focus?.row === e && this._focus.column === t;
4330
+ }
4331
+ isSelected(e, t) {
4332
+ let n = this.bounds;
4333
+ return !n || !this.hasSelection ? !1 : e >= n.startRow && e <= n.endRow && t >= n.startColumn && t <= n.endColumn;
4334
+ }
4335
+ setCurrent(e, t, n = !1) {
4336
+ let r = {
4337
+ row: e,
4338
+ column: t
4339
+ }, i = n && this._anchor ? this._anchor : r;
4340
+ dn(this._focus, r) && dn(this._anchor, i) || (this._anchor = i, this._focus = r, this.grid.notify(), this.emit(n ? "extend" : "select"));
4341
+ }
4342
+ syncCurrent(e, t) {
4343
+ this.isCurrent(e, t) || this.setCurrent(e, t);
4344
+ }
4345
+ clear() {
4346
+ !this._focus && !this._anchor || (this._anchor = void 0, this._focus = void 0, this._dragging = !1, this.grid.notify(), this.emit("clear"));
4347
+ }
4348
+ press(e, t, n) {
4349
+ this.setCurrent(e, t, n), n || (this._dragging = !0);
4350
+ }
4351
+ dragTo(e, t) {
4352
+ this._dragging && this.setCurrent(e, t, !0);
4353
+ }
4354
+ endDrag = () => {
4355
+ this._dragging && (this._dragging = !1, this.grid.notify());
4356
+ };
4357
+ columnsOf(e = this.bounds) {
4358
+ return e ? this.grid.columns.value.visibleLeafs.slice(e.startColumn, e.endColumn + 1) : [];
4359
+ }
4360
+ valueOf(e, t) {
4361
+ return e.isRowNumber ? t.rowIndex + 1 : e.isData ? this.grid.exporter.value(e, t.data) : null;
4362
+ }
4363
+ values(e = this.bounds) {
4364
+ if (!e) return [];
4365
+ let t = this.columnsOf(e), n = this.grid.flatRows.value, r = [];
4366
+ for (let i = e.startRow; i <= e.endRow; i++) {
4367
+ let e = n[i];
4368
+ e?.kind === "group" ? r.push(t.map((t) => t.key === "grouping-cell" || t.key === e.groupColumn.key ? e.groupValue : null)) : e?.kind === "row" && !e.placeholder ? r.push(t.map((t) => this.valueOf(t, e))) : r.push(t.map(() => null));
4369
+ }
4370
+ return r;
4371
+ }
4372
+ rangeOf(e) {
4373
+ let t = this.columnsOf(e).map((e) => e.key);
4374
+ return {
4375
+ startRow: e.startRow,
4376
+ endRow: e.endRow,
4377
+ columns: t,
4378
+ values: () => this.values(e)
4379
+ };
4380
+ }
4381
+ get range() {
4382
+ let e = this.bounds;
4383
+ return e && this.rangeOf(e);
4384
+ }
4385
+ emit(e) {
4386
+ this.grid.props.onRangeChange?.(this.range, { reason: e });
4387
+ }
4388
+ onCopy = (e) => {
4389
+ if (!this._focus || !e.clipboardData) return;
4390
+ let t = e.currentTarget.ownerDocument.defaultView?.getSelection();
4391
+ t && !t.isCollapsed || (e.clipboardData.setData("text/plain", ln(this.values())), e.preventDefault());
4392
+ };
4393
+ pasteBounds(e, t) {
4394
+ let n = this.bounds;
4395
+ if (!n || e === 0 || t === 0) return;
4396
+ let r = this.grid.flatRows.value.length - 1, i = this.grid.columns.value.visibleLeafs.length - 1;
4397
+ return {
4398
+ startRow: n.startRow,
4399
+ endRow: Math.min(r, n.startRow + Math.max(n.endRow - n.startRow + 1, e) - 1),
4400
+ startColumn: n.startColumn,
4401
+ endColumn: Math.min(i, n.startColumn + Math.max(n.endColumn - n.startColumn + 1, t) - 1)
4402
+ };
4403
+ }
4404
+ onPaste = (e) => {
4405
+ if (!this._focus || !e.clipboardData || this.grid.edits.isOpen || !this.grid.edits.enabled) return;
4406
+ let t = e.clipboardData.getData("text/plain");
4407
+ if (!t) return;
4408
+ let n = un(t), r = n.reduce((e, t) => Math.max(e, t.length), 0), i = this.pasteBounds(n.length, r);
4409
+ i && (e.preventDefault(), this.grid.edits.paste(i, (e, t) => n[e % n.length][t % r] ?? ""));
4410
+ };
4411
+ }, pn = class extends W {
4057
4412
  node;
4058
4413
  level;
4059
4414
  position;
@@ -4073,7 +4428,7 @@ var Kt = 7, qt = class {
4073
4428
  toggleTree = () => {
4074
4429
  this.grid.tree.toggle(this.key, this.level);
4075
4430
  };
4076
- _subtreeKeys = B(() => {
4431
+ _subtreeKeys = V(() => {
4077
4432
  let e = [], t = (n) => {
4078
4433
  n.forEach((n) => {
4079
4434
  e.push(this.grid.getRowKey(n.data)), t(n.children);
@@ -4104,10 +4459,10 @@ var Kt = 7, qt = class {
4104
4459
  };
4105
4460
  //#endregion
4106
4461
  //#region src/components/dataGrid/models/treeModel.ts
4107
- function Zt(e) {
4462
+ function mn(e) {
4108
4463
  return JSON.stringify(e);
4109
4464
  }
4110
- var Qt = class {
4465
+ var hn = class {
4111
4466
  grid;
4112
4467
  constructor(e) {
4113
4468
  this.grid = e;
@@ -4161,9 +4516,9 @@ var Qt = class {
4161
4516
  data: e,
4162
4517
  children: []
4163
4518
  };
4164
- n.set(Zt(r), i);
4519
+ n.set(mn(r), i);
4165
4520
  let a;
4166
- for (let e = r.length - 1; e > 0 && !a; e--) a = n.get(Zt(r.slice(0, e)));
4521
+ for (let e = r.length - 1; e > 0 && !a; e--) a = n.get(mn(r.slice(0, e)));
4167
4522
  (a ? a.children : t).push(i);
4168
4523
  }), t;
4169
4524
  }
@@ -4179,17 +4534,17 @@ var Qt = class {
4179
4534
  }
4180
4535
  sortNodes(e) {
4181
4536
  let { sortColumn: t, sortDirection: n } = this.grid;
4182
- return t === void 0 ? e : W.sortBy(e, (e) => e.data[t], n).map((e) => ({
4537
+ return t === void 0 ? e : K.sortBy(e, (e) => e.data[t], n).map((e) => ({
4183
4538
  data: e.data,
4184
4539
  children: this.sortNodes(e.children)
4185
4540
  }));
4186
4541
  }
4187
- nodes = B(() => {
4542
+ nodes = V(() => {
4188
4543
  if (!this.isEager) return [];
4189
4544
  let e = this.isFlat ? this.buildFlat(this.grid.data) : this.buildNested(this.grid.data);
4190
4545
  return this.sortNodes(this.grid.hasRowFilters ? this.prune(e) : e);
4191
4546
  });
4192
- allRows = B(() => {
4547
+ allRows = V(() => {
4193
4548
  let e = [], t = (n) => {
4194
4549
  n.forEach((n) => {
4195
4550
  e.push(n.data), t(n.children);
@@ -4209,7 +4564,7 @@ var Qt = class {
4209
4564
  }
4210
4565
  rowList() {
4211
4566
  let e = 0, t = (n, r, i) => n.map((a, o) => {
4212
- let s = new Xt(this.grid, a, e++, r, o, n.length, i);
4567
+ let s = new pn(this.grid, a, e++, r, o, n.length, i);
4213
4568
  return s.treeExpanded && (s.children = t(a.children, r + 1, s)), s;
4214
4569
  });
4215
4570
  return t(this.nodes.value, 0);
@@ -4251,72 +4606,7 @@ var Qt = class {
4251
4606
  let n = !this.isExpanded(e, t);
4252
4607
  n ? (this._opened.add(e), this._closed.delete(e)) : (this._closed.add(e), this._opened.delete(e)), this.grid.treeExpansionChanged(), this.grid.props.onExpandedTreeKeysChange?.(this.expandedKeys(), { reason: n ? "expand" : "collapse" }), this.grid.notify();
4253
4608
  };
4254
- }, $t = class e {
4255
- grid;
4256
- static DEFAULT_VISIBLE_ROWS_COUNT = 10;
4257
- static ROWS_TO_PRELOAD = 20;
4258
- constructor(e) {
4259
- this.grid = e;
4260
- }
4261
- get showAll() {
4262
- return this.grid.props.def.visibleRowsCount === "all";
4263
- }
4264
- get hasDetailRows() {
4265
- return !!this.grid.props.def.rowDetail;
4266
- }
4267
- get isEmpty() {
4268
- return this.grid.source.enabled ? this.grid.flatRows.value.length === 0 : this.grid.data.length === 0;
4269
- }
4270
- get visibleRowsCount() {
4271
- if (this.showAll) return this.grid.flatRows.value.length;
4272
- let t = this.grid.props.def.visibleRowsCount;
4273
- return typeof t == "number" ? t : e.DEFAULT_VISIBLE_ROWS_COUNT;
4274
- }
4275
- get pageRows() {
4276
- let t = this.grid.props.def.visibleRowsCount;
4277
- return typeof t == "number" ? t : e.DEFAULT_VISIBLE_ROWS_COUNT;
4278
- }
4279
- get viewHeight() {
4280
- if (this.showAll) return;
4281
- let { rowHeight: e } = this.grid;
4282
- return e * this.visibleRowsCount + e / 5;
4283
- }
4284
- get totalHeight() {
4285
- return this.hasDetailRows ? this.grid.rowOffsets.value.totalHeight : this.grid.flatRows.value.length * this.grid.rowHeight;
4286
- }
4287
- get emptyHeight() {
4288
- return this.viewHeight ?? this.grid.rowHeight * e.DEFAULT_VISIBLE_ROWS_COUNT;
4289
- }
4290
- rowTop(e) {
4291
- return this.hasDetailRows ? this.grid.rowOffsets.value.offsets[e] ?? 0 : e * this.grid.rowHeight;
4292
- }
4293
- findStartIndex(e, t) {
4294
- let n = 0, r = e.length - 1;
4295
- for (; n < r;) {
4296
- let i = n + r + 1 >>> 1;
4297
- e[i] <= t ? n = i : r = i - 1;
4298
- }
4299
- return n;
4300
- }
4301
- window(t) {
4302
- let n = this.grid.flatRows.value.length;
4303
- if (this.showAll) return {
4304
- startIndex: 0,
4305
- take: n,
4306
- translateY: 0,
4307
- totalHeight: this.totalHeight,
4308
- viewHeight: void 0
4309
- };
4310
- let { rowHeight: r } = this.grid, i = e.ROWS_TO_PRELOAD, { offsets: a } = this.grid.rowOffsets.value, o = this.hasDetailRows ? Math.max(0, this.findStartIndex(a, t) - i) : Math.max(0, Math.floor(t / r) - i), s = this.hasDetailRows ? a[o] ?? 0 : o * r;
4311
- return {
4312
- startIndex: o,
4313
- take: this.visibleRowsCount + i * 2,
4314
- translateY: s,
4315
- totalHeight: this.totalHeight,
4316
- viewHeight: this.viewHeight
4317
- };
4318
- }
4319
- }, en = {}, tn = class {
4609
+ }, gn = {}, _n = class {
4320
4610
  props;
4321
4611
  constructor(e, t) {
4322
4612
  this.props = e, t && this.listeners.add(t);
@@ -4357,22 +4647,22 @@ var Qt = class {
4357
4647
  get resizeMode() {
4358
4648
  return this.props.def.resizeMode ?? "smooth";
4359
4649
  }
4360
- sourceColumns = B(() => {
4650
+ sourceColumns = V(() => {
4361
4651
  let { def: e } = this.props, t = [];
4362
- if (this.groupColumns.size > 0 && t.push(new Z({ key: G }, this)), t.push(...e.columns.map((e) => new Z(e, this))), e.rowSelection) {
4652
+ if (this.groupColumns.size > 0 && t.push(new Q({ key: q }, this)), t.push(...e.columns.map((e) => new Q(e, this))), e.rowSelection) {
4363
4653
  let n = typeof e.rowSelection == "object" && e.rowSelection.pinned ? "START" : void 0;
4364
- t.unshift(new Z({
4365
- key: Ee,
4654
+ t.unshift(new Q({
4655
+ key: je,
4366
4656
  pin: n,
4367
4657
  width: 50,
4368
4658
  align: "center",
4369
- Cell: At
4659
+ Cell: zt
4370
4660
  }, this));
4371
4661
  }
4372
4662
  if (e.showRowNumber) {
4373
4663
  let n, r = 70;
4374
- typeof e.showRowNumber == "object" && (e.showRowNumber.pinned && (n = "START"), r = e.showRowNumber.width ?? 70), t.unshift(new Z({
4375
- key: Te,
4664
+ typeof e.showRowNumber == "object" && (e.showRowNumber.pinned && (n = "START"), r = e.showRowNumber.width ?? 70), t.unshift(new Q({
4665
+ key: Ae,
4376
4666
  pin: n,
4377
4667
  width: r,
4378
4668
  align: "end"
@@ -4380,18 +4670,18 @@ var Qt = class {
4380
4670
  }
4381
4671
  if (e.rowDetail) {
4382
4672
  let n = e.rowDetail.pinned ? "START" : void 0, r = e.rowDetail.expandColumnWidth ?? 50, i = e.rowDetail.expandColumnHeader ?? "";
4383
- t.unshift(new Z({
4384
- key: De,
4673
+ t.unshift(new Q({
4674
+ key: Me,
4385
4675
  header: i,
4386
4676
  pin: n,
4387
4677
  width: r,
4388
4678
  align: "center",
4389
- Cell: kt
4679
+ Cell: Rt
4390
4680
  }, this));
4391
4681
  }
4392
4682
  return t;
4393
4683
  });
4394
- columns = B(() => {
4684
+ columns = V(() => {
4395
4685
  let e = this.sourceColumns.value.map((e) => e.getPinnedColumn("START")).filter((e) => !!e), t = this.sourceColumns.value.map((e) => e.getPinnedColumn()).filter((e) => !!e), n = this.sourceColumns.value.map((e) => e.getPinnedColumn("END")).filter((e) => !!e), r = [
4396
4686
  ...e,
4397
4687
  ...t,
@@ -4405,24 +4695,24 @@ var Qt = class {
4405
4695
  leafs: i,
4406
4696
  visibleLeafs: a,
4407
4697
  userVisibleLeafs: a.filter((e) => ![
4408
- Te,
4409
- Ee,
4410
- G,
4411
- De
4698
+ Ae,
4699
+ je,
4700
+ q,
4701
+ Me
4412
4702
  ].includes(e.key)),
4413
- maxDeath: W.maxBy(r, (e) => e.death) + 1
4703
+ maxDeath: K.maxBy(r, (e) => e.death) + 1
4414
4704
  };
4415
4705
  }, () => [this.sourceColumns]);
4416
- headerRows = B(() => W.sortBy(W.groupBy(this.columns.value.flat, (e) => e.death), (e) => e.key).map((e) => {
4417
- let t = W.toRecord(W.groupBy(e.values, (e) => e.pin ?? "NO_PIN"), (e) => [e.key, e.values]);
4706
+ headerRows = V(() => K.sortBy(K.groupBy(this.columns.value.flat, (e) => e.death), (e) => e.key).map((e) => {
4707
+ let t = K.toRecord(K.groupBy(e.values, (e) => e.pin ?? "NO_PIN"), (e) => [e.key, e.values]);
4418
4708
  return [
4419
4709
  ...t.START?.filter((e) => e.isVisible) ?? [],
4420
4710
  ...t.NO_PIN?.filter((e) => e.isVisible) ?? [],
4421
4711
  ...t.END?.filter((e) => e.isVisible) ?? []
4422
4712
  ];
4423
4713
  }), () => [this.columns]);
4424
- gridTemplateColumns = B(() => {
4425
- let { visibleLeafs: e } = this.columns.value, t = W.sumBy(e, (e) => +(e.pin === "END")), n = e.length - t;
4714
+ gridTemplateColumns = V(() => {
4715
+ let { visibleLeafs: e } = this.columns.value, t = K.sumBy(e, (e) => +(e.pin === "END")), n = e.length - t;
4426
4716
  return `${n > 0 ? `repeat(${n}, max-content)` : ""} ${t > 0 ? `repeat(${t}, max-content)` : ""}`.trim();
4427
4717
  }, () => [this.columns]);
4428
4718
  _globalFilterValue = "";
@@ -4433,7 +4723,7 @@ var Qt = class {
4433
4723
  get columnFilters() {
4434
4724
  return this.props.columnFilters ?? this._columnFilters;
4435
4725
  }
4436
- globalFilterColumns = B(() => this.props.def.globalFilterKeys ?? this.columns.value.leafs.filter((e) => e.key !== "row-number-cell" && e.key !== "row-selection-cell" && e.key !== "grouping-cell" && e.key !== "row-detail-cell").map((e) => e.key), () => [this.columns]);
4726
+ globalFilterColumns = V(() => this.props.def.globalFilterKeys ?? this.columns.value.leafs.filter((e) => e.key !== "row-number-cell" && e.key !== "row-selection-cell" && e.key !== "grouping-cell" && e.key !== "row-detail-cell").map((e) => e.key), () => [this.columns]);
4437
4727
  rowMatchesFilters(e) {
4438
4728
  let { filters: t } = this.props;
4439
4729
  return t && !t.every((t) => t(e)) || this.props.def.globalFilter && !this.matchesGlobalFilter(e) ? !1 : this.matchesColumnFilters(e);
@@ -4445,7 +4735,7 @@ var Qt = class {
4445
4735
  let t = this.globalFilterValue.trim();
4446
4736
  return !t || this.globalFilterColumns.value.some((n) => {
4447
4737
  let r = e[n];
4448
- return r != null && Ot(t, String(r));
4738
+ return r != null && Lt(t, String(r));
4449
4739
  });
4450
4740
  }
4451
4741
  matchesColumnFilters(e) {
@@ -4457,7 +4747,7 @@ var Qt = class {
4457
4747
  }
4458
4748
  matchesFilter(e, t) {
4459
4749
  switch (t.type) {
4460
- case "text": return !t.value.trim() || e != null && Ot(t.value, String(e));
4750
+ case "text": return !t.value.trim() || e != null && Lt(t.value, String(e));
4461
4751
  case "number": {
4462
4752
  if (e == null) return !1;
4463
4753
  let n = typeof e == "number" ? e : parseFloat(String(e));
@@ -4549,50 +4839,50 @@ var Qt = class {
4549
4839
  get totalRowCount() {
4550
4840
  return this.source.enabled ? this.source.rowCount : this.tree.isEager ? this.tree.everyRow().length : this.props.def.pagination?.totalCount ?? this.data.length;
4551
4841
  }
4552
- rows = B(() => {
4842
+ rows = V(() => {
4553
4843
  if (this.source.enabled) return this.source.rowList();
4554
4844
  if (this.tree.isEager) return this.tree.rowList();
4555
4845
  let e = this.filteredData;
4556
- if (this._sortColumn && !this.isPaginated && (e = W.sortBy(e, (e) => e[this._sortColumn], this._sortDirection)), this.groupColumns.size > 0) {
4846
+ if (this._sortColumn && !this.isPaginated && (e = K.sortBy(e, (e) => e[this._sortColumn], this._sortDirection)), this.groupColumns.size > 0) {
4557
4847
  let t = (e, n, r) => {
4558
4848
  let i = n.values().next().value;
4559
4849
  n.delete(i);
4560
- let a = W.findOrThrow(this.columns.value.leafs, (e) => e.key === i);
4561
- return this._sortColumn === "grouping-cell" && (e = W.sortBy(e, (e) => e[i], this._sortDirection)), W.groupBy(e, (e) => e[i]).map((e) => {
4850
+ let a = K.findOrThrow(this.columns.value.leafs, (e) => e.key === i);
4851
+ return this._sortColumn === "grouping-cell" && (e = K.sortBy(e, (e) => e[i], this._sortDirection)), K.groupBy(e, (e) => e[i]).map((e) => {
4562
4852
  let i;
4563
- i = n.size > 0 ? t(e.values, new Set(n), r + 1) : e.values.map((e, t) => new H(this, e, r + 1 + t));
4564
- let o = new Fe(this, a, i, r, e.key);
4853
+ i = n.size > 0 ? t(e.values, new Set(n), r + 1) : e.values.map((e, t) => new W(this, e, r + 1 + t));
4854
+ let o = new Be(this, a, i, r, e.key);
4565
4855
  return r += 1, o.expanded && (r += i.length), o;
4566
4856
  });
4567
4857
  };
4568
4858
  return t(e, new Set(this.groupColumns), 0);
4569
4859
  }
4570
- return e.map((e, t) => new H(this, e, t));
4860
+ return e.map((e, t) => new W(this, e, t));
4571
4861
  }, () => [this.columns]);
4572
- groupingSpan = B(() => {
4862
+ groupingSpan = V(() => {
4573
4863
  let { visibleLeafs: e } = this.columns.value, t = e.findIndex((e) => e.isGrouping);
4574
4864
  if (t === -1) return [];
4575
4865
  let n = (n, r) => r > t && n.pin === e[t].pin && !n.isRowNumber && !n.isRowSelection && !n.isRowDetail, r = e.findIndex((e, t) => n(e, t) && !!e.aggregate), i = r === -1 ? e.length : r;
4576
4866
  return [e[t], ...e.filter((e, t) => t < i && n(e, t))];
4577
4867
  }, () => [this.columns]);
4578
- flatRows = B(() => this.source.enabled ? this.source.flatRowList(this.rows.value) : this.rows.value.flatMap((e) => e.flatRows), () => [this.rows]);
4868
+ flatRows = V(() => this.source.enabled ? this.source.flatRowList(this.rows.value) : this.rows.value.flatMap((e) => e.flatRows), () => [this.rows]);
4579
4869
  get rowHeight() {
4580
4870
  return this.props.def.rowHeight ?? this.DEFAULT_ROW_HEIGHT_PX;
4581
4871
  }
4582
- sizes = B(() => {
4872
+ sizes = V(() => {
4583
4873
  let e = this.columns.value.flat.reduce((e, t) => {
4584
4874
  let { inlineWidth: n } = t;
4585
4875
  return typeof n == "number" && (e[t.widthVarName] = `${t.inlineWidth}px`), t.pin === "START" && (e[t.inlineStartVarName] = `${t.startOffset}px`), t.pin === "END" && (e[t.inlineEndVarName] = `${t.endOffset}px`), e;
4586
4876
  }, {});
4587
4877
  e[this.rowHeightVarName] = `${this.rowHeight}px`, e[this.inlineStartEdgeVarName] = `${this.inlineStartEdge}px`, this._containerWidth > 0 && (e[this.viewportWidthVarName] = `${this._containerWidth}px`);
4588
- let { visibleLeafs: t } = this.columns.value, n = t.find((e) => e.key === G);
4878
+ let { visibleLeafs: t } = this.columns.value, n = t.find((e) => e.key === q);
4589
4879
  if (n) {
4590
- let t = W.sumBy(this.groupingSpan.value, (e) => e.inlineWidth ?? 0);
4880
+ let t = K.sumBy(this.groupingSpan.value, (e) => e.inlineWidth ?? 0);
4591
4881
  e[n.groupColumnWidthVarName] = `${t}px`;
4592
4882
  }
4593
4883
  return this.groupColumns.forEach((n) => {
4594
- let r = W.findOrThrow(this.columns.value.leafs, (e) => e.key === n);
4595
- e[r.groupColumnWidthVarName] = `${W.sumBy(t, (e) => e.pin === r.pin ? e.inlineWidth ?? 0 : 0)}px`;
4884
+ let r = K.findOrThrow(this.columns.value.leafs, (e) => e.key === n);
4885
+ e[r.groupColumnWidthVarName] = `${K.sumBy(t, (e) => e.pin === r.pin ? e.inlineWidth ?? 0 : 0)}px`;
4596
4886
  }), e;
4597
4887
  }, () => [this.columns, this.flexWidths]);
4598
4888
  _containerWidth = 0;
@@ -4612,11 +4902,11 @@ var Qt = class {
4612
4902
  setContainerWidth = (e) => {
4613
4903
  this._containerWidth !== e && (this._containerWidth = e, this.flexWidths.clear(), this.notify());
4614
4904
  };
4615
- flexWidths = B(() => {
4905
+ flexWidths = V(() => {
4616
4906
  let e = this._containerWidth;
4617
4907
  if (e <= 0) return {};
4618
- let t = this.columns.value.visibleLeafs, n = (e) => !e.isFlexible || this.columnWidths.has(e.key), r = W.sumBy(t.filter(n), (e) => e.baseWidth), i = t.filter((e) => !n(e)), a = W.sumBy(i, (e) => e.baseWidth), o = e - r;
4619
- if (o <= a) return W.toRecord(i, (e) => [e.key, e.baseWidth]);
4908
+ let t = this.columns.value.visibleLeafs, n = (e) => !e.isFlexible || this.columnWidths.has(e.key), r = K.sumBy(t.filter(n), (e) => e.baseWidth), i = t.filter((e) => !n(e)), a = K.sumBy(i, (e) => e.baseWidth), o = e - r;
4909
+ if (o <= a) return K.toRecord(i, (e) => [e.key, e.baseWidth]);
4620
4910
  let s = {}, c = 0;
4621
4911
  return i.forEach((e, t) => {
4622
4912
  if (t === i.length - 1) s[e.key] = o - c;
@@ -4689,30 +4979,31 @@ var Qt = class {
4689
4979
  pageSize: e
4690
4980
  }), this.source.invalidate(), this.tree.nodes.clear(), this.rows.clear(), this.notify());
4691
4981
  };
4692
- rowOffsets = B(() => {
4982
+ rowOffsets = V(() => {
4693
4983
  if (this.source.enabled) return this.source.rowOffsets(this.flatRows.value);
4694
4984
  let e = [], t = 0;
4695
- for (let n of this.flatRows.value) e.push(t), t += n instanceof V ? n.heightForOffset : this.rowHeight;
4985
+ for (let n of this.flatRows.value) e.push(t), t += n instanceof U ? n.heightForOffset : this.rowHeight;
4696
4986
  return {
4697
4987
  offsets: e,
4698
4988
  totalHeight: t
4699
4989
  };
4700
4990
  }, () => [this.flatRows]);
4701
- viewport = new $t(this);
4702
- columnVisibility = new Pt(this);
4703
- filter = new Jt(this);
4704
- pagination = new Yt(this);
4705
- aggregation = new Me(this);
4706
- exporter = new qt(this);
4707
- source = new Ut(this);
4708
- tree = new Qt(this);
4709
- edits = new ge(this);
4991
+ viewport = new de(this);
4992
+ columnVisibility = new Ut(this);
4993
+ filter = new an(this);
4994
+ pagination = new on(this);
4995
+ aggregation = new Le(this);
4996
+ exporter = new rn(this);
4997
+ source = new $t(this);
4998
+ tree = new hn(this);
4999
+ edits = new Se(this);
5000
+ range = new fn(this);
4710
5001
  refresh = () => {
4711
5002
  this.edits.clearEdits(), this.source.invalidate();
4712
5003
  };
4713
5004
  get exportConfig() {
4714
5005
  let e = this.props.def.export;
4715
- if (e) return typeof e == "object" ? e : en;
5006
+ if (e) return typeof e == "object" ? e : gn;
4716
5007
  }
4717
5008
  exportCsv = async (e = {}) => {
4718
5009
  let { downloadCsv: t } = await import("../gridExport.mjs");
@@ -4742,14 +5033,14 @@ var Qt = class {
4742
5033
  return e === 0 ? "No rows selected" : `${e} of ${this.totalRowCount} rows selected`;
4743
5034
  }
4744
5035
  get groupedColumns() {
4745
- return Array.from(this.groupColumns, (e) => W.findOrThrow(this.columns.value.leafs, (t) => t.key === e));
5036
+ return Array.from(this.groupColumns, (e) => K.findOrThrow(this.columns.value.leafs, (t) => t.key === e));
4746
5037
  }
4747
5038
  selectedRows = /* @__PURE__ */ new Set();
4748
5039
  get inlineStartEdge() {
4749
- return W.sumBy(this.columns.value.start, (e) => e.inlineWidth ?? 0);
5040
+ return K.sumBy(this.columns.value.start, (e) => e.inlineWidth ?? 0);
4750
5041
  }
4751
5042
  get inlineEndEdge() {
4752
- return W.sumBy(this.columns.value.end, (e) => e.inlineWidth ?? 0);
5043
+ return K.sumBy(this.columns.value.end, (e) => e.inlineWidth ?? 0);
4753
5044
  }
4754
5045
  inlineStartEdgeVarName = "--inline-start-edge";
4755
5046
  rowHeightVarName = "--row-height";
@@ -4780,7 +5071,7 @@ var Qt = class {
4780
5071
  }), this.source.invalidate(), this.tree.nodes.clear(), this.rows.clear(), this.notify();
4781
5072
  };
4782
5073
  pinColumn = (e, t) => {
4783
- let n = jt(t), r = W.findOrThrow(this.columns.value.flat, (t) => t.uniqueKey === e);
5074
+ let n = Bt(t), r = K.findOrThrow(this.columns.value.flat, (t) => t.uniqueKey === e);
4784
5075
  r.pin !== n && r.pinColumn(n), this.columns.clear(), this.notify();
4785
5076
  };
4786
5077
  toggleGrouping = (e) => {
@@ -4860,15 +5151,15 @@ var Qt = class {
4860
5151
  };
4861
5152
  //#endregion
4862
5153
  //#region src/components/dataGrid/useGrid.ts
4863
- function nn(e) {
4864
- let [t] = A(() => new tn(e)), n = s("datagrid");
4865
- return t.setProps(e), t.setIdentifier(n), P(t.subscribe, t.getSnapshot, t.getSnapshot), t;
5154
+ function vn(e) {
5155
+ let [t] = M(() => new _n(e)), n = s("datagrid");
5156
+ return t.setProps(e), t.setIdentifier(n), te(t.subscribe, t.getSnapshot, t.getSnapshot), t;
4866
5157
  }
4867
5158
  //#endregion
4868
5159
  //#region src/components/dataGrid.tsx
4869
- function rn(e, t) {
4870
- let n = nn(e), i = k(null);
4871
- ee(t, () => ({
5160
+ function yn(e, t) {
5161
+ let n = vn(e), i = j(null);
5162
+ k(t, () => ({
4872
5163
  get element() {
4873
5164
  return i.current;
4874
5165
  },
@@ -4877,31 +5168,31 @@ function rn(e, t) {
4877
5168
  refresh: n.refresh,
4878
5169
  clearEdits: n.edits.clearEdits
4879
5170
  }), [n]);
4880
- let { component: a, data: o, def: s, loading: c, filters: l, globalFilterValue: u, columnFilters: d, expandedRowKeys: f, expandedTreeKeys: p, page: m, pageSize: h, onSelectedRowKeysChange: g, onSelectionChange: _, onGlobalFilterChange: v, onColumnFiltersChange: b, onExpandedRowKeysChange: x, onExpandedTreeKeysChange: S, onCellEditsChange: C, onPaginationChange: w, onPageChange: T, onPageSizeChange: E, onSortingChange: D, onSortChange: te, onServerStateChange: A, style: j, ...P } = e;
4881
- return O(() => {
5171
+ let { component: a, data: o, def: s, loading: c, filters: l, globalFilterValue: u, columnFilters: d, expandedRowKeys: f, expandedTreeKeys: p, page: m, pageSize: h, onSelectedRowKeysChange: _, onSelectionChange: v, onGlobalFilterChange: y, onColumnFiltersChange: b, onExpandedRowKeysChange: x, onExpandedTreeKeysChange: S, onCellEditsChange: C, onPaginationChange: w, onPageChange: T, onPageSizeChange: E, onSortingChange: D, onSortChange: O, onServerStateChange: ee, style: M, ...N } = e;
5172
+ return A(() => {
4882
5173
  let e = i.current;
4883
5174
  if (e) return n.setSizingElement(e), () => n.setSizingElement(null);
4884
- }, [n]), /* @__PURE__ */ N(r, {
5175
+ }, [n]), /* @__PURE__ */ F(r, {
4885
5176
  ref: i,
4886
5177
  component: n.componentName,
4887
- ...P,
5178
+ ...N,
4888
5179
  style: {
4889
5180
  ...n.sizes.value,
4890
- ...j
5181
+ ...M
4891
5182
  },
4892
5183
  children: [
4893
- n.props.def.topBar && /* @__PURE__ */ M(Et, { grid: n }),
4894
- /* @__PURE__ */ M(yt, { grid: n }),
4895
- /* @__PURE__ */ M(vt, { grid: n }),
4896
- n.props.def.bottomBar && /* @__PURE__ */ M(ce, { grid: n }),
4897
- /* @__PURE__ */ M(y, {
5184
+ n.props.def.topBar && /* @__PURE__ */ P(Ft, { grid: n }),
5185
+ /* @__PURE__ */ P(Ot, { grid: n }),
5186
+ /* @__PURE__ */ P(Dt, { grid: n }),
5187
+ n.props.def.bottomBar && /* @__PURE__ */ P(le, { grid: n }),
5188
+ /* @__PURE__ */ P(g, {
4898
5189
  props: { role: "status" },
4899
5190
  children: n.selectionAnnouncement
4900
5191
  })
4901
5192
  ]
4902
5193
  });
4903
5194
  }
4904
- var an = w(rn);
4905
- rn.displayName = "DataGrid";
5195
+ var bn = w(yn);
5196
+ yn.displayName = "DataGrid";
4906
5197
  //#endregion
4907
- export { an as default };
5198
+ export { bn as default };