@medipha/feed 0.3.5 → 0.3.7
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/app/newsfeed-module.types.d.ts +6 -0
- package/dist/app/runtime/feed-runtime-context.d.ts +1 -0
- package/dist/core/types.d.ts +8 -0
- package/dist/features/post/interactions/reactors-modal.d.ts +1 -1
- package/dist/index.cjs +21 -21
- package/dist/index.js +3430 -3312
- package/dist/shared/components/user-profile-link.d.ts +13 -0
- package/dist/shared/utils/format.d.ts +5 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,12 @@ export interface NewsfeedModuleProps {
|
|
|
5
5
|
basePath: string;
|
|
6
6
|
onUnauthorized?: () => void;
|
|
7
7
|
onNavigateOutsideFeed?: (path: string) => void;
|
|
8
|
+
/**
|
|
9
|
+
* A click on a colleague's avatar or name. The host shows the chat widget's own "Thông tin tài
|
|
10
|
+
* khoản" dialog for that user id (ChatWidget `openProfileRequest`), whose "Nhắn tin" opens the
|
|
11
|
+
* conversation in the widget. Without it avatars and names are not clickable.
|
|
12
|
+
*/
|
|
13
|
+
onOpenUserProfile?: (userId: string) => void;
|
|
8
14
|
/**
|
|
9
15
|
* The feed never offers post creation (that lives in NewsfeedAdminModule).
|
|
10
16
|
* false also disables reactions, comments and the post actions menu. Defaults to true.
|
|
@@ -12,6 +12,7 @@ export interface FeedRuntime {
|
|
|
12
12
|
postUrl: (postId: string) => string;
|
|
13
13
|
postUrlPath: (postId: string) => string;
|
|
14
14
|
onNavigateOutsideFeed?: NewsfeedModuleProps['onNavigateOutsideFeed'];
|
|
15
|
+
onOpenUserProfile?: NewsfeedModuleProps['onOpenUserProfile'];
|
|
15
16
|
}
|
|
16
17
|
export declare const FeedRuntimeContext: import('react').Context<FeedRuntime | undefined>;
|
|
17
18
|
export declare function useFeedRuntime(): FeedRuntime;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export interface FeedUser {
|
|
|
8
8
|
fullName: string;
|
|
9
9
|
avatarUrl: string | null;
|
|
10
10
|
departmentName: string | null;
|
|
11
|
+
branchName?: string | null;
|
|
11
12
|
jobTitle?: string | null;
|
|
12
13
|
isOfficial?: boolean;
|
|
13
14
|
}
|
|
@@ -73,8 +74,15 @@ export interface FeedPost extends ReactionSummary {
|
|
|
73
74
|
previewComments?: FeedComment[];
|
|
74
75
|
createdAt: string;
|
|
75
76
|
reviewedBy?: string | null;
|
|
77
|
+
/** Who approved the post, as a person; null until someone has. */
|
|
78
|
+
reviewer?: FeedUser | null;
|
|
76
79
|
reviewedAt?: string | null;
|
|
77
80
|
publishedBy?: string | null;
|
|
81
|
+
/** Who published the post, as a person; null until it has been. */
|
|
82
|
+
publisher?: FeedUser | null;
|
|
83
|
+
/** Who deleted the post, as a person; null while it is not deleted. */
|
|
84
|
+
deleter?: FeedUser | null;
|
|
85
|
+
deletedAt?: string | null;
|
|
78
86
|
publishedAt?: string | null;
|
|
79
87
|
unpublishedBy?: string | null;
|
|
80
88
|
unpublishedAt?: string | null;
|
|
@@ -3,6 +3,6 @@ interface ReactorsModalProps {
|
|
|
3
3
|
open: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
6
|
+
/** "Who reacted": one tab per reaction type with its count; the first type opens by default. */
|
|
7
7
|
export declare function ReactorsModal({ postId, open, onClose }: ReactorsModalProps): import('react/jsx-runtime').JSX.Element;
|
|
8
8
|
export {};
|