@nivaro/react 0.3.66 → 0.3.68

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.
Files changed (41) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +15 -1
  4. package/dist/index.js +836 -835
  5. package/dist/shared/components/ActivityEntry.js +28 -28
  6. package/dist/shared/components/CollectionBrowserView.js +584 -585
  7. package/dist/shared/components/ConformanceView.js +34 -34
  8. package/dist/shared/components/ItemEditForm.js +1758 -1758
  9. package/dist/shared/components/RecordCompare.js +149 -129
  10. package/dist/shared/components/ReportView.js +196 -196
  11. package/dist/shared/components/SlaRulesView.js +36 -36
  12. package/dist/shared/components/bulk/BulkCompareButton.js +16 -16
  13. package/dist/shared/components/chat/ChatPanel.js +484 -487
  14. package/dist/shared/components/chat/ChatViews.js +66 -66
  15. package/dist/shared/components/chat/RoomParts.js +159 -157
  16. package/dist/shared/components/help-videos/editor/StatsTab.js +48 -47
  17. package/dist/shared/components/help-videos/editor/VersionsTab.js +17 -16
  18. package/dist/shared/components/imports/CollectionImportPanel.js +72 -72
  19. package/dist/shared/components/integrations/IntegrationObligationsView.js +199 -187
  20. package/dist/shared/components/integrations/console/EventsView.js +22 -24
  21. package/dist/shared/components/integrations/console/SubmissionRow.js +6 -13
  22. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +29 -28
  23. package/dist/shared/components/integrations/console/tone.js +22 -21
  24. package/dist/shared/components/item-edit/FieldRow.js +188 -188
  25. package/dist/shared/components/item-edit/FilePickerField.js +281 -297
  26. package/dist/shared/components/item-edit/GroupSection.js +209 -209
  27. package/dist/shared/components/item-edit/RecordInsights.js +101 -101
  28. package/dist/shared/components/item-edit/SummaryPanel.js +31 -31
  29. package/dist/shared/components/layout-editor/assist/ExplainDiff.js +12 -12
  30. package/dist/shared/components/panels/AddendumPanel.js +409 -411
  31. package/dist/shared/components/panels/BranchLanes.js +7 -7
  32. package/dist/shared/components/panels/CommentPanel.js +204 -197
  33. package/dist/shared/components/panels/PipelinePanel.js +264 -264
  34. package/dist/shared/components/panels/RecordIntegrityBanner.js +78 -78
  35. package/dist/shared/components/panels/RevisionsPanel.js +229 -229
  36. package/dist/shared/components/panels/TaskPanel.js +75 -75
  37. package/dist/shared/components/queue/QueueWorklist.js +591 -589
  38. package/dist/shared/lib/compare-value.js +73 -0
  39. package/dist/shared/lib/format-value.js +18 -17
  40. package/dist/shared/lib/utils.js +87 -80
  41. package/package.json +1 -1
@@ -1,22 +1,22 @@
1
1
  import { jsx as e, jsxs as a, Fragment as Be } from "react/jsx-runtime";
2
2
  import { useQueryClient as Je, useQuery as U, useMutation as Q } from "@tanstack/react-query";
3
3
  import { Upload as Ve, Plus as qe, ArrowLeft as Me, FileUp as je, Link2 as We, Loader2 as me, Sparkles as He, ArrowRight as $e, MoreHorizontal as Ge, Trash2 as Ze, ChevronsUpDown as Xe, Check as Ye } from "lucide-react";
4
- import { useState as x, useMemo as V, useEffect as Fe, useRef as De } from "react";
4
+ import { useState as x, useMemo as V, useEffect as Fe, useRef as Te } from "react";
5
5
  import { useNivaroClient as re, useNavigation as et } from "../../context.js";
6
6
  import { get as W, del as tt, post as I } from "../../lib/commands.js";
