@apolitical/component-library 5.2.1-jc.6 → 5.2.2

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 (56) 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/post.d.ts +9 -3
  14. package/discussion/components/post/post.mock.d.ts +64 -0
  15. package/discussion/discussion.helpers.d.ts +1 -1
  16. package/discussion/feeds/activities-feed/activities-feed.d.ts +2 -0
  17. package/discussion/feeds/activities-feed/cache/hooks/edit/edit.hook.d.ts +1 -1
  18. package/discussion/feeds/activities-feed/cache/hooks/like/like.hook.d.ts +1 -1
  19. package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +1 -1
  20. package/discussion/feeds/activities-feed/cache/hooks/remove/remove.hook.d.ts +1 -1
  21. package/discussion/feeds/activities-feed/cache/hooks/unlike/unlike.hook.d.ts +1 -1
  22. package/discussion/feeds/activities-feed/cache/index.d.ts +0 -1
  23. package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +75 -1
  24. package/discussion/feeds/index.d.ts +1 -0
  25. package/discussion/feeds/likes-feed/cache/cache.interface.d.ts +11 -0
  26. package/discussion/feeds/likes-feed/cache/hooks/feed/feed.hook.d.ts +20 -0
  27. package/discussion/feeds/likes-feed/cache/hooks/feed/index.d.ts +1 -0
  28. package/discussion/feeds/likes-feed/cache/hooks/index.d.ts +2 -0
  29. package/discussion/feeds/likes-feed/cache/hooks/list/index.d.ts +1 -0
  30. package/discussion/feeds/likes-feed/cache/hooks/list/list.hook.d.ts +16 -0
  31. package/discussion/feeds/likes-feed/cache/index.d.ts +2 -0
  32. package/discussion/feeds/likes-feed/index.d.ts +3 -0
  33. package/discussion/feeds/likes-feed/likes-feed.d.ts +16 -0
  34. package/discussion/feeds/replies-feed/cache/hooks/edit/edit.hook.d.ts +1 -1
  35. package/discussion/feeds/replies-feed/cache/hooks/like/like.hook.d.ts +1 -1
  36. package/discussion/feeds/replies-feed/cache/hooks/list/list.hook.d.ts +1 -1
  37. package/discussion/feeds/replies-feed/cache/hooks/remove/remove.hook.d.ts +1 -1
  38. package/discussion/feeds/replies-feed/cache/hooks/unlike/unlike.hook.d.ts +1 -1
  39. package/discussion/feeds/replies-feed/cache/index.d.ts +0 -1
  40. package/discussion/feeds/replies-feed/nested-replies-feed/nested-replies-feed.d.ts +7 -1
  41. package/discussion/feeds/replies-feed/replies-feed.d.ts +14 -10
  42. package/discussion/sections/activity-section/activity-section.d.ts +2 -0
  43. package/discussion/shared/helpers/cache.helper.d.ts +25 -0
  44. package/discussion/shared/helpers/index.d.ts +1 -0
  45. package/general/link/link.d.ts +2 -2
  46. package/general/responsive-image/responsive-image.helpers.d.ts +10 -1
  47. package/helpers/intl.d.ts +1 -1
  48. package/index.js +61 -61
  49. package/index.mjs +8699 -8564
  50. package/package.json +1 -1
  51. package/style.css +1 -1
  52. package/styles/variables/colors/theme/_general.scss +1 -0
  53. package/text/helper-text-box/helper-text-box.d.ts +2 -2
  54. package/text/helper-text-box/index.d.ts +1 -0
  55. package/user/index.d.ts +2 -0
  56. package/user/member/member.helpers.d.ts +1 -1
@@ -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,6 +1,6 @@
1
1
  import React from 'react';
2
- import { type ListMembers, ClickMentionFallback } from '../../../form';
3
- import { DiscussionCreateContentFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction } from '../../discussion';
2
+ import { ClickMentionFallback, type ListMembers } from '../../../form';
3
+ import { DiscussionCreateContentFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, DiscussionListLikesFunction } from '../../discussion';
4
4
  import type { IForceHide, IFullDiscussionContent } from '../../shared/interfaces';
5
5
  import { IBadgesOption } from '../../../user/badges';
