@arbidocs/blocks 0.4.69 → 0.4.71
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/README.md +161 -1
- package/bin/arbidocs-copy-pdf-assets.mjs +112 -0
- package/dist/{StreamedArtifactEditor-OPL4KXOT.js → StreamedArtifactEditor-HTNPG4NB.js} +3 -2
- package/dist/StreamedArtifactEditor-HTNPG4NB.js.map +1 -0
- package/dist/{StreamedArtifactEditor-RIKG6CJQ.cjs → StreamedArtifactEditor-IZWYNFMM.cjs} +3 -2
- package/dist/StreamedArtifactEditor-IZWYNFMM.cjs.map +1 -0
- package/dist/agents/index.cjs +221 -220
- package/dist/agents/index.js +5 -4
- package/dist/artifacts/editor/index.cjs +1 -0
- package/dist/artifacts/editor/index.js +1 -0
- package/dist/artifacts/index.cjs +1 -0
- package/dist/artifacts/index.js +1 -0
- package/dist/auth/index.cjs +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/chat/index.cjs +67 -66
- package/dist/chat/index.js +3 -2
- package/dist/{chunk-CW4WXGEN.js → chunk-3TVTG7FK.js} +3 -3
- package/dist/{chunk-CW4WXGEN.js.map → chunk-3TVTG7FK.js.map} +1 -1
- package/dist/chunk-4DVEGXZQ.cjs +72 -0
- package/dist/chunk-4DVEGXZQ.cjs.map +1 -0
- package/dist/{chunk-EHXSBH6U.js → chunk-5HOAOKZL.js} +4 -2
- package/dist/chunk-5HOAOKZL.js.map +1 -0
- package/dist/{chunk-ZYZMCNIS.cjs → chunk-7M22KND4.cjs} +5 -5
- package/dist/{chunk-ZYZMCNIS.cjs.map → chunk-7M22KND4.cjs.map} +1 -1
- package/dist/{chunk-ZQB7HNE6.js → chunk-BMWZTNZB.js} +3 -3
- package/dist/{chunk-ZQB7HNE6.js.map → chunk-BMWZTNZB.js.map} +1 -1
- package/dist/chunk-DES3K4SD.cjs +18 -0
- package/dist/chunk-DES3K4SD.cjs.map +1 -0
- package/dist/{chunk-4HZ46XP2.js → chunk-HLMFU7L2.js} +5 -5
- package/dist/{chunk-4HZ46XP2.js.map → chunk-HLMFU7L2.js.map} +1 -1
- package/dist/{chunk-BR2CPKFU.cjs → chunk-LTA2IAQB.cjs} +6 -6
- package/dist/{chunk-BR2CPKFU.cjs.map → chunk-LTA2IAQB.cjs.map} +1 -1
- package/dist/chunk-ODWCTAH7.js +66 -0
- package/dist/chunk-ODWCTAH7.js.map +1 -0
- package/dist/{chunk-TLQQV7WW.cjs → chunk-THO7DZNN.cjs} +4 -2
- package/dist/chunk-THO7DZNN.cjs.map +1 -0
- package/dist/chunk-VUNV25KB.js +15 -0
- package/dist/chunk-VUNV25KB.js.map +1 -0
- package/dist/{chunk-WKNAFILY.cjs → chunk-XNRGCQPZ.cjs} +3 -3
- package/dist/{chunk-WKNAFILY.cjs.map → chunk-XNRGCQPZ.cjs.map} +1 -1
- package/dist/citations/index.cjs +1 -0
- package/dist/citations/index.js +1 -0
- package/dist/collaboration/index.cjs +1 -0
- package/dist/collaboration/index.js +1 -0
- package/dist/connect/docx.cjs +3 -2
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.js +2 -1
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +26 -25
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +7 -6
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectionProvider.d.ts +5 -0
- package/dist/connection/types.d.ts +6 -0
- package/dist/document-tools/DocumentToolButtons.d.ts +29 -0
- package/dist/document-tools/MarkupNotices.d.ts +12 -0
- package/dist/document-tools/MarkupViewNote.d.ts +11 -0
- package/dist/document-tools/SignDocumentDialog.d.ts +20 -0
- package/dist/document-tools/SignatureCertificate.d.ts +26 -0
- package/dist/document-tools/SignatureStatus.d.ts +24 -0
- package/dist/document-tools/VersionSnapshotBar.d.ts +27 -0
- package/dist/document-tools/index.cjs +637 -0
- package/dist/document-tools/index.cjs.map +1 -0
- package/dist/document-tools/index.d.ts +7 -0
- package/dist/document-tools/index.js +623 -0
- package/dist/document-tools/index.js.map +1 -0
- package/dist/document-tools/production/ProductionSetDialog.d.ts +23 -0
- package/dist/document-tools/production/index.cjs +102 -0
- package/dist/document-tools/production/index.cjs.map +1 -0
- package/dist/document-tools/production/index.d.ts +1 -0
- package/dist/document-tools/production/index.js +100 -0
- package/dist/document-tools/production/index.js.map +1 -0
- package/dist/document-tools/viewer/AnnotatedPdfViewer.d.ts +54 -0
- package/dist/document-tools/viewer/SignaturePlacementViewer.d.ts +20 -0
- package/dist/document-tools/viewer/index.cjs +273 -0
- package/dist/document-tools/viewer/index.cjs.map +1 -0
- package/dist/document-tools/viewer/index.d.ts +2 -0
- package/dist/document-tools/viewer/index.js +268 -0
- package/dist/document-tools/viewer/index.js.map +1 -0
- package/dist/docx/index.cjs +1 -0
- package/dist/docx/index.cjs.map +1 -1
- package/dist/docx/index.js +1 -0
- package/dist/docx/index.js.map +1 -1
- package/dist/facts/index.cjs +1 -0
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.js +1 -0
- package/dist/facts/index.js.map +1 -1
- package/dist/files/cells/DocumentNameCell.d.ts +3 -1
- package/dist/files/index.cjs +39 -67
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +20 -63
- package/dist/files/index.js.map +1 -1
- package/dist/home/index.cjs +1 -0
- package/dist/home/index.cjs.map +1 -1
- package/dist/home/index.js +1 -0
- package/dist/home/index.js.map +1 -1
- package/dist/index.cjs +481 -480
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/lib-6QPUXAQS.cjs +9674 -0
- package/dist/lib-6QPUXAQS.cjs.map +1 -0
- package/dist/lib-NRGL2JGF.js +9672 -0
- package/dist/lib-NRGL2JGF.js.map +1 -0
- package/dist/retrieval/index.cjs +1 -0
- package/dist/retrieval/index.js +1 -0
- package/dist/settings/index.cjs +2 -1
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +2 -1
- package/dist/settings/index.js.map +1 -1
- package/dist/shell/index.cjs +1 -0
- package/dist/shell/index.js +1 -0
- package/dist/site/index.cjs +1 -0
- package/dist/site/index.js +1 -0
- package/dist/studio/index.cjs +5 -4
- package/dist/studio/index.cjs.map +1 -1
- package/dist/studio/index.js +3 -2
- package/dist/studio/index.js.map +1 -1
- package/dist/timeline/index.cjs +1 -0
- package/dist/timeline/index.js +1 -0
- package/dist/workspaces/index.cjs +1 -0
- package/dist/workspaces/index.cjs.map +1 -1
- package/dist/workspaces/index.js +1 -0
- package/dist/workspaces/index.js.map +1 -1
- package/package.json +32 -4
- package/dist/StreamedArtifactEditor-OPL4KXOT.js.map +0 -1
- package/dist/StreamedArtifactEditor-RIKG6CJQ.cjs.map +0 -1
- package/dist/chunk-EHXSBH6U.js.map +0 -1
- package/dist/chunk-TLQQV7WW.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/document-tools/DocumentToolButtons.tsx","../../src/document-tools/MarkupNotices.tsx","../../src/document-tools/MarkupViewNote.tsx","../../src/document-tools/SignDocumentDialog.tsx","../../src/document-tools/SignatureStatus.tsx","../../src/document-tools/SignatureCertificate.tsx","../../src/document-tools/VersionSnapshotBar.tsx"],"names":["jsxs","jsx","Button","certificateLink","useState","LINK"],"mappings":";;;;;;;;;;AAUA,IAAM,KAAA,GAAQ,yBAAA;AAUP,SAAS,cAAA,CAAe,EAAE,MAAA,EAAQ,OAAA,EAAS,SAAQ,EAA8B;AACtF,EAAA,uBACE,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,QAAA;AAAA,MACL,OAAA,EAAS,SAAS,SAAA,GAAY,SAAA;AAAA,MAC9B,IAAA,EAAM,UAAU,MAAA,GAAS,IAAA;AAAA,MACzB,cAAA,EAAc,MAAA;AAAA,MACd,KAAA,EAAM,6CAAA;AAAA,MACN,YAAA,EAAW,UAAA;AAAA,MACX,aAAA,EAAY,iBAAA;AAAA,MAC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EAAY,yBAAA;AAAA,cACZ,OAAA,EAAS,QAAA;AAAA,cAER,QAAA,EAAA,IAAA,GAAO,MAAA,CAAO,YAAA,GAAe,MAAA,CAAO;AAAA;AAAA;AACvC,SAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ","file":"index.js","sourcesContent":["/**\n * The viewer-header buttons of the PDF document tools: Annotate, Show original, Download with\n * markup and Sign. Separate parts so a host can place them among its own header actions. On a\n * narrow (`compact`) header each is icon-only; its accessible name stays.\n */\n\nimport type { ReactElement } from 'react'\nimport { Download, FileText, PencilLine, PenLine } from 'lucide-react'\nimport { Button } from '@arbidocs/react/ui'\n\nconst TOUCH = 'pointer-coarse:min-h-11'\n\ninterface ToggleProps {\n /** On (pressed). */\n active: boolean\n onClick: () => void\n compact?: boolean\n}\n\n/** Annotate mode: highlight, comment, stamp, redact. */\nexport function AnnotateButton({ active, onClick, compact }: ToggleProps): ReactElement {\n return (\n <Button\n type=\"button\"\n variant={active ? 'default' : 'outline'}\n size={compact ? 'icon' : 'sm'}\n aria-pressed={active}\n title=\"Annotate: highlight, comment, stamp, redact\"\n aria-label=\"Annotate\"\n data-testid=\"annotate-toggle\"\n className={TOUCH}\n onClick={onClick}\n >\n <PencilLine className=\"size-4\" />\n {!compact && <span className=\"ml-1\">Annotate</span>}\n </Button>\n )\n}\n\n/** The markup is the default view of a marked-up PDF; this shows the untouched file. */\nexport function ShowOriginalButton({ active, onClick, compact }: ToggleProps): ReactElement {\n return (\n <Button\n type=\"button\"\n variant={active ? 'default' : 'outline'}\n size={compact ? 'icon' : 'sm'}\n aria-pressed={active}\n title={active ? 'Show the markup again' : 'Show the original, without markup'}\n aria-label=\"Show original\"\n data-testid=\"markup-show-original\"\n className={TOUCH}\n onClick={onClick}\n >\n <FileText className=\"size-4\" />\n {!compact && <span className=\"ml-1\">Show original</span>}\n </Button>\n )\n}\n\n/**\n * \"Download with markup\": the PDF with its annotations, which Acrobat and Preview show. With a\n * `disabledReason` (a signed, locked version) it is off and says why.\n */\nexport function DownloadMarkupButton({\n onClick,\n disabledReason,\n}: {\n onClick: () => void\n disabledReason?: string\n}): ReactElement {\n const button = (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"icon\"\n title={\n disabledReason ??\n 'Download with markup: the PDF with its annotations (opens in Acrobat or Preview)'\n }\n aria-label=\"Download with markup\"\n aria-description={disabledReason}\n disabled={!!disabledReason}\n data-testid=\"markup-download\"\n className={TOUCH}\n onClick={onClick}\n >\n <Download className=\"size-4\" />\n </Button>\n )\n // A disabled button gets no pointer events, so the reason sits on a wrapper too.\n return disabledReason ? (\n <span title={disabledReason} className=\"inline-flex\" data-testid=\"markup-download-locked\">\n {button}\n </span>\n ) : (\n button\n )\n}\n\n/** One line where a signed version's content can be edited: an edit is a new, unsigned version. */\nexport function SignedEditNote(): ReactElement {\n return (\n <p\n className=\"border-b px-3 py-1.5 text-xs text-muted-foreground\"\n data-testid=\"signed-edit-note\"\n >\n Editing creates a new unsigned version\n </p>\n )\n}\n\n/** Sign: choose where the signature goes, then sign. */\nexport function SignButton({ active, onClick, compact }: ToggleProps): ReactElement {\n return (\n <Button\n type=\"button\"\n variant={active ? 'default' : 'outline'}\n size={compact ? 'icon' : 'sm'}\n aria-pressed={active}\n title=\"Sign document\"\n aria-label=\"Sign\"\n data-testid=\"sign-document-button\"\n className={TOUCH}\n onClick={onClick}\n >\n <PenLine className=\"size-4\" />\n {!compact && <span className=\"ml-1\">Sign</span>}\n </Button>\n )\n}\n","/**\n * The one-line notices above the PDF about its markup: annotations found in this browser from\n * before markup was saved on the server (for a shared document: add them to the shared markup, or\n * discard), and markup that sits on an older version (open it, or copy its open comments here).\n */\n\nimport type { LegacyPrompt, OlderMarkupNote } from '@arbidocs/react/document-tools'\n\nconst BAR = 'flex flex-wrap items-center justify-between gap-2 border-b px-3 py-2 text-xs'\nconst LINK =\n 'font-medium text-primary hover:underline disabled:opacity-50 disabled:no-underline pointer-coarse:min-h-11'\n\nexport interface MarkupNoticesProps {\n legacyPrompt: LegacyPrompt | null\n olderNote: OlderMarkupNote | null\n onOpenVersion: (version: number) => void\n}\n\nexport function MarkupNotices({ legacyPrompt, olderNote, onOpenVersion }: MarkupNoticesProps) {\n return (\n <>\n {legacyPrompt && (\n <div className={BAR} role=\"status\" data-testid=\"markup-migration-prompt\">\n <span>\n {legacyPrompt.count} annotation{legacyPrompt.count === 1 ? '' : 's'} on this document\n {legacyPrompt.count === 1 ? ' is' : ' are'} saved only in this browser. Add{' '}\n {legacyPrompt.count === 1 ? 'it' : 'them'} to the shared markup, where everyone with\n access sees {legacyPrompt.count === 1 ? 'it' : 'them'}?\n </span>\n <span className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n className={LINK}\n disabled={legacyPrompt.busy}\n data-testid=\"markup-migration-add\"\n onClick={legacyPrompt.add}\n >\n {legacyPrompt.busy ? 'Adding…' : 'Add to shared markup'}\n </button>\n <button\n type=\"button\"\n className={LINK}\n disabled={legacyPrompt.busy}\n data-testid=\"markup-migration-discard\"\n onClick={legacyPrompt.discard}\n >\n Discard\n </button>\n </span>\n </div>\n )}\n {olderNote && (\n <div className={BAR} data-testid=\"markup-older-version-note\">\n <span>\n The markup is on version {olderNote.version}. This version started without it.\n {olderNote.signed && (\n <span data-testid=\"markup-older-version-signed\">\n {' '}\n It is signed: comments copied here are kept beside it, and the signed PDF does not\n change.\n </span>\n )}\n </span>\n <span className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n className={LINK}\n data-testid=\"markup-open-older-version\"\n onClick={() => onOpenVersion(olderNote.version)}\n >\n Open version {olderNote.version}\n </button>\n <button\n type=\"button\"\n className={LINK}\n disabled={olderNote.busy}\n data-testid=\"markup-copy-open-threads\"\n title=\"Copy the unresolved comment threads onto this version (redactions never carry over)\"\n onClick={olderNote.copy}\n >\n {olderNote.busy ? 'Copying…' : 'Copy open comments here'}\n </button>\n </span>\n </div>\n )}\n </>\n )\n}\n","/**\n * Which view of a marked-up PDF is on screen, spelled out beside the title, with the switch to the\n * other one. The narrow header's \"Show original\" is an unlabelled page icon, so on its own it read\n * as no control at all, and nothing said whether the page showed the markup or the original.\n */\n\nimport type { ReactElement } from 'react'\nimport { ViewerStatusNote } from '../files/ViewerLayout'\n\nexport interface MarkupViewNoteProps {\n showOriginal: boolean\n onToggle: () => void\n}\n\nexport function MarkupViewNote({ showOriginal, onToggle }: MarkupViewNoteProps): ReactElement {\n return (\n <ViewerStatusNote testId=\"markup-view-note\">\n {showOriginal ? 'Original, without markup' : 'With markup'}\n {' · '}\n <button\n type=\"button\"\n className=\"font-medium text-primary hover:underline pointer-coarse:min-h-11\"\n data-testid=\"markup-view-note-toggle\"\n onClick={onToggle}\n >\n {showOriginal ? 'Show markup' : 'Show original'}\n </button>\n </ViewerStatusNote>\n )\n}\n","/**\n * Sign a document electronically: confirm the name, choose whether the date is shown, read the\n * statement of intent, re-enter the password. Only the signature (and the date, if ticked) is drawn\n * on the page; a role, a firm or a place go on as ordinary annotation text. Anyone can click the\n * signature to check it. The signed copy is saved as a new version and opened, with an offer to\n * email it when the host gives the tools an `emailDocument`. Needs a `<DocumentToolsProvider>` with\n * a `user` (its email) and a `deploymentDomain`, inside a React Query `QueryClientProvider`.\n */\n\nimport { useState, type FormEvent, type ReactElement } from 'react'\nimport {\n certificateLink,\n intentText,\n useDocumentTools,\n useSignDocument,\n type SignatureAppearance,\n} from '@arbidocs/react/document-tools'\nimport { Button, Checkbox, Input, Label } from '@arbidocs/react/ui'\nimport { ModalScaffold } from '../settings/ModalScaffold'\n\nexport interface SignDocumentDialogProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n documentId: string\n /** The PDF the viewer is showing. */\n pdfBlob: Blob\n /** Where the signature goes; omitted = bottom of the last page. */\n appearance?: SignatureAppearance\n}\n\nexport function SignDocumentDialog({\n open,\n onOpenChange,\n documentId,\n pdfBlob,\n appearance,\n}: SignDocumentDialogProps): ReactElement {\n const { user, notify, openDocument, emailDocument, certificateUrl } = useDocumentTools()\n const [name, setName] = useState(() => user?.name ?? '')\n const [includeDate, setIncludeDate] = useState(false)\n const [password, setPassword] = useState('')\n const [error, setError] = useState<string | null>(null)\n const sign = useSignDocument()\n\n const signer = { name }\n\n const handleSubmit = async (e: FormEvent) => {\n e.preventDefault()\n if (!user?.email) return\n setError(null)\n try {\n const result = await sign.mutateAsync({\n documentId,\n pdfBlob,\n email: user.email,\n password,\n signer,\n appearance,\n includeDate,\n })\n const signedId = result.doc_ext_id\n const certificate = certificateLink(result.signature, certificateUrl)\n notify(\n `Signed. The signed copy is saved as version ${result.version}.`,\n 'success',\n emailDocument\n ? { action: { label: 'Email it', onClick: () => emailDocument(signedId) } }\n : {\n action: {\n label: 'View certificate',\n onClick: () => {\n window.open(certificate, '_blank', 'noopener,noreferrer')\n },\n },\n }\n )\n setPassword('')\n onOpenChange(false)\n openDocument?.(signedId)\n } catch (err) {\n setError(err instanceof Error ? err.message : 'Signing failed')\n }\n }\n\n return (\n <ModalScaffold\n open={open}\n onOpenChange={(next) => !sign.isPending && onOpenChange(next)}\n title=\"Sign document\"\n description=\"Sign this document electronically. The signed copy is saved as a new version.\"\n showDescription\n testId=\"sign-document-dialog\"\n >\n <form onSubmit={handleSubmit}>\n <ModalScaffold.Body>\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"sign-name\">Name</Label>\n <Input\n id=\"sign-name\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n data-testid=\"sign-document-name-input\"\n required\n />\n </div>\n <div className=\"flex items-center gap-2 pointer-coarse:min-h-11\">\n <Checkbox\n id=\"sign-include-date\"\n checked={includeDate}\n onCheckedChange={(checked) => setIncludeDate(checked === true)}\n data-testid=\"sign-document-include-date\"\n />\n <Label htmlFor=\"sign-include-date\" className=\"font-normal\">\n Include date\n </Label>\n </div>\n <p className=\"text-sm text-muted-foreground\" data-testid=\"sign-document-appearance-note\">\n Only your signature{includeDate ? ' and the date appear' : ' appears'} on the page.\n Anyone can click it to check it.\n </p>\n {name.trim() && (\n <blockquote\n className=\"border-l-2 border-border pl-3 text-sm text-muted-foreground\"\n data-testid=\"sign-document-intent\"\n >\n {intentText(signer)}\n </blockquote>\n )}\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"sign-password\">Password</Label>\n <Input\n id=\"sign-password\"\n type=\"password\"\n autoComplete=\"current-password\"\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n data-testid=\"sign-document-password-input\"\n required\n />\n </div>\n {error && (\n <p className=\"text-sm text-red-text\" role=\"alert\" data-testid=\"sign-document-error\">\n {error}\n </p>\n )}\n </ModalScaffold.Body>\n <ModalScaffold.Footer>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => onOpenChange(false)}\n disabled={sign.isPending}\n >\n Cancel\n </Button>\n <Button\n type=\"submit\"\n disabled={sign.isPending || !name.trim() || !password}\n data-testid=\"sign-document-submit-button\"\n >\n {sign.isPending ? 'Signing...' : 'Sign'}\n </Button>\n </ModalScaffold.Footer>\n </form>\n </ModalScaffold>\n )\n}\n","/**\n * The \"Signed — locked\" note in the viewer header (a signed version changes only by a further\n * signature), which opens the signature details: who signed and when,\n * whether the document is unchanged since, and \"View certificate\", the public page anyone can\n * check the signature on (the same page the signature on the PDF links to). Read from the PDF\n * itself (GET .../signatures). A counter-signed copy lists every signature, oldest first.\n */\n\nimport type { ReactElement, ReactNode } from 'react'\nimport {\n certificateLink,\n useOptionalDocumentTools,\n type SignatureStatusResponse,\n} from '@arbidocs/react/document-tools'\nimport { Popover, PopoverContent, PopoverTrigger } from '@arbidocs/react/ui'\n\n/** \"14 Oct 2026, 12:00\" in the reader's locale and time zone. */\nexport function formatSignedAt(iso: string): string {\n const date = new Date(iso)\n if (Number.isNaN(date.getTime())) return iso\n return date.toLocaleString([], { dateStyle: 'medium', timeStyle: 'short' })\n}\n\nexport interface SignatureStatusProps {\n status: SignatureStatusResponse\n /** How the signing time is shown. Default: {@link formatSignedAt}. */\n formatDate?: (iso: string) => string\n /**\n * The certificate page of a signature in this app. Preferred over the `certificate_url` the API\n * returns (which is on the deployment domain). Default: the enclosing `<DocumentToolsProvider>`'s\n * `certificateUrl`, if any; without either, the API's `certificate_url`, else\n * `/verify/{reference}` on this origin.\n */\n certificateUrl?: (reference: string) => string\n}\n\nfunction Row({ label, field, children }: { label: string; field: string; children: ReactNode }) {\n return (\n <div className=\"grid grid-cols-[5.5rem_1fr] gap-2\">\n <dt className=\"text-muted-foreground\">{label}</dt>\n <dd className=\"min-w-0 break-words\" data-testid={`signature-detail-${field}`}>\n {children}\n </dd>\n </div>\n )\n}\n\nexport function SignatureStatus({\n status,\n formatDate = formatSignedAt,\n certificateUrl,\n}: SignatureStatusProps): ReactElement {\n const tools = useOptionalDocumentTools()\n const hostCertificateUrl = certificateUrl ?? tools?.certificateUrl\n const signatures = status.signatures ?? []\n // A signed copy can be counter-signed: each signature is listed, oldest first.\n const isCounterSigned = signatures.length > 1\n return (\n <Popover>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n className=\"flex-shrink-0 text-sm text-muted-foreground underline decoration-dotted underline-offset-4 hover:text-foreground pointer-coarse:min-h-11\"\n data-testid=\"document-signature-status\"\n aria-label={`${status.intact ? 'Signed, locked' : 'Modified after signing'}: show signature details`}\n >\n {status.intact ? 'Signed — locked' : 'Modified after signing'}\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"max-h-[70vh] w-80 overflow-y-auto p-3 text-sm\"\n align=\"start\"\n data-testid=\"signature-details\"\n >\n <p className=\"mb-2 font-medium\" data-testid=\"signature-details-title\">\n {isCounterSigned\n ? `Electronic signatures (${signatures.length})`\n : 'Electronic signature'}\n </p>\n {signatures.map((signature, index) => (\n <dl\n key={signature.reference}\n className={`mb-3 space-y-1 ${index > 0 ? 'border-t border-border pt-2' : ''}`}\n data-testid={`signature-item-${index}`}\n >\n <Row label=\"Signed by\" field=\"signer\">\n {signature.signer_name || signature.signer_email}\n </Row>\n <Row label=\"On\" field=\"time\">\n {formatDate(signature.signed_at)}\n </Row>\n <dd>\n <a\n href={certificateLink(signature, hostCertificateUrl)}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center font-medium text-primary hover:underline pointer-coarse:min-h-11\"\n data-testid={`signature-certificate-link-${index}`}\n >\n View certificate\n </a>\n </dd>\n </dl>\n ))}\n <p\n className={`border-t border-border pt-2 ${status.intact ? '' : 'text-red-text'}`}\n data-testid=\"signature-detail-intact\"\n >\n {status.intact\n ? isCounterSigned\n ? '✓ Unchanged since the last signature'\n : '✓ Unchanged since signing'\n : '✗ Changed after it was signed'}\n </p>\n <p className=\"mt-1 text-xs text-muted-foreground\" data-testid=\"signature-detail-locked\">\n Locked: only further signatures can be added.\n </p>\n </PopoverContent>\n </Popover>\n )\n}\n","/**\n * The certificate of an ARBI signature: the page the link on a signed PDF's signature opens, for\n * anyone, signed in or not. Plain English and short: who signed and when, what ARBI checks, the\n * result, any counter-signatures, and \"Check your copy\", which hashes a PDF in the browser and\n * compares it with the signed document and each signed revision (the file never leaves the\n * device). No email addresses and no\n * document content. Presentational: `verification` comes from `useSignatureVerification` in\n * `@arbidocs/react/document-tools`.\n */\n\nimport { useRef, useState, type DragEvent, type ReactElement, type ReactNode } from 'react'\nimport {\n matchSignedCopy,\n type CopyMatch,\n type SignatureVerification,\n} from '@arbidocs/react/document-tools'\nimport { cn } from '@arbidocs/react/ui'\nimport { formatSignedAt } from './SignatureStatus'\n\nexport interface SignatureCertificateProps {\n /** The signature reference (`sig-…`), shown at the foot of the page. */\n reference?: string\n verification?: SignatureVerification\n isLoading?: boolean\n /** Why the signature could not be checked. */\n error?: string | null\n /** The error is a passing one (too many checks): say it calmly, not as a failure. */\n isErrorTransient?: boolean\n /** How signing times are shown. Default: {@link formatSignedAt}. */\n formatDate?: (iso: string) => string\n /** Offer \"Check your copy\". Default on. */\n allowCopyCheck?: boolean\n}\n\ntype CopyCheck =\n | { state: 'idle' }\n | { state: 'checking'; name: string }\n | { state: 'done'; name: string; match: CopyMatch }\n | { state: 'failed'; name: string }\n\nfunction Frame({ children }: { children: ReactNode }) {\n return (\n <main\n className=\"mx-auto w-full max-w-xl px-4 py-10 text-foreground\"\n data-testid=\"signature-certificate\"\n >\n <h1 className=\"mb-6 text-xl font-semibold\">Signature certificate</h1>\n {children}\n </main>\n )\n}\n\nfunction copyResult(name: string, match: CopyMatch): string {\n if (match.kind === 'current') return `✓ ${name} is the signed document, unchanged.`\n if (match.kind === 'earlier') {\n // A counter-signed PDF: the copy is an earlier signed revision, which is still genuine.\n return `✓ ${name}: this is the version signed by ${match.signature.signer_name || 'an ARBI user'}.`\n }\n return `✗ ${name} is not the signed document: it differs from what was signed.`\n}\n\nexport function SignatureCertificate({\n reference,\n verification,\n isLoading = false,\n error,\n isErrorTransient = false,\n formatDate = formatSignedAt,\n allowCopyCheck = true,\n}: SignatureCertificateProps): ReactElement {\n const [copy, setCopy] = useState<CopyCheck>({ state: 'idle' })\n const [dragging, setDragging] = useState(false)\n const input = useRef<HTMLInputElement>(null)\n\n if (isLoading) {\n return (\n <Frame>\n <p className=\"text-muted-foreground\" data-testid=\"signature-certificate-loading\">\n Checking the signature…\n </p>\n </Frame>\n )\n }\n if (error || !verification) {\n return (\n <Frame>\n <p\n className={isErrorTransient ? 'text-muted-foreground' : 'text-red-text'}\n role={isErrorTransient ? 'status' : 'alert'}\n data-testid=\"signature-certificate-error\"\n >\n {error || 'The signature could not be checked.'}\n </p>\n </Frame>\n )\n }\n\n const [first, ...counter] = verification.signatures\n const check = async (file: File | undefined) => {\n if (!file) return\n setCopy({ state: 'checking', name: file.name })\n try {\n setCopy({ state: 'done', name: file.name, match: await matchSignedCopy(file, verification) })\n } catch {\n setCopy({ state: 'failed', name: file.name })\n }\n }\n const onDrop = (e: DragEvent) => {\n e.preventDefault()\n setDragging(false)\n void check(e.dataTransfer.files[0])\n }\n\n return (\n <Frame>\n <section className=\"space-y-3\">\n {first && (\n <p className=\"text-base\" data-testid=\"signature-certificate-signer\">\n Signed by <strong>{first.signer_name || 'an ARBI user'}</strong> on{' '}\n {formatDate(first.signed_at)}\n </p>\n )}\n {counter.length > 0 && (\n <ul className=\"space-y-1 text-sm\" data-testid=\"signature-certificate-counter\">\n {counter.map((s, i) => (\n <li key={`${s.sha256}-${i}`}>\n Also signed by <strong>{s.signer_name || 'an ARBI user'}</strong> on{' '}\n {formatDate(s.signed_at)}\n </li>\n ))}\n </ul>\n )}\n <p className=\"text-sm text-muted-foreground\">\n ARBI checks that this document hasn’t changed since it was signed. If anything changed,\n this check fails.\n </p>\n <p\n className={cn(\n 'rounded-md border px-3 py-2 font-medium',\n verification.intact\n ? 'border-green-border bg-green-bg text-green-text'\n : 'border-red-text text-red-text'\n )}\n role=\"status\"\n data-testid=\"signature-certificate-result\"\n data-intact={verification.intact}\n >\n {verification.intact\n ? '✓ Unchanged since signing'\n : '✗ Changed since signing: this is not the document that was signed'}\n </p>\n </section>\n\n {allowCopyCheck && (\n <section className=\"mt-8 space-y-2\">\n <h2 className=\"text-sm font-medium\">Check your copy</h2>\n <div\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'flex min-h-24 cursor-pointer flex-col items-center justify-center rounded-md border border-dashed px-4 py-6 text-center text-sm text-muted-foreground pointer-coarse:min-h-32',\n dragging && 'border-primary bg-muted'\n )}\n data-testid=\"signature-certificate-dropzone\"\n onClick={() => input.current?.click()}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n input.current?.click()\n }\n }}\n onDragOver={(e) => {\n e.preventDefault()\n setDragging(true)\n }}\n onDragLeave={() => setDragging(false)}\n onDrop={onDrop}\n >\n Drop the PDF you were sent here, or choose it\n <span className=\"mt-1 text-xs\">It is checked in this browser and never uploaded.</span>\n <input\n ref={input}\n type=\"file\"\n accept=\"application/pdf,.pdf\"\n className=\"sr-only\"\n data-testid=\"signature-certificate-file-input\"\n onChange={(e) => void check(e.target.files?.[0])}\n />\n </div>\n {copy.state !== 'idle' && (\n <p\n className={cn(\n 'text-sm',\n copy.state === 'done' && copy.match.kind !== 'none' && 'text-green-text',\n ((copy.state === 'done' && copy.match.kind === 'none') ||\n copy.state === 'failed') &&\n 'text-red-text'\n )}\n role=\"status\"\n data-testid=\"signature-certificate-copy-result\"\n >\n {copy.state === 'checking'\n ? `Checking ${copy.name}…`\n : copy.state === 'failed'\n ? `${copy.name} could not be read.`\n : copyResult(copy.name, copy.match)}\n </p>\n )}\n </section>\n )}\n\n {reference && (\n <p\n className=\"mt-8 text-xs text-muted-foreground\"\n data-testid=\"signature-certificate-reference\"\n >\n Reference {reference}\n </p>\n )}\n </Frame>\n )\n}\n","/**\n * The bar above an older version opened read-only: which version it is, \"Ask about this version\"\n * (when the host has an assistant) and the way back to the current version. Put it in the viewer's\n * sticky header, not the content area: a PDF view scrolls its first page into view, which would\n * scroll a bar above it out of sight.\n */\n\nimport type { ReactElement } from 'react'\n\nconst LINK = 'font-medium text-primary hover:underline pointer-coarse:min-h-11'\n\nexport interface VersionSnapshotBarLabels {\n /** `Version 2 · read only`; `number` is undefined when the version is not known. */\n title: (number: number | undefined) => string\n ask: string\n returnToCurrent: string\n /** For documents edited live (Word, artifacts), where \"current\" is the live document. */\n returnToLive: string\n}\n\nexport const DEFAULT_VERSION_SNAPSHOT_BAR_LABELS: VersionSnapshotBarLabels = {\n title: (number) => `${number ? `Version ${number}` : 'Saved version'} · read only`,\n ask: 'Ask about this version',\n returnToCurrent: 'Return to current version',\n returnToLive: 'Return to live document',\n}\n\nexport interface VersionSnapshotBarProps {\n /** The version's number, when known. */\n versionNumber?: number\n /** The document is edited live: the way back says \"live document\". */\n live?: boolean\n /** Ask the assistant about this version. Omitted: no ask action. */\n onAsk?: () => void\n onReturn: () => void\n labels?: Partial<VersionSnapshotBarLabels>\n}\n\nexport function VersionSnapshotBar({\n versionNumber,\n live = false,\n onAsk,\n onReturn,\n labels: overrides,\n}: VersionSnapshotBarProps): ReactElement {\n const labels = { ...DEFAULT_VERSION_SNAPSHOT_BAR_LABELS, ...overrides }\n return (\n <div\n className=\"flex items-center justify-between border-b px-3 py-2 text-xs\"\n data-testid=\"version-snapshot-bar\"\n >\n <span>{labels.title(versionNumber)}</span>\n <span className=\"flex items-center gap-3\">\n {onAsk && (\n <button type=\"button\" className={LINK} data-testid=\"version-snapshot-ask\" onClick={onAsk}>\n {labels.ask}\n </button>\n )}\n <button\n type=\"button\"\n className={LINK}\n data-testid=\"version-snapshot-return\"\n onClick={onReturn}\n >\n {live ? labels.returnToLive : labels.returnToCurrent}\n </button>\n </span>\n </div>\n )\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Number the selected documents as a production set: Bates labels, optional QR codes back to each
|
|
3
|
+
* document, an optional index page. The result is downloaded (one PDF, or a ZIP with each file and
|
|
4
|
+
* an `index.csv`) and, unless turned off, saved to the workspace as new documents derived from
|
|
5
|
+
* their sources (role `production`) in the Productions folder. The originals never change.
|
|
6
|
+
*
|
|
7
|
+
* Needs a `<DocumentToolsProvider>`: the API client fetches each PDF, `uploadDocument` saves the
|
|
8
|
+
* result, `saveFile` downloads it, `notify` reports, `onDocumentsChanged(ids, 'copy')` refreshes the
|
|
9
|
+
* host's lists and `openDocument` backs the "Open" action. The selected documents are used as
|
|
10
|
+
* they are (select a frozen or redacted copy to produce that copy); a non-PDF is numbered through
|
|
11
|
+
* its PDF version and one without a PDF version is left out. pdf-lib and JSZip load on confirm.
|
|
12
|
+
*/
|
|
13
|
+
import { type ReactElement } from 'react';
|
|
14
|
+
import { type ProductionSource } from '@arbidocs/react/document-tools';
|
|
15
|
+
export interface ProductionSetDialogProps {
|
|
16
|
+
open: boolean;
|
|
17
|
+
onOpenChange: (open: boolean) => void;
|
|
18
|
+
/** The selected documents, in list order (the dialog lets the user reorder them). */
|
|
19
|
+
documents: readonly ProductionSource[];
|
|
20
|
+
/** The link a document's QR code opens: the document in this app. */
|
|
21
|
+
documentUrl: (documentId: string) => string;
|
|
22
|
+
}
|
|
23
|
+
export declare function ProductionSetDialog({ open, onOpenChange, documents, documentUrl, }: ProductionSetDialogProps): ReactElement;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
require('../../chunk-DES3K4SD.cjs');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var annotations = require('@arbidocs/react/annotations');
|
|
7
|
+
var documentTools = require('@arbidocs/react/document-tools');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function ProductionSetDialog({
|
|
11
|
+
open,
|
|
12
|
+
onOpenChange,
|
|
13
|
+
documents,
|
|
14
|
+
documentUrl
|
|
15
|
+
}) {
|
|
16
|
+
const { client, user, notify, saveFile, uploadDocument, onDocumentsChanged, openDocument } = documentTools.useDocumentTools();
|
|
17
|
+
const [busy, setBusy] = react.useState(false);
|
|
18
|
+
const [progress, setProgress] = react.useState(null);
|
|
19
|
+
const [error, setError] = react.useState(null);
|
|
20
|
+
const { candidates, leftOut } = react.useMemo(
|
|
21
|
+
() => ({
|
|
22
|
+
candidates: documents.filter((doc) => !documentTools.hasNoRendition(doc)),
|
|
23
|
+
leftOut: documents.filter(documentTools.hasNoRendition)
|
|
24
|
+
}),
|
|
25
|
+
[documents]
|
|
26
|
+
);
|
|
27
|
+
async function handleConfirm(choices) {
|
|
28
|
+
setBusy(true);
|
|
29
|
+
setError(null);
|
|
30
|
+
try {
|
|
31
|
+
const production = await documentTools.buildProduction(client, candidates, choices, {
|
|
32
|
+
documentUrl,
|
|
33
|
+
author: user?.name,
|
|
34
|
+
onProgress: (done, total) => setProgress({ done, total })
|
|
35
|
+
});
|
|
36
|
+
const { files, title, folder } = production;
|
|
37
|
+
if (files.length === 1) {
|
|
38
|
+
const [file] = files;
|
|
39
|
+
saveFile(new Blob([file.bytes], { type: "application/pdf" }), file.name);
|
|
40
|
+
} else {
|
|
41
|
+
const { default: JSZip } = await import('../../lib-6QPUXAQS.cjs');
|
|
42
|
+
const zip = new JSZip();
|
|
43
|
+
for (const file of files) zip.file(file.name, file.bytes);
|
|
44
|
+
zip.file("index.csv", documentTools.productionIndexCsv(production.index));
|
|
45
|
+
saveFile(await zip.generateAsync({ type: "blob" }), `${title}.zip`);
|
|
46
|
+
}
|
|
47
|
+
let savedIds = [];
|
|
48
|
+
if (choices.saveToWorkspace) {
|
|
49
|
+
try {
|
|
50
|
+
savedIds = await documentTools.saveProductionFiles(uploadDocument, production.uploads, folder);
|
|
51
|
+
if (savedIds.length) await onDocumentsChanged?.(savedIds, "copy");
|
|
52
|
+
} catch (e) {
|
|
53
|
+
notify(
|
|
54
|
+
`The production was downloaded but not saved to the workspace: ${e instanceof Error ? e.message : "upload failed"}`,
|
|
55
|
+
"error"
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (production.noRendition.length > 0) {
|
|
60
|
+
notify(
|
|
61
|
+
`Left out, with no PDF version yet: ${production.noRendition.map(documentTools.productionDocumentName).join(", ")}`,
|
|
62
|
+
"warning"
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
const openSaved = savedIds.length === 1 && openDocument ? savedIds[0] : null;
|
|
66
|
+
notify(
|
|
67
|
+
savedIds.length > 0 ? "Production set downloaded and saved to the workspace" : "Production set downloaded",
|
|
68
|
+
"success",
|
|
69
|
+
{
|
|
70
|
+
description: savedIds.length > 0 ? `In ${folder}` : void 0,
|
|
71
|
+
action: openSaved ? { label: "Open", onClick: () => openDocument?.(openSaved) } : void 0
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
onOpenChange(false);
|
|
75
|
+
} catch (e) {
|
|
76
|
+
setError(e instanceof Error ? e.message : "The production set could not be created");
|
|
77
|
+
} finally {
|
|
78
|
+
setBusy(false);
|
|
79
|
+
setProgress(null);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
83
|
+
annotations.ProductionDialog,
|
|
84
|
+
{
|
|
85
|
+
open,
|
|
86
|
+
onOpenChange,
|
|
87
|
+
documents: candidates.map((doc) => ({
|
|
88
|
+
id: doc.external_id,
|
|
89
|
+
name: documentTools.productionDocumentName(doc)
|
|
90
|
+
})),
|
|
91
|
+
leftOut: leftOut.map(documentTools.productionDocumentName),
|
|
92
|
+
onConfirm: (choices) => void handleConfirm(choices),
|
|
93
|
+
busy,
|
|
94
|
+
progress,
|
|
95
|
+
error
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
exports.ProductionSetDialog = ProductionSetDialog;
|
|
101
|
+
//# sourceMappingURL=index.cjs.map
|
|
102
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/document-tools/production/ProductionSetDialog.tsx"],"names":["useDocumentTools","useState","useMemo","hasNoRendition","buildProduction","productionIndexCsv","saveProductionFiles","productionDocumentName","jsx","ProductionDialog"],"mappings":";;;;;;;;AAkCO,SAAS,mBAAA,CAAoB;AAAA,EAClC,IAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAA2C;AACzC,EAAA,MAAM,EAAE,QAAQ,IAAA,EAAM,MAAA,EAAQ,UAAU,cAAA,EAAgB,kBAAA,EAAoB,YAAA,EAAa,GACvFA,8BAAA,EAAiB;AACnB,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAIC,eAAS,KAAK,CAAA;AACtC,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAIA,eAAiD,IAAI,CAAA;AACrF,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAIA,eAAwB,IAAI,CAAA;AAEtD,EAAA,MAAM,EAAE,UAAA,EAAY,OAAA,EAAQ,GAAIC,aAAA;AAAA,IAC9B,OAAO;AAAA,MACL,UAAA,EAAY,UAAU,MAAA,CAAO,CAAC,QAAQ,CAACC,4BAAA,CAAe,GAAG,CAAC,CAAA;AAAA,MAC1D,OAAA,EAAS,SA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AACV,MAAA,QAAA,CAAS,CAAA,YAAa,KAAA,GAAQ,CAAA,CAAE,OAAA,GAAU,yCAAyC,CAAA;AAAA,IACrF,CAAA,SAAE;AACA,MAAA,OAAA,CAAQ,KAAK,CAAA;AACb,MAAA,WAAA,CAAY,IAAI,CAAA;AAAA,IAClB;AAAA,EACF;AAEA,EAAA,uBACEC,cAAA;AAAA,IAACC,4BAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA,EAAW,UAAA,CAAW,GAAA,CAAI,CAAC,GAAA,MAAS;AAAA,QAClC,IAAI,GAAA,CAAI,WAAA;AAAA,QACR,IAAA,EAAMF,qCAAuB,GAAG;AAAA,OAClC,CAAE,CAAA;AAAA,MACF,OAAA,EAAS,OAAA,CAAQ,GAAA,CAAIA,oCAAsB,CAAA;AAAA,MAC3C,SAAA,EAAW,CAAC,OAAA,KAAY,KAAK,cAAc,OAAO,CAAA;AAAA,MAClD,IAAA;AAAA,MACA,QAAA;AAAA,MACA;AAAA;AAAA,GACF;AAEJ","file":"index.cjs","sourcesContent":["/**\n * Number the selected documents as a production set: Bates labels, optional QR codes back to each\n * document, an optional index page. The result is downloaded (one PDF, or a ZIP with each file and\n * an `index.csv`) and, unless turned off, saved to the workspace as new documents derived from\n * their sources (role `production`) in the Productions folder. The originals never change.\n *\n * Needs a `<DocumentToolsProvider>`: the API client fetches each PDF, `uploadDocument` saves the\n * result, `saveFile` downloads it, `notify` reports, `onDocumentsChanged(ids, 'copy')` refreshes the\n * host's lists and `openDocument` backs the \"Open\" action. The selected documents are used as\n * they are (select a frozen or redacted copy to produce that copy); a non-PDF is numbered through\n * its PDF version and one without a PDF version is left out. pdf-lib and JSZip load on confirm.\n */\n\nimport { useMemo, useState, type ReactElement } from 'react'\nimport { ProductionDialog, type ProductionChoices } from '@arbidocs/react/annotations'\nimport {\n buildProduction,\n hasNoRendition,\n productionDocumentName,\n productionIndexCsv,\n saveProductionFiles,\n useDocumentTools,\n type ProductionSource,\n} from '@arbidocs/react/document-tools'\n\nexport interface ProductionSetDialogProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n /** The selected documents, in list order (the dialog lets the user reorder them). */\n documents: readonly ProductionSource[]\n /** The link a document's QR code opens: the document in this app. */\n documentUrl: (documentId: string) => string\n}\n\nexport function ProductionSetDialog({\n open,\n onOpenChange,\n documents,\n documentUrl,\n}: ProductionSetDialogProps): ReactElement {\n const { client, user, notify, saveFile, uploadDocument, onDocumentsChanged, openDocument } =\n useDocumentTools()\n const [busy, setBusy] = useState(false)\n const [progress, setProgress] = useState<{ done: number; total: number } | null>(null)\n const [error, setError] = useState<string | null>(null)\n\n const { candidates, leftOut } = useMemo(\n () => ({\n candidates: documents.filter((doc) => !hasNoRendition(doc)),\n leftOut: documents.filter(hasNoRendition),\n }),\n [documents]\n )\n\n async function handleConfirm(choices: ProductionChoices) {\n setBusy(true)\n setError(null)\n try {\n const production = await buildProduction(client, candidates, choices, {\n documentUrl,\n author: user?.name,\n onProgress: (done, total) => setProgress({ done, total }),\n })\n const { files, title, folder } = production\n\n if (files.length === 1) {\n const [file] = files\n saveFile(new Blob([file.bytes as BlobPart], { type: 'application/pdf' }), file.name)\n } else {\n const { default: JSZip } = await import('jszip')\n const zip = new JSZip()\n for (const file of files) zip.file(file.name, file.bytes)\n zip.file('index.csv', productionIndexCsv(production.index))\n saveFile(await zip.generateAsync({ type: 'blob' }), `${title}.zip`)\n }\n\n let savedIds: string[] = []\n if (choices.saveToWorkspace) {\n try {\n savedIds = await saveProductionFiles(uploadDocument, production.uploads, folder)\n if (savedIds.length) await onDocumentsChanged?.(savedIds, 'copy')\n } catch (e) {\n notify(\n `The production was downloaded but not saved to the workspace: ${\n e instanceof Error ? e.message : 'upload failed'\n }`,\n 'error'\n )\n }\n }\n\n if (production.noRendition.length > 0) {\n notify(\n `Left out, with no PDF version yet: ${production.noRendition\n .map(productionDocumentName)\n .join(', ')}`,\n 'warning'\n )\n }\n const openSaved = savedIds.length === 1 && openDocument ? savedIds[0] : null\n notify(\n savedIds.length > 0\n ? 'Production set downloaded and saved to the workspace'\n : 'Production set downloaded',\n 'success',\n {\n description: savedIds.length > 0 ? `In ${folder}` : undefined,\n action: openSaved\n ? { label: 'Open', onClick: () => openDocument?.(openSaved) }\n : undefined,\n }\n )\n onOpenChange(false)\n } catch (e) {\n setError(e instanceof Error ? e.message : 'The production set could not be created')\n } finally {\n setBusy(false)\n setProgress(null)\n }\n }\n\n return (\n <ProductionDialog\n open={open}\n onOpenChange={onOpenChange}\n documents={candidates.map((doc) => ({\n id: doc.external_id,\n name: productionDocumentName(doc),\n }))}\n leftOut={leftOut.map(productionDocumentName)}\n onConfirm={(choices) => void handleConfirm(choices)}\n busy={busy}\n progress={progress}\n error={error}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProductionSetDialog, type ProductionSetDialogProps } from './ProductionSetDialog';
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import '../../chunk-VUNV25KB.js';
|
|
3
|
+
import { useState, useMemo } from 'react';
|
|
4
|
+
import { ProductionDialog } from '@arbidocs/react/annotations';
|
|
5
|
+
import { useDocumentTools, hasNoRendition, productionDocumentName, buildProduction, productionIndexCsv, saveProductionFiles } from '@arbidocs/react/document-tools';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function ProductionSetDialog({
|
|
9
|
+
open,
|
|
10
|
+
onOpenChange,
|
|
11
|
+
documents,
|
|
12
|
+
documentUrl
|
|
13
|
+
}) {
|
|
14
|
+
const { client, user, notify, saveFile, uploadDocument, onDocumentsChanged, openDocument } = useDocumentTools();
|
|
15
|
+
const [busy, setBusy] = useState(false);
|
|
16
|
+
const [progress, setProgress] = useState(null);
|
|
17
|
+
const [error, setError] = useState(null);
|
|
18
|
+
const { candidates, leftOut } = useMemo(
|
|
19
|
+
() => ({
|
|
20
|
+
candidates: documents.filter((doc) => !hasNoRendition(doc)),
|
|
21
|
+
leftOut: documents.filter(hasNoRendition)
|
|
22
|
+
}),
|
|
23
|
+
[documents]
|
|
24
|
+
);
|
|
25
|
+
async function handleConfirm(choices) {
|
|
26
|
+
setBusy(true);
|
|
27
|
+
setError(null);
|
|
28
|
+
try {
|
|
29
|
+
const production = await buildProduction(client, candidates, choices, {
|
|
30
|
+
documentUrl,
|
|
31
|
+
author: user?.name,
|
|
32
|
+
onProgress: (done, total) => setProgress({ done, total })
|
|
33
|
+
});
|
|
34
|
+
const { files, title, folder } = production;
|
|
35
|
+
if (files.length === 1) {
|
|
36
|
+
const [file] = files;
|
|
37
|
+
saveFile(new Blob([file.bytes], { type: "application/pdf" }), file.name);
|
|
38
|
+
} else {
|
|
39
|
+
const { default: JSZip } = await import('../../lib-NRGL2JGF.js');
|
|
40
|
+
const zip = new JSZip();
|
|
41
|
+
for (const file of files) zip.file(file.name, file.bytes);
|
|
42
|
+
zip.file("index.csv", productionIndexCsv(production.index));
|
|
43
|
+
saveFile(await zip.generateAsync({ type: "blob" }), `${title}.zip`);
|
|
44
|
+
}
|
|
45
|
+
let savedIds = [];
|
|
46
|
+
if (choices.saveToWorkspace) {
|
|
47
|
+
try {
|
|
48
|
+
savedIds = await saveProductionFiles(uploadDocument, production.uploads, folder);
|
|
49
|
+
if (savedIds.length) await onDocumentsChanged?.(savedIds, "copy");
|
|
50
|
+
} catch (e) {
|
|
51
|
+
notify(
|
|
52
|
+
`The production was downloaded but not saved to the workspace: ${e instanceof Error ? e.message : "upload failed"}`,
|
|
53
|
+
"error"
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (production.noRendition.length > 0) {
|
|
58
|
+
notify(
|
|
59
|
+
`Left out, with no PDF version yet: ${production.noRendition.map(productionDocumentName).join(", ")}`,
|
|
60
|
+
"warning"
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
const openSaved = savedIds.length === 1 && openDocument ? savedIds[0] : null;
|
|
64
|
+
notify(
|
|
65
|
+
savedIds.length > 0 ? "Production set downloaded and saved to the workspace" : "Production set downloaded",
|
|
66
|
+
"success",
|
|
67
|
+
{
|
|
68
|
+
description: savedIds.length > 0 ? `In ${folder}` : void 0,
|
|
69
|
+
action: openSaved ? { label: "Open", onClick: () => openDocument?.(openSaved) } : void 0
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
onOpenChange(false);
|
|
73
|
+
} catch (e) {
|
|
74
|
+
setError(e instanceof Error ? e.message : "The production set could not be created");
|
|
75
|
+
} finally {
|
|
76
|
+
setBusy(false);
|
|
77
|
+
setProgress(null);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
ProductionDialog,
|
|
82
|
+
{
|
|
83
|
+
open,
|
|
84
|
+
onOpenChange,
|
|
85
|
+
documents: candidates.map((doc) => ({
|
|
86
|
+
id: doc.external_id,
|
|
87
|
+
name: productionDocumentName(doc)
|
|
88
|
+
})),
|
|
89
|
+
leftOut: leftOut.map(productionDocumentName),
|
|
90
|
+
onConfirm: (choices) => void handleConfirm(choices),
|
|
91
|
+
busy,
|
|
92
|
+
progress,
|
|
93
|
+
error
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { ProductionSetDialog };
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/document-tools/production/ProductionSetDialog.tsx"],"names":[],"mappings":";;;;;;AAkCO,SAAS,mBAAA,CAAoB;AAAA,EAClC,IAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAA2C;AACzC,EAAA,MAAM,EAAE,QAAQ,IAAA,EAAM,MAAA,EAAQ,UAAU,cAAA,EAAgB,kBAAA,EAAoB,YAAA,EAAa,GACvF,gBAAA,EAAiB;AACnB,EA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AA,QACE,QAAA,CAAS,MAAA,GAAS,CAAA,GACd,sDAAA,GACA,2BAAA;AAAA,QACJ,SAAA;AAAA,QACA;AAAA,UACE,aAAa,QAAA,CAAS,MAAA,GAAS,CAAA,GAAI,CAAA,GAAA,EAAM,MAAM,CAAA,CAAA,GAAK,KAAA,CAAA;AAAA,UACpD,MAAA,EAAQ,SAAA,GACJ,EAAE,KAAA,EAAO,MAAA,EAAQ,SAAS,MAAM,YAAA,GAAe,SAAS,CAAA,EAAE,GAC1D,KAAA;AAAA;AACN,OACF;AACA,MAAA,YAAA,CAAa,KAAK,CAAA;AAAA,IACpB,SAAS,CAAA,EAAG;AACV,MAAA,QAAA,CAAS,CAAA,YAAa,KAAA,GAAQ,CAAA,CAAE,OAAA,GAAU,yCAAyC,CAAA;AAAA,IACrF,CAAA,SAAE;AACA,MAAA,OAAA,CAAQ,KAAK,CAAA;AACb,MAAA,WAAA,CAAY,IAAI,CAAA;AAAA,IAClB;AAAA,EACF;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA,EAAW,UAAA,CAAW,GAAA,CAAI,CAAC,GAAA,MAAS;AAAA,QAClC,IAAI,GAAA,CAAI,WAAA;AAAA,QACR,IAAA,EAAM,uBAAuB,GAAG;AAAA,OAClC,CAAE,CAAA;AAAA,MACF,OAAA,EAAS,OAAA,CAAQ,GAAA,CAAI,sBAAsB,CAAA;AAAA,MAC3C,SAAA,EAAW,CAAC,OAAA,KAAY,KAAK,cAAc,OAAO,CAAA;AAAA,MAClD,IAAA;AAAA,MACA,QAAA;AAAA,MACA;AAAA;AAAA,GACF;AAEJ","file":"index.js","sourcesContent":["/**\n * Number the selected documents as a production set: Bates labels, optional QR codes back to each\n * document, an optional index page. The result is downloaded (one PDF, or a ZIP with each file and\n * an `index.csv`) and, unless turned off, saved to the workspace as new documents derived from\n * their sources (role `production`) in the Productions folder. The originals never change.\n *\n * Needs a `<DocumentToolsProvider>`: the API client fetches each PDF, `uploadDocument` saves the\n * result, `saveFile` downloads it, `notify` reports, `onDocumentsChanged(ids, 'copy')` refreshes the\n * host's lists and `openDocument` backs the \"Open\" action. The selected documents are used as\n * they are (select a frozen or redacted copy to produce that copy); a non-PDF is numbered through\n * its PDF version and one without a PDF version is left out. pdf-lib and JSZip load on confirm.\n */\n\nimport { useMemo, useState, type ReactElement } from 'react'\nimport { ProductionDialog, type ProductionChoices } from '@arbidocs/react/annotations'\nimport {\n buildProduction,\n hasNoRendition,\n productionDocumentName,\n productionIndexCsv,\n saveProductionFiles,\n useDocumentTools,\n type ProductionSource,\n} from '@arbidocs/react/document-tools'\n\nexport interface ProductionSetDialogProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n /** The selected documents, in list order (the dialog lets the user reorder them). */\n documents: readonly ProductionSource[]\n /** The link a document's QR code opens: the document in this app. */\n documentUrl: (documentId: string) => string\n}\n\nexport function ProductionSetDialog({\n open,\n onOpenChange,\n documents,\n documentUrl,\n}: ProductionSetDialogProps): ReactElement {\n const { client, user, notify, saveFile, uploadDocument, onDocumentsChanged, openDocument } =\n useDocumentTools()\n const [busy, setBusy] = useState(false)\n const [progress, setProgress] = useState<{ done: number; total: number } | null>(null)\n const [error, setError] = useState<string | null>(null)\n\n const { candidates, leftOut } = useMemo(\n () => ({\n candidates: documents.filter((doc) => !hasNoRendition(doc)),\n leftOut: documents.filter(hasNoRendition),\n }),\n [documents]\n )\n\n async function handleConfirm(choices: ProductionChoices) {\n setBusy(true)\n setError(null)\n try {\n const production = await buildProduction(client, candidates, choices, {\n documentUrl,\n author: user?.name,\n onProgress: (done, total) => setProgress({ done, total }),\n })\n const { files, title, folder } = production\n\n if (files.length === 1) {\n const [file] = files\n saveFile(new Blob([file.bytes as BlobPart], { type: 'application/pdf' }), file.name)\n } else {\n const { default: JSZip } = await import('jszip')\n const zip = new JSZip()\n for (const file of files) zip.file(file.name, file.bytes)\n zip.file('index.csv', productionIndexCsv(production.index))\n saveFile(await zip.generateAsync({ type: 'blob' }), `${title}.zip`)\n }\n\n let savedIds: string[] = []\n if (choices.saveToWorkspace) {\n try {\n savedIds = await saveProductionFiles(uploadDocument, production.uploads, folder)\n if (savedIds.length) await onDocumentsChanged?.(savedIds, 'copy')\n } catch (e) {\n notify(\n `The production was downloaded but not saved to the workspace: ${\n e instanceof Error ? e.message : 'upload failed'\n }`,\n 'error'\n )\n }\n }\n\n if (production.noRendition.length > 0) {\n notify(\n `Left out, with no PDF version yet: ${production.noRendition\n .map(productionDocumentName)\n .join(', ')}`,\n 'warning'\n )\n }\n const openSaved = savedIds.length === 1 && openDocument ? savedIds[0] : null\n notify(\n savedIds.length > 0\n ? 'Production set downloaded and saved to the workspace'\n : 'Production set downloaded',\n 'success',\n {\n description: savedIds.length > 0 ? `In ${folder}` : undefined,\n action: openSaved\n ? { label: 'Open', onClick: () => openDocument?.(openSaved) }\n : undefined,\n }\n )\n onOpenChange(false)\n } catch (e) {\n setError(e instanceof Error ? e.message : 'The production set could not be created')\n } finally {\n setBusy(false)\n setProgress(null)\n }\n }\n\n return (\n <ProductionDialog\n open={open}\n onOpenChange={onOpenChange}\n documents={candidates.map((doc) => ({\n id: doc.external_id,\n name: productionDocumentName(doc),\n }))}\n leftOut={leftOut.map(productionDocumentName)}\n onConfirm={(choices) => void handleConfirm(choices)}\n busy={busy}\n progress={progress}\n error={error}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The PDF viewer with the document's MARKUP on it: toolbar, per-page overlay and the freeze dialog.
|
|
3
|
+
*
|
|
4
|
+
* The original is never touched. The marks are the version's markup on the server (native PDF
|
|
5
|
+
* annotations in its `{doc}-markup.pdf`, see `createMarkupStore` in `@arbidocs/react/document-tools`),
|
|
6
|
+
* with the document's own privacy:
|
|
7
|
+
* a shared document has one markup that owners and collaborators edit and guests read; a private
|
|
8
|
+
* one is its owner's. Edits autosave a few seconds after the last change and when the viewer
|
|
9
|
+
* closes; colleagues' changes are merged in. "Freeze" renders a new PDF with the marks built in and
|
|
10
|
+
* saves it as a separate document derived from the original (see `uploadFrozenCopy`). Load it
|
|
11
|
+
* lazily: it brings in pdf-lib, which nothing else needs.
|
|
12
|
+
*
|
|
13
|
+
* Needs a `<DocumentToolsProvider>` (API client, user, notify, open, refresh) inside a React Query
|
|
14
|
+
* `QueryClientProvider`. `viewer` is the PDF viewer to draw on (default: the kit `PdfViewer`); a host
|
|
15
|
+
* passes its own binding of it, e.g. one that reports the visible page.
|
|
16
|
+
*
|
|
17
|
+
* `editing` off is the default reading view: the marks show and comments open, read-only, with no
|
|
18
|
+
* toolbar. Unsaved edits still go out when switching from editing to reading.
|
|
19
|
+
*/
|
|
20
|
+
import { type ComponentType } from 'react';
|
|
21
|
+
import { type AnnotationStore } from '@arbidocs/react/annotations';
|
|
22
|
+
import { type MarkupSnapshot } from '@arbidocs/react/document-tools';
|
|
23
|
+
import { type PdfViewerProps } from '@arbidocs/react/viewers';
|
|
24
|
+
/** Autosave this long after the last change (the design's "a few seconds"). */
|
|
25
|
+
export declare const MARKUP_AUTOSAVE_MS = 2500;
|
|
26
|
+
/** Look for colleagues' changes this often while idle. */
|
|
27
|
+
export declare const MARKUP_PULL_MS = 20000;
|
|
28
|
+
/** The PDF viewer the marks are drawn on: the kit viewer's props, with a page-overlay slot. */
|
|
29
|
+
export type DocumentPdfViewer = ComponentType<PdfViewerProps>;
|
|
30
|
+
export interface AnnotatedPdfViewerProps extends Omit<PdfViewerProps, 'file' | 'renderPageOverlay'> {
|
|
31
|
+
file: Blob;
|
|
32
|
+
documentId: string;
|
|
33
|
+
/** The version on screen when it is not the current one (its markup is shown, read-only). */
|
|
34
|
+
version?: number;
|
|
35
|
+
fileName: string | null | undefined;
|
|
36
|
+
/** The original's workspace sharing and folder, which the frozen copy takes. */
|
|
37
|
+
shared?: boolean;
|
|
38
|
+
folder?: string | null;
|
|
39
|
+
/** Annotate mode (toolbar, tools). Off: the marks are shown read-only. Default on. */
|
|
40
|
+
editing?: boolean;
|
|
41
|
+
/** After each save: the markup's revision and how many marks it holds. */
|
|
42
|
+
onMarkupChange?: (snapshot: MarkupSnapshot) => void;
|
|
43
|
+
/** Where the layer lives; defaults to the version's markup on the server. */
|
|
44
|
+
store?: AnnotationStore;
|
|
45
|
+
/** The PDF viewer to draw on. Default: the kit `PdfViewer` from `@arbidocs/react/viewers`. */
|
|
46
|
+
viewer?: DocumentPdfViewer;
|
|
47
|
+
/**
|
|
48
|
+
* The version is signed, so locked: marks still go in the markup layer, but there is no
|
|
49
|
+
* "Download with markup" (they are never written into its PDF).
|
|
50
|
+
*/
|
|
51
|
+
signed?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export declare function AnnotatedPdfViewer({ file, documentId, version, fileName, shared, folder, editing, onMarkupChange, store: storeOverride, viewer: PdfViewer, signed, ...viewerProps }: AnnotatedPdfViewerProps): import("react").JSX.Element;
|
|
54
|
+
export default AnnotatedPdfViewer;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Choose where a signature goes: the PDF with the annotation overlay's box tool, kept in memory
|
|
3
|
+
* only. The box is not an annotation; it is handed to the Sign dialog, and the backend draws the
|
|
4
|
+
* signature there. Needs no `<DocumentToolsProvider>`.
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactElement } from 'react';
|
|
7
|
+
import { type SignatureAppearance } from '@arbidocs/react/document-tools';
|
|
8
|
+
import { type PdfViewerProps } from '@arbidocs/react/viewers';
|
|
9
|
+
import type { DocumentPdfViewer } from './AnnotatedPdfViewer';
|
|
10
|
+
export interface SignaturePlacementViewerProps extends Omit<PdfViewerProps, 'file' | 'renderPageOverlay'> {
|
|
11
|
+
file: Blob;
|
|
12
|
+
documentId: string;
|
|
13
|
+
onCancel: () => void;
|
|
14
|
+
/** The chosen box, or undefined for the default spot (bottom of the last page). */
|
|
15
|
+
onContinue: (appearance: SignatureAppearance | undefined) => void;
|
|
16
|
+
/** The PDF viewer to draw on. Default: the kit `PdfViewer` from `@arbidocs/react/viewers`. */
|
|
17
|
+
viewer?: DocumentPdfViewer;
|
|
18
|
+
}
|
|
19
|
+
export declare function SignaturePlacementViewer({ file, documentId, onCancel, onContinue, viewer: PdfViewer, ...viewerProps }: SignaturePlacementViewerProps): ReactElement;
|
|
20
|
+
export default SignaturePlacementViewer;
|