@jielga/tmdatagrid 2.0.0-beta.2 → 2.0.0-beta.3

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.
package/dist/index.js CHANGED
@@ -5,28 +5,28 @@ import { useCreateStore as A, useSelector as j } from "@tanstack/react-store";
5
5
  import { IconArrowAutofitWidth as M, IconArrowBackUp as N, IconArrowBarToLeft as P, IconArrowBarToRight as F, IconArrowDown as I, IconArrowLeft as L, IconArrowRight as R, IconArrowUp as z, IconCheck as B, IconChevronLeft as V, IconChevronRight as H, IconColumns3 as ee, IconDotsVertical as U, IconEyeOff as te, IconFilter as ne, IconFoldDown as re, IconFoldUp as ie, IconIndentDecrease as ae, IconIndentIncrease as oe, IconMenu2 as W, IconPencil as G, IconPinnedOff as se, IconPlus as K, IconSearch as ce, IconTrash as le, IconX as ue } from "@tabler/icons-react";
6
6
  import { Fragment as de, jsx as q, jsxs as J } from "react/jsx-runtime";
7
7
  import { FieldApi as fe, FormApi as pe, getBy as me, useStore as he } from "@tanstack/react-form";
8
- import { Store as ge, shallow as _e } from "@tanstack/store";
9
- import { aggregationFns as ve, columnFacetingFeature as ye, columnFilteringFeature as Y, columnGroupingFeature as be, columnOrderingFeature as xe, columnPinningFeature as Se, columnResizingFeature as Ce, columnSizingFeature as we, columnVisibilityFeature as X, createColumnHelper as Te, createExpandedRowModel as Ee, createFacetedMinMaxValues as Z, createFacetedRowModel as De, createFacetedUniqueValues as Oe, createFilteredRowModel as ke, createGroupedRowModel as Ae, createPaginatedRowModel as je, createSortedRowModel as Me, filterFns as Ne, flexRender as Pe, globalFilteringFeature as Fe, metaHelper as Ie, rowExpandingFeature as Le, rowPaginationFeature as Re, rowPinningFeature as ze, rowSelectionFeature as Be, rowSortingFeature as Ve, sortFns as He, tableFeatures as Ue, useTable as We } from "@tanstack/react-table";
10
- import { compareItems as Ge, rankItem as Ke } from "@tanstack/match-sorter-utils";
11
- import { useVirtualizer as qe } from "@tanstack/react-virtual";
12
- var Je = { root: "_root_1wvkg_8" }, Ye = {
8
+ import { Store as ge, batch as _e, shallow as ve } from "@tanstack/store";
9
+ import { aggregationFns as ye, columnFacetingFeature as Y, columnFilteringFeature as be, columnGroupingFeature as xe, columnOrderingFeature as Se, columnPinningFeature as Ce, columnResizingFeature as we, columnSizingFeature as X, columnVisibilityFeature as Te, createColumnHelper as Ee, createExpandedRowModel as Z, createFacetedMinMaxValues as De, createFacetedRowModel as Oe, createFacetedUniqueValues as ke, createFilteredRowModel as Ae, createGroupedRowModel as je, createPaginatedRowModel as Me, createSortedRowModel as Ne, filterFns as Pe, flexRender as Fe, globalFilteringFeature as Ie, metaHelper as Le, rowExpandingFeature as Re, rowPaginationFeature as ze, rowPinningFeature as Be, rowSelectionFeature as Ve, rowSortingFeature as He, sortFns as Ue, tableFeatures as We, useTable as Ge } from "@tanstack/react-table";
10
+ import { compareItems as Ke, rankItem as qe } from "@tanstack/match-sorter-utils";
11
+ import { useVirtualizer as Je } from "@tanstack/react-virtual";
12
+ var Ye = { root: "_root_1wvkg_8" }, Xe = {
13
13
  columnsPanel: "_columnsPanel_1492o_1",
14
14
  columnsPanelSearch: "_columnsPanelSearch_1492o_7",
15
15
  columnsPanelList: "_columnsPanelList_1492o_11",
16
16
  columnsPanelFooter: "_columnsPanelFooter_1492o_18"
17
- }, Xe = t(null), Ze = Xe.Provider;
17
+ }, Ze = t(null), Qe = Ze.Provider;
18
18
  function Q() {
19
- let e = r(Xe);
19
+ let e = r(Ze);
20
20
  if (!e) throw Error("TMDataGrid compound components must be rendered inside <TMDataGrid>");
21
21
  return e;
22
22
  }
