@fileflow/sdk 0.1.28 → 0.1.30
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-CfXF9gke.js → ImportWizard-G3oGN0nc.js} +17 -17
- package/dist/{ImportWizard-CfXF9gke.js.map → ImportWizard-G3oGN0nc.js.map} +1 -1
- package/dist/{ImportWizard-Bz5oRutK.mjs → ImportWizard-wwdBs7gE.mjs} +353 -360
- package/dist/{ImportWizard-Bz5oRutK.mjs.map → ImportWizard-wwdBs7gE.mjs.map} +1 -1
- package/dist/import.js +1 -1
- package/dist/import.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as d, jsxs as h, Fragment as
|
|
1
|
+
import { jsx as d, jsxs as h, Fragment as ne } from "react/jsx-runtime";
|
|
2
2
|
import * as Me from "react";
|
|
3
|
-
import
|
|
4
|
-
import { h as
|
|
3
|
+
import $t, { useCallback as Le, useState as q, useMemo as Qe, useEffect as Ye } from "react";
|
|
4
|
+
import { h as K, j as Nt, k as Mt, X as he, m as Y, U as it, n as ze, T as Ve, q as Vt, p as Ae, o as Je, t as Pt, d as kt, V as et, g as se, S as Ce, L as ce } from "./index-Dn3cI9sZ.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.563.0 - ISC
|
|
7
7
|
*
|
|
@@ -11,39 +11,39 @@ import { h as j, j as Mt, k as Vt, X as he, m as Y, U as it, n as ze, T as Ve, q
|
|
|
11
11
|
const bt = [
|
|
12
12
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
13
13
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
14
|
-
],
|
|
14
|
+
], Et = K("arrow-right", bt);
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v0.563.0 - ISC
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
const
|
|
21
|
+
const Dt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Lt = K("check", Dt);
|
|
22
22
|
/**
|
|
23
23
|
* @license lucide-react v0.563.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
27
|
*/
|
|
28
|
-
const
|
|
28
|
+
const zt = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], At = K("chevron-left", zt);
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v0.563.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
35
|
+
const Ht = [
|
|
36
36
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
37
37
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
38
38
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
39
|
-
],
|
|
39
|
+
], Gt = K("circle-question-mark", Ht);
|
|
40
40
|
/**
|
|
41
41
|
* @license lucide-react v0.563.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
const
|
|
46
|
+
const Ot = [
|
|
47
47
|
[
|
|
48
48
|
"path",
|
|
49
49
|
{
|
|
@@ -52,14 +52,14 @@ const Tt = [
|
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
55
|
-
],
|
|
55
|
+
], Tt = K("eye", Ot);
|
|
56
56
|
/**
|
|
57
57
|
* @license lucide-react v0.563.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
61
|
*/
|
|
62
|
-
const
|
|
62
|
+
const Bt = [
|
|
63
63
|
[
|
|
64
64
|
"path",
|
|
65
65
|
{
|
|
@@ -72,14 +72,14 @@ const Kt = [
|
|
|
72
72
|
["path", { d: "M14 13h2", key: "un5t4a" }],
|
|
73
73
|
["path", { d: "M8 17h2", key: "2yhykz" }],
|
|
74
74
|
["path", { d: "M14 17h2", key: "10kma7" }]
|
|
75
|
-
],
|
|
75
|
+
], Kt = K("file-spreadsheet", Bt);
|
|
76
76
|
/**
|
|
77
77
|
* @license lucide-react v0.563.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
81
|
*/
|
|
82
|
-
const
|
|
82
|
+
const jt = [
|
|
83
83
|
[
|
|
84
84
|
"path",
|
|
85
85
|
{
|
|
@@ -88,26 +88,26 @@ const qt = [
|
|
|
88
88
|
}
|
|
89
89
|
],
|
|
90
90
|
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
91
|
-
],
|
|
91
|
+
], qt = K("file", jt);
|
|
92
92
|
/**
|
|
93
93
|
* @license lucide-react v0.563.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
97
|
*/
|
|
98
|
-
const
|
|
98
|
+
const Ut = [
|
|
99
99
|
["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
|
|
100
100
|
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
101
101
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
102
102
|
["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
|
|
103
|
-
],
|
|
103
|
+
], Xt = K("git-branch", Ut);
|
|
104
104
|
/**
|
|
105
105
|
* @license lucide-react v0.563.0 - ISC
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
109
|
*/
|
|
110
|
-
const
|
|
110
|
+
const Zt = [
|
|
111
111
|
[
|
|
112
112
|
"path",
|
|
113
113
|
{
|
|
@@ -115,33 +115,33 @@ const Wt = [
|
|
|
115
115
|
key: "1a8usu"
|
|
116
116
|
}
|
|
117
117
|
]
|
|
118
|
-
],
|
|
118
|
+
], Wt = K("pen", Zt);
|
|
119
119
|
/**
|
|
120
120
|
* @license lucide-react v0.563.0 - ISC
|
|
121
121
|
*
|
|
122
122
|
* This source code is licensed under the ISC license.
|
|
123
123
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
124
|
*/
|
|
125
|
-
const
|
|
125
|
+
const Qt = [
|
|
126
126
|
[
|
|
127
127
|
"path",
|
|
128
128
|
{ d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
|
|
129
129
|
],
|
|
130
130
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
131
|
-
],
|
|
131
|
+
], Yt = K("square-check-big", Qt);
|
|
132
132
|
/**
|
|
133
133
|
* @license lucide-react v0.563.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
137
|
*/
|
|
138
|
-
const
|
|
138
|
+
const Jt = [
|
|
139
139
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
140
140
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
141
141
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
142
142
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
143
143
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
144
|
-
],
|
|
144
|
+
], en = K("trash-2", Jt), tt = {
|
|
145
145
|
sessionId: null,
|
|
146
146
|
status: "idle",
|
|
147
147
|
step: "upload",
|
|
@@ -163,7 +163,7 @@ const en = [
|
|
|
163
163
|
editingCell: null,
|
|
164
164
|
editedRows: /* @__PURE__ */ new Set()
|
|
165
165
|
};
|
|
166
|
-
function
|
|
166
|
+
function tn(e, o) {
|
|
167
167
|
var r;
|
|
168
168
|
const t = [], n = (e == null ? void 0 : e.trim()) || "";
|
|
169
169
|
if (o.required && !n)
|
|
@@ -376,9 +376,9 @@ function ye(e, o, t) {
|
|
|
376
376
|
for (const w of e)
|
|
377
377
|
for (const y of t) {
|
|
378
378
|
if (!y.targetKey) continue;
|
|
379
|
-
const
|
|
380
|
-
if (!
|
|
381
|
-
const $ = w.data[y.targetKey] || w.data[y.sourceColumn] || "", F =
|
|
379
|
+
const _ = o.columns.find((P) => P.key === y.targetKey);
|
|
380
|
+
if (!_) continue;
|
|
381
|
+
const $ = w.data[y.targetKey] || w.data[y.sourceColumn] || "", F = tn(String($), _);
|
|
382
382
|
for (const P of F)
|
|
383
383
|
n.push({ ...P, rowIndex: w.rowIndex });
|
|
384
384
|
}
|
|
@@ -386,14 +386,14 @@ function ye(e, o, t) {
|
|
|
386
386
|
for (const w of r) {
|
|
387
387
|
const y = t.find(($) => $.targetKey === w);
|
|
388
388
|
if (!y) continue;
|
|
389
|
-
const
|
|
389
|
+
const _ = /* @__PURE__ */ new Map();
|
|
390
390
|
for (const $ of e) {
|
|
391
391
|
const F = String($.data[w] || $.data[y.sourceColumn] || "").toLowerCase().trim();
|
|
392
392
|
if (!F) continue;
|
|
393
|
-
const P =
|
|
394
|
-
P.push($.rowIndex),
|
|
393
|
+
const P = _.get(F) || [];
|
|
394
|
+
P.push($.rowIndex), _.set(F, P);
|
|
395
395
|
}
|
|
396
|
-
for (const [$, F] of
|
|
396
|
+
for (const [$, F] of _.entries())
|
|
397
397
|
if (F.length > 1)
|
|
398
398
|
for (const P of F.slice(1))
|
|
399
399
|
n.push({
|
|
@@ -429,14 +429,14 @@ function ye(e, o, t) {
|
|
|
429
429
|
for (const w of r) {
|
|
430
430
|
const y = t.find(($) => $.targetKey === w);
|
|
431
431
|
if (!y) continue;
|
|
432
|
-
const
|
|
432
|
+
const _ = /* @__PURE__ */ new Map();
|
|
433
433
|
for (const $ of e) {
|
|
434
434
|
const F = String($.data[w] || $.data[y.sourceColumn] || "").toLowerCase().trim();
|
|
435
435
|
if (!F) continue;
|
|
436
|
-
const P =
|
|
437
|
-
P.push($.rowIndex),
|
|
436
|
+
const P = _.get(F) || [];
|
|
437
|
+
P.push($.rowIndex), _.set(F, P);
|
|
438
438
|
}
|
|
439
|
-
for (const [$, F] of
|
|
439
|
+
for (const [$, F] of _.entries())
|
|
440
440
|
F.length > 1 && m.push({ columnKey: w, value: $, rowIndices: F });
|
|
441
441
|
}
|
|
442
442
|
const v = {
|
|
@@ -458,7 +458,7 @@ function ye(e, o, t) {
|
|
|
458
458
|
errorsByRow: l
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const oe = Nt((e, o) => ({
|
|
462
462
|
...tt,
|
|
463
463
|
setSchema: (t) => e({ schema: t }),
|
|
464
464
|
setSessionId: (t) => e({ sessionId: t }),
|
|
@@ -548,13 +548,13 @@ const re = Mt((e, o) => ({
|
|
|
548
548
|
setLoading: (t) => e({ isLoading: t }),
|
|
549
549
|
setError: (t) => e({ error: t }),
|
|
550
550
|
reset: () => e(tt)
|
|
551
|
-
})),
|
|
551
|
+
})), nn = ({
|
|
552
552
|
onFileSelect: e,
|
|
553
553
|
maxSize: o = 50 * 1024 * 1024,
|
|
554
554
|
// 50MB
|
|
555
555
|
acceptedTypes: t = [".csv", ".xlsx", ".xls"]
|
|
556
556
|
}) => {
|
|
557
|
-
const { file: n, fileName: r, fileSize: l, setFile: s, error: i, setError: u, isLoading: f } =
|
|
557
|
+
const { file: n, fileName: r, fileSize: l, setFile: s, error: i, setError: u, isLoading: f } = oe(), p = Le(
|
|
558
558
|
(C, w) => {
|
|
559
559
|
if (w.length > 0) {
|
|
560
560
|
u("Invalid file type or file too large");
|
|
@@ -566,7 +566,7 @@ const re = Mt((e, o) => ({
|
|
|
566
566
|
}
|
|
567
567
|
},
|
|
568
568
|
[e, s, u]
|
|
569
|
-
), { getRootProps: g, getInputProps: c, isDragActive: a } =
|
|
569
|
+
), { getRootProps: g, getInputProps: c, isDragActive: a } = Mt({
|
|
570
570
|
onDrop: p,
|
|
571
571
|
accept: {
|
|
572
572
|
"text/csv": [".csv"],
|
|
@@ -577,10 +577,10 @@ const re = Mt((e, o) => ({
|
|
|
577
577
|
multiple: !1,
|
|
578
578
|
disabled: f
|
|
579
579
|
}), m = (C) => C < 1024 ? `${C} B` : C < 1024 * 1024 ? `${(C / 1024).toFixed(1)} KB` : `${(C / (1024 * 1024)).toFixed(1)} MB`, v = (C) => {
|
|
580
|
-
C.stopPropagation(),
|
|
580
|
+
C.stopPropagation(), oe.getState().reset();
|
|
581
581
|
};
|
|
582
582
|
return n ? /* @__PURE__ */ d("div", { className: "ff-p-4 ff-rounded-xl ff-border", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: /* @__PURE__ */ h("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
|
|
583
|
-
/* @__PURE__ */ d("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ d(
|
|
583
|
+
/* @__PURE__ */ d("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ d(qt, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
|
|
584
584
|
/* @__PURE__ */ h("div", { className: "ff-flex-1 ff-min-w-0", children: [
|
|
585
585
|
/* @__PURE__ */ d("p", { className: "ff-font-medium ff-truncate", style: { color: "var(--ff-success-dark)" }, children: r }),
|
|
586
586
|
/* @__PURE__ */ d("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: m(l || 0) })
|
|
@@ -628,8 +628,8 @@ const re = Mt((e, o) => ({
|
|
|
628
628
|
/* @__PURE__ */ d("p", { children: i })
|
|
629
629
|
] })
|
|
630
630
|
] });
|
|
631
|
-
},
|
|
632
|
-
const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } =
|
|
631
|
+
}, on = ({ onMappingChange: e }) => {
|
|
632
|
+
const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = oe(), l = (t == null ? void 0 : t.columns) || [], s = (g, c) => {
|
|
633
633
|
const a = c === "" ? null : c;
|
|
634
634
|
r(g, a), e == null || e(g, a);
|
|
635
635
|
}, i = (g) => g >= 0.85 ? "var(--ff-success)" : g >= 0.6 ? "var(--ff-warning)" : "var(--ff-error)", u = (g) => g >= 0.85 ? "High" : g >= 0.6 ? "Medium" : "Low", p = new Set(
|
|
@@ -669,7 +669,7 @@ const re = Mt((e, o) => ({
|
|
|
669
669
|
),
|
|
670
670
|
children: [
|
|
671
671
|
/* @__PURE__ */ d("div", { className: "ff-flex-1", children: /* @__PURE__ */ d("div", { className: "ff-mapping-source", children: g.sourceColumn }) }),
|
|
672
|
-
/* @__PURE__ */ d("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ d(
|
|
672
|
+
/* @__PURE__ */ d("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ d(Et, { className: "ff-w-5 ff-h-5" }) }),
|
|
673
673
|
/* @__PURE__ */ d("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ h(
|
|
674
674
|
"select",
|
|
675
675
|
{
|
|
@@ -696,7 +696,7 @@ const re = Mt((e, o) => ({
|
|
|
696
696
|
]
|
|
697
697
|
}
|
|
698
698
|
) }),
|
|
699
|
-
/* @__PURE__ */ d("div", { className: "ff-mapping-status", children: c ? a ? /* @__PURE__ */ d(
|
|
699
|
+
/* @__PURE__ */ d("div", { className: "ff-mapping-status", children: c ? a ? /* @__PURE__ */ d(Lt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ d(Gt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ d("span", { className: "ff-w-5 ff-h-5" }) }),
|
|
700
700
|
g.confidence > 0 && /* @__PURE__ */ h("div", { className: "ff-confidence", style: { color: i(g.confidence) }, children: [
|
|
701
701
|
/* @__PURE__ */ h("span", { children: [
|
|
702
702
|
Math.round(g.confidence * 100),
|
|
@@ -737,7 +737,7 @@ const re = Mt((e, o) => ({
|
|
|
737
737
|
*
|
|
738
738
|
* @license MIT
|
|
739
739
|
*/
|
|
740
|
-
function
|
|
740
|
+
function rn() {
|
|
741
741
|
return {
|
|
742
742
|
accessor: (e, o) => typeof e == "function" ? {
|
|
743
743
|
...o,
|
|
@@ -753,7 +753,7 @@ function ln() {
|
|
|
753
753
|
function Q(e, o) {
|
|
754
754
|
return typeof e == "function" ? e(o) : e;
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function O(e, o) {
|
|
757
757
|
return (t) => {
|
|
758
758
|
o.setState((n) => ({
|
|
759
759
|
...n,
|
|
@@ -764,10 +764,10 @@ function T(e, o) {
|
|
|
764
764
|
function ve(e) {
|
|
765
765
|
return e instanceof Function;
|
|
766
766
|
}
|
|
767
|
-
function
|
|
767
|
+
function ln(e) {
|
|
768
768
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function sn(e, o) {
|
|
771
771
|
const t = [], n = (r) => {
|
|
772
772
|
r.forEach((l) => {
|
|
773
773
|
t.push(l);
|
|
@@ -811,7 +811,7 @@ function R(e, o, t, n) {
|
|
|
811
811
|
onChange: n
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function an(e, o, t, n) {
|
|
815
815
|
const r = () => {
|
|
816
816
|
var s;
|
|
817
817
|
return (s = l.getValue()) != null ? s : e.options.renderFallbackValue;
|
|
@@ -834,7 +834,7 @@ function un(e, o, t, n) {
|
|
|
834
834
|
s.createCell == null || s.createCell(l, t, o, e);
|
|
835
835
|
}, {}), l;
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function un(e, o, t, n) {
|
|
838
838
|
var r, l;
|
|
839
839
|
const i = {
|
|
840
840
|
...e._getDefaultColumnDef(),
|
|
@@ -874,7 +874,7 @@ function fn(e, o, t, n) {
|
|
|
874
874
|
c.createColumn == null || c.createColumn(g, e);
|
|
875
875
|
return g;
|
|
876
876
|
}
|
|
877
|
-
const
|
|
877
|
+
const D = "debugHeaders";
|
|
878
878
|
function nt(e, o, t) {
|
|
879
879
|
var n;
|
|
880
880
|
let l = {
|
|
@@ -904,33 +904,33 @@ function nt(e, o, t) {
|
|
|
904
904
|
s.createHeader == null || s.createHeader(l, e);
|
|
905
905
|
}), l;
|
|
906
906
|
}
|
|
907
|
-
const
|
|
907
|
+
const fn = {
|
|
908
908
|
createTable: (e) => {
|
|
909
909
|
e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
|
|
910
910
|
var l, s;
|
|
911
911
|
const i = (l = n == null ? void 0 : n.map((g) => t.find((c) => c.id === g)).filter(Boolean)) != null ? l : [], u = (s = r == null ? void 0 : r.map((g) => t.find((c) => c.id === g)).filter(Boolean)) != null ? s : [], f = t.filter((g) => !(n != null && n.includes(g.id)) && !(r != null && r.includes(g.id)));
|
|
912
912
|
return ge(o, [...i, ...f, ...u], e);
|
|
913
|
-
}, R(e.options,
|
|
913
|
+
}, R(e.options, D, "getHeaderGroups")), e.getCenterHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), ge(o, t, e, "center")), R(e.options, D, "getCenterHeaderGroups")), e.getLeftHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
|
914
914
|
var r;
|
|
915
915
|
const l = (r = n == null ? void 0 : n.map((s) => t.find((i) => i.id === s)).filter(Boolean)) != null ? r : [];
|
|
916
916
|
return ge(o, l, e, "left");
|
|
917
|
-
}, R(e.options,
|
|
917
|
+
}, R(e.options, D, "getLeftHeaderGroups")), e.getRightHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
|
|
918
918
|
var r;
|
|
919
919
|
const l = (r = n == null ? void 0 : n.map((s) => t.find((i) => i.id === s)).filter(Boolean)) != null ? r : [];
|
|
920
920
|
return ge(o, l, e, "right");
|
|
921
|
-
}, R(e.options,
|
|
921
|
+
}, R(e.options, D, "getRightHeaderGroups")), e.getFooterGroups = S(() => [e.getHeaderGroups()], (o) => [...o].reverse(), R(e.options, D, "getFooterGroups")), e.getLeftFooterGroups = S(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), R(e.options, D, "getLeftFooterGroups")), e.getCenterFooterGroups = S(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), R(e.options, D, "getCenterFooterGroups")), e.getRightFooterGroups = S(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), R(e.options, D, "getRightFooterGroups")), e.getFlatHeaders = S(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, D, "getFlatHeaders")), e.getLeftFlatHeaders = S(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, D, "getLeftFlatHeaders")), e.getCenterFlatHeaders = S(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, D, "getCenterFlatHeaders")), e.getRightFlatHeaders = S(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, D, "getRightFlatHeaders")), e.getCenterLeafHeaders = S(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
922
922
|
var n;
|
|
923
923
|
return !((n = t.subHeaders) != null && n.length);
|
|
924
|
-
}), R(e.options,
|
|
924
|
+
}), R(e.options, D, "getCenterLeafHeaders")), e.getLeftLeafHeaders = S(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
|
925
925
|
var n;
|
|
926
926
|
return !((n = t.subHeaders) != null && n.length);
|
|
927
|
-
}), R(e.options,
|
|
927
|
+
}), R(e.options, D, "getLeftLeafHeaders")), e.getRightLeafHeaders = S(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
|
928
928
|
var n;
|
|
929
929
|
return !((n = t.subHeaders) != null && n.length);
|
|
930
|
-
}), R(e.options,
|
|
930
|
+
}), R(e.options, D, "getRightLeafHeaders")), e.getLeafHeaders = S(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
931
931
|
var r, l, s, i, u, f;
|
|
932
932
|
return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(s = (i = t[0]) == null ? void 0 : i.headers) != null ? s : [], ...(u = (f = n[0]) == null ? void 0 : f.headers) != null ? u : []].map((p) => p.getLeafHeaders()).flat();
|
|
933
|
-
}, R(e.options,
|
|
933
|
+
}, R(e.options, D, "getLeafHeaders"));
|
|
934
934
|
}
|
|
935
935
|
};
|
|
936
936
|
function ge(e, o, t, n) {
|
|
@@ -952,14 +952,14 @@ function ge(e, o, t, n) {
|
|
|
952
952
|
}, v = [];
|
|
953
953
|
c.forEach((C) => {
|
|
954
954
|
const w = [...v].reverse()[0], y = C.column.depth === m.depth;
|
|
955
|
-
let
|
|
956
|
-
if (y && C.column.parent ?
|
|
955
|
+
let _, $ = !1;
|
|
956
|
+
if (y && C.column.parent ? _ = C.column.parent : (_ = C.column, $ = !0), w && (w == null ? void 0 : w.column) === _)
|
|
957
957
|
w.subHeaders.push(C);
|
|
958
958
|
else {
|
|
959
|
-
const F = nt(t,
|
|
960
|
-
id: [n, a,
|
|
959
|
+
const F = nt(t, _, {
|
|
960
|
+
id: [n, a, _.id, C == null ? void 0 : C.id].filter(Boolean).join("_"),
|
|
961
961
|
isPlaceholder: $,
|
|
962
|
-
placeholderId: $ ? `${v.filter((P) => P.column ===
|
|
962
|
+
placeholderId: $ ? `${v.filter((P) => P.column === _).length}` : void 0,
|
|
963
963
|
depth: a,
|
|
964
964
|
index: v.length
|
|
965
965
|
});
|
|
@@ -974,11 +974,11 @@ function ge(e, o, t, n) {
|
|
|
974
974
|
f(p, s - 1), u.reverse();
|
|
975
975
|
const g = (c) => c.filter((m) => m.column.getIsVisible()).map((m) => {
|
|
976
976
|
let v = 0, C = 0, w = [0];
|
|
977
|
-
m.subHeaders && m.subHeaders.length ? (w = [], g(m.subHeaders).forEach((
|
|
977
|
+
m.subHeaders && m.subHeaders.length ? (w = [], g(m.subHeaders).forEach((_) => {
|
|
978
978
|
let {
|
|
979
979
|
colSpan: $,
|
|
980
980
|
rowSpan: F
|
|
981
|
-
} =
|
|
981
|
+
} = _;
|
|
982
982
|
v += $, w.push(F);
|
|
983
983
|
})) : v = 1;
|
|
984
984
|
const y = Math.min(...w);
|
|
@@ -1017,7 +1017,7 @@ const He = (e, o, t, n, r, l, s) => {
|
|
|
1017
1017
|
return (f = i.getValue(u)) != null ? f : e.options.renderFallbackValue;
|
|
1018
1018
|
},
|
|
1019
1019
|
subRows: [],
|
|
1020
|
-
getLeafRows: () =>
|
|
1020
|
+
getLeafRows: () => sn(i.subRows, (u) => u.subRows),
|
|
1021
1021
|
getParentRow: () => i.parentId ? e.getRow(i.parentId, !0) : void 0,
|
|
1022
1022
|
getParentRows: () => {
|
|
1023
1023
|
let u = [], f = i;
|
|
@@ -1028,7 +1028,7 @@ const He = (e, o, t, n, r, l, s) => {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
return u.reverse();
|
|
1030
1030
|
},
|
|
1031
|
-
getAllCells: S(() => [e.getAllLeafColumns()], (u) => u.map((f) =>
|
|
1031
|
+
getAllCells: S(() => [e.getAllLeafColumns()], (u) => u.map((f) => an(e, i, f, f.id)), R(e.options, "debugRows", "getAllCells")),
|
|
1032
1032
|
_getAllCellsByColumnId: S(() => [i.getAllCells()], (u) => u.reduce((f, p) => (f[p.column.id] = p, f), {}), R(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
1033
1033
|
};
|
|
1034
1034
|
for (let u = 0; u < e._features.length; u++) {
|
|
@@ -1036,7 +1036,7 @@ const He = (e, o, t, n, r, l, s) => {
|
|
|
1036
1036
|
f == null || f.createRow == null || f.createRow(i, e);
|
|
1037
1037
|
}
|
|
1038
1038
|
return i;
|
|
1039
|
-
},
|
|
1039
|
+
}, dn = {
|
|
1040
1040
|
createColumn: (e, o) => {
|
|
1041
1041
|
e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
|
|
1042
1042
|
if (e._getFacetedMinMaxValues)
|
|
@@ -1048,36 +1048,36 @@ const He = (e, o, t, n, r, l, s) => {
|
|
|
1048
1048
|
const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
1049
1049
|
return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
|
|
1050
1050
|
};
|
|
1051
|
-
at.autoRemove = (e) =>
|
|
1051
|
+
at.autoRemove = (e) => B(e);
|
|
1052
1052
|
const ut = (e, o, t) => {
|
|
1053
1053
|
var n;
|
|
1054
1054
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
1055
1055
|
};
|
|
1056
|
-
ut.autoRemove = (e) =>
|
|
1056
|
+
ut.autoRemove = (e) => B(e);
|
|
1057
1057
|
const ft = (e, o, t) => {
|
|
1058
1058
|
var n;
|
|
1059
1059
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
1060
1060
|
};
|
|
1061
|
-
ft.autoRemove = (e) =>
|
|
1061
|
+
ft.autoRemove = (e) => B(e);
|
|
1062
1062
|
const dt = (e, o, t) => {
|
|
1063
1063
|
var n;
|
|
1064
1064
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
1065
1065
|
};
|
|
1066
|
-
dt.autoRemove = (e) =>
|
|
1066
|
+
dt.autoRemove = (e) => B(e);
|
|
1067
1067
|
const ct = (e, o, t) => !t.some((n) => {
|
|
1068
1068
|
var r;
|
|
1069
1069
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
|
1070
1070
|
});
|
|
1071
|
-
ct.autoRemove = (e) =>
|
|
1071
|
+
ct.autoRemove = (e) => B(e) || !(e != null && e.length);
|
|
1072
1072
|
const gt = (e, o, t) => t.some((n) => {
|
|
1073
1073
|
var r;
|
|
1074
1074
|
return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
|
|
1075
1075
|
});
|
|
1076
|
-
gt.autoRemove = (e) =>
|
|
1076
|
+
gt.autoRemove = (e) => B(e) || !(e != null && e.length);
|
|
1077
1077
|
const pt = (e, o, t) => e.getValue(o) === t;
|
|
1078
|
-
pt.autoRemove = (e) =>
|
|
1078
|
+
pt.autoRemove = (e) => B(e);
|
|
1079
1079
|
const mt = (e, o, t) => e.getValue(o) == t;
|
|
1080
|
-
mt.autoRemove = (e) =>
|
|
1080
|
+
mt.autoRemove = (e) => B(e);
|
|
1081
1081
|
const Ge = (e, o, t) => {
|
|
1082
1082
|
let [n, r] = t;
|
|
1083
1083
|
const l = e.getValue(o);
|
|
@@ -1091,7 +1091,7 @@ Ge.resolveFilterValue = (e) => {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
return [l, s];
|
|
1093
1093
|
};
|
|
1094
|
-
Ge.autoRemove = (e) =>
|
|
1094
|
+
Ge.autoRemove = (e) => B(e) || B(e[0]) && B(e[1]);
|
|
1095
1095
|
const W = {
|
|
1096
1096
|
includesString: at,
|
|
1097
1097
|
includesStringSensitive: ut,
|
|
@@ -1103,10 +1103,10 @@ const W = {
|
|
|
1103
1103
|
weakEquals: mt,
|
|
1104
1104
|
inNumberRange: Ge
|
|
1105
1105
|
};
|
|
1106
|
-
function
|
|
1106
|
+
function B(e) {
|
|
1107
1107
|
return e == null || e === "";
|
|
1108
1108
|
}
|
|
1109
|
-
const
|
|
1109
|
+
const cn = {
|
|
1110
1110
|
getDefaultColumnDef: () => ({
|
|
1111
1111
|
filterFn: "auto"
|
|
1112
1112
|
}),
|
|
@@ -1115,7 +1115,7 @@ const gn = {
|
|
|
1115
1115
|
...e
|
|
1116
1116
|
}),
|
|
1117
1117
|
getDefaultOptions: (e) => ({
|
|
1118
|
-
onColumnFiltersChange:
|
|
1118
|
+
onColumnFiltersChange: O("columnFilters", e),
|
|
1119
1119
|
filterFromLeafRows: !1,
|
|
1120
1120
|
maxLeafRowFilterDepth: 100
|
|
1121
1121
|
}),
|
|
@@ -1184,54 +1184,54 @@ const gn = {
|
|
|
1184
1184
|
function ot(e, o, t) {
|
|
1185
1185
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
|
1186
1186
|
}
|
|
1187
|
-
const
|
|
1187
|
+
const gn = (e, o, t) => t.reduce((n, r) => {
|
|
1188
1188
|
const l = r.getValue(e);
|
|
1189
1189
|
return n + (typeof l == "number" ? l : 0);
|
|
1190
|
-
}, 0),
|
|
1190
|
+
}, 0), pn = (e, o, t) => {
|
|
1191
1191
|
let n;
|
|
1192
1192
|
return t.forEach((r) => {
|
|
1193
1193
|
const l = r.getValue(e);
|
|
1194
1194
|
l != null && (n > l || n === void 0 && l >= l) && (n = l);
|
|
1195
1195
|
}), n;
|
|
1196
|
-
},
|
|
1196
|
+
}, mn = (e, o, t) => {
|
|
1197
1197
|
let n;
|
|
1198
1198
|
return t.forEach((r) => {
|
|
1199
1199
|
const l = r.getValue(e);
|
|
1200
1200
|
l != null && (n < l || n === void 0 && l >= l) && (n = l);
|
|
1201
1201
|
}), n;
|
|
1202
|
-
},
|
|
1202
|
+
}, hn = (e, o, t) => {
|
|
1203
1203
|
let n, r;
|
|
1204
1204
|
return t.forEach((l) => {
|
|
1205
1205
|
const s = l.getValue(e);
|
|
1206
1206
|
s != null && (n === void 0 ? s >= s && (n = r = s) : (n > s && (n = s), r < s && (r = s)));
|
|
1207
1207
|
}), [n, r];
|
|
1208
|
-
},
|
|
1208
|
+
}, vn = (e, o) => {
|
|
1209
1209
|
let t = 0, n = 0;
|
|
1210
1210
|
if (o.forEach((r) => {
|
|
1211
1211
|
let l = r.getValue(e);
|
|
1212
1212
|
l != null && (l = +l) >= l && (++t, n += l);
|
|
1213
1213
|
}), t) return n / t;
|
|
1214
|
-
},
|
|
1214
|
+
}, wn = (e, o) => {
|
|
1215
1215
|
if (!o.length)
|
|
1216
1216
|
return;
|
|
1217
1217
|
const t = o.map((l) => l.getValue(e));
|
|
1218
|
-
if (!
|
|
1218
|
+
if (!ln(t))
|
|
1219
1219
|
return;
|
|
1220
1220
|
if (t.length === 1)
|
|
1221
1221
|
return t[0];
|
|
1222
1222
|
const n = Math.floor(t.length / 2), r = t.sort((l, s) => l - s);
|
|
1223
1223
|
return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
|
|
1224
|
-
},
|
|
1225
|
-
sum:
|
|
1226
|
-
min:
|
|
1227
|
-
max:
|
|
1228
|
-
extent:
|
|
1229
|
-
mean:
|
|
1230
|
-
median:
|
|
1231
|
-
unique:
|
|
1232
|
-
uniqueCount:
|
|
1233
|
-
count:
|
|
1234
|
-
},
|
|
1224
|
+
}, Cn = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), yn = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Sn = (e, o) => o.length, Se = {
|
|
1225
|
+
sum: gn,
|
|
1226
|
+
min: pn,
|
|
1227
|
+
max: mn,
|
|
1228
|
+
extent: hn,
|
|
1229
|
+
mean: vn,
|
|
1230
|
+
median: wn,
|
|
1231
|
+
unique: Cn,
|
|
1232
|
+
uniqueCount: yn,
|
|
1233
|
+
count: Sn
|
|
1234
|
+
}, Rn = {
|
|
1235
1235
|
getDefaultColumnDef: () => ({
|
|
1236
1236
|
aggregatedCell: (e) => {
|
|
1237
1237
|
var o, t;
|
|
@@ -1244,7 +1244,7 @@ const pn = (e, o, t) => t.reduce((n, r) => {
|
|
|
1244
1244
|
...e
|
|
1245
1245
|
}),
|
|
1246
1246
|
getDefaultOptions: (e) => ({
|
|
1247
|
-
onGroupingChange:
|
|
1247
|
+
onGroupingChange: O("grouping", e),
|
|
1248
1248
|
groupedColumnMode: "reorder"
|
|
1249
1249
|
}),
|
|
1250
1250
|
createColumn: (e, o) => {
|
|
@@ -1298,19 +1298,19 @@ const pn = (e, o, t) => t.reduce((n, r) => {
|
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
1300
|
};
|
|
1301
|
-
function
|
|
1301
|
+
function xn(e, o, t) {
|
|
1302
1302
|
if (!(o != null && o.length) || !t)
|
|
1303
1303
|
return e;
|
|
1304
1304
|
const n = e.filter((l) => !o.includes(l.id));
|
|
1305
1305
|
return t === "remove" ? n : [...o.map((l) => e.find((s) => s.id === l)).filter(Boolean), ...n];
|
|
1306
1306
|
}
|
|
1307
|
-
const
|
|
1307
|
+
const _n = {
|
|
1308
1308
|
getInitialState: (e) => ({
|
|
1309
1309
|
columnOrder: [],
|
|
1310
1310
|
...e
|
|
1311
1311
|
}),
|
|
1312
1312
|
getDefaultOptions: (e) => ({
|
|
1313
|
-
onColumnOrderChange:
|
|
1313
|
+
onColumnOrderChange: O("columnOrder", e)
|
|
1314
1314
|
}),
|
|
1315
1315
|
createColumn: (e, o) => {
|
|
1316
1316
|
e.getIndex = S((t) => [ae(o, t)], (t) => t.findIndex((n) => n.id === e.id), R(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
@@ -1338,19 +1338,19 @@ const Fn = {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
l = [...l, ...i];
|
|
1340
1340
|
}
|
|
1341
|
-
return
|
|
1341
|
+
return xn(l, t, n);
|
|
1342
1342
|
}, R(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
1343
1343
|
}
|
|
1344
1344
|
}, Re = () => ({
|
|
1345
1345
|
left: [],
|
|
1346
1346
|
right: []
|
|
1347
|
-
}),
|
|
1347
|
+
}), Fn = {
|
|
1348
1348
|
getInitialState: (e) => ({
|
|
1349
1349
|
columnPinning: Re(),
|
|
1350
1350
|
...e
|
|
1351
1351
|
}),
|
|
1352
1352
|
getDefaultOptions: (e) => ({
|
|
1353
|
-
onColumnPinningChange:
|
|
1353
|
+
onColumnPinningChange: O("columnPinning", e)
|
|
1354
1354
|
}),
|
|
1355
1355
|
createColumn: (e, o) => {
|
|
1356
1356
|
e.pin = (t) => {
|
|
@@ -1421,7 +1421,7 @@ const Fn = {
|
|
|
1421
1421
|
}, R(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
1422
1422
|
}
|
|
1423
1423
|
};
|
|
1424
|
-
function
|
|
1424
|
+
function In(e) {
|
|
1425
1425
|
return e || (typeof document < "u" ? document : null);
|
|
1426
1426
|
}
|
|
1427
1427
|
const pe = {
|
|
@@ -1435,7 +1435,7 @@ const pe = {
|
|
|
1435
1435
|
deltaPercentage: null,
|
|
1436
1436
|
isResizingColumn: !1,
|
|
1437
1437
|
columnSizingStart: []
|
|
1438
|
-
}),
|
|
1438
|
+
}), $n = {
|
|
1439
1439
|
getDefaultColumnDef: () => pe,
|
|
1440
1440
|
getInitialState: (e) => ({
|
|
1441
1441
|
columnSizing: {},
|
|
@@ -1445,8 +1445,8 @@ const pe = {
|
|
|
1445
1445
|
getDefaultOptions: (e) => ({
|
|
1446
1446
|
columnResizeMode: "onEnd",
|
|
1447
1447
|
columnResizeDirection: "ltr",
|
|
1448
|
-
onColumnSizingChange:
|
|
1449
|
-
onColumnSizingInfoChange:
|
|
1448
|
+
onColumnSizingChange: O("columnSizing", e),
|
|
1449
|
+
onColumnSizingInfoChange: O("columnSizingInfo", e)
|
|
1450
1450
|
}),
|
|
1451
1451
|
createColumn: (e, o) => {
|
|
1452
1452
|
e.getSize = () => {
|
|
@@ -1490,19 +1490,19 @@ const pe = {
|
|
|
1490
1490
|
if (!n || !r || (l.persist == null || l.persist(), _e(l) && l.touches && l.touches.length > 1))
|
|
1491
1491
|
return;
|
|
1492
1492
|
const s = e.getSize(), i = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], u = _e(l) ? Math.round(l.touches[0].clientX) : l.clientX, f = {}, p = (w, y) => {
|
|
1493
|
-
typeof y == "number" && (o.setColumnSizingInfo((
|
|
1493
|
+
typeof y == "number" && (o.setColumnSizingInfo((_) => {
|
|
1494
1494
|
var $, F;
|
|
1495
|
-
const P = o.options.columnResizeDirection === "rtl" ? -1 : 1,
|
|
1496
|
-
return
|
|
1497
|
-
let [
|
|
1498
|
-
f[
|
|
1495
|
+
const P = o.options.columnResizeDirection === "rtl" ? -1 : 1, U = (y - (($ = _ == null ? void 0 : _.startOffset) != null ? $ : 0)) * P, ee = Math.max(U / ((F = _ == null ? void 0 : _.startSize) != null ? F : 0), -0.999999);
|
|
1496
|
+
return _.columnSizingStart.forEach((z) => {
|
|
1497
|
+
let [H, te] = z;
|
|
1498
|
+
f[H] = Math.round(Math.max(te + te * ee, 0) * 100) / 100;
|
|
1499
1499
|
}), {
|
|
1500
|
-
...
|
|
1501
|
-
deltaOffset:
|
|
1500
|
+
..._,
|
|
1501
|
+
deltaOffset: U,
|
|
1502
1502
|
deltaPercentage: ee
|
|
1503
1503
|
};
|
|
1504
|
-
}), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((
|
|
1505
|
-
...
|
|
1504
|
+
}), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((_) => ({
|
|
1505
|
+
..._,
|
|
1506
1506
|
...f
|
|
1507
1507
|
})));
|
|
1508
1508
|
}, g = (w) => p("move", w), c = (w) => {
|
|
@@ -1515,7 +1515,7 @@ const pe = {
|
|
|
1515
1515
|
deltaPercentage: null,
|
|
1516
1516
|
columnSizingStart: []
|
|
1517
1517
|
}));
|
|
1518
|
-
}, a =
|
|
1518
|
+
}, a = In(t), m = {
|
|
1519
1519
|
moveHandler: (w) => g(w.clientX),
|
|
1520
1520
|
upHandler: (w) => {
|
|
1521
1521
|
a == null || a.removeEventListener("mousemove", m.moveHandler), a == null || a.removeEventListener("mouseup", m.upHandler), c(w.clientX);
|
|
@@ -1526,7 +1526,7 @@ const pe = {
|
|
|
1526
1526
|
var y;
|
|
1527
1527
|
a == null || a.removeEventListener("touchmove", v.moveHandler), a == null || a.removeEventListener("touchend", v.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), c((y = w.touches[0]) == null ? void 0 : y.clientX);
|
|
1528
1528
|
}
|
|
1529
|
-
}, C =
|
|
1529
|
+
}, C = Nn() ? {
|
|
1530
1530
|
passive: !1
|
|
1531
1531
|
} : !1;
|
|
1532
1532
|
_e(l) ? (a == null || a.addEventListener("touchmove", v.moveHandler, C), a == null || a.addEventListener("touchend", v.upHandler, C)) : (a == null || a.addEventListener("mousemove", m.moveHandler, C), a == null || a.addEventListener("mouseup", m.upHandler, C)), o.setColumnSizingInfo((w) => ({
|
|
@@ -1564,7 +1564,7 @@ const pe = {
|
|
|
1564
1564
|
}
|
|
1565
1565
|
};
|
|
1566
1566
|
let me = null;
|
|
1567
|
-
function
|
|
1567
|
+
function Nn() {
|
|
1568
1568
|
if (typeof me == "boolean") return me;
|
|
1569
1569
|
let e = !1;
|
|
1570
1570
|
try {
|
|
@@ -1583,13 +1583,13 @@ function Mn() {
|
|
|
1583
1583
|
function _e(e) {
|
|
1584
1584
|
return e.type === "touchstart";
|
|
1585
1585
|
}
|
|
1586
|
-
const
|
|
1586
|
+
const Mn = {
|
|
1587
1587
|
getInitialState: (e) => ({
|
|
1588
1588
|
columnVisibility: {},
|
|
1589
1589
|
...e
|
|
1590
1590
|
}),
|
|
1591
1591
|
getDefaultOptions: (e) => ({
|
|
1592
|
-
onColumnVisibilityChange:
|
|
1592
|
+
onColumnVisibilityChange: O("columnVisibility", e)
|
|
1593
1593
|
}),
|
|
1594
1594
|
createColumn: (e, o) => {
|
|
1595
1595
|
e.toggleVisibility = (t) => {
|
|
@@ -1631,20 +1631,20 @@ const Vn = {
|
|
|
1631
1631
|
function ae(e, o) {
|
|
1632
1632
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
1633
1633
|
}
|
|
1634
|
-
const
|
|
1634
|
+
const Vn = {
|
|
1635
1635
|
createTable: (e) => {
|
|
1636
1636
|
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 = () => {
|
|
1637
1637
|
if (e._getGlobalFacetedMinMaxValues)
|
|
1638
1638
|
return e._getGlobalFacetedMinMaxValues();
|
|
1639
1639
|
};
|
|
1640
1640
|
}
|
|
1641
|
-
},
|
|
1641
|
+
}, Pn = {
|
|
1642
1642
|
getInitialState: (e) => ({
|
|
1643
1643
|
globalFilter: void 0,
|
|
1644
1644
|
...e
|
|
1645
1645
|
}),
|
|
1646
1646
|
getDefaultOptions: (e) => ({
|
|
1647
|
-
onGlobalFilterChange:
|
|
1647
|
+
onGlobalFilterChange: O("globalFilter", e),
|
|
1648
1648
|
globalFilterFn: "auto",
|
|
1649
1649
|
getColumnCanGlobalFilter: (o) => {
|
|
1650
1650
|
var t;
|
|
@@ -1671,13 +1671,13 @@ const Pn = {
|
|
|
1671
1671
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
1672
1672
|
};
|
|
1673
1673
|
}
|
|
1674
|
-
},
|
|
1674
|
+
}, kn = {
|
|
1675
1675
|
getInitialState: (e) => ({
|
|
1676
1676
|
expanded: {},
|
|
1677
1677
|
...e
|
|
1678
1678
|
}),
|
|
1679
1679
|
getDefaultOptions: (e) => ({
|
|
1680
|
-
onExpandedChange:
|
|
1680
|
+
onExpandedChange: O("expanded", e),
|
|
1681
1681
|
paginateExpandedRows: !0
|
|
1682
1682
|
}),
|
|
1683
1683
|
createTable: (e) => {
|
|
@@ -1770,7 +1770,7 @@ const Pn = {
|
|
|
1770
1770
|
}
|
|
1771
1771
|
}),
|
|
1772
1772
|
getDefaultOptions: (e) => ({
|
|
1773
|
-
onPaginationChange:
|
|
1773
|
+
onPaginationChange: O("pagination", e)
|
|
1774
1774
|
}),
|
|
1775
1775
|
createTable: (e) => {
|
|
1776
1776
|
let o = !1, t = !1;
|
|
@@ -1844,13 +1844,13 @@ const Pn = {
|
|
|
1844
1844
|
}, Ie = () => ({
|
|
1845
1845
|
top: [],
|
|
1846
1846
|
bottom: []
|
|
1847
|
-
}),
|
|
1847
|
+
}), En = {
|
|
1848
1848
|
getInitialState: (e) => ({
|
|
1849
1849
|
rowPinning: Ie(),
|
|
1850
1850
|
...e
|
|
1851
1851
|
}),
|
|
1852
1852
|
getDefaultOptions: (e) => ({
|
|
1853
|
-
onRowPinningChange:
|
|
1853
|
+
onRowPinningChange: O("rowPinning", e)
|
|
1854
1854
|
}),
|
|
1855
1855
|
createRow: (e, o) => {
|
|
1856
1856
|
e.pin = (t, n, r) => {
|
|
@@ -1945,13 +1945,13 @@ const Pn = {
|
|
|
1945
1945
|
return o.filter((l) => !r.has(l.id));
|
|
1946
1946
|
}, R(e.options, "debugRows", "getCenterRows"));
|
|
1947
1947
|
}
|
|
1948
|
-
},
|
|
1948
|
+
}, Dn = {
|
|
1949
1949
|
getInitialState: (e) => ({
|
|
1950
1950
|
rowSelection: {},
|
|
1951
1951
|
...e
|
|
1952
1952
|
}),
|
|
1953
1953
|
getDefaultOptions: (e) => ({
|
|
1954
|
-
onRowSelectionChange:
|
|
1954
|
+
onRowSelectionChange: O("rowSelection", e),
|
|
1955
1955
|
enableRowSelection: !0,
|
|
1956
1956
|
enableMultiRowSelection: !0,
|
|
1957
1957
|
enableSubRowSelection: !0
|
|
@@ -1980,7 +1980,7 @@ const Pn = {
|
|
|
1980
1980
|
...t
|
|
1981
1981
|
};
|
|
1982
1982
|
return e.getRowModel().rows.forEach((l) => {
|
|
1983
|
-
|
|
1983
|
+
be(r, l.id, n, !0, e);
|
|
1984
1984
|
}), r;
|
|
1985
1985
|
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = S(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? $e(e, t) : {
|
|
1986
1986
|
rows: [],
|
|
@@ -2029,7 +2029,7 @@ const Pn = {
|
|
|
2029
2029
|
const i = {
|
|
2030
2030
|
...l
|
|
2031
2031
|
};
|
|
2032
|
-
return
|
|
2032
|
+
return be(i, e.id, t, (s = n == null ? void 0 : n.selectChildren) != null ? s : !0, o), i;
|
|
2033
2033
|
});
|
|
2034
2034
|
}, e.getIsSelected = () => {
|
|
2035
2035
|
const {
|
|
@@ -2040,12 +2040,12 @@ const Pn = {
|
|
|
2040
2040
|
const {
|
|
2041
2041
|
rowSelection: t
|
|
2042
2042
|
} = o.getState();
|
|
2043
|
-
return
|
|
2043
|
+
return Ee(e, t) === "some";
|
|
2044
2044
|
}, e.getIsAllSubRowsSelected = () => {
|
|
2045
2045
|
const {
|
|
2046
2046
|
rowSelection: t
|
|
2047
2047
|
} = o.getState();
|
|
2048
|
-
return
|
|
2048
|
+
return Ee(e, t) === "all";
|
|
2049
2049
|
}, e.getCanSelect = () => {
|
|
2050
2050
|
var t;
|
|
2051
2051
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
|
@@ -2063,10 +2063,10 @@ const Pn = {
|
|
|
2063
2063
|
};
|
|
2064
2064
|
};
|
|
2065
2065
|
}
|
|
2066
|
-
},
|
|
2066
|
+
}, be = (e, o, t, n, r) => {
|
|
2067
2067
|
var l;
|
|
2068
2068
|
const s = r.getRow(o, !0);
|
|
2069
|
-
t ? (s.getCanMultiSelect() || Object.keys(e).forEach((i) => delete e[i]), s.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = s.subRows) != null && l.length && s.getCanSelectSubRows() && s.subRows.forEach((i) =>
|
|
2069
|
+
t ? (s.getCanMultiSelect() || Object.keys(e).forEach((i) => delete e[i]), s.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = s.subRows) != null && l.length && s.getCanSelectSubRows() && s.subRows.forEach((i) => be(e, i.id, t, n, r));
|
|
2070
2070
|
};
|
|
2071
2071
|
function $e(e, o) {
|
|
2072
2072
|
const t = e.getState().rowSelection, n = [], r = {}, l = function(s, i) {
|
|
@@ -2090,21 +2090,21 @@ function Oe(e, o) {
|
|
|
2090
2090
|
var t;
|
|
2091
2091
|
return (t = o[e.id]) != null ? t : !1;
|
|
2092
2092
|
}
|
|
2093
|
-
function
|
|
2093
|
+
function Ee(e, o, t) {
|
|
2094
2094
|
var n;
|
|
2095
2095
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
2096
2096
|
let r = !0, l = !1;
|
|
2097
2097
|
return e.subRows.forEach((s) => {
|
|
2098
2098
|
if (!(l && !r) && (s.getCanSelect() && (Oe(s, o) ? l = !0 : r = !1), s.subRows && s.subRows.length)) {
|
|
2099
|
-
const i =
|
|
2099
|
+
const i = Ee(s, o);
|
|
2100
2100
|
i === "all" ? l = !0 : (i === "some" && (l = !0), r = !1);
|
|
2101
2101
|
}
|
|
2102
2102
|
}), r ? "all" : l ? "some" : !1;
|
|
2103
2103
|
}
|
|
2104
|
-
const De = /([0-9]+)/gm,
|
|
2104
|
+
const De = /([0-9]+)/gm, Ln = (e, o, t) => ht(J(e.getValue(t)).toLowerCase(), J(o.getValue(t)).toLowerCase()), zn = (e, o, t) => ht(J(e.getValue(t)), J(o.getValue(t))), An = (e, o, t) => Te(J(e.getValue(t)).toLowerCase(), J(o.getValue(t)).toLowerCase()), Hn = (e, o, t) => Te(J(e.getValue(t)), J(o.getValue(t))), Gn = (e, o, t) => {
|
|
2105
2105
|
const n = e.getValue(t), r = o.getValue(t);
|
|
2106
2106
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
2107
|
-
},
|
|
2107
|
+
}, On = (e, o, t) => Te(e.getValue(t), o.getValue(t));
|
|
2108
2108
|
function Te(e, o) {
|
|
2109
2109
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
2110
2110
|
}
|
|
@@ -2132,13 +2132,13 @@ function ht(e, o) {
|
|
|
2132
2132
|
return t.length - n.length;
|
|
2133
2133
|
}
|
|
2134
2134
|
const ie = {
|
|
2135
|
-
alphanumeric:
|
|
2136
|
-
alphanumericCaseSensitive:
|
|
2137
|
-
text:
|
|
2138
|
-
textCaseSensitive:
|
|
2139
|
-
datetime:
|
|
2140
|
-
basic:
|
|
2141
|
-
},
|
|
2135
|
+
alphanumeric: Ln,
|
|
2136
|
+
alphanumericCaseSensitive: zn,
|
|
2137
|
+
text: An,
|
|
2138
|
+
textCaseSensitive: Hn,
|
|
2139
|
+
datetime: Gn,
|
|
2140
|
+
basic: On
|
|
2141
|
+
}, Tn = {
|
|
2142
2142
|
getInitialState: (e) => ({
|
|
2143
2143
|
sorting: [],
|
|
2144
2144
|
...e
|
|
@@ -2148,7 +2148,7 @@ const ie = {
|
|
|
2148
2148
|
sortUndefined: 1
|
|
2149
2149
|
}),
|
|
2150
2150
|
getDefaultOptions: (e) => ({
|
|
2151
|
-
onSortingChange:
|
|
2151
|
+
onSortingChange: O("sorting", e),
|
|
2152
2152
|
isMultiSortEvent: (o) => o.shiftKey
|
|
2153
2153
|
}),
|
|
2154
2154
|
createColumn: (e, o) => {
|
|
@@ -2227,30 +2227,30 @@ const ie = {
|
|
|
2227
2227
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
2228
2228
|
}, 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());
|
|
2229
2229
|
}
|
|
2230
|
-
},
|
|
2231
|
-
|
|
2232
|
-
|
|
2230
|
+
}, Bn = [
|
|
2231
|
+
fn,
|
|
2232
|
+
Mn,
|
|
2233
|
+
_n,
|
|
2233
2234
|
Fn,
|
|
2234
|
-
|
|
2235
|
+
dn,
|
|
2235
2236
|
cn,
|
|
2236
|
-
|
|
2237
|
-
Pn,
|
|
2237
|
+
Vn,
|
|
2238
2238
|
//depends on ColumnFaceting
|
|
2239
|
-
|
|
2239
|
+
Pn,
|
|
2240
2240
|
//depends on ColumnFiltering
|
|
2241
|
-
|
|
2242
|
-
|
|
2241
|
+
Tn,
|
|
2242
|
+
Rn,
|
|
2243
2243
|
//depends on RowSorting
|
|
2244
|
-
|
|
2244
|
+
kn,
|
|
2245
2245
|
bn,
|
|
2246
|
+
En,
|
|
2246
2247
|
Dn,
|
|
2247
|
-
|
|
2248
|
-
Nn
|
|
2248
|
+
$n
|
|
2249
2249
|
];
|
|
2250
|
-
function
|
|
2250
|
+
function Kn(e) {
|
|
2251
2251
|
var o, t;
|
|
2252
2252
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
2253
|
-
const n = [...
|
|
2253
|
+
const n = [...Bn, ...(o = e._features) != null ? o : []];
|
|
2254
2254
|
let r = {
|
|
2255
2255
|
_features: n
|
|
2256
2256
|
};
|
|
@@ -2330,8 +2330,8 @@ function jn(e) {
|
|
|
2330
2330
|
getAllColumns: S(() => [r._getColumnDefs()], (c) => {
|
|
2331
2331
|
const a = function(m, v, C) {
|
|
2332
2332
|
return C === void 0 && (C = 0), m.map((w) => {
|
|
2333
|
-
const y =
|
|
2334
|
-
return y.columns =
|
|
2333
|
+
const y = un(r, w, C, v), _ = w;
|
|
2334
|
+
return y.columns = _.columns ? a(_.columns, y, C + 1) : [], y;
|
|
2335
2335
|
});
|
|
2336
2336
|
};
|
|
2337
2337
|
return a(c);
|
|
@@ -2354,7 +2354,7 @@ function jn(e) {
|
|
|
2354
2354
|
}
|
|
2355
2355
|
return r;
|
|
2356
2356
|
}
|
|
2357
|
-
function
|
|
2357
|
+
function jn() {
|
|
2358
2358
|
return (e) => S(() => [e.options.data], (o) => {
|
|
2359
2359
|
const t = {
|
|
2360
2360
|
rows: [],
|
|
@@ -2375,7 +2375,7 @@ function qn() {
|
|
|
2375
2375
|
return t.rows = n(o), t;
|
|
2376
2376
|
}, R(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
2377
2377
|
}
|
|
2378
|
-
function
|
|
2378
|
+
function qn(e) {
|
|
2379
2379
|
const o = [], t = (n) => {
|
|
2380
2380
|
var r;
|
|
2381
2381
|
o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
@@ -2386,10 +2386,10 @@ function Un(e) {
|
|
|
2386
2386
|
rowsById: e.rowsById
|
|
2387
2387
|
};
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2390
|
-
return t.options.filterFromLeafRows ?
|
|
2389
|
+
function Un(e, o, t) {
|
|
2390
|
+
return t.options.filterFromLeafRows ? Xn(e, o, t) : Zn(e, o, t);
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2392
|
+
function Xn(e, o, t) {
|
|
2393
2393
|
var n;
|
|
2394
2394
|
const r = [], l = {}, s = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, i = function(u, f) {
|
|
2395
2395
|
f === void 0 && (f = 0);
|
|
@@ -2418,7 +2418,7 @@ function Zn(e, o, t) {
|
|
|
2418
2418
|
rowsById: l
|
|
2419
2419
|
};
|
|
2420
2420
|
}
|
|
2421
|
-
function
|
|
2421
|
+
function Zn(e, o, t) {
|
|
2422
2422
|
var n;
|
|
2423
2423
|
const r = [], l = {}, s = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, i = function(u, f) {
|
|
2424
2424
|
f === void 0 && (f = 0);
|
|
@@ -2442,7 +2442,7 @@ function Wn(e, o, t) {
|
|
|
2442
2442
|
rowsById: l
|
|
2443
2443
|
};
|
|
2444
2444
|
}
|
|
2445
|
-
function
|
|
2445
|
+
function Wn() {
|
|
2446
2446
|
return (e) => S(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
|
|
2447
2447
|
if (!o.rows.length || !(t != null && t.length) && !n) {
|
|
2448
2448
|
for (let c = 0; c < o.flatRows.length; c++)
|
|
@@ -2506,10 +2506,10 @@ function Qn() {
|
|
|
2506
2506
|
return !1;
|
|
2507
2507
|
return !0;
|
|
2508
2508
|
};
|
|
2509
|
-
return
|
|
2509
|
+
return Un(o.rows, g, e);
|
|
2510
2510
|
}, R(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
2511
2511
|
}
|
|
2512
|
-
function
|
|
2512
|
+
function Qn(e) {
|
|
2513
2513
|
return (o) => S(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
|
|
2514
2514
|
if (!n.rows.length)
|
|
2515
2515
|
return n;
|
|
@@ -2529,7 +2529,7 @@ function Yn(e) {
|
|
|
2529
2529
|
rows: s,
|
|
2530
2530
|
flatRows: i,
|
|
2531
2531
|
rowsById: u
|
|
2532
|
-
} : g =
|
|
2532
|
+
} : g = qn({
|
|
2533
2533
|
rows: s,
|
|
2534
2534
|
flatRows: i,
|
|
2535
2535
|
rowsById: u
|
|
@@ -2540,7 +2540,7 @@ function Yn(e) {
|
|
|
2540
2540
|
return g.rows.forEach(c), g;
|
|
2541
2541
|
}, R(o.options, "debugTable", "getPaginationRowModel"));
|
|
2542
2542
|
}
|
|
2543
|
-
function
|
|
2543
|
+
function Yn() {
|
|
2544
2544
|
return (e) => S(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
2545
2545
|
if (!t.rows.length || !(o != null && o.length))
|
|
2546
2546
|
return t;
|
|
@@ -2566,7 +2566,7 @@ function Jn() {
|
|
|
2566
2566
|
const m = l[a], v = s[m.id], C = v.sortUndefined, w = (c = m == null ? void 0 : m.desc) != null ? c : !1;
|
|
2567
2567
|
let y = 0;
|
|
2568
2568
|
if (C) {
|
|
2569
|
-
const
|
|
2569
|
+
const _ = p.getValue(m.id), $ = g.getValue(m.id), F = _ === void 0, P = $ === void 0;
|
|
2570
2570
|
if (F || P) {
|
|
2571
2571
|
if (C === "first") return F ? -1 : 1;
|
|
2572
2572
|
if (C === "last") return F ? 1 : -1;
|
|
@@ -2600,21 +2600,21 @@ function Jn() {
|
|
|
2600
2600
|
* @license MIT
|
|
2601
2601
|
*/
|
|
2602
2602
|
function rt(e, o) {
|
|
2603
|
-
return e ?
|
|
2603
|
+
return e ? Jn(e) ? /* @__PURE__ */ Me.createElement(e, o) : e : null;
|
|
2604
2604
|
}
|
|
2605
|
-
function
|
|
2606
|
-
return
|
|
2605
|
+
function Jn(e) {
|
|
2606
|
+
return eo(e) || typeof e == "function" || to(e);
|
|
2607
2607
|
}
|
|
2608
|
-
function
|
|
2608
|
+
function eo(e) {
|
|
2609
2609
|
return typeof e == "function" && (() => {
|
|
2610
2610
|
const o = Object.getPrototypeOf(e);
|
|
2611
2611
|
return o.prototype && o.prototype.isReactComponent;
|
|
2612
2612
|
})();
|
|
2613
2613
|
}
|
|
2614
|
-
function
|
|
2614
|
+
function to(e) {
|
|
2615
2615
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
2616
2616
|
}
|
|
2617
|
-
function
|
|
2617
|
+
function no(e) {
|
|
2618
2618
|
const o = {
|
|
2619
2619
|
state: {},
|
|
2620
2620
|
// Dummy state
|
|
@@ -2624,7 +2624,7 @@ function oo(e) {
|
|
|
2624
2624
|
renderFallbackValue: null,
|
|
2625
2625
|
...e
|
|
2626
2626
|
}, [t] = Me.useState(() => ({
|
|
2627
|
-
current:
|
|
2627
|
+
current: Kn(o)
|
|
2628
2628
|
})), [n, r] = Me.useState(() => t.current.initialState);
|
|
2629
2629
|
return t.current.setOptions((l) => ({
|
|
2630
2630
|
...l,
|
|
@@ -2657,7 +2657,7 @@ const lt = ({
|
|
|
2657
2657
|
stopEditing: g,
|
|
2658
2658
|
updateCell: c,
|
|
2659
2659
|
deleteRow: a
|
|
2660
|
-
} =
|
|
2660
|
+
} = oe(), [m, v] = q([]), [C, w] = q(""), [y, _] = q(""), $ = Qe(() => i.filter((I) => I.targetKey !== null).map((I) => {
|
|
2661
2661
|
const N = s == null ? void 0 : s.columns.find((V) => V.key === I.targetKey);
|
|
2662
2662
|
return {
|
|
2663
2663
|
sourceColumn: I.sourceColumn,
|
|
@@ -2668,20 +2668,20 @@ const lt = ({
|
|
|
2668
2668
|
}), [i, s]), F = Le(
|
|
2669
2669
|
(I, N) => {
|
|
2670
2670
|
const V = u.get(I);
|
|
2671
|
-
return V == null ? void 0 : V.find((
|
|
2671
|
+
return V == null ? void 0 : V.find((T) => T.columnKey === N);
|
|
2672
2672
|
},
|
|
2673
2673
|
[u]
|
|
2674
2674
|
), P = (I, N, V) => {
|
|
2675
|
-
|
|
2676
|
-
},
|
|
2675
|
+
_(V), p(I, N);
|
|
2676
|
+
}, U = () => {
|
|
2677
2677
|
f && (c(f.rowIndex, f.columnKey, y), n == null || n(f.rowIndex, f.columnKey, y)), g();
|
|
2678
2678
|
}, ee = () => {
|
|
2679
|
-
|
|
2680
|
-
},
|
|
2679
|
+
_(""), g();
|
|
2680
|
+
}, z = (I) => {
|
|
2681
2681
|
a(I), r == null || r(I);
|
|
2682
|
-
},
|
|
2682
|
+
}, H = rn(), te = Qe(
|
|
2683
2683
|
() => [
|
|
2684
|
-
|
|
2684
|
+
H.accessor("rowIndex", {
|
|
2685
2685
|
header: "#",
|
|
2686
2686
|
size: o ? 80 : 60,
|
|
2687
2687
|
cell: (I) => {
|
|
@@ -2692,7 +2692,7 @@ const lt = ({
|
|
|
2692
2692
|
"button",
|
|
2693
2693
|
{
|
|
2694
2694
|
onClick: (V) => {
|
|
2695
|
-
V.stopPropagation(),
|
|
2695
|
+
V.stopPropagation(), z(N);
|
|
2696
2696
|
},
|
|
2697
2697
|
title: "Delete row",
|
|
2698
2698
|
style: {
|
|
@@ -2715,27 +2715,27 @@ const lt = ({
|
|
|
2715
2715
|
onMouseLeave: (V) => {
|
|
2716
2716
|
V.currentTarget.style.color = "#8e8d89", V.currentTarget.style.backgroundColor = "transparent";
|
|
2717
2717
|
},
|
|
2718
|
-
children: /* @__PURE__ */ d(
|
|
2718
|
+
children: /* @__PURE__ */ d(en, { style: { width: "14px", height: "14px", display: "block" } })
|
|
2719
2719
|
}
|
|
2720
2720
|
)
|
|
2721
2721
|
] });
|
|
2722
2722
|
}
|
|
2723
2723
|
}),
|
|
2724
2724
|
...$.map(
|
|
2725
|
-
(I) =>
|
|
2725
|
+
(I) => H.accessor((N) => N.data[I.targetKey] || N.data[I.sourceColumn], {
|
|
2726
2726
|
id: I.targetKey,
|
|
2727
2727
|
header: I.label,
|
|
2728
2728
|
cell: (N) => {
|
|
2729
|
-
const V = N.row.original.rowIndex,
|
|
2729
|
+
const V = N.row.original.rowIndex, T = String(N.getValue() ?? ""), E = F(V, I.targetKey);
|
|
2730
2730
|
return (f == null ? void 0 : f.rowIndex) === V && (f == null ? void 0 : f.columnKey) === I.targetKey ? /* @__PURE__ */ h("div", { className: "ff-flex ff-items-center ff-gap-2 ff-min-w-[280px]", children: [
|
|
2731
2731
|
/* @__PURE__ */ d(
|
|
2732
2732
|
"input",
|
|
2733
2733
|
{
|
|
2734
2734
|
type: "text",
|
|
2735
2735
|
value: y,
|
|
2736
|
-
onChange: (
|
|
2737
|
-
onKeyDown: (
|
|
2738
|
-
|
|
2736
|
+
onChange: (G) => _(G.target.value),
|
|
2737
|
+
onKeyDown: (G) => {
|
|
2738
|
+
G.key === "Enter" && U(), G.key === "Escape" && ee();
|
|
2739
2739
|
},
|
|
2740
2740
|
className: "ff-input ff-py-2 ff-px-3 ff-text-sm ff-flex-1 ff-min-w-[160px]",
|
|
2741
2741
|
autoFocus: !0
|
|
@@ -2744,7 +2744,7 @@ const lt = ({
|
|
|
2744
2744
|
/* @__PURE__ */ d(
|
|
2745
2745
|
"button",
|
|
2746
2746
|
{
|
|
2747
|
-
onClick:
|
|
2747
|
+
onClick: U,
|
|
2748
2748
|
className: "ff-btn ff-btn-primary ff-btn-sm ff-flex-shrink-0",
|
|
2749
2749
|
children: "Save"
|
|
2750
2750
|
}
|
|
@@ -2762,24 +2762,24 @@ const lt = ({
|
|
|
2762
2762
|
{
|
|
2763
2763
|
className: Y(
|
|
2764
2764
|
"ff-group ff-flex ff-items-center ff-gap-2",
|
|
2765
|
-
(
|
|
2766
|
-
(
|
|
2765
|
+
(E == null ? void 0 : E.severity) === "error" && "ff-cell-error",
|
|
2766
|
+
(E == null ? void 0 : E.severity) === "warning" && "ff-cell-warning"
|
|
2767
2767
|
),
|
|
2768
2768
|
children: [
|
|
2769
|
-
/* @__PURE__ */ d("span", { className: "ff-flex-1 ff-truncate", children:
|
|
2770
|
-
|
|
2771
|
-
|
|
2769
|
+
/* @__PURE__ */ d("span", { className: "ff-flex-1 ff-truncate", children: T || /* @__PURE__ */ d("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
|
|
2770
|
+
E && /* @__PURE__ */ h("div", { className: "ff-relative ff-group/tooltip", children: [
|
|
2771
|
+
E.severity === "error" ? /* @__PURE__ */ d(ze, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ d(Ve, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
|
|
2772
2772
|
/* @__PURE__ */ h("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: [
|
|
2773
|
-
|
|
2774
|
-
|
|
2773
|
+
E.message,
|
|
2774
|
+
E.suggestion && /* @__PURE__ */ d("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: E.suggestion })
|
|
2775
2775
|
] })
|
|
2776
2776
|
] }),
|
|
2777
2777
|
e && /* @__PURE__ */ d(
|
|
2778
2778
|
"button",
|
|
2779
2779
|
{
|
|
2780
|
-
onClick: () => P(V, I.targetKey,
|
|
2780
|
+
onClick: () => P(V, I.targetKey, T),
|
|
2781
2781
|
className: "ff-opacity-0 group-hover:ff-opacity-100 ff-p-1 ff-rounded ff-transition-opacity ff-edit-btn",
|
|
2782
|
-
children: /* @__PURE__ */ d(
|
|
2782
|
+
children: /* @__PURE__ */ d(Wt, { className: "ff-w-3 ff-h-3" })
|
|
2783
2783
|
}
|
|
2784
2784
|
)
|
|
2785
2785
|
]
|
|
@@ -2791,8 +2791,8 @@ const lt = ({
|
|
|
2791
2791
|
// Delete button is now in the # column (first column) so it's always visible
|
|
2792
2792
|
// even when the table has many columns and requires horizontal scrolling.
|
|
2793
2793
|
],
|
|
2794
|
-
[$, f, y, e, o, F,
|
|
2795
|
-
),
|
|
2794
|
+
[$, f, y, e, o, F, H]
|
|
2795
|
+
), k = no({
|
|
2796
2796
|
data: l,
|
|
2797
2797
|
columns: te,
|
|
2798
2798
|
state: {
|
|
@@ -2801,10 +2801,10 @@ const lt = ({
|
|
|
2801
2801
|
},
|
|
2802
2802
|
onSortingChange: v,
|
|
2803
2803
|
onGlobalFilterChange: w,
|
|
2804
|
-
getCoreRowModel:
|
|
2805
|
-
getPaginationRowModel:
|
|
2806
|
-
getSortedRowModel:
|
|
2807
|
-
getFilteredRowModel:
|
|
2804
|
+
getCoreRowModel: jn(),
|
|
2805
|
+
getPaginationRowModel: Qn(),
|
|
2806
|
+
getSortedRowModel: Yn(),
|
|
2807
|
+
getFilteredRowModel: Wn(),
|
|
2808
2808
|
initialState: {
|
|
2809
2809
|
pagination: {
|
|
2810
2810
|
pageSize: t
|
|
@@ -2824,12 +2824,12 @@ const lt = ({
|
|
|
2824
2824
|
}
|
|
2825
2825
|
),
|
|
2826
2826
|
/* @__PURE__ */ h("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
2827
|
-
|
|
2827
|
+
k.getFilteredRowModel().rows.length,
|
|
2828
2828
|
" rows"
|
|
2829
2829
|
] })
|
|
2830
2830
|
] }),
|
|
2831
2831
|
/* @__PURE__ */ d("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ h("table", { className: "ff-table", children: [
|
|
2832
|
-
/* @__PURE__ */ d("thead", { children:
|
|
2832
|
+
/* @__PURE__ */ d("thead", { children: k.getHeaderGroups().map((I) => /* @__PURE__ */ d("tr", { children: I.headers.map((N) => /* @__PURE__ */ d(
|
|
2833
2833
|
"th",
|
|
2834
2834
|
{
|
|
2835
2835
|
style: { width: N.getSize() },
|
|
@@ -2844,7 +2844,7 @@ const lt = ({
|
|
|
2844
2844
|
},
|
|
2845
2845
|
N.id
|
|
2846
2846
|
)) }, I.id)) }),
|
|
2847
|
-
/* @__PURE__ */ d("tbody", { children:
|
|
2847
|
+
/* @__PURE__ */ d("tbody", { children: k.getRowModel().rows.map((I) => {
|
|
2848
2848
|
const N = u.has(I.original.rowIndex);
|
|
2849
2849
|
return /* @__PURE__ */ d(
|
|
2850
2850
|
"tr",
|
|
@@ -2859,19 +2859,19 @@ const lt = ({
|
|
|
2859
2859
|
/* @__PURE__ */ h("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
|
|
2860
2860
|
/* @__PURE__ */ h("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
2861
2861
|
"Page ",
|
|
2862
|
-
|
|
2862
|
+
k.getState().pagination.pageIndex + 1,
|
|
2863
2863
|
" of ",
|
|
2864
|
-
|
|
2864
|
+
k.getPageCount()
|
|
2865
2865
|
] }),
|
|
2866
2866
|
/* @__PURE__ */ h("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
|
|
2867
2867
|
/* @__PURE__ */ h(
|
|
2868
2868
|
"button",
|
|
2869
2869
|
{
|
|
2870
|
-
onClick: () =>
|
|
2871
|
-
disabled: !
|
|
2870
|
+
onClick: () => k.previousPage(),
|
|
2871
|
+
disabled: !k.getCanPreviousPage(),
|
|
2872
2872
|
className: "ff-btn ff-btn-secondary ff-btn-sm",
|
|
2873
2873
|
children: [
|
|
2874
|
-
/* @__PURE__ */ d(
|
|
2874
|
+
/* @__PURE__ */ d(At, { className: "ff-w-4 ff-h-4" }),
|
|
2875
2875
|
"Previous"
|
|
2876
2876
|
]
|
|
2877
2877
|
}
|
|
@@ -2879,12 +2879,12 @@ const lt = ({
|
|
|
2879
2879
|
/* @__PURE__ */ h(
|
|
2880
2880
|
"button",
|
|
2881
2881
|
{
|
|
2882
|
-
onClick: () =>
|
|
2883
|
-
disabled: !
|
|
2882
|
+
onClick: () => k.nextPage(),
|
|
2883
|
+
disabled: !k.getCanNextPage(),
|
|
2884
2884
|
className: "ff-btn ff-btn-secondary ff-btn-sm",
|
|
2885
2885
|
children: [
|
|
2886
2886
|
"Next",
|
|
2887
|
-
/* @__PURE__ */ d(
|
|
2887
|
+
/* @__PURE__ */ d(Vt, { className: "ff-w-4 ff-h-4" })
|
|
2888
2888
|
]
|
|
2889
2889
|
}
|
|
2890
2890
|
)
|
|
@@ -2894,7 +2894,7 @@ const lt = ({
|
|
|
2894
2894
|
}, st = ({
|
|
2895
2895
|
showDetails: e = !0
|
|
2896
2896
|
}) => {
|
|
2897
|
-
const { validationResults: o } =
|
|
2897
|
+
const { validationResults: o } = oe();
|
|
2898
2898
|
if (!o)
|
|
2899
2899
|
return null;
|
|
2900
2900
|
const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: s, infoCount: i, summary: u } = o, f = Math.round(r / n * 100);
|
|
@@ -3008,11 +3008,11 @@ const lt = ({
|
|
|
3008
3008
|
] })
|
|
3009
3009
|
] }) })
|
|
3010
3010
|
] });
|
|
3011
|
-
}, Ne = ["upload", "mapping", "validation", "complete"],
|
|
3011
|
+
}, Ne = ["upload", "mapping", "validation", "complete"], oo = [
|
|
3012
3012
|
{ key: "upload", label: "Upload", icon: it },
|
|
3013
|
-
{ key: "mapping", label: "Map Columns", icon:
|
|
3014
|
-
{ key: "validation", label: "Validate", icon:
|
|
3015
|
-
{ key: "review", label: "Review", icon:
|
|
3013
|
+
{ key: "mapping", label: "Map Columns", icon: Xt },
|
|
3014
|
+
{ key: "validation", label: "Validate", icon: Yt },
|
|
3015
|
+
{ key: "review", label: "Review", icon: Tt },
|
|
3016
3016
|
{ key: "complete", label: "Complete", icon: Ae }
|
|
3017
3017
|
], uo = ({
|
|
3018
3018
|
template: e,
|
|
@@ -3036,136 +3036,131 @@ const lt = ({
|
|
|
3036
3036
|
setSchema: C,
|
|
3037
3037
|
setSessionId: w,
|
|
3038
3038
|
setParsedData: y,
|
|
3039
|
-
setMappings:
|
|
3039
|
+
setMappings: _,
|
|
3040
3040
|
setUnmapped: $,
|
|
3041
3041
|
setValidationResults: F,
|
|
3042
3042
|
setStep: P,
|
|
3043
|
-
nextStep:
|
|
3043
|
+
nextStep: U,
|
|
3044
3044
|
previousStep: ee,
|
|
3045
|
-
setLoading:
|
|
3046
|
-
setError:
|
|
3045
|
+
setLoading: z,
|
|
3046
|
+
setError: H,
|
|
3047
3047
|
reset: te
|
|
3048
|
-
} =
|
|
3048
|
+
} = oe(), [k, I] = q(null), [N, V] = q(null), [T, E] = q(0), [we, G] = q("");
|
|
3049
3049
|
Ye(() => {
|
|
3050
3050
|
if (V(null), e)
|
|
3051
|
-
if (
|
|
3052
|
-
const
|
|
3053
|
-
|
|
3051
|
+
if (Pt(e)) {
|
|
3052
|
+
const x = kt(e);
|
|
3053
|
+
x ? I(x) : (V(`Failed to load template "${e}"`), i == null || i(new Error(`Failed to load template "${e}"`)));
|
|
3054
3054
|
} else {
|
|
3055
|
-
const
|
|
3056
|
-
V(
|
|
3055
|
+
const x = `Template "${e}" not found. Available templates: ${et.join(", ")}`;
|
|
3056
|
+
V(x), i == null || i(new Error(x));
|
|
3057
3057
|
}
|
|
3058
3058
|
else if (o)
|
|
3059
3059
|
I(o);
|
|
3060
3060
|
else {
|
|
3061
|
-
const
|
|
3062
|
-
V(
|
|
3061
|
+
const x = `No template or schema provided. Please specify a template (${et.join(", ")}) or provide a custom schema.`;
|
|
3062
|
+
V(x), i == null || i(new Error(x));
|
|
3063
3063
|
}
|
|
3064
3064
|
}, [e, o, i]), Ye(() => {
|
|
3065
|
-
|
|
3066
|
-
}, [
|
|
3067
|
-
const Be = async (
|
|
3065
|
+
k && (C(k), Be(k));
|
|
3066
|
+
}, [k]);
|
|
3067
|
+
const Be = async (x) => {
|
|
3068
3068
|
try {
|
|
3069
|
-
|
|
3070
|
-
const
|
|
3071
|
-
w(
|
|
3069
|
+
z(!0);
|
|
3070
|
+
const b = await se().createImportSession(x);
|
|
3071
|
+
w(b.sessionId);
|
|
3072
3072
|
} catch (M) {
|
|
3073
|
-
const
|
|
3074
|
-
|
|
3073
|
+
const b = M;
|
|
3074
|
+
H(b.message), i == null || i(b);
|
|
3075
3075
|
} finally {
|
|
3076
|
-
|
|
3076
|
+
z(!1);
|
|
3077
3077
|
}
|
|
3078
|
-
}, vt = (
|
|
3078
|
+
}, vt = (x) => {
|
|
3079
3079
|
const M = [];
|
|
3080
|
-
let
|
|
3081
|
-
for (let
|
|
3082
|
-
const
|
|
3083
|
-
|
|
3080
|
+
let b = "", A = !1;
|
|
3081
|
+
for (let X = 0; X < x.length; X++) {
|
|
3082
|
+
const L = x[X];
|
|
3083
|
+
L === '"' ? A && x[X + 1] === '"' ? (b += '"', X++) : A = !A : L === "," && !A ? (M.push(b.trim()), b = "") : b += L;
|
|
3084
3084
|
}
|
|
3085
|
-
return M.push(
|
|
3086
|
-
}, wt = Le(async (
|
|
3085
|
+
return M.push(b.trim()), M;
|
|
3086
|
+
}, wt = Le(async (x) => {
|
|
3087
3087
|
if (f)
|
|
3088
3088
|
try {
|
|
3089
|
-
|
|
3089
|
+
z(!0), H(null), _([]), $([], []), F(null), E(10), G("Uploading file...");
|
|
3090
3090
|
const M = se();
|
|
3091
|
-
|
|
3092
|
-
const
|
|
3093
|
-
|
|
3094
|
-
const
|
|
3095
|
-
`).filter((Z) => Z.trim()),
|
|
3091
|
+
E(20), G("Uploading to server...");
|
|
3092
|
+
const b = await M.uploadFile(f, x);
|
|
3093
|
+
E(40), G("Parsing all rows...");
|
|
3094
|
+
const X = (await x.text()).split(`
|
|
3095
|
+
`).filter((Z) => Z.trim()), L = b.data.headers, j = X.slice(1).map((Z, de) => {
|
|
3096
3096
|
const Ze = vt(Z), We = {};
|
|
3097
|
-
return
|
|
3098
|
-
We[
|
|
3097
|
+
return L.forEach((Ft, It) => {
|
|
3098
|
+
We[Ft] = Ze[It] || "";
|
|
3099
3099
|
}), {
|
|
3100
3100
|
rowIndex: de,
|
|
3101
3101
|
data: We,
|
|
3102
3102
|
rawData: Ze
|
|
3103
3103
|
};
|
|
3104
3104
|
});
|
|
3105
|
-
|
|
3106
|
-
headers:
|
|
3107
|
-
rows:
|
|
3108
|
-
totalRows:
|
|
3109
|
-
sampleRows:
|
|
3110
|
-
}),
|
|
3105
|
+
E(60), G("Processing rows..."), y({
|
|
3106
|
+
headers: L,
|
|
3107
|
+
rows: j,
|
|
3108
|
+
totalRows: j.length,
|
|
3109
|
+
sampleRows: j.slice(0, 5)
|
|
3110
|
+
}), E(80), G("Matching columns..."), P("mapping"), await Ct(), E(100), G("Done");
|
|
3111
3111
|
} catch (M) {
|
|
3112
|
-
|
|
3112
|
+
H(`Failed to process the uploaded file: ${M.message}`);
|
|
3113
3113
|
} finally {
|
|
3114
|
-
|
|
3114
|
+
z(!1), E(0), G("");
|
|
3115
3115
|
}
|
|
3116
3116
|
}, [f]), Ct = async () => {
|
|
3117
3117
|
if (f)
|
|
3118
3118
|
try {
|
|
3119
|
-
|
|
3119
|
+
z(!0);
|
|
3120
3120
|
const M = await se().matchColumns(f);
|
|
3121
|
-
|
|
3122
|
-
} catch (
|
|
3123
|
-
|
|
3121
|
+
_(M.mappings), $(M.unmappedSource, M.unmappedTarget);
|
|
3122
|
+
} catch (x) {
|
|
3123
|
+
H(`Column matching failed: ${x.message}`);
|
|
3124
3124
|
} finally {
|
|
3125
|
-
|
|
3125
|
+
z(!1);
|
|
3126
3126
|
}
|
|
3127
3127
|
}, yt = async () => {
|
|
3128
3128
|
if (f)
|
|
3129
3129
|
try {
|
|
3130
|
-
|
|
3130
|
+
z(!0), H(null);
|
|
3131
3131
|
const M = await se().validateImport(f);
|
|
3132
|
-
F(M.validation),
|
|
3133
|
-
} catch (
|
|
3134
|
-
|
|
3132
|
+
F(M.validation), U();
|
|
3133
|
+
} catch (x) {
|
|
3134
|
+
H(`Validation failed: ${x.message}`);
|
|
3135
3135
|
} finally {
|
|
3136
|
-
|
|
3136
|
+
z(!1);
|
|
3137
3137
|
}
|
|
3138
|
-
}, [Ke, ue] =
|
|
3138
|
+
}, [Ke, ue] = q(null), [ro, je] = q(null), [re, qe] = q([]), St = async () => {
|
|
3139
3139
|
if (f)
|
|
3140
3140
|
try {
|
|
3141
|
-
|
|
3142
|
-
const
|
|
3141
|
+
z(!0), H(null), ue(null);
|
|
3142
|
+
const x = [...g];
|
|
3143
|
+
qe(x);
|
|
3144
|
+
const A = await se().completeImport(f, {
|
|
3143
3145
|
skipInvalidRows: !0,
|
|
3144
3146
|
acknowledgeWarnings: !0
|
|
3145
|
-
})
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
data: L.data,
|
|
3150
|
-
wasEdited: L.wasEdited ?? !1
|
|
3151
|
-
} : L)
|
|
3152
|
-
};
|
|
3153
|
-
je(H), P("complete"), l == null || l(H);
|
|
3154
|
-
} catch (_) {
|
|
3155
|
-
ue(_.message), P("complete");
|
|
3147
|
+
});
|
|
3148
|
+
je(A), P("complete"), l == null || l(A);
|
|
3149
|
+
} catch (x) {
|
|
3150
|
+
ue(x.message), P("complete");
|
|
3156
3151
|
} finally {
|
|
3157
|
-
|
|
3152
|
+
z(!1);
|
|
3158
3153
|
}
|
|
3159
3154
|
}, fe = () => {
|
|
3160
3155
|
te(), s == null || s();
|
|
3161
3156
|
}, Ue = () => {
|
|
3162
|
-
ue(null), je(null), qe(
|
|
3163
|
-
},
|
|
3157
|
+
ue(null), je(null), qe([]), E(0), G(""), te(), k && (C(k), Be(k));
|
|
3158
|
+
}, Rt = () => oo.findIndex((x) => x.key === u), xt = () => {
|
|
3164
3159
|
switch (u) {
|
|
3165
3160
|
case "upload":
|
|
3166
3161
|
return p !== null;
|
|
3167
3162
|
case "mapping":
|
|
3168
|
-
return c.length > 0 && c.some((
|
|
3163
|
+
return c.length > 0 && c.some((x) => x.targetKey !== null);
|
|
3169
3164
|
case "validation":
|
|
3170
3165
|
return a !== null;
|
|
3171
3166
|
case "review":
|
|
@@ -3173,19 +3168,19 @@ const lt = ({
|
|
|
3173
3168
|
default:
|
|
3174
3169
|
return !1;
|
|
3175
3170
|
}
|
|
3176
|
-
},
|
|
3171
|
+
}, _t = async () => {
|
|
3177
3172
|
switch (u) {
|
|
3178
3173
|
case "mapping":
|
|
3179
3174
|
await yt();
|
|
3180
3175
|
break;
|
|
3181
3176
|
case "validation":
|
|
3182
|
-
|
|
3177
|
+
U();
|
|
3183
3178
|
break;
|
|
3184
3179
|
case "review":
|
|
3185
|
-
await
|
|
3180
|
+
await St();
|
|
3186
3181
|
break;
|
|
3187
3182
|
default:
|
|
3188
|
-
|
|
3183
|
+
U();
|
|
3189
3184
|
}
|
|
3190
3185
|
};
|
|
3191
3186
|
if (N)
|
|
@@ -3195,22 +3190,22 @@ const lt = ({
|
|
|
3195
3190
|
/* @__PURE__ */ d("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: N }),
|
|
3196
3191
|
s && /* @__PURE__ */ d("button", { onClick: fe, className: "ff-btn ff-btn-secondary", children: "Close" })
|
|
3197
3192
|
] }) }) });
|
|
3198
|
-
if (!
|
|
3193
|
+
if (!k)
|
|
3199
3194
|
return /* @__PURE__ */ d(Ce, { theme: n, useShadowDom: r, children: /* @__PURE__ */ d("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ h("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
|
|
3200
3195
|
/* @__PURE__ */ d(ce, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
|
|
3201
3196
|
/* @__PURE__ */ d("p", { style: { color: "var(--ff-text-muted)" }, children: "Loading template..." })
|
|
3202
3197
|
] }) }) });
|
|
3203
3198
|
const le = () => {
|
|
3204
|
-
const
|
|
3205
|
-
return Ne.indexOf(
|
|
3206
|
-
}, Xe = /* @__PURE__ */ d(
|
|
3199
|
+
const x = u === "review" ? "validation" : u;
|
|
3200
|
+
return Ne.indexOf(x);
|
|
3201
|
+
}, Xe = /* @__PURE__ */ d(ne, { children: /* @__PURE__ */ h("div", { className: t === "embed" ? "ff-container ff-embed" : "ff-container ff-modal", children: [
|
|
3207
3202
|
/* @__PURE__ */ h("div", { className: "ff-modal-header", children: [
|
|
3208
3203
|
/* @__PURE__ */ h("div", { className: "ff-modal-header-left", children: [
|
|
3209
3204
|
/* @__PURE__ */ h("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
|
|
3210
|
-
/* @__PURE__ */ d("div", { className: "ff-modal-icon", children: /* @__PURE__ */ d(
|
|
3205
|
+
/* @__PURE__ */ d("div", { className: "ff-modal-icon", children: /* @__PURE__ */ d(Kt, {}) }),
|
|
3211
3206
|
/* @__PURE__ */ d("h2", { className: "ff-modal-title", children: "Import Data" })
|
|
3212
3207
|
] }),
|
|
3213
|
-
/* @__PURE__ */ d("div", { className: "ff-steps ff-ml-4", children: Ne.map((
|
|
3208
|
+
/* @__PURE__ */ d("div", { className: "ff-steps ff-ml-4", children: Ne.map((x, M) => /* @__PURE__ */ h($t.Fragment, { children: [
|
|
3214
3209
|
/* @__PURE__ */ d(
|
|
3215
3210
|
"div",
|
|
3216
3211
|
{
|
|
@@ -3227,7 +3222,7 @@ const lt = ({
|
|
|
3227
3222
|
"ff-step-connector",
|
|
3228
3223
|
le() > M && "ff-step-connector-complete"
|
|
3229
3224
|
) })
|
|
3230
|
-
] },
|
|
3225
|
+
] }, x)) })
|
|
3231
3226
|
] }),
|
|
3232
3227
|
/* @__PURE__ */ d(
|
|
3233
3228
|
"button",
|
|
@@ -3240,36 +3235,36 @@ const lt = ({
|
|
|
3240
3235
|
] }),
|
|
3241
3236
|
/* @__PURE__ */ h("div", { className: "ff-modal-body", children: [
|
|
3242
3237
|
v && /* @__PURE__ */ d("div", { className: "ff-mb-4 ff-p-4 ff-border ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)", color: "var(--ff-error)" }, children: v }),
|
|
3243
|
-
u === "upload" && /* @__PURE__ */ d("div", { className: "ff-py-4", children: /* @__PURE__ */ d("div", { className: "ff-max-w-xl ff-mx-auto", children: m &&
|
|
3238
|
+
u === "upload" && /* @__PURE__ */ d("div", { className: "ff-py-4", children: /* @__PURE__ */ d("div", { className: "ff-max-w-xl ff-mx-auto", children: m && T > 0 ? /* @__PURE__ */ h("div", { className: "ff-p-8 ff-text-center", children: [
|
|
3244
3239
|
/* @__PURE__ */ d(ce, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mx-auto ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
|
|
3245
3240
|
/* @__PURE__ */ d("p", { className: "ff-font-medium ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: we }),
|
|
3246
3241
|
/* @__PURE__ */ d("div", { className: "ff-progress ff-w-full ff-max-w-xs ff-mx-auto ff-mb-2", children: /* @__PURE__ */ d(
|
|
3247
3242
|
"div",
|
|
3248
3243
|
{
|
|
3249
3244
|
className: "ff-progress-bar",
|
|
3250
|
-
style: { width: `${
|
|
3245
|
+
style: { width: `${T}%`, transition: "width 0.3s ease" }
|
|
3251
3246
|
}
|
|
3252
3247
|
) }),
|
|
3253
3248
|
/* @__PURE__ */ h("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
3254
|
-
|
|
3249
|
+
T,
|
|
3255
3250
|
"% complete"
|
|
3256
3251
|
] })
|
|
3257
|
-
] }) : /* @__PURE__ */ d(
|
|
3258
|
-
u === "mapping" && (m &&
|
|
3252
|
+
] }) : /* @__PURE__ */ d(nn, { onFileSelect: wt }) }) }),
|
|
3253
|
+
u === "mapping" && (m && T > 0 ? /* @__PURE__ */ h("div", { className: "ff-py-12 ff-text-center", children: [
|
|
3259
3254
|
/* @__PURE__ */ d(ce, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mx-auto ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
|
|
3260
3255
|
/* @__PURE__ */ d("p", { className: "ff-font-medium ff-mb-3", style: { color: "var(--ff-text-primary)" }, children: we }),
|
|
3261
3256
|
/* @__PURE__ */ d("div", { className: "ff-progress ff-w-full ff-max-w-xs ff-mx-auto ff-mb-2", children: /* @__PURE__ */ d(
|
|
3262
3257
|
"div",
|
|
3263
3258
|
{
|
|
3264
3259
|
className: "ff-progress-bar",
|
|
3265
|
-
style: { width: `${
|
|
3260
|
+
style: { width: `${T}%`, transition: "width 0.3s ease" }
|
|
3266
3261
|
}
|
|
3267
3262
|
) }),
|
|
3268
3263
|
/* @__PURE__ */ h("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
3269
|
-
|
|
3264
|
+
T,
|
|
3270
3265
|
"% complete"
|
|
3271
3266
|
] })
|
|
3272
|
-
] }) : /* @__PURE__ */ d(
|
|
3267
|
+
] }) : /* @__PURE__ */ d(on, {})),
|
|
3273
3268
|
u === "validation" && /* @__PURE__ */ h("div", { className: "ff-space-y-6", children: [
|
|
3274
3269
|
/* @__PURE__ */ d(st, {}),
|
|
3275
3270
|
/* @__PURE__ */ d(lt, { editable: !0 })
|
|
@@ -3278,7 +3273,7 @@ const lt = ({
|
|
|
3278
3273
|
/* @__PURE__ */ d(st, { showDetails: !1 }),
|
|
3279
3274
|
/* @__PURE__ */ d(lt, { editable: !1, pageSize: 10 })
|
|
3280
3275
|
] }),
|
|
3281
|
-
u === "complete" && /* @__PURE__ */ d("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: Ke ? /* @__PURE__ */ h(
|
|
3276
|
+
u === "complete" && /* @__PURE__ */ d("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: Ke ? /* @__PURE__ */ h(ne, { children: [
|
|
3282
3277
|
/* @__PURE__ */ d("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ d(he, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
|
|
3283
3278
|
/* @__PURE__ */ d("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Failed" }),
|
|
3284
3279
|
/* @__PURE__ */ d("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: Ke }),
|
|
@@ -3295,49 +3290,47 @@ const lt = ({
|
|
|
3295
3290
|
),
|
|
3296
3291
|
s && /* @__PURE__ */ d("button", { onClick: fe, className: "ff-btn ff-btn-secondary", children: "Close" })
|
|
3297
3292
|
] })
|
|
3298
|
-
] }) : /* @__PURE__ */ h(
|
|
3293
|
+
] }) : /* @__PURE__ */ h(ne, { children: [
|
|
3299
3294
|
/* @__PURE__ */ d("div", { className: "ff-w-20 ff-h-20 ff-rounded-2xl ff-flex ff-items-center ff-justify-center ff-mb-6", style: { backgroundColor: "var(--ff-success-light)" }, children: /* @__PURE__ */ d(Ae, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
|
|
3300
3295
|
/* @__PURE__ */ d("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Complete!" }),
|
|
3301
3296
|
/* @__PURE__ */ d("p", { className: "ff-mb-6", style: { color: "var(--ff-text-muted)" }, children: "Your data has been successfully imported." }),
|
|
3302
3297
|
/* @__PURE__ */ h("div", { className: "ff-flex ff-gap-6 ff-mb-6", children: [
|
|
3303
3298
|
/* @__PURE__ */ h("div", { className: "ff-text-center ff-px-6 ff-py-3 ff-rounded-xl ff-border", style: { borderColor: "var(--ff-success)", backgroundColor: "var(--ff-success-light)" }, children: [
|
|
3304
|
-
/* @__PURE__ */ d("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-success-dark)" }, children:
|
|
3299
|
+
/* @__PURE__ */ d("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-success-dark)" }, children: re.length }),
|
|
3305
3300
|
/* @__PURE__ */ d("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: "Rows Imported" })
|
|
3306
3301
|
] }),
|
|
3307
3302
|
/* @__PURE__ */ h("div", { className: "ff-text-center ff-px-6 ff-py-3 ff-rounded-xl ff-border", style: { borderColor: "var(--ff-border-light)", backgroundColor: "var(--ff-bg-primary)" }, children: [
|
|
3308
|
-
/* @__PURE__ */ d("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-text-primary)" }, children: c.filter((
|
|
3303
|
+
/* @__PURE__ */ d("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-text-primary)" }, children: c.filter((x) => x.targetKey !== null).length }),
|
|
3309
3304
|
/* @__PURE__ */ d("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: "Columns Mapped" })
|
|
3310
3305
|
] })
|
|
3311
3306
|
] }),
|
|
3312
|
-
|
|
3313
|
-
const
|
|
3314
|
-
return
|
|
3315
|
-
/* @__PURE__ */
|
|
3316
|
-
"Data Preview (first ",
|
|
3317
|
-
_.length,
|
|
3318
|
-
" rows)"
|
|
3319
|
-
] }),
|
|
3307
|
+
re.length > 0 && (() => {
|
|
3308
|
+
const x = re.slice(0, 5), M = x[0], b = (M == null ? void 0 : M.data) || M, A = Object.keys(typeof b == "object" ? b : {}).slice(0, 6), X = (k == null ? void 0 : k.columns) || [];
|
|
3309
|
+
return A.length === 0 ? null : /* @__PURE__ */ h("div", { className: "ff-w-full ff-mb-6", children: [
|
|
3310
|
+
/* @__PURE__ */ d("p", { className: "ff-text-xs ff-font-semibold ff-uppercase ff-tracking-wider ff-mb-2", style: { color: "var(--ff-text-muted)" }, children: "Imported Data Preview" }),
|
|
3320
3311
|
/* @__PURE__ */ d("div", { className: "ff-table-container ff-max-h-[250px]", children: /* @__PURE__ */ h("table", { className: "ff-table", children: [
|
|
3321
3312
|
/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ h("tr", { children: [
|
|
3322
3313
|
/* @__PURE__ */ d("th", { style: { width: 40 }, children: "#" }),
|
|
3323
|
-
|
|
3324
|
-
const
|
|
3325
|
-
return /* @__PURE__ */ d("th", { children: (
|
|
3314
|
+
A.map((L) => {
|
|
3315
|
+
const j = X.find((Z) => Z.key === L);
|
|
3316
|
+
return /* @__PURE__ */ d("th", { children: (j == null ? void 0 : j.label) || L }, L);
|
|
3326
3317
|
}),
|
|
3327
|
-
|
|
3318
|
+
A.length < Object.keys(typeof b == "object" ? b : {}).length && /* @__PURE__ */ d("th", { children: "..." })
|
|
3328
3319
|
] }) }),
|
|
3329
|
-
/* @__PURE__ */ d("tbody", { children:
|
|
3330
|
-
const Z = (
|
|
3320
|
+
/* @__PURE__ */ d("tbody", { children: x.map((L, j) => {
|
|
3321
|
+
const Z = (L == null ? void 0 : L.data) || L;
|
|
3331
3322
|
return /* @__PURE__ */ h("tr", { children: [
|
|
3332
|
-
/* @__PURE__ */ d("td", { children: /* @__PURE__ */ d("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children:
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
] },
|
|
3323
|
+
/* @__PURE__ */ d("td", { children: /* @__PURE__ */ d("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: j + 1 }) }),
|
|
3324
|
+
A.map((de) => /* @__PURE__ */ d("td", { children: /* @__PURE__ */ d("span", { className: "ff-text-sm ff-truncate ff-block ff-max-w-[150px]", children: String((Z == null ? void 0 : Z[de]) ?? "—") }) }, de)),
|
|
3325
|
+
A.length < Object.keys(typeof b == "object" ? b : {}).length && /* @__PURE__ */ d("td", { children: /* @__PURE__ */ d("span", { style: { color: "var(--ff-text-muted)" }, children: "..." }) })
|
|
3326
|
+
] }, j);
|
|
3336
3327
|
}) })
|
|
3337
3328
|
] }) }),
|
|
3338
|
-
|
|
3339
|
-
"Showing
|
|
3340
|
-
|
|
3329
|
+
re.length > 5 && /* @__PURE__ */ h("p", { className: "ff-text-xs ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: [
|
|
3330
|
+
"Showing ",
|
|
3331
|
+
x.length,
|
|
3332
|
+
" of ",
|
|
3333
|
+
re.length,
|
|
3341
3334
|
" imported rows"
|
|
3342
3335
|
] })
|
|
3343
3336
|
] });
|
|
@@ -3355,15 +3348,15 @@ const lt = ({
|
|
|
3355
3348
|
] })
|
|
3356
3349
|
] }) })
|
|
3357
3350
|
] }),
|
|
3358
|
-
/* @__PURE__ */ d("div", { className: "ff-modal-footer", children: u === "complete" ? /* @__PURE__ */ h(
|
|
3351
|
+
/* @__PURE__ */ d("div", { className: "ff-modal-footer", children: u === "complete" ? /* @__PURE__ */ h(ne, { children: [
|
|
3359
3352
|
/* @__PURE__ */ d("div", {}),
|
|
3360
3353
|
/* @__PURE__ */ d("button", { onClick: Ue, className: "ff-btn ff-btn-primary", children: "Start New Import" })
|
|
3361
|
-
] }) : /* @__PURE__ */ h(
|
|
3354
|
+
] }) : /* @__PURE__ */ h(ne, { children: [
|
|
3362
3355
|
/* @__PURE__ */ d(
|
|
3363
3356
|
"button",
|
|
3364
3357
|
{
|
|
3365
3358
|
onClick: ee,
|
|
3366
|
-
disabled:
|
|
3359
|
+
disabled: Rt() === 0 || m,
|
|
3367
3360
|
className: "ff-btn ff-btn-ghost",
|
|
3368
3361
|
children: "Back"
|
|
3369
3362
|
}
|
|
@@ -3371,10 +3364,10 @@ const lt = ({
|
|
|
3371
3364
|
/* @__PURE__ */ d(
|
|
3372
3365
|
"button",
|
|
3373
3366
|
{
|
|
3374
|
-
onClick:
|
|
3375
|
-
disabled: !
|
|
3367
|
+
onClick: _t,
|
|
3368
|
+
disabled: !xt() || m,
|
|
3376
3369
|
className: "ff-btn ff-btn-primary",
|
|
3377
|
-
children: m ? /* @__PURE__ */ h(
|
|
3370
|
+
children: m ? /* @__PURE__ */ h(ne, { children: [
|
|
3378
3371
|
/* @__PURE__ */ d(ce, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
|
|
3379
3372
|
"Processing..."
|
|
3380
3373
|
] }) : u === "review" ? "Complete Import" : "Continue"
|
|
@@ -3385,11 +3378,11 @@ const lt = ({
|
|
|
3385
3378
|
return /* @__PURE__ */ d(Ce, { theme: n, useShadowDom: r, children: t === "modal" ? /* @__PURE__ */ d("div", { className: "ff-overlay", children: Xe }) : Xe });
|
|
3386
3379
|
};
|
|
3387
3380
|
export {
|
|
3388
|
-
|
|
3381
|
+
on as C,
|
|
3389
3382
|
lt as D,
|
|
3390
|
-
|
|
3383
|
+
nn as F,
|
|
3391
3384
|
uo as I,
|
|
3392
3385
|
st as V,
|
|
3393
|
-
|
|
3386
|
+
oe as u
|
|
3394
3387
|
};
|
|
3395
|
-
//# sourceMappingURL=ImportWizard-
|
|
3388
|
+
//# sourceMappingURL=ImportWizard-wwdBs7gE.mjs.map
|