@fileflow/sdk 0.1.13 → 0.1.14
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-BAmeOWXl.js → ImportWizard-B9r6-6cQ.js} +15 -15
- package/dist/{ImportWizard-BAmeOWXl.js.map → ImportWizard-B9r6-6cQ.js.map} +1 -1
- package/dist/{ImportWizard-B69XBxtG.mjs → ImportWizard-BEdcnr4Q.mjs} +825 -823
- package/dist/{ImportWizard-B69XBxtG.mjs.map → ImportWizard-BEdcnr4Q.mjs.map} +1 -1
- package/dist/{KYCWizard-CYdeoPXE.mjs → KYCWizard-DJ4zgpjq.mjs} +2 -2
- package/dist/{KYCWizard-CYdeoPXE.mjs.map → KYCWizard-DJ4zgpjq.mjs.map} +1 -1
- package/dist/{KYCWizard-Bei2tyWT.js → KYCWizard-SURShOJn.js} +2 -2
- package/dist/{KYCWizard-Bei2tyWT.js.map → KYCWizard-SURShOJn.js.map} +1 -1
- package/dist/import.d.ts +38 -0
- package/dist/import.js +1 -1
- package/dist/import.mjs +1 -1
- package/dist/{index-DOOgWkvj.js → index-DcWg2ozb.js} +33 -33
- package/dist/index-DcWg2ozb.js.map +1 -0
- package/dist/{index-oKr8Wtf5.mjs → index-fS1sp3k5.mjs} +731 -722
- package/dist/index-fS1sp3k5.mjs.map +1 -0
- package/dist/index.d.ts +43 -8
- package/dist/index.js +1 -1
- package/dist/index.mjs +3 -3
- package/dist/kyc.js +1 -1
- package/dist/kyc.mjs +1 -1
- package/dist/styles.css +1329 -0
- package/package.json +8 -3
- package/dist/index-DOOgWkvj.js.map +0 -1
- package/dist/index-oKr8Wtf5.mjs.map +0 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsx as g, jsxs as v, Fragment as
|
|
1
|
+
import { jsx as g, jsxs as v, Fragment as Z } from "react/jsx-runtime";
|
|
2
2
|
import * as he from "react";
|
|
3
|
-
import
|
|
4
|
-
import { h as
|
|
3
|
+
import at, { useCallback as xe, useState as K, useMemo as ke, useEffect as Le } from "react";
|
|
4
|
+
import { h as G, j as ut, k as ft, X as oe, m as B, U as je, n as _e, T as ve, q as dt, p as Fe, o as He, t as gt, d as ct, V as ze, g as Q, S as se, L as Ae } from "./index-fS1sp3k5.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.563.0 - ISC
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the ISC license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const pt = [
|
|
12
12
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
13
13
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
14
|
-
],
|
|
14
|
+
], mt = G("arrow-right", pt);
|
|
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 ht = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], vt = G("check", ht);
|
|
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 wt = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Ct = G("chevron-left", wt);
|
|
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 St = [
|
|
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
|
+
], Rt = G("circle-question-mark", St);
|
|
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 yt = [
|
|
47
47
|
[
|
|
48
48
|
"path",
|
|
49
49
|
{
|
|
@@ -52,14 +52,14 @@ const Ct = [
|
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
55
|
-
],
|
|
55
|
+
], xt = G("eye", yt);
|
|
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 _t = [
|
|
63
63
|
[
|
|
64
64
|
"path",
|
|
65
65
|
{
|
|
@@ -72,14 +72,14 @@ const Rt = [
|
|
|
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
|
+
], Ft = G("file-spreadsheet", _t);
|
|
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 $t = [
|
|
83
83
|
[
|
|
84
84
|
"path",
|
|
85
85
|
{
|
|
@@ -88,26 +88,26 @@ const xt = [
|
|
|
88
88
|
}
|
|
89
89
|
],
|
|
90
90
|
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
91
|
-
],
|
|
91
|
+
], Mt = G("file", $t);
|
|
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 It = [
|
|
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
|
+
], Vt = G("git-branch", It);
|
|
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 Nt = [
|
|
111
111
|
[
|
|
112
112
|
"path",
|
|
113
113
|
{
|
|
@@ -115,20 +115,20 @@ const Mt = [
|
|
|
115
115
|
key: "1a8usu"
|
|
116
116
|
}
|
|
117
117
|
]
|
|
118
|
-
],
|
|
118
|
+
], Pt = G("pen", Nt);
|
|
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 Dt = [
|
|
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
|
+
], Et = G("square-check-big", Dt), Ge = {
|
|
132
132
|
sessionId: null,
|
|
133
133
|
status: "idle",
|
|
134
134
|
step: "upload",
|
|
@@ -149,8 +149,8 @@ const Vt = [
|
|
|
149
149
|
error: null,
|
|
150
150
|
editingCell: null,
|
|
151
151
|
editedRows: /* @__PURE__ */ new Set()
|
|
152
|
-
}, X =
|
|
153
|
-
...
|
|
152
|
+
}, X = ut((e, o) => ({
|
|
153
|
+
...Ge,
|
|
154
154
|
setSchema: (t) => e({ schema: t }),
|
|
155
155
|
setSessionId: (t) => e({ sessionId: t }),
|
|
156
156
|
setFile: (t) => e({
|
|
@@ -195,35 +195,35 @@ const Vt = [
|
|
|
195
195
|
}),
|
|
196
196
|
stopEditing: () => e({ editingCell: null }),
|
|
197
197
|
updateCell: (t, n, r) => e((l) => {
|
|
198
|
-
const i = [...l.rows],
|
|
199
|
-
|
|
198
|
+
const i = [...l.rows], s = i.find((d) => d.rowIndex === t);
|
|
199
|
+
s && (s.data = { ...s.data, [n]: String(r) });
|
|
200
200
|
const u = new Set(l.editedRows);
|
|
201
201
|
return u.add(t), { rows: i, editedRows: u, editingCell: null };
|
|
202
202
|
}),
|
|
203
203
|
setStatus: (t) => e({ status: t }),
|
|
204
204
|
setLoading: (t) => e({ isLoading: t }),
|
|
205
205
|
setError: (t) => e({ error: t }),
|
|
206
|
-
reset: () => e(
|
|
207
|
-
})),
|
|
206
|
+
reset: () => e(Ge)
|
|
207
|
+
})), kt = ({
|
|
208
208
|
onFileSelect: e,
|
|
209
209
|
maxSize: o = 50 * 1024 * 1024,
|
|
210
210
|
// 50MB
|
|
211
211
|
acceptedTypes: t = [".csv", ".xlsx", ".xls"]
|
|
212
212
|
}) => {
|
|
213
|
-
const { file: n, fileName: r, fileSize: l, setFile: i, error:
|
|
213
|
+
const { file: n, fileName: r, fileSize: l, setFile: i, error: s, setError: u, isLoading: d } = X(), p = xe(
|
|
214
214
|
(w, R) => {
|
|
215
215
|
if (R.length > 0) {
|
|
216
216
|
u("Invalid file type or file too large");
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
219
|
if (w.length > 0) {
|
|
220
|
-
const
|
|
221
|
-
i(
|
|
220
|
+
const _ = w[0];
|
|
221
|
+
i(_), e == null || e(_);
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
[e, i, u]
|
|
225
|
-
), { getRootProps:
|
|
226
|
-
onDrop:
|
|
225
|
+
), { getRootProps: c, getInputProps: f, isDragActive: a } = ft({
|
|
226
|
+
onDrop: p,
|
|
227
227
|
accept: {
|
|
228
228
|
"text/csv": [".csv"],
|
|
229
229
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
|
|
@@ -231,12 +231,12 @@ const Vt = [
|
|
|
231
231
|
},
|
|
232
232
|
maxSize: o,
|
|
233
233
|
multiple: !1,
|
|
234
|
-
disabled:
|
|
234
|
+
disabled: d
|
|
235
235
|
}), m = (w) => w < 1024 ? `${w} B` : w < 1024 * 1024 ? `${(w / 1024).toFixed(1)} KB` : `${(w / (1024 * 1024)).toFixed(1)} MB`, h = (w) => {
|
|
236
236
|
w.stopPropagation(), X.getState().reset();
|
|
237
237
|
};
|
|
238
238
|
return n ? /* @__PURE__ */ g("div", { className: "ff-p-4 ff-rounded-xl ff-border", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
|
|
239
|
-
/* @__PURE__ */ g("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ g(
|
|
239
|
+
/* @__PURE__ */ g("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ g(Mt, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
|
|
240
240
|
/* @__PURE__ */ v("div", { className: "ff-flex-1 ff-min-w-0", children: [
|
|
241
241
|
/* @__PURE__ */ g("p", { className: "ff-font-medium ff-truncate", style: { color: "var(--ff-success-dark)" }, children: r }),
|
|
242
242
|
/* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: m(l || 0) })
|
|
@@ -248,28 +248,28 @@ const Vt = [
|
|
|
248
248
|
className: "ff-p-1.5 ff-rounded-full ff-transition-colors",
|
|
249
249
|
style: { color: "var(--ff-success)" },
|
|
250
250
|
"aria-label": "Remove file",
|
|
251
|
-
children: /* @__PURE__ */ g(
|
|
251
|
+
children: /* @__PURE__ */ g(oe, { className: "ff-w-5 ff-h-5" })
|
|
252
252
|
}
|
|
253
253
|
)
|
|
254
254
|
] }) }) : /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
|
|
255
255
|
/* @__PURE__ */ v(
|
|
256
256
|
"div",
|
|
257
257
|
{
|
|
258
|
-
...
|
|
259
|
-
className:
|
|
258
|
+
...c(),
|
|
259
|
+
className: B(
|
|
260
260
|
"ff-dropzone",
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
a && "ff-dropzone-active",
|
|
262
|
+
d && "ff-opacity-50 ff-cursor-not-allowed"
|
|
263
263
|
),
|
|
264
264
|
children: [
|
|
265
|
-
/* @__PURE__ */ g("input", { ...
|
|
266
|
-
/* @__PURE__ */ g("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ g(
|
|
267
|
-
/* @__PURE__ */ g("h3", { className: "ff-dropzone-text", children:
|
|
265
|
+
/* @__PURE__ */ g("input", { ...f() }),
|
|
266
|
+
/* @__PURE__ */ g("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ g(je, { className: "ff-dropzone-icon" }) }),
|
|
267
|
+
/* @__PURE__ */ g("h3", { className: "ff-dropzone-text", children: a ? "Drop your file here" : "Upload your file" }),
|
|
268
268
|
/* @__PURE__ */ g("p", { className: "ff-dropzone-hint", children: "Drag and drop or click to select" }),
|
|
269
|
-
/* @__PURE__ */ g("label", { className: "ff-inline-block", children: /* @__PURE__ */ g("span", { className:
|
|
269
|
+
/* @__PURE__ */ g("label", { className: "ff-inline-block", children: /* @__PURE__ */ g("span", { className: B(
|
|
270
270
|
"ff-btn ff-btn-primary",
|
|
271
|
-
|
|
272
|
-
), children:
|
|
271
|
+
d && "ff-opacity-50 ff-cursor-wait"
|
|
272
|
+
), children: d ? "Processing..." : "Choose file" }) }),
|
|
273
273
|
/* @__PURE__ */ v("p", { className: "ff-dropzone-formats", children: [
|
|
274
274
|
"Supports ",
|
|
275
275
|
t.join(", "),
|
|
@@ -279,17 +279,17 @@ const Vt = [
|
|
|
279
279
|
]
|
|
280
280
|
}
|
|
281
281
|
),
|
|
282
|
-
|
|
282
|
+
s && /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", color: "var(--ff-error)" }, children: [
|
|
283
283
|
/* @__PURE__ */ g(_e, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
|
|
284
|
-
/* @__PURE__ */ g("p", { children:
|
|
284
|
+
/* @__PURE__ */ g("p", { children: s })
|
|
285
285
|
] })
|
|
286
286
|
] });
|
|
287
|
-
},
|
|
288
|
-
const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = X(), l = (t == null ? void 0 : t.columns) || [], i = (
|
|
289
|
-
const
|
|
290
|
-
r(
|
|
291
|
-
},
|
|
292
|
-
o.filter((
|
|
287
|
+
}, Lt = ({ onMappingChange: e }) => {
|
|
288
|
+
const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = X(), l = (t == null ? void 0 : t.columns) || [], i = (c, f) => {
|
|
289
|
+
const a = f === "" ? null : f;
|
|
290
|
+
r(c, a), e == null || e(c, a);
|
|
291
|
+
}, s = (c) => c >= 0.85 ? "var(--ff-success)" : c >= 0.6 ? "var(--ff-warning)" : "var(--ff-error)", u = (c) => c >= 0.85 ? "High" : c >= 0.6 ? "Medium" : "Low", p = new Set(
|
|
292
|
+
o.filter((c) => c.targetKey !== null).map((c) => c.targetKey)
|
|
293
293
|
);
|
|
294
294
|
return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
|
|
295
295
|
/* @__PURE__ */ v("div", { className: "ff-mapping-header", children: [
|
|
@@ -312,25 +312,25 @@ const Vt = [
|
|
|
312
312
|
] })
|
|
313
313
|
] })
|
|
314
314
|
] }),
|
|
315
|
-
/* @__PURE__ */ g("div", { className: "ff-space-y-2", children: o.map((
|
|
316
|
-
l.find((m) => m.key ===
|
|
317
|
-
const
|
|
315
|
+
/* @__PURE__ */ g("div", { className: "ff-space-y-2", children: o.map((c) => {
|
|
316
|
+
l.find((m) => m.key === c.targetKey);
|
|
317
|
+
const f = c.targetKey !== null, a = c.confidence >= 0.85;
|
|
318
318
|
return /* @__PURE__ */ v(
|
|
319
319
|
"div",
|
|
320
320
|
{
|
|
321
|
-
className:
|
|
321
|
+
className: B(
|
|
322
322
|
"ff-mapping-row",
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
f && a && "ff-mapping-row-success",
|
|
324
|
+
f && !a && "ff-mapping-row-warning"
|
|
325
325
|
),
|
|
326
326
|
children: [
|
|
327
|
-
/* @__PURE__ */ g("div", { className: "ff-flex-1", children: /* @__PURE__ */ g("div", { className: "ff-mapping-source", children:
|
|
328
|
-
/* @__PURE__ */ g("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ g(
|
|
327
|
+
/* @__PURE__ */ g("div", { className: "ff-flex-1", children: /* @__PURE__ */ g("div", { className: "ff-mapping-source", children: c.sourceColumn }) }),
|
|
328
|
+
/* @__PURE__ */ g("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ g(mt, { className: "ff-w-5 ff-h-5" }) }),
|
|
329
329
|
/* @__PURE__ */ g("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ v(
|
|
330
330
|
"select",
|
|
331
331
|
{
|
|
332
|
-
value:
|
|
333
|
-
onChange: (m) => i(
|
|
332
|
+
value: c.targetKey || "",
|
|
333
|
+
onChange: (m) => i(c.sourceColumn, m.target.value),
|
|
334
334
|
className: "ff-input",
|
|
335
335
|
children: [
|
|
336
336
|
/* @__PURE__ */ g("option", { value: "", children: "-- Do not import --" }),
|
|
@@ -338,7 +338,7 @@ const Vt = [
|
|
|
338
338
|
"option",
|
|
339
339
|
{
|
|
340
340
|
value: m.key,
|
|
341
|
-
disabled:
|
|
341
|
+
disabled: p.has(m.key) && c.targetKey !== m.key,
|
|
342
342
|
children: [
|
|
343
343
|
m.label,
|
|
344
344
|
" (",
|
|
@@ -352,32 +352,32 @@ const Vt = [
|
|
|
352
352
|
]
|
|
353
353
|
}
|
|
354
354
|
) }),
|
|
355
|
-
/* @__PURE__ */ g("div", { className: "ff-mapping-status", children:
|
|
356
|
-
|
|
355
|
+
/* @__PURE__ */ g("div", { className: "ff-mapping-status", children: f ? a ? /* @__PURE__ */ g(vt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(Rt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ g("span", { className: "ff-w-5 ff-h-5" }) }),
|
|
356
|
+
c.confidence > 0 && /* @__PURE__ */ v("div", { className: "ff-confidence", style: { color: s(c.confidence) }, children: [
|
|
357
357
|
/* @__PURE__ */ v("span", { children: [
|
|
358
|
-
Math.round(
|
|
358
|
+
Math.round(c.confidence * 100),
|
|
359
359
|
"%"
|
|
360
360
|
] }),
|
|
361
361
|
/* @__PURE__ */ v("span", { style: { color: "var(--ff-text-muted)" }, children: [
|
|
362
362
|
"(",
|
|
363
|
-
u(
|
|
363
|
+
u(c.confidence),
|
|
364
364
|
")"
|
|
365
365
|
] })
|
|
366
366
|
] })
|
|
367
367
|
]
|
|
368
368
|
},
|
|
369
|
-
|
|
369
|
+
c.sourceColumn
|
|
370
370
|
);
|
|
371
371
|
}) }),
|
|
372
372
|
(() => {
|
|
373
|
-
const
|
|
374
|
-
(
|
|
373
|
+
const c = l.filter(
|
|
374
|
+
(f) => f.required && !p.has(f.key)
|
|
375
375
|
);
|
|
376
|
-
return
|
|
376
|
+
return c.length > 0 ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-2 ff-p-4 ff-rounded-lg", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
|
|
377
377
|
/* @__PURE__ */ g(_e, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
|
|
378
378
|
/* @__PURE__ */ v("div", { children: [
|
|
379
379
|
/* @__PURE__ */ g("p", { className: "ff-text-sm ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Required fields not mapped" }),
|
|
380
|
-
/* @__PURE__ */ g("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children:
|
|
380
|
+
/* @__PURE__ */ g("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: c.map((f) => f.label).join(", ") })
|
|
381
381
|
] })
|
|
382
382
|
] }) : null;
|
|
383
383
|
})()
|
|
@@ -393,7 +393,7 @@ const Vt = [
|
|
|
393
393
|
*
|
|
394
394
|
* @license MIT
|
|
395
395
|
*/
|
|
396
|
-
function
|
|
396
|
+
function Ht() {
|
|
397
397
|
return {
|
|
398
398
|
accessor: (e, o) => typeof e == "function" ? {
|
|
399
399
|
...o,
|
|
@@ -406,24 +406,24 @@ function Et() {
|
|
|
406
406
|
group: (e) => e
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function b(e, o) {
|
|
410
410
|
return typeof e == "function" ? e(o) : e;
|
|
411
411
|
}
|
|
412
412
|
function L(e, o) {
|
|
413
413
|
return (t) => {
|
|
414
414
|
o.setState((n) => ({
|
|
415
415
|
...n,
|
|
416
|
-
[e]:
|
|
416
|
+
[e]: b(t, n[e])
|
|
417
417
|
}));
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function re(e) {
|
|
421
421
|
return e instanceof Function;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function zt(e) {
|
|
424
424
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function At(e, o) {
|
|
427
427
|
const t = [], n = (r) => {
|
|
428
428
|
r.forEach((l) => {
|
|
429
429
|
t.push(l);
|
|
@@ -438,21 +438,21 @@ function C(e, o, t) {
|
|
|
438
438
|
return (l) => {
|
|
439
439
|
let i;
|
|
440
440
|
t.key && t.debug && (i = Date.now());
|
|
441
|
-
const
|
|
442
|
-
if (!(
|
|
441
|
+
const s = e(l);
|
|
442
|
+
if (!(s.length !== n.length || s.some((p, c) => n[c] !== p)))
|
|
443
443
|
return r;
|
|
444
|
-
n =
|
|
445
|
-
let
|
|
446
|
-
if (t.key && t.debug && (
|
|
447
|
-
const
|
|
444
|
+
n = s;
|
|
445
|
+
let d;
|
|
446
|
+
if (t.key && t.debug && (d = Date.now()), r = o(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
447
|
+
const p = Math.round((Date.now() - i) * 100) / 100, c = Math.round((Date.now() - d) * 100) / 100, f = c / 16, a = (m, h) => {
|
|
448
448
|
for (m = String(m); m.length < h; )
|
|
449
449
|
m = " " + m;
|
|
450
450
|
return m;
|
|
451
451
|
};
|
|
452
|
-
console.info(`%c⏱ ${
|
|
452
|
+
console.info(`%c⏱ ${a(c, 5)} /${a(p, 5)} ms`, `
|
|
453
453
|
font-size: .6rem;
|
|
454
454
|
font-weight: bold;
|
|
455
|
-
color: hsl(${Math.max(0, Math.min(120 - 120 *
|
|
455
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * f, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
456
456
|
}
|
|
457
457
|
return r;
|
|
458
458
|
};
|
|
@@ -467,7 +467,7 @@ function S(e, o, t, n) {
|
|
|
467
467
|
onChange: n
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Gt(e, o, t, n) {
|
|
471
471
|
const r = () => {
|
|
472
472
|
var i;
|
|
473
473
|
return (i = l.getValue()) != null ? i : e.options.renderFallbackValue;
|
|
@@ -477,61 +477,61 @@ function Ht(e, o, t, n) {
|
|
|
477
477
|
column: t,
|
|
478
478
|
getValue: () => o.getValue(n),
|
|
479
479
|
renderValue: r,
|
|
480
|
-
getContext: C(() => [e, t, o, l], (i,
|
|
480
|
+
getContext: C(() => [e, t, o, l], (i, s, u, d) => ({
|
|
481
481
|
table: i,
|
|
482
|
-
column:
|
|
482
|
+
column: s,
|
|
483
483
|
row: u,
|
|
484
|
-
cell:
|
|
485
|
-
getValue:
|
|
486
|
-
renderValue:
|
|
484
|
+
cell: d,
|
|
485
|
+
getValue: d.getValue,
|
|
486
|
+
renderValue: d.renderValue
|
|
487
487
|
}), S(e.options, "debugCells", "cell.getContext"))
|
|
488
488
|
};
|
|
489
489
|
return e._features.forEach((i) => {
|
|
490
490
|
i.createCell == null || i.createCell(l, t, o, e);
|
|
491
491
|
}, {}), l;
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function Ot(e, o, t, n) {
|
|
494
494
|
var r, l;
|
|
495
|
-
const
|
|
495
|
+
const s = {
|
|
496
496
|
...e._getDefaultColumnDef(),
|
|
497
497
|
...o
|
|
498
|
-
}, u =
|
|
499
|
-
let
|
|
500
|
-
if (
|
|
501
|
-
let
|
|
498
|
+
}, u = s.accessorKey;
|
|
499
|
+
let d = (r = (l = s.id) != null ? l : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, p;
|
|
500
|
+
if (s.accessorFn ? p = s.accessorFn : u && (u.includes(".") ? p = (f) => {
|
|
501
|
+
let a = f;
|
|
502
502
|
for (const h of u.split(".")) {
|
|
503
503
|
var m;
|
|
504
|
-
|
|
504
|
+
a = (m = a) == null ? void 0 : m[h], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`);
|
|
505
505
|
}
|
|
506
|
-
return
|
|
507
|
-
} :
|
|
508
|
-
throw process.env.NODE_ENV !== "production" ? new Error(
|
|
509
|
-
let
|
|
510
|
-
id: `${String(
|
|
511
|
-
accessorFn:
|
|
506
|
+
return a;
|
|
507
|
+
} : p = (f) => f[s.accessorKey]), !d)
|
|
508
|
+
throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
509
|
+
let c = {
|
|
510
|
+
id: `${String(d)}`,
|
|
511
|
+
accessorFn: p,
|
|
512
512
|
parent: n,
|
|
513
513
|
depth: t,
|
|
514
|
-
columnDef:
|
|
514
|
+
columnDef: s,
|
|
515
515
|
columns: [],
|
|
516
516
|
getFlatColumns: C(() => [!0], () => {
|
|
517
|
-
var
|
|
518
|
-
return [
|
|
517
|
+
var f;
|
|
518
|
+
return [c, ...(f = c.columns) == null ? void 0 : f.flatMap((a) => a.getFlatColumns())];
|
|
519
519
|
}, S(e.options, "debugColumns", "column.getFlatColumns")),
|
|
520
|
-
getLeafColumns: C(() => [e._getOrderColumnsFn()], (
|
|
521
|
-
var
|
|
522
|
-
if ((
|
|
523
|
-
let m =
|
|
524
|
-
return
|
|
520
|
+
getLeafColumns: C(() => [e._getOrderColumnsFn()], (f) => {
|
|
521
|
+
var a;
|
|
522
|
+
if ((a = c.columns) != null && a.length) {
|
|
523
|
+
let m = c.columns.flatMap((h) => h.getLeafColumns());
|
|
524
|
+
return f(m);
|
|
525
525
|
}
|
|
526
|
-
return [
|
|
526
|
+
return [c];
|
|
527
527
|
}, S(e.options, "debugColumns", "column.getLeafColumns"))
|
|
528
528
|
};
|
|
529
|
-
for (const
|
|
530
|
-
|
|
531
|
-
return
|
|
529
|
+
for (const f of e._features)
|
|
530
|
+
f.createColumn == null || f.createColumn(c, e);
|
|
531
|
+
return c;
|
|
532
532
|
}
|
|
533
|
-
const
|
|
534
|
-
function
|
|
533
|
+
const E = "debugHeaders";
|
|
534
|
+
function Oe(e, o, t) {
|
|
535
535
|
var n;
|
|
536
536
|
let l = {
|
|
537
537
|
id: (n = t.id) != null ? n : o.id,
|
|
@@ -545,10 +545,10 @@ function Ge(e, o, t) {
|
|
|
545
545
|
rowSpan: 0,
|
|
546
546
|
headerGroup: null,
|
|
547
547
|
getLeafHeaders: () => {
|
|
548
|
-
const i = [],
|
|
549
|
-
u.subHeaders && u.subHeaders.length && u.subHeaders.map(
|
|
548
|
+
const i = [], s = (u) => {
|
|
549
|
+
u.subHeaders && u.subHeaders.length && u.subHeaders.map(s), i.push(u);
|
|
550
550
|
};
|
|
551
|
-
return
|
|
551
|
+
return s(l), i;
|
|
552
552
|
},
|
|
553
553
|
getContext: () => ({
|
|
554
554
|
table: e,
|
|
@@ -560,93 +560,93 @@ function Ge(e, o, t) {
|
|
|
560
560
|
i.createHeader == null || i.createHeader(l, e);
|
|
561
561
|
}), l;
|
|
562
562
|
}
|
|
563
|
-
const
|
|
563
|
+
const bt = {
|
|
564
564
|
createTable: (e) => {
|
|
565
565
|
e.getHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
|
|
566
566
|
var l, i;
|
|
567
|
-
const
|
|
568
|
-
return
|
|
569
|
-
}, S(e.options,
|
|
567
|
+
const s = (l = n == null ? void 0 : n.map((c) => t.find((f) => f.id === c)).filter(Boolean)) != null ? l : [], u = (i = r == null ? void 0 : r.map((c) => t.find((f) => f.id === c)).filter(Boolean)) != null ? i : [], d = t.filter((c) => !(n != null && n.includes(c.id)) && !(r != null && r.includes(c.id)));
|
|
568
|
+
return ee(o, [...s, ...d, ...u], e);
|
|
569
|
+
}, S(e.options, E, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [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))), ee(o, t, e, "center")), S(e.options, E, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
|
570
570
|
var r;
|
|
571
|
-
const l = (r = n == null ? void 0 : n.map((i) => t.find((
|
|
572
|
-
return
|
|
573
|
-
}, S(e.options,
|
|
571
|
+
const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
|
|
572
|
+
return ee(o, l, e, "left");
|
|
573
|
+
}, S(e.options, E, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
|
|
574
574
|
var r;
|
|
575
|
-
const l = (r = n == null ? void 0 : n.map((i) => t.find((
|
|
576
|
-
return
|
|
577
|
-
}, S(e.options,
|
|
575
|
+
const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
|
|
576
|
+
return ee(o, l, e, "right");
|
|
577
|
+
}, S(e.options, E, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (o) => [...o].reverse(), S(e.options, E, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), S(e.options, E, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), S(e.options, E, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), S(e.options, E, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, E, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, E, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, E, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, E, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
578
578
|
var n;
|
|
579
579
|
return !((n = t.subHeaders) != null && n.length);
|
|
580
|
-
}), S(e.options,
|
|
580
|
+
}), S(e.options, E, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
|
581
581
|
var n;
|
|
582
582
|
return !((n = t.subHeaders) != null && n.length);
|
|
583
|
-
}), S(e.options,
|
|
583
|
+
}), S(e.options, E, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
|
584
584
|
var n;
|
|
585
585
|
return !((n = t.subHeaders) != null && n.length);
|
|
586
|
-
}), S(e.options,
|
|
587
|
-
var r, l, i,
|
|
588
|
-
return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (
|
|
589
|
-
}, S(e.options,
|
|
586
|
+
}), S(e.options, E, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
587
|
+
var r, l, i, s, u, d;
|
|
588
|
+
return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (s = t[0]) == null ? void 0 : s.headers) != null ? i : [], ...(u = (d = n[0]) == null ? void 0 : d.headers) != null ? u : []].map((p) => p.getLeafHeaders()).flat();
|
|
589
|
+
}, S(e.options, E, "getLeafHeaders"));
|
|
590
590
|
}
|
|
591
591
|
};
|
|
592
|
-
function
|
|
592
|
+
function ee(e, o, t, n) {
|
|
593
593
|
var r, l;
|
|
594
594
|
let i = 0;
|
|
595
|
-
const
|
|
596
|
-
|
|
595
|
+
const s = function(f, a) {
|
|
596
|
+
a === void 0 && (a = 1), i = Math.max(i, a), f.filter((m) => m.getIsVisible()).forEach((m) => {
|
|
597
597
|
var h;
|
|
598
|
-
(h = m.columns) != null && h.length &&
|
|
598
|
+
(h = m.columns) != null && h.length && s(m.columns, a + 1);
|
|
599
599
|
}, 0);
|
|
600
600
|
};
|
|
601
|
-
|
|
601
|
+
s(e);
|
|
602
602
|
let u = [];
|
|
603
|
-
const
|
|
603
|
+
const d = (f, a) => {
|
|
604
604
|
const m = {
|
|
605
|
-
depth:
|
|
606
|
-
id: [n, `${
|
|
605
|
+
depth: a,
|
|
606
|
+
id: [n, `${a}`].filter(Boolean).join("_"),
|
|
607
607
|
headers: []
|
|
608
608
|
}, h = [];
|
|
609
|
-
|
|
610
|
-
const R = [...h].reverse()[0],
|
|
611
|
-
let
|
|
612
|
-
if (
|
|
609
|
+
f.forEach((w) => {
|
|
610
|
+
const R = [...h].reverse()[0], _ = w.column.depth === m.depth;
|
|
611
|
+
let $, P = !1;
|
|
612
|
+
if (_ && w.column.parent ? $ = w.column.parent : ($ = w.column, P = !0), R && (R == null ? void 0 : R.column) === $)
|
|
613
613
|
R.subHeaders.push(w);
|
|
614
614
|
else {
|
|
615
|
-
const
|
|
616
|
-
id: [n,
|
|
617
|
-
isPlaceholder:
|
|
618
|
-
placeholderId:
|
|
619
|
-
depth:
|
|
615
|
+
const I = Oe(t, $, {
|
|
616
|
+
id: [n, a, $.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
|
|
617
|
+
isPlaceholder: P,
|
|
618
|
+
placeholderId: P ? `${h.filter((H) => H.column === $).length}` : void 0,
|
|
619
|
+
depth: a,
|
|
620
620
|
index: h.length
|
|
621
621
|
});
|
|
622
|
-
|
|
622
|
+
I.subHeaders.push(w), h.push(I);
|
|
623
623
|
}
|
|
624
624
|
m.headers.push(w), w.headerGroup = m;
|
|
625
|
-
}), u.push(m),
|
|
626
|
-
},
|
|
625
|
+
}), u.push(m), a > 0 && d(h, a - 1);
|
|
626
|
+
}, p = o.map((f, a) => Oe(t, f, {
|
|
627
627
|
depth: i,
|
|
628
|
-
index:
|
|
628
|
+
index: a
|
|
629
629
|
}));
|
|
630
|
-
|
|
631
|
-
const
|
|
630
|
+
d(p, i - 1), u.reverse();
|
|
631
|
+
const c = (f) => f.filter((m) => m.column.getIsVisible()).map((m) => {
|
|
632
632
|
let h = 0, w = 0, R = [0];
|
|
633
|
-
m.subHeaders && m.subHeaders.length ? (R = [],
|
|
633
|
+
m.subHeaders && m.subHeaders.length ? (R = [], c(m.subHeaders).forEach(($) => {
|
|
634
634
|
let {
|
|
635
|
-
colSpan:
|
|
636
|
-
rowSpan:
|
|
637
|
-
} =
|
|
638
|
-
h +=
|
|
635
|
+
colSpan: P,
|
|
636
|
+
rowSpan: I
|
|
637
|
+
} = $;
|
|
638
|
+
h += P, R.push(I);
|
|
639
639
|
})) : h = 1;
|
|
640
|
-
const
|
|
641
|
-
return w = w +
|
|
640
|
+
const _ = Math.min(...R);
|
|
641
|
+
return w = w + _, m.colSpan = h, m.rowSpan = w, {
|
|
642
642
|
colSpan: h,
|
|
643
643
|
rowSpan: w
|
|
644
644
|
};
|
|
645
645
|
});
|
|
646
|
-
return
|
|
646
|
+
return c((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
|
|
647
647
|
}
|
|
648
648
|
const $e = (e, o, t, n, r, l, i) => {
|
|
649
|
-
let
|
|
649
|
+
let s = {
|
|
650
650
|
id: o,
|
|
651
651
|
index: n,
|
|
652
652
|
original: t,
|
|
@@ -655,85 +655,85 @@ const $e = (e, o, t, n, r, l, i) => {
|
|
|
655
655
|
_valuesCache: {},
|
|
656
656
|
_uniqueValuesCache: {},
|
|
657
657
|
getValue: (u) => {
|
|
658
|
-
if (
|
|
659
|
-
return
|
|
660
|
-
const
|
|
661
|
-
if (
|
|
662
|
-
return
|
|
658
|
+
if (s._valuesCache.hasOwnProperty(u))
|
|
659
|
+
return s._valuesCache[u];
|
|
660
|
+
const d = e.getColumn(u);
|
|
661
|
+
if (d != null && d.accessorFn)
|
|
662
|
+
return s._valuesCache[u] = d.accessorFn(s.original, n), s._valuesCache[u];
|
|
663
663
|
},
|
|
664
664
|
getUniqueValues: (u) => {
|
|
665
|
-
if (
|
|
666
|
-
return
|
|
667
|
-
const
|
|
668
|
-
if (
|
|
669
|
-
return
|
|
665
|
+
if (s._uniqueValuesCache.hasOwnProperty(u))
|
|
666
|
+
return s._uniqueValuesCache[u];
|
|
667
|
+
const d = e.getColumn(u);
|
|
668
|
+
if (d != null && d.accessorFn)
|
|
669
|
+
return d.columnDef.getUniqueValues ? (s._uniqueValuesCache[u] = d.columnDef.getUniqueValues(s.original, n), s._uniqueValuesCache[u]) : (s._uniqueValuesCache[u] = [s.getValue(u)], s._uniqueValuesCache[u]);
|
|
670
670
|
},
|
|
671
671
|
renderValue: (u) => {
|
|
672
|
-
var
|
|
673
|
-
return (
|
|
672
|
+
var d;
|
|
673
|
+
return (d = s.getValue(u)) != null ? d : e.options.renderFallbackValue;
|
|
674
674
|
},
|
|
675
675
|
subRows: [],
|
|
676
|
-
getLeafRows: () =>
|
|
677
|
-
getParentRow: () =>
|
|
676
|
+
getLeafRows: () => At(s.subRows, (u) => u.subRows),
|
|
677
|
+
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
678
678
|
getParentRows: () => {
|
|
679
|
-
let u = [],
|
|
679
|
+
let u = [], d = s;
|
|
680
680
|
for (; ; ) {
|
|
681
|
-
const
|
|
682
|
-
if (!
|
|
683
|
-
u.push(
|
|
681
|
+
const p = d.getParentRow();
|
|
682
|
+
if (!p) break;
|
|
683
|
+
u.push(p), d = p;
|
|
684
684
|
}
|
|
685
685
|
return u.reverse();
|
|
686
686
|
},
|
|
687
|
-
getAllCells: C(() => [e.getAllLeafColumns()], (u) => u.map((
|
|
688
|
-
_getAllCellsByColumnId: C(() => [
|
|
687
|
+
getAllCells: C(() => [e.getAllLeafColumns()], (u) => u.map((d) => Gt(e, s, d, d.id)), S(e.options, "debugRows", "getAllCells")),
|
|
688
|
+
_getAllCellsByColumnId: C(() => [s.getAllCells()], (u) => u.reduce((d, p) => (d[p.column.id] = p, d), {}), S(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
689
689
|
};
|
|
690
690
|
for (let u = 0; u < e._features.length; u++) {
|
|
691
|
-
const
|
|
692
|
-
|
|
691
|
+
const d = e._features[u];
|
|
692
|
+
d == null || d.createRow == null || d.createRow(s, e);
|
|
693
693
|
}
|
|
694
|
-
return
|
|
695
|
-
},
|
|
694
|
+
return s;
|
|
695
|
+
}, Bt = {
|
|
696
696
|
createColumn: (e, o) => {
|
|
697
697
|
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 = () => {
|
|
698
698
|
if (e._getFacetedMinMaxValues)
|
|
699
699
|
return e._getFacetedMinMaxValues();
|
|
700
700
|
};
|
|
701
701
|
}
|
|
702
|
-
},
|
|
702
|
+
}, Ue = (e, o, t) => {
|
|
703
703
|
var n, r;
|
|
704
704
|
const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
705
705
|
return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
|
|
706
706
|
};
|
|
707
|
-
|
|
708
|
-
const
|
|
707
|
+
Ue.autoRemove = (e) => z(e);
|
|
708
|
+
const Ke = (e, o, t) => {
|
|
709
709
|
var n;
|
|
710
710
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
711
711
|
};
|
|
712
|
-
|
|
713
|
-
const
|
|
712
|
+
Ke.autoRemove = (e) => z(e);
|
|
713
|
+
const Xe = (e, o, t) => {
|
|
714
714
|
var n;
|
|
715
715
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
716
716
|
};
|
|
717
|
-
|
|
718
|
-
const
|
|
717
|
+
Xe.autoRemove = (e) => z(e);
|
|
718
|
+
const We = (e, o, t) => {
|
|
719
719
|
var n;
|
|
720
720
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
721
721
|
};
|
|
722
|
-
|
|
723
|
-
const
|
|
722
|
+
We.autoRemove = (e) => z(e);
|
|
723
|
+
const Qe = (e, o, t) => !t.some((n) => {
|
|
724
724
|
var r;
|
|
725
725
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
|
726
726
|
});
|
|
727
|
-
|
|
728
|
-
const
|
|
727
|
+
Qe.autoRemove = (e) => z(e) || !(e != null && e.length);
|
|
728
|
+
const Ye = (e, o, t) => t.some((n) => {
|
|
729
729
|
var r;
|
|
730
730
|
return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
|
|
731
731
|
});
|
|
732
|
-
|
|
733
|
-
const
|
|
734
|
-
|
|
735
|
-
const
|
|
736
|
-
|
|
732
|
+
Ye.autoRemove = (e) => z(e) || !(e != null && e.length);
|
|
733
|
+
const Je = (e, o, t) => e.getValue(o) === t;
|
|
734
|
+
Je.autoRemove = (e) => z(e);
|
|
735
|
+
const Ze = (e, o, t) => e.getValue(o) == t;
|
|
736
|
+
Ze.autoRemove = (e) => z(e);
|
|
737
737
|
const Me = (e, o, t) => {
|
|
738
738
|
let [n, r] = t;
|
|
739
739
|
const l = e.getValue(o);
|
|
@@ -742,27 +742,27 @@ const Me = (e, o, t) => {
|
|
|
742
742
|
Me.resolveFilterValue = (e) => {
|
|
743
743
|
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, l = o === null || Number.isNaN(n) ? -1 / 0 : n, i = t === null || Number.isNaN(r) ? 1 / 0 : r;
|
|
744
744
|
if (l > i) {
|
|
745
|
-
const
|
|
746
|
-
l = i, i =
|
|
745
|
+
const s = l;
|
|
746
|
+
l = i, i = s;
|
|
747
747
|
}
|
|
748
748
|
return [l, i];
|
|
749
749
|
};
|
|
750
|
-
Me.autoRemove = (e) =>
|
|
751
|
-
const
|
|
752
|
-
includesString:
|
|
753
|
-
includesStringSensitive:
|
|
754
|
-
equalsString:
|
|
755
|
-
arrIncludes:
|
|
756
|
-
arrIncludesAll:
|
|
757
|
-
arrIncludesSome:
|
|
758
|
-
equals:
|
|
759
|
-
weakEquals:
|
|
750
|
+
Me.autoRemove = (e) => z(e) || z(e[0]) && z(e[1]);
|
|
751
|
+
const O = {
|
|
752
|
+
includesString: Ue,
|
|
753
|
+
includesStringSensitive: Ke,
|
|
754
|
+
equalsString: Xe,
|
|
755
|
+
arrIncludes: We,
|
|
756
|
+
arrIncludesAll: Qe,
|
|
757
|
+
arrIncludesSome: Ye,
|
|
758
|
+
equals: Je,
|
|
759
|
+
weakEquals: Ze,
|
|
760
760
|
inNumberRange: Me
|
|
761
761
|
};
|
|
762
|
-
function
|
|
762
|
+
function z(e) {
|
|
763
763
|
return e == null || e === "";
|
|
764
764
|
}
|
|
765
|
-
const
|
|
765
|
+
const Tt = {
|
|
766
766
|
getDefaultColumnDef: () => ({
|
|
767
767
|
filterFn: "auto"
|
|
768
768
|
}),
|
|
@@ -778,12 +778,12 @@ const Ot = {
|
|
|
778
778
|
createColumn: (e, o) => {
|
|
779
779
|
e.getAutoFilterFn = () => {
|
|
780
780
|
const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
|
|
781
|
-
return typeof n == "string" ?
|
|
781
|
+
return typeof n == "string" ? O.includesString : typeof n == "number" ? O.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? O.equals : Array.isArray(n) ? O.arrIncludes : O.weakEquals;
|
|
782
782
|
}, e.getFilterFn = () => {
|
|
783
783
|
var t, n;
|
|
784
|
-
return
|
|
784
|
+
return re(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
785
785
|
// @ts-ignore
|
|
786
|
-
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t :
|
|
786
|
+
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : O[e.columnDef.filterFn]
|
|
787
787
|
);
|
|
788
788
|
}, e.getCanFilter = () => {
|
|
789
789
|
var t, n, r;
|
|
@@ -796,18 +796,18 @@ const Ot = {
|
|
|
796
796
|
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
797
797
|
}, e.setFilterValue = (t) => {
|
|
798
798
|
o.setColumnFilters((n) => {
|
|
799
|
-
const r = e.getFilterFn(), l = n == null ? void 0 : n.find((
|
|
800
|
-
if (
|
|
801
|
-
var
|
|
802
|
-
return (
|
|
799
|
+
const r = e.getFilterFn(), l = n == null ? void 0 : n.find((p) => p.id === e.id), i = b(t, l ? l.value : void 0);
|
|
800
|
+
if (be(r, i, e)) {
|
|
801
|
+
var s;
|
|
802
|
+
return (s = n == null ? void 0 : n.filter((p) => p.id !== e.id)) != null ? s : [];
|
|
803
803
|
}
|
|
804
804
|
const u = {
|
|
805
805
|
id: e.id,
|
|
806
806
|
value: i
|
|
807
807
|
};
|
|
808
808
|
if (l) {
|
|
809
|
-
var
|
|
810
|
-
return (
|
|
809
|
+
var d;
|
|
810
|
+
return (d = n == null ? void 0 : n.map((p) => p.id === e.id ? u : p)) != null ? d : [];
|
|
811
811
|
}
|
|
812
812
|
return n != null && n.length ? [...n, u] : [u];
|
|
813
813
|
});
|
|
@@ -820,11 +820,11 @@ const Ot = {
|
|
|
820
820
|
e.setColumnFilters = (o) => {
|
|
821
821
|
const t = e.getAllLeafColumns(), n = (r) => {
|
|
822
822
|
var l;
|
|
823
|
-
return (l =
|
|
824
|
-
const
|
|
825
|
-
if (
|
|
826
|
-
const u =
|
|
827
|
-
if (
|
|
823
|
+
return (l = b(o, r)) == null ? void 0 : l.filter((i) => {
|
|
824
|
+
const s = t.find((u) => u.id === i.id);
|
|
825
|
+
if (s) {
|
|
826
|
+
const u = s.getFilterFn();
|
|
827
|
+
if (be(u, i.value, s))
|
|
828
828
|
return !1;
|
|
829
829
|
}
|
|
830
830
|
return !0;
|
|
@@ -837,57 +837,57 @@ const Ot = {
|
|
|
837
837
|
}, 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());
|
|
838
838
|
}
|
|
839
839
|
};
|
|
840
|
-
function
|
|
840
|
+
function be(e, o, t) {
|
|
841
841
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
|
842
842
|
}
|
|
843
|
-
const
|
|
843
|
+
const qt = (e, o, t) => t.reduce((n, r) => {
|
|
844
844
|
const l = r.getValue(e);
|
|
845
845
|
return n + (typeof l == "number" ? l : 0);
|
|
846
|
-
}, 0),
|
|
846
|
+
}, 0), jt = (e, o, t) => {
|
|
847
847
|
let n;
|
|
848
848
|
return t.forEach((r) => {
|
|
849
849
|
const l = r.getValue(e);
|
|
850
850
|
l != null && (n > l || n === void 0 && l >= l) && (n = l);
|
|
851
851
|
}), n;
|
|
852
|
-
},
|
|
852
|
+
}, Ut = (e, o, t) => {
|
|
853
853
|
let n;
|
|
854
854
|
return t.forEach((r) => {
|
|
855
855
|
const l = r.getValue(e);
|
|
856
856
|
l != null && (n < l || n === void 0 && l >= l) && (n = l);
|
|
857
857
|
}), n;
|
|
858
|
-
},
|
|
858
|
+
}, Kt = (e, o, t) => {
|
|
859
859
|
let n, r;
|
|
860
860
|
return t.forEach((l) => {
|
|
861
861
|
const i = l.getValue(e);
|
|
862
862
|
i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i)));
|
|
863
863
|
}), [n, r];
|
|
864
|
-
},
|
|
864
|
+
}, Xt = (e, o) => {
|
|
865
865
|
let t = 0, n = 0;
|
|
866
866
|
if (o.forEach((r) => {
|
|
867
867
|
let l = r.getValue(e);
|
|
868
868
|
l != null && (l = +l) >= l && (++t, n += l);
|
|
869
869
|
}), t) return n / t;
|
|
870
|
-
},
|
|
870
|
+
}, Wt = (e, o) => {
|
|
871
871
|
if (!o.length)
|
|
872
872
|
return;
|
|
873
873
|
const t = o.map((l) => l.getValue(e));
|
|
874
|
-
if (!
|
|
874
|
+
if (!zt(t))
|
|
875
875
|
return;
|
|
876
876
|
if (t.length === 1)
|
|
877
877
|
return t[0];
|
|
878
878
|
const n = Math.floor(t.length / 2), r = t.sort((l, i) => l - i);
|
|
879
879
|
return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
|
|
880
|
-
},
|
|
881
|
-
sum:
|
|
882
|
-
min:
|
|
883
|
-
max:
|
|
884
|
-
extent:
|
|
885
|
-
mean:
|
|
886
|
-
median:
|
|
887
|
-
unique:
|
|
888
|
-
uniqueCount:
|
|
889
|
-
count:
|
|
890
|
-
},
|
|
880
|
+
}, Qt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), Yt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Jt = (e, o) => o.length, ae = {
|
|
881
|
+
sum: qt,
|
|
882
|
+
min: jt,
|
|
883
|
+
max: Ut,
|
|
884
|
+
extent: Kt,
|
|
885
|
+
mean: Xt,
|
|
886
|
+
median: Wt,
|
|
887
|
+
unique: Qt,
|
|
888
|
+
uniqueCount: Yt,
|
|
889
|
+
count: Jt
|
|
890
|
+
}, Zt = {
|
|
891
891
|
getDefaultColumnDef: () => ({
|
|
892
892
|
aggregatedCell: (e) => {
|
|
893
893
|
var o, t;
|
|
@@ -930,7 +930,7 @@ const bt = (e, o, t) => t.reduce((n, r) => {
|
|
|
930
930
|
var t, n;
|
|
931
931
|
if (!e)
|
|
932
932
|
throw new Error();
|
|
933
|
-
return
|
|
933
|
+
return re(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : ae[e.columnDef.aggregationFn];
|
|
934
934
|
};
|
|
935
935
|
},
|
|
936
936
|
createTable: (e) => {
|
|
@@ -954,13 +954,13 @@ const bt = (e, o, t) => t.reduce((n, r) => {
|
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
956
|
};
|
|
957
|
-
function
|
|
957
|
+
function en(e, o, t) {
|
|
958
958
|
if (!(o != null && o.length) || !t)
|
|
959
959
|
return e;
|
|
960
960
|
const n = e.filter((l) => !o.includes(l.id));
|
|
961
961
|
return t === "remove" ? n : [...o.map((l) => e.find((i) => i.id === l)).filter(Boolean), ...n];
|
|
962
962
|
}
|
|
963
|
-
const
|
|
963
|
+
const tn = {
|
|
964
964
|
getInitialState: (e) => ({
|
|
965
965
|
columnOrder: [],
|
|
966
966
|
...e
|
|
@@ -987,20 +987,20 @@ const Jt = {
|
|
|
987
987
|
if (!(o != null && o.length))
|
|
988
988
|
l = r;
|
|
989
989
|
else {
|
|
990
|
-
const i = [...o],
|
|
991
|
-
for (;
|
|
992
|
-
const u = i.shift(),
|
|
993
|
-
|
|
990
|
+
const i = [...o], s = [...r];
|
|
991
|
+
for (; s.length && i.length; ) {
|
|
992
|
+
const u = i.shift(), d = s.findIndex((p) => p.id === u);
|
|
993
|
+
d > -1 && l.push(s.splice(d, 1)[0]);
|
|
994
994
|
}
|
|
995
|
-
l = [...l, ...
|
|
995
|
+
l = [...l, ...s];
|
|
996
996
|
}
|
|
997
|
-
return
|
|
997
|
+
return en(l, t, n);
|
|
998
998
|
}, S(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
999
999
|
}
|
|
1000
1000
|
}, ue = () => ({
|
|
1001
1001
|
left: [],
|
|
1002
1002
|
right: []
|
|
1003
|
-
}),
|
|
1003
|
+
}), nn = {
|
|
1004
1004
|
getInitialState: (e) => ({
|
|
1005
1005
|
columnPinning: ue(),
|
|
1006
1006
|
...e
|
|
@@ -1014,32 +1014,32 @@ const Jt = {
|
|
|
1014
1014
|
o.setColumnPinning((r) => {
|
|
1015
1015
|
var l, i;
|
|
1016
1016
|
if (t === "right") {
|
|
1017
|
-
var
|
|
1017
|
+
var s, u;
|
|
1018
1018
|
return {
|
|
1019
|
-
left: ((
|
|
1020
|
-
right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((
|
|
1019
|
+
left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((c) => !(n != null && n.includes(c))),
|
|
1020
|
+
right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((c) => !(n != null && n.includes(c))), ...n]
|
|
1021
1021
|
};
|
|
1022
1022
|
}
|
|
1023
1023
|
if (t === "left") {
|
|
1024
|
-
var
|
|
1024
|
+
var d, p;
|
|
1025
1025
|
return {
|
|
1026
|
-
left: [...((
|
|
1027
|
-
right: ((
|
|
1026
|
+
left: [...((d = r == null ? void 0 : r.left) != null ? d : []).filter((c) => !(n != null && n.includes(c))), ...n],
|
|
1027
|
+
right: ((p = r == null ? void 0 : r.right) != null ? p : []).filter((c) => !(n != null && n.includes(c)))
|
|
1028
1028
|
};
|
|
1029
1029
|
}
|
|
1030
1030
|
return {
|
|
1031
|
-
left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((
|
|
1032
|
-
right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((
|
|
1031
|
+
left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((c) => !(n != null && n.includes(c))),
|
|
1032
|
+
right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((c) => !(n != null && n.includes(c)))
|
|
1033
1033
|
};
|
|
1034
1034
|
});
|
|
1035
1035
|
}, e.getCanPin = () => e.getLeafColumns().some((n) => {
|
|
1036
1036
|
var r, l, i;
|
|
1037
1037
|
return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((l = (i = o.options.enableColumnPinning) != null ? i : o.options.enablePinning) != null ? l : !0);
|
|
1038
1038
|
}), e.getIsPinned = () => {
|
|
1039
|
-
const t = e.getLeafColumns().map((
|
|
1039
|
+
const t = e.getLeafColumns().map((s) => s.id), {
|
|
1040
1040
|
left: n,
|
|
1041
1041
|
right: r
|
|
1042
|
-
} = o.getState().columnPinning, l = t.some((
|
|
1042
|
+
} = o.getState().columnPinning, l = t.some((s) => n == null ? void 0 : n.includes(s)), i = t.some((s) => r == null ? void 0 : r.includes(s));
|
|
1043
1043
|
return l ? "left" : i ? "right" : !1;
|
|
1044
1044
|
}, e.getPinnedIndex = () => {
|
|
1045
1045
|
var t, n;
|
|
@@ -1077,10 +1077,10 @@ const Jt = {
|
|
|
1077
1077
|
}, S(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
1078
1078
|
}
|
|
1079
1079
|
};
|
|
1080
|
-
function
|
|
1080
|
+
function on(e) {
|
|
1081
1081
|
return e || (typeof document < "u" ? document : null);
|
|
1082
1082
|
}
|
|
1083
|
-
const
|
|
1083
|
+
const te = {
|
|
1084
1084
|
size: 150,
|
|
1085
1085
|
minSize: 20,
|
|
1086
1086
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
@@ -1091,8 +1091,8 @@ const ee = {
|
|
|
1091
1091
|
deltaPercentage: null,
|
|
1092
1092
|
isResizingColumn: !1,
|
|
1093
1093
|
columnSizingStart: []
|
|
1094
|
-
}),
|
|
1095
|
-
getDefaultColumnDef: () =>
|
|
1094
|
+
}), rn = {
|
|
1095
|
+
getDefaultColumnDef: () => te,
|
|
1096
1096
|
getInitialState: (e) => ({
|
|
1097
1097
|
columnSizing: {},
|
|
1098
1098
|
columnSizingInfo: fe(),
|
|
@@ -1108,7 +1108,7 @@ const ee = {
|
|
|
1108
1108
|
e.getSize = () => {
|
|
1109
1109
|
var t, n, r;
|
|
1110
1110
|
const l = o.getState().columnSizing[e.id];
|
|
1111
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
1111
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : te.minSize, (n = l ?? e.columnDef.size) != null ? n : te.size), (r = e.columnDef.maxSize) != null ? r : te.maxSize);
|
|
1112
1112
|
}, e.getStart = C((t) => [t, J(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, J(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
1113
1113
|
o.setColumnSizing((t) => {
|
|
1114
1114
|
let {
|
|
@@ -1145,25 +1145,25 @@ const ee = {
|
|
|
1145
1145
|
return (l) => {
|
|
1146
1146
|
if (!n || !r || (l.persist == null || l.persist(), de(l) && l.touches && l.touches.length > 1))
|
|
1147
1147
|
return;
|
|
1148
|
-
const i = e.getSize(),
|
|
1149
|
-
typeof
|
|
1150
|
-
var
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1153
|
-
let [
|
|
1154
|
-
|
|
1148
|
+
const i = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u = de(l) ? Math.round(l.touches[0].clientX) : l.clientX, d = {}, p = (R, _) => {
|
|
1149
|
+
typeof _ == "number" && (o.setColumnSizingInfo(($) => {
|
|
1150
|
+
var P, I;
|
|
1151
|
+
const H = o.options.columnResizeDirection === "rtl" ? -1 : 1, k = (_ - ((P = $ == null ? void 0 : $.startOffset) != null ? P : 0)) * H, N = Math.max(k / ((I = $ == null ? void 0 : $.startSize) != null ? I : 0), -0.999999);
|
|
1152
|
+
return $.columnSizingStart.forEach((x) => {
|
|
1153
|
+
let [y, V] = x;
|
|
1154
|
+
d[y] = Math.round(Math.max(V + V * N, 0) * 100) / 100;
|
|
1155
1155
|
}), {
|
|
1156
|
-
|
|
1157
|
-
deltaOffset:
|
|
1158
|
-
deltaPercentage:
|
|
1156
|
+
...$,
|
|
1157
|
+
deltaOffset: k,
|
|
1158
|
+
deltaPercentage: N
|
|
1159
1159
|
};
|
|
1160
|
-
}), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing((
|
|
1161
|
-
|
|
1162
|
-
...
|
|
1160
|
+
}), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing(($) => ({
|
|
1161
|
+
...$,
|
|
1162
|
+
...d
|
|
1163
1163
|
})));
|
|
1164
|
-
},
|
|
1165
|
-
|
|
1166
|
-
...
|
|
1164
|
+
}, c = (R) => p("move", R), f = (R) => {
|
|
1165
|
+
p("end", R), o.setColumnSizingInfo((_) => ({
|
|
1166
|
+
..._,
|
|
1167
1167
|
isResizingColumn: !1,
|
|
1168
1168
|
startOffset: null,
|
|
1169
1169
|
startSize: null,
|
|
@@ -1171,27 +1171,27 @@ const ee = {
|
|
|
1171
1171
|
deltaPercentage: null,
|
|
1172
1172
|
columnSizingStart: []
|
|
1173
1173
|
}));
|
|
1174
|
-
},
|
|
1175
|
-
moveHandler: (R) =>
|
|
1174
|
+
}, a = on(t), m = {
|
|
1175
|
+
moveHandler: (R) => c(R.clientX),
|
|
1176
1176
|
upHandler: (R) => {
|
|
1177
|
-
|
|
1177
|
+
a == null || a.removeEventListener("mousemove", m.moveHandler), a == null || a.removeEventListener("mouseup", m.upHandler), f(R.clientX);
|
|
1178
1178
|
}
|
|
1179
1179
|
}, h = {
|
|
1180
|
-
moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()),
|
|
1180
|
+
moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), c(R.touches[0].clientX), !1),
|
|
1181
1181
|
upHandler: (R) => {
|
|
1182
|
-
var
|
|
1183
|
-
|
|
1182
|
+
var _;
|
|
1183
|
+
a == null || a.removeEventListener("touchmove", h.moveHandler), a == null || a.removeEventListener("touchend", h.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), f((_ = R.touches[0]) == null ? void 0 : _.clientX);
|
|
1184
1184
|
}
|
|
1185
|
-
}, w =
|
|
1185
|
+
}, w = ln() ? {
|
|
1186
1186
|
passive: !1
|
|
1187
1187
|
} : !1;
|
|
1188
|
-
de(l) ? (
|
|
1188
|
+
de(l) ? (a == null || a.addEventListener("touchmove", h.moveHandler, w), a == null || a.addEventListener("touchend", h.upHandler, w)) : (a == null || a.addEventListener("mousemove", m.moveHandler, w), a == null || a.addEventListener("mouseup", m.upHandler, w)), o.setColumnSizingInfo((R) => ({
|
|
1189
1189
|
...R,
|
|
1190
1190
|
startOffset: u,
|
|
1191
1191
|
startSize: i,
|
|
1192
1192
|
deltaOffset: 0,
|
|
1193
1193
|
deltaPercentage: 0,
|
|
1194
|
-
columnSizingStart:
|
|
1194
|
+
columnSizingStart: s,
|
|
1195
1195
|
isResizingColumn: n.id
|
|
1196
1196
|
}));
|
|
1197
1197
|
};
|
|
@@ -1219,9 +1219,9 @@ const ee = {
|
|
|
1219
1219
|
};
|
|
1220
1220
|
}
|
|
1221
1221
|
};
|
|
1222
|
-
let
|
|
1223
|
-
function
|
|
1224
|
-
if (typeof
|
|
1222
|
+
let ne = null;
|
|
1223
|
+
function ln() {
|
|
1224
|
+
if (typeof ne == "boolean") return ne;
|
|
1225
1225
|
let e = !1;
|
|
1226
1226
|
try {
|
|
1227
1227
|
const o = {
|
|
@@ -1234,12 +1234,12 @@ function nn() {
|
|
|
1234
1234
|
} catch {
|
|
1235
1235
|
e = !1;
|
|
1236
1236
|
}
|
|
1237
|
-
return
|
|
1237
|
+
return ne = e, ne;
|
|
1238
1238
|
}
|
|
1239
1239
|
function de(e) {
|
|
1240
1240
|
return e.type === "touchstart";
|
|
1241
1241
|
}
|
|
1242
|
-
const
|
|
1242
|
+
const sn = {
|
|
1243
1243
|
getInitialState: (e) => ({
|
|
1244
1244
|
columnVisibility: {},
|
|
1245
1245
|
...e
|
|
@@ -1287,14 +1287,14 @@ const on = {
|
|
|
1287
1287
|
function J(e, o) {
|
|
1288
1288
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
1289
1289
|
}
|
|
1290
|
-
const
|
|
1290
|
+
const an = {
|
|
1291
1291
|
createTable: (e) => {
|
|
1292
1292
|
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 = () => {
|
|
1293
1293
|
if (e._getGlobalFacetedMinMaxValues)
|
|
1294
1294
|
return e._getGlobalFacetedMinMaxValues();
|
|
1295
1295
|
};
|
|
1296
1296
|
}
|
|
1297
|
-
},
|
|
1297
|
+
}, un = {
|
|
1298
1298
|
getInitialState: (e) => ({
|
|
1299
1299
|
globalFilter: void 0,
|
|
1300
1300
|
...e
|
|
@@ -1315,19 +1315,19 @@ const rn = {
|
|
|
1315
1315
|
};
|
|
1316
1316
|
},
|
|
1317
1317
|
createTable: (e) => {
|
|
1318
|
-
e.getGlobalAutoFilterFn = () =>
|
|
1318
|
+
e.getGlobalAutoFilterFn = () => O.includesString, e.getGlobalFilterFn = () => {
|
|
1319
1319
|
var o, t;
|
|
1320
1320
|
const {
|
|
1321
1321
|
globalFilterFn: n
|
|
1322
1322
|
} = e.options;
|
|
1323
|
-
return
|
|
1323
|
+
return re(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : O[n];
|
|
1324
1324
|
}, e.setGlobalFilter = (o) => {
|
|
1325
1325
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
|
1326
1326
|
}, e.resetGlobalFilter = (o) => {
|
|
1327
1327
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
1328
1328
|
};
|
|
1329
1329
|
}
|
|
1330
|
-
},
|
|
1330
|
+
}, fn = {
|
|
1331
1331
|
getInitialState: (e) => ({
|
|
1332
1332
|
expanded: {},
|
|
1333
1333
|
...e
|
|
@@ -1379,8 +1379,8 @@ const rn = {
|
|
|
1379
1379
|
var r;
|
|
1380
1380
|
const l = n === !0 ? !0 : !!(n != null && n[e.id]);
|
|
1381
1381
|
let i = {};
|
|
1382
|
-
if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((
|
|
1383
|
-
i[
|
|
1382
|
+
if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((s) => {
|
|
1383
|
+
i[s] = !0;
|
|
1384
1384
|
}) : i = n, t = (r = t) != null ? r : !l, !l && t)
|
|
1385
1385
|
return {
|
|
1386
1386
|
...i,
|
|
@@ -1388,7 +1388,7 @@ const rn = {
|
|
|
1388
1388
|
};
|
|
1389
1389
|
if (l && !t) {
|
|
1390
1390
|
const {
|
|
1391
|
-
[e.id]:
|
|
1391
|
+
[e.id]: s,
|
|
1392
1392
|
...u
|
|
1393
1393
|
} = i;
|
|
1394
1394
|
return u;
|
|
@@ -1417,7 +1417,7 @@ const rn = {
|
|
|
1417
1417
|
}, we = 0, Ce = 10, ge = () => ({
|
|
1418
1418
|
pageIndex: we,
|
|
1419
1419
|
pageSize: Ce
|
|
1420
|
-
}),
|
|
1420
|
+
}), dn = {
|
|
1421
1421
|
getInitialState: (e) => ({
|
|
1422
1422
|
...e,
|
|
1423
1423
|
pagination: {
|
|
@@ -1445,14 +1445,14 @@ const rn = {
|
|
|
1445
1445
|
});
|
|
1446
1446
|
}
|
|
1447
1447
|
}, e.setPagination = (n) => {
|
|
1448
|
-
const r = (l) =>
|
|
1448
|
+
const r = (l) => b(n, l);
|
|
1449
1449
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
1450
1450
|
}, e.resetPagination = (n) => {
|
|
1451
1451
|
var r;
|
|
1452
1452
|
e.setPagination(n ? ge() : (r = e.initialState.pagination) != null ? r : ge());
|
|
1453
1453
|
}, e.setPageIndex = (n) => {
|
|
1454
1454
|
e.setPagination((r) => {
|
|
1455
|
-
let l =
|
|
1455
|
+
let l = b(n, r.pageIndex);
|
|
1456
1456
|
const i = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
1457
1457
|
return l = Math.max(0, Math.min(l, i)), {
|
|
1458
1458
|
...r,
|
|
@@ -1467,16 +1467,16 @@ const rn = {
|
|
|
1467
1467
|
e.setPageSize(n ? Ce : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : Ce);
|
|
1468
1468
|
}, e.setPageSize = (n) => {
|
|
1469
1469
|
e.setPagination((r) => {
|
|
1470
|
-
const l = Math.max(1,
|
|
1470
|
+
const l = Math.max(1, b(n, r.pageSize)), i = r.pageSize * r.pageIndex, s = Math.floor(i / l);
|
|
1471
1471
|
return {
|
|
1472
1472
|
...r,
|
|
1473
|
-
pageIndex:
|
|
1473
|
+
pageIndex: s,
|
|
1474
1474
|
pageSize: l
|
|
1475
1475
|
};
|
|
1476
1476
|
});
|
|
1477
1477
|
}, e.setPageCount = (n) => e.setPagination((r) => {
|
|
1478
1478
|
var l;
|
|
1479
|
-
let i =
|
|
1479
|
+
let i = b(n, (l = e.options.pageCount) != null ? l : -1);
|
|
1480
1480
|
return typeof i == "number" && (i = Math.max(-1, i)), {
|
|
1481
1481
|
...r,
|
|
1482
1482
|
pageCount: i
|
|
@@ -1500,7 +1500,7 @@ const rn = {
|
|
|
1500
1500
|
}, ce = () => ({
|
|
1501
1501
|
top: [],
|
|
1502
1502
|
bottom: []
|
|
1503
|
-
}),
|
|
1503
|
+
}), gn = {
|
|
1504
1504
|
getInitialState: (e) => ({
|
|
1505
1505
|
rowPinning: ce(),
|
|
1506
1506
|
...e
|
|
@@ -1512,34 +1512,34 @@ const rn = {
|
|
|
1512
1512
|
e.pin = (t, n, r) => {
|
|
1513
1513
|
const l = n ? e.getLeafRows().map((u) => {
|
|
1514
1514
|
let {
|
|
1515
|
-
id:
|
|
1515
|
+
id: d
|
|
1516
1516
|
} = u;
|
|
1517
|
-
return
|
|
1517
|
+
return d;
|
|
1518
1518
|
}) : [], i = r ? e.getParentRows().map((u) => {
|
|
1519
1519
|
let {
|
|
1520
|
-
id:
|
|
1520
|
+
id: d
|
|
1521
1521
|
} = u;
|
|
1522
|
-
return
|
|
1523
|
-
}) : [],
|
|
1522
|
+
return d;
|
|
1523
|
+
}) : [], s = /* @__PURE__ */ new Set([...i, e.id, ...l]);
|
|
1524
1524
|
o.setRowPinning((u) => {
|
|
1525
|
-
var
|
|
1525
|
+
var d, p;
|
|
1526
1526
|
if (t === "bottom") {
|
|
1527
|
-
var
|
|
1527
|
+
var c, f;
|
|
1528
1528
|
return {
|
|
1529
|
-
top: ((
|
|
1530
|
-
bottom: [...((
|
|
1529
|
+
top: ((c = u == null ? void 0 : u.top) != null ? c : []).filter((h) => !(s != null && s.has(h))),
|
|
1530
|
+
bottom: [...((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((h) => !(s != null && s.has(h))), ...Array.from(s)]
|
|
1531
1531
|
};
|
|
1532
1532
|
}
|
|
1533
1533
|
if (t === "top") {
|
|
1534
|
-
var
|
|
1534
|
+
var a, m;
|
|
1535
1535
|
return {
|
|
1536
|
-
top: [...((
|
|
1537
|
-
bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((h) => !(
|
|
1536
|
+
top: [...((a = u == null ? void 0 : u.top) != null ? a : []).filter((h) => !(s != null && s.has(h))), ...Array.from(s)],
|
|
1537
|
+
bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((h) => !(s != null && s.has(h)))
|
|
1538
1538
|
};
|
|
1539
1539
|
}
|
|
1540
1540
|
return {
|
|
1541
|
-
top: ((
|
|
1542
|
-
bottom: ((
|
|
1541
|
+
top: ((d = u == null ? void 0 : u.top) != null ? d : []).filter((h) => !(s != null && s.has(h))),
|
|
1542
|
+
bottom: ((p = u == null ? void 0 : u.bottom) != null ? p : []).filter((h) => !(s != null && s.has(h)))
|
|
1543
1543
|
};
|
|
1544
1544
|
});
|
|
1545
1545
|
}, e.getCanPin = () => {
|
|
@@ -1553,7 +1553,7 @@ const rn = {
|
|
|
1553
1553
|
const t = [e.id], {
|
|
1554
1554
|
top: n,
|
|
1555
1555
|
bottom: r
|
|
1556
|
-
} = o.getState().rowPinning, l = t.some((
|
|
1556
|
+
} = o.getState().rowPinning, l = t.some((s) => n == null ? void 0 : n.includes(s)), i = t.some((s) => r == null ? void 0 : r.includes(s));
|
|
1557
1557
|
return l ? "top" : i ? "bottom" : !1;
|
|
1558
1558
|
}, e.getPinnedIndex = () => {
|
|
1559
1559
|
var t, n;
|
|
@@ -1561,9 +1561,9 @@ const rn = {
|
|
|
1561
1561
|
if (!r) return -1;
|
|
1562
1562
|
const l = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((i) => {
|
|
1563
1563
|
let {
|
|
1564
|
-
id:
|
|
1564
|
+
id: s
|
|
1565
1565
|
} = i;
|
|
1566
|
-
return
|
|
1566
|
+
return s;
|
|
1567
1567
|
});
|
|
1568
1568
|
return (n = l == null ? void 0 : l.indexOf(e.id)) != null ? n : -1;
|
|
1569
1569
|
};
|
|
@@ -1586,12 +1586,12 @@ const rn = {
|
|
|
1586
1586
|
//get all rows that are pinned even if they would not be otherwise visible
|
|
1587
1587
|
//account for expanded parent rows, but not pagination or filtering
|
|
1588
1588
|
(t ?? []).map((i) => {
|
|
1589
|
-
const
|
|
1590
|
-
return
|
|
1589
|
+
const s = e.getRow(i, !0);
|
|
1590
|
+
return s.getIsAllParentsExpanded() ? s : null;
|
|
1591
1591
|
})
|
|
1592
1592
|
) : (
|
|
1593
1593
|
//else get only visible rows that are pinned
|
|
1594
|
-
(t ?? []).map((i) => o.find((
|
|
1594
|
+
(t ?? []).map((i) => o.find((s) => s.id === i))
|
|
1595
1595
|
)).filter(Boolean).map((i) => ({
|
|
1596
1596
|
...i,
|
|
1597
1597
|
position: n
|
|
@@ -1601,7 +1601,7 @@ const rn = {
|
|
|
1601
1601
|
return o.filter((l) => !r.has(l.id));
|
|
1602
1602
|
}, S(e.options, "debugRows", "getCenterRows"));
|
|
1603
1603
|
}
|
|
1604
|
-
},
|
|
1604
|
+
}, cn = {
|
|
1605
1605
|
getInitialState: (e) => ({
|
|
1606
1606
|
rowSelection: {},
|
|
1607
1607
|
...e
|
|
@@ -1682,10 +1682,10 @@ const rn = {
|
|
|
1682
1682
|
var i;
|
|
1683
1683
|
if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
|
|
1684
1684
|
return l;
|
|
1685
|
-
const
|
|
1685
|
+
const s = {
|
|
1686
1686
|
...l
|
|
1687
1687
|
};
|
|
1688
|
-
return Se(
|
|
1688
|
+
return Se(s, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), s;
|
|
1689
1689
|
});
|
|
1690
1690
|
}, e.getIsSelected = () => {
|
|
1691
1691
|
const {
|
|
@@ -1722,17 +1722,17 @@ const rn = {
|
|
|
1722
1722
|
}, Se = (e, o, t, n, r) => {
|
|
1723
1723
|
var l;
|
|
1724
1724
|
const i = r.getRow(o, !0);
|
|
1725
|
-
t ? (i.getCanMultiSelect() || Object.keys(e).forEach((
|
|
1725
|
+
t ? (i.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((s) => Se(e, s.id, t, n, r));
|
|
1726
1726
|
};
|
|
1727
1727
|
function pe(e, o) {
|
|
1728
|
-
const t = e.getState().rowSelection, n = [], r = {}, l = function(i,
|
|
1728
|
+
const t = e.getState().rowSelection, n = [], r = {}, l = function(i, s) {
|
|
1729
1729
|
return i.map((u) => {
|
|
1730
|
-
var
|
|
1731
|
-
const
|
|
1732
|
-
if (
|
|
1730
|
+
var d;
|
|
1731
|
+
const p = Ie(u, t);
|
|
1732
|
+
if (p && (n.push(u), r[u.id] = u), (d = u.subRows) != null && d.length && (u = {
|
|
1733
1733
|
...u,
|
|
1734
1734
|
subRows: l(u.subRows)
|
|
1735
|
-
}),
|
|
1735
|
+
}), p)
|
|
1736
1736
|
return u;
|
|
1737
1737
|
}).filter(Boolean);
|
|
1738
1738
|
};
|
|
@@ -1752,25 +1752,25 @@ function Re(e, o, t) {
|
|
|
1752
1752
|
let r = !0, l = !1;
|
|
1753
1753
|
return e.subRows.forEach((i) => {
|
|
1754
1754
|
if (!(l && !r) && (i.getCanSelect() && (Ie(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1755
|
+
const s = Re(i, o);
|
|
1756
|
+
s === "all" ? l = !0 : (s === "some" && (l = !0), r = !1);
|
|
1757
1757
|
}
|
|
1758
1758
|
}), r ? "all" : l ? "some" : !1;
|
|
1759
1759
|
}
|
|
1760
|
-
const ye = /([0-9]+)/gm,
|
|
1760
|
+
const ye = /([0-9]+)/gm, pn = (e, o, t) => et(T(e.getValue(t)).toLowerCase(), T(o.getValue(t)).toLowerCase()), mn = (e, o, t) => et(T(e.getValue(t)), T(o.getValue(t))), hn = (e, o, t) => Ve(T(e.getValue(t)).toLowerCase(), T(o.getValue(t)).toLowerCase()), vn = (e, o, t) => Ve(T(e.getValue(t)), T(o.getValue(t))), wn = (e, o, t) => {
|
|
1761
1761
|
const n = e.getValue(t), r = o.getValue(t);
|
|
1762
1762
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1763
|
-
},
|
|
1763
|
+
}, Cn = (e, o, t) => Ve(e.getValue(t), o.getValue(t));
|
|
1764
1764
|
function Ve(e, o) {
|
|
1765
1765
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function T(e) {
|
|
1768
1768
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1770
|
+
function et(e, o) {
|
|
1771
1771
|
const t = e.split(ye).filter(Boolean), n = o.split(ye).filter(Boolean);
|
|
1772
1772
|
for (; t.length && n.length; ) {
|
|
1773
|
-
const r = t.shift(), l = n.shift(), i = parseInt(r, 10),
|
|
1773
|
+
const r = t.shift(), l = n.shift(), i = parseInt(r, 10), s = parseInt(l, 10), u = [i, s].sort();
|
|
1774
1774
|
if (isNaN(u[0])) {
|
|
1775
1775
|
if (r > l)
|
|
1776
1776
|
return 1;
|
|
@@ -1780,21 +1780,21 @@ function Ze(e, o) {
|
|
|
1780
1780
|
}
|
|
1781
1781
|
if (isNaN(u[1]))
|
|
1782
1782
|
return isNaN(i) ? -1 : 1;
|
|
1783
|
-
if (i >
|
|
1783
|
+
if (i > s)
|
|
1784
1784
|
return 1;
|
|
1785
|
-
if (
|
|
1785
|
+
if (s > i)
|
|
1786
1786
|
return -1;
|
|
1787
1787
|
}
|
|
1788
1788
|
return t.length - n.length;
|
|
1789
1789
|
}
|
|
1790
1790
|
const Y = {
|
|
1791
|
-
alphanumeric:
|
|
1792
|
-
alphanumericCaseSensitive:
|
|
1793
|
-
text:
|
|
1794
|
-
textCaseSensitive:
|
|
1795
|
-
datetime:
|
|
1796
|
-
basic:
|
|
1797
|
-
},
|
|
1791
|
+
alphanumeric: pn,
|
|
1792
|
+
alphanumericCaseSensitive: mn,
|
|
1793
|
+
text: hn,
|
|
1794
|
+
textCaseSensitive: vn,
|
|
1795
|
+
datetime: wn,
|
|
1796
|
+
basic: Cn
|
|
1797
|
+
}, Sn = {
|
|
1798
1798
|
getInitialState: (e) => ({
|
|
1799
1799
|
sorting: [],
|
|
1800
1800
|
...e
|
|
@@ -1826,26 +1826,26 @@ const Y = {
|
|
|
1826
1826
|
var t, n;
|
|
1827
1827
|
if (!e)
|
|
1828
1828
|
throw new Error();
|
|
1829
|
-
return
|
|
1829
|
+
return re(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : Y[e.columnDef.sortingFn];
|
|
1830
1830
|
}, e.toggleSorting = (t, n) => {
|
|
1831
1831
|
const r = e.getNextSortingOrder(), l = typeof t < "u" && t !== null;
|
|
1832
1832
|
o.setSorting((i) => {
|
|
1833
|
-
const
|
|
1834
|
-
let
|
|
1835
|
-
if (i != null && i.length && e.getCanMultiSort() && n ?
|
|
1836
|
-
var
|
|
1837
|
-
|
|
1833
|
+
const s = i == null ? void 0 : i.find((a) => a.id === e.id), u = i == null ? void 0 : i.findIndex((a) => a.id === e.id);
|
|
1834
|
+
let d = [], p, c = l ? t : r === "desc";
|
|
1835
|
+
if (i != null && i.length && e.getCanMultiSort() && n ? s ? p = "toggle" : p = "add" : i != null && i.length && u !== i.length - 1 ? p = "replace" : s ? p = "toggle" : p = "replace", p === "toggle" && (l || r || (p = "remove")), p === "add") {
|
|
1836
|
+
var f;
|
|
1837
|
+
d = [...i, {
|
|
1838
1838
|
id: e.id,
|
|
1839
|
-
desc:
|
|
1840
|
-
}],
|
|
1841
|
-
} else
|
|
1842
|
-
...
|
|
1843
|
-
desc:
|
|
1844
|
-
} :
|
|
1839
|
+
desc: c
|
|
1840
|
+
}], d.splice(0, d.length - ((f = o.options.maxMultiSortColCount) != null ? f : Number.MAX_SAFE_INTEGER));
|
|
1841
|
+
} else p === "toggle" ? d = i.map((a) => a.id === e.id ? {
|
|
1842
|
+
...a,
|
|
1843
|
+
desc: c
|
|
1844
|
+
} : a) : p === "remove" ? d = i.filter((a) => a.id !== e.id) : d = [{
|
|
1845
1845
|
id: e.id,
|
|
1846
|
-
desc:
|
|
1846
|
+
desc: c
|
|
1847
1847
|
}];
|
|
1848
|
-
return
|
|
1848
|
+
return d;
|
|
1849
1849
|
});
|
|
1850
1850
|
}, e.getFirstSortDir = () => {
|
|
1851
1851
|
var t, n;
|
|
@@ -1883,92 +1883,92 @@ const Y = {
|
|
|
1883
1883
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
1884
1884
|
}, 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());
|
|
1885
1885
|
}
|
|
1886
|
-
},
|
|
1887
|
-
|
|
1888
|
-
on,
|
|
1889
|
-
Jt,
|
|
1890
|
-
Zt,
|
|
1891
|
-
Gt,
|
|
1892
|
-
Ot,
|
|
1893
|
-
rn,
|
|
1894
|
-
//depends on ColumnFaceting
|
|
1895
|
-
ln,
|
|
1896
|
-
//depends on ColumnFiltering
|
|
1897
|
-
vn,
|
|
1898
|
-
Qt,
|
|
1899
|
-
//depends on RowSorting
|
|
1886
|
+
}, Rn = [
|
|
1887
|
+
bt,
|
|
1900
1888
|
sn,
|
|
1889
|
+
tn,
|
|
1890
|
+
nn,
|
|
1891
|
+
Bt,
|
|
1892
|
+
Tt,
|
|
1901
1893
|
an,
|
|
1894
|
+
//depends on ColumnFaceting
|
|
1902
1895
|
un,
|
|
1896
|
+
//depends on ColumnFiltering
|
|
1897
|
+
Sn,
|
|
1898
|
+
Zt,
|
|
1899
|
+
//depends on RowSorting
|
|
1903
1900
|
fn,
|
|
1904
|
-
|
|
1901
|
+
dn,
|
|
1902
|
+
gn,
|
|
1903
|
+
cn,
|
|
1904
|
+
rn
|
|
1905
1905
|
];
|
|
1906
|
-
function
|
|
1906
|
+
function yn(e) {
|
|
1907
1907
|
var o, t;
|
|
1908
1908
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1909
|
-
const n = [...
|
|
1909
|
+
const n = [...Rn, ...(o = e._features) != null ? o : []];
|
|
1910
1910
|
let r = {
|
|
1911
1911
|
_features: n
|
|
1912
1912
|
};
|
|
1913
|
-
const l = r._features.reduce((
|
|
1913
|
+
const l = r._features.reduce((f, a) => Object.assign(f, a.getDefaultOptions == null ? void 0 : a.getDefaultOptions(r)), {}), i = (f) => r.options.mergeOptions ? r.options.mergeOptions(l, f) : {
|
|
1914
1914
|
...l,
|
|
1915
|
-
...
|
|
1915
|
+
...f
|
|
1916
1916
|
};
|
|
1917
1917
|
let u = {
|
|
1918
1918
|
...{},
|
|
1919
1919
|
...(t = e.initialState) != null ? t : {}
|
|
1920
1920
|
};
|
|
1921
|
-
r._features.forEach((
|
|
1922
|
-
var
|
|
1923
|
-
u = (
|
|
1921
|
+
r._features.forEach((f) => {
|
|
1922
|
+
var a;
|
|
1923
|
+
u = (a = f.getInitialState == null ? void 0 : f.getInitialState(u)) != null ? a : u;
|
|
1924
1924
|
});
|
|
1925
|
-
const
|
|
1926
|
-
let
|
|
1927
|
-
const
|
|
1925
|
+
const d = [];
|
|
1926
|
+
let p = !1;
|
|
1927
|
+
const c = {
|
|
1928
1928
|
_features: n,
|
|
1929
1929
|
options: {
|
|
1930
1930
|
...l,
|
|
1931
1931
|
...e
|
|
1932
1932
|
},
|
|
1933
1933
|
initialState: u,
|
|
1934
|
-
_queue: (
|
|
1935
|
-
|
|
1936
|
-
for (;
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
}).catch((
|
|
1940
|
-
throw
|
|
1934
|
+
_queue: (f) => {
|
|
1935
|
+
d.push(f), p || (p = !0, Promise.resolve().then(() => {
|
|
1936
|
+
for (; d.length; )
|
|
1937
|
+
d.shift()();
|
|
1938
|
+
p = !1;
|
|
1939
|
+
}).catch((a) => setTimeout(() => {
|
|
1940
|
+
throw a;
|
|
1941
1941
|
})));
|
|
1942
1942
|
},
|
|
1943
1943
|
reset: () => {
|
|
1944
1944
|
r.setState(r.initialState);
|
|
1945
1945
|
},
|
|
1946
|
-
setOptions: (
|
|
1947
|
-
const
|
|
1948
|
-
r.options = i(
|
|
1946
|
+
setOptions: (f) => {
|
|
1947
|
+
const a = b(f, r.options);
|
|
1948
|
+
r.options = i(a);
|
|
1949
1949
|
},
|
|
1950
1950
|
getState: () => r.options.state,
|
|
1951
|
-
setState: (
|
|
1952
|
-
r.options.onStateChange == null || r.options.onStateChange(
|
|
1951
|
+
setState: (f) => {
|
|
1952
|
+
r.options.onStateChange == null || r.options.onStateChange(f);
|
|
1953
1953
|
},
|
|
1954
|
-
_getRowId: (
|
|
1954
|
+
_getRowId: (f, a, m) => {
|
|
1955
1955
|
var h;
|
|
1956
|
-
return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(
|
|
1956
|
+
return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(f, a, m)) != null ? h : `${m ? [m.id, a].join(".") : a}`;
|
|
1957
1957
|
},
|
|
1958
1958
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
1959
1959
|
// The final calls start at the bottom of the model,
|
|
1960
1960
|
// expanded rows, which then work their way up
|
|
1961
1961
|
getRowModel: () => r.getPaginationRowModel(),
|
|
1962
1962
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
1963
|
-
getRow: (
|
|
1964
|
-
let m = (
|
|
1965
|
-
if (!m && (m = r.getCoreRowModel().rowsById[
|
|
1966
|
-
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${
|
|
1963
|
+
getRow: (f, a) => {
|
|
1964
|
+
let m = (a ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[f];
|
|
1965
|
+
if (!m && (m = r.getCoreRowModel().rowsById[f], !m))
|
|
1966
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${f}`) : new Error();
|
|
1967
1967
|
return m;
|
|
1968
1968
|
},
|
|
1969
|
-
_getDefaultColumnDef: C(() => [r.options.defaultColumn], (
|
|
1970
|
-
var
|
|
1971
|
-
return
|
|
1969
|
+
_getDefaultColumnDef: C(() => [r.options.defaultColumn], (f) => {
|
|
1970
|
+
var a;
|
|
1971
|
+
return f = (a = f) != null ? a : {}, {
|
|
1972
1972
|
header: (m) => {
|
|
1973
1973
|
const h = m.header.column.columnDef;
|
|
1974
1974
|
return h.accessorKey ? h.accessorKey : h.accessorFn ? h.id : null;
|
|
@@ -1979,38 +1979,38 @@ function Cn(e) {
|
|
|
1979
1979
|
return (h = (w = m.renderValue()) == null || w.toString == null ? void 0 : w.toString()) != null ? h : null;
|
|
1980
1980
|
},
|
|
1981
1981
|
...r._features.reduce((m, h) => Object.assign(m, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
|
|
1982
|
-
...
|
|
1982
|
+
...f
|
|
1983
1983
|
};
|
|
1984
1984
|
}, S(e, "debugColumns", "_getDefaultColumnDef")),
|
|
1985
1985
|
_getColumnDefs: () => r.options.columns,
|
|
1986
|
-
getAllColumns: C(() => [r._getColumnDefs()], (
|
|
1987
|
-
const
|
|
1986
|
+
getAllColumns: C(() => [r._getColumnDefs()], (f) => {
|
|
1987
|
+
const a = function(m, h, w) {
|
|
1988
1988
|
return w === void 0 && (w = 0), m.map((R) => {
|
|
1989
|
-
const
|
|
1990
|
-
return
|
|
1989
|
+
const _ = Ot(r, R, w, h), $ = R;
|
|
1990
|
+
return _.columns = $.columns ? a($.columns, _, w + 1) : [], _;
|
|
1991
1991
|
});
|
|
1992
1992
|
};
|
|
1993
|
-
return
|
|
1993
|
+
return a(f);
|
|
1994
1994
|
}, S(e, "debugColumns", "getAllColumns")),
|
|
1995
|
-
getAllFlatColumns: C(() => [r.getAllColumns()], (
|
|
1996
|
-
_getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (
|
|
1997
|
-
getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (
|
|
1998
|
-
let m =
|
|
1999
|
-
return
|
|
1995
|
+
getAllFlatColumns: C(() => [r.getAllColumns()], (f) => f.flatMap((a) => a.getFlatColumns()), S(e, "debugColumns", "getAllFlatColumns")),
|
|
1996
|
+
_getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (f) => f.reduce((a, m) => (a[m.id] = m, a), {}), S(e, "debugColumns", "getAllFlatColumnsById")),
|
|
1997
|
+
getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (f, a) => {
|
|
1998
|
+
let m = f.flatMap((h) => h.getLeafColumns());
|
|
1999
|
+
return a(m);
|
|
2000
2000
|
}, S(e, "debugColumns", "getAllLeafColumns")),
|
|
2001
|
-
getColumn: (
|
|
2002
|
-
const
|
|
2003
|
-
return process.env.NODE_ENV !== "production" && !
|
|
2001
|
+
getColumn: (f) => {
|
|
2002
|
+
const a = r._getAllFlatColumnsById()[f];
|
|
2003
|
+
return process.env.NODE_ENV !== "production" && !a && console.error(`[Table] Column with id '${f}' does not exist.`), a;
|
|
2004
2004
|
}
|
|
2005
2005
|
};
|
|
2006
|
-
Object.assign(r,
|
|
2007
|
-
for (let
|
|
2008
|
-
const
|
|
2009
|
-
|
|
2006
|
+
Object.assign(r, c);
|
|
2007
|
+
for (let f = 0; f < r._features.length; f++) {
|
|
2008
|
+
const a = r._features[f];
|
|
2009
|
+
a == null || a.createTable == null || a.createTable(r);
|
|
2010
2010
|
}
|
|
2011
2011
|
return r;
|
|
2012
2012
|
}
|
|
2013
|
-
function
|
|
2013
|
+
function xn() {
|
|
2014
2014
|
return (e) => C(() => [e.options.data], (o) => {
|
|
2015
2015
|
const t = {
|
|
2016
2016
|
rows: [],
|
|
@@ -2018,20 +2018,20 @@ function Sn() {
|
|
|
2018
2018
|
rowsById: {}
|
|
2019
2019
|
}, n = function(r, l, i) {
|
|
2020
2020
|
l === void 0 && (l = 0);
|
|
2021
|
-
const
|
|
2022
|
-
for (let
|
|
2023
|
-
const
|
|
2024
|
-
if (t.flatRows.push(
|
|
2021
|
+
const s = [];
|
|
2022
|
+
for (let d = 0; d < r.length; d++) {
|
|
2023
|
+
const p = $e(e, e._getRowId(r[d], d, i), r[d], d, l, void 0, i == null ? void 0 : i.id);
|
|
2024
|
+
if (t.flatRows.push(p), t.rowsById[p.id] = p, s.push(p), e.options.getSubRows) {
|
|
2025
2025
|
var u;
|
|
2026
|
-
|
|
2026
|
+
p.originalSubRows = e.options.getSubRows(r[d], d), (u = p.originalSubRows) != null && u.length && (p.subRows = n(p.originalSubRows, l + 1, p));
|
|
2027
2027
|
}
|
|
2028
2028
|
}
|
|
2029
|
-
return
|
|
2029
|
+
return s;
|
|
2030
2030
|
};
|
|
2031
2031
|
return t.rows = n(o), t;
|
|
2032
2032
|
}, S(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
2033
2033
|
}
|
|
2034
|
-
function
|
|
2034
|
+
function _n(e) {
|
|
2035
2035
|
const o = [], t = (n) => {
|
|
2036
2036
|
var r;
|
|
2037
2037
|
o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
@@ -2042,73 +2042,73 @@ function Rn(e) {
|
|
|
2042
2042
|
rowsById: e.rowsById
|
|
2043
2043
|
};
|
|
2044
2044
|
}
|
|
2045
|
-
function
|
|
2046
|
-
return t.options.filterFromLeafRows ?
|
|
2045
|
+
function Fn(e, o, t) {
|
|
2046
|
+
return t.options.filterFromLeafRows ? $n(e, o, t) : Mn(e, o, t);
|
|
2047
2047
|
}
|
|
2048
|
-
function
|
|
2048
|
+
function $n(e, o, t) {
|
|
2049
2049
|
var n;
|
|
2050
|
-
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100,
|
|
2051
|
-
|
|
2052
|
-
const
|
|
2053
|
-
for (let
|
|
2054
|
-
var
|
|
2055
|
-
let
|
|
2056
|
-
const m = $e(t,
|
|
2057
|
-
if (m.columnFilters =
|
|
2058
|
-
if (m.subRows = a
|
|
2059
|
-
|
|
2050
|
+
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, d) {
|
|
2051
|
+
d === void 0 && (d = 0);
|
|
2052
|
+
const p = [];
|
|
2053
|
+
for (let f = 0; f < u.length; f++) {
|
|
2054
|
+
var c;
|
|
2055
|
+
let a = u[f];
|
|
2056
|
+
const m = $e(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
|
|
2057
|
+
if (m.columnFilters = a.columnFilters, (c = a.subRows) != null && c.length && d < i) {
|
|
2058
|
+
if (m.subRows = s(a.subRows, d + 1), a = m, o(a) && !m.subRows.length) {
|
|
2059
|
+
p.push(a), l[a.id] = a, r.push(a);
|
|
2060
2060
|
continue;
|
|
2061
2061
|
}
|
|
2062
|
-
if (o(
|
|
2063
|
-
|
|
2062
|
+
if (o(a) || m.subRows.length) {
|
|
2063
|
+
p.push(a), l[a.id] = a, r.push(a);
|
|
2064
2064
|
continue;
|
|
2065
2065
|
}
|
|
2066
2066
|
} else
|
|
2067
|
-
|
|
2067
|
+
a = m, o(a) && (p.push(a), l[a.id] = a, r.push(a));
|
|
2068
2068
|
}
|
|
2069
|
-
return
|
|
2069
|
+
return p;
|
|
2070
2070
|
};
|
|
2071
2071
|
return {
|
|
2072
|
-
rows:
|
|
2072
|
+
rows: s(e),
|
|
2073
2073
|
flatRows: r,
|
|
2074
2074
|
rowsById: l
|
|
2075
2075
|
};
|
|
2076
2076
|
}
|
|
2077
|
-
function
|
|
2077
|
+
function Mn(e, o, t) {
|
|
2078
2078
|
var n;
|
|
2079
|
-
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100,
|
|
2080
|
-
|
|
2081
|
-
const
|
|
2082
|
-
for (let
|
|
2083
|
-
let
|
|
2084
|
-
if (o(
|
|
2085
|
-
var
|
|
2086
|
-
if ((
|
|
2087
|
-
const h = $e(t,
|
|
2088
|
-
h.subRows = a
|
|
2079
|
+
const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, d) {
|
|
2080
|
+
d === void 0 && (d = 0);
|
|
2081
|
+
const p = [];
|
|
2082
|
+
for (let f = 0; f < u.length; f++) {
|
|
2083
|
+
let a = u[f];
|
|
2084
|
+
if (o(a)) {
|
|
2085
|
+
var c;
|
|
2086
|
+
if ((c = a.subRows) != null && c.length && d < i) {
|
|
2087
|
+
const h = $e(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
|
|
2088
|
+
h.subRows = s(a.subRows, d + 1), a = h;
|
|
2089
2089
|
}
|
|
2090
|
-
|
|
2090
|
+
p.push(a), r.push(a), l[a.id] = a;
|
|
2091
2091
|
}
|
|
2092
2092
|
}
|
|
2093
|
-
return
|
|
2093
|
+
return p;
|
|
2094
2094
|
};
|
|
2095
2095
|
return {
|
|
2096
|
-
rows:
|
|
2096
|
+
rows: s(e),
|
|
2097
2097
|
flatRows: r,
|
|
2098
2098
|
rowsById: l
|
|
2099
2099
|
};
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2101
|
+
function In() {
|
|
2102
2102
|
return (e) => C(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
|
|
2103
2103
|
if (!o.rows.length || !(t != null && t.length) && !n) {
|
|
2104
|
-
for (let
|
|
2105
|
-
o.flatRows[
|
|
2104
|
+
for (let f = 0; f < o.flatRows.length; f++)
|
|
2105
|
+
o.flatRows[f].columnFilters = {}, o.flatRows[f].columnFiltersMeta = {};
|
|
2106
2106
|
return o;
|
|
2107
2107
|
}
|
|
2108
2108
|
const r = [], l = [];
|
|
2109
|
-
(t ?? []).forEach((
|
|
2110
|
-
var
|
|
2111
|
-
const m = e.getColumn(
|
|
2109
|
+
(t ?? []).forEach((f) => {
|
|
2110
|
+
var a;
|
|
2111
|
+
const m = e.getColumn(f.id);
|
|
2112
2112
|
if (!m)
|
|
2113
2113
|
return;
|
|
2114
2114
|
const h = m.getFilterFn();
|
|
@@ -2117,55 +2117,55 @@ function Fn() {
|
|
|
2117
2117
|
return;
|
|
2118
2118
|
}
|
|
2119
2119
|
r.push({
|
|
2120
|
-
id:
|
|
2120
|
+
id: f.id,
|
|
2121
2121
|
filterFn: h,
|
|
2122
|
-
resolvedValue: (
|
|
2122
|
+
resolvedValue: (a = h.resolveFilterValue == null ? void 0 : h.resolveFilterValue(f.value)) != null ? a : f.value
|
|
2123
2123
|
});
|
|
2124
2124
|
});
|
|
2125
|
-
const i = (t ?? []).map((
|
|
2126
|
-
n &&
|
|
2127
|
-
var
|
|
2125
|
+
const i = (t ?? []).map((f) => f.id), s = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((f) => f.getCanGlobalFilter());
|
|
2126
|
+
n && s && u.length && (i.push("__global__"), u.forEach((f) => {
|
|
2127
|
+
var a;
|
|
2128
2128
|
l.push({
|
|
2129
|
-
id:
|
|
2130
|
-
filterFn:
|
|
2131
|
-
resolvedValue: (
|
|
2129
|
+
id: f.id,
|
|
2130
|
+
filterFn: s,
|
|
2131
|
+
resolvedValue: (a = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? a : n
|
|
2132
2132
|
});
|
|
2133
2133
|
}));
|
|
2134
|
-
let
|
|
2135
|
-
for (let
|
|
2136
|
-
const
|
|
2137
|
-
if (
|
|
2134
|
+
let d, p;
|
|
2135
|
+
for (let f = 0; f < o.flatRows.length; f++) {
|
|
2136
|
+
const a = o.flatRows[f];
|
|
2137
|
+
if (a.columnFilters = {}, r.length)
|
|
2138
2138
|
for (let m = 0; m < r.length; m++) {
|
|
2139
|
-
|
|
2140
|
-
const h =
|
|
2141
|
-
|
|
2142
|
-
|
|
2139
|
+
d = r[m];
|
|
2140
|
+
const h = d.id;
|
|
2141
|
+
a.columnFilters[h] = d.filterFn(a, h, d.resolvedValue, (w) => {
|
|
2142
|
+
a.columnFiltersMeta[h] = w;
|
|
2143
2143
|
});
|
|
2144
2144
|
}
|
|
2145
2145
|
if (l.length) {
|
|
2146
2146
|
for (let m = 0; m < l.length; m++) {
|
|
2147
|
-
|
|
2148
|
-
const h =
|
|
2149
|
-
if (
|
|
2150
|
-
|
|
2147
|
+
p = l[m];
|
|
2148
|
+
const h = p.id;
|
|
2149
|
+
if (p.filterFn(a, h, p.resolvedValue, (w) => {
|
|
2150
|
+
a.columnFiltersMeta[h] = w;
|
|
2151
2151
|
})) {
|
|
2152
|
-
|
|
2152
|
+
a.columnFilters.__global__ = !0;
|
|
2153
2153
|
break;
|
|
2154
2154
|
}
|
|
2155
2155
|
}
|
|
2156
|
-
|
|
2156
|
+
a.columnFilters.__global__ !== !0 && (a.columnFilters.__global__ = !1);
|
|
2157
2157
|
}
|
|
2158
2158
|
}
|
|
2159
|
-
const
|
|
2160
|
-
for (let
|
|
2161
|
-
if (
|
|
2159
|
+
const c = (f) => {
|
|
2160
|
+
for (let a = 0; a < i.length; a++)
|
|
2161
|
+
if (f.columnFilters[i[a]] === !1)
|
|
2162
2162
|
return !1;
|
|
2163
2163
|
return !0;
|
|
2164
2164
|
};
|
|
2165
|
-
return
|
|
2165
|
+
return Fn(o.rows, c, e);
|
|
2166
2166
|
}, S(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
2167
2167
|
}
|
|
2168
|
-
function
|
|
2168
|
+
function Vn(e) {
|
|
2169
2169
|
return (o) => C(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
|
|
2170
2170
|
if (!n.rows.length)
|
|
2171
2171
|
return n;
|
|
@@ -2175,71 +2175,71 @@ function $n(e) {
|
|
|
2175
2175
|
} = t;
|
|
2176
2176
|
let {
|
|
2177
2177
|
rows: i,
|
|
2178
|
-
flatRows:
|
|
2178
|
+
flatRows: s,
|
|
2179
2179
|
rowsById: u
|
|
2180
2180
|
} = n;
|
|
2181
|
-
const
|
|
2182
|
-
i = i.slice(
|
|
2183
|
-
let
|
|
2184
|
-
o.options.paginateExpandedRows ?
|
|
2181
|
+
const d = r * l, p = d + r;
|
|
2182
|
+
i = i.slice(d, p);
|
|
2183
|
+
let c;
|
|
2184
|
+
o.options.paginateExpandedRows ? c = {
|
|
2185
2185
|
rows: i,
|
|
2186
|
-
flatRows:
|
|
2186
|
+
flatRows: s,
|
|
2187
2187
|
rowsById: u
|
|
2188
|
-
} :
|
|
2188
|
+
} : c = _n({
|
|
2189
2189
|
rows: i,
|
|
2190
|
-
flatRows:
|
|
2190
|
+
flatRows: s,
|
|
2191
2191
|
rowsById: u
|
|
2192
|
-
}),
|
|
2193
|
-
const
|
|
2194
|
-
|
|
2192
|
+
}), c.flatRows = [];
|
|
2193
|
+
const f = (a) => {
|
|
2194
|
+
c.flatRows.push(a), a.subRows.length && a.subRows.forEach(f);
|
|
2195
2195
|
};
|
|
2196
|
-
return
|
|
2196
|
+
return c.rows.forEach(f), c;
|
|
2197
2197
|
}, S(o.options, "debugTable", "getPaginationRowModel"));
|
|
2198
2198
|
}
|
|
2199
|
-
function
|
|
2199
|
+
function Nn() {
|
|
2200
2200
|
return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
2201
2201
|
if (!t.rows.length || !(o != null && o.length))
|
|
2202
2202
|
return t;
|
|
2203
2203
|
const n = e.getState().sorting, r = [], l = n.filter((u) => {
|
|
2204
|
-
var
|
|
2205
|
-
return (
|
|
2204
|
+
var d;
|
|
2205
|
+
return (d = e.getColumn(u.id)) == null ? void 0 : d.getCanSort();
|
|
2206
2206
|
}), i = {};
|
|
2207
2207
|
l.forEach((u) => {
|
|
2208
|
-
const
|
|
2209
|
-
|
|
2210
|
-
sortUndefined:
|
|
2211
|
-
invertSorting:
|
|
2212
|
-
sortingFn:
|
|
2208
|
+
const d = e.getColumn(u.id);
|
|
2209
|
+
d && (i[u.id] = {
|
|
2210
|
+
sortUndefined: d.columnDef.sortUndefined,
|
|
2211
|
+
invertSorting: d.columnDef.invertSorting,
|
|
2212
|
+
sortingFn: d.getSortingFn()
|
|
2213
2213
|
});
|
|
2214
2214
|
});
|
|
2215
|
-
const
|
|
2216
|
-
const
|
|
2217
|
-
...
|
|
2215
|
+
const s = (u) => {
|
|
2216
|
+
const d = u.map((p) => ({
|
|
2217
|
+
...p
|
|
2218
2218
|
}));
|
|
2219
|
-
return
|
|
2220
|
-
for (let
|
|
2221
|
-
var
|
|
2222
|
-
const m = l[
|
|
2223
|
-
let
|
|
2219
|
+
return d.sort((p, c) => {
|
|
2220
|
+
for (let a = 0; a < l.length; a += 1) {
|
|
2221
|
+
var f;
|
|
2222
|
+
const m = l[a], h = i[m.id], w = h.sortUndefined, R = (f = m == null ? void 0 : m.desc) != null ? f : !1;
|
|
2223
|
+
let _ = 0;
|
|
2224
2224
|
if (w) {
|
|
2225
|
-
const
|
|
2226
|
-
if (
|
|
2227
|
-
if (w === "first") return
|
|
2228
|
-
if (w === "last") return
|
|
2229
|
-
|
|
2225
|
+
const $ = p.getValue(m.id), P = c.getValue(m.id), I = $ === void 0, H = P === void 0;
|
|
2226
|
+
if (I || H) {
|
|
2227
|
+
if (w === "first") return I ? -1 : 1;
|
|
2228
|
+
if (w === "last") return I ? 1 : -1;
|
|
2229
|
+
_ = I && H ? 0 : I ? w : -w;
|
|
2230
2230
|
}
|
|
2231
2231
|
}
|
|
2232
|
-
if (
|
|
2233
|
-
return R && (
|
|
2232
|
+
if (_ === 0 && (_ = h.sortingFn(p, c, m.id)), _ !== 0)
|
|
2233
|
+
return R && (_ *= -1), h.invertSorting && (_ *= -1), _;
|
|
2234
2234
|
}
|
|
2235
|
-
return
|
|
2236
|
-
}),
|
|
2237
|
-
var
|
|
2238
|
-
r.push(
|
|
2239
|
-
}),
|
|
2235
|
+
return p.index - c.index;
|
|
2236
|
+
}), d.forEach((p) => {
|
|
2237
|
+
var c;
|
|
2238
|
+
r.push(p), (c = p.subRows) != null && c.length && (p.subRows = s(p.subRows));
|
|
2239
|
+
}), d;
|
|
2240
2240
|
};
|
|
2241
2241
|
return {
|
|
2242
|
-
rows:
|
|
2242
|
+
rows: s(t.rows),
|
|
2243
2243
|
flatRows: r,
|
|
2244
2244
|
rowsById: t.rowsById
|
|
2245
2245
|
};
|
|
@@ -2255,22 +2255,22 @@ function Mn() {
|
|
|
2255
2255
|
*
|
|
2256
2256
|
* @license MIT
|
|
2257
2257
|
*/
|
|
2258
|
-
function
|
|
2259
|
-
return e ?
|
|
2258
|
+
function Be(e, o) {
|
|
2259
|
+
return e ? Pn(e) ? /* @__PURE__ */ he.createElement(e, o) : e : null;
|
|
2260
2260
|
}
|
|
2261
|
-
function
|
|
2262
|
-
return
|
|
2261
|
+
function Pn(e) {
|
|
2262
|
+
return Dn(e) || typeof e == "function" || En(e);
|
|
2263
2263
|
}
|
|
2264
|
-
function
|
|
2264
|
+
function Dn(e) {
|
|
2265
2265
|
return typeof e == "function" && (() => {
|
|
2266
2266
|
const o = Object.getPrototypeOf(e);
|
|
2267
2267
|
return o.prototype && o.prototype.isReactComponent;
|
|
2268
2268
|
})();
|
|
2269
2269
|
}
|
|
2270
|
-
function
|
|
2270
|
+
function En(e) {
|
|
2271
2271
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
2272
2272
|
}
|
|
2273
|
-
function
|
|
2273
|
+
function kn(e) {
|
|
2274
2274
|
const o = {
|
|
2275
2275
|
state: {},
|
|
2276
2276
|
// Dummy state
|
|
@@ -2280,7 +2280,7 @@ function Pn(e) {
|
|
|
2280
2280
|
renderFallbackValue: null,
|
|
2281
2281
|
...e
|
|
2282
2282
|
}, [t] = he.useState(() => ({
|
|
2283
|
-
current:
|
|
2283
|
+
current: yn(o)
|
|
2284
2284
|
})), [n, r] = he.useState(() => t.current.initialState);
|
|
2285
2285
|
return t.current.setOptions((l) => ({
|
|
2286
2286
|
...l,
|
|
@@ -2296,7 +2296,7 @@ function Pn(e) {
|
|
|
2296
2296
|
}
|
|
2297
2297
|
})), t.current;
|
|
2298
2298
|
}
|
|
2299
|
-
const
|
|
2299
|
+
const Te = ({
|
|
2300
2300
|
editable: e = !0,
|
|
2301
2301
|
pageSize: o = 25,
|
|
2302
2302
|
onCellEdit: t
|
|
@@ -2306,44 +2306,44 @@ const Be = ({
|
|
|
2306
2306
|
schema: r,
|
|
2307
2307
|
mappings: l,
|
|
2308
2308
|
errorsByRow: i,
|
|
2309
|
-
editingCell:
|
|
2309
|
+
editingCell: s,
|
|
2310
2310
|
startEditing: u,
|
|
2311
|
-
stopEditing:
|
|
2312
|
-
updateCell:
|
|
2313
|
-
} = X(), [
|
|
2314
|
-
const
|
|
2311
|
+
stopEditing: d,
|
|
2312
|
+
updateCell: p
|
|
2313
|
+
} = X(), [c, f] = K([]), [a, m] = K(""), [h, w] = K(""), R = ke(() => l.filter((x) => x.targetKey !== null).map((x) => {
|
|
2314
|
+
const y = r == null ? void 0 : r.columns.find((V) => V.key === x.targetKey);
|
|
2315
2315
|
return {
|
|
2316
|
-
sourceColumn:
|
|
2317
|
-
targetKey:
|
|
2318
|
-
label: (
|
|
2319
|
-
type: (
|
|
2316
|
+
sourceColumn: x.sourceColumn,
|
|
2317
|
+
targetKey: x.targetKey,
|
|
2318
|
+
label: (y == null ? void 0 : y.label) || x.targetKey,
|
|
2319
|
+
type: (y == null ? void 0 : y.type) || "string"
|
|
2320
2320
|
};
|
|
2321
|
-
}), [l, r]),
|
|
2322
|
-
(
|
|
2323
|
-
const V = i.get(
|
|
2324
|
-
return V == null ? void 0 : V.find((q) => q.columnKey ===
|
|
2321
|
+
}), [l, r]), _ = xe(
|
|
2322
|
+
(x, y) => {
|
|
2323
|
+
const V = i.get(x);
|
|
2324
|
+
return V == null ? void 0 : V.find((q) => q.columnKey === y);
|
|
2325
2325
|
},
|
|
2326
2326
|
[i]
|
|
2327
|
-
),
|
|
2328
|
-
w(V), u(
|
|
2329
|
-
},
|
|
2330
|
-
|
|
2331
|
-
},
|
|
2332
|
-
w(""),
|
|
2333
|
-
},
|
|
2327
|
+
), $ = (x, y, V) => {
|
|
2328
|
+
w(V), u(x, y);
|
|
2329
|
+
}, P = () => {
|
|
2330
|
+
s && (p(s.rowIndex, s.columnKey, h), t == null || t(s.rowIndex, s.columnKey, h)), d();
|
|
2331
|
+
}, I = () => {
|
|
2332
|
+
w(""), d();
|
|
2333
|
+
}, H = Ht(), k = ke(
|
|
2334
2334
|
() => [
|
|
2335
|
-
|
|
2335
|
+
H.accessor("rowIndex", {
|
|
2336
2336
|
header: "#",
|
|
2337
2337
|
size: 60,
|
|
2338
|
-
cell: (
|
|
2338
|
+
cell: (x) => /* @__PURE__ */ g("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: x.getValue() + 1 })
|
|
2339
2339
|
}),
|
|
2340
2340
|
...R.map(
|
|
2341
|
-
(
|
|
2342
|
-
id:
|
|
2343
|
-
header:
|
|
2344
|
-
cell: (
|
|
2345
|
-
const V =
|
|
2346
|
-
return (
|
|
2341
|
+
(x) => H.accessor((y) => y.data[x.targetKey] || y.data[x.sourceColumn], {
|
|
2342
|
+
id: x.targetKey,
|
|
2343
|
+
header: x.label,
|
|
2344
|
+
cell: (y) => {
|
|
2345
|
+
const V = y.row.original.rowIndex, q = String(y.getValue() ?? ""), D = _(V, x.targetKey);
|
|
2346
|
+
return (s == null ? void 0 : s.rowIndex) === V && (s == null ? void 0 : s.columnKey) === x.targetKey ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
|
|
2347
2347
|
/* @__PURE__ */ g(
|
|
2348
2348
|
"input",
|
|
2349
2349
|
{
|
|
@@ -2351,7 +2351,7 @@ const Be = ({
|
|
|
2351
2351
|
value: h,
|
|
2352
2352
|
onChange: (j) => w(j.target.value),
|
|
2353
2353
|
onKeyDown: (j) => {
|
|
2354
|
-
j.key === "Enter" &&
|
|
2354
|
+
j.key === "Enter" && P(), j.key === "Escape" && I();
|
|
2355
2355
|
},
|
|
2356
2356
|
className: "ff-input ff-py-1 ff-text-sm",
|
|
2357
2357
|
autoFocus: !0
|
|
@@ -2360,7 +2360,7 @@ const Be = ({
|
|
|
2360
2360
|
/* @__PURE__ */ g(
|
|
2361
2361
|
"button",
|
|
2362
2362
|
{
|
|
2363
|
-
onClick:
|
|
2363
|
+
onClick: P,
|
|
2364
2364
|
className: "ff-btn ff-btn-primary ff-btn-sm",
|
|
2365
2365
|
children: "Save"
|
|
2366
2366
|
}
|
|
@@ -2368,7 +2368,7 @@ const Be = ({
|
|
|
2368
2368
|
/* @__PURE__ */ g(
|
|
2369
2369
|
"button",
|
|
2370
2370
|
{
|
|
2371
|
-
onClick:
|
|
2371
|
+
onClick: I,
|
|
2372
2372
|
className: "ff-btn ff-btn-secondary ff-btn-sm",
|
|
2373
2373
|
children: "Cancel"
|
|
2374
2374
|
}
|
|
@@ -2376,26 +2376,26 @@ const Be = ({
|
|
|
2376
2376
|
] }) : /* @__PURE__ */ v(
|
|
2377
2377
|
"div",
|
|
2378
2378
|
{
|
|
2379
|
-
className:
|
|
2379
|
+
className: B(
|
|
2380
2380
|
"ff-group ff-flex ff-items-center ff-gap-2",
|
|
2381
|
-
(
|
|
2382
|
-
(
|
|
2381
|
+
(D == null ? void 0 : D.severity) === "error" && "ff-cell-error",
|
|
2382
|
+
(D == null ? void 0 : D.severity) === "warning" && "ff-cell-warning"
|
|
2383
2383
|
),
|
|
2384
2384
|
children: [
|
|
2385
2385
|
/* @__PURE__ */ g("span", { className: "ff-flex-1 ff-truncate", children: q || /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
|
|
2386
|
-
|
|
2387
|
-
|
|
2386
|
+
D && /* @__PURE__ */ v("div", { className: "ff-relative ff-group/tooltip", children: [
|
|
2387
|
+
D.severity === "error" ? /* @__PURE__ */ g(_e, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ g(ve, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
|
|
2388
2388
|
/* @__PURE__ */ v("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: [
|
|
2389
|
-
|
|
2390
|
-
|
|
2389
|
+
D.message,
|
|
2390
|
+
D.suggestion && /* @__PURE__ */ g("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: D.suggestion })
|
|
2391
2391
|
] })
|
|
2392
2392
|
] }),
|
|
2393
|
-
e && !
|
|
2393
|
+
e && !D && /* @__PURE__ */ g(
|
|
2394
2394
|
"button",
|
|
2395
2395
|
{
|
|
2396
|
-
onClick: () =>
|
|
2396
|
+
onClick: () => $(V, x.targetKey, q),
|
|
2397
2397
|
className: "ff-opacity-0 group-hover:ff-opacity-100 ff-p-1 ff-rounded ff-transition-opacity ff-edit-btn",
|
|
2398
|
-
children: /* @__PURE__ */ g(
|
|
2398
|
+
children: /* @__PURE__ */ g(Pt, { className: "ff-w-3 ff-h-3" })
|
|
2399
2399
|
}
|
|
2400
2400
|
)
|
|
2401
2401
|
]
|
|
@@ -2405,20 +2405,20 @@ const Be = ({
|
|
|
2405
2405
|
})
|
|
2406
2406
|
)
|
|
2407
2407
|
],
|
|
2408
|
-
[R,
|
|
2409
|
-
),
|
|
2408
|
+
[R, s, h, e, _, H]
|
|
2409
|
+
), N = kn({
|
|
2410
2410
|
data: n,
|
|
2411
|
-
columns:
|
|
2411
|
+
columns: k,
|
|
2412
2412
|
state: {
|
|
2413
|
-
sorting:
|
|
2414
|
-
globalFilter:
|
|
2413
|
+
sorting: c,
|
|
2414
|
+
globalFilter: a
|
|
2415
2415
|
},
|
|
2416
|
-
onSortingChange:
|
|
2416
|
+
onSortingChange: f,
|
|
2417
2417
|
onGlobalFilterChange: m,
|
|
2418
|
-
getCoreRowModel:
|
|
2419
|
-
getPaginationRowModel:
|
|
2420
|
-
getSortedRowModel:
|
|
2421
|
-
getFilteredRowModel:
|
|
2418
|
+
getCoreRowModel: xn(),
|
|
2419
|
+
getPaginationRowModel: Vn(),
|
|
2420
|
+
getSortedRowModel: Nn(),
|
|
2421
|
+
getFilteredRowModel: In(),
|
|
2422
2422
|
initialState: {
|
|
2423
2423
|
pagination: {
|
|
2424
2424
|
pageSize: o
|
|
@@ -2431,61 +2431,61 @@ const Be = ({
|
|
|
2431
2431
|
"input",
|
|
2432
2432
|
{
|
|
2433
2433
|
type: "text",
|
|
2434
|
-
value:
|
|
2435
|
-
onChange: (
|
|
2434
|
+
value: a,
|
|
2435
|
+
onChange: (x) => m(x.target.value),
|
|
2436
2436
|
placeholder: "Search all columns...",
|
|
2437
2437
|
className: "ff-input ff-max-w-xs"
|
|
2438
2438
|
}
|
|
2439
2439
|
),
|
|
2440
2440
|
/* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
2441
|
-
|
|
2441
|
+
N.getFilteredRowModel().rows.length,
|
|
2442
2442
|
" rows"
|
|
2443
2443
|
] })
|
|
2444
2444
|
] }),
|
|
2445
2445
|
/* @__PURE__ */ g("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ v("table", { className: "ff-table", children: [
|
|
2446
|
-
/* @__PURE__ */ g("thead", { children:
|
|
2446
|
+
/* @__PURE__ */ g("thead", { children: N.getHeaderGroups().map((x) => /* @__PURE__ */ g("tr", { children: x.headers.map((y) => /* @__PURE__ */ g(
|
|
2447
2447
|
"th",
|
|
2448
2448
|
{
|
|
2449
|
-
style: { width:
|
|
2450
|
-
onClick:
|
|
2451
|
-
className:
|
|
2452
|
-
|
|
2449
|
+
style: { width: y.getSize() },
|
|
2450
|
+
onClick: y.column.getToggleSortingHandler(),
|
|
2451
|
+
className: B(
|
|
2452
|
+
y.column.getCanSort() && "ff-cursor-pointer ff-select-none"
|
|
2453
2453
|
),
|
|
2454
2454
|
children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
|
|
2455
|
-
|
|
2456
|
-
|
|
2455
|
+
Be(y.column.columnDef.header, y.getContext()),
|
|
2456
|
+
y.column.getIsSorted() && /* @__PURE__ */ g("span", { children: y.column.getIsSorted() === "asc" ? "↑" : "↓" })
|
|
2457
2457
|
] })
|
|
2458
2458
|
},
|
|
2459
|
-
|
|
2460
|
-
)) },
|
|
2461
|
-
/* @__PURE__ */ g("tbody", { children:
|
|
2462
|
-
const
|
|
2459
|
+
y.id
|
|
2460
|
+
)) }, x.id)) }),
|
|
2461
|
+
/* @__PURE__ */ g("tbody", { children: N.getRowModel().rows.map((x) => {
|
|
2462
|
+
const y = i.has(x.original.rowIndex);
|
|
2463
2463
|
return /* @__PURE__ */ g(
|
|
2464
2464
|
"tr",
|
|
2465
2465
|
{
|
|
2466
|
-
className:
|
|
2467
|
-
children:
|
|
2466
|
+
className: B(y && "ff-row-error"),
|
|
2467
|
+
children: x.getVisibleCells().map((V) => /* @__PURE__ */ g("td", { children: Be(V.column.columnDef.cell, V.getContext()) }, V.id))
|
|
2468
2468
|
},
|
|
2469
|
-
|
|
2469
|
+
x.id
|
|
2470
2470
|
);
|
|
2471
2471
|
}) })
|
|
2472
2472
|
] }) }),
|
|
2473
2473
|
/* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
|
|
2474
2474
|
/* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
|
|
2475
2475
|
"Page ",
|
|
2476
|
-
|
|
2476
|
+
N.getState().pagination.pageIndex + 1,
|
|
2477
2477
|
" of ",
|
|
2478
|
-
|
|
2478
|
+
N.getPageCount()
|
|
2479
2479
|
] }),
|
|
2480
2480
|
/* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
|
|
2481
2481
|
/* @__PURE__ */ v(
|
|
2482
2482
|
"button",
|
|
2483
2483
|
{
|
|
2484
|
-
onClick: () =>
|
|
2485
|
-
disabled: !
|
|
2484
|
+
onClick: () => N.previousPage(),
|
|
2485
|
+
disabled: !N.getCanPreviousPage(),
|
|
2486
2486
|
className: "ff-btn ff-btn-secondary ff-btn-sm",
|
|
2487
2487
|
children: [
|
|
2488
|
-
/* @__PURE__ */ g(
|
|
2488
|
+
/* @__PURE__ */ g(Ct, { className: "ff-w-4 ff-h-4" }),
|
|
2489
2489
|
"Previous"
|
|
2490
2490
|
]
|
|
2491
2491
|
}
|
|
@@ -2493,25 +2493,25 @@ const Be = ({
|
|
|
2493
2493
|
/* @__PURE__ */ v(
|
|
2494
2494
|
"button",
|
|
2495
2495
|
{
|
|
2496
|
-
onClick: () =>
|
|
2497
|
-
disabled: !
|
|
2496
|
+
onClick: () => N.nextPage(),
|
|
2497
|
+
disabled: !N.getCanNextPage(),
|
|
2498
2498
|
className: "ff-btn ff-btn-secondary ff-btn-sm",
|
|
2499
2499
|
children: [
|
|
2500
2500
|
"Next",
|
|
2501
|
-
/* @__PURE__ */ g(
|
|
2501
|
+
/* @__PURE__ */ g(dt, { className: "ff-w-4 ff-h-4" })
|
|
2502
2502
|
]
|
|
2503
2503
|
}
|
|
2504
2504
|
)
|
|
2505
2505
|
] })
|
|
2506
2506
|
] })
|
|
2507
2507
|
] });
|
|
2508
|
-
},
|
|
2508
|
+
}, qe = ({
|
|
2509
2509
|
showDetails: e = !0
|
|
2510
2510
|
}) => {
|
|
2511
2511
|
const { validationResults: o } = X();
|
|
2512
2512
|
if (!o)
|
|
2513
2513
|
return null;
|
|
2514
|
-
const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount:
|
|
2514
|
+
const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: s, summary: u } = o, d = Math.round(r / n * 100);
|
|
2515
2515
|
return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
|
|
2516
2516
|
/* @__PURE__ */ v(
|
|
2517
2517
|
"div",
|
|
@@ -2522,7 +2522,7 @@ const Be = ({
|
|
|
2522
2522
|
borderColor: t ? "var(--ff-success)" : "var(--ff-error)"
|
|
2523
2523
|
},
|
|
2524
2524
|
children: [
|
|
2525
|
-
t ? /* @__PURE__ */ g(Fe, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(
|
|
2525
|
+
t ? /* @__PURE__ */ g(Fe, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(He, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
|
|
2526
2526
|
/* @__PURE__ */ v("div", { children: [
|
|
2527
2527
|
/* @__PURE__ */ g(
|
|
2528
2528
|
"h3",
|
|
@@ -2537,7 +2537,7 @@ const Be = ({
|
|
|
2537
2537
|
" of ",
|
|
2538
2538
|
n,
|
|
2539
2539
|
" rows are valid (",
|
|
2540
|
-
|
|
2540
|
+
d,
|
|
2541
2541
|
"%)"
|
|
2542
2542
|
] })
|
|
2543
2543
|
] })
|
|
@@ -2564,43 +2564,43 @@ const Be = ({
|
|
|
2564
2564
|
] }),
|
|
2565
2565
|
e && u.byColumn && Object.keys(u.byColumn).length > 0 && /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-overflow-hidden", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
|
|
2566
2566
|
/* @__PURE__ */ g("div", { className: "ff-px-4 ff-py-3 ff-border-b", style: { backgroundColor: "var(--ff-bg-secondary)", borderColor: "var(--ff-border-light)" }, children: /* @__PURE__ */ g("h4", { className: "ff-font-medium", style: { color: "var(--ff-text-secondary)" }, children: "Issues by Column" }) }),
|
|
2567
|
-
/* @__PURE__ */ g("div", { className: "ff-divide-y", style: { borderColor: "var(--ff-border-light)" }, children: Object.entries(u.byColumn).filter(([,
|
|
2567
|
+
/* @__PURE__ */ g("div", { className: "ff-divide-y", style: { borderColor: "var(--ff-border-light)" }, children: Object.entries(u.byColumn).filter(([, p]) => p.errorCount > 0 || p.warningCount > 0).map(([p, c]) => /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-4 ff-py-3", children: [
|
|
2568
2568
|
/* @__PURE__ */ v("div", { children: [
|
|
2569
|
-
/* @__PURE__ */ g("p", { className: "ff-font-medium", style: { color: "var(--ff-text-primary)" }, children:
|
|
2570
|
-
|
|
2569
|
+
/* @__PURE__ */ g("p", { className: "ff-font-medium", style: { color: "var(--ff-text-primary)" }, children: c.columnKey }),
|
|
2570
|
+
c.mostCommonError && /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: c.mostCommonError })
|
|
2571
2571
|
] }),
|
|
2572
2572
|
/* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
|
|
2573
|
-
|
|
2574
|
-
/* @__PURE__ */ g(
|
|
2575
|
-
|
|
2573
|
+
c.errorCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-error", children: [
|
|
2574
|
+
/* @__PURE__ */ g(He, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
|
|
2575
|
+
c.errorCount,
|
|
2576
2576
|
" errors"
|
|
2577
2577
|
] }),
|
|
2578
|
-
|
|
2578
|
+
c.warningCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-warning", children: [
|
|
2579
2579
|
/* @__PURE__ */ g(ve, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
|
|
2580
|
-
|
|
2580
|
+
c.warningCount,
|
|
2581
2581
|
" warnings"
|
|
2582
2582
|
] })
|
|
2583
2583
|
] })
|
|
2584
|
-
] },
|
|
2584
|
+
] }, p)) })
|
|
2585
2585
|
] }),
|
|
2586
2586
|
e && u.duplicates && u.duplicates.length > 0 && /* @__PURE__ */ g("div", { className: "ff-border ff-rounded-lg ff-p-4", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-3", children: [
|
|
2587
2587
|
/* @__PURE__ */ g(ve, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
|
|
2588
2588
|
/* @__PURE__ */ v("div", { children: [
|
|
2589
2589
|
/* @__PURE__ */ g("h4", { className: "ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Duplicate Values Found" }),
|
|
2590
2590
|
/* @__PURE__ */ v("ul", { className: "ff-mt-2 ff-space-y-1 ff-text-sm", style: { color: "var(--ff-warning-dark)" }, children: [
|
|
2591
|
-
u.duplicates.slice(0, 5).map((
|
|
2592
|
-
/* @__PURE__ */ g("span", { className: "ff-font-mono", children:
|
|
2591
|
+
u.duplicates.slice(0, 5).map((p, c) => /* @__PURE__ */ v("li", { children: [
|
|
2592
|
+
/* @__PURE__ */ g("span", { className: "ff-font-mono", children: p.columnKey }),
|
|
2593
2593
|
': "',
|
|
2594
|
-
String(
|
|
2594
|
+
String(p.value),
|
|
2595
2595
|
'" appears',
|
|
2596
2596
|
" ",
|
|
2597
|
-
|
|
2597
|
+
p.rowIndices.length,
|
|
2598
2598
|
" times (rows",
|
|
2599
2599
|
" ",
|
|
2600
|
-
|
|
2601
|
-
|
|
2600
|
+
p.rowIndices.slice(0, 3).map((f) => f + 1).join(", "),
|
|
2601
|
+
p.rowIndices.length > 3 ? "..." : "",
|
|
2602
2602
|
")"
|
|
2603
|
-
] },
|
|
2603
|
+
] }, c)),
|
|
2604
2604
|
u.duplicates.length > 5 && /* @__PURE__ */ v("li", { style: { color: "var(--ff-warning)" }, children: [
|
|
2605
2605
|
"... and ",
|
|
2606
2606
|
u.duplicates.length - 5,
|
|
@@ -2610,220 +2610,221 @@ const Be = ({
|
|
|
2610
2610
|
] })
|
|
2611
2611
|
] }) })
|
|
2612
2612
|
] });
|
|
2613
|
-
}, me = ["upload", "mapping", "validation", "complete"],
|
|
2614
|
-
{ key: "upload", label: "Upload", icon:
|
|
2615
|
-
{ key: "mapping", label: "Map Columns", icon:
|
|
2616
|
-
{ key: "validation", label: "Validate", icon:
|
|
2617
|
-
{ key: "review", label: "Review", icon:
|
|
2613
|
+
}, me = ["upload", "mapping", "validation", "complete"], Ln = [
|
|
2614
|
+
{ key: "upload", label: "Upload", icon: je },
|
|
2615
|
+
{ key: "mapping", label: "Map Columns", icon: Vt },
|
|
2616
|
+
{ key: "validation", label: "Validate", icon: Et },
|
|
2617
|
+
{ key: "review", label: "Review", icon: xt },
|
|
2618
2618
|
{ key: "complete", label: "Complete", icon: Fe }
|
|
2619
|
-
],
|
|
2619
|
+
], On = ({
|
|
2620
2620
|
template: e,
|
|
2621
2621
|
schema: o,
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2622
|
+
mode: t = "modal",
|
|
2623
|
+
theme: n,
|
|
2624
|
+
onComplete: r,
|
|
2625
|
+
onCancel: l,
|
|
2626
|
+
onError: i
|
|
2625
2627
|
}) => {
|
|
2626
2628
|
const {
|
|
2627
|
-
step:
|
|
2628
|
-
sessionId:
|
|
2629
|
-
file:
|
|
2630
|
-
mappings:
|
|
2631
|
-
validationResults:
|
|
2632
|
-
isLoading:
|
|
2633
|
-
error:
|
|
2634
|
-
setSchema:
|
|
2635
|
-
setSessionId:
|
|
2636
|
-
setParsedData:
|
|
2637
|
-
setMappings:
|
|
2638
|
-
setUnmapped:
|
|
2639
|
-
setValidationResults:
|
|
2640
|
-
setStep:
|
|
2641
|
-
nextStep:
|
|
2642
|
-
previousStep:
|
|
2643
|
-
setLoading:
|
|
2629
|
+
step: s,
|
|
2630
|
+
sessionId: u,
|
|
2631
|
+
file: d,
|
|
2632
|
+
mappings: p,
|
|
2633
|
+
validationResults: c,
|
|
2634
|
+
isLoading: f,
|
|
2635
|
+
error: a,
|
|
2636
|
+
setSchema: m,
|
|
2637
|
+
setSessionId: h,
|
|
2638
|
+
setParsedData: w,
|
|
2639
|
+
setMappings: R,
|
|
2640
|
+
setUnmapped: _,
|
|
2641
|
+
setValidationResults: $,
|
|
2642
|
+
setStep: P,
|
|
2643
|
+
nextStep: I,
|
|
2644
|
+
previousStep: H,
|
|
2645
|
+
setLoading: k,
|
|
2644
2646
|
setError: N,
|
|
2645
|
-
reset:
|
|
2646
|
-
} = X(), [
|
|
2647
|
-
|
|
2648
|
-
if (
|
|
2649
|
-
if (
|
|
2650
|
-
const
|
|
2651
|
-
|
|
2647
|
+
reset: x
|
|
2648
|
+
} = X(), [y, V] = K(null), [q, D] = K(null);
|
|
2649
|
+
Le(() => {
|
|
2650
|
+
if (D(null), e)
|
|
2651
|
+
if (gt(e)) {
|
|
2652
|
+
const F = ct(e);
|
|
2653
|
+
F ? V(F) : (D(`Failed to load template "${e}"`), i == null || i(new Error(`Failed to load template "${e}"`)));
|
|
2652
2654
|
} else {
|
|
2653
|
-
const
|
|
2654
|
-
|
|
2655
|
+
const F = `Template "${e}" not found. Available templates: ${ze.join(", ")}`;
|
|
2656
|
+
D(F), i == null || i(new Error(F));
|
|
2655
2657
|
}
|
|
2656
2658
|
else if (o)
|
|
2657
|
-
|
|
2659
|
+
V(o);
|
|
2658
2660
|
else {
|
|
2659
|
-
const
|
|
2660
|
-
|
|
2661
|
+
const F = `No template or schema provided. Please specify a template (${ze.join(", ")}) or provide a custom schema.`;
|
|
2662
|
+
D(F), i == null || i(new Error(F));
|
|
2661
2663
|
}
|
|
2662
|
-
}, [e, o,
|
|
2663
|
-
|
|
2664
|
-
}, [
|
|
2665
|
-
const
|
|
2664
|
+
}, [e, o, i]), Le(() => {
|
|
2665
|
+
y && (m(y), Ne(y));
|
|
2666
|
+
}, [y]);
|
|
2667
|
+
const Ne = async (F) => {
|
|
2666
2668
|
try {
|
|
2667
|
-
|
|
2668
|
-
const
|
|
2669
|
-
|
|
2670
|
-
} catch (
|
|
2671
|
-
const
|
|
2672
|
-
N(
|
|
2669
|
+
k(!0);
|
|
2670
|
+
const A = await Q().createImportSession(F);
|
|
2671
|
+
h(A.sessionId);
|
|
2672
|
+
} catch (M) {
|
|
2673
|
+
const A = M;
|
|
2674
|
+
N(A.message), i == null || i(A);
|
|
2673
2675
|
} finally {
|
|
2674
|
-
|
|
2676
|
+
k(!1);
|
|
2675
2677
|
}
|
|
2676
|
-
},
|
|
2677
|
-
if (
|
|
2678
|
+
}, j = xe(async (F) => {
|
|
2679
|
+
if (u)
|
|
2678
2680
|
try {
|
|
2679
|
-
|
|
2680
|
-
const
|
|
2681
|
-
rowIndex: U.rowIndex ??
|
|
2681
|
+
k(!0), N(null);
|
|
2682
|
+
const A = await Q().uploadFile(u, F), Ee = (U, st) => ({
|
|
2683
|
+
rowIndex: U.rowIndex ?? st,
|
|
2682
2684
|
data: U.data ?? U,
|
|
2683
2685
|
rawData: U.rawData ?? Object.values(U.data ?? U)
|
|
2684
2686
|
});
|
|
2685
|
-
|
|
2686
|
-
headers:
|
|
2687
|
-
rows:
|
|
2688
|
-
totalRows:
|
|
2689
|
-
sampleRows:
|
|
2690
|
-
}),
|
|
2691
|
-
} catch (
|
|
2692
|
-
N(`Failed to process the uploaded file: ${
|
|
2687
|
+
w({
|
|
2688
|
+
headers: A.data.headers,
|
|
2689
|
+
rows: A.data.sampleRows.map(Ee),
|
|
2690
|
+
totalRows: A.data.totalRows,
|
|
2691
|
+
sampleRows: A.data.sampleRows.map(Ee)
|
|
2692
|
+
}), I(), await tt();
|
|
2693
|
+
} catch (M) {
|
|
2694
|
+
N(`Failed to process the uploaded file: ${M.message}`);
|
|
2693
2695
|
} finally {
|
|
2694
|
-
|
|
2696
|
+
k(!1);
|
|
2695
2697
|
}
|
|
2696
|
-
}, [
|
|
2697
|
-
if (
|
|
2698
|
+
}, [u]), tt = async () => {
|
|
2699
|
+
if (u)
|
|
2698
2700
|
try {
|
|
2699
|
-
|
|
2700
|
-
const
|
|
2701
|
-
|
|
2702
|
-
} catch (
|
|
2703
|
-
N(`Column matching failed: ${
|
|
2701
|
+
k(!0);
|
|
2702
|
+
const M = await Q().matchColumns(u);
|
|
2703
|
+
R(M.mappings), _(M.unmappedSource, M.unmappedTarget);
|
|
2704
|
+
} catch (F) {
|
|
2705
|
+
N(`Column matching failed: ${F.message}`);
|
|
2704
2706
|
} finally {
|
|
2705
|
-
|
|
2707
|
+
k(!1);
|
|
2706
2708
|
}
|
|
2707
|
-
},
|
|
2708
|
-
if (
|
|
2709
|
+
}, nt = async () => {
|
|
2710
|
+
if (u)
|
|
2709
2711
|
try {
|
|
2710
|
-
|
|
2711
|
-
const
|
|
2712
|
-
|
|
2713
|
-
} catch (
|
|
2714
|
-
N(`Validation failed: ${
|
|
2712
|
+
k(!0), N(null);
|
|
2713
|
+
const M = await Q().validateImport(u);
|
|
2714
|
+
$(M.validation), I();
|
|
2715
|
+
} catch (F) {
|
|
2716
|
+
N(`Validation failed: ${F.message}`);
|
|
2715
2717
|
} finally {
|
|
2716
|
-
|
|
2718
|
+
k(!1);
|
|
2717
2719
|
}
|
|
2718
|
-
}, [Pe,
|
|
2719
|
-
if (
|
|
2720
|
+
}, [Pe, le] = K(null), ot = async () => {
|
|
2721
|
+
if (u)
|
|
2720
2722
|
try {
|
|
2721
|
-
|
|
2722
|
-
const
|
|
2723
|
+
k(!0), N(null), le(null);
|
|
2724
|
+
const M = await Q().completeImport(u, {
|
|
2723
2725
|
skipInvalidRows: !0,
|
|
2724
2726
|
acknowledgeWarnings: !0
|
|
2725
2727
|
});
|
|
2726
|
-
|
|
2727
|
-
} catch (
|
|
2728
|
-
|
|
2728
|
+
P("complete"), r == null || r(M);
|
|
2729
|
+
} catch (F) {
|
|
2730
|
+
le(F.message), P("complete");
|
|
2729
2731
|
} finally {
|
|
2730
|
-
|
|
2732
|
+
k(!1);
|
|
2731
2733
|
}
|
|
2732
|
-
},
|
|
2733
|
-
|
|
2734
|
-
},
|
|
2735
|
-
switch (
|
|
2734
|
+
}, ie = () => {
|
|
2735
|
+
x(), l == null || l();
|
|
2736
|
+
}, rt = () => Ln.findIndex((F) => F.key === s), lt = () => {
|
|
2737
|
+
switch (s) {
|
|
2736
2738
|
case "upload":
|
|
2737
|
-
return
|
|
2739
|
+
return d !== null;
|
|
2738
2740
|
case "mapping":
|
|
2739
|
-
return
|
|
2741
|
+
return p.length > 0 && p.some((F) => F.targetKey !== null);
|
|
2740
2742
|
case "validation":
|
|
2741
|
-
return
|
|
2743
|
+
return c !== null;
|
|
2742
2744
|
case "review":
|
|
2743
|
-
return
|
|
2745
|
+
return c !== null && (c.isValid || c.errorCount === 0);
|
|
2744
2746
|
default:
|
|
2745
2747
|
return !1;
|
|
2746
2748
|
}
|
|
2747
|
-
},
|
|
2748
|
-
switch (
|
|
2749
|
+
}, it = async () => {
|
|
2750
|
+
switch (s) {
|
|
2749
2751
|
case "mapping":
|
|
2750
|
-
await
|
|
2752
|
+
await nt();
|
|
2751
2753
|
break;
|
|
2752
2754
|
case "validation":
|
|
2753
|
-
|
|
2755
|
+
I();
|
|
2754
2756
|
break;
|
|
2755
2757
|
case "review":
|
|
2756
|
-
await
|
|
2758
|
+
await ot();
|
|
2757
2759
|
break;
|
|
2758
2760
|
default:
|
|
2759
|
-
|
|
2761
|
+
I();
|
|
2760
2762
|
}
|
|
2761
2763
|
};
|
|
2762
|
-
if (
|
|
2763
|
-
return /* @__PURE__ */ g(se, { children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
|
|
2764
|
-
/* @__PURE__ */ g("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__ */ g(
|
|
2764
|
+
if (q)
|
|
2765
|
+
return /* @__PURE__ */ g(se, { theme: n, children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
|
|
2766
|
+
/* @__PURE__ */ g("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__ */ g(oe, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
|
|
2765
2767
|
/* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Configuration Error" }),
|
|
2766
|
-
/* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children:
|
|
2767
|
-
|
|
2768
|
+
/* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: q }),
|
|
2769
|
+
l && /* @__PURE__ */ g("button", { onClick: ie, className: "ff-btn ff-btn-secondary", children: "Close" })
|
|
2768
2770
|
] }) }) });
|
|
2769
|
-
if (!
|
|
2770
|
-
return /* @__PURE__ */ g(se, { children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
|
|
2771
|
-
/* @__PURE__ */ g(
|
|
2771
|
+
if (!y)
|
|
2772
|
+
return /* @__PURE__ */ g(se, { theme: n, children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
|
|
2773
|
+
/* @__PURE__ */ g(Ae, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
|
|
2772
2774
|
/* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Loading template..." })
|
|
2773
2775
|
] }) }) });
|
|
2774
2776
|
const W = () => {
|
|
2775
|
-
const
|
|
2776
|
-
return me.indexOf(
|
|
2777
|
-
}
|
|
2778
|
-
return /* @__PURE__ */ g(se, { children: /* @__PURE__ */ v("div", { className: "ff-container ff-modal", children: [
|
|
2777
|
+
const F = s === "review" ? "validation" : s;
|
|
2778
|
+
return me.indexOf(F);
|
|
2779
|
+
}, De = /* @__PURE__ */ g(Z, { children: /* @__PURE__ */ v("div", { className: t === "embed" ? "ff-container ff-embed" : "ff-container ff-modal", children: [
|
|
2779
2780
|
/* @__PURE__ */ v("div", { className: "ff-modal-header", children: [
|
|
2780
2781
|
/* @__PURE__ */ v("div", { className: "ff-modal-header-left", children: [
|
|
2781
2782
|
/* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
|
|
2782
|
-
/* @__PURE__ */ g("div", { className: "ff-modal-icon", children: /* @__PURE__ */ g(
|
|
2783
|
+
/* @__PURE__ */ g("div", { className: "ff-modal-icon", children: /* @__PURE__ */ g(Ft, {}) }),
|
|
2783
2784
|
/* @__PURE__ */ g("h2", { className: "ff-modal-title", children: "Import Data" })
|
|
2784
2785
|
] }),
|
|
2785
|
-
/* @__PURE__ */ g("div", { className: "ff-steps ff-ml-4", children: me.map((
|
|
2786
|
+
/* @__PURE__ */ g("div", { className: "ff-steps ff-ml-4", children: me.map((F, M) => /* @__PURE__ */ v(at.Fragment, { children: [
|
|
2786
2787
|
/* @__PURE__ */ g(
|
|
2787
2788
|
"div",
|
|
2788
2789
|
{
|
|
2789
|
-
className:
|
|
2790
|
+
className: B(
|
|
2790
2791
|
"ff-step",
|
|
2791
|
-
W() ===
|
|
2792
|
-
W() >
|
|
2793
|
-
W() <
|
|
2792
|
+
W() === M && "ff-step-active",
|
|
2793
|
+
W() > M && "ff-step-complete",
|
|
2794
|
+
W() < M && "ff-step-pending"
|
|
2794
2795
|
),
|
|
2795
|
-
children: W() >
|
|
2796
|
+
children: W() > M ? "✓" : M + 1
|
|
2796
2797
|
}
|
|
2797
2798
|
),
|
|
2798
|
-
|
|
2799
|
+
M < me.length - 1 && /* @__PURE__ */ g("div", { className: B(
|
|
2799
2800
|
"ff-step-connector",
|
|
2800
|
-
W() >
|
|
2801
|
+
W() > M && "ff-step-connector-complete"
|
|
2801
2802
|
) })
|
|
2802
|
-
] },
|
|
2803
|
+
] }, F)) })
|
|
2803
2804
|
] }),
|
|
2804
2805
|
/* @__PURE__ */ g(
|
|
2805
2806
|
"button",
|
|
2806
2807
|
{
|
|
2807
|
-
onClick:
|
|
2808
|
+
onClick: ie,
|
|
2808
2809
|
className: "ff-modal-close",
|
|
2809
|
-
children: /* @__PURE__ */ g(
|
|
2810
|
+
children: /* @__PURE__ */ g(oe, { className: "ff-w-5 ff-h-5" })
|
|
2810
2811
|
}
|
|
2811
2812
|
)
|
|
2812
2813
|
] }),
|
|
2813
2814
|
/* @__PURE__ */ v("div", { className: "ff-modal-body", children: [
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
/* @__PURE__ */ g(
|
|
2819
|
-
/* @__PURE__ */ g(
|
|
2815
|
+
a && /* @__PURE__ */ g("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: a }),
|
|
2816
|
+
s === "upload" && /* @__PURE__ */ g("div", { className: "ff-py-4", children: /* @__PURE__ */ g("div", { className: "ff-max-w-xl ff-mx-auto", children: /* @__PURE__ */ g(kt, { onFileSelect: j }) }) }),
|
|
2817
|
+
s === "mapping" && /* @__PURE__ */ g(Lt, {}),
|
|
2818
|
+
s === "validation" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
|
|
2819
|
+
/* @__PURE__ */ g(qe, {}),
|
|
2820
|
+
/* @__PURE__ */ g(Te, { editable: !0 })
|
|
2820
2821
|
] }),
|
|
2821
|
-
|
|
2822
|
-
/* @__PURE__ */ g(
|
|
2823
|
-
/* @__PURE__ */ g(
|
|
2822
|
+
s === "review" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
|
|
2823
|
+
/* @__PURE__ */ g(qe, { showDetails: !1 }),
|
|
2824
|
+
/* @__PURE__ */ g(Te, { editable: !1, pageSize: 10 })
|
|
2824
2825
|
] }),
|
|
2825
|
-
|
|
2826
|
-
/* @__PURE__ */ g("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__ */ g(
|
|
2826
|
+
s === "complete" && /* @__PURE__ */ g("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: Pe ? /* @__PURE__ */ v(Z, { children: [
|
|
2827
|
+
/* @__PURE__ */ g("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__ */ g(oe, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
|
|
2827
2828
|
/* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Failed" }),
|
|
2828
2829
|
/* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: Pe }),
|
|
2829
2830
|
/* @__PURE__ */ v("div", { className: "ff-flex ff-gap-3", children: [
|
|
@@ -2831,26 +2832,26 @@ const Be = ({
|
|
|
2831
2832
|
"button",
|
|
2832
2833
|
{
|
|
2833
2834
|
onClick: () => {
|
|
2834
|
-
|
|
2835
|
+
le(null), P("review");
|
|
2835
2836
|
},
|
|
2836
2837
|
className: "ff-btn ff-btn-secondary",
|
|
2837
2838
|
children: "Back to Review"
|
|
2838
2839
|
}
|
|
2839
2840
|
),
|
|
2840
|
-
|
|
2841
|
+
l && /* @__PURE__ */ g("button", { onClick: ie, className: "ff-btn ff-btn-secondary", children: "Close" })
|
|
2841
2842
|
] })
|
|
2842
|
-
] }) : /* @__PURE__ */ v(
|
|
2843
|
+
] }) : /* @__PURE__ */ v(Z, { children: [
|
|
2843
2844
|
/* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-success-light)" }, children: /* @__PURE__ */ g(Fe, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
|
|
2844
2845
|
/* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Complete!" }),
|
|
2845
2846
|
/* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Your data has been successfully imported." })
|
|
2846
2847
|
] }) })
|
|
2847
2848
|
] }),
|
|
2848
|
-
|
|
2849
|
+
s !== "complete" && /* @__PURE__ */ v("div", { className: "ff-modal-footer", children: [
|
|
2849
2850
|
/* @__PURE__ */ g(
|
|
2850
2851
|
"button",
|
|
2851
2852
|
{
|
|
2852
|
-
onClick:
|
|
2853
|
-
disabled:
|
|
2853
|
+
onClick: H,
|
|
2854
|
+
disabled: rt() === 0 || f,
|
|
2854
2855
|
className: "ff-btn ff-btn-secondary",
|
|
2855
2856
|
children: "Back"
|
|
2856
2857
|
}
|
|
@@ -2858,24 +2859,25 @@ const Be = ({
|
|
|
2858
2859
|
/* @__PURE__ */ g(
|
|
2859
2860
|
"button",
|
|
2860
2861
|
{
|
|
2861
|
-
onClick:
|
|
2862
|
-
disabled: !
|
|
2862
|
+
onClick: it,
|
|
2863
|
+
disabled: !lt() || f,
|
|
2863
2864
|
className: "ff-btn ff-btn-primary",
|
|
2864
|
-
children:
|
|
2865
|
-
/* @__PURE__ */ g(
|
|
2865
|
+
children: f ? /* @__PURE__ */ v(Z, { children: [
|
|
2866
|
+
/* @__PURE__ */ g(Ae, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
|
|
2866
2867
|
"Processing..."
|
|
2867
|
-
] }) :
|
|
2868
|
+
] }) : s === "review" ? "Complete Import" : "Continue"
|
|
2868
2869
|
}
|
|
2869
2870
|
)
|
|
2870
2871
|
] })
|
|
2871
2872
|
] }) });
|
|
2873
|
+
return /* @__PURE__ */ g(se, { theme: n, children: t === "modal" ? /* @__PURE__ */ g("div", { className: "ff-overlay", children: De }) : De });
|
|
2872
2874
|
};
|
|
2873
2875
|
export {
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2876
|
+
Lt as C,
|
|
2877
|
+
Te as D,
|
|
2878
|
+
kt as F,
|
|
2879
|
+
On as I,
|
|
2880
|
+
qe as V,
|
|
2879
2881
|
X as u
|
|
2880
2882
|
};
|
|
2881
|
-
//# sourceMappingURL=ImportWizard-
|
|
2883
|
+
//# sourceMappingURL=ImportWizard-BEdcnr4Q.mjs.map
|