@apolitical/component-library 5.2.0-jc.1 → 5.2.1-jc.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.
- package/discussion/components/likes/index.d.ts +0 -1
- package/discussion/components/likes/likes.d.ts +2 -11
- package/discussion/components/post/post.d.ts +3 -9
- package/discussion/components/post/post.mock.d.ts +0 -52
- package/discussion/discussion.helpers.d.ts +1 -1
- package/discussion/feeds/activities-feed/activities-feed.d.ts +0 -2
- package/discussion/feeds/activities-feed/cache/cache.helper.d.ts +5 -0
- package/discussion/feeds/activities-feed/cache/hooks/edit/edit.hook.d.ts +1 -1
- package/discussion/feeds/activities-feed/cache/hooks/like/like.hook.d.ts +1 -1
- package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +1 -1
- package/discussion/feeds/activities-feed/cache/hooks/remove/remove.hook.d.ts +1 -1
- package/discussion/feeds/activities-feed/cache/hooks/unlike/unlike.hook.d.ts +1 -1
- package/discussion/feeds/activities-feed/cache/index.d.ts +1 -0
- package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +1 -75
- package/discussion/feeds/replies-feed/cache/cache.helper.d.ts +16 -0
- package/discussion/feeds/replies-feed/cache/hooks/edit/edit.hook.d.ts +1 -1
- package/discussion/feeds/replies-feed/cache/hooks/like/like.hook.d.ts +1 -1
- package/discussion/feeds/replies-feed/cache/hooks/list/list.hook.d.ts +1 -1
- package/discussion/feeds/replies-feed/cache/hooks/remove/remove.hook.d.ts +1 -1
- package/discussion/feeds/replies-feed/cache/hooks/unlike/unlike.hook.d.ts +1 -1
- package/discussion/feeds/replies-feed/cache/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/nested-replies-feed/nested-replies-feed.d.ts +1 -7
- package/discussion/feeds/replies-feed/replies-feed.d.ts +10 -14
- package/discussion/sections/activity-section/activity-section.d.ts +0 -2
- package/discussion/shared/helpers/index.d.ts +0 -1
- package/form/components/rich-text-editor/helpers/transform/transform.d.ts +1 -1
- package/general/buttons/button/button.d.ts +1 -0
- package/general/link/link.d.ts +2 -2
- package/helpers/intl.d.ts +1 -1
- package/index.js +48 -48
- package/index.mjs +8281 -8381
- package/package.json +1 -1
- package/sections/full-width-section/full-width-section.d.ts +2 -0
- package/style.css +1 -1
- package/styles/variables/colors/_colors.scss +2 -0
- package/styles/variables/colors/theme/_base.scss +1 -1
- package/styles/variables/colors/theme/_general.scss +0 -1
- package/styles/variables/colors/theme/_layout.scss +1 -1
- package/user/index.d.ts +0 -2
- package/user/member/member.helpers.d.ts +1 -1
- package/discussion/components/likes/likes-modal.d.ts +0 -28
- package/discussion/components/likes/likes.mock.d.ts +0 -2
- package/discussion/components/likes/mocks/likes-response.mock.d.ts +0 -52
- package/discussion/feeds/likes-feed/cache/cache.interface.d.ts +0 -11
- package/discussion/feeds/likes-feed/cache/hooks/feed/feed.hook.d.ts +0 -20
- package/discussion/feeds/likes-feed/cache/hooks/feed/index.d.ts +0 -1
- package/discussion/feeds/likes-feed/cache/hooks/index.d.ts +0 -2
- package/discussion/feeds/likes-feed/cache/hooks/list/index.d.ts +0 -1
- package/discussion/feeds/likes-feed/cache/hooks/list/list.hook.d.ts +0 -16
- package/discussion/feeds/likes-feed/cache/index.d.ts +0 -2
- package/discussion/feeds/likes-feed/index.d.ts +0 -2
- package/discussion/feeds/likes-feed/likes-feed.d.ts +0 -20
- package/discussion/shared/helpers/cache.helper.d.ts +0 -25
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemberProps } from '../../../user';
|
|
3
3
|
import { IDiscussionContent } from './../../discussion';
|
|
4
|
-
import { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
|
|
5
4
|
interface Props {
|
|
6
5
|
/** The element to render around the content */
|
|
7
6
|
element?: 'li' | 'div';
|
|
@@ -17,25 +16,17 @@ interface Props {
|
|
|
17
16
|
content?: IDiscussionContent;
|
|
18
17
|
/** If the user is able to like the content */
|
|
19
18
|
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
19
|
/** Functions to handle liking and unliking */
|
|
27
|
-
functions
|
|
20
|
+
functions?: {
|
|
28
21
|
/** Function to create a like */
|
|
29
22
|
createLike?: (args1: object) => void;
|
|
30
23
|
/** Function to delete a like */
|
|
31
24
|
deleteLike?: (args: object) => void;
|
|
32
|
-
/** Functions for the likes query */
|
|
33
|
-
listLikes?: ILikesFeedQueryFns['list'];
|
|
34
25
|
};
|
|
35
26
|
/** The language to use for the text */
|
|
36
27
|
locale?: string;
|
|
37
28
|
}
|
|
38
|
-
declare const Likes: ({ element, likes, peopleWhoLiked, isShort, userLiked, content, canLike,
|
|
29
|
+
declare const Likes: ({ element, likes, peopleWhoLiked, isShort, userLiked, content, canLike, functions: { createLike, deleteLike }, }: Props) => React.DetailedReactHTMLElement<{
|
|
39
30
|
className: string;
|
|
40
31
|
onKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;
|
|
41
32
|
onMouseEnter: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { DiscussionCreateContentFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction,
|
|
2
|
+
import { type ListMembers, ClickMentionFallback } from '../../../form';
|
|
3
|
+
import { DiscussionCreateContentFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, IForceHide, IFullDiscussionContent } from '../../discussion';
|
|
4
4
|
import { IBadgesOption } from '../../../user/badges';
|
|
5
5
|
interface PostContent extends IFullDiscussionContent {
|
|
6
6
|
/** The post body */
|
|
@@ -36,8 +36,6 @@ interface Props {
|
|
|
36
36
|
createLike: DiscussionCreateLikeFunction;
|
|
37
37
|
/** Delete a like on the post */
|
|
38
38
|
deleteLike: DiscussionDeleteLikeFunction;
|
|
39
|
-
/** List the likes on the post */
|
|
40
|
-
listLikes: DiscussionListLikesFunction;
|
|
41
39
|
};
|
|
42
40
|
comments: {
|
|
43
41
|
/** Open comments on a post */
|
|
@@ -82,10 +80,6 @@ interface Props {
|
|
|
82
80
|
isCommunity?: boolean;
|
|
83
81
|
/** Whether to show badges and the scope of the badge */
|
|
84
82
|
badges?: IBadgesOption;
|
|
85
|
-
/** The base path, used for slugs */
|
|
86
|
-
basePath: string;
|
|
87
|
-
/** The ID of the parent, used for slugs */
|
|
88
|
-
parentId: string;
|
|
89
83
|
}
|
|
90
|
-
declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, styling: { showShareLinkButton }, setFocus, isCommunity, badges,
|
|
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;
|
|
91
85
|
export default Post;
|
|
@@ -9,58 +9,6 @@ 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
|
-
};
|
|
26
|
-
created_at?: undefined;
|
|
27
|
-
updated_at?: undefined;
|
|
28
|
-
};
|
|
29
|
-
kind: string;
|
|
30
|
-
activity_id: string;
|
|
31
|
-
data: {
|
|
32
|
-
mentioned_users: null;
|
|
33
|
-
};
|
|
34
|
-
parent: string;
|
|
35
|
-
latest_children: {};
|
|
36
|
-
children_counts: {};
|
|
37
|
-
} | {
|
|
38
|
-
created_at: string;
|
|
39
|
-
updated_at: string;
|
|
40
|
-
id: string;
|
|
41
|
-
user_id: string;
|
|
42
|
-
user: {
|
|
43
|
-
created_at: string;
|
|
44
|
-
updated_at: string;
|
|
45
|
-
id: string;
|
|
46
|
-
data: {
|
|
47
|
-
jobTitle: string;
|
|
48
|
-
name: string;
|
|
49
|
-
organization: string;
|
|
50
|
-
thumbnail: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
kind: string;
|
|
54
|
-
activity_id: string;
|
|
55
|
-
data: {
|
|
56
|
-
mentioned_users: null;
|
|
57
|
-
};
|
|
58
|
-
parent: string;
|
|
59
|
-
latest_children: {};
|
|
60
|
-
children_counts: {};
|
|
61
|
-
})[];
|
|
62
|
-
next: string;
|
|
63
|
-
}>;
|
|
64
12
|
}
|
|
65
13
|
namespace comments {
|
|
66
14
|
function openComments(): void;
|
|
@@ -2,7 +2,6 @@
|
|
|
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 { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
|
|
6
5
|
interface Props {
|
|
7
6
|
/** The base path, used for slugs */
|
|
8
7
|
basePath: string;
|
|
@@ -22,7 +21,6 @@ interface Props {
|
|
|
22
21
|
join: () => Promise<void>;
|
|
23
22
|
/** Function to leave the community */
|
|
24
23
|
leave: () => Promise<void>;
|
|
25
|
-
likes: ILikesFeedQueryFns;
|
|
26
24
|
};
|
|
27
25
|
/** Props to pass into the profile form */
|
|
28
26
|
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("../../../shared").IActivity | undefined;
|
|
4
|
+
export declare function removeItem(itemId: string, cache: ICache): ICache;
|
|
5
|
+
export declare function flattenCache(cache?: ICache): ICacheItems;
|
|
@@ -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(
|
|
9
|
+
activities: import("../..").ICacheItems;
|
|
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 {};
|
|
@@ -46,55 +46,6 @@ 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
|
-
})[];
|
|
98
49
|
};
|
|
99
50
|
latest_reactions_extra: {};
|
|
100
51
|
object: string;
|
|
@@ -130,7 +81,6 @@ export declare const activitiesFeedMock: {
|
|
|
130
81
|
id: string;
|
|
131
82
|
latest_reactions: {
|
|
132
83
|
pin?: undefined;
|
|
133
|
-
like?: undefined;
|
|
134
84
|
};
|
|
135
85
|
latest_reactions_extra: {};
|
|
136
86
|
object: string;
|
|
@@ -160,29 +110,6 @@ export declare const activitiesFeedMock: {
|
|
|
160
110
|
foreign_id: string;
|
|
161
111
|
id: string;
|
|
162
112
|
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
|
-
}[];
|
|
186
113
|
pin?: undefined;
|
|
187
114
|
};
|
|
188
115
|
latest_reactions_extra: {};
|
|
@@ -190,7 +117,7 @@ export declare const activitiesFeedMock: {
|
|
|
190
117
|
origin: null;
|
|
191
118
|
own_reactions: {};
|
|
192
119
|
reaction_counts: {
|
|
193
|
-
like
|
|
120
|
+
like?: undefined;
|
|
194
121
|
pin?: undefined;
|
|
195
122
|
};
|
|
196
123
|
target: string;
|
|
@@ -216,7 +143,6 @@ export declare const activitiesFeedMock: {
|
|
|
216
143
|
id: string;
|
|
217
144
|
latest_reactions: {
|
|
218
145
|
pin?: undefined;
|
|
219
|
-
like?: undefined;
|
|
220
146
|
};
|
|
221
147
|
latest_reactions_extra: {};
|
|
222
148
|
object: string;
|
|
@@ -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("../../../shared").IReaction[];
|
|
10
|
+
}[];
|
|
11
|
+
pageParams: string[];
|
|
12
|
+
};
|
|
13
|
+
export declare function findItem(itemId: string, cache?: ICache): import("../../../shared").IReaction | undefined;
|
|
14
|
+
export declare function removeItem(itemId: string, cache: ICache): ICache;
|
|
15
|
+
export declare function flattenCache(cache?: ICache): ICacheItems;
|
|
16
|
+
export {};
|
|
@@ -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(
|
|
8
|
+
replies: import("../..").ICacheItems;
|
|
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,13 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { IMentionsFns } from '../../../../discussion/discussion.d';
|
|
3
3
|
import type { IQueryFns } from './../cache';
|
|
4
|
-
|
|
5
|
-
interface NestedRepliesFunctions {
|
|
6
|
-
/** Functions for the replies query */
|
|
7
|
-
reactions: IQueryFns;
|
|
8
|
-
mentions: IMentionsFns;
|
|
9
|
-
/** Functions for the likes query */
|
|
10
|
-
likes: ILikesFeedQueryFns;
|
|
4
|
+
interface NestedRepliesFunctions extends IQueryFns, IMentionsFns {
|
|
11
5
|
}
|
|
12
6
|
interface Props {
|
|
13
7
|
/** The base path, used for slugs */
|
|
@@ -2,19 +2,6 @@
|
|
|
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
|
-
}
|
|
18
5
|
interface Props {
|
|
19
6
|
/** The base path, used for slugs */
|
|
20
7
|
basePath: string;
|
|
@@ -27,7 +14,16 @@ interface Props {
|
|
|
27
14
|
/** Whether the user is a member of the community */
|
|
28
15
|
isMember: boolean;
|
|
29
16
|
/** Functions for the replies query */
|
|
30
|
-
functions:
|
|
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
|
+
};
|
|
31
27
|
/** Props to pass into the profile form */
|
|
32
28
|
profile: IProfileFormProps;
|
|
33
29
|
}
|
|
@@ -3,7 +3,6 @@ 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 { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
|
|
7
6
|
interface IActivitySectionQueryFns extends IQueryFns {
|
|
8
7
|
remove: () => Promise<void>;
|
|
9
8
|
}
|
|
@@ -16,7 +15,6 @@ export interface IActivitySectionProps {
|
|
|
16
15
|
functions: {
|
|
17
16
|
activities: IActivitySectionQueryFns;
|
|
18
17
|
reactions: IRepliesFeedQueryFns;
|
|
19
|
-
likes: ILikesFeedQueryFns;
|
|
20
18
|
mentions: IMentionsFns;
|
|
21
19
|
join: () => Promise<void>;
|
|
22
20
|
leave: () => Promise<void>;
|
|
@@ -12,8 +12,8 @@ export default function transform<T extends InputNodeTypes>(node: MdastNode, opt
|
|
|
12
12
|
position?: any;
|
|
13
13
|
ordered?: boolean | undefined;
|
|
14
14
|
checked?: any;
|
|
15
|
-
lang?: string | undefined;
|
|
16
15
|
depth?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
16
|
+
lang?: string | undefined;
|
|
17
17
|
spread?: any;
|
|
18
18
|
indent?: any;
|
|
19
19
|
text: string | undefined;
|
package/general/link/link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
3
|
/** URL for link */
|
|
4
4
|
href?: string | undefined;
|
|
5
5
|
/** Content to rendered */
|
|
@@ -33,5 +33,5 @@ export interface ILinkProps {
|
|
|
33
33
|
/** Data attributes for the link */
|
|
34
34
|
'data-before'?: string;
|
|
35
35
|
}
|
|
36
|
-
declare const Link: ({ href, children, fallbackElement, className, onClick, gtmContext, gtmType, ...props }:
|
|
36
|
+
declare const Link: ({ href, children, fallbackElement, className, onClick, gtmContext, gtmType, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
export default Link;
|
package/helpers/intl.d.ts
CHANGED
|
@@ -154,7 +154,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
154
154
|
discussion_form_explainer_question: string;
|
|
155
155
|
discussion_likes: string;
|
|
156
156
|
discussion_likes_short: string;
|
|
157
|
-
|
|
157
|
+
discussion_likes_more: string;
|
|
158
158
|
discussion_likes_like: string;
|
|
159
159
|
discussion_likes_unlike: string;
|
|
160
160
|
discussion_likes_show: string;
|