@arbidocs/blocks 0.4.87 → 0.4.88
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/agents/index.cjs +211 -211
- package/dist/agents/index.js +6 -6
- package/dist/chat/index.cjs +125 -125
- package/dist/chat/index.js +3 -3
- package/dist/{chunk-2EI7NCUA.cjs → chunk-2CFW2ELM.cjs} +8 -2
- package/dist/chunk-2CFW2ELM.cjs.map +1 -0
- package/dist/{chunk-OR4CO743.cjs → chunk-5YXG342J.cjs} +3 -3
- package/dist/{chunk-OR4CO743.cjs.map → chunk-5YXG342J.cjs.map} +1 -1
- package/dist/{chunk-R26OHONI.js → chunk-6S5FLMWG.js} +83 -72
- package/dist/chunk-6S5FLMWG.js.map +1 -0
- package/dist/{chunk-P5ST47VY.js → chunk-DDF5GPIJ.js} +3 -3
- package/dist/{chunk-P5ST47VY.js.map → chunk-DDF5GPIJ.js.map} +1 -1
- package/dist/{chunk-PFA43QNX.js → chunk-EWSEQEPL.js} +3 -3
- package/dist/{chunk-PFA43QNX.js.map → chunk-EWSEQEPL.js.map} +1 -1
- package/dist/{chunk-X5K5PCRJ.cjs → chunk-FNEL2BYV.cjs} +18 -18
- package/dist/{chunk-X5K5PCRJ.cjs.map → chunk-FNEL2BYV.cjs.map} +1 -1
- package/dist/{chunk-LBE36YNZ.js → chunk-ICBAFX5B.js} +3 -3
- package/dist/{chunk-LBE36YNZ.js.map → chunk-ICBAFX5B.js.map} +1 -1
- package/dist/{chunk-C3DRLFU7.cjs → chunk-IF6VAYIA.cjs} +5 -5
- package/dist/{chunk-C3DRLFU7.cjs.map → chunk-IF6VAYIA.cjs.map} +1 -1
- package/dist/{chunk-O5NDG4EA.cjs → chunk-MP6FK43E.cjs} +3 -3
- package/dist/{chunk-O5NDG4EA.cjs.map → chunk-MP6FK43E.cjs.map} +1 -1
- package/dist/{chunk-AFSOUS5X.cjs → chunk-N26CXGXC.cjs} +83 -72
- package/dist/chunk-N26CXGXC.cjs.map +1 -0
- package/dist/{chunk-2FBQSQDW.js → chunk-NXWKMKZY.js} +298 -214
- package/dist/chunk-NXWKMKZY.js.map +1 -0
- package/dist/{chunk-QOADH2YB.cjs → chunk-UCAYNE44.cjs} +297 -213
- package/dist/chunk-UCAYNE44.cjs.map +1 -0
- package/dist/{chunk-UJM7TG44.js → chunk-UZV27QLC.js} +7 -7
- package/dist/{chunk-UJM7TG44.js.map → chunk-UZV27QLC.js.map} +1 -1
- package/dist/{chunk-GFYGYME3.js → chunk-W7NZRZ54.js} +3 -3
- package/dist/{chunk-GFYGYME3.js.map → chunk-W7NZRZ54.js.map} +1 -1
- package/dist/{chunk-HUJLKDWX.cjs → chunk-XMBYDLZQ.cjs} +4 -4
- package/dist/{chunk-HUJLKDWX.cjs.map → chunk-XMBYDLZQ.cjs.map} +1 -1
- package/dist/{chunk-WDD255XQ.js → chunk-XQDM6T6C.js} +3 -3
- package/dist/{chunk-WDD255XQ.js.map → chunk-XQDM6T6C.js.map} +1 -1
- package/dist/{chunk-ZV3BKLFY.cjs → chunk-Z5VUZ6YD.cjs} +3 -3
- package/dist/{chunk-ZV3BKLFY.cjs.map → chunk-Z5VUZ6YD.cjs.map} +1 -1
- package/dist/{chunk-YU2KUMGE.js → chunk-ZX2VPMBJ.js} +8 -2
- package/dist/chunk-ZX2VPMBJ.js.map +1 -0
- package/dist/connect/index.cjs +50 -50
- package/dist/connect/index.js +8 -8
- package/dist/facts/index.cjs +7 -7
- package/dist/facts/index.js +4 -4
- package/dist/files/index.cjs +4 -23
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +4 -22
- package/dist/files/index.js.map +1 -1
- package/dist/files/views/TagFormParts.d.ts +0 -8
- package/dist/files/views/index.d.ts +1 -1
- package/dist/home/index.cjs +17 -17
- package/dist/home/index.js +3 -3
- package/dist/index.cjs +629 -537
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +116 -25
- package/dist/index.js.map +1 -1
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/index.cjs +38 -38
- package/dist/settings/index.js +3 -3
- package/dist/shell/FilterInput.d.ts +3 -1
- package/dist/shell/index.cjs +5 -5
- package/dist/shell/index.js +2 -2
- package/dist/studio/index.cjs +4 -4
- package/dist/studio/index.js +3 -3
- package/dist/tags/TagDetail.d.ts +14 -2
- package/dist/tags/TagTable.d.ts +20 -11
- package/dist/tags/TagsNav.d.ts +28 -4
- package/dist/tags/index.d.ts +1 -1
- package/dist/tags/tagTableModel.d.ts +10 -2
- package/dist/workflow-canvas/index.cjs +13 -13
- package/dist/workflow-canvas/index.js +6 -6
- package/dist/workspaces/index.cjs +2 -2
- package/dist/workspaces/index.js +2 -2
- package/package.json +4 -4
- package/dist/chunk-2EI7NCUA.cjs.map +0 -1
- package/dist/chunk-2FBQSQDW.js.map +0 -1
- package/dist/chunk-AFSOUS5X.cjs.map +0 -1
- package/dist/chunk-QOADH2YB.cjs.map +0 -1
- package/dist/chunk-R26OHONI.js.map +0 -1
- package/dist/chunk-YU2KUMGE.js.map +0 -1
|
@@ -302,10 +302,16 @@ var isGap = (row) => {
|
|
|
302
302
|
const l = rowLinks(row);
|
|
303
303
|
return l.doc_count + l.fact_count + l.thread_count === 0;
|
|
304
304
|
};
|
|
305
|
+
function linkedTagIds(value) {
|
|
306
|
+
if (typeof value === "string") return value ? [value] : [];
|
|
307
|
+
return Array.isArray(value) ? value.filter((id) => typeof id === "string") : [];
|
|
308
|
+
}
|
|
305
309
|
function cellText(value, column, nameOf) {
|
|
306
310
|
if (value === void 0 || value === null || value === "") return "";
|
|
307
311
|
if (column.type === "checkbox") return value ? "Yes" : "No";
|
|
308
312
|
if (column.type === "person" && typeof value === "string") return nameOf?.(value) ?? value;
|
|
313
|
+
if (column.type === "tag")
|
|
314
|
+
return linkedTagIds(value).map((id) => nameOf?.(id) ?? id).join(", ");
|
|
309
315
|
if (Array.isArray(value)) return value.map(String).join(", ");
|
|
310
316
|
return String(value);
|
|
311
317
|
}
|
|
@@ -376,7 +382,8 @@ var DEFAULT_TAG_COLUMNS_EDITOR_LABELS = {
|
|
|
376
382
|
document: "Document",
|
|
377
383
|
relation: "Relation",
|
|
378
384
|
lookup: "Lookup",
|
|
379
|
-
rollup: "Rollup"
|
|
385
|
+
rollup: "Rollup",
|
|
386
|
+
tag: "Link to tags"
|
|
380
387
|
}
|
|
381
388
|
};
|
|
382
389
|
var TYPES = ["text", "number", "date", "checkbox", "select", "person"];
|
|
@@ -390,7 +397,7 @@ var toWrite = (d) => ({
|
|
|
390
397
|
...d.id ? { id: d.id } : {},
|
|
391
398
|
name: d.name.trim(),
|
|
392
399
|
type: d.type,
|
|
393
|
-
options: d.type === "select" ? d.options.split(",").map((o) => o.trim()).filter(Boolean) : null
|
|
400
|
+
options: d.type === "tag" ? d.options.split(",").map((o) => o.trim()).filter(Boolean) : d.type === "select" ? d.options.split(",").map((o) => o.trim()).filter(Boolean) : null
|
|
394
401
|
});
|
|
395
402
|
function TagColumnsEditor({
|
|
396
403
|
columns,
|
|
@@ -553,7 +560,7 @@ function TagColumnsEditor({
|
|
|
553
560
|
}
|
|
554
561
|
var DEFAULT_TAG_TABLE_LABELS = {
|
|
555
562
|
row: "Item",
|
|
556
|
-
evidence: "
|
|
563
|
+
evidence: "Tagged items",
|
|
557
564
|
documents: "{count} documents",
|
|
558
565
|
facts: "{count} facts",
|
|
559
566
|
threads: "{count} threads",
|
|
@@ -562,9 +569,6 @@ var DEFAULT_TAG_TABLE_LABELS = {
|
|
|
562
569
|
thread: "1 thread",
|
|
563
570
|
untitledThread: "Untitled thread",
|
|
564
571
|
more: "+{count} more",
|
|
565
|
-
gap: "No evidence",
|
|
566
|
-
gapsOnly: "Show gaps only",
|
|
567
|
-
gapCount: "{count} without evidence",
|
|
568
572
|
addRow: "Add row",
|
|
569
573
|
addRowPlaceholder: "Name of the new row",
|
|
570
574
|
add: "Add",
|
|
@@ -578,25 +582,41 @@ var DEFAULT_TAG_TABLE_LABELS = {
|
|
|
578
582
|
yes: "Yes",
|
|
579
583
|
editColumns: "Columns"
|
|
580
584
|
};
|
|
581
|
-
var ROW_LABEL_WIDTH = "w-[
|
|
585
|
+
var ROW_LABEL_WIDTH = "w-[11rem]";
|
|
586
|
+
var EVIDENCE_WIDTH = "w-[14rem]";
|
|
582
587
|
var ROW_LABEL = "line-clamp-3 whitespace-normal break-words";
|
|
583
588
|
function TagTableCell({
|
|
584
589
|
row,
|
|
585
590
|
column,
|
|
586
591
|
people,
|
|
592
|
+
tags,
|
|
593
|
+
onOpenTag,
|
|
587
594
|
onChange,
|
|
588
595
|
l,
|
|
589
596
|
testId
|
|
590
597
|
}) {
|
|
591
598
|
const value = cellValue(row, column);
|
|
592
|
-
const nameOf = (id) => people?.find((p) => p.value === id)?.label;
|
|
599
|
+
const nameOf = (id) => (column.type === "tag" ? tags : people)?.find((p) => p.value === id)?.label;
|
|
593
600
|
const shown = cellText(value, column, nameOf);
|
|
594
601
|
const [draft, setDraft] = react.useState(shown);
|
|
595
602
|
react.useEffect(() => setDraft(cellText(value, column)), [value, column]);
|
|
596
603
|
const set = (next) => void onChange?.(row.external_id, column.id, next);
|
|
604
|
+
if (column.type === "tag")
|
|
605
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
606
|
+
TagLinkCell,
|
|
607
|
+
{
|
|
608
|
+
row,
|
|
609
|
+
column,
|
|
610
|
+
tags,
|
|
611
|
+
onOpenTag,
|
|
612
|
+
onChange: onChange ? set : void 0,
|
|
613
|
+
l,
|
|
614
|
+
testId
|
|
615
|
+
}
|
|
616
|
+
);
|
|
597
617
|
if (!onChange)
|
|
598
618
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate", title: shown, "data-testid": testId, children: shown || /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: l.choose }) });
|
|
599
|
-
const field = "h-8 w-full min-w-
|
|
619
|
+
const field = "h-8 w-full min-w-0 rounded-md border border-transparent bg-transparent px-1.5 text-sm hover:border-input focus:border-input focus:bg-background focus:outline-none";
|
|
600
620
|
switch (column.type) {
|
|
601
621
|
case "checkbox":
|
|
602
622
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -614,7 +634,7 @@ function TagTableCell({
|
|
|
614
634
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
615
635
|
"select",
|
|
616
636
|
{
|
|
617
|
-
className: ui.cn(field, "
|
|
637
|
+
className: ui.cn(field, "pr-6"),
|
|
618
638
|
value: typeof value === "string" ? value : "",
|
|
619
639
|
onChange: (e) => set(e.target.value || null),
|
|
620
640
|
"aria-label": `${row.name}: ${column.name}`,
|
|
@@ -634,7 +654,7 @@ function TagTableCell({
|
|
|
634
654
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
635
655
|
"input",
|
|
636
656
|
{
|
|
637
|
-
className: ui.cn(field, "
|
|
657
|
+
className: ui.cn(field, "pr-6"),
|
|
638
658
|
type: column.type === "number" ? "number" : column.type === "date" ? "date" : "text",
|
|
639
659
|
value: column.type === "date" ? draft.slice(0, 10) : draft,
|
|
640
660
|
onChange: (e) => setDraft(e.target.value),
|
|
@@ -650,6 +670,95 @@ function TagTableCell({
|
|
|
650
670
|
}
|
|
651
671
|
}
|
|
652
672
|
}
|
|
673
|
+
function TagLinkCell({
|
|
674
|
+
row,
|
|
675
|
+
column,
|
|
676
|
+
tags,
|
|
677
|
+
onOpenTag,
|
|
678
|
+
onChange,
|
|
679
|
+
l,
|
|
680
|
+
testId
|
|
681
|
+
}) {
|
|
682
|
+
const ids = linkedTagIds(cellValue(row, column));
|
|
683
|
+
const kinds = column.options ?? [];
|
|
684
|
+
const options = (tags ?? []).filter(
|
|
685
|
+
(t) => t.value !== row.external_id && (kinds.length === 0 || kinds.includes(t.kind))
|
|
686
|
+
);
|
|
687
|
+
const label = (id) => tags?.find((t) => t.value === id)?.label ?? id;
|
|
688
|
+
const chips = ids.map(
|
|
689
|
+
(id) => onOpenTag ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
690
|
+
"button",
|
|
691
|
+
{
|
|
692
|
+
type: "button",
|
|
693
|
+
onClick: () => onOpenTag(id),
|
|
694
|
+
className: "inline-flex min-w-0 max-w-full items-center truncate rounded-md border border-border px-1.5 py-0.5 text-xs hover:border-primary/40 hover:text-primary",
|
|
695
|
+
"data-testid": `${testId}-link-${id}`,
|
|
696
|
+
children: label(id)
|
|
697
|
+
},
|
|
698
|
+
id
|
|
699
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
700
|
+
"span",
|
|
701
|
+
{
|
|
702
|
+
className: "inline-flex min-w-0 max-w-full truncate rounded-md border border-border px-1.5 py-0.5 text-xs",
|
|
703
|
+
"data-testid": `${testId}-link-${id}`,
|
|
704
|
+
children: label(id)
|
|
705
|
+
},
|
|
706
|
+
id
|
|
707
|
+
)
|
|
708
|
+
);
|
|
709
|
+
if (!onChange)
|
|
710
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex min-w-0 flex-wrap gap-1", "data-testid": testId, children: chips.length ? chips : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: l.choose }) });
|
|
711
|
+
const current = ids[0];
|
|
712
|
+
return (
|
|
713
|
+
// Wraps: in a narrow column the name breaks between words and the picker moves below it.
|
|
714
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-x-1 py-1", children: [
|
|
715
|
+
current && (onOpenTag ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
716
|
+
"button",
|
|
717
|
+
{
|
|
718
|
+
type: "button",
|
|
719
|
+
onClick: () => onOpenTag(current),
|
|
720
|
+
className: "max-w-full rounded px-1 text-left text-sm break-words hover:text-primary hover:underline focus-visible:ring-2 focus-visible:ring-ring",
|
|
721
|
+
"aria-label": `Open ${label(current)}`,
|
|
722
|
+
title: `Open ${label(current)}`,
|
|
723
|
+
"data-testid": `${testId}-open`,
|
|
724
|
+
children: [
|
|
725
|
+
label(current),
|
|
726
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpRight, { className: "ml-0.5 inline size-3.5 align-[-2px] text-muted-foreground" })
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-full px-1 text-sm break-words", children: label(current) })),
|
|
730
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
731
|
+
"span",
|
|
732
|
+
{
|
|
733
|
+
className: ui.cn(
|
|
734
|
+
"relative inline-flex h-6 shrink-0 items-center rounded text-muted-foreground hover:bg-muted hover:text-foreground focus-within:ring-2 focus-within:ring-ring",
|
|
735
|
+
current ? "w-6 justify-center" : "min-w-0 flex-1 gap-1 px-1 text-sm"
|
|
736
|
+
),
|
|
737
|
+
title: current ? `${column.name}: ${label(current)}` : void 0,
|
|
738
|
+
children: [
|
|
739
|
+
!current && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: l.choose }),
|
|
740
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-3.5 shrink-0" }),
|
|
741
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
742
|
+
"select",
|
|
743
|
+
{
|
|
744
|
+
className: "absolute inset-0 h-full w-full cursor-pointer opacity-0",
|
|
745
|
+
value: current ?? "",
|
|
746
|
+
onChange: (e) => onChange(e.target.value ? [e.target.value] : null),
|
|
747
|
+
"aria-label": `${row.name}: ${column.name}`,
|
|
748
|
+
"data-testid": testId,
|
|
749
|
+
children: [
|
|
750
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: l.choose }),
|
|
751
|
+
options.map((t) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: t.value, children: t.label }, t.value)),
|
|
752
|
+
current && !options.some((t) => t.value === current) && /* @__PURE__ */ jsxRuntime.jsx("option", { value: current, children: label(current) })
|
|
753
|
+
]
|
|
754
|
+
}
|
|
755
|
+
)
|
|
756
|
+
]
|
|
757
|
+
}
|
|
758
|
+
)
|
|
759
|
+
] })
|
|
760
|
+
);
|
|
761
|
+
}
|
|
653
762
|
var countText = (count2, one, many) => count2 === 1 ? one : count2 ? many.replace("{count}", String(count2)) : null;
|
|
654
763
|
function Evidence({
|
|
655
764
|
row,
|
|
@@ -660,27 +769,15 @@ function Evidence({
|
|
|
660
769
|
onOpenRow,
|
|
661
770
|
testId
|
|
662
771
|
}) {
|
|
663
|
-
if (isGap(row))
|
|
664
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
665
|
-
"span",
|
|
666
|
-
{
|
|
667
|
-
className: "inline-flex items-center gap-1 rounded-full bg-amber-500/15 px-2 py-0.5 text-xs font-medium text-amber-700 dark:text-amber-300",
|
|
668
|
-
"data-testid": `${testId}-gap`,
|
|
669
|
-
children: [
|
|
670
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "size-3" }),
|
|
671
|
-
" ",
|
|
672
|
-
l.gap
|
|
673
|
-
]
|
|
674
|
-
}
|
|
675
|
-
);
|
|
772
|
+
if (isGap(row)) return null;
|
|
676
773
|
const links = rowLinks(row);
|
|
677
774
|
const docs = links.docs ?? [];
|
|
678
775
|
const facts = links.facts ?? [];
|
|
679
776
|
const threads = links.threads ?? [];
|
|
680
777
|
const more = links.doc_count - docs.length + (links.fact_count - facts.length) + (links.thread_count - threads.length);
|
|
681
|
-
const chip = "inline-flex max-w-
|
|
682
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1", "data-testid": testId, children: [
|
|
683
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1 text-xs text-muted-foreground", children: [
|
|
778
|
+
const chip = "inline-flex min-w-0 max-w-full items-center gap-1 truncate rounded-md border border-border px-1.5 py-0.5 text-xs hover:border-primary/40 hover:text-primary disabled:hover:border-border disabled:hover:text-inherit";
|
|
779
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-1", "data-testid": testId, children: [
|
|
780
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1 w-full text-xs text-muted-foreground", children: [
|
|
684
781
|
countText(links.doc_count, l.document, l.documents),
|
|
685
782
|
countText(links.fact_count, l.fact, l.facts),
|
|
686
783
|
countText(links.thread_count, l.thread, l.threads)
|
|
@@ -758,6 +855,8 @@ function TagTable({
|
|
|
758
855
|
onExport,
|
|
759
856
|
onDownload,
|
|
760
857
|
people,
|
|
858
|
+
tags,
|
|
859
|
+
onOpenTag,
|
|
761
860
|
actions,
|
|
762
861
|
labels,
|
|
763
862
|
className,
|
|
@@ -767,12 +866,9 @@ function TagTable({
|
|
|
767
866
|
const columns = react.useMemo(() => table?.columns ?? [], [table]);
|
|
768
867
|
const rows = table?.rows ?? [];
|
|
769
868
|
const [editingColumns, setEditingColumns] = react.useState(false);
|
|
770
|
-
const gaps = rows.filter(isGap).length;
|
|
771
|
-
const [gapsOnly, setGapsOnly] = react.useState(false);
|
|
772
869
|
const [name, setName] = react.useState("");
|
|
773
870
|
const [adding, setAdding] = react.useState(false);
|
|
774
871
|
const [exporting, setExporting] = react.useState(false);
|
|
775
|
-
const shown = gapsOnly ? rows.filter(isGap) : rows;
|
|
776
872
|
const add = async () => {
|
|
777
873
|
const n = name.trim();
|
|
778
874
|
if (!n || !onAddRow) return;
|
|
@@ -785,76 +881,58 @@ function TagTable({
|
|
|
785
881
|
}
|
|
786
882
|
};
|
|
787
883
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn("space-y-3", className), "data-testid": testId, children: [
|
|
788
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
disabled: exporting || rows.length === 0,
|
|
841
|
-
onClick: async () => {
|
|
842
|
-
setExporting(true);
|
|
843
|
-
try {
|
|
844
|
-
await onExport();
|
|
845
|
-
} finally {
|
|
846
|
-
setExporting(false);
|
|
847
|
-
}
|
|
848
|
-
},
|
|
849
|
-
"data-testid": `${testId}-export`,
|
|
850
|
-
children: [
|
|
851
|
-
exporting ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileDown, { className: "size-4" }),
|
|
852
|
-
exporting ? l.exporting : l.export
|
|
853
|
-
]
|
|
854
|
-
}
|
|
855
|
-
)
|
|
856
|
-
] })
|
|
857
|
-
] }),
|
|
884
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex flex-wrap items-center gap-2", children: [
|
|
885
|
+
actions,
|
|
886
|
+
onChangeColumns && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
887
|
+
ui.Button,
|
|
888
|
+
{
|
|
889
|
+
variant: "outline",
|
|
890
|
+
size: "sm",
|
|
891
|
+
"aria-pressed": editingColumns,
|
|
892
|
+
onClick: () => setEditingColumns((v) => !v),
|
|
893
|
+
"data-testid": `${testId}-edit-columns`,
|
|
894
|
+
children: [
|
|
895
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SlidersHorizontal, { className: "size-4" }),
|
|
896
|
+
l.editColumns
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
),
|
|
900
|
+
onDownload && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
901
|
+
ui.Button,
|
|
902
|
+
{
|
|
903
|
+
variant: "outline",
|
|
904
|
+
size: "sm",
|
|
905
|
+
disabled: rows.length === 0,
|
|
906
|
+
onClick: () => void onDownload(),
|
|
907
|
+
"data-testid": `${testId}-download`,
|
|
908
|
+
children: [
|
|
909
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "size-4" }),
|
|
910
|
+
l.download
|
|
911
|
+
]
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
onExport && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
915
|
+
ui.Button,
|
|
916
|
+
{
|
|
917
|
+
variant: "outline",
|
|
918
|
+
size: "sm",
|
|
919
|
+
disabled: exporting || rows.length === 0,
|
|
920
|
+
onClick: async () => {
|
|
921
|
+
setExporting(true);
|
|
922
|
+
try {
|
|
923
|
+
await onExport();
|
|
924
|
+
} finally {
|
|
925
|
+
setExporting(false);
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
"data-testid": `${testId}-export`,
|
|
929
|
+
children: [
|
|
930
|
+
exporting ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileDown, { className: "size-4" }),
|
|
931
|
+
exporting ? l.exporting : l.export
|
|
932
|
+
]
|
|
933
|
+
}
|
|
934
|
+
)
|
|
935
|
+
] }) }),
|
|
858
936
|
editingColumns && onChangeColumns && /* @__PURE__ */ jsxRuntime.jsx(
|
|
859
937
|
TagColumnsEditor,
|
|
860
938
|
{
|
|
@@ -868,116 +946,6 @@ function TagTable({
|
|
|
868
946
|
testId: `${testId}-columns`
|
|
869
947
|
}
|
|
870
948
|
),
|
|
871
|
-
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
872
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
873
|
-
" ",
|
|
874
|
-
l.loading
|
|
875
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "overflow-x-auto rounded-lg border border-border", children: [
|
|
876
|
-
/* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full border-collapse text-sm", "data-testid": `${testId}-table`, children: [
|
|
877
|
-
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-muted/40", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
878
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
879
|
-
"th",
|
|
880
|
-
{
|
|
881
|
-
className: ui.cn(
|
|
882
|
-
ROW_LABEL_WIDTH,
|
|
883
|
-
"sticky left-0 z-10 bg-muted/40 px-3 py-2 text-left font-medium"
|
|
884
|
-
),
|
|
885
|
-
children: l.row
|
|
886
|
-
}
|
|
887
|
-
),
|
|
888
|
-
columns.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
889
|
-
"th",
|
|
890
|
-
{
|
|
891
|
-
className: "px-3 py-2 text-left font-medium",
|
|
892
|
-
"data-testid": `${testId}-column-${c.id}`,
|
|
893
|
-
children: c.name
|
|
894
|
-
},
|
|
895
|
-
c.id
|
|
896
|
-
)),
|
|
897
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-3 py-2 text-left font-medium", children: l.evidence })
|
|
898
|
-
] }) }),
|
|
899
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
900
|
-
shown.map((row) => {
|
|
901
|
-
const id = row.external_id;
|
|
902
|
-
const gap = isGap(row);
|
|
903
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
904
|
-
"tr",
|
|
905
|
-
{
|
|
906
|
-
className: ui.cn("border-t border-border align-top", gap && "bg-amber-500/5"),
|
|
907
|
-
"data-gap": gap || void 0,
|
|
908
|
-
"data-testid": `${testId}-row-${id}`,
|
|
909
|
-
children: [
|
|
910
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
911
|
-
"th",
|
|
912
|
-
{
|
|
913
|
-
scope: "row",
|
|
914
|
-
className: ui.cn(
|
|
915
|
-
ROW_LABEL_WIDTH,
|
|
916
|
-
"sticky left-0 z-10 px-3 py-2 text-left font-medium",
|
|
917
|
-
gap ? "bg-amber-50 dark:bg-amber-950" : "bg-background",
|
|
918
|
-
gap && "border-l-2 border-l-amber-500"
|
|
919
|
-
),
|
|
920
|
-
children: onOpenRow ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
921
|
-
"button",
|
|
922
|
-
{
|
|
923
|
-
type: "button",
|
|
924
|
-
className: ui.cn(ROW_LABEL, "text-left hover:text-primary hover:underline"),
|
|
925
|
-
title: row.name,
|
|
926
|
-
onClick: () => onOpenRow(id),
|
|
927
|
-
"data-testid": `${testId}-row-${id}-label`,
|
|
928
|
-
children: row.name
|
|
929
|
-
}
|
|
930
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
931
|
-
"span",
|
|
932
|
-
{
|
|
933
|
-
className: ROW_LABEL,
|
|
934
|
-
title: row.name,
|
|
935
|
-
"data-testid": `${testId}-row-${id}-label`,
|
|
936
|
-
children: row.name
|
|
937
|
-
}
|
|
938
|
-
)
|
|
939
|
-
}
|
|
940
|
-
),
|
|
941
|
-
columns.map((c) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-1.5 py-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
942
|
-
TagTableCell,
|
|
943
|
-
{
|
|
944
|
-
row,
|
|
945
|
-
column: c,
|
|
946
|
-
people,
|
|
947
|
-
onChange: onChangeValue,
|
|
948
|
-
l,
|
|
949
|
-
testId: `${testId}-cell-${id}-${c.id}`
|
|
950
|
-
}
|
|
951
|
-
) }, c.id)),
|
|
952
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
953
|
-
Evidence,
|
|
954
|
-
{
|
|
955
|
-
row,
|
|
956
|
-
l,
|
|
957
|
-
onOpenDocument,
|
|
958
|
-
onOpenFact,
|
|
959
|
-
onOpenThread,
|
|
960
|
-
onOpenRow,
|
|
961
|
-
testId: `${testId}-evidence-${id}`
|
|
962
|
-
}
|
|
963
|
-
) })
|
|
964
|
-
]
|
|
965
|
-
},
|
|
966
|
-
id
|
|
967
|
-
);
|
|
968
|
-
}),
|
|
969
|
-
shown.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
970
|
-
"td",
|
|
971
|
-
{
|
|
972
|
-
colSpan: columns.length + 2,
|
|
973
|
-
className: "px-3 py-6 text-center text-sm text-muted-foreground",
|
|
974
|
-
children: l.empty
|
|
975
|
-
}
|
|
976
|
-
) })
|
|
977
|
-
] })
|
|
978
|
-
] }),
|
|
979
|
-
columns.length === 0 && rows.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "border-t border-border px-3 py-2 text-xs text-muted-foreground", children: l.noColumns })
|
|
980
|
-
] }),
|
|
981
949
|
onAddRow && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
982
950
|
"form",
|
|
983
951
|
{
|
|
@@ -1014,7 +982,123 @@ function TagTable({
|
|
|
1014
982
|
)
|
|
1015
983
|
]
|
|
1016
984
|
}
|
|
1017
|
-
)
|
|
985
|
+
),
|
|
986
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
987
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
988
|
+
" ",
|
|
989
|
+
l.loading
|
|
990
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "overflow-x-auto rounded-lg border border-border", children: [
|
|
991
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
992
|
+
"table",
|
|
993
|
+
{
|
|
994
|
+
className: "w-full min-w-[36rem] table-fixed border-collapse text-sm",
|
|
995
|
+
"data-testid": `${testId}-table`,
|
|
996
|
+
children: [
|
|
997
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-muted/40", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
998
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
999
|
+
"th",
|
|
1000
|
+
{
|
|
1001
|
+
className: ui.cn(
|
|
1002
|
+
ROW_LABEL_WIDTH,
|
|
1003
|
+
"sticky left-0 z-10 bg-muted/40 px-3 py-2 text-left font-medium"
|
|
1004
|
+
),
|
|
1005
|
+
children: l.row
|
|
1006
|
+
}
|
|
1007
|
+
),
|
|
1008
|
+
columns.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1009
|
+
"th",
|
|
1010
|
+
{
|
|
1011
|
+
className: "truncate px-3 py-2 text-left font-medium",
|
|
1012
|
+
title: c.name,
|
|
1013
|
+
"data-testid": `${testId}-column-${c.id}`,
|
|
1014
|
+
children: c.name
|
|
1015
|
+
},
|
|
1016
|
+
c.id
|
|
1017
|
+
)),
|
|
1018
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: ui.cn(EVIDENCE_WIDTH, "px-3 py-2 text-left font-medium"), children: l.evidence })
|
|
1019
|
+
] }) }),
|
|
1020
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
1021
|
+
rows.map((row) => {
|
|
1022
|
+
const id = row.external_id;
|
|
1023
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1024
|
+
"tr",
|
|
1025
|
+
{
|
|
1026
|
+
className: "border-t border-border align-top",
|
|
1027
|
+
"data-testid": `${testId}-row-${id}`,
|
|
1028
|
+
children: [
|
|
1029
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1030
|
+
"th",
|
|
1031
|
+
{
|
|
1032
|
+
scope: "row",
|
|
1033
|
+
className: ui.cn(
|
|
1034
|
+
ROW_LABEL_WIDTH,
|
|
1035
|
+
"sticky left-0 z-10 bg-background px-3 py-2 text-left font-medium"
|
|
1036
|
+
),
|
|
1037
|
+
children: onOpenRow ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1038
|
+
"button",
|
|
1039
|
+
{
|
|
1040
|
+
type: "button",
|
|
1041
|
+
className: ui.cn(ROW_LABEL, "text-left hover:text-primary hover:underline"),
|
|
1042
|
+
title: row.name,
|
|
1043
|
+
onClick: () => onOpenRow(id),
|
|
1044
|
+
"data-testid": `${testId}-row-${id}-label`,
|
|
1045
|
+
children: row.name
|
|
1046
|
+
}
|
|
1047
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1048
|
+
"span",
|
|
1049
|
+
{
|
|
1050
|
+
className: ROW_LABEL,
|
|
1051
|
+
title: row.name,
|
|
1052
|
+
"data-testid": `${testId}-row-${id}-label`,
|
|
1053
|
+
children: row.name
|
|
1054
|
+
}
|
|
1055
|
+
)
|
|
1056
|
+
}
|
|
1057
|
+
),
|
|
1058
|
+
columns.map((c) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-1.5 py-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1059
|
+
TagTableCell,
|
|
1060
|
+
{
|
|
1061
|
+
row,
|
|
1062
|
+
column: c,
|
|
1063
|
+
people,
|
|
1064
|
+
tags,
|
|
1065
|
+
onOpenTag,
|
|
1066
|
+
onChange: onChangeValue,
|
|
1067
|
+
l,
|
|
1068
|
+
testId: `${testId}-cell-${id}-${c.id}`
|
|
1069
|
+
}
|
|
1070
|
+
) }, c.id)),
|
|
1071
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "min-w-0 px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1072
|
+
Evidence,
|
|
1073
|
+
{
|
|
1074
|
+
row,
|
|
1075
|
+
l,
|
|
1076
|
+
onOpenDocument,
|
|
1077
|
+
onOpenFact,
|
|
1078
|
+
onOpenThread,
|
|
1079
|
+
onOpenRow,
|
|
1080
|
+
testId: `${testId}-evidence-${id}`
|
|
1081
|
+
}
|
|
1082
|
+
) })
|
|
1083
|
+
]
|
|
1084
|
+
},
|
|
1085
|
+
id
|
|
1086
|
+
);
|
|
1087
|
+
}),
|
|
1088
|
+
rows.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1089
|
+
"td",
|
|
1090
|
+
{
|
|
1091
|
+
colSpan: columns.length + 2,
|
|
1092
|
+
className: "px-3 py-6 text-center text-sm text-muted-foreground",
|
|
1093
|
+
children: l.empty
|
|
1094
|
+
}
|
|
1095
|
+
) })
|
|
1096
|
+
] })
|
|
1097
|
+
]
|
|
1098
|
+
}
|
|
1099
|
+
),
|
|
1100
|
+
columns.length === 0 && rows.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "border-t border-border px-3 py-2 text-xs text-muted-foreground", children: l.noColumns })
|
|
1101
|
+
] })
|
|
1018
1102
|
] });
|
|
1019
1103
|
}
|
|
1020
1104
|
var DOCX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
@@ -1183,5 +1267,5 @@ exports.tagTableDocx = tagTableDocx;
|
|
|
1183
1267
|
exports.tagTableMarkdown = tagTableMarkdown;
|
|
1184
1268
|
exports.workspaceActivityHeadline = workspaceActivityHeadline;
|
|
1185
1269
|
exports.workspaceActivityTarget = workspaceActivityTarget;
|
|
1186
|
-
//# sourceMappingURL=chunk-
|
|
1187
|
-
//# sourceMappingURL=chunk-
|
|
1270
|
+
//# sourceMappingURL=chunk-UCAYNE44.cjs.map
|
|
1271
|
+
//# sourceMappingURL=chunk-UCAYNE44.cjs.map
|