@hzab/edit-table 0.1.13-alpha.0 → 0.1.13
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/CHANGELOG.md +19 -0
- package/dist/common/WidthWrapHoc.d.ts +2 -0
- package/dist/common/useDynamicHeight.d.ts +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +352 -199
- package/dist/index.js.map +1 -1
- package/dist/project-manifest.json +6 -5
- package/dist/project.json +4 -3
- package/package.json +5 -5
- package/src/Template/GetBaseTemplate.tsx +1 -1
- package/src/common/WidthWrapHoc.tsx +37 -8
- package/src/common/useDynamicHeight.ts +239 -0
- package/src/index.less +33 -1
- package/src/index.tsx +162 -129
package/dist/index.js
CHANGED
|
@@ -2,13 +2,13 @@ import { forwardRef as e, useCallback as t, useEffect as n, useImperativeHandle
|
|
|
2
2
|
import { Checkbox as s, DatePicker as c, Empty as l, Input as u, Popover as d, Spin as f, TimePicker as p } from "antd";
|
|
3
3
|
import { ReactGrid as m, getCellProperty as h, isAlphaNumericKey as g, isNavigationKey as _ } from "@silevis/reactgrid";
|
|
4
4
|
import { antdComponents as v, customComponents as y } from "@hzab/form-render";
|
|
5
|
-
import { InfoCircleOutlined as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { c as
|
|
8
|
-
import { getVal as
|
|
5
|
+
import { InfoCircleOutlined as ee, MinusCircleOutlined as b, PlusCircleOutlined as x } from "@ant-design/icons";
|
|
6
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
7
|
+
import { c as T } from "react/compiler-runtime";
|
|
8
|
+
import { getVal as E } from "@hzab/utils/src/formily/field";
|
|
9
9
|
import "@silevis/reactgrid/styles.css";
|
|
10
10
|
//#region src/common/childAntdComponent.ts
|
|
11
|
-
var
|
|
11
|
+
var D = {
|
|
12
12
|
"DatePicker.MonthPicker": c.MonthPicker,
|
|
13
13
|
"DatePicker.QuarterPicker": c.QuarterPicker,
|
|
14
14
|
"DatePicker.RangePicker": c.RangePicker,
|
|
@@ -19,7 +19,7 @@ var O = {
|
|
|
19
19
|
"Input.Search": u.Search,
|
|
20
20
|
"Input.TextArea": u.TextArea,
|
|
21
21
|
"TimePicker.RangePicker": p.RangePicker
|
|
22
|
-
},
|
|
22
|
+
}, O = [
|
|
23
23
|
"DatePicker",
|
|
24
24
|
"DatePicker.MonthPicker",
|
|
25
25
|
"DatePicker.QuarterPicker",
|
|
@@ -28,7 +28,7 @@ var O = {
|
|
|
28
28
|
"DatePicker.WeekPicker",
|
|
29
29
|
"DatePicker.YearPicker",
|
|
30
30
|
"TimePicker.RangePicker"
|
|
31
|
-
],
|
|
31
|
+
], k = (e, t = {}) => {
|
|
32
32
|
class r {
|
|
33
33
|
getCompatibleCell(e) {
|
|
34
34
|
let t;
|
|
@@ -61,7 +61,8 @@ var O = {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
getClassName(e, t) {
|
|
64
|
-
|
|
64
|
+
let n = window.gridHighlightRowId;
|
|
65
|
+
return n && e.rowId === n ? "custom-highlights-row" : "";
|
|
65
66
|
}
|
|
66
67
|
handleCompositionEnd(e, t) {
|
|
67
68
|
return {
|
|
@@ -71,19 +72,30 @@ var O = {
|
|
|
71
72
|
}
|
|
72
73
|
render(r, s, c) {
|
|
73
74
|
var l;
|
|
74
|
-
let [u, f] = o(!1), [p, m] = o(!1), h = (r == null ? void 0 : r.columnId) + (r == null ? void 0 : r.rowId), [v, y] = o(r == null ? void 0 : r.text), [
|
|
75
|
+
let [u, f] = o(!1), [p, m] = o(!1), h = (r == null ? void 0 : r.columnId) + (r == null ? void 0 : r.rowId), [v, y] = o(r == null ? void 0 : r.text), [b, x] = o(!1), S = a(r == null ? void 0 : r.text), T = a(), E = a(null), D = a(null), k = (e) => {
|
|
76
|
+
let t = Array.from(e.children);
|
|
77
|
+
if (t.length === 0) return e.clientHeight;
|
|
78
|
+
let n = Infinity, r = -Infinity;
|
|
79
|
+
for (let e of t) {
|
|
80
|
+
let t = e.getBoundingClientRect(), i = getComputedStyle(e), a = parseFloat(i.marginTop) || 0, o = parseFloat(i.marginBottom) || 0;
|
|
81
|
+
n = Math.min(n, t.top - a), r = Math.max(r, t.bottom + o);
|
|
82
|
+
}
|
|
83
|
+
return Math.max(0, Math.ceil(r - n));
|
|
84
|
+
};
|
|
75
85
|
n(() => {
|
|
76
|
-
let e =
|
|
86
|
+
let e = E.current, t = r == null ? void 0 : r.onRowHeightChange;
|
|
77
87
|
if (!e || !t || (r == null ? void 0 : r.rowId) == null || typeof (r == null ? void 0 : r.rowId) == "string" && r.rowId.indexOf("header-") === 0) return;
|
|
78
88
|
let n = e.firstElementChild, i = n || e;
|
|
79
|
-
if (
|
|
89
|
+
if (D.current === null) {
|
|
80
90
|
let t = getComputedStyle(e);
|
|
81
|
-
|
|
91
|
+
D.current = (parseFloat(t.paddingTop) || 0) + (parseFloat(t.paddingBottom) || 0);
|
|
82
92
|
}
|
|
83
|
-
let a = n ?
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
let a = n ? D.current : 0, o = new ResizeObserver(() => {
|
|
94
|
+
Array.from(i.children).forEach((e) => o.observe(e));
|
|
95
|
+
let e = k(i) + a;
|
|
96
|
+
t(r == null ? void 0 : r.rowId, e, r == null ? void 0 : r.columnId);
|
|
97
|
+
});
|
|
98
|
+
return o.observe(i), Array.from(i.children).forEach((e) => o.observe(e)), () => o.disconnect();
|
|
87
99
|
}, [
|
|
88
100
|
r == null ? void 0 : r.rowId,
|
|
89
101
|
r == null ? void 0 : r.columnId,
|
|
@@ -91,7 +103,7 @@ var O = {
|
|
|
91
103
|
u,
|
|
92
104
|
v
|
|
93
105
|
]), n(() => {
|
|
94
|
-
y(r == null ? void 0 : r.text),
|
|
106
|
+
y(r == null ? void 0 : r.text), S.current = r == null ? void 0 : r.text;
|
|
95
107
|
}, [r == null ? void 0 : r.text]), n(() => {
|
|
96
108
|
function e(e) {
|
|
97
109
|
window.gridEditId != h && f(!1);
|
|
@@ -108,7 +120,7 @@ var O = {
|
|
|
108
120
|
t != null && (a = t.pattern) != null && a.test(e) && (n = !0);
|
|
109
121
|
break;
|
|
110
122
|
}
|
|
111
|
-
i = !n && Array.isArray(r == null ? void 0 : r.validatorList) && (r == null || (t = r.validatorList) == null ? void 0 : t.length) > 0,
|
|
123
|
+
i = !n && Array.isArray(r == null ? void 0 : r.validatorList) && (r == null || (t = r.validatorList) == null ? void 0 : t.length) > 0, x(i);
|
|
112
124
|
};
|
|
113
125
|
n(() => {
|
|
114
126
|
if (!p) return;
|
|
@@ -125,29 +137,29 @@ var O = {
|
|
|
125
137
|
return () => clearTimeout(e);
|
|
126
138
|
}, [p]);
|
|
127
139
|
let j = () => {
|
|
128
|
-
let e =
|
|
140
|
+
let e = S.current;
|
|
129
141
|
c(this.getCompatibleCell({
|
|
130
142
|
...r,
|
|
131
143
|
text: e,
|
|
132
144
|
selectedValue: e
|
|
133
145
|
}), !0);
|
|
134
|
-
}, M = i(() =>
|
|
146
|
+
}, M = i(() => O != null && O.includes(r == null ? void 0 : r.type) ? {
|
|
135
147
|
open: p,
|
|
136
148
|
onOpenChange: (e) => {
|
|
137
|
-
|
|
149
|
+
T.current && clearTimeout(T.current), T.current = setTimeout(() => {
|
|
138
150
|
m(e);
|
|
139
151
|
}, 80);
|
|
140
152
|
}
|
|
141
153
|
} : {}, [r]);
|
|
142
154
|
return n(() => {
|
|
143
155
|
!u && r.type == "Upload" && window.uploadEdit && window.uploadEdit == h && (window.uploadEdit = null, j());
|
|
144
|
-
}, [u, v]), /* @__PURE__ */
|
|
145
|
-
ref:
|
|
156
|
+
}, [u, v]), /* @__PURE__ */ w("div", {
|
|
157
|
+
ref: E,
|
|
146
158
|
className: `base-hoc ${u ? "base-hoc-edit" : ""}`,
|
|
147
159
|
onDoubleClick: (e) => {
|
|
148
160
|
r != null && r.nonEditable || (r.type === "Upload" && (window.uploadEdit = h), f(!0));
|
|
149
161
|
},
|
|
150
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ C(e, {
|
|
151
163
|
...t,
|
|
152
164
|
onPointerDown: (e) => e.stopPropagation(),
|
|
153
165
|
componentProps: {
|
|
@@ -161,10 +173,10 @@ var O = {
|
|
|
161
173
|
onChange: (e) => {
|
|
162
174
|
var t, n;
|
|
163
175
|
let r = (t = e == null || (n = e.target) == null ? void 0 : n.value) == null ? e : t;
|
|
164
|
-
y(r),
|
|
176
|
+
y(r), S.current = r, A(r);
|
|
165
177
|
},
|
|
166
178
|
onBlur: (e) => {
|
|
167
|
-
j(),
|
|
179
|
+
j(), O != null && O.includes(r == null ? void 0 : r.type) || f(!1);
|
|
168
180
|
},
|
|
169
181
|
onPointerDown: (e) => {
|
|
170
182
|
e.stopPropagation();
|
|
@@ -177,46 +189,46 @@ var O = {
|
|
|
177
189
|
},
|
|
178
190
|
pattern: u ? "" : "readPretty",
|
|
179
191
|
cell: r
|
|
180
|
-
}),
|
|
192
|
+
}), b && /* @__PURE__ */ C(d, {
|
|
181
193
|
content: (l = r == null ? void 0 : r.validatorMessage) == null ? "该字段不合法" : l,
|
|
182
|
-
children: /* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ C(ee, { className: "validator-icon" })
|
|
183
195
|
})]
|
|
184
196
|
});
|
|
185
197
|
}
|
|
186
198
|
}
|
|
187
199
|
return new r();
|
|
188
|
-
},
|
|
200
|
+
}, A = (e) => {
|
|
189
201
|
let { pattern: t, cell: n, componentProps: r, Com: a, cellRender: o } = e, s = i(() => {
|
|
190
202
|
var e;
|
|
191
|
-
if (n != null && n.getField) return
|
|
203
|
+
if (n != null && n.getField) return E({
|
|
192
204
|
...(n == null ? void 0 : n.getField) && (n == null ? void 0 : n.getField()),
|
|
193
205
|
enum: (n == null || (e = n.getField()) == null ? void 0 : e.enum) || (n == null ? void 0 : n.values)
|
|
194
206
|
}, { [(n == null ? void 0 : n.getField) && (n == null ? void 0 : n.getField().name)]: n.text });
|
|
195
207
|
}, [n]);
|
|
196
|
-
return o && o(e) ? /* @__PURE__ */
|
|
208
|
+
return o && o(e) ? /* @__PURE__ */ C(o, { ...e }) : /* @__PURE__ */ C("div", {
|
|
197
209
|
className: "base-hoc-inner",
|
|
198
|
-
children: t == "readPretty" ? /* @__PURE__ */
|
|
210
|
+
children: t == "readPretty" ? /* @__PURE__ */ C("div", { children: s }) : /* @__PURE__ */ C(a, {
|
|
199
211
|
className: "rg-input",
|
|
200
212
|
ref: (e) => {
|
|
201
|
-
e && e.focus();
|
|
213
|
+
e && e.focus({ preventScroll: !0 });
|
|
202
214
|
},
|
|
203
215
|
...r
|
|
204
216
|
})
|
|
205
217
|
});
|
|
206
|
-
},
|
|
207
|
-
let t =
|
|
218
|
+
}, j = (e) => {
|
|
219
|
+
let t = T(5), n = e == null ? void 0 : e.componentProps, r;
|
|
208
220
|
t[0] === n ? r = t[1] : (r = {
|
|
209
221
|
...n,
|
|
210
222
|
type: "number"
|
|
211
223
|
}, t[0] = n, t[1] = r);
|
|
212
224
|
let i;
|
|
213
|
-
return t[2] !== e || t[3] !== r ? (i = /* @__PURE__ */
|
|
225
|
+
return t[2] !== e || t[3] !== r ? (i = /* @__PURE__ */ C(A, {
|
|
214
226
|
...e,
|
|
215
227
|
componentProps: r,
|
|
216
228
|
Com: u
|
|
217
229
|
}), t[2] = e, t[3] = r, t[4] = i) : i = t[4], i;
|
|
218
|
-
},
|
|
219
|
-
let t =
|
|
230
|
+
}, M = (e) => {
|
|
231
|
+
let t = T(21), { cell: r } = e, { setExpandKeys: i, expandKeys: a, rowKey: s, setNewDataSource: c, record: l } = r, [u, d] = o(!1), f;
|
|
220
232
|
t[0] !== l || t[1] !== s || t[2] !== c ? (f = (e) => {
|
|
221
233
|
c((t) => {
|
|
222
234
|
var n;
|
|
@@ -239,12 +251,12 @@ var O = {
|
|
|
239
251
|
i((e) => e != null && e.includes(l == null ? void 0 : l[s]) ? e == null ? void 0 : e.filter((e) => e != (l == null ? void 0 : l[s])) : [...e, l == null ? void 0 : l[s]]), d(!u), p(!u);
|
|
240
252
|
}, t[11] = u, t[12] = p, t[13] = l, t[14] = s, t[15] = i, t[16] = _) : _ = t[16];
|
|
241
253
|
let v = _, y;
|
|
242
|
-
return t[17] !== u || t[18] !== v || t[19] !== (l == null ? void 0 : l.children) ? (y = /* @__PURE__ */
|
|
254
|
+
return t[17] !== u || t[18] !== v || t[19] !== (l == null ? void 0 : l.children) ? (y = /* @__PURE__ */ C("div", {
|
|
243
255
|
className: "expandList-template",
|
|
244
|
-
children: l != null && l.children ? /* @__PURE__ */
|
|
256
|
+
children: l != null && l.children ? /* @__PURE__ */ C(S, { children: C(u ? b : x, {
|
|
245
257
|
className: "expandList-template-icon",
|
|
246
258
|
onClick: v
|
|
247
|
-
}) }) : /* @__PURE__ */
|
|
259
|
+
}) }) : /* @__PURE__ */ C("div", { style: { width: 14 } })
|
|
248
260
|
}), t[17] = u, t[18] = v, t[19] = l == null ? void 0 : l.children, t[20] = y) : y = t[20], y;
|
|
249
261
|
};
|
|
250
262
|
//#endregion
|
|
@@ -398,13 +410,101 @@ function ne(e) {
|
|
|
398
410
|
return n(e), t;
|
|
399
411
|
}
|
|
400
412
|
//#endregion
|
|
401
|
-
//#region src/
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
413
|
+
//#region src/common/useDynamicHeight.ts
|
|
414
|
+
var re = (e) => {
|
|
415
|
+
let { wrapRef: r, rowHeight: i, setRows: s } = e, c = a({}), l = a(), u = a({
|
|
416
|
+
top: 0,
|
|
417
|
+
left: 0
|
|
418
|
+
}), d = a(0), f = a([]), [p, m] = o({}), h = t((e = 500) => {
|
|
419
|
+
let t = r.current;
|
|
420
|
+
t && (u.current = {
|
|
421
|
+
top: t.scrollTop,
|
|
422
|
+
left: t.scrollLeft
|
|
423
|
+
}, d.current = Math.max(d.current || 0, Date.now() + e));
|
|
424
|
+
}, []), g = t(() => {
|
|
425
|
+
let e = r.current;
|
|
426
|
+
if (!e) return;
|
|
427
|
+
let { top: t, left: n } = u.current;
|
|
428
|
+
requestAnimationFrame(() => {
|
|
429
|
+
requestAnimationFrame(() => {
|
|
430
|
+
e.scrollTop !== t && (e.scrollTop = t), e.scrollLeft !== n && (e.scrollLeft = n);
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
}, []);
|
|
434
|
+
n(() => {
|
|
435
|
+
let e = r.current;
|
|
436
|
+
if (!e) return;
|
|
437
|
+
let t = () => {
|
|
438
|
+
e.querySelectorAll(".rg-hidden-element").forEach((e) => {
|
|
439
|
+
if (e.__focusScrollPatched) return;
|
|
440
|
+
e.__focusScrollPatched = !0;
|
|
441
|
+
let t = e.focus.bind(e);
|
|
442
|
+
e.focus = (e) => t({
|
|
443
|
+
preventScroll: !0,
|
|
444
|
+
...e || {}
|
|
445
|
+
});
|
|
446
|
+
});
|
|
447
|
+
};
|
|
448
|
+
t();
|
|
449
|
+
let n = new MutationObserver(t);
|
|
450
|
+
return n.observe(e, {
|
|
451
|
+
childList: !0,
|
|
452
|
+
subtree: !0
|
|
453
|
+
}), () => n.disconnect();
|
|
454
|
+
}, []), n(() => {
|
|
455
|
+
let e = r.current;
|
|
456
|
+
if (!e || e.__scrollGuard) return;
|
|
457
|
+
e.__scrollGuard = !0;
|
|
458
|
+
let t = Object.getOwnPropertyDescriptor(Element.prototype, "scrollTop");
|
|
459
|
+
Object.defineProperty(e, "scrollTop", {
|
|
460
|
+
configurable: !0,
|
|
461
|
+
get() {
|
|
462
|
+
return t.get.call(e);
|
|
463
|
+
},
|
|
464
|
+
set(n) {
|
|
465
|
+
let r = Number(n) || 0, i = t.get.call(e), a = r - i;
|
|
466
|
+
a !== 0 && Math.abs(a) <= 3 || (r === 0 && i > 50 && console.warn("[CellEditTable] 检测到程序化滚动回顶部: ", i, "->", r, (/* @__PURE__ */ Error()).stack), t.set.call(e, r));
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
let n = e.scrollTo.bind(e);
|
|
470
|
+
e.scrollTo = (r, i) => {
|
|
471
|
+
if (typeof r == "object" && r) {
|
|
472
|
+
if (r.top != null) {
|
|
473
|
+
let n = t.get.call(e), i = Number(r.top) - n;
|
|
474
|
+
if (i !== 0 && Math.abs(i) <= 3) return;
|
|
475
|
+
}
|
|
476
|
+
return n(r);
|
|
477
|
+
}
|
|
478
|
+
if (typeof r == "number" && typeof i == "number") {
|
|
479
|
+
let n = i - t.get.call(e);
|
|
480
|
+
if (n !== 0 && Math.abs(n) <= 3) return;
|
|
481
|
+
}
|
|
482
|
+
return n(r, i);
|
|
483
|
+
};
|
|
484
|
+
let i = e.scrollBy.bind(e);
|
|
485
|
+
e.scrollBy = (e, t) => {
|
|
486
|
+
if (typeof e == "object" && e) return e.top != null && Math.abs(Number(e.top)) <= 3 ? void 0 : i(e);
|
|
487
|
+
if (!(typeof e == "number" && typeof t == "number" && Math.abs(t) <= 3)) return i(e, t);
|
|
488
|
+
};
|
|
489
|
+
}, []), n(() => {
|
|
490
|
+
let e = r.current;
|
|
491
|
+
if (!e) return;
|
|
492
|
+
let t = () => {
|
|
493
|
+
if (Date.now() < d.current && (e.scrollTop === 0 && u.current.top > 50 || e.scrollLeft === 0 && u.current.left > 50)) {
|
|
494
|
+
e.scrollTop = u.current.top, e.scrollLeft = u.current.left;
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
u.current = {
|
|
498
|
+
top: e.scrollTop,
|
|
499
|
+
left: e.scrollLeft
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
return e.addEventListener("scroll", t, !0), () => e.removeEventListener("scroll", t, !0);
|
|
503
|
+
}, []);
|
|
504
|
+
let _ = t(() => {
|
|
505
|
+
l.current = void 0;
|
|
506
|
+
let e = c.current;
|
|
507
|
+
Object.keys(e).length !== 0 && (c.current = {}, m((t) => {
|
|
408
508
|
let n = t;
|
|
409
509
|
for (let r in e) {
|
|
410
510
|
let i = { ...n[r] || {} }, a = !1;
|
|
@@ -416,38 +516,90 @@ function F(e, c) {
|
|
|
416
516
|
}
|
|
417
517
|
return n === t ? t : n;
|
|
418
518
|
}));
|
|
419
|
-
}, []),
|
|
420
|
-
let r = Math.max(Number(t) || 0,
|
|
421
|
-
o
|
|
422
|
-
}, [
|
|
423
|
-
n(() => () => {
|
|
424
|
-
|
|
519
|
+
}, []), v = t((e, t, n) => {
|
|
520
|
+
let r = Math.max(Number(t) || 0, i), a = String(e), o = n || "_", s = c.current[a] = c.current[a] || {};
|
|
521
|
+
s[o] !== r && (s[o] = r, l.current || (l.current = requestAnimationFrame(_)));
|
|
522
|
+
}, [i, _]);
|
|
523
|
+
return n(() => () => {
|
|
524
|
+
l.current && cancelAnimationFrame(l.current);
|
|
425
525
|
}, []), n(() => {
|
|
426
|
-
|
|
526
|
+
s((e) => {
|
|
427
527
|
if (!Array.isArray(e) || e.length === 0) return e;
|
|
428
528
|
let t = !1, n = e.map((e) => {
|
|
429
529
|
if (typeof (e == null ? void 0 : e.rowId) == "string" && e.rowId.indexOf("header-") === 0) return e;
|
|
430
|
-
let n =
|
|
530
|
+
let n = p[e.rowId], r = n && Object.keys(n).length > 0 ? Math.max(i, ...Object.values(n).map(Number)) : i;
|
|
431
531
|
return e.height === r ? e : (t = !0, {
|
|
432
532
|
...e,
|
|
433
533
|
height: r
|
|
434
534
|
});
|
|
435
|
-
});
|
|
436
|
-
return
|
|
535
|
+
}), r = t ? n : e;
|
|
536
|
+
return f.current = r, r;
|
|
437
537
|
});
|
|
438
|
-
}, [
|
|
439
|
-
|
|
538
|
+
}, [p, i]), {
|
|
539
|
+
handleRowHeightChange: v,
|
|
540
|
+
armScrollProtect: h,
|
|
541
|
+
restoreScroll: g,
|
|
542
|
+
SCROLL_RESET_GUARD_MS: 3e3,
|
|
543
|
+
rowsRef: f,
|
|
544
|
+
rowHeights: p
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
//#endregion
|
|
548
|
+
//#region src/index.tsx
|
|
549
|
+
function ie(e, t, n) {
|
|
550
|
+
if (!Array.isArray(e) || !Array.isArray(t) || t.length === 0) return e;
|
|
551
|
+
let r = /* @__PURE__ */ new Map();
|
|
552
|
+
t.forEach((e) => {
|
|
553
|
+
(e == null ? void 0 : e[n]) != null && r.set(String(e[n]), e), (e == null ? void 0 : e.id) != null && r.set(String(e.id), e);
|
|
554
|
+
});
|
|
555
|
+
let i = (e) => Array.isArray(e) ? e.map((e) => {
|
|
556
|
+
var t;
|
|
557
|
+
let a = r.get(String((t = e == null ? void 0 : e[n]) == null ? e == null ? void 0 : e.id : t)), o = e == null ? void 0 : e.children, s = o && i(o);
|
|
558
|
+
if (!a) return s === o ? e : {
|
|
559
|
+
...e,
|
|
560
|
+
children: s
|
|
561
|
+
};
|
|
562
|
+
let { children: c, ...l } = a;
|
|
563
|
+
return {
|
|
564
|
+
...e,
|
|
565
|
+
...l,
|
|
566
|
+
...o === void 0 ? {} : { children: s }
|
|
567
|
+
};
|
|
568
|
+
}) : e;
|
|
569
|
+
return i(e);
|
|
570
|
+
}
|
|
571
|
+
function F(e, t) {
|
|
572
|
+
var c;
|
|
573
|
+
let { columns: u, dataSource: d, formulaConfig: p, onChange: h, reactGridProps: g = {}, onEditSubmit: _, headerRowHeight: ee = 48, rowHeight: b = 48, reactGridStyle: x, className: S, Slots: T, rowSelection: E, rowKey: O = "id", query: P, loading: F, isExpand: ae = !1, getList: oe, setList: I, onRow: L } = e, [R, se] = o([]), [z, B] = o([]);
|
|
574
|
+
a([]);
|
|
575
|
+
let [V, ce] = o([]), [H, le] = o([]), [U, W] = o([]), [G, ue] = o([]), [de, fe] = o([]), [pe, K] = o([]), q = a(), me = a(), J = a(null), he = a(), Y = a([]);
|
|
576
|
+
Y.current = G;
|
|
577
|
+
let { handleRowHeightChange: ge, armScrollProtect: X, restoreScroll: Z, SCROLL_RESET_GUARD_MS: _e, rowsRef: Q, rowHeights: ve } = re({
|
|
578
|
+
wrapRef: J,
|
|
579
|
+
rowHeight: b,
|
|
580
|
+
setRows: B
|
|
581
|
+
});
|
|
582
|
+
r(t, () => ({ rows: z }));
|
|
583
|
+
let ye = (e, t = 0) => {
|
|
440
584
|
e == null || e.forEach((e) => {
|
|
441
|
-
e.level = t + 1, e != null && e.children &&
|
|
585
|
+
e.level = t + 1, e != null && e.children && ye(e == null ? void 0 : e.children, e.level);
|
|
442
586
|
});
|
|
443
587
|
};
|
|
444
588
|
n(() => {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
589
|
+
ye(d), W(((e) => {
|
|
590
|
+
let t = [], n = (e) => {
|
|
591
|
+
for (let a of e || []) {
|
|
592
|
+
var r, i;
|
|
593
|
+
t.push(a), a != null && (r = a.children) != null && r.length && (i = Y.current) != null && i.includes(a == null ? void 0 : a[O]) && n(a.children);
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
return n(e), t;
|
|
597
|
+
})(d));
|
|
598
|
+
}, [d]), n(() => {
|
|
599
|
+
let e = z.map((e) => e.rowId);
|
|
600
|
+
e != null && e.includes(q.current) || (K([]), window.gridHighlightRowId = null);
|
|
601
|
+
}, [z]);
|
|
602
|
+
let be = (e) => {
|
|
451
603
|
var t, n;
|
|
452
604
|
let r = e == null || (t = e.cells) == null || (t = t[0]) == null ? void 0 : t.record, i = ["_$actions", "rowSelection"], a = { id: e == null ? void 0 : e.rowId };
|
|
453
605
|
return e == null || (n = e.cells) == null || n.forEach((e) => {
|
|
@@ -458,54 +610,54 @@ function F(e, c) {
|
|
|
458
610
|
};
|
|
459
611
|
};
|
|
460
612
|
n(() => {
|
|
461
|
-
if (Array.isArray(
|
|
462
|
-
|
|
613
|
+
if (Array.isArray(u) && (u == null ? void 0 : u.length) > 0) {
|
|
614
|
+
ae && u.unshift({
|
|
463
615
|
type: "ExpandListTemplate",
|
|
464
616
|
width: 14,
|
|
465
617
|
key: "ExpandListTemplate",
|
|
466
618
|
nonEditable: !0,
|
|
467
|
-
style: (
|
|
468
|
-
}),
|
|
619
|
+
style: (E == null ? void 0 : E.style) || { background: "rgba(128, 128, 128, 0.1)" }
|
|
620
|
+
}), E && u.unshift({
|
|
469
621
|
type: "rowSelection",
|
|
470
622
|
nonEditable: !0,
|
|
471
|
-
width: (
|
|
623
|
+
width: (E == null ? void 0 : E.width) || 30,
|
|
472
624
|
key: "rowSelection",
|
|
473
|
-
style: (
|
|
625
|
+
style: (E == null ? void 0 : E.style) || {
|
|
474
626
|
background: "rgba(128, 128, 128, 0.1)",
|
|
475
627
|
display: "flex",
|
|
476
628
|
justifyContent: "center"
|
|
477
629
|
}
|
|
478
|
-
}),
|
|
479
|
-
let e = ne(
|
|
480
|
-
|
|
630
|
+
}), se(te(u, ee));
|
|
631
|
+
let e = ne(u);
|
|
632
|
+
ce(e == null ? void 0 : e.map((e, t) => ({
|
|
481
633
|
...e,
|
|
482
634
|
columnId: (e == null ? void 0 : e.dataIndex) || (e == null ? void 0 : e.key) || (e == null ? void 0 : e.name) || ""
|
|
483
635
|
})));
|
|
484
636
|
}
|
|
485
|
-
}, [
|
|
486
|
-
let
|
|
637
|
+
}, [u, E]);
|
|
638
|
+
let $ = {}, xe = (e) => {
|
|
487
639
|
e == null || e.forEach((e) => {
|
|
488
640
|
if (N(typeof (e == null ? void 0 : e.title) == "function" ? e == null ? void 0 : e.title() : null)) {
|
|
489
641
|
let t = e == null ? void 0 : e.title;
|
|
490
|
-
|
|
642
|
+
$[e == null ? void 0 : e.dataIndex] = k(t);
|
|
491
643
|
}
|
|
492
|
-
e != null && e.children &&
|
|
644
|
+
e != null && e.children && xe(e == null ? void 0 : e.children);
|
|
493
645
|
});
|
|
494
646
|
};
|
|
495
647
|
n(() => {
|
|
496
|
-
|
|
497
|
-
}, [
|
|
498
|
-
let e =
|
|
499
|
-
let r =
|
|
648
|
+
xe(u), fe($);
|
|
649
|
+
}, [u]), n(() => {
|
|
650
|
+
let e = V == null ? void 0 : V.map((e) => e == null ? void 0 : e.columnId), t = U == null ? void 0 : U.map((t, n) => {
|
|
651
|
+
let r = ve[t[O]], i = r && Object.keys(r).length > 0 ? Math.max(b, ...Object.values(r).map(Number)) : b;
|
|
500
652
|
return {
|
|
501
|
-
rowId: t[
|
|
653
|
+
rowId: t[O],
|
|
502
654
|
height: i,
|
|
503
655
|
cells: e == null ? void 0 : e.map((e, r) => {
|
|
504
656
|
var i;
|
|
505
|
-
let a = {}, o =
|
|
506
|
-
if (
|
|
507
|
-
for (let n in
|
|
508
|
-
let e =
|
|
657
|
+
let a = {}, o = V[r], s = t[e], c = (i = o == null ? void 0 : o.type) == null ? "text" : i;
|
|
658
|
+
if (p) {
|
|
659
|
+
for (let n in p) if (n == e) {
|
|
660
|
+
let e = p[n];
|
|
509
661
|
a = {
|
|
510
662
|
text: (e == null ? void 0 : e.setCellData) && (e == null ? void 0 : e.setCellData(t)),
|
|
511
663
|
value: (e == null ? void 0 : e.setCellData) && (e == null ? void 0 : e.setCellData(t)),
|
|
@@ -516,7 +668,7 @@ function F(e, c) {
|
|
|
516
668
|
return {
|
|
517
669
|
...o,
|
|
518
670
|
record: t,
|
|
519
|
-
rowId: t[
|
|
671
|
+
rowId: t[O] || (o == null ? void 0 : o.type),
|
|
520
672
|
type: c,
|
|
521
673
|
nonEditable: (o == null ? void 0 : o.pattern) == "readPretty" ? !0 : o == null ? void 0 : o.nonEditable,
|
|
522
674
|
text: String(s || ""),
|
|
@@ -526,153 +678,153 @@ function F(e, c) {
|
|
|
526
678
|
display: "flex",
|
|
527
679
|
justifyContent: "center"
|
|
528
680
|
} : {},
|
|
529
|
-
...
|
|
681
|
+
...L && L(t, n, r) || {},
|
|
530
682
|
...(o == null ? void 0 : o.onCell) && (o == null ? void 0 : o.onCell(t, n, r)) || {},
|
|
531
683
|
...(o == null ? void 0 : o.cellProps) || {},
|
|
532
|
-
setNewDataSource:
|
|
533
|
-
setExpandKeys:
|
|
534
|
-
rowKey:
|
|
535
|
-
expandKeys:
|
|
536
|
-
Slots:
|
|
537
|
-
onRowHeightChange:
|
|
684
|
+
setNewDataSource: W,
|
|
685
|
+
setExpandKeys: ue,
|
|
686
|
+
rowKey: O,
|
|
687
|
+
expandKeys: G,
|
|
688
|
+
Slots: T,
|
|
689
|
+
onRowHeightChange: ge,
|
|
538
690
|
...a
|
|
539
691
|
};
|
|
540
692
|
})
|
|
541
693
|
};
|
|
542
|
-
}), n = [...
|
|
543
|
-
|
|
694
|
+
}), n = [...R, ...t];
|
|
695
|
+
Q.current = n, X(), B(n), Z();
|
|
544
696
|
}, [
|
|
545
|
-
G,
|
|
546
697
|
U,
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
let t = B == null ? void 0 : B.find((e) => {
|
|
552
|
-
var t;
|
|
553
|
-
return (e == null ? void 0 : e.rowId) == ((t = Q.current) == null ? void 0 : t.rowId);
|
|
554
|
-
});
|
|
555
|
-
t == null || (e = t.cells) == null || e.find((e) => {
|
|
556
|
-
var t;
|
|
557
|
-
return (e == null ? void 0 : e.columnId) == ((t = Q.current) == null ? void 0 : t.columnId);
|
|
558
|
-
}), { ...Q.current }, H.current = B;
|
|
559
|
-
}
|
|
560
|
-
}, [I, B]);
|
|
561
|
-
let ye = async (e) => {
|
|
562
|
-
let t = [];
|
|
698
|
+
V,
|
|
699
|
+
R
|
|
700
|
+
]);
|
|
701
|
+
let Se = async (e) => {
|
|
563
702
|
if (!Array.isArray(e) || e.length === 0) return;
|
|
564
|
-
let n =
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
703
|
+
let t = [], n = d, r = (Q.current || []).map((e) => ({
|
|
704
|
+
...e,
|
|
705
|
+
cells: [...e.cells]
|
|
706
|
+
})), i = [];
|
|
707
|
+
if (e.forEach((e) => {
|
|
708
|
+
let n = r.findIndex((t) => t.rowId == e.rowId), a = V.findIndex((t) => t.columnId == e.columnId);
|
|
709
|
+
if (n !== -1 && a !== -1) {
|
|
710
|
+
if (i.push({
|
|
711
|
+
rowId: e.rowId,
|
|
712
|
+
columnId: e.columnId,
|
|
713
|
+
previousCell: e.previousCell
|
|
714
|
+
}), r[n].cells[a] = { ...e.newCell }, he.current = { ...e.newCell }, t.push(be(r[n])), p) for (let e in p) {
|
|
715
|
+
let t = p[e], i = V.findIndex((t) => t.columnId == e);
|
|
716
|
+
if (i === -1) continue;
|
|
717
|
+
let a = {
|
|
718
|
+
...r[n].cells[i],
|
|
719
|
+
text: (t == null ? void 0 : t.setCellData) && (t == null ? void 0 : t.setCellData(r[n])),
|
|
720
|
+
value: (t == null ? void 0 : t.setCellData) && (t == null ? void 0 : t.setCellData(r[n])),
|
|
721
|
+
style: (t == null ? void 0 : t.setCellStyle) && (t == null ? void 0 : t.setCellStyle((t == null ? void 0 : t.setCellData) && (t == null ? void 0 : t.setCellData(r[n])) || r[n]))
|
|
722
|
+
};
|
|
723
|
+
r[n].cells[i] = a;
|
|
724
|
+
}
|
|
725
|
+
h && h(r[n]);
|
|
580
726
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
b && await b(t);
|
|
727
|
+
}), Q.current = r, X(_e), B(r), Z(), I && t.length > 0 && I((e) => ie(e, t, O)), _) try {
|
|
728
|
+
await _(t);
|
|
584
729
|
} catch (e) {
|
|
585
|
-
|
|
730
|
+
let t = (Q.current || []).map((e) => ({
|
|
731
|
+
...e,
|
|
732
|
+
cells: [...e.cells]
|
|
733
|
+
}));
|
|
734
|
+
i.forEach(({ rowId: e, columnId: n, previousCell: r }) => {
|
|
735
|
+
let i = t.findIndex((t) => t.rowId == e), a = V.findIndex((e) => e.columnId == n);
|
|
736
|
+
i === -1 || a === -1 || !r || (t[i].cells[a] = { ...r });
|
|
737
|
+
}), Q.current = t, B(t), Z(), I == null || I(n), oe && oe();
|
|
586
738
|
}
|
|
587
|
-
},
|
|
739
|
+
}, Ce = i(() => {
|
|
588
740
|
let t = {
|
|
589
741
|
...v || {},
|
|
590
742
|
...y || {},
|
|
591
|
-
...
|
|
743
|
+
...D
|
|
592
744
|
}, n = {};
|
|
593
|
-
for (let r in t) n[r] =
|
|
745
|
+
for (let r in t) n[r] = k((n) => /* @__PURE__ */ C(A, {
|
|
594
746
|
...n,
|
|
595
747
|
...e,
|
|
596
748
|
Com: t[r]
|
|
597
749
|
}));
|
|
598
750
|
return n;
|
|
599
|
-
}, [v, y]),
|
|
600
|
-
let t =
|
|
751
|
+
}, [v, y]), we = (e) => {
|
|
752
|
+
let t = z == null ? void 0 : z.find((t) => {
|
|
601
753
|
var n;
|
|
602
754
|
return (t == null ? void 0 : t.rowId) == (e == null || (n = e.cell) == null ? void 0 : n.rowId);
|
|
603
755
|
});
|
|
604
|
-
return /* @__PURE__ */
|
|
756
|
+
return /* @__PURE__ */ w("div", {
|
|
605
757
|
onPointerDown: (e) => e.stopPropagation(),
|
|
606
758
|
children: [
|
|
607
|
-
(
|
|
759
|
+
(T == null ? void 0 : T.tableActionsSlot) && /* @__PURE__ */ C(T.tableActionsSlot, {
|
|
608
760
|
...e == null ? void 0 : e.cell,
|
|
609
761
|
rowData: t
|
|
610
762
|
}),
|
|
611
|
-
(
|
|
763
|
+
(T == null ? void 0 : T.actionPrefixSlot) && /* @__PURE__ */ C(T.actionPrefixSlot, {
|
|
612
764
|
...e == null ? void 0 : e.cell,
|
|
613
765
|
rowData: t
|
|
614
766
|
}),
|
|
615
|
-
(
|
|
767
|
+
(T == null ? void 0 : T.actionCenterSlot) && /* @__PURE__ */ C(T.actionCenterSlot, {
|
|
616
768
|
...e == null ? void 0 : e.cell,
|
|
617
769
|
rowData: t
|
|
618
770
|
}),
|
|
619
|
-
(
|
|
771
|
+
(T == null ? void 0 : T.actionSuffixSlot) && /* @__PURE__ */ C(T.actionSuffixSlot, {
|
|
620
772
|
...e == null ? void 0 : e.cell,
|
|
621
773
|
rowData: t
|
|
622
774
|
})
|
|
623
775
|
]
|
|
624
776
|
});
|
|
625
777
|
};
|
|
626
|
-
function
|
|
778
|
+
function Te(e) {
|
|
627
779
|
let t = [];
|
|
628
780
|
function n(e) {
|
|
629
781
|
for (let r of e) t.push(r), r.children && r.children.length && n(r.children);
|
|
630
782
|
}
|
|
631
783
|
return n(e), t;
|
|
632
784
|
}
|
|
633
|
-
let
|
|
785
|
+
let Ee = (e) => {
|
|
634
786
|
var t, n, r, i, a, o;
|
|
635
|
-
let { record: c, rowId: l } = e == null ? void 0 : e.cell, u = (t =
|
|
787
|
+
let { record: c, rowId: l } = e == null ? void 0 : e.cell, u = (t = Te(d)) == null ? void 0 : t.filter((e) => {
|
|
636
788
|
var t;
|
|
637
|
-
return !(
|
|
638
|
-
}),
|
|
639
|
-
return /* @__PURE__ */
|
|
789
|
+
return !(E != null && (t = E.getCheckboxProps) != null && (t = t.call(E, e)) != null && t.disabled);
|
|
790
|
+
}), f = typeof (E == null ? void 0 : E.getCheckboxProps) == "function" ? E == null || (n = E.getCheckboxProps) == null ? void 0 : n.call(E, c) : {};
|
|
791
|
+
return /* @__PURE__ */ C(s, {
|
|
640
792
|
...e == null ? void 0 : e.componentProps,
|
|
641
|
-
checked: (
|
|
642
|
-
indeterminate: !l && (
|
|
793
|
+
checked: (E == null || (r = E.selectedRowKeys) == null ? void 0 : r.includes(c && c[O] || "")) || !l && (E == null || (i = E.selectedRowKeys) == null ? void 0 : i.length) == (u == null ? void 0 : u.length) && (u == null ? void 0 : u.length) > 0,
|
|
794
|
+
indeterminate: !l && (E == null || (a = E.selectedRowKeys) == null ? void 0 : a.length) > 0 && (E == null || (o = E.selectedRowKeys) == null ? void 0 : o.length) < (u == null ? void 0 : u.length),
|
|
643
795
|
onChange: (e) => {
|
|
644
796
|
if (e.target.checked && l) {
|
|
645
|
-
let e = [...
|
|
646
|
-
|
|
797
|
+
let e = [...E == null ? void 0 : E.selectedRowKeys, c[O]], t = u == null ? void 0 : u.filter((t) => e == null ? void 0 : e.includes(t[O]));
|
|
798
|
+
E == null || E.onChange(e, t);
|
|
647
799
|
} else if (!e.target.checked && l) {
|
|
648
800
|
var t, n;
|
|
649
|
-
let e =
|
|
650
|
-
|
|
801
|
+
let e = E == null || (t = E.selectedRowKeys) == null ? void 0 : t.filter((e) => e != c[O]), r = u == null ? void 0 : u.filter((t) => e == null ? void 0 : e.includes(t[O]));
|
|
802
|
+
E == null || E.onChange(E == null || (n = E.selectedRowKeys) == null ? void 0 : n.filter((e) => e != c[O]), r);
|
|
651
803
|
} else if (e.target.checked && !l) {
|
|
652
|
-
let e = u == null ? void 0 : u.map((e) => e[
|
|
653
|
-
|
|
654
|
-
} else !e.target.checked && !l && (
|
|
804
|
+
let e = u == null ? void 0 : u.map((e) => e[O]), t = u == null ? void 0 : u.filter((t) => e == null ? void 0 : e.includes(t[O]));
|
|
805
|
+
E == null || E.onChange(u == null ? void 0 : u.map((e) => e[O]), t);
|
|
806
|
+
} else !e.target.checked && !l && (E == null || E.onChange([], []));
|
|
655
807
|
},
|
|
656
|
-
...
|
|
808
|
+
...f
|
|
657
809
|
});
|
|
658
810
|
};
|
|
659
811
|
n(() => {
|
|
660
|
-
if (
|
|
812
|
+
if (E) {
|
|
661
813
|
var e;
|
|
662
|
-
let t = (e =
|
|
814
|
+
let t = (e = Te(d)) == null ? void 0 : e.filter((e) => {
|
|
663
815
|
var t;
|
|
664
|
-
return !(
|
|
665
|
-
}), n = t == null ? void 0 : t.filter((e) =>
|
|
666
|
-
|
|
816
|
+
return !(E != null && (t = E.getCheckboxProps) != null && (t = t.call(E, e)) != null && t.disabled);
|
|
817
|
+
}), n = t == null ? void 0 : t.filter((e) => H == null ? void 0 : H.includes(e[O]));
|
|
818
|
+
E == null || E.onChange(H, n);
|
|
667
819
|
}
|
|
668
|
-
}, [
|
|
669
|
-
|
|
670
|
-
}, [
|
|
671
|
-
let
|
|
820
|
+
}, [H, d]), n(() => {
|
|
821
|
+
le([]);
|
|
822
|
+
}, [P == null ? void 0 : P.pageNum]);
|
|
823
|
+
let De = i(() => {
|
|
672
824
|
let e = {};
|
|
673
|
-
for (let t in
|
|
825
|
+
for (let t in g == null ? void 0 : g.customCellTemplates) e[t] = k(g == null ? void 0 : g.customCellTemplates[t]);
|
|
674
826
|
return e;
|
|
675
|
-
}, [
|
|
827
|
+
}, [g == null ? void 0 : g.customCellTemplates]), Oe = (e, t) => {
|
|
676
828
|
var n;
|
|
677
829
|
let r = t == null || (n = t.find((t) => (t == null ? void 0 : t.rowId) == (e == null ? void 0 : e.rowId))) == null || (n = n.cells) == null ? void 0 : n.map((t) => ({
|
|
678
830
|
columnId: t == null ? void 0 : t.columnId,
|
|
@@ -680,50 +832,51 @@ function F(e, c) {
|
|
|
680
832
|
className: "custom-highlights-row",
|
|
681
833
|
borderColor: "transparent"
|
|
682
834
|
}));
|
|
683
|
-
|
|
835
|
+
q.current = e == null ? void 0 : e.rowId, window.gridHighlightRowId = e == null ? void 0 : e.rowId, K(r);
|
|
684
836
|
};
|
|
685
|
-
return /* @__PURE__ */
|
|
686
|
-
spinning:
|
|
687
|
-
children: /* @__PURE__ */
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
837
|
+
return /* @__PURE__ */ C(f, {
|
|
838
|
+
spinning: F,
|
|
839
|
+
children: /* @__PURE__ */ w("div", {
|
|
840
|
+
ref: J,
|
|
841
|
+
className: `grid-container ${S}`,
|
|
842
|
+
style: x,
|
|
843
|
+
children: [/* @__PURE__ */ C(m, {
|
|
844
|
+
ref: me,
|
|
845
|
+
rows: z,
|
|
846
|
+
columns: V,
|
|
847
|
+
onCellsChanged: Se,
|
|
695
848
|
enableFillHandle: !0,
|
|
696
849
|
enableRangeSelection: !0,
|
|
697
850
|
horizontalStickyBreakpoint: 120,
|
|
698
|
-
...
|
|
699
|
-
highlights: (
|
|
851
|
+
...g,
|
|
852
|
+
highlights: (c = g == null ? void 0 : g.highlights) == null ? pe : c,
|
|
700
853
|
onFocusLocationChanging: (e) => {
|
|
701
854
|
var t, n;
|
|
702
855
|
let r = (e == null ? void 0 : e.columnId) + (e == null ? void 0 : e.rowId);
|
|
703
|
-
return window.gridEditId = r, typeof (e == null ? void 0 : e.rowId) == "string" && (e == null || (t = e.rowId) == null ? void 0 : t.indexOf("header-")) > -1 || (
|
|
856
|
+
return window.gridEditId = r, typeof (e == null ? void 0 : e.rowId) == "string" && (e == null || (t = e.rowId) == null ? void 0 : t.indexOf("header-")) > -1 || (g != null && g.isRowHighlights && e != null && e.columnId && Oe(e, z), (n = [
|
|
704
857
|
"_$actions",
|
|
705
858
|
"rowSelection",
|
|
706
859
|
"ExpandListTemplate"
|
|
707
|
-
]) != null && n.includes(e == null ? void 0 : e.columnId)) ? !1 :
|
|
860
|
+
]) != null && n.includes(e == null ? void 0 : e.columnId)) ? !1 : g != null && g.onFocusLocationChanging ? g == null ? void 0 : g.onFocusLocationChanging(e, z) : e;
|
|
708
861
|
},
|
|
709
862
|
customCellTemplates: {
|
|
710
|
-
ExpandListTemplate:
|
|
711
|
-
...
|
|
712
|
-
...
|
|
713
|
-
...
|
|
714
|
-
_$actions:
|
|
715
|
-
rowSelection:
|
|
716
|
-
Number:
|
|
863
|
+
ExpandListTemplate: k(M),
|
|
864
|
+
...Ce,
|
|
865
|
+
...De,
|
|
866
|
+
...de,
|
|
867
|
+
_$actions: k(we),
|
|
868
|
+
rowSelection: k(Ee),
|
|
869
|
+
Number: k(j, e)
|
|
717
870
|
}
|
|
718
|
-
}, (
|
|
871
|
+
}, (d == null ? void 0 : d.length) == 0 ? 0 : 1), (d == null ? void 0 : d.length) <= 0 && /* @__PURE__ */ C("div", {
|
|
719
872
|
className: "grid-container-empty",
|
|
720
|
-
children: /* @__PURE__ */
|
|
873
|
+
children: /* @__PURE__ */ C(l, { image: l.PRESENTED_IMAGE_SIMPLE })
|
|
721
874
|
})]
|
|
722
875
|
})
|
|
723
876
|
});
|
|
724
877
|
}
|
|
725
|
-
var
|
|
878
|
+
var ae = e(F);
|
|
726
879
|
//#endregion
|
|
727
|
-
export {
|
|
880
|
+
export { ae as default };
|
|
728
881
|
|
|
729
882
|
//# sourceMappingURL=index.js.map
|