@apolitical/component-library 1.13.4-beta.3 → 1.13.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.
- package/communities/community-details/community-details.d.ts +8 -2
- package/discussion/components/post/post.d.ts +1 -1
- package/discussion/components/thread/thread.d.ts +3 -3
- package/discussion/feeds/replies-feed/replies-feed.d.ts +2 -7
- package/discussion/feeds/replies-feed/replies-feed.handlers.d.ts +2 -6
- package/index.js +14 -14
- package/index.mjs +2187 -2390
- package/package.json +1 -1
- package/style.css +1 -1
- package/discussion/feeds/replies-to-replies-feed/index.d.ts +0 -1
- package/discussion/feeds/replies-to-replies-feed/replies-to-replies-feed.d.ts +0 -35
- package/discussion/feeds/replies-to-replies-feed/replies-to-replies-feed.handlers.d.ts +0 -134
|
@@ -7,11 +7,17 @@ interface Props extends IJoinButtonProps {
|
|
|
7
7
|
slug: string;
|
|
8
8
|
/** Details about members in the community */
|
|
9
9
|
members?: {
|
|
10
|
-
number?: number
|
|
10
|
+
number?: number;
|
|
11
11
|
data?: MemberProps[];
|
|
12
12
|
};
|
|
13
|
+
/** Callback functions */
|
|
14
|
+
functions: {
|
|
15
|
+
invite: () => void;
|
|
16
|
+
join: () => void;
|
|
17
|
+
leave: () => void;
|
|
18
|
+
};
|
|
13
19
|
/** Additional classes */
|
|
14
20
|
className?: string;
|
|
15
21
|
}
|
|
16
|
-
declare const CommunityDetails: ({ isMember, slug, members: { number, data:
|
|
22
|
+
declare const CommunityDetails: ({ className, isMember, slug, members: { number: membersCount, data: membersData }, functions: { invite, ...membershipFunctions }, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
23
|
export default CommunityDetails;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** If the thread is open or not */
|
|
4
|
+
isOpen?: boolean;
|
|
3
5
|
/** The number of posts in the thread */
|
|
4
6
|
count?: number;
|
|
5
|
-
/** Whether to show the show replies button or not */
|
|
6
|
-
showRepliesButton?: boolean;
|
|
7
7
|
/** The posts to render */
|
|
8
8
|
children: React.ReactNode | JSX.Element | JSX.Element[];
|
|
9
9
|
}
|
|
10
|
-
declare const Thread: ({
|
|
10
|
+
declare const Thread: ({ isOpen: threadIsOpen, count, children }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default Thread;
|
|
@@ -7,11 +7,7 @@ interface Props {
|
|
|
7
7
|
repliesList: IReply[] | undefined;
|
|
8
8
|
isMember: boolean;
|
|
9
9
|
functions: {
|
|
10
|
-
createReply: (
|
|
11
|
-
activityId?: string;
|
|
12
|
-
replyId?: string;
|
|
13
|
-
content: string;
|
|
14
|
-
}) => Promise<void>;
|
|
10
|
+
createReply: () => Promise<void>;
|
|
15
11
|
editReply: ({ parentId, replyId, content, }: {
|
|
16
12
|
parentId: string;
|
|
17
13
|
replyId: string;
|
|
@@ -19,9 +15,8 @@ interface Props {
|
|
|
19
15
|
body: string;
|
|
20
16
|
};
|
|
21
17
|
}) => Promise<void>;
|
|
22
|
-
like: ({ replyId
|
|
18
|
+
like: ({ replyId }: {
|
|
23
19
|
replyId: string;
|
|
24
|
-
replyParentId?: string;
|
|
25
20
|
}) => Promise<void>;
|
|
26
21
|
unlike: ({ replyId }: {
|
|
27
22
|
replyId: string;
|
|
@@ -4,14 +4,10 @@ import { IUserContext } from '../../..';
|
|
|
4
4
|
interface buildAddReplyHandlersProps {
|
|
5
5
|
queryClient: QueryClient;
|
|
6
6
|
queryKey: QueryKey;
|
|
7
|
-
mutationFn: (
|
|
8
|
-
body: string;
|
|
9
|
-
}) => Promise<void>;
|
|
7
|
+
mutationFn: () => Promise<void>;
|
|
10
8
|
}
|
|
11
9
|
export declare const buildAddReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildAddReplyHandlersProps) => {
|
|
12
|
-
mutationFn: (
|
|
13
|
-
body: string;
|
|
14
|
-
}) => Promise<void>;
|
|
10
|
+
mutationFn: () => Promise<void>;
|
|
15
11
|
onMutate: () => Promise<void>;
|
|
16
12
|
onError: (_err: {
|
|
17
13
|
[key: string]: string;
|