23
- function Qe() {
23
+ function $e() {
24
24
  let { features: e } = Q();
25
25
  return e.cellSelection ? -1 : 0;
26
26
  }
27
27
  //#endregion
28
28
  //#region src/tmdatagrid/core/filterOperators.ts
29
- var $e = {
29
+ var et = {
30
30
  contains: "contains",
31
31
  equals: "equals",
32
32
  notEquals: "does not equal",
@@ -45,7 +45,7 @@ var $e = {
45
45
  isNoneOf: "is none of",
46
46
  isEmpty: "is empty",
47
47
  isNotEmpty: "is not empty"
48
- }, et = [
48
+ }, tt = [
49
49
  "contains",
50
50
  "equals",
51
51
  "notEquals",
@@ -53,7 +53,7 @@ var $e = {
53
53
  "endsWith",
54
54
  "isEmpty",
55
55
  "isNotEmpty"
56
- ], tt = [
56
+ ], nt = [
57
57
  "equals",
58
58
  "notEquals",
59
59
  "greaterThan",
@@ -63,7 +63,7 @@ var $e = {
63
63
  "between",
64
64
  "isEmpty",
65
65
  "isNotEmpty"
66
- ], nt = [
66
+ ], rt = [
67
67
  "equals",
68
68
  "notEquals",
69
69
  "before",
@@ -73,24 +73,24 @@ var $e = {
73
73
  "between",
74
74
  "isEmpty",
75
75
  "isNotEmpty"
76
- ], rt = [
76
+ ], it = [
77
77
  "equals",
78
78
  "notEquals",
79
79
  "isEmpty",
80
80
  "isNotEmpty"
81
- ], it = [
81
+ ], at = [
82
82
  "isAnyOf",
83
83
  "isNoneOf",
84
84
  "isEmpty",
85
85
  "isNotEmpty"
86
- ], at = ["isEmpty", "isNotEmpty"], ot = ["isAnyOf", "isNoneOf"], st = ["between"], ct = {
87
- string: et,
88
- number: tt,
89
- boolean: rt,
90
- date: nt,
91
- select: it,
92
- multiSelect: it
93
- }, lt = {
86
+ ], ot = ["isEmpty", "isNotEmpty"], st = ["isAnyOf", "isNoneOf"], ct = ["between"], lt = {
87
+ string: tt,
88
+ number: nt,
89
+ boolean: it,
90
+ date: rt,
91
+ select: at,
92
+ multiSelect: at
93
+ }, ut = {
94
94
  string: "contains",
95
95
  number: "equals",
96
96
  boolean: "equals",
@@ -98,37 +98,37 @@ var $e = {
98
98
  select: "isAnyOf",
99
99
  multiSelect: "isAnyOf"
100
100
  };
101
- function ut(e) {
102
- return ct[e];
103
- }
104
101
  function dt(e) {
105
102
  return lt[e];
106
103
  }
107
104
  function ft(e) {
108
- return !at.includes(e);
105
+ return ut[e];
109
106
  }
110
107
  function pt(e) {
111
- return ot.includes(e);
108
+ return !ot.includes(e);
112
109
  }
113
110
  function mt(e) {
114
111
  return st.includes(e);
115
112
  }
116
113
  function ht(e) {
117
- return pt(e) ? [] : mt(e) ? ["", ""] : "";
114
+ return ct.includes(e);
118
115
  }
119
116
  function gt(e) {
120
- return typeof e == "object" && !!e && "operator" in e && typeof e.operator == "string";
117
+ return mt(e) ? [] : ht(e) ? ["", ""] : "";
121
118
  }
122
119
  function _t(e) {
123
- return gt(e) ? ft(e.operator) ? Array.isArray(e.value) ? e.value.some((e) => String(e).trim() !== "") : typeof e.value == "string" && e.value.trim() !== "" : !0 : !1;
120
+ return typeof e == "object" && !!e && "operator" in e && typeof e.operator == "string";
121
+ }
122
+ function vt(e) {
123
+ return _t(e) ? pt(e.operator) ? Array.isArray(e.value) ? e.value.some((e) => String(e).trim() !== "") : typeof e.value == "string" && e.value.trim() !== "" : !0 : !1;
124
124
  }
125
- function vt({ label: e, type: t, filter: n, operatorLabels: r = $e }) {
125
+ function yt({ label: e, type: t, filter: n, operatorLabels: r = et }) {
126
126
  let { operator: i, value: a } = n;
127
- if (!ft(i)) return `${e} ${r[i]}`;
127
+ if (!pt(i)) return `${e} ${r[i]}`;
128
128
  let o = i === "between" && Array.isArray(a) ? a.map((e) => String(e).trim()).join("–") : Array.isArray(a) ? a.join(", ") : String(a).trim();
129
- return i === dt(t) ? `${e}: ${o}` : `${e} ${r[i]} ${o}`;
129
+ return i === ft(t) ? `${e}: ${o}` : `${e} ${r[i]} ${o}`;
130
130
  }
131
- function yt(e) {
131
+ function bt(e) {
132
132
  if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : e.toLocaleDateString("sv-SE");
133
133
  if (typeof e == "string") {
134
134
  let t = /^(\d{4}-\d{2}-\d{2})/.exec(e.trim());
@@ -136,20 +136,20 @@ function yt(e) {
136
136
  }
137
137
  return null;
138
138
  }
139
- function bt(e, t, n) {
139
+ function xt(e, t, n) {
140
140
  let r = t.trim();
141
141
  if (r === "") return !0;
142
142
  let i = typeof e == "number" ? e : NaN, a = Number(r);
143
143
  if (!Number.isNaN(i) && !Number.isNaN(a)) return n === "min" ? i >= a : i <= a;
144
- let o = yt(e), s = yt(r);
144
+ let o = bt(e), s = bt(r);
145
145
  return o === null || s === null ? !1 : n === "min" ? o >= s : o <= s;
146
146
  }
147
- function xt(e) {
147
+ function St(e) {
148
148
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
149
149
  }
150
- function St(e, { operator: t, value: n }) {
151
- if (t === "isEmpty") return xt(e);
152
- if (t === "isNotEmpty") return !xt(e);
150
+ function Ct(e, { operator: t, value: n }) {
151
+ if (t === "isEmpty") return St(e);
152
+ if (t === "isNotEmpty") return !St(e);
153
153
  if (t === "isAnyOf" || t === "isNoneOf") {
154
154
  let r = (Array.isArray(n) ? n : [n]).map((e) => String(e).toLowerCase()).filter((e) => e !== "");
155
155
  if (r.length === 0) return !0;
@@ -158,7 +158,7 @@ function St(e, { operator: t, value: n }) {
158
158
  }
159
159
  if (t === "between") {
160
160
  let [t, r] = Array.isArray(n) ? [String(n[0] ?? ""), String(n[1] ?? "")] : [String(n), ""];
161
- return bt(e, t, "min") && bt(e, r, "max");
161
+ return xt(e, t, "min") && xt(e, r, "max");
162
162
  }
163
163
  let r = typeof n == "string" ? n.trim() : n.join(",").trim();
164
164
  if (r === "") return !0;
@@ -167,7 +167,7 @@ function St(e, { operator: t, value: n }) {
167
167
  case "after":
168
168
  case "onOrBefore":
169
169
  case "onOrAfter": {
170
- let n = yt(e), i = yt(r);
170
+ let n = bt(e), i = bt(r);
171
171
  return n === null || i === null ? !1 : t === "before" ? n < i : t === "after" ? n > i : t === "onOrBefore" ? n <= i : n >= i;
172
172
  }
173
173
  default: break;
@@ -180,7 +180,7 @@ function St(e, { operator: t, value: n }) {
180
180
  case "lessThanOrEqual": return o && i <= a;
181
181
  default: break;
182
182
  }
183
- let s = (e instanceof Date ? yt(e) ?? "" : String(e ?? "")).toLowerCase(), c = r.toLowerCase();
183
+ let s = (e instanceof Date ? bt(e) ?? "" : String(e ?? "")).toLowerCase(), c = r.toLowerCase();
184
184
  switch (t) {
185
185
  case "contains": return s.includes(c);
186
186
  case "equals": return o ? i === a : s === c;
@@ -190,41 +190,41 @@ function St(e, { operator: t, value: n }) {
190
190
  default: return !0;
191
191
  }
192
192
  }
193
- function Ct(e, t, n) {
194
- return !gt(n) || St(e.getValue(t), n);
193
+ function wt(e, t, n) {
194
+ return !_t(n) || Ct(e.getValue(t), n);
195
195
  }
196
- var wt = {
196
+ var Tt = {
197
197
  detailsToggle: "_detailsToggle_n39tz_3",
198
198
  chevron: "_chevron_n39tz_12"
199
199
  };
200
200
  //#endregion
201
201
  //#region src/tmdatagrid/core/expanding.ts
202
- function Tt(e, t) {
202
+ function Et(e, t) {
203
203
  return t === "groups" ? e.getIsGrouped() : !e.getIsGrouped();
204
204
  }
205
- function Et(e, t) {
205
+ function Dt(e, t) {
206
206
  if (t !== !0) return { ...t };
207
207
  let n = {};
208
208
  for (let t of e) n[t.id] = !0;
209
209
  return n;
210
210
  }
211
- function Dt({ rows: e, expanded: t, target: n }) {
211
+ function Ot({ rows: e, expanded: t, target: n }) {
212
212
  let r = !1;
213
- for (let i of e) if (Tt(i, n) && (r = !0, t !== !0 && t[i.id] !== !0)) return !1;
213
+ for (let i of e) if (Et(i, n) && (r = !0, t !== !0 && t[i.id] !== !0)) return !1;
214
214
  return r;
215
215
  }
216
- function Ot({ rows: e, expanded: t, target: n, expand: r }) {
217
- let i = Et(e, t);
218
- for (let t of e) Tt(t, n) && (r ? i[t.id] = !0 : delete i[t.id]);
216
+ function kt({ rows: e, expanded: t, target: n, expand: r }) {
217
+ let i = Dt(e, t);
218
+ for (let t of e) Et(t, n) && (r ? i[t.id] = !0 : delete i[t.id]);
219
219
  return i;
220
220
  }
221
221
  //#endregion
222
222
  //#region src/tmdatagrid/components/TMDataGridDetailsColumn.tsx
223
- var kt = "__details__";
224
- function At(t) {
223
+ var At = "__details__";
224
+ function jt(t) {
225
225
  let n = e(14), { row: r } = t, { labels: i } = Q(), a;
226
226
  n[0] === r ? a = n[1] : (a = () => r.getIsExpanded(), n[0] = r, n[1] = a);
227
- let o = j(r.table.store, a), s = Qe();
227
+ let o = j(r.table.store, a), s = $e();
228
228
  if (r.getIsGrouped()) return null;
229
229
  let c = o ? i.hideDetails : i.showDetails, l;
230
230
  n[2] === r ? l = n[3] : (l = (e) => {
@@ -237,13 +237,13 @@ function At(t) {
237
237
  }), n[4] = u) : u = n[4];
238
238
  let d;
239
239
  n[5] === o ? d = n[6] : (d = /* @__PURE__ */ q("span", {
240
- className: wt.chevron,
240
+ className: Tt.chevron,
241
241
  "data-expanded": o,
242
242
  children: u
243
243
  }), n[5] = o, n[6] = d);
244
244
  let f;
245
245
  return n[7] !== o || n[8] !== r.id || n[9] !== c || n[10] !== l || n[11] !== d || n[12] !== s ? (f = /* @__PURE__ */ q(k, {
246
- className: wt.detailsToggle,
246
+ className: Tt.detailsToggle,
247
247
  tabIndex: s,
248
248
  "aria-expanded": o,
249
249
  "aria-label": c,
@@ -253,17 +253,17 @@ function At(t) {
253
253
  children: d
254
254
  }), n[7] = o, n[8] = r.id, n[9] = c, n[10] = l, n[11] = d, n[12] = s, n[13] = f) : f = n[13], f;
255
255
  }
256
- function jt(t) {
256
+ function Mt(t) {
257
257
  let n = e(16), { table: r } = t, { labels: i } = Q(), a;
258
258
  n[0] === r ? a = n[1] : (a = () => r.getPrePaginatedRowModel().flatRows, n[0] = r, n[1] = a);
259
259
  let o = a, s;
260
- n[2] === o ? s = n[3] : (s = (e) => Dt({
260
+ n[2] === o ? s = n[3] : (s = (e) => Ot({
261
261
  rows: o(),
262
262
  expanded: e.expanded,
263
263
  target: "details"
264
264
  }), n[2] = o, n[3] = s);
265
265
  let c = j(r.store, s), l = c ? i.collapseAllDetails : i.expandAllDetails, u;
266
- n[4] !== c || n[5] !== o || n[6] !== r ? (u = () => r.setExpanded(Ot({
266
+ n[4] !== c || n[5] !== o || n[6] !== r ? (u = () => r.setExpanded(kt({
267
267
  rows: o(),
268
268
  expanded: r.store.state.expanded,
269
269
  target: "details",
@@ -276,13 +276,13 @@ function jt(t) {
276
276
  }), n[8] = d) : d = n[8];
277
277
  let f;
278
278
  n[9] === c ? f = n[10] : (f = /* @__PURE__ */ q("span", {
279
- className: wt.chevron,
279
+ className: Tt.chevron,
280
280
  "data-expanded": c,
281
281
  children: d
282
282
  }), n[9] = c, n[10] = f);
283
283
  let p;
284
284
  return n[11] !== c || n[12] !== l || n[13] !== u || n[14] !== f ? (p = /* @__PURE__ */ q(k, {
285
- className: wt.detailsToggle,
285
+ className: Tt.detailsToggle,
286
286
  "aria-expanded": c,
287
287
  "aria-label": l,
288
288
  "data-dg-part": "details-toggle-all",
@@ -290,9 +290,9 @@ function jt(t) {
290
290
  children: f
291
291
  }), n[11] = c, n[12] = l, n[13] = u, n[14] = f, n[15] = p) : p = n[15], p;
292
292
  }
293
- function Mt(e = "Details") {
293
+ function Nt(e = "Details") {
294
294
  return {
295
- id: kt,
295
+ id: At,
296
296
  meta: {
297
297
  label: e,
298
298
  align: "center",
@@ -307,8 +307,8 @@ function Mt(e = "Details") {
307
307
  enableGlobalFilter: !1,
308
308
  enableHiding: !1,
309
309
  enablePinning: !1,
310
- header: ({ table: e }) => /* @__PURE__ */ q(jt, { table: e }),
311
- cell: ({ row: e }) => /* @__PURE__ */ q(At, { row: e })
310
+ header: ({ table: e }) => /* @__PURE__ */ q(Mt, { table: e }),
311
+ cell: ({ row: e }) => /* @__PURE__ */ q(jt, { row: e })
312
312
  };
313
313
  }
314
314
  var $ = {
@@ -337,12 +337,12 @@ var $ = {
337
337
  };
338
338
  //#endregion
339
339
  //#region src/tmdatagrid/components/editors/editorShared.ts
340
- function Nt(e) {
340
+ function Pt(e) {
341
341
  if (e != null) {
342
342
  if (typeof e == "string") return e;
343
343
  if (Array.isArray(e)) {
344
344
  for (let t of e) {
345
- let e = Nt(t);
345
+ let e = Pt(t);
346
346
  if (e !== void 0) return e;
347
347
  }
348
348
  return;
@@ -351,29 +351,29 @@ function Nt(e) {
351
351
  let t = e.message;
352
352
  if (typeof t == "string") return t;
353
353
  for (let t of Object.values(e)) {
354
- let e = Nt(t);
354
+ let e = Pt(t);
355
355
  if (e !== void 0) return e;
356
356
  }
357
357
  }
358
358
  }
359
359
  }
360
- function Pt(e) {
361
- return he(e.store, Ft);
362
- }
363
360
  function Ft(e) {
364
- return e.value;
361
+ return he(e.store, It);
365
362
  }
366
363
  function It(e) {
367
- return he(e.store, Lt);
364
+ return e.value;
368
365
  }
369
366
  function Lt(e) {
370
- return Nt(e.meta.errors);
367
+ return he(e.store, Rt);
371
368
  }
372
369
  function Rt(e) {
370
+ return Pt(e.meta.errors);
371
+ }
372
+ function zt(e) {
373
373
  let t = e.currentTarget;
374
374
  t instanceof HTMLInputElement && t.select();
375
375
  }
376
- function zt() {
376
+ function Bt() {
377
377
  let t = e(2), n = s(null), r = s(null), i;
378
378
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
379
379
  let e = r.current, t = n.current;
@@ -394,8 +394,8 @@ function zt() {
394
394
  }
395
395
  //#endregion
396
396
  //#region src/tmdatagrid/components/TMDataGridEditColumn.tsx
397
- var Bt = "__edit__";
398
- function Vt(t) {
397
+ var Vt = "__edit__";
398
+ function Ht(t) {
399
399
  let n = e(11), { state: r, rowId: i, label: a, error: o } = t, s = r === "new" ? K : r === "edited" ? G : le, c = o ?? a, l = o !== null || void 0, u;
400
400
  n[0] === s ? u = n[1] : (u = /* @__PURE__ */ q(s, {
401
401
  size: 16,
@@ -419,21 +419,21 @@ function Vt(t) {
419
419
  children: d
420
420
  }), n[8] = c, n[9] = d, n[10] = f) : f = n[10], f;
421
421
  }
422
- function Ht(t) {
423
- let n = e(158), { row: r } = t, { edit: i, features: a, labels: o } = Q(), s = Qe(), c = r.id, u;
422
+ function Ut(t) {
423
+ let n = e(158), { row: r } = t, { edit: i, features: a, labels: o } = Q(), s = $e(), c = r.id, u;
424
424
  n[0] === c ? u = n[1] : (u = (e) => e.openRowIds.includes(c), n[0] = c, n[1] = u);
425
425
  let d = j(i.store, u), f;
426
426
  n[2] === c ? f = n[3] : (f = (e) => e.rows[c], n[2] = c, n[3] = f);
427
427
  let m = j(i.store, f), g;
428
428
  n[4] === c ? g = n[5] : (g = (e) => e.newRows.some((e) => e.tempId === c), n[4] = c, n[5] = g);
429
429
  let _ = j(i.store, g), v;
430
- n[6] === c ? v = n[7] : (v = (e) => e.newRows.find((e) => e.tempId === c)?.confirmed === !0, n[6] = c, n[7] = v);
430
+ n[6] === c ? v = n[7] : (v = (e) => e.newRows.find((e) => e.tempId === c)?.committed === !0, n[6] = c, n[7] = v);
431
431
  let y = j(i.store, v), b;
432
432
  n[8] === c ? b = n[9] : (b = (e) => e.deletedRowIds.includes(c), n[8] = c, n[9] = b);
433
433
  let x = j(i.store, b);
434
434
  if (r.getIsGrouped()) return null;
435
435
  let S = a.editMode === "draft", C = m !== void 0 && (m.hasRowError || m.errorFields.length > 0), w;
436
- n[10] !== i || n[11] !== C || n[12] !== o || n[13] !== c ? (w = C ? Nt(i.getForm(c)?.state.errors ?? []) ?? o.editRowErrors : null, n[10] = i, n[11] = C, n[12] = o, n[13] = c, n[14] = w) : w = n[14];
436
+ n[10] !== i || n[11] !== C || n[12] !== o || n[13] !== c ? (w = C ? Pt(i.getForm(c)?.state.errors ?? []) ?? o.editRowErrors : null, n[10] = i, n[11] = C, n[12] = o, n[13] = c, n[14] = w) : w = n[14];
437
437
  let T = w, E;
438
438
  n[15] !== i || n[16] !== o || n[17] !== c || n[18] !== s ? (E = i.canDeleteRows() ? /* @__PURE__ */ q(O, {
439
439
  label: o.deleteRow,
@@ -459,7 +459,7 @@ function Ht(t) {
459
459
  if (_) {
460
460
  if (y) {
461
461
  let e;
462
- n[20] !== o.rowStateNew || n[21] !== T || n[22] !== c ? (e = /* @__PURE__ */ q(Vt, {
462
+ n[20] !== o.rowStateNew || n[21] !== T || n[22] !== c ? (e = /* @__PURE__ */ q(Ht, {
463
463
  state: "new",
464
464
  rowId: c,
465
465
  label: o.rowStateNew,
@@ -590,7 +590,7 @@ function Ht(t) {
590
590
  }
591
591
  if (x) {
592
592
  let e;
593
- n[79] !== o.rowStateDeleted || n[80] !== c ? (e = /* @__PURE__ */ q(Vt, {
593
+ n[79] !== o.rowStateDeleted || n[80] !== c ? (e = /* @__PURE__ */ q(Ht, {
594
594
  state: "deleted",
595
595
  rowId: c,
596
596
  label: o.rowStateDeleted,
@@ -641,7 +641,7 @@ function Ht(t) {
641
641
  }
642
642
  if (!((m?.dirtyFields.length ?? 0) > 0)) return D;
643
643
  let e;
644
- n[99] !== o.rowStateEdited || n[100] !== T || n[101] !== c ? (e = /* @__PURE__ */ q(Vt, {
644
+ n[99] !== o.rowStateEdited || n[100] !== T || n[101] !== c ? (e = /* @__PURE__ */ q(Ht, {
645
645
  state: "edited",
646
646
  rowId: c,
647
647
  label: o.rowStateEdited,
@@ -785,10 +785,10 @@ function Ht(t) {
785
785
  children: [I, V]
786
786
  }), n[155] = I, n[156] = V, n[157] = H) : H = n[157], H;
787
787
  }
788
- function Ut(e = "Edit", t = !1) {
788
+ function Wt(e = "Edit", t = !1) {
789
789
  let n = t ? 88 : 64;
790
790
  return {
791
- id: Bt,
791
+ id: Vt,
792
792
  meta: {
793
793
  label: e,
794
794
  align: "center",
@@ -804,11 +804,11 @@ function Ut(e = "Edit", t = !1) {
804
804
  enableHiding: !1,
805
805
  enablePinning: !1,
806
806
  header: () => null,
807
- cell: ({ row: e }) => /* @__PURE__ */ q(Ht, { row: e }),
808
- aggregatedCell: ({ row: e }) => /* @__PURE__ */ q(Ht, { row: e })
807
+ cell: ({ row: e }) => /* @__PURE__ */ q(Ut, { row: e }),
808
+ aggregatedCell: ({ row: e }) => /* @__PURE__ */ q(Ut, { row: e })
809
809
  };
810
810
  }
811
- var Wt = {
811
+ var Gt = {
812
812
  groupToggle: "_groupToggle_1954o_4",
813
813
  chevron: "_chevron_1954o_14",
814
814
  groupLabel: "_groupLabel_1954o_34",
@@ -816,24 +816,24 @@ var Wt = {
816
816
  };
817
817
  //#endregion
818
818
  //#region src/tmdatagrid/core/grouping.ts
819
- function Gt(e) {
819
+ function Kt(e) {
820
820
  return e.subRows.length === 0 ? [e] : e.getLeafRows().filter((e) => e.subRows.length === 0);
821
821
  }
822
822
  //#endregion
823
823
  //#region src/tmdatagrid/components/TMDataGridGroupColumn.tsx
824
- var Kt = "__group__", qt = 16, Jt = "(Blank)";
825
- function Yt(e, t = Jt) {
824
+ var qt = "__group__", Jt = 16, Yt = "(Blank)";
825
+ function Xt(e, t = Yt) {
826
826
  return e == null || e === "" ? t : e instanceof Date ? e.toLocaleDateString() : String(e);
827
827
  }
828
- function Xt(t) {
828
+ function Zt(t) {
829
829
  let n = e(39), { row: r } = t, { labels: i } = Q(), a;
830
830
  n[0] === r ? a = n[1] : (a = () => r.getIsExpanded(), n[0] = r, n[1] = a);
831
- let o = j(r.table.store, a), s = Qe();
831
+ let o = j(r.table.store, a), s = $e();
832
832
  if (!r.getIsGrouped()) return null;
833
833
  let c, l, u, d, f, p, m;
834
834
  if (n[2] !== o || n[3] !== i || n[4] !== r.depth || n[5] !== r.groupingValue || n[6] !== s) {
835
- l = Yt(r.groupingValue, i.blankGroupValue), c = k, u = Wt.groupToggle;
836
- let e = r.depth * qt;
835
+ l = Xt(r.groupingValue, i.blankGroupValue), c = k, u = Gt.groupToggle;
836
+ let e = r.depth * Jt;
837
837
  n[14] === e ? d = n[15] : (d = { paddingInlineStart: e }, n[14] = e, n[15] = d), f = s, p = o, m = o ? i.collapseGroup(l) : i.expandGroup(l), n[2] = o, n[3] = i, n[4] = r.depth, n[5] = r.groupingValue, n[6] = s, n[7] = c, n[8] = l, n[9] = u, n[10] = d, n[11] = f, n[12] = p, n[13] = m;
838
838
  } else c = n[7], l = n[8], u = n[9], d = n[10], f = n[11], p = n[12], m = n[13];
839
839
  let h = r.id, g;
@@ -847,20 +847,20 @@ function Xt(t) {
847
847
  }), n[18] = _) : _ = n[18];
848
848
  let v;
849
849
  n[19] === o ? v = n[20] : (v = /* @__PURE__ */ q("span", {
850
- className: Wt.chevron,
850
+ className: Gt.chevron,
851
851
  "data-expanded": o,
852
852
  children: _
853
853
  }), n[19] = o, n[20] = v);
854
854
  let y;
855
855
  n[21] === l ? y = n[22] : (y = /* @__PURE__ */ q("span", {
856
- className: Wt.groupLabel,
856
+ className: Gt.groupLabel,
857
857
  children: l
858
858
  }), n[21] = l, n[22] = y);
859
859
  let b;
860
- n[23] === r ? b = n[24] : (b = Gt(r), n[23] = r, n[24] = b);
860
+ n[23] === r ? b = n[24] : (b = Kt(r), n[23] = r, n[24] = b);
861
861
  let x;
862
862
  n[25] === b.length ? x = n[26] : (x = /* @__PURE__ */ J("span", {
863
- className: Wt.groupCount,
863
+ className: Gt.groupCount,
864
864
  children: [
865
865
  "(",
866
866
  b.length,
@@ -884,27 +884,27 @@ function Xt(t) {
884
884
  ]
885
885
  }), n[27] = c, n[28] = r.id, n[29] = v, n[30] = y, n[31] = x, n[32] = u, n[33] = d, n[34] = f, n[35] = p, n[36] = m, n[37] = g, n[38] = S) : S = n[38], S;
886
886
  }
887
- function Zt(t) {
887
+ function Qt(t) {
888
888
  let n = e(6), { table: r } = t, { labels: i } = Q(), a;
889
- n[0] === Symbol.for("react.memo_cache_sentinel") ? (a = { compare: _e }, n[0] = a) : a = n[0];
890
- let o = j(r.store, Qt, a);
889
+ n[0] === Symbol.for("react.memo_cache_sentinel") ? (a = { compare: ve }, n[0] = a) : a = n[0];
890
+ let o = j(r.store, $t, a);
891
891
  if (o.length === 0) return i.groupColumnLabel;
892
892
  let s;
893
893
  if (n[1] !== o || n[2] !== r) {
894
894
  let e;
895
895
  n[4] === r ? e = n[5] : (e = (e) => {
896
896
  let t = r.getColumn(e);
897
- return t ? pn(t) : e;
897
+ return t ? mn(t) : e;
898
898
  }, n[4] = r, n[5] = e), s = o.map(e).join(" / "), n[1] = o, n[2] = r, n[3] = s;
899
899
  } else s = n[3];
900
900
  return s;
901
901
  }
902
- function Qt(e) {
902
+ function $t(e) {
903
903
  return e.grouping;
904
904
  }
905
- function $t(e = "Group") {
905
+ function en(e = "Group") {
906
906
  return {
907
- id: Kt,
907
+ id: qt,
908
908
  meta: {
909
909
  label: e,
910
910
  enableOrdering: !1
@@ -916,17 +916,17 @@ function $t(e = "Group") {
916
916
  enableGlobalFilter: !1,
917
917
  enableHiding: !1,
918
918
  enablePinning: !1,
919
- cell: ({ row: e }) => /* @__PURE__ */ q(Xt, { row: e }),
920
- aggregatedCell: ({ row: e }) => /* @__PURE__ */ q(Xt, { row: e }),
921
- header: ({ table: e }) => /* @__PURE__ */ q(Zt, { table: e })
919
+ cell: ({ row: e }) => /* @__PURE__ */ q(Zt, { row: e }),
920
+ aggregatedCell: ({ row: e }) => /* @__PURE__ */ q(Zt, { row: e }),
921
+ header: ({ table: e }) => /* @__PURE__ */ q(Qt, { table: e })
922
922
  };
923
923
  }
924
924
  //#endregion
925
925
  //#region src/tmdatagrid/components/TMDataGridRowNumberColumn.tsx
926
- var en = "__rowNumber__";
927
- function tn(e = "Row number") {
926
+ var tn = "__rowNumber__";
927
+ function nn(e = "Row number") {
928
928
  return {
929
- id: en,
929
+ id: tn,
930
930
  meta: {
931
931
  label: e,
932
932
  align: "center",
@@ -947,27 +947,27 @@ function tn(e = "Row number") {
947
947
  }
948
948
  //#endregion
949
949
  //#region src/tmdatagrid/core/rowSelection.ts
950
- function nn(e, t) {
951
- let n = rn(e, t) ? e.getPaginatedRowModel().rows : e.getPrePaginatedRowModel().rows;
950
+ function rn(e, t) {
951
+ let n = an(e, t) ? e.getPaginatedRowModel().rows : e.getPrePaginatedRowModel().rows;
952
952
  if (!t.rowPinning) return n;
953
953
  let { top: r, bottom: i } = e.store.state.rowPinning;
954
954
  if (r.length === 0 && i.length === 0) return n;
955
955
  let a = /* @__PURE__ */ new Set([...r, ...i]);
956
956
  return n.filter((e) => !a.has(e.id));
957
957
  }
958
- function rn(e, t) {
958
+ function an(e, t) {
959
959
  return t.pagination && e.store.state.grouping.length === 0;
960
960
  }
961
- function an(e) {
962
- return Gt(e).filter((e) => e.getCanSelect()).map((e) => e.id);
961
+ function on(e) {
962
+ return Kt(e).filter((e) => e.getCanSelect()).map((e) => e.id);
963
963
  }
964
- function on({ rows: e, rowId: t, anchorRowId: n, modifiers: r, selection: i, canReplaceSelection: a }) {
964
+ function sn({ rows: e, rowId: t, anchorRowId: n, modifiers: r, selection: i, canReplaceSelection: a }) {
965
965
  let o = e.findIndex((e) => e.id === t), s = e[o];
966
966
  if (o === -1 || s === void 0) return {
967
967
  selection: i,
968
968
  anchorRowId: n
969
969
  };
970
- let c = an(s);
970
+ let c = on(s);
971
971
  if (c.length === 0) return {
972
972
  selection: i,
973
973
  anchorRowId: n
@@ -985,7 +985,7 @@ function on({ rows: e, rowId: t, anchorRowId: n, modifiers: r, selection: i, can
985
985
  let l = n === null ? -1 : e.findIndex((e) => e.id === n);
986
986
  if (r.extend && l !== -1) {
987
987
  let t = Math.min(l, o), s = Math.max(l, o), c = r.toggle || !a ? { ...i } : {};
988
- for (let n of e.slice(t, s + 1)) for (let e of an(n)) c[e] = !0;
988
+ for (let n of e.slice(t, s + 1)) for (let e of on(n)) c[e] = !0;
989
989
  return {
990
990
  selection: c,
991
991
  anchorRowId: n
@@ -1008,8 +1008,8 @@ function on({ rows: e, rowId: t, anchorRowId: n, modifiers: r, selection: i, can
1008
1008
  }
1009
1009
  //#endregion
1010
1010
  //#region src/tmdatagrid/components/TMDataGridSelectColumn.tsx
1011
- var sn = "__select__";
1012
- function cn(t) {
1011
+ var cn = "__select__";
1012
+ function ln(t) {
1013
1013
  let n = e(11), { table: r } = t, { labels: i } = Q(), a;
1014
1014
  n[0] === r ? a = n[1] : (a = () => r.getIsAllRowsSelected(), n[0] = r, n[1] = a);
1015
1015
  let o = j(r.store, a), s;
@@ -1026,25 +1026,25 @@ function cn(t) {
1026
1026
  onChange: d
1027
1027
  }), n[6] = o, n[7] = i.selectAllRows, n[8] = u, n[9] = d, n[10] = p) : p = n[10], p;
1028
1028
  }
1029
- function ln(t) {
1029
+ function un(t) {
1030
1030
  let n = e(2), { table: r } = t, { features: i } = Q();
1031
1031
  if (!i.multiRowSelection) return null;
1032
1032
  let a;
1033
- return n[0] === r ? a = n[1] : (a = /* @__PURE__ */ q(cn, { table: r }), n[0] = r, n[1] = a), a;
1033
+ return n[0] === r ? a = n[1] : (a = /* @__PURE__ */ q(ln, { table: r }), n[0] = r, n[1] = a), a;
1034
1034
  }
1035
- function un(t) {
1036
- let n = e(21), { row: r } = t, { ui: i, features: a, labels: o } = Q(), s = Qe(), c = r.subRows.length > 0, l;
1035
+ function dn(t) {
1036
+ let n = e(21), { row: r } = t, { ui: i, features: a, labels: o } = Q(), s = $e(), c = r.subRows.length > 0, l;
1037
1037
  n[0] !== c || n[1] !== r ? (l = () => c ? r.getIsAllSubRowsSelected() : r.getIsSelected(), n[0] = c, n[1] = r, n[2] = l) : l = n[2];
1038
1038
  let u = j(r.table.store, l), d;
1039
1039
  n[3] === r ? d = n[4] : (d = () => r.getIsSomeSelected(), n[3] = r, n[4] = d);
1040
1040
  let p = j(r.table.store, d), m;
1041
- n[5] === r ? m = n[6] : (m = an(r), n[5] = r, n[6] = m);
1041
+ n[5] === r ? m = n[6] : (m = on(r), n[5] = r, n[6] = m);
1042
1042
  let h = m;
1043
1043
  if (c && !r.getCanMultiSelect()) return null;
1044
1044
  let g = c ? o.selectGroup : o.selectRow, _ = h.length === 0, v = p && !u, y;
1045
1045
  n[7] !== a || n[8] !== r.id || n[9] !== r.table || n[10] !== i.actions || n[11] !== i.state.selectionAnchorRowId ? (y = (e) => {
1046
- let t = e.nativeEvent, n = t instanceof MouseEvent, o = on({
1047
- rows: nn(r.table, a),
1046
+ let t = e.nativeEvent, n = t instanceof MouseEvent, o = sn({
1047
+ rows: rn(r.table, a),
1048
1048
  rowId: r.id,
1049
1049
  anchorRowId: i.state.selectionAnchorRowId,
1050
1050
  modifiers: {
@@ -1067,15 +1067,15 @@ function un(t) {
1067
1067
  disabled: _,
1068
1068
  indeterminate: v,
1069
1069
  onChange: y,
1070
- onClick: dn
1070
+ onClick: fn
1071
1071
  }), n[13] = r.id, n[14] = u, n[15] = g, n[16] = _, n[17] = v, n[18] = y, n[19] = s, n[20] = b) : b = n[20], b;
1072
1072
  }
1073
- function dn(e) {
1073
+ function fn(e) {
1074
1074
  return e.stopPropagation();
1075
1075
  }
1076
- function fn(e = "Checkbox selection") {
1076
+ function pn(e = "Checkbox selection") {
1077
1077
  return {
1078
- id: sn,
1078
+ id: cn,
1079
1079
  meta: {
1080
1080
  label: e,
1081
1081
  align: "center",
@@ -1090,55 +1090,55 @@ function fn(e = "Checkbox selection") {
1090
1090
  enableGlobalFilter: !1,
1091
1091
  enableHiding: !1,
1092
1092
  enablePinning: !1,
1093
- header: ({ table: e }) => /* @__PURE__ */ q(ln, { table: e }),
1094
- cell: ({ row: e }) => /* @__PURE__ */ q(un, { row: e }),
1095
- aggregatedCell: ({ row: e }) => /* @__PURE__ */ q(un, { row: e })
1093
+ header: ({ table: e }) => /* @__PURE__ */ q(un, { table: e }),
1094
+ cell: ({ row: e }) => /* @__PURE__ */ q(dn, { row: e }),
1095
+ aggregatedCell: ({ row: e }) => /* @__PURE__ */ q(dn, { row: e })
1096
1096
  };
1097
1097
  }
1098
1098
  //#endregion
1099
1099
  //#region src/tmdatagrid/core/columnUtils.ts
1100
- function pn(e) {
1100
+ function mn(e) {
1101
1101
  let t = e.columnDef.meta?.label;
1102
1102
  if (t) return t;
1103
1103
  let n = e.columnDef.header;
1104
1104
  return typeof n == "string" ? n : e.id;
1105
1105
  }
1106
- function mn(e) {
1107
- return e.columnDef.meta?.type ?? "string";
1108
- }
1109
1106
  function hn(e) {
1110
- return e.columnDef.meta?.filter?.defaultOperator ?? dt(mn(e));
1107
+ return e.columnDef.meta?.type ?? "string";
1111
1108
  }
1112
1109
  function gn(e) {
1113
- return e.columnDef.meta?.filter?.control;
1110
+ return e.columnDef.meta?.filter?.defaultOperator ?? ft(hn(e));
1114
1111
  }
1115
1112
  function _n(e) {
1113
+ return e.columnDef.meta?.filter?.control;
1114
+ }
1115
+ function vn(e) {
1116
1116
  return e.columnDef.meta?.edit?.enabled === !1;
1117
1117
  }
1118
- function vn(e, t) {
1118
+ function yn(e, t) {
1119
1119
  let n = e.columnDef.meta?.edit?.enabled;
1120
1120
  return n === !1 ? !1 : typeof n != "function" || n(t);
1121
1121
  }
1122
- function yn(e) {
1123
- return e.columnDef.meta?.align ?? "left";
1124
- }
1125
1122
  function bn(e) {
1126
- return e === "__select__" || e === "__details__" || e === "__edit__" || e === "__rowNumber__";
1123
+ return e.columnDef.meta?.align ?? "left";
1127
1124
  }
1128
1125
  function xn(e) {
1129
- return bn(e) || e === "__group__";
1126
+ return e === "__select__" || e === "__details__" || e === "__edit__" || e === "__rowNumber__";
1130
1127
  }
1131
1128
  function Sn(e) {
1129
+ return xn(e) || e === "__group__";
1130
+ }
1131
+ function Cn(e) {
1132
1132
  return e.columnDef.meta?.enableOrdering !== !1 && e.parent === void 0;
1133
1133
  }
1134
1134
  //#endregion
1135
1135
  //#region src/tmdatagrid/components/TMDataGridColumnsPanel.tsx
1136
- function Cn() {
1137
- let t = e(67), { table: n, labels: r, controlSize: i, resetSettings: a } = Q(), [o, s] = c(""), l = j(n.store, Tn), u, p, m, h, g, _, v, y, b, x, C, w;
1136
+ function wn() {
1137
+ let t = e(67), { table: n, labels: r, controlSize: i, resetSettings: a } = Q(), [o, s] = c(""), l = j(n.store, En), u, p, m, h, g, _, v, y, b, x, C, w;
1138
1138
  if (t[0] !== l || t[1] !== i || t[2] !== r.columnsSearchPlaceholder || t[3] !== o || t[4] !== n) {
1139
- p = n.getAllLeafColumns().filter(wn);
1139
+ p = n.getAllLeafColumns().filter(Tn);
1140
1140
  let e = o.trim().toLowerCase();
1141
- w = e ? p.filter((t) => pn(t).toLowerCase().includes(e)) : p;
1141
+ w = e ? p.filter((t) => mn(t).toLowerCase().includes(e)) : p;
1142
1142
  let a;
1143
1143
  t[17] === l ? a = t[18] : (a = (e) => l[e.id] !== !1, t[17] = l, t[18] = a), h = p.filter(a).length, m = (e) => {
1144
1144
  n.setColumnVisibility((t) => {
@@ -1146,7 +1146,7 @@ function Cn() {
1146
1146
  for (let t of p) n[t.id] = e;
1147
1147
  return n;
1148
1148
  });
1149
- }, b = "columns-panel", x = Ye.columnsPanel;
1149
+ }, b = "columns-panel", x = Xe.columnsPanel;
1150
1150
  let c;
1151
1151
  t[19] === Symbol.for("react.memo_cache_sentinel") ? (c = (e) => s(e.currentTarget.value), t[19] = c) : c = t[19];
1152
1152
  let d;
@@ -1154,7 +1154,7 @@ function Cn() {
1154
1154
  size: 16,
1155
1155
  stroke: 1.6
1156
1156
  }), t[20] = d) : d = t[20], t[21] !== i || t[22] !== r.columnsSearchPlaceholder || t[23] !== o ? (C = /* @__PURE__ */ q("div", {
1157
- className: Ye.columnsPanelSearch,
1157
+ className: Xe.columnsPanelSearch,
1158
1158
  children: /* @__PURE__ */ q(D, {
1159
1159
  value: o,
1160
1160
  onChange: c,
@@ -1164,11 +1164,11 @@ function Cn() {
1164
1164
  "data-dg-part": "columns-search",
1165
1165
  "data-autofocus": !0
1166
1166
  })
1167
- }), t[21] = i, t[22] = r.columnsSearchPlaceholder, t[23] = o, t[24] = C) : C = t[24], u = S.Autosize, v = 260, y = "auto", g = Ye.columnsPanelList;
1167
+ }), t[21] = i, t[22] = r.columnsSearchPlaceholder, t[23] = o, t[24] = C) : C = t[24], u = S.Autosize, v = 260, y = "auto", g = Xe.columnsPanelList;
1168
1168
  let T;
1169
1169
  t[25] !== l || t[26] !== i ? (T = (e) => /* @__PURE__ */ q(f, {
1170
1170
  size: i,
1171
- label: pn(e),
1171
+ label: mn(e),
1172
1172
  "data-dg-part": "columns-toggle",
1173
1173
  "data-column-id": e.id,
1174
1174
  checked: l[e.id] !== !1,
@@ -1222,7 +1222,7 @@ function Cn() {
1222
1222
  }), t[55] = r.columnsResetHint, t[56] = L, t[57] = R) : R = t[57];
1223
1223
  let z;
1224
1224
  t[58] !== F || t[59] !== R ? (z = /* @__PURE__ */ J("div", {
1225
- className: Ye.columnsPanelFooter,
1225
+ className: Xe.columnsPanelFooter,
1226
1226
  children: [F, R]
1227
1227
  }), t[58] = F, t[59] = R, t[60] = z) : z = t[60];
1228
1228
  let B;
@@ -1236,41 +1236,66 @@ function Cn() {
1236
1236
  ]
1237
1237
  }), t[61] = z, t[62] = b, t[63] = x, t[64] = C, t[65] = A, t[66] = B) : B = t[66], B;
1238
1238
  }
1239
- function wn(e) {
1239
+ function Tn(e) {
1240
1240
  return e.getCanHide();
1241
1241
  }
1242
- function Tn(e) {
1242
+ function En(e) {
1243
1243
  return e.columnVisibility;
1244
1244
  }
1245
1245
  //#endregion
1246
1246
  //#region src/tmdatagrid/components/TMDataGridEditActions.tsx
1247
- function En() {
1247
+ function Dn() {
1248
1248
  let { edit: e } = Q();
1249
- return j(e.store, Dn);
1249
+ return j(e.store, On);
1250
1250
  }
1251
- function Dn(e) {
1252
- return e.openRowIds.filter((t) => e.newRows.some((e) => e.tempId === t) || (e.rows[t]?.dirtyFields.length ?? 0) > 0).length + e.deletedRowIds.length;
1251
+ function On(e) {
1252
+ return e.committedRowIds.length + e.newRows.filter(kn).length + e.deletedRowIds.length;
1253
+ }
1254
+ function kn(e) {
1255
+ return e.committed;
1253
1256
  }
1254
- function On() {
1255
- let t = e(10), { edit: n, labels: r } = Q(), i = En(), a = j(n.store, kn), o = i === 0, s;
1256
- t[0] === n ? s = t[1] : (s = () => void n.submitAll(), t[0] = n, t[1] = s);
1257
+ function An() {
1258
+ let { edit: e } = Q();
1259
+ return j(e.store, jn);
1260
+ }
1261
+ function jn(e) {
1262
+ return e.openRowIds.filter((t) => !e.committedRowIds.includes(t) && !e.newRows.some((e) => e.tempId === t && e.committed) && (e.newRows.some((e) => e.tempId === t) || (e.rows[t]?.dirtyFields.length ?? 0) > 0)).length;
1263
+ }
1264
+ function Mn() {
1265
+ let t = e(11), { edit: n, labels: r } = Q(), i = Dn(), a = j(n.store, Nn), o = i === 0, s;
1266
+ t[0] === n ? s = t[1] : (s = () => void n.saveDrafts(), t[0] = n, t[1] = s);
1257
1267
  let c;
1258
- t[2] !== r || t[3] !== i ? (c = r.saveAllEdits(i), t[2] = r, t[3] = i, t[4] = c) : c = t[4];
1268
+ t[2] !== i || t[3] !== r ? (c = r.saveAllEdits(i), t[2] = i, t[3] = r, t[4] = c) : c = t[4];
1259
1269
  let l;
1260
- return t[5] !== a || t[6] !== o || t[7] !== s || t[8] !== c ? (l = /* @__PURE__ */ q(d, {
1270
+ return t[5] !== i || t[6] !== a || t[7] !== o || t[8] !== s || t[9] !== c ? (l = /* @__PURE__ */ q(d, {
1261
1271
  size: "compact-sm",
1262
1272
  disabled: o,
1263
1273
  loading: a,
1264
1274
  "data-dg-part": "save-all",
1275
+ "data-draft-count": i,
1265
1276
  onClick: s,
1266
1277
  children: c
1267
- }), t[5] = a, t[6] = o, t[7] = s, t[8] = c, t[9] = l) : l = t[9], l;
1278
+ }), t[5] = i, t[6] = a, t[7] = o, t[8] = s, t[9] = c, t[10] = l) : l = t[10], l;
1268
1279
  }
1269
- function kn(e) {
1280
+ function Nn(e) {
1270
1281
  return e.openRowIds.some((t) => e.rows[t]?.isSubmitting === !0);
1271
1282
  }
1272
- function An() {
1273
- let t = e(6), { edit: n, labels: r } = Q(), i = En() === 0, a;
1283
+ function Pn() {
1284
+ let t = e(6), { labels: n } = Q(), r = An();
1285
+ if (r === 0) return null;
1286
+ let i;
1287
+ t[0] !== n || t[1] !== r ? (i = n.editRowsStillOpen(r), t[0] = n, t[1] = r, t[2] = i) : i = t[2];
1288
+ let a;
1289
+ return t[3] !== r || t[4] !== i ? (a = /* @__PURE__ */ q(E, {
1290
+ size: "xs",
1291
+ c: "dimmed",
1292
+ "data-dg-part": "open-rows-note",
1293
+ "data-open-count": r,
1294
+ children: i
1295
+ }), t[3] = r, t[4] = i, t[5] = a) : a = t[5], a;
1296
+ }
1297
+ function Fn() {
1298
+ let t = e(6), { edit: n, labels: r } = Q(), i = Dn() + An() === 0, a;
1274
1299
  t[0] === n ? a = t[1] : (a = () => n.cancelAll(), t[0] = n, t[1] = a);
1275
1300
  let o;
1276
1301
  return t[2] !== r.discardAllEdits || t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ q(d, {
@@ -1283,38 +1308,46 @@ function An() {
1283
1308
  children: r.discardAllEdits
1284
1309
  }), t[2] = r.discardAllEdits, t[3] = i, t[4] = a, t[5] = o) : o = t[5], o;
1285
1310
  }
1286
- var jn = {
1287
- Save: On,
1288
- Discard: An
1311
+ var In = {
1312
+ Save: Mn,
1313
+ Discard: Fn,
1314
+ OpenRowsNote: Pn
1289
1315
  };
1290
- function Mn(t) {
1291
- let n = e(4), { renderActions: r } = t === void 0 ? {} : t, { edit: i, features: a } = Q(), o = En(), s = j(i.store, Nn);
1316
+ function Ln(t) {
1317
+ let n = e(5), { renderActions: r } = t === void 0 ? {} : t, { edit: i, features: a } = Q(), o = Dn(), s = An(), c = j(i.store, Rn);
1292
1318
  if (!a.editing) return null;
1293
1319
  if (r) {
1294
- let e, t;
1295
- return n[0] === i ? (e = n[1], t = n[2]) : (e = () => i.submitAll(), t = () => i.cancelAll(), n[0] = i, n[1] = e, n[2] = t), r({
1320
+ let e, t, a;
1321
+ return n[0] === i ? (e = n[1], t = n[2], a = n[3]) : (e = () => i.saveDrafts(), t = () => i.commitAll(), a = () => i.cancelAll(), n[0] = i, n[1] = e, n[2] = t, n[3] = a), r({
1296
1322
  state: {
1297
- pendingCount: o,
1298
- isSubmitting: s
1323
+ draftCount: o,
1324
+ openCount: s,
1325
+ pendingCount: o + s,
1326
+ isSubmitting: c
1299
1327
  },
1300
1328
  actions: {
1301
1329
  save: e,
1302
- discard: t
1330
+ commitAll: t,
1331
+ discard: a
1303
1332
  },
1304
- Controls: jn
1333
+ Controls: In
1305
1334
  });
1306
1335
  }
1307
- let c;
1308
- return n[3] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ J(p, {
1336
+ let l;
1337
+ return n[4] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ J(p, {
1309
1338
  gap: "xs",
1310
1339
  wrap: "nowrap",
1311
- children: [/* @__PURE__ */ q(On, {}), /* @__PURE__ */ q(An, {})]
1312
- }), n[3] = c) : c = n[3], c;
1340
+ children: [
1341
+ /* @__PURE__ */ q(Pn, {}),
1342
+ /* @__PURE__ */ q(Mn, {}),
1343
+ /* @__PURE__ */ q(Fn, {})
1344
+ ]
1345
+ }), n[4] = l) : l = n[4], l;
1313
1346
  }
1314
- function Nn(e) {
1347
+ function Rn(e) {
1315
1348
  return e.openRowIds.some((t) => e.rows[t]?.isSubmitting === !0);
1316
1349
  }
1317
- var Pn = {
1350
+ var zn = {
1318
1351
  filterPanel: "_filterPanel_izakx_4",
1319
1352
  filterRow: "_filterRow_izakx_16",
1320
1353
  filterPanelHeader: "_filterPanelHeader_izakx_22",
@@ -1322,16 +1355,16 @@ var Pn = {
1322
1355
  };
1323
1356
  //#endregion
1324
1357
  //#region src/tmdatagrid/core/columnOptions.ts
1325
- function Fn(e, t) {
1358
+ function Bn(e, t) {
1326
1359
  t == null || t === "" || e.add(String(t));
1327
1360
  }
1328
- function In({ table: e, column: t, row: n, fallback: r }) {
1361
+ function Vn({ table: e, column: t, row: n, fallback: r }) {
1329
1362
  let i = t.columnDef.meta?.options ?? r;
1330
1363
  if (!i) return [];
1331
1364
  if (i === "faceted") {
1332
1365
  let e = /* @__PURE__ */ new Set();
1333
- for (let n of t.getFacetedUniqueValues().keys()) if (Array.isArray(n)) for (let t of n) Fn(e, t);
1334
- else Fn(e, n);
1366
+ for (let n of t.getFacetedUniqueValues().keys()) if (Array.isArray(n)) for (let t of n) Bn(e, t);
1367
+ else Bn(e, n);
1335
1368
  return [...e].sort((e, t) => e.localeCompare(t, void 0, { numeric: !0 })).map((e) => ({ value: e }));
1336
1369
  }
1337
1370
  return (typeof i == "function" ? i({
@@ -1340,7 +1373,7 @@ function In({ table: e, column: t, row: n, fallback: r }) {
1340
1373
  row: n
1341
1374
  }) : i).map((e) => typeof e == "string" ? { value: e } : e);
1342
1375
  }
1343
- function Ln(e) {
1376
+ function Hn(e) {
1344
1377
  let t = [], n = /* @__PURE__ */ new Map();
1345
1378
  for (let r of e) {
1346
1379
  let e = {
@@ -1361,11 +1394,11 @@ function Ln(e) {
1361
1394
  }
1362
1395
  //#endregion
1363
1396
  //#region src/tmdatagrid/components/filters/TMDataGridFilterValueInput.tsx
1364
- function Rn(t) {
1365
- let n = e(64), { column: r, operator: i, value: a, onChange: o, options: s, size: c, labels: l } = t, u = mn(r), d;
1366
- n[0] === i ? d = n[1] : (d = ft(i), n[0] = i, n[1] = d);
1397
+ function Un(t) {
1398
+ let n = e(64), { column: r, operator: i, value: a, onChange: o, options: s, size: c, labels: l } = t, u = hn(r), d;
1399
+ n[0] === i ? d = n[1] : (d = pt(i), n[0] = i, n[1] = d);
1367
1400
  let f = d, m = typeof a == "string" ? a : "", h = u === "number" ? "number" : u === "date" ? "date" : "text";
1368
- if (mt(i)) {
1401
+ if (ht(i)) {
1369
1402
  let e;
1370
1403
  n[2] === a ? e = n[3] : (e = Array.isArray(a) ? [String(a[0] ?? ""), String(a[1] ?? "")] : ["", ""], n[2] = a, n[3] = e);
1371
1404
  let t = e, r;
@@ -1400,11 +1433,11 @@ function Rn(t) {
1400
1433
  children: [i, u]
1401
1434
  }), n[22] = i, n[23] = u, n[24] = d) : d = n[24], d;
1402
1435
  }
1403
- if (pt(i)) {
1436
+ if (mt(i)) {
1404
1437
  let e = l.filterValue, t;
1405
1438
  n[25] === Symbol.for("react.memo_cache_sentinel") ? (t = { withinPortal: !1 }, n[25] = t) : t = n[25];
1406
1439
  let r;
1407
- n[26] === s ? r = n[27] : (r = Ln(s), n[26] = s, n[27] = r);
1440
+ n[26] === s ? r = n[27] : (r = Hn(s), n[26] = s, n[27] = r);
1408
1441
  let i;
1409
1442
  n[28] === a ? i = n[29] : (i = Array.isArray(a) ? [...a] : [], n[28] = a, n[29] = i);
1410
1443
  let u;
@@ -1469,18 +1502,18 @@ function Rn(t) {
1469
1502
  }
1470
1503
  //#endregion
1471
1504
  //#region src/tmdatagrid/components/TMDataGridFilterPanel.tsx
1472
- var zn = {
1505
+ var Wn = {
1473
1506
  operator: "contains",
1474
1507
  value: ""
1475
1508
  };
1476
- function Bn(e) {
1477
- return gt(e) ? e : zn;
1509
+ function Gn(e) {
1510
+ return _t(e) ? e : Wn;
1478
1511
  }
1479
- function Vn(e) {
1480
- return pt(e) ? "set" : mt(e) ? "range" : "scalar";
1512
+ function Kn(e) {
1513
+ return mt(e) ? "set" : ht(e) ? "range" : "scalar";
1481
1514
  }
1482
- function Hn() {
1483
- let t = e(76), { table: n, ui: r, labels: a, controlSize: o } = Q(), c = j(r, Kn), u = j(n.store, Gn), f = s(null), p, m;
1515
+ function qn() {
1516
+ let t = e(76), { table: n, ui: r, labels: a, controlSize: o } = Q(), c = j(r, Zn), u = j(n.store, Xn), f = s(null), p, m;
1484
1517
  if (t[0] !== c || t[1] !== r ? (p = () => {
1485
1518
  if (!c) return;
1486
1519
  let e = (e) => {
@@ -1491,12 +1524,12 @@ function Hn() {
1491
1524
  }, m = [c, r], t[0] = c, t[1] = r, t[2] = p, t[3] = m) : (p = t[2], m = t[3]), i(p, m), !c) return null;
1492
1525
  let h, g, _, v, y, b, x, S;
1493
1526
  if (t[4] !== u || t[5] !== n || t[6] !== r.actions) {
1494
- let e = n.getAllLeafColumns().filter(Wn);
1495
- y = e.map(Un), x = function(e) {
1527
+ let e = n.getAllLeafColumns().filter(Yn);
1528
+ y = e.map(Jn), x = function(e) {
1496
1529
  let t = u.filter((t) => t.id !== e);
1497
1530
  n.setColumnFilters(t), t.length === 0 && r.actions.closeFilterPanel();
1498
1531
  }, g = function(e, t) {
1499
- let i = Bn(u.find((t) => t.id === e)?.value), a = n.getColumn(t), o = a ? hn(a) : dt("string"), s = Vn(o) === Vn(i.operator) ? i.value : ht(o);
1532
+ let i = Gn(u.find((t) => t.id === e)?.value), a = n.getColumn(t), o = a ? gn(a) : ft("string"), s = Kn(o) === Kn(i.operator) ? i.value : gt(o);
1500
1533
  n.setColumnFilters(u.filter((e) => e.id !== t).map((n) => n.id === e ? {
1501
1534
  id: t,
1502
1535
  value: {
@@ -1510,14 +1543,14 @@ function Hn() {
1510
1543
  n.setColumnFilters(u.map((n) => n.id === e ? {
1511
1544
  ...n,
1512
1545
  value: {
1513
- ...Bn(n.value),
1546
+ ...Gn(n.value),
1514
1547
  ...t
1515
1548
  }
1516
1549
  } : n));
1517
1550
  }, t[15] = u, t[16] = n, t[17] = i) : i = t[17], b = i;
1518
1551
  let a;
1519
1552
  t[18] !== u || t[19] !== b ? (a = function(e, t) {
1520
- let n = Bn(u.find((t) => t.id === e)?.value), r = Vn(t) === Vn(n.operator) ? n.value : ht(t);
1553
+ let n = Gn(u.find((t) => t.id === e)?.value), r = Kn(t) === Kn(n.operator) ? n.value : gt(t);
1521
1554
  b(e, {
1522
1555
  operator: t,
1523
1556
  value: r
@@ -1529,12 +1562,12 @@ function Hn() {
1529
1562
  }, t[21] = n, t[22] = r.actions, t[23] = o) : o = t[23], v = o, h = function() {
1530
1563
  let t = e.find((e) => !u.some((t) => t.id === e.id));
1531
1564
  if (!t) return;
1532
- let r = hn(t);
1565
+ let r = gn(t);
1533
1566
  n.setColumnFilters([...u, {
1534
1567
  id: t.id,
1535
1568
  value: {
1536
1569
  operator: r,
1537
- value: ht(r)
1570
+ value: gt(r)
1538
1571
  }
1539
1572
  }]);
1540
1573
  };
@@ -1569,22 +1602,22 @@ function Hn() {
1569
1602
  }), t[32] = a.closeFilters, t[33] = r.actions.closeFilterPanel, t[34] = N) : N = t[34];
1570
1603
  let P;
1571
1604
  t[35] !== A || t[36] !== N ? (P = /* @__PURE__ */ J("div", {
1572
- className: Pn.filterPanelHeader,
1605
+ className: zn.filterPanelHeader,
1573
1606
  children: [A, N]
1574
1607
  }), t[35] = A, t[36] = N, t[37] = P) : P = t[37];
1575
1608
  let F;
1576
1609
  if (t[38] !== g || t[39] !== _ || t[40] !== u || t[41] !== y || t[42] !== o || t[43] !== a || t[44] !== b || t[45] !== x || t[46] !== n) {
1577
1610
  let e;
1578
1611
  t[48] !== g || t[49] !== _ || t[50] !== y || t[51] !== o || t[52] !== a || t[53] !== b || t[54] !== x || t[55] !== n ? (e = (e) => {
1579
- let t = n.getColumn(e.id), r = Bn(e.value), i = t ? mn(t) : "string", s = ft(r.operator), c = typeof r.value == "string" ? r.value : "", u = t && (t.columnDef.meta?.options !== void 0 || i === "select" || i === "multiSelect") ? In({
1612
+ let t = n.getColumn(e.id), r = Gn(e.value), i = t ? hn(t) : "string", s = pt(r.operator), c = typeof r.value == "string" ? r.value : "", u = t && (t.columnDef.meta?.options !== void 0 || i === "select" || i === "multiSelect") ? Vn({
1580
1613
  table: n,
1581
1614
  column: t,
1582
1615
  fallback: "faceted"
1583
- }) : [], d = (t === void 0 ? void 0 : gn(t)) ?? Rn;
1616
+ }) : [], d = (t === void 0 ? void 0 : _n(t)) ?? Un;
1584
1617
  return /* @__PURE__ */ J("div", {
1585
1618
  "data-dg-part": "filter-row",
1586
1619
  "data-column-id": e.id,
1587
- className: Pn.filterRow,
1620
+ className: zn.filterRow,
1588
1621
  children: [
1589
1622
  /* @__PURE__ */ q(l, {
1590
1623
  variant: "subtle",
@@ -1616,7 +1649,7 @@ function Hn() {
1616
1649
  allowDeselect: !1,
1617
1650
  comboboxProps: { withinPortal: !1 },
1618
1651
  "data-dg-part": "filter-operator",
1619
- data: ut(i).map((e) => ({
1652
+ data: dt(i).map((e) => ({
1620
1653
  value: e,
1621
1654
  label: a.operators[e]
1622
1655
  })),
@@ -1667,7 +1700,7 @@ function Hn() {
1667
1700
  }), t[61] = v, t[62] = a.clearAllFilters, t[63] = R, t[64] = z) : z = t[64];
1668
1701
  let B;
1669
1702
  t[65] !== L || t[66] !== z ? (B = /* @__PURE__ */ J("div", {
1670
- className: Pn.filterPanelFooter,
1703
+ className: zn.filterPanelFooter,
1671
1704
  children: [L, z]
1672
1705
  }), t[65] = L, t[66] = z, t[67] = B) : B = t[67];
1673
1706
  let V;
@@ -1681,44 +1714,45 @@ function Hn() {
1681
1714
  role: "group",
1682
1715
  "aria-label": O,
1683
1716
  "data-dg-part": "filter-panel",
1684
- className: Pn.filterPanel,
1717
+ className: zn.filterPanel,
1685
1718
  onKeyDown: k,
1686
1719
  children: [P, V]
1687
1720
  }), t[71] = a.filters, t[72] = V, t[73] = k, t[74] = P, t[75] = H) : H = t[75], H;
1688
1721
  }
1689
- function Un(e) {
1722
+ function Jn(e) {
1690
1723
  return {
1691
1724
  value: e.id,
1692
- label: pn(e)
1725
+ label: mn(e)
1693
1726
  };
1694
1727
  }
1695
- function Wn(e) {
1728
+ function Yn(e) {
1696
1729
  return e.getCanFilter();
1697
1730
  }
1698
- function Gn(e) {
1731
+ function Xn(e) {
1699
1732
  return e.columnFilters;
1700
1733
  }
1701
- function Kn(e) {
1734
+ function Zn(e) {
1702
1735
  return e.filterPanelOpen;
1703
1736
  }
1704
- var qn = {
1737
+ var Qn = {
1705
1738
  filterPills: "_filterPills_14wl0_3",
1706
1739
  pill: "_pill_14wl0_15",
1707
1740
  pillLabel: "_pillLabel_14wl0_27"
1708
- }, Jn = {
1741
+ }, $n = {
1709
1742
  active: null,
1710
1743
  openRowIds: [],
1711
1744
  rows: {},
1745
+ committedRowIds: [],
1712
1746
  newRows: [],
1713
1747
  deletedRowIds: []
1714
1748
  };
1715
- function Yn(e) {
1749
+ function er(e) {
1716
1750
  let t = e.columnDef.meta?.edit?.field;
1717
1751
  if (t) return t;
1718
1752
  let n = e.columnDef.accessorKey;
1719
1753
  return typeof n == "string" ? n : null;
1720
1754
  }
1721
- function Xn(e) {
1755
+ function tr(e) {
1722
1756
  switch (e) {
1723
1757
  case "string": return "";
1724
1758
  case "multiSelect": return [];
@@ -1726,7 +1760,7 @@ function Xn(e) {
1726
1760
  default: return null;
1727
1761
  }
1728
1762
  }
1729
- function Zn(e) {
1763
+ function nr(e) {
1730
1764
  let t = e.state.fieldMeta;
1731
1765
  for (let [n, r] of Object.entries(t)) {
1732
1766
  let t = Object.entries(r.errorSourceMap ?? {}).filter(([, e]) => e === "form").map(([e]) => e);
@@ -1739,20 +1773,83 @@ function Zn(e) {
1739
1773
  }));
1740
1774
  }
1741
1775
  }
1742
- function Qn(e, t) {
1776
+ function rr(e, t) {
1743
1777
  return Object.is(e, t) ? !0 : Array.isArray(e) && Array.isArray(t) ? e.length === t.length && e.every((e, n) => Object.is(e, t[n])) : e instanceof Date && t instanceof Date && e.getTime() === t.getTime();
1744
1778
  }
1745
- function $n(e) {
1779
+ function ir(e) {
1746
1780
  return e.some((e) => e != null);
1747
1781
  }
1748
- function er(e) {
1749
- let t = new ge(Jn), n = /* @__PURE__ */ new Map(), r = 0, i = !1, a = null, o = null, s = () => e().table.getAllLeafColumns().filter((e) => !bn(e.id) && !_n(e) && Yn(e) !== null), c = (e, t) => {
1782
+ var ar = [
1783
+ "onChange",
1784
+ "onChangeAsync",
1785
+ "onSubmit",
1786
+ "onSubmitAsync"
1787
+ ];
1788
+ function or(e) {
1789
+ return e != null && e !== !1;
1790
+ }
1791
+ async function sr(e, t) {
1792
+ if (typeof e == "function") return await e({
1793
+ value: t,
1794
+ fieldApi: void 0
1795
+ });
1796
+ if (typeof e == "object" && e && "~standard" in e) {
1797
+ let { issues: n } = await e["~standard"].validate(t);
1798
+ return n === void 0 || n.length === 0 ? void 0 : n[0]?.message ?? "Invalid";
1799
+ }
1800
+ }
1801
+ function cr(e) {
1802
+ let t = new ge($n), n = /* @__PURE__ */ new Map(), r = 0, i = !1, a = null, o = null, s = () => e().table.getAllLeafColumns().filter((e) => !xn(e.id) && !vn(e) && er(e) !== null), c = async (e, t, n) => {
1803
+ let r = n ? void 0 : b(t), i = {};
1804
+ for (let t of s()) {
1805
+ if (r !== void 0 && !yn(t, r)) continue;
1806
+ let n = er(t);
1807
+ if (n === null) continue;
1808
+ let a = lr(t.columnDef.meta?.edit?.validate);
1809
+ if (a === void 0) continue;
1810
+ let o = me(e, n);
1811
+ for (let e of ar) {
1812
+ let t = a[e];
1813
+ if (t === void 0) continue;
1814
+ let r = await sr(t, o);
1815
+ if (or(r)) {
1816
+ i[n] = r;
1817
+ break;
1818
+ }
1819
+ }
1820
+ }
1821
+ return Object.keys(i).length > 0 ? i : void 0;
1822
+ }, l = (t, n) => {
1823
+ let r = e().rowValidators ?? {}, i = r.onSubmitAsync;
1824
+ return {
1825
+ ...r,
1826
+ onSubmitAsync: async (e) => {
1827
+ let r = i === void 0 ? void 0 : await i(e), a = await c(e.value, t, n);
1828
+ if (a === void 0) return r;
1829
+ if (!or(r)) return { fields: a };
1830
+ if (typeof r == "object" && r) {
1831
+ let e = r;
1832
+ return {
1833
+ ...e,
1834
+ fields: {
1835
+ ...a,
1836
+ ...e.fields ?? {}
1837
+ }
1838
+ };
1839
+ }
1840
+ return {
1841
+ form: r,
1842
+ fields: a
1843
+ };
1844
+ }
1845
+ };
1846
+ }, u = (e, t) => {
1750
1847
  let n = [];
1751
1848
  for (let r of s()) {
1752
- let i = Yn(r);
1849
+ let i = er(r);
1753
1850
  if (i === null) continue;
1754
1851
  let a = me(e.original, i), o = me(t, i);
1755
- Qn(a, o) || n.push({
1852
+ rr(a, o) || n.push({
1756
1853
  columnId: r.id,
1757
1854
  field: i,
1758
1855
  previous: a,
@@ -1760,42 +1857,48 @@ function er(e) {
1760
1857
  });
1761
1858
  }
1762
1859
  return n;
1763
- }, l = (e) => {
1764
- let t = e.form.state, n = Object.entries(t.fieldMeta).filter(([e, t]) => e !== "" && $n(t.errors)).map(([e]) => e);
1860
+ }, d = (e) => {
1861
+ let t = e.form.state, n = Object.entries(t.fieldMeta).filter(([e, t]) => e !== "" && ir(t.errors)).map(([e]) => e);
1765
1862
  return {
1766
- dirtyFields: c(e, t.values).map((e) => e.field),
1863
+ dirtyFields: u(e, t.values).map((e) => e.field),
1767
1864
  errorFields: n,
1768
- hasRowError: $n(t.errors),
1865
+ hasRowError: ir(t.errors),
1769
1866
  isSubmitting: t.isSubmitting,
1770
1867
  values: t.values
1771
1868
  };
1772
- }, u = (e) => {
1869
+ }, f = (e) => {
1773
1870
  let r = n.get(e);
1774
1871
  t.setState((t) => {
1775
1872
  let i = { ...t.rows };
1776
- return r === void 0 ? delete i[e] : i[e] = l(r), {
1873
+ return r === void 0 ? delete i[e] : i[e] = d(r), {
1777
1874
  ...t,
1778
1875
  rows: i,
1779
1876
  openRowIds: [...n.keys()]
1780
1877
  };
1781
1878
  });
1782
- }, d = (e) => {
1879
+ }, p = (e) => {
1783
1880
  t.setState((t) => ({
1784
1881
  ...t,
1785
1882
  active: e
1786
1883
  }));
1787
- }, f = (e, n) => {
1884
+ }, m = (e, n) => {
1788
1885
  t.setState((t) => {
1789
1886
  let r = t.newRows.find((t) => t.tempId === e);
1790
- return r === void 0 || r.confirmed === n ? t : {
1887
+ return r === void 0 || r.committed === n ? t : {
1791
1888
  ...t,
1792
1889
  newRows: t.newRows.map((t) => t.tempId === e ? {
1793
1890
  ...t,
1794
- confirmed: n
1891
+ committed: n
1795
1892
  } : t)
1796
1893
  };
1797
1894
  });
1798
- }, p = (e) => {
1895
+ }, h = (e, r) => {
1896
+ let i = n.get(e);
1897
+ i !== void 0 && (i.committed = r), t.setState((t) => t.committedRowIds.includes(e) === r ? t : {
1898
+ ...t,
1899
+ committedRowIds: r ? [...t.committedRowIds, e] : t.committedRowIds.filter((t) => t !== e)
1900
+ });
1901
+ }, g = (e) => {
1799
1902
  let r = n.get(e);
1800
1903
  r !== void 0 && (r.unsubscribe(), r.unmount(), n.delete(e), t.setState((t) => {
1801
1904
  let i = { ...t.rows };
@@ -1803,14 +1906,16 @@ function er(e) {
1803
1906
  ...t,
1804
1907
  rows: i,
1805
1908
  openRowIds: [...n.keys()],
1909
+ committedRowIds: t.committedRowIds.filter((t) => t !== e),
1806
1910
  newRows: r.isNew ? t.newRows.filter((t) => t.tempId !== e) : t.newRows,
1807
1911
  active: t.active?.rowId === e ? null : t.active
1808
1912
  };
1809
1913
  }));
1810
- }, m = (t, r, i) => {
1914
+ }, _ = (t, r, i) => {
1811
1915
  let s = {
1812
1916
  original: r,
1813
1917
  isNew: i,
1918
+ committed: !1,
1814
1919
  lastSubmitOk: !1,
1815
1920
  parkOnly: !1,
1816
1921
  pendingCommit: null,
@@ -1818,7 +1923,7 @@ function er(e) {
1818
1923
  unmount: () => {},
1819
1924
  form: new pe({
1820
1925
  defaultValues: r,
1821
- validators: e().rowValidators,
1926
+ validators: l(t, i),
1822
1927
  onSubmit: async ({ value: n }) => {
1823
1928
  if (s.isNew) {
1824
1929
  let r = {
@@ -1844,7 +1949,7 @@ function er(e) {
1844
1949
  rowId: t,
1845
1950
  value: n,
1846
1951
  original: r,
1847
- changes: c(s, n),
1952
+ changes: u(s, n),
1848
1953
  source: e().editMode
1849
1954
  };
1850
1955
  if (a !== null) {
@@ -1864,86 +1969,118 @@ function er(e) {
1864
1969
  })
1865
1970
  };
1866
1971
  s.unmount = s.form.mount();
1867
- let l = s.form.store.subscribe(() => u(t));
1868
- return s.unsubscribe = () => l.unsubscribe(), n.set(t, s), u(t), s;
1869
- }, h = (t) => !t.getIsGrouped() && e().isRowEditable?.(t) !== !1, g = (t, n) => {
1972
+ let c = s.form.store.subscribe(() => f(t));
1973
+ return s.unsubscribe = () => c.unsubscribe(), n.set(t, s), f(t), s;
1974
+ }, v = (t) => !t.getIsGrouped() && e().isRowEditable?.(t) !== !1, y = (t, n) => {
1870
1975
  let r = e();
1871
- return !(t.getIsGrouped() || bn(n.id) || Yn(n) === null || !vn(n, t) || r.isRowEditable !== void 0 && !r.isRowEditable(t));
1872
- }, _ = (t) => {
1976
+ return !(t.getIsGrouped() || xn(n.id) || er(n) === null || !yn(n, t) || r.isRowEditable !== void 0 && !r.isRowEditable(t));
1977
+ }, b = (t) => {
1873
1978
  try {
1874
1979
  return e().table.getRow(t);
1875
1980
  } catch {
1876
1981
  return;
1877
1982
  }
1878
- }, v = async (r) => {
1983
+ }, x = async (r) => {
1879
1984
  let a = n.get(r);
1880
- return a === void 0 ? !0 : a.pendingCommit === null ? !a.isNew && c(a, a.form.state.values).length === 0 ? (p(r), !0) : (Zn(a.form), a.lastSubmitOk = !1, a.parkOnly = e().editMode === "draft" && !i, a.pendingCommit = (async () => {
1985
+ return a === void 0 ? !0 : a.pendingCommit === null ? !a.isNew && u(a, a.form.state.values).length === 0 ? (g(r), !0) : (nr(a.form), a.lastSubmitOk = !1, a.parkOnly = e().editMode === "draft" && !i, a.pendingCommit = (async () => {
1881
1986
  try {
1882
1987
  await a.form.handleSubmit();
1883
1988
  } finally {
1884
1989
  a.pendingCommit = null;
1885
1990
  }
1886
- return a.lastSubmitOk ? a.parkOnly ? (a.isNew && f(r, !0), t.setState((e) => e.active?.rowId === r ? {
1991
+ return a.lastSubmitOk ? a.parkOnly ? (a.committed = !0, a.isNew ? m(r, !0) : h(r, !0), t.setState((e) => e.active?.rowId === r ? {
1887
1992
  ...e,
1888
1993
  active: null
1889
- } : e), !0) : (p(r), !0) : !1;
1994
+ } : e), !0) : (g(r), !0) : !1;
1890
1995
  })(), a.pendingCommit) : a.pendingCommit;
1891
- }, y = (t, r) => {
1892
- if (n.get(t)?.isNew === !0) {
1893
- f(t, !1), d({
1996
+ }, S = (t, r) => {
1997
+ let i = n.get(t);
1998
+ if (i?.isNew === !0) {
1999
+ i.committed = !1, m(t, !1), p({
1894
2000
  rowId: t,
1895
2001
  columnId: r
1896
2002
  });
1897
2003
  return;
1898
2004
  }
1899
- let i = _(t);
1900
- if (i !== void 0) {
2005
+ let a = b(t);
2006
+ if (a !== void 0) {
1901
2007
  if (r !== null) {
1902
2008
  let t = e().table.getColumn(r);
1903
- if (t === void 0 || !g(i, t)) return;
1904
- } else if (e().isRowEditable?.(i) === !1) return;
1905
- n.has(t) || m(t, i.original, !1), d({
2009
+ if (t === void 0 || !y(a, t)) return;
2010
+ } else if (e().isRowEditable?.(a) === !1) return;
2011
+ n.has(t) ? n.get(t)?.committed === !0 && h(t, !1) : _(t, a.original, !1), p({
1906
2012
  rowId: t,
1907
2013
  columnId: r
1908
2014
  });
1909
2015
  }
1910
- }, b = ({ rowId: t, columnId: r }) => {
2016
+ }, C = ({ rowId: t, columnId: r }) => {
1911
2017
  let { editMode: i } = e();
1912
2018
  if (i === "cell") {
1913
2019
  let e = [...n.keys()].find((e) => e !== t);
1914
2020
  if (e !== void 0) {
1915
- v(e).then((e) => {
1916
- e && y(t, r);
2021
+ x(e).then((e) => {
2022
+ e && S(t, r);
1917
2023
  });
1918
2024
  return;
1919
2025
  }
1920
2026
  }
1921
- y(t, r);
1922
- }, x = (e) => {
1923
- p(e);
1924
- }, S = () => {
1925
- d(null);
1926
- }, C = () => {
1927
- for (let e of [...n.keys()]) p(e);
2027
+ S(t, r);
2028
+ }, w = (e) => {
2029
+ g(e);
2030
+ }, T = () => {
2031
+ p(null);
2032
+ }, E = () => {
2033
+ for (let e of [...n.keys()]) g(e);
1928
2034
  t.setState((e) => ({
1929
2035
  ...e,
1930
2036
  active: null,
2037
+ committedRowIds: [],
1931
2038
  deletedRowIds: []
1932
2039
  }));
1933
- }, w = () => {
1934
- let n = e();
2040
+ }, D = (e) => {
1935
2041
  r += 1;
1936
- let i = `__new__${r}`, a = typeof n.newRowDefaults == "function" ? n.newRowDefaults() : n.newRowDefaults ?? {};
1937
- return m(i, a, !0), t.setState((e) => ({
2042
+ let n = `__new__${r}`;
2043
+ return _(n, O(e), !0), t.setState((e) => ({
1938
2044
  ...e,
1939
2045
  newRows: [...e.newRows, {
1940
- tempId: i,
1941
- confirmed: !1
2046
+ tempId: n,
2047
+ committed: !1
1942
2048
  }]
1943
- })), i;
1944
- }, T = (r) => {
2049
+ })), n;
2050
+ }, O = (t) => {
2051
+ let { newRowDefaults: n } = e();
2052
+ return {
2053
+ ...typeof n == "function" ? n() : n ?? {},
2054
+ ...t
2055
+ };
2056
+ }, k = async (e, n) => {
2057
+ let i = [];
2058
+ if (_e(() => {
2059
+ for (let t of e) {
2060
+ r += 1;
2061
+ let e = `__new__${r}`;
2062
+ _(e, O(t), !0), i.push(e);
2063
+ }
2064
+ t.setState((e) => ({
2065
+ ...e,
2066
+ newRows: [...e.newRows, ...i.map((e) => ({
2067
+ tempId: e,
2068
+ committed: !1
2069
+ }))]
2070
+ }));
2071
+ }), n?.commit !== !0) return {
2072
+ committed: [],
2073
+ open: i
2074
+ };
2075
+ let a = [], o = [];
2076
+ for (let e of i) (await x(e) ? a : o).push(e);
2077
+ return {
2078
+ committed: a,
2079
+ open: o
2080
+ };
2081
+ }, A = (r) => {
1945
2082
  if (n.get(r)?.isNew === !0) {
1946
- p(r);
2083
+ g(r);
1947
2084
  return;
1948
2085
  }
1949
2086
  let i = e();
@@ -1954,32 +2091,37 @@ function er(e) {
1954
2091
  }));
1955
2092
  return;
1956
2093
  }
1957
- let a = _(r);
2094
+ let a = b(r);
1958
2095
  a !== void 0 && i.onRowDelete?.({
1959
2096
  rowId: r,
1960
2097
  row: a
1961
2098
  });
1962
- }, E = () => {
2099
+ }, j = () => {
1963
2100
  let t = e();
1964
- return t.editMode === "draft" ? t.onRowDelete !== void 0 || t.onEditCommitDrafts !== void 0 : t.onRowDelete !== void 0;
1965
- }, D = () => {
2101
+ return t.editMode === "draft" ? t.onRowDelete !== void 0 || t.onSaveDrafts !== void 0 : t.onRowDelete !== void 0;
2102
+ }, M = () => {
1966
2103
  let e = [...t.state.deletedRowIds];
1967
2104
  return e.length > 0 && t.setState((e) => ({
1968
2105
  ...e,
1969
2106
  deletedRowIds: []
1970
2107
  })), e;
1971
- }, O = async () => {
2108
+ }, N = () => [...n.keys()].filter((e) => n.get(e)?.committed === !0), P = async () => {
2109
+ let e = [...n.keys()].filter((e) => n.get(e)?.committed !== !0);
2110
+ return (await Promise.all(e.map((e) => x(e)))).every(Boolean);
2111
+ }, F = async () => {
1972
2112
  i = !0;
1973
2113
  try {
1974
- return await k();
2114
+ return await I();
1975
2115
  } finally {
1976
2116
  i = !1;
1977
2117
  }
1978
- }, k = async () => {
1979
- if (e().onEditCommitDrafts === void 0) {
1980
- let t = await Promise.all([...n.keys()].map((e) => v(e)));
1981
- for (let t of D()) {
1982
- let n = _(t);
2118
+ }, I = async () => {
2119
+ let r = N(), i = [...t.state.deletedRowIds];
2120
+ if (r.length === 0 && i.length === 0) return !0;
2121
+ if (e().onSaveDrafts === void 0) {
2122
+ let t = await Promise.all(r.map((e) => x(e)));
2123
+ for (let t of M()) {
2124
+ let n = b(t);
1983
2125
  n !== void 0 && await e().onRowDelete?.({
1984
2126
  rowId: t,
1985
2127
  row: n
@@ -1987,42 +2129,36 @@ function er(e) {
1987
2129
  }
1988
2130
  return t.every(Boolean);
1989
2131
  }
1990
- let r = [], i = [];
1991
- a = r, o = i;
1992
- let s = !0;
2132
+ let s = [], c = [];
2133
+ a = s, o = c;
2134
+ let l = !0;
1993
2135
  try {
1994
- for (let e of [...n.keys()]) {
2136
+ for (let e of r) {
1995
2137
  let t = n.get(e);
1996
- if (t !== void 0) {
1997
- if (!t.isNew && c(t, t.form.state.values).length === 0) {
1998
- p(e);
1999
- continue;
2000
- }
2001
- t.lastSubmitOk = !1, await t.form.handleSubmit(), t.lastSubmitOk || (s = !1);
2002
- }
2138
+ t !== void 0 && (t.lastSubmitOk = !1, await t.form.handleSubmit(), t.lastSubmitOk || (l = !1));
2003
2139
  }
2004
2140
  } finally {
2005
2141
  a = null, o = null;
2006
2142
  }
2007
- let l = [...t.state.deletedRowIds];
2008
- if (r.length > 0 || i.length > 0 || l.length > 0) {
2143
+ let u = i;
2144
+ if (s.length > 0 || c.length > 0 || u.length > 0) {
2009
2145
  try {
2010
- await e().onEditCommitDrafts?.({
2011
- rows: r,
2012
- added: i,
2013
- deleted: l
2146
+ await e().onSaveDrafts?.({
2147
+ rows: s,
2148
+ added: c,
2149
+ deleted: u
2014
2150
  });
2015
2151
  } catch {
2016
2152
  return !1;
2017
2153
  }
2018
- for (let e of r) p(e.rowId);
2019
- for (let e of i) p(e.tempId);
2020
- l.length > 0 && t.setState((e) => ({
2154
+ for (let e of s) g(e.rowId);
2155
+ for (let e of c) g(e.tempId);
2156
+ u.length > 0 && t.setState((e) => ({
2021
2157
  ...e,
2022
- deletedRowIds: e.deletedRowIds.filter((e) => !l.includes(e))
2158
+ deletedRowIds: e.deletedRowIds.filter((e) => !u.includes(e))
2023
2159
  }));
2024
2160
  }
2025
- return s;
2161
+ return l;
2026
2162
  };
2027
2163
  return {
2028
2164
  store: t,
@@ -2030,58 +2166,64 @@ function er(e) {
2030
2166
  return t.state;
2031
2167
  },
2032
2168
  getForm: (e) => n.get(e)?.form,
2033
- canEditCell: g,
2034
- canEditRow: h,
2035
- begin: b,
2036
- commit: v,
2037
- cancel: x,
2038
- deactivate: S,
2039
- cancelAll: C,
2040
- submitAll: O,
2169
+ canEditCell: y,
2170
+ canEditRow: v,
2171
+ begin: C,
2172
+ commit: x,
2173
+ cancel: w,
2174
+ deactivate: T,
2175
+ cancelAll: E,
2176
+ commitAll: P,
2177
+ saveDrafts: F,
2178
+ submitAll: async () => {
2179
+ let e = await P(), t = await F();
2180
+ return e && t;
2181
+ },
2041
2182
  clearCell: async (t, r) => {
2042
- let i = e(), a = _(t), o = i.table.getColumn(r);
2043
- if (a === void 0 || o === void 0 || !g(a, o)) return !1;
2044
- let s = Yn(o);
2045
- return s === null ? !1 : ((n.get(t) ?? m(t, a.original, !1)).form.setFieldValue(s, Xn(o.columnDef.meta?.type ?? "string")), v(t));
2183
+ let i = e(), a = b(t), o = i.table.getColumn(r);
2184
+ if (a === void 0 || o === void 0 || !y(a, o)) return !1;
2185
+ let s = er(o);
2186
+ return s === null ? !1 : ((n.get(t) ?? _(t, a.original, !1)).form.setFieldValue(s, tr(o.columnDef.meta?.type ?? "string")), x(t));
2046
2187
  },
2047
- addRow: w,
2048
- deleteRow: T,
2049
- canDeleteRows: E
2188
+ addRow: D,
2189
+ addRows: k,
2190
+ deleteRow: A,
2191
+ canDeleteRows: j
2050
2192
  };
2051
2193
  }
2052
- function tr(e) {
2194
+ function lr(e) {
2053
2195
  if (e !== void 0) return typeof e == "function" || "~standard" in e ? { onChange: e } : e;
2054
2196
  }
2055
- function nr(e) {
2197
+ function ur(e) {
2056
2198
  if (typeof e != "object" || !e) return !1;
2057
2199
  let t = e.fuzzyRank;
2058
2200
  return typeof t == "object" && !!t && typeof t.rank == "number";
2059
2201
  }
2060
- function rr(e, t, n, r) {
2061
- let i = Ke(String(e.getValue(t) ?? ""), String(n));
2202
+ function dr(e, t, n, r) {
2203
+ let i = qe(String(e.getValue(t) ?? ""), String(n));
2062
2204
  return r?.({ fuzzyRank: i }), i.passed;
2063
2205
  }
2064
- function ir(e) {
2206
+ function fr(e) {
2065
2207
  let t = null, { columnFiltersMeta: n } = e;
2066
- for (let e of Object.values(n ?? {})) nr(e) && (t === null || e.fuzzyRank.rank > t.rank) && (t = e.fuzzyRank);
2208
+ for (let e of Object.values(n ?? {})) ur(e) && (t === null || e.fuzzyRank.rank > t.rank) && (t = e.fuzzyRank);
2067
2209
  return t;
2068
2210
  }
2069
- function ar(e) {
2211
+ function pr(e) {
2070
2212
  let { globalFilterFn: t } = e.options;
2071
2213
  if (t !== "tmDataGridFuzzy") return !1;
2072
2214
  let n = e.store.state;
2073
2215
  return (n.sorting?.length ?? 0) === 0 && (n.grouping?.length ?? 0) === 0 && typeof n.globalFilter == "string" && n.globalFilter.trim() !== "";
2074
2216
  }
2075
- function or() {
2076
- let e = Me();
2217
+ function mr() {
2218
+ let e = Ne();
2077
2219
  return (t) => {
2078
2220
  let n = e(t), r = null, i = null;
2079
2221
  return () => {
2080
2222
  let e = n();
2081
- return ar(t) ? e === r && i !== null ? i : (i = {
2223
+ return pr(t) ? e === r && i !== null ? i : (i = {
2082
2224
  rows: [...e.rows].sort((e, t) => {
2083
- let n = ir(e), r = ir(t);
2084
- return n !== null && r !== null ? Ge(n, r) : n === null ? r === null ? 0 : 1 : -1;
2225
+ let n = fr(e), r = fr(t);
2226
+ return n !== null && r !== null ? Ke(n, r) : n === null ? r === null ? 0 : 1 : -1;
2085
2227
  }),
2086
2228
  flatRows: e.flatRows,
2087
2229
  rowsById: e.rowsById
@@ -2091,8 +2233,8 @@ function or() {
2091
2233
  }
2092
2234
  //#endregion
2093
2235
  //#region src/tmdatagrid/core/labels.ts
2094
- var sr = {
2095
- operators: $e,
2236
+ var hr = {
2237
+ operators: et,
2096
2238
  manageColumns: "Manage columns",
2097
2239
  filters: "Filters",
2098
2240
  searchPlaceholder: "Search",
@@ -2155,6 +2297,7 @@ var sr = {
2155
2297
  editRowErrors: "Fix the marked cells",
2156
2298
  saveAllEdits: (e) => e === 1 ? "Save 1 row" : `Save ${e} rows`,
2157
2299
  discardAllEdits: "Discard",
2300
+ editRowsStillOpen: (e) => e === 1 ? "1 row still being edited" : `${e} rows still being edited`,
2158
2301
  confirmNewRow: "Add row",
2159
2302
  discardNewRow: "Discard new row",
2160
2303
  deleteRow: "Delete row",
@@ -2181,32 +2324,32 @@ var sr = {
2181
2324
  expandGroup: (e) => `Expand ${e}`,
2182
2325
  collapseGroup: (e) => `Collapse ${e}`
2183
2326
  };
2184
- function cr(e) {
2327
+ function gr(e) {
2185
2328
  return e ? {
2186
- ...sr,
2329
+ ...hr,
2187
2330
  ...e,
2188
2331
  operators: {
2189
- ...sr.operators,
2332
+ ...hr.operators,
2190
2333
  ...e.operators
2191
2334
  }
2192
- } : sr;
2335
+ } : hr;
2193
2336
  }
2194
2337
  //#endregion
2195
2338
  //#region src/tmdatagrid/core/persistence.ts
2196
- var lr = [
2339
+ var _r = [
2197
2340
  "columnFilters",
2198
2341
  "globalFilter",
2199
2342
  "sorting",
2200
2343
  "pagination",
2201
2344
  "expanded"
2202
- ], ur = [
2345
+ ], vr = [
2203
2346
  "columnVisibility",
2204
2347
  "columnSizing",
2205
2348
  "columnOrder",
2206
2349
  "columnPinning",
2207
2350
  "grouping"
2208
- ], dr = 1, fr = "__v";
2209
- function pr(e, t) {
2351
+ ], yr = 1, br = "__v";
2352
+ function xr(e, t) {
2210
2353
  if (!e) return null;
2211
2354
  if (typeof e == "string") return {
2212
2355
  key: e,
@@ -2218,7 +2361,7 @@ function pr(e, t) {
2218
2361
  slices: r
2219
2362
  } : null;
2220
2363
  }
2221
- function mr(e) {
2364
+ function Sr(e) {
2222
2365
  if (!e) return null;
2223
2366
  try {
2224
2367
  return typeof window > "u" ? null : e.storageMode === "sessionStorage" ? window.sessionStorage : window.localStorage;
@@ -2226,36 +2369,36 @@ function mr(e) {
2226
2369
  return null;
2227
2370
  }
2228
2371
  }
2229
- function hr(e, t) {
2372
+ function Cr(e, t) {
2230
2373
  return typeof e == "object" && e ? e[t] : void 0;
2231
2374
  }
2232
- var gr = (e) => typeof e == "string", _r = (e) => typeof e == "number" && Number.isFinite(e);
2233
- function vr(e, t) {
2375
+ var wr = (e) => typeof e == "string", Tr = (e) => typeof e == "number" && Number.isFinite(e);
2376
+ function Er(e, t) {
2234
2377
  return Array.isArray(e) && e.every(t);
2235
2378
  }
2236
- function yr(e, t) {
2379
+ function Dr(e, t) {
2237
2380
  return typeof e != "object" || !e || Array.isArray(e) ? !1 : Object.values(e).every(t);
2238
2381
  }
2239
- var br = (e) => gr(hr(e, "id")), xr = {
2240
- columnFilters: (e) => vr(e, br),
2382
+ var Or = (e) => wr(Cr(e, "id")), kr = {
2383
+ columnFilters: (e) => Er(e, Or),
2241
2384
  globalFilter: () => !0,
2242
- sorting: (e) => vr(e, (e) => br(e) && typeof hr(e, "desc") == "boolean"),
2385
+ sorting: (e) => Er(e, (e) => Or(e) && typeof Cr(e, "desc") == "boolean"),
2243
2386
  pagination: (e) => {
2244
- let t = hr(e, "pageIndex"), n = hr(e, "pageSize");
2245
- return _r(t) && t >= 0 && _r(n) && n > 0;
2387
+ let t = Cr(e, "pageIndex"), n = Cr(e, "pageSize");
2388
+ return Tr(t) && t >= 0 && Tr(n) && n > 0;
2246
2389
  },
2247
- expanded: (e) => e === !0 || yr(e, (e) => typeof e == "boolean"),
2248
- columnVisibility: (e) => yr(e, (e) => typeof e == "boolean"),
2249
- columnSizing: (e) => yr(e, _r),
2250
- columnOrder: (e) => vr(e, gr),
2251
- columnPinning: (e) => vr(hr(e, "left"), gr) && vr(hr(e, "right"), gr),
2252
- grouping: (e) => vr(e, gr)
2390
+ expanded: (e) => e === !0 || Dr(e, (e) => typeof e == "boolean"),
2391
+ columnVisibility: (e) => Dr(e, (e) => typeof e == "boolean"),
2392
+ columnSizing: (e) => Dr(e, Tr),
2393
+ columnOrder: (e) => Er(e, wr),
2394
+ columnPinning: (e) => Er(Cr(e, "left"), wr) && Er(Cr(e, "right"), wr),
2395
+ grouping: (e) => Er(e, wr)
2253
2396
  };
2254
- function Sr(e, t) {
2255
- let n = xr[e];
2397
+ function Ar(e, t) {
2398
+ let n = kr[e];
2256
2399
  return n === void 0 || n(t);
2257
2400
  }
2258
- function Cr(e, t, n) {
2401
+ function jr(e, t, n) {
2259
2402
  if (!e || !t) return {};
2260
2403
  try {
2261
2404
  let r = e.getItem(t.key);
@@ -2263,39 +2406,39 @@ function Cr(e, t, n) {
2263
2406
  let i = n(r);
2264
2407
  if (typeof i != "object" || !i) return {};
2265
2408
  let a = i;
2266
- if (a[fr] !== 1) return {};
2409
+ if (a[br] !== 1) return {};
2267
2410
  let o = {};
2268
- for (let e of t.slices) e in a && Sr(e, a[e]) && (o[e] = a[e]);
2411
+ for (let e of t.slices) e in a && Ar(e, a[e]) && (o[e] = a[e]);
2269
2412
  return o;
2270
2413
  } catch {
2271
2414
  return {};
2272
2415
  }
2273
2416
  }
2274
- function wr(e, t, n, r) {
2417
+ function Mr(e, t, n, r) {
2275
2418
  if (!e || !t) return;
2276
- let i = { [fr]: 1 };
2419
+ let i = { [br]: 1 };
2277
2420
  for (let e of t.slices) i[e] = n[e];
2278
2421
  try {
2279
2422
  e.setItem(t.key, r(i));
2280
2423
  } catch {}
2281
2424
  }
2282
- function Tr(e) {
2425
+ function Nr(e) {
2283
2426
  return {
2284
- data: pr(e?.dataKey, lr),
2285
- settings: pr(e?.settingsKey, ur)
2427
+ data: xr(e?.dataKey, _r),
2428
+ settings: xr(e?.settingsKey, vr)
2286
2429
  };
2287
2430
  }
2288
- function Er(e) {
2289
- let { data: t, settings: n } = Tr(e);
2431
+ function Pr(e) {
2432
+ let { data: t, settings: n } = Nr(e);
2290
2433
  return t !== null || n !== null;
2291
2434
  }
2292
- var Dr = (e) => JSON.parse(e), Or = (e) => JSON.stringify(e);
2293
- function kr(e, t = []) {
2435
+ var Fr = (e) => JSON.parse(e), Ir = (e) => JSON.stringify(e);
2436
+ function Lr(e, t = []) {
2294
2437
  for (let n of e) {
2295
2438
  if (typeof n != "object" || !n) continue;
2296
2439
  let e = n;
2297
2440
  if (Array.isArray(e.columns) && e.columns.length > 0) {
2298
- kr(e.columns, t);
2441
+ Lr(e.columns, t);
2299
2442
  continue;
2300
2443
  }
2301
2444
  let r = typeof e.accessorKey == "string" ? e.accessorKey : void 0, i = (typeof e.id == "string" ? e.id : void 0) ?? r?.replaceAll(".", "_") ?? (typeof e.header == "string" ? e.header : void 0);
@@ -2303,29 +2446,29 @@ function kr(e, t = []) {
2303
2446
  }
2304
2447
  return t;
2305
2448
  }
2306
- function Ar(e, t) {
2449
+ function Rr(e, t) {
2307
2450
  let n = (e) => typeof e == "string" && t.has(e), r = (e) => e.filter(n), i = (e) => Object.fromEntries(Object.entries(e).filter(([e]) => n(e))), a = (e) => e.filter((e) => n(e.id)), o = { ...e };
2308
2451
  return e.columnOrder && (o.columnOrder = r(e.columnOrder)), e.grouping && (o.grouping = r(e.grouping)), e.columnVisibility && (o.columnVisibility = i(e.columnVisibility)), e.columnSizing && (o.columnSizing = i(e.columnSizing)), e.columnPinning && (o.columnPinning = {
2309
2452
  left: r(e.columnPinning.left ?? []),
2310
2453
  right: r(e.columnPinning.right ?? [])
2311
2454
  }), e.sorting && (o.sorting = a(e.sorting)), e.columnFilters && (o.columnFilters = a(e.columnFilters)), o;
2312
2455
  }
2313
- function jr(e, t) {
2314
- let n = mr(e), { data: r, settings: i } = Tr(e), a = e?.deserialize ?? Dr, o = {
2315
- ...Cr(n, i, a),
2316
- ...Cr(n, r, a)
2456
+ function zr(e, t) {
2457
+ let n = Sr(e), { data: r, settings: i } = Nr(e), a = e?.deserialize ?? Fr, o = {
2458
+ ...jr(n, i, a),
2459
+ ...jr(n, r, a)
2317
2460
  };
2318
- return t === void 0 ? o : Ar(o, new Set(t));
2461
+ return t === void 0 ? o : Rr(o, new Set(t));
2319
2462
  }
2320
- function Mr(e, t) {
2321
- let n = mr(t);
2463
+ function Br(e, t) {
2464
+ let n = Sr(t);
2322
2465
  if (!n) return;
2323
- let { data: r, settings: i } = Tr(t), a = t?.serialize ?? Or;
2324
- wr(n, r, e, a), wr(n, i, e, a);
2466
+ let { data: r, settings: i } = Nr(t), a = t?.serialize ?? Ir;
2467
+ Mr(n, r, e, a), Mr(n, i, e, a);
2325
2468
  }
2326
2469
  //#endregion
2327
2470
  //#region src/tmdatagrid/core/capabilities.ts
2328
- function Nr(e) {
2471
+ function Vr(e) {
2329
2472
  let t = e.selectionMode ?? "checkbox", n = e.cellSelection ?? (e.editing === void 0 ? "none" : "single"), r = t !== "highlight" && e.enableRowSelection !== !1;
2330
2473
  return {
2331
2474
  sorting: e.enableSorting !== !1,
@@ -2355,19 +2498,19 @@ function Nr(e) {
2355
2498
  matchHighlighting: e.enableMatchHighlighting === !0
2356
2499
  };
2357
2500
  }
2358
- function Pr(e, t) {
2501
+ function Hr(e, t) {
2359
2502
  return {
2360
2503
  canSort: t.sorting && e.getCanSort(),
2361
2504
  canFilter: t.filtering && e.getCanFilter(),
2362
2505
  canHide: t.hiding && e.getCanHide(),
2363
2506
  canPin: t.pinning && e.getCanPin(),
2364
2507
  canResize: t.resizing && e.getCanResize(),
2365
- canReorder: t.ordering && Sn(e),
2508
+ canReorder: t.ordering && Cn(e),
2366
2509
  canGroup: t.grouping && e.getCanGroup()
2367
2510
  };
2368
2511
  }
2369
- function Fr(e, t) {
2370
- let n = e.getAllLeafColumns(), r = (e) => n.some((n) => e(Pr(n, t)));
2512
+ function Ur(e, t) {
2513
+ let n = e.getAllLeafColumns(), r = (e) => n.some((n) => e(Hr(n, t)));
2371
2514
  return {
2372
2515
  canSortAny: r((e) => e.canSort),
2373
2516
  canFilterAny: r((e) => e.canFilter),
@@ -2382,12 +2525,12 @@ function Fr(e, t) {
2382
2525
  }
2383
2526
  //#endregion
2384
2527
  //#region src/tmdatagrid/core/cellNavigation.ts
2385
- var Ir = (e, t) => Math.min(Math.max(e, 0), Math.max(t, 0));
2386
- function Lr({ key: e, ctrlKey: t, from: n, rowCount: r, columnCount: i, pageRows: a }) {
2528
+ var Wr = (e, t) => Math.min(Math.max(e, 0), Math.max(t, 0));
2529
+ function Gr({ key: e, ctrlKey: t, from: n, rowCount: r, columnCount: i, pageRows: a }) {
2387
2530
  if (r === 0 || i === 0) return null;
2388
2531
  let o = r - 1, s = i - 1, c = (e, t) => ({
2389
- rowIndex: Ir(e, o),
2390
- columnIndex: Ir(t, s)
2532
+ rowIndex: Wr(e, o),
2533
+ columnIndex: Wr(t, s)
2391
2534
  });
2392
2535
  switch (e) {
2393
2536
  case "ArrowDown": return c(n.rowIndex + 1, n.columnIndex);
@@ -2401,7 +2544,7 @@ function Lr({ key: e, ctrlKey: t, from: n, rowCount: r, columnCount: i, pageRows
2401
2544
  default: return null;
2402
2545
  }
2403
2546
  }
2404
- function Rr({ from: e, direction: t, rowCount: n, columnCount: r, isEditable: i }) {
2547
+ function Kr({ from: e, direction: t, rowCount: n, columnCount: r, isEditable: i }) {
2405
2548
  let a = n * r;
2406
2549
  if (a === 0) return null;
2407
2550
  let o = e.rowIndex * r + e.columnIndex;
@@ -2414,57 +2557,57 @@ function Rr({ from: e, direction: t, rowCount: n, columnCount: r, isEditable: i
2414
2557
  }
2415
2558
  return null;
2416
2559
  }
2417
- function zr(e, t) {
2560
+ function qr(e, t) {
2418
2561
  return e === null || t === null ? e === t : e.rowId === t.rowId && e.columnId === t.columnId;
2419
2562
  }
2420
2563
  //#endregion
2421
2564
  //#region src/tmdatagrid/useTMDataGrid.tsx
2422
- var Br = 200, Vr = Ue({
2423
- columnFilteringFeature: Y,
2424
- globalFilteringFeature: Fe,
2425
- rowSortingFeature: Ve,
2426
- rowPaginationFeature: Re,
2427
- rowSelectionFeature: Be,
2428
- columnPinningFeature: Se,
2429
- columnVisibilityFeature: X,
2430
- columnOrderingFeature: xe,
2431
- columnSizingFeature: we,
2432
- columnResizingFeature: Ce,
2433
- columnFacetingFeature: ye,
2434
- columnGroupingFeature: be,
2435
- rowExpandingFeature: Le,
2436
- rowPinningFeature: ze,
2437
- filteredRowModel: ke(),
2438
- groupedRowModel: Ae(),
2439
- sortedRowModel: or(),
2440
- expandedRowModel: Ee(),
2441
- paginatedRowModel: je(),
2442
- facetedRowModel: De(),
2443
- facetedMinMaxValues: Z(),
2444
- facetedUniqueValues: Oe(),
2565
+ var Jr = 200, Yr = We({
2566
+ columnFilteringFeature: be,
2567
+ globalFilteringFeature: Ie,
2568
+ rowSortingFeature: He,
2569
+ rowPaginationFeature: ze,
2570
+ rowSelectionFeature: Ve,
2571
+ columnPinningFeature: Ce,
2572
+ columnVisibilityFeature: Te,
2573
+ columnOrderingFeature: Se,
2574
+ columnSizingFeature: X,
2575
+ columnResizingFeature: we,
2576
+ columnFacetingFeature: Y,
2577
+ columnGroupingFeature: xe,
2578
+ rowExpandingFeature: Re,
2579
+ rowPinningFeature: Be,
2580
+ filteredRowModel: Ae(),
2581
+ groupedRowModel: je(),
2582
+ sortedRowModel: mr(),
2583
+ expandedRowModel: Z(),
2584
+ paginatedRowModel: Me(),
2585
+ facetedRowModel: Oe(),
2586
+ facetedMinMaxValues: De(),
2587
+ facetedUniqueValues: ke(),
2445
2588
  filterFns: {
2446
- ...Ne,
2447
- tmDataGrid: Ct,
2448
- tmDataGridFuzzy: rr
2589
+ ...Pe,
2590
+ tmDataGrid: wt,
2591
+ tmDataGridFuzzy: dr
2449
2592
  },
2450
- sortFns: He,
2451
- aggregationFns: ve,
2452
- tableMeta: Ie(),
2453
- columnMeta: Ie()
2593
+ sortFns: Ue,
2594
+ aggregationFns: ye,
2595
+ tableMeta: Le(),
2596
+ columnMeta: Le()
2454
2597
  });
2455
- function Hr() {
2456
- return Te();
2598
+ function Xr() {
2599
+ return Ee();
2457
2600
  }
2458
- var Ur = 160, Wr = 6;
2459
- function Gr(e) {
2601
+ var Zr = 160, Qr = 6;
2602
+ function $r(e) {
2460
2603
  let t = { ...e };
2461
- for (let e of Object.keys(t)) bn(e) && delete t[e];
2604
+ for (let e of Object.keys(t)) xn(e) && delete t[e];
2462
2605
  return t;
2463
2606
  }
2464
- function Kr(e) {
2607
+ function ei(e) {
2465
2608
  return e.map((e) => "columns" in e && Array.isArray(e.columns) ? {
2466
2609
  ...e,
2467
- columns: Kr(e.columns)
2610
+ columns: ei(e.columns)
2468
2611
  } : {
2469
2612
  filterFn: "tmDataGrid",
2470
2613
  aggregationFn: void 0,
@@ -2472,8 +2615,8 @@ function Kr(e) {
2472
2615
  ...e
2473
2616
  });
2474
2617
  }
2475
- function qr({ persist: e, labels: t, enableColumnOrdering: r, enablePagination: a, enableRowNumbers: l, selectionMode: u, showSelectedBackground: d, defaultHighlightedRowId: f, onHighlightedRowChange: p, cellSelection: m, onFocusedCellChange: h, editing: g, renderDetails: _, renderDetailsEstHeight: v = Ur, overscan: y = Wr, ...b }) {
2476
- let x = g?.mode, S = Nr({
2618
+ function ti({ persist: e, labels: t, enableColumnOrdering: r, enablePagination: a, enableRowNumbers: l, selectionMode: u, showSelectedBackground: d, defaultHighlightedRowId: f, onHighlightedRowChange: p, cellSelection: m, onFocusedCellChange: h, editing: g, renderDetails: _, renderDetailsEstHeight: v = Zr, overscan: y = Qr, ...b }) {
2619
+ let x = g?.mode, S = Vr({
2477
2620
  ...b,
2478
2621
  enableColumnOrdering: r,
2479
2622
  enablePagination: a,
@@ -2482,15 +2625,15 @@ function qr({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
2482
2625
  showSelectedBackground: d,
2483
2626
  cellSelection: m,
2484
2627
  editing: g
2485
- }), C = o(() => cr(t), [t]), w = b.enableColumnPinning !== !1, T = S.selectColumn, E = S.grouping, D = _ !== void 0, O = g !== void 0 && (g.mode === "row" || g.mode === "draft" || g.onRowDelete !== void 0), k = C.selectColumnLabel, j = C.groupColumnLabel, M = C.detailsColumnLabel, N = C.editColumnLabel, P = C.rowNumberColumnLabel, F = S.rowNumbers, I = g?.mode === "draft", L = o(() => {
2486
- let e = Kr(b.columns);
2628
+ }), C = o(() => gr(t), [t]), w = b.enableColumnPinning !== !1, T = S.selectColumn, E = S.grouping, D = _ !== void 0, O = g !== void 0 && (g.mode === "row" || g.mode === "draft" || g.onRowDelete !== void 0), k = C.selectColumnLabel, j = C.groupColumnLabel, M = C.detailsColumnLabel, N = C.editColumnLabel, P = C.rowNumberColumnLabel, F = S.rowNumbers, I = g?.mode === "draft", L = o(() => {
2629
+ let e = ei(b.columns);
2487
2630
  return [
2488
- ...F ? [tn(P)] : [],
2489
- ...T ? [fn(k)] : [],
2490
- ...E ? [$t(j)] : [],
2491
- ...D ? [Mt(M)] : [],
2631
+ ...F ? [nn(P)] : [],
2632
+ ...T ? [pn(k)] : [],
2633
+ ...E ? [en(j)] : [],
2634
+ ...D ? [Nt(M)] : [],
2492
2635
  ...e,
2493
- ...O ? [Ut(N, I)] : []
2636
+ ...O ? [Wt(N, I)] : []
2494
2637
  ];
2495
2638
  }, [
2496
2639
  b.columns,
@@ -2505,7 +2648,7 @@ function qr({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
2505
2648
  j,
2506
2649
  M,
2507
2650
  N
2508
- ]), [R] = c(() => jr(e, kr(L))), z = R.grouping ?? b.initialState?.grouping ?? [], B = We({
2651
+ ]), [R] = c(() => zr(e, Lr(L))), z = R.grouping ?? b.initialState?.grouping ?? [], B = Ge({
2509
2652
  columnResizeMode: "onChange",
2510
2653
  enableSorting: !0,
2511
2654
  enableColumnResizing: !0,
@@ -2514,27 +2657,27 @@ function qr({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
2514
2657
  ...b,
2515
2658
  ..._ === void 0 ? {} : { getRowCanExpand: b.getRowCanExpand ?? (() => !0) },
2516
2659
  enableRowPinning: (e) => !e.getIsGrouped() && (typeof b.enableRowPinning == "function" ? b.enableRowPinning(e) : b.enableRowPinning === !0),
2517
- features: Vr,
2660
+ features: Yr,
2518
2661
  columns: L,
2519
2662
  initialState: {
2520
2663
  ...b.initialState,
2521
2664
  ...R,
2522
2665
  columnVisibility: {
2523
- ...Gr({
2666
+ ...$r({
2524
2667
  ...b.initialState?.columnVisibility,
2525
2668
  ...R.columnVisibility
2526
2669
  }),
2527
- ...E ? { [Kt]: z.length > 0 } : {}
2670
+ ...E ? { [qt]: z.length > 0 } : {}
2528
2671
  },
2529
2672
  columnPinning: {
2530
2673
  left: [
2531
- ...F && w ? [en] : [],
2532
- ...T && w ? [sn] : [],
2533
- ...E && w ? [Kt] : [],
2534
- ...D && w ? [kt] : [],
2674
+ ...F && w ? [tn] : [],
2675
+ ...T && w ? [cn] : [],
2676
+ ...E && w ? [qt] : [],
2677
+ ...D && w ? [At] : [],
2535
2678
  ...(R.columnPinning?.left ?? b.initialState?.columnPinning?.left ?? []).filter((e) => e !== "__rowNumber__" && e !== "__select__" && e !== "__details__" && e !== "__group__")
2536
2679
  ],
2537
- right: [...(R.columnPinning?.right ?? b.initialState?.columnPinning?.right ?? []).filter((e) => e !== Bt), ...O && w ? [Bt] : []]
2680
+ right: [...(R.columnPinning?.right ?? b.initialState?.columnPinning?.right ?? []).filter((e) => e !== Vt), ...O && w ? [Vt] : []]
2538
2681
  },
2539
2682
  pagination: {
2540
2683
  pageIndex: 0,
@@ -2550,12 +2693,12 @@ function qr({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
2550
2693
  rowValidators: g?.rowValidators,
2551
2694
  isRowEditable: g?.isRowEditable,
2552
2695
  onEditCommit: g?.onCommit,
2553
- onEditCommitDrafts: g?.onCommitDrafts,
2696
+ onSaveDrafts: g?.onSaveDrafts ?? g?.onCommitDrafts,
2554
2697
  newRowDefaults: g?.newRowDefaults,
2555
2698
  onRowAdd: g?.onRowAdd,
2556
2699
  onRowDelete: g?.onRowDelete
2557
2700
  };
2558
- let [H] = c(() => er(() => V.current)), ee = s(x);
2701
+ let [H] = c(() => cr(() => V.current)), ee = s(x);
2559
2702
  i(() => {
2560
2703
  ee.current !== x && (ee.current = x, H.cancelAll());
2561
2704
  }, [x, H]), i(() => {
@@ -2565,17 +2708,17 @@ function qr({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
2565
2708
  let e = B.store.state.grouping, t = B.store.subscribe((t) => {
2566
2709
  t.grouping !== e && (e = t.grouping, B.setColumnVisibility((e) => ({
2567
2710
  ...e,
2568
- [Kt]: t.grouping.length > 0
2711
+ [qt]: t.grouping.length > 0
2569
2712
  })), B.setColumnOrder((e) => [...e]));
2570
2713
  });
2571
2714
  return () => t.unsubscribe();
2572
2715
  }, [E, B]), i(() => {
2573
- if (!Er(e)) return;
2574
- Mr(B.store.state, e);
2716
+ if (!Pr(e)) return;
2717
+ Br(B.store.state, e);
2575
2718
  let t, n = null, r = () => {
2576
- t = void 0, n !== null && (Mr(n, e), n = null);
2719
+ t = void 0, n !== null && (Br(n, e), n = null);
2577
2720
  }, i = B.store.subscribe((e) => {
2578
- n = e, t !== void 0 && clearTimeout(t), t = setTimeout(r, Br);
2721
+ n = e, t !== void 0 && clearTimeout(t), t = setTimeout(r, Jr);
2579
2722
  });
2580
2723
  return () => {
2581
2724
  i.unsubscribe(), t !== void 0 && clearTimeout(t), r();
@@ -2625,11 +2768,11 @@ function qr({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
2625
2768
  ...e,
2626
2769
  selectionAnchorRowId: t
2627
2770
  })),
2628
- setFocusedCell: (t) => e((e) => zr(e.focusedCell, t) ? e : {
2771
+ setFocusedCell: (t) => e((e) => qr(e.focusedCell, t) ? e : {
2629
2772
  ...e,
2630
2773
  focusedCell: t
2631
2774
  }),
2632
- setCellRange: (t) => e((e) => zr(e.cellRange?.anchor ?? null, t?.anchor ?? null) && zr(e.cellRange?.focus ?? null, t?.focus ?? null) ? e : {
2775
+ setCellRange: (t) => e((e) => qr(e.cellRange?.anchor ?? null, t?.anchor ?? null) && qr(e.cellRange?.focus ?? null, t?.focus ?? null) ? e : {
2633
2776
  ...e,
2634
2777
  cellRange: t
2635
2778
  })
@@ -2655,17 +2798,17 @@ function qr({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
2655
2798
  re.current = () => {
2656
2799
  let e = b.initialState, t = [...e?.grouping ?? []];
2657
2800
  B.setGrouping(t), B.setColumnVisibility({
2658
- ...Gr({ ...e?.columnVisibility }),
2659
- ...E ? { [Kt]: t.length > 0 } : {}
2801
+ ...$r({ ...e?.columnVisibility }),
2802
+ ...E ? { [qt]: t.length > 0 } : {}
2660
2803
  }), B.setColumnSizing({ ...e?.columnSizing }), B.setColumnOrder([...e?.columnOrder ?? []]), B.setColumnPinning({
2661
2804
  left: [
2662
- ...F && w ? [en] : [],
2663
- ...T && w ? [sn] : [],
2664
- ...E && w ? [Kt] : [],
2665
- ...D && w ? [kt] : [],
2805
+ ...F && w ? [tn] : [],
2806
+ ...T && w ? [cn] : [],
2807
+ ...E && w ? [qt] : [],
2808
+ ...D && w ? [At] : [],
2666
2809
  ...(e?.columnPinning?.left ?? []).filter((e) => e !== "__rowNumber__" && e !== "__select__" && e !== "__details__" && e !== "__group__")
2667
2810
  ],
2668
- right: [...(e?.columnPinning?.right ?? []).filter((e) => e !== Bt), ...O && w ? [Bt] : []]
2811
+ right: [...(e?.columnPinning?.right ?? []).filter((e) => e !== Vt), ...O && w ? [Vt] : []]
2669
2812
  });
2670
2813
  };
2671
2814
  let ie = n(() => re.current(), []), ae = s(() => !1);
@@ -2683,37 +2826,37 @@ function qr({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
2683
2826
  scrollerRef: ae
2684
2827
  };
2685
2828
  }
2686
- function Jr(e, t) {
2829
+ function ni(e, t) {
2687
2830
  let n = e.table.getColumn(t);
2688
2831
  if (n && n.getFilterValue() === void 0) {
2689
- let e = hn(n);
2832
+ let e = gn(n);
2690
2833
  n.setFilterValue({
2691
2834
  operator: e,
2692
- value: ht(e)
2835
+ value: gt(e)
2693
2836
  });
2694
2837
  }
2695
2838
  e.ui.actions.openFilterPanel(t);
2696
2839
  }
2697
2840
  //#endregion
2698
2841
  //#region src/tmdatagrid/components/TMDataGridFilterPills.tsx
2699
- function Yr(t) {
2700
- let n = e(41), { api: r, size: i, showClearAll: a, onPillClick: o, className: s } = t, c = i === void 0 ? "sm" : i, l = a === void 0 || a, { table: u, labels: f } = r, p = j(u.store, Zr), m, h, g, _, v, b, x, S, C;
2842
+ function ri(t) {
2843
+ let n = e(41), { api: r, size: i, showClearAll: a, onPillClick: o, className: s } = t, c = i === void 0 ? "sm" : i, l = a === void 0 || a, { table: u, labels: f } = r, p = j(u.store, ai), m, h, g, _, v, b, x, S, C;
2701
2844
  if (n[0] !== r || n[1] !== s || n[2] !== p || n[3] !== f || n[4] !== o || n[5] !== c || n[6] !== u) {
2702
2845
  C = Symbol.for("react.early_return_sentinel");
2703
2846
  bb0: {
2704
- if (h = p.filter(Xr), h.length === 0) {
2847
+ if (h = p.filter(ii), h.length === 0) {
2705
2848
  C = null;
2706
2849
  break bb0;
2707
2850
  }
2708
2851
  v = "group", b = f.activeFilters, x = "filter-pills";
2709
2852
  let e;
2710
- n[16] === s ? e = n[17] : (e = [qn.filterPills, s].filter(Boolean), n[16] = s, n[17] = e), S = e.join(" "), m = y.Group, g = c;
2853
+ n[16] === s ? e = n[17] : (e = [Qn.filterPills, s].filter(Boolean), n[16] = s, n[17] = e), S = e.join(" "), m = y.Group, g = c;
2711
2854
  let t;
2712
2855
  n[18] !== r || n[19] !== p || n[20] !== f || n[21] !== o || n[22] !== c || n[23] !== u ? (t = (e) => {
2713
- let t = u.getColumn(e.id), n = t ? pn(t) : e.id, i = e.value;
2714
- return gt(i) ? /* @__PURE__ */ q(y, {
2856
+ let t = u.getColumn(e.id), n = t ? mn(t) : e.id, i = e.value;
2857
+ return _t(i) ? /* @__PURE__ */ q(y, {
2715
2858
  size: c,
2716
- className: qn.pill,
2859
+ className: Qn.pill,
2717
2860
  "data-dg-part": "filter-pill",
2718
2861
  "data-column-id": e.id,
2719
2862
  withRemoveButton: !0,
@@ -2724,11 +2867,11 @@ function Yr(t) {
2724
2867
  tabIndex: 0
2725
2868
  },
2726
2869
  children: /* @__PURE__ */ q(k, {
2727
- className: qn.pillLabel,
2728
- onClick: () => o ? o(e.id) : Jr(r, e.id),
2729
- children: vt({
2870
+ className: Qn.pillLabel,
2871
+ onClick: () => o ? o(e.id) : ni(r, e.id),
2872
+ children: yt({
2730
2873
  label: n,
2731
- type: t ? mn(t) : "string",
2874
+ type: t ? hn(t) : "string",
2732
2875
  filter: i,
2733
2876
  operatorLabels: f.operators
2734
2877
  })
@@ -2761,16 +2904,16 @@ function Yr(t) {
2761
2904
  children: [w, T]
2762
2905
  }), n[34] = w, n[35] = T, n[36] = v, n[37] = b, n[38] = x, n[39] = S, n[40] = E) : E = n[40], E;
2763
2906
  }
2764
- function Xr(e) {
2765
- return _t(e.value);
2907
+ function ii(e) {
2908
+ return vt(e.value);
2766
2909
  }
2767
- function Zr(e) {
2910
+ function ai(e) {
2768
2911
  return e.columnFilters;
2769
2912
  }
2770
- var Qr = { footer: "_footer_te0a3_1" };
2913
+ var oi = { footer: "_footer_te0a3_1" };
2771
2914
  //#endregion
2772
2915
  //#region src/tmdatagrid/components/TMDataGridFooter.tsx
2773
- function $r(e, t = !0) {
2916
+ function si(e, t = !0) {
2774
2917
  let { pageIndex: n, pageSize: r } = e.store.state.pagination, i = e.getRowCount();
2775
2918
  return {
2776
2919
  state: {
@@ -2794,13 +2937,13 @@ function $r(e, t = !0) {
2794
2937
  }
2795
2938
  };
2796
2939
  }
2797
- function ei(t) {
2940
+ function ci(t) {
2798
2941
  let n = e(23), { pageSizeOptions: r } = t, { table: i, features: a, labels: o, controlSize: s } = Q();
2799
2942
  j(i.store);
2800
2943
  let c;
2801
- n[0] !== a || n[1] !== i ? (c = rn(i, a), n[0] = a, n[1] = i, n[2] = c) : c = n[2];
2944
+ n[0] !== a || n[1] !== i ? (c = an(i, a), n[0] = a, n[1] = i, n[2] = c) : c = n[2];
2802
2945
  let l = c, { pageSize: u } = i.store.state.pagination, d;
2803
- n[3] !== u || n[4] !== r ? (d = r.includes(u) ? r : [...r, u].sort(ti), n[3] = u, n[4] = r, n[5] = d) : d = n[5];
2946
+ n[3] !== u || n[4] !== r ? (d = r.includes(u) ? r : [...r, u].sort(li), n[3] = u, n[4] = r, n[5] = d) : d = n[5];
2804
2947
  let f = d, m;
2805
2948
  n[6] !== s || n[7] !== o.rowsPerPage ? (m = /* @__PURE__ */ q(E, {
2806
2949
  span: !0,
@@ -2833,14 +2976,14 @@ function ei(t) {
2833
2976
  children: [m, y]
2834
2977
  }), n[20] = m, n[21] = y, n[22] = b) : b = n[22], b;
2835
2978
  }
2836
- function ti(e, t) {
2979
+ function li(e, t) {
2837
2980
  return e - t;
2838
2981
  }
2839
- function ni() {
2982
+ function ui() {
2840
2983
  let t = e(22), { table: n, features: r, labels: i, controlSize: a } = Q();
2841
2984
  j(n.store);
2842
2985
  let o;
2843
- t[0] !== r || t[1] !== n ? (o = rn(n, r), t[0] = r, t[1] = n, t[2] = o) : o = t[2];
2986
+ t[0] !== r || t[1] !== n ? (o = an(n, r), t[0] = r, t[1] = n, t[2] = o) : o = t[2];
2844
2987
  let s = o, { pageIndex: c, pageSize: l } = n.store.state.pagination, u, d, f, p, m, h;
2845
2988
  if (t[3] !== a || t[4] !== i || t[5] !== c || t[6] !== l || t[7] !== s || t[8] !== n) {
2846
2989
  let e = n.getRowCount(), r = e === 0 ? 0 : c * l + 1, o = Math.min(e, (c + 1) * l);
@@ -2859,11 +3002,11 @@ function ni() {
2859
3002
  children: h
2860
3003
  }), t[15] = u, t[16] = d, t[17] = f, t[18] = p, t[19] = m, t[20] = h, t[21] = g) : g = t[21], g;
2861
3004
  }
2862
- function ri() {
3005
+ function di() {
2863
3006
  let t = e(26), { table: n, features: r, labels: i } = Q();
2864
3007
  j(n.store);
2865
3008
  let a;
2866
- t[0] !== r || t[1] !== n ? (a = rn(n, r), t[0] = r, t[1] = n, t[2] = a) : a = t[2];
3009
+ t[0] !== r || t[1] !== n ? (a = an(n, r), t[0] = r, t[1] = n, t[2] = a) : a = t[2];
2867
3010
  let o = a, s;
2868
3011
  t[3] !== o || t[4] !== n ? (s = !o || !n.getCanPreviousPage(), t[3] = o, t[4] = n, t[5] = s) : s = t[5];
2869
3012
  let c;
@@ -2909,31 +3052,31 @@ function ri() {
2909
3052
  children: [d, g]
2910
3053
  }), t[23] = d, t[24] = g, t[25] = _) : _ = t[25], _;
2911
3054
  }
2912
- var ii = [
3055
+ var fi = [
2913
3056
  10,
2914
3057
  25,
2915
3058
  50,
2916
3059
  100
2917
3060
  ];
2918
- function ai(t) {
2919
- let n = e(23), { pageSizeOptions: r, renderPagination: i } = t, a = r === void 0 ? ii : r, { table: o, features: s, labels: c } = Q();
3061
+ function pi(t) {
3062
+ let n = e(23), { pageSizeOptions: r, renderPagination: i } = t, a = r === void 0 ? fi : r, { table: o, features: s, labels: c } = Q();
2920
3063
  j(o.store);
2921
3064
  let l;
2922
3065
  n[0] === a ? l = n[1] : (l = {
2923
- PageSize: () => /* @__PURE__ */ q(ei, { pageSizeOptions: a }),
2924
- Range: ni,
2925
- Pager: ri
3066
+ PageSize: () => /* @__PURE__ */ q(ci, { pageSizeOptions: a }),
3067
+ Range: ui,
3068
+ Pager: di
2926
3069
  }, n[0] = a, n[1] = l);
2927
3070
  let u = l;
2928
- if (!Fr(o, s).canPaginate) return null;
3071
+ if (!Ur(o, s).canPaginate) return null;
2929
3072
  let d, f;
2930
3073
  if (n[2] !== u || n[3] !== s || n[4] !== i || n[5] !== o) {
2931
3074
  f = Symbol.for("react.early_return_sentinel");
2932
- bb0: if (d = rn(o, s), i) {
2933
- let { state: e, actions: t } = $r(o, d);
3075
+ bb0: if (d = an(o, s), i) {
3076
+ let { state: e, actions: t } = si(o, d);
2934
3077
  f = /* @__PURE__ */ q("div", {
2935
3078
  "data-dg-part": "footer",
2936
- className: Qr.footer,
3079
+ className: oi.footer,
2937
3080
  children: i({
2938
3081
  state: e,
2939
3082
  actions: t,
@@ -2954,7 +3097,7 @@ function ai(t) {
2954
3097
  let _;
2955
3098
  n[14] !== p || n[15] !== m || n[16] !== h || n[17] !== g ? (_ = /* @__PURE__ */ J("div", {
2956
3099
  "data-dg-part": "footer",
2957
- className: Qr.footer,
3100
+ className: oi.footer,
2958
3101
  "data-paging-suspended": p,
2959
3102
  children: [
2960
3103
  m,
@@ -2975,13 +3118,13 @@ function ai(t) {
2975
3118
  }
2976
3119
  //#endregion
2977
3120
  //#region src/tmdatagrid/components/TMDataGridSearch.tsx
2978
- function oi(t) {
2979
- let n = e(25), { placeholder: r, debounce: a, w: o } = t, u = a === void 0 ? 250 : a, d = o === void 0 ? 220 : o, { table: f, features: p, labels: m, controlSize: h } = Q(), g = j(f.store, si), [_, v] = c(g), y = s(void 0), b = s(g), x, S;
3121
+ function mi(t) {
3122
+ let n = e(25), { placeholder: r, debounce: a, w: o } = t, u = a === void 0 ? 250 : a, d = o === void 0 ? 220 : o, { table: f, features: p, labels: m, controlSize: h } = Q(), g = j(f.store, hi), [_, v] = c(g), y = s(void 0), b = s(g), x, S;
2980
3123
  n[0] === g ? (x = n[1], S = n[2]) : (x = () => {
2981
3124
  g !== b.current && (b.current = g, v(g));
2982
3125
  }, S = [g], n[0] = g, n[1] = x, n[2] = S), i(x, S);
2983
3126
  let C, w;
2984
- if (n[3] === Symbol.for("react.memo_cache_sentinel") ? (C = () => () => clearTimeout(y.current), w = [], n[3] = C, n[4] = w) : (C = n[3], w = n[4]), i(C, w), !Fr(f, p).canSearch) return null;
3127
+ if (n[3] === Symbol.for("react.memo_cache_sentinel") ? (C = () => () => clearTimeout(y.current), w = [], n[3] = C, n[4] = w) : (C = n[3], w = n[4]), i(C, w), !Ur(f, p).canSearch) return null;
2985
3128
  let T;
2986
3129
  n[5] === f ? T = n[6] : (T = (e) => {
2987
3130
  b.current = e, f.setGlobalFilter(e === "" ? void 0 : e);
@@ -3029,15 +3172,15 @@ function oi(t) {
3029
3172
  rightSection: P
3030
3173
  }), n[17] = h, n[18] = _, n[19] = m.searchLabel, n[20] = M, n[21] = P, n[22] = A, n[23] = d, n[24] = F) : F = n[24], F;
3031
3174
  }
3032
- function si(e) {
3175
+ function hi(e) {
3033
3176
  return typeof e.globalFilter == "string" ? e.globalFilter : "";
3034
3177
  }
3035
- var ci = {
3178
+ var gi = {
3036
3179
  stickyLeft: "_stickyLeft_1vw51_16",
3037
3180
  stickyRight: "_stickyRight_1vw51_17",
3038
3181
  stickyEdgeIn: "_stickyEdgeIn_1vw51_1",
3039
3182
  stickyEdgeOut: "_stickyEdgeOut_1vw51_1"
3040
- }, li = {
3183
+ }, _i = {
3041
3184
  headerCell: "_headerCell_188ed_1",
3042
3185
  headerCellFiltered: "_headerCellFiltered_188ed_35",
3043
3186
  headerTitle: "_headerTitle_188ed_35",
@@ -3053,39 +3196,39 @@ var ci = {
3053
3196
  columnSeparatorResizable: "_columnSeparatorResizable_188ed_152",
3054
3197
  columnSeparatorActive: "_columnSeparatorActive_188ed_175",
3055
3198
  menuItemActive: "_menuItemActive_188ed_181"
3056
- }, ui = 30, di = 2;
3057
- function fi(e) {
3199
+ }, vi = 30, yi = 2;
3200
+ function bi(e) {
3058
3201
  let t = document.createRange();
3059
3202
  t.selectNodeContents(e);
3060
3203
  let n = typeof t.getBoundingClientRect == "function" ? t.getBoundingClientRect().width : 0;
3061
3204
  return n > 0 ? n : e.scrollWidth;
3062
3205
  }
3063
- function pi(e, t) {
3206
+ function xi(e, t) {
3064
3207
  let n = CSS.escape(t);
3065
3208
  return e.querySelectorAll(`[role="cell"][data-column-id="${n}"],[role="gridcell"][data-column-id="${n}"]`);
3066
3209
  }
3067
- function mi(e, t) {
3068
- return pi(e, t).length > 0;
3210
+ function Si(e, t) {
3211
+ return xi(e, t).length > 0;
3069
3212
  }
3070
- function hi({ container: e, columnId: t }) {
3213
+ function Ci({ container: e, columnId: t }) {
3071
3214
  let n = 0;
3072
- for (let r of pi(e, t)) {
3215
+ for (let r of xi(e, t)) {
3073
3216
  let e = r.firstElementChild;
3074
3217
  if (!(e instanceof HTMLElement)) continue;
3075
3218
  let t = getComputedStyle(r), i = (Number.parseFloat(t.paddingLeft) || 0) + (Number.parseFloat(t.paddingRight) || 0);
3076
- n = Math.max(n, fi(e) + i + di);
3219
+ n = Math.max(n, bi(e) + i + yi);
3077
3220
  }
3078
3221
  let r = e.querySelector(`[data-column-id="${CSS.escape(t)}"] [data-dg-header-title]`);
3079
3222
  if (r) {
3080
3223
  let e = r.closest("[role=\"columnheader\"]"), t = e ? getComputedStyle(e) : null, i = t ? (Number.parseFloat(t.paddingLeft) || 0) + (Number.parseFloat(t.paddingRight) || 0) : 0;
3081
- n = Math.max(n, fi(r) + i + ui);
3224
+ n = Math.max(n, bi(r) + i + vi);
3082
3225
  }
3083
3226
  return n;
3084
3227
  }
3085
- function gi({ table: e, columnId: t, container: n }) {
3228
+ function wi({ table: e, columnId: t, container: n }) {
3086
3229
  let r = e, i = r.getColumn(t);
3087
3230
  if (!i || !i.getCanResize()) return !1;
3088
- let a = hi({
3231
+ let a = Ci({
3089
3232
  container: n,
3090
3233
  columnId: t
3091
3234
  });
@@ -3098,46 +3241,46 @@ function gi({ table: e, columnId: t, container: n }) {
3098
3241
  }
3099
3242
  //#endregion
3100
3243
  //#region src/tmdatagrid/core/columnOrdering.ts
3101
- function _i(e, t) {
3244
+ function Ti(e, t) {
3102
3245
  return e.left.includes(t) ? "left" : e.right.includes(t) ? "right" : "center";
3103
3246
  }
3104
- function vi(e, t, n, r) {
3247
+ function Ei(e, t, n, r) {
3105
3248
  let i = e.filter((e) => e !== t), a = i.indexOf(n);
3106
3249
  return a === -1 ? [...e] : (i.splice(r === "before" ? a : a + 1, 0, t), i);
3107
3250
  }
3108
- function yi({ table: e, columnId: t, targetId: n, side: r }) {
3251
+ function Di({ table: e, columnId: t, targetId: n, side: r }) {
3109
3252
  if (t === n) return;
3110
- let i = e.store.state.columnPinning, a = _i(i, t);
3111
- if (a !== _i(i, n)) return;
3253
+ let i = e.store.state.columnPinning, a = Ti(i, t);
3254
+ if (a !== Ti(i, n)) return;
3112
3255
  let o = e.getAllLeafColumns().map((e) => e.id);
3113
- e.setColumnOrder(vi(o, t, n, r)), a !== "center" && e.setColumnPinning((e) => ({
3256
+ e.setColumnOrder(Ei(o, t, n, r)), a !== "center" && e.setColumnPinning((e) => ({
3114
3257
  ...e,
3115
- [a]: vi(e[a], t, n, r)
3258
+ [a]: Ei(e[a], t, n, r)
3116
3259
  }));
3117
3260
  }
3118
- function bi(e) {
3119
- let t = (e) => xn(e);
3261
+ function Oi(e) {
3262
+ let t = (e) => Sn(e);
3120
3263
  return {
3121
3264
  left: [...e.left.filter(t), ...e.left.filter((e) => !t(e))],
3122
3265
  right: [...e.right.filter((e) => !t(e)), ...e.right.filter(t)]
3123
3266
  };
3124
3267
  }
3125
- function xi(e, t) {
3268
+ function ki(e, t) {
3126
3269
  return t === "left" ? e.getLeftVisibleLeafColumns() : t === "right" ? e.getRightVisibleLeafColumns() : e.getCenterVisibleLeafColumns();
3127
3270
  }
3128
- function Si({ table: e, columnId: t, direction: n }) {
3129
- let r = xi(e, _i(e.store.state.columnPinning, t)), i = r.findIndex((e) => e.id === t);
3271
+ function Ai({ table: e, columnId: t, direction: n }) {
3272
+ let r = ki(e, Ti(e.store.state.columnPinning, t)), i = r.findIndex((e) => e.id === t);
3130
3273
  if (i === -1) return null;
3131
3274
  let a = r[i + n];
3132
- return !a || !Sn(a) ? null : a;
3275
+ return !a || !Cn(a) ? null : a;
3133
3276
  }
3134
- function Ci({ table: e, columnId: t, direction: n }) {
3135
- let r = Si({
3277
+ function ji({ table: e, columnId: t, direction: n }) {
3278
+ let r = Ai({
3136
3279
  table: e,
3137
3280
  columnId: t,
3138
3281
  direction: n
3139
3282
  });
3140
- r && yi({
3283
+ r && Di({
3141
3284
  table: e,
3142
3285
  columnId: t,
3143
3286
  targetId: r.id,
@@ -3146,47 +3289,47 @@ function Ci({ table: e, columnId: t, direction: n }) {
3146
3289
  }
3147
3290
  //#endregion
3148
3291
  //#region src/tmdatagrid/components/TMDataGridHeaderCell.tsx
3149
- function wi(t) {
3292
+ function Mi(t) {
3150
3293
  let n = e(267), { header: r, layout: i, renderColumnMenuItems: a } = t, o = Q(), { table: u, features: d, labels: f } = o, p = r.column, [m, h] = c(!1), [_, v] = c(!1), [y, b] = c(null), x = s(null), S = s(!1), C;
3151
- n[0] === Symbol.for("react.memo_cache_sentinel") ? (C = { compare: _e }, n[0] = C) : C = n[0];
3152
- let { sorting: w, columnFilters: T, resizingColumnId: E, columnPinning: D, grouping: k } = j(u.store, ji, C), A = j(o.ui, Ai), N = r.subHeaders.length === 0, B, V, H, W, G, K, ce, le, ue, de, fe, pe, me, he, ge, ve, ye, Y, be, xe;
3294
+ n[0] === Symbol.for("react.memo_cache_sentinel") ? (C = { compare: ve }, n[0] = C) : C = n[0];
3295
+ let { sorting: w, columnFilters: T, resizingColumnId: E, columnPinning: D, grouping: k } = j(u.store, zi, C), A = j(o.ui, Ri), N = r.subHeaders.length === 0, B, V, H, W, G, K, ce, le, ue, de, fe, pe, me, he, ge, _e, ye, Y, be, xe;
3153
3296
  if (n[1] !== o || n[2] !== p || n[3] !== T || n[4] !== D || n[5] !== A || n[6] !== y || n[7] !== d || n[8] !== k || n[9] !== N || n[10] !== f || n[11] !== i.pinnedAt || n[12] !== a || n[13] !== E || n[14] !== w || n[15] !== u) {
3154
- ye = pn(p);
3297
+ ye = mn(p);
3155
3298
  let e;
3156
- n[36] === p ? e = n[37] : (e = yn(p), n[36] = p, n[37] = e), B = e;
3299
+ n[36] === p ? e = n[37] : (e = bn(p), n[36] = p, n[37] = e), B = e;
3157
3300
  let t;
3158
- n[38] !== p.id || n[39] !== w ? (t = w.find((e) => e.id === p.id)?.desc, n[38] = p.id, n[39] = w, n[40] = t) : t = n[40], be = t, ve = be !== void 0;
3301
+ n[38] !== p.id || n[39] !== w ? (t = w.find((e) => e.id === p.id)?.desc, n[38] = p.id, n[39] = w, n[40] = t) : t = n[40], be = t, _e = be !== void 0;
3159
3302
  let r;
3160
- n[41] !== p.id || n[42] !== ve || n[43] !== w ? (r = ve && w.length > 1 ? w.findIndex((e) => e.id === p.id) + 1 : null, n[41] = p.id, n[42] = ve, n[43] = w, n[44] = r) : r = n[44], xe = r;
3303
+ n[41] !== p.id || n[42] !== _e || n[43] !== w ? (r = _e && w.length > 1 ? w.findIndex((e) => e.id === p.id) + 1 : null, n[41] = p.id, n[42] = _e, n[43] = w, n[44] = r) : r = n[44], xe = r;
3161
3304
  let s;
3162
3305
  if (n[45] !== p.id || n[46] !== T) {
3163
3306
  let e;
3164
- n[48] === p.id ? e = n[49] : (e = (e) => e.id === p.id && _t(e.value), n[48] = p.id, n[49] = e), s = T.some(e), n[45] = p.id, n[46] = T, n[47] = s;
3307
+ n[48] === p.id ? e = n[49] : (e = (e) => e.id === p.id && vt(e.value), n[48] = p.id, n[49] = e), s = T.some(e), n[45] = p.id, n[46] = T, n[47] = s;
3165
3308
  } else s = n[47];
3166
3309
  he = s, ge = E === p.id, Y = i.pinnedAt;
3167
3310
  let c;
3168
- n[50] !== p || n[51] !== d ? (c = Pr(p, d), n[50] = p, n[51] = d, n[52] = c) : c = n[52];
3311
+ n[50] !== p || n[51] !== d ? (c = Hr(p, d), n[50] = p, n[51] = d, n[52] = c) : c = n[52];
3169
3312
  let l = c;
3170
3313
  G = N && l.canSort;
3171
3314
  let m = N && l.canFilter, h = N && l.canHide, _ = N && l.canPin;
3172
3315
  W = l.canResize, H = N && l.canReorder;
3173
- let v = N && l.canGroup, S = N && Fr(u, d).canHideAny, C;
3316
+ let v = N && l.canGroup, S = N && Ur(u, d).canHideAny, C;
3174
3317
  n[53] !== p.id || n[54] !== k ? (C = k.includes(p.id), n[53] = p.id, n[54] = k, n[55] = C) : C = n[55];
3175
3318
  let O = C, j = k.length > 0;
3176
3319
  pe = A === p.id;
3177
3320
  let U;
3178
- n[56] !== H || n[57] !== p.id || n[58] !== D || n[59] !== A || n[60] !== pe ? (U = H && A !== null && !pe && _i(D, A) === _i(D, p.id), n[56] = H, n[57] = p.id, n[58] = D, n[59] = A, n[60] = pe, n[61] = U) : U = n[61], me = U;
3321
+ n[56] !== H || n[57] !== p.id || n[58] !== D || n[59] !== A || n[60] !== pe ? (U = H && A !== null && !pe && Ti(D, A) === Ti(D, p.id), n[56] = H, n[57] = p.id, n[58] = D, n[59] = A, n[60] = pe, n[61] = U) : U = n[61], me = U;
3179
3322
  let J;
3180
3323
  n[62] !== o.ui || n[63] !== p.id ? (J = function(e) {
3181
3324
  e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", p.id), o.ui.actions.startColumnDrag(p.id);
3182
3325
  }, n[62] = o.ui, n[63] = p.id, n[64] = J) : J = n[64], de = J;
3183
- let _e;
3184
- n[65] === me ? _e = n[66] : (_e = function(e) {
3326
+ let ve;
3327
+ n[65] === me ? ve = n[66] : (ve = function(e) {
3185
3328
  if (!me) return;
3186
3329
  e.preventDefault(), e.dataTransfer.dropEffect = "move";
3187
3330
  let t = x.current?.getBoundingClientRect();
3188
3331
  t && b(e.clientX < t.left + t.width / 2 ? "before" : "after");
3189
- }, n[65] = me, n[66] = _e), ue = _e;
3332
+ }, n[65] = me, n[66] = ve), ue = ve;
3190
3333
  let Se;
3191
3334
  n[67] === Symbol.for("react.memo_cache_sentinel") ? (Se = function(e) {
3192
3335
  let t = e.relatedTarget;
@@ -3194,7 +3337,7 @@ function wi(t) {
3194
3337
  }, n[67] = Se) : Se = n[67], le = Se;
3195
3338
  let Ce;
3196
3339
  n[68] !== o.ui || n[69] !== p.id || n[70] !== A || n[71] !== y || n[72] !== me || n[73] !== u ? (Ce = function(e) {
3197
- e.preventDefault(), b(null), o.ui.actions.endColumnDrag(), !(!me || !y || !A) && yi({
3340
+ e.preventDefault(), b(null), o.ui.actions.endColumnDrag(), !(!me || !y || !A) && Di({
3198
3341
  table: u,
3199
3342
  columnId: A,
3200
3343
  targetId: p.id,
@@ -3208,7 +3351,7 @@ function wi(t) {
3208
3351
  let X;
3209
3352
  n[77] !== p.id || n[78] !== u ? (X = function() {
3210
3353
  let e = x.current?.closest("[data-dg-scroll-container]");
3211
- e && gi({
3354
+ e && wi({
3212
3355
  table: u,
3213
3356
  columnId: p.id,
3214
3357
  container: e
@@ -3223,7 +3366,7 @@ function wi(t) {
3223
3366
  [p.id]: Math.round(e)
3224
3367
  }));
3225
3368
  }
3226
- p.pin(e), u.setColumnPinning(bi);
3369
+ p.pin(e), u.setColumnPinning(Oi);
3227
3370
  }, n[80] = p, n[81] = u, n[82] = Te) : Te = n[82];
3228
3371
  let Ee = Te, Z = [];
3229
3372
  if (G) {
@@ -3263,7 +3406,7 @@ function wi(t) {
3263
3406
  stroke: 1.6
3264
3407
  }), n[96] = e) : e = n[96];
3265
3408
  let t;
3266
- n[97] !== o || n[98] !== p.id ? (t = () => Jr(o, p.id), n[97] = o, n[98] = p.id, n[99] = t) : t = n[99];
3409
+ n[97] !== o || n[98] !== p.id ? (t = () => ni(o, p.id), n[97] = o, n[98] = p.id, n[99] = t) : t = n[99];
3267
3410
  let r;
3268
3411
  n[100] !== f.filterMenuItem || n[101] !== t ? (r = /* @__PURE__ */ q(g.Item, {
3269
3412
  leftSection: e,
@@ -3274,7 +3417,7 @@ function wi(t) {
3274
3417
  n[103] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ q(g.Divider, {}, "filter-divider"), n[103] = i) : i = n[103], Z.push(r, i);
3275
3418
  }
3276
3419
  if (v) {
3277
- let e = O ? li.menuItemActive : void 0, t;
3420
+ let e = O ? _i.menuItemActive : void 0, t;
3278
3421
  n[104] === O ? t = n[105] : (t = q(O ? ae : oe, {
3279
3422
  size: 16,
3280
3423
  stroke: 1.6
@@ -3298,11 +3441,11 @@ function wi(t) {
3298
3441
  stroke: 1.6
3299
3442
  }),
3300
3443
  onClick: () => t.toggleGrouping(),
3301
- children: f.ungroup(pn(t))
3444
+ children: f.ungroup(mn(t))
3302
3445
  }, `ungroup-${e}`));
3303
3446
  }
3304
3447
  let e;
3305
- n[113] === u ? e = n[114] : (e = (e) => u.setExpanded(Ot({
3448
+ n[113] === u ? e = n[114] : (e = (e) => u.setExpanded(kt({
3306
3449
  rows: u.getPrePaginatedRowModel().flatRows,
3307
3450
  expanded: u.store.state.expanded,
3308
3451
  target: "groups",
@@ -3340,7 +3483,7 @@ function wi(t) {
3340
3483
  n[127] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ q(g.Divider, {}, "group-divider"), n[127] = e) : e = n[127], Z.push(e);
3341
3484
  }
3342
3485
  if (_) {
3343
- let e = Y === "left" ? li.menuItemActive : void 0, t;
3486
+ let e = Y === "left" ? _i.menuItemActive : void 0, t;
3344
3487
  n[128] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ q(P, {
3345
3488
  size: 16,
3346
3489
  stroke: 1.6
@@ -3354,7 +3497,7 @@ function wi(t) {
3354
3497
  onClick: r,
3355
3498
  children: f.pinLeft
3356
3499
  }, "pin-left"), n[132] = f.pinLeft, n[133] = e, n[134] = r, n[135] = i) : i = n[135];
3357
- let a = Y === "right" ? li.menuItemActive : void 0, o;
3500
+ let a = Y === "right" ? _i.menuItemActive : void 0, o;
3358
3501
  n[136] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ q(F, {
3359
3502
  size: 16,
3360
3503
  stroke: 1.6
@@ -3387,13 +3530,13 @@ function wi(t) {
3387
3530
  }
3388
3531
  if (H) {
3389
3532
  let e;
3390
- n[151] !== p.id || n[152] !== u ? (e = Si({
3533
+ n[151] !== p.id || n[152] !== u ? (e = Ai({
3391
3534
  table: u,
3392
3535
  columnId: p.id,
3393
3536
  direction: -1
3394
3537
  }), n[151] = p.id, n[152] = u, n[153] = e) : e = n[153];
3395
3538
  let t = e, r;
3396
- n[154] !== p.id || n[155] !== u ? (r = Si({
3539
+ n[154] !== p.id || n[155] !== u ? (r = Ai({
3397
3540
  table: u,
3398
3541
  columnId: p.id,
3399
3542
  direction: 1
@@ -3406,7 +3549,7 @@ function wi(t) {
3406
3549
  stroke: 1.6
3407
3550
  }), n[157] = r) : r = n[157];
3408
3551
  let a;
3409
- n[158] !== p.id || n[159] !== u ? (a = () => Ci({
3552
+ n[158] !== p.id || n[159] !== u ? (a = () => ji({
3410
3553
  table: u,
3411
3554
  columnId: p.id,
3412
3555
  direction: -1
@@ -3424,7 +3567,7 @@ function wi(t) {
3424
3567
  stroke: 1.6
3425
3568
  }), n[165] = c) : c = n[165];
3426
3569
  let l;
3427
- n[166] !== p.id || n[167] !== u ? (l = () => Ci({
3570
+ n[166] !== p.id || n[167] !== u ? (l = () => ji({
3428
3571
  table: u,
3429
3572
  columnId: p.id,
3430
3573
  direction: 1
@@ -3485,19 +3628,19 @@ function wi(t) {
3485
3628
  children: f.manageColumns
3486
3629
  }, "manage"), n[188] = f.manageColumns, n[189] = t, n[190] = r) : r = n[190], Z.push(r);
3487
3630
  }
3488
- for (; Z.length > 0 && Mi(Z.at(-1));) Z.pop();
3631
+ for (; Z.length > 0 && Bi(Z.at(-1));) Z.pop();
3489
3632
  for (K = a ? [...a({
3490
3633
  column: p,
3491
3634
  table: u,
3492
3635
  internalItems: Z
3493
- })] : Z; K.length > 0 && Mi(K.at(-1));) K.pop();
3494
- n[1] = o, n[2] = p, n[3] = T, n[4] = D, n[5] = A, n[6] = y, n[7] = d, n[8] = k, n[9] = N, n[10] = f, n[11] = i.pinnedAt, n[12] = a, n[13] = E, n[14] = w, n[15] = u, n[16] = B, n[17] = V, n[18] = H, n[19] = W, n[20] = G, n[21] = K, n[22] = ce, n[23] = le, n[24] = ue, n[25] = de, n[26] = fe, n[27] = pe, n[28] = me, n[29] = he, n[30] = ge, n[31] = ve, n[32] = ye, n[33] = Y, n[34] = be, n[35] = xe;
3495
- } else B = n[16], V = n[17], H = n[18], W = n[19], G = n[20], K = n[21], ce = n[22], le = n[23], ue = n[24], de = n[25], fe = n[26], pe = n[27], me = n[28], he = n[29], ge = n[30], ve = n[31], ye = n[32], Y = n[33], be = n[34], xe = n[35];
3636
+ })] : Z; K.length > 0 && Bi(K.at(-1));) K.pop();
3637
+ n[1] = o, n[2] = p, n[3] = T, n[4] = D, n[5] = A, n[6] = y, n[7] = d, n[8] = k, n[9] = N, n[10] = f, n[11] = i.pinnedAt, n[12] = a, n[13] = E, n[14] = w, n[15] = u, n[16] = B, n[17] = V, n[18] = H, n[19] = W, n[20] = G, n[21] = K, n[22] = ce, n[23] = le, n[24] = ue, n[25] = de, n[26] = fe, n[27] = pe, n[28] = me, n[29] = he, n[30] = ge, n[31] = _e, n[32] = ye, n[33] = Y, n[34] = be, n[35] = xe;
3638
+ } else B = n[16], V = n[17], H = n[18], W = n[19], G = n[20], K = n[21], ce = n[22], le = n[23], ue = n[24], de = n[25], fe = n[26], pe = n[27], me = n[28], he = n[29], ge = n[30], _e = n[31], ye = n[32], Y = n[33], be = n[34], xe = n[35];
3496
3639
  let Se;
3497
- n[191] !== p.id || n[192] !== K || n[193] !== N ? (Se = N && K.length > 0 && !bn(p.id), n[191] = p.id, n[192] = K, n[193] = N, n[194] = Se) : Se = n[194];
3498
- let Ce = Se, we = G ? li.headerCellSortable : "", X = he ? li.headerCellFiltered : "", Te = pe ? li.headerCellDragging : "", Ee = y === "before" ? li.headerCellDropBefore : "", Z = y === "after" ? li.headerCellDropAfter : "", De = i.isBoundary && Y === "left" ? ci.stickyLeft : "", Oe = i.isBoundary && Y === "right" ? ci.stickyRight : "", ke;
3640
+ n[191] !== p.id || n[192] !== K || n[193] !== N ? (Se = N && K.length > 0 && !xn(p.id), n[191] = p.id, n[192] = K, n[193] = N, n[194] = Se) : Se = n[194];
3641
+ let Ce = Se, we = G ? _i.headerCellSortable : "", X = he ? _i.headerCellFiltered : "", Te = pe ? _i.headerCellDragging : "", Ee = y === "before" ? _i.headerCellDropBefore : "", Z = y === "after" ? _i.headerCellDropAfter : "", De = i.isBoundary && Y === "left" ? gi.stickyLeft : "", Oe = i.isBoundary && Y === "right" ? gi.stickyRight : "", ke;
3499
3642
  n[195] !== we || n[196] !== X || n[197] !== Te || n[198] !== Ee || n[199] !== Z || n[200] !== De || n[201] !== Oe ? (ke = [
3500
- li.headerCell,
3643
+ _i.headerCell,
3501
3644
  we,
3502
3645
  X,
3503
3646
  Te,
@@ -3506,16 +3649,16 @@ function wi(t) {
3506
3649
  De,
3507
3650
  Oe
3508
3651
  ].filter(Boolean), n[195] = we, n[196] = X, n[197] = Te, n[198] = Ee, n[199] = Z, n[200] = De, n[201] = Oe, n[202] = ke) : ke = n[202];
3509
- let Ae = ke.join(" "), je = p.id, Me = ve || he, Ne;
3510
- n[203] === p.id ? Ne = n[204] : (Ne = bn(p.id), n[203] = p.id, n[204] = Ne);
3511
- let Fe = G ? ve ? be ? "descending" : "ascending" : "none" : void 0, Ie = H && !ge, Le = H ? de : void 0, Re = H ? ce : void 0, ze = me ? ue : void 0, Be = me ? le : void 0, Ve = me ? fe : void 0, He = Y === "left" ? i.offset : void 0, Ue = Y === "right" ? i.offset : void 0, We = Y ? "sticky" : void 0, Ge = Y ? "var(--dg-z-header-pinned-cell, 7)" : void 0, Ke;
3652
+ let Ae = ke.join(" "), je = p.id, Me = _e || he, Ne;
3653
+ n[203] === p.id ? Ne = n[204] : (Ne = xn(p.id), n[203] = p.id, n[204] = Ne);
3654
+ let Pe = G ? _e ? be ? "descending" : "ascending" : "none" : void 0, Ie = H && !ge, Le = H ? de : void 0, Re = H ? ce : void 0, ze = me ? ue : void 0, Be = me ? le : void 0, Ve = me ? fe : void 0, He = Y === "left" ? i.offset : void 0, Ue = Y === "right" ? i.offset : void 0, We = Y ? "sticky" : void 0, Ge = Y ? "var(--dg-z-header-pinned-cell, 7)" : void 0, Ke;
3512
3655
  n[205] !== He || n[206] !== Ue || n[207] !== We || n[208] !== Ge ? (Ke = {
3513
3656
  left: He,
3514
3657
  right: Ue,
3515
3658
  position: We,
3516
3659
  zIndex: Ge
3517
3660
  }, n[205] = He, n[206] = Ue, n[207] = We, n[208] = Ge, n[209] = Ke) : Ke = n[209];
3518
- let qe = G ? ki : void 0, Je;
3661
+ let qe = G ? Li : void 0, Je;
3519
3662
  n[210] !== G || n[211] !== p ? (Je = G ? (e) => {
3520
3663
  if (S.current) {
3521
3664
  S.current = !1;
@@ -3530,17 +3673,17 @@ function wi(t) {
3530
3673
  withinPortal: !0,
3531
3674
  disabled: !N,
3532
3675
  children: /* @__PURE__ */ q("span", {
3533
- className: li.headerTitle,
3676
+ className: _i.headerTitle,
3534
3677
  "data-dg-header-title": !0,
3535
- children: Pe(p.columnDef.header, r.getContext())
3678
+ children: Fe(p.columnDef.header, r.getContext())
3536
3679
  })
3537
3680
  }), n[213] = p.columnDef, n[214] = r, n[215] = N, n[216] = ye, n[217] = Ye) : Ye = n[217];
3538
3681
  let Xe;
3539
- n[218] !== o || n[219] !== G || n[220] !== p || n[221] !== _ || n[222] !== K || n[223] !== Ce || n[224] !== he || n[225] !== N || n[226] !== ve || n[227] !== ye || n[228] !== f || n[229] !== m || n[230] !== be || n[231] !== xe ? (Xe = N && /* @__PURE__ */ J("div", {
3540
- className: li.headerActions,
3682
+ n[218] !== o || n[219] !== G || n[220] !== p || n[221] !== _ || n[222] !== K || n[223] !== Ce || n[224] !== he || n[225] !== N || n[226] !== _e || n[227] !== ye || n[228] !== f || n[229] !== m || n[230] !== be || n[231] !== xe ? (Xe = N && /* @__PURE__ */ J("div", {
3683
+ className: _i.headerActions,
3541
3684
  children: [
3542
3685
  he && /* @__PURE__ */ q(l, {
3543
- className: li.headerAction,
3686
+ className: _i.headerAction,
3544
3687
  "data-pinned-visible": "true",
3545
3688
  variant: "subtle",
3546
3689
  color: "gray",
@@ -3549,7 +3692,7 @@ function wi(t) {
3549
3692
  "data-dg-part": "header-filter",
3550
3693
  "data-column-id": p.id,
3551
3694
  onClick: (e) => {
3552
- e.stopPropagation(), Jr(o, p.id);
3695
+ e.stopPropagation(), ni(o, p.id);
3553
3696
  },
3554
3697
  children: /* @__PURE__ */ q(ne, {
3555
3698
  size: 14,
@@ -3557,11 +3700,11 @@ function wi(t) {
3557
3700
  })
3558
3701
  }),
3559
3702
  G && /* @__PURE__ */ q(l, {
3560
- className: `${li.headerAction} ${li.sortAction}`,
3561
- "data-pinned-visible": ve,
3562
- "data-sorted": ve,
3703
+ className: `${_i.headerAction} ${_i.sortAction}`,
3704
+ "data-pinned-visible": _e,
3705
+ "data-sorted": _e,
3563
3706
  variant: "subtle",
3564
- color: ve ? void 0 : "gray",
3707
+ color: _e ? void 0 : "gray",
3565
3708
  size: "xs",
3566
3709
  "aria-label": f.sortColumn(ye),
3567
3710
  "data-dg-part": "header-sort",
@@ -3573,7 +3716,7 @@ function wi(t) {
3573
3716
  })
3574
3717
  }),
3575
3718
  xe !== null && /* @__PURE__ */ q("span", {
3576
- className: li.sortIndex,
3719
+ className: _i.sortIndex,
3577
3720
  "data-dg-part": "sort-index",
3578
3721
  children: xe
3579
3722
  }),
@@ -3585,7 +3728,7 @@ function wi(t) {
3585
3728
  width: 220,
3586
3729
  withinPortal: !0,
3587
3730
  children: [/* @__PURE__ */ q(g.Target, { children: /* @__PURE__ */ q(l, {
3588
- className: li.headerAction,
3731
+ className: _i.headerAction,
3589
3732
  "data-pinned-visible": m || _,
3590
3733
  variant: "subtle",
3591
3734
  color: "gray",
@@ -3594,38 +3737,38 @@ function wi(t) {
3594
3737
  "data-dg-part": "header-menu",
3595
3738
  "data-column-id": p.id,
3596
3739
  onClick: (e) => {
3597
- e.stopPropagation(), h(Oi);
3740
+ e.stopPropagation(), h(Ii);
3598
3741
  },
3599
3742
  children: /* @__PURE__ */ q(U, {
3600
3743
  size: 14,
3601
3744
  stroke: 1.6
3602
3745
  })
3603
3746
  }) }), /* @__PURE__ */ q(g.Dropdown, {
3604
- onClick: Di,
3747
+ onClick: Fi,
3605
3748
  children: K
3606
3749
  })]
3607
3750
  })
3608
3751
  ]
3609
- }), n[218] = o, n[219] = G, n[220] = p, n[221] = _, n[222] = K, n[223] = Ce, n[224] = he, n[225] = N, n[226] = ve, n[227] = ye, n[228] = f, n[229] = m, n[230] = be, n[231] = xe, n[232] = Xe) : Xe = n[232];
3752
+ }), n[218] = o, n[219] = G, n[220] = p, n[221] = _, n[222] = K, n[223] = Ce, n[224] = he, n[225] = N, n[226] = _e, n[227] = ye, n[228] = f, n[229] = m, n[230] = be, n[231] = xe, n[232] = Xe) : Xe = n[232];
3610
3753
  let Ze;
3611
- n[233] !== V || n[234] !== W || n[235] !== p.id || n[236] !== r || n[237] !== ge ? (Ze = !bn(p.id) && /* @__PURE__ */ q("div", {
3754
+ n[233] !== V || n[234] !== W || n[235] !== p.id || n[236] !== r || n[237] !== ge ? (Ze = !xn(p.id) && /* @__PURE__ */ q("div", {
3612
3755
  className: [
3613
- li.columnSeparator,
3614
- W ? li.columnSeparatorResizable : "",
3615
- ge ? li.columnSeparatorActive : ""
3756
+ _i.columnSeparator,
3757
+ W ? _i.columnSeparatorResizable : "",
3758
+ ge ? _i.columnSeparatorActive : ""
3616
3759
  ].filter(Boolean).join(" "),
3617
3760
  draggable: !1,
3618
3761
  onMouseDown: W ? (e) => {
3619
3762
  S.current = !0, r.getResizeHandler()(e);
3620
3763
  } : void 0,
3621
3764
  onTouchStart: W ? r.getResizeHandler() : void 0,
3622
- onClick: Ei,
3765
+ onClick: Pi,
3623
3766
  onDoubleClick: W ? (e) => {
3624
3767
  e.stopPropagation(), V();
3625
3768
  } : void 0
3626
3769
  }), n[233] = V, n[234] = W, n[235] = p.id, n[236] = r, n[237] = ge, n[238] = Ze) : Ze = n[238];
3627
3770
  let Qe;
3628
- n[239] !== B || n[240] !== Ae || n[241] !== p.id || n[242] !== Me || n[243] !== Ne || n[244] !== Fe || n[245] !== Ie || n[246] !== Le || n[247] !== Re || n[248] !== ze || n[249] !== Be || n[250] !== Ve || n[251] !== Ke || n[252] !== qe || n[253] !== Je || n[254] !== Ye || n[255] !== Xe || n[256] !== Ze ? (Qe = /* @__PURE__ */ J("div", {
3771
+ n[239] !== B || n[240] !== Ae || n[241] !== p.id || n[242] !== Me || n[243] !== Ne || n[244] !== Pe || n[245] !== Ie || n[246] !== Le || n[247] !== Re || n[248] !== ze || n[249] !== Be || n[250] !== Ve || n[251] !== Ke || n[252] !== qe || n[253] !== Je || n[254] !== Ye || n[255] !== Xe || n[256] !== Ze ? (Qe = /* @__PURE__ */ J("div", {
3629
3772
  ref: x,
3630
3773
  role: "columnheader",
3631
3774
  "data-dg-part": "header",
@@ -3633,7 +3776,7 @@ function wi(t) {
3633
3776
  "data-active": Me,
3634
3777
  "data-align": B,
3635
3778
  "data-control-column": Ne,
3636
- "aria-sort": Fe,
3779
+ "aria-sort": Pe,
3637
3780
  className: Ae,
3638
3781
  draggable: Ie,
3639
3782
  onDragStart: Le,
@@ -3649,7 +3792,7 @@ function wi(t) {
3649
3792
  Xe,
3650
3793
  Ze
3651
3794
  ]
3652
- }), n[239] = B, n[240] = Ae, n[241] = p.id, n[242] = Me, n[243] = Ne, n[244] = Fe, n[245] = Ie, n[246] = Le, n[247] = Re, n[248] = ze, n[249] = Be, n[250] = Ve, n[251] = Ke, n[252] = qe, n[253] = Je, n[254] = Ye, n[255] = Xe, n[256] = Ze, n[257] = Qe) : Qe = n[257];
3795
+ }), n[239] = B, n[240] = Ae, n[241] = p.id, n[242] = Me, n[243] = Ne, n[244] = Pe, n[245] = Ie, n[246] = Le, n[247] = Re, n[248] = ze, n[249] = Be, n[250] = Ve, n[251] = Ke, n[252] = qe, n[253] = Je, n[254] = Ye, n[255] = Xe, n[256] = Ze, n[257] = Qe) : Qe = n[257];
3653
3796
  let $e = Qe;
3654
3797
  if (!Ce) return $e;
3655
3798
  let et;
@@ -3660,7 +3803,7 @@ function wi(t) {
3660
3803
  n[259] === $e ? tt = n[260] : (tt = /* @__PURE__ */ q(g.ContextMenu, { children: $e }), n[259] = $e, n[260] = tt);
3661
3804
  let nt;
3662
3805
  n[261] === K ? nt = n[262] : (nt = /* @__PURE__ */ q(g.Dropdown, {
3663
- onClick: Ti,
3806
+ onClick: Ni,
3664
3807
  children: K
3665
3808
  }), n[261] = K, n[262] = nt);
3666
3809
  let rt;
@@ -3674,25 +3817,25 @@ function wi(t) {
3674
3817
  children: [tt, nt]
3675
3818
  }), n[263] = _, n[264] = tt, n[265] = nt, n[266] = rt) : rt = n[266], rt;
3676
3819
  }
3677
- function Ti(e) {
3820
+ function Ni(e) {
3678
3821
  return e.stopPropagation();
3679
3822
  }
3680
- function Ei(e) {
3823
+ function Pi(e) {
3681
3824
  return e.stopPropagation();
3682
3825
  }
3683
- function Di(e) {
3826
+ function Fi(e) {
3684
3827
  return e.stopPropagation();
3685
3828
  }
3686
- function Oi(e) {
3829
+ function Ii(e) {
3687
3830
  return !e;
3688
3831
  }
3689
- function ki(e) {
3832
+ function Li(e) {
3690
3833
  e.shiftKey && e.preventDefault();
3691
3834
  }
3692
- function Ai(e) {
3835
+ function Ri(e) {
3693
3836
  return e.draggedColumnId;
3694
3837
  }
3695
- function ji(e) {
3838
+ function zi(e) {
3696
3839
  return {
3697
3840
  sorting: e.sorting,
3698
3841
  columnFilters: e.columnFilters,
@@ -3702,14 +3845,14 @@ function ji(e) {
3702
3845
  grouping: e.grouping
3703
3846
  };
3704
3847
  }
3705
- function Mi(e) {
3848
+ function Bi(e) {
3706
3849
  return typeof e == "object" && !!e && "type" in e && e.type === g.Divider;
3707
3850
  }
3708
3851
  //#endregion
3709
3852
  //#region src/tmdatagrid/components/editors/TMDataGridBooleanEditor.tsx
3710
- function Ni(t) {
3711
- let n = e(12), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Pt(r), c = It(r), l;
3712
- n[0] !== i || n[1] !== o ? (l = o.editCell(pn(i)), n[0] = i, n[1] = o, n[2] = l) : l = n[2];
3853
+ function Vi(t) {
3854
+ let n = e(12), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Ft(r), c = Lt(r), l;
3855
+ n[0] !== i || n[1] !== o ? (l = o.editCell(mn(i)), n[0] = i, n[1] = o, n[2] = l) : l = n[2];
3713
3856
  let u = s === !0, d;
3714
3857
  n[3] === r ? d = n[4] : (d = (e) => r.handleChange(e.currentTarget.checked), n[3] = r, n[4] = d);
3715
3858
  let p;
@@ -3725,11 +3868,11 @@ function Ni(t) {
3725
3868
  }
3726
3869
  //#endregion
3727
3870
  //#region src/tmdatagrid/components/editors/TMDataGridDateEditor.tsx
3728
- function Pi(t) {
3729
- let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = Q(), c = Pt(r), l = It(r), u = s(c instanceof Date), d;
3871
+ function Hi(t) {
3872
+ let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = Q(), c = Ft(r), l = Lt(r), u = s(c instanceof Date), d;
3730
3873
  n[0] === c ? d = n[1] : (d = c instanceof Date ? c.toLocaleDateString("sv-SE") : typeof c == "string" ? c.slice(0, 10) : "", n[0] = c, n[1] = d);
3731
3874
  let f = d, p;
3732
- n[2] !== i || n[3] !== o ? (p = o.editCell(pn(i)), n[2] = i, n[3] = o, n[4] = p) : p = n[4];
3875
+ n[2] !== i || n[3] !== o ? (p = o.editCell(mn(i)), n[2] = i, n[3] = o, n[4] = p) : p = n[4];
3733
3876
  let m;
3734
3877
  n[5] === r ? m = n[6] : (m = (e) => {
3735
3878
  let t = e.currentTarget.value;
@@ -3754,13 +3897,13 @@ function Pi(t) {
3754
3897
  }
3755
3898
  //#endregion
3756
3899
  //#region src/tmdatagrid/components/editors/TMDataGridMultiSelectEditor.tsx
3757
- function Fi(t) {
3758
- let n = e(20), { field: r, column: i, row: a, table: o, size: s } = t, { labels: c } = Q(), l = Pt(r), u = It(r), d;
3900
+ function Ui(t) {
3901
+ let n = e(20), { field: r, column: i, row: a, table: o, size: s } = t, { labels: c } = Q(), l = Ft(r), u = Lt(r), d;
3759
3902
  n[0] === Symbol.for("react.memo_cache_sentinel") ? (d = { withinPortal: !1 }, n[0] = d) : d = n[0];
3760
3903
  let f;
3761
- n[1] !== i || n[2] !== c ? (f = c.editCell(pn(i)), n[1] = i, n[2] = c, n[3] = f) : f = n[3];
3904
+ n[1] !== i || n[2] !== c ? (f = c.editCell(mn(i)), n[1] = i, n[2] = c, n[3] = f) : f = n[3];
3762
3905
  let p;
3763
- n[4] !== i || n[5] !== a || n[6] !== o ? (p = Ln(In({
3906
+ n[4] !== i || n[5] !== a || n[6] !== o ? (p = Hn(Vn({
3764
3907
  table: o,
3765
3908
  column: i,
3766
3909
  row: a,
@@ -3787,9 +3930,9 @@ function Fi(t) {
3787
3930
  }
3788
3931
  //#endregion
3789
3932
  //#region src/tmdatagrid/components/editors/TMDataGridNumberEditor.tsx
3790
- function Ii(t) {
3791
- let n = e(15), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Pt(r), c = It(r), { inputRef: l, remember: u } = zt(), d;
3792
- n[0] !== i || n[1] !== o ? (d = o.editCell(pn(i)), n[0] = i, n[1] = o, n[2] = d) : d = n[2];
3933
+ function Wi(t) {
3934
+ let n = e(15), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Ft(r), c = Lt(r), { inputRef: l, remember: u } = Bt(), d;
3935
+ n[0] !== i || n[1] !== o ? (d = o.editCell(mn(i)), n[0] = i, n[1] = o, n[2] = d) : d = n[2];
3793
3936
  let f = typeof s == "number" ? s : "", p;
3794
3937
  n[3] !== r || n[4] !== l || n[5] !== u ? (p = (e) => {
3795
3938
  l.current !== null && u(l.current), r.handleChange(typeof e == "number" ? e : e === "" ? null : Number(e));
@@ -3799,7 +3942,7 @@ function Ii(t) {
3799
3942
  ref: l,
3800
3943
  size: a,
3801
3944
  w: "100%",
3802
- onFocus: Rt,
3945
+ onFocus: zt,
3803
3946
  hideControls: !0,
3804
3947
  "aria-label": d,
3805
3948
  "data-dg-part": "editor-input",
@@ -3811,13 +3954,13 @@ function Ii(t) {
3811
3954
  }
3812
3955
  //#endregion
3813
3956
  //#region src/tmdatagrid/components/editors/TMDataGridSelectEditor.tsx
3814
- function Li(t) {
3815
- let n = e(20), { field: r, column: i, row: a, table: o, size: s, commit: c } = t, { labels: l, features: u } = Q(), d = Pt(r), f = It(r), p;
3957
+ function Gi(t) {
3958
+ let n = e(20), { field: r, column: i, row: a, table: o, size: s, commit: c } = t, { labels: l, features: u } = Q(), d = Ft(r), f = Lt(r), p;
3816
3959
  n[0] === Symbol.for("react.memo_cache_sentinel") ? (p = { withinPortal: !1 }, n[0] = p) : p = n[0];
3817
3960
  let m;
3818
- n[1] !== i || n[2] !== l ? (m = l.editCell(pn(i)), n[1] = i, n[2] = l, n[3] = m) : m = n[3];
3961
+ n[1] !== i || n[2] !== l ? (m = l.editCell(mn(i)), n[1] = i, n[2] = l, n[3] = m) : m = n[3];
3819
3962
  let h;
3820
- n[4] !== i || n[5] !== a || n[6] !== o ? (h = Ln(In({
3963
+ n[4] !== i || n[5] !== a || n[6] !== o ? (h = Hn(Vn({
3821
3964
  table: o,
3822
3965
  column: i,
3823
3966
  row: a,
@@ -3844,9 +3987,9 @@ function Li(t) {
3844
3987
  }
3845
3988
  //#endregion
3846
3989
  //#region src/tmdatagrid/components/editors/TMDataGridStringEditor.tsx
3847
- function Ri(t) {
3848
- let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Pt(r), c = It(r), { inputRef: l, remember: u } = zt(), d;
3849
- n[0] !== i || n[1] !== o ? (d = o.editCell(pn(i)), n[0] = i, n[1] = o, n[2] = d) : d = n[2];
3990
+ function Ki(t) {
3991
+ let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Ft(r), c = Lt(r), { inputRef: l, remember: u } = Bt(), d;
3992
+ n[0] !== i || n[1] !== o ? (d = o.editCell(mn(i)), n[0] = i, n[1] = o, n[2] = d) : d = n[2];
3850
3993
  let f = typeof s == "string" ? s : "", p;
3851
3994
  n[3] !== r || n[4] !== u ? (p = (e) => {
3852
3995
  u(e.currentTarget), r.handleChange(e.currentTarget.value);
@@ -3856,7 +3999,7 @@ function Ri(t) {
3856
3999
  ref: l,
3857
4000
  size: a,
3858
4001
  w: "100%",
3859
- onFocus: Rt,
4002
+ onFocus: zt,
3860
4003
  "aria-label": d,
3861
4004
  "data-dg-part": "editor-input",
3862
4005
  value: f,
@@ -3867,16 +4010,16 @@ function Ri(t) {
3867
4010
  }
3868
4011
  //#endregion
3869
4012
  //#region src/tmdatagrid/components/TMDataGridCellEditor.tsx
3870
- var zi = {
3871
- string: Ri,
3872
- number: Ii,
3873
- boolean: Ni,
3874
- date: Pi,
3875
- select: Li,
3876
- multiSelect: Fi
4013
+ var qi = {
4014
+ string: Ki,
4015
+ number: Wi,
4016
+ boolean: Vi,
4017
+ date: Hi,
4018
+ select: Gi,
4019
+ multiSelect: Ui
3877
4020
  };
3878
- function Bi({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1 }) {
3879
- let { table: o, edit: u, features: d, labels: f, controlSize: p } = Q(), m = d.editMode === "row", h = e.column, g = u.getForm(t.id), _ = Yn(h), [v] = c(() => n()), y = s(void 0);
4021
+ function Ji({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1 }) {
4022
+ let { table: o, edit: u, features: d, labels: f, controlSize: p } = Q(), m = d.editMode === "row", h = e.column, g = u.getForm(t.id), _ = er(h), [v] = c(() => n()), y = s(void 0);
3880
4023
  i(() => {
3881
4024
  y.current = h.columnDef.meta?.edit?.mapValue;
3882
4025
  });
@@ -3884,7 +4027,7 @@ function Bi({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
3884
4027
  let e = new fe({
3885
4028
  form: g,
3886
4029
  name: _,
3887
- validators: tr(h.columnDef.meta?.edit?.validate)
4030
+ validators: lr(h.columnDef.meta?.edit?.validate)
3888
4031
  }), n = e.handleChange.bind(e);
3889
4032
  return e.handleChange = ((r) => {
3890
4033
  let i = y.current, a = e.state.value, s = typeof r == "function" ? r(a) : r;
@@ -3925,7 +4068,7 @@ function Bi({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
3925
4068
  }));
3926
4069
  }, T = (e) => {
3927
4070
  let t = d.editMode === "draft";
3928
- e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), t && !a ? w("defer") : S("enter")) : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), C()) : e.key === "Tab" && !m && !(t && a) && (e.preventDefault(), e.stopPropagation(), t ? w(e.shiftKey ? "defer-shift-tab" : "defer-tab") : S(e.shiftKey ? "shift-tab" : "tab"));
4071
+ e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), S("enter")) : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), C()) : e.key === "Tab" && !m && !(t && a) && (e.preventDefault(), e.stopPropagation(), t ? w(e.shiftKey ? "defer-shift-tab" : "defer-tab") : S(e.shiftKey ? "shift-tab" : "tab"));
3929
4072
  }, E = (e) => {
3930
4073
  if (x.current || m) return;
3931
4074
  let n = e.relatedTarget;
@@ -3945,7 +4088,7 @@ function Bi({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
3945
4088
  cancel: C,
3946
4089
  size: p,
3947
4090
  seedText: v
3948
- }, O = h.columnDef.meta?.edit?.editor ?? zi[h.columnDef.meta?.type ?? "string"] ?? Ri;
4091
+ }, O = h.columnDef.meta?.edit?.editor ?? qi[h.columnDef.meta?.type ?? "string"] ?? Ki;
3949
4092
  return /* @__PURE__ */ J("div", {
3950
4093
  className: $.cellEditor,
3951
4094
  "data-dg-part": "editor",
@@ -3987,7 +4130,7 @@ function Bi({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
3987
4130
  }
3988
4131
  //#endregion
3989
4132
  //#region src/tmdatagrid/core/editorFocus.ts
3990
- var Vi = [
4133
+ var Yi = [
3991
4134
  "button:not([disabled])",
3992
4135
  "input:not([disabled])",
3993
4136
  "select:not([disabled])",
@@ -3995,16 +4138,16 @@ var Vi = [
3995
4138
  "a[href]",
3996
4139
  "[tabindex]:not([tabindex=\"-1\"])"
3997
4140
  ].join(",");
3998
- function Hi(e) {
3999
- (e.querySelector("[data-dg-part=\"editor-input\"]") ?? e.querySelector(Vi))?.focus();
4141
+ function Xi(e) {
4142
+ (e.querySelector("[data-dg-part=\"editor-input\"]") ?? e.querySelector(Yi))?.focus();
4000
4143
  }
4001
4144
  //#endregion
4002
4145
  //#region src/tmdatagrid/components/TMDataGridEntryRows.tsx
4003
- function Ui(e, t) {
4004
- return bn(t.id) || Yn(t) === null ? !1 : vn(t, e);
4146
+ function Zi(e, t) {
4147
+ return xn(t.id) || er(t) === null ? !1 : yn(t, e);
4005
4148
  }
4006
- function Wi(t) {
4007
- let n = e(38), { orderedColumns: r, layoutFor: i, rowHeight: o } = t, { table: c, edit: l, features: u } = Q(), d = j(l.store, Xi), f = j(l.store, Yi), p = s(null), m = s(null), h = s(null), g;
4149
+ function Qi(t) {
4150
+ let n = e(38), { orderedColumns: r, layoutFor: i, rowHeight: o } = t, { table: c, edit: l, features: u } = Q(), d = j(l.store, ia), f = j(l.store, ra), p = s(null), m = s(null), h = s(null), g;
4008
4151
  n[0] === d ? g = n[1] : (g = () => {
4009
4152
  let e = d.at(-1)?.tempId;
4010
4153
  if (e === void 0) {
@@ -4015,7 +4158,7 @@ function Wi(t) {
4015
4158
  let t = p.current;
4016
4159
  if (t === null) return;
4017
4160
  let n = t.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(e)}"]`);
4018
- n !== null && (m.current = e, Hi(n));
4161
+ n !== null && (m.current = e, Xi(n));
4019
4162
  }, n[0] = d, n[1] = g), a(g);
4020
4163
  let _;
4021
4164
  n[2] === f ? _ = n[3] : (_ = () => {
@@ -4028,13 +4171,13 @@ function Wi(t) {
4028
4171
  let t = p.current;
4029
4172
  if (t === null) return;
4030
4173
  let n = t.querySelector(f.columnId === null ? `[data-dg-part="editor"][data-row-id="${CSS.escape(f.rowId)}"]` : `[data-dg-part="editor"][data-row-id="${CSS.escape(f.rowId)}"][data-column-id="${CSS.escape(f.columnId)}"]`);
4031
- n !== null && (h.current = e, Hi(n));
4174
+ n !== null && (h.current = e, Xi(n));
4032
4175
  }, n[2] = f, n[3] = _), a(_);
4033
4176
  let v;
4034
4177
  if (n[4] !== l || n[5] !== d) {
4035
4178
  let e;
4036
4179
  n[7] === l ? e = n[8] : (e = (e) => {
4037
- let { tempId: t, confirmed: n } = e;
4180
+ let { tempId: t, committed: n } = e;
4038
4181
  return (n ? l.getForm(t)?.state.values : l.getForm(t)?.options.defaultValues) ?? {};
4039
4182
  }, n[7] = l, n[8] = e), v = d.map(e), n[4] = l, n[5] = d, n[6] = v;
4040
4183
  } else v = n[6];
@@ -4042,44 +4185,44 @@ function Wi(t) {
4042
4185
  n[9] === d ? b = n[10] : (b = (e, t) => d[t]?.tempId ?? String(t), n[9] = d, n[10] = b);
4043
4186
  let x;
4044
4187
  n[11] !== y || n[12] !== b || n[13] !== c.options.columns ? (x = {
4045
- features: Vr,
4188
+ features: Yr,
4046
4189
  columns: c.options.columns,
4047
4190
  data: y,
4048
4191
  getRowId: b
4049
4192
  }, n[11] = y, n[12] = b, n[13] = c.options.columns, n[14] = x) : x = n[14];
4050
- let S = We(x);
4193
+ let S = Ge(x);
4051
4194
  if (d.length === 0) return null;
4052
4195
  let C, w;
4053
4196
  if (n[15] !== l || n[16] !== S || n[17] !== u.editNewRowsSticky || n[18] !== i || n[19] !== d || n[20] !== r || n[21] !== o) {
4054
4197
  let e = S.getCoreRowModel().rows, t;
4055
- n[24] === d ? t = n[25] : (t = new Map(d.map(Ji)), n[24] = d, n[25] = t);
4198
+ n[24] === d ? t = n[25] : (t = new Map(d.map(na)), n[24] = d, n[25] = t);
4056
4199
  let a = t, s;
4057
4200
  n[26] !== a || n[27] !== u.editNewRowsSticky ? (s = (e) => u.editNewRowsSticky || a.get(e.id) !== !0, n[26] = a, n[27] = u.editNewRowsSticky, n[28] = s) : s = n[28];
4058
4201
  let c = e.filter(s), f = u.editNewRowsSticky ? [] : e.filter((e) => a.get(e.id) === !0), m;
4059
4202
  n[29] !== a || n[30] !== l || n[31] !== i || n[32] !== r || n[33] !== o ? (m = (e, t) => {
4060
- let n = new Map(e.getAllCells().map(qi)), s = a.get(e.id) === !0;
4203
+ let n = new Map(e.getAllCells().map(ta)), s = a.get(e.id) === !0;
4061
4204
  return /* @__PURE__ */ q("div", {
4062
4205
  role: "row",
4063
4206
  "data-dg-part": "entry-row",
4064
4207
  "data-row-id": e.id,
4065
4208
  "data-new": !0,
4066
- "data-confirmed": s,
4209
+ "data-committed": s,
4067
4210
  className: $.entryRow,
4068
4211
  children: r.map((r) => {
4069
- let a = n.get(r.id), c = i(r.id), u = a !== void 0 && Ui(e, r);
4212
+ let a = n.get(r.id), c = i(r.id), u = a !== void 0 && Zi(e, r);
4070
4213
  return /* @__PURE__ */ q("div", {
4071
4214
  role: "cell",
4072
4215
  "data-column-id": r.id,
4073
- "data-align": yn(r),
4074
- "data-control-column": bn(r.id),
4075
- onDoubleClick: s && !bn(r.id) ? () => l.begin({
4216
+ "data-align": bn(r),
4217
+ "data-control-column": xn(r.id),
4218
+ onDoubleClick: s && !xn(r.id) ? () => l.begin({
4076
4219
  rowId: e.id,
4077
4220
  columnId: u ? r.id : null
4078
4221
  }) : void 0,
4079
4222
  className: [
4080
4223
  $.entryCell,
4081
- c.isBoundary && c.pinnedAt === "left" ? ci.stickyLeft : "",
4082
- c.isBoundary && c.pinnedAt === "right" ? ci.stickyRight : ""
4224
+ c.isBoundary && c.pinnedAt === "left" ? gi.stickyLeft : "",
4225
+ c.isBoundary && c.pinnedAt === "right" ? gi.stickyRight : ""
4083
4226
  ].filter(Boolean).join(" "),
4084
4227
  style: {
4085
4228
  minHeight: o,
@@ -4088,14 +4231,14 @@ function Wi(t) {
4088
4231
  position: c.pinnedAt ? "sticky" : void 0,
4089
4232
  zIndex: c.pinnedAt ? t : void 0
4090
4233
  },
4091
- children: a !== void 0 && r.id === "__edit__" ? Pe(a.column.columnDef.cell, a.getContext()) : s && a !== void 0 ? /* @__PURE__ */ q("span", {
4234
+ children: a !== void 0 && r.id === "__edit__" ? Fe(a.column.columnDef.cell, a.getContext()) : s && a !== void 0 ? /* @__PURE__ */ q("span", {
4092
4235
  className: $.cellContent,
4093
- children: Pe(a.column.columnDef.cell, a.getContext())
4094
- }) : u && a !== void 0 ? /* @__PURE__ */ q(Bi, {
4236
+ children: Fe(a.column.columnDef.cell, a.getContext())
4237
+ }) : u && a !== void 0 ? /* @__PURE__ */ q(Ji, {
4095
4238
  cell: a,
4096
4239
  row: e,
4097
- takeSeedText: Ki,
4098
- onClose: Gi,
4240
+ takeSeedText: ea,
4241
+ onClose: $i,
4099
4242
  inEntryBlock: !0
4100
4243
  }) : null
4101
4244
  }, r.id);
@@ -4119,23 +4262,23 @@ function Wi(t) {
4119
4262
  let T;
4120
4263
  return n[35] !== C || n[36] !== w ? (T = /* @__PURE__ */ J(de, { children: [C, w] }), n[35] = C, n[36] = w, n[37] = T) : T = n[37], T;
4121
4264
  }
4122
- function Gi() {}
4123
- function Ki() {}
4124
- function qi(e) {
4265
+ function $i() {}
4266
+ function ea() {}
4267
+ function ta(e) {
4125
4268
  return [e.column.id, e];
4126
4269
  }
4127
- function Ji(e) {
4128
- return [e.tempId, e.confirmed];
4270
+ function na(e) {
4271
+ return [e.tempId, e.committed];
4129
4272
  }
4130
- function Yi(e) {
4131
- return e.active !== null && e.newRows.some((t) => t.tempId === e.active?.rowId && !t.confirmed) ? e.active : null;
4273
+ function ra(e) {
4274
+ return e.active !== null && e.newRows.some((t) => t.tempId === e.active?.rowId && !t.committed) ? e.active : null;
4132
4275
  }
4133
- function Xi(e) {
4276
+ function ia(e) {
4134
4277
  return e.newRows;
4135
4278
  }
4136
4279
  //#endregion
4137
4280
  //#region src/tmdatagrid/core/draftCellContext.ts
4138
- function Zi(e, t) {
4281
+ function aa(e, t) {
4139
4282
  let n = Object.create(e.row), r = n;
4140
4283
  r.original = t, r._valuesCache = Object.create(null), r._uniqueValuesCache = Object.create(null);
4141
4284
  let i = Object.create(e);
@@ -4150,7 +4293,7 @@ function Zi(e, t) {
4150
4293
  }
4151
4294
  //#endregion
4152
4295
  //#region src/tmdatagrid/core/cellRange.ts
4153
- function Qi({ range: e, rowIndexOf: t, columnIndexOf: n }) {
4296
+ function oa({ range: e, rowIndexOf: t, columnIndexOf: n }) {
4154
4297
  if (e === null) return null;
4155
4298
  let r = t(e.anchor.rowId), i = t(e.focus.rowId), a = n(e.anchor.columnId), o = n(e.focus.columnId);
4156
4299
  return r < 0 || i < 0 || a < 0 || o < 0 ? null : {
@@ -4160,14 +4303,14 @@ function Qi({ range: e, rowIndexOf: t, columnIndexOf: n }) {
4160
4303
  right: Math.max(a, o)
4161
4304
  };
4162
4305
  }
4163
- function $i(e, t, n) {
4306
+ function sa(e, t, n) {
4164
4307
  return e !== null && t >= e.top && t <= e.bottom && n >= e.left && n <= e.right;
4165
4308
  }
4166
- function ea(e) {
4309
+ function ca(e) {
4167
4310
  return e === null ? 0 : (e.bottom - e.top + 1) * (e.right - e.left + 1);
4168
4311
  }
4169
- function ta(e, t, n) {
4170
- return !$i(e, t, n) || e === null ? null : {
4312
+ function la(e, t, n) {
4313
+ return !sa(e, t, n) || e === null ? null : {
4171
4314
  top: t === e.top,
4172
4315
  bottom: t === e.bottom,
4173
4316
  left: n === e.left,
@@ -4176,13 +4319,13 @@ function ta(e, t, n) {
4176
4319
  }
4177
4320
  //#endregion
4178
4321
  //#region src/tmdatagrid/core/cellExport.ts
4179
- var na = "", ra = {
4322
+ var ua = "", da = {
4180
4323
  separator: ";",
4181
4324
  decimalComma: !0,
4182
4325
  includeHeaders: !0,
4183
4326
  fileName: "export"
4184
4327
  };
4185
- function ia(e, { decimalComma: t }) {
4328
+ function fa(e, { decimalComma: t }) {
4186
4329
  if (e == null) return "";
4187
4330
  if (typeof e == "number") {
4188
4331
  if (!Number.isFinite(e)) return "";
@@ -4191,7 +4334,7 @@ function ia(e, { decimalComma: t }) {
4191
4334
  }
4192
4335
  if (typeof e == "string") return e;
4193
4336
  if (typeof e == "boolean") return e ? "true" : "false";
4194
- if (Array.isArray(e)) return e.map((e) => ia(e, { decimalComma: t })).join(", ");
4337
+ if (Array.isArray(e)) return e.map((e) => fa(e, { decimalComma: t })).join(", ");
4195
4338
  if (e instanceof Date) return Number.isNaN(e.getTime()) ? "" : e.toLocaleString("sv-SE");
4196
4339
  if (typeof e == "object") try {
4197
4340
  return JSON.stringify(e);
@@ -4200,18 +4343,18 @@ function ia(e, { decimalComma: t }) {
4200
4343
  }
4201
4344
  return String(e);
4202
4345
  }
4203
- function aa({ rows: e, columns: t, bounds: n, includeHeaders: r, decimalComma: i }) {
4204
- let a = t.slice(n.left, n.right + 1).filter((e) => !bn(e.id));
4346
+ function pa({ rows: e, columns: t, bounds: n, includeHeaders: r, decimalComma: i }) {
4347
+ let a = t.slice(n.left, n.right + 1).filter((e) => !xn(e.id));
4205
4348
  if (a.length === 0) return [];
4206
4349
  let o = [];
4207
- r && o.push(a.map((e) => pn(e)));
4350
+ r && o.push(a.map((e) => mn(e)));
4208
4351
  for (let t = n.top; t <= n.bottom; t += 1) {
4209
4352
  let n = e[t];
4210
- n !== void 0 && o.push(a.map((e) => ia(n.getValue(e.id), { decimalComma: i })));
4353
+ n !== void 0 && o.push(a.map((e) => fa(n.getValue(e.id), { decimalComma: i })));
4211
4354
  }
4212
4355
  return o;
4213
4356
  }
4214
- function oa({ table: e, includeHeaders: t = ra.includeHeaders, decimalComma: n = ra.decimalComma }) {
4357
+ function ma({ table: e, includeHeaders: t = da.includeHeaders, decimalComma: n = da.decimalComma }) {
4215
4358
  let r = e, i = [
4216
4359
  ...r.getLeftVisibleLeafColumns(),
4217
4360
  ...r.getCenterVisibleLeafColumns(),
@@ -4219,7 +4362,7 @@ function oa({ table: e, includeHeaders: t = ra.includeHeaders, decimalComma: n =
4219
4362
  ], a = [], o = (e) => {
4220
4363
  for (let t of e) t.getIsGrouped() ? o(t.subRows) : a.push(t);
4221
4364
  };
4222
- return o(r.getSortedRowModel().rows), aa({
4365
+ return o(r.getSortedRowModel().rows), pa({
4223
4366
  rows: a,
4224
4367
  columns: i,
4225
4368
  bounds: {
@@ -4232,43 +4375,43 @@ function oa({ table: e, includeHeaders: t = ra.includeHeaders, decimalComma: n =
4232
4375
  decimalComma: n
4233
4376
  });
4234
4377
  }
4235
- function sa({ table: e, options: t }) {
4378
+ function ha({ table: e, options: t }) {
4236
4379
  let n = {
4237
- ...ra,
4380
+ ...da,
4238
4381
  ...t
4239
- }, r = oa({
4382
+ }, r = ma({
4240
4383
  table: e,
4241
4384
  includeHeaders: n.includeHeaders,
4242
4385
  decimalComma: n.decimalComma
4243
4386
  });
4244
- r.length !== 0 && fa({
4387
+ r.length !== 0 && ba({
4245
4388
  fileName: `${n.fileName}.csv`,
4246
- text: ua(r, { separator: n.separator })
4389
+ text: va(r, { separator: n.separator })
4247
4390
  });
4248
4391
  }
4249
- function ca(e, t) {
4392
+ function ga(e, t) {
4250
4393
  return e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? `"${e.replaceAll("\"", "\"\"")}"` : e;
4251
4394
  }
4252
- function la(e) {
4253
- return e.map((e) => e.map((e) => ca(e, " ")).join(" ")).join("\r\n");
4395
+ function _a(e) {
4396
+ return e.map((e) => e.map((e) => ga(e, " ")).join(" ")).join("\r\n");
4254
4397
  }
4255
- function ua(e, { separator: t }) {
4256
- return `${na}sep=${t}\r\n${e.map((e) => e.map((e) => ca(e, t)).join(t)).join("\r\n")}\r\n`;
4398
+ function va(e, { separator: t }) {
4399
+ return `${ua}sep=${t}\r\n${e.map((e) => e.map((e) => ga(e, t)).join(t)).join("\r\n")}\r\n`;
4257
4400
  }
4258
- async function da(e) {
4401
+ async function ya(e) {
4259
4402
  try {
4260
4403
  return await navigator.clipboard.writeText(e), !0;
4261
4404
  } catch {
4262
4405
  return !1;
4263
4406
  }
4264
4407
  }
4265
- function fa({ fileName: e, text: t, mimeType: n = "text/csv;charset=utf-8" }) {
4408
+ function ba({ fileName: e, text: t, mimeType: n = "text/csv;charset=utf-8" }) {
4266
4409
  let r = URL.createObjectURL(new Blob([t], { type: n })), i = document.createElement("a");
4267
4410
  i.href = r, i.download = e, i.style.display = "none", document.body.append(i), i.click(), i.remove(), setTimeout(() => URL.revokeObjectURL(r), 0);
4268
4411
  }
4269
4412
  //#endregion
4270
4413
  //#region src/tmdatagrid/core/rowPinning.ts
4271
- function pa(e, t) {
4414
+ function xa(e, t) {
4272
4415
  let n = e.store.state.rowPinning[t];
4273
4416
  if (n.length === 0) return [];
4274
4417
  let r = e.getPrePaginatedRowModel().rowsById, i = e.getCoreRowModel().rowsById, a = [];
@@ -4280,17 +4423,17 @@ function pa(e, t) {
4280
4423
  }
4281
4424
  //#endregion
4282
4425
  //#region src/tmdatagrid/core/matchHighlight.ts
4283
- var ma = [
4426
+ var Sa = [
4284
4427
  "contains",
4285
4428
  "startsWith",
4286
4429
  "endsWith"
4287
4430
  ];
4288
- function ha(e) {
4431
+ function Ca(e) {
4289
4432
  let t = e.store.state, n = typeof t.globalFilter == "string" ? t.globalFilter.trim() : "", r = /* @__PURE__ */ new Map();
4290
4433
  for (let e of t.columnFilters) {
4291
- if (!gt(e.value)) continue;
4434
+ if (!_t(e.value)) continue;
4292
4435
  let { operator: t, value: n } = e.value;
4293
- if (!ma.includes(t) || typeof n != "string" || n === "") continue;
4436
+ if (!Sa.includes(t) || typeof n != "string" || n === "") continue;
4294
4437
  let i = r.get(e.id) ?? [];
4295
4438
  i.push(n), r.set(e.id, i);
4296
4439
  }
@@ -4304,7 +4447,7 @@ function ha(e) {
4304
4447
  }
4305
4448
  return i.size > 0 ? i : null;
4306
4449
  }
4307
- function ga(e, t) {
4450
+ function wa(e, t) {
4308
4451
  let n = e.toLowerCase(), r = [];
4309
4452
  for (let e of t) {
4310
4453
  let t = e.toLowerCase();
@@ -4326,26 +4469,26 @@ function ga(e, t) {
4326
4469
  }
4327
4470
  //#endregion
4328
4471
  //#region src/tmdatagrid/components/TMDataGridTable.tsx
4329
- var _a = {
4472
+ var Ta = {
4330
4473
  pinnedAt: !1,
4331
4474
  offset: 0,
4332
4475
  isBoundary: !1
4333
4476
  };
4334
- function va(e, t) {
4477
+ function Ea(e, t) {
4335
4478
  return e.querySelector(`[data-cell="true"][data-row-id="${CSS.escape(t.rowId)}"][data-column-id="${CSS.escape(t.columnId)}"]`);
4336
4479
  }
4337
- function ya({ container: e, cellElement: t, leftPinnedWidth: n, rightPinnedWidth: r }) {
4480
+ function Da({ container: e, cellElement: t, leftPinnedWidth: n, rightPinnedWidth: r }) {
4338
4481
  let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + n, s = a.right - r;
4339
4482
  i.left < o ? e.scrollLeft -= o - i.left : i.right > s && (e.scrollLeft += i.right - s);
4340
4483
  }
4341
- function ba(e) {
4484
+ function Oa(e) {
4342
4485
  if (e.getIsPlaceholder()) return null;
4343
- if (!e.getIsAggregated()) return Pe(e.column.columnDef.cell, e.getContext());
4486
+ if (!e.getIsAggregated()) return Fe(e.column.columnDef.cell, e.getContext());
4344
4487
  let { aggregatedCell: t, aggregationFn: n } = e.column.columnDef;
4345
- return t === void 0 ? n === void 0 ? null : Pe(e.column.columnDef.cell, e.getContext()) : Pe(t, e.getContext());
4488
+ return t === void 0 ? n === void 0 ? null : Fe(e.column.columnDef.cell, e.getContext()) : Fe(t, e.getContext());
4346
4489
  }
4347
- function xa(e, t) {
4348
- let n = ga(e, t);
4490
+ function ka(e, t) {
4491
+ let n = wa(e, t);
4349
4492
  if (n === null) return e;
4350
4493
  let r = [], i = 0;
4351
4494
  for (let t of n) t.start > i && r.push(e.slice(i, t.start)), r.push(/* @__PURE__ */ q("mark", {
@@ -4354,11 +4497,11 @@ function xa(e, t) {
4354
4497
  }, t.start)), i = t.end;
4355
4498
  return i < e.length && r.push(e.slice(i)), r;
4356
4499
  }
4357
- function Sa(t) {
4500
+ function Aa(t) {
4358
4501
  let n = e(59), { cell: r, rowHeight: i, layout: a, nav: o, editor: s, contentOverride: c, highlightNeedles: l, onFocus: u, onClick: d, onMouseDown: f, onMouseEnter: p, onDoubleClick: m, onContextMenu: h } = t, { table: g, edit: _ } = Q(), v;
4359
- n[0] === r.column ? v = n[1] : (v = Yn(r.column), n[0] = r.column, n[1] = v);
4502
+ n[0] === r.column ? v = n[1] : (v = er(r.column), n[0] = r.column, n[1] = v);
4360
4503
  let y = v, b = r.row.id, x;
4361
- n[2] === r.column.id ? x = n[3] : (x = bn(r.column.id), n[2] = r.column.id, n[3] = x);
4504
+ n[2] === r.column.id ? x = n[3] : (x = xn(r.column.id), n[2] = r.column.id, n[3] = x);
4362
4505
  let S = x, C;
4363
4506
  n[4] !== b || n[5] !== y ? (C = (e) => {
4364
4507
  if (y === null) return !1;
@@ -4374,8 +4517,8 @@ function Sa(t) {
4374
4517
  let E = j(_.store, T), D;
4375
4518
  n[10] !== b || n[11] !== S ? (D = (e) => S ? void 0 : e.rows[b]?.values, n[10] = b, n[11] = S, n[12] = D) : D = n[12];
4376
4519
  let O = j(_.store, D), k = o ? "gridcell" : "cell", A = o?.columnIndex, M = o?.tabIndex, N = o ? !0 : void 0, P = r.row.id, F = r.column.id, I = o?.focused, L = o?.selected, R = o?.selected, z = o?.edges?.top, B = o?.edges?.bottom, V = o?.edges?.left, H = o?.edges?.right, ee = s !== void 0 || void 0, U = w || void 0, te = E || void 0, ne;
4377
- n[13] === r.column ? ne = n[14] : (ne = yn(r.column), n[13] = r.column, n[14] = ne);
4378
- let re = a.isBoundary && a.pinnedAt === "left" ? ci.stickyLeft : "", ie = a.isBoundary && a.pinnedAt === "right" ? ci.stickyRight : "", ae;
4520
+ n[13] === r.column ? ne = n[14] : (ne = bn(r.column), n[13] = r.column, n[14] = ne);
4521
+ let re = a.isBoundary && a.pinnedAt === "left" ? gi.stickyLeft : "", ie = a.isBoundary && a.pinnedAt === "right" ? gi.stickyRight : "", ae;
4379
4522
  n[15] !== re || n[16] !== ie ? (ae = [
4380
4523
  $.bodyCell,
4381
4524
  re,
@@ -4393,12 +4536,12 @@ function Sa(t) {
4393
4536
  n[24] !== r || n[25] !== c || n[26] !== O || n[27] !== s || n[28] !== l || n[29] !== g ? (le = s ?? /* @__PURE__ */ q("span", {
4394
4537
  className: $.cellContent,
4395
4538
  children: (() => {
4396
- let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r.getIsAggregated() ? Zi(r, O) : void 0;
4539
+ let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r.getIsAggregated() ? aa(r, O) : void 0;
4397
4540
  if (l !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r.getIsAggregated() && r.column.columnDef.cell === g.getDefaultColumnDef().cell) {
4398
4541
  let t = e === void 0 ? r.renderValue() : e.renderValue();
4399
- if (typeof t == "string" || typeof t == "number") return xa(String(t), l);
4542
+ if (typeof t == "string" || typeof t == "number") return ka(String(t), l);
4400
4543
  }
4401
- return e === void 0 ? c ?? ba(r) : Pe(r.column.columnDef.cell, e);
4544
+ return e === void 0 ? c ?? Oa(r) : Fe(r.column.columnDef.cell, e);
4402
4545
  })()
4403
4546
  }), n[24] = r, n[25] = c, n[26] = O, n[27] = s, n[28] = l, n[29] = g, n[30] = le) : le = n[30];
4404
4547
  let ue;
@@ -4432,7 +4575,7 @@ function Sa(t) {
4432
4575
  children: le
4433
4576
  }), n[31] = r.column.id, n[32] = r.row.id, n[33] = S, n[34] = d, n[35] = h, n[36] = m, n[37] = u, n[38] = f, n[39] = p, n[40] = I, n[41] = L, n[42] = R, n[43] = z, n[44] = B, n[45] = V, n[46] = H, n[47] = ee, n[48] = U, n[49] = te, n[50] = ne, n[51] = oe, n[52] = ce, n[53] = le, n[54] = k, n[55] = A, n[56] = M, n[57] = N, n[58] = ue) : ue = n[58], ue;
4434
4577
  }
4435
- function Ca(t) {
4578
+ function ja(t) {
4436
4579
  let n = e(16), { enabled: r, menuContent: i, menuProps: a, onContextMenu: o, onClose: s, children: c } = t, l;
4437
4580
  n[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { display: "contents" }, n[0] = l) : l = n[0];
4438
4581
  let u = r ? o : void 0, d;
@@ -4463,13 +4606,13 @@ function Ca(t) {
4463
4606
  children: [h, _]
4464
4607
  }), n[10] = a, n[11] = p, n[12] = m, n[13] = h, n[14] = _, n[15] = v) : v = n[15], v;
4465
4608
  }
4466
- function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContextMenu: o, rowClassName: l, rowStyle: u, striped: d = !1, onScrollToTop: p, onScrollToBottom: m, onScrollToLeft: _, onScrollToRight: v, renderEmptyState: y, renderRowContextMenu: b, renderColumnMenuItems: x, rowContextMenuProps: S, cellExport: C, onReachEnd: w, reachEndThreshold: T = 10, "aria-label": D, "aria-labelledby": O }) {
4609
+ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContextMenu: o, rowClassName: l, rowStyle: u, striped: d = !1, onScrollToTop: p, onScrollToBottom: m, onScrollToLeft: _, onScrollToRight: v, renderEmptyState: y, renderRowContextMenu: b, renderColumnMenuItems: x, rowContextMenuProps: S, cellExport: C, onReachEnd: w, reachEndThreshold: T = 10, "aria-label": D, "aria-labelledby": O }) {
4467
4610
  let { table: k, ui: A, edit: M, features: N, labels: P, rowHeight: F, controlSize: I, renderDetails: L, renderDetailsEstHeight: R, overscan: z, scrollerRef: B } = Q();
4468
4611
  j(k.store);
4469
- let V = j(A, (e) => e.highlightedRowId), H = j(A, (e) => e.focusedCell), ee = j(A, (e) => e.cellRange), U = j(M.store, (e) => e.active), te = j(M.store, (e) => e.openRowIds), ne = j(M.store, (e) => e.newRows.length), re = j(M.store, (e) => e.deletedRowIds), ie = j(M.store, (e) => e.openRowIds.filter((t) => (e.rows[t]?.dirtyFields.length ?? 0) > 0)), { loading: ae, noResultsLabel: oe = P.noResults } = k.options.meta ?? {}, W = s(null), G = nn(k, N), se = N.matchHighlighting ? ha(k) : null, K = N.rowPinning ? pa(k, "top") : [], le = N.rowPinning ? pa(k, "bottom") : [], ue = K.length + le.length, fe = null;
4612
+ let V = j(A, (e) => e.highlightedRowId), H = j(A, (e) => e.focusedCell), ee = j(A, (e) => e.cellRange), U = j(M.store, (e) => e.active), te = j(M.store, (e) => e.openRowIds), ne = j(M.store, (e) => e.newRows.length), re = j(M.store, (e) => e.deletedRowIds), ie = j(M.store, (e) => e.openRowIds.filter((t) => (e.rows[t]?.dirtyFields.length ?? 0) > 0)), { loading: ae, noResultsLabel: oe = P.noResults } = k.options.meta ?? {}, W = s(null), G = rn(k, N), se = N.matchHighlighting ? Ca(k) : null, K = N.rowPinning ? xa(k, "top") : [], le = N.rowPinning ? xa(k, "bottom") : [], ue = K.length + le.length, fe = null;
4470
4613
  if (N.rowNumbers) {
4471
4614
  fe = /* @__PURE__ */ new Map();
4472
- let e = rn(k, N) ? k.store.state.pagination.pageIndex * k.store.state.pagination.pageSize : 0;
4615
+ let e = an(k, N) ? k.store.state.pagination.pageIndex * k.store.state.pagination.pageSize : 0;
4473
4616
  for (let t of G) t.getIsGrouped() || fe.set(t.id, ++e);
4474
4617
  }
4475
4618
  let pe = (e) => L !== void 0 && !e.getIsGrouped() && e.getIsExpanded(), me = s(null);
@@ -4483,7 +4626,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4483
4626
  t.delete(n);
4484
4627
  continue;
4485
4628
  }
4486
- mi(e, n) && (gi({
4629
+ Si(e, n) && (wi({
4487
4630
  table: k,
4488
4631
  columnId: n,
4489
4632
  container: e
@@ -4533,7 +4676,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4533
4676
  let e = k.getPageCount();
4534
4677
  e > 0 && k.store.state.pagination.pageIndex >= e && k.setPageIndex(e - 1);
4535
4678
  });
4536
- let ge = qe({
4679
+ let ge = Je({
4537
4680
  count: G.length,
4538
4681
  getScrollElement: () => W.current,
4539
4682
  estimateSize: (e) => {
@@ -4579,12 +4722,12 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4579
4722
  track: `minmax(${i}px, ${e.columnDef.meta?.flex ?? 1}fr)`,
4580
4723
  minWidth: i
4581
4724
  };
4582
- }), Ae = ke.map((e) => e.track).join(" "), je = ke.reduce((e, t) => e + t.minWidth, 0), Me = /* @__PURE__ */ new Map(), Ne = (e) => ke[X.findIndex((t) => t.id === e)]?.minWidth ?? 0, Fe = 0;
4725
+ }), Ae = ke.map((e) => e.track).join(" "), je = ke.reduce((e, t) => e + t.minWidth, 0), Me = /* @__PURE__ */ new Map(), Ne = (e) => ke[X.findIndex((t) => t.id === e)]?.minWidth ?? 0, Pe = 0;
4583
4726
  for (let e of Se) Me.set(e.id, {
4584
4727
  pinnedAt: "left",
4585
- offset: Fe,
4728
+ offset: Pe,
4586
4729
  isBoundary: e.id === Se.at(-1)?.id
4587
- }), Fe += Ne(e.id);
4730
+ }), Pe += Ne(e.id);
4588
4731
  let Ie = 0;
4589
4732
  for (let e of [...Ce].reverse()) Me.set(e.id, {
4590
4733
  pinnedAt: "right",
@@ -4596,9 +4739,9 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4596
4739
  offset: 0,
4597
4740
  isBoundary: !1
4598
4741
  });
4599
- let Le = (e) => Me.get(e) ?? _a, Re = G.length === 0 && ue === 0, ze = k.store.state.globalFilter, Be = k.store.state.columnFilters.length > 0 || (typeof ze == "string" ? ze.trim() !== "" : ze != null), Ve = De.at(-1)?.headers ?? [], He = X.some((e) => e.columnDef.footer !== void 0), Ue = N.rowClickSelects, We = Ue || N.highlightRow || e !== void 0, Ge = (e) => !e.getIsGrouped() && We, Ke = (t, n) => {
4742
+ let Le = (e) => Me.get(e) ?? Ta, Re = G.length === 0 && ue === 0, ze = k.store.state.globalFilter, Be = k.store.state.columnFilters.length > 0 || (typeof ze == "string" ? ze.trim() !== "" : ze != null), Ve = De.at(-1)?.headers ?? [], He = X.some((e) => e.columnDef.footer !== void 0), Ue = N.rowClickSelects, We = Ue || N.highlightRow || e !== void 0, Ge = (e) => !e.getIsGrouped() && We, Ke = (t, n) => {
4600
4743
  if (Ue && t.getCanSelect()) {
4601
- let e = on({
4744
+ let e = sn({
4602
4745
  rows: G,
4603
4746
  rowId: t.id,
4604
4747
  anchorRowId: A.state.selectionAnchorRowId,
@@ -4609,7 +4752,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4609
4752
  k.setRowSelection(e.selection), A.actions.setSelectionAnchor(e.anchorRowId);
4610
4753
  }
4611
4754
  N.highlightRow && A.actions.setHighlightedRow(t.id), e?.(t);
4612
- }, Je = (e) => typeof l == "function" ? l(e) : l, Ye = (e) => typeof u == "function" ? u(e) : u, Xe = (e, t, n) => ({
4755
+ }, qe = (e) => typeof l == "function" ? l(e) : l, Ye = (e) => typeof u == "function" ? u(e) : u, Xe = (e, t, n) => ({
4613
4756
  cell: e,
4614
4757
  row: t,
4615
4758
  column: e.column,
@@ -4617,7 +4760,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4617
4760
  }), Ze = N.cellSelection, Qe = N.cellRangeSelection, $e = s(!1), et = s(null), tt = Ze && H !== null ? G.findIndex((e) => e.id === H.rowId) : -1, nt = Ze && H !== null ? X.findIndex((e) => e.id === H.columnId) : -1, rt = tt >= 0 && _e.some((e) => e.index === tt), it = G[_e[0]?.index ?? -1], at = Ze ? rt && H !== null ? H : it && X[0] ? {
4618
4761
  rowId: it.id,
4619
4762
  columnId: X[0].id
4620
- } : null : null, ot = (e, t, n) => e !== null && e.rowId === t && e.columnId === n, st = Qi({
4763
+ } : null : null, ot = (e, t, n) => e !== null && e.rowId === t && e.columnId === n, st = oa({
4621
4764
  range: Qe ? ee : null,
4622
4765
  rowIndexOf: (e) => G.findIndex((t) => t.id === e),
4623
4766
  columnIndexOf: (e) => X.findIndex((t) => t.id === e)
@@ -4633,10 +4776,10 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4633
4776
  bottom: tt,
4634
4777
  left: nt,
4635
4778
  right: nt
4636
- } : null), ut = ea(lt), dt = lt === null ? 0 : X.slice(lt.left, lt.right + 1).filter((e) => !bn(e.id)).length, ft = {
4637
- ...ra,
4779
+ } : null), ut = ca(lt), dt = lt === null ? 0 : X.slice(lt.left, lt.right + 1).filter((e) => !xn(e.id)).length, ft = {
4780
+ ...da,
4638
4781
  ...C
4639
- }, [pt, mt] = c(ft.includeHeaders), ht = (e) => lt === null ? [] : aa({
4782
+ }, [pt, mt] = c(ft.includeHeaders), ht = (e) => lt === null ? [] : pa({
4640
4783
  rows: G,
4641
4784
  columns: X,
4642
4785
  bounds: lt,
@@ -4644,7 +4787,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4644
4787
  decimalComma: ft.decimalComma
4645
4788
  }), gt = async () => {
4646
4789
  let e = ht(!1);
4647
- e.length !== 0 && await da(la(e));
4790
+ e.length !== 0 && await ya(_a(e));
4648
4791
  }, [_t, vt] = c(!1);
4649
4792
  i(() => {
4650
4793
  if (!_t) return;
@@ -4655,9 +4798,9 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4655
4798
  A.actions.setFocusedCell(e), ct(e, { extend: t }), t || vt(!0);
4656
4799
  }, bt = (e) => {
4657
4800
  let t = ht(e);
4658
- t.length !== 0 && fa({
4801
+ t.length !== 0 && ba({
4659
4802
  fileName: `${ft.fileName}.csv`,
4660
- text: ua(t, { separator: ft.separator })
4803
+ text: va(t, { separator: ft.separator })
4661
4804
  });
4662
4805
  }, xt = (e, { extend: t } = { extend: !1 }) => {
4663
4806
  let n = G[e.rowIndex], r = X[e.columnIndex];
@@ -4692,11 +4835,11 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4692
4835
  return;
4693
4836
  }
4694
4837
  let n = e.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(U.rowId)}"][data-column-id="${CSS.escape(t)}"]`);
4695
- n !== null && (Tt.current = U, Hi(n));
4838
+ n !== null && (Tt.current = U, Xi(n));
4696
4839
  });
4697
4840
  let Et = (e) => {
4698
4841
  let t = W.current;
4699
- t !== null && ($e.current = !0, va(t, e)?.focus());
4842
+ t !== null && ($e.current = !0, Ea(t, e)?.focus());
4700
4843
  }, Dt = (e) => {
4701
4844
  Ze && A.actions.setFocusedCell(e), M.begin({
4702
4845
  rowId: e.rowId,
@@ -4720,7 +4863,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4720
4863
  }) : Et(e);
4721
4864
  return;
4722
4865
  }
4723
- let a = Rr({
4866
+ let a = Kr({
4724
4867
  from: {
4725
4868
  rowIndex: r,
4726
4869
  columnIndex: i
@@ -4735,8 +4878,8 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4735
4878
  });
4736
4879
  a === null ? Et(e) : xt(a);
4737
4880
  }, kt = (e, { extend: t }) => {
4738
- if (N.rowSelection && an(e).length > 0) {
4739
- let n = on({
4881
+ if (N.rowSelection && on(e).length > 0) {
4882
+ let n = sn({
4740
4883
  rows: G,
4741
4884
  rowId: e.id,
4742
4885
  anchorRowId: A.state.selectionAnchorRowId,
@@ -4796,7 +4939,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4796
4939
  }
4797
4940
  }
4798
4941
  if (e.key === "Enter" || e.key === "F2") {
4799
- let n = t.querySelector(Vi);
4942
+ let n = t.querySelector(Yi);
4800
4943
  if (n === null) return;
4801
4944
  e.preventDefault(), n.focus();
4802
4945
  return;
@@ -4815,7 +4958,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4815
4958
  t && kt(t, { extend: e.shiftKey });
4816
4959
  return;
4817
4960
  }
4818
- let c = Lr({
4961
+ let c = Gr({
4819
4962
  key: e.key,
4820
4963
  ctrlKey: e.ctrlKey || e.metaKey,
4821
4964
  from: {
@@ -4837,11 +4980,11 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4837
4980
  return;
4838
4981
  }
4839
4982
  if (!$e.current && !e.contains(document.activeElement)) return;
4840
- let t = va(e, H);
4841
- t !== null && ($e.current = !1, !t.contains(document.activeElement) && (document.activeElement instanceof Element && document.activeElement.closest("[data-dg-part=\"editor\"]") !== null || (t.focus({ preventScroll: !0 }), Le(H.columnId).pinnedAt === !1 && ya({
4983
+ let t = Ea(e, H);
4984
+ t !== null && ($e.current = !1, !t.contains(document.activeElement) && (document.activeElement instanceof Element && document.activeElement.closest("[data-dg-part=\"editor\"]") !== null || (t.focus({ preventScroll: !0 }), Le(H.columnId).pinnedAt === !1 && Da({
4842
4985
  container: e,
4843
4986
  cellElement: t,
4844
- leftPinnedWidth: Fe,
4987
+ leftPinnedWidth: Pe,
4845
4988
  rightPinnedWidth: Ie
4846
4989
  }))));
4847
4990
  });
@@ -4849,7 +4992,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4849
4992
  let e = Pt.current, t = Ft.current;
4850
4993
  if (Pt.current = null, Ft.current = null, Ze && e !== null && t !== null) {
4851
4994
  let n = G.findIndex((t) => t.id === e), r = X.findIndex((e) => e.id === t);
4852
- n >= 0 && !$i(lt, n, r) && (A.actions.setFocusedCell({
4995
+ n >= 0 && !sa(lt, n, r) && (A.actions.setFocusedCell({
4853
4996
  rowId: e,
4854
4997
  columnId: t
4855
4998
  }), ct({
@@ -4945,19 +5088,19 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4945
5088
  "data-dg-header-row": !0,
4946
5089
  "data-dg-header-last": t === De.length - 1 || void 0,
4947
5090
  className: $.headerRow,
4948
- children: e.headers.map((e) => /* @__PURE__ */ q(wi, {
5091
+ children: e.headers.map((e) => /* @__PURE__ */ q(Mi, {
4949
5092
  renderColumnMenuItems: x,
4950
5093
  header: e,
4951
5094
  layout: Le(e.column.id)
4952
5095
  }, e.id))
4953
5096
  }, e.id))
4954
5097
  }),
4955
- N.editing && ne > 0 && /* @__PURE__ */ q(Wi, {
5098
+ N.editing && ne > 0 && /* @__PURE__ */ q(Qi, {
4956
5099
  orderedColumns: X,
4957
5100
  layoutFor: Le,
4958
5101
  rowHeight: F
4959
5102
  }),
4960
- /* @__PURE__ */ q(Ca, {
5103
+ /* @__PURE__ */ q(ja, {
4961
5104
  enabled: b !== void 0 || Qe,
4962
5105
  menuContent: Ht,
4963
5106
  menuProps: S,
@@ -4990,7 +5133,7 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
4990
5133
  "aria-selected": N.rowSelection ? e.getIsSelected() : void 0,
4991
5134
  "aria-current": N.highlightRow && e.id === V ? !0 : void 0,
4992
5135
  "data-striped": d && n >= 0 ? n % 2 == 1 : void 0,
4993
- className: [$.bodyRow, Je(e)].filter(Boolean).join(" "),
5136
+ className: [$.bodyRow, qe(e)].filter(Boolean).join(" "),
4994
5137
  style: {
4995
5138
  minHeight: F,
4996
5139
  cursor: c ? "pointer" : void 0,
@@ -5015,13 +5158,13 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
5015
5158
  } : void 0,
5016
5159
  children: [l.map((i, a) => {
5017
5160
  let c = U !== null && U.rowId === e.id && U.columnId === i.column.id || u && M.canEditCell(e, i.column);
5018
- return /* @__PURE__ */ q(Sa, {
5161
+ return /* @__PURE__ */ q(Aa, {
5019
5162
  cell: i,
5020
5163
  rowHeight: F,
5021
5164
  layout: Le(i.column.id),
5022
5165
  contentOverride: fe !== null && i.column.id === "__rowNumber__" ? fe.get(e.id) : void 0,
5023
5166
  highlightNeedles: se?.get(i.column.id),
5024
- editor: c ? /* @__PURE__ */ q(Bi, {
5167
+ editor: c ? /* @__PURE__ */ q(Ji, {
5025
5168
  cell: i,
5026
5169
  row: e,
5027
5170
  takeSeedText: Ct,
@@ -5042,8 +5185,8 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
5042
5185
  columnIndex: a + 1,
5043
5186
  focused: ot(H, e.id, i.column.id),
5044
5187
  tabIndex: ot(at, e.id, i.column.id) ? 0 : -1,
5045
- selected: Qe ? $i(st, n, a) : ot(H, e.id, i.column.id),
5046
- edges: ta(st, n, a)
5188
+ selected: Qe ? sa(st, n, a) : ot(H, e.id, i.column.id),
5189
+ edges: la(st, n, a)
5047
5190
  } : void 0,
5048
5191
  onFocus: Ze ? () => A.actions.setFocusedCell({
5049
5192
  rowId: e.id,
@@ -5152,12 +5295,12 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
5152
5295
  return /* @__PURE__ */ q("div", {
5153
5296
  role: "cell",
5154
5297
  "data-column-id": e.column.id,
5155
- "data-align": yn(e.column),
5156
- "data-control-column": bn(e.column.id),
5298
+ "data-align": bn(e.column),
5299
+ "data-control-column": xn(e.column.id),
5157
5300
  className: [
5158
5301
  $.summaryCell,
5159
- t.isBoundary && t.pinnedAt === "left" ? ci.stickyLeft : "",
5160
- t.isBoundary && t.pinnedAt === "right" ? ci.stickyRight : ""
5302
+ t.isBoundary && t.pinnedAt === "left" ? gi.stickyLeft : "",
5303
+ t.isBoundary && t.pinnedAt === "right" ? gi.stickyRight : ""
5161
5304
  ].filter(Boolean).join(" "),
5162
5305
  style: {
5163
5306
  minHeight: F,
@@ -5168,35 +5311,35 @@ function wa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
5168
5311
  },
5169
5312
  children: /* @__PURE__ */ q("span", {
5170
5313
  className: $.cellContent,
5171
- children: e.isPlaceholder ? null : Pe(e.column.columnDef.footer, e.getContext())
5314
+ children: e.isPlaceholder ? null : Fe(e.column.columnDef.footer, e.getContext())
5172
5315
  })
5173
5316
  }, e.id);
5174
5317
  })
5175
5318
  })
5176
5319
  ]
5177
5320
  })
5178
- }), /* @__PURE__ */ q(Hn, {})]
5321
+ }), /* @__PURE__ */ q(qn, {})]
5179
5322
  });
5180
5323
  }
5181
- var Ta = {
5324
+ var Na = {
5182
5325
  toolbar: "_toolbar_4my8t_1",
5183
5326
  toolbarSpacer: "_toolbarSpacer_4my8t_10"
5184
5327
  };
5185
5328
  //#endregion
5186
5329
  //#region src/tmdatagrid/components/TMDataGridToolbar.tsx
5187
- function Ea(t) {
5330
+ function Pa(t) {
5188
5331
  let n = e(2), { children: r } = t, i;
5189
5332
  return n[0] === r ? i = n[1] : (i = /* @__PURE__ */ q("div", {
5190
5333
  "data-dg-part": "toolbar",
5191
- className: Ta.toolbar,
5334
+ className: Na.toolbar,
5192
5335
  children: r
5193
5336
  }), n[0] = r, n[1] = i), i;
5194
5337
  }
5195
- function Da() {
5338
+ function Fa() {
5196
5339
  let t = e(1), n;
5197
- return t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ q("div", { className: Ta.toolbarSpacer }), t[0] = n) : n = t[0], n;
5340
+ return t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ q("div", { className: Na.toolbarSpacer }), t[0] = n) : n = t[0], n;
5198
5341
  }
5199
- function Oa() {
5342
+ function Ia() {
5200
5343
  let t = e(2), { table: n, labels: r } = Q();
5201
5344
  if (n.options.meta?.loading !== !0) return null;
5202
5345
  let i;
@@ -5206,7 +5349,7 @@ function Oa() {
5206
5349
  "aria-label": r.loading
5207
5350
  }), t[0] = r.loading, t[1] = i), i;
5208
5351
  }
5209
- function ka(t) {
5352
+ function La(t) {
5210
5353
  let n = e(11), { children: r } = t, { table: i, controlSize: a } = Q();
5211
5354
  if (j(i.store), r !== void 0) {
5212
5355
  let e;
@@ -5235,9 +5378,9 @@ function ka(t) {
5235
5378
  ]
5236
5379
  }), n[7] = a, n[8] = s, n[9] = l, n[10] = u) : u = n[10], u;
5237
5380
  }
5238
- function Aa() {
5239
- let t = e(13), { table: n, ui: r, features: i, labels: a, controlSize: o } = Q(), s = j(r, ja);
5240
- if (!Fr(n, i).canHideAny) return null;
5381
+ function Ra() {
5382
+ let t = e(13), { table: n, ui: r, features: i, labels: a, controlSize: o } = Q(), s = j(r, za);
5383
+ if (!Ur(n, i).canHideAny) return null;
5241
5384
  let c;
5242
5385
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ q(W, {
5243
5386
  size: 18,
@@ -5262,7 +5405,7 @@ function Aa() {
5262
5405
  let f;
5263
5406
  t[8] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ q(b.Dropdown, {
5264
5407
  p: 0,
5265
- children: /* @__PURE__ */ q(Cn, {})
5408
+ children: /* @__PURE__ */ q(wn, {})
5266
5409
  }), t[8] = f) : f = t[8];
5267
5410
  let p;
5268
5411
  return t[9] !== s || t[10] !== d || t[11] !== r.actions.setColumnsPanelOpen ? (p = /* @__PURE__ */ J(b, {
@@ -5276,20 +5419,20 @@ function Aa() {
5276
5419
  children: [d, f]
5277
5420
  }), t[9] = s, t[10] = d, t[11] = r.actions.setColumnsPanelOpen, t[12] = p) : p = t[12], p;
5278
5421
  }
5279
- function ja(e) {
5422
+ function za(e) {
5280
5423
  return e.columnsPanelOpen;
5281
5424
  }
5282
- function Ma() {
5283
- let t = e(15), n = Q(), { table: r, ui: i, features: a, labels: o, controlSize: s } = n, c = j(i, Ia), u = j(r.store, Fa).filter(Pa).length;
5284
- if (!Fr(r, a).canFilterAny) return null;
5425
+ function Ba() {
5426
+ let t = e(15), n = Q(), { table: r, ui: i, features: a, labels: o, controlSize: s } = n, c = j(i, Wa), u = j(r.store, Ua).filter(Ha).length;
5427
+ if (!Ur(r, a).canFilterAny) return null;
5285
5428
  let d = c || u > 0 ? "light" : "subtle", f = u > 0 ? void 0 : "gray", p;
5286
5429
  t[0] !== n || t[1] !== c || t[2] !== r || t[3] !== i ? (p = () => {
5287
5430
  if (c) {
5288
5431
  i.actions.closeFilterPanel();
5289
5432
  return;
5290
5433
  }
5291
- let e = r.getAllLeafColumns().find(Na);
5292
- e ? Jr(n, e.id) : i.actions.openFilterPanel();
5434
+ let e = r.getAllLeafColumns().find(Va);
5435
+ e ? ni(n, e.id) : i.actions.openFilterPanel();
5293
5436
  }, t[0] = n, t[1] = c, t[2] = r, t[3] = i, t[4] = p) : p = t[4];
5294
5437
  let m;
5295
5438
  t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ q(ne, {
@@ -5313,27 +5456,27 @@ function Ma() {
5313
5456
  children: h
5314
5457
  }), t[12] = o.filters, t[13] = h, t[14] = g) : g = t[14], g;
5315
5458
  }
5316
- function Na(e) {
5459
+ function Va(e) {
5317
5460
  return e.getCanFilter();
5318
5461
  }
5319
- function Pa(e) {
5320
- return _t(e.value);
5462
+ function Ha(e) {
5463
+ return vt(e.value);
5321
5464
  }
5322
- function Fa(e) {
5465
+ function Ua(e) {
5323
5466
  return e.columnFilters;
5324
5467
  }
5325
- function Ia(e) {
5468
+ function Wa(e) {
5326
5469
  return e.filterPanelOpen;
5327
5470
  }
5328
5471
  //#endregion
5329
5472
  //#region src/tmdatagrid/core/sizes.ts
5330
- var La = "md", Ra = {
5473
+ var Ga = "md", Ka = {
5331
5474
  xs: 34,
5332
5475
  sm: 42,
5333
5476
  md: 52,
5334
5477
  lg: 62,
5335
5478
  xl: 72
5336
- }, za = {
5479
+ }, qa = {
5337
5480
  xs: "xs",
5338
5481
  sm: "xs",
5339
5482
  md: "sm",
@@ -5342,8 +5485,8 @@ var La = "md", Ra = {
5342
5485
  };
5343
5486
  //#endregion
5344
5487
  //#region src/tmdatagrid/components/TMDataGrid.tsx
5345
- function Ba(t) {
5346
- let n = e(27), { table: r, ui: i, edit: a, features: o, labels: s, renderDetails: c, renderDetailsEstHeight: l, overscan: u, resetSettings: d, scrollToRow: f, scrollerRef: p, size: m, children: h, className: g, style: _, id: v, "data-testid": y } = t, b = m === void 0 ? "md" : m, x = r.options.meta?.rowHeight ?? Ra[b], S = za[b], C;
5488
+ function Ja(t) {
5489
+ let n = e(27), { table: r, ui: i, edit: a, features: o, labels: s, renderDetails: c, renderDetailsEstHeight: l, overscan: u, resetSettings: d, scrollToRow: f, scrollerRef: p, size: m, children: h, className: g, style: _, id: v, "data-testid": y } = t, b = m === void 0 ? "md" : m, x = r.options.meta?.rowHeight ?? Ka[b], S = qa[b], C;
5347
5490
  n[0] !== a || n[1] !== o || n[2] !== s || n[3] !== u || n[4] !== c || n[5] !== l || n[6] !== d || n[7] !== x || n[8] !== f || n[9] !== p || n[10] !== b || n[11] !== S || n[12] !== r || n[13] !== i ? (C = {
5348
5491
  table: r,
5349
5492
  ui: i,
@@ -5361,7 +5504,7 @@ function Ba(t) {
5361
5504
  controlSize: S
5362
5505
  }, n[0] = a, n[1] = o, n[2] = s, n[3] = u, n[4] = c, n[5] = l, n[6] = d, n[7] = x, n[8] = f, n[9] = p, n[10] = b, n[11] = S, n[12] = r, n[13] = i, n[14] = C) : C = n[14];
5363
5506
  let w = C, T;
5364
- n[15] === g ? T = n[16] : (T = [Je.root, g].filter(Boolean), n[15] = g, n[16] = T);
5507
+ n[15] === g ? T = n[16] : (T = [Ye.root, g].filter(Boolean), n[15] = g, n[16] = T);
5365
5508
  let E = T.join(" "), D;
5366
5509
  n[17] !== h || n[18] !== v || n[19] !== b || n[20] !== _ || n[21] !== E || n[22] !== y ? (D = /* @__PURE__ */ q("div", {
5367
5510
  id: v,
@@ -5373,33 +5516,33 @@ function Ba(t) {
5373
5516
  children: h
5374
5517
  }), n[17] = h, n[18] = v, n[19] = b, n[20] = _, n[21] = E, n[22] = y, n[23] = D) : D = n[23];
5375
5518
  let O;
5376
- return n[24] !== w || n[25] !== D ? (O = /* @__PURE__ */ q(Ze, {
5519
+ return n[24] !== w || n[25] !== D ? (O = /* @__PURE__ */ q(Qe, {
5377
5520
  value: w,
5378
5521
  children: D
5379
5522
  }), n[24] = w, n[25] = D, n[26] = O) : O = n[26], O;
5380
5523
  }
5381
- var Va = Object.assign(Ba, {
5382
- Toolbar: Ea,
5383
- Spacer: Da,
5384
- SummaryCount: ka,
5385
- LoadingIndicator: Oa,
5386
- Search: oi,
5387
- EditActions: Mn,
5388
- ColumnsButton: Aa,
5389
- FilterButton: Ma,
5390
- Table: wa,
5391
- Footer: ai,
5392
- FilterPanel: Hn,
5393
- FilterPills: Yr,
5394
- ColumnsPanel: Cn
5524
+ var Ya = Object.assign(Ja, {
5525
+ Toolbar: Pa,
5526
+ Spacer: Fa,
5527
+ SummaryCount: La,
5528
+ LoadingIndicator: Ia,
5529
+ Search: mi,
5530
+ EditActions: Ln,
5531
+ ColumnsButton: Ra,
5532
+ FilterButton: Ba,
5533
+ Table: Ma,
5534
+ Footer: pi,
5535
+ FilterPanel: qn,
5536
+ FilterPills: ri,
5537
+ ColumnsPanel: wn
5395
5538
  });
5396
5539
  //#endregion
5397
5540
  //#region src/tmdatagrid/components/filters/DgRangeSliderFilter.tsx
5398
- function Ha(t) {
5541
+ function Xa(t) {
5399
5542
  let n = e(23), { column: r, operator: i, value: a, onChange: o, size: s, labels: c } = t;
5400
- if (!mt(i)) {
5543
+ if (!ht(i)) {
5401
5544
  let e;
5402
- return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ q(Rn, { ...t }), n[0] = t, n[1] = e), e;
5545
+ return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ q(Un, { ...t }), n[0] = t, n[1] = e), e;
5403
5546
  }
5404
5547
  let l;
5405
5548
  if (n[2] !== r) {
@@ -5441,11 +5584,11 @@ function Ha(t) {
5441
5584
  }
5442
5585
  //#endregion
5443
5586
  //#region src/tmdatagrid/components/filters/DgDateRangeFilter.tsx
5444
- function Ua(t) {
5587
+ function Za(t) {
5445
5588
  let n = e(23), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
5446
- if (!mt(r)) {
5589
+ if (!ht(r)) {
5447
5590
  let e;
5448
- return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ q(Rn, { ...t }), n[0] = t, n[1] = e), e;
5591
+ return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ q(Un, { ...t }), n[0] = t, n[1] = e), e;
5449
5592
  }
5450
5593
  let c;
5451
5594
  n[2] === i ? c = n[3] : (c = Array.isArray(i) ? [String(i[0] ?? ""), String(i[1] ?? "")] : ["", ""], n[2] = i, n[3] = c);
@@ -5481,16 +5624,16 @@ function Ua(t) {
5481
5624
  }
5482
5625
  //#endregion
5483
5626
  //#region src/tmdatagrid/components/filters/DgAutocompleteFilter.tsx
5484
- function Wa(t) {
5627
+ function Qa(t) {
5485
5628
  let n = e(19), { column: r, table: i, operator: a, value: o, onChange: s, options: c, size: l, labels: d } = t;
5486
- if (pt(a) || mt(a)) {
5629
+ if (mt(a) || ht(a)) {
5487
5630
  let e;
5488
- return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ q(Rn, { ...t }), n[0] = t, n[1] = e), e;
5631
+ return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ q(Un, { ...t }), n[0] = t, n[1] = e), e;
5489
5632
  }
5490
5633
  let f;
5491
- n[2] === a ? f = n[3] : (f = ft(a), n[2] = a, n[3] = f);
5634
+ n[2] === a ? f = n[3] : (f = pt(a), n[2] = a, n[3] = f);
5492
5635
  let p = f, m;
5493
- n[4] !== r || n[5] !== c || n[6] !== i ? (m = c.length > 0 ? c : In({
5636
+ n[4] !== r || n[5] !== c || n[6] !== i ? (m = c.length > 0 ? c : Vn({
5494
5637
  table: i,
5495
5638
  column: r,
5496
5639
  fallback: "faceted"
@@ -5498,7 +5641,7 @@ function Wa(t) {
5498
5641
  let h = m, g = d.filterValue, _;
5499
5642
  n[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = { withinPortal: !1 }, n[8] = _) : _ = n[8];
5500
5643
  let v = !p, y = p ? d.filterValuePlaceholder : "", b;
5501
- n[9] === h ? b = n[10] : (b = h.map(Ga), n[9] = h, n[10] = b);
5644
+ n[9] === h ? b = n[10] : (b = h.map($a), n[9] = h, n[10] = b);
5502
5645
  let x = p && typeof o == "string" ? o : "", S;
5503
5646
  return n[11] !== d.filterValue || n[12] !== s || n[13] !== l || n[14] !== v || n[15] !== y || n[16] !== b || n[17] !== x ? (S = /* @__PURE__ */ q(u, {
5504
5647
  label: g,
@@ -5513,19 +5656,19 @@ function Wa(t) {
5513
5656
  onChange: s
5514
5657
  }), n[11] = d.filterValue, n[12] = s, n[13] = l, n[14] = v, n[15] = y, n[16] = b, n[17] = x, n[18] = S) : S = n[18], S;
5515
5658
  }
5516
- function Ga(e) {
5659
+ function $a(e) {
5517
5660
  return e.value;
5518
5661
  }
5519
5662
  //#endregion
5520
5663
  //#region src/tmdatagrid/components/filters/DgTriStateFilter.tsx
5521
- function Ka(t) {
5664
+ function eo(t) {
5522
5665
  let n = e(26), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
5523
- if (pt(r) || mt(r)) {
5666
+ if (mt(r) || ht(r)) {
5524
5667
  let e;
5525
- return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ q(Rn, { ...t }), n[0] = t, n[1] = e), e;
5668
+ return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ q(Un, { ...t }), n[0] = t, n[1] = e), e;
5526
5669
  }
5527
5670
  let c;
5528
- n[2] === r ? c = n[3] : (c = ft(r), n[2] = r, n[3] = c);
5671
+ n[2] === r ? c = n[3] : (c = pt(r), n[2] = r, n[3] = c);
5529
5672
  let l = c, u = typeof i == "string" ? i : "", d = !l, f;
5530
5673
  n[4] === s.filterAll ? f = n[5] : (f = {
5531
5674
  value: "all",
@@ -5566,7 +5709,7 @@ function Ka(t) {
5566
5709
  }
5567
5710
  //#endregion
5568
5711
  //#region src/tmdatagrid/core/labelsSv.ts
5569
- var qa = {
5712
+ var to = {
5570
5713
  operators: {
5571
5714
  contains: "innehåller",
5572
5715
  equals: "är lika med",
@@ -5649,6 +5792,7 @@ var qa = {
5649
5792
  editRowErrors: "Åtgärda de markerade cellerna",
5650
5793
  saveAllEdits: (e) => e === 1 ? "Spara 1 rad" : `Spara ${e} rader`,
5651
5794
  discardAllEdits: "Förkasta",
5795
+ editRowsStillOpen: (e) => e === 1 ? "1 rad redigeras fortfarande" : `${e} rader redigeras fortfarande`,
5652
5796
  confirmNewRow: "Lägg till rad",
5653
5797
  discardNewRow: "Släng ny rad",
5654
5798
  deleteRow: "Ta bort rad",
@@ -5677,11 +5821,11 @@ var qa = {
5677
5821
  };
5678
5822
  //#endregion
5679
5823
  //#region src/tmdatagrid/core/summary.ts
5680
- function Ja({ table: e, columnId: t, fn: n = "sum" }) {
5824
+ function no({ table: e, columnId: t, fn: n = "sum" }) {
5681
5825
  let r = e.getFilteredRowModel().rows;
5682
- return ve[n](t, r, r);
5826
+ return ye[n](t, r, r);
5683
5827
  }
5684
5828
  //#endregion
5685
- export { lr as DATA_STATE_SLICES, ra as DEFAULT_CELL_EXPORT_OPTIONS, La as DEFAULT_TMDATAGRID_SIZE, kt as DETAILS_COLUMN_ID, Wa as DgAutocompleteFilter, Ua as DgDateRangeFilter, Ha as DgRangeSliderFilter, Ka as DgTriStateFilter, Bt as EDIT_COLUMN_ID, $e as FILTER_OPERATOR_LABELS, Kt as GROUP_COLUMN_ID, dr as PERSIST_PAYLOAD_VERSION, en as ROW_NUMBER_COLUMN_ID, sn as SELECT_COLUMN_ID, ur as SETTINGS_STATE_SLICES, za as SIZE_CONTROL_SIZE, Ra as SIZE_ROW_HEIGHT, sr as TMDATAGRID_LABELS_EN, qa as TMDATAGRID_LABELS_SV, Va as TMDataGrid, Ni as TMDataGridBooleanEditor, Pi as TMDataGridDateEditor, Mn as TMDataGridEditActions, Yr as TMDataGridFilterPills, Rn as TMDataGridFilterValueInput, Fi as TMDataGridMultiSelectEditor, Ii as TMDataGridNumberEditor, oi as TMDataGridSearch, Li as TMDataGridSelectEditor, Ri as TMDataGridStringEditor, Ja as aggregateColumn, Dt as areAllRowsExpanded, gi as autosizeColumn, ea as boundsCellCount, ta as boundsEdges, aa as buildCellMatrix, oa as buildGridCellMatrix, Xn as clearedValueForType, Hr as createTMDataGridColumnHelper, fa as downloadTextFile, ht as emptyValueForOperator, sa as exportGridToCsv, ia as formatExportValue, vt as formatFilterLabel, Yt as formatGroupValue, rr as fuzzyGlobalFilterFn, Pr as getColumnCapabilities, hn as getColumnDefaultOperator, gn as getColumnFilterControl, pn as getColumnLabel, _i as getColumnRegion, mn as getColumnType, dt as getDefaultOperator, nn as getDisplayedRows, Yn as getEditFieldName, Fr as getGridCapabilities, Gt as getGroupDataRows, ut as getOperatorsForType, an as getSelectableRowIds, Si as getStepTargetColumn, $r as getTMDataGridPaginationApi, vn as isColumnEditableForRow, Sn as isColumnReorderable, bn as isControlColumn, _t as isFilterActive, xn as isGeneratedColumn, rn as isPagingActive, zr as isSameCell, $i as isWithinBounds, bi as keepGeneratedColumnsOutermost, hi as measureColumnContentWidth, cr as mergeLabels, yi as moveColumn, Ci as moveColumnByStep, tr as normalizeFieldValidate, Jr as openColumnFilter, ft as operatorNeedsValue, pt as operatorTakesArrayValue, mt as operatorTakesRangeValue, Ln as optionsToComboboxData, Nr as readFeatureFlags, Lr as resolveCellMove, In as resolveColumnOptions, Ot as resolveExpandAll, Qi as resolveRangeBounds, on as resolveRowSelectionClick, Vr as tmDataGridFeatures, la as toClipboardText, ua as toExcelCsv, Qe as useCellControlTabIndex, qr as useTMDataGrid, Q as useTMDataGridContext, da as writeClipboardText };
5829
+ export { _r as DATA_STATE_SLICES, da as DEFAULT_CELL_EXPORT_OPTIONS, Ga as DEFAULT_TMDATAGRID_SIZE, At as DETAILS_COLUMN_ID, Qa as DgAutocompleteFilter, Za as DgDateRangeFilter, Xa as DgRangeSliderFilter, eo as DgTriStateFilter, Vt as EDIT_COLUMN_ID, et as FILTER_OPERATOR_LABELS, qt as GROUP_COLUMN_ID, yr as PERSIST_PAYLOAD_VERSION, tn as ROW_NUMBER_COLUMN_ID, cn as SELECT_COLUMN_ID, vr as SETTINGS_STATE_SLICES, qa as SIZE_CONTROL_SIZE, Ka as SIZE_ROW_HEIGHT, hr as TMDATAGRID_LABELS_EN, to as TMDATAGRID_LABELS_SV, Ya as TMDataGrid, Vi as TMDataGridBooleanEditor, Hi as TMDataGridDateEditor, Ln as TMDataGridEditActions, ri as TMDataGridFilterPills, Un as TMDataGridFilterValueInput, Ui as TMDataGridMultiSelectEditor, Wi as TMDataGridNumberEditor, mi as TMDataGridSearch, Gi as TMDataGridSelectEditor, Ki as TMDataGridStringEditor, no as aggregateColumn, Ot as areAllRowsExpanded, wi as autosizeColumn, ca as boundsCellCount, la as boundsEdges, pa as buildCellMatrix, ma as buildGridCellMatrix, tr as clearedValueForType, Xr as createTMDataGridColumnHelper, ba as downloadTextFile, gt as emptyValueForOperator, ha as exportGridToCsv, fa as formatExportValue, yt as formatFilterLabel, Xt as formatGroupValue, dr as fuzzyGlobalFilterFn, Hr as getColumnCapabilities, gn as getColumnDefaultOperator, _n as getColumnFilterControl, mn as getColumnLabel, Ti as getColumnRegion, hn as getColumnType, ft as getDefaultOperator, rn as getDisplayedRows, er as getEditFieldName, Ur as getGridCapabilities, Kt as getGroupDataRows, dt as getOperatorsForType, on as getSelectableRowIds, Ai as getStepTargetColumn, si as getTMDataGridPaginationApi, yn as isColumnEditableForRow, Cn as isColumnReorderable, xn as isControlColumn, vt as isFilterActive, Sn as isGeneratedColumn, an as isPagingActive, qr as isSameCell, sa as isWithinBounds, Oi as keepGeneratedColumnsOutermost, Ci as measureColumnContentWidth, gr as mergeLabels, Di as moveColumn, ji as moveColumnByStep, lr as normalizeFieldValidate, ni as openColumnFilter, pt as operatorNeedsValue, mt as operatorTakesArrayValue, ht as operatorTakesRangeValue, Hn as optionsToComboboxData, Vr as readFeatureFlags, Gr as resolveCellMove, Vn as resolveColumnOptions, kt as resolveExpandAll, oa as resolveRangeBounds, sn as resolveRowSelectionClick, Yr as tmDataGridFeatures, _a as toClipboardText, va as toExcelCsv, $e as useCellControlTabIndex, ti as useTMDataGrid, Q as useTMDataGridContext, ya as writeClipboardText };
5686
5830
 
5687
5831
  //# sourceMappingURL=index.js.map