@jielga/tmdatagrid 2.0.1 → 2.1.1
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 +11 -1
- package/dist/index.js +244 -238
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/docs/column-layout.md +1 -1
- package/docs/row-details.md +15 -6
- package/docs/styling.md +2 -1
- package/docs/use-tm-data-grid.md +5 -2
- package/package.json +14 -14
- package/skills/appearance/SKILL.md +3 -1
- package/skills/cell-selection/SKILL.md +1 -1
- package/skills/columns/SKILL.md +4 -3
- package/skills/data/SKILL.md +1 -1
- package/skills/editing/SKILL.md +1 -1
- package/skills/filtering/SKILL.md +1 -1
- package/skills/getting-started/SKILL.md +1 -1
- package/skills/grouping/SKILL.md +1 -1
- package/skills/migrating-to-2/SKILL.md +1 -1
- package/skills/options/SKILL.md +2 -2
- package/skills/rows/SKILL.md +9 -8
- package/skills/rows/references/rows-api.md +4 -2
- package/skills/server-side/SKILL.md +1 -1
- package/skills/testing/SKILL.md +1 -1
- package/skills/testing-components/SKILL.md +1 -1
- package/skills/testing-editing/SKILL.md +1 -1
- package/src/components/TMDataGrid.module.css +5 -0
- package/src/components/TMDataGridHeaderCell.module.css +1 -1
- package/src/components/TMDataGridTable.tsx +22 -8
- package/src/components/generatedColumns.tsx +16 -14
- package/src/useTMDataGrid.tsx +66 -59
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Store as he, shallow as ge } from "@tanstack/store";
|
|
|
9
9
|
import { aggregationFns as _e, columnFacetingFeature as ve, columnFilteringFeature as ye, columnGroupingFeature as be, columnOrderingFeature as xe, columnPinningFeature as Se, columnResizingFeature as Ce, columnSizingFeature as we, columnVisibilityFeature as Te, createColumnHelper as Ee, createExpandedRowModel as De, createFacetedMinMaxValues as Oe, createFacetedRowModel as ke, createFacetedUniqueValues as Ae, createFilteredRowModel as je, createGroupedRowModel as Q, createPaginatedRowModel as Me, createSortedRowModel as Ne, filterFns as Pe, flexRender as Fe, functionalUpdate as Ie, globalFilteringFeature as Le, makeStateUpdater as Re, metaHelper as ze, rowAggregationFeature as Be, rowExpandingFeature as Ve, rowPaginationFeature as He, rowPinningFeature as Ue, rowSelectionFeature as We, rowSortingFeature as Ge, sortFns as Ke, tableFeatures as qe, useTable as Je } from "@tanstack/react-table";
|
|
10
10
|
import { compareItems as Ye, rankItem as Xe } from "@tanstack/match-sorter-utils";
|
|
11
11
|
import { useVirtualizer as Ze } from "@tanstack/react-virtual";
|
|
12
|
-
var Qe = { root: "
|
|
12
|
+
var Qe = { root: "_root_wlqnb_8" }, $e = {
|
|
13
13
|
columnsPanel: "_columnsPanel_a5do5_1",
|
|
14
14
|
columnsPanelSearch: "_columnsPanelSearch_a5do5_7",
|
|
15
15
|
columnsPanelList: "_columnsPanelList_a5do5_11",
|
|
@@ -3331,9 +3331,9 @@ function _a(e) {
|
|
|
3331
3331
|
...e
|
|
3332
3332
|
});
|
|
3333
3333
|
}
|
|
3334
|
-
function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination: a, resetPageOnQueryChange: l, enableRowNumbers: u, selectionMode: d, showSelectedBackground: f, defaultHighlightedRowId: p, onHighlightedRowChange: m, cellSelection: h, onFocusedCellChange: g, filters: _, exportOptions: v, editing: y, renderDetails: b, renderDetailsEstHeight: x = pa,
|
|
3335
|
-
let
|
|
3336
|
-
...
|
|
3334
|
+
function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination: a, resetPageOnQueryChange: l, enableRowNumbers: u, selectionMode: d, showSelectedBackground: f, defaultHighlightedRowId: p, onHighlightedRowChange: m, cellSelection: h, onFocusedCellChange: g, filters: _, exportOptions: v, editing: y, renderDetails: b, renderDetailsEstHeight: x = pa, detailsColumnPosition: S = "left", overscan: C = ma, ...w }) {
|
|
3335
|
+
let T = y?.mode, E = y?.draft === !0, D = si({
|
|
3336
|
+
...w,
|
|
3337
3337
|
enableColumnOrdering: r,
|
|
3338
3338
|
enablePagination: a,
|
|
3339
3339
|
enableRowNumbers: u,
|
|
@@ -3341,43 +3341,61 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3341
3341
|
showSelectedBackground: f,
|
|
3342
3342
|
cellSelection: h,
|
|
3343
3343
|
editing: y
|
|
3344
|
-
}),
|
|
3345
|
-
format:
|
|
3346
|
-
fileName:
|
|
3347
|
-
includeHeaders:
|
|
3348
|
-
columns:
|
|
3344
|
+
}), O = o(() => Fr(t), [t]), { format: k, fileName: A, includeHeaders: N, columns: P } = v ?? {}, F = o(() => Ki({
|
|
3345
|
+
format: k,
|
|
3346
|
+
fileName: A,
|
|
3347
|
+
includeHeaders: N,
|
|
3348
|
+
columns: P
|
|
3349
3349
|
}), [
|
|
3350
|
-
O,
|
|
3351
3350
|
k,
|
|
3352
3351
|
A,
|
|
3353
|
-
N
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3352
|
+
N,
|
|
3353
|
+
P
|
|
3354
|
+
]), { surface: I, sidebarSide: L, sidebarWidth: R, defaultOpen: z, inHeader: B } = _ ?? {}, V = o(() => Or({
|
|
3355
|
+
surface: I,
|
|
3356
|
+
sidebarSide: L,
|
|
3357
|
+
sidebarWidth: R,
|
|
3358
|
+
defaultOpen: z,
|
|
3359
|
+
inHeader: B
|
|
3360
3360
|
}), [
|
|
3361
|
-
F,
|
|
3362
3361
|
I,
|
|
3363
3362
|
L,
|
|
3364
3363
|
R,
|
|
3365
|
-
z
|
|
3366
|
-
|
|
3367
|
-
|
|
3364
|
+
z,
|
|
3365
|
+
B
|
|
3366
|
+
]), H = D.selectColumn, U = D.grouping, W = b !== void 0, ee = y !== void 0 && (y.mode === "row" || E || y.onRowDelete !== void 0), G = O.selectColumnLabel, te = O.groupColumnLabel, ne = O.detailsColumnLabel, re = O.editColumnLabel, ie = O.rowNumberColumnLabel, ae = D.rowNumbers, oe = E, se = (e) => {
|
|
3367
|
+
let t = (e) => (e ?? []).filter((e) => !Vn(e)), n = (e, t) => e ? [t] : [], r = (e) => W && S === e;
|
|
3368
|
+
return {
|
|
3369
|
+
start: [
|
|
3370
|
+
...n(ae, mn),
|
|
3371
|
+
...n(H, Dn),
|
|
3372
|
+
...n(U, ln),
|
|
3373
|
+
...n(r("left"), Ft),
|
|
3374
|
+
...t(e?.start)
|
|
3375
|
+
],
|
|
3376
|
+
end: [
|
|
3377
|
+
...t(e?.end),
|
|
3378
|
+
...n(r("right"), Ft),
|
|
3379
|
+
...n(ee, tn)
|
|
3380
|
+
]
|
|
3381
|
+
};
|
|
3382
|
+
}, K = o(() => {
|
|
3383
|
+
let e = _a(w.columns), t = W ? [ca(ne)] : [];
|
|
3368
3384
|
return [
|
|
3369
3385
|
...ae ? [hn(ie)] : [],
|
|
3370
3386
|
...H ? [oa(G)] : [],
|
|
3371
3387
|
...U ? [sa(te)] : [],
|
|
3372
|
-
...
|
|
3388
|
+
...S === "left" ? t : [],
|
|
3373
3389
|
...e,
|
|
3390
|
+
...S === "right" ? t : [],
|
|
3374
3391
|
...ee ? [la(re, oe)] : []
|
|
3375
3392
|
];
|
|
3376
3393
|
}, [
|
|
3377
|
-
|
|
3394
|
+
w.columns,
|
|
3378
3395
|
ae,
|
|
3379
3396
|
H,
|
|
3380
3397
|
W,
|
|
3398
|
+
S,
|
|
3381
3399
|
U,
|
|
3382
3400
|
ee,
|
|
3383
3401
|
oe,
|
|
@@ -3386,35 +3404,35 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3386
3404
|
te,
|
|
3387
3405
|
ne,
|
|
3388
3406
|
re
|
|
3389
|
-
]), [
|
|
3390
|
-
...
|
|
3407
|
+
]), [ce] = c(() => ai(e, ri(K))), q = ce.grouping ?? w.initialState?.grouping ?? [], le = s((w.state?.grouping ?? q).length > 0), ue = vi(w.state), de = ue?.columnVisibility, fe = ue !== void 0 && de !== void 0 ? {
|
|
3408
|
+
...ue,
|
|
3391
3409
|
columnVisibility: {
|
|
3392
|
-
...ga(
|
|
3393
|
-
...U ? { [ln]:
|
|
3410
|
+
...ga(de),
|
|
3411
|
+
...U ? { [ln]: le.current } : {}
|
|
3394
3412
|
}
|
|
3395
|
-
} :
|
|
3396
|
-
|
|
3397
|
-
let
|
|
3398
|
-
let t = e.columnResizing, n =
|
|
3399
|
-
return n === null || n.isResizingColumn !== t.isResizingColumn ? (
|
|
3413
|
+
} : ue, J = s(void 0), Y = s(!1), pe = Y.current ? fe : yi(fe, J.current);
|
|
3414
|
+
Y.current = !1, J.current = pe;
|
|
3415
|
+
let X = s(null), me = n((e) => {
|
|
3416
|
+
let t = e.columnResizing, n = X.current;
|
|
3417
|
+
return n === null || n.isResizingColumn !== t.isResizingColumn ? (X.current = t, e) : {
|
|
3400
3418
|
...e,
|
|
3401
3419
|
columnResizing: n
|
|
3402
3420
|
};
|
|
3403
|
-
}, []),
|
|
3404
|
-
|
|
3405
|
-
let
|
|
3406
|
-
let e =
|
|
3407
|
-
for (let e of
|
|
3408
|
-
let r =
|
|
3421
|
+
}, []), Z = s(null), [he] = c(() => $t(() => Z.current)), _e = he, ve = M(_e.store, (e) => e.committedValues), ye = D.editNewRowsSticky, be = M(_e.store, (e) => ye ? ha : e.newRows.filter((e) => e.committed).map((e) => e.tempId), { compare: ge }), xe = s(w.getRowId);
|
|
3422
|
+
xe.current = w.getRowId;
|
|
3423
|
+
let Se = o(() => {
|
|
3424
|
+
let e = xe.current, t = /* @__PURE__ */ new Map(), n = [];
|
|
3425
|
+
for (let e of be) {
|
|
3426
|
+
let r = ve[e];
|
|
3409
3427
|
r !== void 0 && (t.set(r, e), n.push(r));
|
|
3410
3428
|
}
|
|
3411
|
-
let r = Object.keys(
|
|
3429
|
+
let r = Object.keys(ve).length;
|
|
3412
3430
|
if (r === 0) return {
|
|
3413
|
-
rows:
|
|
3431
|
+
rows: w.data,
|
|
3414
3432
|
idOf: t
|
|
3415
3433
|
};
|
|
3416
|
-
let i = r === n.length ?
|
|
3417
|
-
let i = e?.(n, r, void 0) ?? String(r), a =
|
|
3434
|
+
let i = r === n.length ? w.data : w.data.map((n, r) => {
|
|
3435
|
+
let i = e?.(n, r, void 0) ?? String(r), a = ve[i];
|
|
3418
3436
|
return a === void 0 ? n : (t.set(a, i), a);
|
|
3419
3437
|
});
|
|
3420
3438
|
return {
|
|
@@ -3422,68 +3440,62 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3422
3440
|
idOf: t
|
|
3423
3441
|
};
|
|
3424
3442
|
}, [
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
]),
|
|
3429
|
-
|
|
3430
|
-
let
|
|
3443
|
+
w.data,
|
|
3444
|
+
ve,
|
|
3445
|
+
be
|
|
3446
|
+
]), Ce = s(Se.idOf);
|
|
3447
|
+
Ce.current = Se.idOf;
|
|
3448
|
+
let we = n((e, t, n) => Ce.current.get(e) ?? xe.current?.(e, t, n) ?? (n === void 0 ? String(t) : `${n.id}.${t}`), []), Te = s(null), Ee = l ?? !0, De = n(() => Te.current, []);
|
|
3431
3449
|
Si();
|
|
3432
|
-
let
|
|
3450
|
+
let Oe = Je({
|
|
3433
3451
|
columnResizeMode: "onEnd",
|
|
3434
3452
|
autoResetExpanded: !1,
|
|
3435
3453
|
autoResetPageIndex: !1,
|
|
3436
3454
|
enableSorting: !0,
|
|
3437
3455
|
enableColumnResizing: !0,
|
|
3438
|
-
globalFilterFn:
|
|
3456
|
+
globalFilterFn: w.quickSearchMode === "contains" ? "includesString" : "tmDataGridFuzzy",
|
|
3439
3457
|
groupedColumnMode: "remove",
|
|
3440
|
-
...
|
|
3441
|
-
...
|
|
3442
|
-
onColumnFiltersChange: ji("columnFilters",
|
|
3443
|
-
onGlobalFilterChange: ji("globalFilter",
|
|
3444
|
-
onSortingChange: ji("sorting",
|
|
3445
|
-
onGroupingChange: ji("grouping",
|
|
3458
|
+
...w,
|
|
3459
|
+
...Ee ? {
|
|
3460
|
+
onColumnFiltersChange: ji("columnFilters", w.onColumnFiltersChange, De),
|
|
3461
|
+
onGlobalFilterChange: ji("globalFilter", w.onGlobalFilterChange, De),
|
|
3462
|
+
onSortingChange: ji("sorting", w.onSortingChange, De),
|
|
3463
|
+
onGroupingChange: ji("grouping", w.onGroupingChange, De)
|
|
3446
3464
|
} : {},
|
|
3447
|
-
data:
|
|
3448
|
-
getRowId:
|
|
3449
|
-
...b === void 0 ? {} : { getRowCanExpand:
|
|
3450
|
-
enableRowPinning: (e) => !e.getIsGrouped() && (typeof
|
|
3451
|
-
...
|
|
3465
|
+
data: Se.rows,
|
|
3466
|
+
getRowId: we,
|
|
3467
|
+
...b === void 0 ? {} : { getRowCanExpand: w.getRowCanExpand ?? (() => !0) },
|
|
3468
|
+
enableRowPinning: (e) => !e.getIsGrouped() && (typeof w.enableRowPinning == "function" ? w.enableRowPinning(e) : w.enableRowPinning === !0),
|
|
3469
|
+
...E ? { enableRowSelection: (e) => !he.isRowDeleted(e.id) && (typeof w.enableRowSelection == "function" ? w.enableRowSelection(e) : w.enableRowSelection !== !1) } : {},
|
|
3452
3470
|
features: da,
|
|
3453
|
-
columns:
|
|
3454
|
-
state:
|
|
3471
|
+
columns: K,
|
|
3472
|
+
state: pe,
|
|
3455
3473
|
initialState: {
|
|
3456
|
-
...
|
|
3457
|
-
...
|
|
3474
|
+
...w.initialState,
|
|
3475
|
+
...ce,
|
|
3458
3476
|
columnVisibility: {
|
|
3459
3477
|
...ga({
|
|
3460
|
-
...
|
|
3461
|
-
...
|
|
3478
|
+
...w.initialState?.columnVisibility,
|
|
3479
|
+
...ce.columnVisibility
|
|
3462
3480
|
}),
|
|
3463
|
-
...U ? { [ln]:
|
|
3464
|
-
},
|
|
3465
|
-
columnPinning: {
|
|
3466
|
-
start: [
|
|
3467
|
-
...ae && V ? [mn] : [],
|
|
3468
|
-
...H && V ? [Dn] : [],
|
|
3469
|
-
...U && V ? [ln] : [],
|
|
3470
|
-
...W && V ? [Ft] : [],
|
|
3471
|
-
...(K.columnPinning?.start ?? C.initialState?.columnPinning?.start ?? []).filter((e) => e !== "__rowNumber__" && e !== "__select__" && e !== "__details__" && e !== "__group__")
|
|
3472
|
-
],
|
|
3473
|
-
end: [...(K.columnPinning?.end ?? C.initialState?.columnPinning?.end ?? []).filter((e) => e !== tn), ...ee && V ? [tn] : []]
|
|
3481
|
+
...U ? { [ln]: q.length > 0 } : {}
|
|
3474
3482
|
},
|
|
3483
|
+
columnPinning: se({
|
|
3484
|
+
start: ce.columnPinning?.start ?? w.initialState?.columnPinning?.start,
|
|
3485
|
+
end: ce.columnPinning?.end ?? w.initialState?.columnPinning?.end
|
|
3486
|
+
}),
|
|
3475
3487
|
pagination: {
|
|
3476
3488
|
pageIndex: 0,
|
|
3477
3489
|
pageSize: 25,
|
|
3478
|
-
...
|
|
3479
|
-
...
|
|
3490
|
+
...w.initialState?.pagination,
|
|
3491
|
+
...ce.pagination
|
|
3480
3492
|
}
|
|
3481
3493
|
}
|
|
3482
|
-
},
|
|
3483
|
-
Ci(),
|
|
3484
|
-
table:
|
|
3485
|
-
editMode:
|
|
3486
|
-
draft:
|
|
3494
|
+
}, me);
|
|
3495
|
+
Ci(), Te.current = Oe, Ti(Oe.store), Z.current = {
|
|
3496
|
+
table: Oe,
|
|
3497
|
+
editMode: T ?? "cell",
|
|
3498
|
+
draft: E,
|
|
3487
3499
|
rowValidators: y?.rowValidators,
|
|
3488
3500
|
tableValidators: y?.tableValidators,
|
|
3489
3501
|
editableColumnIds: y?.columns,
|
|
@@ -3494,61 +3506,61 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3494
3506
|
onRowAdd: y?.onRowAdd,
|
|
3495
3507
|
onRowDelete: y?.onRowDelete
|
|
3496
3508
|
};
|
|
3497
|
-
let
|
|
3498
|
-
editMode:
|
|
3499
|
-
editDraft:
|
|
3509
|
+
let ke = s({
|
|
3510
|
+
editMode: T,
|
|
3511
|
+
editDraft: E
|
|
3500
3512
|
});
|
|
3501
3513
|
i(() => {
|
|
3502
|
-
let e =
|
|
3503
|
-
e.editMode ===
|
|
3504
|
-
editMode:
|
|
3505
|
-
editDraft:
|
|
3506
|
-
},
|
|
3514
|
+
let e = ke.current;
|
|
3515
|
+
e.editMode === T && e.editDraft === E || (ke.current = {
|
|
3516
|
+
editMode: T,
|
|
3517
|
+
editDraft: E
|
|
3518
|
+
}, _e.cancelAll());
|
|
3507
3519
|
}, [
|
|
3508
|
-
w,
|
|
3509
3520
|
T,
|
|
3510
|
-
|
|
3521
|
+
E,
|
|
3522
|
+
_e
|
|
3511
3523
|
]);
|
|
3512
|
-
let
|
|
3524
|
+
let Ae = y !== void 0, je = w.manualPagination === !0 || w.manualFiltering === !0;
|
|
3513
3525
|
i(() => {
|
|
3514
|
-
!
|
|
3526
|
+
!Ae || je || he.forgetMissingRows(Te.current.getCoreRowModel().rowsById);
|
|
3515
3527
|
}, [
|
|
3516
|
-
|
|
3517
|
-
ke,
|
|
3528
|
+
Se.rows,
|
|
3518
3529
|
Ae,
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3530
|
+
je,
|
|
3531
|
+
he
|
|
3532
|
+
]), i(() => Di(Te.current, he.isRowDeleted), [he]), i(() => {
|
|
3533
|
+
y !== void 0 && w.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.");
|
|
3522
3534
|
}, []), i(() => {
|
|
3523
|
-
for (let { slice: e, handler: t } of bi(
|
|
3535
|
+
for (let { slice: e, handler: t } of bi(w)) 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.`);
|
|
3524
3536
|
}, []), i(() => {
|
|
3525
3537
|
if (!U) return;
|
|
3526
|
-
let e =
|
|
3527
|
-
|
|
3538
|
+
let e = Oe.store.state.grouping;
|
|
3539
|
+
le.current = e.length > 0, Oe.store.state.columnVisibility?.__group__ !== e.length > 0 && Oe.setColumnVisibility((t) => ({
|
|
3528
3540
|
...t,
|
|
3529
3541
|
[ln]: e.length > 0
|
|
3530
3542
|
}));
|
|
3531
|
-
let t =
|
|
3532
|
-
t.grouping !== e && (e = t.grouping,
|
|
3543
|
+
let t = Oe.store.subscribe((t) => {
|
|
3544
|
+
t.grouping !== e && (e = t.grouping, le.current = t.grouping.length > 0, Y.current = !0, Oe.setColumnVisibility((e) => ({
|
|
3533
3545
|
...e,
|
|
3534
3546
|
[ln]: t.grouping.length > 0
|
|
3535
3547
|
})));
|
|
3536
3548
|
});
|
|
3537
3549
|
return () => t.unsubscribe();
|
|
3538
|
-
}, [U,
|
|
3550
|
+
}, [U, Oe]), i(() => {
|
|
3539
3551
|
if (!ei(e)) return;
|
|
3540
|
-
oi(
|
|
3552
|
+
oi(Oe.store.state, e);
|
|
3541
3553
|
let t, n = null, r = () => {
|
|
3542
3554
|
t = void 0, n !== null && (oi(n, e), n = null);
|
|
3543
|
-
}, i =
|
|
3555
|
+
}, i = Oe.store.subscribe((e) => {
|
|
3544
3556
|
n = e, t !== void 0 && clearTimeout(t), t = setTimeout(r, ua);
|
|
3545
3557
|
});
|
|
3546
3558
|
return () => {
|
|
3547
3559
|
i.unsubscribe(), t !== void 0 && clearTimeout(t), r();
|
|
3548
3560
|
};
|
|
3549
|
-
}, [e,
|
|
3550
|
-
let
|
|
3551
|
-
filterPanelOpen:
|
|
3561
|
+
}, [e, Oe]);
|
|
3562
|
+
let Q = j({
|
|
3563
|
+
filterPanelOpen: V.defaultOpen,
|
|
3552
3564
|
filterPanelColumnId: null,
|
|
3553
3565
|
headerFilterColumnId: null,
|
|
3554
3566
|
draggedColumnId: null,
|
|
@@ -3608,56 +3620,47 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3608
3620
|
...e,
|
|
3609
3621
|
cellRange: t
|
|
3610
3622
|
})
|
|
3611
|
-
})),
|
|
3623
|
+
})), Me = s(m);
|
|
3612
3624
|
i(() => {
|
|
3613
|
-
|
|
3625
|
+
Me.current = m;
|
|
3614
3626
|
}, [m]), i(() => {
|
|
3615
|
-
let e =
|
|
3616
|
-
t.highlightedRowId !== e && (e = t.highlightedRowId,
|
|
3627
|
+
let e = Q.state.highlightedRowId, t = Q.subscribe((t) => {
|
|
3628
|
+
t.highlightedRowId !== e && (e = t.highlightedRowId, Me.current?.(t.highlightedRowId));
|
|
3617
3629
|
});
|
|
3618
3630
|
return () => t.unsubscribe();
|
|
3619
|
-
}, [
|
|
3620
|
-
let
|
|
3631
|
+
}, [Q]);
|
|
3632
|
+
let Ne = s(g);
|
|
3621
3633
|
i(() => {
|
|
3622
|
-
|
|
3634
|
+
Ne.current = g;
|
|
3623
3635
|
}, [g]), i(() => {
|
|
3624
|
-
let e =
|
|
3625
|
-
t.focusedCell !== e && (e = t.focusedCell,
|
|
3636
|
+
let e = Q.state.focusedCell, t = Q.subscribe((t) => {
|
|
3637
|
+
t.focusedCell !== e && (e = t.focusedCell, Ne.current?.(t.focusedCell));
|
|
3626
3638
|
});
|
|
3627
3639
|
return () => t.unsubscribe();
|
|
3628
|
-
}, [
|
|
3629
|
-
let
|
|
3630
|
-
|
|
3631
|
-
let e =
|
|
3632
|
-
|
|
3640
|
+
}, [Q]);
|
|
3641
|
+
let Pe = s(() => {});
|
|
3642
|
+
Pe.current = () => {
|
|
3643
|
+
let e = w.initialState, t = [...e?.grouping ?? []];
|
|
3644
|
+
Oe.setGrouping(t), Oe.setColumnVisibility({
|
|
3633
3645
|
...ga({ ...e?.columnVisibility }),
|
|
3634
3646
|
...U ? { [ln]: t.length > 0 } : {}
|
|
3635
|
-
}),
|
|
3636
|
-
start: [
|
|
3637
|
-
...ae && V ? [mn] : [],
|
|
3638
|
-
...H && V ? [Dn] : [],
|
|
3639
|
-
...U && V ? [ln] : [],
|
|
3640
|
-
...W && V ? [Ft] : [],
|
|
3641
|
-
...(e?.columnPinning?.start ?? []).filter((e) => e !== "__rowNumber__" && e !== "__select__" && e !== "__details__" && e !== "__group__")
|
|
3642
|
-
],
|
|
3643
|
-
end: [...(e?.columnPinning?.end ?? []).filter((e) => e !== tn), ...ee && V ? [tn] : []]
|
|
3644
|
-
});
|
|
3647
|
+
}), Oe.setColumnSizing({ ...e?.columnSizing }), Oe.setColumnOrder([...e?.columnOrder ?? []]), Oe.setColumnPinning(se(e?.columnPinning));
|
|
3645
3648
|
};
|
|
3646
|
-
let
|
|
3649
|
+
let Fe = n(() => Pe.current(), []), Ie = s(() => !1);
|
|
3647
3650
|
return {
|
|
3648
|
-
table:
|
|
3649
|
-
ui:
|
|
3650
|
-
edit:
|
|
3651
|
-
features:
|
|
3652
|
-
filters:
|
|
3653
|
-
exportOptions:
|
|
3654
|
-
labels:
|
|
3651
|
+
table: Oe,
|
|
3652
|
+
ui: Q,
|
|
3653
|
+
edit: _e,
|
|
3654
|
+
features: D,
|
|
3655
|
+
filters: V,
|
|
3656
|
+
exportOptions: F,
|
|
3657
|
+
labels: O,
|
|
3655
3658
|
renderDetails: b,
|
|
3656
3659
|
renderDetailsEstHeight: x,
|
|
3657
|
-
overscan:
|
|
3658
|
-
resetSettings:
|
|
3659
|
-
scrollToRow: n((e) =>
|
|
3660
|
-
scrollerRef:
|
|
3660
|
+
overscan: C,
|
|
3661
|
+
resetSettings: Fe,
|
|
3662
|
+
scrollToRow: n((e) => Ie.current(e), []),
|
|
3663
|
+
scrollerRef: Ie
|
|
3661
3664
|
};
|
|
3662
3665
|
}
|
|
3663
3666
|
function ya(e, t) {
|
|
@@ -4572,21 +4575,21 @@ function uo(e) {
|
|
|
4572
4575
|
return e.headerFilterColumnId;
|
|
4573
4576
|
}
|
|
4574
4577
|
var fo = {
|
|
4575
|
-
headerCell: "
|
|
4576
|
-
headerCellFiltered: "
|
|
4577
|
-
headerTitle: "
|
|
4578
|
-
headerActions: "
|
|
4579
|
-
headerAction: "
|
|
4580
|
-
headerCellSortable: "
|
|
4581
|
-
sortAction: "
|
|
4582
|
-
sortIndex: "
|
|
4583
|
-
headerCellDragging: "
|
|
4584
|
-
headerCellDropBefore: "
|
|
4585
|
-
headerCellDropAfter: "
|
|
4586
|
-
columnSeparator: "
|
|
4587
|
-
columnSeparatorResizable: "
|
|
4588
|
-
columnSeparatorActive: "
|
|
4589
|
-
menuItemActive: "
|
|
4578
|
+
headerCell: "_headerCell_18ma1_1",
|
|
4579
|
+
headerCellFiltered: "_headerCellFiltered_18ma1_35",
|
|
4580
|
+
headerTitle: "_headerTitle_18ma1_35",
|
|
4581
|
+
headerActions: "_headerActions_18ma1_58",
|
|
4582
|
+
headerAction: "_headerAction_18ma1_58",
|
|
4583
|
+
headerCellSortable: "_headerCellSortable_18ma1_87",
|
|
4584
|
+
sortAction: "_sortAction_18ma1_93",
|
|
4585
|
+
sortIndex: "_sortIndex_18ma1_103",
|
|
4586
|
+
headerCellDragging: "_headerCellDragging_18ma1_115",
|
|
4587
|
+
headerCellDropBefore: "_headerCellDropBefore_18ma1_119",
|
|
4588
|
+
headerCellDropAfter: "_headerCellDropAfter_18ma1_120",
|
|
4589
|
+
columnSeparator: "_columnSeparator_18ma1_140",
|
|
4590
|
+
columnSeparatorResizable: "_columnSeparatorResizable_18ma1_162",
|
|
4591
|
+
columnSeparatorActive: "_columnSeparatorActive_18ma1_185",
|
|
4592
|
+
menuItemActive: "_menuItemActive_18ma1_191"
|
|
4590
4593
|
}, po = 30, mo = 2;
|
|
4591
4594
|
function ho(e) {
|
|
4592
4595
|
let t = e.ownerDocument.createRange();
|
|
@@ -5953,11 +5956,14 @@ function Ds({ container: e, cellElement: t, leftPinnedWidth: n, rightPinnedWidth
|
|
|
5953
5956
|
}
|
|
5954
5957
|
function Os(e) {
|
|
5955
5958
|
if (e.getIsPlaceholder()) return null;
|
|
5956
|
-
if (!e
|
|
5957
|
-
let { aggregatedCell: t
|
|
5958
|
-
return t === void 0 ?
|
|
5959
|
+
if (!ks(e)) return Fe(e.column.columnDef.cell, e.getContext());
|
|
5960
|
+
let { aggregatedCell: t } = e.column.columnDef;
|
|
5961
|
+
return t === void 0 ? e.getIsAggregated() ? Fe(e.column.columnDef.cell, e.getContext()) : null : Fe(t, e.getContext());
|
|
5959
5962
|
}
|
|
5960
|
-
function ks(e
|
|
5963
|
+
function ks(e) {
|
|
5964
|
+
return e.row.getIsGrouped() && !e.getIsGrouped();
|
|
5965
|
+
}
|
|
5966
|
+
function As(e, t) {
|
|
5961
5967
|
let n = ws(e, t);
|
|
5962
5968
|
if (n === null) return e;
|
|
5963
5969
|
let r = [], i = 0;
|
|
@@ -5967,7 +5973,7 @@ function ks(e, t) {
|
|
|
5967
5973
|
}, t.start)), i = t.end;
|
|
5968
5974
|
return i < e.length && r.push(e.slice(i)), r;
|
|
5969
5975
|
}
|
|
5970
|
-
function
|
|
5976
|
+
function js(t) {
|
|
5971
5977
|
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: _ } = $(), v;
|
|
5972
5978
|
n[0] === r.column ? v = n[1] : (v = Ut(r.column), n[0] = r.column, n[1] = v);
|
|
5973
5979
|
let y = v, b = r.row.id, x;
|
|
@@ -6008,10 +6014,10 @@ function As(t) {
|
|
|
6008
6014
|
n[24] !== r || n[25] !== c || n[26] !== O || n[27] !== s || n[28] !== l || n[29] !== g ? (le = s ?? /* @__PURE__ */ J("span", {
|
|
6009
6015
|
className: Rt.cellContent,
|
|
6010
6016
|
children: (() => {
|
|
6011
|
-
let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r
|
|
6012
|
-
if (l !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r
|
|
6017
|
+
let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !ks(r) ? ts(r, O) : void 0;
|
|
6018
|
+
if (l !== void 0 && c === void 0 && !r.getIsPlaceholder() && !ks(r) && r.column.columnDef.cell === g.getDefaultColumnDef().cell) {
|
|
6013
6019
|
let t = e === void 0 ? r.renderValue() : e.renderValue();
|
|
6014
|
-
if (typeof t == "string" || typeof t == "number") return
|
|
6020
|
+
if (typeof t == "string" || typeof t == "number") return As(String(t), l);
|
|
6015
6021
|
}
|
|
6016
6022
|
return e === void 0 ? c ?? Os(r) : Fe(r.column.columnDef.cell, e);
|
|
6017
6023
|
})()
|
|
@@ -6047,7 +6053,7 @@ function As(t) {
|
|
|
6047
6053
|
children: le
|
|
6048
6054
|
}), n[31] = r.column.id, n[32] = r.row.id, n[33] = d, n[34] = h, n[35] = m, n[36] = u, n[37] = f, n[38] = p, n[39] = I, n[40] = L, n[41] = R, n[42] = z, n[43] = B, n[44] = V, n[45] = H, n[46] = U, n[47] = W, n[48] = ee, n[49] = G, n[50] = te, n[51] = ae, n[52] = q, n[53] = le, n[54] = k, n[55] = A, n[56] = j, n[57] = N, n[58] = ue) : ue = n[58], ue;
|
|
6049
6055
|
}
|
|
6050
|
-
function
|
|
6056
|
+
function Ms(t) {
|
|
6051
6057
|
let n = e(16), { enabled: r, menuContent: i, menuProps: a, onContextMenu: o, onClose: s, children: c } = t, l;
|
|
6052
6058
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { display: "contents" }, n[0] = l) : l = n[0];
|
|
6053
6059
|
let u = r ? o : void 0, d;
|
|
@@ -6078,7 +6084,7 @@ function js(t) {
|
|
|
6078
6084
|
children: [h, g]
|
|
6079
6085
|
}), n[10] = a, n[11] = p, n[12] = m, n[13] = h, n[14] = g, n[15] = v) : v = n[15], v;
|
|
6080
6086
|
}
|
|
6081
|
-
function
|
|
6087
|
+
function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContextMenu: l, rowClassName: u, rowStyle: d, striped: f = !1, onScrollToTop: m, onScrollToBottom: h, onScrollToLeft: v, onScrollToRight: y, renderEmptyState: b, renderRowContextMenu: x, renderColumnMenuItems: S, rowContextMenuProps: C, onReachEnd: w, reachEndThreshold: T = 10, "aria-label": E, "aria-labelledby": O }) {
|
|
6082
6088
|
let { table: k, ui: A, edit: j, features: N, filters: P, exportOptions: F, labels: I, rowHeight: L, controlSize: R, renderDetails: z, renderDetailsEstHeight: B, overscan: V, scrollerRef: H } = $();
|
|
6083
6089
|
Ea(k.store);
|
|
6084
6090
|
let U = M(A, (e) => e.highlightedRowId), W = M(A, (e) => e.focusedCell), ee = M(A, (e) => e.cellRange), G = M(j.store, (e) => e.active), te = M(j.store, (e) => e.openRowIds), ne = M(j.store, (e) => e.newRows), re = ne.length, ie = M(j.store, (e) => e.deletedRowIds), ae = M(j.store, (e) => e.openRowIds.filter((t) => (e.rows[t]?.dirtyFields.length ?? 0) > 0)), oe = M(j.store, (e) => e.committedRowIds), se = o(() => new Set(te), [te]), K = o(() => new Set(ae), [ae]), ce = o(() => new Set(oe), [oe]), q = o(() => new Set(ne.map((e) => e.tempId)), [ne]), { loading: ue, noResultsLabel: de = I.noResults } = k.options.meta ?? {}, pe = s(null), X = Cn(k, N), me = N.matchHighlighting ? Cs(k) : null, Z = N.rowPinning ? xs(k, "top") : [], he = N.rowPinning ? xs(k, "bottom") : [], ge = Z.length + he.length, _e = null;
|
|
@@ -6683,7 +6689,7 @@ function Ms({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6683
6689
|
layoutFor: tt,
|
|
6684
6690
|
rowHeight: L
|
|
6685
6691
|
}),
|
|
6686
|
-
/* @__PURE__ */ J(
|
|
6692
|
+
/* @__PURE__ */ J(Ms, {
|
|
6687
6693
|
enabled: x !== void 0 || _t,
|
|
6688
6694
|
menuContent: pn,
|
|
6689
6695
|
menuProps: C,
|
|
@@ -6743,7 +6749,7 @@ function Ms({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6743
6749
|
} : void 0,
|
|
6744
6750
|
children: [c.map((i, a) => {
|
|
6745
6751
|
let s = G !== null && G.rowId === e.id && G.columnId === i.column.id || u && j.canEditCell(e, i.column);
|
|
6746
|
-
return /* @__PURE__ */ J(
|
|
6752
|
+
return /* @__PURE__ */ J(js, {
|
|
6747
6753
|
cell: i,
|
|
6748
6754
|
rowHeight: L,
|
|
6749
6755
|
layout: tt(i.column.id),
|
|
@@ -6920,18 +6926,18 @@ function Ms({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6920
6926
|
]
|
|
6921
6927
|
});
|
|
6922
6928
|
}
|
|
6923
|
-
var
|
|
6929
|
+
var Ps = {
|
|
6924
6930
|
toolbar: "_toolbar_gwk05_1",
|
|
6925
6931
|
toolbarSpacer: "_toolbarSpacer_gwk05_15",
|
|
6926
6932
|
summaryCount: "_summaryCount_gwk05_19"
|
|
6927
6933
|
};
|
|
6928
6934
|
//#endregion
|
|
6929
6935
|
//#region src/components/TMDataGridToolbar.tsx
|
|
6930
|
-
function
|
|
6936
|
+
function Fs(t) {
|
|
6931
6937
|
let n = e(18), r, i, a, o, s;
|
|
6932
6938
|
n[0] === t ? (r = n[1], i = n[2], a = n[3], o = n[4], s = n[5]) : ({children: r, withBottomBorder: s, className: i, mod: a, ...o} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = s);
|
|
6933
6939
|
let c = s !== void 0 && s, l;
|
|
6934
|
-
n[6] === i ? l = n[7] : (l = [
|
|
6940
|
+
n[6] === i ? l = n[7] : (l = [Ps.toolbar, i].filter(Boolean), n[6] = i, n[7] = l);
|
|
6935
6941
|
let u = l.join(" "), f;
|
|
6936
6942
|
n[8] === c ? f = n[9] : (f = { "with-bottom-border": c }, n[8] = c, n[9] = f);
|
|
6937
6943
|
let p;
|
|
@@ -6945,18 +6951,18 @@ function Ps(t) {
|
|
|
6945
6951
|
children: r
|
|
6946
6952
|
}), n[13] = r, n[14] = o, n[15] = u, n[16] = p, n[17] = m) : m = n[17], m;
|
|
6947
6953
|
}
|
|
6948
|
-
function
|
|
6954
|
+
function Is(t) {
|
|
6949
6955
|
let n = e(8), r, i;
|
|
6950
6956
|
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
6951
6957
|
let a;
|
|
6952
|
-
n[3] === r ? a = n[4] : (a = [
|
|
6958
|
+
n[3] === r ? a = n[4] : (a = [Ps.toolbarSpacer, r].filter(Boolean), n[3] = r, n[4] = a);
|
|
6953
6959
|
let o = a.join(" "), s;
|
|
6954
6960
|
return n[5] !== i || n[6] !== o ? (s = /* @__PURE__ */ J(d, {
|
|
6955
6961
|
className: o,
|
|
6956
6962
|
...i
|
|
6957
6963
|
}), n[5] = i, n[6] = o, n[7] = s) : s = n[7], s;
|
|
6958
6964
|
}
|
|
6959
|
-
function
|
|
6965
|
+
function Ls() {
|
|
6960
6966
|
let t = e(2), { table: n, labels: r } = $();
|
|
6961
6967
|
if (n.options.meta?.loading !== !0) return null;
|
|
6962
6968
|
let i;
|
|
@@ -6966,7 +6972,7 @@ function Is() {
|
|
|
6966
6972
|
"aria-label": r.loading
|
|
6967
6973
|
}), t[0] = r.loading, t[1] = i), i;
|
|
6968
6974
|
}
|
|
6969
|
-
function
|
|
6975
|
+
function Rs(t) {
|
|
6970
6976
|
let n = e(8), { children: r } = t, { table: i, controlSize: a } = $();
|
|
6971
6977
|
Ea(i.store);
|
|
6972
6978
|
let o = i.options.manualFiltering === !0 || i.options.manualPagination === !0, s;
|
|
@@ -6978,13 +6984,13 @@ function Ls(t) {
|
|
|
6978
6984
|
span: !0,
|
|
6979
6985
|
size: a,
|
|
6980
6986
|
c: "dimmed",
|
|
6981
|
-
className:
|
|
6987
|
+
className: Ps.summaryCount,
|
|
6982
6988
|
"data-dg-part": "summary-count",
|
|
6983
6989
|
children: d
|
|
6984
6990
|
}), n[5] = a, n[6] = d, n[7] = f) : f = n[7], f;
|
|
6985
6991
|
}
|
|
6986
|
-
function
|
|
6987
|
-
let t = e(16), n = $(), { table: r, ui: i, features: a, filters: o, labels: s, controlSize: c } = n, u = M(i,
|
|
6992
|
+
function zs() {
|
|
6993
|
+
let t = e(16), n = $(), { table: r, ui: i, features: a, filters: o, labels: s, controlSize: c } = n, u = M(i, Us), d = M(r.store, Hs), f = d.filter(Vs).length;
|
|
6988
6994
|
if (!li(r, a).canFilterAny || o.surface === "none") return null;
|
|
6989
6995
|
let p = u || f > 0 ? "light" : "subtle", m = f > 0 ? void 0 : "gray", h;
|
|
6990
6996
|
t[0] !== n || t[1] !== d.length || t[2] !== u || t[3] !== r || t[4] !== i.actions ? (h = () => {
|
|
@@ -6992,7 +6998,7 @@ function Rs() {
|
|
|
6992
6998
|
i.actions.closeFilterPanel();
|
|
6993
6999
|
return;
|
|
6994
7000
|
}
|
|
6995
|
-
let e = d.length === 0 ? r.getAllLeafColumns().find(
|
|
7001
|
+
let e = d.length === 0 ? r.getAllLeafColumns().find(Bs) : void 0;
|
|
6996
7002
|
e && ya(n, e.id), i.actions.openFilterPanel(e?.id ?? null);
|
|
6997
7003
|
}, t[0] = n, t[1] = d.length, t[2] = u, t[3] = r, t[4] = i.actions, t[5] = h) : h = t[5];
|
|
6998
7004
|
let g;
|
|
@@ -7017,19 +7023,19 @@ function Rs() {
|
|
|
7017
7023
|
children: _
|
|
7018
7024
|
}), t[13] = s.filters, t[14] = _, t[15] = v) : v = t[15], v;
|
|
7019
7025
|
}
|
|
7020
|
-
function
|
|
7026
|
+
function Bs(e) {
|
|
7021
7027
|
return e.getCanFilter();
|
|
7022
7028
|
}
|
|
7023
|
-
function
|
|
7029
|
+
function Vs(e) {
|
|
7024
7030
|
return St(e.value);
|
|
7025
7031
|
}
|
|
7026
|
-
function
|
|
7032
|
+
function Hs(e) {
|
|
7027
7033
|
return e.columnFilters;
|
|
7028
7034
|
}
|
|
7029
|
-
function
|
|
7035
|
+
function Us(e) {
|
|
7030
7036
|
return e.filterPanelOpen;
|
|
7031
7037
|
}
|
|
7032
|
-
var
|
|
7038
|
+
var Ws = {
|
|
7033
7039
|
title: "_title_199r2_1",
|
|
7034
7040
|
list: "_list_199r2_5",
|
|
7035
7041
|
listHeader: "_listHeader_199r2_13",
|
|
@@ -7045,20 +7051,20 @@ var Us = {
|
|
|
7045
7051
|
};
|
|
7046
7052
|
//#endregion
|
|
7047
7053
|
//#region src/components/TMDataGridExportPicker.tsx
|
|
7048
|
-
function
|
|
7049
|
-
let t = e(26), { ui: n, labels: r, size: i, controlSize: a, exportOptions: o } = $(), s = M(n,
|
|
7054
|
+
function Gs() {
|
|
7055
|
+
let t = e(26), { ui: n, labels: r, size: i, controlSize: a, exportOptions: o } = $(), s = M(n, Ks), c, l, u, d;
|
|
7050
7056
|
if (t[0] !== o || t[1] !== r || t[2] !== s || t[3] !== n.actions) {
|
|
7051
7057
|
let e = s ? Ki(o, s.options).format : null;
|
|
7052
7058
|
c = v, l = s !== null, t[8] === n.actions ? u = t[9] : (u = () => n.actions.closeExportPicker(), t[8] = n.actions, t[9] = u), d = e && r.exportPickerTitle(e.extension.toUpperCase()), t[0] = o, t[1] = r, t[2] = s, t[3] = n.actions, t[4] = c, t[5] = l, t[6] = u, t[7] = d;
|
|
7053
7059
|
} else c = t[4], l = t[5], u = t[6], d = t[7];
|
|
7054
|
-
let f =
|
|
7060
|
+
let f = qs[i], p = Js[a], m;
|
|
7055
7061
|
t[10] === p ? m = t[11] : (m = { size: p }, t[10] = p, t[11] = m);
|
|
7056
7062
|
let h;
|
|
7057
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (h = { title:
|
|
7063
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (h = { title: Ws.title }, t[12] = h) : h = t[12];
|
|
7058
7064
|
let g = `var(--mantine-font-size-${a})`, _;
|
|
7059
7065
|
t[13] === g ? _ = t[14] : (_ = { title: { fontSize: g } }, t[13] = g, t[14] = _);
|
|
7060
7066
|
let y;
|
|
7061
|
-
t[15] === s ? y = t[16] : (y = s && /* @__PURE__ */ J(
|
|
7067
|
+
t[15] === s ? y = t[16] : (y = s && /* @__PURE__ */ J(Ys, { request: s }), t[15] = s, t[16] = y);
|
|
7062
7068
|
let b;
|
|
7063
7069
|
return t[17] !== c || t[18] !== l || t[19] !== u || t[20] !== d || t[21] !== f || t[22] !== m || t[23] !== _ || t[24] !== y ? (b = /* @__PURE__ */ J(c, {
|
|
7064
7070
|
opened: l,
|
|
@@ -7071,25 +7077,25 @@ function Ws() {
|
|
|
7071
7077
|
children: y
|
|
7072
7078
|
}), t[17] = c, t[18] = l, t[19] = u, t[20] = d, t[21] = f, t[22] = m, t[23] = _, t[24] = y, t[25] = b) : b = t[25], b;
|
|
7073
7079
|
}
|
|
7074
|
-
function
|
|
7080
|
+
function Ks(e) {
|
|
7075
7081
|
return e.exportPicker;
|
|
7076
7082
|
}
|
|
7077
|
-
var
|
|
7083
|
+
var qs = {
|
|
7078
7084
|
xs: "xs",
|
|
7079
7085
|
sm: "xs",
|
|
7080
7086
|
md: "sm",
|
|
7081
7087
|
lg: "sm",
|
|
7082
7088
|
xl: "md"
|
|
7083
|
-
},
|
|
7089
|
+
}, Js = {
|
|
7084
7090
|
xs: "sm",
|
|
7085
7091
|
sm: "md",
|
|
7086
7092
|
md: "lg"
|
|
7087
7093
|
};
|
|
7088
|
-
function
|
|
7094
|
+
function Ys(t) {
|
|
7089
7095
|
let n = e(95), { request: r } = t, { table: i, ui: a, labels: o, controlSize: s } = $(), { exportAll: l, exportSelected: u } = Ia(r.options), d;
|
|
7090
7096
|
n[0] === i ? d = n[1] : (d = Ji(i), n[0] = i, n[1] = d);
|
|
7091
7097
|
let h = d, [g, _] = c(""), v;
|
|
7092
|
-
n[2] === h ? v = n[3] : (v = () => new Set(h.filter(
|
|
7098
|
+
n[2] === h ? v = n[3] : (v = () => new Set(h.filter(Qs).map(Zs)), n[2] = h, n[3] = v);
|
|
7093
7099
|
let [y, b] = c(v), x;
|
|
7094
7100
|
n[4] === h.length ? x = n[5] : (x = Un("auto", h.length), n[4] = h.length, n[5] = x);
|
|
7095
7101
|
let S = x, w;
|
|
@@ -7115,7 +7121,7 @@ function Js(t) {
|
|
|
7115
7121
|
}), n[15] = T, n[16] = F);
|
|
7116
7122
|
let I = F, L;
|
|
7117
7123
|
n[17] !== y || n[18] !== h || n[19] !== l || n[20] !== u || n[21] !== r.rows || n[22] !== a.actions ? (L = async () => {
|
|
7118
|
-
let e = h.filter((e) => y.has(e.id)).map(
|
|
7124
|
+
let e = h.filter((e) => y.has(e.id)).map(Xs);
|
|
7119
7125
|
await (r.rows === "selected" ? u : l)({ columns: e }), a.actions.closeExportPicker();
|
|
7120
7126
|
}, n[17] = y, n[18] = h, n[19] = l, n[20] = u, n[21] = r.rows, n[22] = a.actions, n[23] = L) : L = n[23];
|
|
7121
7127
|
let R = L, z;
|
|
@@ -7143,7 +7149,7 @@ function Js(t) {
|
|
|
7143
7149
|
let U;
|
|
7144
7150
|
n[36] === I ? U = n[37] : (U = (e) => I(e.currentTarget.checked), n[36] = I, n[37] = U);
|
|
7145
7151
|
let W;
|
|
7146
|
-
n[38] === Symbol.for("react.memo_cache_sentinel") ? (W = { label:
|
|
7152
|
+
n[38] === Symbol.for("react.memo_cache_sentinel") ? (W = { label: Ws.headerLabel }, n[38] = W) : W = n[38];
|
|
7147
7153
|
let ee;
|
|
7148
7154
|
n[39] !== j || n[40] !== s || n[41] !== o.exportPickerSelectAll || n[42] !== M || n[43] !== U ? (ee = /* @__PURE__ */ J(p, {
|
|
7149
7155
|
size: s,
|
|
@@ -7165,7 +7171,7 @@ function Js(t) {
|
|
|
7165
7171
|
}), n[49] = G, n[50] = te);
|
|
7166
7172
|
let ne;
|
|
7167
7173
|
n[51] !== ee || n[52] !== te ? (ne = /* @__PURE__ */ Y("div", {
|
|
7168
|
-
className:
|
|
7174
|
+
className: Ws.listHeader,
|
|
7169
7175
|
children: [ee, te]
|
|
7170
7176
|
}), n[51] = ee, n[52] = te, n[53] = ne) : ne = n[53];
|
|
7171
7177
|
let re;
|
|
@@ -7174,19 +7180,19 @@ function Js(t) {
|
|
|
7174
7180
|
n[59] !== y || n[60] !== s || n[61] !== o.exportPickerHidden ? (e = (e) => /* @__PURE__ */ J(p, {
|
|
7175
7181
|
size: s,
|
|
7176
7182
|
label: /* @__PURE__ */ Y(fe, { children: [/* @__PURE__ */ J("span", {
|
|
7177
|
-
className:
|
|
7183
|
+
className: Ws.rowText,
|
|
7178
7184
|
children: Mn(e)
|
|
7179
7185
|
}), !e.getIsVisible() && /* @__PURE__ */ J("span", {
|
|
7180
|
-
className:
|
|
7186
|
+
className: Ws.rowHint,
|
|
7181
7187
|
children: o.exportPickerHidden
|
|
7182
7188
|
})] }),
|
|
7183
7189
|
checked: y.has(e.id),
|
|
7184
7190
|
onChange: (t) => P(e.id, t.currentTarget.checked),
|
|
7185
7191
|
classNames: {
|
|
7186
|
-
root:
|
|
7187
|
-
body:
|
|
7188
|
-
labelWrapper:
|
|
7189
|
-
label:
|
|
7192
|
+
root: Ws.row,
|
|
7193
|
+
body: Ws.rowBody,
|
|
7194
|
+
labelWrapper: Ws.rowLabelWrapper,
|
|
7195
|
+
label: Ws.rowLabel
|
|
7190
7196
|
},
|
|
7191
7197
|
"data-dg-part": "export-column",
|
|
7192
7198
|
"data-column-id": e.id
|
|
@@ -7196,7 +7202,7 @@ function Js(t) {
|
|
|
7196
7202
|
n[63] !== s || n[64] !== o || n[65] !== T.length || n[66] !== g ? (ie = T.length === 0 && /* @__PURE__ */ J(D, {
|
|
7197
7203
|
size: s,
|
|
7198
7204
|
c: "dimmed",
|
|
7199
|
-
className:
|
|
7205
|
+
className: Ws.empty,
|
|
7200
7206
|
children: o.columnsNoMatch(g)
|
|
7201
7207
|
}), n[63] = s, n[64] = o, n[65] = T.length, n[66] = g, n[67] = ie) : ie = n[67];
|
|
7202
7208
|
let ae;
|
|
@@ -7204,13 +7210,13 @@ function Js(t) {
|
|
|
7204
7210
|
mah: "50vh",
|
|
7205
7211
|
type: "auto",
|
|
7206
7212
|
children: /* @__PURE__ */ Y("div", {
|
|
7207
|
-
className:
|
|
7213
|
+
className: Ws.rows,
|
|
7208
7214
|
children: [re, ie]
|
|
7209
7215
|
})
|
|
7210
7216
|
}), n[68] = re, n[69] = ie, n[70] = ae) : ae = n[70];
|
|
7211
7217
|
let oe;
|
|
7212
7218
|
n[71] !== ne || n[72] !== ae ? (oe = /* @__PURE__ */ Y("div", {
|
|
7213
|
-
className:
|
|
7219
|
+
className: Ws.list,
|
|
7214
7220
|
children: [ne, ae]
|
|
7215
7221
|
}), n[71] = ne, n[72] = ae, n[73] = oe) : oe = n[73];
|
|
7216
7222
|
let se;
|
|
@@ -7251,24 +7257,24 @@ function Js(t) {
|
|
|
7251
7257
|
]
|
|
7252
7258
|
}), n[90] = V, n[91] = H, n[92] = oe, n[93] = de, n[94] = pe) : pe = n[94], pe;
|
|
7253
7259
|
}
|
|
7254
|
-
function Ys(e) {
|
|
7255
|
-
return e.id;
|
|
7256
|
-
}
|
|
7257
7260
|
function Xs(e) {
|
|
7258
7261
|
return e.id;
|
|
7259
7262
|
}
|
|
7260
7263
|
function Zs(e) {
|
|
7264
|
+
return e.id;
|
|
7265
|
+
}
|
|
7266
|
+
function Qs(e) {
|
|
7261
7267
|
return e.getIsVisible();
|
|
7262
7268
|
}
|
|
7263
7269
|
//#endregion
|
|
7264
7270
|
//#region src/core/sizes.ts
|
|
7265
|
-
var
|
|
7271
|
+
var $s = "md", ec = {
|
|
7266
7272
|
xs: 34,
|
|
7267
7273
|
sm: 42,
|
|
7268
7274
|
md: 52,
|
|
7269
7275
|
lg: 62,
|
|
7270
7276
|
xl: 72
|
|
7271
|
-
},
|
|
7277
|
+
}, tc = {
|
|
7272
7278
|
xs: "xs",
|
|
7273
7279
|
sm: "xs",
|
|
7274
7280
|
md: "sm",
|
|
@@ -7277,8 +7283,8 @@ var Qs = "md", $s = {
|
|
|
7277
7283
|
};
|
|
7278
7284
|
//#endregion
|
|
7279
7285
|
//#region src/components/TMDataGrid.tsx
|
|
7280
|
-
function
|
|
7281
|
-
let n = e(30), { table: r, ui: i, edit: a, features: o, filters: s, exportOptions: c, labels: l, renderDetails: u, renderDetailsEstHeight: d, overscan: f, resetSettings: p, scrollToRow: m, scrollerRef: h, size: g, children: _, className: v, style: y, id: b, "data-testid": x } = t, S = g === void 0 ? "md" : g, C = r.options.meta?.rowHeight ??
|
|
7286
|
+
function nc(t) {
|
|
7287
|
+
let n = e(30), { table: r, ui: i, edit: a, features: o, filters: s, exportOptions: c, labels: l, renderDetails: u, renderDetailsEstHeight: d, overscan: f, resetSettings: p, scrollToRow: m, scrollerRef: h, size: g, children: _, className: v, style: y, id: b, "data-testid": x } = t, S = g === void 0 ? "md" : g, C = r.options.meta?.rowHeight ?? ec[S], w = tc[S], T;
|
|
7282
7288
|
n[0] !== a || n[1] !== c || n[2] !== o || n[3] !== s || n[4] !== l || n[5] !== f || n[6] !== u || n[7] !== d || n[8] !== p || n[9] !== C || n[10] !== m || n[11] !== h || n[12] !== S || n[13] !== w || n[14] !== r || n[15] !== i ? (T = {
|
|
7283
7289
|
table: r,
|
|
7284
7290
|
ui: i,
|
|
@@ -7310,23 +7316,23 @@ function tc(t) {
|
|
|
7310
7316
|
children: _
|
|
7311
7317
|
}), n[19] = _, n[20] = b, n[21] = S, n[22] = y, n[23] = O, n[24] = x, n[25] = k) : k = n[25];
|
|
7312
7318
|
let A;
|
|
7313
|
-
n[26] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ J(
|
|
7319
|
+
n[26] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ J(Gs, {}), n[26] = A) : A = n[26];
|
|
7314
7320
|
let j;
|
|
7315
7321
|
return n[27] !== E || n[28] !== k ? (j = /* @__PURE__ */ Y(tt, {
|
|
7316
7322
|
value: E,
|
|
7317
7323
|
children: [k, A]
|
|
7318
7324
|
}), n[27] = E, n[28] = k, n[29] = j) : j = n[29], j;
|
|
7319
7325
|
}
|
|
7320
|
-
var
|
|
7321
|
-
Toolbar:
|
|
7322
|
-
Spacer:
|
|
7323
|
-
SummaryCount:
|
|
7324
|
-
LoadingIndicator:
|
|
7326
|
+
var rc = Object.assign(nc, {
|
|
7327
|
+
Toolbar: Fs,
|
|
7328
|
+
Spacer: Is,
|
|
7329
|
+
SummaryCount: Rs,
|
|
7330
|
+
LoadingIndicator: Ls,
|
|
7325
7331
|
Search: Ja,
|
|
7326
7332
|
DraftActions: ar,
|
|
7327
7333
|
Menu: qa,
|
|
7328
|
-
FilterButton:
|
|
7329
|
-
Table:
|
|
7334
|
+
FilterButton: zs,
|
|
7335
|
+
Table: Ns,
|
|
7330
7336
|
Footer: Fa,
|
|
7331
7337
|
FilterPanel: Sr,
|
|
7332
7338
|
FilterPills: xa,
|
|
@@ -7334,7 +7340,7 @@ var nc = Object.assign(tc, {
|
|
|
7334
7340
|
});
|
|
7335
7341
|
//#endregion
|
|
7336
7342
|
//#region src/components/filters/DgRangeSliderFilter.tsx
|
|
7337
|
-
function
|
|
7343
|
+
function ic(t) {
|
|
7338
7344
|
let n = e(26), { column: r, operator: i, value: a, onChange: o, size: s, labels: c } = t;
|
|
7339
7345
|
if (!vt(i)) {
|
|
7340
7346
|
let e;
|
|
@@ -7384,7 +7390,7 @@ function rc(t) {
|
|
|
7384
7390
|
}
|
|
7385
7391
|
//#endregion
|
|
7386
7392
|
//#region src/components/filters/DgDateRangeFilter.tsx
|
|
7387
|
-
function
|
|
7393
|
+
function ac(t) {
|
|
7388
7394
|
let n = e(32), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
7389
7395
|
if (!vt(r)) {
|
|
7390
7396
|
let e;
|
|
@@ -7437,7 +7443,7 @@ function ic(t) {
|
|
|
7437
7443
|
}
|
|
7438
7444
|
//#endregion
|
|
7439
7445
|
//#region src/components/filters/DgAutocompleteFilter.tsx
|
|
7440
|
-
function
|
|
7446
|
+
function oc(t) {
|
|
7441
7447
|
let n = e(21), { column: r, table: i, operator: a, value: o, onChange: s, options: c, size: l, labels: d } = t;
|
|
7442
7448
|
if (_t(a) || vt(a)) {
|
|
7443
7449
|
let e;
|
|
@@ -7457,7 +7463,7 @@ function ac(t) {
|
|
|
7457
7463
|
width: 180
|
|
7458
7464
|
}), n[8] = t, n[9] = d.filterValue, n[10] = g) : g = n[10];
|
|
7459
7465
|
let _ = !p, v = p && t.layout !== "header" ? d.filterValuePlaceholder : "", y;
|
|
7460
|
-
n[11] === h ? y = n[12] : (y = h.map(
|
|
7466
|
+
n[11] === h ? y = n[12] : (y = h.map(sc), n[11] = h, n[12] = y);
|
|
7461
7467
|
let b = p && typeof o == "string" ? o : "", x;
|
|
7462
7468
|
return n[13] !== s || n[14] !== l || n[15] !== g || n[16] !== _ || n[17] !== v || n[18] !== y || n[19] !== b ? (x = /* @__PURE__ */ J(u, {
|
|
7463
7469
|
...g,
|
|
@@ -7470,12 +7476,12 @@ function ac(t) {
|
|
|
7470
7476
|
onChange: s
|
|
7471
7477
|
}), n[13] = s, n[14] = l, n[15] = g, n[16] = _, n[17] = v, n[18] = y, n[19] = b, n[20] = x) : x = n[20], x;
|
|
7472
7478
|
}
|
|
7473
|
-
function
|
|
7479
|
+
function sc(e) {
|
|
7474
7480
|
return e.value;
|
|
7475
7481
|
}
|
|
7476
7482
|
//#endregion
|
|
7477
7483
|
//#region src/components/filters/DgTriStateFilter.tsx
|
|
7478
|
-
function
|
|
7484
|
+
function cc(t) {
|
|
7479
7485
|
let n = e(29), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
7480
7486
|
if (_t(r) || vt(r)) {
|
|
7481
7487
|
let e;
|
|
@@ -7525,7 +7531,7 @@ function sc(t) {
|
|
|
7525
7531
|
}
|
|
7526
7532
|
//#endregion
|
|
7527
7533
|
//#region src/core/labelsSv.ts
|
|
7528
|
-
var
|
|
7534
|
+
var lc = {
|
|
7529
7535
|
operators: {
|
|
7530
7536
|
contains: "innehåller",
|
|
7531
7537
|
equals: "är lika med",
|
|
@@ -7649,7 +7655,7 @@ var cc = {
|
|
|
7649
7655
|
};
|
|
7650
7656
|
//#endregion
|
|
7651
7657
|
//#region src/core/summary.ts
|
|
7652
|
-
function
|
|
7658
|
+
function uc({ table: e, columnId: t, fn: n = "sum" }) {
|
|
7653
7659
|
let r = e, i = r.getColumn(t);
|
|
7654
7660
|
if (!i) return;
|
|
7655
7661
|
let a = {
|
|
@@ -7663,6 +7669,6 @@ function lc({ table: e, columnId: t, fn: n = "sum" }) {
|
|
|
7663
7669
|
return _e[n].aggregate(a);
|
|
7664
7670
|
}
|
|
7665
7671
|
//#endregion
|
|
7666
|
-
export { Ir as DATA_STATE_SLICES, Gi as DEFAULT_EXPORT_OPTIONS,
|
|
7672
|
+
export { Ir as DATA_STATE_SLICES, Gi as DEFAULT_EXPORT_OPTIONS, $s as DEFAULT_TMDATAGRID_SIZE, Ft as DETAILS_COLUMN_ID, oc as DgAutocompleteFilter, ac as DgDateRangeFilter, ic as DgRangeSliderFilter, cc as DgTriStateFilter, tn as EDIT_COLUMN_ID, rt as FILTER_OPERATOR_LABELS, ln as GROUP_COLUMN_ID, Rr as PERSIST_PAYLOAD_VERSION, mn as ROW_NUMBER_COLUMN_ID, Dn as SELECT_COLUMN_ID, Lr as SETTINGS_STATE_SLICES, tc as SIZE_CONTROL_SIZE, ec as SIZE_ROW_HEIGHT, Pr as TMDATAGRID_LABELS_EN, lc as TMDATAGRID_LABELS_SV, rc as TMDataGrid, qo as TMDataGridBooleanEditor, Jo as TMDataGridDateEditor, ar as TMDataGridDraftActions, xa as TMDataGridFilterPills, hr as TMDataGridFilterValueInput, Yo as TMDataGridMultiSelectEditor, Xo as TMDataGridNumberEditor, Ja as TMDataGridSearch, Zo as TMDataGridSelectEditor, Qo as TMDataGridStringEditor, Ct as activeColumnFilters, uc as aggregateColumn, Nt as areAllRowsExpanded, yo as autosizeColumn, ea as buildExportData, Wt as clearedValueForType, Qi as countSelectedExportRows, fa as createTMDataGridColumnHelper, Bi as csvExcelFormat, Vi as csvFormat, aa as downloadFile, yt as emptyValueForOperator, na as exportGrid, xt as filterValueShape, Ni as formatExportValue, wt as formatFilterLabel, cn as formatGroupValue, Ar as fuzzyGlobalFilterFn, ci as getColumnCapabilities, Fn as getColumnDefaultOperator, Mn as getColumnLabel, Pn as getColumnOperators, bo as getColumnRegion, Nn as getColumnType, Cn as getDisplayedRows, Ut as getEditFieldName, Ji as getExportableColumns, li as getGridCapabilities, on as getGroupDataRows, mt as getOperatorsForType, Tn as getSelectableRowIds, Eo as getStepTargetColumn, Oa as getTMDataGridPaginationApi, Fi as guardFormula, Vt as hasPendingEdits, Bn as isControlColumn, St as isFilterActive, Vn as isGeneratedColumn, wn as isPagingActive, Wi as jsonFormat, wo as keepGeneratedColumnsOutermost, Fr as mergeLabels, Co as moveColumn, Do as moveColumnByStep, en as normalizeFieldValidate, ba as openColumnFilter, gt as operatorNeedsValue, _t as operatorTakesArrayValue, vt as operatorTakesRangeValue, pr as optionsToComboboxData, si as readFeatureFlags, fr as resolveColumnOptions, Pt as resolveExpandAll, Ki as resolveExportOptions, _s as resolveRangeBounds, En as resolveRowSelectionClick, ra as toClipboardText, Hi as tsvFormat, va as useTMDataGrid, $ as useTMDataGridContext, Ia as useTMDataGridExport, ia as writeClipboardText, ta as writeExportFile };
|
|
7667
7673
|
|
|
7668
7674
|
//# sourceMappingURL=index.js.map
|