@apolitical/component-library 5.2.0-jc.0 → 5.2.0-jc.10

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.
Files changed (46) hide show
  1. package/communities/members-list/index.d.ts +2 -0
  2. package/communities/members-list/members-list.constants.d.ts +1 -0
  3. package/communities/members-list/members-list.d.ts +6 -2
  4. package/discussion/components/likes/components/index.d.ts +1 -0
  5. package/discussion/components/likes/components/likes-modal/index.d.ts +1 -0
  6. package/discussion/components/likes/components/likes-modal/likes-modal.d.ts +17 -0
  7. package/discussion/components/likes/index.d.ts +1 -0
  8. package/discussion/components/likes/likes.d.ts +14 -3
  9. package/discussion/components/likes/likes.mock.d.ts +2 -0
  10. package/discussion/components/likes/mocks/index.d.ts +1 -0
  11. package/discussion/components/likes/mocks/likes-response.mock.d.ts +64 -0
  12. package/discussion/components/likes/tooltip.hook.d.ts +5 -0
  13. package/discussion/components/post/index.d.ts +1 -0
  14. package/discussion/components/post/post.d.ts +17 -6
  15. package/discussion/components/post/post.mock.d.ts +64 -0
  16. package/discussion/feeds/activities-feed/activities-feed.d.ts +2 -0
  17. package/discussion/feeds/activities-feed/cache/cache.helper.d.ts +5 -0
  18. package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +75 -1
  19. package/discussion/feeds/index.d.ts +1 -0
  20. package/discussion/feeds/likes-feed/cache/hooks/feed/feed.hook.d.ts +1 -1
  21. package/discussion/feeds/likes-feed/index.d.ts +1 -0
  22. package/discussion/feeds/likes-feed/likes-feed.d.ts +5 -9
  23. package/discussion/feeds/replies-feed/cache/cache.helper.d.ts +16 -0
  24. package/discussion/feeds/replies-feed/nested-replies-feed/nested-replies-feed.d.ts +7 -1
  25. package/discussion/feeds/replies-feed/replies-feed.d.ts +14 -10
  26. package/discussion/index.d.ts +2 -1
  27. package/discussion/sections/activity-section/activity-section.d.ts +2 -0
  28. package/discussion/sections/activity-section/cache/hooks/read/read.hook.d.ts +1 -1
  29. package/discussion/shared/interfaces/activity.interface.d.ts +2 -1
  30. package/discussion/shared/interfaces/discussion.interface.d.ts +84 -0
  31. package/discussion/shared/interfaces/index.d.ts +1 -0
  32. package/general/link/link.d.ts +2 -2
  33. package/helpers/intl.d.ts +1 -1
  34. package/index.js +53 -53
  35. package/index.mjs +8518 -8288
  36. package/navigation/enriched-url/enriched-url.d.ts +33 -0
  37. package/navigation/enriched-url/enriched-url.mock.d.ts +9 -0
  38. package/navigation/enriched-url/index.d.ts +1 -0
  39. package/navigation/index.d.ts +1 -0
  40. package/package.json +4 -1
  41. package/style.css +1 -1
  42. package/styles/variables/colors/theme/_general.scss +1 -0
  43. package/styles/variables/colors/theme/_navigation.scss +4 -0
  44. package/text/helper-text-box/helper-text-box.d.ts +2 -2
  45. package/text/helper-text-box/index.d.ts +1 -0
  46. package/user/member/member.d.ts +3 -0
@@ -1 +1,3 @@
1
1
  export { default as MembersList } from './members-list';
2
+ export type { CommunityMemberProps } from './members-list';
3
+ export * from './members-list.constants';
@@ -0,0 +1 @@
1
+ export declare const MEMBERS_PER_PAGE = 25;
@@ -1,6 +1,6 @@
1
1
  import { type IProfileFormProps } from '../../form';
2
2
  import { MemberDetailsProps } from '../../user';
