@fileflow/sdk 0.1.18 → 0.1.20
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/ImportWizard-C41U0wGI.js +78 -0
- package/dist/ImportWizard-C41U0wGI.js.map +1 -0
- package/dist/{ImportWizard-D4GlHhyY.mjs → ImportWizard-CrUjPf36.mjs} +1280 -990
- package/dist/ImportWizard-CrUjPf36.mjs.map +1 -0
- package/dist/{KYCWizard-BZW0dZ2x.mjs → KYCWizard-16nacG1o.mjs} +2 -2
- package/dist/{KYCWizard-BZW0dZ2x.mjs.map → KYCWizard-16nacG1o.mjs.map} +1 -1
- package/dist/{KYCWizard-Bk9-GvOh.js → KYCWizard-k0NBBKiM.js} +2 -2
- package/dist/{KYCWizard-Bk9-GvOh.js.map → KYCWizard-k0NBBKiM.js.map} +1 -1
- package/dist/import.d.ts +1 -0
- package/dist/import.js +1 -1
- package/dist/import.mjs +1 -1
- package/dist/{index-CLgI0mua.js → index-Bo1agWLS.js} +2 -2
- package/dist/{index-CLgI0mua.js.map → index-Bo1agWLS.js.map} +1 -1
- package/dist/{index-DnkwOjwi.mjs → index-EFXXxSbj.mjs} +2 -2
- package/dist/{index-DnkwOjwi.mjs.map → index-EFXXxSbj.mjs.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +3 -3
- package/dist/kyc.js +1 -1
- package/dist/kyc.mjs +1 -1
- package/dist/styles.css +15 -6
- package/package.json +1 -1
- package/dist/ImportWizard-D4GlHhyY.mjs.map +0 -1
- package/dist/ImportWizard-Dakb05xc.js +0 -78
- package/dist/ImportWizard-Dakb05xc.js.map +0 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { h as
|
|
1
|
+
import { jsx as c, jsxs as w, Fragment as re } from "react/jsx-runtime";
|
|
2
|
+
import * as xe from "react";
|
|
3
|
+
import pt, { useCallback as Ne, useState as q, useMemo as be, useEffect as Oe } from "react";
|
|
4
|
+
import { h as b, j as mt, k as ht, X as ae, m as U, U as Qe, n as Pe, T as _e, q as vt, p as ke, o as Te, t as wt, d as Ct, V as Be, g as te, S as ce, L as ge } from "./index-EFXXxSbj.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.563.0 - ISC
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the ISC license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const St = [
|
|
12
12
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
13
13
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
14
|
-
],
|
|
14
|
+
], yt = b("arrow-right", St);
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v0.563.0 - ISC
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
const
|
|
21
|
+
const Rt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], xt = b("check", Rt);
|
|
22
22
|
/**
|
|
23
23
|
* @license lucide-react v0.563.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
27
|
*/
|
|
28
|
-
const
|
|
28
|
+
const _t = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Ft = b("chevron-left", _t);
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v0.563.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
35
|
+
const $t = [
|
|
36
36
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
37
37
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
38
38
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
39
|
-
],
|
|
39
|
+
], It = b("circle-question-mark", $t);
|
|
40
40
|
/**
|
|
41
41
|
* @license lucide-react v0.563.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
const
|
|
46
|
+
const Mt = [
|
|
47
47
|
[
|
|
48
48
|
"path",
|
|
49
49
|
{
|
|
@@ -52,14 +52,14 @@ const xt = [
|
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
55
|
-
],
|
|
55
|
+
], Vt = b("eye", Mt);
|
|
56
56
|
/**
|
|
57
57
|
* @license lucide-react v0.563.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
61
|
*/
|
|
62
|
-
const
|
|
62
|
+
const Nt = [
|
|
63
63
|
[
|
|
64
64
|
"path",
|
|
65
65
|
{
|
|
@@ -72,14 +72,14 @@ const Ft = [
|
|
|
72
72
|
["path", { d: "M14 13h2", key: "un5t4a" }],
|
|
73
73
|
["path", { d: "M8 17h2", key: "2yhykz" }],
|
|
74
74
|
["path", { d: "M14 17h2", key: "10kma7" }]
|
|
75
|
-
],
|
|
75
|
+
], Pt = b("file-spreadsheet", Nt);
|
|
76
76
|
/**
|
|
77
77
|
* @license lucide-react v0.563.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
81
|
*/
|
|
82
|
-
const
|
|
82
|
+
const kt = [
|
|
83
83
|
[
|
|
84
84
|
"path",
|
|
85
85
|
{
|
|
@@ -88,26 +88,26 @@ const Mt = [
|
|
|
88
88
|
}
|
|
89
89
|
],
|
|
90
90
|
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
91
|
-
],
|
|
91
|
+
], Et = b("file", kt);
|
|
92
92
|
/**
|
|
93
93
|
* @license lucide-react v0.563.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
97
|
*/
|
|
98
|
-
const
|
|
98
|
+
const Dt = [
|
|
99
99
|
["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
|
|
100
100
|
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
101
101
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
102
102
|
["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
|
|
103
|
-
],
|
|
103
|
+
], Lt = b("git-branch", Dt);
|
|
104
104
|
/**
|
|
105
105
|
* @license lucide-react v0.563.0 - ISC
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
109
|
*/
|
|
110
|
-
const
|
|
110
|
+
const zt = [
|
|
111
111
|
[
|
|
112
112
|
"path",
|
|
113
113
|
{
|
|
@@ -115,33 +115,33 @@ const Pt = [
|
|
|
115
115
|
key: "1a8usu"
|
|
116
116
|
}
|
|
117
117
|
]
|
|
118
|
-
],
|
|
118
|
+
], Ht = b("pen", zt);
|
|
119
119
|
/**
|
|
120
120
|
* @license lucide-react v0.563.0 - ISC
|
|
121
121
|
*
|
|
122
122
|
* This source code is licensed under the ISC license.
|
|
123
123
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
124
|
*/
|
|
125
|
-
const
|
|
125
|
+
const At = [
|
|
126
126
|
[
|
|
127
127
|
"path",
|
|
128
128
|
{ d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
|
|
129
129
|
],
|
|
130
130
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
131
|
-
],
|
|
131
|
+
], Gt = b("square-check-big", At);
|
|
132
132
|
/**
|
|
133
133
|
* @license lucide-react v0.563.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
137
|
*/
|
|
138
|
-
const
|
|
138
|
+
const bt = [
|
|
139
139
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
140
140
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
141
141
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
142
142
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
143
143
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
144
|
-
],
|
|
144
|
+
], Ot = b("trash-2", bt), Ke = {
|
|
145
145
|
sessionId: null,
|
|
146
146
|
status: "idle",
|
|
147
147
|
step: "upload",
|
|
@@ -162,8 +162,269 @@ const Lt = [
|
|
|
162
162
|
error: null,
|
|
163
163
|
editingCell: null,
|
|
164
164
|
editedRows: /* @__PURE__ */ new Set()
|
|
165
|
-
}
|
|
166
|
-
|
|
165
|
+
};
|
|
166
|
+
function Tt(e, o) {
|
|
167
|
+
const t = [], n = (e == null ? void 0 : e.trim()) || "";
|
|
168
|
+
if (o.required && !n)
|
|
169
|
+
return t.push({
|
|
170
|
+
rowIndex: 0,
|
|
171
|
+
// will be set by caller
|
|
172
|
+
columnKey: o.key,
|
|
173
|
+
value: n,
|
|
174
|
+
severity: "error",
|
|
175
|
+
validatorType: "required",
|
|
176
|
+
message: `${o.label} is required`
|
|
177
|
+
}), t;
|
|
178
|
+
if (!n) return t;
|
|
179
|
+
switch (o.type) {
|
|
180
|
+
case "email":
|
|
181
|
+
/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n) || t.push({
|
|
182
|
+
rowIndex: 0,
|
|
183
|
+
columnKey: o.key,
|
|
184
|
+
value: n,
|
|
185
|
+
severity: "error",
|
|
186
|
+
validatorType: "type",
|
|
187
|
+
message: "Invalid email format"
|
|
188
|
+
});
|
|
189
|
+
break;
|
|
190
|
+
case "url":
|
|
191
|
+
/^https?:\/\/.+/.test(n) || t.push({
|
|
192
|
+
rowIndex: 0,
|
|
193
|
+
columnKey: o.key,
|
|
194
|
+
value: n,
|
|
195
|
+
severity: "error",
|
|
196
|
+
validatorType: "type",
|
|
197
|
+
message: "Invalid URL format"
|
|
198
|
+
});
|
|
199
|
+
break;
|
|
200
|
+
case "integer":
|
|
201
|
+
/^-?\d+$/.test(n) || t.push({
|
|
202
|
+
rowIndex: 0,
|
|
203
|
+
columnKey: o.key,
|
|
204
|
+
value: n,
|
|
205
|
+
severity: "error",
|
|
206
|
+
validatorType: "type",
|
|
207
|
+
message: "Must be a whole number"
|
|
208
|
+
});
|
|
209
|
+
break;
|
|
210
|
+
case "number":
|
|
211
|
+
case "float":
|
|
212
|
+
/^-?\d+(\.\d+)?$/.test(n) || t.push({
|
|
213
|
+
rowIndex: 0,
|
|
214
|
+
columnKey: o.key,
|
|
215
|
+
value: n,
|
|
216
|
+
severity: "error",
|
|
217
|
+
validatorType: "type",
|
|
218
|
+
message: "Must be a valid number"
|
|
219
|
+
});
|
|
220
|
+
break;
|
|
221
|
+
case "phone":
|
|
222
|
+
n.replace(/\D/g, "").length < 10 && t.push({
|
|
223
|
+
rowIndex: 0,
|
|
224
|
+
columnKey: o.key,
|
|
225
|
+
value: n,
|
|
226
|
+
severity: "warning",
|
|
227
|
+
validatorType: "type",
|
|
228
|
+
message: "Invalid phone number"
|
|
229
|
+
});
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
if (o.validators)
|
|
233
|
+
for (const r of o.validators) {
|
|
234
|
+
const l = r.severity === "info" ? "warning" : r.severity || "error", i = r.params || {};
|
|
235
|
+
switch (r.type) {
|
|
236
|
+
case "minLength": {
|
|
237
|
+
const s = i.value ?? 0;
|
|
238
|
+
n.length < s && t.push({
|
|
239
|
+
rowIndex: 0,
|
|
240
|
+
columnKey: o.key,
|
|
241
|
+
value: n,
|
|
242
|
+
severity: l,
|
|
243
|
+
validatorType: r.type,
|
|
244
|
+
message: r.message || `Must be at least ${s} characters`
|
|
245
|
+
});
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
case "maxLength": {
|
|
249
|
+
const s = i.value ?? 1 / 0;
|
|
250
|
+
n.length > s && t.push({
|
|
251
|
+
rowIndex: 0,
|
|
252
|
+
columnKey: o.key,
|
|
253
|
+
value: n,
|
|
254
|
+
severity: l,
|
|
255
|
+
validatorType: r.type,
|
|
256
|
+
message: r.message || `Must be at most ${s} characters`
|
|
257
|
+
});
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
case "min": {
|
|
261
|
+
const s = parseFloat(n), u = i.value ?? -1 / 0;
|
|
262
|
+
!isNaN(s) && s < u && t.push({
|
|
263
|
+
rowIndex: 0,
|
|
264
|
+
columnKey: o.key,
|
|
265
|
+
value: n,
|
|
266
|
+
severity: l,
|
|
267
|
+
validatorType: r.type,
|
|
268
|
+
message: r.message || `Must be at least ${u}`
|
|
269
|
+
});
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
case "max": {
|
|
273
|
+
const s = parseFloat(n), u = i.value ?? 1 / 0;
|
|
274
|
+
!isNaN(s) && s > u && t.push({
|
|
275
|
+
rowIndex: 0,
|
|
276
|
+
columnKey: o.key,
|
|
277
|
+
value: n,
|
|
278
|
+
severity: l,
|
|
279
|
+
validatorType: r.type,
|
|
280
|
+
message: r.message || `Must be at most ${u}`
|
|
281
|
+
});
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
case "pattern": {
|
|
285
|
+
const s = i.regex ?? i.pattern ?? ".*";
|
|
286
|
+
new RegExp(s).test(n) || t.push({
|
|
287
|
+
rowIndex: 0,
|
|
288
|
+
columnKey: o.key,
|
|
289
|
+
value: n,
|
|
290
|
+
severity: l,
|
|
291
|
+
validatorType: r.type,
|
|
292
|
+
message: r.message || "Format is invalid"
|
|
293
|
+
});
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
case "enum": {
|
|
297
|
+
const s = i.values || [];
|
|
298
|
+
s.map((f) => f.toLowerCase()).includes(n.toLowerCase()) || t.push({
|
|
299
|
+
rowIndex: 0,
|
|
300
|
+
columnKey: o.key,
|
|
301
|
+
value: n,
|
|
302
|
+
severity: l,
|
|
303
|
+
validatorType: r.type,
|
|
304
|
+
message: r.message || `Must be one of: ${s.slice(0, 5).join(", ")}${s.length > 5 ? "..." : ""}`
|
|
305
|
+
});
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
case "custom": {
|
|
309
|
+
const s = i.validatorName;
|
|
310
|
+
if (s === "commaSeparatedEnum") {
|
|
311
|
+
const u = i.allowedValues || [], f = n.split(",").map((d) => d.trim().toLowerCase()).filter((d) => d), g = u.map((d) => d.toLowerCase()), p = f.filter((d) => !g.includes(d));
|
|
312
|
+
p.length > 0 && t.push({
|
|
313
|
+
rowIndex: 0,
|
|
314
|
+
columnKey: o.key,
|
|
315
|
+
value: n,
|
|
316
|
+
severity: l,
|
|
317
|
+
validatorType: r.type,
|
|
318
|
+
message: r.message || `Invalid values: ${p.join(", ")}. Must be comma-separated values from: ${u.slice(0, 5).join(", ")}${u.length > 5 ? "..." : ""}`
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
if (s === "commaSeparatedEmails") {
|
|
322
|
+
const f = n.split(",").map((g) => g.trim()).filter((g) => g).filter((g) => !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(g));
|
|
323
|
+
f.length > 0 && t.push({
|
|
324
|
+
rowIndex: 0,
|
|
325
|
+
columnKey: o.key,
|
|
326
|
+
value: n,
|
|
327
|
+
severity: l,
|
|
328
|
+
validatorType: r.type,
|
|
329
|
+
message: `Invalid email(s): ${f.join(", ")}`
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return t;
|
|
337
|
+
}
|
|
338
|
+
function pe(e, o, t) {
|
|
339
|
+
var C;
|
|
340
|
+
const n = [];
|
|
341
|
+
for (const h of e)
|
|
342
|
+
for (const S of t) {
|
|
343
|
+
if (!S.targetKey) continue;
|
|
344
|
+
const x = o.columns.find((V) => V.key === S.targetKey);
|
|
345
|
+
if (!x) continue;
|
|
346
|
+
const I = h.data[S.targetKey] || h.data[S.sourceColumn] || "", F = Tt(String(I), x);
|
|
347
|
+
for (const V of F)
|
|
348
|
+
n.push({ ...V, rowIndex: h.rowIndex });
|
|
349
|
+
}
|
|
350
|
+
const r = ((C = o.options) == null ? void 0 : C.uniqueKeys) || [];
|
|
351
|
+
for (const h of r) {
|
|
352
|
+
const S = t.find((I) => I.targetKey === h);
|
|
353
|
+
if (!S) continue;
|
|
354
|
+
const x = /* @__PURE__ */ new Map();
|
|
355
|
+
for (const I of e) {
|
|
356
|
+
const F = String(I.data[h] || I.data[S.sourceColumn] || "").toLowerCase().trim();
|
|
357
|
+
if (!F) continue;
|
|
358
|
+
const V = x.get(F) || [];
|
|
359
|
+
V.push(I.rowIndex), x.set(F, V);
|
|
360
|
+
}
|
|
361
|
+
for (const [I, F] of x.entries())
|
|
362
|
+
if (F.length > 1)
|
|
363
|
+
for (const V of F.slice(1))
|
|
364
|
+
n.push({
|
|
365
|
+
rowIndex: V,
|
|
366
|
+
columnKey: h,
|
|
367
|
+
value: I,
|
|
368
|
+
severity: "warning",
|
|
369
|
+
validatorType: "unique",
|
|
370
|
+
message: `Duplicate ${h} value`
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
const l = /* @__PURE__ */ new Map();
|
|
374
|
+
for (const h of n) {
|
|
375
|
+
const S = l.get(h.rowIndex) || [];
|
|
376
|
+
S.push(h), l.set(h.rowIndex, S);
|
|
377
|
+
}
|
|
378
|
+
const i = n.filter((h) => h.severity === "error").length, s = n.filter((h) => h.severity === "warning").length, u = n.filter((h) => h.severity === "info").length, f = new Set(n.filter((h) => h.severity === "error").map((h) => h.rowIndex)), g = e.length, p = g - f.size, d = {};
|
|
379
|
+
for (const h of n) {
|
|
380
|
+
d[h.columnKey] || (d[h.columnKey] = {
|
|
381
|
+
columnKey: h.columnKey,
|
|
382
|
+
errorCount: 0,
|
|
383
|
+
warningCount: 0,
|
|
384
|
+
infoCount: 0,
|
|
385
|
+
mostCommonError: void 0
|
|
386
|
+
});
|
|
387
|
+
const S = d[h.columnKey];
|
|
388
|
+
h.severity === "error" ? S.errorCount++ : h.severity === "warning" ? S.warningCount++ : S.infoCount++, S.mostCommonError || (S.mostCommonError = h.message);
|
|
389
|
+
}
|
|
390
|
+
const a = {};
|
|
391
|
+
for (const h of n)
|
|
392
|
+
a[h.validatorType] = (a[h.validatorType] || 0) + 1;
|
|
393
|
+
const m = [];
|
|
394
|
+
for (const h of r) {
|
|
395
|
+
const S = t.find((I) => I.targetKey === h);
|
|
396
|
+
if (!S) continue;
|
|
397
|
+
const x = /* @__PURE__ */ new Map();
|
|
398
|
+
for (const I of e) {
|
|
399
|
+
const F = String(I.data[h] || I.data[S.sourceColumn] || "").toLowerCase().trim();
|
|
400
|
+
if (!F) continue;
|
|
401
|
+
const V = x.get(F) || [];
|
|
402
|
+
V.push(I.rowIndex), x.set(F, V);
|
|
403
|
+
}
|
|
404
|
+
for (const [I, F] of x.entries())
|
|
405
|
+
F.length > 1 && m.push({ columnKey: h, value: I, rowIndices: F });
|
|
406
|
+
}
|
|
407
|
+
const v = {
|
|
408
|
+
byColumn: d,
|
|
409
|
+
byType: a,
|
|
410
|
+
duplicates: m.length > 0 ? m : void 0
|
|
411
|
+
};
|
|
412
|
+
return {
|
|
413
|
+
validationResults: {
|
|
414
|
+
isValid: i === 0,
|
|
415
|
+
totalRows: g,
|
|
416
|
+
validRows: p,
|
|
417
|
+
errorCount: i,
|
|
418
|
+
warningCount: s,
|
|
419
|
+
infoCount: u,
|
|
420
|
+
errors: n,
|
|
421
|
+
summary: v
|
|
422
|
+
},
|
|
423
|
+
errorsByRow: l
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
const Z = mt((e, o) => ({
|
|
427
|
+
...Ke,
|
|
167
428
|
setSchema: (t) => e({ schema: t }),
|
|
168
429
|
setSessionId: (t) => e({ sessionId: t }),
|
|
169
430
|
setFile: (t) => e({
|
|
@@ -194,6 +455,16 @@ const Lt = [
|
|
|
194
455
|
}
|
|
195
456
|
e({ validationResults: t, errorsByRow: n });
|
|
196
457
|
},
|
|
458
|
+
revalidate: () => {
|
|
459
|
+
const t = o();
|
|
460
|
+
if (!t.schema || !t.validationResults) return;
|
|
461
|
+
const { validationResults: n, errorsByRow: r } = pe(
|
|
462
|
+
t.rows,
|
|
463
|
+
t.schema,
|
|
464
|
+
t.mappings
|
|
465
|
+
);
|
|
466
|
+
e({ validationResults: n, errorsByRow: r });
|
|
467
|
+
},
|
|
197
468
|
setStep: (t) => e({ step: t }),
|
|
198
469
|
nextStep: () => {
|
|
199
470
|
const t = ["upload", "mapping", "validation", "review", "complete"], n = t.indexOf(o().step);
|
|
@@ -207,56 +478,57 @@ const Lt = [
|
|
|
207
478
|
editingCell: { rowIndex: t, columnKey: n }
|
|
208
479
|
}),
|
|
209
480
|
stopEditing: () => e({ editingCell: null }),
|
|
210
|
-
updateCell: (t, n, r) =>
|
|
211
|
-
const i = [...l.rows], s = i.find((f) => f.rowIndex === t);
|
|
481
|
+
updateCell: (t, n, r) => {
|
|
482
|
+
const l = o(), i = [...l.rows], s = i.find((f) => f.rowIndex === t);
|
|
212
483
|
s && (s.data = { ...s.data, [n]: String(r) });
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
totalRows: n.validationResults.totalRows - 1,
|
|
227
|
-
errors: n.validationResults.errors.filter((a) => a.rowIndex !== t).map((a) => ({ ...a, rowIndex: a.rowIndex > t ? a.rowIndex - 1 : a.rowIndex }))
|
|
228
|
-
} : null;
|
|
229
|
-
return {
|
|
484
|
+
const u = new Set(l.editedRows);
|
|
485
|
+
if (u.add(t), e({ rows: i, editedRows: u, editingCell: null }), l.schema && l.validationResults) {
|
|
486
|
+
const { validationResults: f, errorsByRow: g } = pe(
|
|
487
|
+
i,
|
|
488
|
+
l.schema,
|
|
489
|
+
l.mappings
|
|
490
|
+
);
|
|
491
|
+
e({ validationResults: f, errorsByRow: g });
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
deleteRow: (t) => {
|
|
495
|
+
const n = o(), l = n.rows.filter((i) => i.rowIndex !== t).map((i, s) => ({ ...i, rowIndex: s }));
|
|
496
|
+
if (e({
|
|
230
497
|
rows: l,
|
|
231
|
-
totalRows: l.length
|
|
232
|
-
|
|
233
|
-
validationResults: s
|
|
234
|
-
|
|
235
|
-
|
|
498
|
+
totalRows: l.length
|
|
499
|
+
}), n.schema && n.validationResults) {
|
|
500
|
+
const { validationResults: i, errorsByRow: s } = pe(
|
|
501
|
+
l,
|
|
502
|
+
n.schema,
|
|
503
|
+
n.mappings
|
|
504
|
+
);
|
|
505
|
+
e({ validationResults: i, errorsByRow: s });
|
|
506
|
+
}
|
|
507
|
+
},
|
|
236
508
|
setStatus: (t) => e({ status: t }),
|
|
237
509
|
setLoading: (t) => e({ isLoading: t }),
|
|
238
510
|
setError: (t) => e({ error: t }),
|
|
239
|
-
reset: () => e(
|
|
240
|
-
})),
|
|
511
|
+
reset: () => e(Ke)
|
|
512
|
+
})), Bt = ({
|
|
241
513
|
onFileSelect: e,
|
|
242
514
|
maxSize: o = 50 * 1024 * 1024,
|
|
243
515
|
// 50MB
|
|
244
516
|
acceptedTypes: t = [".csv", ".xlsx", ".xls"]
|
|
245
517
|
}) => {
|
|
246
|
-
const { file: n, fileName: r, fileSize: l, setFile: i, error: s, setError:
|
|
247
|
-
(
|
|
248
|
-
if (
|
|
249
|
-
|
|
518
|
+
const { file: n, fileName: r, fileSize: l, setFile: i, error: s, setError: u, isLoading: f } = Z(), g = Ne(
|
|
519
|
+
(C, h) => {
|
|
520
|
+
if (h.length > 0) {
|
|
521
|
+
u("Invalid file type or file too large");
|
|
250
522
|
return;
|
|
251
523
|
}
|
|
252
|
-
if (
|
|
253
|
-
const
|
|
254
|
-
i(
|
|
524
|
+
if (C.length > 0) {
|
|
525
|
+
const S = C[0];
|
|
526
|
+
i(S), e == null || e(S);
|
|
255
527
|
}
|
|
256
528
|
},
|
|
257
|
-
[e, i,
|
|
258
|
-
), { getRootProps:
|
|
259
|
-
onDrop:
|
|
529
|
+
[e, i, u]
|
|
530
|
+
), { getRootProps: p, getInputProps: d, isDragActive: a } = ht({
|
|
531
|
+
onDrop: g,
|
|
260
532
|
accept: {
|
|
261
533
|
"text/csv": [".csv"],
|
|
262
534
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
|
|
@@ -265,45 +537,45 @@ const Lt = [
|
|
|
265
537
|
maxSize: o,
|
|
266
538
|
multiple: !1,
|
|
267
539
|
disabled: f
|
|
268
|
-
}), m = (
|
|
269
|
-
|
|
540
|
+
}), m = (C) => C < 1024 ? `${C} B` : C < 1024 * 1024 ? `${(C / 1024).toFixed(1)} KB` : `${(C / (1024 * 1024)).toFixed(1)} MB`, v = (C) => {
|
|
541
|
+
C.stopPropagation(), Z.getState().reset();
|
|
270
542
|
};
|
|
271
|
-
return n ? /* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
543
|
+
return n ? /* @__PURE__ */ c("div", { className: "ff-p-4 ff-rounded-xl ff-border", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
|
|
544
|
+
/* @__PURE__ */ c("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ c(Et, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
|
|
545
|
+
/* @__PURE__ */ w("div", { className: "ff-flex-1 ff-min-w-0", children: [
|
|
546
|
+
/* @__PURE__ */ c("p", { className: "ff-font-medium ff-truncate", style: { color: "var(--ff-success-dark)" }, children: r }),
|
|
547
|
+
/* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: m(l || 0) })
|
|
276
548
|
] }),
|
|
277
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ c(
|
|
278
550
|
"button",
|
|
279
551
|
{
|
|
280
|
-
onClick:
|
|
552
|
+
onClick: v,
|
|
281
553
|
className: "ff-p-1.5 ff-rounded-full ff-transition-colors",
|
|
282
554
|
style: { color: "var(--ff-success)" },
|
|
283
555
|
"aria-label": "Remove file",
|
|
284
|
-
children: /* @__PURE__ */
|
|
556
|
+
children: /* @__PURE__ */ c(ae, { className: "ff-w-5 ff-h-5" })
|
|
285
557
|
}
|
|
286
558
|
)
|
|
287
|
-
] }) }) : /* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */
|
|
559
|
+
] }) }) : /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
|
|
560
|
+
/* @__PURE__ */ w(
|
|
289
561
|
"div",
|
|
290
562
|
{
|
|
291
|
-
...
|
|
292
|
-
className:
|
|
563
|
+
...p(),
|
|
564
|
+
className: U(
|
|
293
565
|
"ff-dropzone",
|
|
294
|
-
|
|
566
|
+
a && "ff-dropzone-active",
|
|
295
567
|
f && "ff-opacity-50 ff-cursor-not-allowed"
|
|
296
568
|
),
|
|
297
569
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
/* @__PURE__ */
|
|
302
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ c("input", { ...d() }),
|
|
571
|
+
/* @__PURE__ */ c("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ c(Qe, { className: "ff-dropzone-icon" }) }),
|
|
572
|
+
/* @__PURE__ */ c("h3", { className: "ff-dropzone-text", children: a ? "Drop your file here" : "Upload your file" }),
|
|
573
|
+
/* @__PURE__ */ c("p", { className: "ff-dropzone-hint", children: "Drag and drop or click to select" }),
|
|
574
|
+
/* @__PURE__ */ c("label", { className: "ff-inline-block", children: /* @__PURE__ */ c("span", { className: U(
|
|
303
575
|
"ff-btn ff-btn-primary",
|
|
304
576
|
f && "ff-opacity-50 ff-cursor-wait"
|
|
305
577
|
), children: f ? "Processing..." : "Choose file" }) }),
|
|
306
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ w("p", { className: "ff-dropzone-formats", children: [
|
|
307
579
|
"Supports ",
|
|
308
580
|
t.join(", "),
|
|
309
581
|
" up to ",
|
|
@@ -312,66 +584,66 @@ const Lt = [
|
|
|
312
584
|
]
|
|
313
585
|
}
|
|
314
586
|
),
|
|
315
|
-
s && /* @__PURE__ */
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
/* @__PURE__ */
|
|
587
|
+
s && /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", color: "var(--ff-error)" }, children: [
|
|
588
|
+
/* @__PURE__ */ c(Pe, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
|
|
589
|
+
/* @__PURE__ */ c("p", { children: s })
|
|
318
590
|
] })
|
|
319
591
|
] });
|
|
320
|
-
},
|
|
321
|
-
const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } =
|
|
322
|
-
const
|
|
323
|
-
r(
|
|
324
|
-
}, s = (
|
|
325
|
-
o.filter((
|
|
592
|
+
}, Kt = ({ onMappingChange: e }) => {
|
|
593
|
+
const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = Z(), l = (t == null ? void 0 : t.columns) || [], i = (p, d) => {
|
|
594
|
+
const a = d === "" ? null : d;
|
|
595
|
+
r(p, a), e == null || e(p, a);
|
|
596
|
+
}, s = (p) => p >= 0.85 ? "var(--ff-success)" : p >= 0.6 ? "var(--ff-warning)" : "var(--ff-error)", u = (p) => p >= 0.85 ? "High" : p >= 0.6 ? "Medium" : "Low", g = new Set(
|
|
597
|
+
o.filter((p) => p.targetKey !== null).map((p) => p.targetKey)
|
|
326
598
|
);
|
|
327
|
-
return /* @__PURE__ */
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
599
|
+
return /* @__PURE__ */ w("div", { className: "ff-space-y-4", children: [
|
|
600
|
+
/* @__PURE__ */ w("div", { className: "ff-mapping-header", children: [
|
|
601
|
+
/* @__PURE__ */ w("div", { children: [
|
|
602
|
+
/* @__PURE__ */ c("h3", { className: "ff-mapping-title", children: "Column Mapping" }),
|
|
603
|
+
/* @__PURE__ */ c("p", { className: "ff-mapping-subtitle", children: "Match your file columns to the expected fields" })
|
|
332
604
|
] }),
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ w("div", { className: "ff-mapping-legend", children: [
|
|
606
|
+
/* @__PURE__ */ w("span", { className: "ff-mapping-legend-item", children: [
|
|
607
|
+
/* @__PURE__ */ c("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-success)" } }),
|
|
608
|
+
/* @__PURE__ */ c("span", { style: { color: "var(--ff-text-secondary)" }, children: "Mapped" })
|
|
337
609
|
] }),
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ w("span", { className: "ff-mapping-legend-item", children: [
|
|
611
|
+
/* @__PURE__ */ c("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-warning)" } }),
|
|
612
|
+
/* @__PURE__ */ c("span", { style: { color: "var(--ff-text-secondary)" }, children: "Review" })
|
|
341
613
|
] }),
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ w("span", { className: "ff-mapping-legend-item", children: [
|
|
615
|
+
/* @__PURE__ */ c("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-gray-70)" } }),
|
|
616
|
+
/* @__PURE__ */ c("span", { style: { color: "var(--ff-text-secondary)" }, children: "Unmapped" })
|
|
345
617
|
] })
|
|
346
618
|
] })
|
|
347
619
|
] }),
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
-
l.find((m) => m.key ===
|
|
350
|
-
const d =
|
|
351
|
-
return /* @__PURE__ */
|
|
620
|
+
/* @__PURE__ */ c("div", { className: "ff-space-y-2", children: o.map((p) => {
|
|
621
|
+
l.find((m) => m.key === p.targetKey);
|
|
622
|
+
const d = p.targetKey !== null, a = p.confidence >= 0.85;
|
|
623
|
+
return /* @__PURE__ */ w(
|
|
352
624
|
"div",
|
|
353
625
|
{
|
|
354
|
-
className:
|
|
626
|
+
className: U(
|
|
355
627
|
"ff-mapping-row",
|
|
356
|
-
d &&
|
|
357
|
-
d && !
|
|
628
|
+
d && a && "ff-mapping-row-success",
|
|
629
|
+
d && !a && "ff-mapping-row-warning"
|
|
358
630
|
),
|
|
359
631
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ c("div", { className: "ff-flex-1", children: /* @__PURE__ */ c("div", { className: "ff-mapping-source", children: p.sourceColumn }) }),
|
|
633
|
+
/* @__PURE__ */ c("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ c(yt, { className: "ff-w-5 ff-h-5" }) }),
|
|
634
|
+
/* @__PURE__ */ c("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ w(
|
|
363
635
|
"select",
|
|
364
636
|
{
|
|
365
|
-
value:
|
|
366
|
-
onChange: (m) => i(
|
|
637
|
+
value: p.targetKey || "",
|
|
638
|
+
onChange: (m) => i(p.sourceColumn, m.target.value),
|
|
367
639
|
className: "ff-input",
|
|
368
640
|
children: [
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
l.map((m) => /* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ c("option", { value: "", children: "-- Do not import --" }),
|
|
642
|
+
l.map((m) => /* @__PURE__ */ w(
|
|
371
643
|
"option",
|
|
372
644
|
{
|
|
373
645
|
value: m.key,
|
|
374
|
-
disabled:
|
|
646
|
+
disabled: g.has(m.key) && p.targetKey !== m.key,
|
|
375
647
|
children: [
|
|
376
648
|
m.label,
|
|
377
649
|
" (",
|
|
@@ -385,32 +657,32 @@ const Lt = [
|
|
|
385
657
|
]
|
|
386
658
|
}
|
|
387
659
|
) }),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
Math.round(
|
|
660
|
+
/* @__PURE__ */ c("div", { className: "ff-mapping-status", children: d ? a ? /* @__PURE__ */ c(xt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ c(It, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ c("span", { className: "ff-w-5 ff-h-5" }) }),
|
|
661
|
+
p.confidence > 0 && /* @__PURE__ */ w("div", { className: "ff-confidence", style: { color: s(p.confidence) }, children: [
|
|
662
|
+
/* @__PURE__ */ w("span", { children: [
|
|
663
|
+
Math.round(p.confidence * 100),
|
|
392
664
|
"%"
|
|
393
665
|
] }),
|
|
394
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ w("span", { style: { color: "var(--ff-text-muted)" }, children: [
|
|
395
667
|
"(",
|
|
396
|
-
|
|
668
|
+
u(p.confidence),
|
|
397
669
|
")"
|
|
398
670
|
] })
|
|
399
671
|
] })
|
|
400
672
|
]
|
|
401
673
|
},
|
|
402
|
-
|
|
674
|
+
p.sourceColumn
|
|
403
675
|
);
|
|
404
676
|
}) }),
|
|
405
677
|
(() => {
|
|
406
|
-
const
|
|
407
|
-
(d) => d.required && !
|
|
678
|
+
const p = l.filter(
|
|
679
|
+
(d) => d.required && !g.has(d.key)
|
|
408
680
|
);
|
|
409
|
-
return
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
681
|
+
return p.length > 0 ? /* @__PURE__ */ w("div", { className: "ff-flex ff-items-start ff-gap-2 ff-p-4 ff-rounded-lg", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
|
|
682
|
+
/* @__PURE__ */ c(Pe, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
|
|
683
|
+
/* @__PURE__ */ w("div", { children: [
|
|
684
|
+
/* @__PURE__ */ c("p", { className: "ff-text-sm ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Required fields not mapped" }),
|
|
685
|
+
/* @__PURE__ */ c("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: p.map((d) => d.label).join(", ") })
|
|
414
686
|
] })
|
|
415
687
|
] }) : null;
|
|
416
688
|
})()
|
|
@@ -426,7 +698,7 @@ const Lt = [
|
|
|
426
698
|
*
|
|
427
699
|
* @license MIT
|
|
428
700
|
*/
|
|
429
|
-
function
|
|
701
|
+
function qt() {
|
|
430
702
|
return {
|
|
431
703
|
accessor: (e, o) => typeof e == "function" ? {
|
|
432
704
|
...o,
|
|
@@ -439,24 +711,24 @@ function Gt() {
|
|
|
439
711
|
group: (e) => e
|
|
440
712
|
};
|
|
441
713
|
}
|
|
442
|
-
function
|
|
714
|
+
function j(e, o) {
|
|
443
715
|
return typeof e == "function" ? e(o) : e;
|
|
444
716
|
}
|
|
445
717
|
function L(e, o) {
|
|
446
718
|
return (t) => {
|
|
447
719
|
o.setState((n) => ({
|
|
448
720
|
...n,
|
|
449
|
-
[e]:
|
|
721
|
+
[e]: j(t, n[e])
|
|
450
722
|
}));
|
|
451
723
|
};
|
|
452
724
|
}
|
|
453
|
-
function
|
|
725
|
+
function ue(e) {
|
|
454
726
|
return e instanceof Function;
|
|
455
727
|
}
|
|
456
|
-
function
|
|
728
|
+
function jt(e) {
|
|
457
729
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
|
458
730
|
}
|
|
459
|
-
function
|
|
731
|
+
function Ut(e, o) {
|
|
460
732
|
const t = [], n = (r) => {
|
|
461
733
|
r.forEach((l) => {
|
|
462
734
|
t.push(l);
|
|
@@ -466,23 +738,23 @@ function bt(e, o) {
|
|
|
466
738
|
};
|
|
467
739
|
return n(e), t;
|
|
468
740
|
}
|
|
469
|
-
function
|
|
741
|
+
function y(e, o, t) {
|
|
470
742
|
let n = [], r;
|
|
471
743
|
return (l) => {
|
|
472
744
|
let i;
|
|
473
745
|
t.key && t.debug && (i = Date.now());
|
|
474
746
|
const s = e(l);
|
|
475
|
-
if (!(s.length !== n.length || s.some((
|
|
747
|
+
if (!(s.length !== n.length || s.some((g, p) => n[p] !== g)))
|
|
476
748
|
return r;
|
|
477
749
|
n = s;
|
|
478
750
|
let f;
|
|
479
751
|
if (t.key && t.debug && (f = Date.now()), r = o(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
480
|
-
const
|
|
481
|
-
for (m = String(m); m.length <
|
|
752
|
+
const g = Math.round((Date.now() - i) * 100) / 100, p = Math.round((Date.now() - f) * 100) / 100, d = p / 16, a = (m, v) => {
|
|
753
|
+
for (m = String(m); m.length < v; )
|
|
482
754
|
m = " " + m;
|
|
483
755
|
return m;
|
|
484
756
|
};
|
|
485
|
-
console.info(`%c⏱ ${
|
|
757
|
+
console.info(`%c⏱ ${a(p, 5)} /${a(g, 5)} ms`, `
|
|
486
758
|
font-size: .6rem;
|
|
487
759
|
font-weight: bold;
|
|
488
760
|
color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
@@ -490,7 +762,7 @@ function C(e, o, t) {
|
|
|
490
762
|
return r;
|
|
491
763
|
};
|
|
492
764
|
}
|
|
493
|
-
function
|
|
765
|
+
function R(e, o, t, n) {
|
|
494
766
|
return {
|
|
495
767
|
debug: () => {
|
|
496
768
|
var r;
|
|
@@ -500,7 +772,7 @@ function S(e, o, t, n) {
|
|
|
500
772
|
onChange: n
|
|
501
773
|
};
|
|
502
774
|
}
|
|
503
|
-
function
|
|
775
|
+
function Xt(e, o, t, n) {
|
|
504
776
|
const r = () => {
|
|
505
777
|
var i;
|
|
506
778
|
return (i = l.getValue()) != null ? i : e.options.renderFallbackValue;
|
|
@@ -510,61 +782,61 @@ function Bt(e, o, t, n) {
|
|
|
510
782
|
column: t,
|
|
511
783
|
getValue: () => o.getValue(n),
|
|
512
784
|
renderValue: r,
|
|
513
|
-
getContext:
|
|
785
|
+
getContext: y(() => [e, t, o, l], (i, s, u, f) => ({
|
|
514
786
|
table: i,
|
|
515
787
|
column: s,
|
|
516
|
-
row:
|
|
788
|
+
row: u,
|
|
517
789
|
cell: f,
|
|
518
790
|
getValue: f.getValue,
|
|
519
791
|
renderValue: f.renderValue
|
|
520
|
-
}),
|
|
792
|
+
}), R(e.options, "debugCells", "cell.getContext"))
|
|
521
793
|
};
|
|
522
794
|
return e._features.forEach((i) => {
|
|
523
795
|
i.createCell == null || i.createCell(l, t, o, e);
|
|
524
796
|
}, {}), l;
|
|
525
797
|
}
|
|
526
|
-
function
|
|
798
|
+
function Wt(e, o, t, n) {
|
|
527
799
|
var r, l;
|
|
528
800
|
const s = {
|
|
529
801
|
...e._getDefaultColumnDef(),
|
|
530
802
|
...o
|
|
531
|
-
},
|
|
532
|
-
let f = (r = (l = s.id) != null ? l :
|
|
533
|
-
if (s.accessorFn ?
|
|
534
|
-
let
|
|
535
|
-
for (const
|
|
803
|
+
}, u = s.accessorKey;
|
|
804
|
+
let f = (r = (l = s.id) != null ? l : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, g;
|
|
805
|
+
if (s.accessorFn ? g = s.accessorFn : u && (u.includes(".") ? g = (d) => {
|
|
806
|
+
let a = d;
|
|
807
|
+
for (const v of u.split(".")) {
|
|
536
808
|
var m;
|
|
537
|
-
|
|
809
|
+
a = (m = a) == null ? void 0 : m[v], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${v}" in deeply nested key "${u}" returned undefined.`);
|
|
538
810
|
}
|
|
539
|
-
return
|
|
540
|
-
} :
|
|
811
|
+
return a;
|
|
812
|
+
} : g = (d) => d[s.accessorKey]), !f)
|
|
541
813
|
throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
542
|
-
let
|
|
814
|
+
let p = {
|
|
543
815
|
id: `${String(f)}`,
|
|
544
|
-
accessorFn:
|
|
816
|
+
accessorFn: g,
|
|
545
817
|
parent: n,
|
|
546
818
|
depth: t,
|
|
547
819
|
columnDef: s,
|
|
548
820
|
columns: [],
|
|
549
|
-
getFlatColumns:
|
|
821
|
+
getFlatColumns: y(() => [!0], () => {
|
|
550
822
|
var d;
|
|
551
|
-
return [
|
|
552
|
-
},
|
|
553
|
-
getLeafColumns:
|
|
554
|
-
var
|
|
555
|
-
if ((
|
|
556
|
-
let m =
|
|
823
|
+
return [p, ...(d = p.columns) == null ? void 0 : d.flatMap((a) => a.getFlatColumns())];
|
|
824
|
+
}, R(e.options, "debugColumns", "column.getFlatColumns")),
|
|
825
|
+
getLeafColumns: y(() => [e._getOrderColumnsFn()], (d) => {
|
|
826
|
+
var a;
|
|
827
|
+
if ((a = p.columns) != null && a.length) {
|
|
828
|
+
let m = p.columns.flatMap((v) => v.getLeafColumns());
|
|
557
829
|
return d(m);
|
|
558
830
|
}
|
|
559
|
-
return [
|
|
560
|
-
},
|
|
831
|
+
return [p];
|
|
832
|
+
}, R(e.options, "debugColumns", "column.getLeafColumns"))
|
|
561
833
|
};
|
|
562
834
|
for (const d of e._features)
|
|
563
|
-
d.createColumn == null || d.createColumn(
|
|
564
|
-
return
|
|
835
|
+
d.createColumn == null || d.createColumn(p, e);
|
|
836
|
+
return p;
|
|
565
837
|
}
|
|
566
|
-
const
|
|
567
|
-
function
|
|
838
|
+
const E = "debugHeaders";
|
|
839
|
+
function qe(e, o, t) {
|
|
568
840
|
var n;
|
|
569
841
|
let l = {
|
|
570
842
|
id: (n = t.id) != null ? n : o.id,
|
|
@@ -578,8 +850,8 @@ function Te(e, o, t) {
|
|
|
578
850
|
rowSpan: 0,
|
|
579
851
|
headerGroup: null,
|
|
580
852
|
getLeafHeaders: () => {
|
|
581
|
-
const i = [], s = (
|
|
582
|
-
|
|
853
|
+
const i = [], s = (u) => {
|
|
854
|
+
u.subHeaders && u.subHeaders.length && u.subHeaders.map(s), i.push(u);
|
|
583
855
|
};
|
|
584
856
|
return s(l), i;
|
|
585
857
|
},
|
|
@@ -593,92 +865,92 @@ function Te(e, o, t) {
|
|
|
593
865
|
i.createHeader == null || i.createHeader(l, e);
|
|
594
866
|
}), l;
|
|
595
867
|
}
|
|
596
|
-
const
|
|
868
|
+
const Qt = {
|
|
597
869
|
createTable: (e) => {
|
|
598
|
-
e.getHeaderGroups =
|
|
870
|
+
e.getHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
|
|
599
871
|
var l, i;
|
|
600
|
-
const s = (l = n == null ? void 0 : n.map((
|
|
601
|
-
return
|
|
602
|
-
},
|
|
872
|
+
const s = (l = n == null ? void 0 : n.map((p) => t.find((d) => d.id === p)).filter(Boolean)) != null ? l : [], u = (i = r == null ? void 0 : r.map((p) => t.find((d) => d.id === p)).filter(Boolean)) != null ? i : [], f = t.filter((p) => !(n != null && n.includes(p.id)) && !(r != null && r.includes(p.id)));
|
|
873
|
+
return le(o, [...s, ...f, ...u], e);
|
|
874
|
+
}, R(e.options, E, "getHeaderGroups")), e.getCenterHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), le(o, t, e, "center")), R(e.options, E, "getCenterHeaderGroups")), e.getLeftHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
|
603
875
|
var r;
|
|
604
876
|
const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
|
|
605
|
-
return
|
|
606
|
-
},
|
|
877
|
+
return le(o, l, e, "left");
|
|
878
|
+
}, R(e.options, E, "getLeftHeaderGroups")), e.getRightHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
|
|
607
879
|
var r;
|
|
608
880
|
const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
|
|
609
|
-
return
|
|
610
|
-
},
|
|
881
|
+
return le(o, l, e, "right");
|
|
882
|
+
}, R(e.options, E, "getRightHeaderGroups")), e.getFooterGroups = y(() => [e.getHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getFooterGroups")), e.getLeftFooterGroups = y(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getLeftFooterGroups")), e.getCenterFooterGroups = y(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getCenterFooterGroups")), e.getRightFooterGroups = y(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getRightFooterGroups")), e.getFlatHeaders = y(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getFlatHeaders")), e.getLeftFlatHeaders = y(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getLeftFlatHeaders")), e.getCenterFlatHeaders = y(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getCenterFlatHeaders")), e.getRightFlatHeaders = y(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getRightFlatHeaders")), e.getCenterLeafHeaders = y(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
611
883
|
var n;
|
|
612
884
|
return !((n = t.subHeaders) != null && n.length);
|
|
613
|
-
}),
|
|
885
|
+
}), R(e.options, E, "getCenterLeafHeaders")), e.getLeftLeafHeaders = y(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
|
614
886
|
var n;
|
|
615
887
|
return !((n = t.subHeaders) != null && n.length);
|
|
616
|
-
}),
|
|
888
|
+
}), R(e.options, E, "getLeftLeafHeaders")), e.getRightLeafHeaders = y(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
|
617
889
|
var n;
|
|
618
890
|
return !((n = t.subHeaders) != null && n.length);
|
|
619
|
-
}),
|
|
620
|
-
var r, l, i, s,
|
|
621
|
-
return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (s = t[0]) == null ? void 0 : s.headers) != null ? i : [], ...(
|
|
622
|
-
},
|
|
891
|
+
}), R(e.options, E, "getRightLeafHeaders")), e.getLeafHeaders = y(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
892
|
+
var r, l, i, s, u, f;
|
|
893
|
+
return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (s = t[0]) == null ? void 0 : s.headers) != null ? i : [], ...(u = (f = n[0]) == null ? void 0 : f.headers) != null ? u : []].map((g) => g.getLeafHeaders()).flat();
|
|
894
|
+
}, R(e.options, E, "getLeafHeaders"));
|
|
623
895
|
}
|
|
624
896
|
};
|
|
625
|
-
function
|
|
897
|
+
function le(e, o, t, n) {
|
|
626
898
|
var r, l;
|
|
627
899
|
let i = 0;
|
|
628
|
-
const s = function(d,
|
|
629
|
-
|
|
630
|
-
var
|
|
631
|
-
(
|
|
900
|
+
const s = function(d, a) {
|
|
901
|
+
a === void 0 && (a = 1), i = Math.max(i, a), d.filter((m) => m.getIsVisible()).forEach((m) => {
|
|
902
|
+
var v;
|
|
903
|
+
(v = m.columns) != null && v.length && s(m.columns, a + 1);
|
|
632
904
|
}, 0);
|
|
633
905
|
};
|
|
634
906
|
s(e);
|
|
635
|
-
let
|
|
636
|
-
const f = (d,
|
|
907
|
+
let u = [];
|
|
908
|
+
const f = (d, a) => {
|
|
637
909
|
const m = {
|
|
638
|
-
depth:
|
|
639
|
-
id: [n, `${
|
|
910
|
+
depth: a,
|
|
911
|
+
id: [n, `${a}`].filter(Boolean).join("_"),
|
|
640
912
|
headers: []
|
|
641
|
-
},
|
|
642
|
-
d.forEach((
|
|
643
|
-
const
|
|
644
|
-
let
|
|
645
|
-
if (
|
|
646
|
-
|
|
913
|
+
}, v = [];
|
|
914
|
+
d.forEach((C) => {
|
|
915
|
+
const h = [...v].reverse()[0], S = C.column.depth === m.depth;
|
|
916
|
+
let x, I = !1;
|
|
917
|
+
if (S && C.column.parent ? x = C.column.parent : (x = C.column, I = !0), h && (h == null ? void 0 : h.column) === x)
|
|
918
|
+
h.subHeaders.push(C);
|
|
647
919
|
else {
|
|
648
|
-
const
|
|
649
|
-
id: [n,
|
|
650
|
-
isPlaceholder:
|
|
651
|
-
placeholderId:
|
|
652
|
-
depth:
|
|
653
|
-
index:
|
|
920
|
+
const F = qe(t, x, {
|
|
921
|
+
id: [n, a, x.id, C == null ? void 0 : C.id].filter(Boolean).join("_"),
|
|
922
|
+
isPlaceholder: I,
|
|
923
|
+
placeholderId: I ? `${v.filter((V) => V.column === x).length}` : void 0,
|
|
924
|
+
depth: a,
|
|
925
|
+
index: v.length
|
|
654
926
|
});
|
|
655
|
-
|
|
927
|
+
F.subHeaders.push(C), v.push(F);
|
|
656
928
|
}
|
|
657
|
-
m.headers.push(
|
|
658
|
-
}),
|
|
659
|
-
},
|
|
929
|
+
m.headers.push(C), C.headerGroup = m;
|
|
930
|
+
}), u.push(m), a > 0 && f(v, a - 1);
|
|
931
|
+
}, g = o.map((d, a) => qe(t, d, {
|
|
660
932
|
depth: i,
|
|
661
|
-
index:
|
|
933
|
+
index: a
|
|
662
934
|
}));
|
|
663
|
-
f(
|
|
664
|
-
const
|
|
665
|
-
let
|
|
666
|
-
m.subHeaders && m.subHeaders.length ? (
|
|
935
|
+
f(g, i - 1), u.reverse();
|
|
936
|
+
const p = (d) => d.filter((m) => m.column.getIsVisible()).map((m) => {
|
|
937
|
+
let v = 0, C = 0, h = [0];
|
|
938
|
+
m.subHeaders && m.subHeaders.length ? (h = [], p(m.subHeaders).forEach((x) => {
|
|
667
939
|
let {
|
|
668
|
-
colSpan:
|
|
669
|
-
rowSpan:
|
|
670
|
-
} =
|
|
671
|
-
|
|
672
|
-
})) :
|
|
673
|
-
const
|
|
674
|
-
return
|
|
675
|
-
colSpan:
|
|
676
|
-
rowSpan:
|
|
940
|
+
colSpan: I,
|
|
941
|
+
rowSpan: F
|
|
942
|
+
} = x;
|
|
943
|
+
v += I, h.push(F);
|
|
944
|
+
})) : v = 1;
|
|
945
|
+
const S = Math.min(...h);
|
|
946
|
+
return C = C + S, m.colSpan = v, m.rowSpan = C, {
|
|
947
|
+
colSpan: v,
|
|
948
|
+
rowSpan: C
|
|
677
949
|
};
|
|
678
950
|
});
|
|
679
|
-
return
|
|
951
|
+
return p((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
|
|
680
952
|
}
|
|
681
|
-
const
|
|
953
|
+
const Ee = (e, o, t, n, r, l, i) => {
|
|
682
954
|
let s = {
|
|
683
955
|
id: o,
|
|
684
956
|
index: n,
|
|
@@ -687,92 +959,92 @@ const Ne = (e, o, t, n, r, l, i) => {
|
|
|
687
959
|
parentId: i,
|
|
688
960
|
_valuesCache: {},
|
|
689
961
|
_uniqueValuesCache: {},
|
|
690
|
-
getValue: (
|
|
691
|
-
if (s._valuesCache.hasOwnProperty(
|
|
692
|
-
return s._valuesCache[
|
|
693
|
-
const f = e.getColumn(
|
|
962
|
+
getValue: (u) => {
|
|
963
|
+
if (s._valuesCache.hasOwnProperty(u))
|
|
964
|
+
return s._valuesCache[u];
|
|
965
|
+
const f = e.getColumn(u);
|
|
694
966
|
if (f != null && f.accessorFn)
|
|
695
|
-
return s._valuesCache[
|
|
967
|
+
return s._valuesCache[u] = f.accessorFn(s.original, n), s._valuesCache[u];
|
|
696
968
|
},
|
|
697
|
-
getUniqueValues: (
|
|
698
|
-
if (s._uniqueValuesCache.hasOwnProperty(
|
|
699
|
-
return s._uniqueValuesCache[
|
|
700
|
-
const f = e.getColumn(
|
|
969
|
+
getUniqueValues: (u) => {
|
|
970
|
+
if (s._uniqueValuesCache.hasOwnProperty(u))
|
|
971
|
+
return s._uniqueValuesCache[u];
|
|
972
|
+
const f = e.getColumn(u);
|
|
701
973
|
if (f != null && f.accessorFn)
|
|
702
|
-
return f.columnDef.getUniqueValues ? (s._uniqueValuesCache[
|
|
974
|
+
return f.columnDef.getUniqueValues ? (s._uniqueValuesCache[u] = f.columnDef.getUniqueValues(s.original, n), s._uniqueValuesCache[u]) : (s._uniqueValuesCache[u] = [s.getValue(u)], s._uniqueValuesCache[u]);
|
|
703
975
|
},
|
|
704
|
-
renderValue: (
|
|
976
|
+
renderValue: (u) => {
|
|
705
977
|
var f;
|
|
706
|
-
return (f = s.getValue(
|
|
978
|
+
return (f = s.getValue(u)) != null ? f : e.options.renderFallbackValue;
|
|
707
979
|
},
|
|
708
980
|
subRows: [],
|
|
709
|
-
getLeafRows: () =>
|
|
981
|
+
getLeafRows: () => Ut(s.subRows, (u) => u.subRows),
|
|
710
982
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
711
983
|
getParentRows: () => {
|
|
712
|
-
let
|
|
984
|
+
let u = [], f = s;
|
|
713
985
|
for (; ; ) {
|
|
714
|
-
const
|
|
715
|
-
if (!
|
|
716
|
-
|
|
986
|
+
const g = f.getParentRow();
|
|
987
|
+
if (!g) break;
|
|
988
|
+
u.push(g), f = g;
|
|
717
989
|
}
|
|
718
|
-
return
|
|
990
|
+
return u.reverse();
|
|
719
991
|
},
|
|
720
|
-
getAllCells:
|
|
721
|
-
_getAllCellsByColumnId:
|
|
992
|
+
getAllCells: y(() => [e.getAllLeafColumns()], (u) => u.map((f) => Xt(e, s, f, f.id)), R(e.options, "debugRows", "getAllCells")),
|
|
993
|
+
_getAllCellsByColumnId: y(() => [s.getAllCells()], (u) => u.reduce((f, g) => (f[g.column.id] = g, f), {}), R(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
722
994
|
};
|
|
723
|
-
for (let
|
|
724
|
-
const f = e._features[
|
|
995
|
+
for (let u = 0; u < e._features.length; u++) {
|
|
996
|
+
const f = e._features[u];
|
|
725
997
|
f == null || f.createRow == null || f.createRow(s, e);
|
|
726
998
|
}
|
|
727
999
|
return s;
|
|
728
|
-
},
|
|
1000
|
+
}, Yt = {
|
|
729
1001
|
createColumn: (e, o) => {
|
|
730
1002
|
e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
|
|
731
1003
|
if (e._getFacetedMinMaxValues)
|
|
732
1004
|
return e._getFacetedMinMaxValues();
|
|
733
1005
|
};
|
|
734
1006
|
}
|
|
735
|
-
},
|
|
1007
|
+
}, Ye = (e, o, t) => {
|
|
736
1008
|
var n, r;
|
|
737
1009
|
const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
738
1010
|
return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
|
|
739
1011
|
};
|
|
740
|
-
|
|
741
|
-
const
|
|
1012
|
+
Ye.autoRemove = (e) => G(e);
|
|
1013
|
+
const Je = (e, o, t) => {
|
|
742
1014
|
var n;
|
|
743
1015
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
744
1016
|
};
|
|
745
|
-
|
|
746
|
-
const
|
|
1017
|
+
Je.autoRemove = (e) => G(e);
|
|
1018
|
+
const Ze = (e, o, t) => {
|
|
747
1019
|
var n;
|
|
748
1020
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
749
1021
|
};
|
|
750
|
-
|
|
751
|
-
const
|
|
1022
|
+
Ze.autoRemove = (e) => G(e);
|
|
1023
|
+
const et = (e, o, t) => {
|
|
752
1024
|
var n;
|
|
753
1025
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
754
1026
|
};
|
|
755
|
-
|
|
756
|
-
const
|
|
1027
|
+
et.autoRemove = (e) => G(e);
|
|
1028
|
+
const tt = (e, o, t) => !t.some((n) => {
|
|
757
1029
|
var r;
|
|
758
1030
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
|
759
1031
|
});
|
|
760
|
-
|
|
761
|
-
const
|
|
1032
|
+
tt.autoRemove = (e) => G(e) || !(e != null && e.length);
|
|
1033
|
+
const nt = (e, o, t) => t.some((n) => {
|
|
762
1034
|
var r;
|
|
763
1035
|
return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
|
|
764
1036
|
});
|
|
765
|
-
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
-
const
|
|
769
|
-
|
|
770
|
-
const
|
|
1037
|
+
nt.autoRemove = (e) => G(e) || !(e != null && e.length);
|
|
1038
|
+
const ot = (e, o, t) => e.getValue(o) === t;
|
|
1039
|
+
ot.autoRemove = (e) => G(e);
|
|
1040
|
+
const rt = (e, o, t) => e.getValue(o) == t;
|
|
1041
|
+
rt.autoRemove = (e) => G(e);
|
|
1042
|
+
const De = (e, o, t) => {
|
|
771
1043
|
let [n, r] = t;
|
|
772
1044
|
const l = e.getValue(o);
|
|
773
1045
|
return l >= n && l <= r;
|
|
774
1046
|
};
|
|
775
|
-
|
|
1047
|
+
De.resolveFilterValue = (e) => {
|
|
776
1048
|
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, l = o === null || Number.isNaN(n) ? -1 / 0 : n, i = t === null || Number.isNaN(r) ? 1 / 0 : r;
|
|
777
1049
|
if (l > i) {
|
|
778
1050
|
const s = l;
|
|
@@ -780,22 +1052,22 @@ Pe.resolveFilterValue = (e) => {
|
|
|
780
1052
|
}
|
|
781
1053
|
return [l, i];
|
|
782
1054
|
};
|
|
783
|
-
|
|
1055
|
+
De.autoRemove = (e) => G(e) || G(e[0]) && G(e[1]);
|
|
784
1056
|
const B = {
|
|
785
|
-
includesString:
|
|
786
|
-
includesStringSensitive:
|
|
787
|
-
equalsString:
|
|
788
|
-
arrIncludes:
|
|
789
|
-
arrIncludesAll:
|
|
790
|
-
arrIncludesSome:
|
|
791
|
-
equals:
|
|
792
|
-
weakEquals:
|
|
793
|
-
inNumberRange:
|
|
1057
|
+
includesString: Ye,
|
|
1058
|
+
includesStringSensitive: Je,
|
|
1059
|
+
equalsString: Ze,
|
|
1060
|
+
arrIncludes: et,
|
|
1061
|
+
arrIncludesAll: tt,
|
|
1062
|
+
arrIncludesSome: nt,
|
|
1063
|
+
equals: ot,
|
|
1064
|
+
weakEquals: rt,
|
|
1065
|
+
inNumberRange: De
|
|
794
1066
|
};
|
|
795
|
-
function
|
|
1067
|
+
function G(e) {
|
|
796
1068
|
return e == null || e === "";
|
|
797
1069
|
}
|
|
798
|
-
const
|
|
1070
|
+
const Jt = {
|
|
799
1071
|
getDefaultColumnDef: () => ({
|
|
800
1072
|
filterFn: "auto"
|
|
801
1073
|
}),
|
|
@@ -814,7 +1086,7 @@ const Ut = {
|
|
|
814
1086
|
return typeof n == "string" ? B.includesString : typeof n == "number" ? B.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? B.equals : Array.isArray(n) ? B.arrIncludes : B.weakEquals;
|
|
815
1087
|
}, e.getFilterFn = () => {
|
|
816
1088
|
var t, n;
|
|
817
|
-
return
|
|
1089
|
+
return ue(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
818
1090
|
// @ts-ignore
|
|
819
1091
|
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : B[e.columnDef.filterFn]
|
|
820
1092
|
);
|
|
@@ -829,20 +1101,20 @@ const Ut = {
|
|
|
829
1101
|
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
830
1102
|
}, e.setFilterValue = (t) => {
|
|
831
1103
|
o.setColumnFilters((n) => {
|
|
832
|
-
const r = e.getFilterFn(), l = n == null ? void 0 : n.find((
|
|
833
|
-
if (
|
|
1104
|
+
const r = e.getFilterFn(), l = n == null ? void 0 : n.find((g) => g.id === e.id), i = j(t, l ? l.value : void 0);
|
|
1105
|
+
if (je(r, i, e)) {
|
|
834
1106
|
var s;
|
|
835
|
-
return (s = n == null ? void 0 : n.filter((
|
|
1107
|
+
return (s = n == null ? void 0 : n.filter((g) => g.id !== e.id)) != null ? s : [];
|
|
836
1108
|
}
|
|
837
|
-
const
|
|
1109
|
+
const u = {
|
|
838
1110
|
id: e.id,
|
|
839
1111
|
value: i
|
|
840
1112
|
};
|
|
841
1113
|
if (l) {
|
|
842
1114
|
var f;
|
|
843
|
-
return (f = n == null ? void 0 : n.map((
|
|
1115
|
+
return (f = n == null ? void 0 : n.map((g) => g.id === e.id ? u : g)) != null ? f : [];
|
|
844
1116
|
}
|
|
845
|
-
return n != null && n.length ? [...n,
|
|
1117
|
+
return n != null && n.length ? [...n, u] : [u];
|
|
846
1118
|
});
|
|
847
1119
|
};
|
|
848
1120
|
},
|
|
@@ -853,11 +1125,11 @@ const Ut = {
|
|
|
853
1125
|
e.setColumnFilters = (o) => {
|
|
854
1126
|
const t = e.getAllLeafColumns(), n = (r) => {
|
|
855
1127
|
var l;
|
|
856
|
-
return (l =
|
|
857
|
-
const s = t.find((
|
|
1128
|
+
return (l = j(o, r)) == null ? void 0 : l.filter((i) => {
|
|
1129
|
+
const s = t.find((u) => u.id === i.id);
|
|
858
1130
|
if (s) {
|
|
859
|
-
const
|
|
860
|
-
if (
|
|
1131
|
+
const u = s.getFilterFn();
|
|
1132
|
+
if (je(u, i.value, s))
|
|
861
1133
|
return !1;
|
|
862
1134
|
}
|
|
863
1135
|
return !0;
|
|
@@ -870,57 +1142,57 @@ const Ut = {
|
|
|
870
1142
|
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
871
1143
|
}
|
|
872
1144
|
};
|
|
873
|
-
function
|
|
1145
|
+
function je(e, o, t) {
|
|
874
1146
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
|
875
1147
|
}
|
|
876
|
-
const
|
|
1148
|
+
const Zt = (e, o, t) => t.reduce((n, r) => {
|
|
877
1149
|
const l = r.getValue(e);
|
|
878
1150
|
return n + (typeof l == "number" ? l : 0);
|
|
879
|
-
}, 0),
|
|
1151
|
+
}, 0), en = (e, o, t) => {
|
|
880
1152
|
let n;
|
|
881
1153
|
return t.forEach((r) => {
|
|
882
1154
|
const l = r.getValue(e);
|
|
883
1155
|
l != null && (n > l || n === void 0 && l >= l) && (n = l);
|
|
884
1156
|
}), n;
|
|
885
|
-
},
|
|
1157
|
+
}, tn = (e, o, t) => {
|
|
886
1158
|
let n;
|
|
887
1159
|
return t.forEach((r) => {
|
|
888
1160
|
const l = r.getValue(e);
|
|
889
1161
|
l != null && (n < l || n === void 0 && l >= l) && (n = l);
|
|
890
1162
|
}), n;
|
|
891
|
-
},
|
|
1163
|
+
}, nn = (e, o, t) => {
|
|
892
1164
|
let n, r;
|
|
893
1165
|
return t.forEach((l) => {
|
|
894
1166
|
const i = l.getValue(e);
|
|
895
1167
|
i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i)));
|
|
896
1168
|
}), [n, r];
|
|
897
|
-
},
|
|
1169
|
+
}, on = (e, o) => {
|
|
898
1170
|
let t = 0, n = 0;
|
|
899
1171
|
if (o.forEach((r) => {
|
|
900
1172
|
let l = r.getValue(e);
|
|
901
1173
|
l != null && (l = +l) >= l && (++t, n += l);
|
|
902
1174
|
}), t) return n / t;
|
|
903
|
-
},
|
|
1175
|
+
}, rn = (e, o) => {
|
|
904
1176
|
if (!o.length)
|
|
905
1177
|
return;
|
|
906
1178
|
const t = o.map((l) => l.getValue(e));
|
|
907
|
-
if (!
|
|
1179
|
+
if (!jt(t))
|
|
908
1180
|
return;
|
|
909
1181
|
if (t.length === 1)
|
|
910
1182
|
return t[0];
|
|
911
1183
|
const n = Math.floor(t.length / 2), r = t.sort((l, i) => l - i);
|
|
912
1184
|
return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
|
|
913
|
-
},
|
|
914
|
-
sum:
|
|
915
|
-
min:
|
|
916
|
-
max:
|
|
917
|
-
extent:
|
|
918
|
-
mean:
|
|
919
|
-
median:
|
|
920
|
-
unique:
|
|
921
|
-
uniqueCount:
|
|
922
|
-
count:
|
|
923
|
-
},
|
|
1185
|
+
}, ln = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), sn = (e, o) => new Set(o.map((t) => t.getValue(e))).size, an = (e, o) => o.length, me = {
|
|
1186
|
+
sum: Zt,
|
|
1187
|
+
min: en,
|
|
1188
|
+
max: tn,
|
|
1189
|
+
extent: nn,
|
|
1190
|
+
mean: on,
|
|
1191
|
+
median: rn,
|
|
1192
|
+
unique: ln,
|
|
1193
|
+
uniqueCount: sn,
|
|
1194
|
+
count: an
|
|
1195
|
+
}, un = {
|
|
924
1196
|
getDefaultColumnDef: () => ({
|
|
925
1197
|
aggregatedCell: (e) => {
|
|
926
1198
|
var o, t;
|
|
@@ -956,14 +1228,14 @@ const Kt = (e, o, t) => t.reduce((n, r) => {
|
|
|
956
1228
|
}, e.getAutoAggregationFn = () => {
|
|
957
1229
|
const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
|
|
958
1230
|
if (typeof n == "number")
|
|
959
|
-
return
|
|
1231
|
+
return me.sum;
|
|
960
1232
|
if (Object.prototype.toString.call(n) === "[object Date]")
|
|
961
|
-
return
|
|
1233
|
+
return me.extent;
|
|
962
1234
|
}, e.getAggregationFn = () => {
|
|
963
1235
|
var t, n;
|
|
964
1236
|
if (!e)
|
|
965
1237
|
throw new Error();
|
|
966
|
-
return
|
|
1238
|
+
return ue(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : me[e.columnDef.aggregationFn];
|
|
967
1239
|
};
|
|
968
1240
|
},
|
|
969
1241
|
createTable: (e) => {
|
|
@@ -987,13 +1259,13 @@ const Kt = (e, o, t) => t.reduce((n, r) => {
|
|
|
987
1259
|
};
|
|
988
1260
|
}
|
|
989
1261
|
};
|
|
990
|
-
function
|
|
1262
|
+
function fn(e, o, t) {
|
|
991
1263
|
if (!(o != null && o.length) || !t)
|
|
992
1264
|
return e;
|
|
993
1265
|
const n = e.filter((l) => !o.includes(l.id));
|
|
994
1266
|
return t === "remove" ? n : [...o.map((l) => e.find((i) => i.id === l)).filter(Boolean), ...n];
|
|
995
1267
|
}
|
|
996
|
-
const
|
|
1268
|
+
const dn = {
|
|
997
1269
|
getInitialState: (e) => ({
|
|
998
1270
|
columnOrder: [],
|
|
999
1271
|
...e
|
|
@@ -1002,12 +1274,12 @@ const rn = {
|
|
|
1002
1274
|
onColumnOrderChange: L("columnOrder", e)
|
|
1003
1275
|
}),
|
|
1004
1276
|
createColumn: (e, o) => {
|
|
1005
|
-
e.getIndex =
|
|
1277
|
+
e.getIndex = y((t) => [oe(o, t)], (t) => t.findIndex((n) => n.id === e.id), R(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
1006
1278
|
var n;
|
|
1007
|
-
return ((n =
|
|
1279
|
+
return ((n = oe(o, t)[0]) == null ? void 0 : n.id) === e.id;
|
|
1008
1280
|
}, e.getIsLastColumn = (t) => {
|
|
1009
1281
|
var n;
|
|
1010
|
-
const r =
|
|
1282
|
+
const r = oe(o, t);
|
|
1011
1283
|
return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
|
|
1012
1284
|
};
|
|
1013
1285
|
},
|
|
@@ -1015,27 +1287,27 @@ const rn = {
|
|
|
1015
1287
|
e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
|
|
1016
1288
|
var t;
|
|
1017
1289
|
e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
1018
|
-
}, e._getOrderColumnsFn =
|
|
1290
|
+
}, e._getOrderColumnsFn = y(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
|
|
1019
1291
|
let l = [];
|
|
1020
1292
|
if (!(o != null && o.length))
|
|
1021
1293
|
l = r;
|
|
1022
1294
|
else {
|
|
1023
1295
|
const i = [...o], s = [...r];
|
|
1024
1296
|
for (; s.length && i.length; ) {
|
|
1025
|
-
const
|
|
1297
|
+
const u = i.shift(), f = s.findIndex((g) => g.id === u);
|
|
1026
1298
|
f > -1 && l.push(s.splice(f, 1)[0]);
|
|
1027
1299
|
}
|
|
1028
1300
|
l = [...l, ...s];
|
|
1029
1301
|
}
|
|
1030
|
-
return
|
|
1031
|
-
},
|
|
1302
|
+
return fn(l, t, n);
|
|
1303
|
+
}, R(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
1032
1304
|
}
|
|
1033
|
-
},
|
|
1305
|
+
}, he = () => ({
|
|
1034
1306
|
left: [],
|
|
1035
1307
|
right: []
|
|
1036
|
-
}),
|
|
1308
|
+
}), cn = {
|
|
1037
1309
|
getInitialState: (e) => ({
|
|
1038
|
-
columnPinning:
|
|
1310
|
+
columnPinning: he(),
|
|
1039
1311
|
...e
|
|
1040
1312
|
}),
|
|
1041
1313
|
getDefaultOptions: (e) => ({
|
|
@@ -1047,22 +1319,22 @@ const rn = {
|
|
|
1047
1319
|
o.setColumnPinning((r) => {
|
|
1048
1320
|
var l, i;
|
|
1049
1321
|
if (t === "right") {
|
|
1050
|
-
var s,
|
|
1322
|
+
var s, u;
|
|
1051
1323
|
return {
|
|
1052
|
-
left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((
|
|
1053
|
-
right: [...((
|
|
1324
|
+
left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((p) => !(n != null && n.includes(p))),
|
|
1325
|
+
right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((p) => !(n != null && n.includes(p))), ...n]
|
|
1054
1326
|
};
|
|
1055
1327
|
}
|
|
1056
1328
|
if (t === "left") {
|
|
1057
|
-
var f,
|
|
1329
|
+
var f, g;
|
|
1058
1330
|
return {
|
|
1059
|
-
left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((
|
|
1060
|
-
right: ((
|
|
1331
|
+
left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((p) => !(n != null && n.includes(p))), ...n],
|
|
1332
|
+
right: ((g = r == null ? void 0 : r.right) != null ? g : []).filter((p) => !(n != null && n.includes(p)))
|
|
1061
1333
|
};
|
|
1062
1334
|
}
|
|
1063
1335
|
return {
|
|
1064
|
-
left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((
|
|
1065
|
-
right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((
|
|
1336
|
+
left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((p) => !(n != null && n.includes(p))),
|
|
1337
|
+
right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((p) => !(n != null && n.includes(p)))
|
|
1066
1338
|
};
|
|
1067
1339
|
});
|
|
1068
1340
|
}, e.getCanPin = () => e.getLeafColumns().some((n) => {
|
|
@@ -1081,21 +1353,21 @@ const rn = {
|
|
|
1081
1353
|
};
|
|
1082
1354
|
},
|
|
1083
1355
|
createRow: (e, o) => {
|
|
1084
|
-
e.getCenterVisibleCells =
|
|
1356
|
+
e.getCenterVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
|
|
1085
1357
|
const l = [...n ?? [], ...r ?? []];
|
|
1086
1358
|
return t.filter((i) => !l.includes(i.column.id));
|
|
1087
|
-
},
|
|
1359
|
+
}, R(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
|
|
1088
1360
|
...l,
|
|
1089
1361
|
position: "left"
|
|
1090
|
-
})),
|
|
1362
|
+
})), R(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
|
|
1091
1363
|
...l,
|
|
1092
1364
|
position: "right"
|
|
1093
|
-
})),
|
|
1365
|
+
})), R(o.options, "debugRows", "getRightVisibleCells"));
|
|
1094
1366
|
},
|
|
1095
1367
|
createTable: (e) => {
|
|
1096
1368
|
e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
|
|
1097
1369
|
var t, n;
|
|
1098
|
-
return e.setColumnPinning(o ?
|
|
1370
|
+
return e.setColumnPinning(o ? he() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : he());
|
|
1099
1371
|
}, e.getIsSomeColumnsPinned = (o) => {
|
|
1100
1372
|
var t;
|
|
1101
1373
|
const n = e.getState().columnPinning;
|
|
@@ -1104,31 +1376,31 @@ const rn = {
|
|
|
1104
1376
|
return !!((r = n.left) != null && r.length || (l = n.right) != null && l.length);
|
|
1105
1377
|
}
|
|
1106
1378
|
return !!((t = n[o]) != null && t.length);
|
|
1107
|
-
}, e.getLeftLeafColumns =
|
|
1379
|
+
}, e.getLeftLeafColumns = y(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = y(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = y(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
|
|
1108
1380
|
const r = [...t ?? [], ...n ?? []];
|
|
1109
1381
|
return o.filter((l) => !r.includes(l.id));
|
|
1110
|
-
},
|
|
1382
|
+
}, R(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
1111
1383
|
}
|
|
1112
1384
|
};
|
|
1113
|
-
function
|
|
1385
|
+
function gn(e) {
|
|
1114
1386
|
return e || (typeof document < "u" ? document : null);
|
|
1115
1387
|
}
|
|
1116
|
-
const
|
|
1388
|
+
const ie = {
|
|
1117
1389
|
size: 150,
|
|
1118
1390
|
minSize: 20,
|
|
1119
1391
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
1120
|
-
},
|
|
1392
|
+
}, ve = () => ({
|
|
1121
1393
|
startOffset: null,
|
|
1122
1394
|
startSize: null,
|
|
1123
1395
|
deltaOffset: null,
|
|
1124
1396
|
deltaPercentage: null,
|
|
1125
1397
|
isResizingColumn: !1,
|
|
1126
1398
|
columnSizingStart: []
|
|
1127
|
-
}),
|
|
1128
|
-
getDefaultColumnDef: () =>
|
|
1399
|
+
}), pn = {
|
|
1400
|
+
getDefaultColumnDef: () => ie,
|
|
1129
1401
|
getInitialState: (e) => ({
|
|
1130
1402
|
columnSizing: {},
|
|
1131
|
-
columnSizingInfo:
|
|
1403
|
+
columnSizingInfo: ve(),
|
|
1132
1404
|
...e
|
|
1133
1405
|
}),
|
|
1134
1406
|
getDefaultOptions: (e) => ({
|
|
@@ -1141,8 +1413,8 @@ const le = {
|
|
|
1141
1413
|
e.getSize = () => {
|
|
1142
1414
|
var t, n, r;
|
|
1143
1415
|
const l = o.getState().columnSizing[e.id];
|
|
1144
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
1145
|
-
}, e.getStart =
|
|
1416
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ie.minSize, (n = l ?? e.columnDef.size) != null ? n : ie.size), (r = e.columnDef.maxSize) != null ? r : ie.maxSize);
|
|
1417
|
+
}, e.getStart = y((t) => [t, oe(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), R(o.options, "debugColumns", "getStart")), e.getAfter = y((t) => [t, oe(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), R(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
1146
1418
|
o.setColumnSizing((t) => {
|
|
1147
1419
|
let {
|
|
1148
1420
|
[e.id]: n,
|
|
@@ -1176,27 +1448,27 @@ const le = {
|
|
|
1176
1448
|
}, e.getResizeHandler = (t) => {
|
|
1177
1449
|
const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
|
|
1178
1450
|
return (l) => {
|
|
1179
|
-
if (!n || !r || (l.persist == null || l.persist(),
|
|
1451
|
+
if (!n || !r || (l.persist == null || l.persist(), we(l) && l.touches && l.touches.length > 1))
|
|
1180
1452
|
return;
|
|
1181
|
-
const i = e.getSize(), s = e ? e.getLeafHeaders().map((
|
|
1182
|
-
typeof
|
|
1183
|
-
var
|
|
1184
|
-
const
|
|
1185
|
-
return
|
|
1186
|
-
let [
|
|
1187
|
-
f[
|
|
1453
|
+
const i = e.getSize(), s = e ? e.getLeafHeaders().map((h) => [h.column.id, h.column.getSize()]) : [[n.id, n.getSize()]], u = we(l) ? Math.round(l.touches[0].clientX) : l.clientX, f = {}, g = (h, S) => {
|
|
1454
|
+
typeof S == "number" && (o.setColumnSizingInfo((x) => {
|
|
1455
|
+
var I, F;
|
|
1456
|
+
const V = o.options.columnResizeDirection === "rtl" ? -1 : 1, W = (S - ((I = x == null ? void 0 : x.startOffset) != null ? I : 0)) * V, k = Math.max(W / ((F = x == null ? void 0 : x.startSize) != null ? F : 0), -0.999999);
|
|
1457
|
+
return x.columnSizingStart.forEach((H) => {
|
|
1458
|
+
let [K, O] = H;
|
|
1459
|
+
f[K] = Math.round(Math.max(O + O * k, 0) * 100) / 100;
|
|
1188
1460
|
}), {
|
|
1189
|
-
|
|
1190
|
-
deltaOffset:
|
|
1191
|
-
deltaPercentage:
|
|
1461
|
+
...x,
|
|
1462
|
+
deltaOffset: W,
|
|
1463
|
+
deltaPercentage: k
|
|
1192
1464
|
};
|
|
1193
|
-
}), (o.options.columnResizeMode === "onChange" ||
|
|
1194
|
-
|
|
1465
|
+
}), (o.options.columnResizeMode === "onChange" || h === "end") && o.setColumnSizing((x) => ({
|
|
1466
|
+
...x,
|
|
1195
1467
|
...f
|
|
1196
1468
|
})));
|
|
1197
|
-
},
|
|
1198
|
-
|
|
1199
|
-
...
|
|
1469
|
+
}, p = (h) => g("move", h), d = (h) => {
|
|
1470
|
+
g("end", h), o.setColumnSizingInfo((S) => ({
|
|
1471
|
+
...S,
|
|
1200
1472
|
isResizingColumn: !1,
|
|
1201
1473
|
startOffset: null,
|
|
1202
1474
|
startSize: null,
|
|
@@ -1204,23 +1476,23 @@ const le = {
|
|
|
1204
1476
|
deltaPercentage: null,
|
|
1205
1477
|
columnSizingStart: []
|
|
1206
1478
|
}));
|
|
1207
|
-
},
|
|
1208
|
-
moveHandler: (
|
|
1209
|
-
upHandler: (
|
|
1210
|
-
|
|
1479
|
+
}, a = gn(t), m = {
|
|
1480
|
+
moveHandler: (h) => p(h.clientX),
|
|
1481
|
+
upHandler: (h) => {
|
|
1482
|
+
a == null || a.removeEventListener("mousemove", m.moveHandler), a == null || a.removeEventListener("mouseup", m.upHandler), d(h.clientX);
|
|
1211
1483
|
}
|
|
1212
|
-
},
|
|
1213
|
-
moveHandler: (
|
|
1214
|
-
upHandler: (
|
|
1215
|
-
var
|
|
1216
|
-
|
|
1484
|
+
}, v = {
|
|
1485
|
+
moveHandler: (h) => (h.cancelable && (h.preventDefault(), h.stopPropagation()), p(h.touches[0].clientX), !1),
|
|
1486
|
+
upHandler: (h) => {
|
|
1487
|
+
var S;
|
|
1488
|
+
a == null || a.removeEventListener("touchmove", v.moveHandler), a == null || a.removeEventListener("touchend", v.upHandler), h.cancelable && (h.preventDefault(), h.stopPropagation()), d((S = h.touches[0]) == null ? void 0 : S.clientX);
|
|
1217
1489
|
}
|
|
1218
|
-
},
|
|
1490
|
+
}, C = mn() ? {
|
|
1219
1491
|
passive: !1
|
|
1220
1492
|
} : !1;
|
|
1221
|
-
|
|
1222
|
-
...
|
|
1223
|
-
startOffset:
|
|
1493
|
+
we(l) ? (a == null || a.addEventListener("touchmove", v.moveHandler, C), a == null || a.addEventListener("touchend", v.upHandler, C)) : (a == null || a.addEventListener("mousemove", m.moveHandler, C), a == null || a.addEventListener("mouseup", m.upHandler, C)), o.setColumnSizingInfo((h) => ({
|
|
1494
|
+
...h,
|
|
1495
|
+
startOffset: u,
|
|
1224
1496
|
startSize: i,
|
|
1225
1497
|
deltaOffset: 0,
|
|
1226
1498
|
deltaPercentage: 0,
|
|
@@ -1236,7 +1508,7 @@ const le = {
|
|
|
1236
1508
|
e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
1237
1509
|
}, e.resetHeaderSizeInfo = (o) => {
|
|
1238
1510
|
var t;
|
|
1239
|
-
e.setColumnSizingInfo(o ?
|
|
1511
|
+
e.setColumnSizingInfo(o ? ve() : (t = e.initialState.columnSizingInfo) != null ? t : ve());
|
|
1240
1512
|
}, e.getTotalSize = () => {
|
|
1241
1513
|
var o, t;
|
|
1242
1514
|
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
|
|
@@ -1252,9 +1524,9 @@ const le = {
|
|
|
1252
1524
|
};
|
|
1253
1525
|
}
|
|
1254
1526
|
};
|
|
1255
|
-
let
|
|
1256
|
-
function
|
|
1257
|
-
if (typeof
|
|
1527
|
+
let se = null;
|
|
1528
|
+
function mn() {
|
|
1529
|
+
if (typeof se == "boolean") return se;
|
|
1258
1530
|
let e = !1;
|
|
1259
1531
|
try {
|
|
1260
1532
|
const o = {
|
|
@@ -1267,12 +1539,12 @@ function un() {
|
|
|
1267
1539
|
} catch {
|
|
1268
1540
|
e = !1;
|
|
1269
1541
|
}
|
|
1270
|
-
return
|
|
1542
|
+
return se = e, se;
|
|
1271
1543
|
}
|
|
1272
|
-
function
|
|
1544
|
+
function we(e) {
|
|
1273
1545
|
return e.type === "touchstart";
|
|
1274
1546
|
}
|
|
1275
|
-
const
|
|
1547
|
+
const hn = {
|
|
1276
1548
|
getInitialState: (e) => ({
|
|
1277
1549
|
columnVisibility: {},
|
|
1278
1550
|
...e
|
|
@@ -1298,10 +1570,10 @@ const fn = {
|
|
|
1298
1570
|
};
|
|
1299
1571
|
},
|
|
1300
1572
|
createRow: (e, o) => {
|
|
1301
|
-
e._getAllVisibleCells =
|
|
1573
|
+
e._getAllVisibleCells = y(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), R(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = y(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], R(o.options, "debugRows", "getVisibleCells"));
|
|
1302
1574
|
},
|
|
1303
1575
|
createTable: (e) => {
|
|
1304
|
-
const o = (t, n) =>
|
|
1576
|
+
const o = (t, n) => y(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((l) => l.getIsVisible == null ? void 0 : l.getIsVisible()), R(e.options, "debugColumns", t));
|
|
1305
1577
|
e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
|
|
1306
1578
|
var n;
|
|
1307
1579
|
e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
|
|
@@ -1317,17 +1589,17 @@ const fn = {
|
|
|
1317
1589
|
};
|
|
1318
1590
|
}
|
|
1319
1591
|
};
|
|
1320
|
-
function
|
|
1592
|
+
function oe(e, o) {
|
|
1321
1593
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
1322
1594
|
}
|
|
1323
|
-
const
|
|
1595
|
+
const vn = {
|
|
1324
1596
|
createTable: (e) => {
|
|
1325
1597
|
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
1326
1598
|
if (e._getGlobalFacetedMinMaxValues)
|
|
1327
1599
|
return e._getGlobalFacetedMinMaxValues();
|
|
1328
1600
|
};
|
|
1329
1601
|
}
|
|
1330
|
-
},
|
|
1602
|
+
}, wn = {
|
|
1331
1603
|
getInitialState: (e) => ({
|
|
1332
1604
|
globalFilter: void 0,
|
|
1333
1605
|
...e
|
|
@@ -1353,14 +1625,14 @@ const dn = {
|
|
|
1353
1625
|
const {
|
|
1354
1626
|
globalFilterFn: n
|
|
1355
1627
|
} = e.options;
|
|
1356
|
-
return
|
|
1628
|
+
return ue(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : B[n];
|
|
1357
1629
|
}, e.setGlobalFilter = (o) => {
|
|
1358
1630
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
|
1359
1631
|
}, e.resetGlobalFilter = (o) => {
|
|
1360
1632
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
1361
1633
|
};
|
|
1362
1634
|
}
|
|
1363
|
-
},
|
|
1635
|
+
}, Cn = {
|
|
1364
1636
|
getInitialState: (e) => ({
|
|
1365
1637
|
expanded: {},
|
|
1366
1638
|
...e
|
|
@@ -1422,9 +1694,9 @@ const dn = {
|
|
|
1422
1694
|
if (l && !t) {
|
|
1423
1695
|
const {
|
|
1424
1696
|
[e.id]: s,
|
|
1425
|
-
...
|
|
1697
|
+
...u
|
|
1426
1698
|
} = i;
|
|
1427
|
-
return
|
|
1699
|
+
return u;
|
|
1428
1700
|
}
|
|
1429
1701
|
return n;
|
|
1430
1702
|
});
|
|
@@ -1447,14 +1719,14 @@ const dn = {
|
|
|
1447
1719
|
};
|
|
1448
1720
|
};
|
|
1449
1721
|
}
|
|
1450
|
-
},
|
|
1451
|
-
pageIndex:
|
|
1452
|
-
pageSize:
|
|
1453
|
-
}),
|
|
1722
|
+
}, Fe = 0, $e = 10, Ce = () => ({
|
|
1723
|
+
pageIndex: Fe,
|
|
1724
|
+
pageSize: $e
|
|
1725
|
+
}), Sn = {
|
|
1454
1726
|
getInitialState: (e) => ({
|
|
1455
1727
|
...e,
|
|
1456
1728
|
pagination: {
|
|
1457
|
-
...
|
|
1729
|
+
...Ce(),
|
|
1458
1730
|
...e == null ? void 0 : e.pagination
|
|
1459
1731
|
}
|
|
1460
1732
|
}),
|
|
@@ -1478,14 +1750,14 @@ const dn = {
|
|
|
1478
1750
|
});
|
|
1479
1751
|
}
|
|
1480
1752
|
}, e.setPagination = (n) => {
|
|
1481
|
-
const r = (l) =>
|
|
1753
|
+
const r = (l) => j(n, l);
|
|
1482
1754
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
1483
1755
|
}, e.resetPagination = (n) => {
|
|
1484
1756
|
var r;
|
|
1485
|
-
e.setPagination(n ?
|
|
1757
|
+
e.setPagination(n ? Ce() : (r = e.initialState.pagination) != null ? r : Ce());
|
|
1486
1758
|
}, e.setPageIndex = (n) => {
|
|
1487
1759
|
e.setPagination((r) => {
|
|
1488
|
-
let l =
|
|
1760
|
+
let l = j(n, r.pageIndex);
|
|
1489
1761
|
const i = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
1490
1762
|
return l = Math.max(0, Math.min(l, i)), {
|
|
1491
1763
|
...r,
|
|
@@ -1494,13 +1766,13 @@ const dn = {
|
|
|
1494
1766
|
});
|
|
1495
1767
|
}, e.resetPageIndex = (n) => {
|
|
1496
1768
|
var r, l;
|
|
1497
|
-
e.setPageIndex(n ?
|
|
1769
|
+
e.setPageIndex(n ? Fe : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : Fe);
|
|
1498
1770
|
}, e.resetPageSize = (n) => {
|
|
1499
1771
|
var r, l;
|
|
1500
|
-
e.setPageSize(n ?
|
|
1772
|
+
e.setPageSize(n ? $e : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : $e);
|
|
1501
1773
|
}, e.setPageSize = (n) => {
|
|
1502
1774
|
e.setPagination((r) => {
|
|
1503
|
-
const l = Math.max(1,
|
|
1775
|
+
const l = Math.max(1, j(n, r.pageSize)), i = r.pageSize * r.pageIndex, s = Math.floor(i / l);
|
|
1504
1776
|
return {
|
|
1505
1777
|
...r,
|
|
1506
1778
|
pageIndex: s,
|
|
@@ -1509,15 +1781,15 @@ const dn = {
|
|
|
1509
1781
|
});
|
|
1510
1782
|
}, e.setPageCount = (n) => e.setPagination((r) => {
|
|
1511
1783
|
var l;
|
|
1512
|
-
let i =
|
|
1784
|
+
let i = j(n, (l = e.options.pageCount) != null ? l : -1);
|
|
1513
1785
|
return typeof i == "number" && (i = Math.max(-1, i)), {
|
|
1514
1786
|
...r,
|
|
1515
1787
|
pageCount: i
|
|
1516
1788
|
};
|
|
1517
|
-
}), e.getPageOptions =
|
|
1789
|
+
}), e.getPageOptions = y(() => [e.getPageCount()], (n) => {
|
|
1518
1790
|
let r = [];
|
|
1519
1791
|
return n && n > 0 && (r = [...new Array(n)].fill(null).map((l, i) => i)), r;
|
|
1520
|
-
},
|
|
1792
|
+
}, R(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
1521
1793
|
const {
|
|
1522
1794
|
pageIndex: n
|
|
1523
1795
|
} = e.getState().pagination, r = e.getPageCount();
|
|
@@ -1530,12 +1802,12 @@ const dn = {
|
|
|
1530
1802
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
|
1531
1803
|
};
|
|
1532
1804
|
}
|
|
1533
|
-
},
|
|
1805
|
+
}, Se = () => ({
|
|
1534
1806
|
top: [],
|
|
1535
1807
|
bottom: []
|
|
1536
|
-
}),
|
|
1808
|
+
}), yn = {
|
|
1537
1809
|
getInitialState: (e) => ({
|
|
1538
|
-
rowPinning:
|
|
1810
|
+
rowPinning: Se(),
|
|
1539
1811
|
...e
|
|
1540
1812
|
}),
|
|
1541
1813
|
getDefaultOptions: (e) => ({
|
|
@@ -1543,36 +1815,36 @@ const dn = {
|
|
|
1543
1815
|
}),
|
|
1544
1816
|
createRow: (e, o) => {
|
|
1545
1817
|
e.pin = (t, n, r) => {
|
|
1546
|
-
const l = n ? e.getLeafRows().map((
|
|
1818
|
+
const l = n ? e.getLeafRows().map((u) => {
|
|
1547
1819
|
let {
|
|
1548
1820
|
id: f
|
|
1549
|
-
} =
|
|
1821
|
+
} = u;
|
|
1550
1822
|
return f;
|
|
1551
|
-
}) : [], i = r ? e.getParentRows().map((
|
|
1823
|
+
}) : [], i = r ? e.getParentRows().map((u) => {
|
|
1552
1824
|
let {
|
|
1553
1825
|
id: f
|
|
1554
|
-
} =
|
|
1826
|
+
} = u;
|
|
1555
1827
|
return f;
|
|
1556
1828
|
}) : [], s = /* @__PURE__ */ new Set([...i, e.id, ...l]);
|
|
1557
|
-
o.setRowPinning((
|
|
1558
|
-
var f,
|
|
1829
|
+
o.setRowPinning((u) => {
|
|
1830
|
+
var f, g;
|
|
1559
1831
|
if (t === "bottom") {
|
|
1560
|
-
var
|
|
1832
|
+
var p, d;
|
|
1561
1833
|
return {
|
|
1562
|
-
top: ((
|
|
1563
|
-
bottom: [...((d =
|
|
1834
|
+
top: ((p = u == null ? void 0 : u.top) != null ? p : []).filter((v) => !(s != null && s.has(v))),
|
|
1835
|
+
bottom: [...((d = u == null ? void 0 : u.bottom) != null ? d : []).filter((v) => !(s != null && s.has(v))), ...Array.from(s)]
|
|
1564
1836
|
};
|
|
1565
1837
|
}
|
|
1566
1838
|
if (t === "top") {
|
|
1567
|
-
var
|
|
1839
|
+
var a, m;
|
|
1568
1840
|
return {
|
|
1569
|
-
top: [...((
|
|
1570
|
-
bottom: ((m =
|
|
1841
|
+
top: [...((a = u == null ? void 0 : u.top) != null ? a : []).filter((v) => !(s != null && s.has(v))), ...Array.from(s)],
|
|
1842
|
+
bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((v) => !(s != null && s.has(v)))
|
|
1571
1843
|
};
|
|
1572
1844
|
}
|
|
1573
1845
|
return {
|
|
1574
|
-
top: ((f =
|
|
1575
|
-
bottom: ((
|
|
1846
|
+
top: ((f = u == null ? void 0 : u.top) != null ? f : []).filter((v) => !(s != null && s.has(v))),
|
|
1847
|
+
bottom: ((g = u == null ? void 0 : u.bottom) != null ? g : []).filter((v) => !(s != null && s.has(v)))
|
|
1576
1848
|
};
|
|
1577
1849
|
});
|
|
1578
1850
|
}, e.getCanPin = () => {
|
|
@@ -1604,7 +1876,7 @@ const dn = {
|
|
|
1604
1876
|
createTable: (e) => {
|
|
1605
1877
|
e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
|
|
1606
1878
|
var t, n;
|
|
1607
|
-
return e.setRowPinning(o ?
|
|
1879
|
+
return e.setRowPinning(o ? Se() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : Se());
|
|
1608
1880
|
}, e.getIsSomeRowsPinned = (o) => {
|
|
1609
1881
|
var t;
|
|
1610
1882
|
const n = e.getState().rowPinning;
|
|
@@ -1629,12 +1901,12 @@ const dn = {
|
|
|
1629
1901
|
...i,
|
|
1630
1902
|
position: n
|
|
1631
1903
|
}));
|
|
1632
|
-
}, e.getTopRows =
|
|
1904
|
+
}, e.getTopRows = y(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), R(e.options, "debugRows", "getTopRows")), e.getBottomRows = y(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), R(e.options, "debugRows", "getBottomRows")), e.getCenterRows = y(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
|
|
1633
1905
|
const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
|
|
1634
1906
|
return o.filter((l) => !r.has(l.id));
|
|
1635
|
-
},
|
|
1907
|
+
}, R(e.options, "debugRows", "getCenterRows"));
|
|
1636
1908
|
}
|
|
1637
|
-
},
|
|
1909
|
+
}, Rn = {
|
|
1638
1910
|
getInitialState: (e) => ({
|
|
1639
1911
|
rowSelection: {},
|
|
1640
1912
|
...e
|
|
@@ -1669,21 +1941,21 @@ const dn = {
|
|
|
1669
1941
|
...t
|
|
1670
1942
|
};
|
|
1671
1943
|
return e.getRowModel().rows.forEach((l) => {
|
|
1672
|
-
|
|
1944
|
+
Ie(r, l.id, n, !0, e);
|
|
1673
1945
|
}), r;
|
|
1674
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel =
|
|
1946
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = y(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
|
|
1675
1947
|
rows: [],
|
|
1676
1948
|
flatRows: [],
|
|
1677
1949
|
rowsById: {}
|
|
1678
|
-
},
|
|
1950
|
+
}, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = y(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
|
|
1679
1951
|
rows: [],
|
|
1680
1952
|
flatRows: [],
|
|
1681
1953
|
rowsById: {}
|
|
1682
|
-
},
|
|
1954
|
+
}, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = y(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
|
|
1683
1955
|
rows: [],
|
|
1684
1956
|
flatRows: [],
|
|
1685
1957
|
rowsById: {}
|
|
1686
|
-
},
|
|
1958
|
+
}, R(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
|
|
1687
1959
|
const o = e.getFilteredRowModel().flatRows, {
|
|
1688
1960
|
rowSelection: t
|
|
1689
1961
|
} = e.getState();
|
|
@@ -1718,23 +1990,23 @@ const dn = {
|
|
|
1718
1990
|
const s = {
|
|
1719
1991
|
...l
|
|
1720
1992
|
};
|
|
1721
|
-
return
|
|
1993
|
+
return Ie(s, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), s;
|
|
1722
1994
|
});
|
|
1723
1995
|
}, e.getIsSelected = () => {
|
|
1724
1996
|
const {
|
|
1725
1997
|
rowSelection: t
|
|
1726
1998
|
} = o.getState();
|
|
1727
|
-
return
|
|
1999
|
+
return Le(e, t);
|
|
1728
2000
|
}, e.getIsSomeSelected = () => {
|
|
1729
2001
|
const {
|
|
1730
2002
|
rowSelection: t
|
|
1731
2003
|
} = o.getState();
|
|
1732
|
-
return
|
|
2004
|
+
return Me(e, t) === "some";
|
|
1733
2005
|
}, e.getIsAllSubRowsSelected = () => {
|
|
1734
2006
|
const {
|
|
1735
2007
|
rowSelection: t
|
|
1736
2008
|
} = o.getState();
|
|
1737
|
-
return
|
|
2009
|
+
return Me(e, t) === "all";
|
|
1738
2010
|
}, e.getCanSelect = () => {
|
|
1739
2011
|
var t;
|
|
1740
2012
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
|
@@ -1752,21 +2024,21 @@ const dn = {
|
|
|
1752
2024
|
};
|
|
1753
2025
|
};
|
|
1754
2026
|
}
|
|
1755
|
-
},
|
|
2027
|
+
}, Ie = (e, o, t, n, r) => {
|
|
1756
2028
|
var l;
|
|
1757
2029
|
const i = r.getRow(o, !0);
|
|
1758
|
-
t ? (i.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((s) =>
|
|
2030
|
+
t ? (i.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((s) => Ie(e, s.id, t, n, r));
|
|
1759
2031
|
};
|
|
1760
|
-
function
|
|
2032
|
+
function ye(e, o) {
|
|
1761
2033
|
const t = e.getState().rowSelection, n = [], r = {}, l = function(i, s) {
|
|
1762
|
-
return i.map((
|
|
2034
|
+
return i.map((u) => {
|
|
1763
2035
|
var f;
|
|
1764
|
-
const
|
|
1765
|
-
if (
|
|
1766
|
-
...
|
|
1767
|
-
subRows: l(
|
|
1768
|
-
}),
|
|
1769
|
-
return
|
|
2036
|
+
const g = Le(u, t);
|
|
2037
|
+
if (g && (n.push(u), r[u.id] = u), (f = u.subRows) != null && f.length && (u = {
|
|
2038
|
+
...u,
|
|
2039
|
+
subRows: l(u.subRows)
|
|
2040
|
+
}), g)
|
|
2041
|
+
return u;
|
|
1770
2042
|
}).filter(Boolean);
|
|
1771
2043
|
};
|
|
1772
2044
|
return {
|
|
@@ -1775,43 +2047,43 @@ function we(e, o) {
|
|
|
1775
2047
|
rowsById: r
|
|
1776
2048
|
};
|
|
1777
2049
|
}
|
|
1778
|
-
function
|
|
2050
|
+
function Le(e, o) {
|
|
1779
2051
|
var t;
|
|
1780
2052
|
return (t = o[e.id]) != null ? t : !1;
|
|
1781
2053
|
}
|
|
1782
|
-
function
|
|
2054
|
+
function Me(e, o, t) {
|
|
1783
2055
|
var n;
|
|
1784
2056
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
1785
2057
|
let r = !0, l = !1;
|
|
1786
2058
|
return e.subRows.forEach((i) => {
|
|
1787
|
-
if (!(l && !r) && (i.getCanSelect() && (
|
|
1788
|
-
const s =
|
|
2059
|
+
if (!(l && !r) && (i.getCanSelect() && (Le(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
|
|
2060
|
+
const s = Me(i, o);
|
|
1789
2061
|
s === "all" ? l = !0 : (s === "some" && (l = !0), r = !1);
|
|
1790
2062
|
}
|
|
1791
2063
|
}), r ? "all" : l ? "some" : !1;
|
|
1792
2064
|
}
|
|
1793
|
-
const
|
|
2065
|
+
const Ve = /([0-9]+)/gm, xn = (e, o, t) => lt(X(e.getValue(t)).toLowerCase(), X(o.getValue(t)).toLowerCase()), _n = (e, o, t) => lt(X(e.getValue(t)), X(o.getValue(t))), Fn = (e, o, t) => ze(X(e.getValue(t)).toLowerCase(), X(o.getValue(t)).toLowerCase()), $n = (e, o, t) => ze(X(e.getValue(t)), X(o.getValue(t))), In = (e, o, t) => {
|
|
1794
2066
|
const n = e.getValue(t), r = o.getValue(t);
|
|
1795
2067
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1796
|
-
},
|
|
1797
|
-
function
|
|
2068
|
+
}, Mn = (e, o, t) => ze(e.getValue(t), o.getValue(t));
|
|
2069
|
+
function ze(e, o) {
|
|
1798
2070
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
1799
2071
|
}
|
|
1800
|
-
function
|
|
2072
|
+
function X(e) {
|
|
1801
2073
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1802
2074
|
}
|
|
1803
|
-
function
|
|
1804
|
-
const t = e.split(
|
|
2075
|
+
function lt(e, o) {
|
|
2076
|
+
const t = e.split(Ve).filter(Boolean), n = o.split(Ve).filter(Boolean);
|
|
1805
2077
|
for (; t.length && n.length; ) {
|
|
1806
|
-
const r = t.shift(), l = n.shift(), i = parseInt(r, 10), s = parseInt(l, 10),
|
|
1807
|
-
if (isNaN(
|
|
2078
|
+
const r = t.shift(), l = n.shift(), i = parseInt(r, 10), s = parseInt(l, 10), u = [i, s].sort();
|
|
2079
|
+
if (isNaN(u[0])) {
|
|
1808
2080
|
if (r > l)
|
|
1809
2081
|
return 1;
|
|
1810
2082
|
if (l > r)
|
|
1811
2083
|
return -1;
|
|
1812
2084
|
continue;
|
|
1813
2085
|
}
|
|
1814
|
-
if (isNaN(
|
|
2086
|
+
if (isNaN(u[1]))
|
|
1815
2087
|
return isNaN(i) ? -1 : 1;
|
|
1816
2088
|
if (i > s)
|
|
1817
2089
|
return 1;
|
|
@@ -1820,14 +2092,14 @@ function ot(e, o) {
|
|
|
1820
2092
|
}
|
|
1821
2093
|
return t.length - n.length;
|
|
1822
2094
|
}
|
|
1823
|
-
const
|
|
1824
|
-
alphanumeric:
|
|
1825
|
-
alphanumericCaseSensitive:
|
|
1826
|
-
text:
|
|
1827
|
-
textCaseSensitive:
|
|
1828
|
-
datetime:
|
|
1829
|
-
basic:
|
|
1830
|
-
},
|
|
2095
|
+
const ne = {
|
|
2096
|
+
alphanumeric: xn,
|
|
2097
|
+
alphanumericCaseSensitive: _n,
|
|
2098
|
+
text: Fn,
|
|
2099
|
+
textCaseSensitive: $n,
|
|
2100
|
+
datetime: In,
|
|
2101
|
+
basic: Mn
|
|
2102
|
+
}, Vn = {
|
|
1831
2103
|
getInitialState: (e) => ({
|
|
1832
2104
|
sorting: [],
|
|
1833
2105
|
...e
|
|
@@ -1847,11 +2119,11 @@ const te = {
|
|
|
1847
2119
|
for (const r of t) {
|
|
1848
2120
|
const l = r == null ? void 0 : r.getValue(e.id);
|
|
1849
2121
|
if (Object.prototype.toString.call(l) === "[object Date]")
|
|
1850
|
-
return
|
|
1851
|
-
if (typeof l == "string" && (n = !0, l.split(
|
|
1852
|
-
return
|
|
2122
|
+
return ne.datetime;
|
|
2123
|
+
if (typeof l == "string" && (n = !0, l.split(Ve).length > 1))
|
|
2124
|
+
return ne.alphanumeric;
|
|
1853
2125
|
}
|
|
1854
|
-
return n ?
|
|
2126
|
+
return n ? ne.text : ne.basic;
|
|
1855
2127
|
}, e.getAutoSortDir = () => {
|
|
1856
2128
|
const t = o.getFilteredRowModel().flatRows[0];
|
|
1857
2129
|
return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
|
|
@@ -1859,24 +2131,24 @@ const te = {
|
|
|
1859
2131
|
var t, n;
|
|
1860
2132
|
if (!e)
|
|
1861
2133
|
throw new Error();
|
|
1862
|
-
return
|
|
2134
|
+
return ue(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : ne[e.columnDef.sortingFn];
|
|
1863
2135
|
}, e.toggleSorting = (t, n) => {
|
|
1864
2136
|
const r = e.getNextSortingOrder(), l = typeof t < "u" && t !== null;
|
|
1865
2137
|
o.setSorting((i) => {
|
|
1866
|
-
const s = i == null ? void 0 : i.find((
|
|
1867
|
-
let f = [],
|
|
1868
|
-
if (i != null && i.length && e.getCanMultiSort() && n ? s ?
|
|
2138
|
+
const s = i == null ? void 0 : i.find((a) => a.id === e.id), u = i == null ? void 0 : i.findIndex((a) => a.id === e.id);
|
|
2139
|
+
let f = [], g, p = l ? t : r === "desc";
|
|
2140
|
+
if (i != null && i.length && e.getCanMultiSort() && n ? s ? g = "toggle" : g = "add" : i != null && i.length && u !== i.length - 1 ? g = "replace" : s ? g = "toggle" : g = "replace", g === "toggle" && (l || r || (g = "remove")), g === "add") {
|
|
1869
2141
|
var d;
|
|
1870
2142
|
f = [...i, {
|
|
1871
2143
|
id: e.id,
|
|
1872
|
-
desc:
|
|
2144
|
+
desc: p
|
|
1873
2145
|
}], f.splice(0, f.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
|
|
1874
|
-
} else
|
|
1875
|
-
...
|
|
1876
|
-
desc:
|
|
1877
|
-
} :
|
|
2146
|
+
} else g === "toggle" ? f = i.map((a) => a.id === e.id ? {
|
|
2147
|
+
...a,
|
|
2148
|
+
desc: p
|
|
2149
|
+
} : a) : g === "remove" ? f = i.filter((a) => a.id !== e.id) : f = [{
|
|
1878
2150
|
id: e.id,
|
|
1879
|
-
desc:
|
|
2151
|
+
desc: p
|
|
1880
2152
|
}];
|
|
1881
2153
|
return f;
|
|
1882
2154
|
});
|
|
@@ -1916,135 +2188,135 @@ const te = {
|
|
|
1916
2188
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
1917
2189
|
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
1918
2190
|
}
|
|
1919
|
-
},
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
rn,
|
|
1923
|
-
ln,
|
|
1924
|
-
jt,
|
|
1925
|
-
Ut,
|
|
2191
|
+
}, Nn = [
|
|
2192
|
+
Qt,
|
|
2193
|
+
hn,
|
|
1926
2194
|
dn,
|
|
2195
|
+
cn,
|
|
2196
|
+
Yt,
|
|
2197
|
+
Jt,
|
|
2198
|
+
vn,
|
|
1927
2199
|
//depends on ColumnFaceting
|
|
1928
|
-
|
|
2200
|
+
wn,
|
|
1929
2201
|
//depends on ColumnFiltering
|
|
1930
|
-
|
|
1931
|
-
|
|
2202
|
+
Vn,
|
|
2203
|
+
un,
|
|
1932
2204
|
//depends on RowSorting
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
2205
|
+
Cn,
|
|
2206
|
+
Sn,
|
|
2207
|
+
yn,
|
|
2208
|
+
Rn,
|
|
2209
|
+
pn
|
|
1938
2210
|
];
|
|
1939
|
-
function
|
|
2211
|
+
function Pn(e) {
|
|
1940
2212
|
var o, t;
|
|
1941
2213
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1942
|
-
const n = [...
|
|
2214
|
+
const n = [...Nn, ...(o = e._features) != null ? o : []];
|
|
1943
2215
|
let r = {
|
|
1944
2216
|
_features: n
|
|
1945
2217
|
};
|
|
1946
|
-
const l = r._features.reduce((d,
|
|
2218
|
+
const l = r._features.reduce((d, a) => Object.assign(d, a.getDefaultOptions == null ? void 0 : a.getDefaultOptions(r)), {}), i = (d) => r.options.mergeOptions ? r.options.mergeOptions(l, d) : {
|
|
1947
2219
|
...l,
|
|
1948
2220
|
...d
|
|
1949
2221
|
};
|
|
1950
|
-
let
|
|
2222
|
+
let u = {
|
|
1951
2223
|
...{},
|
|
1952
2224
|
...(t = e.initialState) != null ? t : {}
|
|
1953
2225
|
};
|
|
1954
2226
|
r._features.forEach((d) => {
|
|
1955
|
-
var
|
|
1956
|
-
|
|
2227
|
+
var a;
|
|
2228
|
+
u = (a = d.getInitialState == null ? void 0 : d.getInitialState(u)) != null ? a : u;
|
|
1957
2229
|
});
|
|
1958
2230
|
const f = [];
|
|
1959
|
-
let
|
|
1960
|
-
const
|
|
2231
|
+
let g = !1;
|
|
2232
|
+
const p = {
|
|
1961
2233
|
_features: n,
|
|
1962
2234
|
options: {
|
|
1963
2235
|
...l,
|
|
1964
2236
|
...e
|
|
1965
2237
|
},
|
|
1966
|
-
initialState:
|
|
2238
|
+
initialState: u,
|
|
1967
2239
|
_queue: (d) => {
|
|
1968
|
-
f.push(d),
|
|
2240
|
+
f.push(d), g || (g = !0, Promise.resolve().then(() => {
|
|
1969
2241
|
for (; f.length; )
|
|
1970
2242
|
f.shift()();
|
|
1971
|
-
|
|
1972
|
-
}).catch((
|
|
1973
|
-
throw
|
|
2243
|
+
g = !1;
|
|
2244
|
+
}).catch((a) => setTimeout(() => {
|
|
2245
|
+
throw a;
|
|
1974
2246
|
})));
|
|
1975
2247
|
},
|
|
1976
2248
|
reset: () => {
|
|
1977
2249
|
r.setState(r.initialState);
|
|
1978
2250
|
},
|
|
1979
2251
|
setOptions: (d) => {
|
|
1980
|
-
const
|
|
1981
|
-
r.options = i(
|
|
2252
|
+
const a = j(d, r.options);
|
|
2253
|
+
r.options = i(a);
|
|
1982
2254
|
},
|
|
1983
2255
|
getState: () => r.options.state,
|
|
1984
2256
|
setState: (d) => {
|
|
1985
2257
|
r.options.onStateChange == null || r.options.onStateChange(d);
|
|
1986
2258
|
},
|
|
1987
|
-
_getRowId: (d,
|
|
1988
|
-
var
|
|
1989
|
-
return (
|
|
2259
|
+
_getRowId: (d, a, m) => {
|
|
2260
|
+
var v;
|
|
2261
|
+
return (v = r.options.getRowId == null ? void 0 : r.options.getRowId(d, a, m)) != null ? v : `${m ? [m.id, a].join(".") : a}`;
|
|
1990
2262
|
},
|
|
1991
2263
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
1992
2264
|
// The final calls start at the bottom of the model,
|
|
1993
2265
|
// expanded rows, which then work their way up
|
|
1994
2266
|
getRowModel: () => r.getPaginationRowModel(),
|
|
1995
2267
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
1996
|
-
getRow: (d,
|
|
1997
|
-
let m = (
|
|
2268
|
+
getRow: (d, a) => {
|
|
2269
|
+
let m = (a ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
|
|
1998
2270
|
if (!m && (m = r.getCoreRowModel().rowsById[d], !m))
|
|
1999
2271
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
|
|
2000
2272
|
return m;
|
|
2001
2273
|
},
|
|
2002
|
-
_getDefaultColumnDef:
|
|
2003
|
-
var
|
|
2004
|
-
return d = (
|
|
2274
|
+
_getDefaultColumnDef: y(() => [r.options.defaultColumn], (d) => {
|
|
2275
|
+
var a;
|
|
2276
|
+
return d = (a = d) != null ? a : {}, {
|
|
2005
2277
|
header: (m) => {
|
|
2006
|
-
const
|
|
2007
|
-
return
|
|
2278
|
+
const v = m.header.column.columnDef;
|
|
2279
|
+
return v.accessorKey ? v.accessorKey : v.accessorFn ? v.id : null;
|
|
2008
2280
|
},
|
|
2009
2281
|
// footer: props => props.header.column.id,
|
|
2010
2282
|
cell: (m) => {
|
|
2011
|
-
var
|
|
2012
|
-
return (
|
|
2283
|
+
var v, C;
|
|
2284
|
+
return (v = (C = m.renderValue()) == null || C.toString == null ? void 0 : C.toString()) != null ? v : null;
|
|
2013
2285
|
},
|
|
2014
|
-
...r._features.reduce((m,
|
|
2286
|
+
...r._features.reduce((m, v) => Object.assign(m, v.getDefaultColumnDef == null ? void 0 : v.getDefaultColumnDef()), {}),
|
|
2015
2287
|
...d
|
|
2016
2288
|
};
|
|
2017
|
-
},
|
|
2289
|
+
}, R(e, "debugColumns", "_getDefaultColumnDef")),
|
|
2018
2290
|
_getColumnDefs: () => r.options.columns,
|
|
2019
|
-
getAllColumns:
|
|
2020
|
-
const
|
|
2021
|
-
return
|
|
2022
|
-
const
|
|
2023
|
-
return
|
|
2291
|
+
getAllColumns: y(() => [r._getColumnDefs()], (d) => {
|
|
2292
|
+
const a = function(m, v, C) {
|
|
2293
|
+
return C === void 0 && (C = 0), m.map((h) => {
|
|
2294
|
+
const S = Wt(r, h, C, v), x = h;
|
|
2295
|
+
return S.columns = x.columns ? a(x.columns, S, C + 1) : [], S;
|
|
2024
2296
|
});
|
|
2025
2297
|
};
|
|
2026
|
-
return
|
|
2027
|
-
},
|
|
2028
|
-
getAllFlatColumns:
|
|
2029
|
-
_getAllFlatColumnsById:
|
|
2030
|
-
getAllLeafColumns:
|
|
2031
|
-
let m = d.flatMap((
|
|
2032
|
-
return
|
|
2033
|
-
},
|
|
2298
|
+
return a(d);
|
|
2299
|
+
}, R(e, "debugColumns", "getAllColumns")),
|
|
2300
|
+
getAllFlatColumns: y(() => [r.getAllColumns()], (d) => d.flatMap((a) => a.getFlatColumns()), R(e, "debugColumns", "getAllFlatColumns")),
|
|
2301
|
+
_getAllFlatColumnsById: y(() => [r.getAllFlatColumns()], (d) => d.reduce((a, m) => (a[m.id] = m, a), {}), R(e, "debugColumns", "getAllFlatColumnsById")),
|
|
2302
|
+
getAllLeafColumns: y(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, a) => {
|
|
2303
|
+
let m = d.flatMap((v) => v.getLeafColumns());
|
|
2304
|
+
return a(m);
|
|
2305
|
+
}, R(e, "debugColumns", "getAllLeafColumns")),
|
|
2034
2306
|
getColumn: (d) => {
|
|
2035
|
-
const
|
|
2036
|
-
return process.env.NODE_ENV !== "production" && !
|
|
2307
|
+
const a = r._getAllFlatColumnsById()[d];
|
|
2308
|
+
return process.env.NODE_ENV !== "production" && !a && console.error(`[Table] Column with id '${d}' does not exist.`), a;
|
|
2037
2309
|
}
|
|
2038
2310
|
};
|
|
2039
|
-
Object.assign(r,
|
|
2311
|
+
Object.assign(r, p);
|
|
2040
2312
|
for (let d = 0; d < r._features.length; d++) {
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2313
|
+
const a = r._features[d];
|
|
2314
|
+
a == null || a.createTable == null || a.createTable(r);
|
|
2043
2315
|
}
|
|
2044
2316
|
return r;
|
|
2045
2317
|
}
|
|
2046
|
-
function
|
|
2047
|
-
return (e) =>
|
|
2318
|
+
function kn() {
|
|
2319
|
+
return (e) => y(() => [e.options.data], (o) => {
|
|
2048
2320
|
const t = {
|
|
2049
2321
|
rows: [],
|
|
2050
2322
|
flatRows: [],
|
|
@@ -2053,18 +2325,18 @@ function $n() {
|
|
|
2053
2325
|
l === void 0 && (l = 0);
|
|
2054
2326
|
const s = [];
|
|
2055
2327
|
for (let f = 0; f < r.length; f++) {
|
|
2056
|
-
const
|
|
2057
|
-
if (t.flatRows.push(
|
|
2058
|
-
var
|
|
2059
|
-
|
|
2328
|
+
const g = Ee(e, e._getRowId(r[f], f, i), r[f], f, l, void 0, i == null ? void 0 : i.id);
|
|
2329
|
+
if (t.flatRows.push(g), t.rowsById[g.id] = g, s.push(g), e.options.getSubRows) {
|
|
2330
|
+
var u;
|
|
2331
|
+
g.originalSubRows = e.options.getSubRows(r[f], f), (u = g.originalSubRows) != null && u.length && (g.subRows = n(g.originalSubRows, l + 1, g));
|
|
2060
2332
|
}
|
|
2061
2333
|
}
|
|
2062
2334
|
return s;
|
|
2063
2335
|
};
|
|
2064
2336
|
return t.rows = n(o), t;
|
|
2065
|
-
},
|
|
2337
|
+
}, R(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
2066
2338
|
}
|
|
2067
|
-
function
|
|
2339
|
+
function En(e) {
|
|
2068
2340
|
const o = [], t = (n) => {
|
|
2069
2341
|
var r;
|
|
2070
2342
|
o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
@@ -2075,31 +2347,31 @@ function Mn(e) {
|
|
|
2075
2347
|
rowsById: e.rowsById
|
|
2076
2348
|
};
|
|
2077
2349
|
}
|
|
2078
|
-
function
|
|
2079
|
-
return t.options.filterFromLeafRows ?
|
|
2350
|
+
function Dn(e, o, t) {
|
|
2351
|
+
return t.options.filterFromLeafRows ? Ln(e, o, t) : zn(e, o, t);
|
|
2080
2352
|
}
|
|
2081
|
-
function
|
|
2353
|
+
function Ln(e, o, t) {
|
|
2082
2354
|
var n;
|
|
2083
|
-
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(
|
|
2355
|
+
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
|
|
2084
2356
|
f === void 0 && (f = 0);
|
|
2085
|
-
const
|
|
2086
|
-
for (let d = 0; d <
|
|
2087
|
-
var
|
|
2088
|
-
let
|
|
2089
|
-
const m =
|
|
2090
|
-
if (m.columnFilters =
|
|
2091
|
-
if (m.subRows = s(
|
|
2092
|
-
|
|
2357
|
+
const g = [];
|
|
2358
|
+
for (let d = 0; d < u.length; d++) {
|
|
2359
|
+
var p;
|
|
2360
|
+
let a = u[d];
|
|
2361
|
+
const m = Ee(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
|
|
2362
|
+
if (m.columnFilters = a.columnFilters, (p = a.subRows) != null && p.length && f < i) {
|
|
2363
|
+
if (m.subRows = s(a.subRows, f + 1), a = m, o(a) && !m.subRows.length) {
|
|
2364
|
+
g.push(a), l[a.id] = a, r.push(a);
|
|
2093
2365
|
continue;
|
|
2094
2366
|
}
|
|
2095
|
-
if (o(
|
|
2096
|
-
|
|
2367
|
+
if (o(a) || m.subRows.length) {
|
|
2368
|
+
g.push(a), l[a.id] = a, r.push(a);
|
|
2097
2369
|
continue;
|
|
2098
2370
|
}
|
|
2099
2371
|
} else
|
|
2100
|
-
|
|
2372
|
+
a = m, o(a) && (g.push(a), l[a.id] = a, r.push(a));
|
|
2101
2373
|
}
|
|
2102
|
-
return
|
|
2374
|
+
return g;
|
|
2103
2375
|
};
|
|
2104
2376
|
return {
|
|
2105
2377
|
rows: s(e),
|
|
@@ -2107,23 +2379,23 @@ function Vn(e, o, t) {
|
|
|
2107
2379
|
rowsById: l
|
|
2108
2380
|
};
|
|
2109
2381
|
}
|
|
2110
|
-
function
|
|
2382
|
+
function zn(e, o, t) {
|
|
2111
2383
|
var n;
|
|
2112
|
-
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(
|
|
2384
|
+
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
|
|
2113
2385
|
f === void 0 && (f = 0);
|
|
2114
|
-
const
|
|
2115
|
-
for (let d = 0; d <
|
|
2116
|
-
let
|
|
2117
|
-
if (o(
|
|
2118
|
-
var
|
|
2119
|
-
if ((
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2386
|
+
const g = [];
|
|
2387
|
+
for (let d = 0; d < u.length; d++) {
|
|
2388
|
+
let a = u[d];
|
|
2389
|
+
if (o(a)) {
|
|
2390
|
+
var p;
|
|
2391
|
+
if ((p = a.subRows) != null && p.length && f < i) {
|
|
2392
|
+
const v = Ee(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
|
|
2393
|
+
v.subRows = s(a.subRows, f + 1), a = v;
|
|
2122
2394
|
}
|
|
2123
|
-
|
|
2395
|
+
g.push(a), r.push(a), l[a.id] = a;
|
|
2124
2396
|
}
|
|
2125
2397
|
}
|
|
2126
|
-
return
|
|
2398
|
+
return g;
|
|
2127
2399
|
};
|
|
2128
2400
|
return {
|
|
2129
2401
|
rows: s(e),
|
|
@@ -2131,8 +2403,8 @@ function Nn(e, o, t) {
|
|
|
2131
2403
|
rowsById: l
|
|
2132
2404
|
};
|
|
2133
2405
|
}
|
|
2134
|
-
function
|
|
2135
|
-
return (e) =>
|
|
2406
|
+
function Hn() {
|
|
2407
|
+
return (e) => y(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
|
|
2136
2408
|
if (!o.rows.length || !(t != null && t.length) && !n) {
|
|
2137
2409
|
for (let d = 0; d < o.flatRows.length; d++)
|
|
2138
2410
|
o.flatRows[d].columnFilters = {}, o.flatRows[d].columnFiltersMeta = {};
|
|
@@ -2140,66 +2412,66 @@ function Pn() {
|
|
|
2140
2412
|
}
|
|
2141
2413
|
const r = [], l = [];
|
|
2142
2414
|
(t ?? []).forEach((d) => {
|
|
2143
|
-
var
|
|
2415
|
+
var a;
|
|
2144
2416
|
const m = e.getColumn(d.id);
|
|
2145
2417
|
if (!m)
|
|
2146
2418
|
return;
|
|
2147
|
-
const
|
|
2148
|
-
if (!
|
|
2419
|
+
const v = m.getFilterFn();
|
|
2420
|
+
if (!v) {
|
|
2149
2421
|
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);
|
|
2150
2422
|
return;
|
|
2151
2423
|
}
|
|
2152
2424
|
r.push({
|
|
2153
2425
|
id: d.id,
|
|
2154
|
-
filterFn:
|
|
2155
|
-
resolvedValue: (
|
|
2426
|
+
filterFn: v,
|
|
2427
|
+
resolvedValue: (a = v.resolveFilterValue == null ? void 0 : v.resolveFilterValue(d.value)) != null ? a : d.value
|
|
2156
2428
|
});
|
|
2157
2429
|
});
|
|
2158
|
-
const i = (t ?? []).map((d) => d.id), s = e.getGlobalFilterFn(),
|
|
2159
|
-
n && s &&
|
|
2160
|
-
var
|
|
2430
|
+
const i = (t ?? []).map((d) => d.id), s = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
|
|
2431
|
+
n && s && u.length && (i.push("__global__"), u.forEach((d) => {
|
|
2432
|
+
var a;
|
|
2161
2433
|
l.push({
|
|
2162
2434
|
id: d.id,
|
|
2163
2435
|
filterFn: s,
|
|
2164
|
-
resolvedValue: (
|
|
2436
|
+
resolvedValue: (a = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? a : n
|
|
2165
2437
|
});
|
|
2166
2438
|
}));
|
|
2167
|
-
let f,
|
|
2439
|
+
let f, g;
|
|
2168
2440
|
for (let d = 0; d < o.flatRows.length; d++) {
|
|
2169
|
-
const
|
|
2170
|
-
if (
|
|
2441
|
+
const a = o.flatRows[d];
|
|
2442
|
+
if (a.columnFilters = {}, r.length)
|
|
2171
2443
|
for (let m = 0; m < r.length; m++) {
|
|
2172
2444
|
f = r[m];
|
|
2173
|
-
const
|
|
2174
|
-
|
|
2175
|
-
|
|
2445
|
+
const v = f.id;
|
|
2446
|
+
a.columnFilters[v] = f.filterFn(a, v, f.resolvedValue, (C) => {
|
|
2447
|
+
a.columnFiltersMeta[v] = C;
|
|
2176
2448
|
});
|
|
2177
2449
|
}
|
|
2178
2450
|
if (l.length) {
|
|
2179
2451
|
for (let m = 0; m < l.length; m++) {
|
|
2180
|
-
|
|
2181
|
-
const
|
|
2182
|
-
if (
|
|
2183
|
-
|
|
2452
|
+
g = l[m];
|
|
2453
|
+
const v = g.id;
|
|
2454
|
+
if (g.filterFn(a, v, g.resolvedValue, (C) => {
|
|
2455
|
+
a.columnFiltersMeta[v] = C;
|
|
2184
2456
|
})) {
|
|
2185
|
-
|
|
2457
|
+
a.columnFilters.__global__ = !0;
|
|
2186
2458
|
break;
|
|
2187
2459
|
}
|
|
2188
2460
|
}
|
|
2189
|
-
|
|
2461
|
+
a.columnFilters.__global__ !== !0 && (a.columnFilters.__global__ = !1);
|
|
2190
2462
|
}
|
|
2191
2463
|
}
|
|
2192
|
-
const
|
|
2193
|
-
for (let
|
|
2194
|
-
if (d.columnFilters[i[
|
|
2464
|
+
const p = (d) => {
|
|
2465
|
+
for (let a = 0; a < i.length; a++)
|
|
2466
|
+
if (d.columnFilters[i[a]] === !1)
|
|
2195
2467
|
return !1;
|
|
2196
2468
|
return !0;
|
|
2197
2469
|
};
|
|
2198
|
-
return
|
|
2199
|
-
},
|
|
2470
|
+
return Dn(o.rows, p, e);
|
|
2471
|
+
}, R(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
2200
2472
|
}
|
|
2201
|
-
function
|
|
2202
|
-
return (o) =>
|
|
2473
|
+
function An(e) {
|
|
2474
|
+
return (o) => y(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
|
|
2203
2475
|
if (!n.rows.length)
|
|
2204
2476
|
return n;
|
|
2205
2477
|
const {
|
|
@@ -2209,66 +2481,66 @@ function En(e) {
|
|
|
2209
2481
|
let {
|
|
2210
2482
|
rows: i,
|
|
2211
2483
|
flatRows: s,
|
|
2212
|
-
rowsById:
|
|
2484
|
+
rowsById: u
|
|
2213
2485
|
} = n;
|
|
2214
|
-
const f = r * l,
|
|
2215
|
-
i = i.slice(f,
|
|
2216
|
-
let
|
|
2217
|
-
o.options.paginateExpandedRows ?
|
|
2486
|
+
const f = r * l, g = f + r;
|
|
2487
|
+
i = i.slice(f, g);
|
|
2488
|
+
let p;
|
|
2489
|
+
o.options.paginateExpandedRows ? p = {
|
|
2218
2490
|
rows: i,
|
|
2219
2491
|
flatRows: s,
|
|
2220
|
-
rowsById:
|
|
2221
|
-
} :
|
|
2492
|
+
rowsById: u
|
|
2493
|
+
} : p = En({
|
|
2222
2494
|
rows: i,
|
|
2223
2495
|
flatRows: s,
|
|
2224
|
-
rowsById:
|
|
2225
|
-
}),
|
|
2226
|
-
const d = (
|
|
2227
|
-
|
|
2496
|
+
rowsById: u
|
|
2497
|
+
}), p.flatRows = [];
|
|
2498
|
+
const d = (a) => {
|
|
2499
|
+
p.flatRows.push(a), a.subRows.length && a.subRows.forEach(d);
|
|
2228
2500
|
};
|
|
2229
|
-
return
|
|
2230
|
-
},
|
|
2501
|
+
return p.rows.forEach(d), p;
|
|
2502
|
+
}, R(o.options, "debugTable", "getPaginationRowModel"));
|
|
2231
2503
|
}
|
|
2232
|
-
function
|
|
2233
|
-
return (e) =>
|
|
2504
|
+
function Gn() {
|
|
2505
|
+
return (e) => y(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
2234
2506
|
if (!t.rows.length || !(o != null && o.length))
|
|
2235
2507
|
return t;
|
|
2236
|
-
const n = e.getState().sorting, r = [], l = n.filter((
|
|
2508
|
+
const n = e.getState().sorting, r = [], l = n.filter((u) => {
|
|
2237
2509
|
var f;
|
|
2238
|
-
return (f = e.getColumn(
|
|
2510
|
+
return (f = e.getColumn(u.id)) == null ? void 0 : f.getCanSort();
|
|
2239
2511
|
}), i = {};
|
|
2240
|
-
l.forEach((
|
|
2241
|
-
const f = e.getColumn(
|
|
2242
|
-
f && (i[
|
|
2512
|
+
l.forEach((u) => {
|
|
2513
|
+
const f = e.getColumn(u.id);
|
|
2514
|
+
f && (i[u.id] = {
|
|
2243
2515
|
sortUndefined: f.columnDef.sortUndefined,
|
|
2244
2516
|
invertSorting: f.columnDef.invertSorting,
|
|
2245
2517
|
sortingFn: f.getSortingFn()
|
|
2246
2518
|
});
|
|
2247
2519
|
});
|
|
2248
|
-
const s = (
|
|
2249
|
-
const f =
|
|
2250
|
-
...
|
|
2520
|
+
const s = (u) => {
|
|
2521
|
+
const f = u.map((g) => ({
|
|
2522
|
+
...g
|
|
2251
2523
|
}));
|
|
2252
|
-
return f.sort((
|
|
2253
|
-
for (let
|
|
2524
|
+
return f.sort((g, p) => {
|
|
2525
|
+
for (let a = 0; a < l.length; a += 1) {
|
|
2254
2526
|
var d;
|
|
2255
|
-
const m = l[
|
|
2256
|
-
let
|
|
2257
|
-
if (
|
|
2258
|
-
const
|
|
2259
|
-
if (
|
|
2260
|
-
if (
|
|
2261
|
-
if (
|
|
2262
|
-
|
|
2527
|
+
const m = l[a], v = i[m.id], C = v.sortUndefined, h = (d = m == null ? void 0 : m.desc) != null ? d : !1;
|
|
2528
|
+
let S = 0;
|
|
2529
|
+
if (C) {
|
|
2530
|
+
const x = g.getValue(m.id), I = p.getValue(m.id), F = x === void 0, V = I === void 0;
|
|
2531
|
+
if (F || V) {
|
|
2532
|
+
if (C === "first") return F ? -1 : 1;
|
|
2533
|
+
if (C === "last") return F ? 1 : -1;
|
|
2534
|
+
S = F && V ? 0 : F ? C : -C;
|
|
2263
2535
|
}
|
|
2264
2536
|
}
|
|
2265
|
-
if (
|
|
2266
|
-
return
|
|
2537
|
+
if (S === 0 && (S = v.sortingFn(g, p, m.id)), S !== 0)
|
|
2538
|
+
return h && (S *= -1), v.invertSorting && (S *= -1), S;
|
|
2267
2539
|
}
|
|
2268
|
-
return
|
|
2269
|
-
}), f.forEach((
|
|
2270
|
-
var
|
|
2271
|
-
r.push(
|
|
2540
|
+
return g.index - p.index;
|
|
2541
|
+
}), f.forEach((g) => {
|
|
2542
|
+
var p;
|
|
2543
|
+
r.push(g), (p = g.subRows) != null && p.length && (g.subRows = s(g.subRows));
|
|
2272
2544
|
}), f;
|
|
2273
2545
|
};
|
|
2274
2546
|
return {
|
|
@@ -2276,7 +2548,7 @@ function Dn() {
|
|
|
2276
2548
|
flatRows: r,
|
|
2277
2549
|
rowsById: t.rowsById
|
|
2278
2550
|
};
|
|
2279
|
-
},
|
|
2551
|
+
}, R(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
|
|
2280
2552
|
}
|
|
2281
2553
|
/**
|
|
2282
2554
|
* react-table
|
|
@@ -2288,22 +2560,22 @@ function Dn() {
|
|
|
2288
2560
|
*
|
|
2289
2561
|
* @license MIT
|
|
2290
2562
|
*/
|
|
2291
|
-
function
|
|
2292
|
-
return e ?
|
|
2563
|
+
function Ue(e, o) {
|
|
2564
|
+
return e ? bn(e) ? /* @__PURE__ */ xe.createElement(e, o) : e : null;
|
|
2293
2565
|
}
|
|
2294
|
-
function
|
|
2295
|
-
return
|
|
2566
|
+
function bn(e) {
|
|
2567
|
+
return On(e) || typeof e == "function" || Tn(e);
|
|
2296
2568
|
}
|
|
2297
|
-
function
|
|
2569
|
+
function On(e) {
|
|
2298
2570
|
return typeof e == "function" && (() => {
|
|
2299
2571
|
const o = Object.getPrototypeOf(e);
|
|
2300
2572
|
return o.prototype && o.prototype.isReactComponent;
|
|
2301
2573
|
})();
|
|
2302
2574
|
}
|
|
2303
|
-
function
|
|
2575
|
+
function Tn(e) {
|
|
2304
2576
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
2305
2577
|
}
|
|
2306
|
-
function
|
|
2578
|
+
function Bn(e) {
|
|
2307
2579
|
const o = {
|
|
2308
2580
|
state: {},
|
|
2309
2581
|
// Dummy state
|
|
@@ -2312,9 +2584,9 @@ function zn(e) {
|
|
|
2312
2584
|
// noop
|
|
2313
2585
|
renderFallbackValue: null,
|
|
2314
2586
|
...e
|
|
2315
|
-
}, [t] =
|
|
2316
|
-
current:
|
|
2317
|
-
})), [n, r] =
|
|
2587
|
+
}, [t] = xe.useState(() => ({
|
|
2588
|
+
current: Pn(o)
|
|
2589
|
+
})), [n, r] = xe.useState(() => t.current.initialState);
|
|
2318
2590
|
return t.current.setOptions((l) => ({
|
|
2319
2591
|
...l,
|
|
2320
2592
|
...e,
|
|
@@ -2329,7 +2601,7 @@ function zn(e) {
|
|
|
2329
2601
|
}
|
|
2330
2602
|
})), t.current;
|
|
2331
2603
|
}
|
|
2332
|
-
const
|
|
2604
|
+
const Xe = ({
|
|
2333
2605
|
editable: e = !0,
|
|
2334
2606
|
deletable: o = !0,
|
|
2335
2607
|
pageSize: t = 25,
|
|
@@ -2340,100 +2612,100 @@ const Ue = ({
|
|
|
2340
2612
|
rows: l,
|
|
2341
2613
|
schema: i,
|
|
2342
2614
|
mappings: s,
|
|
2343
|
-
errorsByRow:
|
|
2615
|
+
errorsByRow: u,
|
|
2344
2616
|
editingCell: f,
|
|
2345
|
-
startEditing:
|
|
2346
|
-
stopEditing:
|
|
2617
|
+
startEditing: g,
|
|
2618
|
+
stopEditing: p,
|
|
2347
2619
|
updateCell: d,
|
|
2348
|
-
deleteRow:
|
|
2349
|
-
} =
|
|
2350
|
-
const
|
|
2620
|
+
deleteRow: a
|
|
2621
|
+
} = Z(), [m, v] = q([]), [C, h] = q(""), [S, x] = q(""), I = be(() => s.filter((_) => _.targetKey !== null).map((_) => {
|
|
2622
|
+
const $ = i == null ? void 0 : i.columns.find((P) => P.key === _.targetKey);
|
|
2351
2623
|
return {
|
|
2352
|
-
sourceColumn:
|
|
2353
|
-
targetKey:
|
|
2354
|
-
label: (
|
|
2355
|
-
type: (
|
|
2624
|
+
sourceColumn: _.sourceColumn,
|
|
2625
|
+
targetKey: _.targetKey,
|
|
2626
|
+
label: ($ == null ? void 0 : $.label) || _.targetKey,
|
|
2627
|
+
type: ($ == null ? void 0 : $.type) || "string"
|
|
2356
2628
|
};
|
|
2357
|
-
}), [s, i]),
|
|
2358
|
-
(
|
|
2359
|
-
const
|
|
2360
|
-
return
|
|
2629
|
+
}), [s, i]), F = Ne(
|
|
2630
|
+
(_, $) => {
|
|
2631
|
+
const P = u.get(_);
|
|
2632
|
+
return P == null ? void 0 : P.find((A) => A.columnKey === $);
|
|
2361
2633
|
},
|
|
2362
|
-
[
|
|
2363
|
-
),
|
|
2364
|
-
|
|
2365
|
-
},
|
|
2366
|
-
f && (d(f.rowIndex, f.columnKey,
|
|
2367
|
-
},
|
|
2368
|
-
|
|
2369
|
-
},
|
|
2370
|
-
|
|
2371
|
-
},
|
|
2634
|
+
[u]
|
|
2635
|
+
), V = (_, $, P) => {
|
|
2636
|
+
x(P), g(_, $);
|
|
2637
|
+
}, W = () => {
|
|
2638
|
+
f && (d(f.rowIndex, f.columnKey, S), n == null || n(f.rowIndex, f.columnKey, S)), p();
|
|
2639
|
+
}, k = () => {
|
|
2640
|
+
x(""), p();
|
|
2641
|
+
}, H = (_) => {
|
|
2642
|
+
a(_), r == null || r(_);
|
|
2643
|
+
}, K = qt(), O = be(
|
|
2372
2644
|
() => [
|
|
2373
|
-
|
|
2645
|
+
K.accessor("rowIndex", {
|
|
2374
2646
|
header: "#",
|
|
2375
2647
|
size: 60,
|
|
2376
|
-
cell: (
|
|
2648
|
+
cell: (_) => /* @__PURE__ */ c("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: _.getValue() + 1 })
|
|
2377
2649
|
}),
|
|
2378
|
-
...
|
|
2379
|
-
(
|
|
2380
|
-
id:
|
|
2381
|
-
header:
|
|
2382
|
-
cell: (
|
|
2383
|
-
const
|
|
2384
|
-
return (f == null ? void 0 : f.rowIndex) ===
|
|
2385
|
-
/* @__PURE__ */
|
|
2650
|
+
...I.map(
|
|
2651
|
+
(_) => K.accessor(($) => $.data[_.targetKey] || $.data[_.sourceColumn], {
|
|
2652
|
+
id: _.targetKey,
|
|
2653
|
+
header: _.label,
|
|
2654
|
+
cell: ($) => {
|
|
2655
|
+
const P = $.row.original.rowIndex, A = String($.getValue() ?? ""), D = F(P, _.targetKey);
|
|
2656
|
+
return (f == null ? void 0 : f.rowIndex) === P && (f == null ? void 0 : f.columnKey) === _.targetKey ? /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2 ff-min-w-[280px]", children: [
|
|
2657
|
+
/* @__PURE__ */ c(
|
|
2386
2658
|
"input",
|
|
2387
2659
|
{
|
|
2388
2660
|
type: "text",
|
|
2389
|
-
value:
|
|
2390
|
-
onChange: (
|
|
2391
|
-
onKeyDown: (
|
|
2392
|
-
|
|
2661
|
+
value: S,
|
|
2662
|
+
onChange: (Y) => x(Y.target.value),
|
|
2663
|
+
onKeyDown: (Y) => {
|
|
2664
|
+
Y.key === "Enter" && W(), Y.key === "Escape" && k();
|
|
2393
2665
|
},
|
|
2394
2666
|
className: "ff-input ff-py-2 ff-px-3 ff-text-sm ff-flex-1 ff-min-w-[160px]",
|
|
2395
2667
|
autoFocus: !0
|
|
2396
2668
|
}
|
|
2397
2669
|
),
|
|
2398
|
-
/* @__PURE__ */
|
|
2670
|
+
/* @__PURE__ */ c(
|
|
2399
2671
|
"button",
|
|
2400
2672
|
{
|
|
2401
|
-
onClick:
|
|
2673
|
+
onClick: W,
|
|
2402
2674
|
className: "ff-btn ff-btn-primary ff-btn-sm ff-flex-shrink-0",
|
|
2403
2675
|
children: "Save"
|
|
2404
2676
|
}
|
|
2405
2677
|
),
|
|
2406
|
-
/* @__PURE__ */
|
|
2678
|
+
/* @__PURE__ */ c(
|
|
2407
2679
|
"button",
|
|
2408
2680
|
{
|
|
2409
|
-
onClick:
|
|
2681
|
+
onClick: k,
|
|
2410
2682
|
className: "ff-btn ff-btn-secondary ff-btn-sm ff-flex-shrink-0",
|
|
2411
2683
|
children: "Cancel"
|
|
2412
2684
|
}
|
|
2413
2685
|
)
|
|
2414
|
-
] }) : /* @__PURE__ */
|
|
2686
|
+
] }) : /* @__PURE__ */ w(
|
|
2415
2687
|
"div",
|
|
2416
2688
|
{
|
|
2417
|
-
className:
|
|
2689
|
+
className: U(
|
|
2418
2690
|
"ff-group ff-flex ff-items-center ff-gap-2",
|
|
2419
|
-
(
|
|
2420
|
-
(
|
|
2691
|
+
(D == null ? void 0 : D.severity) === "error" && "ff-cell-error",
|
|
2692
|
+
(D == null ? void 0 : D.severity) === "warning" && "ff-cell-warning"
|
|
2421
2693
|
),
|
|
2422
2694
|
children: [
|
|
2423
|
-
/* @__PURE__ */
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
/* @__PURE__ */
|
|
2427
|
-
|
|
2428
|
-
|
|
2695
|
+
/* @__PURE__ */ c("span", { className: "ff-flex-1 ff-truncate", children: A || /* @__PURE__ */ c("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
|
|
2696
|
+
D && /* @__PURE__ */ w("div", { className: "ff-relative ff-group/tooltip", children: [
|
|
2697
|
+
D.severity === "error" ? /* @__PURE__ */ c(Pe, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ c(_e, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
|
|
2698
|
+
/* @__PURE__ */ w("div", { className: "ff-tooltip ff-bottom-full ff-left-1/2 ff-transform ff--translate-x-1/2 ff-mb-2 ff-w-48 group-hover/tooltip:ff-tooltip-visible", children: [
|
|
2699
|
+
D.message,
|
|
2700
|
+
D.suggestion && /* @__PURE__ */ c("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: D.suggestion })
|
|
2429
2701
|
] })
|
|
2430
2702
|
] }),
|
|
2431
|
-
e && /* @__PURE__ */
|
|
2703
|
+
e && /* @__PURE__ */ c(
|
|
2432
2704
|
"button",
|
|
2433
2705
|
{
|
|
2434
|
-
onClick: () =>
|
|
2706
|
+
onClick: () => V(P, _.targetKey, A),
|
|
2435
2707
|
className: "ff-opacity-0 group-hover:ff-opacity-100 ff-p-1 ff-rounded ff-transition-opacity ff-edit-btn",
|
|
2436
|
-
children: /* @__PURE__ */
|
|
2708
|
+
children: /* @__PURE__ */ c(Ht, { className: "ff-w-3 ff-h-3" })
|
|
2437
2709
|
}
|
|
2438
2710
|
)
|
|
2439
2711
|
]
|
|
@@ -2444,134 +2716,134 @@ const Ue = ({
|
|
|
2444
2716
|
),
|
|
2445
2717
|
// Actions column (delete)
|
|
2446
2718
|
...o ? [
|
|
2447
|
-
|
|
2719
|
+
K.display({
|
|
2448
2720
|
id: "actions",
|
|
2449
2721
|
header: "",
|
|
2450
2722
|
size: 50,
|
|
2451
|
-
cell: (
|
|
2452
|
-
const
|
|
2453
|
-
return /* @__PURE__ */
|
|
2723
|
+
cell: (_) => {
|
|
2724
|
+
const $ = _.row.original.rowIndex;
|
|
2725
|
+
return /* @__PURE__ */ c(
|
|
2454
2726
|
"button",
|
|
2455
2727
|
{
|
|
2456
|
-
onClick: () =>
|
|
2728
|
+
onClick: () => H($),
|
|
2457
2729
|
className: "ff-delete-btn",
|
|
2458
2730
|
title: "Delete row",
|
|
2459
|
-
children: /* @__PURE__ */
|
|
2731
|
+
children: /* @__PURE__ */ c(Ot, { className: "ff-w-4 ff-h-4" })
|
|
2460
2732
|
}
|
|
2461
2733
|
);
|
|
2462
2734
|
}
|
|
2463
2735
|
})
|
|
2464
2736
|
] : []
|
|
2465
2737
|
],
|
|
2466
|
-
[
|
|
2467
|
-
),
|
|
2738
|
+
[I, f, S, e, o, F, K]
|
|
2739
|
+
), z = Bn({
|
|
2468
2740
|
data: l,
|
|
2469
2741
|
columns: O,
|
|
2470
2742
|
state: {
|
|
2471
2743
|
sorting: m,
|
|
2472
|
-
globalFilter:
|
|
2744
|
+
globalFilter: C
|
|
2473
2745
|
},
|
|
2474
|
-
onSortingChange:
|
|
2475
|
-
onGlobalFilterChange:
|
|
2476
|
-
getCoreRowModel:
|
|
2477
|
-
getPaginationRowModel:
|
|
2478
|
-
getSortedRowModel:
|
|
2479
|
-
getFilteredRowModel:
|
|
2746
|
+
onSortingChange: v,
|
|
2747
|
+
onGlobalFilterChange: h,
|
|
2748
|
+
getCoreRowModel: kn(),
|
|
2749
|
+
getPaginationRowModel: An(),
|
|
2750
|
+
getSortedRowModel: Gn(),
|
|
2751
|
+
getFilteredRowModel: Hn(),
|
|
2480
2752
|
initialState: {
|
|
2481
2753
|
pagination: {
|
|
2482
2754
|
pageSize: t
|
|
2483
2755
|
}
|
|
2484
2756
|
}
|
|
2485
2757
|
});
|
|
2486
|
-
return /* @__PURE__ */
|
|
2487
|
-
/* @__PURE__ */
|
|
2488
|
-
/* @__PURE__ */
|
|
2758
|
+
return /* @__PURE__ */ w("div", { className: "ff-space-y-4", children: [
|
|
2759
|
+
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-justify-between", children: [
|
|
2760
|
+
/* @__PURE__ */ c(
|
|
2489
2761
|
"input",
|
|
2490
2762
|
{
|
|
2491
2763
|
type: "text",
|
|
2492
|
-
value:
|
|
2493
|
-
onChange: (
|
|
2764
|
+
value: C,
|
|
2765
|
+
onChange: (_) => h(_.target.value),
|
|
2494
2766
|
placeholder: "Search all columns...",
|
|
2495
2767
|
className: "ff-input ff-max-w-xs"
|
|
2496
2768
|
}
|
|
2497
2769
|
),
|
|
2498
|
-
/* @__PURE__ */
|
|
2499
|
-
|
|
2770
|
+
/* @__PURE__ */ w("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
2771
|
+
z.getFilteredRowModel().rows.length,
|
|
2500
2772
|
" rows"
|
|
2501
2773
|
] })
|
|
2502
2774
|
] }),
|
|
2503
|
-
/* @__PURE__ */
|
|
2504
|
-
/* @__PURE__ */
|
|
2775
|
+
/* @__PURE__ */ c("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ w("table", { className: "ff-table", children: [
|
|
2776
|
+
/* @__PURE__ */ c("thead", { children: z.getHeaderGroups().map((_) => /* @__PURE__ */ c("tr", { children: _.headers.map(($) => /* @__PURE__ */ c(
|
|
2505
2777
|
"th",
|
|
2506
2778
|
{
|
|
2507
|
-
style: { width:
|
|
2508
|
-
onClick:
|
|
2509
|
-
className:
|
|
2510
|
-
|
|
2779
|
+
style: { width: $.getSize() },
|
|
2780
|
+
onClick: $.column.getToggleSortingHandler(),
|
|
2781
|
+
className: U(
|
|
2782
|
+
$.column.getCanSort() && "ff-cursor-pointer ff-select-none"
|
|
2511
2783
|
),
|
|
2512
|
-
children: /* @__PURE__ */
|
|
2513
|
-
|
|
2514
|
-
|
|
2784
|
+
children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
|
|
2785
|
+
Ue($.column.columnDef.header, $.getContext()),
|
|
2786
|
+
$.column.getIsSorted() && /* @__PURE__ */ c("span", { children: $.column.getIsSorted() === "asc" ? "↑" : "↓" })
|
|
2515
2787
|
] })
|
|
2516
2788
|
},
|
|
2517
|
-
|
|
2518
|
-
)) },
|
|
2519
|
-
/* @__PURE__ */
|
|
2520
|
-
const
|
|
2521
|
-
return /* @__PURE__ */
|
|
2789
|
+
$.id
|
|
2790
|
+
)) }, _.id)) }),
|
|
2791
|
+
/* @__PURE__ */ c("tbody", { children: z.getRowModel().rows.map((_) => {
|
|
2792
|
+
const $ = u.has(_.original.rowIndex);
|
|
2793
|
+
return /* @__PURE__ */ c(
|
|
2522
2794
|
"tr",
|
|
2523
2795
|
{
|
|
2524
|
-
className:
|
|
2525
|
-
children:
|
|
2796
|
+
className: U($ && "ff-row-error"),
|
|
2797
|
+
children: _.getVisibleCells().map((P) => /* @__PURE__ */ c("td", { children: Ue(P.column.columnDef.cell, P.getContext()) }, P.id))
|
|
2526
2798
|
},
|
|
2527
|
-
|
|
2799
|
+
_.id
|
|
2528
2800
|
);
|
|
2529
2801
|
}) })
|
|
2530
2802
|
] }) }),
|
|
2531
|
-
/* @__PURE__ */
|
|
2532
|
-
/* @__PURE__ */
|
|
2803
|
+
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
|
|
2804
|
+
/* @__PURE__ */ w("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
2533
2805
|
"Page ",
|
|
2534
|
-
|
|
2806
|
+
z.getState().pagination.pageIndex + 1,
|
|
2535
2807
|
" of ",
|
|
2536
|
-
|
|
2808
|
+
z.getPageCount()
|
|
2537
2809
|
] }),
|
|
2538
|
-
/* @__PURE__ */
|
|
2539
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
|
|
2811
|
+
/* @__PURE__ */ w(
|
|
2540
2812
|
"button",
|
|
2541
2813
|
{
|
|
2542
|
-
onClick: () =>
|
|
2543
|
-
disabled: !
|
|
2814
|
+
onClick: () => z.previousPage(),
|
|
2815
|
+
disabled: !z.getCanPreviousPage(),
|
|
2544
2816
|
className: "ff-btn ff-btn-secondary ff-btn-sm",
|
|
2545
2817
|
children: [
|
|
2546
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ c(Ft, { className: "ff-w-4 ff-h-4" }),
|
|
2547
2819
|
"Previous"
|
|
2548
2820
|
]
|
|
2549
2821
|
}
|
|
2550
2822
|
),
|
|
2551
|
-
/* @__PURE__ */
|
|
2823
|
+
/* @__PURE__ */ w(
|
|
2552
2824
|
"button",
|
|
2553
2825
|
{
|
|
2554
|
-
onClick: () =>
|
|
2555
|
-
disabled: !
|
|
2826
|
+
onClick: () => z.nextPage(),
|
|
2827
|
+
disabled: !z.getCanNextPage(),
|
|
2556
2828
|
className: "ff-btn ff-btn-secondary ff-btn-sm",
|
|
2557
2829
|
children: [
|
|
2558
2830
|
"Next",
|
|
2559
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ c(vt, { className: "ff-w-4 ff-h-4" })
|
|
2560
2832
|
]
|
|
2561
2833
|
}
|
|
2562
2834
|
)
|
|
2563
2835
|
] })
|
|
2564
2836
|
] })
|
|
2565
2837
|
] });
|
|
2566
|
-
},
|
|
2838
|
+
}, We = ({
|
|
2567
2839
|
showDetails: e = !0
|
|
2568
2840
|
}) => {
|
|
2569
|
-
const { validationResults: o } =
|
|
2841
|
+
const { validationResults: o } = Z();
|
|
2570
2842
|
if (!o)
|
|
2571
2843
|
return null;
|
|
2572
|
-
const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: s, summary:
|
|
2573
|
-
return /* @__PURE__ */
|
|
2574
|
-
/* @__PURE__ */
|
|
2844
|
+
const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: s, summary: u } = o, f = Math.round(r / n * 100);
|
|
2845
|
+
return /* @__PURE__ */ w("div", { className: "ff-space-y-4", children: [
|
|
2846
|
+
/* @__PURE__ */ w(
|
|
2575
2847
|
"div",
|
|
2576
2848
|
{
|
|
2577
2849
|
className: "ff-flex ff-items-center ff-gap-4 ff-p-4 ff-rounded-lg ff-border",
|
|
@@ -2580,9 +2852,9 @@ const Ue = ({
|
|
|
2580
2852
|
borderColor: t ? "var(--ff-success)" : "var(--ff-error)"
|
|
2581
2853
|
},
|
|
2582
2854
|
children: [
|
|
2583
|
-
t ? /* @__PURE__ */
|
|
2584
|
-
/* @__PURE__ */
|
|
2585
|
-
/* @__PURE__ */
|
|
2855
|
+
t ? /* @__PURE__ */ c(ke, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ c(Te, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
|
|
2856
|
+
/* @__PURE__ */ w("div", { children: [
|
|
2857
|
+
/* @__PURE__ */ c(
|
|
2586
2858
|
"h3",
|
|
2587
2859
|
{
|
|
2588
2860
|
className: "ff-text-lg ff-font-semibold",
|
|
@@ -2590,7 +2862,7 @@ const Ue = ({
|
|
|
2590
2862
|
children: t ? "Validation Passed" : "Validation Failed"
|
|
2591
2863
|
}
|
|
2592
2864
|
),
|
|
2593
|
-
/* @__PURE__ */
|
|
2865
|
+
/* @__PURE__ */ w("p", { className: "ff-text-sm", style: { color: t ? "var(--ff-success)" : "var(--ff-error)" }, children: [
|
|
2594
2866
|
r,
|
|
2595
2867
|
" of ",
|
|
2596
2868
|
n,
|
|
@@ -2602,27 +2874,27 @@ const Ue = ({
|
|
|
2602
2874
|
]
|
|
2603
2875
|
}
|
|
2604
2876
|
),
|
|
2605
|
-
/* @__PURE__ */
|
|
2606
|
-
/* @__PURE__ */
|
|
2607
|
-
/* @__PURE__ */
|
|
2608
|
-
/* @__PURE__ */
|
|
2877
|
+
/* @__PURE__ */ w("div", { className: "ff-grid ff-grid-cols-4 ff-gap-4", children: [
|
|
2878
|
+
/* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
|
|
2879
|
+
/* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-text-primary)" }, children: n }),
|
|
2880
|
+
/* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: "Total Rows" })
|
|
2609
2881
|
] }),
|
|
2610
|
-
/* @__PURE__ */
|
|
2611
|
-
/* @__PURE__ */
|
|
2612
|
-
/* @__PURE__ */
|
|
2882
|
+
/* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: [
|
|
2883
|
+
/* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-success-dark)" }, children: r }),
|
|
2884
|
+
/* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: "Valid Rows" })
|
|
2613
2885
|
] }),
|
|
2614
|
-
/* @__PURE__ */
|
|
2615
|
-
/* @__PURE__ */
|
|
2616
|
-
/* @__PURE__ */
|
|
2886
|
+
/* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)" }, children: [
|
|
2887
|
+
/* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-error-dark)" }, children: l }),
|
|
2888
|
+
/* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-error)" }, children: "Errors" })
|
|
2617
2889
|
] }),
|
|
2618
|
-
/* @__PURE__ */
|
|
2619
|
-
/* @__PURE__ */
|
|
2620
|
-
/* @__PURE__ */
|
|
2890
|
+
/* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
|
|
2891
|
+
/* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-warning-dark)" }, children: i }),
|
|
2892
|
+
/* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-warning)" }, children: "Warnings" })
|
|
2621
2893
|
] })
|
|
2622
2894
|
] }),
|
|
2623
|
-
e &&
|
|
2624
|
-
/* @__PURE__ */
|
|
2625
|
-
/* @__PURE__ */
|
|
2895
|
+
e && u.byColumn && Object.keys(u.byColumn).length > 0 && /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-xl ff-overflow-hidden", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
|
|
2896
|
+
/* @__PURE__ */ c("div", { className: "ff-px-4 ff-py-3", style: { backgroundColor: "var(--ff-bg-secondary)" }, children: /* @__PURE__ */ c("h4", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-secondary)" }, children: "Issues by Column" }) }),
|
|
2897
|
+
/* @__PURE__ */ c("div", { children: Object.entries(u.byColumn).filter(([, g]) => g.errorCount > 0 || g.warningCount > 0).map(([g, p], d, a) => /* @__PURE__ */ w(
|
|
2626
2898
|
"div",
|
|
2627
2899
|
{
|
|
2628
2900
|
className: "ff-flex ff-items-center ff-justify-between ff-px-4 ff-py-3",
|
|
@@ -2630,63 +2902,63 @@ const Ue = ({
|
|
|
2630
2902
|
borderTop: d > 0 ? "1px solid var(--ff-border-light)" : void 0
|
|
2631
2903
|
},
|
|
2632
2904
|
children: [
|
|
2633
|
-
/* @__PURE__ */
|
|
2634
|
-
/* @__PURE__ */
|
|
2635
|
-
|
|
2905
|
+
/* @__PURE__ */ w("div", { className: "ff-flex-1 ff-min-w-0 ff-mr-4", children: [
|
|
2906
|
+
/* @__PURE__ */ c("p", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-primary)" }, children: p.columnKey }),
|
|
2907
|
+
p.mostCommonError && /* @__PURE__ */ c("p", { className: "ff-text-sm ff-truncate", style: { color: "var(--ff-text-muted)" }, children: p.mostCommonError })
|
|
2636
2908
|
] }),
|
|
2637
|
-
/* @__PURE__ */
|
|
2638
|
-
|
|
2639
|
-
/* @__PURE__ */
|
|
2640
|
-
|
|
2909
|
+
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2 ff-flex-shrink-0", children: [
|
|
2910
|
+
p.errorCount > 0 && /* @__PURE__ */ w("span", { className: "ff-badge ff-badge-error ff-whitespace-nowrap", children: [
|
|
2911
|
+
/* @__PURE__ */ c(Te, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
|
|
2912
|
+
p.errorCount,
|
|
2641
2913
|
" ",
|
|
2642
|
-
|
|
2914
|
+
p.errorCount === 1 ? "error" : "errors"
|
|
2643
2915
|
] }),
|
|
2644
|
-
|
|
2645
|
-
/* @__PURE__ */
|
|
2646
|
-
|
|
2916
|
+
p.warningCount > 0 && /* @__PURE__ */ w("span", { className: "ff-badge ff-badge-warning ff-whitespace-nowrap", children: [
|
|
2917
|
+
/* @__PURE__ */ c(_e, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
|
|
2918
|
+
p.warningCount,
|
|
2647
2919
|
" ",
|
|
2648
|
-
|
|
2920
|
+
p.warningCount === 1 ? "warning" : "warnings"
|
|
2649
2921
|
] })
|
|
2650
2922
|
] })
|
|
2651
2923
|
]
|
|
2652
2924
|
},
|
|
2653
|
-
|
|
2925
|
+
g
|
|
2654
2926
|
)) })
|
|
2655
2927
|
] }),
|
|
2656
|
-
e &&
|
|
2657
|
-
/* @__PURE__ */
|
|
2658
|
-
/* @__PURE__ */
|
|
2659
|
-
/* @__PURE__ */
|
|
2660
|
-
/* @__PURE__ */
|
|
2661
|
-
|
|
2662
|
-
/* @__PURE__ */
|
|
2928
|
+
e && u.duplicates && u.duplicates.length > 0 && /* @__PURE__ */ c("div", { className: "ff-border ff-rounded-lg ff-p-4", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-start ff-gap-3", children: [
|
|
2929
|
+
/* @__PURE__ */ c(_e, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
|
|
2930
|
+
/* @__PURE__ */ w("div", { children: [
|
|
2931
|
+
/* @__PURE__ */ c("h4", { className: "ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Duplicate Values Found" }),
|
|
2932
|
+
/* @__PURE__ */ w("ul", { className: "ff-mt-2 ff-space-y-1 ff-text-sm", style: { color: "var(--ff-warning-dark)" }, children: [
|
|
2933
|
+
u.duplicates.slice(0, 5).map((g, p) => /* @__PURE__ */ w("li", { children: [
|
|
2934
|
+
/* @__PURE__ */ c("span", { className: "ff-font-mono", children: g.columnKey }),
|
|
2663
2935
|
': "',
|
|
2664
|
-
String(
|
|
2936
|
+
String(g.value),
|
|
2665
2937
|
'" appears',
|
|
2666
2938
|
" ",
|
|
2667
|
-
|
|
2939
|
+
g.rowIndices.length,
|
|
2668
2940
|
" times (rows",
|
|
2669
2941
|
" ",
|
|
2670
|
-
|
|
2671
|
-
|
|
2942
|
+
g.rowIndices.slice(0, 3).map((d) => d + 1).join(", "),
|
|
2943
|
+
g.rowIndices.length > 3 ? "..." : "",
|
|
2672
2944
|
")"
|
|
2673
|
-
] },
|
|
2674
|
-
|
|
2945
|
+
] }, p)),
|
|
2946
|
+
u.duplicates.length > 5 && /* @__PURE__ */ w("li", { style: { color: "var(--ff-warning)" }, children: [
|
|
2675
2947
|
"... and ",
|
|
2676
|
-
|
|
2948
|
+
u.duplicates.length - 5,
|
|
2677
2949
|
" more duplicate groups"
|
|
2678
2950
|
] })
|
|
2679
2951
|
] })
|
|
2680
2952
|
] })
|
|
2681
2953
|
] }) })
|
|
2682
2954
|
] });
|
|
2683
|
-
},
|
|
2684
|
-
{ key: "upload", label: "Upload", icon:
|
|
2685
|
-
{ key: "mapping", label: "Map Columns", icon:
|
|
2686
|
-
{ key: "validation", label: "Validate", icon:
|
|
2687
|
-
{ key: "review", label: "Review", icon:
|
|
2688
|
-
{ key: "complete", label: "Complete", icon:
|
|
2689
|
-
],
|
|
2955
|
+
}, Re = ["upload", "mapping", "validation", "complete"], Kn = [
|
|
2956
|
+
{ key: "upload", label: "Upload", icon: Qe },
|
|
2957
|
+
{ key: "mapping", label: "Map Columns", icon: Lt },
|
|
2958
|
+
{ key: "validation", label: "Validate", icon: Gt },
|
|
2959
|
+
{ key: "review", label: "Review", icon: Vt },
|
|
2960
|
+
{ key: "complete", label: "Complete", icon: ke }
|
|
2961
|
+
], Wn = ({
|
|
2690
2962
|
template: e,
|
|
2691
2963
|
schema: o,
|
|
2692
2964
|
mode: t = "modal",
|
|
@@ -2697,119 +2969,123 @@ const Ue = ({
|
|
|
2697
2969
|
onError: s
|
|
2698
2970
|
}) => {
|
|
2699
2971
|
const {
|
|
2700
|
-
step:
|
|
2972
|
+
step: u,
|
|
2701
2973
|
sessionId: f,
|
|
2702
|
-
file:
|
|
2703
|
-
mappings:
|
|
2974
|
+
file: g,
|
|
2975
|
+
mappings: p,
|
|
2704
2976
|
validationResults: d,
|
|
2705
|
-
isLoading:
|
|
2977
|
+
isLoading: a,
|
|
2706
2978
|
error: m,
|
|
2707
|
-
setSchema:
|
|
2708
|
-
setSessionId:
|
|
2709
|
-
setParsedData:
|
|
2710
|
-
setMappings:
|
|
2711
|
-
setUnmapped:
|
|
2712
|
-
setValidationResults:
|
|
2713
|
-
setStep:
|
|
2714
|
-
nextStep:
|
|
2715
|
-
previousStep:
|
|
2716
|
-
setLoading:
|
|
2717
|
-
setError:
|
|
2718
|
-
reset:
|
|
2719
|
-
} =
|
|
2720
|
-
|
|
2721
|
-
if (
|
|
2722
|
-
if (
|
|
2723
|
-
const
|
|
2724
|
-
|
|
2979
|
+
setSchema: v,
|
|
2980
|
+
setSessionId: C,
|
|
2981
|
+
setParsedData: h,
|
|
2982
|
+
setMappings: S,
|
|
2983
|
+
setUnmapped: x,
|
|
2984
|
+
setValidationResults: I,
|
|
2985
|
+
setStep: F,
|
|
2986
|
+
nextStep: V,
|
|
2987
|
+
previousStep: W,
|
|
2988
|
+
setLoading: k,
|
|
2989
|
+
setError: H,
|
|
2990
|
+
reset: K
|
|
2991
|
+
} = Z(), [O, z] = q(null), [_, $] = q(null), [P, A] = q(0), [D, Q] = q("");
|
|
2992
|
+
Oe(() => {
|
|
2993
|
+
if ($(null), e)
|
|
2994
|
+
if (wt(e)) {
|
|
2995
|
+
const M = Ct(e);
|
|
2996
|
+
M ? z(M) : ($(`Failed to load template "${e}"`), s == null || s(new Error(`Failed to load template "${e}"`)));
|
|
2725
2997
|
} else {
|
|
2726
|
-
const
|
|
2727
|
-
|
|
2998
|
+
const M = `Template "${e}" not found. Available templates: ${Be.join(", ")}`;
|
|
2999
|
+
$(M), s == null || s(new Error(M));
|
|
2728
3000
|
}
|
|
2729
3001
|
else if (o)
|
|
2730
|
-
|
|
3002
|
+
z(o);
|
|
2731
3003
|
else {
|
|
2732
|
-
const
|
|
2733
|
-
|
|
3004
|
+
const M = `No template or schema provided. Please specify a template (${Be.join(", ")}) or provide a custom schema.`;
|
|
3005
|
+
$(M), s == null || s(new Error(M));
|
|
2734
3006
|
}
|
|
2735
|
-
}, [e, o, s]),
|
|
2736
|
-
O && (
|
|
3007
|
+
}, [e, o, s]), Oe(() => {
|
|
3008
|
+
O && (v(O), Y(O));
|
|
2737
3009
|
}, [O]);
|
|
2738
|
-
const
|
|
3010
|
+
const Y = async (M) => {
|
|
2739
3011
|
try {
|
|
2740
|
-
|
|
2741
|
-
const
|
|
2742
|
-
|
|
2743
|
-
} catch (
|
|
2744
|
-
const
|
|
2745
|
-
|
|
3012
|
+
k(!0);
|
|
3013
|
+
const T = await te().createImportSession(M);
|
|
3014
|
+
C(T.sessionId);
|
|
3015
|
+
} catch (N) {
|
|
3016
|
+
const T = N;
|
|
3017
|
+
H(T.message), s == null || s(T);
|
|
2746
3018
|
} finally {
|
|
2747
|
-
|
|
3019
|
+
k(!1);
|
|
2748
3020
|
}
|
|
2749
|
-
},
|
|
3021
|
+
}, it = Ne(async (M) => {
|
|
2750
3022
|
if (f)
|
|
2751
3023
|
try {
|
|
2752
|
-
|
|
2753
|
-
const
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
3024
|
+
k(!0), H(null), A(10), Q("Uploading file...");
|
|
3025
|
+
const N = te();
|
|
3026
|
+
A(30), Q("Parsing file data...");
|
|
3027
|
+
const T = await N.uploadFile(f, M);
|
|
3028
|
+
A(60), Q("Processing rows...");
|
|
3029
|
+
const Ge = (J, gt) => ({
|
|
3030
|
+
rowIndex: J.rowIndex ?? gt,
|
|
3031
|
+
data: J.data ?? J,
|
|
3032
|
+
rawData: J.rawData ?? Object.values(J.data ?? J)
|
|
2757
3033
|
});
|
|
2758
|
-
|
|
2759
|
-
headers:
|
|
2760
|
-
rows:
|
|
2761
|
-
totalRows:
|
|
2762
|
-
sampleRows:
|
|
2763
|
-
}),
|
|
2764
|
-
} catch (
|
|
2765
|
-
|
|
3034
|
+
h({
|
|
3035
|
+
headers: T.data.headers,
|
|
3036
|
+
rows: T.data.sampleRows.map(Ge),
|
|
3037
|
+
totalRows: T.data.totalRows,
|
|
3038
|
+
sampleRows: T.data.sampleRows.map(Ge)
|
|
3039
|
+
}), A(80), Q("Matching columns..."), V(), await st(), A(100), Q("Done");
|
|
3040
|
+
} catch (N) {
|
|
3041
|
+
H(`Failed to process the uploaded file: ${N.message}`);
|
|
2766
3042
|
} finally {
|
|
2767
|
-
|
|
3043
|
+
k(!1), A(0), Q("");
|
|
2768
3044
|
}
|
|
2769
|
-
}, [f]),
|
|
3045
|
+
}, [f]), st = async () => {
|
|
2770
3046
|
if (f)
|
|
2771
3047
|
try {
|
|
2772
|
-
|
|
2773
|
-
const
|
|
2774
|
-
|
|
2775
|
-
} catch (
|
|
2776
|
-
|
|
3048
|
+
k(!0);
|
|
3049
|
+
const N = await te().matchColumns(f);
|
|
3050
|
+
S(N.mappings), x(N.unmappedSource, N.unmappedTarget);
|
|
3051
|
+
} catch (M) {
|
|
3052
|
+
H(`Column matching failed: ${M.message}`);
|
|
2777
3053
|
} finally {
|
|
2778
|
-
|
|
3054
|
+
k(!1);
|
|
2779
3055
|
}
|
|
2780
|
-
},
|
|
3056
|
+
}, at = async () => {
|
|
2781
3057
|
if (f)
|
|
2782
3058
|
try {
|
|
2783
|
-
|
|
2784
|
-
const
|
|
2785
|
-
|
|
2786
|
-
} catch (
|
|
2787
|
-
|
|
3059
|
+
k(!0), H(null);
|
|
3060
|
+
const N = await te().validateImport(f);
|
|
3061
|
+
I(N.validation), V();
|
|
3062
|
+
} catch (M) {
|
|
3063
|
+
H(`Validation failed: ${M.message}`);
|
|
2788
3064
|
} finally {
|
|
2789
|
-
|
|
3065
|
+
k(!1);
|
|
2790
3066
|
}
|
|
2791
|
-
}, [
|
|
3067
|
+
}, [He, fe] = q(null), ut = async () => {
|
|
2792
3068
|
if (f)
|
|
2793
3069
|
try {
|
|
2794
|
-
|
|
2795
|
-
const
|
|
3070
|
+
k(!0), H(null), fe(null);
|
|
3071
|
+
const N = await te().completeImport(f, {
|
|
2796
3072
|
skipInvalidRows: !0,
|
|
2797
3073
|
acknowledgeWarnings: !0
|
|
2798
3074
|
});
|
|
2799
|
-
|
|
2800
|
-
} catch (
|
|
2801
|
-
|
|
3075
|
+
F("complete"), l == null || l(N);
|
|
3076
|
+
} catch (M) {
|
|
3077
|
+
fe(M.message), F("complete");
|
|
2802
3078
|
} finally {
|
|
2803
|
-
|
|
3079
|
+
k(!1);
|
|
2804
3080
|
}
|
|
2805
|
-
},
|
|
2806
|
-
|
|
2807
|
-
},
|
|
2808
|
-
switch (
|
|
3081
|
+
}, de = () => {
|
|
3082
|
+
K(), i == null || i();
|
|
3083
|
+
}, ft = () => Kn.findIndex((M) => M.key === u), dt = () => {
|
|
3084
|
+
switch (u) {
|
|
2809
3085
|
case "upload":
|
|
2810
|
-
return
|
|
3086
|
+
return g !== null;
|
|
2811
3087
|
case "mapping":
|
|
2812
|
-
return
|
|
3088
|
+
return p.length > 0 && p.some((M) => M.targetKey !== null);
|
|
2813
3089
|
case "validation":
|
|
2814
3090
|
return d !== null;
|
|
2815
3091
|
case "review":
|
|
@@ -2817,138 +3093,152 @@ const Ue = ({
|
|
|
2817
3093
|
default:
|
|
2818
3094
|
return !1;
|
|
2819
3095
|
}
|
|
2820
|
-
},
|
|
2821
|
-
switch (
|
|
3096
|
+
}, ct = async () => {
|
|
3097
|
+
switch (u) {
|
|
2822
3098
|
case "mapping":
|
|
2823
|
-
await
|
|
3099
|
+
await at();
|
|
2824
3100
|
break;
|
|
2825
3101
|
case "validation":
|
|
2826
|
-
|
|
3102
|
+
V();
|
|
2827
3103
|
break;
|
|
2828
3104
|
case "review":
|
|
2829
|
-
await
|
|
3105
|
+
await ut();
|
|
2830
3106
|
break;
|
|
2831
3107
|
default:
|
|
2832
|
-
|
|
3108
|
+
V();
|
|
2833
3109
|
}
|
|
2834
3110
|
};
|
|
2835
|
-
if (
|
|
2836
|
-
return /* @__PURE__ */
|
|
2837
|
-
/* @__PURE__ */
|
|
2838
|
-
/* @__PURE__ */
|
|
2839
|
-
/* @__PURE__ */
|
|
2840
|
-
i && /* @__PURE__ */
|
|
3111
|
+
if (_)
|
|
3112
|
+
return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: /* @__PURE__ */ c("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ w("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
|
|
3113
|
+
/* @__PURE__ */ c("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ c(ae, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
|
|
3114
|
+
/* @__PURE__ */ c("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Configuration Error" }),
|
|
3115
|
+
/* @__PURE__ */ c("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: _ }),
|
|
3116
|
+
i && /* @__PURE__ */ c("button", { onClick: de, className: "ff-btn ff-btn-secondary", children: "Close" })
|
|
2841
3117
|
] }) }) });
|
|
2842
3118
|
if (!O)
|
|
2843
|
-
return /* @__PURE__ */
|
|
2844
|
-
/* @__PURE__ */
|
|
2845
|
-
/* @__PURE__ */
|
|
3119
|
+
return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: /* @__PURE__ */ c("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ w("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
|
|
3120
|
+
/* @__PURE__ */ c(ge, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
|
|
3121
|
+
/* @__PURE__ */ c("p", { style: { color: "var(--ff-text-muted)" }, children: "Loading template..." })
|
|
2846
3122
|
] }) }) });
|
|
2847
|
-
const
|
|
2848
|
-
const
|
|
2849
|
-
return
|
|
2850
|
-
},
|
|
2851
|
-
/* @__PURE__ */
|
|
2852
|
-
/* @__PURE__ */
|
|
2853
|
-
/* @__PURE__ */
|
|
2854
|
-
/* @__PURE__ */
|
|
2855
|
-
/* @__PURE__ */
|
|
3123
|
+
const ee = () => {
|
|
3124
|
+
const M = u === "review" ? "validation" : u;
|
|
3125
|
+
return Re.indexOf(M);
|
|
3126
|
+
}, Ae = /* @__PURE__ */ c(re, { children: /* @__PURE__ */ w("div", { className: t === "embed" ? "ff-container ff-embed" : "ff-container ff-modal", children: [
|
|
3127
|
+
/* @__PURE__ */ w("div", { className: "ff-modal-header", children: [
|
|
3128
|
+
/* @__PURE__ */ w("div", { className: "ff-modal-header-left", children: [
|
|
3129
|
+
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
|
|
3130
|
+
/* @__PURE__ */ c("div", { className: "ff-modal-icon", children: /* @__PURE__ */ c(Pt, {}) }),
|
|
3131
|
+
/* @__PURE__ */ c("h2", { className: "ff-modal-title", children: "Import Data" })
|
|
2856
3132
|
] }),
|
|
2857
|
-
/* @__PURE__ */
|
|
2858
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ c("div", { className: "ff-steps ff-ml-4", children: Re.map((M, N) => /* @__PURE__ */ w(pt.Fragment, { children: [
|
|
3134
|
+
/* @__PURE__ */ c(
|
|
2859
3135
|
"div",
|
|
2860
3136
|
{
|
|
2861
|
-
className:
|
|
3137
|
+
className: U(
|
|
2862
3138
|
"ff-step",
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
3139
|
+
ee() === N && "ff-step-active",
|
|
3140
|
+
ee() > N && "ff-step-complete",
|
|
3141
|
+
ee() < N && "ff-step-pending"
|
|
2866
3142
|
),
|
|
2867
|
-
children:
|
|
3143
|
+
children: ee() > N ? "✓" : N + 1
|
|
2868
3144
|
}
|
|
2869
3145
|
),
|
|
2870
|
-
|
|
3146
|
+
N < Re.length - 1 && /* @__PURE__ */ c("div", { className: U(
|
|
2871
3147
|
"ff-step-connector",
|
|
2872
|
-
|
|
3148
|
+
ee() > N && "ff-step-connector-complete"
|
|
2873
3149
|
) })
|
|
2874
|
-
] },
|
|
3150
|
+
] }, M)) })
|
|
2875
3151
|
] }),
|
|
2876
|
-
/* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ c(
|
|
2877
3153
|
"button",
|
|
2878
3154
|
{
|
|
2879
|
-
onClick:
|
|
3155
|
+
onClick: de,
|
|
2880
3156
|
className: "ff-modal-close",
|
|
2881
|
-
children: /* @__PURE__ */
|
|
3157
|
+
children: /* @__PURE__ */ c(ae, { className: "ff-w-5 ff-h-5" })
|
|
2882
3158
|
}
|
|
2883
3159
|
)
|
|
2884
3160
|
] }),
|
|
2885
|
-
/* @__PURE__ */
|
|
2886
|
-
m && /* @__PURE__ */
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
/* @__PURE__ */
|
|
2891
|
-
|
|
3161
|
+
/* @__PURE__ */ w("div", { className: "ff-modal-body", children: [
|
|
3162
|
+
m && /* @__PURE__ */ c("div", { className: "ff-mb-4 ff-p-4 ff-border ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)", color: "var(--ff-error)" }, children: m }),
|
|
3163
|
+
u === "upload" && /* @__PURE__ */ c("div", { className: "ff-py-4", children: /* @__PURE__ */ c("div", { className: "ff-max-w-xl ff-mx-auto", children: a && P > 0 ? /* @__PURE__ */ w("div", { className: "ff-p-8 ff-text-center", children: [
|
|
3164
|
+
/* @__PURE__ */ c(ge, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mx-auto ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
|
|
3165
|
+
/* @__PURE__ */ c("p", { className: "ff-font-medium ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: D }),
|
|
3166
|
+
/* @__PURE__ */ c("div", { className: "ff-progress ff-w-full ff-max-w-xs ff-mx-auto ff-mb-2", children: /* @__PURE__ */ c(
|
|
3167
|
+
"div",
|
|
3168
|
+
{
|
|
3169
|
+
className: "ff-progress-bar",
|
|
3170
|
+
style: { width: `${P}%`, transition: "width 0.3s ease" }
|
|
3171
|
+
}
|
|
3172
|
+
) }),
|
|
3173
|
+
/* @__PURE__ */ w("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
3174
|
+
P,
|
|
3175
|
+
"% complete"
|
|
3176
|
+
] })
|
|
3177
|
+
] }) : /* @__PURE__ */ c(Bt, { onFileSelect: it }) }) }),
|
|
3178
|
+
u === "mapping" && /* @__PURE__ */ c(Kt, {}),
|
|
3179
|
+
u === "validation" && /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
|
|
3180
|
+
/* @__PURE__ */ c(We, {}),
|
|
3181
|
+
/* @__PURE__ */ c(Xe, { editable: !0 })
|
|
2892
3182
|
] }),
|
|
2893
|
-
|
|
2894
|
-
/* @__PURE__ */
|
|
2895
|
-
/* @__PURE__ */
|
|
3183
|
+
u === "review" && /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
|
|
3184
|
+
/* @__PURE__ */ c(We, { showDetails: !1 }),
|
|
3185
|
+
/* @__PURE__ */ c(Xe, { editable: !1, pageSize: 10 })
|
|
2896
3186
|
] }),
|
|
2897
|
-
|
|
2898
|
-
/* @__PURE__ */
|
|
2899
|
-
/* @__PURE__ */
|
|
2900
|
-
/* @__PURE__ */
|
|
2901
|
-
/* @__PURE__ */
|
|
2902
|
-
/* @__PURE__ */
|
|
3187
|
+
u === "complete" && /* @__PURE__ */ c("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: He ? /* @__PURE__ */ w(re, { children: [
|
|
3188
|
+
/* @__PURE__ */ c("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ c(ae, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
|
|
3189
|
+
/* @__PURE__ */ c("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Failed" }),
|
|
3190
|
+
/* @__PURE__ */ c("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: He }),
|
|
3191
|
+
/* @__PURE__ */ w("div", { className: "ff-flex ff-gap-3", children: [
|
|
3192
|
+
/* @__PURE__ */ c(
|
|
2903
3193
|
"button",
|
|
2904
3194
|
{
|
|
2905
3195
|
onClick: () => {
|
|
2906
|
-
|
|
3196
|
+
fe(null), F("review");
|
|
2907
3197
|
},
|
|
2908
3198
|
className: "ff-btn ff-btn-secondary",
|
|
2909
3199
|
children: "Back to Review"
|
|
2910
3200
|
}
|
|
2911
3201
|
),
|
|
2912
|
-
i && /* @__PURE__ */
|
|
3202
|
+
i && /* @__PURE__ */ c("button", { onClick: de, className: "ff-btn ff-btn-secondary", children: "Close" })
|
|
2913
3203
|
] })
|
|
2914
|
-
] }) : /* @__PURE__ */
|
|
2915
|
-
/* @__PURE__ */
|
|
2916
|
-
/* @__PURE__ */
|
|
2917
|
-
/* @__PURE__ */
|
|
3204
|
+
] }) : /* @__PURE__ */ w(re, { children: [
|
|
3205
|
+
/* @__PURE__ */ c("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-success-light)" }, children: /* @__PURE__ */ c(ke, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
|
|
3206
|
+
/* @__PURE__ */ c("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Complete!" }),
|
|
3207
|
+
/* @__PURE__ */ c("p", { style: { color: "var(--ff-text-muted)" }, children: "Your data has been successfully imported." })
|
|
2918
3208
|
] }) })
|
|
2919
3209
|
] }),
|
|
2920
|
-
|
|
2921
|
-
/* @__PURE__ */
|
|
3210
|
+
u !== "complete" && /* @__PURE__ */ w("div", { className: "ff-modal-footer", children: [
|
|
3211
|
+
/* @__PURE__ */ c(
|
|
2922
3212
|
"button",
|
|
2923
3213
|
{
|
|
2924
|
-
onClick:
|
|
2925
|
-
disabled:
|
|
3214
|
+
onClick: W,
|
|
3215
|
+
disabled: ft() === 0 || a,
|
|
2926
3216
|
className: "ff-btn ff-btn-secondary",
|
|
2927
3217
|
children: "Back"
|
|
2928
3218
|
}
|
|
2929
3219
|
),
|
|
2930
|
-
/* @__PURE__ */
|
|
3220
|
+
/* @__PURE__ */ c(
|
|
2931
3221
|
"button",
|
|
2932
3222
|
{
|
|
2933
|
-
onClick:
|
|
2934
|
-
disabled: !
|
|
3223
|
+
onClick: ct,
|
|
3224
|
+
disabled: !dt() || a,
|
|
2935
3225
|
className: "ff-btn ff-btn-primary",
|
|
2936
|
-
children:
|
|
2937
|
-
/* @__PURE__ */
|
|
3226
|
+
children: a ? /* @__PURE__ */ w(re, { children: [
|
|
3227
|
+
/* @__PURE__ */ c(ge, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
|
|
2938
3228
|
"Processing..."
|
|
2939
|
-
] }) :
|
|
3229
|
+
] }) : u === "review" ? "Complete Import" : "Continue"
|
|
2940
3230
|
}
|
|
2941
3231
|
)
|
|
2942
3232
|
] })
|
|
2943
3233
|
] }) });
|
|
2944
|
-
return /* @__PURE__ */
|
|
3234
|
+
return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: t === "modal" ? /* @__PURE__ */ c("div", { className: "ff-overlay", children: Ae }) : Ae });
|
|
2945
3235
|
};
|
|
2946
3236
|
export {
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
3237
|
+
Kt as C,
|
|
3238
|
+
Xe as D,
|
|
3239
|
+
Bt as F,
|
|
3240
|
+
Wn as I,
|
|
3241
|
+
We as V,
|
|
3242
|
+
Z as u
|
|
2953
3243
|
};
|
|
2954
|
-
//# sourceMappingURL=ImportWizard-
|
|
3244
|
+
//# sourceMappingURL=ImportWizard-CrUjPf36.mjs.map
|