@opencorestack/opengridx 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/opengridx.es.js +858 -847
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +5 -5
- package/dist/opengridx.umd.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.tsx +29 -4
- package/package.json +1 -1
package/dist/opengridx.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ae, { useMemo as le, useState as Z, useCallback as z, useRef as J, useEffect as re, useLayoutEffect as Ee, useReducer as jo } from "react";
|
|
2
2
|
import Ge from "react-dom";
|
|
3
|
-
var Tt = { exports: {} },
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
3
|
+
var Tt = { exports: {} }, ht = {};
|
|
4
|
+
var Pn;
|
|
5
|
+
function Ro() {
|
|
6
|
+
if (Pn) return ht;
|
|
7
|
+
Pn = 1;
|
|
8
8
|
var n = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
9
|
function e(o, i, l) {
|
|
10
10
|
var a = null;
|
|
@@ -21,12 +21,12 @@ function So() {
|
|
|
21
21
|
props: l
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return ht.Fragment = t, ht.jsx = e, ht.jsxs = e, ht;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
26
|
+
var pt = {};
|
|
27
|
+
var Ln;
|
|
28
|
+
function Eo() {
|
|
29
|
+
return Ln || (Ln = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
30
|
function n(C) {
|
|
31
31
|
if (C == null) return null;
|
|
32
32
|
if (typeof C == "function")
|
|
@@ -82,11 +82,11 @@ function jo() {
|
|
|
82
82
|
}
|
|
83
83
|
if (B) {
|
|
84
84
|
B = console;
|
|
85
|
-
var
|
|
86
|
-
return
|
|
85
|
+
var W = B.error, O = typeof Symbol == "function" && Symbol.toStringTag && C[Symbol.toStringTag] || C.constructor.name || "Object";
|
|
86
|
+
return W.call(
|
|
87
87
|
B,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
89
|
+
O
|
|
90
90
|
), t(C);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -116,14 +116,14 @@ function jo() {
|
|
|
116
116
|
return C.key !== void 0;
|
|
117
117
|
}
|
|
118
118
|
function s(C, B) {
|
|
119
|
-
function
|
|
119
|
+
function W() {
|
|
120
120
|
H || (H = !0, console.error(
|
|
121
121
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
122
122
|
B
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
get:
|
|
125
|
+
W.isReactWarning = !0, Object.defineProperty(C, "key", {
|
|
126
|
+
get: W,
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
@@ -133,14 +133,14 @@ function jo() {
|
|
|
133
133
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
134
134
|
)), C = this.props.ref, C !== void 0 ? C : null;
|
|
135
135
|
}
|
|
136
|
-
function d(C, B,
|
|
137
|
-
var D =
|
|
136
|
+
function d(C, B, W, O, V, G) {
|
|
137
|
+
var D = W.ref;
|
|
138
138
|
return C = {
|
|
139
139
|
$$typeof: v,
|
|
140
140
|
type: C,
|
|
141
141
|
key: B,
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
142
|
+
props: W,
|
|
143
|
+
_owner: O
|
|
144
144
|
}, (D !== void 0 ? D : null) !== null ? Object.defineProperty(C, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
146
|
get: c
|
|
@@ -166,13 +166,13 @@ function jo() {
|
|
|
166
166
|
value: G
|
|
167
167
|
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
168
168
|
}
|
|
169
|
-
function g(C, B,
|
|
169
|
+
function g(C, B, W, O, V, G) {
|
|
170
170
|
var D = B.children;
|
|
171
171
|
if (D !== void 0)
|
|
172
|
-
if (
|
|
172
|
+
if (O)
|
|
173
173
|
if (I(D)) {
|
|
174
|
-
for (
|
|
175
|
-
x(D[
|
|
174
|
+
for (O = 0; O < D.length; O++)
|
|
175
|
+
x(D[O]);
|
|
176
176
|
Object.freeze && Object.freeze(D);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
@@ -181,34 +181,34 @@ function jo() {
|
|
|
181
181
|
else x(D);
|
|
182
182
|
if (T.call(B, "key")) {
|
|
183
183
|
D = n(C);
|
|
184
|
-
var P = Object.keys(B).filter(function(
|
|
185
|
-
return
|
|
184
|
+
var P = Object.keys(B).filter(function(te) {
|
|
185
|
+
return te !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
O = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", K[D + O] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
191
191
|
React keys must be passed directly to JSX without using spread:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
|
-
|
|
194
|
+
O,
|
|
195
195
|
D,
|
|
196
196
|
P,
|
|
197
197
|
D
|
|
198
|
-
), K[D +
|
|
198
|
+
), K[D + O] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (D = null,
|
|
201
|
-
|
|
202
|
-
for (var
|
|
203
|
-
|
|
204
|
-
} else
|
|
200
|
+
if (D = null, W !== void 0 && (e(W), D = "" + W), a(B) && (e(B.key), D = "" + B.key), "key" in B) {
|
|
201
|
+
W = {};
|
|
202
|
+
for (var ne in B)
|
|
203
|
+
ne !== "key" && (W[ne] = B[ne]);
|
|
204
|
+
} else W = B;
|
|
205
205
|
return D && s(
|
|
206
|
-
|
|
206
|
+
W,
|
|
207
207
|
typeof C == "function" ? C.displayName || C.name || "Unknown" : C
|
|
208
208
|
), d(
|
|
209
209
|
C,
|
|
210
210
|
D,
|
|
211
|
-
|
|
211
|
+
W,
|
|
212
212
|
i(),
|
|
213
213
|
V,
|
|
214
214
|
G
|
|
@@ -220,7 +220,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
220
220
|
function h(C) {
|
|
221
221
|
return typeof C == "object" && C !== null && C.$$typeof === v;
|
|
222
222
|
}
|
|
223
|
-
var m =
|
|
223
|
+
var m = ae, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), b = /* @__PURE__ */ Symbol.for("react.portal"), S = /* @__PURE__ */ Symbol.for("react.fragment"), N = /* @__PURE__ */ Symbol.for("react.strict_mode"), f = /* @__PURE__ */ Symbol.for("react.profiler"), k = /* @__PURE__ */ Symbol.for("react.consumer"), y = /* @__PURE__ */ Symbol.for("react.context"), w = /* @__PURE__ */ Symbol.for("react.forward_ref"), u = /* @__PURE__ */ Symbol.for("react.suspense"), p = /* @__PURE__ */ Symbol.for("react.suspense_list"), j = /* @__PURE__ */ Symbol.for("react.memo"), E = /* @__PURE__ */ Symbol.for("react.lazy"), R = /* @__PURE__ */ Symbol.for("react.activity"), _ = /* @__PURE__ */ Symbol.for("react.client.reference"), M = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, T = Object.prototype.hasOwnProperty, I = Array.isArray, F = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
226
|
m = {
|
|
@@ -232,38 +232,38 @@ React keys must be passed directly to JSX without using spread:
|
|
|
232
232
|
m,
|
|
233
233
|
l
|
|
234
234
|
)(), q = F(o(l)), K = {};
|
|
235
|
-
|
|
236
|
-
var
|
|
235
|
+
pt.Fragment = S, pt.jsx = function(C, B, W) {
|
|
236
|
+
var O = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
237
237
|
return g(
|
|
238
238
|
C,
|
|
239
239
|
B,
|
|
240
|
-
|
|
240
|
+
W,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
O ? Error("react-stack-top-frame") : U,
|
|
243
|
+
O ? F(o(C)) : q
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
245
|
+
}, pt.jsxs = function(C, B, W) {
|
|
246
|
+
var O = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
247
247
|
return g(
|
|
248
248
|
C,
|
|
249
249
|
B,
|
|
250
|
-
|
|
250
|
+
W,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
O ? Error("react-stack-top-frame") : U,
|
|
253
|
+
O ? F(o(C)) : q
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), pt;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var Tn;
|
|
259
|
+
function No() {
|
|
260
|
+
return Tn || (Tn = 1, process.env.NODE_ENV === "production" ? Tt.exports = Ro() : Tt.exports = Eo()), Tt.exports;
|
|
261
261
|
}
|
|
262
|
-
var r =
|
|
262
|
+
var r = No();
|
|
263
263
|
function zt(n, t) {
|
|
264
264
|
return t ? t.left?.includes(n) ? "left" : t.right?.includes(n) ? "right" : null : null;
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function Mo(n, t) {
|
|
267
267
|
const e = [], o = [], i = [];
|
|
268
268
|
return t ? (n.forEach((l) => {
|
|
269
269
|
const a = zt(l.field, t);
|
|
@@ -276,10 +276,10 @@ function Eo(n, t) {
|
|
|
276
276
|
return s - c;
|
|
277
277
|
}), { left: e, center: o, right: i }) : { left: e, center: n, right: i };
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function An(n, t, e, o, i, l, a, s) {
|
|
280
280
|
const c = {};
|
|
281
281
|
if (!e) return c;
|
|
282
|
-
const d =
|
|
282
|
+
const d = Mo(n, e);
|
|
283
283
|
let g = 0;
|
|
284
284
|
s && (g += 48), l && a && (g += 48), o && i && (g += 48), d.left.forEach((h) => {
|
|
285
285
|
c[h.field] = g;
|
|
@@ -295,7 +295,7 @@ function Fn(n, t, e, o, i, l, a, s) {
|
|
|
295
295
|
function cn(n, t) {
|
|
296
296
|
return t ? t.top?.includes(n) ? "top" : t.bottom?.includes(n) ? "bottom" : null : null;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Io(n, t) {
|
|
299
299
|
const e = [], o = [], i = [];
|
|
300
300
|
return t ? (n.forEach((l) => {
|
|
301
301
|
const a = cn(l.id, t);
|
|
@@ -308,7 +308,7 @@ function No(n, t) {
|
|
|
308
308
|
return s - c;
|
|
309
309
|
}), { top: e, center: o, bottom: i }) : { top: e, center: n, bottom: i };
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function it(n) {
|
|
312
312
|
if (n === void 0) return { type: "auto", value: 0 };
|
|
313
313
|
if (typeof n == "number") return { type: "fixed", value: n };
|
|
314
314
|
if (typeof n == "string") {
|
|
@@ -320,7 +320,7 @@ function rt(n) {
|
|
|
320
320
|
}
|
|
321
321
|
return { type: "fixed", value: 100 };
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function Po(n) {
|
|
324
324
|
const {
|
|
325
325
|
rowHeight: t,
|
|
326
326
|
pagination: e,
|
|
@@ -341,51 +341,51 @@ function Mo(n) {
|
|
|
341
341
|
isLoading: N,
|
|
342
342
|
pageSize: f
|
|
343
343
|
} = n;
|
|
344
|
-
return
|
|
344
|
+
return le(() => {
|
|
345
345
|
const k = e ? o : i, y = k.map((A, X) => {
|
|
346
|
-
let
|
|
346
|
+
let oe = t;
|
|
347
347
|
if (l.has(A.id)) {
|
|
348
348
|
const ue = a?.({ row: A, id: A.id, rowIndex: s + X }) ?? 200;
|
|
349
|
-
|
|
349
|
+
oe += typeof ue == "number" ? ue : parseInt(String(ue), 10) || 200;
|
|
350
350
|
}
|
|
351
|
-
return
|
|
352
|
-
}), w = y.reduce((A, X,
|
|
351
|
+
return oe;
|
|
352
|
+
}), w = y.reduce((A, X, oe) => (A.push((A[oe - 1] || 0) + X), A), []), u = S === "infinite" && N && k.length > 0 ? Math.min(f, 20) : 0, p = (w[w.length - 1] || 0) + u * t, j = s * t, E = c * t, R = [], _ = [], M = [], T = [];
|
|
353
353
|
d.forEach((A) => {
|
|
354
354
|
const X = zt(A.field, g);
|
|
355
355
|
X === "left" ? R.push(A) : X === "right" ? _.push(A) : M.push(A);
|
|
356
356
|
});
|
|
357
357
|
const I = (m ? 48 : 0) + (v ? 48 : 0) + (b ? 48 : 0), F = (A) => x[A.field] ?? A.width, H = R.reduce((A, X) => {
|
|
358
|
-
const
|
|
359
|
-
return A + (
|
|
358
|
+
const oe = it(F(X));
|
|
359
|
+
return A + (oe.type === "fixed" ? oe.value : 100);
|
|
360
360
|
}, 0), L = _.reduce((A, X) => {
|
|
361
|
-
const
|
|
362
|
-
return A + (
|
|
361
|
+
const oe = it(F(X));
|
|
362
|
+
return A + (oe.type === "fixed" ? oe.value : 100);
|
|
363
363
|
}, 0), U = M.reduce((A, X) => {
|
|
364
364
|
if (!Object.prototype.hasOwnProperty.call(x, X.field) && X.flex && X.flex > 0) {
|
|
365
365
|
const fe = X.minWidth ?? 150, Ie = typeof X.width == "number" ? X.width : 150;
|
|
366
366
|
return A + (fe || Ie);
|
|
367
367
|
}
|
|
368
|
-
const ue =
|
|
368
|
+
const ue = it(F(X));
|
|
369
369
|
return ue.type === "fixed" ? A + ue.value : ue.type === "percentage" ? A + 100 : A + (X.minWidth ?? 150);
|
|
370
370
|
}, 0), q = Math.max(
|
|
371
371
|
h - I - H - L,
|
|
372
372
|
U
|
|
373
373
|
), K = [], C = [], B = [];
|
|
374
374
|
M.forEach((A) => {
|
|
375
|
-
const X = Object.prototype.hasOwnProperty.call(x, A.field),
|
|
375
|
+
const X = Object.prototype.hasOwnProperty.call(x, A.field), oe = it(F(A));
|
|
376
376
|
if (!X && A.flex && A.flex > 0) {
|
|
377
377
|
B.push({ col: A, flex: A.flex });
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
|
-
|
|
380
|
+
oe.type === "fixed" ? K.push({ col: A, width: oe.value }) : oe.type === "percentage" ? C.push({ col: A, percentage: oe.value }) : B.push({ col: A, flex: 1 });
|
|
381
381
|
});
|
|
382
|
-
const
|
|
383
|
-
let
|
|
382
|
+
const W = K.reduce((A, { width: X }) => A + X, 0);
|
|
383
|
+
let O = Math.max(0, q - W);
|
|
384
384
|
const V = /* @__PURE__ */ new Map();
|
|
385
385
|
C.forEach(({ col: A, percentage: X }) => {
|
|
386
|
-
const
|
|
387
|
-
V.set(A.field,
|
|
388
|
-
}),
|
|
386
|
+
const oe = X / 100 * O;
|
|
387
|
+
V.set(A.field, oe), O -= oe;
|
|
388
|
+
}), O = Math.max(0, O);
|
|
389
389
|
const G = /* @__PURE__ */ new Map(), D = B.map((A) => ({
|
|
390
390
|
...A,
|
|
391
391
|
minWidth: A.col.minWidth ?? 50,
|
|
@@ -398,11 +398,11 @@ function Mo(n) {
|
|
|
398
398
|
const X = D.length * 2;
|
|
399
399
|
for (; A < X; ) {
|
|
400
400
|
A++;
|
|
401
|
-
const
|
|
402
|
-
if (
|
|
403
|
-
const ue =
|
|
401
|
+
const oe = D.filter((ie) => !ie.frozen);
|
|
402
|
+
if (oe.length === 0) break;
|
|
403
|
+
const ue = oe.reduce((ie, Ce) => ie + Ce.flex, 0), fe = D.reduce((ie, Ce) => Ce.frozen ? ie + Ce.computedWidth : ie, 0), Ie = Math.max(0, O - fe);
|
|
404
404
|
if (ue <= 0) {
|
|
405
|
-
|
|
405
|
+
oe.forEach((ie) => {
|
|
406
406
|
ie.computedWidth = ie.minWidth, ie.frozen = !0;
|
|
407
407
|
});
|
|
408
408
|
break;
|
|
@@ -410,11 +410,11 @@ function Mo(n) {
|
|
|
410
410
|
const Ve = Ie / ue;
|
|
411
411
|
let xe = 0;
|
|
412
412
|
const Ue = [], Ke = [];
|
|
413
|
-
if (
|
|
414
|
-
const
|
|
415
|
-
|
|
413
|
+
if (oe.forEach((ie) => {
|
|
414
|
+
const Ce = Ve * ie.flex;
|
|
415
|
+
Ce < ie.minWidth ? (xe += ie.minWidth - Ce, Ue.push(ie)) : Ce > ie.maxWidth ? (xe += ie.maxWidth - Ce, Ke.push(ie)) : ie.computedWidth = Ce;
|
|
416
416
|
}), Ue.length === 0 && Ke.length === 0) {
|
|
417
|
-
|
|
417
|
+
oe.forEach((ie) => ie.frozen = !0);
|
|
418
418
|
break;
|
|
419
419
|
}
|
|
420
420
|
xe > 0 ? Ue.forEach((ie) => {
|
|
@@ -428,41 +428,41 @@ function Mo(n) {
|
|
|
428
428
|
}));
|
|
429
429
|
}
|
|
430
430
|
})(), D.forEach((A) => G.set(A.col.field, A.computedWidth));
|
|
431
|
-
const
|
|
431
|
+
const ne = /* @__PURE__ */ new Map();
|
|
432
432
|
M.forEach((A) => {
|
|
433
433
|
let X;
|
|
434
434
|
if (G.has(A.field))
|
|
435
435
|
X = G.get(A.field);
|
|
436
436
|
else {
|
|
437
|
-
const
|
|
438
|
-
if (
|
|
439
|
-
X =
|
|
437
|
+
const oe = K.find((fe) => fe.col.field === A.field), ue = C.find((fe) => fe.col.field === A.field);
|
|
438
|
+
if (oe)
|
|
439
|
+
X = oe.width;
|
|
440
440
|
else if (ue) {
|
|
441
441
|
const fe = V.get(A.field) || 0;
|
|
442
442
|
X = Math.max(A.minWidth ?? 50, fe || 100);
|
|
443
443
|
} else
|
|
444
444
|
X = 100;
|
|
445
445
|
}
|
|
446
|
-
T.push(X),
|
|
446
|
+
T.push(X), ne.set(A.field, X);
|
|
447
447
|
});
|
|
448
|
-
const
|
|
449
|
-
const X = D.find((
|
|
448
|
+
const te = M.map((A) => {
|
|
449
|
+
const X = D.find((oe) => oe.col.field === A.field);
|
|
450
450
|
return {
|
|
451
451
|
...A,
|
|
452
|
-
width:
|
|
452
|
+
width: ne.get(A.field) ?? (typeof A.width == "number" ? A.width : 100),
|
|
453
453
|
flex: X ? X.flex : A.flex
|
|
454
454
|
};
|
|
455
|
-
}),
|
|
456
|
-
const
|
|
457
|
-
return { ...A, width:
|
|
455
|
+
}), ee = 11, pe = R.map((A, X) => {
|
|
456
|
+
const oe = it(F(A));
|
|
457
|
+
return { ...A, width: oe.type === "fixed" ? oe.value : 100, zIndex: ee + X };
|
|
458
458
|
}), $ = 11, ge = _.map((A, X) => {
|
|
459
|
-
const
|
|
459
|
+
const oe = it(F(A));
|
|
460
460
|
return {
|
|
461
461
|
...A,
|
|
462
|
-
width:
|
|
462
|
+
width: oe.type === "fixed" ? oe.value : 100,
|
|
463
463
|
zIndex: $ + (_.length - 1 - X)
|
|
464
464
|
};
|
|
465
|
-
}), de = T.reduce((A, X) => A + X, 0),
|
|
465
|
+
}), de = T.reduce((A, X) => A + X, 0), be = H + de + L + I, ce = T.reduce((A, X, oe) => (A.push((A[oe - 1] || 0) + X), A), []);
|
|
466
466
|
return {
|
|
467
467
|
rowHeights: y,
|
|
468
468
|
cumulativeHeights: w,
|
|
@@ -471,10 +471,10 @@ function Mo(n) {
|
|
|
471
471
|
pinnedBottomHeight: E,
|
|
472
472
|
leftPinnedCols: pe,
|
|
473
473
|
rightPinnedCols: ge,
|
|
474
|
-
unpinnedColsWithWidth:
|
|
474
|
+
unpinnedColsWithWidth: te,
|
|
475
475
|
unpinnedColWidths: T,
|
|
476
476
|
unpinnedAccWidths: ce,
|
|
477
|
-
totalWidth:
|
|
477
|
+
totalWidth: be,
|
|
478
478
|
leftWidth: H,
|
|
479
479
|
rightWidth: L,
|
|
480
480
|
unpinnedTotalWidth: de,
|
|
@@ -504,7 +504,7 @@ function Mo(n) {
|
|
|
504
504
|
f
|
|
505
505
|
]);
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function Lo(n) {
|
|
508
508
|
const {
|
|
509
509
|
allRenderableRows: t,
|
|
510
510
|
navigationColumns: e,
|
|
@@ -521,7 +521,7 @@ function Io(n) {
|
|
|
521
521
|
pageSize: m,
|
|
522
522
|
virtualization: v,
|
|
523
523
|
viewportRef: b
|
|
524
|
-
} = n, [S, N] =
|
|
524
|
+
} = n, [S, N] = Z(null), f = z((w) => {
|
|
525
525
|
w.target === w.currentTarget && N((u) => {
|
|
526
526
|
if (u) return u;
|
|
527
527
|
if (o)
|
|
@@ -571,37 +571,37 @@ function Io(n) {
|
|
|
571
571
|
const E = u === "HEADER", R = E ? -1 : t.findIndex((L) => L.id === u), _ = e.findIndex((L) => L.field === p);
|
|
572
572
|
if (!E && R === -1 || _ === -1) return;
|
|
573
573
|
const M = (L, U, q, K, C, B = !1) => {
|
|
574
|
-
let
|
|
575
|
-
return C && K !== 0 && (K > 0 &&
|
|
574
|
+
let W = L + q, O = U + K;
|
|
575
|
+
return C && K !== 0 && (K > 0 && O >= e.length ? (O = 0, W++) : K < 0 && O < 0 && (O = e.length - 1, W--)), !C && (O < 0 || O >= e.length) || W < (B ? -1 : 0) || W >= t.length ? null : { r: W, c: O };
|
|
576
576
|
}, T = (L, U, q, K, C, B = !1) => {
|
|
577
|
-
let
|
|
577
|
+
let W = L, O = U, V = 0;
|
|
578
578
|
const G = t.length * e.length + e.length;
|
|
579
579
|
for (; V < G; ) {
|
|
580
|
-
if (V++,
|
|
581
|
-
K > 0 ?
|
|
582
|
-
else if (
|
|
583
|
-
if (
|
|
584
|
-
if (
|
|
580
|
+
if (V++, W += q, O += K, K !== 0)
|
|
581
|
+
K > 0 ? O >= e.length && (O = 0, W++) : O < 0 && (O = e.length - 1, W--);
|
|
582
|
+
else if (O < 0 || O >= e.length) return null;
|
|
583
|
+
if (W < -1 || W >= t.length) return null;
|
|
584
|
+
if (W === -1) {
|
|
585
585
|
if (!B) continue;
|
|
586
|
-
const
|
|
587
|
-
if (["__checkbox_col__"].includes(
|
|
586
|
+
const ee = e[O], pe = ee.sortable !== !1;
|
|
587
|
+
if (["__checkbox_col__"].includes(ee.field) || pe) return { r: W, c: O };
|
|
588
588
|
continue;
|
|
589
589
|
}
|
|
590
|
-
const D = t[
|
|
591
|
-
let
|
|
592
|
-
if (x && !
|
|
590
|
+
const D = t[W], P = e[O], ne = ["__checkbox_col__", "__expand_col__", "__reorder_col__"].includes(P.field);
|
|
591
|
+
let te = P.editable || ne;
|
|
592
|
+
if (x && !ne)
|
|
593
593
|
try {
|
|
594
|
-
|
|
594
|
+
te = x({
|
|
595
595
|
row: D,
|
|
596
596
|
field: P.field,
|
|
597
597
|
value: D[P.field],
|
|
598
598
|
colDef: P,
|
|
599
|
-
rowIndex:
|
|
600
|
-
colIndex:
|
|
599
|
+
rowIndex: W,
|
|
600
|
+
colIndex: O
|
|
601
601
|
});
|
|
602
602
|
} catch {
|
|
603
603
|
}
|
|
604
|
-
if (
|
|
604
|
+
if (te) return { r: W, c: O };
|
|
605
605
|
}
|
|
606
606
|
return null;
|
|
607
607
|
};
|
|
@@ -636,14 +636,14 @@ function Io(n) {
|
|
|
636
636
|
N(I === -1 ? { id: "HEADER", field: L.field } : { id: t[I].id, field: L.field });
|
|
637
637
|
const U = b.current;
|
|
638
638
|
if (U) {
|
|
639
|
-
const { cumulativeHeights: q, pinnedTopHeight: K, columnMetrics: C } = v, { clientHeight: B, clientWidth:
|
|
640
|
-
let
|
|
641
|
-
if (G < P ?
|
|
642
|
-
const { leftPinnedWidth:
|
|
639
|
+
const { cumulativeHeights: q, pinnedTopHeight: K, columnMetrics: C } = v, { clientHeight: B, clientWidth: W, scrollTop: O, scrollLeft: V } = U, G = I <= 0 ? 0 : q[I - 1], D = q[I], P = O + K, ne = O + B;
|
|
640
|
+
let te = O;
|
|
641
|
+
if (G < P ? te = Math.max(0, G - K) : D > ne && (te = D - B), te !== O && (U.scrollTop = te), C) {
|
|
642
|
+
const { leftPinnedWidth: ee, rightPinnedWidth: pe, unpinnedAccWidths: $, unpinnedCols: ge, totalSpecialsWidth: de, pinnedSpecialsWidth: be } = C, ce = ge.findIndex((A) => A.field === L.field);
|
|
643
643
|
if (ce !== -1) {
|
|
644
|
-
const A = de +
|
|
644
|
+
const A = de + ee + (ce > 0 ? $[ce - 1] : 0), X = de + ee + $[ce], oe = V + be + ee, ue = V + W - pe;
|
|
645
645
|
let fe = V;
|
|
646
|
-
A <
|
|
646
|
+
A < oe ? fe = Math.max(0, A - be - ee) : X > ue && (fe = X - W + pe), fe !== V && (U.scrollLeft = fe);
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
649
|
}
|
|
@@ -667,8 +667,8 @@ function Io(n) {
|
|
|
667
667
|
]);
|
|
668
668
|
return { focusedCell: S, setFocusedCell: N, handleFocus: f, handleBlur: k, handleKeyDown: y };
|
|
669
669
|
}
|
|
670
|
-
const
|
|
671
|
-
function
|
|
670
|
+
const To = { rowFields: [], columnFields: [], valueFields: [] };
|
|
671
|
+
function Wo(n) {
|
|
672
672
|
const {
|
|
673
673
|
initialState: t,
|
|
674
674
|
sortModel: e,
|
|
@@ -683,29 +683,29 @@ function Lo(n) {
|
|
|
683
683
|
paginationModel: x = { page: 0, pageSize: 100 },
|
|
684
684
|
onPaginationModelChange: h,
|
|
685
685
|
rowSelectionModel: m
|
|
686
|
-
} = n, [v, b] =
|
|
686
|
+
} = n, [v, b] = Z(
|
|
687
687
|
() => t?.sorting?.sortModel ?? []
|
|
688
|
-
), S = e !== void 0, N = S ? e : v, f = o !== void 0, [k, y] =
|
|
688
|
+
), S = e !== void 0, N = S ? e : v, f = o !== void 0, [k, y] = Z(
|
|
689
689
|
() => o ?? {}
|
|
690
|
-
), w = f ? o : k, u = z((
|
|
691
|
-
f || y(
|
|
692
|
-
}, [f, i]), p = l !== void 0, [j, E] =
|
|
690
|
+
), w = f ? o : k, u = z((ee) => {
|
|
691
|
+
f || y(ee), i?.(ee);
|
|
692
|
+
}, [f, i]), p = l !== void 0, [j, E] = Z(
|
|
693
693
|
() => t?.columns?.columnVisibilityModel ?? {}
|
|
694
|
-
), R = p ? l : j, _ = z((
|
|
695
|
-
p || E(
|
|
696
|
-
}, [p, a]), M = s !== void 0, [T, I] =
|
|
694
|
+
), R = p ? l : j, _ = z((ee) => {
|
|
695
|
+
p || E(ee), a?.(ee);
|
|
696
|
+
}, [p, a]), M = s !== void 0, [T, I] = Z(
|
|
697
697
|
() => t?.columns?.pinnedColumns ?? {}
|
|
698
|
-
), F = M ? s : T, H = z((
|
|
699
|
-
M || I(
|
|
700
|
-
}, [M, c]), [L, U] =
|
|
701
|
-
() => d ??
|
|
702
|
-
), q = d ?? L, K = z((
|
|
703
|
-
U(
|
|
704
|
-
}, [g]), C = x !== void 0 && n.paginationModel !== void 0, [B,
|
|
698
|
+
), F = M ? s : T, H = z((ee) => {
|
|
699
|
+
M || I(ee), c?.(ee);
|
|
700
|
+
}, [M, c]), [L, U] = Z(
|
|
701
|
+
() => d ?? To
|
|
702
|
+
), q = d ?? L, K = z((ee) => {
|
|
703
|
+
U(ee), g?.(ee);
|
|
704
|
+
}, [g]), C = x !== void 0 && n.paginationModel !== void 0, [B, W] = Z(
|
|
705
705
|
() => t?.pagination?.paginationModel ?? x
|
|
706
|
-
),
|
|
707
|
-
C ||
|
|
708
|
-
}, [C, h]), G = m !== void 0, [D, P] =
|
|
706
|
+
), O = C ? x : B, V = z((ee) => {
|
|
707
|
+
C || W(ee), h?.(ee);
|
|
708
|
+
}, [C, h]), G = m !== void 0, [D, P] = Z([]), ne = G ? m : D, te = le(() => new Set(ne), [ne]);
|
|
709
709
|
return {
|
|
710
710
|
sortModel: N,
|
|
711
711
|
isSortControlled: S,
|
|
@@ -718,15 +718,15 @@ function Lo(n) {
|
|
|
718
718
|
handlePinnedColumnsChange: H,
|
|
719
719
|
currentPivotModel: q,
|
|
720
720
|
handlePivotModelChange: K,
|
|
721
|
-
effectivePaginationModel:
|
|
721
|
+
effectivePaginationModel: O,
|
|
722
722
|
handlePaginationModelChange: V,
|
|
723
|
-
rowSelectionModel:
|
|
724
|
-
selectedRowIds:
|
|
723
|
+
rowSelectionModel: ne,
|
|
724
|
+
selectedRowIds: te,
|
|
725
725
|
isSelectionControlled: G,
|
|
726
726
|
setInternalRowSelectionModel: P
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
|
-
const
|
|
729
|
+
const Oo = {
|
|
730
730
|
contains: (n, t) => n == null || t == null ? !1 : String(n).toLowerCase().includes(String(t).toLowerCase()),
|
|
731
731
|
equals: (n, t) => n == null && t == null ? !0 : n == null || t == null ? !1 : String(n).toLowerCase() === String(t).toLowerCase(),
|
|
732
732
|
startsWith: (n, t) => n == null || t == null ? !1 : String(n).toLowerCase().startsWith(String(t).toLowerCase()),
|
|
@@ -770,11 +770,11 @@ const To = {
|
|
|
770
770
|
},
|
|
771
771
|
"=": (n, t) => n == null || t == null || t === "" ? !1 : Number(n) === Number(t)
|
|
772
772
|
};
|
|
773
|
-
function
|
|
774
|
-
const { field: e, operator: o, value: i } = t, l = n[e], a =
|
|
773
|
+
function Fo(n, t) {
|
|
774
|
+
const { field: e, operator: o, value: i } = t, l = n[e], a = Oo[o];
|
|
775
775
|
return a ? a(l, i) : (console.warn(`Unknown filter operator: ${o}`), !0);
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function Ao(n, t) {
|
|
778
778
|
return !t || t.length === 0 ? !0 : t.every((e) => {
|
|
779
779
|
const o = e.toLowerCase();
|
|
780
780
|
return Object.values(n).some((i) => i == null ? !1 : String(i).toLowerCase().includes(o));
|
|
@@ -782,7 +782,7 @@ function Wo(n, t) {
|
|
|
782
782
|
}
|
|
783
783
|
function un(n, t) {
|
|
784
784
|
const e = t.items ?? [], o = t.logicOperator ?? "and", i = ("quickFilterValues" in t ? t.quickFilterValues : void 0) ?? [];
|
|
785
|
-
if (i.length > 0 && !
|
|
785
|
+
if (i.length > 0 && !Ao(n, i))
|
|
786
786
|
return !1;
|
|
787
787
|
if (e.length === 0)
|
|
788
788
|
return !0;
|
|
@@ -791,16 +791,16 @@ function un(n, t) {
|
|
|
791
791
|
const s = a, c = s.items;
|
|
792
792
|
return c.length === 0 ? !0 : s.logicOperator === "and" ? c.every(l) : c.some(l);
|
|
793
793
|
} else
|
|
794
|
-
return
|
|
794
|
+
return Fo(n, a);
|
|
795
795
|
};
|
|
796
796
|
return o === "and" ? e.every(l) : e.some(l);
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function zo(n, t) {
|
|
799
799
|
if (!t) return n;
|
|
800
800
|
const { items: e = [], quickFilterValues: o = [] } = t;
|
|
801
801
|
return e.length === 0 && (!o || o.length === 0) ? n : n.filter((i) => un(i, t));
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function Bo(n) {
|
|
804
804
|
switch (n) {
|
|
805
805
|
case "number":
|
|
806
806
|
return ["=", "!=", ">", ">=", "<", "<=", "isEmpty", "isNotEmpty"];
|
|
@@ -825,7 +825,7 @@ function gn(n, t, e) {
|
|
|
825
825
|
const o = String(n).toLowerCase(), i = String(t).toLowerCase();
|
|
826
826
|
return e === "asc" ? o < i ? -1 : o > i ? 1 : 0 : o > i ? -1 : o < i ? 1 : 0;
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function $o(n, t) {
|
|
829
829
|
if (t.length === 0)
|
|
830
830
|
return n;
|
|
831
831
|
const e = [...n];
|
|
@@ -838,7 +838,7 @@ function zo(n, t) {
|
|
|
838
838
|
return 0;
|
|
839
839
|
}), e;
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function Do(n) {
|
|
842
842
|
const {
|
|
843
843
|
effectiveRows: t,
|
|
844
844
|
activeHierarchyHandlers: e,
|
|
@@ -853,11 +853,11 @@ function Bo(n) {
|
|
|
853
853
|
pinnedRows: x,
|
|
854
854
|
isLoading: h,
|
|
855
855
|
pageSize: m
|
|
856
|
-
} = n, v =
|
|
856
|
+
} = n, v = le(() => e ? e.getVisibleRows() || [] : o === "server" && l ? t : zo(t, i), [t, i, e, o, l]), { top: b, center: S, bottom: N } = le(() => e ? { top: [], center: v, bottom: [] } : Io(v, x), [v, x, e]), f = le(() => e || s === "server" && l ? S : $o(S, a), [S, a, e, s, l]), k = le(() => {
|
|
857
857
|
if (!c || d === "server" && l) return f;
|
|
858
858
|
const w = g.page * g.pageSize;
|
|
859
859
|
return f.slice(w, w + g.pageSize);
|
|
860
|
-
}, [f, c, g.page, g.pageSize, d, l]), y =
|
|
860
|
+
}, [f, c, g.page, g.pageSize, d, l]), y = le(() => {
|
|
861
861
|
if (e) return S;
|
|
862
862
|
const w = c ? k : f, u = [...b, ...w, ...N];
|
|
863
863
|
if (d === "infinite" && h && u.length > 0) {
|
|
@@ -890,7 +890,7 @@ function Bo(n) {
|
|
|
890
890
|
allRenderableRows: y
|
|
891
891
|
};
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function Ho(n) {
|
|
894
894
|
const {
|
|
895
895
|
layout: t,
|
|
896
896
|
scrollTop: e,
|
|
@@ -904,7 +904,7 @@ function $o(n) {
|
|
|
904
904
|
pinCheckboxColumn: g,
|
|
905
905
|
pinExpandColumn: x
|
|
906
906
|
} = n;
|
|
907
|
-
return
|
|
907
|
+
return le(() => {
|
|
908
908
|
const {
|
|
909
909
|
unpinnedAccWidths: h,
|
|
910
910
|
unpinnedColsWithWidth: m,
|
|
@@ -941,13 +941,13 @@ function $o(n) {
|
|
|
941
941
|
...m.slice(H, L + 1),
|
|
942
942
|
...C > 0 ? [{ field: "__spacer_right__", width: C, isSpacer: !0 }] : [],
|
|
943
943
|
...b
|
|
944
|
-
],
|
|
945
|
-
let D = 0, P = R - 1,
|
|
946
|
-
for (;
|
|
947
|
-
const $ =
|
|
948
|
-
w[$] < e ?
|
|
944
|
+
], O = _ > 0 && S > _ ? 16 : 0, V = u + j + p + O + 2, G = 5;
|
|
945
|
+
let D = 0, P = R - 1, ne = 0, te = 0, ee = w.length - 1;
|
|
946
|
+
for (; te <= ee; ) {
|
|
947
|
+
const $ = te + ee >>> 1;
|
|
948
|
+
w[$] < e ? te = $ + 1 : ee = $ - 1;
|
|
949
949
|
}
|
|
950
|
-
D = Math.max(0,
|
|
950
|
+
D = Math.max(0, te - G), ne = D > 0 ? w[D - 1] : 0;
|
|
951
951
|
for (let $ = D; $ < w.length; $++)
|
|
952
952
|
if (w[$] >= e + M) {
|
|
953
953
|
P = Math.min(R - 1, $ + G);
|
|
@@ -961,7 +961,7 @@ function $o(n) {
|
|
|
961
961
|
firstColumnIndex: H,
|
|
962
962
|
lastColumnIndex: L
|
|
963
963
|
},
|
|
964
|
-
offsetTop:
|
|
964
|
+
offsetTop: ne,
|
|
965
965
|
offsetLeft: 0,
|
|
966
966
|
totalHeight: V,
|
|
967
967
|
pinnedTopHeight: u,
|
|
@@ -993,8 +993,8 @@ function $o(n) {
|
|
|
993
993
|
x
|
|
994
994
|
]);
|
|
995
995
|
}
|
|
996
|
-
function
|
|
997
|
-
const { columns: t, onColumnOrderChange: e, disableColumnReorder: o = !1 } = n, [i, l] =
|
|
996
|
+
function Go(n) {
|
|
997
|
+
const { columns: t, onColumnOrderChange: e, disableColumnReorder: o = !1 } = n, [i, l] = Z(null), [a, s] = Z(null), c = J(-1), d = z(
|
|
998
998
|
(m) => (v) => {
|
|
999
999
|
if (o) return;
|
|
1000
1000
|
const b = t.findIndex((N) => N.field === m);
|
|
@@ -1041,7 +1041,7 @@ function Do(n) {
|
|
|
1041
1041
|
onDrop: o ? void 0 : x
|
|
1042
1042
|
};
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function zn({ isExpanded: n, onClick: t, variant: e = "chevron" }) {
|
|
1045
1045
|
return /* @__PURE__ */ r.jsx(
|
|
1046
1046
|
"button",
|
|
1047
1047
|
{
|
|
@@ -1114,7 +1114,7 @@ function An({ isExpanded: n, onClick: t, variant: e = "chevron" }) {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
);
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1117
|
+
function Vo(n) {
|
|
1118
1118
|
const {
|
|
1119
1119
|
activeColumns: t,
|
|
1120
1120
|
isHierarchyEnabled: e,
|
|
@@ -1131,7 +1131,7 @@ function Ho(n) {
|
|
|
1131
1131
|
rowReordering: m,
|
|
1132
1132
|
initialState: v,
|
|
1133
1133
|
setColumns: b
|
|
1134
|
-
} = n, S =
|
|
1134
|
+
} = n, S = le(() => e ? t.map((_, M) => M === 0 ? {
|
|
1135
1135
|
..._,
|
|
1136
1136
|
renderCell: (T) => {
|
|
1137
1137
|
const I = T.row, F = typeof I._treeDepth == "number" ? I._treeDepth : 0, H = !!I._hasChildren, L = !!I._isExpanded, U = typeof I._groupingField == "string" ? I._groupingField : void 0, q = I._groupingValue, K = typeof I._descendantCount == "number" ? I._descendantCount : void 0, C = !!I._isGroupRow;
|
|
@@ -1147,19 +1147,19 @@ function Ho(n) {
|
|
|
1147
1147
|
/* @__PURE__ */ r.jsx("div", { style: { marginRight: 4, width: 24, height: 24, display: "flex", alignItems: "center", justifyContent: "center", cursor: H ? "pointer" : "default", flexShrink: 0 }, children: H ? /* @__PURE__ */ r.jsx(
|
|
1148
1148
|
"div",
|
|
1149
1149
|
{
|
|
1150
|
-
onClick: (
|
|
1151
|
-
|
|
1150
|
+
onClick: (W) => {
|
|
1151
|
+
W.stopPropagation(), W.preventDefault(), l?.toggleExpansion(T.row.id);
|
|
1152
1152
|
},
|
|
1153
|
-
onMouseDown: (
|
|
1154
|
-
|
|
1153
|
+
onMouseDown: (W) => {
|
|
1154
|
+
W.stopPropagation();
|
|
1155
1155
|
},
|
|
1156
1156
|
style: { cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", pointerEvents: "auto", zIndex: 10, position: "relative" },
|
|
1157
1157
|
children: /* @__PURE__ */ r.jsx(
|
|
1158
|
-
|
|
1158
|
+
zn,
|
|
1159
1159
|
{
|
|
1160
1160
|
isExpanded: L,
|
|
1161
|
-
onClick: (
|
|
1162
|
-
|
|
1161
|
+
onClick: (W) => {
|
|
1162
|
+
W.stopPropagation(), W.preventDefault(), l?.toggleExpansion(T.row.id);
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
1165
|
)
|
|
@@ -1174,11 +1174,11 @@ function Ho(n) {
|
|
|
1174
1174
|
const I = T.row, F = !!I._hasChildren, H = typeof I._groupingField == "string" ? I._groupingField : void 0;
|
|
1175
1175
|
return o && F ? _.field === H ? null : T.value !== void 0 && T.value !== null ? _.renderCell ? _.renderCell(T) : T.value : null : _.renderCell ? _.renderCell(T) : T.value;
|
|
1176
1176
|
}
|
|
1177
|
-
}) : t, [t, e, o, i, l]), [N, f] =
|
|
1177
|
+
}) : t, [t, e, o, i, l]), [N, f] = Z(
|
|
1178
1178
|
() => v?.columns?.columnWidths ?? {}
|
|
1179
1179
|
), k = z((_, M) => {
|
|
1180
1180
|
f((T) => ({ ...T, [_]: M }));
|
|
1181
|
-
}, []), [y, w] =
|
|
1181
|
+
}, []), [y, w] = Z(
|
|
1182
1182
|
() => v?.columns?.columnOrder ?? t.map((_) => _.field)
|
|
1183
1183
|
), u = s ?? y;
|
|
1184
1184
|
re(() => {
|
|
@@ -1186,24 +1186,24 @@ function Ho(n) {
|
|
|
1186
1186
|
}, [t, b]), re(() => {
|
|
1187
1187
|
g && w(t.map((_) => _.field));
|
|
1188
1188
|
}, [g, t]);
|
|
1189
|
-
const p =
|
|
1189
|
+
const p = le(() => {
|
|
1190
1190
|
if (d) return S;
|
|
1191
1191
|
const _ = new Map(u.map((M, T) => [M, T]));
|
|
1192
1192
|
return [...S].sort((M, T) => {
|
|
1193
1193
|
const I = _.get(M.field) ?? S.indexOf(M), F = _.get(T.field) ?? S.indexOf(T);
|
|
1194
1194
|
return I - F;
|
|
1195
1195
|
});
|
|
1196
|
-
}, [S, u, d]), j =
|
|
1196
|
+
}, [S, u, d]), j = le(
|
|
1197
1197
|
() => p.filter((_) => a[_.field] !== !1),
|
|
1198
1198
|
[p, a]
|
|
1199
|
-
), E =
|
|
1199
|
+
), E = Go({
|
|
1200
1200
|
columns: p,
|
|
1201
1201
|
onColumnOrderChange: z((_) => {
|
|
1202
1202
|
const { oldIndex: M, targetIndex: T } = _, I = [...u], [F] = I.splice(M, 1);
|
|
1203
1203
|
I.splice(T, 0, F), s || w(I), c?.(_);
|
|
1204
1204
|
}, [u, s, c]),
|
|
1205
1205
|
disableColumnReorder: d
|
|
1206
|
-
}), R =
|
|
1206
|
+
}), R = le(() => {
|
|
1207
1207
|
const _ = [];
|
|
1208
1208
|
return m && _.push({ field: "__reorder_col__" }), h && _.push({ field: "__expand_col__" }), x && _.push({ field: "__checkbox_col__" }), [..._, ...p];
|
|
1209
1209
|
}, [p, x, h, m]);
|
|
@@ -1219,7 +1219,7 @@ function Ho(n) {
|
|
|
1219
1219
|
handleColumnResize: k
|
|
1220
1220
|
};
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1222
|
+
function Uo(n) {
|
|
1223
1223
|
const {
|
|
1224
1224
|
renderContext: t,
|
|
1225
1225
|
pinnedTopRows: e,
|
|
@@ -1228,7 +1228,7 @@ function Go(n) {
|
|
|
1228
1228
|
sortedUnpinnedRows: l,
|
|
1229
1229
|
pagination: a
|
|
1230
1230
|
} = n;
|
|
1231
|
-
return
|
|
1231
|
+
return le(() => {
|
|
1232
1232
|
const { firstRowIndex: s, lastRowIndex: c } = t, d = a ? i : l, g = e.length, x = e.map((f, k) => ({ row: f, rowIndex: k })), h = o.map((f, k) => ({
|
|
1233
1233
|
row: f,
|
|
1234
1234
|
rowIndex: g + d.length + k
|
|
@@ -1239,8 +1239,8 @@ function Go(n) {
|
|
|
1239
1239
|
return S.filter((f) => N.has(f.row.id) ? !1 : (N.add(f.row.id), !0));
|
|
1240
1240
|
}, [t, e, o, i, l, a]);
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1243
|
-
const { onRowsScrollEnd: t } = n, e = J({ scrollTop: 0, scrollLeft: 0 }), o = J(null), [i, l] =
|
|
1242
|
+
function Ko(n) {
|
|
1243
|
+
const { onRowsScrollEnd: t } = n, e = J({ scrollTop: 0, scrollLeft: 0 }), o = J(null), [i, l] = Z({ scrollTop: 0, scrollLeft: 0 });
|
|
1244
1244
|
re(() => () => {
|
|
1245
1245
|
o.current !== null && cancelAnimationFrame(o.current);
|
|
1246
1246
|
}, []);
|
|
@@ -1259,7 +1259,7 @@ function Vo(n) {
|
|
|
1259
1259
|
}, [t]);
|
|
1260
1260
|
return { scrollTop: i.scrollTop, scrollLeft: i.scrollLeft, handleScroll: a };
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function Yo(n) {
|
|
1263
1263
|
const {
|
|
1264
1264
|
onStateChange: t,
|
|
1265
1265
|
sortModel: e,
|
|
@@ -1296,7 +1296,7 @@ function Uo(n) {
|
|
|
1296
1296
|
c
|
|
1297
1297
|
]);
|
|
1298
1298
|
}
|
|
1299
|
-
const
|
|
1299
|
+
const qo = {
|
|
1300
1300
|
sum: (n) => n.filter((e) => e != null && !isNaN(Number(e))).reduce((e, o) => e + Number(o), 0),
|
|
1301
1301
|
avg: (n) => {
|
|
1302
1302
|
const t = n.filter((e) => e != null && !isNaN(Number(e)));
|
|
@@ -1316,7 +1316,7 @@ const Ko = {
|
|
|
1316
1316
|
function He(n, t) {
|
|
1317
1317
|
return n == null ? "—" : typeof n == "number" ? t === "avg" ? n.toLocaleString(void 0, { maximumFractionDigits: 2 }) : n.toLocaleString() : String(n);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Xo(n) {
|
|
1320
1320
|
const {
|
|
1321
1321
|
rows: t,
|
|
1322
1322
|
aggregationModel: e,
|
|
@@ -1325,11 +1325,11 @@ function Yo(n) {
|
|
|
1325
1325
|
filterModel: l,
|
|
1326
1326
|
sortModel: a,
|
|
1327
1327
|
serverAggregationResults: s
|
|
1328
|
-
} = n, c =
|
|
1328
|
+
} = n, c = le(() => {
|
|
1329
1329
|
if (o || Object.keys(e).length === 0) return {};
|
|
1330
1330
|
const f = {};
|
|
1331
1331
|
for (const [k, y] of Object.entries(e)) {
|
|
1332
|
-
const w =
|
|
1332
|
+
const w = qo[y];
|
|
1333
1333
|
if (!w) {
|
|
1334
1334
|
console.warn(`[useAggregation] Unknown aggregation function: "${y}"`);
|
|
1335
1335
|
continue;
|
|
@@ -1338,7 +1338,7 @@ function Yo(n) {
|
|
|
1338
1338
|
f[k] = w(u);
|
|
1339
1339
|
}
|
|
1340
1340
|
return f;
|
|
1341
|
-
}, [t, e, o]), [d, g] =
|
|
1341
|
+
}, [t, e, o]), [d, g] = Z({}), [x, h] = Z(!1), [m, v] = Z(null), b = J(0), S = z(async () => {
|
|
1342
1342
|
if (!i?.getAggregations || Object.keys(e).length === 0) return;
|
|
1343
1343
|
const f = ++b.current;
|
|
1344
1344
|
h(!0), v(null);
|
|
@@ -1358,9 +1358,9 @@ function Yo(n) {
|
|
|
1358
1358
|
}, [i, e, l, a]);
|
|
1359
1359
|
return re(() => {
|
|
1360
1360
|
o && i?.getAggregations && !s && S();
|
|
1361
|
-
}, [S, o, i, s]), { aggregationResult:
|
|
1361
|
+
}, [S, o, i, s]), { aggregationResult: le(() => o ? s && Object.keys(s).length > 0 ? s : d : c, [o, c, s, d]), isLoading: x, error: m };
|
|
1362
1362
|
}
|
|
1363
|
-
function
|
|
1363
|
+
function Jo({
|
|
1364
1364
|
columns: n,
|
|
1365
1365
|
aggregationModel: t,
|
|
1366
1366
|
aggregationResult: e,
|
|
@@ -1407,7 +1407,7 @@ function qo({
|
|
|
1407
1407
|
}
|
|
1408
1408
|
);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function Qo({ noRowsLabel: n, width: t }) {
|
|
1411
1411
|
return /* @__PURE__ */ r.jsxs("div", { className: "ogx__empty", style: { width: t }, children: [
|
|
1412
1412
|
/* @__PURE__ */ r.jsxs("svg", { width: "40", height: "40", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
|
|
1413
1413
|
/* @__PURE__ */ r.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
@@ -1416,7 +1416,7 @@ function Xo({ noRowsLabel: n, width: t }) {
|
|
|
1416
1416
|
/* @__PURE__ */ r.jsx("span", { children: n })
|
|
1417
1417
|
] });
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function Zo({ error: n }) {
|
|
1420
1420
|
if (!n) return null;
|
|
1421
1421
|
const t = n instanceof Error ? n.message : typeof n == "string" ? n : "An unexpected error occurred while loading the data.";
|
|
1422
1422
|
return /* @__PURE__ */ r.jsxs("div", { className: "ogx-error-overlay", "aria-live": "assertive", role: "alert", children: [
|
|
@@ -1444,10 +1444,10 @@ const At = ({
|
|
|
1444
1444
|
inputRef: o,
|
|
1445
1445
|
...i
|
|
1446
1446
|
}) => {
|
|
1447
|
-
const l =
|
|
1447
|
+
const l = ae.useRef(null), a = ae.useCallback((c) => {
|
|
1448
1448
|
l.current = c, typeof o == "function" ? o(c) : o && (o.current = c);
|
|
1449
1449
|
}, [o]);
|
|
1450
|
-
|
|
1450
|
+
ae.useEffect(() => {
|
|
1451
1451
|
l.current && (l.current.indeterminate = n);
|
|
1452
1452
|
}, [n]);
|
|
1453
1453
|
const s = [
|
|
@@ -1473,8 +1473,8 @@ const At = ({
|
|
|
1473
1473
|
t && /* @__PURE__ */ r.jsx("span", { className: "ogx-checkbox__label", children: t })
|
|
1474
1474
|
] });
|
|
1475
1475
|
};
|
|
1476
|
-
function
|
|
1477
|
-
const { field: t, currentWidth: e, onResize: o, minWidth: i = 50, maxWidth: l = 1e3 } = n, [a, s] =
|
|
1476
|
+
function er(n) {
|
|
1477
|
+
const { field: t, currentWidth: e, onResize: o, minWidth: i = 50, maxWidth: l = 1e3 } = n, [a, s] = Z(!1), c = J(0), d = J(0), g = z((m) => {
|
|
1478
1478
|
m.preventDefault(), m.stopPropagation(), s(!0), c.current = m.clientX, d.current = e;
|
|
1479
1479
|
let v = 0;
|
|
1480
1480
|
const b = 16, S = (f) => {
|
|
@@ -1509,13 +1509,13 @@ function Qo(n) {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
);
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function lt() {
|
|
1513
1513
|
return /* @__PURE__ */ r.jsx("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "currentColor", children: /* @__PURE__ */ r.jsx("circle", { cx: "4", cy: "4", r: "4" }) });
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1515
|
+
function st() {
|
|
1516
1516
|
return /* @__PURE__ */ r.jsx("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ r.jsx("circle", { cx: "4", cy: "4", r: "3" }) });
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function tr() {
|
|
1519
1519
|
return /* @__PURE__ */ r.jsxs("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "13", height: "13", fill: "none", children: [
|
|
1520
1520
|
/* @__PURE__ */ r.jsx("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", stroke: "currentColor", strokeWidth: "1.8" }),
|
|
1521
1521
|
/* @__PURE__ */ r.jsx("rect", { x: "8.5", y: "4", width: "7", height: "16", fill: "currentColor", opacity: "0.3" }),
|
|
@@ -1525,52 +1525,52 @@ function Zo() {
|
|
|
1525
1525
|
/* @__PURE__ */ r.jsx("line", { x1: "2", y1: "14", x2: "22", y2: "14", stroke: "currentColor", strokeWidth: "1.2" })
|
|
1526
1526
|
] });
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1528
|
+
function nr() {
|
|
1529
1529
|
return /* @__PURE__ */ r.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1530
1530
|
/* @__PURE__ */ r.jsx("line", { x1: "12", y1: "19", x2: "12", y2: "5" }),
|
|
1531
1531
|
/* @__PURE__ */ r.jsx("polyline", { points: "5 12 12 5 19 12" })
|
|
1532
1532
|
] });
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1534
|
+
function or() {
|
|
1535
1535
|
return /* @__PURE__ */ r.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1536
1536
|
/* @__PURE__ */ r.jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
1537
1537
|
/* @__PURE__ */ r.jsx("polyline", { points: "19 12 12 19 5 12" })
|
|
1538
1538
|
] });
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function rr() {
|
|
1541
1541
|
return /* @__PURE__ */ r.jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", children: /* @__PURE__ */ r.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function ir() {
|
|
1544
1544
|
return /* @__PURE__ */ r.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1545
1545
|
/* @__PURE__ */ r.jsx("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94" }),
|
|
1546
1546
|
/* @__PURE__ */ r.jsx("path", { d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19" }),
|
|
1547
1547
|
/* @__PURE__ */ r.jsx("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
|
1548
1548
|
] });
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function lr() {
|
|
1551
1551
|
return /* @__PURE__ */ r.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1552
1552
|
/* @__PURE__ */ r.jsx("line", { x1: "4", y1: "2", x2: "4", y2: "22" }),
|
|
1553
1553
|
/* @__PURE__ */ r.jsx("polyline", { points: "11 8 4 12 11 16" }),
|
|
1554
1554
|
/* @__PURE__ */ r.jsx("line", { x1: "4", y1: "12", x2: "20", y2: "12" })
|
|
1555
1555
|
] });
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function sr() {
|
|
1558
1558
|
return /* @__PURE__ */ r.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1559
1559
|
/* @__PURE__ */ r.jsx("line", { x1: "20", y1: "2", x2: "20", y2: "22" }),
|
|
1560
1560
|
/* @__PURE__ */ r.jsx("polyline", { points: "13 8 20 12 13 16" }),
|
|
1561
1561
|
/* @__PURE__ */ r.jsx("line", { x1: "20", y1: "12", x2: "4", y2: "12" })
|
|
1562
1562
|
] });
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1564
|
+
function ar() {
|
|
1565
1565
|
return /* @__PURE__ */ r.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1566
1566
|
/* @__PURE__ */ r.jsx("line", { x1: "2", y1: "2", x2: "22", y2: "22" }),
|
|
1567
1567
|
/* @__PURE__ */ r.jsx("line", { x1: "4", y1: "4", x2: "4", y2: "20" }),
|
|
1568
1568
|
/* @__PURE__ */ r.jsx("line", { x1: "4", y1: "12", x2: "20", y2: "12" })
|
|
1569
1569
|
] });
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1572
|
-
const d = J(null), [g, x] =
|
|
1573
|
-
|
|
1571
|
+
function dr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedColumns: l, onManageColumns: a, onClose: s, anchorEl: c }) {
|
|
1572
|
+
const d = J(null), [g, x] = Z({ position: "fixed", zIndex: 1300, top: 0, left: 0, visibility: "hidden" });
|
|
1573
|
+
ae.useLayoutEffect(() => {
|
|
1574
1574
|
if (!c || !d.current) return;
|
|
1575
1575
|
const w = c.getBoundingClientRect(), u = d.current.getBoundingClientRect(), p = window.innerWidth, j = window.innerHeight, E = 8;
|
|
1576
1576
|
let R = w.left;
|
|
@@ -1606,8 +1606,8 @@ function sr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
|
|
|
1606
1606
|
role: "menuitemradio",
|
|
1607
1607
|
"aria-checked": b === "asc",
|
|
1608
1608
|
children: [
|
|
1609
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: b === "asc" ? /* @__PURE__ */ r.jsx(
|
|
1610
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1609
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: b === "asc" ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
|
|
1610
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(nr, {}) }),
|
|
1611
1611
|
"Sort Ascending"
|
|
1612
1612
|
]
|
|
1613
1613
|
}
|
|
@@ -1620,8 +1620,8 @@ function sr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
|
|
|
1620
1620
|
role: "menuitemradio",
|
|
1621
1621
|
"aria-checked": b === "desc",
|
|
1622
1622
|
children: [
|
|
1623
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: b === "desc" ? /* @__PURE__ */ r.jsx(
|
|
1624
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1623
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: b === "desc" ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
|
|
1624
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(or, {}) }),
|
|
1625
1625
|
"Sort Descending"
|
|
1626
1626
|
]
|
|
1627
1627
|
}
|
|
@@ -1634,8 +1634,8 @@ function sr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
|
|
|
1634
1634
|
role: "menuitemradio",
|
|
1635
1635
|
"aria-checked": S,
|
|
1636
1636
|
children: [
|
|
1637
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: S ? /* @__PURE__ */ r.jsx(
|
|
1638
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1637
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: S ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
|
|
1638
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(rr, {}) }),
|
|
1639
1639
|
"Unsort"
|
|
1640
1640
|
]
|
|
1641
1641
|
}
|
|
@@ -1652,8 +1652,8 @@ function sr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
|
|
|
1652
1652
|
"aria-checked": N,
|
|
1653
1653
|
"aria-label": "Pin to left",
|
|
1654
1654
|
children: [
|
|
1655
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: N ? /* @__PURE__ */ r.jsx(
|
|
1656
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1655
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: N ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
|
|
1656
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(lr, {}) }),
|
|
1657
1657
|
"Pin to Left"
|
|
1658
1658
|
]
|
|
1659
1659
|
}
|
|
@@ -1667,8 +1667,8 @@ function sr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
|
|
|
1667
1667
|
"aria-checked": f,
|
|
1668
1668
|
"aria-label": "Pin to right",
|
|
1669
1669
|
children: [
|
|
1670
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: f ? /* @__PURE__ */ r.jsx(
|
|
1671
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1670
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: f ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
|
|
1671
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(sr, {}) }),
|
|
1672
1672
|
"Pin to Right"
|
|
1673
1673
|
]
|
|
1674
1674
|
}
|
|
@@ -1682,8 +1682,8 @@ function sr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
|
|
|
1682
1682
|
"aria-checked": k,
|
|
1683
1683
|
"aria-label": "Unpin column",
|
|
1684
1684
|
children: [
|
|
1685
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: k ? /* @__PURE__ */ r.jsx(
|
|
1686
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1685
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true", children: k ? /* @__PURE__ */ r.jsx(lt, {}) : /* @__PURE__ */ r.jsx(st, {}) }),
|
|
1686
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(ar, {}) }),
|
|
1687
1687
|
"Unpin"
|
|
1688
1688
|
]
|
|
1689
1689
|
}
|
|
@@ -1691,7 +1691,7 @@ function sr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
|
|
|
1691
1691
|
/* @__PURE__ */ r.jsx("div", { className: "ogx-menu-divider" }),
|
|
1692
1692
|
/* @__PURE__ */ r.jsxs("button", { className: "ogx-menu-item", onClick: m, role: "menuitem", "aria-label": `Hide ${y} column`, children: [
|
|
1693
1693
|
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true" }),
|
|
1694
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1694
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(ir, {}) }),
|
|
1695
1695
|
"Hide Column"
|
|
1696
1696
|
] }),
|
|
1697
1697
|
/* @__PURE__ */ r.jsx("div", { className: "ogx-menu-divider" }),
|
|
@@ -1699,26 +1699,26 @@ function sr({ colDef: n, sortModel: t, onSort: e, onHide: o, onPin: i, pinnedCol
|
|
|
1699
1699
|
a?.(), s();
|
|
1700
1700
|
}, role: "menuitem", "aria-label": "Manage all columns", children: [
|
|
1701
1701
|
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__indicator", "aria-hidden": "true" }),
|
|
1702
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(
|
|
1702
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx-menu-item__icon", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx(tr, {}) }),
|
|
1703
1703
|
"Manage columns"
|
|
1704
1704
|
] })
|
|
1705
1705
|
] }),
|
|
1706
1706
|
c?.closest(".ogx-theme-provider") || document.body
|
|
1707
1707
|
);
|
|
1708
1708
|
}
|
|
1709
|
-
function
|
|
1709
|
+
function cr() {
|
|
1710
1710
|
return /* @__PURE__ */ r.jsx("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ r.jsx("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }) });
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1712
|
+
function ur() {
|
|
1713
1713
|
return /* @__PURE__ */ r.jsx("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", fill: "currentColor", children: /* @__PURE__ */ r.jsx("path", { d: "M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z" }) });
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1715
|
+
function Bn(n) {
|
|
1716
1716
|
const t = [];
|
|
1717
1717
|
for (const e of n.children)
|
|
1718
|
-
typeof e == "string" ? t.push(e) : t.push(...
|
|
1718
|
+
typeof e == "string" ? t.push(e) : t.push(...Bn(e));
|
|
1719
1719
|
return t;
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function gr(n) {
|
|
1722
1722
|
let t = 0;
|
|
1723
1723
|
function e(o, i) {
|
|
1724
1724
|
t = Math.max(t, i);
|
|
@@ -1726,9 +1726,9 @@ function cr(n) {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
return n.forEach((o) => e(o, 1)), t;
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function fr(n, t, e) {
|
|
1730
1730
|
function o(s, c, d) {
|
|
1731
|
-
if (!
|
|
1731
|
+
if (!Bn(s).includes(c)) return null;
|
|
1732
1732
|
if (d === e) return s;
|
|
1733
1733
|
for (const g of s.children)
|
|
1734
1734
|
if (typeof g != "string") {
|
|
@@ -1759,7 +1759,7 @@ function ur(n, t, e) {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
return l;
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1762
|
+
function hr(n) {
|
|
1763
1763
|
const {
|
|
1764
1764
|
columns: t,
|
|
1765
1765
|
allColumns: e,
|
|
@@ -1789,12 +1789,12 @@ function gr(n) {
|
|
|
1789
1789
|
onHideColumn: R,
|
|
1790
1790
|
onPinColumn: _,
|
|
1791
1791
|
onManageColumns: M
|
|
1792
|
-
} = n, T =
|
|
1793
|
-
|
|
1792
|
+
} = n, T = ae.useRef({}), [I, F] = ae.useState(null), H = (P) => (ne) => {
|
|
1793
|
+
ne.stopPropagation(), F({ colDef: P, anchorEl: ne.currentTarget });
|
|
1794
1794
|
}, L = () => {
|
|
1795
1795
|
F(null);
|
|
1796
1796
|
};
|
|
1797
|
-
|
|
1797
|
+
ae.useLayoutEffect(() => {
|
|
1798
1798
|
if (j?.id === "HEADER") {
|
|
1799
1799
|
const P = T.current[j.field];
|
|
1800
1800
|
P && P.focus();
|
|
@@ -1802,13 +1802,13 @@ function gr(n) {
|
|
|
1802
1802
|
}, [j]);
|
|
1803
1803
|
const U = (P) => () => {
|
|
1804
1804
|
if (P.sortable === !1 || !c) return;
|
|
1805
|
-
const
|
|
1806
|
-
let
|
|
1807
|
-
|
|
1805
|
+
const ne = d.find((ee) => ee.field === P.field);
|
|
1806
|
+
let te = "asc";
|
|
1807
|
+
ne && (ne.sort === "asc" ? te = "desc" : te = null), c(P.field, te);
|
|
1808
1808
|
}, q = (P) => {
|
|
1809
|
-
const
|
|
1810
|
-
return
|
|
1811
|
-
}, K =
|
|
1809
|
+
const ne = d.find((te) => te.field === P);
|
|
1810
|
+
return ne ? /* @__PURE__ */ r.jsx("span", { className: `ogx__sort-icon ogx__sort-icon--${ne.sort}`, "aria-hidden": "true" }) : null;
|
|
1811
|
+
}, K = ae.useMemo(() => An(
|
|
1812
1812
|
t,
|
|
1813
1813
|
x,
|
|
1814
1814
|
h,
|
|
@@ -1817,7 +1817,7 @@ function gr(n) {
|
|
|
1817
1817
|
m,
|
|
1818
1818
|
b,
|
|
1819
1819
|
S
|
|
1820
|
-
), [t, x, h, i, v, m, b, S]), C = o ?
|
|
1820
|
+
), [t, x, h, i, v, m, b, S]), C = o ? gr(o) : 0, W = (e ?? t).filter((P) => !P.isSpacer).map((P) => ({
|
|
1821
1821
|
field: P.field,
|
|
1822
1822
|
width: x[P.field] ?? P.width ?? 100
|
|
1823
1823
|
})), D = (S ? 48 : 0) + (m ? 48 : 0) + (i ? 48 : 0);
|
|
@@ -1825,11 +1825,11 @@ function gr(n) {
|
|
|
1825
1825
|
// Outer sticky wrapper — both group rows AND column header row live here
|
|
1826
1826
|
// so they ALL stay sticky together and scroll horizontally as one unit.
|
|
1827
1827
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx__header-wrap", children: [
|
|
1828
|
-
C > 0 && Array.from({ length: C }, (P,
|
|
1829
|
-
const
|
|
1828
|
+
C > 0 && Array.from({ length: C }, (P, ne) => {
|
|
1829
|
+
const te = fr(
|
|
1830
1830
|
o,
|
|
1831
|
-
|
|
1832
|
-
|
|
1831
|
+
W,
|
|
1832
|
+
ne
|
|
1833
1833
|
);
|
|
1834
1834
|
return /* @__PURE__ */ r.jsxs("div", { className: "ogx-col-group-row", role: "row", children: [
|
|
1835
1835
|
D > 0 && /* @__PURE__ */ r.jsx(
|
|
@@ -1840,18 +1840,18 @@ function gr(n) {
|
|
|
1840
1840
|
role: "columnheader"
|
|
1841
1841
|
}
|
|
1842
1842
|
),
|
|
1843
|
-
|
|
1843
|
+
te.map((ee) => /* @__PURE__ */ r.jsx(
|
|
1844
1844
|
"div",
|
|
1845
1845
|
{
|
|
1846
1846
|
role: "columnheader",
|
|
1847
|
-
className: `ogx-col-group-cell ${
|
|
1848
|
-
style: { width:
|
|
1849
|
-
title:
|
|
1850
|
-
children:
|
|
1847
|
+
className: `ogx-col-group-cell ${ee.isGroup ? "ogx-col-group-cell--group" : "ogx-col-group-cell--filler"}`,
|
|
1848
|
+
style: { width: ee.width, minWidth: ee.width, flexShrink: 0 },
|
|
1849
|
+
title: ee.isGroup ? ee.label : void 0,
|
|
1850
|
+
children: ee.isGroup && /* @__PURE__ */ r.jsx("span", { className: "ogx-col-group-cell__label", children: ee.label })
|
|
1851
1851
|
},
|
|
1852
|
-
|
|
1852
|
+
ee.key
|
|
1853
1853
|
))
|
|
1854
|
-
] }, `ogx-grp-${
|
|
1854
|
+
] }, `ogx-grp-${ne}`);
|
|
1855
1855
|
}),
|
|
1856
1856
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx__header", role: "row", children: [
|
|
1857
1857
|
S && /* @__PURE__ */ r.jsx(
|
|
@@ -1912,7 +1912,7 @@ function gr(n) {
|
|
|
1912
1912
|
)
|
|
1913
1913
|
}
|
|
1914
1914
|
),
|
|
1915
|
-
t.map((P,
|
|
1915
|
+
t.map((P, ne) => {
|
|
1916
1916
|
if (P.isSpacer)
|
|
1917
1917
|
return /* @__PURE__ */ r.jsx(
|
|
1918
1918
|
"div",
|
|
@@ -1922,15 +1922,15 @@ function gr(n) {
|
|
|
1922
1922
|
},
|
|
1923
1923
|
P.field
|
|
1924
1924
|
);
|
|
1925
|
-
const
|
|
1925
|
+
const te = P.sortable !== !1, ee = d.some((xe) => xe.field === P.field), pe = P.resizable !== !1, $ = zt(P.field, h), ge = $ !== null, de = f === P.field, be = k === P.field, ce = [
|
|
1926
1926
|
"ogx__header-cell",
|
|
1927
1927
|
`ogx__header-cell--align-${P.headerAlign || P.align || "left"}`,
|
|
1928
|
-
|
|
1929
|
-
|
|
1928
|
+
te && "ogx__header-cell--sortable",
|
|
1929
|
+
ee && "ogx__header-cell--sorted",
|
|
1930
1930
|
ge && "ogx__header-cell--pinned",
|
|
1931
1931
|
ge && `ogx__header-cell--pinned-${$}`,
|
|
1932
1932
|
de && "ogx__header-cell--dragging",
|
|
1933
|
-
|
|
1933
|
+
be && "ogx__header-cell--drag-over",
|
|
1934
1934
|
j?.id === "HEADER" && j.field === P.field && "ogx__header-cell--focused",
|
|
1935
1935
|
P.headerClassName
|
|
1936
1936
|
].filter(Boolean).join(" "), A = x[P.field] ?? P.width ?? 100, X = {
|
|
@@ -1949,12 +1949,12 @@ function gr(n) {
|
|
|
1949
1949
|
const xe = K[P.field];
|
|
1950
1950
|
$ === "left" ? X.left = xe : X.right = xe;
|
|
1951
1951
|
}
|
|
1952
|
-
const
|
|
1952
|
+
const oe = P.renderHeader ? P.renderHeader({ field: P.field, colDef: P, colIndex: ne }) : P.headerName || P.field, ue = (xe) => {
|
|
1953
1953
|
if (xe.target.closest(".ogx-column-resize-handle")) {
|
|
1954
1954
|
xe.stopPropagation();
|
|
1955
1955
|
return;
|
|
1956
1956
|
}
|
|
1957
|
-
E?.(P.field),
|
|
1957
|
+
E?.(P.field), te && U(P)();
|
|
1958
1958
|
}, fe = y ? y(P.field) : void 0, Ie = w ? w(P.field) : void 0, Ve = p ? p(P.field) : void 0;
|
|
1959
1959
|
return /* @__PURE__ */ r.jsxs(
|
|
1960
1960
|
"div",
|
|
@@ -1968,8 +1968,8 @@ function gr(n) {
|
|
|
1968
1968
|
onDragOver: Ie,
|
|
1969
1969
|
onDragEnd: u,
|
|
1970
1970
|
onDrop: Ve,
|
|
1971
|
-
"aria-sort":
|
|
1972
|
-
"aria-colindex":
|
|
1971
|
+
"aria-sort": te ? ee ? d.find((xe) => xe.field === P.field)?.sort === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
1972
|
+
"aria-colindex": ne + 1 + (i ? 1 : 0),
|
|
1973
1973
|
"data-field": P.field,
|
|
1974
1974
|
tabIndex: -1,
|
|
1975
1975
|
ref: (xe) => {
|
|
@@ -1977,12 +1977,12 @@ function gr(n) {
|
|
|
1977
1977
|
},
|
|
1978
1978
|
children: [
|
|
1979
1979
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx__header-cell-content", children: [
|
|
1980
|
-
de && /* @__PURE__ */ r.jsx("div", { className: "ogx__header-drag-icon", children: /* @__PURE__ */ r.jsx(
|
|
1980
|
+
de && /* @__PURE__ */ r.jsx("div", { className: "ogx__header-drag-icon", children: /* @__PURE__ */ r.jsx(ur, {}) }),
|
|
1981
1981
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx__header-cell-title-wrapper", children: [
|
|
1982
|
-
/* @__PURE__ */ r.jsx("span", { className: "ogx__header-cell-title", children:
|
|
1982
|
+
/* @__PURE__ */ r.jsx("span", { className: "ogx__header-cell-title", children: oe }),
|
|
1983
1983
|
N && N[P.field] && /* @__PURE__ */ r.jsx("span", { className: "ogx__header-cell-aggregation", children: N[P.field] })
|
|
1984
1984
|
] }),
|
|
1985
|
-
|
|
1985
|
+
te && q(P.field),
|
|
1986
1986
|
!P.disableColumnMenu && /* @__PURE__ */ r.jsx(
|
|
1987
1987
|
"button",
|
|
1988
1988
|
{
|
|
@@ -1991,12 +1991,12 @@ function gr(n) {
|
|
|
1991
1991
|
"aria-label": `Open column menu for ${P.headerName || P.field}`,
|
|
1992
1992
|
"aria-haspopup": "menu",
|
|
1993
1993
|
tabIndex: -1,
|
|
1994
|
-
children: /* @__PURE__ */ r.jsx(
|
|
1994
|
+
children: /* @__PURE__ */ r.jsx(cr, {})
|
|
1995
1995
|
}
|
|
1996
1996
|
)
|
|
1997
1997
|
] }),
|
|
1998
1998
|
pe && g && /* @__PURE__ */ r.jsx(
|
|
1999
|
-
|
|
1999
|
+
er,
|
|
2000
2000
|
{
|
|
2001
2001
|
field: P.field,
|
|
2002
2002
|
currentWidth: A,
|
|
@@ -2011,7 +2011,7 @@ function gr(n) {
|
|
|
2011
2011
|
);
|
|
2012
2012
|
}),
|
|
2013
2013
|
I && /* @__PURE__ */ r.jsx(
|
|
2014
|
-
|
|
2014
|
+
dr,
|
|
2015
2015
|
{
|
|
2016
2016
|
colDef: I.colDef,
|
|
2017
2017
|
sortModel: d,
|
|
@@ -2028,7 +2028,7 @@ function gr(n) {
|
|
|
2028
2028
|
] })
|
|
2029
2029
|
);
|
|
2030
2030
|
}
|
|
2031
|
-
const
|
|
2031
|
+
const Wt = ({
|
|
2032
2032
|
variant: n = "text",
|
|
2033
2033
|
size: t = "medium",
|
|
2034
2034
|
color: e = "default",
|
|
@@ -2055,7 +2055,7 @@ const Ot = ({
|
|
|
2055
2055
|
}
|
|
2056
2056
|
);
|
|
2057
2057
|
};
|
|
2058
|
-
function
|
|
2058
|
+
function $n(n) {
|
|
2059
2059
|
const {
|
|
2060
2060
|
page: t,
|
|
2061
2061
|
pageSize: e,
|
|
@@ -2099,7 +2099,7 @@ function Bn(n) {
|
|
|
2099
2099
|
] }),
|
|
2100
2100
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx-pagination__actions", children: [
|
|
2101
2101
|
s && /* @__PURE__ */ r.jsx(
|
|
2102
|
-
|
|
2102
|
+
Wt,
|
|
2103
2103
|
{
|
|
2104
2104
|
variant: "text",
|
|
2105
2105
|
size: "small",
|
|
@@ -2111,7 +2111,7 @@ function Bn(n) {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
),
|
|
2113
2113
|
/* @__PURE__ */ r.jsx(
|
|
2114
|
-
|
|
2114
|
+
Wt,
|
|
2115
2115
|
{
|
|
2116
2116
|
variant: "text",
|
|
2117
2117
|
size: "small",
|
|
@@ -2129,7 +2129,7 @@ function Bn(n) {
|
|
|
2129
2129
|
d
|
|
2130
2130
|
] }),
|
|
2131
2131
|
/* @__PURE__ */ r.jsx(
|
|
2132
|
-
|
|
2132
|
+
Wt,
|
|
2133
2133
|
{
|
|
2134
2134
|
variant: "text",
|
|
2135
2135
|
size: "small",
|
|
@@ -2141,7 +2141,7 @@ function Bn(n) {
|
|
|
2141
2141
|
}
|
|
2142
2142
|
),
|
|
2143
2143
|
c && /* @__PURE__ */ r.jsx(
|
|
2144
|
-
|
|
2144
|
+
Wt,
|
|
2145
2145
|
{
|
|
2146
2146
|
variant: "text",
|
|
2147
2147
|
size: "small",
|
|
@@ -2155,7 +2155,7 @@ function Bn(n) {
|
|
|
2155
2155
|
] })
|
|
2156
2156
|
] });
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2158
|
+
function pr(n, t, e = {}) {
|
|
2159
2159
|
const o = /* @__PURE__ */ new Map(), i = [];
|
|
2160
2160
|
n.forEach((s) => {
|
|
2161
2161
|
o.set(s.id, s), i.push(s.id);
|
|
@@ -2211,7 +2211,7 @@ function fr(n, t, e = {}) {
|
|
|
2211
2211
|
}
|
|
2212
2212
|
};
|
|
2213
2213
|
}
|
|
2214
|
-
function
|
|
2214
|
+
function xr(n, t) {
|
|
2215
2215
|
switch (t.type) {
|
|
2216
2216
|
case "SET_ROWS": {
|
|
2217
2217
|
const e = Array.from(n.rows.idRowsLookup.values()), o = typeof t.payload == "function" ? t.payload(e) : t.payload, i = /* @__PURE__ */ new Map(), l = [];
|
|
@@ -2302,10 +2302,10 @@ function hr(n, t) {
|
|
|
2302
2302
|
return n;
|
|
2303
2303
|
}
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2306
|
-
const { rows: t, columns: e, rowHeight: o = 52, headerHeight: i = 56, columnVisibilityModel: l, initialState: a } = n, [s] =
|
|
2307
|
-
() =>
|
|
2308
|
-
), [c, d] =
|
|
2305
|
+
function mr(n) {
|
|
2306
|
+
const { rows: t, columns: e, rowHeight: o = 52, headerHeight: i = 56, columnVisibilityModel: l, initialState: a } = n, [s] = Z(
|
|
2307
|
+
() => pr(t, e, l)
|
|
2308
|
+
), [c, d] = jo(xr, {
|
|
2309
2309
|
...s,
|
|
2310
2310
|
sorting: a?.sorting || s.sorting,
|
|
2311
2311
|
filter: a?.filter || s.filter,
|
|
@@ -2409,8 +2409,8 @@ function pr(n) {
|
|
|
2409
2409
|
setRowCount: w
|
|
2410
2410
|
};
|
|
2411
2411
|
}
|
|
2412
|
-
function
|
|
2413
|
-
const { onRowOrderChange: t, rows: e, getRowId: o, rowReordering: i = !1 } = n, [l, a] =
|
|
2412
|
+
function wr(n) {
|
|
2413
|
+
const { onRowOrderChange: t, rows: e, getRowId: o, rowReordering: i = !1 } = n, [l, a] = Z(null), [s, c] = Z(null), d = z((v) => o ? o(v) : v.id, [o]), g = z((v) => (b) => {
|
|
2414
2414
|
i && (a(v), b.dataTransfer.effectAllowed = "move");
|
|
2415
2415
|
}, [i]), x = z((v) => (b) => {
|
|
2416
2416
|
!i || !l || (b.preventDefault(), b.dataTransfer.dropEffect = "move", s !== v && c(v));
|
|
@@ -2437,7 +2437,7 @@ function xr(n) {
|
|
|
2437
2437
|
onDrop: i ? m : void 0
|
|
2438
2438
|
};
|
|
2439
2439
|
}
|
|
2440
|
-
function
|
|
2440
|
+
function vr(n) {
|
|
2441
2441
|
const {
|
|
2442
2442
|
rows: t,
|
|
2443
2443
|
getRowId: e,
|
|
@@ -2447,7 +2447,7 @@ function mr(n) {
|
|
|
2447
2447
|
filterModel: a,
|
|
2448
2448
|
sortModel: s,
|
|
2449
2449
|
onRowExpansionChange: c
|
|
2450
|
-
} = n, { treeNodes: d, rootIds: g, groupingRows: x } =
|
|
2450
|
+
} = n, { treeNodes: d, rootIds: g, groupingRows: x } = le(() => {
|
|
2451
2451
|
if (!i || !o)
|
|
2452
2452
|
return {
|
|
2453
2453
|
treeNodes: /* @__PURE__ */ new Map(),
|
|
@@ -2513,13 +2513,13 @@ function mr(n) {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
}
|
|
2515
2515
|
}), { treeNodes: y, rootIds: w, groupingRows: u };
|
|
2516
|
-
}, [t, o, i, e]), h =
|
|
2516
|
+
}, [t, o, i, e]), h = le(() => {
|
|
2517
2517
|
if (!i) return /* @__PURE__ */ new Set();
|
|
2518
2518
|
const y = /* @__PURE__ */ new Set();
|
|
2519
2519
|
return d.forEach((w) => {
|
|
2520
2520
|
w.children && w.children.length > 0 && (l === -1 || w.depth < l) && y.add(w.id);
|
|
2521
2521
|
}), y;
|
|
2522
|
-
}, [d, i, l]), [m, v] =
|
|
2522
|
+
}, [d, i, l]), [m, v] = Z(/* @__PURE__ */ new Set());
|
|
2523
2523
|
re(() => {
|
|
2524
2524
|
h.size > 0 && v(h);
|
|
2525
2525
|
}, [h]);
|
|
@@ -2582,7 +2582,7 @@ function mr(n) {
|
|
|
2582
2582
|
}
|
|
2583
2583
|
return w;
|
|
2584
2584
|
}, [d]);
|
|
2585
|
-
return
|
|
2585
|
+
return le(() => ({
|
|
2586
2586
|
treeNodes: d,
|
|
2587
2587
|
groupingRows: x,
|
|
2588
2588
|
toggleExpansion: b,
|
|
@@ -2592,8 +2592,8 @@ function mr(n) {
|
|
|
2592
2592
|
getNodePath: k
|
|
2593
2593
|
}), [d, x, b, N, S, f, k]);
|
|
2594
2594
|
}
|
|
2595
|
-
const
|
|
2596
|
-
function
|
|
2595
|
+
const br = (n) => n?.depth === -1 ? "footer" : "inline";
|
|
2596
|
+
function _r(n) {
|
|
2597
2597
|
const {
|
|
2598
2598
|
rows: t,
|
|
2599
2599
|
getRowId: e,
|
|
@@ -2602,8 +2602,8 @@ function vr(n) {
|
|
|
2602
2602
|
defaultGroupingExpansionDepth: l = 0,
|
|
2603
2603
|
filterModel: a,
|
|
2604
2604
|
sortModel: s,
|
|
2605
|
-
getAggregationPosition: c =
|
|
2606
|
-
} = n, [d, g] =
|
|
2605
|
+
getAggregationPosition: c = br
|
|
2606
|
+
} = n, [d, g] = Z(/* @__PURE__ */ new Set()), { treeNodes: x, rootIds: h, groupingRows: m } = le(() => {
|
|
2607
2607
|
const f = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), y = [];
|
|
2608
2608
|
if (o.length === 0)
|
|
2609
2609
|
return { treeNodes: f, rootIds: y, groupingRows: k };
|
|
@@ -2629,18 +2629,18 @@ function vr(n) {
|
|
|
2629
2629
|
const L = I[0][_], U = w(_, F, R);
|
|
2630
2630
|
T.push(U);
|
|
2631
2631
|
const q = {};
|
|
2632
|
-
i && Object.entries(i).forEach(([
|
|
2633
|
-
const G = I.map((D) => D[
|
|
2632
|
+
i && Object.entries(i).forEach(([O, V]) => {
|
|
2633
|
+
const G = I.map((D) => D[O]);
|
|
2634
2634
|
if (V === "sum")
|
|
2635
|
-
q[
|
|
2635
|
+
q[O] = G.reduce((D, P) => D + (Number(P) || 0), 0);
|
|
2636
2636
|
else if (V === "min")
|
|
2637
|
-
q[
|
|
2637
|
+
q[O] = Math.min(...G.map((D) => Number(D) || 0));
|
|
2638
2638
|
else if (V === "max")
|
|
2639
|
-
q[
|
|
2639
|
+
q[O] = Math.max(...G.map((D) => Number(D) || 0));
|
|
2640
2640
|
else if (V === "avg") {
|
|
2641
|
-
const D = G.reduce((P,
|
|
2642
|
-
q[
|
|
2643
|
-
} else V === "count" && (q[
|
|
2641
|
+
const D = G.reduce((P, ne) => P + (Number(ne) || 0), 0);
|
|
2642
|
+
q[O] = G.length ? D / G.length : 0;
|
|
2643
|
+
} else V === "count" && (q[O] = G.length);
|
|
2644
2644
|
});
|
|
2645
2645
|
const K = {
|
|
2646
2646
|
[_]: L,
|
|
@@ -2663,8 +2663,8 @@ function vr(n) {
|
|
|
2663
2663
|
C.aggregationPosition = c(C), f.set(U, C);
|
|
2664
2664
|
const B = u(I, E + 1, U);
|
|
2665
2665
|
f.get(U).children = B;
|
|
2666
|
-
const
|
|
2667
|
-
f.get(U).descendantCount =
|
|
2666
|
+
const W = I.length;
|
|
2667
|
+
f.get(U).descendantCount = W;
|
|
2668
2668
|
}), T;
|
|
2669
2669
|
}, p = u(t, 0, null);
|
|
2670
2670
|
return y.push(...p), { treeNodes: f, rootIds: y, groupingRows: k };
|
|
@@ -2730,7 +2730,7 @@ function vr(n) {
|
|
|
2730
2730
|
}, p = d;
|
|
2731
2731
|
return u(h), f;
|
|
2732
2732
|
}, [t, e, x, h, m, a, s, d, o]), N = z((f) => x.get(f), [x]);
|
|
2733
|
-
return
|
|
2733
|
+
return le(() => ({
|
|
2734
2734
|
treeNodes: x,
|
|
2735
2735
|
groupingRows: m,
|
|
2736
2736
|
toggleExpansion: v,
|
|
@@ -2739,14 +2739,14 @@ function vr(n) {
|
|
|
2739
2739
|
getNode: N
|
|
2740
2740
|
}), [x, m, v, b, S, N]);
|
|
2741
2741
|
}
|
|
2742
|
-
function
|
|
2742
|
+
function yr(n) {
|
|
2743
2743
|
const {
|
|
2744
2744
|
rows: t,
|
|
2745
2745
|
getRowId: e,
|
|
2746
2746
|
processRowUpdate: o,
|
|
2747
2747
|
onProcessRowUpdateError: i,
|
|
2748
2748
|
onRowChange: l
|
|
2749
|
-
} = n, [a, s] =
|
|
2749
|
+
} = n, [a, s] = Z(null), c = J(null), d = z((m) => {
|
|
2750
2750
|
s(m), c.current = typeof m == "function" ? m(c.current) : m;
|
|
2751
2751
|
}, []), g = z((m) => {
|
|
2752
2752
|
d({
|
|
@@ -2793,8 +2793,8 @@ function br(n) {
|
|
|
2793
2793
|
setEditCellValue: h
|
|
2794
2794
|
};
|
|
2795
2795
|
}
|
|
2796
|
-
function
|
|
2797
|
-
const [o, i] =
|
|
2796
|
+
function Cr(n, t, e) {
|
|
2797
|
+
const [o, i] = Z(/* @__PURE__ */ new Map()), [l, a] = Z({
|
|
2798
2798
|
caches: {
|
|
2799
2799
|
spannedCells: {},
|
|
2800
2800
|
hiddenCells: {},
|
|
@@ -2823,7 +2823,7 @@ function _r(n, t, e) {
|
|
|
2823
2823
|
} else
|
|
2824
2824
|
p = u.colSpan;
|
|
2825
2825
|
if (p <= 1) {
|
|
2826
|
-
|
|
2826
|
+
at(y, b, u.field, {
|
|
2827
2827
|
spannedByColSpan: !1,
|
|
2828
2828
|
cellProps: { colSpan: 1, width: e[u.field] || 100 }
|
|
2829
2829
|
});
|
|
@@ -2833,13 +2833,13 @@ function _r(n, t, e) {
|
|
|
2833
2833
|
for (let E = 1; E < p; E++)
|
|
2834
2834
|
if (w + E < k) {
|
|
2835
2835
|
const R = t[w + E];
|
|
2836
|
-
R && (j += e[R.field] || 100,
|
|
2836
|
+
R && (j += e[R.field] || 100, at(y, b, R.field, {
|
|
2837
2837
|
spannedByColSpan: !0,
|
|
2838
2838
|
leftVisibleCellIndex: w,
|
|
2839
2839
|
rightVisibleCellIndex: Math.min(w + p - 1, t.length - 1)
|
|
2840
2840
|
}));
|
|
2841
2841
|
}
|
|
2842
|
-
|
|
2842
|
+
at(y, b, u.field, {
|
|
2843
2843
|
spannedByColSpan: !1,
|
|
2844
2844
|
cellProps: { colSpan: p, width: j }
|
|
2845
2845
|
}), w += p - 1;
|
|
@@ -2912,7 +2912,7 @@ function _r(n, t, e) {
|
|
|
2912
2912
|
p = u.colSpan;
|
|
2913
2913
|
if (p <= 1) {
|
|
2914
2914
|
const E = e[u.field] || (typeof u.width == "number" ? u.width : 100);
|
|
2915
|
-
|
|
2915
|
+
at(b, k.id, u.field, {
|
|
2916
2916
|
spannedByColSpan: !1,
|
|
2917
2917
|
cellProps: { colSpan: 1, width: E }
|
|
2918
2918
|
});
|
|
@@ -2924,14 +2924,14 @@ function _r(n, t, e) {
|
|
|
2924
2924
|
const R = t[w + E];
|
|
2925
2925
|
if (R) {
|
|
2926
2926
|
const _ = e[R.field] || (typeof R.width == "number" ? R.width : 100);
|
|
2927
|
-
j += _,
|
|
2927
|
+
j += _, at(b, k.id, R.field, {
|
|
2928
2928
|
spannedByColSpan: !0,
|
|
2929
2929
|
leftVisibleCellIndex: w,
|
|
2930
2930
|
rightVisibleCellIndex: Math.min(w + p - 1, t.length - 1)
|
|
2931
2931
|
});
|
|
2932
2932
|
}
|
|
2933
2933
|
}
|
|
2934
|
-
|
|
2934
|
+
at(b, k.id, u.field, {
|
|
2935
2935
|
spannedByColSpan: !1,
|
|
2936
2936
|
cellProps: { colSpan: p, width: j }
|
|
2937
2937
|
}), w += p - 1;
|
|
@@ -2986,11 +2986,11 @@ function _r(n, t, e) {
|
|
|
2986
2986
|
getHiddenCellOriginMap: v
|
|
2987
2987
|
};
|
|
2988
2988
|
}
|
|
2989
|
-
function
|
|
2989
|
+
function at(n, t, e, o) {
|
|
2990
2990
|
let i = n.get(t);
|
|
2991
2991
|
i || (i = {}, n.set(t, i)), i[e] = o;
|
|
2992
2992
|
}
|
|
2993
|
-
function
|
|
2993
|
+
function kr(n) {
|
|
2994
2994
|
const {
|
|
2995
2995
|
dataSource: t,
|
|
2996
2996
|
sortModel: e,
|
|
@@ -3089,8 +3089,8 @@ function yr(n) {
|
|
|
3089
3089
|
fetchChildren: N
|
|
3090
3090
|
};
|
|
3091
3091
|
}
|
|
3092
|
-
const
|
|
3093
|
-
function
|
|
3092
|
+
const Dn = "\0", xt = "";
|
|
3093
|
+
function Sr(n, t) {
|
|
3094
3094
|
const e = n.filter((o) => o != null && !isNaN(o));
|
|
3095
3095
|
if (e.length === 0) return null;
|
|
3096
3096
|
switch (t) {
|
|
@@ -3106,30 +3106,30 @@ function Cr(n, t) {
|
|
|
3106
3106
|
return Math.max(...e);
|
|
3107
3107
|
}
|
|
3108
3108
|
}
|
|
3109
|
-
function
|
|
3110
|
-
return t.map((e) => String(n[e] ?? "")).join(
|
|
3109
|
+
function Ot(n, t) {
|
|
3110
|
+
return t.map((e) => String(n[e] ?? "")).join(Dn);
|
|
3111
3111
|
}
|
|
3112
3112
|
function an(n, t, e, o) {
|
|
3113
|
-
return o ? `${n}${
|
|
3113
|
+
return o ? `${n}${xt}${t}${xt}${e}` : `${t}${xt}${e}`;
|
|
3114
3114
|
}
|
|
3115
|
-
function
|
|
3116
|
-
return
|
|
3115
|
+
function jr(n, t, e, o) {
|
|
3116
|
+
return le(() => {
|
|
3117
3117
|
const i = { pivotRows: [], pivotColumns: [], colKeys: [], isValid: !1 };
|
|
3118
3118
|
if (!o) return i;
|
|
3119
3119
|
const { rowFields: l, columnFields: a, valueFields: s } = e;
|
|
3120
3120
|
if (l.length === 0 || s.length === 0) return i;
|
|
3121
3121
|
const c = a.length > 0, d = new Map(t.map((f) => [f.field, f])), g = /* @__PURE__ */ new Set();
|
|
3122
3122
|
for (const f of n)
|
|
3123
|
-
g.add(
|
|
3123
|
+
g.add(Ot(f, a));
|
|
3124
3124
|
const x = Array.from(g).sort(), h = /* @__PURE__ */ new Map();
|
|
3125
3125
|
for (const f of n) {
|
|
3126
|
-
const k =
|
|
3126
|
+
const k = Ot(f, l);
|
|
3127
3127
|
if (!h.has(k)) {
|
|
3128
3128
|
const p = {};
|
|
3129
3129
|
for (const j of l) p[j] = f[j];
|
|
3130
3130
|
h.set(k, { labelValues: p, bucket: /* @__PURE__ */ new Map() });
|
|
3131
3131
|
}
|
|
3132
|
-
const y = h.get(k), w =
|
|
3132
|
+
const y = h.get(k), w = Ot(f, a);
|
|
3133
3133
|
y.bucket.has(w) || y.bucket.set(w, /* @__PURE__ */ new Map());
|
|
3134
3134
|
const u = y.bucket.get(w);
|
|
3135
3135
|
for (const p of s) {
|
|
@@ -3145,17 +3145,17 @@ function kr(n, t, e, o) {
|
|
|
3145
3145
|
const w = f.bucket.get(y);
|
|
3146
3146
|
for (const u of s) {
|
|
3147
3147
|
const p = an(y, u.field, u.aggFn, c), j = w?.get(u.field) ?? [];
|
|
3148
|
-
k[p] = j.length > 0 ?
|
|
3148
|
+
k[p] = j.length > 0 ? Sr(j, u.aggFn) : null;
|
|
3149
3149
|
}
|
|
3150
3150
|
}
|
|
3151
3151
|
v.push(k);
|
|
3152
3152
|
}
|
|
3153
3153
|
const b = /* @__PURE__ */ new Map();
|
|
3154
3154
|
for (const f of n) {
|
|
3155
|
-
const k =
|
|
3155
|
+
const k = Ot(f, a);
|
|
3156
3156
|
for (const y of s) {
|
|
3157
3157
|
if (y.aggFn !== "avg" && y.aggFn !== "min" && y.aggFn !== "max") continue;
|
|
3158
|
-
const w = `${k}${
|
|
3158
|
+
const w = `${k}${xt}${y.field}`;
|
|
3159
3159
|
b.has(w) || b.set(w, []);
|
|
3160
3160
|
const u = f[y.field];
|
|
3161
3161
|
u != null && !isNaN(Number(u)) && b.get(w).push(Number(u));
|
|
@@ -3171,7 +3171,7 @@ function kr(n, t, e, o) {
|
|
|
3171
3171
|
S[y] = null;
|
|
3172
3172
|
continue;
|
|
3173
3173
|
}
|
|
3174
|
-
const u = `${f}${
|
|
3174
|
+
const u = `${f}${xt}${k.field}`;
|
|
3175
3175
|
switch (k.aggFn) {
|
|
3176
3176
|
case "sum":
|
|
3177
3177
|
case "count":
|
|
@@ -3202,7 +3202,7 @@ function kr(n, t, e, o) {
|
|
|
3202
3202
|
});
|
|
3203
3203
|
}
|
|
3204
3204
|
for (const f of x) {
|
|
3205
|
-
const k = c ? f.split(
|
|
3205
|
+
const k = c ? f.split(Dn).map((y, w) => {
|
|
3206
3206
|
const u = d.get(a[w]);
|
|
3207
3207
|
return u?.headerName ? `${u.headerName}: ${y}` : y;
|
|
3208
3208
|
}).join(" / ") : "";
|
|
@@ -3227,7 +3227,7 @@ function kr(n, t, e, o) {
|
|
|
3227
3227
|
return { pivotRows: v, pivotColumns: N, colKeys: x, isValid: !0 };
|
|
3228
3228
|
}, [n, t, e, o]);
|
|
3229
3229
|
}
|
|
3230
|
-
function
|
|
3230
|
+
function Rr(n) {
|
|
3231
3231
|
const t = document.createElement("textarea");
|
|
3232
3232
|
t.value = n, t.style.cssText = "position:fixed;top:-9999px;left:-9999px;opacity:0;", document.body.appendChild(t), t.focus(), t.select();
|
|
3233
3233
|
let e = !1;
|
|
@@ -3238,10 +3238,10 @@ function Sr(n) {
|
|
|
3238
3238
|
}
|
|
3239
3239
|
return e;
|
|
3240
3240
|
}
|
|
3241
|
-
async function
|
|
3241
|
+
async function Er(n) {
|
|
3242
3242
|
let t = !1;
|
|
3243
3243
|
try {
|
|
3244
|
-
t =
|
|
3244
|
+
t = Rr(n);
|
|
3245
3245
|
} catch {
|
|
3246
3246
|
}
|
|
3247
3247
|
if (navigator.clipboard && typeof navigator.clipboard.writeText == "function")
|
|
@@ -3255,7 +3255,7 @@ async function jr(n) {
|
|
|
3255
3255
|
else if (!t)
|
|
3256
3256
|
throw new Error("Clipboard API not available and fallback failed.");
|
|
3257
3257
|
}
|
|
3258
|
-
function
|
|
3258
|
+
function Nr(n) {
|
|
3259
3259
|
const { selectedRowIds: t, columns: e, getVisibleRows: o, getRowId: i } = n, l = z(async () => {
|
|
3260
3260
|
if (t.size === 0) return;
|
|
3261
3261
|
const s = o().filter((h) => t.has(i(h)));
|
|
@@ -3269,7 +3269,7 @@ function Rr(n) {
|
|
|
3269
3269
|
`), x = `${d}
|
|
3270
3270
|
${g}`;
|
|
3271
3271
|
try {
|
|
3272
|
-
await
|
|
3272
|
+
await Er(x);
|
|
3273
3273
|
} catch (h) {
|
|
3274
3274
|
console.error("[OpenGridX] Failed to copy to clipboard:", h);
|
|
3275
3275
|
}
|
|
@@ -3283,7 +3283,7 @@ ${g}`;
|
|
|
3283
3283
|
return window.addEventListener("keydown", a), () => window.removeEventListener("keydown", a);
|
|
3284
3284
|
}, [l]), { copySelectedRows: l };
|
|
3285
3285
|
}
|
|
3286
|
-
function
|
|
3286
|
+
function Mr({
|
|
3287
3287
|
row: n,
|
|
3288
3288
|
rowIndex: t,
|
|
3289
3289
|
listViewColumn: e,
|
|
@@ -3327,7 +3327,7 @@ function Er({
|
|
|
3327
3327
|
}
|
|
3328
3328
|
);
|
|
3329
3329
|
}
|
|
3330
|
-
function
|
|
3330
|
+
function Ir({
|
|
3331
3331
|
ariaLabel: n,
|
|
3332
3332
|
allRenderableRows: t,
|
|
3333
3333
|
filteredRows: e,
|
|
@@ -3348,7 +3348,7 @@ function Nr({
|
|
|
3348
3348
|
onSelectionChange: N,
|
|
3349
3349
|
onPaginationModelChange: f
|
|
3350
3350
|
}) {
|
|
3351
|
-
const k = v ||
|
|
3351
|
+
const k = v || $n, y = x === "server" && h ? m || 0 : e.length;
|
|
3352
3352
|
return /* @__PURE__ */ r.jsxs(
|
|
3353
3353
|
"div",
|
|
3354
3354
|
{
|
|
@@ -3371,7 +3371,7 @@ function Nr({
|
|
|
3371
3371
|
] }),
|
|
3372
3372
|
c
|
|
3373
3373
|
] }) : t.map((w, u) => /* @__PURE__ */ r.jsx(
|
|
3374
|
-
|
|
3374
|
+
Mr,
|
|
3375
3375
|
{
|
|
3376
3376
|
row: w,
|
|
3377
3377
|
rowIndex: u,
|
|
@@ -3400,8 +3400,8 @@ function Nr({
|
|
|
3400
3400
|
}
|
|
3401
3401
|
);
|
|
3402
3402
|
}
|
|
3403
|
-
function
|
|
3404
|
-
const [i, l] =
|
|
3403
|
+
function Pr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
|
|
3404
|
+
const [i, l] = Z(String(n ?? "")), a = J(null);
|
|
3405
3405
|
return re(() => {
|
|
3406
3406
|
a.current?.focus(), a.current?.select();
|
|
3407
3407
|
}, []), /* @__PURE__ */ r.jsx(
|
|
@@ -3421,8 +3421,8 @@ function Mr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
|
|
|
3421
3421
|
}
|
|
3422
3422
|
);
|
|
3423
3423
|
}
|
|
3424
|
-
function
|
|
3425
|
-
const [i, l] =
|
|
3424
|
+
function Lr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
|
|
3425
|
+
const [i, l] = Z(typeof n == "number" ? n : ""), a = J(null);
|
|
3426
3426
|
return re(() => {
|
|
3427
3427
|
a.current?.focus(), a.current?.select();
|
|
3428
3428
|
}, []), /* @__PURE__ */ r.jsx(
|
|
@@ -3443,7 +3443,7 @@ function Ir({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
|
|
|
3443
3443
|
}
|
|
3444
3444
|
);
|
|
3445
3445
|
}
|
|
3446
|
-
function
|
|
3446
|
+
function Tr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
|
|
3447
3447
|
const i = J(null);
|
|
3448
3448
|
re(() => {
|
|
3449
3449
|
i.current?.focus();
|
|
@@ -3465,7 +3465,7 @@ function Pr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
|
|
|
3465
3465
|
}
|
|
3466
3466
|
) });
|
|
3467
3467
|
}
|
|
3468
|
-
function
|
|
3468
|
+
function Wr({ value: n, colDef: t, onValueChange: e, onCommit: o, onCancel: i }) {
|
|
3469
3469
|
const l = J(null);
|
|
3470
3470
|
re(() => {
|
|
3471
3471
|
l.current?.focus();
|
|
@@ -3491,8 +3491,8 @@ function Lr({ value: n, colDef: t, onValueChange: e, onCommit: o, onCancel: i })
|
|
|
3491
3491
|
}
|
|
3492
3492
|
);
|
|
3493
3493
|
}
|
|
3494
|
-
function
|
|
3495
|
-
const [i, l] =
|
|
3494
|
+
function Or({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
|
|
3495
|
+
const [i, l] = Z(typeof n == "string" ? n : String(n ?? "")), a = J(null);
|
|
3496
3496
|
return re(() => {
|
|
3497
3497
|
a.current?.focus();
|
|
3498
3498
|
}, []), /* @__PURE__ */ r.jsx(
|
|
@@ -3512,22 +3512,22 @@ function Tr({ value: n, onValueChange: t, onCommit: e, onCancel: o }) {
|
|
|
3512
3512
|
}
|
|
3513
3513
|
);
|
|
3514
3514
|
}
|
|
3515
|
-
function
|
|
3515
|
+
function Fr(n) {
|
|
3516
3516
|
const { colDef: t } = n;
|
|
3517
3517
|
switch (t.type) {
|
|
3518
3518
|
case "number":
|
|
3519
|
-
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(
|
|
3519
|
+
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Lr, { ...n }) });
|
|
3520
3520
|
case "boolean":
|
|
3521
|
-
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(
|
|
3521
|
+
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Tr, { ...n }) });
|
|
3522
3522
|
case "singleSelect":
|
|
3523
|
-
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(
|
|
3523
|
+
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Wr, { ...n }) });
|
|
3524
3524
|
case "date":
|
|
3525
|
-
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(
|
|
3525
|
+
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Or, { ...n }) });
|
|
3526
3526
|
default:
|
|
3527
|
-
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(
|
|
3527
|
+
return /* @__PURE__ */ r.jsx("div", { className: "ogx__edit-cell", children: /* @__PURE__ */ r.jsx(Pr, { ...n }) });
|
|
3528
3528
|
}
|
|
3529
3529
|
}
|
|
3530
|
-
function
|
|
3530
|
+
function Ar(n) {
|
|
3531
3531
|
const {
|
|
3532
3532
|
onCellClick: t,
|
|
3533
3533
|
onCellEditStart: e,
|
|
@@ -3552,13 +3552,13 @@ function Wr(n) {
|
|
|
3552
3552
|
colSpanInfo: w,
|
|
3553
3553
|
rowSpan: u,
|
|
3554
3554
|
isHiddenByRowSpan: p
|
|
3555
|
-
} = n, j =
|
|
3555
|
+
} = n, j = ae.useCallback((C) => {
|
|
3556
3556
|
o ? o(a.field, C) : y?.(C);
|
|
3557
|
-
}, [o, y, a.field]), E =
|
|
3557
|
+
}, [o, y, a.field]), E = ae.useMemo(() => a.valueFormatter ? a.valueFormatter({
|
|
3558
3558
|
value: i,
|
|
3559
3559
|
row: l,
|
|
3560
3560
|
field: a.field
|
|
3561
|
-
}) : i == null ? "" : String(i), [i, l, a]), R =
|
|
3561
|
+
}) : i == null ? "" : String(i), [i, l, a]), R = ae.useMemo(() => N && (o || y) && k ? a.renderEditCell ? a.renderEditCell({
|
|
3562
3562
|
value: i,
|
|
3563
3563
|
row: l,
|
|
3564
3564
|
field: a.field,
|
|
@@ -3566,7 +3566,7 @@ function Wr(n) {
|
|
|
3566
3566
|
rowIndex: s,
|
|
3567
3567
|
colIndex: c
|
|
3568
3568
|
}) : /* @__PURE__ */ r.jsx(
|
|
3569
|
-
|
|
3569
|
+
Fr,
|
|
3570
3570
|
{
|
|
3571
3571
|
value: i,
|
|
3572
3572
|
row: l,
|
|
@@ -3585,8 +3585,8 @@ function Wr(n) {
|
|
|
3585
3585
|
colDef: a,
|
|
3586
3586
|
rowIndex: s,
|
|
3587
3587
|
colIndex: c
|
|
3588
|
-
}) : E, [i, l, a, s, c, E, N, j, k, o, y]), _ =
|
|
3589
|
-
if (
|
|
3588
|
+
}) : E, [i, l, a, s, c, E, N, j, k, o, y]), _ = ae.useMemo(() => a.cellClassName ? typeof a.cellClassName == "function" ? a.cellClassName({ value: i, row: l, field: a.field, colDef: a, rowIndex: s, colIndex: c }) || "" : a.cellClassName : "", [a, i, l, s, c]), M = ae.useRef(null);
|
|
3589
|
+
if (ae.useLayoutEffect(() => {
|
|
3590
3590
|
v && M.current && M.current.focus({ preventScroll: !0 });
|
|
3591
3591
|
}, [v]), w?.spannedByColSpan)
|
|
3592
3592
|
return null;
|
|
@@ -3657,7 +3657,7 @@ function Wr(n) {
|
|
|
3657
3657
|
}
|
|
3658
3658
|
);
|
|
3659
3659
|
}
|
|
3660
|
-
const
|
|
3660
|
+
const zr = ae.memo(Ar), Br = ({ className: n = "", ...t }) => /* @__PURE__ */ r.jsx(
|
|
3661
3661
|
"button",
|
|
3662
3662
|
{
|
|
3663
3663
|
type: "button",
|
|
@@ -3667,7 +3667,7 @@ const Fr = se.memo(Wr), Ar = ({ className: n = "", ...t }) => /* @__PURE__ */ r.
|
|
|
3667
3667
|
children: /* @__PURE__ */ r.jsx("svg", { viewBox: "0 0 24 24", width: "20", height: "20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx("path", { d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }) })
|
|
3668
3668
|
}
|
|
3669
3669
|
);
|
|
3670
|
-
function
|
|
3670
|
+
function $r(n) {
|
|
3671
3671
|
const { content: t, height: e, isExpanded: o } = n;
|
|
3672
3672
|
if (!o)
|
|
3673
3673
|
return null;
|
|
@@ -3713,11 +3713,11 @@ function dn(n) {
|
|
|
3713
3713
|
colspanMap: H,
|
|
3714
3714
|
rowSpanningCaches: L,
|
|
3715
3715
|
rowHeight: U = 52
|
|
3716
|
-
} = n, q =
|
|
3717
|
-
|
|
3716
|
+
} = n, q = ae.useRef(null), K = ae.useRef(null);
|
|
3717
|
+
ae.useLayoutEffect(() => {
|
|
3718
3718
|
I === "__expand_col__" && q.current && q.current.focus({ preventScroll: !0 }), I === "__checkbox_col__" && K.current && K.current.focus({ preventScroll: !0 });
|
|
3719
3719
|
}, [I]);
|
|
3720
|
-
const C =
|
|
3720
|
+
const C = ae.useMemo(() => An(
|
|
3721
3721
|
e,
|
|
3722
3722
|
d,
|
|
3723
3723
|
g,
|
|
@@ -3726,11 +3726,11 @@ function dn(n) {
|
|
|
3726
3726
|
h,
|
|
3727
3727
|
f,
|
|
3728
3728
|
k
|
|
3729
|
-
), [e, d, g, l, N, h, f, k]), B = t._hasChildren === !0,
|
|
3729
|
+
), [e, d, g, l, N, h, f, k]), B = t._hasChildren === !0, W = ae.useCallback(($, ge) => {
|
|
3730
3730
|
B || _?.({ id: t.id, field: $, value: ge });
|
|
3731
|
-
}, [B, t.id, _]),
|
|
3731
|
+
}, [B, t.id, _]), O = ae.useCallback(($, ge) => {
|
|
3732
3732
|
T?.({ id: t.id, field: $, value: ge });
|
|
3733
|
-
}, [T, t.id]), V =
|
|
3733
|
+
}, [T, t.id]), V = ae.useCallback(($) => {
|
|
3734
3734
|
M?.({ cancel: $ });
|
|
3735
3735
|
}, [M]);
|
|
3736
3736
|
if (t._isSkeleton) {
|
|
@@ -3752,13 +3752,13 @@ function dn(n) {
|
|
|
3752
3752
|
$.stopPropagation(), c?.(t.id, $.target.checked);
|
|
3753
3753
|
}, P = ($) => {
|
|
3754
3754
|
$.stopPropagation(), v?.(t.id);
|
|
3755
|
-
},
|
|
3755
|
+
}, ne = cn(t.id, x), te = ne === "top", ee = ne === "bottom", pe = [
|
|
3756
3756
|
"ogx__row",
|
|
3757
3757
|
i && "ogx__row--selected",
|
|
3758
3758
|
o % 2 === 0 && "ogx__row--even",
|
|
3759
3759
|
o % 2 === 1 && "ogx__row--odd",
|
|
3760
|
-
|
|
3761
|
-
|
|
3760
|
+
te && "ogx__row--pinned-top",
|
|
3761
|
+
ee && "ogx__row--pinned-bottom",
|
|
3762
3762
|
j && "ogx__row--dragging",
|
|
3763
3763
|
E && "ogx__row--drag-over",
|
|
3764
3764
|
B && "ogx__row--group"
|
|
@@ -3797,7 +3797,7 @@ function dn(n) {
|
|
|
3797
3797
|
onDragStart: y ? y(t.id) : void 0,
|
|
3798
3798
|
onDragEnd: u,
|
|
3799
3799
|
onClick: ($) => $.stopPropagation(),
|
|
3800
|
-
children: /* @__PURE__ */ r.jsx(
|
|
3800
|
+
children: /* @__PURE__ */ r.jsx(Br, {})
|
|
3801
3801
|
}
|
|
3802
3802
|
),
|
|
3803
3803
|
h && /* @__PURE__ */ r.jsx(
|
|
@@ -3825,7 +3825,7 @@ function dn(n) {
|
|
|
3825
3825
|
});
|
|
3826
3826
|
},
|
|
3827
3827
|
children: /* @__PURE__ */ r.jsx(
|
|
3828
|
-
|
|
3828
|
+
zn,
|
|
3829
3829
|
{
|
|
3830
3830
|
isExpanded: m,
|
|
3831
3831
|
onClick: P,
|
|
@@ -3881,27 +3881,27 @@ function dn(n) {
|
|
|
3881
3881
|
},
|
|
3882
3882
|
$.field
|
|
3883
3883
|
);
|
|
3884
|
-
const de = $.valueGetter ? $.valueGetter({ row: t, field: $.field, value: t[$.field] }) : t[$.field],
|
|
3884
|
+
const de = $.valueGetter ? $.valueGetter({ row: t, field: $.field, value: t[$.field] }) : t[$.field], be = d[$.field] ?? $.width, ce = zt($.field, g), A = ce ? C[$.field] : void 0, X = R?.id === t.id && R?.field === $.field, oe = X ? R?.value : de, ue = H?.get(t.id)?.[$.field], fe = L?.spannedCells[t.id]?.[$.field], Ie = L?.hiddenCells[t.id]?.[$.field] || !1;
|
|
3885
3885
|
return /* @__PURE__ */ r.jsx(
|
|
3886
|
-
|
|
3886
|
+
zr,
|
|
3887
3887
|
{
|
|
3888
|
-
value:
|
|
3888
|
+
value: oe,
|
|
3889
3889
|
row: t,
|
|
3890
3890
|
colDef: $,
|
|
3891
3891
|
rowIndex: o,
|
|
3892
3892
|
colIndex: ge,
|
|
3893
3893
|
isSelected: i,
|
|
3894
3894
|
onCellClick: s,
|
|
3895
|
-
width:
|
|
3895
|
+
width: be,
|
|
3896
3896
|
pinnedPosition: ce,
|
|
3897
3897
|
pinnedOffset: A,
|
|
3898
3898
|
isFocused: I === $.field,
|
|
3899
3899
|
isFocusVisible: F,
|
|
3900
3900
|
isEditable: $.editable,
|
|
3901
3901
|
isEditing: X,
|
|
3902
|
-
onCellEditStart:
|
|
3902
|
+
onCellEditStart: W,
|
|
3903
3903
|
onEditStop: V,
|
|
3904
|
-
onCellValueChange:
|
|
3904
|
+
onCellValueChange: O,
|
|
3905
3905
|
colSpanInfo: ue,
|
|
3906
3906
|
rowSpan: fe,
|
|
3907
3907
|
isHiddenByRowSpan: Ie
|
|
@@ -3913,7 +3913,7 @@ function dn(n) {
|
|
|
3913
3913
|
}
|
|
3914
3914
|
),
|
|
3915
3915
|
h && /* @__PURE__ */ r.jsx(
|
|
3916
|
-
|
|
3916
|
+
$r,
|
|
3917
3917
|
{
|
|
3918
3918
|
row: t,
|
|
3919
3919
|
rowId: t.id,
|
|
@@ -3925,7 +3925,7 @@ function dn(n) {
|
|
|
3925
3925
|
)
|
|
3926
3926
|
] });
|
|
3927
3927
|
}
|
|
3928
|
-
function
|
|
3928
|
+
function Wn({
|
|
3929
3929
|
rows: n,
|
|
3930
3930
|
position: t,
|
|
3931
3931
|
columns: e,
|
|
@@ -3978,7 +3978,7 @@ function Tn({
|
|
|
3978
3978
|
u.id
|
|
3979
3979
|
)) });
|
|
3980
3980
|
}
|
|
3981
|
-
const
|
|
3981
|
+
const Dr = ({
|
|
3982
3982
|
columns: n,
|
|
3983
3983
|
rowHeight: t,
|
|
3984
3984
|
checkboxSelection: e = !1,
|
|
@@ -4048,7 +4048,7 @@ const Br = ({
|
|
|
4048
4048
|
]
|
|
4049
4049
|
}
|
|
4050
4050
|
);
|
|
4051
|
-
function
|
|
4051
|
+
function Hr({
|
|
4052
4052
|
virtualContainerHeight: n,
|
|
4053
4053
|
offsetTop: t,
|
|
4054
4054
|
effectiveLoading: e,
|
|
@@ -4086,13 +4086,13 @@ function $r({
|
|
|
4086
4086
|
}) {
|
|
4087
4087
|
const U = i.length > 0 ? i : (() => {
|
|
4088
4088
|
const K = (a || 1e3) - (s ? 48 : 0) - (c ? 48 : 0) - (d ? 48 : 0), C = 150, B = Math.max(1, Math.ceil(K / C));
|
|
4089
|
-
return Array.from({ length: B }, (
|
|
4090
|
-
field: `placeholder_${
|
|
4089
|
+
return Array.from({ length: B }, (W, O) => ({
|
|
4090
|
+
field: `placeholder_${O}`,
|
|
4091
4091
|
headerName: "",
|
|
4092
4092
|
width: C
|
|
4093
4093
|
}));
|
|
4094
4094
|
})(), q = o.filter(({ row: K }) => !cn(K.id, x)).filter(
|
|
4095
|
-
(K, C, B) => C === B.findIndex((
|
|
4095
|
+
(K, C, B) => C === B.findIndex((W) => W.row.id === K.row.id)
|
|
4096
4096
|
);
|
|
4097
4097
|
return /* @__PURE__ */ r.jsx(
|
|
4098
4098
|
"div",
|
|
@@ -4108,7 +4108,7 @@ function $r({
|
|
|
4108
4108
|
role: "rowgroup",
|
|
4109
4109
|
children: [
|
|
4110
4110
|
e && o.length === 0 ? Array.from({ length: 10 }).map((K, C) => /* @__PURE__ */ r.jsx(
|
|
4111
|
-
|
|
4111
|
+
Dr,
|
|
4112
4112
|
{
|
|
4113
4113
|
columns: U,
|
|
4114
4114
|
rowHeight: g,
|
|
@@ -4172,13 +4172,13 @@ function $r({
|
|
|
4172
4172
|
}
|
|
4173
4173
|
);
|
|
4174
4174
|
}
|
|
4175
|
-
function
|
|
4175
|
+
function Gr() {
|
|
4176
4176
|
return /* @__PURE__ */ r.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4177
4177
|
/* @__PURE__ */ r.jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
4178
4178
|
/* @__PURE__ */ r.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
4179
4179
|
] });
|
|
4180
4180
|
}
|
|
4181
|
-
function
|
|
4181
|
+
function Vr() {
|
|
4182
4182
|
return /* @__PURE__ */ r.jsxs(
|
|
4183
4183
|
"svg",
|
|
4184
4184
|
{
|
|
@@ -4198,8 +4198,8 @@ function Hr() {
|
|
|
4198
4198
|
}
|
|
4199
4199
|
);
|
|
4200
4200
|
}
|
|
4201
|
-
function
|
|
4202
|
-
const { columns: t, visibleColumns: e, onVisibilityChange: o, onShowAll: i, onHideAll: l, onColumnReorder: a, onColumnOrderReset: s } = n, [c, d] =
|
|
4201
|
+
function Hn(n) {
|
|
4202
|
+
const { columns: t, visibleColumns: e, onVisibilityChange: o, onShowAll: i, onHideAll: l, onColumnReorder: a, onColumnOrderReset: s } = n, [c, d] = Z(""), [g, x] = Z(null), h = J(null), v = le(() => t.filter((u) => u.hideable !== !1), [t]).every((u) => e.has(u.field)), b = le(() => {
|
|
4203
4203
|
if (!c) return t;
|
|
4204
4204
|
const u = c.toLowerCase();
|
|
4205
4205
|
return t.filter(
|
|
@@ -4222,7 +4222,7 @@ function Dn(n) {
|
|
|
4222
4222
|
};
|
|
4223
4223
|
return /* @__PURE__ */ r.jsxs("div", { className: "ogx-column-visibility-panel", children: [
|
|
4224
4224
|
/* @__PURE__ */ r.jsx("div", { className: "ogx-column-visibility-panel__search-section", children: /* @__PURE__ */ r.jsxs("div", { className: "ogx-column-visibility-panel__search-container", children: [
|
|
4225
|
-
/* @__PURE__ */ r.jsx(
|
|
4225
|
+
/* @__PURE__ */ r.jsx(Gr, {}),
|
|
4226
4226
|
/* @__PURE__ */ r.jsx(
|
|
4227
4227
|
"input",
|
|
4228
4228
|
{
|
|
@@ -4259,7 +4259,7 @@ function Dn(n) {
|
|
|
4259
4259
|
draggable: !0,
|
|
4260
4260
|
onDragStart: N(u.field),
|
|
4261
4261
|
title: "Drag to reorder",
|
|
4262
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4262
|
+
children: /* @__PURE__ */ r.jsx(Vr, {})
|
|
4263
4263
|
}
|
|
4264
4264
|
),
|
|
4265
4265
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -4309,7 +4309,7 @@ function Dn(n) {
|
|
|
4309
4309
|
] })
|
|
4310
4310
|
] });
|
|
4311
4311
|
}
|
|
4312
|
-
function
|
|
4312
|
+
function Ur({
|
|
4313
4313
|
isOpen: n,
|
|
4314
4314
|
containerRef: t,
|
|
4315
4315
|
effectiveColumns: e,
|
|
@@ -4322,7 +4322,7 @@ function Gr({
|
|
|
4322
4322
|
onColumnOrderChange: d,
|
|
4323
4323
|
setInternalColumnOrder: g
|
|
4324
4324
|
}) {
|
|
4325
|
-
const [x, h] =
|
|
4325
|
+
const [x, h] = Z(16), [m, v] = Z(16), [b, S] = Z(() => document.body);
|
|
4326
4326
|
if (Ee(() => {
|
|
4327
4327
|
if (!n || !t.current) return;
|
|
4328
4328
|
const f = t.current.getBoundingClientRect();
|
|
@@ -4379,7 +4379,7 @@ function Gr({
|
|
|
4379
4379
|
}
|
|
4380
4380
|
),
|
|
4381
4381
|
/* @__PURE__ */ r.jsx(
|
|
4382
|
-
|
|
4382
|
+
Hn,
|
|
4383
4383
|
{
|
|
4384
4384
|
columns: e,
|
|
4385
4385
|
visibleColumns: new Set(
|
|
@@ -4409,7 +4409,7 @@ function Gr({
|
|
|
4409
4409
|
b
|
|
4410
4410
|
);
|
|
4411
4411
|
}
|
|
4412
|
-
function
|
|
4412
|
+
function vi(n) {
|
|
4413
4413
|
const {
|
|
4414
4414
|
rows: t,
|
|
4415
4415
|
columns: e,
|
|
@@ -4449,24 +4449,24 @@ function mi(n) {
|
|
|
4449
4449
|
treeData: K = !1,
|
|
4450
4450
|
getTreeDataPath: C,
|
|
4451
4451
|
defaultGroupingExpansionDepth: B,
|
|
4452
|
-
rowGroupingModel:
|
|
4453
|
-
aggregationModel:
|
|
4452
|
+
rowGroupingModel: W,
|
|
4453
|
+
aggregationModel: O,
|
|
4454
4454
|
onAggregationModelChange: V,
|
|
4455
4455
|
getAggregationPosition: G,
|
|
4456
4456
|
isCellEditable: D,
|
|
4457
4457
|
processRowUpdate: P,
|
|
4458
|
-
onProcessRowUpdateError:
|
|
4459
|
-
dataSource:
|
|
4460
|
-
sortingMode:
|
|
4458
|
+
onProcessRowUpdateError: ne,
|
|
4459
|
+
dataSource: te,
|
|
4460
|
+
sortingMode: ee = "client",
|
|
4461
4461
|
filterMode: pe = "client",
|
|
4462
4462
|
paginationMode: $ = "client",
|
|
4463
4463
|
rowCount: ge,
|
|
4464
4464
|
slots: de,
|
|
4465
|
-
slotProps:
|
|
4465
|
+
slotProps: be,
|
|
4466
4466
|
pivotMode: ce = !1,
|
|
4467
4467
|
pivotModel: A,
|
|
4468
4468
|
onPivotModelChange: X,
|
|
4469
|
-
className:
|
|
4469
|
+
className: oe = "",
|
|
4470
4470
|
style: ue,
|
|
4471
4471
|
onRowsScrollEnd: fe,
|
|
4472
4472
|
ariaLabel: Ie,
|
|
@@ -4476,19 +4476,19 @@ function mi(n) {
|
|
|
4476
4476
|
columnVisibilityModel: Ue,
|
|
4477
4477
|
onColumnVisibilityModelChange: Ke,
|
|
4478
4478
|
listView: ie = !1,
|
|
4479
|
-
listViewColumn:
|
|
4479
|
+
listViewColumn: Ce,
|
|
4480
4480
|
columnGroupingModel: Be,
|
|
4481
4481
|
noRowsLabel: Bt = "No Data",
|
|
4482
4482
|
apiRef: $t
|
|
4483
|
-
} = n,
|
|
4483
|
+
} = n, Kn = le(() => ({ items: [] }), []), Ne = h || Kn, Yn = le(() => [], []), Dt = W || Yn, hn = J(de?.toolbar);
|
|
4484
4484
|
hn.current = de?.toolbar;
|
|
4485
|
-
const
|
|
4486
|
-
const
|
|
4487
|
-
return
|
|
4488
|
-
}).current,
|
|
4485
|
+
const qn = J((Y) => {
|
|
4486
|
+
const Q = hn.current;
|
|
4487
|
+
return Q ? Q(Y) : null;
|
|
4488
|
+
}).current, Xn = Wo({
|
|
4489
4489
|
initialState: Ve,
|
|
4490
4490
|
sortModel: v,
|
|
4491
|
-
aggregationModel:
|
|
4491
|
+
aggregationModel: O,
|
|
4492
4492
|
onAggregationModelChange: V,
|
|
4493
4493
|
columnVisibilityModel: Ue,
|
|
4494
4494
|
onColumnVisibilityModelChange: Ke,
|
|
@@ -4506,32 +4506,38 @@ function mi(n) {
|
|
|
4506
4506
|
aggregationModel: Me,
|
|
4507
4507
|
handleAggregationModelChange: mn,
|
|
4508
4508
|
columnVisibilityModel: $e,
|
|
4509
|
-
handleColumnVisibilityModelChange:
|
|
4510
|
-
pinnedColumns:
|
|
4509
|
+
handleColumnVisibilityModelChange: mt,
|
|
4510
|
+
pinnedColumns: Fe,
|
|
4511
4511
|
handlePinnedColumnsChange: Ht,
|
|
4512
4512
|
currentPivotModel: Gt,
|
|
4513
4513
|
handlePivotModelChange: wn,
|
|
4514
|
-
effectivePaginationModel:
|
|
4514
|
+
effectivePaginationModel: je,
|
|
4515
4515
|
handlePaginationModelChange: Vt,
|
|
4516
|
-
selectedRowIds:
|
|
4517
|
-
isSelectionControlled:
|
|
4518
|
-
setInternalRowSelectionModel:
|
|
4519
|
-
} =
|
|
4516
|
+
selectedRowIds: ke,
|
|
4517
|
+
isSelectionControlled: wt,
|
|
4518
|
+
setInternalRowSelectionModel: vt
|
|
4519
|
+
} = Xn, bt = d, _t = jr(t, e, Gt, ce), vn = ce && _t.isValid ? _t.pivotRows : t, Ut = ce && _t.isValid ? _t.pivotColumns : e, [Jn, bn] = Z(null);
|
|
4520
4520
|
re(() => {
|
|
4521
|
-
|
|
4521
|
+
bn(null);
|
|
4522
4522
|
}, [Me]);
|
|
4523
|
-
const Ye = J(null),
|
|
4523
|
+
const Ye = J(null), Qn = J(null), yt = J(null), Zn = z((Y) => Y.id, []), qe = o || Zn, Kt = le(
|
|
4524
|
+
() => vn.map((Y) => {
|
|
4525
|
+
const Q = qe(Y);
|
|
4526
|
+
return Q === Y.id ? Y : { ...Y, id: Q };
|
|
4527
|
+
}),
|
|
4528
|
+
[vn, qe]
|
|
4529
|
+
), Xe = z((Y) => {
|
|
4524
4530
|
sn.current?.classList.toggle("ogx--kb", Y);
|
|
4525
|
-
}, []),
|
|
4526
|
-
|
|
4527
|
-
const
|
|
4528
|
-
if (
|
|
4529
|
-
const
|
|
4530
|
-
|
|
4531
|
+
}, []), _n = J(te);
|
|
4532
|
+
_n.current = te;
|
|
4533
|
+
const yn = J(null), Cn = J(null), eo = z((Y) => {
|
|
4534
|
+
if (_n.current && K && (Y.serverChildrenCount ?? 0) > 0 && (Y.children ?? []).length === 0) {
|
|
4535
|
+
const Q = Cn.current?.getNodePath(Y.id) || [Y.groupingKey];
|
|
4536
|
+
yn.current?.(Y.id, Q);
|
|
4531
4537
|
}
|
|
4532
|
-
}, [K]),
|
|
4533
|
-
rows:
|
|
4534
|
-
columns:
|
|
4538
|
+
}, [K]), Se = mr({
|
|
4539
|
+
rows: Kt,
|
|
4540
|
+
columns: Ut,
|
|
4535
4541
|
rowHeight: i,
|
|
4536
4542
|
headerHeight: l,
|
|
4537
4543
|
rowCount: ge,
|
|
@@ -4539,101 +4545,101 @@ function mi(n) {
|
|
|
4539
4545
|
initialState: n.initialState
|
|
4540
4546
|
}), {
|
|
4541
4547
|
state: he,
|
|
4542
|
-
apiRef:
|
|
4548
|
+
apiRef: Je,
|
|
4543
4549
|
setRows: Yt,
|
|
4544
|
-
setColumns:
|
|
4545
|
-
setDimensions:
|
|
4546
|
-
setDataSourceLoading:
|
|
4547
|
-
setDataSourceError:
|
|
4548
|
-
setRowCount:
|
|
4549
|
-
} =
|
|
4550
|
+
setColumns: to,
|
|
4551
|
+
setDimensions: kn,
|
|
4552
|
+
setDataSourceLoading: no,
|
|
4553
|
+
setDataSourceError: oo,
|
|
4554
|
+
setRowCount: ro
|
|
4555
|
+
} = Se, { scrollTop: io, scrollLeft: lo, handleScroll: so } = Ko({ onRowsScrollEnd: fe });
|
|
4550
4556
|
re(() => {
|
|
4551
|
-
$t && ($t.current =
|
|
4552
|
-
}, [$t,
|
|
4553
|
-
const { copySelectedRows:
|
|
4554
|
-
selectedRowIds:
|
|
4555
|
-
columns:
|
|
4556
|
-
getVisibleRows: () =>
|
|
4557
|
-
getRowId:
|
|
4557
|
+
$t && ($t.current = Je.current);
|
|
4558
|
+
}, [$t, Je]);
|
|
4559
|
+
const { copySelectedRows: Sn } = Nr({
|
|
4560
|
+
selectedRowIds: ke,
|
|
4561
|
+
columns: Ut,
|
|
4562
|
+
getVisibleRows: () => Je.current.getVisibleRows(),
|
|
4563
|
+
getRowId: qe
|
|
4558
4564
|
});
|
|
4559
4565
|
re(() => {
|
|
4560
|
-
|
|
4561
|
-
}, [
|
|
4562
|
-
const
|
|
4563
|
-
rows:
|
|
4564
|
-
getRowId:
|
|
4566
|
+
Je.current.copySelectedRows = Sn, Je.current.getSelectedRows = () => Array.from(ke);
|
|
4567
|
+
}, [Sn, ke, Je]);
|
|
4568
|
+
const ao = he.dataSource.loading, ct = q || ao, Qe = le(() => he.rows.allRows.map((Y) => he.rows.idRowsLookup.get(Y)), [he.rows]), qt = vr({
|
|
4569
|
+
rows: Qe,
|
|
4570
|
+
getRowId: qe,
|
|
4565
4571
|
getTreeDataPath: C,
|
|
4566
4572
|
treeData: K,
|
|
4567
4573
|
defaultGroupingExpansionDepth: B,
|
|
4568
4574
|
filterModel: Ne,
|
|
4569
4575
|
sortModel: Oe,
|
|
4570
|
-
onRowExpansionChange:
|
|
4576
|
+
onRowExpansionChange: eo
|
|
4571
4577
|
});
|
|
4572
4578
|
re(() => {
|
|
4573
|
-
|
|
4579
|
+
Cn.current = qt;
|
|
4574
4580
|
}, [qt]);
|
|
4575
|
-
const
|
|
4576
|
-
rows:
|
|
4577
|
-
getRowId:
|
|
4581
|
+
const co = _r({
|
|
4582
|
+
rows: Qe,
|
|
4583
|
+
getRowId: qe,
|
|
4578
4584
|
rowGroupingModel: Dt,
|
|
4579
4585
|
aggregationModel: Me,
|
|
4580
4586
|
defaultGroupingExpansionDepth: B,
|
|
4581
4587
|
filterModel: Ne,
|
|
4582
4588
|
sortModel: Oe,
|
|
4583
4589
|
getAggregationPosition: G
|
|
4584
|
-
}),
|
|
4585
|
-
rows:
|
|
4586
|
-
getRowId:
|
|
4590
|
+
}), Ze = yr({
|
|
4591
|
+
rows: Qe,
|
|
4592
|
+
getRowId: qe,
|
|
4587
4593
|
processRowUpdate: P,
|
|
4588
|
-
onProcessRowUpdateError:
|
|
4594
|
+
onProcessRowUpdateError: ne,
|
|
4589
4595
|
onRowChange: (Y) => {
|
|
4590
|
-
const { dispatch:
|
|
4591
|
-
(
|
|
4596
|
+
const { dispatch: Q } = Se, ve = Array.from(Se.state.rows.idRowsLookup.values()).map(
|
|
4597
|
+
(we) => we.id === Y.id ? Y : we
|
|
4592
4598
|
);
|
|
4593
|
-
|
|
4599
|
+
Q({ type: "SET_ROWS", payload: ve });
|
|
4594
4600
|
}
|
|
4595
|
-
}), Xt = K, Ct = !!(Dt && Dt.length > 0), Jt = Xt || Ct, kt = Xt ? qt : Ct ?
|
|
4596
|
-
const { row:
|
|
4597
|
-
if (Jt &&
|
|
4598
|
-
kt?.toggleExpansion(
|
|
4601
|
+
}), Xt = K, Ct = !!(Dt && Dt.length > 0), Jt = Xt || Ct, kt = Xt ? qt : Ct ? co : null, Pe = S && !Ct, St = z((Y) => {
|
|
4602
|
+
const { row: Q, id: se } = Y;
|
|
4603
|
+
if (Jt && Q._hasChildren) {
|
|
4604
|
+
kt?.toggleExpansion(se);
|
|
4599
4605
|
return;
|
|
4600
4606
|
}
|
|
4601
4607
|
g?.(Y);
|
|
4602
|
-
}, [Jt, kt, g]), Qt =
|
|
4603
|
-
dataSource:
|
|
4608
|
+
}, [Jt, kt, g]), Qt = kr({
|
|
4609
|
+
dataSource: te,
|
|
4604
4610
|
sortModel: Oe,
|
|
4605
4611
|
filterModel: Ne,
|
|
4606
|
-
paginationModel:
|
|
4612
|
+
paginationModel: je,
|
|
4607
4613
|
paginationMode: $,
|
|
4608
|
-
sortingMode:
|
|
4614
|
+
sortingMode: ee,
|
|
4609
4615
|
filterMode: pe,
|
|
4610
4616
|
aggregationModel: Me,
|
|
4611
4617
|
setRows: Yt,
|
|
4612
|
-
setRowCount:
|
|
4613
|
-
setDataSourceLoading:
|
|
4614
|
-
setDataSourceError:
|
|
4615
|
-
onAggregationResults:
|
|
4618
|
+
setRowCount: ro,
|
|
4619
|
+
setDataSourceLoading: no,
|
|
4620
|
+
setDataSourceError: oo,
|
|
4621
|
+
onAggregationResults: bn
|
|
4616
4622
|
});
|
|
4617
4623
|
re(() => {
|
|
4618
|
-
Qt.fetchChildren && (
|
|
4624
|
+
Qt.fetchChildren && (yn.current = Qt.fetchChildren);
|
|
4619
4625
|
}, [Qt.fetchChildren]), re(() => {
|
|
4620
|
-
|
|
4621
|
-
}, [
|
|
4622
|
-
const Le = !!p, [
|
|
4623
|
-
const
|
|
4624
|
-
|
|
4625
|
-
}, [
|
|
4626
|
-
effectiveColumns:
|
|
4626
|
+
te || Yt(Kt);
|
|
4627
|
+
}, [Kt, Yt, te]);
|
|
4628
|
+
const Le = !!p, [uo, go] = Z(/* @__PURE__ */ new Set()), et = E ?? uo, jt = z((Y) => {
|
|
4629
|
+
const Q = new Set(et);
|
|
4630
|
+
Q.has(Y) ? Q.delete(Y) : Q.add(Y), E === void 0 && go(Q), R?.(Q);
|
|
4631
|
+
}, [et, E, R]), {
|
|
4632
|
+
effectiveColumns: Ae,
|
|
4627
4633
|
orderedColumns: Zt,
|
|
4628
|
-
visibleOrderedColumns:
|
|
4629
|
-
navigationColumns:
|
|
4630
|
-
columnWidths:
|
|
4634
|
+
visibleOrderedColumns: fo,
|
|
4635
|
+
navigationColumns: jn,
|
|
4636
|
+
columnWidths: Te,
|
|
4631
4637
|
effectiveColumnOrder: Rt,
|
|
4632
4638
|
setInternalColumnOrder: Et,
|
|
4633
|
-
columnReorderHandlers:
|
|
4634
|
-
handleColumnResize:
|
|
4635
|
-
} =
|
|
4636
|
-
activeColumns:
|
|
4639
|
+
columnReorderHandlers: tt,
|
|
4640
|
+
handleColumnResize: ho
|
|
4641
|
+
} = Vo({
|
|
4642
|
+
activeColumns: Ut,
|
|
4637
4643
|
isHierarchyEnabled: Jt,
|
|
4638
4644
|
isRowGrouping: Ct,
|
|
4639
4645
|
isTreeData: Xt,
|
|
@@ -4647,100 +4653,105 @@ function mi(n) {
|
|
|
4647
4653
|
hasDetailPanel: Le,
|
|
4648
4654
|
rowReordering: L,
|
|
4649
4655
|
initialState: Ve,
|
|
4650
|
-
setColumns:
|
|
4656
|
+
setColumns: to
|
|
4651
4657
|
});
|
|
4652
|
-
|
|
4658
|
+
Yo({
|
|
4653
4659
|
onStateChange: xe,
|
|
4654
4660
|
sortModel: Oe,
|
|
4655
4661
|
filterModel: Ne,
|
|
4656
|
-
effectivePaginationModel:
|
|
4657
|
-
columnWidths:
|
|
4662
|
+
effectivePaginationModel: je,
|
|
4663
|
+
columnWidths: Te,
|
|
4658
4664
|
effectiveColumnOrder: Rt,
|
|
4659
4665
|
columnVisibilityModel: $e,
|
|
4660
|
-
pinnedColumns:
|
|
4666
|
+
pinnedColumns: Fe
|
|
4661
4667
|
});
|
|
4662
|
-
const
|
|
4663
|
-
effectiveRows:
|
|
4668
|
+
const nt = Do({
|
|
4669
|
+
effectiveRows: Qe,
|
|
4664
4670
|
activeHierarchyHandlers: kt,
|
|
4665
4671
|
filterMode: pe,
|
|
4666
4672
|
filterModel: Ne,
|
|
4667
|
-
dataSource:
|
|
4673
|
+
dataSource: te,
|
|
4668
4674
|
sortModel: Oe,
|
|
4669
|
-
sortingMode:
|
|
4675
|
+
sortingMode: ee,
|
|
4670
4676
|
pagination: Pe,
|
|
4671
4677
|
paginationMode: $,
|
|
4672
|
-
effectivePaginationModel:
|
|
4678
|
+
effectivePaginationModel: je,
|
|
4673
4679
|
pinnedRows: u,
|
|
4674
4680
|
isLoading: he.dataSource.loading,
|
|
4675
|
-
pageSize:
|
|
4676
|
-
}), De =
|
|
4681
|
+
pageSize: je.pageSize
|
|
4682
|
+
}), De = nt.filteredRows, en = nt.pinnedTopRows, tn = nt.pinnedBottomRows, ot = nt.sortedUnpinnedRows, ut = nt.paginatedUnpinnedRows, nn = nt.allRenderableRows;
|
|
4677
4683
|
re(() => {
|
|
4678
|
-
|
|
4679
|
-
}, [
|
|
4680
|
-
const
|
|
4681
|
-
rows: Pe ?
|
|
4684
|
+
Se.apiRef.current.getVisibleRows = () => Pe ? ut : ot, Se.apiRef.current.getVisibleColumns = () => Ae;
|
|
4685
|
+
}, [ot, ut, Pe, Ae, Se.apiRef]);
|
|
4686
|
+
const po = wr({
|
|
4687
|
+
rows: Pe ? ut : ot,
|
|
4682
4688
|
getRowId: (Y) => Y.id,
|
|
4683
4689
|
onRowOrderChange: U,
|
|
4684
4690
|
rowReordering: L
|
|
4685
|
-
}),
|
|
4691
|
+
}), rt = Cr(
|
|
4686
4692
|
nn,
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
), { aggregationResult: on } =
|
|
4693
|
+
jn,
|
|
4694
|
+
Te
|
|
4695
|
+
), { aggregationResult: on } = Xo({
|
|
4690
4696
|
rows: De,
|
|
4691
4697
|
aggregationModel: Me,
|
|
4692
|
-
isServerSide: !!(
|
|
4693
|
-
dataSource:
|
|
4698
|
+
isServerSide: !!(te && ($ === "server" || ee === "server")),
|
|
4699
|
+
dataSource: te,
|
|
4694
4700
|
filterModel: Ne,
|
|
4695
4701
|
sortModel: Oe,
|
|
4696
|
-
serverAggregationResults:
|
|
4702
|
+
serverAggregationResults: Jn
|
|
4697
4703
|
}), Nt = Object.keys(Me).length > 0;
|
|
4698
4704
|
re(() => {
|
|
4699
|
-
|
|
4700
|
-
}, [on, Me, Nt,
|
|
4701
|
-
const
|
|
4705
|
+
Se.apiRef.current.getAggregationResult = () => Nt ? on : null, Se.apiRef.current.getAggregationModel = () => Nt ? Me : null;
|
|
4706
|
+
}, [on, Me, Nt, Se.apiRef]);
|
|
4707
|
+
const me = Po({
|
|
4702
4708
|
rowHeight: i,
|
|
4703
4709
|
pagination: Pe,
|
|
4704
|
-
paginatedUnpinnedRows:
|
|
4705
|
-
sortedUnpinnedRows:
|
|
4706
|
-
expandedRowIds:
|
|
4710
|
+
paginatedUnpinnedRows: ut,
|
|
4711
|
+
sortedUnpinnedRows: ot,
|
|
4712
|
+
expandedRowIds: et,
|
|
4707
4713
|
getDetailPanelHeight: j,
|
|
4708
4714
|
pinnedTopRowsLength: en.length,
|
|
4709
4715
|
pinnedBottomRowsLength: tn.length,
|
|
4710
|
-
visibleOrderedColumns:
|
|
4711
|
-
pinnedColumns:
|
|
4712
|
-
columnWidths:
|
|
4716
|
+
visibleOrderedColumns: fo,
|
|
4717
|
+
pinnedColumns: Fe,
|
|
4718
|
+
columnWidths: Te,
|
|
4713
4719
|
viewportWidth: he.dimensions.viewportWidth || 1e3,
|
|
4714
4720
|
checkboxSelection: s,
|
|
4715
4721
|
hasDetailPanel: Le,
|
|
4716
4722
|
rowReordering: L,
|
|
4717
4723
|
paginationMode: $,
|
|
4718
4724
|
isLoading: he.dataSource.loading,
|
|
4719
|
-
pageSize:
|
|
4720
|
-
})
|
|
4725
|
+
pageSize: je.pageSize
|
|
4726
|
+
}), xo = le(() => {
|
|
4727
|
+
const Y = {};
|
|
4728
|
+
for (const Q of [...me.leftPinnedCols, ...me.unpinnedColsWithWidth, ...me.rightPinnedCols])
|
|
4729
|
+
Q.isSpacer || (Y[Q.field] = Q.width);
|
|
4730
|
+
return { ...Y, ...Te };
|
|
4731
|
+
}, [me.leftPinnedCols, me.unpinnedColsWithWidth, me.rightPinnedCols, Te]);
|
|
4721
4732
|
re(() => {
|
|
4722
|
-
|
|
4723
|
-
const
|
|
4724
|
-
if (
|
|
4733
|
+
Se.apiRef.current.scrollToIndexes = ({ rowIndex: Y, colIndex: Q }) => {
|
|
4734
|
+
const se = Ye.current;
|
|
4735
|
+
if (se) {
|
|
4725
4736
|
if (Y !== void 0 && Y >= 0) {
|
|
4726
|
-
const
|
|
4727
|
-
|
|
4737
|
+
const ve = Y > 0 ? me.cumulativeHeights[Y - 1] : 0, we = me.cumulativeHeights[Y] ?? ve, { scrollTop: _e, clientHeight: ye } = se;
|
|
4738
|
+
ve < _e ? se.scrollTop = ve : we > _e + ye && (se.scrollTop = we - ye);
|
|
4728
4739
|
}
|
|
4729
|
-
if (
|
|
4730
|
-
const
|
|
4731
|
-
if (!
|
|
4732
|
-
const
|
|
4733
|
-
if (
|
|
4734
|
-
const
|
|
4735
|
-
|
|
4740
|
+
if (Q !== void 0 && Q >= 0) {
|
|
4741
|
+
const we = [...me.leftPinnedCols, ...me.unpinnedColsWithWidth, ...me.rightPinnedCols][Q];
|
|
4742
|
+
if (!we) return;
|
|
4743
|
+
const _e = me.unpinnedColsWithWidth.findIndex((So) => So.field === we.field);
|
|
4744
|
+
if (_e === -1) return;
|
|
4745
|
+
const ye = _e > 0 ? me.unpinnedAccWidths[_e - 1] : 0, Pt = me.unpinnedAccWidths[_e] ?? ye, Lt = me.leftWidth + Pt, { scrollLeft: Mn, clientWidth: In } = se;
|
|
4746
|
+
ye < Mn ? se.scrollLeft = ye : Lt > Mn + In && (se.scrollLeft = Lt - In);
|
|
4736
4747
|
}
|
|
4737
4748
|
}
|
|
4738
4749
|
};
|
|
4739
|
-
}, [
|
|
4740
|
-
const Re =
|
|
4741
|
-
layout:
|
|
4742
|
-
scrollTop:
|
|
4743
|
-
scrollLeft:
|
|
4750
|
+
}, [me, Ye, Se.apiRef]);
|
|
4751
|
+
const Re = Ho({
|
|
4752
|
+
layout: me,
|
|
4753
|
+
scrollTop: io,
|
|
4754
|
+
scrollLeft: lo,
|
|
4744
4755
|
viewportWidth: he.dimensions.viewportWidth,
|
|
4745
4756
|
viewportHeight: he.dimensions.viewportHeight,
|
|
4746
4757
|
autoHeight: a,
|
|
@@ -4752,69 +4763,69 @@ function mi(n) {
|
|
|
4752
4763
|
});
|
|
4753
4764
|
re(() => {
|
|
4754
4765
|
if (!Ye.current) return;
|
|
4755
|
-
const Y = new ResizeObserver((
|
|
4756
|
-
for (const
|
|
4757
|
-
const { width:
|
|
4758
|
-
|
|
4766
|
+
const Y = new ResizeObserver((Q) => {
|
|
4767
|
+
for (const se of Q) {
|
|
4768
|
+
const { width: ve, height: we } = se.contentRect;
|
|
4769
|
+
kn(ve, we);
|
|
4759
4770
|
}
|
|
4760
4771
|
});
|
|
4761
4772
|
return Y.observe(Ye.current), () => {
|
|
4762
4773
|
Y.disconnect();
|
|
4763
4774
|
};
|
|
4764
|
-
}, [
|
|
4765
|
-
const
|
|
4766
|
-
const
|
|
4767
|
-
|
|
4768
|
-
const
|
|
4769
|
-
|
|
4770
|
-
}, [
|
|
4771
|
-
let
|
|
4772
|
-
Y && (
|
|
4773
|
-
}, [
|
|
4774
|
-
const
|
|
4775
|
-
pn || xn(
|
|
4776
|
-
}, [pn, b, xn]), { focusedCell: Mt, setFocusedCell: rn, handleFocus:
|
|
4775
|
+
}, [kn]);
|
|
4776
|
+
const gt = z((Y, Q) => {
|
|
4777
|
+
const se = new Set(ke);
|
|
4778
|
+
Q ? se.add(Y) : se.delete(Y);
|
|
4779
|
+
const ve = Array.from(se);
|
|
4780
|
+
wt || vt(ve), bt?.(ve);
|
|
4781
|
+
}, [ke, wt, bt, vt]), mo = z((Y) => {
|
|
4782
|
+
let Q = [];
|
|
4783
|
+
Y && (Q = Qe.map((se) => se.id)), wt || vt(Q), bt?.(Q);
|
|
4784
|
+
}, [Qe, wt, bt, vt]), Rn = z((Y, Q) => {
|
|
4785
|
+
const se = Q ? [{ field: Y, sort: Q }] : [];
|
|
4786
|
+
pn || xn(se), b?.(se);
|
|
4787
|
+
}, [pn, b, xn]), { focusedCell: Mt, setFocusedCell: rn, handleFocus: wo, handleBlur: vo, handleKeyDown: bo } = Lo({
|
|
4777
4788
|
allRenderableRows: nn,
|
|
4778
|
-
navigationColumns:
|
|
4789
|
+
navigationColumns: jn,
|
|
4779
4790
|
checkboxSelection: s,
|
|
4780
|
-
selectedRowIds:
|
|
4781
|
-
handleSelectionChange:
|
|
4791
|
+
selectedRowIds: ke,
|
|
4792
|
+
handleSelectionChange: gt,
|
|
4782
4793
|
handleDetailPanelToggle: jt,
|
|
4783
|
-
editingHandlers:
|
|
4784
|
-
setKeyboardMode:
|
|
4794
|
+
editingHandlers: Ze,
|
|
4795
|
+
setKeyboardMode: Xe,
|
|
4785
4796
|
sortModel: Oe,
|
|
4786
|
-
handleSort:
|
|
4797
|
+
handleSort: Rn,
|
|
4787
4798
|
isCellEditable: D,
|
|
4788
4799
|
pagination: Pe,
|
|
4789
|
-
pageSize:
|
|
4800
|
+
pageSize: je.pageSize,
|
|
4790
4801
|
virtualization: Re,
|
|
4791
4802
|
viewportRef: Ye
|
|
4792
4803
|
}), ln = z((Y) => {
|
|
4793
|
-
|
|
4794
|
-
}, [x,
|
|
4804
|
+
Xe(!1), rn({ id: Y.row.id, field: Y.field }), yt.current?.focus({ preventScroll: !0 }), x?.(Y);
|
|
4805
|
+
}, [x, Xe, rn]), En = J(Ze.editingCell);
|
|
4795
4806
|
re(() => {
|
|
4796
|
-
const Y = !!
|
|
4797
|
-
Y && !
|
|
4798
|
-
}, [
|
|
4799
|
-
const
|
|
4807
|
+
const Y = !!En.current, Q = !!Ze.editingCell;
|
|
4808
|
+
Y && !Q && yt.current?.focus({ preventScroll: !0 }), En.current = Ze.editingCell;
|
|
4809
|
+
}, [Ze.editingCell]);
|
|
4810
|
+
const _o = Uo({
|
|
4800
4811
|
renderContext: Re.renderContext,
|
|
4801
4812
|
pinnedTopRows: en,
|
|
4802
4813
|
pinnedBottomRows: tn,
|
|
4803
|
-
paginatedUnpinnedRows:
|
|
4804
|
-
sortedUnpinnedRows:
|
|
4814
|
+
paginatedUnpinnedRows: ut,
|
|
4815
|
+
sortedUnpinnedRows: ot,
|
|
4805
4816
|
pagination: Pe
|
|
4806
|
-
}),
|
|
4817
|
+
}), yo = t.length > 0 && ke.size === t.length, Co = ke.size > 0 && ke.size < t.length, ko = ae.useMemo(() => Ae.some((Y) => !!Y.rowSpan), [Ae]), [ft, It] = ae.useState(!1), sn = ae.useRef(null), Nn = ae.useMemo(() => {
|
|
4807
4818
|
if (!de?.toolbar) return null;
|
|
4808
|
-
const Y = T ? void 0 : (
|
|
4809
|
-
const
|
|
4810
|
-
if (
|
|
4811
|
-
const
|
|
4812
|
-
|
|
4813
|
-
const Pt =
|
|
4814
|
-
Pt && F?.({ oldIndex:
|
|
4819
|
+
const Y = T ? void 0 : (Q, se) => {
|
|
4820
|
+
const ve = [...Rt], we = ve.indexOf(Q), _e = ve.indexOf(se);
|
|
4821
|
+
if (we === -1 || _e === -1) return;
|
|
4822
|
+
const ye = [...ve];
|
|
4823
|
+
ye.splice(we, 1), ye.splice(_e, 0, Q), I || Et(ye);
|
|
4824
|
+
const Pt = Ae.find((Lt) => Lt.field === Q);
|
|
4825
|
+
Pt && F?.({ oldIndex: we, targetIndex: _e, column: Pt });
|
|
4815
4826
|
};
|
|
4816
4827
|
return {
|
|
4817
|
-
apiRef:
|
|
4828
|
+
apiRef: Se.apiRef,
|
|
4818
4829
|
columns: Zt,
|
|
4819
4830
|
baseColumns: e,
|
|
4820
4831
|
aggregationModel: Me,
|
|
@@ -4826,23 +4837,23 @@ function mi(n) {
|
|
|
4826
4837
|
filterModel: Ne,
|
|
4827
4838
|
onFilterModelChange: m,
|
|
4828
4839
|
columnVisibilityModel: $e,
|
|
4829
|
-
onColumnVisibilityModelChange:
|
|
4840
|
+
onColumnVisibilityModelChange: mt,
|
|
4830
4841
|
onColumnReorder: Y,
|
|
4831
|
-
onColumnOrderReset: T ? void 0 : () => Et(e.map((
|
|
4832
|
-
forceColumnsOpen:
|
|
4842
|
+
onColumnOrderReset: T ? void 0 : () => Et(e.map((Q) => Q.field)),
|
|
4843
|
+
forceColumnsOpen: ft,
|
|
4833
4844
|
onColumnsPanelClose: () => It(!1),
|
|
4834
|
-
...
|
|
4845
|
+
...be?.toolbar
|
|
4835
4846
|
};
|
|
4836
4847
|
}, [
|
|
4837
4848
|
de?.toolbar,
|
|
4838
4849
|
T,
|
|
4839
4850
|
Rt,
|
|
4840
4851
|
Zt,
|
|
4841
|
-
|
|
4852
|
+
Ae,
|
|
4842
4853
|
I,
|
|
4843
4854
|
F,
|
|
4844
4855
|
Et,
|
|
4845
|
-
|
|
4856
|
+
Se.apiRef,
|
|
4846
4857
|
e,
|
|
4847
4858
|
Me,
|
|
4848
4859
|
mn,
|
|
@@ -4854,68 +4865,68 @@ function mi(n) {
|
|
|
4854
4865
|
Ne,
|
|
4855
4866
|
m,
|
|
4856
4867
|
$e,
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4868
|
+
mt,
|
|
4869
|
+
ft,
|
|
4870
|
+
be?.toolbar
|
|
4860
4871
|
]);
|
|
4861
4872
|
return re(() => {
|
|
4862
|
-
if (!
|
|
4863
|
-
function Y(
|
|
4864
|
-
const
|
|
4865
|
-
|
|
4873
|
+
if (!ft || de?.toolbar) return;
|
|
4874
|
+
function Y(Q) {
|
|
4875
|
+
const se = document.getElementById("ogx-standalone-col-panel");
|
|
4876
|
+
se && !se.contains(Q.target) && It(!1);
|
|
4866
4877
|
}
|
|
4867
4878
|
return document.addEventListener("mousedown", Y), () => document.removeEventListener("mousedown", Y);
|
|
4868
|
-
}, [
|
|
4879
|
+
}, [ft, de?.toolbar]), /* @__PURE__ */ r.jsxs(
|
|
4869
4880
|
"div",
|
|
4870
4881
|
{
|
|
4871
4882
|
ref: sn,
|
|
4872
|
-
className: ["ogx",
|
|
4883
|
+
className: ["ogx", oe, a && "ogx--auto-height", ko && "ogx--row-spanning", ie && "ogx--list-view"].filter(Boolean).join(" "),
|
|
4873
4884
|
style: {
|
|
4874
4885
|
...ue,
|
|
4875
4886
|
height: H ?? ue?.height,
|
|
4876
4887
|
"--ogx-row-height": `${i}px`,
|
|
4877
4888
|
"--ogx-header-height": `${l}px`
|
|
4878
4889
|
},
|
|
4879
|
-
"aria-busy":
|
|
4890
|
+
"aria-busy": ct,
|
|
4880
4891
|
children: [
|
|
4881
|
-
|
|
4892
|
+
Nn && /* @__PURE__ */ r.jsx(qn, { ...Nn }),
|
|
4882
4893
|
!de?.toolbar && /* @__PURE__ */ r.jsx(
|
|
4883
|
-
|
|
4894
|
+
Ur,
|
|
4884
4895
|
{
|
|
4885
|
-
isOpen:
|
|
4896
|
+
isOpen: ft,
|
|
4886
4897
|
containerRef: sn,
|
|
4887
|
-
effectiveColumns:
|
|
4898
|
+
effectiveColumns: Ae,
|
|
4888
4899
|
columnVisibilityModel: $e,
|
|
4889
4900
|
effectiveColumnOrder: Rt,
|
|
4890
4901
|
columnOrder: I,
|
|
4891
4902
|
disableColumnReorder: T,
|
|
4892
4903
|
onClose: () => It(!1),
|
|
4893
|
-
onColumnVisibilityChange:
|
|
4904
|
+
onColumnVisibilityChange: mt,
|
|
4894
4905
|
onColumnOrderChange: F,
|
|
4895
4906
|
setInternalColumnOrder: Et
|
|
4896
4907
|
}
|
|
4897
4908
|
),
|
|
4898
|
-
ie &&
|
|
4899
|
-
|
|
4909
|
+
ie && Ce && /* @__PURE__ */ r.jsx(
|
|
4910
|
+
Ir,
|
|
4900
4911
|
{
|
|
4901
4912
|
ariaLabel: Ie,
|
|
4902
4913
|
allRenderableRows: nn,
|
|
4903
4914
|
filteredRows: De,
|
|
4904
4915
|
pagination: Pe,
|
|
4905
|
-
effectivePaginationModel:
|
|
4916
|
+
effectivePaginationModel: je,
|
|
4906
4917
|
pageSizeOptions: k,
|
|
4907
|
-
selectedRowIds:
|
|
4908
|
-
listViewColumn:
|
|
4918
|
+
selectedRowIds: ke,
|
|
4919
|
+
listViewColumn: Ce,
|
|
4909
4920
|
noRowsLabel: Bt,
|
|
4910
4921
|
rowHeight: i,
|
|
4911
4922
|
checkboxSelection: s,
|
|
4912
4923
|
paginationMode: $,
|
|
4913
|
-
dataSource:
|
|
4924
|
+
dataSource: te,
|
|
4914
4925
|
serverRowCount: he.pagination.rowCount || 0,
|
|
4915
4926
|
paginationSlot: de?.pagination,
|
|
4916
|
-
paginationSlotProps:
|
|
4927
|
+
paginationSlotProps: be?.pagination,
|
|
4917
4928
|
onRowClick: St,
|
|
4918
|
-
onSelectionChange:
|
|
4929
|
+
onSelectionChange: gt,
|
|
4919
4930
|
onPaginationModelChange: Vt
|
|
4920
4931
|
}
|
|
4921
4932
|
),
|
|
@@ -4923,29 +4934,29 @@ function mi(n) {
|
|
|
4923
4934
|
"div",
|
|
4924
4935
|
{
|
|
4925
4936
|
ref: (Y) => {
|
|
4926
|
-
Ye.current = Y,
|
|
4937
|
+
Ye.current = Y, yt.current = Y;
|
|
4927
4938
|
},
|
|
4928
4939
|
className: "ogx__viewport",
|
|
4929
|
-
onScroll:
|
|
4940
|
+
onScroll: so,
|
|
4930
4941
|
role: "grid",
|
|
4931
4942
|
"aria-label": Ie || "Data grid",
|
|
4932
4943
|
"aria-rowcount": De.length + 1,
|
|
4933
4944
|
"aria-colcount": e.length + (s ? 1 : 0) + (Le ? 1 : 0) + (L ? 1 : 0),
|
|
4934
|
-
"aria-busy":
|
|
4945
|
+
"aria-busy": ct,
|
|
4935
4946
|
tabIndex: 0,
|
|
4936
4947
|
onKeyDownCapture: () => {
|
|
4937
|
-
|
|
4948
|
+
Xe(!0);
|
|
4938
4949
|
},
|
|
4939
4950
|
onMouseDownCapture: () => {
|
|
4940
|
-
|
|
4951
|
+
Xe(!1);
|
|
4941
4952
|
},
|
|
4942
|
-
onKeyDown:
|
|
4943
|
-
onFocus:
|
|
4944
|
-
onBlur:
|
|
4953
|
+
onKeyDown: bo,
|
|
4954
|
+
onFocus: wo,
|
|
4955
|
+
onBlur: vo,
|
|
4945
4956
|
children: /* @__PURE__ */ r.jsxs(
|
|
4946
4957
|
"div",
|
|
4947
4958
|
{
|
|
4948
|
-
ref:
|
|
4959
|
+
ref: Qn,
|
|
4949
4960
|
className: "ogx__content",
|
|
4950
4961
|
style: {
|
|
4951
4962
|
width: Re.totalWidth
|
|
@@ -4953,83 +4964,83 @@ function mi(n) {
|
|
|
4953
4964
|
role: "presentation",
|
|
4954
4965
|
children: [
|
|
4955
4966
|
/* @__PURE__ */ r.jsx(
|
|
4956
|
-
|
|
4967
|
+
hr,
|
|
4957
4968
|
{
|
|
4958
4969
|
columns: Re.virtualColumns,
|
|
4959
|
-
allColumns:
|
|
4970
|
+
allColumns: Ae,
|
|
4960
4971
|
columnGroupingModel: Be,
|
|
4961
4972
|
checkboxSelection: s,
|
|
4962
|
-
allSelected:
|
|
4963
|
-
someSelected:
|
|
4964
|
-
onSelectAll:
|
|
4973
|
+
allSelected: yo,
|
|
4974
|
+
someSelected: Co,
|
|
4975
|
+
onSelectAll: mo,
|
|
4965
4976
|
sortModel: Oe,
|
|
4966
|
-
onSort:
|
|
4967
|
-
onColumnResize:
|
|
4968
|
-
columnWidths:
|
|
4969
|
-
pinnedColumns:
|
|
4977
|
+
onSort: Rn,
|
|
4978
|
+
onColumnResize: ho,
|
|
4979
|
+
columnWidths: Te,
|
|
4980
|
+
pinnedColumns: Fe,
|
|
4970
4981
|
focusedCell: Mt,
|
|
4971
4982
|
onHeaderClick: (Y) => {
|
|
4972
|
-
rn({ id: "HEADER", field: Y }),
|
|
4983
|
+
rn({ id: "HEADER", field: Y }), Xe(!1), yt.current?.focus({ preventScroll: !0 });
|
|
4973
4984
|
},
|
|
4974
|
-
onDragStart: Be ? void 0 :
|
|
4975
|
-
onDragOver: Be ? void 0 :
|
|
4976
|
-
onDragEnd: Be ? void 0 :
|
|
4977
|
-
onDrop: Be ? void 0 :
|
|
4978
|
-
draggedColumn: Be ? void 0 :
|
|
4979
|
-
dragOverColumn: Be ? void 0 :
|
|
4985
|
+
onDragStart: Be ? void 0 : tt.onDragStart,
|
|
4986
|
+
onDragOver: Be ? void 0 : tt.onDragOver,
|
|
4987
|
+
onDragEnd: Be ? void 0 : tt.onDragEnd,
|
|
4988
|
+
onDrop: Be ? void 0 : tt.onDrop,
|
|
4989
|
+
draggedColumn: Be ? void 0 : tt.draggedColumn,
|
|
4990
|
+
dragOverColumn: Be ? void 0 : tt.dragOverColumn,
|
|
4980
4991
|
rowReordering: L,
|
|
4981
4992
|
hasDetailPanel: Le,
|
|
4982
4993
|
pinCheckboxColumn: _,
|
|
4983
4994
|
pinExpandColumn: M,
|
|
4984
4995
|
aggregationModel: Me,
|
|
4985
4996
|
onHideColumn: (Y) => {
|
|
4986
|
-
|
|
4997
|
+
mt({
|
|
4987
4998
|
...$e,
|
|
4988
4999
|
[Y]: !1
|
|
4989
5000
|
});
|
|
4990
5001
|
},
|
|
4991
5002
|
onManageColumns: () => It(!0),
|
|
4992
|
-
onPinColumn: (Y,
|
|
4993
|
-
const
|
|
4994
|
-
Ht(
|
|
5003
|
+
onPinColumn: (Y, Q) => {
|
|
5004
|
+
const se = [...Fe?.left ?? []], ve = [...Fe?.right ?? []], we = se.filter((ye) => ye !== Y), _e = ve.filter((ye) => ye !== Y);
|
|
5005
|
+
Ht(Q === "left" ? { left: [...we, Y], right: _e } : Q === "right" ? { left: we, right: [..._e, Y] } : { left: we, right: _e });
|
|
4995
5006
|
}
|
|
4996
5007
|
}
|
|
4997
5008
|
),
|
|
4998
|
-
!
|
|
5009
|
+
!ct && !he.dataSource.error && De.length === 0 && /* @__PURE__ */ r.jsx(Qo, { noRowsLabel: Bt, width: Re.totalWidth }),
|
|
4999
5010
|
/* @__PURE__ */ r.jsx(
|
|
5000
|
-
|
|
5011
|
+
Wn,
|
|
5001
5012
|
{
|
|
5002
5013
|
rows: en,
|
|
5003
5014
|
position: "top",
|
|
5004
5015
|
columns: Re.virtualColumns,
|
|
5005
|
-
selectedRowIds:
|
|
5016
|
+
selectedRowIds: ke,
|
|
5006
5017
|
checkboxSelection: s,
|
|
5007
5018
|
onRowClick: St,
|
|
5008
5019
|
onCellClick: ln,
|
|
5009
|
-
onSelectionChange:
|
|
5010
|
-
columnWidths:
|
|
5011
|
-
pinnedColumns:
|
|
5020
|
+
onSelectionChange: gt,
|
|
5021
|
+
columnWidths: Te,
|
|
5022
|
+
pinnedColumns: Fe,
|
|
5012
5023
|
pinnedRows: u,
|
|
5013
5024
|
hasDetailPanel: Le,
|
|
5014
|
-
expandedRowIds:
|
|
5025
|
+
expandedRowIds: et,
|
|
5015
5026
|
getDetailPanelContent: p,
|
|
5016
5027
|
getDetailPanelHeight: j,
|
|
5017
5028
|
onDetailPanelToggle: jt,
|
|
5018
5029
|
pinCheckboxColumn: _,
|
|
5019
5030
|
pinExpandColumn: M,
|
|
5020
5031
|
focusedCell: Mt,
|
|
5021
|
-
colspanMap:
|
|
5022
|
-
rowSpanningCaches:
|
|
5032
|
+
colspanMap: rt.colspanMap,
|
|
5033
|
+
rowSpanningCaches: rt.rowSpanningState.caches,
|
|
5023
5034
|
rowHeight: i
|
|
5024
5035
|
}
|
|
5025
5036
|
),
|
|
5026
5037
|
/* @__PURE__ */ r.jsx(
|
|
5027
|
-
|
|
5038
|
+
Hr,
|
|
5028
5039
|
{
|
|
5029
5040
|
virtualContainerHeight: Re.totalHeight - Re.pinnedTopHeight - Re.pinnedBottomHeight,
|
|
5030
5041
|
offsetTop: Re.offsetTop,
|
|
5031
|
-
effectiveLoading:
|
|
5032
|
-
visibleRows:
|
|
5042
|
+
effectiveLoading: ct,
|
|
5043
|
+
visibleRows: _o,
|
|
5033
5044
|
baseColumns: e,
|
|
5034
5045
|
virtualColumns: Re.virtualColumns,
|
|
5035
5046
|
viewportWidth: he.dimensions.viewportWidth,
|
|
@@ -5038,64 +5049,64 @@ function mi(n) {
|
|
|
5038
5049
|
rowReordering: L,
|
|
5039
5050
|
rowHeight: i,
|
|
5040
5051
|
pinnedRows: u,
|
|
5041
|
-
selectedRowIds:
|
|
5052
|
+
selectedRowIds: ke,
|
|
5042
5053
|
onRowClick: St,
|
|
5043
5054
|
onCellClick: ln,
|
|
5044
|
-
onSelectionChange:
|
|
5045
|
-
columnWidths:
|
|
5046
|
-
pinnedColumns:
|
|
5047
|
-
expandedRowIds:
|
|
5055
|
+
onSelectionChange: gt,
|
|
5056
|
+
columnWidths: Te,
|
|
5057
|
+
pinnedColumns: Fe,
|
|
5058
|
+
expandedRowIds: et,
|
|
5048
5059
|
getDetailPanelContent: p,
|
|
5049
5060
|
getDetailPanelHeight: j,
|
|
5050
5061
|
onDetailPanelToggle: jt,
|
|
5051
5062
|
pinCheckboxColumn: _,
|
|
5052
5063
|
pinExpandColumn: M,
|
|
5053
|
-
rowReorderHandlers:
|
|
5054
|
-
editingHandlers:
|
|
5064
|
+
rowReorderHandlers: po,
|
|
5065
|
+
editingHandlers: Ze,
|
|
5055
5066
|
focusedCell: Mt,
|
|
5056
|
-
colspanMap:
|
|
5057
|
-
rowSpanningCaches:
|
|
5067
|
+
colspanMap: rt.colspanMap,
|
|
5068
|
+
rowSpanningCaches: rt.rowSpanningState.caches,
|
|
5058
5069
|
paginationMode: $,
|
|
5059
5070
|
dataSourceLoading: he.dataSource.loading,
|
|
5060
|
-
sortedUnpinnedRowCount:
|
|
5061
|
-
infiniteScrollSkeletonCount: Math.min(
|
|
5062
|
-
unpinnedRowsLength:
|
|
5071
|
+
sortedUnpinnedRowCount: ot.length,
|
|
5072
|
+
infiniteScrollSkeletonCount: Math.min(je.pageSize, 20),
|
|
5073
|
+
unpinnedRowsLength: me.unpinnedRowsLength
|
|
5063
5074
|
}
|
|
5064
5075
|
),
|
|
5065
5076
|
/* @__PURE__ */ r.jsx(
|
|
5066
|
-
|
|
5077
|
+
Wn,
|
|
5067
5078
|
{
|
|
5068
5079
|
rows: tn,
|
|
5069
5080
|
position: "bottom",
|
|
5070
5081
|
columns: Re.virtualColumns,
|
|
5071
|
-
selectedRowIds:
|
|
5082
|
+
selectedRowIds: ke,
|
|
5072
5083
|
checkboxSelection: s,
|
|
5073
5084
|
onRowClick: St,
|
|
5074
5085
|
onCellClick: ln,
|
|
5075
|
-
onSelectionChange:
|
|
5076
|
-
columnWidths:
|
|
5077
|
-
pinnedColumns:
|
|
5086
|
+
onSelectionChange: gt,
|
|
5087
|
+
columnWidths: Te,
|
|
5088
|
+
pinnedColumns: Fe,
|
|
5078
5089
|
pinnedRows: u,
|
|
5079
5090
|
hasDetailPanel: Le,
|
|
5080
|
-
expandedRowIds:
|
|
5091
|
+
expandedRowIds: et,
|
|
5081
5092
|
getDetailPanelContent: p,
|
|
5082
5093
|
getDetailPanelHeight: j,
|
|
5083
5094
|
onDetailPanelToggle: jt,
|
|
5084
5095
|
pinCheckboxColumn: _,
|
|
5085
5096
|
pinExpandColumn: M,
|
|
5086
5097
|
focusedCell: Mt,
|
|
5087
|
-
colspanMap:
|
|
5088
|
-
rowSpanningCaches:
|
|
5098
|
+
colspanMap: rt.colspanMap,
|
|
5099
|
+
rowSpanningCaches: rt.rowSpanningState.caches,
|
|
5089
5100
|
rowHeight: i
|
|
5090
5101
|
}
|
|
5091
5102
|
),
|
|
5092
5103
|
Nt && !ce && /* @__PURE__ */ r.jsx(
|
|
5093
|
-
|
|
5104
|
+
Jo,
|
|
5094
5105
|
{
|
|
5095
5106
|
columns: Zt,
|
|
5096
5107
|
aggregationModel: Me,
|
|
5097
5108
|
aggregationResult: on,
|
|
5098
|
-
columnWidths:
|
|
5109
|
+
columnWidths: xo,
|
|
5099
5110
|
rowHeight: i,
|
|
5100
5111
|
checkboxSelection: s,
|
|
5101
5112
|
hasDetailPanel: Le,
|
|
@@ -5108,39 +5119,39 @@ function mi(n) {
|
|
|
5108
5119
|
}
|
|
5109
5120
|
),
|
|
5110
5121
|
!ie && Pe && (() => {
|
|
5111
|
-
const Y = de?.pagination ||
|
|
5122
|
+
const Y = de?.pagination || $n;
|
|
5112
5123
|
return /* @__PURE__ */ r.jsx(
|
|
5113
5124
|
Y,
|
|
5114
5125
|
{
|
|
5115
|
-
page:
|
|
5116
|
-
pageSize:
|
|
5126
|
+
page: je.page,
|
|
5127
|
+
pageSize: je.pageSize,
|
|
5117
5128
|
rowCount: he.pagination.rowCount,
|
|
5118
5129
|
pageSizeOptions: k,
|
|
5119
|
-
onPageChange: (
|
|
5120
|
-
onPageSizeChange: (
|
|
5121
|
-
...
|
|
5130
|
+
onPageChange: (Q) => Vt({ ...je, page: Q }),
|
|
5131
|
+
onPageSizeChange: (Q) => Vt({ ...je, pageSize: Q, page: 0 }),
|
|
5132
|
+
...be?.pagination
|
|
5122
5133
|
}
|
|
5123
5134
|
);
|
|
5124
5135
|
})(),
|
|
5125
5136
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx-aria-live-status", role: "status", "aria-live": "polite", children: [
|
|
5126
|
-
|
|
5137
|
+
ct ? "Loading data..." : "",
|
|
5127
5138
|
he.dataSource.error ? `Error: ${he.dataSource.error instanceof Error ? he.dataSource.error.message : "Unknown error"}` : "",
|
|
5128
5139
|
!q && !he.dataSource.error && (De.length === 0 ? Bt : Ne && ((Ne.quickFilterValues?.length || 0) > 0 || (Ne.items?.length || 0) > 0) ? `${De.length} ${De.length === 1 ? "row" : "rows"} found` : "")
|
|
5129
5140
|
] }),
|
|
5130
|
-
/* @__PURE__ */ r.jsx(
|
|
5141
|
+
/* @__PURE__ */ r.jsx(Zo, { error: he.dataSource.error })
|
|
5131
5142
|
]
|
|
5132
5143
|
}
|
|
5133
5144
|
);
|
|
5134
5145
|
}
|
|
5135
|
-
function
|
|
5146
|
+
function bi({ rows: n = 5, columns: t = 5 }) {
|
|
5136
5147
|
return /* @__PURE__ */ r.jsx("div", { className: "ogx__skeleton", children: Array.from({ length: n }).map((e, o) => /* @__PURE__ */ r.jsx("div", { className: "ogx__skeleton-row", children: Array.from({ length: t }).map((i, l) => /* @__PURE__ */ r.jsx("div", { className: "ogx__skeleton-cell", children: /* @__PURE__ */ r.jsx("div", { className: "ogx__skeleton-content" }) }, l)) }, o)) });
|
|
5137
5148
|
}
|
|
5138
5149
|
const On = /* @__PURE__ */ new Set(["isEmpty", "isNotEmpty"]);
|
|
5139
|
-
function
|
|
5150
|
+
function Kr(n, t) {
|
|
5140
5151
|
return n.find((e) => "field" in e && e.field === t);
|
|
5141
5152
|
}
|
|
5142
|
-
const
|
|
5143
|
-
const o =
|
|
5153
|
+
const Yr = ({ col: n, item: t, onChange: e }) => {
|
|
5154
|
+
const o = Bo(n.type), i = !!t, l = t?.operator ?? o[0], [a, s] = Z(t?.value != null ? String(t.value) : ""), c = J(e), d = J(t), g = J(n.field), x = J(l);
|
|
5144
5155
|
Ee(() => {
|
|
5145
5156
|
c.current = e, d.current = t, g.current = n.field, x.current = l;
|
|
5146
5157
|
});
|
|
@@ -5232,8 +5243,8 @@ const Ur = ({ col: n, item: t, onChange: e }) => {
|
|
|
5232
5243
|
)
|
|
5233
5244
|
] })
|
|
5234
5245
|
] });
|
|
5235
|
-
},
|
|
5236
|
-
const o =
|
|
5246
|
+
}, qr = ({ filterModel: n, columns: t, onFilterModelChange: e }) => {
|
|
5247
|
+
const o = le(() => n.items ?? [], [n.items]), i = n.logicOperator ?? "and", l = z((c, d) => {
|
|
5237
5248
|
const g = o.filter((h) => "field" in h && h.field !== c), x = d ? [...g, d] : g;
|
|
5238
5249
|
e({ ...n, items: x });
|
|
5239
5250
|
}, [o, n, e]), a = z((c) => {
|
|
@@ -5262,17 +5273,17 @@ const Ur = ({ col: n, item: t, onChange: e }) => {
|
|
|
5262
5273
|
)
|
|
5263
5274
|
] }),
|
|
5264
5275
|
s.length === 0 ? /* @__PURE__ */ r.jsx("div", { className: "ogx-filter__empty", children: "No filterable columns." }) : s.map((c) => /* @__PURE__ */ r.jsx(
|
|
5265
|
-
|
|
5276
|
+
Yr,
|
|
5266
5277
|
{
|
|
5267
5278
|
col: c,
|
|
5268
|
-
item:
|
|
5279
|
+
item: Kr(o, c.field),
|
|
5269
5280
|
onChange: (d) => l(c.field, d)
|
|
5270
5281
|
},
|
|
5271
5282
|
c.field
|
|
5272
5283
|
))
|
|
5273
5284
|
] });
|
|
5274
|
-
},
|
|
5275
|
-
function
|
|
5285
|
+
}, Xr = ["sum", "avg", "count", "min", "max"];
|
|
5286
|
+
function Gn() {
|
|
5276
5287
|
return /* @__PURE__ */ r.jsxs(
|
|
5277
5288
|
"svg",
|
|
5278
5289
|
{
|
|
@@ -5295,8 +5306,8 @@ function Hn() {
|
|
|
5295
5306
|
}
|
|
5296
5307
|
);
|
|
5297
5308
|
}
|
|
5298
|
-
function
|
|
5299
|
-
const l = J(null), [a, s] =
|
|
5309
|
+
function Jr({ anchorRef: n, columns: t, model: e, onChange: o, onClose: i }) {
|
|
5310
|
+
const l = J(null), [a, s] = Z({ top: 0, right: 0 }), [c, d] = Z(document.body);
|
|
5300
5311
|
Ee(() => {
|
|
5301
5312
|
d(n.current?.closest(".ogx-theme-provider") ?? document.body);
|
|
5302
5313
|
}, [n]);
|
|
@@ -5361,7 +5372,7 @@ function qr({ anchorRef: n, columns: t, model: e, onChange: o, onClose: i }) {
|
|
|
5361
5372
|
children: [
|
|
5362
5373
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx-pivot-panel__header", children: [
|
|
5363
5374
|
/* @__PURE__ */ r.jsxs("span", { className: "ogx-pivot-panel__title", children: [
|
|
5364
|
-
/* @__PURE__ */ r.jsx(
|
|
5375
|
+
/* @__PURE__ */ r.jsx(Gn, {}),
|
|
5365
5376
|
"Pivot Mode"
|
|
5366
5377
|
] }),
|
|
5367
5378
|
j > 0 && /* @__PURE__ */ r.jsx("button", { className: "ogx-pivot-panel__reset-btn", onClick: u, title: "Reset pivot", children: "Reset" })
|
|
@@ -5420,7 +5431,7 @@ function qr({ anchorRef: n, columns: t, model: e, onChange: o, onClose: i }) {
|
|
|
5420
5431
|
value: _.aggFn,
|
|
5421
5432
|
onChange: (M) => w(_.field, M.target.value),
|
|
5422
5433
|
title: "Aggregation function",
|
|
5423
|
-
children:
|
|
5434
|
+
children: Xr.map((M) => /* @__PURE__ */ r.jsx("option", { value: M, children: M.toUpperCase() }, M))
|
|
5424
5435
|
}
|
|
5425
5436
|
),
|
|
5426
5437
|
/* @__PURE__ */ r.jsx("button", { className: "ogx-pivot-chip__remove", onClick: () => y(_.field), title: `Remove ${E(_.field)}`, children: "×" })
|
|
@@ -5452,20 +5463,20 @@ function qr({ anchorRef: n, columns: t, model: e, onChange: o, onClose: i }) {
|
|
|
5452
5463
|
);
|
|
5453
5464
|
return Ge.createPortal(R, c);
|
|
5454
5465
|
}
|
|
5455
|
-
function
|
|
5466
|
+
function Qr() {
|
|
5456
5467
|
return /* @__PURE__ */ r.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
5457
5468
|
/* @__PURE__ */ r.jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
5458
5469
|
/* @__PURE__ */ r.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
5459
5470
|
] });
|
|
5460
5471
|
}
|
|
5461
|
-
function
|
|
5472
|
+
function Zr() {
|
|
5462
5473
|
return /* @__PURE__ */ r.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
5463
5474
|
/* @__PURE__ */ r.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
5464
5475
|
/* @__PURE__ */ r.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
5465
5476
|
] });
|
|
5466
5477
|
}
|
|
5467
|
-
function
|
|
5468
|
-
const [i, l] =
|
|
5478
|
+
function ei({ value: n = "", onChange: t, placeholder: e = "Search...", debounceMs: o = 250 }) {
|
|
5479
|
+
const [i, l] = Z(() => n.length > 0), [a, s] = Z(n), c = J(null), d = J(null), g = J(t);
|
|
5469
5480
|
Ee(() => {
|
|
5470
5481
|
g.current = t;
|
|
5471
5482
|
}, [t]);
|
|
@@ -5507,7 +5518,7 @@ function Qr({ value: n = "", onChange: t, placeholder: e = "Search...", debounce
|
|
|
5507
5518
|
className: `ogx-global-search${i ? " ogx-global-search--expanded" : ""}`,
|
|
5508
5519
|
onClick: i ? void 0 : v,
|
|
5509
5520
|
children: [
|
|
5510
|
-
/* @__PURE__ */ r.jsx("div", { className: "ogx-global-search__icon-wrapper", children: /* @__PURE__ */ r.jsx(
|
|
5521
|
+
/* @__PURE__ */ r.jsx("div", { className: "ogx-global-search__icon-wrapper", children: /* @__PURE__ */ r.jsx(Qr, {}) }),
|
|
5511
5522
|
/* @__PURE__ */ r.jsx(
|
|
5512
5523
|
"input",
|
|
5513
5524
|
{
|
|
@@ -5524,7 +5535,7 @@ function Qr({ value: n = "", onChange: t, placeholder: e = "Search...", debounce
|
|
|
5524
5535
|
autoComplete: "off"
|
|
5525
5536
|
}
|
|
5526
5537
|
),
|
|
5527
|
-
a && /* @__PURE__ */ r.jsx("button", { className: "ogx-global-search__clear", onClick: b, "aria-label": "Clear search", children: /* @__PURE__ */ r.jsx(
|
|
5538
|
+
a && /* @__PURE__ */ r.jsx("button", { className: "ogx-global-search__clear", onClick: b, "aria-label": "Clear search", children: /* @__PURE__ */ r.jsx(Zr, {}) })
|
|
5528
5539
|
]
|
|
5529
5540
|
}
|
|
5530
5541
|
);
|
|
@@ -5536,7 +5547,7 @@ function Ft({
|
|
|
5536
5547
|
enterDelay: o = 200,
|
|
5537
5548
|
leaveDelay: i = 0
|
|
5538
5549
|
}) {
|
|
5539
|
-
const [l, a] =
|
|
5550
|
+
const [l, a] = Z(!1), [s, c] = Z({ top: 0, left: 0 }), d = J(null), g = J(null), x = z(() => {
|
|
5540
5551
|
if (!g.current) return;
|
|
5541
5552
|
const b = g.current.getBoundingClientRect();
|
|
5542
5553
|
let S = 0, N = 0;
|
|
@@ -5586,8 +5597,8 @@ function Ft({
|
|
|
5586
5597
|
)
|
|
5587
5598
|
] });
|
|
5588
5599
|
}
|
|
5589
|
-
const
|
|
5590
|
-
function
|
|
5600
|
+
const ti = ["none", "sum", "avg", "count", "min", "max"];
|
|
5601
|
+
function Vn() {
|
|
5591
5602
|
return /* @__PURE__ */ r.jsx(
|
|
5592
5603
|
"svg",
|
|
5593
5604
|
{
|
|
@@ -5604,7 +5615,7 @@ function Gn() {
|
|
|
5604
5615
|
}
|
|
5605
5616
|
);
|
|
5606
5617
|
}
|
|
5607
|
-
function
|
|
5618
|
+
function ni() {
|
|
5608
5619
|
return /* @__PURE__ */ r.jsxs("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", children: [
|
|
5609
5620
|
/* @__PURE__ */ r.jsx("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", stroke: "currentColor", strokeWidth: "1.8" }),
|
|
5610
5621
|
/* @__PURE__ */ r.jsx("rect", { x: "8.5", y: "4", width: "7", height: "16", fill: "currentColor", opacity: "0.25" }),
|
|
@@ -5614,10 +5625,10 @@ function ei() {
|
|
|
5614
5625
|
/* @__PURE__ */ r.jsx("line", { x1: "2", y1: "14", x2: "22", y2: "14", stroke: "currentColor", strokeWidth: "1.2" })
|
|
5615
5626
|
] });
|
|
5616
5627
|
}
|
|
5617
|
-
function
|
|
5628
|
+
function Un() {
|
|
5618
5629
|
return /* @__PURE__ */ r.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ r.jsx("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }) });
|
|
5619
5630
|
}
|
|
5620
|
-
function
|
|
5631
|
+
function oi({
|
|
5621
5632
|
anchorRef: n,
|
|
5622
5633
|
aggregationModel: t,
|
|
5623
5634
|
aggregableColumns: e,
|
|
@@ -5626,7 +5637,7 @@ function ti({
|
|
|
5626
5637
|
onClose: l,
|
|
5627
5638
|
activeCount: a
|
|
5628
5639
|
}) {
|
|
5629
|
-
const s = J(null), [c, d] =
|
|
5640
|
+
const s = J(null), [c, d] = Z({ top: 0, right: 0 }), [g, x] = Z(document.body);
|
|
5630
5641
|
Ee(() => {
|
|
5631
5642
|
x(n.current?.closest(".ogx-theme-provider") ?? document.body);
|
|
5632
5643
|
}, [n]);
|
|
@@ -5666,7 +5677,7 @@ function ti({
|
|
|
5666
5677
|
children: [
|
|
5667
5678
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx-toolbar__panel-header", children: [
|
|
5668
5679
|
/* @__PURE__ */ r.jsxs("span", { className: "ogx-toolbar__panel-title", children: [
|
|
5669
|
-
/* @__PURE__ */ r.jsx(
|
|
5680
|
+
/* @__PURE__ */ r.jsx(Vn, {}),
|
|
5670
5681
|
"Summaries"
|
|
5671
5682
|
] }),
|
|
5672
5683
|
a > 0 && /* @__PURE__ */ r.jsx(
|
|
@@ -5689,7 +5700,7 @@ function ti({
|
|
|
5689
5700
|
const b = t[v.field] || "none";
|
|
5690
5701
|
return /* @__PURE__ */ r.jsxs("div", { className: "ogx-toolbar__agg-row", children: [
|
|
5691
5702
|
/* @__PURE__ */ r.jsx("span", { className: "ogx-toolbar__agg-label", title: v.field, children: v.headerName || v.field }),
|
|
5692
|
-
/* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__agg-pills", children:
|
|
5703
|
+
/* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__agg-pills", children: ti.map((S) => /* @__PURE__ */ r.jsx(
|
|
5693
5704
|
"button",
|
|
5694
5705
|
{
|
|
5695
5706
|
className: `ogx-toolbar__pill${b === S ? " ogx-toolbar__pill--active" : ""}`,
|
|
@@ -5706,7 +5717,7 @@ function ti({
|
|
|
5706
5717
|
);
|
|
5707
5718
|
return Ge.createPortal(m, g);
|
|
5708
5719
|
}
|
|
5709
|
-
function
|
|
5720
|
+
function ri({
|
|
5710
5721
|
anchorRef: n,
|
|
5711
5722
|
columns: t,
|
|
5712
5723
|
visibleColumns: e,
|
|
@@ -5717,7 +5728,7 @@ function ni({
|
|
|
5717
5728
|
onColumnOrderReset: s,
|
|
5718
5729
|
onClose: c
|
|
5719
5730
|
}) {
|
|
5720
|
-
const d = J(null), [g, x] =
|
|
5731
|
+
const d = J(null), [g, x] = Z({ top: 0, right: 0 }), [h, m] = Z(document.body);
|
|
5721
5732
|
Ee(() => {
|
|
5722
5733
|
m(n.current?.closest(".ogx-theme-provider") ?? document.body);
|
|
5723
5734
|
}, [n]);
|
|
@@ -5750,7 +5761,7 @@ function ni({
|
|
|
5750
5761
|
"aria-label": "Column visibility",
|
|
5751
5762
|
style: { top: g.top, right: g.right, width: 280, padding: 0 },
|
|
5752
5763
|
children: /* @__PURE__ */ r.jsx(
|
|
5753
|
-
|
|
5764
|
+
Hn,
|
|
5754
5765
|
{
|
|
5755
5766
|
columns: t,
|
|
5756
5767
|
visibleColumns: e,
|
|
@@ -5765,18 +5776,18 @@ function ni({
|
|
|
5765
5776
|
);
|
|
5766
5777
|
return Ge.createPortal(b, h);
|
|
5767
5778
|
}
|
|
5768
|
-
function
|
|
5779
|
+
function ii({
|
|
5769
5780
|
anchorRef: n,
|
|
5770
5781
|
columns: t,
|
|
5771
5782
|
filterModel: e,
|
|
5772
5783
|
onFilterModelChange: o,
|
|
5773
5784
|
onClose: i
|
|
5774
5785
|
}) {
|
|
5775
|
-
const l = J(null), [a, s] =
|
|
5786
|
+
const l = J(null), [a, s] = Z({ top: 0, right: 0 }), c = J(i);
|
|
5776
5787
|
Ee(() => {
|
|
5777
5788
|
c.current = i;
|
|
5778
5789
|
}, [i]);
|
|
5779
|
-
const [d, g] =
|
|
5790
|
+
const [d, g] = Z(document.body);
|
|
5780
5791
|
Ee(() => {
|
|
5781
5792
|
g(n.current?.closest(".ogx-theme-provider") ?? document.body);
|
|
5782
5793
|
}, [n]);
|
|
@@ -5813,7 +5824,7 @@ function oi({
|
|
|
5813
5824
|
children: [
|
|
5814
5825
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx-toolbar__panel-header", children: [
|
|
5815
5826
|
/* @__PURE__ */ r.jsxs("span", { className: "ogx-toolbar__panel-title", children: [
|
|
5816
|
-
/* @__PURE__ */ r.jsx(
|
|
5827
|
+
/* @__PURE__ */ r.jsx(Un, {}),
|
|
5817
5828
|
"Filters",
|
|
5818
5829
|
h > 0 && /* @__PURE__ */ r.jsx("span", { className: "ogx-toolbar__panel-count", children: h })
|
|
5819
5830
|
] }),
|
|
@@ -5840,7 +5851,7 @@ function oi({
|
|
|
5840
5851
|
] })
|
|
5841
5852
|
] }),
|
|
5842
5853
|
/* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__panel-body ogx-toolbar__panel-body--filter", children: /* @__PURE__ */ r.jsx(
|
|
5843
|
-
|
|
5854
|
+
qr,
|
|
5844
5855
|
{
|
|
5845
5856
|
columns: t,
|
|
5846
5857
|
filterModel: e,
|
|
@@ -5852,8 +5863,8 @@ function oi({
|
|
|
5852
5863
|
);
|
|
5853
5864
|
return Ge.createPortal(v, d);
|
|
5854
5865
|
}
|
|
5855
|
-
const
|
|
5856
|
-
function
|
|
5866
|
+
const li = { rowFields: [], columnFields: [], valueFields: [] };
|
|
5867
|
+
function _i({
|
|
5857
5868
|
columns: n = [],
|
|
5858
5869
|
baseColumns: t,
|
|
5859
5870
|
aggregationModel: e = {},
|
|
@@ -5872,11 +5883,11 @@ function vi({
|
|
|
5872
5883
|
rightContent: b,
|
|
5873
5884
|
style: S
|
|
5874
5885
|
}) {
|
|
5875
|
-
const [N, f] =
|
|
5886
|
+
const [N, f] = Z(!1), [k, y] = Z(!1), [w, u] = Z(!1), [p, j] = Z(!1);
|
|
5876
5887
|
re(() => {
|
|
5877
5888
|
h && (u(!0), f(!1), y(!1), j(!1));
|
|
5878
5889
|
}, [h]);
|
|
5879
|
-
const E = J(null), R = J(null), _ = J(null), M = J(null), T = i ??
|
|
5890
|
+
const E = J(null), R = J(null), _ = J(null), M = J(null), T = i ?? li, I = T.rowFields.length > 0 || T.columnFields.length > 0 || T.valueFields.length > 0, F = n.filter(
|
|
5880
5891
|
(G) => G.aggregable !== !1 && (G.type === "number" || G.aggregable === !0)
|
|
5881
5892
|
), H = Object.keys(e).filter(
|
|
5882
5893
|
(G) => e[G] && e[G] !== "none"
|
|
@@ -5899,11 +5910,11 @@ function vi({
|
|
|
5899
5910
|
s(P);
|
|
5900
5911
|
}, [a, s]), K = a?.quickFilterValues?.[0] || "", C = a?.items?.length || 0, B = new Set(
|
|
5901
5912
|
n.filter((G) => c[G.field] !== !1).map((G) => G.field)
|
|
5902
|
-
),
|
|
5913
|
+
), W = z((G, D) => {
|
|
5903
5914
|
if (!d) return;
|
|
5904
5915
|
const P = { ...c, [G]: D };
|
|
5905
5916
|
d(P);
|
|
5906
|
-
}, [c, d]),
|
|
5917
|
+
}, [c, d]), O = z(() => {
|
|
5907
5918
|
if (!d) return;
|
|
5908
5919
|
const G = { ...c };
|
|
5909
5920
|
n.forEach((D) => {
|
|
@@ -5921,7 +5932,7 @@ function vi({
|
|
|
5921
5932
|
/* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__spacer" }),
|
|
5922
5933
|
/* @__PURE__ */ r.jsxs("div", { className: "ogx-toolbar__actions", children: [
|
|
5923
5934
|
s && /* @__PURE__ */ r.jsx("div", { className: "ogx-toolbar__dropdown-wrapper", style: { marginRight: 4 }, children: /* @__PURE__ */ r.jsx(
|
|
5924
|
-
|
|
5935
|
+
ei,
|
|
5925
5936
|
{
|
|
5926
5937
|
value: K,
|
|
5927
5938
|
onChange: q,
|
|
@@ -5938,17 +5949,17 @@ function vi({
|
|
|
5938
5949
|
onClick: () => {
|
|
5939
5950
|
u(!w), f(!1), y(!1), j(!1);
|
|
5940
5951
|
},
|
|
5941
|
-
children: /* @__PURE__ */ r.jsx(
|
|
5952
|
+
children: /* @__PURE__ */ r.jsx(ni, {})
|
|
5942
5953
|
}
|
|
5943
5954
|
) }),
|
|
5944
5955
|
w && /* @__PURE__ */ r.jsx(
|
|
5945
|
-
|
|
5956
|
+
ri,
|
|
5946
5957
|
{
|
|
5947
5958
|
anchorRef: _,
|
|
5948
5959
|
columns: n,
|
|
5949
5960
|
visibleColumns: B,
|
|
5950
|
-
onVisibilityChange:
|
|
5951
|
-
onShowAll:
|
|
5961
|
+
onVisibilityChange: W,
|
|
5962
|
+
onShowAll: O,
|
|
5952
5963
|
onHideAll: V,
|
|
5953
5964
|
onColumnReorder: g,
|
|
5954
5965
|
onColumnOrderReset: x,
|
|
@@ -5969,13 +5980,13 @@ function vi({
|
|
|
5969
5980
|
j(!p), f(!1), y(!1), u(!1);
|
|
5970
5981
|
},
|
|
5971
5982
|
children: [
|
|
5972
|
-
/* @__PURE__ */ r.jsx(
|
|
5983
|
+
/* @__PURE__ */ r.jsx(Un, {}),
|
|
5973
5984
|
C > 0 && /* @__PURE__ */ r.jsx("span", { className: "ogx-toolbar__dot", "aria-label": "Filters active" })
|
|
5974
5985
|
]
|
|
5975
5986
|
}
|
|
5976
5987
|
) }),
|
|
5977
5988
|
p && /* @__PURE__ */ r.jsx(
|
|
5978
|
-
|
|
5989
|
+
ii,
|
|
5979
5990
|
{
|
|
5980
5991
|
anchorRef: M,
|
|
5981
5992
|
columns: n,
|
|
@@ -5999,13 +6010,13 @@ function vi({
|
|
|
5999
6010
|
y(!k), f(!1), u(!1), j(!1);
|
|
6000
6011
|
},
|
|
6001
6012
|
children: [
|
|
6002
|
-
/* @__PURE__ */ r.jsx(
|
|
6013
|
+
/* @__PURE__ */ r.jsx(Gn, {}),
|
|
6003
6014
|
I && /* @__PURE__ */ r.jsx("span", { className: "ogx-toolbar__dot", "aria-label": "Pivot active" })
|
|
6004
6015
|
]
|
|
6005
6016
|
}
|
|
6006
6017
|
) }),
|
|
6007
6018
|
k && /* @__PURE__ */ r.jsx(
|
|
6008
|
-
|
|
6019
|
+
Jr,
|
|
6009
6020
|
{
|
|
6010
6021
|
anchorRef: R,
|
|
6011
6022
|
columns: t ?? n,
|
|
@@ -6031,13 +6042,13 @@ function vi({
|
|
|
6031
6042
|
f(!N), y(!1), u(!1), j(!1);
|
|
6032
6043
|
},
|
|
6033
6044
|
children: [
|
|
6034
|
-
/* @__PURE__ */ r.jsx(
|
|
6045
|
+
/* @__PURE__ */ r.jsx(Vn, {}),
|
|
6035
6046
|
H > 0 && /* @__PURE__ */ r.jsx("span", { className: "ogx-toolbar__dot", "aria-label": `${H} active summaries` })
|
|
6036
6047
|
]
|
|
6037
6048
|
}
|
|
6038
6049
|
) }),
|
|
6039
6050
|
N && /* @__PURE__ */ r.jsx(
|
|
6040
|
-
|
|
6051
|
+
oi,
|
|
6041
6052
|
{
|
|
6042
6053
|
anchorRef: E,
|
|
6043
6054
|
aggregationModel: e,
|
|
@@ -6053,10 +6064,10 @@ function vi({
|
|
|
6053
6064
|
] })
|
|
6054
6065
|
] });
|
|
6055
6066
|
}
|
|
6056
|
-
function
|
|
6067
|
+
function yi() {
|
|
6057
6068
|
return J(null);
|
|
6058
6069
|
}
|
|
6059
|
-
const
|
|
6070
|
+
const Ci = ({
|
|
6060
6071
|
fullWidth: n = !1,
|
|
6061
6072
|
error: t = !1,
|
|
6062
6073
|
startAdornment: e,
|
|
@@ -6083,7 +6094,7 @@ const _i = ({
|
|
|
6083
6094
|
o && /* @__PURE__ */ r.jsx("div", { className: "ogx-input__adornment ogx-input__adornment--end", children: o })
|
|
6084
6095
|
] });
|
|
6085
6096
|
};
|
|
6086
|
-
function
|
|
6097
|
+
function ki(n, t, e = {}) {
|
|
6087
6098
|
const {
|
|
6088
6099
|
fileName: o = "export.csv",
|
|
6089
6100
|
includeHeaders: i = !0,
|
|
@@ -6097,39 +6108,39 @@ function yi(n, t, e = {}) {
|
|
|
6097
6108
|
const c = t.filter((g) => !(g.exportable === !1 || g.field === "__check__" || g.field === "__actions__"));
|
|
6098
6109
|
let d = "";
|
|
6099
6110
|
if (i) {
|
|
6100
|
-
const g = c.map((x) =>
|
|
6111
|
+
const g = c.map((x) => dt(x.headerName || x.field));
|
|
6101
6112
|
d += g.join(l) + `
|
|
6102
6113
|
`;
|
|
6103
6114
|
}
|
|
6104
6115
|
if (s.forEach((g) => {
|
|
6105
6116
|
const x = c.map((h) => {
|
|
6106
6117
|
let m = g[h.field];
|
|
6107
|
-
return h.valueGetter && (m = h.valueGetter({ row: g, field: h.field, value: m })), h.valueFormatter && m !== void 0 && m !== null && (m = h.valueFormatter({ value: m, row: g, field: h.field })),
|
|
6118
|
+
return h.valueGetter && (m = h.valueGetter({ row: g, field: h.field, value: m })), h.valueFormatter && m !== void 0 && m !== null && (m = h.valueFormatter({ value: m, row: g, field: h.field })), dt(String(m ?? ""));
|
|
6108
6119
|
});
|
|
6109
6120
|
d += x.join(l) + `
|
|
6110
6121
|
`;
|
|
6111
6122
|
}), e.aggregationResult) {
|
|
6112
|
-
const g = e.aggregationResult, x = e.aggregationModel || {}, h = c.map((v) => x[v.field] ?
|
|
6123
|
+
const g = e.aggregationResult, x = e.aggregationModel || {}, h = c.map((v) => x[v.field] ? dt(x[v.field].toUpperCase()) : dt(""));
|
|
6113
6124
|
d += h.join(l) + `
|
|
6114
6125
|
`;
|
|
6115
6126
|
const m = c.map((v) => {
|
|
6116
6127
|
const b = g[v.field];
|
|
6117
6128
|
if (b != null) {
|
|
6118
6129
|
let S = b;
|
|
6119
|
-
return v.valueFormatter ? S = v.valueFormatter({ value: b, row: {}, field: v.field }) : x[v.field] && (S = He(b, x[v.field])),
|
|
6130
|
+
return v.valueFormatter ? S = v.valueFormatter({ value: b, row: {}, field: v.field }) : x[v.field] && (S = He(b, x[v.field])), dt(String(S));
|
|
6120
6131
|
}
|
|
6121
|
-
return
|
|
6132
|
+
return dt("");
|
|
6122
6133
|
});
|
|
6123
6134
|
d += m.join(l) + `
|
|
6124
6135
|
`;
|
|
6125
6136
|
}
|
|
6126
6137
|
fn(d, o, "text/csv;charset=utf-8;");
|
|
6127
6138
|
}
|
|
6128
|
-
function
|
|
6139
|
+
function dt(n) {
|
|
6129
6140
|
return n.includes(",") || n.includes('"') || n.includes(`
|
|
6130
6141
|
`) ? `"${n.replace(/"/g, '""')}"` : n;
|
|
6131
6142
|
}
|
|
6132
|
-
function
|
|
6143
|
+
function Si(n, t, e = {}) {
|
|
6133
6144
|
const {
|
|
6134
6145
|
fileName: o = "export.xls",
|
|
6135
6146
|
sheetName: i = "Sheet1",
|
|
@@ -6143,31 +6154,31 @@ function Ci(n, t, e = {}) {
|
|
|
6143
6154
|
const c = t.filter((g) => !(g.exportable === !1 || g.field === "__check__" || g.field === "__actions__"));
|
|
6144
6155
|
let d = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">';
|
|
6145
6156
|
if (d += "<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>", d += `<x:Name>${i}</x:Name>`, d += "<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->", d += '<meta charset="UTF-8"></head><body>', d += '<table border="1">', l && (d += "<thead><tr>", c.forEach((g) => {
|
|
6146
|
-
d += `<th>${
|
|
6157
|
+
d += `<th>${We(g.headerName || g.field)}</th>`;
|
|
6147
6158
|
}), d += "</tr></thead>"), d += "<tbody>", s.forEach((g) => {
|
|
6148
6159
|
d += "<tr>", c.forEach((x) => {
|
|
6149
6160
|
let h = g[x.field];
|
|
6150
|
-
x.valueGetter && (h = x.valueGetter({ row: g, field: x.field, value: h })), x.valueFormatter && h !== void 0 && h !== null && (h = x.valueFormatter({ value: h, row: g, field: x.field })), d += `<td>${
|
|
6161
|
+
x.valueGetter && (h = x.valueGetter({ row: g, field: x.field, value: h })), x.valueFormatter && h !== void 0 && h !== null && (h = x.valueFormatter({ value: h, row: g, field: x.field })), d += `<td>${We(String(h ?? ""))}</td>`;
|
|
6151
6162
|
});
|
|
6152
6163
|
}), e.aggregationResult) {
|
|
6153
6164
|
const g = e.aggregationResult, x = e.aggregationModel || {};
|
|
6154
6165
|
d += '<tr style="font-size: 11px; color: #666; background-color: #f5f5f5;">', c.forEach((h) => {
|
|
6155
|
-
x[h.field] ? d += `<td style="text-align: right; font-weight: bold;">${
|
|
6166
|
+
x[h.field] ? d += `<td style="text-align: right; font-weight: bold;">${We(x[h.field].toUpperCase())}</td>` : d += "<td></td>";
|
|
6156
6167
|
}), d += "</tr>", d += '<tr style="font-weight: bold; background-color: #f5f5f5;">', c.forEach((h) => {
|
|
6157
6168
|
const m = g[h.field];
|
|
6158
6169
|
if (m != null) {
|
|
6159
6170
|
let v = m;
|
|
6160
|
-
h.valueFormatter ? v = h.valueFormatter({ value: m, row: {}, field: h.field }) : x[h.field] && (v = He(m, x[h.field])), d += `<td style="text-align: right;">${
|
|
6171
|
+
h.valueFormatter ? v = h.valueFormatter({ value: m, row: {}, field: h.field }) : x[h.field] && (v = He(m, x[h.field])), d += `<td style="text-align: right;">${We(String(v))}</td>`;
|
|
6161
6172
|
} else
|
|
6162
6173
|
d += "<td></td>";
|
|
6163
6174
|
}), d += "</tr>";
|
|
6164
6175
|
}
|
|
6165
6176
|
d += "</tbody></table></body></html>", fn(d, o, "application/vnd.ms-excel");
|
|
6166
6177
|
}
|
|
6167
|
-
function
|
|
6178
|
+
function We(n) {
|
|
6168
6179
|
return n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
6169
6180
|
}
|
|
6170
|
-
function
|
|
6181
|
+
function ji(n, t, e = {}) {
|
|
6171
6182
|
const {
|
|
6172
6183
|
fileName: o = "export.json",
|
|
6173
6184
|
pretty: i = !0,
|
|
@@ -6207,7 +6218,7 @@ function ki(n, t, e = {}) {
|
|
|
6207
6218
|
const g = i ? JSON.stringify(d, null, 2) : JSON.stringify(d);
|
|
6208
6219
|
fn(g, o, "application/json;charset=utf-8;");
|
|
6209
6220
|
}
|
|
6210
|
-
async function
|
|
6221
|
+
async function Ri(n, t, e) {
|
|
6211
6222
|
const o = window.open("", "_blank");
|
|
6212
6223
|
if (!o) {
|
|
6213
6224
|
console.error("Failed to open print window. Please check your popup blocker settings.");
|
|
@@ -6263,22 +6274,22 @@ async function Si(n, t, e) {
|
|
|
6263
6274
|
</head>
|
|
6264
6275
|
<body>
|
|
6265
6276
|
`;
|
|
6266
|
-
if (i && (g += `<h1>${
|
|
6267
|
-
g += `<th>${
|
|
6277
|
+
if (i && (g += `<h1>${We(i)}</h1>`), g += "<table>", g += "<thead><tr>", d.forEach((h) => {
|
|
6278
|
+
g += `<th>${We(h.headerName || h.field)}</th>`;
|
|
6268
6279
|
}), g += "</tr></thead>", g += "<tbody>", c.forEach((h) => {
|
|
6269
6280
|
g += "<tr>", d.forEach((m) => {
|
|
6270
6281
|
let v = h[m.field];
|
|
6271
|
-
m.valueGetter && (v = m.valueGetter({ row: h, field: m.field, value: v })), m.valueFormatter && v !== void 0 && v !== null && (v = m.valueFormatter({ value: v, row: h, field: m.field })), m.type === "image" && v ? g += `<td><div style="display:flex;justify-content:center;"><img src="${v}" alt="${m.headerName}" style="max-height: 40px; border-radius: 4px;"></div></td>` : g += `<td>${
|
|
6282
|
+
m.valueGetter && (v = m.valueGetter({ row: h, field: m.field, value: v })), m.valueFormatter && v !== void 0 && v !== null && (v = m.valueFormatter({ value: v, row: h, field: m.field })), m.type === "image" && v ? g += `<td><div style="display:flex;justify-content:center;"><img src="${v}" alt="${m.headerName}" style="max-height: 40px; border-radius: 4px;"></div></td>` : g += `<td>${We(String(v ?? ""))}</td>`;
|
|
6272
6283
|
}), g += "</tr>";
|
|
6273
6284
|
}), a) {
|
|
6274
6285
|
const h = s || {};
|
|
6275
6286
|
g += '<tfoot><tr style="font-size: 11px; color: #666; background-color: #f5f5f5;">', d.forEach((m) => {
|
|
6276
|
-
h[m.field] ? g += `<td style="text-align: right; font-weight: bold;">${
|
|
6287
|
+
h[m.field] ? g += `<td style="text-align: right; font-weight: bold;">${We(h[m.field].toUpperCase())}</td>` : g += "<td></td>";
|
|
6277
6288
|
}), g += '</tr><tr style="font-weight: bold; background-color: #f5f5f5;">', d.forEach((m) => {
|
|
6278
6289
|
const v = a[m.field];
|
|
6279
6290
|
if (v != null) {
|
|
6280
6291
|
let b = v;
|
|
6281
|
-
m.valueFormatter ? b = m.valueFormatter({ value: v, row: {}, field: m.field }) : h[m.field] && (b = He(v, h[m.field])), g += `<td style="text-align: right;">${
|
|
6292
|
+
m.valueFormatter ? b = m.valueFormatter({ value: v, row: {}, field: m.field }) : h[m.field] && (b = He(v, h[m.field])), g += `<td style="text-align: right;">${We(String(b))}</td>`;
|
|
6282
6293
|
} else
|
|
6283
6294
|
g += "<td></td>";
|
|
6284
6295
|
}), g += "</tr></tfoot>";
|
|
@@ -6305,26 +6316,26 @@ function fn(n, t, e) {
|
|
|
6305
6316
|
const o = new Blob([n], { type: e }), i = URL.createObjectURL(o), l = document.createElement("a");
|
|
6306
6317
|
l.href = i, l.download = t, document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
6307
6318
|
}
|
|
6308
|
-
function
|
|
6319
|
+
function si(n, t) {
|
|
6309
6320
|
return n.type === "number" ? "number" : n.type === "boolean" ? "boolean" : n.type === "date" ? "date" : typeof t == "number" ? "number" : typeof t == "boolean" ? "boolean" : t instanceof Date ? "date" : "string";
|
|
6310
6321
|
}
|
|
6311
|
-
function
|
|
6322
|
+
function ai(n) {
|
|
6312
6323
|
if (n.type === "number") return "#,##0.##";
|
|
6313
6324
|
if (n.type === "date") return "yyyy-mm-dd";
|
|
6314
6325
|
}
|
|
6315
|
-
function
|
|
6326
|
+
function di(n, t) {
|
|
6316
6327
|
if (t != null) return t;
|
|
6317
6328
|
const e = n.width ?? 120;
|
|
6318
6329
|
return Math.min(60, Math.max(8, (e - 5) / 7));
|
|
6319
6330
|
}
|
|
6320
|
-
function
|
|
6331
|
+
function ci(n, t) {
|
|
6321
6332
|
const e = t ?? "";
|
|
6322
6333
|
if (e.includes("jpeg") || e.includes("jpg")) return "jpeg";
|
|
6323
6334
|
if (e.includes("gif")) return "gif";
|
|
6324
6335
|
const o = n.split("?")[0].toLowerCase();
|
|
6325
6336
|
return o.endsWith(".jpg") || o.endsWith(".jpeg") ? "jpeg" : o.endsWith(".gif") ? "gif" : "png";
|
|
6326
6337
|
}
|
|
6327
|
-
async function
|
|
6338
|
+
async function ui(n) {
|
|
6328
6339
|
const t = await Promise.allSettled(
|
|
6329
6340
|
n.map(async (o) => {
|
|
6330
6341
|
if (o.startsWith("data:")) {
|
|
@@ -6336,7 +6347,7 @@ async function di(n) {
|
|
|
6336
6347
|
}
|
|
6337
6348
|
const i = await fetch(o, { mode: "cors" });
|
|
6338
6349
|
if (!i.ok) throw new Error(`HTTP ${i.status}`);
|
|
6339
|
-
const l = await i.arrayBuffer(), a =
|
|
6350
|
+
const l = await i.arrayBuffer(), a = ci(o, i.headers.get("content-type"));
|
|
6340
6351
|
return { url: o, buffer: l, ext: a };
|
|
6341
6352
|
})
|
|
6342
6353
|
), e = /* @__PURE__ */ new Map();
|
|
@@ -6347,7 +6358,7 @@ async function di(n) {
|
|
|
6347
6358
|
);
|
|
6348
6359
|
}), e;
|
|
6349
6360
|
}
|
|
6350
|
-
async function
|
|
6361
|
+
async function Ei(n, t, e = {}) {
|
|
6351
6362
|
const {
|
|
6352
6363
|
fileName: o = "export.xlsx",
|
|
6353
6364
|
sheets: i,
|
|
@@ -6368,14 +6379,14 @@ async function ji(n, t, e = {}) {
|
|
|
6368
6379
|
if ("type" in j && j.type === "summary") {
|
|
6369
6380
|
if (!g || !x) continue;
|
|
6370
6381
|
const C = v.addWorksheet(j.name ?? "Summary");
|
|
6371
|
-
C.addRow(["Summary / Aggregation Totals"]), C.getRow(1).font = { bold: !0, size: c + 2, color: { argb: ze(s) } }, C.addRow([]), C.addRow(["Column", "Function", "Value"]).eachCell((
|
|
6372
|
-
|
|
6373
|
-
}), b.forEach((
|
|
6374
|
-
const
|
|
6375
|
-
if (
|
|
6382
|
+
C.addRow(["Summary / Aggregation Totals"]), C.getRow(1).font = { bold: !0, size: c + 2, color: { argb: ze(s) } }, C.addRow([]), C.addRow(["Column", "Function", "Value"]).eachCell((W) => {
|
|
6383
|
+
W.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, W.font = { bold: !0, size: c, color: { argb: ze(s) } }, W.border = Fn();
|
|
6384
|
+
}), b.forEach((W) => {
|
|
6385
|
+
const O = x[W.field], V = g[W.field];
|
|
6386
|
+
if (O == null || V == null) return;
|
|
6376
6387
|
let G = V;
|
|
6377
|
-
|
|
6378
|
-
const D = C.addRow([
|
|
6388
|
+
W.valueFormatter ? G = W.valueFormatter({ value: V, row: {}, field: W.field }) : G = He(V, O);
|
|
6389
|
+
const D = C.addRow([W.headerName ?? W.field, O.toUpperCase(), G]);
|
|
6379
6390
|
D.getCell(3).alignment = { horizontal: "right" }, D.getCell(3).font = { bold: !0, size: d };
|
|
6380
6391
|
}), C.getColumn(1).width = 20, C.getColumn(2).width = 12, C.getColumn(3).width = 18;
|
|
6381
6392
|
continue;
|
|
@@ -6391,34 +6402,34 @@ async function ji(n, t, e = {}) {
|
|
|
6391
6402
|
} = E, L = _ === "selected" ? N : S, U = b.filter((C) => l[C.field]?.embedImage);
|
|
6392
6403
|
if (U.length > 0) {
|
|
6393
6404
|
const C = [], B = /* @__PURE__ */ new Set();
|
|
6394
|
-
if (L.forEach((
|
|
6395
|
-
U.forEach((
|
|
6396
|
-
const V = O
|
|
6405
|
+
if (L.forEach((W) => {
|
|
6406
|
+
U.forEach((O) => {
|
|
6407
|
+
const V = W[O.field];
|
|
6397
6408
|
typeof V == "string" && V && !k.has(V) && !B.has(V) && (C.push(V), B.add(V));
|
|
6398
6409
|
});
|
|
6399
6410
|
}), C.length > 0) {
|
|
6400
|
-
const
|
|
6401
|
-
for (const [
|
|
6411
|
+
const W = await ui(C);
|
|
6412
|
+
for (const [O, { buffer: V, extension: G }] of W) {
|
|
6402
6413
|
const D = v.addImage({ buffer: V, extension: G });
|
|
6403
|
-
k.set(
|
|
6414
|
+
k.set(O, D);
|
|
6404
6415
|
}
|
|
6405
6416
|
}
|
|
6406
6417
|
}
|
|
6407
6418
|
const q = v.addWorksheet(R);
|
|
6408
6419
|
if (q.columns = b.map((C) => ({
|
|
6409
6420
|
key: C.field,
|
|
6410
|
-
width:
|
|
6421
|
+
width: di(C, l[C.field]?.width),
|
|
6411
6422
|
style: {
|
|
6412
|
-
numFmt: l[C.field]?.numFmt ??
|
|
6423
|
+
numFmt: l[C.field]?.numFmt ?? ai(C)
|
|
6413
6424
|
}
|
|
6414
6425
|
})), M) {
|
|
6415
|
-
const C = b.map((
|
|
6416
|
-
B.height = 20, B.eachCell((
|
|
6417
|
-
const V = b[
|
|
6418
|
-
|
|
6426
|
+
const C = b.map((W) => W.headerName ?? W.field), B = q.addRow(C);
|
|
6427
|
+
B.height = 20, B.eachCell((W, O) => {
|
|
6428
|
+
const V = b[O - 1];
|
|
6429
|
+
W.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, W.font = { bold: !0, size: c, color: { argb: ze(s) } }, W.alignment = {
|
|
6419
6430
|
horizontal: l[V?.field]?.alignment ?? (V?.type === "number" ? "right" : "left"),
|
|
6420
6431
|
vertical: "middle"
|
|
6421
|
-
},
|
|
6432
|
+
}, W.border = Fn();
|
|
6422
6433
|
}), I && (q.autoFilter = {
|
|
6423
6434
|
from: { row: 1, column: 1 },
|
|
6424
6435
|
to: { row: 1, column: b.length }
|
|
@@ -6426,31 +6437,31 @@ async function ji(n, t, e = {}) {
|
|
|
6426
6437
|
}
|
|
6427
6438
|
let K = M ? 1 : 0;
|
|
6428
6439
|
if (L.forEach((C, B) => {
|
|
6429
|
-
const
|
|
6440
|
+
const W = b.map((V) => {
|
|
6430
6441
|
if (l[V.field]?.embedImage) return "";
|
|
6431
6442
|
let G = C[V.field];
|
|
6432
|
-
return V.valueGetter && (G = V.valueGetter({ row: C, field: V.field, value: G })),
|
|
6433
|
-
}),
|
|
6434
|
-
if (
|
|
6443
|
+
return V.valueGetter && (G = V.valueGetter({ row: C, field: V.field, value: G })), si(V, G) === "string" && V.valueFormatter && G != null && (G = V.valueFormatter({ value: G, row: C, field: V.field })), G;
|
|
6444
|
+
}), O = q.addRow(W);
|
|
6445
|
+
if (O.font = { size: d }, H && B % 2 === 1 && O.eachCell((V) => {
|
|
6435
6446
|
V.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(H) } };
|
|
6436
|
-
}),
|
|
6447
|
+
}), O.eachCell((V, G) => {
|
|
6437
6448
|
const D = b[G - 1];
|
|
6438
6449
|
D && (V.alignment = {
|
|
6439
6450
|
horizontal: l[D.field]?.alignment ?? (D.type === "number" ? "right" : "left"),
|
|
6440
6451
|
vertical: "middle"
|
|
6441
6452
|
}, V.border = { bottom: { style: "thin", color: { argb: "FFf1f5f9" } } });
|
|
6442
6453
|
}), U.length > 0) {
|
|
6443
|
-
const V = U.reduce((P,
|
|
6444
|
-
|
|
6445
|
-
const
|
|
6446
|
-
if (
|
|
6447
|
-
|
|
6454
|
+
const V = U.reduce((P, ne) => Math.max(P, l[ne.field]?.imageHeight ?? 40), 0), G = Math.ceil(V / 1.333), D = G * 1.333;
|
|
6455
|
+
O.height = G, U.forEach((P) => {
|
|
6456
|
+
const ne = b.indexOf(P), te = C[P.field], ee = typeof te == "string" ? k.get(te) : void 0;
|
|
6457
|
+
if (ee === void 0) {
|
|
6458
|
+
O.getCell(ne + 1).value = typeof te == "string" ? te : "";
|
|
6448
6459
|
return;
|
|
6449
6460
|
}
|
|
6450
|
-
const pe = l[P.field], $ = pe?.imageWidth ?? 40, ge = pe?.imageHeight ?? 40,
|
|
6451
|
-
q.addImage(
|
|
6461
|
+
const pe = l[P.field], $ = pe?.imageWidth ?? 40, ge = pe?.imageHeight ?? 40, be = (q.getColumn(ne + 1).width ?? 8) * 7 + 5, ce = Math.max(0, be - $) / 2, A = Math.max(0, D - ge) / 2;
|
|
6462
|
+
q.addImage(ee, {
|
|
6452
6463
|
tl: {
|
|
6453
|
-
col:
|
|
6464
|
+
col: ne,
|
|
6454
6465
|
row: K,
|
|
6455
6466
|
nativeColOff: Math.floor(ce * 9525),
|
|
6456
6467
|
nativeRowOff: Math.floor(A * 9525)
|
|
@@ -6460,7 +6471,7 @@ async function ji(n, t, e = {}) {
|
|
|
6460
6471
|
});
|
|
6461
6472
|
});
|
|
6462
6473
|
} else
|
|
6463
|
-
|
|
6474
|
+
O.height = 16;
|
|
6464
6475
|
K++;
|
|
6465
6476
|
}), T && g && x) {
|
|
6466
6477
|
const C = b.map((V) => {
|
|
@@ -6470,12 +6481,12 @@ async function ji(n, t, e = {}) {
|
|
|
6470
6481
|
B.height = 16, B.font = { size: d - 1, italic: !0, color: { argb: "FF94a3b8" } }, B.eachCell((V) => {
|
|
6471
6482
|
V.alignment = { horizontal: "right", vertical: "middle" }, V.border = { top: { style: "thin", color: { argb: "FFcbd5e1" } } };
|
|
6472
6483
|
});
|
|
6473
|
-
const
|
|
6484
|
+
const W = b.map((V) => {
|
|
6474
6485
|
const G = x[V.field], D = g[V.field];
|
|
6475
6486
|
return G == null || D == null ? "" : V.valueFormatter ? V.valueFormatter({ value: D, row: {}, field: V.field }) : He(D, G);
|
|
6476
|
-
}),
|
|
6477
|
-
|
|
6478
|
-
V.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, V.alignment = { horizontal: "right", vertical: "middle" }, V.border =
|
|
6487
|
+
}), O = q.addRow(W);
|
|
6488
|
+
O.height = 18, O.font = { bold: !0, size: d, color: { argb: ze(s) } }, O.eachCell((V) => {
|
|
6489
|
+
V.fill = { type: "pattern", pattern: "solid", fgColor: { argb: ze(a) } }, V.alignment = { horizontal: "right", vertical: "middle" }, V.border = gi();
|
|
6479
6490
|
});
|
|
6480
6491
|
}
|
|
6481
6492
|
}
|
|
@@ -6488,13 +6499,13 @@ function ze(n) {
|
|
|
6488
6499
|
const t = n.replace("#", "");
|
|
6489
6500
|
return t.length === 3 ? "FF" + t.split("").map((e) => e + e).join("") : t.length === 6 ? "FF" + t : "FF" + t.padEnd(6, "0");
|
|
6490
6501
|
}
|
|
6491
|
-
function
|
|
6502
|
+
function Fn() {
|
|
6492
6503
|
return { bottom: { style: "medium", color: { argb: "FFcbd5e1" } } };
|
|
6493
6504
|
}
|
|
6494
|
-
function
|
|
6505
|
+
function gi() {
|
|
6495
6506
|
return { top: { style: "medium", color: { argb: "FFcbd5e1" } } };
|
|
6496
6507
|
}
|
|
6497
|
-
const
|
|
6508
|
+
const fi = {
|
|
6498
6509
|
"--ogx-color-primary": "#3b82f6",
|
|
6499
6510
|
"--ogx-color-primary-dark": "#2563eb",
|
|
6500
6511
|
"--ogx-color-primary-light": "#eff6ff",
|
|
@@ -6568,7 +6579,7 @@ const ui = {
|
|
|
6568
6579
|
"--ogx-skeleton-dark-base": "#e2e8f0",
|
|
6569
6580
|
"--ogx-skeleton-dark-highlight": "#f8fafc"
|
|
6570
6581
|
};
|
|
6571
|
-
function
|
|
6582
|
+
function hi(n) {
|
|
6572
6583
|
const t = {};
|
|
6573
6584
|
function e(o, i) {
|
|
6574
6585
|
i !== void 0 && (t[o] = i);
|
|
@@ -6619,13 +6630,13 @@ function gi(n) {
|
|
|
6619
6630
|
}
|
|
6620
6631
|
return t;
|
|
6621
6632
|
}
|
|
6622
|
-
function
|
|
6633
|
+
function Ni({
|
|
6623
6634
|
theme: n,
|
|
6624
6635
|
children: t,
|
|
6625
6636
|
className: e,
|
|
6626
6637
|
style: o
|
|
6627
6638
|
}) {
|
|
6628
|
-
const i =
|
|
6639
|
+
const i = ae.useMemo(() => ({ ...fi, ...hi(n) }), [n]);
|
|
6629
6640
|
return /* @__PURE__ */ r.jsx(
|
|
6630
6641
|
"div",
|
|
6631
6642
|
{
|
|
@@ -6635,7 +6646,7 @@ function Ri({
|
|
|
6635
6646
|
}
|
|
6636
6647
|
);
|
|
6637
6648
|
}
|
|
6638
|
-
const
|
|
6649
|
+
const Mi = {
|
|
6639
6650
|
colors: {
|
|
6640
6651
|
primary: "#60a5fa",
|
|
6641
6652
|
primaryDark: "#3b82f6",
|
|
@@ -6711,7 +6722,7 @@ const Ei = {
|
|
|
6711
6722
|
darkBaseColor: "#0f172a",
|
|
6712
6723
|
darkHighlightColor: "#1e293b"
|
|
6713
6724
|
}
|
|
6714
|
-
},
|
|
6725
|
+
}, Ii = {
|
|
6715
6726
|
colors: {
|
|
6716
6727
|
primary: "#e11d48",
|
|
6717
6728
|
primaryDark: "#be123c",
|
|
@@ -6727,7 +6738,7 @@ const Ei = {
|
|
|
6727
6738
|
rowSelectedHoverBackground: "#fecdd3",
|
|
6728
6739
|
cellFocusBorder: "#e11d48"
|
|
6729
6740
|
}
|
|
6730
|
-
},
|
|
6741
|
+
}, Pi = {
|
|
6731
6742
|
colors: {
|
|
6732
6743
|
primary: "#059669",
|
|
6733
6744
|
primaryDark: "#047857",
|
|
@@ -6743,7 +6754,7 @@ const Ei = {
|
|
|
6743
6754
|
rowSelectedHoverBackground: "#a7f3d0",
|
|
6744
6755
|
cellFocusBorder: "#059669"
|
|
6745
6756
|
}
|
|
6746
|
-
},
|
|
6757
|
+
}, Li = {
|
|
6747
6758
|
colors: {
|
|
6748
6759
|
primary: "#d97706",
|
|
6749
6760
|
primaryDark: "#b45309",
|
|
@@ -6759,7 +6770,7 @@ const Ei = {
|
|
|
6759
6770
|
rowSelectedHoverBackground: "#fde68a",
|
|
6760
6771
|
cellFocusBorder: "#d97706"
|
|
6761
6772
|
}
|
|
6762
|
-
},
|
|
6773
|
+
}, Ti = {
|
|
6763
6774
|
grid: {
|
|
6764
6775
|
rowHeightCompact: "28px",
|
|
6765
6776
|
rowHeightStandard: "36px",
|
|
@@ -6773,7 +6784,7 @@ const Ei = {
|
|
|
6773
6784
|
fontSizeMd: "0.875rem"
|
|
6774
6785
|
}
|
|
6775
6786
|
};
|
|
6776
|
-
function
|
|
6787
|
+
function pi(n, t) {
|
|
6777
6788
|
try {
|
|
6778
6789
|
const e = t.getItem(n);
|
|
6779
6790
|
return e ? JSON.parse(e) : void 0;
|
|
@@ -6781,7 +6792,7 @@ function fi(n, t) {
|
|
|
6781
6792
|
return;
|
|
6782
6793
|
}
|
|
6783
6794
|
}
|
|
6784
|
-
function
|
|
6795
|
+
function xi(n, t, e, o) {
|
|
6785
6796
|
try {
|
|
6786
6797
|
const i = e ? Object.fromEntries(
|
|
6787
6798
|
Object.entries(t).filter(([l]) => e.includes(l))
|
|
@@ -6790,17 +6801,17 @@ function hi(n, t, e, o) {
|
|
|
6790
6801
|
} catch {
|
|
6791
6802
|
}
|
|
6792
6803
|
}
|
|
6793
|
-
function
|
|
6804
|
+
function Wi(n) {
|
|
6794
6805
|
const t = typeof n == "string" ? { key: n } : n, {
|
|
6795
6806
|
key: e,
|
|
6796
6807
|
debounceMs: o = 300,
|
|
6797
6808
|
include: i,
|
|
6798
6809
|
storage: l = typeof window < "u" ? window.localStorage : void 0
|
|
6799
|
-
} = t, a =
|
|
6810
|
+
} = t, a = le(() => {
|
|
6800
6811
|
if (l)
|
|
6801
|
-
return
|
|
6812
|
+
return pi(e, l);
|
|
6802
6813
|
}, [e, l]), s = J(null), c = J(null), d = z(() => {
|
|
6803
|
-
c.current && l &&
|
|
6814
|
+
c.current && l && xi(e, c.current, i, l);
|
|
6804
6815
|
}, [e, i, l]), g = z(
|
|
6805
6816
|
(h) => {
|
|
6806
6817
|
c.current = h, s.current && clearTimeout(s.current), s.current = setTimeout(d, o);
|
|
@@ -6816,32 +6827,32 @@ function Li(n) {
|
|
|
6816
6827
|
return { initialState: a, onStateChange: g, clearState: x };
|
|
6817
6828
|
}
|
|
6818
6829
|
export {
|
|
6819
|
-
|
|
6820
|
-
|
|
6830
|
+
Wt as Button,
|
|
6831
|
+
zr as Cell,
|
|
6821
6832
|
At as Checkbox,
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6833
|
+
vi as DataGrid,
|
|
6834
|
+
Ni as DataGridThemeProvider,
|
|
6835
|
+
qr as FilterPanel,
|
|
6836
|
+
_i as GridToolbar,
|
|
6826
6837
|
Ft as GridTooltip,
|
|
6827
|
-
|
|
6828
|
-
|
|
6838
|
+
hr as Header,
|
|
6839
|
+
Ci as Input,
|
|
6829
6840
|
dn as Row,
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6841
|
+
bi as Skeleton,
|
|
6842
|
+
Li as amberTheme,
|
|
6843
|
+
Ti as compactTheme,
|
|
6844
|
+
Mi as darkTheme,
|
|
6845
|
+
Pi as emeraldTheme,
|
|
6846
|
+
ki as exportToCsv,
|
|
6847
|
+
Si as exportToExcel,
|
|
6848
|
+
Ei as exportToExcelAdvanced,
|
|
6849
|
+
ji as exportToJson,
|
|
6839
6850
|
He as formatAggregationValue,
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6851
|
+
Ri as printGrid,
|
|
6852
|
+
Ii as roseTheme,
|
|
6853
|
+
Xo as useAggregation,
|
|
6854
|
+
yi as useGridApiRef,
|
|
6855
|
+
Wi as useGridStateStorage,
|
|
6856
|
+
jr as usePivot
|
|
6846
6857
|
};
|
|
6847
6858
|
//# sourceMappingURL=opengridx.es.js.map
|