3
- interface CommunityMemberProps extends MemberDetailsProps {
3
+ export interface CommunityMemberProps extends MemberDetailsProps {
4
4
  /** Whether the user is an admin of the community or not */
5
5
  isAdmin?: boolean;
6
6
  }
@@ -23,8 +23,12 @@ interface Props {
23
23
  gtmContext?: string;
24
24
  /** The GTM event to use */
25
25
  gtmType?: string;
26
+ /** Whether to show the header */
27
+ showHeader?: boolean;
28
+ /** Whether to show placeholders */
29
+ showPlaceholders?: boolean;
26
30
  /** Additional classes */
27
31
  className?: string;
28
32
  }
29
- declare const MembersList: ({ members: { data, total }, communitySlug, isMember, hasNextPage, loadNextPage, profile, gtmContext, gtmType, className, }: Props) => import("react/jsx-runtime").JSX.Element | null;
33
+ declare const MembersList: ({ members: { data, total }, communitySlug, isMember, hasNextPage, loadNextPage, profile, gtmContext, gtmType, showHeader, showPlaceholders, className, }: Props) => import("react/jsx-runtime").JSX.Element | null;
30
34
  export default MembersList;
@@ -0,0 +1 @@
1
+ export * from './likes-modal';
@@ -0,0 +1 @@
1
+ export { default as LikesModal } from './likes-modal';
@@ -0,0 +1,17 @@
1
+ import { ILikesFeedProps, ILikesFeedQueryFns } from '../../../../../discussion/feeds';
2
+ export interface ILikesModalProps extends ILikesFeedProps {
3
+ /** Whether the modal is open on page load */
4
+ showModal?: boolean;
5
+ /** Functions used inside the modal */
6
+ functions: {
7
+ likes: {
8
+ list: ILikesFeedQueryFns['list'];
9
+ };
10
+ /** Function to call when the modal is closed */
11
+ onClose?: () => void;
12
+ };
13
+ /** Additional classes */
14
+ className?: string;
15
+ }
16
+ declare const LikesModal: ({ showModal, activityId, functions: { onClose, likes: likesFns }, likeCount, className, basePath, parentId, }: ILikesModalProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default LikesModal;
@@ -1 +1,2 @@
1
1
  export { default as DiscussionLikes } from './likes';
2
+ export { default as LikesModal } from './components/likes-modal/likes-modal';
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import { MemberProps } from '../../../user';
2
+ import { IBadgesOption, MemberProps } from '../../../user';
3
3
  import { IDiscussionContent } from './../../discussion';
4
+ import { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
4
5
  interface Props {
5
6
  /** The element to render around the content */
6
7
  element?: 'li' | 'div';
@@ -16,17 +17,27 @@ interface Props {
16
17
  content?: IDiscussionContent;
17
18
  /** If the user is able to like the content */
18
19
  canLike?: boolean;
20
+ /** The ID of the activity */
21
+ activityId: string;
22
+ /** The base path, used for slugs */
23
+ basePath: string;
24
+ /** The ID of the parent, used for slugs */
25
+ parentId: string;
26
+ /** Whether to show badges and the scope of the badge */
27
+ badges: IBadgesOption | undefined;
19
28
  /** Functions to handle liking and unliking */
20
- functions?: {
29
+ functions: {
21
30
  /** Function to create a like */
22
31
  createLike?: (args1: object) => void;
23
32
  /** Function to delete a like */
24
33
  deleteLike?: (args: object) => void;
34
+ /** Functions for the likes query */
35
+ listLikes?: ILikesFeedQueryFns['list'];
25
36
  };
26
37
  /** The language to use for the text */
27
38
  locale?: string;
28
39
  }
29
- declare const Likes: ({ element, likes, peopleWhoLiked, isShort, userLiked, content, canLike, functions: { createLike, deleteLike }, }: Props) => React.DetailedReactHTMLElement<{
40
+ declare const Likes: ({ element, likes, peopleWhoLiked, isShort, userLiked, content, canLike, activityId, basePath, parentId, badges, functions: { createLike, deleteLike, listLikes, }, }: Props) => React.DetailedReactHTMLElement<{
30
41
  className: string;
31
42
  onKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;
32
43
  onMouseEnter: () => void;
@@ -0,0 +1,2 @@
1
+ import { MemberProps } from '../../../user';
2
+ export declare const peopleWhoLiked: MemberProps[];
@@ -0,0 +1 @@
1
+ export * from './likes-response.mock';
@@ -0,0 +1,64 @@
1
+ export declare const likesResponseMock: {
2
+ results: ({
3
+ created_at: string;
4
+ updated_at: string;
5
+ id: string;
6
+ user_id: string;
7
+ user: {
8
+ id: string;
9
+ data: {
10
+ name: string;
11
+ thumbnail: string;
12
+ jobTitle: string;
13
+ organization: string;
14
+ badges: {
15
+ communities: {
16
+ 'endor-alumni': string[];
17
+ };
18
+ platform?: undefined;
19
+ };
20
+ };
21
+ created_at?: undefined;
22
+ updated_at?: undefined;
23
+ };
24
+ kind: string;
25
+ activity_id: string;
26
+ data: {
27
+ mentioned_users: null;
28
+ };
29
+ parent: string;
30
+ latest_children: {};
31
+ children_counts: {};
32
+ } | {
33
+ created_at: string;
34
+ updated_at: string;
35
+ id: string;
36
+ user_id: string;
37
+ user: {
38
+ created_at: string;
39
+ updated_at: string;
40
+ id: string;
41
+ data: {
42
+ jobTitle: string;
43
+ name: string;
44
+ organization: string;
45
+ thumbnail: string;
46
+ badges: {
47
+ platform: {
48
+ all: string[];
49
+ };
50
+ communities?: undefined;
51
+ };
52
+ };
53
+ };
54
+ kind: string;
55
+ activity_id: string;
56
+ data: {
57
+ mentioned_users: null;
58
+ };
59
+ parent: string;
60
+ latest_children: {};
61
+ children_counts: {};
62
+ })[];
63
+ next: string;
64
+ };
@@ -0,0 +1,5 @@
1
+ import { Dispatch } from 'react';
2
+ export declare function useOnTooltipKeyDown(dispatch: Dispatch<{
3
+ type: 'tabbableLink';
4
+ value: number;
5
+ }[]>): (e: React.KeyboardEvent<HTMLElement> | undefined) => void;
@@ -1,2 +1,3 @@
1
+ export type { IDiscussionPostProps, IPostContent } from './post';
1
2
  export { default as DiscussionPost } from './post';
2
3
  export { getPostBody } from './post.helpers';
@@ -1,16 +1,19 @@
1
1
  import React from 'react';
2
- import { type ListMembers, ClickMentionFallback } from '../../../form';
3
- import { DiscussionCreateContentFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, IForceHide, IFullDiscussionContent } from '../../discussion';
2
+ import { ClickMentionFallback, type ListMembers } from '../../../form';
3
+ import { DiscussionCreateContentFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, DiscussionListLikesFunction } from '../../discussion';
4
+ import type { IForceHide, IFullDiscussionContent } from '../../shared/interfaces';
4
5
  import { IBadgesOption } from '../../../user/badges';
5
- interface PostContent extends IFullDiscussionContent {
6
+ export interface IPostContent extends IFullDiscussionContent {
6
7
  /** The post body */
7
8
  postBody?: string;
9
+ /** Custom message to pass through to the Member component */
10
+ memberCustomMessage?: string;
8
11
  }
9
- interface Props {
12
+ export interface IDiscussionPostProps {
10
13
  /** The element that will render around the content */
11
14
  element?: 'li' | 'div' | 'section' | 'article';
12
15
  /** Information about the content being posted */
13
- content: PostContent;
16
+ content: IPostContent;
14
17
  /** If the user has permission to interact with the post box and content, e.g. if they're a member of the community */
15
18
  userHasPermissions?: boolean;
16
19
  /** If the user has owner permissions, e.g. if they're a community owner */
@@ -36,6 +39,8 @@ interface Props {
36
39
  createLike: DiscussionCreateLikeFunction;
37
40
  /** Delete a like on the post */
38
41
  deleteLike: DiscussionDeleteLikeFunction;
42
+ /** List the likes on the post */
43
+ listLikes: DiscussionListLikesFunction;
39
44
  };
40
45
  comments: {
41
46
  /** Open comments on a post */
@@ -73,6 +78,8 @@ interface Props {
73
78
  styling?: {
74
79
  /** Option of whether or not to show the copy link button */
75
80
  showShareLinkButton?: boolean;
81
+ /** Option of whether or not to show the more menu button */
82
+ showMoreMenuButton?: boolean;
76
83
  };
77
84
  /** If the browser should focus on this post */
78
85
  setFocus?: boolean;
@@ -80,6 +87,10 @@ interface Props {
80
87
  isCommunity?: boolean;
81
88
  /** Whether to show badges and the scope of the badge */
82
89
  badges?: IBadgesOption;
90
+ /** The base path, used for slugs */
91
+ basePath: string;
92
+ /** The ID of the parent, used for slugs */
93
+ parentId: string;
83
94
  }
84
- declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, styling: { showShareLinkButton }, setFocus, isCommunity, badges, }: Props) => import("react/jsx-runtime").JSX.Element;
95
+ declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, styling: { showShareLinkButton, showMoreMenuButton }, setFocus, isCommunity, badges, basePath, parentId, }: IDiscussionPostProps) => import("react/jsx-runtime").JSX.Element;
85
96
  export default Post;
@@ -9,6 +9,70 @@ declare namespace _default {
9
9
  namespace likes {
10
10
  function createLike(): void;
11
11
  function deleteLike(): void;
12
+ function listLikes(): Promise<{
13
+ results: ({
14
+ created_at: string;
15
+ updated_at: string;
16
+ id: string;
17
+ user_id: string;
18
+ user: {
19
+ id: string;
20
+ data: {
21
+ name: string;
22
+ thumbnail: string;
23
+ jobTitle: string;
24
+ organization: string;
25
+ badges: {
26
+ communities: {
27
+ 'endor-alumni': string[];
28
+ };
29
+ platform?: undefined;
30
+ };
31
+ };
32
+ created_at?: undefined;
33
+ updated_at?: undefined;
34
+ };
35
+ kind: string;
36
+ activity_id: string;
37
+ data: {
38
+ mentioned_users: null;
39
+ };
40
+ parent: string;
41
+ latest_children: {};
42
+ children_counts: {};
43
+ } | {
44
+ created_at: string;
45
+ updated_at: string;
46
+ id: string;
47
+ user_id: string;
48
+ user: {
49
+ created_at: string;
50
+ updated_at: string;
51
+ id: string;
52
+ data: {
53
+ jobTitle: string;
54
+ name: string;
55
+ organization: string;
56
+ thumbnail: string;
57
+ badges: {
58
+ platform: {
59
+ all: string[];
60
+ };
61
+ communities?: undefined;
62
+ };
63
+ };
64
+ };
65
+ kind: string;
66
+ activity_id: string;
67
+ data: {
68
+ mentioned_users: null;
69
+ };
70
+ parent: string;
71
+ latest_children: {};
72
+ children_counts: {};
73
+ })[];
74
+ next: string;
75
+ }>;
12
76
  }
13
77
  namespace comments {
14
78
  function openComments(): void;
@@ -2,6 +2,7 @@
2
2
  import { type IProfileFormProps } from '../../../form';
3
3
  import type { IMentionsFns } from '../../../discussion/discussion.d';
4
4
  import type { IQueryFns } from './cache';
5
+ import type { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
5
6
  interface Props {
6
7
  /** The base path, used for slugs */
7
8
  basePath: string;
@@ -21,6 +22,7 @@ interface Props {
21
22
  join: () => Promise<void>;
22
23
  /** Function to leave the community */
23
24
  leave: () => Promise<void>;
25
+ likes: ILikesFeedQueryFns;
24
26
  };
25
27
  /** Props to pass into the profile form */
26
28
  profile: IProfileFormProps;
@@ -0,0 +1,5 @@
1
+ import type { ICache, ICacheItem, ICacheItems } from './cache.interface';
2
+ export declare function addItem(item: ICacheItem, cache?: ICache, replace?: boolean): ICache;
3
+ export declare function findItem(itemId: string, cache?: ICache): import("../../..").IActivity | undefined;
4
+ export declare function removeItem(itemId: string, cache: ICache): ICache;
5
+ export declare function flattenCache(cache?: ICache): ICacheItems;
@@ -46,6 +46,55 @@ export declare const activitiesFeedMock: {
46
46
  latest_children: {};
47
47
  children_counts: {};
48
48
  }[];
49
+ like: ({
50
+ created_at: string;
51
+ updated_at: string;
52
+ id: string;
53
+ user_id: string;
54
+ user: {
55
+ id: string;
56
+ data: {
57
+ name: string;
58
+ thumbnail: string;
59
+ jobTitle: string;
60
+ organization: string;
61
+ };
62
+ created_at?: undefined;
63
+ updated_at?: undefined;
64
+ };
65
+ kind: string;
66
+ activity_id: string;
67
+ data: {
68
+ mentioned_users: null;
69
+ };
70
+ parent: string;
71
+ latest_children: {};
72
+ children_counts: {};
73
+ } | {
74
+ created_at: string;
75
+ updated_at: string;
76
+ id: string;
77
+ user_id: string;
78
+ user: {
79
+ created_at: string;
80
+ updated_at: string;
81
+ id: string;
82
+ data: {
83
+ jobTitle: string;
84
+ name: string;
85
+ organization: string;
86
+ thumbnail: string;
87
+ };
88
+ };
89
+ kind: string;
90
+ activity_id: string;
91
+ data: {
92
+ mentioned_users: null;
93
+ };
94
+ parent: string;
95
+ latest_children: {};
96
+ children_counts: {};
97
+ })[];
49
98
  };
50
99
  latest_reactions_extra: {};
51
100
  object: string;
@@ -81,6 +130,7 @@ export declare const activitiesFeedMock: {
81
130
  id: string;
82
131
  latest_reactions: {
83
132
  pin?: undefined;
133
+ like?: undefined;
84
134
  };
85
135
  latest_reactions_extra: {};
86
136
  object: string;
@@ -110,6 +160,29 @@ export declare const activitiesFeedMock: {
110
160
  foreign_id: string;
111
161
  id: string;
112
162
  latest_reactions: {
163
+ like: {
164
+ created_at: string;
165
+ updated_at: string;
166
+ id: string;
167
+ user_id: string;
168
+ user: {
169
+ id: string;
170
+ data: {
171
+ name: string;
172
+ thumbnail: string;
173
+ jobTitle: string;
174
+ organization: string;
175
+ };
176
+ };
177
+ kind: string;
178
+ activity_id: string;
179
+ data: {
180
+ mentioned_users: null;
181
+ };
182
+ parent: string;
183
+ latest_children: {};
184
+ children_counts: {};
185
+ }[];
113
186
  pin?: undefined;
114
187
  };
115
188
  latest_reactions_extra: {};
@@ -117,7 +190,7 @@ export declare const activitiesFeedMock: {
117
190
  origin: null;
118
191
  own_reactions: {};
119
192
  reaction_counts: {
120
- like?: undefined;
193
+ like: number;
121
194
  pin?: undefined;
122
195
  };
123
196
  target: string;
@@ -143,6 +216,7 @@ export declare const activitiesFeedMock: {
143
216
  id: string;
144
217
  latest_reactions: {
145
218
  pin?: undefined;
219
+ like?: undefined;
146
220
  };
147
221
  latest_reactions_extra: {};
148
222
  object: string;
@@ -1,2 +1,3 @@
1
1
  export * from './activities-feed';
2
2
  export * from './replies-feed';
3
+ export * from './likes-feed';
@@ -15,6 +15,6 @@ export declare function useLikesFeed({ queryFns: { list }, queryKey }: ILikesFee
15
15
  hasNextPage: boolean;
16
16
  fetchNextPage: (options?: import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").a2 | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").aj<import("../..").ICache, Error>>;
17
17
  refetch: (options?: import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").Z | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").ac<import("../..").ICache, Error>>;
18
- likes: import("../../../../../shared").IReaction[];
18
+ likes: import("../../../../..").IReaction[];
19
19
  };
20
20
  export {};
@@ -1,2 +1,3 @@
1
1
  export type { IQueryFns as ILikesFeedQueryFns } from './cache';
2
2
  export { default as LikesFeed } from './likes-feed';
3
+ export type { ILikesFeedProps } from './likes-feed';
@@ -1,20 +1,16 @@
1
- import { IQueryFns } from '../../../discussion/feeds/likes-feed/cache';
2
- import { type IBadgesOption } from '../../../user';
3
- interface Props {
4
- /** Whether to show badges and the scope of the badge */
5
- badges?: IBadgesOption;
1
+ import { IQueryFns } from './cache';
2
+ export interface ILikesFeedProps {
6
3
  /** The base path, used for slugs */
7
4
  basePath: string;
8
5
  /** The ID of the parent, used for slugs */
9
6
  parentId: string;
10
7
  /** The ID of the activity the replies are for */
11
8
  activityId: string;
12
- /** The initial number of likes */
13
- initialLikeCount: number;
9
+ /** The total number of likes */
10
+ likeCount: number;
14
11
  /** Functions for the replies query */
15
12
  functions: {
16
13
  likes: IQueryFns;
17
14
  };
18
15
  }
19
- export default function LikesFeed({ badges, basePath, parentId, activityId, initialLikeCount, functions, }: Props): import("react/jsx-runtime").JSX.Element;
20
- export {};
16
+ export default function LikesFeed({ basePath, parentId, activityId, likeCount, functions, }: ILikesFeedProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { ICache, ICacheItem, ICacheItems } from './cache.interface';
2
+ interface IAdditionOptions {
3
+ append?: boolean;
4
+ replace?: boolean;
5
+ }
6
+ export declare function addItem(item: ICacheItem, cache?: ICache, opts?: IAdditionOptions): {
7
+ pages: {
8
+ next: string;
9
+ results: import("../../..").IReaction[];
10
+ }[];
11
+ pageParams: string[];
12
+ };
13
+ export declare function findItem(itemId: string, cache?: ICache): import("../../..").IReaction | undefined;
14
+ export declare function removeItem(itemId: string, cache: ICache): ICache;
15
+ export declare function flattenCache(cache?: ICache): ICacheItems;
16
+ export {};
@@ -1,7 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import type { IMentionsFns } from '../../../../discussion/discussion.d';
3
3
  import type { IQueryFns } from './../cache';
4
- interface NestedRepliesFunctions extends IQueryFns, IMentionsFns {
4
+ import { ILikesFeedQueryFns } from '../../../../discussion/feeds/likes-feed';
5
+ interface NestedRepliesFunctions {
6
+ /** Functions for the replies query */
7
+ reactions: IQueryFns;
8
+ mentions: IMentionsFns;
9
+ /** Functions for the likes query */
10
+ likes: ILikesFeedQueryFns;
5
11
  }
6
12
  interface Props {
7
13
  /** The base path, used for slugs */
@@ -2,6 +2,19 @@
2
2
  import { type IProfileFormProps } from '../../../form';
3
3
  import type { IMentionsFns } from './../../discussion';
4
4
  import { type IQueryFns } from './cache';
5
+ import { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
6
+ interface RepliesFunctions {
7
+ /** Functions for the replies query */
8
+ reactions: IQueryFns;
9
+ /** Functions for the likes query */
10
+ likes: ILikesFeedQueryFns;
11
+ /** Query functions for the mentions */
12
+ mentions: IMentionsFns;
13
+ /** Function to join the community */
14
+ join: () => Promise<void>;
15
+ /** Function to leave the community */
16
+ leave: () => Promise<void>;
17
+ }
5
18
  interface Props {
6
19
  /** The base path, used for slugs */
7
20
  basePath: string;
@@ -14,16 +27,7 @@ interface Props {
14
27
  /** Whether the user is a member of the community */
15
28
  isMember: boolean;
16
29
  /** Functions for the replies query */
17
- functions: {
18
- /** Query functions for the replies */
19
- reactions: IQueryFns;
20
- /** Query functions for the mentions */
21
- mentions: IMentionsFns;
22
- /** Function to join the community */
23
- join: () => Promise<void>;
24
- /** Function to leave the community */
25
- leave: () => Promise<void>;
26
- };
30
+ functions: RepliesFunctions;
27
31
  /** Props to pass into the profile form */
28
32
  profile: IProfileFormProps;
29
33
  }
@@ -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 { IActivity, IFullDiscussionContent, IListMemberData, IMentionData, IMentions, IReaction, IUser, } from './shared/interfaces';
@@ -3,6 +3,7 @@ import { type IProfileFormProps } from '../../../form';
3
3
  import { type IRepliesFeedQueryFns } from '../../../discussion/feeds';
4
4
  import type { IMentionsFns } from './../../discussion.d';
5
5
  import { type IQueryFns } from './cache';
6
+ import type { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
6
7
  interface IActivitySectionQueryFns extends IQueryFns {
7
8
  remove: () => Promise<void>;
8
9
  }
@@ -15,6 +16,7 @@ export interface IActivitySectionProps {
15
16
  functions: {
16
17
  activities: IActivitySectionQueryFns;
17
18
  reactions: IRepliesFeedQueryFns;
19
+ likes: ILikesFeedQueryFns;
18
20
  mentions: IMentionsFns;
19
21
  join: () => Promise<void>;
20
22
  leave: () => Promise<void>;
@@ -5,7 +5,7 @@ export interface IReadActivityArgs {
5
5
  queryKey: QueryKey;
6
6
  }
7
7
  export declare function useReadActivity({ queryFn, queryKey }: IReadActivityArgs): {
8
- activity: import("../../../../../shared").IActivity | undefined;
8
+ activity: import("../../../../..").IActivity | undefined;
9
9
  error: Error | null;
10
10
  isLoading: boolean;
11
11
  isFetching: boolean;
@@ -1,7 +1,8 @@
1
1
  import type { FlatActivityEnriched } from 'getstream';
2
2
  export interface IActivity extends FlatActivityEnriched {
3
- title: string;
4
3
  content: string;
4
+ feed_id?: string;
5
+ title: string;
5
6
  total_replies?: number;
6
7
  total_likes?: number;
7
8
  }