@jielga/tmdatagrid 2.4.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +96 -9
- package/dist/index.js +417 -348
- package/dist/index.js.map +1 -1
- package/docs/columns.md +1 -0
- package/docs/components.md +3 -1
- package/docs/editors.md +127 -6
- package/docs/testing.md +1 -0
- 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 +2 -2
- package/skills/columns/references/columns-api.md +1 -0
- package/skills/data/SKILL.md +1 -1
- package/skills/editing/SKILL.md +28 -17
- package/skills/editing/references/editing-api.md +4 -2
- package/skills/editing/references/editors-and-validation.md +103 -4
- 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 +1 -1
- package/skills/rows/SKILL.md +1 -1
- 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 +4 -2
- package/src/components/editors/TMDataGridBooleanEditor.tsx +26 -4
- package/src/components/editors/TMDataGridDateEditor.tsx +33 -5
- package/src/components/editors/TMDataGridMultiSelectEditor.tsx +39 -6
- package/src/components/editors/TMDataGridNumberEditor.tsx +33 -6
- package/src/components/editors/TMDataGridSelectEditor.tsx +39 -6
- package/src/components/editors/TMDataGridStringEditor.tsx +33 -6
- package/src/components/editors/editorShared.ts +27 -1
- package/src/core/editEngine.ts +101 -5
- package/src/index.ts +26 -6
- package/src/useTMDataGrid.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -774,25 +774,41 @@ function rn(e) {
|
|
|
774
774
|
message: i
|
|
775
775
|
}];
|
|
776
776
|
});
|
|
777
|
-
}, V =
|
|
778
|
-
let i =
|
|
779
|
-
|
|
777
|
+
}, V = (t, n, r) => {
|
|
778
|
+
let { table: i } = e(), a = t.form.state.values, o = t.isNew ? null : new Set(m(t.original, a).map((e) => e.columnId)), c = t.isNew ? void 0 : z(n);
|
|
779
|
+
for (let e of s()) {
|
|
780
|
+
let n = e.columnDef.meta?.edit?.mapCommitValue;
|
|
781
|
+
if (n === void 0 || o !== null && !o.has(e.id)) continue;
|
|
782
|
+
let a = qt(e);
|
|
783
|
+
if (a === null || r.has(a)) continue;
|
|
784
|
+
let s = X(t.form.state.values, a), l = n({
|
|
785
|
+
value: s,
|
|
786
|
+
previous: X(t.original, a),
|
|
787
|
+
row: c,
|
|
788
|
+
column: e,
|
|
789
|
+
table: i
|
|
790
|
+
});
|
|
791
|
+
Zt(s, l) || t.form.setFieldValue(a, l, { dontValidate: !0 });
|
|
792
|
+
}
|
|
793
|
+
}, H = (e) => te(e, /* @__PURE__ */ new Set()), te = async (t, i) => {
|
|
794
|
+
let a = n.get(t);
|
|
795
|
+
return a === void 0 ? !0 : a.pendingCommit === null ? (i !== "all" && V(a, t, i), !a.isNew && m(a.original, a.form.state.values).length === 0 ? (P(t), !0) : (Xt(a.form), a.lastSubmitOk = !1, a.submitErrors = [], a.parkOnly = e().draft, a.pendingCommit = (async () => {
|
|
780
796
|
try {
|
|
781
|
-
await
|
|
797
|
+
await a.form.handleSubmit();
|
|
782
798
|
} finally {
|
|
783
|
-
|
|
799
|
+
a.pendingCommit = null;
|
|
784
800
|
}
|
|
785
|
-
return n.get(t) ===
|
|
786
|
-
let e =
|
|
801
|
+
return n.get(t) === a ? a.lastSubmitOk ? a.parkOnly ? (D(() => {
|
|
802
|
+
let e = a.form.state.values;
|
|
787
803
|
r.set(t, {
|
|
788
|
-
original:
|
|
804
|
+
original: a.original,
|
|
789
805
|
values: e,
|
|
790
|
-
dirtyFields: m(
|
|
791
|
-
isNew:
|
|
792
|
-
}),
|
|
793
|
-
}), !0) : (P(t), !0) : (
|
|
794
|
-
})(),
|
|
795
|
-
},
|
|
806
|
+
dirtyFields: m(a.original, e).map((e) => e.field),
|
|
807
|
+
isNew: a.isNew
|
|
808
|
+
}), a.isNew ? j(t, !0) : M(t, !0), _.active?.rowId === t && k(null), N(t);
|
|
809
|
+
}), !0) : (P(t), !0) : (a.submitErrors = B(a), O(t), !1) : !0;
|
|
810
|
+
})(), a.pendingCommit)) : a.pendingCommit;
|
|
811
|
+
}, U = (t, i) => {
|
|
796
812
|
D(() => {
|
|
797
813
|
if (n.get(t)?.isNew === !0) {
|
|
798
814
|
k({
|
|
@@ -820,48 +836,48 @@ function rn(e) {
|
|
|
820
836
|
});
|
|
821
837
|
}
|
|
822
838
|
});
|
|
823
|
-
},
|
|
839
|
+
}, W = ({ rowId: t, columnId: r }) => {
|
|
824
840
|
let { editMode: i } = e();
|
|
825
841
|
if (i === "cell") {
|
|
826
842
|
let e = [...n.keys()].find((e) => e !== t && n.get(e)?.isNew !== !0);
|
|
827
843
|
if (e !== void 0) {
|
|
828
|
-
|
|
829
|
-
e &&
|
|
844
|
+
H(e).then((e) => {
|
|
845
|
+
e && U(t, r);
|
|
830
846
|
});
|
|
831
847
|
return;
|
|
832
848
|
}
|
|
833
849
|
}
|
|
834
|
-
|
|
835
|
-
},
|
|
850
|
+
U(t, r);
|
|
851
|
+
}, ne = (e) => {
|
|
836
852
|
P(e);
|
|
837
|
-
},
|
|
853
|
+
}, re = () => {
|
|
838
854
|
k(null);
|
|
839
|
-
},
|
|
855
|
+
}, ie = () => {
|
|
840
856
|
D(() => {
|
|
841
857
|
for (let e of [..._.openRowIds]) P(e);
|
|
842
858
|
r.clear(), _.active = null, _.committedRowIds.clear(), _.committedValues.clear(), _.deletedRowIds.clear(), v.add("active"), v.add("committedRowIds"), v.add("committedValues"), v.add("deletedRowIds");
|
|
843
859
|
});
|
|
844
|
-
},
|
|
860
|
+
}, ae = (e) => {
|
|
845
861
|
i += 1;
|
|
846
862
|
let t = `${a}${i}`;
|
|
847
|
-
return F(t,
|
|
848
|
-
},
|
|
863
|
+
return F(t, se(e), !0), _.newRows.set(t, !1), v.add("newRows"), t;
|
|
864
|
+
}, oe = (e) => D(() => ae(e)), se = (t) => {
|
|
849
865
|
let { newRowDefaults: n } = e();
|
|
850
866
|
return {
|
|
851
867
|
...typeof n == "function" ? n() : n ?? {},
|
|
852
868
|
...t
|
|
853
869
|
};
|
|
854
|
-
},
|
|
855
|
-
let r = t.map((e) =>
|
|
870
|
+
}, G = async (t, n) => E(async () => {
|
|
871
|
+
let r = t.map((e) => ae(e));
|
|
856
872
|
if (n?.commit !== !0) return {
|
|
857
873
|
ok: r.length === 0,
|
|
858
874
|
committed: [],
|
|
859
875
|
open: r
|
|
860
876
|
};
|
|
861
|
-
let i = e().draft ? await Promise.all(r.map((e) =>
|
|
862
|
-
if (!e().draft) for (let e of r) i.push(await
|
|
877
|
+
let i = e().draft ? await Promise.all(r.map((e) => te(e, "all"))) : [];
|
|
878
|
+
if (!e().draft) for (let e of r) i.push(await te(e, "all"));
|
|
863
879
|
return Yt(r, i);
|
|
864
|
-
}),
|
|
880
|
+
}), K = (t) => {
|
|
865
881
|
if (n.get(t)?.isNew === !0 || r.get(t)?.isNew === !0) {
|
|
866
882
|
P(t);
|
|
867
883
|
return;
|
|
@@ -879,28 +895,28 @@ function rn(e) {
|
|
|
879
895
|
rowId: t,
|
|
880
896
|
row: o
|
|
881
897
|
});
|
|
882
|
-
},
|
|
898
|
+
}, ce = (e) => {
|
|
883
899
|
D(() => {
|
|
884
|
-
for (let t of e)
|
|
900
|
+
for (let t of e) K(t);
|
|
885
901
|
});
|
|
886
|
-
},
|
|
902
|
+
}, le = (e) => {
|
|
887
903
|
_.deletedRowIds.delete(e) && T("deletedRowIds");
|
|
888
|
-
},
|
|
904
|
+
}, ue = () => {
|
|
889
905
|
let t = e();
|
|
890
906
|
return t.draft ? t.onRowDelete !== void 0 || t.onSaveDrafts !== void 0 : t.onRowDelete !== void 0;
|
|
891
|
-
},
|
|
907
|
+
}, de = () => [..._.openRowIds].filter((e) => r.has(e)), q = async () => {
|
|
892
908
|
let e = [...n.keys()];
|
|
893
|
-
return Yt(e, await E(() => Promise.all(e.map((e) =>
|
|
894
|
-
},
|
|
895
|
-
|
|
896
|
-
})),
|
|
909
|
+
return Yt(e, await E(() => Promise.all(e.map((e) => H(e)))));
|
|
910
|
+
}, fe = null, J = () => (fe === null && (fe = pe().finally(() => {
|
|
911
|
+
fe = null, _.isSaving && (_.isSaving = !1, T("isSaving"));
|
|
912
|
+
})), fe), Y = (t, n) => ({
|
|
897
913
|
rowId: t,
|
|
898
914
|
value: n.values,
|
|
899
915
|
original: n.original,
|
|
900
916
|
changes: m(n.original, n.values),
|
|
901
917
|
source: e().editMode
|
|
902
|
-
}),
|
|
903
|
-
let t = [..._.deletedRowIds], n =
|
|
918
|
+
}), pe = async () => {
|
|
919
|
+
let t = [..._.deletedRowIds], n = de().filter((e) => !_.deletedRowIds.has(e)), i = [], a = [], o = [], s = () => ({
|
|
904
920
|
ok: a.length === 0 && o.length === 0,
|
|
905
921
|
saved: i,
|
|
906
922
|
kept: a,
|
|
@@ -919,7 +935,7 @@ function rn(e) {
|
|
|
919
935
|
n.isNew ? await e().onRowAdd?.({
|
|
920
936
|
tempId: t,
|
|
921
937
|
value: n.values
|
|
922
|
-
}) : await e().onEditCommit?.(
|
|
938
|
+
}) : await e().onEditCommit?.(Y(t, n));
|
|
923
939
|
} catch (e) {
|
|
924
940
|
return I(t, e instanceof Error ? e.message : String(e)), "reopened";
|
|
925
941
|
}
|
|
@@ -966,7 +982,7 @@ function rn(e) {
|
|
|
966
982
|
}), i.isNew ? f.push({
|
|
967
983
|
tempId: t,
|
|
968
984
|
value: i.values
|
|
969
|
-
}) : l.push(
|
|
985
|
+
}) : l.push(Y(t, i));
|
|
970
986
|
}
|
|
971
987
|
});
|
|
972
988
|
});
|
|
@@ -997,19 +1013,19 @@ function rn(e) {
|
|
|
997
1013
|
});
|
|
998
1014
|
}
|
|
999
1015
|
return s();
|
|
1000
|
-
},
|
|
1016
|
+
}, he = async (e, t) => {
|
|
1001
1017
|
let i = z(e);
|
|
1002
1018
|
if (i === void 0 || _.deletedRowIds.has(e)) return !1;
|
|
1003
1019
|
if (t.length === 0) return !0;
|
|
1004
1020
|
let a = (n) => {
|
|
1005
1021
|
for (let { field: e, value: r } of t) n.form.setFieldValue(e, r);
|
|
1006
|
-
return
|
|
1022
|
+
return te(e, new Set(t.map(({ field: e }) => e)));
|
|
1007
1023
|
}, o = n.get(e);
|
|
1008
1024
|
return o === void 0 ? r.has(e) ? E(async () => {
|
|
1009
1025
|
let t = ee(e);
|
|
1010
1026
|
return t !== void 0 && a(t);
|
|
1011
1027
|
}) : a(F(e, i.original, !1)) : a(o);
|
|
1012
|
-
},
|
|
1028
|
+
}, _e = (t, n) => {
|
|
1013
1029
|
let r = z(t), i = e().table.getColumn(n);
|
|
1014
1030
|
return r === void 0 || i === void 0 || !R(r, i) ? null : qt(i);
|
|
1015
1031
|
};
|
|
@@ -1050,23 +1066,23 @@ function rn(e) {
|
|
|
1050
1066
|
canEditCell: R,
|
|
1051
1067
|
canEditRow: L,
|
|
1052
1068
|
isColumnEditable: o,
|
|
1053
|
-
begin:
|
|
1054
|
-
commit:
|
|
1055
|
-
cancel:
|
|
1056
|
-
deactivate:
|
|
1057
|
-
cancelAll:
|
|
1058
|
-
commitAll:
|
|
1059
|
-
saveDrafts:
|
|
1069
|
+
begin: W,
|
|
1070
|
+
commit: H,
|
|
1071
|
+
cancel: ne,
|
|
1072
|
+
deactivate: re,
|
|
1073
|
+
cancelAll: ie,
|
|
1074
|
+
commitAll: q,
|
|
1075
|
+
saveDrafts: J,
|
|
1060
1076
|
clearCell: async (t, n) => {
|
|
1061
|
-
let r = e().table.getColumn(n), i =
|
|
1062
|
-
return i === null || r === void 0 ? !1 :
|
|
1077
|
+
let r = e().table.getColumn(n), i = _e(t, n);
|
|
1078
|
+
return i === null || r === void 0 ? !1 : he(t, [{
|
|
1063
1079
|
field: i,
|
|
1064
1080
|
value: Jt(r.columnDef.meta?.type ?? "string")
|
|
1065
1081
|
}]);
|
|
1066
1082
|
},
|
|
1067
1083
|
setCellValue: async (e, t, n) => {
|
|
1068
|
-
let r =
|
|
1069
|
-
return r !== null &&
|
|
1084
|
+
let r = _e(e, t);
|
|
1085
|
+
return r !== null && he(e, [{
|
|
1070
1086
|
field: r,
|
|
1071
1087
|
value: n
|
|
1072
1088
|
}]);
|
|
@@ -1074,21 +1090,21 @@ function rn(e) {
|
|
|
1074
1090
|
setRowValues: async (e, t) => {
|
|
1075
1091
|
let n = [];
|
|
1076
1092
|
for (let [r, i] of Object.entries(t)) {
|
|
1077
|
-
let t =
|
|
1093
|
+
let t = _e(e, r);
|
|
1078
1094
|
if (t === null) return !1;
|
|
1079
1095
|
n.push({
|
|
1080
1096
|
field: t,
|
|
1081
1097
|
value: i
|
|
1082
1098
|
});
|
|
1083
1099
|
}
|
|
1084
|
-
return
|
|
1100
|
+
return he(e, n);
|
|
1085
1101
|
},
|
|
1086
|
-
addRow:
|
|
1087
|
-
addRows:
|
|
1088
|
-
deleteRow:
|
|
1089
|
-
deleteRows:
|
|
1090
|
-
restoreRow:
|
|
1091
|
-
canDeleteRows:
|
|
1102
|
+
addRow: oe,
|
|
1103
|
+
addRows: G,
|
|
1104
|
+
deleteRow: K,
|
|
1105
|
+
deleteRows: ce,
|
|
1106
|
+
restoreRow: le,
|
|
1107
|
+
canDeleteRows: ue
|
|
1092
1108
|
};
|
|
1093
1109
|
}
|
|
1094
1110
|
function an(e) {
|
|
@@ -5462,29 +5478,34 @@ function es(e) {
|
|
|
5462
5478
|
}
|
|
5463
5479
|
//#endregion
|
|
5464
5480
|
//#region src/components/editors/editorShared.ts
|
|
5465
|
-
function ts(e) {
|
|
5466
|
-
return
|
|
5481
|
+
function ts(...e) {
|
|
5482
|
+
return (t) => {
|
|
5483
|
+
for (let n of e) typeof n == "function" ? n(t) : n != null && (n.current = t);
|
|
5484
|
+
};
|
|
5467
5485
|
}
|
|
5468
5486
|
function ns(e) {
|
|
5469
|
-
return e.
|
|
5487
|
+
return he(e.store, rs);
|
|
5470
5488
|
}
|
|
5471
5489
|
function rs(e) {
|
|
5472
|
-
return
|
|
5490
|
+
return e.value;
|
|
5473
5491
|
}
|
|
5474
5492
|
function is(e) {
|
|
5475
|
-
return
|
|
5493
|
+
return he(e.store, as);
|
|
5476
5494
|
}
|
|
5477
5495
|
function as(e) {
|
|
5478
|
-
return
|
|
5496
|
+
return $t(e.meta.errors);
|
|
5479
5497
|
}
|
|
5480
5498
|
function os(e) {
|
|
5481
|
-
return
|
|
5499
|
+
return he(e.store, ss);
|
|
5482
5500
|
}
|
|
5483
5501
|
function ss(e) {
|
|
5502
|
+
return $t(e.meta.errors) !== void 0;
|
|
5503
|
+
}
|
|
5504
|
+
function cs(e) {
|
|
5484
5505
|
let t = e.currentTarget;
|
|
5485
5506
|
kn(t) && t.select();
|
|
5486
5507
|
}
|
|
5487
|
-
function
|
|
5508
|
+
function ls() {
|
|
5488
5509
|
let t = e(2), n = s(null), r = s(null), i;
|
|
5489
5510
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
5490
5511
|
let e = r.current, t = n.current;
|
|
@@ -5505,181 +5526,229 @@ function cs() {
|
|
|
5505
5526
|
}
|
|
5506
5527
|
//#endregion
|
|
5507
5528
|
//#region src/components/editors/TMDataGridBooleanEditor.tsx
|
|
5508
|
-
function
|
|
5509
|
-
let n = e(
|
|
5510
|
-
n[0] !== i || n[1] !==
|
|
5511
|
-
let
|
|
5512
|
-
n[3] === r ?
|
|
5513
|
-
let
|
|
5514
|
-
|
|
5529
|
+
function us(t) {
|
|
5530
|
+
let n = e(16), { field: r, column: i, size: a, inputProps: o } = t, { labels: s } = $(), c = ns(r), l = os(r), u;
|
|
5531
|
+
n[0] !== i || n[1] !== s ? (u = s.editCell(Vn(i)), n[0] = i, n[1] = s, n[2] = u) : u = n[2];
|
|
5532
|
+
let d = c === !0, f;
|
|
5533
|
+
n[3] === r ? f = n[4] : (f = (e) => r.handleChange(e.currentTarget.checked), n[3] = r, n[4] = f);
|
|
5534
|
+
let m;
|
|
5535
|
+
n[5] !== r || n[6] !== o ? (m = (e) => {
|
|
5536
|
+
r.handleBlur(), o?.onBlur?.(e);
|
|
5537
|
+
}, n[5] = r, n[6] = o, n[7] = m) : m = n[7];
|
|
5538
|
+
let h;
|
|
5539
|
+
return n[8] !== o || n[9] !== l || n[10] !== a || n[11] !== u || n[12] !== d || n[13] !== f || n[14] !== m ? (h = /* @__PURE__ */ J(p, {
|
|
5540
|
+
...o,
|
|
5515
5541
|
size: a,
|
|
5516
|
-
"aria-label":
|
|
5542
|
+
"aria-label": u,
|
|
5517
5543
|
"data-dg-part": "editor-input",
|
|
5518
|
-
checked:
|
|
5519
|
-
onChange:
|
|
5520
|
-
onBlur:
|
|
5521
|
-
error:
|
|
5522
|
-
}), n[
|
|
5544
|
+
checked: d,
|
|
5545
|
+
onChange: f,
|
|
5546
|
+
onBlur: m,
|
|
5547
|
+
error: l
|
|
5548
|
+
}), n[8] = o, n[9] = l, n[10] = a, n[11] = u, n[12] = d, n[13] = f, n[14] = m, n[15] = h) : h = n[15], h;
|
|
5523
5549
|
}
|
|
5524
5550
|
//#endregion
|
|
5525
5551
|
//#region src/components/editors/TMDataGridDateEditor.tsx
|
|
5526
|
-
function
|
|
5527
|
-
let n = e(
|
|
5528
|
-
n[0] ===
|
|
5529
|
-
let
|
|
5530
|
-
n[2] !== i || n[3] !==
|
|
5531
|
-
let
|
|
5532
|
-
n[5] === r ?
|
|
5552
|
+
function ds(t) {
|
|
5553
|
+
let n = e(18), { field: r, column: i, size: a, inputProps: o } = t, { labels: c } = $(), l = ns(r), u = os(r), d = s(l instanceof Date), f;
|
|
5554
|
+
n[0] === l ? f = n[1] : (f = l instanceof Date ? l.toLocaleDateString("sv-SE") : typeof l == "string" ? l.slice(0, 10) : "", n[0] = l, n[1] = f);
|
|
5555
|
+
let p = f, m;
|
|
5556
|
+
n[2] !== i || n[3] !== c ? (m = c.editCell(Vn(i)), n[2] = i, n[3] = c, n[4] = m) : m = n[4];
|
|
5557
|
+
let h;
|
|
5558
|
+
n[5] === r ? h = n[6] : (h = (e) => {
|
|
5533
5559
|
let t = e.currentTarget.value;
|
|
5534
5560
|
if (t === "") {
|
|
5535
5561
|
r.handleChange(null);
|
|
5536
5562
|
return;
|
|
5537
5563
|
}
|
|
5538
|
-
r.handleChange(
|
|
5539
|
-
}, n[5] = r, n[6] =
|
|
5540
|
-
let
|
|
5541
|
-
|
|
5542
|
-
|
|
5564
|
+
r.handleChange(d.current ? /* @__PURE__ */ new Date(`${t}T00:00:00`) : t);
|
|
5565
|
+
}, n[5] = r, n[6] = h);
|
|
5566
|
+
let g;
|
|
5567
|
+
n[7] !== r || n[8] !== o ? (g = (e) => {
|
|
5568
|
+
r.handleBlur(), o?.onBlur?.(e);
|
|
5569
|
+
}, n[7] = r, n[8] = o, n[9] = g) : g = n[9];
|
|
5570
|
+
let _;
|
|
5571
|
+
return n[10] !== o || n[11] !== u || n[12] !== a || n[13] !== m || n[14] !== h || n[15] !== g || n[16] !== p ? (_ = /* @__PURE__ */ J(O, {
|
|
5543
5572
|
w: "100%",
|
|
5573
|
+
...o,
|
|
5574
|
+
size: a,
|
|
5544
5575
|
type: "date",
|
|
5545
|
-
"aria-label":
|
|
5576
|
+
"aria-label": m,
|
|
5546
5577
|
"data-dg-part": "editor-input",
|
|
5547
|
-
value:
|
|
5548
|
-
onChange:
|
|
5549
|
-
onBlur:
|
|
5550
|
-
error:
|
|
5551
|
-
}), n[
|
|
5578
|
+
value: p,
|
|
5579
|
+
onChange: h,
|
|
5580
|
+
onBlur: g,
|
|
5581
|
+
error: u
|
|
5582
|
+
}), n[10] = o, n[11] = u, n[12] = a, n[13] = m, n[14] = h, n[15] = g, n[16] = p, n[17] = _) : _ = n[17], _;
|
|
5552
5583
|
}
|
|
5553
5584
|
//#endregion
|
|
5554
5585
|
//#region src/components/editors/TMDataGridMultiSelectEditor.tsx
|
|
5555
|
-
function
|
|
5556
|
-
let n = e(
|
|
5557
|
-
n[0] ===
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5586
|
+
function fs(t) {
|
|
5587
|
+
let n = e(26), { field: r, column: i, row: a, table: o, size: s, inputProps: c } = t, { labels: l } = $(), u = ns(r), d = os(r), f = c?.comboboxProps, p;
|
|
5588
|
+
n[0] === f ? p = n[1] : (p = {
|
|
5589
|
+
...f,
|
|
5590
|
+
withinPortal: !1
|
|
5591
|
+
}, n[0] = f, n[1] = p);
|
|
5592
|
+
let m;
|
|
5593
|
+
n[2] !== i || n[3] !== l ? (m = l.editCell(Vn(i)), n[2] = i, n[3] = l, n[4] = m) : m = n[4];
|
|
5594
|
+
let h;
|
|
5595
|
+
n[5] !== i || n[6] !== a || n[7] !== o ? (h = mn(pn({
|
|
5562
5596
|
table: o,
|
|
5563
5597
|
column: i,
|
|
5564
5598
|
row: a,
|
|
5565
5599
|
fallback: "faceted"
|
|
5566
|
-
})), n[
|
|
5567
|
-
let m;
|
|
5568
|
-
n[8] === l ? m = n[9] : (m = Array.isArray(l) ? l.map(String) : [], n[8] = l, n[9] = m);
|
|
5569
|
-
let h;
|
|
5570
|
-
n[10] === r ? h = n[11] : (h = (e) => r.handleChange(e), n[10] = r, n[11] = h);
|
|
5600
|
+
})), n[5] = i, n[6] = a, n[7] = o, n[8] = h) : h = n[8];
|
|
5571
5601
|
let g;
|
|
5572
|
-
|
|
5573
|
-
|
|
5602
|
+
n[9] === u ? g = n[10] : (g = Array.isArray(u) ? u.map(String) : [], n[9] = u, n[10] = g);
|
|
5603
|
+
let _;
|
|
5604
|
+
n[11] === r ? _ = n[12] : (_ = (e) => r.handleChange(e), n[11] = r, n[12] = _);
|
|
5605
|
+
let v;
|
|
5606
|
+
n[13] !== r || n[14] !== c ? (v = (e) => {
|
|
5607
|
+
r.handleBlur(), c?.onBlur?.(e);
|
|
5608
|
+
}, n[13] = r, n[14] = c, n[15] = v) : v = n[15];
|
|
5609
|
+
let b;
|
|
5610
|
+
return n[16] !== c || n[17] !== d || n[18] !== s || n[19] !== p || n[20] !== m || n[21] !== h || n[22] !== g || n[23] !== _ || n[24] !== v ? (b = /* @__PURE__ */ J(y, {
|
|
5574
5611
|
w: "100%",
|
|
5575
5612
|
searchable: !0,
|
|
5576
|
-
|
|
5577
|
-
|
|
5613
|
+
...c,
|
|
5614
|
+
size: s,
|
|
5615
|
+
comboboxProps: p,
|
|
5616
|
+
"aria-label": m,
|
|
5578
5617
|
"data-dg-part": "editor-input",
|
|
5579
|
-
data:
|
|
5580
|
-
value:
|
|
5581
|
-
onChange:
|
|
5582
|
-
onBlur:
|
|
5583
|
-
error:
|
|
5584
|
-
}), n[
|
|
5618
|
+
data: h,
|
|
5619
|
+
value: g,
|
|
5620
|
+
onChange: _,
|
|
5621
|
+
onBlur: v,
|
|
5622
|
+
error: d
|
|
5623
|
+
}), n[16] = c, n[17] = d, n[18] = s, n[19] = p, n[20] = m, n[21] = h, n[22] = g, n[23] = _, n[24] = v, n[25] = b) : b = n[25], b;
|
|
5585
5624
|
}
|
|
5586
5625
|
//#endregion
|
|
5587
5626
|
//#region src/components/editors/TMDataGridNumberEditor.tsx
|
|
5588
|
-
function
|
|
5589
|
-
let n = e(
|
|
5590
|
-
n[0] !==
|
|
5591
|
-
let
|
|
5592
|
-
n[3]
|
|
5593
|
-
|
|
5594
|
-
|
|
5627
|
+
function ps(t) {
|
|
5628
|
+
let n = e(25), { field: r, column: i, size: a, inputProps: o } = t, { labels: s } = $(), l = ns(r), u = os(r), { inputRef: d, remember: f } = ls(), [p, m] = c(null), h = p === null || p === "" ? null : Number(p), g = Number.isFinite(h) ? h === l : l === null, _ = o?.ref, v;
|
|
5629
|
+
n[0] !== d || n[1] !== _ ? (v = ts(d, _), n[0] = d, n[1] = _, n[2] = v) : v = n[2];
|
|
5630
|
+
let y;
|
|
5631
|
+
n[3] === o ? y = n[4] : (y = (e) => {
|
|
5632
|
+
cs(e), o?.onFocus?.(e);
|
|
5633
|
+
}, n[3] = o, n[4] = y);
|
|
5634
|
+
let x;
|
|
5635
|
+
n[5] !== i || n[6] !== s ? (x = s.editCell(Vn(i)), n[5] = i, n[6] = s, n[7] = x) : x = n[7];
|
|
5636
|
+
let S = p !== null && g ? p : typeof l == "number" ? l : "", C;
|
|
5637
|
+
n[8] !== r || n[9] !== d || n[10] !== f ? (C = (e) => {
|
|
5638
|
+
if (d.current !== null && f(d.current), typeof e == "number") {
|
|
5639
|
+
m(null), r.handleChange(e);
|
|
5595
5640
|
return;
|
|
5596
5641
|
}
|
|
5597
|
-
|
|
5642
|
+
m(e);
|
|
5598
5643
|
let t = Number(e);
|
|
5599
5644
|
r.handleChange(e !== "" && Number.isFinite(t) ? t : null);
|
|
5600
|
-
}, n[
|
|
5601
|
-
let
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5645
|
+
}, n[8] = r, n[9] = d, n[10] = f, n[11] = C) : C = n[11];
|
|
5646
|
+
let w;
|
|
5647
|
+
n[12] !== r || n[13] !== o ? (w = (e) => {
|
|
5648
|
+
r.handleBlur(), o?.onBlur?.(e);
|
|
5649
|
+
}, n[12] = r, n[13] = o, n[14] = w) : w = n[14];
|
|
5650
|
+
let T;
|
|
5651
|
+
return n[15] !== o || n[16] !== u || n[17] !== a || n[18] !== v || n[19] !== y || n[20] !== x || n[21] !== S || n[22] !== C || n[23] !== w ? (T = /* @__PURE__ */ J(b, {
|
|
5605
5652
|
w: "100%",
|
|
5606
|
-
onFocus: ss,
|
|
5607
5653
|
hideControls: !0,
|
|
5608
|
-
|
|
5654
|
+
...o,
|
|
5655
|
+
ref: v,
|
|
5656
|
+
size: a,
|
|
5657
|
+
onFocus: y,
|
|
5658
|
+
"aria-label": x,
|
|
5609
5659
|
"data-dg-part": "editor-input",
|
|
5610
|
-
value:
|
|
5611
|
-
onChange:
|
|
5612
|
-
onBlur:
|
|
5613
|
-
error:
|
|
5614
|
-
}), n[
|
|
5660
|
+
value: S,
|
|
5661
|
+
onChange: C,
|
|
5662
|
+
onBlur: w,
|
|
5663
|
+
error: u
|
|
5664
|
+
}), n[15] = o, n[16] = u, n[17] = a, n[18] = v, n[19] = y, n[20] = x, n[21] = S, n[22] = C, n[23] = w, n[24] = T) : T = n[24], T;
|
|
5615
5665
|
}
|
|
5616
5666
|
//#endregion
|
|
5617
5667
|
//#region src/components/editors/TMDataGridSelectEditor.tsx
|
|
5618
|
-
function
|
|
5619
|
-
let n = e(
|
|
5620
|
-
n[0] ===
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5668
|
+
function ms(t) {
|
|
5669
|
+
let n = e(26), { field: r, column: i, row: a, table: o, size: s, commit: c, inputProps: l } = t, { labels: u, features: d } = $(), f = ns(r), p = os(r), m = l?.comboboxProps, h;
|
|
5670
|
+
n[0] === m ? h = n[1] : (h = {
|
|
5671
|
+
...m,
|
|
5672
|
+
withinPortal: !1
|
|
5673
|
+
}, n[0] = m, n[1] = h);
|
|
5674
|
+
let g;
|
|
5675
|
+
n[2] !== i || n[3] !== u ? (g = u.editCell(Vn(i)), n[2] = i, n[3] = u, n[4] = g) : g = n[4];
|
|
5676
|
+
let _;
|
|
5677
|
+
n[5] !== i || n[6] !== a || n[7] !== o ? (_ = mn(pn({
|
|
5625
5678
|
table: o,
|
|
5626
5679
|
column: i,
|
|
5627
5680
|
row: a,
|
|
5628
5681
|
fallback: "faceted"
|
|
5629
|
-
})), n[
|
|
5630
|
-
let
|
|
5631
|
-
n[
|
|
5632
|
-
r.handleChange(e), e !== null &&
|
|
5633
|
-
}, n[
|
|
5634
|
-
let
|
|
5635
|
-
|
|
5636
|
-
|
|
5682
|
+
})), n[5] = i, n[6] = a, n[7] = o, n[8] = _) : _ = n[8];
|
|
5683
|
+
let v = typeof f == "string" ? f : null, y;
|
|
5684
|
+
n[9] !== c || n[10] !== d || n[11] !== r ? (y = (e) => {
|
|
5685
|
+
r.handleChange(e), e !== null && d.editMode === "cell" && c();
|
|
5686
|
+
}, n[9] = c, n[10] = d, n[11] = r, n[12] = y) : y = n[12];
|
|
5687
|
+
let b;
|
|
5688
|
+
n[13] !== r || n[14] !== l ? (b = (e) => {
|
|
5689
|
+
r.handleBlur(), l?.onBlur?.(e);
|
|
5690
|
+
}, n[13] = r, n[14] = l, n[15] = b) : b = n[15];
|
|
5691
|
+
let x;
|
|
5692
|
+
return n[16] !== l || n[17] !== p || n[18] !== s || n[19] !== h || n[20] !== g || n[21] !== _ || n[22] !== v || n[23] !== y || n[24] !== b ? (x = /* @__PURE__ */ J(T, {
|
|
5637
5693
|
w: "100%",
|
|
5638
5694
|
searchable: !0,
|
|
5639
|
-
|
|
5640
|
-
|
|
5695
|
+
...l,
|
|
5696
|
+
size: s,
|
|
5697
|
+
comboboxProps: h,
|
|
5698
|
+
"aria-label": g,
|
|
5641
5699
|
"data-dg-part": "editor-input",
|
|
5642
|
-
data:
|
|
5643
|
-
value:
|
|
5644
|
-
onChange:
|
|
5645
|
-
onBlur:
|
|
5646
|
-
error:
|
|
5647
|
-
}), n[
|
|
5700
|
+
data: _,
|
|
5701
|
+
value: v,
|
|
5702
|
+
onChange: y,
|
|
5703
|
+
onBlur: b,
|
|
5704
|
+
error: p
|
|
5705
|
+
}), n[16] = l, n[17] = p, n[18] = s, n[19] = h, n[20] = g, n[21] = _, n[22] = v, n[23] = y, n[24] = b, n[25] = x) : x = n[25], x;
|
|
5648
5706
|
}
|
|
5649
5707
|
//#endregion
|
|
5650
5708
|
//#region src/components/editors/TMDataGridStringEditor.tsx
|
|
5651
|
-
function
|
|
5652
|
-
let n = e(
|
|
5653
|
-
n[0] !==
|
|
5654
|
-
let f = typeof s == "string" ? s : "", p;
|
|
5655
|
-
n[3] !== r || n[4] !== u ? (p = (e) => {
|
|
5656
|
-
u(e.currentTarget), r.handleChange(e.currentTarget.value);
|
|
5657
|
-
}, n[3] = r, n[4] = u, n[5] = p) : p = n[5];
|
|
5709
|
+
function hs(t) {
|
|
5710
|
+
let n = e(24), { field: r, column: i, size: a, inputProps: o } = t, { labels: s } = $(), c = ns(r), l = os(r), { inputRef: u, remember: d } = ls(), f = o?.ref, p;
|
|
5711
|
+
n[0] !== u || n[1] !== f ? (p = ts(u, f), n[0] = u, n[1] = f, n[2] = p) : p = n[2];
|
|
5658
5712
|
let m;
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5713
|
+
n[3] === o ? m = n[4] : (m = (e) => {
|
|
5714
|
+
cs(e), o?.onFocus?.(e);
|
|
5715
|
+
}, n[3] = o, n[4] = m);
|
|
5716
|
+
let h;
|
|
5717
|
+
n[5] !== i || n[6] !== s ? (h = s.editCell(Vn(i)), n[5] = i, n[6] = s, n[7] = h) : h = n[7];
|
|
5718
|
+
let g = typeof c == "string" ? c : "", _;
|
|
5719
|
+
n[8] !== r || n[9] !== d ? (_ = (e) => {
|
|
5720
|
+
d(e.currentTarget), r.handleChange(e.currentTarget.value);
|
|
5721
|
+
}, n[8] = r, n[9] = d, n[10] = _) : _ = n[10];
|
|
5722
|
+
let v;
|
|
5723
|
+
n[11] !== r || n[12] !== o ? (v = (e) => {
|
|
5724
|
+
r.handleBlur(), o?.onBlur?.(e);
|
|
5725
|
+
}, n[11] = r, n[12] = o, n[13] = v) : v = n[13];
|
|
5726
|
+
let y;
|
|
5727
|
+
return n[14] !== o || n[15] !== l || n[16] !== a || n[17] !== p || n[18] !== m || n[19] !== h || n[20] !== g || n[21] !== _ || n[22] !== v ? (y = /* @__PURE__ */ J(O, {
|
|
5662
5728
|
w: "100%",
|
|
5663
|
-
|
|
5664
|
-
|
|
5729
|
+
...o,
|
|
5730
|
+
ref: p,
|
|
5731
|
+
size: a,
|
|
5732
|
+
onFocus: m,
|
|
5733
|
+
"aria-label": h,
|
|
5665
5734
|
"data-dg-part": "editor-input",
|
|
5666
|
-
value:
|
|
5667
|
-
onChange:
|
|
5668
|
-
onBlur:
|
|
5669
|
-
error:
|
|
5670
|
-
}), n[
|
|
5735
|
+
value: g,
|
|
5736
|
+
onChange: _,
|
|
5737
|
+
onBlur: v,
|
|
5738
|
+
error: l
|
|
5739
|
+
}), n[14] = o, n[15] = l, n[16] = a, n[17] = p, n[18] = m, n[19] = h, n[20] = g, n[21] = _, n[22] = v, n[23] = y) : y = n[23], y;
|
|
5671
5740
|
}
|
|
5672
5741
|
//#endregion
|
|
5673
5742
|
//#region src/components/TMDataGridCellEditor.tsx
|
|
5674
|
-
var
|
|
5675
|
-
string:
|
|
5676
|
-
number:
|
|
5677
|
-
boolean:
|
|
5678
|
-
date:
|
|
5679
|
-
select:
|
|
5680
|
-
multiSelect:
|
|
5743
|
+
var gs = {
|
|
5744
|
+
string: hs,
|
|
5745
|
+
number: ps,
|
|
5746
|
+
boolean: us,
|
|
5747
|
+
date: ds,
|
|
5748
|
+
select: ms,
|
|
5749
|
+
multiSelect: fs
|
|
5681
5750
|
};
|
|
5682
|
-
function
|
|
5751
|
+
function _s({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1 }) {
|
|
5683
5752
|
let { table: o, edit: u, features: d, labels: f, controlSize: p } = $(), m = d.editMode === "row" || a, h = e.column, g = u.getForm(t.id), _ = qt(h), [v] = c(() => n()), y = s(void 0);
|
|
5684
5753
|
i(() => {
|
|
5685
5754
|
y.current = h.columnDef.meta?.edit?.mapValue;
|
|
@@ -5702,7 +5771,7 @@ function gs({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
5702
5771
|
}), e;
|
|
5703
5772
|
});
|
|
5704
5773
|
i(() => b.mount(), [b]);
|
|
5705
|
-
let x =
|
|
5774
|
+
let x = is(b), [S, C] = c(!1), [w, T] = c(!1);
|
|
5706
5775
|
i(() => {
|
|
5707
5776
|
if (v === void 0) return;
|
|
5708
5777
|
let e = h.columnDef.meta?.type ?? "string";
|
|
@@ -5769,7 +5838,7 @@ function gs({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
5769
5838
|
cancel: O,
|
|
5770
5839
|
size: p,
|
|
5771
5840
|
seedText: v
|
|
5772
|
-
}, P = h.columnDef.meta?.edit?.editor ??
|
|
5841
|
+
}, P = h.columnDef.meta?.edit?.editor ?? gs[h.columnDef.meta?.type ?? "string"] ?? hs;
|
|
5773
5842
|
return /* @__PURE__ */ Y("div", {
|
|
5774
5843
|
className: Ht.cellEditor,
|
|
5775
5844
|
"data-dg-part": "editor",
|
|
@@ -5827,7 +5896,7 @@ function gs({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
5827
5896
|
}
|
|
5828
5897
|
//#endregion
|
|
5829
5898
|
//#region src/core/draftCellContext.ts
|
|
5830
|
-
function
|
|
5899
|
+
function vs(e, t) {
|
|
5831
5900
|
let n = Object.create(e.row), r = n;
|
|
5832
5901
|
r.original = t, r._valuesCache = Object.create(null), r._uniqueValuesCache = Object.create(null);
|
|
5833
5902
|
let i = Object.create(e);
|
|
@@ -5842,10 +5911,10 @@ function _s(e, t) {
|
|
|
5842
5911
|
}
|
|
5843
5912
|
//#endregion
|
|
5844
5913
|
//#region src/components/TMDataGridEntryRows.tsx
|
|
5845
|
-
function
|
|
5914
|
+
function ys(e, t, n) {
|
|
5846
5915
|
return n.isColumnEditable(t) ? qn(t, e) : !1;
|
|
5847
5916
|
}
|
|
5848
|
-
function
|
|
5917
|
+
function bs(t) {
|
|
5849
5918
|
let n = e(49), { entryRow: r, column: i, cell: a, committed: o, layout: s, rowHeight: c, pinnedZ: l } = t, { edit: u } = $(), d;
|
|
5850
5919
|
n[0] === i ? d = n[1] : (d = qt(i), n[0] = i, n[1] = d);
|
|
5851
5920
|
let f = d, p;
|
|
@@ -5855,7 +5924,7 @@ function ys(t) {
|
|
|
5855
5924
|
return t !== void 0 && t.errorFields.includes(f);
|
|
5856
5925
|
}, n[2] = r, n[3] = f, n[4] = p) : p = n[4];
|
|
5857
5926
|
let m = M(u.store, p), h;
|
|
5858
|
-
n[5] !== a || n[6] !== i || n[7] !== u || n[8] !== r ? (h = a !== void 0 &&
|
|
5927
|
+
n[5] !== a || n[6] !== i || n[7] !== u || n[8] !== r ? (h = a !== void 0 && ys(r, i, u), n[5] = a, n[6] = i, n[7] = u, n[8] = r, n[9] = h) : h = n[9];
|
|
5859
5928
|
let g = h, _;
|
|
5860
5929
|
n[10] !== i.id || n[11] !== o || n[12] !== r ? (_ = (e) => o || Yn(i.id) ? void 0 : e.rows[r.id]?.values, n[10] = i.id, n[11] = o, n[12] = r, n[13] = _) : _ = n[13];
|
|
5861
5930
|
let v = M(u.store, _), y = i.id, b;
|
|
@@ -5882,15 +5951,15 @@ function ys(t) {
|
|
|
5882
5951
|
zIndex: j
|
|
5883
5952
|
}, n[27] = c, n[28] = O, n[29] = k, n[30] = A, n[31] = j, n[32] = N) : N = n[32];
|
|
5884
5953
|
let P;
|
|
5885
|
-
n[33] !== a || n[34] !== i.id || n[35] !== o || n[36] !== v || n[37] !== g || n[38] !== r ? (P = a === void 0 ? null : i.id === "__edit__" ? Ie(a.column.columnDef.cell, a.getContext()) : !o && g ? /* @__PURE__ */ J(
|
|
5954
|
+
n[33] !== a || n[34] !== i.id || n[35] !== o || n[36] !== v || n[37] !== g || n[38] !== r ? (P = a === void 0 ? null : i.id === "__edit__" ? Ie(a.column.columnDef.cell, a.getContext()) : !o && g ? /* @__PURE__ */ J(_s, {
|
|
5886
5955
|
cell: a,
|
|
5887
5956
|
row: r,
|
|
5888
|
-
takeSeedText:
|
|
5889
|
-
onClose:
|
|
5957
|
+
takeSeedText: Ss,
|
|
5958
|
+
onClose: xs,
|
|
5890
5959
|
inEntryBlock: !0
|
|
5891
5960
|
}) : o || !Yn(i.id) ? /* @__PURE__ */ J("span", {
|
|
5892
5961
|
className: Ht.cellContent,
|
|
5893
|
-
children: Ie(a.column.columnDef.cell, v === void 0 ? a.getContext() :
|
|
5962
|
+
children: Ie(a.column.columnDef.cell, v === void 0 ? a.getContext() : vs(a, v))
|
|
5894
5963
|
}) : null, n[33] = a, n[34] = i.id, n[35] = o, n[36] = v, n[37] = g, n[38] = r, n[39] = P) : P = n[39];
|
|
5895
5964
|
let F;
|
|
5896
5965
|
return n[40] !== i.id || n[41] !== D || n[42] !== N || n[43] !== P || n[44] !== b || n[45] !== x || n[46] !== S || n[47] !== C ? (F = /* @__PURE__ */ J("div", {
|
|
@@ -5905,14 +5974,14 @@ function ys(t) {
|
|
|
5905
5974
|
children: P
|
|
5906
5975
|
}), n[40] = i.id, n[41] = D, n[42] = N, n[43] = P, n[44] = b, n[45] = x, n[46] = S, n[47] = C, n[48] = F) : F = n[48], F;
|
|
5907
5976
|
}
|
|
5908
|
-
function bs() {}
|
|
5909
5977
|
function xs() {}
|
|
5910
|
-
function Ss(
|
|
5978
|
+
function Ss() {}
|
|
5979
|
+
function Cs(t) {
|
|
5911
5980
|
let n = e(35), { orderedColumns: r, layoutFor: i, rowHeight: o } = t, { table: c, edit: l, features: u } = $(), d = u.editNewRowsSticky, f;
|
|
5912
|
-
n[0] === d ? f = n[1] : (f = (e) => d ? e.newRows : e.newRows.filter(
|
|
5981
|
+
n[0] === d ? f = n[1] : (f = (e) => d ? e.newRows : e.newRows.filter(Os), n[0] = d, n[1] = f);
|
|
5913
5982
|
let p;
|
|
5914
5983
|
n[2] === Symbol.for("react.memo_cache_sentinel") ? (p = { compare: _e }, n[2] = p) : p = n[2];
|
|
5915
|
-
let m = M(l.store, f, p), h = M(l.store,
|
|
5984
|
+
let m = M(l.store, f, p), h = M(l.store, Ds), g = M(l.store, Es), _ = s(null), v = s(null), y = s(null), b;
|
|
5916
5985
|
n[3] === m ? b = n[4] : (b = () => {
|
|
5917
5986
|
let e = m.at(-1)?.tempId;
|
|
5918
5987
|
if (e === void 0) {
|
|
@@ -5960,10 +6029,10 @@ function Ss(t) {
|
|
|
5960
6029
|
let D;
|
|
5961
6030
|
if (n[20] !== E || n[21] !== i || n[22] !== m || n[23] !== r || n[24] !== o) {
|
|
5962
6031
|
let e = E.getCoreRowModel().rows, t;
|
|
5963
|
-
n[26] === m ? t = n[27] : (t = new Map(m.map(
|
|
6032
|
+
n[26] === m ? t = n[27] : (t = new Map(m.map(Ts)), n[26] = m, n[27] = t);
|
|
5964
6033
|
let a = t, s;
|
|
5965
6034
|
n[28] !== a || n[29] !== i || n[30] !== r || n[31] !== o ? (s = (e, t) => {
|
|
5966
|
-
let n = new Map(e.getAllCells().map(
|
|
6035
|
+
let n = new Map(e.getAllCells().map(ws)), s = a.get(e.id) === !0;
|
|
5967
6036
|
return /* @__PURE__ */ J("div", {
|
|
5968
6037
|
role: "row",
|
|
5969
6038
|
"data-dg-part": "entry-row",
|
|
@@ -5972,7 +6041,7 @@ function Ss(t) {
|
|
|
5972
6041
|
"data-committed": s || void 0,
|
|
5973
6042
|
"data-draft": s || void 0,
|
|
5974
6043
|
className: Ht.entryRow,
|
|
5975
|
-
children: r.map((r) => /* @__PURE__ */ J(
|
|
6044
|
+
children: r.map((r) => /* @__PURE__ */ J(bs, {
|
|
5976
6045
|
entryRow: e,
|
|
5977
6046
|
column: r,
|
|
5978
6047
|
cell: n.get(r.id),
|
|
@@ -5995,29 +6064,29 @@ function Ss(t) {
|
|
|
5995
6064
|
let O;
|
|
5996
6065
|
return n[33] === D ? O = n[34] : (O = /* @__PURE__ */ J(fe, { children: D }), n[33] = D, n[34] = O), O;
|
|
5997
6066
|
}
|
|
5998
|
-
function
|
|
6067
|
+
function ws(e) {
|
|
5999
6068
|
return [e.column.id, e];
|
|
6000
6069
|
}
|
|
6001
|
-
function
|
|
6070
|
+
function Ts(e) {
|
|
6002
6071
|
return [e.tempId, e.committed];
|
|
6003
6072
|
}
|
|
6004
|
-
function
|
|
6073
|
+
function Es(e) {
|
|
6005
6074
|
return e.active !== null && e.newRows.some((t) => t.tempId === e.active?.rowId && !t.committed) ? e.active : null;
|
|
6006
6075
|
}
|
|
6007
|
-
function
|
|
6076
|
+
function Ds(e) {
|
|
6008
6077
|
return e.committedValues;
|
|
6009
6078
|
}
|
|
6010
|
-
function
|
|
6079
|
+
function Os(e) {
|
|
6011
6080
|
return !e.committed;
|
|
6012
6081
|
}
|
|
6013
6082
|
//#endregion
|
|
6014
6083
|
//#region src/core/resizePreview.ts
|
|
6015
|
-
var
|
|
6016
|
-
function
|
|
6084
|
+
var ks = 20, As = 2 ** 53 - 1;
|
|
6085
|
+
function js(e, t, n) {
|
|
6017
6086
|
let r = Math.round(Math.max(e + e * t, 0) * 100) / 100;
|
|
6018
|
-
return Math.min(Math.max(n.minSize ??
|
|
6087
|
+
return Math.min(Math.max(n.minSize ?? ks, r), n.maxSize ?? As);
|
|
6019
6088
|
}
|
|
6020
|
-
function*
|
|
6089
|
+
function* Ms(e, t, n) {
|
|
6021
6090
|
let r = 0;
|
|
6022
6091
|
for (let i of e) yield {
|
|
6023
6092
|
columnId: i,
|
|
@@ -6025,10 +6094,10 @@ function* js(e, t, n) {
|
|
|
6025
6094
|
offset: r
|
|
6026
6095
|
}, r += n(i);
|
|
6027
6096
|
}
|
|
6028
|
-
function
|
|
6097
|
+
function Ns({ progress: e, tracks: t, boundsOf: n, leftLane: r, rightLane: i }) {
|
|
6029
6098
|
if (e.isResizingColumn === !1 || e.columnSizingStart.length === 0) return null;
|
|
6030
6099
|
let a = e.deltaPercentage ?? 0, o = /* @__PURE__ */ new Map();
|
|
6031
|
-
for (let [t, r] of e.columnSizingStart) o.set(t,
|
|
6100
|
+
for (let [t, r] of e.columnSizingStart) o.set(t, js(r, a, n(t)));
|
|
6032
6101
|
let s = [], c = 0;
|
|
6033
6102
|
for (let e of t) {
|
|
6034
6103
|
let t = o.get(e.id);
|
|
@@ -6038,12 +6107,12 @@ function Ms({ progress: e, tracks: t, boundsOf: n, leftLane: r, rightLane: i })
|
|
|
6038
6107
|
return {
|
|
6039
6108
|
gridTemplateColumns: s.join(" "),
|
|
6040
6109
|
minWidth: c,
|
|
6041
|
-
offsets: [...l(r) ?
|
|
6110
|
+
offsets: [...l(r) ? Ms(r, "left", u) : [], ...l(i) ? Ms(i, "right", u) : []]
|
|
6042
6111
|
};
|
|
6043
6112
|
}
|
|
6044
6113
|
//#endregion
|
|
6045
6114
|
//#region src/core/cellRange.ts
|
|
6046
|
-
function
|
|
6115
|
+
function Ps({ range: e, rowIndexOf: t, columnIndexOf: n }) {
|
|
6047
6116
|
if (e === null) return null;
|
|
6048
6117
|
let r = t(e.anchor.rowId), i = t(e.focus.rowId), a = n(e.anchor.columnId), o = n(e.focus.columnId);
|
|
6049
6118
|
return r < 0 || i < 0 || a < 0 || o < 0 ? null : {
|
|
@@ -6053,14 +6122,14 @@ function Ns({ range: e, rowIndexOf: t, columnIndexOf: n }) {
|
|
|
6053
6122
|
right: Math.max(a, o)
|
|
6054
6123
|
};
|
|
6055
6124
|
}
|
|
6056
|
-
function
|
|
6125
|
+
function Fs(e, t, n) {
|
|
6057
6126
|
return e !== null && t >= e.top && t <= e.bottom && n >= e.left && n <= e.right;
|
|
6058
6127
|
}
|
|
6059
|
-
function
|
|
6128
|
+
function Is(e) {
|
|
6060
6129
|
return e === null ? 0 : (e.bottom - e.top + 1) * (e.right - e.left + 1);
|
|
6061
6130
|
}
|
|
6062
|
-
function
|
|
6063
|
-
return !
|
|
6131
|
+
function Ls(e, t, n, r = n) {
|
|
6132
|
+
return !Fs(e, t, n) || e === null ? null : {
|
|
6064
6133
|
top: t === e.top,
|
|
6065
6134
|
bottom: t === e.bottom,
|
|
6066
6135
|
left: n === e.left,
|
|
@@ -6069,7 +6138,7 @@ function Is(e, t, n, r = n) {
|
|
|
6069
6138
|
}
|
|
6070
6139
|
//#endregion
|
|
6071
6140
|
//#region src/core/colSpan.ts
|
|
6072
|
-
function
|
|
6141
|
+
function Rs(e, t) {
|
|
6073
6142
|
let n = [], r = 0;
|
|
6074
6143
|
for (; r < e.length;) {
|
|
6075
6144
|
let i = e[r], a = Xn(i.id) ? 1 : t(r), o = typeof a == "number" && a >= 1 ? Math.floor(a) : 1, s = 1;
|
|
@@ -6084,18 +6153,18 @@ function Ls(e, t) {
|
|
|
6084
6153
|
}
|
|
6085
6154
|
return n;
|
|
6086
6155
|
}
|
|
6087
|
-
function
|
|
6156
|
+
function zs(e, t) {
|
|
6088
6157
|
let n = t;
|
|
6089
6158
|
for (; n > 0 && e[n] === 0;) --n;
|
|
6090
6159
|
return n;
|
|
6091
6160
|
}
|
|
6092
|
-
function
|
|
6093
|
-
let n =
|
|
6161
|
+
function Bs(e, t) {
|
|
6162
|
+
let n = zs(e, t);
|
|
6094
6163
|
return n + Math.max(1, e[n] ?? 1) - 1;
|
|
6095
6164
|
}
|
|
6096
6165
|
//#endregion
|
|
6097
6166
|
//#region src/core/rowPinning.ts
|
|
6098
|
-
function
|
|
6167
|
+
function Vs(e, t) {
|
|
6099
6168
|
let n = e.store.state.rowPinning[t];
|
|
6100
6169
|
if (n.length === 0) return [];
|
|
6101
6170
|
let r = e.getPrePaginatedRowModel().rowsById, i = e.getCoreRowModel().rowsById, a = [];
|
|
@@ -6107,17 +6176,17 @@ function Bs(e, t) {
|
|
|
6107
6176
|
}
|
|
6108
6177
|
//#endregion
|
|
6109
6178
|
//#region src/core/matchHighlight.ts
|
|
6110
|
-
var
|
|
6179
|
+
var Hs = [
|
|
6111
6180
|
"contains",
|
|
6112
6181
|
"startsWith",
|
|
6113
6182
|
"endsWith"
|
|
6114
6183
|
];
|
|
6115
|
-
function
|
|
6184
|
+
function Us(e) {
|
|
6116
6185
|
let t = e.store.state, n = typeof t.globalFilter == "string" ? t.globalFilter.trim() : "", r = /* @__PURE__ */ new Map();
|
|
6117
6186
|
for (let e of t.columnFilters) {
|
|
6118
6187
|
if (!Ct(e.value)) continue;
|
|
6119
6188
|
let { operator: t, value: n } = e.value;
|
|
6120
|
-
if (!
|
|
6189
|
+
if (!Hs.includes(t) || typeof n != "string" || n === "") continue;
|
|
6121
6190
|
let i = r.get(e.id) ?? [];
|
|
6122
6191
|
i.push(n), r.set(e.id, i);
|
|
6123
6192
|
}
|
|
@@ -6131,7 +6200,7 @@ function Hs(e) {
|
|
|
6131
6200
|
}
|
|
6132
6201
|
return i.size > 0 ? i : null;
|
|
6133
6202
|
}
|
|
6134
|
-
function
|
|
6203
|
+
function Ws(e, t) {
|
|
6135
6204
|
let n = e.toLowerCase(), r = [];
|
|
6136
6205
|
for (let e of t) {
|
|
6137
6206
|
let t = e.toLowerCase();
|
|
@@ -6153,29 +6222,29 @@ function Us(e, t) {
|
|
|
6153
6222
|
}
|
|
6154
6223
|
//#endregion
|
|
6155
6224
|
//#region src/components/TMDataGridTable.tsx
|
|
6156
|
-
var
|
|
6225
|
+
var Gs = {
|
|
6157
6226
|
pinnedAt: !1,
|
|
6158
6227
|
offset: 0,
|
|
6159
6228
|
isBoundary: !1
|
|
6160
6229
|
};
|
|
6161
|
-
function
|
|
6230
|
+
function Ks(e, t) {
|
|
6162
6231
|
return e.querySelector(`[data-cell="true"][data-row-id="${CSS.escape(t.rowId)}"][data-column-id="${CSS.escape(t.columnId)}"]`);
|
|
6163
6232
|
}
|
|
6164
|
-
function
|
|
6233
|
+
function qs({ container: e, cellElement: t, leftPinnedWidth: n, rightPinnedWidth: r }) {
|
|
6165
6234
|
let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + n, s = a.right - r;
|
|
6166
6235
|
i.left < o ? e.scrollLeft -= o - i.left : i.right > s && (e.scrollLeft += i.right - s);
|
|
6167
6236
|
}
|
|
6168
|
-
function
|
|
6237
|
+
function Js(e) {
|
|
6169
6238
|
if (e.getIsPlaceholder()) return null;
|
|
6170
|
-
if (!
|
|
6239
|
+
if (!Ys(e)) return Ie(e.column.columnDef.cell, e.getContext());
|
|
6171
6240
|
let { aggregatedCell: t } = e.column.columnDef;
|
|
6172
6241
|
return t === void 0 ? e.getIsAggregated() ? Ie(e.column.columnDef.cell, e.getContext()) : null : Ie(t, e.getContext());
|
|
6173
6242
|
}
|
|
6174
|
-
function
|
|
6243
|
+
function Ys(e) {
|
|
6175
6244
|
return e.row.getIsGrouped() && !e.getIsGrouped();
|
|
6176
6245
|
}
|
|
6177
|
-
function
|
|
6178
|
-
let n =
|
|
6246
|
+
function Xs(e, t) {
|
|
6247
|
+
let n = Ws(e, t);
|
|
6179
6248
|
if (n === null) return e;
|
|
6180
6249
|
let r = [], i = 0;
|
|
6181
6250
|
for (let t of n) t.start > i && r.push(e.slice(i, t.start)), r.push(/* @__PURE__ */ J("mark", {
|
|
@@ -6184,7 +6253,7 @@ function Ys(e, t) {
|
|
|
6184
6253
|
}, t.start)), i = t.end;
|
|
6185
6254
|
return i < e.length && r.push(e.slice(i)), r;
|
|
6186
6255
|
}
|
|
6187
|
-
function
|
|
6256
|
+
function Zs(t) {
|
|
6188
6257
|
let n = e(62), { cell: r, rowHeight: i, colSpan: a, layout: o, nav: s, editor: c, contentOverride: l, highlightNeedles: u, onFocus: d, onClick: f, onMouseDown: p, onMouseEnter: m, onDoubleClick: h, onContextMenu: g } = t, _ = a === void 0 ? 1 : a, { table: v, edit: y } = $(), b;
|
|
6189
6258
|
n[0] === r.column ? b = n[1] : (b = qt(r.column), n[0] = r.column, n[1] = b);
|
|
6190
6259
|
let x = b, S = r.row.id, C;
|
|
@@ -6226,12 +6295,12 @@ function Xs(t) {
|
|
|
6226
6295
|
n[25] !== r || n[26] !== l || n[27] !== A || n[28] !== c || n[29] !== u || n[30] !== v ? (pe = c ?? /* @__PURE__ */ J("span", {
|
|
6227
6296
|
className: Ht.cellContent,
|
|
6228
6297
|
children: (() => {
|
|
6229
|
-
let e = A !== void 0 && l === void 0 && !r.getIsPlaceholder() && !
|
|
6230
|
-
if (u !== void 0 && l === void 0 && !r.getIsPlaceholder() && !
|
|
6298
|
+
let e = A !== void 0 && l === void 0 && !r.getIsPlaceholder() && !Ys(r) ? vs(r, A) : void 0;
|
|
6299
|
+
if (u !== void 0 && l === void 0 && !r.getIsPlaceholder() && !Ys(r) && r.column.columnDef.cell === v.getDefaultColumnDef().cell) {
|
|
6231
6300
|
let t = e === void 0 ? r.renderValue() : e.renderValue();
|
|
6232
|
-
if (typeof t == "string" || typeof t == "number") return
|
|
6301
|
+
if (typeof t == "string" || typeof t == "number") return Xs(String(t), u);
|
|
6233
6302
|
}
|
|
6234
|
-
return e === void 0 ? l ??
|
|
6303
|
+
return e === void 0 ? l ?? Js(r) : Ie(r.column.columnDef.cell, e);
|
|
6235
6304
|
})()
|
|
6236
6305
|
}), n[25] = r, n[26] = l, n[27] = A, n[28] = c, n[29] = u, n[30] = v, n[31] = pe) : pe = n[31];
|
|
6237
6306
|
let me;
|
|
@@ -6267,7 +6336,7 @@ function Xs(t) {
|
|
|
6267
6336
|
children: pe
|
|
6268
6337
|
}), n[32] = r.column.id, n[33] = r.row.id, n[34] = f, n[35] = g, n[36] = h, n[37] = d, n[38] = p, n[39] = m, n[40] = F, n[41] = ee, n[42] = I, n[43] = z, n[44] = B, n[45] = V, n[46] = H, n[47] = te, n[48] = U, n[49] = W, n[50] = ne, n[51] = re, n[52] = ie, n[53] = ae, n[54] = oe, n[55] = ce, n[56] = Y, n[57] = pe, n[58] = j, n[59] = N, n[60] = P, n[61] = me) : me = n[61], me;
|
|
6269
6338
|
}
|
|
6270
|
-
function
|
|
6339
|
+
function Qs(t) {
|
|
6271
6340
|
let n = e(16), { enabled: r, menuContent: i, menuProps: a, onContextMenu: o, onClose: s, children: c } = t, l;
|
|
6272
6341
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { display: "contents" }, n[0] = l) : l = n[0];
|
|
6273
6342
|
let u = r ? o : void 0, d;
|
|
@@ -6298,10 +6367,10 @@ function Zs(t) {
|
|
|
6298
6367
|
children: [h, g]
|
|
6299
6368
|
}), n[10] = a, n[11] = p, n[12] = m, n[13] = h, n[14] = g, n[15] = v) : v = n[15], v;
|
|
6300
6369
|
}
|
|
6301
|
-
function
|
|
6370
|
+
function $s({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContextMenu: l, rowClassName: u, rowStyle: d, striped: f = !1, highlightOnHover: m, onScrollToTop: h, onScrollToBottom: v, onScrollToLeft: y, onScrollToRight: b, renderEmptyState: x, renderRowContextMenu: S, renderColumnMenuItems: C, rowContextMenuProps: w, onReachEnd: T, reachEndThreshold: E = 10, "aria-label": O, "aria-labelledby": k }) {
|
|
6302
6371
|
let { table: A, ui: j, edit: N, features: P, filters: F, exportOptions: ee, labels: I, rowHeight: L, controlSize: R, renderDetails: z, renderDetailsEstHeight: B, overscan: V, scrollerRef: H } = $();
|
|
6303
6372
|
Ha(A.store);
|
|
6304
|
-
let te = M(j, (e) => e.highlightedRowId), U = M(j, (e) => e.focusedCell), W = M(j, (e) => e.cellRange), ne = M(N.store, (e) => e.active), re = M(N.store, (e) => e.openRowIds), ie = M(N.store, (e) => e.newRows), ae = ie.length, oe = M(N.store, (e) => e.deletedRowIds), se = M(N.store, (e) => e.openRowIds.filter((t) => (e.rows[t]?.dirtyFields.length ?? 0) > 0)), G = M(N.store, (e) => e.committedRowIds), K = o(() => new Set(re), [re]), ce = o(() => new Set(se), [se]), le = o(() => new Set(G), [G]), de = o(() => new Set(ie.map((e) => e.tempId)), [ie]), { loading: q, noResultsLabel: pe = I.noResults } = A.options.meta ?? {}, me = s(null), X = Mn(A, P), he = P.matchHighlighting ?
|
|
6373
|
+
let te = M(j, (e) => e.highlightedRowId), U = M(j, (e) => e.focusedCell), W = M(j, (e) => e.cellRange), ne = M(N.store, (e) => e.active), re = M(N.store, (e) => e.openRowIds), ie = M(N.store, (e) => e.newRows), ae = ie.length, oe = M(N.store, (e) => e.deletedRowIds), se = M(N.store, (e) => e.openRowIds.filter((t) => (e.rows[t]?.dirtyFields.length ?? 0) > 0)), G = M(N.store, (e) => e.committedRowIds), K = o(() => new Set(re), [re]), ce = o(() => new Set(se), [se]), le = o(() => new Set(G), [G]), de = o(() => new Set(ie.map((e) => e.tempId)), [ie]), { loading: q, noResultsLabel: pe = I.noResults } = A.options.meta ?? {}, me = s(null), X = Mn(A, P), he = P.matchHighlighting ? Us(A) : null, ge = P.rowPinning ? Vs(A, "top") : [], _e = P.rowPinning ? Vs(A, "bottom") : [], ve = ge.length + _e.length, ye = null;
|
|
6305
6374
|
if (P.rowNumbers) {
|
|
6306
6375
|
ye = /* @__PURE__ */ new Map();
|
|
6307
6376
|
let e = Nn(A, P) ? A.store.state.pagination.pageIndex * A.store.state.pagination.pageSize : 0;
|
|
@@ -6414,7 +6483,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6414
6483
|
if (Ue === null || e.getIsGrouped() || We(e)) return null;
|
|
6415
6484
|
let t = Ge.get(e.id);
|
|
6416
6485
|
if (t !== void 0) return t;
|
|
6417
|
-
let n =
|
|
6486
|
+
let n = Rs(Ue, (t) => {
|
|
6418
6487
|
let n = Ue[t]?.colSpan;
|
|
6419
6488
|
return typeof n == "function" ? n({
|
|
6420
6489
|
row: e,
|
|
@@ -6431,7 +6500,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6431
6500
|
if (n === null) return e;
|
|
6432
6501
|
let r = Q.findIndex((t) => t.id === e.columnId);
|
|
6433
6502
|
if (r < 0) return e;
|
|
6434
|
-
let i =
|
|
6503
|
+
let i = zs(n, r);
|
|
6435
6504
|
if (i === r) return e;
|
|
6436
6505
|
let a = Q[i];
|
|
6437
6506
|
return a ? {
|
|
@@ -6473,7 +6542,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6473
6542
|
offset: 0,
|
|
6474
6543
|
isBoundary: !1
|
|
6475
6544
|
});
|
|
6476
|
-
let ct = (e) => it.get(e) ??
|
|
6545
|
+
let ct = (e) => it.get(e) ?? Gs, lt = (e, t) => {
|
|
6477
6546
|
let n = ct(Q[e].id);
|
|
6478
6547
|
if (n.pinnedAt === !1) return n;
|
|
6479
6548
|
let r = Q.slice(e, t + 1).map((e) => ct(e.id));
|
|
@@ -6497,7 +6566,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6497
6566
|
let e = Se.current;
|
|
6498
6567
|
if (!e) return;
|
|
6499
6568
|
let t = "", n = A.store.subscribe((n) => {
|
|
6500
|
-
let r =
|
|
6569
|
+
let r = Ns({
|
|
6501
6570
|
progress: n.columnResizing,
|
|
6502
6571
|
boundsOf: (e) => A.getColumn(e)?.columnDef ?? {},
|
|
6503
6572
|
...ut.current
|
|
@@ -6566,8 +6635,8 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6566
6635
|
if (Lt === null) return;
|
|
6567
6636
|
Dt.current = !0, j.actions.setFocusedCell(Lt);
|
|
6568
6637
|
let e = me.current;
|
|
6569
|
-
e !== null &&
|
|
6570
|
-
}, zt = (e, t, n) => U !== null && U.rowId === e && Pt >= t && Pt <= n, Bt =
|
|
6638
|
+
e !== null && Ks(e, Lt)?.focus({ preventScroll: !0 });
|
|
6639
|
+
}, zt = (e, t, n) => U !== null && U.rowId === e && Pt >= t && Pt <= n, Bt = Ps({
|
|
6571
6640
|
range: Tt ? W : null,
|
|
6572
6641
|
rowIndexOf: (e) => X.findIndex((t) => t.id === e),
|
|
6573
6642
|
columnIndexOf: (e) => Q.findIndex((t) => t.id === e)
|
|
@@ -6583,7 +6652,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6583
6652
|
bottom: Nt,
|
|
6584
6653
|
left: Pt,
|
|
6585
6654
|
right: Pt
|
|
6586
|
-
} : null), Wt =
|
|
6655
|
+
} : null), Wt = Is(Ut), Gt = Ut === null ? 0 : Q.slice(Ut.left, Ut.right + 1).filter((e) => !Xn(e.id) && e.columnDef.meta?.enableExport !== !1).length, Kt = sa(ee), [qt, Jt] = c(Kt.includeHeaders), Yt = () => Ut === null ? null : ha({
|
|
6587
6656
|
table: A,
|
|
6588
6657
|
rows: X,
|
|
6589
6658
|
bounds: Ut
|
|
@@ -6641,7 +6710,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6641
6710
|
});
|
|
6642
6711
|
let sn = (e) => {
|
|
6643
6712
|
let t = me.current;
|
|
6644
|
-
t !== null && (Dt.current = !0,
|
|
6713
|
+
t !== null && (Dt.current = !0, Ks(t, e)?.focus());
|
|
6645
6714
|
}, cn = (e) => {
|
|
6646
6715
|
wt && j.actions.setFocusedCell(e), N.begin({
|
|
6647
6716
|
rowId: e.rowId,
|
|
@@ -6714,7 +6783,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6714
6783
|
rowIndex: c,
|
|
6715
6784
|
columnIndex: e.shiftKey ? Q.length - 1 : 0
|
|
6716
6785
|
});
|
|
6717
|
-
let n = me.current, r = n === null ? null :
|
|
6786
|
+
let n = me.current, r = n === null ? null : Ks(n, Je({
|
|
6718
6787
|
rowId: l.id,
|
|
6719
6788
|
columnId: u.id
|
|
6720
6789
|
}, l));
|
|
@@ -6793,7 +6862,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6793
6862
|
ctrlKey: e.ctrlKey || e.metaKey,
|
|
6794
6863
|
from: {
|
|
6795
6864
|
rowIndex: a,
|
|
6796
|
-
columnIndex: l !== null && e.key === "ArrowRight" ?
|
|
6865
|
+
columnIndex: l !== null && e.key === "ArrowRight" ? Bs(l, o) : o
|
|
6797
6866
|
},
|
|
6798
6867
|
rowCount: X.length,
|
|
6799
6868
|
columnCount: Q.length,
|
|
@@ -6801,7 +6870,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6801
6870
|
});
|
|
6802
6871
|
if (u === null) return;
|
|
6803
6872
|
e.preventDefault();
|
|
6804
|
-
let d = l === null ? u.columnIndex :
|
|
6873
|
+
let d = l === null ? u.columnIndex : zs(l, u.columnIndex);
|
|
6805
6874
|
u.rowIndex === a && d === o || tn(u, { extend: e.shiftKey && Tt });
|
|
6806
6875
|
};
|
|
6807
6876
|
i(() => {
|
|
@@ -6818,8 +6887,8 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6818
6887
|
return;
|
|
6819
6888
|
}
|
|
6820
6889
|
if (!Dt.current && !e.contains(t) || !Dt.current && t !== null && t.closest("[data-dg-part=\"tab-guard\"]") !== null) return;
|
|
6821
|
-
let r =
|
|
6822
|
-
r !== null && (Dt.current = !1, !r.contains(t) && (t !== null && t.closest("[data-dg-part=\"editor\"]") !== null || (r.focus({ preventScroll: !0 }), ct(U.columnId).pinnedAt === !1 &&
|
|
6890
|
+
let r = Ks(e, n);
|
|
6891
|
+
r !== null && (Dt.current = !1, !r.contains(t) && (t !== null && t.closest("[data-dg-part=\"editor\"]") !== null || (r.focus({ preventScroll: !0 }), ct(U.columnId).pinnedAt === !1 && qs({
|
|
6823
6892
|
container: e,
|
|
6824
6893
|
cellElement: r,
|
|
6825
6894
|
leftPinnedWidth: ot,
|
|
@@ -6830,7 +6899,7 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6830
6899
|
let e = hn.current, t = gn.current;
|
|
6831
6900
|
if (hn.current = null, gn.current = null, wt && e !== null && t !== null) {
|
|
6832
6901
|
let n = X.findIndex((t) => t.id === e), r = Q.findIndex((e) => e.id === t);
|
|
6833
|
-
n >= 0 && !
|
|
6902
|
+
n >= 0 && !Fs(Ut, n, r) && (j.actions.setFocusedCell({
|
|
6834
6903
|
rowId: e,
|
|
6835
6904
|
columnId: t
|
|
6836
6905
|
}), Vt({
|
|
@@ -6948,12 +7017,12 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6948
7017
|
className: Ht.tabGuard,
|
|
6949
7018
|
onFocus: Rt
|
|
6950
7019
|
}),
|
|
6951
|
-
P.editing && ae > 0 && /* @__PURE__ */ J(
|
|
7020
|
+
P.editing && ae > 0 && /* @__PURE__ */ J(Cs, {
|
|
6952
7021
|
orderedColumns: Q,
|
|
6953
7022
|
layoutFor: ct,
|
|
6954
7023
|
rowHeight: L
|
|
6955
7024
|
}),
|
|
6956
|
-
/* @__PURE__ */ J(
|
|
7025
|
+
/* @__PURE__ */ J(Qs, {
|
|
6957
7026
|
enabled: S !== void 0 || Tt,
|
|
6958
7027
|
menuContent: Cn,
|
|
6959
7028
|
menuProps: w,
|
|
@@ -7015,14 +7084,14 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
7015
7084
|
children: [u.map((i, a) => {
|
|
7016
7085
|
if (p !== null && p[a] === 0) return null;
|
|
7017
7086
|
let s = p?.[a] ?? 1, c = a + s - 1, u = ne !== null && ne.rowId === e.id && ne.columnId === i.column.id || d && N.canEditCell(e, i.column);
|
|
7018
|
-
return /* @__PURE__ */ J(
|
|
7087
|
+
return /* @__PURE__ */ J(Zs, {
|
|
7019
7088
|
cell: i,
|
|
7020
7089
|
rowHeight: L,
|
|
7021
7090
|
colSpan: s,
|
|
7022
7091
|
layout: s > 1 ? lt(a, c) : ct(i.column.id),
|
|
7023
7092
|
contentOverride: ye !== null && i.column.id === "__rowNumber__" ? ye.get(e.id) : void 0,
|
|
7024
7093
|
highlightNeedles: he?.get(i.column.id),
|
|
7025
|
-
editor: u ? /* @__PURE__ */ J(
|
|
7094
|
+
editor: u ? /* @__PURE__ */ J(_s, {
|
|
7026
7095
|
cell: i,
|
|
7027
7096
|
row: e,
|
|
7028
7097
|
takeSeedText: rn,
|
|
@@ -7043,8 +7112,8 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
7043
7112
|
columnIndex: a + 1,
|
|
7044
7113
|
focused: zt(e.id, a, c),
|
|
7045
7114
|
tabIndex: -1,
|
|
7046
|
-
selected: Tt ?
|
|
7047
|
-
edges:
|
|
7115
|
+
selected: Tt ? Fs(Bt, n, a) : zt(e.id, a, c),
|
|
7116
|
+
edges: Ls(Bt, n, a, c)
|
|
7048
7117
|
} : void 0,
|
|
7049
7118
|
onFocus: wt ? () => j.actions.setFocusedCell({
|
|
7050
7119
|
rowId: e.id,
|
|
@@ -7193,18 +7262,18 @@ function Qs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
7193
7262
|
]
|
|
7194
7263
|
});
|
|
7195
7264
|
}
|
|
7196
|
-
var
|
|
7265
|
+
var ec = {
|
|
7197
7266
|
toolbar: "_toolbar_gwk05_1",
|
|
7198
7267
|
toolbarSpacer: "_toolbarSpacer_gwk05_15",
|
|
7199
7268
|
summaryCount: "_summaryCount_gwk05_19"
|
|
7200
7269
|
};
|
|
7201
7270
|
//#endregion
|
|
7202
7271
|
//#region src/components/TMDataGridToolbar.tsx
|
|
7203
|
-
function
|
|
7272
|
+
function tc(t) {
|
|
7204
7273
|
let n = e(18), r, i, a, o, s;
|
|
7205
7274
|
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);
|
|
7206
7275
|
let c = s !== void 0 && s, l;
|
|
7207
|
-
n[6] === i ? l = n[7] : (l = [
|
|
7276
|
+
n[6] === i ? l = n[7] : (l = [ec.toolbar, i].filter(Boolean), n[6] = i, n[7] = l);
|
|
7208
7277
|
let u = l.join(" "), f;
|
|
7209
7278
|
n[8] === c ? f = n[9] : (f = { "with-bottom-border": c }, n[8] = c, n[9] = f);
|
|
7210
7279
|
let p;
|
|
@@ -7218,18 +7287,18 @@ function ec(t) {
|
|
|
7218
7287
|
children: r
|
|
7219
7288
|
}), n[13] = r, n[14] = o, n[15] = u, n[16] = p, n[17] = m) : m = n[17], m;
|
|
7220
7289
|
}
|
|
7221
|
-
function
|
|
7290
|
+
function nc(t) {
|
|
7222
7291
|
let n = e(8), r, i;
|
|
7223
7292
|
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
7224
7293
|
let a;
|
|
7225
|
-
n[3] === r ? a = n[4] : (a = [
|
|
7294
|
+
n[3] === r ? a = n[4] : (a = [ec.toolbarSpacer, r].filter(Boolean), n[3] = r, n[4] = a);
|
|
7226
7295
|
let o = a.join(" "), s;
|
|
7227
7296
|
return n[5] !== i || n[6] !== o ? (s = /* @__PURE__ */ J(d, {
|
|
7228
7297
|
className: o,
|
|
7229
7298
|
...i
|
|
7230
7299
|
}), n[5] = i, n[6] = o, n[7] = s) : s = n[7], s;
|
|
7231
7300
|
}
|
|
7232
|
-
function
|
|
7301
|
+
function rc() {
|
|
7233
7302
|
let t = e(2), { table: n, labels: r } = $();
|
|
7234
7303
|
if (n.options.meta?.loading !== !0) return null;
|
|
7235
7304
|
let i;
|
|
@@ -7239,7 +7308,7 @@ function nc() {
|
|
|
7239
7308
|
"aria-label": r.loading
|
|
7240
7309
|
}), t[0] = r.loading, t[1] = i), i;
|
|
7241
7310
|
}
|
|
7242
|
-
function
|
|
7311
|
+
function ic(t) {
|
|
7243
7312
|
let n = e(8), { children: r } = t, { table: i, controlSize: a } = $();
|
|
7244
7313
|
Ha(i.store);
|
|
7245
7314
|
let o = i.options.manualFiltering === !0 || i.options.manualPagination === !0, s;
|
|
@@ -7251,13 +7320,13 @@ function rc(t) {
|
|
|
7251
7320
|
span: !0,
|
|
7252
7321
|
size: a,
|
|
7253
7322
|
c: "dimmed",
|
|
7254
|
-
className:
|
|
7323
|
+
className: ec.summaryCount,
|
|
7255
7324
|
"data-dg-part": "summary-count",
|
|
7256
7325
|
children: d
|
|
7257
7326
|
}), n[5] = a, n[6] = d, n[7] = f) : f = n[7], f;
|
|
7258
7327
|
}
|
|
7259
|
-
function
|
|
7260
|
-
let t = e(16), n = $(), { table: r, ui: i, features: a, filters: o, labels: s, controlSize: c } = n, u = M(i,
|
|
7328
|
+
function ac() {
|
|
7329
|
+
let t = e(16), n = $(), { table: r, ui: i, features: a, filters: o, labels: s, controlSize: c } = n, u = M(i, lc), d = M(r.store, cc), f = d.filter(sc).length;
|
|
7261
7330
|
if (!ji(r, a).canFilterAny || o.surface === "none") return null;
|
|
7262
7331
|
let p = u || f > 0 ? "light" : "subtle", m = f > 0 ? void 0 : "gray", h;
|
|
7263
7332
|
t[0] !== n || t[1] !== d.length || t[2] !== u || t[3] !== r || t[4] !== i.actions ? (h = () => {
|
|
@@ -7265,7 +7334,7 @@ function ic() {
|
|
|
7265
7334
|
i.actions.closeFilterPanel();
|
|
7266
7335
|
return;
|
|
7267
7336
|
}
|
|
7268
|
-
let e = d.length === 0 ? r.getAllLeafColumns().find(
|
|
7337
|
+
let e = d.length === 0 ? r.getAllLeafColumns().find(oc) : void 0;
|
|
7269
7338
|
e && Fa(n, e.id), i.actions.openFilterPanel(e?.id ?? null);
|
|
7270
7339
|
}, t[0] = n, t[1] = d.length, t[2] = u, t[3] = r, t[4] = i.actions, t[5] = h) : h = t[5];
|
|
7271
7340
|
let g;
|
|
@@ -7290,19 +7359,19 @@ function ic() {
|
|
|
7290
7359
|
children: _
|
|
7291
7360
|
}), t[13] = s.filters, t[14] = _, t[15] = v) : v = t[15], v;
|
|
7292
7361
|
}
|
|
7293
|
-
function
|
|
7362
|
+
function oc(e) {
|
|
7294
7363
|
return e.getCanFilter();
|
|
7295
7364
|
}
|
|
7296
|
-
function
|
|
7365
|
+
function sc(e) {
|
|
7297
7366
|
return Tt(e.value);
|
|
7298
7367
|
}
|
|
7299
|
-
function
|
|
7368
|
+
function cc(e) {
|
|
7300
7369
|
return e.columnFilters;
|
|
7301
7370
|
}
|
|
7302
|
-
function
|
|
7371
|
+
function lc(e) {
|
|
7303
7372
|
return e.filterPanelOpen;
|
|
7304
7373
|
}
|
|
7305
|
-
var
|
|
7374
|
+
var uc = {
|
|
7306
7375
|
title: "_title_199r2_1",
|
|
7307
7376
|
list: "_list_199r2_5",
|
|
7308
7377
|
listHeader: "_listHeader_199r2_13",
|
|
@@ -7318,20 +7387,20 @@ var lc = {
|
|
|
7318
7387
|
};
|
|
7319
7388
|
//#endregion
|
|
7320
7389
|
//#region src/components/TMDataGridExportPicker.tsx
|
|
7321
|
-
function
|
|
7322
|
-
let t = e(26), { ui: n, labels: r, size: i, controlSize: a, exportOptions: o } = $(), s = M(n,
|
|
7390
|
+
function dc() {
|
|
7391
|
+
let t = e(26), { ui: n, labels: r, size: i, controlSize: a, exportOptions: o } = $(), s = M(n, fc), c, l, u, d;
|
|
7323
7392
|
if (t[0] !== o || t[1] !== r || t[2] !== s || t[3] !== n.actions) {
|
|
7324
7393
|
let e = s ? sa(o, s.options).format : null;
|
|
7325
7394
|
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;
|
|
7326
7395
|
} else c = t[4], l = t[5], u = t[6], d = t[7];
|
|
7327
|
-
let f =
|
|
7396
|
+
let f = pc[i], p = mc[a], m;
|
|
7328
7397
|
t[10] === p ? m = t[11] : (m = { size: p }, t[10] = p, t[11] = m);
|
|
7329
7398
|
let h;
|
|
7330
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (h = { title:
|
|
7399
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (h = { title: uc.title }, t[12] = h) : h = t[12];
|
|
7331
7400
|
let g = `var(--mantine-font-size-${a})`, _;
|
|
7332
7401
|
t[13] === g ? _ = t[14] : (_ = { title: { fontSize: g } }, t[13] = g, t[14] = _);
|
|
7333
7402
|
let y;
|
|
7334
|
-
t[15] === s ? y = t[16] : (y = s && /* @__PURE__ */ J(
|
|
7403
|
+
t[15] === s ? y = t[16] : (y = s && /* @__PURE__ */ J(hc, { request: s }), t[15] = s, t[16] = y);
|
|
7335
7404
|
let b;
|
|
7336
7405
|
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, {
|
|
7337
7406
|
opened: l,
|
|
@@ -7344,25 +7413,25 @@ function uc() {
|
|
|
7344
7413
|
children: y
|
|
7345
7414
|
}), 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;
|
|
7346
7415
|
}
|
|
7347
|
-
function
|
|
7416
|
+
function fc(e) {
|
|
7348
7417
|
return e.exportPicker;
|
|
7349
7418
|
}
|
|
7350
|
-
var
|
|
7419
|
+
var pc = {
|
|
7351
7420
|
xs: "xs",
|
|
7352
7421
|
sm: "xs",
|
|
7353
7422
|
md: "sm",
|
|
7354
7423
|
lg: "sm",
|
|
7355
7424
|
xl: "md"
|
|
7356
|
-
},
|
|
7425
|
+
}, mc = {
|
|
7357
7426
|
xs: "sm",
|
|
7358
7427
|
sm: "md",
|
|
7359
7428
|
md: "lg"
|
|
7360
7429
|
};
|
|
7361
|
-
function
|
|
7430
|
+
function hc(t) {
|
|
7362
7431
|
let n = e(95), { request: r } = t, { table: i, ui: a, labels: o, controlSize: s } = $(), { exportAll: l, exportSelected: u } = Qa(r.options), d;
|
|
7363
7432
|
n[0] === i ? d = n[1] : (d = la(i), n[0] = i, n[1] = d);
|
|
7364
7433
|
let h = d, [g, _] = c(""), v;
|
|
7365
|
-
n[2] === h ? v = n[3] : (v = () => new Set(h.filter(
|
|
7434
|
+
n[2] === h ? v = n[3] : (v = () => new Set(h.filter(vc).map(_c)), n[2] = h, n[3] = v);
|
|
7366
7435
|
let [y, b] = c(v), x;
|
|
7367
7436
|
n[4] === h.length ? x = n[5] : (x = Qn("auto", h.length), n[4] = h.length, n[5] = x);
|
|
7368
7437
|
let S = x, w;
|
|
@@ -7388,7 +7457,7 @@ function mc(t) {
|
|
|
7388
7457
|
}), n[15] = T, n[16] = F);
|
|
7389
7458
|
let ee = F, I;
|
|
7390
7459
|
n[17] !== y || n[18] !== h || n[19] !== l || n[20] !== u || n[21] !== r.rows || n[22] !== a.actions ? (I = async () => {
|
|
7391
|
-
let e = h.filter((e) => y.has(e.id)).map(
|
|
7460
|
+
let e = h.filter((e) => y.has(e.id)).map(gc);
|
|
7392
7461
|
await (r.rows === "selected" ? u : l)({ columns: e }), a.actions.closeExportPicker();
|
|
7393
7462
|
}, n[17] = y, n[18] = h, n[19] = l, n[20] = u, n[21] = r.rows, n[22] = a.actions, n[23] = I) : I = n[23];
|
|
7394
7463
|
let L = I, R;
|
|
@@ -7416,7 +7485,7 @@ function mc(t) {
|
|
|
7416
7485
|
let H;
|
|
7417
7486
|
n[36] === ee ? H = n[37] : (H = (e) => ee(e.currentTarget.checked), n[36] = ee, n[37] = H);
|
|
7418
7487
|
let te;
|
|
7419
|
-
n[38] === Symbol.for("react.memo_cache_sentinel") ? (te = { label:
|
|
7488
|
+
n[38] === Symbol.for("react.memo_cache_sentinel") ? (te = { label: uc.headerLabel }, n[38] = te) : te = n[38];
|
|
7420
7489
|
let U;
|
|
7421
7490
|
n[39] !== j || n[40] !== s || n[41] !== o.exportPickerSelectAll || n[42] !== M || n[43] !== H ? (U = /* @__PURE__ */ J(p, {
|
|
7422
7491
|
size: s,
|
|
@@ -7438,7 +7507,7 @@ function mc(t) {
|
|
|
7438
7507
|
}), n[49] = W, n[50] = ne);
|
|
7439
7508
|
let re;
|
|
7440
7509
|
n[51] !== U || n[52] !== ne ? (re = /* @__PURE__ */ Y("div", {
|
|
7441
|
-
className:
|
|
7510
|
+
className: uc.listHeader,
|
|
7442
7511
|
children: [U, ne]
|
|
7443
7512
|
}), n[51] = U, n[52] = ne, n[53] = re) : re = n[53];
|
|
7444
7513
|
let ie;
|
|
@@ -7447,19 +7516,19 @@ function mc(t) {
|
|
|
7447
7516
|
n[59] !== y || n[60] !== s || n[61] !== o.exportPickerHidden ? (e = (e) => /* @__PURE__ */ J(p, {
|
|
7448
7517
|
size: s,
|
|
7449
7518
|
label: /* @__PURE__ */ Y(fe, { children: [/* @__PURE__ */ J("span", {
|
|
7450
|
-
className:
|
|
7519
|
+
className: uc.rowText,
|
|
7451
7520
|
children: Vn(e)
|
|
7452
7521
|
}), !e.getIsVisible() && /* @__PURE__ */ J("span", {
|
|
7453
|
-
className:
|
|
7522
|
+
className: uc.rowHint,
|
|
7454
7523
|
children: o.exportPickerHidden
|
|
7455
7524
|
})] }),
|
|
7456
7525
|
checked: y.has(e.id),
|
|
7457
7526
|
onChange: (t) => P(e.id, t.currentTarget.checked),
|
|
7458
7527
|
classNames: {
|
|
7459
|
-
root:
|
|
7460
|
-
body:
|
|
7461
|
-
labelWrapper:
|
|
7462
|
-
label:
|
|
7528
|
+
root: uc.row,
|
|
7529
|
+
body: uc.rowBody,
|
|
7530
|
+
labelWrapper: uc.rowLabelWrapper,
|
|
7531
|
+
label: uc.rowLabel
|
|
7463
7532
|
},
|
|
7464
7533
|
"data-dg-part": "export-column",
|
|
7465
7534
|
"data-column-id": e.id
|
|
@@ -7469,7 +7538,7 @@ function mc(t) {
|
|
|
7469
7538
|
n[63] !== s || n[64] !== o || n[65] !== T.length || n[66] !== g ? (ae = T.length === 0 && /* @__PURE__ */ J(D, {
|
|
7470
7539
|
size: s,
|
|
7471
7540
|
c: "dimmed",
|
|
7472
|
-
className:
|
|
7541
|
+
className: uc.empty,
|
|
7473
7542
|
children: o.columnsNoMatch(g)
|
|
7474
7543
|
}), n[63] = s, n[64] = o, n[65] = T.length, n[66] = g, n[67] = ae) : ae = n[67];
|
|
7475
7544
|
let oe;
|
|
@@ -7477,13 +7546,13 @@ function mc(t) {
|
|
|
7477
7546
|
mah: "50vh",
|
|
7478
7547
|
type: "auto",
|
|
7479
7548
|
children: /* @__PURE__ */ Y("div", {
|
|
7480
|
-
className:
|
|
7549
|
+
className: uc.rows,
|
|
7481
7550
|
children: [ie, ae]
|
|
7482
7551
|
})
|
|
7483
7552
|
}), n[68] = ie, n[69] = ae, n[70] = oe) : oe = n[70];
|
|
7484
7553
|
let se;
|
|
7485
7554
|
n[71] !== re || n[72] !== oe ? (se = /* @__PURE__ */ Y("div", {
|
|
7486
|
-
className:
|
|
7555
|
+
className: uc.list,
|
|
7487
7556
|
children: [re, oe]
|
|
7488
7557
|
}), n[71] = re, n[72] = oe, n[73] = se) : se = n[73];
|
|
7489
7558
|
let G;
|
|
@@ -7524,24 +7593,24 @@ function mc(t) {
|
|
|
7524
7593
|
]
|
|
7525
7594
|
}), n[90] = B, n[91] = V, n[92] = se, n[93] = q, n[94] = pe) : pe = n[94], pe;
|
|
7526
7595
|
}
|
|
7527
|
-
function hc(e) {
|
|
7528
|
-
return e.id;
|
|
7529
|
-
}
|
|
7530
7596
|
function gc(e) {
|
|
7531
7597
|
return e.id;
|
|
7532
7598
|
}
|
|
7533
7599
|
function _c(e) {
|
|
7600
|
+
return e.id;
|
|
7601
|
+
}
|
|
7602
|
+
function vc(e) {
|
|
7534
7603
|
return e.getIsVisible();
|
|
7535
7604
|
}
|
|
7536
7605
|
//#endregion
|
|
7537
7606
|
//#region src/core/sizes.ts
|
|
7538
|
-
var
|
|
7607
|
+
var yc = "md", bc = {
|
|
7539
7608
|
xs: 34,
|
|
7540
7609
|
sm: 42,
|
|
7541
7610
|
md: 52,
|
|
7542
7611
|
lg: 62,
|
|
7543
7612
|
xl: 72
|
|
7544
|
-
},
|
|
7613
|
+
}, xc = {
|
|
7545
7614
|
xs: "xs",
|
|
7546
7615
|
sm: "xs",
|
|
7547
7616
|
md: "sm",
|
|
@@ -7550,8 +7619,8 @@ var vc = "md", yc = {
|
|
|
7550
7619
|
};
|
|
7551
7620
|
//#endregion
|
|
7552
7621
|
//#region src/components/TMDataGrid.tsx
|
|
7553
|
-
function
|
|
7554
|
-
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 ??
|
|
7622
|
+
function Sc(t) {
|
|
7623
|
+
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 ?? bc[S], w = xc[S], T;
|
|
7555
7624
|
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 = {
|
|
7556
7625
|
table: r,
|
|
7557
7626
|
ui: i,
|
|
@@ -7583,23 +7652,23 @@ function xc(t) {
|
|
|
7583
7652
|
children: _
|
|
7584
7653
|
}), n[19] = _, n[20] = b, n[21] = S, n[22] = y, n[23] = O, n[24] = x, n[25] = k) : k = n[25];
|
|
7585
7654
|
let A;
|
|
7586
|
-
n[26] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ J(
|
|
7655
|
+
n[26] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ J(dc, {}), n[26] = A) : A = n[26];
|
|
7587
7656
|
let j;
|
|
7588
7657
|
return n[27] !== E || n[28] !== k ? (j = /* @__PURE__ */ Y(nt, {
|
|
7589
7658
|
value: E,
|
|
7590
7659
|
children: [k, A]
|
|
7591
7660
|
}), n[27] = E, n[28] = k, n[29] = j) : j = n[29], j;
|
|
7592
7661
|
}
|
|
7593
|
-
var
|
|
7594
|
-
Toolbar:
|
|
7595
|
-
Spacer:
|
|
7596
|
-
SummaryCount:
|
|
7597
|
-
LoadingIndicator:
|
|
7662
|
+
var Cc = Object.assign(Sc, {
|
|
7663
|
+
Toolbar: tc,
|
|
7664
|
+
Spacer: nc,
|
|
7665
|
+
SummaryCount: ic,
|
|
7666
|
+
LoadingIndicator: rc,
|
|
7598
7667
|
Search: uo,
|
|
7599
7668
|
DraftActions: mr,
|
|
7600
7669
|
Menu: lo,
|
|
7601
|
-
FilterButton:
|
|
7602
|
-
Table:
|
|
7670
|
+
FilterButton: ac,
|
|
7671
|
+
Table: $s,
|
|
7603
7672
|
Footer: Za,
|
|
7604
7673
|
FilterPanel: Er,
|
|
7605
7674
|
FilterPills: La,
|
|
@@ -7607,7 +7676,7 @@ var Sc = Object.assign(xc, {
|
|
|
7607
7676
|
});
|
|
7608
7677
|
//#endregion
|
|
7609
7678
|
//#region src/components/filters/DgRangeSliderFilter.tsx
|
|
7610
|
-
function
|
|
7679
|
+
function wc(t) {
|
|
7611
7680
|
let n = e(26), { column: r, operator: i, value: a, onChange: o, size: s, labels: c } = t;
|
|
7612
7681
|
if (!xt(i)) {
|
|
7613
7682
|
let e;
|
|
@@ -7657,7 +7726,7 @@ function Cc(t) {
|
|
|
7657
7726
|
}
|
|
7658
7727
|
//#endregion
|
|
7659
7728
|
//#region src/components/filters/DgDateRangeFilter.tsx
|
|
7660
|
-
function
|
|
7729
|
+
function Tc(t) {
|
|
7661
7730
|
let n = e(32), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
7662
7731
|
if (!xt(r)) {
|
|
7663
7732
|
let e;
|
|
@@ -7710,7 +7779,7 @@ function wc(t) {
|
|
|
7710
7779
|
}
|
|
7711
7780
|
//#endregion
|
|
7712
7781
|
//#region src/components/filters/DgAutocompleteFilter.tsx
|
|
7713
|
-
function
|
|
7782
|
+
function Ec(t) {
|
|
7714
7783
|
let n = e(21), { column: r, table: i, operator: a, value: o, onChange: s, options: c, size: l, labels: d } = t;
|
|
7715
7784
|
if (bt(a) || xt(a)) {
|
|
7716
7785
|
let e;
|
|
@@ -7730,7 +7799,7 @@ function Tc(t) {
|
|
|
7730
7799
|
width: 180
|
|
7731
7800
|
}), n[8] = t, n[9] = d.filterValue, n[10] = g) : g = n[10];
|
|
7732
7801
|
let _ = !p, v = p && t.layout !== "header" ? d.filterValuePlaceholder : "", y;
|
|
7733
|
-
n[11] === h ? y = n[12] : (y = h.map(
|
|
7802
|
+
n[11] === h ? y = n[12] : (y = h.map(Dc), n[11] = h, n[12] = y);
|
|
7734
7803
|
let b = p && typeof o == "string" ? o : "", x;
|
|
7735
7804
|
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, {
|
|
7736
7805
|
...g,
|
|
@@ -7743,12 +7812,12 @@ function Tc(t) {
|
|
|
7743
7812
|
onChange: s
|
|
7744
7813
|
}), 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;
|
|
7745
7814
|
}
|
|
7746
|
-
function
|
|
7815
|
+
function Dc(e) {
|
|
7747
7816
|
return e.value;
|
|
7748
7817
|
}
|
|
7749
7818
|
//#endregion
|
|
7750
7819
|
//#region src/components/filters/DgTriStateFilter.tsx
|
|
7751
|
-
function
|
|
7820
|
+
function Oc(t) {
|
|
7752
7821
|
let n = e(29), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
7753
7822
|
if (bt(r) || xt(r)) {
|
|
7754
7823
|
let e;
|
|
@@ -7798,7 +7867,7 @@ function Dc(t) {
|
|
|
7798
7867
|
}
|
|
7799
7868
|
//#endregion
|
|
7800
7869
|
//#region src/core/labelsSv.ts
|
|
7801
|
-
var
|
|
7870
|
+
var kc = {
|
|
7802
7871
|
operators: {
|
|
7803
7872
|
contains: "innehåller",
|
|
7804
7873
|
equals: "är lika med",
|
|
@@ -7922,7 +7991,7 @@ var Oc = {
|
|
|
7922
7991
|
};
|
|
7923
7992
|
//#endregion
|
|
7924
7993
|
//#region src/core/summary.ts
|
|
7925
|
-
function
|
|
7994
|
+
function Ac({ table: e, columnId: t, fn: n = "sum" }) {
|
|
7926
7995
|
let r = e, i = r.getColumn(t);
|
|
7927
7996
|
if (!i) return;
|
|
7928
7997
|
let a = {
|
|
@@ -7937,13 +8006,13 @@ function kc({ table: e, columnId: t, fn: n = "sum" }) {
|
|
|
7937
8006
|
}
|
|
7938
8007
|
//#endregion
|
|
7939
8008
|
//#region src/core/urlState.ts
|
|
7940
|
-
function
|
|
8009
|
+
function jc(e) {
|
|
7941
8010
|
let { key: t, columns: n } = e, r = e.slices ?? Yr, i = e.slices ? [t, e.slices] : t, a = /* @__PURE__ */ new Map();
|
|
7942
8011
|
Ti(n, (e, t) => {
|
|
7943
8012
|
let n = t.meta?.type;
|
|
7944
8013
|
a.set(e, n ?? "string");
|
|
7945
8014
|
});
|
|
7946
|
-
let o = (e) =>
|
|
8015
|
+
let o = (e) => Mc(e, a, r);
|
|
7947
8016
|
return {
|
|
7948
8017
|
key: t,
|
|
7949
8018
|
slices: r,
|
|
@@ -7956,20 +8025,20 @@ function Ac(e) {
|
|
|
7956
8025
|
},
|
|
7957
8026
|
validateSearch: (e) => {
|
|
7958
8027
|
let n = e[t];
|
|
7959
|
-
return
|
|
8028
|
+
return Lc(n) ? { [t]: n } : {};
|
|
7960
8029
|
},
|
|
7961
8030
|
persist: (e) => e ? {
|
|
7962
8031
|
urlKey: i,
|
|
7963
|
-
urlStorage:
|
|
8032
|
+
urlStorage: Ic(e)
|
|
7964
8033
|
} : { urlKey: i }
|
|
7965
8034
|
};
|
|
7966
8035
|
}
|
|
7967
|
-
function
|
|
8036
|
+
function Mc(e, t, n) {
|
|
7968
8037
|
let r = {};
|
|
7969
8038
|
if (e.filters && n.includes("columnFilters")) {
|
|
7970
8039
|
let n = Object.entries(e.filters).flatMap(([e, n]) => n ? [{
|
|
7971
8040
|
id: e,
|
|
7972
|
-
value:
|
|
8041
|
+
value: Nc(n, t.get(e))
|
|
7973
8042
|
}] : []);
|
|
7974
8043
|
n.length > 0 && (r.columnFilters = n);
|
|
7975
8044
|
}
|
|
@@ -7981,7 +8050,7 @@ function jc(e, t, n) {
|
|
|
7981
8050
|
pageSize: e.pagination.pageSize
|
|
7982
8051
|
}), Object.keys(r).length === 0 ? void 0 : r;
|
|
7983
8052
|
}
|
|
7984
|
-
function
|
|
8053
|
+
function Nc(e, t) {
|
|
7985
8054
|
let { operator: n, value: r } = e;
|
|
7986
8055
|
if (n === "isEmpty" || n === "isNotEmpty") return {
|
|
7987
8056
|
operator: n,
|
|
@@ -7995,22 +8064,22 @@ function Mc(e, t) {
|
|
|
7995
8064
|
let [e, i] = r;
|
|
7996
8065
|
return {
|
|
7997
8066
|
operator: n,
|
|
7998
|
-
value: [
|
|
8067
|
+
value: [Pc(e, t), Pc(i, t)]
|
|
7999
8068
|
};
|
|
8000
8069
|
}
|
|
8001
8070
|
return {
|
|
8002
8071
|
operator: n,
|
|
8003
|
-
value:
|
|
8072
|
+
value: Pc(r, t)
|
|
8004
8073
|
};
|
|
8005
8074
|
}
|
|
8006
|
-
function
|
|
8007
|
-
return e == null ? "" : e instanceof Date ?
|
|
8075
|
+
function Pc(e, t) {
|
|
8076
|
+
return e == null ? "" : e instanceof Date ? Fc(e) : t === "date" && typeof e == "string" ? e.slice(0, 10) : String(e);
|
|
8008
8077
|
}
|
|
8009
|
-
function
|
|
8078
|
+
function Fc(e) {
|
|
8010
8079
|
let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
8011
8080
|
return `${e.getFullYear()}-${t}-${n}`;
|
|
8012
8081
|
}
|
|
8013
|
-
function
|
|
8082
|
+
function Ic(e) {
|
|
8014
8083
|
return {
|
|
8015
8084
|
get: (t) => {
|
|
8016
8085
|
let n = e.get(t);
|
|
@@ -8021,10 +8090,10 @@ function Fc(e) {
|
|
|
8021
8090
|
}
|
|
8022
8091
|
};
|
|
8023
8092
|
}
|
|
8024
|
-
function
|
|
8093
|
+
function Lc(e) {
|
|
8025
8094
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
8026
8095
|
}
|
|
8027
8096
|
//#endregion
|
|
8028
|
-
export { Yr as DATA_STATE_SLICES, oa as DEFAULT_EXPORT_OPTIONS,
|
|
8097
|
+
export { Yr as DATA_STATE_SLICES, oa as DEFAULT_EXPORT_OPTIONS, yc as DEFAULT_TMDATAGRID_SIZE, zt as DETAILS_COLUMN_ID, Ec as DgAutocompleteFilter, Tc as DgDateRangeFilter, wc as DgRangeSliderFilter, Oc as DgTriStateFilter, on as EDIT_COLUMN_ID, ot as FILTER_OPERATOR_LABELS, vn as GROUP_COLUMN_ID, Zr as PERSIST_PAYLOAD_VERSION, Cn as ROW_NUMBER_COLUMN_ID, In as SELECT_COLUMN_ID, Xr as SETTINGS_STATE_SLICES, xc as SIZE_CONTROL_SIZE, bc as SIZE_ROW_HEIGHT, Br as TMDATAGRID_LABELS_EN, kc as TMDATAGRID_LABELS_SV, Cc as TMDataGrid, us as TMDataGridBooleanEditor, ds as TMDataGridDateEditor, mr as TMDataGridDraftActions, La as TMDataGridFilterPills, yr as TMDataGridFilterValueInput, fs as TMDataGridMultiSelectEditor, ps as TMDataGridNumberEditor, uo as TMDataGridSearch, ms as TMDataGridSelectEditor, hs as TMDataGridStringEditor, Dt as activeColumnFilters, Ac as aggregateColumn, Lt as areAllRowsExpanded, Fo as autosizeColumn, ha as buildExportData, Jt as clearedValueForType, pa as countSelectedExportRows, Da as createTMDataGridColumnHelper, jc as createTMDataGridUrlState, ta as csvExcelFormat, na as csvFormat, ba as downloadFile, St as emptyValueForOperator, _a as exportGrid, wt as filterValueShape, Ji as formatExportValue, Ot as formatFilterLabel, _n as formatGroupValue, Ir as fuzzyGlobalFilterFn, Ai as getColumnCapabilities, Wn as getColumnDefaultOperator, Vn as getColumnLabel, Un as getColumnOperators, Io as getColumnRegion, Hn as getColumnType, Mn as getDisplayedRows, qt as getEditFieldName, la as getExportableColumns, ji as getGridCapabilities, hn as getGroupDataRows, _t as getOperatorsForType, Pn as getSelectableRowIds, Ho as getStepTargetColumn, Wa as getTMDataGridPaginationApi, Xi as guardFormula, Gt as hasPendingEdits, Yn as isControlColumn, Tt as isFilterActive, Xn as isGeneratedColumn, Nn as isPagingActive, aa as jsonFormat, Bo as keepGeneratedColumnsOutermost, Mt as matchesFilter, Vr as mergeLabels, zo as moveColumn, Uo as moveColumnByStep, an as normalizeFieldValidate, Ia as openColumnFilter, yt as operatorNeedsValue, bt as operatorTakesArrayValue, xt as operatorTakesRangeValue, mn as optionsToComboboxData, ki as readFeatureFlags, pn as resolveColumnOptions, Rt as resolveExpandAll, sa as resolveExportOptions, Ps as resolveRangeBounds, Fn as resolveRowSelectionClick, Nt as tmDataGridFilterFn, va as toClipboardText, ra as tsvFormat, Pa as useTMDataGrid, $ as useTMDataGridContext, Qa as useTMDataGridExport, ya as writeClipboardText, ga as writeExportFile };
|
|
8029
8098
|
|
|
8030
8099
|
//# sourceMappingURL=index.js.map
|