7
- import { errorSentence as at, rowErrorSentence as Te } from "../../lib/error-message.js";
8
- import { formatNumber as _, cn as N, formatRelative as rt, formatDateTime as te } from "../../lib/utils.js";
9
- import { DataTable as st } from "../DataTable.js";
7
+ import { errorSentence as at, rowErrorSentence as De } from "../../lib/error-message.js";
8
+ import { formatNumber as _, toLocalDateString as rt, cn as N, formatRelative as st, formatDateTime as te } from "../../lib/utils.js";
9
+ import { DataTable as lt } from "../DataTable.js";
10
10
  import { Button as F } from "../ui/button.js";
11
- import { Command as lt, CommandInput as nt, CommandList as ot, CommandEmpty as dt, CommandItem as it } from "../ui/command.js";
12
- import { DropdownMenu as ct, DropdownMenuTrigger as mt, DropdownMenuContent as pt, DropdownMenuItem as he } from "../ui/dropdown-menu.js";
11
+ import { Command as nt, CommandInput as ot, CommandList as dt, CommandEmpty as it, CommandItem as ct } from "../ui/command.js";
12
+ import { DropdownMenu as mt, DropdownMenuTrigger as pt, DropdownMenuContent as ut, DropdownMenuItem as he } from "../ui/dropdown-menu.js";
13
13
  import { Input as Re } from "../ui/input.js";
14
14
  import { Label as J } from "../ui/label.js";
