@arbidocs/blocks 0.4.60 → 0.4.62
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 +219 -219
- package/dist/agents/index.js +3 -3
- package/dist/{chunk-TF7NR2JY.cjs → chunk-HAADKDRN.cjs} +4 -4
- package/dist/{chunk-TF7NR2JY.cjs.map → chunk-HAADKDRN.cjs.map} +1 -1
- package/dist/{chunk-S3TZOY36.js → chunk-V34YFQ5Q.js} +4 -4
- package/dist/{chunk-S3TZOY36.js.map → chunk-V34YFQ5Q.js.map} +1 -1
- package/dist/files/bulk/BulkActionsBar.d.ts +5 -1
- package/dist/files/cells/RelatedDocsCell.d.ts +6 -2
- package/dist/files/index.cjs +40 -3
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +41 -4
- package/dist/files/index.js.map +1 -1
- package/dist/index.cjs +233 -233
- package/dist/index.js +4 -4
- package/package.json +4 -4
|
@@ -13,6 +13,7 @@ export interface BulkActionsLabels {
|
|
|
13
13
|
more: string;
|
|
14
14
|
folder: string;
|
|
15
15
|
export: string;
|
|
16
|
+
production: string;
|
|
16
17
|
reprocess: string;
|
|
17
18
|
removeOffline: string;
|
|
18
19
|
useOffline: string;
|
|
@@ -27,6 +28,7 @@ export interface BulkActionsTestIds {
|
|
|
27
28
|
moveFolder: string;
|
|
28
29
|
share: string;
|
|
29
30
|
export: string;
|
|
31
|
+
production: string;
|
|
30
32
|
reprocess: string;
|
|
31
33
|
offline: string;
|
|
32
34
|
delete: string;
|
|
@@ -45,6 +47,8 @@ export interface BulkActionsBarProps {
|
|
|
45
47
|
onLabel: () => void;
|
|
46
48
|
onMoveToFolder: () => void;
|
|
47
49
|
onExport: () => void;
|
|
50
|
+
/** Opens the production-set (Bates numbering) flow; the menu item is hidden when omitted. */
|
|
51
|
+
onProduce?: () => void;
|
|
48
52
|
onReprocess: () => void;
|
|
49
53
|
/** Label of the reprocess item (the app adds the "(max N)" cap hint). */
|
|
50
54
|
reprocessLabel?: string;
|
|
@@ -73,4 +77,4 @@ export interface BulkActionsBarProps {
|
|
|
73
77
|
* inline (Chat, AI Annotate, Label, Shared); the rest fold into a "More" menu to keep the bar
|
|
74
78
|
* on one row. Data-free: every action is a callback, the visibility toggle is a slot.
|
|
75
79
|
*/
|
|
76
|
-
export declare function BulkActionsBar({ count, onClear, onReview, isMember, isOnline, onChat, onAnnotate, onLabel, onMoveToFolder, onExport, onReprocess, reprocessLabel, onToggleOffline, isAllOffline, isOfflinePending, onDelete, shareState, onToggleShare, shareTooltip, shareLabels, className, labels, testIds, selectionBar, }: BulkActionsBarProps): import("react").JSX.Element;
|
|
80
|
+
export declare function BulkActionsBar({ count, onClear, onReview, isMember, isOnline, onChat, onAnnotate, onLabel, onMoveToFolder, onExport, onProduce, onReprocess, reprocessLabel, onToggleOffline, isAllOffline, isOfflinePending, onDelete, shareState, onToggleShare, shareTooltip, shareLabels, className, labels, testIds, selectionBar, }: BulkActionsBarProps): import("react").JSX.Element;
|
|
@@ -4,8 +4,12 @@ export interface RelatedDocsCellProps<T> {
|
|
|
4
4
|
parent?: T | null;
|
|
5
5
|
/** Attachments (the documents extracted from this email). */
|
|
6
6
|
attachments: T[];
|
|
7
|
-
/** Documents this one was made from (a crop's image, a redline's inputs). */
|
|
7
|
+
/** Documents this one was made from (a crop's image, a redline's inputs, a copy's original). */
|
|
8
8
|
madeFrom?: T[];
|
|
9
|
+
/** Documents made from this one (a redacted or annotated copy, a production). */
|
|
10
|
+
copies?: T[];
|
|
11
|
+
/** Optional short word for how a made-from / copy document is related ("Redacted copy"). */
|
|
12
|
+
getRelation?: (doc: T) => string | undefined;
|
|
9
13
|
duplicates: T[];
|
|
10
14
|
similar: T[];
|
|
11
15
|
/** Slot: the document pill for one related doc (the app supplies its entity chip). */
|
|
@@ -22,4 +26,4 @@ export interface RelatedDocsCellProps<T> {
|
|
|
22
26
|
* duplicates, similar); clicking opens a popover grouping the related documents with an action
|
|
23
27
|
* per group (Switch to / Delete / Compare). Renders nothing when there are no relations.
|
|
24
28
|
*/
|
|
25
|
-
export declare function RelatedDocsCell<T>({ parent, attachments, madeFrom, duplicates, similar, renderDoc, getKey, onSwitchTo, onDelete, onCompare, className, }: RelatedDocsCellProps<T>): import("react").JSX.Element | null;
|
|
29
|
+
export declare function RelatedDocsCell<T>({ parent, attachments, madeFrom, copies, getRelation, duplicates, similar, renderDoc, getKey, onSwitchTo, onDelete, onCompare, className, }: RelatedDocsCellProps<T>): import("react").JSX.Element | null;
|
package/dist/files/index.cjs
CHANGED
|
@@ -5,9 +5,9 @@ var chunkZPERNIMP_cjs = require('../chunk-ZPERNIMP.cjs');
|
|
|
5
5
|
var chunk223D4727_cjs = require('../chunk-223D4727.cjs');
|
|
6
6
|
var chunk3AFWGEDJ_cjs = require('../chunk-3AFWGEDJ.cjs');
|
|
7
7
|
var chunkIA7RTPT3_cjs = require('../chunk-IA7RTPT3.cjs');
|
|
8
|
+
var chunkVFUWWH52_cjs = require('../chunk-VFUWWH52.cjs');
|
|
8
9
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
9
10
|
var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
|
|
10
|
-
var chunkVFUWWH52_cjs = require('../chunk-VFUWWH52.cjs');
|
|
11
11
|
require('../chunk-FX3K6LNZ.cjs');
|
|
12
12
|
require('../chunk-PPCATBOY.cjs');
|
|
13
13
|
require('../chunk-C54XEN5T.cjs');
|
|
@@ -3751,6 +3751,8 @@ function RelatedDocsCell({
|
|
|
3751
3751
|
parent,
|
|
3752
3752
|
attachments,
|
|
3753
3753
|
madeFrom = [],
|
|
3754
|
+
copies = [],
|
|
3755
|
+
getRelation,
|
|
3754
3756
|
duplicates,
|
|
3755
3757
|
similar,
|
|
3756
3758
|
renderDoc,
|
|
@@ -3763,15 +3765,33 @@ function RelatedDocsCell({
|
|
|
3763
3765
|
const [open, setOpen] = react.useState(false);
|
|
3764
3766
|
const attachmentCount = attachments.length;
|
|
3765
3767
|
const madeFromCount = madeFrom.length;
|
|
3768
|
+
const copyCount = copies.length;
|
|
3766
3769
|
const dupeCount = duplicates.length;
|
|
3767
3770
|
const simCount = similar.length;
|
|
3768
|
-
if (!parent && attachmentCount === 0 && madeFromCount === 0 && dupeCount === 0 && simCount === 0)
|
|
3771
|
+
if (!parent && attachmentCount === 0 && madeFromCount === 0 && copyCount === 0 && dupeCount === 0 && simCount === 0)
|
|
3769
3772
|
return null;
|
|
3770
3773
|
const row = (doc, action) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3771
3774
|
renderDoc(doc),
|
|
3772
3775
|
action
|
|
3773
3776
|
] }, getKey(doc));
|
|
3774
3777
|
const switchAction = (doc) => /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { icon: lucideReact.ArrowRightLeft, label: "Switch to", onClick: () => onSwitchTo(doc) });
|
|
3778
|
+
const derivedRow = (doc) => {
|
|
3779
|
+
const relation = getRelation?.(doc);
|
|
3780
|
+
return row(
|
|
3781
|
+
doc,
|
|
3782
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3783
|
+
relation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3784
|
+
"span",
|
|
3785
|
+
{
|
|
3786
|
+
className: "shrink-0 text-xs text-muted-foreground",
|
|
3787
|
+
"data-slot": "related-docs-relation",
|
|
3788
|
+
children: relation
|
|
3789
|
+
}
|
|
3790
|
+
),
|
|
3791
|
+
switchAction(doc)
|
|
3792
|
+
] })
|
|
3793
|
+
);
|
|
3794
|
+
};
|
|
3775
3795
|
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { open, onOpenChange: setOpen, children: [
|
|
3776
3796
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3777
3797
|
"button",
|
|
@@ -3794,6 +3814,7 @@ function RelatedDocsCell({
|
|
|
3794
3814
|
}
|
|
3795
3815
|
),
|
|
3796
3816
|
/* @__PURE__ */ jsxRuntime.jsx(RelatedBadge, { icon: lucideReact.GitFork, count: madeFromCount, label: "made from" }),
|
|
3817
|
+
/* @__PURE__ */ jsxRuntime.jsx(RelatedBadge, { icon: lucideReact.Copy, count: copyCount, label: copyCount === 1 ? "copy" : "copies" }),
|
|
3797
3818
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3798
3819
|
RelatedBadge,
|
|
3799
3820
|
{
|
|
@@ -3809,7 +3830,8 @@ function RelatedDocsCell({
|
|
|
3809
3830
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { className: "max-h-[400px] w-[320px] overflow-y-auto p-3", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
3810
3831
|
parent && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.CornerDownRight, title: "Parent", count: 1, children: row(parent, switchAction(parent)) }),
|
|
3811
3832
|
attachmentCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.CornerRightDown, title: "Attachments", count: attachmentCount, children: attachments.map((doc) => row(doc, switchAction(doc))) }),
|
|
3812
|
-
madeFromCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.GitFork, title: "Made from", count: madeFromCount, children: madeFrom.map(
|
|
3833
|
+
madeFromCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.GitFork, title: "Made from", count: madeFromCount, children: madeFrom.map(derivedRow) }),
|
|
3834
|
+
copyCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.Copy, title: "Copies made from it", count: copyCount, children: copies.map(derivedRow) }),
|
|
3813
3835
|
dupeCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.CopyX, title: "Duplicates", count: dupeCount, children: duplicates.map(
|
|
3814
3836
|
(doc) => row(
|
|
3815
3837
|
doc,
|
|
@@ -4246,6 +4268,7 @@ var DEFAULT_BULK_ACTIONS_LABELS = {
|
|
|
4246
4268
|
more: "More",
|
|
4247
4269
|
folder: "Folder",
|
|
4248
4270
|
export: "Export",
|
|
4271
|
+
production: "Production set",
|
|
4249
4272
|
reprocess: "Reprocess",
|
|
4250
4273
|
removeOffline: "Remove offline",
|
|
4251
4274
|
useOffline: "Use Offline",
|
|
@@ -4262,6 +4285,7 @@ function BulkActionsBar({
|
|
|
4262
4285
|
onLabel,
|
|
4263
4286
|
onMoveToFolder,
|
|
4264
4287
|
onExport,
|
|
4288
|
+
onProduce,
|
|
4265
4289
|
onReprocess,
|
|
4266
4290
|
reprocessLabel,
|
|
4267
4291
|
onToggleOffline,
|
|
@@ -4286,6 +4310,7 @@ function BulkActionsBar({
|
|
|
4286
4310
|
moveFolder: chunkMHVNT4J3_cjs.testIdOr(testIds?.moveFolder, { testId: "bulk-move-folder-button" }),
|
|
4287
4311
|
share: chunkMHVNT4J3_cjs.testIdOr(testIds?.share, { testId: "bulk-shared-toggle" }),
|
|
4288
4312
|
export: chunkMHVNT4J3_cjs.testIdOr(testIds?.export, { testId: "bulk-export-button" }),
|
|
4313
|
+
production: chunkMHVNT4J3_cjs.testIdOr(testIds?.production, { testId: "bulk-production-button" }),
|
|
4289
4314
|
reprocess: chunkMHVNT4J3_cjs.testIdOr(testIds?.reprocess, { testId: "bulk-reprocess-button" }),
|
|
4290
4315
|
offline: chunkMHVNT4J3_cjs.testIdOr(testIds?.offline, { testId: "bulk-offline-button" }),
|
|
4291
4316
|
delete: chunkMHVNT4J3_cjs.testIdOr(testIds?.delete, { testId: "bulk-delete-button" })
|
|
@@ -4425,6 +4450,18 @@ function BulkActionsBar({
|
|
|
4425
4450
|
]
|
|
4426
4451
|
}
|
|
4427
4452
|
),
|
|
4453
|
+
onProduce && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4454
|
+
ui.DropdownMenuItem,
|
|
4455
|
+
{
|
|
4456
|
+
onClick: onProduce,
|
|
4457
|
+
disabled: noSelection || !isOnline,
|
|
4458
|
+
"data-testid": ids.production,
|
|
4459
|
+
children: [
|
|
4460
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Hash, { className: "mr-2 h-4 w-4" }),
|
|
4461
|
+
l.production
|
|
4462
|
+
]
|
|
4463
|
+
}
|
|
4464
|
+
),
|
|
4428
4465
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4429
4466
|
ui.DropdownMenuItem,
|
|
4430
4467
|
{
|