@apolitical/component-library 1.8.0-beta.0 → 1.8.0-beta.3

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 (52) hide show
  1. package/context/index.d.ts +0 -1
  2. package/context/user/user.context.d.ts +0 -2
  3. package/discussion/{components/form → form}/form.d.ts +4 -2
  4. package/discussion/index.d.ts +6 -3
  5. package/discussion/{components/likes → likes}/likes.d.ts +3 -3
  6. package/discussion/{components/likes → likes}/likes.helpers.d.ts +1 -1
  7. package/discussion/{components/post → post}/post.d.ts +4 -2
  8. package/general/buttons/button/button.d.ts +1 -1
  9. package/index.js +101 -1
  10. package/index.mjs +19595 -77
  11. package/navigation/breadcrumbs/breadcrumbs.d.ts +3 -1
  12. package/package.json +2 -4
  13. package/style.css +1 -1
  14. package/styles/base/_links.scss +1 -1
  15. package/text/markdown-text/components/index.d.ts +1 -0
  16. package/text/markdown-text/components/span/index.d.ts +1 -0
  17. package/text/markdown-text/components/span/span.d.ts +5 -0
  18. package/text/markdown-text/index.d.ts +1 -0
  19. package/4TNE5QTO-808bed4c.js +0 -987
  20. package/4TNE5QTO-ebb3b7dd.mjs +0 -9077
  21. package/context/react-query/index.d.ts +0 -1
  22. package/context/react-query/react-query.provider.d.ts +0 -7
  23. package/discussion/components/add-post/add-post.d.ts +0 -16
  24. package/discussion/components/add-post/index.d.ts +0 -1
  25. package/discussion/components/index.d.ts +0 -7
  26. package/discussion/feeds/activities-feed/activities-feed.d.ts +0 -24
  27. package/discussion/feeds/activities-feed/activities-feed.handlers.d.ts +0 -28
  28. package/discussion/feeds/activities-feed/activities-feed.helpers.d.ts +0 -23
  29. package/discussion/feeds/activities-feed/activities-feed.mock.d.ts +0 -318
  30. package/discussion/feeds/activities-feed/index.d.ts +0 -1
  31. package/discussion/feeds/index.d.ts +0 -2
  32. package/discussion/feeds/replies-feed/index.d.ts +0 -1
  33. package/discussion/feeds/replies-feed/replies-feed.d.ts +0 -24
  34. package/discussion/feeds/replies-feed/replies-feed.handlers.d.ts +0 -81
  35. package/discussion/feeds/replies-feed/replies-feed.mock.d.ts +0 -2
  36. package/discussion/sections/activity-section/activity-section.d.ts +0 -32
  37. package/discussion/sections/activity-section/activity-section.handlers.d.ts +0 -58
  38. package/discussion/sections/activity-section/activity.mock.d.ts +0 -2
  39. package/discussion/sections/activity-section/index.d.ts +0 -1
  40. package/discussion/sections/index.d.ts +0 -1
  41. package/index-83c4dbce.js +0 -101
  42. package/index-d78dd523.mjs +0 -23254
  43. /package/discussion/{components/conversation → conversation}/conversation.d.ts +0 -0
  44. /package/discussion/{components/conversation → conversation}/index.d.ts +0 -0
  45. /package/discussion/{components/form → form}/index.d.ts +0 -0
  46. /package/discussion/{components/likes → likes}/index.d.ts +0 -0
  47. /package/discussion/{components/post → post}/index.d.ts +0 -0
  48. /package/discussion/{components/post → post}/post.mock.d.ts +0 -0
  49. /package/discussion/{components/responses-heading → responses-heading}/index.d.ts +0 -0
  50. /package/discussion/{components/responses-heading → responses-heading}/responses-heading.d.ts +0 -0
  51. /package/discussion/{components/thread → thread}/index.d.ts +0 -0
  52. /package/discussion/{components/thread → thread}/thread.d.ts +0 -0
