@geovi/the-datagrid 0.2.4 → 0.2.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/dist/grid/ReactDataGrid.d.ts.map +1 -1
- package/dist/grid/utils/columnSizing.d.ts +1 -0
- package/dist/grid/utils/columnSizing.d.ts.map +1 -1
- package/dist/index.cjs +14 -14
- package/dist/index.js +3609 -3609
- package/dist/toolbar/RDGToolbar.d.ts.map +1 -1
- package/dist/toolbar/controls.d.ts +2 -0
- package/dist/toolbar/controls.d.ts.map +1 -1
- package/dist/toolbar/labels.d.ts +2 -0
- package/dist/toolbar/labels.d.ts.map +1 -1
- package/dist/toolbar.css +1 -1
- package/dist/toolbar.js +277 -272
- package/package.json +1 -1
package/dist/toolbar.js
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import "./toolbar.css";
|
|
3
3
|
import * as ge from "react";
|
|
4
4
|
import me from "./index.js";
|
|
5
|
-
const Be = ge,
|
|
5
|
+
const Be = ge, f = Be.default ?? ge, be = f.Children, Ue = f.Component, B = f.Fragment, He = f.PureComponent, he = f.cloneElement, Q = f.createContext, l = f.createElement, $e = f.createRef, Xe = f.forwardRef, H = f.isValidElement, We = f.lazy, Ke = f.memo, Z = f.useCallback, Ee = f.useContext, Ye = f.useDebugValue, ze = f.useDeferredValue, N = f.useEffect, q = f.useId, Se = f.useImperativeHandle, qe = f.useInsertionEffect, ye = f.useLayoutEffect, w = f.useMemo, Je = f.useReducer, Qe = f.useRef, C = f.useState, Ze = f.use, et = f.version, tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
6
|
__proto__: null,
|
|
7
|
-
Children:
|
|
7
|
+
Children: be,
|
|
8
8
|
Component: Ue,
|
|
9
|
-
Fragment:
|
|
9
|
+
Fragment: B,
|
|
10
10
|
PureComponent: He,
|
|
11
|
-
cloneElement:
|
|
11
|
+
cloneElement: he,
|
|
12
12
|
createContext: Q,
|
|
13
|
-
createElement:
|
|
13
|
+
createElement: l,
|
|
14
14
|
createRef: $e,
|
|
15
|
-
default:
|
|
15
|
+
default: f,
|
|
16
16
|
forwardRef: Xe,
|
|
17
|
-
isValidElement:
|
|
17
|
+
isValidElement: H,
|
|
18
18
|
lazy: We,
|
|
19
19
|
memo: Ke,
|
|
20
20
|
use: Ze,
|
|
@@ -40,18 +40,18 @@ function ot(e) {
|
|
|
40
40
|
return o(), r.addEventListener("change", o), () => r.removeEventListener("change", o);
|
|
41
41
|
}, [e]), t;
|
|
42
42
|
}
|
|
43
|
-
let
|
|
43
|
+
let le = 0;
|
|
44
44
|
function nt(e) {
|
|
45
|
-
const [t] = C(() => (
|
|
45
|
+
const [t] = C(() => (le += 1, `${e}-${le}`));
|
|
46
46
|
return t;
|
|
47
47
|
}
|
|
48
48
|
const rt = typeof q == "function" ? (e) => `${e}-${q()}` : nt;
|
|
49
|
-
function
|
|
49
|
+
function j(e = "tdg") {
|
|
50
50
|
return rt(e);
|
|
51
51
|
}
|
|
52
52
|
function L(e) {
|
|
53
53
|
const { children: t, ...n } = e;
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ l(
|
|
55
55
|
"svg",
|
|
56
56
|
{
|
|
57
57
|
"aria-hidden": "true",
|
|
@@ -67,26 +67,26 @@ function L(e) {
|
|
|
67
67
|
t
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
}
|
|
73
|
-
function at(e) {
|
|
74
|
-
return /* @__PURE__ */ a(L, { ...e }, /* @__PURE__ */ a("path", { d: "M3 4h18l-7 8v8l-4-2v-6z" }));
|
|
70
|
+
function ae(e) {
|
|
71
|
+
return /* @__PURE__ */ l(L, { ...e }, /* @__PURE__ */ l("path", { d: "M12 3v12" }), /* @__PURE__ */ l("path", { d: "m7 10 5 5 5-5" }), /* @__PURE__ */ l("path", { d: "M4 21h16" }));
|
|
75
72
|
}
|
|
76
73
|
function lt(e) {
|
|
77
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ l(L, { ...e }, /* @__PURE__ */ l("path", { d: "M3 4h18l-7 8v8l-4-2v-6z" }));
|
|
75
|
+
}
|
|
76
|
+
function at(e) {
|
|
77
|
+
return /* @__PURE__ */ l(L, { ...e }, /* @__PURE__ */ l("path", { d: "M3 4h18l-7 8v8l-4-2v-6z" }), /* @__PURE__ */ l("path", { d: "m16 16 5 5" }), /* @__PURE__ */ l("path", { d: "m21 16-5 5" }));
|
|
78
78
|
}
|
|
79
79
|
function st(e) {
|
|
80
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ l(L, { ...e }, /* @__PURE__ */ l("path", { d: "M3 12a9 9 0 1 0 3-6.7" }), /* @__PURE__ */ l("path", { d: "M3 4v5h5" }));
|
|
81
81
|
}
|
|
82
82
|
function it(e) {
|
|
83
|
-
return /* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ l(L, { ...e }, /* @__PURE__ */ l("path", { d: "M4 7h10" }), /* @__PURE__ */ l("path", { d: "M18 7h2" }), /* @__PURE__ */ l("path", { d: "M14 5v4" }), /* @__PURE__ */ l("path", { d: "M4 17h2" }), /* @__PURE__ */ l("path", { d: "M10 17h10" }), /* @__PURE__ */ l("path", { d: "M10 15v4" }));
|
|
84
84
|
}
|
|
85
85
|
function ct(e) {
|
|
86
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ l(L, { ...e }, /* @__PURE__ */ l("rect", { x: "3", y: "5", width: "18", height: "14", rx: "1" }), /* @__PURE__ */ l("path", { d: "M9 5v14" }), /* @__PURE__ */ l("path", { d: "M15 5v14" }));
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return /* @__PURE__ */
|
|
88
|
+
function ve(e) {
|
|
89
|
+
return /* @__PURE__ */ l(L, { ...e }, /* @__PURE__ */ l("path", { d: "m6 9 6 6 6-6" }));
|
|
90
90
|
}
|
|
91
91
|
const _ = "default";
|
|
92
92
|
Q({
|
|
@@ -108,16 +108,16 @@ function dt(e) {
|
|
|
108
108
|
function I(e) {
|
|
109
109
|
return String(e.id ?? e.name ?? "");
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function xe(e, t) {
|
|
112
112
|
const n = /* @__PURE__ */ new Map();
|
|
113
113
|
for (const o of e) {
|
|
114
|
-
const
|
|
115
|
-
|
|
114
|
+
const a = I(o);
|
|
115
|
+
a && !n.has(a) && n.set(a, o);
|
|
116
116
|
}
|
|
117
117
|
const r = [];
|
|
118
118
|
for (const o of t) {
|
|
119
|
-
const
|
|
120
|
-
|
|
119
|
+
const a = n.get(o);
|
|
120
|
+
a && (r.push(a), n.delete(o));
|
|
121
121
|
}
|
|
122
122
|
return r.push(...n.values()), r;
|
|
123
123
|
}
|
|
@@ -168,101 +168,101 @@ function mt() {
|
|
|
168
168
|
if (se) return Y;
|
|
169
169
|
se = 1;
|
|
170
170
|
var e = Re;
|
|
171
|
-
function t(
|
|
172
|
-
return
|
|
171
|
+
function t(u, g) {
|
|
172
|
+
return u === g && (u !== 0 || 1 / u === 1 / g) || u !== u && g !== g;
|
|
173
173
|
}
|
|
174
|
-
var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect,
|
|
175
|
-
function i(
|
|
176
|
-
var
|
|
177
|
-
return
|
|
174
|
+
var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, a = e.useLayoutEffect, s = e.useDebugValue;
|
|
175
|
+
function i(u, g) {
|
|
176
|
+
var d = g(), m = r({ inst: { value: d, getSnapshot: g } }), b = m[0].inst, S = m[1];
|
|
177
|
+
return a(
|
|
178
178
|
function() {
|
|
179
|
-
|
|
179
|
+
b.value = d, b.getSnapshot = g, c(b) && S({ inst: b });
|
|
180
180
|
},
|
|
181
|
-
[
|
|
181
|
+
[u, d, g]
|
|
182
182
|
), o(
|
|
183
183
|
function() {
|
|
184
|
-
return
|
|
185
|
-
|
|
184
|
+
return c(b) && S({ inst: b }), u(function() {
|
|
185
|
+
c(b) && S({ inst: b });
|
|
186
186
|
});
|
|
187
187
|
},
|
|
188
|
-
[
|
|
189
|
-
), s(
|
|
188
|
+
[u]
|
|
189
|
+
), s(d), d;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
var
|
|
193
|
-
|
|
191
|
+
function c(u) {
|
|
192
|
+
var g = u.getSnapshot;
|
|
193
|
+
u = u.value;
|
|
194
194
|
try {
|
|
195
|
-
var
|
|
196
|
-
return !n(
|
|
195
|
+
var d = g();
|
|
196
|
+
return !n(u, d);
|
|
197
197
|
} catch {
|
|
198
198
|
return !0;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
return
|
|
201
|
+
function p(u, g) {
|
|
202
|
+
return g();
|
|
203
203
|
}
|
|
204
|
-
var
|
|
205
|
-
return Y.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore :
|
|
204
|
+
var h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? p : i;
|
|
205
|
+
return Y.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : h, Y;
|
|
206
206
|
}
|
|
207
207
|
var z = {};
|
|
208
208
|
var ie;
|
|
209
|
-
function
|
|
209
|
+
function bt() {
|
|
210
210
|
return ie || (ie = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
211
|
-
function e(
|
|
212
|
-
return
|
|
211
|
+
function e(d, m) {
|
|
212
|
+
return d === m && (d !== 0 || 1 / d === 1 / m) || d !== d && m !== m;
|
|
213
213
|
}
|
|
214
|
-
function t(
|
|
215
|
-
|
|
214
|
+
function t(d, m) {
|
|
215
|
+
h || o.startTransition === void 0 || (h = !0, console.error(
|
|
216
216
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
217
217
|
));
|
|
218
|
-
var
|
|
219
|
-
if (!
|
|
220
|
-
var S =
|
|
221
|
-
|
|
218
|
+
var b = m();
|
|
219
|
+
if (!u) {
|
|
220
|
+
var S = m();
|
|
221
|
+
a(b, S) || (console.error(
|
|
222
222
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
223
|
-
),
|
|
223
|
+
), u = !0);
|
|
224
224
|
}
|
|
225
225
|
S = s({
|
|
226
|
-
inst: { value:
|
|
226
|
+
inst: { value: b, getSnapshot: m }
|
|
227
227
|
});
|
|
228
228
|
var E = S[0].inst, R = S[1];
|
|
229
|
-
return
|
|
229
|
+
return c(
|
|
230
230
|
function() {
|
|
231
|
-
E.value =
|
|
231
|
+
E.value = b, E.getSnapshot = m, n(E) && R({ inst: E });
|
|
232
232
|
},
|
|
233
|
-
[
|
|
233
|
+
[d, b, m]
|
|
234
234
|
), i(
|
|
235
235
|
function() {
|
|
236
|
-
return n(E) && R({ inst: E }),
|
|
236
|
+
return n(E) && R({ inst: E }), d(function() {
|
|
237
237
|
n(E) && R({ inst: E });
|
|
238
238
|
});
|
|
239
239
|
},
|
|
240
|
-
[
|
|
241
|
-
),
|
|
240
|
+
[d]
|
|
241
|
+
), p(b), b;
|
|
242
242
|
}
|
|
243
|
-
function n(
|
|
244
|
-
var
|
|
245
|
-
|
|
243
|
+
function n(d) {
|
|
244
|
+
var m = d.getSnapshot;
|
|
245
|
+
d = d.value;
|
|
246
246
|
try {
|
|
247
|
-
var
|
|
248
|
-
return !
|
|
247
|
+
var b = m();
|
|
248
|
+
return !a(d, b);
|
|
249
249
|
} catch {
|
|
250
250
|
return !0;
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
function r(
|
|
254
|
-
return
|
|
253
|
+
function r(d, m) {
|
|
254
|
+
return m();
|
|
255
255
|
}
|
|
256
256
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
257
|
-
var o = Re,
|
|
258
|
-
z.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore :
|
|
257
|
+
var o = Re, a = typeof Object.is == "function" ? Object.is : e, s = o.useState, i = o.useEffect, c = o.useLayoutEffect, p = o.useDebugValue, h = !1, u = !1, g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
|
|
258
|
+
z.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : g, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
259
259
|
})()), z;
|
|
260
260
|
}
|
|
261
261
|
var ce;
|
|
262
|
-
function
|
|
263
|
-
return ce || (ce = 1, process.env.NODE_ENV === "production" ? k.exports = mt() : k.exports =
|
|
262
|
+
function ht() {
|
|
263
|
+
return ce || (ce = 1, process.env.NODE_ENV === "production" ? k.exports = mt() : k.exports = bt()), k.exports;
|
|
264
264
|
}
|
|
265
|
-
var Oe =
|
|
265
|
+
var Oe = ht();
|
|
266
266
|
const Et = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", we = "yyyy-mm-dd hh:mm";
|
|
267
267
|
class St extends Error {
|
|
268
268
|
constructor(t) {
|
|
@@ -278,7 +278,7 @@ class yt extends Error {
|
|
|
278
278
|
), this.name = "XlsxWriteError", this.cause = n;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function vt(e) {
|
|
282
282
|
const t = e.replace(/[[\]:*?/\\]/g, " ").trim();
|
|
283
283
|
return t ? t.slice(0, 31) : "Export";
|
|
284
284
|
}
|
|
@@ -289,20 +289,20 @@ async function Tt() {
|
|
|
289
289
|
throw new St(e);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
async function
|
|
293
|
-
const { dateFormat: n = we, sheetName: r = "Export" } = t, o = await Tt(),
|
|
292
|
+
async function xt(e, t = {}) {
|
|
293
|
+
const { dateFormat: n = we, sheetName: r = "Export" } = t, o = await Tt(), a = {
|
|
294
294
|
cellDates: !0,
|
|
295
295
|
dateNF: n
|
|
296
296
|
};
|
|
297
297
|
try {
|
|
298
298
|
const s = o.utils.aoa_to_sheet(
|
|
299
299
|
[e.headers, ...e.rows],
|
|
300
|
-
|
|
300
|
+
a
|
|
301
301
|
), i = o.utils.book_new();
|
|
302
|
-
return o.utils.book_append_sheet(i, s,
|
|
302
|
+
return o.utils.book_append_sheet(i, s, vt(r)), o.write(i, {
|
|
303
303
|
bookType: "xlsx",
|
|
304
304
|
type: "array",
|
|
305
|
-
...
|
|
305
|
+
...a
|
|
306
306
|
});
|
|
307
307
|
} catch (s) {
|
|
308
308
|
throw new yt(n, s);
|
|
@@ -325,12 +325,12 @@ function Ce(e) {
|
|
|
325
325
|
const i = J(s);
|
|
326
326
|
i && !o.has(i) && o.set(i, s);
|
|
327
327
|
}
|
|
328
|
-
const
|
|
328
|
+
const a = [];
|
|
329
329
|
for (const s of n) {
|
|
330
330
|
const i = o.get(s);
|
|
331
|
-
i && (
|
|
331
|
+
i && (a.push(i), o.delete(s));
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return a.push(...o.values()), a.filter((s) => s.exportable === !1 || !te(s) ? !1 : s.exportWhenHidden ? !0 : r[J(s)] !== !1);
|
|
334
334
|
}
|
|
335
335
|
function Lt(e, t) {
|
|
336
336
|
if (!(typeof e != "object" || e == null))
|
|
@@ -379,7 +379,7 @@ function It(e) {
|
|
|
379
379
|
);
|
|
380
380
|
return JSON.stringify(t, null, 2);
|
|
381
381
|
}
|
|
382
|
-
const
|
|
382
|
+
const U = {
|
|
383
383
|
csv: {
|
|
384
384
|
label: "CSV",
|
|
385
385
|
extension: "csv",
|
|
@@ -396,13 +396,13 @@ const B = {
|
|
|
396
396
|
label: "Excel",
|
|
397
397
|
extension: "xlsx",
|
|
398
398
|
mimeType: Et,
|
|
399
|
-
createContent: (e, t) =>
|
|
399
|
+
createContent: (e, t) => xt(e, t)
|
|
400
400
|
}
|
|
401
401
|
}, Le = ["csv", "json"];
|
|
402
402
|
function Nt(e, t, n) {
|
|
403
403
|
if (typeof document > "u" || typeof URL > "u") return 0;
|
|
404
|
-
const r = new Blob([t], { type: n }), o = URL.createObjectURL(r),
|
|
405
|
-
return
|
|
404
|
+
const r = new Blob([t], { type: n }), o = URL.createObjectURL(r), a = document.createElement("a");
|
|
405
|
+
return a.href = o, a.download = e, a.rel = "noopener", document.body.append(a), a.click(), a.remove(), URL.revokeObjectURL(o), r.size;
|
|
406
406
|
}
|
|
407
407
|
function Fe(...e) {
|
|
408
408
|
const t = {};
|
|
@@ -411,23 +411,23 @@ function Fe(...e) {
|
|
|
411
411
|
return t;
|
|
412
412
|
}
|
|
413
413
|
async function De(e, t, n = {}) {
|
|
414
|
-
const r =
|
|
414
|
+
const r = U[t];
|
|
415
415
|
if (!r) return null;
|
|
416
416
|
const o = Ce(e);
|
|
417
417
|
if (o.length === 0) return null;
|
|
418
|
-
const
|
|
418
|
+
const a = n.scope ?? Rt, s = a === "all" ? e.getAllRows() : e.getViewRows(), i = Dt(o, s), c = {
|
|
419
419
|
format: t,
|
|
420
|
-
scope:
|
|
420
|
+
scope: a,
|
|
421
421
|
rowCount: i.rows.length,
|
|
422
422
|
columnCount: i.headers.length
|
|
423
|
-
},
|
|
423
|
+
}, p = typeof n.fileName == "function" ? n.fileName(c) : n.fileName ?? _t, h = await r.createContent(i, {
|
|
424
424
|
dateFormat: n.dateFormat ?? we,
|
|
425
|
-
sheetName: n.sheetName ??
|
|
426
|
-
}),
|
|
427
|
-
return { ...
|
|
425
|
+
sheetName: n.sheetName ?? p
|
|
426
|
+
}), u = `${p}.${r.extension}`, g = Nt(u, h, r.mimeType);
|
|
427
|
+
return { ...c, fileName: u, byteLength: g };
|
|
428
428
|
}
|
|
429
429
|
const Vt = Object.keys(
|
|
430
|
-
|
|
430
|
+
U
|
|
431
431
|
);
|
|
432
432
|
function Gt(e) {
|
|
433
433
|
let t = null, n = null;
|
|
@@ -435,7 +435,7 @@ function Gt(e) {
|
|
|
435
435
|
const o = e.getSnapshot();
|
|
436
436
|
return t === o && n || (t = o, n = {
|
|
437
437
|
attached: e.isAttached(),
|
|
438
|
-
columns:
|
|
438
|
+
columns: xe(o.columns, o.columnOrder),
|
|
439
439
|
columnVisibilityMap: o.columnVisibilityMap,
|
|
440
440
|
theme: o.theme,
|
|
441
441
|
filteringEnabled: o.filteringEnabled,
|
|
@@ -444,23 +444,23 @@ function Gt(e) {
|
|
|
444
444
|
}), n;
|
|
445
445
|
};
|
|
446
446
|
return {
|
|
447
|
-
async exportGrid(o,
|
|
447
|
+
async exportGrid(o, a) {
|
|
448
448
|
return De(
|
|
449
449
|
e.getSnapshot(),
|
|
450
450
|
o,
|
|
451
|
-
Fe(
|
|
451
|
+
Fe(a, e.getExportDefaults())
|
|
452
452
|
);
|
|
453
453
|
},
|
|
454
454
|
getExportFormats: () => Vt,
|
|
455
455
|
getColumns: () => r().columns,
|
|
456
456
|
isColumnVisible(o) {
|
|
457
|
-
const
|
|
458
|
-
return
|
|
457
|
+
const a = e.getSnapshot();
|
|
458
|
+
return a.columnVisibilityMap[o] === !1 ? !1 : a.columns.some(
|
|
459
459
|
(s) => I(s) === o
|
|
460
460
|
);
|
|
461
461
|
},
|
|
462
|
-
setColumnVisible(o,
|
|
463
|
-
e.getSnapshot().setColumnVisible(o,
|
|
462
|
+
setColumnVisible(o, a) {
|
|
463
|
+
e.getSnapshot().setColumnVisible(o, a);
|
|
464
464
|
},
|
|
465
465
|
isFilteringEnabled: () => e.getSnapshot().filteringEnabled,
|
|
466
466
|
canToggleFiltering: () => e.getSnapshot().canToggleFiltering,
|
|
@@ -509,34 +509,34 @@ function Wt(e, t) {
|
|
|
509
509
|
}
|
|
510
510
|
function Kt() {
|
|
511
511
|
let e = null, t = A, n;
|
|
512
|
-
const r = /* @__PURE__ */ new Set(), o = (
|
|
513
|
-
Wt(t,
|
|
514
|
-
},
|
|
515
|
-
r.delete(
|
|
512
|
+
const r = /* @__PURE__ */ new Set(), o = (c) => {
|
|
513
|
+
Wt(t, c) || (t = c, r.forEach((p) => p()));
|
|
514
|
+
}, a = () => t, s = () => n, i = (c) => (r.add(c), () => {
|
|
515
|
+
r.delete(c);
|
|
516
516
|
});
|
|
517
517
|
return {
|
|
518
518
|
api: Gt({
|
|
519
|
-
getSnapshot:
|
|
519
|
+
getSnapshot: a,
|
|
520
520
|
subscribe: i,
|
|
521
521
|
getExportDefaults: s,
|
|
522
522
|
isAttached: () => t !== A
|
|
523
523
|
}),
|
|
524
524
|
createTargetRegistration() {
|
|
525
|
-
const
|
|
526
|
-
let
|
|
525
|
+
const c = /* @__PURE__ */ Symbol("rdg-toolbar-target");
|
|
526
|
+
let p = !1, h = null;
|
|
527
527
|
return {
|
|
528
528
|
controller: {
|
|
529
|
-
publish(
|
|
530
|
-
|
|
529
|
+
publish(u) {
|
|
530
|
+
h = u, p && e === c && o(u);
|
|
531
531
|
}
|
|
532
532
|
},
|
|
533
533
|
attach() {
|
|
534
|
-
if (e !== null && e !==
|
|
534
|
+
if (e !== null && e !== c)
|
|
535
535
|
throw new Error(
|
|
536
536
|
"RDGToolbarProvider supports one ReactDataGrid target. Use a separate provider for each grid."
|
|
537
537
|
);
|
|
538
|
-
return
|
|
539
|
-
|
|
538
|
+
return p = !0, e = c, h && o(h), () => {
|
|
539
|
+
p && (p = !1, e === c && (e = null, o(A)));
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
542
|
};
|
|
@@ -545,10 +545,10 @@ function Kt() {
|
|
|
545
545
|
e = null, t = A, n = void 0, r.clear();
|
|
546
546
|
},
|
|
547
547
|
getExportDefaults: s,
|
|
548
|
-
getSnapshot:
|
|
548
|
+
getSnapshot: a,
|
|
549
549
|
getServerSnapshot: () => A,
|
|
550
|
-
setExportDefaults(
|
|
551
|
-
n =
|
|
550
|
+
setExportDefaults(c) {
|
|
551
|
+
n = c;
|
|
552
552
|
},
|
|
553
553
|
subscribe: i
|
|
554
554
|
};
|
|
@@ -556,7 +556,7 @@ function Kt() {
|
|
|
556
556
|
const Me = Q(
|
|
557
557
|
null
|
|
558
558
|
);
|
|
559
|
-
function
|
|
559
|
+
function $() {
|
|
560
560
|
const e = Ee(Me);
|
|
561
561
|
if (!e)
|
|
562
562
|
throw new Error(
|
|
@@ -565,7 +565,7 @@ function H() {
|
|
|
565
565
|
return e;
|
|
566
566
|
}
|
|
567
567
|
function V() {
|
|
568
|
-
const e =
|
|
568
|
+
const e = $();
|
|
569
569
|
return Oe.useSyncExternalStore(
|
|
570
570
|
e.subscribe,
|
|
571
571
|
e.getSnapshot,
|
|
@@ -573,26 +573,26 @@ function V() {
|
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
575
|
function io() {
|
|
576
|
-
return
|
|
576
|
+
return $().api;
|
|
577
577
|
}
|
|
578
578
|
function co(e) {
|
|
579
579
|
return Oe.useSyncExternalStore(e.subscribe, e.getState, e.getState);
|
|
580
580
|
}
|
|
581
581
|
function Ae() {
|
|
582
|
-
const e = ee(), [t, n] = C(null), r = V(), o = Te(r.theme),
|
|
582
|
+
const e = ee(), [t, n] = C(null), r = V(), o = Te(r.theme), a = dt(o);
|
|
583
583
|
return {
|
|
584
584
|
rootProps: {
|
|
585
585
|
ref: Z((i) => {
|
|
586
586
|
n(i);
|
|
587
587
|
}, []),
|
|
588
588
|
"data-theme": o,
|
|
589
|
-
"data-theme-base":
|
|
589
|
+
"data-theme-base": a
|
|
590
590
|
},
|
|
591
|
-
wrap: (i) => /* @__PURE__ */
|
|
591
|
+
wrap: (i) => /* @__PURE__ */ l(
|
|
592
592
|
e.ThemeProvider,
|
|
593
593
|
{
|
|
594
594
|
theme: o,
|
|
595
|
-
themeBase:
|
|
595
|
+
themeBase: a,
|
|
596
596
|
portalContainer: t
|
|
597
597
|
},
|
|
598
598
|
i
|
|
@@ -604,29 +604,30 @@ function Yt(e) {
|
|
|
604
604
|
}
|
|
605
605
|
function Ie() {
|
|
606
606
|
const e = V(), t = w(
|
|
607
|
-
() =>
|
|
607
|
+
() => xe(e.columns, e.columnOrder),
|
|
608
608
|
[e.columnOrder, e.columns]
|
|
609
609
|
), n = t.reduce(
|
|
610
610
|
(r, o) => r + (e.columnVisibilityMap[I(o)] === !1 ? 0 : 1),
|
|
611
611
|
0
|
|
612
612
|
);
|
|
613
613
|
return t.filter((r) => r.hideable !== !1).map((r) => {
|
|
614
|
-
const o = I(r),
|
|
614
|
+
const o = I(r), a = e.columnVisibilityMap[o] !== !1;
|
|
615
615
|
return {
|
|
616
616
|
columnId: o,
|
|
617
|
-
disabled:
|
|
617
|
+
disabled: a && n <= 1,
|
|
618
618
|
label: Yt(r),
|
|
619
|
-
onToggle: () => e.setColumnVisible(o, !
|
|
620
|
-
visible:
|
|
619
|
+
onToggle: () => e.setColumnVisible(o, !a),
|
|
620
|
+
visible: a
|
|
621
621
|
};
|
|
622
622
|
});
|
|
623
623
|
}
|
|
624
|
-
const
|
|
624
|
+
const T = {
|
|
625
625
|
export: "Export",
|
|
626
626
|
showFilters: "Show filters",
|
|
627
627
|
hideFilters: "Hide filters",
|
|
628
628
|
clearFilters: "Clear filters",
|
|
629
629
|
columns: "Columns",
|
|
630
|
+
columnToggles: null,
|
|
630
631
|
showToolbar: "Columns and filters",
|
|
631
632
|
hideToolbar: "Hide columns and filters",
|
|
632
633
|
exportFormats: {},
|
|
@@ -635,13 +636,13 @@ const x = {
|
|
|
635
636
|
};
|
|
636
637
|
function zt(e) {
|
|
637
638
|
return {
|
|
638
|
-
...
|
|
639
|
+
...T,
|
|
639
640
|
...e,
|
|
640
641
|
// A caller passing `exportFormats: undefined` out of a conditional would
|
|
641
642
|
// otherwise defeat the spread and leave the lookups without a map.
|
|
642
|
-
exportFormats: e?.exportFormats ??
|
|
643
|
-
exportSingle: e?.exportSingle ??
|
|
644
|
-
filteringControlledHint: e?.filteringControlledHint ??
|
|
643
|
+
exportFormats: e?.exportFormats ?? T.exportFormats,
|
|
644
|
+
exportSingle: e?.exportSingle ?? T.exportSingle,
|
|
645
|
+
filteringControlledHint: e?.filteringControlledHint ?? T.filteringControlledHint
|
|
645
646
|
};
|
|
646
647
|
}
|
|
647
648
|
const Ne = 8;
|
|
@@ -649,8 +650,8 @@ function qt(...e) {
|
|
|
649
650
|
return e.filter(Boolean).join(" ");
|
|
650
651
|
}
|
|
651
652
|
function uo(e) {
|
|
652
|
-
const { children: t, bare: n = !1, className: r, style: o, ariaLabel:
|
|
653
|
-
return /* @__PURE__ */
|
|
653
|
+
const { children: t, bare: n = !1, className: r, style: o, ariaLabel: a } = e, { rootProps: s, wrap: i } = Ae();
|
|
654
|
+
return /* @__PURE__ */ l(
|
|
654
655
|
"div",
|
|
655
656
|
{
|
|
656
657
|
...s,
|
|
@@ -658,66 +659,68 @@ function uo(e) {
|
|
|
658
659
|
style: o,
|
|
659
660
|
"data-slot": "rdg-toolbar-surface",
|
|
660
661
|
"data-bare": n ? "true" : void 0,
|
|
661
|
-
"aria-label":
|
|
662
|
+
"aria-label": a
|
|
662
663
|
},
|
|
663
664
|
i(t)
|
|
664
665
|
);
|
|
665
666
|
}
|
|
666
667
|
function Jt(e) {
|
|
667
668
|
const {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
669
|
+
label: t,
|
|
670
|
+
ariaLabel: n = "Visible column toggles",
|
|
671
|
+
describedById: r,
|
|
672
|
+
className: o
|
|
673
|
+
} = e, a = Ie(), s = j("tdg-column-toggle-list-label"), i = t != null, c = /* @__PURE__ */ l(
|
|
673
674
|
"div",
|
|
674
675
|
{
|
|
675
676
|
role: "group",
|
|
676
|
-
"aria-label":
|
|
677
|
-
"aria-
|
|
678
|
-
|
|
677
|
+
"aria-label": i ? void 0 : n,
|
|
678
|
+
"aria-labelledby": i ? s : void 0,
|
|
679
|
+
"aria-describedby": r,
|
|
680
|
+
className: o,
|
|
679
681
|
"data-slot": "rdg-column-toggle-list"
|
|
680
682
|
},
|
|
681
|
-
|
|
683
|
+
a.map((p) => /* @__PURE__ */ l(
|
|
682
684
|
"button",
|
|
683
685
|
{
|
|
684
|
-
key:
|
|
686
|
+
key: p.columnId,
|
|
685
687
|
type: "button",
|
|
686
|
-
"aria-pressed":
|
|
687
|
-
disabled:
|
|
688
|
-
"data-state":
|
|
688
|
+
"aria-pressed": p.visible,
|
|
689
|
+
disabled: p.disabled,
|
|
690
|
+
"data-state": p.visible ? "on" : "off",
|
|
689
691
|
"data-slot": "rdg-column-toggle",
|
|
690
|
-
"data-column-id":
|
|
691
|
-
onClick:
|
|
692
|
+
"data-column-id": p.columnId,
|
|
693
|
+
onClick: p.onToggle
|
|
692
694
|
},
|
|
693
|
-
|
|
695
|
+
p.label
|
|
694
696
|
))
|
|
695
697
|
);
|
|
698
|
+
return i ? /* @__PURE__ */ l("div", { "data-slot": "rdg-column-toggle-group" }, /* @__PURE__ */ l("div", { id: s, "data-slot": "rdg-column-toggle-list-label" }, t), c) : c;
|
|
696
699
|
}
|
|
697
700
|
function Qt(e) {
|
|
698
701
|
const {
|
|
699
|
-
label: t =
|
|
702
|
+
label: t = T.columns,
|
|
700
703
|
ariaLabel: n = "Visible column toggles",
|
|
701
704
|
describedById: r,
|
|
702
705
|
className: o
|
|
703
|
-
} = e,
|
|
704
|
-
return /* @__PURE__ */
|
|
706
|
+
} = e, a = Ie(), s = ee();
|
|
707
|
+
return /* @__PURE__ */ l("div", { className: o, "data-slot": "rdg-toolbar-column-toggle-wrapper" }, /* @__PURE__ */ l(s.Root, { modal: !1 }, /* @__PURE__ */ l(
|
|
705
708
|
s.Trigger,
|
|
706
709
|
{
|
|
707
710
|
"data-slot": "rdg-toolbar-column-toggle-trigger",
|
|
708
711
|
"aria-describedby": r,
|
|
709
|
-
disabled:
|
|
712
|
+
disabled: a.length === 0
|
|
710
713
|
},
|
|
711
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ l(ct, { "data-icon": "inline-start" }),
|
|
712
715
|
t,
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
|
|
716
|
+
/* @__PURE__ */ l(
|
|
717
|
+
ve,
|
|
715
718
|
{
|
|
716
719
|
className: "tdg-toolbar-column-toggle-chevron",
|
|
717
720
|
"data-icon": "inline-end"
|
|
718
721
|
}
|
|
719
722
|
)
|
|
720
|
-
), /* @__PURE__ */
|
|
723
|
+
), /* @__PURE__ */ l(
|
|
721
724
|
s.Content,
|
|
722
725
|
{
|
|
723
726
|
align: "start",
|
|
@@ -729,9 +732,9 @@ function Qt(e) {
|
|
|
729
732
|
"aria-describedby": r,
|
|
730
733
|
"data-slot": "rdg-toolbar-column-toggle-menu"
|
|
731
734
|
},
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
734
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ l(s.Label, { "data-slot": "rdg-toolbar-column-toggle-menu-label" }, t),
|
|
736
|
+
/* @__PURE__ */ l(s.Separator, { "data-slot": "rdg-toolbar-column-toggle-menu-separator" }),
|
|
737
|
+
/* @__PURE__ */ l(s.Group, { "data-slot": "rdg-toolbar-column-toggle-menu-group" }, a.map((i) => /* @__PURE__ */ l(
|
|
735
738
|
s.CheckboxItem,
|
|
736
739
|
{
|
|
737
740
|
key: i.columnId,
|
|
@@ -740,10 +743,10 @@ function Qt(e) {
|
|
|
740
743
|
"data-slot": "rdg-column-toggle",
|
|
741
744
|
"data-layout": "menu",
|
|
742
745
|
"data-column-id": i.columnId,
|
|
743
|
-
onSelect: (
|
|
746
|
+
onSelect: (c) => c.preventDefault(),
|
|
744
747
|
onCheckedChange: i.onToggle
|
|
745
748
|
},
|
|
746
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ l("span", { "data-slot": "rdg-column-toggle-label" }, i.label)
|
|
747
750
|
)))
|
|
748
751
|
)));
|
|
749
752
|
}
|
|
@@ -753,34 +756,34 @@ function Zt(e) {
|
|
|
753
756
|
scope: n,
|
|
754
757
|
fileName: r,
|
|
755
758
|
dateFormat: o,
|
|
756
|
-
sheetName:
|
|
757
|
-
label: s =
|
|
758
|
-
formatLabels: i =
|
|
759
|
-
singleLabels:
|
|
760
|
-
onExportSuccess:
|
|
761
|
-
onExportError:
|
|
762
|
-
className:
|
|
763
|
-
} = e,
|
|
764
|
-
() => t.filter((y) =>
|
|
759
|
+
sheetName: a,
|
|
760
|
+
label: s = T.export,
|
|
761
|
+
formatLabels: i = T.exportFormats,
|
|
762
|
+
singleLabels: c = T.exportSingle,
|
|
763
|
+
onExportSuccess: p,
|
|
764
|
+
onExportError: h,
|
|
765
|
+
className: u
|
|
766
|
+
} = e, g = ee(), d = V(), m = $(), [b, S] = C(!1), E = w(
|
|
767
|
+
() => t.filter((y) => U[y] != null),
|
|
765
768
|
[t]
|
|
766
769
|
), R = w(
|
|
767
|
-
() => Ce(
|
|
768
|
-
[
|
|
769
|
-
), F =
|
|
770
|
+
() => Ce(d).length,
|
|
771
|
+
[d]
|
|
772
|
+
), F = b || R === 0 || E.length === 0, D = Z(
|
|
770
773
|
async (y) => {
|
|
771
774
|
S(!0);
|
|
772
775
|
try {
|
|
773
|
-
const
|
|
774
|
-
|
|
776
|
+
const x = await De(
|
|
777
|
+
d,
|
|
775
778
|
y,
|
|
776
779
|
Fe(
|
|
777
|
-
{ scope: n, fileName: r, dateFormat: o, sheetName:
|
|
778
|
-
|
|
780
|
+
{ scope: n, fileName: r, dateFormat: o, sheetName: a },
|
|
781
|
+
m.getExportDefaults()
|
|
779
782
|
)
|
|
780
783
|
);
|
|
781
|
-
|
|
782
|
-
} catch (
|
|
783
|
-
|
|
784
|
+
x && p?.(x);
|
|
785
|
+
} catch (x) {
|
|
786
|
+
h?.(x), h || console.error(x);
|
|
784
787
|
} finally {
|
|
785
788
|
S(!1);
|
|
786
789
|
}
|
|
@@ -788,19 +791,19 @@ function Zt(e) {
|
|
|
788
791
|
[
|
|
789
792
|
o,
|
|
790
793
|
r,
|
|
791
|
-
b,
|
|
792
794
|
h,
|
|
795
|
+
p,
|
|
793
796
|
n,
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
+
a,
|
|
798
|
+
d,
|
|
799
|
+
m
|
|
797
800
|
]
|
|
798
|
-
), G = (y) => i[y] ??
|
|
799
|
-
return O ? /* @__PURE__ */
|
|
801
|
+
), G = (y) => i[y] ?? U[y].label, O = E.length === 1 ? E[0] : null;
|
|
802
|
+
return O ? /* @__PURE__ */ l(
|
|
800
803
|
"button",
|
|
801
804
|
{
|
|
802
805
|
type: "button",
|
|
803
|
-
className:
|
|
806
|
+
className: u,
|
|
804
807
|
"data-slot": "rdg-toolbar-export",
|
|
805
808
|
"data-export-format": O,
|
|
806
809
|
disabled: F,
|
|
@@ -808,10 +811,10 @@ function Zt(e) {
|
|
|
808
811
|
D(O);
|
|
809
812
|
}
|
|
810
813
|
},
|
|
811
|
-
/* @__PURE__ */
|
|
812
|
-
|
|
813
|
-
) : /* @__PURE__ */
|
|
814
|
-
|
|
814
|
+
/* @__PURE__ */ l(ae, null),
|
|
815
|
+
c[O] ?? /* @__PURE__ */ l(B, null, s, " ", G(O))
|
|
816
|
+
) : /* @__PURE__ */ l("div", { className: u, "data-slot": "rdg-toolbar-export-wrapper" }, /* @__PURE__ */ l(g.Root, { modal: !1 }, /* @__PURE__ */ l(g.Trigger, { "data-slot": "rdg-toolbar-export", disabled: F }, /* @__PURE__ */ l(ae, null), s), /* @__PURE__ */ l(
|
|
817
|
+
g.Content,
|
|
815
818
|
{
|
|
816
819
|
align: "end",
|
|
817
820
|
loop: !0,
|
|
@@ -819,8 +822,8 @@ function Zt(e) {
|
|
|
819
822
|
collisionPadding: Ne,
|
|
820
823
|
"data-slot": "rdg-toolbar-export-menu"
|
|
821
824
|
},
|
|
822
|
-
E.map((y) => /* @__PURE__ */
|
|
823
|
-
|
|
825
|
+
E.map((y) => /* @__PURE__ */ l(
|
|
826
|
+
g.Item,
|
|
824
827
|
{
|
|
825
828
|
key: y,
|
|
826
829
|
"data-slot": "rdg-toolbar-export-format",
|
|
@@ -835,30 +838,30 @@ function Zt(e) {
|
|
|
835
838
|
}
|
|
836
839
|
function eo(e) {
|
|
837
840
|
const {
|
|
838
|
-
showFiltersLabel: t =
|
|
839
|
-
hideFiltersLabel: n =
|
|
840
|
-
controlledHint: r =
|
|
841
|
+
showFiltersLabel: t = T.showFilters,
|
|
842
|
+
hideFiltersLabel: n = T.hideFilters,
|
|
843
|
+
controlledHint: r = T.filteringControlledHint,
|
|
841
844
|
className: o
|
|
842
|
-
} = e,
|
|
843
|
-
return /* @__PURE__ */
|
|
845
|
+
} = e, a = V();
|
|
846
|
+
return /* @__PURE__ */ l(
|
|
844
847
|
"button",
|
|
845
848
|
{
|
|
846
849
|
type: "button",
|
|
847
850
|
className: o,
|
|
848
|
-
"aria-pressed":
|
|
849
|
-
"data-state":
|
|
851
|
+
"aria-pressed": a.filteringEnabled,
|
|
852
|
+
"data-state": a.filteringEnabled ? "on" : "off",
|
|
850
853
|
"data-slot": "rdg-toolbar-filter-toggle",
|
|
851
|
-
disabled: !
|
|
852
|
-
title:
|
|
853
|
-
onClick: () =>
|
|
854
|
+
disabled: !a.canToggleFiltering,
|
|
855
|
+
title: a.canToggleFiltering ? void 0 : r,
|
|
856
|
+
onClick: () => a.setFilteringEnabled(!a.filteringEnabled)
|
|
854
857
|
},
|
|
855
|
-
|
|
856
|
-
|
|
858
|
+
a.filteringEnabled ? /* @__PURE__ */ l(at, null) : /* @__PURE__ */ l(lt, null),
|
|
859
|
+
a.filteringEnabled ? n : t
|
|
857
860
|
);
|
|
858
861
|
}
|
|
859
862
|
function to(e) {
|
|
860
|
-
const { label: t =
|
|
861
|
-
return /* @__PURE__ */
|
|
863
|
+
const { label: t = T.clearFilters, className: n } = e, r = V();
|
|
864
|
+
return /* @__PURE__ */ l(
|
|
862
865
|
"button",
|
|
863
866
|
{
|
|
864
867
|
type: "button",
|
|
@@ -867,7 +870,7 @@ function to(e) {
|
|
|
867
870
|
disabled: !r.filtered,
|
|
868
871
|
onClick: () => r.clearAllFilters()
|
|
869
872
|
},
|
|
870
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ l(st, null),
|
|
871
874
|
t
|
|
872
875
|
);
|
|
873
876
|
}
|
|
@@ -877,28 +880,28 @@ function fo(e) {
|
|
|
877
880
|
ariaLabel: n = "Visible column toggles",
|
|
878
881
|
title: r = "Visible columns",
|
|
879
882
|
description: o = "Choose which columns are visible in the grid.",
|
|
880
|
-
collapsible:
|
|
883
|
+
collapsible: a = !1,
|
|
881
884
|
showColumnToggles: s = !0,
|
|
882
885
|
toolbarCollapsedColumnToggles: i = !1,
|
|
883
|
-
disableMobileAutoToolbarCollapsedColumns:
|
|
884
|
-
showExport:
|
|
885
|
-
showFilterToggle:
|
|
886
|
-
showClearFilters:
|
|
886
|
+
disableMobileAutoToolbarCollapsedColumns: c = !1,
|
|
887
|
+
showExport: p = !1,
|
|
888
|
+
showFilterToggle: h = !1,
|
|
889
|
+
showClearFilters: u = !1,
|
|
887
890
|
// No literal defaults here: one would be indistinguishable from a passed
|
|
888
891
|
// value and would outrank the provider's `exportDefaults`.
|
|
889
|
-
exportScope:
|
|
890
|
-
exportFormats:
|
|
891
|
-
exportFileName:
|
|
892
|
-
exportDateFormat:
|
|
892
|
+
exportScope: g,
|
|
893
|
+
exportFormats: d = Le,
|
|
894
|
+
exportFileName: m,
|
|
895
|
+
exportDateFormat: b,
|
|
893
896
|
exportSheetName: S,
|
|
894
897
|
onExportSuccess: E,
|
|
895
898
|
onExportError: R,
|
|
896
899
|
labels: F,
|
|
897
900
|
className: D
|
|
898
|
-
} = e, { rootProps: G, wrap: O } = Ae(), y =
|
|
901
|
+
} = e, { rootProps: G, wrap: O } = Ae(), y = j("tdg-toolbar-title"), x = j("tdg-toolbar-description"), oe = j("tdg-toolbar-collapsible-panel"), [M, Pe] = C(!1), ke = ot("(max-width: 1024px)"), X = i || ke && !c, v = w(
|
|
899
902
|
() => zt(F),
|
|
900
903
|
[F]
|
|
901
|
-
),
|
|
904
|
+
), W = o != null ? x : void 0, K = r != null || o != null ? /* @__PURE__ */ l("div", { "data-slot": "rdg-toolbar-heading" }, r != null ? /* @__PURE__ */ l(
|
|
902
905
|
"div",
|
|
903
906
|
{
|
|
904
907
|
id: y,
|
|
@@ -907,63 +910,65 @@ function fo(e) {
|
|
|
907
910
|
"aria-level": 2
|
|
908
911
|
},
|
|
909
912
|
r
|
|
910
|
-
) : null, o != null ? /* @__PURE__ */
|
|
913
|
+
) : null, o != null ? /* @__PURE__ */ l("div", { id: x, "data-slot": "rdg-toolbar-description" }, o) : null) : null, ne = s && X ? /* @__PURE__ */ l(
|
|
911
914
|
Qt,
|
|
912
915
|
{
|
|
913
916
|
ariaLabel: n,
|
|
914
|
-
describedById:
|
|
915
|
-
label:
|
|
917
|
+
describedById: W,
|
|
918
|
+
label: v.columns
|
|
916
919
|
}
|
|
917
|
-
) : null, re = /* @__PURE__ */
|
|
920
|
+
) : null, re = /* @__PURE__ */ l(
|
|
918
921
|
"div",
|
|
919
922
|
{
|
|
920
923
|
"data-slot": "rdg-toolbar-body",
|
|
921
|
-
"data-leading": s &&
|
|
924
|
+
"data-leading": s && !X ? "toggles" : "none",
|
|
925
|
+
"data-toggles-labelled": v.columnToggles != null ? "true" : void 0
|
|
922
926
|
},
|
|
923
|
-
s &&
|
|
927
|
+
s && !X ? /* @__PURE__ */ l(
|
|
924
928
|
Jt,
|
|
925
929
|
{
|
|
930
|
+
label: v.columnToggles,
|
|
926
931
|
ariaLabel: n,
|
|
927
|
-
describedById:
|
|
932
|
+
describedById: W
|
|
928
933
|
}
|
|
929
934
|
) : null,
|
|
930
|
-
ne != null ||
|
|
935
|
+
ne != null || p || h || u || t != null ? /* @__PURE__ */ l("div", { "data-slot": "rdg-toolbar-actions" }, ne, p ? /* @__PURE__ */ l(
|
|
931
936
|
Zt,
|
|
932
937
|
{
|
|
933
|
-
formats:
|
|
934
|
-
scope:
|
|
935
|
-
fileName:
|
|
936
|
-
dateFormat:
|
|
938
|
+
formats: d,
|
|
939
|
+
scope: g,
|
|
940
|
+
fileName: m,
|
|
941
|
+
dateFormat: b,
|
|
937
942
|
sheetName: S,
|
|
938
|
-
label:
|
|
939
|
-
formatLabels:
|
|
940
|
-
singleLabels:
|
|
943
|
+
label: v.export,
|
|
944
|
+
formatLabels: v.exportFormats,
|
|
945
|
+
singleLabels: v.exportSingle,
|
|
941
946
|
onExportSuccess: E,
|
|
942
947
|
onExportError: R
|
|
943
948
|
}
|
|
944
|
-
) : null,
|
|
949
|
+
) : null, h ? /* @__PURE__ */ l(
|
|
945
950
|
eo,
|
|
946
951
|
{
|
|
947
|
-
showFiltersLabel:
|
|
948
|
-
hideFiltersLabel:
|
|
949
|
-
controlledHint:
|
|
952
|
+
showFiltersLabel: v.showFilters,
|
|
953
|
+
hideFiltersLabel: v.hideFilters,
|
|
954
|
+
controlledHint: v.filteringControlledHint
|
|
950
955
|
}
|
|
951
|
-
) : null,
|
|
956
|
+
) : null, u ? /* @__PURE__ */ l(to, { label: v.clearFilters }) : null, t) : null
|
|
952
957
|
);
|
|
953
|
-
return /* @__PURE__ */
|
|
958
|
+
return /* @__PURE__ */ l(
|
|
954
959
|
"div",
|
|
955
960
|
{
|
|
956
961
|
...G,
|
|
957
962
|
className: D ? `tdg-toolbar-root ${D}` : "tdg-toolbar-root",
|
|
958
963
|
"data-slot": "rdg-toolbar",
|
|
959
|
-
"data-collapsible":
|
|
960
|
-
"data-state":
|
|
964
|
+
"data-collapsible": a ? "true" : void 0,
|
|
965
|
+
"data-state": a ? M ? "open" : "closed" : void 0,
|
|
961
966
|
role: r != null ? "region" : void 0,
|
|
962
967
|
"aria-labelledby": r != null ? y : void 0,
|
|
963
|
-
"aria-describedby":
|
|
968
|
+
"aria-describedby": W
|
|
964
969
|
},
|
|
965
970
|
O(
|
|
966
|
-
|
|
971
|
+
a ? /* @__PURE__ */ l(B, null, /* @__PURE__ */ l("div", { "data-slot": "rdg-toolbar-header-row" }, K != null ? /* @__PURE__ */ l("div", { "data-slot": "rdg-toolbar-collapsible-heading" }, K) : null, /* @__PURE__ */ l("div", { "data-slot": "rdg-toolbar-disclosure-row" }, /* @__PURE__ */ l(
|
|
967
972
|
"button",
|
|
968
973
|
{
|
|
969
974
|
type: "button",
|
|
@@ -973,18 +978,18 @@ function fo(e) {
|
|
|
973
978
|
"data-slot": "rdg-toolbar-disclosure",
|
|
974
979
|
onClick: () => Pe((je) => !je)
|
|
975
980
|
},
|
|
976
|
-
/* @__PURE__ */
|
|
977
|
-
M ?
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
))), /* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ l(it, null),
|
|
982
|
+
M ? v.hideToolbar : v.showToolbar,
|
|
983
|
+
/* @__PURE__ */ l(ve, { className: "tdg-toolbar-disclosure-chevron" })
|
|
984
|
+
))), /* @__PURE__ */ l(
|
|
980
985
|
"div",
|
|
981
986
|
{
|
|
982
987
|
id: oe,
|
|
983
988
|
"aria-hidden": !M,
|
|
984
989
|
"data-slot": "rdg-toolbar-collapsible-panel"
|
|
985
990
|
},
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
)) : /* @__PURE__ */
|
|
991
|
+
/* @__PURE__ */ l("div", { "data-slot": "rdg-toolbar-collapsible-panel-inner" }, re)
|
|
992
|
+
)) : /* @__PURE__ */ l(B, null, K, re)
|
|
988
993
|
)
|
|
989
994
|
);
|
|
990
995
|
}
|
|
@@ -1007,48 +1012,48 @@ function ro(e, t) {
|
|
|
1007
1012
|
return n;
|
|
1008
1013
|
if (!no(n.type)) return null;
|
|
1009
1014
|
const o = n.props.children;
|
|
1010
|
-
if (!
|
|
1015
|
+
if (!H(o)) return null;
|
|
1011
1016
|
n = o;
|
|
1012
1017
|
}
|
|
1013
1018
|
return null;
|
|
1014
1019
|
}
|
|
1015
|
-
function
|
|
1020
|
+
function lo(e, t) {
|
|
1016
1021
|
typeof e != "function" && typeof e != "object" || !e || Object.defineProperty(e, t, { value: !0 });
|
|
1017
1022
|
}
|
|
1018
1023
|
function Ge(e) {
|
|
1019
|
-
const { children: t } = e, n = e.__rdgSearchController, r =
|
|
1024
|
+
const { children: t } = e, n = e.__rdgSearchController, r = $(), o = w(
|
|
1020
1025
|
() => r.createTargetRegistration(),
|
|
1021
1026
|
[r]
|
|
1022
1027
|
);
|
|
1023
|
-
if (N(() => o.attach(), [o]), !
|
|
1028
|
+
if (N(() => o.attach(), [o]), !H(t))
|
|
1024
1029
|
throw new Error(
|
|
1025
1030
|
"RDGToolbarTarget expects exactly one ReactDataGrid child."
|
|
1026
1031
|
);
|
|
1027
1032
|
if (!ro(t, _e))
|
|
1028
1033
|
throw new Error("RDGToolbarTarget expects a ReactDataGrid child.");
|
|
1029
|
-
const
|
|
1034
|
+
const a = {
|
|
1030
1035
|
__rdgToolbarController: o.controller
|
|
1031
1036
|
};
|
|
1032
|
-
return n !== void 0 && (
|
|
1037
|
+
return n !== void 0 && (a.__rdgSearchController = n), he(
|
|
1033
1038
|
t,
|
|
1034
|
-
|
|
1039
|
+
a
|
|
1035
1040
|
);
|
|
1036
1041
|
}
|
|
1037
|
-
|
|
1038
|
-
const
|
|
1042
|
+
lo(Ge, Ve);
|
|
1043
|
+
const ao = typeof window > "u" ? N : ye;
|
|
1039
1044
|
function po(e) {
|
|
1040
1045
|
const { children: t, apiRef: n, exportDefaults: r } = e, [o] = C(Kt);
|
|
1041
|
-
N(() => () => o.dispose(), [o]),
|
|
1046
|
+
N(() => () => o.dispose(), [o]), ao(() => {
|
|
1042
1047
|
o.setExportDefaults(r);
|
|
1043
1048
|
}, [o, r]), Se(n, () => o.api, [o]);
|
|
1044
|
-
const
|
|
1045
|
-
() =>
|
|
1049
|
+
const a = w(
|
|
1050
|
+
() => be.map(
|
|
1046
1051
|
t,
|
|
1047
|
-
(s) =>
|
|
1052
|
+
(s) => H(s) && _e(s.type) ? /* @__PURE__ */ l(Ge, null, s) : s
|
|
1048
1053
|
),
|
|
1049
1054
|
[t]
|
|
1050
1055
|
);
|
|
1051
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ l(Me.Provider, { value: o }, a);
|
|
1052
1057
|
}
|
|
1053
1058
|
export {
|
|
1054
1059
|
to as RDGClearFiltersButton,
|