@medipha/chat 1.0.50 → 1.0.51
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/dashboard.types.d.ts +11 -5
- package/dist/dashboard/filters/dashboard-filter-bar.d.ts +3 -1
- package/dist/dashboard/filters/date-range-presets.d.ts +3 -2
- package/dist/dashboard/sections/user-avatar-cell.d.ts +6 -0
- package/dist/dashboard/sections/user-detail-modal.d.ts +3 -5
- package/dist/dashboard/sections/user-group-breakdown-table.d.ts +2 -1
- package/dist/index.cjs +68 -68
- package/dist/index.js +11490 -11373
- package/dist/shared/components/user-profile-modal.d.ts +8 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
|
@@ -3,17 +3,18 @@ export type ConversationKind = 'GROUP' | 'DIRECT';
|
|
|
3
3
|
export type ConversationKindFilter = 'all' | 'verified' | 'group' | 'direct';
|
|
4
4
|
export interface DashboardFilters {
|
|
5
5
|
preset: DashboardRangePreset;
|
|
6
|
-
from: string;
|
|
7
|
-
to: string;
|
|
6
|
+
from: string | null;
|
|
7
|
+
to: string | null;
|
|
8
8
|
userId: string | null;
|
|
9
9
|
kind: ConversationKindFilter;
|
|
10
10
|
search: string;
|
|
11
|
+
branchId: string | null;
|
|
12
|
+
departmentId: string | null;
|
|
11
13
|
}
|
|
12
14
|
export interface ConversationOverviewStats {
|
|
13
15
|
groupConversations: number;
|
|
14
16
|
verifiedGroups: number;
|
|
15
17
|
totalMessages: number;
|
|
16
|
-
sentByUserMessages: number | null;
|
|
17
18
|
}
|
|
18
19
|
export type TrendGranularity = 'hour' | 'day' | 'week' | 'month';
|
|
19
20
|
export interface ConversationCreationPoint {
|
|
@@ -51,7 +52,6 @@ export interface ConversationListRow {
|
|
|
51
52
|
createdByAvatarUrl: string | null;
|
|
52
53
|
memberCount: number;
|
|
53
54
|
totalMessageCount: number;
|
|
54
|
-
pinnedMessageCount: number;
|
|
55
55
|
messageCount: number;
|
|
56
56
|
createdAt: string;
|
|
57
57
|
}
|
|
@@ -59,6 +59,7 @@ export interface TopUserRow {
|
|
|
59
59
|
userId: string;
|
|
60
60
|
fullName: string;
|
|
61
61
|
avatarUrl: string | null;
|
|
62
|
+
branchName: string | null;
|
|
62
63
|
departmentName: string | null;
|
|
63
64
|
jobTitleName: string | null;
|
|
64
65
|
messageCount: number;
|
|
@@ -94,6 +95,11 @@ export interface DashboardPageQuery extends DashboardFilters {
|
|
|
94
95
|
page: number;
|
|
95
96
|
pageSize: number;
|
|
96
97
|
}
|
|
98
|
+
export interface UserGroupBreakdownQuery {
|
|
99
|
+
userId: string;
|
|
100
|
+
page: number;
|
|
101
|
+
pageSize: number;
|
|
102
|
+
}
|
|
97
103
|
export interface DashboardDataSource {
|
|
98
104
|
fetchConversationOverview(filters: DashboardFilters, signal: AbortSignal): Promise<ConversationOverviewStats>;
|
|
99
105
|
fetchConversationCreationTrend(filters: DashboardFilters, signal: AbortSignal): Promise<ConversationCreationTrend>;
|
|
@@ -105,5 +111,5 @@ export interface DashboardDataSource {
|
|
|
105
111
|
pageSize: number;
|
|
106
112
|
}, signal: AbortSignal): Promise<DashboardPage<ConversationMemberRow>>;
|
|
107
113
|
fetchTopUsers(query: DashboardPageQuery, signal: AbortSignal): Promise<DashboardPage<TopUserRow>>;
|
|
108
|
-
fetchUserGroupBreakdown(query:
|
|
114
|
+
fetchUserGroupBreakdown(query: UserGroupBreakdownQuery, signal: AbortSignal): Promise<DashboardPage<UserGroupBreakdownRow>>;
|
|
109
115
|
}
|
|
@@ -2,13 +2,15 @@ import { DashboardFilters } from '../dashboard.types';
|
|
|
2
2
|
interface DashboardFilterBarProps {
|
|
3
3
|
filters: DashboardFilters;
|
|
4
4
|
onChange: (filters: DashboardFilters) => void;
|
|
5
|
+
showDateFilter?: boolean;
|
|
5
6
|
showKindFilter?: boolean;
|
|
6
7
|
showUserFilter?: boolean;
|
|
8
|
+
showDirectoryFilter?: boolean;
|
|
7
9
|
/** What the user filter means here — the roster filters by who created the group, the
|
|
8
10
|
* other reports by who took part. */
|
|
9
11
|
userPlaceholder?: string;
|
|
10
12
|
searchPlaceholder?: string;
|
|
11
13
|
groupsOnly?: boolean;
|
|
12
14
|
}
|
|
13
|
-
export declare function DashboardFilterBar({ filters, onChange, showKindFilter, showUserFilter, userPlaceholder, searchPlaceholder, groupsOnly, }: DashboardFilterBarProps): import('react/jsx-runtime').JSX.Element;
|
|
15
|
+
export declare function DashboardFilterBar({ filters, onChange, showDateFilter, showKindFilter, showUserFilter, showDirectoryFilter, userPlaceholder, searchPlaceholder, groupsOnly, }: DashboardFilterBarProps): import('react/jsx-runtime').JSX.Element;
|
|
14
16
|
export {};
|
|
@@ -6,9 +6,10 @@ export interface DashboardRangePresetOption {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const DASHBOARD_RANGE_PRESETS: DashboardRangePresetOption[];
|
|
8
8
|
export interface DashboardDateRange {
|
|
9
|
-
from: string;
|
|
10
|
-
to: string;
|
|
9
|
+
from: string | null;
|
|
10
|
+
to: string | null;
|
|
11
11
|
}
|
|
12
|
+
export declare const ALL_TIME_RANGE: DashboardDateRange;
|
|
12
13
|
export declare function resolvePresetRange(preset: Exclude<DashboardRangePreset, 'custom'>, now?: Dayjs): DashboardDateRange;
|
|
13
14
|
export declare function toRange(from: Dayjs, to: Dayjs): DashboardDateRange;
|
|
14
15
|
export declare const DEFAULT_PRESET: DashboardRangePresetOption['key'];
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { DashboardDataSource
|
|
1
|
+
import { DashboardDataSource } from '../dashboard.types';
|
|
2
2
|
interface UserDetailModalProps {
|
|
3
3
|
dataSource: DashboardDataSource;
|
|
4
|
-
filters: DashboardFilters;
|
|
5
4
|
userId: string;
|
|
6
5
|
userName: string;
|
|
7
6
|
onClose: () => void;
|
|
7
|
+
onOpenUser?: (userId: string) => void;
|
|
8
8
|
}
|
|
9
|
-
|
|
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;
|
|
9
|
+
export declare function UserDetailModal({ dataSource, userId, userName, onClose, onOpenUser, }: UserDetailModalProps): import('react/jsx-runtime').JSX.Element;
|
|
12
10
|
export {};
|
|
@@ -6,6 +6,7 @@ interface UserGroupBreakdownTableProps {
|
|
|
6
6
|
currentPage: number;
|
|
7
7
|
pageSize: number;
|
|
8
8
|
onPageChange: (page: number, pageSize: number) => void;
|
|
9
|
+
onOpenMembers?: (conversationId: string, memberCount: number) => void;
|
|
9
10
|
}
|
|
10
|
-
export declare function UserGroupBreakdownTable({ page, isLoading, isExpanded, currentPage, pageSize, onPageChange, }: UserGroupBreakdownTableProps): import('react/jsx-runtime').JSX.Element;
|
|
11
|
+
export declare function UserGroupBreakdownTable({ page, isLoading, isExpanded, currentPage, pageSize, onPageChange, onOpenMembers, }: UserGroupBreakdownTableProps): import('react/jsx-runtime').JSX.Element;
|
|
11
12
|
export {};
|