@fileflow/sdk 0.1.19 → 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-wQRSiaEP.mjs → ImportWizard-CrUjPf36.mjs} +1259 -975
- package/dist/ImportWizard-CrUjPf36.mjs.map +1 -0
- package/dist/{KYCWizard-BHL5pJzV.mjs → KYCWizard-16nacG1o.mjs} +2 -2
- package/dist/{KYCWizard-BHL5pJzV.mjs.map → KYCWizard-16nacG1o.mjs.map} +1 -1
- package/dist/{KYCWizard-BCUzLLBj.js → KYCWizard-k0NBBKiM.js} +2 -2
- package/dist/{KYCWizard-BCUzLLBj.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-BHPobN9B.js → index-Bo1agWLS.js} +2 -2
- package/dist/{index-BHPobN9B.js.map → index-Bo1agWLS.js.map} +1 -1
- package/dist/{index-oYOmMOWf.mjs → index-EFXXxSbj.mjs} +2 -2
- package/dist/{index-oYOmMOWf.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/package.json +1 -1
- package/dist/ImportWizard-Ct_0XYe5.js +0 -78
- package/dist/ImportWizard-Ct_0XYe5.js.map +0 -1
- package/dist/ImportWizard-wQRSiaEP.mjs.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,62 +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],
|
|
212
|
-
|
|
481
|
+
updateCell: (t, n, r) => {
|
|
482
|
+
const l = o(), i = [...l.rows], s = i.find((f) => f.rowIndex === t);
|
|
483
|
+
s && (s.data = { ...s.data, [n]: String(r) });
|
|
213
484
|
const u = new Set(l.editedRows);
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
...n.validationResults,
|
|
227
|
-
totalRows: a,
|
|
228
|
-
validRows: s,
|
|
229
|
-
errorCount: f,
|
|
230
|
-
warningCount: p,
|
|
231
|
-
infoCount: c,
|
|
232
|
-
isValid: f === 0,
|
|
233
|
-
errors: u
|
|
234
|
-
} : null;
|
|
235
|
-
return {
|
|
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({
|
|
236
497
|
rows: l,
|
|
237
|
-
totalRows: l.length
|
|
238
|
-
|
|
239
|
-
validationResults:
|
|
240
|
-
|
|
241
|
-
|
|
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
|
+
},
|
|
242
508
|
setStatus: (t) => e({ status: t }),
|
|
243
509
|
setLoading: (t) => e({ isLoading: t }),
|
|
244
510
|
setError: (t) => e({ error: t }),
|
|
245
|
-
reset: () => e(
|
|
246
|
-
})),
|
|
511
|
+
reset: () => e(Ke)
|
|
512
|
+
})), Bt = ({
|
|
247
513
|
onFileSelect: e,
|
|
248
514
|
maxSize: o = 50 * 1024 * 1024,
|
|
249
515
|
// 50MB
|
|
250
516
|
acceptedTypes: t = [".csv", ".xlsx", ".xls"]
|
|
251
517
|
}) => {
|
|
252
|
-
const { file: n, fileName: r, fileSize: l, setFile: i, error:
|
|
253
|
-
(
|
|
254
|
-
if (
|
|
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) {
|
|
255
521
|
u("Invalid file type or file too large");
|
|
256
522
|
return;
|
|
257
523
|
}
|
|
258
|
-
if (
|
|
259
|
-
const
|
|
260
|
-
i(
|
|
524
|
+
if (C.length > 0) {
|
|
525
|
+
const S = C[0];
|
|
526
|
+
i(S), e == null || e(S);
|
|
261
527
|
}
|
|
262
528
|
},
|
|
263
529
|
[e, i, u]
|
|
264
|
-
), { getRootProps:
|
|
265
|
-
onDrop:
|
|
530
|
+
), { getRootProps: p, getInputProps: d, isDragActive: a } = ht({
|
|
531
|
+
onDrop: g,
|
|
266
532
|
accept: {
|
|
267
533
|
"text/csv": [".csv"],
|
|
268
534
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
|
|
@@ -271,45 +537,45 @@ const Lt = [
|
|
|
271
537
|
maxSize: o,
|
|
272
538
|
multiple: !1,
|
|
273
539
|
disabled: f
|
|
274
|
-
}), m = (
|
|
275
|
-
|
|
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();
|
|
276
542
|
};
|
|
277
|
-
return n ? /* @__PURE__ */
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
/* @__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) })
|
|
282
548
|
] }),
|
|
283
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ c(
|
|
284
550
|
"button",
|
|
285
551
|
{
|
|
286
|
-
onClick:
|
|
552
|
+
onClick: v,
|
|
287
553
|
className: "ff-p-1.5 ff-rounded-full ff-transition-colors",
|
|
288
554
|
style: { color: "var(--ff-success)" },
|
|
289
555
|
"aria-label": "Remove file",
|
|
290
|
-
children: /* @__PURE__ */
|
|
556
|
+
children: /* @__PURE__ */ c(ae, { className: "ff-w-5 ff-h-5" })
|
|
291
557
|
}
|
|
292
558
|
)
|
|
293
|
-
] }) }) : /* @__PURE__ */
|
|
294
|
-
/* @__PURE__ */
|
|
559
|
+
] }) }) : /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
|
|
560
|
+
/* @__PURE__ */ w(
|
|
295
561
|
"div",
|
|
296
562
|
{
|
|
297
|
-
...
|
|
298
|
-
className:
|
|
563
|
+
...p(),
|
|
564
|
+
className: U(
|
|
299
565
|
"ff-dropzone",
|
|
300
|
-
|
|
566
|
+
a && "ff-dropzone-active",
|
|
301
567
|
f && "ff-opacity-50 ff-cursor-not-allowed"
|
|
302
568
|
),
|
|
303
569
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__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(
|
|
309
575
|
"ff-btn ff-btn-primary",
|
|
310
576
|
f && "ff-opacity-50 ff-cursor-wait"
|
|
311
577
|
), children: f ? "Processing..." : "Choose file" }) }),
|
|
312
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ w("p", { className: "ff-dropzone-formats", children: [
|
|
313
579
|
"Supports ",
|
|
314
580
|
t.join(", "),
|
|
315
581
|
" up to ",
|
|
@@ -318,66 +584,66 @@ const Lt = [
|
|
|
318
584
|
]
|
|
319
585
|
}
|
|
320
586
|
),
|
|
321
|
-
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
/* @__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 })
|
|
324
590
|
] })
|
|
325
591
|
] });
|
|
326
|
-
},
|
|
327
|
-
const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } =
|
|
328
|
-
const
|
|
329
|
-
r(
|
|
330
|
-
},
|
|
331
|
-
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)
|
|
332
598
|
);
|
|
333
|
-
return /* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
/* @__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" })
|
|
338
604
|
] }),
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__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" })
|
|
343
609
|
] }),
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
/* @__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" })
|
|
347
613
|
] }),
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
/* @__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" })
|
|
351
617
|
] })
|
|
352
618
|
] })
|
|
353
619
|
] }),
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
l.find((m) => m.key ===
|
|
356
|
-
const d =
|
|
357
|
-
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(
|
|
358
624
|
"div",
|
|
359
625
|
{
|
|
360
|
-
className:
|
|
626
|
+
className: U(
|
|
361
627
|
"ff-mapping-row",
|
|
362
|
-
d &&
|
|
363
|
-
d && !
|
|
628
|
+
d && a && "ff-mapping-row-success",
|
|
629
|
+
d && !a && "ff-mapping-row-warning"
|
|
364
630
|
),
|
|
365
631
|
children: [
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
/* @__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(
|
|
369
635
|
"select",
|
|
370
636
|
{
|
|
371
|
-
value:
|
|
372
|
-
onChange: (m) => i(
|
|
637
|
+
value: p.targetKey || "",
|
|
638
|
+
onChange: (m) => i(p.sourceColumn, m.target.value),
|
|
373
639
|
className: "ff-input",
|
|
374
640
|
children: [
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
l.map((m) => /* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ c("option", { value: "", children: "-- Do not import --" }),
|
|
642
|
+
l.map((m) => /* @__PURE__ */ w(
|
|
377
643
|
"option",
|
|
378
644
|
{
|
|
379
645
|
value: m.key,
|
|
380
|
-
disabled:
|
|
646
|
+
disabled: g.has(m.key) && p.targetKey !== m.key,
|
|
381
647
|
children: [
|
|
382
648
|
m.label,
|
|
383
649
|
" (",
|
|
@@ -391,32 +657,32 @@ const Lt = [
|
|
|
391
657
|
]
|
|
392
658
|
}
|
|
393
659
|
) }),
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
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),
|
|
398
664
|
"%"
|
|
399
665
|
] }),
|
|
400
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ w("span", { style: { color: "var(--ff-text-muted)" }, children: [
|
|
401
667
|
"(",
|
|
402
|
-
u(
|
|
668
|
+
u(p.confidence),
|
|
403
669
|
")"
|
|
404
670
|
] })
|
|
405
671
|
] })
|
|
406
672
|
]
|
|
407
673
|
},
|
|
408
|
-
|
|
674
|
+
p.sourceColumn
|
|
409
675
|
);
|
|
410
676
|
}) }),
|
|
411
677
|
(() => {
|
|
412
|
-
const
|
|
413
|
-
(d) => d.required && !
|
|
678
|
+
const p = l.filter(
|
|
679
|
+
(d) => d.required && !g.has(d.key)
|
|
414
680
|
);
|
|
415
|
-
return
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
/* @__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(", ") })
|
|
420
686
|
] })
|
|
421
687
|
] }) : null;
|
|
422
688
|
})()
|
|
@@ -432,7 +698,7 @@ const Lt = [
|
|
|
432
698
|
*
|
|
433
699
|
* @license MIT
|
|
434
700
|
*/
|
|
435
|
-
function
|
|
701
|
+
function qt() {
|
|
436
702
|
return {
|
|
437
703
|
accessor: (e, o) => typeof e == "function" ? {
|
|
438
704
|
...o,
|
|
@@ -445,24 +711,24 @@ function Gt() {
|
|
|
445
711
|
group: (e) => e
|
|
446
712
|
};
|
|
447
713
|
}
|
|
448
|
-
function
|
|
714
|
+
function j(e, o) {
|
|
449
715
|
return typeof e == "function" ? e(o) : e;
|
|
450
716
|
}
|
|
451
717
|
function L(e, o) {
|
|
452
718
|
return (t) => {
|
|
453
719
|
o.setState((n) => ({
|
|
454
720
|
...n,
|
|
455
|
-
[e]:
|
|
721
|
+
[e]: j(t, n[e])
|
|
456
722
|
}));
|
|
457
723
|
};
|
|
458
724
|
}
|
|
459
|
-
function
|
|
725
|
+
function ue(e) {
|
|
460
726
|
return e instanceof Function;
|
|
461
727
|
}
|
|
462
|
-
function
|
|
728
|
+
function jt(e) {
|
|
463
729
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
|
464
730
|
}
|
|
465
|
-
function
|
|
731
|
+
function Ut(e, o) {
|
|
466
732
|
const t = [], n = (r) => {
|
|
467
733
|
r.forEach((l) => {
|
|
468
734
|
t.push(l);
|
|
@@ -472,23 +738,23 @@ function bt(e, o) {
|
|
|
472
738
|
};
|
|
473
739
|
return n(e), t;
|
|
474
740
|
}
|
|
475
|
-
function
|
|
741
|
+
function y(e, o, t) {
|
|
476
742
|
let n = [], r;
|
|
477
743
|
return (l) => {
|
|
478
744
|
let i;
|
|
479
745
|
t.key && t.debug && (i = Date.now());
|
|
480
|
-
const
|
|
481
|
-
if (!(
|
|
746
|
+
const s = e(l);
|
|
747
|
+
if (!(s.length !== n.length || s.some((g, p) => n[p] !== g)))
|
|
482
748
|
return r;
|
|
483
|
-
n =
|
|
749
|
+
n = s;
|
|
484
750
|
let f;
|
|
485
|
-
if (t.key && t.debug && (f = Date.now()), r = o(...
|
|
486
|
-
const
|
|
487
|
-
for (m = String(m); m.length <
|
|
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()) {
|
|
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; )
|
|
488
754
|
m = " " + m;
|
|
489
755
|
return m;
|
|
490
756
|
};
|
|
491
|
-
console.info(`%c⏱ ${
|
|
757
|
+
console.info(`%c⏱ ${a(p, 5)} /${a(g, 5)} ms`, `
|
|
492
758
|
font-size: .6rem;
|
|
493
759
|
font-weight: bold;
|
|
494
760
|
color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
@@ -506,7 +772,7 @@ function R(e, o, t, n) {
|
|
|
506
772
|
onChange: n
|
|
507
773
|
};
|
|
508
774
|
}
|
|
509
|
-
function
|
|
775
|
+
function Xt(e, o, t, n) {
|
|
510
776
|
const r = () => {
|
|
511
777
|
var i;
|
|
512
778
|
return (i = l.getValue()) != null ? i : e.options.renderFallbackValue;
|
|
@@ -516,9 +782,9 @@ function Bt(e, o, t, n) {
|
|
|
516
782
|
column: t,
|
|
517
783
|
getValue: () => o.getValue(n),
|
|
518
784
|
renderValue: r,
|
|
519
|
-
getContext:
|
|
785
|
+
getContext: y(() => [e, t, o, l], (i, s, u, f) => ({
|
|
520
786
|
table: i,
|
|
521
|
-
column:
|
|
787
|
+
column: s,
|
|
522
788
|
row: u,
|
|
523
789
|
cell: f,
|
|
524
790
|
getValue: f.getValue,
|
|
@@ -529,48 +795,48 @@ function Bt(e, o, t, n) {
|
|
|
529
795
|
i.createCell == null || i.createCell(l, t, o, e);
|
|
530
796
|
}, {}), l;
|
|
531
797
|
}
|
|
532
|
-
function
|
|
798
|
+
function Wt(e, o, t, n) {
|
|
533
799
|
var r, l;
|
|
534
|
-
const
|
|
800
|
+
const s = {
|
|
535
801
|
...e._getDefaultColumnDef(),
|
|
536
802
|
...o
|
|
537
|
-
}, u =
|
|
538
|
-
let f = (r = (l =
|
|
539
|
-
if (
|
|
540
|
-
let
|
|
541
|
-
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(".")) {
|
|
542
808
|
var m;
|
|
543
|
-
|
|
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.`);
|
|
544
810
|
}
|
|
545
|
-
return
|
|
546
|
-
} :
|
|
547
|
-
throw process.env.NODE_ENV !== "production" ? new Error(
|
|
548
|
-
let
|
|
811
|
+
return a;
|
|
812
|
+
} : g = (d) => d[s.accessorKey]), !f)
|
|
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();
|
|
814
|
+
let p = {
|
|
549
815
|
id: `${String(f)}`,
|
|
550
|
-
accessorFn:
|
|
816
|
+
accessorFn: g,
|
|
551
817
|
parent: n,
|
|
552
818
|
depth: t,
|
|
553
|
-
columnDef:
|
|
819
|
+
columnDef: s,
|
|
554
820
|
columns: [],
|
|
555
|
-
getFlatColumns:
|
|
821
|
+
getFlatColumns: y(() => [!0], () => {
|
|
556
822
|
var d;
|
|
557
|
-
return [
|
|
823
|
+
return [p, ...(d = p.columns) == null ? void 0 : d.flatMap((a) => a.getFlatColumns())];
|
|
558
824
|
}, R(e.options, "debugColumns", "column.getFlatColumns")),
|
|
559
|
-
getLeafColumns:
|
|
560
|
-
var
|
|
561
|
-
if ((
|
|
562
|
-
let m =
|
|
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());
|
|
563
829
|
return d(m);
|
|
564
830
|
}
|
|
565
|
-
return [
|
|
831
|
+
return [p];
|
|
566
832
|
}, R(e.options, "debugColumns", "column.getLeafColumns"))
|
|
567
833
|
};
|
|
568
834
|
for (const d of e._features)
|
|
569
|
-
d.createColumn == null || d.createColumn(
|
|
570
|
-
return
|
|
835
|
+
d.createColumn == null || d.createColumn(p, e);
|
|
836
|
+
return p;
|
|
571
837
|
}
|
|
572
|
-
const
|
|
573
|
-
function
|
|
838
|
+
const E = "debugHeaders";
|
|
839
|
+
function qe(e, o, t) {
|
|
574
840
|
var n;
|
|
575
841
|
let l = {
|
|
576
842
|
id: (n = t.id) != null ? n : o.id,
|
|
@@ -584,10 +850,10 @@ function Te(e, o, t) {
|
|
|
584
850
|
rowSpan: 0,
|
|
585
851
|
headerGroup: null,
|
|
586
852
|
getLeafHeaders: () => {
|
|
587
|
-
const i = [],
|
|
588
|
-
u.subHeaders && u.subHeaders.length && u.subHeaders.map(
|
|
853
|
+
const i = [], s = (u) => {
|
|
854
|
+
u.subHeaders && u.subHeaders.length && u.subHeaders.map(s), i.push(u);
|
|
589
855
|
};
|
|
590
|
-
return
|
|
856
|
+
return s(l), i;
|
|
591
857
|
},
|
|
592
858
|
getContext: () => ({
|
|
593
859
|
table: e,
|
|
@@ -599,93 +865,93 @@ function Te(e, o, t) {
|
|
|
599
865
|
i.createHeader == null || i.createHeader(l, e);
|
|
600
866
|
}), l;
|
|
601
867
|
}
|
|
602
|
-
const
|
|
868
|
+
const Qt = {
|
|
603
869
|
createTable: (e) => {
|
|
604
|
-
e.getHeaderGroups =
|
|
870
|
+
e.getHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
|
|
605
871
|
var l, i;
|
|
606
|
-
const
|
|
607
|
-
return
|
|
608
|
-
}, R(e.options,
|
|
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) => {
|
|
609
875
|
var r;
|
|
610
|
-
const l = (r = n == null ? void 0 : n.map((i) => t.find((
|
|
611
|
-
return
|
|
612
|
-
}, R(e.options,
|
|
876
|
+
const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
|
|
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) => {
|
|
613
879
|
var r;
|
|
614
|
-
const l = (r = n == null ? void 0 : n.map((i) => t.find((
|
|
615
|
-
return
|
|
616
|
-
}, R(e.options,
|
|
880
|
+
const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
|
|
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) => {
|
|
617
883
|
var n;
|
|
618
884
|
return !((n = t.subHeaders) != null && n.length);
|
|
619
|
-
}), R(e.options,
|
|
885
|
+
}), R(e.options, E, "getCenterLeafHeaders")), e.getLeftLeafHeaders = y(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
|
620
886
|
var n;
|
|
621
887
|
return !((n = t.subHeaders) != null && n.length);
|
|
622
|
-
}), R(e.options,
|
|
888
|
+
}), R(e.options, E, "getLeftLeafHeaders")), e.getRightLeafHeaders = y(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
|
623
889
|
var n;
|
|
624
890
|
return !((n = t.subHeaders) != null && n.length);
|
|
625
|
-
}), R(e.options,
|
|
626
|
-
var r, l, i,
|
|
627
|
-
return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (
|
|
628
|
-
}, R(e.options,
|
|
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"));
|
|
629
895
|
}
|
|
630
896
|
};
|
|
631
|
-
function
|
|
897
|
+
function le(e, o, t, n) {
|
|
632
898
|
var r, l;
|
|
633
899
|
let i = 0;
|
|
634
|
-
const
|
|
635
|
-
|
|
636
|
-
var
|
|
637
|
-
(
|
|
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);
|
|
638
904
|
}, 0);
|
|
639
905
|
};
|
|
640
|
-
|
|
906
|
+
s(e);
|
|
641
907
|
let u = [];
|
|
642
|
-
const f = (d,
|
|
908
|
+
const f = (d, a) => {
|
|
643
909
|
const m = {
|
|
644
|
-
depth:
|
|
645
|
-
id: [n, `${
|
|
910
|
+
depth: a,
|
|
911
|
+
id: [n, `${a}`].filter(Boolean).join("_"),
|
|
646
912
|
headers: []
|
|
647
|
-
},
|
|
648
|
-
d.forEach((
|
|
649
|
-
const
|
|
650
|
-
let
|
|
651
|
-
if (
|
|
652
|
-
|
|
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);
|
|
653
919
|
else {
|
|
654
|
-
const
|
|
655
|
-
id: [n,
|
|
656
|
-
isPlaceholder:
|
|
657
|
-
placeholderId:
|
|
658
|
-
depth:
|
|
659
|
-
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
|
|
660
926
|
});
|
|
661
|
-
|
|
927
|
+
F.subHeaders.push(C), v.push(F);
|
|
662
928
|
}
|
|
663
|
-
m.headers.push(
|
|
664
|
-
}), u.push(m),
|
|
665
|
-
},
|
|
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, {
|
|
666
932
|
depth: i,
|
|
667
|
-
index:
|
|
933
|
+
index: a
|
|
668
934
|
}));
|
|
669
|
-
f(
|
|
670
|
-
const
|
|
671
|
-
let
|
|
672
|
-
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) => {
|
|
673
939
|
let {
|
|
674
|
-
colSpan:
|
|
675
|
-
rowSpan:
|
|
676
|
-
} =
|
|
677
|
-
|
|
678
|
-
})) :
|
|
679
|
-
const
|
|
680
|
-
return
|
|
681
|
-
colSpan:
|
|
682
|
-
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
|
|
683
949
|
};
|
|
684
950
|
});
|
|
685
|
-
return
|
|
951
|
+
return p((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
|
|
686
952
|
}
|
|
687
|
-
const
|
|
688
|
-
let
|
|
953
|
+
const Ee = (e, o, t, n, r, l, i) => {
|
|
954
|
+
let s = {
|
|
689
955
|
id: o,
|
|
690
956
|
index: n,
|
|
691
957
|
original: t,
|
|
@@ -694,114 +960,114 @@ const Ne = (e, o, t, n, r, l, i) => {
|
|
|
694
960
|
_valuesCache: {},
|
|
695
961
|
_uniqueValuesCache: {},
|
|
696
962
|
getValue: (u) => {
|
|
697
|
-
if (
|
|
698
|
-
return
|
|
963
|
+
if (s._valuesCache.hasOwnProperty(u))
|
|
964
|
+
return s._valuesCache[u];
|
|
699
965
|
const f = e.getColumn(u);
|
|
700
966
|
if (f != null && f.accessorFn)
|
|
701
|
-
return
|
|
967
|
+
return s._valuesCache[u] = f.accessorFn(s.original, n), s._valuesCache[u];
|
|
702
968
|
},
|
|
703
969
|
getUniqueValues: (u) => {
|
|
704
|
-
if (
|
|
705
|
-
return
|
|
970
|
+
if (s._uniqueValuesCache.hasOwnProperty(u))
|
|
971
|
+
return s._uniqueValuesCache[u];
|
|
706
972
|
const f = e.getColumn(u);
|
|
707
973
|
if (f != null && f.accessorFn)
|
|
708
|
-
return f.columnDef.getUniqueValues ? (
|
|
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]);
|
|
709
975
|
},
|
|
710
976
|
renderValue: (u) => {
|
|
711
977
|
var f;
|
|
712
|
-
return (f =
|
|
978
|
+
return (f = s.getValue(u)) != null ? f : e.options.renderFallbackValue;
|
|
713
979
|
},
|
|
714
980
|
subRows: [],
|
|
715
|
-
getLeafRows: () =>
|
|
716
|
-
getParentRow: () =>
|
|
981
|
+
getLeafRows: () => Ut(s.subRows, (u) => u.subRows),
|
|
982
|
+
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
717
983
|
getParentRows: () => {
|
|
718
|
-
let u = [], f =
|
|
984
|
+
let u = [], f = s;
|
|
719
985
|
for (; ; ) {
|
|
720
|
-
const
|
|
721
|
-
if (!
|
|
722
|
-
u.push(
|
|
986
|
+
const g = f.getParentRow();
|
|
987
|
+
if (!g) break;
|
|
988
|
+
u.push(g), f = g;
|
|
723
989
|
}
|
|
724
990
|
return u.reverse();
|
|
725
991
|
},
|
|
726
|
-
getAllCells:
|
|
727
|
-
_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"))
|
|
728
994
|
};
|
|
729
995
|
for (let u = 0; u < e._features.length; u++) {
|
|
730
996
|
const f = e._features[u];
|
|
731
|
-
f == null || f.createRow == null || f.createRow(
|
|
997
|
+
f == null || f.createRow == null || f.createRow(s, e);
|
|
732
998
|
}
|
|
733
|
-
return
|
|
734
|
-
},
|
|
999
|
+
return s;
|
|
1000
|
+
}, Yt = {
|
|
735
1001
|
createColumn: (e, o) => {
|
|
736
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 = () => {
|
|
737
1003
|
if (e._getFacetedMinMaxValues)
|
|
738
1004
|
return e._getFacetedMinMaxValues();
|
|
739
1005
|
};
|
|
740
1006
|
}
|
|
741
|
-
},
|
|
1007
|
+
}, Ye = (e, o, t) => {
|
|
742
1008
|
var n, r;
|
|
743
1009
|
const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
744
1010
|
return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
|
|
745
1011
|
};
|
|
746
|
-
|
|
747
|
-
const
|
|
1012
|
+
Ye.autoRemove = (e) => G(e);
|
|
1013
|
+
const Je = (e, o, t) => {
|
|
748
1014
|
var n;
|
|
749
1015
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
750
1016
|
};
|
|
751
|
-
|
|
752
|
-
const
|
|
1017
|
+
Je.autoRemove = (e) => G(e);
|
|
1018
|
+
const Ze = (e, o, t) => {
|
|
753
1019
|
var n;
|
|
754
1020
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
755
1021
|
};
|
|
756
|
-
|
|
757
|
-
const
|
|
1022
|
+
Ze.autoRemove = (e) => G(e);
|
|
1023
|
+
const et = (e, o, t) => {
|
|
758
1024
|
var n;
|
|
759
1025
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
760
1026
|
};
|
|
761
|
-
|
|
762
|
-
const
|
|
1027
|
+
et.autoRemove = (e) => G(e);
|
|
1028
|
+
const tt = (e, o, t) => !t.some((n) => {
|
|
763
1029
|
var r;
|
|
764
1030
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
|
765
1031
|
});
|
|
766
|
-
|
|
767
|
-
const
|
|
1032
|
+
tt.autoRemove = (e) => G(e) || !(e != null && e.length);
|
|
1033
|
+
const nt = (e, o, t) => t.some((n) => {
|
|
768
1034
|
var r;
|
|
769
1035
|
return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
|
|
770
1036
|
});
|
|
771
|
-
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
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) => {
|
|
777
1043
|
let [n, r] = t;
|
|
778
1044
|
const l = e.getValue(o);
|
|
779
1045
|
return l >= n && l <= r;
|
|
780
1046
|
};
|
|
781
|
-
|
|
1047
|
+
De.resolveFilterValue = (e) => {
|
|
782
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;
|
|
783
1049
|
if (l > i) {
|
|
784
|
-
const
|
|
785
|
-
l = i, i =
|
|
1050
|
+
const s = l;
|
|
1051
|
+
l = i, i = s;
|
|
786
1052
|
}
|
|
787
1053
|
return [l, i];
|
|
788
1054
|
};
|
|
789
|
-
|
|
1055
|
+
De.autoRemove = (e) => G(e) || G(e[0]) && G(e[1]);
|
|
790
1056
|
const B = {
|
|
791
|
-
includesString:
|
|
792
|
-
includesStringSensitive:
|
|
793
|
-
equalsString:
|
|
794
|
-
arrIncludes:
|
|
795
|
-
arrIncludesAll:
|
|
796
|
-
arrIncludesSome:
|
|
797
|
-
equals:
|
|
798
|
-
weakEquals:
|
|
799
|
-
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
|
|
800
1066
|
};
|
|
801
|
-
function
|
|
1067
|
+
function G(e) {
|
|
802
1068
|
return e == null || e === "";
|
|
803
1069
|
}
|
|
804
|
-
const
|
|
1070
|
+
const Jt = {
|
|
805
1071
|
getDefaultColumnDef: () => ({
|
|
806
1072
|
filterFn: "auto"
|
|
807
1073
|
}),
|
|
@@ -820,7 +1086,7 @@ const Ut = {
|
|
|
820
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;
|
|
821
1087
|
}, e.getFilterFn = () => {
|
|
822
1088
|
var t, n;
|
|
823
|
-
return
|
|
1089
|
+
return ue(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
824
1090
|
// @ts-ignore
|
|
825
1091
|
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : B[e.columnDef.filterFn]
|
|
826
1092
|
);
|
|
@@ -835,10 +1101,10 @@ const Ut = {
|
|
|
835
1101
|
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
836
1102
|
}, e.setFilterValue = (t) => {
|
|
837
1103
|
o.setColumnFilters((n) => {
|
|
838
|
-
const r = e.getFilterFn(), l = n == null ? void 0 : n.find((
|
|
839
|
-
if (
|
|
840
|
-
var
|
|
841
|
-
return (
|
|
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)) {
|
|
1106
|
+
var s;
|
|
1107
|
+
return (s = n == null ? void 0 : n.filter((g) => g.id !== e.id)) != null ? s : [];
|
|
842
1108
|
}
|
|
843
1109
|
const u = {
|
|
844
1110
|
id: e.id,
|
|
@@ -846,7 +1112,7 @@ const Ut = {
|
|
|
846
1112
|
};
|
|
847
1113
|
if (l) {
|
|
848
1114
|
var f;
|
|
849
|
-
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 : [];
|
|
850
1116
|
}
|
|
851
1117
|
return n != null && n.length ? [...n, u] : [u];
|
|
852
1118
|
});
|
|
@@ -859,11 +1125,11 @@ const Ut = {
|
|
|
859
1125
|
e.setColumnFilters = (o) => {
|
|
860
1126
|
const t = e.getAllLeafColumns(), n = (r) => {
|
|
861
1127
|
var l;
|
|
862
|
-
return (l =
|
|
863
|
-
const
|
|
864
|
-
if (
|
|
865
|
-
const u =
|
|
866
|
-
if (
|
|
1128
|
+
return (l = j(o, r)) == null ? void 0 : l.filter((i) => {
|
|
1129
|
+
const s = t.find((u) => u.id === i.id);
|
|
1130
|
+
if (s) {
|
|
1131
|
+
const u = s.getFilterFn();
|
|
1132
|
+
if (je(u, i.value, s))
|
|
867
1133
|
return !1;
|
|
868
1134
|
}
|
|
869
1135
|
return !0;
|
|
@@ -876,57 +1142,57 @@ const Ut = {
|
|
|
876
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());
|
|
877
1143
|
}
|
|
878
1144
|
};
|
|
879
|
-
function
|
|
1145
|
+
function je(e, o, t) {
|
|
880
1146
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
|
881
1147
|
}
|
|
882
|
-
const
|
|
1148
|
+
const Zt = (e, o, t) => t.reduce((n, r) => {
|
|
883
1149
|
const l = r.getValue(e);
|
|
884
1150
|
return n + (typeof l == "number" ? l : 0);
|
|
885
|
-
}, 0),
|
|
1151
|
+
}, 0), en = (e, o, t) => {
|
|
886
1152
|
let n;
|
|
887
1153
|
return t.forEach((r) => {
|
|
888
1154
|
const l = r.getValue(e);
|
|
889
1155
|
l != null && (n > l || n === void 0 && l >= l) && (n = l);
|
|
890
1156
|
}), n;
|
|
891
|
-
},
|
|
1157
|
+
}, tn = (e, o, t) => {
|
|
892
1158
|
let n;
|
|
893
1159
|
return t.forEach((r) => {
|
|
894
1160
|
const l = r.getValue(e);
|
|
895
1161
|
l != null && (n < l || n === void 0 && l >= l) && (n = l);
|
|
896
1162
|
}), n;
|
|
897
|
-
},
|
|
1163
|
+
}, nn = (e, o, t) => {
|
|
898
1164
|
let n, r;
|
|
899
1165
|
return t.forEach((l) => {
|
|
900
1166
|
const i = l.getValue(e);
|
|
901
1167
|
i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i)));
|
|
902
1168
|
}), [n, r];
|
|
903
|
-
},
|
|
1169
|
+
}, on = (e, o) => {
|
|
904
1170
|
let t = 0, n = 0;
|
|
905
1171
|
if (o.forEach((r) => {
|
|
906
1172
|
let l = r.getValue(e);
|
|
907
1173
|
l != null && (l = +l) >= l && (++t, n += l);
|
|
908
1174
|
}), t) return n / t;
|
|
909
|
-
},
|
|
1175
|
+
}, rn = (e, o) => {
|
|
910
1176
|
if (!o.length)
|
|
911
1177
|
return;
|
|
912
1178
|
const t = o.map((l) => l.getValue(e));
|
|
913
|
-
if (!
|
|
1179
|
+
if (!jt(t))
|
|
914
1180
|
return;
|
|
915
1181
|
if (t.length === 1)
|
|
916
1182
|
return t[0];
|
|
917
1183
|
const n = Math.floor(t.length / 2), r = t.sort((l, i) => l - i);
|
|
918
1184
|
return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
|
|
919
|
-
},
|
|
920
|
-
sum:
|
|
921
|
-
min:
|
|
922
|
-
max:
|
|
923
|
-
extent:
|
|
924
|
-
mean:
|
|
925
|
-
median:
|
|
926
|
-
unique:
|
|
927
|
-
uniqueCount:
|
|
928
|
-
count:
|
|
929
|
-
},
|
|
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 = {
|
|
930
1196
|
getDefaultColumnDef: () => ({
|
|
931
1197
|
aggregatedCell: (e) => {
|
|
932
1198
|
var o, t;
|
|
@@ -962,14 +1228,14 @@ const Kt = (e, o, t) => t.reduce((n, r) => {
|
|
|
962
1228
|
}, e.getAutoAggregationFn = () => {
|
|
963
1229
|
const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
|
|
964
1230
|
if (typeof n == "number")
|
|
965
|
-
return
|
|
1231
|
+
return me.sum;
|
|
966
1232
|
if (Object.prototype.toString.call(n) === "[object Date]")
|
|
967
|
-
return
|
|
1233
|
+
return me.extent;
|
|
968
1234
|
}, e.getAggregationFn = () => {
|
|
969
1235
|
var t, n;
|
|
970
1236
|
if (!e)
|
|
971
1237
|
throw new Error();
|
|
972
|
-
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];
|
|
973
1239
|
};
|
|
974
1240
|
},
|
|
975
1241
|
createTable: (e) => {
|
|
@@ -993,13 +1259,13 @@ const Kt = (e, o, t) => t.reduce((n, r) => {
|
|
|
993
1259
|
};
|
|
994
1260
|
}
|
|
995
1261
|
};
|
|
996
|
-
function
|
|
1262
|
+
function fn(e, o, t) {
|
|
997
1263
|
if (!(o != null && o.length) || !t)
|
|
998
1264
|
return e;
|
|
999
1265
|
const n = e.filter((l) => !o.includes(l.id));
|
|
1000
1266
|
return t === "remove" ? n : [...o.map((l) => e.find((i) => i.id === l)).filter(Boolean), ...n];
|
|
1001
1267
|
}
|
|
1002
|
-
const
|
|
1268
|
+
const dn = {
|
|
1003
1269
|
getInitialState: (e) => ({
|
|
1004
1270
|
columnOrder: [],
|
|
1005
1271
|
...e
|
|
@@ -1008,12 +1274,12 @@ const rn = {
|
|
|
1008
1274
|
onColumnOrderChange: L("columnOrder", e)
|
|
1009
1275
|
}),
|
|
1010
1276
|
createColumn: (e, o) => {
|
|
1011
|
-
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) => {
|
|
1012
1278
|
var n;
|
|
1013
|
-
return ((n =
|
|
1279
|
+
return ((n = oe(o, t)[0]) == null ? void 0 : n.id) === e.id;
|
|
1014
1280
|
}, e.getIsLastColumn = (t) => {
|
|
1015
1281
|
var n;
|
|
1016
|
-
const r =
|
|
1282
|
+
const r = oe(o, t);
|
|
1017
1283
|
return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
|
|
1018
1284
|
};
|
|
1019
1285
|
},
|
|
@@ -1021,27 +1287,27 @@ const rn = {
|
|
|
1021
1287
|
e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
|
|
1022
1288
|
var t;
|
|
1023
1289
|
e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
1024
|
-
}, e._getOrderColumnsFn =
|
|
1290
|
+
}, e._getOrderColumnsFn = y(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
|
|
1025
1291
|
let l = [];
|
|
1026
1292
|
if (!(o != null && o.length))
|
|
1027
1293
|
l = r;
|
|
1028
1294
|
else {
|
|
1029
|
-
const i = [...o],
|
|
1030
|
-
for (;
|
|
1031
|
-
const u = i.shift(), f =
|
|
1032
|
-
f > -1 && l.push(
|
|
1295
|
+
const i = [...o], s = [...r];
|
|
1296
|
+
for (; s.length && i.length; ) {
|
|
1297
|
+
const u = i.shift(), f = s.findIndex((g) => g.id === u);
|
|
1298
|
+
f > -1 && l.push(s.splice(f, 1)[0]);
|
|
1033
1299
|
}
|
|
1034
|
-
l = [...l, ...
|
|
1300
|
+
l = [...l, ...s];
|
|
1035
1301
|
}
|
|
1036
|
-
return
|
|
1302
|
+
return fn(l, t, n);
|
|
1037
1303
|
}, R(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
1038
1304
|
}
|
|
1039
|
-
},
|
|
1305
|
+
}, he = () => ({
|
|
1040
1306
|
left: [],
|
|
1041
1307
|
right: []
|
|
1042
|
-
}),
|
|
1308
|
+
}), cn = {
|
|
1043
1309
|
getInitialState: (e) => ({
|
|
1044
|
-
columnPinning:
|
|
1310
|
+
columnPinning: he(),
|
|
1045
1311
|
...e
|
|
1046
1312
|
}),
|
|
1047
1313
|
getDefaultOptions: (e) => ({
|
|
@@ -1053,32 +1319,32 @@ const rn = {
|
|
|
1053
1319
|
o.setColumnPinning((r) => {
|
|
1054
1320
|
var l, i;
|
|
1055
1321
|
if (t === "right") {
|
|
1056
|
-
var
|
|
1322
|
+
var s, u;
|
|
1057
1323
|
return {
|
|
1058
|
-
left: ((
|
|
1059
|
-
right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((
|
|
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]
|
|
1060
1326
|
};
|
|
1061
1327
|
}
|
|
1062
1328
|
if (t === "left") {
|
|
1063
|
-
var f,
|
|
1329
|
+
var f, g;
|
|
1064
1330
|
return {
|
|
1065
|
-
left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((
|
|
1066
|
-
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)))
|
|
1067
1333
|
};
|
|
1068
1334
|
}
|
|
1069
1335
|
return {
|
|
1070
|
-
left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((
|
|
1071
|
-
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)))
|
|
1072
1338
|
};
|
|
1073
1339
|
});
|
|
1074
1340
|
}, e.getCanPin = () => e.getLeafColumns().some((n) => {
|
|
1075
1341
|
var r, l, i;
|
|
1076
1342
|
return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((l = (i = o.options.enableColumnPinning) != null ? i : o.options.enablePinning) != null ? l : !0);
|
|
1077
1343
|
}), e.getIsPinned = () => {
|
|
1078
|
-
const t = e.getLeafColumns().map((
|
|
1344
|
+
const t = e.getLeafColumns().map((s) => s.id), {
|
|
1079
1345
|
left: n,
|
|
1080
1346
|
right: r
|
|
1081
|
-
} = o.getState().columnPinning, l = t.some((
|
|
1347
|
+
} = o.getState().columnPinning, l = t.some((s) => n == null ? void 0 : n.includes(s)), i = t.some((s) => r == null ? void 0 : r.includes(s));
|
|
1082
1348
|
return l ? "left" : i ? "right" : !1;
|
|
1083
1349
|
}, e.getPinnedIndex = () => {
|
|
1084
1350
|
var t, n;
|
|
@@ -1087,13 +1353,13 @@ const rn = {
|
|
|
1087
1353
|
};
|
|
1088
1354
|
},
|
|
1089
1355
|
createRow: (e, o) => {
|
|
1090
|
-
e.getCenterVisibleCells =
|
|
1356
|
+
e.getCenterVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
|
|
1091
1357
|
const l = [...n ?? [], ...r ?? []];
|
|
1092
1358
|
return t.filter((i) => !l.includes(i.column.id));
|
|
1093
|
-
}, R(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells =
|
|
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) => ({
|
|
1094
1360
|
...l,
|
|
1095
1361
|
position: "left"
|
|
1096
|
-
})), R(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells =
|
|
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) => ({
|
|
1097
1363
|
...l,
|
|
1098
1364
|
position: "right"
|
|
1099
1365
|
})), R(o.options, "debugRows", "getRightVisibleCells"));
|
|
@@ -1101,7 +1367,7 @@ const rn = {
|
|
|
1101
1367
|
createTable: (e) => {
|
|
1102
1368
|
e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
|
|
1103
1369
|
var t, n;
|
|
1104
|
-
return e.setColumnPinning(o ?
|
|
1370
|
+
return e.setColumnPinning(o ? he() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : he());
|
|
1105
1371
|
}, e.getIsSomeColumnsPinned = (o) => {
|
|
1106
1372
|
var t;
|
|
1107
1373
|
const n = e.getState().columnPinning;
|
|
@@ -1110,31 +1376,31 @@ const rn = {
|
|
|
1110
1376
|
return !!((r = n.left) != null && r.length || (l = n.right) != null && l.length);
|
|
1111
1377
|
}
|
|
1112
1378
|
return !!((t = n[o]) != null && t.length);
|
|
1113
|
-
}, 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) => {
|
|
1114
1380
|
const r = [...t ?? [], ...n ?? []];
|
|
1115
1381
|
return o.filter((l) => !r.includes(l.id));
|
|
1116
1382
|
}, R(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
1117
1383
|
}
|
|
1118
1384
|
};
|
|
1119
|
-
function
|
|
1385
|
+
function gn(e) {
|
|
1120
1386
|
return e || (typeof document < "u" ? document : null);
|
|
1121
1387
|
}
|
|
1122
|
-
const
|
|
1388
|
+
const ie = {
|
|
1123
1389
|
size: 150,
|
|
1124
1390
|
minSize: 20,
|
|
1125
1391
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
1126
|
-
},
|
|
1392
|
+
}, ve = () => ({
|
|
1127
1393
|
startOffset: null,
|
|
1128
1394
|
startSize: null,
|
|
1129
1395
|
deltaOffset: null,
|
|
1130
1396
|
deltaPercentage: null,
|
|
1131
1397
|
isResizingColumn: !1,
|
|
1132
1398
|
columnSizingStart: []
|
|
1133
|
-
}),
|
|
1134
|
-
getDefaultColumnDef: () =>
|
|
1399
|
+
}), pn = {
|
|
1400
|
+
getDefaultColumnDef: () => ie,
|
|
1135
1401
|
getInitialState: (e) => ({
|
|
1136
1402
|
columnSizing: {},
|
|
1137
|
-
columnSizingInfo:
|
|
1403
|
+
columnSizingInfo: ve(),
|
|
1138
1404
|
...e
|
|
1139
1405
|
}),
|
|
1140
1406
|
getDefaultOptions: (e) => ({
|
|
@@ -1147,8 +1413,8 @@ const le = {
|
|
|
1147
1413
|
e.getSize = () => {
|
|
1148
1414
|
var t, n, r;
|
|
1149
1415
|
const l = o.getState().columnSizing[e.id];
|
|
1150
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
1151
|
-
}, 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 = () => {
|
|
1152
1418
|
o.setColumnSizing((t) => {
|
|
1153
1419
|
let {
|
|
1154
1420
|
[e.id]: n,
|
|
@@ -1182,27 +1448,27 @@ const le = {
|
|
|
1182
1448
|
}, e.getResizeHandler = (t) => {
|
|
1183
1449
|
const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
|
|
1184
1450
|
return (l) => {
|
|
1185
|
-
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))
|
|
1186
1452
|
return;
|
|
1187
|
-
const i = e.getSize(),
|
|
1188
|
-
typeof
|
|
1189
|
-
var
|
|
1190
|
-
const
|
|
1191
|
-
return
|
|
1192
|
-
let [
|
|
1193
|
-
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;
|
|
1194
1460
|
}), {
|
|
1195
|
-
...
|
|
1196
|
-
deltaOffset:
|
|
1197
|
-
deltaPercentage:
|
|
1461
|
+
...x,
|
|
1462
|
+
deltaOffset: W,
|
|
1463
|
+
deltaPercentage: k
|
|
1198
1464
|
};
|
|
1199
|
-
}), (o.options.columnResizeMode === "onChange" ||
|
|
1200
|
-
...
|
|
1465
|
+
}), (o.options.columnResizeMode === "onChange" || h === "end") && o.setColumnSizing((x) => ({
|
|
1466
|
+
...x,
|
|
1201
1467
|
...f
|
|
1202
1468
|
})));
|
|
1203
|
-
},
|
|
1204
|
-
|
|
1205
|
-
...
|
|
1469
|
+
}, p = (h) => g("move", h), d = (h) => {
|
|
1470
|
+
g("end", h), o.setColumnSizingInfo((S) => ({
|
|
1471
|
+
...S,
|
|
1206
1472
|
isResizingColumn: !1,
|
|
1207
1473
|
startOffset: null,
|
|
1208
1474
|
startSize: null,
|
|
@@ -1210,27 +1476,27 @@ const le = {
|
|
|
1210
1476
|
deltaPercentage: null,
|
|
1211
1477
|
columnSizingStart: []
|
|
1212
1478
|
}));
|
|
1213
|
-
},
|
|
1214
|
-
moveHandler: (
|
|
1215
|
-
upHandler: (
|
|
1216
|
-
|
|
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);
|
|
1217
1483
|
}
|
|
1218
|
-
},
|
|
1219
|
-
moveHandler: (
|
|
1220
|
-
upHandler: (
|
|
1221
|
-
var
|
|
1222
|
-
|
|
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);
|
|
1223
1489
|
}
|
|
1224
|
-
},
|
|
1490
|
+
}, C = mn() ? {
|
|
1225
1491
|
passive: !1
|
|
1226
1492
|
} : !1;
|
|
1227
|
-
|
|
1228
|
-
...
|
|
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,
|
|
1229
1495
|
startOffset: u,
|
|
1230
1496
|
startSize: i,
|
|
1231
1497
|
deltaOffset: 0,
|
|
1232
1498
|
deltaPercentage: 0,
|
|
1233
|
-
columnSizingStart:
|
|
1499
|
+
columnSizingStart: s,
|
|
1234
1500
|
isResizingColumn: n.id
|
|
1235
1501
|
}));
|
|
1236
1502
|
};
|
|
@@ -1242,7 +1508,7 @@ const le = {
|
|
|
1242
1508
|
e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
1243
1509
|
}, e.resetHeaderSizeInfo = (o) => {
|
|
1244
1510
|
var t;
|
|
1245
|
-
e.setColumnSizingInfo(o ?
|
|
1511
|
+
e.setColumnSizingInfo(o ? ve() : (t = e.initialState.columnSizingInfo) != null ? t : ve());
|
|
1246
1512
|
}, e.getTotalSize = () => {
|
|
1247
1513
|
var o, t;
|
|
1248
1514
|
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
|
|
@@ -1258,9 +1524,9 @@ const le = {
|
|
|
1258
1524
|
};
|
|
1259
1525
|
}
|
|
1260
1526
|
};
|
|
1261
|
-
let
|
|
1262
|
-
function
|
|
1263
|
-
if (typeof
|
|
1527
|
+
let se = null;
|
|
1528
|
+
function mn() {
|
|
1529
|
+
if (typeof se == "boolean") return se;
|
|
1264
1530
|
let e = !1;
|
|
1265
1531
|
try {
|
|
1266
1532
|
const o = {
|
|
@@ -1273,12 +1539,12 @@ function un() {
|
|
|
1273
1539
|
} catch {
|
|
1274
1540
|
e = !1;
|
|
1275
1541
|
}
|
|
1276
|
-
return
|
|
1542
|
+
return se = e, se;
|
|
1277
1543
|
}
|
|
1278
|
-
function
|
|
1544
|
+
function we(e) {
|
|
1279
1545
|
return e.type === "touchstart";
|
|
1280
1546
|
}
|
|
1281
|
-
const
|
|
1547
|
+
const hn = {
|
|
1282
1548
|
getInitialState: (e) => ({
|
|
1283
1549
|
columnVisibility: {},
|
|
1284
1550
|
...e
|
|
@@ -1304,10 +1570,10 @@ const fn = {
|
|
|
1304
1570
|
};
|
|
1305
1571
|
},
|
|
1306
1572
|
createRow: (e, o) => {
|
|
1307
|
-
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"));
|
|
1308
1574
|
},
|
|
1309
1575
|
createTable: (e) => {
|
|
1310
|
-
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));
|
|
1311
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) => {
|
|
1312
1578
|
var n;
|
|
1313
1579
|
e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
|
|
@@ -1323,17 +1589,17 @@ const fn = {
|
|
|
1323
1589
|
};
|
|
1324
1590
|
}
|
|
1325
1591
|
};
|
|
1326
|
-
function
|
|
1592
|
+
function oe(e, o) {
|
|
1327
1593
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
1328
1594
|
}
|
|
1329
|
-
const
|
|
1595
|
+
const vn = {
|
|
1330
1596
|
createTable: (e) => {
|
|
1331
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 = () => {
|
|
1332
1598
|
if (e._getGlobalFacetedMinMaxValues)
|
|
1333
1599
|
return e._getGlobalFacetedMinMaxValues();
|
|
1334
1600
|
};
|
|
1335
1601
|
}
|
|
1336
|
-
},
|
|
1602
|
+
}, wn = {
|
|
1337
1603
|
getInitialState: (e) => ({
|
|
1338
1604
|
globalFilter: void 0,
|
|
1339
1605
|
...e
|
|
@@ -1359,14 +1625,14 @@ const dn = {
|
|
|
1359
1625
|
const {
|
|
1360
1626
|
globalFilterFn: n
|
|
1361
1627
|
} = e.options;
|
|
1362
|
-
return
|
|
1628
|
+
return ue(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : B[n];
|
|
1363
1629
|
}, e.setGlobalFilter = (o) => {
|
|
1364
1630
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
|
1365
1631
|
}, e.resetGlobalFilter = (o) => {
|
|
1366
1632
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
1367
1633
|
};
|
|
1368
1634
|
}
|
|
1369
|
-
},
|
|
1635
|
+
}, Cn = {
|
|
1370
1636
|
getInitialState: (e) => ({
|
|
1371
1637
|
expanded: {},
|
|
1372
1638
|
...e
|
|
@@ -1418,8 +1684,8 @@ const dn = {
|
|
|
1418
1684
|
var r;
|
|
1419
1685
|
const l = n === !0 ? !0 : !!(n != null && n[e.id]);
|
|
1420
1686
|
let i = {};
|
|
1421
|
-
if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((
|
|
1422
|
-
i[
|
|
1687
|
+
if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((s) => {
|
|
1688
|
+
i[s] = !0;
|
|
1423
1689
|
}) : i = n, t = (r = t) != null ? r : !l, !l && t)
|
|
1424
1690
|
return {
|
|
1425
1691
|
...i,
|
|
@@ -1427,7 +1693,7 @@ const dn = {
|
|
|
1427
1693
|
};
|
|
1428
1694
|
if (l && !t) {
|
|
1429
1695
|
const {
|
|
1430
|
-
[e.id]:
|
|
1696
|
+
[e.id]: s,
|
|
1431
1697
|
...u
|
|
1432
1698
|
} = i;
|
|
1433
1699
|
return u;
|
|
@@ -1453,14 +1719,14 @@ const dn = {
|
|
|
1453
1719
|
};
|
|
1454
1720
|
};
|
|
1455
1721
|
}
|
|
1456
|
-
},
|
|
1457
|
-
pageIndex:
|
|
1458
|
-
pageSize:
|
|
1459
|
-
}),
|
|
1722
|
+
}, Fe = 0, $e = 10, Ce = () => ({
|
|
1723
|
+
pageIndex: Fe,
|
|
1724
|
+
pageSize: $e
|
|
1725
|
+
}), Sn = {
|
|
1460
1726
|
getInitialState: (e) => ({
|
|
1461
1727
|
...e,
|
|
1462
1728
|
pagination: {
|
|
1463
|
-
...
|
|
1729
|
+
...Ce(),
|
|
1464
1730
|
...e == null ? void 0 : e.pagination
|
|
1465
1731
|
}
|
|
1466
1732
|
}),
|
|
@@ -1484,14 +1750,14 @@ const dn = {
|
|
|
1484
1750
|
});
|
|
1485
1751
|
}
|
|
1486
1752
|
}, e.setPagination = (n) => {
|
|
1487
|
-
const r = (l) =>
|
|
1753
|
+
const r = (l) => j(n, l);
|
|
1488
1754
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
1489
1755
|
}, e.resetPagination = (n) => {
|
|
1490
1756
|
var r;
|
|
1491
|
-
e.setPagination(n ?
|
|
1757
|
+
e.setPagination(n ? Ce() : (r = e.initialState.pagination) != null ? r : Ce());
|
|
1492
1758
|
}, e.setPageIndex = (n) => {
|
|
1493
1759
|
e.setPagination((r) => {
|
|
1494
|
-
let l =
|
|
1760
|
+
let l = j(n, r.pageIndex);
|
|
1495
1761
|
const i = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
1496
1762
|
return l = Math.max(0, Math.min(l, i)), {
|
|
1497
1763
|
...r,
|
|
@@ -1500,27 +1766,27 @@ const dn = {
|
|
|
1500
1766
|
});
|
|
1501
1767
|
}, e.resetPageIndex = (n) => {
|
|
1502
1768
|
var r, l;
|
|
1503
|
-
e.setPageIndex(n ?
|
|
1769
|
+
e.setPageIndex(n ? Fe : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : Fe);
|
|
1504
1770
|
}, e.resetPageSize = (n) => {
|
|
1505
1771
|
var r, l;
|
|
1506
|
-
e.setPageSize(n ?
|
|
1772
|
+
e.setPageSize(n ? $e : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : $e);
|
|
1507
1773
|
}, e.setPageSize = (n) => {
|
|
1508
1774
|
e.setPagination((r) => {
|
|
1509
|
-
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);
|
|
1510
1776
|
return {
|
|
1511
1777
|
...r,
|
|
1512
|
-
pageIndex:
|
|
1778
|
+
pageIndex: s,
|
|
1513
1779
|
pageSize: l
|
|
1514
1780
|
};
|
|
1515
1781
|
});
|
|
1516
1782
|
}, e.setPageCount = (n) => e.setPagination((r) => {
|
|
1517
1783
|
var l;
|
|
1518
|
-
let i =
|
|
1784
|
+
let i = j(n, (l = e.options.pageCount) != null ? l : -1);
|
|
1519
1785
|
return typeof i == "number" && (i = Math.max(-1, i)), {
|
|
1520
1786
|
...r,
|
|
1521
1787
|
pageCount: i
|
|
1522
1788
|
};
|
|
1523
|
-
}), e.getPageOptions =
|
|
1789
|
+
}), e.getPageOptions = y(() => [e.getPageCount()], (n) => {
|
|
1524
1790
|
let r = [];
|
|
1525
1791
|
return n && n > 0 && (r = [...new Array(n)].fill(null).map((l, i) => i)), r;
|
|
1526
1792
|
}, R(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
@@ -1536,12 +1802,12 @@ const dn = {
|
|
|
1536
1802
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
|
1537
1803
|
};
|
|
1538
1804
|
}
|
|
1539
|
-
},
|
|
1805
|
+
}, Se = () => ({
|
|
1540
1806
|
top: [],
|
|
1541
1807
|
bottom: []
|
|
1542
|
-
}),
|
|
1808
|
+
}), yn = {
|
|
1543
1809
|
getInitialState: (e) => ({
|
|
1544
|
-
rowPinning:
|
|
1810
|
+
rowPinning: Se(),
|
|
1545
1811
|
...e
|
|
1546
1812
|
}),
|
|
1547
1813
|
getDefaultOptions: (e) => ({
|
|
@@ -1559,26 +1825,26 @@ const dn = {
|
|
|
1559
1825
|
id: f
|
|
1560
1826
|
} = u;
|
|
1561
1827
|
return f;
|
|
1562
|
-
}) : [],
|
|
1828
|
+
}) : [], s = /* @__PURE__ */ new Set([...i, e.id, ...l]);
|
|
1563
1829
|
o.setRowPinning((u) => {
|
|
1564
|
-
var f,
|
|
1830
|
+
var f, g;
|
|
1565
1831
|
if (t === "bottom") {
|
|
1566
|
-
var
|
|
1832
|
+
var p, d;
|
|
1567
1833
|
return {
|
|
1568
|
-
top: ((
|
|
1569
|
-
bottom: [...((d = u == null ? void 0 : u.bottom) != null ? d : []).filter((
|
|
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)]
|
|
1570
1836
|
};
|
|
1571
1837
|
}
|
|
1572
1838
|
if (t === "top") {
|
|
1573
|
-
var
|
|
1839
|
+
var a, m;
|
|
1574
1840
|
return {
|
|
1575
|
-
top: [...((
|
|
1576
|
-
bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((
|
|
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)))
|
|
1577
1843
|
};
|
|
1578
1844
|
}
|
|
1579
1845
|
return {
|
|
1580
|
-
top: ((f = u == null ? void 0 : u.top) != null ? f : []).filter((
|
|
1581
|
-
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)))
|
|
1582
1848
|
};
|
|
1583
1849
|
});
|
|
1584
1850
|
}, e.getCanPin = () => {
|
|
@@ -1592,7 +1858,7 @@ const dn = {
|
|
|
1592
1858
|
const t = [e.id], {
|
|
1593
1859
|
top: n,
|
|
1594
1860
|
bottom: r
|
|
1595
|
-
} = o.getState().rowPinning, l = t.some((
|
|
1861
|
+
} = o.getState().rowPinning, l = t.some((s) => n == null ? void 0 : n.includes(s)), i = t.some((s) => r == null ? void 0 : r.includes(s));
|
|
1596
1862
|
return l ? "top" : i ? "bottom" : !1;
|
|
1597
1863
|
}, e.getPinnedIndex = () => {
|
|
1598
1864
|
var t, n;
|
|
@@ -1600,9 +1866,9 @@ const dn = {
|
|
|
1600
1866
|
if (!r) return -1;
|
|
1601
1867
|
const l = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((i) => {
|
|
1602
1868
|
let {
|
|
1603
|
-
id:
|
|
1869
|
+
id: s
|
|
1604
1870
|
} = i;
|
|
1605
|
-
return
|
|
1871
|
+
return s;
|
|
1606
1872
|
});
|
|
1607
1873
|
return (n = l == null ? void 0 : l.indexOf(e.id)) != null ? n : -1;
|
|
1608
1874
|
};
|
|
@@ -1610,7 +1876,7 @@ const dn = {
|
|
|
1610
1876
|
createTable: (e) => {
|
|
1611
1877
|
e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
|
|
1612
1878
|
var t, n;
|
|
1613
|
-
return e.setRowPinning(o ?
|
|
1879
|
+
return e.setRowPinning(o ? Se() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : Se());
|
|
1614
1880
|
}, e.getIsSomeRowsPinned = (o) => {
|
|
1615
1881
|
var t;
|
|
1616
1882
|
const n = e.getState().rowPinning;
|
|
@@ -1625,22 +1891,22 @@ const dn = {
|
|
|
1625
1891
|
//get all rows that are pinned even if they would not be otherwise visible
|
|
1626
1892
|
//account for expanded parent rows, but not pagination or filtering
|
|
1627
1893
|
(t ?? []).map((i) => {
|
|
1628
|
-
const
|
|
1629
|
-
return
|
|
1894
|
+
const s = e.getRow(i, !0);
|
|
1895
|
+
return s.getIsAllParentsExpanded() ? s : null;
|
|
1630
1896
|
})
|
|
1631
1897
|
) : (
|
|
1632
1898
|
//else get only visible rows that are pinned
|
|
1633
|
-
(t ?? []).map((i) => o.find((
|
|
1899
|
+
(t ?? []).map((i) => o.find((s) => s.id === i))
|
|
1634
1900
|
)).filter(Boolean).map((i) => ({
|
|
1635
1901
|
...i,
|
|
1636
1902
|
position: n
|
|
1637
1903
|
}));
|
|
1638
|
-
}, 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) => {
|
|
1639
1905
|
const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
|
|
1640
1906
|
return o.filter((l) => !r.has(l.id));
|
|
1641
1907
|
}, R(e.options, "debugRows", "getCenterRows"));
|
|
1642
1908
|
}
|
|
1643
|
-
},
|
|
1909
|
+
}, Rn = {
|
|
1644
1910
|
getInitialState: (e) => ({
|
|
1645
1911
|
rowSelection: {},
|
|
1646
1912
|
...e
|
|
@@ -1675,17 +1941,17 @@ const dn = {
|
|
|
1675
1941
|
...t
|
|
1676
1942
|
};
|
|
1677
1943
|
return e.getRowModel().rows.forEach((l) => {
|
|
1678
|
-
|
|
1944
|
+
Ie(r, l.id, n, !0, e);
|
|
1679
1945
|
}), r;
|
|
1680
|
-
}), 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) : {
|
|
1681
1947
|
rows: [],
|
|
1682
1948
|
flatRows: [],
|
|
1683
1949
|
rowsById: {}
|
|
1684
|
-
}, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel =
|
|
1950
|
+
}, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = y(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
|
|
1685
1951
|
rows: [],
|
|
1686
1952
|
flatRows: [],
|
|
1687
1953
|
rowsById: {}
|
|
1688
|
-
}, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel =
|
|
1954
|
+
}, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = y(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
|
|
1689
1955
|
rows: [],
|
|
1690
1956
|
flatRows: [],
|
|
1691
1957
|
rowsById: {}
|
|
@@ -1721,26 +1987,26 @@ const dn = {
|
|
|
1721
1987
|
var i;
|
|
1722
1988
|
if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
|
|
1723
1989
|
return l;
|
|
1724
|
-
const
|
|
1990
|
+
const s = {
|
|
1725
1991
|
...l
|
|
1726
1992
|
};
|
|
1727
|
-
return
|
|
1993
|
+
return Ie(s, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), s;
|
|
1728
1994
|
});
|
|
1729
1995
|
}, e.getIsSelected = () => {
|
|
1730
1996
|
const {
|
|
1731
1997
|
rowSelection: t
|
|
1732
1998
|
} = o.getState();
|
|
1733
|
-
return
|
|
1999
|
+
return Le(e, t);
|
|
1734
2000
|
}, e.getIsSomeSelected = () => {
|
|
1735
2001
|
const {
|
|
1736
2002
|
rowSelection: t
|
|
1737
2003
|
} = o.getState();
|
|
1738
|
-
return
|
|
2004
|
+
return Me(e, t) === "some";
|
|
1739
2005
|
}, e.getIsAllSubRowsSelected = () => {
|
|
1740
2006
|
const {
|
|
1741
2007
|
rowSelection: t
|
|
1742
2008
|
} = o.getState();
|
|
1743
|
-
return
|
|
2009
|
+
return Me(e, t) === "all";
|
|
1744
2010
|
}, e.getCanSelect = () => {
|
|
1745
2011
|
var t;
|
|
1746
2012
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
|
@@ -1758,20 +2024,20 @@ const dn = {
|
|
|
1758
2024
|
};
|
|
1759
2025
|
};
|
|
1760
2026
|
}
|
|
1761
|
-
},
|
|
2027
|
+
}, Ie = (e, o, t, n, r) => {
|
|
1762
2028
|
var l;
|
|
1763
2029
|
const i = r.getRow(o, !0);
|
|
1764
|
-
t ? (i.getCanMultiSelect() || Object.keys(e).forEach((
|
|
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));
|
|
1765
2031
|
};
|
|
1766
|
-
function
|
|
1767
|
-
const t = e.getState().rowSelection, n = [], r = {}, l = function(i,
|
|
2032
|
+
function ye(e, o) {
|
|
2033
|
+
const t = e.getState().rowSelection, n = [], r = {}, l = function(i, s) {
|
|
1768
2034
|
return i.map((u) => {
|
|
1769
2035
|
var f;
|
|
1770
|
-
const
|
|
1771
|
-
if (
|
|
2036
|
+
const g = Le(u, t);
|
|
2037
|
+
if (g && (n.push(u), r[u.id] = u), (f = u.subRows) != null && f.length && (u = {
|
|
1772
2038
|
...u,
|
|
1773
2039
|
subRows: l(u.subRows)
|
|
1774
|
-
}),
|
|
2040
|
+
}), g)
|
|
1775
2041
|
return u;
|
|
1776
2042
|
}).filter(Boolean);
|
|
1777
2043
|
};
|
|
@@ -1781,35 +2047,35 @@ function ve(e, o) {
|
|
|
1781
2047
|
rowsById: r
|
|
1782
2048
|
};
|
|
1783
2049
|
}
|
|
1784
|
-
function
|
|
2050
|
+
function Le(e, o) {
|
|
1785
2051
|
var t;
|
|
1786
2052
|
return (t = o[e.id]) != null ? t : !1;
|
|
1787
2053
|
}
|
|
1788
|
-
function
|
|
2054
|
+
function Me(e, o, t) {
|
|
1789
2055
|
var n;
|
|
1790
2056
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
1791
2057
|
let r = !0, l = !1;
|
|
1792
2058
|
return e.subRows.forEach((i) => {
|
|
1793
|
-
if (!(l && !r) && (i.getCanSelect() && (
|
|
1794
|
-
const
|
|
1795
|
-
|
|
2059
|
+
if (!(l && !r) && (i.getCanSelect() && (Le(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
|
|
2060
|
+
const s = Me(i, o);
|
|
2061
|
+
s === "all" ? l = !0 : (s === "some" && (l = !0), r = !1);
|
|
1796
2062
|
}
|
|
1797
2063
|
}), r ? "all" : l ? "some" : !1;
|
|
1798
2064
|
}
|
|
1799
|
-
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) => {
|
|
1800
2066
|
const n = e.getValue(t), r = o.getValue(t);
|
|
1801
2067
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1802
|
-
},
|
|
1803
|
-
function
|
|
2068
|
+
}, Mn = (e, o, t) => ze(e.getValue(t), o.getValue(t));
|
|
2069
|
+
function ze(e, o) {
|
|
1804
2070
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
1805
2071
|
}
|
|
1806
|
-
function
|
|
2072
|
+
function X(e) {
|
|
1807
2073
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1808
2074
|
}
|
|
1809
|
-
function
|
|
1810
|
-
const t = e.split(
|
|
2075
|
+
function lt(e, o) {
|
|
2076
|
+
const t = e.split(Ve).filter(Boolean), n = o.split(Ve).filter(Boolean);
|
|
1811
2077
|
for (; t.length && n.length; ) {
|
|
1812
|
-
const r = t.shift(), l = n.shift(), i = parseInt(r, 10),
|
|
2078
|
+
const r = t.shift(), l = n.shift(), i = parseInt(r, 10), s = parseInt(l, 10), u = [i, s].sort();
|
|
1813
2079
|
if (isNaN(u[0])) {
|
|
1814
2080
|
if (r > l)
|
|
1815
2081
|
return 1;
|
|
@@ -1819,21 +2085,21 @@ function ot(e, o) {
|
|
|
1819
2085
|
}
|
|
1820
2086
|
if (isNaN(u[1]))
|
|
1821
2087
|
return isNaN(i) ? -1 : 1;
|
|
1822
|
-
if (i >
|
|
2088
|
+
if (i > s)
|
|
1823
2089
|
return 1;
|
|
1824
|
-
if (
|
|
2090
|
+
if (s > i)
|
|
1825
2091
|
return -1;
|
|
1826
2092
|
}
|
|
1827
2093
|
return t.length - n.length;
|
|
1828
2094
|
}
|
|
1829
|
-
const
|
|
1830
|
-
alphanumeric:
|
|
1831
|
-
alphanumericCaseSensitive:
|
|
1832
|
-
text:
|
|
1833
|
-
textCaseSensitive:
|
|
1834
|
-
datetime:
|
|
1835
|
-
basic:
|
|
1836
|
-
},
|
|
2095
|
+
const ne = {
|
|
2096
|
+
alphanumeric: xn,
|
|
2097
|
+
alphanumericCaseSensitive: _n,
|
|
2098
|
+
text: Fn,
|
|
2099
|
+
textCaseSensitive: $n,
|
|
2100
|
+
datetime: In,
|
|
2101
|
+
basic: Mn
|
|
2102
|
+
}, Vn = {
|
|
1837
2103
|
getInitialState: (e) => ({
|
|
1838
2104
|
sorting: [],
|
|
1839
2105
|
...e
|
|
@@ -1853,11 +2119,11 @@ const te = {
|
|
|
1853
2119
|
for (const r of t) {
|
|
1854
2120
|
const l = r == null ? void 0 : r.getValue(e.id);
|
|
1855
2121
|
if (Object.prototype.toString.call(l) === "[object Date]")
|
|
1856
|
-
return
|
|
1857
|
-
if (typeof l == "string" && (n = !0, l.split(
|
|
1858
|
-
return
|
|
2122
|
+
return ne.datetime;
|
|
2123
|
+
if (typeof l == "string" && (n = !0, l.split(Ve).length > 1))
|
|
2124
|
+
return ne.alphanumeric;
|
|
1859
2125
|
}
|
|
1860
|
-
return n ?
|
|
2126
|
+
return n ? ne.text : ne.basic;
|
|
1861
2127
|
}, e.getAutoSortDir = () => {
|
|
1862
2128
|
const t = o.getFilteredRowModel().flatRows[0];
|
|
1863
2129
|
return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
|
|
@@ -1865,24 +2131,24 @@ const te = {
|
|
|
1865
2131
|
var t, n;
|
|
1866
2132
|
if (!e)
|
|
1867
2133
|
throw new Error();
|
|
1868
|
-
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];
|
|
1869
2135
|
}, e.toggleSorting = (t, n) => {
|
|
1870
2136
|
const r = e.getNextSortingOrder(), l = typeof t < "u" && t !== null;
|
|
1871
2137
|
o.setSorting((i) => {
|
|
1872
|
-
const
|
|
1873
|
-
let f = [],
|
|
1874
|
-
if (i != null && i.length && e.getCanMultiSort() && n ?
|
|
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") {
|
|
1875
2141
|
var d;
|
|
1876
2142
|
f = [...i, {
|
|
1877
2143
|
id: e.id,
|
|
1878
|
-
desc:
|
|
2144
|
+
desc: p
|
|
1879
2145
|
}], f.splice(0, f.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
|
|
1880
|
-
} else
|
|
1881
|
-
...
|
|
1882
|
-
desc:
|
|
1883
|
-
} :
|
|
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 = [{
|
|
1884
2150
|
id: e.id,
|
|
1885
|
-
desc:
|
|
2151
|
+
desc: p
|
|
1886
2152
|
}];
|
|
1887
2153
|
return f;
|
|
1888
2154
|
});
|
|
@@ -1922,34 +2188,34 @@ const te = {
|
|
|
1922
2188
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
1923
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());
|
|
1924
2190
|
}
|
|
1925
|
-
},
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
rn,
|
|
1929
|
-
ln,
|
|
1930
|
-
jt,
|
|
1931
|
-
Ut,
|
|
2191
|
+
}, Nn = [
|
|
2192
|
+
Qt,
|
|
2193
|
+
hn,
|
|
1932
2194
|
dn,
|
|
2195
|
+
cn,
|
|
2196
|
+
Yt,
|
|
2197
|
+
Jt,
|
|
2198
|
+
vn,
|
|
1933
2199
|
//depends on ColumnFaceting
|
|
1934
|
-
|
|
2200
|
+
wn,
|
|
1935
2201
|
//depends on ColumnFiltering
|
|
1936
|
-
|
|
1937
|
-
|
|
2202
|
+
Vn,
|
|
2203
|
+
un,
|
|
1938
2204
|
//depends on RowSorting
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
2205
|
+
Cn,
|
|
2206
|
+
Sn,
|
|
2207
|
+
yn,
|
|
2208
|
+
Rn,
|
|
2209
|
+
pn
|
|
1944
2210
|
];
|
|
1945
|
-
function
|
|
2211
|
+
function Pn(e) {
|
|
1946
2212
|
var o, t;
|
|
1947
2213
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1948
|
-
const n = [...
|
|
2214
|
+
const n = [...Nn, ...(o = e._features) != null ? o : []];
|
|
1949
2215
|
let r = {
|
|
1950
2216
|
_features: n
|
|
1951
2217
|
};
|
|
1952
|
-
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) : {
|
|
1953
2219
|
...l,
|
|
1954
2220
|
...d
|
|
1955
2221
|
};
|
|
@@ -1958,12 +2224,12 @@ function Fn(e) {
|
|
|
1958
2224
|
...(t = e.initialState) != null ? t : {}
|
|
1959
2225
|
};
|
|
1960
2226
|
r._features.forEach((d) => {
|
|
1961
|
-
var
|
|
1962
|
-
u = (
|
|
2227
|
+
var a;
|
|
2228
|
+
u = (a = d.getInitialState == null ? void 0 : d.getInitialState(u)) != null ? a : u;
|
|
1963
2229
|
});
|
|
1964
2230
|
const f = [];
|
|
1965
|
-
let
|
|
1966
|
-
const
|
|
2231
|
+
let g = !1;
|
|
2232
|
+
const p = {
|
|
1967
2233
|
_features: n,
|
|
1968
2234
|
options: {
|
|
1969
2235
|
...l,
|
|
@@ -1971,106 +2237,106 @@ function Fn(e) {
|
|
|
1971
2237
|
},
|
|
1972
2238
|
initialState: u,
|
|
1973
2239
|
_queue: (d) => {
|
|
1974
|
-
f.push(d),
|
|
2240
|
+
f.push(d), g || (g = !0, Promise.resolve().then(() => {
|
|
1975
2241
|
for (; f.length; )
|
|
1976
2242
|
f.shift()();
|
|
1977
|
-
|
|
1978
|
-
}).catch((
|
|
1979
|
-
throw
|
|
2243
|
+
g = !1;
|
|
2244
|
+
}).catch((a) => setTimeout(() => {
|
|
2245
|
+
throw a;
|
|
1980
2246
|
})));
|
|
1981
2247
|
},
|
|
1982
2248
|
reset: () => {
|
|
1983
2249
|
r.setState(r.initialState);
|
|
1984
2250
|
},
|
|
1985
2251
|
setOptions: (d) => {
|
|
1986
|
-
const
|
|
1987
|
-
r.options = i(
|
|
2252
|
+
const a = j(d, r.options);
|
|
2253
|
+
r.options = i(a);
|
|
1988
2254
|
},
|
|
1989
2255
|
getState: () => r.options.state,
|
|
1990
2256
|
setState: (d) => {
|
|
1991
2257
|
r.options.onStateChange == null || r.options.onStateChange(d);
|
|
1992
2258
|
},
|
|
1993
|
-
_getRowId: (d,
|
|
1994
|
-
var
|
|
1995
|
-
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}`;
|
|
1996
2262
|
},
|
|
1997
2263
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
1998
2264
|
// The final calls start at the bottom of the model,
|
|
1999
2265
|
// expanded rows, which then work their way up
|
|
2000
2266
|
getRowModel: () => r.getPaginationRowModel(),
|
|
2001
2267
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
2002
|
-
getRow: (d,
|
|
2003
|
-
let m = (
|
|
2268
|
+
getRow: (d, a) => {
|
|
2269
|
+
let m = (a ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
|
|
2004
2270
|
if (!m && (m = r.getCoreRowModel().rowsById[d], !m))
|
|
2005
2271
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
|
|
2006
2272
|
return m;
|
|
2007
2273
|
},
|
|
2008
|
-
_getDefaultColumnDef:
|
|
2009
|
-
var
|
|
2010
|
-
return d = (
|
|
2274
|
+
_getDefaultColumnDef: y(() => [r.options.defaultColumn], (d) => {
|
|
2275
|
+
var a;
|
|
2276
|
+
return d = (a = d) != null ? a : {}, {
|
|
2011
2277
|
header: (m) => {
|
|
2012
|
-
const
|
|
2013
|
-
return
|
|
2278
|
+
const v = m.header.column.columnDef;
|
|
2279
|
+
return v.accessorKey ? v.accessorKey : v.accessorFn ? v.id : null;
|
|
2014
2280
|
},
|
|
2015
2281
|
// footer: props => props.header.column.id,
|
|
2016
2282
|
cell: (m) => {
|
|
2017
|
-
var
|
|
2018
|
-
return (
|
|
2283
|
+
var v, C;
|
|
2284
|
+
return (v = (C = m.renderValue()) == null || C.toString == null ? void 0 : C.toString()) != null ? v : null;
|
|
2019
2285
|
},
|
|
2020
|
-
...r._features.reduce((m,
|
|
2286
|
+
...r._features.reduce((m, v) => Object.assign(m, v.getDefaultColumnDef == null ? void 0 : v.getDefaultColumnDef()), {}),
|
|
2021
2287
|
...d
|
|
2022
2288
|
};
|
|
2023
2289
|
}, R(e, "debugColumns", "_getDefaultColumnDef")),
|
|
2024
2290
|
_getColumnDefs: () => r.options.columns,
|
|
2025
|
-
getAllColumns:
|
|
2026
|
-
const
|
|
2027
|
-
return
|
|
2028
|
-
const
|
|
2029
|
-
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;
|
|
2030
2296
|
});
|
|
2031
2297
|
};
|
|
2032
|
-
return
|
|
2298
|
+
return a(d);
|
|
2033
2299
|
}, R(e, "debugColumns", "getAllColumns")),
|
|
2034
|
-
getAllFlatColumns:
|
|
2035
|
-
_getAllFlatColumnsById:
|
|
2036
|
-
getAllLeafColumns:
|
|
2037
|
-
let m = d.flatMap((
|
|
2038
|
-
return
|
|
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);
|
|
2039
2305
|
}, R(e, "debugColumns", "getAllLeafColumns")),
|
|
2040
2306
|
getColumn: (d) => {
|
|
2041
|
-
const
|
|
2042
|
-
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;
|
|
2043
2309
|
}
|
|
2044
2310
|
};
|
|
2045
|
-
Object.assign(r,
|
|
2311
|
+
Object.assign(r, p);
|
|
2046
2312
|
for (let d = 0; d < r._features.length; d++) {
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2313
|
+
const a = r._features[d];
|
|
2314
|
+
a == null || a.createTable == null || a.createTable(r);
|
|
2049
2315
|
}
|
|
2050
2316
|
return r;
|
|
2051
2317
|
}
|
|
2052
|
-
function
|
|
2053
|
-
return (e) =>
|
|
2318
|
+
function kn() {
|
|
2319
|
+
return (e) => y(() => [e.options.data], (o) => {
|
|
2054
2320
|
const t = {
|
|
2055
2321
|
rows: [],
|
|
2056
2322
|
flatRows: [],
|
|
2057
2323
|
rowsById: {}
|
|
2058
2324
|
}, n = function(r, l, i) {
|
|
2059
2325
|
l === void 0 && (l = 0);
|
|
2060
|
-
const
|
|
2326
|
+
const s = [];
|
|
2061
2327
|
for (let f = 0; f < r.length; f++) {
|
|
2062
|
-
const
|
|
2063
|
-
if (t.flatRows.push(
|
|
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) {
|
|
2064
2330
|
var u;
|
|
2065
|
-
|
|
2331
|
+
g.originalSubRows = e.options.getSubRows(r[f], f), (u = g.originalSubRows) != null && u.length && (g.subRows = n(g.originalSubRows, l + 1, g));
|
|
2066
2332
|
}
|
|
2067
2333
|
}
|
|
2068
|
-
return
|
|
2334
|
+
return s;
|
|
2069
2335
|
};
|
|
2070
2336
|
return t.rows = n(o), t;
|
|
2071
2337
|
}, R(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
2072
2338
|
}
|
|
2073
|
-
function
|
|
2339
|
+
function En(e) {
|
|
2074
2340
|
const o = [], t = (n) => {
|
|
2075
2341
|
var r;
|
|
2076
2342
|
o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
@@ -2081,64 +2347,64 @@ function Mn(e) {
|
|
|
2081
2347
|
rowsById: e.rowsById
|
|
2082
2348
|
};
|
|
2083
2349
|
}
|
|
2084
|
-
function
|
|
2085
|
-
return t.options.filterFromLeafRows ?
|
|
2350
|
+
function Dn(e, o, t) {
|
|
2351
|
+
return t.options.filterFromLeafRows ? Ln(e, o, t) : zn(e, o, t);
|
|
2086
2352
|
}
|
|
2087
|
-
function
|
|
2353
|
+
function Ln(e, o, t) {
|
|
2088
2354
|
var n;
|
|
2089
|
-
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100,
|
|
2355
|
+
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
|
|
2090
2356
|
f === void 0 && (f = 0);
|
|
2091
|
-
const
|
|
2357
|
+
const g = [];
|
|
2092
2358
|
for (let d = 0; d < u.length; d++) {
|
|
2093
|
-
var
|
|
2094
|
-
let
|
|
2095
|
-
const m =
|
|
2096
|
-
if (m.columnFilters =
|
|
2097
|
-
if (m.subRows = a
|
|
2098
|
-
|
|
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);
|
|
2099
2365
|
continue;
|
|
2100
2366
|
}
|
|
2101
|
-
if (o(
|
|
2102
|
-
|
|
2367
|
+
if (o(a) || m.subRows.length) {
|
|
2368
|
+
g.push(a), l[a.id] = a, r.push(a);
|
|
2103
2369
|
continue;
|
|
2104
2370
|
}
|
|
2105
2371
|
} else
|
|
2106
|
-
|
|
2372
|
+
a = m, o(a) && (g.push(a), l[a.id] = a, r.push(a));
|
|
2107
2373
|
}
|
|
2108
|
-
return
|
|
2374
|
+
return g;
|
|
2109
2375
|
};
|
|
2110
2376
|
return {
|
|
2111
|
-
rows:
|
|
2377
|
+
rows: s(e),
|
|
2112
2378
|
flatRows: r,
|
|
2113
2379
|
rowsById: l
|
|
2114
2380
|
};
|
|
2115
2381
|
}
|
|
2116
|
-
function
|
|
2382
|
+
function zn(e, o, t) {
|
|
2117
2383
|
var n;
|
|
2118
|
-
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100,
|
|
2384
|
+
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
|
|
2119
2385
|
f === void 0 && (f = 0);
|
|
2120
|
-
const
|
|
2386
|
+
const g = [];
|
|
2121
2387
|
for (let d = 0; d < u.length; d++) {
|
|
2122
|
-
let
|
|
2123
|
-
if (o(
|
|
2124
|
-
var
|
|
2125
|
-
if ((
|
|
2126
|
-
const
|
|
2127
|
-
|
|
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;
|
|
2128
2394
|
}
|
|
2129
|
-
|
|
2395
|
+
g.push(a), r.push(a), l[a.id] = a;
|
|
2130
2396
|
}
|
|
2131
2397
|
}
|
|
2132
|
-
return
|
|
2398
|
+
return g;
|
|
2133
2399
|
};
|
|
2134
2400
|
return {
|
|
2135
|
-
rows:
|
|
2401
|
+
rows: s(e),
|
|
2136
2402
|
flatRows: r,
|
|
2137
2403
|
rowsById: l
|
|
2138
2404
|
};
|
|
2139
2405
|
}
|
|
2140
|
-
function
|
|
2141
|
-
return (e) =>
|
|
2406
|
+
function Hn() {
|
|
2407
|
+
return (e) => y(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
|
|
2142
2408
|
if (!o.rows.length || !(t != null && t.length) && !n) {
|
|
2143
2409
|
for (let d = 0; d < o.flatRows.length; d++)
|
|
2144
2410
|
o.flatRows[d].columnFilters = {}, o.flatRows[d].columnFiltersMeta = {};
|
|
@@ -2146,66 +2412,66 @@ function Pn() {
|
|
|
2146
2412
|
}
|
|
2147
2413
|
const r = [], l = [];
|
|
2148
2414
|
(t ?? []).forEach((d) => {
|
|
2149
|
-
var
|
|
2415
|
+
var a;
|
|
2150
2416
|
const m = e.getColumn(d.id);
|
|
2151
2417
|
if (!m)
|
|
2152
2418
|
return;
|
|
2153
|
-
const
|
|
2154
|
-
if (!
|
|
2419
|
+
const v = m.getFilterFn();
|
|
2420
|
+
if (!v) {
|
|
2155
2421
|
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);
|
|
2156
2422
|
return;
|
|
2157
2423
|
}
|
|
2158
2424
|
r.push({
|
|
2159
2425
|
id: d.id,
|
|
2160
|
-
filterFn:
|
|
2161
|
-
resolvedValue: (
|
|
2426
|
+
filterFn: v,
|
|
2427
|
+
resolvedValue: (a = v.resolveFilterValue == null ? void 0 : v.resolveFilterValue(d.value)) != null ? a : d.value
|
|
2162
2428
|
});
|
|
2163
2429
|
});
|
|
2164
|
-
const i = (t ?? []).map((d) => d.id),
|
|
2165
|
-
n &&
|
|
2166
|
-
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;
|
|
2167
2433
|
l.push({
|
|
2168
2434
|
id: d.id,
|
|
2169
|
-
filterFn:
|
|
2170
|
-
resolvedValue: (
|
|
2435
|
+
filterFn: s,
|
|
2436
|
+
resolvedValue: (a = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? a : n
|
|
2171
2437
|
});
|
|
2172
2438
|
}));
|
|
2173
|
-
let f,
|
|
2439
|
+
let f, g;
|
|
2174
2440
|
for (let d = 0; d < o.flatRows.length; d++) {
|
|
2175
|
-
const
|
|
2176
|
-
if (
|
|
2441
|
+
const a = o.flatRows[d];
|
|
2442
|
+
if (a.columnFilters = {}, r.length)
|
|
2177
2443
|
for (let m = 0; m < r.length; m++) {
|
|
2178
2444
|
f = r[m];
|
|
2179
|
-
const
|
|
2180
|
-
|
|
2181
|
-
|
|
2445
|
+
const v = f.id;
|
|
2446
|
+
a.columnFilters[v] = f.filterFn(a, v, f.resolvedValue, (C) => {
|
|
2447
|
+
a.columnFiltersMeta[v] = C;
|
|
2182
2448
|
});
|
|
2183
2449
|
}
|
|
2184
2450
|
if (l.length) {
|
|
2185
2451
|
for (let m = 0; m < l.length; m++) {
|
|
2186
|
-
|
|
2187
|
-
const
|
|
2188
|
-
if (
|
|
2189
|
-
|
|
2452
|
+
g = l[m];
|
|
2453
|
+
const v = g.id;
|
|
2454
|
+
if (g.filterFn(a, v, g.resolvedValue, (C) => {
|
|
2455
|
+
a.columnFiltersMeta[v] = C;
|
|
2190
2456
|
})) {
|
|
2191
|
-
|
|
2457
|
+
a.columnFilters.__global__ = !0;
|
|
2192
2458
|
break;
|
|
2193
2459
|
}
|
|
2194
2460
|
}
|
|
2195
|
-
|
|
2461
|
+
a.columnFilters.__global__ !== !0 && (a.columnFilters.__global__ = !1);
|
|
2196
2462
|
}
|
|
2197
2463
|
}
|
|
2198
|
-
const
|
|
2199
|
-
for (let
|
|
2200
|
-
if (d.columnFilters[i[
|
|
2464
|
+
const p = (d) => {
|
|
2465
|
+
for (let a = 0; a < i.length; a++)
|
|
2466
|
+
if (d.columnFilters[i[a]] === !1)
|
|
2201
2467
|
return !1;
|
|
2202
2468
|
return !0;
|
|
2203
2469
|
};
|
|
2204
|
-
return
|
|
2470
|
+
return Dn(o.rows, p, e);
|
|
2205
2471
|
}, R(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
2206
2472
|
}
|
|
2207
|
-
function
|
|
2208
|
-
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) => {
|
|
2209
2475
|
if (!n.rows.length)
|
|
2210
2476
|
return n;
|
|
2211
2477
|
const {
|
|
@@ -2214,29 +2480,29 @@ function En(e) {
|
|
|
2214
2480
|
} = t;
|
|
2215
2481
|
let {
|
|
2216
2482
|
rows: i,
|
|
2217
|
-
flatRows:
|
|
2483
|
+
flatRows: s,
|
|
2218
2484
|
rowsById: u
|
|
2219
2485
|
} = n;
|
|
2220
|
-
const f = r * l,
|
|
2221
|
-
i = i.slice(f,
|
|
2222
|
-
let
|
|
2223
|
-
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 = {
|
|
2224
2490
|
rows: i,
|
|
2225
|
-
flatRows:
|
|
2491
|
+
flatRows: s,
|
|
2226
2492
|
rowsById: u
|
|
2227
|
-
} :
|
|
2493
|
+
} : p = En({
|
|
2228
2494
|
rows: i,
|
|
2229
|
-
flatRows:
|
|
2495
|
+
flatRows: s,
|
|
2230
2496
|
rowsById: u
|
|
2231
|
-
}),
|
|
2232
|
-
const d = (
|
|
2233
|
-
|
|
2497
|
+
}), p.flatRows = [];
|
|
2498
|
+
const d = (a) => {
|
|
2499
|
+
p.flatRows.push(a), a.subRows.length && a.subRows.forEach(d);
|
|
2234
2500
|
};
|
|
2235
|
-
return
|
|
2501
|
+
return p.rows.forEach(d), p;
|
|
2236
2502
|
}, R(o.options, "debugTable", "getPaginationRowModel"));
|
|
2237
2503
|
}
|
|
2238
|
-
function
|
|
2239
|
-
return (e) =>
|
|
2504
|
+
function Gn() {
|
|
2505
|
+
return (e) => y(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
2240
2506
|
if (!t.rows.length || !(o != null && o.length))
|
|
2241
2507
|
return t;
|
|
2242
2508
|
const n = e.getState().sorting, r = [], l = n.filter((u) => {
|
|
@@ -2251,34 +2517,34 @@ function Dn() {
|
|
|
2251
2517
|
sortingFn: f.getSortingFn()
|
|
2252
2518
|
});
|
|
2253
2519
|
});
|
|
2254
|
-
const
|
|
2255
|
-
const f = u.map((
|
|
2256
|
-
...
|
|
2520
|
+
const s = (u) => {
|
|
2521
|
+
const f = u.map((g) => ({
|
|
2522
|
+
...g
|
|
2257
2523
|
}));
|
|
2258
|
-
return f.sort((
|
|
2259
|
-
for (let
|
|
2524
|
+
return f.sort((g, p) => {
|
|
2525
|
+
for (let a = 0; a < l.length; a += 1) {
|
|
2260
2526
|
var d;
|
|
2261
|
-
const m = l[
|
|
2262
|
-
let
|
|
2263
|
-
if (
|
|
2264
|
-
const
|
|
2265
|
-
if (
|
|
2266
|
-
if (
|
|
2267
|
-
if (
|
|
2268
|
-
|
|
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;
|
|
2269
2535
|
}
|
|
2270
2536
|
}
|
|
2271
|
-
if (
|
|
2272
|
-
return
|
|
2537
|
+
if (S === 0 && (S = v.sortingFn(g, p, m.id)), S !== 0)
|
|
2538
|
+
return h && (S *= -1), v.invertSorting && (S *= -1), S;
|
|
2273
2539
|
}
|
|
2274
|
-
return
|
|
2275
|
-
}), f.forEach((
|
|
2276
|
-
var
|
|
2277
|
-
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));
|
|
2278
2544
|
}), f;
|
|
2279
2545
|
};
|
|
2280
2546
|
return {
|
|
2281
|
-
rows:
|
|
2547
|
+
rows: s(t.rows),
|
|
2282
2548
|
flatRows: r,
|
|
2283
2549
|
rowsById: t.rowsById
|
|
2284
2550
|
};
|
|
@@ -2294,22 +2560,22 @@ function Dn() {
|
|
|
2294
2560
|
*
|
|
2295
2561
|
* @license MIT
|
|
2296
2562
|
*/
|
|
2297
|
-
function
|
|
2298
|
-
return e ?
|
|
2563
|
+
function Ue(e, o) {
|
|
2564
|
+
return e ? bn(e) ? /* @__PURE__ */ xe.createElement(e, o) : e : null;
|
|
2299
2565
|
}
|
|
2300
|
-
function
|
|
2301
|
-
return
|
|
2566
|
+
function bn(e) {
|
|
2567
|
+
return On(e) || typeof e == "function" || Tn(e);
|
|
2302
2568
|
}
|
|
2303
|
-
function
|
|
2569
|
+
function On(e) {
|
|
2304
2570
|
return typeof e == "function" && (() => {
|
|
2305
2571
|
const o = Object.getPrototypeOf(e);
|
|
2306
2572
|
return o.prototype && o.prototype.isReactComponent;
|
|
2307
2573
|
})();
|
|
2308
2574
|
}
|
|
2309
|
-
function
|
|
2575
|
+
function Tn(e) {
|
|
2310
2576
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
2311
2577
|
}
|
|
2312
|
-
function
|
|
2578
|
+
function Bn(e) {
|
|
2313
2579
|
const o = {
|
|
2314
2580
|
state: {},
|
|
2315
2581
|
// Dummy state
|
|
@@ -2318,9 +2584,9 @@ function Hn(e) {
|
|
|
2318
2584
|
// noop
|
|
2319
2585
|
renderFallbackValue: null,
|
|
2320
2586
|
...e
|
|
2321
|
-
}, [t] =
|
|
2322
|
-
current:
|
|
2323
|
-
})), [n, r] =
|
|
2587
|
+
}, [t] = xe.useState(() => ({
|
|
2588
|
+
current: Pn(o)
|
|
2589
|
+
})), [n, r] = xe.useState(() => t.current.initialState);
|
|
2324
2590
|
return t.current.setOptions((l) => ({
|
|
2325
2591
|
...l,
|
|
2326
2592
|
...e,
|
|
@@ -2335,7 +2601,7 @@ function Hn(e) {
|
|
|
2335
2601
|
}
|
|
2336
2602
|
})), t.current;
|
|
2337
2603
|
}
|
|
2338
|
-
const
|
|
2604
|
+
const Xe = ({
|
|
2339
2605
|
editable: e = !0,
|
|
2340
2606
|
deletable: o = !0,
|
|
2341
2607
|
pageSize: t = 25,
|
|
@@ -2345,101 +2611,101 @@ const Ue = ({
|
|
|
2345
2611
|
const {
|
|
2346
2612
|
rows: l,
|
|
2347
2613
|
schema: i,
|
|
2348
|
-
mappings:
|
|
2614
|
+
mappings: s,
|
|
2349
2615
|
errorsByRow: u,
|
|
2350
2616
|
editingCell: f,
|
|
2351
|
-
startEditing:
|
|
2352
|
-
stopEditing:
|
|
2617
|
+
startEditing: g,
|
|
2618
|
+
stopEditing: p,
|
|
2353
2619
|
updateCell: d,
|
|
2354
|
-
deleteRow:
|
|
2355
|
-
} =
|
|
2356
|
-
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);
|
|
2357
2623
|
return {
|
|
2358
|
-
sourceColumn:
|
|
2359
|
-
targetKey:
|
|
2360
|
-
label: (
|
|
2361
|
-
type: (
|
|
2624
|
+
sourceColumn: _.sourceColumn,
|
|
2625
|
+
targetKey: _.targetKey,
|
|
2626
|
+
label: ($ == null ? void 0 : $.label) || _.targetKey,
|
|
2627
|
+
type: ($ == null ? void 0 : $.type) || "string"
|
|
2362
2628
|
};
|
|
2363
|
-
}), [
|
|
2364
|
-
(
|
|
2365
|
-
const
|
|
2366
|
-
return
|
|
2629
|
+
}), [s, i]), F = Ne(
|
|
2630
|
+
(_, $) => {
|
|
2631
|
+
const P = u.get(_);
|
|
2632
|
+
return P == null ? void 0 : P.find((A) => A.columnKey === $);
|
|
2367
2633
|
},
|
|
2368
2634
|
[u]
|
|
2369
|
-
),
|
|
2370
|
-
|
|
2371
|
-
},
|
|
2372
|
-
f && (d(f.rowIndex, f.columnKey,
|
|
2373
|
-
},
|
|
2374
|
-
|
|
2375
|
-
}, H = (
|
|
2376
|
-
|
|
2377
|
-
},
|
|
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(
|
|
2378
2644
|
() => [
|
|
2379
|
-
|
|
2645
|
+
K.accessor("rowIndex", {
|
|
2380
2646
|
header: "#",
|
|
2381
2647
|
size: 60,
|
|
2382
|
-
cell: (
|
|
2648
|
+
cell: (_) => /* @__PURE__ */ c("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: _.getValue() + 1 })
|
|
2383
2649
|
}),
|
|
2384
|
-
...
|
|
2385
|
-
(
|
|
2386
|
-
id:
|
|
2387
|
-
header:
|
|
2388
|
-
cell: (
|
|
2389
|
-
const
|
|
2390
|
-
return (f == null ? void 0 : f.rowIndex) ===
|
|
2391
|
-
/* @__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(
|
|
2392
2658
|
"input",
|
|
2393
2659
|
{
|
|
2394
2660
|
type: "text",
|
|
2395
|
-
value:
|
|
2396
|
-
onChange: (
|
|
2397
|
-
onKeyDown: (
|
|
2398
|
-
|
|
2661
|
+
value: S,
|
|
2662
|
+
onChange: (Y) => x(Y.target.value),
|
|
2663
|
+
onKeyDown: (Y) => {
|
|
2664
|
+
Y.key === "Enter" && W(), Y.key === "Escape" && k();
|
|
2399
2665
|
},
|
|
2400
2666
|
className: "ff-input ff-py-2 ff-px-3 ff-text-sm ff-flex-1 ff-min-w-[160px]",
|
|
2401
2667
|
autoFocus: !0
|
|
2402
2668
|
}
|
|
2403
2669
|
),
|
|
2404
|
-
/* @__PURE__ */
|
|
2670
|
+
/* @__PURE__ */ c(
|
|
2405
2671
|
"button",
|
|
2406
2672
|
{
|
|
2407
|
-
onClick:
|
|
2673
|
+
onClick: W,
|
|
2408
2674
|
className: "ff-btn ff-btn-primary ff-btn-sm ff-flex-shrink-0",
|
|
2409
2675
|
children: "Save"
|
|
2410
2676
|
}
|
|
2411
2677
|
),
|
|
2412
|
-
/* @__PURE__ */
|
|
2678
|
+
/* @__PURE__ */ c(
|
|
2413
2679
|
"button",
|
|
2414
2680
|
{
|
|
2415
|
-
onClick:
|
|
2681
|
+
onClick: k,
|
|
2416
2682
|
className: "ff-btn ff-btn-secondary ff-btn-sm ff-flex-shrink-0",
|
|
2417
2683
|
children: "Cancel"
|
|
2418
2684
|
}
|
|
2419
2685
|
)
|
|
2420
|
-
] }) : /* @__PURE__ */
|
|
2686
|
+
] }) : /* @__PURE__ */ w(
|
|
2421
2687
|
"div",
|
|
2422
2688
|
{
|
|
2423
|
-
className:
|
|
2689
|
+
className: U(
|
|
2424
2690
|
"ff-group ff-flex ff-items-center ff-gap-2",
|
|
2425
|
-
(
|
|
2426
|
-
(
|
|
2691
|
+
(D == null ? void 0 : D.severity) === "error" && "ff-cell-error",
|
|
2692
|
+
(D == null ? void 0 : D.severity) === "warning" && "ff-cell-warning"
|
|
2427
2693
|
),
|
|
2428
2694
|
children: [
|
|
2429
|
-
/* @__PURE__ */
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
/* @__PURE__ */
|
|
2433
|
-
|
|
2434
|
-
|
|
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 })
|
|
2435
2701
|
] })
|
|
2436
2702
|
] }),
|
|
2437
|
-
e && /* @__PURE__ */
|
|
2703
|
+
e && /* @__PURE__ */ c(
|
|
2438
2704
|
"button",
|
|
2439
2705
|
{
|
|
2440
|
-
onClick: () =>
|
|
2706
|
+
onClick: () => V(P, _.targetKey, A),
|
|
2441
2707
|
className: "ff-opacity-0 group-hover:ff-opacity-100 ff-p-1 ff-rounded ff-transition-opacity ff-edit-btn",
|
|
2442
|
-
children: /* @__PURE__ */
|
|
2708
|
+
children: /* @__PURE__ */ c(Ht, { className: "ff-w-3 ff-h-3" })
|
|
2443
2709
|
}
|
|
2444
2710
|
)
|
|
2445
2711
|
]
|
|
@@ -2450,111 +2716,111 @@ const Ue = ({
|
|
|
2450
2716
|
),
|
|
2451
2717
|
// Actions column (delete)
|
|
2452
2718
|
...o ? [
|
|
2453
|
-
|
|
2719
|
+
K.display({
|
|
2454
2720
|
id: "actions",
|
|
2455
2721
|
header: "",
|
|
2456
2722
|
size: 50,
|
|
2457
|
-
cell: (
|
|
2458
|
-
const
|
|
2459
|
-
return /* @__PURE__ */
|
|
2723
|
+
cell: (_) => {
|
|
2724
|
+
const $ = _.row.original.rowIndex;
|
|
2725
|
+
return /* @__PURE__ */ c(
|
|
2460
2726
|
"button",
|
|
2461
2727
|
{
|
|
2462
|
-
onClick: () => H(
|
|
2728
|
+
onClick: () => H($),
|
|
2463
2729
|
className: "ff-delete-btn",
|
|
2464
2730
|
title: "Delete row",
|
|
2465
|
-
children: /* @__PURE__ */
|
|
2731
|
+
children: /* @__PURE__ */ c(Ot, { className: "ff-w-4 ff-h-4" })
|
|
2466
2732
|
}
|
|
2467
2733
|
);
|
|
2468
2734
|
}
|
|
2469
2735
|
})
|
|
2470
2736
|
] : []
|
|
2471
2737
|
],
|
|
2472
|
-
[
|
|
2473
|
-
), z =
|
|
2738
|
+
[I, f, S, e, o, F, K]
|
|
2739
|
+
), z = Bn({
|
|
2474
2740
|
data: l,
|
|
2475
2741
|
columns: O,
|
|
2476
2742
|
state: {
|
|
2477
2743
|
sorting: m,
|
|
2478
|
-
globalFilter:
|
|
2744
|
+
globalFilter: C
|
|
2479
2745
|
},
|
|
2480
|
-
onSortingChange:
|
|
2481
|
-
onGlobalFilterChange:
|
|
2482
|
-
getCoreRowModel:
|
|
2483
|
-
getPaginationRowModel:
|
|
2484
|
-
getSortedRowModel:
|
|
2485
|
-
getFilteredRowModel:
|
|
2746
|
+
onSortingChange: v,
|
|
2747
|
+
onGlobalFilterChange: h,
|
|
2748
|
+
getCoreRowModel: kn(),
|
|
2749
|
+
getPaginationRowModel: An(),
|
|
2750
|
+
getSortedRowModel: Gn(),
|
|
2751
|
+
getFilteredRowModel: Hn(),
|
|
2486
2752
|
initialState: {
|
|
2487
2753
|
pagination: {
|
|
2488
2754
|
pageSize: t
|
|
2489
2755
|
}
|
|
2490
2756
|
}
|
|
2491
2757
|
});
|
|
2492
|
-
return /* @__PURE__ */
|
|
2493
|
-
/* @__PURE__ */
|
|
2494
|
-
/* @__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(
|
|
2495
2761
|
"input",
|
|
2496
2762
|
{
|
|
2497
2763
|
type: "text",
|
|
2498
|
-
value:
|
|
2499
|
-
onChange: (
|
|
2764
|
+
value: C,
|
|
2765
|
+
onChange: (_) => h(_.target.value),
|
|
2500
2766
|
placeholder: "Search all columns...",
|
|
2501
2767
|
className: "ff-input ff-max-w-xs"
|
|
2502
2768
|
}
|
|
2503
2769
|
),
|
|
2504
|
-
/* @__PURE__ */
|
|
2770
|
+
/* @__PURE__ */ w("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
2505
2771
|
z.getFilteredRowModel().rows.length,
|
|
2506
2772
|
" rows"
|
|
2507
2773
|
] })
|
|
2508
2774
|
] }),
|
|
2509
|
-
/* @__PURE__ */
|
|
2510
|
-
/* @__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(
|
|
2511
2777
|
"th",
|
|
2512
2778
|
{
|
|
2513
|
-
style: { width:
|
|
2514
|
-
onClick:
|
|
2515
|
-
className:
|
|
2516
|
-
|
|
2779
|
+
style: { width: $.getSize() },
|
|
2780
|
+
onClick: $.column.getToggleSortingHandler(),
|
|
2781
|
+
className: U(
|
|
2782
|
+
$.column.getCanSort() && "ff-cursor-pointer ff-select-none"
|
|
2517
2783
|
),
|
|
2518
|
-
children: /* @__PURE__ */
|
|
2519
|
-
|
|
2520
|
-
|
|
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" ? "↑" : "↓" })
|
|
2521
2787
|
] })
|
|
2522
2788
|
},
|
|
2523
|
-
|
|
2524
|
-
)) },
|
|
2525
|
-
/* @__PURE__ */
|
|
2526
|
-
const
|
|
2527
|
-
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(
|
|
2528
2794
|
"tr",
|
|
2529
2795
|
{
|
|
2530
|
-
className:
|
|
2531
|
-
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))
|
|
2532
2798
|
},
|
|
2533
|
-
|
|
2799
|
+
_.id
|
|
2534
2800
|
);
|
|
2535
2801
|
}) })
|
|
2536
2802
|
] }) }),
|
|
2537
|
-
/* @__PURE__ */
|
|
2538
|
-
/* @__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: [
|
|
2539
2805
|
"Page ",
|
|
2540
2806
|
z.getState().pagination.pageIndex + 1,
|
|
2541
2807
|
" of ",
|
|
2542
2808
|
z.getPageCount()
|
|
2543
2809
|
] }),
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
|
|
2811
|
+
/* @__PURE__ */ w(
|
|
2546
2812
|
"button",
|
|
2547
2813
|
{
|
|
2548
2814
|
onClick: () => z.previousPage(),
|
|
2549
2815
|
disabled: !z.getCanPreviousPage(),
|
|
2550
2816
|
className: "ff-btn ff-btn-secondary ff-btn-sm",
|
|
2551
2817
|
children: [
|
|
2552
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ c(Ft, { className: "ff-w-4 ff-h-4" }),
|
|
2553
2819
|
"Previous"
|
|
2554
2820
|
]
|
|
2555
2821
|
}
|
|
2556
2822
|
),
|
|
2557
|
-
/* @__PURE__ */
|
|
2823
|
+
/* @__PURE__ */ w(
|
|
2558
2824
|
"button",
|
|
2559
2825
|
{
|
|
2560
2826
|
onClick: () => z.nextPage(),
|
|
@@ -2562,22 +2828,22 @@ const Ue = ({
|
|
|
2562
2828
|
className: "ff-btn ff-btn-secondary ff-btn-sm",
|
|
2563
2829
|
children: [
|
|
2564
2830
|
"Next",
|
|
2565
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ c(vt, { className: "ff-w-4 ff-h-4" })
|
|
2566
2832
|
]
|
|
2567
2833
|
}
|
|
2568
2834
|
)
|
|
2569
2835
|
] })
|
|
2570
2836
|
] })
|
|
2571
2837
|
] });
|
|
2572
|
-
},
|
|
2838
|
+
}, We = ({
|
|
2573
2839
|
showDetails: e = !0
|
|
2574
2840
|
}) => {
|
|
2575
|
-
const { validationResults: o } =
|
|
2841
|
+
const { validationResults: o } = Z();
|
|
2576
2842
|
if (!o)
|
|
2577
2843
|
return null;
|
|
2578
|
-
const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount:
|
|
2579
|
-
return /* @__PURE__ */
|
|
2580
|
-
/* @__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(
|
|
2581
2847
|
"div",
|
|
2582
2848
|
{
|
|
2583
2849
|
className: "ff-flex ff-items-center ff-gap-4 ff-p-4 ff-rounded-lg ff-border",
|
|
@@ -2586,9 +2852,9 @@ const Ue = ({
|
|
|
2586
2852
|
borderColor: t ? "var(--ff-success)" : "var(--ff-error)"
|
|
2587
2853
|
},
|
|
2588
2854
|
children: [
|
|
2589
|
-
t ? /* @__PURE__ */
|
|
2590
|
-
/* @__PURE__ */
|
|
2591
|
-
/* @__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(
|
|
2592
2858
|
"h3",
|
|
2593
2859
|
{
|
|
2594
2860
|
className: "ff-text-lg ff-font-semibold",
|
|
@@ -2596,7 +2862,7 @@ const Ue = ({
|
|
|
2596
2862
|
children: t ? "Validation Passed" : "Validation Failed"
|
|
2597
2863
|
}
|
|
2598
2864
|
),
|
|
2599
|
-
/* @__PURE__ */
|
|
2865
|
+
/* @__PURE__ */ w("p", { className: "ff-text-sm", style: { color: t ? "var(--ff-success)" : "var(--ff-error)" }, children: [
|
|
2600
2866
|
r,
|
|
2601
2867
|
" of ",
|
|
2602
2868
|
n,
|
|
@@ -2608,27 +2874,27 @@ const Ue = ({
|
|
|
2608
2874
|
]
|
|
2609
2875
|
}
|
|
2610
2876
|
),
|
|
2611
|
-
/* @__PURE__ */
|
|
2612
|
-
/* @__PURE__ */
|
|
2613
|
-
/* @__PURE__ */
|
|
2614
|
-
/* @__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" })
|
|
2615
2881
|
] }),
|
|
2616
|
-
/* @__PURE__ */
|
|
2617
|
-
/* @__PURE__ */
|
|
2618
|
-
/* @__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" })
|
|
2619
2885
|
] }),
|
|
2620
|
-
/* @__PURE__ */
|
|
2621
|
-
/* @__PURE__ */
|
|
2622
|
-
/* @__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" })
|
|
2623
2889
|
] }),
|
|
2624
|
-
/* @__PURE__ */
|
|
2625
|
-
/* @__PURE__ */
|
|
2626
|
-
/* @__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" })
|
|
2627
2893
|
] })
|
|
2628
2894
|
] }),
|
|
2629
|
-
e && u.byColumn && Object.keys(u.byColumn).length > 0 && /* @__PURE__ */
|
|
2630
|
-
/* @__PURE__ */
|
|
2631
|
-
/* @__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(
|
|
2632
2898
|
"div",
|
|
2633
2899
|
{
|
|
2634
2900
|
className: "ff-flex ff-items-center ff-justify-between ff-px-4 ff-py-3",
|
|
@@ -2636,48 +2902,48 @@ const Ue = ({
|
|
|
2636
2902
|
borderTop: d > 0 ? "1px solid var(--ff-border-light)" : void 0
|
|
2637
2903
|
},
|
|
2638
2904
|
children: [
|
|
2639
|
-
/* @__PURE__ */
|
|
2640
|
-
/* @__PURE__ */
|
|
2641
|
-
|
|
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 })
|
|
2642
2908
|
] }),
|
|
2643
|
-
/* @__PURE__ */
|
|
2644
|
-
|
|
2645
|
-
/* @__PURE__ */
|
|
2646
|
-
|
|
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,
|
|
2647
2913
|
" ",
|
|
2648
|
-
|
|
2914
|
+
p.errorCount === 1 ? "error" : "errors"
|
|
2649
2915
|
] }),
|
|
2650
|
-
|
|
2651
|
-
/* @__PURE__ */
|
|
2652
|
-
|
|
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,
|
|
2653
2919
|
" ",
|
|
2654
|
-
|
|
2920
|
+
p.warningCount === 1 ? "warning" : "warnings"
|
|
2655
2921
|
] })
|
|
2656
2922
|
] })
|
|
2657
2923
|
]
|
|
2658
2924
|
},
|
|
2659
|
-
|
|
2925
|
+
g
|
|
2660
2926
|
)) })
|
|
2661
2927
|
] }),
|
|
2662
|
-
e && u.duplicates && u.duplicates.length > 0 && /* @__PURE__ */
|
|
2663
|
-
/* @__PURE__ */
|
|
2664
|
-
/* @__PURE__ */
|
|
2665
|
-
/* @__PURE__ */
|
|
2666
|
-
/* @__PURE__ */
|
|
2667
|
-
u.duplicates.slice(0, 5).map((
|
|
2668
|
-
/* @__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 }),
|
|
2669
2935
|
': "',
|
|
2670
|
-
String(
|
|
2936
|
+
String(g.value),
|
|
2671
2937
|
'" appears',
|
|
2672
2938
|
" ",
|
|
2673
|
-
|
|
2939
|
+
g.rowIndices.length,
|
|
2674
2940
|
" times (rows",
|
|
2675
2941
|
" ",
|
|
2676
|
-
|
|
2677
|
-
|
|
2942
|
+
g.rowIndices.slice(0, 3).map((d) => d + 1).join(", "),
|
|
2943
|
+
g.rowIndices.length > 3 ? "..." : "",
|
|
2678
2944
|
")"
|
|
2679
|
-
] },
|
|
2680
|
-
u.duplicates.length > 5 && /* @__PURE__ */
|
|
2945
|
+
] }, p)),
|
|
2946
|
+
u.duplicates.length > 5 && /* @__PURE__ */ w("li", { style: { color: "var(--ff-warning)" }, children: [
|
|
2681
2947
|
"... and ",
|
|
2682
2948
|
u.duplicates.length - 5,
|
|
2683
2949
|
" more duplicate groups"
|
|
@@ -2686,13 +2952,13 @@ const Ue = ({
|
|
|
2686
2952
|
] })
|
|
2687
2953
|
] }) })
|
|
2688
2954
|
] });
|
|
2689
|
-
},
|
|
2690
|
-
{ key: "upload", label: "Upload", icon:
|
|
2691
|
-
{ key: "mapping", label: "Map Columns", icon:
|
|
2692
|
-
{ key: "validation", label: "Validate", icon:
|
|
2693
|
-
{ key: "review", label: "Review", icon:
|
|
2694
|
-
{ key: "complete", label: "Complete", icon:
|
|
2695
|
-
],
|
|
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 = ({
|
|
2696
2962
|
template: e,
|
|
2697
2963
|
schema: o,
|
|
2698
2964
|
mode: t = "modal",
|
|
@@ -2700,122 +2966,126 @@ const Ue = ({
|
|
|
2700
2966
|
useShadowDom: r = !1,
|
|
2701
2967
|
onComplete: l,
|
|
2702
2968
|
onCancel: i,
|
|
2703
|
-
onError:
|
|
2969
|
+
onError: s
|
|
2704
2970
|
}) => {
|
|
2705
2971
|
const {
|
|
2706
2972
|
step: u,
|
|
2707
2973
|
sessionId: f,
|
|
2708
|
-
file:
|
|
2709
|
-
mappings:
|
|
2974
|
+
file: g,
|
|
2975
|
+
mappings: p,
|
|
2710
2976
|
validationResults: d,
|
|
2711
|
-
isLoading:
|
|
2977
|
+
isLoading: a,
|
|
2712
2978
|
error: m,
|
|
2713
|
-
setSchema:
|
|
2714
|
-
setSessionId:
|
|
2715
|
-
setParsedData:
|
|
2716
|
-
setMappings:
|
|
2717
|
-
setUnmapped:
|
|
2718
|
-
setValidationResults:
|
|
2719
|
-
setStep:
|
|
2720
|
-
nextStep:
|
|
2721
|
-
previousStep:
|
|
2722
|
-
setLoading:
|
|
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,
|
|
2723
2989
|
setError: H,
|
|
2724
|
-
reset:
|
|
2725
|
-
} =
|
|
2726
|
-
|
|
2727
|
-
if (
|
|
2728
|
-
if (
|
|
2729
|
-
const
|
|
2730
|
-
|
|
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}"`)));
|
|
2731
2997
|
} else {
|
|
2732
|
-
const
|
|
2733
|
-
|
|
2998
|
+
const M = `Template "${e}" not found. Available templates: ${Be.join(", ")}`;
|
|
2999
|
+
$(M), s == null || s(new Error(M));
|
|
2734
3000
|
}
|
|
2735
3001
|
else if (o)
|
|
2736
3002
|
z(o);
|
|
2737
3003
|
else {
|
|
2738
|
-
const
|
|
2739
|
-
|
|
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));
|
|
2740
3006
|
}
|
|
2741
|
-
}, [e, o,
|
|
2742
|
-
O && (
|
|
3007
|
+
}, [e, o, s]), Oe(() => {
|
|
3008
|
+
O && (v(O), Y(O));
|
|
2743
3009
|
}, [O]);
|
|
2744
|
-
const
|
|
3010
|
+
const Y = async (M) => {
|
|
2745
3011
|
try {
|
|
2746
|
-
|
|
2747
|
-
const
|
|
2748
|
-
|
|
2749
|
-
} catch (
|
|
2750
|
-
const
|
|
2751
|
-
H(
|
|
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);
|
|
2752
3018
|
} finally {
|
|
2753
|
-
|
|
3019
|
+
k(!1);
|
|
2754
3020
|
}
|
|
2755
|
-
},
|
|
3021
|
+
}, it = Ne(async (M) => {
|
|
2756
3022
|
if (f)
|
|
2757
3023
|
try {
|
|
2758
|
-
|
|
2759
|
-
const
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
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)
|
|
2763
3033
|
});
|
|
2764
|
-
|
|
2765
|
-
headers:
|
|
2766
|
-
rows:
|
|
2767
|
-
totalRows:
|
|
2768
|
-
sampleRows:
|
|
2769
|
-
}),
|
|
2770
|
-
} catch (
|
|
2771
|
-
H(`Failed to process the uploaded file: ${
|
|
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}`);
|
|
2772
3042
|
} finally {
|
|
2773
|
-
|
|
3043
|
+
k(!1), A(0), Q("");
|
|
2774
3044
|
}
|
|
2775
|
-
}, [f]),
|
|
3045
|
+
}, [f]), st = async () => {
|
|
2776
3046
|
if (f)
|
|
2777
3047
|
try {
|
|
2778
|
-
|
|
2779
|
-
const
|
|
2780
|
-
|
|
2781
|
-
} catch (
|
|
2782
|
-
H(`Column matching failed: ${
|
|
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}`);
|
|
2783
3053
|
} finally {
|
|
2784
|
-
|
|
3054
|
+
k(!1);
|
|
2785
3055
|
}
|
|
2786
|
-
},
|
|
3056
|
+
}, at = async () => {
|
|
2787
3057
|
if (f)
|
|
2788
3058
|
try {
|
|
2789
|
-
|
|
2790
|
-
const
|
|
2791
|
-
|
|
2792
|
-
} catch (
|
|
2793
|
-
H(`Validation failed: ${
|
|
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}`);
|
|
2794
3064
|
} finally {
|
|
2795
|
-
|
|
3065
|
+
k(!1);
|
|
2796
3066
|
}
|
|
2797
|
-
}, [
|
|
3067
|
+
}, [He, fe] = q(null), ut = async () => {
|
|
2798
3068
|
if (f)
|
|
2799
3069
|
try {
|
|
2800
|
-
|
|
2801
|
-
const
|
|
3070
|
+
k(!0), H(null), fe(null);
|
|
3071
|
+
const N = await te().completeImport(f, {
|
|
2802
3072
|
skipInvalidRows: !0,
|
|
2803
3073
|
acknowledgeWarnings: !0
|
|
2804
3074
|
});
|
|
2805
|
-
|
|
2806
|
-
} catch (
|
|
2807
|
-
|
|
3075
|
+
F("complete"), l == null || l(N);
|
|
3076
|
+
} catch (M) {
|
|
3077
|
+
fe(M.message), F("complete");
|
|
2808
3078
|
} finally {
|
|
2809
|
-
|
|
3079
|
+
k(!1);
|
|
2810
3080
|
}
|
|
2811
|
-
},
|
|
2812
|
-
|
|
2813
|
-
},
|
|
3081
|
+
}, de = () => {
|
|
3082
|
+
K(), i == null || i();
|
|
3083
|
+
}, ft = () => Kn.findIndex((M) => M.key === u), dt = () => {
|
|
2814
3084
|
switch (u) {
|
|
2815
3085
|
case "upload":
|
|
2816
|
-
return
|
|
3086
|
+
return g !== null;
|
|
2817
3087
|
case "mapping":
|
|
2818
|
-
return
|
|
3088
|
+
return p.length > 0 && p.some((M) => M.targetKey !== null);
|
|
2819
3089
|
case "validation":
|
|
2820
3090
|
return d !== null;
|
|
2821
3091
|
case "review":
|
|
@@ -2823,138 +3093,152 @@ const Ue = ({
|
|
|
2823
3093
|
default:
|
|
2824
3094
|
return !1;
|
|
2825
3095
|
}
|
|
2826
|
-
},
|
|
3096
|
+
}, ct = async () => {
|
|
2827
3097
|
switch (u) {
|
|
2828
3098
|
case "mapping":
|
|
2829
|
-
await
|
|
3099
|
+
await at();
|
|
2830
3100
|
break;
|
|
2831
3101
|
case "validation":
|
|
2832
|
-
|
|
3102
|
+
V();
|
|
2833
3103
|
break;
|
|
2834
3104
|
case "review":
|
|
2835
|
-
await
|
|
3105
|
+
await ut();
|
|
2836
3106
|
break;
|
|
2837
3107
|
default:
|
|
2838
|
-
|
|
3108
|
+
V();
|
|
2839
3109
|
}
|
|
2840
3110
|
};
|
|
2841
|
-
if (
|
|
2842
|
-
return /* @__PURE__ */
|
|
2843
|
-
/* @__PURE__ */
|
|
2844
|
-
/* @__PURE__ */
|
|
2845
|
-
/* @__PURE__ */
|
|
2846
|
-
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" })
|
|
2847
3117
|
] }) }) });
|
|
2848
3118
|
if (!O)
|
|
2849
|
-
return /* @__PURE__ */
|
|
2850
|
-
/* @__PURE__ */
|
|
2851
|
-
/* @__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..." })
|
|
2852
3122
|
] }) }) });
|
|
2853
|
-
const
|
|
2854
|
-
const
|
|
2855
|
-
return
|
|
2856
|
-
},
|
|
2857
|
-
/* @__PURE__ */
|
|
2858
|
-
/* @__PURE__ */
|
|
2859
|
-
/* @__PURE__ */
|
|
2860
|
-
/* @__PURE__ */
|
|
2861
|
-
/* @__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" })
|
|
2862
3132
|
] }),
|
|
2863
|
-
/* @__PURE__ */
|
|
2864
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ c("div", { className: "ff-steps ff-ml-4", children: Re.map((M, N) => /* @__PURE__ */ w(pt.Fragment, { children: [
|
|
3134
|
+
/* @__PURE__ */ c(
|
|
2865
3135
|
"div",
|
|
2866
3136
|
{
|
|
2867
|
-
className:
|
|
3137
|
+
className: U(
|
|
2868
3138
|
"ff-step",
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
3139
|
+
ee() === N && "ff-step-active",
|
|
3140
|
+
ee() > N && "ff-step-complete",
|
|
3141
|
+
ee() < N && "ff-step-pending"
|
|
2872
3142
|
),
|
|
2873
|
-
children:
|
|
3143
|
+
children: ee() > N ? "✓" : N + 1
|
|
2874
3144
|
}
|
|
2875
3145
|
),
|
|
2876
|
-
|
|
3146
|
+
N < Re.length - 1 && /* @__PURE__ */ c("div", { className: U(
|
|
2877
3147
|
"ff-step-connector",
|
|
2878
|
-
|
|
3148
|
+
ee() > N && "ff-step-connector-complete"
|
|
2879
3149
|
) })
|
|
2880
|
-
] },
|
|
3150
|
+
] }, M)) })
|
|
2881
3151
|
] }),
|
|
2882
|
-
/* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ c(
|
|
2883
3153
|
"button",
|
|
2884
3154
|
{
|
|
2885
|
-
onClick:
|
|
3155
|
+
onClick: de,
|
|
2886
3156
|
className: "ff-modal-close",
|
|
2887
|
-
children: /* @__PURE__ */
|
|
3157
|
+
children: /* @__PURE__ */ c(ae, { className: "ff-w-5 ff-h-5" })
|
|
2888
3158
|
}
|
|
2889
3159
|
)
|
|
2890
3160
|
] }),
|
|
2891
|
-
/* @__PURE__ */
|
|
2892
|
-
m && /* @__PURE__ */
|
|
2893
|
-
u === "upload" && /* @__PURE__ */
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
/* @__PURE__ */
|
|
2897
|
-
|
|
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 })
|
|
2898
3182
|
] }),
|
|
2899
|
-
u === "review" && /* @__PURE__ */
|
|
2900
|
-
/* @__PURE__ */
|
|
2901
|
-
/* @__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 })
|
|
2902
3186
|
] }),
|
|
2903
|
-
u === "complete" && /* @__PURE__ */
|
|
2904
|
-
/* @__PURE__ */
|
|
2905
|
-
/* @__PURE__ */
|
|
2906
|
-
/* @__PURE__ */
|
|
2907
|
-
/* @__PURE__ */
|
|
2908
|
-
/* @__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(
|
|
2909
3193
|
"button",
|
|
2910
3194
|
{
|
|
2911
3195
|
onClick: () => {
|
|
2912
|
-
|
|
3196
|
+
fe(null), F("review");
|
|
2913
3197
|
},
|
|
2914
3198
|
className: "ff-btn ff-btn-secondary",
|
|
2915
3199
|
children: "Back to Review"
|
|
2916
3200
|
}
|
|
2917
3201
|
),
|
|
2918
|
-
i && /* @__PURE__ */
|
|
3202
|
+
i && /* @__PURE__ */ c("button", { onClick: de, className: "ff-btn ff-btn-secondary", children: "Close" })
|
|
2919
3203
|
] })
|
|
2920
|
-
] }) : /* @__PURE__ */
|
|
2921
|
-
/* @__PURE__ */
|
|
2922
|
-
/* @__PURE__ */
|
|
2923
|
-
/* @__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." })
|
|
2924
3208
|
] }) })
|
|
2925
3209
|
] }),
|
|
2926
|
-
u !== "complete" && /* @__PURE__ */
|
|
2927
|
-
/* @__PURE__ */
|
|
3210
|
+
u !== "complete" && /* @__PURE__ */ w("div", { className: "ff-modal-footer", children: [
|
|
3211
|
+
/* @__PURE__ */ c(
|
|
2928
3212
|
"button",
|
|
2929
3213
|
{
|
|
2930
|
-
onClick:
|
|
2931
|
-
disabled:
|
|
3214
|
+
onClick: W,
|
|
3215
|
+
disabled: ft() === 0 || a,
|
|
2932
3216
|
className: "ff-btn ff-btn-secondary",
|
|
2933
3217
|
children: "Back"
|
|
2934
3218
|
}
|
|
2935
3219
|
),
|
|
2936
|
-
/* @__PURE__ */
|
|
3220
|
+
/* @__PURE__ */ c(
|
|
2937
3221
|
"button",
|
|
2938
3222
|
{
|
|
2939
|
-
onClick:
|
|
2940
|
-
disabled: !
|
|
3223
|
+
onClick: ct,
|
|
3224
|
+
disabled: !dt() || a,
|
|
2941
3225
|
className: "ff-btn ff-btn-primary",
|
|
2942
|
-
children:
|
|
2943
|
-
/* @__PURE__ */
|
|
3226
|
+
children: a ? /* @__PURE__ */ w(re, { children: [
|
|
3227
|
+
/* @__PURE__ */ c(ge, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
|
|
2944
3228
|
"Processing..."
|
|
2945
3229
|
] }) : u === "review" ? "Complete Import" : "Continue"
|
|
2946
3230
|
}
|
|
2947
3231
|
)
|
|
2948
3232
|
] })
|
|
2949
3233
|
] }) });
|
|
2950
|
-
return /* @__PURE__ */
|
|
3234
|
+
return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: t === "modal" ? /* @__PURE__ */ c("div", { className: "ff-overlay", children: Ae }) : Ae });
|
|
2951
3235
|
};
|
|
2952
3236
|
export {
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
3237
|
+
Kt as C,
|
|
3238
|
+
Xe as D,
|
|
3239
|
+
Bt as F,
|
|
3240
|
+
Wn as I,
|
|
3241
|
+
We as V,
|
|
3242
|
+
Z as u
|
|
2959
3243
|
};
|
|
2960
|
-
//# sourceMappingURL=ImportWizard-
|
|
3244
|
+
//# sourceMappingURL=ImportWizard-CrUjPf36.mjs.map
|