@medipha/chat 1.0.48 → 1.0.50
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/dashboard/api/dashboard-api.d.ts +2 -0
- package/dist/dashboard/api/dashboard-mock.d.ts +2 -0
- package/dist/dashboard/dashboard-module.d.ts +2 -0
- package/dist/dashboard/dashboard-module.types.d.ts +10 -0
- package/dist/dashboard/dashboard.types.d.ts +109 -0
- package/dist/dashboard/filters/dashboard-filter-bar.d.ts +14 -0
- package/dist/dashboard/filters/dashboard-user-options.d.ts +13 -0
- package/dist/dashboard/filters/date-range-presets.d.ts +17 -0
- package/dist/dashboard/sections/conversation-creation-trend-card.d.ts +6 -0
- package/dist/dashboard/sections/conversation-list-tab.d.ts +8 -0
- package/dist/dashboard/sections/conversation-members-dialog.d.ts +10 -0
- package/dist/dashboard/sections/conversation-overview-cards.d.ts +6 -0
- package/dist/dashboard/sections/dashboard-tabs.d.ts +9 -0
- package/dist/dashboard/sections/group-avatar.d.ts +15 -0
- package/dist/dashboard/sections/section-card.d.ts +15 -0
- package/dist/dashboard/sections/top-conversations-card.d.ts +6 -0
- package/dist/dashboard/sections/top-users-tab.d.ts +8 -0
- package/dist/dashboard/sections/user-detail-modal.d.ts +12 -0
- package/dist/dashboard/sections/user-group-breakdown-table.d.ts +11 -0
- package/dist/dashboard/use-dashboard-section.d.ts +12 -0
- package/dist/features/composer/attachments/attachment-buttons.d.ts +1 -1
- package/dist/features/composer/editor/mention-suggestion-list.d.ts +1 -1
- package/dist/features/composer/emoji/emoji-picker-button.d.ts +1 -1
- package/dist/features/composer/format-bar/format-bar.d.ts +1 -1
- package/dist/features/composer/more-menu/more-menu.d.ts +1 -1
- package/dist/features/composer/reply/composer-reply-banner.d.ts +1 -1
- package/dist/features/composer/toolbar/composer-toolbar.d.ts +1 -1
- package/dist/features/create-conversation/tabs/create-group-tab.d.ts +1 -1
- package/dist/features/create-conversation/tabs/direct-chat-tab.d.ts +1 -1
- package/dist/features/files/file-attachment.d.ts +1 -1
- package/dist/features/forward/forward-dialog.d.ts +1 -1
- package/dist/features/invite-join/group-invite-join-modal.d.ts +1 -1
- package/dist/features/invite-join/group-invite-join-overlay.d.ts +1 -1
- package/dist/features/message-list/bubble/message-actions/message-actions-menu.d.ts +1 -1
- package/dist/features/message-list/bubble/message-bubble.d.ts +1 -1
- package/dist/features/message-list/bubble/message-content-body.d.ts +1 -1
- package/dist/features/message-list/bubble/message-reactions.d.ts +1 -1
- package/dist/features/message-list/bubble/reaction-icon.d.ts +1 -1
- package/dist/features/message-list/bubble/rich-message-content.d.ts +1 -1
- package/dist/features/message-list/overlays/message-detail/message-detail-dialog.d.ts +1 -1
- package/dist/features/message-list/overlays/message-details/message-details-modal.d.ts +1 -1
- package/dist/features/message-list/overlays/reaction/reaction-modal.d.ts +1 -1
- package/dist/features/message-list/overlays/system-members/system-members-modal.d.ts +1 -1
- package/dist/features/notification-settings/notification-settings-modal.d.ts +6 -0
- package/dist/features/pinned-messages/pinned-messages-bar.d.ts +1 -1
- package/dist/features/typing/typing-indicator.d.ts +1 -1
- package/dist/index.cjs +2004 -47
- package/dist/index.d.ts +4 -0
- package/dist/index.js +40683 -10216
- package/dist/module/chat-module.d.ts +1 -1
- package/dist/module/chat-routes.d.ts +1 -1
- package/dist/module/chat-runtime-provider.d.ts +1 -1
- package/dist/module/navigation/router-chat-navigation.d.ts +1 -1
- package/dist/module/widget/chat-widget.d.ts +1 -1
- package/dist/module/widget/widget-chat-navigation.d.ts +2 -2
- package/dist/module/widget/widget-chat-shell.d.ts +1 -1
- package/dist/pages/Setting/archive/archive-attachment-preview.d.ts +1 -1
- package/dist/pages/Setting/archive/archive-file-list.d.ts +1 -1
- package/dist/pages/Setting/archive/archive-media-grid.d.ts +1 -1
- package/dist/pages/Setting/archive/archive-view.d.ts +1 -1
- package/dist/pages/Setting/board/conversation-board-modal.d.ts +1 -1
- package/dist/pages/Setting/conversation-settings-panel.d.ts +1 -1
- package/dist/pages/Setting/members/add-member-modal.d.ts +1 -1
- package/dist/pages/Setting/members/confirm-remove-members-dialog.d.ts +1 -1
- package/dist/pages/Setting/members/group-members-modal.d.ts +4 -1
- package/dist/pages/Setting/members/join-requests-modal.d.ts +1 -1
- package/dist/pages/Setting/members/member-selection-footer.d.ts +1 -1
- package/dist/pages/Setting/members/settings-modal.d.ts +2 -2
- package/dist/pages/Setting/search-panel.d.ts +1 -1
- package/dist/pages/conversation/conversation-header/conversation-header.d.ts +1 -1
- package/dist/pages/conversations/empty-state/conversation-empty-state.d.ts +1 -1
- package/dist/pages/conversations/index.d.ts +1 -1
- package/dist/pages/conversations/workspace-user-profile-modal.d.ts +1 -1
- package/dist/pages/sidebar/hooks/use-conversations.d.ts +2 -0
- package/dist/pages/sidebar/index.d.ts +1 -1
- package/dist/pages/sidebar/sidbar-conversation-list/sidbar-conversation-list.d.ts +3 -1
- package/dist/pages/sidebar/sidebar-filter/sidebar-filter.d.ts +1 -1
- package/dist/pages/sidebar/sidebar-header-infor/sidebar-header-infor.d.ts +1 -1
- package/dist/shared/components/banner-carousel.d.ts +1 -1
- package/dist/shared/components/bell-off-icon.d.ts +1 -0
- package/dist/shared/components/chat-dialog.d.ts +1 -1
- package/dist/shared/components/chat-unavailable.d.ts +1 -1
- package/dist/shared/components/confirm-dialog.d.ts +1 -1
- package/dist/shared/components/conversation-avatar.d.ts +1 -1
- package/dist/shared/components/date-range-filter-pill.d.ts +1 -1
- package/dist/shared/components/download-action.d.ts +1 -1
- package/dist/shared/components/filter-pill.d.ts +1 -1
- package/dist/shared/components/image-not-available.d.ts +1 -1
- package/dist/shared/components/image-with-fallback.d.ts +1 -1
- package/dist/shared/components/load-more-sentinel.d.ts +1 -1
- package/dist/shared/components/loading-state.d.ts +1 -1
- package/dist/shared/components/lottie-animation.d.ts +1 -1
- package/dist/shared/components/multi-select-filter-pill.d.ts +1 -1
- package/dist/shared/components/quote-icon.d.ts +1 -1
- package/dist/shared/components/search-empty-state.d.ts +1 -1
- package/dist/shared/components/selection-panel.d.ts +1 -1
- package/dist/shared/components/shared-icon.d.ts +1 -1
- package/dist/shared/components/unpin-icon.d.ts +1 -1
- package/dist/shared/components/user-approved-icon.d.ts +1 -1
- package/dist/shared/components/user-avatar.d.ts +1 -1
- package/dist/shared/components/verified-badge.d.ts +1 -1
- package/dist/shared/components/work-status-badge.d.ts +1 -1
- package/dist/store/conversationsStore.d.ts +2 -1
- package/dist/store/userSettingsStore.d.ts +12 -0
- package/dist/styles.css +1 -1
- package/dist/utils/chat.d.ts +2 -0
- package/package.json +4 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DashboardDataSource } from './dashboard.types';
|
|
2
|
+
export interface DashboardModuleProps {
|
|
3
|
+
accessToken: string;
|
|
4
|
+
apiUrl: string;
|
|
5
|
+
canViewDashboard: boolean;
|
|
6
|
+
dataSource?: DashboardDataSource;
|
|
7
|
+
onOpenUser?: (userId: string) => void;
|
|
8
|
+
onUnauthorized?: () => void;
|
|
9
|
+
onRefreshToken?: () => Promise<string>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export type DashboardRangePreset = 'day' | 'week' | 'month' | 'custom';
|
|
2
|
+
export type ConversationKind = 'GROUP' | 'DIRECT';
|
|
3
|
+
export type ConversationKindFilter = 'all' | 'verified' | 'group' | 'direct';
|
|
4
|
+
export interface DashboardFilters {
|
|
5
|
+
preset: DashboardRangePreset;
|
|
6
|
+
from: string;
|
|
7
|
+
to: string;
|
|
8
|
+
userId: string | null;
|
|
9
|
+
kind: ConversationKindFilter;
|
|
10
|
+
search: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ConversationOverviewStats {
|
|
13
|
+
groupConversations: number;
|
|
14
|
+
verifiedGroups: number;
|
|
15
|
+
totalMessages: number;
|
|
16
|
+
sentByUserMessages: number | null;
|
|
17
|
+
}
|
|
18
|
+
export type TrendGranularity = 'hour' | 'day' | 'week' | 'month';
|
|
19
|
+
export interface ConversationCreationPoint {
|
|
20
|
+
label: string;
|
|
21
|
+
conversationCount: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ConversationCreationTrend {
|
|
24
|
+
points: ConversationCreationPoint[];
|
|
25
|
+
granularity: TrendGranularity;
|
|
26
|
+
}
|
|
27
|
+
export interface ConversationMemberPreview {
|
|
28
|
+
userId: string;
|
|
29
|
+
fullName: string;
|
|
30
|
+
avatarUrl: string | null;
|
|
31
|
+
}
|
|
32
|
+
export interface TopInteractiveConversation {
|
|
33
|
+
conversationId: string;
|
|
34
|
+
conversationType: ConversationKind;
|
|
35
|
+
title: string;
|
|
36
|
+
avatarUrl: string | null;
|
|
37
|
+
isVerified: boolean;
|
|
38
|
+
memberPreviews: ConversationMemberPreview[];
|
|
39
|
+
memberCount: number;
|
|
40
|
+
messageCount: number;
|
|
41
|
+
}
|
|
42
|
+
export interface ConversationListRow {
|
|
43
|
+
conversationId: string;
|
|
44
|
+
conversationType: ConversationKind;
|
|
45
|
+
title: string;
|
|
46
|
+
avatarUrl: string | null;
|
|
47
|
+
isVerified: boolean;
|
|
48
|
+
memberPreviews: ConversationMemberPreview[];
|
|
49
|
+
createdById: string;
|
|
50
|
+
createdByName: string;
|
|
51
|
+
createdByAvatarUrl: string | null;
|
|
52
|
+
memberCount: number;
|
|
53
|
+
totalMessageCount: number;
|
|
54
|
+
pinnedMessageCount: number;
|
|
55
|
+
messageCount: number;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
}
|
|
58
|
+
export interface TopUserRow {
|
|
59
|
+
userId: string;
|
|
60
|
+
fullName: string;
|
|
61
|
+
avatarUrl: string | null;
|
|
62
|
+
departmentName: string | null;
|
|
63
|
+
jobTitleName: string | null;
|
|
64
|
+
messageCount: number;
|
|
65
|
+
topGroupId: string | null;
|
|
66
|
+
topGroupTitle: string | null;
|
|
67
|
+
topGroupAvatarUrl: string | null;
|
|
68
|
+
topGroupMemberPreviews: ConversationMemberPreview[];
|
|
69
|
+
topGroupMemberCount: number | null;
|
|
70
|
+
topGroupMessageCount: number | null;
|
|
71
|
+
}
|
|
72
|
+
export interface UserGroupBreakdownRow {
|
|
73
|
+
conversationId: string;
|
|
74
|
+
title: string;
|
|
75
|
+
avatarUrl: string | null;
|
|
76
|
+
memberPreviews: ConversationMemberPreview[];
|
|
77
|
+
memberCount: number;
|
|
78
|
+
messageCount: number;
|
|
79
|
+
}
|
|
80
|
+
export interface ConversationMemberRow {
|
|
81
|
+
userId: string;
|
|
82
|
+
fullName: string;
|
|
83
|
+
avatarUrl: string | null;
|
|
84
|
+
departmentName: string | null;
|
|
85
|
+
jobTitleName: string | null;
|
|
86
|
+
role: 'OWNER' | 'ADMIN' | 'MEMBER';
|
|
87
|
+
joinedAt: string;
|
|
88
|
+
}
|
|
89
|
+
export interface DashboardPage<TRow> {
|
|
90
|
+
rows: TRow[];
|
|
91
|
+
totalRows: number;
|
|
92
|
+
}
|
|
93
|
+
export interface DashboardPageQuery extends DashboardFilters {
|
|
94
|
+
page: number;
|
|
95
|
+
pageSize: number;
|
|
96
|
+
}
|
|
97
|
+
export interface DashboardDataSource {
|
|
98
|
+
fetchConversationOverview(filters: DashboardFilters, signal: AbortSignal): Promise<ConversationOverviewStats>;
|
|
99
|
+
fetchConversationCreationTrend(filters: DashboardFilters, signal: AbortSignal): Promise<ConversationCreationTrend>;
|
|
100
|
+
fetchTopInteractiveConversations(filters: DashboardFilters, signal: AbortSignal): Promise<TopInteractiveConversation[]>;
|
|
101
|
+
fetchConversationList(query: DashboardPageQuery, signal: AbortSignal): Promise<DashboardPage<ConversationListRow>>;
|
|
102
|
+
fetchConversationMembers(query: {
|
|
103
|
+
conversationId: string;
|
|
104
|
+
page: number;
|
|
105
|
+
pageSize: number;
|
|
106
|
+
}, signal: AbortSignal): Promise<DashboardPage<ConversationMemberRow>>;
|
|
107
|
+
fetchTopUsers(query: DashboardPageQuery, signal: AbortSignal): Promise<DashboardPage<TopUserRow>>;
|
|
108
|
+
fetchUserGroupBreakdown(query: DashboardPageQuery, signal: AbortSignal): Promise<DashboardPage<UserGroupBreakdownRow>>;
|
|
109
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DashboardFilters } from '../dashboard.types';
|
|
2
|
+
interface DashboardFilterBarProps {
|
|
3
|
+
filters: DashboardFilters;
|
|
4
|
+
onChange: (filters: DashboardFilters) => void;
|
|
5
|
+
showKindFilter?: boolean;
|
|
6
|
+
showUserFilter?: boolean;
|
|
7
|
+
/** What the user filter means here — the roster filters by who created the group, the
|
|
8
|
+
* other reports by who took part. */
|
|
9
|
+
userPlaceholder?: string;
|
|
10
|
+
searchPlaceholder?: string;
|
|
11
|
+
groupsOnly?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function DashboardFilterBar({ filters, onChange, showKindFilter, showUserFilter, userPlaceholder, searchPlaceholder, groupsOnly, }: DashboardFilterBarProps): import('react/jsx-runtime').JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface DashboardUserOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
/** One owner for `/users` inside the dashboard: the filter bar renders in every section, and
|
|
6
|
+
* a fetch inside each one would fire the same request four times on every page load. */
|
|
7
|
+
export declare function useDashboardUserOptions(searchTerm: string): {
|
|
8
|
+
options: DashboardUserOption[];
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
isLoadingMore: boolean;
|
|
11
|
+
hasMore: boolean;
|
|
12
|
+
loadMore: () => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { DashboardFilters, DashboardRangePreset, TrendGranularity } from '../dashboard.types';
|
|
3
|
+
export interface DashboardRangePresetOption {
|
|
4
|
+
key: Exclude<DashboardRangePreset, 'custom'>;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DASHBOARD_RANGE_PRESETS: DashboardRangePresetOption[];
|
|
8
|
+
export interface DashboardDateRange {
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolvePresetRange(preset: Exclude<DashboardRangePreset, 'custom'>, now?: Dayjs): DashboardDateRange;
|
|
13
|
+
export declare function toRange(from: Dayjs, to: Dayjs): DashboardDateRange;
|
|
14
|
+
export declare const DEFAULT_PRESET: DashboardRangePresetOption['key'];
|
|
15
|
+
export declare function createDefaultFilters(): DashboardFilters;
|
|
16
|
+
export declare function resolveGranularity({ from, to }: DashboardDateRange): TrendGranularity;
|
|
17
|
+
export declare function formatGranularityLabel(moment: Dayjs, granularity: TrendGranularity): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DashboardDataSource } from '../dashboard.types';
|
|
2
|
+
interface ConversationCreationTrendCardProps {
|
|
3
|
+
dataSource: DashboardDataSource;
|
|
4
|
+
}
|
|
5
|
+
export declare function ConversationCreationTrendCard({ dataSource, }: ConversationCreationTrendCardProps): import('react/jsx-runtime').JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DashboardDataSource } from '../dashboard.types';
|
|
2
|
+
interface ConversationListTabProps {
|
|
3
|
+
dataSource: DashboardDataSource;
|
|
4
|
+
isExpanded: boolean;
|
|
5
|
+
onOpenUser?: (userId: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function ConversationListTab({ dataSource, isExpanded, onOpenUser, }: ConversationListTabProps): import('react/jsx-runtime').JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DashboardDataSource } from '../dashboard.types';
|
|
2
|
+
interface ConversationMembersDialogProps {
|
|
3
|
+
dataSource: DashboardDataSource;
|
|
4
|
+
conversationId: string;
|
|
5
|
+
memberCount: number;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onOpenUser?: (userId: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function ConversationMembersDialog({ dataSource, conversationId, memberCount, onClose, onOpenUser, }: ConversationMembersDialogProps): import('react/jsx-runtime').JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DashboardDataSource } from '../dashboard.types';
|
|
2
|
+
interface ConversationOverviewCardsProps {
|
|
3
|
+
dataSource: DashboardDataSource;
|
|
4
|
+
}
|
|
5
|
+
export declare function ConversationOverviewCards({ dataSource }: ConversationOverviewCardsProps): import('react/jsx-runtime').JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DashboardDataSource } from '../dashboard.types';
|
|
2
|
+
interface DashboardTabsProps {
|
|
3
|
+
dataSource: DashboardDataSource;
|
|
4
|
+
onOpenUser?: (userId: string) => void;
|
|
5
|
+
}
|
|
6
|
+
/** The expand control lives here rather than inside each pane so the enlarged view keeps the
|
|
7
|
+
* tab bar: zooming a table should not strand the reader on one tab with no way across. */
|
|
8
|
+
export declare function DashboardTabs({ dataSource, onOpenUser, }: DashboardTabsProps): import('react/jsx-runtime').JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ConversationMemberPreview } from '../dashboard.types';
|
|
2
|
+
interface GroupAvatarProps {
|
|
3
|
+
avatarUrl: string | null;
|
|
4
|
+
title: string;
|
|
5
|
+
memberPreviews: ConversationMemberPreview[];
|
|
6
|
+
memberCount: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/** The sidebar's own avatar, reused. Its styles are written as `.med-chat-root .conversation-
|
|
10
|
+
* avatar…`, and the dashboard root carries no such class, so the wrapper supplies the scope
|
|
11
|
+
* for this subtree alone. `display: contents` keeps it out of the layout, and adding the
|
|
12
|
+
* class here rather than on the dashboard root keeps every other chat rule from matching
|
|
13
|
+
* dashboard markup. */
|
|
14
|
+
export declare function GroupAvatar({ avatarUrl, title, memberPreviews, memberCount, className, }: GroupAvatarProps): import('react/jsx-runtime').JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface SectionCardProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
filters: ReactNode;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: Error | null;
|
|
7
|
+
hasContent: boolean;
|
|
8
|
+
bare?: boolean;
|
|
9
|
+
expandable?: boolean;
|
|
10
|
+
bodyClassName?: string;
|
|
11
|
+
onRefresh: () => void;
|
|
12
|
+
children: ReactNode | ((isExpanded: boolean) => ReactNode);
|
|
13
|
+
}
|
|
14
|
+
export declare function SectionCard({ title, filters, isLoading, error, hasContent, bare, expandable, bodyClassName, onRefresh, children, }: SectionCardProps): import('react/jsx-runtime').JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DashboardDataSource } from '../dashboard.types';
|
|
2
|
+
interface TopConversationsCardProps {
|
|
3
|
+
dataSource: DashboardDataSource;
|
|
4
|
+
}
|
|
5
|
+
export declare function TopConversationsCard({ dataSource }: TopConversationsCardProps): import('react/jsx-runtime').JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DashboardDataSource } from '../dashboard.types';
|
|
2
|
+
interface TopUsersTabProps {
|
|
3
|
+
dataSource: DashboardDataSource;
|
|
4
|
+
isExpanded: boolean;
|
|
5
|
+
onOpenUser?: (userId: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function TopUsersTab({ dataSource, isExpanded, onOpenUser, }: TopUsersTabProps): import('react/jsx-runtime').JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DashboardDataSource, DashboardFilters } from '../dashboard.types';
|
|
2
|
+
interface UserDetailModalProps {
|
|
3
|
+
dataSource: DashboardDataSource;
|
|
4
|
+
filters: DashboardFilters;
|
|
5
|
+
userId: string;
|
|
6
|
+
userName: string;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** The per-group breakdown for one person. It carries the tab's own date range and kind
|
|
10
|
+
* filter, so the detail always answers for the same period the table was showing. */
|
|
11
|
+
export declare function UserDetailModal({ dataSource, filters, userId, userName, onClose, }: UserDetailModalProps): import('react/jsx-runtime').JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DashboardPage, UserGroupBreakdownRow } from '../dashboard.types';
|
|
2
|
+
interface UserGroupBreakdownTableProps {
|
|
3
|
+
page: DashboardPage<UserGroupBreakdownRow> | null;
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
isExpanded: boolean;
|
|
6
|
+
currentPage: number;
|
|
7
|
+
pageSize: number;
|
|
8
|
+
onPageChange: (page: number, pageSize: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function UserGroupBreakdownTable({ page, isLoading, isExpanded, currentPage, pageSize, onPageChange, }: UserGroupBreakdownTableProps): import('react/jsx-runtime').JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DashboardFilters } from './dashboard.types';
|
|
2
|
+
export declare function useDashboardFilters(): {
|
|
3
|
+
filters: DashboardFilters;
|
|
4
|
+
setFilters: import('react').Dispatch<import('react').SetStateAction<DashboardFilters>>;
|
|
5
|
+
};
|
|
6
|
+
export interface DashboardSectionState<TResult> {
|
|
7
|
+
data: TResult | null;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
error: Error | null;
|
|
10
|
+
refresh: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function useDashboardQuery<TQuery, TResult>(fetchSection: (query: TQuery, signal: AbortSignal) => Promise<TResult>, query: TQuery): DashboardSectionState<TResult>;
|
|
@@ -4,5 +4,5 @@ interface AttachmentButtonsProps {
|
|
|
4
4
|
}
|
|
5
5
|
/** Composer toolbar's file/image buttons — both just forward to the parent's staged-
|
|
6
6
|
* attachment flow (picking files/images happens outside the composer). */
|
|
7
|
-
export declare function AttachmentButtons({ onAttach, onAttachImages }: AttachmentButtonsProps): import(
|
|
7
|
+
export declare function AttachmentButtons({ onAttach, onAttachImages }: AttachmentButtonsProps): import('react/jsx-runtime').JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -12,5 +12,5 @@ interface MentionSuggestionListProps {
|
|
|
12
12
|
onHighlight: (index: number) => void;
|
|
13
13
|
}
|
|
14
14
|
/** Zalo-style @mention dropdown: hint row, an "@All" option, then members with avatars. */
|
|
15
|
-
export declare function MentionSuggestionList({ items, selectedIndex, onSelect, onHighlight, }: MentionSuggestionListProps): import(
|
|
15
|
+
export declare function MentionSuggestionList({ items, selectedIndex, onSelect, onHighlight, }: MentionSuggestionListProps): import('react/jsx-runtime').JSX.Element | null;
|
|
16
16
|
export {};
|
|
@@ -6,5 +6,5 @@ interface EmojiPickerButtonProps {
|
|
|
6
6
|
/** Composer toolbar's smiley button: toggles a native-emoji picker popover and inserts
|
|
7
7
|
* the picked emoji at the cursor. Stays open after a pick so several emoji can be
|
|
8
8
|
* chosen in a row. */
|
|
9
|
-
export declare function EmojiPickerButton({ editor, isCompact }: EmojiPickerButtonProps): import(
|
|
9
|
+
export declare function EmojiPickerButton({ editor, isCompact }: EmojiPickerButtonProps): import('react/jsx-runtime').JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -10,5 +10,5 @@ interface FormatBarProps {
|
|
|
10
10
|
}
|
|
11
11
|
/** Rich-text format bar shown while the composer's "Định dạng" toggle is on: bold/italic/
|
|
12
12
|
* underline/strike, font size, text color, clear, lists, undo/redo, and the enlarge toggle. */
|
|
13
|
-
export declare function FormatBar({ editor, isEnlarged, onToggleEnlarged, sendButton }: FormatBarProps): import(
|
|
13
|
+
export declare function FormatBar({ editor, isEnlarged, onToggleEnlarged, sendButton }: FormatBarProps): import('react/jsx-runtime').JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** The composer's "..." button: opens a small menu (currently just "Tạo công việc").
|
|
2
2
|
* "Tạo công việc" is still scaffolded and just shows a "coming soon" toast, since
|
|
3
3
|
* there's no backend for it yet. */
|
|
4
|
-
export declare function MoreMenu(): import(
|
|
4
|
+
export declare function MoreMenu(): import('react/jsx-runtime').JSX.Element;
|
|
@@ -7,5 +7,5 @@ interface ComposerReplyBannerProps {
|
|
|
7
7
|
}
|
|
8
8
|
/** Shown above the composer while replying to a message: sender avatar/name + a short
|
|
9
9
|
* preview of what's being replied to, with a button to cancel the reply. */
|
|
10
|
-
export declare function ComposerReplyBanner({ target, avatarUrl, senderName, onCancel }: ComposerReplyBannerProps): import(
|
|
10
|
+
export declare function ComposerReplyBanner({ target, avatarUrl, senderName, onCancel }: ComposerReplyBannerProps): import('react/jsx-runtime').JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -18,5 +18,5 @@ interface ComposerToolbarProps {
|
|
|
18
18
|
/** Composer toolbar row: attach file/image, the "Định dạng" toggle, the emoji picker, and
|
|
19
19
|
* the "..." more menu — plus the format bar it reveals underneath when toggled open. Each
|
|
20
20
|
* button's own popover/panel lives in its own feature folder; this just arranges them. */
|
|
21
|
-
export declare function ComposerToolbar({ editor, onAttach, onAttachImages, isFormatOpen, onToggleFormat, isEnlarged, onToggleEnlarged, sendButton, isCollapsed, onExpand, showEmojiButton, }: ComposerToolbarProps): import(
|
|
21
|
+
export declare function ComposerToolbar({ editor, onAttach, onAttachImages, isFormatOpen, onToggleFormat, isEnlarged, onToggleEnlarged, sendButton, isCollapsed, onExpand, showEmojiButton, }: ComposerToolbarProps): import('react/jsx-runtime').JSX.Element;
|
|
22
22
|
export {};
|
|
@@ -12,5 +12,5 @@ interface CreateGroupTabProps {
|
|
|
12
12
|
}
|
|
13
13
|
/** "Nhóm" tab — check off members, submit to create the group (title input lives in the
|
|
14
14
|
* parent panel, above the department/branch filters). */
|
|
15
|
-
export declare function CreateGroupTab({ users, groupTitle, isCreating, isLoadingUsers, error, onSubmit, onInvalidTitle, onOpenProfile, }: CreateGroupTabProps): import(
|
|
15
|
+
export declare function CreateGroupTab({ users, groupTitle, isCreating, isLoadingUsers, error, onSubmit, onInvalidTitle, onOpenProfile, }: CreateGroupTabProps): import('react/jsx-runtime').JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -10,5 +10,5 @@ interface DirectChatTabProps {
|
|
|
10
10
|
onOpenProfile: (userId: string) => void;
|
|
11
11
|
}
|
|
12
12
|
/** "Trò chuyện" tab — pick a user to start (or reuse) a direct conversation with. */
|
|
13
|
-
export declare function DirectChatTab({ users, isCreating, isLoadingUsers, error, onSelectUser, onOpenProfile, }: DirectChatTabProps): import(
|
|
13
|
+
export declare function DirectChatTab({ users, isCreating, isLoadingUsers, error, onSelectUser, onOpenProfile, }: DirectChatTabProps): import('react/jsx-runtime').JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -20,5 +20,5 @@ interface FileAttachmentProps {
|
|
|
20
20
|
* new tab) and Download actions, plus optional Share. Used in chat bubbles, the settings
|
|
21
21
|
* document list, and the archive.
|
|
22
22
|
*/
|
|
23
|
-
export declare function FileAttachment({ attachment, meta, onShare, onJumpToMessage, inline }: FileAttachmentProps): import(
|
|
23
|
+
export declare function FileAttachment({ attachment, meta, onShare, onJumpToMessage, inline }: FileAttachmentProps): import('react/jsx-runtime').JSX.Element;
|
|
24
24
|
export {};
|
|
@@ -9,5 +9,5 @@ interface ForwardDialogProps {
|
|
|
9
9
|
/** Zalo-style forward picker: choose one or more conversations to forward a message into.
|
|
10
10
|
* Built on the shared settings-modal shell/list/checkbox components (same ones the
|
|
11
11
|
* add-member and create-group pickers use) instead of one-off markup. */
|
|
12
|
-
export declare function ForwardDialog({ source, onClose, onForward, onOpenProfile }: ForwardDialogProps): import(
|
|
12
|
+
export declare function ForwardDialog({ source, onClose, onForward, onOpenProfile }: ForwardDialogProps): import('react/jsx-runtime').JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -3,5 +3,5 @@ interface GroupInviteJoinModalProps {
|
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
onJoined: (conversationId: string) => void;
|
|
5
5
|
}
|
|
6
|
-
export declare function GroupInviteJoinModal({ code, onClose, onJoined }: GroupInviteJoinModalProps): import(
|
|
6
|
+
export declare function GroupInviteJoinModal({ code, onClose, onJoined }: GroupInviteJoinModalProps): import('react/jsx-runtime').JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function GroupInviteJoinOverlay(): import(
|
|
1
|
+
export declare function GroupInviteJoinOverlay(): import('react/jsx-runtime').JSX.Element | null;
|
|
@@ -25,5 +25,5 @@ interface MessageActionsMenuProps {
|
|
|
25
25
|
onRemove: () => void;
|
|
26
26
|
}
|
|
27
27
|
/** Reply/forward buttons plus the "..." options menu (copy / pin / details / recall). */
|
|
28
|
-
export declare function MessageActionsMenu({ canRemove, removeLabel, isRemoving, canManagePins, canViewDetails, canCopy, canReply, canForward, isPinned, isMenuOpen, menuPosition, onReply, onForward, onOpenMenu, onCloseMenu, onCopyMessage, onTogglePin, onViewDetails, onRemove, }: MessageActionsMenuProps): import(
|
|
28
|
+
export declare function MessageActionsMenu({ canRemove, removeLabel, isRemoving, canManagePins, canViewDetails, canCopy, canReply, canForward, isPinned, isMenuOpen, menuPosition, onReply, onForward, onOpenMenu, onCloseMenu, onCopyMessage, onTogglePin, onViewDetails, onRemove, }: MessageActionsMenuProps): import('react/jsx-runtime').JSX.Element;
|
|
29
29
|
export {};
|
|
@@ -53,4 +53,4 @@ export interface MessageBubbleProps {
|
|
|
53
53
|
/** Renders one message: day divider, SYSTEM notice, reply/forward context, bubble body
|
|
54
54
|
* (delegated to MessageContentBody), reaction badge/picker (MessageReactions), action buttons
|
|
55
55
|
* and options menu (MessageActionsMenu), and the trailing timestamp/status/retry. */
|
|
56
|
-
export declare function MessageBubble({ message, isMine, currentUserId, resolveUserName, isGroup, isFocused, isLatestMessage, showDayDivider, isReactionPickerOpen, myReactionType, onOpenReactionPicker, onCloseReactionPickerIfSelf, onApplyReaction, onRemoveReaction, onOpenReactionModal, canManagePins, isPinned, onTogglePin, isMenuOpen, menuPosition, onOpenMenu, onCloseMenu, onCopyMessage, onViewDetails, canRemove, removeLabel, isRemoving, onRemove, onReply, onForward, onJumpToReply, onOpenMentionCard, onOpenSystemMembers, onOpenImageLightbox, onImageSettled, onRetry, onDeleteFailed, isSenderGroupOwner, resolveUserAvatar, onOpenUserProfile, }: MessageBubbleProps): import(
|
|
56
|
+
export declare function MessageBubble({ message, isMine, currentUserId, resolveUserName, isGroup, isFocused, isLatestMessage, showDayDivider, isReactionPickerOpen, myReactionType, onOpenReactionPicker, onCloseReactionPickerIfSelf, onApplyReaction, onRemoveReaction, onOpenReactionModal, canManagePins, isPinned, onTogglePin, isMenuOpen, menuPosition, onOpenMenu, onCloseMenu, onCopyMessage, onViewDetails, canRemove, removeLabel, isRemoving, onRemove, onReply, onForward, onJumpToReply, onOpenMentionCard, onOpenSystemMembers, onOpenImageLightbox, onImageSettled, onRetry, onDeleteFailed, isSenderGroupOwner, resolveUserAvatar, onOpenUserProfile, }: MessageBubbleProps): import('react/jsx-runtime').JSX.Element;
|
|
@@ -8,5 +8,5 @@ interface MessageContentBodyProps {
|
|
|
8
8
|
}
|
|
9
9
|
/** The bubble's inner content: image grid, document attachment(s), or marked-up text
|
|
10
10
|
* with clickable links/mentions — whichever the message type calls for. */
|
|
11
|
-
export declare function MessageContentBody({ message, isLatestMessage, onOpenImageLightbox, onImageSettled, onOpenMentionCard, }: MessageContentBodyProps): import(
|
|
11
|
+
export declare function MessageContentBody({ message, isLatestMessage, onOpenImageLightbox, onImageSettled, onOpenMentionCard, }: MessageContentBodyProps): import('react/jsx-runtime').JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -10,5 +10,5 @@ interface MessageReactionsProps {
|
|
|
10
10
|
onRemoveReaction: () => void;
|
|
11
11
|
onOpenModal: () => void;
|
|
12
12
|
}
|
|
13
|
-
export declare function MessageReactions({ message, isPickerOpen, myReactionType, onOpenPicker, onClosePickerIfSelf, onApplyReaction, onRemoveReaction, onOpenModal, }: MessageReactionsProps): import(
|
|
13
|
+
export declare function MessageReactions({ message, isPickerOpen, myReactionType, onOpenPicker, onClosePickerIfSelf, onApplyReaction, onRemoveReaction, onOpenModal, }: MessageReactionsProps): import('react/jsx-runtime').JSX.Element | null;
|
|
14
14
|
export {};
|
|
@@ -12,5 +12,5 @@ interface ReactionIconProps {
|
|
|
12
12
|
}
|
|
13
13
|
/** One reaction's artwork — flat SVG at rest, Lottie while `animated`. Decorative by
|
|
14
14
|
* default (the surrounding button carries the accessible name). */
|
|
15
|
-
export declare function ReactionIcon({ type, className, animated }: ReactionIconProps): import(
|
|
15
|
+
export declare function ReactionIcon({ type, className, animated }: ReactionIconProps): import('react/jsx-runtime').JSX.Element;
|
|
16
16
|
export { REACTION_LABEL_BY_TYPE };
|
|
@@ -4,5 +4,5 @@ interface RichMessageContentProps {
|
|
|
4
4
|
onOpenMentionCard: (userId: string, fallbackName?: string) => void;
|
|
5
5
|
}
|
|
6
6
|
/** Renders backend rich content with the same Tiptap structure as the composer, read-only. */
|
|
7
|
-
export declare function RichMessageContent({ content, onOpenMentionCard }: RichMessageContentProps): import(
|
|
7
|
+
export declare function RichMessageContent({ content, onOpenMentionCard }: RichMessageContentProps): import('react/jsx-runtime').JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -16,5 +16,5 @@ interface MessageDetailDialogProps {
|
|
|
16
16
|
* panel that already sits above the conversation. */
|
|
17
17
|
inline?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare function MessageDetailDialog({ detail, onClose, inline }: MessageDetailDialogProps): import(
|
|
19
|
+
export declare function MessageDetailDialog({ detail, onClose, inline }: MessageDetailDialogProps): import('react/jsx-runtime').JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -14,5 +14,5 @@ interface MessageDetailsModalProps {
|
|
|
14
14
|
onOpenProfile?: (userId: string) => void;
|
|
15
15
|
}
|
|
16
16
|
/** "Thông tin tin nhắn" dialog — sender/content/time preview plus a seen-by list. */
|
|
17
|
-
export declare function MessageDetailsModal({ message, isGroup, members, otherMember, currentUserId, authUser, seenBy, onClose, onOpenProfile, }: MessageDetailsModalProps): import(
|
|
17
|
+
export declare function MessageDetailsModal({ message, isGroup, members, otherMember, currentUserId, authUser, seenBy, onClose, onOpenProfile, }: MessageDetailsModalProps): import('react/jsx-runtime').JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -18,5 +18,5 @@ interface ReactionModalProps {
|
|
|
18
18
|
onOpenProfile: (userId: string) => void;
|
|
19
19
|
}
|
|
20
20
|
/** Shows detail users fetched on demand; message history never supplies these rows. */
|
|
21
|
-
export declare function ReactionModal({ message, filter, items, isLoading, error, hasMore, onFilterChange, onLoadMore, onRetry, onClose, members, onOpenProfile, }: ReactionModalProps): import(
|
|
21
|
+
export declare function ReactionModal({ message, filter, items, isLoading, error, hasMore, onFilterChange, onLoadMore, onRetry, onClose, members, onOpenProfile, }: ReactionModalProps): import('react/jsx-runtime').JSX.Element;
|
|
22
22
|
export {};
|
|
@@ -18,5 +18,5 @@ interface SystemMembersModalProps {
|
|
|
18
18
|
}
|
|
19
19
|
/** The people a batch "đã thêm" notice named. Same shape as the reaction detail modal: rows
|
|
20
20
|
* are fetched a page at a time, because this list can run to the whole company. */
|
|
21
|
-
export declare function SystemMembersModal({ totalCount, actionLabel, items, isLoading, error, hasMore, onLoadMore, onRetry, onClose, members, onOpenProfile, }: SystemMembersModalProps): import(
|
|
21
|
+
export declare function SystemMembersModal({ totalCount, actionLabel, items, isLoading, error, hasMore, onLoadMore, onRetry, onClose, members, onOpenProfile, }: SystemMembersModalProps): import('react/jsx-runtime').JSX.Element;
|
|
22
22
|
export {};
|
|
@@ -16,5 +16,5 @@ interface PinnedMessagesBarProps {
|
|
|
16
16
|
* the same store each message bubble's own pin icon reads, so a pin/unpin from either
|
|
17
17
|
* place shows up in both immediately.
|
|
18
18
|
*/
|
|
19
|
-
export declare function PinnedMessagesBar({ conversationId, currentUserId, isOwner, isGroup, onJump, timelineRef, }: PinnedMessagesBarProps): import(
|
|
19
|
+
export declare function PinnedMessagesBar({ conversationId, currentUserId, isOwner, isGroup, onJump, timelineRef, }: PinnedMessagesBarProps): import('react/jsx-runtime').JSX.Element | null;
|
|
20
20
|
export {};
|
|
@@ -4,5 +4,5 @@ interface TypingIndicatorProps {
|
|
|
4
4
|
/** Sits in normal flow between the timeline and the composer toolbar (Messenger/Zalo
|
|
5
5
|
* style) instead of floating over the message list — the name(s) typing, plus a small
|
|
6
6
|
* bubble of three bouncing dots standing in for "...". */
|
|
7
|
-
export declare function TypingIndicator({ typingNames }: TypingIndicatorProps): import(
|
|
7
|
+
export declare function TypingIndicator({ typingNames }: TypingIndicatorProps): import('react/jsx-runtime').JSX.Element | null;
|
|
8
8
|
export {};
|