ia-table 0.15.3 → 0.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat.d.ts +1 -0
- package/dist/chat.js +2 -2
- package/dist/{chat.type-D1TR5GvR.js → chat.type-CZyhjgHt.js} +1262 -1244
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4706 -4678
- package/dist/locale-patch-applied.txt +1 -0
- package/dist/pivot.d.ts +1 -0
- 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 X from "react";
|
|
3
|
-
import Gn, { createContext as In, useContext as en, useMemo as wn, useEffect as he, useRef as De, useState as
|
|
3
|
+
import Gn, { createContext as In, useContext as en, useMemo as wn, useEffect as he, useRef as De, useState as Ne, useCallback as pe, useLayoutEffect as vn, forwardRef as Bn, useImperativeHandle as Mn, memo as Fn } from "react";
|
|
4
4
|
import { jsx as ae, jsxs as Se } from "react/jsx-runtime";
|
|
5
5
|
import { createPortal as Rn } from "react-dom";
|
|
6
6
|
import { g as v, U as Hn, f as Ke, L as Oe, s as bn, p as Ye, h as zn, m as on, S as kn, B as ln } from "./RadioGroup-D3RQET6P.js";
|
|
7
7
|
import { create as Un } from "zustand";
|
|
8
|
-
const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ X.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" })), Wn = (e, n) => (t, r, i) => (i.dispatch = (A) => (t((o) => e(o, A), !1, A), A), i.dispatchFromDevtools = !0, { dispatch: (...A) => i.dispatch(...A), ...n }), Yn = Wn, k = "_IATableOrdered",
|
|
9
|
-
var E, c, u, f, C,
|
|
10
|
-
const t =
|
|
8
|
+
const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ X.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" })), Wn = (e, n) => (t, r, i) => (i.dispatch = (A) => (t((o) => e(o, A), !1, A), A), i.dispatchFromDevtools = !0, { dispatch: (...A) => i.dispatch(...A), ...n }), Yn = Wn, k = "_IATableOrdered", xe = (e = 100) => `${(/* @__PURE__ */ new Date()).getTime()}_${e}`, Tn = (e, n = { path: [] }) => {
|
|
9
|
+
var E, c, u, f, C, N, l, h;
|
|
10
|
+
const t = xe(), r = v(e), i = e._originalField || ((c = (E = r == null ? void 0 : r.split) == null ? void 0 : E.call(r, k)) == null ? void 0 : c[0]), A = ((C = (f = (u = e.column_name) == null ? void 0 : u.split) == null ? void 0 : f.call(u, k)) == null ? void 0 : C[0]) || e.column_name, o = ((h = (l = (N = e.accessor) == null ? void 0 : N.split) == null ? void 0 : l.call(N, k)) == null ? void 0 : h[0]) || e.accessor, d = r.split(k)[0];
|
|
11
11
|
return {
|
|
12
12
|
accessor: `${o}${k}${t}`,
|
|
13
13
|
field: `${i}${k}${t}`,
|
|
@@ -22,7 +22,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
22
22
|
isReorderedColumn: !0
|
|
23
23
|
};
|
|
24
24
|
}, jn = (e) => {
|
|
25
|
-
var r, i, A, o, d, E, c, u, f, C,
|
|
25
|
+
var r, i, A, o, d, E, c, u, f, C, N, l, h, O, S, D, W, x;
|
|
26
26
|
const n = { ...e };
|
|
27
27
|
delete n.originalParentId, delete n.isReorderedColumn, delete n.originalId, delete n.uniqueSplitId, delete n.isSplitHierarchy, delete n.uniqueHierarchyId, delete n.originalPath;
|
|
28
28
|
const t = v(e);
|
|
@@ -33,16 +33,16 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
33
33
|
field: e._originalField || ((d = (o = t == null ? void 0 : t.split) == null ? void 0 : o.call(t, k)) == null ? void 0 : d[0]),
|
|
34
34
|
column_name: ((u = (c = (E = e.column_name) == null ? void 0 : E.split) == null ? void 0 : c.call(E, k)) == null ? void 0 : u[0]) || e.column_name,
|
|
35
35
|
_originalField: e._originalField || ((C = (f = t == null ? void 0 : t.split) == null ? void 0 : f.call(t, k)) == null ? void 0 : C[0]),
|
|
36
|
-
path: e.originalPath ? (
|
|
37
|
-
id: ((O = (
|
|
36
|
+
path: e.originalPath ? (N = e.originalPath) == null ? void 0 : N.map((Q) => Q.split(k)[0]) : e.path,
|
|
37
|
+
id: ((O = (h = (l = e.id) == null ? void 0 : l.split) == null ? void 0 : h.call(l, k)) == null ? void 0 : O[0]) || e.id,
|
|
38
38
|
originalPath: null,
|
|
39
|
-
parent_id: (
|
|
40
|
-
(
|
|
41
|
-
var
|
|
42
|
-
return typeof
|
|
39
|
+
parent_id: (S = e.parent_id) == null ? void 0 : S.map(
|
|
40
|
+
(Q) => {
|
|
41
|
+
var Y, G;
|
|
42
|
+
return typeof Q == "string" ? (G = (Y = Q == null ? void 0 : Q.split) == null ? void 0 : Y.call(Q, k)) == null ? void 0 : G[0] : Q;
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
parentField: (
|
|
45
|
+
parentField: (x = (W = (D = e.parentField) == null ? void 0 : D.split) == null ? void 0 : W.call(D, k)) == null ? void 0 : x[0]
|
|
46
46
|
};
|
|
47
47
|
}, nn = (e) => {
|
|
48
48
|
var r, i, A, o;
|
|
@@ -58,57 +58,57 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
58
58
|
}
|
|
59
59
|
const f = Kn(d, E);
|
|
60
60
|
if (f.length > 0 && f.length === c.length && f.length === u.length) {
|
|
61
|
-
const
|
|
61
|
+
const N = d.isReorderedColumn && E.isReorderedColumn, l = xe(t), h = f[f.length - 1].split(k)[0], O = N ? {
|
|
62
62
|
...d,
|
|
63
63
|
accessor: `${((A = (i = (r = d.accessor) == null ? void 0 : r.split) == null ? void 0 : i.call(r, k)) == null ? void 0 : A[0]) || d.accessor}${k}${l}`,
|
|
64
|
-
field: `${
|
|
65
|
-
column_name: `${
|
|
64
|
+
field: `${h}${k}${l}`,
|
|
65
|
+
column_name: `${h}${k}${l}`,
|
|
66
66
|
path: [
|
|
67
67
|
...((o = d.path) == null ? void 0 : o.slice(0, -1)) ?? [],
|
|
68
|
-
`${
|
|
68
|
+
`${h}${k}${l}`
|
|
69
69
|
],
|
|
70
70
|
originalPath: [...f],
|
|
71
71
|
children: []
|
|
72
72
|
} : {
|
|
73
73
|
...jn(d),
|
|
74
74
|
children: []
|
|
75
|
-
},
|
|
76
|
-
const
|
|
77
|
-
...
|
|
78
|
-
originalPath:
|
|
79
|
-
path:
|
|
75
|
+
}, S = (W, x, Q) => {
|
|
76
|
+
const Y = [...Q, v(W)], G = {
|
|
77
|
+
...W,
|
|
78
|
+
originalPath: Y.map((K) => K.split(k)[0]),
|
|
79
|
+
path: Y
|
|
80
80
|
};
|
|
81
|
-
return
|
|
82
|
-
(K) =>
|
|
81
|
+
return G.children && G.children.length > 0 && (G.children = G.children.map(
|
|
82
|
+
(K) => S(
|
|
83
83
|
K,
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
x,
|
|
85
|
+
G.path
|
|
86
86
|
)
|
|
87
|
-
)),
|
|
88
|
-
},
|
|
87
|
+
)), G.path = Y, G;
|
|
88
|
+
}, D = [];
|
|
89
89
|
if (d.children && d.children.length > 0) {
|
|
90
|
-
const
|
|
91
|
-
d.children.forEach((
|
|
92
|
-
const
|
|
93
|
-
|
|
90
|
+
const W = v(O);
|
|
91
|
+
d.children.forEach((x) => {
|
|
92
|
+
const Q = S(
|
|
93
|
+
x,
|
|
94
94
|
d.path || [],
|
|
95
95
|
O.path || []
|
|
96
96
|
);
|
|
97
|
-
|
|
97
|
+
Q.parent_id = [W], Q.parentField = W, D.push(Q);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
if (E.children && E.children.length > 0) {
|
|
101
|
-
const
|
|
102
|
-
E.children.forEach((
|
|
103
|
-
const
|
|
104
|
-
|
|
101
|
+
const W = v(O);
|
|
102
|
+
E.children.forEach((x) => {
|
|
103
|
+
const Q = S(
|
|
104
|
+
x,
|
|
105
105
|
E.path || [],
|
|
106
106
|
O.path || []
|
|
107
107
|
);
|
|
108
|
-
|
|
108
|
+
Q.parent_id = [W], Q.parentField = W, D.push(Q);
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
O.children =
|
|
111
|
+
O.children = D, n.splice(t, 2, O);
|
|
112
112
|
} else
|
|
113
113
|
t++;
|
|
114
114
|
}
|
|
@@ -128,12 +128,12 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
128
128
|
for (let c = 0; c < E && (A[c] === o[c] && e.is_frozen === n.is_frozen && e.pinned === n.pinned); c++)
|
|
129
129
|
d.push(A[c]);
|
|
130
130
|
return d;
|
|
131
|
-
},
|
|
131
|
+
}, mn = (e, n) => {
|
|
132
132
|
for (const t of e) {
|
|
133
133
|
if (v(t) === n)
|
|
134
134
|
return t;
|
|
135
135
|
if (t.children && t.children.length > 0) {
|
|
136
|
-
const r =
|
|
136
|
+
const r = mn(t.children, n);
|
|
137
137
|
if (r) return r;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -198,72 +198,72 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
198
198
|
...d
|
|
199
199
|
);
|
|
200
200
|
}, Vn = (e, n) => {
|
|
201
|
-
var C,
|
|
201
|
+
var C, N;
|
|
202
202
|
if (!n || n.length === 0 || n.length === 1)
|
|
203
203
|
return { removed: !1, hierarchy: null };
|
|
204
|
-
const t = (l,
|
|
204
|
+
const t = (l, h) => v(l) === h, r = e.findIndex(
|
|
205
205
|
(l) => t(l, n[0])
|
|
206
206
|
);
|
|
207
207
|
if (r === -1)
|
|
208
208
|
return { removed: !1, hierarchy: null };
|
|
209
|
-
const i = e[r], A = JSON.parse(JSON.stringify(i)), o = (l,
|
|
210
|
-
var
|
|
209
|
+
const i = e[r], A = JSON.parse(JSON.stringify(i)), o = (l, h, O, S = [], D = 0) => {
|
|
210
|
+
var V, te, le, se;
|
|
211
211
|
if (!(l != null && l.children))
|
|
212
212
|
return { success: !1, hierarchy: null };
|
|
213
|
-
const
|
|
214
|
-
(fe) => t(fe,
|
|
213
|
+
const W = O[0], x = l.children.findIndex(
|
|
214
|
+
(fe) => t(fe, W)
|
|
215
215
|
);
|
|
216
|
-
if (
|
|
216
|
+
if (x === -1)
|
|
217
217
|
return { success: !1, hierarchy: null };
|
|
218
|
-
const
|
|
219
|
-
(fe) => t(fe,
|
|
218
|
+
const Q = (V = h.children) == null ? void 0 : V.find(
|
|
219
|
+
(fe) => t(fe, W)
|
|
220
220
|
);
|
|
221
|
-
if (!
|
|
221
|
+
if (!Q)
|
|
222
222
|
return { success: !1, hierarchy: null };
|
|
223
223
|
if (O.length === 1) {
|
|
224
|
-
l.children.splice(
|
|
225
|
-
const fe =
|
|
226
|
-
...
|
|
224
|
+
l.children.splice(x, 1);
|
|
225
|
+
const fe = xe(), ge = v(Q).split(k)[0], ue = `${k}${fe}`, ie = `${ge}${ue}`, de = {
|
|
226
|
+
...Q,
|
|
227
227
|
field: ie,
|
|
228
|
-
column_name:
|
|
229
|
-
accessor:
|
|
230
|
-
id:
|
|
231
|
-
path: [...
|
|
232
|
-
originalPath:
|
|
228
|
+
column_name: Q.column_name ? `${Q.column_name.split(k)[0]}${ue}` : ie,
|
|
229
|
+
accessor: Q.accessor ? `${Q.accessor.split(k)[0]}${ue}` : ie,
|
|
230
|
+
id: Q.id ? `${Q.id.split(k)[0]}${ue}` : ie,
|
|
231
|
+
path: [...S, ie],
|
|
232
|
+
originalPath: Q.originalPath || ((te = Q.path) == null ? void 0 : te.map((oe) => oe.split(k)[0])),
|
|
233
233
|
originalId: ge,
|
|
234
|
-
_originalField:
|
|
234
|
+
_originalField: Q._originalField || ge,
|
|
235
235
|
isReorderedColumn: !0
|
|
236
236
|
};
|
|
237
|
-
return
|
|
237
|
+
return S.length > 0 && (de.parent_id = [S[S.length - 1]], de.parentField = S[S.length - 1]), { success: !0, hierarchy: de };
|
|
238
238
|
}
|
|
239
|
-
const
|
|
239
|
+
const Y = xe(), G = v(Q).split(k)[0], K = `${k}${Y}`, j = `${G}${K}`, Z = [...S, j], $ = l.children[x], ne = o(
|
|
240
240
|
$,
|
|
241
|
-
|
|
241
|
+
Q,
|
|
242
242
|
O.slice(1),
|
|
243
243
|
Z,
|
|
244
|
-
|
|
244
|
+
D + 1
|
|
245
245
|
);
|
|
246
|
-
if (!
|
|
247
|
-
return
|
|
248
|
-
((le = $.children) == null ? void 0 : le.length) === 0 && !$.isLeaf && l.children.splice(
|
|
246
|
+
if (!ne.success)
|
|
247
|
+
return ne;
|
|
248
|
+
((le = $.children) == null ? void 0 : le.length) === 0 && !$.isLeaf && l.children.splice(x, 1);
|
|
249
249
|
const q = {
|
|
250
|
-
...
|
|
250
|
+
...Q,
|
|
251
251
|
field: j,
|
|
252
|
-
column_name:
|
|
253
|
-
accessor:
|
|
254
|
-
id:
|
|
252
|
+
column_name: Q.column_name ? `${Q.column_name.split(k)[0]}${K}` : j,
|
|
253
|
+
accessor: Q.accessor ? `${Q.accessor.split(k)[0]}${K}` : j,
|
|
254
|
+
id: Q.id ? `${Q.id.split(k)[0]}${K}` : j,
|
|
255
255
|
path: Z,
|
|
256
|
-
originalPath:
|
|
257
|
-
originalId:
|
|
258
|
-
_originalField:
|
|
256
|
+
originalPath: Q.originalPath || ((se = Q.path) == null ? void 0 : se.map((fe) => fe.split(k)[0])),
|
|
257
|
+
originalId: G,
|
|
258
|
+
_originalField: Q._originalField || G,
|
|
259
259
|
isReorderedColumn: !0,
|
|
260
|
-
children: [
|
|
260
|
+
children: [ne.hierarchy]
|
|
261
261
|
};
|
|
262
|
-
return
|
|
262
|
+
return S.length > 0 && (q.parent_id = [S[S.length - 1]], q.parentField = S[S.length - 1]), ne.hierarchy && (ne.hierarchy.parent_id = [j], ne.hierarchy.parentField = j), {
|
|
263
263
|
success: !0,
|
|
264
264
|
hierarchy: q
|
|
265
265
|
};
|
|
266
|
-
}, d =
|
|
266
|
+
}, d = xe(), E = v(A).split(k)[0], c = `${k}${d}`, u = `${E}${c}`, f = o(
|
|
267
267
|
i,
|
|
268
268
|
A,
|
|
269
269
|
n.slice(1),
|
|
@@ -278,21 +278,21 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
278
278
|
accessor: A.accessor ? `${A.accessor.split(k)[0]}${c}` : u,
|
|
279
279
|
id: A.id ? `${A.id.split(k)[0]}${c}` : u,
|
|
280
280
|
path: [u],
|
|
281
|
-
originalPath: A.originalPath || ((C = A.path) == null ? void 0 : C.map((
|
|
281
|
+
originalPath: A.originalPath || ((C = A.path) == null ? void 0 : C.map((h) => h.split(k)[0])),
|
|
282
282
|
originalId: E,
|
|
283
283
|
_originalField: A._originalField || E,
|
|
284
284
|
isReorderedColumn: !0,
|
|
285
285
|
children: [f.hierarchy]
|
|
286
286
|
};
|
|
287
|
-
return f.hierarchy && (f.hierarchy.parent_id = [u], f.hierarchy.parentField = u), ((
|
|
287
|
+
return f.hierarchy && (f.hierarchy.parent_id = [u], f.hierarchy.parentField = u), ((N = i.children) == null ? void 0 : N.length) === 0 && !i.isLeaf && e.splice(r, 1), { removed: !0, hierarchy: l };
|
|
288
288
|
}
|
|
289
289
|
return { removed: !1, hierarchy: null };
|
|
290
290
|
}, Zn = (e, n, t) => {
|
|
291
291
|
e.path || (e.path = []), n.path || (n.path = []);
|
|
292
292
|
const r = e.path[0] || "", i = n.path[0] || "", A = t.findIndex(
|
|
293
|
-
(
|
|
293
|
+
(x) => v(x) === r
|
|
294
294
|
), o = t.findIndex(
|
|
295
|
-
(
|
|
295
|
+
(x) => v(x) === i
|
|
296
296
|
);
|
|
297
297
|
if (A === -1 || o === -1)
|
|
298
298
|
return console.error("Could not find source or target column in columns array", {
|
|
@@ -309,28 +309,28 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
309
309
|
const u = A === c;
|
|
310
310
|
let f = 0, C = !1;
|
|
311
311
|
if (u) {
|
|
312
|
-
const { rightAddition:
|
|
312
|
+
const { rightAddition: x } = qn(
|
|
313
313
|
e,
|
|
314
314
|
n,
|
|
315
315
|
t[c]
|
|
316
316
|
);
|
|
317
|
-
C =
|
|
317
|
+
C = x;
|
|
318
318
|
} else
|
|
319
319
|
C = A < c;
|
|
320
|
-
const
|
|
320
|
+
const N = ye(
|
|
321
321
|
t[A]
|
|
322
322
|
);
|
|
323
|
-
let l = null,
|
|
324
|
-
const { removed: O, hierarchy:
|
|
323
|
+
let l = null, h = null;
|
|
324
|
+
const { removed: O, hierarchy: S } = Vn(
|
|
325
325
|
t,
|
|
326
326
|
e.path
|
|
327
327
|
);
|
|
328
|
-
let
|
|
329
|
-
if (C && O && !
|
|
328
|
+
let D = S;
|
|
329
|
+
if (C && O && !N)
|
|
330
330
|
ye(
|
|
331
331
|
t[c]
|
|
332
332
|
) ? c++ : f++;
|
|
333
|
-
else if (C && O &&
|
|
333
|
+
else if (C && O && N)
|
|
334
334
|
ye(
|
|
335
335
|
t[c - 1]
|
|
336
336
|
) || (c--, f++);
|
|
@@ -339,49 +339,49 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
339
339
|
t[c]
|
|
340
340
|
) || f++;
|
|
341
341
|
else if (!O) {
|
|
342
|
-
const
|
|
342
|
+
const x = ye(
|
|
343
343
|
t[c]
|
|
344
344
|
);
|
|
345
|
-
!C && !
|
|
345
|
+
!C && !x && f++, C && !x && f++;
|
|
346
346
|
}
|
|
347
347
|
if (n.path.length > 1) {
|
|
348
|
-
const { before:
|
|
348
|
+
const { before: x, after: Q } = $n(
|
|
349
349
|
t[c],
|
|
350
350
|
0,
|
|
351
351
|
n.path.slice(1),
|
|
352
352
|
C
|
|
353
353
|
);
|
|
354
|
-
l =
|
|
354
|
+
l = Q, h = x;
|
|
355
355
|
}
|
|
356
|
-
if ((
|
|
357
|
-
const
|
|
356
|
+
if ((h || l) && !D) {
|
|
357
|
+
const x = ye(
|
|
358
358
|
t[c]
|
|
359
359
|
);
|
|
360
|
-
|
|
360
|
+
D = t.splice(A, 1)[0], C && !O && !x && c--;
|
|
361
361
|
}
|
|
362
|
-
if (
|
|
362
|
+
if (D)
|
|
363
363
|
Jn({
|
|
364
|
-
beforeHierarchy:
|
|
364
|
+
beforeHierarchy: h,
|
|
365
365
|
afterHierarchy: l,
|
|
366
|
-
newHierarchy:
|
|
366
|
+
newHierarchy: D,
|
|
367
367
|
targetColumFrozenState: d,
|
|
368
368
|
targetColumnFrozenPinned: E
|
|
369
369
|
}), _n({
|
|
370
|
-
beforeHierarchy:
|
|
370
|
+
beforeHierarchy: h,
|
|
371
371
|
afterHierarchy: l,
|
|
372
|
-
newHierarchy:
|
|
372
|
+
newHierarchy: D,
|
|
373
373
|
updatedtargetIndex: c,
|
|
374
374
|
removeColumnsCount: f,
|
|
375
375
|
isChildrenUpdate: !1,
|
|
376
376
|
columns: t
|
|
377
377
|
});
|
|
378
378
|
else {
|
|
379
|
-
const [
|
|
379
|
+
const [x] = t.splice(A, 1);
|
|
380
380
|
Hn(
|
|
381
|
-
|
|
381
|
+
x,
|
|
382
382
|
d,
|
|
383
383
|
E
|
|
384
|
-
), t.splice(o, 0,
|
|
384
|
+
), t.splice(o, 0, x);
|
|
385
385
|
}
|
|
386
386
|
return nn(t);
|
|
387
387
|
}, ye = (e) => {
|
|
@@ -395,7 +395,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
395
395
|
const r = v(t);
|
|
396
396
|
return r === n || r.split(k)[0] === n;
|
|
397
397
|
}), an = (e, n) => e.findIndex((t) => {
|
|
398
|
-
const r = v(t), i = r.split(k)[0], A = n.split(k)[0], o = r === n || i === A, d = !o &&
|
|
398
|
+
const r = v(t), i = r.split(k)[0], A = n.split(k)[0], o = r === n || i === A, d = !o && mn([t], n) !== null;
|
|
399
399
|
return o || d;
|
|
400
400
|
}), On = (e, n, t, r = 0) => {
|
|
401
401
|
if (!e.children || e.children.length === 0)
|
|
@@ -433,49 +433,49 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
433
433
|
c.children,
|
|
434
434
|
d
|
|
435
435
|
));
|
|
436
|
-
const C = (l,
|
|
437
|
-
var
|
|
438
|
-
let
|
|
439
|
-
for (;
|
|
440
|
-
const
|
|
436
|
+
const C = (l, h, O, S, D) => {
|
|
437
|
+
var x, Q;
|
|
438
|
+
let W = A - 1;
|
|
439
|
+
for (; W >= 0; ) {
|
|
440
|
+
const Y = h[W], G = O[W + 1];
|
|
441
441
|
let K = t;
|
|
442
|
-
if (
|
|
442
|
+
if (Y && v(K) !== Y) {
|
|
443
443
|
const j = Ve(
|
|
444
444
|
t,
|
|
445
|
-
|
|
445
|
+
Y
|
|
446
446
|
);
|
|
447
447
|
j && (K = j);
|
|
448
448
|
}
|
|
449
449
|
if (K.children) {
|
|
450
450
|
const j = K.children.findIndex((Z) => {
|
|
451
451
|
const $ = v(Z);
|
|
452
|
-
return $ ===
|
|
452
|
+
return $ === G || $.split(k)[0] === G || $.split(k)[0] === S;
|
|
453
453
|
});
|
|
454
454
|
if (j !== -1) {
|
|
455
455
|
c = K;
|
|
456
|
-
const Z = (l === "target" ? r : i)[
|
|
457
|
-
|
|
456
|
+
const Z = (l === "target" ? r : i)[W + 1], $ = l === "target" ? o : d, ne = (Q = (x = c.children) == null ? void 0 : x.findIndex) == null ? void 0 : Q.call(
|
|
457
|
+
x,
|
|
458
458
|
(q) => {
|
|
459
|
-
const
|
|
460
|
-
return
|
|
459
|
+
const V = v(q);
|
|
460
|
+
return V === Z || V.split(k)[0] === Z || V.split(k)[0] === $;
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
return {
|
|
464
464
|
found: !0,
|
|
465
465
|
missingIndex: j ?? -1,
|
|
466
|
-
foundIndex:
|
|
466
|
+
foundIndex: ne ?? -1
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
|
|
470
|
+
W--;
|
|
471
471
|
}
|
|
472
|
-
return console.warn(`Could not find ${l} in any common parent`), { found: !1, missingIndex: -1, foundIndex:
|
|
472
|
+
return console.warn(`Could not find ${l} in any common parent`), { found: !1, missingIndex: -1, foundIndex: D };
|
|
473
473
|
};
|
|
474
474
|
if (u === -1 && f === -1) {
|
|
475
|
-
const l = o.split(k)[0],
|
|
475
|
+
const l = o.split(k)[0], h = d.split(k)[0], O = On(
|
|
476
476
|
t,
|
|
477
477
|
l,
|
|
478
|
-
|
|
478
|
+
h
|
|
479
479
|
);
|
|
480
480
|
O ? (c = O.parent, u = O.sourceIndex, f = O.targetIndex) : console.warn(
|
|
481
481
|
"Abhay Could not find any common parent containing both source and target"
|
|
@@ -501,71 +501,71 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
501
501
|
);
|
|
502
502
|
l.found && (u = l.missingIndex, f = l.foundIndex);
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const N = u < f;
|
|
505
505
|
return {
|
|
506
506
|
sourceIndexInCommonParent: u,
|
|
507
507
|
targetIndexInCommonParent: f,
|
|
508
|
-
rightAddition:
|
|
508
|
+
rightAddition: N
|
|
509
509
|
};
|
|
510
510
|
}, $n = (e, n, t, r) => {
|
|
511
511
|
function i(c, u) {
|
|
512
512
|
if (!c.children)
|
|
513
513
|
return { before: null, after: null };
|
|
514
|
-
const f = c.children, C = t[u],
|
|
515
|
-
if (
|
|
514
|
+
const f = c.children, C = t[u], N = f.findIndex((G) => G.field === C);
|
|
515
|
+
if (N === -1)
|
|
516
516
|
return { before: null, after: null };
|
|
517
|
-
const l = [],
|
|
518
|
-
f.forEach((
|
|
519
|
-
K <
|
|
517
|
+
const l = [], h = [];
|
|
518
|
+
f.forEach((G, K) => {
|
|
519
|
+
K < N ? l.push(JSON.parse(JSON.stringify(G))) : K > N ? h.push(JSON.parse(JSON.stringify(G))) : u === t.length - 1 && (G.isLeaf || !G.children || G.children.length === 0 || G.children.length === 1) ? r ? l.push(JSON.parse(JSON.stringify(G))) : h.push(JSON.parse(JSON.stringify(G))) : (l.push(null), h.push(null));
|
|
520
520
|
});
|
|
521
|
-
const O = f[
|
|
521
|
+
const O = f[N];
|
|
522
522
|
if (!(u === t.length - 1) || O.children && O.children.length > 1) {
|
|
523
|
-
const { before:
|
|
523
|
+
const { before: G, after: K } = i(
|
|
524
524
|
O,
|
|
525
525
|
u + 1
|
|
526
526
|
);
|
|
527
|
-
if (
|
|
527
|
+
if (G) {
|
|
528
528
|
const j = l.indexOf(null);
|
|
529
|
-
j !== -1 && (l[j] =
|
|
529
|
+
j !== -1 && (l[j] = G);
|
|
530
530
|
}
|
|
531
531
|
if (K) {
|
|
532
|
-
const j =
|
|
533
|
-
j !== -1 && (
|
|
532
|
+
const j = h.indexOf(null);
|
|
533
|
+
j !== -1 && (h[j] = K);
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
const
|
|
537
|
-
(
|
|
538
|
-
),
|
|
539
|
-
(
|
|
540
|
-
),
|
|
536
|
+
const W = l.filter(
|
|
537
|
+
(G) => G !== null
|
|
538
|
+
), x = h.filter(
|
|
539
|
+
(G) => G !== null
|
|
540
|
+
), Q = W.length > 0 ? {
|
|
541
541
|
...JSON.parse(JSON.stringify(c)),
|
|
542
|
-
children:
|
|
543
|
-
} : null,
|
|
542
|
+
children: W
|
|
543
|
+
} : null, Y = x.length > 0 ? {
|
|
544
544
|
...JSON.parse(JSON.stringify(c)),
|
|
545
|
-
children:
|
|
545
|
+
children: x
|
|
546
546
|
} : null;
|
|
547
|
-
return { before:
|
|
547
|
+
return { before: Q, after: Y };
|
|
548
548
|
}
|
|
549
549
|
const { before: A, after: o } = i(e, 0);
|
|
550
550
|
let d = o;
|
|
551
551
|
const E = (c, u = [], f = /* @__PURE__ */ new Map()) => {
|
|
552
552
|
!c || !c.children || c.children.length === 0 || c.children.forEach((C) => {
|
|
553
|
-
const
|
|
554
|
-
f.set(
|
|
555
|
-
const
|
|
553
|
+
const N = v(C).split(k)[0], l = xe(), h = `${N}_${l}`, O = f.get(h) || 0;
|
|
554
|
+
f.set(h, O + 1);
|
|
555
|
+
const S = `${k}${l}_${O}`;
|
|
556
556
|
if (!C.originalPath && C.path && (C.originalPath = [
|
|
557
|
-
...C.path.map((
|
|
558
|
-
]), C.originalId || (C.originalId =
|
|
559
|
-
const
|
|
560
|
-
C.accessor = `${
|
|
557
|
+
...C.path.map((D) => D.split(k)[0])
|
|
558
|
+
]), C.originalId || (C.originalId = N), C.field = `${N}${S}`, C.accessor) {
|
|
559
|
+
const D = C.accessor.split(k)[0];
|
|
560
|
+
C.accessor = `${D}${S}`;
|
|
561
561
|
}
|
|
562
562
|
if (C.column_name) {
|
|
563
|
-
const
|
|
564
|
-
C.column_name = `${
|
|
563
|
+
const D = C.column_name.split(k)[0];
|
|
564
|
+
C.column_name = `${D}${S}`;
|
|
565
565
|
}
|
|
566
566
|
if (C.id) {
|
|
567
|
-
const
|
|
568
|
-
C.id = `${
|
|
567
|
+
const D = C.id.split(k)[0];
|
|
568
|
+
C.id = `${D}${S}`;
|
|
569
569
|
}
|
|
570
570
|
C.path = [...u, C.field], u.length > 0 && (C.parent_id = [u[u.length - 1]]), C.isReorderedColumn = !0, E(C, C.path, f);
|
|
571
571
|
});
|
|
@@ -578,7 +578,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
578
578
|
);
|
|
579
579
|
c.push(...(d.path || []).slice(0, f));
|
|
580
580
|
}
|
|
581
|
-
const u =
|
|
581
|
+
const u = Tn(d, {
|
|
582
582
|
path: c
|
|
583
583
|
});
|
|
584
584
|
d = {
|
|
@@ -689,7 +689,8 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
689
689
|
SET_CUSTOM_CALLBACKS: "SET_CUSTOM_CALLBACKS",
|
|
690
690
|
SET_COMMENT_CONTEXT_REF: "SET_COMMENT_CONTEXT_REF",
|
|
691
691
|
SET_CHAT_ENABLED: "SET_CHAT_ENABLED",
|
|
692
|
-
SET_COMMENT_ENABLED: "SET_COMMENT_ENABLED"
|
|
692
|
+
SET_COMMENT_ENABLED: "SET_COMMENT_ENABLED",
|
|
693
|
+
SET_NO_HEADER_SELECTION_CHECKBOX: "SET_NO_HEADER_SELECTION_CHECKBOX"
|
|
693
694
|
}, Yt = (e = "iaTable") => {
|
|
694
695
|
var n;
|
|
695
696
|
window._pageTransitionTimers ? (window._pageTransitionTimers.forEach((t) => clearTimeout(t)), window._pageTransitionTimers = []) : window._pageTransitionTimers = [], (n = window._pageTransitions) != null && n[e] || (window._pageTransitions = {
|
|
@@ -709,7 +710,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
709
710
|
"smartGridDateTimeRenderer",
|
|
710
711
|
"smartGridDateRangePickerRenderer",
|
|
711
712
|
"smartGridSplitRenderer"
|
|
712
|
-
],
|
|
713
|
+
], ve = [
|
|
713
714
|
"float",
|
|
714
715
|
"decimal",
|
|
715
716
|
"number",
|
|
@@ -723,7 +724,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
723
724
|
"greaterThan",
|
|
724
725
|
"greaterThanOrEqual",
|
|
725
726
|
"inRange"
|
|
726
|
-
], Vt = ["datetime", "DateTimeField", "date"], Zt = (e) => e ?
|
|
727
|
+
], Vt = ["datetime", "DateTimeField", "date"], Zt = (e) => e ? ve.includes(e.type) ? e.is_editable ? "float" : "numerical" : ["datetime", "daterangepicker", "date", "time"].includes(
|
|
727
728
|
e.type
|
|
728
729
|
) && e.is_editable ? "datetime" : ["list", "array", "dropdown"].includes(e.type) && e.is_editable ? "list" : e.is_editable && e.cellRenderer && e.type === "str" ? "editable-string" : "string" : "string", nt = (e) => {
|
|
729
730
|
const n = e.getAttribute("data-renderer");
|
|
@@ -869,7 +870,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
869
870
|
}
|
|
870
871
|
}, 0);
|
|
871
872
|
}, $t = (e, n, t, r, i, A, o, d, E, c, u) => {
|
|
872
|
-
var O,
|
|
873
|
+
var O, S;
|
|
873
874
|
e.stopPropagation();
|
|
874
875
|
const f = et(n);
|
|
875
876
|
if (!f) return;
|
|
@@ -877,12 +878,12 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
877
878
|
(O = window.iaTableSelectedCell) != null && O.target && window.iaTableSelectedCell.target.classList.remove(
|
|
878
879
|
"ia-table-body-cell-selected"
|
|
879
880
|
);
|
|
880
|
-
const
|
|
881
|
+
const N = e.target.closest(
|
|
881
882
|
".ia-table-body-cell"
|
|
882
883
|
);
|
|
883
|
-
if (!
|
|
884
|
-
|
|
885
|
-
const l =
|
|
884
|
+
if (!N) return;
|
|
885
|
+
N.classList.add("ia-table-body-cell-selected"), window.dispatchEvent(new CustomEvent("ia-table-clear-selection"));
|
|
886
|
+
const l = N.getAttribute("data-row"), h = {
|
|
886
887
|
rowIndex: t,
|
|
887
888
|
colIndex: r,
|
|
888
889
|
rowId: i,
|
|
@@ -890,15 +891,15 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
890
891
|
pinnedType: o,
|
|
891
892
|
frozenColumnsLength: d,
|
|
892
893
|
tableInstanceId: C,
|
|
893
|
-
tableId: ((
|
|
894
|
-
target:
|
|
894
|
+
tableId: ((S = f == null ? void 0 : f.api) == null ? void 0 : S.tableId) ?? "",
|
|
895
|
+
target: N,
|
|
895
896
|
column: E,
|
|
896
897
|
rowData: c,
|
|
897
898
|
cellValue: u,
|
|
898
899
|
rowAttr: l
|
|
899
900
|
// Add the row attribute for keyboard navigation
|
|
900
901
|
};
|
|
901
|
-
window.iaTableSelectedCell =
|
|
902
|
+
window.iaTableSelectedCell = h, C && window.iaTableState && window.iaTableState.selectedCells.set(C, h), window.iaTableState && f && (window.iaTableState.activeInstance = f), document.activeElement && document.activeElement !== document.body && document.activeElement.blur(), nt(N);
|
|
902
903
|
}, rt = (e, n) => !e || !n ? void 0 : (Array.isArray(n) ? n : n.split(".")).reduce(
|
|
903
904
|
(r, i) => r && r[i] !== void 0 ? r[i] : void 0,
|
|
904
905
|
e
|
|
@@ -965,7 +966,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
965
966
|
}, tr = (e) => {
|
|
966
967
|
const n = [], t = [];
|
|
967
968
|
return e.forEach((r) => {
|
|
968
|
-
|
|
969
|
+
ve.includes(r.type ?? "") ? n.push({
|
|
969
970
|
column: r.column ?? "",
|
|
970
971
|
min_val: r.min_val ?? 0,
|
|
971
972
|
max_val: r.max_val ?? 0,
|
|
@@ -982,18 +983,18 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
982
983
|
}, ot = (e, n) => {
|
|
983
984
|
if (!(e != null && e.filterParams)) return null;
|
|
984
985
|
const { filterParams: t } = e;
|
|
985
|
-
return n === "text" || n === "str" ? (t.textCustomComparator || t.comparator) ?? null :
|
|
986
|
+
return n === "text" || n === "str" ? (t.textCustomComparator || t.comparator) ?? null : ve.includes(n || "") ? (t.numberCustomComparator || t.comparator) ?? null : n === "date" ? (t.dateCustomComparator || t.comparator) ?? null : t.comparator ?? null;
|
|
986
987
|
}, lt = (e, n, t, r, i) => e ? i === "text" || i === "str" ? e(
|
|
987
988
|
n,
|
|
988
989
|
t,
|
|
989
990
|
typeof r == "string" ? r : void 0
|
|
990
991
|
) : e(r, t) : null, st = (e, n, t) => !e || e.length === 0 || Object.keys(n).length === 0 ? e : e.filter((r) => Object.entries(n).every(([i, A]) => !A || !A.length ? !0 : A.every((o) => {
|
|
991
|
-
const d = o.column || o.field || i, E = o.search_type || o.operator || "", c = t[d], u = c == null ? void 0 : c.type, f =
|
|
992
|
+
const d = o.column || o.field || i, E = o.search_type || o.operator || "", c = t[d], u = c == null ? void 0 : c.type, f = ve.includes(u || "");
|
|
992
993
|
let C = o.pattern || o.value || "";
|
|
993
|
-
const
|
|
994
|
-
if (
|
|
994
|
+
const N = ot(c, u);
|
|
995
|
+
if (N && c)
|
|
995
996
|
return lt(
|
|
996
|
-
|
|
997
|
+
N,
|
|
997
998
|
E,
|
|
998
999
|
r[d],
|
|
999
1000
|
f ? { min_val: o.min_val, max_val: o.max_val } : C,
|
|
@@ -1002,39 +1003,39 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1002
1003
|
const l = r[d];
|
|
1003
1004
|
if (l == null || l === "")
|
|
1004
1005
|
return !1;
|
|
1005
|
-
if (
|
|
1006
|
-
const
|
|
1006
|
+
if (ve.includes(u || "")) {
|
|
1007
|
+
const h = parseFloat(l);
|
|
1007
1008
|
switch (E) {
|
|
1008
1009
|
case "equals":
|
|
1009
|
-
return C = o.max_val ?? 0,
|
|
1010
|
+
return C = o.max_val ?? 0, h === parseFloat(String(C));
|
|
1010
1011
|
case "lessThan":
|
|
1011
|
-
return C = o.max_val ?? 0,
|
|
1012
|
+
return C = o.max_val ?? 0, h < parseFloat(String(C));
|
|
1012
1013
|
case "lessThanOrEqual":
|
|
1013
|
-
return C = o.max_val ?? 0,
|
|
1014
|
+
return C = o.max_val ?? 0, h <= parseFloat(String(C));
|
|
1014
1015
|
case "greaterThan":
|
|
1015
|
-
return C = o.min_val ?? 0,
|
|
1016
|
+
return C = o.min_val ?? 0, h > parseFloat(String(C));
|
|
1016
1017
|
case "greaterThanOrEqual":
|
|
1017
|
-
return C = o.min_val ?? 0,
|
|
1018
|
+
return C = o.min_val ?? 0, h >= parseFloat(String(C));
|
|
1018
1019
|
case "inRange": {
|
|
1019
|
-
const O = o.min_val,
|
|
1020
|
-
return O !== void 0 &&
|
|
1020
|
+
const O = o.min_val, S = o.max_val;
|
|
1021
|
+
return O !== void 0 && S !== void 0 ? h >= parseFloat(String(O)) && h <= parseFloat(String(S)) : !0;
|
|
1021
1022
|
}
|
|
1022
1023
|
default:
|
|
1023
1024
|
return !0;
|
|
1024
1025
|
}
|
|
1025
1026
|
} else {
|
|
1026
|
-
const
|
|
1027
|
+
const h = String(l).toLowerCase(), O = String(C || "").toLowerCase(), S = O.includes(",") ? O.split(",").map((D) => D.trim()).filter(Boolean) : [O];
|
|
1027
1028
|
switch (E) {
|
|
1028
1029
|
case "contains":
|
|
1029
|
-
return
|
|
1030
|
+
return S.some((D) => h.includes(D));
|
|
1030
1031
|
case "equals":
|
|
1031
|
-
return
|
|
1032
|
+
return S.some((D) => h === D);
|
|
1032
1033
|
case "notEqual":
|
|
1033
|
-
return
|
|
1034
|
+
return S.every((D) => h !== D);
|
|
1034
1035
|
case "startsWith":
|
|
1035
|
-
return
|
|
1036
|
+
return S.some((D) => h.startsWith(D));
|
|
1036
1037
|
case "endsWith":
|
|
1037
|
-
return
|
|
1038
|
+
return S.some((D) => h.endsWith(D));
|
|
1038
1039
|
default:
|
|
1039
1040
|
return !0;
|
|
1040
1041
|
}
|
|
@@ -1059,30 +1060,30 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1059
1060
|
}, we = (e, n = { minWidth: 150 }) => {
|
|
1060
1061
|
const t = {}, r = {};
|
|
1061
1062
|
e.forEach((l) => {
|
|
1062
|
-
const
|
|
1063
|
-
l.children && Array.isArray(l.children) && (r[
|
|
1064
|
-
const
|
|
1065
|
-
t[
|
|
1063
|
+
const h = v(l);
|
|
1064
|
+
l.children && Array.isArray(l.children) && (r[h] = [], l.children.forEach((O) => {
|
|
1065
|
+
const S = v(O);
|
|
1066
|
+
t[S] = h, r[h] ? r[h].push(S) : r[h] = [S];
|
|
1066
1067
|
}));
|
|
1067
1068
|
});
|
|
1068
1069
|
const i = e.map((l) => {
|
|
1069
1070
|
var Z, $;
|
|
1070
|
-
const
|
|
1071
|
-
let
|
|
1072
|
-
const
|
|
1073
|
-
let
|
|
1074
|
-
for (; t[
|
|
1075
|
-
const
|
|
1076
|
-
|
|
1071
|
+
const h = l.width !== void 0, O = l.field || v(l);
|
|
1072
|
+
let S = l.is_frozen || !1, D = l.pinned === "right";
|
|
1073
|
+
const W = [];
|
|
1074
|
+
let x = O;
|
|
1075
|
+
for (; t[x]; ) {
|
|
1076
|
+
const ne = t[x];
|
|
1077
|
+
W.push(ne), x = ne;
|
|
1077
1078
|
}
|
|
1078
|
-
const
|
|
1079
|
-
let
|
|
1080
|
-
|
|
1081
|
-
const q = v(
|
|
1082
|
-
(
|
|
1079
|
+
const Q = l.children && l.children.length > 0;
|
|
1080
|
+
let Y = !1, G = !1;
|
|
1081
|
+
Q && (($ = (Z = l.children) == null ? void 0 : Z.forEach) == null || $.call(Z, (ne) => {
|
|
1082
|
+
const q = v(ne), V = e.find(
|
|
1083
|
+
(te) => v(te) === q
|
|
1083
1084
|
);
|
|
1084
|
-
|
|
1085
|
-
}),
|
|
1085
|
+
V && (V.is_frozen && (Y = !0), V.pinned === "right" && (G = !0));
|
|
1086
|
+
}), Y && (S = !0), G && (D = !0));
|
|
1086
1087
|
const K = (n == null ? void 0 : n.minWidth) || 150, j = l.width ? Math.max(l.width, K) : K;
|
|
1087
1088
|
return {
|
|
1088
1089
|
...l,
|
|
@@ -1092,46 +1093,46 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1092
1093
|
width: j,
|
|
1093
1094
|
originalWidth: l.width || K,
|
|
1094
1095
|
// Store original width
|
|
1095
|
-
isAutoWidth: !
|
|
1096
|
+
isAutoWidth: !h,
|
|
1096
1097
|
// Mark columns without explicit width as auto-width
|
|
1097
1098
|
filterable: l.is_searchable !== !1 || l.isSearchable !== !1,
|
|
1098
1099
|
isSortable: l.isSortable !== !1,
|
|
1099
1100
|
resizable: l.resizable !== !1,
|
|
1100
1101
|
hidden: Ke(l),
|
|
1101
1102
|
align: l.align || "left",
|
|
1102
|
-
is_frozen:
|
|
1103
|
+
is_frozen: S,
|
|
1103
1104
|
// Ensure left-pinned property is set
|
|
1104
|
-
pinned:
|
|
1105
|
+
pinned: D ? "right" : l.pinned,
|
|
1105
1106
|
// Ensure right-pinned property is set
|
|
1106
1107
|
originalIndex: e.indexOf(l),
|
|
1107
1108
|
// Store original index
|
|
1108
|
-
parentColumns:
|
|
1109
|
+
parentColumns: W,
|
|
1109
1110
|
// Store the ancestry chain
|
|
1110
1111
|
// Add placeholder flag if this is a child with no explicit parent
|
|
1111
|
-
isChildWithoutParent:
|
|
1112
|
+
isChildWithoutParent: W.length === 0 && t[O] === void 0,
|
|
1112
1113
|
// Store if this is a parent with children
|
|
1113
|
-
hasChildren:
|
|
1114
|
+
hasChildren: Q,
|
|
1114
1115
|
// Store whether any children are frozen or right-pinned
|
|
1115
|
-
hasAnyFrozenChildren:
|
|
1116
|
-
hasAnyRightPinnedChildren:
|
|
1116
|
+
hasAnyFrozenChildren: Y,
|
|
1117
|
+
hasAnyRightPinnedChildren: G
|
|
1117
1118
|
};
|
|
1118
1119
|
});
|
|
1119
1120
|
i.forEach((l) => {
|
|
1120
|
-
l.is_frozen && l.parentColumns.forEach((
|
|
1121
|
+
l.is_frozen && l.parentColumns.forEach((h) => {
|
|
1121
1122
|
const O = i.find(
|
|
1122
|
-
(
|
|
1123
|
+
(S) => v(S) === h
|
|
1123
1124
|
);
|
|
1124
1125
|
O && (O.is_frozen = !0);
|
|
1125
|
-
}), l.pinned === "right" && l.parentColumns.forEach((
|
|
1126
|
+
}), l.pinned === "right" && l.parentColumns.forEach((h) => {
|
|
1126
1127
|
const O = i.find(
|
|
1127
|
-
(
|
|
1128
|
+
(S) => v(S) === h
|
|
1128
1129
|
);
|
|
1129
1130
|
O && (O.pinned = "right", O.is_frozen = !1);
|
|
1130
1131
|
});
|
|
1131
1132
|
});
|
|
1132
1133
|
const A = [
|
|
1133
1134
|
...i
|
|
1134
|
-
].sort((l,
|
|
1135
|
+
].sort((l, h) => l.is_frozen && !h.is_frozen ? -1 : !l.is_frozen && h.is_frozen || l.pinned === "right" && h.pinned !== "right" ? 1 : l.pinned !== "right" && h.pinned === "right" ? -1 : l.originalIndex - h.originalIndex), o = {
|
|
1135
1136
|
indexes: [],
|
|
1136
1137
|
positions: {},
|
|
1137
1138
|
totalWidth: 0,
|
|
@@ -1150,35 +1151,35 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1150
1151
|
(l) => l.pinned === "right" && !l.hidden
|
|
1151
1152
|
);
|
|
1152
1153
|
let u = 0;
|
|
1153
|
-
function f(l,
|
|
1154
|
-
var
|
|
1155
|
-
const O = v(l),
|
|
1156
|
-
o.indexes.push(O), o.positions[O] =
|
|
1157
|
-
let
|
|
1158
|
-
if (l && l.children && ((
|
|
1159
|
-
let
|
|
1160
|
-
(
|
|
1161
|
-
if (Ke(
|
|
1154
|
+
function f(l, h) {
|
|
1155
|
+
var W, x, Q;
|
|
1156
|
+
const O = v(l), S = h;
|
|
1157
|
+
o.indexes.push(O), o.positions[O] = S;
|
|
1158
|
+
let D;
|
|
1159
|
+
if (l && l.children && ((W = l.children) == null ? void 0 : W.length) > 0) {
|
|
1160
|
+
let Y = 0;
|
|
1161
|
+
(Q = (x = l.children) == null ? void 0 : x.forEach) == null || Q.call(x, (G) => {
|
|
1162
|
+
if (Ke(G))
|
|
1162
1163
|
return;
|
|
1163
|
-
const K =
|
|
1164
|
-
|
|
1165
|
-
}),
|
|
1164
|
+
const K = S + Y, j = f(G, K);
|
|
1165
|
+
Y += j;
|
|
1166
|
+
}), D = Y;
|
|
1166
1167
|
} else {
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1168
|
+
const Y = n.minWidth || 150;
|
|
1169
|
+
D = l.width && l.width < Y ? Y : l.width || Y;
|
|
1169
1170
|
}
|
|
1170
|
-
return
|
|
1171
|
+
return D;
|
|
1171
1172
|
}
|
|
1172
1173
|
E.forEach((l) => {
|
|
1173
1174
|
if (Ke(l))
|
|
1174
1175
|
return;
|
|
1175
|
-
const
|
|
1176
|
-
u +=
|
|
1176
|
+
const h = f(l, u);
|
|
1177
|
+
u += h;
|
|
1177
1178
|
}), o.totalWidth = u;
|
|
1178
1179
|
let C = 0;
|
|
1179
1180
|
return [...c].reverse().forEach((l) => {
|
|
1180
|
-
const
|
|
1181
|
-
d.indexes.push(
|
|
1181
|
+
const h = v(l);
|
|
1182
|
+
d.indexes.push(h), d.positions[h] = C, C += l.width || n.minWidth;
|
|
1182
1183
|
}), d.totalWidth = C, d.rightIndexes = c.map(
|
|
1183
1184
|
(l) => v(l)
|
|
1184
1185
|
), o.rightPinned = {
|
|
@@ -1243,22 +1244,22 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1243
1244
|
state: r,
|
|
1244
1245
|
column: i
|
|
1245
1246
|
}) => {
|
|
1246
|
-
var
|
|
1247
|
+
var x, Q;
|
|
1247
1248
|
const { preventIfExceedsMaxWidth: A = !0 } = t, { newHierarchy: o, updatedColumns: d } = gt(
|
|
1248
1249
|
r.columns,
|
|
1249
1250
|
i,
|
|
1250
1251
|
n,
|
|
1251
1252
|
e
|
|
1252
|
-
), E = window.innerWidth * 0.6, c = r.frozenColumns.totalWidth - (((
|
|
1253
|
-
let
|
|
1254
|
-
return
|
|
1253
|
+
), E = window.innerWidth * 0.6, c = r.frozenColumns.totalWidth - (((x = r.frozenColumns.rightPinned) == null ? void 0 : x.totalWidth) || 0), u = (Y) => {
|
|
1254
|
+
let G = Y.width || 150;
|
|
1255
|
+
return Y.children && Y.children.length > 0 && (G = Y.children.reduce(
|
|
1255
1256
|
(K, j) => K + u(j),
|
|
1256
1257
|
0
|
|
1257
|
-
)),
|
|
1258
|
+
)), G;
|
|
1258
1259
|
}, f = u(
|
|
1259
1260
|
o || i
|
|
1260
|
-
),
|
|
1261
|
-
if (n &&
|
|
1261
|
+
), N = c + f > E;
|
|
1262
|
+
if (n && N && A)
|
|
1262
1263
|
return {
|
|
1263
1264
|
...r,
|
|
1264
1265
|
notification: {
|
|
@@ -1269,130 +1270,130 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1269
1270
|
}
|
|
1270
1271
|
};
|
|
1271
1272
|
let l = -1;
|
|
1272
|
-
o && (l = d.findIndex((
|
|
1273
|
-
const
|
|
1274
|
-
return
|
|
1273
|
+
o && (l = d.findIndex((Y) => {
|
|
1274
|
+
const G = o.is_frozen, K = o.pinned, j = o.originalPath || o.path || [], Z = Y.originalPath || Y.path || [];
|
|
1275
|
+
return Y.is_frozen === G && Y.pinned === K && Z[0] === j[0];
|
|
1275
1276
|
}));
|
|
1276
|
-
const
|
|
1277
|
-
o && l !== -1 ?
|
|
1278
|
-
const O = nn(
|
|
1277
|
+
const h = [...d];
|
|
1278
|
+
o && l !== -1 ? h.splice(l, 0, o) : o && h.push(o);
|
|
1279
|
+
const O = nn(h), { processedColumns: S } = Oe(
|
|
1279
1280
|
O,
|
|
1280
1281
|
r.expandedColumnGroups,
|
|
1281
1282
|
0,
|
|
1282
1283
|
null,
|
|
1283
|
-
((
|
|
1284
|
-
), { columns:
|
|
1285
|
-
|
|
1284
|
+
((Q = r.defaultColDef) == null ? void 0 : Q.minWidth) || 150
|
|
1285
|
+
), { columns: D, frozenData: W } = we(
|
|
1286
|
+
S,
|
|
1286
1287
|
r.defaultColDef || { minWidth: 150 }
|
|
1287
1288
|
);
|
|
1288
1289
|
return {
|
|
1289
1290
|
...r,
|
|
1290
|
-
columns:
|
|
1291
|
-
frozenColumns:
|
|
1291
|
+
columns: D,
|
|
1292
|
+
frozenColumns: W
|
|
1292
1293
|
};
|
|
1293
1294
|
}, gt = (e, n, t, r) => {
|
|
1294
|
-
var
|
|
1295
|
-
const i = ((
|
|
1295
|
+
var N, l, h, O, S;
|
|
1296
|
+
const i = ((N = n.path) == null ? void 0 : N.slice(0, -1)) || [], A = bn(e), o = ((h = (l = n.path) == null ? void 0 : l.slice(0, -1)) == null ? void 0 : h.join("/")) || "", d = A[(o == null ? void 0 : o.toLowerCase()) || ""], E = ((O = d == null ? void 0 : d.children) == null ? void 0 : O.length) || 0;
|
|
1296
1297
|
let c = null;
|
|
1297
1298
|
if (i.length === 0)
|
|
1298
1299
|
return {
|
|
1299
1300
|
newHierarchy: null,
|
|
1300
|
-
updatedColumns: e.map((
|
|
1301
|
-
...
|
|
1301
|
+
updatedColumns: e.map((W) => v(W) === r ? {
|
|
1302
|
+
...W,
|
|
1302
1303
|
is_frozen: t,
|
|
1303
1304
|
pinned: t ? "left" : null
|
|
1304
|
-
} :
|
|
1305
|
+
} : W)
|
|
1305
1306
|
};
|
|
1306
1307
|
{
|
|
1307
|
-
let
|
|
1308
|
-
for (let
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1311
|
-
const K = A[
|
|
1308
|
+
let D = null, W = null, x = "", Q = [];
|
|
1309
|
+
for (let Y = 0; Y < i.length; Y++) {
|
|
1310
|
+
const G = i[Y];
|
|
1311
|
+
x = x ? `${x}/${G}` : G;
|
|
1312
|
+
const K = A[x.toLowerCase()];
|
|
1312
1313
|
if (!K)
|
|
1313
1314
|
continue;
|
|
1314
1315
|
const j = {
|
|
1315
1316
|
...K,
|
|
1316
|
-
...t || E > 1 ?
|
|
1317
|
+
...t || E > 1 ? Tn(K, { path: Q }) : K,
|
|
1317
1318
|
is_frozen: t,
|
|
1318
1319
|
pinned: t ? "left" : null,
|
|
1319
1320
|
children: []
|
|
1320
1321
|
// Clear children as we'll rebuild the hierarchy
|
|
1321
1322
|
};
|
|
1322
|
-
|
|
1323
|
+
Q = j.path || [], Y === 0 && (W = j), D && (D.children = [j]), D = j;
|
|
1323
1324
|
}
|
|
1324
|
-
if (
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1325
|
+
if (D) {
|
|
1326
|
+
const Y = D.originalPath || (D.path ? D.path.map((Z) => Z.split(k)[0]) : []), G = v(n), K = G.split(k)[0], j = [...Y, K];
|
|
1327
|
+
D.children = [
|
|
1327
1328
|
{
|
|
1328
1329
|
...n,
|
|
1329
1330
|
is_frozen: t,
|
|
1330
1331
|
pinned: t ? "left" : null,
|
|
1331
1332
|
originalPath: j,
|
|
1332
|
-
path: [...
|
|
1333
|
+
path: [...D.path || [], G]
|
|
1333
1334
|
}
|
|
1334
1335
|
];
|
|
1335
1336
|
}
|
|
1336
|
-
c =
|
|
1337
|
+
c = W;
|
|
1337
1338
|
}
|
|
1338
|
-
const u = (
|
|
1339
|
-
let
|
|
1340
|
-
const
|
|
1341
|
-
if (
|
|
1342
|
-
return
|
|
1343
|
-
(j) => v(j) !==
|
|
1339
|
+
const u = (D, W) => {
|
|
1340
|
+
let x = JSON.parse(JSON.stringify(D));
|
|
1341
|
+
const Q = n.path || [];
|
|
1342
|
+
if (Q.length === 0)
|
|
1343
|
+
return x.filter(
|
|
1344
|
+
(j) => v(j) !== W
|
|
1344
1345
|
);
|
|
1345
|
-
const
|
|
1346
|
-
let $ = j,
|
|
1347
|
-
for (let
|
|
1348
|
-
const
|
|
1349
|
-
(se) => v(se) ===
|
|
1346
|
+
const Y = (j, Z) => {
|
|
1347
|
+
let $ = j, ne = null, q = -1;
|
|
1348
|
+
for (let V = 0; V < Z.length - 1; V++) {
|
|
1349
|
+
const te = Z[V], le = $.findIndex(
|
|
1350
|
+
(se) => v(se) === te
|
|
1350
1351
|
);
|
|
1351
1352
|
if (le === -1)
|
|
1352
|
-
return console.warn(`Could not find column with field ${
|
|
1353
|
-
|
|
1353
|
+
return console.warn(`Could not find column with field ${te} in path`), { parent: null, targetIndex: -1 };
|
|
1354
|
+
ne = $[le], $ = ne.children || [];
|
|
1354
1355
|
}
|
|
1355
1356
|
if (Z.length > 0) {
|
|
1356
|
-
const
|
|
1357
|
+
const V = Z[Z.length - 1];
|
|
1357
1358
|
q = $.findIndex(
|
|
1358
|
-
(
|
|
1359
|
+
(te) => v(te) === V
|
|
1359
1360
|
);
|
|
1360
1361
|
}
|
|
1361
|
-
return { parent:
|
|
1362
|
-
}, { parent:
|
|
1363
|
-
if (
|
|
1364
|
-
const j =
|
|
1362
|
+
return { parent: ne, targetIndex: q };
|
|
1363
|
+
}, { parent: G, targetIndex: K } = Y(x, Q);
|
|
1364
|
+
if (G && G.children && K !== -1) {
|
|
1365
|
+
const j = G.children[K];
|
|
1365
1366
|
if (j && v(j) === r)
|
|
1366
|
-
|
|
1367
|
+
G.children.splice(K, 1);
|
|
1367
1368
|
else {
|
|
1368
|
-
const Z =
|
|
1369
|
+
const Z = G.children.findIndex(
|
|
1369
1370
|
($) => v($) === r
|
|
1370
1371
|
);
|
|
1371
|
-
Z !== -1 &&
|
|
1372
|
+
Z !== -1 && G.children.splice(Z, 1);
|
|
1372
1373
|
}
|
|
1373
|
-
if (
|
|
1374
|
-
const Z =
|
|
1375
|
-
(q) => v(q) === (
|
|
1376
|
-
), $ = (q,
|
|
1377
|
-
if (
|
|
1378
|
-
const le = q[
|
|
1374
|
+
if (G.children.length === 0) {
|
|
1375
|
+
const Z = x.findIndex(
|
|
1376
|
+
(q) => v(q) === (G.path || [])[0]
|
|
1377
|
+
), $ = (q, V, te) => {
|
|
1378
|
+
if (te === -1 || !q[te]) return q;
|
|
1379
|
+
const le = q[te], se = V || le;
|
|
1379
1380
|
if (v(se) === v(le)) {
|
|
1380
1381
|
if (se.children && se.children.length > 0)
|
|
1381
1382
|
return q;
|
|
1382
|
-
q.splice(
|
|
1383
|
+
q.splice(te, 1);
|
|
1383
1384
|
} else {
|
|
1384
1385
|
const ge = (ie, de, oe = null) => {
|
|
1385
1386
|
if (!ie.children || ie.children.length === 0)
|
|
1386
1387
|
return !1;
|
|
1387
1388
|
const Ce = ie.children.findIndex(
|
|
1388
|
-
(
|
|
1389
|
+
(z) => v(z) === v(de)
|
|
1389
1390
|
);
|
|
1390
1391
|
if (Ce !== -1) {
|
|
1391
|
-
const
|
|
1392
|
-
if (!
|
|
1392
|
+
const z = ie.children[Ce];
|
|
1393
|
+
if (!z.children || z.children.length === 0) {
|
|
1393
1394
|
if (ie.children.splice(Ce, 1), ie.children.length === 0 && (oe != null && oe.children)) {
|
|
1394
|
-
const
|
|
1395
|
-
(g) => v(g) ===
|
|
1395
|
+
const _ = v(ie), s = oe.children.findIndex(
|
|
1396
|
+
(g) => v(g) === _
|
|
1396
1397
|
);
|
|
1397
1398
|
s !== -1 && oe.children.splice(s, 1);
|
|
1398
1399
|
}
|
|
@@ -1400,11 +1401,11 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1400
1401
|
}
|
|
1401
1402
|
return !1;
|
|
1402
1403
|
}
|
|
1403
|
-
for (const
|
|
1404
|
-
if (ge(
|
|
1404
|
+
for (const z of ie.children)
|
|
1405
|
+
if (ge(z, de, ie)) {
|
|
1405
1406
|
if (ie.children.length === 0 && (oe != null && oe.children)) {
|
|
1406
|
-
const
|
|
1407
|
-
(g) => v(g) ===
|
|
1407
|
+
const _ = v(ie), s = oe.children.findIndex(
|
|
1408
|
+
(g) => v(g) === _
|
|
1408
1409
|
);
|
|
1409
1410
|
s !== -1 && oe.children.splice(s, 1);
|
|
1410
1411
|
}
|
|
@@ -1419,25 +1420,25 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1419
1420
|
) || console.warn(
|
|
1420
1421
|
"Could not find nested parent to remove:",
|
|
1421
1422
|
v(se)
|
|
1422
|
-
), (!le.children || le.children.length === 0) && q.splice(
|
|
1423
|
+
), (!le.children || le.children.length === 0) && q.splice(te, 1);
|
|
1423
1424
|
}
|
|
1424
1425
|
if (se.path && se.path.length > 1) {
|
|
1425
1426
|
const ge = se.path.slice(0, -1), ie = ((de, oe) => {
|
|
1426
1427
|
if (oe.length === 0) return -1;
|
|
1427
1428
|
if (oe.length === 1)
|
|
1428
1429
|
return de.findIndex(
|
|
1429
|
-
(
|
|
1430
|
+
(_) => v(_) === oe[0]
|
|
1430
1431
|
);
|
|
1431
|
-
let Ce = de,
|
|
1432
|
-
for (let
|
|
1433
|
-
const s = oe[
|
|
1434
|
-
if (
|
|
1432
|
+
let Ce = de, z = -1;
|
|
1433
|
+
for (let _ = 0; _ < oe.length - 1; _++) {
|
|
1434
|
+
const s = oe[_];
|
|
1435
|
+
if (z = Ce.findIndex(
|
|
1435
1436
|
(g) => v(g) === s
|
|
1436
|
-
),
|
|
1437
|
-
Ce = Ce[
|
|
1437
|
+
), z === -1) return -1;
|
|
1438
|
+
Ce = Ce[z].children || [];
|
|
1438
1439
|
}
|
|
1439
1440
|
return Ce.findIndex(
|
|
1440
|
-
(
|
|
1441
|
+
(_) => v(_) === oe[oe.length - 1]
|
|
1441
1442
|
);
|
|
1442
1443
|
})(q, ge);
|
|
1443
1444
|
if (ie !== -1) {
|
|
@@ -1452,26 +1453,26 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1452
1453
|
}
|
|
1453
1454
|
return q;
|
|
1454
1455
|
};
|
|
1455
|
-
|
|
1456
|
-
N,
|
|
1456
|
+
x = $(
|
|
1457
1457
|
x,
|
|
1458
|
+
G,
|
|
1458
1459
|
Z
|
|
1459
1460
|
);
|
|
1460
|
-
const
|
|
1461
|
+
const ne = (q) => {
|
|
1461
1462
|
if (!q) return null;
|
|
1462
1463
|
if (Array.isArray(q))
|
|
1463
1464
|
return q.map(
|
|
1464
|
-
(
|
|
1465
|
+
(te) => ne(te)
|
|
1465
1466
|
);
|
|
1466
|
-
const
|
|
1467
|
+
const V = {
|
|
1467
1468
|
...q
|
|
1468
1469
|
// ...removeUniqueHierarchyFieldName(column),
|
|
1469
1470
|
};
|
|
1470
|
-
return q.children && q.children.length > 0 && (
|
|
1471
|
-
(
|
|
1472
|
-
)),
|
|
1471
|
+
return q.children && q.children.length > 0 && (V.children = q.children.map(
|
|
1472
|
+
(te) => ne(te)
|
|
1473
|
+
)), V;
|
|
1473
1474
|
};
|
|
1474
|
-
c =
|
|
1475
|
+
c = ne(
|
|
1475
1476
|
c
|
|
1476
1477
|
);
|
|
1477
1478
|
}
|
|
@@ -1479,24 +1480,24 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1479
1480
|
console.warn(
|
|
1480
1481
|
`Could not find parent column or target index for ${r}`
|
|
1481
1482
|
);
|
|
1482
|
-
return
|
|
1483
|
+
return x;
|
|
1483
1484
|
};
|
|
1484
1485
|
let f = e;
|
|
1485
|
-
if (t || (((
|
|
1486
|
+
if (t || (((S = n.path) == null ? void 0 : S.length) || 0) > 1)
|
|
1486
1487
|
f = u(
|
|
1487
1488
|
e,
|
|
1488
1489
|
r
|
|
1489
1490
|
);
|
|
1490
1491
|
else {
|
|
1491
|
-
const
|
|
1492
|
-
(
|
|
1492
|
+
const D = e.findIndex(
|
|
1493
|
+
(x) => v(x) === (n.path || [])[0]
|
|
1493
1494
|
);
|
|
1494
|
-
|
|
1495
|
-
const
|
|
1496
|
-
(
|
|
1497
|
-
) :
|
|
1498
|
-
|
|
1499
|
-
|
|
1495
|
+
D !== -1 && f.splice(D, 1);
|
|
1496
|
+
const W = n.originalPath ? e.findIndex(
|
|
1497
|
+
(x) => v(x) === (n.originalPath || [])[0]
|
|
1498
|
+
) : D;
|
|
1499
|
+
W && c && f.splice(
|
|
1500
|
+
W,
|
|
1500
1501
|
0,
|
|
1501
1502
|
c
|
|
1502
1503
|
), c = null;
|
|
@@ -1527,15 +1528,15 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1527
1528
|
});
|
|
1528
1529
|
}
|
|
1529
1530
|
return r;
|
|
1530
|
-
},
|
|
1531
|
-
var o, d, E, c, u, f, C,
|
|
1531
|
+
}, me = (e, n, t = !0, r, i) => {
|
|
1532
|
+
var o, d, E, c, u, f, C, N, l;
|
|
1532
1533
|
const A = (d = (o = e.api) == null ? void 0 : o.getInfiniteCacheInstance) == null ? void 0 : d.call(o);
|
|
1533
1534
|
(E = A == null ? void 0 : A.updatePageData) == null || E.call(A, e.pagination.page, n, !0, {
|
|
1534
1535
|
isRefreshData: !1
|
|
1535
|
-
}), !e.serverSide && t && ((l = (
|
|
1536
|
-
|
|
1536
|
+
}), !e.serverSide && t && ((l = (N = (C = (f = (u = (c = e.api) == null ? void 0 : c.getInfiniteCache) == null ? void 0 : u.call(c)) == null ? void 0 : f.params) == null ? void 0 : C.datasource) == null ? void 0 : N.updateData) == null || l.call(
|
|
1537
|
+
N,
|
|
1537
1538
|
e,
|
|
1538
|
-
n.filter((
|
|
1539
|
+
n.filter((h) => !(h.__parentPath || h.isChildGroup)),
|
|
1539
1540
|
r,
|
|
1540
1541
|
i
|
|
1541
1542
|
));
|
|
@@ -1575,11 +1576,11 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1575
1576
|
if (Array.isArray(n.payload)) {
|
|
1576
1577
|
if (Array.isArray(n.payload) && (f = n.payload, o && f && f.length > 0)) {
|
|
1577
1578
|
const C = new Set(f.map(String));
|
|
1578
|
-
for (let
|
|
1579
|
-
const l = o[
|
|
1579
|
+
for (let N = 0; N < o.length; N++) {
|
|
1580
|
+
const l = o[N];
|
|
1580
1581
|
if (!l) continue;
|
|
1581
|
-
const
|
|
1582
|
-
if (
|
|
1582
|
+
const h = l[e.uniqueIdField] || l.id;
|
|
1583
|
+
if (h !== void 0 && C.has(String(h)) && (A.push(l), A.length === f.length))
|
|
1583
1584
|
break;
|
|
1584
1585
|
}
|
|
1585
1586
|
}
|
|
@@ -1718,10 +1719,10 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1718
1719
|
groupingLevel: r
|
|
1719
1720
|
}, d = e.columns.filter((f) => f.aggFunc);
|
|
1720
1721
|
for (let f = 0; f < e.columns.length; f++) {
|
|
1721
|
-
const C = e.columns[f],
|
|
1722
|
-
if ((E = C == null ? void 0 : C.extra) != null && E.is_grouping_key && (t != null && t[
|
|
1723
|
-
const l = (c = C == null ? void 0 : C.originalFields) != null && c[r] ? C.originalFields[r] :
|
|
1724
|
-
o[l] = t != null && t[
|
|
1722
|
+
const C = e.columns[f], N = v(C);
|
|
1723
|
+
if ((E = C == null ? void 0 : C.extra) != null && E.is_grouping_key && (t != null && t[N]) || C.rowGroup && !C.is_hidden) {
|
|
1724
|
+
const l = (c = C == null ? void 0 : C.originalFields) != null && c[r] ? C.originalFields[r] : N, h = (u = C == null ? void 0 : C.originalFields) != null && u[r - 1] ? C.originalFields[r - 1] : N;
|
|
1725
|
+
o[l] = t != null && t[h] ? `Total ${(t == null ? void 0 : t[h]) || ""}` : "Total", t != null && t[h] ? (o.grandTotalAggreRow = !1, o.subTotalAggreRow = !0) : (o.isGrandTotalRow = !0, o.grandTotalAggreRow = !0, o.subTotalAggreRow = !1);
|
|
1725
1726
|
break;
|
|
1726
1727
|
}
|
|
1727
1728
|
}
|
|
@@ -1731,13 +1732,13 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1731
1732
|
t,
|
|
1732
1733
|
f,
|
|
1733
1734
|
e.childKeyField
|
|
1734
|
-
),
|
|
1735
|
-
o[
|
|
1736
|
-
const
|
|
1735
|
+
), N = v(f);
|
|
1736
|
+
o[N] = C, n && n.length && (n = n.map((l) => {
|
|
1737
|
+
const h = fn(
|
|
1737
1738
|
l,
|
|
1738
1739
|
f,
|
|
1739
1740
|
e.childKeyField
|
|
1740
|
-
), O = l == null ? void 0 : l[e.childKeyField],
|
|
1741
|
+
), O = l == null ? void 0 : l[e.childKeyField], S = Array.isArray(O) && O.length > 0;
|
|
1741
1742
|
return {
|
|
1742
1743
|
...l,
|
|
1743
1744
|
__parentPath: l.__parentPath ? `${l.__parentPath}${String(l.__parentPath).includes(String(A)) ? "" : `/${A}`}` : String(A),
|
|
@@ -1745,9 +1746,9 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1745
1746
|
parentRowIndex: i,
|
|
1746
1747
|
parentRowData: t,
|
|
1747
1748
|
groupingLevel: r,
|
|
1748
|
-
[
|
|
1749
|
-
__isAggregationRow: !!
|
|
1750
|
-
subTotalAggreRow: !!
|
|
1749
|
+
[N]: h,
|
|
1750
|
+
__isAggregationRow: !!S,
|
|
1751
|
+
subTotalAggreRow: !!S
|
|
1751
1752
|
};
|
|
1752
1753
|
}));
|
|
1753
1754
|
}
|
|
@@ -1760,20 +1761,20 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1760
1761
|
const o = t.parentRowIndex || r, d = e.columns.some((C) => C.aggFunc), E = ((u = t.__parentPath) == null ? void 0 : u.split("/").length) || 0;
|
|
1761
1762
|
let c = null;
|
|
1762
1763
|
if (d && E) {
|
|
1763
|
-
const C = n[o],
|
|
1764
|
+
const C = n[o], N = C[A], l = C[e.childKeyField], h = Object.keys(
|
|
1764
1765
|
e.expandedChildRows
|
|
1765
|
-
).reduce((
|
|
1766
|
-
let
|
|
1766
|
+
).reduce((Q, Y) => (Y.startsWith(String(N)) && (Q += e.expandedChildRows[Y].childRowsCount), Q), 0), O = !!C.__parentPath;
|
|
1767
|
+
let S;
|
|
1767
1768
|
if (O) {
|
|
1768
|
-
|
|
1769
|
-
let
|
|
1770
|
-
Object.keys(e.expandedChildRows).forEach((
|
|
1771
|
-
const
|
|
1772
|
-
j >= 0 && j <
|
|
1773
|
-
}),
|
|
1769
|
+
S = o + (l == null ? void 0 : l.length) + 1;
|
|
1770
|
+
let Q = 0;
|
|
1771
|
+
Object.keys(e.expandedChildRows).forEach((Y) => {
|
|
1772
|
+
const G = String(Y).split("/"), K = String(N), j = G.indexOf(K);
|
|
1773
|
+
j >= 0 && j < G.length - 1 && (Q += e.expandedChildRows[Y].childRowsCount);
|
|
1774
|
+
}), S += Q;
|
|
1774
1775
|
} else
|
|
1775
|
-
|
|
1776
|
-
const { aggreRow:
|
|
1776
|
+
S = h;
|
|
1777
|
+
const { aggreRow: D } = Pe(
|
|
1777
1778
|
e,
|
|
1778
1779
|
l,
|
|
1779
1780
|
C,
|
|
@@ -1781,39 +1782,39 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1781
1782
|
o,
|
|
1782
1783
|
i
|
|
1783
1784
|
);
|
|
1784
|
-
n[
|
|
1785
|
-
let
|
|
1785
|
+
n[S] = D;
|
|
1786
|
+
let W = { ...D };
|
|
1786
1787
|
if (O) {
|
|
1787
|
-
let
|
|
1788
|
-
for (;
|
|
1789
|
-
const
|
|
1788
|
+
let Q = E - 1;
|
|
1789
|
+
for (; Q !== 0; ) {
|
|
1790
|
+
const Y = W.parentRowIndex, G = ((f = n[Y]) == null ? void 0 : f.parentRowIndex) || Y, K = G >= 0 ? G : Y;
|
|
1790
1791
|
if (K >= 0) {
|
|
1791
|
-
const j = n[K], Z = j[A], $ = j[e.childKeyField], { aggreRow:
|
|
1792
|
+
const j = n[K], Z = j[A], $ = j[e.childKeyField], { aggreRow: ne } = Pe(
|
|
1792
1793
|
e,
|
|
1793
1794
|
$,
|
|
1794
1795
|
j,
|
|
1795
|
-
|
|
1796
|
+
Q,
|
|
1796
1797
|
K,
|
|
1797
1798
|
Z
|
|
1798
1799
|
), q = !!j.__parentPath;
|
|
1799
|
-
let
|
|
1800
|
+
let V;
|
|
1800
1801
|
if (q) {
|
|
1801
|
-
|
|
1802
|
-
let
|
|
1802
|
+
V = K + ($ == null ? void 0 : $.length) + 1;
|
|
1803
|
+
let te = 0;
|
|
1803
1804
|
Object.keys(e.expandedChildRows).forEach((le) => {
|
|
1804
1805
|
const se = String(le).split("/"), fe = String(Z), ge = se.indexOf(fe);
|
|
1805
|
-
ge >= 0 && ge < se.length - 1 && (
|
|
1806
|
-
}),
|
|
1806
|
+
ge >= 0 && ge < se.length - 1 && (te += e.expandedChildRows[le].childRowsCount);
|
|
1807
|
+
}), V += te;
|
|
1807
1808
|
} else
|
|
1808
|
-
|
|
1809
|
+
V = Object.keys(
|
|
1809
1810
|
e.expandedChildRows
|
|
1810
|
-
).reduce((
|
|
1811
|
-
n[
|
|
1811
|
+
).reduce((te, le) => (le.startsWith(String(Z)) && (te += e.expandedChildRows[le].childRowsCount), te), 0);
|
|
1812
|
+
n[V] = ne, W = ne, Q--;
|
|
1812
1813
|
} else
|
|
1813
|
-
|
|
1814
|
+
Q = 0;
|
|
1814
1815
|
}
|
|
1815
1816
|
}
|
|
1816
|
-
const { aggreRow:
|
|
1817
|
+
const { aggreRow: x } = Pe(
|
|
1817
1818
|
e,
|
|
1818
1819
|
[],
|
|
1819
1820
|
{ [e.childKeyField]: n },
|
|
@@ -1821,7 +1822,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1821
1822
|
0,
|
|
1822
1823
|
null
|
|
1823
1824
|
);
|
|
1824
|
-
c =
|
|
1825
|
+
c = x;
|
|
1825
1826
|
} else if (d) {
|
|
1826
1827
|
const { aggreRow: C } = Pe(
|
|
1827
1828
|
e,
|
|
@@ -1875,12 +1876,12 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1875
1876
|
for (let f = 0; f < e.length; f++) {
|
|
1876
1877
|
const C = e[f];
|
|
1877
1878
|
delete C.__rowSpanInfo;
|
|
1878
|
-
const
|
|
1879
|
-
o[
|
|
1880
|
-
const l = o[
|
|
1879
|
+
const N = C[t];
|
|
1880
|
+
o[N] || (o[N] = {});
|
|
1881
|
+
const l = o[N][E];
|
|
1881
1882
|
if (!(l && l.span === 0))
|
|
1882
1883
|
if (i && typeof i == "function") {
|
|
1883
|
-
const
|
|
1884
|
+
const h = i(
|
|
1884
1885
|
{
|
|
1885
1886
|
node: { rowIndex: f, data: C, api: r },
|
|
1886
1887
|
api: r,
|
|
@@ -1889,37 +1890,37 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1889
1890
|
},
|
|
1890
1891
|
E
|
|
1891
1892
|
);
|
|
1892
|
-
if (typeof
|
|
1893
|
-
if (o[
|
|
1894
|
-
span:
|
|
1895
|
-
isFirst:
|
|
1896
|
-
isLast:
|
|
1897
|
-
},
|
|
1898
|
-
const O = [
|
|
1899
|
-
for (let
|
|
1900
|
-
const
|
|
1901
|
-
if (
|
|
1902
|
-
const
|
|
1903
|
-
O.push(
|
|
1893
|
+
if (typeof h == "number") {
|
|
1894
|
+
if (o[N][E] = {
|
|
1895
|
+
span: h,
|
|
1896
|
+
isFirst: h > 0,
|
|
1897
|
+
isLast: h <= 1
|
|
1898
|
+
}, h > 1 && (o[N].isRowSpan = !0), h > 1) {
|
|
1899
|
+
const O = [N];
|
|
1900
|
+
for (let S = 1; S < h; S++) {
|
|
1901
|
+
const D = f + S;
|
|
1902
|
+
if (D < e.length) {
|
|
1903
|
+
const W = e[D][t];
|
|
1904
|
+
O.push(W), o[W] || (o[W] = {}), o[W][E] = {
|
|
1904
1905
|
span: 0,
|
|
1905
1906
|
isFirst: !1,
|
|
1906
|
-
isLast:
|
|
1907
|
+
isLast: S === h - 1
|
|
1907
1908
|
};
|
|
1908
1909
|
}
|
|
1909
1910
|
}
|
|
1910
|
-
o[
|
|
1911
|
+
o[N][E].rowIds = O;
|
|
1911
1912
|
}
|
|
1912
1913
|
} else
|
|
1913
|
-
o[
|
|
1914
|
+
o[N][E] = {
|
|
1914
1915
|
span: 1,
|
|
1915
1916
|
isFirst: !0,
|
|
1916
1917
|
isLast: !0
|
|
1917
1918
|
};
|
|
1918
1919
|
} else {
|
|
1919
|
-
const
|
|
1920
|
-
c.has(
|
|
1920
|
+
const h = C[E];
|
|
1921
|
+
c.has(h) || c.set(h, []), c.get(h).push({
|
|
1921
1922
|
index: f,
|
|
1922
|
-
rowId:
|
|
1923
|
+
rowId: N,
|
|
1923
1924
|
rowData: C
|
|
1924
1925
|
});
|
|
1925
1926
|
}
|
|
@@ -1935,14 +1936,14 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1935
1936
|
});
|
|
1936
1937
|
continue;
|
|
1937
1938
|
}
|
|
1938
|
-
const
|
|
1939
|
-
C.forEach((l,
|
|
1939
|
+
const N = C.map((l) => l.rowId);
|
|
1940
|
+
C.forEach((l, h) => {
|
|
1940
1941
|
const O = l.rowId;
|
|
1941
1942
|
o[O] || (o[O] = {}), o[O][E] = {
|
|
1942
|
-
span:
|
|
1943
|
-
isFirst:
|
|
1944
|
-
isLast:
|
|
1945
|
-
rowIds:
|
|
1943
|
+
span: h === 0 ? C.length : 0,
|
|
1944
|
+
isFirst: h === 0,
|
|
1945
|
+
isLast: h === C.length - 1,
|
|
1946
|
+
rowIds: h === 0 ? N : void 0
|
|
1946
1947
|
// Store row IDs only in the first row
|
|
1947
1948
|
};
|
|
1948
1949
|
});
|
|
@@ -1986,7 +1987,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
1986
1987
|
break;
|
|
1987
1988
|
}
|
|
1988
1989
|
return o;
|
|
1989
|
-
},
|
|
1990
|
+
}, Ge = (e, n, t) => {
|
|
1990
1991
|
if (!e || !Array.isArray(e) || e.length === 0 || !n)
|
|
1991
1992
|
return e || [];
|
|
1992
1993
|
const r = Array.isArray(n) ? n : [n];
|
|
@@ -2085,22 +2086,22 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2085
2086
|
}), i.forEach((c) => {
|
|
2086
2087
|
for (const [u, f] of E.entries()) {
|
|
2087
2088
|
const C = f.length;
|
|
2088
|
-
f.sort((l,
|
|
2089
|
-
const O = l.row.__split,
|
|
2090
|
-
return
|
|
2089
|
+
f.sort((l, h) => {
|
|
2090
|
+
const O = l.row.__split, S = h.row.__split, D = (O == null ? void 0 : O.index) ?? 0, W = (S == null ? void 0 : S.index) ?? 0;
|
|
2091
|
+
return D - W;
|
|
2091
2092
|
});
|
|
2092
|
-
const
|
|
2093
|
+
const N = f.map(
|
|
2093
2094
|
(l) => l.row[t] || l.row.__flattenedRowId || l.index
|
|
2094
2095
|
);
|
|
2095
|
-
f.forEach((l,
|
|
2096
|
-
const { row: O, index:
|
|
2097
|
-
o[
|
|
2098
|
-
span:
|
|
2099
|
-
isFirst:
|
|
2100
|
-
isLast:
|
|
2101
|
-
rowIds:
|
|
2096
|
+
f.forEach((l, h) => {
|
|
2097
|
+
const { row: O, index: S } = l, D = O[t] || O.__flattenedRowId || S;
|
|
2098
|
+
o[D] || (o[D] = {}), o[D][c] = {
|
|
2099
|
+
span: h === 0 ? C : 0,
|
|
2100
|
+
isFirst: h === 0,
|
|
2101
|
+
isLast: h === C - 1,
|
|
2102
|
+
rowIds: h === 0 ? N : void 0
|
|
2102
2103
|
// Store row IDs only in the first row
|
|
2103
|
-
}, C > 1 &&
|
|
2104
|
+
}, C > 1 && h === 0 && (o[D].isRowSpan = !0);
|
|
2104
2105
|
});
|
|
2105
2106
|
}
|
|
2106
2107
|
}), d.forEach((c) => {
|
|
@@ -2271,9 +2272,10 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2271
2272
|
removeCheckConfigurationOnOperation: !0,
|
|
2272
2273
|
totalColumnsCount: 0,
|
|
2273
2274
|
isCommentFeatureEnabled: !1,
|
|
2274
|
-
isChatEnabled: !1
|
|
2275
|
+
isChatEnabled: !1,
|
|
2276
|
+
noHeaderSelection: !1
|
|
2275
2277
|
}, pt = (e, n) => {
|
|
2276
|
-
var t, r, i, A, o, d, E, c, u, f, C,
|
|
2278
|
+
var t, r, i, A, o, d, E, c, u, f, C, N, l, h, O, S, D, W, x, Q, Y, G, K, j, Z, $, ne, q, V, te, le, se, fe, ge, ue, ie, de, oe, Ce, z, _;
|
|
2277
2279
|
switch (n.type) {
|
|
2278
2280
|
case a.SET_LOADING:
|
|
2279
2281
|
return {
|
|
@@ -2286,12 +2288,12 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2286
2288
|
tableId: n.payload
|
|
2287
2289
|
};
|
|
2288
2290
|
case a.SET_DATA: {
|
|
2289
|
-
const { isCountUnknown: s, totalItems: g, totalPages:
|
|
2290
|
-
let
|
|
2291
|
-
const M = e.aggregationTotalRow && ((t = e.aggregationTotalRow) == null ? void 0 : t[
|
|
2292
|
-
let
|
|
2291
|
+
const { isCountUnknown: s, totalItems: g, totalPages: p, currentPage: B } = n.meta || {}, I = e.columns.some((T) => T.aggFunc), R = B || e.pagination.page || 1;
|
|
2292
|
+
let w = null;
|
|
2293
|
+
const M = e.aggregationTotalRow && ((t = e.aggregationTotalRow) == null ? void 0 : t[R]);
|
|
2294
|
+
let H = e.aggregationTotalRow;
|
|
2293
2295
|
if (I && !M) {
|
|
2294
|
-
const { aggreRow:
|
|
2296
|
+
const { aggreRow: T } = Pe(
|
|
2295
2297
|
e,
|
|
2296
2298
|
[],
|
|
2297
2299
|
{ [e.childKeyField]: n.payload },
|
|
@@ -2299,45 +2301,45 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2299
2301
|
0,
|
|
2300
2302
|
null
|
|
2301
2303
|
);
|
|
2302
|
-
|
|
2304
|
+
w = T, H = {
|
|
2303
2305
|
...e.aggregationTotalRow,
|
|
2304
|
-
[
|
|
2306
|
+
[R]: w
|
|
2305
2307
|
};
|
|
2306
|
-
} else M && (
|
|
2307
|
-
const
|
|
2308
|
-
if ((r = e.data) != null && r.length && JSON.stringify(
|
|
2308
|
+
} else M && (w = M);
|
|
2309
|
+
const F = n.payload;
|
|
2310
|
+
if ((r = e.data) != null && r.length && JSON.stringify(F) === JSON.stringify(e.data) && s === e.isCountUnknown && g === e.totalItems && p === e.totalPages && B === e.currentPage && !w)
|
|
2309
2311
|
return e;
|
|
2310
|
-
const
|
|
2312
|
+
const m = F.map((T) => (delete T._animationState, delete T._isDraggedRow, T)), L = [...e.selectedRows], y = {
|
|
2311
2313
|
...e.selectedRowsObject
|
|
2312
2314
|
};
|
|
2313
|
-
for (let
|
|
2314
|
-
const
|
|
2315
|
-
if (
|
|
2316
|
-
const
|
|
2317
|
-
|
|
2315
|
+
for (let T = 0; T < m.length; T++) {
|
|
2316
|
+
const P = m[T];
|
|
2317
|
+
if (P.is_selected) {
|
|
2318
|
+
const b = String(P[e.uniqueIdField]);
|
|
2319
|
+
L.push(b), y[b] = !0;
|
|
2318
2320
|
}
|
|
2319
2321
|
}
|
|
2320
2322
|
return {
|
|
2321
2323
|
...e,
|
|
2322
|
-
data:
|
|
2323
|
-
filteredData:
|
|
2324
|
+
data: m,
|
|
2325
|
+
filteredData: m,
|
|
2324
2326
|
isLoading: !1,
|
|
2325
|
-
...
|
|
2326
|
-
aggregationTotalRow:
|
|
2327
|
-
pinnedBottomRows: [
|
|
2327
|
+
...w ? {
|
|
2328
|
+
aggregationTotalRow: H,
|
|
2329
|
+
pinnedBottomRows: [w]
|
|
2328
2330
|
} : {},
|
|
2329
2331
|
hasAggregation: I,
|
|
2330
|
-
selectedRows: [.../* @__PURE__ */ new Set([...
|
|
2331
|
-
selectedRowsObject:
|
|
2332
|
+
selectedRows: [.../* @__PURE__ */ new Set([...L])],
|
|
2333
|
+
selectedRowsObject: y,
|
|
2332
2334
|
pagination: {
|
|
2333
2335
|
...e.pagination,
|
|
2334
2336
|
...Object.keys(e.columnFilters).length && !e.serverSide ? {} : {
|
|
2335
2337
|
isCountUnknown: s,
|
|
2336
2338
|
totalItems: g,
|
|
2337
|
-
allTotalPages:
|
|
2338
|
-
currentLoadedPage:
|
|
2339
|
-
totalPages:
|
|
2340
|
-
page:
|
|
2339
|
+
allTotalPages: p,
|
|
2340
|
+
currentLoadedPage: B,
|
|
2341
|
+
totalPages: p,
|
|
2342
|
+
page: B
|
|
2341
2343
|
}
|
|
2342
2344
|
}
|
|
2343
2345
|
};
|
|
@@ -2348,139 +2350,139 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2348
2350
|
filteredData: n.payload
|
|
2349
2351
|
};
|
|
2350
2352
|
case a.UPDATE_ROW_DATA: {
|
|
2351
|
-
const { updatedData: s, dataRowIndex: g, aggregationRow:
|
|
2353
|
+
const { updatedData: s, dataRowIndex: g, aggregationRow: p, rowId: B, parentIndex: I } = n.payload, R = Ge(
|
|
2352
2354
|
s,
|
|
2353
2355
|
e.rowSpanColumn,
|
|
2354
2356
|
e.api
|
|
2355
2357
|
);
|
|
2356
|
-
|
|
2358
|
+
me(
|
|
2357
2359
|
e,
|
|
2358
|
-
|
|
2360
|
+
R,
|
|
2359
2361
|
!0,
|
|
2360
|
-
|
|
2362
|
+
B,
|
|
2361
2363
|
I >= 0 ? I : g
|
|
2362
2364
|
), gn(e.tableInstance, g);
|
|
2363
|
-
const
|
|
2365
|
+
const w = e.pagination.page || 1, M = p ? {
|
|
2364
2366
|
...e.aggregationTotalRow,
|
|
2365
|
-
[
|
|
2367
|
+
[w]: p
|
|
2366
2368
|
} : e.aggregationTotalRow;
|
|
2367
2369
|
return {
|
|
2368
2370
|
...e,
|
|
2369
|
-
data:
|
|
2370
|
-
filteredData:
|
|
2371
|
-
...
|
|
2371
|
+
data: R,
|
|
2372
|
+
filteredData: R,
|
|
2373
|
+
...p ? {
|
|
2372
2374
|
aggregationTotalRow: M,
|
|
2373
|
-
pinnedBottomRows: [
|
|
2375
|
+
pinnedBottomRows: [p]
|
|
2374
2376
|
} : {}
|
|
2375
2377
|
};
|
|
2376
2378
|
}
|
|
2377
2379
|
case a.UPDATE_ROW_DATA_OBJECT: {
|
|
2378
|
-
const { rowId: s, data: g } = n.payload,
|
|
2379
|
-
let
|
|
2380
|
-
|
|
2381
|
-
(
|
|
2382
|
-
).forEach((
|
|
2383
|
-
M += e.expandedChildRows[
|
|
2384
|
-
}),
|
|
2385
|
-
let
|
|
2386
|
-
if (
|
|
2387
|
-
return
|
|
2388
|
-
if (
|
|
2389
|
-
const
|
|
2390
|
-
if (
|
|
2391
|
-
return { ...
|
|
2380
|
+
const { rowId: s, data: g } = n.payload, p = e.uniqueIdField, B = e.expandedChildRows[s], I = { ...e.expandedChildRows };
|
|
2381
|
+
let R = !1, w = -1, M = 0;
|
|
2382
|
+
B && (Object.keys(e.expandedChildRows).filter(
|
|
2383
|
+
(L) => L.startsWith(String(s))
|
|
2384
|
+
).forEach((L) => {
|
|
2385
|
+
M += e.expandedChildRows[L].childRowsCount;
|
|
2386
|
+
}), w = B.rowIndex);
|
|
2387
|
+
let H = ((i = e.data) == null ? void 0 : i.map((m, L) => {
|
|
2388
|
+
if (m[p] == s)
|
|
2389
|
+
return w = L, { ...m, ...g };
|
|
2390
|
+
if (m[e.childKeyField] && Array.isArray(m[e.childKeyField])) {
|
|
2391
|
+
const y = m[e.childKeyField].map((T) => T[p] == s ? { ...T, ...g } : T);
|
|
2392
|
+
if (y !== m[e.childKeyField])
|
|
2393
|
+
return { ...m, [e.childKeyField]: y };
|
|
2392
2394
|
}
|
|
2393
|
-
return
|
|
2395
|
+
return m;
|
|
2394
2396
|
})) || [];
|
|
2395
|
-
if (
|
|
2396
|
-
const
|
|
2397
|
-
if (!
|
|
2398
|
-
|
|
2397
|
+
if (B && w !== -1) {
|
|
2398
|
+
const m = M, L = g[e.childKeyField], T = (L ? L.length : 0) - m;
|
|
2399
|
+
if (!L)
|
|
2400
|
+
H.splice(w + 1, M);
|
|
2399
2401
|
else {
|
|
2400
|
-
const
|
|
2401
|
-
...
|
|
2402
|
-
__parentPath:
|
|
2403
|
-
level:
|
|
2404
|
-
parentRowIndex:
|
|
2402
|
+
const P = typeof s == "string" ? s.split("/").length : 1, b = L.map((ee) => ({
|
|
2403
|
+
...ee,
|
|
2404
|
+
__parentPath: ee.__parentPath ? `${ee.__parentPath}/${ee[s]}` : String(s),
|
|
2405
|
+
level: P,
|
|
2406
|
+
parentRowIndex: w,
|
|
2405
2407
|
parentRowData: g
|
|
2406
2408
|
}));
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
+
H.splice(w + 1, M), H.splice(
|
|
2410
|
+
w + 1,
|
|
2409
2411
|
0,
|
|
2410
|
-
...
|
|
2412
|
+
...b
|
|
2411
2413
|
), I[s] = {
|
|
2412
2414
|
...I[s],
|
|
2413
|
-
childRowsCount:
|
|
2414
|
-
},
|
|
2415
|
+
childRowsCount: L.length
|
|
2416
|
+
}, R = !0;
|
|
2415
2417
|
}
|
|
2416
|
-
|
|
2417
|
-
const
|
|
2418
|
-
|
|
2419
|
-
...
|
|
2420
|
-
rowIndex:
|
|
2418
|
+
T !== 0 && (Object.keys(I).forEach((P) => {
|
|
2419
|
+
const b = I[P];
|
|
2420
|
+
b.rowIndex > w && (I[P] = {
|
|
2421
|
+
...b,
|
|
2422
|
+
rowIndex: b.rowIndex + T
|
|
2421
2423
|
});
|
|
2422
|
-
}),
|
|
2423
|
-
...
|
|
2424
|
-
parentRowIndex:
|
|
2425
|
-
} :
|
|
2424
|
+
}), H = H.map((P) => P.__parentPath && P.parentRowIndex !== void 0 && P.parentRowIndex > w ? {
|
|
2425
|
+
...P,
|
|
2426
|
+
parentRowIndex: P.parentRowIndex + T
|
|
2427
|
+
} : P));
|
|
2426
2428
|
}
|
|
2427
|
-
|
|
2428
|
-
const
|
|
2429
|
-
|
|
2429
|
+
w !== -1 && gn(e.tableInstance, w);
|
|
2430
|
+
const F = Ge(
|
|
2431
|
+
H,
|
|
2430
2432
|
e.rowSpanColumn,
|
|
2431
2433
|
e.api
|
|
2432
2434
|
);
|
|
2433
|
-
return
|
|
2435
|
+
return me(
|
|
2434
2436
|
e,
|
|
2435
|
-
|
|
2437
|
+
F,
|
|
2436
2438
|
!0,
|
|
2437
2439
|
String(s),
|
|
2438
|
-
|
|
2440
|
+
w
|
|
2439
2441
|
), {
|
|
2440
2442
|
...e,
|
|
2441
|
-
data:
|
|
2442
|
-
filteredData:
|
|
2443
|
-
...
|
|
2443
|
+
data: F,
|
|
2444
|
+
filteredData: F,
|
|
2445
|
+
...R ? { expandedChildRows: I } : {}
|
|
2444
2446
|
};
|
|
2445
2447
|
}
|
|
2446
2448
|
case a.SET_COLUMNS: {
|
|
2447
|
-
const s = ((A = n.meta) == null ? void 0 : A.defaultColDef) || e.defaultColDef, { columns: g, frozenData:
|
|
2449
|
+
const s = ((A = n.meta) == null ? void 0 : A.defaultColDef) || e.defaultColDef, { columns: g, frozenData: p } = we(
|
|
2448
2450
|
n.payload,
|
|
2449
2451
|
s ?? void 0
|
|
2450
2452
|
);
|
|
2451
2453
|
if (n.meta && n.meta.recomputeFrozen) {
|
|
2452
|
-
|
|
2453
|
-
let
|
|
2454
|
+
p.positions = n.meta.frozenPositions || {};
|
|
2455
|
+
let B = on(
|
|
2454
2456
|
!0,
|
|
2455
2457
|
e.disableSelectAllRecords,
|
|
2456
2458
|
e.isSingleSelect
|
|
2457
2459
|
);
|
|
2458
|
-
|
|
2459
|
-
var
|
|
2460
|
-
const
|
|
2461
|
-
|
|
2462
|
-
}),
|
|
2460
|
+
p.indexes.forEach((I) => {
|
|
2461
|
+
var w;
|
|
2462
|
+
const R = g.find((M) => v(M) === I);
|
|
2463
|
+
R && !R.hidden && (B += R.width || ((w = e.defaultColDef) == null ? void 0 : w.minWidth) || 150);
|
|
2464
|
+
}), p.totalWidth = B;
|
|
2463
2465
|
}
|
|
2464
2466
|
return {
|
|
2465
2467
|
...e,
|
|
2466
2468
|
columns: g,
|
|
2467
|
-
frozenColumns:
|
|
2469
|
+
frozenColumns: p
|
|
2468
2470
|
};
|
|
2469
2471
|
}
|
|
2470
2472
|
case a.MOVE_ROW: {
|
|
2471
|
-
const { fromIndex: s, toIndex: g } = n.payload,
|
|
2472
|
-
let
|
|
2473
|
-
Object.keys(e.expandedChildRows).forEach((
|
|
2474
|
-
|
|
2473
|
+
const { fromIndex: s, toIndex: g } = n.payload, p = [...e.data || []], B = p[s], I = String(B[e.uniqueIdField]);
|
|
2474
|
+
let R = 0;
|
|
2475
|
+
Object.keys(e.expandedChildRows).forEach((m) => {
|
|
2476
|
+
m.startsWith(I) && (R += e.expandedChildRows[m].childRowsCount);
|
|
2475
2477
|
});
|
|
2476
|
-
const
|
|
2477
|
-
let
|
|
2478
|
-
s < g && (
|
|
2479
|
-
const
|
|
2478
|
+
const w = R + 1, M = p.splice(s, w);
|
|
2479
|
+
let H = g;
|
|
2480
|
+
s < g && (H -= w), p.splice(H, 0, ...M);
|
|
2481
|
+
const F = p.map((m) => (delete m._isDraggedRow, delete m._animationState, m));
|
|
2480
2482
|
return {
|
|
2481
2483
|
...e,
|
|
2482
|
-
data:
|
|
2483
|
-
filteredData:
|
|
2484
|
+
data: F,
|
|
2485
|
+
filteredData: F
|
|
2484
2486
|
// Keep filtered data in sync
|
|
2485
2487
|
};
|
|
2486
2488
|
}
|
|
@@ -2522,7 +2524,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2522
2524
|
};
|
|
2523
2525
|
case a.SET_PAGE: {
|
|
2524
2526
|
const s = Xe(e);
|
|
2525
|
-
|
|
2527
|
+
me(e, s);
|
|
2526
2528
|
const g = be(e);
|
|
2527
2529
|
return {
|
|
2528
2530
|
...e,
|
|
@@ -2561,32 +2563,32 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2561
2563
|
isSingleSelect: n.payload
|
|
2562
2564
|
};
|
|
2563
2565
|
case a.SET_SELECTED_ROWS: {
|
|
2564
|
-
let s = e.selectedRows, g = e.unCheckedRows,
|
|
2566
|
+
let s = e.selectedRows, g = e.unCheckedRows, p = e.selectedRowsObject, B = e.filteredData;
|
|
2565
2567
|
if (Array.isArray(n.payload))
|
|
2566
|
-
s = n.payload.map((I) => String(I)),
|
|
2567
|
-
(I,
|
|
2568
|
+
s = n.payload.map((I) => String(I)), p = n.payload.reduce(
|
|
2569
|
+
(I, R) => (I[R] = !0, I),
|
|
2568
2570
|
{}
|
|
2569
2571
|
);
|
|
2570
2572
|
else {
|
|
2571
2573
|
const {
|
|
2572
2574
|
isSelected: I = !1,
|
|
2573
|
-
selectUnselectRowId:
|
|
2574
|
-
isUnchecked:
|
|
2575
|
+
selectUnselectRowId: R = [],
|
|
2576
|
+
isUnchecked: w = !1,
|
|
2575
2577
|
singleEntry: M = !1
|
|
2576
2578
|
} = n.payload;
|
|
2577
2579
|
if (M) {
|
|
2578
|
-
const
|
|
2579
|
-
selectedRowsUpdated:
|
|
2580
|
-
unCheckedRowsUpdated:
|
|
2581
|
-
selectedRowsObjectUpdated:
|
|
2582
|
-
filteredData:
|
|
2580
|
+
const H = Array.isArray(R) ? R[0] : R, {
|
|
2581
|
+
selectedRowsUpdated: F,
|
|
2582
|
+
unCheckedRowsUpdated: m,
|
|
2583
|
+
selectedRowsObjectUpdated: L,
|
|
2584
|
+
filteredData: y
|
|
2583
2585
|
} = ft({
|
|
2584
2586
|
state: e,
|
|
2585
2587
|
isSelected: I,
|
|
2586
|
-
selectUnselectRowId: String(
|
|
2587
|
-
isUnchecked:
|
|
2588
|
+
selectUnselectRowId: String(H),
|
|
2589
|
+
isUnchecked: w
|
|
2588
2590
|
});
|
|
2589
|
-
s =
|
|
2591
|
+
s = F, g = m, p = L, B = y;
|
|
2590
2592
|
}
|
|
2591
2593
|
}
|
|
2592
2594
|
return Je({
|
|
@@ -2594,19 +2596,19 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2594
2596
|
action: { payload: s }
|
|
2595
2597
|
}), {
|
|
2596
2598
|
...e,
|
|
2597
|
-
filteredData:
|
|
2599
|
+
filteredData: B,
|
|
2598
2600
|
selectedRows: s,
|
|
2599
|
-
selectedRowsObject:
|
|
2601
|
+
selectedRowsObject: p,
|
|
2600
2602
|
isSelectionChanged: !1,
|
|
2601
2603
|
unCheckedRows: g
|
|
2602
2604
|
};
|
|
2603
2605
|
}
|
|
2604
2606
|
case a.SET_COLUMN_FILTER: {
|
|
2605
|
-
const { field: s, rules: g, isBulk:
|
|
2607
|
+
const { field: s, rules: g, isBulk: p, filters: B } = n.payload;
|
|
2606
2608
|
return {
|
|
2607
2609
|
...e,
|
|
2608
2610
|
columnFilters: {
|
|
2609
|
-
...
|
|
2611
|
+
...p ? B : { ...e.columnFilters, [s]: g }
|
|
2610
2612
|
}
|
|
2611
2613
|
};
|
|
2612
2614
|
}
|
|
@@ -2623,12 +2625,12 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2623
2625
|
};
|
|
2624
2626
|
}
|
|
2625
2627
|
case a.APPLY_FILTERS: {
|
|
2626
|
-
const { isChildRowEmpty: s, updatedData: g, filteredData:
|
|
2628
|
+
const { isChildRowEmpty: s, updatedData: g, filteredData: p } = n.payload;
|
|
2627
2629
|
return {
|
|
2628
2630
|
...e,
|
|
2629
2631
|
...s ? {} : { expandedChildRows: {} },
|
|
2630
2632
|
data: g,
|
|
2631
|
-
filteredData:
|
|
2633
|
+
filteredData: p,
|
|
2632
2634
|
...e.removeSelectionOnOperation ? {
|
|
2633
2635
|
selectedRows: [],
|
|
2634
2636
|
selectedRowsObject: {},
|
|
@@ -2646,74 +2648,74 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2646
2648
|
page: 1,
|
|
2647
2649
|
currentLoadedPage: 1,
|
|
2648
2650
|
...e.serverSide ? {} : {
|
|
2649
|
-
totalItems:
|
|
2651
|
+
totalItems: p.length,
|
|
2650
2652
|
totalPages: Math.ceil(
|
|
2651
|
-
|
|
2653
|
+
p.length / e.pagination.pageSize
|
|
2652
2654
|
)
|
|
2653
2655
|
}
|
|
2654
2656
|
}
|
|
2655
2657
|
};
|
|
2656
2658
|
}
|
|
2657
2659
|
case a.TOGGLE_GROUP_EXPANSION: {
|
|
2658
|
-
const { rowId: s, rowIndex: g } = n.payload,
|
|
2660
|
+
const { rowId: s, rowIndex: g } = n.payload, p = String(s), B = e.filteredData || [];
|
|
2659
2661
|
let I;
|
|
2660
|
-
const
|
|
2662
|
+
const R = [...B], w = p.split("/").length, M = !e.expandedChildRows[p];
|
|
2661
2663
|
if (M) {
|
|
2662
|
-
const
|
|
2663
|
-
let
|
|
2664
|
-
if (
|
|
2665
|
-
const { aggreRow:
|
|
2664
|
+
const H = B[g], F = (H == null ? void 0 : H[e.childKeyField]) || [], m = e.columns.some((ee) => ee.aggFunc);
|
|
2665
|
+
let L = F, y = null;
|
|
2666
|
+
if (m && F.length > 0) {
|
|
2667
|
+
const { aggreRow: ee, aggreChildRows: J } = Pe(
|
|
2666
2668
|
e,
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2669
|
+
L,
|
|
2670
|
+
H,
|
|
2671
|
+
w,
|
|
2670
2672
|
g,
|
|
2671
|
-
|
|
2673
|
+
p
|
|
2672
2674
|
);
|
|
2673
|
-
|
|
2675
|
+
y = ee, L = J;
|
|
2674
2676
|
} else
|
|
2675
|
-
|
|
2676
|
-
...
|
|
2677
|
-
__parentPath:
|
|
2678
|
-
level:
|
|
2677
|
+
L = L.map((ee) => ({
|
|
2678
|
+
...ee,
|
|
2679
|
+
__parentPath: ee.__parentPath ? `${ee.__parentPath}/${p}` : p,
|
|
2680
|
+
level: w,
|
|
2679
2681
|
parentRowIndex: g,
|
|
2680
|
-
parentRowData:
|
|
2681
|
-
groupingLevel:
|
|
2682
|
+
parentRowData: H,
|
|
2683
|
+
groupingLevel: w
|
|
2682
2684
|
}));
|
|
2683
|
-
const
|
|
2685
|
+
const T = F.length + (y ? 1 : 0);
|
|
2684
2686
|
I = {
|
|
2685
2687
|
...e.expandedChildRows,
|
|
2686
|
-
[
|
|
2687
|
-
rowId:
|
|
2688
|
+
[p]: {
|
|
2689
|
+
rowId: p,
|
|
2688
2690
|
rowIndex: g,
|
|
2689
|
-
childRowsCount:
|
|
2691
|
+
childRowsCount: T
|
|
2690
2692
|
}
|
|
2691
2693
|
};
|
|
2692
|
-
const
|
|
2693
|
-
[
|
|
2694
|
+
const P = Ge(
|
|
2695
|
+
[H, ...L],
|
|
2694
2696
|
e.rowSpanColumn,
|
|
2695
2697
|
e.api
|
|
2696
|
-
),
|
|
2697
|
-
|
|
2698
|
+
), b = y ? [...P, y] : P;
|
|
2699
|
+
R.splice(g, 1), R.splice(g, 0, ...b);
|
|
2698
2700
|
} else {
|
|
2699
2701
|
I = {
|
|
2700
2702
|
...e.expandedChildRows
|
|
2701
2703
|
};
|
|
2702
|
-
let
|
|
2703
|
-
Object.keys(I).forEach((
|
|
2704
|
-
|
|
2705
|
-
}), delete
|
|
2704
|
+
let H = 0;
|
|
2705
|
+
Object.keys(I).forEach((F) => {
|
|
2706
|
+
F.startsWith(p) && (H += I[F].childRowsCount, delete I[F]);
|
|
2707
|
+
}), delete R[g].__rowSpanInfo, R.splice(g + 1, H);
|
|
2706
2708
|
}
|
|
2707
2709
|
return (u = (c = e.callBackRef) == null ? void 0 : c.current) != null && u.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
|
|
2708
|
-
rowId:
|
|
2710
|
+
rowId: p,
|
|
2709
2711
|
rowIndex: g,
|
|
2710
2712
|
api: e.api,
|
|
2711
2713
|
isExpanded: M
|
|
2712
|
-
}),
|
|
2714
|
+
}), me(e, R), {
|
|
2713
2715
|
...e,
|
|
2714
2716
|
expandedChildRows: I,
|
|
2715
|
-
filteredData:
|
|
2716
|
-
data:
|
|
2717
|
+
filteredData: R,
|
|
2718
|
+
data: R
|
|
2717
2719
|
};
|
|
2718
2720
|
}
|
|
2719
2721
|
case a.SET_FIELD_KEYS:
|
|
@@ -2728,148 +2730,148 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2728
2730
|
isSelectionChanged: !1
|
|
2729
2731
|
} : e;
|
|
2730
2732
|
case a.FREEZE_COLUMN: {
|
|
2731
|
-
const { columnId: s } = n.payload, g = e.columns.map((
|
|
2733
|
+
const { columnId: s } = n.payload, g = e.columns.map((R) => v(R) === s ? { ...R, is_frozen: !0, pinned: "left" } : R), { processedColumns: p } = Oe(
|
|
2732
2734
|
g,
|
|
2733
2735
|
e.expandedColumnGroups || {},
|
|
2734
2736
|
0,
|
|
2735
2737
|
null,
|
|
2736
|
-
((C = (f = n.meta) == null ? void 0 : f.defaultColDef) == null ? void 0 : C.minWidth) || ((
|
|
2737
|
-
), { columns:
|
|
2738
|
-
|
|
2738
|
+
((C = (f = n.meta) == null ? void 0 : f.defaultColDef) == null ? void 0 : C.minWidth) || ((N = e.defaultColDef) == null ? void 0 : N.minWidth) || 150
|
|
2739
|
+
), { columns: B, frozenData: I } = we(
|
|
2740
|
+
p,
|
|
2739
2741
|
((l = n.meta) == null ? void 0 : l.defaultColDef) || e.defaultColDef || void 0
|
|
2740
2742
|
);
|
|
2741
2743
|
return {
|
|
2742
2744
|
...e,
|
|
2743
|
-
columns:
|
|
2745
|
+
columns: B,
|
|
2744
2746
|
frozenColumns: I
|
|
2745
2747
|
};
|
|
2746
2748
|
}
|
|
2747
2749
|
case a.UNFREEZE_COLUMN: {
|
|
2748
|
-
const { columnId: s } = n.payload, g = {},
|
|
2749
|
-
if (e.columns.forEach((
|
|
2750
|
-
if (
|
|
2751
|
-
const
|
|
2752
|
-
|
|
2753
|
-
const
|
|
2754
|
-
g[
|
|
2750
|
+
const { columnId: s } = n.payload, g = {}, p = {};
|
|
2751
|
+
if (e.columns.forEach((L) => {
|
|
2752
|
+
if (L.children && Array.isArray(L.children)) {
|
|
2753
|
+
const y = v(L);
|
|
2754
|
+
p[y] = [], L.children.forEach((T) => {
|
|
2755
|
+
const P = v(T);
|
|
2756
|
+
g[P] = y, p[y] ? p[y].push(P) : p[y] = [P];
|
|
2755
2757
|
});
|
|
2756
2758
|
}
|
|
2757
2759
|
}), !e.columns.find(
|
|
2758
|
-
(
|
|
2760
|
+
(L) => v(L) === s
|
|
2759
2761
|
)) return e;
|
|
2760
2762
|
const I = [];
|
|
2761
|
-
let
|
|
2762
|
-
for (; g[
|
|
2763
|
-
const
|
|
2764
|
-
I.push(
|
|
2763
|
+
let R = s;
|
|
2764
|
+
for (; g[R]; ) {
|
|
2765
|
+
const L = g[R];
|
|
2766
|
+
I.push(L), R = L;
|
|
2765
2767
|
}
|
|
2766
|
-
const
|
|
2767
|
-
e.columns.forEach((
|
|
2768
|
-
const
|
|
2769
|
-
if (
|
|
2770
|
-
let
|
|
2771
|
-
for (; g[
|
|
2772
|
-
const
|
|
2773
|
-
|
|
2768
|
+
const w = {};
|
|
2769
|
+
e.columns.forEach((L) => {
|
|
2770
|
+
const y = v(L);
|
|
2771
|
+
if (L.is_frozen && y !== s && I.includes(y) === !1) {
|
|
2772
|
+
let T = y;
|
|
2773
|
+
for (; g[T]; ) {
|
|
2774
|
+
const P = g[T];
|
|
2775
|
+
w[P] = !0, T = P;
|
|
2774
2776
|
}
|
|
2775
2777
|
}
|
|
2776
2778
|
});
|
|
2777
|
-
const M = e.columns.map((
|
|
2778
|
-
const
|
|
2779
|
-
return
|
|
2780
|
-
}), { processedColumns:
|
|
2779
|
+
const M = e.columns.map((L) => {
|
|
2780
|
+
const y = v(L);
|
|
2781
|
+
return y === s ? { ...L, is_frozen: !1, pinned: null } : I.includes(y) ? w[y] ? L : { ...L, is_frozen: !1, pinned: null } : L;
|
|
2782
|
+
}), { processedColumns: H } = Oe(
|
|
2781
2783
|
M,
|
|
2782
2784
|
e.expandedColumnGroups || {},
|
|
2783
2785
|
0,
|
|
2784
2786
|
null,
|
|
2785
|
-
((O = (
|
|
2786
|
-
), { columns:
|
|
2787
|
-
|
|
2788
|
-
((
|
|
2787
|
+
((O = (h = n.meta) == null ? void 0 : h.defaultColDef) == null ? void 0 : O.minWidth) || ((S = e.defaultColDef) == null ? void 0 : S.minWidth) || 150
|
|
2788
|
+
), { columns: F, frozenData: m } = we(
|
|
2789
|
+
H,
|
|
2790
|
+
((D = n.meta) == null ? void 0 : D.defaultColDef) || e.defaultColDef || void 0
|
|
2789
2791
|
);
|
|
2790
2792
|
return {
|
|
2791
2793
|
...e,
|
|
2792
|
-
columns:
|
|
2793
|
-
frozenColumns:
|
|
2794
|
+
columns: F,
|
|
2795
|
+
frozenColumns: m
|
|
2794
2796
|
};
|
|
2795
2797
|
}
|
|
2796
2798
|
case a.SET_COLUMN_WIDTH: {
|
|
2797
2799
|
const {
|
|
2798
2800
|
field: s,
|
|
2799
2801
|
width: g,
|
|
2800
|
-
isAutoWidth:
|
|
2801
|
-
} = n.payload,
|
|
2802
|
+
isAutoWidth: p
|
|
2803
|
+
} = n.payload, B = (M) => {
|
|
2802
2804
|
if (v(M) === s)
|
|
2803
2805
|
return {
|
|
2804
2806
|
...M,
|
|
2805
2807
|
width: g,
|
|
2806
|
-
isAutoWidth:
|
|
2808
|
+
isAutoWidth: p !== void 0 ? p : M.isAutoWidth
|
|
2807
2809
|
};
|
|
2808
2810
|
if (M.children && M.children.length > 0) {
|
|
2809
|
-
const
|
|
2810
|
-
(
|
|
2811
|
-
),
|
|
2812
|
-
|
|
2811
|
+
const F = M.children.some(
|
|
2812
|
+
(L) => v(L) === s || L.path && L.path.includes(s)
|
|
2813
|
+
), m = M.children.map(
|
|
2814
|
+
B
|
|
2813
2815
|
);
|
|
2814
|
-
if (
|
|
2815
|
-
const
|
|
2816
|
-
(
|
|
2816
|
+
if (F) {
|
|
2817
|
+
const L = m.reduce(
|
|
2818
|
+
(y, T) => T.hidden || T.is_hidden ? y : y + (T.width || 100),
|
|
2817
2819
|
0
|
|
2818
2820
|
);
|
|
2819
2821
|
return {
|
|
2820
2822
|
...M,
|
|
2821
|
-
children:
|
|
2823
|
+
children: m,
|
|
2822
2824
|
// Update parent width based on children's total width
|
|
2823
|
-
width:
|
|
2825
|
+
width: L
|
|
2824
2826
|
};
|
|
2825
2827
|
}
|
|
2826
2828
|
return {
|
|
2827
2829
|
...M,
|
|
2828
|
-
children:
|
|
2830
|
+
children: m
|
|
2829
2831
|
};
|
|
2830
2832
|
}
|
|
2831
2833
|
return M;
|
|
2832
2834
|
}, I = e.columns.map(
|
|
2833
|
-
|
|
2834
|
-
), { columns:
|
|
2835
|
+
B
|
|
2836
|
+
), { columns: R, frozenData: w } = we(
|
|
2835
2837
|
I,
|
|
2836
2838
|
e.defaultColDef || void 0
|
|
2837
2839
|
);
|
|
2838
2840
|
return {
|
|
2839
2841
|
...e,
|
|
2840
|
-
columns:
|
|
2841
|
-
frozenColumns:
|
|
2842
|
+
columns: R,
|
|
2843
|
+
frozenColumns: w
|
|
2842
2844
|
};
|
|
2843
2845
|
}
|
|
2844
2846
|
case a.SET_COLUMNS_WIDTH: {
|
|
2845
|
-
const { widths: s, isAutoWidth: g } = n.payload,
|
|
2846
|
-
const
|
|
2847
|
-
return s[
|
|
2847
|
+
const { widths: s, isAutoWidth: g } = n.payload, p = e.columns.map((I) => {
|
|
2848
|
+
const R = v(I);
|
|
2849
|
+
return s[R] !== void 0 ? {
|
|
2848
2850
|
...I,
|
|
2849
|
-
width: s[
|
|
2851
|
+
width: s[R],
|
|
2850
2852
|
isAutoWidth: g !== void 0 ? g : I.isAutoWidth
|
|
2851
2853
|
} : I;
|
|
2852
|
-
}),
|
|
2853
|
-
if (
|
|
2854
|
+
}), B = { ...e.frozenColumns };
|
|
2855
|
+
if (B.indexes.length > 0) {
|
|
2854
2856
|
let I = on(
|
|
2855
2857
|
!0,
|
|
2856
2858
|
e.disableSelectAllRecords,
|
|
2857
2859
|
e.isSingleSelect
|
|
2858
2860
|
);
|
|
2859
|
-
|
|
2860
|
-
const
|
|
2861
|
-
(M) => v(M) ===
|
|
2861
|
+
B.indexes.forEach((R) => {
|
|
2862
|
+
const w = p.find(
|
|
2863
|
+
(M) => v(M) === R
|
|
2862
2864
|
);
|
|
2863
|
-
if (
|
|
2864
|
-
const M = v(
|
|
2865
|
-
|
|
2865
|
+
if (w && !w.hidden) {
|
|
2866
|
+
const M = v(w);
|
|
2867
|
+
B.positions[M] = I, I += w.width || 100;
|
|
2866
2868
|
}
|
|
2867
|
-
}),
|
|
2869
|
+
}), B.totalWidth = I;
|
|
2868
2870
|
}
|
|
2869
2871
|
return {
|
|
2870
2872
|
...e,
|
|
2871
|
-
columns:
|
|
2872
|
-
frozenColumns:
|
|
2873
|
+
columns: p,
|
|
2874
|
+
frozenColumns: B
|
|
2873
2875
|
};
|
|
2874
2876
|
}
|
|
2875
2877
|
case a.SHOW_NOTIFICATION:
|
|
@@ -2910,10 +2912,10 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2910
2912
|
columnsToAutosize: n.payload.columnsToAutosize
|
|
2911
2913
|
};
|
|
2912
2914
|
case a.PIN_COLUMN_RIGHT: {
|
|
2913
|
-
const { field: s } = n.payload, g = window.innerWidth * 0.3,
|
|
2915
|
+
const { field: s } = n.payload, g = window.innerWidth * 0.3, p = e.columns.find(
|
|
2914
2916
|
(J) => v(J) === s
|
|
2915
2917
|
);
|
|
2916
|
-
if (!
|
|
2918
|
+
if (!p)
|
|
2917
2919
|
return e;
|
|
2918
2920
|
const I = e.columns.filter(
|
|
2919
2921
|
(J) => J.pinned === "right"
|
|
@@ -2923,89 +2925,89 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
2923
2925
|
return J + (re.width || ((Ee = e.defaultColDef) == null ? void 0 : Ee.minWidth) || 150);
|
|
2924
2926
|
},
|
|
2925
2927
|
0
|
|
2926
|
-
),
|
|
2927
|
-
if (I +
|
|
2928
|
+
), R = p.width || ((W = e.defaultColDef) == null ? void 0 : W.minWidth) || 150;
|
|
2929
|
+
if (I + R > g)
|
|
2928
2930
|
return {
|
|
2929
2931
|
...e,
|
|
2930
2932
|
notification: {
|
|
2931
2933
|
show: !0,
|
|
2932
|
-
message: `Cannot pin column "${(
|
|
2934
|
+
message: `Cannot pin column "${(p == null ? void 0 : p.headerName) || s}" to the right. It would exceed the maximum allowed width (30% of viewport).`,
|
|
2933
2935
|
type: "warning",
|
|
2934
2936
|
timeout: 5e3
|
|
2935
2937
|
}
|
|
2936
2938
|
};
|
|
2937
|
-
const { parentToChildrenMap:
|
|
2939
|
+
const { parentToChildrenMap: H, childToParentMap: F } = qe(
|
|
2938
2940
|
e.columns
|
|
2939
|
-
),
|
|
2941
|
+
), m = F[s], L = !!m, y = L ? dn(s, F) : [], T = L ? H[m] || [] : [], P = e.columns.map((J) => {
|
|
2940
2942
|
const re = v(J);
|
|
2941
2943
|
return re === s ? {
|
|
2942
2944
|
...J,
|
|
2943
2945
|
pinned: "right",
|
|
2944
2946
|
is_frozen: !1
|
|
2945
2947
|
// Ensure it's not left-pinned
|
|
2946
|
-
} :
|
|
2948
|
+
} : y.includes(re) ? {
|
|
2947
2949
|
...J,
|
|
2948
2950
|
pinned: "right",
|
|
2949
2951
|
is_frozen: !1
|
|
2950
|
-
} :
|
|
2952
|
+
} : y.some((Ie) => (H[Ie] || []).includes(re)) ? {
|
|
2951
2953
|
...J,
|
|
2952
2954
|
pinned: "right",
|
|
2953
2955
|
is_frozen: !1
|
|
2954
|
-
} :
|
|
2956
|
+
} : T.includes(re) ? {
|
|
2955
2957
|
...J,
|
|
2956
2958
|
pinned: "right",
|
|
2957
2959
|
is_frozen: !1
|
|
2958
2960
|
} : J;
|
|
2959
|
-
}), { columns:
|
|
2960
|
-
|
|
2961
|
-
((
|
|
2961
|
+
}), { columns: b, frozenData: ee } = we(
|
|
2962
|
+
P,
|
|
2963
|
+
((x = n.meta) == null ? void 0 : x.defaultColDef) || e.defaultColDef || void 0
|
|
2962
2964
|
);
|
|
2963
2965
|
return {
|
|
2964
2966
|
...e,
|
|
2965
|
-
columns:
|
|
2966
|
-
frozenColumns:
|
|
2967
|
+
columns: b,
|
|
2968
|
+
frozenColumns: ee
|
|
2967
2969
|
};
|
|
2968
2970
|
}
|
|
2969
2971
|
case a.UNPIN_COLUMN_RIGHT: {
|
|
2970
|
-
const { field: s } = n.payload, { parentToChildrenMap: g, childToParentMap:
|
|
2972
|
+
const { field: s } = n.payload, { parentToChildrenMap: g, childToParentMap: p } = qe(
|
|
2971
2973
|
e.columns
|
|
2972
|
-
),
|
|
2973
|
-
const
|
|
2974
|
-
return
|
|
2975
|
-
...
|
|
2974
|
+
), B = p[s], I = !!B, R = I ? dn(s, p) : [], w = I ? g[B] || [] : [], M = e.columns.map((m) => {
|
|
2975
|
+
const L = v(m);
|
|
2976
|
+
return L === s ? {
|
|
2977
|
+
...m,
|
|
2976
2978
|
pinned: void 0
|
|
2977
|
-
} :
|
|
2978
|
-
...
|
|
2979
|
+
} : R.includes(L) ? {
|
|
2980
|
+
...m,
|
|
2979
2981
|
pinned: void 0
|
|
2980
|
-
} :
|
|
2981
|
-
...
|
|
2982
|
+
} : R.some((T) => (g[T] || []).includes(L)) ? {
|
|
2983
|
+
...m,
|
|
2982
2984
|
pinned: void 0
|
|
2983
|
-
} :
|
|
2984
|
-
...
|
|
2985
|
+
} : w.includes(L) ? {
|
|
2986
|
+
...m,
|
|
2985
2987
|
pinned: void 0
|
|
2986
|
-
} :
|
|
2987
|
-
}), { columns:
|
|
2988
|
+
} : m;
|
|
2989
|
+
}), { columns: H, frozenData: F } = we(
|
|
2988
2990
|
M,
|
|
2989
|
-
((
|
|
2991
|
+
((Q = n.meta) == null ? void 0 : Q.defaultColDef) || e.defaultColDef || void 0
|
|
2990
2992
|
);
|
|
2991
2993
|
return {
|
|
2992
2994
|
...e,
|
|
2993
|
-
columns:
|
|
2994
|
-
frozenColumns:
|
|
2995
|
+
columns: H,
|
|
2996
|
+
frozenColumns: F
|
|
2995
2997
|
};
|
|
2996
2998
|
}
|
|
2997
2999
|
case a.TOGGLE_FREEZE_COLUMN: {
|
|
2998
3000
|
const {
|
|
2999
3001
|
field: s,
|
|
3000
3002
|
column: g,
|
|
3001
|
-
frozen:
|
|
3002
|
-
options:
|
|
3003
|
+
frozen: p = !1,
|
|
3004
|
+
options: B = {}
|
|
3003
3005
|
} = n.payload, I = ct({
|
|
3004
3006
|
state: e,
|
|
3005
3007
|
freezeColumnField: s,
|
|
3006
3008
|
column: g,
|
|
3007
|
-
frozen:
|
|
3008
|
-
options:
|
|
3009
|
+
frozen: p,
|
|
3010
|
+
options: B
|
|
3009
3011
|
});
|
|
3010
3012
|
return {
|
|
3011
3013
|
...e,
|
|
@@ -3013,11 +3015,11 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3013
3015
|
};
|
|
3014
3016
|
}
|
|
3015
3017
|
case a.REORDER_COLUMNS: {
|
|
3016
|
-
const { sourceColumn: s, targetColumn: g } = n.payload,
|
|
3017
|
-
var
|
|
3018
|
-
return
|
|
3019
|
-
}, M =
|
|
3020
|
-
if (g.is_frozen && !s.is_frozen && M &&
|
|
3018
|
+
const { sourceColumn: s, targetColumn: g } = n.payload, p = e.frozenColumns.totalWidth, B = ((G = (Y = e.tableInstance) == null ? void 0 : Y.current) == null ? void 0 : G.clientWidth) || 0, I = [...e.columns], R = s.children && s.children.length > 0, w = (P) => {
|
|
3019
|
+
var b;
|
|
3020
|
+
return P.children && P.children.length > 0 ? P.children.reduce((ee, J) => ee + w(J), 0) : P.width || ((b = e.defaultColDef) == null ? void 0 : b.minWidth) || 150;
|
|
3021
|
+
}, M = R ? w(s) : s.width || ((K = e.defaultColDef) == null ? void 0 : K.minWidth) || 150;
|
|
3022
|
+
if (g.is_frozen && !s.is_frozen && M && p + M > B * 0.7)
|
|
3021
3023
|
return {
|
|
3022
3024
|
...e,
|
|
3023
3025
|
notification: {
|
|
@@ -3033,39 +3035,39 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3033
3035
|
sourceColumn: s,
|
|
3034
3036
|
targetColumn: g
|
|
3035
3037
|
}), e;
|
|
3036
|
-
let
|
|
3037
|
-
|
|
3038
|
+
let H = [...I];
|
|
3039
|
+
H = Zn(
|
|
3038
3040
|
s,
|
|
3039
3041
|
g,
|
|
3040
|
-
|
|
3041
|
-
),
|
|
3042
|
-
|
|
3042
|
+
H
|
|
3043
|
+
), H.forEach((P, b) => {
|
|
3044
|
+
P.order_of_display = b + 1;
|
|
3043
3045
|
});
|
|
3044
|
-
const { initialGroupedColumns:
|
|
3045
|
-
|
|
3046
|
+
const { initialGroupedColumns: F } = Oe(
|
|
3047
|
+
H,
|
|
3046
3048
|
e.expandedColumnGroups || {},
|
|
3047
3049
|
0,
|
|
3048
3050
|
null,
|
|
3049
3051
|
((j = e.defaultColDef) == null ? void 0 : j.minWidth) || 150
|
|
3050
|
-
),
|
|
3051
|
-
|
|
3052
|
-
|
|
3052
|
+
), m = { ...e.expandedColumnGroups };
|
|
3053
|
+
F.forEach((P) => {
|
|
3054
|
+
m[P] !== !0 && (m[P] = !0);
|
|
3053
3055
|
});
|
|
3054
|
-
const { processedColumns:
|
|
3055
|
-
|
|
3056
|
-
|
|
3056
|
+
const { processedColumns: L } = Oe(
|
|
3057
|
+
H,
|
|
3058
|
+
m,
|
|
3057
3059
|
0,
|
|
3058
3060
|
null,
|
|
3059
3061
|
((Z = e.defaultColDef) == null ? void 0 : Z.minWidth) || 150
|
|
3060
|
-
), { columns:
|
|
3061
|
-
|
|
3062
|
+
), { columns: y, frozenData: T } = we(
|
|
3063
|
+
L,
|
|
3062
3064
|
(($ = n.meta) == null ? void 0 : $.defaultColDef) || e.defaultColDef || void 0
|
|
3063
3065
|
);
|
|
3064
3066
|
return {
|
|
3065
3067
|
...e,
|
|
3066
|
-
columns:
|
|
3067
|
-
frozenColumns:
|
|
3068
|
-
expandedColumnGroups:
|
|
3068
|
+
columns: y,
|
|
3069
|
+
frozenColumns: T,
|
|
3070
|
+
expandedColumnGroups: m
|
|
3069
3071
|
};
|
|
3070
3072
|
}
|
|
3071
3073
|
case a.SET_PREV_ACTION:
|
|
@@ -3079,65 +3081,70 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3079
3081
|
checkConfiguration: n.payload
|
|
3080
3082
|
};
|
|
3081
3083
|
case a.SET_IS_SELECT_ALL_RECORDS: {
|
|
3082
|
-
const s = (
|
|
3084
|
+
const s = (ne = e.api) == null ? void 0 : ne.getInfiniteCache();
|
|
3083
3085
|
let g = [];
|
|
3084
3086
|
e.serverSide ? g = (s == null ? void 0 : s.getAllCachedData()) || e.data || [] : g = (s == null ? void 0 : s.params.datasource.getWholeData()) || e.data || [];
|
|
3085
|
-
let
|
|
3087
|
+
let p = g;
|
|
3086
3088
|
if (!e.serverSide && e.columnFilters && Object.keys(e.columnFilters).length > 0) {
|
|
3087
|
-
const
|
|
3089
|
+
const y = zn(
|
|
3088
3090
|
e.columns
|
|
3089
3091
|
);
|
|
3090
|
-
|
|
3092
|
+
p = st(
|
|
3091
3093
|
g,
|
|
3092
3094
|
e.columnFilters,
|
|
3093
|
-
|
|
3095
|
+
y
|
|
3094
3096
|
);
|
|
3095
3097
|
}
|
|
3096
|
-
const
|
|
3097
|
-
for (let
|
|
3098
|
-
const
|
|
3099
|
-
|
|
3098
|
+
const B = {};
|
|
3099
|
+
for (let y = 0; y < p.length; y++) {
|
|
3100
|
+
const T = p[y], P = String(T[e.uniqueIdField]);
|
|
3101
|
+
T != null && T.__parentPath || T != null && T.isChildGroup || (B[P] = !0);
|
|
3100
3102
|
}
|
|
3101
|
-
let I = [],
|
|
3103
|
+
let I = [], R = {}, w = {};
|
|
3102
3104
|
if (n.payload) {
|
|
3103
|
-
I = [...e.selectedRows],
|
|
3104
|
-
for (const
|
|
3105
|
-
|
|
3105
|
+
I = [...e.selectedRows], R = { ...e.selectedRowsObject }, w = { ...e.unCheckedRows };
|
|
3106
|
+
for (const y in B)
|
|
3107
|
+
R[y] || (I.push(y), R[y] = !0), delete w[y];
|
|
3106
3108
|
} else if (!n.payload && Object.keys(e.columnFilters).length === 0)
|
|
3107
|
-
I = [],
|
|
3109
|
+
I = [], R = {}, w = {}, p = p.map((y) => y.is_selected ? { ...y, is_selected: !1 } : y);
|
|
3108
3110
|
else {
|
|
3109
|
-
|
|
3110
|
-
for (let
|
|
3111
|
-
const
|
|
3112
|
-
T
|
|
3111
|
+
w = { ...e.unCheckedRows };
|
|
3112
|
+
for (let y = 0; y < e.selectedRows.length; y++) {
|
|
3113
|
+
const T = e.selectedRows[y];
|
|
3114
|
+
B[T] ? w[T] = !0 : (I.push(T), R[T] = !0);
|
|
3113
3115
|
}
|
|
3114
3116
|
}
|
|
3115
3117
|
let M = !0;
|
|
3116
|
-
for (const
|
|
3117
|
-
if (!
|
|
3118
|
+
for (const y in B)
|
|
3119
|
+
if (!R[y]) {
|
|
3118
3120
|
M = !1;
|
|
3119
3121
|
break;
|
|
3120
3122
|
}
|
|
3121
|
-
const
|
|
3122
|
-
|
|
3123
|
+
const H = I.length === 0 ? !1 : M, F = I.length === 0 ? {} : w;
|
|
3124
|
+
Je({
|
|
3123
3125
|
state: e,
|
|
3124
3126
|
action: { payload: I }
|
|
3125
|
-
})
|
|
3127
|
+
});
|
|
3128
|
+
const { pageSize: m, currentLoadedPage: L } = e.pagination;
|
|
3129
|
+
return p = p.slice(
|
|
3130
|
+
(L - 1) * m,
|
|
3131
|
+
L * m
|
|
3132
|
+
), {
|
|
3126
3133
|
...e,
|
|
3127
|
-
filteredData:
|
|
3128
|
-
isSelectAllRecords:
|
|
3134
|
+
filteredData: p,
|
|
3135
|
+
isSelectAllRecords: H,
|
|
3129
3136
|
selectedRows: I,
|
|
3130
|
-
selectedRowsObject:
|
|
3131
|
-
unCheckedRows:
|
|
3137
|
+
selectedRowsObject: R,
|
|
3138
|
+
unCheckedRows: F,
|
|
3132
3139
|
isSelectionChanged: !1,
|
|
3133
|
-
checkConfiguration:
|
|
3140
|
+
checkConfiguration: H ? e.checkConfiguration : []
|
|
3134
3141
|
};
|
|
3135
3142
|
}
|
|
3136
3143
|
case a.BATCH_UPDATE: {
|
|
3137
|
-
const { prevAction: s, checkConfiguration: g, isSelectAllRecords:
|
|
3138
|
-
return s !== void 0 && s !== e.prevAction && (
|
|
3144
|
+
const { prevAction: s, checkConfiguration: g, isSelectAllRecords: p } = n.payload, B = {};
|
|
3145
|
+
return s !== void 0 && s !== e.prevAction && (B.prevAction = s), g !== void 0 && JSON.stringify(g) !== JSON.stringify(e.checkConfiguration) && (B.checkConfiguration = g), p !== void 0 && p !== e.isSelectAllRecords && (B.isSelectAllRecords = p), Object.keys(B).length === 0 ? e : {
|
|
3139
3146
|
...e,
|
|
3140
|
-
...
|
|
3147
|
+
...B
|
|
3141
3148
|
};
|
|
3142
3149
|
}
|
|
3143
3150
|
// Master-Detail functionality
|
|
@@ -3145,18 +3152,18 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3145
3152
|
const {
|
|
3146
3153
|
rowId: s,
|
|
3147
3154
|
rowData: g,
|
|
3148
|
-
rowIndex:
|
|
3149
|
-
currentRowStyles:
|
|
3155
|
+
rowIndex: p,
|
|
3156
|
+
currentRowStyles: B
|
|
3150
3157
|
} = n.payload, I = ((q = e.masterDetail) == null ? void 0 : q.expandedRows) || [];
|
|
3151
|
-
let
|
|
3152
|
-
return I.includes(s) ? (
|
|
3158
|
+
let R, w = null, M = !1;
|
|
3159
|
+
return I.includes(s) ? (R = [], M = !0) : (R = [s], w = g), {
|
|
3153
3160
|
...e,
|
|
3154
3161
|
masterDetail: {
|
|
3155
3162
|
...e.masterDetail,
|
|
3156
|
-
expandedRows:
|
|
3157
|
-
expandedRowData:
|
|
3158
|
-
currentRowStyles:
|
|
3159
|
-
rowIndex: M ? null :
|
|
3163
|
+
expandedRows: R,
|
|
3164
|
+
expandedRowData: w,
|
|
3165
|
+
currentRowStyles: B,
|
|
3166
|
+
rowIndex: M ? null : p
|
|
3160
3167
|
}
|
|
3161
3168
|
};
|
|
3162
3169
|
}
|
|
@@ -3177,53 +3184,53 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3177
3184
|
}
|
|
3178
3185
|
};
|
|
3179
3186
|
case a.ADD_EVENT_LISTENER: {
|
|
3180
|
-
const { eventType: s, listener: g, once:
|
|
3181
|
-
return
|
|
3182
|
-
(
|
|
3183
|
-
) ||
|
|
3187
|
+
const { eventType: s, listener: g, once: p = !1 } = n.payload, B = { ...e.eventListeners };
|
|
3188
|
+
return B[s] || (B[s] = []), B[s].some(
|
|
3189
|
+
(R) => R.fn === g
|
|
3190
|
+
) || B[s].push({
|
|
3184
3191
|
fn: g,
|
|
3185
|
-
once:
|
|
3192
|
+
once: p
|
|
3186
3193
|
}), {
|
|
3187
3194
|
...e,
|
|
3188
|
-
eventListeners:
|
|
3195
|
+
eventListeners: B
|
|
3189
3196
|
};
|
|
3190
3197
|
}
|
|
3191
3198
|
case a.REMOVE_EVENT_LISTENER: {
|
|
3192
3199
|
const { eventType: s, listener: g } = n.payload;
|
|
3193
3200
|
if (!e.eventListeners[s])
|
|
3194
3201
|
return e;
|
|
3195
|
-
const
|
|
3202
|
+
const p = e.eventListeners[s].filter(
|
|
3196
3203
|
(I) => I.fn !== g
|
|
3197
|
-
),
|
|
3198
|
-
return
|
|
3204
|
+
), B = { ...e.eventListeners };
|
|
3205
|
+
return p.length === 0 ? delete B[s] : B[s] = p, {
|
|
3199
3206
|
...e,
|
|
3200
|
-
eventListeners:
|
|
3207
|
+
eventListeners: B
|
|
3201
3208
|
};
|
|
3202
3209
|
}
|
|
3203
3210
|
// Column grouping functionality
|
|
3204
3211
|
case a.TOGGLE_COLUMN_GROUP: {
|
|
3205
|
-
const { field: s } = n.payload, g = e.expandedColumnGroups || {},
|
|
3206
|
-
if (!
|
|
3207
|
-
const
|
|
3208
|
-
for (const
|
|
3209
|
-
if (v(
|
|
3210
|
-
return
|
|
3211
|
-
if (
|
|
3212
|
-
const
|
|
3213
|
-
if (
|
|
3212
|
+
const { field: s } = n.payload, g = e.expandedColumnGroups || {}, p = g[s] === !0;
|
|
3213
|
+
if (!p) {
|
|
3214
|
+
const H = (m, L) => {
|
|
3215
|
+
for (const y of m) {
|
|
3216
|
+
if (v(y) === L)
|
|
3217
|
+
return y;
|
|
3218
|
+
if (y.children && y.children.length > 0) {
|
|
3219
|
+
const T = H(y.children, L);
|
|
3220
|
+
if (T) return T;
|
|
3214
3221
|
}
|
|
3215
3222
|
}
|
|
3216
3223
|
return null;
|
|
3217
|
-
},
|
|
3224
|
+
}, F = H(
|
|
3218
3225
|
e.columns,
|
|
3219
3226
|
s
|
|
3220
3227
|
);
|
|
3221
|
-
if (
|
|
3222
|
-
const
|
|
3228
|
+
if (F && F.is_frozen) {
|
|
3229
|
+
const m = ((te = (V = e.tableInstance) == null ? void 0 : V.current) == null ? void 0 : te.clientWidth) || 0, L = ((le = e.frozenColumns) == null ? void 0 : le.totalWidth) || 0, y = (J) => {
|
|
3223
3230
|
var re;
|
|
3224
|
-
return !J.children || J.children.length === 0 ? J.width || ((re = e.defaultColDef) == null ? void 0 : re.minWidth) || 150 : J.children.reduce((Ee, Ie) => Ee +
|
|
3225
|
-
},
|
|
3226
|
-
if (
|
|
3231
|
+
return !J.children || J.children.length === 0 ? J.width || ((re = e.defaultColDef) == null ? void 0 : re.minWidth) || 150 : J.children.reduce((Ee, Ie) => Ee + y(Ie), 0);
|
|
3232
|
+
}, T = F.width || ((se = e.defaultColDef) == null ? void 0 : se.minWidth) || 150, b = y(F) - T, ee = L + b;
|
|
3233
|
+
if (m > 0 && ee > m * 0.7)
|
|
3227
3234
|
return {
|
|
3228
3235
|
...e,
|
|
3229
3236
|
notification: {
|
|
@@ -3237,21 +3244,21 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3237
3244
|
}
|
|
3238
3245
|
const I = {
|
|
3239
3246
|
...g,
|
|
3240
|
-
[s]: !
|
|
3241
|
-
}, { processedColumns:
|
|
3247
|
+
[s]: !p
|
|
3248
|
+
}, { processedColumns: R } = Oe(
|
|
3242
3249
|
e.columns,
|
|
3243
3250
|
I,
|
|
3244
3251
|
0,
|
|
3245
3252
|
null,
|
|
3246
3253
|
((fe = e.defaultColDef) == null ? void 0 : fe.minWidth) || 150
|
|
3247
|
-
), { columns:
|
|
3248
|
-
|
|
3254
|
+
), { columns: w, frozenData: M } = we(
|
|
3255
|
+
R,
|
|
3249
3256
|
e.defaultColDef || { minWidth: 150 }
|
|
3250
3257
|
);
|
|
3251
3258
|
return {
|
|
3252
3259
|
...e,
|
|
3253
3260
|
expandedColumnGroups: I,
|
|
3254
|
-
columns:
|
|
3261
|
+
columns: w,
|
|
3255
3262
|
frozenColumns: M
|
|
3256
3263
|
};
|
|
3257
3264
|
}
|
|
@@ -3262,7 +3269,7 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3262
3269
|
0,
|
|
3263
3270
|
null,
|
|
3264
3271
|
((ge = e.defaultColDef) == null ? void 0 : ge.minWidth) || 150
|
|
3265
|
-
), { columns: g, frozenData:
|
|
3272
|
+
), { columns: g, frozenData: p } = we(
|
|
3266
3273
|
s,
|
|
3267
3274
|
e.defaultColDef || { minWidth: 150 }
|
|
3268
3275
|
);
|
|
@@ -3270,64 +3277,64 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3270
3277
|
...e,
|
|
3271
3278
|
expandedColumnGroups: n.payload,
|
|
3272
3279
|
columns: g,
|
|
3273
|
-
frozenColumns:
|
|
3280
|
+
frozenColumns: p
|
|
3274
3281
|
};
|
|
3275
3282
|
}
|
|
3276
3283
|
// Row drag preview functionality with swap animation
|
|
3277
3284
|
case a.PREVIEW_ROW_MOVE: {
|
|
3278
|
-
const { fromIndex: s, toIndex: g, fromRowData:
|
|
3285
|
+
const { fromIndex: s, toIndex: g, fromRowData: p, isDraggingDownward: B } = n.payload;
|
|
3279
3286
|
if (e.previewMode) {
|
|
3280
|
-
const I = e.originalFromIndex,
|
|
3281
|
-
|
|
3282
|
-
|
|
3287
|
+
const I = e.originalFromIndex, R = [...e.originalData ?? []], w = e.hasExpandedChildren;
|
|
3288
|
+
R.forEach((F, m) => {
|
|
3289
|
+
m === I ? (F._animationState = "moving", F._isDraggedRow = !0, F._hasExpandedChildren = w) : (m >= Math.min(I ?? 0, g) && m <= Math.max(I ?? 0, g) || m >= Math.min(I ?? 0, e.lastToIndex ?? 0) && m <= Math.max(I ?? 0, e.lastToIndex ?? 0)) && (F._animationState = "affected");
|
|
3283
3290
|
});
|
|
3284
|
-
const [M] =
|
|
3285
|
-
let
|
|
3286
|
-
if (
|
|
3287
|
-
const
|
|
3288
|
-
|
|
3289
|
-
g -
|
|
3291
|
+
const [M] = R.splice(I ?? 0, 1);
|
|
3292
|
+
let H = g;
|
|
3293
|
+
if (w && B) {
|
|
3294
|
+
const F = p == null ? void 0 : p[e.childKeyField], m = (F == null ? void 0 : F.length) || 0;
|
|
3295
|
+
m > 0 && e.expandedChildRows[p == null ? void 0 : p[e.uniqueIdField]] && (H = Math.max(
|
|
3296
|
+
g - m,
|
|
3290
3297
|
(I ?? 0) + 1
|
|
3291
3298
|
));
|
|
3292
3299
|
}
|
|
3293
|
-
return
|
|
3300
|
+
return R.splice(H, 0, M), {
|
|
3294
3301
|
...e,
|
|
3295
3302
|
originalData: e.originalData,
|
|
3296
3303
|
// Keep the original data unchanged
|
|
3297
|
-
filteredData:
|
|
3304
|
+
filteredData: R,
|
|
3298
3305
|
previewMode: !0,
|
|
3299
3306
|
originalFromIndex: I,
|
|
3300
3307
|
// Keep the original fromIndex unchanged
|
|
3301
|
-
lastToIndex:
|
|
3308
|
+
lastToIndex: H,
|
|
3302
3309
|
// Update the last position
|
|
3303
|
-
hasExpandedChildren:
|
|
3310
|
+
hasExpandedChildren: w,
|
|
3304
3311
|
// Maintain whether the dragged row has expanded children
|
|
3305
|
-
isDraggingDownward:
|
|
3312
|
+
isDraggingDownward: B
|
|
3306
3313
|
// Update the drag direction
|
|
3307
3314
|
};
|
|
3308
3315
|
} else {
|
|
3309
|
-
const I = [...e.filteredData || []],
|
|
3310
|
-
|
|
3311
|
-
|
|
3316
|
+
const I = [...e.filteredData || []], R = [...I], w = p == null ? void 0 : p[e.childKeyField], M = p && w && Array.isArray(w) && w.length > 0;
|
|
3317
|
+
R.forEach((m, L) => {
|
|
3318
|
+
L === s ? (m._animationState = "moving", m._isDraggedRow = !0, m._hasExpandedChildren = M) : L >= Math.min(s, g) && L <= Math.max(s, g) && (m._animationState = "affected");
|
|
3312
3319
|
});
|
|
3313
|
-
const [
|
|
3314
|
-
let
|
|
3315
|
-
if (M &&
|
|
3316
|
-
const
|
|
3317
|
-
|
|
3320
|
+
const [H] = R.splice(s, 1);
|
|
3321
|
+
let F = g;
|
|
3322
|
+
if (M && B) {
|
|
3323
|
+
const m = (w == null ? void 0 : w.length) || 0;
|
|
3324
|
+
m > 0 && (F = Math.max(g - m, s + 1));
|
|
3318
3325
|
}
|
|
3319
|
-
return
|
|
3326
|
+
return R.splice(F, 0, H), {
|
|
3320
3327
|
...e,
|
|
3321
3328
|
originalData: I,
|
|
3322
|
-
filteredData:
|
|
3329
|
+
filteredData: R,
|
|
3323
3330
|
previewMode: !0,
|
|
3324
3331
|
originalFromIndex: s,
|
|
3325
3332
|
// Store the original fromIndex
|
|
3326
|
-
lastToIndex:
|
|
3333
|
+
lastToIndex: F,
|
|
3327
3334
|
// Track the last position for animation
|
|
3328
3335
|
hasExpandedChildren: M,
|
|
3329
3336
|
// Store whether the dragged row has expanded children
|
|
3330
|
-
isDraggingDownward:
|
|
3337
|
+
isDraggingDownward: B
|
|
3331
3338
|
// Store the drag direction
|
|
3332
3339
|
};
|
|
3333
3340
|
}
|
|
@@ -3363,79 +3370,79 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3363
3370
|
const {
|
|
3364
3371
|
groupId: s,
|
|
3365
3372
|
rowIndex: g,
|
|
3366
|
-
extra: { fieldName:
|
|
3367
|
-
} = n.payload, { expandedGroups: I, loadedData:
|
|
3368
|
-
let
|
|
3369
|
-
if (
|
|
3370
|
-
|
|
3373
|
+
extra: { fieldName: p, value: B }
|
|
3374
|
+
} = n.payload, { expandedGroups: I, loadedData: R } = e.rowGroupState, w = !((ue = I[s]) != null && ue[s]), M = [...e.filteredData ?? []], H = R[s] || [], F = { ...I };
|
|
3375
|
+
let m = 0;
|
|
3376
|
+
if (w)
|
|
3377
|
+
H.length && (M.splice(g + 1, 0, ...H), m = H.length);
|
|
3371
3378
|
else {
|
|
3372
|
-
let
|
|
3373
|
-
for (let
|
|
3374
|
-
if ((M[
|
|
3375
|
-
|
|
3379
|
+
let T = -1;
|
|
3380
|
+
for (let b = 0; b < M.length; b++)
|
|
3381
|
+
if ((M[b].id || M[b][e.uniqueIdField]) == s) {
|
|
3382
|
+
T = b;
|
|
3376
3383
|
break;
|
|
3377
3384
|
}
|
|
3378
|
-
|
|
3379
|
-
let
|
|
3380
|
-
Object.keys(I).forEach((
|
|
3381
|
-
|
|
3382
|
-
}), M.splice(
|
|
3385
|
+
T === -1 && (T = ((ie = I[s]) == null ? void 0 : ie.rowIndex) || g);
|
|
3386
|
+
let P = 0;
|
|
3387
|
+
Object.keys(I).forEach((b) => {
|
|
3388
|
+
b.startsWith(s) && (delete F[b], P += I[b].count);
|
|
3389
|
+
}), M.splice(T + 1, P);
|
|
3383
3390
|
}
|
|
3384
|
-
const
|
|
3385
|
-
let
|
|
3386
|
-
return e.purgeClosedRowNodes && !
|
|
3387
|
-
(
|
|
3388
|
-
).forEach((
|
|
3389
|
-
delete
|
|
3390
|
-
}),
|
|
3391
|
-
...
|
|
3391
|
+
const L = { ...R };
|
|
3392
|
+
let y = { ...e.rowGroupState.pagination };
|
|
3393
|
+
return e.purgeClosedRowNodes && !w && (Object.keys(I).filter(
|
|
3394
|
+
(P) => P.startsWith(s)
|
|
3395
|
+
).forEach((P) => {
|
|
3396
|
+
delete L[P], delete y[P];
|
|
3397
|
+
}), y = {
|
|
3398
|
+
...y,
|
|
3392
3399
|
[s]: {
|
|
3393
|
-
...
|
|
3400
|
+
...y[s],
|
|
3394
3401
|
hasMore: !1
|
|
3395
3402
|
}
|
|
3396
3403
|
}), (oe = (de = e.callBackRef) == null ? void 0 : de.current) != null && oe.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
|
|
3397
3404
|
rowId: s,
|
|
3398
3405
|
rowIndex: g,
|
|
3399
3406
|
api: e.api,
|
|
3400
|
-
isExpanded:
|
|
3407
|
+
isExpanded: w
|
|
3401
3408
|
}), {
|
|
3402
3409
|
...e,
|
|
3403
3410
|
filteredData: M,
|
|
3404
3411
|
data: M,
|
|
3405
3412
|
rowGroupState: {
|
|
3406
3413
|
...e.rowGroupState,
|
|
3407
|
-
isLoadingSomething:
|
|
3408
|
-
loadedData:
|
|
3409
|
-
pagination:
|
|
3410
|
-
expandedGroups:
|
|
3414
|
+
isLoadingSomething: w,
|
|
3415
|
+
loadedData: L,
|
|
3416
|
+
pagination: y,
|
|
3417
|
+
expandedGroups: w ? {
|
|
3411
3418
|
...e.rowGroupState.expandedGroups,
|
|
3412
3419
|
[s]: {
|
|
3413
|
-
[s]:
|
|
3420
|
+
[s]: w,
|
|
3414
3421
|
rowIndex: g,
|
|
3415
|
-
count:
|
|
3416
|
-
fieldName:
|
|
3417
|
-
value:
|
|
3422
|
+
count: m,
|
|
3423
|
+
fieldName: p,
|
|
3424
|
+
value: B
|
|
3418
3425
|
}
|
|
3419
|
-
} :
|
|
3426
|
+
} : F
|
|
3420
3427
|
}
|
|
3421
3428
|
};
|
|
3422
3429
|
}
|
|
3423
3430
|
case a.SET_ROW_GROUP_DATA: {
|
|
3424
|
-
const { groupId: s, data: g, append:
|
|
3425
|
-
...
|
|
3431
|
+
const { groupId: s, data: g, append: p } = n.payload, B = s.split("/").length, I = g.map((F, m) => ({
|
|
3432
|
+
...F,
|
|
3426
3433
|
isChildGroup: !0,
|
|
3427
|
-
childIndex:
|
|
3428
|
-
groupingLevel:
|
|
3429
|
-
__parentPath:
|
|
3430
|
-
})),
|
|
3431
|
-
if (
|
|
3432
|
-
const
|
|
3433
|
-
|
|
3434
|
+
childIndex: m,
|
|
3435
|
+
groupingLevel: B,
|
|
3436
|
+
__parentPath: F.__parentPath ? `${F.__parentPath}/${s}` : s
|
|
3437
|
+
})), R = (Ce = e.rowGroupState.expandedGroups[s]) == null ? void 0 : Ce.rowIndex, w = e.rowGroupState.loadedData[s] || [], M = p ? [...w, ...I] : I, H = [...e.filteredData ?? []];
|
|
3438
|
+
if (R >= 0) {
|
|
3439
|
+
const F = p ? R + 1 + w.length : R + 1;
|
|
3440
|
+
H.splice(F, 0, ...I);
|
|
3434
3441
|
}
|
|
3435
3442
|
return e.rowGroupState.expandedGroups[s] ? {
|
|
3436
3443
|
...e,
|
|
3437
|
-
filteredData:
|
|
3438
|
-
data:
|
|
3444
|
+
filteredData: H,
|
|
3445
|
+
data: H,
|
|
3439
3446
|
rowGroupState: {
|
|
3440
3447
|
...e.rowGroupState,
|
|
3441
3448
|
loadedData: {
|
|
@@ -3493,18 +3500,18 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3493
3500
|
};
|
|
3494
3501
|
}
|
|
3495
3502
|
case a.CLEAR_ROW_GROUP_CACHE: {
|
|
3496
|
-
const { groupId: s } = n.payload, g = { ...e.rowGroupState.loadedData },
|
|
3497
|
-
return s ? (delete g[s], delete
|
|
3498
|
-
(I) => delete
|
|
3503
|
+
const { groupId: s } = n.payload, g = { ...e.rowGroupState.loadedData }, p = { ...e.rowGroupState.pagination }, B = { ...e.rowGroupState.cache.metadata };
|
|
3504
|
+
return s ? (delete g[s], delete p[s], delete B[s]) : (Object.keys(g).forEach((I) => delete g[I]), Object.keys(p).forEach((I) => delete p[I]), Object.keys(B).forEach(
|
|
3505
|
+
(I) => delete B[I]
|
|
3499
3506
|
)), {
|
|
3500
3507
|
...e,
|
|
3501
3508
|
rowGroupState: {
|
|
3502
3509
|
...e.rowGroupState,
|
|
3503
3510
|
loadedData: g,
|
|
3504
|
-
pagination:
|
|
3511
|
+
pagination: p,
|
|
3505
3512
|
cache: {
|
|
3506
3513
|
...e.rowGroupState.cache,
|
|
3507
|
-
metadata:
|
|
3514
|
+
metadata: B
|
|
3508
3515
|
}
|
|
3509
3516
|
}
|
|
3510
3517
|
};
|
|
@@ -3514,9 +3521,9 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3514
3521
|
return s && g[s] ? g[s] = {
|
|
3515
3522
|
...g[s],
|
|
3516
3523
|
lastUpdated: Date.now()
|
|
3517
|
-
} : s || Object.keys(g).forEach((
|
|
3518
|
-
g[
|
|
3519
|
-
...g[
|
|
3524
|
+
} : s || Object.keys(g).forEach((p) => {
|
|
3525
|
+
g[p] = {
|
|
3526
|
+
...g[p],
|
|
3520
3527
|
lastUpdated: Date.now()
|
|
3521
3528
|
};
|
|
3522
3529
|
}), {
|
|
@@ -3608,16 +3615,16 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3608
3615
|
s,
|
|
3609
3616
|
0,
|
|
3610
3617
|
null,
|
|
3611
|
-
((
|
|
3612
|
-
), { columns:
|
|
3618
|
+
((z = e.defaultColDef) == null ? void 0 : z.minWidth) || 150
|
|
3619
|
+
), { columns: p, frozenData: B } = we(
|
|
3613
3620
|
g,
|
|
3614
3621
|
e.defaultColDef || { minWidth: 150 }
|
|
3615
3622
|
);
|
|
3616
3623
|
return {
|
|
3617
3624
|
...e,
|
|
3618
3625
|
expandedColumnGroups: s,
|
|
3619
|
-
columns:
|
|
3620
|
-
frozenColumns:
|
|
3626
|
+
columns: p,
|
|
3627
|
+
frozenColumns: B
|
|
3621
3628
|
};
|
|
3622
3629
|
}
|
|
3623
3630
|
case a.SET_SMART_GRID_MENU_OPTIONS:
|
|
@@ -3731,116 +3738,116 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3731
3738
|
if (!s && be(e))
|
|
3732
3739
|
return e;
|
|
3733
3740
|
if (s) {
|
|
3734
|
-
const g = Xe(e),
|
|
3735
|
-
let
|
|
3736
|
-
const { uniqueIdField:
|
|
3737
|
-
for (const
|
|
3738
|
-
const
|
|
3739
|
-
if (
|
|
3740
|
-
let
|
|
3741
|
-
if (
|
|
3741
|
+
const g = Xe(e), p = e.columns.some((m) => m.aggFunc), B = [], I = {};
|
|
3742
|
+
let R = 0;
|
|
3743
|
+
const { uniqueIdField: w, childKeyField: M, rowSpanColumn: H, api: F } = e;
|
|
3744
|
+
for (const m of g) {
|
|
3745
|
+
const L = String(m[w]), y = m[M] || [];
|
|
3746
|
+
if (y.length > 0) {
|
|
3747
|
+
let P, b = null;
|
|
3748
|
+
if (p) {
|
|
3742
3749
|
const { aggreRow: re, aggreChildRows: Ee } = Pe(
|
|
3743
3750
|
e,
|
|
3751
|
+
y,
|
|
3744
3752
|
m,
|
|
3745
|
-
w,
|
|
3746
3753
|
1,
|
|
3747
|
-
|
|
3748
|
-
|
|
3754
|
+
R,
|
|
3755
|
+
L
|
|
3749
3756
|
);
|
|
3750
|
-
|
|
3757
|
+
b = re, P = Ee;
|
|
3751
3758
|
} else
|
|
3752
|
-
|
|
3759
|
+
P = y.map(
|
|
3753
3760
|
(re) => ({
|
|
3754
3761
|
...re,
|
|
3755
|
-
__parentPath:
|
|
3762
|
+
__parentPath: L,
|
|
3756
3763
|
level: 1,
|
|
3757
|
-
parentRowIndex:
|
|
3758
|
-
parentRowData:
|
|
3764
|
+
parentRowIndex: R,
|
|
3765
|
+
parentRowData: m,
|
|
3759
3766
|
groupingLevel: 1
|
|
3760
3767
|
})
|
|
3761
3768
|
);
|
|
3762
|
-
const
|
|
3763
|
-
I[
|
|
3764
|
-
rowId:
|
|
3765
|
-
rowIndex:
|
|
3766
|
-
childRowsCount:
|
|
3769
|
+
const ee = y.length + (b ? 1 : 0);
|
|
3770
|
+
I[L] = {
|
|
3771
|
+
rowId: L,
|
|
3772
|
+
rowIndex: R,
|
|
3773
|
+
childRowsCount: ee
|
|
3767
3774
|
};
|
|
3768
|
-
const J =
|
|
3769
|
-
[
|
|
3770
|
-
|
|
3771
|
-
|
|
3775
|
+
const J = Ge(
|
|
3776
|
+
[m, ...P],
|
|
3777
|
+
H,
|
|
3778
|
+
F
|
|
3772
3779
|
);
|
|
3773
|
-
|
|
3780
|
+
b ? (B.push(...J, b), R += J.length + 1) : (B.push(...J), R += J.length);
|
|
3774
3781
|
} else
|
|
3775
|
-
|
|
3782
|
+
B.push(m), R += 1;
|
|
3776
3783
|
}
|
|
3777
|
-
return
|
|
3784
|
+
return me(e, B), {
|
|
3778
3785
|
...e,
|
|
3779
3786
|
expandedChildRows: I,
|
|
3780
|
-
filteredData:
|
|
3781
|
-
data:
|
|
3787
|
+
filteredData: B,
|
|
3788
|
+
data: B
|
|
3782
3789
|
};
|
|
3783
3790
|
} else {
|
|
3784
|
-
const g = Xe(e),
|
|
3785
|
-
if (
|
|
3786
|
-
const { __rowSpanInfo: I, ...
|
|
3787
|
-
return
|
|
3791
|
+
const g = Xe(e), p = e.enableRowSpan ? g.map((B) => {
|
|
3792
|
+
if (B.__rowSpanInfo) {
|
|
3793
|
+
const { __rowSpanInfo: I, ...R } = B;
|
|
3794
|
+
return R;
|
|
3788
3795
|
}
|
|
3789
|
-
return
|
|
3796
|
+
return B;
|
|
3790
3797
|
}) : g;
|
|
3791
|
-
return
|
|
3798
|
+
return me(e, p), {
|
|
3792
3799
|
...e,
|
|
3793
3800
|
expandedChildRows: {},
|
|
3794
|
-
filteredData:
|
|
3795
|
-
data:
|
|
3801
|
+
filteredData: p,
|
|
3802
|
+
data: p
|
|
3796
3803
|
};
|
|
3797
3804
|
}
|
|
3798
3805
|
}
|
|
3799
3806
|
case a.EXPAND_ROW_WITH_NESTED_CHILDREN: {
|
|
3800
|
-
const { rowId: s, rowIndex: g, expand:
|
|
3801
|
-
if (
|
|
3802
|
-
const
|
|
3803
|
-
if (!
|
|
3804
|
-
const
|
|
3805
|
-
const
|
|
3806
|
-
if (
|
|
3807
|
-
const
|
|
3808
|
-
let
|
|
3809
|
-
if (
|
|
3810
|
-
const { aggreRow:
|
|
3807
|
+
const { rowId: s, rowIndex: g, expand: p } = n.payload, { uniqueIdField: B, childKeyField: I, rowSpanColumn: R, api: w, columns: M } = e;
|
|
3808
|
+
if (p) {
|
|
3809
|
+
const H = e.filteredData || [], F = H[g];
|
|
3810
|
+
if (!F) return e;
|
|
3811
|
+
const m = M.some((J) => J.aggFunc), L = { ...e.expandedChildRows }, y = (J, re, Ee, Ie) => {
|
|
3812
|
+
const Re = J[I] || [];
|
|
3813
|
+
if (Re.length === 0) return [J];
|
|
3814
|
+
const Ae = Ie.value;
|
|
3815
|
+
let U, Qe = null;
|
|
3816
|
+
if (m) {
|
|
3817
|
+
const { aggreRow: Te, aggreChildRows: He } = Pe(
|
|
3811
3818
|
e,
|
|
3812
|
-
|
|
3819
|
+
Re,
|
|
3813
3820
|
J,
|
|
3814
3821
|
Ee,
|
|
3815
|
-
|
|
3822
|
+
Ae,
|
|
3816
3823
|
re
|
|
3817
3824
|
);
|
|
3818
|
-
|
|
3825
|
+
Qe = Te, U = He;
|
|
3819
3826
|
} else
|
|
3820
|
-
|
|
3821
|
-
...
|
|
3827
|
+
U = Re.map((Te) => ({
|
|
3828
|
+
...Te,
|
|
3822
3829
|
__parentPath: re,
|
|
3823
3830
|
level: Ee,
|
|
3824
|
-
parentRowIndex:
|
|
3831
|
+
parentRowIndex: Ae,
|
|
3825
3832
|
parentRowData: J,
|
|
3826
3833
|
groupingLevel: Ee
|
|
3827
3834
|
}));
|
|
3828
|
-
|
|
3835
|
+
L[re] = {
|
|
3829
3836
|
rowId: re,
|
|
3830
|
-
rowIndex:
|
|
3831
|
-
childRowsCount:
|
|
3837
|
+
rowIndex: Ae,
|
|
3838
|
+
childRowsCount: Re.length + (Qe ? 1 : 0)
|
|
3832
3839
|
};
|
|
3833
|
-
const rn =
|
|
3834
|
-
[J, ...
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
) : [J, ...
|
|
3840
|
+
const rn = R ? Ge(
|
|
3841
|
+
[J, ...U],
|
|
3842
|
+
R,
|
|
3843
|
+
w
|
|
3844
|
+
) : [J, ...U], Fe = [rn[0]];
|
|
3838
3845
|
Ie.value += 1;
|
|
3839
|
-
const Qn =
|
|
3840
|
-
for (let
|
|
3841
|
-
const He =
|
|
3846
|
+
const Qn = U.length;
|
|
3847
|
+
for (let Te = 0; Te < Qn; Te++) {
|
|
3848
|
+
const He = U[Te], An = rn[Te + 1], je = He[I];
|
|
3842
3849
|
if ((je == null ? void 0 : je.length) > 0) {
|
|
3843
|
-
const Nn = String(He[
|
|
3850
|
+
const Nn = String(He[B]), xn = y(
|
|
3844
3851
|
An,
|
|
3845
3852
|
`${re}/${Nn}`,
|
|
3846
3853
|
Ee + 1,
|
|
@@ -3850,41 +3857,41 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3850
3857
|
} else
|
|
3851
3858
|
Fe.push(An), Ie.value += 1;
|
|
3852
3859
|
}
|
|
3853
|
-
return
|
|
3854
|
-
},
|
|
3860
|
+
return Qe && (Fe.push(Qe), Ie.value += 1), Fe;
|
|
3861
|
+
}, T = y(F, s, 1, {
|
|
3855
3862
|
value: g
|
|
3856
|
-
}),
|
|
3857
|
-
...
|
|
3858
|
-
...
|
|
3859
|
-
...
|
|
3863
|
+
}), P = H.slice(0, g), b = H.slice(g + 1), ee = [
|
|
3864
|
+
...P,
|
|
3865
|
+
...T,
|
|
3866
|
+
...b
|
|
3860
3867
|
];
|
|
3861
|
-
return
|
|
3868
|
+
return me(e, ee), {
|
|
3862
3869
|
...e,
|
|
3863
|
-
expandedChildRows:
|
|
3864
|
-
filteredData:
|
|
3865
|
-
data:
|
|
3870
|
+
expandedChildRows: L,
|
|
3871
|
+
filteredData: ee,
|
|
3872
|
+
data: ee
|
|
3866
3873
|
};
|
|
3867
3874
|
} else {
|
|
3868
3875
|
if (!e.expandedChildRows[s]) return e;
|
|
3869
|
-
const
|
|
3870
|
-
let
|
|
3871
|
-
const
|
|
3872
|
-
for (const
|
|
3873
|
-
(
|
|
3874
|
-
for (const
|
|
3875
|
-
delete
|
|
3876
|
-
const
|
|
3877
|
-
...
|
|
3878
|
-
...
|
|
3876
|
+
const H = e.filteredData || [], F = { ...e.expandedChildRows }, m = `${s}/`;
|
|
3877
|
+
let L = 0;
|
|
3878
|
+
const y = [];
|
|
3879
|
+
for (const P of Object.keys(F))
|
|
3880
|
+
(P === s || P.startsWith(m)) && (L += F[P].childRowsCount, y.push(P));
|
|
3881
|
+
for (const P of y)
|
|
3882
|
+
delete F[P];
|
|
3883
|
+
const T = [
|
|
3884
|
+
...H.slice(0, g + 1),
|
|
3885
|
+
...H.slice(g + 1 + L)
|
|
3879
3886
|
];
|
|
3880
|
-
return (
|
|
3881
|
-
...
|
|
3887
|
+
return (_ = T[g]) != null && _.__rowSpanInfo && (T[g] = {
|
|
3888
|
+
...T[g],
|
|
3882
3889
|
__rowSpanInfo: void 0
|
|
3883
|
-
}),
|
|
3890
|
+
}), me(e, T), {
|
|
3884
3891
|
...e,
|
|
3885
|
-
expandedChildRows:
|
|
3886
|
-
filteredData:
|
|
3887
|
-
data:
|
|
3892
|
+
expandedChildRows: F,
|
|
3893
|
+
filteredData: T,
|
|
3894
|
+
data: T
|
|
3888
3895
|
};
|
|
3889
3896
|
}
|
|
3890
3897
|
}
|
|
@@ -3903,6 +3910,11 @@ const Wt = (e) => /* @__PURE__ */ X.createElement("svg", { width: "1em", height:
|
|
|
3903
3910
|
...e,
|
|
3904
3911
|
isCommentFeatureEnabled: n.payload
|
|
3905
3912
|
};
|
|
3913
|
+
case a.SET_NO_HEADER_SELECTION_CHECKBOX:
|
|
3914
|
+
return {
|
|
3915
|
+
...e,
|
|
3916
|
+
noHeaderSelection: n.payload
|
|
3917
|
+
};
|
|
3906
3918
|
default:
|
|
3907
3919
|
return e;
|
|
3908
3920
|
}
|
|
@@ -3934,7 +3946,7 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
3934
3946
|
return We.get(e);
|
|
3935
3947
|
}, Ln = Pn("default"), Rt = (e) => {
|
|
3936
3948
|
e && e !== "default" && We.delete(e);
|
|
3937
|
-
},
|
|
3949
|
+
}, Tt = (e, n = []) => {
|
|
3938
3950
|
const t = De(null);
|
|
3939
3951
|
return he(() => {
|
|
3940
3952
|
const r = (i) => {
|
|
@@ -3962,7 +3974,7 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
3962
3974
|
// Align with right edge of button
|
|
3963
3975
|
AUTO: "auto"
|
|
3964
3976
|
// Automatically determine based on available space
|
|
3965
|
-
},
|
|
3977
|
+
}, mt = (e, n, t, r, i) => {
|
|
3966
3978
|
const A = {};
|
|
3967
3979
|
switch (e) {
|
|
3968
3980
|
case ce.TOP:
|
|
@@ -3998,83 +4010,83 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
3998
4010
|
parentOptionRef: f = null,
|
|
3999
4011
|
skipAnimation: C = !1,
|
|
4000
4012
|
// Skip animation for submenus
|
|
4001
|
-
portalContainer:
|
|
4013
|
+
portalContainer: N = document.body,
|
|
4002
4014
|
additionalButtons: l = null,
|
|
4003
|
-
forcePosition:
|
|
4015
|
+
forcePosition: h = !1,
|
|
4004
4016
|
// When true, prevents position flipping even if there's not enough space
|
|
4005
4017
|
anchorOrigin: O,
|
|
4006
|
-
onClick:
|
|
4018
|
+
onClick: S
|
|
4007
4019
|
}) => {
|
|
4008
|
-
const [
|
|
4020
|
+
const [D, W] = Ne({
|
|
4009
4021
|
top: 0,
|
|
4010
4022
|
left: 0,
|
|
4011
4023
|
width: 0,
|
|
4012
4024
|
visibility: "hidden"
|
|
4013
4025
|
// Hide menu initially until positioned
|
|
4014
|
-
}), [
|
|
4026
|
+
}), [x, Q] = Ne("entered"), [Y, G] = Ne(d), [K, j] = Ne("center"), [Z, $] = Ne(
|
|
4015
4027
|
null
|
|
4016
|
-
),
|
|
4028
|
+
), ne = De(
|
|
4017
4029
|
null
|
|
4018
|
-
), q = De({}),
|
|
4030
|
+
), q = De({}), V = De(
|
|
4019
4031
|
null
|
|
4020
|
-
),
|
|
4032
|
+
), te = pe(() => {
|
|
4021
4033
|
if ($(null), C) {
|
|
4022
4034
|
i(!1);
|
|
4023
4035
|
return;
|
|
4024
4036
|
}
|
|
4025
|
-
|
|
4026
|
-
i(!1),
|
|
4037
|
+
Q("exiting"), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
|
|
4038
|
+
i(!1), Q("entered");
|
|
4027
4039
|
}, 150);
|
|
4028
4040
|
}, [i, C]), le = pe(
|
|
4029
|
-
(
|
|
4030
|
-
if (!(
|
|
4031
|
-
if (
|
|
4032
|
-
$(
|
|
4041
|
+
(z) => {
|
|
4042
|
+
if (!(z.submenu && z.useHover)) {
|
|
4043
|
+
if (z.submenu) {
|
|
4044
|
+
$(z.label === Z ? null : z.label);
|
|
4033
4045
|
return;
|
|
4034
4046
|
}
|
|
4035
|
-
|
|
4047
|
+
z.onClick ? z.onClick(z.label) : S && S(z), z.noCloseOnSelect || (i(!1), $(null));
|
|
4036
4048
|
}
|
|
4037
4049
|
},
|
|
4038
|
-
[Z, i,
|
|
4039
|
-
), se = pe((
|
|
4040
|
-
|
|
4050
|
+
[Z, i, S]
|
|
4051
|
+
), se = pe((z) => {
|
|
4052
|
+
z.submenu && z.useHover && (V.current && (clearTimeout(V.current), V.current = null), $(z.label));
|
|
4041
4053
|
}, []), fe = pe(() => {
|
|
4042
|
-
|
|
4054
|
+
V.current && (clearTimeout(V.current), V.current = null);
|
|
4043
4055
|
}, []), ge = pe(
|
|
4044
|
-
(
|
|
4045
|
-
|
|
4056
|
+
(z) => {
|
|
4057
|
+
z && (V.current && clearTimeout(V.current), $(null));
|
|
4046
4058
|
},
|
|
4047
4059
|
[]
|
|
4048
|
-
), ue = pe((
|
|
4049
|
-
|
|
4060
|
+
), ue = pe((z) => {
|
|
4061
|
+
z.submenu && z.useHover && (V.current && clearTimeout(V.current), V.current = setTimeout(() => {
|
|
4050
4062
|
$(null);
|
|
4051
4063
|
}, 100));
|
|
4052
4064
|
}, []);
|
|
4053
4065
|
he(() => {
|
|
4054
|
-
r || ($(null),
|
|
4066
|
+
r || ($(null), V.current && (clearTimeout(V.current), V.current = null));
|
|
4055
4067
|
}, [r]);
|
|
4056
|
-
const [ie, de] =
|
|
4068
|
+
const [ie, de] = Ne({
|
|
4057
4069
|
top: 0,
|
|
4058
4070
|
left: 0
|
|
4059
4071
|
});
|
|
4060
4072
|
he(() => {
|
|
4061
|
-
const
|
|
4062
|
-
if (
|
|
4063
|
-
const
|
|
4073
|
+
const z = (A == null ? void 0 : A.current) || o;
|
|
4074
|
+
if (z && r) {
|
|
4075
|
+
const _ = () => {
|
|
4064
4076
|
var g;
|
|
4065
|
-
const s = (g =
|
|
4077
|
+
const s = (g = z.getBoundingClientRect) == null ? void 0 : g.call(z);
|
|
4066
4078
|
s && de({ top: s.top, left: s.left });
|
|
4067
4079
|
};
|
|
4068
|
-
return
|
|
4069
|
-
window.removeEventListener("scroll",
|
|
4080
|
+
return _(), window.addEventListener("scroll", _), window.addEventListener("resize", _), () => {
|
|
4081
|
+
window.removeEventListener("scroll", _), window.removeEventListener("resize", _);
|
|
4070
4082
|
};
|
|
4071
4083
|
}
|
|
4072
4084
|
}, [A, o, r]), vn(() => {
|
|
4073
4085
|
if (r && (A != null && A.current || o || f != null && f.current)) {
|
|
4074
|
-
C || (
|
|
4075
|
-
|
|
4086
|
+
C || (Q("entering"), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
|
|
4087
|
+
Q("entered");
|
|
4076
4088
|
}, 200));
|
|
4077
|
-
const
|
|
4089
|
+
const z = (f == null ? void 0 : f.current) || (A == null ? void 0 : A.current) || o, _ = (z == null ? void 0 : z.getBoundingClientRect()) || {
|
|
4078
4090
|
top: 0,
|
|
4079
4091
|
left: 0,
|
|
4080
4092
|
width: 0,
|
|
@@ -4083,75 +4095,75 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4083
4095
|
right: 0
|
|
4084
4096
|
};
|
|
4085
4097
|
let s = { top: 0, left: 0, width: 0 }, g = !1;
|
|
4086
|
-
|
|
4087
|
-
const
|
|
4088
|
-
let
|
|
4089
|
-
const M =
|
|
4090
|
-
if (
|
|
4091
|
-
|
|
4098
|
+
N !== document.body && N instanceof Element && (s = N.getBoundingClientRect(), g = !0);
|
|
4099
|
+
const p = window.innerWidth, B = window.innerHeight, I = E || Math.max(_.width, 150), R = e.length * 40;
|
|
4100
|
+
let w = d;
|
|
4101
|
+
const M = _.top > R, H = B - _.bottom > R, F = _.left > I, m = p - _.right > I;
|
|
4102
|
+
if (h)
|
|
4103
|
+
w = d;
|
|
4092
4104
|
else
|
|
4093
4105
|
switch (d) {
|
|
4094
4106
|
case ce.TOP:
|
|
4095
|
-
!M &&
|
|
4107
|
+
!M && H && (w = ce.BOTTOM);
|
|
4096
4108
|
break;
|
|
4097
4109
|
case ce.BOTTOM:
|
|
4098
|
-
!
|
|
4110
|
+
!H && M && (w = ce.TOP);
|
|
4099
4111
|
break;
|
|
4100
4112
|
case ce.LEFT:
|
|
4101
|
-
!
|
|
4113
|
+
!F && m && (w = ce.RIGHT);
|
|
4102
4114
|
break;
|
|
4103
4115
|
case ce.RIGHT:
|
|
4104
|
-
!
|
|
4116
|
+
!m && F && (w = ce.LEFT);
|
|
4105
4117
|
break;
|
|
4106
4118
|
}
|
|
4107
|
-
const
|
|
4108
|
-
E && (
|
|
4109
|
-
const
|
|
4110
|
-
|
|
4119
|
+
const L = u && (f != null && f.current) ? f.current.getBoundingClientRect() : _, y = _.left, T = _.right, P = _.width;
|
|
4120
|
+
E && (L.width = E);
|
|
4121
|
+
const b = mt(
|
|
4122
|
+
w,
|
|
4111
4123
|
g,
|
|
4112
|
-
|
|
4124
|
+
L,
|
|
4113
4125
|
s,
|
|
4114
|
-
|
|
4126
|
+
_
|
|
4115
4127
|
);
|
|
4116
4128
|
if (O)
|
|
4117
4129
|
switch (O) {
|
|
4118
4130
|
case "start":
|
|
4119
|
-
g ?
|
|
4131
|
+
g ? b.left = y - s.left : b.left = y + window.scrollX;
|
|
4120
4132
|
break;
|
|
4121
4133
|
case "end":
|
|
4122
|
-
g ?
|
|
4134
|
+
g ? b.left = T - I - s.left : b.left = T - I + window.scrollX;
|
|
4123
4135
|
break;
|
|
4124
4136
|
case "center":
|
|
4125
|
-
g ?
|
|
4137
|
+
g ? b.left = y + P / 2 - I / 2 - s.left : b.left = y + P / 2 - I / 2 + window.scrollX;
|
|
4126
4138
|
break;
|
|
4127
4139
|
}
|
|
4128
|
-
if (!O && (
|
|
4140
|
+
if (!O && (w === ce.BOTTOM || w === ce.TOP)) {
|
|
4129
4141
|
let J = c;
|
|
4130
4142
|
if (c === Le.AUTO) {
|
|
4131
|
-
const re =
|
|
4143
|
+
const re = _.right + I <= p, Ee = _.left - I >= 0;
|
|
4132
4144
|
re ? J = Le.START : Ee ? J = Le.END : J = Le.START;
|
|
4133
4145
|
}
|
|
4134
|
-
if (J === Le.START ? g ?
|
|
4146
|
+
if (J === Le.START ? g ? b.left = _.left - s.left : b.left = _.left + window.scrollX : J === Le.END && (g ? b.left = _.right - I - s.left : b.left = _.right - I + window.scrollX), g) {
|
|
4135
4147
|
const re = s.width;
|
|
4136
|
-
(
|
|
4148
|
+
(b.left ?? 0) + I > re && (b.left = Math.max(0, re - I));
|
|
4137
4149
|
} else
|
|
4138
|
-
(
|
|
4139
|
-
(
|
|
4140
|
-
} else (
|
|
4141
|
-
let
|
|
4142
|
-
if (
|
|
4143
|
-
const J =
|
|
4144
|
-
J < re &&
|
|
4145
|
-
} else if (
|
|
4146
|
-
const J =
|
|
4147
|
-
J < re &&
|
|
4150
|
+
(b.left ?? 0) + I > p && (b.left = Math.max(0, p - I));
|
|
4151
|
+
(b.left ?? 0) < 0 && (b.left = 0);
|
|
4152
|
+
} else (w === ce.LEFT || w === ce.RIGHT) && (g || (b.top ?? 0) + R > B && (b.top = Math.max(0, B - R)));
|
|
4153
|
+
let ee = "center";
|
|
4154
|
+
if (w === ce.BOTTOM || w === ce.TOP) {
|
|
4155
|
+
const J = _.left + _.width / 2, re = p / 2;
|
|
4156
|
+
J < re && m ? ee = "left" : J >= re && F && (ee = "right");
|
|
4157
|
+
} else if (w === ce.LEFT || w === ce.RIGHT) {
|
|
4158
|
+
const J = _.top + _.height / 2, re = B / 2;
|
|
4159
|
+
J < re && H ? ee = "top" : J >= re && M && (ee = "bottom");
|
|
4148
4160
|
}
|
|
4149
|
-
|
|
4150
|
-
top:
|
|
4151
|
-
left:
|
|
4152
|
-
width:
|
|
4153
|
-
transform:
|
|
4154
|
-
transformOrigin:
|
|
4161
|
+
G(w), j(ee), W({
|
|
4162
|
+
top: b.top ?? 0,
|
|
4163
|
+
left: b.left ?? 0,
|
|
4164
|
+
width: b.width ?? 0,
|
|
4165
|
+
transform: b.transform,
|
|
4166
|
+
transformOrigin: b.transformOrigin,
|
|
4155
4167
|
visibility: "visible"
|
|
4156
4168
|
});
|
|
4157
4169
|
}
|
|
@@ -4162,8 +4174,8 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4162
4174
|
E,
|
|
4163
4175
|
c,
|
|
4164
4176
|
C,
|
|
4165
|
-
|
|
4166
|
-
|
|
4177
|
+
N,
|
|
4178
|
+
h,
|
|
4167
4179
|
ie,
|
|
4168
4180
|
// Add dependency on menuButtonPosition
|
|
4169
4181
|
o,
|
|
@@ -4171,46 +4183,46 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4171
4183
|
]);
|
|
4172
4184
|
const oe = De(o ?? null);
|
|
4173
4185
|
oe.current = o ?? null;
|
|
4174
|
-
const Ce =
|
|
4175
|
-
|
|
4186
|
+
const Ce = Tt(
|
|
4187
|
+
te,
|
|
4176
4188
|
u ? [f] : [A || oe]
|
|
4177
4189
|
);
|
|
4178
4190
|
return r ? Rn(
|
|
4179
4191
|
/* @__PURE__ */ Se(
|
|
4180
4192
|
"div",
|
|
4181
4193
|
{
|
|
4182
|
-
className: `ia-table-menu-submenu d-flex flex-column gap-2 ia-table-position-${
|
|
4194
|
+
className: `ia-table-menu-submenu d-flex flex-column gap-2 ia-table-position-${Y} flip-${K} ${!C && x === "entering" ? "menu-entering" : ""} ${!C && x === "entered" ? "menu-entered" : ""} ${!C && x === "exiting" ? "menu-exiting" : ""} ${u ? "ia-table-submenu-only" : ""}`,
|
|
4183
4195
|
style: {
|
|
4184
|
-
...
|
|
4196
|
+
...D,
|
|
4185
4197
|
position: "absolute",
|
|
4186
|
-
width: E ? `${E}px` :
|
|
4187
|
-
minHeight:
|
|
4188
|
-
transform:
|
|
4189
|
-
transformOrigin:
|
|
4190
|
-
visibility:
|
|
4198
|
+
width: E ? `${E}px` : D.width ? `${D.width}px` : void 0,
|
|
4199
|
+
minHeight: D.height ? `${D.height}px` : void 0,
|
|
4200
|
+
transform: D.transform,
|
|
4201
|
+
transformOrigin: D.transformOrigin,
|
|
4202
|
+
visibility: D.visibility || "hidden"
|
|
4191
4203
|
},
|
|
4192
4204
|
ref: Ce,
|
|
4193
4205
|
children: [
|
|
4194
4206
|
l,
|
|
4195
4207
|
l && /* @__PURE__ */ ae("div", { className: "ia-table-divider" }),
|
|
4196
|
-
e.map((
|
|
4208
|
+
e.map((z) => /* @__PURE__ */ Se(Gn.Fragment, { children: [
|
|
4197
4209
|
/* @__PURE__ */ Se(
|
|
4198
4210
|
"div",
|
|
4199
4211
|
{
|
|
4200
|
-
ref: (
|
|
4201
|
-
className: `ia-table-menu-option d-flex align-items-center justify-content-between gap-6 rounded-8 cursor-pointer ${
|
|
4202
|
-
onClick: (
|
|
4203
|
-
|
|
4212
|
+
ref: (_) => q.current[z.label] = _,
|
|
4213
|
+
className: `ia-table-menu-option d-flex align-items-center justify-content-between gap-6 rounded-8 cursor-pointer ${z.id === n || z.value === n ? "ia-table-menu-option-selected" : ""} ${Z === z.label ? "submenu-active" : ""}`,
|
|
4214
|
+
onClick: (_) => {
|
|
4215
|
+
_.stopPropagation(), le(z);
|
|
4204
4216
|
},
|
|
4205
|
-
onMouseEnter: () => se(
|
|
4206
|
-
onMouseLeave: () => ue(
|
|
4217
|
+
onMouseEnter: () => se(z),
|
|
4218
|
+
onMouseLeave: () => ue(z),
|
|
4207
4219
|
children: [
|
|
4208
4220
|
/* @__PURE__ */ Se("div", { className: "d-flex align-items-center gap-6 ia-table-user-select-none", children: [
|
|
4209
|
-
t === "left" &&
|
|
4210
|
-
|
|
4211
|
-
t === "right" &&
|
|
4221
|
+
t === "left" && z.icon,
|
|
4222
|
+
z.label,
|
|
4223
|
+
t === "right" && z.icon
|
|
4212
4224
|
] }),
|
|
4213
|
-
|
|
4225
|
+
z.submenu && /* @__PURE__ */ ae("div", { className: "submenu-indicator d-flex align-items-center", children: /* @__PURE__ */ ae(
|
|
4214
4226
|
"svg",
|
|
4215
4227
|
{
|
|
4216
4228
|
width: "6",
|
|
@@ -4232,42 +4244,42 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4232
4244
|
) })
|
|
4233
4245
|
]
|
|
4234
4246
|
},
|
|
4235
|
-
|
|
4247
|
+
z.label
|
|
4236
4248
|
),
|
|
4237
|
-
|
|
4249
|
+
z.submenu && Z === z.label && /* @__PURE__ */ ae(
|
|
4238
4250
|
"div",
|
|
4239
4251
|
{
|
|
4240
4252
|
onMouseEnter: fe,
|
|
4241
|
-
onMouseLeave: () => ge(
|
|
4253
|
+
onMouseLeave: () => ge(z.useHover),
|
|
4242
4254
|
children: /* @__PURE__ */ ae(
|
|
4243
4255
|
Ot,
|
|
4244
4256
|
{
|
|
4245
|
-
options:
|
|
4257
|
+
options: z.submenu,
|
|
4246
4258
|
isOpen: !0,
|
|
4247
4259
|
setIsOpen: i,
|
|
4248
|
-
selectedElement:
|
|
4249
|
-
position:
|
|
4250
|
-
width:
|
|
4251
|
-
iconPlacement:
|
|
4260
|
+
selectedElement: z.selectedElement,
|
|
4261
|
+
position: z.submenuPosition || "right",
|
|
4262
|
+
width: z.submenuWidth,
|
|
4263
|
+
iconPlacement: z.submenuIconPlacement || t,
|
|
4252
4264
|
isSubmenu: !0,
|
|
4253
4265
|
parentOptionRef: {
|
|
4254
|
-
current: q.current[
|
|
4266
|
+
current: q.current[z.label]
|
|
4255
4267
|
},
|
|
4256
4268
|
skipAnimation: !0,
|
|
4257
4269
|
portalContainer: Ce.current ?? void 0,
|
|
4258
4270
|
menuButtonRef: void 0
|
|
4259
4271
|
},
|
|
4260
|
-
`submenu-${
|
|
4272
|
+
`submenu-${z.label}`
|
|
4261
4273
|
)
|
|
4262
4274
|
}
|
|
4263
4275
|
)
|
|
4264
|
-
] },
|
|
4276
|
+
] }, z.label))
|
|
4265
4277
|
]
|
|
4266
4278
|
}
|
|
4267
4279
|
),
|
|
4268
|
-
|
|
4280
|
+
N
|
|
4269
4281
|
) : null;
|
|
4270
|
-
}, Be = /* @__PURE__ */ new Map(),
|
|
4282
|
+
}, Be = /* @__PURE__ */ new Map(), Me = (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, En = (e, n, t, r, i = []) => {
|
|
4271
4283
|
if (!e) {
|
|
4272
4284
|
console.warn("Cannot register grid without an ID");
|
|
4273
4285
|
return;
|
|
@@ -4280,11 +4292,11 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4280
4292
|
alignedWith: i
|
|
4281
4293
|
};
|
|
4282
4294
|
Be.set(e, A), i.forEach((o) => {
|
|
4283
|
-
const d =
|
|
4295
|
+
const d = Me(o);
|
|
4284
4296
|
if (d && Be.has(d)) {
|
|
4285
4297
|
const E = Be.get(d);
|
|
4286
4298
|
E.alignedWith.some(
|
|
4287
|
-
(u) =>
|
|
4299
|
+
(u) => Me(u) === e
|
|
4288
4300
|
) || E.alignedWith.push(e);
|
|
4289
4301
|
}
|
|
4290
4302
|
});
|
|
@@ -4293,11 +4305,11 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4293
4305
|
return;
|
|
4294
4306
|
const { alignedWith: n } = Be.get(e);
|
|
4295
4307
|
n.forEach((t) => {
|
|
4296
|
-
const r =
|
|
4308
|
+
const r = Me(t);
|
|
4297
4309
|
if (r && Be.has(r)) {
|
|
4298
4310
|
const i = Be.get(r);
|
|
4299
4311
|
i.alignedWith = i.alignedWith.filter(
|
|
4300
|
-
(A) =>
|
|
4312
|
+
(A) => Me(A) !== e
|
|
4301
4313
|
);
|
|
4302
4314
|
}
|
|
4303
4315
|
}), Be.delete(e);
|
|
@@ -4306,7 +4318,7 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4306
4318
|
return;
|
|
4307
4319
|
const i = Be.get(e), A = /* @__PURE__ */ new Set();
|
|
4308
4320
|
i.alignedWith.forEach((o) => {
|
|
4309
|
-
const d =
|
|
4321
|
+
const d = Me(o);
|
|
4310
4322
|
if (!(!d || A.has(d))) {
|
|
4311
4323
|
if (A.add(d), Be.has(d))
|
|
4312
4324
|
Be.get(d).dispatchFn({
|
|
@@ -4475,25 +4487,25 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4475
4487
|
serverSide: u,
|
|
4476
4488
|
rowDragManaged: f,
|
|
4477
4489
|
infiniteScroll: C,
|
|
4478
|
-
initialExpandedColumnGroups:
|
|
4490
|
+
initialExpandedColumnGroups: N,
|
|
4479
4491
|
tableApi: l,
|
|
4480
|
-
smartGridMenuOptions:
|
|
4492
|
+
smartGridMenuOptions: h,
|
|
4481
4493
|
purgeClosedRowNodes: O,
|
|
4482
|
-
detailRendererTable:
|
|
4483
|
-
isSaveViewEnabled:
|
|
4484
|
-
isSavingViewLoading:
|
|
4485
|
-
savedViewsOptions:
|
|
4486
|
-
rowHeight:
|
|
4487
|
-
tableId:
|
|
4488
|
-
refObj:
|
|
4494
|
+
detailRendererTable: S,
|
|
4495
|
+
isSaveViewEnabled: D,
|
|
4496
|
+
isSavingViewLoading: W,
|
|
4497
|
+
savedViewsOptions: x,
|
|
4498
|
+
rowHeight: Q,
|
|
4499
|
+
tableId: Y,
|
|
4500
|
+
refObj: G,
|
|
4489
4501
|
callBackRef: K,
|
|
4490
4502
|
exportCallbackRef: j,
|
|
4491
4503
|
saveViewCallbackRef: Z,
|
|
4492
4504
|
saveViewOptionsRef: $,
|
|
4493
|
-
isSingleSelect:
|
|
4505
|
+
isSingleSelect: ne,
|
|
4494
4506
|
defaultColDef: q,
|
|
4495
|
-
disableSelectAllRecords:
|
|
4496
|
-
selectable:
|
|
4507
|
+
disableSelectAllRecords: V,
|
|
4508
|
+
selectable: te,
|
|
4497
4509
|
columnBufferSize: le,
|
|
4498
4510
|
lazyLoadCellRenderer: se,
|
|
4499
4511
|
hasSplitRenderer: fe,
|
|
@@ -4502,7 +4514,8 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4502
4514
|
removeCheckConfigurationOnOperation: ie,
|
|
4503
4515
|
clickCallbackRef: de,
|
|
4504
4516
|
isChatEnabled: oe,
|
|
4505
|
-
isCommentFeatureEnabled: Ce
|
|
4517
|
+
isCommentFeatureEnabled: Ce,
|
|
4518
|
+
noHeaderSelection: z
|
|
4506
4519
|
}) => (he(() => {
|
|
4507
4520
|
e({
|
|
4508
4521
|
type: a.SET_COLUMN_MAP,
|
|
@@ -4519,13 +4532,13 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4519
4532
|
payload: t || []
|
|
4520
4533
|
});
|
|
4521
4534
|
}, [t, e]), he(() => {
|
|
4522
|
-
const
|
|
4535
|
+
const _ = Lt(e, G);
|
|
4523
4536
|
e({
|
|
4524
4537
|
type: a.SET_TABLE_ID,
|
|
4525
|
-
payload:
|
|
4538
|
+
payload: Y
|
|
4526
4539
|
}), e({
|
|
4527
4540
|
type: a.SET_INITIAL_EXPANDED_COLUMN_GROUPS,
|
|
4528
|
-
payload:
|
|
4541
|
+
payload: N
|
|
4529
4542
|
}), e({
|
|
4530
4543
|
type: a.ROW_DRAG_MANAGED,
|
|
4531
4544
|
payload: f
|
|
@@ -4549,19 +4562,19 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4549
4562
|
payload: r
|
|
4550
4563
|
}), e({
|
|
4551
4564
|
type: a.SET_TABLE_API,
|
|
4552
|
-
payload: { ...l, ...
|
|
4565
|
+
payload: { ...l, ..._ }
|
|
4553
4566
|
}), e({
|
|
4554
4567
|
type: a.SET_SMART_GRID_MENU_OPTIONS,
|
|
4555
|
-
payload:
|
|
4568
|
+
payload: h
|
|
4556
4569
|
}), e({
|
|
4557
4570
|
type: a.ROW_GROUP_CACHE_ENABLE,
|
|
4558
4571
|
payload: O
|
|
4559
4572
|
}), e({
|
|
4560
4573
|
type: a.DETAIL_RENDERER_TABLE,
|
|
4561
|
-
payload:
|
|
4574
|
+
payload: S
|
|
4562
4575
|
}), e({
|
|
4563
4576
|
type: a.IS_SAVE_VIEW_ENABLED,
|
|
4564
|
-
payload:
|
|
4577
|
+
payload: D
|
|
4565
4578
|
}), e({
|
|
4566
4579
|
type: a.SET_REFS,
|
|
4567
4580
|
payload: {
|
|
@@ -4573,16 +4586,16 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4573
4586
|
}
|
|
4574
4587
|
}), e({
|
|
4575
4588
|
type: a.SET_IS_SINGLE_SELECT,
|
|
4576
|
-
payload:
|
|
4589
|
+
payload: ne
|
|
4577
4590
|
}), e({
|
|
4578
4591
|
type: a.SET_DEFAULT_COL_DEF,
|
|
4579
4592
|
payload: q
|
|
4580
4593
|
}), e({
|
|
4581
4594
|
type: a.SET_SELECTABLE,
|
|
4582
|
-
payload:
|
|
4595
|
+
payload: te
|
|
4583
4596
|
}), e({
|
|
4584
4597
|
type: a.SET_DISABLE_SELECT_ALL_RECORDS_OPTION,
|
|
4585
|
-
payload:
|
|
4598
|
+
payload: V
|
|
4586
4599
|
}), e({
|
|
4587
4600
|
type: a.SET_COLUMN_BUFFER_SIZE,
|
|
4588
4601
|
payload: le
|
|
@@ -4607,21 +4620,24 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4607
4620
|
}), e({
|
|
4608
4621
|
type: a.SET_REMOVE_CHECK_CONFIGURATION_ON_OPERATION,
|
|
4609
4622
|
payload: ie
|
|
4623
|
+
}), e({
|
|
4624
|
+
type: a.SET_NO_HEADER_SELECTION_CHECKBOX,
|
|
4625
|
+
payload: z
|
|
4610
4626
|
});
|
|
4611
4627
|
}, []), he(() => {
|
|
4612
4628
|
e({
|
|
4613
4629
|
type: a.SET_ROW_HEIGHT,
|
|
4614
|
-
payload:
|
|
4630
|
+
payload: Q
|
|
4615
4631
|
});
|
|
4616
|
-
}, [
|
|
4632
|
+
}, [Q]), he(() => {
|
|
4617
4633
|
e({
|
|
4618
4634
|
type: a.SAVE_VIEW_CALLBACKS,
|
|
4619
4635
|
payload: {
|
|
4620
|
-
isSavingViewLoading:
|
|
4621
|
-
savedViewsOptions:
|
|
4636
|
+
isSavingViewLoading: W,
|
|
4637
|
+
savedViewsOptions: x
|
|
4622
4638
|
}
|
|
4623
4639
|
});
|
|
4624
|
-
}, [
|
|
4640
|
+
}, [x, W]), he(() => {
|
|
4625
4641
|
e({
|
|
4626
4642
|
type: a.SET_SERVER_SIDE,
|
|
4627
4643
|
payload: u
|
|
@@ -4644,26 +4660,26 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4644
4660
|
initialExpandedColumnGroups: u = {},
|
|
4645
4661
|
enableRowSpan: f = !1,
|
|
4646
4662
|
rowSpanColumn: C = null,
|
|
4647
|
-
columnMap:
|
|
4663
|
+
columnMap: N = {},
|
|
4648
4664
|
infiniteScroll: l = !1,
|
|
4649
|
-
rowDragManaged:
|
|
4665
|
+
rowDragManaged: h,
|
|
4650
4666
|
pinnedTopRows: O = [],
|
|
4651
|
-
pinnedBottomRows:
|
|
4652
|
-
getRowStyle:
|
|
4653
|
-
tableInstance:
|
|
4654
|
-
smartGridMenuOptions:
|
|
4655
|
-
purgeClosedRowNodes:
|
|
4656
|
-
detailRendererTable:
|
|
4667
|
+
pinnedBottomRows: S = [],
|
|
4668
|
+
getRowStyle: D,
|
|
4669
|
+
tableInstance: W,
|
|
4670
|
+
smartGridMenuOptions: x,
|
|
4671
|
+
purgeClosedRowNodes: Q,
|
|
4672
|
+
detailRendererTable: Y,
|
|
4657
4673
|
// Save View Props
|
|
4658
|
-
isSaveViewEnabled:
|
|
4674
|
+
isSaveViewEnabled: G,
|
|
4659
4675
|
isSavingViewLoading: K,
|
|
4660
4676
|
savedViewsOptions: j,
|
|
4661
4677
|
rowHeight: Z,
|
|
4662
4678
|
callBackRef: $,
|
|
4663
|
-
exportCallbackRef:
|
|
4679
|
+
exportCallbackRef: ne,
|
|
4664
4680
|
saveViewCallbackRef: q,
|
|
4665
|
-
saveViewOptionsRef:
|
|
4666
|
-
clickCallbackRef:
|
|
4681
|
+
saveViewOptionsRef: V,
|
|
4682
|
+
clickCallbackRef: te,
|
|
4667
4683
|
// Row selection
|
|
4668
4684
|
isSingleSelect: le = !1,
|
|
4669
4685
|
selectable: se,
|
|
@@ -4674,153 +4690,154 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4674
4690
|
splitRendererKeys: de,
|
|
4675
4691
|
removeSelectionOnOperation: oe,
|
|
4676
4692
|
removeCheckConfigurationOnOperation: Ce,
|
|
4677
|
-
isChatEnabled:
|
|
4678
|
-
isCommentFeatureEnabled:
|
|
4679
|
-
|
|
4680
|
-
|
|
4693
|
+
isChatEnabled: z,
|
|
4694
|
+
isCommentFeatureEnabled: _,
|
|
4695
|
+
noHeaderSelection: s
|
|
4696
|
+
}, g) => {
|
|
4697
|
+
const p = De(null), B = De(
|
|
4681
4698
|
{}
|
|
4682
|
-
),
|
|
4683
|
-
(
|
|
4684
|
-
var
|
|
4685
|
-
|
|
4686
|
-
const
|
|
4687
|
-
if (
|
|
4688
|
-
const
|
|
4689
|
-
if (
|
|
4690
|
-
let Ae = { api:
|
|
4691
|
-
const
|
|
4692
|
-
switch (
|
|
4699
|
+
), R = Bt().getState().dispatch, w = pe(
|
|
4700
|
+
(T) => {
|
|
4701
|
+
var b, ee, J, re, Ee, Ie;
|
|
4702
|
+
R(T);
|
|
4703
|
+
const P = B.current.state || {};
|
|
4704
|
+
if (P != null && P.api && ((b = P.api) != null && b.dispatchEvent)) {
|
|
4705
|
+
const Re = at[T.type];
|
|
4706
|
+
if (Re) {
|
|
4707
|
+
let Ae = { api: P.api };
|
|
4708
|
+
const U = T.payload;
|
|
4709
|
+
switch (T.type) {
|
|
4693
4710
|
case a.SET_COLUMN_WIDTH:
|
|
4694
4711
|
case a.SET_COLUMNS_WIDTH:
|
|
4695
4712
|
Ae = {
|
|
4696
4713
|
...Ae,
|
|
4697
|
-
column: (
|
|
4714
|
+
column: (U == null ? void 0 : U.column) || (U == null ? void 0 : U.columns)
|
|
4698
4715
|
};
|
|
4699
4716
|
break;
|
|
4700
4717
|
case a.REORDER_COLUMNS:
|
|
4701
|
-
Ae = { ...Ae, columns:
|
|
4718
|
+
Ae = { ...Ae, columns: T.payload };
|
|
4702
4719
|
break;
|
|
4703
4720
|
case a.TOGGLE_COLUMN_VISIBILITY:
|
|
4704
4721
|
Ae = {
|
|
4705
4722
|
...Ae,
|
|
4706
|
-
column:
|
|
4707
|
-
visible:
|
|
4723
|
+
column: U == null ? void 0 : U.column,
|
|
4724
|
+
visible: U == null ? void 0 : U.visible
|
|
4708
4725
|
};
|
|
4709
4726
|
break;
|
|
4710
4727
|
case a.SET_SORT:
|
|
4711
|
-
Ae = { ...Ae, sortState:
|
|
4728
|
+
Ae = { ...Ae, sortState: T.payload };
|
|
4712
4729
|
break;
|
|
4713
4730
|
case a.SET_COLUMN_FILTER:
|
|
4714
4731
|
case a.REMOVE_COLUMN_FILTER:
|
|
4715
4732
|
case a.APPLY_FILTERS:
|
|
4716
|
-
cn(
|
|
4733
|
+
cn(P), Ae = { ...Ae, filterState: P.columnFilters };
|
|
4717
4734
|
break;
|
|
4718
4735
|
case a.SET_PAGE:
|
|
4719
4736
|
Ae = {
|
|
4720
4737
|
...Ae,
|
|
4721
4738
|
paginationState: {
|
|
4722
|
-
...
|
|
4723
|
-
page:
|
|
4739
|
+
...P.pagination,
|
|
4740
|
+
page: T.payload
|
|
4724
4741
|
}
|
|
4725
4742
|
};
|
|
4726
4743
|
break;
|
|
4727
4744
|
case a.SET_PAGE_SIZE:
|
|
4728
|
-
cn(
|
|
4745
|
+
cn(P), Ae = {
|
|
4729
4746
|
...Ae,
|
|
4730
4747
|
paginationState: {
|
|
4731
|
-
...
|
|
4732
|
-
pageSize:
|
|
4748
|
+
...P.pagination,
|
|
4749
|
+
pageSize: T.payload
|
|
4733
4750
|
}
|
|
4734
4751
|
};
|
|
4735
4752
|
break;
|
|
4736
4753
|
case a.UPDATE_ROW_DATA:
|
|
4737
4754
|
Ae = {
|
|
4738
4755
|
...Ae,
|
|
4739
|
-
data:
|
|
4740
|
-
(
|
|
4756
|
+
data: U != null && U.rowId ? (ee = P.data) == null ? void 0 : ee.find(
|
|
4757
|
+
(Qe) => Qe[P.uniqueIdField] === (U == null ? void 0 : U.rowId)
|
|
4741
4758
|
) : null,
|
|
4742
|
-
column: { field:
|
|
4743
|
-
newValue:
|
|
4744
|
-
oldValue:
|
|
4759
|
+
column: { field: U == null ? void 0 : U.field },
|
|
4760
|
+
newValue: U == null ? void 0 : U.value,
|
|
4761
|
+
oldValue: U == null ? void 0 : U.oldValue
|
|
4745
4762
|
};
|
|
4746
4763
|
break;
|
|
4747
4764
|
case a.UPDATE_ROW_DATA_OBJECT:
|
|
4748
4765
|
Ae = {
|
|
4749
4766
|
...Ae,
|
|
4750
|
-
data:
|
|
4751
|
-
changes:
|
|
4767
|
+
data: U == null ? void 0 : U.rowData,
|
|
4768
|
+
changes: U == null ? void 0 : U.changes
|
|
4752
4769
|
};
|
|
4753
4770
|
break;
|
|
4754
4771
|
case a.SET_SELECTED_ROWS:
|
|
4755
|
-
Ae = { ...Ae, selectedRows:
|
|
4772
|
+
Ae = { ...Ae, selectedRows: T.payload };
|
|
4756
4773
|
break;
|
|
4757
4774
|
case a.TOGGLE_ROW_GROUP:
|
|
4758
4775
|
Ae = {
|
|
4759
4776
|
...Ae,
|
|
4760
|
-
groupId:
|
|
4761
|
-
rowIndex:
|
|
4762
|
-
isExpanded:
|
|
4777
|
+
groupId: U == null ? void 0 : U.groupId,
|
|
4778
|
+
rowIndex: U == null ? void 0 : U.rowIndex,
|
|
4779
|
+
isExpanded: U == null ? void 0 : U.isExpanded
|
|
4763
4780
|
};
|
|
4764
4781
|
break;
|
|
4765
4782
|
case a.SET_ROW_GROUP_DATA:
|
|
4766
4783
|
Ae = {
|
|
4767
4784
|
...Ae,
|
|
4768
|
-
groupId:
|
|
4769
|
-
data:
|
|
4770
|
-
append: (
|
|
4771
|
-
hasMoreData:
|
|
4785
|
+
groupId: U == null ? void 0 : U.groupId,
|
|
4786
|
+
data: U == null ? void 0 : U.data,
|
|
4787
|
+
append: (U == null ? void 0 : U.append) || !1,
|
|
4788
|
+
hasMoreData: U == null ? void 0 : U.hasMoreData
|
|
4772
4789
|
};
|
|
4773
4790
|
break;
|
|
4774
4791
|
case a.TOGGLE_GROUP_EXPANSION:
|
|
4775
4792
|
Ae = {
|
|
4776
4793
|
...Ae,
|
|
4777
|
-
rowId:
|
|
4778
|
-
rowIndex:
|
|
4794
|
+
rowId: U == null ? void 0 : U.rowId,
|
|
4795
|
+
rowIndex: U == null ? void 0 : U.rowIndex
|
|
4779
4796
|
};
|
|
4780
4797
|
break;
|
|
4781
4798
|
}
|
|
4782
|
-
|
|
4799
|
+
P.api.dispatchEvent(Re, Ae);
|
|
4783
4800
|
}
|
|
4784
4801
|
}
|
|
4785
|
-
!
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4802
|
+
!P.tableId || !((re = (J = p.current) == null ? void 0 : J.alignedGrids) != null && re.length) || (Ee = T.meta) != null && Ee.fromAlignedGrid || !dt.includes(T.type) || (Ie = p.current) != null && Ie.propagateChange && p.current.propagateChange(
|
|
4803
|
+
T.type,
|
|
4804
|
+
T.payload,
|
|
4805
|
+
T.meta
|
|
4789
4806
|
);
|
|
4790
4807
|
},
|
|
4791
4808
|
[]
|
|
4792
4809
|
);
|
|
4793
4810
|
yt({
|
|
4794
|
-
dispatch:
|
|
4811
|
+
dispatch: R,
|
|
4795
4812
|
pinnedTopRows: O,
|
|
4796
|
-
pinnedBottomRows:
|
|
4797
|
-
tableInstance:
|
|
4798
|
-
columnMap:
|
|
4813
|
+
pinnedBottomRows: S,
|
|
4814
|
+
tableInstance: W,
|
|
4815
|
+
columnMap: N,
|
|
4799
4816
|
uniqueIdField: t,
|
|
4800
4817
|
childKeyField: r,
|
|
4801
4818
|
enableRowSpan: f,
|
|
4802
4819
|
rowSpanColumn: C,
|
|
4803
4820
|
pageSize: d,
|
|
4804
4821
|
serverSide: o,
|
|
4805
|
-
rowDragManaged:
|
|
4822
|
+
rowDragManaged: h,
|
|
4806
4823
|
infiniteScroll: l,
|
|
4807
4824
|
initialExpandedColumnGroups: u,
|
|
4808
4825
|
tableApi: i,
|
|
4809
|
-
smartGridMenuOptions:
|
|
4810
|
-
purgeClosedRowNodes:
|
|
4811
|
-
detailRendererTable:
|
|
4826
|
+
smartGridMenuOptions: x,
|
|
4827
|
+
purgeClosedRowNodes: Q,
|
|
4828
|
+
detailRendererTable: Y,
|
|
4812
4829
|
// Save View Props
|
|
4813
|
-
isSaveViewEnabled:
|
|
4830
|
+
isSaveViewEnabled: G,
|
|
4814
4831
|
isSavingViewLoading: K,
|
|
4815
4832
|
savedViewsOptions: j,
|
|
4816
4833
|
rowHeight: Z,
|
|
4817
4834
|
tableId: E,
|
|
4818
|
-
refObj:
|
|
4835
|
+
refObj: B,
|
|
4819
4836
|
// Refs
|
|
4820
4837
|
callBackRef: $,
|
|
4821
|
-
exportCallbackRef:
|
|
4838
|
+
exportCallbackRef: ne,
|
|
4822
4839
|
saveViewCallbackRef: q,
|
|
4823
|
-
saveViewOptionsRef:
|
|
4840
|
+
saveViewOptionsRef: V,
|
|
4824
4841
|
isSingleSelect: le,
|
|
4825
4842
|
defaultColDef: A,
|
|
4826
4843
|
disableSelectAllRecords: fe,
|
|
@@ -4831,135 +4848,136 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
4831
4848
|
splitRendererKeys: de,
|
|
4832
4849
|
removeSelectionOnOperation: oe,
|
|
4833
4850
|
removeCheckConfigurationOnOperation: Ce,
|
|
4834
|
-
clickCallbackRef:
|
|
4835
|
-
isChatEnabled:
|
|
4836
|
-
isCommentFeatureEnabled:
|
|
4851
|
+
clickCallbackRef: te,
|
|
4852
|
+
isChatEnabled: z,
|
|
4853
|
+
isCommentFeatureEnabled: _,
|
|
4854
|
+
noHeaderSelection: s
|
|
4837
4855
|
}), he(() => {
|
|
4838
|
-
|
|
4856
|
+
R({
|
|
4839
4857
|
type: a.SET_COLUMNS,
|
|
4840
4858
|
payload: n,
|
|
4841
4859
|
meta: { defaultColDef: A }
|
|
4842
4860
|
});
|
|
4843
|
-
const
|
|
4844
|
-
const
|
|
4845
|
-
let
|
|
4846
|
-
n.forEach((
|
|
4847
|
-
|
|
4848
|
-
}),
|
|
4861
|
+
const T = setTimeout(() => {
|
|
4862
|
+
const P = {};
|
|
4863
|
+
let b = !1;
|
|
4864
|
+
n.forEach((ee) => {
|
|
4865
|
+
ee.width || (b = !0, P[v(ee)] = !0);
|
|
4866
|
+
}), b && R({
|
|
4849
4867
|
type: a.AUTOSIZE_COLUMNS_REQUESTED,
|
|
4850
|
-
payload: { columnsToAutosize:
|
|
4868
|
+
payload: { columnsToAutosize: P }
|
|
4851
4869
|
});
|
|
4852
4870
|
}, 100);
|
|
4853
|
-
return () => clearTimeout(
|
|
4871
|
+
return () => clearTimeout(T);
|
|
4854
4872
|
}, [n]);
|
|
4855
|
-
const
|
|
4856
|
-
(
|
|
4857
|
-
|
|
4873
|
+
const M = pe(
|
|
4874
|
+
(T, P) => {
|
|
4875
|
+
T && w({
|
|
4858
4876
|
type: a.TOGGLE_GROUP_EXPANSION,
|
|
4859
|
-
payload: { rowId: String(
|
|
4877
|
+
payload: { rowId: String(T), rowIndex: P }
|
|
4860
4878
|
});
|
|
4861
4879
|
},
|
|
4862
|
-
[
|
|
4863
|
-
), { propagateChange:
|
|
4880
|
+
[w]
|
|
4881
|
+
), { propagateChange: H } = St(
|
|
4864
4882
|
E,
|
|
4865
4883
|
c,
|
|
4866
4884
|
i,
|
|
4867
|
-
|
|
4885
|
+
w
|
|
4868
4886
|
);
|
|
4869
4887
|
he(() => {
|
|
4870
|
-
|
|
4871
|
-
propagateChange:
|
|
4888
|
+
p.current = {
|
|
4889
|
+
propagateChange: H,
|
|
4872
4890
|
alignedGrids: c
|
|
4873
4891
|
};
|
|
4874
|
-
}, [
|
|
4892
|
+
}, [H, c]);
|
|
4875
4893
|
const F = pe(
|
|
4876
|
-
(
|
|
4877
|
-
if (!ke.includes(
|
|
4894
|
+
(T, P, b = !1) => {
|
|
4895
|
+
if (!ke.includes(T)) {
|
|
4878
4896
|
console.warn(
|
|
4879
|
-
`Invalid event type: ${
|
|
4897
|
+
`Invalid event type: ${T}. Valid types are: ${ke.join(
|
|
4880
4898
|
", "
|
|
4881
4899
|
)}`
|
|
4882
4900
|
);
|
|
4883
4901
|
return;
|
|
4884
4902
|
}
|
|
4885
|
-
if (typeof
|
|
4903
|
+
if (typeof P != "function") {
|
|
4886
4904
|
console.warn("Event listener must be a function");
|
|
4887
4905
|
return;
|
|
4888
4906
|
}
|
|
4889
|
-
|
|
4907
|
+
w({
|
|
4890
4908
|
type: a.ADD_EVENT_LISTENER,
|
|
4891
|
-
payload: { eventType:
|
|
4909
|
+
payload: { eventType: T, listener: P, once: b }
|
|
4892
4910
|
});
|
|
4893
4911
|
},
|
|
4894
|
-
[
|
|
4895
|
-
),
|
|
4896
|
-
(
|
|
4897
|
-
if (!ke.includes(
|
|
4912
|
+
[w]
|
|
4913
|
+
), m = pe(
|
|
4914
|
+
(T, P) => {
|
|
4915
|
+
if (!ke.includes(T)) {
|
|
4898
4916
|
console.warn(
|
|
4899
|
-
`Invalid event type: ${
|
|
4917
|
+
`Invalid event type: ${T}. Valid types are: ${ke.join(
|
|
4900
4918
|
", "
|
|
4901
4919
|
)}`
|
|
4902
4920
|
);
|
|
4903
4921
|
return;
|
|
4904
4922
|
}
|
|
4905
|
-
if (typeof
|
|
4923
|
+
if (typeof P != "function") {
|
|
4906
4924
|
console.warn("Event listener must be a function");
|
|
4907
4925
|
return;
|
|
4908
4926
|
}
|
|
4909
|
-
|
|
4927
|
+
w({
|
|
4910
4928
|
type: a.REMOVE_EVENT_LISTENER,
|
|
4911
|
-
payload: { eventType:
|
|
4929
|
+
payload: { eventType: T, listener: P }
|
|
4912
4930
|
});
|
|
4913
4931
|
},
|
|
4914
|
-
[
|
|
4915
|
-
),
|
|
4916
|
-
(
|
|
4917
|
-
const
|
|
4918
|
-
Array.isArray(
|
|
4919
|
-
|
|
4932
|
+
[w]
|
|
4933
|
+
), L = pe(
|
|
4934
|
+
(T, P) => {
|
|
4935
|
+
const b = Pt(B.current.state, T, P) || [];
|
|
4936
|
+
Array.isArray(b) && b.forEach((ee) => {
|
|
4937
|
+
m(T, ee);
|
|
4920
4938
|
});
|
|
4921
4939
|
},
|
|
4922
|
-
[
|
|
4940
|
+
[m]
|
|
4923
4941
|
);
|
|
4924
4942
|
he(() => () => {
|
|
4925
|
-
|
|
4943
|
+
R({ type: a.CLEANUP_TABLE_RESOURCES });
|
|
4926
4944
|
}, []);
|
|
4927
|
-
const
|
|
4928
|
-
var
|
|
4945
|
+
const y = wn(() => {
|
|
4946
|
+
var T;
|
|
4929
4947
|
return {
|
|
4930
4948
|
state: {
|
|
4931
|
-
...((
|
|
4949
|
+
...((T = B.current) == null ? void 0 : T.state) || {},
|
|
4932
4950
|
api: {
|
|
4933
4951
|
...i,
|
|
4934
4952
|
addEventListener: F,
|
|
4935
|
-
removeEventListener:
|
|
4936
|
-
dispatchEvent:
|
|
4953
|
+
removeEventListener: m,
|
|
4954
|
+
dispatchEvent: L
|
|
4937
4955
|
}
|
|
4938
4956
|
},
|
|
4939
4957
|
tableApi: i,
|
|
4940
|
-
dispatch:
|
|
4958
|
+
dispatch: w,
|
|
4941
4959
|
ACTION_TYPES: a,
|
|
4942
|
-
toggleGroupExpansion:
|
|
4943
|
-
dispatchEvent:
|
|
4944
|
-
getRowStyle:
|
|
4960
|
+
toggleGroupExpansion: M,
|
|
4961
|
+
dispatchEvent: L,
|
|
4962
|
+
getRowStyle: D
|
|
4945
4963
|
};
|
|
4946
4964
|
}, [
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4965
|
+
M,
|
|
4966
|
+
L,
|
|
4967
|
+
D,
|
|
4950
4968
|
F,
|
|
4951
|
-
|
|
4952
|
-
|
|
4969
|
+
m,
|
|
4970
|
+
w,
|
|
4953
4971
|
i
|
|
4954
4972
|
]);
|
|
4955
|
-
return
|
|
4973
|
+
return B.current = y, Mn(g, () => B.current), /* @__PURE__ */ Se(yn.Provider, { value: y, children: [
|
|
4956
4974
|
/* @__PURE__ */ ae(
|
|
4957
4975
|
Nt,
|
|
4958
4976
|
{
|
|
4959
|
-
refObj:
|
|
4977
|
+
refObj: B,
|
|
4960
4978
|
addEventListener: F,
|
|
4961
|
-
removeEventListener:
|
|
4962
|
-
dispatchEvent:
|
|
4979
|
+
removeEventListener: m,
|
|
4980
|
+
dispatchEvent: L
|
|
4963
4981
|
}
|
|
4964
4982
|
),
|
|
4965
4983
|
e
|
|
@@ -5012,13 +5030,13 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
5012
5030
|
const u = pe(() => {
|
|
5013
5031
|
n();
|
|
5014
5032
|
}, [n]), f = pe(
|
|
5015
|
-
(
|
|
5016
|
-
|
|
5033
|
+
(S) => {
|
|
5034
|
+
S.stopPropagation(), d ? d(S) : n(S);
|
|
5017
5035
|
},
|
|
5018
5036
|
[d, n]
|
|
5019
5037
|
);
|
|
5020
5038
|
if (!e) return null;
|
|
5021
|
-
const C = `ia-table-prompt-${i}`,
|
|
5039
|
+
const C = `ia-table-prompt-${i}`, N = i === "delete" || i === "error" ? "danger" : "primary", l = o || E, h = o && i !== "success", O = /* @__PURE__ */ ae("div", { className: "ia-table-prompt-overlay d-flex align-items-center justify-content-center", children: /* @__PURE__ */ Se(
|
|
5022
5040
|
"div",
|
|
5023
5041
|
{
|
|
5024
5042
|
className: `ia-table-prompt d-flex flex-column position-relative ${C}`,
|
|
@@ -5039,11 +5057,11 @@ const Bt = () => en(tn) || Ln, We = /* @__PURE__ */ new Map(), Pn = (e = "defaul
|
|
|
5039
5057
|
] }),
|
|
5040
5058
|
l && /* @__PURE__ */ Se("div", { className: "ia-table-prompt-footer d-flex justify-content-center align-items-center gap-12", children: [
|
|
5041
5059
|
E && /* @__PURE__ */ ae(ln, { onClick: f, variant: "text", children: E }),
|
|
5042
|
-
|
|
5060
|
+
h && /* @__PURE__ */ ae(
|
|
5043
5061
|
ln,
|
|
5044
5062
|
{
|
|
5045
5063
|
onClick: A,
|
|
5046
|
-
variant:
|
|
5064
|
+
variant: N,
|
|
5047
5065
|
...c,
|
|
5048
5066
|
children: o
|
|
5049
5067
|
}
|
|
@@ -5108,7 +5126,7 @@ export {
|
|
|
5108
5126
|
Wt as S,
|
|
5109
5127
|
sr as T,
|
|
5110
5128
|
ar as a,
|
|
5111
|
-
|
|
5129
|
+
ve as b,
|
|
5112
5130
|
ir as c,
|
|
5113
5131
|
st as d,
|
|
5114
5132
|
Jt as e,
|
|
@@ -5132,5 +5150,5 @@ export {
|
|
|
5132
5150
|
tr as w,
|
|
5133
5151
|
jt as x,
|
|
5134
5152
|
Xe as y,
|
|
5135
|
-
|
|
5153
|
+
me as z
|
|
5136
5154
|
};
|