@echothink-ui/inbox 0.1.0
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 +5 -0
- package/dist/components/AgentDraftReviewPanel.d.ts +18 -0
- package/dist/components/ApprovalToSendPanel.d.ts +11 -0
- package/dist/components/AttachmentList.d.ts +8 -0
- package/dist/components/AttachmentPreview.d.ts +7 -0
- package/dist/components/EmailAutomationRulePanel.d.ts +8 -0
- package/dist/components/InboxShell.d.ts +10 -0
- package/dist/components/LabelManager.d.ts +9 -0
- package/dist/components/MailboxFolderList.d.ts +8 -0
- package/dist/components/MessageComposer.d.ts +13 -0
- package/dist/components/MessageFilterBar.d.ts +13 -0
- package/dist/components/MessageList.d.ts +8 -0
- package/dist/components/MessagePreview.d.ts +9 -0
- package/dist/components/MessageSearch.d.ts +11 -0
- package/dist/components/MessageThread.d.ts +22 -0
- package/dist/components/PriorityInboxView.d.ts +14 -0
- package/dist/components/RecipientPicker.d.ts +10 -0
- package/dist/components/ThreadSummaryPanel.d.ts +9 -0
- package/dist/index.cjs +1699 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +2155 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +1645 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +75 -0
- package/dist/utils.d.ts +5 -0
- package/package.json +44 -0
- package/src/components/AgentDraftReviewPanel.tsx +128 -0
- package/src/components/ApprovalToSendPanel.tsx +118 -0
- package/src/components/AttachmentList.tsx +85 -0
- package/src/components/AttachmentPreview.tsx +207 -0
- package/src/components/EmailAutomationRulePanel.tsx +100 -0
- package/src/components/InboxShell.tsx +62 -0
- package/src/components/LabelManager.tsx +147 -0
- package/src/components/MailboxFolderList.tsx +66 -0
- package/src/components/MessageComposer.tsx +160 -0
- package/src/components/MessageFilterBar.test.tsx +34 -0
- package/src/components/MessageFilterBar.tsx +69 -0
- package/src/components/MessageList.tsx +101 -0
- package/src/components/MessagePreview.test.tsx +48 -0
- package/src/components/MessagePreview.tsx +84 -0
- package/src/components/MessageSearch.tsx +96 -0
- package/src/components/MessageThread.tsx +173 -0
- package/src/components/PriorityInboxView.tsx +74 -0
- package/src/components/RecipientPicker.tsx +181 -0
- package/src/components/ThreadSummaryPanel.tsx +107 -0
- package/src/index.test.tsx +276 -0
- package/src/index.tsx +60 -0
- package/src/styles.css +2523 -0
- package/src/types.ts +85 -0
- package/src/utils.ts +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# @echothink-ui/inbox
|
|
2
|
+
|
|
3
|
+
Inbox package for EchoThink app-domain websites.
|
|
4
|
+
|
|
5
|
+
This package is part of the EchoThink-UI app-domain library. It is designed for normal website app domains rendered inside EchoThink Studio's Chromium shell, not for implementing the studio browser chrome itself.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ThreadMessage } from "../types";
|
|
3
|
+
export interface DraftEvidence {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AgentDraftReviewPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
draft?: ThreadMessage & {
|
|
10
|
+
evidence?: DraftEvidence[];
|
|
11
|
+
rationale?: React.ReactNode;
|
|
12
|
+
statusLabel?: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
onApprove?: () => void;
|
|
15
|
+
onEdit?: () => void;
|
|
16
|
+
onReject?: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function AgentDraftReviewPanel({ draft, onApprove, onEdit, onReject, className, ...props }: AgentDraftReviewPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { MessageDraft } from "../types";
|
|
3
|
+
export interface ApprovalToSendPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
draft?: MessageDraft;
|
|
5
|
+
recipients?: string[];
|
|
6
|
+
riskLevel?: "low" | "medium" | "high" | "critical";
|
|
7
|
+
policyRef?: React.ReactNode;
|
|
8
|
+
onApprove?: (reason?: string) => void;
|
|
9
|
+
onReject?: (reason?: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function ApprovalToSendPanel({ draft, recipients, riskLevel, policyRef, onApprove, onReject, className, ...props }: ApprovalToSendPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { Attachment } from "../types";
|
|
3
|
+
export interface AttachmentListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
attachments?: Attachment[];
|
|
5
|
+
onPreview?: (attachment: Attachment) => void;
|
|
6
|
+
onDownload?: (attachment: Attachment) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function AttachmentList({ attachments, onPreview, onDownload, className, role, "aria-label": ariaLabel, ...props }: AttachmentListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { Attachment } from "../types";
|
|
3
|
+
export interface AttachmentPreviewProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
attachment?: Attachment;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function AttachmentPreview({ attachment, children, className, ...props }: AttachmentPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { AutomationRule } from "../types";
|
|
3
|
+
export interface EmailAutomationRulePanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onToggle"> {
|
|
4
|
+
rules?: AutomationRule[];
|
|
5
|
+
onToggle?: (id: string, enabled: boolean) => void;
|
|
6
|
+
onEdit?: (id: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function EmailAutomationRulePanel({ rules, onToggle, onEdit, className, ...props }: EmailAutomationRulePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SurfaceComponentProps } from "@echothink-ui/core";
|
|
3
|
+
export interface InboxShellProps extends SurfaceComponentProps {
|
|
4
|
+
folders?: React.ReactNode;
|
|
5
|
+
list?: React.ReactNode;
|
|
6
|
+
thread?: React.ReactNode;
|
|
7
|
+
inspector?: React.ReactNode;
|
|
8
|
+
toolbar?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function InboxShell({ folders, list, thread, inspector, toolbar, className, title, description, ...props }: InboxShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { MailLabel } from "../types";
|
|
3
|
+
export interface LabelManagerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
labels?: MailLabel[];
|
|
5
|
+
onCreate?: (label: string) => void;
|
|
6
|
+
onRename?: (id: string, label: string) => void;
|
|
7
|
+
onDelete?: (id: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function LabelManager({ labels, onCreate, onRename, onDelete, className, ...props }: LabelManagerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { MailboxFolder } from "../types";
|
|
3
|
+
export interface MailboxFolderListProps extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect"> {
|
|
4
|
+
folders?: MailboxFolder[];
|
|
5
|
+
activeFolderId?: string;
|
|
6
|
+
onSelect?: (id: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function MailboxFolderList({ folders, activeFolderId, onSelect, className, "aria-label": ariaLabel, ...props }: MailboxFolderListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { MessageDraft } from "../types";
|
|
3
|
+
export interface MessageComposerProps extends Omit<React.FormHTMLAttributes<HTMLFormElement>, "onChange" | "onSubmit"> {
|
|
4
|
+
draft?: MessageDraft;
|
|
5
|
+
onChange?: (draft: MessageDraft) => void;
|
|
6
|
+
onSend?: (draft: MessageDraft) => void;
|
|
7
|
+
onDiscard?: () => void;
|
|
8
|
+
onAttach?: () => void;
|
|
9
|
+
recipients?: React.ReactNode;
|
|
10
|
+
attachments?: React.ReactNode;
|
|
11
|
+
statusText?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function MessageComposer({ draft, onChange, onSend, onDiscard, onAttach, recipients, attachments, statusText, className, ...props }: MessageComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface MessageFilter {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
kind?: "priority" | "sender" | "date" | "label" | "unread" | "status";
|
|
8
|
+
}
|
|
9
|
+
export interface MessageFilterBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onToggle"> {
|
|
10
|
+
filters?: MessageFilter[];
|
|
11
|
+
onToggle?: (id: string, active: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function MessageFilterBar({ filters, onToggle, className, "aria-label": ariaLabel, ...props }: MessageFilterBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { InboxThread } from "../types";
|
|
3
|
+
export interface MessageListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
4
|
+
threads?: InboxThread[];
|
|
5
|
+
selectedThreadId?: string;
|
|
6
|
+
onSelect?: (threadId: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function MessageList({ threads, selectedThreadId, onSelect, className, ...props }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { Attachment, ThreadMessage } from "../types";
|
|
3
|
+
export interface MessagePreviewProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
message: ThreadMessage;
|
|
5
|
+
showSubject?: boolean;
|
|
6
|
+
onPreviewAttachment?: (attachment: Attachment) => void;
|
|
7
|
+
onDownloadAttachment?: (attachment: Attachment) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function MessagePreview({ message, showSubject, onPreviewAttachment, onDownloadAttachment, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: MessagePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface MessageSearchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
resultCount?: number;
|
|
7
|
+
activeResultIndex?: number;
|
|
8
|
+
onPreviousResult?: () => void;
|
|
9
|
+
onNextResult?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function MessageSearch({ value, onChange, placeholder, resultCount, activeResultIndex, onPreviousResult, onNextResult, className, role, "aria-label": ariaLabel, ...props }: MessageSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { EthDensity, EthIntent, EthOperationalStatus } from "@echothink-ui/core";
|
|
3
|
+
import type { Attachment, MessageThreadModel } from "../types";
|
|
4
|
+
export interface MessageThreadAction {
|
|
5
|
+
id: string;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
intent?: EthIntent;
|
|
9
|
+
density?: EthDensity;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onSelect?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export interface MessageThreadProps extends React.HTMLAttributes<HTMLElement> {
|
|
14
|
+
thread?: MessageThreadModel;
|
|
15
|
+
summaryRef?: React.ReactNode;
|
|
16
|
+
status?: EthOperationalStatus;
|
|
17
|
+
statusLabel?: React.ReactNode;
|
|
18
|
+
actions?: MessageThreadAction[];
|
|
19
|
+
onPreviewAttachment?: (attachment: Attachment) => void;
|
|
20
|
+
onDownloadAttachment?: (attachment: Attachment) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function MessageThread({ thread, summaryRef, status, statusLabel, actions, onPreviewAttachment, onDownloadAttachment, className, ...props }: MessageThreadProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { InboxThread } from "../types";
|
|
3
|
+
export interface PriorityInboxGroup {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
threads: InboxThread[];
|
|
8
|
+
}
|
|
9
|
+
export interface PriorityInboxViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
10
|
+
groups?: PriorityInboxGroup[];
|
|
11
|
+
selectedThreadId?: string;
|
|
12
|
+
onSelect?: (threadId: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function PriorityInboxView({ groups, selectedThreadId, onSelect, className, ...props }: PriorityInboxViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { RecipientSuggestion } from "../types";
|
|
3
|
+
export interface RecipientPickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
4
|
+
value?: string[];
|
|
5
|
+
onChange?: (value: string[]) => void;
|
|
6
|
+
onSearch?: (q: string) => void;
|
|
7
|
+
suggestions?: RecipientSuggestion[];
|
|
8
|
+
defaultSuggestionsOpen?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function RecipientPicker({ value, onChange, onSearch, suggestions, defaultSuggestionsOpen, className, ...props }: RecipientPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ThreadCitation } from "../types";
|
|
3
|
+
export interface ThreadSummaryPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
summary?: {
|
|
5
|
+
text: React.ReactNode;
|
|
6
|
+
citations: ThreadCitation[];
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare function ThreadSummaryPanel({ summary, className, ...props }: ThreadSummaryPanelProps): import("react/jsx-runtime").JSX.Element;
|