@arbidocs/blocks 0.4.61 → 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.
@@ -7,9 +7,9 @@ var chunkOUW6G4O2_cjs = require('../chunk-OUW6G4O2.cjs');
7
7
  var chunkIA7RTPT3_cjs = require('../chunk-IA7RTPT3.cjs');
8
8
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
9
9
  var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
10
- require('../chunk-C54XEN5T.cjs');
11
10
  require('../chunk-FX3K6LNZ.cjs');
12
11
  var chunkPPCATBOY_cjs = require('../chunk-PPCATBOY.cjs');
12
+ require('../chunk-C54XEN5T.cjs');
13
13
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
14
14
  var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
15
15
  var lucideReact = require('lucide-react');
@@ -6,9 +6,9 @@ import { GridView, SelectionBar, SelectionBarAction } from '../chunk-BUHKUKKB.js
6
6
  import { FilterInput } from '../chunk-YU2KUMGE.js';
7
7
  export { DEFAULT_FILTER_INPUT_LABELS as DEFAULT_FACTS_FILTER_INPUT_LABELS, DEFAULT_FILTER_FIELDS as FACTS_SEARCH_FIELD_OPTIONS, FilterInput as FactsFilterInput } from '../chunk-YU2KUMGE.js';
8
8
  import { TabHeader } from '../chunk-4WWM3GQ5.js';
9
- import '../chunk-76JDDMSP.js';
10
9
  import '../chunk-SLSBJRWW.js';
11
10
  import { observeResize } from '../chunk-NPLYHR2E.js';
11
+ import '../chunk-76JDDMSP.js';
12
12
  import { initials } from '../chunk-OXF2IFXG.js';
13
13
  import { testIdOr } from '../chunk-7F6CBP3Z.js';
14
14
  import { PencilLine, Check, MoreVertical, Pencil, Trash2, CalendarDays, X, Columns3, ChevronDown, RotateCcw, Milestone, CalendarClock, Scale, Lightbulb, ArrowRight, Loader2, Info, PinOff, Pin, Tags, MoreHorizontal, FolderUp, BookMarked, Plus, Search, CheckCircle2, CornerDownLeft, Quote, ChevronLeft, ChevronRight, Table2, CalendarRange, GanttChartSquare } from 'lucide-react';
@@ -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;
@@ -8,9 +8,9 @@ var chunkIA7RTPT3_cjs = require('../chunk-IA7RTPT3.cjs');
8
8
  var chunkVFUWWH52_cjs = require('../chunk-VFUWWH52.cjs');
9
9
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
10
10
  var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
11
- require('../chunk-C54XEN5T.cjs');
12
11
  require('../chunk-FX3K6LNZ.cjs');
13
12
  require('../chunk-PPCATBOY.cjs');
13
+ require('../chunk-C54XEN5T.cjs');
14
14
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
15
15
  var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
16
16
  var chunk2ZTONLT5_cjs = require('../chunk-2ZTONLT5.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((doc) => row(doc, switchAction(doc))) }),
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
  {