6
6
  export interface IPostContent extends IFullDiscussionContent {
@@ -39,6 +39,8 @@ export interface IDiscussionPostProps {
39
39
  createLike: DiscussionCreateLikeFunction;
40
40
  /** Delete a like on the post */
41
41
  deleteLike: DiscussionDeleteLikeFunction;
42
+ /** List the likes on the post */
43
+ listLikes: DiscussionListLikesFunction;
42
44
  };
43
45
  comments: {
44
46
  /** Open comments on a post */
@@ -85,6 +87,10 @@ export interface IDiscussionPostProps {
85
87
  isCommunity?: boolean;
86
88
  /** Whether to show badges and the scope of the badge */
87
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;
88
94
  }
89
- 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;
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;
90
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;
@@ -15,5 +15,5 @@ export declare const getAuthorData: (author: IUser) => "deleted" | {
15
15
  image: {
16
16
  thumbnail: string | undefined;
17
17
  };
18
- badges: import("../user/badge").IBadgesObject | undefined;
18
+ badges: import("..").IBadgesObject | undefined;
19
19
  };
@@ -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;
@@ -4,5 +4,5 @@ interface IEditVars {
4
4
  activityId: string;
5
5
  content: string;
6
6
  }
7
- export declare function useEditActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationContext<ICacheItem, Error, IEditVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IActivity, Error, IEditVars, ICache>;
7
+ export declare function useEditActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, }: IMutationContext<ICacheItem, Error, IEditVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IActivity, Error, IEditVars, ICache>;
8
8
  export {};
@@ -4,5 +4,5 @@ interface ILikeVars {
4
4
  activityId: string;
5
5
  reactionId?: string;
6
6
  }
7
- export declare function useLikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, queryClient, queryKey, }: IMutationContext<ICacheSubitem, Error, ILikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ILikeVars, ICache>;
7
+ export declare function useLikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, queryClient, queryKey, }: IMutationContext<ICacheSubitem, Error, ILikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ILikeVars, ICache>;
8
8
  export {};
@@ -6,7 +6,7 @@ export interface IListActivitiesArgs {
6
6
  rankingMethod?: string;
7
7
  }
8
8
  export declare function useListActivities({ queryFn, queryKey, rankingMethod, }: IListActivitiesArgs): {
9
- activities: import("../..").ICacheItems;
9
+ activities: import('../../../../../../discussion/shared').IActivity[];
10
10
  error: Error | null;
11
11
  isLoading: boolean;
12
12
  hasNextPage: boolean;
@@ -3,5 +3,5 @@ import type { ICache } from '../..';
3
3
  interface IRemoveVars {
4
4
  activityId: string;
5
5
  }
6
- export declare function useRemoveActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationContext<void, Error, IRemoveVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<void, Error, IRemoveVars, ICache>;
6
+ export declare function useRemoveActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, }: IMutationContext<void, Error, IRemoveVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<void, Error, IRemoveVars, ICache>;
7
7
  export {};
@@ -4,5 +4,5 @@ interface IUnlikeVars {
4
4
  activityId: string;
5
5
  reactionId?: string;
6
6
  }
7
- export declare function useUnlikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, user, }: IMutationContext<unknown, Error, IUnlikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<unknown, Error, IUnlikeVars, ICache>;
7
+ export declare function useUnlikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, user, }: IMutationContext<unknown, Error, IUnlikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<unknown, Error, IUnlikeVars, ICache>;
8
8
  export {};
@@ -1,3 +1,2 @@
1
1
  export * from './hooks';
2
- export * from './cache.helper';
3
2
  export * from './cache.interface';