@@ -1 +0,0 @@
1
- export * from './react-query.provider';
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- showDevTools: boolean;
4
- children: React.ReactNode;
5
- }
6
- export declare const ReactQueryProvider: React.FC<Props>;
7
- export {};
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import { UseMutateFunction } from '@tanstack/react-query';
3
- import { IDiscussionContentType } from '../../discussion';
4
- interface Props {
5
- membershipRequiredToPost: {
6
- required: boolean;
7
- isMember?: boolean;
8
- join?: () => Promise<void>;
9
- leave?: () => Promise<void>;
10
- notMemberStateText?: string;
11
- };
12
- contentType: IDiscussionContentType;
13
- createPost: UseMutateFunction<any, any, any, any>;
14
- }
15
- declare const AddPost: React.FC<Props>;
16
- export default AddPost;
@@ -1 +0,0 @@
1
- export { default as AddPost } from './add-post';
@@ -1,7 +0,0 @@
1
- export * from './add-post';
2
- export * from './conversation';
3
- export * from './form';
4
- export * from './likes';
5
- export * from './post';
6
- export * from './responses-heading';
7
- export * from './thread';
@@ -1,24 +0,0 @@
1
- /// <reference types="react" />
2
- import { InvalidateQueryFilters, QueryFunction } from '@tanstack/react-query';
3
- interface Props {
4
- basePath: string;
5
- parentId: string;
6
- membershipRequiredToPost: {
7
- isMember: boolean;
8
- join: () => Promise<void>;
9
- leave: () => Promise<void>;
10
- };
11
- functions: {
12
- list: QueryFunction<unknown, InvalidateQueryFilters[], never>;
13
- create: () => Promise<void>;
14
- like: ({ activityId }: {
15
- activityId: string;
16
- }) => Promise<void>;
17
- unlike: ({ activityId, reactionId, }: {
18
- activityId: string;
19
- reactionId: string;
20
- }) => Promise<void>;
21
- };
22
- }
23
- declare const ActivitiesFeed: React.FC<Props>;
24
- export default ActivitiesFeed;
@@ -1,28 +0,0 @@
1
- import { QueryClient, QueryKey } from '@tanstack/query-core';
2
- import { IUserContext } from '../../..';
3
- export interface buildAddActivityHandlersProps {
4
- queryClient: QueryClient;
5
- queryKey: QueryKey;
6
- user: IUserContext | null;
7
- mutationFn: () => Promise<void>;
8
- }
9
- export declare const buildAddActivityHandlers: ({ queryClient, queryKey, user, mutationFn, }: buildAddActivityHandlersProps) => object;
10
- interface buildLikeActivityHandlersProps {
11
- queryClient: QueryClient;
12
- queryKey: QueryKey;
13
- mutationFn: ({ activityId }: {
14
- activityId: string;
15
- }) => Promise<void>;
16
- }
17
- export declare const buildLikeActivityHandlers: ({ queryClient, queryKey, mutationFn, }: buildLikeActivityHandlersProps) => object;
18
- interface buildUnlikeActivityHandlersProps {
19
- queryClient: QueryClient;
20
- queryKey: QueryKey;
21
- user: IUserContext | null;
22
- mutationFn: ({ activityId, reactionId, }: {
23
- activityId: string;
24
- reactionId: string;
25
- }) => Promise<void>;
26
- }
27
- export declare const buildUnlikeActivityHandlers: ({ queryClient, queryKey, user, mutationFn, }: buildUnlikeActivityHandlersProps) => object;
28
- export {};
@@ -1,23 +0,0 @@
1
- import { IUserDetails } from '../../../context';
2
- export declare const createActivityObject: ({ user, content, verb, }: {
3
- user: IUserDetails;
4
- content: string;
5
- verb: string;
6
- }) => {
7
- actor: {
8
- id: string | undefined;
9
- data: {
10
- name: string | undefined;
11
- organization: string | undefined;
12
- jobTitle: string | undefined;
13
- };
14
- };
15
- content: string;
16
- latest_reactions: {
17
- like: never[];
18
- };
19
- reaction_counts: {
20
- like: number;
21
- };
22
- verb: string;
23
- };
@@ -1,318 +0,0 @@
1
- export declare const activitiesFeedMock: ({
2
- actor: {
3
- created_at: string;
4
- updated_at: string;
5
- id: string;
6
- data: {
7
- jobTitle: string;
8
- name: string;
9
- organization: string;
10
- thumbnail: null;
11
- };
12
- };
13
- content: string;
14
- feed_id: string;
15
- foreign_id: string;
16
- id: string;
17
- latest_reactions: {
18
- like: {
19
- created_at: string;
20
- updated_at: string;
21
- id: string;
22
- user_id: string;
23
- user: {
24
- created_at: string;
25
- updated_at: string;
26
- id: string;
27
- data: {
28
- name: string;
29
- };
30
- };
31
- kind: string;
32
- activity_id: string;
33
- data: {};
34
- parent: string;
35
- latest_children: {};
36
- children_counts: {};
37
- }[];
38
- reply: {
39
- created_at: string;
40
- updated_at: string;
41
- id: string;
42
- user_id: string;
43
- user: {
44
- created_at: string;
45
- updated_at: string;
46
- id: string;
47
- data: {
48
- name: string;
49
- };
50
- };
51
- kind: string;
52
- activity_id: string;
53
- data: {
54
- content: {
55
- text: string;
56
- };
57
- };
58
- parent: string;
59
- latest_children: {};
60
- children_counts: {};
61
- }[];
62
- };
63
- latest_reactions_extra: {
64
- like: {
65
- next: string;
66
- };
67
- reply: {
68
- next: string;
69
- };
70
- };
71
- object: string;
72
- origin: null;
73
- own_reactions: {
74
- like: {
75
- created_at: string;
76
- updated_at: string;
77
- id: string;
78
- user_id: string;
79
- user: {
80
- created_at: string;
81
- updated_at: string;
82
- id: string;
83
- data: {
84
- name: string;
85
- };
86
- };
87
- kind: string;
88
- activity_id: string;
89
- data: {};
90
- parent: string;
91
- latest_children: {};
92
- children_counts: {};
93
- }[];
94
- reply: {
95
- created_at: string;
96
- updated_at: string;
97
- id: string;
98
- user_id: string;
99
- user: {
100
- created_at: string;
101
- updated_at: string;
102
- id: string;
103
- data: {
104
- name: string;
105
- };
106
- };
107
- kind: string;
108
- activity_id: string;
109
- data: {
110
- content: {
111
- text: string;
112
- };
113
- };
114
- parent: string;
115
- latest_children: {};
116
- children_counts: {};
117
- }[];
118
- };
119
- reaction_counts: {
120
- like: number;
121
- reply: number;
122
- };
123
- target: string;
124
- time: string;
125
- verb: string;
126
- } | {
127
- actor: {
128
- created_at: string;
129
- updated_at: string;
130
- id: string;
131
- data: {
132
- name: string;
133
- jobTitle?: undefined;
134
- organization?: undefined;
135
- thumbnail?: undefined;
136
- };
137
- };
138
- content: string;
139
- feed_id: string;
140
- foreign_id: string;
141
- id: string;
142
- latest_reactions: {
143
- like: {
144
- created_at: string;
145
- updated_at: string;
146
- id: string;
147
- user_id: string;
148
- user: {
149
- created_at: string;
150
- updated_at: string;
151
- id: string;
152
- data: {
153
- jobTitle: string;
154
- name: string;
155
- organization: string;
156
- thumbnail: string;
157
- };
158
- };
159
- kind: string;
160
- activity_id: string;
161
- data: {};
162
- parent: string;
163
- latest_children: {};
164
- children_counts: {};
165
- }[];
166
- reply?: undefined;
167
- };
168
- latest_reactions_extra: {
169
- like: {
170
- next: string;
171
- };
172
- reply?: undefined;
173
- };
174
- object: string;
175
- origin: null;
176
- own_reactions: {
177
- like?: undefined;
178
- reply?: undefined;
179
- };
180
- reaction_counts: {
181
- like: number;
182
- reply?: undefined;
183
- };
184
- target: string;
185
- time: string;
186
- verb: string;
187
- } | {
188
- actor: {
189
- created_at: string;
190
- updated_at: string;
191
- id: string;
192
- data: {
193
- jobTitle: string;
194
- name: string;
195
- organization: string;
196
- thumbnail: string;
197
- };
198
- };
199
- content: string;
200
- feed_id: string;
201
- foreign_id: string;
202
- id: string;
203
- latest_reactions: {
204
- like: ({
205
- created_at: string;
206
- updated_at: string;
207
- id: string;
208
- user_id: string;
209
- user: {
210
- created_at: string;
211
- updated_at: string;
212
- id: string;
213
- data: {
214
- jobTitle: string;
215
- name: string;
216
- organization: string;
217
- thumbnail: null;
218
- };
219
- };
220
- kind: string;
221
- activity_id: string;
222
- data: {};
223
- parent: string;
224
- latest_children: {};
225
- children_counts: {};
226
- } | {
227
- created_at: string;
228
- updated_at: string;
229
- id: string;
230
- user_id: string;
231
- user: {
232
- created_at: string;
233
- updated_at: string;
234
- id: string;
235
- data: {
236
- name: string;
237
- jobTitle?: undefined;
238
- organization?: undefined;
239
- thumbnail?: undefined;
240
- };
241
- };
242
- kind: string;
243
- activity_id: string;
244
- data: {};
245
- parent: string;
246
- latest_children: {};
247
- children_counts: {};
248
- } | {
249
- created_at: string;
250
- updated_at: string;
251
- id: string;
252
- user_id: string;
253
- user: {
254
- created_at: string;
255
- updated_at: string;
256
- id: string;
257
- data: {
258
- jobTitle: string;
259
- name: string;
260
- organization: string;
261
- thumbnail: string;
262
- };
263
- };
264
- kind: string;
265
- activity_id: string;
266
- data: {};
267
- parent: string;
268
- latest_children: {};
269
- children_counts: {};
270
- })[];
271
- reply: {
272
- created_at: string;
273
- updated_at: string;
274
- id: string;
275
- user_id: string;
276
- user: {
277
- created_at: string;
278
- updated_at: string;
279
- id: string;
280
- data: {
281
- jobTitle: string;
282
- name: string;
283
- organization: string;
284
- thumbnail: string;
285
- };
286
- };
287
- kind: string;
288
- activity_id: string;
289
- data: {
290
- content: string;
291
- };
292
- parent: string;
293
- latest_children: {};
294
- children_counts: {};
295
- }[];
296
- };
297
- latest_reactions_extra: {
298
- like: {
299
- next: string;
300
- };
301
- reply: {
302
- next: string;
303
- };
304
- };
305
- object: string;
306
- origin: null;
307
- own_reactions: {
308
- like?: undefined;
309
- reply?: undefined;
310
- };
311
- reaction_counts: {
312
- like: number;
313
- reply: number;
314
- };
315
- target: string;
316
- time: string;
317
- verb: string;
318
- })[];
@@ -1 +0,0 @@
1
- export { default as ActivitiesFeed } from './activities-feed';
@@ -1,2 +0,0 @@
1
- export * from './activities-feed';
2
- export * from './replies-feed';
@@ -1 +0,0 @@
1
- export { default as RepliesFeed } from './replies-feed';
@@ -1,24 +0,0 @@
1
- /// <reference types="react" />
2
- import { IReply } from '../../getstream';
3
- interface Props {
4
- basePath: string;
5
- parentId: string;
6
- activityId: string;
7
- repliesList: IReply[] | undefined;
8
- membershipRequiredToPost: {
9
- isMember: boolean;
10
- join: () => Promise<void>;
11
- leave: () => Promise<void>;
12
- };
13
- functions: {
14
- createReply: () => Promise<void>;
15
- like: ({ replyId }: {
16
- replyId: string;
17
- }) => Promise<void>;
18
- unlike: ({ replyId }: {
19
- replyId: string;
20
- }) => Promise<void>;
21
- };
22
- }
23
- declare const RepliesFeed: React.FC<Props>;
24
- export default RepliesFeed;
@@ -1,81 +0,0 @@
1
- import { QueryClient, QueryKey } from '@tanstack/query-core';
2
- import { IActivity, ILike, IReply } from '../../getstream';
3
- import { IUserContext } from '../../..';
4
- interface buildAddReplyHandlersProps {
5
- queryClient: QueryClient;
6
- queryKey: QueryKey;
7
- mutationFn: () => Promise<void>;
8
- }
9
- export declare const buildAddReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildAddReplyHandlersProps) => {
10
- mutationFn: () => Promise<void>;
11
- onMutate: () => Promise<void>;
12
- onError: (_err: {
13
- [key: string]: string;
14
- }, _newActivity: {
15
- activityId: string;
16
- }, context: {
17
- previousActivity: IActivity;
18
- }) => void;
19
- onSuccess: (data: IReply) => {
20
- previousActivity: IActivity;
21
- } | undefined;
22
- onSettled: () => void;
23
- };
24
- interface buildLikeReplyHandlersProps {
25
- queryClient: QueryClient;
26
- queryKey: QueryKey;
27
- mutationFn: ({ replyId }: {
28
- replyId: string;
29
- }) => Promise<void>;
30
- }
31
- export declare const buildLikeReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildLikeReplyHandlersProps) => {
32
- mutationFn: ({ replyId }: {
33
- replyId: string;
34
- }) => Promise<void>;
35
- onMutate: ({ replyId }: {
36
- replyId: string;
37
- }) => Promise<{
38
- previousActivity: IActivity | undefined;
39
- }>;
40
- onError: (_err: {
41
- [key: string]: string;
42
- }, _newActivity: {
43
- activityId: string;
44
- }, context: {
45
- previousActivity: IActivity;
46
- }) => void;
47
- onSuccess: (data: ILike) => {
48
- previousActivity: IActivity | undefined;
49
- };
50
- };
51
- interface buildUnlikeReplyHandlersProps {
52
- queryClient: QueryClient;
53
- queryKey: QueryKey;
54
- user: IUserContext | null;
55
- mutationFn: ({ replyId }: {
56
- replyId: string;
57
- }) => Promise<void>;
58
- }
59
- export declare const buildUnlikeReplyHandlers: ({ queryClient, queryKey, user, mutationFn, }: buildUnlikeReplyHandlersProps) => {
60
- mutationFn: ({ replyId }: {
61
- replyId: string;
62
- }) => Promise<void>;
63
- onMutate: ({ replyId }: {
64
- replyId: string;
65
- }) => Promise<{
66
- previousActivity: IActivity;
67
- } | undefined>;
68
- onError: (_err: {
69
- [key: string]: string;
70
- }, _newActivity: {
71
- activityId: string;
72
- }, context: {
73
- previousActivity: IActivity;
74
- }) => void;
75
- onSuccess: (data: ILike, { replyId }: {
76
- replyId: string;
77
- }) => {
78
- previousActivity: IActivity;
79
- } | undefined;
80
- };
81
- export {};
@@ -1,2 +0,0 @@
1
- import { IReply } from '../../getstream';
2
- export declare const repliesFeedMock: IReply[];
@@ -1,32 +0,0 @@
1
- /// <reference types="react" />
2
- import { QueryFunction, InvalidateQueryFilters } from '@tanstack/react-query';
3
- import { IActivity } from '../../getstream';
4
- interface Props {
5
- basePath: string;
6
- parentId: string;
7
- activityId: string;
8
- membershipRequiredToPost: {
9
- isMember: boolean;
10
- join: () => Promise<void>;
11
- leave: () => Promise<void>;
12
- };
13
- functions: {
14
- get: QueryFunction<IActivity, InvalidateQueryFilters[], never>;
15
- likeActivity: ({ activityId }: {
16
- activityId: string;
17
- }) => Promise<void>;
18
- unlikeActivity: ({ activityId, reactionId, }: {
19
- activityId: string;
20
- reactionId: string | undefined;
21
- }) => Promise<void>;
22
- createReply: () => Promise<void>;
23
- likeReply: ({ replyId }: {
24
- replyId: string;
25
- }) => Promise<void>;
26
- unlikeReply: ({ replyId }: {
27
- replyId: string;
28
- }) => Promise<void>;
29
- };
30
- }
31
- declare const ActivitySection: React.FC<Props>;
32
- export default ActivitySection;
@@ -1,58 +0,0 @@
1
- import { QueryClient, QueryKey } from '@tanstack/query-core';
2
- import { IActivity, ILike } from '../../getstream';
3
- import { IUserContext } from '../../..';
4
- interface buildLikeActivityHandlersProps {
5
- queryClient: QueryClient;
6
- queryKey: QueryKey;
7
- mutationFn: ({ activityId }: {
8
- activityId: string;
9
- }) => Promise<void>;
10
- }
11
- export declare const buildLikeActivityHandlers: ({ queryClient, queryKey, mutationFn, }: buildLikeActivityHandlersProps) => {
12
- mutationFn: ({ activityId }: {
13
- activityId: string;
14
- }) => Promise<void>;
15
- onMutate: () => Promise<{
16
- previousActivity: IActivity | undefined;
17
- }>;
18
- onError: (_err: {
19
- [key: string]: string;
20
- }, _newActivity: {
21
- activityId: string;
22
- }, context: {
23
- previousActivity: IActivity;
24
- }) => void;
25
- onSuccess: (data: ILike) => {
26
- previousActivity: IActivity | undefined;
27
- };
28
- onSettled: () => void;
29
- };
30
- interface buildUnlikeActivityHandlersProps {
31
- queryClient: QueryClient;
32
- queryKey: QueryKey;
33
- user: IUserContext | null;
34
- activity: IActivity | undefined;
35
- mutationFn: ({ activityId }: {
36
- activityId: string;
37
- }) => Promise<void>;
38
- }
39
- export declare const buildUnlikeActivityHandlers: ({ queryClient, queryKey, user, activity, mutationFn, }: buildUnlikeActivityHandlersProps) => {
40
- mutationFn: ({ activityId }: {
41
- activityId: string;
42
- }) => Promise<void>;
43
- onMutate: () => Promise<{
44
- previousActivity: IActivity | undefined;
45
- }>;
46
- onError: (_err: {
47
- [key: string]: string;
48
- }, _newActivity: {
49
- activityId: string;
50
- }, context: {
51
- previousActivity: IActivity;
52
- }) => void;
53
- onSuccess: () => {
54
- previousActivity: IActivity;
55
- } | undefined;
56
- onSettled: () => void;
57
- };
58
- export {};
@@ -1,2 +0,0 @@
1
- import { IActivity } from '../../getstream';
2
- export declare const activityMock: IActivity;
@@ -1 +0,0 @@
1
- export { default as ActivitySection } from './activity-section';
@@ -1 +0,0 @@
1
- export * from './activity-section';