@taocompany/magic-grid 0.13.5 → 0.13.7
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/README.md +4288 -4288
- package/dist/components/MagicGrid/MagicGrid.vue.d.ts.map +1 -1
- package/dist/components/MagicGrid/useMagicGrid.d.ts.map +1 -1
- package/dist/core/cellComment/cellCommentIndicatorGeometry.d.ts +2 -2
- package/dist/core/cellComment/cellCommentIndicatorGeometry.d.ts.map +1 -1
- package/dist/core/cellComment/cellCommentInteractionSession.d.ts +2 -2
- package/dist/core/cellComment/cellCommentInteractionSession.d.ts.map +1 -1
- package/dist/core/cellComment/cellCommentPopup.d.ts +1 -2
- package/dist/core/cellComment/cellCommentPopup.d.ts.map +1 -1
- package/dist/core/editing/cellEditingService.d.ts.map +1 -1
- package/dist/core/editing/rowEditingService.d.ts.map +1 -1
- package/dist/core/types/cellComment.d.ts +9 -3
- package/dist/core/types/cellComment.d.ts.map +1 -1
- package/dist/core/types/cellEditor.d.ts +3 -1
- package/dist/core/types/cellEditor.d.ts.map +1 -1
- package/dist/getRowDragCommitHierarchy-DoMf_SY8.cjs.map +1 -1
- package/dist/getRowDragCommitHierarchy-pWgukMAX.js.map +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +638 -628
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/token-catalog.json +2 -2
- package/dist/types/core.d.ts +3 -1
- package/dist/validation-BHqm5Flb.js.map +1 -1
- package/dist/validation-CD6lt5wS.cjs.map +1 -1
- package/package.json +105 -105
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, H as o, J as s, K as c, L as l, M as u, N as d, O as f, R as p, S as m, T as h, U as g, V as _, X as v, Y as y, Z as b, _ as x, a as S, at as C, b as w, c as T, d as ee, et as E, f as D, g as O, h as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Comment as we, Fragment as Te, Teleport as Ee, computed as N, createBlock as De, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createSlots as Oe, createStaticVNode as ke, createTextVNode as Ae, createVNode as je, defineComponent as
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, H as o, J as s, K as c, L as l, M as u, N as d, O as f, R as p, S as m, T as h, U as g, V as _, X as v, Y as y, Z as b, _ as x, a as S, at as C, b as w, c as T, d as ee, et as E, f as D, g as O, h as k, i as A, it as j, j as te, k as ne, l as re, m as M, nt as ie, o as ae, ot as oe, p as se, q as ce, r as le, rt as ue, s as de, t as fe, tt as pe, v as me, w as he, x as ge, y as _e, z as ve } from "./getRowDragCommitHierarchy-pWgukMAX.js";
|
|
2
|
+
import { c as ye, i as be, l as xe, s as Se, u as Ce } from "./validation-BHqm5Flb.js";
|
|
3
|
+
import { Comment as we, Fragment as Te, Teleport as Ee, computed as N, createBlock as De, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createSlots as Oe, createStaticVNode as ke, createTextVNode as Ae, createVNode as je, defineComponent as L, getCurrentInstance as Me, guardReactiveProps as Ne, h as Pe, mergeProps as Fe, nextTick as Ie, normalizeClass as R, normalizeProps as Le, normalizeStyle as Re, onBeforeUnmount as ze, onMounted as Be, onUnmounted as Ve, openBlock as z, ref as B, render as He, renderList as Ue, renderSlot as We, resolveDynamicComponent as Ge, shallowReadonly as Ke, shallowRef as qe, toDisplayString as Je, toValue as Ye, unref as V, useSlots as Xe, vShow as Ze, watch as H, withCtx as Qe, withDirectives as $e } from "vue";
|
|
4
4
|
//#region src/components/StatusBar/StatusBarDefaultPanels.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var et = { class: "mg-status-bar__panels" }, tt = /* @__PURE__ */ L({
|
|
6
6
|
__name: "StatusBarDefaultPanels",
|
|
7
7
|
props: { context: {} },
|
|
8
8
|
setup(e) {
|
|
@@ -10,98 +10,98 @@ var tt = { class: "mg-status-bar__panels" }, nt = /* @__PURE__ */ Me({
|
|
|
10
10
|
let { context: e } = t, n = [];
|
|
11
11
|
return n.push(`共 ${e.totalRowCount} 行`), e.isFiltered && n.push(`显示 ${e.displayedRowCount} 行`), e.rowSelectionEnabled && e.selectedRowCount > 0 && n.push(`已选 ${e.selectedRowCount} 行`), n;
|
|
12
12
|
});
|
|
13
|
-
return (e, t) => (
|
|
13
|
+
return (e, t) => (z(), F("div", et, [(z(!0), F(Te, null, Ue(n.value, (e, t) => (z(), F("span", {
|
|
14
14
|
key: t,
|
|
15
15
|
class: "mg-status-bar__panel"
|
|
16
|
-
},
|
|
16
|
+
}, Je(e), 1))), 128))]));
|
|
17
17
|
}
|
|
18
|
-
}),
|
|
18
|
+
}), nt = 2;
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/components/StatusBar/resolveStatusBarRangeAggregationPrecision.ts
|
|
21
|
-
function
|
|
21
|
+
function rt(e) {
|
|
22
22
|
if (typeof e == "number") {
|
|
23
|
-
let t =
|
|
23
|
+
let t = it(e);
|
|
24
24
|
return {
|
|
25
25
|
average: t,
|
|
26
26
|
sum: t
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
return {
|
|
30
|
-
average:
|
|
31
|
-
sum:
|
|
30
|
+
average: it(e?.average ?? 2),
|
|
31
|
+
sum: it(e?.sum ?? 2)
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function it(e) {
|
|
35
35
|
return Number.isFinite(e) ? Math.max(0, Math.min(10, Math.trunc(e))) : 2;
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/components/StatusBar/formatAggregationDisplayValue.ts
|
|
39
|
-
function
|
|
39
|
+
function at(e, t, n = 2) {
|
|
40
40
|
if (t === "count") return String(Math.trunc(e));
|
|
41
|
-
let r =
|
|
41
|
+
let r = it(n), i = 10 ** r, a = Math.round(e * i) / i;
|
|
42
42
|
return r === 0 ? String(Math.round(a)) : a.toFixed(r).replace(/\.?0+$/, "");
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region src/components/StatusBar/hasStatusBarAggregationContent.ts
|
|
46
|
-
function
|
|
46
|
+
function ot(e) {
|
|
47
47
|
return e != null && e.count > 0;
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/components/StatusBar/StatusBarRangeAggregationPanels.vue?vue&type=script&setup=true&lang.ts
|
|
51
|
-
var
|
|
51
|
+
var st = {
|
|
52
52
|
key: 0,
|
|
53
53
|
class: "mg-status-bar__panels mg-status-bar__panels--aggregation"
|
|
54
|
-
},
|
|
54
|
+
}, ct = /* @__PURE__ */ L({
|
|
55
55
|
__name: "StatusBarRangeAggregationPanels",
|
|
56
56
|
props: { context: {} },
|
|
57
57
|
setup(e) {
|
|
58
|
-
let t = e, n = N(() =>
|
|
58
|
+
let t = e, n = N(() => ot(t.context.cellSelectionAggregation)), r = N(() => {
|
|
59
59
|
let e = t.context.cellSelectionAggregation;
|
|
60
|
-
if (!
|
|
60
|
+
if (!ot(e)) return [];
|
|
61
61
|
let n = t.context.statusBarRangeAggregationPrecision, r = [];
|
|
62
62
|
return e.average != null && r.push({
|
|
63
63
|
label: "平均值",
|
|
64
|
-
value:
|
|
64
|
+
value: at(e.average, "average", n.average)
|
|
65
65
|
}), r.push({
|
|
66
66
|
label: "计数",
|
|
67
|
-
value:
|
|
67
|
+
value: at(e.count, "count")
|
|
68
68
|
}), e.sum != null && r.push({
|
|
69
69
|
label: "求和",
|
|
70
|
-
value:
|
|
70
|
+
value: at(e.sum, "sum", n.sum)
|
|
71
71
|
}), r;
|
|
72
72
|
});
|
|
73
|
-
return (e, t) => n.value && r.value.length ? (
|
|
73
|
+
return (e, t) => n.value && r.value.length ? (z(), F("div", st, [(z(!0), F(Te, null, Ue(r.value, (e, t) => (z(), F("span", {
|
|
74
74
|
key: t,
|
|
75
75
|
class: "mg-status-bar__panel"
|
|
76
|
-
},
|
|
76
|
+
}, Je(e.label) + ": " + Je(e.value), 1))), 128))])) : P("", !0);
|
|
77
77
|
}
|
|
78
|
-
}),
|
|
78
|
+
}), lt = {
|
|
79
79
|
key: 0,
|
|
80
80
|
class: "mg-status-bar__region mg-status-bar__region--left"
|
|
81
|
-
},
|
|
81
|
+
}, ut = {
|
|
82
82
|
key: 1,
|
|
83
83
|
class: "mg-status-bar__separator",
|
|
84
84
|
role: "separator",
|
|
85
85
|
"aria-orientation": "vertical"
|
|
86
|
-
},
|
|
86
|
+
}, dt = {
|
|
87
87
|
key: 3,
|
|
88
88
|
class: "mg-status-bar__separator",
|
|
89
89
|
role: "separator",
|
|
90
90
|
"aria-orientation": "vertical"
|
|
91
|
-
},
|
|
91
|
+
}, ft = {
|
|
92
92
|
key: 4,
|
|
93
93
|
class: "mg-status-bar__separator",
|
|
94
94
|
role: "separator",
|
|
95
95
|
"aria-orientation": "vertical"
|
|
96
|
-
},
|
|
96
|
+
}, pt = {
|
|
97
97
|
key: 6,
|
|
98
98
|
class: "mg-status-bar__separator",
|
|
99
99
|
role: "separator",
|
|
100
100
|
"aria-orientation": "vertical"
|
|
101
|
-
},
|
|
101
|
+
}, mt = {
|
|
102
102
|
key: 7,
|
|
103
103
|
class: "mg-status-bar__region mg-status-bar__region--right"
|
|
104
|
-
},
|
|
104
|
+
}, ht = /* @__PURE__ */ L({
|
|
105
105
|
__name: "MagicGridStatusBar",
|
|
106
106
|
props: {
|
|
107
107
|
context: {},
|
|
@@ -114,43 +114,43 @@ var ct = {
|
|
|
114
114
|
hasRightSlot: { type: Boolean }
|
|
115
115
|
},
|
|
116
116
|
setup(e, { expose: t }) {
|
|
117
|
-
let n = e, r =
|
|
117
|
+
let n = e, r = B();
|
|
118
118
|
t({ get statusBarEl() {
|
|
119
119
|
return r.value;
|
|
120
120
|
} });
|
|
121
|
-
let i = N(() => n.showDefaultPanels || n.hasLeftSlot), a = N(() => n.hasRightSlot), o = N(() => n.showStatusBarRangeAggregation ?
|
|
122
|
-
return (t, n) => (
|
|
121
|
+
let i = N(() => n.showDefaultPanels || n.hasLeftSlot), a = N(() => n.hasRightSlot), o = N(() => n.showStatusBarRangeAggregation ? ot(n.context.cellSelectionAggregation) : !1), s = N(() => n.statusBarRangeAggregationPosition === "left" && o.value), c = N(() => n.statusBarRangeAggregationPosition === "right" && o.value), l = N(() => i.value), u = N(() => s.value), d = N(() => c.value || a.value), f = N(() => c.value && a.value);
|
|
122
|
+
return (t, n) => (z(), F("div", {
|
|
123
123
|
ref_key: "statusBarEl",
|
|
124
124
|
ref: r,
|
|
125
125
|
class: "mg-status-bar",
|
|
126
|
-
style:
|
|
126
|
+
style: Re(e.barStyle),
|
|
127
127
|
role: "status",
|
|
128
128
|
"aria-live": "polite"
|
|
129
|
-
}, [e.hasCustomStatusBarSlot ?
|
|
130
|
-
i.value ? (
|
|
129
|
+
}, [e.hasCustomStatusBarSlot ? We(t.$slots, "status-bar", Le(Ne(e.context)), void 0, void 0, 0) : (z(), F(Te, { key: 1 }, [
|
|
130
|
+
i.value ? (z(), F("div", lt, [e.showDefaultPanels ? (z(), De(tt, {
|
|
131
131
|
key: 0,
|
|
132
132
|
context: e.context
|
|
133
|
-
}, null, 8, ["context"])) : P("", !0),
|
|
134
|
-
l.value ? (
|
|
135
|
-
s.value ? (
|
|
133
|
+
}, null, 8, ["context"])) : P("", !0), We(t.$slots, "status-bar-left", Le(Ne(e.context)))])) : P("", !0),
|
|
134
|
+
l.value ? (z(), F("div", ut)) : P("", !0),
|
|
135
|
+
s.value ? (z(), De(ct, {
|
|
136
136
|
key: 2,
|
|
137
137
|
context: e.context
|
|
138
138
|
}, null, 8, ["context"])) : P("", !0),
|
|
139
|
-
u.value ? (
|
|
139
|
+
u.value ? (z(), F("div", dt)) : P("", !0),
|
|
140
140
|
n[0] ||= I("div", {
|
|
141
141
|
class: "mg-status-bar__stretch",
|
|
142
142
|
"aria-hidden": "true"
|
|
143
143
|
}, null, -1),
|
|
144
|
-
d.value ? (
|
|
145
|
-
c.value ? (
|
|
144
|
+
d.value ? (z(), F("div", ft)) : P("", !0),
|
|
145
|
+
c.value ? (z(), De(ct, {
|
|
146
146
|
key: 5,
|
|
147
147
|
context: e.context
|
|
148
148
|
}, null, 8, ["context"])) : P("", !0),
|
|
149
|
-
f.value ? (
|
|
150
|
-
a.value ? (
|
|
149
|
+
f.value ? (z(), F("div", pt)) : P("", !0),
|
|
150
|
+
a.value ? (z(), F("div", mt, [We(t.$slots, "status-bar-right", Le(Ne(e.context)))])) : P("", !0)
|
|
151
151
|
], 64))], 4));
|
|
152
152
|
}
|
|
153
|
-
}),
|
|
153
|
+
}), gt = {
|
|
154
154
|
columns: {
|
|
155
155
|
type: Array,
|
|
156
156
|
required: !0
|
|
@@ -819,14 +819,14 @@ var ct = {
|
|
|
819
819
|
type: Object,
|
|
820
820
|
default: void 0
|
|
821
821
|
}
|
|
822
|
-
},
|
|
823
|
-
function
|
|
822
|
+
}, _t = "__expand__", vt = "__detail", yt = "mg-cell__row-expand", bt = "mg-cell__row-expand--expanded", xt = "mg-full-width-rows-container", St = "mg-full-width-row", Ct = "mg-full-width-row__content", wt = "mg-full-width-row--last";
|
|
823
|
+
function Tt(e) {
|
|
824
824
|
return !0;
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function Et(e = {}) {
|
|
827
827
|
return {
|
|
828
828
|
masterDetail: e.masterDetail ?? !1,
|
|
829
|
-
isRowMaster: e.isRowMaster ??
|
|
829
|
+
isRowMaster: e.isRowMaster ?? Tt,
|
|
830
830
|
masterDefaultExpanded: e.masterDefaultExpanded ?? 0,
|
|
831
831
|
detailRowHeight: e.detailRowHeight ?? 200,
|
|
832
832
|
detailRowAutoHeight: e.detailRowAutoHeight ?? !1,
|
|
@@ -836,45 +836,45 @@ function Dt(e = {}) {
|
|
|
836
836
|
detailCellRenderer: e.detailCellRenderer
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
return e ===
|
|
839
|
+
function U(e) {
|
|
840
|
+
return e === _t;
|
|
841
|
+
}
|
|
842
|
+
function Dt(e) {
|
|
843
|
+
return U(e.colId) || e.rowExpand;
|
|
841
844
|
}
|
|
842
|
-
function Ot(e) {
|
|
843
|
-
return
|
|
845
|
+
function Ot(e, t) {
|
|
846
|
+
return j(t) || v(t) || U(t) ? !1 : e ?? !1;
|
|
844
847
|
}
|
|
845
848
|
function kt(e, t) {
|
|
846
|
-
return
|
|
849
|
+
return Ot(e.rowExpand, t);
|
|
847
850
|
}
|
|
848
|
-
function At(e
|
|
849
|
-
return
|
|
851
|
+
function At(e) {
|
|
852
|
+
return e ?? "BUSINESS";
|
|
850
853
|
}
|
|
851
854
|
function jt(e) {
|
|
852
|
-
return e
|
|
855
|
+
return `${e}${vt}`;
|
|
853
856
|
}
|
|
854
857
|
function Mt(e) {
|
|
855
|
-
return
|
|
856
|
-
}
|
|
857
|
-
function Nt(e) {
|
|
858
|
-
return e.endsWith(yt);
|
|
858
|
+
return e.endsWith(vt);
|
|
859
859
|
}
|
|
860
|
-
function
|
|
861
|
-
return
|
|
860
|
+
function W(e) {
|
|
861
|
+
return At(e.rowKind) === "DETAIL" || Mt(e.id);
|
|
862
862
|
}
|
|
863
|
-
function
|
|
864
|
-
return
|
|
863
|
+
function Nt(e) {
|
|
864
|
+
return At(e.rowKind) === "BUSINESS" && !Mt(e.id);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Pt(e, t) {
|
|
867
867
|
let n = typeof e == "function" ? e(t) : e;
|
|
868
868
|
return !Number.isFinite(n) || n < 1 ? 200 : Math.floor(n);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function Ft(e, t) {
|
|
871
871
|
return {
|
|
872
872
|
rowId: e,
|
|
873
873
|
expanded: !0,
|
|
874
874
|
source: t
|
|
875
875
|
};
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function It(e, t) {
|
|
878
878
|
return {
|
|
879
879
|
rowId: e,
|
|
880
880
|
expanded: !1,
|
|
@@ -883,16 +883,16 @@ function Lt(e, t) {
|
|
|
883
883
|
}
|
|
884
884
|
//#endregion
|
|
885
885
|
//#region src/core/types/columnAvailability.ts
|
|
886
|
-
function
|
|
886
|
+
function Lt(e) {
|
|
887
887
|
return e.available !== !1;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
return e.filter(
|
|
889
|
+
function Rt(e) {
|
|
890
|
+
return e.filter(Lt);
|
|
891
891
|
}
|
|
892
892
|
//#endregion
|
|
893
893
|
//#region src/core/types/rowGrouping.ts
|
|
894
|
-
var
|
|
895
|
-
function
|
|
894
|
+
var zt = "__group__", Bt = "group::", Vt = "__header", Ht = "__footer", Ut = "(Blanks)", Wt = "mg-cell__group-expand", Gt = "mg-cell__group-expand--expanded", Kt = "mg-cell__group-indent-", qt = "mg-row--group-header", Jt = "mg-row--group-footer", Yt = "mg-cell--group-auto";
|
|
895
|
+
function Xt(e = {}) {
|
|
896
896
|
return {
|
|
897
897
|
rowGrouping: e.rowGrouping ?? !1,
|
|
898
898
|
groupDefaultExpanded: e.groupDefaultExpanded ?? -1,
|
|
@@ -908,48 +908,48 @@ function Zt(e = {}) {
|
|
|
908
908
|
groupCellRenderer: e.groupCellRenderer
|
|
909
909
|
};
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
return e ===
|
|
911
|
+
function G(e) {
|
|
912
|
+
return e === zt;
|
|
913
|
+
}
|
|
914
|
+
function Zt(e) {
|
|
915
|
+
return G(e.colId);
|
|
913
916
|
}
|
|
914
|
-
function Qt(e) {
|
|
915
|
-
return
|
|
917
|
+
function Qt(e, t) {
|
|
918
|
+
return j(t) || v(t) || U(t) || G(t) ? !1 : e ?? !1;
|
|
916
919
|
}
|
|
917
920
|
function $t(e, t) {
|
|
918
|
-
return
|
|
921
|
+
return Qt(e.rowGroup, t);
|
|
919
922
|
}
|
|
920
923
|
function en(e, t) {
|
|
921
|
-
|
|
924
|
+
if ($t(e, t)) return e.rowGroupIndex;
|
|
922
925
|
}
|
|
923
926
|
function tn(e, t) {
|
|
924
|
-
if (
|
|
927
|
+
if (!(j(t) || v(t) || U(t) || G(t))) return e.groupAgg;
|
|
925
928
|
}
|
|
926
929
|
function nn(e, t) {
|
|
927
|
-
|
|
930
|
+
return j(t) || v(t) || U(t) || G(t) ? !1 : e.showGroupHeaderCell ?? !1;
|
|
928
931
|
}
|
|
929
932
|
function rn(e, t) {
|
|
930
|
-
return
|
|
933
|
+
return j(t) || v(t) || U(t) || G(t) ? !1 : e.showGroupFooterCell ?? !1;
|
|
931
934
|
}
|
|
932
935
|
function an(e, t) {
|
|
933
|
-
|
|
936
|
+
if (!(j(t) || v(t) || U(t) || G(t))) return e.groupFooterLabel;
|
|
934
937
|
}
|
|
935
|
-
function on(e
|
|
936
|
-
|
|
938
|
+
function on(e) {
|
|
939
|
+
return Zt(e) || e.showGroupHeaderCell;
|
|
937
940
|
}
|
|
938
941
|
function sn(e) {
|
|
939
|
-
return
|
|
942
|
+
return Zt(e) || e.showGroupFooterCell;
|
|
940
943
|
}
|
|
941
|
-
function cn(e) {
|
|
942
|
-
return
|
|
944
|
+
function cn(e, t) {
|
|
945
|
+
return Sn(t) ? bn(t) ? on(e) : xn(t) ? sn(e) : !1 : !1;
|
|
943
946
|
}
|
|
944
|
-
function ln(e
|
|
945
|
-
|
|
946
|
-
}
|
|
947
|
-
function un(e) {
|
|
948
|
-
let t = zt(e).map((e, t) => {
|
|
947
|
+
function ln(e) {
|
|
948
|
+
let t = Rt(e).map((e, t) => {
|
|
949
949
|
let n = C(e, t);
|
|
950
950
|
return {
|
|
951
951
|
colId: n,
|
|
952
|
-
rowGroup:
|
|
952
|
+
rowGroup: $t(e, n),
|
|
953
953
|
rowGroupIndex: e.rowGroupIndex,
|
|
954
954
|
index: t
|
|
955
955
|
};
|
|
@@ -959,56 +959,56 @@ function un(e) {
|
|
|
959
959
|
return n === r ? e.index - t.index : n - r;
|
|
960
960
|
}), t.map((e) => e.colId);
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function un(e, t) {
|
|
963
963
|
return e && t;
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function dn(e, t) {
|
|
966
966
|
return e && t.length > 0;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
969
|
-
if (e == null || e === "") return
|
|
968
|
+
function fn(e) {
|
|
969
|
+
if (e == null || e === "") return Ut;
|
|
970
970
|
if (typeof e == "string") return e;
|
|
971
971
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return String(e);
|
|
972
|
-
if (e instanceof Date) return Number.isNaN(e.getTime()) ?
|
|
972
|
+
if (e instanceof Date) return Number.isNaN(e.getTime()) ? Ut : e.toISOString();
|
|
973
973
|
try {
|
|
974
974
|
return JSON.stringify(e);
|
|
975
975
|
} catch {
|
|
976
|
-
return
|
|
976
|
+
return Ut;
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
function
|
|
980
|
-
let i = `${
|
|
979
|
+
function pn(e, t, n, r) {
|
|
980
|
+
let i = `${Bt}L${e}::${encodeURIComponent(t)}::${encodeURIComponent(n)}`;
|
|
981
981
|
return r ? `${r}::${i}` : i;
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function mn(e) {
|
|
984
984
|
return e.join("/");
|
|
985
985
|
}
|
|
986
|
+
function hn(e) {
|
|
987
|
+
return `${e}${Vt}`;
|
|
988
|
+
}
|
|
986
989
|
function gn(e) {
|
|
987
990
|
return `${e}${Ht}`;
|
|
988
991
|
}
|
|
989
992
|
function _n(e) {
|
|
990
|
-
return
|
|
993
|
+
return e.endsWith(Vt);
|
|
991
994
|
}
|
|
992
995
|
function vn(e) {
|
|
993
996
|
return e.endsWith(Ht);
|
|
994
997
|
}
|
|
995
998
|
function yn(e) {
|
|
996
|
-
return e.
|
|
999
|
+
return _n(e) || vn(e) ? e.slice(0, -8) : null;
|
|
997
1000
|
}
|
|
998
1001
|
function bn(e) {
|
|
999
|
-
return
|
|
1002
|
+
return e.rowKind === "GROUP_HEADER" || _n(e.id);
|
|
1000
1003
|
}
|
|
1001
1004
|
function xn(e) {
|
|
1002
|
-
return e.rowKind === "
|
|
1005
|
+
return e.rowKind === "GROUP_FOOTER" || vn(e.id);
|
|
1003
1006
|
}
|
|
1004
1007
|
function Sn(e) {
|
|
1005
|
-
return e.
|
|
1008
|
+
return e.group === !0 || bn(e) || xn(e);
|
|
1006
1009
|
}
|
|
1007
1010
|
function Cn(e) {
|
|
1008
|
-
return e.
|
|
1009
|
-
}
|
|
1010
|
-
function G(e) {
|
|
1011
|
-
return Cn(e) ? !1 : e.rowKind === void 0 || e.rowKind === "BUSINESS";
|
|
1011
|
+
return Sn(e) ? !1 : e.rowKind === void 0 || e.rowKind === "BUSINESS";
|
|
1012
1012
|
}
|
|
1013
1013
|
function wn(e) {
|
|
1014
1014
|
return {
|
|
@@ -1066,7 +1066,7 @@ function K(e) {
|
|
|
1066
1066
|
function zn(e) {
|
|
1067
1067
|
e.forEach((e, t) => {
|
|
1068
1068
|
let n = C(e, t);
|
|
1069
|
-
(n === "__tree__" ||
|
|
1069
|
+
(n === "__tree__" || j(n) || v(n) || U(n) || G(n)) && console.warn(`[magic-grid] Column colId "${n}" is reserved for system columns and will be ignored.`);
|
|
1070
1070
|
});
|
|
1071
1071
|
}
|
|
1072
1072
|
function Bn(e, t, n, r, i) {
|
|
@@ -1102,7 +1102,7 @@ function Yn(e = {}) {
|
|
|
1102
1102
|
return { isRowDisabled: e.isRowDisabled };
|
|
1103
1103
|
}
|
|
1104
1104
|
function Xn(e) {
|
|
1105
|
-
return
|
|
1105
|
+
return j(e) || v(e) || U(e) || In(e) || G(e);
|
|
1106
1106
|
}
|
|
1107
1107
|
function Zn(e, t, n, r) {
|
|
1108
1108
|
return !((t ?? "BUSINESS") !== "BUSINESS" || r === "__mg_summary__" || !n || Xn(e));
|
|
@@ -1156,7 +1156,7 @@ function cr(e, t, n) {
|
|
|
1156
1156
|
});
|
|
1157
1157
|
}
|
|
1158
1158
|
function lr(e) {
|
|
1159
|
-
return
|
|
1159
|
+
return j(e) || U(e) || In(e) || G(e);
|
|
1160
1160
|
}
|
|
1161
1161
|
function ur(e, t, n, r) {
|
|
1162
1162
|
return (t ?? "BUSINESS") !== "BUSINESS" || r === "__mg_summary__" ? !1 : v(e) ? !0 : !(!n || lr(e));
|
|
@@ -1312,7 +1312,7 @@ function Hr(e) {
|
|
|
1312
1312
|
return e === Vr;
|
|
1313
1313
|
}
|
|
1314
1314
|
function Ur(e) {
|
|
1315
|
-
return
|
|
1315
|
+
return j(e.colId) || v(e.colId) || Dt({
|
|
1316
1316
|
colId: e.colId,
|
|
1317
1317
|
rowExpand: !1
|
|
1318
1318
|
});
|
|
@@ -1322,7 +1322,7 @@ function Wr(e, t) {
|
|
|
1322
1322
|
return n === void 0 || n === !1 ? !1 : n === !0 || n(t);
|
|
1323
1323
|
}
|
|
1324
1324
|
function q(e, t, n) {
|
|
1325
|
-
return !
|
|
1325
|
+
return !Cn(t) || Ur(e) || !e.prop || tr(e, t, n) ? !1 : Wr(e, t.data);
|
|
1326
1326
|
}
|
|
1327
1327
|
function Gr(e, t = "singleClick") {
|
|
1328
1328
|
return e.editType ?? t;
|
|
@@ -1380,7 +1380,7 @@ async function $r(e, t, n, r) {
|
|
|
1380
1380
|
});
|
|
1381
1381
|
return Ce(i), r;
|
|
1382
1382
|
} catch (e) {
|
|
1383
|
-
if (
|
|
1383
|
+
if (xe(e)) throw e;
|
|
1384
1384
|
return !1;
|
|
1385
1385
|
}
|
|
1386
1386
|
let a = e.prop;
|
|
@@ -1489,7 +1489,7 @@ function vi(e, t, n) {
|
|
|
1489
1489
|
//#region src/core/column/createExpandColumnDef.ts
|
|
1490
1490
|
function yi() {
|
|
1491
1491
|
return {
|
|
1492
|
-
key:
|
|
1492
|
+
key: _t,
|
|
1493
1493
|
label: "",
|
|
1494
1494
|
width: 40,
|
|
1495
1495
|
minWidth: 40,
|
|
@@ -1507,7 +1507,7 @@ function yi() {
|
|
|
1507
1507
|
//#region src/core/column/createGroupColumnDef.ts
|
|
1508
1508
|
function bi(e = {}) {
|
|
1509
1509
|
return {
|
|
1510
|
-
key:
|
|
1510
|
+
key: zt,
|
|
1511
1511
|
label: "分组",
|
|
1512
1512
|
width: 200,
|
|
1513
1513
|
minWidth: 120,
|
|
@@ -1543,7 +1543,7 @@ function xi(e = {}) {
|
|
|
1543
1543
|
//#region src/core/column/createIndexColumnDef.ts
|
|
1544
1544
|
function Si(e) {
|
|
1545
1545
|
return {
|
|
1546
|
-
key:
|
|
1546
|
+
key: pe,
|
|
1547
1547
|
label: e.label,
|
|
1548
1548
|
width: e.width,
|
|
1549
1549
|
minWidth: 40,
|
|
@@ -1592,7 +1592,7 @@ function wi(e, t, n = b(), r = {}) {
|
|
|
1592
1592
|
if (o && Rn(o.tree, o.showTreeColumn, o.getDataPath)) i.push(xi(o.autoTreeColumnDef ?? {}));
|
|
1593
1593
|
else {
|
|
1594
1594
|
let e = r.rowGrouping;
|
|
1595
|
-
e &&
|
|
1595
|
+
e && un(e.rowGrouping, e.showGroupColumn) && i.push(bi(e.autoGroupColumnDef ?? {}));
|
|
1596
1596
|
}
|
|
1597
1597
|
return [...i, ...e];
|
|
1598
1598
|
}
|
|
@@ -1828,7 +1828,7 @@ function ta(e, t) {
|
|
|
1828
1828
|
}
|
|
1829
1829
|
function na(e, t) {
|
|
1830
1830
|
let n = 0;
|
|
1831
|
-
for (let r of e)
|
|
1831
|
+
for (let r of e) Cn(r) && (r.data[t] = n, n += 1);
|
|
1832
1832
|
}
|
|
1833
1833
|
//#endregion
|
|
1834
1834
|
//#region src/core/pipeline/stages/groupStage.ts
|
|
@@ -1862,14 +1862,14 @@ function aa(e) {
|
|
|
1862
1862
|
function oa(e) {
|
|
1863
1863
|
let { rows: t, level: n, parentGroupId: r, parentPathIds: i, rowGroupColumns: a, getCellValue: o, groupKeyCreator: s, groupComparator: c, groupSortKey: l, getColumnField: u } = e;
|
|
1864
1864
|
if (t.length === 0) return [];
|
|
1865
|
-
if (n >= a.length) return la(t,
|
|
1865
|
+
if (n >= a.length) return la(t, mn(i)), l ? ta(t, l) : [...t];
|
|
1866
1866
|
let d = a[n], f = u?.(d) ?? d, p = sa(t, d, f, o, s), m = ia(c), h = {
|
|
1867
1867
|
colId: d,
|
|
1868
1868
|
field: f,
|
|
1869
1869
|
level: n
|
|
1870
1870
|
};
|
|
1871
1871
|
return [...p.keys()].sort((e, t) => m(e, t, h)).map((e) => {
|
|
1872
|
-
let t = p.get(e), m =
|
|
1872
|
+
let t = p.get(e), m = pn(n, f, e, r), h = [...i, m], g = oa({
|
|
1873
1873
|
rows: t,
|
|
1874
1874
|
level: n + 1,
|
|
1875
1875
|
parentGroupId: m,
|
|
@@ -1887,7 +1887,7 @@ function oa(e) {
|
|
|
1887
1887
|
key: e,
|
|
1888
1888
|
level: n,
|
|
1889
1889
|
groupId: m,
|
|
1890
|
-
groupPathKey:
|
|
1890
|
+
groupPathKey: mn(h),
|
|
1891
1891
|
children: g
|
|
1892
1892
|
});
|
|
1893
1893
|
});
|
|
@@ -1906,7 +1906,7 @@ function sa(e, t, n, r, i) {
|
|
|
1906
1906
|
}
|
|
1907
1907
|
function ca(e, t, n, r, i) {
|
|
1908
1908
|
let a = r(e, t);
|
|
1909
|
-
return
|
|
1909
|
+
return fn(i ? i({
|
|
1910
1910
|
field: n,
|
|
1911
1911
|
colId: t,
|
|
1912
1912
|
value: a,
|
|
@@ -2268,7 +2268,7 @@ function mo(e, t, n, r) {
|
|
|
2268
2268
|
//#region src/core/types/columnHandleMenu.ts
|
|
2269
2269
|
var ho = "mg-column-handle-menu", go = "mg-column-handle-menu-portal", _o = "mg-column-handle-menu__section", vo = "mg-column-handle-menu__item", yo = "mg-column-handle-menu__item-content", bo = "mg-column-handle-menu__item-label", xo = "mg-column-handle-menu__item--submenu-trigger", So = "mg-column-handle-menu__submenu", Co = "mg-column-handle-menu__submenu-panel", wo = "mg-column-handle-menu__divider", To = "mg-column-handle-menu__filter-panel", Eo = "mg-column-handle-menu__section--sort", Do = "mg-column-handle-menu__section--pin", Oo = "mg-column-handle-menu__section--filter", ko = "mg-column-handle-menu__section--visibility";
|
|
2270
2270
|
function Ao(e) {
|
|
2271
|
-
return !
|
|
2271
|
+
return !j(e) && !v(e);
|
|
2272
2272
|
}
|
|
2273
2273
|
function jo(e, t = "full") {
|
|
2274
2274
|
return Ao(e.colId) ? t === "filter-only" ? {
|
|
@@ -2308,7 +2308,7 @@ function Fo(e = {}) {
|
|
|
2308
2308
|
};
|
|
2309
2309
|
}
|
|
2310
2310
|
function Io(e, t, n) {
|
|
2311
|
-
return
|
|
2311
|
+
return j(n) || v(n) ? !1 : e ?? t;
|
|
2312
2312
|
}
|
|
2313
2313
|
//#endregion
|
|
2314
2314
|
//#region src/core/types/columnMove.ts
|
|
@@ -2335,7 +2335,7 @@ function Go(e = {}) {
|
|
|
2335
2335
|
};
|
|
2336
2336
|
}
|
|
2337
2337
|
function Ko(e, t, n) {
|
|
2338
|
-
return
|
|
2338
|
+
return j(n) || v(n) || U(n) || G(n) ? !1 : e ?? t;
|
|
2339
2339
|
}
|
|
2340
2340
|
//#endregion
|
|
2341
2341
|
//#region src/core/types/cellRenderer.ts
|
|
@@ -2383,7 +2383,7 @@ function ss(e = {}) {
|
|
|
2383
2383
|
return { rowDragManaged: e.rowDragManaged ?? !0 };
|
|
2384
2384
|
}
|
|
2385
2385
|
function cs(e, t) {
|
|
2386
|
-
return
|
|
2386
|
+
return j(t) || v(t) ? !1 : e ?? !1;
|
|
2387
2387
|
}
|
|
2388
2388
|
function ls(e, t) {
|
|
2389
2389
|
return cs(e.rowDrag, t);
|
|
@@ -2467,7 +2467,7 @@ function xs(e = {}, t) {
|
|
|
2467
2467
|
};
|
|
2468
2468
|
}
|
|
2469
2469
|
function Ss(e, t) {
|
|
2470
|
-
return
|
|
2470
|
+
return j(t) || v(t) ? !1 : e ?? !1;
|
|
2471
2471
|
}
|
|
2472
2472
|
function Cs(e, t) {
|
|
2473
2473
|
return Ss(e.autoHeight, t);
|
|
@@ -2496,19 +2496,19 @@ function Ms(e) {
|
|
|
2496
2496
|
return e.fixed === "left" || e.fixed === "right";
|
|
2497
2497
|
}
|
|
2498
2498
|
function Ns(e) {
|
|
2499
|
-
return
|
|
2499
|
+
return Cn(e);
|
|
2500
2500
|
}
|
|
2501
2501
|
function Ps(e) {
|
|
2502
2502
|
return !Number.isFinite(e) || e < 1 ? 1 : Math.floor(e);
|
|
2503
2503
|
}
|
|
2504
2504
|
function Fs(e, t) {
|
|
2505
|
-
if (!(
|
|
2505
|
+
if (!(j(t) || v(t))) return e;
|
|
2506
2506
|
}
|
|
2507
2507
|
function Is(e, t) {
|
|
2508
|
-
if (!(
|
|
2508
|
+
if (!(j(t) || v(t))) return e;
|
|
2509
2509
|
}
|
|
2510
2510
|
function Ls(e, t) {
|
|
2511
|
-
if (!(
|
|
2511
|
+
if (!(j(t) || v(t))) return e;
|
|
2512
2512
|
}
|
|
2513
2513
|
function Rs(e, t) {
|
|
2514
2514
|
return Fs(e.colSpan, t);
|
|
@@ -2628,7 +2628,7 @@ function gc(e) {
|
|
|
2628
2628
|
return e != null && typeof e.getComment == "function" && typeof e.setComment == "function";
|
|
2629
2629
|
}
|
|
2630
2630
|
function _c(e) {
|
|
2631
|
-
return
|
|
2631
|
+
return j(e) || v(e) || U(e) || In(e) || G(e);
|
|
2632
2632
|
}
|
|
2633
2633
|
function vc(e, t, n) {
|
|
2634
2634
|
return !(t !== "BUSINESS" || n != null && String(n) === "__mg_summary__" || _c(e));
|
|
@@ -2688,20 +2688,20 @@ function Tc(e, t) {
|
|
|
2688
2688
|
}
|
|
2689
2689
|
var Ec = "copy", Dc = "mg-cell--range-selected", Oc = "mg-cell--range-anchor", kc = "mg-cell-range-border", Ac = "mg-cell-range-border--edge-top", jc = "mg-cell-range-border--edge-right", Mc = "mg-cell-range-border--edge-bottom", Nc = "mg-cell-range-border--edge-left", Pc = "mg-cell-range-border--fill-h", Fc = "mg-cell-range-border--fill-v", Ic = "mg-cell-range-overlay", Lc = "mg-cell--range-copy-flash", Rc = "mg-cell-range-overlay--copy-flash", zc = "mg-cell--range-paste-flash", Bc = "mg-cell--range-paste-blocked-flash", Vc = "mg-cell-range-paste-overlay", Hc = "mg-cell-range-paste-overlay--applied", Uc = "mg-cell-range-paste-overlay--blocked", Wc = "mg-cell-range-paste-flash-layer", Gc = "mg-fill-handle", Kc = "mg-range-handle", qc = "mg-header-cell--range-highlight", Jc = "mg-cell--index-range-highlight";
|
|
2690
2690
|
function Yc(e) {
|
|
2691
|
-
return
|
|
2691
|
+
return j(e) || v(e) || U(e) || In(e) || G(e);
|
|
2692
2692
|
}
|
|
2693
2693
|
function Xc(e) {
|
|
2694
2694
|
return Yc(e);
|
|
2695
2695
|
}
|
|
2696
2696
|
function Zc(e) {
|
|
2697
|
-
let t =
|
|
2697
|
+
let t = At(e);
|
|
2698
2698
|
return t === "BUSINESS" || t === "GROUP_HEADER" || t === "GROUP_FOOTER";
|
|
2699
2699
|
}
|
|
2700
2700
|
function Qc(e) {
|
|
2701
|
-
return
|
|
2701
|
+
return At(e) === "BUSINESS";
|
|
2702
2702
|
}
|
|
2703
2703
|
function $c(e, t) {
|
|
2704
|
-
return
|
|
2704
|
+
return j(e) || v(e) || U(e) ? !1 : Zc(t);
|
|
2705
2705
|
}
|
|
2706
2706
|
function el(e, t) {
|
|
2707
2707
|
return !Xc(e) && Qc(t);
|
|
@@ -2895,7 +2895,7 @@ function vl(e, t) {
|
|
|
2895
2895
|
//#endregion
|
|
2896
2896
|
//#region src/core/types/columnVisibility.ts
|
|
2897
2897
|
function yl(e) {
|
|
2898
|
-
return
|
|
2898
|
+
return j(e) || v(e) || U(e) || In(e) || G(e);
|
|
2899
2899
|
}
|
|
2900
2900
|
function bl(e, t) {
|
|
2901
2901
|
return !yl(e) && t.hidden === !0;
|
|
@@ -2977,7 +2977,7 @@ var Zl = ".mg-cell__text:not([hidden])", Ql = ".mg-cell__renderer:not([hidden])"
|
|
|
2977
2977
|
eu
|
|
2978
2978
|
].join(", "), ru = "mg-tooltip";
|
|
2979
2979
|
function iu(e) {
|
|
2980
|
-
return
|
|
2980
|
+
return j(e) || v(e) || U(e) || In(e) || G(e);
|
|
2981
2981
|
}
|
|
2982
2982
|
function au(e, t) {
|
|
2983
2983
|
return iu(e) ? !0 : t.suppressTooltip === !0;
|
|
@@ -3239,12 +3239,12 @@ function Wu(e, t, n) {
|
|
|
3239
3239
|
}
|
|
3240
3240
|
}
|
|
3241
3241
|
function Gu(e) {
|
|
3242
|
-
return e.find((e) => !
|
|
3242
|
+
return e.find((e) => !j(e.colId) && !v(e.colId));
|
|
3243
3243
|
}
|
|
3244
3244
|
function Ku(e) {
|
|
3245
3245
|
let { columns: t, rows: n, summaryMethod: r } = e, i = /* @__PURE__ */ new Map(), a = Wu(t, n, r);
|
|
3246
3246
|
for (let e of t) {
|
|
3247
|
-
if (
|
|
3247
|
+
if (j(e.colId) || v(e.colId)) {
|
|
3248
3248
|
i.set(e.colId, Uu(e, null));
|
|
3249
3249
|
continue;
|
|
3250
3250
|
}
|
|
@@ -3276,7 +3276,7 @@ function Ju(e, t) {
|
|
|
3276
3276
|
function Yu(e, t) {
|
|
3277
3277
|
let n = {};
|
|
3278
3278
|
for (let r of e) {
|
|
3279
|
-
if (!r.groupAgg ||
|
|
3279
|
+
if (!r.groupAgg || j(r.colId) || v(r.colId) || U(r.colId) || G(r.colId)) continue;
|
|
3280
3280
|
let e = Bu(r.groupAgg, t, r);
|
|
3281
3281
|
n[r.colId] = {
|
|
3282
3282
|
value: e,
|
|
@@ -3290,7 +3290,7 @@ function Yu(e, t) {
|
|
|
3290
3290
|
function Xu(e, t = {}) {
|
|
3291
3291
|
let n = e.groupId ?? e.id, r = t.rowHeight ?? Bi;
|
|
3292
3292
|
return {
|
|
3293
|
-
id:
|
|
3293
|
+
id: hn(n),
|
|
3294
3294
|
data: {},
|
|
3295
3295
|
rowTop: 0,
|
|
3296
3296
|
rowHeight: r,
|
|
@@ -3310,7 +3310,7 @@ function Xu(e, t = {}) {
|
|
|
3310
3310
|
function Zu(e, t = {}) {
|
|
3311
3311
|
let n = e.groupId ?? e.id, r = t.rowHeight ?? Bi;
|
|
3312
3312
|
return {
|
|
3313
|
-
id:
|
|
3313
|
+
id: gn(n),
|
|
3314
3314
|
data: {},
|
|
3315
3315
|
rowTop: 0,
|
|
3316
3316
|
rowHeight: r,
|
|
@@ -3640,7 +3640,7 @@ function jd(e, n) {
|
|
|
3640
3640
|
let c = e[n], l = c[r];
|
|
3641
3641
|
if (t(l)) {
|
|
3642
3642
|
if (!a) throw new Ad(`Missing rowKey "${r}" at index ${n}`);
|
|
3643
|
-
let e =
|
|
3643
|
+
let e = ne();
|
|
3644
3644
|
if (o.has(e)) throw new Ad(`Duplicate transient row id "${e}" at index ${n}`);
|
|
3645
3645
|
o.add(e), s.push({
|
|
3646
3646
|
id: e,
|
|
@@ -4092,7 +4092,7 @@ function Xd(e, n, r) {
|
|
|
4092
4092
|
id: r.id,
|
|
4093
4093
|
isTransient: !0
|
|
4094
4094
|
} : {
|
|
4095
|
-
id:
|
|
4095
|
+
id: ne(),
|
|
4096
4096
|
isTransient: !0
|
|
4097
4097
|
} : {
|
|
4098
4098
|
id: String(i),
|
|
@@ -4352,7 +4352,7 @@ function sf(e, t) {
|
|
|
4352
4352
|
}
|
|
4353
4353
|
function cf(e, t) {
|
|
4354
4354
|
let { enableCellEditorCache: n, rowNode: r, column: i, rowKey: a } = t;
|
|
4355
|
-
if (
|
|
4355
|
+
if (re({
|
|
4356
4356
|
enableCellEditorCache: n,
|
|
4357
4357
|
colId: i.colId,
|
|
4358
4358
|
cellEditorMode: i.cellEditorMode,
|
|
@@ -4384,7 +4384,7 @@ var lf = class {
|
|
|
4384
4384
|
let a = T({
|
|
4385
4385
|
userKey: r,
|
|
4386
4386
|
columnCellEditorCache: i?.columnCellEditorCache
|
|
4387
|
-
}), o = S(e, t, a, { internalRowId: i?.internalRowId }), s =
|
|
4387
|
+
}), o = S(e, t, a, { internalRowId: i?.internalRowId }), s = le(e, t, { internalRowId: i?.internalRowId });
|
|
4388
4388
|
this.bucketKeys.has(s) || this.bucketKeys.set(s, /* @__PURE__ */ new Set()), this.bucketKeys.get(s).add(o), this.store.set(o, n), this.touchBucket(e, t, i?.internalRowId), this.evictIfNeeded();
|
|
4389
4389
|
}
|
|
4390
4390
|
clear(e, t, n, r) {
|
|
@@ -4393,7 +4393,7 @@ var lf = class {
|
|
|
4393
4393
|
return;
|
|
4394
4394
|
}
|
|
4395
4395
|
if (e != null && t == null) {
|
|
4396
|
-
let t =
|
|
4396
|
+
let t = A(e, r?.internalRowId);
|
|
4397
4397
|
for (let e of [...this.bucketKeys.keys()]) e.startsWith(`${t}::`) && this.clearCellByBucketKey(e);
|
|
4398
4398
|
return;
|
|
4399
4399
|
}
|
|
@@ -4409,7 +4409,7 @@ var lf = class {
|
|
|
4409
4409
|
this.deleteStorageKey(a);
|
|
4410
4410
|
}
|
|
4411
4411
|
clearCell(e, t, n) {
|
|
4412
|
-
let r =
|
|
4412
|
+
let r = le(e, t, { internalRowId: n }), i = this.bucketKeys.get(r);
|
|
4413
4413
|
if (i) {
|
|
4414
4414
|
for (let e of [...i]) this.store.delete(e);
|
|
4415
4415
|
this.bucketKeys.delete(r), this.removeBucketFromAccessOrder(r);
|
|
@@ -4420,20 +4420,20 @@ var lf = class {
|
|
|
4420
4420
|
}
|
|
4421
4421
|
removeByRowIds(e, t) {
|
|
4422
4422
|
let n = /* @__PURE__ */ new Set();
|
|
4423
|
-
for (let t of e) n.add(
|
|
4424
|
-
for (let e of t?.internalRowIds ?? []) n.add(
|
|
4423
|
+
for (let t of e) n.add(A(t));
|
|
4424
|
+
for (let e of t?.internalRowIds ?? []) n.add(A(null, e));
|
|
4425
4425
|
if (n.size !== 0) for (let e of [...this.bucketKeys.keys()]) {
|
|
4426
4426
|
let t = e.slice(0, e.indexOf("::"));
|
|
4427
4427
|
n.has(t) && this.clearCellByBucketKey(e);
|
|
4428
4428
|
}
|
|
4429
4429
|
}
|
|
4430
4430
|
promoteRowId(e, t) {
|
|
4431
|
-
let n =
|
|
4431
|
+
let n = A(null, e), r = String(t), i = `${n}::`, a = [];
|
|
4432
4432
|
for (let [e, t] of this.store) e.startsWith(i) && a.push([e, t]);
|
|
4433
4433
|
if (a.length !== 0) for (let [e, n] of a) {
|
|
4434
4434
|
let a = e.slice(i.length), o = `${r}::${a}`, s = a.slice(0, a.indexOf("::"));
|
|
4435
4435
|
this.store.delete(e), this.removeStorageKeyFromBucket(e);
|
|
4436
|
-
let c =
|
|
4436
|
+
let c = le(t, s);
|
|
4437
4437
|
this.bucketKeys.has(c) || this.bucketKeys.set(c, /* @__PURE__ */ new Set()), this.bucketKeys.get(c).add(o), this.store.set(o, n), this.touchBucket(t, s);
|
|
4438
4438
|
}
|
|
4439
4439
|
}
|
|
@@ -4460,7 +4460,7 @@ var lf = class {
|
|
|
4460
4460
|
}
|
|
4461
4461
|
}
|
|
4462
4462
|
touchBucket(e, t, n) {
|
|
4463
|
-
let r =
|
|
4463
|
+
let r = le(e, t, { internalRowId: n });
|
|
4464
4464
|
this.bucketKeys.has(r) && (this.removeBucketFromAccessOrder(r), this.bucketAccessOrder.push(r));
|
|
4465
4465
|
}
|
|
4466
4466
|
removeBucketFromAccessOrder(e) {
|
|
@@ -4477,7 +4477,7 @@ var lf = class {
|
|
|
4477
4477
|
function uf(e, t) {
|
|
4478
4478
|
let n = [], r = [];
|
|
4479
4479
|
for (let a of e) {
|
|
4480
|
-
if (
|
|
4480
|
+
if (te(a)) {
|
|
4481
4481
|
r.push(a);
|
|
4482
4482
|
continue;
|
|
4483
4483
|
}
|
|
@@ -4518,12 +4518,12 @@ function mf(e, t, n, r) {
|
|
|
4518
4518
|
//#endregion
|
|
4519
4519
|
//#region src/core/row/resolveDisplayRowById.ts
|
|
4520
4520
|
function hf(e, t) {
|
|
4521
|
-
let n =
|
|
4521
|
+
let n = M(e), r = t.resolveRowById(n);
|
|
4522
4522
|
if (r) return r;
|
|
4523
4523
|
for (let e of t.displayRows) {
|
|
4524
4524
|
if (e.isTransient) continue;
|
|
4525
4525
|
let r = e.data[t.rowKey];
|
|
4526
|
-
if (r != null &&
|
|
4526
|
+
if (r != null && M(r) === n) return e;
|
|
4527
4527
|
}
|
|
4528
4528
|
}
|
|
4529
4529
|
function gf(e, t) {
|
|
@@ -4553,25 +4553,25 @@ function yf(e, t, n) {
|
|
|
4553
4553
|
}
|
|
4554
4554
|
function bf(e, t, n) {
|
|
4555
4555
|
let r = 0;
|
|
4556
|
-
for (let i of n.displayRows) if (
|
|
4556
|
+
for (let i of n.displayRows) if (Cn(i) && n.sourceRows.find((e) => e.id === i.id)?.leafGroupPathKey === t) {
|
|
4557
4557
|
if (i.id === e) return r;
|
|
4558
4558
|
r += 1;
|
|
4559
4559
|
}
|
|
4560
4560
|
return null;
|
|
4561
4561
|
}
|
|
4562
4562
|
function xf(e, t, n) {
|
|
4563
|
-
let r =
|
|
4563
|
+
let r = M(e), i = t.findIndex((e) => e.id === r);
|
|
4564
4564
|
if (i >= 0) return i;
|
|
4565
4565
|
for (let e = 0; e < t.length; e += 1) {
|
|
4566
4566
|
let i = t[e];
|
|
4567
4567
|
if (i.isTransient) continue;
|
|
4568
4568
|
let a = i.data[n];
|
|
4569
|
-
if (a != null &&
|
|
4569
|
+
if (a != null && M(a) === r) return e;
|
|
4570
4570
|
}
|
|
4571
4571
|
return null;
|
|
4572
4572
|
}
|
|
4573
4573
|
function Sf(e, t) {
|
|
4574
|
-
let [n] =
|
|
4574
|
+
let [n] = me([e.id], {
|
|
4575
4575
|
rowKey: t.rowKey,
|
|
4576
4576
|
getRowById: t.resolveRowById
|
|
4577
4577
|
});
|
|
@@ -4694,7 +4694,7 @@ function Rf(e, t) {
|
|
|
4694
4694
|
let n = null;
|
|
4695
4695
|
for (let r of t) {
|
|
4696
4696
|
let t = e.find((e) => e.id === r);
|
|
4697
|
-
if (!t ||
|
|
4697
|
+
if (!t || Sn(t)) return "missing";
|
|
4698
4698
|
let i = t.leafGroupPathKey ?? null;
|
|
4699
4699
|
if (!i) return null;
|
|
4700
4700
|
if (n == null) {
|
|
@@ -4709,7 +4709,7 @@ function zf(e, t, n, r) {
|
|
|
4709
4709
|
let i = 0, a = Math.max(0, Math.min(t, e.length));
|
|
4710
4710
|
for (let t = 0; t < a; t += 1) {
|
|
4711
4711
|
let a = e[t];
|
|
4712
|
-
|
|
4712
|
+
Cn(a) && a.leafGroupPathKey === n && !r.has(a.id) && (i += 1);
|
|
4713
4713
|
}
|
|
4714
4714
|
return i;
|
|
4715
4715
|
}
|
|
@@ -4774,7 +4774,7 @@ function Wf(e, t, n, r, i) {
|
|
|
4774
4774
|
let a = [];
|
|
4775
4775
|
for (let n = 0; n < e.length; n += 1) {
|
|
4776
4776
|
let r = e[n];
|
|
4777
|
-
|
|
4777
|
+
Cn(r) && (t(r.id) ?? r).leafGroupPathKey === i && a.push(n);
|
|
4778
4778
|
}
|
|
4779
4779
|
if (a.length === 0) return !1;
|
|
4780
4780
|
let o = Math.min(...a), s = Math.max(...a) + 1;
|
|
@@ -5072,7 +5072,7 @@ function pp(e, t, n = {}) {
|
|
|
5072
5072
|
//#endregion
|
|
5073
5073
|
//#region src/core/row/getRowKind.ts
|
|
5074
5074
|
function mp(e) {
|
|
5075
|
-
return
|
|
5075
|
+
return bn(e) ? "GROUP_HEADER" : xn(e) ? "GROUP_FOOTER" : W(e) ? "DETAIL" : Xs(e) ? "LOAD_MORE" : At(e.rowKind);
|
|
5076
5076
|
}
|
|
5077
5077
|
function hp(e, t) {
|
|
5078
5078
|
let n = hf(e, t);
|
|
@@ -5602,6 +5602,7 @@ var tm = class {
|
|
|
5602
5602
|
e.preventDefault(), e.stopPropagation(), this.stopEditing(!0);
|
|
5603
5603
|
} else if (e.key === "Escape") e.preventDefault(), e.stopPropagation(), this.stopEditing(!1);
|
|
5604
5604
|
else if (e.key === "Tab") {
|
|
5605
|
+
if (this.keyboardPolicy.suppressTabNavigation === !0) return;
|
|
5605
5606
|
e.preventDefault(), e.stopPropagation();
|
|
5606
5607
|
let t = this.onTab, n = e.shiftKey;
|
|
5607
5608
|
this.stopEditing(!0).then((e) => {
|
|
@@ -5696,7 +5697,7 @@ var tm = class {
|
|
|
5696
5697
|
if (!this.editing || !this.mountedEditor) return null;
|
|
5697
5698
|
let e = this.editing, t = this.mountedEditor, n = t.getValue(), r = this.onCommit, i = this.oldValue, a = ++this.nextCommitId;
|
|
5698
5699
|
this.phase = "committing", this.setCommittingVisual(!0), this.onCommitLifecycle?.onStarted?.();
|
|
5699
|
-
let o =
|
|
5700
|
+
let o = ye(a, this.commitController);
|
|
5700
5701
|
this.commitController = o;
|
|
5701
5702
|
let s = { ok: !1 };
|
|
5702
5703
|
try {
|
|
@@ -5704,7 +5705,7 @@ var tm = class {
|
|
|
5704
5705
|
if (o.context.commitId !== a) return null;
|
|
5705
5706
|
s = e ?? { ok: !0 };
|
|
5706
5707
|
} catch (e) {
|
|
5707
|
-
if (
|
|
5708
|
+
if (xe(e)) s = { ok: "aborted" };
|
|
5708
5709
|
else throw e;
|
|
5709
5710
|
} finally {
|
|
5710
5711
|
this.commitController === o && (this.commitController = null), this.finishCommittingVisual();
|
|
@@ -5966,7 +5967,9 @@ var xm = class {
|
|
|
5966
5967
|
return;
|
|
5967
5968
|
}
|
|
5968
5969
|
if (e.key === "Tab") {
|
|
5969
|
-
|
|
5970
|
+
let t = this.resolveColIdFromEvent(e);
|
|
5971
|
+
if ((t ? this.editing?.cells.get(t) : void 0)?.keyboardPolicy.suppressTabNavigation === !0) return;
|
|
5972
|
+
e.preventDefault(), e.stopPropagation(), this.navigateRowTab(e.shiftKey, t);
|
|
5970
5973
|
return;
|
|
5971
5974
|
}
|
|
5972
5975
|
if (e.key === "Enter") {
|
|
@@ -6095,7 +6098,7 @@ var xm = class {
|
|
|
6095
6098
|
if (!n) return null;
|
|
6096
6099
|
let r = ++this.nextCommitId;
|
|
6097
6100
|
this.phase = "committing", this.setCommittingVisual(!0), this.onCommitLifecycle?.onStarted?.();
|
|
6098
|
-
let i =
|
|
6101
|
+
let i = ye(r, this.commitController);
|
|
6099
6102
|
this.commitController = i;
|
|
6100
6103
|
let a = {
|
|
6101
6104
|
ok: !1,
|
|
@@ -6106,7 +6109,7 @@ var xm = class {
|
|
|
6106
6109
|
if (i.context.commitId !== r) return null;
|
|
6107
6110
|
a = e;
|
|
6108
6111
|
} catch (e) {
|
|
6109
|
-
if (
|
|
6112
|
+
if (xe(e)) a = { ok: "aborted" };
|
|
6110
6113
|
else throw e;
|
|
6111
6114
|
} finally {
|
|
6112
6115
|
this.commitController === i && (this.commitController = null), this.finishCommittingVisual();
|
|
@@ -6328,7 +6331,7 @@ async function km(e, t, n, r) {
|
|
|
6328
6331
|
});
|
|
6329
6332
|
return Ce(r), Tm(e);
|
|
6330
6333
|
} catch (e) {
|
|
6331
|
-
throw
|
|
6334
|
+
throw xe(e), e;
|
|
6332
6335
|
}
|
|
6333
6336
|
}
|
|
6334
6337
|
async function Am(e, t) {
|
|
@@ -6338,7 +6341,7 @@ async function Am(e, t) {
|
|
|
6338
6341
|
let n = await e(t);
|
|
6339
6342
|
return Ce(t.signal), Em(n);
|
|
6340
6343
|
} catch (e) {
|
|
6341
|
-
throw
|
|
6344
|
+
throw xe(e), e;
|
|
6342
6345
|
}
|
|
6343
6346
|
}
|
|
6344
6347
|
async function jm(e, t, n, r) {
|
|
@@ -6356,9 +6359,9 @@ function Mm(e, t) {
|
|
|
6356
6359
|
//#endregion
|
|
6357
6360
|
//#region src/core/renderer/getCellDisplayValue.ts
|
|
6358
6361
|
function Nm(e, t, n) {
|
|
6359
|
-
if (
|
|
6360
|
-
if (v(t.colId) ||
|
|
6361
|
-
if (
|
|
6362
|
+
if (j(t.colId)) return n ? Mm(e.rowIndex, n) : String(e.rowIndex + 1);
|
|
6363
|
+
if (v(t.colId) || U(t.colId) || t.rowExpand || G(t.colId)) return "";
|
|
6364
|
+
if (xn(e) && t.groupAgg) return e.__groupAggValues?.[t.colId]?.formattedValue ?? "";
|
|
6362
6365
|
let r = t.prop ?? t.colId, i = r ? e.data[r] : void 0;
|
|
6363
6366
|
return t.valueGetter && (i = t.valueGetter(e.data, i)), t.formatter ? t.formatter(e.data, i) : i == null ? "" : String(i);
|
|
6364
6367
|
}
|
|
@@ -6392,7 +6395,7 @@ async function Im(e, t, n, r, i) {
|
|
|
6392
6395
|
context: Pm(r)
|
|
6393
6396
|
});
|
|
6394
6397
|
} catch (t) {
|
|
6395
|
-
if (
|
|
6398
|
+
if (xe(t)) throw t;
|
|
6396
6399
|
console.error("[magic-grid] cellCommitted failed", {
|
|
6397
6400
|
colId: e.colId,
|
|
6398
6401
|
rowId: o.rowId,
|
|
@@ -6536,7 +6539,7 @@ async function Bm(e, t, n, r, i, a, o) {
|
|
|
6536
6539
|
revert: !0
|
|
6537
6540
|
};
|
|
6538
6541
|
} catch (e) {
|
|
6539
|
-
if (
|
|
6542
|
+
if (xe(e)) return { ok: "aborted" };
|
|
6540
6543
|
throw e;
|
|
6541
6544
|
}
|
|
6542
6545
|
}
|
|
@@ -6841,7 +6844,7 @@ function gh(e, t, n = /* @__PURE__ */ new Set()) {
|
|
|
6841
6844
|
let i = 0, a = 0;
|
|
6842
6845
|
for (let o = 0; o < r; o += 1) {
|
|
6843
6846
|
let r = e.getRow(o);
|
|
6844
|
-
r && (
|
|
6847
|
+
r && (Sn(r) || W(r) || (i++, t.has(r.id) && !n.has(r.id) && a++));
|
|
6845
6848
|
}
|
|
6846
6849
|
return a === 0 ? {
|
|
6847
6850
|
checked: !1,
|
|
@@ -7287,7 +7290,7 @@ function Hg(e, t) {
|
|
|
7287
7290
|
return e.groupFooterLabel ?? t.getGroupFooterLabel?.() ?? "小计";
|
|
7288
7291
|
}
|
|
7289
7292
|
function Ug(e, t) {
|
|
7290
|
-
return
|
|
7293
|
+
return xn(t) && e.showGroupFooterCell && !Zt(e);
|
|
7291
7294
|
}
|
|
7292
7295
|
function Wg(e, t, n) {
|
|
7293
7296
|
let r = {
|
|
@@ -7301,9 +7304,9 @@ function Wg(e, t, n) {
|
|
|
7301
7304
|
ariaLabel: ""
|
|
7302
7305
|
};
|
|
7303
7306
|
if (!t.active()) return r;
|
|
7304
|
-
if (
|
|
7305
|
-
if (n && !
|
|
7306
|
-
let i = e.sourceGroupId ??
|
|
7307
|
+
if (bn(e)) {
|
|
7308
|
+
if (n && !on(n)) return r;
|
|
7309
|
+
let i = e.sourceGroupId ?? yn(e.id) ?? e.groupId ?? "", a = e.groupKey ?? "", o = e.groupLeafCount ?? 0, s = i ? t.isExpanded(i) : !1;
|
|
7307
7310
|
return {
|
|
7308
7311
|
visible: !0,
|
|
7309
7312
|
showChevron: !!i,
|
|
@@ -7315,8 +7318,8 @@ function Wg(e, t, n) {
|
|
|
7315
7318
|
ariaLabel: Vg(a, s, o)
|
|
7316
7319
|
};
|
|
7317
7320
|
}
|
|
7318
|
-
if (
|
|
7319
|
-
if (n && !
|
|
7321
|
+
if (xn(e)) {
|
|
7322
|
+
if (n && !sn(n)) return r;
|
|
7320
7323
|
let i = n ? Hg(n, t) : t.getGroupFooterLabel?.() ?? "小计";
|
|
7321
7324
|
return {
|
|
7322
7325
|
visible: !0,
|
|
@@ -7329,31 +7332,31 @@ function Wg(e, t, n) {
|
|
|
7329
7332
|
ariaLabel: i
|
|
7330
7333
|
};
|
|
7331
7334
|
}
|
|
7332
|
-
return
|
|
7335
|
+
return Cn(e), r;
|
|
7333
7336
|
}
|
|
7334
7337
|
function Gg(e) {
|
|
7335
7338
|
return `(${e})`;
|
|
7336
7339
|
}
|
|
7337
7340
|
function Kg() {
|
|
7338
7341
|
let e = document.createElement("button");
|
|
7339
|
-
return e.type = "button", e.className =
|
|
7342
|
+
return e.type = "button", e.className = Wt, e.setAttribute("aria-expanded", "false"), e.appendChild(mg()), e;
|
|
7340
7343
|
}
|
|
7341
7344
|
function qg(e, t) {
|
|
7342
7345
|
if (!t.showChevron) {
|
|
7343
|
-
e.hidden = !0, e.classList.remove(
|
|
7346
|
+
e.hidden = !0, e.classList.remove(Gt), e.setAttribute("aria-expanded", "false");
|
|
7344
7347
|
return;
|
|
7345
7348
|
}
|
|
7346
|
-
e.hidden = !1, e.setAttribute("aria-label", t.ariaLabel), e.setAttribute("aria-expanded", String(t.expanded)), e.classList.toggle(
|
|
7349
|
+
e.hidden = !1, e.setAttribute("aria-label", t.ariaLabel), e.setAttribute("aria-expanded", String(t.expanded)), e.classList.toggle(Gt, t.expanded);
|
|
7347
7350
|
}
|
|
7348
7351
|
function Jg(e, t) {
|
|
7349
7352
|
for (let t = e.classList.length - 1; t >= 0; --t) {
|
|
7350
7353
|
let n = e.classList.item(t);
|
|
7351
7354
|
n?.startsWith("mg-cell__group-indent-") && e.classList.remove(n);
|
|
7352
7355
|
}
|
|
7353
|
-
e.classList.add(`${
|
|
7356
|
+
e.classList.add(`${Kt}${Math.max(0, t)}`), e.style.paddingLeft = `${Math.max(0, t) * 16}px`;
|
|
7354
7357
|
}
|
|
7355
7358
|
function Yg(e, t, n, r, i) {
|
|
7356
|
-
e.classList.toggle(
|
|
7359
|
+
e.classList.toggle(Yt, i.visible), Jg(e, i.indentLevel), t && qg(t, i), n.textContent = i.label, n.hidden = i.label.length === 0, i.showCount && i.count > 0 ? (r.textContent = Gg(i.count), r.hidden = !1) : (r.textContent = "", r.hidden = !0);
|
|
7357
7360
|
}
|
|
7358
7361
|
function Xg(e, t, n, r) {
|
|
7359
7362
|
if (r) {
|
|
@@ -7455,7 +7458,7 @@ function l_(e) {
|
|
|
7455
7458
|
return e instanceof Element ? e.closest(`button.${jn}`) : null;
|
|
7456
7459
|
}
|
|
7457
7460
|
function u_(e, t, n, r, i) {
|
|
7458
|
-
return e.classList.toggle(Nn, r.visible), e.classList.toggle(
|
|
7461
|
+
return e.classList.toggle(Nn, r.visible), e.classList.toggle(Yt, r.visible), a_(e, r.indentLevel, { isExpandable: r.showChevron }), t && t_(t, r), n.textContent = r.label, n.hidden = r.label.length === 0, c_(e, i ?? null, r.hierarchyActions);
|
|
7459
7462
|
}
|
|
7460
7463
|
function d_(e, t, n, r, i = 0) {
|
|
7461
7464
|
if (r) {
|
|
@@ -7536,10 +7539,10 @@ function C_() {
|
|
|
7536
7539
|
}
|
|
7537
7540
|
function w_(e) {
|
|
7538
7541
|
let t = document.createElement("span");
|
|
7539
|
-
return t.className = "mg-header-cell__text", t.textContent =
|
|
7542
|
+
return t.className = "mg-header-cell__text", t.textContent = j(e.colId) ? e.label ?? "" : e.label ?? e.prop ?? e.colId, t;
|
|
7540
7543
|
}
|
|
7541
7544
|
function T_(e) {
|
|
7542
|
-
return
|
|
7545
|
+
return j(e.colId) || v(e.colId) || U(e.colId) || In(e.colId) ? !1 : e.sortable || e.movable || e.filterable;
|
|
7543
7546
|
}
|
|
7544
7547
|
function E_(e) {
|
|
7545
7548
|
let t = document.createElement("span");
|
|
@@ -7568,7 +7571,7 @@ function A_(e, t) {
|
|
|
7568
7571
|
n === "right" && a ? e.append(a, r) : a ? e.append(r, a) : e.append(r);
|
|
7569
7572
|
}
|
|
7570
7573
|
function j_(e, t) {
|
|
7571
|
-
let n = T_(t), r = !
|
|
7574
|
+
let n = T_(t), r = !j(t.colId) && !v(t.colId) && !U(t.colId) && !In(t.colId);
|
|
7572
7575
|
e.classList.toggle("mg-header-cell--has-column-handle", n), e.classList.toggle("mg-header-cell--movable", r && t.movable), e.classList.toggle("mg-header-cell--filterable", r && t.filterable);
|
|
7573
7576
|
}
|
|
7574
7577
|
function M_(e, t) {
|
|
@@ -7586,13 +7589,13 @@ function N_(e, t, n) {
|
|
|
7586
7589
|
let e = document.createElement("span");
|
|
7587
7590
|
e.className = "mg-header-cell__text", e.textContent = "", r.append(e);
|
|
7588
7591
|
}
|
|
7589
|
-
else if (
|
|
7592
|
+
else if (j(e.colId)) {
|
|
7590
7593
|
let t = w_(e);
|
|
7591
7594
|
r.append(t), r.classList.add("mg-header-cell--index");
|
|
7592
|
-
} else if (
|
|
7595
|
+
} else if (U(e.colId)) {
|
|
7593
7596
|
let e = document.createElement("span");
|
|
7594
7597
|
e.className = "mg-header-cell__text", e.textContent = "", r.append(e), r.classList.add("mg-header-cell--expand");
|
|
7595
|
-
} else if (
|
|
7598
|
+
} else if (G(e.colId)) {
|
|
7596
7599
|
let t = document.createElement("span");
|
|
7597
7600
|
t.className = "mg-header-cell__text", t.textContent = e.label ?? "分组", r.append(t), r.classList.add("mg-header-cell--group");
|
|
7598
7601
|
} else In(e.colId) ? (p_(r, e, n.getTreeHeaderExpanded?.() ?? !1), k_(r, e.resizable)) : (A_(r, e), k_(r, e.resizable));
|
|
@@ -7876,7 +7879,7 @@ function W_(e, t, n) {
|
|
|
7876
7879
|
let e = t;
|
|
7877
7880
|
return {
|
|
7878
7881
|
selectedRowIds: H_(e.selectedRowIds, r),
|
|
7879
|
-
selectedRows:
|
|
7882
|
+
selectedRows: me(e.selectedRowIds, n),
|
|
7880
7883
|
source: e.source
|
|
7881
7884
|
};
|
|
7882
7885
|
}
|
|
@@ -7884,7 +7887,7 @@ function W_(e, t, n) {
|
|
|
7884
7887
|
let e = t;
|
|
7885
7888
|
return {
|
|
7886
7889
|
focusedRowIds: H_(e.focusedRowIds, r),
|
|
7887
|
-
focusedRows:
|
|
7890
|
+
focusedRows: me(e.focusedRowIds, n)
|
|
7888
7891
|
};
|
|
7889
7892
|
}
|
|
7890
7893
|
case "cellValueChanged": {
|
|
@@ -7974,7 +7977,7 @@ function W_(e, t, n) {
|
|
|
7974
7977
|
rowId: a(e.data, n.rowKey, String(e.rowId))
|
|
7975
7978
|
})) };
|
|
7976
7979
|
case "rowIdPromoted": {
|
|
7977
|
-
let e = t, n =
|
|
7980
|
+
let e = t, n = te(e.oldRowId) ? null : Q(e.oldRowId, r);
|
|
7978
7981
|
return {
|
|
7979
7982
|
...e,
|
|
7980
7983
|
oldRowId: n,
|
|
@@ -8277,7 +8280,7 @@ function $_(e) {
|
|
|
8277
8280
|
//#endregion
|
|
8278
8281
|
//#region src/core/column/columnMoveService.ts
|
|
8279
8282
|
function ev(e) {
|
|
8280
|
-
return
|
|
8283
|
+
return j(e) || v(e);
|
|
8281
8284
|
}
|
|
8282
8285
|
function tv(e) {
|
|
8283
8286
|
return e.fixed ?? null;
|
|
@@ -8467,7 +8470,7 @@ function bv(e) {
|
|
|
8467
8470
|
//#endregion
|
|
8468
8471
|
//#region src/core/column/columnPinService.ts
|
|
8469
8472
|
function xv(e) {
|
|
8470
|
-
return !
|
|
8473
|
+
return !j(e) && !v(e);
|
|
8471
8474
|
}
|
|
8472
8475
|
function Sv(e, t) {
|
|
8473
8476
|
return e.center.length > 0 ? e.center[0] : e.right.length > 0 ? e.right[0] : e.left.length > 0 ? e.left[e.left.length - 1] + 1 : t;
|
|
@@ -8500,7 +8503,7 @@ function wv(e = {}) {
|
|
|
8500
8503
|
};
|
|
8501
8504
|
}
|
|
8502
8505
|
function Tv(e, t, n) {
|
|
8503
|
-
return
|
|
8506
|
+
return j(n) || v(n) ? !1 : e ?? t;
|
|
8504
8507
|
}
|
|
8505
8508
|
function Ev(e, t) {
|
|
8506
8509
|
return t === "shift" ? !e : e;
|
|
@@ -8566,7 +8569,7 @@ var jv = class {
|
|
|
8566
8569
|
this.columnMovableDefault = e.columnMovable, this.allowCrossLaneColumnMove = e.allowCrossLaneColumnMove;
|
|
8567
8570
|
}
|
|
8568
8571
|
a !== void 0 && (this.gridResizableDefault = wv(a).resizable), o !== void 0 && (this.gridSortableDefault = Fo(o).sortable), s !== void 0 && (this.gridFilterableDefault = Go(s).filterable);
|
|
8569
|
-
let c =
|
|
8572
|
+
let c = Rt(e), l = this.columns.map((e) => e.colId), u = new Map(this.columns.map((e) => [e.colId, e])), d = new Set(c.map((e, t) => kv(e, t))), f = c.map((e, r) => {
|
|
8570
8573
|
let i = this.parseColumn(e, r, t, n), a = u.get(i.colId);
|
|
8571
8574
|
return a && (a.defHidden === i.defHidden && (i.hidden = a.hidden), a.defWidth === i.defWidth && a.defFlex === i.defFlex && (i.width = a.width, i.flex = a.flex), a.defFixed === i.defFixed && (i.fixed = a.fixed)), i;
|
|
8572
8575
|
}), p = l.length > 0 && (d.size !== l.length || l.some((e) => !d.has(e)));
|
|
@@ -8605,7 +8608,7 @@ var jv = class {
|
|
|
8605
8608
|
setColumnMoveGridOptions(e) {
|
|
8606
8609
|
this.columnMovableDefault = e.columnMovable, this.allowCrossLaneColumnMove = e.allowCrossLaneColumnMove;
|
|
8607
8610
|
for (let e of this.columns) {
|
|
8608
|
-
if (
|
|
8611
|
+
if (j(e.colId) || v(e.colId) || U(e.colId)) {
|
|
8609
8612
|
e.movable = !1;
|
|
8610
8613
|
continue;
|
|
8611
8614
|
}
|
|
@@ -8615,7 +8618,7 @@ var jv = class {
|
|
|
8615
8618
|
setColumnResizeGridOptions(e) {
|
|
8616
8619
|
this.gridResizableDefault = e.resizable;
|
|
8617
8620
|
for (let e of this.columns) {
|
|
8618
|
-
if (
|
|
8621
|
+
if (j(e.colId) || v(e.colId) || U(e.colId)) {
|
|
8619
8622
|
e.resizable = !1;
|
|
8620
8623
|
continue;
|
|
8621
8624
|
}
|
|
@@ -8625,7 +8628,7 @@ var jv = class {
|
|
|
8625
8628
|
setColumnSortGridOptions(e) {
|
|
8626
8629
|
this.gridSortableDefault = e.sortable;
|
|
8627
8630
|
for (let e of this.columns) {
|
|
8628
|
-
if (
|
|
8631
|
+
if (j(e.colId) || v(e.colId) || U(e.colId) || G(e.colId)) {
|
|
8629
8632
|
e.sortable = !1;
|
|
8630
8633
|
continue;
|
|
8631
8634
|
}
|
|
@@ -8635,7 +8638,7 @@ var jv = class {
|
|
|
8635
8638
|
setColumnFilterGridOptions(e) {
|
|
8636
8639
|
this.gridFilterableDefault = e.filterable;
|
|
8637
8640
|
for (let e of this.columns) {
|
|
8638
|
-
if (
|
|
8641
|
+
if (j(e.colId) || v(e.colId) || U(e.colId) || G(e.colId)) {
|
|
8639
8642
|
e.filterable = !1;
|
|
8640
8643
|
continue;
|
|
8641
8644
|
}
|
|
@@ -8776,7 +8779,7 @@ var jv = class {
|
|
|
8776
8779
|
return a ? (i.fixed = lv(this.columns, e, n.toGlobalIndex, n.toFixed), this.reorderColumns(a)) : !1;
|
|
8777
8780
|
}
|
|
8778
8781
|
parseColumn(e, t, n, r) {
|
|
8779
|
-
let i = kv(e, t), a = e.minWidth ?? 50, o = Mv(e.width ?? 100, a, e.maxWidth), s = Dh(e, this.gridAlignDefaults), c =
|
|
8782
|
+
let i = kv(e, t), a = e.minWidth ?? 50, o = Mv(e.width ?? 100, a, e.maxWidth), s = Dh(e, this.gridAlignDefaults), c = j(i) || v(i) || U(i) || G(i), l = e.fixed === "left" || e.fixed === "right", u = !c && !l && e.flex != null && e.flex > 0 ? e.flex : null;
|
|
8780
8783
|
return e.cellEditorMode, e.cellEditor ?? r[i], e.cellEditorMode, e.cellEditor ?? r[i], {
|
|
8781
8784
|
colId: i,
|
|
8782
8785
|
prop: e.prop,
|
|
@@ -8825,13 +8828,13 @@ var jv = class {
|
|
|
8825
8828
|
summaryFormatter: e.summaryFormatter,
|
|
8826
8829
|
autoHeight: Cs(e, i),
|
|
8827
8830
|
rowDrag: ls(e, i),
|
|
8828
|
-
rowExpand:
|
|
8829
|
-
rowGroup:
|
|
8830
|
-
rowGroupIndex:
|
|
8831
|
-
groupAgg:
|
|
8832
|
-
showGroupHeaderCell:
|
|
8833
|
-
showGroupFooterCell:
|
|
8834
|
-
groupFooterLabel:
|
|
8831
|
+
rowExpand: kt(e, i),
|
|
8832
|
+
rowGroup: $t(e, i),
|
|
8833
|
+
rowGroupIndex: en(e, i),
|
|
8834
|
+
groupAgg: tn(e, i),
|
|
8835
|
+
showGroupHeaderCell: nn(e, i),
|
|
8836
|
+
showGroupFooterCell: rn(e, i),
|
|
8837
|
+
groupFooterLabel: an(e, i),
|
|
8835
8838
|
suppressCellComments: c ? !0 : e.suppressCellComments,
|
|
8836
8839
|
disabled: !c && e.disabled,
|
|
8837
8840
|
cellDisabled: c ? void 0 : e.cellDisabled,
|
|
@@ -8961,7 +8964,7 @@ function Bv(e, t, n = {}) {
|
|
|
8961
8964
|
});
|
|
8962
8965
|
continue;
|
|
8963
8966
|
}
|
|
8964
|
-
if (
|
|
8967
|
+
if (j(t.colId) || v(t.colId)) {
|
|
8965
8968
|
o.push({
|
|
8966
8969
|
colId: t.colId,
|
|
8967
8970
|
width: t.width,
|
|
@@ -9030,7 +9033,7 @@ var Vv = class {
|
|
|
9030
9033
|
}
|
|
9031
9034
|
autoSizeColumn(e, t) {
|
|
9032
9035
|
let n = this.columnModel.getColumnById(e);
|
|
9033
|
-
if (!n?.resizable || n.suppressAutoSize ||
|
|
9036
|
+
if (!n?.resizable || n.suppressAutoSize || j(e) || v(e)) return null;
|
|
9034
9037
|
let r = t ?? this.autosizeOptions.skipHeaderOnAutoSize, i = Iv(this.mountEl, e, r, this.autosizeOptions.autoSizePadding);
|
|
9035
9038
|
return i <= 0 ? null : {
|
|
9036
9039
|
colId: e,
|
|
@@ -9046,7 +9049,7 @@ var Vv = class {
|
|
|
9046
9049
|
return n;
|
|
9047
9050
|
}
|
|
9048
9051
|
autoSizeAllColumns(e) {
|
|
9049
|
-
let t = this.columnModel.getColumns().filter((e) => e.resizable && !e.suppressAutoSize && !
|
|
9052
|
+
let t = this.columnModel.getColumns().filter((e) => e.resizable && !e.suppressAutoSize && !j(e.colId) && !v(e.colId)).map((e) => e.colId);
|
|
9050
9053
|
return this.autoSizeColumns(t, e);
|
|
9051
9054
|
}
|
|
9052
9055
|
sizeColumnsToFit(e, t = {}) {
|
|
@@ -9061,7 +9064,7 @@ var Vv = class {
|
|
|
9061
9064
|
};
|
|
9062
9065
|
}
|
|
9063
9066
|
buildFitCellContentsChanges(e) {
|
|
9064
|
-
let t = e.skipHeader ?? this.autosizeOptions.skipHeaderOnAutoSize, n = e.colIds ?? this.columnModel.getColumns().filter((e) => e.resizable && !e.suppressAutoSize && !
|
|
9067
|
+
let t = e.skipHeader ?? this.autosizeOptions.skipHeaderOnAutoSize, n = e.colIds ?? this.columnModel.getColumns().filter((e) => e.resizable && !e.suppressAutoSize && !j(e.colId) && !v(e.colId)).map((e) => e.colId), r = Object.fromEntries((e.columnLimits ?? []).map(({ colId: e, minWidth: t, maxWidth: n }) => [e, {
|
|
9065
9068
|
minWidth: t,
|
|
9066
9069
|
maxWidth: n
|
|
9067
9070
|
}])), i = [];
|
|
@@ -9587,13 +9590,13 @@ function dy(e, t, n = "mg-cell") {
|
|
|
9587
9590
|
function fy(e) {
|
|
9588
9591
|
if (!e.enableCellSpan) return 1;
|
|
9589
9592
|
let { column: t, params: n } = e;
|
|
9590
|
-
if (
|
|
9593
|
+
if (j(t.colId) || v(t.colId)) return 1;
|
|
9591
9594
|
let r = t.colSpan;
|
|
9592
9595
|
return r ? Ps(r(n)) : 1;
|
|
9593
9596
|
}
|
|
9594
9597
|
function py(e, t) {
|
|
9595
9598
|
let n = t.getColAfter(e.colId);
|
|
9596
|
-
if (n && n.fixed === e.fixed && !(
|
|
9599
|
+
if (n && n.fixed === e.fixed && !(j(n.colId) || v(n.colId))) return n;
|
|
9597
9600
|
}
|
|
9598
9601
|
function my(e, t, n) {
|
|
9599
9602
|
let r = fy({
|
|
@@ -9686,7 +9689,7 @@ function vy(e) {
|
|
|
9686
9689
|
function yy(e) {
|
|
9687
9690
|
if (!e.enableCellSpan || e.params.isSummaryRow) return 1;
|
|
9688
9691
|
let { column: t, params: n } = e;
|
|
9689
|
-
if (
|
|
9692
|
+
if (j(t.colId) || v(t.colId)) return 1;
|
|
9690
9693
|
let r = t.rowSpan;
|
|
9691
9694
|
return r ? Ps(r(n)) : 1;
|
|
9692
9695
|
}
|
|
@@ -10150,7 +10153,7 @@ var Ly = class {
|
|
|
10150
10153
|
for (; n.cells.length > t.length;) n.cells.pop()?.destroy(), n.cellCtrls.pop();
|
|
10151
10154
|
for (let e = 0; e < t.length; e++) {
|
|
10152
10155
|
let r = t[e], i = r === void 0 ? void 0 : this.columnModel.getColumn(r), a = n.cells[e];
|
|
10153
|
-
!i || !a || (this.applyCellColumnLayout(a, i), a.setColId(i.colId), Oh(a.getElement(), i.footerAlign, i.footerValign, "mg-footer-cell"), a.getElement().classList.toggle("mg-footer-cell--index",
|
|
10156
|
+
!i || !a || (this.applyCellColumnLayout(a, i), a.setColId(i.colId), Oh(a.getElement(), i.footerAlign, i.footerValign, "mg-footer-cell"), a.getElement().classList.toggle("mg-footer-cell--index", j(i.colId)), a.getElement().classList.toggle("mg-footer-cell--selection", v(i.colId)));
|
|
10154
10157
|
}
|
|
10155
10158
|
}
|
|
10156
10159
|
applyCellColumnLayout(e, t) {
|
|
@@ -10796,7 +10799,7 @@ function mb(e, t) {
|
|
|
10796
10799
|
//#region src/core/indexColumn/indexLoadingVisual.ts
|
|
10797
10800
|
var hb = "mg-cell__index-loading-spinner", gb = "mg-cell--index-focused";
|
|
10798
10801
|
function _b(e, t) {
|
|
10799
|
-
if (e.classList.toggle(
|
|
10802
|
+
if (e.classList.toggle(ie, t), t) {
|
|
10800
10803
|
if (e.classList.remove(gb, Jc), !e.querySelector(".mg-cell__index-loading-spinner")) {
|
|
10801
10804
|
let t = document.createElement("span");
|
|
10802
10805
|
t.className = hb, t.setAttribute("aria-hidden", "true"), e.append(t);
|
|
@@ -10997,7 +11000,7 @@ var Db = class {
|
|
|
10997
11000
|
return this.isActive;
|
|
10998
11001
|
}
|
|
10999
11002
|
activate(e, t, n) {
|
|
11000
|
-
this.isActive = !0, n.rowElement.classList.add("mg-row--full-width-embed", "mg-row--detail"), n.rowElement.dataset.rowKind = "DETAIL", e.masterRowId && (n.rowElement.dataset.masterRowId = e.masterRowId), this.refreshPinnedLanes(n), this.contentEl || (this.contentEl = document.createElement("div"), this.contentEl.className =
|
|
11003
|
+
this.isActive = !0, n.rowElement.classList.add("mg-row--full-width-embed", "mg-row--detail"), n.rowElement.dataset.rowKind = "DETAIL", e.masterRowId && (n.rowElement.dataset.masterRowId = e.masterRowId), this.refreshPinnedLanes(n), this.contentEl || (this.contentEl = document.createElement("div"), this.contentEl.className = Ct, n.lanes.center.element.appendChild(this.contentEl)), this.refreshContent(n), n.syncStripeClass(), n.syncLastRowClass(t);
|
|
11001
11004
|
}
|
|
11002
11005
|
refreshPinnedLanes(e) {
|
|
11003
11006
|
let { left: t, right: n } = e.buildEmbedPinnedLaneIndices();
|
|
@@ -11039,8 +11042,8 @@ function kb(e, t, n = {}) {
|
|
|
11039
11042
|
e.cellEditorMode ?? "overlay",
|
|
11040
11043
|
e.cellRenderer ? `cr:${Ob(e.cellRenderer)}` : "cr:none"
|
|
11041
11044
|
];
|
|
11042
|
-
if (_(e) && r.push(`ed:${Ob(e.cellEditor)}`), v(e.colId) && r.push("selection"),
|
|
11043
|
-
let i =
|
|
11045
|
+
if (_(e) && r.push(`ed:${Ob(e.cellEditor)}`), v(e.colId) && r.push("selection"), j(e.colId)) {
|
|
11046
|
+
let i = Cn(t) && (n.rowDragHandleEnabled?.(e.colId) ?? !1);
|
|
11044
11047
|
r.push(i ? "idxDrag1" : "idxDrag0"), r.push(n.indexRowResizerEnabled ? "idxRsz1" : "idxRsz0");
|
|
11045
11048
|
}
|
|
11046
11049
|
return _(e) && r.push("inlineHost"), r.join("|");
|
|
@@ -11055,14 +11058,14 @@ function jb(e, t) {
|
|
|
11055
11058
|
}
|
|
11056
11059
|
function Mb() {
|
|
11057
11060
|
let e = document.createElement("button");
|
|
11058
|
-
return e.type = "button", e.className =
|
|
11061
|
+
return e.type = "button", e.className = yt, e.setAttribute("aria-expanded", "false"), e.appendChild(mg()), e;
|
|
11059
11062
|
}
|
|
11060
11063
|
function Nb(e, t) {
|
|
11061
11064
|
if (!t.visible) {
|
|
11062
|
-
e.hidden = !0, e.classList.remove(
|
|
11065
|
+
e.hidden = !0, e.classList.remove(bt), e.setAttribute("aria-expanded", "false");
|
|
11063
11066
|
return;
|
|
11064
11067
|
}
|
|
11065
|
-
e.hidden = !1, e.setAttribute("aria-label", t.ariaLabel), e.setAttribute("aria-expanded", String(t.expanded)), e.classList.toggle(
|
|
11068
|
+
e.hidden = !1, e.setAttribute("aria-label", t.ariaLabel), e.setAttribute("aria-expanded", String(t.expanded)), e.classList.toggle(bt, t.expanded);
|
|
11066
11069
|
}
|
|
11067
11070
|
//#endregion
|
|
11068
11071
|
//#region src/core/cell/cellCtrl.ts
|
|
@@ -11089,11 +11092,11 @@ var Ib = class {
|
|
|
11089
11092
|
let f = kb(t, e, a.structuralContext ?? a.getCellStructuralContext?.() ?? { indexRowResizerEnabled: u?.enableRowResizer });
|
|
11090
11093
|
if (Ab(this.cachedStructuralSignature, f) && this.recreateCellState(n), this.cachedStructuralSignature = f, Fb(e.id, t.colId, a.overlayEditingTargets)) return !1;
|
|
11091
11094
|
if (v(t.colId)) return this.clearInlineSession(n), this.refreshSelectionCell(e, t, n, r, o, d, a.selectionChecked ?? !1, a.selectionDisabled ?? !1, a.selectionIndeterminate ?? !1);
|
|
11092
|
-
if (
|
|
11093
|
-
if (
|
|
11095
|
+
if (Dt(t) && a.rowExpansionHost?.active()) return this.clearInlineSession(n), this.refreshExpandCell(e, t, n, r, o, a.rowExpansionHost);
|
|
11096
|
+
if (cn(t, e) && a.rowGroupingHost?.active()) return this.clearInlineSession(n), this.refreshGroupCell(e, t, n, r, o, a.rowGroupingHost);
|
|
11094
11097
|
if (Zg(t, e) && a.treeTableHost?.active()) return this.clearInlineSession(n), this.refreshTreeCell(e, n, r, o, a.treeTableHost);
|
|
11095
|
-
if (!
|
|
11096
|
-
if (this.clearInlineSession(n), !
|
|
11098
|
+
if (!j(t.colId) && _(t) && a.inlineEditor && Cn(e)) return this.refreshInlineEditorCell(e, t, n, r, o, s, a.inlineEditor, a, a.scheduleInlineEditor);
|
|
11099
|
+
if (this.clearInlineSession(n), !j(t.colId) && t.cellRenderer) return this.refreshRendererCell(e, t, n, r, o, s, a.scheduleRenderer, a.cellRendererDefer, a.cellRendererPresentation, a.scrollActive, u);
|
|
11097
11100
|
let p = Nm(e, t, u);
|
|
11098
11101
|
return !o && !s && this.cacheVersion === r && Pb(this.cachedValue, p) ? !1 : (n.clearRenderer(), this.cachedValue = p, this.cachedRenderKey = "", this.cacheVersion = r, n.setValue(p), !0);
|
|
11099
11102
|
}
|
|
@@ -11187,7 +11190,7 @@ var Ib = class {
|
|
|
11187
11190
|
}
|
|
11188
11191
|
refreshSelectionCell(e, t, n, r, i, a, o, s, c) {
|
|
11189
11192
|
let l = n;
|
|
11190
|
-
if (
|
|
11193
|
+
if (Sn(e)) {
|
|
11191
11194
|
let e = "group-row:no-selection";
|
|
11192
11195
|
return !i && this.cacheVersion === r && this.cachedValue === e ? !1 : (this.cachedValue = e, this.cachedRenderKey = "", this.cacheVersion = r, l.clearSelectionCheckbox(), l.setValue(""), !0);
|
|
11193
11196
|
}
|
|
@@ -11200,7 +11203,7 @@ var Ib = class {
|
|
|
11200
11203
|
}), !0);
|
|
11201
11204
|
}
|
|
11202
11205
|
refreshExpandCell(e, t, n, r, i, a) {
|
|
11203
|
-
let o = !
|
|
11206
|
+
let o = !W(e) && a.isRowMaster(e), s = o && a.isExpanded(e.id), c = jb(e.rowIndex, s), l = `${o}:${s}:${c}`;
|
|
11204
11207
|
if (!i && this.cacheVersion === r && this.cachedValue === l) return !1;
|
|
11205
11208
|
this.cachedValue = l, this.cachedRenderKey = "", this.cacheVersion = r;
|
|
11206
11209
|
let u = n;
|
|
@@ -11572,9 +11575,9 @@ function Hb(e, t) {
|
|
|
11572
11575
|
}
|
|
11573
11576
|
function Ub(e, t, n, r, i, a, o) {
|
|
11574
11577
|
let s = r.colId;
|
|
11575
|
-
o !== s && (a.changedSlotIndices.add(i), o && n.invalidate(), t.setFocused(!1), t.getElement().classList.remove("mg-cell--invalid"), t.getElement().removeAttribute("title")), e.applyCellSpanLayout(t, r), t.setColId(s), t.getElement().toggleAttribute("data-auto-height", r.autoHeight), Oh(t.getElement(), r.align, r.valign, "mg-cell"), t.getElement().classList.toggle("mg-cell--index",
|
|
11576
|
-
let c = e.rowNode != null &&
|
|
11577
|
-
|
|
11578
|
+
o !== s && (a.changedSlotIndices.add(i), o && n.invalidate(), t.setFocused(!1), t.getElement().classList.remove("mg-cell--invalid"), t.getElement().removeAttribute("title")), e.applyCellSpanLayout(t, r), t.setColId(s), t.getElement().toggleAttribute("data-auto-height", r.autoHeight), Oh(t.getElement(), r.align, r.valign, "mg-cell"), t.getElement().classList.toggle("mg-cell--index", j(r.colId)), t.getElement().classList.toggle("mg-cell--selection", v(r.colId)), t.getElement().classList.toggle("mg-cell--expand", U(r.colId) || r.rowExpand), t.getElement().classList.toggle("mg-cell--group", G(r.colId));
|
|
11579
|
+
let c = e.rowNode != null && Cn(e.rowNode) && (e.isRowDragHandleEnabled?.(r.colId) ?? !1);
|
|
11580
|
+
j(r.colId) ? (t.getElement().classList.toggle("mg-cell--index-focused", e.indexFocused), t.setIndexRangeHighlight(e.indexColumnRangeHighlighted), t.setRowResizeHandle(e.indexColumnOptions?.enableRowResizer ?? !1), t.setRowDragHandle(c)) : (t.clearRowResizeHandle(), t.setRowDragHandle(r.rowDrag ? c : !1));
|
|
11578
11581
|
}
|
|
11579
11582
|
function Wb(e) {
|
|
11580
11583
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -11780,7 +11783,7 @@ var Zb = class {
|
|
|
11780
11783
|
e || (this.syncIndexFocusedVisual(), this.syncIndexColumnRangeHighlightVisual());
|
|
11781
11784
|
}
|
|
11782
11785
|
setData(e, t, n, r = 0, i = !1, a) {
|
|
11783
|
-
if (this.rowNode = e, this.columnModel = t, this.columnWindow = n, this.valueCacheVersion = r, this.element.dataset.rowId = e.id, this.spannedRowOnly ? this.syncSpannedRowHeight() : this.syncRowHeight(e.rowHeight), this.element.style.width = `${t.getTotalWidth()}px`, this.syncLaneWidths(), this.embedFullWidthRows &&
|
|
11786
|
+
if (this.rowNode = e, this.columnModel = t, this.columnWindow = n, this.valueCacheVersion = r, this.element.dataset.rowId = e.id, this.spannedRowOnly ? this.syncSpannedRowHeight() : this.syncRowHeight(e.rowHeight), this.element.style.width = `${t.getTotalWidth()}px`, this.syncLaneWidths(), this.embedFullWidthRows && W(e)) {
|
|
11784
11787
|
this.fullWidthEmbed.activate(e, i, this.buildFullWidthEmbedDeps());
|
|
11785
11788
|
return;
|
|
11786
11789
|
}
|
|
@@ -11839,7 +11842,7 @@ var Zb = class {
|
|
|
11839
11842
|
syncCellCommentIndicators(e = null) {
|
|
11840
11843
|
let t = this.getCellCommentHost?.();
|
|
11841
11844
|
if (!t?.active() || !this.rowNode || !this.columnModel || this.fullWidthEmbed.active) return;
|
|
11842
|
-
let n = this.rowNode, r =
|
|
11845
|
+
let n = this.rowNode, r = At(n.rowKind);
|
|
11843
11846
|
for (let i of [
|
|
11844
11847
|
"left",
|
|
11845
11848
|
"center",
|
|
@@ -12041,7 +12044,7 @@ var Zb = class {
|
|
|
12041
12044
|
let t = this.lanes[e];
|
|
12042
12045
|
for (let e = 0; e < t.indices.length; e++) {
|
|
12043
12046
|
let n = t.indices[e], r = n === void 0 ? void 0 : this.columnModel.getColumn(n), i = t.cells[e];
|
|
12044
|
-
!r || !i || !
|
|
12047
|
+
!r || !i || !j(r.colId) || i.getElement().classList.toggle("mg-cell--index-focused", this.indexFocused);
|
|
12045
12048
|
}
|
|
12046
12049
|
}
|
|
12047
12050
|
}
|
|
@@ -12054,7 +12057,7 @@ var Zb = class {
|
|
|
12054
12057
|
let t = this.lanes[e];
|
|
12055
12058
|
for (let e = 0; e < t.indices.length; e++) {
|
|
12056
12059
|
let n = t.indices[e], r = n === void 0 ? void 0 : this.columnModel.getColumn(n), i = t.cells[e];
|
|
12057
|
-
!r || !i || !
|
|
12060
|
+
!r || !i || !j(r.colId) || i.setIndexRangeHighlight(this.indexColumnRangeHighlighted);
|
|
12058
12061
|
}
|
|
12059
12062
|
}
|
|
12060
12063
|
}
|
|
@@ -12096,7 +12099,7 @@ var Zb = class {
|
|
|
12096
12099
|
});
|
|
12097
12100
|
}
|
|
12098
12101
|
syncGroupRowClasses() {
|
|
12099
|
-
this.rowNode && (this.element.classList.toggle(
|
|
12102
|
+
this.rowNode && (this.element.classList.toggle(qt, this.rowNode.rowKind === "GROUP_HEADER"), this.element.classList.toggle(Jt, this.rowNode.rowKind === "GROUP_FOOTER"));
|
|
12100
12103
|
}
|
|
12101
12104
|
syncStripeClass() {
|
|
12102
12105
|
this.rowNode && this.element.classList.toggle("mg-row--stripe", this.stripe && this.rowNode.rowIndex % 2 == 1);
|
|
@@ -12108,7 +12111,7 @@ var Zb = class {
|
|
|
12108
12111
|
this.element.classList.toggle("mg-row--before-load-more", e);
|
|
12109
12112
|
}
|
|
12110
12113
|
syncExpandedMasterClass() {
|
|
12111
|
-
if (!this.rowNode ||
|
|
12114
|
+
if (!this.rowNode || W(this.rowNode)) {
|
|
12112
12115
|
this.element.classList.remove("mg-row--expanded-master");
|
|
12113
12116
|
return;
|
|
12114
12117
|
}
|
|
@@ -12125,7 +12128,7 @@ var Zb = class {
|
|
|
12125
12128
|
for (let e = 0; e < t.indices.length; e++) {
|
|
12126
12129
|
let n = t.indices[e], r = n === void 0 ? void 0 : this.columnModel.getColumn(n), i = t.cells[e];
|
|
12127
12130
|
if (!r || !i || !v(r.colId)) continue;
|
|
12128
|
-
if (
|
|
12131
|
+
if (Sn(this.rowNode)) {
|
|
12129
12132
|
i.clearSelectionCheckbox();
|
|
12130
12133
|
continue;
|
|
12131
12134
|
}
|
|
@@ -12471,7 +12474,7 @@ var Zb = class {
|
|
|
12471
12474
|
rowNode = null;
|
|
12472
12475
|
renderParams = null;
|
|
12473
12476
|
constructor(e, t = {}) {
|
|
12474
|
-
this.frameService = t.frameService ?? null, this.onUnmountRenderer = t.onUnmountRenderer, this.detailRowAutoHeightService = t.detailRowAutoHeightService ?? null, this.element = document.createElement("div"), this.element.className =
|
|
12477
|
+
this.frameService = t.frameService ?? null, this.onUnmountRenderer = t.onUnmountRenderer, this.detailRowAutoHeightService = t.detailRowAutoHeightService ?? null, this.element = document.createElement("div"), this.element.className = St, this.element.dataset.rowKind = "DETAIL", this.contentEl = document.createElement("div"), this.contentEl.className = Ct, this.element.appendChild(this.contentEl), e.appendChild(this.element);
|
|
12475
12478
|
}
|
|
12476
12479
|
getElement() {
|
|
12477
12480
|
return this.element;
|
|
@@ -12480,7 +12483,7 @@ var Zb = class {
|
|
|
12480
12483
|
this.detailCellRenderer = e, this.renderParams && this.renderContent(this.renderParams);
|
|
12481
12484
|
}
|
|
12482
12485
|
setData(e, t, n, r = !1) {
|
|
12483
|
-
this.rowNode = e, this.renderParams = t, this.detailCellRenderer = n ?? this.detailCellRenderer, this.element.dataset.rowId = e.id, this.element.dataset.masterRowId = t.masterRowId == null ? "" : String(t.masterRowId), this.element.style.height = `${e.rowHeight}px`, this.element.classList.toggle(
|
|
12486
|
+
this.rowNode = e, this.renderParams = t, this.detailCellRenderer = n ?? this.detailCellRenderer, this.element.dataset.rowId = e.id, this.element.dataset.masterRowId = t.masterRowId == null ? "" : String(t.masterRowId), this.element.style.height = `${e.rowHeight}px`, this.element.classList.toggle(wt, r), this.renderContent(t);
|
|
12484
12487
|
}
|
|
12485
12488
|
syncRowLayout(e) {
|
|
12486
12489
|
this.rowNode = e, this.element.style.height = `${e.rowHeight}px`;
|
|
@@ -12547,7 +12550,7 @@ var Zb = class {
|
|
|
12547
12550
|
compressedScroll = !1;
|
|
12548
12551
|
scrollTop = 0;
|
|
12549
12552
|
constructor(e) {
|
|
12550
|
-
this.container = e.container, this.container.classList.add(
|
|
12553
|
+
this.container = e.container, this.container.classList.add(xt), this.rowModel = e.rowModel, this.columnModel = e.columnModel, this.frameService = e.frameService ?? null, this.onUnmountRenderer = e.onUnmountRenderer, this.getDetailCellRenderer = e.getDetailCellRenderer, this.getMasterRowById = e.getMasterRowById, this.masterDetail = e.masterDetail ?? !1, this.embedFullWidthRows = e.embedFullWidthRows ?? !1, this.detailRowAutoHeightService = e.detailRowAutoHeightService ?? null, this.container.style.display = "none";
|
|
12551
12554
|
}
|
|
12552
12555
|
setDetailRowAutoHeightService(e) {
|
|
12553
12556
|
this.detailRowAutoHeightService = e;
|
|
@@ -12596,7 +12599,7 @@ var Zb = class {
|
|
|
12596
12599
|
}
|
|
12597
12600
|
refreshDetailRowContent(e) {
|
|
12598
12601
|
let t = this.findRowNodeById(e), n = this.rowPool.get(e);
|
|
12599
|
-
if (!t || !n || !
|
|
12602
|
+
if (!t || !n || !W(t)) return;
|
|
12600
12603
|
let r = this.buildRendererParams(t);
|
|
12601
12604
|
r && (n.syncBodyWidth(this.columnModel.getTotalWidth()), n.setData(t, r, this.getDetailCellRenderer?.(), this.isLastDisplayRow(e)));
|
|
12602
12605
|
}
|
|
@@ -12607,14 +12610,14 @@ var Zb = class {
|
|
|
12607
12610
|
let n = /* @__PURE__ */ new Set();
|
|
12608
12611
|
if (t >= e) for (let r = e; r <= t; r++) {
|
|
12609
12612
|
let e = this.rowModel.getRow(r);
|
|
12610
|
-
e &&
|
|
12613
|
+
e && W(e) && n.add(e.id);
|
|
12611
12614
|
}
|
|
12612
|
-
for (let e of this.pinnedRowIds)
|
|
12615
|
+
for (let e of this.pinnedRowIds) Mt(e) && n.add(e);
|
|
12613
12616
|
return n;
|
|
12614
12617
|
}
|
|
12615
12618
|
updateDetailRow(e) {
|
|
12616
12619
|
let t = this.findRowNodeById(e);
|
|
12617
|
-
if (!t || !
|
|
12620
|
+
if (!t || !W(t) || !t.masterRowId) return;
|
|
12618
12621
|
let n = this.buildRendererParams(t);
|
|
12619
12622
|
if (!n) return;
|
|
12620
12623
|
let r = this.rowPool.acquire(e, () => new $b(this.container, {
|
|
@@ -12656,9 +12659,9 @@ var rx = class {
|
|
|
12656
12659
|
renderParams = null;
|
|
12657
12660
|
layoutTop = NaN;
|
|
12658
12661
|
constructor(e, t = {}) {
|
|
12659
|
-
this.onUnmountRenderer = t.onUnmountRenderer, this.element = document.createElement("div"), this.element.className = `${
|
|
12662
|
+
this.onUnmountRenderer = t.onUnmountRenderer, this.element = document.createElement("div"), this.element.className = `${St} ${Gs}`, this.element.dataset.rowKind = "LOAD_MORE";
|
|
12660
12663
|
let n = document.createElement("div");
|
|
12661
|
-
n.className = Ks, this.contentEl = document.createElement("div"), this.contentEl.className =
|
|
12664
|
+
n.className = Ks, this.contentEl = document.createElement("div"), this.contentEl.className = Ct, n.appendChild(this.contentEl), this.element.appendChild(n), e.appendChild(this.element);
|
|
12662
12665
|
}
|
|
12663
12666
|
setLoadMoreRowRenderer(e) {
|
|
12664
12667
|
this.loadMoreRowRenderer = e, this.renderParams && this.renderContent(this.renderParams);
|
|
@@ -13079,7 +13082,7 @@ var rx = class {
|
|
|
13079
13082
|
overlayEditingTargets: this.resolveOverlayEditingTargets()
|
|
13080
13083
|
}, o = (t) => {
|
|
13081
13084
|
let n = this.rowModel.getRow(t);
|
|
13082
|
-
if (!n ||
|
|
13085
|
+
if (!n || W(n) || Xs(n)) return;
|
|
13083
13086
|
let r = this.rowModel.getRowCount(), o = t + 1 < r ? this.rowModel.getRow(t + 1) : void 0, s = this.compressedScroll ? n.rowTop - e : n.rowTop, c = this.rowPool.get(n.id);
|
|
13084
13087
|
if (c) {
|
|
13085
13088
|
c.syncRowLayout?.(n), c.setRowTop(s), c.setBeforeLoadMoreRow?.(o != null && Xs(o)), c.syncRowExpansionDisplayChrome?.(i, a);
|
|
@@ -13089,7 +13092,7 @@ var rx = class {
|
|
|
13089
13092
|
};
|
|
13090
13093
|
if (r.lastRow >= r.firstRow) for (let e = r.firstRow; e <= r.lastRow; e++) o(e);
|
|
13091
13094
|
for (let e of this.pinnedRowIds) {
|
|
13092
|
-
if (
|
|
13095
|
+
if (Mt(e)) continue;
|
|
13093
13096
|
let t = this.findRowIndexById(e);
|
|
13094
13097
|
t >= 0 && o(t);
|
|
13095
13098
|
}
|
|
@@ -13099,14 +13102,14 @@ var rx = class {
|
|
|
13099
13102
|
let t = /* @__PURE__ */ new Set();
|
|
13100
13103
|
if (e.lastRow >= e.firstRow) for (let n = e.firstRow; n <= e.lastRow; n++) {
|
|
13101
13104
|
let e = this.rowModel.getRow(n);
|
|
13102
|
-
!e ||
|
|
13105
|
+
!e || W(e) || Xs(e) || t.add(e.id);
|
|
13103
13106
|
}
|
|
13104
|
-
for (let e of this.pinnedRowIds)
|
|
13107
|
+
for (let e of this.pinnedRowIds) Mt(e) || t.add(e);
|
|
13105
13108
|
for (let e of this.rowPool.getActiveIds()) t.has(e) || (this.pendingDestroyTasks.delete(e), this.rowPool.release(e));
|
|
13106
13109
|
}
|
|
13107
13110
|
collectExpandColumnIds() {
|
|
13108
13111
|
let e = [];
|
|
13109
|
-
for (let t of this.columnModel.getColumns()) (
|
|
13112
|
+
for (let t of this.columnModel.getColumns()) (U(t.colId) || t.rowExpand) && e.push(t.colId);
|
|
13110
13113
|
return e;
|
|
13111
13114
|
}
|
|
13112
13115
|
invalidate() {
|
|
@@ -13136,7 +13139,7 @@ var rx = class {
|
|
|
13136
13139
|
}
|
|
13137
13140
|
refreshDetailRows(e) {
|
|
13138
13141
|
for (let t of e) {
|
|
13139
|
-
let e =
|
|
13142
|
+
let e = jt(t);
|
|
13140
13143
|
this.fullWidthRowRenderer?.refreshDetailRowContent(e);
|
|
13141
13144
|
let n = this.rowPool.get(e);
|
|
13142
13145
|
n?.refreshCells && n.refreshCells({
|
|
@@ -13348,7 +13351,7 @@ var rx = class {
|
|
|
13348
13351
|
}
|
|
13349
13352
|
updateRowAtIndex(e, t) {
|
|
13350
13353
|
let n = this.rowModel.getRow(e);
|
|
13351
|
-
if (!n ||
|
|
13354
|
+
if (!n || W(n) && !this.embedFullWidthRows || Xs(n)) return;
|
|
13352
13355
|
this.cancelPendingDestroy(n.id);
|
|
13353
13356
|
let r = this.rowPool.acquire(n.id, () => this.rowCompFactory.create()), i = this.rowModel.getRowCount(), a = e + 1 < i ? this.rowModel.getRow(e + 1) : void 0;
|
|
13354
13357
|
r.setData(n, this.columnModel, this.columnWindow, this.valueCacheVersion, i > 0 && e === i - 1, {
|
|
@@ -13357,7 +13360,7 @@ var rx = class {
|
|
|
13357
13360
|
}), r.setBeforeLoadMoreRow?.(a != null && Xs(a)), this.projectRowVisualsAtIndex(e, r, n);
|
|
13358
13361
|
}
|
|
13359
13362
|
projectRowVisualsAtIndex(e, t = this.rowPool.get(this.rowModel.getRow(e)?.id ?? ""), n = this.rowModel.getRow(e)) {
|
|
13360
|
-
n && (t ||= (this.updateRowAtIndex(e), this.rowPool.get(n.id)), t && (
|
|
13363
|
+
n && (t ||= (this.updateRowAtIndex(e), this.rowPool.get(n.id)), t && (W(n) && !this.embedFullWidthRows || Xs(n) || (t.setRowTop(this.compressedScroll ? n.rowTop - this.scrollTop : n.rowTop), t.setSelected?.(this.selectedRowIds.has(n.id)), t.setSelectionDisabled?.(!this.isRowNodeSelectable(n)), t.setIndexFocused?.(this.indexFocusedRowIds.has(n.id)), t.setIndexColumnRangeHighlight?.(this.indexColumnHighlightChecker?.(e) ?? !1), t.setFocusedColId?.(this.focusedCell?.rowId === n.id ? this.focusedCell.colId : null))));
|
|
13361
13364
|
}
|
|
13362
13365
|
findRowIndexById(e) {
|
|
13363
13366
|
let { firstRow: t, lastRow: n } = this.currentWindow;
|
|
@@ -13432,7 +13435,7 @@ function ux(e = {}) {
|
|
|
13432
13435
|
function dx(e, t, n) {
|
|
13433
13436
|
if (t.size === 0) return e.slice();
|
|
13434
13437
|
let r = [];
|
|
13435
|
-
for (let i of e)
|
|
13438
|
+
for (let i of e) Nt(i) && (r.push(i), t.has(i.id) && r.push(n(i)));
|
|
13436
13439
|
return r;
|
|
13437
13440
|
}
|
|
13438
13441
|
//#endregion
|
|
@@ -13493,7 +13496,7 @@ var hx = 1, gx = 5, _x = class {
|
|
|
13493
13496
|
this.teardownContentObserver(e);
|
|
13494
13497
|
let n = (r = 0) => {
|
|
13495
13498
|
let i = this.deps.getRowById(e);
|
|
13496
|
-
if (!i || !
|
|
13499
|
+
if (!i || !W(i)) return;
|
|
13497
13500
|
let a = mx(t);
|
|
13498
13501
|
if (a <= 0 && r < gx) {
|
|
13499
13502
|
window.setTimeout(() => n(r + 1), 0);
|
|
@@ -13539,13 +13542,13 @@ var hx = 1, gx = 5, _x = class {
|
|
|
13539
13542
|
//#endregion
|
|
13540
13543
|
//#region src/core/rowExpansion/rowExpansionService.ts
|
|
13541
13544
|
function vx(e, t) {
|
|
13542
|
-
let n =
|
|
13545
|
+
let n = Pt(t.detailRowHeight, {
|
|
13543
13546
|
rowId: e.id,
|
|
13544
13547
|
data: e.data,
|
|
13545
13548
|
masterRowId: e.id
|
|
13546
13549
|
});
|
|
13547
13550
|
return {
|
|
13548
|
-
id:
|
|
13551
|
+
id: jt(e.id),
|
|
13549
13552
|
data: e.data,
|
|
13550
13553
|
rowKind: "DETAIL",
|
|
13551
13554
|
masterRowId: e.id,
|
|
@@ -13573,11 +13576,11 @@ var yx = class {
|
|
|
13573
13576
|
}
|
|
13574
13577
|
getPinnedRowIds() {
|
|
13575
13578
|
let e = [];
|
|
13576
|
-
for (let t of this.expandedMasterIds) e.push(t,
|
|
13579
|
+
for (let t of this.expandedMasterIds) e.push(t, jt(t));
|
|
13577
13580
|
return e;
|
|
13578
13581
|
}
|
|
13579
13582
|
isRowMaster(e) {
|
|
13580
|
-
return !this.active ||
|
|
13583
|
+
return !this.active || W(e) ? !1 : this.deps.getOptions().isRowMaster({
|
|
13581
13584
|
rowId: e.id,
|
|
13582
13585
|
data: e.data,
|
|
13583
13586
|
rowIndex: e.rowIndex
|
|
@@ -13586,10 +13589,10 @@ var yx = class {
|
|
|
13586
13589
|
expandRow(e, t) {
|
|
13587
13590
|
if (!this.active || this.expandedMasterIds.has(e)) return !1;
|
|
13588
13591
|
let n = this.findBaseMasterRow(e);
|
|
13589
|
-
return !n || !this.isRowMaster(n) ? !1 : (this.expandedMasterIds.add(e), this.ensureDetailRowData(e), this.emit(
|
|
13592
|
+
return !n || !this.isRowMaster(n) ? !1 : (this.expandedMasterIds.add(e), this.ensureDetailRowData(e), this.emit(Ft(e, t)), !0);
|
|
13590
13593
|
}
|
|
13591
13594
|
collapseRow(e, t) {
|
|
13592
|
-
return !this.active || !this.expandedMasterIds.has(e) ? !1 : (this.expandedMasterIds.delete(e), this.clearMasterDetailCache(e), this.emit(
|
|
13595
|
+
return !this.active || !this.expandedMasterIds.has(e) ? !1 : (this.expandedMasterIds.delete(e), this.clearMasterDetailCache(e), this.emit(It(e, t)), !0);
|
|
13593
13596
|
}
|
|
13594
13597
|
toggleRow(e, t) {
|
|
13595
13598
|
return this.isExpanded(e) ? this.collapseRow(e, t) : this.expandRow(e, t);
|
|
@@ -13694,7 +13697,7 @@ var Sx = class {
|
|
|
13694
13697
|
this.deps = e, this.rowGroupColumns = [...e.getRowGroupColumnsFromDefs()];
|
|
13695
13698
|
}
|
|
13696
13699
|
get active() {
|
|
13697
|
-
return
|
|
13700
|
+
return dn(this.deps.getOptions().rowGrouping, this.rowGroupColumns);
|
|
13698
13701
|
}
|
|
13699
13702
|
getExpandedGroupIds() {
|
|
13700
13703
|
return this.expandedGroupIds;
|
|
@@ -13748,7 +13751,7 @@ var Sx = class {
|
|
|
13748
13751
|
});
|
|
13749
13752
|
}
|
|
13750
13753
|
getLeafGroupPathKey(e) {
|
|
13751
|
-
return !
|
|
13754
|
+
return !Cn(e) || bn(e) || xn(e) ? null : e.leafGroupPathKey ?? null;
|
|
13752
13755
|
}
|
|
13753
13756
|
getMapStageOptions() {
|
|
13754
13757
|
return {
|
|
@@ -15207,7 +15210,7 @@ var BS = class {
|
|
|
15207
15210
|
}));
|
|
15208
15211
|
return;
|
|
15209
15212
|
}
|
|
15210
|
-
let n = ++this.nextCommitId, r =
|
|
15213
|
+
let n = ++this.nextCommitId, r = ye(n, this.commitController);
|
|
15211
15214
|
this.commitController = r, this.phase = "committing", this.setCommitVisual({ rowIds: e.rowIds }), this.deps.emitStarted(hs({
|
|
15212
15215
|
rowIds: e.rowIds,
|
|
15213
15216
|
leaderRowId: e.plan.leaderRowId,
|
|
@@ -15218,7 +15221,7 @@ var BS = class {
|
|
|
15218
15221
|
try {
|
|
15219
15222
|
if (i = await t(_s(e.plan, e.nestUnderRowId, r.context)), r.context.commitId !== n) return;
|
|
15220
15223
|
} catch (e) {
|
|
15221
|
-
if (
|
|
15224
|
+
if (xe(e)) i = {
|
|
15222
15225
|
ok: !1,
|
|
15223
15226
|
aborted: !0
|
|
15224
15227
|
};
|
|
@@ -15244,7 +15247,7 @@ function VS(e, t) {
|
|
|
15244
15247
|
return e.remove?.length ? e.remove.map((e) => {
|
|
15245
15248
|
if (typeof e == "string") return e;
|
|
15246
15249
|
let n = e[t];
|
|
15247
|
-
if (n == null) throw new
|
|
15250
|
+
if (n == null) throw new se(`Missing rowKey "${t}" in remove item`);
|
|
15248
15251
|
return String(n);
|
|
15249
15252
|
}) : [];
|
|
15250
15253
|
}
|
|
@@ -15273,7 +15276,7 @@ async function WS(e, t) {
|
|
|
15273
15276
|
try {
|
|
15274
15277
|
return await t();
|
|
15275
15278
|
} catch (t) {
|
|
15276
|
-
throw t instanceof
|
|
15279
|
+
throw t instanceof se ? t : new se(`${e} persist failed`, t);
|
|
15277
15280
|
}
|
|
15278
15281
|
}
|
|
15279
15282
|
async function GS(e, t) {
|
|
@@ -15297,7 +15300,7 @@ async function GS(e, t) {
|
|
|
15297
15300
|
if (n.update && e.update?.length) {
|
|
15298
15301
|
let t = e.update.map((e) => {
|
|
15299
15302
|
let t, n;
|
|
15300
|
-
if (Rd(e) ? (t = i(e.rowId), n = e.data) : (n = e, t = HS(n, r, i, a)), !t) throw new
|
|
15303
|
+
if (Rd(e) ? (t = i(e.rowId), n = e.data) : (n = e, t = HS(n, r, i, a)), !t) throw new se(`Update target row not found for rowKey "${r}"`);
|
|
15301
15304
|
return {
|
|
15302
15305
|
rowId: t.id,
|
|
15303
15306
|
data: n
|
|
@@ -15370,12 +15373,12 @@ async function JS(e, t) {
|
|
|
15370
15373
|
signal: e.signal
|
|
15371
15374
|
}), { ok: !0 };
|
|
15372
15375
|
} catch (t) {
|
|
15373
|
-
if (
|
|
15376
|
+
if (xe(t) || e.signal.aborted) return {
|
|
15374
15377
|
ok: !1,
|
|
15375
15378
|
reason: "aborted",
|
|
15376
15379
|
aborted: !0
|
|
15377
15380
|
};
|
|
15378
|
-
if (t instanceof
|
|
15381
|
+
if (t instanceof se) return {
|
|
15379
15382
|
ok: !1,
|
|
15380
15383
|
reason: t.message
|
|
15381
15384
|
};
|
|
@@ -15394,7 +15397,7 @@ function YS(e, t = 6) {
|
|
|
15394
15397
|
}
|
|
15395
15398
|
return t;
|
|
15396
15399
|
}
|
|
15397
|
-
function XS(e, t, n =
|
|
15400
|
+
function XS(e, t, n = 0) {
|
|
15398
15401
|
let r = t, i = t, a = e.right - n, o = e.top + n, s = a - r;
|
|
15399
15402
|
return {
|
|
15400
15403
|
x: s,
|
|
@@ -15429,17 +15432,13 @@ function rC(e, t = 8) {
|
|
|
15429
15432
|
return t;
|
|
15430
15433
|
}
|
|
15431
15434
|
function iC(e) {
|
|
15432
|
-
|
|
15433
|
-
return {
|
|
15434
|
-
viewportPadding: t,
|
|
15435
|
-
anchorGap: t
|
|
15436
|
-
};
|
|
15435
|
+
return { viewportPadding: rC(e) };
|
|
15437
15436
|
}
|
|
15438
15437
|
function aC(e, t, n, r = iC(null), i = 6) {
|
|
15439
|
-
let { viewportPadding: a
|
|
15440
|
-
return
|
|
15441
|
-
left:
|
|
15442
|
-
top:
|
|
15438
|
+
let { viewportPadding: a } = r, o = e.right, s = e.top;
|
|
15439
|
+
return o + t > window.innerWidth - a && (o = e.left - t), o = Math.max(a, Math.min(o, window.innerWidth - t - a)), s = Math.max(a, Math.min(s, window.innerHeight - n - a)), {
|
|
15440
|
+
left: o,
|
|
15441
|
+
top: s
|
|
15443
15442
|
};
|
|
15444
15443
|
}
|
|
15445
15444
|
function oC(e, t) {
|
|
@@ -15609,7 +15608,7 @@ var sC = class {
|
|
|
15609
15608
|
columnSuppress: n.column.suppressCellComments,
|
|
15610
15609
|
colId: t,
|
|
15611
15610
|
rowId: n.rowId,
|
|
15612
|
-
rowKind:
|
|
15611
|
+
rowKind: At(n.rowNode.rowKind),
|
|
15613
15612
|
data: n.data,
|
|
15614
15613
|
hasExistingComment: Sc(r)
|
|
15615
15614
|
}), r);
|
|
@@ -15618,7 +15617,7 @@ var sC = class {
|
|
|
15618
15617
|
if (!this.active) return !1;
|
|
15619
15618
|
let a = this.resolveCellParams(e, t);
|
|
15620
15619
|
if (!a) return !1;
|
|
15621
|
-
let o =
|
|
15620
|
+
let o = M(e), s = n ?? void 0, c = s == null;
|
|
15622
15621
|
if (r === "ui" && !i?.bypassSuppress) {
|
|
15623
15622
|
let e = this.resolveInteraction(o, t);
|
|
15624
15623
|
if (c && !e.canDelete) return !1;
|
|
@@ -15656,14 +15655,14 @@ var sC = class {
|
|
|
15656
15655
|
this.presenceCache.delete(wc(e, t));
|
|
15657
15656
|
return;
|
|
15658
15657
|
}
|
|
15659
|
-
let n = e == null ? t == null ? null : `::${t}` : `${
|
|
15658
|
+
let n = e == null ? t == null ? null : `::${t}` : `${M(e)}::`;
|
|
15660
15659
|
if (n) for (let r of [...this.presenceCache.keys()]) (e != null && r.startsWith(n) || t != null && r.endsWith(n)) && this.presenceCache.delete(r);
|
|
15661
15660
|
}
|
|
15662
15661
|
requestRefresh(e) {
|
|
15663
15662
|
if (e?.rowIds?.length || e?.colIds?.length) {
|
|
15664
15663
|
if (e.rowIds?.length && e.colIds?.length) {
|
|
15665
|
-
for (let t of e.rowIds) if (t != null) for (let n of e.colIds) this.invalidateCache(
|
|
15666
|
-
} else if (e.rowIds?.length) for (let t of e.rowIds) t != null && this.invalidateCache(
|
|
15664
|
+
for (let t of e.rowIds) if (t != null) for (let n of e.colIds) this.invalidateCache(M(t), n);
|
|
15665
|
+
} else if (e.rowIds?.length) for (let t of e.rowIds) t != null && this.invalidateCache(M(t));
|
|
15667
15666
|
else if (e.colIds?.length) for (let t of e.colIds) this.invalidateCache(void 0, t);
|
|
15668
15667
|
} else this.invalidateCache();
|
|
15669
15668
|
this.deps.onCommentsRefresh?.(e);
|
|
@@ -15712,7 +15711,7 @@ var sC = class {
|
|
|
15712
15711
|
}
|
|
15713
15712
|
resolveCellParams(e, t) {
|
|
15714
15713
|
if (!this.active) return;
|
|
15715
|
-
let n =
|
|
15714
|
+
let n = M(e), r = this.deps.getRowNode(n), i = this.deps.getColumn(t);
|
|
15716
15715
|
if (!(!r || !i)) return {
|
|
15717
15716
|
rowId: n,
|
|
15718
15717
|
colId: t,
|
|
@@ -15819,7 +15818,7 @@ function mC(e) {
|
|
|
15819
15818
|
}
|
|
15820
15819
|
function hC(e, t, n) {
|
|
15821
15820
|
let r = n?.getRowGroupingHost?.();
|
|
15822
|
-
if (r?.active() &&
|
|
15821
|
+
if (r?.active() && cn(t, e)) {
|
|
15823
15822
|
let n = Wg(e, r, t);
|
|
15824
15823
|
return !n.visible || n.label.length === 0 ? "" : n.showCount && n.count > 0 ? `${n.label}${Gg(n.count)}` : n.label;
|
|
15825
15824
|
}
|
|
@@ -17129,7 +17128,7 @@ var jw = class {
|
|
|
17129
17128
|
//#endregion
|
|
17130
17129
|
//#region src/core/overlay/resolveOverlayType.ts
|
|
17131
17130
|
function Mw(e) {
|
|
17132
|
-
return e.filter((e) =>
|
|
17131
|
+
return e.filter((e) => At(e.rowKind) === "BUSINESS").length;
|
|
17133
17132
|
}
|
|
17134
17133
|
function Nw(e) {
|
|
17135
17134
|
let t = (t) => ku(t, e.suppressOverlays);
|
|
@@ -17266,7 +17265,7 @@ async function Lw(e, t, n = {}) {
|
|
|
17266
17265
|
errors: t.errors
|
|
17267
17266
|
});
|
|
17268
17267
|
} catch (e) {
|
|
17269
|
-
throw
|
|
17268
|
+
throw xe(e), e;
|
|
17270
17269
|
}
|
|
17271
17270
|
let c;
|
|
17272
17271
|
if (s.length > 0) if (i === "keep") c = { cellErrors: s };
|
|
@@ -17305,7 +17304,7 @@ async function Lw(e, t, n = {}) {
|
|
|
17305
17304
|
};
|
|
17306
17305
|
}
|
|
17307
17306
|
} catch (e) {
|
|
17308
|
-
throw
|
|
17307
|
+
throw xe(e), e;
|
|
17309
17308
|
}
|
|
17310
17309
|
let u = [];
|
|
17311
17310
|
try {
|
|
@@ -17326,7 +17325,7 @@ async function Lw(e, t, n = {}) {
|
|
|
17326
17325
|
}
|
|
17327
17326
|
}
|
|
17328
17327
|
} catch (t) {
|
|
17329
|
-
throw Object.assign(e.data, a),
|
|
17328
|
+
throw Object.assign(e.data, a), xe(t), t;
|
|
17330
17329
|
}
|
|
17331
17330
|
return c ? {
|
|
17332
17331
|
ok: !0,
|
|
@@ -17398,7 +17397,7 @@ async function Rw(e, t, n, r, i) {
|
|
|
17398
17397
|
validationWarnings: a.validationWarnings
|
|
17399
17398
|
}) : a;
|
|
17400
17399
|
} catch (e) {
|
|
17401
|
-
if (
|
|
17400
|
+
if (xe(e)) return { ok: "aborted" };
|
|
17402
17401
|
throw e;
|
|
17403
17402
|
}
|
|
17404
17403
|
}
|
|
@@ -17442,7 +17441,7 @@ async function zw(e, t, n, r, i, a) {
|
|
|
17442
17441
|
newValue: o
|
|
17443
17442
|
}) : { ok: !1 };
|
|
17444
17443
|
} catch (e) {
|
|
17445
|
-
if (
|
|
17444
|
+
if (xe(e)) return { ok: "aborted" };
|
|
17446
17445
|
throw e;
|
|
17447
17446
|
}
|
|
17448
17447
|
}
|
|
@@ -17510,7 +17509,7 @@ async function Hw(e, t = {}) {
|
|
|
17510
17509
|
async function Uw(e, t) {
|
|
17511
17510
|
let n = t.signal ?? new AbortController().signal, r = t.showFeedback !== !1, i = [];
|
|
17512
17511
|
for (let { rowId: a, colId: o } of t.cells) {
|
|
17513
|
-
let t =
|
|
17512
|
+
let t = M(a), s = e.rowModel.getRowById(t), c = r ? Ww(e.mountEl, t) : null;
|
|
17514
17513
|
if (!s) {
|
|
17515
17514
|
r && e.validationFeedback.clearRowCell(t, c, o);
|
|
17516
17515
|
continue;
|
|
@@ -17663,7 +17662,7 @@ function Qw(e, t) {
|
|
|
17663
17662
|
if (n?.length) {
|
|
17664
17663
|
for (let t of n) {
|
|
17665
17664
|
let n = e.deps.mountEl.querySelector(`.mg-row[data-row-id="${t}"]`);
|
|
17666
|
-
e.deps.validationFeedback.clearRow(
|
|
17665
|
+
e.deps.validationFeedback.clearRow(M(t), n);
|
|
17667
17666
|
}
|
|
17668
17667
|
Xw(e.deps);
|
|
17669
17668
|
return;
|
|
@@ -17676,7 +17675,7 @@ function $w(e, t) {
|
|
|
17676
17675
|
function eT(e, t) {
|
|
17677
17676
|
for (let { rowId: n, colId: r } of t.cells) {
|
|
17678
17677
|
let t = e.deps.mountEl.querySelector(`.mg-row[data-row-id="${n}"]`);
|
|
17679
|
-
e.deps.validationFeedback.clearRowCell(
|
|
17678
|
+
e.deps.validationFeedback.clearRowCell(M(n), t, r);
|
|
17680
17679
|
}
|
|
17681
17680
|
Xw(e.deps);
|
|
17682
17681
|
}
|
|
@@ -17748,14 +17747,14 @@ async function cT(e, t, n) {
|
|
|
17748
17747
|
return;
|
|
17749
17748
|
}
|
|
17750
17749
|
if (qr(e.deps.editBehavior)) {
|
|
17751
|
-
s.length > 0 ? e.deps.validationFeedback.setRowInvalid(t, i, s) : e.deps.validationFeedback.clearRow(
|
|
17750
|
+
s.length > 0 ? e.deps.validationFeedback.setRowInvalid(t, i, s) : e.deps.validationFeedback.clearRow(M(t), i), Xw(e.deps);
|
|
17752
17751
|
return;
|
|
17753
17752
|
}
|
|
17754
17753
|
let c = new Set(a);
|
|
17755
17754
|
for (let e of s) c.add(e.colId);
|
|
17756
17755
|
for (let n of c) {
|
|
17757
17756
|
let r = s.find((e) => e.colId === n);
|
|
17758
|
-
r ? e.deps.validationFeedback.setRowCellInvalid(t, i, r) : e.deps.validationFeedback.clearRowCell(
|
|
17757
|
+
r ? e.deps.validationFeedback.setRowCellInvalid(t, i, r) : e.deps.validationFeedback.clearRowCell(M(t), i, n);
|
|
17759
17758
|
}
|
|
17760
17759
|
Xw(e.deps);
|
|
17761
17760
|
}
|
|
@@ -17895,7 +17894,7 @@ function hT(e, t) {
|
|
|
17895
17894
|
let n = e.deps.rowModel.getRow(t.rowIndex);
|
|
17896
17895
|
if (!n) return;
|
|
17897
17896
|
let r = e.deps.columnModel.getColumnById(t.colKey);
|
|
17898
|
-
if (!r ||
|
|
17897
|
+
if (!r || j(r.colId) || v(r.colId) || _(r) || !q(r, n, e.deps.getCellDisableContext())) return;
|
|
17899
17898
|
let i = e.deps.getColIndex(r.colId);
|
|
17900
17899
|
e.deps.cellFocusService.setFocusedCell({
|
|
17901
17900
|
rowId: n.id,
|
|
@@ -19097,12 +19096,12 @@ function TE(e) {
|
|
|
19097
19096
|
T.disabled = !1;
|
|
19098
19097
|
let t = v.getSelectAllState();
|
|
19099
19098
|
T.checked = t.checked, T.indeterminate = t.indeterminate;
|
|
19100
|
-
}, D = null, O = null,
|
|
19101
|
-
|
|
19102
|
-
let
|
|
19103
|
-
if (
|
|
19099
|
+
}, D = null, O = null, k = document.createElement("div");
|
|
19100
|
+
k.className = "mg-column-handle-menu__filter-set-list-host";
|
|
19101
|
+
let A = () => {
|
|
19102
|
+
if (k.replaceChildren(), D = null, O = null, i.length === 0) {
|
|
19104
19103
|
let e = document.createElement("div");
|
|
19105
|
-
e.className = "mg-column-handle-menu__filter-set-empty", e.textContent = "暂无可选值",
|
|
19104
|
+
e.className = "mg-column-handle-menu__filter-set-empty", e.textContent = "暂无可选值", k.append(e), j();
|
|
19106
19105
|
return;
|
|
19107
19106
|
}
|
|
19108
19107
|
if (_ && b() === "tree") {
|
|
@@ -19111,29 +19110,29 @@ function TE(e) {
|
|
|
19111
19110
|
selection: v,
|
|
19112
19111
|
searchQuery: g.value,
|
|
19113
19112
|
onSelectionChange: () => {
|
|
19114
|
-
E(),
|
|
19113
|
+
E(), te("set");
|
|
19115
19114
|
},
|
|
19116
19115
|
emptySearchLabel: "无匹配项",
|
|
19117
19116
|
abortSignal: l
|
|
19118
|
-
}),
|
|
19117
|
+
}), k.append(O.element), j();
|
|
19119
19118
|
return;
|
|
19120
19119
|
}
|
|
19121
19120
|
D = new vE({
|
|
19122
19121
|
options: y(),
|
|
19123
19122
|
selection: v,
|
|
19124
19123
|
onSelectionChange: () => {
|
|
19125
|
-
E(),
|
|
19124
|
+
E(), te("set");
|
|
19126
19125
|
},
|
|
19127
19126
|
emptySearchLabel: "无匹配项",
|
|
19128
19127
|
abortSignal: l
|
|
19129
|
-
}),
|
|
19130
|
-
},
|
|
19128
|
+
}), k.append(D.element), j();
|
|
19129
|
+
}, j = () => {
|
|
19131
19130
|
let e = bE.get(h);
|
|
19132
19131
|
e && (e.virtualList = D, e.dateTreeView = O);
|
|
19133
|
-
},
|
|
19132
|
+
}, te = (e) => {
|
|
19134
19133
|
let t = v.snapshot(), n = rE(t, C(), x(), S());
|
|
19135
19134
|
if (e === "set" && n === null) return;
|
|
19136
|
-
let r = n ?? t, i =
|
|
19135
|
+
let r = n ?? t, i = M.readState();
|
|
19137
19136
|
s({
|
|
19138
19137
|
source: e,
|
|
19139
19138
|
operatorLogic: i.operatorLogic,
|
|
@@ -19141,44 +19140,44 @@ function TE(e) {
|
|
|
19141
19140
|
setAllSelected: r.setAllSelected,
|
|
19142
19141
|
selectedValues: r.selectedValues
|
|
19143
19142
|
});
|
|
19143
|
+
}, ne = () => {
|
|
19144
|
+
te("operator");
|
|
19144
19145
|
}, re = () => {
|
|
19145
|
-
|
|
19146
|
-
},
|
|
19147
|
-
ne("set");
|
|
19148
|
-
}, j = eE({
|
|
19146
|
+
te("set");
|
|
19147
|
+
}, M = eE({
|
|
19149
19148
|
columnFilterType: r,
|
|
19150
19149
|
initialState: {
|
|
19151
19150
|
operatorLogic: d.operatorLogic,
|
|
19152
19151
|
operatorConditions: d.operatorConditions
|
|
19153
19152
|
},
|
|
19154
19153
|
abortSignal: l,
|
|
19155
|
-
onInput:
|
|
19154
|
+
onInput: ne,
|
|
19156
19155
|
onStopPropagation: m
|
|
19157
19156
|
});
|
|
19158
|
-
p.append(
|
|
19157
|
+
p.append(M.element), xE.set(f, M), i.length === 0 && (g.disabled = !0, T.disabled = !0), h.append(k), A(), bE.set(h, {
|
|
19159
19158
|
allOptions: i,
|
|
19160
19159
|
searchInput: g,
|
|
19161
19160
|
selection: v,
|
|
19162
19161
|
virtualList: D,
|
|
19163
19162
|
dateTreeView: O,
|
|
19164
|
-
mountOptionsView:
|
|
19163
|
+
mountOptionsView: A,
|
|
19165
19164
|
getFilteredKeys: x,
|
|
19166
19165
|
isSearchActive: S,
|
|
19167
19166
|
getValueMode: C,
|
|
19168
19167
|
syncSelectAllUi: E
|
|
19169
19168
|
}), E(), g.addEventListener("input", () => {
|
|
19170
|
-
_ && b() === "tree" ? O?.setSearchQuery(g.value) : D?.setOptions(y()), E(), C() === "current" &&
|
|
19169
|
+
_ && b() === "tree" ? O?.setSearchQuery(g.value) : D?.setOptions(y()), E(), C() === "current" && re();
|
|
19171
19170
|
}, { signal: l }), g.addEventListener("mousedown", m, { signal: l }), g.addEventListener("click", m, { signal: l }), h.addEventListener("mousedown", m, { signal: l }), h.addEventListener("click", m, { signal: l }), h.addEventListener("change", (e) => {
|
|
19172
19171
|
let t = e.target;
|
|
19173
19172
|
if (!(!(t instanceof HTMLInputElement) || t.type !== "checkbox") && t === T) {
|
|
19174
19173
|
let e = x();
|
|
19175
|
-
S() ? v.setKeysChecked(e, T.checked) : v.setSelectAll(T.checked), E(), D?.refresh(), O?.refresh(),
|
|
19174
|
+
S() ? v.setKeysChecked(e, T.checked) : v.setSelectAll(T.checked), E(), D?.refresh(), O?.refresh(), re();
|
|
19176
19175
|
}
|
|
19177
19176
|
}, { signal: l });
|
|
19178
|
-
let
|
|
19179
|
-
|
|
19180
|
-
let
|
|
19181
|
-
return
|
|
19177
|
+
let ie = document.createElement("div");
|
|
19178
|
+
ie.className = "mg-column-handle-menu__filter-actions";
|
|
19179
|
+
let ae = wE(c, l);
|
|
19180
|
+
return ie.append(ae), f.append(p, h, ie), {
|
|
19182
19181
|
root: f,
|
|
19183
19182
|
panelRoot: f,
|
|
19184
19183
|
customPredicate: !1,
|
|
@@ -19655,18 +19654,18 @@ function nD(e, t = {}) {
|
|
|
19655
19654
|
b.className = "mg-scroll-phantom", b.setAttribute("aria-hidden", "true"), p.appendChild(m), p.appendChild(b), f.appendChild(p), d.appendChild(f);
|
|
19656
19655
|
let { overlayEl: x, wrapperEl: S, contentEl: C } = Ew();
|
|
19657
19656
|
d.appendChild(x), n.appendChild(r);
|
|
19658
|
-
let w, T, ee, E, D, O,
|
|
19657
|
+
let w, T, ee, E, D, O, k;
|
|
19659
19658
|
if (t.floatingFilter) {
|
|
19660
|
-
w = document.createElement("div"), w.className = "mg-floating-filter-viewport", T = document.createElement("div"), T.className = "mg-floating-filter-scroll", ee = document.createElement("div"), ee.className = "mg-floating-filter-gutter", ee.setAttribute("aria-hidden", "true"), E = document.createElement("div"), E.className = "mg-floating-filter-row", D = tD("left"), O = tD("center"),
|
|
19659
|
+
w = document.createElement("div"), w.className = "mg-floating-filter-viewport", T = document.createElement("div"), T.className = "mg-floating-filter-scroll", ee = document.createElement("div"), ee.className = "mg-floating-filter-gutter", ee.setAttribute("aria-hidden", "true"), E = document.createElement("div"), E.className = "mg-floating-filter-row", D = tD("left"), O = tD("center"), k = tD("right"), E.append(D, O, k);
|
|
19661
19660
|
let e = document.createElement("div");
|
|
19662
19661
|
e.className = "mg-floating-filter-span", e.setAttribute("aria-hidden", "true"), T.append(E, e), w.append(T, ee), n.appendChild(w);
|
|
19663
19662
|
}
|
|
19664
19663
|
n.appendChild(d);
|
|
19665
|
-
let
|
|
19664
|
+
let A, j, te, ne, re, M, ie;
|
|
19666
19665
|
if (t.showSummary) {
|
|
19667
|
-
|
|
19666
|
+
A = document.createElement("div"), A.className = "mg-footer-viewport", j = document.createElement("div"), j.className = "mg-footer-scroll", te = document.createElement("div"), te.className = "mg-footer-gutter", te.setAttribute("aria-hidden", "true"), ne = document.createElement("div"), ne.className = "mg-footer-row", re = eD("left"), M = eD("center"), ie = eD("right"), ne.append(re, M, ie);
|
|
19668
19667
|
let e = document.createElement("div");
|
|
19669
|
-
e.className = "mg-footer-span", e.setAttribute("aria-hidden", "true"),
|
|
19668
|
+
e.className = "mg-footer-span", e.setAttribute("aria-hidden", "true"), j.append(ne, e), A.append(j, te), n.appendChild(A);
|
|
19670
19669
|
}
|
|
19671
19670
|
return e.appendChild(n), {
|
|
19672
19671
|
rootEl: n,
|
|
@@ -19686,20 +19685,20 @@ function nD(e, t = {}) {
|
|
|
19686
19685
|
rowsContainerEl: _,
|
|
19687
19686
|
spannedRowsContainerEl: v,
|
|
19688
19687
|
fullWidthRowsContainerEl: y,
|
|
19689
|
-
footerViewportEl:
|
|
19690
|
-
footerScrollEl:
|
|
19691
|
-
footerGutterEl:
|
|
19692
|
-
footerRowEl:
|
|
19693
|
-
footerLeftLaneEl:
|
|
19694
|
-
footerCenterLaneEl:
|
|
19695
|
-
footerRightLaneEl:
|
|
19688
|
+
footerViewportEl: A,
|
|
19689
|
+
footerScrollEl: j,
|
|
19690
|
+
footerGutterEl: te,
|
|
19691
|
+
footerRowEl: ne,
|
|
19692
|
+
footerLeftLaneEl: re,
|
|
19693
|
+
footerCenterLaneEl: M,
|
|
19694
|
+
footerRightLaneEl: ie,
|
|
19696
19695
|
floatingFilterViewportEl: w,
|
|
19697
19696
|
floatingFilterScrollEl: T,
|
|
19698
19697
|
floatingFilterGutterEl: ee,
|
|
19699
19698
|
floatingFilterRowEl: E,
|
|
19700
19699
|
floatingFilterLeftLaneEl: D,
|
|
19701
19700
|
floatingFilterCenterLaneEl: O,
|
|
19702
|
-
floatingFilterRightLaneEl:
|
|
19701
|
+
floatingFilterRightLaneEl: k,
|
|
19703
19702
|
overlayEl: x,
|
|
19704
19703
|
overlayWrapperEl: S,
|
|
19705
19704
|
overlayContentEl: C
|
|
@@ -19811,7 +19810,7 @@ var SD = class {
|
|
|
19811
19810
|
let t = n.columnModel.getColumn(e);
|
|
19812
19811
|
if (!t) continue;
|
|
19813
19812
|
let i = document.createElement("div");
|
|
19814
|
-
i.className = rD, i.dataset.colId = t.colId,
|
|
19813
|
+
i.className = rD, i.dataset.colId = t.colId, j(t.colId) ? i.classList.add("mg-floating-filter-cell--index") : v(t.colId) && i.classList.add("mg-floating-filter-cell--selection");
|
|
19815
19814
|
let a = n.filterModel[t.colId], o = vD(t.filterable, a), s = yD(t.filterable, a);
|
|
19816
19815
|
if (t.filterable) {
|
|
19817
19816
|
let e = document.createElement("div");
|
|
@@ -20004,7 +20003,7 @@ var qD = class {
|
|
|
20004
20003
|
return this.drag != null;
|
|
20005
20004
|
}
|
|
20006
20005
|
canStart(e, t, n) {
|
|
20007
|
-
if (n || !e?.movable || e.hidden ||
|
|
20006
|
+
if (n || !e?.movable || e.hidden || j(e.colId) || v(e.colId)) return !1;
|
|
20008
20007
|
let r = $(t);
|
|
20009
20008
|
return !(r?.closest(".mg-selection-checkbox--header") || !r?.closest(".mg-header-cell__column-handle"));
|
|
20010
20009
|
}
|
|
@@ -20430,7 +20429,7 @@ var XD = class {
|
|
|
20430
20429
|
let n = this.deps.cellFocusService.getFocusedCell();
|
|
20431
20430
|
if (!n || !um(n)) return !1;
|
|
20432
20431
|
let r = n.colId;
|
|
20433
|
-
if (
|
|
20432
|
+
if (j(r) || v(r) || !this.deps.columnModel.getColumnById(r)?.resizable) return !1;
|
|
20434
20433
|
(!this.keyboardColumnResize || this.keyboardColumnResize.colId !== r) && (this.keyboardColumnResize = {
|
|
20435
20434
|
colId: r,
|
|
20436
20435
|
multiplier: 0
|
|
@@ -20607,7 +20606,7 @@ var XD = class {
|
|
|
20607
20606
|
let t = this.deps.cellFocusService.getFocusedCell();
|
|
20608
20607
|
if (!t || !um(t)) return !1;
|
|
20609
20608
|
let n = t.colId;
|
|
20610
|
-
if (
|
|
20609
|
+
if (j(n) || v(n)) return !1;
|
|
20611
20610
|
let r = dv({
|
|
20612
20611
|
columns: this.deps.columnModel.getColumns(),
|
|
20613
20612
|
colId: n,
|
|
@@ -21417,11 +21416,11 @@ var SO = class {
|
|
|
21417
21416
|
refreshVisualState() {
|
|
21418
21417
|
let e = this.rowResize;
|
|
21419
21418
|
if (!e) return;
|
|
21420
|
-
let t = lw(this.deps.mountEl).querySelector(`.mg-row[data-row-id="${CSS.escape(e.rowId)}"] .mg-cell[data-col-id="${CSS.escape(
|
|
21419
|
+
let t = lw(this.deps.mountEl).querySelector(`.mg-row[data-row-id="${CSS.escape(e.rowId)}"] .mg-cell[data-col-id="${CSS.escape(pe)}"]`);
|
|
21421
21420
|
t && (e.sourceCell = t, this.markActiveCell(t));
|
|
21422
21421
|
}
|
|
21423
21422
|
canStart(e, t, n) {
|
|
21424
|
-
return n || this.rowResize || !this.deps.indexColumnOptions.showIndexColumn || !this.deps.indexColumnOptions.indexColumn.enableRowResizer || !
|
|
21423
|
+
return n || this.rowResize || !this.deps.indexColumnOptions.showIndexColumn || !this.deps.indexColumnOptions.indexColumn.enableRowResizer || !j(e) ? !1 : $(t)?.closest(`.${vs}`) != null;
|
|
21425
21424
|
}
|
|
21426
21425
|
begin(e) {
|
|
21427
21426
|
this.end(!1);
|
|
@@ -21998,37 +21997,48 @@ var RO = class {
|
|
|
21998
21997
|
}
|
|
21999
21998
|
handleViewportMouseMove = (e) => {
|
|
22000
21999
|
let t = this.deps.getOptions();
|
|
22001
|
-
if (t.cellCommentTrigger !== "hover") return;
|
|
22002
22000
|
if ($(e.target)?.closest(".mg-cell-comment-popup")) {
|
|
22003
22001
|
this.clearHideTimer();
|
|
22004
22002
|
return;
|
|
22005
22003
|
}
|
|
22006
22004
|
let n = sw(this.deps.rowModel, e.target), r = this.deps.cellCommentService();
|
|
22007
22005
|
if (!n || !r?.active) {
|
|
22008
|
-
this.
|
|
22006
|
+
this.leaveCellHover();
|
|
22009
22007
|
return;
|
|
22010
22008
|
}
|
|
22011
22009
|
let i = this.resolveCellElement(n.rowId, n.colId);
|
|
22012
|
-
if (!i || !r.hasComment(n.rowId, n.colId)
|
|
22013
|
-
this.
|
|
22010
|
+
if (!i || !r.hasComment(n.rowId, n.colId)) {
|
|
22011
|
+
this.leaveCellHover();
|
|
22014
22012
|
return;
|
|
22015
22013
|
}
|
|
22016
22014
|
if (!r.resolveInteraction(n.rowId, n.colId).canView) {
|
|
22017
|
-
this.
|
|
22015
|
+
this.leaveCellHover();
|
|
22018
22016
|
return;
|
|
22019
22017
|
}
|
|
22020
|
-
this.clearHideTimer()
|
|
22021
|
-
|
|
22022
|
-
|
|
22023
|
-
|
|
22024
|
-
|
|
22025
|
-
|
|
22026
|
-
|
|
22018
|
+
this.clearHideTimer();
|
|
22019
|
+
let a = this.hoverCell?.rowId === n.rowId && this.hoverCell?.colId === n.colId, o = r.getOpenEditorCell(), s = r.getPopup().isOpen;
|
|
22020
|
+
if (!(a && s && o?.rowId === n.rowId && o.colId === n.colId)) {
|
|
22021
|
+
if (!a) {
|
|
22022
|
+
this.clearHoverTimers();
|
|
22023
|
+
let e = s && o != null && (o.rowId !== n.rowId || o.colId !== n.colId);
|
|
22024
|
+
if (e && (r.closeEditor(), this.detachPopupHoverListeners()), this.hoverCell = {
|
|
22025
|
+
rowId: n.rowId,
|
|
22026
|
+
colId: n.colId,
|
|
22027
|
+
anchorEl: i
|
|
22028
|
+
}, e) {
|
|
22029
|
+
this.openHoverPopup(n.rowId, n.colId, i, r);
|
|
22030
|
+
return;
|
|
22031
|
+
}
|
|
22032
|
+
}
|
|
22033
|
+
this.showTimer ??= setTimeout(() => {
|
|
22034
|
+
this.openHoverPopup(n.rowId, n.colId, i, r);
|
|
22035
|
+
}, t.cellCommentShowDelay);
|
|
22036
|
+
}
|
|
22027
22037
|
};
|
|
22028
22038
|
handleViewportMouseLeave = () => {
|
|
22029
|
-
this.
|
|
22039
|
+
this.leaveCellHover();
|
|
22030
22040
|
};
|
|
22031
|
-
|
|
22041
|
+
leaveCellHover() {
|
|
22032
22042
|
this.scheduleHide(), this.hoverCell = null;
|
|
22033
22043
|
}
|
|
22034
22044
|
clearHideTimer() {
|
|
@@ -22056,7 +22066,7 @@ var RO = class {
|
|
|
22056
22066
|
e.getPopup().updatePosition();
|
|
22057
22067
|
}
|
|
22058
22068
|
openHoverPopup(e, t, n, r) {
|
|
22059
|
-
let i = r.getComment(e, t), a = r.resolveInteraction(e, t), o = i?.readOnly === !0 || !a.canEdit ? "view" : "edit";
|
|
22069
|
+
let i = r.getComment(e, t), a = r.resolveInteraction(e, t), o = this.deps.getOptions().cellCommentTrigger === "click" || i?.readOnly === !0 || !a.canEdit ? "view" : "edit";
|
|
22060
22070
|
r.openEditor({
|
|
22061
22071
|
rowId: e,
|
|
22062
22072
|
colId: t,
|
|
@@ -22087,12 +22097,12 @@ var RO = class {
|
|
|
22087
22097
|
this.clearHoverTimers();
|
|
22088
22098
|
let e = this.deps.getOptions();
|
|
22089
22099
|
this.hideTimer = setTimeout(() => {
|
|
22090
|
-
let
|
|
22091
|
-
if (!
|
|
22100
|
+
let e = this.deps.cellCommentService();
|
|
22101
|
+
if (!e?.getPopup().isOpen) {
|
|
22092
22102
|
this.hoverCell = null;
|
|
22093
22103
|
return;
|
|
22094
22104
|
}
|
|
22095
|
-
e.
|
|
22105
|
+
e.closeEditor(), this.hoverCell = null;
|
|
22096
22106
|
}, e.cellCommentHideDelay);
|
|
22097
22107
|
}
|
|
22098
22108
|
clearHoverTimers() {
|
|
@@ -22143,18 +22153,18 @@ var BO = class {
|
|
|
22143
22153
|
this.focusController?.setFocusedCell(e);
|
|
22144
22154
|
}
|
|
22145
22155
|
isIndexColumnEntry(e) {
|
|
22146
|
-
return
|
|
22156
|
+
return j(e) && this.deps.columnModel.getColumnById(e) != null;
|
|
22147
22157
|
}
|
|
22148
22158
|
isSelectionColumnEntry(e) {
|
|
22149
22159
|
return v(e) && this.deps.columnModel.getColumnById(e) != null && this.deps.selectionService != null;
|
|
22150
22160
|
}
|
|
22151
22161
|
isExpandColumnEntry(e) {
|
|
22152
22162
|
let t = this.deps.columnModel.getColumnById(e);
|
|
22153
|
-
return !t || !this.deps.rowExpansionService?.active ? !1 :
|
|
22163
|
+
return !t || !this.deps.rowExpansionService?.active ? !1 : Dt(t);
|
|
22154
22164
|
}
|
|
22155
22165
|
isGroupColumnEntry(e) {
|
|
22156
22166
|
let t = this.deps.columnModel.getColumnById(e);
|
|
22157
|
-
return !t || !this.deps.rowGroupingService?.active ? !1 :
|
|
22167
|
+
return !t || !this.deps.rowGroupingService?.active ? !1 : on(t);
|
|
22158
22168
|
}
|
|
22159
22169
|
isTreeColumnEntry(e) {
|
|
22160
22170
|
let t = this.deps.columnModel.getColumnById(e);
|
|
@@ -22164,7 +22174,7 @@ var BO = class {
|
|
|
22164
22174
|
return this.deps.selectionService?.isMultiple() ?? !1;
|
|
22165
22175
|
}
|
|
22166
22176
|
canToggleHeaderSort(e) {
|
|
22167
|
-
return this.ctx.isColumnResizing() || this.deps.columnDragController.shouldSuppressSortClick() ||
|
|
22177
|
+
return this.ctx.isColumnResizing() || this.deps.columnDragController.shouldSuppressSortClick() || j(e) || v(e) || this.isExpandColumnEntry(e) || this.isGroupColumnEntry(e) || this.isTreeColumnEntry(e) || !this.deps.enableHeaderSortClick() ? !1 : this.deps.columnModel.getColumnById(e)?.sortable ?? !1;
|
|
22168
22178
|
}
|
|
22169
22179
|
applyIndexFocus(e, t, n, r = {}) {
|
|
22170
22180
|
!this.deps.indexFocusService || !this.isIndexColumnEntry(n) || (this.deps.indexFocusService.selectRow(e, t, (e) => this.deps.rowModel.getRow(e)?.id, r), this.deps.applyIndexFocusVisuals(), this.deps.eventBus.emit("indexFocusChanged", { focusedRowIds: this.deps.indexFocusService.getFocusedRowIds() }), this.syncCellRangeFromIndexFocus(t));
|
|
@@ -22190,13 +22200,13 @@ var BO = class {
|
|
|
22190
22200
|
applyRowExpansionToggle(e, t, n) {
|
|
22191
22201
|
if (!this.deps.rowExpansionService?.active || !this.isExpandColumnEntry(n)) return;
|
|
22192
22202
|
let r = this.deps.rowModel.getRow(t);
|
|
22193
|
-
!r ||
|
|
22203
|
+
!r || W(r) || !this.deps.rowExpansionService.isRowMaster(r) || this.deps.rowExpansionService.toggleRow(e, "ui");
|
|
22194
22204
|
}
|
|
22195
22205
|
applyRowGroupingToggle(e, t, n) {
|
|
22196
22206
|
if (!this.deps.rowGroupingService?.active || !this.isGroupColumnEntry(n)) return;
|
|
22197
22207
|
let r = this.deps.rowModel.getRow(t);
|
|
22198
|
-
if (!r || !
|
|
22199
|
-
let i = r.sourceGroupId ??
|
|
22208
|
+
if (!r || !bn(r)) return;
|
|
22209
|
+
let i = r.sourceGroupId ?? yn(r.id) ?? r.groupId;
|
|
22200
22210
|
i && this.deps.rowGroupingService.toggleGroup(i, "ui");
|
|
22201
22211
|
}
|
|
22202
22212
|
applyTreeTableToggle(e, t, n) {
|
|
@@ -22670,7 +22680,7 @@ var HO = class {
|
|
|
22670
22680
|
this.ctx.deps.eventBus.emit("cellClicked", this.buildCellClickedPayload(e));
|
|
22671
22681
|
}
|
|
22672
22682
|
emitRowPointerEvent(e, t) {
|
|
22673
|
-
|
|
22683
|
+
Cn(t.rowNode) && this.ctx.deps.eventBus.emit(e, {
|
|
22674
22684
|
rowId: t.rowId,
|
|
22675
22685
|
colId: t.colId,
|
|
22676
22686
|
rowIndex: t.rowIndex,
|
|
@@ -23592,7 +23602,7 @@ var vk = class {
|
|
|
23592
23602
|
e.hidden = !0;
|
|
23593
23603
|
return;
|
|
23594
23604
|
}
|
|
23595
|
-
let n = this.deps.columnModel.getColumnById(
|
|
23605
|
+
let n = this.deps.columnModel.getColumnById(pe);
|
|
23596
23606
|
if (!n || n.hidden) {
|
|
23597
23607
|
e.hidden = !0;
|
|
23598
23608
|
return;
|
|
@@ -24063,7 +24073,7 @@ var Mk = class {
|
|
|
24063
24073
|
resolvePresetTargetRowIds(e) {
|
|
24064
24074
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
24065
24075
|
for (let r of e) {
|
|
24066
|
-
let e =
|
|
24076
|
+
let e = M(r);
|
|
24067
24077
|
if (n.has(e)) continue;
|
|
24068
24078
|
n.add(e);
|
|
24069
24079
|
let i = this.deps.rowModel.getRowById(e) ?? this.deps.rowModel.resolveRowById(e);
|
|
@@ -24073,7 +24083,7 @@ var Mk = class {
|
|
|
24073
24083
|
}
|
|
24074
24084
|
toggleRowSelection(e, t, n) {
|
|
24075
24085
|
if (!this.deps.selectionService) return;
|
|
24076
|
-
let r =
|
|
24086
|
+
let r = k(e), i = !1, a = this.deps.selectionService.isMultiple(), o = [];
|
|
24077
24087
|
for (let e of r) {
|
|
24078
24088
|
let r = this.deps.rowModel.getRowById(e);
|
|
24079
24089
|
if (!r) continue;
|
|
@@ -24119,7 +24129,7 @@ var Mk = class {
|
|
|
24119
24129
|
}
|
|
24120
24130
|
setIndexFocus(e, t = {}) {
|
|
24121
24131
|
if (!this.deps.indexFocusService) return;
|
|
24122
|
-
let n =
|
|
24132
|
+
let n = k(e).map((e) => {
|
|
24123
24133
|
let t = this.deps.rowModel.getRowIndexById(e);
|
|
24124
24134
|
return t >= 0 ? {
|
|
24125
24135
|
id: e,
|
|
@@ -24152,7 +24162,7 @@ var Mk = class {
|
|
|
24152
24162
|
}));
|
|
24153
24163
|
}
|
|
24154
24164
|
isRowNodeSelectable(e) {
|
|
24155
|
-
return
|
|
24165
|
+
return W(e) || Sn(e) || e.__infiniteBlockState != null && e.__infiniteBlockState !== "loaded" ? !1 : X_(this.selectableFn, e, this.deps.rowKey);
|
|
24156
24166
|
}
|
|
24157
24167
|
getSelectableRowIdAt(e) {
|
|
24158
24168
|
let t = this.deps.rowModel.getRow(e);
|
|
@@ -24303,8 +24313,8 @@ function zk(e, t, n, r = "desc") {
|
|
|
24303
24313
|
//#region src/core/rowGrouping/resolveGroupInsertIndex.ts
|
|
24304
24314
|
function Bk(e) {
|
|
24305
24315
|
let t = [], n = e;
|
|
24306
|
-
for (; n.includes(
|
|
24307
|
-
let e = n.lastIndexOf(
|
|
24316
|
+
for (; n.includes(Bt);) {
|
|
24317
|
+
let e = n.lastIndexOf(Bt), r = (e === 0 ? n : n.slice(e)).match(/^group::L(\d+)::([^:]+)::(.+)$/);
|
|
24308
24318
|
if (!r) break;
|
|
24309
24319
|
t.unshift({
|
|
24310
24320
|
level: Number.parseInt(r[1], 10),
|
|
@@ -24327,7 +24337,7 @@ function Hk(e, t, n) {
|
|
|
24327
24337
|
for (let o = 0; o < e.length; o += 1) {
|
|
24328
24338
|
let s = e[o], c = t[o];
|
|
24329
24339
|
if (!c) return null;
|
|
24330
|
-
let l = n(c) ?? s.field, u =
|
|
24340
|
+
let l = n(c) ?? s.field, u = fn(s.key), d = pn(o, l, u, a);
|
|
24331
24341
|
r.push(d), i.push({
|
|
24332
24342
|
field: l,
|
|
24333
24343
|
key: u
|
|
@@ -24335,7 +24345,7 @@ function Hk(e, t, n) {
|
|
|
24335
24345
|
}
|
|
24336
24346
|
return {
|
|
24337
24347
|
leafGroupId: r[r.length - 1],
|
|
24338
|
-
groupPathKey:
|
|
24348
|
+
groupPathKey: mn(r),
|
|
24339
24349
|
groupPath: i,
|
|
24340
24350
|
groupIds: r
|
|
24341
24351
|
};
|
|
@@ -24371,7 +24381,7 @@ function Jk(e, t, n) {
|
|
|
24371
24381
|
let { sourceRows: r, displayRows: i, hasSortOrFilter: a } = n;
|
|
24372
24382
|
if (t === "display" || a) {
|
|
24373
24383
|
let t = 0;
|
|
24374
|
-
for (let n of i)
|
|
24384
|
+
for (let n of i) Cn(n) && r.find((e) => e.id === n.id)?.leafGroupPathKey === e && (t += 1);
|
|
24375
24385
|
return t;
|
|
24376
24386
|
}
|
|
24377
24387
|
return r.filter((t) => t.leafGroupPathKey === e).length;
|
|
@@ -24383,7 +24393,7 @@ function Yk(e) {
|
|
|
24383
24393
|
let e = [];
|
|
24384
24394
|
for (let i = 0; i < n.length; i += 1) {
|
|
24385
24395
|
let a = n[i];
|
|
24386
|
-
|
|
24396
|
+
Cn(a) && t.find((e) => e.id === a.id)?.leafGroupPathKey === r && e.push(i);
|
|
24387
24397
|
}
|
|
24388
24398
|
let a = Math.max(0, Math.min(i, e.length));
|
|
24389
24399
|
if (e.length === 0) return t.length;
|
|
@@ -24764,7 +24774,7 @@ var uA = class {
|
|
|
24764
24774
|
return u(t, this.deps.rowModel.getRowKey());
|
|
24765
24775
|
}
|
|
24766
24776
|
promoteRowId(e) {
|
|
24767
|
-
let t =
|
|
24777
|
+
let t = M(e.rowId), { businessId: n } = e;
|
|
24768
24778
|
if (this.deps.isEditingTargetRow(t)) return {
|
|
24769
24779
|
ok: !1,
|
|
24770
24780
|
reason: "Row is being edited"
|
|
@@ -25926,19 +25936,19 @@ var BA = class {
|
|
|
25926
25936
|
this.deps.reconcileRowPoolAfterDisplayChange();
|
|
25927
25937
|
}
|
|
25928
25938
|
expandRow(e) {
|
|
25929
|
-
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.expandRow(
|
|
25939
|
+
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.expandRow(M(e), "api") : !1;
|
|
25930
25940
|
}
|
|
25931
25941
|
collapseRow(e) {
|
|
25932
|
-
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.collapseRow(
|
|
25942
|
+
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.collapseRow(M(e), "api") : !1;
|
|
25933
25943
|
}
|
|
25934
25944
|
isRowExpanded(e) {
|
|
25935
|
-
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.isExpanded(
|
|
25945
|
+
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.isExpanded(M(e)) : !1;
|
|
25936
25946
|
}
|
|
25937
25947
|
setDetailRowData(e, t) {
|
|
25938
|
-
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.setDetailRowData(
|
|
25948
|
+
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.setDetailRowData(M(e), t) : !1;
|
|
25939
25949
|
}
|
|
25940
25950
|
reloadDetailRowData(e) {
|
|
25941
|
-
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.reloadDetailRowData(
|
|
25951
|
+
return this.deps.rowExpansionOptions.masterDetail ? this.deps.rowExpansionService.reloadDetailRowData(M(e)) : !1;
|
|
25942
25952
|
}
|
|
25943
25953
|
expandAll() {
|
|
25944
25954
|
this.deps.treeTableService.active ? this.deps.treeTableService.expandAll("api") : this.deps.rowGroupingService.active && this.deps.rowGroupingService.expandAll("api"), this.deps.rowExpansionOptions.masterDetail && this.deps.rowExpansionService.expandAll("api");
|
|
@@ -25966,19 +25976,19 @@ var BA = class {
|
|
|
25966
25976
|
}
|
|
25967
25977
|
expandNode(e) {
|
|
25968
25978
|
if (!this.deps.treeTableService.active) return !1;
|
|
25969
|
-
let t =
|
|
25979
|
+
let t = M(e);
|
|
25970
25980
|
return this.deps.treeTableService.isExpanded(t) ? !0 : (this.deps.treeTableService.requestToggleNode(t, "api"), this.deps.treeTableService.isExpanded(t));
|
|
25971
25981
|
}
|
|
25972
25982
|
collapseNode(e) {
|
|
25973
25983
|
if (!this.deps.treeTableService.active) return !1;
|
|
25974
|
-
let t =
|
|
25984
|
+
let t = M(e);
|
|
25975
25985
|
return !this.deps.treeTableService.isExpanded(t) || (this.deps.treeTableService.collapseNode(t, "api"), !this.deps.treeTableService.isExpanded(t));
|
|
25976
25986
|
}
|
|
25977
25987
|
isNodeExpanded(e) {
|
|
25978
|
-
return this.deps.treeTableService.active ? this.deps.treeTableService.isExpanded(
|
|
25988
|
+
return this.deps.treeTableService.active ? this.deps.treeTableService.isExpanded(M(e)) : !1;
|
|
25979
25989
|
}
|
|
25980
25990
|
getDataPath(e) {
|
|
25981
|
-
if (this.deps.treeTableService.active) return this.deps.treeTableService.getDataPathForRow(
|
|
25991
|
+
if (this.deps.treeTableService.active) return this.deps.treeTableService.getDataPathForRow(M(e));
|
|
25982
25992
|
}
|
|
25983
25993
|
resolveTreeHierarchyActions(e) {
|
|
25984
25994
|
if (!K(e)) return { visible: !1 };
|
|
@@ -26022,17 +26032,17 @@ var BA = class {
|
|
|
26022
26032
|
if (!this.deps.rowExpansionOptions.masterDetail) return;
|
|
26023
26033
|
let t = this.deps.viewport.captureScrollAnchor(), n = 0, r = 0;
|
|
26024
26034
|
if (e?.rowId != null) {
|
|
26025
|
-
let t =
|
|
26035
|
+
let t = M(e.rowId);
|
|
26026
26036
|
if (e.expanded) {
|
|
26027
26037
|
let e = this.deps.rowModel.getDisplayRowById(t);
|
|
26028
26038
|
e && (n = e.rowTop + e.rowHeight);
|
|
26029
26039
|
} else {
|
|
26030
|
-
let e = this.deps.rowModel.getDisplayRowById(
|
|
26040
|
+
let e = this.deps.rowModel.getDisplayRowById(jt(t));
|
|
26031
26041
|
e && (n = e.rowTop, r = -e.rowHeight);
|
|
26032
26042
|
}
|
|
26033
26043
|
}
|
|
26034
26044
|
if (this.deps.rowModel.rebuildDisplayProjection(), e?.expanded && e.rowId != null) {
|
|
26035
|
-
let t = this.deps.rowModel.getDisplayRowById(
|
|
26045
|
+
let t = this.deps.rowModel.getDisplayRowById(jt(M(e.rowId)));
|
|
26036
26046
|
t && (n = t.rowTop, r = t.rowHeight);
|
|
26037
26047
|
}
|
|
26038
26048
|
if (this.deps.viewport.syncViewportHeightWithDetailCompensation({
|
|
@@ -26055,10 +26065,10 @@ var BA = class {
|
|
|
26055
26065
|
this.deps.treeTableService.active ? (this.deps.viewport.syncTreeHeaderExpandState(), this.refreshTreeHierarchyVisuals()) : this.deps.rowGroupingService.active && this.refreshGroupedHierarchyVisuals();
|
|
26056
26066
|
}
|
|
26057
26067
|
refreshTreeHierarchyVisuals(e) {
|
|
26058
|
-
this.deps.treeTableService.active && this.refreshHierarchyChrome([En,
|
|
26068
|
+
this.deps.treeTableService.active && this.refreshHierarchyChrome([En, pe], e);
|
|
26059
26069
|
}
|
|
26060
26070
|
refreshGroupedHierarchyVisuals(e) {
|
|
26061
|
-
this.deps.rowGroupingService.active && this.refreshHierarchyChrome([
|
|
26071
|
+
this.deps.rowGroupingService.active && this.refreshHierarchyChrome([zt, pe], e);
|
|
26062
26072
|
}
|
|
26063
26073
|
refreshHierarchyChrome(e, t) {
|
|
26064
26074
|
let n = {
|
|
@@ -26133,12 +26143,12 @@ function KA(e, t) {
|
|
|
26133
26143
|
}
|
|
26134
26144
|
function qA(e, t, n) {
|
|
26135
26145
|
let r = {};
|
|
26136
|
-
r.valueCache = new lx(), r.changeDetection = new xp(), r.eventBus = new G_(), r.cellFocusService = new mm(), r.validationFeedback = new V_(), r.columnDragController = new wT(), r.rowDataChangeTracker = new Rm(), r.destroyed = !1, r.centerViewportWidth = 0, r.autoSizeCellContentsPending = !1, r.suppressRowLayoutViewportSync = !1, r.preserveScrollOnSetData = t.preserveScrollOnSetData ?? !0, r.mountEl = e, r.scrollRenderOptions = es(t), r.cellRenderersByColId = t.cellRenderers?.byColId ?? {}, r.cellEditorsByColId = t.cellEditors?.byColId ?? {}, r.onUnmountRenderer = t.onUnmountRenderer, r.onUnmountEditor = t.onUnmountEditor, r.summaryOptions = Un(t), r.chromeNavigationOptions = ux(t), r.indexColumnOptions =
|
|
26137
|
-
let i =
|
|
26146
|
+
r.valueCache = new lx(), r.changeDetection = new xp(), r.eventBus = new G_(), r.cellFocusService = new mm(), r.validationFeedback = new V_(), r.columnDragController = new wT(), r.rowDataChangeTracker = new Rm(), r.destroyed = !1, r.centerViewportWidth = 0, r.autoSizeCellContentsPending = !1, r.suppressRowLayoutViewportSync = !1, r.preserveScrollOnSetData = t.preserveScrollOnSetData ?? !0, r.mountEl = e, r.scrollRenderOptions = es(t), r.cellRenderersByColId = t.cellRenderers?.byColId ?? {}, r.cellEditorsByColId = t.cellEditors?.byColId ?? {}, r.onUnmountRenderer = t.onUnmountRenderer, r.onUnmountEditor = t.onUnmountEditor, r.summaryOptions = Un(t), r.chromeNavigationOptions = ux(t), r.indexColumnOptions = oe(t), r.selectionColumnOptions = b(t);
|
|
26147
|
+
let i = ve(t) === "infinite";
|
|
26138
26148
|
i && t.rowDragManaged === !0 && console.warn("[MagicGrid] rowModelType \"infinite\" does not support rowDragManaged; it has been disabled."), r.rowDragOptions = ss({
|
|
26139
26149
|
...t,
|
|
26140
26150
|
rowDragManaged: !i && t.rowDragManaged
|
|
26141
|
-
}), r.cellSpanOptions = As(t), r.cellEditorCacheOptions =
|
|
26151
|
+
}), r.cellSpanOptions = As(t), r.cellEditorCacheOptions = de(t), r.editorOptions = D(t), r.cellEditorCacheService = new lf({ maxEntries: r.cellEditorCacheOptions.cellEditorCacheMaxEntries }), r.rowExpansionOptions = Et(t), r.gridSize = t.size ?? "default", r.loadMoreRowOptionsRaw = {
|
|
26142
26152
|
loadMoreRowEnabled: t.loadMoreRowEnabled,
|
|
26143
26153
|
loadMoreRowHeight: t.loadMoreRowHeight,
|
|
26144
26154
|
loadMoreRowLoading: t.loadMoreRowLoading,
|
|
@@ -26150,7 +26160,7 @@ function qA(e, t, n) {
|
|
|
26150
26160
|
tree: t.tree,
|
|
26151
26161
|
rowGrouping: t.rowGrouping
|
|
26152
26162
|
});
|
|
26153
|
-
r.treeTableOptions = Fn(t), a.mode === "tree" && Vn(!0, r.treeTableOptions.getDataPath), r.rowGroupingOptions =
|
|
26163
|
+
r.treeTableOptions = Fn(t), a.mode === "tree" && Vn(!0, r.treeTableOptions.getDataPath), r.rowGroupingOptions = Xt({
|
|
26154
26164
|
...t,
|
|
26155
26165
|
rowGrouping: a.mode === "group" && t.rowGrouping
|
|
26156
26166
|
}), r.rowSelectionOptions = XO(t.rowSelection), r.userColumns = [...t.columns], r.userColumns, zn(r.userColumns);
|
|
@@ -26184,7 +26194,7 @@ function qA(e, t, n) {
|
|
|
26184
26194
|
let m = (e, t) => {
|
|
26185
26195
|
let n = r.columnModel.getColumnById(t);
|
|
26186
26196
|
return n ? J(e, n) : e.data[t];
|
|
26187
|
-
}, g =
|
|
26197
|
+
}, g = ln(r.userColumns).length, { rowModel: _, resolvedInfinite: v } = nf({
|
|
26188
26198
|
rowModelType: t.rowModelType,
|
|
26189
26199
|
infiniteDatasource: t.infiniteDatasource,
|
|
26190
26200
|
blockSize: t.blockSize,
|
|
@@ -26232,7 +26242,7 @@ function qA(e, t, n) {
|
|
|
26232
26242
|
isClientSideRowModel: () => ef(r.rowModel)
|
|
26233
26243
|
}), ef(r.rowModel) && r.rowModel.setLoadMoreRowService(r.loadMoreRowService), r.rowGroupingService = new Cx({
|
|
26234
26244
|
getOptions: () => r.rowGroupingOptions,
|
|
26235
|
-
getRowGroupColumnsFromDefs: () =>
|
|
26245
|
+
getRowGroupColumnsFromDefs: () => ln(r.userColumns),
|
|
26236
26246
|
getGroupedTreeRoots: () => r.rowModel.getGroupedTreeRoots(),
|
|
26237
26247
|
onGroupOpened: (e) => {
|
|
26238
26248
|
r.eventBus.emit("rowGroupOpened", e), r.hierarchyOps.syncRowGroupingDisplay();
|
|
@@ -26417,7 +26427,7 @@ function qA(e, t, n) {
|
|
|
26417
26427
|
rowHeightService: r.rowHeightService,
|
|
26418
26428
|
getRowById: (e) => r.rowModel.resolveRowById(e),
|
|
26419
26429
|
isEnabled: () => r.rowExpansionOptions.detailRowAutoHeight,
|
|
26420
|
-
getMinDetailRowHeight: (e) =>
|
|
26430
|
+
getMinDetailRowHeight: (e) => Pt(r.rowExpansionOptions.detailRowHeight, {
|
|
26421
26431
|
rowId: e.id,
|
|
26422
26432
|
data: e.data,
|
|
26423
26433
|
masterRowId: e.masterRowId ?? e.id
|
|
@@ -27042,7 +27052,7 @@ function XA(e) {
|
|
|
27042
27052
|
...e,
|
|
27043
27053
|
cells: e.cells.map((e) => ({
|
|
27044
27054
|
...e,
|
|
27045
|
-
rowId:
|
|
27055
|
+
rowId: M(e.rowId)
|
|
27046
27056
|
}))
|
|
27047
27057
|
};
|
|
27048
27058
|
}
|
|
@@ -27063,7 +27073,7 @@ function $A(e) {
|
|
|
27063
27073
|
...e,
|
|
27064
27074
|
cells: e.cells.map((e) => ({
|
|
27065
27075
|
...e,
|
|
27066
|
-
rowId:
|
|
27076
|
+
rowId: M(e.rowId)
|
|
27067
27077
|
}))
|
|
27068
27078
|
};
|
|
27069
27079
|
}
|
|
@@ -27288,7 +27298,7 @@ var rj = class {
|
|
|
27288
27298
|
});
|
|
27289
27299
|
}
|
|
27290
27300
|
setCellStyle(e, t, n) {
|
|
27291
|
-
let r =
|
|
27301
|
+
let r = M(e), i = this.rowModel.getRowById(r), a = this.columnModel.getColumnById(t);
|
|
27292
27302
|
if (!i) {
|
|
27293
27303
|
cr(r, t, "row not found");
|
|
27294
27304
|
return;
|
|
@@ -27313,11 +27323,11 @@ var rj = class {
|
|
|
27313
27323
|
});
|
|
27314
27324
|
}
|
|
27315
27325
|
getCellStyle(e, t) {
|
|
27316
|
-
let n =
|
|
27326
|
+
let n = M(e), r = this.rowModel.getRowById(n), i = this.columnModel.getColumnById(t);
|
|
27317
27327
|
return !r || !i ? {} : vi(i, r, this.getCellStyleContext());
|
|
27318
27328
|
}
|
|
27319
27329
|
getCellStyleOverride(e, t) {
|
|
27320
|
-
return this.cellStyleOverrideService.get(
|
|
27330
|
+
return this.cellStyleOverrideService.get(M(e), t);
|
|
27321
27331
|
}
|
|
27322
27332
|
clearCellStyles(e) {
|
|
27323
27333
|
this.cellStyleOverrideService.clear(e), this.refreshCellStyles(e);
|
|
@@ -27405,7 +27415,7 @@ var rj = class {
|
|
|
27405
27415
|
return this.selectionService ? f(this.selectionService.getSelectedRowIds(), this.businessRowIdCtx) : [];
|
|
27406
27416
|
}
|
|
27407
27417
|
getSelectedRows() {
|
|
27408
|
-
return this.selectionService ?
|
|
27418
|
+
return this.selectionService ? me(this.selectionService.getSelectedRowIds(), this.businessRowIdCtx) : [];
|
|
27409
27419
|
}
|
|
27410
27420
|
async removeSelectedRows(e = {}) {
|
|
27411
27421
|
if (!this.selectionService) return {
|
|
@@ -27421,7 +27431,7 @@ var rj = class {
|
|
|
27421
27431
|
} : (rf(this.rowModel, "removeSelectedRows"), this.rowMutation.removeRows({ rowIds: t }));
|
|
27422
27432
|
}
|
|
27423
27433
|
getIndexFocusedRowIds(e) {
|
|
27424
|
-
return this.indexFocusService ?
|
|
27434
|
+
return this.indexFocusService ? ge(this.getIndexFocusedRows(e), { mode: "all" }) : [];
|
|
27425
27435
|
}
|
|
27426
27436
|
getIndexFocusedRows(e) {
|
|
27427
27437
|
return this.indexFocusService ? x(this.indexFocusService.getFocusedRowIds(), this.businessRowIdCtx, e) : [];
|
|
@@ -27451,7 +27461,7 @@ var rj = class {
|
|
|
27451
27461
|
this.destroyed || this.eventBus.emit(e, t);
|
|
27452
27462
|
}
|
|
27453
27463
|
getRowNode(e) {
|
|
27454
|
-
return this.rowModel.getRowById(
|
|
27464
|
+
return this.rowModel.getRowById(M(e));
|
|
27455
27465
|
}
|
|
27456
27466
|
getSiblingRowsByRowId(e, t) {
|
|
27457
27467
|
return Ef(e, t, this.getResolveDisplayRowContext());
|
|
@@ -27692,7 +27702,7 @@ var rj = class {
|
|
|
27692
27702
|
this.rootEl.classList.toggle(os, e != null), this.rowRenderer.setRowDragCommittingRows(e?.rowIds ?? null);
|
|
27693
27703
|
}
|
|
27694
27704
|
finishRowMove(e) {
|
|
27695
|
-
this.rowMutation.finishRowMove(
|
|
27705
|
+
this.rowMutation.finishRowMove(M(e));
|
|
27696
27706
|
}
|
|
27697
27707
|
applyTransaction(e) {
|
|
27698
27708
|
return rf(this.rowModel, "applyTransaction"), this.rowMutation.applyTransaction(e);
|
|
@@ -27726,7 +27736,7 @@ var rj = class {
|
|
|
27726
27736
|
}
|
|
27727
27737
|
moveRow(e, t, n = "source") {
|
|
27728
27738
|
return rf(this.rowModel, "moveRow"), this.rowMutation.moveRow({
|
|
27729
|
-
rowId:
|
|
27739
|
+
rowId: M(e),
|
|
27730
27740
|
toIndex: t,
|
|
27731
27741
|
indexMode: n
|
|
27732
27742
|
});
|
|
@@ -27738,7 +27748,7 @@ var rj = class {
|
|
|
27738
27748
|
moved: !1,
|
|
27739
27749
|
reason: "no rows to move"
|
|
27740
27750
|
});
|
|
27741
|
-
let n = this.rowModel.getSourceRows(), r = e.leaderRowId == null ? pf(n, t) :
|
|
27751
|
+
let n = this.rowModel.getSourceRows(), r = e.leaderRowId == null ? pf(n, t) : M(e.leaderRowId);
|
|
27742
27752
|
return this.rowMutation.moveRows({
|
|
27743
27753
|
rowIds: t,
|
|
27744
27754
|
leaderRowId: r,
|
|
@@ -27790,7 +27800,7 @@ var rj = class {
|
|
|
27790
27800
|
return c;
|
|
27791
27801
|
}
|
|
27792
27802
|
async moveRowByStep(e, t) {
|
|
27793
|
-
let n = this.getResolveRowIndexContext(), r = _f(
|
|
27803
|
+
let n = this.getResolveRowIndexContext(), r = _f(M(e), n);
|
|
27794
27804
|
if (r == null) return null;
|
|
27795
27805
|
let i = n.sourceRows[r].id, a = dp({
|
|
27796
27806
|
sourceRows: n.sourceRows,
|
|
@@ -27805,11 +27815,11 @@ var rj = class {
|
|
|
27805
27815
|
return o ? Sf(o, this.getResolveDisplayRowContext()) ?? null : null;
|
|
27806
27816
|
}
|
|
27807
27817
|
setRowHeight(e, t, n = !0) {
|
|
27808
|
-
this.rowHeightService.setRowHeight(
|
|
27818
|
+
this.rowHeightService.setRowHeight(M(e), t, n, "api");
|
|
27809
27819
|
}
|
|
27810
27820
|
setRowHeights(e, t = !0) {
|
|
27811
27821
|
this.rowHeightService.setRowHeights(e.map((e) => ({
|
|
27812
|
-
rowId:
|
|
27822
|
+
rowId: M(e.rowId),
|
|
27813
27823
|
height: e.height
|
|
27814
27824
|
})), {
|
|
27815
27825
|
finished: t,
|
|
@@ -27817,10 +27827,10 @@ var rj = class {
|
|
|
27817
27827
|
});
|
|
27818
27828
|
}
|
|
27819
27829
|
getRowHeight(e) {
|
|
27820
|
-
return this.rowHeightService.getRowHeight(
|
|
27830
|
+
return this.rowHeightService.getRowHeight(M(e));
|
|
27821
27831
|
}
|
|
27822
27832
|
resetRowHeights(e) {
|
|
27823
|
-
this.rowHeightService.resetRowHeights(e?.map((e) =>
|
|
27833
|
+
this.rowHeightService.resetRowHeights(e?.map((e) => M(e)));
|
|
27824
27834
|
}
|
|
27825
27835
|
expandRow(e) {
|
|
27826
27836
|
return this.hierarchyOps.expandRow(e);
|
|
@@ -27874,10 +27884,10 @@ var rj = class {
|
|
|
27874
27884
|
this.hierarchyOps.applyTreeHierarchyShortcut(e, t);
|
|
27875
27885
|
}
|
|
27876
27886
|
getCellComment(e, t) {
|
|
27877
|
-
return this.cellCommentService.getComment(
|
|
27887
|
+
return this.cellCommentService.getComment(M(e), t);
|
|
27878
27888
|
}
|
|
27879
27889
|
async setCellComment(e, t, n) {
|
|
27880
|
-
await this.cellCommentService.setComment(
|
|
27890
|
+
await this.cellCommentService.setComment(M(e), t, n ?? null, "api");
|
|
27881
27891
|
}
|
|
27882
27892
|
refreshCellComments(e) {
|
|
27883
27893
|
this.cellCommentService.requestRefresh(e), this.closeCellCommentPopupIfAnchorNotVisible();
|
|
@@ -28004,7 +28014,7 @@ var rj = class {
|
|
|
28004
28014
|
isRowDragHandleEnabled(e) {
|
|
28005
28015
|
if (this.rowDragCommitService?.isCommitting()) return !1;
|
|
28006
28016
|
let t = this.isSortOrFilterActive(), { rowDragManaged: n } = this.rowDragOptions;
|
|
28007
|
-
return
|
|
28017
|
+
return j(e) ? fs(this.indexColumnOptions.indexColumn.showRowDragHandle, t, n) : this.columnModel.getColumnById(e)?.rowDrag ? fs(!0, t, n) : !1;
|
|
28008
28018
|
}
|
|
28009
28019
|
isSortOrFilterActive() {
|
|
28010
28020
|
return this.rowModel.getSortModel().length > 0 || this.isAnyFilterActive();
|
|
@@ -28030,7 +28040,7 @@ var rj = class {
|
|
|
28030
28040
|
this.refreshCellSpanCache(), this.valueCache.bump(), this.rowRenderer.setValueCacheVersion(this.valueCache.getVersion()), this.rowRenderer.invalidate(), this.viewport.redrawImmediately(), this.gridFooter.refresh();
|
|
28031
28041
|
}
|
|
28032
28042
|
getCellSpan(e, t) {
|
|
28033
|
-
return this.cellSpanService.getCellSpan(
|
|
28043
|
+
return this.cellSpanService.getCellSpan(M(e), t);
|
|
28034
28044
|
}
|
|
28035
28045
|
getColumnModel() {
|
|
28036
28046
|
return this.columnModel;
|
|
@@ -28080,7 +28090,7 @@ var rj = class {
|
|
|
28080
28090
|
}
|
|
28081
28091
|
let n = this.viewport.captureScrollAnchor(), r = 0, i = 0;
|
|
28082
28092
|
if (ef(this.rowModel)) for (let t of e) {
|
|
28083
|
-
if (!
|
|
28093
|
+
if (!Mt(t.rowId)) continue;
|
|
28084
28094
|
let e = t.previousRowHeight;
|
|
28085
28095
|
if (e == null || e === t.rowHeight) continue;
|
|
28086
28096
|
let n = this.rowModel.getDisplayRowById(t.rowId);
|
|
@@ -28149,13 +28159,13 @@ var rj = class {
|
|
|
28149
28159
|
});
|
|
28150
28160
|
}
|
|
28151
28161
|
validate(e) {
|
|
28152
|
-
return this.cellEditing.validate(JA(e)).then((e) =>
|
|
28162
|
+
return this.cellEditing.validate(JA(e)).then((e) => he(e, this.businessRowIdCtx));
|
|
28153
28163
|
}
|
|
28154
28164
|
validateRows(e) {
|
|
28155
|
-
return this.cellEditing.validateRows(YA(e)).then((e) =>
|
|
28165
|
+
return this.cellEditing.validateRows(YA(e)).then((e) => he(e, this.businessRowIdCtx));
|
|
28156
28166
|
}
|
|
28157
28167
|
validateCells(e) {
|
|
28158
|
-
return this.cellEditing.validateCells(XA(e)).then((e) =>
|
|
28168
|
+
return this.cellEditing.validateCells(XA(e)).then((e) => he(e, this.businessRowIdCtx));
|
|
28159
28169
|
}
|
|
28160
28170
|
clearValidation(e) {
|
|
28161
28171
|
this.cellEditing.clearValidation(ZA(e));
|
|
@@ -28173,7 +28183,7 @@ var rj = class {
|
|
|
28173
28183
|
return this.cellEditing.unregisterCellEditor(e);
|
|
28174
28184
|
}
|
|
28175
28185
|
resolveCellEditorCacheAccess(e) {
|
|
28176
|
-
return
|
|
28186
|
+
return ae(e, {
|
|
28177
28187
|
rowKey: this.rowKey,
|
|
28178
28188
|
resolveRowById: (e) => this.rowModel.resolveRowById(e),
|
|
28179
28189
|
getSourceRows: () => this.rowModel.getSourceRows()
|
|
@@ -28286,7 +28296,7 @@ function _j(e) {
|
|
|
28286
28296
|
return ol({ cellSelection: e }).enabled;
|
|
28287
28297
|
}
|
|
28288
28298
|
function vj(t) {
|
|
28289
|
-
let n =
|
|
28299
|
+
let n = B(0), r = B(0), i = () => {
|
|
28290
28300
|
n.value += 1;
|
|
28291
28301
|
};
|
|
28292
28302
|
return {
|
|
@@ -28302,7 +28312,7 @@ function vj(t) {
|
|
|
28302
28312
|
rowSelectionEnabled: o,
|
|
28303
28313
|
cellSelectionEnabled: s,
|
|
28304
28314
|
cellSelectionAggregation: s ? i?.getCellSelectionAggregation() ?? null : null,
|
|
28305
|
-
statusBarRangeAggregationPrecision:
|
|
28315
|
+
statusBarRangeAggregationPrecision: rt(t.statusBarRangeAggregationPrecision.value),
|
|
28306
28316
|
metrics: a
|
|
28307
28317
|
};
|
|
28308
28318
|
}),
|
|
@@ -28320,7 +28330,7 @@ function vj(t) {
|
|
|
28320
28330
|
var yj = /* @__PURE__ */ new WeakMap();
|
|
28321
28331
|
function bj(e) {
|
|
28322
28332
|
try {
|
|
28323
|
-
|
|
28333
|
+
He(null, e);
|
|
28324
28334
|
} catch {
|
|
28325
28335
|
e.replaceChildren();
|
|
28326
28336
|
}
|
|
@@ -28337,7 +28347,7 @@ function Sj(e, t) {
|
|
|
28337
28347
|
});
|
|
28338
28348
|
}
|
|
28339
28349
|
function Cj(e, t) {
|
|
28340
|
-
xj(e),
|
|
28350
|
+
xj(e), He(t, e);
|
|
28341
28351
|
}
|
|
28342
28352
|
//#endregion
|
|
28343
28353
|
//#region src/components/cellRenderer/vueCellRendererHost.ts
|
|
@@ -28427,7 +28437,7 @@ function Ij(e) {
|
|
|
28427
28437
|
return typeof e == "function";
|
|
28428
28438
|
}
|
|
28429
28439
|
function Lj(e, t, n, r) {
|
|
28430
|
-
let i = Ij(n) ? n(r) :
|
|
28440
|
+
let i = Ij(n) ? n(r) : Pe(n, Fj(r));
|
|
28431
28441
|
e.render(t, i), Zm(t);
|
|
28432
28442
|
}
|
|
28433
28443
|
function Rj(e, t) {
|
|
@@ -28488,7 +28498,7 @@ function Yj(e, t) {
|
|
|
28488
28498
|
return e.key ?? e.prop ?? `col_${t}`;
|
|
28489
28499
|
}
|
|
28490
28500
|
function Xj() {
|
|
28491
|
-
Wj.setAppContext(
|
|
28501
|
+
Wj.setAppContext(Me()?.appContext ?? null);
|
|
28492
28502
|
}
|
|
28493
28503
|
function Zj(e, t) {
|
|
28494
28504
|
let n = {};
|
|
@@ -28597,7 +28607,7 @@ function lM(e, t) {
|
|
|
28597
28607
|
return e === "infinite" ? (t && console.warn("[MagicGrid] row-model-type=\"infinite\" does not support row-drag-managed; it has been disabled."), !1) : t;
|
|
28598
28608
|
}
|
|
28599
28609
|
function uM(e, t, n) {
|
|
28600
|
-
let r =
|
|
28610
|
+
let r = B(), i = B(), a = B(), o = qe(), s = qe(), c = !1, l = [];
|
|
28601
28611
|
function u(e, n, r) {
|
|
28602
28612
|
let i = {
|
|
28603
28613
|
api: n,
|
|
@@ -28686,12 +28696,12 @@ function uM(e, t, n) {
|
|
|
28686
28696
|
requestAnimationFrame(() => {
|
|
28687
28697
|
E();
|
|
28688
28698
|
});
|
|
28689
|
-
},
|
|
28699
|
+
}, k = (e) => {
|
|
28690
28700
|
let t = e.setData.bind(e);
|
|
28691
28701
|
e.setData = (e) => {
|
|
28692
28702
|
t(e), O();
|
|
28693
28703
|
};
|
|
28694
|
-
},
|
|
28704
|
+
}, A = (e) => {
|
|
28695
28705
|
for (let e of l) e();
|
|
28696
28706
|
l.length = 0, l.push(e.on("cellClicked", (e) => t("cell-clicked", e)), e.on("rowClicked", (e) => t("row-click", e)), e.on("rowDoubleClicked", (e) => t("row-dblclick", e)), e.on("selectionChanged", (e) => {
|
|
28697
28707
|
m(e.selectedRowIds), t("selection-changed", e);
|
|
@@ -28708,13 +28718,13 @@ function uM(e, t, n) {
|
|
|
28708
28718
|
}), e.on("rowMoved", (e) => t("row-moved", e)), e.on("rowDragEnd", (e) => t("row-drag-end", e)), e.on("rowDragCommitStarted", (e) => t("row-drag-commit-started", e)), e.on("rowDragCommitFinished", (e) => t("row-drag-commit-finished", e)), e.on("rowHeightChanged", (e) => t("row-height-changed", e)), e.on("rowExpanded", (e) => t("row-expanded", e)), e.on("rowCollapsed", (e) => t("row-collapsed", e)), e.on("rowGroupOpened", (e) => t("row-group-opened", e)), e.on("treeNodeOpened", (e) => t("tree-node-opened", e)), e.on("treeChildrenLoading", (e) => t("tree-children-loading", e)), e.on("treeChildrenLoaded", (e) => t("tree-children-loaded", e)), e.on("treeChildrenLoadFailed", (e) => t("tree-children-load-failed", e)), e.on("rowGroupChanged", (e) => t("row-group-changed", e)), e.on("cellCommentChanged", (e) => t("cell-comment-changed", e)), e.on("cellSelectionChanged", (e) => {
|
|
28709
28719
|
t("cell-selection-changed", e), p();
|
|
28710
28720
|
}), e.on("cellSelectionDeleteStart", (e) => t("cell-selection-delete-start", e)), e.on("cellSelectionDeleteEnd", (e) => t("cell-selection-delete-end", e)), e.on("overlayShown", (e) => t("overlay-shown", e)), e.on("overlayHidden", (e) => t("overlay-hidden", e)), e.on("scroll", (e) => t("scroll", e)), e.on("scrollStart", (e) => t("scroll-start", e)), e.on("scrollEnd", (e) => t("scroll-end", e)), e.on("scrollTop", (e) => t("scroll-top", e)), e.on("scrollBottom", (e) => t("scroll-bottom", e)), e.on("loadMore", (e) => t("load-more", e)), e.on("infiniteBlockLoading", (e) => t("infinite-block-loading", e)), e.on("infiniteBlockLoaded", (e) => t("infinite-block-loaded", e)), e.on("infiniteBlockLoadFailed", (e) => t("infinite-block-load-failed", e)), e.on("infiniteCachePurged", (e) => t("infinite-cache-purged", e)));
|
|
28711
|
-
},
|
|
28721
|
+
}, j = () => {
|
|
28712
28722
|
mj(r.value?.querySelector(".mg-body"), y.value, e.cellColor);
|
|
28713
28723
|
};
|
|
28714
|
-
function
|
|
28724
|
+
function te() {
|
|
28715
28725
|
o.value?.setStatusBarElement(e.showStatusBar ? a.value?.statusBarEl ?? null : null);
|
|
28716
28726
|
}
|
|
28717
|
-
let
|
|
28727
|
+
let ne = () => {
|
|
28718
28728
|
if (!r.value) return;
|
|
28719
28729
|
Xj();
|
|
28720
28730
|
for (let e of l) e();
|
|
@@ -28724,7 +28734,7 @@ function uM(e, t, n) {
|
|
|
28724
28734
|
tree: e.tree,
|
|
28725
28735
|
rowGrouping: e.rowGrouping
|
|
28726
28736
|
}), o.value = new rj(r.value, {
|
|
28727
|
-
columns:
|
|
28737
|
+
columns: be(e.columns),
|
|
28728
28738
|
rowKey: e.rowKey,
|
|
28729
28739
|
rowModelType: e.rowModelType,
|
|
28730
28740
|
infiniteDatasource: e.infiniteDatasource,
|
|
@@ -28876,14 +28886,14 @@ function uM(e, t, n) {
|
|
|
28876
28886
|
}
|
|
28877
28887
|
}), s.value = o.value.getApi();
|
|
28878
28888
|
let a = s.value;
|
|
28879
|
-
a &&
|
|
28889
|
+
a && k(a), D(), A(o.value), e.rowModelType !== "infinite" && o.value.setData(e.data), c = !1, a && d(a), O(), j(), Ie(() => te());
|
|
28880
28890
|
};
|
|
28881
|
-
return
|
|
28882
|
-
|
|
28883
|
-
}),
|
|
28891
|
+
return Be(() => {
|
|
28892
|
+
ne();
|
|
28893
|
+
}), H(y, j), H(() => e.cellColor, j, { deep: !0 }), H(() => e.quickFilterText, (e) => {
|
|
28884
28894
|
let t = o.value?.getApi();
|
|
28885
28895
|
!t || t.getQuickFilterText() === e || t.setQuickFilterText(e);
|
|
28886
|
-
}),
|
|
28896
|
+
}), H(() => [
|
|
28887
28897
|
e.cellCommentsDataSource,
|
|
28888
28898
|
e.suppressCellComments,
|
|
28889
28899
|
e.cellCommentTrigger,
|
|
@@ -28897,7 +28907,7 @@ function uM(e, t, n) {
|
|
|
28897
28907
|
cellCommentShowDelay: e.cellCommentShowDelay,
|
|
28898
28908
|
cellCommentHideDelay: e.cellCommentHideDelay
|
|
28899
28909
|
});
|
|
28900
|
-
}),
|
|
28910
|
+
}), H(() => [
|
|
28901
28911
|
b.value,
|
|
28902
28912
|
e.enableCellCopy,
|
|
28903
28913
|
e.enableCellPaste
|
|
@@ -28907,12 +28917,12 @@ function uM(e, t, n) {
|
|
|
28907
28917
|
enableCellCopy: e.enableCellCopy,
|
|
28908
28918
|
enableCellPaste: e.enableCellPaste
|
|
28909
28919
|
});
|
|
28910
|
-
}),
|
|
28920
|
+
}), H(() => [e.enableHeaderHighlight, e.enableIndexColumnHighlight], () => {
|
|
28911
28921
|
o.value?.updateCellRangeVisualOptions({
|
|
28912
28922
|
enableHeaderHighlight: e.enableHeaderHighlight,
|
|
28913
28923
|
enableIndexColumnHighlight: e.enableIndexColumnHighlight
|
|
28914
28924
|
});
|
|
28915
|
-
}),
|
|
28925
|
+
}), H(() => [
|
|
28916
28926
|
e.processCellForClipboard,
|
|
28917
28927
|
e.processCellFromClipboard,
|
|
28918
28928
|
e.processDataFromClipboard
|
|
@@ -28922,7 +28932,7 @@ function uM(e, t, n) {
|
|
|
28922
28932
|
processCellFromClipboard: e.processCellFromClipboard,
|
|
28923
28933
|
processDataFromClipboard: e.processDataFromClipboard
|
|
28924
28934
|
});
|
|
28925
|
-
}),
|
|
28935
|
+
}), H(() => [
|
|
28926
28936
|
e.enableTooltips,
|
|
28927
28937
|
e.tooltipShowMode,
|
|
28928
28938
|
e.tooltipShowDelay,
|
|
@@ -28945,7 +28955,7 @@ function uM(e, t, n) {
|
|
|
28945
28955
|
tooltipComponent: $j(e.tooltipComponent, n),
|
|
28946
28956
|
tooltipComponentParams: e.tooltipComponentParams
|
|
28947
28957
|
});
|
|
28948
|
-
}),
|
|
28958
|
+
}), H(() => [
|
|
28949
28959
|
e.loadMoreRow?.enabled,
|
|
28950
28960
|
e.loadMoreRow?.height,
|
|
28951
28961
|
e.loadMoreRow?.loading,
|
|
@@ -28962,7 +28972,7 @@ function uM(e, t, n) {
|
|
|
28962
28972
|
loadMoreRowLabels: e.loadMoreRow?.labels,
|
|
28963
28973
|
loadMoreRowRenderer: nM(e.loadMoreRowRenderer, n)
|
|
28964
28974
|
});
|
|
28965
|
-
}),
|
|
28975
|
+
}), H(() => [
|
|
28966
28976
|
e.loading,
|
|
28967
28977
|
e.suppressOverlays,
|
|
28968
28978
|
e.suppressLoadingOverlay,
|
|
@@ -28985,41 +28995,41 @@ function uM(e, t, n) {
|
|
|
28985
28995
|
n["no-matching-rows"]
|
|
28986
28996
|
], () => {
|
|
28987
28997
|
o.value?.updateEmptyStateOptions(tM(e, n));
|
|
28988
|
-
}),
|
|
28989
|
-
|
|
28990
|
-
}),
|
|
28998
|
+
}), H(() => [e.showStatusBar, a.value], () => {
|
|
28999
|
+
Ie(() => te());
|
|
29000
|
+
}), H(() => e.data, (t) => {
|
|
28991
29001
|
e.rowModelType !== "infinite" && (o.value?.setData(t), O());
|
|
28992
|
-
}),
|
|
29002
|
+
}), H(() => e.defaultSelectedRows, () => {
|
|
28993
29003
|
D();
|
|
28994
|
-
}),
|
|
29004
|
+
}), H(() => e.selectable, (e) => {
|
|
28995
29005
|
o.value?.setSelectable(e);
|
|
28996
|
-
}),
|
|
29006
|
+
}), H(() => e.isRowDisabled, (e) => {
|
|
28997
29007
|
o.value?.setIsRowDisabled(e);
|
|
28998
|
-
}),
|
|
29008
|
+
}), H(() => e.rowStyle, (e) => {
|
|
28999
29009
|
o.value?.setRowStyle(e);
|
|
29000
|
-
}),
|
|
29010
|
+
}), H(() => e.editableCellStyle, (e) => {
|
|
29001
29011
|
o.value?.setEditableCellStyle(e);
|
|
29002
|
-
}),
|
|
29012
|
+
}), H(() => e.showEditableCellIcon, (e) => {
|
|
29003
29013
|
o.value?.setShowEditableCellIcon(e);
|
|
29004
|
-
}),
|
|
29014
|
+
}), H(() => e.disabledCellStyle, (e) => {
|
|
29005
29015
|
o.value?.setDisabledCellStyle(e);
|
|
29006
|
-
}),
|
|
29016
|
+
}), H(() => e.showDisabledCellIcon, (e) => {
|
|
29007
29017
|
o.value?.setShowDisabledCellIcon(e);
|
|
29008
|
-
}),
|
|
29018
|
+
}), H(() => e.reserveSelection, (e) => {
|
|
29009
29019
|
o.value?.setReserveSelection(e);
|
|
29010
|
-
}),
|
|
29020
|
+
}), H(() => e.preserveScrollOnSetData, (e) => {
|
|
29011
29021
|
o.value?.setPreserveScrollOnSetData(e);
|
|
29012
|
-
}),
|
|
29022
|
+
}), H(() => e.showUnsortedSortHintOnHover, (e) => {
|
|
29013
29023
|
o.value?.setShowUnsortedSortHintOnHover(e);
|
|
29014
|
-
}),
|
|
29024
|
+
}), H(() => e.sortable, (e) => {
|
|
29015
29025
|
o.value?.setColumnSortOptions({ sortable: e });
|
|
29016
|
-
}),
|
|
29026
|
+
}), H(() => e.enableHeaderSortClick, (e) => {
|
|
29017
29027
|
o.value?.setColumnSortOptions({ enableHeaderSortClick: e });
|
|
29018
|
-
}),
|
|
29028
|
+
}), H(() => e.filterable, (e) => {
|
|
29019
29029
|
o.value?.setColumnFilterOptions({ filterable: e });
|
|
29020
|
-
}),
|
|
29030
|
+
}), H(() => e.resizable, (e) => {
|
|
29021
29031
|
o.value?.setColumnResizeOptions({ resizable: e });
|
|
29022
|
-
}),
|
|
29032
|
+
}), H(() => [
|
|
29023
29033
|
e.columnMovable,
|
|
29024
29034
|
e.suppressMoveWhenColumnDragging,
|
|
29025
29035
|
e.suppressColumnMoveAnimation,
|
|
@@ -29031,21 +29041,21 @@ function uM(e, t, n) {
|
|
|
29031
29041
|
suppressColumnMoveAnimation: n,
|
|
29032
29042
|
allowCrossLaneColumnMove: r
|
|
29033
29043
|
});
|
|
29034
|
-
}),
|
|
29044
|
+
}), H(() => ({
|
|
29035
29045
|
rowHeight: _.value.rowHeight,
|
|
29036
29046
|
rowHeightMin: e.rowHeightMin,
|
|
29037
29047
|
rowHeightMax: e.rowHeightMax
|
|
29038
29048
|
}), (e, t) => {
|
|
29039
29049
|
if (!o.value || !t) return;
|
|
29040
29050
|
let n = o.value.getMetrics()?.scrollTop ?? 0, r = o.value.getMetrics()?.scrollLeft ?? 0;
|
|
29041
|
-
o.value.updateDimensions(e),
|
|
29051
|
+
o.value.updateDimensions(e), Ie(() => {
|
|
29042
29052
|
o.value?.scrollTo(n, r), requestAnimationFrame(() => {
|
|
29043
29053
|
o.value?.scrollTo(n, r);
|
|
29044
29054
|
});
|
|
29045
29055
|
});
|
|
29046
|
-
}),
|
|
29047
|
-
o.value && (o.value.setColumns(
|
|
29048
|
-
}),
|
|
29056
|
+
}), H(() => e.columns, () => {
|
|
29057
|
+
o.value && (o.value.setColumns(be(e.columns)), o.value.getApi().refreshCellStyles(), O());
|
|
29058
|
+
}), H(() => [
|
|
29049
29059
|
e.size,
|
|
29050
29060
|
e.headerHeight,
|
|
29051
29061
|
e.rowBuffer,
|
|
@@ -29127,8 +29137,8 @@ function uM(e, t, n) {
|
|
|
29127
29137
|
e.loadTreeChildren,
|
|
29128
29138
|
n["detail-row"]
|
|
29129
29139
|
], () => {
|
|
29130
|
-
|
|
29131
|
-
}),
|
|
29140
|
+
ne();
|
|
29141
|
+
}), Ve(() => {
|
|
29132
29142
|
for (let e of l) e();
|
|
29133
29143
|
l.length = 0;
|
|
29134
29144
|
let e = s.value, t = o.value;
|
|
@@ -29194,20 +29204,20 @@ function uM(e, t, n) {
|
|
|
29194
29204
|
var dM = ["data-status-bar", "data-toolbar"], fM = {
|
|
29195
29205
|
key: 0,
|
|
29196
29206
|
class: "magic-grid__toolbar"
|
|
29197
|
-
}, pM = /* @__PURE__ */
|
|
29207
|
+
}, pM = /* @__PURE__ */ L({
|
|
29198
29208
|
inheritAttrs: !1,
|
|
29199
29209
|
__name: "MagicGrid",
|
|
29200
|
-
props:
|
|
29210
|
+
props: gt,
|
|
29201
29211
|
emits: /* @__PURE__ */ "scroll.scroll-start.scroll-end.scroll-top.scroll-bottom.load-more.data-rendered.grid-ready.grid-destroyed.first-rendered.cell-clicked.row-click.row-dblclick.selection-changed.index-focus-changed.cell-value-changed.row-data-changed.rows-data-changed.cell-editing-started.cell-editing-stopped.cell-commit-started.cell-commit-finished.edit-commit-aborted.row-commit-started.row-commit-finished.row-editing-started.row-editing-stopped.row-value-changed.cell-validation-failed.row-validation-failed.sort-changed.column-moved.column-resized.column-pinned.column-hidden-changed.filter-changed.rows-added.rows-removed.row-id-promoted.row-moved.row-drag-end.row-drag-commit-started.row-drag-commit-finished.row-height-changed.row-expanded.row-collapsed.row-group-opened.row-group-changed.tree-node-opened.tree-children-loading.tree-children-loaded.tree-children-load-failed.cell-comment-changed.cell-selection-changed.cell-selection-delete-start.cell-selection-delete-end.overlay-shown.overlay-hidden.infinite-block-loading.infinite-block-loaded.infinite-block-load-failed.infinite-cache-purged".split("."),
|
|
29202
29212
|
setup(e, { expose: t, emit: n }) {
|
|
29203
|
-
let r = e, i = n, a =
|
|
29204
|
-
return t(l), (e, t) => (
|
|
29205
|
-
class:
|
|
29206
|
-
style:
|
|
29213
|
+
let r = e, i = n, a = Xe(), { mountRef: o, portalRef: s, statusBarComponentRef: c, exposeApi: l, rootClass: u, rootStyle: d, statusBarContext: f, statusBarBindings: p, hasToolbarSlot: m, toolbarContext: h } = uM(r, i, a);
|
|
29214
|
+
return t(l), (e, t) => (z(), F("div", {
|
|
29215
|
+
class: R(V(u)),
|
|
29216
|
+
style: Re(V(d)),
|
|
29207
29217
|
"data-status-bar": r.showStatusBar ? "true" : "false",
|
|
29208
|
-
"data-toolbar":
|
|
29218
|
+
"data-toolbar": V(m) ? "true" : "false"
|
|
29209
29219
|
}, [
|
|
29210
|
-
|
|
29220
|
+
V(m) ? (z(), F("div", fM, [We(e.$slots, "toolbar", Le(Ne(V(h))))])) : P("", !0),
|
|
29211
29221
|
I("div", {
|
|
29212
29222
|
ref_key: "mountRef",
|
|
29213
29223
|
ref: o,
|
|
@@ -29219,21 +29229,21 @@ var dM = ["data-status-bar", "data-toolbar"], fM = {
|
|
|
29219
29229
|
class: "magic-grid__portal",
|
|
29220
29230
|
"aria-hidden": "true"
|
|
29221
29231
|
}, null, 512),
|
|
29222
|
-
r.showStatusBar ? (
|
|
29232
|
+
r.showStatusBar ? (z(), De(ht, Fe({
|
|
29223
29233
|
key: 1,
|
|
29224
29234
|
ref_key: "statusBarComponentRef",
|
|
29225
29235
|
ref: c
|
|
29226
|
-
},
|
|
29227
|
-
"has-custom-status-bar-slot": !!
|
|
29228
|
-
"has-left-slot": !!
|
|
29229
|
-
"has-right-slot": !!
|
|
29236
|
+
}, V(p), {
|
|
29237
|
+
"has-custom-status-bar-slot": !!V(a)["status-bar"],
|
|
29238
|
+
"has-left-slot": !!V(a)["status-bar-left"],
|
|
29239
|
+
"has-right-slot": !!V(a)["status-bar-right"]
|
|
29230
29240
|
}), Oe({
|
|
29231
|
-
"status-bar-left":
|
|
29232
|
-
"status-bar-right":
|
|
29241
|
+
"status-bar-left": Qe(() => [We(e.$slots, "status-bar-left", Le(Ne(V(f))))]),
|
|
29242
|
+
"status-bar-right": Qe(() => [We(e.$slots, "status-bar-right", Le(Ne(V(f))))]),
|
|
29233
29243
|
_: 2
|
|
29234
|
-
}, [
|
|
29244
|
+
}, [V(a)["status-bar"] ? {
|
|
29235
29245
|
name: "status-bar",
|
|
29236
|
-
fn:
|
|
29246
|
+
fn: Qe(() => [We(e.$slots, "status-bar", Le(Ne(V(f))))]),
|
|
29237
29247
|
key: "0"
|
|
29238
29248
|
} : void 0]), 1040, [
|
|
29239
29249
|
"has-custom-status-bar-slot",
|
|
@@ -29305,27 +29315,27 @@ var dM = ["data-status-bar", "data-toolbar"], fM = {
|
|
|
29305
29315
|
"stroke-linecap": "round",
|
|
29306
29316
|
"stroke-linejoin": "round",
|
|
29307
29317
|
"aria-hidden": "true"
|
|
29308
|
-
}, gM = /* @__PURE__ */
|
|
29318
|
+
}, gM = /* @__PURE__ */ L({
|
|
29309
29319
|
__name: "ColumnSettingsMenuIcon",
|
|
29310
29320
|
props: { name: {} },
|
|
29311
29321
|
setup(e) {
|
|
29312
29322
|
let t = e, n = N(() => mM[t.name]);
|
|
29313
|
-
return (t, r) => (
|
|
29323
|
+
return (t, r) => (z(), F("svg", hM, [(z(!0), F(Te, null, Ue(n.value, ([t, n], r) => (z(), De(Ge(t), Fe({ key: `${e.name}-${t}-${r}` }, { ref_for: !0 }, n), null, 16))), 128))]));
|
|
29314
29324
|
}
|
|
29315
29325
|
}), _M = {
|
|
29316
29326
|
key: 0,
|
|
29317
29327
|
class: "mg-column-settings-menu__item-icon"
|
|
29318
|
-
}, vM = { class: "mg-column-settings-menu__item-label" }, yM = /* @__PURE__ */
|
|
29328
|
+
}, vM = { class: "mg-column-settings-menu__item-label" }, yM = /* @__PURE__ */ L({
|
|
29319
29329
|
__name: "ColumnSettingsMenuItem",
|
|
29320
29330
|
props: { label: {} },
|
|
29321
29331
|
setup(e) {
|
|
29322
|
-
return (t, n) => (
|
|
29332
|
+
return (t, n) => (z(), F("button", {
|
|
29323
29333
|
type: "button",
|
|
29324
|
-
class:
|
|
29334
|
+
class: R(V(Ml)),
|
|
29325
29335
|
role: "menuitem"
|
|
29326
|
-
}, [t.$slots.icon ? (
|
|
29336
|
+
}, [t.$slots.icon ? (z(), F("span", _M, [We(t.$slots, "icon")])) : P("", !0), I("span", vM, [We(t.$slots, "default", {}, () => [Ae(Je(e.label), 1)])])], 2));
|
|
29327
29337
|
}
|
|
29328
|
-
}), bM = ["aria-expanded"], xM = { class: "mg-column-settings-menu__item-leading" }, SM = { class: "mg-column-settings-menu__item-icon" }, CM = /* @__PURE__ */
|
|
29338
|
+
}), bM = ["aria-expanded"], xM = { class: "mg-column-settings-menu__item-leading" }, SM = { class: "mg-column-settings-menu__item-icon" }, CM = /* @__PURE__ */ L({
|
|
29329
29339
|
__name: "ColumnSettingsMenu",
|
|
29330
29340
|
props: { showDivider: { type: Boolean } },
|
|
29331
29341
|
emits: [
|
|
@@ -29365,7 +29375,7 @@ var dM = ["data-status-bar", "data-toolbar"], fM = {
|
|
|
29365
29375
|
label: "全部",
|
|
29366
29376
|
icon: "all"
|
|
29367
29377
|
}
|
|
29368
|
-
], i =
|
|
29378
|
+
], i = B(!1), a = B(!1), o = B(null), s = B(null);
|
|
29369
29379
|
function c() {
|
|
29370
29380
|
n("column-settings");
|
|
29371
29381
|
}
|
|
@@ -29377,7 +29387,7 @@ var dM = ["data-status-bar", "data-toolbar"], fM = {
|
|
|
29377
29387
|
n.right + r > window.innerWidth - 8 && (a.value = !0);
|
|
29378
29388
|
}
|
|
29379
29389
|
async function u() {
|
|
29380
|
-
i.value = !0, await
|
|
29390
|
+
i.value = !0, await Ie(), l();
|
|
29381
29391
|
}
|
|
29382
29392
|
function d() {
|
|
29383
29393
|
i.value = !1;
|
|
@@ -29389,28 +29399,28 @@ var dM = ["data-status-bar", "data-toolbar"], fM = {
|
|
|
29389
29399
|
function p(e) {
|
|
29390
29400
|
n("reset", e);
|
|
29391
29401
|
}
|
|
29392
|
-
return (t, n) => (
|
|
29393
|
-
class:
|
|
29402
|
+
return (t, n) => (z(), F("div", {
|
|
29403
|
+
class: R(V(jl)),
|
|
29394
29404
|
role: "menu"
|
|
29395
29405
|
}, [
|
|
29396
29406
|
je(yM, {
|
|
29397
29407
|
label: "列设置",
|
|
29398
29408
|
onClick: c
|
|
29399
29409
|
}, {
|
|
29400
|
-
icon:
|
|
29410
|
+
icon: Qe(() => [je(gM, { name: "sliders-vertical" })]),
|
|
29401
29411
|
_: 1
|
|
29402
29412
|
}),
|
|
29403
29413
|
I("div", {
|
|
29404
29414
|
ref_key: "resetSubmenuRef",
|
|
29405
29415
|
ref: o,
|
|
29406
|
-
class:
|
|
29416
|
+
class: R([V(Il), { "mg-column-settings-menu__submenu--open": i.value }]),
|
|
29407
29417
|
onMouseenter: u,
|
|
29408
29418
|
onMouseleave: d,
|
|
29409
29419
|
onFocusin: u,
|
|
29410
29420
|
onFocusout: f
|
|
29411
29421
|
}, [I("button", {
|
|
29412
29422
|
type: "button",
|
|
29413
|
-
class:
|
|
29423
|
+
class: R([V(Ml), V(Rl)]),
|
|
29414
29424
|
role: "menuitem",
|
|
29415
29425
|
"aria-haspopup": "menu",
|
|
29416
29426
|
"aria-expanded": i.value
|
|
@@ -29424,37 +29434,37 @@ var dM = ["data-status-bar", "data-toolbar"], fM = {
|
|
|
29424
29434
|
"stroke-linecap": "round",
|
|
29425
29435
|
"stroke-linejoin": "round",
|
|
29426
29436
|
"aria-hidden": "true"
|
|
29427
|
-
}, [I("path", { d: "m9 18 6-6-6-6" })], -1)], 10, bM),
|
|
29437
|
+
}, [I("path", { d: "m9 18 6-6-6-6" })], -1)], 10, bM), $e(I("div", {
|
|
29428
29438
|
ref_key: "resetSubmenuPanelRef",
|
|
29429
29439
|
ref: s,
|
|
29430
|
-
class:
|
|
29440
|
+
class: R([V(Ll), { "mg-column-settings-menu__submenu-panel--flip": a.value }]),
|
|
29431
29441
|
role: "menu"
|
|
29432
|
-
}, [(
|
|
29442
|
+
}, [(z(), F(Te, null, Ue(r, (e) => je(yM, {
|
|
29433
29443
|
key: e.scope,
|
|
29434
29444
|
label: e.label,
|
|
29435
29445
|
onClick: (t) => p(e.scope)
|
|
29436
29446
|
}, {
|
|
29437
|
-
icon:
|
|
29447
|
+
icon: Qe(() => [je(gM, { name: e.icon }, null, 8, ["name"])]),
|
|
29438
29448
|
_: 2
|
|
29439
|
-
}, 1032, ["label", "onClick"])), 64))], 2), [[
|
|
29440
|
-
e.showDivider ? (
|
|
29449
|
+
}, 1032, ["label", "onClick"])), 64))], 2), [[Ze, i.value]])], 34),
|
|
29450
|
+
e.showDivider ? (z(), F("div", {
|
|
29441
29451
|
key: 0,
|
|
29442
|
-
class:
|
|
29452
|
+
class: R(V(Fl)),
|
|
29443
29453
|
role: "separator",
|
|
29444
29454
|
"aria-orientation": "horizontal"
|
|
29445
29455
|
}, null, 2)) : P("", !0),
|
|
29446
|
-
e.showDivider ? (
|
|
29456
|
+
e.showDivider ? (z(), F("div", {
|
|
29447
29457
|
key: 1,
|
|
29448
29458
|
class: "mg-column-settings-menu__custom",
|
|
29449
29459
|
onClick: n[0] ||= (e) => t.$emit("custom-action")
|
|
29450
|
-
}, [
|
|
29460
|
+
}, [We(t.$slots, "default")])) : P("", !0)
|
|
29451
29461
|
], 2));
|
|
29452
29462
|
}
|
|
29453
29463
|
}), wM = [
|
|
29454
29464
|
"disabled",
|
|
29455
29465
|
"aria-disabled",
|
|
29456
29466
|
"title"
|
|
29457
|
-
], TM = /* @__PURE__ */
|
|
29467
|
+
], TM = /* @__PURE__ */ L({
|
|
29458
29468
|
__name: "ColumnSettingsClearFiltersBar",
|
|
29459
29469
|
props: {
|
|
29460
29470
|
gridApi: {},
|
|
@@ -29466,9 +29476,9 @@ var dM = ["data-status-bar", "data-toolbar"], fM = {
|
|
|
29466
29476
|
function i() {
|
|
29467
29477
|
n.gridApi.clearAllFilters(), r("change");
|
|
29468
29478
|
}
|
|
29469
|
-
return (t, n) => (
|
|
29479
|
+
return (t, n) => (z(), F("button", {
|
|
29470
29480
|
type: "button",
|
|
29471
|
-
class:
|
|
29481
|
+
class: R(V(zl)),
|
|
29472
29482
|
disabled: !e.canClearAllFilters,
|
|
29473
29483
|
"aria-disabled": !e.canClearAllFilters,
|
|
29474
29484
|
title: e.canClearAllFilters ? void 0 : "当前无筛选",
|
|
@@ -29514,7 +29524,7 @@ function EM(e) {
|
|
|
29514
29524
|
}
|
|
29515
29525
|
//#endregion
|
|
29516
29526
|
//#region src/components/ColumnSettings/ColumnFilterPanelEmbed.vue
|
|
29517
|
-
var DM = /* @__PURE__ */
|
|
29527
|
+
var DM = /* @__PURE__ */ L({
|
|
29518
29528
|
__name: "ColumnFilterPanelEmbed",
|
|
29519
29529
|
props: {
|
|
29520
29530
|
colId: {},
|
|
@@ -29524,7 +29534,7 @@ var DM = /* @__PURE__ */ Me({
|
|
|
29524
29534
|
},
|
|
29525
29535
|
emits: ["change"],
|
|
29526
29536
|
setup(e, { emit: t }) {
|
|
29527
|
-
let n = e, r = t, i =
|
|
29537
|
+
let n = e, r = t, i = B(null), a = null, o = null, s = EM({
|
|
29528
29538
|
getFilterModel: () => n.gridApi.getFilterModel(),
|
|
29529
29539
|
setFilterModel: (e) => {
|
|
29530
29540
|
n.gridApi.setFilterModel(e), r("change");
|
|
@@ -29564,15 +29574,15 @@ var DM = /* @__PURE__ */ Me({
|
|
|
29564
29574
|
function d() {
|
|
29565
29575
|
a?.panelRoot && a.syncState(c());
|
|
29566
29576
|
}
|
|
29567
|
-
return
|
|
29577
|
+
return Be(() => {
|
|
29568
29578
|
l();
|
|
29569
|
-
}),
|
|
29579
|
+
}), ze(() => {
|
|
29570
29580
|
s.destroy(), u();
|
|
29571
|
-
}),
|
|
29581
|
+
}), H(() => n.colId, () => {
|
|
29572
29582
|
l();
|
|
29573
|
-
}),
|
|
29583
|
+
}), H(() => n.gridApi.getFilterModel(), () => {
|
|
29574
29584
|
d();
|
|
29575
|
-
}, { deep: !0 }), (e, t) => (
|
|
29585
|
+
}, { deep: !0 }), (e, t) => (z(), F("div", {
|
|
29576
29586
|
ref_key: "hostRef",
|
|
29577
29587
|
ref: i,
|
|
29578
29588
|
class: "mg-column-settings__filter-embed"
|
|
@@ -29639,7 +29649,7 @@ var VM = ["data-col-id"], HM = { class: "mg-column-settings__row-main" }, UM = [
|
|
|
29639
29649
|
"aria-label",
|
|
29640
29650
|
"title",
|
|
29641
29651
|
"onClick"
|
|
29642
|
-
], XM = ["title"], ZM = ["checked", "aria-label"], QM = /* @__PURE__ */
|
|
29652
|
+
], XM = ["title"], ZM = ["checked", "aria-label"], QM = /* @__PURE__ */ L({
|
|
29643
29653
|
__name: "ColumnSettingsRow",
|
|
29644
29654
|
props: {
|
|
29645
29655
|
row: {},
|
|
@@ -29676,7 +29686,7 @@ var VM = ["data-col-id"], HM = { class: "mg-column-settings__row-main" }, UM = [
|
|
|
29676
29686
|
"change"
|
|
29677
29687
|
],
|
|
29678
29688
|
setup(e, { emit: t }) {
|
|
29679
|
-
let n = e, r = t, i =
|
|
29689
|
+
let n = e, r = t, i = B(!1), a = [
|
|
29680
29690
|
null,
|
|
29681
29691
|
"left",
|
|
29682
29692
|
"right"
|
|
@@ -29709,17 +29719,17 @@ var VM = ["data-col-id"], HM = { class: "mg-column-settings__row-main" }, UM = [
|
|
|
29709
29719
|
function d(e) {
|
|
29710
29720
|
n.draggable && r("dragend", e);
|
|
29711
29721
|
}
|
|
29712
|
-
return (t, n) => (
|
|
29713
|
-
class:
|
|
29714
|
-
[
|
|
29722
|
+
return (t, n) => (z(), F("div", {
|
|
29723
|
+
class: R([V(Hl), {
|
|
29724
|
+
[V(Ul)]: e.row.filterActive,
|
|
29715
29725
|
"mg-column-settings__row--drag-over": e.dragOver,
|
|
29716
29726
|
"mg-column-settings__row--dragging": e.dragging
|
|
29717
29727
|
}]),
|
|
29718
29728
|
"data-col-id": e.row.colId
|
|
29719
29729
|
}, [I("div", HM, [
|
|
29720
|
-
e.showDragHandle ? (
|
|
29730
|
+
e.showDragHandle ? (z(), F("span", {
|
|
29721
29731
|
key: 0,
|
|
29722
|
-
class:
|
|
29732
|
+
class: R(["mg-column-settings__drag-handle", { "mg-column-settings__drag-handle--disabled": !e.draggable }]),
|
|
29723
29733
|
draggable: e.draggable === !0,
|
|
29724
29734
|
"aria-disabled": e.draggable ? void 0 : "true",
|
|
29725
29735
|
title: e.draggable ? "拖拽调整列顺序" : "此列不可拖拽",
|
|
@@ -29729,23 +29739,23 @@ var VM = ["data-col-id"], HM = { class: "mg-column-settings__row-main" }, UM = [
|
|
|
29729
29739
|
I("span", {
|
|
29730
29740
|
class: "mg-column-settings__row-label",
|
|
29731
29741
|
title: e.row.label
|
|
29732
|
-
},
|
|
29733
|
-
e.gridApi ? (
|
|
29734
|
-
e.showSort && e.row.sortable ? (
|
|
29742
|
+
}, Je(e.row.label), 9, WM),
|
|
29743
|
+
e.gridApi ? (z(), F("div", GM, [
|
|
29744
|
+
e.showSort && e.row.sortable ? (z(), F("button", {
|
|
29735
29745
|
key: 0,
|
|
29736
29746
|
type: "button",
|
|
29737
|
-
class:
|
|
29747
|
+
class: R(["mg-column-settings__sort-button", {
|
|
29738
29748
|
"mg-column-settings__sort-button--asc": e.row.sortDirection === "asc",
|
|
29739
29749
|
"mg-column-settings__sort-button--desc": e.row.sortDirection === "desc"
|
|
29740
29750
|
}]),
|
|
29741
|
-
"aria-label": `${e.row.label} 排序:${
|
|
29742
|
-
title:
|
|
29751
|
+
"aria-label": `${e.row.label} 排序:${V(NM)(e.row.sortDirection)}`,
|
|
29752
|
+
title: V(NM)(e.row.sortDirection),
|
|
29743
29753
|
onClick: o
|
|
29744
|
-
},
|
|
29745
|
-
e.showFilter && e.row.filterable ? (
|
|
29754
|
+
}, Je(e.row.sortDirection === "asc" ? "↑" : e.row.sortDirection === "desc" ? "↓" : "↕"), 11, KM)) : P("", !0),
|
|
29755
|
+
e.showFilter && e.row.filterable ? (z(), F("button", {
|
|
29746
29756
|
key: 1,
|
|
29747
29757
|
type: "button",
|
|
29748
|
-
class:
|
|
29758
|
+
class: R(["mg-column-settings__filter-button", { "mg-column-settings__filter-button--active": e.row.filterActive || i.value }]),
|
|
29749
29759
|
"aria-expanded": i.value,
|
|
29750
29760
|
"aria-label": `${e.row.label} 筛选`,
|
|
29751
29761
|
title: "筛选",
|
|
@@ -29767,22 +29777,22 @@ var VM = ["data-col-id"], HM = { class: "mg-column-settings__row-main" }, UM = [
|
|
|
29767
29777
|
I("path", { d: "M7 12h10" }),
|
|
29768
29778
|
I("path", { d: "M10 18h4" })
|
|
29769
29779
|
], -1)]], 10, qM)) : P("", !0),
|
|
29770
|
-
e.showPin ? (
|
|
29780
|
+
e.showPin ? (z(), F("div", {
|
|
29771
29781
|
key: 2,
|
|
29772
29782
|
class: "mg-column-settings__pin-group",
|
|
29773
29783
|
role: "radiogroup",
|
|
29774
29784
|
"aria-label": `${e.row.label} 固定列`
|
|
29775
|
-
}, [(
|
|
29785
|
+
}, [(z(), F(Te, null, Ue(a, (t) => I("button", {
|
|
29776
29786
|
key: t ?? "none",
|
|
29777
29787
|
type: "button",
|
|
29778
|
-
class:
|
|
29788
|
+
class: R(["mg-column-settings__pin-button", { "mg-column-settings__pin-button--active": e.row.fixed === t }]),
|
|
29779
29789
|
role: "radio",
|
|
29780
29790
|
"aria-checked": e.row.fixed === t,
|
|
29781
|
-
"aria-label":
|
|
29782
|
-
title:
|
|
29791
|
+
"aria-label": V(PM)(t),
|
|
29792
|
+
title: V(PM)(t),
|
|
29783
29793
|
onClick: (e) => s(t)
|
|
29784
|
-
},
|
|
29785
|
-
e.showVisibility ? (
|
|
29794
|
+
}, Je(t === "left" ? "左" : t === "right" ? "右" : "中"), 11, YM)), 64))], 8, JM)) : P("", !0),
|
|
29795
|
+
e.showVisibility ? (z(), F("label", {
|
|
29786
29796
|
key: 3,
|
|
29787
29797
|
class: "mg-column-settings__visibility",
|
|
29788
29798
|
title: e.row.hidden ? "显示列" : "隐藏列"
|
|
@@ -29797,7 +29807,7 @@ var VM = ["data-col-id"], HM = { class: "mg-column-settings__row-main" }, UM = [
|
|
|
29797
29807
|
"aria-hidden": "true"
|
|
29798
29808
|
}, "显示", -1)], 8, XM)) : P("", !0)
|
|
29799
29809
|
])) : P("", !0)
|
|
29800
|
-
]), i.value && e.gridApi && e.row.filterable ? (
|
|
29810
|
+
]), i.value && e.gridApi && e.row.filterable ? (z(), De(DM, {
|
|
29801
29811
|
key: 0,
|
|
29802
29812
|
class: "mg-column-settings__filter-panel",
|
|
29803
29813
|
"col-id": e.row.colId,
|
|
@@ -29873,7 +29883,7 @@ function rN(e, t, n, r) {
|
|
|
29873
29883
|
}
|
|
29874
29884
|
//#endregion
|
|
29875
29885
|
//#region src/components/ColumnSettings/ColumnSettingsList.vue?vue&type=script&setup=true&lang.ts
|
|
29876
|
-
var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDragover", "onDrop"], sN = /* @__PURE__ */
|
|
29886
|
+
var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDragover", "onDrop"], sN = /* @__PURE__ */ L({
|
|
29877
29887
|
__name: "ColumnSettingsList",
|
|
29878
29888
|
props: {
|
|
29879
29889
|
lane: {},
|
|
@@ -29888,7 +29898,7 @@ var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDr
|
|
|
29888
29898
|
left: "固定左侧列",
|
|
29889
29899
|
center: "中间列",
|
|
29890
29900
|
right: "固定右侧列"
|
|
29891
|
-
}, r = e, i = t, a =
|
|
29901
|
+
}, r = e, i = t, a = B(null), o = B(null);
|
|
29892
29902
|
function s(e, t) {
|
|
29893
29903
|
if (!r.rows.find((t) => t.colId === e)?.movable) {
|
|
29894
29904
|
t.preventDefault();
|
|
@@ -29911,11 +29921,11 @@ var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDr
|
|
|
29911
29921
|
function u() {
|
|
29912
29922
|
a.value = null, o.value = null;
|
|
29913
29923
|
}
|
|
29914
|
-
return (t, r) => e.rows.length > 0 ? (
|
|
29924
|
+
return (t, r) => e.rows.length > 0 ? (z(), F("section", {
|
|
29915
29925
|
key: 0,
|
|
29916
|
-
class:
|
|
29926
|
+
class: R([V(Bl), `mg-column-settings__group--${e.lane}`]),
|
|
29917
29927
|
"aria-label": n[e.lane]
|
|
29918
|
-
}, [I("div", aN, [(
|
|
29928
|
+
}, [I("div", aN, [(z(!0), F(Te, null, Ue(e.rows, (t, n) => (z(), F("div", {
|
|
29919
29929
|
key: t.colId,
|
|
29920
29930
|
class: "mg-column-settings__row-host",
|
|
29921
29931
|
onDragover: (e) => c(n, e),
|
|
@@ -29968,7 +29978,7 @@ var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDr
|
|
|
29968
29978
|
"stroke-linecap": "round",
|
|
29969
29979
|
"stroke-linejoin": "round",
|
|
29970
29980
|
"aria-hidden": "true"
|
|
29971
|
-
}, hN = { class: "mg-column-settings__hidden-rows" }, gN = { class: "mg-column-settings__rows" }, _N = /* @__PURE__ */
|
|
29981
|
+
}, hN = { class: "mg-column-settings__hidden-rows" }, gN = { class: "mg-column-settings__rows" }, _N = /* @__PURE__ */ L({
|
|
29972
29982
|
__name: "ColumnSettingsGroupedLists",
|
|
29973
29983
|
props: {
|
|
29974
29984
|
grouped: {},
|
|
@@ -29981,11 +29991,11 @@ var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDr
|
|
|
29981
29991
|
},
|
|
29982
29992
|
emits: ["reorder", "change"],
|
|
29983
29993
|
setup(e, { emit: t }) {
|
|
29984
|
-
let n = e, r = t, i =
|
|
29994
|
+
let n = e, r = t, i = B(!0);
|
|
29985
29995
|
function a() {
|
|
29986
29996
|
BM(n.gridApi) && r("change");
|
|
29987
29997
|
}
|
|
29988
|
-
return (t, n) => (
|
|
29998
|
+
return (t, n) => (z(), F("div", cN, [I("div", lN, [
|
|
29989
29999
|
je(sN, {
|
|
29990
30000
|
lane: "left",
|
|
29991
30001
|
rows: e.grouped.left,
|
|
@@ -30028,9 +30038,9 @@ var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDr
|
|
|
30028
30038
|
"show-filter",
|
|
30029
30039
|
"show-visibility"
|
|
30030
30040
|
])
|
|
30031
|
-
]), e.grouped.hidden.length > 0 ? (
|
|
30041
|
+
]), e.grouped.hidden.length > 0 ? (z(), F("section", {
|
|
30032
30042
|
key: 0,
|
|
30033
|
-
class:
|
|
30043
|
+
class: R(V(Wl))
|
|
30034
30044
|
}, [I("div", uN, [
|
|
30035
30045
|
n[10] ||= I("span", {
|
|
30036
30046
|
class: "mg-column-settings__hidden-divider-line",
|
|
@@ -30041,7 +30051,7 @@ var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDr
|
|
|
30041
30051
|
class: "mg-column-settings__hidden-toggle",
|
|
30042
30052
|
"aria-expanded": i.value,
|
|
30043
30053
|
onClick: n[6] ||= (e) => i.value = !i.value
|
|
30044
|
-
}, [Ae(" 隐藏 (" +
|
|
30054
|
+
}, [Ae(" 隐藏 (" + Je(e.grouped.hidden.length) + ") ", 1), i.value ? (z(), F("svg", pN, [...n[8] ||= [ke("<path d=\"m3 8 4-4 4 4\"></path><path d=\"M7 4v16\"></path><path d=\"M11 12h10\"></path><path d=\"M11 16h7\"></path><path d=\"M11 20h4\"></path>", 5)]])) : (z(), F("svg", mN, [...n[9] ||= [ke("<path d=\"m3 16 4 4 4-4\"></path><path d=\"M7 20V4\"></path><path d=\"M11 4h10\"></path><path d=\"M11 8h7\"></path><path d=\"M11 12h4\"></path>", 5)]]))], 8, fN), I("button", {
|
|
30045
30055
|
type: "button",
|
|
30046
30056
|
class: "mg-column-settings__hidden-show-all",
|
|
30047
30057
|
onClick: a
|
|
@@ -30050,7 +30060,7 @@ var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDr
|
|
|
30050
30060
|
class: "mg-column-settings__hidden-divider-line",
|
|
30051
30061
|
"aria-hidden": "true"
|
|
30052
30062
|
}, null, -1)
|
|
30053
|
-
]),
|
|
30063
|
+
]), $e(I("div", hN, [I("h4", { class: R([V(Vl), "mg-column-settings__sr-only"]) }, " 已隐藏列 ", 2), I("div", gN, [(z(!0), F(Te, null, Ue(e.grouped.hidden, (t) => (z(), De(QM, {
|
|
30054
30064
|
key: t.colId,
|
|
30055
30065
|
row: t,
|
|
30056
30066
|
"grid-api": e.gridApi,
|
|
@@ -30064,7 +30074,7 @@ var iN = ["aria-label"], aN = { class: "mg-column-settings__rows" }, oN = ["onDr
|
|
|
30064
30074
|
"row",
|
|
30065
30075
|
"grid-api",
|
|
30066
30076
|
"show-visibility"
|
|
30067
|
-
]))), 128))])], 512), [[
|
|
30077
|
+
]))), 128))])], 512), [[Ze, i.value]])], 2)) : P("", !0)]));
|
|
30068
30078
|
}
|
|
30069
30079
|
});
|
|
30070
30080
|
//#endregion
|
|
@@ -30118,7 +30128,7 @@ function CN(e, t) {
|
|
|
30118
30128
|
}
|
|
30119
30129
|
//#endregion
|
|
30120
30130
|
//#region src/components/ColumnSettings/ColumnSettingsPanel.vue?vue&type=script&setup=true&lang.ts
|
|
30121
|
-
var wN = { class: "mg-column-settings__header-leading" }, TN = /* @__PURE__ */
|
|
30131
|
+
var wN = { class: "mg-column-settings__header-leading" }, TN = /* @__PURE__ */ L({
|
|
30122
30132
|
__name: "ColumnSettingsPanel",
|
|
30123
30133
|
props: {
|
|
30124
30134
|
gridApi: {},
|
|
@@ -30137,7 +30147,7 @@ var wN = { class: "mg-column-settings__header-leading" }, TN = /* @__PURE__ */ M
|
|
|
30137
30147
|
},
|
|
30138
30148
|
emits: ["close"],
|
|
30139
30149
|
setup(e, { emit: t }) {
|
|
30140
|
-
let n = e, r = t, i =
|
|
30150
|
+
let n = e, r = t, i = qe(xN(n.gridApi)), a = null;
|
|
30141
30151
|
function o() {
|
|
30142
30152
|
i.value = xN(n.gridApi);
|
|
30143
30153
|
}
|
|
@@ -30147,25 +30157,25 @@ var wN = { class: "mg-column-settings__header-leading" }, TN = /* @__PURE__ */ M
|
|
|
30147
30157
|
function c() {
|
|
30148
30158
|
a?.(), a = null;
|
|
30149
30159
|
}
|
|
30150
|
-
|
|
30160
|
+
H(() => n.open, (e) => {
|
|
30151
30161
|
if (e) {
|
|
30152
30162
|
s();
|
|
30153
30163
|
return;
|
|
30154
30164
|
}
|
|
30155
30165
|
c();
|
|
30156
|
-
}, { immediate: !0 }),
|
|
30166
|
+
}, { immediate: !0 }), H(() => n.gridApi, () => {
|
|
30157
30167
|
n.open && o();
|
|
30158
|
-
}),
|
|
30168
|
+
}), ze(() => {
|
|
30159
30169
|
c();
|
|
30160
30170
|
});
|
|
30161
30171
|
function l() {
|
|
30162
30172
|
o();
|
|
30163
30173
|
}
|
|
30164
|
-
return (t, n) => (
|
|
30165
|
-
class:
|
|
30174
|
+
return (t, n) => (z(), F("div", {
|
|
30175
|
+
class: R(V(Tl)),
|
|
30166
30176
|
role: "document",
|
|
30167
30177
|
"aria-label": "列设置"
|
|
30168
|
-
}, [I("header", { class:
|
|
30178
|
+
}, [I("header", { class: R(V(El)) }, [I("div", wN, [n[1] ||= ke("<div class=\"mg-column-settings__title-group\"><svg class=\"mg-column-settings__title-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M10 8h4\"></path><path d=\"M12 21v-9\"></path><path d=\"M12 8V3\"></path><path d=\"M17 16h4\"></path><path d=\"M19 12V3\"></path><path d=\"M19 21v-5\"></path><path d=\"M3 14h4\"></path><path d=\"M5 10V3\"></path><path d=\"M5 21v-7\"></path></svg><h3 class=\"mg-column-settings__title\">列设置</h3></div>", 1), je(TM, {
|
|
30169
30179
|
"grid-api": e.gridApi,
|
|
30170
30180
|
"can-clear-all-filters": i.value.canClearAllFilters,
|
|
30171
30181
|
onChange: l
|
|
@@ -30174,7 +30184,7 @@ var wN = { class: "mg-column-settings__header-leading" }, TN = /* @__PURE__ */ M
|
|
|
30174
30184
|
class: "mg-column-settings__close",
|
|
30175
30185
|
"aria-label": "关闭列设置",
|
|
30176
30186
|
onClick: n[0] ||= (e) => r("close")
|
|
30177
|
-
}, " × ")], 2), I("div", { class:
|
|
30187
|
+
}, " × ")], 2), I("div", { class: R(V(Dl)) }, [je(_N, {
|
|
30178
30188
|
grouped: i.value.grouped,
|
|
30179
30189
|
"grid-api": e.gridApi,
|
|
30180
30190
|
"show-filter": e.showFilter,
|
|
@@ -30234,7 +30244,7 @@ var MN = [
|
|
|
30234
30244
|
"aria-expanded",
|
|
30235
30245
|
"aria-label",
|
|
30236
30246
|
"title"
|
|
30237
|
-
], NN = /* @__PURE__ */
|
|
30247
|
+
], NN = /* @__PURE__ */ L({
|
|
30238
30248
|
__name: "ColumnSettingsButton",
|
|
30239
30249
|
props: {
|
|
30240
30250
|
gridApi: {},
|
|
@@ -30259,7 +30269,7 @@ var MN = [
|
|
|
30259
30269
|
"close"
|
|
30260
30270
|
],
|
|
30261
30271
|
setup(e, { emit: t }) {
|
|
30262
|
-
let n = e, r = t, i =
|
|
30272
|
+
let n = e, r = t, i = Xe(), a = B(null), o = B(null), s = B(null), c = B(!1), l = B(n.open ?? n.defaultOpen ?? !1), u = B(0), d = !1;
|
|
30263
30273
|
function f() {
|
|
30264
30274
|
let e = n.portalEl;
|
|
30265
30275
|
return e instanceof HTMLElement && e.isConnected ? e : "body";
|
|
@@ -30268,7 +30278,7 @@ var MN = [
|
|
|
30268
30278
|
let e = i.menu;
|
|
30269
30279
|
return e ? e().some((e) => e.type !== we) : !1;
|
|
30270
30280
|
}), h = N(() => c.value || l.value), g = N(() => n.size ? Ri(n.size) : void 0);
|
|
30271
|
-
|
|
30281
|
+
H(() => n.open, (e) => {
|
|
30272
30282
|
e !== void 0 && (l.value = e, e && (c.value = !1));
|
|
30273
30283
|
});
|
|
30274
30284
|
function _(e) {
|
|
@@ -30323,11 +30333,11 @@ var MN = [
|
|
|
30323
30333
|
function D() {
|
|
30324
30334
|
c.value && ee(), l.value && E();
|
|
30325
30335
|
}
|
|
30326
|
-
|
|
30327
|
-
e && (await
|
|
30328
|
-
}),
|
|
30329
|
-
e && (await
|
|
30330
|
-
}),
|
|
30336
|
+
H(c, async (e) => {
|
|
30337
|
+
e && (await Ie(), ee());
|
|
30338
|
+
}), H(l, async (e) => {
|
|
30339
|
+
e && (await Ie(), E());
|
|
30340
|
+
}), H(() => [n.portalEl, n.size], () => {
|
|
30331
30341
|
w(), u.value += 1;
|
|
30332
30342
|
});
|
|
30333
30343
|
function O() {
|
|
@@ -30341,10 +30351,10 @@ var MN = [
|
|
|
30341
30351
|
let t = document.activeElement;
|
|
30342
30352
|
t instanceof HTMLElement && e.contains(t) && (t.blur(), a.value?.focus());
|
|
30343
30353
|
}
|
|
30344
|
-
|
|
30354
|
+
H([c, l], () => {
|
|
30345
30355
|
O();
|
|
30346
30356
|
});
|
|
30347
|
-
function
|
|
30357
|
+
function k(e) {
|
|
30348
30358
|
if (e.key === "Escape") {
|
|
30349
30359
|
if (l.value) {
|
|
30350
30360
|
e.preventDefault(), e.stopPropagation(), S();
|
|
@@ -30353,18 +30363,18 @@ var MN = [
|
|
|
30353
30363
|
c.value && (e.preventDefault(), e.stopPropagation(), C());
|
|
30354
30364
|
}
|
|
30355
30365
|
}
|
|
30356
|
-
function
|
|
30366
|
+
function A(e) {
|
|
30357
30367
|
if (!c.value && !l.value || d || e.button !== 0) return;
|
|
30358
30368
|
let t = e.target;
|
|
30359
30369
|
t instanceof Node && (a.value?.contains(t) || o.value?.contains(t) || s.value?.contains(t) || w());
|
|
30360
30370
|
}
|
|
30361
|
-
return
|
|
30362
|
-
O(), document.addEventListener("keydown",
|
|
30363
|
-
}),
|
|
30364
|
-
c.value = !1, l.value = !1, O(), document.removeEventListener("keydown",
|
|
30365
|
-
}), (t, n) => (
|
|
30366
|
-
class:
|
|
30367
|
-
style:
|
|
30371
|
+
return Be(() => {
|
|
30372
|
+
O(), document.addEventListener("keydown", k, !0), document.addEventListener("pointerdown", A, !0), window.addEventListener("resize", D), window.addEventListener("scroll", D, !0);
|
|
30373
|
+
}), ze(() => {
|
|
30374
|
+
c.value = !1, l.value = !1, O(), document.removeEventListener("keydown", k, !0), document.removeEventListener("pointerdown", A, !0), window.removeEventListener("resize", D), window.removeEventListener("scroll", D, !0);
|
|
30375
|
+
}), (t, n) => (z(), F("div", {
|
|
30376
|
+
class: R(V(Ol)),
|
|
30377
|
+
style: Re(g.value)
|
|
30368
30378
|
}, [I("button", {
|
|
30369
30379
|
ref_key: "triggerRef",
|
|
30370
30380
|
ref: a,
|
|
@@ -30390,31 +30400,31 @@ var MN = [
|
|
|
30390
30400
|
cx: "12",
|
|
30391
30401
|
cy: "12",
|
|
30392
30402
|
r: "3"
|
|
30393
|
-
})], -1)]], 8, MN), (
|
|
30403
|
+
})], -1)]], 8, MN), (z(), De(Ee, {
|
|
30394
30404
|
key: u.value,
|
|
30395
30405
|
to: p.value
|
|
30396
|
-
}, [c.value ? (
|
|
30406
|
+
}, [c.value ? (z(), F("div", {
|
|
30397
30407
|
key: 0,
|
|
30398
|
-
class:
|
|
30408
|
+
class: R(V(kl))
|
|
30399
30409
|
}, [I("div", {
|
|
30400
30410
|
ref_key: "menuRef",
|
|
30401
30411
|
ref: o,
|
|
30402
|
-
class:
|
|
30412
|
+
class: R(V(Al))
|
|
30403
30413
|
}, [je(CM, {
|
|
30404
30414
|
"show-divider": m.value,
|
|
30405
30415
|
onColumnSettings: b,
|
|
30406
30416
|
onCustomAction: C,
|
|
30407
30417
|
onReset: x
|
|
30408
30418
|
}, {
|
|
30409
|
-
default:
|
|
30419
|
+
default: Qe(() => [We(t.$slots, "menu")]),
|
|
30410
30420
|
_: 3
|
|
30411
|
-
}, 8, ["show-divider"])], 2)], 2)) : P("", !0), l.value ? (
|
|
30421
|
+
}, 8, ["show-divider"])], 2)], 2)) : P("", !0), l.value ? (z(), F("div", {
|
|
30412
30422
|
key: 1,
|
|
30413
|
-
class:
|
|
30423
|
+
class: R(V(kl))
|
|
30414
30424
|
}, [I("div", {
|
|
30415
30425
|
ref_key: "panelRef",
|
|
30416
30426
|
ref: s,
|
|
30417
|
-
class:
|
|
30427
|
+
class: R(V(Al)),
|
|
30418
30428
|
role: "dialog",
|
|
30419
30429
|
"aria-modal": "false",
|
|
30420
30430
|
"aria-label": "列设置面板"
|
|
@@ -30449,11 +30459,11 @@ function IN(e, t) {
|
|
|
30449
30459
|
e.setGetValue?.(() => r(t.getValue())), e.setKeyboardPolicy?.({
|
|
30450
30460
|
deferEnterCommit: n.deferEnterCommit,
|
|
30451
30461
|
suppressInitialAutoFocus: !a || void 0
|
|
30452
|
-
}),
|
|
30462
|
+
}), Be(() => {
|
|
30453
30463
|
(async () => {
|
|
30454
30464
|
await FN(t.onMount), e.autoFocus !== !1 && await FN(t.onStart);
|
|
30455
30465
|
})();
|
|
30456
|
-
}),
|
|
30466
|
+
}), Ve(() => {
|
|
30457
30467
|
FN(t.onDestroy);
|
|
30458
30468
|
});
|
|
30459
30469
|
function o() {
|
|
@@ -30474,7 +30484,7 @@ function IN(e, t) {
|
|
|
30474
30484
|
function l(e) {
|
|
30475
30485
|
if (e instanceof KeyboardEvent) {
|
|
30476
30486
|
if (e.key === "Enter") {
|
|
30477
|
-
n.deferEnterCommit &&
|
|
30487
|
+
n.deferEnterCommit && Ie(o);
|
|
30478
30488
|
return;
|
|
30479
30489
|
}
|
|
30480
30490
|
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), s());
|
|
@@ -30541,16 +30551,16 @@ function WN(e) {
|
|
|
30541
30551
|
return [...new Set(e)];
|
|
30542
30552
|
}
|
|
30543
30553
|
function GN(e) {
|
|
30544
|
-
return WN(
|
|
30554
|
+
return WN(Ye(e));
|
|
30545
30555
|
}
|
|
30546
30556
|
function KN(e, t) {
|
|
30547
|
-
let n = t.syncPendingOnInteraction !== !1, r =
|
|
30548
|
-
|
|
30557
|
+
let n = t.syncPendingOnInteraction !== !1, r = qe(GN(t.initialIntent));
|
|
30558
|
+
H(() => GN(t.initialIntent), (e) => {
|
|
30549
30559
|
r.value = e;
|
|
30550
30560
|
});
|
|
30551
30561
|
let i = N(() => new Set(r.value));
|
|
30552
30562
|
function a(t) {
|
|
30553
|
-
let n =
|
|
30563
|
+
let n = Ye(e);
|
|
30554
30564
|
return n != null && BN(n, t);
|
|
30555
30565
|
}
|
|
30556
30566
|
let o = N(() => UN(i.value, a)), s = N(() => o.value.offModel), c = N(() => o.value.onModel);
|
|
@@ -30564,7 +30574,7 @@ function KN(e, t) {
|
|
|
30564
30574
|
r.value = GN(t.initialIntent);
|
|
30565
30575
|
}
|
|
30566
30576
|
function f() {
|
|
30567
|
-
let t =
|
|
30577
|
+
let t = Ye(e);
|
|
30568
30578
|
t && t.setDefaultSelectedRows([...r.value], { mode: "cover" });
|
|
30569
30579
|
}
|
|
30570
30580
|
function p(e) {
|
|
@@ -30572,11 +30582,11 @@ function KN(e, t) {
|
|
|
30572
30582
|
}
|
|
30573
30583
|
function m(t) {
|
|
30574
30584
|
u(t);
|
|
30575
|
-
let n =
|
|
30585
|
+
let n = Ye(e);
|
|
30576
30586
|
n && n.setDefaultSelectedRows([...t], { mode: "merge" });
|
|
30577
30587
|
}
|
|
30578
30588
|
function h(t) {
|
|
30579
|
-
let n =
|
|
30589
|
+
let n = Ye(e);
|
|
30580
30590
|
if (!n) return;
|
|
30581
30591
|
let a = VN(t);
|
|
30582
30592
|
r.value = HN({
|
|
@@ -30594,7 +30604,7 @@ function KN(e, t) {
|
|
|
30594
30604
|
};
|
|
30595
30605
|
}
|
|
30596
30606
|
return {
|
|
30597
|
-
intentIds:
|
|
30607
|
+
intentIds: Ke(r),
|
|
30598
30608
|
offModelIds: s,
|
|
30599
30609
|
onModelIds: c,
|
|
30600
30610
|
replaceIntent: l,
|
|
@@ -30607,6 +30617,6 @@ function KN(e, t) {
|
|
|
30607
30617
|
};
|
|
30608
30618
|
}
|
|
30609
30619
|
//#endregion
|
|
30610
|
-
export { ri as BUILTIN_CELL_EDITOR_NAMES, zo as COLUMN_DRAG_THRESHOLD_PX, NN as ColumnSettingsButton, gM as ColumnSettingsMenuIcon, yM as ColumnSettingsMenuItem, TN as ColumnSettingsPanel, n as DEFAULT_CELL_EDITOR_MODE, E as DEFAULT_INDEX_COLUMN_START, c as DEFAULT_SELECTION_SELECT_ALL_LABEL,
|
|
30620
|
+
export { ri as BUILTIN_CELL_EDITOR_NAMES, zo as COLUMN_DRAG_THRESHOLD_PX, NN as ColumnSettingsButton, gM as ColumnSettingsMenuIcon, yM as ColumnSettingsMenuItem, TN as ColumnSettingsPanel, n as DEFAULT_CELL_EDITOR_MODE, E as DEFAULT_INDEX_COLUMN_START, c as DEFAULT_SELECTION_SELECT_ALL_LABEL, nt as DEFAULT_STATUS_BAR_RANGE_AGGREGATION_PRECISION, pe as INDEX_COLUMN_ID, ue as INDEX_COLUMN_MIN_WIDTH, Pp as INLINE_CHECKBOX_CLASS, Fp as INLINE_SWITCH_CLASS, pM as MagicGrid, se as RowMutationPersistError, ce as SELECTION_COLUMN_DEFAULT_WIDTH, s as SELECTION_COLUMN_ID, y as SELECTION_COLUMN_MIN_WIDTH, Bo as SORT_AFTER_MOVE_GUARD_MS, Ip as SWITCH_EDITOR_CLASS, Pj as VueCellEditorHost, Hp as checkboxCellEditor, Ir as coerceCheckboxEditorValue, kr as coerceSwitchEditorValue, kr as coerceToggleEditorValue, zj as createSlotCellEditor, Rj as createVueCellEditor, nj as evaluateGridAcceptance, LN as executeFocus, Lr as formatCheckboxEditorRawValue, jr as formatSwitchEditorRawValue, _e as generateFocusedRowIds, w as generateRowId, ge as generateSelectedRowIds, Xp as getCellEditor, tj as getGridAcceptanceThresholds, ej as getGridSetDataLimit, VN as getMaterializedSelectionIdsFromEvent, Qp as getRegisteredCellEditorNames, fe as getRowDragCommitHierarchy, Zp as hasCellEditor, ii as isBuiltInCellEditor, _ as isInlineEditorColumn, BN as isRowIdInGridModel, r as isSyntheticRow, Ym as magicGridVueCellRef, Vp as numberCellEditor, zr as parseCheckboxEditorRawValue, Nr as parseSwitchEditorRawValue, UN as partitionDefaultSelectedRowsIntentByModel, Rr as readCheckboxControlValue, Mr as readSwitchControlValue, HN as recomputeDefaultSelectedRowsIntent, Jp as registerCellEditor, Tp as registerEditorSurfaceSelectors, Ep as resetEditorSurfaceSelectors, o as resolveCellEditorMode, Fr as resolveCheckboxEditorValues, g as resolveColumnCellEditorMode, Er as resolveSwitchEditorValues, Up as switchCellEditor, Bp as textCellEditor, h as toBusinessRowId, i as toBusinessRowIdFromInternal, f as toBusinessRowIdsFromInternal, Cg as toggleHeaderSort, Yp as unregisterCellEditor, IN as useCellEditor, KN as useDefaultSelectedRowsIntent, RN as useGridApi, zN as useGridLifecycle, Fj as vueCellEditorProps };
|
|
30611
30621
|
|
|
30612
30622
|
//# sourceMappingURL=index.es.js.map
|