@apolitical/component-library 5.1.0-rr.1 → 5.1.1-SW.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/discussion/components/post/index.d.ts +1 -0
- package/discussion/components/post/post.d.ts +8 -4
- package/discussion/index.d.ts +2 -1
- package/index.js +49 -49
- package/index.mjs +3597 -3568
- package/package.json +1 -1
- package/style.css +1 -1
- package/user/member/member.d.ts +3 -0
|
@@ -2,15 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import { type ListMembers, ClickMentionFallback } from '../../../form';
|
|
3
3
|
import { DiscussionCreateContentFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, IForceHide, IFullDiscussionContent } from '../../discussion';
|
|
4
4
|
import { IBadgesOption } from '../../../user/badges';
|
|
5
|
-
interface
|
|
5
|
+
export interface IPostContent extends IFullDiscussionContent {
|
|
6
6
|
/** The post body */
|
|
7
7
|
postBody?: string;
|
|
8
|
+
/** Custom message to pass through to the Member component */
|
|
9
|
+
memberCustomMessage?: string;
|
|
8
10
|
}
|
|
9
|
-
interface
|
|
11
|
+
export interface IDiscussionPostProps {
|
|
10
12
|
/** The element that will render around the content */
|
|
11
13
|
element?: 'li' | 'div' | 'section' | 'article';
|
|
12
14
|
/** Information about the content being posted */
|
|
13
|
-
content:
|
|
15
|
+
content: IPostContent;
|
|
14
16
|
/** If the user has permission to interact with the post box and content, e.g. if they're a member of the community */
|
|
15
17
|
userHasPermissions?: boolean;
|
|
16
18
|
/** If the user has owner permissions, e.g. if they're a community owner */
|
|
@@ -73,6 +75,8 @@ interface Props {
|
|
|
73
75
|
styling?: {
|
|
74
76
|
/** Option of whether or not to show the copy link button */
|
|
75
77
|
showShareLinkButton?: boolean;
|
|
78
|
+
/** Option of whether or not to show the more menu button */
|
|
79
|
+
showMoreMenuButton?: boolean;
|
|
76
80
|
};
|
|
77
81
|
/** If the browser should focus on this post */
|
|
78
82
|
setFocus?: boolean;
|
|
@@ -81,5 +85,5 @@ interface Props {
|
|
|
81
85
|
/** Whether to show badges and the scope of the badge */
|
|
82
86
|
badges?: IBadgesOption;
|
|
83
87
|
}
|
|
84
|
-
declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, styling: { showShareLinkButton }, setFocus, isCommunity, badges, }:
|
|
88
|
+
declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, styling: { showShareLinkButton, showMoreMenuButton }, setFocus, isCommunity, badges, }: IDiscussionPostProps) => import("react/jsx-runtime").JSX.Element;
|
|
85
89
|
export default Post;
|
package/discussion/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export * from './feeds';
|
|
3
|
+
export * from './discussion.helpers';
|
|
3
4
|
export * from './sections';
|
|
4
|
-
export type { IMentionData, IMentions, IListMemberData } from './discussion.d';
|
|
5
|
+
export type { IFullDiscussionContent, IMentionData, IMentions, IListMemberData, } from './discussion.d';
|