@nivaro/react 0.3.110 → 0.3.112
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +170 -2
- package/dist/index.js +745 -728
- package/dist/shared/components/CollectionBrowserView.js +3097 -2972
- package/dist/shared/components/CollectionImportBanner.js +135 -0
- package/dist/shared/components/ItemEditForm.js +2235 -2218
- package/dist/shared/components/JobsTray.js +54 -47
- package/dist/shared/components/TipLayer.js +61 -54
- package/dist/shared/components/ViewAsPersonButton.js +109 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
- package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
- package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
- package/dist/shared/components/bulk/bulk-field-options.js +20 -19
- package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
- package/dist/shared/components/cbv/ColumnHeaderMenu.js +113 -0
- package/dist/shared/components/cbv/column-totals.js +66 -0
- package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
- package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
- package/dist/shared/components/collections-directory/directory-data.js +70 -58
- package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
- package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
- package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
- package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
- package/dist/shared/components/item-edit/FieldRow.js +248 -246
- package/dist/shared/components/item-edit/InlineGridField.js +34 -33
- package/dist/shared/components/item-edit/InlineTableField.js +3064 -2882
- package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
- package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
- package/dist/shared/components/item-edit/PlanGrid.js +2 -1
- package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
- package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
- package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
- package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
- package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
- package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
- package/dist/shared/components/item-edit/grid-search.js +345 -0
- package/dist/shared/components/item-edit/render-stability.js +61 -54
- package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
- package/dist/shared/components/ops-report/DigestSections.js +163 -144
- package/dist/shared/components/ops-report/drill.js +97 -97
- package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
- package/dist/shared/components/panels/AddendumPanel.js +92 -91
- package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
- package/dist/shared/components/panels/BlockedMove.js +73 -0
- package/dist/shared/components/panels/CommentPanel.js +265 -252
- package/dist/shared/components/panels/OwnersSlot.js +47 -35
- package/dist/shared/components/panels/PipelineInsight.js +186 -0
- package/dist/shared/components/panels/PipelinePanel.js +1573 -1475
- package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
- package/dist/shared/components/panels/RevisionsPanel.js +261 -260
- package/dist/shared/components/pipeline/FieldPicker.js +41 -40
- package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
- package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
- package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
- package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
- package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
- package/dist/shared/components/profile/PersonHeader.js +29 -29
- package/dist/shared/components/profile/PersonProfile.js +30 -28
- package/dist/shared/components/profile/SlowScreensCard.js +286 -0
- package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
- package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
- package/dist/shared/components/support/TicketDetailSheet.js +25 -16
- package/dist/shared/components/support/TicketSlowScreens.js +32 -0
- package/dist/shared/lib/activity-sentence.js +224 -178
- package/dist/shared/lib/collection-import-banner.js +27 -0
- package/dist/shared/lib/crash-report.js +112 -0
- package/dist/shared/lib/export-runs.js +99 -0
- package/dist/shared/lib/jobs-tray.js +89 -67
- package/dist/shared/lib/list-link.js +76 -69
- package/dist/shared/lib/nav-trail.js +180 -76
- package/dist/shared/lib/query-keys.js +26 -0
- package/dist/shared/lib/view-as.js +16 -11
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a, Fragment as Ze } from "react/jsx-runtime";
|
|
2
2
|
import { useQueryClient as Xe, useQuery as L, useMutation as K } from "@tanstack/react-query";
|
|
3
|
-
import { Upload as Ye, Plus as Me, ArrowLeft as
|
|
4
|
-
import { useState as g, useMemo as W, useEffect as Ie, useRef as
|
|
3
|
+
import { Upload as Ye, Plus as Me, ArrowLeft as De, FileUp as et, Link2 as tt, Loader2 as pe, Sparkles as at, ArrowRight as Ee, MoreHorizontal as rt, Trash2 as st, ChevronsUpDown as lt, Check as nt } from "lucide-react";
|
|
4
|
+
import { useState as g, useMemo as W, useEffect as Ie, useRef as Te } from "react";
|
|
5
5
|
import { useNivaroClient as se, useNavigation as ot } from "../../context.js";
|
|
6
6
|
import { get as Q, del as dt, post as I } from "../../lib/commands.js";
|
|
7
|
-
import { errorSentence as it, rowErrorSentence as
|
|
7
|
+
import { errorSentence as it, rowErrorSentence as Ae } from "../../lib/error-message.js";
|
|
8
8
|
import { formatNumber as P, toLocalDateString as ct, cn as v, formatRelative as mt, formatDateTime as ae } from "../../lib/utils.js";
|
|
9
9
|
import { DataTable as pt } from "../DataTable.js";
|
|
10
10
|
import { Button as F } from "../ui/button.js";
|
|
@@ -17,7 +17,8 @@ import { SimpleSelect as Ct } from "../ui/SimpleSelect.js";
|
|
|
17
17
|
import { Sheet as St, SheetContent as Pt } from "../ui/sheet.js";
|
|
18
18
|
import { Switch as $t } from "../ui/switch.js";
|
|
19
19
|
import { Textarea as qt } from "../ui/textarea.js";
|
|
20
|
-
import {
|
|
20
|
+
import { ImportDuplicatesNotice as Mt } from "./ImportDuplicatesNotice.js";
|
|
21
|
+
import { collectionPickerOptions as Dt, fieldPickerOptions as Fe } from "./import-picker-options.js";
|
|
21
22
|
const ue = 25, he = ["Source", "Map columns", "Options", "Confirm"], H = {
|
|
22
23
|
pending: { dot: "bg-slate-400", text: "text-slate-600 dark:text-slate-300", label: "Pending" },
|
|
23
24
|
processing: {
|
|
@@ -78,7 +79,7 @@ function Le({ status: c }) {
|
|
|
78
79
|
o.label
|
|
79
80
|
] });
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
+
function Rt({
|
|
82
83
|
processed: c,
|
|
83
84
|
total: o,
|
|
84
85
|
failed: n
|
|
@@ -111,7 +112,7 @@ function re(c) {
|
|
|
111
112
|
}
|
|
112
113
|
return o.push(n), o.map((m) => m.trim());
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function Ft(c) {
|
|
115
116
|
const o = c.split(/\r?\n/).filter((m) => m.trim());
|
|
116
117
|
if (o.length === 0) return { headers: [], rows: [], rowCount: 0 };
|
|
117
118
|
const n = re(o[0]), p = o.slice(1, 6).map(re);
|
|
@@ -189,7 +190,7 @@ function Y({
|
|
|
189
190
|
] }) })
|
|
190
191
|
] });
|
|
191
192
|
}
|
|
192
|
-
function
|
|
193
|
+
function Ot({ confidence: c }) {
|
|
193
194
|
const o = Math.round(c * 100), n = o >= 80 ? "text-emerald-700 dark:text-emerald-400" : o >= 50 ? "text-amber-700 dark:text-amber-400" : "text-slate-500";
|
|
194
195
|
return /* @__PURE__ */ a(
|
|
195
196
|
"span",
|
|
@@ -204,55 +205,55 @@ function Ft({ confidence: c }) {
|
|
|
204
205
|
}
|
|
205
206
|
);
|
|
206
207
|
}
|
|
207
|
-
function
|
|
208
|
+
function da({
|
|
208
209
|
initialJobId: c,
|
|
209
210
|
onJobOpen: o
|
|
210
211
|
}) {
|
|
211
212
|
var B;
|
|
212
|
-
const n = se(), p = Xe(), [m, s] = g("list"), [k, q] = g(c ?? null), [x, $] = g("all"), [d, i] = g(1), [u,
|
|
213
|
+
const n = se(), p = Xe(), [m, s] = g("list"), [k, q] = g(c ?? null), [x, $] = g("all"), [d, i] = g(1), [u, y] = g(null), h = L({
|
|
213
214
|
queryKey: ["collection-import-jobs"],
|
|
214
215
|
// The endpoint returns every job the caller may see, so the counters below
|
|
215
216
|
// are exact rather than page-scoped.
|
|
216
217
|
queryFn: () => n.request(Q("/imports")),
|
|
217
218
|
refetchInterval: (r) => {
|
|
218
|
-
var
|
|
219
|
-
return (((
|
|
219
|
+
var _;
|
|
220
|
+
return (((_ = r.state.data) == null ? void 0 : _.data) ?? []).some((R) => R.status === "pending" || R.status === "processing") ? 3e3 : !1;
|
|
220
221
|
},
|
|
221
222
|
placeholderData: (r) => r
|
|
222
|
-
}),
|
|
223
|
+
}), D = W(() => {
|
|
223
224
|
var r;
|
|
224
225
|
return ((r = h.data) == null ? void 0 : r.data) ?? [];
|
|
225
|
-
}, [(B = h.data) == null ? void 0 : B.data]),
|
|
226
|
+
}, [(B = h.data) == null ? void 0 : B.data]), C = W(() => {
|
|
226
227
|
const r = {};
|
|
227
|
-
for (const
|
|
228
|
+
for (const _ of D) r[_.status] = (r[_.status] ?? 0) + 1;
|
|
228
229
|
return r;
|
|
229
|
-
}, [
|
|
230
|
-
() =>
|
|
231
|
-
(r,
|
|
232
|
-
created: r.created + (
|
|
233
|
-
updated: r.updated + (
|
|
234
|
-
skipped: r.skipped + (
|
|
235
|
-
errors: r.errors + (
|
|
230
|
+
}, [D]), A = W(
|
|
231
|
+
() => D.reduce(
|
|
232
|
+
(r, _) => ({
|
|
233
|
+
created: r.created + (_.created_rows ?? 0),
|
|
234
|
+
updated: r.updated + (_.updated_rows ?? 0),
|
|
235
|
+
skipped: r.skipped + (_.skipped_rows ?? 0),
|
|
236
|
+
errors: r.errors + (_.error_rows ?? 0)
|
|
236
237
|
}),
|
|
237
238
|
{ created: 0, updated: 0, skipped: 0, errors: 0 }
|
|
238
239
|
),
|
|
239
|
-
[
|
|
240
|
-
), z = x === "all" ?
|
|
240
|
+
[D]
|
|
241
|
+
), z = x === "all" ? D : D.filter((r) => r.status === x), G = z.slice((d - 1) * ue, d * ue);
|
|
241
242
|
Ie(() => i(1), [x]);
|
|
242
243
|
const O = K({
|
|
243
244
|
mutationFn: (r) => n.request(dt(`/imports/${r}`)),
|
|
244
245
|
onSuccess: () => {
|
|
245
|
-
|
|
246
|
+
y(null), p.invalidateQueries({ queryKey: ["collection-import-jobs"] });
|
|
246
247
|
},
|
|
247
|
-
onError: (r) =>
|
|
248
|
+
onError: (r) => y(r.message)
|
|
248
249
|
}), Z = K({
|
|
249
250
|
mutationFn: (r) => n.request(I(`/imports/${r}/rollback`, {})),
|
|
250
251
|
onSuccess: () => {
|
|
251
|
-
|
|
252
|
+
y(null), p.invalidateQueries({ queryKey: ["collection-import-jobs"] });
|
|
252
253
|
},
|
|
253
|
-
onError: (r) =>
|
|
254
|
+
onError: (r) => y(r.message)
|
|
254
255
|
});
|
|
255
|
-
function
|
|
256
|
+
function T(r) {
|
|
256
257
|
q(r), o == null || o(r);
|
|
257
258
|
}
|
|
258
259
|
const X = [
|
|
@@ -286,7 +287,7 @@ function na({
|
|
|
286
287
|
header: "Progress",
|
|
287
288
|
className: "w-[130px]",
|
|
288
289
|
render: (r) => /* @__PURE__ */ e(
|
|
289
|
-
|
|
290
|
+
Rt,
|
|
290
291
|
{
|
|
291
292
|
processed: r.processed_rows,
|
|
292
293
|
total: r.total_rows,
|
|
@@ -339,7 +340,7 @@ function na({
|
|
|
339
340
|
key: "__actions__",
|
|
340
341
|
header: "",
|
|
341
342
|
className: "w-[44px]",
|
|
342
|
-
render: (r) => /* @__PURE__ */ e("div", { onClick: (
|
|
343
|
+
render: (r) => /* @__PURE__ */ e("div", { onClick: (_) => _.stopPropagation(), onKeyDown: (_) => _.stopPropagation(), children: /* @__PURE__ */ a(vt, { children: [
|
|
343
344
|
/* @__PURE__ */ e(kt, { asChild: !0, children: /* @__PURE__ */ e(
|
|
344
345
|
"button",
|
|
345
346
|
{
|
|
@@ -350,7 +351,7 @@ function na({
|
|
|
350
351
|
}
|
|
351
352
|
) }),
|
|
352
353
|
/* @__PURE__ */ a(wt, { align: "end", className: "text-[12.5px]", children: [
|
|
353
|
-
/* @__PURE__ */ e(xe, { onSelect: () =>
|
|
354
|
+
/* @__PURE__ */ e(xe, { onSelect: () => T(r.id), children: "View details" }),
|
|
354
355
|
/* @__PURE__ */ e(
|
|
355
356
|
At,
|
|
356
357
|
{
|
|
@@ -375,11 +376,11 @@ function na({
|
|
|
375
376
|
}
|
|
376
377
|
];
|
|
377
378
|
return m === "wizard" ? /* @__PURE__ */ e(
|
|
378
|
-
|
|
379
|
+
Et,
|
|
379
380
|
{
|
|
380
381
|
onCancel: () => s("list"),
|
|
381
382
|
onCreated: (r) => {
|
|
382
|
-
s("list"), p.invalidateQueries({ queryKey: ["collection-import-jobs"] }),
|
|
383
|
+
s("list"), p.invalidateQueries({ queryKey: ["collection-import-jobs"] }), T(r);
|
|
383
384
|
}
|
|
384
385
|
}
|
|
385
386
|
) : /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col gap-3", children: [
|
|
@@ -389,7 +390,7 @@ function na({
|
|
|
389
390
|
Oe,
|
|
390
391
|
{
|
|
391
392
|
label: "All",
|
|
392
|
-
count:
|
|
393
|
+
count: D.length,
|
|
393
394
|
active: x === "all",
|
|
394
395
|
onClick: () => $("all")
|
|
395
396
|
}
|
|
@@ -399,27 +400,27 @@ function na({
|
|
|
399
400
|
{
|
|
400
401
|
label: H[r].label,
|
|
401
402
|
dot: H[r].dot,
|
|
402
|
-
count:
|
|
403
|
+
count: C[r] ?? 0,
|
|
403
404
|
active: x === r,
|
|
404
405
|
onClick: () => $(x === r ? "all" : r)
|
|
405
406
|
},
|
|
406
407
|
r
|
|
407
408
|
)),
|
|
408
409
|
/* @__PURE__ */ a("div", { className: "ml-auto flex items-stretch divide-x divide-slate-200 dark:divide-border", children: [
|
|
409
|
-
/* @__PURE__ */ e(te, { label: "Records created", value: P(
|
|
410
|
-
/* @__PURE__ */ e(te, { label: "Records updated", value: P(
|
|
411
|
-
/* @__PURE__ */ e(te, { label: "Skipped", value: P(
|
|
410
|
+
/* @__PURE__ */ e(te, { label: "Records created", value: P(A.created) }),
|
|
411
|
+
/* @__PURE__ */ e(te, { label: "Records updated", value: P(A.updated) }),
|
|
412
|
+
/* @__PURE__ */ e(te, { label: "Skipped", value: P(A.skipped) }),
|
|
412
413
|
/* @__PURE__ */ e(
|
|
413
414
|
te,
|
|
414
415
|
{
|
|
415
416
|
label: "Row errors",
|
|
416
|
-
value: P(
|
|
417
|
-
tone:
|
|
417
|
+
value: P(A.errors),
|
|
418
|
+
tone: A.errors > 0 ? "red" : void 0
|
|
418
419
|
}
|
|
419
420
|
)
|
|
420
421
|
] })
|
|
421
422
|
] }),
|
|
422
|
-
|
|
423
|
+
D.length === 0 && !h.isLoading ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-slate-300 bg-white px-6 py-12 dark:border-border dark:bg-card", children: /* @__PURE__ */ a("div", { className: "max-w-[58ch]", children: [
|
|
423
424
|
/* @__PURE__ */ e(Ye, { className: "h-5 w-5 text-slate-300" }),
|
|
424
425
|
/* @__PURE__ */ e("h3", { className: "mt-3 text-[15px] font-semibold text-slate-900 dark:text-foreground", children: "No collection imports yet" }),
|
|
425
426
|
/* @__PURE__ */ e("p", { className: "mt-1.5 text-[12.5px] leading-relaxed text-slate-500 dark:text-muted-foreground", children: "This is the row-by-row importer: a CSV's columns are mapped onto a collection's fields, and each row is created or updated through the normal item API — so validation, hooks and permissions all apply. Use it when you want records, not a staging table." }),
|
|
@@ -438,7 +439,7 @@ function na({
|
|
|
438
439
|
limit: ue,
|
|
439
440
|
onPageChange: i,
|
|
440
441
|
isLoading: h.isLoading,
|
|
441
|
-
onRowClick: (r) =>
|
|
442
|
+
onRowClick: (r) => T(r.id),
|
|
442
443
|
nowrapCells: !0,
|
|
443
444
|
minBodyHeight: 280,
|
|
444
445
|
emptyMessage: "No import jobs match this filter.",
|
|
@@ -449,7 +450,7 @@ function na({
|
|
|
449
450
|
] })
|
|
450
451
|
}
|
|
451
452
|
) }),
|
|
452
|
-
/* @__PURE__ */ e(
|
|
453
|
+
/* @__PURE__ */ e(Lt, { jobId: k, onClose: () => T(null) })
|
|
453
454
|
] });
|
|
454
455
|
}
|
|
455
456
|
function ee({ n: c }) {
|
|
@@ -496,50 +497,50 @@ function Oe({
|
|
|
496
497
|
}
|
|
497
498
|
);
|
|
498
499
|
}
|
|
499
|
-
function
|
|
500
|
+
function Et({
|
|
500
501
|
onCancel: c,
|
|
501
502
|
onCreated: o
|
|
502
503
|
}) {
|
|
503
504
|
var ye, _e, Ce, Se;
|
|
504
|
-
const n = se(), p =
|
|
505
|
+
const n = se(), p = Te(null), [m, s] = g(0), [k, q] = g(""), [x, $] = g({}), [d, i] = g(""), [u, y] = g(""), [h, D] = g(""), [C, A] = g({}), [z, G] = g({}), [O, Z] = g("skip"), [T, X] = g(""), [B, r] = g(!1), [_, R] = g(null), [ze, le] = g(!1), [Ue, Ke] = g(null), be = Te(null), { headers: S, rows: fe, rowCount: ne } = W(() => Ft(k), [k]);
|
|
505
506
|
Ie(() => {
|
|
506
|
-
if (!h ||
|
|
507
|
-
const t = `${h}|${
|
|
508
|
-
be.current !== t && (be.current = t, n.request(I("/imports/mappings/lookup", { collection: h, headers:
|
|
507
|
+
if (!h || S.length === 0) return;
|
|
508
|
+
const t = `${h}|${S.join("")}`;
|
|
509
|
+
be.current !== t && (be.current = t, n.request(I("/imports/mappings/lookup", { collection: h, headers: S })).then((l) => {
|
|
509
510
|
const b = l.data;
|
|
510
|
-
b &&
|
|
511
|
+
b && A((w) => {
|
|
511
512
|
if (Object.values(w).some((f) => f == null ? void 0 : f.trim())) return w;
|
|
512
513
|
const M = {};
|
|
513
|
-
for (const f of
|
|
514
|
+
for (const f of S) b.column_map[f] && (M[f] = b.column_map[f]);
|
|
514
515
|
return Object.keys(M).length === 0 ? w : (Ke(
|
|
515
516
|
b.updated_at ? `Applied your saved mapping from ${ct(b.updated_at)}` : "Applied your saved mapping"
|
|
516
517
|
), b.id_field && X((f) => f || b.id_field || ""), b.duplicate_strategy && Z((f) => f === "skip" && b.duplicate_strategy || f), M);
|
|
517
518
|
});
|
|
518
519
|
}).catch(() => {
|
|
519
520
|
}));
|
|
520
|
-
}, [h,
|
|
521
|
+
}, [h, S, n]);
|
|
521
522
|
const ge = L({
|
|
522
523
|
queryKey: [
|
|
523
524
|
"import-diff-preview",
|
|
524
525
|
h,
|
|
525
|
-
|
|
526
|
+
T,
|
|
526
527
|
O,
|
|
527
528
|
k.length,
|
|
528
|
-
JSON.stringify(
|
|
529
|
+
JSON.stringify(C)
|
|
529
530
|
],
|
|
530
531
|
queryFn: () => n.request(
|
|
531
532
|
I("/imports/preview", {
|
|
532
533
|
collection: h,
|
|
533
534
|
csv_data: k,
|
|
534
|
-
column_map:
|
|
535
|
-
id_field:
|
|
535
|
+
column_map: C,
|
|
536
|
+
id_field: T || null,
|
|
536
537
|
duplicate_strategy: O
|
|
537
538
|
})
|
|
538
539
|
),
|
|
539
540
|
enabled: m === 3 && !!h && !!k,
|
|
540
541
|
staleTime: 3e4,
|
|
541
542
|
retry: !1
|
|
542
|
-
}),
|
|
543
|
+
}), N = (ye = ge.data) == null ? void 0 : ye.data, Qe = L({
|
|
543
544
|
queryKey: ["import-collections"],
|
|
544
545
|
queryFn: () => n.request(Q("/collections")),
|
|
545
546
|
staleTime: 6e4
|
|
@@ -552,7 +553,7 @@ function Ot({
|
|
|
552
553
|
).catch(() => /* @__PURE__ */ new Set()),
|
|
553
554
|
staleTime: 5 * 6e4,
|
|
554
555
|
retry: !1
|
|
555
|
-
}), je =
|
|
556
|
+
}), je = Dt(
|
|
556
557
|
((_e = Qe.data) == null ? void 0 : _e.data) ?? [],
|
|
557
558
|
Be.data,
|
|
558
559
|
h
|
|
@@ -590,16 +591,16 @@ function Ot({
|
|
|
590
591
|
mutationFn: () => n.request(
|
|
591
592
|
I("/ai/map-columns", {
|
|
592
593
|
collection: h,
|
|
593
|
-
columns:
|
|
594
|
+
columns: S,
|
|
594
595
|
sample_rows: fe.slice(0, 5)
|
|
595
596
|
})
|
|
596
597
|
),
|
|
597
598
|
onSuccess: (t) => {
|
|
598
599
|
var M;
|
|
599
|
-
const l = ((M = t.data) == null ? void 0 : M.mappings) ?? t.mappings ?? [], b = { ...
|
|
600
|
+
const l = ((M = t.data) == null ? void 0 : M.mappings) ?? t.mappings ?? [], b = { ...C }, w = {};
|
|
600
601
|
for (const f of l)
|
|
601
|
-
|
|
602
|
-
|
|
602
|
+
S.includes(f.column) && (b[f.column] = f.field ?? "", f.field && (w[f.column] = f.confidence ?? 0));
|
|
603
|
+
A(b), G(w), R(null);
|
|
603
604
|
},
|
|
604
605
|
onError: (t) => R(
|
|
605
606
|
t.status === 503 ? "AI mapping needs an Anthropic API key — add one in Settings, or map the columns by hand." : t.message
|
|
@@ -609,10 +610,10 @@ function Ot({
|
|
|
609
610
|
I("/imports", {
|
|
610
611
|
collection: h,
|
|
611
612
|
csv_data: k,
|
|
612
|
-
column_map:
|
|
613
|
+
column_map: C,
|
|
613
614
|
transforms: Object.fromEntries(Object.entries(x).filter(([, t]) => t)),
|
|
614
615
|
duplicate_strategy: O,
|
|
615
|
-
id_field:
|
|
616
|
+
id_field: T || void 0,
|
|
616
617
|
file_name: d || "import.csv",
|
|
617
618
|
through_items: B
|
|
618
619
|
})
|
|
@@ -621,7 +622,7 @@ function Ot({
|
|
|
621
622
|
onError: (t) => R(t.message)
|
|
622
623
|
});
|
|
623
624
|
function ke(t, l) {
|
|
624
|
-
|
|
625
|
+
A((b) => ({ ...b, [t]: l })), z[t] !== void 0 && G((b) => {
|
|
625
626
|
const w = { ...b };
|
|
626
627
|
return delete w[t], w;
|
|
627
628
|
});
|
|
@@ -642,14 +643,14 @@ function Ot({
|
|
|
642
643
|
const He = E === 0 ? "empty" : Pe / E > 0.9 ? "number" : $e / E > 0.9 ? "date" : qe / E > 0.9 ? "boolean" : "text";
|
|
643
644
|
w[M] = { fill: Math.round(E / b.length * 100), guess: He };
|
|
644
645
|
}), w;
|
|
645
|
-
}, [k]), me =
|
|
646
|
+
}, [k]), me = S.filter((t) => {
|
|
646
647
|
var l;
|
|
647
|
-
return (l =
|
|
648
|
-
}).length, Ne = Ue, We = m === 0 ?
|
|
648
|
+
return (l = C[t]) == null ? void 0 : l.trim();
|
|
649
|
+
}).length, Ne = Ue, We = m === 0 ? S.length > 0 : m === 1 ? !!h && me > 0 : !0;
|
|
649
650
|
return /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col gap-4", children: [
|
|
650
651
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
651
652
|
/* @__PURE__ */ a(F, { variant: "ghost", size: "sm", className: "h-7 px-2", onClick: c, children: [
|
|
652
|
-
/* @__PURE__ */ e(
|
|
653
|
+
/* @__PURE__ */ e(De, { className: "h-3.5 w-3.5" }),
|
|
653
654
|
" Back to jobs"
|
|
654
655
|
] }),
|
|
655
656
|
/* @__PURE__ */ e("ol", { className: "flex items-center gap-1.5", children: he.map((t, l) => /* @__PURE__ */ a("li", { className: "flex items-center gap-1.5", children: [
|
|
@@ -732,7 +733,7 @@ function Ot({
|
|
|
732
733
|
Re,
|
|
733
734
|
{
|
|
734
735
|
value: u,
|
|
735
|
-
onChange: (t) =>
|
|
736
|
+
onChange: (t) => y(t.target.value),
|
|
736
737
|
placeholder: "https://example.com/data.csv",
|
|
737
738
|
className: "h-8 font-mono text-[12px]"
|
|
738
739
|
}
|
|
@@ -771,17 +772,17 @@ val1,val2,val3`,
|
|
|
771
772
|
}
|
|
772
773
|
)
|
|
773
774
|
] }),
|
|
774
|
-
|
|
775
|
+
S.length > 0 && /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
775
776
|
/* @__PURE__ */ a("p", { className: "text-[12px] text-slate-600 dark:text-muted-foreground", children: [
|
|
776
777
|
/* @__PURE__ */ e("span", { className: "font-semibold text-slate-900 dark:text-foreground", children: P(ne) }),
|
|
777
778
|
" ",
|
|
778
779
|
"data rows ×",
|
|
779
780
|
" ",
|
|
780
|
-
/* @__PURE__ */ e("span", { className: "font-semibold text-slate-900 dark:text-foreground", children:
|
|
781
|
+
/* @__PURE__ */ e("span", { className: "font-semibold text-slate-900 dark:text-foreground", children: S.length }),
|
|
781
782
|
" ",
|
|
782
783
|
"columns"
|
|
783
784
|
] }),
|
|
784
|
-
/* @__PURE__ */ e(
|
|
785
|
+
/* @__PURE__ */ e(It, { headers: S, rows: fe })
|
|
785
786
|
] })
|
|
786
787
|
] }),
|
|
787
788
|
m === 1 && // Bounded width: a mapping row is a form field, and stretching the
|
|
@@ -795,7 +796,7 @@ val1,val2,val3`,
|
|
|
795
796
|
Y,
|
|
796
797
|
{
|
|
797
798
|
value: h,
|
|
798
|
-
onChange:
|
|
799
|
+
onChange: D,
|
|
799
800
|
options: je,
|
|
800
801
|
placeholder: "Choose a collection…",
|
|
801
802
|
wide: !0
|
|
@@ -809,7 +810,7 @@ val1,val2,val3`,
|
|
|
809
810
|
variant: "outline",
|
|
810
811
|
size: "sm",
|
|
811
812
|
className: "h-8",
|
|
812
|
-
disabled: !h ||
|
|
813
|
+
disabled: !h || S.length === 0 || ie.isPending,
|
|
813
814
|
onClick: () => ie.mutate(),
|
|
814
815
|
children: [
|
|
815
816
|
ie.isPending ? /* @__PURE__ */ e(pe, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(at, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
|
|
@@ -823,7 +824,7 @@ val1,val2,val3`,
|
|
|
823
824
|
/* @__PURE__ */ e("th", { className: "w-[45%] border-b border-slate-200 px-3 py-1.5 text-left text-[10.5px] font-medium uppercase tracking-wide text-slate-400 dark:border-border", children: "CSV column" }),
|
|
824
825
|
/* @__PURE__ */ e("th", { className: "border-b border-slate-200 px-3 py-1.5 text-left text-[10.5px] font-medium uppercase tracking-wide text-slate-400 dark:border-border", children: "Collection field" })
|
|
825
826
|
] }) }),
|
|
826
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
827
|
+
/* @__PURE__ */ e("tbody", { children: S.map((t) => /* @__PURE__ */ a(
|
|
827
828
|
"tr",
|
|
828
829
|
{
|
|
829
830
|
className: "border-b border-slate-100 last:border-b-0 dark:border-border/60",
|
|
@@ -852,25 +853,25 @@ val1,val2,val3`,
|
|
|
852
853
|
/* @__PURE__ */ e("div", { className: "w-[220px]", children: Je.length > 0 ? /* @__PURE__ */ e(
|
|
853
854
|
Y,
|
|
854
855
|
{
|
|
855
|
-
value:
|
|
856
|
+
value: C[t] ?? "",
|
|
856
857
|
onChange: (l) => ke(t, l),
|
|
857
858
|
options: [
|
|
858
859
|
{ value: "", label: "Skip this column" },
|
|
859
|
-
...Ve(
|
|
860
|
+
...Ve(C[t])
|
|
860
861
|
],
|
|
861
862
|
placeholder: "Skip this column"
|
|
862
863
|
}
|
|
863
864
|
) : /* @__PURE__ */ e(
|
|
864
865
|
Re,
|
|
865
866
|
{
|
|
866
|
-
value:
|
|
867
|
+
value: C[t] ?? "",
|
|
867
868
|
onChange: (l) => ke(t, l.target.value),
|
|
868
869
|
placeholder: "field_name",
|
|
869
870
|
className: "h-8 font-mono text-[12px]"
|
|
870
871
|
}
|
|
871
872
|
) }),
|
|
872
|
-
z[t] !== void 0 &&
|
|
873
|
-
|
|
873
|
+
z[t] !== void 0 && C[t] && /* @__PURE__ */ e(Ot, { confidence: z[t] }),
|
|
874
|
+
C[t] && /* @__PURE__ */ e("div", { className: "w-[120px]", children: /* @__PURE__ */ e(
|
|
874
875
|
Y,
|
|
875
876
|
{
|
|
876
877
|
value: x[t] ?? "",
|
|
@@ -887,7 +888,7 @@ val1,val2,val3`,
|
|
|
887
888
|
}
|
|
888
889
|
) })
|
|
889
890
|
] }),
|
|
890
|
-
ve(
|
|
891
|
+
ve(C[t]) && /* @__PURE__ */ e("p", { className: "mt-1 text-[11px] text-slate-500 dark:text-muted-foreground", children: ve(C[t]) })
|
|
891
892
|
] })
|
|
892
893
|
]
|
|
893
894
|
},
|
|
@@ -897,7 +898,7 @@ val1,val2,val3`,
|
|
|
897
898
|
/* @__PURE__ */ a("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
898
899
|
me,
|
|
899
900
|
" of ",
|
|
900
|
-
|
|
901
|
+
S.length,
|
|
901
902
|
" columns mapped — unmapped columns are ignored.",
|
|
902
903
|
Ne && /* @__PURE__ */ e("span", { className: "ml-1.5 rounded bg-sky-500/10 px-1.5 py-0.5 text-[10.5px] font-medium text-sky-700 dark:text-sky-400", children: Ne })
|
|
903
904
|
] })
|
|
@@ -940,7 +941,7 @@ val1,val2,val3`,
|
|
|
940
941
|
/* @__PURE__ */ e(
|
|
941
942
|
Y,
|
|
942
943
|
{
|
|
943
|
-
value:
|
|
944
|
+
value: T,
|
|
944
945
|
onChange: X,
|
|
945
946
|
options: [
|
|
946
947
|
{ value: "", label: "Always create new records" },
|
|
@@ -959,27 +960,27 @@ val1,val2,val3`,
|
|
|
959
960
|
] }),
|
|
960
961
|
m === 3 && /* @__PURE__ */ a("div", { className: "max-w-[620px] space-y-4", children: [
|
|
961
962
|
ge.isLoading && /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "Comparing against the live data…" }),
|
|
962
|
-
|
|
963
|
+
N && /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
963
964
|
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: [
|
|
964
965
|
[
|
|
965
966
|
{
|
|
966
967
|
label: "new",
|
|
967
|
-
n:
|
|
968
|
+
n: N.new,
|
|
968
969
|
cls: "border-emerald-300 text-emerald-700 dark:border-emerald-500/40 dark:text-emerald-400"
|
|
969
970
|
},
|
|
970
971
|
{
|
|
971
972
|
label: "changed",
|
|
972
|
-
n:
|
|
973
|
+
n: N.changed,
|
|
973
974
|
cls: "border-amber-300 text-amber-700 dark:border-amber-500/40 dark:text-amber-400"
|
|
974
975
|
},
|
|
975
976
|
{
|
|
976
|
-
label:
|
|
977
|
-
n:
|
|
977
|
+
label: N.conflicts === 1 ? "conflict" : "conflicts",
|
|
978
|
+
n: N.conflicts,
|
|
978
979
|
cls: "border-red-300 text-red-700 dark:border-red-500/40 dark:text-red-400"
|
|
979
980
|
},
|
|
980
981
|
{
|
|
981
982
|
label: "unchanged",
|
|
982
|
-
n:
|
|
983
|
+
n: N.unchanged,
|
|
983
984
|
cls: "border-slate-200 text-slate-500 dark:border-border dark:text-slate-400"
|
|
984
985
|
}
|
|
985
986
|
].map((t) => /* @__PURE__ */ a(
|
|
@@ -997,13 +998,13 @@ val1,val2,val3`,
|
|
|
997
998
|
},
|
|
998
999
|
t.label
|
|
999
1000
|
)),
|
|
1000
|
-
|
|
1001
|
+
N.truncated && /* @__PURE__ */ a("span", { className: "self-center text-[11px] text-slate-400", children: [
|
|
1001
1002
|
"(first ",
|
|
1002
|
-
P(
|
|
1003
|
+
P(N.total),
|
|
1003
1004
|
" rows scanned)"
|
|
1004
1005
|
] })
|
|
1005
1006
|
] }),
|
|
1006
|
-
|
|
1007
|
+
N.diffs.length > 0 && /* @__PURE__ */ e("div", { className: "max-h-56 overflow-y-auto rounded-md border border-slate-200 dark:border-border", children: N.diffs.map((t) => /* @__PURE__ */ a(
|
|
1007
1008
|
"div",
|
|
1008
1009
|
{
|
|
1009
1010
|
className: "border-b border-slate-100 px-3 py-2 text-[12px] last:border-b-0 dark:border-border/60",
|
|
@@ -1040,17 +1041,18 @@ val1,val2,val3`,
|
|
|
1040
1041
|
},
|
|
1041
1042
|
`${t.row}-${t.id}`
|
|
1042
1043
|
)) }),
|
|
1043
|
-
|
|
1044
|
-
|
|
1044
|
+
N.conflicts > 0 && /* @__PURE__ */ e("p", { className: "text-[11.5px] text-red-600 dark:text-red-400", children: "Conflicts need a look before you start — they are rows the import will silently drop or resolve by last-write-wins." }),
|
|
1045
|
+
N.duplicates && /* @__PURE__ */ e(Mt, { dup: N.duplicates }),
|
|
1046
|
+
(N.link_error_rows ?? 0) > 0 && /* @__PURE__ */ a("div", { className: "rounded-md border border-red-200 bg-red-50 px-3 py-2 dark:border-red-500/30 dark:bg-red-500/10", children: [
|
|
1045
1047
|
/* @__PURE__ */ a("p", { className: "text-[12px] font-medium text-red-700 dark:text-red-300", children: [
|
|
1046
|
-
P(
|
|
1048
|
+
P(N.link_error_rows ?? 0),
|
|
1047
1049
|
" ",
|
|
1048
|
-
|
|
1050
|
+
N.link_error_rows === 1 ? "row names" : "rows name",
|
|
1049
1051
|
" a record that does not exist — ",
|
|
1050
|
-
|
|
1052
|
+
N.link_error_rows === 1 ? "it" : "they",
|
|
1051
1053
|
" will not be imported"
|
|
1052
1054
|
] }),
|
|
1053
|
-
/* @__PURE__ */ e("ul", { className: "mt-1 max-h-32 space-y-0.5 overflow-y-auto text-[11.5px] text-red-700 dark:text-red-300", children: (
|
|
1055
|
+
/* @__PURE__ */ e("ul", { className: "mt-1 max-h-32 space-y-0.5 overflow-y-auto text-[11.5px] text-red-700 dark:text-red-300", children: (N.link_problems ?? []).map((t) => /* @__PURE__ */ a("li", { children: [
|
|
1054
1056
|
/* @__PURE__ */ a("span", { className: "text-red-500/80 dark:text-red-400/70", children: [
|
|
1055
1057
|
"Row ",
|
|
1056
1058
|
t.row,
|
|
@@ -1065,15 +1067,15 @@ val1,val2,val3`,
|
|
|
1065
1067
|
{ label: "File", value: d || "pasted.csv", mono: !0 },
|
|
1066
1068
|
{ label: "Collection", value: h, mono: !0 },
|
|
1067
1069
|
{ label: "Data rows", value: P(ne) },
|
|
1068
|
-
{ label: "Mapped columns", value: `${me} of ${
|
|
1070
|
+
{ label: "Mapped columns", value: `${me} of ${S.length}` },
|
|
1069
1071
|
{
|
|
1070
1072
|
label: "Duplicates",
|
|
1071
1073
|
value: O === "skip" ? "Skipped" : O === "overwrite" ? "Overwritten" : "Merged"
|
|
1072
1074
|
},
|
|
1073
1075
|
{
|
|
1074
1076
|
label: "Matched on",
|
|
1075
|
-
value:
|
|
1076
|
-
mono: !!
|
|
1077
|
+
value: T || "nothing — every row is new",
|
|
1078
|
+
mono: !!T
|
|
1077
1079
|
}
|
|
1078
1080
|
].map((t) => /* @__PURE__ */ a(
|
|
1079
1081
|
"div",
|
|
@@ -1108,10 +1110,10 @@ val1,val2,val3`,
|
|
|
1108
1110
|
] }),
|
|
1109
1111
|
/* @__PURE__ */ a("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
1110
1112
|
m > 0 && /* @__PURE__ */ a(F, { variant: "ghost", size: "sm", onClick: () => s((t) => t - 1), children: [
|
|
1111
|
-
/* @__PURE__ */ e(
|
|
1113
|
+
/* @__PURE__ */ e(De, { className: "h-3.5 w-3.5" }),
|
|
1112
1114
|
" Back"
|
|
1113
1115
|
] }),
|
|
1114
|
-
|
|
1116
|
+
_ && /* @__PURE__ */ e("p", { className: "text-[12px] text-red-600 dark:text-red-400", children: _ }),
|
|
1115
1117
|
/* @__PURE__ */ a("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
1116
1118
|
/* @__PURE__ */ e(F, { variant: "ghost", size: "sm", onClick: c, children: "Cancel" }),
|
|
1117
1119
|
m < he.length - 1 ? /* @__PURE__ */ a(F, { size: "sm", disabled: !We, onClick: () => s((t) => t + 1), children: [
|
|
@@ -1125,7 +1127,7 @@ val1,val2,val3`,
|
|
|
1125
1127
|
] })
|
|
1126
1128
|
] });
|
|
1127
1129
|
}
|
|
1128
|
-
function
|
|
1130
|
+
function It({ headers: c, rows: o }) {
|
|
1129
1131
|
return /* @__PURE__ */ e("div", { className: "overflow-x-auto rounded-md border border-slate-200 dark:border-border", children: /* @__PURE__ */ a("table", { className: "w-full border-collapse", children: [
|
|
1130
1132
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "bg-slate-50 dark:bg-muted/40", children: c.map((n) => /* @__PURE__ */ e(
|
|
1131
1133
|
"th",
|
|
@@ -1149,15 +1151,15 @@ function Et({ headers: c, rows: o }) {
|
|
|
1149
1151
|
)) })
|
|
1150
1152
|
] }) });
|
|
1151
1153
|
}
|
|
1152
|
-
function
|
|
1154
|
+
function Lt({ jobId: c, onClose: o }) {
|
|
1153
1155
|
var x, $;
|
|
1154
1156
|
const n = ot(), p = se(), s = (x = L({
|
|
1155
1157
|
queryKey: ["collection-import-job", c],
|
|
1156
1158
|
queryFn: () => p.request(Q(`/imports/${c}`)),
|
|
1157
1159
|
enabled: !!c,
|
|
1158
1160
|
refetchInterval: (d) => {
|
|
1159
|
-
var i, u,
|
|
1160
|
-
return ((u = (i = d.state.data) == null ? void 0 : i.data) == null ? void 0 : u.status) === "processing" || ((h = (
|
|
1161
|
+
var i, u, y, h;
|
|
1162
|
+
return ((u = (i = d.state.data) == null ? void 0 : i.data) == null ? void 0 : u.status) === "processing" || ((h = (y = d.state.data) == null ? void 0 : y.data) == null ? void 0 : h.status) === "pending" ? 2e3 : !1;
|
|
1161
1163
|
}
|
|
1162
1164
|
}).data) == null ? void 0 : x.data, k = Array.isArray(s == null ? void 0 : s.errors) ? s.errors : [], q = s != null && s.total_rows ? Math.min(100, Math.round((s.processed_rows ?? 0) / s.total_rows * 100)) : (s == null ? void 0 : s.status) === "complete" ? 100 : 0;
|
|
1163
1165
|
return /* @__PURE__ */ e(St, { open: !!c, onOpenChange: (d) => !d && o(), children: /* @__PURE__ */ e(Pt, { side: "right", className: "w-[min(560px,94vw)] p-0 sm:max-w-none", children: s ? /* @__PURE__ */ a("div", { className: "flex h-full flex-col", children: [
|
|
@@ -1283,11 +1285,11 @@ function It({ jobId: c, onClose: o }) {
|
|
|
1283
1285
|
]
|
|
1284
1286
|
}
|
|
1285
1287
|
) }),
|
|
1286
|
-
k.length > 0 && /* @__PURE__ */ e(
|
|
1288
|
+
k.length > 0 && /* @__PURE__ */ e(zt, { jobId: String(s.id), errors: k })
|
|
1287
1289
|
] })
|
|
1288
1290
|
] }) : /* @__PURE__ */ e("div", { className: "p-5 text-[12.5px] text-slate-400", children: "Loading job…" }) }) });
|
|
1289
1291
|
}
|
|
1290
|
-
function
|
|
1292
|
+
function zt({
|
|
1291
1293
|
jobId: c,
|
|
1292
1294
|
errors: o
|
|
1293
1295
|
}) {
|
|
@@ -1300,7 +1302,7 @@ function Lt({
|
|
|
1300
1302
|
}), x = q ?? [], $ = x[0] ? Object.keys(x[0].values) : [], d = K({
|
|
1301
1303
|
mutationFn: ({ row: i, values: u }) => n.request(I(`/imports/${c}/repair-row`, { values: u })).then(() => i),
|
|
1302
1304
|
onSuccess: (i) => k((u) => ({ ...u, [i]: "ok" })),
|
|
1303
|
-
onError: (i, u) => k((
|
|
1305
|
+
onError: (i, u) => k((y) => ({ ...y, [u.row]: it(i, "The row was not created") }))
|
|
1304
1306
|
});
|
|
1305
1307
|
return x.length === 0 ? /* @__PURE__ */ a("section", { children: [
|
|
1306
1308
|
/* @__PURE__ */ a("h3", { className: "mb-1.5 text-[11.5px] font-semibold text-red-700 dark:text-red-400", children: [
|
|
@@ -1319,7 +1321,7 @@ function Lt({
|
|
|
1319
1321
|
":"
|
|
1320
1322
|
] }),
|
|
1321
1323
|
" ",
|
|
1322
|
-
|
|
1324
|
+
Ae(i.error)
|
|
1323
1325
|
] })
|
|
1324
1326
|
},
|
|
1325
1327
|
`${i.row}-${i.error}`
|
|
@@ -1337,7 +1339,7 @@ function Lt({
|
|
|
1337
1339
|
/* @__PURE__ */ e("th", { className: "px-2 py-1" })
|
|
1338
1340
|
] }) }),
|
|
1339
1341
|
/* @__PURE__ */ e("tbody", { children: x.map((i) => {
|
|
1340
|
-
const u = p[i.row] ?? i.values,
|
|
1342
|
+
const u = p[i.row] ?? i.values, y = s[i.row];
|
|
1341
1343
|
return /* @__PURE__ */ a(
|
|
1342
1344
|
"tr",
|
|
1343
1345
|
{
|
|
@@ -1345,18 +1347,18 @@ function Lt({
|
|
|
1345
1347
|
children: [
|
|
1346
1348
|
/* @__PURE__ */ a("td", { className: "px-2 py-1 font-mono tabular-nums text-slate-400", children: [
|
|
1347
1349
|
i.row,
|
|
1348
|
-
/* @__PURE__ */ e("p", { className: "max-w-[120px] whitespace-normal text-[10px] text-red-500", children:
|
|
1350
|
+
/* @__PURE__ */ e("p", { className: "max-w-[120px] whitespace-normal text-[10px] text-red-500", children: Ae(i.error) })
|
|
1349
1351
|
] }),
|
|
1350
1352
|
$.map((h) => /* @__PURE__ */ e("td", { className: "px-1 py-1", children: /* @__PURE__ */ e(
|
|
1351
1353
|
"input",
|
|
1352
1354
|
{
|
|
1353
1355
|
value: String(u[h] ?? ""),
|
|
1354
|
-
disabled:
|
|
1355
|
-
onChange: (
|
|
1356
|
+
disabled: y === "ok",
|
|
1357
|
+
onChange: (D) => m((C) => ({ ...C, [i.row]: { ...u, [h]: D.target.value } })),
|
|
1356
1358
|
className: "h-6 w-full min-w-[80px] rounded border border-slate-200 bg-background px-1 text-[11px] dark:border-border"
|
|
1357
1359
|
}
|
|
1358
1360
|
) }, h)),
|
|
1359
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-1", children:
|
|
1361
|
+
/* @__PURE__ */ e("td", { className: "px-2 py-1", children: y === "ok" ? /* @__PURE__ */ e("span", { className: "text-[10.5px] font-medium text-emerald-600", children: "✓ Created" }) : /* @__PURE__ */ a("div", { children: [
|
|
1360
1362
|
/* @__PURE__ */ e(
|
|
1361
1363
|
"button",
|
|
1362
1364
|
{
|
|
@@ -1367,7 +1369,7 @@ function Lt({
|
|
|
1367
1369
|
children: "Resubmit"
|
|
1368
1370
|
}
|
|
1369
1371
|
),
|
|
1370
|
-
|
|
1372
|
+
y && y !== "ok" && /* @__PURE__ */ e("p", { className: "max-w-[140px] whitespace-normal text-[9.5px] text-red-500", children: y })
|
|
1371
1373
|
] }) })
|
|
1372
1374
|
]
|
|
1373
1375
|
},
|
|
@@ -1378,7 +1380,7 @@ function Lt({
|
|
|
1378
1380
|
] });
|
|
1379
1381
|
}
|
|
1380
1382
|
export {
|
|
1381
|
-
|
|
1383
|
+
da as CollectionImportPanel,
|
|
1382
1384
|
Tt as ROLLBACK_QUESTION,
|
|
1383
1385
|
At as RollbackJobItem
|
|
1384
1386
|
};
|