@@ -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';
@@ -0,0 +1,11 @@
1
+ import { InfiniteData } from '@tanstack/query-core';
2
+ import type { ReactionFilterAPIResponse } from 'getstream';
3
+ import type { IReaction } from '../../../../discussion/shared';
4
+ export type ICache = InfiniteData<ICachePage, string>;
5
+ export type ICachePage = ExtendedReactionFilterAPIResponse;
6
+ export type ICacheItems = ICacheItem[];
7
+ type ICacheItem = IReaction;
8
+ interface ExtendedReactionFilterAPIResponse extends ReactionFilterAPIResponse {
9
+ results: IReaction[];
10
+ }
11
+ export {};
@@ -0,0 +1,20 @@
1
+ import { QueryKey } from '@tanstack/react-query';
2
+ import { UR } from 'getstream';
3
+ import type { ICachePage } from '../..';
4
+ export interface IQueryFns {
5
+ list: (_: UR) => Promise<ICachePage>;
6
+ }
7
+ interface ILikesFeedArgs {
8
+ queryFns: IQueryFns;
9
+ queryKey: QueryKey;
10
+ }
11
+ export declare function useLikesFeed({ queryFns: { list }, queryKey }: ILikesFeedArgs): {
12
+ likesCount: string;
13
+ error: Error | null;
14
+ isLoading: boolean;
15
+ hasNextPage: boolean;
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
+ 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("../../../../..").IReaction[];
19
+ };
20
+ export {};
@@ -0,0 +1 @@
1
+ export * from './feed.hook';
@@ -0,0 +1,2 @@
1
+ export * from './list';
2
+ export * from './feed';
@@ -0,0 +1 @@
1
+ export * from './list.hook';
@@ -0,0 +1,16 @@
1
+ import { QueryKey } from '@tanstack/react-query';
2
+ import { UR } from 'getstream';
3
+ import type { ICache, ICachePage } from '../..';
4
+ export interface IListLikesArgs {
5
+ queryFn: (_: UR) => Promise<ICachePage>;
6
+ queryKey: QueryKey;
7
+ }
8
+ export declare function useListLikes({ queryFn, queryKey }: IListLikesArgs): {
9
+ likes: import('../../../../../../discussion/shared').IReaction[];
10
+ likesCount: string;
11
+ error: Error | null;
12
+ isLoading: boolean;
13
+ hasNextPage: boolean;
14
+ fetchNextPage: (options?: import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").a2 | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").aj<ICache, Error>>;
15
+ refetch: (options?: import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").Z | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").ac<ICache, Error>>;
16
+ };
@@ -0,0 +1,2 @@
1
+ export * from './hooks';
2
+ export * from './cache.interface';
@@ -0,0 +1,3 @@
1
+ export type { IQueryFns as ILikesFeedQueryFns } from './cache';
2
+ export { default as LikesFeed } from './likes-feed';
3
+ export type { ILikesFeedProps } from './likes-feed';
@@ -0,0 +1,16 @@
1
+ import { IQueryFns } from './cache';
2
+ export interface ILikesFeedProps {
3
+ /** The base path, used for slugs */
4
+ basePath: string;
5
+ /** The ID of the parent, used for slugs */
6
+ parentId: string;
7
+ /** The ID of the activity the replies are for */
8
+ activityId: string;
9
+ /** The total number of likes */
10
+ likeCount: number;
11
+ /** Functions for the replies query */
12
+ functions: {
13
+ likes: IQueryFns;
14
+ };
15
+ }
16
+ export default function LikesFeed({ basePath, parentId, activityId, likeCount, functions, }: ILikesFeedProps): import("react/jsx-runtime").JSX.Element;
@@ -4,5 +4,5 @@ interface IEditVars {
4
4
  replyId: string;
5
5
  content: string;
6
6
  }
7
- export declare function useEditReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationContext<ICacheItem, Error, IEditVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, IEditVars, ICache>;
7
+ export declare function useEditReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, }: IMutationContext<ICacheItem, Error, IEditVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, IEditVars, ICache>;
8
8
  export {};
@@ -4,5 +4,5 @@ interface ILikeVars {
4
4
  replyId: string;
5
5
  reactionId?: string;
6
6
  }
7
- export declare function useLikeReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, queryClient, queryKey, }: IMutationContext<ICacheSubitem, Error, ILikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ILikeVars, ICache>;
7
+ export declare function useLikeReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, queryClient, queryKey, }: IMutationContext<ICacheSubitem, Error, ILikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ILikeVars, ICache>;
8
8
  export {};
@@ -5,7 +5,7 @@ export interface IListRepliesArgs {
5
5
  queryKey: QueryKey;
6
6
  }
7
7
  export declare function useListReplies({ queryFn, queryKey }: IListRepliesArgs): {
8
- replies: import("../..").ICacheItems;
8
+ replies: import('../../../../../../discussion/shared').IReaction[];
9
9
  error: Error | null;
10
10
  isLoading: boolean;
11
11
  hasNextPage: boolean;
@@ -3,5 +3,5 @@ import type { ICache } from '../..';
3
3
  interface IRemoveVars {
4
4
  replyId: string;
5
5
  }
6
- export declare function useRemoveReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationContext<void, Error, IRemoveVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<void, Error, IRemoveVars, ICache>;
6
+ export declare function useRemoveReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, }: IMutationContext<void, Error, IRemoveVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<void, Error, IRemoveVars, ICache>;
7
7
  export {};
@@ -4,5 +4,5 @@ interface IUnlikeVars {
4
4
  replyId: string;
5
5
  reactionId?: string;
6
6
  }
7
- export declare function useUnlikeReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, user, }: IMutationContext<unknown, Error, IUnlikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<unknown, Error, IUnlikeVars, ICache>;
7
+ export declare function useUnlikeReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, user, }: IMutationContext<unknown, Error, IUnlikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<unknown, Error, IUnlikeVars, ICache>;
8
8
  export {};
@@ -1,3 +1,2 @@
1
1
  export * from './hooks';
2
- export * from './cache.helper';
3
2
  export * from './cache.interface';
@@ -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 */