@medipha/feed 0.2.2 → 0.2.4

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.
@@ -3,10 +3,12 @@ import { FeedComment } from '../../core';
3
3
  interface CommentItemProps {
4
4
  comment: FeedComment;
5
5
  interactive: boolean;
6
+ /** Admin review: the delete menu stays even though the comment is not interactive. */
7
+ moderate?: boolean;
6
8
  onChange: (comment: FeedComment) => void;
7
9
  onDeleted: (comment: FeedComment) => void;
8
10
  onReply?: (comment: FeedComment) => void;
9
11
  children?: ReactNode;
10
12
  }
11
- export declare function CommentItem({ comment, interactive, onChange, onDeleted, onReply, children, }: CommentItemProps): import('react/jsx-runtime').JSX.Element;
13
+ export declare function CommentItem({ comment, interactive, moderate, onChange, onDeleted, onReply, children, }: CommentItemProps): import('react/jsx-runtime').JSX.Element;
12
14
  export {};
@@ -4,7 +4,9 @@ interface CommentThreadProps {
4
4
  previewComments?: FeedComment[];
5
5
  /** Comments modal: the composer renders into this element (the modal's fixed footer). */
6
6
  composerSlot?: HTMLElement | null;
7
+ /** Admin review: comments can be read and deleted, not reacted to or answered. */
8
+ moderate?: boolean;
7
9
  onCommentCountChange: (delta: number) => void;
8
10
  }
9
- export declare function CommentThread({ post, previewComments, composerSlot, onCommentCountChange, }: CommentThreadProps): import('react/jsx-runtime').JSX.Element;
11
+ export declare function CommentThread({ post, previewComments, composerSlot, moderate, onCommentCountChange, }: CommentThreadProps): import('react/jsx-runtime').JSX.Element;
10
12
  export {};
@@ -9,5 +9,11 @@ export interface PostCardProps {
9
9
  onRemoved?: (postId: string) => void;
10
10
  /** modal mode: where the comment composer renders, outside the scrolling area. */
11
11
  composerSlot?: HTMLElement | null;
12
+ /** Author's own list: every status, published included, as a pill above the header. */
13
+ statusOnTop?: boolean;
14
+ /** Buttons at the right of the header, e.g. "Sửa" on the author's own list. */
15
+ headerActions?: ReactNode;
16
+ /** Author's own list: create, view, edit and delete only, so no publish menu. */
17
+ hideModeration?: boolean;
12
18
  }
13
- export declare function PostCard({ post, mode, footer, onChange, onRemoved, composerSlot, }: PostCardProps): import('react/jsx-runtime').JSX.Element;
19
+ export declare function PostCard({ post, mode, footer, onChange, onRemoved, composerSlot, statusOnTop, headerActions, hideModeration, }: PostCardProps): import('react/jsx-runtime').JSX.Element;
@@ -3,6 +3,8 @@ import { FeedPost } from '../../../core';
3
3
  interface PostHeaderProps {
4
4
  post: FeedPost;
5
5
  extra?: ReactNode;
6
+ /** The card shows the status elsewhere (above the header). */
7
+ hideStatus?: boolean;
6
8
  }
7
- export declare function PostHeader({ post, extra }: PostHeaderProps): import('react/jsx-runtime').JSX.Element;
9
+ export declare function PostHeader({ post, extra, hideStatus }: PostHeaderProps): import('react/jsx-runtime').JSX.Element;
8
10
  export {};
@@ -5,6 +5,9 @@ interface PostListProps {
5
5
  list: CursorList<FeedPost>;
6
6
  emptyText: string;
7
7
  renderFooter?: (post: FeedPost) => ReactNode;
8
+ renderHeaderActions?: (post: FeedPost) => ReactNode;
9
+ statusOnTop?: boolean;
10
+ hideModeration?: boolean;
8
11
  }
9
- export declare function PostList({ list, emptyText, renderFooter }: PostListProps): import('react/jsx-runtime').JSX.Element;
12
+ export declare function PostList({ list, emptyText, renderFooter, renderHeaderActions, statusOnTop, hideModeration, }: PostListProps): import('react/jsx-runtime').JSX.Element;
10
13
  export {};