@fileflow/sdk 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ImportWizard-BkHlsJ8v.mjs → ImportWizard-CtAWJz5i.mjs} +520 -496
- package/dist/{ImportWizard-BkHlsJ8v.mjs.map → ImportWizard-CtAWJz5i.mjs.map} +1 -1
- package/dist/ImportWizard-D7zGFzbo.js +68 -0
- package/dist/{ImportWizard-mc9UDwP3.js.map → ImportWizard-D7zGFzbo.js.map} +1 -1
- package/dist/KYCWizard-DpNw8vOY.mjs +741 -0
- package/dist/KYCWizard-DpNw8vOY.mjs.map +1 -0
- package/dist/KYCWizard-VcCyxPjW.js +32 -0
- package/dist/KYCWizard-VcCyxPjW.js.map +1 -0
- package/dist/import.d.ts +11 -1
- package/dist/import.js +1 -1
- package/dist/import.mjs +1 -1
- package/dist/index-CEvc89fO.mjs +9086 -0
- package/dist/index-CEvc89fO.mjs.map +1 -0
- package/dist/index-VbMSbLb2.js +112 -0
- package/dist/index-VbMSbLb2.js.map +1 -0
- package/dist/index.d.ts +41 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +27 -19
- package/dist/kyc.js +1 -1
- package/dist/kyc.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/ImportWizard-mc9UDwP3.js +0 -68
- package/dist/KYCWizard-CRBXY9Np.js +0 -32
- package/dist/KYCWizard-CRBXY9Np.js.map +0 -1
- package/dist/KYCWizard-D3Leb4rK.mjs +0 -4575
- package/dist/KYCWizard-D3Leb4rK.mjs.map +0 -1
- package/dist/index-BdodGzlO.js +0 -112
- package/dist/index-BdodGzlO.js.map +0 -1
- package/dist/index-CML_nPxo.mjs +0 -5101
- package/dist/index-CML_nPxo.mjs.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as p, jsxs as w, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { jsx as p, jsxs as w, Fragment as et } from "react/jsx-runtime";
|
|
2
|
+
import * as pe from "react";
|
|
3
|
+
import tt, { useCallback as xe, useState as Y, useMemo as Pe, useEffect as Ne } from "react";
|
|
4
|
+
import { f as b, h as nt, u as rt, X as me, j as L, U as Oe, A as ye, m as he, o as ot, n as ne, k as De, t as it, c as lt, V as Le, g as W, L as Ee } from "./index-CEvc89fO.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.321.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 = b("ArrowRight", [
|
|
12
12
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
13
13
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
14
14
|
]);
|
|
@@ -18,7 +18,7 @@ const et = O("ArrowRight", [
|
|
|
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 at = b("CheckSquare", [
|
|
22
22
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }],
|
|
23
23
|
["path", { d: "M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11", key: "1jnkn4" }]
|
|
24
24
|
]);
|
|
@@ -28,14 +28,14 @@ const tt = O("CheckSquare", [
|
|
|
28
28
|
* This source code is licensed under the ISC license.
|
|
29
29
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
30
|
*/
|
|
31
|
-
const
|
|
31
|
+
const ut = b("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
|
|
32
32
|
/**
|
|
33
33
|
* @license lucide-react v0.321.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
37
|
*/
|
|
38
|
-
const
|
|
38
|
+
const ft = b("ChevronLeft", [
|
|
39
39
|
["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
|
|
40
40
|
]);
|
|
41
41
|
/**
|
|
@@ -44,7 +44,7 @@ const nt = O("ChevronLeft", [
|
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
const
|
|
47
|
+
const gt = b("Eye", [
|
|
48
48
|
["path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z", key: "rwhkz3" }],
|
|
49
49
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
50
50
|
]);
|
|
@@ -54,7 +54,7 @@ const rt = O("Eye", [
|
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
56
|
*/
|
|
57
|
-
const
|
|
57
|
+
const dt = b("File", [
|
|
58
58
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
59
59
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
|
|
60
60
|
]);
|
|
@@ -64,7 +64,7 @@ const ot = O("File", [
|
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/
|
|
67
|
-
const
|
|
67
|
+
const ct = b("GitBranch", [
|
|
68
68
|
["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
|
|
69
69
|
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
70
70
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
@@ -76,7 +76,7 @@ const it = O("GitBranch", [
|
|
|
76
76
|
* This source code is licensed under the ISC license.
|
|
77
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
78
78
|
*/
|
|
79
|
-
const
|
|
79
|
+
const pt = b("HelpCircle", [
|
|
80
80
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
81
81
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
82
82
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
@@ -87,9 +87,9 @@ const lt = O("HelpCircle", [
|
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
89
|
*/
|
|
90
|
-
const
|
|
90
|
+
const mt = b("Pen", [
|
|
91
91
|
["path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z", key: "5qss01" }]
|
|
92
|
-
]),
|
|
92
|
+
]), He = {
|
|
93
93
|
sessionId: null,
|
|
94
94
|
status: "idle",
|
|
95
95
|
step: "upload",
|
|
@@ -110,8 +110,8 @@ const st = O("Pen", [
|
|
|
110
110
|
error: null,
|
|
111
111
|
editingCell: null,
|
|
112
112
|
editedRows: /* @__PURE__ */ new Set()
|
|
113
|
-
}, X =
|
|
114
|
-
...
|
|
113
|
+
}, X = nt((e, r) => ({
|
|
114
|
+
...He,
|
|
115
115
|
setSchema: (t) => e({ schema: t }),
|
|
116
116
|
setSessionId: (t) => e({ sessionId: t }),
|
|
117
117
|
setFile: (t) => e({
|
|
@@ -164,26 +164,26 @@ const st = O("Pen", [
|
|
|
164
164
|
setStatus: (t) => e({ status: t }),
|
|
165
165
|
setLoading: (t) => e({ isLoading: t }),
|
|
166
166
|
setError: (t) => e({ error: t }),
|
|
167
|
-
reset: () => e(
|
|
168
|
-
})),
|
|
167
|
+
reset: () => e(He)
|
|
168
|
+
})), ht = ({
|
|
169
169
|
onFileSelect: e,
|
|
170
170
|
maxSize: r = 50 * 1024 * 1024,
|
|
171
171
|
// 50MB
|
|
172
172
|
acceptedTypes: t = [".csv", ".xlsx", ".xls"]
|
|
173
173
|
}) => {
|
|
174
|
-
const { file: n, fileName: o, fileSize: i, setFile: l, error: a, setError: u, isLoading: g } = X(), d =
|
|
174
|
+
const { file: n, fileName: o, fileSize: i, setFile: l, error: a, setError: u, isLoading: g } = X(), d = xe(
|
|
175
175
|
(S, R) => {
|
|
176
176
|
if (R.length > 0) {
|
|
177
177
|
u("Invalid file type or file too large");
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
180
|
if (S.length > 0) {
|
|
181
|
-
const
|
|
182
|
-
l(
|
|
181
|
+
const _ = S[0];
|
|
182
|
+
l(_), e == null || e(_);
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
185
|
[e, l, u]
|
|
186
|
-
), { getRootProps: c, getInputProps: f, isDragActive: s } =
|
|
186
|
+
), { getRootProps: c, getInputProps: f, isDragActive: s } = rt({
|
|
187
187
|
onDrop: d,
|
|
188
188
|
accept: {
|
|
189
189
|
"text/csv": [".csv"],
|
|
@@ -197,7 +197,7 @@ const st = O("Pen", [
|
|
|
197
197
|
S.stopPropagation(), X.getState().reset();
|
|
198
198
|
};
|
|
199
199
|
return n ? /* @__PURE__ */ p("div", { className: "ff-p-4 ff-bg-green-50 ff-border ff-border-green-200 ff-rounded-lg", children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
|
|
200
|
-
/* @__PURE__ */ p("div", { className: "ff-p-2 ff-bg-green-100 ff-rounded-lg", children: /* @__PURE__ */ p(
|
|
200
|
+
/* @__PURE__ */ p("div", { className: "ff-p-2 ff-bg-green-100 ff-rounded-lg", children: /* @__PURE__ */ p(dt, { className: "ff-w-6 ff-h-6 ff-text-green-600" }) }),
|
|
201
201
|
/* @__PURE__ */ w("div", { className: "ff-flex-1 ff-min-w-0", children: [
|
|
202
202
|
/* @__PURE__ */ p("p", { className: "ff-font-medium ff-text-green-900 ff-truncate", children: o }),
|
|
203
203
|
/* @__PURE__ */ p("p", { className: "ff-text-sm ff-text-green-600", children: m(i || 0) })
|
|
@@ -208,7 +208,7 @@ const st = O("Pen", [
|
|
|
208
208
|
onClick: h,
|
|
209
209
|
className: "ff-p-1.5 ff-text-green-600 hover:ff-text-green-800 hover:ff-bg-green-100 ff-rounded-full ff-transition-colors",
|
|
210
210
|
"aria-label": "Remove file",
|
|
211
|
-
children: /* @__PURE__ */ p(
|
|
211
|
+
children: /* @__PURE__ */ p(me, { className: "ff-w-5 ff-h-5" })
|
|
212
212
|
}
|
|
213
213
|
)
|
|
214
214
|
] }) }) : /* @__PURE__ */ w("div", { className: "ff-space-y-3", children: [
|
|
@@ -216,7 +216,7 @@ const st = O("Pen", [
|
|
|
216
216
|
"div",
|
|
217
217
|
{
|
|
218
218
|
...c(),
|
|
219
|
-
className:
|
|
219
|
+
className: L(
|
|
220
220
|
"ff-dropzone",
|
|
221
221
|
s && "ff-dropzone-active",
|
|
222
222
|
g && "ff-opacity-50 ff-cursor-not-allowed"
|
|
@@ -224,10 +224,10 @@ const st = O("Pen", [
|
|
|
224
224
|
children: [
|
|
225
225
|
/* @__PURE__ */ p("input", { ...f() }),
|
|
226
226
|
/* @__PURE__ */ w("div", { className: "ff-flex ff-flex-col ff-items-center ff-gap-3", children: [
|
|
227
|
-
/* @__PURE__ */ p("div", { className:
|
|
227
|
+
/* @__PURE__ */ p("div", { className: L(
|
|
228
228
|
"ff-p-3 ff-rounded-full",
|
|
229
229
|
s ? "ff-bg-primary-100" : "ff-bg-gray-100"
|
|
230
|
-
), children: /* @__PURE__ */ p(
|
|
230
|
+
), children: /* @__PURE__ */ p(Oe, { className: L(
|
|
231
231
|
"ff-w-8 ff-h-8",
|
|
232
232
|
s ? "ff-text-primary-600" : "ff-text-gray-400"
|
|
233
233
|
) }) }),
|
|
@@ -250,11 +250,11 @@ const st = O("Pen", [
|
|
|
250
250
|
}
|
|
251
251
|
),
|
|
252
252
|
a && /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2 ff-p-3 ff-bg-error-50 ff-text-error-700 ff-rounded-lg", children: [
|
|
253
|
-
/* @__PURE__ */ p(
|
|
253
|
+
/* @__PURE__ */ p(ye, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
|
|
254
254
|
/* @__PURE__ */ p("p", { className: "ff-text-sm", children: a })
|
|
255
255
|
] })
|
|
256
256
|
] });
|
|
257
|
-
},
|
|
257
|
+
}, wt = ({ onMappingChange: e }) => {
|
|
258
258
|
const { mappings: r, schema: t, unmappedSource: n, updateMapping: o } = X(), i = (t == null ? void 0 : t.columns) || [], l = (c, f) => {
|
|
259
259
|
const s = f === "" ? null : f;
|
|
260
260
|
o(c, s), e == null || e(c, s);
|
|
@@ -288,7 +288,7 @@ const st = O("Pen", [
|
|
|
288
288
|
return /* @__PURE__ */ w(
|
|
289
289
|
"div",
|
|
290
290
|
{
|
|
291
|
-
className:
|
|
291
|
+
className: L(
|
|
292
292
|
"ff-mapping-row",
|
|
293
293
|
f && s && "ff-border-success-200 ff-bg-success-50/50",
|
|
294
294
|
f && !s && "ff-border-warning-200 ff-bg-warning-50/50",
|
|
@@ -296,13 +296,13 @@ const st = O("Pen", [
|
|
|
296
296
|
),
|
|
297
297
|
children: [
|
|
298
298
|
/* @__PURE__ */ p("div", { className: "ff-flex-1", children: /* @__PURE__ */ p("div", { className: "ff-mapping-source", children: c.sourceColumn }) }),
|
|
299
|
-
/* @__PURE__ */ p("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ p(
|
|
299
|
+
/* @__PURE__ */ p("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ p(st, { className: "ff-w-5 ff-h-5" }) }),
|
|
300
300
|
/* @__PURE__ */ p("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ w(
|
|
301
301
|
"select",
|
|
302
302
|
{
|
|
303
303
|
value: c.targetKey || "",
|
|
304
304
|
onChange: (m) => l(c.sourceColumn, m.target.value),
|
|
305
|
-
className:
|
|
305
|
+
className: L(
|
|
306
306
|
"ff-input",
|
|
307
307
|
!f && "ff-border-gray-300",
|
|
308
308
|
f && s && "ff-border-success-300 ff-bg-success-50",
|
|
@@ -328,8 +328,8 @@ const st = O("Pen", [
|
|
|
328
328
|
]
|
|
329
329
|
}
|
|
330
330
|
) }),
|
|
331
|
-
/* @__PURE__ */ p("div", { className: "ff-w-8 ff-flex ff-justify-center", children: f ? s ? /* @__PURE__ */ p(
|
|
332
|
-
c.confidence > 0 && /* @__PURE__ */ w("div", { className:
|
|
331
|
+
/* @__PURE__ */ p("div", { className: "ff-w-8 ff-flex ff-justify-center", children: f ? s ? /* @__PURE__ */ p(ut, { className: "ff-w-5 ff-h-5 ff-text-success-600" }) : /* @__PURE__ */ p(pt, { className: "ff-w-5 ff-h-5 ff-text-warning-600" }) : /* @__PURE__ */ p("span", { className: "ff-w-5 ff-h-5" }) }),
|
|
332
|
+
c.confidence > 0 && /* @__PURE__ */ w("div", { className: L("ff-confidence", a(c.confidence)), children: [
|
|
333
333
|
/* @__PURE__ */ w("span", { children: [
|
|
334
334
|
Math.round(c.confidence * 100),
|
|
335
335
|
"%"
|
|
@@ -350,7 +350,7 @@ const st = O("Pen", [
|
|
|
350
350
|
(f) => f.required && !d.has(f.key)
|
|
351
351
|
);
|
|
352
352
|
return c.length > 0 ? /* @__PURE__ */ w("div", { className: "ff-flex ff-items-start ff-gap-2 ff-p-3 ff-bg-warning-50 ff-border ff-border-warning-200 ff-rounded-lg", children: [
|
|
353
|
-
/* @__PURE__ */ p(
|
|
353
|
+
/* @__PURE__ */ p(ye, { className: "ff-w-5 ff-h-5 ff-text-warning-600 ff-flex-shrink-0 ff-mt-0.5" }),
|
|
354
354
|
/* @__PURE__ */ w("div", { children: [
|
|
355
355
|
/* @__PURE__ */ p("p", { className: "ff-text-sm ff-font-medium ff-text-warning-800", children: "Required fields not mapped" }),
|
|
356
356
|
/* @__PURE__ */ p("p", { className: "ff-text-sm ff-text-warning-700 ff-mt-1", children: c.map((f) => f.label).join(", ") })
|
|
@@ -369,7 +369,7 @@ const st = O("Pen", [
|
|
|
369
369
|
*
|
|
370
370
|
* @license MIT
|
|
371
371
|
*/
|
|
372
|
-
function
|
|
372
|
+
function St() {
|
|
373
373
|
return {
|
|
374
374
|
accessor: (e, r) => typeof e == "function" ? {
|
|
375
375
|
...r,
|
|
@@ -385,7 +385,7 @@ function ft() {
|
|
|
385
385
|
function T(e, r) {
|
|
386
386
|
return typeof e == "function" ? e(r) : e;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function A(e, r) {
|
|
389
389
|
return (t) => {
|
|
390
390
|
r.setState((n) => ({
|
|
391
391
|
...n,
|
|
@@ -393,13 +393,13 @@ function H(e, r) {
|
|
|
393
393
|
}));
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function re(e) {
|
|
397
397
|
return e instanceof Function;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function Ct(e) {
|
|
400
400
|
return Array.isArray(e) && e.every((r) => typeof r == "number");
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function vt(e, r) {
|
|
403
403
|
const t = [], n = (o) => {
|
|
404
404
|
o.forEach((i) => {
|
|
405
405
|
t.push(i);
|
|
@@ -443,7 +443,7 @@ function v(e, r, t, n) {
|
|
|
443
443
|
onChange: n
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Rt(e, r, t, n) {
|
|
447
447
|
const o = () => {
|
|
448
448
|
var l;
|
|
449
449
|
return (l = i.getValue()) != null ? l : e.options.renderFallbackValue;
|
|
@@ -466,7 +466,7 @@ function ct(e, r, t, n) {
|
|
|
466
466
|
l.createCell == null || l.createCell(i, t, r, e);
|
|
467
467
|
}, {}), i;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function xt(e, r, t, n) {
|
|
470
470
|
var o, i;
|
|
471
471
|
const a = {
|
|
472
472
|
...e._getDefaultColumnDef(),
|
|
@@ -507,7 +507,7 @@ function pt(e, r, t, n) {
|
|
|
507
507
|
return c;
|
|
508
508
|
}
|
|
509
509
|
const D = "debugHeaders";
|
|
510
|
-
function
|
|
510
|
+
function Ge(e, r, t) {
|
|
511
511
|
var n;
|
|
512
512
|
let i = {
|
|
513
513
|
id: (n = t.id) != null ? n : r.id,
|
|
@@ -536,20 +536,20 @@ function Ne(e, r, t) {
|
|
|
536
536
|
l.createHeader == null || l.createHeader(i, e);
|
|
537
537
|
}), i;
|
|
538
538
|
}
|
|
539
|
-
const
|
|
539
|
+
const yt = {
|
|
540
540
|
createTable: (e) => {
|
|
541
541
|
e.getHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (r, t, n, o) => {
|
|
542
542
|
var i, l;
|
|
543
543
|
const a = (i = n == null ? void 0 : n.map((c) => t.find((f) => f.id === c)).filter(Boolean)) != null ? i : [], u = (l = o == null ? void 0 : o.map((c) => t.find((f) => f.id === c)).filter(Boolean)) != null ? l : [], g = t.filter((c) => !(n != null && n.includes(c.id)) && !(o != null && o.includes(c.id)));
|
|
544
|
-
return
|
|
545
|
-
}, v(e.options, D, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (r, t, n, o) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(o != null && o.includes(i.id))),
|
|
544
|
+
return Q(r, [...a, ...g, ...u], e);
|
|
545
|
+
}, v(e.options, D, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (r, t, n, o) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(o != null && o.includes(i.id))), Q(r, t, e, "center")), v(e.options, D, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (r, t, n) => {
|
|
546
546
|
var o;
|
|
547
547
|
const i = (o = n == null ? void 0 : n.map((l) => t.find((a) => a.id === l)).filter(Boolean)) != null ? o : [];
|
|
548
|
-
return
|
|
548
|
+
return Q(r, i, e, "left");
|
|
549
549
|
}, v(e.options, D, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (r, t, n) => {
|
|
550
550
|
var o;
|
|
551
551
|
const i = (o = n == null ? void 0 : n.map((l) => t.find((a) => a.id === l)).filter(Boolean)) != null ? o : [];
|
|
552
|
-
return
|
|
552
|
+
return Q(r, i, e, "right");
|
|
553
553
|
}, v(e.options, D, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (r) => [...r].reverse(), v(e.options, D, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (r) => [...r].reverse(), v(e.options, D, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (r) => [...r].reverse(), v(e.options, D, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (r) => [...r].reverse(), v(e.options, D, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (r) => r.map((t) => t.headers).flat(), v(e.options, D, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (r) => r.map((t) => t.headers).flat(), v(e.options, D, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (r) => r.map((t) => t.headers).flat(), v(e.options, D, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (r) => r.map((t) => t.headers).flat(), v(e.options, D, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (r) => r.filter((t) => {
|
|
554
554
|
var n;
|
|
555
555
|
return !((n = t.subHeaders) != null && n.length);
|
|
@@ -565,7 +565,7 @@ const mt = {
|
|
|
565
565
|
}, v(e.options, D, "getLeafHeaders"));
|
|
566
566
|
}
|
|
567
567
|
};
|
|
568
|
-
function
|
|
568
|
+
function Q(e, r, t, n) {
|
|
569
569
|
var o, i;
|
|
570
570
|
let l = 0;
|
|
571
571
|
const a = function(f, s) {
|
|
@@ -583,15 +583,15 @@ function J(e, r, t, n) {
|
|
|
583
583
|
headers: []
|
|
584
584
|
}, h = [];
|
|
585
585
|
f.forEach((S) => {
|
|
586
|
-
const R = [...h].reverse()[0],
|
|
587
|
-
let $,
|
|
588
|
-
if (
|
|
586
|
+
const R = [...h].reverse()[0], _ = S.column.depth === m.depth;
|
|
587
|
+
let $, E = !1;
|
|
588
|
+
if (_ && S.column.parent ? $ = S.column.parent : ($ = S.column, E = !0), R && (R == null ? void 0 : R.column) === $)
|
|
589
589
|
R.subHeaders.push(S);
|
|
590
590
|
else {
|
|
591
|
-
const I =
|
|
591
|
+
const I = Ge(t, $, {
|
|
592
592
|
id: [n, s, $.id, S == null ? void 0 : S.id].filter(Boolean).join("_"),
|
|
593
|
-
isPlaceholder:
|
|
594
|
-
placeholderId:
|
|
593
|
+
isPlaceholder: E,
|
|
594
|
+
placeholderId: E ? `${h.filter((P) => P.column === $).length}` : void 0,
|
|
595
595
|
depth: s,
|
|
596
596
|
index: h.length
|
|
597
597
|
});
|
|
@@ -599,7 +599,7 @@ function J(e, r, t, n) {
|
|
|
599
599
|
}
|
|
600
600
|
m.headers.push(S), S.headerGroup = m;
|
|
601
601
|
}), u.push(m), s > 0 && g(h, s - 1);
|
|
602
|
-
}, d = r.map((f, s) =>
|
|
602
|
+
}, d = r.map((f, s) => Ge(t, f, {
|
|
603
603
|
depth: l,
|
|
604
604
|
index: s
|
|
605
605
|
}));
|
|
@@ -608,20 +608,20 @@ function J(e, r, t, n) {
|
|
|
608
608
|
let h = 0, S = 0, R = [0];
|
|
609
609
|
m.subHeaders && m.subHeaders.length ? (R = [], c(m.subHeaders).forEach(($) => {
|
|
610
610
|
let {
|
|
611
|
-
colSpan:
|
|
611
|
+
colSpan: E,
|
|
612
612
|
rowSpan: I
|
|
613
613
|
} = $;
|
|
614
|
-
h +=
|
|
614
|
+
h += E, R.push(I);
|
|
615
615
|
})) : h = 1;
|
|
616
|
-
const
|
|
617
|
-
return S = S +
|
|
616
|
+
const _ = Math.min(...R);
|
|
617
|
+
return S = S + _, m.colSpan = h, m.rowSpan = S, {
|
|
618
618
|
colSpan: h,
|
|
619
619
|
rowSpan: S
|
|
620
620
|
};
|
|
621
621
|
});
|
|
622
622
|
return c((o = (i = u[0]) == null ? void 0 : i.headers) != null ? o : []), u;
|
|
623
623
|
}
|
|
624
|
-
const
|
|
624
|
+
const _e = (e, r, t, n, o, i, l) => {
|
|
625
625
|
let a = {
|
|
626
626
|
id: r,
|
|
627
627
|
index: n,
|
|
@@ -649,7 +649,7 @@ const ye = (e, r, t, n, o, i, l) => {
|
|
|
649
649
|
return (g = a.getValue(u)) != null ? g : e.options.renderFallbackValue;
|
|
650
650
|
},
|
|
651
651
|
subRows: [],
|
|
652
|
-
getLeafRows: () =>
|
|
652
|
+
getLeafRows: () => vt(a.subRows, (u) => u.subRows),
|
|
653
653
|
getParentRow: () => a.parentId ? e.getRow(a.parentId, !0) : void 0,
|
|
654
654
|
getParentRows: () => {
|
|
655
655
|
let u = [], g = a;
|
|
@@ -660,7 +660,7 @@ const ye = (e, r, t, n, o, i, l) => {
|
|
|
660
660
|
}
|
|
661
661
|
return u.reverse();
|
|
662
662
|
},
|
|
663
|
-
getAllCells: C(() => [e.getAllLeafColumns()], (u) => u.map((g) =>
|
|
663
|
+
getAllCells: C(() => [e.getAllLeafColumns()], (u) => u.map((g) => Rt(e, a, g, g.id)), v(e.options, "debugRows", "getAllCells")),
|
|
664
664
|
_getAllCellsByColumnId: C(() => [a.getAllCells()], (u) => u.reduce((g, d) => (g[d.column.id] = d, g), {}), v(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
665
665
|
};
|
|
666
666
|
for (let u = 0; u < e._features.length; u++) {
|
|
@@ -668,54 +668,54 @@ const ye = (e, r, t, n, o, i, l) => {
|
|
|
668
668
|
g == null || g.createRow == null || g.createRow(a, e);
|
|
669
669
|
}
|
|
670
670
|
return a;
|
|
671
|
-
},
|
|
671
|
+
}, _t = {
|
|
672
672
|
createColumn: (e, r) => {
|
|
673
673
|
e._getFacetedRowModel = r.options.getFacetedRowModel && r.options.getFacetedRowModel(r, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : r.getPreFilteredRowModel(), e._getFacetedUniqueValues = r.options.getFacetedUniqueValues && r.options.getFacetedUniqueValues(r, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = r.options.getFacetedMinMaxValues && r.options.getFacetedMinMaxValues(r, e.id), e.getFacetedMinMaxValues = () => {
|
|
674
674
|
if (e._getFacetedMinMaxValues)
|
|
675
675
|
return e._getFacetedMinMaxValues();
|
|
676
676
|
};
|
|
677
677
|
}
|
|
678
|
-
},
|
|
678
|
+
}, Be = (e, r, t) => {
|
|
679
679
|
var n, o;
|
|
680
680
|
const i = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
681
681
|
return !!(!((o = e.getValue(r)) == null || (o = o.toString()) == null || (o = o.toLowerCase()) == null) && o.includes(i));
|
|
682
682
|
};
|
|
683
|
-
|
|
684
|
-
const
|
|
683
|
+
Be.autoRemove = (e) => z(e);
|
|
684
|
+
const Te = (e, r, t) => {
|
|
685
685
|
var n;
|
|
686
686
|
return !!(!((n = e.getValue(r)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
687
687
|
};
|
|
688
|
-
|
|
689
|
-
const
|
|
688
|
+
Te.autoRemove = (e) => z(e);
|
|
689
|
+
const je = (e, r, t) => {
|
|
690
690
|
var n;
|
|
691
691
|
return ((n = e.getValue(r)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
692
692
|
};
|
|
693
|
-
|
|
694
|
-
const
|
|
693
|
+
je.autoRemove = (e) => z(e);
|
|
694
|
+
const qe = (e, r, t) => {
|
|
695
695
|
var n;
|
|
696
696
|
return (n = e.getValue(r)) == null ? void 0 : n.includes(t);
|
|
697
697
|
};
|
|
698
|
-
|
|
699
|
-
const
|
|
698
|
+
qe.autoRemove = (e) => z(e);
|
|
699
|
+
const Ke = (e, r, t) => !t.some((n) => {
|
|
700
700
|
var o;
|
|
701
701
|
return !((o = e.getValue(r)) != null && o.includes(n));
|
|
702
702
|
});
|
|
703
|
-
|
|
704
|
-
const
|
|
703
|
+
Ke.autoRemove = (e) => z(e) || !(e != null && e.length);
|
|
704
|
+
const Ue = (e, r, t) => t.some((n) => {
|
|
705
705
|
var o;
|
|
706
706
|
return (o = e.getValue(r)) == null ? void 0 : o.includes(n);
|
|
707
707
|
});
|
|
708
|
-
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
-
const
|
|
708
|
+
Ue.autoRemove = (e) => z(e) || !(e != null && e.length);
|
|
709
|
+
const Xe = (e, r, t) => e.getValue(r) === t;
|
|
710
|
+
Xe.autoRemove = (e) => z(e);
|
|
711
|
+
const We = (e, r, t) => e.getValue(r) == t;
|
|
712
|
+
We.autoRemove = (e) => z(e);
|
|
713
|
+
const Fe = (e, r, t) => {
|
|
714
714
|
let [n, o] = t;
|
|
715
715
|
const i = e.getValue(r);
|
|
716
716
|
return i >= n && i <= o;
|
|
717
717
|
};
|
|
718
|
-
|
|
718
|
+
Fe.resolveFilterValue = (e) => {
|
|
719
719
|
let [r, t] = e, n = typeof r != "number" ? parseFloat(r) : r, o = typeof t != "number" ? parseFloat(t) : t, i = r === null || Number.isNaN(n) ? -1 / 0 : n, l = t === null || Number.isNaN(o) ? 1 / 0 : o;
|
|
720
720
|
if (i > l) {
|
|
721
721
|
const a = i;
|
|
@@ -723,22 +723,22 @@ _e.resolveFilterValue = (e) => {
|
|
|
723
723
|
}
|
|
724
724
|
return [i, l];
|
|
725
725
|
};
|
|
726
|
-
|
|
726
|
+
Fe.autoRemove = (e) => z(e) || z(e[0]) && z(e[1]);
|
|
727
727
|
const k = {
|
|
728
|
-
includesString:
|
|
729
|
-
includesStringSensitive:
|
|
730
|
-
equalsString:
|
|
731
|
-
arrIncludes:
|
|
732
|
-
arrIncludesAll:
|
|
733
|
-
arrIncludesSome:
|
|
734
|
-
equals:
|
|
735
|
-
weakEquals:
|
|
736
|
-
inNumberRange:
|
|
728
|
+
includesString: Be,
|
|
729
|
+
includesStringSensitive: Te,
|
|
730
|
+
equalsString: je,
|
|
731
|
+
arrIncludes: qe,
|
|
732
|
+
arrIncludesAll: Ke,
|
|
733
|
+
arrIncludesSome: Ue,
|
|
734
|
+
equals: Xe,
|
|
735
|
+
weakEquals: We,
|
|
736
|
+
inNumberRange: Fe
|
|
737
737
|
};
|
|
738
|
-
function
|
|
738
|
+
function z(e) {
|
|
739
739
|
return e == null || e === "";
|
|
740
740
|
}
|
|
741
|
-
const
|
|
741
|
+
const Ft = {
|
|
742
742
|
getDefaultColumnDef: () => ({
|
|
743
743
|
filterFn: "auto"
|
|
744
744
|
}),
|
|
@@ -747,7 +747,7 @@ const wt = {
|
|
|
747
747
|
...e
|
|
748
748
|
}),
|
|
749
749
|
getDefaultOptions: (e) => ({
|
|
750
|
-
onColumnFiltersChange:
|
|
750
|
+
onColumnFiltersChange: A("columnFilters", e),
|
|
751
751
|
filterFromLeafRows: !1,
|
|
752
752
|
maxLeafRowFilterDepth: 100
|
|
753
753
|
}),
|
|
@@ -757,7 +757,7 @@ const wt = {
|
|
|
757
757
|
return typeof n == "string" ? k.includesString : typeof n == "number" ? k.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? k.equals : Array.isArray(n) ? k.arrIncludes : k.weakEquals;
|
|
758
758
|
}, e.getFilterFn = () => {
|
|
759
759
|
var t, n;
|
|
760
|
-
return
|
|
760
|
+
return re(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
761
761
|
// @ts-ignore
|
|
762
762
|
(t = (n = r.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : k[e.columnDef.filterFn]
|
|
763
763
|
);
|
|
@@ -773,7 +773,7 @@ const wt = {
|
|
|
773
773
|
}, e.setFilterValue = (t) => {
|
|
774
774
|
r.setColumnFilters((n) => {
|
|
775
775
|
const o = e.getFilterFn(), i = n == null ? void 0 : n.find((d) => d.id === e.id), l = T(t, i ? i.value : void 0);
|
|
776
|
-
if (
|
|
776
|
+
if (Ae(o, l, e)) {
|
|
777
777
|
var a;
|
|
778
778
|
return (a = n == null ? void 0 : n.filter((d) => d.id !== e.id)) != null ? a : [];
|
|
779
779
|
}
|
|
@@ -800,7 +800,7 @@ const wt = {
|
|
|
800
800
|
const a = t.find((u) => u.id === l.id);
|
|
801
801
|
if (a) {
|
|
802
802
|
const u = a.getFilterFn();
|
|
803
|
-
if (
|
|
803
|
+
if (Ae(u, l.value, a))
|
|
804
804
|
return !1;
|
|
805
805
|
}
|
|
806
806
|
return !0;
|
|
@@ -813,57 +813,57 @@ const wt = {
|
|
|
813
813
|
}, 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());
|
|
814
814
|
}
|
|
815
815
|
};
|
|
816
|
-
function
|
|
816
|
+
function Ae(e, r, t) {
|
|
817
817
|
return (e && e.autoRemove ? e.autoRemove(r, t) : !1) || typeof r > "u" || typeof r == "string" && !r;
|
|
818
818
|
}
|
|
819
|
-
const
|
|
819
|
+
const $t = (e, r, t) => t.reduce((n, o) => {
|
|
820
820
|
const i = o.getValue(e);
|
|
821
821
|
return n + (typeof i == "number" ? i : 0);
|
|
822
|
-
}, 0),
|
|
822
|
+
}, 0), It = (e, r, t) => {
|
|
823
823
|
let n;
|
|
824
824
|
return t.forEach((o) => {
|
|
825
825
|
const i = o.getValue(e);
|
|
826
826
|
i != null && (n > i || n === void 0 && i >= i) && (n = i);
|
|
827
827
|
}), n;
|
|
828
|
-
},
|
|
828
|
+
}, Mt = (e, r, t) => {
|
|
829
829
|
let n;
|
|
830
830
|
return t.forEach((o) => {
|
|
831
831
|
const i = o.getValue(e);
|
|
832
832
|
i != null && (n < i || n === void 0 && i >= i) && (n = i);
|
|
833
833
|
}), n;
|
|
834
|
-
},
|
|
834
|
+
}, Vt = (e, r, t) => {
|
|
835
835
|
let n, o;
|
|
836
836
|
return t.forEach((i) => {
|
|
837
837
|
const l = i.getValue(e);
|
|
838
838
|
l != null && (n === void 0 ? l >= l && (n = o = l) : (n > l && (n = l), o < l && (o = l)));
|
|
839
839
|
}), [n, o];
|
|
840
|
-
},
|
|
840
|
+
}, Pt = (e, r) => {
|
|
841
841
|
let t = 0, n = 0;
|
|
842
842
|
if (r.forEach((o) => {
|
|
843
843
|
let i = o.getValue(e);
|
|
844
844
|
i != null && (i = +i) >= i && (++t, n += i);
|
|
845
845
|
}), t) return n / t;
|
|
846
|
-
},
|
|
846
|
+
}, Nt = (e, r) => {
|
|
847
847
|
if (!r.length)
|
|
848
848
|
return;
|
|
849
849
|
const t = r.map((i) => i.getValue(e));
|
|
850
|
-
if (!
|
|
850
|
+
if (!Ct(t))
|
|
851
851
|
return;
|
|
852
852
|
if (t.length === 1)
|
|
853
853
|
return t[0];
|
|
854
854
|
const n = Math.floor(t.length / 2), o = t.sort((i, l) => i - l);
|
|
855
855
|
return t.length % 2 !== 0 ? o[n] : (o[n - 1] + o[n]) / 2;
|
|
856
|
-
},
|
|
857
|
-
sum:
|
|
858
|
-
min:
|
|
859
|
-
max:
|
|
860
|
-
extent:
|
|
861
|
-
mean:
|
|
862
|
-
median:
|
|
863
|
-
unique:
|
|
864
|
-
uniqueCount:
|
|
865
|
-
count:
|
|
866
|
-
},
|
|
856
|
+
}, Dt = (e, r) => Array.from(new Set(r.map((t) => t.getValue(e))).values()), Lt = (e, r) => new Set(r.map((t) => t.getValue(e))).size, Et = (e, r) => r.length, le = {
|
|
857
|
+
sum: $t,
|
|
858
|
+
min: It,
|
|
859
|
+
max: Mt,
|
|
860
|
+
extent: Vt,
|
|
861
|
+
mean: Pt,
|
|
862
|
+
median: Nt,
|
|
863
|
+
unique: Dt,
|
|
864
|
+
uniqueCount: Lt,
|
|
865
|
+
count: Et
|
|
866
|
+
}, Ht = {
|
|
867
867
|
getDefaultColumnDef: () => ({
|
|
868
868
|
aggregatedCell: (e) => {
|
|
869
869
|
var r, t;
|
|
@@ -876,7 +876,7 @@ const St = (e, r, t) => t.reduce((n, o) => {
|
|
|
876
876
|
...e
|
|
877
877
|
}),
|
|
878
878
|
getDefaultOptions: (e) => ({
|
|
879
|
-
onGroupingChange:
|
|
879
|
+
onGroupingChange: A("grouping", e),
|
|
880
880
|
groupedColumnMode: "reorder"
|
|
881
881
|
}),
|
|
882
882
|
createColumn: (e, r) => {
|
|
@@ -899,14 +899,14 @@ const St = (e, r, t) => t.reduce((n, o) => {
|
|
|
899
899
|
}, e.getAutoAggregationFn = () => {
|
|
900
900
|
const t = r.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
|
|
901
901
|
if (typeof n == "number")
|
|
902
|
-
return
|
|
902
|
+
return le.sum;
|
|
903
903
|
if (Object.prototype.toString.call(n) === "[object Date]")
|
|
904
|
-
return
|
|
904
|
+
return le.extent;
|
|
905
905
|
}, e.getAggregationFn = () => {
|
|
906
906
|
var t, n;
|
|
907
907
|
if (!e)
|
|
908
908
|
throw new Error();
|
|
909
|
-
return
|
|
909
|
+
return re(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = r.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : le[e.columnDef.aggregationFn];
|
|
910
910
|
};
|
|
911
911
|
},
|
|
912
912
|
createTable: (e) => {
|
|
@@ -930,27 +930,27 @@ const St = (e, r, t) => t.reduce((n, o) => {
|
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
932
|
};
|
|
933
|
-
function
|
|
933
|
+
function Gt(e, r, t) {
|
|
934
934
|
if (!(r != null && r.length) || !t)
|
|
935
935
|
return e;
|
|
936
936
|
const n = e.filter((i) => !r.includes(i.id));
|
|
937
937
|
return t === "remove" ? n : [...r.map((i) => e.find((l) => l.id === i)).filter(Boolean), ...n];
|
|
938
938
|
}
|
|
939
|
-
const
|
|
939
|
+
const At = {
|
|
940
940
|
getInitialState: (e) => ({
|
|
941
941
|
columnOrder: [],
|
|
942
942
|
...e
|
|
943
943
|
}),
|
|
944
944
|
getDefaultOptions: (e) => ({
|
|
945
|
-
onColumnOrderChange:
|
|
945
|
+
onColumnOrderChange: A("columnOrder", e)
|
|
946
946
|
}),
|
|
947
947
|
createColumn: (e, r) => {
|
|
948
|
-
e.getIndex = C((t) => [
|
|
948
|
+
e.getIndex = C((t) => [J(r, t)], (t) => t.findIndex((n) => n.id === e.id), v(r.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
949
949
|
var n;
|
|
950
|
-
return ((n =
|
|
950
|
+
return ((n = J(r, t)[0]) == null ? void 0 : n.id) === e.id;
|
|
951
951
|
}, e.getIsLastColumn = (t) => {
|
|
952
952
|
var n;
|
|
953
|
-
const o =
|
|
953
|
+
const o = J(r, t);
|
|
954
954
|
return ((n = o[o.length - 1]) == null ? void 0 : n.id) === e.id;
|
|
955
955
|
};
|
|
956
956
|
},
|
|
@@ -970,19 +970,19 @@ const Vt = {
|
|
|
970
970
|
}
|
|
971
971
|
i = [...i, ...a];
|
|
972
972
|
}
|
|
973
|
-
return
|
|
973
|
+
return Gt(i, t, n);
|
|
974
974
|
}, v(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
975
975
|
}
|
|
976
|
-
},
|
|
976
|
+
}, se = () => ({
|
|
977
977
|
left: [],
|
|
978
978
|
right: []
|
|
979
|
-
}),
|
|
979
|
+
}), zt = {
|
|
980
980
|
getInitialState: (e) => ({
|
|
981
|
-
columnPinning:
|
|
981
|
+
columnPinning: se(),
|
|
982
982
|
...e
|
|
983
983
|
}),
|
|
984
984
|
getDefaultOptions: (e) => ({
|
|
985
|
-
onColumnPinningChange:
|
|
985
|
+
onColumnPinningChange: A("columnPinning", e)
|
|
986
986
|
}),
|
|
987
987
|
createColumn: (e, r) => {
|
|
988
988
|
e.pin = (t) => {
|
|
@@ -1038,7 +1038,7 @@ const Vt = {
|
|
|
1038
1038
|
createTable: (e) => {
|
|
1039
1039
|
e.setColumnPinning = (r) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(r), e.resetColumnPinning = (r) => {
|
|
1040
1040
|
var t, n;
|
|
1041
|
-
return e.setColumnPinning(r ?
|
|
1041
|
+
return e.setColumnPinning(r ? se() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : se());
|
|
1042
1042
|
}, e.getIsSomeColumnsPinned = (r) => {
|
|
1043
1043
|
var t;
|
|
1044
1044
|
const n = e.getState().columnPinning;
|
|
@@ -1053,39 +1053,39 @@ const Vt = {
|
|
|
1053
1053
|
}, v(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
1054
1054
|
}
|
|
1055
1055
|
};
|
|
1056
|
-
function
|
|
1056
|
+
function kt(e) {
|
|
1057
1057
|
return e || (typeof document < "u" ? document : null);
|
|
1058
1058
|
}
|
|
1059
|
-
const
|
|
1059
|
+
const ee = {
|
|
1060
1060
|
size: 150,
|
|
1061
1061
|
minSize: 20,
|
|
1062
1062
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
1063
|
-
},
|
|
1063
|
+
}, ae = () => ({
|
|
1064
1064
|
startOffset: null,
|
|
1065
1065
|
startSize: null,
|
|
1066
1066
|
deltaOffset: null,
|
|
1067
1067
|
deltaPercentage: null,
|
|
1068
1068
|
isResizingColumn: !1,
|
|
1069
1069
|
columnSizingStart: []
|
|
1070
|
-
}),
|
|
1071
|
-
getDefaultColumnDef: () =>
|
|
1070
|
+
}), bt = {
|
|
1071
|
+
getDefaultColumnDef: () => ee,
|
|
1072
1072
|
getInitialState: (e) => ({
|
|
1073
1073
|
columnSizing: {},
|
|
1074
|
-
columnSizingInfo:
|
|
1074
|
+
columnSizingInfo: ae(),
|
|
1075
1075
|
...e
|
|
1076
1076
|
}),
|
|
1077
1077
|
getDefaultOptions: (e) => ({
|
|
1078
1078
|
columnResizeMode: "onEnd",
|
|
1079
1079
|
columnResizeDirection: "ltr",
|
|
1080
|
-
onColumnSizingChange:
|
|
1081
|
-
onColumnSizingInfoChange:
|
|
1080
|
+
onColumnSizingChange: A("columnSizing", e),
|
|
1081
|
+
onColumnSizingInfoChange: A("columnSizingInfo", e)
|
|
1082
1082
|
}),
|
|
1083
1083
|
createColumn: (e, r) => {
|
|
1084
1084
|
e.getSize = () => {
|
|
1085
1085
|
var t, n, o;
|
|
1086
1086
|
const i = r.getState().columnSizing[e.id];
|
|
1087
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
1088
|
-
}, e.getStart = C((t) => [t,
|
|
1087
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ee.minSize, (n = i ?? e.columnDef.size) != null ? n : ee.size), (o = e.columnDef.maxSize) != null ? o : ee.maxSize);
|
|
1088
|
+
}, e.getStart = C((t) => [t, J(r, t), r.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((o, i) => o + i.getSize(), 0), v(r.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, J(r, t), r.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((o, i) => o + i.getSize(), 0), v(r.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
1089
1089
|
r.setColumnSizing((t) => {
|
|
1090
1090
|
let {
|
|
1091
1091
|
[e.id]: n,
|
|
@@ -1119,27 +1119,27 @@ const Q = {
|
|
|
1119
1119
|
}, e.getResizeHandler = (t) => {
|
|
1120
1120
|
const n = r.getColumn(e.column.id), o = n == null ? void 0 : n.getCanResize();
|
|
1121
1121
|
return (i) => {
|
|
1122
|
-
if (!n || !o || (i.persist == null || i.persist(),
|
|
1122
|
+
if (!n || !o || (i.persist == null || i.persist(), ue(i) && i.touches && i.touches.length > 1))
|
|
1123
1123
|
return;
|
|
1124
|
-
const l = e.getSize(), a = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u =
|
|
1125
|
-
typeof
|
|
1126
|
-
var
|
|
1127
|
-
const
|
|
1128
|
-
return $.columnSizingStart.forEach((
|
|
1129
|
-
let [
|
|
1130
|
-
g[
|
|
1124
|
+
const l = e.getSize(), a = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u = ue(i) ? Math.round(i.touches[0].clientX) : i.clientX, g = {}, d = (R, _) => {
|
|
1125
|
+
typeof _ == "number" && (r.setColumnSizingInfo(($) => {
|
|
1126
|
+
var E, I;
|
|
1127
|
+
const P = r.options.columnResizeDirection === "rtl" ? -1 : 1, q = (_ - ((E = $ == null ? void 0 : $.startOffset) != null ? E : 0)) * P, N = Math.max(q / ((I = $ == null ? void 0 : $.startSize) != null ? I : 0), -0.999999);
|
|
1128
|
+
return $.columnSizingStart.forEach((x) => {
|
|
1129
|
+
let [y, V] = x;
|
|
1130
|
+
g[y] = Math.round(Math.max(V + V * N, 0) * 100) / 100;
|
|
1131
1131
|
}), {
|
|
1132
1132
|
...$,
|
|
1133
|
-
deltaOffset:
|
|
1134
|
-
deltaPercentage:
|
|
1133
|
+
deltaOffset: q,
|
|
1134
|
+
deltaPercentage: N
|
|
1135
1135
|
};
|
|
1136
1136
|
}), (r.options.columnResizeMode === "onChange" || R === "end") && r.setColumnSizing(($) => ({
|
|
1137
1137
|
...$,
|
|
1138
1138
|
...g
|
|
1139
1139
|
})));
|
|
1140
1140
|
}, c = (R) => d("move", R), f = (R) => {
|
|
1141
|
-
d("end", R), r.setColumnSizingInfo((
|
|
1142
|
-
...
|
|
1141
|
+
d("end", R), r.setColumnSizingInfo((_) => ({
|
|
1142
|
+
..._,
|
|
1143
1143
|
isResizingColumn: !1,
|
|
1144
1144
|
startOffset: null,
|
|
1145
1145
|
startSize: null,
|
|
@@ -1147,7 +1147,7 @@ const Q = {
|
|
|
1147
1147
|
deltaPercentage: null,
|
|
1148
1148
|
columnSizingStart: []
|
|
1149
1149
|
}));
|
|
1150
|
-
}, s =
|
|
1150
|
+
}, s = kt(t), m = {
|
|
1151
1151
|
moveHandler: (R) => c(R.clientX),
|
|
1152
1152
|
upHandler: (R) => {
|
|
1153
1153
|
s == null || s.removeEventListener("mousemove", m.moveHandler), s == null || s.removeEventListener("mouseup", m.upHandler), f(R.clientX);
|
|
@@ -1155,13 +1155,13 @@ const Q = {
|
|
|
1155
1155
|
}, h = {
|
|
1156
1156
|
moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), c(R.touches[0].clientX), !1),
|
|
1157
1157
|
upHandler: (R) => {
|
|
1158
|
-
var
|
|
1159
|
-
s == null || s.removeEventListener("touchmove", h.moveHandler), s == null || s.removeEventListener("touchend", h.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), f((
|
|
1158
|
+
var _;
|
|
1159
|
+
s == null || s.removeEventListener("touchmove", h.moveHandler), s == null || s.removeEventListener("touchend", h.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), f((_ = R.touches[0]) == null ? void 0 : _.clientX);
|
|
1160
1160
|
}
|
|
1161
|
-
}, S =
|
|
1161
|
+
}, S = Ot() ? {
|
|
1162
1162
|
passive: !1
|
|
1163
1163
|
} : !1;
|
|
1164
|
-
|
|
1164
|
+
ue(i) ? (s == null || s.addEventListener("touchmove", h.moveHandler, S), s == null || s.addEventListener("touchend", h.upHandler, S)) : (s == null || s.addEventListener("mousemove", m.moveHandler, S), s == null || s.addEventListener("mouseup", m.upHandler, S)), r.setColumnSizingInfo((R) => ({
|
|
1165
1165
|
...R,
|
|
1166
1166
|
startOffset: u,
|
|
1167
1167
|
startSize: l,
|
|
@@ -1179,7 +1179,7 @@ const Q = {
|
|
|
1179
1179
|
e.setColumnSizing(r ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
1180
1180
|
}, e.resetHeaderSizeInfo = (r) => {
|
|
1181
1181
|
var t;
|
|
1182
|
-
e.setColumnSizingInfo(r ?
|
|
1182
|
+
e.setColumnSizingInfo(r ? ae() : (t = e.initialState.columnSizingInfo) != null ? t : ae());
|
|
1183
1183
|
}, e.getTotalSize = () => {
|
|
1184
1184
|
var r, t;
|
|
1185
1185
|
return (r = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, o) => n + o.getSize(), 0)) != null ? r : 0;
|
|
@@ -1195,9 +1195,9 @@ const Q = {
|
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
1197
|
};
|
|
1198
|
-
let
|
|
1199
|
-
function
|
|
1200
|
-
if (typeof
|
|
1198
|
+
let te = null;
|
|
1199
|
+
function Ot() {
|
|
1200
|
+
if (typeof te == "boolean") return te;
|
|
1201
1201
|
let e = !1;
|
|
1202
1202
|
try {
|
|
1203
1203
|
const r = {
|
|
@@ -1210,18 +1210,18 @@ function Et() {
|
|
|
1210
1210
|
} catch {
|
|
1211
1211
|
e = !1;
|
|
1212
1212
|
}
|
|
1213
|
-
return
|
|
1213
|
+
return te = e, te;
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function ue(e) {
|
|
1216
1216
|
return e.type === "touchstart";
|
|
1217
1217
|
}
|
|
1218
|
-
const
|
|
1218
|
+
const Bt = {
|
|
1219
1219
|
getInitialState: (e) => ({
|
|
1220
1220
|
columnVisibility: {},
|
|
1221
1221
|
...e
|
|
1222
1222
|
}),
|
|
1223
1223
|
getDefaultOptions: (e) => ({
|
|
1224
|
-
onColumnVisibilityChange:
|
|
1224
|
+
onColumnVisibilityChange: A("columnVisibility", e)
|
|
1225
1225
|
}),
|
|
1226
1226
|
createColumn: (e, r) => {
|
|
1227
1227
|
e.toggleVisibility = (t) => {
|
|
@@ -1260,23 +1260,23 @@ const Lt = {
|
|
|
1260
1260
|
};
|
|
1261
1261
|
}
|
|
1262
1262
|
};
|
|
1263
|
-
function
|
|
1263
|
+
function J(e, r) {
|
|
1264
1264
|
return r ? r === "center" ? e.getCenterVisibleLeafColumns() : r === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
1265
1265
|
}
|
|
1266
|
-
const
|
|
1266
|
+
const Tt = {
|
|
1267
1267
|
createTable: (e) => {
|
|
1268
1268
|
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 = () => {
|
|
1269
1269
|
if (e._getGlobalFacetedMinMaxValues)
|
|
1270
1270
|
return e._getGlobalFacetedMinMaxValues();
|
|
1271
1271
|
};
|
|
1272
1272
|
}
|
|
1273
|
-
},
|
|
1273
|
+
}, jt = {
|
|
1274
1274
|
getInitialState: (e) => ({
|
|
1275
1275
|
globalFilter: void 0,
|
|
1276
1276
|
...e
|
|
1277
1277
|
}),
|
|
1278
1278
|
getDefaultOptions: (e) => ({
|
|
1279
|
-
onGlobalFilterChange:
|
|
1279
|
+
onGlobalFilterChange: A("globalFilter", e),
|
|
1280
1280
|
globalFilterFn: "auto",
|
|
1281
1281
|
getColumnCanGlobalFilter: (r) => {
|
|
1282
1282
|
var t;
|
|
@@ -1296,20 +1296,20 @@ const Ht = {
|
|
|
1296
1296
|
const {
|
|
1297
1297
|
globalFilterFn: n
|
|
1298
1298
|
} = e.options;
|
|
1299
|
-
return
|
|
1299
|
+
return re(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (r = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? r : k[n];
|
|
1300
1300
|
}, e.setGlobalFilter = (r) => {
|
|
1301
1301
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(r);
|
|
1302
1302
|
}, e.resetGlobalFilter = (r) => {
|
|
1303
1303
|
e.setGlobalFilter(r ? void 0 : e.initialState.globalFilter);
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
|
-
},
|
|
1306
|
+
}, qt = {
|
|
1307
1307
|
getInitialState: (e) => ({
|
|
1308
1308
|
expanded: {},
|
|
1309
1309
|
...e
|
|
1310
1310
|
}),
|
|
1311
1311
|
getDefaultOptions: (e) => ({
|
|
1312
|
-
onExpandedChange:
|
|
1312
|
+
onExpandedChange: A("expanded", e),
|
|
1313
1313
|
paginateExpandedRows: !0
|
|
1314
1314
|
}),
|
|
1315
1315
|
createTable: (e) => {
|
|
@@ -1390,19 +1390,19 @@ const Ht = {
|
|
|
1390
1390
|
};
|
|
1391
1391
|
};
|
|
1392
1392
|
}
|
|
1393
|
-
},
|
|
1394
|
-
pageIndex:
|
|
1395
|
-
pageSize:
|
|
1396
|
-
}),
|
|
1393
|
+
}, we = 0, Se = 10, fe = () => ({
|
|
1394
|
+
pageIndex: we,
|
|
1395
|
+
pageSize: Se
|
|
1396
|
+
}), Kt = {
|
|
1397
1397
|
getInitialState: (e) => ({
|
|
1398
1398
|
...e,
|
|
1399
1399
|
pagination: {
|
|
1400
|
-
...
|
|
1400
|
+
...fe(),
|
|
1401
1401
|
...e == null ? void 0 : e.pagination
|
|
1402
1402
|
}
|
|
1403
1403
|
}),
|
|
1404
1404
|
getDefaultOptions: (e) => ({
|
|
1405
|
-
onPaginationChange:
|
|
1405
|
+
onPaginationChange: A("pagination", e)
|
|
1406
1406
|
}),
|
|
1407
1407
|
createTable: (e) => {
|
|
1408
1408
|
let r = !1, t = !1;
|
|
@@ -1425,7 +1425,7 @@ const Ht = {
|
|
|
1425
1425
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(o);
|
|
1426
1426
|
}, e.resetPagination = (n) => {
|
|
1427
1427
|
var o;
|
|
1428
|
-
e.setPagination(n ?
|
|
1428
|
+
e.setPagination(n ? fe() : (o = e.initialState.pagination) != null ? o : fe());
|
|
1429
1429
|
}, e.setPageIndex = (n) => {
|
|
1430
1430
|
e.setPagination((o) => {
|
|
1431
1431
|
let i = T(n, o.pageIndex);
|
|
@@ -1437,10 +1437,10 @@ const Ht = {
|
|
|
1437
1437
|
});
|
|
1438
1438
|
}, e.resetPageIndex = (n) => {
|
|
1439
1439
|
var o, i;
|
|
1440
|
-
e.setPageIndex(n ?
|
|
1440
|
+
e.setPageIndex(n ? we : (o = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? o : we);
|
|
1441
1441
|
}, e.resetPageSize = (n) => {
|
|
1442
1442
|
var o, i;
|
|
1443
|
-
e.setPageSize(n ?
|
|
1443
|
+
e.setPageSize(n ? Se : (o = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? o : Se);
|
|
1444
1444
|
}, e.setPageSize = (n) => {
|
|
1445
1445
|
e.setPagination((o) => {
|
|
1446
1446
|
const i = Math.max(1, T(n, o.pageSize)), l = o.pageSize * o.pageIndex, a = Math.floor(l / i);
|
|
@@ -1473,16 +1473,16 @@ const Ht = {
|
|
|
1473
1473
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
|
1474
1474
|
};
|
|
1475
1475
|
}
|
|
1476
|
-
},
|
|
1476
|
+
}, ge = () => ({
|
|
1477
1477
|
top: [],
|
|
1478
1478
|
bottom: []
|
|
1479
|
-
}),
|
|
1479
|
+
}), Ut = {
|
|
1480
1480
|
getInitialState: (e) => ({
|
|
1481
|
-
rowPinning:
|
|
1481
|
+
rowPinning: ge(),
|
|
1482
1482
|
...e
|
|
1483
1483
|
}),
|
|
1484
1484
|
getDefaultOptions: (e) => ({
|
|
1485
|
-
onRowPinningChange:
|
|
1485
|
+
onRowPinningChange: A("rowPinning", e)
|
|
1486
1486
|
}),
|
|
1487
1487
|
createRow: (e, r) => {
|
|
1488
1488
|
e.pin = (t, n, o) => {
|
|
@@ -1547,7 +1547,7 @@ const Ht = {
|
|
|
1547
1547
|
createTable: (e) => {
|
|
1548
1548
|
e.setRowPinning = (r) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(r), e.resetRowPinning = (r) => {
|
|
1549
1549
|
var t, n;
|
|
1550
|
-
return e.setRowPinning(r ?
|
|
1550
|
+
return e.setRowPinning(r ? ge() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : ge());
|
|
1551
1551
|
}, e.getIsSomeRowsPinned = (r) => {
|
|
1552
1552
|
var t;
|
|
1553
1553
|
const n = e.getState().rowPinning;
|
|
@@ -1577,13 +1577,13 @@ const Ht = {
|
|
|
1577
1577
|
return r.filter((i) => !o.has(i.id));
|
|
1578
1578
|
}, v(e.options, "debugRows", "getCenterRows"));
|
|
1579
1579
|
}
|
|
1580
|
-
},
|
|
1580
|
+
}, Xt = {
|
|
1581
1581
|
getInitialState: (e) => ({
|
|
1582
1582
|
rowSelection: {},
|
|
1583
1583
|
...e
|
|
1584
1584
|
}),
|
|
1585
1585
|
getDefaultOptions: (e) => ({
|
|
1586
|
-
onRowSelectionChange:
|
|
1586
|
+
onRowSelectionChange: A("rowSelection", e),
|
|
1587
1587
|
enableRowSelection: !0,
|
|
1588
1588
|
enableMultiRowSelection: !0,
|
|
1589
1589
|
enableSubRowSelection: !0
|
|
@@ -1612,17 +1612,17 @@ const Ht = {
|
|
|
1612
1612
|
...t
|
|
1613
1613
|
};
|
|
1614
1614
|
return e.getRowModel().rows.forEach((i) => {
|
|
1615
|
-
|
|
1615
|
+
Ce(o, i.id, n, !0, e);
|
|
1616
1616
|
}), o;
|
|
1617
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (r, t) => Object.keys(r).length ?
|
|
1617
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (r, t) => Object.keys(r).length ? de(e, t) : {
|
|
1618
1618
|
rows: [],
|
|
1619
1619
|
flatRows: [],
|
|
1620
1620
|
rowsById: {}
|
|
1621
|
-
}, v(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (r, t) => Object.keys(r).length ?
|
|
1621
|
+
}, v(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (r, t) => Object.keys(r).length ? de(e, t) : {
|
|
1622
1622
|
rows: [],
|
|
1623
1623
|
flatRows: [],
|
|
1624
1624
|
rowsById: {}
|
|
1625
|
-
}, v(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (r, t) => Object.keys(r).length ?
|
|
1625
|
+
}, v(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (r, t) => Object.keys(r).length ? de(e, t) : {
|
|
1626
1626
|
rows: [],
|
|
1627
1627
|
flatRows: [],
|
|
1628
1628
|
rowsById: {}
|
|
@@ -1661,23 +1661,23 @@ const Ht = {
|
|
|
1661
1661
|
const a = {
|
|
1662
1662
|
...i
|
|
1663
1663
|
};
|
|
1664
|
-
return
|
|
1664
|
+
return Ce(a, e.id, t, (l = n == null ? void 0 : n.selectChildren) != null ? l : !0, r), a;
|
|
1665
1665
|
});
|
|
1666
1666
|
}, e.getIsSelected = () => {
|
|
1667
1667
|
const {
|
|
1668
1668
|
rowSelection: t
|
|
1669
1669
|
} = r.getState();
|
|
1670
|
-
return
|
|
1670
|
+
return $e(e, t);
|
|
1671
1671
|
}, e.getIsSomeSelected = () => {
|
|
1672
1672
|
const {
|
|
1673
1673
|
rowSelection: t
|
|
1674
1674
|
} = r.getState();
|
|
1675
|
-
return
|
|
1675
|
+
return ve(e, t) === "some";
|
|
1676
1676
|
}, e.getIsAllSubRowsSelected = () => {
|
|
1677
1677
|
const {
|
|
1678
1678
|
rowSelection: t
|
|
1679
1679
|
} = r.getState();
|
|
1680
|
-
return
|
|
1680
|
+
return ve(e, t) === "all";
|
|
1681
1681
|
}, e.getCanSelect = () => {
|
|
1682
1682
|
var t;
|
|
1683
1683
|
return typeof r.options.enableRowSelection == "function" ? r.options.enableRowSelection(e) : (t = r.options.enableRowSelection) != null ? t : !0;
|
|
@@ -1695,16 +1695,16 @@ const Ht = {
|
|
|
1695
1695
|
};
|
|
1696
1696
|
};
|
|
1697
1697
|
}
|
|
1698
|
-
},
|
|
1698
|
+
}, Ce = (e, r, t, n, o) => {
|
|
1699
1699
|
var i;
|
|
1700
1700
|
const l = o.getRow(r, !0);
|
|
1701
|
-
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), l.getCanSelect() && (e[r] = !0)) : delete e[r], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((a) =>
|
|
1701
|
+
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), l.getCanSelect() && (e[r] = !0)) : delete e[r], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((a) => Ce(e, a.id, t, n, o));
|
|
1702
1702
|
};
|
|
1703
|
-
function
|
|
1703
|
+
function de(e, r) {
|
|
1704
1704
|
const t = e.getState().rowSelection, n = [], o = {}, i = function(l, a) {
|
|
1705
1705
|
return l.map((u) => {
|
|
1706
1706
|
var g;
|
|
1707
|
-
const d =
|
|
1707
|
+
const d = $e(u, t);
|
|
1708
1708
|
if (d && (n.push(u), o[u.id] = u), (g = u.subRows) != null && g.length && (u = {
|
|
1709
1709
|
...u,
|
|
1710
1710
|
subRows: i(u.subRows)
|
|
@@ -1718,33 +1718,33 @@ function ge(e, r) {
|
|
|
1718
1718
|
rowsById: o
|
|
1719
1719
|
};
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function $e(e, r) {
|
|
1722
1722
|
var t;
|
|
1723
1723
|
return (t = r[e.id]) != null ? t : !1;
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1725
|
+
function ve(e, r, t) {
|
|
1726
1726
|
var n;
|
|
1727
1727
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
1728
1728
|
let o = !0, i = !1;
|
|
1729
1729
|
return e.subRows.forEach((l) => {
|
|
1730
|
-
if (!(i && !o) && (l.getCanSelect() && (
|
|
1731
|
-
const a =
|
|
1730
|
+
if (!(i && !o) && (l.getCanSelect() && ($e(l, r) ? i = !0 : o = !1), l.subRows && l.subRows.length)) {
|
|
1731
|
+
const a = ve(l, r);
|
|
1732
1732
|
a === "all" ? i = !0 : (a === "some" && (i = !0), o = !1);
|
|
1733
1733
|
}
|
|
1734
1734
|
}), o ? "all" : i ? "some" : !1;
|
|
1735
1735
|
}
|
|
1736
|
-
const
|
|
1736
|
+
const Re = /([0-9]+)/gm, Wt = (e, r, t) => Ze(j(e.getValue(t)).toLowerCase(), j(r.getValue(t)).toLowerCase()), Zt = (e, r, t) => Ze(j(e.getValue(t)), j(r.getValue(t))), Yt = (e, r, t) => Ie(j(e.getValue(t)).toLowerCase(), j(r.getValue(t)).toLowerCase()), Jt = (e, r, t) => Ie(j(e.getValue(t)), j(r.getValue(t))), Qt = (e, r, t) => {
|
|
1737
1737
|
const n = e.getValue(t), o = r.getValue(t);
|
|
1738
1738
|
return n > o ? 1 : n < o ? -1 : 0;
|
|
1739
|
-
},
|
|
1740
|
-
function
|
|
1739
|
+
}, en = (e, r, t) => Ie(e.getValue(t), r.getValue(t));
|
|
1740
|
+
function Ie(e, r) {
|
|
1741
1741
|
return e === r ? 0 : e > r ? 1 : -1;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function j(e) {
|
|
1744
1744
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1747
|
-
const t = e.split(
|
|
1746
|
+
function Ze(e, r) {
|
|
1747
|
+
const t = e.split(Re).filter(Boolean), n = r.split(Re).filter(Boolean);
|
|
1748
1748
|
for (; t.length && n.length; ) {
|
|
1749
1749
|
const o = t.shift(), i = n.shift(), l = parseInt(o, 10), a = parseInt(i, 10), u = [l, a].sort();
|
|
1750
1750
|
if (isNaN(u[0])) {
|
|
@@ -1764,13 +1764,13 @@ function Ke(e, r) {
|
|
|
1764
1764
|
return t.length - n.length;
|
|
1765
1765
|
}
|
|
1766
1766
|
const Z = {
|
|
1767
|
-
alphanumeric:
|
|
1768
|
-
alphanumericCaseSensitive:
|
|
1769
|
-
text:
|
|
1770
|
-
textCaseSensitive:
|
|
1771
|
-
datetime:
|
|
1772
|
-
basic:
|
|
1773
|
-
},
|
|
1767
|
+
alphanumeric: Wt,
|
|
1768
|
+
alphanumericCaseSensitive: Zt,
|
|
1769
|
+
text: Yt,
|
|
1770
|
+
textCaseSensitive: Jt,
|
|
1771
|
+
datetime: Qt,
|
|
1772
|
+
basic: en
|
|
1773
|
+
}, tn = {
|
|
1774
1774
|
getInitialState: (e) => ({
|
|
1775
1775
|
sorting: [],
|
|
1776
1776
|
...e
|
|
@@ -1780,7 +1780,7 @@ const Z = {
|
|
|
1780
1780
|
sortUndefined: 1
|
|
1781
1781
|
}),
|
|
1782
1782
|
getDefaultOptions: (e) => ({
|
|
1783
|
-
onSortingChange:
|
|
1783
|
+
onSortingChange: A("sorting", e),
|
|
1784
1784
|
isMultiSortEvent: (r) => r.shiftKey
|
|
1785
1785
|
}),
|
|
1786
1786
|
createColumn: (e, r) => {
|
|
@@ -1791,7 +1791,7 @@ const Z = {
|
|
|
1791
1791
|
const i = o == null ? void 0 : o.getValue(e.id);
|
|
1792
1792
|
if (Object.prototype.toString.call(i) === "[object Date]")
|
|
1793
1793
|
return Z.datetime;
|
|
1794
|
-
if (typeof i == "string" && (n = !0, i.split(
|
|
1794
|
+
if (typeof i == "string" && (n = !0, i.split(Re).length > 1))
|
|
1795
1795
|
return Z.alphanumeric;
|
|
1796
1796
|
}
|
|
1797
1797
|
return n ? Z.text : Z.basic;
|
|
@@ -1802,7 +1802,7 @@ const Z = {
|
|
|
1802
1802
|
var t, n;
|
|
1803
1803
|
if (!e)
|
|
1804
1804
|
throw new Error();
|
|
1805
|
-
return
|
|
1805
|
+
return re(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = r.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : Z[e.columnDef.sortingFn];
|
|
1806
1806
|
}, e.toggleSorting = (t, n) => {
|
|
1807
1807
|
const o = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
1808
1808
|
r.setSorting((l) => {
|
|
@@ -1859,30 +1859,30 @@ const Z = {
|
|
|
1859
1859
|
e.setSorting(r ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
1860
1860
|
}, 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());
|
|
1861
1861
|
}
|
|
1862
|
-
},
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1862
|
+
}, nn = [
|
|
1863
|
+
yt,
|
|
1864
|
+
Bt,
|
|
1865
|
+
At,
|
|
1866
|
+
zt,
|
|
1867
|
+
_t,
|
|
1868
|
+
Ft,
|
|
1869
|
+
Tt,
|
|
1870
1870
|
//depends on ColumnFaceting
|
|
1871
|
-
|
|
1871
|
+
jt,
|
|
1872
1872
|
//depends on ColumnFiltering
|
|
1873
|
-
|
|
1874
|
-
|
|
1873
|
+
tn,
|
|
1874
|
+
Ht,
|
|
1875
1875
|
//depends on RowSorting
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1876
|
+
qt,
|
|
1877
|
+
Kt,
|
|
1878
|
+
Ut,
|
|
1879
|
+
Xt,
|
|
1880
|
+
bt
|
|
1881
1881
|
];
|
|
1882
|
-
function
|
|
1882
|
+
function rn(e) {
|
|
1883
1883
|
var r, t;
|
|
1884
1884
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1885
|
-
const n = [...
|
|
1885
|
+
const n = [...nn, ...(r = e._features) != null ? r : []];
|
|
1886
1886
|
let o = {
|
|
1887
1887
|
_features: n
|
|
1888
1888
|
};
|
|
@@ -1962,8 +1962,8 @@ function Wt(e) {
|
|
|
1962
1962
|
getAllColumns: C(() => [o._getColumnDefs()], (f) => {
|
|
1963
1963
|
const s = function(m, h, S) {
|
|
1964
1964
|
return S === void 0 && (S = 0), m.map((R) => {
|
|
1965
|
-
const
|
|
1966
|
-
return
|
|
1965
|
+
const _ = xt(o, R, S, h), $ = R;
|
|
1966
|
+
return _.columns = $.columns ? s($.columns, _, S + 1) : [], _;
|
|
1967
1967
|
});
|
|
1968
1968
|
};
|
|
1969
1969
|
return s(f);
|
|
@@ -1986,7 +1986,7 @@ function Wt(e) {
|
|
|
1986
1986
|
}
|
|
1987
1987
|
return o;
|
|
1988
1988
|
}
|
|
1989
|
-
function
|
|
1989
|
+
function on() {
|
|
1990
1990
|
return (e) => C(() => [e.options.data], (r) => {
|
|
1991
1991
|
const t = {
|
|
1992
1992
|
rows: [],
|
|
@@ -1996,7 +1996,7 @@ function Zt() {
|
|
|
1996
1996
|
i === void 0 && (i = 0);
|
|
1997
1997
|
const a = [];
|
|
1998
1998
|
for (let g = 0; g < o.length; g++) {
|
|
1999
|
-
const d =
|
|
1999
|
+
const d = _e(e, e._getRowId(o[g], g, l), o[g], g, i, void 0, l == null ? void 0 : l.id);
|
|
2000
2000
|
if (t.flatRows.push(d), t.rowsById[d.id] = d, a.push(d), e.options.getSubRows) {
|
|
2001
2001
|
var u;
|
|
2002
2002
|
d.originalSubRows = e.options.getSubRows(o[g], g), (u = d.originalSubRows) != null && u.length && (d.subRows = n(d.originalSubRows, i + 1, d));
|
|
@@ -2007,7 +2007,7 @@ function Zt() {
|
|
|
2007
2007
|
return t.rows = n(r), t;
|
|
2008
2008
|
}, v(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
2009
2009
|
}
|
|
2010
|
-
function
|
|
2010
|
+
function ln(e) {
|
|
2011
2011
|
const r = [], t = (n) => {
|
|
2012
2012
|
var o;
|
|
2013
2013
|
r.push(n), (o = n.subRows) != null && o.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
@@ -2018,10 +2018,10 @@ function Yt(e) {
|
|
|
2018
2018
|
rowsById: e.rowsById
|
|
2019
2019
|
};
|
|
2020
2020
|
}
|
|
2021
|
-
function
|
|
2022
|
-
return t.options.filterFromLeafRows ?
|
|
2021
|
+
function sn(e, r, t) {
|
|
2022
|
+
return t.options.filterFromLeafRows ? an(e, r, t) : un(e, r, t);
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function an(e, r, t) {
|
|
2025
2025
|
var n;
|
|
2026
2026
|
const o = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, g) {
|
|
2027
2027
|
g === void 0 && (g = 0);
|
|
@@ -2029,7 +2029,7 @@ function Qt(e, r, t) {
|
|
|
2029
2029
|
for (let f = 0; f < u.length; f++) {
|
|
2030
2030
|
var c;
|
|
2031
2031
|
let s = u[f];
|
|
2032
|
-
const m =
|
|
2032
|
+
const m = _e(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
2033
2033
|
if (m.columnFilters = s.columnFilters, (c = s.subRows) != null && c.length && g < l) {
|
|
2034
2034
|
if (m.subRows = a(s.subRows, g + 1), s = m, r(s) && !m.subRows.length) {
|
|
2035
2035
|
d.push(s), i[s.id] = s, o.push(s);
|
|
@@ -2050,7 +2050,7 @@ function Qt(e, r, t) {
|
|
|
2050
2050
|
rowsById: i
|
|
2051
2051
|
};
|
|
2052
2052
|
}
|
|
2053
|
-
function
|
|
2053
|
+
function un(e, r, t) {
|
|
2054
2054
|
var n;
|
|
2055
2055
|
const o = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, g) {
|
|
2056
2056
|
g === void 0 && (g = 0);
|
|
@@ -2060,7 +2060,7 @@ function en(e, r, t) {
|
|
|
2060
2060
|
if (r(s)) {
|
|
2061
2061
|
var c;
|
|
2062
2062
|
if ((c = s.subRows) != null && c.length && g < l) {
|
|
2063
|
-
const h =
|
|
2063
|
+
const h = _e(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
2064
2064
|
h.subRows = a(s.subRows, g + 1), s = h;
|
|
2065
2065
|
}
|
|
2066
2066
|
d.push(s), o.push(s), i[s.id] = s;
|
|
@@ -2074,7 +2074,7 @@ function en(e, r, t) {
|
|
|
2074
2074
|
rowsById: i
|
|
2075
2075
|
};
|
|
2076
2076
|
}
|
|
2077
|
-
function
|
|
2077
|
+
function fn() {
|
|
2078
2078
|
return (e) => C(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (r, t, n) => {
|
|
2079
2079
|
if (!r.rows.length || !(t != null && t.length) && !n) {
|
|
2080
2080
|
for (let f = 0; f < r.flatRows.length; f++)
|
|
@@ -2138,10 +2138,10 @@ function tn() {
|
|
|
2138
2138
|
return !1;
|
|
2139
2139
|
return !0;
|
|
2140
2140
|
};
|
|
2141
|
-
return
|
|
2141
|
+
return sn(r.rows, c, e);
|
|
2142
2142
|
}, v(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
2143
2143
|
}
|
|
2144
|
-
function
|
|
2144
|
+
function gn(e) {
|
|
2145
2145
|
return (r) => C(() => [r.getState().pagination, r.getPrePaginationRowModel(), r.options.paginateExpandedRows ? void 0 : r.getState().expanded], (t, n) => {
|
|
2146
2146
|
if (!n.rows.length)
|
|
2147
2147
|
return n;
|
|
@@ -2161,7 +2161,7 @@ function nn(e) {
|
|
|
2161
2161
|
rows: l,
|
|
2162
2162
|
flatRows: a,
|
|
2163
2163
|
rowsById: u
|
|
2164
|
-
} : c =
|
|
2164
|
+
} : c = ln({
|
|
2165
2165
|
rows: l,
|
|
2166
2166
|
flatRows: a,
|
|
2167
2167
|
rowsById: u
|
|
@@ -2172,7 +2172,7 @@ function nn(e) {
|
|
|
2172
2172
|
return c.rows.forEach(f), c;
|
|
2173
2173
|
}, v(r.options, "debugTable", "getPaginationRowModel"));
|
|
2174
2174
|
}
|
|
2175
|
-
function
|
|
2175
|
+
function dn() {
|
|
2176
2176
|
return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (r, t) => {
|
|
2177
2177
|
if (!t.rows.length || !(r != null && r.length))
|
|
2178
2178
|
return t;
|
|
@@ -2196,17 +2196,17 @@ function rn() {
|
|
|
2196
2196
|
for (let s = 0; s < i.length; s += 1) {
|
|
2197
2197
|
var f;
|
|
2198
2198
|
const m = i[s], h = l[m.id], S = h.sortUndefined, R = (f = m == null ? void 0 : m.desc) != null ? f : !1;
|
|
2199
|
-
let
|
|
2199
|
+
let _ = 0;
|
|
2200
2200
|
if (S) {
|
|
2201
|
-
const $ = d.getValue(m.id),
|
|
2202
|
-
if (I ||
|
|
2201
|
+
const $ = d.getValue(m.id), E = c.getValue(m.id), I = $ === void 0, P = E === void 0;
|
|
2202
|
+
if (I || P) {
|
|
2203
2203
|
if (S === "first") return I ? -1 : 1;
|
|
2204
2204
|
if (S === "last") return I ? 1 : -1;
|
|
2205
|
-
|
|
2205
|
+
_ = I && P ? 0 : I ? S : -S;
|
|
2206
2206
|
}
|
|
2207
2207
|
}
|
|
2208
|
-
if (
|
|
2209
|
-
return R && (
|
|
2208
|
+
if (_ === 0 && (_ = h.sortingFn(d, c, m.id)), _ !== 0)
|
|
2209
|
+
return R && (_ *= -1), h.invertSorting && (_ *= -1), _;
|
|
2210
2210
|
}
|
|
2211
2211
|
return d.index - c.index;
|
|
2212
2212
|
}), g.forEach((d) => {
|
|
@@ -2231,22 +2231,22 @@ function rn() {
|
|
|
2231
2231
|
*
|
|
2232
2232
|
* @license MIT
|
|
2233
2233
|
*/
|
|
2234
|
-
function
|
|
2235
|
-
return e ?
|
|
2234
|
+
function ze(e, r) {
|
|
2235
|
+
return e ? cn(e) ? /* @__PURE__ */ pe.createElement(e, r) : e : null;
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return
|
|
2237
|
+
function cn(e) {
|
|
2238
|
+
return pn(e) || typeof e == "function" || mn(e);
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2240
|
+
function pn(e) {
|
|
2241
2241
|
return typeof e == "function" && (() => {
|
|
2242
2242
|
const r = Object.getPrototypeOf(e);
|
|
2243
2243
|
return r.prototype && r.prototype.isReactComponent;
|
|
2244
2244
|
})();
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2246
|
+
function mn(e) {
|
|
2247
2247
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2249
|
+
function hn(e) {
|
|
2250
2250
|
const r = {
|
|
2251
2251
|
state: {},
|
|
2252
2252
|
// Dummy state
|
|
@@ -2255,9 +2255,9 @@ function an(e) {
|
|
|
2255
2255
|
// noop
|
|
2256
2256
|
renderFallbackValue: null,
|
|
2257
2257
|
...e
|
|
2258
|
-
}, [t] =
|
|
2259
|
-
current:
|
|
2260
|
-
})), [n, o] =
|
|
2258
|
+
}, [t] = pe.useState(() => ({
|
|
2259
|
+
current: rn(r)
|
|
2260
|
+
})), [n, o] = pe.useState(() => t.current.initialState);
|
|
2261
2261
|
return t.current.setOptions((i) => ({
|
|
2262
2262
|
...i,
|
|
2263
2263
|
...e,
|
|
@@ -2272,7 +2272,7 @@ function an(e) {
|
|
|
2272
2272
|
}
|
|
2273
2273
|
})), t.current;
|
|
2274
2274
|
}
|
|
2275
|
-
const
|
|
2275
|
+
const ke = ({
|
|
2276
2276
|
editable: e = !0,
|
|
2277
2277
|
pageSize: r = 25,
|
|
2278
2278
|
onCellEdit: t
|
|
@@ -2286,40 +2286,40 @@ const Le = ({
|
|
|
2286
2286
|
startEditing: u,
|
|
2287
2287
|
stopEditing: g,
|
|
2288
2288
|
updateCell: d
|
|
2289
|
-
} = X(), [c, f] =
|
|
2290
|
-
const
|
|
2289
|
+
} = X(), [c, f] = Y([]), [s, m] = Y(""), [h, S] = Y(""), R = Pe(() => i.filter((x) => x.targetKey !== null).map((x) => {
|
|
2290
|
+
const y = o == null ? void 0 : o.columns.find((V) => V.key === x.targetKey);
|
|
2291
2291
|
return {
|
|
2292
|
-
sourceColumn:
|
|
2293
|
-
targetKey:
|
|
2294
|
-
label: (
|
|
2295
|
-
type: (
|
|
2292
|
+
sourceColumn: x.sourceColumn,
|
|
2293
|
+
targetKey: x.targetKey,
|
|
2294
|
+
label: (y == null ? void 0 : y.label) || x.targetKey,
|
|
2295
|
+
type: (y == null ? void 0 : y.type) || "string"
|
|
2296
2296
|
};
|
|
2297
|
-
}), [i, o]),
|
|
2298
|
-
(
|
|
2299
|
-
const
|
|
2300
|
-
return
|
|
2297
|
+
}), [i, o]), _ = xe(
|
|
2298
|
+
(x, y) => {
|
|
2299
|
+
const V = l.get(x);
|
|
2300
|
+
return V == null ? void 0 : V.find((K) => K.columnKey === y);
|
|
2301
2301
|
},
|
|
2302
2302
|
[l]
|
|
2303
|
-
), $ = (
|
|
2304
|
-
S(
|
|
2305
|
-
},
|
|
2303
|
+
), $ = (x, y, V) => {
|
|
2304
|
+
S(V), u(x, y);
|
|
2305
|
+
}, E = () => {
|
|
2306
2306
|
a && (d(a.rowIndex, a.columnKey, h), t == null || t(a.rowIndex, a.columnKey, h)), g();
|
|
2307
2307
|
}, I = () => {
|
|
2308
2308
|
S(""), g();
|
|
2309
|
-
},
|
|
2309
|
+
}, P = St(), q = Pe(
|
|
2310
2310
|
() => [
|
|
2311
|
-
|
|
2311
|
+
P.accessor("rowIndex", {
|
|
2312
2312
|
header: "#",
|
|
2313
2313
|
size: 60,
|
|
2314
|
-
cell: (
|
|
2314
|
+
cell: (x) => /* @__PURE__ */ p("span", { className: "ff-text-gray-400 ff-font-mono ff-text-xs", children: x.getValue() + 1 })
|
|
2315
2315
|
}),
|
|
2316
2316
|
...R.map(
|
|
2317
|
-
(
|
|
2318
|
-
id:
|
|
2319
|
-
header:
|
|
2320
|
-
cell: (
|
|
2321
|
-
const
|
|
2322
|
-
return (a == null ? void 0 : a.rowIndex) ===
|
|
2317
|
+
(x) => P.accessor((y) => y.data[x.targetKey] || y.data[x.sourceColumn], {
|
|
2318
|
+
id: x.targetKey,
|
|
2319
|
+
header: x.label,
|
|
2320
|
+
cell: (y) => {
|
|
2321
|
+
const V = y.row.original.rowIndex, K = String(y.getValue() ?? ""), H = _(V, x.targetKey);
|
|
2322
|
+
return (a == null ? void 0 : a.rowIndex) === V && (a == null ? void 0 : a.columnKey) === x.targetKey ? /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
|
|
2323
2323
|
/* @__PURE__ */ p(
|
|
2324
2324
|
"input",
|
|
2325
2325
|
{
|
|
@@ -2327,7 +2327,7 @@ const Le = ({
|
|
|
2327
2327
|
value: h,
|
|
2328
2328
|
onChange: (U) => S(U.target.value),
|
|
2329
2329
|
onKeyDown: (U) => {
|
|
2330
|
-
U.key === "Enter" &&
|
|
2330
|
+
U.key === "Enter" && E(), U.key === "Escape" && I();
|
|
2331
2331
|
},
|
|
2332
2332
|
className: "ff-input ff-py-1 ff-text-sm",
|
|
2333
2333
|
autoFocus: !0
|
|
@@ -2336,42 +2336,42 @@ const Le = ({
|
|
|
2336
2336
|
/* @__PURE__ */ p(
|
|
2337
2337
|
"button",
|
|
2338
2338
|
{
|
|
2339
|
-
onClick:
|
|
2340
|
-
className: "ff-
|
|
2341
|
-
children:
|
|
2339
|
+
onClick: E,
|
|
2340
|
+
className: "ff-px-3 ff-py-1 ff-text-xs ff-font-medium ff-text-white ff-bg-success-500 hover:ff-bg-success-600 ff-rounded ff-transition-colors",
|
|
2341
|
+
children: "Save"
|
|
2342
2342
|
}
|
|
2343
2343
|
),
|
|
2344
2344
|
/* @__PURE__ */ p(
|
|
2345
2345
|
"button",
|
|
2346
2346
|
{
|
|
2347
2347
|
onClick: I,
|
|
2348
|
-
className: "ff-
|
|
2349
|
-
children:
|
|
2348
|
+
className: "ff-px-3 ff-py-1 ff-text-xs ff-font-medium ff-text-gray-110 ff-bg-gray-30 hover:ff-bg-gray-40 ff-rounded ff-transition-colors",
|
|
2349
|
+
children: "Cancel"
|
|
2350
2350
|
}
|
|
2351
2351
|
)
|
|
2352
2352
|
] }) : /* @__PURE__ */ w(
|
|
2353
2353
|
"div",
|
|
2354
2354
|
{
|
|
2355
|
-
className:
|
|
2355
|
+
className: L(
|
|
2356
2356
|
"ff-group ff-flex ff-items-center ff-gap-2",
|
|
2357
|
-
(
|
|
2358
|
-
(
|
|
2357
|
+
(H == null ? void 0 : H.severity) === "error" && "ff-cell-error",
|
|
2358
|
+
(H == null ? void 0 : H.severity) === "warning" && "ff-cell-warning"
|
|
2359
2359
|
),
|
|
2360
2360
|
children: [
|
|
2361
2361
|
/* @__PURE__ */ p("span", { className: "ff-flex-1 ff-truncate", children: K || /* @__PURE__ */ p("span", { className: "ff-text-gray-300", children: "—" }) }),
|
|
2362
|
-
|
|
2363
|
-
|
|
2362
|
+
H && /* @__PURE__ */ w("div", { className: "ff-relative ff-group/tooltip", children: [
|
|
2363
|
+
H.severity === "error" ? /* @__PURE__ */ p(ye, { className: "ff-w-4 ff-h-4 ff-text-error-500" }) : /* @__PURE__ */ p(he, { className: "ff-w-4 ff-h-4 ff-text-warning-500" }),
|
|
2364
2364
|
/* @__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: [
|
|
2365
|
-
|
|
2366
|
-
|
|
2365
|
+
H.message,
|
|
2366
|
+
H.suggestion && /* @__PURE__ */ p("span", { className: "ff-block ff-mt-1 ff-text-gray-300", children: H.suggestion })
|
|
2367
2367
|
] })
|
|
2368
2368
|
] }),
|
|
2369
|
-
e && !
|
|
2369
|
+
e && !H && /* @__PURE__ */ p(
|
|
2370
2370
|
"button",
|
|
2371
2371
|
{
|
|
2372
|
-
onClick: () => $(
|
|
2372
|
+
onClick: () => $(V, x.targetKey, K),
|
|
2373
2373
|
className: "ff-opacity-0 group-hover:ff-opacity-100 ff-p-1 ff-text-gray-400 hover:ff-text-gray-600 ff-rounded ff-transition-opacity",
|
|
2374
|
-
children: /* @__PURE__ */ p(
|
|
2374
|
+
children: /* @__PURE__ */ p(mt, { className: "ff-w-3 ff-h-3" })
|
|
2375
2375
|
}
|
|
2376
2376
|
)
|
|
2377
2377
|
]
|
|
@@ -2381,20 +2381,20 @@ const Le = ({
|
|
|
2381
2381
|
})
|
|
2382
2382
|
)
|
|
2383
2383
|
],
|
|
2384
|
-
[R, a, h, e,
|
|
2385
|
-
),
|
|
2384
|
+
[R, a, h, e, _, P]
|
|
2385
|
+
), N = hn({
|
|
2386
2386
|
data: n,
|
|
2387
|
-
columns:
|
|
2387
|
+
columns: q,
|
|
2388
2388
|
state: {
|
|
2389
2389
|
sorting: c,
|
|
2390
2390
|
globalFilter: s
|
|
2391
2391
|
},
|
|
2392
2392
|
onSortingChange: f,
|
|
2393
2393
|
onGlobalFilterChange: m,
|
|
2394
|
-
getCoreRowModel:
|
|
2395
|
-
getPaginationRowModel:
|
|
2396
|
-
getSortedRowModel:
|
|
2397
|
-
getFilteredRowModel:
|
|
2394
|
+
getCoreRowModel: on(),
|
|
2395
|
+
getPaginationRowModel: gn(),
|
|
2396
|
+
getSortedRowModel: dn(),
|
|
2397
|
+
getFilteredRowModel: fn(),
|
|
2398
2398
|
initialState: {
|
|
2399
2399
|
pagination: {
|
|
2400
2400
|
pageSize: r
|
|
@@ -2408,60 +2408,60 @@ const Le = ({
|
|
|
2408
2408
|
{
|
|
2409
2409
|
type: "text",
|
|
2410
2410
|
value: s,
|
|
2411
|
-
onChange: (
|
|
2411
|
+
onChange: (x) => m(x.target.value),
|
|
2412
2412
|
placeholder: "Search all columns...",
|
|
2413
2413
|
className: "ff-input ff-max-w-xs"
|
|
2414
2414
|
}
|
|
2415
2415
|
),
|
|
2416
2416
|
/* @__PURE__ */ w("div", { className: "ff-text-sm ff-text-gray-500", children: [
|
|
2417
|
-
|
|
2417
|
+
N.getFilteredRowModel().rows.length,
|
|
2418
2418
|
" rows"
|
|
2419
2419
|
] })
|
|
2420
2420
|
] }),
|
|
2421
2421
|
/* @__PURE__ */ p("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ w("table", { className: "ff-table", children: [
|
|
2422
|
-
/* @__PURE__ */ p("thead", { children:
|
|
2422
|
+
/* @__PURE__ */ p("thead", { children: N.getHeaderGroups().map((x) => /* @__PURE__ */ p("tr", { children: x.headers.map((y) => /* @__PURE__ */ p(
|
|
2423
2423
|
"th",
|
|
2424
2424
|
{
|
|
2425
|
-
style: { width:
|
|
2426
|
-
onClick:
|
|
2427
|
-
className:
|
|
2428
|
-
|
|
2425
|
+
style: { width: y.getSize() },
|
|
2426
|
+
onClick: y.column.getToggleSortingHandler(),
|
|
2427
|
+
className: L(
|
|
2428
|
+
y.column.getCanSort() && "ff-cursor-pointer ff-select-none"
|
|
2429
2429
|
),
|
|
2430
2430
|
children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
|
|
2431
|
-
|
|
2432
|
-
|
|
2431
|
+
ze(y.column.columnDef.header, y.getContext()),
|
|
2432
|
+
y.column.getIsSorted() && /* @__PURE__ */ p("span", { children: y.column.getIsSorted() === "asc" ? "↑" : "↓" })
|
|
2433
2433
|
] })
|
|
2434
2434
|
},
|
|
2435
|
-
|
|
2436
|
-
)) },
|
|
2437
|
-
/* @__PURE__ */ p("tbody", { children:
|
|
2438
|
-
const
|
|
2435
|
+
y.id
|
|
2436
|
+
)) }, x.id)) }),
|
|
2437
|
+
/* @__PURE__ */ p("tbody", { children: N.getRowModel().rows.map((x) => {
|
|
2438
|
+
const y = l.has(x.original.rowIndex);
|
|
2439
2439
|
return /* @__PURE__ */ p(
|
|
2440
2440
|
"tr",
|
|
2441
2441
|
{
|
|
2442
|
-
className:
|
|
2443
|
-
children:
|
|
2442
|
+
className: L(y && "ff-bg-error-50/30"),
|
|
2443
|
+
children: x.getVisibleCells().map((V) => /* @__PURE__ */ p("td", { children: ze(V.column.columnDef.cell, V.getContext()) }, V.id))
|
|
2444
2444
|
},
|
|
2445
|
-
|
|
2445
|
+
x.id
|
|
2446
2446
|
);
|
|
2447
2447
|
}) })
|
|
2448
2448
|
] }) }),
|
|
2449
2449
|
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
|
|
2450
2450
|
/* @__PURE__ */ w("div", { className: "ff-text-sm ff-text-gray-500", children: [
|
|
2451
2451
|
"Page ",
|
|
2452
|
-
|
|
2452
|
+
N.getState().pagination.pageIndex + 1,
|
|
2453
2453
|
" of ",
|
|
2454
|
-
|
|
2454
|
+
N.getPageCount()
|
|
2455
2455
|
] }),
|
|
2456
2456
|
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
|
|
2457
2457
|
/* @__PURE__ */ w(
|
|
2458
2458
|
"button",
|
|
2459
2459
|
{
|
|
2460
|
-
onClick: () =>
|
|
2461
|
-
disabled: !
|
|
2460
|
+
onClick: () => N.previousPage(),
|
|
2461
|
+
disabled: !N.getCanPreviousPage(),
|
|
2462
2462
|
className: "ff-btn ff-btn-secondary ff-py-1.5",
|
|
2463
2463
|
children: [
|
|
2464
|
-
/* @__PURE__ */ p(
|
|
2464
|
+
/* @__PURE__ */ p(ft, { className: "ff-w-4 ff-h-4" }),
|
|
2465
2465
|
"Previous"
|
|
2466
2466
|
]
|
|
2467
2467
|
}
|
|
@@ -2469,19 +2469,19 @@ const Le = ({
|
|
|
2469
2469
|
/* @__PURE__ */ w(
|
|
2470
2470
|
"button",
|
|
2471
2471
|
{
|
|
2472
|
-
onClick: () =>
|
|
2473
|
-
disabled: !
|
|
2472
|
+
onClick: () => N.nextPage(),
|
|
2473
|
+
disabled: !N.getCanNextPage(),
|
|
2474
2474
|
className: "ff-btn ff-btn-secondary ff-py-1.5",
|
|
2475
2475
|
children: [
|
|
2476
2476
|
"Next",
|
|
2477
|
-
/* @__PURE__ */ p(
|
|
2477
|
+
/* @__PURE__ */ p(ot, { className: "ff-w-4 ff-h-4" })
|
|
2478
2478
|
]
|
|
2479
2479
|
}
|
|
2480
2480
|
)
|
|
2481
2481
|
] })
|
|
2482
2482
|
] })
|
|
2483
2483
|
] });
|
|
2484
|
-
},
|
|
2484
|
+
}, be = ({
|
|
2485
2485
|
showDetails: e = !0
|
|
2486
2486
|
}) => {
|
|
2487
2487
|
const { validationResults: r } = X();
|
|
@@ -2492,24 +2492,24 @@ const Le = ({
|
|
|
2492
2492
|
/* @__PURE__ */ w(
|
|
2493
2493
|
"div",
|
|
2494
2494
|
{
|
|
2495
|
-
className:
|
|
2495
|
+
className: L(
|
|
2496
2496
|
"ff-flex ff-items-center ff-gap-4 ff-p-4 ff-rounded-lg ff-border",
|
|
2497
2497
|
t ? "ff-bg-success-50 ff-border-success-200" : "ff-bg-error-50 ff-border-error-200"
|
|
2498
2498
|
),
|
|
2499
2499
|
children: [
|
|
2500
|
-
t ? /* @__PURE__ */ p(
|
|
2500
|
+
t ? /* @__PURE__ */ p(ne, { className: "ff-w-8 ff-h-8 ff-text-success-600" }) : /* @__PURE__ */ p(De, { className: "ff-w-8 ff-h-8 ff-text-error-600" }),
|
|
2501
2501
|
/* @__PURE__ */ w("div", { children: [
|
|
2502
2502
|
/* @__PURE__ */ p(
|
|
2503
2503
|
"h3",
|
|
2504
2504
|
{
|
|
2505
|
-
className:
|
|
2505
|
+
className: L(
|
|
2506
2506
|
"ff-text-lg ff-font-semibold",
|
|
2507
2507
|
t ? "ff-text-success-800" : "ff-text-error-800"
|
|
2508
2508
|
),
|
|
2509
2509
|
children: t ? "Validation Passed" : "Validation Failed"
|
|
2510
2510
|
}
|
|
2511
2511
|
),
|
|
2512
|
-
/* @__PURE__ */ w("p", { className:
|
|
2512
|
+
/* @__PURE__ */ w("p", { className: L("ff-text-sm", t ? "ff-text-success-600" : "ff-text-error-600"), children: [
|
|
2513
2513
|
o,
|
|
2514
2514
|
" of ",
|
|
2515
2515
|
n,
|
|
@@ -2548,12 +2548,12 @@ const Le = ({
|
|
|
2548
2548
|
] }),
|
|
2549
2549
|
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
|
|
2550
2550
|
c.errorCount > 0 && /* @__PURE__ */ w("span", { className: "ff-badge ff-badge-error", children: [
|
|
2551
|
-
/* @__PURE__ */ p(
|
|
2551
|
+
/* @__PURE__ */ p(De, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
|
|
2552
2552
|
c.errorCount,
|
|
2553
2553
|
" errors"
|
|
2554
2554
|
] }),
|
|
2555
2555
|
c.warningCount > 0 && /* @__PURE__ */ w("span", { className: "ff-badge ff-badge-warning", children: [
|
|
2556
|
-
/* @__PURE__ */ p(
|
|
2556
|
+
/* @__PURE__ */ p(he, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
|
|
2557
2557
|
c.warningCount,
|
|
2558
2558
|
" warnings"
|
|
2559
2559
|
] })
|
|
@@ -2561,7 +2561,7 @@ const Le = ({
|
|
|
2561
2561
|
] }, d)) })
|
|
2562
2562
|
] }),
|
|
2563
2563
|
e && u.duplicates && u.duplicates.length > 0 && /* @__PURE__ */ p("div", { className: "ff-bg-warning-50 ff-border ff-border-warning-200 ff-rounded-lg ff-p-4", children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-start ff-gap-3", children: [
|
|
2564
|
-
/* @__PURE__ */ p(
|
|
2564
|
+
/* @__PURE__ */ p(he, { className: "ff-w-5 ff-h-5 ff-text-warning-600 ff-flex-shrink-0 ff-mt-0.5" }),
|
|
2565
2565
|
/* @__PURE__ */ w("div", { children: [
|
|
2566
2566
|
/* @__PURE__ */ p("h4", { className: "ff-font-medium ff-text-warning-800", children: "Duplicate Values Found" }),
|
|
2567
2567
|
/* @__PURE__ */ w("ul", { className: "ff-mt-2 ff-space-y-1 ff-text-sm ff-text-warning-700", children: [
|
|
@@ -2587,232 +2587,253 @@ const Le = ({
|
|
|
2587
2587
|
] })
|
|
2588
2588
|
] }) })
|
|
2589
2589
|
] });
|
|
2590
|
-
},
|
|
2591
|
-
{ key: "upload", label: "Upload", icon:
|
|
2592
|
-
{ key: "mapping", label: "Map Columns", icon:
|
|
2593
|
-
{ key: "validation", label: "Validate", icon:
|
|
2594
|
-
{ key: "review", label: "Review", icon:
|
|
2595
|
-
{ key: "complete", label: "Complete", icon:
|
|
2596
|
-
],
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2590
|
+
}, ce = [
|
|
2591
|
+
{ key: "upload", label: "Upload", icon: Oe },
|
|
2592
|
+
{ key: "mapping", label: "Map Columns", icon: ct },
|
|
2593
|
+
{ key: "validation", label: "Validate", icon: at },
|
|
2594
|
+
{ key: "review", label: "Review", icon: gt },
|
|
2595
|
+
{ key: "complete", label: "Complete", icon: ne }
|
|
2596
|
+
], vn = ({
|
|
2597
|
+
template: e,
|
|
2598
|
+
schema: r,
|
|
2599
|
+
onComplete: t,
|
|
2600
|
+
onCancel: n,
|
|
2601
|
+
onError: o
|
|
2601
2602
|
}) => {
|
|
2602
2603
|
const {
|
|
2603
|
-
step:
|
|
2604
|
-
sessionId:
|
|
2605
|
-
file:
|
|
2606
|
-
mappings:
|
|
2607
|
-
validationResults:
|
|
2608
|
-
isLoading:
|
|
2609
|
-
error:
|
|
2610
|
-
setSchema:
|
|
2611
|
-
setSessionId:
|
|
2612
|
-
setParsedData:
|
|
2613
|
-
setMappings:
|
|
2614
|
-
setUnmapped:
|
|
2615
|
-
setValidationResults:
|
|
2616
|
-
setStep:
|
|
2617
|
-
nextStep:
|
|
2618
|
-
previousStep:
|
|
2619
|
-
setLoading:
|
|
2620
|
-
setError:
|
|
2621
|
-
reset:
|
|
2622
|
-
} = X();
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2604
|
+
step: i,
|
|
2605
|
+
sessionId: l,
|
|
2606
|
+
file: a,
|
|
2607
|
+
mappings: u,
|
|
2608
|
+
validationResults: g,
|
|
2609
|
+
isLoading: d,
|
|
2610
|
+
error: c,
|
|
2611
|
+
setSchema: f,
|
|
2612
|
+
setSessionId: s,
|
|
2613
|
+
setParsedData: m,
|
|
2614
|
+
setMappings: h,
|
|
2615
|
+
setUnmapped: S,
|
|
2616
|
+
setValidationResults: R,
|
|
2617
|
+
setStep: _,
|
|
2618
|
+
nextStep: $,
|
|
2619
|
+
previousStep: E,
|
|
2620
|
+
setLoading: I,
|
|
2621
|
+
setError: P,
|
|
2622
|
+
reset: q
|
|
2623
|
+
} = X(), [N, x] = Y(null), [y, V] = Y(null);
|
|
2624
|
+
Ne(() => {
|
|
2625
|
+
if (V(null), e)
|
|
2626
|
+
if (it(e)) {
|
|
2627
|
+
const F = lt(e);
|
|
2628
|
+
F ? x(F) : (V(`Failed to load template "${e}"`), o == null || o(new Error(`Failed to load template "${e}"`)));
|
|
2629
|
+
} else {
|
|
2630
|
+
const F = `Template "${e}" not found. Available templates: ${Le.join(", ")}`;
|
|
2631
|
+
V(F), o == null || o(new Error(F));
|
|
2632
|
+
}
|
|
2633
|
+
else if (r)
|
|
2634
|
+
x(r);
|
|
2635
|
+
else {
|
|
2636
|
+
const F = `No template or schema provided. Please specify a template (${Le.join(", ")}) or provide a custom schema.`;
|
|
2637
|
+
V(F), o == null || o(new Error(F));
|
|
2638
|
+
}
|
|
2639
|
+
}, [e, r, o]), Ne(() => {
|
|
2640
|
+
N && (f(N), K(N));
|
|
2641
|
+
}, [N]);
|
|
2642
|
+
const K = async (F) => {
|
|
2627
2643
|
try {
|
|
2628
|
-
|
|
2629
|
-
const
|
|
2630
|
-
|
|
2631
|
-
} catch (
|
|
2632
|
-
const
|
|
2633
|
-
|
|
2644
|
+
I(!0);
|
|
2645
|
+
const G = await W().createImportSession(F);
|
|
2646
|
+
s(G.sessionId);
|
|
2647
|
+
} catch (M) {
|
|
2648
|
+
const G = M;
|
|
2649
|
+
P(G.message), o == null || o(G);
|
|
2634
2650
|
} finally {
|
|
2635
|
-
|
|
2651
|
+
I(!1);
|
|
2636
2652
|
}
|
|
2637
|
-
},
|
|
2638
|
-
if (
|
|
2653
|
+
}, H = xe(async (F) => {
|
|
2654
|
+
if (l)
|
|
2639
2655
|
try {
|
|
2640
|
-
|
|
2641
|
-
const
|
|
2642
|
-
|
|
2643
|
-
headers:
|
|
2644
|
-
rows:
|
|
2656
|
+
I(!0), P(null);
|
|
2657
|
+
const G = await W().uploadFile(l, F);
|
|
2658
|
+
m({
|
|
2659
|
+
headers: G.data.headers,
|
|
2660
|
+
rows: G.data.sampleRows.map((O, B) => ({
|
|
2645
2661
|
rowIndex: B,
|
|
2646
|
-
data:
|
|
2647
|
-
rawData: Object.values(
|
|
2662
|
+
data: O,
|
|
2663
|
+
rawData: Object.values(O)
|
|
2648
2664
|
})),
|
|
2649
|
-
totalRows:
|
|
2650
|
-
sampleRows:
|
|
2665
|
+
totalRows: G.data.totalRows,
|
|
2666
|
+
sampleRows: G.data.sampleRows.map((O, B) => ({
|
|
2651
2667
|
rowIndex: B,
|
|
2652
|
-
data:
|
|
2653
|
-
rawData: Object.values(
|
|
2668
|
+
data: O,
|
|
2669
|
+
rawData: Object.values(O)
|
|
2654
2670
|
}))
|
|
2655
|
-
}),
|
|
2656
|
-
} catch (
|
|
2657
|
-
const
|
|
2658
|
-
|
|
2671
|
+
}), $(), await Me();
|
|
2672
|
+
} catch (M) {
|
|
2673
|
+
const G = M;
|
|
2674
|
+
P(G.message), o == null || o(G);
|
|
2659
2675
|
} finally {
|
|
2660
|
-
|
|
2676
|
+
I(!1);
|
|
2661
2677
|
}
|
|
2662
|
-
}, [
|
|
2663
|
-
if (
|
|
2678
|
+
}, [l]), Me = async () => {
|
|
2679
|
+
if (l)
|
|
2664
2680
|
try {
|
|
2665
|
-
|
|
2666
|
-
const
|
|
2667
|
-
|
|
2668
|
-
} catch (
|
|
2669
|
-
const
|
|
2670
|
-
|
|
2681
|
+
I(!0);
|
|
2682
|
+
const M = await W().matchColumns(l);
|
|
2683
|
+
h(M.mappings), S(M.unmappedSource, M.unmappedTarget);
|
|
2684
|
+
} catch (F) {
|
|
2685
|
+
const M = F;
|
|
2686
|
+
P(M.message), o == null || o(M);
|
|
2671
2687
|
} finally {
|
|
2672
|
-
|
|
2688
|
+
I(!1);
|
|
2673
2689
|
}
|
|
2674
|
-
},
|
|
2675
|
-
if (
|
|
2690
|
+
}, U = async () => {
|
|
2691
|
+
if (l)
|
|
2676
2692
|
try {
|
|
2677
|
-
|
|
2678
|
-
const
|
|
2679
|
-
|
|
2680
|
-
} catch (
|
|
2681
|
-
const
|
|
2682
|
-
|
|
2693
|
+
I(!0), P(null);
|
|
2694
|
+
const M = await W().validateImport(l);
|
|
2695
|
+
R(M.validation), $();
|
|
2696
|
+
} catch (F) {
|
|
2697
|
+
const M = F;
|
|
2698
|
+
P(M.message), o == null || o(M);
|
|
2683
2699
|
} finally {
|
|
2684
|
-
|
|
2700
|
+
I(!1);
|
|
2685
2701
|
}
|
|
2686
|
-
},
|
|
2687
|
-
if (
|
|
2702
|
+
}, Ye = async () => {
|
|
2703
|
+
if (l)
|
|
2688
2704
|
try {
|
|
2689
|
-
|
|
2690
|
-
const
|
|
2705
|
+
I(!0), P(null);
|
|
2706
|
+
const M = await W().completeImport(l, {
|
|
2691
2707
|
skipInvalidRows: !0,
|
|
2692
2708
|
acknowledgeWarnings: !0
|
|
2693
2709
|
});
|
|
2694
|
-
|
|
2695
|
-
} catch (
|
|
2696
|
-
const
|
|
2697
|
-
|
|
2710
|
+
_("complete"), t == null || t(M);
|
|
2711
|
+
} catch (F) {
|
|
2712
|
+
const M = F;
|
|
2713
|
+
P(M.message), o == null || o(M);
|
|
2698
2714
|
} finally {
|
|
2699
|
-
|
|
2715
|
+
I(!1);
|
|
2700
2716
|
}
|
|
2701
|
-
},
|
|
2702
|
-
|
|
2703
|
-
},
|
|
2704
|
-
switch (
|
|
2717
|
+
}, Ve = () => {
|
|
2718
|
+
q(), n == null || n();
|
|
2719
|
+
}, oe = () => ce.findIndex((F) => F.key === i), Je = () => {
|
|
2720
|
+
switch (i) {
|
|
2705
2721
|
case "upload":
|
|
2706
|
-
return
|
|
2722
|
+
return a !== null;
|
|
2707
2723
|
case "mapping":
|
|
2708
|
-
return
|
|
2724
|
+
return u.length > 0 && u.some((F) => F.targetKey !== null);
|
|
2709
2725
|
case "validation":
|
|
2710
|
-
return
|
|
2726
|
+
return g !== null;
|
|
2711
2727
|
case "review":
|
|
2712
2728
|
return !0;
|
|
2713
2729
|
default:
|
|
2714
2730
|
return !1;
|
|
2715
2731
|
}
|
|
2716
|
-
},
|
|
2717
|
-
switch (
|
|
2732
|
+
}, Qe = async () => {
|
|
2733
|
+
switch (i) {
|
|
2718
2734
|
case "mapping":
|
|
2719
|
-
await
|
|
2735
|
+
await U();
|
|
2720
2736
|
break;
|
|
2721
2737
|
case "validation":
|
|
2722
|
-
|
|
2738
|
+
$();
|
|
2723
2739
|
break;
|
|
2724
2740
|
case "review":
|
|
2725
|
-
await
|
|
2741
|
+
await Ye();
|
|
2726
2742
|
break;
|
|
2727
2743
|
default:
|
|
2728
|
-
|
|
2744
|
+
$();
|
|
2729
2745
|
}
|
|
2730
2746
|
};
|
|
2731
|
-
return /* @__PURE__ */
|
|
2747
|
+
return y ? /* @__PURE__ */ p("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: [
|
|
2748
|
+
/* @__PURE__ */ p("div", { className: "ff-w-16 ff-h-16 ff-bg-error-100 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", children: /* @__PURE__ */ p(me, { className: "ff-w-10 ff-h-10 ff-text-error-600" }) }),
|
|
2749
|
+
/* @__PURE__ */ p("h3", { className: "ff-text-xl ff-font-semibold ff-text-gray-900 ff-mb-2", children: "Configuration Error" }),
|
|
2750
|
+
/* @__PURE__ */ p("p", { className: "ff-text-gray-500 ff-text-center ff-max-w-md ff-mb-4", children: y }),
|
|
2751
|
+
n && /* @__PURE__ */ p("button", { onClick: Ve, className: "ff-btn ff-btn-secondary", children: "Close" })
|
|
2752
|
+
] }) }) : N ? /* @__PURE__ */ w("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-flex ff-flex-col ff-max-h-[90vh]", children: [
|
|
2732
2753
|
/* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-6 ff-py-4 ff-border-b ff-border-gray-200 ff-bg-gray-50 ff-flex-shrink-0", children: [
|
|
2733
2754
|
/* @__PURE__ */ p("h2", { className: "ff-text-xl ff-font-semibold ff-text-gray-900", children: "Import Data" }),
|
|
2734
2755
|
/* @__PURE__ */ p(
|
|
2735
2756
|
"button",
|
|
2736
2757
|
{
|
|
2737
|
-
onClick:
|
|
2758
|
+
onClick: Ve,
|
|
2738
2759
|
className: "ff-p-2 ff-text-gray-400 hover:ff-text-gray-600 ff-rounded-full hover:ff-bg-gray-100",
|
|
2739
|
-
children: /* @__PURE__ */ p(
|
|
2760
|
+
children: /* @__PURE__ */ p(me, { className: "ff-w-5 ff-h-5" })
|
|
2740
2761
|
}
|
|
2741
2762
|
)
|
|
2742
2763
|
] }),
|
|
2743
|
-
/* @__PURE__ */ p("div", { className: "ff-px-6 ff-py-4 ff-border-b ff-border-gray-200 ff-flex-shrink-0", children: /* @__PURE__ */ p("div", { className: "ff-flex ff-items-center ff-justify-between", children:
|
|
2744
|
-
const
|
|
2745
|
-
return /* @__PURE__ */ w(
|
|
2764
|
+
/* @__PURE__ */ p("div", { className: "ff-px-6 ff-py-4 ff-border-b ff-border-gray-200 ff-flex-shrink-0", children: /* @__PURE__ */ p("div", { className: "ff-flex ff-items-center ff-justify-between", children: ce.map((F, M) => {
|
|
2765
|
+
const G = F.icon, O = F.key === i, B = oe() > M, ie = oe() < M;
|
|
2766
|
+
return /* @__PURE__ */ w(tt.Fragment, { children: [
|
|
2746
2767
|
/* @__PURE__ */ w(
|
|
2747
2768
|
"div",
|
|
2748
2769
|
{
|
|
2749
|
-
className:
|
|
2770
|
+
className: L(
|
|
2750
2771
|
"ff-flex ff-items-center ff-gap-2",
|
|
2751
|
-
|
|
2772
|
+
O && "ff-text-primary-600",
|
|
2752
2773
|
B && "ff-text-success-600",
|
|
2753
|
-
|
|
2774
|
+
ie && "ff-text-gray-300"
|
|
2754
2775
|
),
|
|
2755
2776
|
children: [
|
|
2756
2777
|
/* @__PURE__ */ p(
|
|
2757
2778
|
"div",
|
|
2758
2779
|
{
|
|
2759
|
-
className:
|
|
2780
|
+
className: L(
|
|
2760
2781
|
"ff-flex ff-items-center ff-justify-center ff-w-8 ff-h-8 ff-rounded-full",
|
|
2761
|
-
|
|
2782
|
+
O && "ff-bg-primary-100",
|
|
2762
2783
|
B && "ff-bg-success-100",
|
|
2763
|
-
|
|
2784
|
+
ie && "ff-bg-gray-100"
|
|
2764
2785
|
),
|
|
2765
|
-
children: B ? /* @__PURE__ */ p(
|
|
2786
|
+
children: B ? /* @__PURE__ */ p(ne, { className: "ff-w-5 ff-h-5" }) : /* @__PURE__ */ p(G, { className: "ff-w-4 ff-h-4" })
|
|
2766
2787
|
}
|
|
2767
2788
|
),
|
|
2768
2789
|
/* @__PURE__ */ p(
|
|
2769
2790
|
"span",
|
|
2770
2791
|
{
|
|
2771
|
-
className:
|
|
2792
|
+
className: L(
|
|
2772
2793
|
"ff-text-sm ff-font-medium",
|
|
2773
|
-
|
|
2794
|
+
ie && "ff-text-gray-400"
|
|
2774
2795
|
),
|
|
2775
|
-
children:
|
|
2796
|
+
children: F.label
|
|
2776
2797
|
}
|
|
2777
2798
|
)
|
|
2778
2799
|
]
|
|
2779
2800
|
}
|
|
2780
2801
|
),
|
|
2781
|
-
|
|
2802
|
+
M < ce.length - 1 && /* @__PURE__ */ p(
|
|
2782
2803
|
"div",
|
|
2783
2804
|
{
|
|
2784
|
-
className:
|
|
2805
|
+
className: L(
|
|
2785
2806
|
"ff-flex-1 ff-h-0.5 ff-mx-4",
|
|
2786
2807
|
B ? "ff-bg-success-300" : "ff-bg-gray-200"
|
|
2787
2808
|
)
|
|
2788
2809
|
}
|
|
2789
2810
|
)
|
|
2790
|
-
] },
|
|
2811
|
+
] }, F.key);
|
|
2791
2812
|
}) }) }),
|
|
2792
2813
|
/* @__PURE__ */ w("div", { className: "ff-p-6 ff-min-h-[200px] ff-overflow-y-auto ff-flex-1", children: [
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
/* @__PURE__ */ p(
|
|
2798
|
-
/* @__PURE__ */ p(
|
|
2814
|
+
c && /* @__PURE__ */ p("div", { className: "ff-mb-4 ff-p-4 ff-bg-error-50 ff-border ff-border-error-200 ff-rounded-lg ff-text-error-700", children: c }),
|
|
2815
|
+
i === "upload" && /* @__PURE__ */ p("div", { className: "ff-max-w-xl ff-mx-auto", children: /* @__PURE__ */ p(ht, { onFileSelect: H }) }),
|
|
2816
|
+
i === "mapping" && /* @__PURE__ */ p(wt, {}),
|
|
2817
|
+
i === "validation" && /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
|
|
2818
|
+
/* @__PURE__ */ p(be, {}),
|
|
2819
|
+
/* @__PURE__ */ p(ke, { editable: !0 })
|
|
2799
2820
|
] }),
|
|
2800
|
-
|
|
2801
|
-
/* @__PURE__ */ p(
|
|
2802
|
-
/* @__PURE__ */ p(
|
|
2821
|
+
i === "review" && /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
|
|
2822
|
+
/* @__PURE__ */ p(be, { showDetails: !1 }),
|
|
2823
|
+
/* @__PURE__ */ p(ke, { editable: !1, pageSize: 10 })
|
|
2803
2824
|
] }),
|
|
2804
|
-
|
|
2805
|
-
/* @__PURE__ */ p("div", { className: "ff-w-16 ff-h-16 ff-bg-success-100 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", children: /* @__PURE__ */ p(
|
|
2825
|
+
i === "complete" && /* @__PURE__ */ w("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: [
|
|
2826
|
+
/* @__PURE__ */ p("div", { className: "ff-w-16 ff-h-16 ff-bg-success-100 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", children: /* @__PURE__ */ p(ne, { className: "ff-w-10 ff-h-10 ff-text-success-600" }) }),
|
|
2806
2827
|
/* @__PURE__ */ p("h3", { className: "ff-text-xl ff-font-semibold ff-text-gray-900 ff-mb-2", children: "Import Complete!" }),
|
|
2807
2828
|
/* @__PURE__ */ p("p", { className: "ff-text-gray-500", children: "Your data has been successfully imported." })
|
|
2808
2829
|
] })
|
|
2809
2830
|
] }),
|
|
2810
|
-
|
|
2831
|
+
i !== "complete" && /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-6 ff-py-4 ff-border-t ff-border-gray-200 ff-bg-gray-50 ff-flex-shrink-0", children: [
|
|
2811
2832
|
/* @__PURE__ */ p(
|
|
2812
2833
|
"button",
|
|
2813
2834
|
{
|
|
2814
|
-
onClick:
|
|
2815
|
-
disabled:
|
|
2835
|
+
onClick: E,
|
|
2836
|
+
disabled: oe() === 0 || d,
|
|
2816
2837
|
className: "ff-btn ff-btn-secondary",
|
|
2817
2838
|
children: "Back"
|
|
2818
2839
|
}
|
|
@@ -2820,24 +2841,27 @@ const Le = ({
|
|
|
2820
2841
|
/* @__PURE__ */ p(
|
|
2821
2842
|
"button",
|
|
2822
2843
|
{
|
|
2823
|
-
onClick:
|
|
2824
|
-
disabled: !
|
|
2844
|
+
onClick: Qe,
|
|
2845
|
+
disabled: !Je() || d,
|
|
2825
2846
|
className: "ff-btn ff-btn-primary",
|
|
2826
|
-
children:
|
|
2827
|
-
/* @__PURE__ */ p(
|
|
2847
|
+
children: d ? /* @__PURE__ */ w(et, { children: [
|
|
2848
|
+
/* @__PURE__ */ p(Ee, { className: "ff-w-4 ff-h-4 ff-mr-2 ff-animate-spin" }),
|
|
2828
2849
|
"Processing..."
|
|
2829
|
-
] }) :
|
|
2850
|
+
] }) : i === "review" ? "Complete Import" : "Continue"
|
|
2830
2851
|
}
|
|
2831
2852
|
)
|
|
2832
2853
|
] })
|
|
2833
|
-
] })
|
|
2854
|
+
] }) : /* @__PURE__ */ p("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: [
|
|
2855
|
+
/* @__PURE__ */ p(Ee, { className: "ff-w-10 ff-h-10 ff-text-primary-600 ff-animate-spin ff-mb-4" }),
|
|
2856
|
+
/* @__PURE__ */ p("p", { className: "ff-text-gray-500", children: "Loading template..." })
|
|
2857
|
+
] }) });
|
|
2834
2858
|
};
|
|
2835
2859
|
export {
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2860
|
+
wt as C,
|
|
2861
|
+
ke as D,
|
|
2862
|
+
ht as F,
|
|
2863
|
+
vn as I,
|
|
2864
|
+
be as V,
|
|
2841
2865
|
X as u
|
|
2842
2866
|
};
|
|
2843
|
-
//# sourceMappingURL=ImportWizard-
|
|
2867
|
+
//# sourceMappingURL=ImportWizard-CtAWJz5i.mjs.map
|