@echothink-ui/activity 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/ActivityFeed.d.ts +7 -0
- package/dist/components/ActivityTimeline.d.ts +6 -0
- package/dist/components/AlertBanner.d.ts +10 -0
- package/dist/components/ChangelogPanel.d.ts +6 -0
- package/dist/components/IncidentPanel.d.ts +6 -0
- package/dist/components/MentionList.d.ts +7 -0
- package/dist/components/NotificationCenter.d.ts +10 -0
- package/dist/components/NotificationItem.d.ts +8 -0
- package/dist/components/SubscriptionPreferences.d.ts +7 -0
- package/dist/components/SystemStatusBanner.d.ts +9 -0
- package/dist/components/WatcherList.d.ts +8 -0
- package/dist/components/helpers.d.ts +4 -0
- package/dist/components/types.d.ts +65 -0
- package/dist/index.cjs +944 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +711 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +904 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
- package/src/components/ActivityFeed.tsx +83 -0
- package/src/components/ActivityTimeline.tsx +178 -0
- package/src/components/AlertBanner.tsx +69 -0
- package/src/components/ChangelogPanel.tsx +100 -0
- package/src/components/IncidentPanel.tsx +82 -0
- package/src/components/MentionList.tsx +85 -0
- package/src/components/NotificationCenter.tsx +117 -0
- package/src/components/NotificationItem.tsx +99 -0
- package/src/components/SubscriptionPreferences.test.tsx +64 -0
- package/src/components/SubscriptionPreferences.tsx +140 -0
- package/src/components/SystemStatusBanner.tsx +46 -0
- package/src/components/WatcherList.test.tsx +50 -0
- package/src/components/WatcherList.tsx +122 -0
- package/src/components/helpers.ts +15 -0
- package/src/components/types.ts +71 -0
- package/src/index.tsx +31 -0
- package/src/styles.css +854 -0
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# @echothink-ui/activity
|
|
2
|
+
|
|
3
|
+
Activity 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,7 @@
|
|
|
1
|
+
import { type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { ActivityEvent } from "./types";
|
|
3
|
+
export interface ActivityFeedProps extends Omit<SurfaceComponentProps, "children"> {
|
|
4
|
+
events: ActivityEvent[];
|
|
5
|
+
streaming?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function ActivityFeed({ events, streaming, title, className, ...props }: ActivityFeedProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { ActivityEvent } from "./types";
|
|
3
|
+
export interface ActivityTimelineProps extends Omit<SurfaceComponentProps, "children"> {
|
|
4
|
+
events: ActivityEvent[];
|
|
5
|
+
}
|
|
6
|
+
export declare function ActivityTimeline({ events, title, subtitle, className, role, "aria-label": ariaLabel, ...props }: ActivityTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type EthAction, type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { ActivitySeverity } from "./types";
|
|
3
|
+
export interface AlertBannerProps extends Omit<SurfaceComponentProps, "children" | "actions" | "severity"> {
|
|
4
|
+
severity: ActivitySeverity;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
actions?: EthAction[];
|
|
9
|
+
}
|
|
10
|
+
export declare function AlertBanner({ severity, title, description, onDismiss, actions, className, role, ...props }: AlertBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { ChangelogEntry } from "./types";
|
|
3
|
+
export interface ChangelogPanelProps extends Omit<SurfaceComponentProps, "children"> {
|
|
4
|
+
entries: ChangelogEntry[];
|
|
5
|
+
}
|
|
6
|
+
export declare function ChangelogPanel({ entries, title, subtitle, className, role, "aria-label": ariaLabel, ...props }: ChangelogPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { ActivityIncident } from "./types";
|
|
3
|
+
export interface IncidentPanelProps extends Omit<SurfaceComponentProps, "children"> {
|
|
4
|
+
incidents: ActivityIncident[];
|
|
5
|
+
}
|
|
6
|
+
export declare function IncidentPanel({ incidents, title, className, ...props }: IncidentPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { Mention } from "./types";
|
|
3
|
+
export interface MentionListProps extends Omit<SurfaceComponentProps, "children"> {
|
|
4
|
+
mentions: Mention[];
|
|
5
|
+
onOpen?: (messageRef: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function MentionList({ mentions, onOpen, title, subtitle, className, ...props }: MentionListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { NotificationItemData } from "./types";
|
|
3
|
+
export interface NotificationCenterProps extends Omit<SurfaceComponentProps, "children"> {
|
|
4
|
+
notifications: NotificationItemData[];
|
|
5
|
+
unreadCount?: number;
|
|
6
|
+
onMarkRead?: (id: string) => void;
|
|
7
|
+
onMarkAllRead?: () => void;
|
|
8
|
+
onDismiss?: (id: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function NotificationCenter({ notifications, unreadCount, onMarkRead, onMarkAllRead, onDismiss, title, className, role, "aria-label": ariaLabel, ...props }: NotificationCenterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { NotificationItemData } from "./types";
|
|
3
|
+
export interface NotificationItemProps extends Omit<SurfaceComponentProps, "children"> {
|
|
4
|
+
notification: NotificationItemData;
|
|
5
|
+
onRead?: () => void;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function NotificationItem({ notification, onRead, onClick, className, title: _title, subtitle: _subtitle, description: _description, eyebrow: _eyebrow, density: _density, status: _status, severity: _severity, loading: _loading, empty: _empty, error: _error, items: _items, actions: _actions, metadata: _metadata, footer: _footer, ...props }: NotificationItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { SubscriptionCategory } from "./types";
|
|
3
|
+
export interface SubscriptionPreferencesProps extends Omit<SurfaceComponentProps, "children" | "onToggle"> {
|
|
4
|
+
categories: SubscriptionCategory[];
|
|
5
|
+
onToggle?: (categoryId: string, channelId: string, enabled: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function SubscriptionPreferences({ categories, onToggle, title, className, role, "aria-label": ariaLabel, ...props }: SubscriptionPreferencesProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EthAction, SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
export interface SystemStatusBannerProps extends Omit<SurfaceComponentProps, "children" | "actions" | "status"> {
|
|
3
|
+
status: "operational" | "degraded" | "down" | "maintenance";
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
actions?: EthAction[];
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function SystemStatusBanner({ status, title, description, actions, onDismiss, className }: SystemStatusBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type SurfaceComponentProps } from "@echothink-ui/core";
|
|
2
|
+
import type { IdentityRef } from "./types";
|
|
3
|
+
export interface WatcherListProps extends Omit<SurfaceComponentProps, "children"> {
|
|
4
|
+
watchers: IdentityRef[];
|
|
5
|
+
onAdd?: () => void;
|
|
6
|
+
onRemove?: (id: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function WatcherList({ watchers, onAdd, onRemove, title, subtitle, className, role, footer, "aria-label": ariaLabel, ...props }: WatcherListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { EthAction } from "@echothink-ui/core";
|
|
2
|
+
export type ActivitySeverity = "info" | "success" | "warning" | "error" | "danger";
|
|
3
|
+
export interface NotificationItemData {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
body?: string;
|
|
7
|
+
severity: ActivitySeverity;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
read?: boolean;
|
|
10
|
+
actions?: EthAction[];
|
|
11
|
+
}
|
|
12
|
+
export interface ActivityEvent {
|
|
13
|
+
id: string;
|
|
14
|
+
actor: string;
|
|
15
|
+
verb: string;
|
|
16
|
+
objectLabel: string;
|
|
17
|
+
targetLabel?: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
details?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ChangelogEntry {
|
|
22
|
+
id: string;
|
|
23
|
+
version: string;
|
|
24
|
+
date: string;
|
|
25
|
+
changes: Array<{
|
|
26
|
+
type: "added" | "changed" | "fixed" | "removed";
|
|
27
|
+
summary: string;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
export interface SubscriptionChannel {
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
description?: string;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface SubscriptionCategory {
|
|
38
|
+
id: string;
|
|
39
|
+
label: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
channels: SubscriptionChannel[];
|
|
42
|
+
}
|
|
43
|
+
export interface Mention {
|
|
44
|
+
id: string;
|
|
45
|
+
from: string;
|
|
46
|
+
messageRef: string;
|
|
47
|
+
excerpt: string;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
}
|
|
50
|
+
export interface IdentityRef {
|
|
51
|
+
id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
email?: string;
|
|
54
|
+
avatar?: string;
|
|
55
|
+
role?: string;
|
|
56
|
+
kind?: "user" | "service-account" | "group";
|
|
57
|
+
}
|
|
58
|
+
export interface ActivityIncident {
|
|
59
|
+
id: string;
|
|
60
|
+
title: string;
|
|
61
|
+
status?: "investigating" | "identified" | "monitoring" | "resolved";
|
|
62
|
+
severity?: ActivitySeverity;
|
|
63
|
+
startedAt?: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
}
|