15
- import { Popover as ut, PopoverTrigger as ht, PopoverContent as xt } from "../ui/popover.js";
16
- import { SimpleSelect as bt } from "../ui/SimpleSelect.js";
17
- import { Sheet as ft, SheetContent as gt } from "../ui/sheet.js";
18
- import { Switch as vt } from "../ui/switch.js";
19
- import { Textarea as Nt } from "../ui/textarea.js";
15
+ import { Popover as ht, PopoverTrigger as xt, PopoverContent as bt } from "../ui/popover.js";
16
+ import { SimpleSelect as ft } from "../ui/SimpleSelect.js";
17
+ import { Sheet as gt, SheetContent as vt } from "../ui/sheet.js";
18
+ import { Switch as Nt } from "../ui/switch.js";
19
+ import { Textarea as kt } from "../ui/textarea.js";
20
20
  const pe = 25, ue = ["Source", "Map columns", "Options", "Confirm"], j = {
21
21
  pending: { dot: "bg-slate-400", text: "text-slate-600 dark:text-slate-300", label: "Pending" },
22
22
  processing: {
@@ -30,8 +30,8 @@ const pe = 25, ue = ["Source", "Map columns", "Options", "Confirm"], j = {
30
30
  label: "Complete"
31
31
  },
32
32
  failed: { dot: "bg-red-500", text: "text-red-700 dark:text-red-400", label: "Failed" }
33
- }, kt = "Roll back this import? Created rows are deleted (to trash) and overwritten rows restored to their prior values. One-shot.";
34
- function wt({
33
+ }, wt = "Roll back this import? Created rows are deleted (to trash) and overwritten rows restored to their prior values. One-shot.";
34
+ function yt({
35
35
  disabled: o,
36
36
  rolledBack: n,
37
37
  onConfirm: l
@@ -53,7 +53,7 @@ function wt({
53
53
  i(!1), l();
54
54
  },
55
55
  children: m ? /* @__PURE__ */ a("span", { className: "block", children: [
56
- kt,
56
+ wt,
57
57
  /* @__PURE__ */ e("span", { className: "mt-1 block text-[11px] font-semibold", children: "Choose again to roll back" })
58
58
  ] }) : n ? "Rolled back" : "Roll back this import"
59
59
  }
@@ -77,7 +77,7 @@ function Ee({ status: o }) {
77
77
  n.label
78
78
  ] });
79
79
  }
80
- function yt({
80
+ function Ct({
81
81
  processed: o,
82
82
  total: n,
83
83
  failed: l
@@ -110,7 +110,7 @@ function ae(o) {
110
110
  }
111
111
  return n.push(l), n.map((i) => i.trim());
112
112
  }
113
- function Ct(o) {
113
+ function _t(o) {
114
114
  const n = o.split(/\r?\n/).filter((i) => i.trim());
115
115
  if (n.length === 0) return { headers: [], rows: [], rowCount: 0 };
116
116
  const l = ae(n[0]), m = n.slice(1, 6).map(ae);
@@ -124,8 +124,8 @@ function X({
124
124
  className: i
125
125
  }) {
126
126
  const [s, g] = x(!1), C = l.find((h) => h.value === o);
127
- return /* @__PURE__ */ a(ut, { open: s, onOpenChange: g, children: [
128
- /* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ a(
127
+ return /* @__PURE__ */ a(ht, { open: s, onOpenChange: g, children: [
128
+ /* @__PURE__ */ e(xt, { asChild: !0, children: /* @__PURE__ */ a(
129
129
  "button",
130
130
  {
131
131
  type: "button",
@@ -148,12 +148,12 @@ function X({
148
148
  ]
149
149
  }
150
150
  ) }),
151
- /* @__PURE__ */ e(xt, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ a(lt, { children: [
152
- /* @__PURE__ */ e(nt, { placeholder: "Search…", className: "h-8 text-[12px]" }),
153
- /* @__PURE__ */ a(ot, { children: [
154
- /* @__PURE__ */ e(dt, { children: "Nothing matches." }),
151
+ /* @__PURE__ */ e(bt, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ a(nt, { children: [
152
+ /* @__PURE__ */ e(ot, { placeholder: "Search…", className: "h-8 text-[12px]" }),
153
+ /* @__PURE__ */ a(dt, { children: [
154
+ /* @__PURE__ */ e(it, { children: "Nothing matches." }),
155
155
  l.map((h) => /* @__PURE__ */ a(
156
- it,
156
+ ct,
157
157
  {
158
158
  value: h.label,
159
159
  onSelect: () => {
@@ -179,7 +179,7 @@ function X({
179
179
  ] }) })
180
180
  ] });
181
181
  }
182
- function _t({ confidence: o }) {
182
+ function St({ confidence: o }) {
183
183
  const n = Math.round(o * 100), l = n >= 80 ? "text-emerald-700 dark:text-emerald-400" : n >= 50 ? "text-amber-700 dark:text-amber-400" : "text-slate-500";
184
184
  return /* @__PURE__ */ a(
185
185
  "span",
@@ -194,12 +194,12 @@ function _t({ confidence: o }) {
194
194
  }
195
195
  );
196
196
  }
197
- function Zt({
197
+ function Xt({
198
198
  initialJobId: o,
199
199
  onJobOpen: n
200
200
  }) {
201
201
  var K;
202
- const l = re(), m = Je(), [i, s] = x("list"), [g, C] = x(o ?? null), [h, T] = x("all"), [p, c] = x(1), [v, k] = x(null), u = U({
202
+ const l = re(), m = Je(), [i, s] = x("list"), [g, C] = x(o ?? null), [h, D] = x("all"), [p, c] = x(1), [v, k] = x(null), u = U({
203
203
  queryKey: ["collection-import-jobs"],
204
204
  // The endpoint returns every job the caller may see, so the counters below
205
205
  // are exact rather than page-scoped.
@@ -276,7 +276,7 @@ function Zt({
276
276
  header: "Progress",
277
277
  className: "w-[130px]",
278
278
  render: (r) => /* @__PURE__ */ e(
279
- yt,
279
+ Ct,
280
280
  {
281
281
  processed: r.processed_rows,
282
282
  total: r.total_rows,
@@ -321,7 +321,7 @@ function Zt({
321
321
  {
322
322
  className: "text-[12px] text-slate-500 dark:text-muted-foreground",
323
323
  title: te(r.created_at),
324
- children: rt(r.created_at)
324
+ children: st(r.created_at)
325
325
  }
326
326
  )
327
327
  },
@@ -329,8 +329,8 @@ function Zt({
329
329
  key: "__actions__",
330
330
  header: "",
331
331
  className: "w-[44px]",
332
- render: (r) => /* @__PURE__ */ e("div", { onClick: (w) => w.stopPropagation(), onKeyDown: (w) => w.stopPropagation(), children: /* @__PURE__ */ a(ct, { children: [
333
- /* @__PURE__ */ e(mt, { asChild: !0, children: /* @__PURE__ */ e(
332
+ render: (r) => /* @__PURE__ */ e("div", { onClick: (w) => w.stopPropagation(), onKeyDown: (w) => w.stopPropagation(), children: /* @__PURE__ */ a(mt, { children: [
333
+ /* @__PURE__ */ e(pt, { asChild: !0, children: /* @__PURE__ */ e(
334
334
  "button",
335
335
  {
336
336
  type: "button",
@@ -339,10 +339,10 @@ function Zt({
339
339
  children: /* @__PURE__ */ e(Ge, { className: "h-4 w-4" })
340
340
  }
341
341
  ) }),
342
- /* @__PURE__ */ a(pt, { align: "end", className: "text-[12.5px]", children: [
342
+ /* @__PURE__ */ a(ut, { align: "end", className: "text-[12.5px]", children: [
343
343
  /* @__PURE__ */ e(he, { onSelect: () => M(r.id), children: "View details" }),
344
344
  /* @__PURE__ */ e(
345
- wt,
345
+ yt,
346
346
  {
347
347
  disabled: r.status !== "complete" || !!r.rolled_back_at,
348
348
  rolledBack: !!r.rolled_back_at,
@@ -365,7 +365,7 @@ function Zt({
365
365
  }
366
366
  ];
367
367
  return i === "wizard" ? /* @__PURE__ */ e(
368
- St,
368
+ Pt,
369
369
  {
370
370
  onCancel: () => s("list"),
371
371
  onCreated: (r) => {
@@ -381,7 +381,7 @@ function Zt({
381
381
  label: "All",
382
382
  count: P.length,
383
383
  active: h === "all",
384
- onClick: () => T("all")
384
+ onClick: () => D("all")
385
385
  }
386
386
  ),
387
387
  Object.keys(j).map((r) => /* @__PURE__ */ e(
@@ -391,7 +391,7 @@ function Zt({
391
391
  dot: j[r].dot,
392
392
  count: S[r] ?? 0,
393
393
  active: h === r,
394
- onClick: () => T(h === r ? "all" : r)
394
+ onClick: () => D(h === r ? "all" : r)
395
395
  },
396
396
  r
397
397
  )),
@@ -418,7 +418,7 @@ function Zt({
418
418
  " Start an import"
419
419
  ] })
420
420
  ] }) }) : /* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ e(
421
- st,
421
+ lt,
422
422
  {
423
423
  columns: Z,
424
424
  rows: H,
@@ -439,7 +439,7 @@ function Zt({
439
439
  ] })
440
440
  }
441
441
  ) }),
442
- /* @__PURE__ */ e(qt, { jobId: g, onClose: () => M(null) })
442
+ /* @__PURE__ */ e(Mt, { jobId: g, onClose: () => M(null) })
443
443
  ] });
444
444
  }
445
445
  function Y({ n: o }) {
@@ -486,12 +486,12 @@ function Ae({
486
486
  }
487
487
  );
488
488
  }
489
- function St({
489
+ function Pt({
490
490
  onCancel: o,
491
491
  onCreated: n
492
492
  }) {
493
493
  var ke, we, ye, Ce;
494
- const l = re(), m = De(null), [i, s] = x(0), [g, C] = x(""), [h, T] = x({}), [p, c] = x(""), [v, k] = x(""), [u, P] = x(""), [S, A] = x({}), [O, H] = x({}), [E, G] = x("skip"), [M, Z] = x(""), [K, r] = x(!1), [w, $] = x(null), [Ie, se] = x(!1), [Oe, Le] = x(null), xe = De(null), { headers: y, rows: be, rowCount: le } = V(() => Ct(g), [g]);
494
+ const l = re(), m = Te(null), [i, s] = x(0), [g, C] = x(""), [h, D] = x({}), [p, c] = x(""), [v, k] = x(""), [u, P] = x(""), [S, A] = x({}), [O, H] = x({}), [E, G] = x("skip"), [M, Z] = x(""), [K, r] = x(!1), [w, $] = x(null), [Ie, se] = x(!1), [Oe, Le] = x(null), xe = Te(null), { headers: y, rows: be, rowCount: le } = V(() => _t(g), [g]);
495
495
  Fe(() => {
496
496
  if (!u || y.length === 0) return;
497
497
  const t = `${u}|${y.join("")}`;
@@ -502,7 +502,7 @@ function St({
502
502
  const R = {};
503
503
  for (const b of y) f.column_map[b] && (R[b] = f.column_map[b]);
504
504
  return Object.keys(R).length === 0 ? q : (Le(
505
- f.updated_at ? `Applied your saved mapping from ${new Date(f.updated_at).toLocaleDateString()}` : "Applied your saved mapping"
505
+ f.updated_at ? `Applied your saved mapping from ${rt(f.updated_at)}` : "Applied your saved mapping"
506
506
  ), f.id_field && Z((b) => b || f.id_field || ""), f.duplicate_strategy && G((b) => b === "skip" && f.duplicate_strategy || b), R);
507
507
  });
508
508
  }).catch(() => {
@@ -529,7 +529,7 @@ function St({
529
529
  enabled: i === 3 && !!u && !!g,
530
530
  staleTime: 3e4,
531
531
  retry: !1
532
- }), D = (ke = fe.data) == null ? void 0 : ke.data, ze = (((we = U({
532
+ }), T = (ke = fe.data) == null ? void 0 : ke.data, ze = (((we = U({
533
533
  queryKey: ["import-collections"],
534
534
  queryFn: () => l.request(W("/collections")),
535
535
  staleTime: 6e4
@@ -724,7 +724,7 @@ function St({
724
724
  /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
725
725
  /* @__PURE__ */ e(J, { className: "text-[11.5px]", children: "Or paste the rows" }),
726
726
  /* @__PURE__ */ e(
727
- Nt,
727
+ kt,
728
728
  {
729
729
  value: g,
730
730
  onChange: (t) => {
@@ -748,7 +748,7 @@ val1,val2,val3`,
748
748
  " ",
749
749
  "columns"
750
750
  ] }),
751
- /* @__PURE__ */ e(Pt, { headers: y, rows: be })
751
+ /* @__PURE__ */ e(qt, { headers: y, rows: be })
752
752
  ] })
753
753
  ] }),
754
754
  i === 1 && // Bounded width: a mapping row is a form field, and stretching the
@@ -834,12 +834,12 @@ val1,val2,val3`,
834
834
  className: "h-8 font-mono text-[12px]"
835
835
  }
836
836
  ) }),
837
- O[t] !== void 0 && S[t] && /* @__PURE__ */ e(_t, { confidence: O[t] }),
837
+ O[t] !== void 0 && S[t] && /* @__PURE__ */ e(St, { confidence: O[t] }),
838
838
  S[t] && /* @__PURE__ */ e("div", { className: "w-[120px]", children: /* @__PURE__ */ e(
839
839
  X,
840
840
  {
841
841
  value: h[t] ?? "",
842
- onChange: (d) => T((f) => ({ ...f, [t]: d })),
842
+ onChange: (d) => D((f) => ({ ...f, [t]: d })),
843
843
  options: [
844
844
  { value: "", label: "As-is" },
845
845
  { value: "trim", label: "Trim" },
@@ -869,7 +869,7 @@ val1,val2,val3`,
869
869
  /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
870
870
  /* @__PURE__ */ e(J, { className: "text-[11.5px]", children: "When a record already exists" }),
871
871
  /* @__PURE__ */ e(
872
- bt,
872
+ ft,
873
873
  {
874
874
  value: E,
875
875
  onChange: G,
@@ -884,7 +884,7 @@ val1,val2,val3`,
884
884
  ] }),
885
885
  /* @__PURE__ */ a("div", { className: "flex items-start gap-2.5 rounded-md border border-slate-200 bg-white px-3 py-2 dark:border-border dark:bg-card", children: [
886
886
  /* @__PURE__ */ e(
887
- vt,
887
+ Nt,
888
888
  {
889
889
  id: "csv-through-items",
890
890
  checked: K,
@@ -918,27 +918,27 @@ val1,val2,val3`,
918
918
  ] }),
919
919
  i === 3 && /* @__PURE__ */ a("div", { className: "max-w-[620px] space-y-4", children: [
920
920
  fe.isLoading && /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "Comparing against the live data…" }),
921
- D && /* @__PURE__ */ a("div", { className: "space-y-2", children: [
921
+ T && /* @__PURE__ */ a("div", { className: "space-y-2", children: [
922
922
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: [
923
923
  [
924
924
  {
925
925
  label: "new",
926
- n: D.new,
926
+ n: T.new,
927
927
  cls: "border-emerald-300 text-emerald-700 dark:border-emerald-500/40 dark:text-emerald-400"
928
928
  },
929
929
  {
930
930
  label: "changed",
931
- n: D.changed,
931
+ n: T.changed,
932
932
  cls: "border-amber-300 text-amber-700 dark:border-amber-500/40 dark:text-amber-400"
933
933
  },
934
934
  {
935
- label: D.conflicts === 1 ? "conflict" : "conflicts",
936
- n: D.conflicts,
935
+ label: T.conflicts === 1 ? "conflict" : "conflicts",
936
+ n: T.conflicts,
937
937
  cls: "border-red-300 text-red-700 dark:border-red-500/40 dark:text-red-400"
938
938
  },
939
939
  {
940
940
  label: "unchanged",
941
- n: D.unchanged,
941
+ n: T.unchanged,
942
942
  cls: "border-slate-200 text-slate-500 dark:border-border dark:text-slate-400"
943
943
  }
944
944
  ].map((t) => /* @__PURE__ */ a(
@@ -956,13 +956,13 @@ val1,val2,val3`,
956
956
  },
957
957
  t.label
958
958
  )),
959
- D.truncated && /* @__PURE__ */ a("span", { className: "self-center text-[11px] text-slate-400", children: [
959
+ T.truncated && /* @__PURE__ */ a("span", { className: "self-center text-[11px] text-slate-400", children: [
960
960
  "(first ",
961
- _(D.total),
961
+ _(T.total),
962
962
  " rows scanned)"
963
963
  ] })
964
964
  ] }),
965
- D.diffs.length > 0 && /* @__PURE__ */ e("div", { className: "max-h-56 overflow-y-auto rounded-md border border-slate-200 dark:border-border", children: D.diffs.map((t) => /* @__PURE__ */ a(
965
+ T.diffs.length > 0 && /* @__PURE__ */ e("div", { className: "max-h-56 overflow-y-auto rounded-md border border-slate-200 dark:border-border", children: T.diffs.map((t) => /* @__PURE__ */ a(
966
966
  "div",
967
967
  {
968
968
  className: "border-b border-slate-100 px-3 py-2 text-[12px] last:border-b-0 dark:border-border/60",
@@ -999,7 +999,7 @@ val1,val2,val3`,
999
999
  },
1000
1000
  `${t.row}-${t.id}`
1001
1001
  )) }),
1002
- D.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." })
1002
+ T.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." })
1003
1003
  ] }),
1004
1004
  /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-md border border-slate-200 dark:border-border", children: [
1005
1005
  { label: "File", value: p || "pasted.csv", mono: !0 },
@@ -1065,7 +1065,7 @@ val1,val2,val3`,
1065
1065
  ] })
1066
1066
  ] });
1067
1067
  }
1068
- function Pt({ headers: o, rows: n }) {
1068
+ function qt({ headers: o, rows: n }) {
1069
1069
  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: [
1070
1070
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "bg-slate-50 dark:bg-muted/40", children: o.map((l) => /* @__PURE__ */ e(
1071
1071
  "th",
@@ -1089,8 +1089,8 @@ function Pt({ headers: o, rows: n }) {
1089
1089
  )) })
1090
1090
  ] }) });
1091
1091
  }
1092
- function qt({ jobId: o, onClose: n }) {
1093
- var h, T;
1092
+ function Mt({ jobId: o, onClose: n }) {
1093
+ var h, D;
1094
1094
  const l = et(), m = re(), s = (h = U({
1095
1095
  queryKey: ["collection-import-job", o],
1096
1096
  queryFn: () => m.request(W(`/imports/${o}`)),
@@ -1100,7 +1100,7 @@ function qt({ jobId: o, onClose: n }) {
1100
1100
  return ((v = (c = p.state.data) == null ? void 0 : c.data) == null ? void 0 : v.status) === "processing" || ((u = (k = p.state.data) == null ? void 0 : k.data) == null ? void 0 : u.status) === "pending" ? 2e3 : !1;
1101
1101
  }
1102
1102
  }).data) == null ? void 0 : h.data, g = Array.isArray(s == null ? void 0 : s.errors) ? s.errors : [], C = 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;
1103
- return /* @__PURE__ */ e(ft, { open: !!o, onOpenChange: (p) => !p && n(), children: /* @__PURE__ */ e(gt, { 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: [
1103
+ return /* @__PURE__ */ e(gt, { open: !!o, onOpenChange: (p) => !p && n(), children: /* @__PURE__ */ e(vt, { 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: [
1104
1104
  /* @__PURE__ */ a("header", { className: "shrink-0 border-b border-slate-200 px-5 py-4 dark:border-border", children: [
1105
1105
  /* @__PURE__ */ e(Ee, { status: s.status }),
1106
1106
  /* @__PURE__ */ e("h2", { className: "mt-1.5 truncate font-mono text-[15px] font-semibold text-slate-900 dark:text-foreground", children: s.file_name }),
@@ -1201,7 +1201,7 @@ function qt({ jobId: o, onClose: n }) {
1201
1201
  p
1202
1202
  )) })
1203
1203
  ] }),
1204
- s.created_ids && (((T = s.created_ids) == null ? void 0 : T.length) ?? 0) > 0 && /* @__PURE__ */ e("section", { children: /* @__PURE__ */ a(
1204
+ s.created_ids && (((D = s.created_ids) == null ? void 0 : D.length) ?? 0) > 0 && /* @__PURE__ */ e("section", { children: /* @__PURE__ */ a(
1205
1205
  "button",
1206
1206
  {
1207
1207
  type: "button",
@@ -1223,11 +1223,11 @@ function qt({ jobId: o, onClose: n }) {
1223
1223
  ]
1224
1224
  }
1225
1225
  ) }),
1226
- g.length > 0 && /* @__PURE__ */ e(Mt, { jobId: String(s.id), errors: g })
1226
+ g.length > 0 && /* @__PURE__ */ e(Tt, { jobId: String(s.id), errors: g })
1227
1227
  ] })
1228
1228
  ] }) : /* @__PURE__ */ e("div", { className: "p-5 text-[12.5px] text-slate-400", children: "Loading job…" }) }) });
1229
1229
  }
1230
- function Mt({
1230
+ function Tt({
1231
1231
  jobId: o,
1232
1232
  errors: n
1233
1233
  }) {
@@ -1237,7 +1237,7 @@ function Mt({
1237
1237
  W(`/imports/${o}/failed-rows`)
1238
1238
  ).then((c) => c.data ?? []),
1239
1239
  staleTime: 3e4
1240
- }), h = C ?? [], T = h[0] ? Object.keys(h[0].values) : [], p = Q({
1240
+ }), h = C ?? [], D = h[0] ? Object.keys(h[0].values) : [], p = Q({
1241
1241
  mutationFn: ({ row: c, values: v }) => l.request(I(`/imports/${o}/repair-row`, { values: v })).then(() => c),
1242
1242
  onSuccess: (c) => g((v) => ({ ...v, [c]: "ok" })),
1243
1243
  onError: (c, v) => g((k) => ({ ...k, [v.row]: at(c, "The row was not created") }))
@@ -1259,7 +1259,7 @@ function Mt({
1259
1259
  ":"
1260
1260
  ] }),
1261
1261
  " ",
1262
- Te(c.error)
1262
+ De(c.error)
1263
1263
  ] })
1264
1264
  },
1265
1265
  `${c.row}-${c.error}`
@@ -1273,7 +1273,7 @@ function Mt({
1273
1273
  /* @__PURE__ */ e("div", { className: "max-h-[320px] overflow-auto rounded-md border border-red-200 dark:border-red-900", children: /* @__PURE__ */ a("table", { className: "w-full text-[11.5px]", children: [
1274
1274
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { className: "bg-red-50/60 text-left text-[10px] uppercase tracking-wide text-slate-400 dark:bg-red-950/30", children: [
1275
1275
  /* @__PURE__ */ e("th", { className: "px-2 py-1", children: "Row" }),
1276
- T.map((c) => /* @__PURE__ */ e("th", { className: "px-2 py-1 font-mono normal-case", children: c }, c)),
1276
+ D.map((c) => /* @__PURE__ */ e("th", { className: "px-2 py-1 font-mono normal-case", children: c }, c)),
1277
1277
  /* @__PURE__ */ e("th", { className: "px-2 py-1" })
1278
1278
  ] }) }),
1279
1279
  /* @__PURE__ */ e("tbody", { children: h.map((c) => {
@@ -1285,9 +1285,9 @@ function Mt({
1285
1285
  children: [
1286
1286
  /* @__PURE__ */ a("td", { className: "px-2 py-1 font-mono tabular-nums text-slate-400", children: [
1287
1287
  c.row,
1288
- /* @__PURE__ */ e("p", { className: "max-w-[120px] whitespace-normal text-[10px] text-red-500", children: Te(c.error) })
1288
+ /* @__PURE__ */ e("p", { className: "max-w-[120px] whitespace-normal text-[10px] text-red-500", children: De(c.error) })
1289
1289
  ] }),
1290
- T.map((u) => /* @__PURE__ */ e("td", { className: "px-1 py-1", children: /* @__PURE__ */ e(
1290
+ D.map((u) => /* @__PURE__ */ e("td", { className: "px-1 py-1", children: /* @__PURE__ */ e(
1291
1291
  "input",
1292
1292
  {
1293
1293
  value: String(v[u] ?? ""),
@@ -1318,7 +1318,7 @@ function Mt({
1318
1318
  ] });
1319
1319
  }
1320
1320
  export {
1321
- Zt as CollectionImportPanel,
1322
- kt as ROLLBACK_QUESTION,
1323
- wt as RollbackJobItem
1321
+ Xt as CollectionImportPanel,
1322
+ wt as ROLLBACK_QUESTION,
1323
+ yt as RollbackJobItem
1324
1324
  };