@arbidocs/blocks 0.4.83 → 0.4.85
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/MailBodyEditor-5PIQLYVY.js +217 -0
- package/dist/MailBodyEditor-5PIQLYVY.js.map +1 -0
- package/dist/MailBodyEditor-D7MGJMLH.cjs +223 -0
- package/dist/MailBodyEditor-D7MGJMLH.cjs.map +1 -0
- package/dist/agents/index.cjs +281 -280
- package/dist/agents/index.js +6 -5
- package/dist/agents/workflows/StepBarFrame.d.ts +3 -1
- package/dist/agents/workflows/WorkflowRunner.d.ts +10 -1
- package/dist/agents/workflows/run.d.ts +24 -3
- package/dist/agents/workflows/stepWindow.d.ts +4 -2
- package/dist/agents/workflows/types.d.ts +5 -0
- package/dist/agents/workflows/useWorkflowView.d.ts +16 -1
- package/dist/chat/index.cjs +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/{chunk-FE4ULGOR.js → chunk-2YOVK524.js} +28 -5
- package/dist/chunk-2YOVK524.js.map +1 -0
- package/dist/chunk-3R6XBYL7.cjs +576 -0
- package/dist/chunk-3R6XBYL7.cjs.map +1 -0
- package/dist/{chunk-CKB64Z4R.js → chunk-4XJZ6AAY.js} +6 -245
- package/dist/chunk-4XJZ6AAY.js.map +1 -0
- package/dist/{chunk-SB5ZKOYN.js → chunk-7C35WXYB.js} +4 -63
- package/dist/chunk-7C35WXYB.js.map +1 -0
- package/dist/chunk-7RJTEWYM.js +362 -0
- package/dist/chunk-7RJTEWYM.js.map +1 -0
- package/dist/chunk-AFSOUS5X.cjs +253 -0
- package/dist/chunk-AFSOUS5X.cjs.map +1 -0
- package/dist/{chunk-F4RUCUXF.cjs → chunk-C2HRZSAT.cjs} +2 -63
- package/dist/chunk-C2HRZSAT.cjs.map +1 -0
- package/dist/{chunk-RX35SMPR.js → chunk-FHOZMT5P.js} +7 -6
- package/dist/chunk-FHOZMT5P.js.map +1 -0
- package/dist/{chunk-ZVBPRMHJ.cjs → chunk-JH6JTI76.cjs} +27 -4
- package/dist/chunk-JH6JTI76.cjs.map +1 -0
- package/dist/{chunk-CONIA2ZA.js → chunk-KHY4PYU7.js} +246 -146
- package/dist/chunk-KHY4PYU7.js.map +1 -0
- package/dist/chunk-LGX6UFYG.js +557 -0
- package/dist/chunk-LGX6UFYG.js.map +1 -0
- package/dist/chunk-O4YPVYPO.cjs +373 -0
- package/dist/chunk-O4YPVYPO.cjs.map +1 -0
- package/dist/chunk-R26OHONI.js +250 -0
- package/dist/chunk-R26OHONI.js.map +1 -0
- package/dist/{chunk-RYYYHPFU.cjs → chunk-RZUMQM7W.cjs} +246 -146
- package/dist/chunk-RZUMQM7W.cjs.map +1 -0
- package/dist/{chunk-YJQVLVBJ.cjs → chunk-S5HZBXZA.cjs} +2 -243
- package/dist/chunk-S5HZBXZA.cjs.map +1 -0
- package/dist/{chunk-ZQYE7J3J.cjs → chunk-WRSBM6QN.cjs} +332 -94
- package/dist/chunk-WRSBM6QN.cjs.map +1 -0
- package/dist/{chunk-RSKSXEPW.js → chunk-X23U6QEJ.js} +324 -88
- package/dist/chunk-X23U6QEJ.js.map +1 -0
- package/dist/{chunk-XA5S4776.cjs → chunk-Z7YUCYI6.cjs} +51 -50
- package/dist/chunk-Z7YUCYI6.cjs.map +1 -0
- package/dist/collaboration/index.cjs +100 -49
- package/dist/collaboration/index.js +4 -1
- package/dist/collaboration/mail/MailBodyEditor.d.ts +7 -0
- package/dist/collaboration/mail/MailDeliveryList.d.ts +8 -0
- package/dist/collaboration/mail/MailDocumentPicker.d.ts +15 -0
- package/dist/collaboration/mail/MailGrid.d.ts +17 -0
- package/dist/collaboration/mail/MailMessageView.d.ts +27 -0
- package/dist/collaboration/mail/PlainMailBodyEditor.d.ts +12 -0
- package/dist/collaboration/mail/index.d.ts +6 -0
- package/dist/collaboration/mail/mailCompose.d.ts +24 -0
- package/dist/connect/index.cjs +1684 -72
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +2 -1
- package/dist/connect/index.js +1670 -64
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedTagTable.d.ts +32 -0
- package/dist/connection/WorkflowRunnerDialogs.d.ts +12 -1
- package/dist/connection/mail/ConnectedMailAccounts.d.ts +21 -0
- package/dist/connection/mail/ConnectedMailComposer.d.ts +40 -0
- package/dist/connection/mail/ConnectedMailSetup.d.ts +16 -0
- package/dist/connection/mail/ConnectedMailbox.d.ts +65 -0
- package/dist/connection/mail/MailComposerForm.d.ts +25 -0
- package/dist/connection/mail/attachments.d.ts +13 -0
- package/dist/connection/mail/index.d.ts +6 -0
- package/dist/connection/mail/mailbox.d.ts +6 -0
- package/dist/connection/mail/types.d.ts +92 -0
- package/dist/connection/useConnectedWorkNotifications.d.ts +6 -0
- package/dist/connection/useWorkflowThread.d.ts +7 -2
- package/dist/document-tools/SignDocumentDialog.d.ts +9 -2
- package/dist/document-tools/index.cjs +2 -2
- package/dist/document-tools/index.js +1 -1
- package/dist/facts/index.cjs +2 -2
- package/dist/facts/index.js +2 -2
- package/dist/files/index.cjs +47 -367
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +10 -360
- package/dist/files/index.js.map +1 -1
- package/dist/index.cjs +510 -451
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -18
- package/dist/index.js.map +1 -1
- package/dist/settings/index.cjs +10 -9
- 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 -1
- package/dist/shell/index.js +1 -1
- package/dist/tags/TagColumnsEditor.d.ts +34 -0
- package/dist/tags/TagDetail.d.ts +13 -11
- package/dist/tags/TagTable.d.ts +99 -0
- package/dist/tags/TagsNav.d.ts +2 -2
- package/dist/tags/index.d.ts +7 -5
- package/dist/tags/{tagMatrixDocx.d.ts → tagTableDocx.d.ts} +12 -12
- package/dist/tags/tagTableModel.d.ts +47 -0
- package/dist/workflow-canvas/index.cjs +49 -48
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +6 -5
- package/dist/workflow-canvas/index.js.map +1 -1
- package/package.json +29 -4
- package/dist/chunk-CKB64Z4R.js.map +0 -1
- package/dist/chunk-CONIA2ZA.js.map +0 -1
- package/dist/chunk-F4RUCUXF.cjs.map +0 -1
- package/dist/chunk-FE4ULGOR.js.map +0 -1
- package/dist/chunk-RSKSXEPW.js.map +0 -1
- package/dist/chunk-RX35SMPR.js.map +0 -1
- package/dist/chunk-RYYYHPFU.cjs.map +0 -1
- package/dist/chunk-SB5ZKOYN.js.map +0 -1
- package/dist/chunk-XA5S4776.cjs.map +0 -1
- package/dist/chunk-YJQVLVBJ.cjs.map +0 -1
- package/dist/chunk-ZQYE7J3J.cjs.map +0 -1
- package/dist/chunk-ZVBPRMHJ.cjs.map +0 -1
- package/dist/connection/ConnectedTagMatrix.d.ts +0 -23
- package/dist/tags/TagMatrix.d.ts +0 -87
- package/dist/tags/tagMatrixModel.d.ts +0 -43
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `TagTable` bound to the connection: every tag of a kind in the workspace (`kind="issue"`: every
|
|
3
|
+
* issue), or with `parentId` a label's children. The columns are the kind's fields in the
|
|
4
|
+
* workspace (`useTagKindSchema`), edited in place and saved as the kind's schema
|
|
5
|
+
* (`useUpdateTagKindSchema`); the rows are the tag list filtered by kind with links (`useTags`),
|
|
6
|
+
* their cells saved with `useSetTagValues`. "Add row" creates a tag of the kind (issues, people
|
|
7
|
+
* and organisations are flat: no parent). The workspace's people fill person columns, and the
|
|
8
|
+
* snapshot is filed in the workspace as a Word document (`.docx`, so it opens in the Word editor;
|
|
9
|
+
* its id goes to `onExported`, so a host can open it or send it for signature) or downloaded.
|
|
10
|
+
*/
|
|
11
|
+
import type { components } from '@arbidocs/client';
|
|
12
|
+
import { type TagTableProps } from '../tags/TagTable';
|
|
13
|
+
/** What a tag is: a label, annotation, search, issue, person or organisation. */
|
|
14
|
+
type TagKind = NonNullable<components['schemas']['TagResponse']['kind']>;
|
|
15
|
+
export interface ConnectedTagTableProps extends Pick<TagTableProps, 'onOpenDocument' | 'onOpenFact' | 'onOpenThread' | 'onOpenRow' | 'actions' | 'labels' | 'className' | 'testId'> {
|
|
16
|
+
/** The rows are the workspace's tags of this kind, oldest first; the columns its fields. */
|
|
17
|
+
kind: TagKind;
|
|
18
|
+
/** Only this tag's children (a label hierarchy; flat kinds have none). */
|
|
19
|
+
parentId?: string;
|
|
20
|
+
/** How many documents, facts and threads each row lists (the rest are counted). Default 3. */
|
|
21
|
+
linksLimit?: number;
|
|
22
|
+
/** The exported document's title; default the kind's ("Issues", "People", …). */
|
|
23
|
+
exportTitle?: string;
|
|
24
|
+
/** The snapshot was filed: its document id. Absent: no export button. */
|
|
25
|
+
onExported?: (documentId: string) => void;
|
|
26
|
+
/** Offer the snapshot as a `.docx` download. Default true. */
|
|
27
|
+
downloadable?: boolean;
|
|
28
|
+
/** Read only: no cell edits, no "Add row", no column changes. */
|
|
29
|
+
readOnly?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function ConnectedTagTable({ kind, parentId, linksLimit, exportTitle, onExported, downloadable, readOnly, ...props }: ConnectedTagTableProps): import("react").JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export interface WorkflowRunnerDialogLabels {
|
|
7
7
|
loadingDocument: string;
|
|
8
|
+
preparingDocument: string;
|
|
8
9
|
documentFailed: string;
|
|
9
10
|
reviewTitle: string;
|
|
10
11
|
reviewDescription: string;
|
|
@@ -13,7 +14,17 @@ export interface WorkflowRunnerDialogLabels {
|
|
|
13
14
|
wordTitle: string;
|
|
14
15
|
}
|
|
15
16
|
export declare const DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS: WorkflowRunnerDialogLabels;
|
|
16
|
-
/**
|
|
17
|
+
/** How often, and how long apart, the PDF is fetched again while it is still being rendered. */
|
|
18
|
+
export declare const SIGN_PDF_RETRIES = 4;
|
|
19
|
+
export declare const SIGN_PDF_RETRY_DELAY_MS = 1500;
|
|
20
|
+
/**
|
|
21
|
+
* The sign flow on one document version: its PDF is fetched, then the blocks sign dialog.
|
|
22
|
+
*
|
|
23
|
+
* What is signed is the PDF `GET /view?version=` serves (a Word or Markdown document's rendition),
|
|
24
|
+
* never the original's download, so the hash the server checks is of the bytes shown here. A
|
|
25
|
+
* rendition still being written is fetched again a few times; a version superseded since the step
|
|
26
|
+
* was set offers the current one instead.
|
|
27
|
+
*/
|
|
17
28
|
export declare function WorkflowSignDialog({ docRef, onClose, labels, }: {
|
|
18
29
|
/** `doc-…` or `doc-…@v3`. */
|
|
19
30
|
docRef: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type MailAccount, type MailPolicy } from '@arbidocs/react';
|
|
3
|
+
/** Whose names suggest the native address (`given.family`). */
|
|
4
|
+
export interface MailAliasUser {
|
|
5
|
+
given_name?: string | null;
|
|
6
|
+
family_name?: string | null;
|
|
7
|
+
}
|
|
8
|
+
export interface ConnectedMailAccountsProps {
|
|
9
|
+
policy: MailPolicy;
|
|
10
|
+
accounts: MailAccount[];
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
/** Render in place (e.g. a settings page) instead of a dialog. */
|
|
13
|
+
embedded?: boolean;
|
|
14
|
+
user?: MailAliasUser | null;
|
|
15
|
+
/** Where an OAuth provider returns after connecting. Default: the current page. */
|
|
16
|
+
oauthReturnPath?: string;
|
|
17
|
+
/** Extra settings under the accounts (e.g. keeping mail on this device). */
|
|
18
|
+
settings?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/** Choose the native address, connect or remove external mailboxes. */
|
|
21
|
+
export declare function ConnectedMailAccounts({ policy, accounts, onClose, embedded, user, oauthReturnPath, settings, }: ConnectedMailAccountsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mail composer bound to the mail client in scope: write a new message, or open a saved draft
|
|
3
|
+
* (`draftId`), save it to Drafts and send it, with files and workspace documents attached.
|
|
4
|
+
*
|
|
5
|
+
* Inside `ConnectedMailbox` everything is passed in; on its own it finds what it needs: the account
|
|
6
|
+
* (`mailbox`, default the native inbox), the attachment limit, the unlock and the saved drafts.
|
|
7
|
+
*/
|
|
8
|
+
import { type RefObject } from 'react';
|
|
9
|
+
import { type MailAccount, type MailCompose, type MailMessage } from '@arbidocs/react';
|
|
10
|
+
import type { MailDocumentSource, MailNotify, MailOfflineSupport } from './types';
|
|
11
|
+
export interface ConnectedMailComposerProps {
|
|
12
|
+
/** Open this saved draft (from the account's Drafts) instead of a new message. */
|
|
13
|
+
draftId?: string;
|
|
14
|
+
/** The message to start from (new, reply, forward). Default: empty, or the draft. */
|
|
15
|
+
initial?: MailCompose;
|
|
16
|
+
/** Send from this account. Default: the `mailbox` account. */
|
|
17
|
+
account?: MailAccount;
|
|
18
|
+
/** Which account to send from when `account` is not given: an id, or `'native'` (default). */
|
|
19
|
+
mailbox?: string;
|
|
20
|
+
/** The attachment limit. Default: the deployment's. */
|
|
21
|
+
maxBytes?: number;
|
|
22
|
+
/** Whether saving and sending can run. Default: once the account is unlocked (or offline). */
|
|
23
|
+
ready?: boolean;
|
|
24
|
+
/** Saved drafts, for the "already in Drafts" notice. Default: the account's Drafts. */
|
|
25
|
+
drafts?: MailMessage[];
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
onOpenDraft?: (id: string) => void;
|
|
28
|
+
onChange?: (value: MailCompose) => void;
|
|
29
|
+
/** Fill the parent (a panel) instead of opening as a dialog. */
|
|
30
|
+
embedded?: boolean;
|
|
31
|
+
/** Receives the close request (asks before discarding unsaved changes). */
|
|
32
|
+
closeRequestRef?: RefObject<(() => void) | null>;
|
|
33
|
+
/** Editing a draft kept on this device (see {@link MailOfflineSupport}). */
|
|
34
|
+
localDraftId?: string;
|
|
35
|
+
offline?: MailOfflineSupport;
|
|
36
|
+
/** Workspace documents to attach ("From workspace"). Absent: not offered. */
|
|
37
|
+
documents?: MailDocumentSource;
|
|
38
|
+
notify?: MailNotify;
|
|
39
|
+
}
|
|
40
|
+
export declare function ConnectedMailComposer({ draftId, initial, account: accountProp, mailbox, maxBytes: maxBytesProp, ready: readyProp, drafts: draftsProp, notify, offline, ...rest }: ConnectedMailComposerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type MailPolicy } from '@arbidocs/react';
|
|
2
|
+
import type { MailAliasUser } from './ConnectedMailAccounts';
|
|
3
|
+
/**
|
|
4
|
+
* First run of Mail, in the main screen rather than a dialog: the user confirms the suggested
|
|
5
|
+
* address and is straight into their inbox. External accounts (Gmail, Outlook, IMAP) stay one
|
|
6
|
+
* click away, in the accounts dialog, for deployments that enable them.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ConnectedMailSetup({ policy, user, productName, onClaimed, onConnectExisting, }: {
|
|
9
|
+
policy: MailPolicy;
|
|
10
|
+
user?: MailAliasUser | null;
|
|
11
|
+
/** The product's name in the copy ("Set up your ARBI email"). Default: none. */
|
|
12
|
+
productName?: string;
|
|
13
|
+
/** The inbox exists now (the alias that was claimed). */
|
|
14
|
+
onClaimed: (alias: string) => void;
|
|
15
|
+
onConnectExisting: () => void;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The whole mail screen bound to the mail client in scope (`MailClientProvider`, else the
|
|
3
|
+
* `ArbiProvider` session): first-run setup or the accounts, the folder picker and filter, the message
|
|
4
|
+
* list, the reader and the composer.
|
|
5
|
+
*
|
|
6
|
+
* The host owns navigation: it can ask for a draft (`draftId`), a folder (`folder`) or a new message
|
|
7
|
+
* with attachments (`composeAttachments`); each is taken once and reported back (`on…Opened`), so
|
|
8
|
+
* asking again for the same thing works. Device storage (offline reading, the Outbox), workspace
|
|
9
|
+
* documents and saving to a workspace are optional host capabilities passed as props.
|
|
10
|
+
*/
|
|
11
|
+
import { type ReactNode } from 'react';
|
|
12
|
+
import type { GridState } from 'ag-grid-community';
|
|
13
|
+
import { type MailAddress, type MailAttachment } from '@arbidocs/react';
|
|
14
|
+
import { type MailAliasUser } from './ConnectedMailAccounts';
|
|
15
|
+
import type { MailDocumentSource, MailNotify, MailOfflineSupport, MailPanelProps, MailSaveToWorkspace } from './types';
|
|
16
|
+
export interface ConnectedMailboxProps {
|
|
17
|
+
/** Which mailbox: an account id, or `'native'` for the user's own inbox. Default: the first. */
|
|
18
|
+
mailbox?: string;
|
|
19
|
+
/** Open this draft (in the native mailbox's Drafts); taken once, then `onDraftOpened`. */
|
|
20
|
+
draftId?: string | null;
|
|
21
|
+
onDraftOpened?: () => void;
|
|
22
|
+
/** Open this folder (a role such as `inbox`, or an id); taken once, then `onFolderOpened`. */
|
|
23
|
+
folder?: string | null;
|
|
24
|
+
onFolderOpened?: () => void;
|
|
25
|
+
/** Start a new message with these attachments; taken once, then `onComposeOpened`. */
|
|
26
|
+
composeAttachments?: MailAttachment[] | null;
|
|
27
|
+
onComposeOpened?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Open a document: offered as "Open" on the notice after an email is saved into a workspace
|
|
30
|
+
* (when `saveToWorkspace.save` resolves with the new document's id).
|
|
31
|
+
*/
|
|
32
|
+
onOpenDocument?: (documentId: string, workspaceId: string) => void;
|
|
33
|
+
/** The user, for the suggested native address (`given.family`). */
|
|
34
|
+
user?: MailAliasUser | null;
|
|
35
|
+
/** The product's name in the setup copy ("Set up your ARBI email"). */
|
|
36
|
+
productName?: string;
|
|
37
|
+
/** Where an OAuth provider returns after connecting. Default: the current page. */
|
|
38
|
+
oauthReturnPath?: string;
|
|
39
|
+
/** How a person is named (e.g. from contacts). Default: the name on the message, else the address. */
|
|
40
|
+
personLabel?: (person: MailAddress) => string;
|
|
41
|
+
/** Device storage: offline reading, the Outbox, drafts written offline. Absent: online only. */
|
|
42
|
+
offline?: MailOfflineSupport;
|
|
43
|
+
/** The open workspace's documents, attachable in the composer. */
|
|
44
|
+
documents?: MailDocumentSource;
|
|
45
|
+
/** Saving an email into a workspace ("Save to workspace" on native mail). */
|
|
46
|
+
saveToWorkspace?: MailSaveToWorkspace;
|
|
47
|
+
/** A calendar invite card for a message with an .ics part. */
|
|
48
|
+
renderInvite?: (props: {
|
|
49
|
+
accountId: string;
|
|
50
|
+
messageId: string;
|
|
51
|
+
attachments: MailAttachment[];
|
|
52
|
+
isOnline: boolean;
|
|
53
|
+
}) => ReactNode;
|
|
54
|
+
/** Where the reader and composer open. Default: a panel beside the list. */
|
|
55
|
+
renderPanel?: (props: MailPanelProps) => ReactNode;
|
|
56
|
+
/** The reader or composer opened or closed. */
|
|
57
|
+
onViewerOpenChange?: (open: boolean) => void;
|
|
58
|
+
/** The message list's column state, and where to persist it. */
|
|
59
|
+
gridState?: GridState;
|
|
60
|
+
onGridStateChange?: (state: GridState) => void;
|
|
61
|
+
/** The message opened first (e.g. restored after a redirect). */
|
|
62
|
+
initialMessageId?: string | null;
|
|
63
|
+
notify?: MailNotify;
|
|
64
|
+
}
|
|
65
|
+
export declare function ConnectedMailbox({ mailbox, draftId, onDraftOpened, folder: requestedFolder, onFolderOpened, composeAttachments, onComposeOpened, onOpenDocument, user, productName, oauthReturnPath, personLabel, offline, documents, saveToWorkspace, renderInvite, renderPanel, onViewerOpenChange, gridState, onGridStateChange, initialMessageId, notify, }: ConnectedMailboxProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type MailAccount, type MailCompose, type MailMessage } from '@arbidocs/react';
|
|
3
|
+
import type { MailDocumentSource, MailNotify, MailOfflineSupport } from './types';
|
|
4
|
+
export interface MailComposerFormProps {
|
|
5
|
+
account?: MailAccount;
|
|
6
|
+
initial: MailCompose;
|
|
7
|
+
maxBytes: number;
|
|
8
|
+
ready: boolean;
|
|
9
|
+
/** The account's saved drafts: a new message with a draft's subject points to it. */
|
|
10
|
+
drafts: MailMessage[];
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
/** Open a saved draft (from the "already in Drafts" notice). Absent: the notice has no button. */
|
|
13
|
+
onOpenDraft?: (id: string) => void;
|
|
14
|
+
/** Reports every edit so the parent can re-seed this form if it remounts (e.g. docked → overlay). */
|
|
15
|
+
onChange?: (value: MailCompose) => void;
|
|
16
|
+
embedded?: boolean;
|
|
17
|
+
closeRequestRef?: RefObject<(() => void) | null>;
|
|
18
|
+
/** Editing a draft kept on this device (saved offline): saves update it, sending removes it. */
|
|
19
|
+
localDraftId?: string;
|
|
20
|
+
offline?: MailOfflineSupport;
|
|
21
|
+
documents?: MailDocumentSource;
|
|
22
|
+
notify: MailNotify;
|
|
23
|
+
}
|
|
24
|
+
/** Write, save and send one message. */
|
|
25
|
+
export declare function MailComposerForm({ account, initial, maxBytes, ready, drafts, onClose, onOpenDraft, onChange, embedded, closeRequestRef, localDraftId: initialLocalDraftId, offline, documents, notify, }: MailComposerFormProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type MailAccount, type MailAttachment, type MailClient } from '@arbidocs/react';
|
|
2
|
+
import type { MailOfflineSupport } from './types';
|
|
3
|
+
export declare function attachmentPath(accountId: string, messageId: string, attachmentId: string): string;
|
|
4
|
+
/** Hand a file to the browser as a download. */
|
|
5
|
+
export declare function saveFile(blob: Blob, name: string): void;
|
|
6
|
+
/**
|
|
7
|
+
* A message's attachments with their content, for a forward or a reopened draft. Offline, each
|
|
8
|
+
* comes from this device (or arrives without content, and Send then names the missing file).
|
|
9
|
+
*/
|
|
10
|
+
export declare function hydrateMailAttachments(client: MailClient, account: MailAccount, messageId: string, attachments: MailAttachment[], { isOnline, offline }: {
|
|
11
|
+
isOnline: boolean;
|
|
12
|
+
offline?: MailOfflineSupport;
|
|
13
|
+
}): Promise<MailAttachment[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ConnectedMailbox, type ConnectedMailboxProps } from './ConnectedMailbox';
|
|
2
|
+
export { ConnectedMailComposer, type ConnectedMailComposerProps } from './ConnectedMailComposer';
|
|
3
|
+
export { defaultMailNotify, resolveMailbox } from './mailbox';
|
|
4
|
+
export { ConnectedMailAccounts, type ConnectedMailAccountsProps, type MailAliasUser, } from './ConnectedMailAccounts';
|
|
5
|
+
export { ConnectedMailSetup } from './ConnectedMailSetup';
|
|
6
|
+
export type { MailNotify, MailLocalDraft, MailOutboxEntry, MailOutboxRequest, MailOfflineSupport, MailDocumentSource, MailSaveToWorkspace, MailPanelProps, } from './types';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type MailAccount } from '@arbidocs/react';
|
|
2
|
+
import type { MailNotify } from './types';
|
|
3
|
+
/** The default {@link MailNotify}: the shared toast and notification centre. */
|
|
4
|
+
export declare const defaultMailNotify: MailNotify;
|
|
5
|
+
/** The account a `mailbox` choice names: an account id, or `'native'` for the user's own inbox. */
|
|
6
|
+
export declare function resolveMailbox(accounts: MailAccount[] | undefined, mailbox: string | undefined): MailAccount | undefined;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { MailAccount, MailAttachment, MailCompose } from '@arbidocs/react';
|
|
3
|
+
import type { MailAttachableDocument } from '../../collaboration/mail/MailDocumentPicker';
|
|
4
|
+
/** Tell the user how an action went (a toast). Default: `notify` from `@arbidocs/react`. */
|
|
5
|
+
export type MailNotify = (message: string, variant: 'success' | 'info' | 'error', options?: {
|
|
6
|
+
description?: string;
|
|
7
|
+
action?: {
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
};
|
|
11
|
+
}) => void;
|
|
12
|
+
/** A draft kept on this device (written offline), not yet in the server's Drafts. */
|
|
13
|
+
export interface MailLocalDraft {
|
|
14
|
+
id: string;
|
|
15
|
+
compose: MailCompose;
|
|
16
|
+
/** Epoch milliseconds. */
|
|
17
|
+
updatedAt: number;
|
|
18
|
+
/** Why it could not be uploaded, if it could not. */
|
|
19
|
+
error?: string;
|
|
20
|
+
}
|
|
21
|
+
/** A message waiting in the device Outbox. */
|
|
22
|
+
export interface MailOutboxEntry {
|
|
23
|
+
account: {
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
status: string;
|
|
27
|
+
compose: MailCompose;
|
|
28
|
+
}
|
|
29
|
+
/** A message for the device Outbox: sent later with this `requestId`, so it can only go out once. */
|
|
30
|
+
export interface MailOutboxRequest {
|
|
31
|
+
account: MailAccount;
|
|
32
|
+
compose: MailCompose;
|
|
33
|
+
requestId: string;
|
|
34
|
+
secure: boolean;
|
|
35
|
+
/** The prepared secure-delivery payload, when `secure`. */
|
|
36
|
+
securePayload?: unknown;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A host that keeps mail on the device (offline reading, an Outbox, drafts written offline).
|
|
40
|
+
* Without it the mailbox is online only. The `use*` members are hooks: the mailbox calls them on
|
|
41
|
+
* every render, so pass a stable object (e.g. a module constant).
|
|
42
|
+
*/
|
|
43
|
+
export interface MailOfflineSupport {
|
|
44
|
+
/** The folder role of the Outbox; a device Outbox is added when the server has none. */
|
|
45
|
+
outboxRole: string;
|
|
46
|
+
useLocalDrafts(accountId: string | undefined): MailLocalDraft[];
|
|
47
|
+
useOutbox(): MailOutboxEntry[];
|
|
48
|
+
/** The Outbox folder's contents (shown above its list). */
|
|
49
|
+
renderOutbox(props: {
|
|
50
|
+
accountId: string;
|
|
51
|
+
onEdit: (compose: MailCompose) => void;
|
|
52
|
+
}): ReactNode;
|
|
53
|
+
/** A status line under the header (what is saved on this device, sync state). */
|
|
54
|
+
renderStatus?(): ReactNode;
|
|
55
|
+
/** Per-device settings, in the accounts dialog. */
|
|
56
|
+
renderSettings?(): ReactNode;
|
|
57
|
+
/** An attachment saved on this device, as a file (undefined when it wasn't saved). */
|
|
58
|
+
loadAttachment(accountId: string, messageId: string, attachment: MailAttachment): Promise<File | undefined>;
|
|
59
|
+
/** Keep a draft on this device; `localDraftId` updates the one already there. */
|
|
60
|
+
saveDraft(accountId: string, compose: MailCompose, localDraftId?: string): Promise<{
|
|
61
|
+
id: string;
|
|
62
|
+
}>;
|
|
63
|
+
deleteDraft(localDraftId: string): Promise<void>;
|
|
64
|
+
/** Put a message in the Outbox; rejects with the reason when it can't wait there. */
|
|
65
|
+
queueSend(request: MailOutboxRequest): Promise<void>;
|
|
66
|
+
/** The request never got an answer (no connection), as opposed to the server refusing it. */
|
|
67
|
+
isNetworkFailure(error: unknown): boolean;
|
|
68
|
+
}
|
|
69
|
+
/** The open workspace's documents, attachable to an email as their files. */
|
|
70
|
+
export interface MailDocumentSource {
|
|
71
|
+
documents: MailAttachableDocument[];
|
|
72
|
+
/** The document's file as an attachment; rejects when it can't be fetched or exceeds `maxBytes`. */
|
|
73
|
+
toAttachment(documentId: string, maxBytes: number): Promise<MailAttachment>;
|
|
74
|
+
}
|
|
75
|
+
/** Saving an email (its .eml) into a workspace. */
|
|
76
|
+
export interface MailSaveToWorkspace {
|
|
77
|
+
workspaces: {
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
}[];
|
|
81
|
+
/** Preselected in the dialog (e.g. the open workspace). Default: the first. */
|
|
82
|
+
defaultWorkspaceId?: string | null;
|
|
83
|
+
/** Upload the .eml; resolves with the new document's id when known. */
|
|
84
|
+
save(workspaceId: string, file: File): Promise<string | void>;
|
|
85
|
+
}
|
|
86
|
+
/** Where the reader and the composer open. */
|
|
87
|
+
export interface MailPanelProps {
|
|
88
|
+
isOpen: boolean;
|
|
89
|
+
title: string;
|
|
90
|
+
onClose: () => void;
|
|
91
|
+
children: ReactNode;
|
|
92
|
+
}
|
|
@@ -8,6 +8,12 @@ export type WorkNotificationTarget = {
|
|
|
8
8
|
kind: 'workflow';
|
|
9
9
|
workspaceId?: string;
|
|
10
10
|
workflowId: string;
|
|
11
|
+
}
|
|
12
|
+
/** A draft an agent left for the user (`mail_draft_ready`): open it, e.g. `ConnectedMailbox draftId`. */
|
|
13
|
+
| {
|
|
14
|
+
kind: 'mail_draft';
|
|
15
|
+
draftId: string;
|
|
16
|
+
mailbox?: string;
|
|
11
17
|
};
|
|
12
18
|
/** Persisted work notifications in the shared bell; the consumer owns navigation. */
|
|
13
19
|
export declare function useConnectedWorkNotifications(onOpen: (target: WorkNotificationTarget) => void | Promise<void>): {
|
|
@@ -3,14 +3,19 @@
|
|
|
3
3
|
* steps; its activity log says where each step is; the work runner starts each agent step as a
|
|
4
4
|
* turn in the thread. This hook reads all of that and does the person's part: it starts the thread
|
|
5
5
|
* (with the run's inputs and the steps' prompts composed from them), completes forms, uploads and
|
|
6
|
-
* reviews, skips, and retries a failed step.
|
|
6
|
+
* reviews, skips, and retries a failed step. A run whose first open step is an agent or action
|
|
7
|
+
* step starts when the person presses Start: the thread is created and the server starts that
|
|
8
|
+
* step. `WorkflowRunner` shows the result.
|
|
7
9
|
*/
|
|
8
10
|
import { type ConversationResponse } from '@arbidocs/react';
|
|
9
11
|
import { type StepComposeOptions } from '../agents/workflows/run';
|
|
10
12
|
import { type WorkflowRunView } from '../agents/workflows/useWorkflowView';
|
|
11
13
|
import type { WorkflowDefinition, WorkflowInputs } from '../agents/workflows/types';
|
|
12
14
|
export interface UseWorkflowThreadOptions extends StepComposeOptions {
|
|
13
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* An existing run to show (its thread). Absent: a new run starts when its first step is done,
|
|
17
|
+
* or, when that is an agent or action step, when the person starts it.
|
|
18
|
+
*/
|
|
14
19
|
conversationId?: string;
|
|
15
20
|
/** The thread was created (store its id to come back to the run). */
|
|
16
21
|
onStarted?: (conversationId: string) => void;
|
|
@@ -12,9 +12,16 @@ export interface SignDocumentDialogProps {
|
|
|
12
12
|
open: boolean;
|
|
13
13
|
onOpenChange: (open: boolean) => void;
|
|
14
14
|
documentId: string;
|
|
15
|
-
/** The PDF the viewer is showing. */
|
|
15
|
+
/** The PDF the viewer is showing: `GET /view?version=`, never the original's download. */
|
|
16
16
|
pdfBlob: Blob;
|
|
17
|
+
/** The version `pdfBlob` is of; omitted = the current version. */
|
|
18
|
+
version?: number;
|
|
17
19
|
/** Where the signature goes; omitted = bottom of the last page. */
|
|
18
20
|
appearance?: SignatureAppearance;
|
|
21
|
+
/**
|
|
22
|
+
* Open the current version when the one shown has been superseded (only the current version can
|
|
23
|
+
* be signed). Default: the host's `openDocument` on the document, after the dialog closes.
|
|
24
|
+
*/
|
|
25
|
+
onOpenCurrent?: () => void;
|
|
19
26
|
}
|
|
20
|
-
export declare function SignDocumentDialog({ open, onOpenChange, documentId, pdfBlob, appearance, }: SignDocumentDialogProps): ReactElement;
|
|
27
|
+
export declare function SignDocumentDialog({ open, onOpenChange, documentId, pdfBlob, version, appearance, onOpenCurrent, }: SignDocumentDialogProps): ReactElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
|
|
5
5
|
var chunk4DVEGXZQ_cjs = require('../chunk-4DVEGXZQ.cjs');
|
|
6
6
|
require('../chunk-ULWRNGGE.cjs');
|
|
7
7
|
require('../chunk-DES3K4SD.cjs');
|
|
@@ -482,7 +482,7 @@ function VersionSnapshotBar({
|
|
|
482
482
|
|
|
483
483
|
Object.defineProperty(exports, "SignDocumentDialog", {
|
|
484
484
|
enumerable: true,
|
|
485
|
-
get: function () { return
|
|
485
|
+
get: function () { return chunkJH6JTI76_cjs.SignDocumentDialog; }
|
|
486
486
|
});
|
|
487
487
|
exports.AnnotateButton = AnnotateButton;
|
|
488
488
|
exports.DEFAULT_VERSION_SNAPSHOT_BAR_LABELS = DEFAULT_VERSION_SNAPSHOT_BAR_LABELS;
|
package/dist/facts/index.cjs
CHANGED
|
@@ -7,11 +7,11 @@ var chunkVPPX5XUF_cjs = require('../chunk-VPPX5XUF.cjs');
|
|
|
7
7
|
var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
|
|
8
8
|
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
9
9
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
10
|
-
var chunkIXALYQT7_cjs = require('../chunk-IXALYQT7.cjs');
|
|
11
|
-
require('../chunk-FX3K6LNZ.cjs');
|
|
12
10
|
var chunkPPCATBOY_cjs = require('../chunk-PPCATBOY.cjs');
|
|
13
11
|
require('../chunk-C54XEN5T.cjs');
|
|
14
12
|
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
13
|
+
var chunkIXALYQT7_cjs = require('../chunk-IXALYQT7.cjs');
|
|
14
|
+
require('../chunk-FX3K6LNZ.cjs');
|
|
15
15
|
var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
|
|
16
16
|
require('../chunk-DES3K4SD.cjs');
|
|
17
17
|
var lucideReact = require('lucide-react');
|
package/dist/facts/index.js
CHANGED
|
@@ -6,11 +6,11 @@ import { TabHeader } from '../chunk-4WWM3GQ5.js';
|
|
|
6
6
|
import { SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
|
|
7
7
|
import { FilterInput } from '../chunk-YU2KUMGE.js';
|
|
8
8
|
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';
|
|
9
|
-
import { GridView } from '../chunk-ZPLG7QYF.js';
|
|
10
|
-
import '../chunk-SLSBJRWW.js';
|
|
11
9
|
import { observeResize } from '../chunk-NPLYHR2E.js';
|
|
12
10
|
import '../chunk-76JDDMSP.js';
|
|
13
11
|
import { initials } from '../chunk-OXF2IFXG.js';
|
|
12
|
+
import { GridView } from '../chunk-ZPLG7QYF.js';
|
|
13
|
+
import '../chunk-SLSBJRWW.js';
|
|
14
14
|
import { testIdOr } from '../chunk-7F6CBP3Z.js';
|
|
15
15
|
import '../chunk-VUNV25KB.js';
|
|
16
16
|
import { PencilLine, Check, MoreVertical, Pencil, Trash2, CalendarDays, X, Columns3, ChevronDown, RotateCcw, Milestone, CalendarClock, Scale, Lightbulb, ArrowRight, Loader2, Info, Paperclip, Tags, MoreHorizontal, FolderUp, BookMarked, Plus, Search, CheckCircle2, CornerDownLeft, Quote, ChevronLeft, ChevronRight, Table2, CalendarRange, GanttChartSquare } from 'lucide-react';
|