ia-table 0.15.5 → 0.15.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/dist/chat.d.ts +6 -0
- package/dist/chat.js +1 -1
- package/dist/{chat.type-Cwk7LBad.js → chat.type-BS4ghrYz.js} +981 -964
- package/dist/index.d.ts +7 -4
- package/dist/index.js +7088 -6911
- package/dist/pivot.d.ts +6 -0
- package/package.json +1 -1
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import * as J from "react";
|
|
3
3
|
import Mn, { createContext as Tn, useContext as An, useMemo as Rn, useEffect as pe, useRef as Pe, useState as Ge, useCallback as Ie, useLayoutEffect as Fn, forwardRef as mn, useImperativeHandle as bn, memo as Hn } from "react";
|
|
4
4
|
import { jsx as de, jsxs as Le } from "react/jsx-runtime";
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { g as M, U as zn, f as Ve, L as De, s as kn, p as Ke, h as Un, m as
|
|
5
|
+
import { createPortal as On } from "react-dom";
|
|
6
|
+
import { g as M, U as zn, f as Ve, L as De, s as kn, p as Ke, h as Un, m as sn, S as Wn, B as dn } from "./RadioGroup-D3RQET6P.js";
|
|
7
7
|
import { create as Yn } from "zustand";
|
|
8
|
-
const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ J.createElement("path", { d: "M8 11L4.25 7.25L5.3 6.1625L7.25 8.1125V2H8.75V8.1125L10.7 6.1625L11.75 7.25L8 11ZM3.5 14C3.0875 14 2.73438 13.8531 2.44063 13.5594C2.14687 13.2656 2 12.9125 2 12.5V10.25H3.5V12.5H12.5V10.25H14V12.5C14 12.9125 13.8531 13.2656 13.5594 13.5594C13.2656 13.8531 12.9125 14 12.5 14H3.5Z", fill: "#60697D" })),
|
|
9
|
-
var f, c,
|
|
10
|
-
const t = Me(), r = M(e), A = e._originalField || ((c = (f = r == null ? void 0 : r.split) == null ? void 0 : f.call(r, W)) == null ? void 0 : c[0]), i = ((C = (g = (
|
|
8
|
+
const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ J.createElement("path", { d: "M8 11L4.25 7.25L5.3 6.1625L7.25 8.1125V2H8.75V8.1125L10.7 6.1625L11.75 7.25L8 11ZM3.5 14C3.0875 14 2.73438 13.8531 2.44063 13.5594C2.14687 13.2656 2 12.9125 2 12.5V10.25H3.5V12.5H12.5V10.25H14V12.5C14 12.9125 13.8531 13.2656 13.5594 13.5594C13.2656 13.8531 12.9125 14 12.5 14H3.5Z", fill: "#60697D" })), _n = (e, n) => (t, r, A) => (A.dispatch = (i) => (t((o) => e(o, i), !1, i), i), A.dispatchFromDevtools = !0, { dispatch: (...i) => A.dispatch(...i), ...n }), jn = _n, W = "_IATableOrdered", Me = (e = 100) => `${(/* @__PURE__ */ new Date()).getTime()}_${e}`, Sn = (e, n = { path: [] }) => {
|
|
9
|
+
var f, c, u, g, C, L, a, p;
|
|
10
|
+
const t = Me(), r = M(e), A = e._originalField || ((c = (f = r == null ? void 0 : r.split) == null ? void 0 : f.call(r, W)) == null ? void 0 : c[0]), i = ((C = (g = (u = e.column_name) == null ? void 0 : u.split) == null ? void 0 : g.call(u, W)) == null ? void 0 : C[0]) || e.column_name, o = ((p = (a = (L = e.accessor) == null ? void 0 : L.split) == null ? void 0 : a.call(L, W)) == null ? void 0 : p[0]) || e.accessor, d = r.split(W)[0];
|
|
11
11
|
return {
|
|
12
12
|
accessor: `${o}${W}${t}`,
|
|
13
13
|
field: `${A}${W}${t}`,
|
|
@@ -22,7 +22,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
22
22
|
isReorderedColumn: !0
|
|
23
23
|
};
|
|
24
24
|
}, Kn = (e) => {
|
|
25
|
-
var r, A, i, o, d, f, c,
|
|
25
|
+
var r, A, i, o, d, f, c, u, g, C, L, a, p, R, P, O, U, N;
|
|
26
26
|
const n = { ...e };
|
|
27
27
|
delete n.originalParentId, delete n.isReorderedColumn, delete n.originalId, delete n.uniqueSplitId, delete n.isSplitHierarchy, delete n.uniqueHierarchyId, delete n.originalPath;
|
|
28
28
|
const t = M(e);
|
|
@@ -31,18 +31,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
31
31
|
// Get the original field name before any ORDERED_SUFFIX
|
|
32
32
|
accessor: ((i = (A = (r = e.accessor) == null ? void 0 : r.split) == null ? void 0 : A.call(r, W)) == null ? void 0 : i[0]) || e.accessor,
|
|
33
33
|
field: e._originalField || ((d = (o = t == null ? void 0 : t.split) == null ? void 0 : o.call(t, W)) == null ? void 0 : d[0]),
|
|
34
|
-
column_name: ((
|
|
34
|
+
column_name: ((u = (c = (f = e.column_name) == null ? void 0 : f.split) == null ? void 0 : c.call(f, W)) == null ? void 0 : u[0]) || e.column_name,
|
|
35
35
|
_originalField: e._originalField || ((C = (g = t == null ? void 0 : t.split) == null ? void 0 : g.call(t, W)) == null ? void 0 : C[0]),
|
|
36
36
|
path: e.originalPath ? (L = e.originalPath) == null ? void 0 : L.map((Q) => Q.split(W)[0]) : e.path,
|
|
37
|
-
id: ((R = (p = (
|
|
37
|
+
id: ((R = (p = (a = e.id) == null ? void 0 : a.split) == null ? void 0 : p.call(a, W)) == null ? void 0 : R[0]) || e.id,
|
|
38
38
|
originalPath: null,
|
|
39
39
|
parent_id: (P = e.parent_id) == null ? void 0 : P.map(
|
|
40
40
|
(Q) => {
|
|
41
|
-
var
|
|
42
|
-
return typeof Q == "string" ? (v = (
|
|
41
|
+
var _, v;
|
|
42
|
+
return typeof Q == "string" ? (v = (_ = Q == null ? void 0 : Q.split) == null ? void 0 : _.call(Q, W)) == null ? void 0 : v[0] : Q;
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
parentField: (N = (U = (
|
|
45
|
+
parentField: (N = (U = (O = e.parentField) == null ? void 0 : O.split) == null ? void 0 : U.call(O, W)) == null ? void 0 : N[0]
|
|
46
46
|
};
|
|
47
47
|
}, on = (e) => {
|
|
48
48
|
var r, A, i, o;
|
|
@@ -51,21 +51,21 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
51
51
|
const n = [...e];
|
|
52
52
|
let t = 0;
|
|
53
53
|
for (; t < n.length - 1; ) {
|
|
54
|
-
const d = n[t], f = n[t + 1], c = d.originalPath || d.path,
|
|
55
|
-
if (!c || !
|
|
54
|
+
const d = n[t], f = n[t + 1], c = d.originalPath || d.path, u = f.originalPath || f.path;
|
|
55
|
+
if (!c || !u) {
|
|
56
56
|
t++;
|
|
57
57
|
continue;
|
|
58
58
|
}
|
|
59
59
|
const g = Xn(d, f);
|
|
60
|
-
if (g.length > 0 && g.length === c.length && g.length ===
|
|
61
|
-
const L = d.isReorderedColumn && f.isReorderedColumn,
|
|
60
|
+
if (g.length > 0 && g.length === c.length && g.length === u.length) {
|
|
61
|
+
const L = d.isReorderedColumn && f.isReorderedColumn, a = Me(t), p = g[g.length - 1].split(W)[0], R = L ? {
|
|
62
62
|
...d,
|
|
63
|
-
accessor: `${((i = (A = (r = d.accessor) == null ? void 0 : r.split) == null ? void 0 : A.call(r, W)) == null ? void 0 : i[0]) || d.accessor}${W}${
|
|
64
|
-
field: `${p}${W}${
|
|
65
|
-
column_name: `${p}${W}${
|
|
63
|
+
accessor: `${((i = (A = (r = d.accessor) == null ? void 0 : r.split) == null ? void 0 : A.call(r, W)) == null ? void 0 : i[0]) || d.accessor}${W}${a}`,
|
|
64
|
+
field: `${p}${W}${a}`,
|
|
65
|
+
column_name: `${p}${W}${a}`,
|
|
66
66
|
path: [
|
|
67
67
|
...((o = d.path) == null ? void 0 : o.slice(0, -1)) ?? [],
|
|
68
|
-
`${p}${W}${
|
|
68
|
+
`${p}${W}${a}`
|
|
69
69
|
],
|
|
70
70
|
originalPath: [...g],
|
|
71
71
|
children: []
|
|
@@ -73,10 +73,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
73
73
|
...Kn(d),
|
|
74
74
|
children: []
|
|
75
75
|
}, P = (U, N, Q) => {
|
|
76
|
-
const
|
|
76
|
+
const _ = [...Q, M(U)], v = {
|
|
77
77
|
...U,
|
|
78
|
-
originalPath:
|
|
79
|
-
path:
|
|
78
|
+
originalPath: _.map((K) => K.split(W)[0]),
|
|
79
|
+
path: _
|
|
80
80
|
};
|
|
81
81
|
return v.children && v.children.length > 0 && (v.children = v.children.map(
|
|
82
82
|
(K) => P(
|
|
@@ -84,8 +84,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
84
84
|
N,
|
|
85
85
|
v.path
|
|
86
86
|
)
|
|
87
|
-
)), v.path =
|
|
88
|
-
},
|
|
87
|
+
)), v.path = _, v;
|
|
88
|
+
}, O = [];
|
|
89
89
|
if (d.children && d.children.length > 0) {
|
|
90
90
|
const U = M(R);
|
|
91
91
|
d.children.forEach((N) => {
|
|
@@ -94,7 +94,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
94
94
|
d.path || [],
|
|
95
95
|
R.path || []
|
|
96
96
|
);
|
|
97
|
-
Q.parent_id = [U], Q.parentField = U,
|
|
97
|
+
Q.parent_id = [U], Q.parentField = U, O.push(Q);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
if (f.children && f.children.length > 0) {
|
|
@@ -105,10 +105,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
105
105
|
f.path || [],
|
|
106
106
|
R.path || []
|
|
107
107
|
);
|
|
108
|
-
Q.parent_id = [U], Q.parentField = U,
|
|
108
|
+
Q.parent_id = [U], Q.parentField = U, O.push(Q);
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
R.children =
|
|
111
|
+
R.children = O, n.splice(t, 2, R);
|
|
112
112
|
} else
|
|
113
113
|
t++;
|
|
114
114
|
}
|
|
@@ -118,8 +118,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
118
118
|
}, Xn = (e, n) => {
|
|
119
119
|
const t = (c) => c ? c.split(W)[0] : "", r = e.path || [], A = n.path || [];
|
|
120
120
|
if (r.length > 0 && A.length > 0) {
|
|
121
|
-
const c = t(r[0]),
|
|
122
|
-
if (c !==
|
|
121
|
+
const c = t(r[0]), u = t(A[0]);
|
|
122
|
+
if (c !== u)
|
|
123
123
|
return [];
|
|
124
124
|
}
|
|
125
125
|
const i = e.originalPath || e.path, o = n.originalPath || n.path;
|
|
@@ -201,28 +201,28 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
201
201
|
var C, L;
|
|
202
202
|
if (!n || n.length === 0 || n.length === 1)
|
|
203
203
|
return { removed: !1, hierarchy: null };
|
|
204
|
-
const t = (
|
|
205
|
-
(
|
|
204
|
+
const t = (a, p) => M(a) === p, r = e.findIndex(
|
|
205
|
+
(a) => t(a, n[0])
|
|
206
206
|
);
|
|
207
207
|
if (r === -1)
|
|
208
208
|
return { removed: !1, hierarchy: null };
|
|
209
|
-
const A = e[r], i = JSON.parse(JSON.stringify(A)), o = (
|
|
210
|
-
var Z, te,
|
|
211
|
-
if (!(
|
|
209
|
+
const A = e[r], i = JSON.parse(JSON.stringify(A)), o = (a, p, R, P = [], O = 0) => {
|
|
210
|
+
var Z, te, ae, se;
|
|
211
|
+
if (!(a != null && a.children))
|
|
212
212
|
return { success: !1, hierarchy: null };
|
|
213
|
-
const U = R[0], N =
|
|
214
|
-
(
|
|
213
|
+
const U = R[0], N = a.children.findIndex(
|
|
214
|
+
(Ee) => t(Ee, U)
|
|
215
215
|
);
|
|
216
216
|
if (N === -1)
|
|
217
217
|
return { success: !1, hierarchy: null };
|
|
218
218
|
const Q = (Z = p.children) == null ? void 0 : Z.find(
|
|
219
|
-
(
|
|
219
|
+
(Ee) => t(Ee, U)
|
|
220
220
|
);
|
|
221
221
|
if (!Q)
|
|
222
222
|
return { success: !1, hierarchy: null };
|
|
223
223
|
if (R.length === 1) {
|
|
224
|
-
|
|
225
|
-
const
|
|
224
|
+
a.children.splice(N, 1);
|
|
225
|
+
const Ee = Me(), fe = M(Q).split(W)[0], he = `${W}${Ee}`, ie = `${fe}${he}`, ce = {
|
|
226
226
|
...Q,
|
|
227
227
|
field: ie,
|
|
228
228
|
column_name: Q.column_name ? `${Q.column_name.split(W)[0]}${he}` : ie,
|
|
@@ -236,55 +236,55 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
236
236
|
};
|
|
237
237
|
return P.length > 0 && (ce.parent_id = [P[P.length - 1]], ce.parentField = P[P.length - 1]), { success: !0, hierarchy: ce };
|
|
238
238
|
}
|
|
239
|
-
const
|
|
239
|
+
const _ = Me(), v = M(Q).split(W)[0], K = `${W}${_}`, j = `${v}${K}`, q = [...P, j], ee = a.children[N], ne = o(
|
|
240
240
|
ee,
|
|
241
241
|
Q,
|
|
242
242
|
R.slice(1),
|
|
243
243
|
q,
|
|
244
|
-
|
|
244
|
+
O + 1
|
|
245
245
|
);
|
|
246
246
|
if (!ne.success)
|
|
247
247
|
return ne;
|
|
248
|
-
((
|
|
248
|
+
((ae = ee.children) == null ? void 0 : ae.length) === 0 && !ee.isLeaf && a.children.splice(N, 1);
|
|
249
249
|
const $ = {
|
|
250
250
|
...Q,
|
|
251
|
-
field:
|
|
252
|
-
column_name: Q.column_name ? `${Q.column_name.split(W)[0]}${K}` :
|
|
253
|
-
accessor: Q.accessor ? `${Q.accessor.split(W)[0]}${K}` :
|
|
254
|
-
id: Q.id ? `${Q.id.split(W)[0]}${K}` :
|
|
251
|
+
field: j,
|
|
252
|
+
column_name: Q.column_name ? `${Q.column_name.split(W)[0]}${K}` : j,
|
|
253
|
+
accessor: Q.accessor ? `${Q.accessor.split(W)[0]}${K}` : j,
|
|
254
|
+
id: Q.id ? `${Q.id.split(W)[0]}${K}` : j,
|
|
255
255
|
path: q,
|
|
256
|
-
originalPath: Q.originalPath || ((
|
|
256
|
+
originalPath: Q.originalPath || ((se = Q.path) == null ? void 0 : se.map((Ee) => Ee.split(W)[0])),
|
|
257
257
|
originalId: v,
|
|
258
258
|
_originalField: Q._originalField || v,
|
|
259
259
|
isReorderedColumn: !0,
|
|
260
260
|
children: [ne.hierarchy]
|
|
261
261
|
};
|
|
262
|
-
return P.length > 0 && ($.parent_id = [P[P.length - 1]], $.parentField = P[P.length - 1]), ne.hierarchy && (ne.hierarchy.parent_id = [
|
|
262
|
+
return P.length > 0 && ($.parent_id = [P[P.length - 1]], $.parentField = P[P.length - 1]), ne.hierarchy && (ne.hierarchy.parent_id = [j], ne.hierarchy.parentField = j), {
|
|
263
263
|
success: !0,
|
|
264
264
|
hierarchy: $
|
|
265
265
|
};
|
|
266
|
-
}, d = Me(), f = M(i).split(W)[0], c = `${W}${d}`,
|
|
266
|
+
}, d = Me(), f = M(i).split(W)[0], c = `${W}${d}`, u = `${f}${c}`, g = o(
|
|
267
267
|
A,
|
|
268
268
|
i,
|
|
269
269
|
n.slice(1),
|
|
270
|
-
[
|
|
270
|
+
[u],
|
|
271
271
|
0
|
|
272
272
|
);
|
|
273
273
|
if (g.success) {
|
|
274
|
-
const
|
|
274
|
+
const a = {
|
|
275
275
|
...i,
|
|
276
|
-
field:
|
|
277
|
-
column_name: i.column_name ? `${i.column_name.split(W)[0]}${c}` :
|
|
278
|
-
accessor: i.accessor ? `${i.accessor.split(W)[0]}${c}` :
|
|
279
|
-
id: i.id ? `${i.id.split(W)[0]}${c}` :
|
|
280
|
-
path: [
|
|
276
|
+
field: u,
|
|
277
|
+
column_name: i.column_name ? `${i.column_name.split(W)[0]}${c}` : u,
|
|
278
|
+
accessor: i.accessor ? `${i.accessor.split(W)[0]}${c}` : u,
|
|
279
|
+
id: i.id ? `${i.id.split(W)[0]}${c}` : u,
|
|
280
|
+
path: [u],
|
|
281
281
|
originalPath: i.originalPath || ((C = i.path) == null ? void 0 : C.map((p) => p.split(W)[0])),
|
|
282
282
|
originalId: f,
|
|
283
283
|
_originalField: i._originalField || f,
|
|
284
284
|
isReorderedColumn: !0,
|
|
285
285
|
children: [g.hierarchy]
|
|
286
286
|
};
|
|
287
|
-
return g.hierarchy && (g.hierarchy.parent_id = [
|
|
287
|
+
return g.hierarchy && (g.hierarchy.parent_id = [u], g.hierarchy.parentField = u), ((L = A.children) == null ? void 0 : L.length) === 0 && !A.isLeaf && e.splice(r, 1), { removed: !0, hierarchy: a };
|
|
288
288
|
}
|
|
289
289
|
return { removed: !1, hierarchy: null };
|
|
290
290
|
}, $n = (e, n, t) => {
|
|
@@ -306,9 +306,9 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
306
306
|
pinned: f
|
|
307
307
|
} = t[o];
|
|
308
308
|
let c = o;
|
|
309
|
-
const
|
|
309
|
+
const u = i === c;
|
|
310
310
|
let g = 0, C = !1;
|
|
311
|
-
if (
|
|
311
|
+
if (u) {
|
|
312
312
|
const { rightAddition: N } = et(
|
|
313
313
|
e,
|
|
314
314
|
n,
|
|
@@ -320,12 +320,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
320
320
|
const L = Ne(
|
|
321
321
|
t[i]
|
|
322
322
|
);
|
|
323
|
-
let
|
|
323
|
+
let a = null, p = null;
|
|
324
324
|
const { removed: R, hierarchy: P } = qn(
|
|
325
325
|
t,
|
|
326
326
|
e.path
|
|
327
327
|
);
|
|
328
|
-
let
|
|
328
|
+
let O = P;
|
|
329
329
|
if (C && R && !L)
|
|
330
330
|
Ne(
|
|
331
331
|
t[c]
|
|
@@ -351,25 +351,25 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
351
351
|
n.path.slice(1),
|
|
352
352
|
C
|
|
353
353
|
);
|
|
354
|
-
|
|
354
|
+
a = Q, p = N;
|
|
355
355
|
}
|
|
356
|
-
if ((p ||
|
|
356
|
+
if ((p || a) && !O) {
|
|
357
357
|
const N = Ne(
|
|
358
358
|
t[c]
|
|
359
359
|
);
|
|
360
|
-
|
|
360
|
+
O = t.splice(i, 1)[0], C && !R && !N && c--;
|
|
361
361
|
}
|
|
362
|
-
if (
|
|
362
|
+
if (O)
|
|
363
363
|
Vn({
|
|
364
364
|
beforeHierarchy: p,
|
|
365
|
-
afterHierarchy:
|
|
366
|
-
newHierarchy:
|
|
365
|
+
afterHierarchy: a,
|
|
366
|
+
newHierarchy: O,
|
|
367
367
|
targetColumFrozenState: d,
|
|
368
368
|
targetColumnFrozenPinned: f
|
|
369
369
|
}), Zn({
|
|
370
370
|
beforeHierarchy: p,
|
|
371
|
-
afterHierarchy:
|
|
372
|
-
newHierarchy:
|
|
371
|
+
afterHierarchy: a,
|
|
372
|
+
newHierarchy: O,
|
|
373
373
|
updatedtargetIndex: c,
|
|
374
374
|
removeColumnsCount: g,
|
|
375
375
|
isChildrenUpdate: !1,
|
|
@@ -422,38 +422,38 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
422
422
|
const r = e.path || e.originalPath || [], A = n.path || n.originalPath || [], i = Jn(r, A), o = r[i], d = A[i], f = r[i - 1];
|
|
423
423
|
let c = t;
|
|
424
424
|
if (f && M(c) !== f) {
|
|
425
|
-
const
|
|
426
|
-
|
|
425
|
+
const a = en(c, f);
|
|
426
|
+
a && (c = a);
|
|
427
427
|
}
|
|
428
|
-
let
|
|
429
|
-
c.children && (
|
|
428
|
+
let u = -1, g = -1;
|
|
429
|
+
c.children && (u = cn(
|
|
430
430
|
c.children,
|
|
431
431
|
o
|
|
432
432
|
), g = cn(
|
|
433
433
|
c.children,
|
|
434
434
|
d
|
|
435
435
|
));
|
|
436
|
-
const C = (
|
|
436
|
+
const C = (a, p, R, P, O) => {
|
|
437
437
|
var N, Q;
|
|
438
438
|
let U = i - 1;
|
|
439
439
|
for (; U >= 0; ) {
|
|
440
|
-
const
|
|
440
|
+
const _ = p[U], v = R[U + 1];
|
|
441
441
|
let K = t;
|
|
442
|
-
if (
|
|
443
|
-
const
|
|
442
|
+
if (_ && M(K) !== _) {
|
|
443
|
+
const j = en(
|
|
444
444
|
t,
|
|
445
|
-
|
|
445
|
+
_
|
|
446
446
|
);
|
|
447
|
-
|
|
447
|
+
j && (K = j);
|
|
448
448
|
}
|
|
449
449
|
if (K.children) {
|
|
450
|
-
const
|
|
450
|
+
const j = K.children.findIndex((q) => {
|
|
451
451
|
const ee = M(q);
|
|
452
452
|
return ee === v || ee.split(W)[0] === v || ee.split(W)[0] === P;
|
|
453
453
|
});
|
|
454
|
-
if (
|
|
454
|
+
if (j !== -1) {
|
|
455
455
|
c = K;
|
|
456
|
-
const q = (
|
|
456
|
+
const q = (a === "target" ? r : A)[U + 1], ee = a === "target" ? o : d, ne = (Q = (N = c.children) == null ? void 0 : N.findIndex) == null ? void 0 : Q.call(
|
|
457
457
|
N,
|
|
458
458
|
($) => {
|
|
459
459
|
const Z = M($);
|
|
@@ -462,112 +462,112 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
462
462
|
);
|
|
463
463
|
return {
|
|
464
464
|
found: !0,
|
|
465
|
-
missingIndex:
|
|
465
|
+
missingIndex: j ?? -1,
|
|
466
466
|
foundIndex: ne ?? -1
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
U--;
|
|
471
471
|
}
|
|
472
|
-
return console.warn(`Could not find ${
|
|
472
|
+
return console.warn(`Could not find ${a} in any common parent`), { found: !1, missingIndex: -1, foundIndex: O };
|
|
473
473
|
};
|
|
474
|
-
if (
|
|
475
|
-
const
|
|
474
|
+
if (u === -1 && g === -1) {
|
|
475
|
+
const a = o.split(W)[0], p = d.split(W)[0], R = Pn(
|
|
476
476
|
t,
|
|
477
|
-
|
|
477
|
+
a,
|
|
478
478
|
p
|
|
479
479
|
);
|
|
480
|
-
R ? (c = R.parent,
|
|
480
|
+
R ? (c = R.parent, u = R.sourceIndex, g = R.targetIndex) : console.warn(
|
|
481
481
|
"Abhay Could not find any common parent containing both source and target"
|
|
482
482
|
);
|
|
483
483
|
}
|
|
484
|
-
if (
|
|
485
|
-
const
|
|
484
|
+
if (u >= 0 && g === -1) {
|
|
485
|
+
const a = C(
|
|
486
486
|
"target",
|
|
487
487
|
r,
|
|
488
488
|
A,
|
|
489
489
|
d,
|
|
490
|
-
|
|
490
|
+
u
|
|
491
491
|
);
|
|
492
|
-
|
|
492
|
+
a.found && (g = a.missingIndex, u = a.foundIndex);
|
|
493
493
|
}
|
|
494
|
-
if (g >= 0 &&
|
|
495
|
-
const
|
|
494
|
+
if (g >= 0 && u === -1) {
|
|
495
|
+
const a = C(
|
|
496
496
|
"source",
|
|
497
497
|
A,
|
|
498
498
|
r,
|
|
499
499
|
o,
|
|
500
500
|
g
|
|
501
501
|
);
|
|
502
|
-
|
|
502
|
+
a.found && (u = a.missingIndex, g = a.foundIndex);
|
|
503
503
|
}
|
|
504
|
-
const L =
|
|
504
|
+
const L = u < g;
|
|
505
505
|
return {
|
|
506
|
-
sourceIndexInCommonParent:
|
|
506
|
+
sourceIndexInCommonParent: u,
|
|
507
507
|
targetIndexInCommonParent: g,
|
|
508
508
|
rightAddition: L
|
|
509
509
|
};
|
|
510
510
|
}, nt = (e, n, t, r) => {
|
|
511
|
-
function A(c,
|
|
511
|
+
function A(c, u) {
|
|
512
512
|
if (!c.children)
|
|
513
513
|
return { before: null, after: null };
|
|
514
|
-
const g = c.children, C = t[
|
|
514
|
+
const g = c.children, C = t[u], L = g.findIndex((v) => v.field === C);
|
|
515
515
|
if (L === -1)
|
|
516
516
|
return { before: null, after: null };
|
|
517
|
-
const
|
|
517
|
+
const a = [], p = [];
|
|
518
518
|
g.forEach((v, K) => {
|
|
519
|
-
K < L ?
|
|
519
|
+
K < L ? a.push(JSON.parse(JSON.stringify(v))) : K > L ? p.push(JSON.parse(JSON.stringify(v))) : u === t.length - 1 && (v.isLeaf || !v.children || v.children.length === 0 || v.children.length === 1) ? r ? a.push(JSON.parse(JSON.stringify(v))) : p.push(JSON.parse(JSON.stringify(v))) : (a.push(null), p.push(null));
|
|
520
520
|
});
|
|
521
521
|
const R = g[L];
|
|
522
|
-
if (!(
|
|
522
|
+
if (!(u === t.length - 1) || R.children && R.children.length > 1) {
|
|
523
523
|
const { before: v, after: K } = A(
|
|
524
524
|
R,
|
|
525
|
-
|
|
525
|
+
u + 1
|
|
526
526
|
);
|
|
527
527
|
if (v) {
|
|
528
|
-
const
|
|
529
|
-
|
|
528
|
+
const j = a.indexOf(null);
|
|
529
|
+
j !== -1 && (a[j] = v);
|
|
530
530
|
}
|
|
531
531
|
if (K) {
|
|
532
|
-
const
|
|
533
|
-
|
|
532
|
+
const j = p.indexOf(null);
|
|
533
|
+
j !== -1 && (p[j] = K);
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
const U =
|
|
536
|
+
const U = a.filter(
|
|
537
537
|
(v) => v !== null
|
|
538
538
|
), N = p.filter(
|
|
539
539
|
(v) => v !== null
|
|
540
540
|
), Q = U.length > 0 ? {
|
|
541
541
|
...JSON.parse(JSON.stringify(c)),
|
|
542
542
|
children: U
|
|
543
|
-
} : null,
|
|
543
|
+
} : null, _ = N.length > 0 ? {
|
|
544
544
|
...JSON.parse(JSON.stringify(c)),
|
|
545
545
|
children: N
|
|
546
546
|
} : null;
|
|
547
|
-
return { before: Q, after:
|
|
547
|
+
return { before: Q, after: _ };
|
|
548
548
|
}
|
|
549
549
|
const { before: i, after: o } = A(e, 0);
|
|
550
550
|
let d = o;
|
|
551
|
-
const f = (c,
|
|
551
|
+
const f = (c, u = [], g = /* @__PURE__ */ new Map()) => {
|
|
552
552
|
!c || !c.children || c.children.length === 0 || c.children.forEach((C) => {
|
|
553
|
-
const L = M(C).split(W)[0],
|
|
553
|
+
const L = M(C).split(W)[0], a = Me(), p = `${L}_${a}`, R = g.get(p) || 0;
|
|
554
554
|
g.set(p, R + 1);
|
|
555
|
-
const P = `${W}${
|
|
555
|
+
const P = `${W}${a}_${R}`;
|
|
556
556
|
if (!C.originalPath && C.path && (C.originalPath = [
|
|
557
|
-
...C.path.map((
|
|
557
|
+
...C.path.map((O) => O.split(W)[0])
|
|
558
558
|
]), C.originalId || (C.originalId = L), C.field = `${L}${P}`, C.accessor) {
|
|
559
|
-
const
|
|
560
|
-
C.accessor = `${
|
|
559
|
+
const O = C.accessor.split(W)[0];
|
|
560
|
+
C.accessor = `${O}${P}`;
|
|
561
561
|
}
|
|
562
562
|
if (C.column_name) {
|
|
563
|
-
const
|
|
564
|
-
C.column_name = `${
|
|
563
|
+
const O = C.column_name.split(W)[0];
|
|
564
|
+
C.column_name = `${O}${P}`;
|
|
565
565
|
}
|
|
566
566
|
if (C.id) {
|
|
567
|
-
const
|
|
568
|
-
C.id = `${
|
|
567
|
+
const O = C.id.split(W)[0];
|
|
568
|
+
C.id = `${O}${P}`;
|
|
569
569
|
}
|
|
570
|
-
C.path = [...
|
|
570
|
+
C.path = [...u, C.field], u.length > 0 && (C.parent_id = [u[u.length - 1]]), C.isReorderedColumn = !0, f(C, C.path, g);
|
|
571
571
|
});
|
|
572
572
|
};
|
|
573
573
|
if (d) {
|
|
@@ -578,16 +578,16 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
578
578
|
);
|
|
579
579
|
c.push(...(d.path || []).slice(0, g));
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const u = Sn(d, {
|
|
582
582
|
path: c
|
|
583
583
|
});
|
|
584
584
|
d = {
|
|
585
585
|
...d,
|
|
586
|
-
...
|
|
586
|
+
...u
|
|
587
587
|
}, f(d, d.path);
|
|
588
588
|
}
|
|
589
589
|
return { before: i, after: d };
|
|
590
|
-
},
|
|
590
|
+
}, l = {
|
|
591
591
|
SET_DATA: "SET_DATA",
|
|
592
592
|
SET_FILTERED_DATA: "SET_FILTERED_DATA",
|
|
593
593
|
SET_COLUMNS: "SET_COLUMNS",
|
|
@@ -693,7 +693,9 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
693
693
|
SET_NO_HEADER_SELECTION_CHECKBOX: "SET_NO_HEADER_SELECTION_CHECKBOX",
|
|
694
694
|
SET_DATA_IS_TREE_DATA: "SET_DATA_IS_TREE_DATA",
|
|
695
695
|
SET_VIRTUALIZATION_CONFIG: "SET_VIRTUALIZATION_CONFIG",
|
|
696
|
-
SET_DISABLE_CURRENT_PAGE_RECORDS: "SET_DISABLE_CURRENT_PAGE_RECORDS"
|
|
696
|
+
SET_DISABLE_CURRENT_PAGE_RECORDS: "SET_DISABLE_CURRENT_PAGE_RECORDS",
|
|
697
|
+
SET_FORCE_SHOW_LOADING: "SET_FORCE_SHOW_LOADING",
|
|
698
|
+
UPDATE_ROW_DATA_WITH_REFRESH: "UPDATE_ROW_DATA_WITH_REFRESH"
|
|
697
699
|
}, Vt = (e = "iaTable") => {
|
|
698
700
|
var n;
|
|
699
701
|
window._pageTransitionTimers ? (window._pageTransitionTimers.forEach((t) => clearTimeout(t)), window._pageTransitionTimers = []) : window._pageTransitionTimers = [], (n = window._pageTransitions) != null && n[e] || (window._pageTransitions = {
|
|
@@ -730,14 +732,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
730
732
|
}) => {
|
|
731
733
|
if (!e) return;
|
|
732
734
|
const o = e.closest(".ia-table-body-cell") || e;
|
|
733
|
-
document.querySelectorAll(".ia-table-body-cell-selected").forEach((
|
|
734
|
-
|
|
735
|
+
document.querySelectorAll(".ia-table-body-cell-selected").forEach((a) => {
|
|
736
|
+
a.classList.remove("ia-table-body-cell-selected");
|
|
735
737
|
}), window.dispatchEvent(new CustomEvent("ia-table-clear-selection"));
|
|
736
|
-
const f = n.iaTableInstanceId || "", c = e.getAttribute("data-row-id") || t,
|
|
738
|
+
const f = n.iaTableInstanceId || "", c = e.getAttribute("data-row-id") || t, u = e.getAttribute("data-field") || "", g = e.getAttribute("data-pinned"), C = {
|
|
737
739
|
rowIndex: t,
|
|
738
740
|
colIndex: r,
|
|
739
741
|
rowId: c,
|
|
740
|
-
field:
|
|
742
|
+
field: u,
|
|
741
743
|
pinnedType: g === "false" ? !1 : g,
|
|
742
744
|
frozenColumnsLength: A,
|
|
743
745
|
rowAttr: t,
|
|
@@ -925,11 +927,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
925
927
|
case "smartGridDateRangePickerRenderer":
|
|
926
928
|
break;
|
|
927
929
|
default:
|
|
928
|
-
|
|
930
|
+
at(e);
|
|
929
931
|
break;
|
|
930
932
|
}
|
|
931
933
|
}, 0);
|
|
932
|
-
},
|
|
934
|
+
}, at = (e) => {
|
|
933
935
|
setTimeout(() => {
|
|
934
936
|
const n = e.querySelector(".ia-table-input");
|
|
935
937
|
n && n.blur();
|
|
@@ -962,13 +964,13 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
962
964
|
return;
|
|
963
965
|
}
|
|
964
966
|
}, 0);
|
|
965
|
-
},
|
|
966
|
-
var R, P,
|
|
967
|
+
}, ar = (e, n, t, r, A, i, o, d, f, c, u) => {
|
|
968
|
+
var R, P, O, U;
|
|
967
969
|
e.stopPropagation(), !e.shiftKey && ((P = (R = window.iaTableState) == null ? void 0 : R.multiSelection) != null && P.anchor) && rt();
|
|
968
970
|
const g = tt(n);
|
|
969
971
|
if (!g) return;
|
|
970
972
|
const C = g.iaTableInstanceId;
|
|
971
|
-
(
|
|
973
|
+
(O = window.iaTableSelectedCell) != null && O.target && window.iaTableSelectedCell.target.classList.remove(
|
|
972
974
|
"ia-table-body-cell-selected"
|
|
973
975
|
);
|
|
974
976
|
const L = e.target.closest(
|
|
@@ -976,7 +978,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
976
978
|
);
|
|
977
979
|
if (!L) return;
|
|
978
980
|
L.classList.add("ia-table-body-cell-selected"), window.dispatchEvent(new CustomEvent("ia-table-clear-selection"));
|
|
979
|
-
const
|
|
981
|
+
const a = L.getAttribute("data-row"), p = {
|
|
980
982
|
rowIndex: t,
|
|
981
983
|
colIndex: r,
|
|
982
984
|
rowId: A,
|
|
@@ -988,15 +990,15 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
988
990
|
target: L,
|
|
989
991
|
column: f,
|
|
990
992
|
rowData: c,
|
|
991
|
-
cellValue:
|
|
992
|
-
rowAttr:
|
|
993
|
+
cellValue: u,
|
|
994
|
+
rowAttr: a
|
|
993
995
|
// Add the row attribute for keyboard navigation
|
|
994
996
|
};
|
|
995
997
|
window.iaTableSelectedCell = p, C && window.iaTableState && window.iaTableState.selectedCells.set(C, p), window.iaTableState && g && (window.iaTableState.activeInstance = g), document.activeElement && document.activeElement !== document.body && document.activeElement.blur(), lt(L);
|
|
996
|
-
},
|
|
998
|
+
}, st = (e, n) => !e || !n ? void 0 : (Array.isArray(n) ? n : n.split(".")).reduce(
|
|
997
999
|
(r, A) => r && r[A] !== void 0 ? r[A] : void 0,
|
|
998
1000
|
e
|
|
999
|
-
),
|
|
1001
|
+
), sr = (e) => e == null ? "" : typeof e == "boolean" ? e ? "Yes" : "No" : e instanceof Date ? e.toLocaleString() : typeof e == "object" && e !== null ? Array.isArray(e) ? e.join(", ") : JSON.stringify(e) : String(e), dt = (e, n) => {
|
|
1000
1002
|
const t = e.groupingLevel, r = n.originalFields && t && n.originalFields[t] ? n.originalFields[t] : M(n);
|
|
1001
1003
|
return e[r];
|
|
1002
1004
|
}, dr = (e, n, t, r, A) => {
|
|
@@ -1024,7 +1026,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1024
1026
|
// Pass the table API to the valueGetter
|
|
1025
1027
|
columnApi: r == null ? void 0 : r.columnApi,
|
|
1026
1028
|
// Pass column API if available
|
|
1027
|
-
getValue: (
|
|
1029
|
+
getValue: (u) => e[u]
|
|
1028
1030
|
};
|
|
1029
1031
|
return o.valueGetter(c);
|
|
1030
1032
|
} catch (c) {
|
|
@@ -1039,15 +1041,15 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1039
1041
|
if (f && t) {
|
|
1040
1042
|
const c = e[t];
|
|
1041
1043
|
if (c && Array.isArray(c) && c.length > 0) {
|
|
1042
|
-
const
|
|
1043
|
-
for (const g of
|
|
1044
|
+
const u = c;
|
|
1045
|
+
for (const g of u)
|
|
1044
1046
|
if (g && g[d] !== void 0)
|
|
1045
1047
|
return g[d];
|
|
1046
1048
|
}
|
|
1047
1049
|
if (o.parent_id) {
|
|
1048
|
-
const
|
|
1049
|
-
if (
|
|
1050
|
-
const g = e[
|
|
1050
|
+
const u = o.parent_id[0];
|
|
1051
|
+
if (u && e[u]) {
|
|
1052
|
+
const g = e[u];
|
|
1051
1053
|
if (typeof g == "object" && g !== null) {
|
|
1052
1054
|
const C = g;
|
|
1053
1055
|
return C[d] !== void 0 ? C[d] : "";
|
|
@@ -1055,7 +1057,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1055
1057
|
}
|
|
1056
1058
|
}
|
|
1057
1059
|
}
|
|
1058
|
-
return d.includes(".") && !e[d] ?
|
|
1060
|
+
return d.includes(".") && !e[d] ? st(e, d) : e[d] ?? "";
|
|
1059
1061
|
}, cr = (e) => {
|
|
1060
1062
|
const n = [], t = [];
|
|
1061
1063
|
return e.forEach((r) => {
|
|
@@ -1082,22 +1084,22 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1082
1084
|
t,
|
|
1083
1085
|
typeof r == "string" ? r : void 0
|
|
1084
1086
|
) : e(r, t) : null, Ct = (e, n, t) => !e || e.length === 0 || Object.keys(n).length === 0 ? e : e.filter((r) => Object.entries(n).every(([A, i]) => !i || !i.length ? !0 : i.every((o) => {
|
|
1085
|
-
const d = o.column || o.field || A, f = o.search_type || o.operator || "", c = t[d],
|
|
1087
|
+
const d = o.column || o.field || A, f = o.search_type || o.operator || "", c = t[d], u = c == null ? void 0 : c.type, g = be.includes(u || "");
|
|
1086
1088
|
let C = o.pattern || o.value || "";
|
|
1087
|
-
const L = gt(c,
|
|
1089
|
+
const L = gt(c, u);
|
|
1088
1090
|
if (L && c)
|
|
1089
1091
|
return ft(
|
|
1090
1092
|
L,
|
|
1091
1093
|
f,
|
|
1092
1094
|
r[d],
|
|
1093
1095
|
g ? { min_val: o.min_val, max_val: o.max_val } : C,
|
|
1094
|
-
|
|
1096
|
+
u
|
|
1095
1097
|
);
|
|
1096
|
-
const
|
|
1097
|
-
if (
|
|
1098
|
+
const a = r[d];
|
|
1099
|
+
if (a == null || a === "")
|
|
1098
1100
|
return !1;
|
|
1099
|
-
if (be.includes(
|
|
1100
|
-
const p = parseFloat(
|
|
1101
|
+
if (be.includes(u || "")) {
|
|
1102
|
+
const p = parseFloat(a);
|
|
1101
1103
|
switch (f) {
|
|
1102
1104
|
case "equals":
|
|
1103
1105
|
return C = o.max_val ?? 0, p === parseFloat(String(C));
|
|
@@ -1117,18 +1119,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1117
1119
|
return !0;
|
|
1118
1120
|
}
|
|
1119
1121
|
} else {
|
|
1120
|
-
const p = String(
|
|
1122
|
+
const p = String(a).toLowerCase(), R = String(C || "").toLowerCase(), P = R.includes(",") ? R.split(",").map((O) => O.trim()).filter(Boolean) : [R];
|
|
1121
1123
|
switch (f) {
|
|
1122
1124
|
case "contains":
|
|
1123
|
-
return P.some((
|
|
1125
|
+
return P.some((O) => p.includes(O));
|
|
1124
1126
|
case "equals":
|
|
1125
|
-
return P.some((
|
|
1127
|
+
return P.some((O) => p === O);
|
|
1126
1128
|
case "notEqual":
|
|
1127
|
-
return P.every((
|
|
1129
|
+
return P.every((O) => p !== O);
|
|
1128
1130
|
case "startsWith":
|
|
1129
|
-
return P.some((
|
|
1131
|
+
return P.some((O) => p.startsWith(O));
|
|
1130
1132
|
case "endsWith":
|
|
1131
|
-
return P.some((
|
|
1133
|
+
return P.some((O) => p.endsWith(O));
|
|
1132
1134
|
default:
|
|
1133
1135
|
return !0;
|
|
1134
1136
|
}
|
|
@@ -1139,65 +1141,65 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1139
1141
|
if (!A) return [...e];
|
|
1140
1142
|
const o = t == null ? void 0 : t[A], d = o == null ? void 0 : o.comparator;
|
|
1141
1143
|
return [...e].sort((f, c) => {
|
|
1142
|
-
const
|
|
1144
|
+
const u = f[A], g = c[A];
|
|
1143
1145
|
return d ? d(
|
|
1144
|
-
|
|
1146
|
+
u,
|
|
1145
1147
|
g,
|
|
1146
1148
|
f,
|
|
1147
1149
|
// nodeA (full row data)
|
|
1148
1150
|
c,
|
|
1149
1151
|
// nodeB (full row data)
|
|
1150
1152
|
r ? n : n ? [n] : []
|
|
1151
|
-
) :
|
|
1153
|
+
) : u === g ? 0 : u == null ? 1 : g == null ? -1 : typeof u == "string" && typeof g == "string" ? i === "asc" ? u.localeCompare(g) : g.localeCompare(u) : i === "asc" ? u < g ? -1 : 1 : u > g ? -1 : 1;
|
|
1152
1154
|
});
|
|
1153
1155
|
}, Be = (e, n = { minWidth: 150 }) => {
|
|
1154
1156
|
const t = {}, r = {};
|
|
1155
|
-
e.forEach((
|
|
1156
|
-
const p = M(
|
|
1157
|
-
|
|
1157
|
+
e.forEach((a) => {
|
|
1158
|
+
const p = M(a);
|
|
1159
|
+
a.children && Array.isArray(a.children) && (r[p] = [], a.children.forEach((R) => {
|
|
1158
1160
|
const P = M(R);
|
|
1159
1161
|
t[P] = p, r[p] ? r[p].push(P) : r[p] = [P];
|
|
1160
1162
|
}));
|
|
1161
1163
|
});
|
|
1162
|
-
const A = e.map((
|
|
1164
|
+
const A = e.map((a) => {
|
|
1163
1165
|
var q, ee;
|
|
1164
|
-
const p =
|
|
1165
|
-
let P =
|
|
1166
|
+
const p = a.width !== void 0, R = a.field || M(a);
|
|
1167
|
+
let P = a.is_frozen || !1, O = a.pinned === "right";
|
|
1166
1168
|
const U = [];
|
|
1167
1169
|
let N = R;
|
|
1168
1170
|
for (; t[N]; ) {
|
|
1169
1171
|
const ne = t[N];
|
|
1170
1172
|
U.push(ne), N = ne;
|
|
1171
1173
|
}
|
|
1172
|
-
const Q =
|
|
1173
|
-
let
|
|
1174
|
-
Q && ((ee = (q =
|
|
1174
|
+
const Q = a.children && a.children.length > 0;
|
|
1175
|
+
let _ = !1, v = !1;
|
|
1176
|
+
Q && ((ee = (q = a.children) == null ? void 0 : q.forEach) == null || ee.call(q, (ne) => {
|
|
1175
1177
|
const $ = M(ne), Z = e.find(
|
|
1176
1178
|
(te) => M(te) === $
|
|
1177
1179
|
);
|
|
1178
|
-
Z && (Z.is_frozen && (
|
|
1179
|
-
}),
|
|
1180
|
-
const K = (n == null ? void 0 : n.minWidth) || 150,
|
|
1180
|
+
Z && (Z.is_frozen && (_ = !0), Z.pinned === "right" && (v = !0));
|
|
1181
|
+
}), _ && (P = !0), v && (O = !0));
|
|
1182
|
+
const K = (n == null ? void 0 : n.minWidth) || 150, j = a.width ? Math.max(a.width, K) : K;
|
|
1181
1183
|
return {
|
|
1182
|
-
...
|
|
1184
|
+
...a,
|
|
1183
1185
|
field: R,
|
|
1184
|
-
headerName:
|
|
1186
|
+
headerName: a.headerName || a.label,
|
|
1185
1187
|
// Set width and track if it's a custom width or auto width
|
|
1186
|
-
width:
|
|
1187
|
-
originalWidth:
|
|
1188
|
+
width: j,
|
|
1189
|
+
originalWidth: a.width || K,
|
|
1188
1190
|
// Store original width
|
|
1189
1191
|
isAutoWidth: !p,
|
|
1190
1192
|
// Mark columns without explicit width as auto-width
|
|
1191
|
-
filterable:
|
|
1192
|
-
isSortable:
|
|
1193
|
-
resizable:
|
|
1194
|
-
hidden: Ve(
|
|
1195
|
-
align:
|
|
1193
|
+
filterable: a.is_searchable !== !1 || a.isSearchable !== !1,
|
|
1194
|
+
isSortable: a.isSortable !== !1,
|
|
1195
|
+
resizable: a.resizable !== !1,
|
|
1196
|
+
hidden: Ve(a),
|
|
1197
|
+
align: a.align || "left",
|
|
1196
1198
|
is_frozen: P,
|
|
1197
1199
|
// Ensure left-pinned property is set
|
|
1198
|
-
pinned:
|
|
1200
|
+
pinned: O ? "right" : a.pinned,
|
|
1199
1201
|
// Ensure right-pinned property is set
|
|
1200
|
-
originalIndex: e.indexOf(
|
|
1202
|
+
originalIndex: e.indexOf(a),
|
|
1201
1203
|
// Store original index
|
|
1202
1204
|
parentColumns: U,
|
|
1203
1205
|
// Store the ancestry chain
|
|
@@ -1206,17 +1208,17 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1206
1208
|
// Store if this is a parent with children
|
|
1207
1209
|
hasChildren: Q,
|
|
1208
1210
|
// Store whether any children are frozen or right-pinned
|
|
1209
|
-
hasAnyFrozenChildren:
|
|
1211
|
+
hasAnyFrozenChildren: _,
|
|
1210
1212
|
hasAnyRightPinnedChildren: v
|
|
1211
1213
|
};
|
|
1212
1214
|
});
|
|
1213
|
-
A.forEach((
|
|
1214
|
-
|
|
1215
|
+
A.forEach((a) => {
|
|
1216
|
+
a.is_frozen && a.parentColumns.forEach((p) => {
|
|
1215
1217
|
const R = A.find(
|
|
1216
1218
|
(P) => M(P) === p
|
|
1217
1219
|
);
|
|
1218
1220
|
R && (R.is_frozen = !0);
|
|
1219
|
-
}),
|
|
1221
|
+
}), a.pinned === "right" && a.parentColumns.forEach((p) => {
|
|
1220
1222
|
const R = A.find(
|
|
1221
1223
|
(P) => M(P) === p
|
|
1222
1224
|
);
|
|
@@ -1225,7 +1227,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1225
1227
|
});
|
|
1226
1228
|
const i = [
|
|
1227
1229
|
...A
|
|
1228
|
-
].sort((
|
|
1230
|
+
].sort((a, p) => a.is_frozen && !p.is_frozen ? -1 : !a.is_frozen && p.is_frozen || a.pinned === "right" && p.pinned !== "right" ? 1 : a.pinned !== "right" && p.pinned === "right" ? -1 : a.originalIndex - p.originalIndex), o = {
|
|
1229
1231
|
indexes: [],
|
|
1230
1232
|
positions: {},
|
|
1231
1233
|
totalWidth: 0,
|
|
@@ -1239,42 +1241,42 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1239
1241
|
positions: {},
|
|
1240
1242
|
totalWidth: 0
|
|
1241
1243
|
}, f = A.filter(
|
|
1242
|
-
(
|
|
1244
|
+
(a) => a.is_frozen && !a.hidden
|
|
1243
1245
|
), c = A.filter(
|
|
1244
|
-
(
|
|
1246
|
+
(a) => a.pinned === "right" && !a.hidden
|
|
1245
1247
|
);
|
|
1246
|
-
let
|
|
1247
|
-
function g(
|
|
1248
|
+
let u = 0;
|
|
1249
|
+
function g(a, p) {
|
|
1248
1250
|
var U, N, Q;
|
|
1249
|
-
const R = M(
|
|
1251
|
+
const R = M(a), P = p;
|
|
1250
1252
|
o.indexes.push(R), o.positions[R] = P;
|
|
1251
|
-
let
|
|
1252
|
-
if (
|
|
1253
|
-
let
|
|
1254
|
-
(Q = (N =
|
|
1253
|
+
let O;
|
|
1254
|
+
if (a && a.children && ((U = a.children) == null ? void 0 : U.length) > 0) {
|
|
1255
|
+
let _ = 0;
|
|
1256
|
+
(Q = (N = a.children) == null ? void 0 : N.forEach) == null || Q.call(N, (v) => {
|
|
1255
1257
|
if (Ve(v))
|
|
1256
1258
|
return;
|
|
1257
|
-
const K = P +
|
|
1258
|
-
|
|
1259
|
-
}),
|
|
1259
|
+
const K = P + _, j = g(v, K);
|
|
1260
|
+
_ += j;
|
|
1261
|
+
}), O = _;
|
|
1260
1262
|
} else {
|
|
1261
|
-
const
|
|
1262
|
-
|
|
1263
|
+
const _ = n.minWidth || 150;
|
|
1264
|
+
O = a.width && a.width < _ ? _ : a.width || _;
|
|
1263
1265
|
}
|
|
1264
|
-
return
|
|
1266
|
+
return O;
|
|
1265
1267
|
}
|
|
1266
|
-
f.forEach((
|
|
1267
|
-
if (Ve(
|
|
1268
|
+
f.forEach((a) => {
|
|
1269
|
+
if (Ve(a))
|
|
1268
1270
|
return;
|
|
1269
|
-
const p = g(
|
|
1270
|
-
|
|
1271
|
-
}), o.totalWidth =
|
|
1271
|
+
const p = g(a, u);
|
|
1272
|
+
u += p;
|
|
1273
|
+
}), o.totalWidth = u;
|
|
1272
1274
|
let C = 0;
|
|
1273
|
-
return [...c].reverse().forEach((
|
|
1274
|
-
const p = M(
|
|
1275
|
-
d.indexes.push(p), d.positions[p] = C, C +=
|
|
1275
|
+
return [...c].reverse().forEach((a) => {
|
|
1276
|
+
const p = M(a);
|
|
1277
|
+
d.indexes.push(p), d.positions[p] = C, C += a.width || n.minWidth;
|
|
1276
1278
|
}), d.totalWidth = C, d.rightIndexes = c.map(
|
|
1277
|
-
(
|
|
1279
|
+
(a) => M(a)
|
|
1278
1280
|
), o.rightPinned = {
|
|
1279
1281
|
indexes: d.indexes,
|
|
1280
1282
|
positions: d.positions,
|
|
@@ -1295,41 +1297,41 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1295
1297
|
t,
|
|
1296
1298
|
r
|
|
1297
1299
|
));
|
|
1298
|
-
}), { parentToChildrenMap: t, childToParentMap: r }),
|
|
1299
|
-
[
|
|
1300
|
-
[
|
|
1301
|
-
[
|
|
1302
|
-
[
|
|
1303
|
-
[
|
|
1304
|
-
[
|
|
1305
|
-
[
|
|
1306
|
-
[
|
|
1307
|
-
[
|
|
1300
|
+
}), { parentToChildrenMap: t, childToParentMap: r }), Et = {
|
|
1301
|
+
[l.REORDER_COLUMNS]: "columnMoved",
|
|
1302
|
+
[l.SET_SELECTED_ROWS]: "selectionChanged",
|
|
1303
|
+
[l.TOGGLE_COLUMN_VISIBILITY]: "columnVisibilityChanged",
|
|
1304
|
+
[l.SET_COLUMN_FILTER]: "filterChanged",
|
|
1305
|
+
[l.SET_COLUMN_WIDTH]: "columnResized",
|
|
1306
|
+
[l.SET_COLUMNS_WIDTH]: "columnResized",
|
|
1307
|
+
[l.REMOVE_COLUMN_FILTER]: "filterChanged",
|
|
1308
|
+
[l.APPLY_FILTERS]: "filterChanged",
|
|
1309
|
+
[l.SET_SORT]: "sortChanged",
|
|
1308
1310
|
// SET_COLUMNS is used for column resizing in ColumnResizer
|
|
1309
|
-
[
|
|
1310
|
-
[
|
|
1311
|
+
[l.UPDATE_ROW_DATA]: "cellValueChanged",
|
|
1312
|
+
[l.UPDATE_ROW_DATA_OBJECT]: "rowDataChanged",
|
|
1311
1313
|
// Row group events
|
|
1312
|
-
[
|
|
1313
|
-
[
|
|
1314
|
-
[
|
|
1315
|
-
[
|
|
1316
|
-
[
|
|
1317
|
-
},
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1314
|
+
[l.TOGGLE_ROW_GROUP]: "rowGroupToggled",
|
|
1315
|
+
[l.SET_ROW_GROUP_DATA]: "rowGroupDataLoaded",
|
|
1316
|
+
[l.SET_PAGE]: "paginationChanged",
|
|
1317
|
+
[l.SET_PAGE_SIZE]: "paginationChanged",
|
|
1318
|
+
[l.TOGGLE_GROUP_EXPANSION]: "rowGroupToggled"
|
|
1319
|
+
}, ut = [
|
|
1320
|
+
l.SET_COLUMNS,
|
|
1321
|
+
l.TOGGLE_COLUMN_VISIBILITY,
|
|
1322
|
+
l.REORDER_COLUMNS,
|
|
1323
|
+
l.SET_COLUMNS_WIDTH,
|
|
1324
|
+
l.SET_COLUMN_WIDTH,
|
|
1325
|
+
l.TOGGLE_FREEZE_COLUMN,
|
|
1326
|
+
l.PIN_COLUMN_RIGHT,
|
|
1327
|
+
l.UNPIN_COLUMN_RIGHT,
|
|
1328
|
+
l.SET_PAGE,
|
|
1329
|
+
l.SET_COLUMN_FILTER,
|
|
1330
|
+
l.REMOVE_COLUMN_FILTER,
|
|
1331
|
+
l.APPLY_FILTERS,
|
|
1332
|
+
l.SET_SELECTED_ROWS,
|
|
1333
|
+
l.SET_IS_SELECT_ALL_RECORDS,
|
|
1334
|
+
l.SET_SORT
|
|
1333
1335
|
], ht = ({
|
|
1334
1336
|
freezeColumnField: e,
|
|
1335
1337
|
frozen: n,
|
|
@@ -1343,13 +1345,13 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1343
1345
|
A,
|
|
1344
1346
|
n,
|
|
1345
1347
|
e
|
|
1346
|
-
), f = window.innerWidth * 0.6, c = r.frozenColumns.totalWidth - (((N = r.frozenColumns.rightPinned) == null ? void 0 : N.totalWidth) || 0),
|
|
1347
|
-
let v =
|
|
1348
|
-
return
|
|
1349
|
-
(K,
|
|
1348
|
+
), f = window.innerWidth * 0.6, c = r.frozenColumns.totalWidth - (((N = r.frozenColumns.rightPinned) == null ? void 0 : N.totalWidth) || 0), u = (_) => {
|
|
1349
|
+
let v = _.width || 150;
|
|
1350
|
+
return _.children && _.children.length > 0 && (v = _.children.reduce(
|
|
1351
|
+
(K, j) => K + u(j),
|
|
1350
1352
|
0
|
|
1351
1353
|
)), v;
|
|
1352
|
-
}, g =
|
|
1354
|
+
}, g = u(
|
|
1353
1355
|
o || A
|
|
1354
1356
|
), L = c + g > f;
|
|
1355
1357
|
if (n && L && i)
|
|
@@ -1362,31 +1364,31 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1362
1364
|
timeout: 5e3
|
|
1363
1365
|
}
|
|
1364
1366
|
};
|
|
1365
|
-
let
|
|
1366
|
-
o && (
|
|
1367
|
-
const v = o.is_frozen, K = o.pinned,
|
|
1368
|
-
return
|
|
1367
|
+
let a = -1;
|
|
1368
|
+
o && (a = d.findIndex((_) => {
|
|
1369
|
+
const v = o.is_frozen, K = o.pinned, j = o.originalPath || o.path || [], q = _.originalPath || _.path || [];
|
|
1370
|
+
return _.is_frozen === v && _.pinned === K && q[0] === j[0];
|
|
1369
1371
|
}));
|
|
1370
1372
|
const p = [...d];
|
|
1371
|
-
o &&
|
|
1373
|
+
o && a !== -1 ? p.splice(a, 0, o) : o && p.push(o);
|
|
1372
1374
|
const R = on(p), { processedColumns: P } = De(
|
|
1373
1375
|
R,
|
|
1374
1376
|
r.expandedColumnGroups,
|
|
1375
1377
|
0,
|
|
1376
1378
|
null,
|
|
1377
1379
|
((Q = r.defaultColDef) == null ? void 0 : Q.minWidth) || 150
|
|
1378
|
-
), { columns:
|
|
1380
|
+
), { columns: O, frozenData: U } = Be(
|
|
1379
1381
|
P,
|
|
1380
1382
|
r.defaultColDef || { minWidth: 150 }
|
|
1381
1383
|
);
|
|
1382
1384
|
return {
|
|
1383
1385
|
...r,
|
|
1384
|
-
columns:
|
|
1386
|
+
columns: O,
|
|
1385
1387
|
frozenColumns: U
|
|
1386
1388
|
};
|
|
1387
1389
|
}, pt = (e, n, t, r) => {
|
|
1388
|
-
var L,
|
|
1389
|
-
const A = ((L = n.path) == null ? void 0 : L.slice(0, -1)) || [], i = kn(e), o = ((p = (
|
|
1390
|
+
var L, a, p, R, P;
|
|
1391
|
+
const A = ((L = n.path) == null ? void 0 : L.slice(0, -1)) || [], i = kn(e), o = ((p = (a = n.path) == null ? void 0 : a.slice(0, -1)) == null ? void 0 : p.join("/")) || "", d = i[(o == null ? void 0 : o.toLowerCase()) || ""], f = ((R = d == null ? void 0 : d.children) == null ? void 0 : R.length) || 0;
|
|
1390
1392
|
let c = null;
|
|
1391
1393
|
if (A.length === 0)
|
|
1392
1394
|
return {
|
|
@@ -1398,53 +1400,53 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1398
1400
|
} : U)
|
|
1399
1401
|
};
|
|
1400
1402
|
{
|
|
1401
|
-
let
|
|
1402
|
-
for (let
|
|
1403
|
-
const v = A[
|
|
1403
|
+
let O = null, U = null, N = "", Q = [];
|
|
1404
|
+
for (let _ = 0; _ < A.length; _++) {
|
|
1405
|
+
const v = A[_];
|
|
1404
1406
|
N = N ? `${N}/${v}` : v;
|
|
1405
1407
|
const K = i[N.toLowerCase()];
|
|
1406
1408
|
if (!K)
|
|
1407
1409
|
continue;
|
|
1408
|
-
const
|
|
1410
|
+
const j = {
|
|
1409
1411
|
...K,
|
|
1410
|
-
...t || f > 1 ?
|
|
1412
|
+
...t || f > 1 ? Sn(K, { path: Q }) : K,
|
|
1411
1413
|
is_frozen: t,
|
|
1412
1414
|
pinned: t ? "left" : null,
|
|
1413
1415
|
children: []
|
|
1414
1416
|
// Clear children as we'll rebuild the hierarchy
|
|
1415
1417
|
};
|
|
1416
|
-
Q =
|
|
1418
|
+
Q = j.path || [], _ === 0 && (U = j), O && (O.children = [j]), O = j;
|
|
1417
1419
|
}
|
|
1418
|
-
if (
|
|
1419
|
-
const
|
|
1420
|
-
|
|
1420
|
+
if (O) {
|
|
1421
|
+
const _ = O.originalPath || (O.path ? O.path.map((q) => q.split(W)[0]) : []), v = M(n), K = v.split(W)[0], j = [..._, K];
|
|
1422
|
+
O.children = [
|
|
1421
1423
|
{
|
|
1422
1424
|
...n,
|
|
1423
1425
|
is_frozen: t,
|
|
1424
1426
|
pinned: t ? "left" : null,
|
|
1425
|
-
originalPath:
|
|
1426
|
-
path: [...
|
|
1427
|
+
originalPath: j,
|
|
1428
|
+
path: [...O.path || [], v]
|
|
1427
1429
|
}
|
|
1428
1430
|
];
|
|
1429
1431
|
}
|
|
1430
1432
|
c = U;
|
|
1431
1433
|
}
|
|
1432
|
-
const
|
|
1433
|
-
let N = JSON.parse(JSON.stringify(
|
|
1434
|
+
const u = (O, U) => {
|
|
1435
|
+
let N = JSON.parse(JSON.stringify(O));
|
|
1434
1436
|
const Q = n.path || [];
|
|
1435
1437
|
if (Q.length === 0)
|
|
1436
1438
|
return N.filter(
|
|
1437
|
-
(
|
|
1439
|
+
(j) => M(j) !== U
|
|
1438
1440
|
);
|
|
1439
|
-
const
|
|
1440
|
-
let ee =
|
|
1441
|
+
const _ = (j, q) => {
|
|
1442
|
+
let ee = j, ne = null, $ = -1;
|
|
1441
1443
|
for (let Z = 0; Z < q.length - 1; Z++) {
|
|
1442
|
-
const te = q[Z],
|
|
1443
|
-
(
|
|
1444
|
+
const te = q[Z], ae = ee.findIndex(
|
|
1445
|
+
(se) => M(se) === te
|
|
1444
1446
|
);
|
|
1445
|
-
if (
|
|
1447
|
+
if (ae === -1)
|
|
1446
1448
|
return console.warn(`Could not find column with field ${te} in path`), { parent: null, targetIndex: -1 };
|
|
1447
|
-
ne = ee[
|
|
1449
|
+
ne = ee[ae], ee = ne.children || [];
|
|
1448
1450
|
}
|
|
1449
1451
|
if (q.length > 0) {
|
|
1450
1452
|
const Z = q[q.length - 1];
|
|
@@ -1453,10 +1455,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1453
1455
|
);
|
|
1454
1456
|
}
|
|
1455
1457
|
return { parent: ne, targetIndex: $ };
|
|
1456
|
-
}, { parent: v, targetIndex: K } =
|
|
1458
|
+
}, { parent: v, targetIndex: K } = _(N, Q);
|
|
1457
1459
|
if (v && v.children && K !== -1) {
|
|
1458
|
-
const
|
|
1459
|
-
if (
|
|
1460
|
+
const j = v.children[K];
|
|
1461
|
+
if (j && M(j) === r)
|
|
1460
1462
|
v.children.splice(K, 1);
|
|
1461
1463
|
else {
|
|
1462
1464
|
const q = v.children.findIndex(
|
|
@@ -1469,24 +1471,24 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1469
1471
|
($) => M($) === (v.path || [])[0]
|
|
1470
1472
|
), ee = ($, Z, te) => {
|
|
1471
1473
|
if (te === -1 || !$[te]) return $;
|
|
1472
|
-
const
|
|
1473
|
-
if (M(
|
|
1474
|
-
if (
|
|
1474
|
+
const ae = $[te], se = Z || ae;
|
|
1475
|
+
if (M(se) === M(ae)) {
|
|
1476
|
+
if (se.children && se.children.length > 0)
|
|
1475
1477
|
return $;
|
|
1476
1478
|
$.splice(te, 1);
|
|
1477
1479
|
} else {
|
|
1478
1480
|
const fe = (ie, ce, Ae = null) => {
|
|
1479
1481
|
if (!ie.children || ie.children.length === 0)
|
|
1480
1482
|
return !1;
|
|
1481
|
-
const
|
|
1483
|
+
const ue = ie.children.findIndex(
|
|
1482
1484
|
(k) => M(k) === M(ce)
|
|
1483
1485
|
);
|
|
1484
|
-
if (
|
|
1485
|
-
const k = ie.children[
|
|
1486
|
+
if (ue !== -1) {
|
|
1487
|
+
const k = ie.children[ue];
|
|
1486
1488
|
if (!k.children || k.children.length === 0) {
|
|
1487
|
-
if (ie.children.splice(
|
|
1489
|
+
if (ie.children.splice(ue, 1), ie.children.length === 0 && (Ae != null && Ae.children)) {
|
|
1488
1490
|
const V = M(ie), le = Ae.children.findIndex(
|
|
1489
|
-
(
|
|
1491
|
+
(s) => M(s) === V
|
|
1490
1492
|
);
|
|
1491
1493
|
le !== -1 && Ae.children.splice(le, 1);
|
|
1492
1494
|
}
|
|
@@ -1498,7 +1500,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1498
1500
|
if (fe(k, ce, ie)) {
|
|
1499
1501
|
if (ie.children.length === 0 && (Ae != null && Ae.children)) {
|
|
1500
1502
|
const V = M(ie), le = Ae.children.findIndex(
|
|
1501
|
-
(
|
|
1503
|
+
(s) => M(s) === V
|
|
1502
1504
|
);
|
|
1503
1505
|
le !== -1 && Ae.children.splice(le, 1);
|
|
1504
1506
|
}
|
|
@@ -1507,30 +1509,30 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1507
1509
|
return !1;
|
|
1508
1510
|
};
|
|
1509
1511
|
fe(
|
|
1510
|
-
se,
|
|
1511
1512
|
ae,
|
|
1513
|
+
se,
|
|
1512
1514
|
null
|
|
1513
1515
|
) || console.warn(
|
|
1514
1516
|
"Could not find nested parent to remove:",
|
|
1515
|
-
M(
|
|
1516
|
-
), (!
|
|
1517
|
+
M(se)
|
|
1518
|
+
), (!ae.children || ae.children.length === 0) && $.splice(te, 1);
|
|
1517
1519
|
}
|
|
1518
|
-
if (
|
|
1519
|
-
const fe =
|
|
1520
|
+
if (se.path && se.path.length > 1) {
|
|
1521
|
+
const fe = se.path.slice(0, -1), ie = ((ce, Ae) => {
|
|
1520
1522
|
if (Ae.length === 0) return -1;
|
|
1521
1523
|
if (Ae.length === 1)
|
|
1522
1524
|
return ce.findIndex(
|
|
1523
1525
|
(V) => M(V) === Ae[0]
|
|
1524
1526
|
);
|
|
1525
|
-
let
|
|
1527
|
+
let ue = ce, k = -1;
|
|
1526
1528
|
for (let V = 0; V < Ae.length - 1; V++) {
|
|
1527
1529
|
const le = Ae[V];
|
|
1528
|
-
if (k =
|
|
1529
|
-
(
|
|
1530
|
+
if (k = ue.findIndex(
|
|
1531
|
+
(s) => M(s) === le
|
|
1530
1532
|
), k === -1) return -1;
|
|
1531
|
-
|
|
1533
|
+
ue = ue[k].children || [];
|
|
1532
1534
|
}
|
|
1533
|
-
return
|
|
1535
|
+
return ue.findIndex(
|
|
1534
1536
|
(V) => M(V) === Ae[Ae.length - 1]
|
|
1535
1537
|
);
|
|
1536
1538
|
})($, fe);
|
|
@@ -1577,18 +1579,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1577
1579
|
};
|
|
1578
1580
|
let g = e;
|
|
1579
1581
|
if (t || (((P = n.path) == null ? void 0 : P.length) || 0) > 1)
|
|
1580
|
-
g =
|
|
1582
|
+
g = u(
|
|
1581
1583
|
e,
|
|
1582
1584
|
r
|
|
1583
1585
|
);
|
|
1584
1586
|
else {
|
|
1585
|
-
const
|
|
1587
|
+
const O = e.findIndex(
|
|
1586
1588
|
(N) => M(N) === (n.path || [])[0]
|
|
1587
1589
|
);
|
|
1588
|
-
|
|
1590
|
+
O !== -1 && g.splice(O, 1);
|
|
1589
1591
|
const U = n.originalPath ? e.findIndex(
|
|
1590
1592
|
(N) => M(N) === (n.originalPath || [])[0]
|
|
1591
|
-
) :
|
|
1593
|
+
) : O;
|
|
1592
1594
|
U && c && g.splice(
|
|
1593
1595
|
U,
|
|
1594
1596
|
0,
|
|
@@ -1611,22 +1613,22 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1611
1613
|
if (t.length) {
|
|
1612
1614
|
let i = 0;
|
|
1613
1615
|
t.forEach(({ rowId: o, rowIndex: d }) => {
|
|
1614
|
-
var
|
|
1616
|
+
var u;
|
|
1615
1617
|
let f = 0;
|
|
1616
1618
|
Object.keys(A).forEach((g) => {
|
|
1617
1619
|
g.startsWith(o) && (f += A[g].childRowsCount);
|
|
1618
1620
|
});
|
|
1619
1621
|
const c = d - i;
|
|
1620
|
-
(
|
|
1622
|
+
(u = r == null ? void 0 : r[c]) == null || delete u.__rowSpanInfo, r.splice(c + 1, f), i += f;
|
|
1621
1623
|
});
|
|
1622
1624
|
}
|
|
1623
1625
|
return r;
|
|
1624
|
-
},
|
|
1625
|
-
var o, d, f, c,
|
|
1626
|
+
}, me = (e, n, t = !0, r, A) => {
|
|
1627
|
+
var o, d, f, c, u, g, C, L, a;
|
|
1626
1628
|
const i = (d = (o = e.api) == null ? void 0 : o.getInfiniteCacheInstance) == null ? void 0 : d.call(o);
|
|
1627
1629
|
(f = i == null ? void 0 : i.updatePageData) == null || f.call(i, e.pagination.page, n, !0, {
|
|
1628
1630
|
isRefreshData: !1
|
|
1629
|
-
}), !e.serverSide && t && ((
|
|
1631
|
+
}), !e.serverSide && t && ((a = (L = (C = (g = (u = (c = e.api) == null ? void 0 : c.getInfiniteCache) == null ? void 0 : u.call(c)) == null ? void 0 : g.params) == null ? void 0 : C.datasource) == null ? void 0 : L.updateData) == null || a.call(
|
|
1630
1632
|
L,
|
|
1631
1633
|
e,
|
|
1632
1634
|
n.filter((p) => !(p.__parentPath || p.isChildGroup)),
|
|
@@ -1637,7 +1639,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1637
1639
|
var t, r;
|
|
1638
1640
|
const n = (r = (t = e.api) == null ? void 0 : t.getInfiniteRowModel) == null ? void 0 : r.call(t);
|
|
1639
1641
|
n && n.infiniteCache && n.infiniteCache.purgeCache && n.infiniteCache.purgeCache({ isRefreshData: !1 });
|
|
1640
|
-
}, ke = (e) => Object.keys(e.expandedChildRows).length === 0,
|
|
1642
|
+
}, ke = (e) => Object.keys(e.expandedChildRows).length === 0, En = (e, n) => {
|
|
1641
1643
|
var r, A;
|
|
1642
1644
|
const t = (A = (r = e.current) == null ? void 0 : r.querySelectorAll) == null ? void 0 : A.call(
|
|
1643
1645
|
r,
|
|
@@ -1663,17 +1665,17 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1663
1665
|
getSelectedRows: () => {
|
|
1664
1666
|
const i = [];
|
|
1665
1667
|
let o = [];
|
|
1666
|
-
const { serverSide: d, data: f, api: c } = e,
|
|
1667
|
-
d &&
|
|
1668
|
+
const { serverSide: d, data: f, api: c } = e, u = c == null ? void 0 : c.getInfiniteCache();
|
|
1669
|
+
d && u ? o = u.getAllCachedData() || f : !d && u && (o = u.params.datasource.getWholeData() || f);
|
|
1668
1670
|
let g = e.selectedRows;
|
|
1669
1671
|
if (Array.isArray(n.payload)) {
|
|
1670
1672
|
if (Array.isArray(n.payload) && (g = n.payload, o && g && g.length > 0)) {
|
|
1671
1673
|
const C = new Set(g.map(String));
|
|
1672
1674
|
for (let L = 0; L < o.length; L++) {
|
|
1673
|
-
const
|
|
1674
|
-
if (!
|
|
1675
|
-
const p =
|
|
1676
|
-
if (p !== void 0 && C.has(String(p)) && (i.push(
|
|
1675
|
+
const a = o[L];
|
|
1676
|
+
if (!a) continue;
|
|
1677
|
+
const p = a[e.uniqueIdField] || a.id;
|
|
1678
|
+
if (p !== void 0 && C.has(String(p)) && (i.push(a), i.length === g.length))
|
|
1677
1679
|
break;
|
|
1678
1680
|
}
|
|
1679
1681
|
}
|
|
@@ -1682,8 +1684,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1682
1684
|
},
|
|
1683
1685
|
getSelectedRowsID: () => {
|
|
1684
1686
|
let i = e.selectedRows, o = [];
|
|
1685
|
-
const { serverSide: d, data: f, api: c } = e,
|
|
1686
|
-
if (d &&
|
|
1687
|
+
const { serverSide: d, data: f, api: c } = e, u = c == null ? void 0 : c.getInfiniteCache();
|
|
1688
|
+
if (d && u ? o = u.getAllCachedData() || f : !d && u && (o = u.params.datasource.getWholeData() || f), Array.isArray(n.payload))
|
|
1687
1689
|
Array.isArray(n.payload) && (i = n.payload);
|
|
1688
1690
|
else return n.payload ? o.filter((g) => !g.__parentPath).map((g) => g[e.uniqueIdField]) : [];
|
|
1689
1691
|
return i;
|
|
@@ -1706,10 +1708,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1706
1708
|
let A = e.filteredData;
|
|
1707
1709
|
if (e.isSingleSelect) {
|
|
1708
1710
|
const f = n ? [t] : [], c = n ? { [t]: !0 } : {};
|
|
1709
|
-
return A = A == null ? void 0 : A.map((
|
|
1710
|
-
...
|
|
1711
|
+
return A = A == null ? void 0 : A.map((u) => u.is_selected && !n && t === String(u[e.uniqueIdField]) ? {
|
|
1712
|
+
...u,
|
|
1711
1713
|
is_selected: !1
|
|
1712
|
-
} :
|
|
1714
|
+
} : u), {
|
|
1713
1715
|
selectedRowsUpdated: f,
|
|
1714
1716
|
unCheckedRowsUpdated: e.unCheckedRows,
|
|
1715
1717
|
selectedRowsObjectUpdated: c,
|
|
@@ -1784,7 +1786,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1784
1786
|
const i = Ln(A, n);
|
|
1785
1787
|
r.push(...i);
|
|
1786
1788
|
}), r;
|
|
1787
|
-
},
|
|
1789
|
+
}, un = (e, n, t) => {
|
|
1788
1790
|
if (!n || !n.aggFunc)
|
|
1789
1791
|
return null;
|
|
1790
1792
|
const r = Ln(e, t);
|
|
@@ -1798,7 +1800,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1798
1800
|
`Aggregation function '${o}' not found for column '${A}'`
|
|
1799
1801
|
), null);
|
|
1800
1802
|
}, ye = (e, n, t, r, A, i) => {
|
|
1801
|
-
var f, c,
|
|
1803
|
+
var f, c, u;
|
|
1802
1804
|
const o = {
|
|
1803
1805
|
__isAggregationRow: !0,
|
|
1804
1806
|
__parentId: i,
|
|
@@ -1814,27 +1816,27 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1814
1816
|
for (let g = 0; g < e.columns.length; g++) {
|
|
1815
1817
|
const C = e.columns[g], L = M(C);
|
|
1816
1818
|
if ((f = C == null ? void 0 : C.extra) != null && f.is_grouping_key && (t != null && t[L]) || C.rowGroup && !C.is_hidden) {
|
|
1817
|
-
const
|
|
1818
|
-
o[
|
|
1819
|
+
const a = (c = C == null ? void 0 : C.originalFields) != null && c[r] ? C.originalFields[r] : L, p = (u = C == null ? void 0 : C.originalFields) != null && u[r - 1] ? C.originalFields[r - 1] : L;
|
|
1820
|
+
o[a] = t != null && t[p] ? `Total ${(t == null ? void 0 : t[p]) || ""}` : "Total", t != null && t[p] ? (o.grandTotalAggreRow = !1, o.subTotalAggreRow = !0) : (o.isGrandTotalRow = !0, o.grandTotalAggreRow = !0, o.subTotalAggreRow = !1);
|
|
1819
1821
|
break;
|
|
1820
1822
|
}
|
|
1821
1823
|
}
|
|
1822
1824
|
return d.forEach((g) => {
|
|
1823
1825
|
if (g.aggFunc) {
|
|
1824
|
-
const C =
|
|
1826
|
+
const C = un(
|
|
1825
1827
|
t,
|
|
1826
1828
|
g,
|
|
1827
1829
|
e.childKeyField
|
|
1828
1830
|
), L = M(g);
|
|
1829
|
-
o[L] = C, n && n.length && (n = n.map((
|
|
1830
|
-
const p =
|
|
1831
|
-
|
|
1831
|
+
o[L] = C, n && n.length && (n = n.map((a) => {
|
|
1832
|
+
const p = un(
|
|
1833
|
+
a,
|
|
1832
1834
|
g,
|
|
1833
1835
|
e.childKeyField
|
|
1834
|
-
), R =
|
|
1836
|
+
), R = a == null ? void 0 : a[e.childKeyField], P = Array.isArray(R) && R.length > 0;
|
|
1835
1837
|
return {
|
|
1836
|
-
...
|
|
1837
|
-
__parentPath:
|
|
1838
|
+
...a,
|
|
1839
|
+
__parentPath: a.__parentPath ? `${a.__parentPath}${String(a.__parentPath).includes(String(i)) ? "" : `/${i}`}` : String(i),
|
|
1838
1840
|
level: r,
|
|
1839
1841
|
parentRowIndex: A,
|
|
1840
1842
|
parentRowData: t,
|
|
@@ -1850,58 +1852,58 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1850
1852
|
aggreChildRows: n
|
|
1851
1853
|
};
|
|
1852
1854
|
}, fr = (e, n, t, r, A, i) => {
|
|
1853
|
-
var
|
|
1854
|
-
const o = t.parentRowIndex || r, d = e.columns.some((C) => C.aggFunc), f = ((
|
|
1855
|
+
var u, g;
|
|
1856
|
+
const o = t.parentRowIndex || r, d = e.columns.some((C) => C.aggFunc), f = ((u = t.__parentPath) == null ? void 0 : u.split("/").length) || 0;
|
|
1855
1857
|
let c = null;
|
|
1856
1858
|
if (d && f) {
|
|
1857
|
-
const C = n[o], L = C[i],
|
|
1859
|
+
const C = n[o], L = C[i], a = C[e.childKeyField], p = Object.keys(
|
|
1858
1860
|
e.expandedChildRows
|
|
1859
|
-
).reduce((Q,
|
|
1861
|
+
).reduce((Q, _) => (_.startsWith(String(L)) && (Q += e.expandedChildRows[_].childRowsCount), Q), 0), R = !!C.__parentPath;
|
|
1860
1862
|
let P;
|
|
1861
1863
|
if (R) {
|
|
1862
|
-
P = o + (
|
|
1864
|
+
P = o + (a == null ? void 0 : a.length) + 1;
|
|
1863
1865
|
let Q = 0;
|
|
1864
|
-
Object.keys(e.expandedChildRows).forEach((
|
|
1865
|
-
const v = String(
|
|
1866
|
-
|
|
1866
|
+
Object.keys(e.expandedChildRows).forEach((_) => {
|
|
1867
|
+
const v = String(_).split("/"), K = String(L), j = v.indexOf(K);
|
|
1868
|
+
j >= 0 && j < v.length - 1 && (Q += e.expandedChildRows[_].childRowsCount);
|
|
1867
1869
|
}), P += Q;
|
|
1868
1870
|
} else
|
|
1869
1871
|
P = p;
|
|
1870
|
-
const { aggreRow:
|
|
1872
|
+
const { aggreRow: O } = ye(
|
|
1871
1873
|
e,
|
|
1872
|
-
|
|
1874
|
+
a,
|
|
1873
1875
|
C,
|
|
1874
1876
|
f,
|
|
1875
1877
|
o,
|
|
1876
1878
|
A
|
|
1877
1879
|
);
|
|
1878
|
-
n[P] =
|
|
1879
|
-
let U = { ...
|
|
1880
|
+
n[P] = O;
|
|
1881
|
+
let U = { ...O };
|
|
1880
1882
|
if (R) {
|
|
1881
1883
|
let Q = f - 1;
|
|
1882
1884
|
for (; Q !== 0; ) {
|
|
1883
|
-
const
|
|
1885
|
+
const _ = U.parentRowIndex, v = ((g = n[_]) == null ? void 0 : g.parentRowIndex) || _, K = v >= 0 ? v : _;
|
|
1884
1886
|
if (K >= 0) {
|
|
1885
|
-
const
|
|
1887
|
+
const j = n[K], q = j[i], ee = j[e.childKeyField], { aggreRow: ne } = ye(
|
|
1886
1888
|
e,
|
|
1887
1889
|
ee,
|
|
1888
|
-
|
|
1890
|
+
j,
|
|
1889
1891
|
Q,
|
|
1890
1892
|
K,
|
|
1891
1893
|
q
|
|
1892
|
-
), $ = !!
|
|
1894
|
+
), $ = !!j.__parentPath;
|
|
1893
1895
|
let Z;
|
|
1894
1896
|
if ($) {
|
|
1895
1897
|
Z = K + (ee == null ? void 0 : ee.length) + 1;
|
|
1896
1898
|
let te = 0;
|
|
1897
|
-
Object.keys(e.expandedChildRows).forEach((
|
|
1898
|
-
const
|
|
1899
|
-
fe >= 0 && fe <
|
|
1899
|
+
Object.keys(e.expandedChildRows).forEach((ae) => {
|
|
1900
|
+
const se = String(ae).split("/"), Ee = String(q), fe = se.indexOf(Ee);
|
|
1901
|
+
fe >= 0 && fe < se.length - 1 && (te += e.expandedChildRows[ae].childRowsCount);
|
|
1900
1902
|
}), Z += te;
|
|
1901
1903
|
} else
|
|
1902
1904
|
Z = Object.keys(
|
|
1903
1905
|
e.expandedChildRows
|
|
1904
|
-
).reduce((te,
|
|
1906
|
+
).reduce((te, ae) => (ae.startsWith(String(q)) && (te += e.expandedChildRows[ae].childRowsCount), te), 0);
|
|
1905
1907
|
n[Z] = ne, U = ne, Q--;
|
|
1906
1908
|
} else
|
|
1907
1909
|
Q = 0;
|
|
@@ -1964,15 +1966,15 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1964
1966
|
};
|
|
1965
1967
|
const o = {}, d = [...e];
|
|
1966
1968
|
return i.forEach((f) => {
|
|
1967
|
-
var
|
|
1969
|
+
var u;
|
|
1968
1970
|
const c = /* @__PURE__ */ new Map();
|
|
1969
1971
|
for (let g = 0; g < e.length; g++) {
|
|
1970
1972
|
const C = e[g];
|
|
1971
1973
|
delete C.__rowSpanInfo;
|
|
1972
1974
|
const L = C[t];
|
|
1973
1975
|
o[L] || (o[L] = {});
|
|
1974
|
-
const
|
|
1975
|
-
if (!(
|
|
1976
|
+
const a = o[L][f];
|
|
1977
|
+
if (!(a && a.span === 0))
|
|
1976
1978
|
if (A && typeof A == "function") {
|
|
1977
1979
|
const p = A(
|
|
1978
1980
|
{
|
|
@@ -1991,9 +1993,9 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1991
1993
|
}, p > 1 && (o[L].isRowSpan = !0), p > 1) {
|
|
1992
1994
|
const R = [L];
|
|
1993
1995
|
for (let P = 1; P < p; P++) {
|
|
1994
|
-
const
|
|
1995
|
-
if (
|
|
1996
|
-
const U = e[
|
|
1996
|
+
const O = g + P;
|
|
1997
|
+
if (O < e.length) {
|
|
1998
|
+
const U = e[O][t];
|
|
1997
1999
|
R.push(U), o[U] || (o[U] = {}), o[U][f] = {
|
|
1998
2000
|
span: 0,
|
|
1999
2001
|
isFirst: !1,
|
|
@@ -2021,17 +2023,17 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2021
2023
|
if (!(A && typeof A == "function"))
|
|
2022
2024
|
for (const [g, C] of c.entries()) {
|
|
2023
2025
|
if (C.length <= 1) {
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2026
|
+
const a = (u = C[0]) == null ? void 0 : u.rowId;
|
|
2027
|
+
a && (o[a] || (o[a] = {}), o[a][f] = {
|
|
2026
2028
|
span: 1,
|
|
2027
2029
|
isFirst: !0,
|
|
2028
2030
|
isLast: !0
|
|
2029
2031
|
});
|
|
2030
2032
|
continue;
|
|
2031
2033
|
}
|
|
2032
|
-
const L = C.map((
|
|
2033
|
-
C.forEach((
|
|
2034
|
-
const R =
|
|
2034
|
+
const L = C.map((a) => a.rowId);
|
|
2035
|
+
C.forEach((a, p) => {
|
|
2036
|
+
const R = a.rowId;
|
|
2035
2037
|
o[R] || (o[R] = {}), o[R][f] = {
|
|
2036
2038
|
span: p === 0 ? C.length : 0,
|
|
2037
2039
|
isFirst: p === 0,
|
|
@@ -2092,8 +2094,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2092
2094
|
let d = !1;
|
|
2093
2095
|
r.forEach((f) => {
|
|
2094
2096
|
if (f === "Selection") {
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
+
const u = i.__rowSpanInfo && i.__rowSpanInfo[f];
|
|
2098
|
+
u != null && u.span && (u == null ? void 0 : u.span) > 1 && (d = !0);
|
|
2097
2099
|
return;
|
|
2098
2100
|
}
|
|
2099
2101
|
const c = hn(
|
|
@@ -2114,7 +2116,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2114
2116
|
}), c > 1 && (d = !0);
|
|
2115
2117
|
}), d && (i.__rowSpanInfo.isRowSpan = !0);
|
|
2116
2118
|
}), A;
|
|
2117
|
-
},
|
|
2119
|
+
}, Er = (e, n) => {
|
|
2118
2120
|
var r;
|
|
2119
2121
|
return (r = e.data) != null && r.__rowSpanInfo && e.data.__rowSpanInfo[n] ? e.data.__rowSpanInfo[n].span || 1 : Tt(e, n) ? 0 : yn(e, n);
|
|
2120
2122
|
}, Tt = (e, n) => {
|
|
@@ -2152,7 +2154,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2152
2154
|
t
|
|
2153
2155
|
) : void 0;
|
|
2154
2156
|
return n !== null && r === A;
|
|
2155
|
-
},
|
|
2157
|
+
}, ur = (e, n, t = "id", r) => {
|
|
2156
2158
|
if (!n || !e || !e.length)
|
|
2157
2159
|
return {
|
|
2158
2160
|
processedData: e || [],
|
|
@@ -2168,43 +2170,43 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2168
2170
|
e,
|
|
2169
2171
|
r || ["wp", "iaf", "ly"]
|
|
2170
2172
|
), o = {}, d = [...i], f = /* @__PURE__ */ new Map();
|
|
2171
|
-
return i.forEach((c,
|
|
2173
|
+
return i.forEach((c, u) => {
|
|
2172
2174
|
if (!c.__flattenedRowId) {
|
|
2173
|
-
const C = c[t] ||
|
|
2174
|
-
f.has(C) || f.set(C, []), f.get(C).push({ row: c, index:
|
|
2175
|
+
const C = c[t] || u;
|
|
2176
|
+
f.has(C) || f.set(C, []), f.get(C).push({ row: c, index: u });
|
|
2175
2177
|
return;
|
|
2176
2178
|
}
|
|
2177
2179
|
const g = c.__flattenedRowId.split("__")[0];
|
|
2178
|
-
f.has(g) || f.set(g, []), f.get(g).push({ row: c, index:
|
|
2180
|
+
f.has(g) || f.set(g, []), f.get(g).push({ row: c, index: u });
|
|
2179
2181
|
}), A.forEach((c) => {
|
|
2180
|
-
for (const [
|
|
2182
|
+
for (const [u, g] of f.entries()) {
|
|
2181
2183
|
const C = g.length;
|
|
2182
|
-
g.sort((
|
|
2183
|
-
const R =
|
|
2184
|
-
return
|
|
2184
|
+
g.sort((a, p) => {
|
|
2185
|
+
const R = a.row.__split, P = p.row.__split, O = (R == null ? void 0 : R.index) ?? 0, U = (P == null ? void 0 : P.index) ?? 0;
|
|
2186
|
+
return O - U;
|
|
2185
2187
|
});
|
|
2186
2188
|
const L = g.map(
|
|
2187
|
-
(
|
|
2189
|
+
(a) => a.row[t] || a.row.__flattenedRowId || a.index
|
|
2188
2190
|
);
|
|
2189
|
-
g.forEach((
|
|
2190
|
-
const { row: R, index: P } =
|
|
2191
|
-
o[
|
|
2191
|
+
g.forEach((a, p) => {
|
|
2192
|
+
const { row: R, index: P } = a, O = R[t] || R.__flattenedRowId || P;
|
|
2193
|
+
o[O] || (o[O] = {}), o[O][c] = {
|
|
2192
2194
|
span: p === 0 ? C : 0,
|
|
2193
2195
|
isFirst: p === 0,
|
|
2194
2196
|
isLast: p === C - 1,
|
|
2195
2197
|
rowIds: p === 0 ? L : void 0
|
|
2196
2198
|
// Store row IDs only in the first row
|
|
2197
|
-
}, C > 1 && p === 0 && (o[
|
|
2199
|
+
}, C > 1 && p === 0 && (o[O].isRowSpan = !0);
|
|
2198
2200
|
});
|
|
2199
2201
|
}
|
|
2200
2202
|
}), d.forEach((c) => {
|
|
2201
|
-
const
|
|
2202
|
-
c.__rowSpanInfo = o[
|
|
2203
|
+
const u = c[t] || c.__flattenedRowId || c.id;
|
|
2204
|
+
c.__rowSpanInfo = o[u] || {};
|
|
2203
2205
|
}), {
|
|
2204
2206
|
processedData: d,
|
|
2205
2207
|
rowSpanMap: o
|
|
2206
2208
|
};
|
|
2207
|
-
},
|
|
2209
|
+
}, _e = (e, n, t, r) => {
|
|
2208
2210
|
var A, i;
|
|
2209
2211
|
return e && e.current && ((A = e.current) != null && A.isRowSelectable) ? (i = e.current) == null ? void 0 : i.isRowSelectable({
|
|
2210
2212
|
data: t,
|
|
@@ -2220,7 +2222,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2220
2222
|
const A = [];
|
|
2221
2223
|
for (let i = 0; i < e.length; i++) {
|
|
2222
2224
|
const o = e[i];
|
|
2223
|
-
o != null && o.__parentPath || o != null && o.isChildGroup || r && !
|
|
2225
|
+
o != null && o.__parentPath || o != null && o.isChildGroup || r && !_e(n, i, o, t) || A.push(String(o[t]));
|
|
2224
2226
|
}
|
|
2225
2227
|
return A;
|
|
2226
2228
|
}, rn = {
|
|
@@ -2391,27 +2393,28 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2391
2393
|
virtualizationConfig: {
|
|
2392
2394
|
threshold: 20
|
|
2393
2395
|
},
|
|
2394
|
-
disableCurrentPageRecords: !1
|
|
2396
|
+
disableCurrentPageRecords: !1,
|
|
2397
|
+
showForceLoading: !1
|
|
2395
2398
|
}, mt = (e, n) => {
|
|
2396
|
-
var t, r, A, i, o, d, f, c,
|
|
2399
|
+
var t, r, A, i, o, d, f, c, u, g, C, L, a, p, R, P, O, U, N, Q, _, v, K, j, q, ee, ne, $, Z, te, ae, se, Ee, fe, he, ie, ce, Ae, ue, k, V, le;
|
|
2397
2400
|
switch (n.type) {
|
|
2398
|
-
case
|
|
2401
|
+
case l.SET_LOADING:
|
|
2399
2402
|
return {
|
|
2400
2403
|
...e,
|
|
2401
2404
|
isLoading: n.payload
|
|
2402
2405
|
};
|
|
2403
|
-
case
|
|
2406
|
+
case l.SET_TABLE_ID:
|
|
2404
2407
|
return {
|
|
2405
2408
|
...e,
|
|
2406
2409
|
tableId: n.payload
|
|
2407
2410
|
};
|
|
2408
|
-
case
|
|
2409
|
-
const { isCountUnknown:
|
|
2411
|
+
case l.SET_DATA: {
|
|
2412
|
+
const { isCountUnknown: s, totalItems: E, totalPages: h, currentPage: B } = n.meta || {}, w = e.columns.some((S) => S.aggFunc), I = B || e.pagination.page || 1;
|
|
2410
2413
|
let m = null;
|
|
2411
2414
|
const G = e.aggregationTotalRow && ((t = e.aggregationTotalRow) == null ? void 0 : t[I]);
|
|
2412
2415
|
let F = e.aggregationTotalRow;
|
|
2413
2416
|
if (w && !G) {
|
|
2414
|
-
const { aggreRow:
|
|
2417
|
+
const { aggreRow: S } = ye(
|
|
2415
2418
|
e,
|
|
2416
2419
|
[],
|
|
2417
2420
|
{ [e.childKeyField]: n.payload },
|
|
@@ -2419,22 +2422,22 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2419
2422
|
0,
|
|
2420
2423
|
null
|
|
2421
2424
|
);
|
|
2422
|
-
m =
|
|
2425
|
+
m = S, F = {
|
|
2423
2426
|
...e.aggregationTotalRow,
|
|
2424
2427
|
[I]: m
|
|
2425
2428
|
};
|
|
2426
2429
|
} else G && (m = G);
|
|
2427
2430
|
const x = n.payload;
|
|
2428
|
-
if ((r = e.data) != null && r.length && JSON.stringify(x) === JSON.stringify(e.data) &&
|
|
2431
|
+
if ((r = e.data) != null && r.length && JSON.stringify(x) === JSON.stringify(e.data) && s === e.isCountUnknown && E === e.totalItems && h === e.totalPages && B === e.currentPage && !m)
|
|
2429
2432
|
return e;
|
|
2430
|
-
const D = x.map((
|
|
2433
|
+
const D = x.map((S) => (delete S._animationState, delete S._isDraggedRow, S)), y = [...e.selectedRows], z = {
|
|
2431
2434
|
...e.selectedRowsObject
|
|
2432
2435
|
};
|
|
2433
|
-
for (let
|
|
2434
|
-
const T = D[
|
|
2435
|
-
if (T.is_selected &&
|
|
2436
|
+
for (let S = 0; S < D.length; S++) {
|
|
2437
|
+
const T = D[S];
|
|
2438
|
+
if (T.is_selected && _e(
|
|
2436
2439
|
e.rowSelectionRef,
|
|
2437
|
-
|
|
2440
|
+
S,
|
|
2438
2441
|
T,
|
|
2439
2442
|
e.uniqueIdField
|
|
2440
2443
|
) || e.serverSide && e.removeSelectionOnOperation && e.isSelectAllRecords) {
|
|
@@ -2451,14 +2454,15 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2451
2454
|
aggregationTotalRow: F,
|
|
2452
2455
|
pinnedBottomRows: [m]
|
|
2453
2456
|
} : {},
|
|
2457
|
+
expandedChildRows: {},
|
|
2454
2458
|
hasAggregation: w,
|
|
2455
2459
|
selectedRows: [.../* @__PURE__ */ new Set([...y])],
|
|
2456
2460
|
selectedRowsObject: z,
|
|
2457
2461
|
pagination: {
|
|
2458
2462
|
...e.pagination,
|
|
2459
2463
|
...Object.keys(e.columnFilters).length && !e.serverSide ? {} : {
|
|
2460
|
-
isCountUnknown:
|
|
2461
|
-
totalItems:
|
|
2464
|
+
isCountUnknown: s,
|
|
2465
|
+
totalItems: E,
|
|
2462
2466
|
allTotalPages: h,
|
|
2463
2467
|
currentLoadedPage: B,
|
|
2464
2468
|
totalPages: h,
|
|
@@ -2467,24 +2471,24 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2467
2471
|
}
|
|
2468
2472
|
};
|
|
2469
2473
|
}
|
|
2470
|
-
case
|
|
2474
|
+
case l.SET_FILTERED_DATA:
|
|
2471
2475
|
return {
|
|
2472
2476
|
...e,
|
|
2473
2477
|
filteredData: n.payload
|
|
2474
2478
|
};
|
|
2475
|
-
case
|
|
2476
|
-
const { updatedData:
|
|
2477
|
-
|
|
2479
|
+
case l.UPDATE_ROW_DATA: {
|
|
2480
|
+
const { updatedData: s, dataRowIndex: E, aggregationRow: h, rowId: B, parentIndex: w } = n.payload, I = Fe(
|
|
2481
|
+
s,
|
|
2478
2482
|
e.rowSpanColumn,
|
|
2479
2483
|
e.api
|
|
2480
2484
|
);
|
|
2481
|
-
|
|
2485
|
+
me(
|
|
2482
2486
|
e,
|
|
2483
2487
|
I,
|
|
2484
2488
|
!0,
|
|
2485
2489
|
B,
|
|
2486
|
-
w >= 0 ? w :
|
|
2487
|
-
),
|
|
2490
|
+
w >= 0 ? w : E
|
|
2491
|
+
), En(e.tableInstance, E);
|
|
2488
2492
|
const m = e.pagination.page || 1, G = h ? {
|
|
2489
2493
|
...e.aggregationTotalRow,
|
|
2490
2494
|
[m]: h
|
|
@@ -2499,67 +2503,67 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2499
2503
|
} : {}
|
|
2500
2504
|
};
|
|
2501
2505
|
}
|
|
2502
|
-
case
|
|
2503
|
-
const { rowId:
|
|
2506
|
+
case l.UPDATE_ROW_DATA_OBJECT: {
|
|
2507
|
+
const { rowId: s, data: E } = n.payload, h = e.uniqueIdField, B = e.expandedChildRows[s], w = { ...e.expandedChildRows };
|
|
2504
2508
|
let I = !1, m = -1, G = 0;
|
|
2505
2509
|
B && (Object.keys(e.expandedChildRows).filter(
|
|
2506
|
-
(y) => y.startsWith(String(
|
|
2510
|
+
(y) => y.startsWith(String(s))
|
|
2507
2511
|
).forEach((y) => {
|
|
2508
2512
|
G += e.expandedChildRows[y].childRowsCount;
|
|
2509
2513
|
}), m = B.rowIndex);
|
|
2510
2514
|
let F = ((A = e.data) == null ? void 0 : A.map((D, y) => {
|
|
2511
|
-
if (D[h] ==
|
|
2512
|
-
return m = y, { ...D, ...
|
|
2515
|
+
if (D[h] == s)
|
|
2516
|
+
return m = y, { ...D, ...E };
|
|
2513
2517
|
if (D[e.childKeyField] && Array.isArray(D[e.childKeyField])) {
|
|
2514
|
-
const z = D[e.childKeyField].map((
|
|
2518
|
+
const z = D[e.childKeyField].map((S) => S[h] == s ? { ...S, ...E } : S);
|
|
2515
2519
|
if (z !== D[e.childKeyField])
|
|
2516
2520
|
return { ...D, [e.childKeyField]: z };
|
|
2517
2521
|
}
|
|
2518
2522
|
return D;
|
|
2519
2523
|
})) || [];
|
|
2520
2524
|
if (B && m !== -1) {
|
|
2521
|
-
const D = G, y =
|
|
2525
|
+
const D = G, y = E[e.childKeyField], S = (y ? y.length : 0) - D;
|
|
2522
2526
|
if (!y)
|
|
2523
2527
|
F.splice(m + 1, G);
|
|
2524
2528
|
else {
|
|
2525
|
-
const T = typeof
|
|
2529
|
+
const T = typeof s == "string" ? s.split("/").length : 1, X = y.map((H) => ({
|
|
2526
2530
|
...H,
|
|
2527
|
-
__parentPath: H.__parentPath ? `${H.__parentPath}/${H[
|
|
2531
|
+
__parentPath: H.__parentPath ? `${H.__parentPath}/${H[s]}` : String(s),
|
|
2528
2532
|
level: T,
|
|
2529
2533
|
parentRowIndex: m,
|
|
2530
|
-
parentRowData:
|
|
2534
|
+
parentRowData: E
|
|
2531
2535
|
}));
|
|
2532
2536
|
F.splice(m + 1, G), F.splice(
|
|
2533
2537
|
m + 1,
|
|
2534
2538
|
0,
|
|
2535
2539
|
...X
|
|
2536
|
-
), w[
|
|
2537
|
-
...w[
|
|
2540
|
+
), w[s] = {
|
|
2541
|
+
...w[s],
|
|
2538
2542
|
childRowsCount: y.length
|
|
2539
2543
|
}, I = !0;
|
|
2540
2544
|
}
|
|
2541
|
-
|
|
2545
|
+
S !== 0 && (Object.keys(w).forEach((T) => {
|
|
2542
2546
|
const X = w[T];
|
|
2543
2547
|
X.rowIndex > m && (w[T] = {
|
|
2544
2548
|
...X,
|
|
2545
|
-
rowIndex: X.rowIndex +
|
|
2549
|
+
rowIndex: X.rowIndex + S
|
|
2546
2550
|
});
|
|
2547
2551
|
}), F = F.map((T) => T.__parentPath && T.parentRowIndex !== void 0 && T.parentRowIndex > m ? {
|
|
2548
2552
|
...T,
|
|
2549
|
-
parentRowIndex: T.parentRowIndex +
|
|
2553
|
+
parentRowIndex: T.parentRowIndex + S
|
|
2550
2554
|
} : T));
|
|
2551
2555
|
}
|
|
2552
|
-
m !== -1 &&
|
|
2556
|
+
m !== -1 && En(e.tableInstance, m);
|
|
2553
2557
|
const x = Fe(
|
|
2554
2558
|
F,
|
|
2555
2559
|
e.rowSpanColumn,
|
|
2556
2560
|
e.api
|
|
2557
2561
|
);
|
|
2558
|
-
return
|
|
2562
|
+
return me(
|
|
2559
2563
|
e,
|
|
2560
2564
|
x,
|
|
2561
2565
|
!0,
|
|
2562
|
-
String(
|
|
2566
|
+
String(s),
|
|
2563
2567
|
m
|
|
2564
2568
|
), {
|
|
2565
2569
|
...e,
|
|
@@ -2568,39 +2572,39 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2568
2572
|
...I ? { expandedChildRows: w } : {}
|
|
2569
2573
|
};
|
|
2570
2574
|
}
|
|
2571
|
-
case
|
|
2572
|
-
const
|
|
2575
|
+
case l.SET_COLUMNS: {
|
|
2576
|
+
const s = ((i = n.meta) == null ? void 0 : i.defaultColDef) || e.defaultColDef, { columns: E, frozenData: h } = Be(
|
|
2573
2577
|
n.payload,
|
|
2574
|
-
|
|
2578
|
+
s ?? void 0
|
|
2575
2579
|
);
|
|
2576
2580
|
if (n.meta && n.meta.recomputeFrozen) {
|
|
2577
2581
|
h.positions = n.meta.frozenPositions || {};
|
|
2578
|
-
let B =
|
|
2582
|
+
let B = sn(
|
|
2579
2583
|
!0,
|
|
2580
2584
|
e.disableSelectAllRecords,
|
|
2581
2585
|
e.isSingleSelect
|
|
2582
2586
|
);
|
|
2583
2587
|
h.indexes.forEach((w) => {
|
|
2584
2588
|
var m;
|
|
2585
|
-
const I =
|
|
2589
|
+
const I = E.find((G) => M(G) === w);
|
|
2586
2590
|
I && !I.hidden && (B += I.width || ((m = e.defaultColDef) == null ? void 0 : m.minWidth) || 150);
|
|
2587
2591
|
}), h.totalWidth = B;
|
|
2588
2592
|
}
|
|
2589
2593
|
return {
|
|
2590
2594
|
...e,
|
|
2591
|
-
columns:
|
|
2595
|
+
columns: E,
|
|
2592
2596
|
frozenColumns: h
|
|
2593
2597
|
};
|
|
2594
2598
|
}
|
|
2595
|
-
case
|
|
2596
|
-
const { fromIndex:
|
|
2599
|
+
case l.MOVE_ROW: {
|
|
2600
|
+
const { fromIndex: s, toIndex: E } = n.payload, h = [...e.data || []], B = h[s], w = String(B[e.uniqueIdField]);
|
|
2597
2601
|
let I = 0;
|
|
2598
2602
|
Object.keys(e.expandedChildRows).forEach((D) => {
|
|
2599
2603
|
D.startsWith(w) && (I += e.expandedChildRows[D].childRowsCount);
|
|
2600
2604
|
});
|
|
2601
|
-
const m = I + 1, G = h.splice(
|
|
2602
|
-
let F =
|
|
2603
|
-
|
|
2605
|
+
const m = I + 1, G = h.splice(s, m);
|
|
2606
|
+
let F = E;
|
|
2607
|
+
s < E && (F -= m), h.splice(F, 0, ...G);
|
|
2604
2608
|
const x = h.map((D) => (delete D._isDraggedRow, delete D._animationState, D));
|
|
2605
2609
|
return {
|
|
2606
2610
|
...e,
|
|
@@ -2609,12 +2613,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2609
2613
|
// Keep filtered data in sync
|
|
2610
2614
|
};
|
|
2611
2615
|
}
|
|
2612
|
-
case
|
|
2613
|
-
const
|
|
2616
|
+
case l.SET_SORT: {
|
|
2617
|
+
const s = ke(e);
|
|
2614
2618
|
(e.isSelectAllRecords || ((o = e.selectedRows) == null ? void 0 : o.length) > 0) && e.removeSelectionOnOperation && qe({ state: e, action: { payload: null } });
|
|
2615
|
-
const
|
|
2619
|
+
const E = {
|
|
2616
2620
|
...e,
|
|
2617
|
-
...
|
|
2621
|
+
...s ? {} : { expandedChildRows: {} },
|
|
2618
2622
|
sortState: n.payload,
|
|
2619
2623
|
...e.removeSelectionOnOperation ? {
|
|
2620
2624
|
selectedRows: [],
|
|
@@ -2633,25 +2637,25 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2633
2637
|
page: 1
|
|
2634
2638
|
}
|
|
2635
2639
|
};
|
|
2636
|
-
return (f = (d = e.callBackRef) == null ? void 0 : d.current) != null && f.onSortChange && e.callBackRef.current.onSortChange(n.payload),
|
|
2640
|
+
return (f = (d = e.callBackRef) == null ? void 0 : d.current) != null && f.onSortChange && e.callBackRef.current.onSortChange(n.payload), E;
|
|
2637
2641
|
}
|
|
2638
|
-
case
|
|
2642
|
+
case l.ENABLE_ROW_SPAN:
|
|
2639
2643
|
return {
|
|
2640
2644
|
...e,
|
|
2641
2645
|
enableRowSpan: n.payload
|
|
2642
2646
|
};
|
|
2643
|
-
case
|
|
2647
|
+
case l.SET_ROW_SPAN_COLUMN:
|
|
2644
2648
|
return {
|
|
2645
2649
|
...e,
|
|
2646
2650
|
rowSpanColumn: n.payload
|
|
2647
2651
|
};
|
|
2648
|
-
case
|
|
2649
|
-
const
|
|
2650
|
-
|
|
2651
|
-
const
|
|
2652
|
+
case l.SET_PAGE: {
|
|
2653
|
+
const s = Ze(e);
|
|
2654
|
+
me(e, s);
|
|
2655
|
+
const E = ke(e);
|
|
2652
2656
|
return {
|
|
2653
2657
|
...e,
|
|
2654
|
-
...
|
|
2658
|
+
...E ? {} : { expandedChildRows: {} },
|
|
2655
2659
|
pagination: {
|
|
2656
2660
|
...e.pagination,
|
|
2657
2661
|
page: n.payload,
|
|
@@ -2659,11 +2663,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2659
2663
|
}
|
|
2660
2664
|
};
|
|
2661
2665
|
}
|
|
2662
|
-
case
|
|
2663
|
-
const
|
|
2666
|
+
case l.SET_PAGE_SIZE: {
|
|
2667
|
+
const s = ke(e), { totalItems: E } = e.pagination;
|
|
2664
2668
|
return {
|
|
2665
2669
|
...e,
|
|
2666
|
-
...
|
|
2670
|
+
...s ? {} : { expandedChildRows: {} },
|
|
2667
2671
|
...e.removeSelectionOnOperation ? {
|
|
2668
2672
|
isSelectAllRecords: !1,
|
|
2669
2673
|
selectedRows: [],
|
|
@@ -2676,19 +2680,19 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2676
2680
|
page: 1,
|
|
2677
2681
|
currentPage: 1,
|
|
2678
2682
|
// Reset to first page when changing page size
|
|
2679
|
-
...e.serverSide ? {} : { totalPages: Math.ceil(
|
|
2683
|
+
...e.serverSide ? {} : { totalPages: Math.ceil(E / n.payload) }
|
|
2680
2684
|
}
|
|
2681
2685
|
};
|
|
2682
2686
|
}
|
|
2683
|
-
case
|
|
2687
|
+
case l.SET_IS_SINGLE_SELECT:
|
|
2684
2688
|
return {
|
|
2685
2689
|
...e,
|
|
2686
2690
|
isSingleSelect: n.payload
|
|
2687
2691
|
};
|
|
2688
|
-
case
|
|
2689
|
-
let
|
|
2692
|
+
case l.SET_SELECTED_ROWS: {
|
|
2693
|
+
let s = e.selectedRows, E = e.unCheckedRows, h = e.selectedRowsObject, B = e.filteredData;
|
|
2690
2694
|
if (Array.isArray(n.payload))
|
|
2691
|
-
|
|
2695
|
+
s = n.payload.map((w) => String(w)), h = n.payload.reduce(
|
|
2692
2696
|
(w, I) => (w[I] = !0, w),
|
|
2693
2697
|
{}
|
|
2694
2698
|
);
|
|
@@ -2711,48 +2715,48 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2711
2715
|
selectUnselectRowId: String(F),
|
|
2712
2716
|
isUnchecked: m
|
|
2713
2717
|
});
|
|
2714
|
-
|
|
2718
|
+
s = x, E = D, h = y, B = z;
|
|
2715
2719
|
}
|
|
2716
2720
|
}
|
|
2717
2721
|
return qe({
|
|
2718
2722
|
state: e,
|
|
2719
|
-
action: { payload:
|
|
2723
|
+
action: { payload: s }
|
|
2720
2724
|
}), {
|
|
2721
2725
|
...e,
|
|
2722
2726
|
filteredData: B,
|
|
2723
|
-
selectedRows:
|
|
2727
|
+
selectedRows: s,
|
|
2724
2728
|
selectedRowsObject: h,
|
|
2725
2729
|
isSelectionChanged: !1,
|
|
2726
|
-
unCheckedRows:
|
|
2730
|
+
unCheckedRows: E
|
|
2727
2731
|
};
|
|
2728
2732
|
}
|
|
2729
|
-
case
|
|
2730
|
-
const { field:
|
|
2733
|
+
case l.SET_COLUMN_FILTER: {
|
|
2734
|
+
const { field: s, rules: E, isBulk: h, filters: B } = n.payload;
|
|
2731
2735
|
return {
|
|
2732
2736
|
...e,
|
|
2733
2737
|
columnFilters: {
|
|
2734
|
-
...h ? B : { ...e.columnFilters, [
|
|
2738
|
+
...h ? B : { ...e.columnFilters, [s]: E }
|
|
2735
2739
|
}
|
|
2736
2740
|
};
|
|
2737
2741
|
}
|
|
2738
|
-
case
|
|
2742
|
+
case l.REMOVE_COLUMN_FILTER: {
|
|
2739
2743
|
if (typeof n.payload == "boolean")
|
|
2740
2744
|
return {
|
|
2741
2745
|
...e,
|
|
2742
2746
|
columnFilters: {}
|
|
2743
2747
|
};
|
|
2744
|
-
const
|
|
2745
|
-
return delete
|
|
2748
|
+
const s = { ...e.columnFilters };
|
|
2749
|
+
return delete s[n.payload], {
|
|
2746
2750
|
...e,
|
|
2747
|
-
columnFilters:
|
|
2751
|
+
columnFilters: s
|
|
2748
2752
|
};
|
|
2749
2753
|
}
|
|
2750
|
-
case
|
|
2751
|
-
const { isChildRowEmpty:
|
|
2754
|
+
case l.APPLY_FILTERS: {
|
|
2755
|
+
const { isChildRowEmpty: s, updatedData: E, filteredData: h } = n.payload;
|
|
2752
2756
|
return {
|
|
2753
2757
|
...e,
|
|
2754
|
-
...
|
|
2755
|
-
data:
|
|
2758
|
+
...s ? {} : { expandedChildRows: {} },
|
|
2759
|
+
data: E,
|
|
2756
2760
|
filteredData: h,
|
|
2757
2761
|
...e.removeSelectionOnOperation ? {
|
|
2758
2762
|
selectedRows: [],
|
|
@@ -2779,12 +2783,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2779
2783
|
}
|
|
2780
2784
|
};
|
|
2781
2785
|
}
|
|
2782
|
-
case
|
|
2783
|
-
const { rowId:
|
|
2786
|
+
case l.TOGGLE_GROUP_EXPANSION: {
|
|
2787
|
+
const { rowId: s, rowIndex: E } = n.payload, h = String(s), B = e.filteredData || [];
|
|
2784
2788
|
let w;
|
|
2785
2789
|
const I = [...B], m = h.split("/").length, G = !e.expandedChildRows[h];
|
|
2786
2790
|
if (G) {
|
|
2787
|
-
const F = B[
|
|
2791
|
+
const F = B[E], x = (F == null ? void 0 : F[e.childKeyField]) || [], D = e.columns.some((H) => H.aggFunc);
|
|
2788
2792
|
let y = x, z = null;
|
|
2789
2793
|
if (D && x.length > 0) {
|
|
2790
2794
|
const { aggreRow: H, aggreChildRows: b } = ye(
|
|
@@ -2792,7 +2796,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2792
2796
|
y,
|
|
2793
2797
|
F,
|
|
2794
2798
|
m,
|
|
2795
|
-
|
|
2799
|
+
E,
|
|
2796
2800
|
h
|
|
2797
2801
|
);
|
|
2798
2802
|
z = H, y = b;
|
|
@@ -2801,17 +2805,17 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2801
2805
|
...H,
|
|
2802
2806
|
__parentPath: H.__parentPath ? `${H.__parentPath}/${h}` : h,
|
|
2803
2807
|
level: m,
|
|
2804
|
-
parentRowIndex:
|
|
2808
|
+
parentRowIndex: E,
|
|
2805
2809
|
parentRowData: F,
|
|
2806
2810
|
groupingLevel: m
|
|
2807
2811
|
}));
|
|
2808
|
-
const
|
|
2812
|
+
const S = x.length + (z ? 1 : 0);
|
|
2809
2813
|
w = {
|
|
2810
2814
|
...e.expandedChildRows,
|
|
2811
2815
|
[h]: {
|
|
2812
2816
|
rowId: h,
|
|
2813
|
-
rowIndex:
|
|
2814
|
-
childRowsCount:
|
|
2817
|
+
rowIndex: E,
|
|
2818
|
+
childRowsCount: S
|
|
2815
2819
|
}
|
|
2816
2820
|
};
|
|
2817
2821
|
const T = Fe(
|
|
@@ -2819,7 +2823,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2819
2823
|
e.rowSpanColumn,
|
|
2820
2824
|
e.api
|
|
2821
2825
|
), X = z ? [...T, z] : T;
|
|
2822
|
-
I.splice(
|
|
2826
|
+
I.splice(E, 1), I.splice(E, 0, ...X);
|
|
2823
2827
|
} else {
|
|
2824
2828
|
w = {
|
|
2825
2829
|
...e.expandedChildRows
|
|
@@ -2827,41 +2831,41 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2827
2831
|
let F = 0;
|
|
2828
2832
|
Object.keys(w).forEach((x) => {
|
|
2829
2833
|
x.startsWith(h) && (F += w[x].childRowsCount, delete w[x]);
|
|
2830
|
-
}), delete I[
|
|
2834
|
+
}), delete I[E].__rowSpanInfo, I.splice(E + 1, F);
|
|
2831
2835
|
}
|
|
2832
|
-
return (
|
|
2836
|
+
return (u = (c = e.callBackRef) == null ? void 0 : c.current) != null && u.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
|
|
2833
2837
|
rowId: h,
|
|
2834
|
-
rowIndex:
|
|
2838
|
+
rowIndex: E,
|
|
2835
2839
|
api: e.api,
|
|
2836
2840
|
isExpanded: G
|
|
2837
|
-
}),
|
|
2841
|
+
}), me(e, I), {
|
|
2838
2842
|
...e,
|
|
2839
2843
|
expandedChildRows: w,
|
|
2840
2844
|
filteredData: I,
|
|
2841
2845
|
data: I
|
|
2842
2846
|
};
|
|
2843
2847
|
}
|
|
2844
|
-
case
|
|
2848
|
+
case l.SET_FIELD_KEYS:
|
|
2845
2849
|
return {
|
|
2846
2850
|
...e,
|
|
2847
2851
|
uniqueIdField: n.payload.uniqueIdField || e.uniqueIdField,
|
|
2848
2852
|
childKeyField: n.payload.childKeyField || e.childKeyField
|
|
2849
2853
|
};
|
|
2850
|
-
case
|
|
2854
|
+
case l.SELECTION_CHANGED_HANDLED:
|
|
2851
2855
|
return e.isSelectionChanged ? {
|
|
2852
2856
|
...e,
|
|
2853
2857
|
isSelectionChanged: !1
|
|
2854
2858
|
} : e;
|
|
2855
|
-
case
|
|
2856
|
-
const { columnId:
|
|
2857
|
-
|
|
2859
|
+
case l.FREEZE_COLUMN: {
|
|
2860
|
+
const { columnId: s } = n.payload, E = e.columns.map((I) => M(I) === s ? { ...I, is_frozen: !0, pinned: "left" } : I), { processedColumns: h } = De(
|
|
2861
|
+
E,
|
|
2858
2862
|
e.expandedColumnGroups || {},
|
|
2859
2863
|
0,
|
|
2860
2864
|
null,
|
|
2861
2865
|
((C = (g = n.meta) == null ? void 0 : g.defaultColDef) == null ? void 0 : C.minWidth) || ((L = e.defaultColDef) == null ? void 0 : L.minWidth) || 150
|
|
2862
2866
|
), { columns: B, frozenData: w } = Be(
|
|
2863
2867
|
h,
|
|
2864
|
-
((
|
|
2868
|
+
((a = n.meta) == null ? void 0 : a.defaultColDef) || e.defaultColDef || void 0
|
|
2865
2869
|
);
|
|
2866
2870
|
return {
|
|
2867
2871
|
...e,
|
|
@@ -2869,39 +2873,39 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2869
2873
|
frozenColumns: w
|
|
2870
2874
|
};
|
|
2871
2875
|
}
|
|
2872
|
-
case
|
|
2873
|
-
const { columnId:
|
|
2876
|
+
case l.UNFREEZE_COLUMN: {
|
|
2877
|
+
const { columnId: s } = n.payload, E = {}, h = {};
|
|
2874
2878
|
if (e.columns.forEach((y) => {
|
|
2875
2879
|
if (y.children && Array.isArray(y.children)) {
|
|
2876
2880
|
const z = M(y);
|
|
2877
|
-
h[z] = [], y.children.forEach((
|
|
2878
|
-
const T = M(
|
|
2879
|
-
|
|
2881
|
+
h[z] = [], y.children.forEach((S) => {
|
|
2882
|
+
const T = M(S);
|
|
2883
|
+
E[T] = z, h[z] ? h[z].push(T) : h[z] = [T];
|
|
2880
2884
|
});
|
|
2881
2885
|
}
|
|
2882
2886
|
}), !e.columns.find(
|
|
2883
|
-
(y) => M(y) ===
|
|
2887
|
+
(y) => M(y) === s
|
|
2884
2888
|
)) return e;
|
|
2885
2889
|
const w = [];
|
|
2886
|
-
let I =
|
|
2887
|
-
for (;
|
|
2888
|
-
const y =
|
|
2890
|
+
let I = s;
|
|
2891
|
+
for (; E[I]; ) {
|
|
2892
|
+
const y = E[I];
|
|
2889
2893
|
w.push(y), I = y;
|
|
2890
2894
|
}
|
|
2891
2895
|
const m = {};
|
|
2892
2896
|
e.columns.forEach((y) => {
|
|
2893
2897
|
const z = M(y);
|
|
2894
|
-
if (y.is_frozen && z !==
|
|
2895
|
-
let
|
|
2896
|
-
for (;
|
|
2897
|
-
const T =
|
|
2898
|
-
m[T] = !0,
|
|
2898
|
+
if (y.is_frozen && z !== s && w.includes(z) === !1) {
|
|
2899
|
+
let S = z;
|
|
2900
|
+
for (; E[S]; ) {
|
|
2901
|
+
const T = E[S];
|
|
2902
|
+
m[T] = !0, S = T;
|
|
2899
2903
|
}
|
|
2900
2904
|
}
|
|
2901
2905
|
});
|
|
2902
2906
|
const G = e.columns.map((y) => {
|
|
2903
2907
|
const z = M(y);
|
|
2904
|
-
return z ===
|
|
2908
|
+
return z === s ? { ...y, is_frozen: !1, pinned: null } : w.includes(z) ? m[z] ? y : { ...y, is_frozen: !1, pinned: null } : y;
|
|
2905
2909
|
}), { processedColumns: F } = De(
|
|
2906
2910
|
G,
|
|
2907
2911
|
e.expandedColumnGroups || {},
|
|
@@ -2910,7 +2914,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2910
2914
|
((R = (p = n.meta) == null ? void 0 : p.defaultColDef) == null ? void 0 : R.minWidth) || ((P = e.defaultColDef) == null ? void 0 : P.minWidth) || 150
|
|
2911
2915
|
), { columns: x, frozenData: D } = Be(
|
|
2912
2916
|
F,
|
|
2913
|
-
((
|
|
2917
|
+
((O = n.meta) == null ? void 0 : O.defaultColDef) || e.defaultColDef || void 0
|
|
2914
2918
|
);
|
|
2915
2919
|
return {
|
|
2916
2920
|
...e,
|
|
@@ -2918,27 +2922,27 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2918
2922
|
frozenColumns: D
|
|
2919
2923
|
};
|
|
2920
2924
|
}
|
|
2921
|
-
case
|
|
2925
|
+
case l.SET_COLUMN_WIDTH: {
|
|
2922
2926
|
const {
|
|
2923
|
-
field:
|
|
2924
|
-
width:
|
|
2927
|
+
field: s,
|
|
2928
|
+
width: E,
|
|
2925
2929
|
isAutoWidth: h
|
|
2926
2930
|
} = n.payload, B = (G) => {
|
|
2927
|
-
if (M(G) ===
|
|
2931
|
+
if (M(G) === s)
|
|
2928
2932
|
return {
|
|
2929
2933
|
...G,
|
|
2930
|
-
width:
|
|
2934
|
+
width: E,
|
|
2931
2935
|
isAutoWidth: h !== void 0 ? h : G.isAutoWidth
|
|
2932
2936
|
};
|
|
2933
2937
|
if (G.children && G.children.length > 0) {
|
|
2934
2938
|
const x = G.children.some(
|
|
2935
|
-
(y) => M(y) ===
|
|
2939
|
+
(y) => M(y) === s || y.path && y.path.includes(s)
|
|
2936
2940
|
), D = G.children.map(
|
|
2937
2941
|
B
|
|
2938
2942
|
);
|
|
2939
2943
|
if (x) {
|
|
2940
2944
|
const y = D.reduce(
|
|
2941
|
-
(z,
|
|
2945
|
+
(z, S) => S.hidden || S.is_hidden ? z : z + (S.width || 100),
|
|
2942
2946
|
0
|
|
2943
2947
|
);
|
|
2944
2948
|
return {
|
|
@@ -2966,17 +2970,17 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2966
2970
|
frozenColumns: m
|
|
2967
2971
|
};
|
|
2968
2972
|
}
|
|
2969
|
-
case
|
|
2970
|
-
const { widths:
|
|
2973
|
+
case l.SET_COLUMNS_WIDTH: {
|
|
2974
|
+
const { widths: s, isAutoWidth: E } = n.payload, h = e.columns.map((w) => {
|
|
2971
2975
|
const I = M(w);
|
|
2972
|
-
return
|
|
2976
|
+
return s[I] !== void 0 ? {
|
|
2973
2977
|
...w,
|
|
2974
|
-
width:
|
|
2975
|
-
isAutoWidth:
|
|
2978
|
+
width: s[I],
|
|
2979
|
+
isAutoWidth: E !== void 0 ? E : w.isAutoWidth
|
|
2976
2980
|
} : w;
|
|
2977
2981
|
}), B = { ...e.frozenColumns };
|
|
2978
2982
|
if (B.indexes.length > 0) {
|
|
2979
|
-
let w =
|
|
2983
|
+
let w = sn(
|
|
2980
2984
|
!0,
|
|
2981
2985
|
e.disableSelectAllRecords,
|
|
2982
2986
|
e.isSingleSelect
|
|
@@ -2997,7 +3001,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2997
3001
|
frozenColumns: B
|
|
2998
3002
|
};
|
|
2999
3003
|
}
|
|
3000
|
-
case
|
|
3004
|
+
case l.SHOW_NOTIFICATION:
|
|
3001
3005
|
return {
|
|
3002
3006
|
...e,
|
|
3003
3007
|
notification: {
|
|
@@ -3007,7 +3011,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3007
3011
|
timeout: n.payload.timeout || 3e3
|
|
3008
3012
|
}
|
|
3009
3013
|
};
|
|
3010
|
-
case
|
|
3014
|
+
case l.HIDE_NOTIFICATION:
|
|
3011
3015
|
return {
|
|
3012
3016
|
...e,
|
|
3013
3017
|
notification: {
|
|
@@ -3018,25 +3022,25 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3018
3022
|
timeout: 0
|
|
3019
3023
|
}
|
|
3020
3024
|
};
|
|
3021
|
-
case
|
|
3022
|
-
const { columns:
|
|
3025
|
+
case l.TOGGLE_COLUMN_VISIBILITY: {
|
|
3026
|
+
const { columns: s, frozenData: E } = Be(
|
|
3023
3027
|
n.payload,
|
|
3024
3028
|
e.defaultColDef || { minWidth: 150 }
|
|
3025
3029
|
);
|
|
3026
3030
|
return {
|
|
3027
3031
|
...e,
|
|
3028
|
-
columns:
|
|
3029
|
-
frozenColumns:
|
|
3032
|
+
columns: s,
|
|
3033
|
+
frozenColumns: E
|
|
3030
3034
|
};
|
|
3031
3035
|
}
|
|
3032
|
-
case
|
|
3036
|
+
case l.AUTOSIZE_COLUMNS_REQUESTED:
|
|
3033
3037
|
return {
|
|
3034
3038
|
...e,
|
|
3035
3039
|
columnsToAutosize: n.payload.columnsToAutosize
|
|
3036
3040
|
};
|
|
3037
|
-
case
|
|
3038
|
-
const { field:
|
|
3039
|
-
(b) => M(b) ===
|
|
3041
|
+
case l.PIN_COLUMN_RIGHT: {
|
|
3042
|
+
const { field: s } = n.payload, E = window.innerWidth * 0.3, h = e.columns.find(
|
|
3043
|
+
(b) => M(b) === s
|
|
3040
3044
|
);
|
|
3041
3045
|
if (!h)
|
|
3042
3046
|
return e;
|
|
@@ -3049,21 +3053,21 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3049
3053
|
},
|
|
3050
3054
|
0
|
|
3051
3055
|
), I = h.width || ((U = e.defaultColDef) == null ? void 0 : U.minWidth) || 150;
|
|
3052
|
-
if (w + I >
|
|
3056
|
+
if (w + I > E)
|
|
3053
3057
|
return {
|
|
3054
3058
|
...e,
|
|
3055
3059
|
notification: {
|
|
3056
3060
|
show: !0,
|
|
3057
|
-
message: `Cannot pin column "${(h == null ? void 0 : h.headerName) ||
|
|
3061
|
+
message: `Cannot pin column "${(h == null ? void 0 : h.headerName) || s}" to the right. It would exceed the maximum allowed width (30% of viewport).`,
|
|
3058
3062
|
type: "warning",
|
|
3059
3063
|
timeout: 5e3
|
|
3060
3064
|
}
|
|
3061
3065
|
};
|
|
3062
3066
|
const { parentToChildrenMap: F, childToParentMap: x } = tn(
|
|
3063
3067
|
e.columns
|
|
3064
|
-
), D = x[
|
|
3068
|
+
), D = x[s], y = !!D, z = y ? fn(s, x) : [], S = y ? F[D] || [] : [], T = e.columns.map((b) => {
|
|
3065
3069
|
const re = M(b);
|
|
3066
|
-
return re ===
|
|
3070
|
+
return re === s ? {
|
|
3067
3071
|
...b,
|
|
3068
3072
|
pinned: "right",
|
|
3069
3073
|
is_frozen: !1
|
|
@@ -3076,7 +3080,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3076
3080
|
...b,
|
|
3077
3081
|
pinned: "right",
|
|
3078
3082
|
is_frozen: !1
|
|
3079
|
-
} :
|
|
3083
|
+
} : S.includes(re) ? {
|
|
3080
3084
|
...b,
|
|
3081
3085
|
pinned: "right",
|
|
3082
3086
|
is_frozen: !1
|
|
@@ -3091,18 +3095,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3091
3095
|
frozenColumns: H
|
|
3092
3096
|
};
|
|
3093
3097
|
}
|
|
3094
|
-
case
|
|
3095
|
-
const { field:
|
|
3098
|
+
case l.UNPIN_COLUMN_RIGHT: {
|
|
3099
|
+
const { field: s } = n.payload, { parentToChildrenMap: E, childToParentMap: h } = tn(
|
|
3096
3100
|
e.columns
|
|
3097
|
-
), B = h[
|
|
3101
|
+
), B = h[s], w = !!B, I = w ? fn(s, h) : [], m = w ? E[B] || [] : [], G = e.columns.map((D) => {
|
|
3098
3102
|
const y = M(D);
|
|
3099
|
-
return y ===
|
|
3103
|
+
return y === s ? {
|
|
3100
3104
|
...D,
|
|
3101
3105
|
pinned: void 0
|
|
3102
3106
|
} : I.includes(y) ? {
|
|
3103
3107
|
...D,
|
|
3104
3108
|
pinned: void 0
|
|
3105
|
-
} : I.some((
|
|
3109
|
+
} : I.some((S) => (E[S] || []).includes(y)) ? {
|
|
3106
3110
|
...D,
|
|
3107
3111
|
pinned: void 0
|
|
3108
3112
|
} : m.includes(y) ? {
|
|
@@ -3119,16 +3123,16 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3119
3123
|
frozenColumns: x
|
|
3120
3124
|
};
|
|
3121
3125
|
}
|
|
3122
|
-
case
|
|
3126
|
+
case l.TOGGLE_FREEZE_COLUMN: {
|
|
3123
3127
|
const {
|
|
3124
|
-
field:
|
|
3125
|
-
column:
|
|
3128
|
+
field: s,
|
|
3129
|
+
column: E,
|
|
3126
3130
|
frozen: h = !1,
|
|
3127
3131
|
options: B = {}
|
|
3128
3132
|
} = n.payload, w = ht({
|
|
3129
3133
|
state: e,
|
|
3130
|
-
freezeColumnField:
|
|
3131
|
-
column:
|
|
3134
|
+
freezeColumnField: s,
|
|
3135
|
+
column: E,
|
|
3132
3136
|
frozen: h,
|
|
3133
3137
|
options: B
|
|
3134
3138
|
});
|
|
@@ -3137,12 +3141,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3137
3141
|
...w
|
|
3138
3142
|
};
|
|
3139
3143
|
}
|
|
3140
|
-
case
|
|
3141
|
-
const { sourceColumn:
|
|
3144
|
+
case l.REORDER_COLUMNS: {
|
|
3145
|
+
const { sourceColumn: s, targetColumn: E } = n.payload, h = e.frozenColumns.totalWidth, B = ((v = (_ = e.tableInstance) == null ? void 0 : _.current) == null ? void 0 : v.clientWidth) || 0, w = [...e.columns], I = s.children && s.children.length > 0, m = (T) => {
|
|
3142
3146
|
var X;
|
|
3143
3147
|
return T.children && T.children.length > 0 ? T.children.reduce((H, b) => H + m(b), 0) : T.width || ((X = e.defaultColDef) == null ? void 0 : X.minWidth) || 150;
|
|
3144
|
-
}, G = I ? m(
|
|
3145
|
-
if (
|
|
3148
|
+
}, G = I ? m(s) : s.width || ((K = e.defaultColDef) == null ? void 0 : K.minWidth) || 150;
|
|
3149
|
+
if (E.is_frozen && !s.is_frozen && G && h + G > B * 0.7)
|
|
3146
3150
|
return {
|
|
3147
3151
|
...e,
|
|
3148
3152
|
notification: {
|
|
@@ -3153,15 +3157,15 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3153
3157
|
timeout: 3e3
|
|
3154
3158
|
}
|
|
3155
3159
|
};
|
|
3156
|
-
if (!
|
|
3160
|
+
if (!s || !E)
|
|
3157
3161
|
return console.error("Invalid source or target column for reordering", {
|
|
3158
|
-
sourceColumn:
|
|
3159
|
-
targetColumn:
|
|
3162
|
+
sourceColumn: s,
|
|
3163
|
+
targetColumn: E
|
|
3160
3164
|
}), e;
|
|
3161
3165
|
let F = [...w];
|
|
3162
3166
|
F = $n(
|
|
3163
|
-
|
|
3164
|
-
|
|
3167
|
+
s,
|
|
3168
|
+
E,
|
|
3165
3169
|
F
|
|
3166
3170
|
), F.forEach((T, X) => {
|
|
3167
3171
|
T.order_of_display = X + 1;
|
|
@@ -3171,7 +3175,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3171
3175
|
e.expandedColumnGroups || {},
|
|
3172
3176
|
0,
|
|
3173
3177
|
null,
|
|
3174
|
-
((
|
|
3178
|
+
((j = e.defaultColDef) == null ? void 0 : j.minWidth) || 150
|
|
3175
3179
|
), D = { ...e.expandedColumnGroups };
|
|
3176
3180
|
x.forEach((T) => {
|
|
3177
3181
|
D[T] !== !0 && (D[T] = !0);
|
|
@@ -3182,77 +3186,77 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3182
3186
|
0,
|
|
3183
3187
|
null,
|
|
3184
3188
|
((q = e.defaultColDef) == null ? void 0 : q.minWidth) || 150
|
|
3185
|
-
), { columns: z, frozenData:
|
|
3189
|
+
), { columns: z, frozenData: S } = Be(
|
|
3186
3190
|
y,
|
|
3187
3191
|
((ee = n.meta) == null ? void 0 : ee.defaultColDef) || e.defaultColDef || void 0
|
|
3188
3192
|
);
|
|
3189
3193
|
return {
|
|
3190
3194
|
...e,
|
|
3191
3195
|
columns: z,
|
|
3192
|
-
frozenColumns:
|
|
3196
|
+
frozenColumns: S,
|
|
3193
3197
|
expandedColumnGroups: D
|
|
3194
3198
|
};
|
|
3195
3199
|
}
|
|
3196
|
-
case
|
|
3200
|
+
case l.SET_PREV_ACTION:
|
|
3197
3201
|
return n.payload === e.prevAction ? e : {
|
|
3198
3202
|
...e,
|
|
3199
3203
|
prevAction: n.payload
|
|
3200
3204
|
};
|
|
3201
|
-
case
|
|
3205
|
+
case l.SET_CHECK_CONFIGURATION:
|
|
3202
3206
|
return JSON.stringify(n.payload) === JSON.stringify(e.checkConfiguration) ? e : {
|
|
3203
3207
|
...e,
|
|
3204
3208
|
checkConfiguration: n.payload
|
|
3205
3209
|
};
|
|
3206
|
-
case
|
|
3207
|
-
const
|
|
3208
|
-
let
|
|
3209
|
-
e.serverSide ?
|
|
3210
|
-
let h =
|
|
3210
|
+
case l.SET_IS_SELECT_ALL_RECORDS: {
|
|
3211
|
+
const s = (ne = e.api) == null ? void 0 : ne.getInfiniteCache();
|
|
3212
|
+
let E = [];
|
|
3213
|
+
e.serverSide ? E = (s == null ? void 0 : s.getAllCachedData()) || e.data || [] : E = (s == null ? void 0 : s.params.datasource.getWholeData()) || e.data || [];
|
|
3214
|
+
let h = E, B = !1;
|
|
3211
3215
|
if (!e.serverSide && e.columnFilters && Object.keys(e.columnFilters).length > 0) {
|
|
3212
|
-
const
|
|
3216
|
+
const S = Un(
|
|
3213
3217
|
e.columns
|
|
3214
3218
|
);
|
|
3215
3219
|
h = Ct(
|
|
3216
|
-
|
|
3220
|
+
E,
|
|
3217
3221
|
e.columnFilters,
|
|
3218
|
-
|
|
3222
|
+
S
|
|
3219
3223
|
), B = !0;
|
|
3220
3224
|
}
|
|
3221
3225
|
const w = {};
|
|
3222
|
-
for (let
|
|
3223
|
-
const T = h[
|
|
3226
|
+
for (let S = 0; S < h.length; S++) {
|
|
3227
|
+
const T = h[S], X = String(T[e.uniqueIdField]);
|
|
3224
3228
|
T != null && T.__parentPath || T != null && T.isChildGroup || (w[X] = !0);
|
|
3225
3229
|
}
|
|
3226
3230
|
let I = [], m = {}, G = {};
|
|
3227
3231
|
if (n.payload) {
|
|
3228
3232
|
I = [...e.selectedRows], m = { ...e.selectedRowsObject }, G = { ...e.unCheckedRows };
|
|
3229
|
-
for (const
|
|
3230
|
-
if (!m[
|
|
3233
|
+
for (const S in w) {
|
|
3234
|
+
if (!m[S]) {
|
|
3231
3235
|
const T = h.findIndex(
|
|
3232
|
-
(X) => String(X[e.uniqueIdField]) ===
|
|
3236
|
+
(X) => String(X[e.uniqueIdField]) === S
|
|
3233
3237
|
);
|
|
3234
|
-
|
|
3238
|
+
_e(
|
|
3235
3239
|
e.rowSelectionRef,
|
|
3236
3240
|
T,
|
|
3237
3241
|
h[T],
|
|
3238
3242
|
e.uniqueIdField
|
|
3239
|
-
) && (I.push(
|
|
3243
|
+
) && (I.push(S), m[S] = !0);
|
|
3240
3244
|
}
|
|
3241
|
-
delete G[
|
|
3245
|
+
delete G[S];
|
|
3242
3246
|
}
|
|
3243
3247
|
} else if (!n.payload && Object.keys(e.columnFilters).length === 0)
|
|
3244
|
-
I = [], m = {}, G = {}, h = h.map((
|
|
3248
|
+
I = [], m = {}, G = {}, h = h.map((S) => S.is_selected ? { ...S, is_selected: !1 } : S);
|
|
3245
3249
|
else {
|
|
3246
3250
|
G = { ...e.unCheckedRows };
|
|
3247
|
-
for (let
|
|
3248
|
-
const T = e.selectedRows[
|
|
3251
|
+
for (let S = 0; S < e.selectedRows.length; S++) {
|
|
3252
|
+
const T = e.selectedRows[S];
|
|
3249
3253
|
if (w[T])
|
|
3250
3254
|
G[T] = !0;
|
|
3251
3255
|
else {
|
|
3252
3256
|
const X = h.findIndex(
|
|
3253
3257
|
(H) => String(H[e.uniqueIdField]) === T
|
|
3254
3258
|
);
|
|
3255
|
-
|
|
3259
|
+
_e(
|
|
3256
3260
|
e.rowSelectionRef,
|
|
3257
3261
|
X,
|
|
3258
3262
|
h[X],
|
|
@@ -3260,11 +3264,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3260
3264
|
) && (I.push(T), m[T] = !0);
|
|
3261
3265
|
}
|
|
3262
3266
|
}
|
|
3263
|
-
h = h.map((
|
|
3267
|
+
h = h.map((S) => S.is_selected ? { ...S, is_selected: !1 } : S);
|
|
3264
3268
|
}
|
|
3265
3269
|
let F = !0;
|
|
3266
|
-
for (const
|
|
3267
|
-
if (!m[
|
|
3270
|
+
for (const S in w)
|
|
3271
|
+
if (!m[S]) {
|
|
3268
3272
|
F = !1;
|
|
3269
3273
|
break;
|
|
3270
3274
|
}
|
|
@@ -3277,7 +3281,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3277
3281
|
return h = h.slice(
|
|
3278
3282
|
(z - 1) * y,
|
|
3279
3283
|
z * y
|
|
3280
|
-
), h.length || (h = e.filteredData.map((
|
|
3284
|
+
), h.length || (h = e.filteredData.map((S) => S.is_selected ? { ...S, is_selected: !1 } : S)), {
|
|
3281
3285
|
...e,
|
|
3282
3286
|
filteredData: h,
|
|
3283
3287
|
isSelectAllRecords: x,
|
|
@@ -3285,26 +3289,27 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3285
3289
|
selectedRowsObject: m,
|
|
3286
3290
|
unCheckedRows: D,
|
|
3287
3291
|
isSelectionChanged: !1,
|
|
3288
|
-
checkConfiguration: x ? e.checkConfiguration : []
|
|
3292
|
+
checkConfiguration: x ? e.checkConfiguration : [],
|
|
3293
|
+
prevAction: x ? e.prevAction : ""
|
|
3289
3294
|
};
|
|
3290
3295
|
}
|
|
3291
|
-
case
|
|
3292
|
-
const { prevAction:
|
|
3293
|
-
return
|
|
3296
|
+
case l.BATCH_UPDATE: {
|
|
3297
|
+
const { prevAction: s, checkConfiguration: E, isSelectAllRecords: h } = n.payload, B = {};
|
|
3298
|
+
return s !== void 0 && s !== e.prevAction && (B.prevAction = s), E !== void 0 && JSON.stringify(E) !== JSON.stringify(e.checkConfiguration) && (B.checkConfiguration = E), h !== void 0 && h !== e.isSelectAllRecords && (B.isSelectAllRecords = h), Object.keys(B).length === 0 ? e : {
|
|
3294
3299
|
...e,
|
|
3295
3300
|
...B
|
|
3296
3301
|
};
|
|
3297
3302
|
}
|
|
3298
3303
|
// Master-Detail functionality
|
|
3299
|
-
case
|
|
3304
|
+
case l.TOGGLE_MASTER_DETAIL: {
|
|
3300
3305
|
const {
|
|
3301
|
-
rowId:
|
|
3302
|
-
rowData:
|
|
3306
|
+
rowId: s,
|
|
3307
|
+
rowData: E,
|
|
3303
3308
|
rowIndex: h,
|
|
3304
3309
|
currentRowStyles: B
|
|
3305
3310
|
} = n.payload, w = ((Z = e.masterDetail) == null ? void 0 : Z.expandedRows) || [];
|
|
3306
3311
|
let I, m = null, G = !1;
|
|
3307
|
-
return w.includes(
|
|
3312
|
+
return w.includes(s) ? (I = [], G = !0) : (I = [s], m = E), {
|
|
3308
3313
|
...e,
|
|
3309
3314
|
masterDetail: {
|
|
3310
3315
|
...e.masterDetail,
|
|
@@ -3315,7 +3320,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3315
3320
|
}
|
|
3316
3321
|
};
|
|
3317
3322
|
}
|
|
3318
|
-
case
|
|
3323
|
+
case l.SET_DETAIL_RENDERER:
|
|
3319
3324
|
return {
|
|
3320
3325
|
...e,
|
|
3321
3326
|
masterDetail: {
|
|
@@ -3323,7 +3328,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3323
3328
|
detailRenderer: n.payload
|
|
3324
3329
|
}
|
|
3325
3330
|
};
|
|
3326
|
-
case
|
|
3331
|
+
case l.SET_MASTER_DETAIL_CONFIG:
|
|
3327
3332
|
return {
|
|
3328
3333
|
...e,
|
|
3329
3334
|
masterDetail: {
|
|
@@ -3331,53 +3336,53 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3331
3336
|
...n.payload
|
|
3332
3337
|
}
|
|
3333
3338
|
};
|
|
3334
|
-
case
|
|
3335
|
-
const { eventType:
|
|
3336
|
-
return B[
|
|
3337
|
-
(I) => I.fn ===
|
|
3338
|
-
) || B[
|
|
3339
|
-
fn:
|
|
3339
|
+
case l.ADD_EVENT_LISTENER: {
|
|
3340
|
+
const { eventType: s, listener: E, once: h = !1 } = n.payload, B = { ...e.eventListeners };
|
|
3341
|
+
return B[s] || (B[s] = []), B[s].some(
|
|
3342
|
+
(I) => I.fn === E
|
|
3343
|
+
) || B[s].push({
|
|
3344
|
+
fn: E,
|
|
3340
3345
|
once: h
|
|
3341
3346
|
}), {
|
|
3342
3347
|
...e,
|
|
3343
3348
|
eventListeners: B
|
|
3344
3349
|
};
|
|
3345
3350
|
}
|
|
3346
|
-
case
|
|
3347
|
-
const { eventType:
|
|
3348
|
-
if (!e.eventListeners[
|
|
3351
|
+
case l.REMOVE_EVENT_LISTENER: {
|
|
3352
|
+
const { eventType: s, listener: E } = n.payload;
|
|
3353
|
+
if (!e.eventListeners[s])
|
|
3349
3354
|
return e;
|
|
3350
|
-
const h = e.eventListeners[
|
|
3351
|
-
(w) => w.fn !==
|
|
3355
|
+
const h = e.eventListeners[s].filter(
|
|
3356
|
+
(w) => w.fn !== E
|
|
3352
3357
|
), B = { ...e.eventListeners };
|
|
3353
|
-
return h.length === 0 ? delete B[
|
|
3358
|
+
return h.length === 0 ? delete B[s] : B[s] = h, {
|
|
3354
3359
|
...e,
|
|
3355
3360
|
eventListeners: B
|
|
3356
3361
|
};
|
|
3357
3362
|
}
|
|
3358
3363
|
// Column grouping functionality
|
|
3359
|
-
case
|
|
3360
|
-
const { field:
|
|
3364
|
+
case l.TOGGLE_COLUMN_GROUP: {
|
|
3365
|
+
const { field: s } = n.payload, E = e.expandedColumnGroups || {}, h = E[s] === !0;
|
|
3361
3366
|
if (!h) {
|
|
3362
3367
|
const F = (D, y) => {
|
|
3363
3368
|
for (const z of D) {
|
|
3364
3369
|
if (M(z) === y)
|
|
3365
3370
|
return z;
|
|
3366
3371
|
if (z.children && z.children.length > 0) {
|
|
3367
|
-
const
|
|
3368
|
-
if (
|
|
3372
|
+
const S = F(z.children, y);
|
|
3373
|
+
if (S) return S;
|
|
3369
3374
|
}
|
|
3370
3375
|
}
|
|
3371
3376
|
return null;
|
|
3372
3377
|
}, x = F(
|
|
3373
3378
|
e.columns,
|
|
3374
|
-
|
|
3379
|
+
s
|
|
3375
3380
|
);
|
|
3376
3381
|
if (x && x.is_frozen) {
|
|
3377
|
-
const D = ((
|
|
3382
|
+
const D = ((ae = (te = e.tableInstance) == null ? void 0 : te.current) == null ? void 0 : ae.clientWidth) || 0, y = ((se = e.frozenColumns) == null ? void 0 : se.totalWidth) || 0, z = (b) => {
|
|
3378
3383
|
var re;
|
|
3379
3384
|
return !b.children || b.children.length === 0 ? b.width || ((re = e.defaultColDef) == null ? void 0 : re.minWidth) || 150 : b.children.reduce((Ce, we) => Ce + z(we), 0);
|
|
3380
|
-
},
|
|
3385
|
+
}, S = x.width || ((Ee = e.defaultColDef) == null ? void 0 : Ee.minWidth) || 150, X = z(x) - S, H = y + X;
|
|
3381
3386
|
if (D > 0 && H > D * 0.7)
|
|
3382
3387
|
return {
|
|
3383
3388
|
...e,
|
|
@@ -3391,8 +3396,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3391
3396
|
}
|
|
3392
3397
|
}
|
|
3393
3398
|
const w = {
|
|
3394
|
-
...
|
|
3395
|
-
[
|
|
3399
|
+
...E,
|
|
3400
|
+
[s]: !h
|
|
3396
3401
|
}, { processedColumns: I } = De(
|
|
3397
3402
|
e.columns,
|
|
3398
3403
|
w,
|
|
@@ -3410,38 +3415,38 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3410
3415
|
frozenColumns: G
|
|
3411
3416
|
};
|
|
3412
3417
|
}
|
|
3413
|
-
case
|
|
3414
|
-
const { processedColumns:
|
|
3418
|
+
case l.SET_EXPANDED_COLUMN_GROUPS: {
|
|
3419
|
+
const { processedColumns: s } = De(
|
|
3415
3420
|
e.columns,
|
|
3416
3421
|
n.payload,
|
|
3417
3422
|
0,
|
|
3418
3423
|
null,
|
|
3419
3424
|
((he = e.defaultColDef) == null ? void 0 : he.minWidth) || 150
|
|
3420
|
-
), { columns:
|
|
3421
|
-
|
|
3425
|
+
), { columns: E, frozenData: h } = Be(
|
|
3426
|
+
s,
|
|
3422
3427
|
e.defaultColDef || { minWidth: 150 }
|
|
3423
3428
|
);
|
|
3424
3429
|
return {
|
|
3425
3430
|
...e,
|
|
3426
3431
|
expandedColumnGroups: n.payload,
|
|
3427
|
-
columns:
|
|
3432
|
+
columns: E,
|
|
3428
3433
|
frozenColumns: h
|
|
3429
3434
|
};
|
|
3430
3435
|
}
|
|
3431
3436
|
// Row drag preview functionality with swap animation
|
|
3432
|
-
case
|
|
3433
|
-
const { fromIndex:
|
|
3437
|
+
case l.PREVIEW_ROW_MOVE: {
|
|
3438
|
+
const { fromIndex: s, toIndex: E, fromRowData: h, isDraggingDownward: B } = n.payload;
|
|
3434
3439
|
if (e.previewMode) {
|
|
3435
3440
|
const w = e.originalFromIndex, I = [...e.originalData ?? []], m = e.hasExpandedChildren;
|
|
3436
3441
|
I.forEach((x, D) => {
|
|
3437
|
-
D === w ? (x._animationState = "moving", x._isDraggedRow = !0, x._hasExpandedChildren = m) : (D >= Math.min(w ?? 0,
|
|
3442
|
+
D === w ? (x._animationState = "moving", x._isDraggedRow = !0, x._hasExpandedChildren = m) : (D >= Math.min(w ?? 0, E) && D <= Math.max(w ?? 0, E) || D >= Math.min(w ?? 0, e.lastToIndex ?? 0) && D <= Math.max(w ?? 0, e.lastToIndex ?? 0)) && (x._animationState = "affected");
|
|
3438
3443
|
});
|
|
3439
3444
|
const [G] = I.splice(w ?? 0, 1);
|
|
3440
|
-
let F =
|
|
3445
|
+
let F = E;
|
|
3441
3446
|
if (m && B) {
|
|
3442
3447
|
const x = h == null ? void 0 : h[e.childKeyField], D = (x == null ? void 0 : x.length) || 0;
|
|
3443
3448
|
D > 0 && e.expandedChildRows[h == null ? void 0 : h[e.uniqueIdField]] && (F = Math.max(
|
|
3444
|
-
|
|
3449
|
+
E - D,
|
|
3445
3450
|
(w ?? 0) + 1
|
|
3446
3451
|
));
|
|
3447
3452
|
}
|
|
@@ -3463,20 +3468,20 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3463
3468
|
} else {
|
|
3464
3469
|
const w = [...e.filteredData || []], I = [...w], m = h == null ? void 0 : h[e.childKeyField], G = h && m && Array.isArray(m) && m.length > 0;
|
|
3465
3470
|
I.forEach((D, y) => {
|
|
3466
|
-
y ===
|
|
3471
|
+
y === s ? (D._animationState = "moving", D._isDraggedRow = !0, D._hasExpandedChildren = G) : y >= Math.min(s, E) && y <= Math.max(s, E) && (D._animationState = "affected");
|
|
3467
3472
|
});
|
|
3468
|
-
const [F] = I.splice(
|
|
3469
|
-
let x =
|
|
3473
|
+
const [F] = I.splice(s, 1);
|
|
3474
|
+
let x = E;
|
|
3470
3475
|
if (G && B) {
|
|
3471
3476
|
const D = (m == null ? void 0 : m.length) || 0;
|
|
3472
|
-
D > 0 && (x = Math.max(
|
|
3477
|
+
D > 0 && (x = Math.max(E - D, s + 1));
|
|
3473
3478
|
}
|
|
3474
3479
|
return I.splice(x, 0, F), {
|
|
3475
3480
|
...e,
|
|
3476
3481
|
originalData: w,
|
|
3477
3482
|
filteredData: I,
|
|
3478
3483
|
previewMode: !0,
|
|
3479
|
-
originalFromIndex:
|
|
3484
|
+
originalFromIndex: s,
|
|
3480
3485
|
// Store the original fromIndex
|
|
3481
3486
|
lastToIndex: x,
|
|
3482
3487
|
// Track the last position for animation
|
|
@@ -3487,13 +3492,13 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3487
3492
|
};
|
|
3488
3493
|
}
|
|
3489
3494
|
}
|
|
3490
|
-
case
|
|
3495
|
+
case l.RESET_ROW_PREVIEW: {
|
|
3491
3496
|
if (!e.previewMode)
|
|
3492
3497
|
return e;
|
|
3493
|
-
const
|
|
3498
|
+
const s = (e.originalData || []).map((E) => (delete E._isDraggedRow, delete E._animationState, E));
|
|
3494
3499
|
return {
|
|
3495
3500
|
...e,
|
|
3496
|
-
filteredData:
|
|
3501
|
+
filteredData: s,
|
|
3497
3502
|
originalData: null,
|
|
3498
3503
|
previewMode: !1,
|
|
3499
3504
|
originalFromIndex: null,
|
|
@@ -3503,54 +3508,54 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3503
3508
|
};
|
|
3504
3509
|
}
|
|
3505
3510
|
// Row pinning functionality
|
|
3506
|
-
case
|
|
3511
|
+
case l.SET_PINNED_TOP_ROWS:
|
|
3507
3512
|
return {
|
|
3508
3513
|
...e,
|
|
3509
3514
|
pinnedTopRows: n.payload
|
|
3510
3515
|
};
|
|
3511
|
-
case
|
|
3516
|
+
case l.SET_PINNED_BOTTOM_ROWS:
|
|
3512
3517
|
return {
|
|
3513
3518
|
...e,
|
|
3514
3519
|
pinnedBottomRows: n.payload
|
|
3515
3520
|
};
|
|
3516
3521
|
// Row group functionality
|
|
3517
|
-
case
|
|
3522
|
+
case l.TOGGLE_ROW_GROUP: {
|
|
3518
3523
|
const {
|
|
3519
|
-
groupId:
|
|
3520
|
-
rowIndex:
|
|
3524
|
+
groupId: s,
|
|
3525
|
+
rowIndex: E,
|
|
3521
3526
|
extra: { fieldName: h, value: B }
|
|
3522
|
-
} = n.payload, { expandedGroups: w, loadedData: I } = e.rowGroupState, m = !((ie = w[
|
|
3527
|
+
} = n.payload, { expandedGroups: w, loadedData: I } = e.rowGroupState, m = !((ie = w[s]) != null && ie[s]), G = [...e.filteredData ?? []], F = I[s] || [], x = { ...w };
|
|
3523
3528
|
let D = 0;
|
|
3524
3529
|
if (m)
|
|
3525
|
-
F.length && (G.splice(
|
|
3530
|
+
F.length && (G.splice(E + 1, 0, ...F), D = F.length);
|
|
3526
3531
|
else {
|
|
3527
|
-
let
|
|
3532
|
+
let S = -1;
|
|
3528
3533
|
for (let X = 0; X < G.length; X++)
|
|
3529
|
-
if ((G[X].id || G[X][e.uniqueIdField]) ==
|
|
3530
|
-
|
|
3534
|
+
if ((G[X].id || G[X][e.uniqueIdField]) == s) {
|
|
3535
|
+
S = X;
|
|
3531
3536
|
break;
|
|
3532
3537
|
}
|
|
3533
|
-
|
|
3538
|
+
S === -1 && (S = ((ce = w[s]) == null ? void 0 : ce.rowIndex) || E);
|
|
3534
3539
|
let T = 0;
|
|
3535
3540
|
Object.keys(w).forEach((X) => {
|
|
3536
|
-
X.startsWith(
|
|
3537
|
-
}), G.splice(
|
|
3541
|
+
X.startsWith(s) && (delete x[X], T += w[X].count);
|
|
3542
|
+
}), G.splice(S + 1, T);
|
|
3538
3543
|
}
|
|
3539
3544
|
const y = { ...I };
|
|
3540
3545
|
let z = { ...e.rowGroupState.pagination };
|
|
3541
3546
|
return e.purgeClosedRowNodes && !m && (Object.keys(w).filter(
|
|
3542
|
-
(T) => T.startsWith(
|
|
3547
|
+
(T) => T.startsWith(s)
|
|
3543
3548
|
).forEach((T) => {
|
|
3544
3549
|
delete y[T], delete z[T];
|
|
3545
3550
|
}), z = {
|
|
3546
3551
|
...z,
|
|
3547
|
-
[
|
|
3548
|
-
...z[
|
|
3552
|
+
[s]: {
|
|
3553
|
+
...z[s],
|
|
3549
3554
|
hasMore: !1
|
|
3550
3555
|
}
|
|
3551
|
-
}), (
|
|
3552
|
-
rowId:
|
|
3553
|
-
rowIndex:
|
|
3556
|
+
}), (ue = (Ae = e.callBackRef) == null ? void 0 : Ae.current) != null && ue.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
|
|
3557
|
+
rowId: s,
|
|
3558
|
+
rowIndex: E,
|
|
3554
3559
|
api: e.api,
|
|
3555
3560
|
isExpanded: m
|
|
3556
3561
|
}), {
|
|
@@ -3564,9 +3569,9 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3564
3569
|
pagination: z,
|
|
3565
3570
|
expandedGroups: m ? {
|
|
3566
3571
|
...e.rowGroupState.expandedGroups,
|
|
3567
|
-
[
|
|
3568
|
-
[
|
|
3569
|
-
rowIndex:
|
|
3572
|
+
[s]: {
|
|
3573
|
+
[s]: m,
|
|
3574
|
+
rowIndex: E,
|
|
3570
3575
|
count: D,
|
|
3571
3576
|
fieldName: h,
|
|
3572
3577
|
value: B
|
|
@@ -3575,19 +3580,19 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3575
3580
|
}
|
|
3576
3581
|
};
|
|
3577
3582
|
}
|
|
3578
|
-
case
|
|
3579
|
-
const { groupId:
|
|
3583
|
+
case l.SET_ROW_GROUP_DATA: {
|
|
3584
|
+
const { groupId: s, data: E, append: h } = n.payload, B = s.split("/").length, w = E.map((x, D) => ({
|
|
3580
3585
|
...x,
|
|
3581
3586
|
isChildGroup: !0,
|
|
3582
3587
|
childIndex: D,
|
|
3583
3588
|
groupingLevel: B,
|
|
3584
|
-
__parentPath: x.__parentPath ? `${x.__parentPath}/${
|
|
3585
|
-
})), I = (k = e.rowGroupState.expandedGroups[
|
|
3589
|
+
__parentPath: x.__parentPath ? `${x.__parentPath}/${s}` : s
|
|
3590
|
+
})), I = (k = e.rowGroupState.expandedGroups[s]) == null ? void 0 : k.rowIndex, m = e.rowGroupState.loadedData[s] || [], G = h ? [...m, ...w] : w, F = [...e.filteredData ?? []];
|
|
3586
3591
|
if (I >= 0) {
|
|
3587
3592
|
const x = h ? I + 1 + m.length : I + 1;
|
|
3588
3593
|
F.splice(x, 0, ...w);
|
|
3589
3594
|
}
|
|
3590
|
-
return e.rowGroupState.expandedGroups[
|
|
3595
|
+
return e.rowGroupState.expandedGroups[s] ? {
|
|
3591
3596
|
...e,
|
|
3592
3597
|
filteredData: F,
|
|
3593
3598
|
data: F,
|
|
@@ -3595,12 +3600,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3595
3600
|
...e.rowGroupState,
|
|
3596
3601
|
loadedData: {
|
|
3597
3602
|
...e.rowGroupState.loadedData,
|
|
3598
|
-
[
|
|
3603
|
+
[s]: G
|
|
3599
3604
|
},
|
|
3600
3605
|
expandedGroups: {
|
|
3601
3606
|
...e.rowGroupState.expandedGroups,
|
|
3602
|
-
[
|
|
3603
|
-
...e.rowGroupState.expandedGroups[
|
|
3607
|
+
[s]: {
|
|
3608
|
+
...e.rowGroupState.expandedGroups[s],
|
|
3604
3609
|
count: G.length
|
|
3605
3610
|
}
|
|
3606
3611
|
},
|
|
@@ -3608,7 +3613,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3608
3613
|
...e.rowGroupState.cache,
|
|
3609
3614
|
metadata: {
|
|
3610
3615
|
...e.rowGroupState.cache.metadata,
|
|
3611
|
-
[
|
|
3616
|
+
[s]: {
|
|
3612
3617
|
timestamp: Date.now(),
|
|
3613
3618
|
lastUpdated: Date.now()
|
|
3614
3619
|
}
|
|
@@ -3617,45 +3622,45 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3617
3622
|
}
|
|
3618
3623
|
} : e;
|
|
3619
3624
|
}
|
|
3620
|
-
case
|
|
3621
|
-
const { groupId:
|
|
3625
|
+
case l.SET_ROW_GROUP_LOADING: {
|
|
3626
|
+
const { groupId: s, isLoading: E } = n.payload;
|
|
3622
3627
|
return {
|
|
3623
3628
|
...e,
|
|
3624
3629
|
rowGroupState: {
|
|
3625
3630
|
...e.rowGroupState,
|
|
3626
3631
|
loading: {
|
|
3627
3632
|
...e.rowGroupState.loading,
|
|
3628
|
-
[
|
|
3633
|
+
[s]: E
|
|
3629
3634
|
}
|
|
3630
3635
|
}
|
|
3631
3636
|
};
|
|
3632
3637
|
}
|
|
3633
|
-
case
|
|
3634
|
-
const { groupId:
|
|
3638
|
+
case l.SET_ROW_GROUP_PAGINATION: {
|
|
3639
|
+
const { groupId: s, pagination: E } = n.payload;
|
|
3635
3640
|
return {
|
|
3636
3641
|
...e,
|
|
3637
3642
|
rowGroupState: {
|
|
3638
3643
|
...e.rowGroupState,
|
|
3639
3644
|
pagination: {
|
|
3640
3645
|
...e.rowGroupState.pagination,
|
|
3641
|
-
[
|
|
3642
|
-
...e.rowGroupState.pagination[
|
|
3643
|
-
...
|
|
3646
|
+
[s]: {
|
|
3647
|
+
...e.rowGroupState.pagination[s],
|
|
3648
|
+
...E
|
|
3644
3649
|
}
|
|
3645
3650
|
},
|
|
3646
|
-
isLoadingSomething:
|
|
3651
|
+
isLoadingSomething: E.hasMore ?? !1
|
|
3647
3652
|
}
|
|
3648
3653
|
};
|
|
3649
3654
|
}
|
|
3650
|
-
case
|
|
3651
|
-
const { groupId:
|
|
3652
|
-
return
|
|
3655
|
+
case l.CLEAR_ROW_GROUP_CACHE: {
|
|
3656
|
+
const { groupId: s } = n.payload, E = { ...e.rowGroupState.loadedData }, h = { ...e.rowGroupState.pagination }, B = { ...e.rowGroupState.cache.metadata };
|
|
3657
|
+
return s ? (delete E[s], delete h[s], delete B[s]) : (Object.keys(E).forEach((w) => delete E[w]), Object.keys(h).forEach((w) => delete h[w]), Object.keys(B).forEach(
|
|
3653
3658
|
(w) => delete B[w]
|
|
3654
3659
|
)), {
|
|
3655
3660
|
...e,
|
|
3656
3661
|
rowGroupState: {
|
|
3657
3662
|
...e.rowGroupState,
|
|
3658
|
-
loadedData:
|
|
3663
|
+
loadedData: E,
|
|
3659
3664
|
pagination: h,
|
|
3660
3665
|
cache: {
|
|
3661
3666
|
...e.rowGroupState.cache,
|
|
@@ -3664,14 +3669,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3664
3669
|
}
|
|
3665
3670
|
};
|
|
3666
3671
|
}
|
|
3667
|
-
case
|
|
3668
|
-
const { groupId:
|
|
3669
|
-
return
|
|
3670
|
-
...
|
|
3672
|
+
case l.REFRESH_ROW_GROUP_DATA: {
|
|
3673
|
+
const { groupId: s } = n.payload, E = { ...e.rowGroupState.cache.metadata };
|
|
3674
|
+
return s && E[s] ? E[s] = {
|
|
3675
|
+
...E[s],
|
|
3671
3676
|
lastUpdated: Date.now()
|
|
3672
|
-
} :
|
|
3673
|
-
|
|
3674
|
-
...
|
|
3677
|
+
} : s || Object.keys(E).forEach((h) => {
|
|
3678
|
+
E[h] = {
|
|
3679
|
+
...E[h],
|
|
3675
3680
|
lastUpdated: Date.now()
|
|
3676
3681
|
};
|
|
3677
3682
|
}), {
|
|
@@ -3680,12 +3685,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3680
3685
|
...e.rowGroupState,
|
|
3681
3686
|
cache: {
|
|
3682
3687
|
...e.rowGroupState.cache,
|
|
3683
|
-
metadata:
|
|
3688
|
+
metadata: E
|
|
3684
3689
|
}
|
|
3685
3690
|
}
|
|
3686
3691
|
};
|
|
3687
3692
|
}
|
|
3688
|
-
case
|
|
3693
|
+
case l.SET_API:
|
|
3689
3694
|
return {
|
|
3690
3695
|
...e,
|
|
3691
3696
|
rowGroupState: {
|
|
@@ -3693,12 +3698,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3693
3698
|
api: n.payload
|
|
3694
3699
|
}
|
|
3695
3700
|
};
|
|
3696
|
-
case
|
|
3701
|
+
case l.SET_COLUMN_MAP:
|
|
3697
3702
|
return {
|
|
3698
3703
|
...e,
|
|
3699
3704
|
columnMap: n.payload
|
|
3700
3705
|
};
|
|
3701
|
-
case
|
|
3706
|
+
case l.SET_NUMBER_FORMAT:
|
|
3702
3707
|
return {
|
|
3703
3708
|
...e,
|
|
3704
3709
|
format: {
|
|
@@ -3706,7 +3711,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3706
3711
|
numberFormat: n.payload
|
|
3707
3712
|
}
|
|
3708
3713
|
};
|
|
3709
|
-
case
|
|
3714
|
+
case l.SET_HEADER_ROW_HEIGHT:
|
|
3710
3715
|
return {
|
|
3711
3716
|
...e,
|
|
3712
3717
|
headerRowHeightwithIndex: {
|
|
@@ -3714,12 +3719,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3714
3719
|
...n.payload
|
|
3715
3720
|
}
|
|
3716
3721
|
};
|
|
3717
|
-
case
|
|
3722
|
+
case l.CLEANUP_TABLE_RESOURCES:
|
|
3718
3723
|
return {
|
|
3719
3724
|
...e,
|
|
3720
3725
|
...rn
|
|
3721
3726
|
};
|
|
3722
|
-
case
|
|
3727
|
+
case l.ADD_TABLE_INSTANCE:
|
|
3723
3728
|
return {
|
|
3724
3729
|
...e,
|
|
3725
3730
|
tableInstance: n.payload
|
|
@@ -3732,75 +3737,75 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3732
3737
|
// ...action.payload,
|
|
3733
3738
|
// },
|
|
3734
3739
|
// };
|
|
3735
|
-
case
|
|
3740
|
+
case l.SET_SERVER_SIDE:
|
|
3736
3741
|
return {
|
|
3737
3742
|
...e,
|
|
3738
3743
|
serverSide: n.payload
|
|
3739
3744
|
};
|
|
3740
|
-
case
|
|
3745
|
+
case l.ROW_DRAG_MANAGED:
|
|
3741
3746
|
return {
|
|
3742
3747
|
...e,
|
|
3743
3748
|
rowDragManaged: n.payload
|
|
3744
3749
|
};
|
|
3745
|
-
case
|
|
3750
|
+
case l.INFINITE_SCROLL:
|
|
3746
3751
|
return {
|
|
3747
3752
|
...e,
|
|
3748
3753
|
infiniteScroll: n.payload
|
|
3749
3754
|
};
|
|
3750
|
-
case
|
|
3755
|
+
case l.SET_INITIAL_EXPANDED_COLUMN_GROUPS:
|
|
3751
3756
|
return {
|
|
3752
3757
|
...e,
|
|
3753
3758
|
expandedColumnGroups: n.payload
|
|
3754
3759
|
};
|
|
3755
|
-
case
|
|
3760
|
+
case l.SET_TABLE_API:
|
|
3756
3761
|
return {
|
|
3757
3762
|
...e,
|
|
3758
3763
|
api: n.payload
|
|
3759
3764
|
};
|
|
3760
|
-
case
|
|
3761
|
-
const
|
|
3765
|
+
case l.EXPAND_COLLAPSE_ALL_COLUMNS: {
|
|
3766
|
+
const s = n.payload ? { isAllGroupExpanded: !0 } : { isAllGroupExpanded: !1 }, { processedColumns: E } = De(
|
|
3762
3767
|
e.columns,
|
|
3763
|
-
|
|
3768
|
+
s,
|
|
3764
3769
|
0,
|
|
3765
3770
|
null,
|
|
3766
3771
|
((V = e.defaultColDef) == null ? void 0 : V.minWidth) || 150
|
|
3767
3772
|
), { columns: h, frozenData: B } = Be(
|
|
3768
|
-
|
|
3773
|
+
E,
|
|
3769
3774
|
e.defaultColDef || { minWidth: 150 }
|
|
3770
3775
|
);
|
|
3771
3776
|
return {
|
|
3772
3777
|
...e,
|
|
3773
|
-
expandedColumnGroups:
|
|
3778
|
+
expandedColumnGroups: s,
|
|
3774
3779
|
columns: h,
|
|
3775
3780
|
frozenColumns: B
|
|
3776
3781
|
};
|
|
3777
3782
|
}
|
|
3778
|
-
case
|
|
3783
|
+
case l.SET_SMART_GRID_MENU_OPTIONS:
|
|
3779
3784
|
return {
|
|
3780
3785
|
...e,
|
|
3781
3786
|
smartGridMenuOptions: n.payload
|
|
3782
3787
|
};
|
|
3783
|
-
case
|
|
3788
|
+
case l.ROW_GROUP_CACHE_ENABLE:
|
|
3784
3789
|
return {
|
|
3785
3790
|
...e,
|
|
3786
3791
|
purgeClosedRowNodes: n.payload
|
|
3787
3792
|
};
|
|
3788
|
-
case
|
|
3793
|
+
case l.DETAIL_RENDERER_TABLE:
|
|
3789
3794
|
return {
|
|
3790
3795
|
...e,
|
|
3791
3796
|
detailRendererTable: n.payload
|
|
3792
3797
|
};
|
|
3793
|
-
case
|
|
3798
|
+
case l.IS_SAVE_VIEW_ENABLED:
|
|
3794
3799
|
return {
|
|
3795
3800
|
...e,
|
|
3796
3801
|
isSaveViewEnabled: n.payload
|
|
3797
3802
|
};
|
|
3798
|
-
case
|
|
3803
|
+
case l.SAVE_VIEW_CALLBACKS:
|
|
3799
3804
|
return {
|
|
3800
3805
|
...e,
|
|
3801
3806
|
saveViewCallbacks: n.payload
|
|
3802
3807
|
};
|
|
3803
|
-
case
|
|
3808
|
+
case l.SET_ROW_HEIGHT:
|
|
3804
3809
|
return {
|
|
3805
3810
|
...e,
|
|
3806
3811
|
rowHeight: {
|
|
@@ -3809,7 +3814,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3809
3814
|
padding: Ke[n.payload].padding
|
|
3810
3815
|
}
|
|
3811
3816
|
};
|
|
3812
|
-
case
|
|
3817
|
+
case l.EXPAND_COLLAPSE_ALL_ROWS:
|
|
3813
3818
|
return {
|
|
3814
3819
|
...e,
|
|
3815
3820
|
rowGroupState: {
|
|
@@ -3818,47 +3823,47 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3818
3823
|
isManuallyChanged: !n.payload
|
|
3819
3824
|
}
|
|
3820
3825
|
};
|
|
3821
|
-
case
|
|
3826
|
+
case l.SET_REFS:
|
|
3822
3827
|
return {
|
|
3823
3828
|
...e,
|
|
3824
3829
|
...n.payload
|
|
3825
3830
|
};
|
|
3826
|
-
case
|
|
3831
|
+
case l.SET_DEFAULT_COL_DEF:
|
|
3827
3832
|
return {
|
|
3828
3833
|
...e,
|
|
3829
3834
|
defaultColDef: n.payload
|
|
3830
3835
|
};
|
|
3831
|
-
case
|
|
3836
|
+
case l.SET_SELECTABLE:
|
|
3832
3837
|
return {
|
|
3833
3838
|
...e,
|
|
3834
3839
|
selectable: n.payload
|
|
3835
3840
|
};
|
|
3836
|
-
case
|
|
3841
|
+
case l.SET_DISABLE_SELECT_ALL_RECORDS_OPTION:
|
|
3837
3842
|
return {
|
|
3838
3843
|
...e,
|
|
3839
3844
|
disableSelectAllRecords: n.payload
|
|
3840
3845
|
};
|
|
3841
|
-
case
|
|
3846
|
+
case l.SET_COLUMN_BUFFER_SIZE:
|
|
3842
3847
|
return {
|
|
3843
3848
|
...e,
|
|
3844
3849
|
columnBufferSize: n.payload
|
|
3845
3850
|
};
|
|
3846
|
-
case
|
|
3851
|
+
case l.SET_LAZY_LOAD_CELL_RENDERER:
|
|
3847
3852
|
return {
|
|
3848
3853
|
...e,
|
|
3849
3854
|
lazyLoadCellRenderer: n.payload
|
|
3850
3855
|
};
|
|
3851
|
-
case
|
|
3856
|
+
case l.SET_HAS_SPLIT_RENDERER:
|
|
3852
3857
|
return {
|
|
3853
3858
|
...e,
|
|
3854
3859
|
hasSplitRenderer: n.payload
|
|
3855
3860
|
};
|
|
3856
|
-
case
|
|
3861
|
+
case l.SET_HAS_SPLIT_RENDERER_KEYS:
|
|
3857
3862
|
return {
|
|
3858
3863
|
...e,
|
|
3859
3864
|
splitRendererKeys: n.payload
|
|
3860
3865
|
};
|
|
3861
|
-
case
|
|
3866
|
+
case l.SET_CUSTOM_CALLBACKS:
|
|
3862
3867
|
return {
|
|
3863
3868
|
...e,
|
|
3864
3869
|
customCallback: {
|
|
@@ -3866,30 +3871,30 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3866
3871
|
...n.payload
|
|
3867
3872
|
}
|
|
3868
3873
|
};
|
|
3869
|
-
case
|
|
3874
|
+
case l.SET_REMOVE_SELECTION_ON_OPERATION:
|
|
3870
3875
|
return {
|
|
3871
3876
|
...e,
|
|
3872
3877
|
removeSelectionOnOperation: n.payload
|
|
3873
3878
|
};
|
|
3874
|
-
case
|
|
3879
|
+
case l.SET_TOTAL_COLUMNS_COUNT:
|
|
3875
3880
|
return {
|
|
3876
3881
|
...e,
|
|
3877
3882
|
totalColumnsCount: n.payload
|
|
3878
3883
|
};
|
|
3879
|
-
case
|
|
3884
|
+
case l.SET_REMOVE_CHECK_CONFIGURATION_ON_OPERATION:
|
|
3880
3885
|
return {
|
|
3881
3886
|
...e,
|
|
3882
3887
|
removeCheckConfigurationOnOperation: n.payload
|
|
3883
3888
|
};
|
|
3884
|
-
case
|
|
3885
|
-
const
|
|
3886
|
-
if (!
|
|
3889
|
+
case l.SET_ALL_CHILD_ROWS_EXPANDED: {
|
|
3890
|
+
const s = n.payload;
|
|
3891
|
+
if (!s && ke(e))
|
|
3887
3892
|
return e;
|
|
3888
|
-
if (
|
|
3889
|
-
const
|
|
3893
|
+
if (s) {
|
|
3894
|
+
const E = Ze(e), h = e.columns.some((D) => D.aggFunc), B = [], w = {};
|
|
3890
3895
|
let I = 0;
|
|
3891
3896
|
const { uniqueIdField: m, childKeyField: G, rowSpanColumn: F, api: x } = e;
|
|
3892
|
-
for (const D of
|
|
3897
|
+
for (const D of E) {
|
|
3893
3898
|
const y = String(D[m]), z = D[G] || [];
|
|
3894
3899
|
if (z.length > 0) {
|
|
3895
3900
|
let T, X = null;
|
|
@@ -3929,21 +3934,21 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3929
3934
|
} else
|
|
3930
3935
|
B.push(D), I += 1;
|
|
3931
3936
|
}
|
|
3932
|
-
return
|
|
3937
|
+
return me(e, B), {
|
|
3933
3938
|
...e,
|
|
3934
3939
|
expandedChildRows: w,
|
|
3935
3940
|
filteredData: B,
|
|
3936
3941
|
data: B
|
|
3937
3942
|
};
|
|
3938
3943
|
} else {
|
|
3939
|
-
const
|
|
3944
|
+
const E = Ze(e), h = e.enableRowSpan ? E.map((B) => {
|
|
3940
3945
|
if (B.__rowSpanInfo) {
|
|
3941
3946
|
const { __rowSpanInfo: w, ...I } = B;
|
|
3942
3947
|
return I;
|
|
3943
3948
|
}
|
|
3944
3949
|
return B;
|
|
3945
|
-
}) :
|
|
3946
|
-
return
|
|
3950
|
+
}) : E;
|
|
3951
|
+
return me(e, h), {
|
|
3947
3952
|
...e,
|
|
3948
3953
|
expandedChildRows: {},
|
|
3949
3954
|
filteredData: h,
|
|
@@ -3951,20 +3956,20 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3951
3956
|
};
|
|
3952
3957
|
}
|
|
3953
3958
|
}
|
|
3954
|
-
case
|
|
3955
|
-
const { rowId:
|
|
3959
|
+
case l.EXPAND_ROW_WITH_NESTED_CHILDREN: {
|
|
3960
|
+
const { rowId: s, rowIndex: E, expand: h } = n.payload, { uniqueIdField: B, childKeyField: w, rowSpanColumn: I, api: m, columns: G } = e;
|
|
3956
3961
|
if (h) {
|
|
3957
|
-
const F = e.filteredData || [], x = F[
|
|
3962
|
+
const F = e.filteredData || [], x = F[E];
|
|
3958
3963
|
if (!x) return e;
|
|
3959
3964
|
const D = G.some((b) => b.aggFunc), y = { ...e.expandedChildRows }, z = (b, re, Ce, we) => {
|
|
3960
|
-
const
|
|
3961
|
-
if (
|
|
3965
|
+
const Oe = b[w] || [];
|
|
3966
|
+
if (Oe.length === 0) return [b];
|
|
3962
3967
|
const ve = we.value;
|
|
3963
3968
|
let Re, Qe = null;
|
|
3964
3969
|
if (D) {
|
|
3965
3970
|
const { aggreRow: Se, aggreChildRows: ze } = ye(
|
|
3966
3971
|
e,
|
|
3967
|
-
|
|
3972
|
+
Oe,
|
|
3968
3973
|
b,
|
|
3969
3974
|
Ce,
|
|
3970
3975
|
ve,
|
|
@@ -3972,7 +3977,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3972
3977
|
);
|
|
3973
3978
|
Qe = Se, Re = ze;
|
|
3974
3979
|
} else
|
|
3975
|
-
Re =
|
|
3980
|
+
Re = Oe.map((Se) => ({
|
|
3976
3981
|
...Se,
|
|
3977
3982
|
__parentPath: re,
|
|
3978
3983
|
level: Ce,
|
|
@@ -3983,7 +3988,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3983
3988
|
y[re] = {
|
|
3984
3989
|
rowId: re,
|
|
3985
3990
|
rowIndex: ve,
|
|
3986
|
-
childRowsCount:
|
|
3991
|
+
childRowsCount: Oe.length + (Qe ? 1 : 0)
|
|
3987
3992
|
};
|
|
3988
3993
|
const oe = I ? Fe(
|
|
3989
3994
|
[b, ...Re],
|
|
@@ -3993,95 +3998,107 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3993
3998
|
we.value += 1;
|
|
3994
3999
|
const Xe = Re.length;
|
|
3995
4000
|
for (let Se = 0; Se < Xe; Se++) {
|
|
3996
|
-
const ze = Re[Se],
|
|
4001
|
+
const ze = Re[Se], an = oe[Se + 1], Je = ze[w];
|
|
3997
4002
|
if ((Je == null ? void 0 : Je.length) > 0) {
|
|
3998
4003
|
const vn = String(ze[B]), Gn = z(
|
|
3999
|
-
|
|
4004
|
+
an,
|
|
4000
4005
|
`${re}/${vn}`,
|
|
4001
4006
|
Ce + 1,
|
|
4002
4007
|
we
|
|
4003
4008
|
);
|
|
4004
4009
|
Y.push(...Gn);
|
|
4005
4010
|
} else
|
|
4006
|
-
Y.push(
|
|
4011
|
+
Y.push(an), we.value += 1;
|
|
4007
4012
|
}
|
|
4008
4013
|
return Qe && (Y.push(Qe), we.value += 1), Y;
|
|
4009
|
-
},
|
|
4010
|
-
value:
|
|
4011
|
-
}), T = F.slice(0,
|
|
4014
|
+
}, S = z(x, s, 1, {
|
|
4015
|
+
value: E
|
|
4016
|
+
}), T = F.slice(0, E), X = F.slice(E + 1), H = [
|
|
4012
4017
|
...T,
|
|
4013
|
-
...
|
|
4018
|
+
...S,
|
|
4014
4019
|
...X
|
|
4015
4020
|
];
|
|
4016
|
-
return
|
|
4021
|
+
return me(e, H), {
|
|
4017
4022
|
...e,
|
|
4018
4023
|
expandedChildRows: y,
|
|
4019
4024
|
filteredData: H,
|
|
4020
4025
|
data: H
|
|
4021
4026
|
};
|
|
4022
4027
|
} else {
|
|
4023
|
-
if (!e.expandedChildRows[
|
|
4024
|
-
const F = e.filteredData || [], x = { ...e.expandedChildRows }, D = `${
|
|
4028
|
+
if (!e.expandedChildRows[s]) return e;
|
|
4029
|
+
const F = e.filteredData || [], x = { ...e.expandedChildRows }, D = `${s}/`;
|
|
4025
4030
|
let y = 0;
|
|
4026
4031
|
const z = [];
|
|
4027
4032
|
for (const T of Object.keys(x))
|
|
4028
|
-
(T ===
|
|
4033
|
+
(T === s || T.startsWith(D)) && (y += x[T].childRowsCount, z.push(T));
|
|
4029
4034
|
for (const T of z)
|
|
4030
4035
|
delete x[T];
|
|
4031
|
-
const
|
|
4032
|
-
...F.slice(0,
|
|
4033
|
-
...F.slice(
|
|
4036
|
+
const S = [
|
|
4037
|
+
...F.slice(0, E + 1),
|
|
4038
|
+
...F.slice(E + 1 + y)
|
|
4034
4039
|
];
|
|
4035
|
-
return (le =
|
|
4036
|
-
...
|
|
4040
|
+
return (le = S[E]) != null && le.__rowSpanInfo && (S[E] = {
|
|
4041
|
+
...S[E],
|
|
4037
4042
|
__rowSpanInfo: void 0
|
|
4038
|
-
}),
|
|
4043
|
+
}), me(e, S), {
|
|
4039
4044
|
...e,
|
|
4040
4045
|
expandedChildRows: x,
|
|
4041
|
-
filteredData:
|
|
4042
|
-
data:
|
|
4046
|
+
filteredData: S,
|
|
4047
|
+
data: S
|
|
4043
4048
|
};
|
|
4044
4049
|
}
|
|
4045
4050
|
}
|
|
4046
|
-
case
|
|
4051
|
+
case l.SET_COMMENT_CONTEXT_REF:
|
|
4047
4052
|
return {
|
|
4048
4053
|
...e,
|
|
4049
4054
|
contextRef: n.payload
|
|
4050
4055
|
};
|
|
4051
|
-
case
|
|
4056
|
+
case l.SET_CHAT_ENABLED:
|
|
4052
4057
|
return {
|
|
4053
4058
|
...e,
|
|
4054
4059
|
isChatEnabled: n.payload
|
|
4055
4060
|
};
|
|
4056
|
-
case
|
|
4061
|
+
case l.SET_COMMENT_ENABLED:
|
|
4057
4062
|
return {
|
|
4058
4063
|
...e,
|
|
4059
4064
|
isCommentFeatureEnabled: n.payload
|
|
4060
4065
|
};
|
|
4061
|
-
case
|
|
4066
|
+
case l.SET_NO_HEADER_SELECTION_CHECKBOX:
|
|
4062
4067
|
return {
|
|
4063
4068
|
...e,
|
|
4064
4069
|
noHeaderSelection: n.payload
|
|
4065
4070
|
};
|
|
4066
|
-
case
|
|
4071
|
+
case l.SET_DATA_IS_TREE_DATA:
|
|
4067
4072
|
return {
|
|
4068
4073
|
...e,
|
|
4069
4074
|
treeData: n.payload
|
|
4070
4075
|
};
|
|
4071
|
-
case
|
|
4076
|
+
case l.SET_VIRTUALIZATION_CONFIG:
|
|
4072
4077
|
return {
|
|
4073
4078
|
...e,
|
|
4074
4079
|
virtualizationConfig: n.payload
|
|
4075
4080
|
};
|
|
4076
|
-
case
|
|
4081
|
+
case l.SET_DISABLE_CURRENT_PAGE_RECORDS:
|
|
4077
4082
|
return {
|
|
4078
4083
|
...e,
|
|
4079
4084
|
disableCurrentPageRecords: n.payload
|
|
4080
4085
|
};
|
|
4086
|
+
case l.SET_FORCE_SHOW_LOADING:
|
|
4087
|
+
return {
|
|
4088
|
+
...e,
|
|
4089
|
+
showForceLoading: n.payload
|
|
4090
|
+
};
|
|
4091
|
+
case l.UPDATE_ROW_DATA_WITH_REFRESH:
|
|
4092
|
+
return me(e, n.payload.updatedData), {
|
|
4093
|
+
...e,
|
|
4094
|
+
data: n.payload.updatedData,
|
|
4095
|
+
filteredData: n.payload.updatedData,
|
|
4096
|
+
expandedChildRows: n.payload.expandedChildRows
|
|
4097
|
+
};
|
|
4081
4098
|
default:
|
|
4082
4099
|
return e;
|
|
4083
4100
|
}
|
|
4084
|
-
}, ln = Tn(null),
|
|
4101
|
+
}, ln = Tn(null), Ot = ({
|
|
4085
4102
|
tableId: e = "default",
|
|
4086
4103
|
children: n
|
|
4087
4104
|
}) => {
|
|
@@ -4090,25 +4107,25 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
4090
4107
|
Pt(e);
|
|
4091
4108
|
}, [e]), /* @__PURE__ */ de(ln.Provider, { value: t, children: n });
|
|
4092
4109
|
};
|
|
4093
|
-
function
|
|
4110
|
+
function St(e) {
|
|
4094
4111
|
const t = An(ln) || xn;
|
|
4095
4112
|
return e ? t(e) : t();
|
|
4096
4113
|
}
|
|
4097
|
-
const Dt = () => An(ln) || xn,
|
|
4098
|
-
if (!
|
|
4114
|
+
const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "default") => {
|
|
4115
|
+
if (!je.has(e)) {
|
|
4099
4116
|
const n = Yn(
|
|
4100
|
-
|
|
4117
|
+
jn(
|
|
4101
4118
|
(t = rn, r) => mt(t, r),
|
|
4102
4119
|
{
|
|
4103
4120
|
...rn
|
|
4104
4121
|
}
|
|
4105
4122
|
)
|
|
4106
4123
|
);
|
|
4107
|
-
|
|
4124
|
+
je.set(e, n);
|
|
4108
4125
|
}
|
|
4109
|
-
return
|
|
4126
|
+
return je.get(e);
|
|
4110
4127
|
}, xn = Qn("default"), Pt = (e) => {
|
|
4111
|
-
e && e !== "default" &&
|
|
4128
|
+
e && e !== "default" && je.delete(e);
|
|
4112
4129
|
}, Lt = (e, n = []) => {
|
|
4113
4130
|
const t = Pe(null);
|
|
4114
4131
|
return pe(() => {
|
|
@@ -4118,8 +4135,8 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4118
4135
|
(C) => C && C.current && C.current.contains(i)
|
|
4119
4136
|
), f = (g = t.current) == null ? void 0 : g.querySelector(
|
|
4120
4137
|
".ia-table-menu-submenu"
|
|
4121
|
-
),
|
|
4122
|
-
o && !d && !
|
|
4138
|
+
), u = !!f && (f == null ? void 0 : f.contains(i));
|
|
4139
|
+
o && !d && !u && e();
|
|
4123
4140
|
};
|
|
4124
4141
|
return document.addEventListener("mousedown", r), () => {
|
|
4125
4142
|
document.removeEventListener("mousedown", r);
|
|
@@ -4169,24 +4186,24 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4169
4186
|
// Custom width for the menu
|
|
4170
4187
|
horizontalAlign: c = xe.AUTO,
|
|
4171
4188
|
// Horizontal alignment of the menu
|
|
4172
|
-
isSubmenu:
|
|
4189
|
+
isSubmenu: u = !1,
|
|
4173
4190
|
parentOptionRef: g = null,
|
|
4174
4191
|
skipAnimation: C = !1,
|
|
4175
4192
|
// Skip animation for submenus
|
|
4176
4193
|
portalContainer: L = document.body,
|
|
4177
|
-
additionalButtons:
|
|
4194
|
+
additionalButtons: a = null,
|
|
4178
4195
|
forcePosition: p = !1,
|
|
4179
4196
|
// When true, prevents position flipping even if there's not enough space
|
|
4180
4197
|
anchorOrigin: R,
|
|
4181
4198
|
onClick: P
|
|
4182
4199
|
}) => {
|
|
4183
|
-
const [
|
|
4200
|
+
const [O, U] = Ge({
|
|
4184
4201
|
top: 0,
|
|
4185
4202
|
left: 0,
|
|
4186
4203
|
width: 0,
|
|
4187
4204
|
visibility: "hidden"
|
|
4188
4205
|
// Hide menu initially until positioned
|
|
4189
|
-
}), [N, Q] = Ge("entered"), [
|
|
4206
|
+
}), [N, Q] = Ge("entered"), [_, v] = Ge(d), [K, j] = Ge("center"), [q, ee] = Ge(
|
|
4190
4207
|
null
|
|
4191
4208
|
), ne = Pe(
|
|
4192
4209
|
null
|
|
@@ -4200,7 +4217,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4200
4217
|
Q("exiting"), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
|
|
4201
4218
|
A(!1), Q("entered");
|
|
4202
4219
|
}, 150);
|
|
4203
|
-
}, [A, C]),
|
|
4220
|
+
}, [A, C]), ae = Ie(
|
|
4204
4221
|
(k) => {
|
|
4205
4222
|
if (!(k.submenu && k.useHover)) {
|
|
4206
4223
|
if (k.submenu) {
|
|
@@ -4211,9 +4228,9 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4211
4228
|
}
|
|
4212
4229
|
},
|
|
4213
4230
|
[q, A, P]
|
|
4214
|
-
),
|
|
4231
|
+
), se = Ie((k) => {
|
|
4215
4232
|
k.submenu && k.useHover && (Z.current && (clearTimeout(Z.current), Z.current = null), ee(k.label));
|
|
4216
|
-
}, []),
|
|
4233
|
+
}, []), Ee = Ie(() => {
|
|
4217
4234
|
Z.current && (clearTimeout(Z.current), Z.current = null);
|
|
4218
4235
|
}, []), fe = Ie(
|
|
4219
4236
|
(k) => {
|
|
@@ -4236,8 +4253,8 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4236
4253
|
const k = (i == null ? void 0 : i.current) || o;
|
|
4237
4254
|
if (k && r) {
|
|
4238
4255
|
const V = () => {
|
|
4239
|
-
var
|
|
4240
|
-
const le = (
|
|
4256
|
+
var s;
|
|
4257
|
+
const le = (s = k.getBoundingClientRect) == null ? void 0 : s.call(k);
|
|
4241
4258
|
le && ce({ top: le.top, left: le.left });
|
|
4242
4259
|
};
|
|
4243
4260
|
return V(), window.addEventListener("scroll", V), window.addEventListener("resize", V), () => {
|
|
@@ -4257,11 +4274,11 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4257
4274
|
height: 0,
|
|
4258
4275
|
right: 0
|
|
4259
4276
|
};
|
|
4260
|
-
let le = { top: 0, left: 0, width: 0 },
|
|
4261
|
-
L !== document.body && L instanceof Element && (le = L.getBoundingClientRect(),
|
|
4262
|
-
const
|
|
4277
|
+
let le = { top: 0, left: 0, width: 0 }, s = !1;
|
|
4278
|
+
L !== document.body && L instanceof Element && (le = L.getBoundingClientRect(), s = !0);
|
|
4279
|
+
const E = window.innerWidth, h = window.innerHeight, B = f || Math.max(V.width, 150), w = e.length * 40;
|
|
4263
4280
|
let I = d;
|
|
4264
|
-
const m = V.top > w, G = h - V.bottom > w, F = V.left > B, x =
|
|
4281
|
+
const m = V.top > w, G = h - V.bottom > w, F = V.left > B, x = E - V.right > B;
|
|
4265
4282
|
if (p)
|
|
4266
4283
|
I = d;
|
|
4267
4284
|
else
|
|
@@ -4279,11 +4296,11 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4279
4296
|
!x && F && (I = ge.LEFT);
|
|
4280
4297
|
break;
|
|
4281
4298
|
}
|
|
4282
|
-
const D =
|
|
4299
|
+
const D = u && (g != null && g.current) ? g.current.getBoundingClientRect() : V, y = V.left, z = V.right, S = V.width;
|
|
4283
4300
|
f && (D.width = f);
|
|
4284
4301
|
const T = yt(
|
|
4285
4302
|
I,
|
|
4286
|
-
|
|
4303
|
+
s,
|
|
4287
4304
|
D,
|
|
4288
4305
|
le,
|
|
4289
4306
|
V
|
|
@@ -4291,37 +4308,37 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4291
4308
|
if (R)
|
|
4292
4309
|
switch (R) {
|
|
4293
4310
|
case "start":
|
|
4294
|
-
|
|
4311
|
+
s ? T.left = y - le.left : T.left = y + window.scrollX;
|
|
4295
4312
|
break;
|
|
4296
4313
|
case "end":
|
|
4297
|
-
|
|
4314
|
+
s ? T.left = z - B - le.left : T.left = z - B + window.scrollX;
|
|
4298
4315
|
break;
|
|
4299
4316
|
case "center":
|
|
4300
|
-
|
|
4317
|
+
s ? T.left = y + S / 2 - B / 2 - le.left : T.left = y + S / 2 - B / 2 + window.scrollX;
|
|
4301
4318
|
break;
|
|
4302
4319
|
}
|
|
4303
4320
|
if (!R && (I === ge.BOTTOM || I === ge.TOP)) {
|
|
4304
4321
|
let H = c;
|
|
4305
4322
|
if (c === xe.AUTO) {
|
|
4306
|
-
const b = V.right + B <=
|
|
4323
|
+
const b = V.right + B <= E, re = V.left - B >= 0;
|
|
4307
4324
|
b ? H = xe.START : re ? H = xe.END : H = xe.START;
|
|
4308
4325
|
}
|
|
4309
|
-
if (H === xe.START ?
|
|
4326
|
+
if (H === xe.START ? s ? T.left = V.left - le.left : T.left = V.left + window.scrollX : H === xe.END && (s ? T.left = V.right - B - le.left : T.left = V.right - B + window.scrollX), s) {
|
|
4310
4327
|
const b = le.width;
|
|
4311
4328
|
(T.left ?? 0) + B > b && (T.left = Math.max(0, b - B));
|
|
4312
4329
|
} else
|
|
4313
|
-
(T.left ?? 0) + B >
|
|
4330
|
+
(T.left ?? 0) + B > E && (T.left = Math.max(0, E - B));
|
|
4314
4331
|
(T.left ?? 0) < 0 && (T.left = 0);
|
|
4315
|
-
} else (I === ge.LEFT || I === ge.RIGHT) && (
|
|
4332
|
+
} else (I === ge.LEFT || I === ge.RIGHT) && (s || (T.top ?? 0) + w > h && (T.top = Math.max(0, h - w)));
|
|
4316
4333
|
let X = "center";
|
|
4317
4334
|
if (I === ge.BOTTOM || I === ge.TOP) {
|
|
4318
|
-
const H = V.left + V.width / 2, b =
|
|
4335
|
+
const H = V.left + V.width / 2, b = E / 2;
|
|
4319
4336
|
H < b && x ? X = "left" : H >= b && F && (X = "right");
|
|
4320
4337
|
} else if (I === ge.LEFT || I === ge.RIGHT) {
|
|
4321
4338
|
const H = V.top + V.height / 2, b = h / 2;
|
|
4322
4339
|
H < b && G ? X = "top" : H >= b && m && (X = "bottom");
|
|
4323
4340
|
}
|
|
4324
|
-
v(I),
|
|
4341
|
+
v(I), j(X), U({
|
|
4325
4342
|
top: T.top ?? 0,
|
|
4326
4343
|
left: T.left ?? 0,
|
|
4327
4344
|
width: T.width ?? 0,
|
|
@@ -4346,28 +4363,28 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4346
4363
|
]);
|
|
4347
4364
|
const Ae = Pe(o ?? null);
|
|
4348
4365
|
Ae.current = o ?? null;
|
|
4349
|
-
const
|
|
4366
|
+
const ue = Lt(
|
|
4350
4367
|
te,
|
|
4351
|
-
|
|
4368
|
+
u ? [g] : [i || Ae]
|
|
4352
4369
|
);
|
|
4353
|
-
return r ?
|
|
4370
|
+
return r ? On(
|
|
4354
4371
|
/* @__PURE__ */ Le(
|
|
4355
4372
|
"div",
|
|
4356
4373
|
{
|
|
4357
|
-
className: `ia-table-menu-submenu d-flex flex-column gap-2 ia-table-position-${
|
|
4374
|
+
className: `ia-table-menu-submenu d-flex flex-column gap-2 ia-table-position-${_} flip-${K} ${!C && N === "entering" ? "menu-entering" : ""} ${!C && N === "entered" ? "menu-entered" : ""} ${!C && N === "exiting" ? "menu-exiting" : ""} ${u ? "ia-table-submenu-only" : ""}`,
|
|
4358
4375
|
style: {
|
|
4359
|
-
...
|
|
4376
|
+
...O,
|
|
4360
4377
|
position: "absolute",
|
|
4361
|
-
width: f ? `${f}px` :
|
|
4362
|
-
minHeight:
|
|
4363
|
-
transform:
|
|
4364
|
-
transformOrigin:
|
|
4365
|
-
visibility:
|
|
4378
|
+
width: f ? `${f}px` : O.width ? `${O.width}px` : void 0,
|
|
4379
|
+
minHeight: O.height ? `${O.height}px` : void 0,
|
|
4380
|
+
transform: O.transform,
|
|
4381
|
+
transformOrigin: O.transformOrigin,
|
|
4382
|
+
visibility: O.visibility || "hidden"
|
|
4366
4383
|
},
|
|
4367
|
-
ref:
|
|
4384
|
+
ref: ue,
|
|
4368
4385
|
children: [
|
|
4369
|
-
|
|
4370
|
-
|
|
4386
|
+
a,
|
|
4387
|
+
a && /* @__PURE__ */ de("div", { className: "ia-table-divider" }),
|
|
4371
4388
|
e.map((k) => /* @__PURE__ */ Le(Mn.Fragment, { children: [
|
|
4372
4389
|
/* @__PURE__ */ Le(
|
|
4373
4390
|
"div",
|
|
@@ -4375,9 +4392,9 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4375
4392
|
ref: (V) => $.current[k.label] = V,
|
|
4376
4393
|
className: `ia-table-menu-option d-flex align-items-center justify-content-between gap-6 rounded-8 cursor-pointer ${k.id === n || k.value === n ? "ia-table-menu-option-selected" : ""} ${q === k.label ? "submenu-active" : ""}`,
|
|
4377
4394
|
onClick: (V) => {
|
|
4378
|
-
V.stopPropagation(),
|
|
4395
|
+
V.stopPropagation(), ae(k);
|
|
4379
4396
|
},
|
|
4380
|
-
onMouseEnter: () =>
|
|
4397
|
+
onMouseEnter: () => se(k),
|
|
4381
4398
|
onMouseLeave: () => he(k),
|
|
4382
4399
|
children: [
|
|
4383
4400
|
/* @__PURE__ */ Le("div", { className: "d-flex align-items-center gap-6 ia-table-user-select-none", children: [
|
|
@@ -4412,7 +4429,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4412
4429
|
k.submenu && q === k.label && /* @__PURE__ */ de(
|
|
4413
4430
|
"div",
|
|
4414
4431
|
{
|
|
4415
|
-
onMouseEnter:
|
|
4432
|
+
onMouseEnter: Ee,
|
|
4416
4433
|
onMouseLeave: () => fe(k.useHover),
|
|
4417
4434
|
children: /* @__PURE__ */ de(
|
|
4418
4435
|
Qt,
|
|
@@ -4429,7 +4446,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4429
4446
|
current: $.current[k.label]
|
|
4430
4447
|
},
|
|
4431
4448
|
skipAnimation: !0,
|
|
4432
|
-
portalContainer:
|
|
4449
|
+
portalContainer: ue.current ?? void 0,
|
|
4433
4450
|
menuButtonRef: void 0
|
|
4434
4451
|
},
|
|
4435
4452
|
`submenu-${k.label}`
|
|
@@ -4459,7 +4476,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4459
4476
|
if (d && Te.has(d)) {
|
|
4460
4477
|
const f = Te.get(d);
|
|
4461
4478
|
f.alignedWith.some(
|
|
4462
|
-
(
|
|
4479
|
+
(u) => He(u) === e
|
|
4463
4480
|
) || f.alignedWith.push(e);
|
|
4464
4481
|
}
|
|
4465
4482
|
});
|
|
@@ -4498,8 +4515,8 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4498
4515
|
if (typeof c == "function" && (n.includes("COLUMN") || n.includes("COLUMNS")))
|
|
4499
4516
|
try {
|
|
4500
4517
|
c(t);
|
|
4501
|
-
} catch (
|
|
4502
|
-
console.log("Error Grid ALignemnt",
|
|
4518
|
+
} catch (u) {
|
|
4519
|
+
console.log("Error Grid ALignemnt", u);
|
|
4503
4520
|
}
|
|
4504
4521
|
}
|
|
4505
4522
|
}
|
|
@@ -4511,7 +4528,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4511
4528
|
});
|
|
4512
4529
|
return pe(() => {
|
|
4513
4530
|
if (e)
|
|
4514
|
-
return A.current.isRegistered ? A.current.previousAlignedGrids !== n && (In(e), pn(e, t, r,
|
|
4531
|
+
return A.current.isRegistered ? A.current.previousAlignedGrids !== n && (In(e), pn(e, t, r, l, n), A.current.previousAlignedGrids = n) : (pn(e, t, r, l, n), A.current.isRegistered = !0, A.current.previousAlignedGrids = n), () => {
|
|
4515
4532
|
A.current.isRegistered && (In(e), A.current.isRegistered = !1);
|
|
4516
4533
|
};
|
|
4517
4534
|
}, [e, t, r, n]), { propagateChange: Ie(
|
|
@@ -4574,7 +4591,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4574
4591
|
return {
|
|
4575
4592
|
expandRowGroup: (i, o) => {
|
|
4576
4593
|
e({
|
|
4577
|
-
type:
|
|
4594
|
+
type: l.TOGGLE_ROW_GROUP,
|
|
4578
4595
|
payload: { groupId: i, rowIndex: o, isExpanded: !0 }
|
|
4579
4596
|
}), Ue("rowGroupToggled", {
|
|
4580
4597
|
groupId: i,
|
|
@@ -4583,7 +4600,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4583
4600
|
},
|
|
4584
4601
|
collapseRowGroup: (i, o) => {
|
|
4585
4602
|
e({
|
|
4586
|
-
type:
|
|
4603
|
+
type: l.TOGGLE_ROW_GROUP,
|
|
4587
4604
|
payload: { groupId: i, rowIndex: o, isExpanded: !1 }
|
|
4588
4605
|
}), Ue("rowGroupToggled", {
|
|
4589
4606
|
groupId: i,
|
|
@@ -4592,7 +4609,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4592
4609
|
},
|
|
4593
4610
|
toggleRowGroup: (i, o, d) => {
|
|
4594
4611
|
e({
|
|
4595
|
-
type:
|
|
4612
|
+
type: l.TOGGLE_ROW_GROUP,
|
|
4596
4613
|
payload: { groupId: i, rowIndex: o, extra: d }
|
|
4597
4614
|
}), Ue("rowGroupToggled", {
|
|
4598
4615
|
groupId: i,
|
|
@@ -4602,19 +4619,19 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4602
4619
|
},
|
|
4603
4620
|
clearRowGroupCache: (i) => {
|
|
4604
4621
|
e({
|
|
4605
|
-
type:
|
|
4622
|
+
type: l.CLEAR_ROW_GROUP_CACHE,
|
|
4606
4623
|
payload: { groupId: i }
|
|
4607
4624
|
});
|
|
4608
4625
|
},
|
|
4609
4626
|
refreshRowGroupData: (i) => {
|
|
4610
4627
|
e({
|
|
4611
|
-
type:
|
|
4628
|
+
type: l.REFRESH_ROW_GROUP_DATA,
|
|
4612
4629
|
payload: { groupId: i }
|
|
4613
4630
|
});
|
|
4614
4631
|
},
|
|
4615
4632
|
setRowGroupData: (i, o, d = !1) => {
|
|
4616
4633
|
e({
|
|
4617
|
-
type:
|
|
4634
|
+
type: l.SET_ROW_GROUP_DATA,
|
|
4618
4635
|
payload: { groupId: i, data: o, append: d }
|
|
4619
4636
|
}), Ue("rowGroupDataLoaded", {
|
|
4620
4637
|
groupId: i,
|
|
@@ -4624,13 +4641,13 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4624
4641
|
},
|
|
4625
4642
|
setRowGroupLoading: (i, o) => {
|
|
4626
4643
|
e({
|
|
4627
|
-
type:
|
|
4644
|
+
type: l.SET_ROW_GROUP_LOADING,
|
|
4628
4645
|
payload: { groupId: i, isLoading: o }
|
|
4629
4646
|
});
|
|
4630
4647
|
},
|
|
4631
4648
|
setRowGroupPagination: (i, o) => {
|
|
4632
4649
|
e({
|
|
4633
|
-
type:
|
|
4650
|
+
type: l.SET_ROW_GROUP_PAGINATION,
|
|
4634
4651
|
payload: { groupId: i, pagination: o }
|
|
4635
4652
|
});
|
|
4636
4653
|
},
|
|
@@ -4647,168 +4664,168 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4647
4664
|
enableRowSpan: d,
|
|
4648
4665
|
rowSpanColumn: f,
|
|
4649
4666
|
pageSize: c,
|
|
4650
|
-
serverSide:
|
|
4667
|
+
serverSide: u,
|
|
4651
4668
|
rowDragManaged: g,
|
|
4652
4669
|
infiniteScroll: C,
|
|
4653
4670
|
initialExpandedColumnGroups: L,
|
|
4654
|
-
tableApi:
|
|
4671
|
+
tableApi: a,
|
|
4655
4672
|
smartGridMenuOptions: p,
|
|
4656
4673
|
purgeClosedRowNodes: R,
|
|
4657
4674
|
detailRendererTable: P,
|
|
4658
|
-
isSaveViewEnabled:
|
|
4675
|
+
isSaveViewEnabled: O,
|
|
4659
4676
|
isSavingViewLoading: U,
|
|
4660
4677
|
savedViewsOptions: N,
|
|
4661
4678
|
rowHeight: Q,
|
|
4662
|
-
tableId:
|
|
4679
|
+
tableId: _,
|
|
4663
4680
|
refObj: v,
|
|
4664
4681
|
callBackRef: K,
|
|
4665
|
-
exportCallbackRef:
|
|
4682
|
+
exportCallbackRef: j,
|
|
4666
4683
|
saveViewCallbackRef: q,
|
|
4667
4684
|
saveViewOptionsRef: ee,
|
|
4668
4685
|
isSingleSelect: ne,
|
|
4669
4686
|
defaultColDef: $,
|
|
4670
4687
|
disableSelectAllRecords: Z,
|
|
4671
4688
|
selectable: te,
|
|
4672
|
-
columnBufferSize:
|
|
4673
|
-
lazyLoadCellRenderer:
|
|
4674
|
-
hasSplitRenderer:
|
|
4689
|
+
columnBufferSize: ae,
|
|
4690
|
+
lazyLoadCellRenderer: se,
|
|
4691
|
+
hasSplitRenderer: Ee,
|
|
4675
4692
|
splitRendererKeys: fe,
|
|
4676
4693
|
removeSelectionOnOperation: he,
|
|
4677
4694
|
removeCheckConfigurationOnOperation: ie,
|
|
4678
4695
|
clickCallbackRef: ce,
|
|
4679
4696
|
isChatEnabled: Ae,
|
|
4680
|
-
isCommentFeatureEnabled:
|
|
4697
|
+
isCommentFeatureEnabled: ue,
|
|
4681
4698
|
noHeaderSelection: k,
|
|
4682
4699
|
treeData: V,
|
|
4683
4700
|
virtualizationConfig: le,
|
|
4684
|
-
rowSelectionRef:
|
|
4685
|
-
disableCurrentPageRecords:
|
|
4701
|
+
rowSelectionRef: s,
|
|
4702
|
+
disableCurrentPageRecords: E
|
|
4686
4703
|
}) => (pe(() => {
|
|
4687
4704
|
e({
|
|
4688
|
-
type:
|
|
4705
|
+
type: l.SET_COLUMN_MAP,
|
|
4689
4706
|
payload: A
|
|
4690
4707
|
});
|
|
4691
4708
|
}, [A, e]), pe(() => {
|
|
4692
4709
|
e({
|
|
4693
|
-
type:
|
|
4710
|
+
type: l.SET_PINNED_TOP_ROWS,
|
|
4694
4711
|
payload: n || []
|
|
4695
4712
|
});
|
|
4696
4713
|
}, [n, e]), pe(() => {
|
|
4697
4714
|
e({
|
|
4698
|
-
type:
|
|
4715
|
+
type: l.SET_PINNED_BOTTOM_ROWS,
|
|
4699
4716
|
payload: t || []
|
|
4700
4717
|
});
|
|
4701
4718
|
}, [t, e]), pe(() => {
|
|
4702
4719
|
const h = Gt(e, v);
|
|
4703
4720
|
e({
|
|
4704
|
-
type:
|
|
4705
|
-
payload:
|
|
4721
|
+
type: l.SET_TABLE_ID,
|
|
4722
|
+
payload: _
|
|
4706
4723
|
}), e({
|
|
4707
|
-
type:
|
|
4724
|
+
type: l.SET_INITIAL_EXPANDED_COLUMN_GROUPS,
|
|
4708
4725
|
payload: L
|
|
4709
4726
|
}), e({
|
|
4710
|
-
type:
|
|
4727
|
+
type: l.ROW_DRAG_MANAGED,
|
|
4711
4728
|
payload: g
|
|
4712
4729
|
}), e({
|
|
4713
|
-
type:
|
|
4730
|
+
type: l.SET_PAGE_SIZE,
|
|
4714
4731
|
payload: c
|
|
4715
4732
|
}), d !== void 0 && e({
|
|
4716
|
-
type:
|
|
4733
|
+
type: l.ENABLE_ROW_SPAN,
|
|
4717
4734
|
payload: d
|
|
4718
4735
|
}), f !== void 0 && e({
|
|
4719
|
-
type:
|
|
4736
|
+
type: l.SET_ROW_SPAN_COLUMN,
|
|
4720
4737
|
payload: f
|
|
4721
4738
|
}), e({
|
|
4722
|
-
type:
|
|
4739
|
+
type: l.SET_FIELD_KEYS,
|
|
4723
4740
|
payload: { uniqueIdField: i, childKeyField: o }
|
|
4724
4741
|
}), e({
|
|
4725
|
-
type:
|
|
4742
|
+
type: l.INFINITE_SCROLL,
|
|
4726
4743
|
payload: C
|
|
4727
4744
|
}), e({
|
|
4728
|
-
type:
|
|
4745
|
+
type: l.ADD_TABLE_INSTANCE,
|
|
4729
4746
|
payload: r
|
|
4730
4747
|
}), e({
|
|
4731
|
-
type:
|
|
4732
|
-
payload: { ...
|
|
4748
|
+
type: l.SET_TABLE_API,
|
|
4749
|
+
payload: { ...a, ...h }
|
|
4733
4750
|
}), e({
|
|
4734
|
-
type:
|
|
4751
|
+
type: l.SET_SMART_GRID_MENU_OPTIONS,
|
|
4735
4752
|
payload: p
|
|
4736
4753
|
}), e({
|
|
4737
|
-
type:
|
|
4754
|
+
type: l.ROW_GROUP_CACHE_ENABLE,
|
|
4738
4755
|
payload: R
|
|
4739
4756
|
}), e({
|
|
4740
|
-
type:
|
|
4757
|
+
type: l.DETAIL_RENDERER_TABLE,
|
|
4741
4758
|
payload: P
|
|
4742
4759
|
}), e({
|
|
4743
|
-
type:
|
|
4744
|
-
payload:
|
|
4760
|
+
type: l.IS_SAVE_VIEW_ENABLED,
|
|
4761
|
+
payload: O
|
|
4745
4762
|
}), e({
|
|
4746
|
-
type:
|
|
4763
|
+
type: l.SET_REFS,
|
|
4747
4764
|
payload: {
|
|
4748
4765
|
callBackRef: K,
|
|
4749
|
-
exportCallbackRef:
|
|
4766
|
+
exportCallbackRef: j,
|
|
4750
4767
|
saveViewCallbackRef: q,
|
|
4751
4768
|
saveViewOptionsRef: ee,
|
|
4752
4769
|
clickCallbackRef: ce,
|
|
4753
|
-
rowSelectionRef:
|
|
4770
|
+
rowSelectionRef: s
|
|
4754
4771
|
}
|
|
4755
4772
|
}), e({
|
|
4756
|
-
type:
|
|
4773
|
+
type: l.SET_IS_SINGLE_SELECT,
|
|
4757
4774
|
payload: ne
|
|
4758
4775
|
}), e({
|
|
4759
|
-
type:
|
|
4776
|
+
type: l.SET_DEFAULT_COL_DEF,
|
|
4760
4777
|
payload: $
|
|
4761
4778
|
}), e({
|
|
4762
|
-
type:
|
|
4779
|
+
type: l.SET_SELECTABLE,
|
|
4763
4780
|
payload: te
|
|
4764
4781
|
}), e({
|
|
4765
|
-
type:
|
|
4782
|
+
type: l.SET_DISABLE_SELECT_ALL_RECORDS_OPTION,
|
|
4766
4783
|
payload: Z
|
|
4767
4784
|
}), e({
|
|
4768
|
-
type:
|
|
4769
|
-
payload: se
|
|
4770
|
-
}), e({
|
|
4771
|
-
type: s.SET_LAZY_LOAD_CELL_RENDERER,
|
|
4785
|
+
type: l.SET_COLUMN_BUFFER_SIZE,
|
|
4772
4786
|
payload: ae
|
|
4773
4787
|
}), e({
|
|
4774
|
-
type:
|
|
4775
|
-
payload:
|
|
4788
|
+
type: l.SET_LAZY_LOAD_CELL_RENDERER,
|
|
4789
|
+
payload: se
|
|
4776
4790
|
}), e({
|
|
4777
|
-
type:
|
|
4791
|
+
type: l.SET_HAS_SPLIT_RENDERER,
|
|
4792
|
+
payload: Ee
|
|
4793
|
+
}), e({
|
|
4794
|
+
type: l.SET_HAS_SPLIT_RENDERER_KEYS,
|
|
4778
4795
|
payload: fe
|
|
4779
4796
|
}), e({
|
|
4780
|
-
type:
|
|
4797
|
+
type: l.SET_REMOVE_SELECTION_ON_OPERATION,
|
|
4781
4798
|
payload: he
|
|
4782
4799
|
}), e({
|
|
4783
|
-
type:
|
|
4800
|
+
type: l.SET_CHAT_ENABLED,
|
|
4784
4801
|
payload: Ae
|
|
4785
4802
|
}), e({
|
|
4786
|
-
type:
|
|
4787
|
-
payload:
|
|
4803
|
+
type: l.SET_COMMENT_ENABLED,
|
|
4804
|
+
payload: ue
|
|
4788
4805
|
}), e({
|
|
4789
|
-
type:
|
|
4806
|
+
type: l.SET_REMOVE_CHECK_CONFIGURATION_ON_OPERATION,
|
|
4790
4807
|
payload: ie
|
|
4791
4808
|
}), e({
|
|
4792
|
-
type:
|
|
4809
|
+
type: l.SET_NO_HEADER_SELECTION_CHECKBOX,
|
|
4793
4810
|
payload: k
|
|
4794
4811
|
}), e({
|
|
4795
|
-
type:
|
|
4812
|
+
type: l.SET_DATA_IS_TREE_DATA,
|
|
4796
4813
|
payload: V
|
|
4797
4814
|
}), e({
|
|
4798
|
-
type:
|
|
4815
|
+
type: l.SET_VIRTUALIZATION_CONFIG,
|
|
4799
4816
|
payload: le
|
|
4800
4817
|
}), e({
|
|
4801
|
-
type:
|
|
4802
|
-
payload:
|
|
4818
|
+
type: l.SET_DISABLE_CURRENT_PAGE_RECORDS,
|
|
4819
|
+
payload: E
|
|
4803
4820
|
});
|
|
4804
4821
|
}, []), pe(() => {
|
|
4805
4822
|
e({
|
|
4806
|
-
type:
|
|
4823
|
+
type: l.SET_ROW_HEIGHT,
|
|
4807
4824
|
payload: Q
|
|
4808
4825
|
});
|
|
4809
4826
|
}, [Q]), pe(() => {
|
|
4810
4827
|
e({
|
|
4811
|
-
type:
|
|
4828
|
+
type: l.SAVE_VIEW_CALLBACKS,
|
|
4812
4829
|
payload: {
|
|
4813
4830
|
isSavingViewLoading: U,
|
|
4814
4831
|
savedViewsOptions: N
|
|
@@ -4816,10 +4833,10 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4816
4833
|
});
|
|
4817
4834
|
}, [N, U]), pe(() => {
|
|
4818
4835
|
e({
|
|
4819
|
-
type:
|
|
4820
|
-
payload:
|
|
4836
|
+
type: l.SET_SERVER_SIDE,
|
|
4837
|
+
payload: u
|
|
4821
4838
|
});
|
|
4822
|
-
}, [
|
|
4839
|
+
}, [u]), null), Nn = Tn(
|
|
4823
4840
|
void 0
|
|
4824
4841
|
), Ft = mn(
|
|
4825
4842
|
({
|
|
@@ -4834,23 +4851,23 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4834
4851
|
// Grid alignment props
|
|
4835
4852
|
tableId: f,
|
|
4836
4853
|
alignedGrids: c = [],
|
|
4837
|
-
initialExpandedColumnGroups:
|
|
4854
|
+
initialExpandedColumnGroups: u = {},
|
|
4838
4855
|
enableRowSpan: g = !1,
|
|
4839
4856
|
rowSpanColumn: C = null,
|
|
4840
4857
|
columnMap: L = {},
|
|
4841
|
-
infiniteScroll:
|
|
4858
|
+
infiniteScroll: a = !1,
|
|
4842
4859
|
rowDragManaged: p,
|
|
4843
4860
|
pinnedTopRows: R = [],
|
|
4844
4861
|
pinnedBottomRows: P = [],
|
|
4845
|
-
getRowStyle:
|
|
4862
|
+
getRowStyle: O,
|
|
4846
4863
|
tableInstance: U,
|
|
4847
4864
|
smartGridMenuOptions: N,
|
|
4848
4865
|
purgeClosedRowNodes: Q,
|
|
4849
|
-
detailRendererTable:
|
|
4866
|
+
detailRendererTable: _,
|
|
4850
4867
|
// Save View Props
|
|
4851
4868
|
isSaveViewEnabled: v,
|
|
4852
4869
|
isSavingViewLoading: K,
|
|
4853
|
-
savedViewsOptions:
|
|
4870
|
+
savedViewsOptions: j,
|
|
4854
4871
|
rowHeight: q,
|
|
4855
4872
|
callBackRef: ee,
|
|
4856
4873
|
exportCallbackRef: ne,
|
|
@@ -4858,20 +4875,20 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4858
4875
|
saveViewOptionsRef: Z,
|
|
4859
4876
|
clickCallbackRef: te,
|
|
4860
4877
|
// Row selection
|
|
4861
|
-
isSingleSelect:
|
|
4862
|
-
selectable:
|
|
4863
|
-
disableSelectAllRecords:
|
|
4878
|
+
isSingleSelect: ae = !1,
|
|
4879
|
+
selectable: se,
|
|
4880
|
+
disableSelectAllRecords: Ee,
|
|
4864
4881
|
columnBufferSize: fe,
|
|
4865
4882
|
lazyLoadCellRenderer: he,
|
|
4866
4883
|
hasSplitRenderer: ie,
|
|
4867
4884
|
splitRendererKeys: ce,
|
|
4868
4885
|
removeSelectionOnOperation: Ae,
|
|
4869
|
-
removeCheckConfigurationOnOperation:
|
|
4886
|
+
removeCheckConfigurationOnOperation: ue,
|
|
4870
4887
|
isChatEnabled: k,
|
|
4871
4888
|
isCommentFeatureEnabled: V,
|
|
4872
4889
|
noHeaderSelection: le,
|
|
4873
|
-
treeData:
|
|
4874
|
-
virtualizationConfig:
|
|
4890
|
+
treeData: s,
|
|
4891
|
+
virtualizationConfig: E,
|
|
4875
4892
|
rowSelectionRef: h,
|
|
4876
4893
|
disableCurrentPageRecords: B
|
|
4877
4894
|
}, w) => {
|
|
@@ -4879,41 +4896,41 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4879
4896
|
{}
|
|
4880
4897
|
), F = Dt().getState().dispatch, x = Ie(
|
|
4881
4898
|
(H) => {
|
|
4882
|
-
var re, Ce, we,
|
|
4899
|
+
var re, Ce, we, Oe, ve, Re;
|
|
4883
4900
|
F(H);
|
|
4884
4901
|
const b = m.current.state || {};
|
|
4885
4902
|
if (b != null && b.api && ((re = b.api) != null && re.dispatchEvent)) {
|
|
4886
|
-
const Qe =
|
|
4903
|
+
const Qe = Et[H.type];
|
|
4887
4904
|
if (Qe) {
|
|
4888
4905
|
let oe = { api: b.api };
|
|
4889
4906
|
const Y = H.payload;
|
|
4890
4907
|
switch (H.type) {
|
|
4891
|
-
case
|
|
4892
|
-
case
|
|
4908
|
+
case l.SET_COLUMN_WIDTH:
|
|
4909
|
+
case l.SET_COLUMNS_WIDTH:
|
|
4893
4910
|
oe = {
|
|
4894
4911
|
...oe,
|
|
4895
4912
|
column: (Y == null ? void 0 : Y.column) || (Y == null ? void 0 : Y.columns)
|
|
4896
4913
|
};
|
|
4897
4914
|
break;
|
|
4898
|
-
case
|
|
4915
|
+
case l.REORDER_COLUMNS:
|
|
4899
4916
|
oe = { ...oe, columns: H.payload };
|
|
4900
4917
|
break;
|
|
4901
|
-
case
|
|
4918
|
+
case l.TOGGLE_COLUMN_VISIBILITY:
|
|
4902
4919
|
oe = {
|
|
4903
4920
|
...oe,
|
|
4904
4921
|
column: Y == null ? void 0 : Y.column,
|
|
4905
4922
|
visible: Y == null ? void 0 : Y.visible
|
|
4906
4923
|
};
|
|
4907
4924
|
break;
|
|
4908
|
-
case
|
|
4925
|
+
case l.SET_SORT:
|
|
4909
4926
|
oe = { ...oe, sortState: H.payload };
|
|
4910
4927
|
break;
|
|
4911
|
-
case
|
|
4912
|
-
case
|
|
4913
|
-
case
|
|
4928
|
+
case l.SET_COLUMN_FILTER:
|
|
4929
|
+
case l.REMOVE_COLUMN_FILTER:
|
|
4930
|
+
case l.APPLY_FILTERS:
|
|
4914
4931
|
Cn(b), oe = { ...oe, filterState: b.columnFilters };
|
|
4915
4932
|
break;
|
|
4916
|
-
case
|
|
4933
|
+
case l.SET_PAGE:
|
|
4917
4934
|
oe = {
|
|
4918
4935
|
...oe,
|
|
4919
4936
|
paginationState: {
|
|
@@ -4922,7 +4939,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4922
4939
|
}
|
|
4923
4940
|
};
|
|
4924
4941
|
break;
|
|
4925
|
-
case
|
|
4942
|
+
case l.SET_PAGE_SIZE:
|
|
4926
4943
|
Cn(b), oe = {
|
|
4927
4944
|
...oe,
|
|
4928
4945
|
paginationState: {
|
|
@@ -4931,7 +4948,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4931
4948
|
}
|
|
4932
4949
|
};
|
|
4933
4950
|
break;
|
|
4934
|
-
case
|
|
4951
|
+
case l.UPDATE_ROW_DATA:
|
|
4935
4952
|
oe = {
|
|
4936
4953
|
...oe,
|
|
4937
4954
|
data: Y != null && Y.rowId ? (Ce = b.data) == null ? void 0 : Ce.find(
|
|
@@ -4942,17 +4959,17 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4942
4959
|
oldValue: Y == null ? void 0 : Y.oldValue
|
|
4943
4960
|
};
|
|
4944
4961
|
break;
|
|
4945
|
-
case
|
|
4962
|
+
case l.UPDATE_ROW_DATA_OBJECT:
|
|
4946
4963
|
oe = {
|
|
4947
4964
|
...oe,
|
|
4948
4965
|
data: Y == null ? void 0 : Y.rowData,
|
|
4949
4966
|
changes: Y == null ? void 0 : Y.changes
|
|
4950
4967
|
};
|
|
4951
4968
|
break;
|
|
4952
|
-
case
|
|
4969
|
+
case l.SET_SELECTED_ROWS:
|
|
4953
4970
|
oe = { ...oe, selectedRows: H.payload };
|
|
4954
4971
|
break;
|
|
4955
|
-
case
|
|
4972
|
+
case l.TOGGLE_ROW_GROUP:
|
|
4956
4973
|
oe = {
|
|
4957
4974
|
...oe,
|
|
4958
4975
|
groupId: Y == null ? void 0 : Y.groupId,
|
|
@@ -4960,7 +4977,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4960
4977
|
isExpanded: Y == null ? void 0 : Y.isExpanded
|
|
4961
4978
|
};
|
|
4962
4979
|
break;
|
|
4963
|
-
case
|
|
4980
|
+
case l.SET_ROW_GROUP_DATA:
|
|
4964
4981
|
oe = {
|
|
4965
4982
|
...oe,
|
|
4966
4983
|
groupId: Y == null ? void 0 : Y.groupId,
|
|
@@ -4969,7 +4986,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4969
4986
|
hasMoreData: Y == null ? void 0 : Y.hasMoreData
|
|
4970
4987
|
};
|
|
4971
4988
|
break;
|
|
4972
|
-
case
|
|
4989
|
+
case l.TOGGLE_GROUP_EXPANSION:
|
|
4973
4990
|
oe = {
|
|
4974
4991
|
...oe,
|
|
4975
4992
|
rowId: Y == null ? void 0 : Y.rowId,
|
|
@@ -4980,7 +4997,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4980
4997
|
b.api.dispatchEvent(Qe, oe);
|
|
4981
4998
|
}
|
|
4982
4999
|
}
|
|
4983
|
-
!b.tableId || !((
|
|
5000
|
+
!b.tableId || !((Oe = (we = I.current) == null ? void 0 : we.alignedGrids) != null && Oe.length) || (ve = H.meta) != null && ve.fromAlignedGrid || !ut.includes(H.type) || (Re = I.current) != null && Re.propagateChange && I.current.propagateChange(
|
|
4984
5001
|
H.type,
|
|
4985
5002
|
H.payload,
|
|
4986
5003
|
H.meta
|
|
@@ -5001,16 +5018,16 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5001
5018
|
pageSize: d,
|
|
5002
5019
|
serverSide: o,
|
|
5003
5020
|
rowDragManaged: p,
|
|
5004
|
-
infiniteScroll:
|
|
5005
|
-
initialExpandedColumnGroups:
|
|
5021
|
+
infiniteScroll: a,
|
|
5022
|
+
initialExpandedColumnGroups: u,
|
|
5006
5023
|
tableApi: A,
|
|
5007
5024
|
smartGridMenuOptions: N,
|
|
5008
5025
|
purgeClosedRowNodes: Q,
|
|
5009
|
-
detailRendererTable:
|
|
5026
|
+
detailRendererTable: _,
|
|
5010
5027
|
// Save View Props
|
|
5011
5028
|
isSaveViewEnabled: v,
|
|
5012
5029
|
isSavingViewLoading: K,
|
|
5013
|
-
savedViewsOptions:
|
|
5030
|
+
savedViewsOptions: j,
|
|
5014
5031
|
rowHeight: q,
|
|
5015
5032
|
tableId: f,
|
|
5016
5033
|
refObj: m,
|
|
@@ -5019,27 +5036,27 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5019
5036
|
exportCallbackRef: ne,
|
|
5020
5037
|
saveViewCallbackRef: $,
|
|
5021
5038
|
saveViewOptionsRef: Z,
|
|
5022
|
-
isSingleSelect:
|
|
5039
|
+
isSingleSelect: ae,
|
|
5023
5040
|
defaultColDef: i,
|
|
5024
|
-
disableSelectAllRecords:
|
|
5025
|
-
selectable:
|
|
5041
|
+
disableSelectAllRecords: Ee,
|
|
5042
|
+
selectable: se,
|
|
5026
5043
|
columnBufferSize: fe,
|
|
5027
5044
|
lazyLoadCellRenderer: he,
|
|
5028
5045
|
hasSplitRenderer: ie,
|
|
5029
5046
|
splitRendererKeys: ce,
|
|
5030
5047
|
removeSelectionOnOperation: Ae,
|
|
5031
|
-
removeCheckConfigurationOnOperation:
|
|
5048
|
+
removeCheckConfigurationOnOperation: ue,
|
|
5032
5049
|
clickCallbackRef: te,
|
|
5033
5050
|
isChatEnabled: k,
|
|
5034
5051
|
isCommentFeatureEnabled: V,
|
|
5035
5052
|
noHeaderSelection: le,
|
|
5036
|
-
treeData:
|
|
5037
|
-
virtualizationConfig:
|
|
5053
|
+
treeData: s,
|
|
5054
|
+
virtualizationConfig: E,
|
|
5038
5055
|
rowSelectionRef: h,
|
|
5039
5056
|
disableCurrentPageRecords: B
|
|
5040
5057
|
}), pe(() => {
|
|
5041
5058
|
F({
|
|
5042
|
-
type:
|
|
5059
|
+
type: l.SET_COLUMNS,
|
|
5043
5060
|
payload: n,
|
|
5044
5061
|
meta: { defaultColDef: i }
|
|
5045
5062
|
});
|
|
@@ -5049,7 +5066,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5049
5066
|
n.forEach((Ce) => {
|
|
5050
5067
|
Ce.width || (re = !0, b[M(Ce)] = !0);
|
|
5051
5068
|
}), re && F({
|
|
5052
|
-
type:
|
|
5069
|
+
type: l.AUTOSIZE_COLUMNS_REQUESTED,
|
|
5053
5070
|
payload: { columnsToAutosize: b }
|
|
5054
5071
|
});
|
|
5055
5072
|
}, 100);
|
|
@@ -5058,7 +5075,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5058
5075
|
const D = Ie(
|
|
5059
5076
|
(H, b) => {
|
|
5060
5077
|
H && x({
|
|
5061
|
-
type:
|
|
5078
|
+
type: l.TOGGLE_GROUP_EXPANSION,
|
|
5062
5079
|
payload: { rowId: String(H), rowIndex: b }
|
|
5063
5080
|
});
|
|
5064
5081
|
},
|
|
@@ -5090,12 +5107,12 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5090
5107
|
return;
|
|
5091
5108
|
}
|
|
5092
5109
|
x({
|
|
5093
|
-
type:
|
|
5110
|
+
type: l.ADD_EVENT_LISTENER,
|
|
5094
5111
|
payload: { eventType: H, listener: b, once: re }
|
|
5095
5112
|
});
|
|
5096
5113
|
},
|
|
5097
5114
|
[x]
|
|
5098
|
-
),
|
|
5115
|
+
), S = Ie(
|
|
5099
5116
|
(H, b) => {
|
|
5100
5117
|
if (!We.includes(H)) {
|
|
5101
5118
|
console.warn(
|
|
@@ -5110,7 +5127,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5110
5127
|
return;
|
|
5111
5128
|
}
|
|
5112
5129
|
x({
|
|
5113
|
-
type:
|
|
5130
|
+
type: l.REMOVE_EVENT_LISTENER,
|
|
5114
5131
|
payload: { eventType: H, listener: b }
|
|
5115
5132
|
});
|
|
5116
5133
|
},
|
|
@@ -5119,13 +5136,13 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5119
5136
|
(H, b) => {
|
|
5120
5137
|
const re = vt(m.current.state, H, b) || [];
|
|
5121
5138
|
Array.isArray(re) && re.forEach((Ce) => {
|
|
5122
|
-
|
|
5139
|
+
S(H, Ce);
|
|
5123
5140
|
});
|
|
5124
5141
|
},
|
|
5125
|
-
[
|
|
5142
|
+
[S]
|
|
5126
5143
|
);
|
|
5127
5144
|
pe(() => () => {
|
|
5128
|
-
F({ type:
|
|
5145
|
+
F({ type: l.CLEANUP_TABLE_RESOURCES });
|
|
5129
5146
|
}, []);
|
|
5130
5147
|
const X = Rn(() => {
|
|
5131
5148
|
var H;
|
|
@@ -5135,23 +5152,23 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5135
5152
|
api: {
|
|
5136
5153
|
...A,
|
|
5137
5154
|
addEventListener: z,
|
|
5138
|
-
removeEventListener:
|
|
5155
|
+
removeEventListener: S,
|
|
5139
5156
|
dispatchEvent: T
|
|
5140
5157
|
}
|
|
5141
5158
|
},
|
|
5142
5159
|
tableApi: A,
|
|
5143
5160
|
dispatch: x,
|
|
5144
|
-
ACTION_TYPES:
|
|
5161
|
+
ACTION_TYPES: l,
|
|
5145
5162
|
toggleGroupExpansion: D,
|
|
5146
5163
|
dispatchEvent: T,
|
|
5147
|
-
getRowStyle:
|
|
5164
|
+
getRowStyle: O
|
|
5148
5165
|
};
|
|
5149
5166
|
}, [
|
|
5150
5167
|
D,
|
|
5151
5168
|
T,
|
|
5152
|
-
S,
|
|
5153
|
-
z,
|
|
5154
5169
|
O,
|
|
5170
|
+
z,
|
|
5171
|
+
S,
|
|
5155
5172
|
x,
|
|
5156
5173
|
A
|
|
5157
5174
|
]);
|
|
@@ -5161,7 +5178,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5161
5178
|
{
|
|
5162
5179
|
refObj: m,
|
|
5163
5180
|
addEventListener: z,
|
|
5164
|
-
removeEventListener:
|
|
5181
|
+
removeEventListener: S,
|
|
5165
5182
|
dispatchEvent: T
|
|
5166
5183
|
}
|
|
5167
5184
|
),
|
|
@@ -5170,14 +5187,14 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5170
5187
|
}
|
|
5171
5188
|
), pr = mn((e, n) => {
|
|
5172
5189
|
const { tableId: t = "default" } = e;
|
|
5173
|
-
return /* @__PURE__ */ de(
|
|
5190
|
+
return /* @__PURE__ */ de(Ot, { tableId: t, children: /* @__PURE__ */ de(Ft, { ...e, ref: n }) });
|
|
5174
5191
|
}), bt = ({
|
|
5175
5192
|
refObj: e,
|
|
5176
5193
|
addEventListener: n,
|
|
5177
5194
|
removeEventListener: t,
|
|
5178
5195
|
dispatchEvent: r
|
|
5179
5196
|
}) => {
|
|
5180
|
-
const A =
|
|
5197
|
+
const A = St((i) => i);
|
|
5181
5198
|
return pe(() => {
|
|
5182
5199
|
e.current.state = A, e.current.state = {
|
|
5183
5200
|
...A,
|
|
@@ -5212,7 +5229,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5212
5229
|
secondaryButtonLabel: f = "Close",
|
|
5213
5230
|
primaryButtonProps: c = {}
|
|
5214
5231
|
}) => {
|
|
5215
|
-
const
|
|
5232
|
+
const u = Ie(() => {
|
|
5216
5233
|
n();
|
|
5217
5234
|
}, [n]), g = Ie(
|
|
5218
5235
|
(P) => {
|
|
@@ -5221,7 +5238,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5221
5238
|
[d, n]
|
|
5222
5239
|
);
|
|
5223
5240
|
if (!e) return null;
|
|
5224
|
-
const C = `ia-table-prompt-${A}`, L = A === "delete" || A === "error" ? "danger" : "primary",
|
|
5241
|
+
const C = `ia-table-prompt-${A}`, L = A === "delete" || A === "error" ? "danger" : "primary", a = o || f, p = o && A !== "success", R = /* @__PURE__ */ de("div", { className: "ia-table-prompt-overlay d-flex align-items-center justify-content-center", children: /* @__PURE__ */ Le(
|
|
5225
5242
|
"div",
|
|
5226
5243
|
{
|
|
5227
5244
|
className: `ia-table-prompt d-flex flex-column position-relative ${C}`,
|
|
@@ -5230,7 +5247,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5230
5247
|
"div",
|
|
5231
5248
|
{
|
|
5232
5249
|
className: "ia-table-prompt-close-icon cursor-pointer",
|
|
5233
|
-
onClick:
|
|
5250
|
+
onClick: u,
|
|
5234
5251
|
"aria-label": "Close",
|
|
5235
5252
|
children: /* @__PURE__ */ de(Wn, { width: "11.67", height: "11.67" })
|
|
5236
5253
|
}
|
|
@@ -5240,7 +5257,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5240
5257
|
t && /* @__PURE__ */ de("div", { className: "ia-table-prompt-title", children: t }),
|
|
5241
5258
|
r && /* @__PURE__ */ de("div", { className: "ia-table-prompt-message", children: r })
|
|
5242
5259
|
] }),
|
|
5243
|
-
|
|
5260
|
+
a && /* @__PURE__ */ Le("div", { className: "ia-table-prompt-footer d-flex justify-content-center align-items-center gap-12", children: [
|
|
5244
5261
|
f && /* @__PURE__ */ de(dn, { onClick: g, variant: "text", children: f }),
|
|
5245
5262
|
p && /* @__PURE__ */ de(
|
|
5246
5263
|
dn,
|
|
@@ -5255,7 +5272,7 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5255
5272
|
]
|
|
5256
5273
|
}
|
|
5257
5274
|
) });
|
|
5258
|
-
return
|
|
5275
|
+
return On(R, document.body);
|
|
5259
5276
|
}, wr = Hn(Wt), Br = ({
|
|
5260
5277
|
isMultiSelect: e,
|
|
5261
5278
|
cellValue: n,
|
|
@@ -5279,10 +5296,10 @@ const Dt = () => An(ln) || xn, _e = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5279
5296
|
}, Tr = (e, n) => typeof n == "number" ? n : n === "center" ? e.height / 2 : n === "bottom" ? e.height : 0, Rr = (e, n) => typeof n == "number" ? n : n === "center" ? e.width / 2 : n === "right" ? e.width : 0, mr = (e) => {
|
|
5280
5297
|
const n = typeof e.horizontal == "number" ? `${e.horizontal}px` : e.horizontal, t = typeof e.vertical == "number" ? `${e.vertical}px` : e.vertical;
|
|
5281
5298
|
return `${n} ${t}`;
|
|
5282
|
-
},
|
|
5299
|
+
}, Or = {
|
|
5283
5300
|
vertical: "bottom",
|
|
5284
5301
|
horizontal: "left"
|
|
5285
|
-
},
|
|
5302
|
+
}, Sr = {
|
|
5286
5303
|
vertical: "top",
|
|
5287
5304
|
horizontal: "left"
|
|
5288
5305
|
};
|
|
@@ -5293,24 +5310,24 @@ function Pr(e) {
|
|
|
5293
5310
|
return e.type !== "date-separator";
|
|
5294
5311
|
}
|
|
5295
5312
|
export {
|
|
5296
|
-
|
|
5313
|
+
l as A,
|
|
5297
5314
|
rt as B,
|
|
5298
5315
|
gr as C,
|
|
5299
5316
|
cr as D,
|
|
5300
5317
|
Zt as E,
|
|
5301
5318
|
Ze as F,
|
|
5302
|
-
|
|
5319
|
+
me as G,
|
|
5303
5320
|
ke as H,
|
|
5304
5321
|
qe as I,
|
|
5305
5322
|
fr as J,
|
|
5306
|
-
|
|
5323
|
+
Er as K,
|
|
5307
5324
|
Vt as L,
|
|
5308
5325
|
Qt as M,
|
|
5309
5326
|
Pr as N,
|
|
5310
5327
|
Dr as O,
|
|
5311
5328
|
wr as P,
|
|
5312
|
-
|
|
5313
|
-
|
|
5329
|
+
Or as Q,
|
|
5330
|
+
Sr as R,
|
|
5314
5331
|
Jt as S,
|
|
5315
5332
|
pr as T,
|
|
5316
5333
|
mr as U,
|
|
@@ -5322,21 +5339,21 @@ export {
|
|
|
5322
5339
|
Ct as d,
|
|
5323
5340
|
rr as e,
|
|
5324
5341
|
Ar as f,
|
|
5325
|
-
|
|
5342
|
+
st as g,
|
|
5326
5343
|
dr as h,
|
|
5327
5344
|
Br as i,
|
|
5328
|
-
|
|
5329
|
-
|
|
5345
|
+
un as j,
|
|
5346
|
+
sr as k,
|
|
5330
5347
|
or as l,
|
|
5331
|
-
|
|
5348
|
+
ar as m,
|
|
5332
5349
|
ir as n,
|
|
5333
5350
|
tr as o,
|
|
5334
|
-
|
|
5351
|
+
_e as p,
|
|
5335
5352
|
ct as q,
|
|
5336
5353
|
hr as r,
|
|
5337
|
-
|
|
5354
|
+
ur as s,
|
|
5338
5355
|
tt as t,
|
|
5339
|
-
|
|
5356
|
+
St as u,
|
|
5340
5357
|
nr as v,
|
|
5341
5358
|
qt as w,
|
|
5342
5359
|
lr as x,
|