@apolitical/component-library 1.7.1-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 -1
  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-29f4faa2.mjs +0 -9077
  20. package/4TNE5QTO-59ee46fe.js +0 -987
  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 -28
  27. package/discussion/feeds/activities-feed/activities-feed.handlers.d.ts +0 -30
  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 -29
  34. package/discussion/feeds/replies-feed/replies-feed.handlers.d.ts +0 -82
  35. package/discussion/feeds/replies-feed/replies-feed.mock.d.ts +0 -2
  36. package/discussion/sections/activity-section/activity-section.d.ts +0 -36
  37. package/discussion/sections/activity-section/activity-section.handlers.d.ts +0 -60
  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-413092b1.js +0 -101
  42. package/index-513c58d1.mjs +0 -23279
  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,28 +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
- cache: {
12
- activitiesListQueryKey: InvalidateQueryFilters;
13
- singleActivityQueryKeyWithoutVariable: InvalidateQueryFilters;
14
- };
15
- functions: {
16
- list: QueryFunction<unknown, InvalidateQueryFilters[], never>;
17
- create: () => Promise<void>;
18
- like: ({ activityId }: {
19
- activityId: string;
20
- }) => Promise<void>;
21
- unlike: ({ activityId, reactionId, }: {
22
- activityId: string;
23
- reactionId: string;
24
- }) => Promise<void>;
25
- };
26
- }
27
- declare const ActivitiesFeed: React.FC<Props>;
28
- export default ActivitiesFeed;
@@ -1,30 +0,0 @@
1
- import { QueryClient, InvalidateQueryFilters } from '@tanstack/query-core';
2
- import { IUserContext } from '../../..';
3
- export interface buildAddActivityHandlersProps {
4
- queryClient: QueryClient;
5
- queryKey: InvalidateQueryFilters;
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: InvalidateQueryFilters;
13
- mutationFn: ({ activityId }: {
14
- activityId: string;
15
- }) => Promise<void>;
16
- affectedQueryKey: InvalidateQueryFilters;
17
- }
18
- export declare const buildLikeActivityHandlers: ({ queryClient, queryKey, mutationFn, affectedQueryKey, }: buildLikeActivityHandlersProps) => object;
19
- interface buildUnlikeActivityHandlersProps {
20
- queryClient: QueryClient;
21
- queryKey: InvalidateQueryFilters;
22
- user: IUserContext | null;
23
- mutationFn: ({ activityId, reactionId, }: {
24
- activityId: string;
25
- reactionId: string;
26
- }) => Promise<void>;
27
- affectedQueryKey: InvalidateQueryFilters;
28
- }
29
- export declare const buildUnlikeActivityHandlers: ({ queryClient, queryKey, user, mutationFn, affectedQueryKey, }: buildUnlikeActivityHandlersProps) => object;
30
- 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,29 +0,0 @@
1
- /// <reference types="react" />
2
- import { InvalidateQueryFilters } from '@tanstack/react-query';
3
- import { IReply } from '../../getstream';
4
- interface Props {
5
- basePath: string;
6
- parentId: string;
7
- activityId: string;
8
- repliesList: IReply[] | undefined;
9
- cache: {
10
- activitiesListQueryKey: InvalidateQueryFilters;
11
- singleActivityQueryKeyWithoutVariable: InvalidateQueryFilters;
12
- };
13
- membershipRequiredToPost: {
14
- isMember: boolean;
15
- join: () => Promise<void>;
16
- leave: () => Promise<void>;
17
- };
18
- functions: {
19
- createReply: () => Promise<void>;
20
- like: ({ replyId }: {
21
- replyId: string;
22
- }) => Promise<void>;
23
- unlike: ({ replyId }: {
24
- replyId: string;
25
- }) => Promise<void>;
26
- };
27
- }
28
- declare const RepliesFeed: React.FC<Props>;
29
- export default RepliesFeed;
@@ -1,82 +0,0 @@
1
- import { QueryClient, InvalidateQueryFilters } from '@tanstack/query-core';
2
- import { IActivity, ILike, IReply } from '../../getstream';
3
- import { IUserContext } from '../../..';
4
- interface buildAddReplyHandlersProps {
5
- queryClient: QueryClient;
6
- queryKey: InvalidateQueryFilters;
7
- mutationFn: () => Promise<void>;
8
- affectedQueryKey: InvalidateQueryFilters;
9
- }
10
- export declare const buildAddReplyHandlers: ({ queryClient, queryKey, mutationFn, affectedQueryKey, }: buildAddReplyHandlersProps) => {
11
- mutationFn: () => Promise<void>;
12
- onMutate: () => Promise<void>;
13
- onError: (_err: {
14
- [key: string]: string;
15
- }, _newActivity: {
16
- activityId: string;
17
- }, context: {
18
- previousActivity: IActivity;
19
- }) => void;
20
- onSuccess: (data: IReply) => {
21
- previousActivity: IActivity;
22
- } | undefined;
23
- onSettled: () => void;
24
- };
25
- interface buildLikeReplyHandlersProps {
26
- queryClient: QueryClient;
27
- queryKey: InvalidateQueryFilters;
28
- mutationFn: ({ replyId }: {
29
- replyId: string;
30
- }) => Promise<void>;
31
- }
32
- export declare const buildLikeReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildLikeReplyHandlersProps) => {
33
- mutationFn: ({ replyId }: {
34
- replyId: string;
35
- }) => Promise<void>;
36
- onMutate: ({ replyId }: {
37
- replyId: string;
38
- }) => Promise<{
39
- previousActivity: IActivity | undefined;
40
- }>;
41
- onError: (_err: {
42
- [key: string]: string;
43
- }, _newActivity: {
44
- activityId: string;
45
- }, context: {
46
- previousActivity: IActivity;
47
- }) => void;
48
- onSuccess: (data: ILike) => {
49
- previousActivity: IActivity | undefined;
50
- };
51
- };
52
- interface buildUnlikeReplyHandlersProps {
53
- queryClient: QueryClient;
54
- queryKey: InvalidateQueryFilters;
55
- user: IUserContext | null;
56
- mutationFn: ({ replyId }: {
57
- replyId: string;
58
- }) => Promise<void>;
59
- }
60
- export declare const buildUnlikeReplyHandlers: ({ queryClient, queryKey, user, mutationFn, }: buildUnlikeReplyHandlersProps) => {
61
- mutationFn: ({ replyId }: {
62
- replyId: string;
63
- }) => Promise<void>;
64
- onMutate: ({ replyId }: {
65
- replyId: string;
66
- }) => Promise<{
67
- previousActivity: IActivity;
68
- } | undefined>;
69
- onError: (_err: {
70
- [key: string]: string;
71
- }, _newActivity: {
72
- activityId: string;
73
- }, context: {
74
- previousActivity: IActivity;
75
- }) => void;
76
- onSuccess: (data: ILike, { replyId }: {
77
- replyId: string;
78
- }) => {
79
- previousActivity: IActivity;
80
- } | undefined;
81
- };
82
- export {};
@@ -1,2 +0,0 @@
1
- import { IReply } from '../../getstream';
2
- export declare const repliesFeedMock: IReply[];
@@ -1,36 +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
- cache: {
14
- activitiesListQueryKey: InvalidateQueryFilters;
15
- singleActivityQueryKeyWithoutVariable: InvalidateQueryFilters;
16
- };
17
- functions: {
18
- get: QueryFunction<IActivity, InvalidateQueryFilters[], never>;
19
- likeActivity: ({ activityId }: {
20
- activityId: string;
21
- }) => Promise<void>;
22
- unlikeActivity: ({ activityId, reactionId, }: {
23
- activityId: string;
24
- reactionId: string | undefined;
25
- }) => Promise<void>;
26
- createReply: () => Promise<void>;
27
- likeReply: ({ replyId }: {
28
- replyId: string;
29
- }) => Promise<void>;
30
- unlikeReply: ({ replyId }: {
31
- replyId: string;
32
- }) => Promise<void>;
33
- };
34
- }
35
- declare const ActivitySection: React.FC<Props>;
36
- export default ActivitySection;
@@ -1,60 +0,0 @@
1
- import { QueryClient, InvalidateQueryFilters } from '@tanstack/query-core';
2
- import { IActivity, ILike } from '../../getstream';
3
- import { IUserContext } from '../../..';
4
- interface buildLikeActivityHandlersProps {
5
- queryClient: QueryClient;
6
- queryKey: InvalidateQueryFilters;
7
- mutationFn: ({ activityId }: {
8
- activityId: string;
9
- }) => Promise<void>;
10
- affectedQueryKey: InvalidateQueryFilters;
11
- }
12
- export declare const buildLikeActivityHandlers: ({ queryClient, queryKey, mutationFn, affectedQueryKey, }: buildLikeActivityHandlersProps) => {
13
- mutationFn: ({ activityId }: {
14
- activityId: string;
15
- }) => Promise<void>;
16
- onMutate: () => Promise<{
17
- previousActivity: IActivity | undefined;
18
- }>;
19
- onError: (_err: {
20
- [key: string]: string;
21
- }, _newActivity: {
22
- activityId: string;
23
- }, context: {
24
- previousActivity: IActivity;
25
- }) => void;
26
- onSuccess: (data: ILike) => {
27
- previousActivity: IActivity | undefined;
28
- };
29
- onSettled: () => void;
30
- };
31
- interface buildUnlikeActivityHandlersProps {
32
- queryClient: QueryClient;
33
- queryKey: InvalidateQueryFilters;
34
- user: IUserContext | null;
35
- activity: IActivity | undefined;
36
- mutationFn: ({ activityId }: {
37
- activityId: string;
38
- }) => Promise<void>;
39
- affectedQueryKey: InvalidateQueryFilters;
40
- }
41
- export declare const buildUnlikeActivityHandlers: ({ queryClient, queryKey, user, activity, mutationFn, affectedQueryKey, }: buildUnlikeActivityHandlersProps) => {
42
- mutationFn: ({ activityId }: {
43
- activityId: string;
44
- }) => Promise<void>;
45
- onMutate: () => Promise<{
46
- previousActivity: IActivity | undefined;
47
- }>;
48
- onError: (_err: {
49
- [key: string]: string;
50
- }, _newActivity: {
51
- activityId: string;
52
- }, context: {
53
- previousActivity: IActivity;
54
- }) => void;
55
- onSuccess: () => {
56
- previousActivity: IActivity;
57
- } | undefined;
58
- onSettled: () => void;
59
- };
60
- 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';