ia-table 0.15.7 → 0.15.9
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.js +1 -1
- package/dist/{chat.type-BS4ghrYz.js → chat.type-CFfIJEWo.js} +1138 -1123
- package/dist/index.js +14 -11
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ia-table-menu-container{position:relative}@keyframes menuTravelFromTop{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes menuTravelToTop{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes menuTravelFromBottom{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes menuTravelToBottom{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}@keyframes menuTravelFromLeft{0%{opacity:0;transform:translate(-20px)}to{opacity:1;transform:translate(0)}}@keyframes menuTravelToLeft{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(-20px)}}@keyframes menuTravelFromRight{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}@keyframes menuTravelToRight{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(20px)}}@keyframes menuFadeIn{0%{opacity:0}to{opacity:1}}@keyframes menuFadeOut{0%{opacity:1}to{opacity:0}}.ia-table-menu-submenu{background-color:#fff;box-shadow:0 0 4px #0000001f;z-index:9999;margin-top:6px;border-radius:12px;padding:8px 6px;will-change:transform,opacity}.ia-table-menu-submenu.ia-table-submenu-only{margin-top:-5px}.ia-table-menu-submenu.menu-entered{opacity:1;transform:scale(1)}.ia-table-menu-submenu.ia-table-position-bottom.flip-center.menu-entering{animation:menuTravelFromBottom .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-bottom.flip-left.menu-entering{animation:menuTravelFromLeft .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-bottom.flip-right.menu-entering{animation:menuTravelFromRight .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-bottom.menu-exiting{animation:menuTravelToBottom .2s ease-in forwards}.ia-table-menu-submenu.ia-table-position-top.flip-center.menu-entering{animation:menuTravelFromTop .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-top.flip-left.menu-entering{animation:menuTravelFromLeft .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-top.flip-right.menu-entering{animation:menuTravelFromRight .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-top.menu-exiting{animation:menuTravelToTop .2s ease-in forwards}.ia-table-menu-submenu.ia-table-position-left.flip-center.menu-entering{animation:menuTravelFromLeft .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-left.flip-top.menu-entering{animation:menuTravelFromTop .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-left.flip-bottom.menu-entering{animation:menuTravelFromBottom .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-left.menu-exiting{animation:menuTravelToLeft .2s ease-in forwards}.ia-table-menu-submenu.ia-table-position-right.flip-center.menu-entering{animation:menuTravelFromRight .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-right.flip-top.menu-entering{animation:menuTravelFromTop .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-right.flip-bottom.menu-entering{animation:menuTravelFromBottom .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-right.menu-exiting{animation:menuTravelToRight .2s ease-in forwards}.ia-table-menu-submenu .ia-table-menu-option{padding:7.5px 12px;font-family:Manrope,sans-serif;font-size:14px;color:#0d152c;line-height:20px;position:relative}.ia-table-menu-submenu .ia-table-menu-option:hover{background-color:#eceefd}.ia-table-menu-submenu .ia-table-menu-option.ia-table-menu-option-selected{background-color:#eceefd;color:#0d152c}.ia-table-menu-submenu .ia-table-menu-option.ia-table-menu-option-selected .ia-table-menu-option-svg path,.ia-table-menu-submenu .ia-table-menu-option.ia-table-menu-option-selected .ia-table-menu-option-svg rect{fill:#4259ee}.ia-table-menu-submenu .ia-table-menu-option.submenu-active{background-color:#eceefd}.ia-table-menu-submenu .ia-table-menu-option.submenu-active .ia-table-menu-option-svg path,.ia-table-menu-submenu .ia-table-menu-option.submenu-active .ia-table-menu-option-svg rect{fill:#4259ee}.ia-table-menu-submenu .ia-table-menu-option .submenu-indicator{color:#6e7781}.ia-table-menu-submenu .ia-table-menu-option .submenu-indicator svg{width:6px;height:10px}.ia-table-menu-submenu button{background-color:inherit;height:35px;border:none;border-radius:8px;padding:7.5px 12px;font-family:Manrope,sans-serif;font-size:14px;color:#0d152c;line-height:20px;position:relative}.ia-table-menu-submenu button:hover{background-color:#eceefd}.ia-table-prompt-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:10000;animation:ia-table-prompt-fade-in .2s ease-out}.ia-table-prompt-overlay .ia-table-prompt{width:400px;height:224px;background-color:#fff;box-shadow:0 0 4px #0000001f;border-radius:8px;max-height:90vh;animation:ia-table-prompt-slide-in .2s ease-out;max-width:95vw;overflow:hidden}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-header{height:28px;padding:8px 16px 0}.ia-table-prompt-overlay .ia-table-prompt .ia-table-promt-cross-icon{height:20px;width:20px}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-content{padding:0 60px;flex:1;overflow-y:auto}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-content-icon{height:48px;width:48px}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-content .ia-table-prompt-title{margin-top:8px;font-family:Manrope,sans-serif;font-weight:800;font-size:16px;line-height:24px;color:#0d152c}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-content .ia-table-prompt-message{margin-top:4px;font-family:Manrope,sans-serif;font-weight:500;font-size:12px;line-height:16px;color:#60697d;text-align:center}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-footer{padding:16px;flex-shrink:0;margin-top:auto}@keyframes ia-table-prompt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes ia-table-prompt-slide-in{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@media(max-width:768px){.ia-table-prompt-overlay .ia-table-prompt{width:95vw}}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
2
|
import * as J from "react";
|
|
3
|
-
import Mn, { createContext as
|
|
3
|
+
import Mn, { createContext as Rn, useContext as An, useMemo as Tn, 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
|
|
5
|
+
import { createPortal as Sn } from "react-dom";
|
|
6
|
+
import { g as F, 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" })), _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}`,
|
|
9
|
-
var f, c,
|
|
10
|
-
const t = Me(), r =
|
|
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}`, On = (e, n = { path: [] }) => {
|
|
9
|
+
var f, c, E, g, u, P, a, p;
|
|
10
|
+
const t = Me(), r = F(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 = ((u = (g = (E = e.column_name) == null ? void 0 : E.split) == null ? void 0 : g.call(E, W)) == null ? void 0 : u[0]) || e.column_name, o = ((p = (a = (P = e.accessor) == null ? void 0 : P.split) == null ? void 0 : a.call(P, 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}`,
|
|
@@ -18,31 +18,31 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
18
18
|
`${r}${W}${t}`
|
|
19
19
|
],
|
|
20
20
|
originalId: d,
|
|
21
|
-
originalPath: e.path ? [...e.path.map((
|
|
21
|
+
originalPath: e.path ? [...e.path.map((T) => T.split(W)[0])] : [d],
|
|
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, E, g, u, P, a, p, T, D, S, 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
|
-
const t =
|
|
28
|
+
const t = F(e);
|
|
29
29
|
return {
|
|
30
30
|
...n,
|
|
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: ((
|
|
35
|
-
_originalField: e._originalField || ((
|
|
36
|
-
path: e.originalPath ? (
|
|
37
|
-
id: ((
|
|
34
|
+
column_name: ((E = (c = (f = e.column_name) == null ? void 0 : f.split) == null ? void 0 : c.call(f, W)) == null ? void 0 : E[0]) || e.column_name,
|
|
35
|
+
_originalField: e._originalField || ((u = (g = t == null ? void 0 : t.split) == null ? void 0 : g.call(t, W)) == null ? void 0 : u[0]),
|
|
36
|
+
path: e.originalPath ? (P = e.originalPath) == null ? void 0 : P.map((y) => y.split(W)[0]) : e.path,
|
|
37
|
+
id: ((T = (p = (a = e.id) == null ? void 0 : a.split) == null ? void 0 : p.call(a, W)) == null ? void 0 : T[0]) || e.id,
|
|
38
38
|
originalPath: null,
|
|
39
|
-
parent_id: (
|
|
40
|
-
(
|
|
39
|
+
parent_id: (D = e.parent_id) == null ? void 0 : D.map(
|
|
40
|
+
(y) => {
|
|
41
41
|
var _, v;
|
|
42
|
-
return typeof
|
|
42
|
+
return typeof y == "string" ? (v = (_ = y == null ? void 0 : y.split) == null ? void 0 : _.call(y, W)) == null ? void 0 : v[0] : y;
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
parentField: (N = (U = (
|
|
45
|
+
parentField: (N = (U = (S = e.parentField) == null ? void 0 : S.split) == null ? void 0 : U.call(S, W)) == null ? void 0 : N[0]
|
|
46
46
|
};
|
|
47
47
|
}, on = (e) => {
|
|
48
48
|
var r, A, i, o;
|
|
@@ -51,14 +51,14 @@ 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, E = f.originalPath || f.path;
|
|
55
|
+
if (!c || !E) {
|
|
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
|
|
60
|
+
if (g.length > 0 && g.length === c.length && g.length === E.length) {
|
|
61
|
+
const P = d.isReorderedColumn && f.isReorderedColumn, a = Me(t), p = g[g.length - 1].split(W)[0], T = P ? {
|
|
62
62
|
...d,
|
|
63
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
64
|
field: `${p}${W}${a}`,
|
|
@@ -72,43 +72,43 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
72
72
|
} : {
|
|
73
73
|
...Kn(d),
|
|
74
74
|
children: []
|
|
75
|
-
},
|
|
76
|
-
const _ = [...
|
|
75
|
+
}, D = (U, N, y) => {
|
|
76
|
+
const _ = [...y, F(U)], v = {
|
|
77
77
|
...U,
|
|
78
|
-
originalPath: _.map((
|
|
78
|
+
originalPath: _.map((X) => X.split(W)[0]),
|
|
79
79
|
path: _
|
|
80
80
|
};
|
|
81
81
|
return v.children && v.children.length > 0 && (v.children = v.children.map(
|
|
82
|
-
(
|
|
83
|
-
|
|
82
|
+
(X) => D(
|
|
83
|
+
X,
|
|
84
84
|
N,
|
|
85
85
|
v.path
|
|
86
86
|
)
|
|
87
87
|
)), v.path = _, v;
|
|
88
|
-
},
|
|
88
|
+
}, S = [];
|
|
89
89
|
if (d.children && d.children.length > 0) {
|
|
90
|
-
const U =
|
|
90
|
+
const U = F(T);
|
|
91
91
|
d.children.forEach((N) => {
|
|
92
|
-
const
|
|
92
|
+
const y = D(
|
|
93
93
|
N,
|
|
94
94
|
d.path || [],
|
|
95
|
-
|
|
95
|
+
T.path || []
|
|
96
96
|
);
|
|
97
|
-
|
|
97
|
+
y.parent_id = [U], y.parentField = U, S.push(y);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
if (f.children && f.children.length > 0) {
|
|
101
|
-
const U =
|
|
101
|
+
const U = F(T);
|
|
102
102
|
f.children.forEach((N) => {
|
|
103
|
-
const
|
|
103
|
+
const y = D(
|
|
104
104
|
N,
|
|
105
105
|
f.path || [],
|
|
106
|
-
|
|
106
|
+
T.path || []
|
|
107
107
|
);
|
|
108
|
-
|
|
108
|
+
y.parent_id = [U], y.parentField = U, S.push(y);
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
T.children = S, n.splice(t, 2, T);
|
|
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]), E = t(A[0]);
|
|
122
|
+
if (c !== E)
|
|
123
123
|
return [];
|
|
124
124
|
}
|
|
125
125
|
const i = e.originalPath || e.path, o = n.originalPath || n.path;
|
|
@@ -130,7 +130,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
130
130
|
return d;
|
|
131
131
|
}, Dn = (e, n) => {
|
|
132
132
|
for (const t of e) {
|
|
133
|
-
if (
|
|
133
|
+
if (F(t) === n)
|
|
134
134
|
return t;
|
|
135
135
|
if (t.children && t.children.length > 0) {
|
|
136
136
|
const r = Dn(t.children, n);
|
|
@@ -139,7 +139,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
139
139
|
}
|
|
140
140
|
return null;
|
|
141
141
|
}, en = (e, n) => {
|
|
142
|
-
const t =
|
|
142
|
+
const t = F(e);
|
|
143
143
|
if (t === n || t.split(W)[0] === n.split(W)[0])
|
|
144
144
|
return e;
|
|
145
145
|
if (e.children && e.children.length > 0)
|
|
@@ -198,101 +198,101 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
198
198
|
...d
|
|
199
199
|
);
|
|
200
200
|
}, qn = (e, n) => {
|
|
201
|
-
var
|
|
201
|
+
var u, P;
|
|
202
202
|
if (!n || n.length === 0 || n.length === 1)
|
|
203
203
|
return { removed: !1, hierarchy: null };
|
|
204
|
-
const t = (a, p) =>
|
|
204
|
+
const t = (a, p) => F(a) === p, r = e.findIndex(
|
|
205
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 = (a, p,
|
|
210
|
-
var Z,
|
|
209
|
+
const A = e[r], i = JSON.parse(JSON.stringify(A)), o = (a, p, T, D = [], S = 0) => {
|
|
210
|
+
var Z, re, ae, se;
|
|
211
211
|
if (!(a != null && a.children))
|
|
212
212
|
return { success: !1, hierarchy: null };
|
|
213
|
-
const U =
|
|
214
|
-
(
|
|
213
|
+
const U = T[0], N = a.children.findIndex(
|
|
214
|
+
(Ce) => t(Ce, U)
|
|
215
215
|
);
|
|
216
216
|
if (N === -1)
|
|
217
217
|
return { success: !1, hierarchy: null };
|
|
218
|
-
const
|
|
219
|
-
(
|
|
218
|
+
const y = (Z = p.children) == null ? void 0 : Z.find(
|
|
219
|
+
(Ce) => t(Ce, U)
|
|
220
220
|
);
|
|
221
|
-
if (!
|
|
221
|
+
if (!y)
|
|
222
222
|
return { success: !1, hierarchy: null };
|
|
223
|
-
if (
|
|
223
|
+
if (T.length === 1) {
|
|
224
224
|
a.children.splice(N, 1);
|
|
225
|
-
const
|
|
226
|
-
...
|
|
225
|
+
const Ce = Me(), fe = F(y).split(W)[0], he = `${W}${Ce}`, ie = `${fe}${he}`, ce = {
|
|
226
|
+
...y,
|
|
227
227
|
field: ie,
|
|
228
|
-
column_name:
|
|
229
|
-
accessor:
|
|
230
|
-
id:
|
|
231
|
-
path: [...
|
|
232
|
-
originalPath:
|
|
228
|
+
column_name: y.column_name ? `${y.column_name.split(W)[0]}${he}` : ie,
|
|
229
|
+
accessor: y.accessor ? `${y.accessor.split(W)[0]}${he}` : ie,
|
|
230
|
+
id: y.id ? `${y.id.split(W)[0]}${he}` : ie,
|
|
231
|
+
path: [...D, ie],
|
|
232
|
+
originalPath: y.originalPath || ((re = y.path) == null ? void 0 : re.map((Ae) => Ae.split(W)[0])),
|
|
233
233
|
originalId: fe,
|
|
234
|
-
_originalField:
|
|
234
|
+
_originalField: y._originalField || fe,
|
|
235
235
|
isReorderedColumn: !0
|
|
236
236
|
};
|
|
237
|
-
return
|
|
237
|
+
return D.length > 0 && (ce.parent_id = [D[D.length - 1]], ce.parentField = D[D.length - 1]), { success: !0, hierarchy: ce };
|
|
238
238
|
}
|
|
239
|
-
const _ = Me(), v =
|
|
239
|
+
const _ = Me(), v = F(y).split(W)[0], X = `${W}${_}`, K = `${v}${X}`, q = [...D, K], ee = a.children[N], ne = o(
|
|
240
240
|
ee,
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
y,
|
|
242
|
+
T.slice(1),
|
|
243
243
|
q,
|
|
244
|
-
|
|
244
|
+
S + 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
|
-
...
|
|
251
|
-
field:
|
|
252
|
-
column_name:
|
|
253
|
-
accessor:
|
|
254
|
-
id:
|
|
250
|
+
...y,
|
|
251
|
+
field: K,
|
|
252
|
+
column_name: y.column_name ? `${y.column_name.split(W)[0]}${X}` : K,
|
|
253
|
+
accessor: y.accessor ? `${y.accessor.split(W)[0]}${X}` : K,
|
|
254
|
+
id: y.id ? `${y.id.split(W)[0]}${X}` : K,
|
|
255
255
|
path: q,
|
|
256
|
-
originalPath:
|
|
256
|
+
originalPath: y.originalPath || ((se = y.path) == null ? void 0 : se.map((Ce) => Ce.split(W)[0])),
|
|
257
257
|
originalId: v,
|
|
258
|
-
_originalField:
|
|
258
|
+
_originalField: y._originalField || v,
|
|
259
259
|
isReorderedColumn: !0,
|
|
260
260
|
children: [ne.hierarchy]
|
|
261
261
|
};
|
|
262
|
-
return
|
|
262
|
+
return D.length > 0 && ($.parent_id = [D[D.length - 1]], $.parentField = D[D.length - 1]), ne.hierarchy && (ne.hierarchy.parent_id = [K], ne.hierarchy.parentField = K), {
|
|
263
263
|
success: !0,
|
|
264
264
|
hierarchy: $
|
|
265
265
|
};
|
|
266
|
-
}, d = Me(), f =
|
|
266
|
+
}, d = Me(), f = F(i).split(W)[0], c = `${W}${d}`, E = `${f}${c}`, g = o(
|
|
267
267
|
A,
|
|
268
268
|
i,
|
|
269
269
|
n.slice(1),
|
|
270
|
-
[
|
|
270
|
+
[E],
|
|
271
271
|
0
|
|
272
272
|
);
|
|
273
273
|
if (g.success) {
|
|
274
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: [
|
|
281
|
-
originalPath: i.originalPath || ((
|
|
276
|
+
field: E,
|
|
277
|
+
column_name: i.column_name ? `${i.column_name.split(W)[0]}${c}` : E,
|
|
278
|
+
accessor: i.accessor ? `${i.accessor.split(W)[0]}${c}` : E,
|
|
279
|
+
id: i.id ? `${i.id.split(W)[0]}${c}` : E,
|
|
280
|
+
path: [E],
|
|
281
|
+
originalPath: i.originalPath || ((u = i.path) == null ? void 0 : u.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 = [E], g.hierarchy.parentField = E), ((P = A.children) == null ? void 0 : P.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) => {
|
|
291
291
|
e.path || (e.path = []), n.path || (n.path = []);
|
|
292
292
|
const r = e.path[0] || "", A = n.path[0] || "", i = t.findIndex(
|
|
293
|
-
(N) =>
|
|
293
|
+
(N) => F(N) === r
|
|
294
294
|
), o = t.findIndex(
|
|
295
|
-
(N) =>
|
|
295
|
+
(N) => F(N) === A
|
|
296
296
|
);
|
|
297
297
|
if (i === -1 || o === -1)
|
|
298
298
|
return console.error("Could not find source or target column in columns array", {
|
|
@@ -306,70 +306,70 @@ 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
|
|
310
|
-
let g = 0,
|
|
311
|
-
if (
|
|
309
|
+
const E = i === c;
|
|
310
|
+
let g = 0, u = !1;
|
|
311
|
+
if (E) {
|
|
312
312
|
const { rightAddition: N } = et(
|
|
313
313
|
e,
|
|
314
314
|
n,
|
|
315
315
|
t[c]
|
|
316
316
|
);
|
|
317
|
-
|
|
317
|
+
u = N;
|
|
318
318
|
} else
|
|
319
|
-
|
|
320
|
-
const
|
|
319
|
+
u = i < c;
|
|
320
|
+
const P = Ne(
|
|
321
321
|
t[i]
|
|
322
322
|
);
|
|
323
323
|
let a = null, p = null;
|
|
324
|
-
const { removed:
|
|
324
|
+
const { removed: T, hierarchy: D } = qn(
|
|
325
325
|
t,
|
|
326
326
|
e.path
|
|
327
327
|
);
|
|
328
|
-
let
|
|
329
|
-
if (
|
|
328
|
+
let S = D;
|
|
329
|
+
if (u && T && !P)
|
|
330
330
|
Ne(
|
|
331
331
|
t[c]
|
|
332
332
|
) ? c++ : g++;
|
|
333
|
-
else if (
|
|
333
|
+
else if (u && T && P)
|
|
334
334
|
Ne(
|
|
335
335
|
t[c - 1]
|
|
336
336
|
) || (c--, g++);
|
|
337
|
-
else if (!
|
|
337
|
+
else if (!u && T)
|
|
338
338
|
Ne(
|
|
339
339
|
t[c]
|
|
340
340
|
) || g++;
|
|
341
|
-
else if (!
|
|
341
|
+
else if (!T) {
|
|
342
342
|
const N = Ne(
|
|
343
343
|
t[c]
|
|
344
344
|
);
|
|
345
|
-
!
|
|
345
|
+
!u && !N && g++, u && !N && g++;
|
|
346
346
|
}
|
|
347
347
|
if (n.path.length > 1) {
|
|
348
|
-
const { before: N, after:
|
|
348
|
+
const { before: N, after: y } = nt(
|
|
349
349
|
t[c],
|
|
350
350
|
0,
|
|
351
351
|
n.path.slice(1),
|
|
352
|
-
|
|
352
|
+
u
|
|
353
353
|
);
|
|
354
|
-
a =
|
|
354
|
+
a = y, p = N;
|
|
355
355
|
}
|
|
356
|
-
if ((p || a) && !
|
|
356
|
+
if ((p || a) && !S) {
|
|
357
357
|
const N = Ne(
|
|
358
358
|
t[c]
|
|
359
359
|
);
|
|
360
|
-
|
|
360
|
+
S = t.splice(i, 1)[0], u && !T && !N && c--;
|
|
361
361
|
}
|
|
362
|
-
if (
|
|
362
|
+
if (S)
|
|
363
363
|
Vn({
|
|
364
364
|
beforeHierarchy: p,
|
|
365
365
|
afterHierarchy: a,
|
|
366
|
-
newHierarchy:
|
|
366
|
+
newHierarchy: S,
|
|
367
367
|
targetColumFrozenState: d,
|
|
368
368
|
targetColumnFrozenPinned: f
|
|
369
369
|
}), Zn({
|
|
370
370
|
beforeHierarchy: p,
|
|
371
371
|
afterHierarchy: a,
|
|
372
|
-
newHierarchy:
|
|
372
|
+
newHierarchy: S,
|
|
373
373
|
updatedtargetIndex: c,
|
|
374
374
|
removeColumnsCount: g,
|
|
375
375
|
isChildrenUpdate: !1,
|
|
@@ -392,10 +392,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
392
392
|
const n = e.children[0];
|
|
393
393
|
return !n.children || n.children.length === 0 ? !0 : Ne(n);
|
|
394
394
|
}, cn = (e, n) => e.findIndex((t) => {
|
|
395
|
-
const r =
|
|
395
|
+
const r = F(t);
|
|
396
396
|
return r === n || r.split(W)[0] === n;
|
|
397
397
|
}), gn = (e, n) => e.findIndex((t) => {
|
|
398
|
-
const r =
|
|
398
|
+
const r = F(t), A = r.split(W)[0], i = n.split(W)[0], o = r === n || A === i, d = !o && Dn([t], n) !== null;
|
|
399
399
|
return o || d;
|
|
400
400
|
}), Pn = (e, n, t, r = 0) => {
|
|
401
401
|
if (!e.children || e.children.length === 0)
|
|
@@ -421,169 +421,169 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
421
421
|
}, et = (e, n, t) => {
|
|
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
|
-
if (f &&
|
|
424
|
+
if (f && F(c) !== f) {
|
|
425
425
|
const a = en(c, f);
|
|
426
426
|
a && (c = a);
|
|
427
427
|
}
|
|
428
|
-
let
|
|
429
|
-
c.children && (
|
|
428
|
+
let E = -1, g = -1;
|
|
429
|
+
c.children && (E = cn(
|
|
430
430
|
c.children,
|
|
431
431
|
o
|
|
432
432
|
), g = cn(
|
|
433
433
|
c.children,
|
|
434
434
|
d
|
|
435
435
|
));
|
|
436
|
-
const
|
|
437
|
-
var N,
|
|
436
|
+
const u = (a, p, T, D, S) => {
|
|
437
|
+
var N, y;
|
|
438
438
|
let U = i - 1;
|
|
439
439
|
for (; U >= 0; ) {
|
|
440
|
-
const _ = p[U], v =
|
|
441
|
-
let
|
|
442
|
-
if (_ &&
|
|
443
|
-
const
|
|
440
|
+
const _ = p[U], v = T[U + 1];
|
|
441
|
+
let X = t;
|
|
442
|
+
if (_ && F(X) !== _) {
|
|
443
|
+
const K = en(
|
|
444
444
|
t,
|
|
445
445
|
_
|
|
446
446
|
);
|
|
447
|
-
|
|
447
|
+
K && (X = K);
|
|
448
448
|
}
|
|
449
|
-
if (
|
|
450
|
-
const
|
|
451
|
-
const ee =
|
|
452
|
-
return ee === v || ee.split(W)[0] === v || ee.split(W)[0] ===
|
|
449
|
+
if (X.children) {
|
|
450
|
+
const K = X.children.findIndex((q) => {
|
|
451
|
+
const ee = F(q);
|
|
452
|
+
return ee === v || ee.split(W)[0] === v || ee.split(W)[0] === D;
|
|
453
453
|
});
|
|
454
|
-
if (
|
|
455
|
-
c =
|
|
456
|
-
const q = (a === "target" ? r : A)[U + 1], ee = a === "target" ? o : d, ne = (
|
|
454
|
+
if (K !== -1) {
|
|
455
|
+
c = X;
|
|
456
|
+
const q = (a === "target" ? r : A)[U + 1], ee = a === "target" ? o : d, ne = (y = (N = c.children) == null ? void 0 : N.findIndex) == null ? void 0 : y.call(
|
|
457
457
|
N,
|
|
458
458
|
($) => {
|
|
459
|
-
const Z =
|
|
459
|
+
const Z = F($);
|
|
460
460
|
return Z === q || Z.split(W)[0] === q || Z.split(W)[0] === ee;
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
return {
|
|
464
464
|
found: !0,
|
|
465
|
-
missingIndex:
|
|
465
|
+
missingIndex: K ?? -1,
|
|
466
466
|
foundIndex: ne ?? -1
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
U--;
|
|
471
471
|
}
|
|
472
|
-
return console.warn(`Could not find ${a} in any common parent`), { found: !1, missingIndex: -1, foundIndex:
|
|
472
|
+
return console.warn(`Could not find ${a} in any common parent`), { found: !1, missingIndex: -1, foundIndex: S };
|
|
473
473
|
};
|
|
474
|
-
if (
|
|
475
|
-
const a = o.split(W)[0], p = d.split(W)[0],
|
|
474
|
+
if (E === -1 && g === -1) {
|
|
475
|
+
const a = o.split(W)[0], p = d.split(W)[0], T = Pn(
|
|
476
476
|
t,
|
|
477
477
|
a,
|
|
478
478
|
p
|
|
479
479
|
);
|
|
480
|
-
|
|
480
|
+
T ? (c = T.parent, E = T.sourceIndex, g = T.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 a =
|
|
484
|
+
if (E >= 0 && g === -1) {
|
|
485
|
+
const a = u(
|
|
486
486
|
"target",
|
|
487
487
|
r,
|
|
488
488
|
A,
|
|
489
489
|
d,
|
|
490
|
-
|
|
490
|
+
E
|
|
491
491
|
);
|
|
492
|
-
a.found && (g = a.missingIndex,
|
|
492
|
+
a.found && (g = a.missingIndex, E = a.foundIndex);
|
|
493
493
|
}
|
|
494
|
-
if (g >= 0 &&
|
|
495
|
-
const a =
|
|
494
|
+
if (g >= 0 && E === -1) {
|
|
495
|
+
const a = u(
|
|
496
496
|
"source",
|
|
497
497
|
A,
|
|
498
498
|
r,
|
|
499
499
|
o,
|
|
500
500
|
g
|
|
501
501
|
);
|
|
502
|
-
a.found && (
|
|
502
|
+
a.found && (E = a.missingIndex, g = a.foundIndex);
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const P = E < g;
|
|
505
505
|
return {
|
|
506
|
-
sourceIndexInCommonParent:
|
|
506
|
+
sourceIndexInCommonParent: E,
|
|
507
507
|
targetIndexInCommonParent: g,
|
|
508
|
-
rightAddition:
|
|
508
|
+
rightAddition: P
|
|
509
509
|
};
|
|
510
510
|
}, nt = (e, n, t, r) => {
|
|
511
|
-
function A(c,
|
|
511
|
+
function A(c, E) {
|
|
512
512
|
if (!c.children)
|
|
513
513
|
return { before: null, after: null };
|
|
514
|
-
const g = c.children,
|
|
515
|
-
if (
|
|
514
|
+
const g = c.children, u = t[E], P = g.findIndex((v) => v.field === u);
|
|
515
|
+
if (P === -1)
|
|
516
516
|
return { before: null, after: null };
|
|
517
517
|
const a = [], p = [];
|
|
518
|
-
g.forEach((v,
|
|
519
|
-
|
|
518
|
+
g.forEach((v, X) => {
|
|
519
|
+
X < P ? a.push(JSON.parse(JSON.stringify(v))) : X > P ? p.push(JSON.parse(JSON.stringify(v))) : E === 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
|
-
const
|
|
522
|
-
if (!(
|
|
523
|
-
const { before: v, after:
|
|
524
|
-
|
|
525
|
-
|
|
521
|
+
const T = g[P];
|
|
522
|
+
if (!(E === t.length - 1) || T.children && T.children.length > 1) {
|
|
523
|
+
const { before: v, after: X } = A(
|
|
524
|
+
T,
|
|
525
|
+
E + 1
|
|
526
526
|
);
|
|
527
527
|
if (v) {
|
|
528
|
-
const
|
|
529
|
-
|
|
528
|
+
const K = a.indexOf(null);
|
|
529
|
+
K !== -1 && (a[K] = v);
|
|
530
530
|
}
|
|
531
|
-
if (
|
|
532
|
-
const
|
|
533
|
-
|
|
531
|
+
if (X) {
|
|
532
|
+
const K = p.indexOf(null);
|
|
533
|
+
K !== -1 && (p[K] = X);
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
const U = a.filter(
|
|
537
537
|
(v) => v !== null
|
|
538
538
|
), N = p.filter(
|
|
539
539
|
(v) => v !== null
|
|
540
|
-
),
|
|
540
|
+
), y = U.length > 0 ? {
|
|
541
541
|
...JSON.parse(JSON.stringify(c)),
|
|
542
542
|
children: U
|
|
543
543
|
} : null, _ = N.length > 0 ? {
|
|
544
544
|
...JSON.parse(JSON.stringify(c)),
|
|
545
545
|
children: N
|
|
546
546
|
} : null;
|
|
547
|
-
return { before:
|
|
547
|
+
return { before: y, after: _ };
|
|
548
548
|
}
|
|
549
549
|
const { before: i, after: o } = A(e, 0);
|
|
550
550
|
let d = o;
|
|
551
|
-
const f = (c,
|
|
552
|
-
!c || !c.children || c.children.length === 0 || c.children.forEach((
|
|
553
|
-
const
|
|
554
|
-
g.set(p,
|
|
555
|
-
const
|
|
556
|
-
if (!
|
|
557
|
-
...
|
|
558
|
-
]),
|
|
559
|
-
const
|
|
560
|
-
|
|
551
|
+
const f = (c, E = [], g = /* @__PURE__ */ new Map()) => {
|
|
552
|
+
!c || !c.children || c.children.length === 0 || c.children.forEach((u) => {
|
|
553
|
+
const P = F(u).split(W)[0], a = Me(), p = `${P}_${a}`, T = g.get(p) || 0;
|
|
554
|
+
g.set(p, T + 1);
|
|
555
|
+
const D = `${W}${a}_${T}`;
|
|
556
|
+
if (!u.originalPath && u.path && (u.originalPath = [
|
|
557
|
+
...u.path.map((S) => S.split(W)[0])
|
|
558
|
+
]), u.originalId || (u.originalId = P), u.field = `${P}${D}`, u.accessor) {
|
|
559
|
+
const S = u.accessor.split(W)[0];
|
|
560
|
+
u.accessor = `${S}${D}`;
|
|
561
561
|
}
|
|
562
|
-
if (
|
|
563
|
-
const
|
|
564
|
-
|
|
562
|
+
if (u.column_name) {
|
|
563
|
+
const S = u.column_name.split(W)[0];
|
|
564
|
+
u.column_name = `${S}${D}`;
|
|
565
565
|
}
|
|
566
|
-
if (
|
|
567
|
-
const
|
|
568
|
-
|
|
566
|
+
if (u.id) {
|
|
567
|
+
const S = u.id.split(W)[0];
|
|
568
|
+
u.id = `${S}${D}`;
|
|
569
569
|
}
|
|
570
|
-
|
|
570
|
+
u.path = [...E, u.field], E.length > 0 && (u.parent_id = [E[E.length - 1]]), u.isReorderedColumn = !0, f(u, u.path, g);
|
|
571
571
|
});
|
|
572
572
|
};
|
|
573
573
|
if (d) {
|
|
574
574
|
const c = [];
|
|
575
|
-
if (d.path && d.path[0] !==
|
|
575
|
+
if (d.path && d.path[0] !== F(d)) {
|
|
576
576
|
const g = d.path.findIndex(
|
|
577
|
-
(
|
|
577
|
+
(u) => u === F(d)
|
|
578
578
|
);
|
|
579
579
|
c.push(...(d.path || []).slice(0, g));
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const E = On(d, {
|
|
582
582
|
path: c
|
|
583
583
|
});
|
|
584
584
|
d = {
|
|
585
585
|
...d,
|
|
586
|
-
...
|
|
586
|
+
...E
|
|
587
587
|
}, f(d, d.path);
|
|
588
588
|
}
|
|
589
589
|
return { before: i, after: d };
|
|
@@ -735,11 +735,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
735
735
|
document.querySelectorAll(".ia-table-body-cell-selected").forEach((a) => {
|
|
736
736
|
a.classList.remove("ia-table-body-cell-selected");
|
|
737
737
|
}), window.dispatchEvent(new CustomEvent("ia-table-clear-selection"));
|
|
738
|
-
const f = n.iaTableInstanceId || "", c = e.getAttribute("data-row-id") || t,
|
|
738
|
+
const f = n.iaTableInstanceId || "", c = e.getAttribute("data-row-id") || t, E = e.getAttribute("data-field") || "", g = e.getAttribute("data-pinned"), u = {
|
|
739
739
|
rowIndex: t,
|
|
740
740
|
colIndex: r,
|
|
741
741
|
rowId: c,
|
|
742
|
-
field:
|
|
742
|
+
field: E,
|
|
743
743
|
pinnedType: g === "false" ? !1 : g,
|
|
744
744
|
frozenColumnsLength: A,
|
|
745
745
|
rowAttr: t,
|
|
@@ -747,9 +747,9 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
747
747
|
tableId: i,
|
|
748
748
|
target: o
|
|
749
749
|
};
|
|
750
|
-
window.iaTableSelectedCell =
|
|
751
|
-
const
|
|
752
|
-
|
|
750
|
+
window.iaTableSelectedCell = u;
|
|
751
|
+
const P = window.iaTableState;
|
|
752
|
+
P && (P.selectedCells.set(f, u), P.activeInstance = n), o.classList.add("ia-table-body-cell-selected"), document.activeElement && document.activeElement !== document.body && document.activeElement.blur(), setTimeout(() => {
|
|
753
753
|
o.scrollIntoView({
|
|
754
754
|
behavior: "auto",
|
|
755
755
|
block: "nearest"
|
|
@@ -964,52 +964,52 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
964
964
|
return;
|
|
965
965
|
}
|
|
966
966
|
}, 0);
|
|
967
|
-
}, ar = (e, n, t, r, A, i, o, d, f, c,
|
|
968
|
-
var
|
|
969
|
-
e.stopPropagation(), !e.shiftKey && ((
|
|
967
|
+
}, ar = (e, n, t, r, A, i, o, d, f, c, E) => {
|
|
968
|
+
var T, D, S, U;
|
|
969
|
+
e.stopPropagation(), !e.shiftKey && ((D = (T = window.iaTableState) == null ? void 0 : T.multiSelection) != null && D.anchor) && rt();
|
|
970
970
|
const g = tt(n);
|
|
971
971
|
if (!g) return;
|
|
972
|
-
const
|
|
973
|
-
(
|
|
972
|
+
const u = g.iaTableInstanceId;
|
|
973
|
+
(S = window.iaTableSelectedCell) != null && S.target && window.iaTableSelectedCell.target.classList.remove(
|
|
974
974
|
"ia-table-body-cell-selected"
|
|
975
975
|
);
|
|
976
|
-
const
|
|
976
|
+
const P = e.target.closest(
|
|
977
977
|
".ia-table-body-cell"
|
|
978
978
|
);
|
|
979
|
-
if (!
|
|
980
|
-
|
|
981
|
-
const a =
|
|
979
|
+
if (!P) return;
|
|
980
|
+
P.classList.add("ia-table-body-cell-selected"), window.dispatchEvent(new CustomEvent("ia-table-clear-selection"));
|
|
981
|
+
const a = P.getAttribute("data-row"), p = {
|
|
982
982
|
rowIndex: t,
|
|
983
983
|
colIndex: r,
|
|
984
984
|
rowId: A,
|
|
985
985
|
field: i,
|
|
986
986
|
pinnedType: o,
|
|
987
987
|
frozenColumnsLength: d,
|
|
988
|
-
tableInstanceId:
|
|
988
|
+
tableInstanceId: u,
|
|
989
989
|
tableId: ((U = g == null ? void 0 : g.api) == null ? void 0 : U.tableId) ?? "",
|
|
990
|
-
target:
|
|
990
|
+
target: P,
|
|
991
991
|
column: f,
|
|
992
992
|
rowData: c,
|
|
993
|
-
cellValue:
|
|
993
|
+
cellValue: E,
|
|
994
994
|
rowAttr: a
|
|
995
995
|
// Add the row attribute for keyboard navigation
|
|
996
996
|
};
|
|
997
|
-
window.iaTableSelectedCell = p,
|
|
997
|
+
window.iaTableSelectedCell = p, u && window.iaTableState && window.iaTableState.selectedCells.set(u, p), window.iaTableState && g && (window.iaTableState.activeInstance = g), document.activeElement && document.activeElement !== document.body && document.activeElement.blur(), lt(P);
|
|
998
998
|
}, st = (e, n) => !e || !n ? void 0 : (Array.isArray(n) ? n : n.split(".")).reduce(
|
|
999
999
|
(r, A) => r && r[A] !== void 0 ? r[A] : void 0,
|
|
1000
1000
|
e
|
|
1001
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) => {
|
|
1002
|
-
const t = e.groupingLevel, r = n.originalFields && t && n.originalFields[t] ? n.originalFields[t] :
|
|
1002
|
+
const t = e.groupingLevel, r = n.originalFields && t && n.originalFields[t] ? n.originalFields[t] : F(n);
|
|
1003
1003
|
return e[r];
|
|
1004
1004
|
}, dr = (e, n, t, r, A) => {
|
|
1005
1005
|
if (!e || !n) return "";
|
|
1006
1006
|
const i = e.groupingLevel || 0, o = i && n.rowGroup && n.originalFields && n.originalFields.length > i ? {
|
|
1007
1007
|
...A[n.originalFields[i]],
|
|
1008
|
-
colId:
|
|
1008
|
+
colId: F(
|
|
1009
1009
|
A[n.originalFields[i]]
|
|
1010
1010
|
)
|
|
1011
|
-
} : { ...n, colId:
|
|
1012
|
-
let d = o.field ||
|
|
1011
|
+
} : { ...n, colId: F(n) };
|
|
1012
|
+
let d = o.field || F(o);
|
|
1013
1013
|
if (o.isReorderedColumn && o.originalPath && (d = o.originalPath[o.originalPath.length - 1]), o.valueGetter)
|
|
1014
1014
|
try {
|
|
1015
1015
|
const c = {
|
|
@@ -1026,7 +1026,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1026
1026
|
// Pass the table API to the valueGetter
|
|
1027
1027
|
columnApi: r == null ? void 0 : r.columnApi,
|
|
1028
1028
|
// Pass column API if available
|
|
1029
|
-
getValue: (
|
|
1029
|
+
getValue: (E) => e[E]
|
|
1030
1030
|
};
|
|
1031
1031
|
return o.valueGetter(c);
|
|
1032
1032
|
} catch (c) {
|
|
@@ -1041,18 +1041,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1041
1041
|
if (f && t) {
|
|
1042
1042
|
const c = e[t];
|
|
1043
1043
|
if (c && Array.isArray(c) && c.length > 0) {
|
|
1044
|
-
const
|
|
1045
|
-
for (const g of
|
|
1044
|
+
const E = c;
|
|
1045
|
+
for (const g of E)
|
|
1046
1046
|
if (g && g[d] !== void 0)
|
|
1047
1047
|
return g[d];
|
|
1048
1048
|
}
|
|
1049
1049
|
if (o.parent_id) {
|
|
1050
|
-
const
|
|
1051
|
-
if (
|
|
1052
|
-
const g = e[
|
|
1050
|
+
const E = o.parent_id[0];
|
|
1051
|
+
if (E && e[E]) {
|
|
1052
|
+
const g = e[E];
|
|
1053
1053
|
if (typeof g == "object" && g !== null) {
|
|
1054
|
-
const
|
|
1055
|
-
return
|
|
1054
|
+
const u = g;
|
|
1055
|
+
return u[d] !== void 0 ? u[d] : "";
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
@@ -1083,54 +1083,54 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1083
1083
|
n,
|
|
1084
1084
|
t,
|
|
1085
1085
|
typeof r == "string" ? r : void 0
|
|
1086
|
-
) : e(r, t) : null,
|
|
1087
|
-
const d = o.column || o.field || A, f = o.search_type || o.operator || "", c = t[d],
|
|
1088
|
-
let
|
|
1089
|
-
const
|
|
1090
|
-
if (
|
|
1086
|
+
) : e(r, t) : null, ut = (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) => {
|
|
1087
|
+
const d = o.column || o.field || A, f = o.search_type || o.operator || "", c = t[d], E = c == null ? void 0 : c.type, g = be.includes(E || "");
|
|
1088
|
+
let u = o.pattern || o.value || "";
|
|
1089
|
+
const P = gt(c, E);
|
|
1090
|
+
if (P && c)
|
|
1091
1091
|
return ft(
|
|
1092
|
-
|
|
1092
|
+
P,
|
|
1093
1093
|
f,
|
|
1094
1094
|
r[d],
|
|
1095
|
-
g ? { min_val: o.min_val, max_val: o.max_val } :
|
|
1096
|
-
|
|
1095
|
+
g ? { min_val: o.min_val, max_val: o.max_val } : u,
|
|
1096
|
+
E
|
|
1097
1097
|
);
|
|
1098
1098
|
const a = r[d];
|
|
1099
1099
|
if (a == null || a === "")
|
|
1100
1100
|
return !1;
|
|
1101
|
-
if (be.includes(
|
|
1101
|
+
if (be.includes(E || "")) {
|
|
1102
1102
|
const p = parseFloat(a);
|
|
1103
1103
|
switch (f) {
|
|
1104
1104
|
case "equals":
|
|
1105
|
-
return
|
|
1105
|
+
return u = o.max_val ?? 0, p === parseFloat(String(u));
|
|
1106
1106
|
case "lessThan":
|
|
1107
|
-
return
|
|
1107
|
+
return u = o.max_val ?? 0, p < parseFloat(String(u));
|
|
1108
1108
|
case "lessThanOrEqual":
|
|
1109
|
-
return
|
|
1109
|
+
return u = o.max_val ?? 0, p <= parseFloat(String(u));
|
|
1110
1110
|
case "greaterThan":
|
|
1111
|
-
return
|
|
1111
|
+
return u = o.min_val ?? 0, p > parseFloat(String(u));
|
|
1112
1112
|
case "greaterThanOrEqual":
|
|
1113
|
-
return
|
|
1113
|
+
return u = o.min_val ?? 0, p >= parseFloat(String(u));
|
|
1114
1114
|
case "inRange": {
|
|
1115
|
-
const
|
|
1116
|
-
return
|
|
1115
|
+
const T = o.min_val, D = o.max_val;
|
|
1116
|
+
return T !== void 0 && D !== void 0 ? p >= parseFloat(String(T)) && p <= parseFloat(String(D)) : !0;
|
|
1117
1117
|
}
|
|
1118
1118
|
default:
|
|
1119
1119
|
return !0;
|
|
1120
1120
|
}
|
|
1121
1121
|
} else {
|
|
1122
|
-
const p = String(a).toLowerCase(),
|
|
1122
|
+
const p = String(a).toLowerCase(), T = String(u || "").toLowerCase(), D = T.includes(",") ? T.split(",").map((S) => S.trim()).filter(Boolean) : [T];
|
|
1123
1123
|
switch (f) {
|
|
1124
1124
|
case "contains":
|
|
1125
|
-
return
|
|
1125
|
+
return D.some((S) => p.includes(S));
|
|
1126
1126
|
case "equals":
|
|
1127
|
-
return
|
|
1127
|
+
return D.some((S) => p === S);
|
|
1128
1128
|
case "notEqual":
|
|
1129
|
-
return
|
|
1129
|
+
return D.every((S) => p !== S);
|
|
1130
1130
|
case "startsWith":
|
|
1131
|
-
return
|
|
1131
|
+
return D.some((S) => p.startsWith(S));
|
|
1132
1132
|
case "endsWith":
|
|
1133
|
-
return
|
|
1133
|
+
return D.some((S) => p.endsWith(S));
|
|
1134
1134
|
default:
|
|
1135
1135
|
return !0;
|
|
1136
1136
|
}
|
|
@@ -1141,52 +1141,52 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1141
1141
|
if (!A) return [...e];
|
|
1142
1142
|
const o = t == null ? void 0 : t[A], d = o == null ? void 0 : o.comparator;
|
|
1143
1143
|
return [...e].sort((f, c) => {
|
|
1144
|
-
const
|
|
1144
|
+
const E = f[A], g = c[A];
|
|
1145
1145
|
return d ? d(
|
|
1146
|
-
|
|
1146
|
+
E,
|
|
1147
1147
|
g,
|
|
1148
1148
|
f,
|
|
1149
1149
|
// nodeA (full row data)
|
|
1150
1150
|
c,
|
|
1151
1151
|
// nodeB (full row data)
|
|
1152
1152
|
r ? n : n ? [n] : []
|
|
1153
|
-
) :
|
|
1153
|
+
) : E === g ? 0 : E == null ? 1 : g == null ? -1 : typeof E == "string" && typeof g == "string" ? i === "asc" ? E.localeCompare(g) : g.localeCompare(E) : i === "asc" ? E < g ? -1 : 1 : E > g ? -1 : 1;
|
|
1154
1154
|
});
|
|
1155
1155
|
}, Be = (e, n = { minWidth: 150 }) => {
|
|
1156
1156
|
const t = {}, r = {};
|
|
1157
1157
|
e.forEach((a) => {
|
|
1158
|
-
const p =
|
|
1159
|
-
a.children && Array.isArray(a.children) && (r[p] = [], a.children.forEach((
|
|
1160
|
-
const
|
|
1161
|
-
t[
|
|
1158
|
+
const p = F(a);
|
|
1159
|
+
a.children && Array.isArray(a.children) && (r[p] = [], a.children.forEach((T) => {
|
|
1160
|
+
const D = F(T);
|
|
1161
|
+
t[D] = p, r[p] ? r[p].push(D) : r[p] = [D];
|
|
1162
1162
|
}));
|
|
1163
1163
|
});
|
|
1164
1164
|
const A = e.map((a) => {
|
|
1165
1165
|
var q, ee;
|
|
1166
|
-
const p = a.width !== void 0,
|
|
1167
|
-
let
|
|
1166
|
+
const p = a.width !== void 0, T = a.field || F(a);
|
|
1167
|
+
let D = a.is_frozen || !1, S = a.pinned === "right";
|
|
1168
1168
|
const U = [];
|
|
1169
|
-
let N =
|
|
1169
|
+
let N = T;
|
|
1170
1170
|
for (; t[N]; ) {
|
|
1171
1171
|
const ne = t[N];
|
|
1172
1172
|
U.push(ne), N = ne;
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1174
|
+
const y = a.children && a.children.length > 0;
|
|
1175
1175
|
let _ = !1, v = !1;
|
|
1176
|
-
|
|
1177
|
-
const $ =
|
|
1178
|
-
(
|
|
1176
|
+
y && ((ee = (q = a.children) == null ? void 0 : q.forEach) == null || ee.call(q, (ne) => {
|
|
1177
|
+
const $ = F(ne), Z = e.find(
|
|
1178
|
+
(re) => F(re) === $
|
|
1179
1179
|
);
|
|
1180
1180
|
Z && (Z.is_frozen && (_ = !0), Z.pinned === "right" && (v = !0));
|
|
1181
|
-
}), _ && (
|
|
1182
|
-
const
|
|
1181
|
+
}), _ && (D = !0), v && (S = !0));
|
|
1182
|
+
const X = (n == null ? void 0 : n.minWidth) || 150, K = a.width ? Math.max(a.width, X) : X;
|
|
1183
1183
|
return {
|
|
1184
1184
|
...a,
|
|
1185
|
-
field:
|
|
1185
|
+
field: T,
|
|
1186
1186
|
headerName: a.headerName || a.label,
|
|
1187
1187
|
// Set width and track if it's a custom width or auto width
|
|
1188
|
-
width:
|
|
1189
|
-
originalWidth: a.width ||
|
|
1188
|
+
width: K,
|
|
1189
|
+
originalWidth: a.width || X,
|
|
1190
1190
|
// Store original width
|
|
1191
1191
|
isAutoWidth: !p,
|
|
1192
1192
|
// Mark columns without explicit width as auto-width
|
|
@@ -1195,18 +1195,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1195
1195
|
resizable: a.resizable !== !1,
|
|
1196
1196
|
hidden: Ve(a),
|
|
1197
1197
|
align: a.align || "left",
|
|
1198
|
-
is_frozen:
|
|
1198
|
+
is_frozen: D,
|
|
1199
1199
|
// Ensure left-pinned property is set
|
|
1200
|
-
pinned:
|
|
1200
|
+
pinned: S ? "right" : a.pinned,
|
|
1201
1201
|
// Ensure right-pinned property is set
|
|
1202
1202
|
originalIndex: e.indexOf(a),
|
|
1203
1203
|
// Store original index
|
|
1204
1204
|
parentColumns: U,
|
|
1205
1205
|
// Store the ancestry chain
|
|
1206
1206
|
// Add placeholder flag if this is a child with no explicit parent
|
|
1207
|
-
isChildWithoutParent: U.length === 0 && t[
|
|
1207
|
+
isChildWithoutParent: U.length === 0 && t[T] === void 0,
|
|
1208
1208
|
// Store if this is a parent with children
|
|
1209
|
-
hasChildren:
|
|
1209
|
+
hasChildren: y,
|
|
1210
1210
|
// Store whether any children are frozen or right-pinned
|
|
1211
1211
|
hasAnyFrozenChildren: _,
|
|
1212
1212
|
hasAnyRightPinnedChildren: v
|
|
@@ -1214,15 +1214,15 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1214
1214
|
});
|
|
1215
1215
|
A.forEach((a) => {
|
|
1216
1216
|
a.is_frozen && a.parentColumns.forEach((p) => {
|
|
1217
|
-
const
|
|
1218
|
-
(
|
|
1217
|
+
const T = A.find(
|
|
1218
|
+
(D) => F(D) === p
|
|
1219
1219
|
);
|
|
1220
|
-
|
|
1220
|
+
T && (T.is_frozen = !0);
|
|
1221
1221
|
}), a.pinned === "right" && a.parentColumns.forEach((p) => {
|
|
1222
|
-
const
|
|
1223
|
-
(
|
|
1222
|
+
const T = A.find(
|
|
1223
|
+
(D) => F(D) === p
|
|
1224
1224
|
);
|
|
1225
|
-
|
|
1225
|
+
T && (T.pinned = "right", T.is_frozen = !1);
|
|
1226
1226
|
});
|
|
1227
1227
|
});
|
|
1228
1228
|
const i = [
|
|
@@ -1245,38 +1245,38 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1245
1245
|
), c = A.filter(
|
|
1246
1246
|
(a) => a.pinned === "right" && !a.hidden
|
|
1247
1247
|
);
|
|
1248
|
-
let
|
|
1248
|
+
let E = 0;
|
|
1249
1249
|
function g(a, p) {
|
|
1250
|
-
var U, N,
|
|
1251
|
-
const
|
|
1252
|
-
o.indexes.push(
|
|
1253
|
-
let
|
|
1250
|
+
var U, N, y;
|
|
1251
|
+
const T = F(a), D = p;
|
|
1252
|
+
o.indexes.push(T), o.positions[T] = D;
|
|
1253
|
+
let S;
|
|
1254
1254
|
if (a && a.children && ((U = a.children) == null ? void 0 : U.length) > 0) {
|
|
1255
1255
|
let _ = 0;
|
|
1256
|
-
(
|
|
1256
|
+
(y = (N = a.children) == null ? void 0 : N.forEach) == null || y.call(N, (v) => {
|
|
1257
1257
|
if (Ve(v))
|
|
1258
1258
|
return;
|
|
1259
|
-
const
|
|
1260
|
-
_ +=
|
|
1261
|
-
}),
|
|
1259
|
+
const X = D + _, K = g(v, X);
|
|
1260
|
+
_ += K;
|
|
1261
|
+
}), S = _;
|
|
1262
1262
|
} else {
|
|
1263
1263
|
const _ = n.minWidth || 150;
|
|
1264
|
-
|
|
1264
|
+
S = a.width && a.width < _ ? _ : a.width || _;
|
|
1265
1265
|
}
|
|
1266
|
-
return
|
|
1266
|
+
return S;
|
|
1267
1267
|
}
|
|
1268
1268
|
f.forEach((a) => {
|
|
1269
1269
|
if (Ve(a))
|
|
1270
1270
|
return;
|
|
1271
|
-
const p = g(a,
|
|
1272
|
-
|
|
1273
|
-
}), o.totalWidth =
|
|
1274
|
-
let
|
|
1271
|
+
const p = g(a, E);
|
|
1272
|
+
E += p;
|
|
1273
|
+
}), o.totalWidth = E;
|
|
1274
|
+
let u = 0;
|
|
1275
1275
|
return [...c].reverse().forEach((a) => {
|
|
1276
|
-
const p =
|
|
1277
|
-
d.indexes.push(p), d.positions[p] =
|
|
1278
|
-
}), d.totalWidth =
|
|
1279
|
-
(a) =>
|
|
1276
|
+
const p = F(a);
|
|
1277
|
+
d.indexes.push(p), d.positions[p] = u, u += a.width || n.minWidth;
|
|
1278
|
+
}), d.totalWidth = u, d.rightIndexes = c.map(
|
|
1279
|
+
(a) => F(a)
|
|
1280
1280
|
), o.rightPinned = {
|
|
1281
1281
|
indexes: d.indexes,
|
|
1282
1282
|
positions: d.positions,
|
|
@@ -1290,14 +1290,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1290
1290
|
return t;
|
|
1291
1291
|
}, tn = (e, n = null, t = {}, r = {}) => (e.forEach((A) => {
|
|
1292
1292
|
var o;
|
|
1293
|
-
const i =
|
|
1293
|
+
const i = F(A);
|
|
1294
1294
|
n && (t[n] || (t[n] = []), t[n].includes(i) || t[n].push(i), r[i] = n), A && A.children && ((o = A.children) == null ? void 0 : o.length) > 0 && (t[i] || (t[i] = []), tn(
|
|
1295
1295
|
A.children || [],
|
|
1296
1296
|
i,
|
|
1297
1297
|
t,
|
|
1298
1298
|
r
|
|
1299
1299
|
));
|
|
1300
|
-
}), { parentToChildrenMap: t, childToParentMap: r }),
|
|
1300
|
+
}), { parentToChildrenMap: t, childToParentMap: r }), Ct = {
|
|
1301
1301
|
[l.REORDER_COLUMNS]: "columnMoved",
|
|
1302
1302
|
[l.SET_SELECTED_ROWS]: "selectionChanged",
|
|
1303
1303
|
[l.TOGGLE_COLUMN_VISIBILITY]: "columnVisibilityChanged",
|
|
@@ -1316,7 +1316,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1316
1316
|
[l.SET_PAGE]: "paginationChanged",
|
|
1317
1317
|
[l.SET_PAGE_SIZE]: "paginationChanged",
|
|
1318
1318
|
[l.TOGGLE_GROUP_EXPANSION]: "rowGroupToggled"
|
|
1319
|
-
},
|
|
1319
|
+
}, Et = [
|
|
1320
1320
|
l.SET_COLUMNS,
|
|
1321
1321
|
l.TOGGLE_COLUMN_VISIBILITY,
|
|
1322
1322
|
l.REORDER_COLUMNS,
|
|
@@ -1339,22 +1339,22 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1339
1339
|
state: r,
|
|
1340
1340
|
column: A
|
|
1341
1341
|
}) => {
|
|
1342
|
-
var N,
|
|
1342
|
+
var N, y;
|
|
1343
1343
|
const { preventIfExceedsMaxWidth: i = !0 } = t, { newHierarchy: o, updatedColumns: d } = pt(
|
|
1344
1344
|
r.columns,
|
|
1345
1345
|
A,
|
|
1346
1346
|
n,
|
|
1347
1347
|
e
|
|
1348
|
-
), f = window.innerWidth * 0.6, c = r.frozenColumns.totalWidth - (((N = r.frozenColumns.rightPinned) == null ? void 0 : N.totalWidth) || 0),
|
|
1348
|
+
), f = window.innerWidth * 0.6, c = r.frozenColumns.totalWidth - (((N = r.frozenColumns.rightPinned) == null ? void 0 : N.totalWidth) || 0), E = (_) => {
|
|
1349
1349
|
let v = _.width || 150;
|
|
1350
1350
|
return _.children && _.children.length > 0 && (v = _.children.reduce(
|
|
1351
|
-
(
|
|
1351
|
+
(X, K) => X + E(K),
|
|
1352
1352
|
0
|
|
1353
1353
|
)), v;
|
|
1354
|
-
}, g =
|
|
1354
|
+
}, g = E(
|
|
1355
1355
|
o || A
|
|
1356
|
-
),
|
|
1357
|
-
if (n &&
|
|
1356
|
+
), P = c + g > f;
|
|
1357
|
+
if (n && P && i)
|
|
1358
1358
|
return {
|
|
1359
1359
|
...r,
|
|
1360
1360
|
notification: {
|
|
@@ -1366,129 +1366,129 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1366
1366
|
};
|
|
1367
1367
|
let a = -1;
|
|
1368
1368
|
o && (a = d.findIndex((_) => {
|
|
1369
|
-
const v = o.is_frozen,
|
|
1370
|
-
return _.is_frozen === v && _.pinned ===
|
|
1369
|
+
const v = o.is_frozen, X = o.pinned, K = o.originalPath || o.path || [], q = _.originalPath || _.path || [];
|
|
1370
|
+
return _.is_frozen === v && _.pinned === X && q[0] === K[0];
|
|
1371
1371
|
}));
|
|
1372
1372
|
const p = [...d];
|
|
1373
1373
|
o && a !== -1 ? p.splice(a, 0, o) : o && p.push(o);
|
|
1374
|
-
const
|
|
1375
|
-
|
|
1374
|
+
const T = on(p), { processedColumns: D } = De(
|
|
1375
|
+
T,
|
|
1376
1376
|
r.expandedColumnGroups,
|
|
1377
1377
|
0,
|
|
1378
1378
|
null,
|
|
1379
|
-
((
|
|
1380
|
-
), { columns:
|
|
1381
|
-
|
|
1379
|
+
((y = r.defaultColDef) == null ? void 0 : y.minWidth) || 150
|
|
1380
|
+
), { columns: S, frozenData: U } = Be(
|
|
1381
|
+
D,
|
|
1382
1382
|
r.defaultColDef || { minWidth: 150 }
|
|
1383
1383
|
);
|
|
1384
1384
|
return {
|
|
1385
1385
|
...r,
|
|
1386
|
-
columns:
|
|
1386
|
+
columns: S,
|
|
1387
1387
|
frozenColumns: U
|
|
1388
1388
|
};
|
|
1389
1389
|
}, pt = (e, n, t, r) => {
|
|
1390
|
-
var
|
|
1391
|
-
const A = ((
|
|
1390
|
+
var P, a, p, T, D;
|
|
1391
|
+
const A = ((P = n.path) == null ? void 0 : P.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 = ((T = d == null ? void 0 : d.children) == null ? void 0 : T.length) || 0;
|
|
1392
1392
|
let c = null;
|
|
1393
1393
|
if (A.length === 0)
|
|
1394
1394
|
return {
|
|
1395
1395
|
newHierarchy: null,
|
|
1396
|
-
updatedColumns: e.map((U) =>
|
|
1396
|
+
updatedColumns: e.map((U) => F(U) === r ? {
|
|
1397
1397
|
...U,
|
|
1398
1398
|
is_frozen: t,
|
|
1399
1399
|
pinned: t ? "left" : null
|
|
1400
1400
|
} : U)
|
|
1401
1401
|
};
|
|
1402
1402
|
{
|
|
1403
|
-
let
|
|
1403
|
+
let S = null, U = null, N = "", y = [];
|
|
1404
1404
|
for (let _ = 0; _ < A.length; _++) {
|
|
1405
1405
|
const v = A[_];
|
|
1406
1406
|
N = N ? `${N}/${v}` : v;
|
|
1407
|
-
const
|
|
1408
|
-
if (!
|
|
1407
|
+
const X = i[N.toLowerCase()];
|
|
1408
|
+
if (!X)
|
|
1409
1409
|
continue;
|
|
1410
|
-
const
|
|
1411
|
-
...
|
|
1412
|
-
...t || f > 1 ?
|
|
1410
|
+
const K = {
|
|
1411
|
+
...X,
|
|
1412
|
+
...t || f > 1 ? On(X, { path: y }) : X,
|
|
1413
1413
|
is_frozen: t,
|
|
1414
1414
|
pinned: t ? "left" : null,
|
|
1415
1415
|
children: []
|
|
1416
1416
|
// Clear children as we'll rebuild the hierarchy
|
|
1417
1417
|
};
|
|
1418
|
-
|
|
1418
|
+
y = K.path || [], _ === 0 && (U = K), S && (S.children = [K]), S = K;
|
|
1419
1419
|
}
|
|
1420
|
-
if (
|
|
1421
|
-
const _ =
|
|
1422
|
-
|
|
1420
|
+
if (S) {
|
|
1421
|
+
const _ = S.originalPath || (S.path ? S.path.map((q) => q.split(W)[0]) : []), v = F(n), X = v.split(W)[0], K = [..._, X];
|
|
1422
|
+
S.children = [
|
|
1423
1423
|
{
|
|
1424
1424
|
...n,
|
|
1425
1425
|
is_frozen: t,
|
|
1426
1426
|
pinned: t ? "left" : null,
|
|
1427
|
-
originalPath:
|
|
1428
|
-
path: [...
|
|
1427
|
+
originalPath: K,
|
|
1428
|
+
path: [...S.path || [], v]
|
|
1429
1429
|
}
|
|
1430
1430
|
];
|
|
1431
1431
|
}
|
|
1432
1432
|
c = U;
|
|
1433
1433
|
}
|
|
1434
|
-
const
|
|
1435
|
-
let N = JSON.parse(JSON.stringify(
|
|
1436
|
-
const
|
|
1437
|
-
if (
|
|
1434
|
+
const E = (S, U) => {
|
|
1435
|
+
let N = JSON.parse(JSON.stringify(S));
|
|
1436
|
+
const y = n.path || [];
|
|
1437
|
+
if (y.length === 0)
|
|
1438
1438
|
return N.filter(
|
|
1439
|
-
(
|
|
1439
|
+
(K) => F(K) !== U
|
|
1440
1440
|
);
|
|
1441
|
-
const _ = (
|
|
1442
|
-
let ee =
|
|
1441
|
+
const _ = (K, q) => {
|
|
1442
|
+
let ee = K, ne = null, $ = -1;
|
|
1443
1443
|
for (let Z = 0; Z < q.length - 1; Z++) {
|
|
1444
|
-
const
|
|
1445
|
-
(se) =>
|
|
1444
|
+
const re = q[Z], ae = ee.findIndex(
|
|
1445
|
+
(se) => F(se) === re
|
|
1446
1446
|
);
|
|
1447
1447
|
if (ae === -1)
|
|
1448
|
-
return console.warn(`Could not find column with field ${
|
|
1448
|
+
return console.warn(`Could not find column with field ${re} in path`), { parent: null, targetIndex: -1 };
|
|
1449
1449
|
ne = ee[ae], ee = ne.children || [];
|
|
1450
1450
|
}
|
|
1451
1451
|
if (q.length > 0) {
|
|
1452
1452
|
const Z = q[q.length - 1];
|
|
1453
1453
|
$ = ee.findIndex(
|
|
1454
|
-
(
|
|
1454
|
+
(re) => F(re) === Z
|
|
1455
1455
|
);
|
|
1456
1456
|
}
|
|
1457
1457
|
return { parent: ne, targetIndex: $ };
|
|
1458
|
-
}, { parent: v, targetIndex:
|
|
1459
|
-
if (v && v.children &&
|
|
1460
|
-
const
|
|
1461
|
-
if (
|
|
1462
|
-
v.children.splice(
|
|
1458
|
+
}, { parent: v, targetIndex: X } = _(N, y);
|
|
1459
|
+
if (v && v.children && X !== -1) {
|
|
1460
|
+
const K = v.children[X];
|
|
1461
|
+
if (K && F(K) === r)
|
|
1462
|
+
v.children.splice(X, 1);
|
|
1463
1463
|
else {
|
|
1464
1464
|
const q = v.children.findIndex(
|
|
1465
|
-
(ee) =>
|
|
1465
|
+
(ee) => F(ee) === r
|
|
1466
1466
|
);
|
|
1467
1467
|
q !== -1 && v.children.splice(q, 1);
|
|
1468
1468
|
}
|
|
1469
1469
|
if (v.children.length === 0) {
|
|
1470
1470
|
const q = N.findIndex(
|
|
1471
|
-
($) =>
|
|
1472
|
-
), ee = ($, Z,
|
|
1473
|
-
if (
|
|
1474
|
-
const ae = $[
|
|
1475
|
-
if (
|
|
1471
|
+
($) => F($) === (v.path || [])[0]
|
|
1472
|
+
), ee = ($, Z, re) => {
|
|
1473
|
+
if (re === -1 || !$[re]) return $;
|
|
1474
|
+
const ae = $[re], se = Z || ae;
|
|
1475
|
+
if (F(se) === F(ae)) {
|
|
1476
1476
|
if (se.children && se.children.length > 0)
|
|
1477
1477
|
return $;
|
|
1478
|
-
$.splice(
|
|
1478
|
+
$.splice(re, 1);
|
|
1479
1479
|
} else {
|
|
1480
1480
|
const fe = (ie, ce, Ae = null) => {
|
|
1481
1481
|
if (!ie.children || ie.children.length === 0)
|
|
1482
1482
|
return !1;
|
|
1483
|
-
const
|
|
1484
|
-
(k) =>
|
|
1483
|
+
const Ee = ie.children.findIndex(
|
|
1484
|
+
(k) => F(k) === F(ce)
|
|
1485
1485
|
);
|
|
1486
|
-
if (
|
|
1487
|
-
const k = ie.children[
|
|
1486
|
+
if (Ee !== -1) {
|
|
1487
|
+
const k = ie.children[Ee];
|
|
1488
1488
|
if (!k.children || k.children.length === 0) {
|
|
1489
|
-
if (ie.children.splice(
|
|
1490
|
-
const V =
|
|
1491
|
-
(s) =>
|
|
1489
|
+
if (ie.children.splice(Ee, 1), ie.children.length === 0 && (Ae != null && Ae.children)) {
|
|
1490
|
+
const V = F(ie), le = Ae.children.findIndex(
|
|
1491
|
+
(s) => F(s) === V
|
|
1492
1492
|
);
|
|
1493
1493
|
le !== -1 && Ae.children.splice(le, 1);
|
|
1494
1494
|
}
|
|
@@ -1499,8 +1499,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1499
1499
|
for (const k of ie.children)
|
|
1500
1500
|
if (fe(k, ce, ie)) {
|
|
1501
1501
|
if (ie.children.length === 0 && (Ae != null && Ae.children)) {
|
|
1502
|
-
const V =
|
|
1503
|
-
(s) =>
|
|
1502
|
+
const V = F(ie), le = Ae.children.findIndex(
|
|
1503
|
+
(s) => F(s) === V
|
|
1504
1504
|
);
|
|
1505
1505
|
le !== -1 && Ae.children.splice(le, 1);
|
|
1506
1506
|
}
|
|
@@ -1514,26 +1514,26 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1514
1514
|
null
|
|
1515
1515
|
) || console.warn(
|
|
1516
1516
|
"Could not find nested parent to remove:",
|
|
1517
|
-
|
|
1518
|
-
), (!ae.children || ae.children.length === 0) && $.splice(
|
|
1517
|
+
F(se)
|
|
1518
|
+
), (!ae.children || ae.children.length === 0) && $.splice(re, 1);
|
|
1519
1519
|
}
|
|
1520
1520
|
if (se.path && se.path.length > 1) {
|
|
1521
1521
|
const fe = se.path.slice(0, -1), ie = ((ce, Ae) => {
|
|
1522
1522
|
if (Ae.length === 0) return -1;
|
|
1523
1523
|
if (Ae.length === 1)
|
|
1524
1524
|
return ce.findIndex(
|
|
1525
|
-
(V) =>
|
|
1525
|
+
(V) => F(V) === Ae[0]
|
|
1526
1526
|
);
|
|
1527
|
-
let
|
|
1527
|
+
let Ee = ce, k = -1;
|
|
1528
1528
|
for (let V = 0; V < Ae.length - 1; V++) {
|
|
1529
1529
|
const le = Ae[V];
|
|
1530
|
-
if (k =
|
|
1531
|
-
(s) =>
|
|
1530
|
+
if (k = Ee.findIndex(
|
|
1531
|
+
(s) => F(s) === le
|
|
1532
1532
|
), k === -1) return -1;
|
|
1533
|
-
|
|
1533
|
+
Ee = Ee[k].children || [];
|
|
1534
1534
|
}
|
|
1535
|
-
return
|
|
1536
|
-
(V) =>
|
|
1535
|
+
return Ee.findIndex(
|
|
1536
|
+
(V) => F(V) === Ae[Ae.length - 1]
|
|
1537
1537
|
);
|
|
1538
1538
|
})($, fe);
|
|
1539
1539
|
if (ie !== -1) {
|
|
@@ -1557,14 +1557,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1557
1557
|
if (!$) return null;
|
|
1558
1558
|
if (Array.isArray($))
|
|
1559
1559
|
return $.map(
|
|
1560
|
-
(
|
|
1560
|
+
(re) => ne(re)
|
|
1561
1561
|
);
|
|
1562
1562
|
const Z = {
|
|
1563
1563
|
...$
|
|
1564
1564
|
// ...removeUniqueHierarchyFieldName(column),
|
|
1565
1565
|
};
|
|
1566
1566
|
return $.children && $.children.length > 0 && (Z.children = $.children.map(
|
|
1567
|
-
(
|
|
1567
|
+
(re) => ne(re)
|
|
1568
1568
|
)), Z;
|
|
1569
1569
|
};
|
|
1570
1570
|
c = ne(
|
|
@@ -1578,19 +1578,19 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1578
1578
|
return N;
|
|
1579
1579
|
};
|
|
1580
1580
|
let g = e;
|
|
1581
|
-
if (t || (((
|
|
1582
|
-
g =
|
|
1581
|
+
if (t || (((D = n.path) == null ? void 0 : D.length) || 0) > 1)
|
|
1582
|
+
g = E(
|
|
1583
1583
|
e,
|
|
1584
1584
|
r
|
|
1585
1585
|
);
|
|
1586
1586
|
else {
|
|
1587
|
-
const
|
|
1588
|
-
(N) =>
|
|
1587
|
+
const S = e.findIndex(
|
|
1588
|
+
(N) => F(N) === (n.path || [])[0]
|
|
1589
1589
|
);
|
|
1590
|
-
|
|
1590
|
+
S !== -1 && g.splice(S, 1);
|
|
1591
1591
|
const U = n.originalPath ? e.findIndex(
|
|
1592
|
-
(N) =>
|
|
1593
|
-
) :
|
|
1592
|
+
(N) => F(N) === (n.originalPath || [])[0]
|
|
1593
|
+
) : S;
|
|
1594
1594
|
U && c && g.splice(
|
|
1595
1595
|
U,
|
|
1596
1596
|
0,
|
|
@@ -1613,33 +1613,33 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1613
1613
|
if (t.length) {
|
|
1614
1614
|
let i = 0;
|
|
1615
1615
|
t.forEach(({ rowId: o, rowIndex: d }) => {
|
|
1616
|
-
var
|
|
1616
|
+
var E;
|
|
1617
1617
|
let f = 0;
|
|
1618
1618
|
Object.keys(A).forEach((g) => {
|
|
1619
1619
|
g.startsWith(o) && (f += A[g].childRowsCount);
|
|
1620
1620
|
});
|
|
1621
1621
|
const c = d - i;
|
|
1622
|
-
(
|
|
1622
|
+
(E = r == null ? void 0 : r[c]) == null || delete E.__rowSpanInfo, r.splice(c + 1, f), i += f;
|
|
1623
1623
|
});
|
|
1624
1624
|
}
|
|
1625
1625
|
return r;
|
|
1626
1626
|
}, me = (e, n, t = !0, r, A) => {
|
|
1627
|
-
var o, d, f, c,
|
|
1627
|
+
var o, d, f, c, E, g, u, P, a;
|
|
1628
1628
|
const i = (d = (o = e.api) == null ? void 0 : o.getInfiniteCacheInstance) == null ? void 0 : d.call(o);
|
|
1629
1629
|
(f = i == null ? void 0 : i.updatePageData) == null || f.call(i, e.pagination.page, n, !0, {
|
|
1630
1630
|
isRefreshData: !1
|
|
1631
|
-
}), !e.serverSide && t && ((a = (
|
|
1632
|
-
|
|
1631
|
+
}), !e.serverSide && t && ((a = (P = (u = (g = (E = (c = e.api) == null ? void 0 : c.getInfiniteCache) == null ? void 0 : E.call(c)) == null ? void 0 : g.params) == null ? void 0 : u.datasource) == null ? void 0 : P.updateData) == null || a.call(
|
|
1632
|
+
P,
|
|
1633
1633
|
e,
|
|
1634
1634
|
n.filter((p) => !(p.__parentPath || p.isChildGroup)),
|
|
1635
1635
|
r,
|
|
1636
1636
|
A
|
|
1637
1637
|
));
|
|
1638
|
-
},
|
|
1638
|
+
}, un = (e) => {
|
|
1639
1639
|
var t, r;
|
|
1640
1640
|
const n = (r = (t = e.api) == null ? void 0 : t.getInfiniteRowModel) == null ? void 0 : r.call(t);
|
|
1641
1641
|
n && n.infiniteCache && n.infiniteCache.purgeCache && n.infiniteCache.purgeCache({ isRefreshData: !1 });
|
|
1642
|
-
}, ke = (e) => Object.keys(e.expandedChildRows).length === 0,
|
|
1642
|
+
}, ke = (e) => Object.keys(e.expandedChildRows).length === 0, Cn = (e, n) => {
|
|
1643
1643
|
var r, A;
|
|
1644
1644
|
const t = (A = (r = e.current) == null ? void 0 : r.querySelectorAll) == null ? void 0 : A.call(
|
|
1645
1645
|
r,
|
|
@@ -1665,27 +1665,27 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1665
1665
|
getSelectedRows: () => {
|
|
1666
1666
|
const i = [];
|
|
1667
1667
|
let o = [];
|
|
1668
|
-
const { serverSide: d, data: f, api: c } = e,
|
|
1669
|
-
d &&
|
|
1668
|
+
const { serverSide: d, data: f, api: c } = e, E = c == null ? void 0 : c.getInfiniteCache();
|
|
1669
|
+
d && E ? o = E.getAllCachedData() || f : !d && E && (o = E.params.datasource.getWholeData() || f);
|
|
1670
1670
|
let g = e.selectedRows;
|
|
1671
1671
|
if (Array.isArray(n.payload)) {
|
|
1672
1672
|
if (Array.isArray(n.payload) && (g = n.payload, o && g && g.length > 0)) {
|
|
1673
|
-
const
|
|
1674
|
-
for (let
|
|
1675
|
-
const a = o[
|
|
1673
|
+
const u = new Set(g.map(String));
|
|
1674
|
+
for (let P = 0; P < o.length; P++) {
|
|
1675
|
+
const a = o[P];
|
|
1676
1676
|
if (!a) continue;
|
|
1677
1677
|
const p = a[e.uniqueIdField] || a.id;
|
|
1678
|
-
if (p !== void 0 &&
|
|
1678
|
+
if (p !== void 0 && u.has(String(p)) && (i.push(a), i.length === g.length))
|
|
1679
1679
|
break;
|
|
1680
1680
|
}
|
|
1681
1681
|
}
|
|
1682
|
-
} else return n.payload ? o.filter((
|
|
1682
|
+
} else return n.payload ? o.filter((u) => !u.__parentPath) : [];
|
|
1683
1683
|
return i;
|
|
1684
1684
|
},
|
|
1685
1685
|
getSelectedRowsID: () => {
|
|
1686
1686
|
let i = e.selectedRows, o = [];
|
|
1687
|
-
const { serverSide: d, data: f, api: c } = e,
|
|
1688
|
-
if (d &&
|
|
1687
|
+
const { serverSide: d, data: f, api: c } = e, E = c == null ? void 0 : c.getInfiniteCache();
|
|
1688
|
+
if (d && E ? o = E.getAllCachedData() || f : !d && E && (o = E.params.datasource.getWholeData() || f), Array.isArray(n.payload))
|
|
1689
1689
|
Array.isArray(n.payload) && (i = n.payload);
|
|
1690
1690
|
else return n.payload ? o.filter((g) => !g.__parentPath).map((g) => g[e.uniqueIdField]) : [];
|
|
1691
1691
|
return i;
|
|
@@ -1708,10 +1708,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1708
1708
|
let A = e.filteredData;
|
|
1709
1709
|
if (e.isSingleSelect) {
|
|
1710
1710
|
const f = n ? [t] : [], c = n ? { [t]: !0 } : {};
|
|
1711
|
-
return A = A == null ? void 0 : A.map((
|
|
1712
|
-
...
|
|
1711
|
+
return A = A == null ? void 0 : A.map((E) => E.is_selected && !n && t === String(E[e.uniqueIdField]) ? {
|
|
1712
|
+
...E,
|
|
1713
1713
|
is_selected: !1
|
|
1714
|
-
} :
|
|
1714
|
+
} : E), {
|
|
1715
1715
|
selectedRowsUpdated: f,
|
|
1716
1716
|
unCheckedRowsUpdated: e.unCheckedRows,
|
|
1717
1717
|
selectedRowsObjectUpdated: c,
|
|
@@ -1786,13 +1786,13 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1786
1786
|
const i = Ln(A, n);
|
|
1787
1787
|
r.push(...i);
|
|
1788
1788
|
}), r;
|
|
1789
|
-
},
|
|
1789
|
+
}, En = (e, n, t) => {
|
|
1790
1790
|
if (!n || !n.aggFunc)
|
|
1791
1791
|
return null;
|
|
1792
1792
|
const r = Ln(e, t);
|
|
1793
1793
|
if (r.length === 0)
|
|
1794
1794
|
return null;
|
|
1795
|
-
const A =
|
|
1795
|
+
const A = F(n), i = r.map((f) => Number(String(f[A]).replaceAll(",", ""))).filter((f) => f != null && !isNaN(f));
|
|
1796
1796
|
if (i.length === 0)
|
|
1797
1797
|
return null;
|
|
1798
1798
|
const o = n.aggFunc, d = wt[o];
|
|
@@ -1800,7 +1800,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1800
1800
|
`Aggregation function '${o}' not found for column '${A}'`
|
|
1801
1801
|
), null);
|
|
1802
1802
|
}, ye = (e, n, t, r, A, i) => {
|
|
1803
|
-
var f, c,
|
|
1803
|
+
var f, c, E;
|
|
1804
1804
|
const o = {
|
|
1805
1805
|
__isAggregationRow: !0,
|
|
1806
1806
|
__parentId: i,
|
|
@@ -1814,26 +1814,26 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1814
1814
|
groupingLevel: r
|
|
1815
1815
|
}, d = e.columns.filter((g) => g.aggFunc);
|
|
1816
1816
|
for (let g = 0; g < e.columns.length; g++) {
|
|
1817
|
-
const
|
|
1818
|
-
if ((f =
|
|
1819
|
-
const a = (c =
|
|
1817
|
+
const u = e.columns[g], P = F(u);
|
|
1818
|
+
if ((f = u == null ? void 0 : u.extra) != null && f.is_grouping_key && (t != null && t[P]) || u.rowGroup && !u.is_hidden) {
|
|
1819
|
+
const a = (c = u == null ? void 0 : u.originalFields) != null && c[r] ? u.originalFields[r] : P, p = (E = u == null ? void 0 : u.originalFields) != null && E[r - 1] ? u.originalFields[r - 1] : P;
|
|
1820
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);
|
|
1821
1821
|
break;
|
|
1822
1822
|
}
|
|
1823
1823
|
}
|
|
1824
1824
|
return d.forEach((g) => {
|
|
1825
1825
|
if (g.aggFunc) {
|
|
1826
|
-
const
|
|
1826
|
+
const u = En(
|
|
1827
1827
|
t,
|
|
1828
1828
|
g,
|
|
1829
1829
|
e.childKeyField
|
|
1830
|
-
),
|
|
1831
|
-
o[
|
|
1832
|
-
const p =
|
|
1830
|
+
), P = F(g);
|
|
1831
|
+
o[P] = u, n && n.length && (n = n.map((a) => {
|
|
1832
|
+
const p = En(
|
|
1833
1833
|
a,
|
|
1834
1834
|
g,
|
|
1835
1835
|
e.childKeyField
|
|
1836
|
-
),
|
|
1836
|
+
), T = a == null ? void 0 : a[e.childKeyField], D = Array.isArray(T) && T.length > 0;
|
|
1837
1837
|
return {
|
|
1838
1838
|
...a,
|
|
1839
1839
|
__parentPath: a.__parentPath ? `${a.__parentPath}${String(a.__parentPath).includes(String(i)) ? "" : `/${i}`}` : String(i),
|
|
@@ -1841,9 +1841,9 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1841
1841
|
parentRowIndex: A,
|
|
1842
1842
|
parentRowData: t,
|
|
1843
1843
|
groupingLevel: r,
|
|
1844
|
-
[
|
|
1845
|
-
__isAggregationRow: !!
|
|
1846
|
-
subTotalAggreRow: !!
|
|
1844
|
+
[P]: p,
|
|
1845
|
+
__isAggregationRow: !!D,
|
|
1846
|
+
subTotalAggreRow: !!D
|
|
1847
1847
|
};
|
|
1848
1848
|
}));
|
|
1849
1849
|
}
|
|
@@ -1852,61 +1852,61 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1852
1852
|
aggreChildRows: n
|
|
1853
1853
|
};
|
|
1854
1854
|
}, fr = (e, n, t, r, A, i) => {
|
|
1855
|
-
var
|
|
1856
|
-
const o = t.parentRowIndex || r, d = e.columns.some((
|
|
1855
|
+
var E, g;
|
|
1856
|
+
const o = t.parentRowIndex || r, d = e.columns.some((u) => u.aggFunc), f = ((E = t.__parentPath) == null ? void 0 : E.split("/").length) || 0;
|
|
1857
1857
|
let c = null;
|
|
1858
1858
|
if (d && f) {
|
|
1859
|
-
const
|
|
1859
|
+
const u = n[o], P = u[i], a = u[e.childKeyField], p = Object.keys(
|
|
1860
1860
|
e.expandedChildRows
|
|
1861
|
-
).reduce((
|
|
1862
|
-
let
|
|
1863
|
-
if (
|
|
1864
|
-
|
|
1865
|
-
let
|
|
1861
|
+
).reduce((y, _) => (_.startsWith(String(P)) && (y += e.expandedChildRows[_].childRowsCount), y), 0), T = !!u.__parentPath;
|
|
1862
|
+
let D;
|
|
1863
|
+
if (T) {
|
|
1864
|
+
D = o + (a == null ? void 0 : a.length) + 1;
|
|
1865
|
+
let y = 0;
|
|
1866
1866
|
Object.keys(e.expandedChildRows).forEach((_) => {
|
|
1867
|
-
const v = String(_).split("/"),
|
|
1868
|
-
|
|
1869
|
-
}),
|
|
1867
|
+
const v = String(_).split("/"), X = String(P), K = v.indexOf(X);
|
|
1868
|
+
K >= 0 && K < v.length - 1 && (y += e.expandedChildRows[_].childRowsCount);
|
|
1869
|
+
}), D += y;
|
|
1870
1870
|
} else
|
|
1871
|
-
|
|
1872
|
-
const { aggreRow:
|
|
1871
|
+
D = p;
|
|
1872
|
+
const { aggreRow: S } = ye(
|
|
1873
1873
|
e,
|
|
1874
1874
|
a,
|
|
1875
|
-
|
|
1875
|
+
u,
|
|
1876
1876
|
f,
|
|
1877
1877
|
o,
|
|
1878
1878
|
A
|
|
1879
1879
|
);
|
|
1880
|
-
n[
|
|
1881
|
-
let U = { ...
|
|
1882
|
-
if (
|
|
1883
|
-
let
|
|
1884
|
-
for (;
|
|
1885
|
-
const _ = U.parentRowIndex, v = ((g = n[_]) == null ? void 0 : g.parentRowIndex) || _,
|
|
1886
|
-
if (
|
|
1887
|
-
const
|
|
1880
|
+
n[D] = S;
|
|
1881
|
+
let U = { ...S };
|
|
1882
|
+
if (T) {
|
|
1883
|
+
let y = f - 1;
|
|
1884
|
+
for (; y !== 0; ) {
|
|
1885
|
+
const _ = U.parentRowIndex, v = ((g = n[_]) == null ? void 0 : g.parentRowIndex) || _, X = v >= 0 ? v : _;
|
|
1886
|
+
if (X >= 0) {
|
|
1887
|
+
const K = n[X], q = K[i], ee = K[e.childKeyField], { aggreRow: ne } = ye(
|
|
1888
1888
|
e,
|
|
1889
1889
|
ee,
|
|
1890
|
-
j,
|
|
1891
|
-
Q,
|
|
1892
1890
|
K,
|
|
1891
|
+
y,
|
|
1892
|
+
X,
|
|
1893
1893
|
q
|
|
1894
|
-
), $ = !!
|
|
1894
|
+
), $ = !!K.__parentPath;
|
|
1895
1895
|
let Z;
|
|
1896
1896
|
if ($) {
|
|
1897
|
-
Z =
|
|
1898
|
-
let
|
|
1897
|
+
Z = X + (ee == null ? void 0 : ee.length) + 1;
|
|
1898
|
+
let re = 0;
|
|
1899
1899
|
Object.keys(e.expandedChildRows).forEach((ae) => {
|
|
1900
|
-
const se = String(ae).split("/"),
|
|
1901
|
-
fe >= 0 && fe < se.length - 1 && (
|
|
1902
|
-
}), Z +=
|
|
1900
|
+
const se = String(ae).split("/"), Ce = String(q), fe = se.indexOf(Ce);
|
|
1901
|
+
fe >= 0 && fe < se.length - 1 && (re += e.expandedChildRows[ae].childRowsCount);
|
|
1902
|
+
}), Z += re;
|
|
1903
1903
|
} else
|
|
1904
1904
|
Z = Object.keys(
|
|
1905
1905
|
e.expandedChildRows
|
|
1906
|
-
).reduce((
|
|
1907
|
-
n[Z] = ne, U = ne,
|
|
1906
|
+
).reduce((re, ae) => (ae.startsWith(String(q)) && (re += e.expandedChildRows[ae].childRowsCount), re), 0);
|
|
1907
|
+
n[Z] = ne, U = ne, y--;
|
|
1908
1908
|
} else
|
|
1909
|
-
|
|
1909
|
+
y = 0;
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
1912
|
const { aggreRow: N } = ye(
|
|
@@ -1919,7 +1919,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1919
1919
|
);
|
|
1920
1920
|
c = N;
|
|
1921
1921
|
} else if (d) {
|
|
1922
|
-
const { aggreRow:
|
|
1922
|
+
const { aggreRow: u } = ye(
|
|
1923
1923
|
e,
|
|
1924
1924
|
[],
|
|
1925
1925
|
{ [e.childKeyField]: n },
|
|
@@ -1927,7 +1927,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1927
1927
|
0,
|
|
1928
1928
|
null
|
|
1929
1929
|
);
|
|
1930
|
-
c =
|
|
1930
|
+
c = u;
|
|
1931
1931
|
}
|
|
1932
1932
|
return {
|
|
1933
1933
|
updatedData: n,
|
|
@@ -1952,7 +1952,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1952
1952
|
});
|
|
1953
1953
|
});
|
|
1954
1954
|
}), t;
|
|
1955
|
-
},
|
|
1955
|
+
}, ur = (e, n, t = "id", r, A) => {
|
|
1956
1956
|
if (!n || !e || !e.length)
|
|
1957
1957
|
return {
|
|
1958
1958
|
processedData: e || [],
|
|
@@ -1966,64 +1966,64 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
1966
1966
|
};
|
|
1967
1967
|
const o = {}, d = [...e];
|
|
1968
1968
|
return i.forEach((f) => {
|
|
1969
|
-
var
|
|
1969
|
+
var E;
|
|
1970
1970
|
const c = /* @__PURE__ */ new Map();
|
|
1971
1971
|
for (let g = 0; g < e.length; g++) {
|
|
1972
|
-
const
|
|
1973
|
-
delete
|
|
1974
|
-
const
|
|
1975
|
-
o[
|
|
1976
|
-
const a = o[
|
|
1972
|
+
const u = e[g];
|
|
1973
|
+
delete u.__rowSpanInfo;
|
|
1974
|
+
const P = u[t];
|
|
1975
|
+
o[P] || (o[P] = {});
|
|
1976
|
+
const a = o[P][f];
|
|
1977
1977
|
if (!(a && a.span === 0))
|
|
1978
1978
|
if (A && typeof A == "function") {
|
|
1979
1979
|
const p = A(
|
|
1980
1980
|
{
|
|
1981
|
-
node: { rowIndex: g, data:
|
|
1981
|
+
node: { rowIndex: g, data: u, api: r },
|
|
1982
1982
|
api: r,
|
|
1983
|
-
data:
|
|
1983
|
+
data: u,
|
|
1984
1984
|
wholeData: e
|
|
1985
1985
|
},
|
|
1986
1986
|
f
|
|
1987
1987
|
);
|
|
1988
1988
|
if (typeof p == "number") {
|
|
1989
|
-
if (o[
|
|
1989
|
+
if (o[P][f] = {
|
|
1990
1990
|
span: p,
|
|
1991
1991
|
isFirst: p > 0,
|
|
1992
1992
|
isLast: p <= 1
|
|
1993
|
-
}, p > 1 && (o[
|
|
1994
|
-
const
|
|
1995
|
-
for (let
|
|
1996
|
-
const
|
|
1997
|
-
if (
|
|
1998
|
-
const U = e[
|
|
1999
|
-
|
|
1993
|
+
}, p > 1 && (o[P].isRowSpan = !0), p > 1) {
|
|
1994
|
+
const T = [P];
|
|
1995
|
+
for (let D = 1; D < p; D++) {
|
|
1996
|
+
const S = g + D;
|
|
1997
|
+
if (S < e.length) {
|
|
1998
|
+
const U = e[S][t];
|
|
1999
|
+
T.push(U), o[U] || (o[U] = {}), o[U][f] = {
|
|
2000
2000
|
span: 0,
|
|
2001
2001
|
isFirst: !1,
|
|
2002
|
-
isLast:
|
|
2002
|
+
isLast: D === p - 1
|
|
2003
2003
|
};
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
|
-
o[
|
|
2006
|
+
o[P][f].rowIds = T;
|
|
2007
2007
|
}
|
|
2008
2008
|
} else
|
|
2009
|
-
o[
|
|
2009
|
+
o[P][f] = {
|
|
2010
2010
|
span: 1,
|
|
2011
2011
|
isFirst: !0,
|
|
2012
2012
|
isLast: !0
|
|
2013
2013
|
};
|
|
2014
2014
|
} else {
|
|
2015
|
-
const p =
|
|
2015
|
+
const p = u[f];
|
|
2016
2016
|
c.has(p) || c.set(p, []), c.get(p).push({
|
|
2017
2017
|
index: g,
|
|
2018
|
-
rowId:
|
|
2019
|
-
rowData:
|
|
2018
|
+
rowId: P,
|
|
2019
|
+
rowData: u
|
|
2020
2020
|
});
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
2023
2023
|
if (!(A && typeof A == "function"))
|
|
2024
|
-
for (const [g,
|
|
2025
|
-
if (
|
|
2026
|
-
const a = (
|
|
2024
|
+
for (const [g, u] of c.entries()) {
|
|
2025
|
+
if (u.length <= 1) {
|
|
2026
|
+
const a = (E = u[0]) == null ? void 0 : E.rowId;
|
|
2027
2027
|
a && (o[a] || (o[a] = {}), o[a][f] = {
|
|
2028
2028
|
span: 1,
|
|
2029
2029
|
isFirst: !0,
|
|
@@ -2031,14 +2031,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2031
2031
|
});
|
|
2032
2032
|
continue;
|
|
2033
2033
|
}
|
|
2034
|
-
const
|
|
2035
|
-
|
|
2036
|
-
const
|
|
2037
|
-
o[
|
|
2038
|
-
span: p === 0 ?
|
|
2034
|
+
const P = u.map((a) => a.rowId);
|
|
2035
|
+
u.forEach((a, p) => {
|
|
2036
|
+
const T = a.rowId;
|
|
2037
|
+
o[T] || (o[T] = {}), o[T][f] = {
|
|
2038
|
+
span: p === 0 ? u.length : 0,
|
|
2039
2039
|
isFirst: p === 0,
|
|
2040
|
-
isLast: p ===
|
|
2041
|
-
rowIds: p === 0 ?
|
|
2040
|
+
isLast: p === u.length - 1,
|
|
2041
|
+
rowIds: p === 0 ? P : void 0
|
|
2042
2042
|
// Store row IDs only in the first row
|
|
2043
2043
|
};
|
|
2044
2044
|
});
|
|
@@ -2094,8 +2094,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2094
2094
|
let d = !1;
|
|
2095
2095
|
r.forEach((f) => {
|
|
2096
2096
|
if (f === "Selection") {
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2097
|
+
const E = i.__rowSpanInfo && i.__rowSpanInfo[f];
|
|
2098
|
+
E != null && E.span && (E == null ? void 0 : E.span) > 1 && (d = !0);
|
|
2099
2099
|
return;
|
|
2100
2100
|
}
|
|
2101
2101
|
const c = hn(
|
|
@@ -2116,10 +2116,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2116
2116
|
}), c > 1 && (d = !0);
|
|
2117
2117
|
}), d && (i.__rowSpanInfo.isRowSpan = !0);
|
|
2118
2118
|
}), A;
|
|
2119
|
-
},
|
|
2119
|
+
}, Cr = (e, n) => {
|
|
2120
2120
|
var r;
|
|
2121
|
-
return (r = e.data) != null && r.__rowSpanInfo && e.data.__rowSpanInfo[n] ? e.data.__rowSpanInfo[n].span || 1 :
|
|
2122
|
-
},
|
|
2121
|
+
return (r = e.data) != null && r.__rowSpanInfo && e.data.__rowSpanInfo[n] ? e.data.__rowSpanInfo[n].span || 1 : Rt(e, n) ? 0 : yn(e, n);
|
|
2122
|
+
}, Rt = (e, n) => {
|
|
2123
2123
|
var o, d;
|
|
2124
2124
|
const t = e.api.getRowData(e, n), r = e.node.rowIndex - 1, A = r >= 0 ? e.api.getDisplayedRowAtIndex(
|
|
2125
2125
|
r,
|
|
@@ -2137,7 +2137,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2137
2137
|
e.wholeData,
|
|
2138
2138
|
e.api
|
|
2139
2139
|
);
|
|
2140
|
-
return !t || !
|
|
2140
|
+
return !t || !Tt(e.node, t, n) || e.node.rowIndex === ((A = (r = e.api) == null ? void 0 : r.rowRenderer) == null ? void 0 : A.lastRenderedRow) ? 1 : 1 + yn(
|
|
2141
2141
|
{
|
|
2142
2142
|
...e,
|
|
2143
2143
|
node: t,
|
|
@@ -2145,7 +2145,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2145
2145
|
},
|
|
2146
2146
|
n
|
|
2147
2147
|
);
|
|
2148
|
-
},
|
|
2148
|
+
}, Tt = (e, n, t) => {
|
|
2149
2149
|
const r = e.api.getRowData(
|
|
2150
2150
|
{ node: e, data: e.data, api: e.api },
|
|
2151
2151
|
t
|
|
@@ -2154,7 +2154,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2154
2154
|
t
|
|
2155
2155
|
) : void 0;
|
|
2156
2156
|
return n !== null && r === A;
|
|
2157
|
-
},
|
|
2157
|
+
}, Er = (e, n, t = "id", r) => {
|
|
2158
2158
|
if (!n || !e || !e.length)
|
|
2159
2159
|
return {
|
|
2160
2160
|
processedData: e || [],
|
|
@@ -2170,38 +2170,38 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2170
2170
|
e,
|
|
2171
2171
|
r || ["wp", "iaf", "ly"]
|
|
2172
2172
|
), o = {}, d = [...i], f = /* @__PURE__ */ new Map();
|
|
2173
|
-
return i.forEach((c,
|
|
2173
|
+
return i.forEach((c, E) => {
|
|
2174
2174
|
if (!c.__flattenedRowId) {
|
|
2175
|
-
const
|
|
2176
|
-
f.has(
|
|
2175
|
+
const u = c[t] || E;
|
|
2176
|
+
f.has(u) || f.set(u, []), f.get(u).push({ row: c, index: E });
|
|
2177
2177
|
return;
|
|
2178
2178
|
}
|
|
2179
2179
|
const g = c.__flattenedRowId.split("__")[0];
|
|
2180
|
-
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: E });
|
|
2181
2181
|
}), A.forEach((c) => {
|
|
2182
|
-
for (const [
|
|
2183
|
-
const
|
|
2182
|
+
for (const [E, g] of f.entries()) {
|
|
2183
|
+
const u = g.length;
|
|
2184
2184
|
g.sort((a, p) => {
|
|
2185
|
-
const
|
|
2186
|
-
return
|
|
2185
|
+
const T = a.row.__split, D = p.row.__split, S = (T == null ? void 0 : T.index) ?? 0, U = (D == null ? void 0 : D.index) ?? 0;
|
|
2186
|
+
return S - U;
|
|
2187
2187
|
});
|
|
2188
|
-
const
|
|
2188
|
+
const P = g.map(
|
|
2189
2189
|
(a) => a.row[t] || a.row.__flattenedRowId || a.index
|
|
2190
2190
|
);
|
|
2191
2191
|
g.forEach((a, p) => {
|
|
2192
|
-
const { row:
|
|
2193
|
-
o[
|
|
2194
|
-
span: p === 0 ?
|
|
2192
|
+
const { row: T, index: D } = a, S = T[t] || T.__flattenedRowId || D;
|
|
2193
|
+
o[S] || (o[S] = {}), o[S][c] = {
|
|
2194
|
+
span: p === 0 ? u : 0,
|
|
2195
2195
|
isFirst: p === 0,
|
|
2196
|
-
isLast: p ===
|
|
2197
|
-
rowIds: p === 0 ?
|
|
2196
|
+
isLast: p === u - 1,
|
|
2197
|
+
rowIds: p === 0 ? P : void 0
|
|
2198
2198
|
// Store row IDs only in the first row
|
|
2199
|
-
},
|
|
2199
|
+
}, u > 1 && p === 0 && (o[S].isRowSpan = !0);
|
|
2200
2200
|
});
|
|
2201
2201
|
}
|
|
2202
2202
|
}), d.forEach((c) => {
|
|
2203
|
-
const
|
|
2204
|
-
c.__rowSpanInfo = o[
|
|
2203
|
+
const E = c[t] || c.__flattenedRowId || c.id;
|
|
2204
|
+
c.__rowSpanInfo = o[E] || {};
|
|
2205
2205
|
}), {
|
|
2206
2206
|
processedData: d,
|
|
2207
2207
|
rowSpanMap: o
|
|
@@ -2396,7 +2396,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2396
2396
|
disableCurrentPageRecords: !1,
|
|
2397
2397
|
showForceLoading: !1
|
|
2398
2398
|
}, mt = (e, n) => {
|
|
2399
|
-
var t, r, A, i, o, d, f, c,
|
|
2399
|
+
var t, r, A, i, o, d, f, c, E, g, u, P, a, p, T, D, S, U, N, y, _, v, X, K, q, ee, ne, $, Z, re, ae, se, Ce, fe, he, ie, ce, Ae, Ee, k, V, le;
|
|
2400
2400
|
switch (n.type) {
|
|
2401
2401
|
case l.SET_LOADING:
|
|
2402
2402
|
return {
|
|
@@ -2409,12 +2409,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2409
2409
|
tableId: n.payload
|
|
2410
2410
|
};
|
|
2411
2411
|
case l.SET_DATA: {
|
|
2412
|
-
const { isCountUnknown: s, totalItems:
|
|
2412
|
+
const { isCountUnknown: s, totalItems: C, totalPages: h, currentPage: B } = n.meta || {}, w = e.columns.some((j) => j.aggFunc), I = B || e.pagination.page || 1;
|
|
2413
2413
|
let m = null;
|
|
2414
2414
|
const G = e.aggregationTotalRow && ((t = e.aggregationTotalRow) == null ? void 0 : t[I]);
|
|
2415
|
-
let
|
|
2415
|
+
let b = e.aggregationTotalRow;
|
|
2416
2416
|
if (w && !G) {
|
|
2417
|
-
const { aggreRow:
|
|
2417
|
+
const { aggreRow: j } = ye(
|
|
2418
2418
|
e,
|
|
2419
2419
|
[],
|
|
2420
2420
|
{ [e.childKeyField]: n.payload },
|
|
@@ -2422,47 +2422,60 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2422
2422
|
0,
|
|
2423
2423
|
null
|
|
2424
2424
|
);
|
|
2425
|
-
m =
|
|
2425
|
+
m = j, b = {
|
|
2426
2426
|
...e.aggregationTotalRow,
|
|
2427
2427
|
[I]: m
|
|
2428
2428
|
};
|
|
2429
2429
|
} else G && (m = G);
|
|
2430
2430
|
const x = n.payload;
|
|
2431
|
-
if ((r = e.data) != null && r.length && JSON.stringify(x) === JSON.stringify(e.data) && s === e.isCountUnknown &&
|
|
2431
|
+
if ((r = e.data) != null && r.length && JSON.stringify(x) === JSON.stringify(e.data) && s === e.isCountUnknown && C === e.totalItems && h === e.totalPages && B === e.currentPage && !m)
|
|
2432
2432
|
return e;
|
|
2433
|
-
const
|
|
2433
|
+
const O = x.map((j) => (delete j._animationState, delete j._isDraggedRow, j)), L = [...e.selectedRows], z = {
|
|
2434
2434
|
...e.selectedRowsObject
|
|
2435
|
-
};
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2435
|
+
}, Q = [...e.checkConfiguration];
|
|
2436
|
+
let R = e.prevAction;
|
|
2437
|
+
for (let j = 0; j < O.length; j++) {
|
|
2438
|
+
const H = O[j];
|
|
2439
|
+
if (H.is_selected && _e(
|
|
2439
2440
|
e.rowSelectionRef,
|
|
2440
|
-
|
|
2441
|
-
|
|
2441
|
+
j,
|
|
2442
|
+
H,
|
|
2442
2443
|
e.uniqueIdField
|
|
2443
2444
|
) || e.serverSide && e.removeSelectionOnOperation && e.isSelectAllRecords) {
|
|
2444
|
-
const
|
|
2445
|
-
|
|
2445
|
+
const M = String(H[e.uniqueIdField]);
|
|
2446
|
+
if (L.push(M), z[M] = !0, R === "checkedRows") {
|
|
2447
|
+
const te = Q.pop();
|
|
2448
|
+
Q.push({
|
|
2449
|
+
checkedRows: [
|
|
2450
|
+
.../* @__PURE__ */ new Set([...(te == null ? void 0 : te.checkedRows) || [], M])
|
|
2451
|
+
]
|
|
2452
|
+
});
|
|
2453
|
+
} else
|
|
2454
|
+
Q.push({
|
|
2455
|
+
checkedRows: [M]
|
|
2456
|
+
}), R = "checkedRows";
|
|
2446
2457
|
}
|
|
2447
2458
|
}
|
|
2448
2459
|
return {
|
|
2449
2460
|
...e,
|
|
2450
|
-
data:
|
|
2451
|
-
filteredData:
|
|
2461
|
+
data: O,
|
|
2462
|
+
filteredData: O,
|
|
2452
2463
|
isLoading: !1,
|
|
2453
2464
|
...m ? {
|
|
2454
|
-
aggregationTotalRow:
|
|
2465
|
+
aggregationTotalRow: b,
|
|
2455
2466
|
pinnedBottomRows: [m]
|
|
2456
2467
|
} : {},
|
|
2457
2468
|
expandedChildRows: {},
|
|
2458
2469
|
hasAggregation: w,
|
|
2459
|
-
selectedRows: [.../* @__PURE__ */ new Set([...
|
|
2470
|
+
selectedRows: [.../* @__PURE__ */ new Set([...L])],
|
|
2471
|
+
checkConfiguration: Q,
|
|
2472
|
+
prevAction: R,
|
|
2460
2473
|
selectedRowsObject: z,
|
|
2461
2474
|
pagination: {
|
|
2462
2475
|
...e.pagination,
|
|
2463
2476
|
...Object.keys(e.columnFilters).length && !e.serverSide ? {} : {
|
|
2464
2477
|
isCountUnknown: s,
|
|
2465
|
-
totalItems:
|
|
2478
|
+
totalItems: C,
|
|
2466
2479
|
allTotalPages: h,
|
|
2467
2480
|
currentLoadedPage: B,
|
|
2468
2481
|
totalPages: h,
|
|
@@ -2477,7 +2490,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2477
2490
|
filteredData: n.payload
|
|
2478
2491
|
};
|
|
2479
2492
|
case l.UPDATE_ROW_DATA: {
|
|
2480
|
-
const { updatedData: s, dataRowIndex:
|
|
2493
|
+
const { updatedData: s, dataRowIndex: C, aggregationRow: h, rowId: B, parentIndex: w } = n.payload, I = Fe(
|
|
2481
2494
|
s,
|
|
2482
2495
|
e.rowSpanColumn,
|
|
2483
2496
|
e.api
|
|
@@ -2487,8 +2500,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2487
2500
|
I,
|
|
2488
2501
|
!0,
|
|
2489
2502
|
B,
|
|
2490
|
-
w >= 0 ? w :
|
|
2491
|
-
),
|
|
2503
|
+
w >= 0 ? w : C
|
|
2504
|
+
), Cn(e.tableInstance, C);
|
|
2492
2505
|
const m = e.pagination.page || 1, G = h ? {
|
|
2493
2506
|
...e.aggregationTotalRow,
|
|
2494
2507
|
[m]: h
|
|
@@ -2504,58 +2517,58 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2504
2517
|
};
|
|
2505
2518
|
}
|
|
2506
2519
|
case l.UPDATE_ROW_DATA_OBJECT: {
|
|
2507
|
-
const { rowId: s, data:
|
|
2520
|
+
const { rowId: s, data: C } = n.payload, h = e.uniqueIdField, B = e.expandedChildRows[s], w = { ...e.expandedChildRows };
|
|
2508
2521
|
let I = !1, m = -1, G = 0;
|
|
2509
2522
|
B && (Object.keys(e.expandedChildRows).filter(
|
|
2510
|
-
(
|
|
2511
|
-
).forEach((
|
|
2512
|
-
G += e.expandedChildRows[
|
|
2523
|
+
(L) => L.startsWith(String(s))
|
|
2524
|
+
).forEach((L) => {
|
|
2525
|
+
G += e.expandedChildRows[L].childRowsCount;
|
|
2513
2526
|
}), m = B.rowIndex);
|
|
2514
|
-
let
|
|
2515
|
-
if (
|
|
2516
|
-
return m =
|
|
2517
|
-
if (
|
|
2518
|
-
const z =
|
|
2519
|
-
if (z !==
|
|
2520
|
-
return { ...
|
|
2527
|
+
let b = ((A = e.data) == null ? void 0 : A.map((O, L) => {
|
|
2528
|
+
if (O[h] == s)
|
|
2529
|
+
return m = L, { ...O, ...C };
|
|
2530
|
+
if (O[e.childKeyField] && Array.isArray(O[e.childKeyField])) {
|
|
2531
|
+
const z = O[e.childKeyField].map((Q) => Q[h] == s ? { ...Q, ...C } : Q);
|
|
2532
|
+
if (z !== O[e.childKeyField])
|
|
2533
|
+
return { ...O, [e.childKeyField]: z };
|
|
2521
2534
|
}
|
|
2522
|
-
return
|
|
2535
|
+
return O;
|
|
2523
2536
|
})) || [];
|
|
2524
2537
|
if (B && m !== -1) {
|
|
2525
|
-
const
|
|
2526
|
-
if (!
|
|
2527
|
-
|
|
2538
|
+
const O = G, L = C[e.childKeyField], Q = (L ? L.length : 0) - O;
|
|
2539
|
+
if (!L)
|
|
2540
|
+
b.splice(m + 1, G);
|
|
2528
2541
|
else {
|
|
2529
|
-
const
|
|
2542
|
+
const R = typeof s == "string" ? s.split("/").length : 1, j = L.map((H) => ({
|
|
2530
2543
|
...H,
|
|
2531
2544
|
__parentPath: H.__parentPath ? `${H.__parentPath}/${H[s]}` : String(s),
|
|
2532
|
-
level:
|
|
2545
|
+
level: R,
|
|
2533
2546
|
parentRowIndex: m,
|
|
2534
|
-
parentRowData:
|
|
2547
|
+
parentRowData: C
|
|
2535
2548
|
}));
|
|
2536
|
-
|
|
2549
|
+
b.splice(m + 1, G), b.splice(
|
|
2537
2550
|
m + 1,
|
|
2538
2551
|
0,
|
|
2539
|
-
...
|
|
2552
|
+
...j
|
|
2540
2553
|
), w[s] = {
|
|
2541
2554
|
...w[s],
|
|
2542
|
-
childRowsCount:
|
|
2555
|
+
childRowsCount: L.length
|
|
2543
2556
|
}, I = !0;
|
|
2544
2557
|
}
|
|
2545
|
-
|
|
2546
|
-
const
|
|
2547
|
-
|
|
2548
|
-
...
|
|
2549
|
-
rowIndex:
|
|
2558
|
+
Q !== 0 && (Object.keys(w).forEach((R) => {
|
|
2559
|
+
const j = w[R];
|
|
2560
|
+
j.rowIndex > m && (w[R] = {
|
|
2561
|
+
...j,
|
|
2562
|
+
rowIndex: j.rowIndex + Q
|
|
2550
2563
|
});
|
|
2551
|
-
}),
|
|
2552
|
-
...
|
|
2553
|
-
parentRowIndex:
|
|
2554
|
-
} :
|
|
2564
|
+
}), b = b.map((R) => R.__parentPath && R.parentRowIndex !== void 0 && R.parentRowIndex > m ? {
|
|
2565
|
+
...R,
|
|
2566
|
+
parentRowIndex: R.parentRowIndex + Q
|
|
2567
|
+
} : R));
|
|
2555
2568
|
}
|
|
2556
|
-
m !== -1 &&
|
|
2569
|
+
m !== -1 && Cn(e.tableInstance, m);
|
|
2557
2570
|
const x = Fe(
|
|
2558
|
-
|
|
2571
|
+
b,
|
|
2559
2572
|
e.rowSpanColumn,
|
|
2560
2573
|
e.api
|
|
2561
2574
|
);
|
|
@@ -2573,7 +2586,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2573
2586
|
};
|
|
2574
2587
|
}
|
|
2575
2588
|
case l.SET_COLUMNS: {
|
|
2576
|
-
const s = ((i = n.meta) == null ? void 0 : i.defaultColDef) || e.defaultColDef, { columns:
|
|
2589
|
+
const s = ((i = n.meta) == null ? void 0 : i.defaultColDef) || e.defaultColDef, { columns: C, frozenData: h } = Be(
|
|
2577
2590
|
n.payload,
|
|
2578
2591
|
s ?? void 0
|
|
2579
2592
|
);
|
|
@@ -2586,26 +2599,26 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2586
2599
|
);
|
|
2587
2600
|
h.indexes.forEach((w) => {
|
|
2588
2601
|
var m;
|
|
2589
|
-
const I =
|
|
2602
|
+
const I = C.find((G) => F(G) === w);
|
|
2590
2603
|
I && !I.hidden && (B += I.width || ((m = e.defaultColDef) == null ? void 0 : m.minWidth) || 150);
|
|
2591
2604
|
}), h.totalWidth = B;
|
|
2592
2605
|
}
|
|
2593
2606
|
return {
|
|
2594
2607
|
...e,
|
|
2595
|
-
columns:
|
|
2608
|
+
columns: C,
|
|
2596
2609
|
frozenColumns: h
|
|
2597
2610
|
};
|
|
2598
2611
|
}
|
|
2599
2612
|
case l.MOVE_ROW: {
|
|
2600
|
-
const { fromIndex: s, toIndex:
|
|
2613
|
+
const { fromIndex: s, toIndex: C } = n.payload, h = [...e.data || []], B = h[s], w = String(B[e.uniqueIdField]);
|
|
2601
2614
|
let I = 0;
|
|
2602
|
-
Object.keys(e.expandedChildRows).forEach((
|
|
2603
|
-
|
|
2615
|
+
Object.keys(e.expandedChildRows).forEach((O) => {
|
|
2616
|
+
O.startsWith(w) && (I += e.expandedChildRows[O].childRowsCount);
|
|
2604
2617
|
});
|
|
2605
2618
|
const m = I + 1, G = h.splice(s, m);
|
|
2606
|
-
let
|
|
2607
|
-
s <
|
|
2608
|
-
const x = h.map((
|
|
2619
|
+
let b = C;
|
|
2620
|
+
s < C && (b -= m), h.splice(b, 0, ...G);
|
|
2621
|
+
const x = h.map((O) => (delete O._isDraggedRow, delete O._animationState, O));
|
|
2609
2622
|
return {
|
|
2610
2623
|
...e,
|
|
2611
2624
|
data: x,
|
|
@@ -2616,7 +2629,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2616
2629
|
case l.SET_SORT: {
|
|
2617
2630
|
const s = ke(e);
|
|
2618
2631
|
(e.isSelectAllRecords || ((o = e.selectedRows) == null ? void 0 : o.length) > 0) && e.removeSelectionOnOperation && qe({ state: e, action: { payload: null } });
|
|
2619
|
-
const
|
|
2632
|
+
const C = {
|
|
2620
2633
|
...e,
|
|
2621
2634
|
...s ? {} : { expandedChildRows: {} },
|
|
2622
2635
|
sortState: n.payload,
|
|
@@ -2628,7 +2641,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2628
2641
|
} : {},
|
|
2629
2642
|
isSelectionChanged: !1,
|
|
2630
2643
|
...e.removeCheckConfigurationOnOperation ? {
|
|
2631
|
-
checkConfiguration: []
|
|
2644
|
+
checkConfiguration: [],
|
|
2645
|
+
prevAction: ""
|
|
2632
2646
|
} : {},
|
|
2633
2647
|
pagination: {
|
|
2634
2648
|
...e.pagination,
|
|
@@ -2637,7 +2651,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2637
2651
|
page: 1
|
|
2638
2652
|
}
|
|
2639
2653
|
};
|
|
2640
|
-
return (f = (d = e.callBackRef) == null ? void 0 : d.current) != null && f.onSortChange && e.callBackRef.current.onSortChange(n.payload),
|
|
2654
|
+
return (f = (d = e.callBackRef) == null ? void 0 : d.current) != null && f.onSortChange && e.callBackRef.current.onSortChange(n.payload), C;
|
|
2641
2655
|
}
|
|
2642
2656
|
case l.ENABLE_ROW_SPAN:
|
|
2643
2657
|
return {
|
|
@@ -2652,10 +2666,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2652
2666
|
case l.SET_PAGE: {
|
|
2653
2667
|
const s = Ze(e);
|
|
2654
2668
|
me(e, s);
|
|
2655
|
-
const
|
|
2669
|
+
const C = ke(e);
|
|
2656
2670
|
return {
|
|
2657
2671
|
...e,
|
|
2658
|
-
...
|
|
2672
|
+
...C ? {} : { expandedChildRows: {} },
|
|
2659
2673
|
pagination: {
|
|
2660
2674
|
...e.pagination,
|
|
2661
2675
|
page: n.payload,
|
|
@@ -2664,7 +2678,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2664
2678
|
};
|
|
2665
2679
|
}
|
|
2666
2680
|
case l.SET_PAGE_SIZE: {
|
|
2667
|
-
const s = ke(e), { totalItems:
|
|
2681
|
+
const s = ke(e), { totalItems: C } = e.pagination;
|
|
2668
2682
|
return {
|
|
2669
2683
|
...e,
|
|
2670
2684
|
...s ? {} : { expandedChildRows: {} },
|
|
@@ -2680,7 +2694,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2680
2694
|
page: 1,
|
|
2681
2695
|
currentPage: 1,
|
|
2682
2696
|
// Reset to first page when changing page size
|
|
2683
|
-
...e.serverSide ? {} : { totalPages: Math.ceil(
|
|
2697
|
+
...e.serverSide ? {} : { totalPages: Math.ceil(C / n.payload) }
|
|
2684
2698
|
}
|
|
2685
2699
|
};
|
|
2686
2700
|
}
|
|
@@ -2690,7 +2704,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2690
2704
|
isSingleSelect: n.payload
|
|
2691
2705
|
};
|
|
2692
2706
|
case l.SET_SELECTED_ROWS: {
|
|
2693
|
-
let s = e.selectedRows,
|
|
2707
|
+
let s = e.selectedRows, C = e.unCheckedRows, h = e.selectedRowsObject, B = e.filteredData;
|
|
2694
2708
|
if (Array.isArray(n.payload))
|
|
2695
2709
|
s = n.payload.map((w) => String(w)), h = n.payload.reduce(
|
|
2696
2710
|
(w, I) => (w[I] = !0, w),
|
|
@@ -2704,18 +2718,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2704
2718
|
singleEntry: G = !1
|
|
2705
2719
|
} = n.payload;
|
|
2706
2720
|
if (G) {
|
|
2707
|
-
const
|
|
2721
|
+
const b = Array.isArray(I) ? I[0] : I, {
|
|
2708
2722
|
selectedRowsUpdated: x,
|
|
2709
|
-
unCheckedRowsUpdated:
|
|
2710
|
-
selectedRowsObjectUpdated:
|
|
2723
|
+
unCheckedRowsUpdated: O,
|
|
2724
|
+
selectedRowsObjectUpdated: L,
|
|
2711
2725
|
filteredData: z
|
|
2712
2726
|
} = It({
|
|
2713
2727
|
state: e,
|
|
2714
2728
|
isSelected: w,
|
|
2715
|
-
selectUnselectRowId: String(
|
|
2729
|
+
selectUnselectRowId: String(b),
|
|
2716
2730
|
isUnchecked: m
|
|
2717
2731
|
});
|
|
2718
|
-
s = x,
|
|
2732
|
+
s = x, C = O, h = L, B = z;
|
|
2719
2733
|
}
|
|
2720
2734
|
}
|
|
2721
2735
|
return qe({
|
|
@@ -2727,15 +2741,15 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2727
2741
|
selectedRows: s,
|
|
2728
2742
|
selectedRowsObject: h,
|
|
2729
2743
|
isSelectionChanged: !1,
|
|
2730
|
-
unCheckedRows:
|
|
2744
|
+
unCheckedRows: C
|
|
2731
2745
|
};
|
|
2732
2746
|
}
|
|
2733
2747
|
case l.SET_COLUMN_FILTER: {
|
|
2734
|
-
const { field: s, rules:
|
|
2748
|
+
const { field: s, rules: C, isBulk: h, filters: B } = n.payload;
|
|
2735
2749
|
return {
|
|
2736
2750
|
...e,
|
|
2737
2751
|
columnFilters: {
|
|
2738
|
-
...h ? B : { ...e.columnFilters, [s]:
|
|
2752
|
+
...h ? B : { ...e.columnFilters, [s]: C }
|
|
2739
2753
|
}
|
|
2740
2754
|
};
|
|
2741
2755
|
}
|
|
@@ -2752,11 +2766,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2752
2766
|
};
|
|
2753
2767
|
}
|
|
2754
2768
|
case l.APPLY_FILTERS: {
|
|
2755
|
-
const { isChildRowEmpty: s, updatedData:
|
|
2769
|
+
const { isChildRowEmpty: s, updatedData: C, filteredData: h } = n.payload;
|
|
2756
2770
|
return {
|
|
2757
2771
|
...e,
|
|
2758
2772
|
...s ? {} : { expandedChildRows: {} },
|
|
2759
|
-
data:
|
|
2773
|
+
data: C,
|
|
2760
2774
|
filteredData: h,
|
|
2761
2775
|
...e.removeSelectionOnOperation ? {
|
|
2762
2776
|
selectedRows: [],
|
|
@@ -2766,7 +2780,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2766
2780
|
} : {},
|
|
2767
2781
|
isSelectionChanged: !1,
|
|
2768
2782
|
...e.removeCheckConfigurationOnOperation ? {
|
|
2769
|
-
checkConfiguration: []
|
|
2783
|
+
checkConfiguration: [],
|
|
2784
|
+
prevAction: ""
|
|
2770
2785
|
} : {},
|
|
2771
2786
|
pagination: {
|
|
2772
2787
|
...e.pagination,
|
|
@@ -2784,58 +2799,58 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2784
2799
|
};
|
|
2785
2800
|
}
|
|
2786
2801
|
case l.TOGGLE_GROUP_EXPANSION: {
|
|
2787
|
-
const { rowId: s, rowIndex:
|
|
2802
|
+
const { rowId: s, rowIndex: C } = n.payload, h = String(s), B = e.filteredData || [];
|
|
2788
2803
|
let w;
|
|
2789
2804
|
const I = [...B], m = h.split("/").length, G = !e.expandedChildRows[h];
|
|
2790
2805
|
if (G) {
|
|
2791
|
-
const
|
|
2792
|
-
let
|
|
2793
|
-
if (
|
|
2794
|
-
const { aggreRow: H, aggreChildRows:
|
|
2806
|
+
const b = B[C], x = (b == null ? void 0 : b[e.childKeyField]) || [], O = e.columns.some((H) => H.aggFunc);
|
|
2807
|
+
let L = x, z = null;
|
|
2808
|
+
if (O && x.length > 0) {
|
|
2809
|
+
const { aggreRow: H, aggreChildRows: M } = ye(
|
|
2795
2810
|
e,
|
|
2796
|
-
|
|
2797
|
-
|
|
2811
|
+
L,
|
|
2812
|
+
b,
|
|
2798
2813
|
m,
|
|
2799
|
-
|
|
2814
|
+
C,
|
|
2800
2815
|
h
|
|
2801
2816
|
);
|
|
2802
|
-
z = H,
|
|
2817
|
+
z = H, L = M;
|
|
2803
2818
|
} else
|
|
2804
|
-
|
|
2819
|
+
L = L.map((H) => ({
|
|
2805
2820
|
...H,
|
|
2806
2821
|
__parentPath: H.__parentPath ? `${H.__parentPath}/${h}` : h,
|
|
2807
2822
|
level: m,
|
|
2808
|
-
parentRowIndex:
|
|
2809
|
-
parentRowData:
|
|
2823
|
+
parentRowIndex: C,
|
|
2824
|
+
parentRowData: b,
|
|
2810
2825
|
groupingLevel: m
|
|
2811
2826
|
}));
|
|
2812
|
-
const
|
|
2827
|
+
const Q = x.length + (z ? 1 : 0);
|
|
2813
2828
|
w = {
|
|
2814
2829
|
...e.expandedChildRows,
|
|
2815
2830
|
[h]: {
|
|
2816
2831
|
rowId: h,
|
|
2817
|
-
rowIndex:
|
|
2818
|
-
childRowsCount:
|
|
2832
|
+
rowIndex: C,
|
|
2833
|
+
childRowsCount: Q
|
|
2819
2834
|
}
|
|
2820
2835
|
};
|
|
2821
|
-
const
|
|
2822
|
-
[
|
|
2836
|
+
const R = Fe(
|
|
2837
|
+
[b, ...L],
|
|
2823
2838
|
e.rowSpanColumn,
|
|
2824
2839
|
e.api
|
|
2825
|
-
),
|
|
2826
|
-
I.splice(
|
|
2840
|
+
), j = z ? [...R, z] : R;
|
|
2841
|
+
I.splice(C, 1), I.splice(C, 0, ...j);
|
|
2827
2842
|
} else {
|
|
2828
2843
|
w = {
|
|
2829
2844
|
...e.expandedChildRows
|
|
2830
2845
|
};
|
|
2831
|
-
let
|
|
2846
|
+
let b = 0;
|
|
2832
2847
|
Object.keys(w).forEach((x) => {
|
|
2833
|
-
x.startsWith(h) && (
|
|
2834
|
-
}), delete I[
|
|
2848
|
+
x.startsWith(h) && (b += w[x].childRowsCount, delete w[x]);
|
|
2849
|
+
}), delete I[C].__rowSpanInfo, I.splice(C + 1, b);
|
|
2835
2850
|
}
|
|
2836
|
-
return (
|
|
2851
|
+
return (E = (c = e.callBackRef) == null ? void 0 : c.current) != null && E.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
|
|
2837
2852
|
rowId: h,
|
|
2838
|
-
rowIndex:
|
|
2853
|
+
rowIndex: C,
|
|
2839
2854
|
api: e.api,
|
|
2840
2855
|
isExpanded: G
|
|
2841
2856
|
}), me(e, I), {
|
|
@@ -2857,12 +2872,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2857
2872
|
isSelectionChanged: !1
|
|
2858
2873
|
} : e;
|
|
2859
2874
|
case l.FREEZE_COLUMN: {
|
|
2860
|
-
const { columnId: s } = n.payload,
|
|
2861
|
-
|
|
2875
|
+
const { columnId: s } = n.payload, C = e.columns.map((I) => F(I) === s ? { ...I, is_frozen: !0, pinned: "left" } : I), { processedColumns: h } = De(
|
|
2876
|
+
C,
|
|
2862
2877
|
e.expandedColumnGroups || {},
|
|
2863
2878
|
0,
|
|
2864
2879
|
null,
|
|
2865
|
-
((
|
|
2880
|
+
((u = (g = n.meta) == null ? void 0 : g.defaultColDef) == null ? void 0 : u.minWidth) || ((P = e.defaultColDef) == null ? void 0 : P.minWidth) || 150
|
|
2866
2881
|
), { columns: B, frozenData: w } = Be(
|
|
2867
2882
|
h,
|
|
2868
2883
|
((a = n.meta) == null ? void 0 : a.defaultColDef) || e.defaultColDef || void 0
|
|
@@ -2874,87 +2889,87 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2874
2889
|
};
|
|
2875
2890
|
}
|
|
2876
2891
|
case l.UNFREEZE_COLUMN: {
|
|
2877
|
-
const { columnId: s } = n.payload,
|
|
2878
|
-
if (e.columns.forEach((
|
|
2879
|
-
if (
|
|
2880
|
-
const z =
|
|
2881
|
-
h[z] = [],
|
|
2882
|
-
const
|
|
2883
|
-
|
|
2892
|
+
const { columnId: s } = n.payload, C = {}, h = {};
|
|
2893
|
+
if (e.columns.forEach((L) => {
|
|
2894
|
+
if (L.children && Array.isArray(L.children)) {
|
|
2895
|
+
const z = F(L);
|
|
2896
|
+
h[z] = [], L.children.forEach((Q) => {
|
|
2897
|
+
const R = F(Q);
|
|
2898
|
+
C[R] = z, h[z] ? h[z].push(R) : h[z] = [R];
|
|
2884
2899
|
});
|
|
2885
2900
|
}
|
|
2886
2901
|
}), !e.columns.find(
|
|
2887
|
-
(
|
|
2902
|
+
(L) => F(L) === s
|
|
2888
2903
|
)) return e;
|
|
2889
2904
|
const w = [];
|
|
2890
2905
|
let I = s;
|
|
2891
|
-
for (;
|
|
2892
|
-
const
|
|
2893
|
-
w.push(
|
|
2906
|
+
for (; C[I]; ) {
|
|
2907
|
+
const L = C[I];
|
|
2908
|
+
w.push(L), I = L;
|
|
2894
2909
|
}
|
|
2895
2910
|
const m = {};
|
|
2896
|
-
e.columns.forEach((
|
|
2897
|
-
const z =
|
|
2898
|
-
if (
|
|
2899
|
-
let
|
|
2900
|
-
for (;
|
|
2901
|
-
const
|
|
2902
|
-
m[
|
|
2911
|
+
e.columns.forEach((L) => {
|
|
2912
|
+
const z = F(L);
|
|
2913
|
+
if (L.is_frozen && z !== s && w.includes(z) === !1) {
|
|
2914
|
+
let Q = z;
|
|
2915
|
+
for (; C[Q]; ) {
|
|
2916
|
+
const R = C[Q];
|
|
2917
|
+
m[R] = !0, Q = R;
|
|
2903
2918
|
}
|
|
2904
2919
|
}
|
|
2905
2920
|
});
|
|
2906
|
-
const G = e.columns.map((
|
|
2907
|
-
const z =
|
|
2908
|
-
return z === s ? { ...
|
|
2909
|
-
}), { processedColumns:
|
|
2921
|
+
const G = e.columns.map((L) => {
|
|
2922
|
+
const z = F(L);
|
|
2923
|
+
return z === s ? { ...L, is_frozen: !1, pinned: null } : w.includes(z) ? m[z] ? L : { ...L, is_frozen: !1, pinned: null } : L;
|
|
2924
|
+
}), { processedColumns: b } = De(
|
|
2910
2925
|
G,
|
|
2911
2926
|
e.expandedColumnGroups || {},
|
|
2912
2927
|
0,
|
|
2913
2928
|
null,
|
|
2914
|
-
((
|
|
2915
|
-
), { columns: x, frozenData:
|
|
2916
|
-
|
|
2917
|
-
((
|
|
2929
|
+
((T = (p = n.meta) == null ? void 0 : p.defaultColDef) == null ? void 0 : T.minWidth) || ((D = e.defaultColDef) == null ? void 0 : D.minWidth) || 150
|
|
2930
|
+
), { columns: x, frozenData: O } = Be(
|
|
2931
|
+
b,
|
|
2932
|
+
((S = n.meta) == null ? void 0 : S.defaultColDef) || e.defaultColDef || void 0
|
|
2918
2933
|
);
|
|
2919
2934
|
return {
|
|
2920
2935
|
...e,
|
|
2921
2936
|
columns: x,
|
|
2922
|
-
frozenColumns:
|
|
2937
|
+
frozenColumns: O
|
|
2923
2938
|
};
|
|
2924
2939
|
}
|
|
2925
2940
|
case l.SET_COLUMN_WIDTH: {
|
|
2926
2941
|
const {
|
|
2927
2942
|
field: s,
|
|
2928
|
-
width:
|
|
2943
|
+
width: C,
|
|
2929
2944
|
isAutoWidth: h
|
|
2930
2945
|
} = n.payload, B = (G) => {
|
|
2931
|
-
if (
|
|
2946
|
+
if (F(G) === s)
|
|
2932
2947
|
return {
|
|
2933
2948
|
...G,
|
|
2934
|
-
width:
|
|
2949
|
+
width: C,
|
|
2935
2950
|
isAutoWidth: h !== void 0 ? h : G.isAutoWidth
|
|
2936
2951
|
};
|
|
2937
2952
|
if (G.children && G.children.length > 0) {
|
|
2938
2953
|
const x = G.children.some(
|
|
2939
|
-
(
|
|
2940
|
-
),
|
|
2954
|
+
(L) => F(L) === s || L.path && L.path.includes(s)
|
|
2955
|
+
), O = G.children.map(
|
|
2941
2956
|
B
|
|
2942
2957
|
);
|
|
2943
2958
|
if (x) {
|
|
2944
|
-
const
|
|
2945
|
-
(z,
|
|
2959
|
+
const L = O.reduce(
|
|
2960
|
+
(z, Q) => Q.hidden || Q.is_hidden ? z : z + (Q.width || 100),
|
|
2946
2961
|
0
|
|
2947
2962
|
);
|
|
2948
2963
|
return {
|
|
2949
2964
|
...G,
|
|
2950
|
-
children:
|
|
2965
|
+
children: O,
|
|
2951
2966
|
// Update parent width based on children's total width
|
|
2952
|
-
width:
|
|
2967
|
+
width: L
|
|
2953
2968
|
};
|
|
2954
2969
|
}
|
|
2955
2970
|
return {
|
|
2956
2971
|
...G,
|
|
2957
|
-
children:
|
|
2972
|
+
children: O
|
|
2958
2973
|
};
|
|
2959
2974
|
}
|
|
2960
2975
|
return G;
|
|
@@ -2971,12 +2986,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2971
2986
|
};
|
|
2972
2987
|
}
|
|
2973
2988
|
case l.SET_COLUMNS_WIDTH: {
|
|
2974
|
-
const { widths: s, isAutoWidth:
|
|
2975
|
-
const I =
|
|
2989
|
+
const { widths: s, isAutoWidth: C } = n.payload, h = e.columns.map((w) => {
|
|
2990
|
+
const I = F(w);
|
|
2976
2991
|
return s[I] !== void 0 ? {
|
|
2977
2992
|
...w,
|
|
2978
2993
|
width: s[I],
|
|
2979
|
-
isAutoWidth:
|
|
2994
|
+
isAutoWidth: C !== void 0 ? C : w.isAutoWidth
|
|
2980
2995
|
} : w;
|
|
2981
2996
|
}), B = { ...e.frozenColumns };
|
|
2982
2997
|
if (B.indexes.length > 0) {
|
|
@@ -2987,10 +3002,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
2987
3002
|
);
|
|
2988
3003
|
B.indexes.forEach((I) => {
|
|
2989
3004
|
const m = h.find(
|
|
2990
|
-
(G) =>
|
|
3005
|
+
(G) => F(G) === I
|
|
2991
3006
|
);
|
|
2992
3007
|
if (m && !m.hidden) {
|
|
2993
|
-
const G =
|
|
3008
|
+
const G = F(m);
|
|
2994
3009
|
B.positions[G] = w, w += m.width || 100;
|
|
2995
3010
|
}
|
|
2996
3011
|
}), B.totalWidth = w;
|
|
@@ -3023,14 +3038,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3023
3038
|
}
|
|
3024
3039
|
};
|
|
3025
3040
|
case l.TOGGLE_COLUMN_VISIBILITY: {
|
|
3026
|
-
const { columns: s, frozenData:
|
|
3041
|
+
const { columns: s, frozenData: C } = Be(
|
|
3027
3042
|
n.payload,
|
|
3028
3043
|
e.defaultColDef || { minWidth: 150 }
|
|
3029
3044
|
);
|
|
3030
3045
|
return {
|
|
3031
3046
|
...e,
|
|
3032
3047
|
columns: s,
|
|
3033
|
-
frozenColumns:
|
|
3048
|
+
frozenColumns: C
|
|
3034
3049
|
};
|
|
3035
3050
|
}
|
|
3036
3051
|
case l.AUTOSIZE_COLUMNS_REQUESTED:
|
|
@@ -3039,21 +3054,21 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3039
3054
|
columnsToAutosize: n.payload.columnsToAutosize
|
|
3040
3055
|
};
|
|
3041
3056
|
case l.PIN_COLUMN_RIGHT: {
|
|
3042
|
-
const { field: s } = n.payload,
|
|
3043
|
-
(
|
|
3057
|
+
const { field: s } = n.payload, C = window.innerWidth * 0.3, h = e.columns.find(
|
|
3058
|
+
(M) => F(M) === s
|
|
3044
3059
|
);
|
|
3045
3060
|
if (!h)
|
|
3046
3061
|
return e;
|
|
3047
3062
|
const w = e.columns.filter(
|
|
3048
|
-
(
|
|
3063
|
+
(M) => M.pinned === "right"
|
|
3049
3064
|
).reduce(
|
|
3050
|
-
(
|
|
3051
|
-
var
|
|
3052
|
-
return
|
|
3065
|
+
(M, te) => {
|
|
3066
|
+
var ue;
|
|
3067
|
+
return M + (te.width || ((ue = e.defaultColDef) == null ? void 0 : ue.minWidth) || 150);
|
|
3053
3068
|
},
|
|
3054
3069
|
0
|
|
3055
3070
|
), I = h.width || ((U = e.defaultColDef) == null ? void 0 : U.minWidth) || 150;
|
|
3056
|
-
if (w + I >
|
|
3071
|
+
if (w + I > C)
|
|
3057
3072
|
return {
|
|
3058
3073
|
...e,
|
|
3059
3074
|
notification: {
|
|
@@ -3063,76 +3078,76 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3063
3078
|
timeout: 5e3
|
|
3064
3079
|
}
|
|
3065
3080
|
};
|
|
3066
|
-
const { parentToChildrenMap:
|
|
3081
|
+
const { parentToChildrenMap: b, childToParentMap: x } = tn(
|
|
3067
3082
|
e.columns
|
|
3068
|
-
),
|
|
3069
|
-
const
|
|
3070
|
-
return
|
|
3071
|
-
...
|
|
3083
|
+
), O = x[s], L = !!O, z = L ? fn(s, x) : [], Q = L ? b[O] || [] : [], R = e.columns.map((M) => {
|
|
3084
|
+
const te = F(M);
|
|
3085
|
+
return te === s ? {
|
|
3086
|
+
...M,
|
|
3072
3087
|
pinned: "right",
|
|
3073
3088
|
is_frozen: !1
|
|
3074
3089
|
// Ensure it's not left-pinned
|
|
3075
|
-
} : z.includes(
|
|
3076
|
-
...
|
|
3090
|
+
} : z.includes(te) ? {
|
|
3091
|
+
...M,
|
|
3077
3092
|
pinned: "right",
|
|
3078
3093
|
is_frozen: !1
|
|
3079
|
-
} : z.some((we) => (
|
|
3080
|
-
...
|
|
3094
|
+
} : z.some((we) => (b[we] || []).includes(te)) ? {
|
|
3095
|
+
...M,
|
|
3081
3096
|
pinned: "right",
|
|
3082
3097
|
is_frozen: !1
|
|
3083
|
-
} :
|
|
3084
|
-
...
|
|
3098
|
+
} : Q.includes(te) ? {
|
|
3099
|
+
...M,
|
|
3085
3100
|
pinned: "right",
|
|
3086
3101
|
is_frozen: !1
|
|
3087
|
-
} :
|
|
3088
|
-
}), { columns:
|
|
3089
|
-
|
|
3102
|
+
} : M;
|
|
3103
|
+
}), { columns: j, frozenData: H } = Be(
|
|
3104
|
+
R,
|
|
3090
3105
|
((N = n.meta) == null ? void 0 : N.defaultColDef) || e.defaultColDef || void 0
|
|
3091
3106
|
);
|
|
3092
3107
|
return {
|
|
3093
3108
|
...e,
|
|
3094
|
-
columns:
|
|
3109
|
+
columns: j,
|
|
3095
3110
|
frozenColumns: H
|
|
3096
3111
|
};
|
|
3097
3112
|
}
|
|
3098
3113
|
case l.UNPIN_COLUMN_RIGHT: {
|
|
3099
|
-
const { field: s } = n.payload, { parentToChildrenMap:
|
|
3114
|
+
const { field: s } = n.payload, { parentToChildrenMap: C, childToParentMap: h } = tn(
|
|
3100
3115
|
e.columns
|
|
3101
|
-
), B = h[s], w = !!B, I = w ? fn(s, h) : [], m = w ?
|
|
3102
|
-
const
|
|
3103
|
-
return
|
|
3104
|
-
...
|
|
3116
|
+
), B = h[s], w = !!B, I = w ? fn(s, h) : [], m = w ? C[B] || [] : [], G = e.columns.map((O) => {
|
|
3117
|
+
const L = F(O);
|
|
3118
|
+
return L === s ? {
|
|
3119
|
+
...O,
|
|
3105
3120
|
pinned: void 0
|
|
3106
|
-
} : I.includes(
|
|
3107
|
-
...
|
|
3121
|
+
} : I.includes(L) ? {
|
|
3122
|
+
...O,
|
|
3108
3123
|
pinned: void 0
|
|
3109
|
-
} : I.some((
|
|
3110
|
-
...
|
|
3124
|
+
} : I.some((Q) => (C[Q] || []).includes(L)) ? {
|
|
3125
|
+
...O,
|
|
3111
3126
|
pinned: void 0
|
|
3112
|
-
} : m.includes(
|
|
3113
|
-
...
|
|
3127
|
+
} : m.includes(L) ? {
|
|
3128
|
+
...O,
|
|
3114
3129
|
pinned: void 0
|
|
3115
|
-
} :
|
|
3116
|
-
}), { columns:
|
|
3130
|
+
} : O;
|
|
3131
|
+
}), { columns: b, frozenData: x } = Be(
|
|
3117
3132
|
G,
|
|
3118
|
-
((
|
|
3133
|
+
((y = n.meta) == null ? void 0 : y.defaultColDef) || e.defaultColDef || void 0
|
|
3119
3134
|
);
|
|
3120
3135
|
return {
|
|
3121
3136
|
...e,
|
|
3122
|
-
columns:
|
|
3137
|
+
columns: b,
|
|
3123
3138
|
frozenColumns: x
|
|
3124
3139
|
};
|
|
3125
3140
|
}
|
|
3126
3141
|
case l.TOGGLE_FREEZE_COLUMN: {
|
|
3127
3142
|
const {
|
|
3128
3143
|
field: s,
|
|
3129
|
-
column:
|
|
3144
|
+
column: C,
|
|
3130
3145
|
frozen: h = !1,
|
|
3131
3146
|
options: B = {}
|
|
3132
3147
|
} = n.payload, w = ht({
|
|
3133
3148
|
state: e,
|
|
3134
3149
|
freezeColumnField: s,
|
|
3135
|
-
column:
|
|
3150
|
+
column: C,
|
|
3136
3151
|
frozen: h,
|
|
3137
3152
|
options: B
|
|
3138
3153
|
});
|
|
@@ -3142,11 +3157,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3142
3157
|
};
|
|
3143
3158
|
}
|
|
3144
3159
|
case l.REORDER_COLUMNS: {
|
|
3145
|
-
const { sourceColumn: s, targetColumn:
|
|
3146
|
-
var
|
|
3147
|
-
return
|
|
3148
|
-
}, G = I ? m(s) : s.width || ((
|
|
3149
|
-
if (
|
|
3160
|
+
const { sourceColumn: s, targetColumn: C } = 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 = (R) => {
|
|
3161
|
+
var j;
|
|
3162
|
+
return R.children && R.children.length > 0 ? R.children.reduce((H, M) => H + m(M), 0) : R.width || ((j = e.defaultColDef) == null ? void 0 : j.minWidth) || 150;
|
|
3163
|
+
}, G = I ? m(s) : s.width || ((X = e.defaultColDef) == null ? void 0 : X.minWidth) || 150;
|
|
3164
|
+
if (C.is_frozen && !s.is_frozen && G && h + G > B * 0.7)
|
|
3150
3165
|
return {
|
|
3151
3166
|
...e,
|
|
3152
3167
|
notification: {
|
|
@@ -3157,44 +3172,44 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3157
3172
|
timeout: 3e3
|
|
3158
3173
|
}
|
|
3159
3174
|
};
|
|
3160
|
-
if (!s || !
|
|
3175
|
+
if (!s || !C)
|
|
3161
3176
|
return console.error("Invalid source or target column for reordering", {
|
|
3162
3177
|
sourceColumn: s,
|
|
3163
|
-
targetColumn:
|
|
3178
|
+
targetColumn: C
|
|
3164
3179
|
}), e;
|
|
3165
|
-
let
|
|
3166
|
-
|
|
3180
|
+
let b = [...w];
|
|
3181
|
+
b = $n(
|
|
3167
3182
|
s,
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
),
|
|
3171
|
-
|
|
3183
|
+
C,
|
|
3184
|
+
b
|
|
3185
|
+
), b.forEach((R, j) => {
|
|
3186
|
+
R.order_of_display = j + 1;
|
|
3172
3187
|
});
|
|
3173
3188
|
const { initialGroupedColumns: x } = De(
|
|
3174
|
-
|
|
3189
|
+
b,
|
|
3175
3190
|
e.expandedColumnGroups || {},
|
|
3176
3191
|
0,
|
|
3177
3192
|
null,
|
|
3178
|
-
((
|
|
3179
|
-
),
|
|
3180
|
-
x.forEach((
|
|
3181
|
-
|
|
3193
|
+
((K = e.defaultColDef) == null ? void 0 : K.minWidth) || 150
|
|
3194
|
+
), O = { ...e.expandedColumnGroups };
|
|
3195
|
+
x.forEach((R) => {
|
|
3196
|
+
O[R] !== !0 && (O[R] = !0);
|
|
3182
3197
|
});
|
|
3183
|
-
const { processedColumns:
|
|
3184
|
-
|
|
3185
|
-
|
|
3198
|
+
const { processedColumns: L } = De(
|
|
3199
|
+
b,
|
|
3200
|
+
O,
|
|
3186
3201
|
0,
|
|
3187
3202
|
null,
|
|
3188
3203
|
((q = e.defaultColDef) == null ? void 0 : q.minWidth) || 150
|
|
3189
|
-
), { columns: z, frozenData:
|
|
3190
|
-
|
|
3204
|
+
), { columns: z, frozenData: Q } = Be(
|
|
3205
|
+
L,
|
|
3191
3206
|
((ee = n.meta) == null ? void 0 : ee.defaultColDef) || e.defaultColDef || void 0
|
|
3192
3207
|
);
|
|
3193
3208
|
return {
|
|
3194
3209
|
...e,
|
|
3195
3210
|
columns: z,
|
|
3196
|
-
frozenColumns:
|
|
3197
|
-
expandedColumnGroups:
|
|
3211
|
+
frozenColumns: Q,
|
|
3212
|
+
expandedColumnGroups: O
|
|
3198
3213
|
};
|
|
3199
3214
|
}
|
|
3200
3215
|
case l.SET_PREV_ACTION:
|
|
@@ -3209,93 +3224,93 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3209
3224
|
};
|
|
3210
3225
|
case l.SET_IS_SELECT_ALL_RECORDS: {
|
|
3211
3226
|
const s = (ne = e.api) == null ? void 0 : ne.getInfiniteCache();
|
|
3212
|
-
let
|
|
3213
|
-
e.serverSide ?
|
|
3214
|
-
let h =
|
|
3227
|
+
let C = [];
|
|
3228
|
+
e.serverSide ? C = (s == null ? void 0 : s.getAllCachedData()) || e.data || [] : C = (s == null ? void 0 : s.params.datasource.getWholeData()) || e.data || [];
|
|
3229
|
+
let h = C, B = !1;
|
|
3215
3230
|
if (!e.serverSide && e.columnFilters && Object.keys(e.columnFilters).length > 0) {
|
|
3216
|
-
const
|
|
3231
|
+
const Q = Un(
|
|
3217
3232
|
e.columns
|
|
3218
3233
|
);
|
|
3219
|
-
h =
|
|
3220
|
-
|
|
3234
|
+
h = ut(
|
|
3235
|
+
C,
|
|
3221
3236
|
e.columnFilters,
|
|
3222
|
-
|
|
3237
|
+
Q
|
|
3223
3238
|
), B = !0;
|
|
3224
3239
|
}
|
|
3225
3240
|
const w = {};
|
|
3226
|
-
for (let
|
|
3227
|
-
const
|
|
3228
|
-
|
|
3241
|
+
for (let Q = 0; Q < h.length; Q++) {
|
|
3242
|
+
const R = h[Q], j = String(R[e.uniqueIdField]);
|
|
3243
|
+
R != null && R.__parentPath || R != null && R.isChildGroup || (w[j] = !0);
|
|
3229
3244
|
}
|
|
3230
3245
|
let I = [], m = {}, G = {};
|
|
3231
3246
|
if (n.payload) {
|
|
3232
3247
|
I = [...e.selectedRows], m = { ...e.selectedRowsObject }, G = { ...e.unCheckedRows };
|
|
3233
|
-
for (const
|
|
3234
|
-
if (!m[
|
|
3235
|
-
const
|
|
3236
|
-
(
|
|
3248
|
+
for (const Q in w) {
|
|
3249
|
+
if (!m[Q]) {
|
|
3250
|
+
const R = h.findIndex(
|
|
3251
|
+
(j) => String(j[e.uniqueIdField]) === Q
|
|
3237
3252
|
);
|
|
3238
3253
|
_e(
|
|
3239
3254
|
e.rowSelectionRef,
|
|
3240
|
-
|
|
3241
|
-
h[
|
|
3255
|
+
R,
|
|
3256
|
+
h[R],
|
|
3242
3257
|
e.uniqueIdField
|
|
3243
|
-
) && (I.push(
|
|
3258
|
+
) && (I.push(Q), m[Q] = !0);
|
|
3244
3259
|
}
|
|
3245
|
-
delete G[
|
|
3260
|
+
delete G[Q];
|
|
3246
3261
|
}
|
|
3247
3262
|
} else if (!n.payload && Object.keys(e.columnFilters).length === 0)
|
|
3248
|
-
I = [], m = {}, G = {}, h = h.map((
|
|
3263
|
+
I = [], m = {}, G = {}, h = h.map((Q) => Q.is_selected ? { ...Q, is_selected: !1 } : Q);
|
|
3249
3264
|
else {
|
|
3250
3265
|
G = { ...e.unCheckedRows };
|
|
3251
|
-
for (let
|
|
3252
|
-
const
|
|
3253
|
-
if (w[
|
|
3254
|
-
G[
|
|
3266
|
+
for (let Q = 0; Q < e.selectedRows.length; Q++) {
|
|
3267
|
+
const R = e.selectedRows[Q];
|
|
3268
|
+
if (w[R])
|
|
3269
|
+
G[R] = !0;
|
|
3255
3270
|
else {
|
|
3256
|
-
const
|
|
3257
|
-
(H) => String(H[e.uniqueIdField]) ===
|
|
3271
|
+
const j = h.findIndex(
|
|
3272
|
+
(H) => String(H[e.uniqueIdField]) === R
|
|
3258
3273
|
);
|
|
3259
3274
|
_e(
|
|
3260
3275
|
e.rowSelectionRef,
|
|
3261
|
-
|
|
3262
|
-
h[
|
|
3276
|
+
j,
|
|
3277
|
+
h[j],
|
|
3263
3278
|
e.uniqueIdField
|
|
3264
|
-
) && (I.push(
|
|
3279
|
+
) && (I.push(R), m[R] = !0);
|
|
3265
3280
|
}
|
|
3266
3281
|
}
|
|
3267
|
-
h = h.map((
|
|
3282
|
+
h = h.map((Q) => Q.is_selected ? { ...Q, is_selected: !1 } : Q);
|
|
3268
3283
|
}
|
|
3269
|
-
let
|
|
3270
|
-
for (const
|
|
3271
|
-
if (!m[
|
|
3272
|
-
|
|
3284
|
+
let b = !0;
|
|
3285
|
+
for (const Q in w)
|
|
3286
|
+
if (!m[Q]) {
|
|
3287
|
+
b = !1;
|
|
3273
3288
|
break;
|
|
3274
3289
|
}
|
|
3275
|
-
const x = I.length === 0 ? !1 :
|
|
3290
|
+
const x = I.length === 0 ? !1 : b, O = I.length === 0 ? {} : G;
|
|
3276
3291
|
B || ($ = e.api) == null || $.updateSmartGridTableData(h), qe({
|
|
3277
3292
|
state: e,
|
|
3278
3293
|
action: { payload: I }
|
|
3279
3294
|
});
|
|
3280
|
-
const { pageSize:
|
|
3295
|
+
const { pageSize: L, currentLoadedPage: z } = e.pagination;
|
|
3281
3296
|
return h = h.slice(
|
|
3282
|
-
(z - 1) *
|
|
3283
|
-
z *
|
|
3284
|
-
), h.length || (h = e.filteredData.map((
|
|
3297
|
+
(z - 1) * L,
|
|
3298
|
+
z * L
|
|
3299
|
+
), h.length || (h = e.filteredData.map((Q) => Q.is_selected ? { ...Q, is_selected: !1 } : Q)), {
|
|
3285
3300
|
...e,
|
|
3286
3301
|
filteredData: h,
|
|
3287
3302
|
isSelectAllRecords: x,
|
|
3288
3303
|
selectedRows: I,
|
|
3289
3304
|
selectedRowsObject: m,
|
|
3290
|
-
unCheckedRows:
|
|
3305
|
+
unCheckedRows: O,
|
|
3291
3306
|
isSelectionChanged: !1,
|
|
3292
3307
|
checkConfiguration: x ? e.checkConfiguration : [],
|
|
3293
3308
|
prevAction: x ? e.prevAction : ""
|
|
3294
3309
|
};
|
|
3295
3310
|
}
|
|
3296
3311
|
case l.BATCH_UPDATE: {
|
|
3297
|
-
const { prevAction: s, checkConfiguration:
|
|
3298
|
-
return s !== void 0 && s !== e.prevAction && (B.prevAction = s),
|
|
3312
|
+
const { prevAction: s, checkConfiguration: C, isSelectAllRecords: h } = n.payload, B = {};
|
|
3313
|
+
return s !== void 0 && s !== e.prevAction && (B.prevAction = s), C !== void 0 && JSON.stringify(C) !== JSON.stringify(e.checkConfiguration) && (B.checkConfiguration = C), h !== void 0 && h !== e.isSelectAllRecords && (B.isSelectAllRecords = h), Object.keys(B).length === 0 ? e : {
|
|
3299
3314
|
...e,
|
|
3300
3315
|
...B
|
|
3301
3316
|
};
|
|
@@ -3304,12 +3319,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3304
3319
|
case l.TOGGLE_MASTER_DETAIL: {
|
|
3305
3320
|
const {
|
|
3306
3321
|
rowId: s,
|
|
3307
|
-
rowData:
|
|
3322
|
+
rowData: C,
|
|
3308
3323
|
rowIndex: h,
|
|
3309
3324
|
currentRowStyles: B
|
|
3310
3325
|
} = n.payload, w = ((Z = e.masterDetail) == null ? void 0 : Z.expandedRows) || [];
|
|
3311
3326
|
let I, m = null, G = !1;
|
|
3312
|
-
return w.includes(s) ? (I = [], G = !0) : (I = [s], m =
|
|
3327
|
+
return w.includes(s) ? (I = [], G = !0) : (I = [s], m = C), {
|
|
3313
3328
|
...e,
|
|
3314
3329
|
masterDetail: {
|
|
3315
3330
|
...e.masterDetail,
|
|
@@ -3337,11 +3352,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3337
3352
|
}
|
|
3338
3353
|
};
|
|
3339
3354
|
case l.ADD_EVENT_LISTENER: {
|
|
3340
|
-
const { eventType: s, listener:
|
|
3355
|
+
const { eventType: s, listener: C, once: h = !1 } = n.payload, B = { ...e.eventListeners };
|
|
3341
3356
|
return B[s] || (B[s] = []), B[s].some(
|
|
3342
|
-
(I) => I.fn ===
|
|
3357
|
+
(I) => I.fn === C
|
|
3343
3358
|
) || B[s].push({
|
|
3344
|
-
fn:
|
|
3359
|
+
fn: C,
|
|
3345
3360
|
once: h
|
|
3346
3361
|
}), {
|
|
3347
3362
|
...e,
|
|
@@ -3349,11 +3364,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3349
3364
|
};
|
|
3350
3365
|
}
|
|
3351
3366
|
case l.REMOVE_EVENT_LISTENER: {
|
|
3352
|
-
const { eventType: s, listener:
|
|
3367
|
+
const { eventType: s, listener: C } = n.payload;
|
|
3353
3368
|
if (!e.eventListeners[s])
|
|
3354
3369
|
return e;
|
|
3355
3370
|
const h = e.eventListeners[s].filter(
|
|
3356
|
-
(w) => w.fn !==
|
|
3371
|
+
(w) => w.fn !== C
|
|
3357
3372
|
), B = { ...e.eventListeners };
|
|
3358
3373
|
return h.length === 0 ? delete B[s] : B[s] = h, {
|
|
3359
3374
|
...e,
|
|
@@ -3362,28 +3377,28 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3362
3377
|
}
|
|
3363
3378
|
// Column grouping functionality
|
|
3364
3379
|
case l.TOGGLE_COLUMN_GROUP: {
|
|
3365
|
-
const { field: s } = n.payload,
|
|
3380
|
+
const { field: s } = n.payload, C = e.expandedColumnGroups || {}, h = C[s] === !0;
|
|
3366
3381
|
if (!h) {
|
|
3367
|
-
const
|
|
3368
|
-
for (const z of
|
|
3369
|
-
if (
|
|
3382
|
+
const b = (O, L) => {
|
|
3383
|
+
for (const z of O) {
|
|
3384
|
+
if (F(z) === L)
|
|
3370
3385
|
return z;
|
|
3371
3386
|
if (z.children && z.children.length > 0) {
|
|
3372
|
-
const
|
|
3373
|
-
if (
|
|
3387
|
+
const Q = b(z.children, L);
|
|
3388
|
+
if (Q) return Q;
|
|
3374
3389
|
}
|
|
3375
3390
|
}
|
|
3376
3391
|
return null;
|
|
3377
|
-
}, x =
|
|
3392
|
+
}, x = b(
|
|
3378
3393
|
e.columns,
|
|
3379
3394
|
s
|
|
3380
3395
|
);
|
|
3381
3396
|
if (x && x.is_frozen) {
|
|
3382
|
-
const
|
|
3383
|
-
var
|
|
3384
|
-
return !
|
|
3385
|
-
},
|
|
3386
|
-
if (
|
|
3397
|
+
const O = ((ae = (re = e.tableInstance) == null ? void 0 : re.current) == null ? void 0 : ae.clientWidth) || 0, L = ((se = e.frozenColumns) == null ? void 0 : se.totalWidth) || 0, z = (M) => {
|
|
3398
|
+
var te;
|
|
3399
|
+
return !M.children || M.children.length === 0 ? M.width || ((te = e.defaultColDef) == null ? void 0 : te.minWidth) || 150 : M.children.reduce((ue, we) => ue + z(we), 0);
|
|
3400
|
+
}, Q = x.width || ((Ce = e.defaultColDef) == null ? void 0 : Ce.minWidth) || 150, j = z(x) - Q, H = L + j;
|
|
3401
|
+
if (O > 0 && H > O * 0.7)
|
|
3387
3402
|
return {
|
|
3388
3403
|
...e,
|
|
3389
3404
|
notification: {
|
|
@@ -3396,7 +3411,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3396
3411
|
}
|
|
3397
3412
|
}
|
|
3398
3413
|
const w = {
|
|
3399
|
-
...
|
|
3414
|
+
...C,
|
|
3400
3415
|
[s]: !h
|
|
3401
3416
|
}, { processedColumns: I } = De(
|
|
3402
3417
|
e.columns,
|
|
@@ -3422,35 +3437,35 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3422
3437
|
0,
|
|
3423
3438
|
null,
|
|
3424
3439
|
((he = e.defaultColDef) == null ? void 0 : he.minWidth) || 150
|
|
3425
|
-
), { columns:
|
|
3440
|
+
), { columns: C, frozenData: h } = Be(
|
|
3426
3441
|
s,
|
|
3427
3442
|
e.defaultColDef || { minWidth: 150 }
|
|
3428
3443
|
);
|
|
3429
3444
|
return {
|
|
3430
3445
|
...e,
|
|
3431
3446
|
expandedColumnGroups: n.payload,
|
|
3432
|
-
columns:
|
|
3447
|
+
columns: C,
|
|
3433
3448
|
frozenColumns: h
|
|
3434
3449
|
};
|
|
3435
3450
|
}
|
|
3436
3451
|
// Row drag preview functionality with swap animation
|
|
3437
3452
|
case l.PREVIEW_ROW_MOVE: {
|
|
3438
|
-
const { fromIndex: s, toIndex:
|
|
3453
|
+
const { fromIndex: s, toIndex: C, fromRowData: h, isDraggingDownward: B } = n.payload;
|
|
3439
3454
|
if (e.previewMode) {
|
|
3440
3455
|
const w = e.originalFromIndex, I = [...e.originalData ?? []], m = e.hasExpandedChildren;
|
|
3441
|
-
I.forEach((x,
|
|
3442
|
-
|
|
3456
|
+
I.forEach((x, O) => {
|
|
3457
|
+
O === w ? (x._animationState = "moving", x._isDraggedRow = !0, x._hasExpandedChildren = m) : (O >= Math.min(w ?? 0, C) && O <= Math.max(w ?? 0, C) || O >= Math.min(w ?? 0, e.lastToIndex ?? 0) && O <= Math.max(w ?? 0, e.lastToIndex ?? 0)) && (x._animationState = "affected");
|
|
3443
3458
|
});
|
|
3444
3459
|
const [G] = I.splice(w ?? 0, 1);
|
|
3445
|
-
let
|
|
3460
|
+
let b = C;
|
|
3446
3461
|
if (m && B) {
|
|
3447
|
-
const x = h == null ? void 0 : h[e.childKeyField],
|
|
3448
|
-
|
|
3449
|
-
|
|
3462
|
+
const x = h == null ? void 0 : h[e.childKeyField], O = (x == null ? void 0 : x.length) || 0;
|
|
3463
|
+
O > 0 && e.expandedChildRows[h == null ? void 0 : h[e.uniqueIdField]] && (b = Math.max(
|
|
3464
|
+
C - O,
|
|
3450
3465
|
(w ?? 0) + 1
|
|
3451
3466
|
));
|
|
3452
3467
|
}
|
|
3453
|
-
return I.splice(
|
|
3468
|
+
return I.splice(b, 0, G), {
|
|
3454
3469
|
...e,
|
|
3455
3470
|
originalData: e.originalData,
|
|
3456
3471
|
// Keep the original data unchanged
|
|
@@ -3458,7 +3473,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3458
3473
|
previewMode: !0,
|
|
3459
3474
|
originalFromIndex: w,
|
|
3460
3475
|
// Keep the original fromIndex unchanged
|
|
3461
|
-
lastToIndex:
|
|
3476
|
+
lastToIndex: b,
|
|
3462
3477
|
// Update the last position
|
|
3463
3478
|
hasExpandedChildren: m,
|
|
3464
3479
|
// Maintain whether the dragged row has expanded children
|
|
@@ -3467,16 +3482,16 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3467
3482
|
};
|
|
3468
3483
|
} else {
|
|
3469
3484
|
const w = [...e.filteredData || []], I = [...w], m = h == null ? void 0 : h[e.childKeyField], G = h && m && Array.isArray(m) && m.length > 0;
|
|
3470
|
-
I.forEach((
|
|
3471
|
-
|
|
3485
|
+
I.forEach((O, L) => {
|
|
3486
|
+
L === s ? (O._animationState = "moving", O._isDraggedRow = !0, O._hasExpandedChildren = G) : L >= Math.min(s, C) && L <= Math.max(s, C) && (O._animationState = "affected");
|
|
3472
3487
|
});
|
|
3473
|
-
const [
|
|
3474
|
-
let x =
|
|
3488
|
+
const [b] = I.splice(s, 1);
|
|
3489
|
+
let x = C;
|
|
3475
3490
|
if (G && B) {
|
|
3476
|
-
const
|
|
3477
|
-
|
|
3491
|
+
const O = (m == null ? void 0 : m.length) || 0;
|
|
3492
|
+
O > 0 && (x = Math.max(C - O, s + 1));
|
|
3478
3493
|
}
|
|
3479
|
-
return I.splice(x, 0,
|
|
3494
|
+
return I.splice(x, 0, b), {
|
|
3480
3495
|
...e,
|
|
3481
3496
|
originalData: w,
|
|
3482
3497
|
filteredData: I,
|
|
@@ -3495,7 +3510,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3495
3510
|
case l.RESET_ROW_PREVIEW: {
|
|
3496
3511
|
if (!e.previewMode)
|
|
3497
3512
|
return e;
|
|
3498
|
-
const s = (e.originalData || []).map((
|
|
3513
|
+
const s = (e.originalData || []).map((C) => (delete C._isDraggedRow, delete C._animationState, C));
|
|
3499
3514
|
return {
|
|
3500
3515
|
...e,
|
|
3501
3516
|
filteredData: s,
|
|
@@ -3522,40 +3537,40 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3522
3537
|
case l.TOGGLE_ROW_GROUP: {
|
|
3523
3538
|
const {
|
|
3524
3539
|
groupId: s,
|
|
3525
|
-
rowIndex:
|
|
3540
|
+
rowIndex: C,
|
|
3526
3541
|
extra: { fieldName: h, value: B }
|
|
3527
|
-
} = n.payload, { expandedGroups: w, loadedData: I } = e.rowGroupState, m = !((ie = w[s]) != null && ie[s]), G = [...e.filteredData ?? []],
|
|
3528
|
-
let
|
|
3542
|
+
} = n.payload, { expandedGroups: w, loadedData: I } = e.rowGroupState, m = !((ie = w[s]) != null && ie[s]), G = [...e.filteredData ?? []], b = I[s] || [], x = { ...w };
|
|
3543
|
+
let O = 0;
|
|
3529
3544
|
if (m)
|
|
3530
|
-
|
|
3545
|
+
b.length && (G.splice(C + 1, 0, ...b), O = b.length);
|
|
3531
3546
|
else {
|
|
3532
|
-
let
|
|
3533
|
-
for (let
|
|
3534
|
-
if ((G[
|
|
3535
|
-
|
|
3547
|
+
let Q = -1;
|
|
3548
|
+
for (let j = 0; j < G.length; j++)
|
|
3549
|
+
if ((G[j].id || G[j][e.uniqueIdField]) == s) {
|
|
3550
|
+
Q = j;
|
|
3536
3551
|
break;
|
|
3537
3552
|
}
|
|
3538
|
-
|
|
3539
|
-
let
|
|
3540
|
-
Object.keys(w).forEach((
|
|
3541
|
-
|
|
3542
|
-
}), G.splice(
|
|
3553
|
+
Q === -1 && (Q = ((ce = w[s]) == null ? void 0 : ce.rowIndex) || C);
|
|
3554
|
+
let R = 0;
|
|
3555
|
+
Object.keys(w).forEach((j) => {
|
|
3556
|
+
j.startsWith(s) && (delete x[j], R += w[j].count);
|
|
3557
|
+
}), G.splice(Q + 1, R);
|
|
3543
3558
|
}
|
|
3544
|
-
const
|
|
3559
|
+
const L = { ...I };
|
|
3545
3560
|
let z = { ...e.rowGroupState.pagination };
|
|
3546
3561
|
return e.purgeClosedRowNodes && !m && (Object.keys(w).filter(
|
|
3547
|
-
(
|
|
3548
|
-
).forEach((
|
|
3549
|
-
delete
|
|
3562
|
+
(R) => R.startsWith(s)
|
|
3563
|
+
).forEach((R) => {
|
|
3564
|
+
delete L[R], delete z[R];
|
|
3550
3565
|
}), z = {
|
|
3551
3566
|
...z,
|
|
3552
3567
|
[s]: {
|
|
3553
3568
|
...z[s],
|
|
3554
3569
|
hasMore: !1
|
|
3555
3570
|
}
|
|
3556
|
-
}), (
|
|
3571
|
+
}), (Ee = (Ae = e.callBackRef) == null ? void 0 : Ae.current) != null && Ee.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
|
|
3557
3572
|
rowId: s,
|
|
3558
|
-
rowIndex:
|
|
3573
|
+
rowIndex: C,
|
|
3559
3574
|
api: e.api,
|
|
3560
3575
|
isExpanded: m
|
|
3561
3576
|
}), {
|
|
@@ -3565,14 +3580,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3565
3580
|
rowGroupState: {
|
|
3566
3581
|
...e.rowGroupState,
|
|
3567
3582
|
isLoadingSomething: m,
|
|
3568
|
-
loadedData:
|
|
3583
|
+
loadedData: L,
|
|
3569
3584
|
pagination: z,
|
|
3570
3585
|
expandedGroups: m ? {
|
|
3571
3586
|
...e.rowGroupState.expandedGroups,
|
|
3572
3587
|
[s]: {
|
|
3573
3588
|
[s]: m,
|
|
3574
|
-
rowIndex:
|
|
3575
|
-
count:
|
|
3589
|
+
rowIndex: C,
|
|
3590
|
+
count: O,
|
|
3576
3591
|
fieldName: h,
|
|
3577
3592
|
value: B
|
|
3578
3593
|
}
|
|
@@ -3581,21 +3596,21 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3581
3596
|
};
|
|
3582
3597
|
}
|
|
3583
3598
|
case l.SET_ROW_GROUP_DATA: {
|
|
3584
|
-
const { groupId: s, data:
|
|
3599
|
+
const { groupId: s, data: C, append: h } = n.payload, B = s.split("/").length, w = C.map((x, O) => ({
|
|
3585
3600
|
...x,
|
|
3586
3601
|
isChildGroup: !0,
|
|
3587
|
-
childIndex:
|
|
3602
|
+
childIndex: O,
|
|
3588
3603
|
groupingLevel: B,
|
|
3589
3604
|
__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,
|
|
3605
|
+
})), I = (k = e.rowGroupState.expandedGroups[s]) == null ? void 0 : k.rowIndex, m = e.rowGroupState.loadedData[s] || [], G = h ? [...m, ...w] : w, b = [...e.filteredData ?? []];
|
|
3591
3606
|
if (I >= 0) {
|
|
3592
3607
|
const x = h ? I + 1 + m.length : I + 1;
|
|
3593
|
-
|
|
3608
|
+
b.splice(x, 0, ...w);
|
|
3594
3609
|
}
|
|
3595
3610
|
return e.rowGroupState.expandedGroups[s] ? {
|
|
3596
3611
|
...e,
|
|
3597
|
-
filteredData:
|
|
3598
|
-
data:
|
|
3612
|
+
filteredData: b,
|
|
3613
|
+
data: b,
|
|
3599
3614
|
rowGroupState: {
|
|
3600
3615
|
...e.rowGroupState,
|
|
3601
3616
|
loadedData: {
|
|
@@ -3623,20 +3638,20 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3623
3638
|
} : e;
|
|
3624
3639
|
}
|
|
3625
3640
|
case l.SET_ROW_GROUP_LOADING: {
|
|
3626
|
-
const { groupId: s, isLoading:
|
|
3641
|
+
const { groupId: s, isLoading: C } = n.payload;
|
|
3627
3642
|
return {
|
|
3628
3643
|
...e,
|
|
3629
3644
|
rowGroupState: {
|
|
3630
3645
|
...e.rowGroupState,
|
|
3631
3646
|
loading: {
|
|
3632
3647
|
...e.rowGroupState.loading,
|
|
3633
|
-
[s]:
|
|
3648
|
+
[s]: C
|
|
3634
3649
|
}
|
|
3635
3650
|
}
|
|
3636
3651
|
};
|
|
3637
3652
|
}
|
|
3638
3653
|
case l.SET_ROW_GROUP_PAGINATION: {
|
|
3639
|
-
const { groupId: s, pagination:
|
|
3654
|
+
const { groupId: s, pagination: C } = n.payload;
|
|
3640
3655
|
return {
|
|
3641
3656
|
...e,
|
|
3642
3657
|
rowGroupState: {
|
|
@@ -3645,22 +3660,22 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3645
3660
|
...e.rowGroupState.pagination,
|
|
3646
3661
|
[s]: {
|
|
3647
3662
|
...e.rowGroupState.pagination[s],
|
|
3648
|
-
...
|
|
3663
|
+
...C
|
|
3649
3664
|
}
|
|
3650
3665
|
},
|
|
3651
|
-
isLoadingSomething:
|
|
3666
|
+
isLoadingSomething: C.hasMore ?? !1
|
|
3652
3667
|
}
|
|
3653
3668
|
};
|
|
3654
3669
|
}
|
|
3655
3670
|
case l.CLEAR_ROW_GROUP_CACHE: {
|
|
3656
|
-
const { groupId: s } = n.payload,
|
|
3657
|
-
return s ? (delete
|
|
3671
|
+
const { groupId: s } = n.payload, C = { ...e.rowGroupState.loadedData }, h = { ...e.rowGroupState.pagination }, B = { ...e.rowGroupState.cache.metadata };
|
|
3672
|
+
return s ? (delete C[s], delete h[s], delete B[s]) : (Object.keys(C).forEach((w) => delete C[w]), Object.keys(h).forEach((w) => delete h[w]), Object.keys(B).forEach(
|
|
3658
3673
|
(w) => delete B[w]
|
|
3659
3674
|
)), {
|
|
3660
3675
|
...e,
|
|
3661
3676
|
rowGroupState: {
|
|
3662
3677
|
...e.rowGroupState,
|
|
3663
|
-
loadedData:
|
|
3678
|
+
loadedData: C,
|
|
3664
3679
|
pagination: h,
|
|
3665
3680
|
cache: {
|
|
3666
3681
|
...e.rowGroupState.cache,
|
|
@@ -3670,13 +3685,13 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3670
3685
|
};
|
|
3671
3686
|
}
|
|
3672
3687
|
case l.REFRESH_ROW_GROUP_DATA: {
|
|
3673
|
-
const { groupId: s } = n.payload,
|
|
3674
|
-
return s &&
|
|
3675
|
-
...
|
|
3688
|
+
const { groupId: s } = n.payload, C = { ...e.rowGroupState.cache.metadata };
|
|
3689
|
+
return s && C[s] ? C[s] = {
|
|
3690
|
+
...C[s],
|
|
3676
3691
|
lastUpdated: Date.now()
|
|
3677
|
-
} : s || Object.keys(
|
|
3678
|
-
|
|
3679
|
-
...
|
|
3692
|
+
} : s || Object.keys(C).forEach((h) => {
|
|
3693
|
+
C[h] = {
|
|
3694
|
+
...C[h],
|
|
3680
3695
|
lastUpdated: Date.now()
|
|
3681
3696
|
};
|
|
3682
3697
|
}), {
|
|
@@ -3685,7 +3700,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3685
3700
|
...e.rowGroupState,
|
|
3686
3701
|
cache: {
|
|
3687
3702
|
...e.rowGroupState.cache,
|
|
3688
|
-
metadata:
|
|
3703
|
+
metadata: C
|
|
3689
3704
|
}
|
|
3690
3705
|
}
|
|
3691
3706
|
};
|
|
@@ -3763,14 +3778,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3763
3778
|
api: n.payload
|
|
3764
3779
|
};
|
|
3765
3780
|
case l.EXPAND_COLLAPSE_ALL_COLUMNS: {
|
|
3766
|
-
const s = n.payload ? { isAllGroupExpanded: !0 } : { isAllGroupExpanded: !1 }, { processedColumns:
|
|
3781
|
+
const s = n.payload ? { isAllGroupExpanded: !0 } : { isAllGroupExpanded: !1 }, { processedColumns: C } = De(
|
|
3767
3782
|
e.columns,
|
|
3768
3783
|
s,
|
|
3769
3784
|
0,
|
|
3770
3785
|
null,
|
|
3771
3786
|
((V = e.defaultColDef) == null ? void 0 : V.minWidth) || 150
|
|
3772
3787
|
), { columns: h, frozenData: B } = Be(
|
|
3773
|
-
|
|
3788
|
+
C,
|
|
3774
3789
|
e.defaultColDef || { minWidth: 150 }
|
|
3775
3790
|
);
|
|
3776
3791
|
return {
|
|
@@ -3891,48 +3906,48 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3891
3906
|
if (!s && ke(e))
|
|
3892
3907
|
return e;
|
|
3893
3908
|
if (s) {
|
|
3894
|
-
const
|
|
3909
|
+
const C = Ze(e), h = e.columns.some((O) => O.aggFunc), B = [], w = {};
|
|
3895
3910
|
let I = 0;
|
|
3896
|
-
const { uniqueIdField: m, childKeyField: G, rowSpanColumn:
|
|
3897
|
-
for (const
|
|
3898
|
-
const
|
|
3911
|
+
const { uniqueIdField: m, childKeyField: G, rowSpanColumn: b, api: x } = e;
|
|
3912
|
+
for (const O of C) {
|
|
3913
|
+
const L = String(O[m]), z = O[G] || [];
|
|
3899
3914
|
if (z.length > 0) {
|
|
3900
|
-
let
|
|
3915
|
+
let R, j = null;
|
|
3901
3916
|
if (h) {
|
|
3902
|
-
const { aggreRow:
|
|
3917
|
+
const { aggreRow: te, aggreChildRows: ue } = ye(
|
|
3903
3918
|
e,
|
|
3904
3919
|
z,
|
|
3905
|
-
|
|
3920
|
+
O,
|
|
3906
3921
|
1,
|
|
3907
3922
|
I,
|
|
3908
|
-
|
|
3923
|
+
L
|
|
3909
3924
|
);
|
|
3910
|
-
|
|
3925
|
+
j = te, R = ue;
|
|
3911
3926
|
} else
|
|
3912
|
-
|
|
3913
|
-
(
|
|
3914
|
-
...
|
|
3915
|
-
__parentPath:
|
|
3927
|
+
R = z.map(
|
|
3928
|
+
(te) => ({
|
|
3929
|
+
...te,
|
|
3930
|
+
__parentPath: L,
|
|
3916
3931
|
level: 1,
|
|
3917
3932
|
parentRowIndex: I,
|
|
3918
|
-
parentRowData:
|
|
3933
|
+
parentRowData: O,
|
|
3919
3934
|
groupingLevel: 1
|
|
3920
3935
|
})
|
|
3921
3936
|
);
|
|
3922
|
-
const H = z.length + (
|
|
3923
|
-
w[
|
|
3924
|
-
rowId:
|
|
3937
|
+
const H = z.length + (j ? 1 : 0);
|
|
3938
|
+
w[L] = {
|
|
3939
|
+
rowId: L,
|
|
3925
3940
|
rowIndex: I,
|
|
3926
3941
|
childRowsCount: H
|
|
3927
3942
|
};
|
|
3928
|
-
const
|
|
3929
|
-
[
|
|
3930
|
-
|
|
3943
|
+
const M = Fe(
|
|
3944
|
+
[O, ...R],
|
|
3945
|
+
b,
|
|
3931
3946
|
x
|
|
3932
3947
|
);
|
|
3933
|
-
|
|
3948
|
+
j ? (B.push(...M, j), I += M.length + 1) : (B.push(...M), I += M.length);
|
|
3934
3949
|
} else
|
|
3935
|
-
B.push(
|
|
3950
|
+
B.push(O), I += 1;
|
|
3936
3951
|
}
|
|
3937
3952
|
return me(e, B), {
|
|
3938
3953
|
...e,
|
|
@@ -3941,13 +3956,13 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3941
3956
|
data: B
|
|
3942
3957
|
};
|
|
3943
3958
|
} else {
|
|
3944
|
-
const
|
|
3959
|
+
const C = Ze(e), h = e.enableRowSpan ? C.map((B) => {
|
|
3945
3960
|
if (B.__rowSpanInfo) {
|
|
3946
3961
|
const { __rowSpanInfo: w, ...I } = B;
|
|
3947
3962
|
return I;
|
|
3948
3963
|
}
|
|
3949
3964
|
return B;
|
|
3950
|
-
}) :
|
|
3965
|
+
}) : C;
|
|
3951
3966
|
return me(e, h), {
|
|
3952
3967
|
...e,
|
|
3953
3968
|
expandedChildRows: {},
|
|
@@ -3957,53 +3972,53 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
3957
3972
|
}
|
|
3958
3973
|
}
|
|
3959
3974
|
case l.EXPAND_ROW_WITH_NESTED_CHILDREN: {
|
|
3960
|
-
const { rowId: s, rowIndex:
|
|
3975
|
+
const { rowId: s, rowIndex: C, expand: h } = n.payload, { uniqueIdField: B, childKeyField: w, rowSpanColumn: I, api: m, columns: G } = e;
|
|
3961
3976
|
if (h) {
|
|
3962
|
-
const
|
|
3977
|
+
const b = e.filteredData || [], x = b[C];
|
|
3963
3978
|
if (!x) return e;
|
|
3964
|
-
const
|
|
3965
|
-
const
|
|
3966
|
-
if (
|
|
3979
|
+
const O = G.some((M) => M.aggFunc), L = { ...e.expandedChildRows }, z = (M, te, ue, we) => {
|
|
3980
|
+
const Se = M[w] || [];
|
|
3981
|
+
if (Se.length === 0) return [M];
|
|
3967
3982
|
const ve = we.value;
|
|
3968
|
-
let
|
|
3969
|
-
if (
|
|
3970
|
-
const { aggreRow:
|
|
3983
|
+
let Te, Qe = null;
|
|
3984
|
+
if (O) {
|
|
3985
|
+
const { aggreRow: Oe, aggreChildRows: ze } = ye(
|
|
3971
3986
|
e,
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3987
|
+
Se,
|
|
3988
|
+
M,
|
|
3989
|
+
ue,
|
|
3975
3990
|
ve,
|
|
3976
|
-
|
|
3991
|
+
te
|
|
3977
3992
|
);
|
|
3978
|
-
Qe =
|
|
3993
|
+
Qe = Oe, Te = ze;
|
|
3979
3994
|
} else
|
|
3980
|
-
|
|
3981
|
-
...
|
|
3982
|
-
__parentPath:
|
|
3983
|
-
level:
|
|
3995
|
+
Te = Se.map((Oe) => ({
|
|
3996
|
+
...Oe,
|
|
3997
|
+
__parentPath: te,
|
|
3998
|
+
level: ue,
|
|
3984
3999
|
parentRowIndex: ve,
|
|
3985
|
-
parentRowData:
|
|
3986
|
-
groupingLevel:
|
|
4000
|
+
parentRowData: M,
|
|
4001
|
+
groupingLevel: ue
|
|
3987
4002
|
}));
|
|
3988
|
-
|
|
3989
|
-
rowId:
|
|
4003
|
+
L[te] = {
|
|
4004
|
+
rowId: te,
|
|
3990
4005
|
rowIndex: ve,
|
|
3991
|
-
childRowsCount:
|
|
4006
|
+
childRowsCount: Se.length + (Qe ? 1 : 0)
|
|
3992
4007
|
};
|
|
3993
4008
|
const oe = I ? Fe(
|
|
3994
|
-
[
|
|
4009
|
+
[M, ...Te],
|
|
3995
4010
|
I,
|
|
3996
4011
|
m
|
|
3997
|
-
) : [
|
|
4012
|
+
) : [M, ...Te], Y = [oe[0]];
|
|
3998
4013
|
we.value += 1;
|
|
3999
|
-
const Xe =
|
|
4000
|
-
for (let
|
|
4001
|
-
const ze =
|
|
4014
|
+
const Xe = Te.length;
|
|
4015
|
+
for (let Oe = 0; Oe < Xe; Oe++) {
|
|
4016
|
+
const ze = Te[Oe], an = oe[Oe + 1], Je = ze[w];
|
|
4002
4017
|
if ((Je == null ? void 0 : Je.length) > 0) {
|
|
4003
4018
|
const vn = String(ze[B]), Gn = z(
|
|
4004
4019
|
an,
|
|
4005
|
-
`${
|
|
4006
|
-
|
|
4020
|
+
`${te}/${vn}`,
|
|
4021
|
+
ue + 1,
|
|
4007
4022
|
we
|
|
4008
4023
|
);
|
|
4009
4024
|
Y.push(...Gn);
|
|
@@ -4011,40 +4026,40 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
4011
4026
|
Y.push(an), we.value += 1;
|
|
4012
4027
|
}
|
|
4013
4028
|
return Qe && (Y.push(Qe), we.value += 1), Y;
|
|
4014
|
-
},
|
|
4015
|
-
value:
|
|
4016
|
-
}),
|
|
4017
|
-
...
|
|
4018
|
-
...
|
|
4019
|
-
...
|
|
4029
|
+
}, Q = z(x, s, 1, {
|
|
4030
|
+
value: C
|
|
4031
|
+
}), R = b.slice(0, C), j = b.slice(C + 1), H = [
|
|
4032
|
+
...R,
|
|
4033
|
+
...Q,
|
|
4034
|
+
...j
|
|
4020
4035
|
];
|
|
4021
4036
|
return me(e, H), {
|
|
4022
4037
|
...e,
|
|
4023
|
-
expandedChildRows:
|
|
4038
|
+
expandedChildRows: L,
|
|
4024
4039
|
filteredData: H,
|
|
4025
4040
|
data: H
|
|
4026
4041
|
};
|
|
4027
4042
|
} else {
|
|
4028
4043
|
if (!e.expandedChildRows[s]) return e;
|
|
4029
|
-
const
|
|
4030
|
-
let
|
|
4044
|
+
const b = e.filteredData || [], x = { ...e.expandedChildRows }, O = `${s}/`;
|
|
4045
|
+
let L = 0;
|
|
4031
4046
|
const z = [];
|
|
4032
|
-
for (const
|
|
4033
|
-
(
|
|
4034
|
-
for (const
|
|
4035
|
-
delete x[
|
|
4036
|
-
const
|
|
4037
|
-
...
|
|
4038
|
-
...
|
|
4047
|
+
for (const R of Object.keys(x))
|
|
4048
|
+
(R === s || R.startsWith(O)) && (L += x[R].childRowsCount, z.push(R));
|
|
4049
|
+
for (const R of z)
|
|
4050
|
+
delete x[R];
|
|
4051
|
+
const Q = [
|
|
4052
|
+
...b.slice(0, C + 1),
|
|
4053
|
+
...b.slice(C + 1 + L)
|
|
4039
4054
|
];
|
|
4040
|
-
return (le =
|
|
4041
|
-
...
|
|
4055
|
+
return (le = Q[C]) != null && le.__rowSpanInfo && (Q[C] = {
|
|
4056
|
+
...Q[C],
|
|
4042
4057
|
__rowSpanInfo: void 0
|
|
4043
|
-
}), me(e,
|
|
4058
|
+
}), me(e, Q), {
|
|
4044
4059
|
...e,
|
|
4045
4060
|
expandedChildRows: x,
|
|
4046
|
-
filteredData:
|
|
4047
|
-
data:
|
|
4061
|
+
filteredData: Q,
|
|
4062
|
+
data: Q
|
|
4048
4063
|
};
|
|
4049
4064
|
}
|
|
4050
4065
|
}
|
|
@@ -4098,16 +4113,16 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
|
|
|
4098
4113
|
default:
|
|
4099
4114
|
return e;
|
|
4100
4115
|
}
|
|
4101
|
-
}, ln =
|
|
4116
|
+
}, ln = Rn(null), St = ({
|
|
4102
4117
|
tableId: e = "default",
|
|
4103
4118
|
children: n
|
|
4104
4119
|
}) => {
|
|
4105
|
-
const t =
|
|
4120
|
+
const t = Tn(() => Qn(e), [e]);
|
|
4106
4121
|
return pe(() => () => {
|
|
4107
4122
|
Pt(e);
|
|
4108
4123
|
}, [e]), /* @__PURE__ */ de(ln.Provider, { value: t, children: n });
|
|
4109
4124
|
};
|
|
4110
|
-
function
|
|
4125
|
+
function Ot(e) {
|
|
4111
4126
|
const t = An(ln) || xn;
|
|
4112
4127
|
return e ? t(e) : t();
|
|
4113
4128
|
}
|
|
@@ -4132,11 +4147,11 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4132
4147
|
const r = (A) => {
|
|
4133
4148
|
var g;
|
|
4134
4149
|
const i = A.target, o = t.current && !t.current.contains(i), d = n && n.some(
|
|
4135
|
-
(
|
|
4150
|
+
(u) => u && u.current && u.current.contains(i)
|
|
4136
4151
|
), f = (g = t.current) == null ? void 0 : g.querySelector(
|
|
4137
4152
|
".ia-table-menu-submenu"
|
|
4138
|
-
),
|
|
4139
|
-
o && !d && !
|
|
4153
|
+
), E = !!f && (f == null ? void 0 : f.contains(i));
|
|
4154
|
+
o && !d && !E && e();
|
|
4140
4155
|
};
|
|
4141
4156
|
return document.addEventListener("mousedown", r), () => {
|
|
4142
4157
|
document.removeEventListener("mousedown", r);
|
|
@@ -4186,51 +4201,51 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4186
4201
|
// Custom width for the menu
|
|
4187
4202
|
horizontalAlign: c = xe.AUTO,
|
|
4188
4203
|
// Horizontal alignment of the menu
|
|
4189
|
-
isSubmenu:
|
|
4204
|
+
isSubmenu: E = !1,
|
|
4190
4205
|
parentOptionRef: g = null,
|
|
4191
|
-
skipAnimation:
|
|
4206
|
+
skipAnimation: u = !1,
|
|
4192
4207
|
// Skip animation for submenus
|
|
4193
|
-
portalContainer:
|
|
4208
|
+
portalContainer: P = document.body,
|
|
4194
4209
|
additionalButtons: a = null,
|
|
4195
4210
|
forcePosition: p = !1,
|
|
4196
4211
|
// When true, prevents position flipping even if there's not enough space
|
|
4197
|
-
anchorOrigin:
|
|
4198
|
-
onClick:
|
|
4212
|
+
anchorOrigin: T,
|
|
4213
|
+
onClick: D
|
|
4199
4214
|
}) => {
|
|
4200
|
-
const [
|
|
4215
|
+
const [S, U] = Ge({
|
|
4201
4216
|
top: 0,
|
|
4202
4217
|
left: 0,
|
|
4203
4218
|
width: 0,
|
|
4204
4219
|
visibility: "hidden"
|
|
4205
4220
|
// Hide menu initially until positioned
|
|
4206
|
-
}), [N,
|
|
4221
|
+
}), [N, y] = Ge("entered"), [_, v] = Ge(d), [X, K] = Ge("center"), [q, ee] = Ge(
|
|
4207
4222
|
null
|
|
4208
4223
|
), ne = Pe(
|
|
4209
4224
|
null
|
|
4210
4225
|
), $ = Pe({}), Z = Pe(
|
|
4211
4226
|
null
|
|
4212
|
-
),
|
|
4213
|
-
if (ee(null),
|
|
4227
|
+
), re = Ie(() => {
|
|
4228
|
+
if (ee(null), u) {
|
|
4214
4229
|
A(!1);
|
|
4215
4230
|
return;
|
|
4216
4231
|
}
|
|
4217
|
-
|
|
4218
|
-
A(!1),
|
|
4232
|
+
y("exiting"), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
|
|
4233
|
+
A(!1), y("entered");
|
|
4219
4234
|
}, 150);
|
|
4220
|
-
}, [A,
|
|
4235
|
+
}, [A, u]), ae = Ie(
|
|
4221
4236
|
(k) => {
|
|
4222
4237
|
if (!(k.submenu && k.useHover)) {
|
|
4223
4238
|
if (k.submenu) {
|
|
4224
4239
|
ee(k.label === q ? null : k.label);
|
|
4225
4240
|
return;
|
|
4226
4241
|
}
|
|
4227
|
-
k.onClick ? k.onClick(k.label) :
|
|
4242
|
+
k.onClick ? k.onClick(k.label) : D && D(k), k.noCloseOnSelect || (A(!1), ee(null));
|
|
4228
4243
|
}
|
|
4229
4244
|
},
|
|
4230
|
-
[q, A,
|
|
4245
|
+
[q, A, D]
|
|
4231
4246
|
), se = Ie((k) => {
|
|
4232
4247
|
k.submenu && k.useHover && (Z.current && (clearTimeout(Z.current), Z.current = null), ee(k.label));
|
|
4233
|
-
}, []),
|
|
4248
|
+
}, []), Ce = Ie(() => {
|
|
4234
4249
|
Z.current && (clearTimeout(Z.current), Z.current = null);
|
|
4235
4250
|
}, []), fe = Ie(
|
|
4236
4251
|
(k) => {
|
|
@@ -4263,8 +4278,8 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4263
4278
|
}
|
|
4264
4279
|
}, [i, o, r]), Fn(() => {
|
|
4265
4280
|
if (r && (i != null && i.current || o || g != null && g.current)) {
|
|
4266
|
-
|
|
4267
|
-
|
|
4281
|
+
u || (y("entering"), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
|
|
4282
|
+
y("entered");
|
|
4268
4283
|
}, 200));
|
|
4269
4284
|
const k = (g == null ? void 0 : g.current) || (i == null ? void 0 : i.current) || o, V = (k == null ? void 0 : k.getBoundingClientRect()) || {
|
|
4270
4285
|
top: 0,
|
|
@@ -4275,10 +4290,10 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4275
4290
|
right: 0
|
|
4276
4291
|
};
|
|
4277
4292
|
let le = { top: 0, left: 0, width: 0 }, s = !1;
|
|
4278
|
-
|
|
4279
|
-
const
|
|
4293
|
+
P !== document.body && P instanceof Element && (le = P.getBoundingClientRect(), s = !0);
|
|
4294
|
+
const C = window.innerWidth, h = window.innerHeight, B = f || Math.max(V.width, 150), w = e.length * 40;
|
|
4280
4295
|
let I = d;
|
|
4281
|
-
const m = V.top > w, G = h - V.bottom > w,
|
|
4296
|
+
const m = V.top > w, G = h - V.bottom > w, b = V.left > B, x = C - V.right > B;
|
|
4282
4297
|
if (p)
|
|
4283
4298
|
I = d;
|
|
4284
4299
|
else
|
|
@@ -4290,60 +4305,60 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4290
4305
|
!G && m && (I = ge.TOP);
|
|
4291
4306
|
break;
|
|
4292
4307
|
case ge.LEFT:
|
|
4293
|
-
!
|
|
4308
|
+
!b && x && (I = ge.RIGHT);
|
|
4294
4309
|
break;
|
|
4295
4310
|
case ge.RIGHT:
|
|
4296
|
-
!x &&
|
|
4311
|
+
!x && b && (I = ge.LEFT);
|
|
4297
4312
|
break;
|
|
4298
4313
|
}
|
|
4299
|
-
const
|
|
4300
|
-
f && (
|
|
4301
|
-
const
|
|
4314
|
+
const O = E && (g != null && g.current) ? g.current.getBoundingClientRect() : V, L = V.left, z = V.right, Q = V.width;
|
|
4315
|
+
f && (O.width = f);
|
|
4316
|
+
const R = yt(
|
|
4302
4317
|
I,
|
|
4303
4318
|
s,
|
|
4304
|
-
|
|
4319
|
+
O,
|
|
4305
4320
|
le,
|
|
4306
4321
|
V
|
|
4307
4322
|
);
|
|
4308
|
-
if (
|
|
4309
|
-
switch (
|
|
4323
|
+
if (T)
|
|
4324
|
+
switch (T) {
|
|
4310
4325
|
case "start":
|
|
4311
|
-
s ?
|
|
4326
|
+
s ? R.left = L - le.left : R.left = L + window.scrollX;
|
|
4312
4327
|
break;
|
|
4313
4328
|
case "end":
|
|
4314
|
-
s ?
|
|
4329
|
+
s ? R.left = z - B - le.left : R.left = z - B + window.scrollX;
|
|
4315
4330
|
break;
|
|
4316
4331
|
case "center":
|
|
4317
|
-
s ?
|
|
4332
|
+
s ? R.left = L + Q / 2 - B / 2 - le.left : R.left = L + Q / 2 - B / 2 + window.scrollX;
|
|
4318
4333
|
break;
|
|
4319
4334
|
}
|
|
4320
|
-
if (!
|
|
4335
|
+
if (!T && (I === ge.BOTTOM || I === ge.TOP)) {
|
|
4321
4336
|
let H = c;
|
|
4322
4337
|
if (c === xe.AUTO) {
|
|
4323
|
-
const
|
|
4324
|
-
|
|
4338
|
+
const M = V.right + B <= C, te = V.left - B >= 0;
|
|
4339
|
+
M ? H = xe.START : te ? H = xe.END : H = xe.START;
|
|
4325
4340
|
}
|
|
4326
|
-
if (H === xe.START ? s ?
|
|
4327
|
-
const
|
|
4328
|
-
(
|
|
4341
|
+
if (H === xe.START ? s ? R.left = V.left - le.left : R.left = V.left + window.scrollX : H === xe.END && (s ? R.left = V.right - B - le.left : R.left = V.right - B + window.scrollX), s) {
|
|
4342
|
+
const M = le.width;
|
|
4343
|
+
(R.left ?? 0) + B > M && (R.left = Math.max(0, M - B));
|
|
4329
4344
|
} else
|
|
4330
|
-
(
|
|
4331
|
-
(
|
|
4332
|
-
} else (I === ge.LEFT || I === ge.RIGHT) && (s || (
|
|
4333
|
-
let
|
|
4345
|
+
(R.left ?? 0) + B > C && (R.left = Math.max(0, C - B));
|
|
4346
|
+
(R.left ?? 0) < 0 && (R.left = 0);
|
|
4347
|
+
} else (I === ge.LEFT || I === ge.RIGHT) && (s || (R.top ?? 0) + w > h && (R.top = Math.max(0, h - w)));
|
|
4348
|
+
let j = "center";
|
|
4334
4349
|
if (I === ge.BOTTOM || I === ge.TOP) {
|
|
4335
|
-
const H = V.left + V.width / 2,
|
|
4336
|
-
H <
|
|
4350
|
+
const H = V.left + V.width / 2, M = C / 2;
|
|
4351
|
+
H < M && x ? j = "left" : H >= M && b && (j = "right");
|
|
4337
4352
|
} else if (I === ge.LEFT || I === ge.RIGHT) {
|
|
4338
|
-
const H = V.top + V.height / 2,
|
|
4339
|
-
H <
|
|
4353
|
+
const H = V.top + V.height / 2, M = h / 2;
|
|
4354
|
+
H < M && G ? j = "top" : H >= M && m && (j = "bottom");
|
|
4340
4355
|
}
|
|
4341
|
-
v(I), j
|
|
4342
|
-
top:
|
|
4343
|
-
left:
|
|
4344
|
-
width:
|
|
4345
|
-
transform:
|
|
4346
|
-
transformOrigin:
|
|
4356
|
+
v(I), K(j), U({
|
|
4357
|
+
top: R.top ?? 0,
|
|
4358
|
+
left: R.left ?? 0,
|
|
4359
|
+
width: R.width ?? 0,
|
|
4360
|
+
transform: R.transform,
|
|
4361
|
+
transformOrigin: R.transformOrigin,
|
|
4347
4362
|
visibility: "visible"
|
|
4348
4363
|
});
|
|
4349
4364
|
}
|
|
@@ -4353,35 +4368,35 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4353
4368
|
e.length,
|
|
4354
4369
|
f,
|
|
4355
4370
|
c,
|
|
4356
|
-
|
|
4357
|
-
|
|
4371
|
+
u,
|
|
4372
|
+
P,
|
|
4358
4373
|
p,
|
|
4359
4374
|
ie,
|
|
4360
4375
|
// Add dependency on menuButtonPosition
|
|
4361
4376
|
o,
|
|
4362
|
-
|
|
4377
|
+
T
|
|
4363
4378
|
]);
|
|
4364
4379
|
const Ae = Pe(o ?? null);
|
|
4365
4380
|
Ae.current = o ?? null;
|
|
4366
|
-
const
|
|
4367
|
-
|
|
4368
|
-
|
|
4381
|
+
const Ee = Lt(
|
|
4382
|
+
re,
|
|
4383
|
+
E ? [g] : [i || Ae]
|
|
4369
4384
|
);
|
|
4370
|
-
return r ?
|
|
4385
|
+
return r ? Sn(
|
|
4371
4386
|
/* @__PURE__ */ Le(
|
|
4372
4387
|
"div",
|
|
4373
4388
|
{
|
|
4374
|
-
className: `ia-table-menu-submenu d-flex flex-column gap-2 ia-table-position-${_} flip-${
|
|
4389
|
+
className: `ia-table-menu-submenu d-flex flex-column gap-2 ia-table-position-${_} flip-${X} ${!u && N === "entering" ? "menu-entering" : ""} ${!u && N === "entered" ? "menu-entered" : ""} ${!u && N === "exiting" ? "menu-exiting" : ""} ${E ? "ia-table-submenu-only" : ""}`,
|
|
4375
4390
|
style: {
|
|
4376
|
-
...
|
|
4391
|
+
...S,
|
|
4377
4392
|
position: "absolute",
|
|
4378
|
-
width: f ? `${f}px` :
|
|
4379
|
-
minHeight:
|
|
4380
|
-
transform:
|
|
4381
|
-
transformOrigin:
|
|
4382
|
-
visibility:
|
|
4393
|
+
width: f ? `${f}px` : S.width ? `${S.width}px` : void 0,
|
|
4394
|
+
minHeight: S.height ? `${S.height}px` : void 0,
|
|
4395
|
+
transform: S.transform,
|
|
4396
|
+
transformOrigin: S.transformOrigin,
|
|
4397
|
+
visibility: S.visibility || "hidden"
|
|
4383
4398
|
},
|
|
4384
|
-
ref:
|
|
4399
|
+
ref: Ee,
|
|
4385
4400
|
children: [
|
|
4386
4401
|
a,
|
|
4387
4402
|
a && /* @__PURE__ */ de("div", { className: "ia-table-divider" }),
|
|
@@ -4429,7 +4444,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4429
4444
|
k.submenu && q === k.label && /* @__PURE__ */ de(
|
|
4430
4445
|
"div",
|
|
4431
4446
|
{
|
|
4432
|
-
onMouseEnter:
|
|
4447
|
+
onMouseEnter: Ce,
|
|
4433
4448
|
onMouseLeave: () => fe(k.useHover),
|
|
4434
4449
|
children: /* @__PURE__ */ de(
|
|
4435
4450
|
Qt,
|
|
@@ -4446,7 +4461,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4446
4461
|
current: $.current[k.label]
|
|
4447
4462
|
},
|
|
4448
4463
|
skipAnimation: !0,
|
|
4449
|
-
portalContainer:
|
|
4464
|
+
portalContainer: Ee.current ?? void 0,
|
|
4450
4465
|
menuButtonRef: void 0
|
|
4451
4466
|
},
|
|
4452
4467
|
`submenu-${k.label}`
|
|
@@ -4457,9 +4472,9 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4457
4472
|
]
|
|
4458
4473
|
}
|
|
4459
4474
|
),
|
|
4460
|
-
|
|
4475
|
+
P
|
|
4461
4476
|
) : null;
|
|
4462
|
-
},
|
|
4477
|
+
}, Re = /* @__PURE__ */ new Map(), He = (e) => e ? typeof e == "string" ? e : "current" in e && e.current ? e.current.tableId || e.current.api && e.current.api.tableId || null : ("tableId" in e || "api" in e) && (e.tableId || e.api && e.api.tableId) || null : null, pn = (e, n, t, r, A = []) => {
|
|
4463
4478
|
if (!e) {
|
|
4464
4479
|
console.warn("Cannot register grid without an ID");
|
|
4465
4480
|
return;
|
|
@@ -4471,37 +4486,37 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4471
4486
|
actionTypes: r,
|
|
4472
4487
|
alignedWith: A
|
|
4473
4488
|
};
|
|
4474
|
-
|
|
4489
|
+
Re.set(e, i), A.forEach((o) => {
|
|
4475
4490
|
const d = He(o);
|
|
4476
|
-
if (d &&
|
|
4477
|
-
const f =
|
|
4491
|
+
if (d && Re.has(d)) {
|
|
4492
|
+
const f = Re.get(d);
|
|
4478
4493
|
f.alignedWith.some(
|
|
4479
|
-
(
|
|
4494
|
+
(E) => He(E) === e
|
|
4480
4495
|
) || f.alignedWith.push(e);
|
|
4481
4496
|
}
|
|
4482
4497
|
});
|
|
4483
4498
|
}, In = (e) => {
|
|
4484
|
-
if (!e || !
|
|
4499
|
+
if (!e || !Re.has(e))
|
|
4485
4500
|
return;
|
|
4486
|
-
const { alignedWith: n } =
|
|
4501
|
+
const { alignedWith: n } = Re.get(e);
|
|
4487
4502
|
n.forEach((t) => {
|
|
4488
4503
|
const r = He(t);
|
|
4489
|
-
if (r &&
|
|
4490
|
-
const A =
|
|
4504
|
+
if (r && Re.has(r)) {
|
|
4505
|
+
const A = Re.get(r);
|
|
4491
4506
|
A.alignedWith = A.alignedWith.filter(
|
|
4492
4507
|
(i) => He(i) !== e
|
|
4493
4508
|
);
|
|
4494
4509
|
}
|
|
4495
|
-
}),
|
|
4510
|
+
}), Re.delete(e);
|
|
4496
4511
|
}, xt = (e, n, t, r = {}) => {
|
|
4497
|
-
if (!
|
|
4512
|
+
if (!Re.has(e))
|
|
4498
4513
|
return;
|
|
4499
|
-
const A =
|
|
4514
|
+
const A = Re.get(e), i = /* @__PURE__ */ new Set();
|
|
4500
4515
|
A.alignedWith.forEach((o) => {
|
|
4501
4516
|
const d = He(o);
|
|
4502
4517
|
if (!(!d || i.has(d))) {
|
|
4503
|
-
if (i.add(d),
|
|
4504
|
-
|
|
4518
|
+
if (i.add(d), Re.has(d))
|
|
4519
|
+
Re.get(d).dispatchFn({
|
|
4505
4520
|
type: n,
|
|
4506
4521
|
payload: t,
|
|
4507
4522
|
meta: {
|
|
@@ -4515,8 +4530,8 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4515
4530
|
if (typeof c == "function" && (n.includes("COLUMN") || n.includes("COLUMNS")))
|
|
4516
4531
|
try {
|
|
4517
4532
|
c(t);
|
|
4518
|
-
} catch (
|
|
4519
|
-
console.log("Error Grid ALignemnt",
|
|
4533
|
+
} catch (E) {
|
|
4534
|
+
console.log("Error Grid ALignemnt", E);
|
|
4520
4535
|
}
|
|
4521
4536
|
}
|
|
4522
4537
|
}
|
|
@@ -4664,42 +4679,42 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4664
4679
|
enableRowSpan: d,
|
|
4665
4680
|
rowSpanColumn: f,
|
|
4666
4681
|
pageSize: c,
|
|
4667
|
-
serverSide:
|
|
4682
|
+
serverSide: E,
|
|
4668
4683
|
rowDragManaged: g,
|
|
4669
|
-
infiniteScroll:
|
|
4670
|
-
initialExpandedColumnGroups:
|
|
4684
|
+
infiniteScroll: u,
|
|
4685
|
+
initialExpandedColumnGroups: P,
|
|
4671
4686
|
tableApi: a,
|
|
4672
4687
|
smartGridMenuOptions: p,
|
|
4673
|
-
purgeClosedRowNodes:
|
|
4674
|
-
detailRendererTable:
|
|
4675
|
-
isSaveViewEnabled:
|
|
4688
|
+
purgeClosedRowNodes: T,
|
|
4689
|
+
detailRendererTable: D,
|
|
4690
|
+
isSaveViewEnabled: S,
|
|
4676
4691
|
isSavingViewLoading: U,
|
|
4677
4692
|
savedViewsOptions: N,
|
|
4678
|
-
rowHeight:
|
|
4693
|
+
rowHeight: y,
|
|
4679
4694
|
tableId: _,
|
|
4680
4695
|
refObj: v,
|
|
4681
|
-
callBackRef:
|
|
4682
|
-
exportCallbackRef:
|
|
4696
|
+
callBackRef: X,
|
|
4697
|
+
exportCallbackRef: K,
|
|
4683
4698
|
saveViewCallbackRef: q,
|
|
4684
4699
|
saveViewOptionsRef: ee,
|
|
4685
4700
|
isSingleSelect: ne,
|
|
4686
4701
|
defaultColDef: $,
|
|
4687
4702
|
disableSelectAllRecords: Z,
|
|
4688
|
-
selectable:
|
|
4703
|
+
selectable: re,
|
|
4689
4704
|
columnBufferSize: ae,
|
|
4690
4705
|
lazyLoadCellRenderer: se,
|
|
4691
|
-
hasSplitRenderer:
|
|
4706
|
+
hasSplitRenderer: Ce,
|
|
4692
4707
|
splitRendererKeys: fe,
|
|
4693
4708
|
removeSelectionOnOperation: he,
|
|
4694
4709
|
removeCheckConfigurationOnOperation: ie,
|
|
4695
4710
|
clickCallbackRef: ce,
|
|
4696
4711
|
isChatEnabled: Ae,
|
|
4697
|
-
isCommentFeatureEnabled:
|
|
4712
|
+
isCommentFeatureEnabled: Ee,
|
|
4698
4713
|
noHeaderSelection: k,
|
|
4699
4714
|
treeData: V,
|
|
4700
4715
|
virtualizationConfig: le,
|
|
4701
4716
|
rowSelectionRef: s,
|
|
4702
|
-
disableCurrentPageRecords:
|
|
4717
|
+
disableCurrentPageRecords: C
|
|
4703
4718
|
}) => (pe(() => {
|
|
4704
4719
|
e({
|
|
4705
4720
|
type: l.SET_COLUMN_MAP,
|
|
@@ -4722,7 +4737,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4722
4737
|
payload: _
|
|
4723
4738
|
}), e({
|
|
4724
4739
|
type: l.SET_INITIAL_EXPANDED_COLUMN_GROUPS,
|
|
4725
|
-
payload:
|
|
4740
|
+
payload: P
|
|
4726
4741
|
}), e({
|
|
4727
4742
|
type: l.ROW_DRAG_MANAGED,
|
|
4728
4743
|
payload: g
|
|
@@ -4740,7 +4755,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4740
4755
|
payload: { uniqueIdField: i, childKeyField: o }
|
|
4741
4756
|
}), e({
|
|
4742
4757
|
type: l.INFINITE_SCROLL,
|
|
4743
|
-
payload:
|
|
4758
|
+
payload: u
|
|
4744
4759
|
}), e({
|
|
4745
4760
|
type: l.ADD_TABLE_INSTANCE,
|
|
4746
4761
|
payload: r
|
|
@@ -4752,18 +4767,18 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4752
4767
|
payload: p
|
|
4753
4768
|
}), e({
|
|
4754
4769
|
type: l.ROW_GROUP_CACHE_ENABLE,
|
|
4755
|
-
payload:
|
|
4770
|
+
payload: T
|
|
4756
4771
|
}), e({
|
|
4757
4772
|
type: l.DETAIL_RENDERER_TABLE,
|
|
4758
|
-
payload:
|
|
4773
|
+
payload: D
|
|
4759
4774
|
}), e({
|
|
4760
4775
|
type: l.IS_SAVE_VIEW_ENABLED,
|
|
4761
|
-
payload:
|
|
4776
|
+
payload: S
|
|
4762
4777
|
}), e({
|
|
4763
4778
|
type: l.SET_REFS,
|
|
4764
4779
|
payload: {
|
|
4765
|
-
callBackRef:
|
|
4766
|
-
exportCallbackRef:
|
|
4780
|
+
callBackRef: X,
|
|
4781
|
+
exportCallbackRef: K,
|
|
4767
4782
|
saveViewCallbackRef: q,
|
|
4768
4783
|
saveViewOptionsRef: ee,
|
|
4769
4784
|
clickCallbackRef: ce,
|
|
@@ -4777,7 +4792,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4777
4792
|
payload: $
|
|
4778
4793
|
}), e({
|
|
4779
4794
|
type: l.SET_SELECTABLE,
|
|
4780
|
-
payload:
|
|
4795
|
+
payload: re
|
|
4781
4796
|
}), e({
|
|
4782
4797
|
type: l.SET_DISABLE_SELECT_ALL_RECORDS_OPTION,
|
|
4783
4798
|
payload: Z
|
|
@@ -4789,7 +4804,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4789
4804
|
payload: se
|
|
4790
4805
|
}), e({
|
|
4791
4806
|
type: l.SET_HAS_SPLIT_RENDERER,
|
|
4792
|
-
payload:
|
|
4807
|
+
payload: Ce
|
|
4793
4808
|
}), e({
|
|
4794
4809
|
type: l.SET_HAS_SPLIT_RENDERER_KEYS,
|
|
4795
4810
|
payload: fe
|
|
@@ -4801,7 +4816,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4801
4816
|
payload: Ae
|
|
4802
4817
|
}), e({
|
|
4803
4818
|
type: l.SET_COMMENT_ENABLED,
|
|
4804
|
-
payload:
|
|
4819
|
+
payload: Ee
|
|
4805
4820
|
}), e({
|
|
4806
4821
|
type: l.SET_REMOVE_CHECK_CONFIGURATION_ON_OPERATION,
|
|
4807
4822
|
payload: ie
|
|
@@ -4816,14 +4831,14 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4816
4831
|
payload: le
|
|
4817
4832
|
}), e({
|
|
4818
4833
|
type: l.SET_DISABLE_CURRENT_PAGE_RECORDS,
|
|
4819
|
-
payload:
|
|
4834
|
+
payload: C
|
|
4820
4835
|
});
|
|
4821
4836
|
}, []), pe(() => {
|
|
4822
4837
|
e({
|
|
4823
4838
|
type: l.SET_ROW_HEIGHT,
|
|
4824
|
-
payload:
|
|
4839
|
+
payload: y
|
|
4825
4840
|
});
|
|
4826
|
-
}, [
|
|
4841
|
+
}, [y]), pe(() => {
|
|
4827
4842
|
e({
|
|
4828
4843
|
type: l.SAVE_VIEW_CALLBACKS,
|
|
4829
4844
|
payload: {
|
|
@@ -4834,9 +4849,9 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4834
4849
|
}, [N, U]), pe(() => {
|
|
4835
4850
|
e({
|
|
4836
4851
|
type: l.SET_SERVER_SIDE,
|
|
4837
|
-
payload:
|
|
4852
|
+
payload: E
|
|
4838
4853
|
});
|
|
4839
|
-
}, [
|
|
4854
|
+
}, [E]), null), Nn = Rn(
|
|
4840
4855
|
void 0
|
|
4841
4856
|
), Ft = mn(
|
|
4842
4857
|
({
|
|
@@ -4851,58 +4866,58 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4851
4866
|
// Grid alignment props
|
|
4852
4867
|
tableId: f,
|
|
4853
4868
|
alignedGrids: c = [],
|
|
4854
|
-
initialExpandedColumnGroups:
|
|
4869
|
+
initialExpandedColumnGroups: E = {},
|
|
4855
4870
|
enableRowSpan: g = !1,
|
|
4856
|
-
rowSpanColumn:
|
|
4857
|
-
columnMap:
|
|
4871
|
+
rowSpanColumn: u = null,
|
|
4872
|
+
columnMap: P = {},
|
|
4858
4873
|
infiniteScroll: a = !1,
|
|
4859
4874
|
rowDragManaged: p,
|
|
4860
|
-
pinnedTopRows:
|
|
4861
|
-
pinnedBottomRows:
|
|
4862
|
-
getRowStyle:
|
|
4875
|
+
pinnedTopRows: T = [],
|
|
4876
|
+
pinnedBottomRows: D = [],
|
|
4877
|
+
getRowStyle: S,
|
|
4863
4878
|
tableInstance: U,
|
|
4864
4879
|
smartGridMenuOptions: N,
|
|
4865
|
-
purgeClosedRowNodes:
|
|
4880
|
+
purgeClosedRowNodes: y,
|
|
4866
4881
|
detailRendererTable: _,
|
|
4867
4882
|
// Save View Props
|
|
4868
4883
|
isSaveViewEnabled: v,
|
|
4869
|
-
isSavingViewLoading:
|
|
4870
|
-
savedViewsOptions:
|
|
4884
|
+
isSavingViewLoading: X,
|
|
4885
|
+
savedViewsOptions: K,
|
|
4871
4886
|
rowHeight: q,
|
|
4872
4887
|
callBackRef: ee,
|
|
4873
4888
|
exportCallbackRef: ne,
|
|
4874
4889
|
saveViewCallbackRef: $,
|
|
4875
4890
|
saveViewOptionsRef: Z,
|
|
4876
|
-
clickCallbackRef:
|
|
4891
|
+
clickCallbackRef: re,
|
|
4877
4892
|
// Row selection
|
|
4878
4893
|
isSingleSelect: ae = !1,
|
|
4879
4894
|
selectable: se,
|
|
4880
|
-
disableSelectAllRecords:
|
|
4895
|
+
disableSelectAllRecords: Ce,
|
|
4881
4896
|
columnBufferSize: fe,
|
|
4882
4897
|
lazyLoadCellRenderer: he,
|
|
4883
4898
|
hasSplitRenderer: ie,
|
|
4884
4899
|
splitRendererKeys: ce,
|
|
4885
4900
|
removeSelectionOnOperation: Ae,
|
|
4886
|
-
removeCheckConfigurationOnOperation:
|
|
4901
|
+
removeCheckConfigurationOnOperation: Ee,
|
|
4887
4902
|
isChatEnabled: k,
|
|
4888
4903
|
isCommentFeatureEnabled: V,
|
|
4889
4904
|
noHeaderSelection: le,
|
|
4890
4905
|
treeData: s,
|
|
4891
|
-
virtualizationConfig:
|
|
4906
|
+
virtualizationConfig: C,
|
|
4892
4907
|
rowSelectionRef: h,
|
|
4893
4908
|
disableCurrentPageRecords: B
|
|
4894
4909
|
}, w) => {
|
|
4895
4910
|
const I = Pe(null), m = Pe(
|
|
4896
4911
|
{}
|
|
4897
|
-
),
|
|
4912
|
+
), b = Dt().getState().dispatch, x = Ie(
|
|
4898
4913
|
(H) => {
|
|
4899
|
-
var
|
|
4900
|
-
|
|
4901
|
-
const
|
|
4902
|
-
if (
|
|
4903
|
-
const Qe =
|
|
4914
|
+
var te, ue, we, Se, ve, Te;
|
|
4915
|
+
b(H);
|
|
4916
|
+
const M = m.current.state || {};
|
|
4917
|
+
if (M != null && M.api && ((te = M.api) != null && te.dispatchEvent)) {
|
|
4918
|
+
const Qe = Ct[H.type];
|
|
4904
4919
|
if (Qe) {
|
|
4905
|
-
let oe = { api:
|
|
4920
|
+
let oe = { api: M.api };
|
|
4906
4921
|
const Y = H.payload;
|
|
4907
4922
|
switch (H.type) {
|
|
4908
4923
|
case l.SET_COLUMN_WIDTH:
|
|
@@ -4928,22 +4943,22 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4928
4943
|
case l.SET_COLUMN_FILTER:
|
|
4929
4944
|
case l.REMOVE_COLUMN_FILTER:
|
|
4930
4945
|
case l.APPLY_FILTERS:
|
|
4931
|
-
|
|
4946
|
+
un(M), oe = { ...oe, filterState: M.columnFilters };
|
|
4932
4947
|
break;
|
|
4933
4948
|
case l.SET_PAGE:
|
|
4934
4949
|
oe = {
|
|
4935
4950
|
...oe,
|
|
4936
4951
|
paginationState: {
|
|
4937
|
-
...
|
|
4952
|
+
...M.pagination,
|
|
4938
4953
|
page: H.payload
|
|
4939
4954
|
}
|
|
4940
4955
|
};
|
|
4941
4956
|
break;
|
|
4942
4957
|
case l.SET_PAGE_SIZE:
|
|
4943
|
-
|
|
4958
|
+
un(M), oe = {
|
|
4944
4959
|
...oe,
|
|
4945
4960
|
paginationState: {
|
|
4946
|
-
...
|
|
4961
|
+
...M.pagination,
|
|
4947
4962
|
pageSize: H.payload
|
|
4948
4963
|
}
|
|
4949
4964
|
};
|
|
@@ -4951,8 +4966,8 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4951
4966
|
case l.UPDATE_ROW_DATA:
|
|
4952
4967
|
oe = {
|
|
4953
4968
|
...oe,
|
|
4954
|
-
data: Y != null && Y.rowId ? (
|
|
4955
|
-
(Xe) => Xe[
|
|
4969
|
+
data: Y != null && Y.rowId ? (ue = M.data) == null ? void 0 : ue.find(
|
|
4970
|
+
(Xe) => Xe[M.uniqueIdField] === (Y == null ? void 0 : Y.rowId)
|
|
4956
4971
|
) : null,
|
|
4957
4972
|
column: { field: Y == null ? void 0 : Y.field },
|
|
4958
4973
|
newValue: Y == null ? void 0 : Y.value,
|
|
@@ -4994,10 +5009,10 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
4994
5009
|
};
|
|
4995
5010
|
break;
|
|
4996
5011
|
}
|
|
4997
|
-
|
|
5012
|
+
M.api.dispatchEvent(Qe, oe);
|
|
4998
5013
|
}
|
|
4999
5014
|
}
|
|
5000
|
-
!
|
|
5015
|
+
!M.tableId || !((Se = (we = I.current) == null ? void 0 : we.alignedGrids) != null && Se.length) || (ve = H.meta) != null && ve.fromAlignedGrid || !Et.includes(H.type) || (Te = I.current) != null && Te.propagateChange && I.current.propagateChange(
|
|
5001
5016
|
H.type,
|
|
5002
5017
|
H.payload,
|
|
5003
5018
|
H.meta
|
|
@@ -5006,28 +5021,28 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5006
5021
|
[]
|
|
5007
5022
|
);
|
|
5008
5023
|
Mt({
|
|
5009
|
-
dispatch:
|
|
5010
|
-
pinnedTopRows:
|
|
5011
|
-
pinnedBottomRows:
|
|
5024
|
+
dispatch: b,
|
|
5025
|
+
pinnedTopRows: T,
|
|
5026
|
+
pinnedBottomRows: D,
|
|
5012
5027
|
tableInstance: U,
|
|
5013
|
-
columnMap:
|
|
5028
|
+
columnMap: P,
|
|
5014
5029
|
uniqueIdField: t,
|
|
5015
5030
|
childKeyField: r,
|
|
5016
5031
|
enableRowSpan: g,
|
|
5017
|
-
rowSpanColumn:
|
|
5032
|
+
rowSpanColumn: u,
|
|
5018
5033
|
pageSize: d,
|
|
5019
5034
|
serverSide: o,
|
|
5020
5035
|
rowDragManaged: p,
|
|
5021
5036
|
infiniteScroll: a,
|
|
5022
|
-
initialExpandedColumnGroups:
|
|
5037
|
+
initialExpandedColumnGroups: E,
|
|
5023
5038
|
tableApi: A,
|
|
5024
5039
|
smartGridMenuOptions: N,
|
|
5025
|
-
purgeClosedRowNodes:
|
|
5040
|
+
purgeClosedRowNodes: y,
|
|
5026
5041
|
detailRendererTable: _,
|
|
5027
5042
|
// Save View Props
|
|
5028
5043
|
isSaveViewEnabled: v,
|
|
5029
|
-
isSavingViewLoading:
|
|
5030
|
-
savedViewsOptions:
|
|
5044
|
+
isSavingViewLoading: X,
|
|
5045
|
+
savedViewsOptions: K,
|
|
5031
5046
|
rowHeight: q,
|
|
5032
5047
|
tableId: f,
|
|
5033
5048
|
refObj: m,
|
|
@@ -5038,49 +5053,49 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5038
5053
|
saveViewOptionsRef: Z,
|
|
5039
5054
|
isSingleSelect: ae,
|
|
5040
5055
|
defaultColDef: i,
|
|
5041
|
-
disableSelectAllRecords:
|
|
5056
|
+
disableSelectAllRecords: Ce,
|
|
5042
5057
|
selectable: se,
|
|
5043
5058
|
columnBufferSize: fe,
|
|
5044
5059
|
lazyLoadCellRenderer: he,
|
|
5045
5060
|
hasSplitRenderer: ie,
|
|
5046
5061
|
splitRendererKeys: ce,
|
|
5047
5062
|
removeSelectionOnOperation: Ae,
|
|
5048
|
-
removeCheckConfigurationOnOperation:
|
|
5049
|
-
clickCallbackRef:
|
|
5063
|
+
removeCheckConfigurationOnOperation: Ee,
|
|
5064
|
+
clickCallbackRef: re,
|
|
5050
5065
|
isChatEnabled: k,
|
|
5051
5066
|
isCommentFeatureEnabled: V,
|
|
5052
5067
|
noHeaderSelection: le,
|
|
5053
5068
|
treeData: s,
|
|
5054
|
-
virtualizationConfig:
|
|
5069
|
+
virtualizationConfig: C,
|
|
5055
5070
|
rowSelectionRef: h,
|
|
5056
5071
|
disableCurrentPageRecords: B
|
|
5057
5072
|
}), pe(() => {
|
|
5058
|
-
|
|
5073
|
+
b({
|
|
5059
5074
|
type: l.SET_COLUMNS,
|
|
5060
5075
|
payload: n,
|
|
5061
5076
|
meta: { defaultColDef: i }
|
|
5062
5077
|
});
|
|
5063
5078
|
const H = setTimeout(() => {
|
|
5064
|
-
const
|
|
5065
|
-
let
|
|
5066
|
-
n.forEach((
|
|
5067
|
-
|
|
5068
|
-
}),
|
|
5079
|
+
const M = {};
|
|
5080
|
+
let te = !1;
|
|
5081
|
+
n.forEach((ue) => {
|
|
5082
|
+
ue.width || (te = !0, M[F(ue)] = !0);
|
|
5083
|
+
}), te && b({
|
|
5069
5084
|
type: l.AUTOSIZE_COLUMNS_REQUESTED,
|
|
5070
|
-
payload: { columnsToAutosize:
|
|
5085
|
+
payload: { columnsToAutosize: M }
|
|
5071
5086
|
});
|
|
5072
5087
|
}, 100);
|
|
5073
5088
|
return () => clearTimeout(H);
|
|
5074
5089
|
}, [n]);
|
|
5075
|
-
const
|
|
5076
|
-
(H,
|
|
5090
|
+
const O = Ie(
|
|
5091
|
+
(H, M) => {
|
|
5077
5092
|
H && x({
|
|
5078
5093
|
type: l.TOGGLE_GROUP_EXPANSION,
|
|
5079
|
-
payload: { rowId: String(H), rowIndex:
|
|
5094
|
+
payload: { rowId: String(H), rowIndex: M }
|
|
5080
5095
|
});
|
|
5081
5096
|
},
|
|
5082
5097
|
[x]
|
|
5083
|
-
), { propagateChange:
|
|
5098
|
+
), { propagateChange: L } = Nt(
|
|
5084
5099
|
f,
|
|
5085
5100
|
c,
|
|
5086
5101
|
A,
|
|
@@ -5088,12 +5103,12 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5088
5103
|
);
|
|
5089
5104
|
pe(() => {
|
|
5090
5105
|
I.current = {
|
|
5091
|
-
propagateChange:
|
|
5106
|
+
propagateChange: L,
|
|
5092
5107
|
alignedGrids: c
|
|
5093
5108
|
};
|
|
5094
|
-
}, [
|
|
5109
|
+
}, [L, c]);
|
|
5095
5110
|
const z = Ie(
|
|
5096
|
-
(H,
|
|
5111
|
+
(H, M, te = !1) => {
|
|
5097
5112
|
if (!We.includes(H)) {
|
|
5098
5113
|
console.warn(
|
|
5099
5114
|
`Invalid event type: ${H}. Valid types are: ${We.join(
|
|
@@ -5102,18 +5117,18 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5102
5117
|
);
|
|
5103
5118
|
return;
|
|
5104
5119
|
}
|
|
5105
|
-
if (typeof
|
|
5120
|
+
if (typeof M != "function") {
|
|
5106
5121
|
console.warn("Event listener must be a function");
|
|
5107
5122
|
return;
|
|
5108
5123
|
}
|
|
5109
5124
|
x({
|
|
5110
5125
|
type: l.ADD_EVENT_LISTENER,
|
|
5111
|
-
payload: { eventType: H, listener:
|
|
5126
|
+
payload: { eventType: H, listener: M, once: te }
|
|
5112
5127
|
});
|
|
5113
5128
|
},
|
|
5114
5129
|
[x]
|
|
5115
|
-
),
|
|
5116
|
-
(H,
|
|
5130
|
+
), Q = Ie(
|
|
5131
|
+
(H, M) => {
|
|
5117
5132
|
if (!We.includes(H)) {
|
|
5118
5133
|
console.warn(
|
|
5119
5134
|
`Invalid event type: ${H}. Valid types are: ${We.join(
|
|
@@ -5122,29 +5137,29 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5122
5137
|
);
|
|
5123
5138
|
return;
|
|
5124
5139
|
}
|
|
5125
|
-
if (typeof
|
|
5140
|
+
if (typeof M != "function") {
|
|
5126
5141
|
console.warn("Event listener must be a function");
|
|
5127
5142
|
return;
|
|
5128
5143
|
}
|
|
5129
5144
|
x({
|
|
5130
5145
|
type: l.REMOVE_EVENT_LISTENER,
|
|
5131
|
-
payload: { eventType: H, listener:
|
|
5146
|
+
payload: { eventType: H, listener: M }
|
|
5132
5147
|
});
|
|
5133
5148
|
},
|
|
5134
5149
|
[x]
|
|
5135
|
-
),
|
|
5136
|
-
(H,
|
|
5137
|
-
const
|
|
5138
|
-
Array.isArray(
|
|
5139
|
-
|
|
5150
|
+
), R = Ie(
|
|
5151
|
+
(H, M) => {
|
|
5152
|
+
const te = vt(m.current.state, H, M) || [];
|
|
5153
|
+
Array.isArray(te) && te.forEach((ue) => {
|
|
5154
|
+
Q(H, ue);
|
|
5140
5155
|
});
|
|
5141
5156
|
},
|
|
5142
|
-
[
|
|
5157
|
+
[Q]
|
|
5143
5158
|
);
|
|
5144
5159
|
pe(() => () => {
|
|
5145
|
-
|
|
5160
|
+
b({ type: l.CLEANUP_TABLE_RESOURCES });
|
|
5146
5161
|
}, []);
|
|
5147
|
-
const
|
|
5162
|
+
const j = Tn(() => {
|
|
5148
5163
|
var H;
|
|
5149
5164
|
return {
|
|
5150
5165
|
state: {
|
|
@@ -5152,34 +5167,34 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5152
5167
|
api: {
|
|
5153
5168
|
...A,
|
|
5154
5169
|
addEventListener: z,
|
|
5155
|
-
removeEventListener:
|
|
5156
|
-
dispatchEvent:
|
|
5170
|
+
removeEventListener: Q,
|
|
5171
|
+
dispatchEvent: R
|
|
5157
5172
|
}
|
|
5158
5173
|
},
|
|
5159
5174
|
tableApi: A,
|
|
5160
5175
|
dispatch: x,
|
|
5161
5176
|
ACTION_TYPES: l,
|
|
5162
|
-
toggleGroupExpansion:
|
|
5163
|
-
dispatchEvent:
|
|
5164
|
-
getRowStyle:
|
|
5177
|
+
toggleGroupExpansion: O,
|
|
5178
|
+
dispatchEvent: R,
|
|
5179
|
+
getRowStyle: S
|
|
5165
5180
|
};
|
|
5166
5181
|
}, [
|
|
5167
|
-
D,
|
|
5168
|
-
T,
|
|
5169
5182
|
O,
|
|
5170
|
-
|
|
5183
|
+
R,
|
|
5171
5184
|
S,
|
|
5185
|
+
z,
|
|
5186
|
+
Q,
|
|
5172
5187
|
x,
|
|
5173
5188
|
A
|
|
5174
5189
|
]);
|
|
5175
|
-
return m.current =
|
|
5190
|
+
return m.current = j, bn(w, () => m.current), /* @__PURE__ */ Le(Nn.Provider, { value: j, children: [
|
|
5176
5191
|
/* @__PURE__ */ de(
|
|
5177
5192
|
bt,
|
|
5178
5193
|
{
|
|
5179
5194
|
refObj: m,
|
|
5180
5195
|
addEventListener: z,
|
|
5181
|
-
removeEventListener:
|
|
5182
|
-
dispatchEvent:
|
|
5196
|
+
removeEventListener: Q,
|
|
5197
|
+
dispatchEvent: R
|
|
5183
5198
|
}
|
|
5184
5199
|
),
|
|
5185
5200
|
e
|
|
@@ -5187,14 +5202,14 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5187
5202
|
}
|
|
5188
5203
|
), pr = mn((e, n) => {
|
|
5189
5204
|
const { tableId: t = "default" } = e;
|
|
5190
|
-
return /* @__PURE__ */ de(
|
|
5205
|
+
return /* @__PURE__ */ de(St, { tableId: t, children: /* @__PURE__ */ de(Ft, { ...e, ref: n }) });
|
|
5191
5206
|
}), bt = ({
|
|
5192
5207
|
refObj: e,
|
|
5193
5208
|
addEventListener: n,
|
|
5194
5209
|
removeEventListener: t,
|
|
5195
5210
|
dispatchEvent: r
|
|
5196
5211
|
}) => {
|
|
5197
|
-
const A =
|
|
5212
|
+
const A = Ot((i) => i);
|
|
5198
5213
|
return pe(() => {
|
|
5199
5214
|
e.current.state = A, e.current.state = {
|
|
5200
5215
|
...A,
|
|
@@ -5229,25 +5244,25 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5229
5244
|
secondaryButtonLabel: f = "Close",
|
|
5230
5245
|
primaryButtonProps: c = {}
|
|
5231
5246
|
}) => {
|
|
5232
|
-
const
|
|
5247
|
+
const E = Ie(() => {
|
|
5233
5248
|
n();
|
|
5234
5249
|
}, [n]), g = Ie(
|
|
5235
|
-
(
|
|
5236
|
-
|
|
5250
|
+
(D) => {
|
|
5251
|
+
D.stopPropagation(), d ? d(D) : n(D);
|
|
5237
5252
|
},
|
|
5238
5253
|
[d, n]
|
|
5239
5254
|
);
|
|
5240
5255
|
if (!e) return null;
|
|
5241
|
-
const
|
|
5256
|
+
const u = `ia-table-prompt-${A}`, P = A === "delete" || A === "error" ? "danger" : "primary", a = o || f, p = o && A !== "success", T = /* @__PURE__ */ de("div", { className: "ia-table-prompt-overlay d-flex align-items-center justify-content-center", children: /* @__PURE__ */ Le(
|
|
5242
5257
|
"div",
|
|
5243
5258
|
{
|
|
5244
|
-
className: `ia-table-prompt d-flex flex-column position-relative ${
|
|
5259
|
+
className: `ia-table-prompt d-flex flex-column position-relative ${u}`,
|
|
5245
5260
|
children: [
|
|
5246
5261
|
/* @__PURE__ */ de("div", { className: "ia-table-prompt-header d-flex justify-content-end", children: /* @__PURE__ */ de(
|
|
5247
5262
|
"div",
|
|
5248
5263
|
{
|
|
5249
5264
|
className: "ia-table-prompt-close-icon cursor-pointer",
|
|
5250
|
-
onClick:
|
|
5265
|
+
onClick: E,
|
|
5251
5266
|
"aria-label": "Close",
|
|
5252
5267
|
children: /* @__PURE__ */ de(Wn, { width: "11.67", height: "11.67" })
|
|
5253
5268
|
}
|
|
@@ -5263,7 +5278,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5263
5278
|
dn,
|
|
5264
5279
|
{
|
|
5265
5280
|
onClick: i,
|
|
5266
|
-
variant:
|
|
5281
|
+
variant: P,
|
|
5267
5282
|
...c,
|
|
5268
5283
|
children: o
|
|
5269
5284
|
}
|
|
@@ -5272,7 +5287,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5272
5287
|
]
|
|
5273
5288
|
}
|
|
5274
5289
|
) });
|
|
5275
|
-
return
|
|
5290
|
+
return Sn(T, document.body);
|
|
5276
5291
|
}, wr = Hn(Wt), Br = ({
|
|
5277
5292
|
isMultiSelect: e,
|
|
5278
5293
|
cellValue: n,
|
|
@@ -5293,13 +5308,13 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
|
|
|
5293
5308
|
return [];
|
|
5294
5309
|
} else
|
|
5295
5310
|
return t.find((r) => r.value === n) || null;
|
|
5296
|
-
},
|
|
5311
|
+
}, Rr = (e, n) => typeof n == "number" ? n : n === "center" ? e.height / 2 : n === "bottom" ? e.height : 0, Tr = (e, n) => typeof n == "number" ? n : n === "center" ? e.width / 2 : n === "right" ? e.width : 0, mr = (e) => {
|
|
5297
5312
|
const n = typeof e.horizontal == "number" ? `${e.horizontal}px` : e.horizontal, t = typeof e.vertical == "number" ? `${e.vertical}px` : e.vertical;
|
|
5298
5313
|
return `${n} ${t}`;
|
|
5299
|
-
},
|
|
5314
|
+
}, Sr = {
|
|
5300
5315
|
vertical: "bottom",
|
|
5301
5316
|
horizontal: "left"
|
|
5302
|
-
},
|
|
5317
|
+
}, Or = {
|
|
5303
5318
|
vertical: "top",
|
|
5304
5319
|
horizontal: "left"
|
|
5305
5320
|
};
|
|
@@ -5320,29 +5335,29 @@ export {
|
|
|
5320
5335
|
ke as H,
|
|
5321
5336
|
qe as I,
|
|
5322
5337
|
fr as J,
|
|
5323
|
-
|
|
5338
|
+
Cr as K,
|
|
5324
5339
|
Vt as L,
|
|
5325
5340
|
Qt as M,
|
|
5326
5341
|
Pr as N,
|
|
5327
5342
|
Dr as O,
|
|
5328
5343
|
wr as P,
|
|
5329
|
-
|
|
5330
|
-
|
|
5344
|
+
Sr as Q,
|
|
5345
|
+
Or as R,
|
|
5331
5346
|
Jt as S,
|
|
5332
5347
|
pr as T,
|
|
5333
5348
|
mr as U,
|
|
5334
|
-
|
|
5335
|
-
|
|
5349
|
+
Rr as V,
|
|
5350
|
+
Tr as W,
|
|
5336
5351
|
Ir as a,
|
|
5337
5352
|
be as b,
|
|
5338
|
-
|
|
5339
|
-
|
|
5353
|
+
ur as c,
|
|
5354
|
+
ut as d,
|
|
5340
5355
|
rr as e,
|
|
5341
5356
|
Ar as f,
|
|
5342
5357
|
st as g,
|
|
5343
5358
|
dr as h,
|
|
5344
5359
|
Br as i,
|
|
5345
|
-
|
|
5360
|
+
En as j,
|
|
5346
5361
|
sr as k,
|
|
5347
5362
|
or as l,
|
|
5348
5363
|
ar as m,
|
|
@@ -5351,9 +5366,9 @@ export {
|
|
|
5351
5366
|
_e as p,
|
|
5352
5367
|
ct as q,
|
|
5353
5368
|
hr as r,
|
|
5354
|
-
|
|
5369
|
+
Er as s,
|
|
5355
5370
|
tt as t,
|
|
5356
|
-
|
|
5371
|
+
Ot as u,
|
|
5357
5372
|
nr as v,
|
|
5358
5373
|
qt as w,
|
|
5359
5374
|
lr as x,
|