@jielga/tmdatagrid 2.0.0-beta.3 → 2.0.0-beta.4
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.d.ts +37 -9
- package/dist/index.js +1021 -948
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/appearance/SKILL.md +1 -1
- package/skills/cell-selection/SKILL.md +1 -1
- package/skills/columns/SKILL.md +1 -1
- package/skills/data/SKILL.md +1 -1
- package/skills/editing/SKILL.md +18 -6
- package/skills/filtering/SKILL.md +1 -1
- package/skills/getting-started/SKILL.md +1 -1
- package/skills/grouping/SKILL.md +1 -1
- package/skills/options/SKILL.md +32 -2
- package/skills/rows/SKILL.md +1 -1
- package/skills/server-side/SKILL.md +1 -1
- package/skills/testing/SKILL.md +1 -1
- package/src/tmdatagrid/components/TMDataGridEntryRows.tsx +3 -0
- package/src/tmdatagrid/components/TMDataGridTable.tsx +13 -0
- package/src/tmdatagrid/core/controlledState.ts +179 -0
- package/src/tmdatagrid/core/editEngine.ts +92 -15
- package/src/tmdatagrid/index.ts +2 -0
- package/src/tmdatagrid/useTMDataGrid.tsx +115 -4
package/dist/index.js
CHANGED
|
@@ -2,11 +2,11 @@ import { c as e } from "react/compiler-runtime";
|
|
|
2
2
|
import { createContext as t, useCallback as n, useContext as r, useEffect as i, useLayoutEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
3
3
|
import { ActionIcon as l, Autocomplete as u, Button as d, Checkbox as f, Group as p, Input as m, Loader as h, Menu as g, MultiSelect as _, NumberInput as v, Pill as y, Popover as b, RangeSlider as x, ScrollArea as S, SegmentedControl as C, Select as w, Stack as T, Text as E, TextInput as D, Tooltip as O, UnstyledButton as k } from "@mantine/core";
|
|
4
4
|
import { useCreateStore as A, useSelector as j } from "@tanstack/react-store";
|
|
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
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { FieldApi as
|
|
8
|
-
import { Store as
|
|
9
|
-
import { aggregationFns as
|
|
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 te, IconEyeOff as ne, IconFilter as re, IconFoldDown as U, IconFoldUp as ie, IconIndentDecrease as ae, IconIndentIncrease as oe, IconMenu2 as se, IconPencil as W, IconPinnedOff as G, IconPlus as K, IconSearch as ce, IconTrash as q, IconX as le } from "@tabler/icons-react";
|
|
6
|
+
import { Fragment as ue, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
7
|
+
import { FieldApi as de, FormApi as fe, getBy as pe, useStore as me } from "@tanstack/react-form";
|
|
8
|
+
import { Store as he, batch as ge, shallow as _e } from "@tanstack/store";
|
|
9
|
+
import { aggregationFns as ve, columnFacetingFeature as ye, columnFilteringFeature as be, columnGroupingFeature as xe, columnOrderingFeature as Se, columnPinningFeature as Ce, columnResizingFeature as we, columnSizingFeature as Te, columnVisibilityFeature as X, 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
10
|
import { compareItems as Ke, rankItem as qe } from "@tanstack/match-sorter-utils";
|
|
11
11
|
import { useVirtualizer as Je } from "@tanstack/react-virtual";
|
|
12
12
|
var Ye = { root: "_root_1wvkg_8" }, Xe = {
|
|
@@ -231,18 +231,18 @@ function jt(t) {
|
|
|
231
231
|
e.stopPropagation(), r.toggleExpanded();
|
|
232
232
|
}, n[2] = r, n[3] = l);
|
|
233
233
|
let u;
|
|
234
|
-
n[4] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
234
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ J(H, {
|
|
235
235
|
size: 16,
|
|
236
236
|
stroke: 1.6
|
|
237
237
|
}), n[4] = u) : u = n[4];
|
|
238
238
|
let d;
|
|
239
|
-
n[5] === o ? d = n[6] : (d = /* @__PURE__ */
|
|
239
|
+
n[5] === o ? d = n[6] : (d = /* @__PURE__ */ J("span", {
|
|
240
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
|
-
return n[7] !== o || n[8] !== r.id || n[9] !== c || n[10] !== l || n[11] !== d || n[12] !== s ? (f = /* @__PURE__ */
|
|
245
|
+
return n[7] !== o || n[8] !== r.id || n[9] !== c || n[10] !== l || n[11] !== d || n[12] !== s ? (f = /* @__PURE__ */ J(k, {
|
|
246
246
|
className: Tt.detailsToggle,
|
|
247
247
|
tabIndex: s,
|
|
248
248
|
"aria-expanded": o,
|
|
@@ -270,18 +270,18 @@ function Mt(t) {
|
|
|
270
270
|
expand: !c
|
|
271
271
|
})), n[4] = c, n[5] = o, n[6] = r, n[7] = u) : u = n[7];
|
|
272
272
|
let d;
|
|
273
|
-
n[8] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */
|
|
273
|
+
n[8] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ J(H, {
|
|
274
274
|
size: 16,
|
|
275
275
|
stroke: 1.6
|
|
276
276
|
}), n[8] = d) : d = n[8];
|
|
277
277
|
let f;
|
|
278
|
-
n[9] === c ? f = n[10] : (f = /* @__PURE__ */
|
|
278
|
+
n[9] === c ? f = n[10] : (f = /* @__PURE__ */ J("span", {
|
|
279
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
|
-
return n[11] !== c || n[12] !== l || n[13] !== u || n[14] !== f ? (p = /* @__PURE__ */
|
|
284
|
+
return n[11] !== c || n[12] !== l || n[13] !== u || n[14] !== f ? (p = /* @__PURE__ */ J(k, {
|
|
285
285
|
className: Tt.detailsToggle,
|
|
286
286
|
"aria-expanded": c,
|
|
287
287
|
"aria-label": l,
|
|
@@ -307,8 +307,8 @@ function Nt(e = "Details") {
|
|
|
307
307
|
enableGlobalFilter: !1,
|
|
308
308
|
enableHiding: !1,
|
|
309
309
|
enablePinning: !1,
|
|
310
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
311
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
310
|
+
header: ({ table: e }) => /* @__PURE__ */ J(Mt, { table: e }),
|
|
311
|
+
cell: ({ row: e }) => /* @__PURE__ */ J(jt, { row: e })
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
var $ = {
|
|
@@ -358,13 +358,13 @@ function Pt(e) {
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
function Ft(e) {
|
|
361
|
-
return
|
|
361
|
+
return me(e.store, It);
|
|
362
362
|
}
|
|
363
363
|
function It(e) {
|
|
364
364
|
return e.value;
|
|
365
365
|
}
|
|
366
366
|
function Lt(e) {
|
|
367
|
-
return
|
|
367
|
+
return me(e.store, Rt);
|
|
368
368
|
}
|
|
369
369
|
function Rt(e) {
|
|
370
370
|
return Pt(e.meta.errors);
|
|
@@ -396,13 +396,13 @@ function Bt() {
|
|
|
396
396
|
//#region src/tmdatagrid/components/TMDataGridEditColumn.tsx
|
|
397
397
|
var Vt = "__edit__";
|
|
398
398
|
function Ht(t) {
|
|
399
|
-
let n = e(11), { state: r, rowId: i, label: a, error: o } = t, s = r === "new" ? K : r === "edited" ?
|
|
400
|
-
n[0] === s ? u = n[1] : (u = /* @__PURE__ */
|
|
399
|
+
let n = e(11), { state: r, rowId: i, label: a, error: o } = t, s = r === "new" ? K : r === "edited" ? W : q, c = o ?? a, l = o !== null || void 0, u;
|
|
400
|
+
n[0] === s ? u = n[1] : (u = /* @__PURE__ */ J(s, {
|
|
401
401
|
size: 16,
|
|
402
402
|
stroke: 1.6
|
|
403
403
|
}), n[0] = s, n[1] = u);
|
|
404
404
|
let d;
|
|
405
|
-
n[2] !== a || n[3] !== i || n[4] !== r || n[5] !== l || n[6] !== u ? (d = /* @__PURE__ */
|
|
405
|
+
n[2] !== a || n[3] !== i || n[4] !== r || n[5] !== l || n[6] !== u ? (d = /* @__PURE__ */ J("span", {
|
|
406
406
|
role: "img",
|
|
407
407
|
"aria-label": a,
|
|
408
408
|
"data-dg-part": "row-state",
|
|
@@ -413,7 +413,7 @@ function Ht(t) {
|
|
|
413
413
|
children: u
|
|
414
414
|
}), n[2] = a, n[3] = i, n[4] = r, n[5] = l, n[6] = u, n[7] = d) : d = n[7];
|
|
415
415
|
let f;
|
|
416
|
-
return n[8] !== c || n[9] !== d ? (f = /* @__PURE__ */
|
|
416
|
+
return n[8] !== c || n[9] !== d ? (f = /* @__PURE__ */ J(O, {
|
|
417
417
|
label: c,
|
|
418
418
|
withArrow: !0,
|
|
419
419
|
children: d
|
|
@@ -435,10 +435,10 @@ function Ut(t) {
|
|
|
435
435
|
let S = a.editMode === "draft", C = m !== void 0 && (m.hasRowError || m.errorFields.length > 0), w;
|
|
436
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
|
-
n[15] !== i || n[16] !== o || n[17] !== c || n[18] !== s ? (E = i.canDeleteRows() ? /* @__PURE__ */
|
|
438
|
+
n[15] !== i || n[16] !== o || n[17] !== c || n[18] !== s ? (E = i.canDeleteRows() ? /* @__PURE__ */ J(O, {
|
|
439
439
|
label: o.deleteRow,
|
|
440
440
|
withArrow: !0,
|
|
441
|
-
children: /* @__PURE__ */
|
|
441
|
+
children: /* @__PURE__ */ J(l, {
|
|
442
442
|
variant: "subtle",
|
|
443
443
|
color: "gray",
|
|
444
444
|
size: "sm",
|
|
@@ -449,7 +449,7 @@ function Ut(t) {
|
|
|
449
449
|
onClick: (e) => {
|
|
450
450
|
e.stopPropagation(), i.deleteRow(c);
|
|
451
451
|
},
|
|
452
|
-
children: /* @__PURE__ */ q
|
|
452
|
+
children: /* @__PURE__ */ J(q, {
|
|
453
453
|
size: 16,
|
|
454
454
|
stroke: 1.6
|
|
455
455
|
})
|
|
@@ -459,7 +459,7 @@ function Ut(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__ */
|
|
462
|
+
n[20] !== o.rowStateNew || n[21] !== T || n[22] !== c ? (e = /* @__PURE__ */ J(Ht, {
|
|
463
463
|
state: "new",
|
|
464
464
|
rowId: c,
|
|
465
465
|
label: o.rowStateNew,
|
|
@@ -473,12 +473,12 @@ function Ut(t) {
|
|
|
473
473
|
});
|
|
474
474
|
}, n[24] = i, n[25] = c, n[26] = t) : t = n[26];
|
|
475
475
|
let r;
|
|
476
|
-
n[27] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
476
|
+
n[27] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ J(W, {
|
|
477
477
|
size: 16,
|
|
478
478
|
stroke: 1.6
|
|
479
479
|
}), n[27] = r) : r = n[27];
|
|
480
480
|
let a;
|
|
481
|
-
n[28] !== o.editRow || n[29] !== c || n[30] !== t || n[31] !== s ? (a = /* @__PURE__ */
|
|
481
|
+
n[28] !== o.editRow || n[29] !== c || n[30] !== t || n[31] !== s ? (a = /* @__PURE__ */ J(l, {
|
|
482
482
|
variant: "subtle",
|
|
483
483
|
color: "gray",
|
|
484
484
|
size: "sm",
|
|
@@ -490,7 +490,7 @@ function Ut(t) {
|
|
|
490
490
|
children: r
|
|
491
491
|
}), n[28] = o.editRow, n[29] = c, n[30] = t, n[31] = s, n[32] = a) : a = n[32];
|
|
492
492
|
let u;
|
|
493
|
-
n[33] !== o.editRow || n[34] !== a ? (u = /* @__PURE__ */
|
|
493
|
+
n[33] !== o.editRow || n[34] !== a ? (u = /* @__PURE__ */ J(O, {
|
|
494
494
|
label: o.editRow,
|
|
495
495
|
withArrow: !0,
|
|
496
496
|
children: a
|
|
@@ -498,12 +498,12 @@ function Ut(t) {
|
|
|
498
498
|
let d;
|
|
499
499
|
n[36] !== i || n[37] !== c ? (d = () => i.cancel(c), n[36] = i, n[37] = c, n[38] = d) : d = n[38];
|
|
500
500
|
let f;
|
|
501
|
-
n[39] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */
|
|
501
|
+
n[39] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ J(le, {
|
|
502
502
|
size: 16,
|
|
503
503
|
stroke: 1.6
|
|
504
504
|
}), n[39] = f) : f = n[39];
|
|
505
505
|
let m;
|
|
506
|
-
n[40] !== o.discardNewRow || n[41] !== c || n[42] !== d || n[43] !== s ? (m = /* @__PURE__ */
|
|
506
|
+
n[40] !== o.discardNewRow || n[41] !== c || n[42] !== d || n[43] !== s ? (m = /* @__PURE__ */ J(l, {
|
|
507
507
|
variant: "subtle",
|
|
508
508
|
color: "gray",
|
|
509
509
|
size: "sm",
|
|
@@ -515,13 +515,13 @@ function Ut(t) {
|
|
|
515
515
|
children: f
|
|
516
516
|
}), n[40] = o.discardNewRow, n[41] = c, n[42] = d, n[43] = s, n[44] = m) : m = n[44];
|
|
517
517
|
let h;
|
|
518
|
-
n[45] !== o.discardNewRow || n[46] !== m ? (h = /* @__PURE__ */
|
|
518
|
+
n[45] !== o.discardNewRow || n[46] !== m ? (h = /* @__PURE__ */ J(O, {
|
|
519
519
|
label: o.discardNewRow,
|
|
520
520
|
withArrow: !0,
|
|
521
521
|
children: m
|
|
522
522
|
}), n[45] = o.discardNewRow, n[46] = m, n[47] = h) : h = n[47];
|
|
523
523
|
let g;
|
|
524
|
-
return n[48] !== u || n[49] !== h || n[50] !== e ? (g = /* @__PURE__ */
|
|
524
|
+
return n[48] !== u || n[49] !== h || n[50] !== e ? (g = /* @__PURE__ */ Y(p, {
|
|
525
525
|
gap: 0,
|
|
526
526
|
wrap: "nowrap",
|
|
527
527
|
children: [
|
|
@@ -534,12 +534,12 @@ function Ut(t) {
|
|
|
534
534
|
let e;
|
|
535
535
|
n[52] !== i || n[53] !== c ? (e = () => void i.commit(c), n[52] = i, n[53] = c, n[54] = e) : e = n[54];
|
|
536
536
|
let t;
|
|
537
|
-
n[55] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
537
|
+
n[55] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ J(B, {
|
|
538
538
|
size: 16,
|
|
539
539
|
stroke: 2
|
|
540
540
|
}), n[55] = t) : t = n[55];
|
|
541
541
|
let r;
|
|
542
|
-
n[56] !== o.confirmNewRow || n[57] !== c || n[58] !== e || n[59] !== s ? (r = /* @__PURE__ */
|
|
542
|
+
n[56] !== o.confirmNewRow || n[57] !== c || n[58] !== e || n[59] !== s ? (r = /* @__PURE__ */ J(l, {
|
|
543
543
|
variant: "subtle",
|
|
544
544
|
color: "green",
|
|
545
545
|
size: "sm",
|
|
@@ -551,7 +551,7 @@ function Ut(t) {
|
|
|
551
551
|
children: t
|
|
552
552
|
}), n[56] = o.confirmNewRow, n[57] = c, n[58] = e, n[59] = s, n[60] = r) : r = n[60];
|
|
553
553
|
let a;
|
|
554
|
-
n[61] !== o.confirmNewRow || n[62] !== r ? (a = /* @__PURE__ */
|
|
554
|
+
n[61] !== o.confirmNewRow || n[62] !== r ? (a = /* @__PURE__ */ J(O, {
|
|
555
555
|
label: o.confirmNewRow,
|
|
556
556
|
withArrow: !0,
|
|
557
557
|
children: r
|
|
@@ -559,12 +559,12 @@ function Ut(t) {
|
|
|
559
559
|
let u;
|
|
560
560
|
n[64] !== i || n[65] !== c ? (u = () => i.cancel(c), n[64] = i, n[65] = c, n[66] = u) : u = n[66];
|
|
561
561
|
let d;
|
|
562
|
-
n[67] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */
|
|
562
|
+
n[67] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ J(le, {
|
|
563
563
|
size: 16,
|
|
564
564
|
stroke: 1.6
|
|
565
565
|
}), n[67] = d) : d = n[67];
|
|
566
566
|
let f;
|
|
567
|
-
n[68] !== o.discardNewRow || n[69] !== c || n[70] !== u || n[71] !== s ? (f = /* @__PURE__ */
|
|
567
|
+
n[68] !== o.discardNewRow || n[69] !== c || n[70] !== u || n[71] !== s ? (f = /* @__PURE__ */ J(l, {
|
|
568
568
|
variant: "subtle",
|
|
569
569
|
color: "gray",
|
|
570
570
|
size: "sm",
|
|
@@ -576,13 +576,13 @@ function Ut(t) {
|
|
|
576
576
|
children: d
|
|
577
577
|
}), n[68] = o.discardNewRow, n[69] = c, n[70] = u, n[71] = s, n[72] = f) : f = n[72];
|
|
578
578
|
let m;
|
|
579
|
-
n[73] !== o.discardNewRow || n[74] !== f ? (m = /* @__PURE__ */
|
|
579
|
+
n[73] !== o.discardNewRow || n[74] !== f ? (m = /* @__PURE__ */ J(O, {
|
|
580
580
|
label: o.discardNewRow,
|
|
581
581
|
withArrow: !0,
|
|
582
582
|
children: f
|
|
583
583
|
}), n[73] = o.discardNewRow, n[74] = f, n[75] = m) : m = n[75];
|
|
584
584
|
let h;
|
|
585
|
-
return n[76] !== a || n[77] !== m ? (h = /* @__PURE__ */
|
|
585
|
+
return n[76] !== a || n[77] !== m ? (h = /* @__PURE__ */ Y(p, {
|
|
586
586
|
gap: 0,
|
|
587
587
|
wrap: "nowrap",
|
|
588
588
|
children: [a, m]
|
|
@@ -590,7 +590,7 @@ function Ut(t) {
|
|
|
590
590
|
}
|
|
591
591
|
if (x) {
|
|
592
592
|
let e;
|
|
593
|
-
n[79] !== o.rowStateDeleted || n[80] !== c ? (e = /* @__PURE__ */
|
|
593
|
+
n[79] !== o.rowStateDeleted || n[80] !== c ? (e = /* @__PURE__ */ J(Ht, {
|
|
594
594
|
state: "deleted",
|
|
595
595
|
rowId: c,
|
|
596
596
|
label: o.rowStateDeleted,
|
|
@@ -601,12 +601,12 @@ function Ut(t) {
|
|
|
601
601
|
e.stopPropagation(), i.deleteRow(c);
|
|
602
602
|
}, n[82] = i, n[83] = c, n[84] = t) : t = n[84];
|
|
603
603
|
let r;
|
|
604
|
-
n[85] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
604
|
+
n[85] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ J(N, {
|
|
605
605
|
size: 16,
|
|
606
606
|
stroke: 1.6
|
|
607
607
|
}), n[85] = r) : r = n[85];
|
|
608
608
|
let a;
|
|
609
|
-
n[86] !== o.restoreRow || n[87] !== c || n[88] !== t || n[89] !== s ? (a = /* @__PURE__ */
|
|
609
|
+
n[86] !== o.restoreRow || n[87] !== c || n[88] !== t || n[89] !== s ? (a = /* @__PURE__ */ J(l, {
|
|
610
610
|
variant: "subtle",
|
|
611
611
|
color: "gray",
|
|
612
612
|
size: "sm",
|
|
@@ -618,13 +618,13 @@ function Ut(t) {
|
|
|
618
618
|
children: r
|
|
619
619
|
}), n[86] = o.restoreRow, n[87] = c, n[88] = t, n[89] = s, n[90] = a) : a = n[90];
|
|
620
620
|
let u;
|
|
621
|
-
n[91] !== o.restoreRow || n[92] !== a ? (u = /* @__PURE__ */
|
|
621
|
+
n[91] !== o.restoreRow || n[92] !== a ? (u = /* @__PURE__ */ J(O, {
|
|
622
622
|
label: o.restoreRow,
|
|
623
623
|
withArrow: !0,
|
|
624
624
|
children: a
|
|
625
625
|
}), n[91] = o.restoreRow, n[92] = a, n[93] = u) : u = n[93];
|
|
626
626
|
let d;
|
|
627
|
-
return n[94] !== u || n[95] !== e ? (d = /* @__PURE__ */
|
|
627
|
+
return n[94] !== u || n[95] !== e ? (d = /* @__PURE__ */ Y(p, {
|
|
628
628
|
gap: 0,
|
|
629
629
|
wrap: "nowrap",
|
|
630
630
|
children: [e, u]
|
|
@@ -634,14 +634,14 @@ function Ut(t) {
|
|
|
634
634
|
if (S) {
|
|
635
635
|
if (m?.isSubmitting) {
|
|
636
636
|
let e;
|
|
637
|
-
return n[97] === o.loading ? e = n[98] : (e = /* @__PURE__ */
|
|
637
|
+
return n[97] === o.loading ? e = n[98] : (e = /* @__PURE__ */ J(h, {
|
|
638
638
|
size: "xs",
|
|
639
639
|
"aria-label": o.loading
|
|
640
640
|
}), n[97] = o.loading, n[98] = e), e;
|
|
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__ */
|
|
644
|
+
n[99] !== o.rowStateEdited || n[100] !== T || n[101] !== c ? (e = /* @__PURE__ */ J(Ht, {
|
|
645
645
|
state: "edited",
|
|
646
646
|
rowId: c,
|
|
647
647
|
label: o.rowStateEdited,
|
|
@@ -652,12 +652,12 @@ function Ut(t) {
|
|
|
652
652
|
e.stopPropagation(), i.cancel(c);
|
|
653
653
|
}, n[103] = i, n[104] = c, n[105] = t) : t = n[105];
|
|
654
654
|
let r;
|
|
655
|
-
n[106] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
655
|
+
n[106] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ J(N, {
|
|
656
656
|
size: 16,
|
|
657
657
|
stroke: 1.6
|
|
658
658
|
}), n[106] = r) : r = n[106];
|
|
659
659
|
let a;
|
|
660
|
-
n[107] !== o.revertRow || n[108] !== c || n[109] !== t || n[110] !== s ? (a = /* @__PURE__ */
|
|
660
|
+
n[107] !== o.revertRow || n[108] !== c || n[109] !== t || n[110] !== s ? (a = /* @__PURE__ */ J(l, {
|
|
661
661
|
variant: "subtle",
|
|
662
662
|
color: "gray",
|
|
663
663
|
size: "sm",
|
|
@@ -669,13 +669,13 @@ function Ut(t) {
|
|
|
669
669
|
children: r
|
|
670
670
|
}), n[107] = o.revertRow, n[108] = c, n[109] = t, n[110] = s, n[111] = a) : a = n[111];
|
|
671
671
|
let u;
|
|
672
|
-
n[112] !== o.revertRow || n[113] !== a ? (u = /* @__PURE__ */
|
|
672
|
+
n[112] !== o.revertRow || n[113] !== a ? (u = /* @__PURE__ */ J(O, {
|
|
673
673
|
label: o.revertRow,
|
|
674
674
|
withArrow: !0,
|
|
675
675
|
children: a
|
|
676
676
|
}), n[112] = o.revertRow, n[113] = a, n[114] = u) : u = n[114];
|
|
677
677
|
let d;
|
|
678
|
-
return n[115] !== u || n[116] !== e ? (d = /* @__PURE__ */
|
|
678
|
+
return n[115] !== u || n[116] !== e ? (d = /* @__PURE__ */ Y(p, {
|
|
679
679
|
gap: 0,
|
|
680
680
|
wrap: "nowrap",
|
|
681
681
|
children: [e, u]
|
|
@@ -683,10 +683,10 @@ function Ut(t) {
|
|
|
683
683
|
}
|
|
684
684
|
if (!d) {
|
|
685
685
|
let e;
|
|
686
|
-
n[118] !== i || n[119] !== a.editMode || n[120] !== o || n[121] !== c || n[122] !== s ? (e = a.editMode === "row" && /* @__PURE__ */
|
|
686
|
+
n[118] !== i || n[119] !== a.editMode || n[120] !== o || n[121] !== c || n[122] !== s ? (e = a.editMode === "row" && /* @__PURE__ */ J(O, {
|
|
687
687
|
label: o.editRow,
|
|
688
688
|
withArrow: !0,
|
|
689
|
-
children: /* @__PURE__ */
|
|
689
|
+
children: /* @__PURE__ */ J(l, {
|
|
690
690
|
variant: "subtle",
|
|
691
691
|
color: "gray",
|
|
692
692
|
size: "sm",
|
|
@@ -700,14 +700,14 @@ function Ut(t) {
|
|
|
700
700
|
columnId: null
|
|
701
701
|
});
|
|
702
702
|
},
|
|
703
|
-
children: /* @__PURE__ */
|
|
703
|
+
children: /* @__PURE__ */ J(W, {
|
|
704
704
|
size: 16,
|
|
705
705
|
stroke: 1.6
|
|
706
706
|
})
|
|
707
707
|
})
|
|
708
708
|
}), n[118] = i, n[119] = a.editMode, n[120] = o, n[121] = c, n[122] = s, n[123] = e) : e = n[123];
|
|
709
709
|
let t;
|
|
710
|
-
return n[124] !== e || n[125] !== D ? (t = /* @__PURE__ */
|
|
710
|
+
return n[124] !== e || n[125] !== D ? (t = /* @__PURE__ */ Y(p, {
|
|
711
711
|
gap: 0,
|
|
712
712
|
wrap: "nowrap",
|
|
713
713
|
children: [e, D]
|
|
@@ -715,7 +715,7 @@ function Ut(t) {
|
|
|
715
715
|
}
|
|
716
716
|
if (m?.isSubmitting) {
|
|
717
717
|
let e;
|
|
718
|
-
return n[127] === o.loading ? e = n[128] : (e = /* @__PURE__ */
|
|
718
|
+
return n[127] === o.loading ? e = n[128] : (e = /* @__PURE__ */ J(h, {
|
|
719
719
|
size: "xs",
|
|
720
720
|
"aria-label": o.loading
|
|
721
721
|
}), n[127] = o.loading, n[128] = e), e;
|
|
@@ -725,12 +725,12 @@ function Ut(t) {
|
|
|
725
725
|
e.stopPropagation(), i.commit(c);
|
|
726
726
|
}, n[129] = i, n[130] = c, n[131] = A) : A = n[131];
|
|
727
727
|
let M;
|
|
728
|
-
n[132] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */
|
|
728
|
+
n[132] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ J(B, {
|
|
729
729
|
size: 16,
|
|
730
730
|
stroke: 2
|
|
731
731
|
}), n[132] = M) : M = n[132];
|
|
732
732
|
let P;
|
|
733
|
-
n[133] !== o.saveRow || n[134] !== c || n[135] !== k || n[136] !== A || n[137] !== s ? (P = /* @__PURE__ */
|
|
733
|
+
n[133] !== o.saveRow || n[134] !== c || n[135] !== k || n[136] !== A || n[137] !== s ? (P = /* @__PURE__ */ J(l, {
|
|
734
734
|
variant: "subtle",
|
|
735
735
|
color: k,
|
|
736
736
|
size: "sm",
|
|
@@ -742,11 +742,11 @@ function Ut(t) {
|
|
|
742
742
|
children: M
|
|
743
743
|
}), n[133] = o.saveRow, n[134] = c, n[135] = k, n[136] = A, n[137] = s, n[138] = P) : P = n[138];
|
|
744
744
|
let F = P, I;
|
|
745
|
-
n[139] !== o.saveRow || n[140] !== T || n[141] !== F ? (I = T === null ? /* @__PURE__ */
|
|
745
|
+
n[139] !== o.saveRow || n[140] !== T || n[141] !== F ? (I = T === null ? /* @__PURE__ */ J(O, {
|
|
746
746
|
label: o.saveRow,
|
|
747
747
|
withArrow: !0,
|
|
748
748
|
children: F
|
|
749
|
-
}) : /* @__PURE__ */
|
|
749
|
+
}) : /* @__PURE__ */ J(O, {
|
|
750
750
|
label: T,
|
|
751
751
|
withArrow: !0,
|
|
752
752
|
children: F
|
|
@@ -756,12 +756,12 @@ function Ut(t) {
|
|
|
756
756
|
e.stopPropagation(), i.cancel(c);
|
|
757
757
|
}, n[143] = i, n[144] = c, n[145] = L) : L = n[145];
|
|
758
758
|
let R;
|
|
759
|
-
n[146] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */
|
|
759
|
+
n[146] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ J(le, {
|
|
760
760
|
size: 16,
|
|
761
761
|
stroke: 1.6
|
|
762
762
|
}), n[146] = R) : R = n[146];
|
|
763
763
|
let z;
|
|
764
|
-
n[147] !== o.cancelRowEdit || n[148] !== c || n[149] !== L || n[150] !== s ? (z = /* @__PURE__ */
|
|
764
|
+
n[147] !== o.cancelRowEdit || n[148] !== c || n[149] !== L || n[150] !== s ? (z = /* @__PURE__ */ J(l, {
|
|
765
765
|
variant: "subtle",
|
|
766
766
|
color: "gray",
|
|
767
767
|
size: "sm",
|
|
@@ -773,13 +773,13 @@ function Ut(t) {
|
|
|
773
773
|
children: R
|
|
774
774
|
}), n[147] = o.cancelRowEdit, n[148] = c, n[149] = L, n[150] = s, n[151] = z) : z = n[151];
|
|
775
775
|
let V;
|
|
776
|
-
n[152] !== o.cancelRowEdit || n[153] !== z ? (V = /* @__PURE__ */
|
|
776
|
+
n[152] !== o.cancelRowEdit || n[153] !== z ? (V = /* @__PURE__ */ J(O, {
|
|
777
777
|
label: o.cancelRowEdit,
|
|
778
778
|
withArrow: !0,
|
|
779
779
|
children: z
|
|
780
780
|
}), n[152] = o.cancelRowEdit, n[153] = z, n[154] = V) : V = n[154];
|
|
781
781
|
let H;
|
|
782
|
-
return n[155] !== I || n[156] !== V ? (H = /* @__PURE__ */
|
|
782
|
+
return n[155] !== I || n[156] !== V ? (H = /* @__PURE__ */ Y(p, {
|
|
783
783
|
gap: 0,
|
|
784
784
|
wrap: "nowrap",
|
|
785
785
|
children: [I, V]
|
|
@@ -804,8 +804,8 @@ function Wt(e = "Edit", t = !1) {
|
|
|
804
804
|
enableHiding: !1,
|
|
805
805
|
enablePinning: !1,
|
|
806
806
|
header: () => null,
|
|
807
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
808
|
-
aggregatedCell: ({ row: e }) => /* @__PURE__ */
|
|
807
|
+
cell: ({ row: e }) => /* @__PURE__ */ J(Ut, { row: e }),
|
|
808
|
+
aggregatedCell: ({ row: e }) => /* @__PURE__ */ J(Ut, { row: e })
|
|
809
809
|
};
|
|
810
810
|
}
|
|
811
811
|
var Gt = {
|
|
@@ -841,25 +841,25 @@ function Zt(t) {
|
|
|
841
841
|
e.stopPropagation(), r.toggleExpanded();
|
|
842
842
|
}, n[16] = r, n[17] = g);
|
|
843
843
|
let _;
|
|
844
|
-
n[18] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */
|
|
844
|
+
n[18] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ J(H, {
|
|
845
845
|
size: 16,
|
|
846
846
|
stroke: 1.6
|
|
847
847
|
}), n[18] = _) : _ = n[18];
|
|
848
848
|
let v;
|
|
849
|
-
n[19] === o ? v = n[20] : (v = /* @__PURE__ */
|
|
849
|
+
n[19] === o ? v = n[20] : (v = /* @__PURE__ */ J("span", {
|
|
850
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
|
-
n[21] === l ? y = n[22] : (y = /* @__PURE__ */
|
|
855
|
+
n[21] === l ? y = n[22] : (y = /* @__PURE__ */ J("span", {
|
|
856
856
|
className: Gt.groupLabel,
|
|
857
857
|
children: l
|
|
858
858
|
}), n[21] = l, n[22] = y);
|
|
859
859
|
let b;
|
|
860
860
|
n[23] === r ? b = n[24] : (b = Kt(r), n[23] = r, n[24] = b);
|
|
861
861
|
let x;
|
|
862
|
-
n[25] === b.length ? x = n[26] : (x = /* @__PURE__ */
|
|
862
|
+
n[25] === b.length ? x = n[26] : (x = /* @__PURE__ */ Y("span", {
|
|
863
863
|
className: Gt.groupCount,
|
|
864
864
|
children: [
|
|
865
865
|
"(",
|
|
@@ -868,7 +868,7 @@ function Zt(t) {
|
|
|
868
868
|
]
|
|
869
869
|
}), n[25] = b.length, n[26] = x);
|
|
870
870
|
let S;
|
|
871
|
-
return 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 ? (S = /* @__PURE__ */
|
|
871
|
+
return 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 ? (S = /* @__PURE__ */ Y(c, {
|
|
872
872
|
className: u,
|
|
873
873
|
style: d,
|
|
874
874
|
tabIndex: f,
|
|
@@ -886,7 +886,7 @@ function Zt(t) {
|
|
|
886
886
|
}
|
|
887
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:
|
|
889
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (a = { compare: _e }, n[0] = a) : a = n[0];
|
|
890
890
|
let o = j(r.store, $t, a);
|
|
891
891
|
if (o.length === 0) return i.groupColumnLabel;
|
|
892
892
|
let s;
|
|
@@ -916,9 +916,9 @@ function en(e = "Group") {
|
|
|
916
916
|
enableGlobalFilter: !1,
|
|
917
917
|
enableHiding: !1,
|
|
918
918
|
enablePinning: !1,
|
|
919
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
920
|
-
aggregatedCell: ({ row: e }) => /* @__PURE__ */
|
|
921
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
919
|
+
cell: ({ row: e }) => /* @__PURE__ */ J(Zt, { row: e }),
|
|
920
|
+
aggregatedCell: ({ row: e }) => /* @__PURE__ */ J(Zt, { row: e }),
|
|
921
|
+
header: ({ table: e }) => /* @__PURE__ */ J(Qt, { table: e })
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
924
|
//#endregion
|
|
@@ -1017,7 +1017,7 @@ function ln(t) {
|
|
|
1017
1017
|
let c = j(r.store, s), l = i.selectAllRows, u = c && !o, d;
|
|
1018
1018
|
n[4] === r ? d = n[5] : (d = r.getToggleAllRowsSelectedHandler(), n[4] = r, n[5] = d);
|
|
1019
1019
|
let p;
|
|
1020
|
-
return n[6] !== o || n[7] !== i.selectAllRows || n[8] !== u || n[9] !== d ? (p = /* @__PURE__ */
|
|
1020
|
+
return n[6] !== o || n[7] !== i.selectAllRows || n[8] !== u || n[9] !== d ? (p = /* @__PURE__ */ J(f, {
|
|
1021
1021
|
size: "xs",
|
|
1022
1022
|
"aria-label": l,
|
|
1023
1023
|
"data-dg-part": "select-all",
|
|
@@ -1030,7 +1030,7 @@ 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__ */
|
|
1033
|
+
return n[0] === r ? a = n[1] : (a = /* @__PURE__ */ J(ln, { table: r }), n[0] = r, n[1] = a), a;
|
|
1034
1034
|
}
|
|
1035
1035
|
function dn(t) {
|
|
1036
1036
|
let n = e(21), { row: r } = t, { ui: i, features: a, labels: o } = Q(), s = $e(), c = r.subRows.length > 0, l;
|
|
@@ -1057,7 +1057,7 @@ function dn(t) {
|
|
|
1057
1057
|
r.table.setRowSelection(o.selection), i.actions.setSelectionAnchor(o.anchorRowId);
|
|
1058
1058
|
}, n[7] = a, n[8] = r.id, n[9] = r.table, n[10] = i.actions, n[11] = i.state.selectionAnchorRowId, n[12] = y) : y = n[12];
|
|
1059
1059
|
let b;
|
|
1060
|
-
return n[13] !== r.id || n[14] !== u || n[15] !== g || n[16] !== _ || n[17] !== v || n[18] !== y || n[19] !== s ? (b = /* @__PURE__ */
|
|
1060
|
+
return n[13] !== r.id || n[14] !== u || n[15] !== g || n[16] !== _ || n[17] !== v || n[18] !== y || n[19] !== s ? (b = /* @__PURE__ */ J(f, {
|
|
1061
1061
|
size: "xs",
|
|
1062
1062
|
tabIndex: s,
|
|
1063
1063
|
"aria-label": g,
|
|
@@ -1090,9 +1090,9 @@ function pn(e = "Checkbox selection") {
|
|
|
1090
1090
|
enableGlobalFilter: !1,
|
|
1091
1091
|
enableHiding: !1,
|
|
1092
1092
|
enablePinning: !1,
|
|
1093
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
1094
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
1095
|
-
aggregatedCell: ({ row: e }) => /* @__PURE__ */
|
|
1093
|
+
header: ({ table: e }) => /* @__PURE__ */ J(un, { table: e }),
|
|
1094
|
+
cell: ({ row: e }) => /* @__PURE__ */ J(dn, { row: e }),
|
|
1095
|
+
aggregatedCell: ({ row: e }) => /* @__PURE__ */ J(dn, { row: e })
|
|
1096
1096
|
};
|
|
1097
1097
|
}
|
|
1098
1098
|
//#endregion
|
|
@@ -1150,12 +1150,12 @@ function wn() {
|
|
|
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;
|
|
1153
|
-
t[20] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */
|
|
1153
|
+
t[20] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ J(ce, {
|
|
1154
1154
|
size: 16,
|
|
1155
1155
|
stroke: 1.6
|
|
1156
|
-
}), t[20] = d) : d = t[20], t[21] !== i || t[22] !== r.columnsSearchPlaceholder || t[23] !== o ? (C = /* @__PURE__ */
|
|
1156
|
+
}), t[20] = d) : d = t[20], t[21] !== i || t[22] !== r.columnsSearchPlaceholder || t[23] !== o ? (C = /* @__PURE__ */ J("div", {
|
|
1157
1157
|
className: Xe.columnsPanelSearch,
|
|
1158
|
-
children: /* @__PURE__ */
|
|
1158
|
+
children: /* @__PURE__ */ J(D, {
|
|
1159
1159
|
value: o,
|
|
1160
1160
|
onChange: c,
|
|
1161
1161
|
placeholder: r.columnsSearchPlaceholder,
|
|
@@ -1166,7 +1166,7 @@ function wn() {
|
|
|
1166
1166
|
})
|
|
1167
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
|
-
t[25] !== l || t[26] !== i ? (T = (e) => /* @__PURE__ */
|
|
1169
|
+
t[25] !== l || t[26] !== i ? (T = (e) => /* @__PURE__ */ J(f, {
|
|
1170
1170
|
size: i,
|
|
1171
1171
|
label: mn(e),
|
|
1172
1172
|
"data-dg-part": "columns-toggle",
|
|
@@ -1176,19 +1176,19 @@ function wn() {
|
|
|
1176
1176
|
}, e.id), t[25] = l, t[26] = i, t[27] = T) : T = t[27], _ = w.map(T), t[0] = l, t[1] = i, t[2] = r.columnsSearchPlaceholder, t[3] = o, t[4] = n, t[5] = u, t[6] = p, t[7] = m, t[8] = h, t[9] = g, t[10] = _, t[11] = v, t[12] = y, t[13] = b, t[14] = x, t[15] = C, t[16] = w;
|
|
1177
1177
|
} else u = t[5], p = t[6], m = t[7], h = t[8], g = t[9], _ = t[10], v = t[11], y = t[12], b = t[13], x = t[14], C = t[15], w = t[16];
|
|
1178
1178
|
let T;
|
|
1179
|
-
t[28] !== i || t[29] !== r || t[30] !== o || t[31] !== w.length ? (T = w.length === 0 && /* @__PURE__ */
|
|
1179
|
+
t[28] !== i || t[29] !== r || t[30] !== o || t[31] !== w.length ? (T = w.length === 0 && /* @__PURE__ */ J(E, {
|
|
1180
1180
|
span: !0,
|
|
1181
1181
|
size: i,
|
|
1182
1182
|
c: "dimmed",
|
|
1183
1183
|
children: r.columnsNoMatch(o)
|
|
1184
1184
|
}), t[28] = i, t[29] = r, t[30] = o, t[31] = w.length, t[32] = T) : T = t[32];
|
|
1185
1185
|
let k;
|
|
1186
|
-
t[33] !== g || t[34] !== _ || t[35] !== T ? (k = /* @__PURE__ */
|
|
1186
|
+
t[33] !== g || t[34] !== _ || t[35] !== T ? (k = /* @__PURE__ */ Y("div", {
|
|
1187
1187
|
className: g,
|
|
1188
1188
|
children: [_, T]
|
|
1189
1189
|
}), t[33] = g, t[34] = _, t[35] = T, t[36] = k) : k = t[36];
|
|
1190
1190
|
let A;
|
|
1191
|
-
t[37] !== u || t[38] !== v || t[39] !== y || t[40] !== k ? (A = /* @__PURE__ */
|
|
1191
|
+
t[37] !== u || t[38] !== v || t[39] !== y || t[40] !== k ? (A = /* @__PURE__ */ J(u, {
|
|
1192
1192
|
mah: v,
|
|
1193
1193
|
type: y,
|
|
1194
1194
|
children: k
|
|
@@ -1196,7 +1196,7 @@ function wn() {
|
|
|
1196
1196
|
let M = h === p.length, N = h > 0 && h < p.length, P;
|
|
1197
1197
|
t[42] === m ? P = t[43] : (P = (e) => m(e.currentTarget.checked), t[42] = m, t[43] = P);
|
|
1198
1198
|
let F;
|
|
1199
|
-
t[44] !== i || t[45] !== r.columnsShowHideAll || t[46] !== M || t[47] !== N || t[48] !== P ? (F = /* @__PURE__ */
|
|
1199
|
+
t[44] !== i || t[45] !== r.columnsShowHideAll || t[46] !== M || t[47] !== N || t[48] !== P ? (F = /* @__PURE__ */ J(f, {
|
|
1200
1200
|
size: i,
|
|
1201
1201
|
label: r.columnsShowHideAll,
|
|
1202
1202
|
"data-dg-part": "columns-toggle-all",
|
|
@@ -1207,7 +1207,7 @@ function wn() {
|
|
|
1207
1207
|
let I;
|
|
1208
1208
|
t[50] === a ? I = t[51] : (I = () => a(), t[50] = a, t[51] = I);
|
|
1209
1209
|
let L;
|
|
1210
|
-
t[52] !== r.columnsReset || t[53] !== I ? (L = /* @__PURE__ */
|
|
1210
|
+
t[52] !== r.columnsReset || t[53] !== I ? (L = /* @__PURE__ */ J(d, {
|
|
1211
1211
|
variant: "subtle",
|
|
1212
1212
|
size: "compact-sm",
|
|
1213
1213
|
"data-dg-part": "columns-reset",
|
|
@@ -1215,18 +1215,18 @@ function wn() {
|
|
|
1215
1215
|
children: r.columnsReset
|
|
1216
1216
|
}), t[52] = r.columnsReset, t[53] = I, t[54] = L) : L = t[54];
|
|
1217
1217
|
let R;
|
|
1218
|
-
t[55] !== r.columnsResetHint || t[56] !== L ? (R = /* @__PURE__ */
|
|
1218
|
+
t[55] !== r.columnsResetHint || t[56] !== L ? (R = /* @__PURE__ */ J(O, {
|
|
1219
1219
|
label: r.columnsResetHint,
|
|
1220
1220
|
withArrow: !0,
|
|
1221
1221
|
children: L
|
|
1222
1222
|
}), t[55] = r.columnsResetHint, t[56] = L, t[57] = R) : R = t[57];
|
|
1223
1223
|
let z;
|
|
1224
|
-
t[58] !== F || t[59] !== R ? (z = /* @__PURE__ */
|
|
1224
|
+
t[58] !== F || t[59] !== R ? (z = /* @__PURE__ */ Y("div", {
|
|
1225
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;
|
|
1229
|
-
return t[61] !== z || t[62] !== b || t[63] !== x || t[64] !== C || t[65] !== A ? (B = /* @__PURE__ */
|
|
1229
|
+
return t[61] !== z || t[62] !== b || t[63] !== x || t[64] !== C || t[65] !== A ? (B = /* @__PURE__ */ Y("div", {
|
|
1230
1230
|
"data-dg-part": b,
|
|
1231
1231
|
className: x,
|
|
1232
1232
|
children: [
|
|
@@ -1267,7 +1267,7 @@ function Mn() {
|
|
|
1267
1267
|
let c;
|
|
1268
1268
|
t[2] !== i || t[3] !== r ? (c = r.saveAllEdits(i), t[2] = i, t[3] = r, t[4] = c) : c = t[4];
|
|
1269
1269
|
let l;
|
|
1270
|
-
return t[5] !== i || t[6] !== a || t[7] !== o || t[8] !== s || t[9] !== c ? (l = /* @__PURE__ */
|
|
1270
|
+
return t[5] !== i || t[6] !== a || t[7] !== o || t[8] !== s || t[9] !== c ? (l = /* @__PURE__ */ J(d, {
|
|
1271
1271
|
size: "compact-sm",
|
|
1272
1272
|
disabled: o,
|
|
1273
1273
|
loading: a,
|
|
@@ -1286,7 +1286,7 @@ function Pn() {
|
|
|
1286
1286
|
let i;
|
|
1287
1287
|
t[0] !== n || t[1] !== r ? (i = n.editRowsStillOpen(r), t[0] = n, t[1] = r, t[2] = i) : i = t[2];
|
|
1288
1288
|
let a;
|
|
1289
|
-
return t[3] !== r || t[4] !== i ? (a = /* @__PURE__ */
|
|
1289
|
+
return t[3] !== r || t[4] !== i ? (a = /* @__PURE__ */ J(E, {
|
|
1290
1290
|
size: "xs",
|
|
1291
1291
|
c: "dimmed",
|
|
1292
1292
|
"data-dg-part": "open-rows-note",
|
|
@@ -1298,7 +1298,7 @@ function Fn() {
|
|
|
1298
1298
|
let t = e(6), { edit: n, labels: r } = Q(), i = Dn() + An() === 0, a;
|
|
1299
1299
|
t[0] === n ? a = t[1] : (a = () => n.cancelAll(), t[0] = n, t[1] = a);
|
|
1300
1300
|
let o;
|
|
1301
|
-
return t[2] !== r.discardAllEdits || t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */
|
|
1301
|
+
return t[2] !== r.discardAllEdits || t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ J(d, {
|
|
1302
1302
|
variant: "subtle",
|
|
1303
1303
|
color: "gray",
|
|
1304
1304
|
size: "compact-sm",
|
|
@@ -1334,13 +1334,13 @@ function Ln(t) {
|
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
1336
1336
|
let l;
|
|
1337
|
-
return n[4] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */
|
|
1337
|
+
return n[4] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Y(p, {
|
|
1338
1338
|
gap: "xs",
|
|
1339
1339
|
wrap: "nowrap",
|
|
1340
1340
|
children: [
|
|
1341
|
-
/* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ J(Pn, {}),
|
|
1342
|
+
/* @__PURE__ */ J(Mn, {}),
|
|
1343
|
+
/* @__PURE__ */ J(Fn, {})
|
|
1344
1344
|
]
|
|
1345
1345
|
}), n[4] = l) : l = n[4], l;
|
|
1346
1346
|
}
|
|
@@ -1404,7 +1404,7 @@ function Un(t) {
|
|
|
1404
1404
|
let t = e, r;
|
|
1405
1405
|
n[4] !== o || n[5] !== t[1] ? (r = (e) => o([e.currentTarget.value, t[1]]), n[4] = o, n[5] = t[1], n[6] = r) : r = n[6];
|
|
1406
1406
|
let i;
|
|
1407
|
-
n[7] !== h || n[8] !== l.filterFrom || n[9] !== t[0] || n[10] !== c || n[11] !== r ? (i = /* @__PURE__ */
|
|
1407
|
+
n[7] !== h || n[8] !== l.filterFrom || n[9] !== t[0] || n[10] !== c || n[11] !== r ? (i = /* @__PURE__ */ J(D, {
|
|
1408
1408
|
label: l.filterFrom,
|
|
1409
1409
|
size: c,
|
|
1410
1410
|
w: 88,
|
|
@@ -1416,7 +1416,7 @@ function Un(t) {
|
|
|
1416
1416
|
let s;
|
|
1417
1417
|
n[13] !== o || n[14] !== t[0] ? (s = (e) => o([t[0], e.currentTarget.value]), n[13] = o, n[14] = t[0], n[15] = s) : s = n[15];
|
|
1418
1418
|
let u;
|
|
1419
|
-
n[16] !== h || n[17] !== l.filterTo || n[18] !== t[1] || n[19] !== c || n[20] !== s ? (u = /* @__PURE__ */
|
|
1419
|
+
n[16] !== h || n[17] !== l.filterTo || n[18] !== t[1] || n[19] !== c || n[20] !== s ? (u = /* @__PURE__ */ J(D, {
|
|
1420
1420
|
label: l.filterTo,
|
|
1421
1421
|
size: c,
|
|
1422
1422
|
w: 88,
|
|
@@ -1426,7 +1426,7 @@ function Un(t) {
|
|
|
1426
1426
|
onChange: s
|
|
1427
1427
|
}), n[16] = h, n[17] = l.filterTo, n[18] = t[1], n[19] = c, n[20] = s, n[21] = u) : u = n[21];
|
|
1428
1428
|
let d;
|
|
1429
|
-
return n[22] !== i || n[23] !== u ? (d = /* @__PURE__ */
|
|
1429
|
+
return n[22] !== i || n[23] !== u ? (d = /* @__PURE__ */ Y(p, {
|
|
1430
1430
|
gap: 4,
|
|
1431
1431
|
wrap: "nowrap",
|
|
1432
1432
|
align: "flex-start",
|
|
@@ -1441,7 +1441,7 @@ function Un(t) {
|
|
|
1441
1441
|
let i;
|
|
1442
1442
|
n[28] === a ? i = n[29] : (i = Array.isArray(a) ? [...a] : [], n[28] = a, n[29] = i);
|
|
1443
1443
|
let u;
|
|
1444
|
-
return n[30] !== l.filterValue || n[31] !== o || n[32] !== c || n[33] !== r || n[34] !== i ? (u = /* @__PURE__ */
|
|
1444
|
+
return n[30] !== l.filterValue || n[31] !== o || n[32] !== c || n[33] !== r || n[34] !== i ? (u = /* @__PURE__ */ J(_, {
|
|
1445
1445
|
label: e,
|
|
1446
1446
|
size: c,
|
|
1447
1447
|
w: 180,
|
|
@@ -1471,7 +1471,7 @@ function Un(t) {
|
|
|
1471
1471
|
let u = f && m !== "" ? m : null, d;
|
|
1472
1472
|
n[44] === o ? d = n[45] : (d = (e) => o(e ?? ""), n[44] = o, n[45] = d);
|
|
1473
1473
|
let p;
|
|
1474
|
-
return n[46] !== l.filterValue || n[47] !== c || n[48] !== t || n[49] !== r || n[50] !== s || n[51] !== u || n[52] !== d ? (p = /* @__PURE__ */
|
|
1474
|
+
return n[46] !== l.filterValue || n[47] !== c || n[48] !== t || n[49] !== r || n[50] !== s || n[51] !== u || n[52] !== d ? (p = /* @__PURE__ */ J(w, {
|
|
1475
1475
|
label: l.filterValue,
|
|
1476
1476
|
size: c,
|
|
1477
1477
|
w: 180,
|
|
@@ -1488,7 +1488,7 @@ function Un(t) {
|
|
|
1488
1488
|
let g = f ? h : "text", v = !f, y = f ? l.filterValuePlaceholder : "", b = f ? m : "", x;
|
|
1489
1489
|
n[54] === o ? x = n[55] : (x = (e) => o(e.currentTarget.value), n[54] = o, n[55] = x);
|
|
1490
1490
|
let S;
|
|
1491
|
-
return n[56] !== l.filterValue || n[57] !== c || n[58] !== g || n[59] !== v || n[60] !== y || n[61] !== b || n[62] !== x ? (S = /* @__PURE__ */
|
|
1491
|
+
return n[56] !== l.filterValue || n[57] !== c || n[58] !== g || n[59] !== v || n[60] !== y || n[61] !== b || n[62] !== x ? (S = /* @__PURE__ */ J(D, {
|
|
1492
1492
|
label: l.filterValue,
|
|
1493
1493
|
size: c,
|
|
1494
1494
|
w: 180,
|
|
@@ -1579,19 +1579,19 @@ function qn() {
|
|
|
1579
1579
|
e.key === "Escape" && (e.stopPropagation(), r.actions.closeFilterPanel());
|
|
1580
1580
|
}, t[26] = r.actions, t[27] = k);
|
|
1581
1581
|
let A;
|
|
1582
|
-
t[28] !== o || t[29] !== a.filters ? (A = /* @__PURE__ */
|
|
1582
|
+
t[28] !== o || t[29] !== a.filters ? (A = /* @__PURE__ */ J(E, {
|
|
1583
1583
|
span: !0,
|
|
1584
1584
|
size: o,
|
|
1585
1585
|
fw: 600,
|
|
1586
1586
|
children: a.filters
|
|
1587
1587
|
}), t[28] = o, t[29] = a.filters, t[30] = A) : A = t[30];
|
|
1588
1588
|
let M;
|
|
1589
|
-
t[31] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */
|
|
1589
|
+
t[31] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ J(le, {
|
|
1590
1590
|
size: 16,
|
|
1591
1591
|
stroke: 1.6
|
|
1592
1592
|
}), t[31] = M) : M = t[31];
|
|
1593
1593
|
let N;
|
|
1594
|
-
t[32] !== a.closeFilters || t[33] !== r.actions.closeFilterPanel ? (N = /* @__PURE__ */
|
|
1594
|
+
t[32] !== a.closeFilters || t[33] !== r.actions.closeFilterPanel ? (N = /* @__PURE__ */ J(l, {
|
|
1595
1595
|
variant: "subtle",
|
|
1596
1596
|
color: "gray",
|
|
1597
1597
|
size: "sm",
|
|
@@ -1601,7 +1601,7 @@ function qn() {
|
|
|
1601
1601
|
children: M
|
|
1602
1602
|
}), t[32] = a.closeFilters, t[33] = r.actions.closeFilterPanel, t[34] = N) : N = t[34];
|
|
1603
1603
|
let P;
|
|
1604
|
-
t[35] !== A || t[36] !== N ? (P = /* @__PURE__ */
|
|
1604
|
+
t[35] !== A || t[36] !== N ? (P = /* @__PURE__ */ Y("div", {
|
|
1605
1605
|
className: zn.filterPanelHeader,
|
|
1606
1606
|
children: [A, N]
|
|
1607
1607
|
}), t[35] = A, t[36] = N, t[37] = P) : P = t[37];
|
|
@@ -1614,24 +1614,24 @@ function qn() {
|
|
|
1614
1614
|
column: t,
|
|
1615
1615
|
fallback: "faceted"
|
|
1616
1616
|
}) : [], d = (t === void 0 ? void 0 : _n(t)) ?? Un;
|
|
1617
|
-
return /* @__PURE__ */
|
|
1617
|
+
return /* @__PURE__ */ Y("div", {
|
|
1618
1618
|
"data-dg-part": "filter-row",
|
|
1619
1619
|
"data-column-id": e.id,
|
|
1620
1620
|
className: zn.filterRow,
|
|
1621
1621
|
children: [
|
|
1622
|
-
/* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ J(l, {
|
|
1623
1623
|
variant: "subtle",
|
|
1624
1624
|
color: "gray",
|
|
1625
1625
|
size: "lg",
|
|
1626
1626
|
"aria-label": a.removeFilter,
|
|
1627
1627
|
"data-dg-part": "filter-remove",
|
|
1628
1628
|
onClick: () => x(e.id),
|
|
1629
|
-
children: /* @__PURE__ */
|
|
1629
|
+
children: /* @__PURE__ */ J(le, {
|
|
1630
1630
|
size: 18,
|
|
1631
1631
|
stroke: 1.6
|
|
1632
1632
|
})
|
|
1633
1633
|
}),
|
|
1634
|
-
/* @__PURE__ */
|
|
1634
|
+
/* @__PURE__ */ J(w, {
|
|
1635
1635
|
label: a.filterColumn,
|
|
1636
1636
|
size: o,
|
|
1637
1637
|
w: 160,
|
|
@@ -1642,7 +1642,7 @@ function qn() {
|
|
|
1642
1642
|
value: e.id,
|
|
1643
1643
|
onChange: (t) => t && g(e.id, t)
|
|
1644
1644
|
}),
|
|
1645
|
-
/* @__PURE__ */
|
|
1645
|
+
/* @__PURE__ */ J(w, {
|
|
1646
1646
|
label: a.filterOperator,
|
|
1647
1647
|
size: o,
|
|
1648
1648
|
w: 170,
|
|
@@ -1656,7 +1656,7 @@ function qn() {
|
|
|
1656
1656
|
value: r.operator,
|
|
1657
1657
|
onChange: (t) => t && _(e.id, t)
|
|
1658
1658
|
}),
|
|
1659
|
-
t ? /* @__PURE__ */
|
|
1659
|
+
t ? /* @__PURE__ */ J(d, {
|
|
1660
1660
|
column: t,
|
|
1661
1661
|
table: n,
|
|
1662
1662
|
operator: r.operator,
|
|
@@ -1665,7 +1665,7 @@ function qn() {
|
|
|
1665
1665
|
options: u,
|
|
1666
1666
|
size: o,
|
|
1667
1667
|
labels: a
|
|
1668
|
-
}) : /* @__PURE__ */
|
|
1668
|
+
}) : /* @__PURE__ */ J(D, {
|
|
1669
1669
|
label: a.filterValue,
|
|
1670
1670
|
size: o,
|
|
1671
1671
|
w: 180,
|
|
@@ -1680,7 +1680,7 @@ function qn() {
|
|
|
1680
1680
|
}, t[48] = g, t[49] = _, t[50] = y, t[51] = o, t[52] = a, t[53] = b, t[54] = x, t[55] = n, t[56] = e) : e = t[56], F = u.map(e), 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, t[47] = F;
|
|
1681
1681
|
} else F = t[47];
|
|
1682
1682
|
let I = !C, L;
|
|
1683
|
-
t[57] !== h || t[58] !== a.addFilter || t[59] !== I ? (L = /* @__PURE__ */
|
|
1683
|
+
t[57] !== h || t[58] !== a.addFilter || t[59] !== I ? (L = /* @__PURE__ */ J(d, {
|
|
1684
1684
|
variant: "subtle",
|
|
1685
1685
|
size: "compact-sm",
|
|
1686
1686
|
disabled: I,
|
|
@@ -1689,7 +1689,7 @@ function qn() {
|
|
|
1689
1689
|
children: a.addFilter
|
|
1690
1690
|
}), t[57] = h, t[58] = a.addFilter, t[59] = I, t[60] = L) : L = t[60];
|
|
1691
1691
|
let R = u.length === 0, z;
|
|
1692
|
-
t[61] !== v || t[62] !== a.clearAllFilters || t[63] !== R ? (z = /* @__PURE__ */
|
|
1692
|
+
t[61] !== v || t[62] !== a.clearAllFilters || t[63] !== R ? (z = /* @__PURE__ */ J(d, {
|
|
1693
1693
|
variant: "subtle",
|
|
1694
1694
|
color: "gray",
|
|
1695
1695
|
size: "compact-sm",
|
|
@@ -1699,17 +1699,17 @@ function qn() {
|
|
|
1699
1699
|
children: a.clearAllFilters
|
|
1700
1700
|
}), t[61] = v, t[62] = a.clearAllFilters, t[63] = R, t[64] = z) : z = t[64];
|
|
1701
1701
|
let B;
|
|
1702
|
-
t[65] !== L || t[66] !== z ? (B = /* @__PURE__ */
|
|
1702
|
+
t[65] !== L || t[66] !== z ? (B = /* @__PURE__ */ Y("div", {
|
|
1703
1703
|
className: zn.filterPanelFooter,
|
|
1704
1704
|
children: [L, z]
|
|
1705
1705
|
}), t[65] = L, t[66] = z, t[67] = B) : B = t[67];
|
|
1706
1706
|
let V;
|
|
1707
|
-
t[68] !== B || t[69] !== F ? (V = /* @__PURE__ */
|
|
1707
|
+
t[68] !== B || t[69] !== F ? (V = /* @__PURE__ */ Y(T, {
|
|
1708
1708
|
gap: "xs",
|
|
1709
1709
|
children: [F, B]
|
|
1710
1710
|
}), t[68] = B, t[69] = F, t[70] = V) : V = t[70];
|
|
1711
1711
|
let H;
|
|
1712
|
-
return t[71] !== a.filters || t[72] !== V || t[73] !== k || t[74] !== P ? (H = /* @__PURE__ */
|
|
1712
|
+
return t[71] !== a.filters || t[72] !== V || t[73] !== k || t[74] !== P ? (H = /* @__PURE__ */ Y("div", {
|
|
1713
1713
|
ref: f,
|
|
1714
1714
|
role: "group",
|
|
1715
1715
|
"aria-label": O,
|
|
@@ -1746,13 +1746,16 @@ var Qn = {
|
|
|
1746
1746
|
newRows: [],
|
|
1747
1747
|
deletedRowIds: []
|
|
1748
1748
|
};
|
|
1749
|
-
function er(e) {
|
|
1749
|
+
function er(e, t) {
|
|
1750
|
+
return e === void 0 ? !0 : typeof e == "boolean" ? e : e[t] !== !1;
|
|
1751
|
+
}
|
|
1752
|
+
function tr(e) {
|
|
1750
1753
|
let t = e.columnDef.meta?.edit?.field;
|
|
1751
1754
|
if (t) return t;
|
|
1752
1755
|
let n = e.columnDef.accessorKey;
|
|
1753
1756
|
return typeof n == "string" ? n : null;
|
|
1754
1757
|
}
|
|
1755
|
-
function
|
|
1758
|
+
function nr(e) {
|
|
1756
1759
|
switch (e) {
|
|
1757
1760
|
case "string": return "";
|
|
1758
1761
|
case "multiSelect": return [];
|
|
@@ -1760,7 +1763,7 @@ function tr(e) {
|
|
|
1760
1763
|
default: return null;
|
|
1761
1764
|
}
|
|
1762
1765
|
}
|
|
1763
|
-
function
|
|
1766
|
+
function rr(e) {
|
|
1764
1767
|
let t = e.state.fieldMeta;
|
|
1765
1768
|
for (let [n, r] of Object.entries(t)) {
|
|
1766
1769
|
let t = Object.entries(r.errorSourceMap ?? {}).filter(([, e]) => e === "form").map(([e]) => e);
|
|
@@ -1773,22 +1776,22 @@ function nr(e) {
|
|
|
1773
1776
|
}));
|
|
1774
1777
|
}
|
|
1775
1778
|
}
|
|
1776
|
-
function
|
|
1779
|
+
function ir(e, t) {
|
|
1777
1780
|
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();
|
|
1778
1781
|
}
|
|
1779
|
-
function
|
|
1782
|
+
function ar(e) {
|
|
1780
1783
|
return e.some((e) => e != null);
|
|
1781
1784
|
}
|
|
1782
|
-
var
|
|
1785
|
+
var or = [
|
|
1783
1786
|
"onChange",
|
|
1784
1787
|
"onChangeAsync",
|
|
1785
1788
|
"onSubmit",
|
|
1786
1789
|
"onSubmitAsync"
|
|
1787
1790
|
];
|
|
1788
|
-
function
|
|
1791
|
+
function sr(e) {
|
|
1789
1792
|
return e != null && e !== !1;
|
|
1790
1793
|
}
|
|
1791
|
-
async function
|
|
1794
|
+
async function cr(e, t) {
|
|
1792
1795
|
if (typeof e == "function") return await e({
|
|
1793
1796
|
value: t,
|
|
1794
1797
|
fieldApi: void 0
|
|
@@ -1798,21 +1801,21 @@ async function sr(e, t) {
|
|
|
1798
1801
|
return n === void 0 || n.length === 0 ? void 0 : n[0]?.message ?? "Invalid";
|
|
1799
1802
|
}
|
|
1800
1803
|
}
|
|
1801
|
-
function
|
|
1802
|
-
let t = new
|
|
1804
|
+
function lr(e) {
|
|
1805
|
+
let t = new he($n), n = /* @__PURE__ */ new Map(), r = 0, i = !1, a = null, o = null, s = () => e().table.getAllLeafColumns().filter((e) => !xn(e.id) && !vn(e) && tr(e) !== null), c = async (e, t, n) => {
|
|
1803
1806
|
let r = n ? void 0 : b(t), i = {};
|
|
1804
1807
|
for (let t of s()) {
|
|
1805
1808
|
if (r !== void 0 && !yn(t, r)) continue;
|
|
1806
|
-
let n =
|
|
1809
|
+
let n = tr(t);
|
|
1807
1810
|
if (n === null) continue;
|
|
1808
|
-
let a =
|
|
1811
|
+
let a = ur(t.columnDef.meta?.edit?.validate);
|
|
1809
1812
|
if (a === void 0) continue;
|
|
1810
|
-
let o =
|
|
1811
|
-
for (let e of
|
|
1813
|
+
let o = pe(e, n);
|
|
1814
|
+
for (let e of or) {
|
|
1812
1815
|
let t = a[e];
|
|
1813
1816
|
if (t === void 0) continue;
|
|
1814
|
-
let r = await
|
|
1815
|
-
if (
|
|
1817
|
+
let r = await cr(t, o);
|
|
1818
|
+
if (sr(r)) {
|
|
1816
1819
|
i[n] = r;
|
|
1817
1820
|
break;
|
|
1818
1821
|
}
|
|
@@ -1826,7 +1829,7 @@ function cr(e) {
|
|
|
1826
1829
|
onSubmitAsync: async (e) => {
|
|
1827
1830
|
let r = i === void 0 ? void 0 : await i(e), a = await c(e.value, t, n);
|
|
1828
1831
|
if (a === void 0) return r;
|
|
1829
|
-
if (!
|
|
1832
|
+
if (!sr(r)) return { fields: a };
|
|
1830
1833
|
if (typeof r == "object" && r) {
|
|
1831
1834
|
let e = r;
|
|
1832
1835
|
return {
|
|
@@ -1846,10 +1849,10 @@ function cr(e) {
|
|
|
1846
1849
|
}, u = (e, t) => {
|
|
1847
1850
|
let n = [];
|
|
1848
1851
|
for (let r of s()) {
|
|
1849
|
-
let i =
|
|
1852
|
+
let i = tr(r);
|
|
1850
1853
|
if (i === null) continue;
|
|
1851
|
-
let a =
|
|
1852
|
-
|
|
1854
|
+
let a = pe(e.original, i), o = pe(t, i);
|
|
1855
|
+
ir(a, o) || n.push({
|
|
1853
1856
|
columnId: r.id,
|
|
1854
1857
|
field: i,
|
|
1855
1858
|
previous: a,
|
|
@@ -1858,11 +1861,11 @@ function cr(e) {
|
|
|
1858
1861
|
}
|
|
1859
1862
|
return n;
|
|
1860
1863
|
}, d = (e) => {
|
|
1861
|
-
let t = e.form.state, n = Object.entries(t.fieldMeta).filter(([e, t]) => e !== "" &&
|
|
1864
|
+
let t = e.form.state, n = Object.entries(t.fieldMeta).filter(([e, t]) => e !== "" && ar(t.errors)).map(([e]) => e);
|
|
1862
1865
|
return {
|
|
1863
1866
|
dirtyFields: u(e, t.values).map((e) => e.field),
|
|
1864
1867
|
errorFields: n,
|
|
1865
|
-
hasRowError:
|
|
1868
|
+
hasRowError: ar(t.errors),
|
|
1866
1869
|
isSubmitting: t.isSubmitting,
|
|
1867
1870
|
values: t.values
|
|
1868
1871
|
};
|
|
@@ -1921,7 +1924,7 @@ function cr(e) {
|
|
|
1921
1924
|
pendingCommit: null,
|
|
1922
1925
|
unsubscribe: () => {},
|
|
1923
1926
|
unmount: () => {},
|
|
1924
|
-
form: new
|
|
1927
|
+
form: new fe({
|
|
1925
1928
|
defaultValues: r,
|
|
1926
1929
|
validators: l(t, i),
|
|
1927
1930
|
onSubmit: async ({ value: n }) => {
|
|
@@ -1973,7 +1976,7 @@ function cr(e) {
|
|
|
1973
1976
|
return s.unsubscribe = () => c.unsubscribe(), n.set(t, s), f(t), s;
|
|
1974
1977
|
}, v = (t) => !t.getIsGrouped() && e().isRowEditable?.(t) !== !1, y = (t, n) => {
|
|
1975
1978
|
let r = e();
|
|
1976
|
-
return !(t.getIsGrouped() || xn(n.id) ||
|
|
1979
|
+
return !(t.getIsGrouped() || xn(n.id) || tr(n) === null || !yn(n, t) || r.isRowEditable !== void 0 && !r.isRowEditable(t));
|
|
1977
1980
|
}, b = (t) => {
|
|
1978
1981
|
try {
|
|
1979
1982
|
return e().table.getRow(t);
|
|
@@ -1982,7 +1985,7 @@ function cr(e) {
|
|
|
1982
1985
|
}
|
|
1983
1986
|
}, x = async (r) => {
|
|
1984
1987
|
let a = n.get(r);
|
|
1985
|
-
return a === void 0 ? !0 : a.pendingCommit === null ? !a.isNew && u(a, a.form.state.values).length === 0 ? (g(r), !0) : (
|
|
1988
|
+
return a === void 0 ? !0 : a.pendingCommit === null ? !a.isNew && u(a, a.form.state.values).length === 0 ? (g(r), !0) : (rr(a.form), a.lastSubmitOk = !1, a.parkOnly = e().editMode === "draft" && !i, a.pendingCommit = (async () => {
|
|
1986
1989
|
try {
|
|
1987
1990
|
await a.form.handleSubmit();
|
|
1988
1991
|
} finally {
|
|
@@ -2055,7 +2058,7 @@ function cr(e) {
|
|
|
2055
2058
|
};
|
|
2056
2059
|
}, k = async (e, n) => {
|
|
2057
2060
|
let i = [];
|
|
2058
|
-
if (
|
|
2061
|
+
if (ge(() => {
|
|
2059
2062
|
for (let t of e) {
|
|
2060
2063
|
r += 1;
|
|
2061
2064
|
let e = `__new__${r}`;
|
|
@@ -2108,14 +2111,9 @@ function cr(e) {
|
|
|
2108
2111
|
}, N = () => [...n.keys()].filter((e) => n.get(e)?.committed === !0), P = async () => {
|
|
2109
2112
|
let e = [...n.keys()].filter((e) => n.get(e)?.committed !== !0);
|
|
2110
2113
|
return (await Promise.all(e.map((e) => x(e)))).every(Boolean);
|
|
2111
|
-
}, F =
|
|
2112
|
-
i = !
|
|
2113
|
-
|
|
2114
|
-
return await I();
|
|
2115
|
-
} finally {
|
|
2116
|
-
i = !1;
|
|
2117
|
-
}
|
|
2118
|
-
}, I = async () => {
|
|
2114
|
+
}, F = null, I = () => F === null ? (i = !0, F = L().finally(() => {
|
|
2115
|
+
i = !1, F = null;
|
|
2116
|
+
}), F) : F, L = async () => {
|
|
2119
2117
|
let r = N(), i = [...t.state.deletedRowIds];
|
|
2120
2118
|
if (r.length === 0 && i.length === 0) return !0;
|
|
2121
2119
|
if (e().onSaveDrafts === void 0) {
|
|
@@ -2142,21 +2140,26 @@ function cr(e) {
|
|
|
2142
2140
|
}
|
|
2143
2141
|
let u = i;
|
|
2144
2142
|
if (s.length > 0 || c.length > 0 || u.length > 0) {
|
|
2143
|
+
let n;
|
|
2145
2144
|
try {
|
|
2146
|
-
await e().onSaveDrafts?.({
|
|
2145
|
+
n = await e().onSaveDrafts?.({
|
|
2146
|
+
updated: s,
|
|
2147
|
+
created: c,
|
|
2148
|
+
deleted: u,
|
|
2147
2149
|
rows: s,
|
|
2148
|
-
added: c
|
|
2149
|
-
deleted: u
|
|
2150
|
+
added: c
|
|
2150
2151
|
});
|
|
2151
2152
|
} catch {
|
|
2152
2153
|
return !1;
|
|
2153
2154
|
}
|
|
2154
|
-
|
|
2155
|
-
for (let e of
|
|
2156
|
-
|
|
2155
|
+
let r = n ?? {}, i = !0;
|
|
2156
|
+
for (let e of s) er(r.updated, e.rowId) ? g(e.rowId) : i = !1;
|
|
2157
|
+
for (let e of c) er(r.created, e.tempId) ? g(e.tempId) : i = !1;
|
|
2158
|
+
let a = u.filter((e) => er(r.deleted, e));
|
|
2159
|
+
if (a.length > 0 && t.setState((e) => ({
|
|
2157
2160
|
...e,
|
|
2158
|
-
deletedRowIds: e.deletedRowIds.filter((e) => !
|
|
2159
|
-
}));
|
|
2161
|
+
deletedRowIds: e.deletedRowIds.filter((e) => !a.includes(e))
|
|
2162
|
+
})), a.length < u.length && (i = !1), !i) return !1;
|
|
2160
2163
|
}
|
|
2161
2164
|
return l;
|
|
2162
2165
|
};
|
|
@@ -2174,16 +2177,16 @@ function cr(e) {
|
|
|
2174
2177
|
deactivate: T,
|
|
2175
2178
|
cancelAll: E,
|
|
2176
2179
|
commitAll: P,
|
|
2177
|
-
saveDrafts:
|
|
2180
|
+
saveDrafts: I,
|
|
2178
2181
|
submitAll: async () => {
|
|
2179
|
-
let e = await P(), t = await
|
|
2182
|
+
let e = await P(), t = await I();
|
|
2180
2183
|
return e && t;
|
|
2181
2184
|
},
|
|
2182
2185
|
clearCell: async (t, r) => {
|
|
2183
2186
|
let i = e(), a = b(t), o = i.table.getColumn(r);
|
|
2184
2187
|
if (a === void 0 || o === void 0 || !y(a, o)) return !1;
|
|
2185
|
-
let s =
|
|
2186
|
-
return s === null ? !1 : ((n.get(t) ?? _(t, a.original, !1)).form.setFieldValue(s,
|
|
2188
|
+
let s = tr(o);
|
|
2189
|
+
return s === null ? !1 : ((n.get(t) ?? _(t, a.original, !1)).form.setFieldValue(s, nr(o.columnDef.meta?.type ?? "string")), x(t));
|
|
2187
2190
|
},
|
|
2188
2191
|
addRow: D,
|
|
2189
2192
|
addRows: k,
|
|
@@ -2191,38 +2194,38 @@ function cr(e) {
|
|
|
2191
2194
|
canDeleteRows: j
|
|
2192
2195
|
};
|
|
2193
2196
|
}
|
|
2194
|
-
function
|
|
2197
|
+
function ur(e) {
|
|
2195
2198
|
if (e !== void 0) return typeof e == "function" || "~standard" in e ? { onChange: e } : e;
|
|
2196
2199
|
}
|
|
2197
|
-
function
|
|
2200
|
+
function dr(e) {
|
|
2198
2201
|
if (typeof e != "object" || !e) return !1;
|
|
2199
2202
|
let t = e.fuzzyRank;
|
|
2200
2203
|
return typeof t == "object" && !!t && typeof t.rank == "number";
|
|
2201
2204
|
}
|
|
2202
|
-
function
|
|
2205
|
+
function fr(e, t, n, r) {
|
|
2203
2206
|
let i = qe(String(e.getValue(t) ?? ""), String(n));
|
|
2204
2207
|
return r?.({ fuzzyRank: i }), i.passed;
|
|
2205
2208
|
}
|
|
2206
|
-
function
|
|
2209
|
+
function pr(e) {
|
|
2207
2210
|
let t = null, { columnFiltersMeta: n } = e;
|
|
2208
|
-
for (let e of Object.values(n ?? {}))
|
|
2211
|
+
for (let e of Object.values(n ?? {})) dr(e) && (t === null || e.fuzzyRank.rank > t.rank) && (t = e.fuzzyRank);
|
|
2209
2212
|
return t;
|
|
2210
2213
|
}
|
|
2211
|
-
function
|
|
2214
|
+
function mr(e) {
|
|
2212
2215
|
let { globalFilterFn: t } = e.options;
|
|
2213
2216
|
if (t !== "tmDataGridFuzzy") return !1;
|
|
2214
2217
|
let n = e.store.state;
|
|
2215
2218
|
return (n.sorting?.length ?? 0) === 0 && (n.grouping?.length ?? 0) === 0 && typeof n.globalFilter == "string" && n.globalFilter.trim() !== "";
|
|
2216
2219
|
}
|
|
2217
|
-
function
|
|
2220
|
+
function hr() {
|
|
2218
2221
|
let e = Ne();
|
|
2219
2222
|
return (t) => {
|
|
2220
2223
|
let n = e(t), r = null, i = null;
|
|
2221
2224
|
return () => {
|
|
2222
2225
|
let e = n();
|
|
2223
|
-
return
|
|
2226
|
+
return mr(t) ? e === r && i !== null ? i : (i = {
|
|
2224
2227
|
rows: [...e.rows].sort((e, t) => {
|
|
2225
|
-
let n =
|
|
2228
|
+
let n = pr(e), r = pr(t);
|
|
2226
2229
|
return n !== null && r !== null ? Ke(n, r) : n === null ? r === null ? 0 : 1 : -1;
|
|
2227
2230
|
}),
|
|
2228
2231
|
flatRows: e.flatRows,
|
|
@@ -2233,7 +2236,7 @@ function mr() {
|
|
|
2233
2236
|
}
|
|
2234
2237
|
//#endregion
|
|
2235
2238
|
//#region src/tmdatagrid/core/labels.ts
|
|
2236
|
-
var
|
|
2239
|
+
var gr = {
|
|
2237
2240
|
operators: et,
|
|
2238
2241
|
manageColumns: "Manage columns",
|
|
2239
2242
|
filters: "Filters",
|
|
@@ -2324,32 +2327,32 @@ var hr = {
|
|
|
2324
2327
|
expandGroup: (e) => `Expand ${e}`,
|
|
2325
2328
|
collapseGroup: (e) => `Collapse ${e}`
|
|
2326
2329
|
};
|
|
2327
|
-
function
|
|
2330
|
+
function _r(e) {
|
|
2328
2331
|
return e ? {
|
|
2329
|
-
...
|
|
2332
|
+
...gr,
|
|
2330
2333
|
...e,
|
|
2331
2334
|
operators: {
|
|
2332
|
-
...
|
|
2335
|
+
...gr.operators,
|
|
2333
2336
|
...e.operators
|
|
2334
2337
|
}
|
|
2335
|
-
} :
|
|
2338
|
+
} : gr;
|
|
2336
2339
|
}
|
|
2337
2340
|
//#endregion
|
|
2338
2341
|
//#region src/tmdatagrid/core/persistence.ts
|
|
2339
|
-
var
|
|
2342
|
+
var vr = [
|
|
2340
2343
|
"columnFilters",
|
|
2341
2344
|
"globalFilter",
|
|
2342
2345
|
"sorting",
|
|
2343
2346
|
"pagination",
|
|
2344
2347
|
"expanded"
|
|
2345
|
-
],
|
|
2348
|
+
], yr = [
|
|
2346
2349
|
"columnVisibility",
|
|
2347
2350
|
"columnSizing",
|
|
2348
2351
|
"columnOrder",
|
|
2349
2352
|
"columnPinning",
|
|
2350
2353
|
"grouping"
|
|
2351
|
-
],
|
|
2352
|
-
function
|
|
2354
|
+
], br = 1, xr = "__v";
|
|
2355
|
+
function Sr(e, t) {
|
|
2353
2356
|
if (!e) return null;
|
|
2354
2357
|
if (typeof e == "string") return {
|
|
2355
2358
|
key: e,
|
|
@@ -2361,7 +2364,7 @@ function xr(e, t) {
|
|
|
2361
2364
|
slices: r
|
|
2362
2365
|
} : null;
|
|
2363
2366
|
}
|
|
2364
|
-
function
|
|
2367
|
+
function Cr(e) {
|
|
2365
2368
|
if (!e) return null;
|
|
2366
2369
|
try {
|
|
2367
2370
|
return typeof window > "u" ? null : e.storageMode === "sessionStorage" ? window.sessionStorage : window.localStorage;
|
|
@@ -2369,36 +2372,36 @@ function Sr(e) {
|
|
|
2369
2372
|
return null;
|
|
2370
2373
|
}
|
|
2371
2374
|
}
|
|
2372
|
-
function
|
|
2375
|
+
function wr(e, t) {
|
|
2373
2376
|
return typeof e == "object" && e ? e[t] : void 0;
|
|
2374
2377
|
}
|
|
2375
|
-
var
|
|
2376
|
-
function
|
|
2378
|
+
var Tr = (e) => typeof e == "string", Er = (e) => typeof e == "number" && Number.isFinite(e);
|
|
2379
|
+
function Dr(e, t) {
|
|
2377
2380
|
return Array.isArray(e) && e.every(t);
|
|
2378
2381
|
}
|
|
2379
|
-
function
|
|
2382
|
+
function Or(e, t) {
|
|
2380
2383
|
return typeof e != "object" || !e || Array.isArray(e) ? !1 : Object.values(e).every(t);
|
|
2381
2384
|
}
|
|
2382
|
-
var
|
|
2383
|
-
columnFilters: (e) =>
|
|
2385
|
+
var kr = (e) => Tr(wr(e, "id")), Ar = {
|
|
2386
|
+
columnFilters: (e) => Dr(e, kr),
|
|
2384
2387
|
globalFilter: () => !0,
|
|
2385
|
-
sorting: (e) =>
|
|
2388
|
+
sorting: (e) => Dr(e, (e) => kr(e) && typeof wr(e, "desc") == "boolean"),
|
|
2386
2389
|
pagination: (e) => {
|
|
2387
|
-
let t =
|
|
2388
|
-
return
|
|
2390
|
+
let t = wr(e, "pageIndex"), n = wr(e, "pageSize");
|
|
2391
|
+
return Er(t) && t >= 0 && Er(n) && n > 0;
|
|
2389
2392
|
},
|
|
2390
|
-
expanded: (e) => e === !0 ||
|
|
2391
|
-
columnVisibility: (e) =>
|
|
2392
|
-
columnSizing: (e) =>
|
|
2393
|
-
columnOrder: (e) =>
|
|
2394
|
-
columnPinning: (e) =>
|
|
2395
|
-
grouping: (e) =>
|
|
2393
|
+
expanded: (e) => e === !0 || Or(e, (e) => typeof e == "boolean"),
|
|
2394
|
+
columnVisibility: (e) => Or(e, (e) => typeof e == "boolean"),
|
|
2395
|
+
columnSizing: (e) => Or(e, Er),
|
|
2396
|
+
columnOrder: (e) => Dr(e, Tr),
|
|
2397
|
+
columnPinning: (e) => Dr(wr(e, "left"), Tr) && Dr(wr(e, "right"), Tr),
|
|
2398
|
+
grouping: (e) => Dr(e, Tr)
|
|
2396
2399
|
};
|
|
2397
|
-
function
|
|
2398
|
-
let n =
|
|
2400
|
+
function jr(e, t) {
|
|
2401
|
+
let n = Ar[e];
|
|
2399
2402
|
return n === void 0 || n(t);
|
|
2400
2403
|
}
|
|
2401
|
-
function
|
|
2404
|
+
function Mr(e, t, n) {
|
|
2402
2405
|
if (!e || !t) return {};
|
|
2403
2406
|
try {
|
|
2404
2407
|
let r = e.getItem(t.key);
|
|
@@ -2406,39 +2409,39 @@ function jr(e, t, n) {
|
|
|
2406
2409
|
let i = n(r);
|
|
2407
2410
|
if (typeof i != "object" || !i) return {};
|
|
2408
2411
|
let a = i;
|
|
2409
|
-
if (a[
|
|
2412
|
+
if (a[xr] !== 1) return {};
|
|
2410
2413
|
let o = {};
|
|
2411
|
-
for (let e of t.slices) e in a &&
|
|
2414
|
+
for (let e of t.slices) e in a && jr(e, a[e]) && (o[e] = a[e]);
|
|
2412
2415
|
return o;
|
|
2413
2416
|
} catch {
|
|
2414
2417
|
return {};
|
|
2415
2418
|
}
|
|
2416
2419
|
}
|
|
2417
|
-
function
|
|
2420
|
+
function Nr(e, t, n, r) {
|
|
2418
2421
|
if (!e || !t) return;
|
|
2419
|
-
let i = { [
|
|
2422
|
+
let i = { [xr]: 1 };
|
|
2420
2423
|
for (let e of t.slices) i[e] = n[e];
|
|
2421
2424
|
try {
|
|
2422
2425
|
e.setItem(t.key, r(i));
|
|
2423
2426
|
} catch {}
|
|
2424
2427
|
}
|
|
2425
|
-
function
|
|
2428
|
+
function Pr(e) {
|
|
2426
2429
|
return {
|
|
2427
|
-
data:
|
|
2428
|
-
settings:
|
|
2430
|
+
data: Sr(e?.dataKey, vr),
|
|
2431
|
+
settings: Sr(e?.settingsKey, yr)
|
|
2429
2432
|
};
|
|
2430
2433
|
}
|
|
2431
|
-
function
|
|
2432
|
-
let { data: t, settings: n } =
|
|
2434
|
+
function Fr(e) {
|
|
2435
|
+
let { data: t, settings: n } = Pr(e);
|
|
2433
2436
|
return t !== null || n !== null;
|
|
2434
2437
|
}
|
|
2435
|
-
var
|
|
2436
|
-
function
|
|
2438
|
+
var Ir = (e) => JSON.parse(e), Lr = (e) => JSON.stringify(e);
|
|
2439
|
+
function Rr(e, t = []) {
|
|
2437
2440
|
for (let n of e) {
|
|
2438
2441
|
if (typeof n != "object" || !n) continue;
|
|
2439
2442
|
let e = n;
|
|
2440
2443
|
if (Array.isArray(e.columns) && e.columns.length > 0) {
|
|
2441
|
-
|
|
2444
|
+
Rr(e.columns, t);
|
|
2442
2445
|
continue;
|
|
2443
2446
|
}
|
|
2444
2447
|
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);
|
|
@@ -2446,29 +2449,29 @@ function Lr(e, t = []) {
|
|
|
2446
2449
|
}
|
|
2447
2450
|
return t;
|
|
2448
2451
|
}
|
|
2449
|
-
function
|
|
2452
|
+
function zr(e, t) {
|
|
2450
2453
|
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 };
|
|
2451
2454
|
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 = {
|
|
2452
2455
|
left: r(e.columnPinning.left ?? []),
|
|
2453
2456
|
right: r(e.columnPinning.right ?? [])
|
|
2454
2457
|
}), e.sorting && (o.sorting = a(e.sorting)), e.columnFilters && (o.columnFilters = a(e.columnFilters)), o;
|
|
2455
2458
|
}
|
|
2456
|
-
function
|
|
2457
|
-
let n =
|
|
2458
|
-
...
|
|
2459
|
-
...
|
|
2459
|
+
function Br(e, t) {
|
|
2460
|
+
let n = Cr(e), { data: r, settings: i } = Pr(e), a = e?.deserialize ?? Ir, o = {
|
|
2461
|
+
...Mr(n, i, a),
|
|
2462
|
+
...Mr(n, r, a)
|
|
2460
2463
|
};
|
|
2461
|
-
return t === void 0 ? o :
|
|
2464
|
+
return t === void 0 ? o : zr(o, new Set(t));
|
|
2462
2465
|
}
|
|
2463
|
-
function
|
|
2464
|
-
let n =
|
|
2466
|
+
function Vr(e, t) {
|
|
2467
|
+
let n = Cr(t);
|
|
2465
2468
|
if (!n) return;
|
|
2466
|
-
let { data: r, settings: i } =
|
|
2467
|
-
|
|
2469
|
+
let { data: r, settings: i } = Pr(t), a = t?.serialize ?? Lr;
|
|
2470
|
+
Nr(n, r, e, a), Nr(n, i, e, a);
|
|
2468
2471
|
}
|
|
2469
2472
|
//#endregion
|
|
2470
2473
|
//#region src/tmdatagrid/core/capabilities.ts
|
|
2471
|
-
function
|
|
2474
|
+
function Hr(e) {
|
|
2472
2475
|
let t = e.selectionMode ?? "checkbox", n = e.cellSelection ?? (e.editing === void 0 ? "none" : "single"), r = t !== "highlight" && e.enableRowSelection !== !1;
|
|
2473
2476
|
return {
|
|
2474
2477
|
sorting: e.enableSorting !== !1,
|
|
@@ -2498,7 +2501,7 @@ function Vr(e) {
|
|
|
2498
2501
|
matchHighlighting: e.enableMatchHighlighting === !0
|
|
2499
2502
|
};
|
|
2500
2503
|
}
|
|
2501
|
-
function
|
|
2504
|
+
function Ur(e, t) {
|
|
2502
2505
|
return {
|
|
2503
2506
|
canSort: t.sorting && e.getCanSort(),
|
|
2504
2507
|
canFilter: t.filtering && e.getCanFilter(),
|
|
@@ -2509,8 +2512,8 @@ function Hr(e, t) {
|
|
|
2509
2512
|
canGroup: t.grouping && e.getCanGroup()
|
|
2510
2513
|
};
|
|
2511
2514
|
}
|
|
2512
|
-
function
|
|
2513
|
-
let n = e.getAllLeafColumns(), r = (e) => n.some((n) => e(
|
|
2515
|
+
function Wr(e, t) {
|
|
2516
|
+
let n = e.getAllLeafColumns(), r = (e) => n.some((n) => e(Ur(n, t)));
|
|
2514
2517
|
return {
|
|
2515
2518
|
canSortAny: r((e) => e.canSort),
|
|
2516
2519
|
canFilterAny: r((e) => e.canFilter),
|
|
@@ -2525,12 +2528,12 @@ function Ur(e, t) {
|
|
|
2525
2528
|
}
|
|
2526
2529
|
//#endregion
|
|
2527
2530
|
//#region src/tmdatagrid/core/cellNavigation.ts
|
|
2528
|
-
var
|
|
2529
|
-
function
|
|
2531
|
+
var Gr = (e, t) => Math.min(Math.max(e, 0), Math.max(t, 0));
|
|
2532
|
+
function Kr({ key: e, ctrlKey: t, from: n, rowCount: r, columnCount: i, pageRows: a }) {
|
|
2530
2533
|
if (r === 0 || i === 0) return null;
|
|
2531
2534
|
let o = r - 1, s = i - 1, c = (e, t) => ({
|
|
2532
|
-
rowIndex:
|
|
2533
|
-
columnIndex:
|
|
2535
|
+
rowIndex: Gr(e, o),
|
|
2536
|
+
columnIndex: Gr(t, s)
|
|
2534
2537
|
});
|
|
2535
2538
|
switch (e) {
|
|
2536
2539
|
case "ArrowDown": return c(n.rowIndex + 1, n.columnIndex);
|
|
@@ -2544,7 +2547,7 @@ function Gr({ key: e, ctrlKey: t, from: n, rowCount: r, columnCount: i, pageRows
|
|
|
2544
2547
|
default: return null;
|
|
2545
2548
|
}
|
|
2546
2549
|
}
|
|
2547
|
-
function
|
|
2550
|
+
function qr({ from: e, direction: t, rowCount: n, columnCount: r, isEditable: i }) {
|
|
2548
2551
|
let a = n * r;
|
|
2549
2552
|
if (a === 0) return null;
|
|
2550
2553
|
let o = e.rowIndex * r + e.columnIndex;
|
|
@@ -2557,29 +2560,81 @@ function Kr({ from: e, direction: t, rowCount: n, columnCount: r, isEditable: i
|
|
|
2557
2560
|
}
|
|
2558
2561
|
return null;
|
|
2559
2562
|
}
|
|
2560
|
-
function
|
|
2563
|
+
function Jr(e, t) {
|
|
2561
2564
|
return e === null || t === null ? e === t : e.rowId === t.rowId && e.columnId === t.columnId;
|
|
2562
2565
|
}
|
|
2563
2566
|
//#endregion
|
|
2567
|
+
//#region src/tmdatagrid/core/controlledState.ts
|
|
2568
|
+
var Yr = {
|
|
2569
|
+
columnFilters: "onColumnFiltersChange",
|
|
2570
|
+
columnOrder: "onColumnOrderChange",
|
|
2571
|
+
columnPinning: "onColumnPinningChange",
|
|
2572
|
+
columnResizing: "onColumnResizingChange",
|
|
2573
|
+
columnSizing: "onColumnSizingChange",
|
|
2574
|
+
columnVisibility: "onColumnVisibilityChange",
|
|
2575
|
+
expanded: "onExpandedChange",
|
|
2576
|
+
globalFilter: "onGlobalFilterChange",
|
|
2577
|
+
grouping: "onGroupingChange",
|
|
2578
|
+
pagination: "onPaginationChange",
|
|
2579
|
+
rowPinning: "onRowPinningChange",
|
|
2580
|
+
rowSelection: "onRowSelectionChange",
|
|
2581
|
+
sorting: "onSortingChange"
|
|
2582
|
+
}, Xr = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
2583
|
+
function Zr(e) {
|
|
2584
|
+
if (typeof e != "object" || !e) return !1;
|
|
2585
|
+
let t = Object.getPrototypeOf(e);
|
|
2586
|
+
return t === Object.prototype || t === null;
|
|
2587
|
+
}
|
|
2588
|
+
function Qr(e, t) {
|
|
2589
|
+
if (Object.is(e, t)) return !0;
|
|
2590
|
+
if (e instanceof Date || t instanceof Date) return e instanceof Date && t instanceof Date && e.getTime() === t.getTime();
|
|
2591
|
+
if (Array.isArray(e) || Array.isArray(t)) return !Array.isArray(e) || !Array.isArray(t) ? !1 : e.length === t.length && e.every((e, n) => Qr(e, t[n]));
|
|
2592
|
+
if (!Zr(e) || !Zr(t)) return !1;
|
|
2593
|
+
let n = Object.keys(e);
|
|
2594
|
+
return n.length === Object.keys(t).length && n.every((n) => Xr(t, n) && Qr(e[n], t[n]));
|
|
2595
|
+
}
|
|
2596
|
+
function $r(e) {
|
|
2597
|
+
if (e === void 0 || !Object.values(e).includes(void 0)) return e;
|
|
2598
|
+
let t = {};
|
|
2599
|
+
for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = r);
|
|
2600
|
+
return t;
|
|
2601
|
+
}
|
|
2602
|
+
function ei(e, t) {
|
|
2603
|
+
if (e === void 0 || t === void 0 || e === t) return e;
|
|
2604
|
+
let n = Object.keys(e), r = {}, i = n.length !== Object.keys(t).length;
|
|
2605
|
+
for (let a of n) {
|
|
2606
|
+
let n = e[a], o = t[a];
|
|
2607
|
+
Xr(t, a) && Qr(n, o) ? r[a] = o : (r[a] = n, i = !0);
|
|
2608
|
+
}
|
|
2609
|
+
return i ? r : t;
|
|
2610
|
+
}
|
|
2611
|
+
function ti(e) {
|
|
2612
|
+
let t = e.state;
|
|
2613
|
+
return t === void 0 ? [] : Object.entries(Yr).filter(([n, r]) => t[n] !== void 0 && e[r] === void 0 && e.atoms?.[n] === void 0).map(([e, t]) => ({
|
|
2614
|
+
slice: e,
|
|
2615
|
+
handler: t
|
|
2616
|
+
}));
|
|
2617
|
+
}
|
|
2618
|
+
//#endregion
|
|
2564
2619
|
//#region src/tmdatagrid/useTMDataGrid.tsx
|
|
2565
|
-
var
|
|
2620
|
+
var ni = 200, ri = We({
|
|
2566
2621
|
columnFilteringFeature: be,
|
|
2567
2622
|
globalFilteringFeature: Ie,
|
|
2568
2623
|
rowSortingFeature: He,
|
|
2569
2624
|
rowPaginationFeature: ze,
|
|
2570
2625
|
rowSelectionFeature: Ve,
|
|
2571
2626
|
columnPinningFeature: Ce,
|
|
2572
|
-
columnVisibilityFeature:
|
|
2627
|
+
columnVisibilityFeature: X,
|
|
2573
2628
|
columnOrderingFeature: Se,
|
|
2574
|
-
columnSizingFeature:
|
|
2629
|
+
columnSizingFeature: Te,
|
|
2575
2630
|
columnResizingFeature: we,
|
|
2576
|
-
columnFacetingFeature:
|
|
2631
|
+
columnFacetingFeature: ye,
|
|
2577
2632
|
columnGroupingFeature: xe,
|
|
2578
2633
|
rowExpandingFeature: Re,
|
|
2579
2634
|
rowPinningFeature: Be,
|
|
2580
2635
|
filteredRowModel: Ae(),
|
|
2581
2636
|
groupedRowModel: je(),
|
|
2582
|
-
sortedRowModel:
|
|
2637
|
+
sortedRowModel: hr(),
|
|
2583
2638
|
expandedRowModel: Z(),
|
|
2584
2639
|
paginatedRowModel: Me(),
|
|
2585
2640
|
facetedRowModel: Oe(),
|
|
@@ -2588,26 +2643,26 @@ var Jr = 200, Yr = We({
|
|
|
2588
2643
|
filterFns: {
|
|
2589
2644
|
...Pe,
|
|
2590
2645
|
tmDataGrid: wt,
|
|
2591
|
-
tmDataGridFuzzy:
|
|
2646
|
+
tmDataGridFuzzy: fr
|
|
2592
2647
|
},
|
|
2593
2648
|
sortFns: Ue,
|
|
2594
|
-
aggregationFns:
|
|
2649
|
+
aggregationFns: ve,
|
|
2595
2650
|
tableMeta: Le(),
|
|
2596
2651
|
columnMeta: Le()
|
|
2597
2652
|
});
|
|
2598
|
-
function
|
|
2653
|
+
function ii() {
|
|
2599
2654
|
return Ee();
|
|
2600
2655
|
}
|
|
2601
|
-
var
|
|
2602
|
-
function
|
|
2656
|
+
var ai = 160, oi = 6;
|
|
2657
|
+
function si(e) {
|
|
2603
2658
|
let t = { ...e };
|
|
2604
2659
|
for (let e of Object.keys(t)) xn(e) && delete t[e];
|
|
2605
2660
|
return t;
|
|
2606
2661
|
}
|
|
2607
|
-
function
|
|
2662
|
+
function ci(e) {
|
|
2608
2663
|
return e.map((e) => "columns" in e && Array.isArray(e.columns) ? {
|
|
2609
2664
|
...e,
|
|
2610
|
-
columns:
|
|
2665
|
+
columns: ci(e.columns)
|
|
2611
2666
|
} : {
|
|
2612
2667
|
filterFn: "tmDataGrid",
|
|
2613
2668
|
aggregationFn: void 0,
|
|
@@ -2615,8 +2670,8 @@ function ei(e) {
|
|
|
2615
2670
|
...e
|
|
2616
2671
|
});
|
|
2617
2672
|
}
|
|
2618
|
-
function
|
|
2619
|
-
let x = g?.mode, S =
|
|
2673
|
+
function li({ 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 = ai, overscan: y = oi, ...b }) {
|
|
2674
|
+
let x = g?.mode, S = Hr({
|
|
2620
2675
|
...b,
|
|
2621
2676
|
enableColumnOrdering: r,
|
|
2622
2677
|
enablePagination: a,
|
|
@@ -2625,8 +2680,8 @@ function ti({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2625
2680
|
showSelectedBackground: d,
|
|
2626
2681
|
cellSelection: m,
|
|
2627
2682
|
editing: g
|
|
2628
|
-
}), C = o(() =>
|
|
2629
|
-
let e =
|
|
2683
|
+
}), C = o(() => _r(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(() => {
|
|
2684
|
+
let e = ci(b.columns);
|
|
2630
2685
|
return [
|
|
2631
2686
|
...F ? [nn(P)] : [],
|
|
2632
2687
|
...T ? [pn(k)] : [],
|
|
@@ -2648,7 +2703,15 @@ function ti({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2648
2703
|
j,
|
|
2649
2704
|
M,
|
|
2650
2705
|
N
|
|
2651
|
-
]), [R] = c(() =>
|
|
2706
|
+
]), [R] = c(() => Br(e, Rr(L))), z = R.grouping ?? b.initialState?.grouping ?? [], B = s((b.state?.grouping ?? z).length > 0), V = $r(b.state), H = V?.columnVisibility, ee = V !== void 0 && H !== void 0 ? {
|
|
2707
|
+
...V,
|
|
2708
|
+
columnVisibility: {
|
|
2709
|
+
...si(H),
|
|
2710
|
+
...E ? { [qt]: B.current } : {}
|
|
2711
|
+
}
|
|
2712
|
+
} : V, te = s(void 0), ne = s(!1), re = ne.current ? ee : ei(ee, te.current);
|
|
2713
|
+
ne.current = !1, te.current = re;
|
|
2714
|
+
let U = Ge({
|
|
2652
2715
|
columnResizeMode: "onChange",
|
|
2653
2716
|
enableSorting: !0,
|
|
2654
2717
|
enableColumnResizing: !0,
|
|
@@ -2657,13 +2720,14 @@ function ti({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2657
2720
|
...b,
|
|
2658
2721
|
..._ === void 0 ? {} : { getRowCanExpand: b.getRowCanExpand ?? (() => !0) },
|
|
2659
2722
|
enableRowPinning: (e) => !e.getIsGrouped() && (typeof b.enableRowPinning == "function" ? b.enableRowPinning(e) : b.enableRowPinning === !0),
|
|
2660
|
-
features:
|
|
2723
|
+
features: ri,
|
|
2661
2724
|
columns: L,
|
|
2725
|
+
state: re,
|
|
2662
2726
|
initialState: {
|
|
2663
2727
|
...b.initialState,
|
|
2664
2728
|
...R,
|
|
2665
2729
|
columnVisibility: {
|
|
2666
|
-
|
|
2730
|
+
...si({
|
|
2667
2731
|
...b.initialState?.columnVisibility,
|
|
2668
2732
|
...R.columnVisibility
|
|
2669
2733
|
}),
|
|
@@ -2686,9 +2750,9 @@ function ti({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2686
2750
|
...R.pagination
|
|
2687
2751
|
}
|
|
2688
2752
|
}
|
|
2689
|
-
}),
|
|
2690
|
-
|
|
2691
|
-
table:
|
|
2753
|
+
}), ie = s(null);
|
|
2754
|
+
ie.current = {
|
|
2755
|
+
table: U,
|
|
2692
2756
|
editMode: x ?? "cell",
|
|
2693
2757
|
rowValidators: g?.rowValidators,
|
|
2694
2758
|
isRowEditable: g?.isRowEditable,
|
|
@@ -2698,33 +2762,40 @@ function ti({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2698
2762
|
onRowAdd: g?.onRowAdd,
|
|
2699
2763
|
onRowDelete: g?.onRowDelete
|
|
2700
2764
|
};
|
|
2701
|
-
let [
|
|
2765
|
+
let [ae] = c(() => lr(() => ie.current)), oe = s(x);
|
|
2702
2766
|
i(() => {
|
|
2703
|
-
|
|
2704
|
-
}, [x,
|
|
2767
|
+
oe.current !== x && (oe.current = x, ae.cancelAll());
|
|
2768
|
+
}, [x, ae]), i(() => {
|
|
2705
2769
|
g !== void 0 && b.getRowId === void 0 && console.error("TMDataGrid: editing requires getRowId - drafts are keyed by row id, and the index fallback names a different record after any sort or filter.");
|
|
2770
|
+
}, []), i(() => {
|
|
2771
|
+
for (let { slice: e, handler: t } of ti(b)) console.warn(`TMDataGrid: state.${e} is controlled but no ${t} was passed - the slice cannot change. Add ${t}, or use initialState.${e} for a starting value.`);
|
|
2706
2772
|
}, []), i(() => {
|
|
2707
2773
|
if (!E) return;
|
|
2708
|
-
let e =
|
|
2709
|
-
|
|
2774
|
+
let e = U.store.state.grouping;
|
|
2775
|
+
B.current = e.length > 0, U.store.state.columnVisibility?.__group__ !== e.length > 0 && U.setColumnVisibility((t) => ({
|
|
2776
|
+
...t,
|
|
2777
|
+
[qt]: e.length > 0
|
|
2778
|
+
}));
|
|
2779
|
+
let t = U.store.subscribe((t) => {
|
|
2780
|
+
t.grouping !== e && (e = t.grouping, B.current = t.grouping.length > 0, ne.current = !0, U.setColumnVisibility((e) => ({
|
|
2710
2781
|
...e,
|
|
2711
2782
|
[qt]: t.grouping.length > 0
|
|
2712
|
-
})),
|
|
2783
|
+
})), U.setColumnOrder((e) => [...e]));
|
|
2713
2784
|
});
|
|
2714
2785
|
return () => t.unsubscribe();
|
|
2715
|
-
}, [E,
|
|
2716
|
-
if (!
|
|
2717
|
-
|
|
2786
|
+
}, [E, U]), i(() => {
|
|
2787
|
+
if (!Fr(e)) return;
|
|
2788
|
+
Vr(U.store.state, e);
|
|
2718
2789
|
let t, n = null, r = () => {
|
|
2719
|
-
t = void 0, n !== null && (
|
|
2720
|
-
}, i =
|
|
2721
|
-
n = e, t !== void 0 && clearTimeout(t), t = setTimeout(r,
|
|
2790
|
+
t = void 0, n !== null && (Vr(n, e), n = null);
|
|
2791
|
+
}, i = U.store.subscribe((e) => {
|
|
2792
|
+
n = e, t !== void 0 && clearTimeout(t), t = setTimeout(r, ni);
|
|
2722
2793
|
});
|
|
2723
2794
|
return () => {
|
|
2724
2795
|
i.unsubscribe(), t !== void 0 && clearTimeout(t), r();
|
|
2725
2796
|
};
|
|
2726
|
-
}, [e,
|
|
2727
|
-
let
|
|
2797
|
+
}, [e, U]);
|
|
2798
|
+
let se = A({
|
|
2728
2799
|
filterPanelOpen: !1,
|
|
2729
2800
|
columnsPanelOpen: !1,
|
|
2730
2801
|
filterPanelColumnId: null,
|
|
@@ -2768,39 +2839,39 @@ function ti({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2768
2839
|
...e,
|
|
2769
2840
|
selectionAnchorRowId: t
|
|
2770
2841
|
})),
|
|
2771
|
-
setFocusedCell: (t) => e((e) =>
|
|
2842
|
+
setFocusedCell: (t) => e((e) => Jr(e.focusedCell, t) ? e : {
|
|
2772
2843
|
...e,
|
|
2773
2844
|
focusedCell: t
|
|
2774
2845
|
}),
|
|
2775
|
-
setCellRange: (t) => e((e) =>
|
|
2846
|
+
setCellRange: (t) => e((e) => Jr(e.cellRange?.anchor ?? null, t?.anchor ?? null) && Jr(e.cellRange?.focus ?? null, t?.focus ?? null) ? e : {
|
|
2776
2847
|
...e,
|
|
2777
2848
|
cellRange: t
|
|
2778
2849
|
})
|
|
2779
|
-
})),
|
|
2850
|
+
})), W = s(p);
|
|
2780
2851
|
i(() => {
|
|
2781
|
-
|
|
2852
|
+
W.current = p;
|
|
2782
2853
|
}, [p]), i(() => {
|
|
2783
|
-
let e =
|
|
2784
|
-
t.highlightedRowId !== e && (e = t.highlightedRowId,
|
|
2854
|
+
let e = se.state.highlightedRowId, t = se.subscribe((t) => {
|
|
2855
|
+
t.highlightedRowId !== e && (e = t.highlightedRowId, W.current?.(t.highlightedRowId));
|
|
2785
2856
|
});
|
|
2786
2857
|
return () => t.unsubscribe();
|
|
2787
|
-
}, [
|
|
2788
|
-
let
|
|
2858
|
+
}, [se]);
|
|
2859
|
+
let G = s(h);
|
|
2789
2860
|
i(() => {
|
|
2790
|
-
|
|
2861
|
+
G.current = h;
|
|
2791
2862
|
}, [h]), i(() => {
|
|
2792
|
-
let e =
|
|
2793
|
-
t.focusedCell !== e && (e = t.focusedCell,
|
|
2863
|
+
let e = se.state.focusedCell, t = se.subscribe((t) => {
|
|
2864
|
+
t.focusedCell !== e && (e = t.focusedCell, G.current?.(t.focusedCell));
|
|
2794
2865
|
});
|
|
2795
2866
|
return () => t.unsubscribe();
|
|
2796
|
-
}, [
|
|
2797
|
-
let
|
|
2798
|
-
|
|
2867
|
+
}, [se]);
|
|
2868
|
+
let K = s(() => {});
|
|
2869
|
+
K.current = () => {
|
|
2799
2870
|
let e = b.initialState, t = [...e?.grouping ?? []];
|
|
2800
|
-
|
|
2801
|
-
|
|
2871
|
+
U.setGrouping(t), U.setColumnVisibility({
|
|
2872
|
+
...si({ ...e?.columnVisibility }),
|
|
2802
2873
|
...E ? { [qt]: t.length > 0 } : {}
|
|
2803
|
-
}),
|
|
2874
|
+
}), U.setColumnSizing({ ...e?.columnSizing }), U.setColumnOrder([...e?.columnOrder ?? []]), U.setColumnPinning({
|
|
2804
2875
|
left: [
|
|
2805
2876
|
...F && w ? [tn] : [],
|
|
2806
2877
|
...T && w ? [cn] : [],
|
|
@@ -2811,22 +2882,22 @@ function ti({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2811
2882
|
right: [...(e?.columnPinning?.right ?? []).filter((e) => e !== Vt), ...O && w ? [Vt] : []]
|
|
2812
2883
|
});
|
|
2813
2884
|
};
|
|
2814
|
-
let
|
|
2885
|
+
let ce = n(() => K.current(), []), q = s(() => !1);
|
|
2815
2886
|
return {
|
|
2816
|
-
table:
|
|
2817
|
-
ui:
|
|
2818
|
-
edit:
|
|
2887
|
+
table: U,
|
|
2888
|
+
ui: se,
|
|
2889
|
+
edit: ae,
|
|
2819
2890
|
features: S,
|
|
2820
2891
|
labels: C,
|
|
2821
2892
|
renderDetails: _,
|
|
2822
2893
|
renderDetailsEstHeight: v,
|
|
2823
2894
|
overscan: y,
|
|
2824
|
-
resetSettings:
|
|
2825
|
-
scrollToRow: n((e) =>
|
|
2826
|
-
scrollerRef:
|
|
2895
|
+
resetSettings: ce,
|
|
2896
|
+
scrollToRow: n((e) => q.current(e), []),
|
|
2897
|
+
scrollerRef: q
|
|
2827
2898
|
};
|
|
2828
2899
|
}
|
|
2829
|
-
function
|
|
2900
|
+
function ui(e, t) {
|
|
2830
2901
|
let n = e.table.getColumn(t);
|
|
2831
2902
|
if (n && n.getFilterValue() === void 0) {
|
|
2832
2903
|
let e = gn(n);
|
|
@@ -2839,12 +2910,12 @@ function ni(e, t) {
|
|
|
2839
2910
|
}
|
|
2840
2911
|
//#endregion
|
|
2841
2912
|
//#region src/tmdatagrid/components/TMDataGridFilterPills.tsx
|
|
2842
|
-
function
|
|
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,
|
|
2913
|
+
function di(t) {
|
|
2914
|
+
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, pi), m, h, g, _, v, b, x, S, C;
|
|
2844
2915
|
if (n[0] !== r || n[1] !== s || n[2] !== p || n[3] !== f || n[4] !== o || n[5] !== c || n[6] !== u) {
|
|
2845
2916
|
C = Symbol.for("react.early_return_sentinel");
|
|
2846
2917
|
bb0: {
|
|
2847
|
-
if (h = p.filter(
|
|
2918
|
+
if (h = p.filter(fi), h.length === 0) {
|
|
2848
2919
|
C = null;
|
|
2849
2920
|
break bb0;
|
|
2850
2921
|
}
|
|
@@ -2854,7 +2925,7 @@ function ri(t) {
|
|
|
2854
2925
|
let t;
|
|
2855
2926
|
n[18] !== r || n[19] !== p || n[20] !== f || n[21] !== o || n[22] !== c || n[23] !== u ? (t = (e) => {
|
|
2856
2927
|
let t = u.getColumn(e.id), n = t ? mn(t) : e.id, i = e.value;
|
|
2857
|
-
return _t(i) ? /* @__PURE__ */
|
|
2928
|
+
return _t(i) ? /* @__PURE__ */ J(y, {
|
|
2858
2929
|
size: c,
|
|
2859
2930
|
className: Qn.pill,
|
|
2860
2931
|
"data-dg-part": "filter-pill",
|
|
@@ -2866,9 +2937,9 @@ function ri(t) {
|
|
|
2866
2937
|
"aria-hidden": !1,
|
|
2867
2938
|
tabIndex: 0
|
|
2868
2939
|
},
|
|
2869
|
-
children: /* @__PURE__ */
|
|
2940
|
+
children: /* @__PURE__ */ J(k, {
|
|
2870
2941
|
className: Qn.pillLabel,
|
|
2871
|
-
onClick: () => o ? o(e.id) :
|
|
2942
|
+
onClick: () => o ? o(e.id) : ui(r, e.id),
|
|
2872
2943
|
children: yt({
|
|
2873
2944
|
label: n,
|
|
2874
2945
|
type: t ? hn(t) : "string",
|
|
@@ -2883,12 +2954,12 @@ function ri(t) {
|
|
|
2883
2954
|
} else m = n[7], h = n[8], g = n[9], _ = n[10], v = n[11], b = n[12], x = n[13], S = n[14], C = n[15];
|
|
2884
2955
|
if (C !== Symbol.for("react.early_return_sentinel")) return C;
|
|
2885
2956
|
let w;
|
|
2886
|
-
n[25] !== m || n[26] !== g || n[27] !== _ ? (w = /* @__PURE__ */
|
|
2957
|
+
n[25] !== m || n[26] !== g || n[27] !== _ ? (w = /* @__PURE__ */ J(m, {
|
|
2887
2958
|
size: g,
|
|
2888
2959
|
children: _
|
|
2889
2960
|
}), n[25] = m, n[26] = g, n[27] = _, n[28] = w) : w = n[28];
|
|
2890
2961
|
let T;
|
|
2891
|
-
n[29] !== h || n[30] !== f.clearAllFilters || n[31] !== l || n[32] !== u ? (T = l && h.length > 1 && /* @__PURE__ */
|
|
2962
|
+
n[29] !== h || n[30] !== f.clearAllFilters || n[31] !== l || n[32] !== u ? (T = l && h.length > 1 && /* @__PURE__ */ J(d, {
|
|
2892
2963
|
variant: "subtle",
|
|
2893
2964
|
color: "gray",
|
|
2894
2965
|
size: "compact-xs",
|
|
@@ -2896,7 +2967,7 @@ function ri(t) {
|
|
|
2896
2967
|
children: f.clearAllFilters
|
|
2897
2968
|
}), n[29] = h, n[30] = f.clearAllFilters, n[31] = l, n[32] = u, n[33] = T) : T = n[33];
|
|
2898
2969
|
let E;
|
|
2899
|
-
return n[34] !== w || n[35] !== T || n[36] !== v || n[37] !== b || n[38] !== x || n[39] !== S ? (E = /* @__PURE__ */
|
|
2970
|
+
return n[34] !== w || n[35] !== T || n[36] !== v || n[37] !== b || n[38] !== x || n[39] !== S ? (E = /* @__PURE__ */ Y("div", {
|
|
2900
2971
|
role: v,
|
|
2901
2972
|
"aria-label": b,
|
|
2902
2973
|
"data-dg-part": x,
|
|
@@ -2904,16 +2975,16 @@ function ri(t) {
|
|
|
2904
2975
|
children: [w, T]
|
|
2905
2976
|
}), 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;
|
|
2906
2977
|
}
|
|
2907
|
-
function
|
|
2978
|
+
function fi(e) {
|
|
2908
2979
|
return vt(e.value);
|
|
2909
2980
|
}
|
|
2910
|
-
function
|
|
2981
|
+
function pi(e) {
|
|
2911
2982
|
return e.columnFilters;
|
|
2912
2983
|
}
|
|
2913
|
-
var
|
|
2984
|
+
var mi = { footer: "_footer_te0a3_1" };
|
|
2914
2985
|
//#endregion
|
|
2915
2986
|
//#region src/tmdatagrid/components/TMDataGridFooter.tsx
|
|
2916
|
-
function
|
|
2987
|
+
function hi(e, t = !0) {
|
|
2917
2988
|
let { pageIndex: n, pageSize: r } = e.store.state.pagination, i = e.getRowCount();
|
|
2918
2989
|
return {
|
|
2919
2990
|
state: {
|
|
@@ -2937,15 +3008,15 @@ function si(e, t = !0) {
|
|
|
2937
3008
|
}
|
|
2938
3009
|
};
|
|
2939
3010
|
}
|
|
2940
|
-
function
|
|
3011
|
+
function gi(t) {
|
|
2941
3012
|
let n = e(23), { pageSizeOptions: r } = t, { table: i, features: a, labels: o, controlSize: s } = Q();
|
|
2942
3013
|
j(i.store);
|
|
2943
3014
|
let c;
|
|
2944
3015
|
n[0] !== a || n[1] !== i ? (c = an(i, a), n[0] = a, n[1] = i, n[2] = c) : c = n[2];
|
|
2945
3016
|
let l = c, { pageSize: u } = i.store.state.pagination, d;
|
|
2946
|
-
n[3] !== u || n[4] !== r ? (d = r.includes(u) ? r : [...r, u].sort(
|
|
3017
|
+
n[3] !== u || n[4] !== r ? (d = r.includes(u) ? r : [...r, u].sort(_i), n[3] = u, n[4] = r, n[5] = d) : d = n[5];
|
|
2947
3018
|
let f = d, m;
|
|
2948
|
-
n[6] !== s || n[7] !== o.rowsPerPage ? (m = /* @__PURE__ */
|
|
3019
|
+
n[6] !== s || n[7] !== o.rowsPerPage ? (m = /* @__PURE__ */ J(E, {
|
|
2949
3020
|
span: !0,
|
|
2950
3021
|
size: s,
|
|
2951
3022
|
c: "dimmed",
|
|
@@ -2958,7 +3029,7 @@ function ci(t) {
|
|
|
2958
3029
|
i.setPageSize(Number(e) || r[0]), i.setPageIndex(0);
|
|
2959
3030
|
}, n[11] = r[0], n[12] = i, n[13] = v) : v = n[13];
|
|
2960
3031
|
let y;
|
|
2961
|
-
n[14] !== s || n[15] !== h || n[16] !== g || n[17] !== _ || n[18] !== v ? (y = /* @__PURE__ */
|
|
3032
|
+
n[14] !== s || n[15] !== h || n[16] !== g || n[17] !== _ || n[18] !== v ? (y = /* @__PURE__ */ J(w, {
|
|
2962
3033
|
size: s,
|
|
2963
3034
|
w: 78,
|
|
2964
3035
|
allowDeselect: !1,
|
|
@@ -2970,16 +3041,16 @@ function ci(t) {
|
|
|
2970
3041
|
onChange: v
|
|
2971
3042
|
}), n[14] = s, n[15] = h, n[16] = g, n[17] = _, n[18] = v, n[19] = y) : y = n[19];
|
|
2972
3043
|
let b;
|
|
2973
|
-
return n[20] !== m || n[21] !== y ? (b = /* @__PURE__ */
|
|
3044
|
+
return n[20] !== m || n[21] !== y ? (b = /* @__PURE__ */ Y(p, {
|
|
2974
3045
|
gap: "xs",
|
|
2975
3046
|
wrap: "nowrap",
|
|
2976
3047
|
children: [m, y]
|
|
2977
3048
|
}), n[20] = m, n[21] = y, n[22] = b) : b = n[22], b;
|
|
2978
3049
|
}
|
|
2979
|
-
function
|
|
3050
|
+
function _i(e, t) {
|
|
2980
3051
|
return e - t;
|
|
2981
3052
|
}
|
|
2982
|
-
function
|
|
3053
|
+
function vi() {
|
|
2983
3054
|
let t = e(22), { table: n, features: r, labels: i, controlSize: a } = Q();
|
|
2984
3055
|
j(n.store);
|
|
2985
3056
|
let o;
|
|
@@ -2994,7 +3065,7 @@ function ui() {
|
|
|
2994
3065
|
}) : i.groupedAllRows(n.getFilteredRowModel().rows.length), t[3] = a, t[4] = i, t[5] = c, t[6] = l, t[7] = s, t[8] = n, t[9] = u, t[10] = d, t[11] = f, t[12] = p, t[13] = m, t[14] = h;
|
|
2995
3066
|
} else u = t[9], d = t[10], f = t[11], p = t[12], m = t[13], h = t[14];
|
|
2996
3067
|
let g;
|
|
2997
|
-
return t[15] !== u || t[16] !== d || t[17] !== f || t[18] !== p || t[19] !== m || t[20] !== h ? (g = /* @__PURE__ */
|
|
3068
|
+
return t[15] !== u || t[16] !== d || t[17] !== f || t[18] !== p || t[19] !== m || t[20] !== h ? (g = /* @__PURE__ */ J(u, {
|
|
2998
3069
|
span: d,
|
|
2999
3070
|
size: f,
|
|
3000
3071
|
c: p,
|
|
@@ -3002,7 +3073,7 @@ function ui() {
|
|
|
3002
3073
|
children: h
|
|
3003
3074
|
}), 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;
|
|
3004
3075
|
}
|
|
3005
|
-
function
|
|
3076
|
+
function yi() {
|
|
3006
3077
|
let t = e(26), { table: n, features: r, labels: i } = Q();
|
|
3007
3078
|
j(n.store);
|
|
3008
3079
|
let a;
|
|
@@ -3012,12 +3083,12 @@ function di() {
|
|
|
3012
3083
|
let c;
|
|
3013
3084
|
t[6] === n ? c = t[7] : (c = () => n.previousPage(), t[6] = n, t[7] = c);
|
|
3014
3085
|
let u;
|
|
3015
|
-
t[8] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
3086
|
+
t[8] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ J(V, {
|
|
3016
3087
|
size: 18,
|
|
3017
3088
|
stroke: 1.6
|
|
3018
3089
|
}), t[8] = u) : u = t[8];
|
|
3019
3090
|
let d;
|
|
3020
|
-
t[9] !== i.previousPage || t[10] !== s || t[11] !== c ? (d = /* @__PURE__ */
|
|
3091
|
+
t[9] !== i.previousPage || t[10] !== s || t[11] !== c ? (d = /* @__PURE__ */ J(l, {
|
|
3021
3092
|
variant: "subtle",
|
|
3022
3093
|
color: "gray",
|
|
3023
3094
|
"aria-label": i.previousPage,
|
|
@@ -3031,12 +3102,12 @@ function di() {
|
|
|
3031
3102
|
let m;
|
|
3032
3103
|
t[16] === n ? m = t[17] : (m = () => n.nextPage(), t[16] = n, t[17] = m);
|
|
3033
3104
|
let h;
|
|
3034
|
-
t[18] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */
|
|
3105
|
+
t[18] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ J(H, {
|
|
3035
3106
|
size: 18,
|
|
3036
3107
|
stroke: 1.6
|
|
3037
3108
|
}), t[18] = h) : h = t[18];
|
|
3038
3109
|
let g;
|
|
3039
|
-
t[19] !== i.nextPage || t[20] !== f || t[21] !== m ? (g = /* @__PURE__ */
|
|
3110
|
+
t[19] !== i.nextPage || t[20] !== f || t[21] !== m ? (g = /* @__PURE__ */ J(l, {
|
|
3040
3111
|
variant: "subtle",
|
|
3041
3112
|
color: "gray",
|
|
3042
3113
|
"aria-label": i.nextPage,
|
|
@@ -3046,37 +3117,37 @@ function di() {
|
|
|
3046
3117
|
children: h
|
|
3047
3118
|
}), t[19] = i.nextPage, t[20] = f, t[21] = m, t[22] = g) : g = t[22];
|
|
3048
3119
|
let _;
|
|
3049
|
-
return t[23] !== d || t[24] !== g ? (_ = /* @__PURE__ */
|
|
3120
|
+
return t[23] !== d || t[24] !== g ? (_ = /* @__PURE__ */ Y(p, {
|
|
3050
3121
|
gap: 4,
|
|
3051
3122
|
wrap: "nowrap",
|
|
3052
3123
|
children: [d, g]
|
|
3053
3124
|
}), t[23] = d, t[24] = g, t[25] = _) : _ = t[25], _;
|
|
3054
3125
|
}
|
|
3055
|
-
var
|
|
3126
|
+
var bi = [
|
|
3056
3127
|
10,
|
|
3057
3128
|
25,
|
|
3058
3129
|
50,
|
|
3059
3130
|
100
|
|
3060
3131
|
];
|
|
3061
|
-
function
|
|
3062
|
-
let n = e(23), { pageSizeOptions: r, renderPagination: i } = t, a = r === void 0 ?
|
|
3132
|
+
function xi(t) {
|
|
3133
|
+
let n = e(23), { pageSizeOptions: r, renderPagination: i } = t, a = r === void 0 ? bi : r, { table: o, features: s, labels: c } = Q();
|
|
3063
3134
|
j(o.store);
|
|
3064
3135
|
let l;
|
|
3065
3136
|
n[0] === a ? l = n[1] : (l = {
|
|
3066
|
-
PageSize: () => /* @__PURE__ */
|
|
3067
|
-
Range:
|
|
3068
|
-
Pager:
|
|
3137
|
+
PageSize: () => /* @__PURE__ */ J(gi, { pageSizeOptions: a }),
|
|
3138
|
+
Range: vi,
|
|
3139
|
+
Pager: yi
|
|
3069
3140
|
}, n[0] = a, n[1] = l);
|
|
3070
3141
|
let u = l;
|
|
3071
|
-
if (!
|
|
3142
|
+
if (!Wr(o, s).canPaginate) return null;
|
|
3072
3143
|
let d, f;
|
|
3073
3144
|
if (n[2] !== u || n[3] !== s || n[4] !== i || n[5] !== o) {
|
|
3074
3145
|
f = Symbol.for("react.early_return_sentinel");
|
|
3075
3146
|
bb0: if (d = an(o, s), i) {
|
|
3076
|
-
let { state: e, actions: t } =
|
|
3077
|
-
f = /* @__PURE__ */
|
|
3147
|
+
let { state: e, actions: t } = hi(o, d);
|
|
3148
|
+
f = /* @__PURE__ */ J("div", {
|
|
3078
3149
|
"data-dg-part": "footer",
|
|
3079
|
-
className:
|
|
3150
|
+
className: mi.footer,
|
|
3080
3151
|
children: i({
|
|
3081
3152
|
state: e,
|
|
3082
3153
|
actions: t,
|
|
@@ -3089,15 +3160,15 @@ function pi(t) {
|
|
|
3089
3160
|
} else d = n[6], f = n[7];
|
|
3090
3161
|
if (f !== Symbol.for("react.early_return_sentinel")) return f;
|
|
3091
3162
|
let p = !d, m;
|
|
3092
|
-
n[8] === u.PageSize ? m = n[9] : (m = /* @__PURE__ */
|
|
3163
|
+
n[8] === u.PageSize ? m = n[9] : (m = /* @__PURE__ */ J(u.PageSize, {}), n[8] = u.PageSize, n[9] = m);
|
|
3093
3164
|
let h;
|
|
3094
|
-
n[10] === u.Range ? h = n[11] : (h = /* @__PURE__ */
|
|
3165
|
+
n[10] === u.Range ? h = n[11] : (h = /* @__PURE__ */ J(u.Range, {}), n[10] = u.Range, n[11] = h);
|
|
3095
3166
|
let g;
|
|
3096
|
-
n[12] === u.Pager ? g = n[13] : (g = /* @__PURE__ */
|
|
3167
|
+
n[12] === u.Pager ? g = n[13] : (g = /* @__PURE__ */ J(u.Pager, {}), n[12] = u.Pager, n[13] = g);
|
|
3097
3168
|
let _;
|
|
3098
|
-
n[14] !== p || n[15] !== m || n[16] !== h || n[17] !== g ? (_ = /* @__PURE__ */
|
|
3169
|
+
n[14] !== p || n[15] !== m || n[16] !== h || n[17] !== g ? (_ = /* @__PURE__ */ Y("div", {
|
|
3099
3170
|
"data-dg-part": "footer",
|
|
3100
|
-
className:
|
|
3171
|
+
className: mi.footer,
|
|
3101
3172
|
"data-paging-suspended": p,
|
|
3102
3173
|
children: [
|
|
3103
3174
|
m,
|
|
@@ -3106,7 +3177,7 @@ function pi(t) {
|
|
|
3106
3177
|
]
|
|
3107
3178
|
}), n[14] = p, n[15] = m, n[16] = h, n[17] = g, n[18] = _) : _ = n[18];
|
|
3108
3179
|
let v;
|
|
3109
|
-
return n[19] !== c.pagingSuspendedHint || n[20] !== d || n[21] !== _ ? (v = /* @__PURE__ */
|
|
3180
|
+
return n[19] !== c.pagingSuspendedHint || n[20] !== d || n[21] !== _ ? (v = /* @__PURE__ */ J(O, {
|
|
3110
3181
|
label: c.pagingSuspendedHint,
|
|
3111
3182
|
disabled: d,
|
|
3112
3183
|
withArrow: !0,
|
|
@@ -3118,13 +3189,13 @@ function pi(t) {
|
|
|
3118
3189
|
}
|
|
3119
3190
|
//#endregion
|
|
3120
3191
|
//#region src/tmdatagrid/components/TMDataGridSearch.tsx
|
|
3121
|
-
function
|
|
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,
|
|
3192
|
+
function Si(t) {
|
|
3193
|
+
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, Ci), [_, v] = c(g), y = s(void 0), b = s(g), x, S;
|
|
3123
3194
|
n[0] === g ? (x = n[1], S = n[2]) : (x = () => {
|
|
3124
3195
|
g !== b.current && (b.current = g, v(g));
|
|
3125
3196
|
}, S = [g], n[0] = g, n[1] = x, n[2] = S), i(x, S);
|
|
3126
3197
|
let C, w;
|
|
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), !
|
|
3198
|
+
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), !Wr(f, p).canSearch) return null;
|
|
3128
3199
|
let T;
|
|
3129
3200
|
n[5] === f ? T = n[6] : (T = (e) => {
|
|
3130
3201
|
b.current = e, f.setGlobalFilter(e === "" ? void 0 : e);
|
|
@@ -3140,12 +3211,12 @@ function mi(t) {
|
|
|
3140
3211
|
let k = O, A;
|
|
3141
3212
|
n[10] === k ? A = n[11] : (A = (e) => k(e.currentTarget.value), n[10] = k, n[11] = A);
|
|
3142
3213
|
let M = r ?? m.searchPlaceholder, N;
|
|
3143
|
-
n[12] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */
|
|
3214
|
+
n[12] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ J(ce, {
|
|
3144
3215
|
size: 16,
|
|
3145
3216
|
stroke: 1.6
|
|
3146
3217
|
}), n[12] = N) : N = n[12];
|
|
3147
3218
|
let P;
|
|
3148
|
-
n[13] !== E || n[14] !== _ || n[15] !== m.clearSearch ? (P = _ === "" ? void 0 : /* @__PURE__ */
|
|
3219
|
+
n[13] !== E || n[14] !== _ || n[15] !== m.clearSearch ? (P = _ === "" ? void 0 : /* @__PURE__ */ J(l, {
|
|
3149
3220
|
variant: "subtle",
|
|
3150
3221
|
color: "gray",
|
|
3151
3222
|
size: "sm",
|
|
@@ -3154,13 +3225,13 @@ function mi(t) {
|
|
|
3154
3225
|
onClick: () => {
|
|
3155
3226
|
clearTimeout(y.current), v(""), E("");
|
|
3156
3227
|
},
|
|
3157
|
-
children: /* @__PURE__ */
|
|
3228
|
+
children: /* @__PURE__ */ J(le, {
|
|
3158
3229
|
size: 14,
|
|
3159
3230
|
stroke: 1.6
|
|
3160
3231
|
})
|
|
3161
3232
|
}), n[13] = E, n[14] = _, n[15] = m.clearSearch, n[16] = P) : P = n[16];
|
|
3162
3233
|
let F;
|
|
3163
|
-
return n[17] !== h || n[18] !== _ || n[19] !== m.searchLabel || n[20] !== M || n[21] !== P || n[22] !== A || n[23] !== d ? (F = /* @__PURE__ */
|
|
3234
|
+
return n[17] !== h || n[18] !== _ || n[19] !== m.searchLabel || n[20] !== M || n[21] !== P || n[22] !== A || n[23] !== d ? (F = /* @__PURE__ */ J(D, {
|
|
3164
3235
|
size: h,
|
|
3165
3236
|
w: d,
|
|
3166
3237
|
value: _,
|
|
@@ -3172,15 +3243,15 @@ function mi(t) {
|
|
|
3172
3243
|
rightSection: P
|
|
3173
3244
|
}), 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;
|
|
3174
3245
|
}
|
|
3175
|
-
function
|
|
3246
|
+
function Ci(e) {
|
|
3176
3247
|
return typeof e.globalFilter == "string" ? e.globalFilter : "";
|
|
3177
3248
|
}
|
|
3178
|
-
var
|
|
3249
|
+
var wi = {
|
|
3179
3250
|
stickyLeft: "_stickyLeft_1vw51_16",
|
|
3180
3251
|
stickyRight: "_stickyRight_1vw51_17",
|
|
3181
3252
|
stickyEdgeIn: "_stickyEdgeIn_1vw51_1",
|
|
3182
3253
|
stickyEdgeOut: "_stickyEdgeOut_1vw51_1"
|
|
3183
|
-
},
|
|
3254
|
+
}, Ti = {
|
|
3184
3255
|
headerCell: "_headerCell_188ed_1",
|
|
3185
3256
|
headerCellFiltered: "_headerCellFiltered_188ed_35",
|
|
3186
3257
|
headerTitle: "_headerTitle_188ed_35",
|
|
@@ -3196,39 +3267,39 @@ var gi = {
|
|
|
3196
3267
|
columnSeparatorResizable: "_columnSeparatorResizable_188ed_152",
|
|
3197
3268
|
columnSeparatorActive: "_columnSeparatorActive_188ed_175",
|
|
3198
3269
|
menuItemActive: "_menuItemActive_188ed_181"
|
|
3199
|
-
},
|
|
3200
|
-
function
|
|
3270
|
+
}, Ei = 30, Di = 2;
|
|
3271
|
+
function Oi(e) {
|
|
3201
3272
|
let t = document.createRange();
|
|
3202
3273
|
t.selectNodeContents(e);
|
|
3203
3274
|
let n = typeof t.getBoundingClientRect == "function" ? t.getBoundingClientRect().width : 0;
|
|
3204
3275
|
return n > 0 ? n : e.scrollWidth;
|
|
3205
3276
|
}
|
|
3206
|
-
function
|
|
3277
|
+
function ki(e, t) {
|
|
3207
3278
|
let n = CSS.escape(t);
|
|
3208
3279
|
return e.querySelectorAll(`[role="cell"][data-column-id="${n}"],[role="gridcell"][data-column-id="${n}"]`);
|
|
3209
3280
|
}
|
|
3210
|
-
function
|
|
3211
|
-
return
|
|
3281
|
+
function Ai(e, t) {
|
|
3282
|
+
return ki(e, t).length > 0;
|
|
3212
3283
|
}
|
|
3213
|
-
function
|
|
3284
|
+
function ji({ container: e, columnId: t }) {
|
|
3214
3285
|
let n = 0;
|
|
3215
|
-
for (let r of
|
|
3286
|
+
for (let r of ki(e, t)) {
|
|
3216
3287
|
let e = r.firstElementChild;
|
|
3217
3288
|
if (!(e instanceof HTMLElement)) continue;
|
|
3218
3289
|
let t = getComputedStyle(r), i = (Number.parseFloat(t.paddingLeft) || 0) + (Number.parseFloat(t.paddingRight) || 0);
|
|
3219
|
-
n = Math.max(n,
|
|
3290
|
+
n = Math.max(n, Oi(e) + i + Di);
|
|
3220
3291
|
}
|
|
3221
3292
|
let r = e.querySelector(`[data-column-id="${CSS.escape(t)}"] [data-dg-header-title]`);
|
|
3222
3293
|
if (r) {
|
|
3223
3294
|
let e = r.closest("[role=\"columnheader\"]"), t = e ? getComputedStyle(e) : null, i = t ? (Number.parseFloat(t.paddingLeft) || 0) + (Number.parseFloat(t.paddingRight) || 0) : 0;
|
|
3224
|
-
n = Math.max(n,
|
|
3295
|
+
n = Math.max(n, Oi(r) + i + Ei);
|
|
3225
3296
|
}
|
|
3226
3297
|
return n;
|
|
3227
3298
|
}
|
|
3228
|
-
function
|
|
3299
|
+
function Mi({ table: e, columnId: t, container: n }) {
|
|
3229
3300
|
let r = e, i = r.getColumn(t);
|
|
3230
3301
|
if (!i || !i.getCanResize()) return !1;
|
|
3231
|
-
let a =
|
|
3302
|
+
let a = ji({
|
|
3232
3303
|
container: n,
|
|
3233
3304
|
columnId: t
|
|
3234
3305
|
});
|
|
@@ -3241,46 +3312,46 @@ function wi({ table: e, columnId: t, container: n }) {
|
|
|
3241
3312
|
}
|
|
3242
3313
|
//#endregion
|
|
3243
3314
|
//#region src/tmdatagrid/core/columnOrdering.ts
|
|
3244
|
-
function
|
|
3315
|
+
function Ni(e, t) {
|
|
3245
3316
|
return e.left.includes(t) ? "left" : e.right.includes(t) ? "right" : "center";
|
|
3246
3317
|
}
|
|
3247
|
-
function
|
|
3318
|
+
function Pi(e, t, n, r) {
|
|
3248
3319
|
let i = e.filter((e) => e !== t), a = i.indexOf(n);
|
|
3249
3320
|
return a === -1 ? [...e] : (i.splice(r === "before" ? a : a + 1, 0, t), i);
|
|
3250
3321
|
}
|
|
3251
|
-
function
|
|
3322
|
+
function Fi({ table: e, columnId: t, targetId: n, side: r }) {
|
|
3252
3323
|
if (t === n) return;
|
|
3253
|
-
let i = e.store.state.columnPinning, a =
|
|
3254
|
-
if (a !==
|
|
3324
|
+
let i = e.store.state.columnPinning, a = Ni(i, t);
|
|
3325
|
+
if (a !== Ni(i, n)) return;
|
|
3255
3326
|
let o = e.getAllLeafColumns().map((e) => e.id);
|
|
3256
|
-
e.setColumnOrder(
|
|
3327
|
+
e.setColumnOrder(Pi(o, t, n, r)), a !== "center" && e.setColumnPinning((e) => ({
|
|
3257
3328
|
...e,
|
|
3258
|
-
[a]:
|
|
3329
|
+
[a]: Pi(e[a], t, n, r)
|
|
3259
3330
|
}));
|
|
3260
3331
|
}
|
|
3261
|
-
function
|
|
3332
|
+
function Ii(e) {
|
|
3262
3333
|
let t = (e) => Sn(e);
|
|
3263
3334
|
return {
|
|
3264
3335
|
left: [...e.left.filter(t), ...e.left.filter((e) => !t(e))],
|
|
3265
3336
|
right: [...e.right.filter((e) => !t(e)), ...e.right.filter(t)]
|
|
3266
3337
|
};
|
|
3267
3338
|
}
|
|
3268
|
-
function
|
|
3339
|
+
function Li(e, t) {
|
|
3269
3340
|
return t === "left" ? e.getLeftVisibleLeafColumns() : t === "right" ? e.getRightVisibleLeafColumns() : e.getCenterVisibleLeafColumns();
|
|
3270
3341
|
}
|
|
3271
|
-
function
|
|
3272
|
-
let r =
|
|
3342
|
+
function Ri({ table: e, columnId: t, direction: n }) {
|
|
3343
|
+
let r = Li(e, Ni(e.store.state.columnPinning, t)), i = r.findIndex((e) => e.id === t);
|
|
3273
3344
|
if (i === -1) return null;
|
|
3274
3345
|
let a = r[i + n];
|
|
3275
3346
|
return !a || !Cn(a) ? null : a;
|
|
3276
3347
|
}
|
|
3277
|
-
function
|
|
3278
|
-
let r =
|
|
3348
|
+
function zi({ table: e, columnId: t, direction: n }) {
|
|
3349
|
+
let r = Ri({
|
|
3279
3350
|
table: e,
|
|
3280
3351
|
columnId: t,
|
|
3281
3352
|
direction: n
|
|
3282
3353
|
});
|
|
3283
|
-
r &&
|
|
3354
|
+
r && Fi({
|
|
3284
3355
|
table: e,
|
|
3285
3356
|
columnId: t,
|
|
3286
3357
|
targetId: r.id,
|
|
@@ -3289,76 +3360,76 @@ function ji({ table: e, columnId: t, direction: n }) {
|
|
|
3289
3360
|
}
|
|
3290
3361
|
//#endregion
|
|
3291
3362
|
//#region src/tmdatagrid/components/TMDataGridHeaderCell.tsx
|
|
3292
|
-
function
|
|
3363
|
+
function Bi(t) {
|
|
3293
3364
|
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;
|
|
3294
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (C = { compare:
|
|
3295
|
-
let { sorting: w, columnFilters: T, resizingColumnId: E, columnPinning: D, grouping: k } = j(u.store,
|
|
3365
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (C = { compare: _e }, n[0] = C) : C = n[0];
|
|
3366
|
+
let { sorting: w, columnFilters: T, resizingColumnId: E, columnPinning: D, grouping: k } = j(u.store, qi, C), A = j(o.ui, Ki), N = r.subHeaders.length === 0, B, V, H, se, W, K, ce, q, le, ue, de, fe, pe, me, he, ge, ve, ye, be, xe;
|
|
3296
3367
|
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) {
|
|
3297
|
-
|
|
3368
|
+
ve = mn(p);
|
|
3298
3369
|
let e;
|
|
3299
3370
|
n[36] === p ? e = n[37] : (e = bn(p), n[36] = p, n[37] = e), B = e;
|
|
3300
3371
|
let t;
|
|
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,
|
|
3372
|
+
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, ge = be !== void 0;
|
|
3302
3373
|
let r;
|
|
3303
|
-
n[41] !== p.id || n[42] !==
|
|
3374
|
+
n[41] !== p.id || n[42] !== ge || n[43] !== w ? (r = ge && w.length > 1 ? w.findIndex((e) => e.id === p.id) + 1 : null, n[41] = p.id, n[42] = ge, n[43] = w, n[44] = r) : r = n[44], xe = r;
|
|
3304
3375
|
let s;
|
|
3305
3376
|
if (n[45] !== p.id || n[46] !== T) {
|
|
3306
3377
|
let e;
|
|
3307
3378
|
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;
|
|
3308
3379
|
} else s = n[47];
|
|
3309
|
-
|
|
3380
|
+
me = s, he = E === p.id, ye = i.pinnedAt;
|
|
3310
3381
|
let c;
|
|
3311
|
-
n[50] !== p || n[51] !== d ? (c =
|
|
3382
|
+
n[50] !== p || n[51] !== d ? (c = Ur(p, d), n[50] = p, n[51] = d, n[52] = c) : c = n[52];
|
|
3312
3383
|
let l = c;
|
|
3313
|
-
|
|
3384
|
+
W = N && l.canSort;
|
|
3314
3385
|
let m = N && l.canFilter, h = N && l.canHide, _ = N && l.canPin;
|
|
3315
|
-
|
|
3316
|
-
let v = N && l.canGroup, S = N &&
|
|
3386
|
+
se = l.canResize, H = N && l.canReorder;
|
|
3387
|
+
let v = N && l.canGroup, S = N && Wr(u, d).canHideAny, C;
|
|
3317
3388
|
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];
|
|
3318
3389
|
let O = C, j = k.length > 0;
|
|
3319
|
-
|
|
3320
|
-
let
|
|
3321
|
-
n[56] !== H || n[57] !== p.id || n[58] !== D || n[59] !== A || n[60] !==
|
|
3322
|
-
let
|
|
3323
|
-
n[62] !== o.ui || n[63] !== p.id ? (
|
|
3390
|
+
fe = A === p.id;
|
|
3391
|
+
let te;
|
|
3392
|
+
n[56] !== H || n[57] !== p.id || n[58] !== D || n[59] !== A || n[60] !== fe ? (te = H && A !== null && !fe && Ni(D, A) === Ni(D, p.id), n[56] = H, n[57] = p.id, n[58] = D, n[59] = A, n[60] = fe, n[61] = te) : te = n[61], pe = te;
|
|
3393
|
+
let Y;
|
|
3394
|
+
n[62] !== o.ui || n[63] !== p.id ? (Y = function(e) {
|
|
3324
3395
|
e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", p.id), o.ui.actions.startColumnDrag(p.id);
|
|
3325
|
-
}, n[62] = o.ui, n[63] = p.id, n[64] =
|
|
3326
|
-
let
|
|
3327
|
-
n[65] ===
|
|
3328
|
-
if (!
|
|
3396
|
+
}, n[62] = o.ui, n[63] = p.id, n[64] = Y) : Y = n[64], ue = Y;
|
|
3397
|
+
let _e;
|
|
3398
|
+
n[65] === pe ? _e = n[66] : (_e = function(e) {
|
|
3399
|
+
if (!pe) return;
|
|
3329
3400
|
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
3330
3401
|
let t = x.current?.getBoundingClientRect();
|
|
3331
3402
|
t && b(e.clientX < t.left + t.width / 2 ? "before" : "after");
|
|
3332
|
-
}, n[65] =
|
|
3403
|
+
}, n[65] = pe, n[66] = _e), le = _e;
|
|
3333
3404
|
let Se;
|
|
3334
3405
|
n[67] === Symbol.for("react.memo_cache_sentinel") ? (Se = function(e) {
|
|
3335
3406
|
let t = e.relatedTarget;
|
|
3336
3407
|
t instanceof Node && e.currentTarget.contains(t) || b(null);
|
|
3337
|
-
}, n[67] = Se) : Se = n[67],
|
|
3408
|
+
}, n[67] = Se) : Se = n[67], q = Se;
|
|
3338
3409
|
let Ce;
|
|
3339
|
-
n[68] !== o.ui || n[69] !== p.id || n[70] !== A || n[71] !== y || n[72] !==
|
|
3340
|
-
e.preventDefault(), b(null), o.ui.actions.endColumnDrag(), !(!
|
|
3410
|
+
n[68] !== o.ui || n[69] !== p.id || n[70] !== A || n[71] !== y || n[72] !== pe || n[73] !== u ? (Ce = function(e) {
|
|
3411
|
+
e.preventDefault(), b(null), o.ui.actions.endColumnDrag(), !(!pe || !y || !A) && Fi({
|
|
3341
3412
|
table: u,
|
|
3342
3413
|
columnId: A,
|
|
3343
3414
|
targetId: p.id,
|
|
3344
3415
|
side: y
|
|
3345
3416
|
});
|
|
3346
|
-
}, n[68] = o.ui, n[69] = p.id, n[70] = A, n[71] = y, n[72] =
|
|
3417
|
+
}, n[68] = o.ui, n[69] = p.id, n[70] = A, n[71] = y, n[72] = pe, n[73] = u, n[74] = Ce) : Ce = n[74], de = Ce;
|
|
3347
3418
|
let we;
|
|
3348
3419
|
n[75] === o.ui ? we = n[76] : (we = function() {
|
|
3349
3420
|
b(null), o.ui.actions.endColumnDrag();
|
|
3350
3421
|
}, n[75] = o.ui, n[76] = we), ce = we;
|
|
3351
|
-
let
|
|
3352
|
-
n[77] !== p.id || n[78] !== u ? (
|
|
3422
|
+
let Te;
|
|
3423
|
+
n[77] !== p.id || n[78] !== u ? (Te = function() {
|
|
3353
3424
|
let e = x.current?.closest("[data-dg-scroll-container]");
|
|
3354
|
-
e &&
|
|
3425
|
+
e && Mi({
|
|
3355
3426
|
table: u,
|
|
3356
3427
|
columnId: p.id,
|
|
3357
3428
|
container: e
|
|
3358
3429
|
});
|
|
3359
|
-
}, n[77] = p.id, n[78] = u, n[79] =
|
|
3360
|
-
let
|
|
3361
|
-
n[80] !== p || n[81] !== u ? (
|
|
3430
|
+
}, n[77] = p.id, n[78] = u, n[79] = Te) : Te = n[79], V = Te;
|
|
3431
|
+
let X;
|
|
3432
|
+
n[80] !== p || n[81] !== u ? (X = function(e) {
|
|
3362
3433
|
if (e && !(p.id in u.store.state.columnSizing)) {
|
|
3363
3434
|
let e = x.current?.getBoundingClientRect().width;
|
|
3364
3435
|
e && u.setColumnSizing((t) => ({
|
|
@@ -3366,66 +3437,66 @@ function Mi(t) {
|
|
|
3366
3437
|
[p.id]: Math.round(e)
|
|
3367
3438
|
}));
|
|
3368
3439
|
}
|
|
3369
|
-
p.pin(e), u.setColumnPinning(
|
|
3370
|
-
}, n[80] = p, n[81] = u, n[82] =
|
|
3371
|
-
let Ee =
|
|
3372
|
-
if (
|
|
3440
|
+
p.pin(e), u.setColumnPinning(Ii);
|
|
3441
|
+
}, n[80] = p, n[81] = u, n[82] = X) : X = n[82];
|
|
3442
|
+
let Ee = X, Z = [];
|
|
3443
|
+
if (W) {
|
|
3373
3444
|
let e;
|
|
3374
|
-
n[83] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
3445
|
+
n[83] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(z, {
|
|
3375
3446
|
size: 16,
|
|
3376
3447
|
stroke: 1.6
|
|
3377
3448
|
}), n[83] = e) : e = n[83];
|
|
3378
3449
|
let t;
|
|
3379
3450
|
n[84] === p ? t = n[85] : (t = () => p.toggleSorting(!1), n[84] = p, n[85] = t);
|
|
3380
3451
|
let r;
|
|
3381
|
-
n[86] !== f.sortAsc || n[87] !== t ? (r = /* @__PURE__ */
|
|
3452
|
+
n[86] !== f.sortAsc || n[87] !== t ? (r = /* @__PURE__ */ J(g.Item, {
|
|
3382
3453
|
leftSection: e,
|
|
3383
3454
|
onClick: t,
|
|
3384
3455
|
children: f.sortAsc
|
|
3385
3456
|
}, "sort-asc"), n[86] = f.sortAsc, n[87] = t, n[88] = r) : r = n[88];
|
|
3386
3457
|
let i;
|
|
3387
|
-
n[89] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */
|
|
3458
|
+
n[89] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ J(I, {
|
|
3388
3459
|
size: 16,
|
|
3389
3460
|
stroke: 1.6
|
|
3390
3461
|
}), n[89] = i) : i = n[89];
|
|
3391
3462
|
let a;
|
|
3392
3463
|
n[90] === p ? a = n[91] : (a = () => p.toggleSorting(!0), n[90] = p, n[91] = a);
|
|
3393
3464
|
let o;
|
|
3394
|
-
n[92] !== f.sortDesc || n[93] !== a ? (o = /* @__PURE__ */
|
|
3465
|
+
n[92] !== f.sortDesc || n[93] !== a ? (o = /* @__PURE__ */ J(g.Item, {
|
|
3395
3466
|
leftSection: i,
|
|
3396
3467
|
onClick: a,
|
|
3397
3468
|
children: f.sortDesc
|
|
3398
3469
|
}, "sort-desc"), n[92] = f.sortDesc, n[93] = a, n[94] = o) : o = n[94];
|
|
3399
3470
|
let s;
|
|
3400
|
-
n[95] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */
|
|
3471
|
+
n[95] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ J(g.Divider, {}, "sort-divider"), n[95] = s) : s = n[95], Z.push(r, o, s);
|
|
3401
3472
|
}
|
|
3402
3473
|
if (m) {
|
|
3403
3474
|
let e;
|
|
3404
|
-
n[96] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
3475
|
+
n[96] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(re, {
|
|
3405
3476
|
size: 16,
|
|
3406
3477
|
stroke: 1.6
|
|
3407
3478
|
}), n[96] = e) : e = n[96];
|
|
3408
3479
|
let t;
|
|
3409
|
-
n[97] !== o || n[98] !== p.id ? (t = () =>
|
|
3480
|
+
n[97] !== o || n[98] !== p.id ? (t = () => ui(o, p.id), n[97] = o, n[98] = p.id, n[99] = t) : t = n[99];
|
|
3410
3481
|
let r;
|
|
3411
|
-
n[100] !== f.filterMenuItem || n[101] !== t ? (r = /* @__PURE__ */
|
|
3482
|
+
n[100] !== f.filterMenuItem || n[101] !== t ? (r = /* @__PURE__ */ J(g.Item, {
|
|
3412
3483
|
leftSection: e,
|
|
3413
3484
|
onClick: t,
|
|
3414
3485
|
children: f.filterMenuItem
|
|
3415
3486
|
}, "filter"), n[100] = f.filterMenuItem, n[101] = t, n[102] = r) : r = n[102];
|
|
3416
3487
|
let i;
|
|
3417
|
-
n[103] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */
|
|
3488
|
+
n[103] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ J(g.Divider, {}, "filter-divider"), n[103] = i) : i = n[103], Z.push(r, i);
|
|
3418
3489
|
}
|
|
3419
3490
|
if (v) {
|
|
3420
|
-
let e = O ?
|
|
3421
|
-
n[104] === O ? t = n[105] : (t =
|
|
3491
|
+
let e = O ? Ti.menuItemActive : void 0, t;
|
|
3492
|
+
n[104] === O ? t = n[105] : (t = J(O ? ae : oe, {
|
|
3422
3493
|
size: 16,
|
|
3423
3494
|
stroke: 1.6
|
|
3424
3495
|
}), n[104] = O, n[105] = t);
|
|
3425
3496
|
let r;
|
|
3426
3497
|
n[106] === p ? r = n[107] : (r = p.getToggleGroupingHandler(), n[106] = p, n[107] = r);
|
|
3427
|
-
let i = O ? f.ungroup(
|
|
3428
|
-
n[108] !== e || n[109] !== t || n[110] !== r || n[111] !== i ? (a = /* @__PURE__ */
|
|
3498
|
+
let i = O ? f.ungroup(ve) : f.groupBy(ve), a;
|
|
3499
|
+
n[108] !== e || n[109] !== t || n[110] !== r || n[111] !== i ? (a = /* @__PURE__ */ J(g.Item, {
|
|
3429
3500
|
className: e,
|
|
3430
3501
|
leftSection: t,
|
|
3431
3502
|
onClick: r,
|
|
@@ -3435,8 +3506,8 @@ function Mi(t) {
|
|
|
3435
3506
|
if (j) {
|
|
3436
3507
|
if (p.id === "__group__") for (let e of k) {
|
|
3437
3508
|
let t = u.getColumn(e);
|
|
3438
|
-
t && Z.push(/* @__PURE__ */
|
|
3439
|
-
leftSection: /* @__PURE__ */
|
|
3509
|
+
t && Z.push(/* @__PURE__ */ J(g.Item, {
|
|
3510
|
+
leftSection: /* @__PURE__ */ J(ae, {
|
|
3440
3511
|
size: 16,
|
|
3441
3512
|
stroke: 1.6
|
|
3442
3513
|
}),
|
|
@@ -3452,27 +3523,27 @@ function Mi(t) {
|
|
|
3452
3523
|
expand: e
|
|
3453
3524
|
})), n[113] = u, n[114] = e);
|
|
3454
3525
|
let t = e, r;
|
|
3455
|
-
n[115] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
3526
|
+
n[115] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ J(U, {
|
|
3456
3527
|
size: 16,
|
|
3457
3528
|
stroke: 1.6
|
|
3458
3529
|
}), n[115] = r) : r = n[115];
|
|
3459
3530
|
let i;
|
|
3460
3531
|
n[116] === t ? i = n[117] : (i = () => t(!0), n[116] = t, n[117] = i);
|
|
3461
3532
|
let a;
|
|
3462
|
-
n[118] !== f.expandAllGroups || n[119] !== i ? (a = /* @__PURE__ */
|
|
3533
|
+
n[118] !== f.expandAllGroups || n[119] !== i ? (a = /* @__PURE__ */ J(g.Item, {
|
|
3463
3534
|
leftSection: r,
|
|
3464
3535
|
onClick: i,
|
|
3465
3536
|
children: f.expandAllGroups
|
|
3466
3537
|
}, "expand-all"), n[118] = f.expandAllGroups, n[119] = i, n[120] = a) : a = n[120];
|
|
3467
3538
|
let o;
|
|
3468
|
-
n[121] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */
|
|
3539
|
+
n[121] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ J(ie, {
|
|
3469
3540
|
size: 16,
|
|
3470
3541
|
stroke: 1.6
|
|
3471
3542
|
}), n[121] = o) : o = n[121];
|
|
3472
3543
|
let s;
|
|
3473
3544
|
n[122] === t ? s = n[123] : (s = () => t(!1), n[122] = t, n[123] = s);
|
|
3474
3545
|
let c;
|
|
3475
|
-
n[124] !== f.collapseAllGroups || n[125] !== s ? (c = /* @__PURE__ */
|
|
3546
|
+
n[124] !== f.collapseAllGroups || n[125] !== s ? (c = /* @__PURE__ */ J(g.Item, {
|
|
3476
3547
|
leftSection: o,
|
|
3477
3548
|
onClick: s,
|
|
3478
3549
|
children: f.collapseAllGroups
|
|
@@ -3480,63 +3551,63 @@ function Mi(t) {
|
|
|
3480
3551
|
}
|
|
3481
3552
|
if (v || j) {
|
|
3482
3553
|
let e;
|
|
3483
|
-
n[127] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
3554
|
+
n[127] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(g.Divider, {}, "group-divider"), n[127] = e) : e = n[127], Z.push(e);
|
|
3484
3555
|
}
|
|
3485
3556
|
if (_) {
|
|
3486
|
-
let e =
|
|
3487
|
-
n[128] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
3557
|
+
let e = ye === "left" ? Ti.menuItemActive : void 0, t;
|
|
3558
|
+
n[128] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ J(P, {
|
|
3488
3559
|
size: 16,
|
|
3489
3560
|
stroke: 1.6
|
|
3490
3561
|
}), n[128] = t) : t = n[128];
|
|
3491
3562
|
let r;
|
|
3492
|
-
n[129] !==
|
|
3563
|
+
n[129] !== ye || n[130] !== Ee ? (r = () => Ee(ye !== "left" && "left"), n[129] = ye, n[130] = Ee, n[131] = r) : r = n[131];
|
|
3493
3564
|
let i;
|
|
3494
|
-
n[132] !== f.pinLeft || n[133] !== e || n[134] !== r ? (i = /* @__PURE__ */
|
|
3565
|
+
n[132] !== f.pinLeft || n[133] !== e || n[134] !== r ? (i = /* @__PURE__ */ J(g.Item, {
|
|
3495
3566
|
className: e,
|
|
3496
3567
|
leftSection: t,
|
|
3497
3568
|
onClick: r,
|
|
3498
3569
|
children: f.pinLeft
|
|
3499
3570
|
}, "pin-left"), n[132] = f.pinLeft, n[133] = e, n[134] = r, n[135] = i) : i = n[135];
|
|
3500
|
-
let a =
|
|
3501
|
-
n[136] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */
|
|
3571
|
+
let a = ye === "right" ? Ti.menuItemActive : void 0, o;
|
|
3572
|
+
n[136] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ J(F, {
|
|
3502
3573
|
size: 16,
|
|
3503
3574
|
stroke: 1.6
|
|
3504
3575
|
}), n[136] = o) : o = n[136];
|
|
3505
3576
|
let s;
|
|
3506
|
-
n[137] !==
|
|
3577
|
+
n[137] !== ye || n[138] !== Ee ? (s = () => Ee(ye !== "right" && "right"), n[137] = ye, n[138] = Ee, n[139] = s) : s = n[139];
|
|
3507
3578
|
let c;
|
|
3508
|
-
if (n[140] !== f.pinRight || n[141] !== a || n[142] !== s ? (c = /* @__PURE__ */
|
|
3579
|
+
if (n[140] !== f.pinRight || n[141] !== a || n[142] !== s ? (c = /* @__PURE__ */ J(g.Item, {
|
|
3509
3580
|
className: a,
|
|
3510
3581
|
leftSection: o,
|
|
3511
3582
|
onClick: s,
|
|
3512
3583
|
children: f.pinRight
|
|
3513
|
-
}, "pin-right"), n[140] = f.pinRight, n[141] = a, n[142] = s, n[143] = c) : c = n[143], Z.push(i, c),
|
|
3584
|
+
}, "pin-right"), n[140] = f.pinRight, n[141] = a, n[142] = s, n[143] = c) : c = n[143], Z.push(i, c), ye) {
|
|
3514
3585
|
let e;
|
|
3515
|
-
n[144] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
3586
|
+
n[144] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(G, {
|
|
3516
3587
|
size: 16,
|
|
3517
3588
|
stroke: 1.6
|
|
3518
3589
|
}), n[144] = e) : e = n[144];
|
|
3519
3590
|
let t;
|
|
3520
3591
|
n[145] === Ee ? t = n[146] : (t = () => Ee(!1), n[145] = Ee, n[146] = t);
|
|
3521
3592
|
let r;
|
|
3522
|
-
n[147] !== f.unpin || n[148] !== t ? (r = /* @__PURE__ */
|
|
3593
|
+
n[147] !== f.unpin || n[148] !== t ? (r = /* @__PURE__ */ J(g.Item, {
|
|
3523
3594
|
leftSection: e,
|
|
3524
3595
|
onClick: t,
|
|
3525
3596
|
children: f.unpin
|
|
3526
3597
|
}, "unpin"), n[147] = f.unpin, n[148] = t, n[149] = r) : r = n[149], Z.push(r);
|
|
3527
3598
|
}
|
|
3528
3599
|
let l;
|
|
3529
|
-
n[150] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */
|
|
3600
|
+
n[150] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ J(g.Divider, {}, "pin-divider"), n[150] = l) : l = n[150], Z.push(l);
|
|
3530
3601
|
}
|
|
3531
3602
|
if (H) {
|
|
3532
3603
|
let e;
|
|
3533
|
-
n[151] !== p.id || n[152] !== u ? (e =
|
|
3604
|
+
n[151] !== p.id || n[152] !== u ? (e = Ri({
|
|
3534
3605
|
table: u,
|
|
3535
3606
|
columnId: p.id,
|
|
3536
3607
|
direction: -1
|
|
3537
3608
|
}), n[151] = p.id, n[152] = u, n[153] = e) : e = n[153];
|
|
3538
3609
|
let t = e, r;
|
|
3539
|
-
n[154] !== p.id || n[155] !== u ? (r =
|
|
3610
|
+
n[154] !== p.id || n[155] !== u ? (r = Ri({
|
|
3540
3611
|
table: u,
|
|
3541
3612
|
columnId: p.id,
|
|
3542
3613
|
direction: 1
|
|
@@ -3544,70 +3615,70 @@ function Mi(t) {
|
|
|
3544
3615
|
let i = r;
|
|
3545
3616
|
if (t || i) {
|
|
3546
3617
|
let e = !t, r;
|
|
3547
|
-
n[157] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
3618
|
+
n[157] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ J(L, {
|
|
3548
3619
|
size: 16,
|
|
3549
3620
|
stroke: 1.6
|
|
3550
3621
|
}), n[157] = r) : r = n[157];
|
|
3551
3622
|
let a;
|
|
3552
|
-
n[158] !== p.id || n[159] !== u ? (a = () =>
|
|
3623
|
+
n[158] !== p.id || n[159] !== u ? (a = () => zi({
|
|
3553
3624
|
table: u,
|
|
3554
3625
|
columnId: p.id,
|
|
3555
3626
|
direction: -1
|
|
3556
3627
|
}), n[158] = p.id, n[159] = u, n[160] = a) : a = n[160];
|
|
3557
3628
|
let o;
|
|
3558
|
-
n[161] !== f.moveLeft || n[162] !== e || n[163] !== a ? (o = /* @__PURE__ */
|
|
3629
|
+
n[161] !== f.moveLeft || n[162] !== e || n[163] !== a ? (o = /* @__PURE__ */ J(g.Item, {
|
|
3559
3630
|
disabled: e,
|
|
3560
3631
|
leftSection: r,
|
|
3561
3632
|
onClick: a,
|
|
3562
3633
|
children: f.moveLeft
|
|
3563
3634
|
}, "move-left"), n[161] = f.moveLeft, n[162] = e, n[163] = a, n[164] = o) : o = n[164];
|
|
3564
3635
|
let s = !i, c;
|
|
3565
|
-
n[165] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */
|
|
3636
|
+
n[165] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ J(R, {
|
|
3566
3637
|
size: 16,
|
|
3567
3638
|
stroke: 1.6
|
|
3568
3639
|
}), n[165] = c) : c = n[165];
|
|
3569
3640
|
let l;
|
|
3570
|
-
n[166] !== p.id || n[167] !== u ? (l = () =>
|
|
3641
|
+
n[166] !== p.id || n[167] !== u ? (l = () => zi({
|
|
3571
3642
|
table: u,
|
|
3572
3643
|
columnId: p.id,
|
|
3573
3644
|
direction: 1
|
|
3574
3645
|
}), n[166] = p.id, n[167] = u, n[168] = l) : l = n[168];
|
|
3575
3646
|
let d;
|
|
3576
|
-
n[169] !== f.moveRight || n[170] !== s || n[171] !== l ? (d = /* @__PURE__ */
|
|
3647
|
+
n[169] !== f.moveRight || n[170] !== s || n[171] !== l ? (d = /* @__PURE__ */ J(g.Item, {
|
|
3577
3648
|
disabled: s,
|
|
3578
3649
|
leftSection: c,
|
|
3579
3650
|
onClick: l,
|
|
3580
3651
|
children: f.moveRight
|
|
3581
3652
|
}, "move-right"), n[169] = f.moveRight, n[170] = s, n[171] = l, n[172] = d) : d = n[172];
|
|
3582
3653
|
let m;
|
|
3583
|
-
n[173] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */
|
|
3654
|
+
n[173] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ J(g.Divider, {}, "move-divider"), n[173] = m) : m = n[173], Z.push(o, d, m);
|
|
3584
3655
|
}
|
|
3585
3656
|
}
|
|
3586
|
-
if (
|
|
3657
|
+
if (se && N) {
|
|
3587
3658
|
let e;
|
|
3588
|
-
n[174] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
3659
|
+
n[174] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(M, {
|
|
3589
3660
|
size: 16,
|
|
3590
3661
|
stroke: 1.6
|
|
3591
3662
|
}), n[174] = e) : e = n[174];
|
|
3592
3663
|
let t;
|
|
3593
|
-
n[175] !== V || n[176] !== f.autosizeColumn ? (t = /* @__PURE__ */
|
|
3664
|
+
n[175] !== V || n[176] !== f.autosizeColumn ? (t = /* @__PURE__ */ J(g.Item, {
|
|
3594
3665
|
leftSection: e,
|
|
3595
3666
|
onClick: V,
|
|
3596
3667
|
children: f.autosizeColumn
|
|
3597
3668
|
}, "autosize"), n[175] = V, n[176] = f.autosizeColumn, n[177] = t) : t = n[177];
|
|
3598
3669
|
let r;
|
|
3599
|
-
n[178] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
3670
|
+
n[178] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ J(g.Divider, {}, "autosize-divider"), n[178] = r) : r = n[178], Z.push(t, r);
|
|
3600
3671
|
}
|
|
3601
3672
|
if (h) {
|
|
3602
3673
|
let e;
|
|
3603
|
-
n[179] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
3674
|
+
n[179] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(ne, {
|
|
3604
3675
|
size: 16,
|
|
3605
3676
|
stroke: 1.6
|
|
3606
3677
|
}), n[179] = e) : e = n[179];
|
|
3607
3678
|
let t;
|
|
3608
3679
|
n[180] === p ? t = n[181] : (t = () => p.toggleVisibility(!1), n[180] = p, n[181] = t);
|
|
3609
3680
|
let r;
|
|
3610
|
-
n[182] !== f.hideColumn || n[183] !== t ? (r = /* @__PURE__ */
|
|
3681
|
+
n[182] !== f.hideColumn || n[183] !== t ? (r = /* @__PURE__ */ J(g.Item, {
|
|
3611
3682
|
leftSection: e,
|
|
3612
3683
|
onClick: t,
|
|
3613
3684
|
children: f.hideColumn
|
|
@@ -3615,160 +3686,160 @@ function Mi(t) {
|
|
|
3615
3686
|
}
|
|
3616
3687
|
if (S) {
|
|
3617
3688
|
let e;
|
|
3618
|
-
n[185] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
3689
|
+
n[185] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(ee, {
|
|
3619
3690
|
size: 16,
|
|
3620
3691
|
stroke: 1.6
|
|
3621
3692
|
}), n[185] = e) : e = n[185];
|
|
3622
3693
|
let t;
|
|
3623
3694
|
n[186] === o.ui.actions ? t = n[187] : (t = () => o.ui.actions.setColumnsPanelOpen(!0), n[186] = o.ui.actions, n[187] = t);
|
|
3624
3695
|
let r;
|
|
3625
|
-
n[188] !== f.manageColumns || n[189] !== t ? (r = /* @__PURE__ */
|
|
3696
|
+
n[188] !== f.manageColumns || n[189] !== t ? (r = /* @__PURE__ */ J(g.Item, {
|
|
3626
3697
|
leftSection: e,
|
|
3627
3698
|
onClick: t,
|
|
3628
3699
|
children: f.manageColumns
|
|
3629
3700
|
}, "manage"), n[188] = f.manageColumns, n[189] = t, n[190] = r) : r = n[190], Z.push(r);
|
|
3630
3701
|
}
|
|
3631
|
-
for (; Z.length > 0 &&
|
|
3702
|
+
for (; Z.length > 0 && Ji(Z.at(-1));) Z.pop();
|
|
3632
3703
|
for (K = a ? [...a({
|
|
3633
3704
|
column: p,
|
|
3634
3705
|
table: u,
|
|
3635
3706
|
internalItems: Z
|
|
3636
|
-
})] : Z; K.length > 0 &&
|
|
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] =
|
|
3638
|
-
} else B = n[16], V = n[17], H = n[18],
|
|
3707
|
+
})] : Z; K.length > 0 && Ji(K.at(-1));) K.pop();
|
|
3708
|
+
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] = se, n[20] = W, n[21] = K, n[22] = ce, n[23] = q, n[24] = le, n[25] = ue, n[26] = de, n[27] = fe, n[28] = pe, n[29] = me, n[30] = he, n[31] = ge, n[32] = ve, n[33] = ye, n[34] = be, n[35] = xe;
|
|
3709
|
+
} else B = n[16], V = n[17], H = n[18], se = n[19], W = n[20], K = n[21], ce = n[22], q = 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], be = n[34], xe = n[35];
|
|
3639
3710
|
let Se;
|
|
3640
3711
|
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 =
|
|
3642
|
-
n[195] !== we || n[196] !==
|
|
3643
|
-
|
|
3712
|
+
let Ce = Se, we = W ? Ti.headerCellSortable : "", Te = me ? Ti.headerCellFiltered : "", X = fe ? Ti.headerCellDragging : "", Ee = y === "before" ? Ti.headerCellDropBefore : "", Z = y === "after" ? Ti.headerCellDropAfter : "", De = i.isBoundary && ye === "left" ? wi.stickyLeft : "", Oe = i.isBoundary && ye === "right" ? wi.stickyRight : "", ke;
|
|
3713
|
+
n[195] !== we || n[196] !== Te || n[197] !== X || n[198] !== Ee || n[199] !== Z || n[200] !== De || n[201] !== Oe ? (ke = [
|
|
3714
|
+
Ti.headerCell,
|
|
3644
3715
|
we,
|
|
3645
|
-
X,
|
|
3646
3716
|
Te,
|
|
3717
|
+
X,
|
|
3647
3718
|
Ee,
|
|
3648
3719
|
Z,
|
|
3649
3720
|
De,
|
|
3650
3721
|
Oe
|
|
3651
|
-
].filter(Boolean), n[195] = we, n[196] =
|
|
3652
|
-
let Ae = ke.join(" "), je = p.id, Me =
|
|
3722
|
+
].filter(Boolean), n[195] = we, n[196] = Te, n[197] = X, n[198] = Ee, n[199] = Z, n[200] = De, n[201] = Oe, n[202] = ke) : ke = n[202];
|
|
3723
|
+
let Ae = ke.join(" "), je = p.id, Me = ge || me, Ne;
|
|
3653
3724
|
n[203] === p.id ? Ne = n[204] : (Ne = xn(p.id), n[203] = p.id, n[204] = Ne);
|
|
3654
|
-
let Pe =
|
|
3725
|
+
let Pe = W ? ge ? be ? "descending" : "ascending" : "none" : void 0, Ie = H && !he, Le = H ? ue : void 0, Re = H ? ce : void 0, ze = pe ? le : void 0, Be = pe ? q : void 0, Ve = pe ? de : void 0, He = ye === "left" ? i.offset : void 0, Ue = ye === "right" ? i.offset : void 0, We = ye ? "sticky" : void 0, Ge = ye ? "var(--dg-z-header-pinned-cell, 7)" : void 0, Ke;
|
|
3655
3726
|
n[205] !== He || n[206] !== Ue || n[207] !== We || n[208] !== Ge ? (Ke = {
|
|
3656
3727
|
left: He,
|
|
3657
3728
|
right: Ue,
|
|
3658
3729
|
position: We,
|
|
3659
3730
|
zIndex: Ge
|
|
3660
3731
|
}, n[205] = He, n[206] = Ue, n[207] = We, n[208] = Ge, n[209] = Ke) : Ke = n[209];
|
|
3661
|
-
let qe =
|
|
3662
|
-
n[210] !==
|
|
3732
|
+
let qe = W ? Gi : void 0, Je;
|
|
3733
|
+
n[210] !== W || n[211] !== p ? (Je = W ? (e) => {
|
|
3663
3734
|
if (S.current) {
|
|
3664
3735
|
S.current = !1;
|
|
3665
3736
|
return;
|
|
3666
3737
|
}
|
|
3667
3738
|
p.getToggleSortingHandler()?.(e);
|
|
3668
|
-
} : void 0, n[210] =
|
|
3739
|
+
} : void 0, n[210] = W, n[211] = p, n[212] = Je) : Je = n[212];
|
|
3669
3740
|
let Ye;
|
|
3670
|
-
n[213] !== p.columnDef || n[214] !== r || n[215] !== N || n[216] !==
|
|
3671
|
-
label:
|
|
3741
|
+
n[213] !== p.columnDef || n[214] !== r || n[215] !== N || n[216] !== ve ? (Ye = r.isPlaceholder ? null : /* @__PURE__ */ J(O, {
|
|
3742
|
+
label: ve,
|
|
3672
3743
|
openDelay: 600,
|
|
3673
3744
|
withinPortal: !0,
|
|
3674
3745
|
disabled: !N,
|
|
3675
|
-
children: /* @__PURE__ */
|
|
3676
|
-
className:
|
|
3746
|
+
children: /* @__PURE__ */ J("span", {
|
|
3747
|
+
className: Ti.headerTitle,
|
|
3677
3748
|
"data-dg-header-title": !0,
|
|
3678
3749
|
children: Fe(p.columnDef.header, r.getContext())
|
|
3679
3750
|
})
|
|
3680
|
-
}), n[213] = p.columnDef, n[214] = r, n[215] = N, n[216] =
|
|
3751
|
+
}), n[213] = p.columnDef, n[214] = r, n[215] = N, n[216] = ve, n[217] = Ye) : Ye = n[217];
|
|
3681
3752
|
let Xe;
|
|
3682
|
-
n[218] !== o || n[219] !==
|
|
3683
|
-
className:
|
|
3753
|
+
n[218] !== o || n[219] !== W || n[220] !== p || n[221] !== _ || n[222] !== K || n[223] !== Ce || n[224] !== me || n[225] !== N || n[226] !== ge || n[227] !== ve || n[228] !== f || n[229] !== m || n[230] !== be || n[231] !== xe ? (Xe = N && /* @__PURE__ */ Y("div", {
|
|
3754
|
+
className: Ti.headerActions,
|
|
3684
3755
|
children: [
|
|
3685
|
-
|
|
3686
|
-
className:
|
|
3756
|
+
me && /* @__PURE__ */ J(l, {
|
|
3757
|
+
className: Ti.headerAction,
|
|
3687
3758
|
"data-pinned-visible": "true",
|
|
3688
3759
|
variant: "subtle",
|
|
3689
3760
|
color: "gray",
|
|
3690
3761
|
size: "xs",
|
|
3691
|
-
"aria-label": f.filterOn(
|
|
3762
|
+
"aria-label": f.filterOn(ve),
|
|
3692
3763
|
"data-dg-part": "header-filter",
|
|
3693
3764
|
"data-column-id": p.id,
|
|
3694
3765
|
onClick: (e) => {
|
|
3695
|
-
e.stopPropagation(),
|
|
3766
|
+
e.stopPropagation(), ui(o, p.id);
|
|
3696
3767
|
},
|
|
3697
|
-
children: /* @__PURE__ */
|
|
3768
|
+
children: /* @__PURE__ */ J(re, {
|
|
3698
3769
|
size: 14,
|
|
3699
3770
|
stroke: 1.6
|
|
3700
3771
|
})
|
|
3701
3772
|
}),
|
|
3702
|
-
|
|
3703
|
-
className: `${
|
|
3704
|
-
"data-pinned-visible":
|
|
3705
|
-
"data-sorted":
|
|
3773
|
+
W && /* @__PURE__ */ J(l, {
|
|
3774
|
+
className: `${Ti.headerAction} ${Ti.sortAction}`,
|
|
3775
|
+
"data-pinned-visible": ge,
|
|
3776
|
+
"data-sorted": ge,
|
|
3706
3777
|
variant: "subtle",
|
|
3707
|
-
color:
|
|
3778
|
+
color: ge ? void 0 : "gray",
|
|
3708
3779
|
size: "xs",
|
|
3709
|
-
"aria-label": f.sortColumn(
|
|
3780
|
+
"aria-label": f.sortColumn(ve),
|
|
3710
3781
|
"data-dg-part": "header-sort",
|
|
3711
3782
|
"data-column-id": p.id,
|
|
3712
3783
|
onClick: p.getToggleSortingHandler(),
|
|
3713
|
-
children:
|
|
3784
|
+
children: J(be ? I : z, {
|
|
3714
3785
|
size: 14,
|
|
3715
3786
|
stroke: 1.6
|
|
3716
3787
|
})
|
|
3717
3788
|
}),
|
|
3718
|
-
xe !== null && /* @__PURE__ */
|
|
3719
|
-
className:
|
|
3789
|
+
xe !== null && /* @__PURE__ */ J("span", {
|
|
3790
|
+
className: Ti.sortIndex,
|
|
3720
3791
|
"data-dg-part": "sort-index",
|
|
3721
3792
|
children: xe
|
|
3722
3793
|
}),
|
|
3723
|
-
Ce && /* @__PURE__ */
|
|
3794
|
+
Ce && /* @__PURE__ */ Y(g, {
|
|
3724
3795
|
opened: m,
|
|
3725
3796
|
onChange: h,
|
|
3726
3797
|
position: "bottom-start",
|
|
3727
3798
|
shadow: "md",
|
|
3728
3799
|
width: 220,
|
|
3729
3800
|
withinPortal: !0,
|
|
3730
|
-
children: [/* @__PURE__ */
|
|
3731
|
-
className:
|
|
3801
|
+
children: [/* @__PURE__ */ J(g.Target, { children: /* @__PURE__ */ J(l, {
|
|
3802
|
+
className: Ti.headerAction,
|
|
3732
3803
|
"data-pinned-visible": m || _,
|
|
3733
3804
|
variant: "subtle",
|
|
3734
3805
|
color: "gray",
|
|
3735
3806
|
size: "xs",
|
|
3736
|
-
"aria-label": f.columnMenu(
|
|
3807
|
+
"aria-label": f.columnMenu(ve),
|
|
3737
3808
|
"data-dg-part": "header-menu",
|
|
3738
3809
|
"data-column-id": p.id,
|
|
3739
3810
|
onClick: (e) => {
|
|
3740
|
-
e.stopPropagation(), h(
|
|
3811
|
+
e.stopPropagation(), h(Wi);
|
|
3741
3812
|
},
|
|
3742
|
-
children: /* @__PURE__ */
|
|
3813
|
+
children: /* @__PURE__ */ J(te, {
|
|
3743
3814
|
size: 14,
|
|
3744
3815
|
stroke: 1.6
|
|
3745
3816
|
})
|
|
3746
|
-
}) }), /* @__PURE__ */
|
|
3747
|
-
onClick:
|
|
3817
|
+
}) }), /* @__PURE__ */ J(g.Dropdown, {
|
|
3818
|
+
onClick: Ui,
|
|
3748
3819
|
children: K
|
|
3749
3820
|
})]
|
|
3750
3821
|
})
|
|
3751
3822
|
]
|
|
3752
|
-
}), n[218] = o, n[219] =
|
|
3823
|
+
}), n[218] = o, n[219] = W, n[220] = p, n[221] = _, n[222] = K, n[223] = Ce, n[224] = me, n[225] = N, n[226] = ge, n[227] = ve, n[228] = f, n[229] = m, n[230] = be, n[231] = xe, n[232] = Xe) : Xe = n[232];
|
|
3753
3824
|
let Ze;
|
|
3754
|
-
n[233] !== V || n[234] !==
|
|
3825
|
+
n[233] !== V || n[234] !== se || n[235] !== p.id || n[236] !== r || n[237] !== he ? (Ze = !xn(p.id) && /* @__PURE__ */ J("div", {
|
|
3755
3826
|
className: [
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3827
|
+
Ti.columnSeparator,
|
|
3828
|
+
se ? Ti.columnSeparatorResizable : "",
|
|
3829
|
+
he ? Ti.columnSeparatorActive : ""
|
|
3759
3830
|
].filter(Boolean).join(" "),
|
|
3760
3831
|
draggable: !1,
|
|
3761
|
-
onMouseDown:
|
|
3832
|
+
onMouseDown: se ? (e) => {
|
|
3762
3833
|
S.current = !0, r.getResizeHandler()(e);
|
|
3763
3834
|
} : void 0,
|
|
3764
|
-
onTouchStart:
|
|
3765
|
-
onClick:
|
|
3766
|
-
onDoubleClick:
|
|
3835
|
+
onTouchStart: se ? r.getResizeHandler() : void 0,
|
|
3836
|
+
onClick: Hi,
|
|
3837
|
+
onDoubleClick: se ? (e) => {
|
|
3767
3838
|
e.stopPropagation(), V();
|
|
3768
3839
|
} : void 0
|
|
3769
|
-
}), n[233] = V, n[234] =
|
|
3840
|
+
}), n[233] = V, n[234] = se, n[235] = p.id, n[236] = r, n[237] = he, n[238] = Ze) : Ze = n[238];
|
|
3770
3841
|
let Qe;
|
|
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__ */
|
|
3842
|
+
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__ */ Y("div", {
|
|
3772
3843
|
ref: x,
|
|
3773
3844
|
role: "columnheader",
|
|
3774
3845
|
"data-dg-part": "header",
|
|
@@ -3800,14 +3871,14 @@ function Mi(t) {
|
|
|
3800
3871
|
v(e), e && h(!1);
|
|
3801
3872
|
}, n[258] = et) : et = n[258];
|
|
3802
3873
|
let tt;
|
|
3803
|
-
n[259] === $e ? tt = n[260] : (tt = /* @__PURE__ */
|
|
3874
|
+
n[259] === $e ? tt = n[260] : (tt = /* @__PURE__ */ J(g.ContextMenu, { children: $e }), n[259] = $e, n[260] = tt);
|
|
3804
3875
|
let nt;
|
|
3805
|
-
n[261] === K ? nt = n[262] : (nt = /* @__PURE__ */
|
|
3806
|
-
onClick:
|
|
3876
|
+
n[261] === K ? nt = n[262] : (nt = /* @__PURE__ */ J(g.Dropdown, {
|
|
3877
|
+
onClick: Vi,
|
|
3807
3878
|
children: K
|
|
3808
3879
|
}), n[261] = K, n[262] = nt);
|
|
3809
3880
|
let rt;
|
|
3810
|
-
return n[263] !== _ || n[264] !== tt || n[265] !== nt ? (rt = /* @__PURE__ */
|
|
3881
|
+
return n[263] !== _ || n[264] !== tt || n[265] !== nt ? (rt = /* @__PURE__ */ Y(g, {
|
|
3811
3882
|
opened: _,
|
|
3812
3883
|
onChange: et,
|
|
3813
3884
|
position: "bottom-start",
|
|
@@ -3817,25 +3888,25 @@ function Mi(t) {
|
|
|
3817
3888
|
children: [tt, nt]
|
|
3818
3889
|
}), n[263] = _, n[264] = tt, n[265] = nt, n[266] = rt) : rt = n[266], rt;
|
|
3819
3890
|
}
|
|
3820
|
-
function
|
|
3891
|
+
function Vi(e) {
|
|
3821
3892
|
return e.stopPropagation();
|
|
3822
3893
|
}
|
|
3823
|
-
function
|
|
3894
|
+
function Hi(e) {
|
|
3824
3895
|
return e.stopPropagation();
|
|
3825
3896
|
}
|
|
3826
|
-
function
|
|
3897
|
+
function Ui(e) {
|
|
3827
3898
|
return e.stopPropagation();
|
|
3828
3899
|
}
|
|
3829
|
-
function
|
|
3900
|
+
function Wi(e) {
|
|
3830
3901
|
return !e;
|
|
3831
3902
|
}
|
|
3832
|
-
function
|
|
3903
|
+
function Gi(e) {
|
|
3833
3904
|
e.shiftKey && e.preventDefault();
|
|
3834
3905
|
}
|
|
3835
|
-
function
|
|
3906
|
+
function Ki(e) {
|
|
3836
3907
|
return e.draggedColumnId;
|
|
3837
3908
|
}
|
|
3838
|
-
function
|
|
3909
|
+
function qi(e) {
|
|
3839
3910
|
return {
|
|
3840
3911
|
sorting: e.sorting,
|
|
3841
3912
|
columnFilters: e.columnFilters,
|
|
@@ -3845,18 +3916,18 @@ function zi(e) {
|
|
|
3845
3916
|
grouping: e.grouping
|
|
3846
3917
|
};
|
|
3847
3918
|
}
|
|
3848
|
-
function
|
|
3919
|
+
function Ji(e) {
|
|
3849
3920
|
return typeof e == "object" && !!e && "type" in e && e.type === g.Divider;
|
|
3850
3921
|
}
|
|
3851
3922
|
//#endregion
|
|
3852
3923
|
//#region src/tmdatagrid/components/editors/TMDataGridBooleanEditor.tsx
|
|
3853
|
-
function
|
|
3924
|
+
function Yi(t) {
|
|
3854
3925
|
let n = e(12), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Ft(r), c = Lt(r), l;
|
|
3855
3926
|
n[0] !== i || n[1] !== o ? (l = o.editCell(mn(i)), n[0] = i, n[1] = o, n[2] = l) : l = n[2];
|
|
3856
3927
|
let u = s === !0, d;
|
|
3857
3928
|
n[3] === r ? d = n[4] : (d = (e) => r.handleChange(e.currentTarget.checked), n[3] = r, n[4] = d);
|
|
3858
3929
|
let p;
|
|
3859
|
-
return n[5] !== c || n[6] !== r.handleBlur || n[7] !== a || n[8] !== l || n[9] !== u || n[10] !== d ? (p = /* @__PURE__ */
|
|
3930
|
+
return n[5] !== c || n[6] !== r.handleBlur || n[7] !== a || n[8] !== l || n[9] !== u || n[10] !== d ? (p = /* @__PURE__ */ J(f, {
|
|
3860
3931
|
size: a,
|
|
3861
3932
|
"aria-label": l,
|
|
3862
3933
|
"data-dg-part": "editor-input",
|
|
@@ -3868,7 +3939,7 @@ function Vi(t) {
|
|
|
3868
3939
|
}
|
|
3869
3940
|
//#endregion
|
|
3870
3941
|
//#region src/tmdatagrid/components/editors/TMDataGridDateEditor.tsx
|
|
3871
|
-
function
|
|
3942
|
+
function Xi(t) {
|
|
3872
3943
|
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;
|
|
3873
3944
|
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);
|
|
3874
3945
|
let f = d, p;
|
|
@@ -3883,7 +3954,7 @@ function Hi(t) {
|
|
|
3883
3954
|
r.handleChange(u.current ? /* @__PURE__ */ new Date(`${t}T00:00:00`) : t);
|
|
3884
3955
|
}, n[5] = r, n[6] = m);
|
|
3885
3956
|
let h;
|
|
3886
|
-
return n[7] !== l || n[8] !== r.handleBlur || n[9] !== a || n[10] !== p || n[11] !== m || n[12] !== f ? (h = /* @__PURE__ */
|
|
3957
|
+
return n[7] !== l || n[8] !== r.handleBlur || n[9] !== a || n[10] !== p || n[11] !== m || n[12] !== f ? (h = /* @__PURE__ */ J(D, {
|
|
3887
3958
|
size: a,
|
|
3888
3959
|
w: "100%",
|
|
3889
3960
|
type: "date",
|
|
@@ -3897,7 +3968,7 @@ function Hi(t) {
|
|
|
3897
3968
|
}
|
|
3898
3969
|
//#endregion
|
|
3899
3970
|
//#region src/tmdatagrid/components/editors/TMDataGridMultiSelectEditor.tsx
|
|
3900
|
-
function
|
|
3971
|
+
function Zi(t) {
|
|
3901
3972
|
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;
|
|
3902
3973
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (d = { withinPortal: !1 }, n[0] = d) : d = n[0];
|
|
3903
3974
|
let f;
|
|
@@ -3914,7 +3985,7 @@ function Ui(t) {
|
|
|
3914
3985
|
let h;
|
|
3915
3986
|
n[10] === r ? h = n[11] : (h = (e) => r.handleChange(e), n[10] = r, n[11] = h);
|
|
3916
3987
|
let g;
|
|
3917
|
-
return n[12] !== u || n[13] !== r.handleBlur || n[14] !== s || n[15] !== f || n[16] !== p || n[17] !== m || n[18] !== h ? (g = /* @__PURE__ */
|
|
3988
|
+
return n[12] !== u || n[13] !== r.handleBlur || n[14] !== s || n[15] !== f || n[16] !== p || n[17] !== m || n[18] !== h ? (g = /* @__PURE__ */ J(_, {
|
|
3918
3989
|
size: s,
|
|
3919
3990
|
w: "100%",
|
|
3920
3991
|
searchable: !0,
|
|
@@ -3930,7 +4001,7 @@ function Ui(t) {
|
|
|
3930
4001
|
}
|
|
3931
4002
|
//#endregion
|
|
3932
4003
|
//#region src/tmdatagrid/components/editors/TMDataGridNumberEditor.tsx
|
|
3933
|
-
function
|
|
4004
|
+
function Qi(t) {
|
|
3934
4005
|
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
4006
|
n[0] !== i || n[1] !== o ? (d = o.editCell(mn(i)), n[0] = i, n[1] = o, n[2] = d) : d = n[2];
|
|
3936
4007
|
let f = typeof s == "number" ? s : "", p;
|
|
@@ -3938,7 +4009,7 @@ function Wi(t) {
|
|
|
3938
4009
|
l.current !== null && u(l.current), r.handleChange(typeof e == "number" ? e : e === "" ? null : Number(e));
|
|
3939
4010
|
}, n[3] = r, n[4] = l, n[5] = u, n[6] = p) : p = n[6];
|
|
3940
4011
|
let m;
|
|
3941
|
-
return n[7] !== c || n[8] !== r.handleBlur || n[9] !== l || n[10] !== a || n[11] !== d || n[12] !== f || n[13] !== p ? (m = /* @__PURE__ */
|
|
4012
|
+
return n[7] !== c || n[8] !== r.handleBlur || n[9] !== l || n[10] !== a || n[11] !== d || n[12] !== f || n[13] !== p ? (m = /* @__PURE__ */ J(v, {
|
|
3942
4013
|
ref: l,
|
|
3943
4014
|
size: a,
|
|
3944
4015
|
w: "100%",
|
|
@@ -3954,7 +4025,7 @@ function Wi(t) {
|
|
|
3954
4025
|
}
|
|
3955
4026
|
//#endregion
|
|
3956
4027
|
//#region src/tmdatagrid/components/editors/TMDataGridSelectEditor.tsx
|
|
3957
|
-
function
|
|
4028
|
+
function $i(t) {
|
|
3958
4029
|
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;
|
|
3959
4030
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (p = { withinPortal: !1 }, n[0] = p) : p = n[0];
|
|
3960
4031
|
let m;
|
|
@@ -3971,7 +4042,7 @@ function Gi(t) {
|
|
|
3971
4042
|
r.handleChange(e), e !== null && u.editMode === "cell" && c();
|
|
3972
4043
|
}, n[8] = c, n[9] = u, n[10] = r, n[11] = _) : _ = n[11];
|
|
3973
4044
|
let v;
|
|
3974
|
-
return n[12] !== f || n[13] !== r.handleBlur || n[14] !== s || n[15] !== m || n[16] !== h || n[17] !== g || n[18] !== _ ? (v = /* @__PURE__ */
|
|
4045
|
+
return n[12] !== f || n[13] !== r.handleBlur || n[14] !== s || n[15] !== m || n[16] !== h || n[17] !== g || n[18] !== _ ? (v = /* @__PURE__ */ J(w, {
|
|
3975
4046
|
size: s,
|
|
3976
4047
|
w: "100%",
|
|
3977
4048
|
searchable: !0,
|
|
@@ -3987,7 +4058,7 @@ function Gi(t) {
|
|
|
3987
4058
|
}
|
|
3988
4059
|
//#endregion
|
|
3989
4060
|
//#region src/tmdatagrid/components/editors/TMDataGridStringEditor.tsx
|
|
3990
|
-
function
|
|
4061
|
+
function ea(t) {
|
|
3991
4062
|
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
4063
|
n[0] !== i || n[1] !== o ? (d = o.editCell(mn(i)), n[0] = i, n[1] = o, n[2] = d) : d = n[2];
|
|
3993
4064
|
let f = typeof s == "string" ? s : "", p;
|
|
@@ -3995,7 +4066,7 @@ function Ki(t) {
|
|
|
3995
4066
|
u(e.currentTarget), r.handleChange(e.currentTarget.value);
|
|
3996
4067
|
}, n[3] = r, n[4] = u, n[5] = p) : p = n[5];
|
|
3997
4068
|
let m;
|
|
3998
|
-
return n[6] !== c || n[7] !== r.handleBlur || n[8] !== l || n[9] !== a || n[10] !== d || n[11] !== f || n[12] !== p ? (m = /* @__PURE__ */
|
|
4069
|
+
return n[6] !== c || n[7] !== r.handleBlur || n[8] !== l || n[9] !== a || n[10] !== d || n[11] !== f || n[12] !== p ? (m = /* @__PURE__ */ J(D, {
|
|
3999
4070
|
ref: l,
|
|
4000
4071
|
size: a,
|
|
4001
4072
|
w: "100%",
|
|
@@ -4010,24 +4081,24 @@ function Ki(t) {
|
|
|
4010
4081
|
}
|
|
4011
4082
|
//#endregion
|
|
4012
4083
|
//#region src/tmdatagrid/components/TMDataGridCellEditor.tsx
|
|
4013
|
-
var
|
|
4014
|
-
string:
|
|
4015
|
-
number:
|
|
4016
|
-
boolean:
|
|
4017
|
-
date:
|
|
4018
|
-
select:
|
|
4019
|
-
multiSelect:
|
|
4084
|
+
var ta = {
|
|
4085
|
+
string: ea,
|
|
4086
|
+
number: Qi,
|
|
4087
|
+
boolean: Yi,
|
|
4088
|
+
date: Xi,
|
|
4089
|
+
select: $i,
|
|
4090
|
+
multiSelect: Zi
|
|
4020
4091
|
};
|
|
4021
|
-
function
|
|
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), _ =
|
|
4092
|
+
function na({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1 }) {
|
|
4093
|
+
let { table: o, edit: u, features: d, labels: f, controlSize: p } = Q(), m = d.editMode === "row", h = e.column, g = u.getForm(t.id), _ = tr(h), [v] = c(() => n()), y = s(void 0);
|
|
4023
4094
|
i(() => {
|
|
4024
4095
|
y.current = h.columnDef.meta?.edit?.mapValue;
|
|
4025
4096
|
});
|
|
4026
4097
|
let [b] = c(() => {
|
|
4027
|
-
let e = new
|
|
4098
|
+
let e = new de({
|
|
4028
4099
|
form: g,
|
|
4029
4100
|
name: _,
|
|
4030
|
-
validators:
|
|
4101
|
+
validators: ur(h.columnDef.meta?.edit?.validate)
|
|
4031
4102
|
}), n = e.handleChange.bind(e);
|
|
4032
4103
|
return e.handleChange = ((r) => {
|
|
4033
4104
|
let i = y.current, a = e.state.value, s = typeof r == "function" ? r(a) : r;
|
|
@@ -4088,8 +4159,8 @@ function Ji({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4088
4159
|
cancel: C,
|
|
4089
4160
|
size: p,
|
|
4090
4161
|
seedText: v
|
|
4091
|
-
}, O = h.columnDef.meta?.edit?.editor ??
|
|
4092
|
-
return /* @__PURE__ */
|
|
4162
|
+
}, O = h.columnDef.meta?.edit?.editor ?? ta[h.columnDef.meta?.type ?? "string"] ?? ea;
|
|
4163
|
+
return /* @__PURE__ */ Y("div", {
|
|
4093
4164
|
className: $.cellEditor,
|
|
4094
4165
|
"data-dg-part": "editor",
|
|
4095
4166
|
"data-row-id": t.id,
|
|
@@ -4098,9 +4169,9 @@ function Ji({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4098
4169
|
onBlur: E,
|
|
4099
4170
|
onMouseDown: (e) => e.stopPropagation(),
|
|
4100
4171
|
onDoubleClick: (e) => e.stopPropagation(),
|
|
4101
|
-
children: [/* @__PURE__ */
|
|
4172
|
+
children: [/* @__PURE__ */ J(O, { ...D }), d.editMode === "cellConfirm" && /* @__PURE__ */ Y("div", {
|
|
4102
4173
|
className: $.cellEditorActions,
|
|
4103
|
-
children: [/* @__PURE__ */
|
|
4174
|
+
children: [/* @__PURE__ */ J(l, {
|
|
4104
4175
|
size: "sm",
|
|
4105
4176
|
variant: "subtle",
|
|
4106
4177
|
color: "green",
|
|
@@ -4108,11 +4179,11 @@ function Ji({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4108
4179
|
"data-dg-part": "editor-confirm",
|
|
4109
4180
|
onMouseDown: (e) => e.preventDefault(),
|
|
4110
4181
|
onClick: () => void S("pick"),
|
|
4111
|
-
children: /* @__PURE__ */
|
|
4182
|
+
children: /* @__PURE__ */ J(B, {
|
|
4112
4183
|
size: 14,
|
|
4113
4184
|
stroke: 2
|
|
4114
4185
|
})
|
|
4115
|
-
}), /* @__PURE__ */
|
|
4186
|
+
}), /* @__PURE__ */ J(l, {
|
|
4116
4187
|
size: "sm",
|
|
4117
4188
|
variant: "subtle",
|
|
4118
4189
|
color: "gray",
|
|
@@ -4120,7 +4191,7 @@ function Ji({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4120
4191
|
"data-dg-part": "editor-cancel",
|
|
4121
4192
|
onMouseDown: (e) => e.preventDefault(),
|
|
4122
4193
|
onClick: C,
|
|
4123
|
-
children: /* @__PURE__ */
|
|
4194
|
+
children: /* @__PURE__ */ J(le, {
|
|
4124
4195
|
size: 14,
|
|
4125
4196
|
stroke: 2
|
|
4126
4197
|
})
|
|
@@ -4130,7 +4201,7 @@ function Ji({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4130
4201
|
}
|
|
4131
4202
|
//#endregion
|
|
4132
4203
|
//#region src/tmdatagrid/core/editorFocus.ts
|
|
4133
|
-
var
|
|
4204
|
+
var ra = [
|
|
4134
4205
|
"button:not([disabled])",
|
|
4135
4206
|
"input:not([disabled])",
|
|
4136
4207
|
"select:not([disabled])",
|
|
@@ -4138,16 +4209,16 @@ var Yi = [
|
|
|
4138
4209
|
"a[href]",
|
|
4139
4210
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
4140
4211
|
].join(",");
|
|
4141
|
-
function
|
|
4142
|
-
(e.querySelector("[data-dg-part=\"editor-input\"]") ?? e.querySelector(
|
|
4212
|
+
function ia(e) {
|
|
4213
|
+
(e.querySelector("[data-dg-part=\"editor-input\"]") ?? e.querySelector(ra))?.focus();
|
|
4143
4214
|
}
|
|
4144
4215
|
//#endregion
|
|
4145
4216
|
//#region src/tmdatagrid/components/TMDataGridEntryRows.tsx
|
|
4146
|
-
function
|
|
4147
|
-
return xn(t.id) ||
|
|
4217
|
+
function aa(e, t) {
|
|
4218
|
+
return xn(t.id) || tr(t) === null ? !1 : yn(t, e);
|
|
4148
4219
|
}
|
|
4149
|
-
function
|
|
4150
|
-
let n = e(38), { orderedColumns: r, layoutFor: i, rowHeight: o } = t, { table: c, edit: l, features: u } = Q(), d = j(l.store,
|
|
4220
|
+
function oa(t) {
|
|
4221
|
+
let n = e(38), { orderedColumns: r, layoutFor: i, rowHeight: o } = t, { table: c, edit: l, features: u } = Q(), d = j(l.store, fa), f = j(l.store, da), p = s(null), m = s(null), h = s(null), g;
|
|
4151
4222
|
n[0] === d ? g = n[1] : (g = () => {
|
|
4152
4223
|
let e = d.at(-1)?.tempId;
|
|
4153
4224
|
if (e === void 0) {
|
|
@@ -4158,7 +4229,7 @@ function Qi(t) {
|
|
|
4158
4229
|
let t = p.current;
|
|
4159
4230
|
if (t === null) return;
|
|
4160
4231
|
let n = t.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(e)}"]`);
|
|
4161
|
-
n !== null && (m.current = e,
|
|
4232
|
+
n !== null && (m.current = e, ia(n));
|
|
4162
4233
|
}, n[0] = d, n[1] = g), a(g);
|
|
4163
4234
|
let _;
|
|
4164
4235
|
n[2] === f ? _ = n[3] : (_ = () => {
|
|
@@ -4171,7 +4242,7 @@ function Qi(t) {
|
|
|
4171
4242
|
let t = p.current;
|
|
4172
4243
|
if (t === null) return;
|
|
4173
4244
|
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)}"]`);
|
|
4174
|
-
n !== null && (h.current = e,
|
|
4245
|
+
n !== null && (h.current = e, ia(n));
|
|
4175
4246
|
}, n[2] = f, n[3] = _), a(_);
|
|
4176
4247
|
let v;
|
|
4177
4248
|
if (n[4] !== l || n[5] !== d) {
|
|
@@ -4185,7 +4256,7 @@ function Qi(t) {
|
|
|
4185
4256
|
n[9] === d ? b = n[10] : (b = (e, t) => d[t]?.tempId ?? String(t), n[9] = d, n[10] = b);
|
|
4186
4257
|
let x;
|
|
4187
4258
|
n[11] !== y || n[12] !== b || n[13] !== c.options.columns ? (x = {
|
|
4188
|
-
features:
|
|
4259
|
+
features: ri,
|
|
4189
4260
|
columns: c.options.columns,
|
|
4190
4261
|
data: y,
|
|
4191
4262
|
getRowId: b
|
|
@@ -4195,22 +4266,23 @@ function Qi(t) {
|
|
|
4195
4266
|
let C, w;
|
|
4196
4267
|
if (n[15] !== l || n[16] !== S || n[17] !== u.editNewRowsSticky || n[18] !== i || n[19] !== d || n[20] !== r || n[21] !== o) {
|
|
4197
4268
|
let e = S.getCoreRowModel().rows, t;
|
|
4198
|
-
n[24] === d ? t = n[25] : (t = new Map(d.map(
|
|
4269
|
+
n[24] === d ? t = n[25] : (t = new Map(d.map(ua)), n[24] = d, n[25] = t);
|
|
4199
4270
|
let a = t, s;
|
|
4200
4271
|
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];
|
|
4201
4272
|
let c = e.filter(s), f = u.editNewRowsSticky ? [] : e.filter((e) => a.get(e.id) === !0), m;
|
|
4202
4273
|
n[29] !== a || n[30] !== l || n[31] !== i || n[32] !== r || n[33] !== o ? (m = (e, t) => {
|
|
4203
|
-
let n = new Map(e.getAllCells().map(
|
|
4204
|
-
return /* @__PURE__ */
|
|
4274
|
+
let n = new Map(e.getAllCells().map(la)), s = a.get(e.id) === !0;
|
|
4275
|
+
return /* @__PURE__ */ J("div", {
|
|
4205
4276
|
role: "row",
|
|
4206
4277
|
"data-dg-part": "entry-row",
|
|
4207
4278
|
"data-row-id": e.id,
|
|
4208
4279
|
"data-new": !0,
|
|
4209
4280
|
"data-committed": s,
|
|
4281
|
+
"data-draft": s,
|
|
4210
4282
|
className: $.entryRow,
|
|
4211
4283
|
children: r.map((r) => {
|
|
4212
|
-
let a = n.get(r.id), c = i(r.id), u = a !== void 0 &&
|
|
4213
|
-
return /* @__PURE__ */
|
|
4284
|
+
let a = n.get(r.id), c = i(r.id), u = a !== void 0 && aa(e, r);
|
|
4285
|
+
return /* @__PURE__ */ J("div", {
|
|
4214
4286
|
role: "cell",
|
|
4215
4287
|
"data-column-id": r.id,
|
|
4216
4288
|
"data-align": bn(r),
|
|
@@ -4221,8 +4293,8 @@ function Qi(t) {
|
|
|
4221
4293
|
}) : void 0,
|
|
4222
4294
|
className: [
|
|
4223
4295
|
$.entryCell,
|
|
4224
|
-
c.isBoundary && c.pinnedAt === "left" ?
|
|
4225
|
-
c.isBoundary && c.pinnedAt === "right" ?
|
|
4296
|
+
c.isBoundary && c.pinnedAt === "left" ? wi.stickyLeft : "",
|
|
4297
|
+
c.isBoundary && c.pinnedAt === "right" ? wi.stickyRight : ""
|
|
4226
4298
|
].filter(Boolean).join(" "),
|
|
4227
4299
|
style: {
|
|
4228
4300
|
minHeight: o,
|
|
@@ -4231,14 +4303,14 @@ function Qi(t) {
|
|
|
4231
4303
|
position: c.pinnedAt ? "sticky" : void 0,
|
|
4232
4304
|
zIndex: c.pinnedAt ? t : void 0
|
|
4233
4305
|
},
|
|
4234
|
-
children: a !== void 0 && r.id === "__edit__" ? Fe(a.column.columnDef.cell, a.getContext()) : s && a !== void 0 ? /* @__PURE__ */
|
|
4306
|
+
children: a !== void 0 && r.id === "__edit__" ? Fe(a.column.columnDef.cell, a.getContext()) : s && a !== void 0 ? /* @__PURE__ */ J("span", {
|
|
4235
4307
|
className: $.cellContent,
|
|
4236
4308
|
children: Fe(a.column.columnDef.cell, a.getContext())
|
|
4237
|
-
}) : u && a !== void 0 ? /* @__PURE__ */
|
|
4309
|
+
}) : u && a !== void 0 ? /* @__PURE__ */ J(na, {
|
|
4238
4310
|
cell: a,
|
|
4239
4311
|
row: e,
|
|
4240
|
-
takeSeedText:
|
|
4241
|
-
onClose:
|
|
4312
|
+
takeSeedText: ca,
|
|
4313
|
+
onClose: sa,
|
|
4242
4314
|
inEntryBlock: !0
|
|
4243
4315
|
}) : null
|
|
4244
4316
|
}, r.id);
|
|
@@ -4246,13 +4318,13 @@ function Qi(t) {
|
|
|
4246
4318
|
}, e.id);
|
|
4247
4319
|
}, n[29] = a, n[30] = l, n[31] = i, n[32] = r, n[33] = o, n[34] = m) : m = n[34];
|
|
4248
4320
|
let h = m;
|
|
4249
|
-
C = c.length > 0 && /* @__PURE__ */
|
|
4321
|
+
C = c.length > 0 && /* @__PURE__ */ J("div", {
|
|
4250
4322
|
ref: p,
|
|
4251
4323
|
role: "rowgroup",
|
|
4252
4324
|
"data-dg-entry-block": !0,
|
|
4253
4325
|
className: $.entryBlock,
|
|
4254
4326
|
children: c.map((e) => h(e, "var(--dg-z-pinned-row-pinned-cell, 5)"))
|
|
4255
|
-
}), w = f.length > 0 && /* @__PURE__ */
|
|
4327
|
+
}), w = f.length > 0 && /* @__PURE__ */ J("div", {
|
|
4256
4328
|
role: "rowgroup",
|
|
4257
4329
|
"data-dg-entry-flow-block": !0,
|
|
4258
4330
|
className: $.entryFlowBlock,
|
|
@@ -4260,25 +4332,25 @@ function Qi(t) {
|
|
|
4260
4332
|
}), n[15] = l, n[16] = S, n[17] = u.editNewRowsSticky, n[18] = i, n[19] = d, n[20] = r, n[21] = o, n[22] = C, n[23] = w;
|
|
4261
4333
|
} else C = n[22], w = n[23];
|
|
4262
4334
|
let T;
|
|
4263
|
-
return n[35] !== C || n[36] !== w ? (T = /* @__PURE__ */
|
|
4335
|
+
return n[35] !== C || n[36] !== w ? (T = /* @__PURE__ */ Y(ue, { children: [C, w] }), n[35] = C, n[36] = w, n[37] = T) : T = n[37], T;
|
|
4264
4336
|
}
|
|
4265
|
-
function
|
|
4266
|
-
function
|
|
4267
|
-
function
|
|
4337
|
+
function sa() {}
|
|
4338
|
+
function ca() {}
|
|
4339
|
+
function la(e) {
|
|
4268
4340
|
return [e.column.id, e];
|
|
4269
4341
|
}
|
|
4270
|
-
function
|
|
4342
|
+
function ua(e) {
|
|
4271
4343
|
return [e.tempId, e.committed];
|
|
4272
4344
|
}
|
|
4273
|
-
function
|
|
4345
|
+
function da(e) {
|
|
4274
4346
|
return e.active !== null && e.newRows.some((t) => t.tempId === e.active?.rowId && !t.committed) ? e.active : null;
|
|
4275
4347
|
}
|
|
4276
|
-
function
|
|
4348
|
+
function fa(e) {
|
|
4277
4349
|
return e.newRows;
|
|
4278
4350
|
}
|
|
4279
4351
|
//#endregion
|
|
4280
4352
|
//#region src/tmdatagrid/core/draftCellContext.ts
|
|
4281
|
-
function
|
|
4353
|
+
function pa(e, t) {
|
|
4282
4354
|
let n = Object.create(e.row), r = n;
|
|
4283
4355
|
r.original = t, r._valuesCache = Object.create(null), r._uniqueValuesCache = Object.create(null);
|
|
4284
4356
|
let i = Object.create(e);
|
|
@@ -4293,7 +4365,7 @@ function aa(e, t) {
|
|
|
4293
4365
|
}
|
|
4294
4366
|
//#endregion
|
|
4295
4367
|
//#region src/tmdatagrid/core/cellRange.ts
|
|
4296
|
-
function
|
|
4368
|
+
function ma({ range: e, rowIndexOf: t, columnIndexOf: n }) {
|
|
4297
4369
|
if (e === null) return null;
|
|
4298
4370
|
let r = t(e.anchor.rowId), i = t(e.focus.rowId), a = n(e.anchor.columnId), o = n(e.focus.columnId);
|
|
4299
4371
|
return r < 0 || i < 0 || a < 0 || o < 0 ? null : {
|
|
@@ -4303,14 +4375,14 @@ function oa({ range: e, rowIndexOf: t, columnIndexOf: n }) {
|
|
|
4303
4375
|
right: Math.max(a, o)
|
|
4304
4376
|
};
|
|
4305
4377
|
}
|
|
4306
|
-
function
|
|
4378
|
+
function ha(e, t, n) {
|
|
4307
4379
|
return e !== null && t >= e.top && t <= e.bottom && n >= e.left && n <= e.right;
|
|
4308
4380
|
}
|
|
4309
|
-
function
|
|
4381
|
+
function ga(e) {
|
|
4310
4382
|
return e === null ? 0 : (e.bottom - e.top + 1) * (e.right - e.left + 1);
|
|
4311
4383
|
}
|
|
4312
|
-
function
|
|
4313
|
-
return !
|
|
4384
|
+
function _a(e, t, n) {
|
|
4385
|
+
return !ha(e, t, n) || e === null ? null : {
|
|
4314
4386
|
top: t === e.top,
|
|
4315
4387
|
bottom: t === e.bottom,
|
|
4316
4388
|
left: n === e.left,
|
|
@@ -4319,13 +4391,13 @@ function la(e, t, n) {
|
|
|
4319
4391
|
}
|
|
4320
4392
|
//#endregion
|
|
4321
4393
|
//#region src/tmdatagrid/core/cellExport.ts
|
|
4322
|
-
var
|
|
4394
|
+
var va = "", ya = {
|
|
4323
4395
|
separator: ";",
|
|
4324
4396
|
decimalComma: !0,
|
|
4325
4397
|
includeHeaders: !0,
|
|
4326
4398
|
fileName: "export"
|
|
4327
4399
|
};
|
|
4328
|
-
function
|
|
4400
|
+
function ba(e, { decimalComma: t }) {
|
|
4329
4401
|
if (e == null) return "";
|
|
4330
4402
|
if (typeof e == "number") {
|
|
4331
4403
|
if (!Number.isFinite(e)) return "";
|
|
@@ -4334,7 +4406,7 @@ function fa(e, { decimalComma: t }) {
|
|
|
4334
4406
|
}
|
|
4335
4407
|
if (typeof e == "string") return e;
|
|
4336
4408
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
4337
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
4409
|
+
if (Array.isArray(e)) return e.map((e) => ba(e, { decimalComma: t })).join(", ");
|
|
4338
4410
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? "" : e.toLocaleString("sv-SE");
|
|
4339
4411
|
if (typeof e == "object") try {
|
|
4340
4412
|
return JSON.stringify(e);
|
|
@@ -4343,18 +4415,18 @@ function fa(e, { decimalComma: t }) {
|
|
|
4343
4415
|
}
|
|
4344
4416
|
return String(e);
|
|
4345
4417
|
}
|
|
4346
|
-
function
|
|
4418
|
+
function xa({ rows: e, columns: t, bounds: n, includeHeaders: r, decimalComma: i }) {
|
|
4347
4419
|
let a = t.slice(n.left, n.right + 1).filter((e) => !xn(e.id));
|
|
4348
4420
|
if (a.length === 0) return [];
|
|
4349
4421
|
let o = [];
|
|
4350
4422
|
r && o.push(a.map((e) => mn(e)));
|
|
4351
4423
|
for (let t = n.top; t <= n.bottom; t += 1) {
|
|
4352
4424
|
let n = e[t];
|
|
4353
|
-
n !== void 0 && o.push(a.map((e) =>
|
|
4425
|
+
n !== void 0 && o.push(a.map((e) => ba(n.getValue(e.id), { decimalComma: i })));
|
|
4354
4426
|
}
|
|
4355
4427
|
return o;
|
|
4356
4428
|
}
|
|
4357
|
-
function
|
|
4429
|
+
function Sa({ table: e, includeHeaders: t = ya.includeHeaders, decimalComma: n = ya.decimalComma }) {
|
|
4358
4430
|
let r = e, i = [
|
|
4359
4431
|
...r.getLeftVisibleLeafColumns(),
|
|
4360
4432
|
...r.getCenterVisibleLeafColumns(),
|
|
@@ -4362,7 +4434,7 @@ function ma({ table: e, includeHeaders: t = da.includeHeaders, decimalComma: n =
|
|
|
4362
4434
|
], a = [], o = (e) => {
|
|
4363
4435
|
for (let t of e) t.getIsGrouped() ? o(t.subRows) : a.push(t);
|
|
4364
4436
|
};
|
|
4365
|
-
return o(r.getSortedRowModel().rows),
|
|
4437
|
+
return o(r.getSortedRowModel().rows), xa({
|
|
4366
4438
|
rows: a,
|
|
4367
4439
|
columns: i,
|
|
4368
4440
|
bounds: {
|
|
@@ -4375,43 +4447,43 @@ function ma({ table: e, includeHeaders: t = da.includeHeaders, decimalComma: n =
|
|
|
4375
4447
|
decimalComma: n
|
|
4376
4448
|
});
|
|
4377
4449
|
}
|
|
4378
|
-
function
|
|
4450
|
+
function Ca({ table: e, options: t }) {
|
|
4379
4451
|
let n = {
|
|
4380
|
-
...
|
|
4452
|
+
...ya,
|
|
4381
4453
|
...t
|
|
4382
|
-
}, r =
|
|
4454
|
+
}, r = Sa({
|
|
4383
4455
|
table: e,
|
|
4384
4456
|
includeHeaders: n.includeHeaders,
|
|
4385
4457
|
decimalComma: n.decimalComma
|
|
4386
4458
|
});
|
|
4387
|
-
r.length !== 0 &&
|
|
4459
|
+
r.length !== 0 && Oa({
|
|
4388
4460
|
fileName: `${n.fileName}.csv`,
|
|
4389
|
-
text:
|
|
4461
|
+
text: Ea(r, { separator: n.separator })
|
|
4390
4462
|
});
|
|
4391
4463
|
}
|
|
4392
|
-
function
|
|
4464
|
+
function wa(e, t) {
|
|
4393
4465
|
return e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? `"${e.replaceAll("\"", "\"\"")}"` : e;
|
|
4394
4466
|
}
|
|
4395
|
-
function
|
|
4396
|
-
return e.map((e) => e.map((e) =>
|
|
4467
|
+
function Ta(e) {
|
|
4468
|
+
return e.map((e) => e.map((e) => wa(e, " ")).join(" ")).join("\r\n");
|
|
4397
4469
|
}
|
|
4398
|
-
function
|
|
4399
|
-
return `${
|
|
4470
|
+
function Ea(e, { separator: t }) {
|
|
4471
|
+
return `${va}sep=${t}\r\n${e.map((e) => e.map((e) => wa(e, t)).join(t)).join("\r\n")}\r\n`;
|
|
4400
4472
|
}
|
|
4401
|
-
async function
|
|
4473
|
+
async function Da(e) {
|
|
4402
4474
|
try {
|
|
4403
4475
|
return await navigator.clipboard.writeText(e), !0;
|
|
4404
4476
|
} catch {
|
|
4405
4477
|
return !1;
|
|
4406
4478
|
}
|
|
4407
4479
|
}
|
|
4408
|
-
function
|
|
4480
|
+
function Oa({ fileName: e, text: t, mimeType: n = "text/csv;charset=utf-8" }) {
|
|
4409
4481
|
let r = URL.createObjectURL(new Blob([t], { type: n })), i = document.createElement("a");
|
|
4410
4482
|
i.href = r, i.download = e, i.style.display = "none", document.body.append(i), i.click(), i.remove(), setTimeout(() => URL.revokeObjectURL(r), 0);
|
|
4411
4483
|
}
|
|
4412
4484
|
//#endregion
|
|
4413
4485
|
//#region src/tmdatagrid/core/rowPinning.ts
|
|
4414
|
-
function
|
|
4486
|
+
function ka(e, t) {
|
|
4415
4487
|
let n = e.store.state.rowPinning[t];
|
|
4416
4488
|
if (n.length === 0) return [];
|
|
4417
4489
|
let r = e.getPrePaginatedRowModel().rowsById, i = e.getCoreRowModel().rowsById, a = [];
|
|
@@ -4423,17 +4495,17 @@ function xa(e, t) {
|
|
|
4423
4495
|
}
|
|
4424
4496
|
//#endregion
|
|
4425
4497
|
//#region src/tmdatagrid/core/matchHighlight.ts
|
|
4426
|
-
var
|
|
4498
|
+
var Aa = [
|
|
4427
4499
|
"contains",
|
|
4428
4500
|
"startsWith",
|
|
4429
4501
|
"endsWith"
|
|
4430
4502
|
];
|
|
4431
|
-
function
|
|
4503
|
+
function ja(e) {
|
|
4432
4504
|
let t = e.store.state, n = typeof t.globalFilter == "string" ? t.globalFilter.trim() : "", r = /* @__PURE__ */ new Map();
|
|
4433
4505
|
for (let e of t.columnFilters) {
|
|
4434
4506
|
if (!_t(e.value)) continue;
|
|
4435
4507
|
let { operator: t, value: n } = e.value;
|
|
4436
|
-
if (!
|
|
4508
|
+
if (!Aa.includes(t) || typeof n != "string" || n === "") continue;
|
|
4437
4509
|
let i = r.get(e.id) ?? [];
|
|
4438
4510
|
i.push(n), r.set(e.id, i);
|
|
4439
4511
|
}
|
|
@@ -4447,7 +4519,7 @@ function Ca(e) {
|
|
|
4447
4519
|
}
|
|
4448
4520
|
return i.size > 0 ? i : null;
|
|
4449
4521
|
}
|
|
4450
|
-
function
|
|
4522
|
+
function Ma(e, t) {
|
|
4451
4523
|
let n = e.toLowerCase(), r = [];
|
|
4452
4524
|
for (let e of t) {
|
|
4453
4525
|
let t = e.toLowerCase();
|
|
@@ -4469,37 +4541,37 @@ function wa(e, t) {
|
|
|
4469
4541
|
}
|
|
4470
4542
|
//#endregion
|
|
4471
4543
|
//#region src/tmdatagrid/components/TMDataGridTable.tsx
|
|
4472
|
-
var
|
|
4544
|
+
var Na = {
|
|
4473
4545
|
pinnedAt: !1,
|
|
4474
4546
|
offset: 0,
|
|
4475
4547
|
isBoundary: !1
|
|
4476
4548
|
};
|
|
4477
|
-
function
|
|
4549
|
+
function Pa(e, t) {
|
|
4478
4550
|
return e.querySelector(`[data-cell="true"][data-row-id="${CSS.escape(t.rowId)}"][data-column-id="${CSS.escape(t.columnId)}"]`);
|
|
4479
4551
|
}
|
|
4480
|
-
function
|
|
4552
|
+
function Fa({ container: e, cellElement: t, leftPinnedWidth: n, rightPinnedWidth: r }) {
|
|
4481
4553
|
let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + n, s = a.right - r;
|
|
4482
4554
|
i.left < o ? e.scrollLeft -= o - i.left : i.right > s && (e.scrollLeft += i.right - s);
|
|
4483
4555
|
}
|
|
4484
|
-
function
|
|
4556
|
+
function Ia(e) {
|
|
4485
4557
|
if (e.getIsPlaceholder()) return null;
|
|
4486
4558
|
if (!e.getIsAggregated()) return Fe(e.column.columnDef.cell, e.getContext());
|
|
4487
4559
|
let { aggregatedCell: t, aggregationFn: n } = e.column.columnDef;
|
|
4488
4560
|
return t === void 0 ? n === void 0 ? null : Fe(e.column.columnDef.cell, e.getContext()) : Fe(t, e.getContext());
|
|
4489
4561
|
}
|
|
4490
|
-
function
|
|
4491
|
-
let n =
|
|
4562
|
+
function La(e, t) {
|
|
4563
|
+
let n = Ma(e, t);
|
|
4492
4564
|
if (n === null) return e;
|
|
4493
4565
|
let r = [], i = 0;
|
|
4494
|
-
for (let t of n) t.start > i && r.push(e.slice(i, t.start)), r.push(/* @__PURE__ */
|
|
4566
|
+
for (let t of n) t.start > i && r.push(e.slice(i, t.start)), r.push(/* @__PURE__ */ J("mark", {
|
|
4495
4567
|
className: $.matchHighlight,
|
|
4496
4568
|
children: e.slice(t.start, t.end)
|
|
4497
4569
|
}, t.start)), i = t.end;
|
|
4498
4570
|
return i < e.length && r.push(e.slice(i)), r;
|
|
4499
4571
|
}
|
|
4500
|
-
function
|
|
4572
|
+
function Ra(t) {
|
|
4501
4573
|
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;
|
|
4502
|
-
n[0] === r.column ? v = n[1] : (v =
|
|
4574
|
+
n[0] === r.column ? v = n[1] : (v = tr(r.column), n[0] = r.column, n[1] = v);
|
|
4503
4575
|
let y = v, b = r.row.id, x;
|
|
4504
4576
|
n[2] === r.column.id ? x = n[3] : (x = xn(r.column.id), n[2] = r.column.id, n[3] = x);
|
|
4505
4577
|
let S = x, C;
|
|
@@ -4516,36 +4588,36 @@ function Aa(t) {
|
|
|
4516
4588
|
}, n[7] = b, n[8] = y, n[9] = T) : T = n[9];
|
|
4517
4589
|
let E = j(_.store, T), D;
|
|
4518
4590
|
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];
|
|
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,
|
|
4520
|
-
n[13] === r.column ?
|
|
4521
|
-
let
|
|
4522
|
-
n[15] !==
|
|
4591
|
+
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, te = w || void 0, ne = E || void 0, re;
|
|
4592
|
+
n[13] === r.column ? re = n[14] : (re = bn(r.column), n[13] = r.column, n[14] = re);
|
|
4593
|
+
let U = a.isBoundary && a.pinnedAt === "left" ? wi.stickyLeft : "", ie = a.isBoundary && a.pinnedAt === "right" ? wi.stickyRight : "", ae;
|
|
4594
|
+
n[15] !== U || n[16] !== ie ? (ae = [
|
|
4523
4595
|
$.bodyCell,
|
|
4524
|
-
|
|
4596
|
+
U,
|
|
4525
4597
|
ie
|
|
4526
|
-
].filter(Boolean), n[15] =
|
|
4527
|
-
let oe = ae.join(" "),
|
|
4528
|
-
n[18] !== i || n[19] !==
|
|
4598
|
+
].filter(Boolean), n[15] = U, n[16] = ie, n[17] = ae) : ae = n[17];
|
|
4599
|
+
let oe = ae.join(" "), se = a.pinnedAt === "left" ? a.offset : void 0, W = a.pinnedAt === "right" ? a.offset : void 0, G = a.pinnedAt ? "sticky" : o?.focused ? "relative" : void 0, K = o?.focused ? "var(--dg-z-focused-cell, 3)" : a.pinnedAt ? "var(--dg-z-pinned-cell, 2)" : void 0, ce;
|
|
4600
|
+
n[18] !== i || n[19] !== se || n[20] !== W || n[21] !== G || n[22] !== K ? (ce = {
|
|
4529
4601
|
minHeight: i,
|
|
4530
|
-
left:
|
|
4531
|
-
right:
|
|
4532
|
-
position:
|
|
4602
|
+
left: se,
|
|
4603
|
+
right: W,
|
|
4604
|
+
position: G,
|
|
4533
4605
|
zIndex: K
|
|
4534
|
-
}, n[18] = i, n[19] =
|
|
4535
|
-
let
|
|
4536
|
-
n[24] !== r || n[25] !== c || n[26] !== O || n[27] !== s || n[28] !== l || n[29] !== g ? (
|
|
4606
|
+
}, n[18] = i, n[19] = se, n[20] = W, n[21] = G, n[22] = K, n[23] = ce) : ce = n[23];
|
|
4607
|
+
let q;
|
|
4608
|
+
n[24] !== r || n[25] !== c || n[26] !== O || n[27] !== s || n[28] !== l || n[29] !== g ? (q = s ?? /* @__PURE__ */ J("span", {
|
|
4537
4609
|
className: $.cellContent,
|
|
4538
4610
|
children: (() => {
|
|
4539
|
-
let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r.getIsAggregated() ?
|
|
4611
|
+
let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r.getIsAggregated() ? pa(r, O) : void 0;
|
|
4540
4612
|
if (l !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r.getIsAggregated() && r.column.columnDef.cell === g.getDefaultColumnDef().cell) {
|
|
4541
4613
|
let t = e === void 0 ? r.renderValue() : e.renderValue();
|
|
4542
|
-
if (typeof t == "string" || typeof t == "number") return
|
|
4614
|
+
if (typeof t == "string" || typeof t == "number") return La(String(t), l);
|
|
4543
4615
|
}
|
|
4544
|
-
return e === void 0 ? c ??
|
|
4616
|
+
return e === void 0 ? c ?? Ia(r) : Fe(r.column.columnDef.cell, e);
|
|
4545
4617
|
})()
|
|
4546
|
-
}), n[24] = r, n[25] = c, n[26] = O, n[27] = s, n[28] = l, n[29] = g, n[30] =
|
|
4547
|
-
let
|
|
4548
|
-
return 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] !==
|
|
4618
|
+
}), n[24] = r, n[25] = c, n[26] = O, n[27] = s, n[28] = l, n[29] = g, n[30] = q) : q = n[30];
|
|
4619
|
+
let le;
|
|
4620
|
+
return 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] !== te || n[49] !== ne || n[50] !== re || n[51] !== oe || n[52] !== ce || n[53] !== q || n[54] !== k || n[55] !== A || n[56] !== M || n[57] !== N ? (le = /* @__PURE__ */ J("div", {
|
|
4549
4621
|
role: k,
|
|
4550
4622
|
"aria-colindex": A,
|
|
4551
4623
|
tabIndex: M,
|
|
@@ -4565,21 +4637,21 @@ function Aa(t) {
|
|
|
4565
4637
|
onMouseEnter: p,
|
|
4566
4638
|
onDoubleClick: m,
|
|
4567
4639
|
"data-editing": ee,
|
|
4568
|
-
"data-dirty":
|
|
4569
|
-
"data-invalid":
|
|
4570
|
-
"data-align":
|
|
4640
|
+
"data-dirty": te,
|
|
4641
|
+
"data-invalid": ne,
|
|
4642
|
+
"data-align": re,
|
|
4571
4643
|
"data-control-column": S,
|
|
4572
4644
|
onContextMenu: h,
|
|
4573
4645
|
className: oe,
|
|
4574
4646
|
style: ce,
|
|
4575
|
-
children:
|
|
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] =
|
|
4647
|
+
children: q
|
|
4648
|
+
}), 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] = te, n[49] = ne, n[50] = re, n[51] = oe, n[52] = ce, n[53] = q, n[54] = k, n[55] = A, n[56] = M, n[57] = N, n[58] = le) : le = n[58], le;
|
|
4577
4649
|
}
|
|
4578
|
-
function
|
|
4650
|
+
function za(t) {
|
|
4579
4651
|
let n = e(16), { enabled: r, menuContent: i, menuProps: a, onContextMenu: o, onClose: s, children: c } = t, l;
|
|
4580
4652
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { display: "contents" }, n[0] = l) : l = n[0];
|
|
4581
4653
|
let u = r ? o : void 0, d;
|
|
4582
|
-
n[1] !== c || n[2] !== u ? (d = /* @__PURE__ */
|
|
4654
|
+
n[1] !== c || n[2] !== u ? (d = /* @__PURE__ */ J("div", {
|
|
4583
4655
|
role: "rowgroup",
|
|
4584
4656
|
style: l,
|
|
4585
4657
|
onContextMenu: u,
|
|
@@ -4592,11 +4664,11 @@ function ja(t) {
|
|
|
4592
4664
|
e || s();
|
|
4593
4665
|
}, n[4] = s, n[5] = m);
|
|
4594
4666
|
let h;
|
|
4595
|
-
n[6] === f ? h = n[7] : (h = /* @__PURE__ */
|
|
4667
|
+
n[6] === f ? h = n[7] : (h = /* @__PURE__ */ J(g.ContextMenu, { children: f }), n[6] = f, n[7] = h);
|
|
4596
4668
|
let _;
|
|
4597
|
-
n[8] === i ? _ = n[9] : (_ = /* @__PURE__ */
|
|
4669
|
+
n[8] === i ? _ = n[9] : (_ = /* @__PURE__ */ J(g.Dropdown, { children: i }), n[8] = i, n[9] = _);
|
|
4598
4670
|
let v;
|
|
4599
|
-
return n[10] !== a || n[11] !== p || n[12] !== m || n[13] !== h || n[14] !== _ ? (v = /* @__PURE__ */
|
|
4671
|
+
return n[10] !== a || n[11] !== p || n[12] !== m || n[13] !== h || n[14] !== _ ? (v = /* @__PURE__ */ Y(g, {
|
|
4600
4672
|
opened: p,
|
|
4601
4673
|
onChange: m,
|
|
4602
4674
|
position: "bottom-start",
|
|
@@ -4606,10 +4678,10 @@ function ja(t) {
|
|
|
4606
4678
|
children: [h, _]
|
|
4607
4679
|
}), n[10] = a, n[11] = p, n[12] = m, n[13] = h, n[14] = _, n[15] = v) : v = n[15], v;
|
|
4608
4680
|
}
|
|
4609
|
-
function
|
|
4681
|
+
function Ba({ 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 }) {
|
|
4610
4682
|
let { table: k, ui: A, edit: M, features: N, labels: P, rowHeight: F, controlSize: I, renderDetails: L, renderDetailsEstHeight: R, overscan: z, scrollerRef: B } = Q();
|
|
4611
4683
|
j(k.store);
|
|
4612
|
-
let V = j(A, (e) => e.highlightedRowId), H = j(A, (e) => e.focusedCell), ee = j(A, (e) => e.cellRange),
|
|
4684
|
+
let V = j(A, (e) => e.highlightedRowId), H = j(A, (e) => e.focusedCell), ee = j(A, (e) => e.cellRange), te = j(M.store, (e) => e.active), ne = j(M.store, (e) => e.openRowIds), re = j(M.store, (e) => e.newRows.length), U = j(M.store, (e) => e.deletedRowIds), ie = j(M.store, (e) => e.openRowIds.filter((t) => (e.rows[t]?.dirtyFields.length ?? 0) > 0)), ae = j(M.store, (e) => e.committedRowIds), { loading: oe, noResultsLabel: se = P.noResults } = k.options.meta ?? {}, W = s(null), G = rn(k, N), K = N.matchHighlighting ? ja(k) : null, q = N.rowPinning ? ka(k, "top") : [], le = N.rowPinning ? ka(k, "bottom") : [], de = q.length + le.length, fe = null;
|
|
4613
4685
|
if (N.rowNumbers) {
|
|
4614
4686
|
fe = /* @__PURE__ */ new Map();
|
|
4615
4687
|
let e = an(k, N) ? k.store.state.pagination.pageIndex * k.store.state.pagination.pageSize : 0;
|
|
@@ -4626,7 +4698,7 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4626
4698
|
t.delete(n);
|
|
4627
4699
|
continue;
|
|
4628
4700
|
}
|
|
4629
|
-
|
|
4701
|
+
Ai(e, n) && (Mi({
|
|
4630
4702
|
table: k,
|
|
4631
4703
|
columnId: n,
|
|
4632
4704
|
container: e
|
|
@@ -4635,7 +4707,7 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4635
4707
|
});
|
|
4636
4708
|
let he = s(null);
|
|
4637
4709
|
i(() => {
|
|
4638
|
-
if (
|
|
4710
|
+
if (re === 0 && q.length === 0) return;
|
|
4639
4711
|
let e = he.current;
|
|
4640
4712
|
if (e === null) return;
|
|
4641
4713
|
let t = e.querySelectorAll("[data-dg-header-row]"), n = () => {
|
|
@@ -4647,8 +4719,8 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4647
4719
|
let r = new ResizeObserver(n);
|
|
4648
4720
|
for (let e of t) r.observe(e);
|
|
4649
4721
|
return () => r.disconnect();
|
|
4650
|
-
}, [
|
|
4651
|
-
if (
|
|
4722
|
+
}, [re, q.length]), i(() => {
|
|
4723
|
+
if (re === 0 || q.length === 0) return;
|
|
4652
4724
|
let e = he.current;
|
|
4653
4725
|
if (e === null) return;
|
|
4654
4726
|
let t = e.querySelector("[data-dg-entry-block]");
|
|
@@ -4659,7 +4731,7 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4659
4731
|
return r.observe(t), () => {
|
|
4660
4732
|
r.disconnect(), e.style.removeProperty("--dg-entry-height");
|
|
4661
4733
|
};
|
|
4662
|
-
}, [
|
|
4734
|
+
}, [re, q.length]), i(() => {
|
|
4663
4735
|
if (le.length === 0) return;
|
|
4664
4736
|
let e = he.current;
|
|
4665
4737
|
if (e === null) return;
|
|
@@ -4692,29 +4764,29 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4692
4764
|
}
|
|
4693
4765
|
}), _e = ge.getVirtualItems(), ve = _e[0]?.start ?? 0, ye = ge.getTotalSize() - (_e.at(-1)?.end ?? 0);
|
|
4694
4766
|
i(() => (B.current = ({ rowId: e, align: t = "auto" }) => {
|
|
4695
|
-
if (
|
|
4767
|
+
if (q.some((t) => t.id === e) || le.some((t) => t.id === e)) return !0;
|
|
4696
4768
|
let n = G.findIndex((t) => t.id === e);
|
|
4697
4769
|
return n < 0 ? !1 : (ge.scrollToIndex(n, { align: t }), !0);
|
|
4698
4770
|
}, () => {
|
|
4699
4771
|
B.current = () => !1;
|
|
4700
4772
|
}));
|
|
4701
|
-
let
|
|
4773
|
+
let be = s(null), xe = s(!1), Se = _e.at(-1)?.index ?? -1;
|
|
4702
4774
|
i(() => {
|
|
4703
|
-
w === void 0 || G.length === 0 || (N.pagination && !
|
|
4775
|
+
w === void 0 || G.length === 0 || (N.pagination && !xe.current && (xe.current = !0, console.warn("TMDataGrid: onReachEnd and pagination slice the same scroll - the pager caps the rows, so the end it reaches is the page's. Use one or the other.")), !(Se < G.length - 1 - T) && be.current !== G.length && (be.current = G.length, w()));
|
|
4704
4776
|
});
|
|
4705
|
-
let
|
|
4706
|
-
...
|
|
4707
|
-
...
|
|
4708
|
-
...
|
|
4709
|
-
],
|
|
4777
|
+
let Ce = k.getLeftVisibleLeafColumns(), we = k.getRightVisibleLeafColumns(), Te = k.getCenterVisibleLeafColumns(), X = [
|
|
4778
|
+
...Ce,
|
|
4779
|
+
...Te,
|
|
4780
|
+
...we
|
|
4781
|
+
], Ee = k.getCenterHeaderGroups(), Z = k.getLeftHeaderGroups(), De = k.getRightHeaderGroups(), Oe = Ee.map((e, t) => ({
|
|
4710
4782
|
id: e.id,
|
|
4711
4783
|
headers: [
|
|
4712
|
-
...
|
|
4784
|
+
...Z[t]?.headers ?? [],
|
|
4713
4785
|
...e.headers,
|
|
4714
|
-
...
|
|
4786
|
+
...De[t]?.headers ?? []
|
|
4715
4787
|
]
|
|
4716
|
-
})),
|
|
4717
|
-
let t = e.columnDef.minSize === e.columnDef.maxSize, n = e.id in
|
|
4788
|
+
})), ke = k.store.state.columnSizing, Ae = X.map((e) => {
|
|
4789
|
+
let t = e.columnDef.minSize === e.columnDef.maxSize, n = e.id in ke, r = e.getIsPinned() !== !1, i = e.columnDef.minSize ?? 80;
|
|
4718
4790
|
return t || n || r ? {
|
|
4719
4791
|
track: `${e.getSize()}px`,
|
|
4720
4792
|
minWidth: e.getSize()
|
|
@@ -4722,25 +4794,25 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4722
4794
|
track: `minmax(${i}px, ${e.columnDef.meta?.flex ?? 1}fr)`,
|
|
4723
4795
|
minWidth: i
|
|
4724
4796
|
};
|
|
4725
|
-
}),
|
|
4726
|
-
for (let e of
|
|
4797
|
+
}), je = Ae.map((e) => e.track).join(" "), Me = Ae.reduce((e, t) => e + t.minWidth, 0), Ne = /* @__PURE__ */ new Map(), Pe = (e) => Ae[X.findIndex((t) => t.id === e)]?.minWidth ?? 0, Ie = 0;
|
|
4798
|
+
for (let e of Ce) Ne.set(e.id, {
|
|
4727
4799
|
pinnedAt: "left",
|
|
4728
|
-
offset: Pe,
|
|
4729
|
-
isBoundary: e.id === Se.at(-1)?.id
|
|
4730
|
-
}), Pe += Ne(e.id);
|
|
4731
|
-
let Ie = 0;
|
|
4732
|
-
for (let e of [...Ce].reverse()) Me.set(e.id, {
|
|
4733
|
-
pinnedAt: "right",
|
|
4734
4800
|
offset: Ie,
|
|
4735
|
-
isBoundary: e.id === Ce
|
|
4736
|
-
}), Ie +=
|
|
4737
|
-
|
|
4801
|
+
isBoundary: e.id === Ce.at(-1)?.id
|
|
4802
|
+
}), Ie += Pe(e.id);
|
|
4803
|
+
let Le = 0;
|
|
4804
|
+
for (let e of [...we].reverse()) Ne.set(e.id, {
|
|
4805
|
+
pinnedAt: "right",
|
|
4806
|
+
offset: Le,
|
|
4807
|
+
isBoundary: e.id === we[0]?.id
|
|
4808
|
+
}), Le += Pe(e.id);
|
|
4809
|
+
for (let e of Te) Ne.set(e.id, {
|
|
4738
4810
|
pinnedAt: !1,
|
|
4739
4811
|
offset: 0,
|
|
4740
4812
|
isBoundary: !1
|
|
4741
4813
|
});
|
|
4742
|
-
let
|
|
4743
|
-
if (
|
|
4814
|
+
let Re = (e) => Ne.get(e) ?? Na, ze = G.length === 0 && de === 0, Be = k.store.state.globalFilter, Ve = k.store.state.columnFilters.length > 0 || (typeof Be == "string" ? Be.trim() !== "" : Be != null), He = Oe.at(-1)?.headers ?? [], Ue = X.some((e) => e.columnDef.footer !== void 0), We = N.rowClickSelects, Ge = We || N.highlightRow || e !== void 0, Ke = (e) => !e.getIsGrouped() && Ge, qe = (t, n) => {
|
|
4815
|
+
if (We && t.getCanSelect()) {
|
|
4744
4816
|
let e = sn({
|
|
4745
4817
|
rows: G,
|
|
4746
4818
|
rowId: t.id,
|
|
@@ -4752,118 +4824,118 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4752
4824
|
k.setRowSelection(e.selection), A.actions.setSelectionAnchor(e.anchorRowId);
|
|
4753
4825
|
}
|
|
4754
4826
|
N.highlightRow && A.actions.setHighlightedRow(t.id), e?.(t);
|
|
4755
|
-
},
|
|
4827
|
+
}, Ye = (e) => typeof l == "function" ? l(e) : l, Xe = (e) => typeof u == "function" ? u(e) : u, Ze = (e, t, n) => ({
|
|
4756
4828
|
cell: e,
|
|
4757
4829
|
row: t,
|
|
4758
4830
|
column: e.column,
|
|
4759
4831
|
event: n
|
|
4760
|
-
}),
|
|
4761
|
-
rowId:
|
|
4832
|
+
}), Qe = N.cellSelection, $e = N.cellRangeSelection, et = s(!1), tt = s(null), nt = Qe && H !== null ? G.findIndex((e) => e.id === H.rowId) : -1, rt = Qe && H !== null ? X.findIndex((e) => e.id === H.columnId) : -1, it = nt >= 0 && _e.some((e) => e.index === nt), at = G[_e[0]?.index ?? -1], ot = Qe ? it && H !== null ? H : at && X[0] ? {
|
|
4833
|
+
rowId: at.id,
|
|
4762
4834
|
columnId: X[0].id
|
|
4763
|
-
} : null : null,
|
|
4764
|
-
range:
|
|
4835
|
+
} : null : null, st = (e, t, n) => e !== null && e.rowId === t && e.columnId === n, ct = ma({
|
|
4836
|
+
range: $e ? ee : null,
|
|
4765
4837
|
rowIndexOf: (e) => G.findIndex((t) => t.id === e),
|
|
4766
4838
|
columnIndexOf: (e) => X.findIndex((t) => t.id === e)
|
|
4767
|
-
}),
|
|
4768
|
-
if (
|
|
4839
|
+
}), lt = (e, { extend: t }) => {
|
|
4840
|
+
if (!$e) return;
|
|
4769
4841
|
let n = t ? ee?.anchor ?? e : e;
|
|
4770
4842
|
A.actions.setCellRange({
|
|
4771
4843
|
anchor: n,
|
|
4772
4844
|
focus: e
|
|
4773
4845
|
});
|
|
4774
|
-
},
|
|
4775
|
-
top:
|
|
4776
|
-
bottom:
|
|
4777
|
-
left:
|
|
4778
|
-
right:
|
|
4779
|
-
} : null),
|
|
4780
|
-
...
|
|
4846
|
+
}, ut = ct ?? (Qe && nt >= 0 && rt >= 0 ? {
|
|
4847
|
+
top: nt,
|
|
4848
|
+
bottom: nt,
|
|
4849
|
+
left: rt,
|
|
4850
|
+
right: rt
|
|
4851
|
+
} : null), dt = ga(ut), ft = ut === null ? 0 : X.slice(ut.left, ut.right + 1).filter((e) => !xn(e.id)).length, pt = {
|
|
4852
|
+
...ya,
|
|
4781
4853
|
...C
|
|
4782
|
-
}, [
|
|
4854
|
+
}, [mt, ht] = c(pt.includeHeaders), gt = (e) => ut === null ? [] : xa({
|
|
4783
4855
|
rows: G,
|
|
4784
4856
|
columns: X,
|
|
4785
|
-
bounds:
|
|
4857
|
+
bounds: ut,
|
|
4786
4858
|
includeHeaders: e,
|
|
4787
|
-
decimalComma:
|
|
4788
|
-
}),
|
|
4789
|
-
let e =
|
|
4790
|
-
e.length !== 0 && await
|
|
4791
|
-
}, [
|
|
4859
|
+
decimalComma: pt.decimalComma
|
|
4860
|
+
}), _t = async () => {
|
|
4861
|
+
let e = gt(!1);
|
|
4862
|
+
e.length !== 0 && await Da(Ta(e));
|
|
4863
|
+
}, [vt, yt] = c(!1);
|
|
4792
4864
|
i(() => {
|
|
4793
|
-
if (!
|
|
4794
|
-
let e = () =>
|
|
4865
|
+
if (!vt) return;
|
|
4866
|
+
let e = () => yt(!1);
|
|
4795
4867
|
return window.addEventListener("mouseup", e), () => window.removeEventListener("mouseup", e);
|
|
4796
|
-
}, [
|
|
4797
|
-
let
|
|
4798
|
-
A.actions.setFocusedCell(e),
|
|
4799
|
-
},
|
|
4800
|
-
let t =
|
|
4801
|
-
t.length !== 0 &&
|
|
4802
|
-
fileName: `${
|
|
4803
|
-
text:
|
|
4868
|
+
}, [vt]);
|
|
4869
|
+
let bt = (e, { extend: t }) => {
|
|
4870
|
+
A.actions.setFocusedCell(e), lt(e, { extend: t }), t || yt(!0);
|
|
4871
|
+
}, xt = (e) => {
|
|
4872
|
+
let t = gt(e);
|
|
4873
|
+
t.length !== 0 && Oa({
|
|
4874
|
+
fileName: `${pt.fileName}.csv`,
|
|
4875
|
+
text: Ea(t, { separator: pt.separator })
|
|
4804
4876
|
});
|
|
4805
|
-
},
|
|
4877
|
+
}, St = (e, { extend: t } = { extend: !1 }) => {
|
|
4806
4878
|
let n = G[e.rowIndex], r = X[e.columnIndex];
|
|
4807
4879
|
if (!n || !r) return;
|
|
4808
4880
|
let i = {
|
|
4809
4881
|
rowId: n.id,
|
|
4810
4882
|
columnId: r.id
|
|
4811
4883
|
};
|
|
4812
|
-
|
|
4813
|
-
},
|
|
4814
|
-
let e =
|
|
4815
|
-
return
|
|
4816
|
-
},
|
|
4884
|
+
et.current = !0, A.actions.setFocusedCell(i), lt(i, { extend: t });
|
|
4885
|
+
}, Ct = s(void 0), wt = () => {
|
|
4886
|
+
let e = Ct.current;
|
|
4887
|
+
return Ct.current = void 0, e;
|
|
4888
|
+
}, Tt = (e) => {
|
|
4817
4889
|
let t = G.find((t) => t.id === e);
|
|
4818
4890
|
return t === void 0 ? null : [
|
|
4819
4891
|
...t.getLeftVisibleCells(),
|
|
4820
4892
|
...t.getCenterVisibleCells(),
|
|
4821
4893
|
...t.getRightVisibleCells()
|
|
4822
4894
|
].find((e) => M.canEditCell(t, e.column))?.column.id ?? null;
|
|
4823
|
-
},
|
|
4895
|
+
}, Et = s(null);
|
|
4824
4896
|
a(() => {
|
|
4825
|
-
if (
|
|
4826
|
-
|
|
4897
|
+
if (te === null) {
|
|
4898
|
+
Et.current = null;
|
|
4827
4899
|
return;
|
|
4828
4900
|
}
|
|
4829
|
-
if (
|
|
4901
|
+
if (Et.current === te) return;
|
|
4830
4902
|
let e = W.current;
|
|
4831
4903
|
if (e === null) return;
|
|
4832
|
-
let t =
|
|
4904
|
+
let t = te.columnId ?? Tt(te.rowId);
|
|
4833
4905
|
if (t === null) {
|
|
4834
|
-
|
|
4906
|
+
Et.current = te;
|
|
4835
4907
|
return;
|
|
4836
4908
|
}
|
|
4837
|
-
let n = e.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(
|
|
4838
|
-
n !== null && (
|
|
4909
|
+
let n = e.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(te.rowId)}"][data-column-id="${CSS.escape(t)}"]`);
|
|
4910
|
+
n !== null && (Et.current = te, ia(n));
|
|
4839
4911
|
});
|
|
4840
|
-
let
|
|
4912
|
+
let Dt = (e) => {
|
|
4841
4913
|
let t = W.current;
|
|
4842
|
-
t !== null && (
|
|
4843
|
-
},
|
|
4844
|
-
|
|
4914
|
+
t !== null && (et.current = !0, Pa(t, e)?.focus());
|
|
4915
|
+
}, Ot = (e) => {
|
|
4916
|
+
Qe && A.actions.setFocusedCell(e), M.begin({
|
|
4845
4917
|
rowId: e.rowId,
|
|
4846
4918
|
columnId: e.columnId
|
|
4847
4919
|
});
|
|
4848
|
-
},
|
|
4920
|
+
}, kt = (e, t) => {
|
|
4849
4921
|
let n = t.via === "enter" ? "down" : t.via === "tab" || t.via === "defer-tab" ? 1 : t.via === "shift-tab" || t.via === "defer-shift-tab" ? -1 : null;
|
|
4850
4922
|
if (n === null || N.editMode === "row") {
|
|
4851
|
-
|
|
4923
|
+
Dt(e);
|
|
4852
4924
|
return;
|
|
4853
4925
|
}
|
|
4854
4926
|
let r = G.findIndex((t) => t.id === e.rowId), i = X.findIndex((t) => t.id === e.columnId);
|
|
4855
4927
|
if (r < 0 || i < 0) {
|
|
4856
|
-
|
|
4928
|
+
Dt(e);
|
|
4857
4929
|
return;
|
|
4858
4930
|
}
|
|
4859
4931
|
if (n === "down") {
|
|
4860
|
-
r + 1 < G.length ?
|
|
4932
|
+
r + 1 < G.length ? St({
|
|
4861
4933
|
rowIndex: r + 1,
|
|
4862
4934
|
columnIndex: i
|
|
4863
|
-
}) :
|
|
4935
|
+
}) : Dt(e);
|
|
4864
4936
|
return;
|
|
4865
4937
|
}
|
|
4866
|
-
let a =
|
|
4938
|
+
let a = qr({
|
|
4867
4939
|
from: {
|
|
4868
4940
|
rowIndex: r,
|
|
4869
4941
|
columnIndex: i
|
|
@@ -4876,8 +4948,8 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4876
4948
|
return t !== void 0 && n !== void 0 && M.canEditCell(t, n);
|
|
4877
4949
|
}
|
|
4878
4950
|
});
|
|
4879
|
-
a === null ?
|
|
4880
|
-
},
|
|
4951
|
+
a === null ? Dt(e) : St(a);
|
|
4952
|
+
}, At = (e, { extend: t }) => {
|
|
4881
4953
|
if (N.rowSelection && on(e).length > 0) {
|
|
4882
4954
|
let n = sn({
|
|
4883
4955
|
rows: G,
|
|
@@ -4894,7 +4966,7 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4894
4966
|
return;
|
|
4895
4967
|
}
|
|
4896
4968
|
N.highlightRow && !e.getIsGrouped() && A.actions.setHighlightedRow(e.id);
|
|
4897
|
-
},
|
|
4969
|
+
}, jt = (e) => {
|
|
4898
4970
|
let t = e.target;
|
|
4899
4971
|
if (t.dataset.cell !== "true") {
|
|
4900
4972
|
if (e.key !== "Escape") return;
|
|
@@ -4908,14 +4980,14 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4908
4980
|
let i = G.findIndex((e) => e.id === n), a = X.findIndex((e) => e.id === r);
|
|
4909
4981
|
if (i < 0 || a < 0) return;
|
|
4910
4982
|
if ((e.ctrlKey || e.metaKey) && (e.key === "c" || e.key === "C")) {
|
|
4911
|
-
if (
|
|
4912
|
-
e.preventDefault(),
|
|
4983
|
+
if (ut === null) return;
|
|
4984
|
+
e.preventDefault(), _t();
|
|
4913
4985
|
return;
|
|
4914
4986
|
}
|
|
4915
4987
|
let o = G[i], s = X[a];
|
|
4916
4988
|
if (N.editing && o !== void 0 && s !== void 0 && M.canEditCell(o, s)) {
|
|
4917
4989
|
if (e.key === "Enter" || e.key === "F2") {
|
|
4918
|
-
e.preventDefault(),
|
|
4990
|
+
e.preventDefault(), Ot({
|
|
4919
4991
|
rowId: n,
|
|
4920
4992
|
columnId: r
|
|
4921
4993
|
});
|
|
@@ -4923,14 +4995,14 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4923
4995
|
}
|
|
4924
4996
|
if (N.editMode !== "row") {
|
|
4925
4997
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
4926
|
-
e.preventDefault(), M.clearCell(n, r).then(() =>
|
|
4998
|
+
e.preventDefault(), M.clearCell(n, r).then(() => Dt({
|
|
4927
4999
|
rowId: n,
|
|
4928
5000
|
columnId: r
|
|
4929
5001
|
}));
|
|
4930
5002
|
return;
|
|
4931
5003
|
}
|
|
4932
5004
|
if (e.key.length === 1 && e.key !== " " && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
4933
|
-
e.preventDefault(),
|
|
5005
|
+
e.preventDefault(), Ct.current = e.key, Ot({
|
|
4934
5006
|
rowId: n,
|
|
4935
5007
|
columnId: r
|
|
4936
5008
|
});
|
|
@@ -4939,14 +5011,14 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4939
5011
|
}
|
|
4940
5012
|
}
|
|
4941
5013
|
if (e.key === "Enter" || e.key === "F2") {
|
|
4942
|
-
let n = t.querySelector(
|
|
5014
|
+
let n = t.querySelector(ra);
|
|
4943
5015
|
if (n === null) return;
|
|
4944
5016
|
e.preventDefault(), n.focus();
|
|
4945
5017
|
return;
|
|
4946
5018
|
}
|
|
4947
5019
|
if (e.key === "Escape") {
|
|
4948
5020
|
if (ee === null) return;
|
|
4949
|
-
e.preventDefault(),
|
|
5021
|
+
e.preventDefault(), lt({
|
|
4950
5022
|
rowId: n,
|
|
4951
5023
|
columnId: r
|
|
4952
5024
|
}, { extend: !1 });
|
|
@@ -4955,10 +5027,10 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4955
5027
|
if (e.key === " ") {
|
|
4956
5028
|
e.preventDefault();
|
|
4957
5029
|
let t = G[i];
|
|
4958
|
-
t &&
|
|
5030
|
+
t && At(t, { extend: e.shiftKey });
|
|
4959
5031
|
return;
|
|
4960
5032
|
}
|
|
4961
|
-
let c =
|
|
5033
|
+
let c = Kr({
|
|
4962
5034
|
key: e.key,
|
|
4963
5035
|
ctrlKey: e.ctrlKey || e.metaKey,
|
|
4964
5036
|
from: {
|
|
@@ -4969,151 +5041,151 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4969
5041
|
columnCount: X.length,
|
|
4970
5042
|
pageRows: Math.max(1, Math.floor((W.current?.clientHeight ?? 0) / F) - 1)
|
|
4971
5043
|
});
|
|
4972
|
-
c !== null && (e.preventDefault(), !(c.rowIndex === i && c.columnIndex === a) &&
|
|
5044
|
+
c !== null && (e.preventDefault(), !(c.rowIndex === i && c.columnIndex === a) && St(c, { extend: e.shiftKey && $e }));
|
|
4973
5045
|
};
|
|
4974
5046
|
i(() => {
|
|
4975
|
-
if (!
|
|
5047
|
+
if (!Qe) return;
|
|
4976
5048
|
let e = W.current;
|
|
4977
5049
|
if (e === null) return;
|
|
4978
|
-
if (H !==
|
|
4979
|
-
|
|
5050
|
+
if (H !== tt.current && (tt.current = H, nt >= 0 && ge.scrollToIndex(nt, { align: "auto" })), H === null) {
|
|
5051
|
+
et.current = !1;
|
|
4980
5052
|
return;
|
|
4981
5053
|
}
|
|
4982
|
-
if (
|
|
4983
|
-
let t =
|
|
4984
|
-
t !== null && (
|
|
5054
|
+
if (!et.current && !e.contains(document.activeElement)) return;
|
|
5055
|
+
let t = Pa(e, H);
|
|
5056
|
+
t !== null && (et.current = !1, !t.contains(document.activeElement) && (document.activeElement instanceof Element && document.activeElement.closest("[data-dg-part=\"editor\"]") !== null || (t.focus({ preventScroll: !0 }), Re(H.columnId).pinnedAt === !1 && Fa({
|
|
4985
5057
|
container: e,
|
|
4986
5058
|
cellElement: t,
|
|
4987
|
-
leftPinnedWidth:
|
|
4988
|
-
rightPinnedWidth:
|
|
5059
|
+
leftPinnedWidth: Ie,
|
|
5060
|
+
rightPinnedWidth: Le
|
|
4989
5061
|
}))));
|
|
4990
5062
|
});
|
|
4991
|
-
let [
|
|
4992
|
-
let e =
|
|
4993
|
-
if (
|
|
5063
|
+
let [Mt, Nt] = c(null), Pt = () => Nt(null), Ft = s(null), It = s(null), Lt = () => {
|
|
5064
|
+
let e = Ft.current, t = It.current;
|
|
5065
|
+
if (Ft.current = null, It.current = null, Qe && e !== null && t !== null) {
|
|
4994
5066
|
let n = G.findIndex((t) => t.id === e), r = X.findIndex((e) => e.id === t);
|
|
4995
|
-
n >= 0 && !
|
|
5067
|
+
n >= 0 && !ha(ut, n, r) && (A.actions.setFocusedCell({
|
|
4996
5068
|
rowId: e,
|
|
4997
5069
|
columnId: t
|
|
4998
|
-
}),
|
|
5070
|
+
}), lt({
|
|
4999
5071
|
rowId: e,
|
|
5000
5072
|
columnId: t
|
|
5001
5073
|
}, { extend: !1 }));
|
|
5002
5074
|
}
|
|
5003
|
-
|
|
5075
|
+
Nt(e === null ? null : {
|
|
5004
5076
|
rowId: e,
|
|
5005
5077
|
columnId: t
|
|
5006
5078
|
});
|
|
5007
|
-
},
|
|
5008
|
-
/* @__PURE__ */
|
|
5009
|
-
/* @__PURE__ */
|
|
5010
|
-
disabled:
|
|
5011
|
-
onClick: () => void
|
|
5079
|
+
}, Rt = Mt === null ? void 0 : G.find((e) => e.id === Mt.rowId) ?? q.find((e) => e.id === Mt.rowId) ?? le.find((e) => e.id === Mt.rowId), zt = b !== void 0 && Mt !== null && Rt !== void 0 && !Rt.getIsGrouped(), Bt = $e && Mt !== null && ut !== null ? /* @__PURE__ */ Y(ue, { children: [
|
|
5080
|
+
/* @__PURE__ */ J(g.Label, { children: P.cellCount(dt) }),
|
|
5081
|
+
/* @__PURE__ */ J(g.Item, {
|
|
5082
|
+
disabled: ft === 0,
|
|
5083
|
+
onClick: () => void _t(),
|
|
5012
5084
|
children: P.copy
|
|
5013
5085
|
}),
|
|
5014
|
-
/* @__PURE__ */
|
|
5015
|
-
disabled:
|
|
5016
|
-
onClick: () =>
|
|
5086
|
+
/* @__PURE__ */ J(g.Item, {
|
|
5087
|
+
disabled: ft === 0,
|
|
5088
|
+
onClick: () => xt(mt),
|
|
5017
5089
|
children: P.exportCsv
|
|
5018
5090
|
}),
|
|
5019
|
-
/* @__PURE__ */
|
|
5091
|
+
/* @__PURE__ */ J(g.Item, {
|
|
5020
5092
|
closeMenuOnClick: !1,
|
|
5021
|
-
onClick: () =>
|
|
5022
|
-
children: /* @__PURE__ */
|
|
5093
|
+
onClick: () => ht((e) => !e),
|
|
5094
|
+
children: /* @__PURE__ */ J(f, {
|
|
5023
5095
|
size: "xs",
|
|
5024
|
-
checked:
|
|
5096
|
+
checked: mt,
|
|
5025
5097
|
label: P.includeHeaders,
|
|
5026
5098
|
readOnly: !0,
|
|
5027
5099
|
styles: { input: { cursor: "pointer" } }
|
|
5028
5100
|
})
|
|
5029
5101
|
})
|
|
5030
|
-
] }) : null,
|
|
5102
|
+
] }) : null, Vt = !1, Ht = zt ? b({
|
|
5031
5103
|
table: k,
|
|
5032
|
-
row:
|
|
5033
|
-
cell:
|
|
5034
|
-
close:
|
|
5104
|
+
row: Rt,
|
|
5105
|
+
cell: Rt?.getAllCells().find((e) => e.column.id === Mt?.columnId) ?? null,
|
|
5106
|
+
close: Pt,
|
|
5035
5107
|
get internalItems() {
|
|
5036
|
-
return
|
|
5108
|
+
return Vt = !0, Bt;
|
|
5037
5109
|
}
|
|
5038
|
-
}) ?? null : null,
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
] }),
|
|
5110
|
+
}) ?? null : null, Ut = Vt ? Ht : Bt === null && Ht === null ? null : /* @__PURE__ */ Y(ue, { children: [
|
|
5111
|
+
Bt,
|
|
5112
|
+
Bt !== null && Ht !== null && /* @__PURE__ */ J(g.Divider, {}),
|
|
5113
|
+
Ht
|
|
5114
|
+
] }), Wt = s({
|
|
5043
5115
|
top: !0,
|
|
5044
5116
|
bottom: !1,
|
|
5045
5117
|
left: !0,
|
|
5046
5118
|
right: !1
|
|
5047
|
-
}),
|
|
5048
|
-
if (
|
|
5119
|
+
}), Gt = p !== void 0 || m !== void 0 || _ !== void 0 || v !== void 0, Kt = Mt || Gt ? (e) => {
|
|
5120
|
+
if (Mt && Pt(), !Gt) return;
|
|
5049
5121
|
let t = e.currentTarget, n = {
|
|
5050
5122
|
top: t.scrollTop <= 1,
|
|
5051
5123
|
bottom: t.scrollTop + t.clientHeight >= t.scrollHeight - 1,
|
|
5052
5124
|
left: t.scrollLeft <= 1,
|
|
5053
5125
|
right: t.scrollLeft + t.clientWidth >= t.scrollWidth - 1
|
|
5054
|
-
}, r =
|
|
5055
|
-
|
|
5126
|
+
}, r = Wt.current;
|
|
5127
|
+
Wt.current = n, n.top && !r.top && p?.(), n.bottom && !r.bottom && m?.(), n.left && !r.left && _?.(), n.right && !r.right && v?.();
|
|
5056
5128
|
} : void 0;
|
|
5057
|
-
return /* @__PURE__ */
|
|
5129
|
+
return /* @__PURE__ */ Y("div", {
|
|
5058
5130
|
className: $.tableWrapper,
|
|
5059
|
-
children: [/* @__PURE__ */
|
|
5131
|
+
children: [/* @__PURE__ */ J("div", {
|
|
5060
5132
|
ref: W,
|
|
5061
5133
|
className: $.scrollContainer,
|
|
5062
5134
|
"data-dg-scroll-container": !0,
|
|
5063
|
-
onScroll:
|
|
5064
|
-
children: /* @__PURE__ */
|
|
5135
|
+
onScroll: Kt,
|
|
5136
|
+
children: /* @__PURE__ */ Y("div", {
|
|
5065
5137
|
ref: he,
|
|
5066
|
-
role:
|
|
5138
|
+
role: Qe ? "grid" : "table",
|
|
5067
5139
|
"aria-label": D,
|
|
5068
5140
|
"aria-labelledby": O,
|
|
5069
|
-
"aria-busy":
|
|
5070
|
-
"aria-multiselectable":
|
|
5071
|
-
onKeyDown:
|
|
5072
|
-
"data-range-dragging":
|
|
5141
|
+
"aria-busy": oe === !0 || void 0,
|
|
5142
|
+
"aria-multiselectable": Qe && N.rowSelection && N.multiRowSelection ? !0 : void 0,
|
|
5143
|
+
onKeyDown: Qe ? jt : void 0,
|
|
5144
|
+
"data-range-dragging": vt || void 0,
|
|
5073
5145
|
className: $.grid,
|
|
5074
|
-
"aria-rowcount": G.length +
|
|
5146
|
+
"aria-rowcount": G.length + de + Oe.length + +!!Ue,
|
|
5075
5147
|
"aria-colcount": X.length,
|
|
5076
|
-
"data-dg-row-count": G.length +
|
|
5148
|
+
"data-dg-row-count": G.length + de,
|
|
5077
5149
|
style: {
|
|
5078
|
-
gridTemplateColumns:
|
|
5079
|
-
minWidth:
|
|
5150
|
+
gridTemplateColumns: je,
|
|
5151
|
+
minWidth: Me
|
|
5080
5152
|
},
|
|
5081
5153
|
children: [
|
|
5082
|
-
/* @__PURE__ */
|
|
5154
|
+
/* @__PURE__ */ J("div", {
|
|
5083
5155
|
role: "rowgroup",
|
|
5084
5156
|
style: { display: "contents" },
|
|
5085
|
-
children:
|
|
5157
|
+
children: Oe.map((e, t) => /* @__PURE__ */ J("div", {
|
|
5086
5158
|
role: "row",
|
|
5087
5159
|
"aria-rowindex": t + 1,
|
|
5088
5160
|
"data-dg-header-row": !0,
|
|
5089
|
-
"data-dg-header-last": t ===
|
|
5161
|
+
"data-dg-header-last": t === Oe.length - 1 || void 0,
|
|
5090
5162
|
className: $.headerRow,
|
|
5091
|
-
children: e.headers.map((e) => /* @__PURE__ */
|
|
5163
|
+
children: e.headers.map((e) => /* @__PURE__ */ J(Bi, {
|
|
5092
5164
|
renderColumnMenuItems: x,
|
|
5093
5165
|
header: e,
|
|
5094
|
-
layout:
|
|
5166
|
+
layout: Re(e.column.id)
|
|
5095
5167
|
}, e.id))
|
|
5096
5168
|
}, e.id))
|
|
5097
5169
|
}),
|
|
5098
|
-
N.editing &&
|
|
5170
|
+
N.editing && re > 0 && /* @__PURE__ */ J(oa, {
|
|
5099
5171
|
orderedColumns: X,
|
|
5100
|
-
layoutFor:
|
|
5172
|
+
layoutFor: Re,
|
|
5101
5173
|
rowHeight: F
|
|
5102
5174
|
}),
|
|
5103
|
-
/* @__PURE__ */
|
|
5104
|
-
enabled: b !== void 0 ||
|
|
5105
|
-
menuContent:
|
|
5175
|
+
/* @__PURE__ */ J(za, {
|
|
5176
|
+
enabled: b !== void 0 || $e,
|
|
5177
|
+
menuContent: Ut,
|
|
5106
5178
|
menuProps: S,
|
|
5107
|
-
onContextMenu:
|
|
5108
|
-
onClose:
|
|
5179
|
+
onContextMenu: Lt,
|
|
5180
|
+
onClose: Pt,
|
|
5109
5181
|
children: (() => {
|
|
5110
5182
|
let e = (e, n, i, a) => {
|
|
5111
|
-
let s = e.getIsGrouped(), c =
|
|
5183
|
+
let s = e.getIsGrouped(), c = Ke(e), l = [
|
|
5112
5184
|
...e.getLeftVisibleCells(),
|
|
5113
5185
|
...e.getCenterVisibleCells(),
|
|
5114
5186
|
...e.getRightVisibleCells()
|
|
5115
|
-
], u = N.editMode === "row" &&
|
|
5116
|
-
return /* @__PURE__ */
|
|
5187
|
+
], u = N.editMode === "row" && ne.includes(e.id), f = !s && !Qe && (We || N.highlightRow);
|
|
5188
|
+
return /* @__PURE__ */ Y("div", {
|
|
5117
5189
|
role: "row",
|
|
5118
5190
|
"aria-rowindex": i,
|
|
5119
5191
|
"data-dg-part": "row",
|
|
@@ -5126,87 +5198,88 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5126
5198
|
"data-selected": N.rowSelection && e.getIsSelected(),
|
|
5127
5199
|
"data-selected-bg": N.rowSelection && N.showSelectedBackground && e.getIsSelected(),
|
|
5128
5200
|
"data-highlighted": N.highlightRow && e.id === V,
|
|
5129
|
-
"data-deleted":
|
|
5201
|
+
"data-deleted": U.length > 0 && U.includes(e.id),
|
|
5130
5202
|
"data-dirty": ie.length > 0 && ie.includes(e.id),
|
|
5131
|
-
"data-
|
|
5132
|
-
"data-
|
|
5203
|
+
"data-draft": ae.length > 0 && ae.includes(e.id),
|
|
5204
|
+
"data-context-menu": Ut !== null && Mt?.rowId === e.id,
|
|
5205
|
+
"data-selects-on-click": We && !s,
|
|
5133
5206
|
"aria-selected": N.rowSelection ? e.getIsSelected() : void 0,
|
|
5134
5207
|
"aria-current": N.highlightRow && e.id === V ? !0 : void 0,
|
|
5135
5208
|
"data-striped": d && n >= 0 ? n % 2 == 1 : void 0,
|
|
5136
|
-
className: [$.bodyRow,
|
|
5209
|
+
className: [$.bodyRow, Ye(e)].filter(Boolean).join(" "),
|
|
5137
5210
|
style: {
|
|
5138
5211
|
minHeight: F,
|
|
5139
5212
|
cursor: c ? "pointer" : void 0,
|
|
5140
|
-
...
|
|
5213
|
+
...Xe(e)
|
|
5141
5214
|
},
|
|
5142
5215
|
tabIndex: f ? 0 : void 0,
|
|
5143
|
-
onMouseDown:
|
|
5216
|
+
onMouseDown: We && !s ? (e) => {
|
|
5144
5217
|
e.shiftKey && e.preventDefault();
|
|
5145
5218
|
} : void 0,
|
|
5146
|
-
onClick: c ? (t) =>
|
|
5219
|
+
onClick: c ? (t) => qe(e, {
|
|
5147
5220
|
toggle: t.ctrlKey || t.metaKey,
|
|
5148
5221
|
extend: t.shiftKey
|
|
5149
5222
|
}) : void 0,
|
|
5150
5223
|
onKeyDown: f ? (t) => {
|
|
5151
|
-
t.key !== " " && t.key !== "Enter" || t.target === t.currentTarget && (t.preventDefault(),
|
|
5224
|
+
t.key !== " " && t.key !== "Enter" || t.target === t.currentTarget && (t.preventDefault(), qe(e, {
|
|
5152
5225
|
toggle: !0,
|
|
5153
5226
|
extend: t.shiftKey
|
|
5154
5227
|
}));
|
|
5155
5228
|
} : void 0,
|
|
5156
|
-
onContextMenu: b && !s ||
|
|
5157
|
-
|
|
5229
|
+
onContextMenu: b && !s || $e ? () => {
|
|
5230
|
+
Ft.current = e.id;
|
|
5158
5231
|
} : void 0,
|
|
5159
5232
|
children: [l.map((i, a) => {
|
|
5160
|
-
let c =
|
|
5161
|
-
return /* @__PURE__ */
|
|
5233
|
+
let c = te !== null && te.rowId === e.id && te.columnId === i.column.id || u && M.canEditCell(e, i.column);
|
|
5234
|
+
return /* @__PURE__ */ J(Ra, {
|
|
5162
5235
|
cell: i,
|
|
5163
5236
|
rowHeight: F,
|
|
5164
|
-
layout:
|
|
5237
|
+
layout: Re(i.column.id),
|
|
5165
5238
|
contentOverride: fe !== null && i.column.id === "__rowNumber__" ? fe.get(e.id) : void 0,
|
|
5166
|
-
highlightNeedles:
|
|
5167
|
-
editor: c ? /* @__PURE__ */
|
|
5239
|
+
highlightNeedles: K?.get(i.column.id),
|
|
5240
|
+
editor: c ? /* @__PURE__ */ J(na, {
|
|
5168
5241
|
cell: i,
|
|
5169
5242
|
row: e,
|
|
5170
|
-
takeSeedText:
|
|
5171
|
-
onClose: (t) =>
|
|
5243
|
+
takeSeedText: wt,
|
|
5244
|
+
onClose: (t) => kt({
|
|
5172
5245
|
rowId: e.id,
|
|
5173
5246
|
columnId: i.column.id
|
|
5174
5247
|
}, t)
|
|
5175
5248
|
}) : void 0,
|
|
5176
|
-
onClick: t && !s ? (n) => t(
|
|
5249
|
+
onClick: t && !s ? (n) => t(Ze(i, e, n)) : void 0,
|
|
5177
5250
|
onDoubleClick: (N.editing || r) && !s ? (t) => {
|
|
5178
|
-
r?.(
|
|
5251
|
+
r?.(Ze(i, e, t)), N.editing && M.canEditCell(e, i.column) && Ot({
|
|
5179
5252
|
rowId: e.id,
|
|
5180
5253
|
columnId: i.column.id
|
|
5181
5254
|
});
|
|
5182
5255
|
} : void 0,
|
|
5183
|
-
nav:
|
|
5256
|
+
nav: Qe ? {
|
|
5184
5257
|
rowId: e.id,
|
|
5185
5258
|
columnIndex: a + 1,
|
|
5186
|
-
focused:
|
|
5187
|
-
tabIndex: ot
|
|
5188
|
-
selected:
|
|
5189
|
-
edges:
|
|
5259
|
+
focused: st(H, e.id, i.column.id),
|
|
5260
|
+
tabIndex: st(ot, e.id, i.column.id) ? 0 : -1,
|
|
5261
|
+
selected: $e ? ha(ct, n, a) : st(H, e.id, i.column.id),
|
|
5262
|
+
edges: _a(ct, n, a)
|
|
5190
5263
|
} : void 0,
|
|
5191
|
-
onFocus:
|
|
5264
|
+
onFocus: Qe ? () => A.actions.setFocusedCell({
|
|
5192
5265
|
rowId: e.id,
|
|
5193
5266
|
columnId: i.column.id
|
|
5194
5267
|
}) : void 0,
|
|
5195
|
-
onMouseDown:
|
|
5196
|
-
t.button === 0 && (t.shiftKey && t.preventDefault(),
|
|
5268
|
+
onMouseDown: $e ? (t) => {
|
|
5269
|
+
t.button === 0 && (t.shiftKey && t.preventDefault(), et.current = !0, bt({
|
|
5197
5270
|
rowId: e.id,
|
|
5198
5271
|
columnId: i.column.id
|
|
5199
5272
|
}, { extend: t.shiftKey }));
|
|
5200
5273
|
} : void 0,
|
|
5201
|
-
onMouseEnter:
|
|
5274
|
+
onMouseEnter: $e && vt ? () => lt({
|
|
5202
5275
|
rowId: e.id,
|
|
5203
5276
|
columnId: i.column.id
|
|
5204
5277
|
}, { extend: !0 }) : void 0,
|
|
5205
|
-
onContextMenu: b ||
|
|
5206
|
-
|
|
5278
|
+
onContextMenu: b || $e || o ? (t) => {
|
|
5279
|
+
It.current = i.column.id, !s && o?.(Ze(i, e, t));
|
|
5207
5280
|
} : void 0
|
|
5208
5281
|
}, i.id);
|
|
5209
|
-
}), pe(e) && /* @__PURE__ */
|
|
5282
|
+
}), pe(e) && /* @__PURE__ */ J("div", {
|
|
5210
5283
|
role: "cell",
|
|
5211
5284
|
"aria-colspan": X.length,
|
|
5212
5285
|
"data-dg-part": "details",
|
|
@@ -5221,14 +5294,14 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5221
5294
|
})]
|
|
5222
5295
|
}, e.id);
|
|
5223
5296
|
};
|
|
5224
|
-
return /* @__PURE__ */
|
|
5225
|
-
|
|
5297
|
+
return /* @__PURE__ */ Y(ue, { children: [
|
|
5298
|
+
q.length > 0 && /* @__PURE__ */ J("div", {
|
|
5226
5299
|
role: "presentation",
|
|
5227
5300
|
"data-dg-part": "pinned-top",
|
|
5228
5301
|
className: $.pinnedTopBlock,
|
|
5229
|
-
children:
|
|
5302
|
+
children: q.map((t, n) => e(t, -1, Oe.length + n + 1, "top"))
|
|
5230
5303
|
}),
|
|
5231
|
-
ve > 0 && /* @__PURE__ */
|
|
5304
|
+
ve > 0 && /* @__PURE__ */ J("div", {
|
|
5232
5305
|
"aria-hidden": !0,
|
|
5233
5306
|
style: {
|
|
5234
5307
|
gridColumn: "1/-1",
|
|
@@ -5237,70 +5310,70 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5237
5310
|
}),
|
|
5238
5311
|
_e.map((t) => {
|
|
5239
5312
|
let n = G[t.index];
|
|
5240
|
-
return n ? e(n, t.index, t.index +
|
|
5313
|
+
return n ? e(n, t.index, t.index + Oe.length + q.length + 1) : null;
|
|
5241
5314
|
}),
|
|
5242
|
-
ye > 0 && /* @__PURE__ */
|
|
5315
|
+
ye > 0 && /* @__PURE__ */ J("div", {
|
|
5243
5316
|
"aria-hidden": !0,
|
|
5244
5317
|
style: {
|
|
5245
5318
|
gridColumn: "1/-1",
|
|
5246
5319
|
height: ye
|
|
5247
5320
|
}
|
|
5248
5321
|
}),
|
|
5249
|
-
le.length > 0 && /* @__PURE__ */
|
|
5322
|
+
le.length > 0 && /* @__PURE__ */ J("div", {
|
|
5250
5323
|
role: "presentation",
|
|
5251
5324
|
"data-dg-part": "pinned-bottom",
|
|
5252
5325
|
className: $.pinnedBottomBlock,
|
|
5253
|
-
children: le.map((t, n) => e(t, -1,
|
|
5326
|
+
children: le.map((t, n) => e(t, -1, Oe.length + q.length + G.length + n + 1, "bottom"))
|
|
5254
5327
|
})
|
|
5255
5328
|
] });
|
|
5256
5329
|
})()
|
|
5257
5330
|
}),
|
|
5258
|
-
|
|
5331
|
+
ze && oe === !0 && /* @__PURE__ */ J("div", {
|
|
5259
5332
|
role: "row",
|
|
5260
5333
|
className: $.messageRow,
|
|
5261
|
-
children: /* @__PURE__ */
|
|
5334
|
+
children: /* @__PURE__ */ J(h, {
|
|
5262
5335
|
size: "lg",
|
|
5263
5336
|
"aria-label": P.loading
|
|
5264
5337
|
})
|
|
5265
5338
|
}),
|
|
5266
|
-
|
|
5339
|
+
ze && oe !== !0 && re === 0 && /* @__PURE__ */ J("div", {
|
|
5267
5340
|
role: "row",
|
|
5268
5341
|
className: $.messageRow,
|
|
5269
|
-
children: y === void 0 ?
|
|
5342
|
+
children: y === void 0 ? Ve ? /* @__PURE__ */ Y(ue, { children: [/* @__PURE__ */ J(ce, {
|
|
5270
5343
|
size: 40,
|
|
5271
5344
|
stroke: 1.4,
|
|
5272
5345
|
opacity: .4
|
|
5273
|
-
}), /* @__PURE__ */
|
|
5346
|
+
}), /* @__PURE__ */ J(E, {
|
|
5274
5347
|
span: !0,
|
|
5275
5348
|
size: I,
|
|
5276
5349
|
c: "dimmed",
|
|
5277
|
-
children:
|
|
5278
|
-
})] }) : /* @__PURE__ */
|
|
5350
|
+
children: se
|
|
5351
|
+
})] }) : /* @__PURE__ */ J(E, {
|
|
5279
5352
|
span: !0,
|
|
5280
5353
|
size: I,
|
|
5281
5354
|
c: "dimmed",
|
|
5282
5355
|
children: P.noRows
|
|
5283
5356
|
}) : y({
|
|
5284
|
-
hasActiveFilters:
|
|
5357
|
+
hasActiveFilters: Ve,
|
|
5285
5358
|
table: k
|
|
5286
5359
|
})
|
|
5287
5360
|
}),
|
|
5288
|
-
|
|
5361
|
+
Ue && /* @__PURE__ */ J("div", {
|
|
5289
5362
|
role: "row",
|
|
5290
|
-
"aria-rowindex": G.length +
|
|
5363
|
+
"aria-rowindex": G.length + de + Oe.length + 1,
|
|
5291
5364
|
"data-dg-part": "summary-row",
|
|
5292
5365
|
className: $.summaryRow,
|
|
5293
|
-
children:
|
|
5294
|
-
let t =
|
|
5295
|
-
return /* @__PURE__ */
|
|
5366
|
+
children: He.map((e) => {
|
|
5367
|
+
let t = Re(e.column.id);
|
|
5368
|
+
return /* @__PURE__ */ J("div", {
|
|
5296
5369
|
role: "cell",
|
|
5297
5370
|
"data-column-id": e.column.id,
|
|
5298
5371
|
"data-align": bn(e.column),
|
|
5299
5372
|
"data-control-column": xn(e.column.id),
|
|
5300
5373
|
className: [
|
|
5301
5374
|
$.summaryCell,
|
|
5302
|
-
t.isBoundary && t.pinnedAt === "left" ?
|
|
5303
|
-
t.isBoundary && t.pinnedAt === "right" ?
|
|
5375
|
+
t.isBoundary && t.pinnedAt === "left" ? wi.stickyLeft : "",
|
|
5376
|
+
t.isBoundary && t.pinnedAt === "right" ? wi.stickyRight : ""
|
|
5304
5377
|
].filter(Boolean).join(" "),
|
|
5305
5378
|
style: {
|
|
5306
5379
|
minHeight: F,
|
|
@@ -5309,7 +5382,7 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5309
5382
|
position: t.pinnedAt ? "sticky" : void 0,
|
|
5310
5383
|
zIndex: t.pinnedAt ? "var(--dg-z-summary-pinned-cell, 5)" : void 0
|
|
5311
5384
|
},
|
|
5312
|
-
children: /* @__PURE__ */
|
|
5385
|
+
children: /* @__PURE__ */ J("span", {
|
|
5313
5386
|
className: $.cellContent,
|
|
5314
5387
|
children: e.isPlaceholder ? null : Fe(e.column.columnDef.footer, e.getContext())
|
|
5315
5388
|
})
|
|
@@ -5318,42 +5391,42 @@ function Ma({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5318
5391
|
})
|
|
5319
5392
|
]
|
|
5320
5393
|
})
|
|
5321
|
-
}), /* @__PURE__ */
|
|
5394
|
+
}), /* @__PURE__ */ J(qn, {})]
|
|
5322
5395
|
});
|
|
5323
5396
|
}
|
|
5324
|
-
var
|
|
5397
|
+
var Va = {
|
|
5325
5398
|
toolbar: "_toolbar_4my8t_1",
|
|
5326
5399
|
toolbarSpacer: "_toolbarSpacer_4my8t_10"
|
|
5327
5400
|
};
|
|
5328
5401
|
//#endregion
|
|
5329
5402
|
//#region src/tmdatagrid/components/TMDataGridToolbar.tsx
|
|
5330
|
-
function
|
|
5403
|
+
function Ha(t) {
|
|
5331
5404
|
let n = e(2), { children: r } = t, i;
|
|
5332
|
-
return n[0] === r ? i = n[1] : (i = /* @__PURE__ */
|
|
5405
|
+
return n[0] === r ? i = n[1] : (i = /* @__PURE__ */ J("div", {
|
|
5333
5406
|
"data-dg-part": "toolbar",
|
|
5334
|
-
className:
|
|
5407
|
+
className: Va.toolbar,
|
|
5335
5408
|
children: r
|
|
5336
5409
|
}), n[0] = r, n[1] = i), i;
|
|
5337
5410
|
}
|
|
5338
|
-
function
|
|
5411
|
+
function Ua() {
|
|
5339
5412
|
let t = e(1), n;
|
|
5340
|
-
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
5413
|
+
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ J("div", { className: Va.toolbarSpacer }), t[0] = n) : n = t[0], n;
|
|
5341
5414
|
}
|
|
5342
|
-
function
|
|
5415
|
+
function Wa() {
|
|
5343
5416
|
let t = e(2), { table: n, labels: r } = Q();
|
|
5344
5417
|
if (n.options.meta?.loading !== !0) return null;
|
|
5345
5418
|
let i;
|
|
5346
|
-
return t[0] === r.loading ? i = t[1] : (i = /* @__PURE__ */
|
|
5419
|
+
return t[0] === r.loading ? i = t[1] : (i = /* @__PURE__ */ J(h, {
|
|
5347
5420
|
size: "xs",
|
|
5348
5421
|
"data-dg-part": "loading",
|
|
5349
5422
|
"aria-label": r.loading
|
|
5350
5423
|
}), t[0] = r.loading, t[1] = i), i;
|
|
5351
5424
|
}
|
|
5352
|
-
function
|
|
5425
|
+
function Ga(t) {
|
|
5353
5426
|
let n = e(11), { children: r } = t, { table: i, controlSize: a } = Q();
|
|
5354
5427
|
if (j(i.store), r !== void 0) {
|
|
5355
5428
|
let e;
|
|
5356
|
-
return n[0] !== r || n[1] !== a ? (e = /* @__PURE__ */
|
|
5429
|
+
return n[0] !== r || n[1] !== a ? (e = /* @__PURE__ */ J(E, {
|
|
5357
5430
|
span: !0,
|
|
5358
5431
|
size: a,
|
|
5359
5432
|
c: "dimmed",
|
|
@@ -5366,7 +5439,7 @@ function La(t) {
|
|
|
5366
5439
|
let s = o, c;
|
|
5367
5440
|
n[5] === i ? c = n[6] : (c = i.options.meta?.totalRowCount ?? i.getPreFilteredRowModel().rows.length, n[5] = i, n[6] = c);
|
|
5368
5441
|
let l = c, u;
|
|
5369
|
-
return n[7] !== a || n[8] !== s || n[9] !== l ? (u = /* @__PURE__ */
|
|
5442
|
+
return n[7] !== a || n[8] !== s || n[9] !== l ? (u = /* @__PURE__ */ Y(E, {
|
|
5370
5443
|
span: !0,
|
|
5371
5444
|
size: a,
|
|
5372
5445
|
c: "dimmed",
|
|
@@ -5378,16 +5451,16 @@ function La(t) {
|
|
|
5378
5451
|
]
|
|
5379
5452
|
}), n[7] = a, n[8] = s, n[9] = l, n[10] = u) : u = n[10], u;
|
|
5380
5453
|
}
|
|
5381
|
-
function
|
|
5382
|
-
let t = e(13), { table: n, ui: r, features: i, labels: a, controlSize: o } = Q(), s = j(r,
|
|
5383
|
-
if (!
|
|
5454
|
+
function Ka() {
|
|
5455
|
+
let t = e(13), { table: n, ui: r, features: i, labels: a, controlSize: o } = Q(), s = j(r, qa);
|
|
5456
|
+
if (!Wr(n, i).canHideAny) return null;
|
|
5384
5457
|
let c;
|
|
5385
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */
|
|
5458
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ J(se, {
|
|
5386
5459
|
size: 18,
|
|
5387
5460
|
stroke: 1.6
|
|
5388
5461
|
}), t[0] = c) : c = t[0];
|
|
5389
5462
|
let u;
|
|
5390
|
-
t[1] !== o || t[2] !== a.manageColumns || t[3] !== r.actions.toggleColumnsPanel ? (u = /* @__PURE__ */
|
|
5463
|
+
t[1] !== o || t[2] !== a.manageColumns || t[3] !== r.actions.toggleColumnsPanel ? (u = /* @__PURE__ */ J(l, {
|
|
5391
5464
|
variant: "subtle",
|
|
5392
5465
|
color: "gray",
|
|
5393
5466
|
size: o,
|
|
@@ -5397,18 +5470,18 @@ function Ra() {
|
|
|
5397
5470
|
children: c
|
|
5398
5471
|
}), t[1] = o, t[2] = a.manageColumns, t[3] = r.actions.toggleColumnsPanel, t[4] = u) : u = t[4];
|
|
5399
5472
|
let d;
|
|
5400
|
-
t[5] !== a.manageColumns || t[6] !== u ? (d = /* @__PURE__ */
|
|
5473
|
+
t[5] !== a.manageColumns || t[6] !== u ? (d = /* @__PURE__ */ J(b.Target, { children: /* @__PURE__ */ J(O, {
|
|
5401
5474
|
label: a.manageColumns,
|
|
5402
5475
|
openDelay: 400,
|
|
5403
5476
|
children: u
|
|
5404
5477
|
}) }), t[5] = a.manageColumns, t[6] = u, t[7] = d) : d = t[7];
|
|
5405
5478
|
let f;
|
|
5406
|
-
t[8] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */
|
|
5479
|
+
t[8] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ J(b.Dropdown, {
|
|
5407
5480
|
p: 0,
|
|
5408
|
-
children: /* @__PURE__ */
|
|
5481
|
+
children: /* @__PURE__ */ J(wn, {})
|
|
5409
5482
|
}), t[8] = f) : f = t[8];
|
|
5410
5483
|
let p;
|
|
5411
|
-
return t[9] !== s || t[10] !== d || t[11] !== r.actions.setColumnsPanelOpen ? (p = /* @__PURE__ */
|
|
5484
|
+
return t[9] !== s || t[10] !== d || t[11] !== r.actions.setColumnsPanelOpen ? (p = /* @__PURE__ */ Y(b, {
|
|
5412
5485
|
opened: s,
|
|
5413
5486
|
onChange: r.actions.setColumnsPanelOpen,
|
|
5414
5487
|
position: "bottom-end",
|
|
@@ -5419,28 +5492,28 @@ function Ra() {
|
|
|
5419
5492
|
children: [d, f]
|
|
5420
5493
|
}), t[9] = s, t[10] = d, t[11] = r.actions.setColumnsPanelOpen, t[12] = p) : p = t[12], p;
|
|
5421
5494
|
}
|
|
5422
|
-
function
|
|
5495
|
+
function qa(e) {
|
|
5423
5496
|
return e.columnsPanelOpen;
|
|
5424
5497
|
}
|
|
5425
|
-
function
|
|
5426
|
-
let t = e(15), n = Q(), { table: r, ui: i, features: a, labels: o, controlSize: s } = n, c = j(i,
|
|
5427
|
-
if (!
|
|
5498
|
+
function Ja() {
|
|
5499
|
+
let t = e(15), n = Q(), { table: r, ui: i, features: a, labels: o, controlSize: s } = n, c = j(i, Qa), u = j(r.store, Za).filter(Xa).length;
|
|
5500
|
+
if (!Wr(r, a).canFilterAny) return null;
|
|
5428
5501
|
let d = c || u > 0 ? "light" : "subtle", f = u > 0 ? void 0 : "gray", p;
|
|
5429
5502
|
t[0] !== n || t[1] !== c || t[2] !== r || t[3] !== i ? (p = () => {
|
|
5430
5503
|
if (c) {
|
|
5431
5504
|
i.actions.closeFilterPanel();
|
|
5432
5505
|
return;
|
|
5433
5506
|
}
|
|
5434
|
-
let e = r.getAllLeafColumns().find(
|
|
5435
|
-
e ?
|
|
5507
|
+
let e = r.getAllLeafColumns().find(Ya);
|
|
5508
|
+
e ? ui(n, e.id) : i.actions.openFilterPanel();
|
|
5436
5509
|
}, t[0] = n, t[1] = c, t[2] = r, t[3] = i, t[4] = p) : p = t[4];
|
|
5437
5510
|
let m;
|
|
5438
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */
|
|
5511
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ J(re, {
|
|
5439
5512
|
size: 16,
|
|
5440
5513
|
stroke: 1.6
|
|
5441
5514
|
}), t[5] = m) : m = t[5];
|
|
5442
5515
|
let h;
|
|
5443
|
-
t[6] !== s || t[7] !== o.filters || t[8] !== d || t[9] !== f || t[10] !== p ? (h = /* @__PURE__ */
|
|
5516
|
+
t[6] !== s || t[7] !== o.filters || t[8] !== d || t[9] !== f || t[10] !== p ? (h = /* @__PURE__ */ J(l, {
|
|
5444
5517
|
variant: d,
|
|
5445
5518
|
color: f,
|
|
5446
5519
|
size: s,
|
|
@@ -5450,33 +5523,33 @@ function Ba() {
|
|
|
5450
5523
|
children: m
|
|
5451
5524
|
}), t[6] = s, t[7] = o.filters, t[8] = d, t[9] = f, t[10] = p, t[11] = h) : h = t[11];
|
|
5452
5525
|
let g;
|
|
5453
|
-
return t[12] !== o.filters || t[13] !== h ? (g = /* @__PURE__ */
|
|
5526
|
+
return t[12] !== o.filters || t[13] !== h ? (g = /* @__PURE__ */ J(O, {
|
|
5454
5527
|
label: o.filters,
|
|
5455
5528
|
openDelay: 400,
|
|
5456
5529
|
children: h
|
|
5457
5530
|
}), t[12] = o.filters, t[13] = h, t[14] = g) : g = t[14], g;
|
|
5458
5531
|
}
|
|
5459
|
-
function
|
|
5532
|
+
function Ya(e) {
|
|
5460
5533
|
return e.getCanFilter();
|
|
5461
5534
|
}
|
|
5462
|
-
function
|
|
5535
|
+
function Xa(e) {
|
|
5463
5536
|
return vt(e.value);
|
|
5464
5537
|
}
|
|
5465
|
-
function
|
|
5538
|
+
function Za(e) {
|
|
5466
5539
|
return e.columnFilters;
|
|
5467
5540
|
}
|
|
5468
|
-
function
|
|
5541
|
+
function Qa(e) {
|
|
5469
5542
|
return e.filterPanelOpen;
|
|
5470
5543
|
}
|
|
5471
5544
|
//#endregion
|
|
5472
5545
|
//#region src/tmdatagrid/core/sizes.ts
|
|
5473
|
-
var
|
|
5546
|
+
var $a = "md", eo = {
|
|
5474
5547
|
xs: 34,
|
|
5475
5548
|
sm: 42,
|
|
5476
5549
|
md: 52,
|
|
5477
5550
|
lg: 62,
|
|
5478
5551
|
xl: 72
|
|
5479
|
-
},
|
|
5552
|
+
}, to = {
|
|
5480
5553
|
xs: "xs",
|
|
5481
5554
|
sm: "xs",
|
|
5482
5555
|
md: "sm",
|
|
@@ -5485,8 +5558,8 @@ var Ga = "md", Ka = {
|
|
|
5485
5558
|
};
|
|
5486
5559
|
//#endregion
|
|
5487
5560
|
//#region src/tmdatagrid/components/TMDataGrid.tsx
|
|
5488
|
-
function
|
|
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 ??
|
|
5561
|
+
function no(t) {
|
|
5562
|
+
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 ?? eo[b], S = to[b], C;
|
|
5490
5563
|
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 = {
|
|
5491
5564
|
table: r,
|
|
5492
5565
|
ui: i,
|
|
@@ -5506,7 +5579,7 @@ function Ja(t) {
|
|
|
5506
5579
|
let w = C, T;
|
|
5507
5580
|
n[15] === g ? T = n[16] : (T = [Ye.root, g].filter(Boolean), n[15] = g, n[16] = T);
|
|
5508
5581
|
let E = T.join(" "), D;
|
|
5509
|
-
n[17] !== h || n[18] !== v || n[19] !== b || n[20] !== _ || n[21] !== E || n[22] !== y ? (D = /* @__PURE__ */
|
|
5582
|
+
n[17] !== h || n[18] !== v || n[19] !== b || n[20] !== _ || n[21] !== E || n[22] !== y ? (D = /* @__PURE__ */ J("div", {
|
|
5510
5583
|
id: v,
|
|
5511
5584
|
"data-testid": y,
|
|
5512
5585
|
"data-dg-root": !0,
|
|
@@ -5516,33 +5589,33 @@ function Ja(t) {
|
|
|
5516
5589
|
children: h
|
|
5517
5590
|
}), n[17] = h, n[18] = v, n[19] = b, n[20] = _, n[21] = E, n[22] = y, n[23] = D) : D = n[23];
|
|
5518
5591
|
let O;
|
|
5519
|
-
return n[24] !== w || n[25] !== D ? (O = /* @__PURE__ */
|
|
5592
|
+
return n[24] !== w || n[25] !== D ? (O = /* @__PURE__ */ J(Qe, {
|
|
5520
5593
|
value: w,
|
|
5521
5594
|
children: D
|
|
5522
5595
|
}), n[24] = w, n[25] = D, n[26] = O) : O = n[26], O;
|
|
5523
5596
|
}
|
|
5524
|
-
var
|
|
5525
|
-
Toolbar:
|
|
5526
|
-
Spacer:
|
|
5527
|
-
SummaryCount:
|
|
5528
|
-
LoadingIndicator:
|
|
5529
|
-
Search:
|
|
5597
|
+
var ro = Object.assign(no, {
|
|
5598
|
+
Toolbar: Ha,
|
|
5599
|
+
Spacer: Ua,
|
|
5600
|
+
SummaryCount: Ga,
|
|
5601
|
+
LoadingIndicator: Wa,
|
|
5602
|
+
Search: Si,
|
|
5530
5603
|
EditActions: Ln,
|
|
5531
|
-
ColumnsButton:
|
|
5532
|
-
FilterButton:
|
|
5533
|
-
Table:
|
|
5534
|
-
Footer:
|
|
5604
|
+
ColumnsButton: Ka,
|
|
5605
|
+
FilterButton: Ja,
|
|
5606
|
+
Table: Ba,
|
|
5607
|
+
Footer: xi,
|
|
5535
5608
|
FilterPanel: qn,
|
|
5536
|
-
FilterPills:
|
|
5609
|
+
FilterPills: di,
|
|
5537
5610
|
ColumnsPanel: wn
|
|
5538
5611
|
});
|
|
5539
5612
|
//#endregion
|
|
5540
5613
|
//#region src/tmdatagrid/components/filters/DgRangeSliderFilter.tsx
|
|
5541
|
-
function
|
|
5614
|
+
function io(t) {
|
|
5542
5615
|
let n = e(23), { column: r, operator: i, value: a, onChange: o, size: s, labels: c } = t;
|
|
5543
5616
|
if (!ht(i)) {
|
|
5544
5617
|
let e;
|
|
5545
|
-
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */
|
|
5618
|
+
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ J(Un, { ...t }), n[0] = t, n[1] = e), e;
|
|
5546
5619
|
}
|
|
5547
5620
|
let l;
|
|
5548
5621
|
if (n[2] !== r) {
|
|
@@ -5563,7 +5636,7 @@ function Xa(t) {
|
|
|
5563
5636
|
return o([String(t), String(n)]);
|
|
5564
5637
|
}, n[9] = o, n[10] = S);
|
|
5565
5638
|
let C;
|
|
5566
|
-
n[11] !== c.filterFrom || n[12] !== c.filterTo || n[13] !== d || n[14] !== u || n[15] !== s || n[16] !== b || n[17] !== S ? (C = /* @__PURE__ */
|
|
5639
|
+
n[11] !== c.filterFrom || n[12] !== c.filterTo || n[13] !== d || n[14] !== u || n[15] !== s || n[16] !== b || n[17] !== S ? (C = /* @__PURE__ */ J(x, {
|
|
5567
5640
|
size: s,
|
|
5568
5641
|
mt: 6,
|
|
5569
5642
|
min: u,
|
|
@@ -5575,7 +5648,7 @@ function Xa(t) {
|
|
|
5575
5648
|
onChange: S
|
|
5576
5649
|
}), n[11] = c.filterFrom, n[12] = c.filterTo, n[13] = d, n[14] = u, n[15] = s, n[16] = b, n[17] = S, n[18] = C) : C = n[18];
|
|
5577
5650
|
let w;
|
|
5578
|
-
return n[19] !== c.filterValue || n[20] !== s || n[21] !== C ? (w = /* @__PURE__ */
|
|
5651
|
+
return n[19] !== c.filterValue || n[20] !== s || n[21] !== C ? (w = /* @__PURE__ */ J(m.Wrapper, {
|
|
5579
5652
|
label: _,
|
|
5580
5653
|
size: s,
|
|
5581
5654
|
w: 180,
|
|
@@ -5584,18 +5657,18 @@ function Xa(t) {
|
|
|
5584
5657
|
}
|
|
5585
5658
|
//#endregion
|
|
5586
5659
|
//#region src/tmdatagrid/components/filters/DgDateRangeFilter.tsx
|
|
5587
|
-
function
|
|
5660
|
+
function ao(t) {
|
|
5588
5661
|
let n = e(23), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
5589
5662
|
if (!ht(r)) {
|
|
5590
5663
|
let e;
|
|
5591
|
-
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */
|
|
5664
|
+
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ J(Un, { ...t }), n[0] = t, n[1] = e), e;
|
|
5592
5665
|
}
|
|
5593
5666
|
let c;
|
|
5594
5667
|
n[2] === i ? c = n[3] : (c = Array.isArray(i) ? [String(i[0] ?? ""), String(i[1] ?? "")] : ["", ""], n[2] = i, n[3] = c);
|
|
5595
5668
|
let l = c, u;
|
|
5596
5669
|
n[4] !== a || n[5] !== l[1] ? (u = (e) => a([e.currentTarget.value, l[1]]), n[4] = a, n[5] = l[1], n[6] = u) : u = n[6];
|
|
5597
5670
|
let d;
|
|
5598
|
-
n[7] !== s.filterFrom || n[8] !== l[0] || n[9] !== o || n[10] !== u ? (d = /* @__PURE__ */
|
|
5671
|
+
n[7] !== s.filterFrom || n[8] !== l[0] || n[9] !== o || n[10] !== u ? (d = /* @__PURE__ */ J(D, {
|
|
5599
5672
|
label: s.filterFrom,
|
|
5600
5673
|
size: o,
|
|
5601
5674
|
w: 88,
|
|
@@ -5606,7 +5679,7 @@ function Za(t) {
|
|
|
5606
5679
|
let f;
|
|
5607
5680
|
n[12] !== a || n[13] !== l[0] ? (f = (e) => a([l[0], e.currentTarget.value]), n[12] = a, n[13] = l[0], n[14] = f) : f = n[14];
|
|
5608
5681
|
let m;
|
|
5609
|
-
n[15] !== s.filterTo || n[16] !== l[1] || n[17] !== o || n[18] !== f ? (m = /* @__PURE__ */
|
|
5682
|
+
n[15] !== s.filterTo || n[16] !== l[1] || n[17] !== o || n[18] !== f ? (m = /* @__PURE__ */ J(D, {
|
|
5610
5683
|
label: s.filterTo,
|
|
5611
5684
|
size: o,
|
|
5612
5685
|
w: 88,
|
|
@@ -5615,7 +5688,7 @@ function Za(t) {
|
|
|
5615
5688
|
onChange: f
|
|
5616
5689
|
}), n[15] = s.filterTo, n[16] = l[1], n[17] = o, n[18] = f, n[19] = m) : m = n[19];
|
|
5617
5690
|
let h;
|
|
5618
|
-
return n[20] !== d || n[21] !== m ? (h = /* @__PURE__ */
|
|
5691
|
+
return n[20] !== d || n[21] !== m ? (h = /* @__PURE__ */ Y(p, {
|
|
5619
5692
|
gap: 4,
|
|
5620
5693
|
wrap: "nowrap",
|
|
5621
5694
|
align: "flex-start",
|
|
@@ -5624,11 +5697,11 @@ function Za(t) {
|
|
|
5624
5697
|
}
|
|
5625
5698
|
//#endregion
|
|
5626
5699
|
//#region src/tmdatagrid/components/filters/DgAutocompleteFilter.tsx
|
|
5627
|
-
function
|
|
5700
|
+
function oo(t) {
|
|
5628
5701
|
let n = e(19), { column: r, table: i, operator: a, value: o, onChange: s, options: c, size: l, labels: d } = t;
|
|
5629
5702
|
if (mt(a) || ht(a)) {
|
|
5630
5703
|
let e;
|
|
5631
|
-
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */
|
|
5704
|
+
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ J(Un, { ...t }), n[0] = t, n[1] = e), e;
|
|
5632
5705
|
}
|
|
5633
5706
|
let f;
|
|
5634
5707
|
n[2] === a ? f = n[3] : (f = pt(a), n[2] = a, n[3] = f);
|
|
@@ -5641,9 +5714,9 @@ function Qa(t) {
|
|
|
5641
5714
|
let h = m, g = d.filterValue, _;
|
|
5642
5715
|
n[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = { withinPortal: !1 }, n[8] = _) : _ = n[8];
|
|
5643
5716
|
let v = !p, y = p ? d.filterValuePlaceholder : "", b;
|
|
5644
|
-
n[9] === h ? b = n[10] : (b = h.map(
|
|
5717
|
+
n[9] === h ? b = n[10] : (b = h.map(so), n[9] = h, n[10] = b);
|
|
5645
5718
|
let x = p && typeof o == "string" ? o : "", S;
|
|
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__ */
|
|
5719
|
+
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__ */ J(u, {
|
|
5647
5720
|
label: g,
|
|
5648
5721
|
size: l,
|
|
5649
5722
|
w: 180,
|
|
@@ -5656,16 +5729,16 @@ function Qa(t) {
|
|
|
5656
5729
|
onChange: s
|
|
5657
5730
|
}), 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;
|
|
5658
5731
|
}
|
|
5659
|
-
function
|
|
5732
|
+
function so(e) {
|
|
5660
5733
|
return e.value;
|
|
5661
5734
|
}
|
|
5662
5735
|
//#endregion
|
|
5663
5736
|
//#region src/tmdatagrid/components/filters/DgTriStateFilter.tsx
|
|
5664
|
-
function
|
|
5737
|
+
function co(t) {
|
|
5665
5738
|
let n = e(26), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
5666
5739
|
if (mt(r) || ht(r)) {
|
|
5667
5740
|
let e;
|
|
5668
|
-
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */
|
|
5741
|
+
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ J(Un, { ...t }), n[0] = t, n[1] = e), e;
|
|
5669
5742
|
}
|
|
5670
5743
|
let c;
|
|
5671
5744
|
n[2] === r ? c = n[3] : (c = pt(r), n[2] = r, n[3] = c);
|
|
@@ -5693,7 +5766,7 @@ function eo(t) {
|
|
|
5693
5766
|
let _ = u === "true" || u === "false" ? u : "all", v;
|
|
5694
5767
|
n[14] === a ? v = n[15] : (v = (e) => a(e === "all" ? "" : e), n[14] = a, n[15] = v);
|
|
5695
5768
|
let y;
|
|
5696
|
-
n[16] !== o || n[17] !== d || n[18] !== g || n[19] !== _ || n[20] !== v ? (y = /* @__PURE__ */
|
|
5769
|
+
n[16] !== o || n[17] !== d || n[18] !== g || n[19] !== _ || n[20] !== v ? (y = /* @__PURE__ */ J(C, {
|
|
5697
5770
|
size: o,
|
|
5698
5771
|
disabled: d,
|
|
5699
5772
|
data: g,
|
|
@@ -5701,7 +5774,7 @@ function eo(t) {
|
|
|
5701
5774
|
onChange: v
|
|
5702
5775
|
}), n[16] = o, n[17] = d, n[18] = g, n[19] = _, n[20] = v, n[21] = y) : y = n[21];
|
|
5703
5776
|
let b;
|
|
5704
|
-
return n[22] !== s.filterValue || n[23] !== o || n[24] !== y ? (b = /* @__PURE__ */
|
|
5777
|
+
return n[22] !== s.filterValue || n[23] !== o || n[24] !== y ? (b = /* @__PURE__ */ J(m.Wrapper, {
|
|
5705
5778
|
label: s.filterValue,
|
|
5706
5779
|
size: o,
|
|
5707
5780
|
children: y
|
|
@@ -5709,7 +5782,7 @@ function eo(t) {
|
|
|
5709
5782
|
}
|
|
5710
5783
|
//#endregion
|
|
5711
5784
|
//#region src/tmdatagrid/core/labelsSv.ts
|
|
5712
|
-
var
|
|
5785
|
+
var lo = {
|
|
5713
5786
|
operators: {
|
|
5714
5787
|
contains: "innehåller",
|
|
5715
5788
|
equals: "är lika med",
|
|
@@ -5821,11 +5894,11 @@ var to = {
|
|
|
5821
5894
|
};
|
|
5822
5895
|
//#endregion
|
|
5823
5896
|
//#region src/tmdatagrid/core/summary.ts
|
|
5824
|
-
function
|
|
5897
|
+
function uo({ table: e, columnId: t, fn: n = "sum" }) {
|
|
5825
5898
|
let r = e.getFilteredRowModel().rows;
|
|
5826
|
-
return
|
|
5899
|
+
return ve[n](t, r, r);
|
|
5827
5900
|
}
|
|
5828
5901
|
//#endregion
|
|
5829
|
-
export {
|
|
5902
|
+
export { vr as DATA_STATE_SLICES, ya as DEFAULT_CELL_EXPORT_OPTIONS, $a as DEFAULT_TMDATAGRID_SIZE, At as DETAILS_COLUMN_ID, oo as DgAutocompleteFilter, ao as DgDateRangeFilter, io as DgRangeSliderFilter, co as DgTriStateFilter, Vt as EDIT_COLUMN_ID, et as FILTER_OPERATOR_LABELS, qt as GROUP_COLUMN_ID, br as PERSIST_PAYLOAD_VERSION, tn as ROW_NUMBER_COLUMN_ID, cn as SELECT_COLUMN_ID, yr as SETTINGS_STATE_SLICES, to as SIZE_CONTROL_SIZE, eo as SIZE_ROW_HEIGHT, gr as TMDATAGRID_LABELS_EN, lo as TMDATAGRID_LABELS_SV, ro as TMDataGrid, Yi as TMDataGridBooleanEditor, Xi as TMDataGridDateEditor, Ln as TMDataGridEditActions, di as TMDataGridFilterPills, Un as TMDataGridFilterValueInput, Zi as TMDataGridMultiSelectEditor, Qi as TMDataGridNumberEditor, Si as TMDataGridSearch, $i as TMDataGridSelectEditor, ea as TMDataGridStringEditor, uo as aggregateColumn, Ot as areAllRowsExpanded, Mi as autosizeColumn, ga as boundsCellCount, _a as boundsEdges, xa as buildCellMatrix, Sa as buildGridCellMatrix, nr as clearedValueForType, ii as createTMDataGridColumnHelper, Oa as downloadTextFile, gt as emptyValueForOperator, Ca as exportGridToCsv, ba as formatExportValue, yt as formatFilterLabel, Xt as formatGroupValue, fr as fuzzyGlobalFilterFn, Ur as getColumnCapabilities, gn as getColumnDefaultOperator, _n as getColumnFilterControl, mn as getColumnLabel, Ni as getColumnRegion, hn as getColumnType, ft as getDefaultOperator, rn as getDisplayedRows, tr as getEditFieldName, Wr as getGridCapabilities, Kt as getGroupDataRows, dt as getOperatorsForType, on as getSelectableRowIds, Ri as getStepTargetColumn, hi as getTMDataGridPaginationApi, yn as isColumnEditableForRow, Cn as isColumnReorderable, xn as isControlColumn, vt as isFilterActive, Sn as isGeneratedColumn, an as isPagingActive, Jr as isSameCell, ha as isWithinBounds, Ii as keepGeneratedColumnsOutermost, ji as measureColumnContentWidth, _r as mergeLabels, Fi as moveColumn, zi as moveColumnByStep, ur as normalizeFieldValidate, ui as openColumnFilter, pt as operatorNeedsValue, mt as operatorTakesArrayValue, ht as operatorTakesRangeValue, Hn as optionsToComboboxData, Hr as readFeatureFlags, Kr as resolveCellMove, Vn as resolveColumnOptions, kt as resolveExpandAll, ma as resolveRangeBounds, sn as resolveRowSelectionClick, ri as tmDataGridFeatures, Ta as toClipboardText, Ea as toExcelCsv, $e as useCellControlTabIndex, li as useTMDataGrid, Q as useTMDataGridContext, Da as writeClipboardText };
|
|
5830
5903
|
|
|
5831
5904
|
//# sourceMappingURL=index.js.map
|