@apolitical/component-library 1.17.4-beta.0 → 1.18.0-4247.55
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/post/post.d.ts +4 -2
- package/discussion/components/thread/thread.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/cache.helper.d.ts +5 -0
- package/discussion/feeds/activities-feed/cache/cache.interface.d.ts +13 -0
- package/discussion/feeds/activities-feed/cache/hooks/create/create.hook.d.ts +7 -0
- package/discussion/feeds/activities-feed/cache/hooks/edit/edit.hook.d.ts +8 -0
- package/discussion/feeds/activities-feed/cache/hooks/like/like.hook.d.ts +3 -2
- package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/hooks/remove/remove.hook.d.ts +7 -0
- package/discussion/feeds/activities-feed/cache/hooks/unlike/unlike.hook.d.ts +4 -3
- package/discussion/feeds/activities-feed/cache/index.d.ts +2 -3
- package/discussion/feeds/activities-feed/cache/mocks/cache.mock.d.ts +24 -0
- package/discussion/feeds/activities-feed/cache/mocks/index.d.ts +0 -4
- package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +57 -0
- package/discussion/feeds/activities-feed/mocks/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/cache/cache.helper.d.ts +16 -0
- package/discussion/feeds/replies-feed/cache/cache.interface.d.ts +13 -0
- package/discussion/feeds/replies-feed/cache/hooks/create/create.hook.d.ts +9 -0
- package/discussion/feeds/replies-feed/cache/hooks/create/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/cache/hooks/edit/edit.hook.d.ts +8 -0
- package/discussion/feeds/replies-feed/cache/hooks/edit/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/cache/hooks/feed/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/cache/hooks/index.d.ts +7 -0
- package/discussion/feeds/replies-feed/cache/hooks/like/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/cache/hooks/like/like.hook.d.ts +8 -0
- package/discussion/feeds/replies-feed/cache/hooks/list/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/cache/hooks/list/list.hook.d.ts +14 -0
- package/discussion/feeds/replies-feed/cache/hooks/remove/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/cache/hooks/remove/remove.hook.d.ts +7 -0
- package/discussion/feeds/replies-feed/cache/hooks/unlike/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/cache/hooks/unlike/unlike.hook.d.ts +8 -0
- package/discussion/feeds/replies-feed/cache/index.d.ts +3 -0
- package/discussion/feeds/replies-feed/cache/mocks/cache.mock.d.ts +24 -0
- package/discussion/feeds/replies-feed/cache/mocks/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/index.d.ts +2 -0
- package/discussion/feeds/replies-feed/mocks/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/mocks/replies-feed.mock.d.ts +101 -0
- package/discussion/feeds/replies-feed/nested-replies-feed/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/nested-replies-feed/mocks/index.d.ts +1 -0
- package/discussion/feeds/replies-feed/nested-replies-feed/mocks/nested-replies-feed.mock.d.ts +26 -0
- package/discussion/feeds/replies-feed/nested-replies-feed/nested-replies-feed.d.ts +12 -0
- package/discussion/feeds/replies-feed/replies-feed.d.ts +2 -24
- package/discussion/sections/activity-section/activity-section.d.ts +7 -37
- package/discussion/sections/activity-section/cache/cache.interface.d.ts +5 -0
- package/discussion/sections/activity-section/cache/hooks/edit/edit.hook.d.ts +7 -0
- package/discussion/sections/activity-section/cache/hooks/edit/index.d.ts +1 -0
- package/discussion/sections/activity-section/cache/hooks/index.d.ts +5 -0
- package/discussion/sections/activity-section/cache/hooks/like/index.d.ts +1 -0
- package/discussion/sections/activity-section/cache/hooks/like/like.hook.d.ts +8 -0
- package/discussion/sections/activity-section/cache/hooks/read/index.d.ts +1 -0
- package/discussion/sections/activity-section/cache/hooks/read/read.hook.d.ts +12 -0
- package/discussion/sections/activity-section/cache/hooks/section/index.d.ts +1 -0
- package/discussion/sections/activity-section/cache/hooks/unlike/index.d.ts +1 -0
- package/discussion/sections/activity-section/cache/hooks/unlike/unlike.hook.d.ts +8 -0
- package/discussion/sections/activity-section/cache/index.d.ts +2 -0
- package/discussion/sections/activity-section/cache/mocks/cache.mock.d.ts +4 -0
- package/discussion/sections/activity-section/cache/mocks/index.d.ts +1 -0
- package/discussion/sections/activity-section/mocks/activity-section.mock.d.ts +37 -0
- package/discussion/sections/activity-section/mocks/index.d.ts +2 -0
- package/discussion/shared/constants.d.ts +3 -0
- package/discussion/shared/handlers/error.handler.d.ts +2 -0
- package/discussion/shared/handlers/mutate.handler.d.ts +2 -0
- package/discussion/shared/helpers/activity.helper.d.ts +28 -0
- package/discussion/{feeds/activities-feed/cache → shared}/helpers/index.d.ts +1 -1
- package/discussion/shared/helpers/reaction.helper.d.ts +28 -0
- package/discussion/shared/helpers/reply.helper.d.ts +33 -0
- package/discussion/shared/helpers/user.helper.d.ts +10 -0
- package/discussion/shared/index.d.ts +5 -0
- package/discussion/shared/interfaces/activity.interface.d.ts +4 -0
- package/discussion/shared/interfaces/context.interface.d.ts +14 -0
- package/discussion/shared/interfaces/index.d.ts +4 -0
- package/discussion/shared/interfaces/reaction.interface.d.ts +3 -0
- package/discussion/shared/interfaces/user.interface.d.ts +9 -0
- package/discussion/shared/mocks/index.d.ts +4 -0
- package/discussion/shared/mocks/reply.mock.d.ts +80 -0
- package/index.js +15 -15
- package/index.mjs +3669 -3068
- package/navigation/load-more/load-more.d.ts +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/variables/colors/_colors.scss +62 -52
- package/styles/variables/colors/_theme.scss +0 -2
- package/text/highlighted-text-box/highlighted-text-box.d.ts +2 -4
- package/discussion/feeds/activities-feed/activities-feed.mock.d.ts +0 -318
- package/discussion/feeds/activities-feed/cache/handlers/error.handler.d.ts +0 -2
- package/discussion/feeds/activities-feed/cache/handlers/mutate.handler.d.ts +0 -2
- package/discussion/feeds/activities-feed/cache/interfaces/cache.interface.d.ts +0 -15
- package/discussion/feeds/activities-feed/cache/interfaces/index.d.ts +0 -3
- package/discussion/feeds/activities-feed/cache/interfaces/mutation.interface.d.ts +0 -12
- package/discussion/feeds/activities-feed/cache/interfaces/query.interface.d.ts +0 -5
- package/discussion/feeds/replies-feed/replies-feed.handlers.d.ts +0 -147
- package/discussion/feeds/replies-feed/replies-feed.mock.d.ts +0 -2
- package/discussion/feeds/replies-to-replies-feed/index.d.ts +0 -1
- package/discussion/feeds/replies-to-replies-feed/replies-to-replies-feed.d.ts +0 -38
- package/discussion/feeds/replies-to-replies-feed/replies-to-replies-feed.handlers.d.ts +0 -161
- package/discussion/sections/activity-section/activity-section.handlers.d.ts +0 -84
- package/discussion/sections/activity-section/activity.mock.d.ts +0 -2
- /package/discussion/{feeds/activities-feed/cache → shared}/handlers/index.d.ts +0 -0
- /package/discussion/{feeds/activities-feed/cache → shared}/mocks/activity.mock.d.ts +0 -0
- /package/discussion/{feeds/activities-feed/cache → shared}/mocks/reaction.mock.d.ts +0 -0
- /package/discussion/{feeds/activities-feed/cache → shared}/mocks/user.mock.d.ts +0 -0
|
@@ -4,56 +4,66 @@
|
|
|
4
4
|
// names.
|
|
5
5
|
|
|
6
6
|
$default-colors: (
|
|
7
|
-
'white': rgb(255 255 255 / 100%),
|
|
8
|
-
'black': rgb(0 0 0 / 100%),
|
|
9
|
-
'sand': rgb(252 250 243 / 100%),
|
|
10
|
-
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
7
|
+
'white': rgb(255 255 255 / 100%),
|
|
8
|
+
'black': rgb(0 0 0 / 100%),
|
|
9
|
+
'sand': rgb(252 250 243 / 100%),
|
|
10
|
+
|
|
11
|
+
'b50': rgb(248 247 255 / 100%),
|
|
12
|
+
'b100': rgb(222 220 250 / 100%),
|
|
13
|
+
'b200': rgb(197 194 245 / 100%),
|
|
14
|
+
'b300': rgb(175 171 239 / 100%),
|
|
15
|
+
'b500': rgb(124 114 225 / 100%),
|
|
16
|
+
'b600': rgb(101 89 212 / 100%),
|
|
17
|
+
'b700': rgb(79 67 186 / 100%),
|
|
18
|
+
'b800': rgb(57 45 135 / 100%),
|
|
19
|
+
'b900': rgb(33 24 77 / 100%),
|
|
20
|
+
|
|
21
|
+
'g50': rgb(235 250 246 / 100%),
|
|
22
|
+
'g100': rgb(195 240 228 / 100%),
|
|
23
|
+
'g200': rgb(153 219 201),
|
|
24
|
+
'g300': rgb(124 220 197 / 100%),
|
|
25
|
+
'g600': rgb(43 137 117 / 100%),
|
|
26
|
+
'g700': rgb(28 104 88 / 100%),
|
|
27
|
+
'g900': rgb(10 38 33 / 100%),
|
|
28
|
+
|
|
29
|
+
'n10': rgb(222 226 232 / 100%),
|
|
30
|
+
'n50': rgb(240 245 255 / 100%),
|
|
31
|
+
'n100': rgb(215 224 239 / 100%),
|
|
32
|
+
'n200': rgb(192 203 223 / 100%),
|
|
33
|
+
'n500': rgb(117 131 160 / 100%),
|
|
34
|
+
'n600': rgb(89 101 128 / 100%),
|
|
35
|
+
'n700': rgb(64 74 97 / 100%),
|
|
36
|
+
'n800': rgb(42 49 65 / 100%),
|
|
37
|
+
'n900': rgb(21 25 33 / 100%),
|
|
38
|
+
|
|
39
|
+
'p50': rgb(255 242 255 / 100%),
|
|
40
|
+
'p100': rgb(238 200 237 / 100%),
|
|
41
|
+
'p300': rgb(203 130 197 / 100%),
|
|
42
|
+
'p500': rgb(166 55 152 / 100%),
|
|
43
|
+
'p600': rgb(136 90 189 / 100%),
|
|
44
|
+
'p900': rgb(66 1 55 / 100%),
|
|
45
|
+
|
|
46
|
+
'y50': rgb(255 248 232 / 100%),
|
|
47
|
+
'y100': rgb(255 238 193 / 100%),
|
|
48
|
+
'y300': rgb(255 230 139 / 100%),
|
|
49
|
+
'y700': rgb(122 81 5 / 100%),
|
|
50
|
+
'y900': rgb(48 29 0 / 100%),
|
|
51
|
+
|
|
52
|
+
'error50': rgb(255 242 242 / 100%),
|
|
53
|
+
'error600': rgb(195 65 65 / 100%),
|
|
54
|
+
'error700': rgb(155 36 36 / 100%),
|
|
55
|
+
|
|
56
|
+
'info50': rgb(240 245 247 / 100%),
|
|
57
|
+
'info500': rgb(30 117 166 / 100%),
|
|
58
|
+
'info600': rgb(20 95 139 / 100%),
|
|
59
|
+
|
|
60
|
+
'success50': rgb(235 247 239 / 100%),
|
|
61
|
+
'success500': rgb(60 124 82 / 100%),
|
|
62
|
+
'success600': rgb(38 103 60 / 100%),
|
|
63
|
+
|
|
64
|
+
'warning50': rgb(255 242 230 / 100%),
|
|
65
|
+
'warning500': rgb(220 121 29 / 100%),
|
|
66
|
+
'warning700': rgb(137 71 11 / 100%),
|
|
67
|
+
|
|
68
|
+
|
|
59
69
|
);
|
|
@@ -273,8 +273,6 @@ $theme: (
|
|
|
273
273
|
linear-gradient(rgba(255 255 255 / 0%), rgba(255 255 255 / 100%)),
|
|
274
274
|
highlighted-text-box_bold_icon: map.get($c, 'b500'),
|
|
275
275
|
highlighted-text-box_subtle_border: map.get($c, 'n100'),
|
|
276
|
-
highlighted-text-box_muted_bg: map.get($c, 'n40'),
|
|
277
|
-
highlighted-text-box_muted_icon: map.get($c, 'n600'),
|
|
278
276
|
page-heading_bg: linear-gradient(180deg, map.get($c, 'n50') 0%, rgb(240 245 255 / 0%) 100%),
|
|
279
277
|
page-heading_subtitle: map.get($c, 'n700'),
|
|
280
278
|
pill: map.get($c, 'n900'),
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface Props {
|
|
3
3
|
/** The style of box being rendered */
|
|
4
|
-
variant?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'bold'
|
|
5
|
-
/** The name of an icon file to display at the top */
|
|
6
|
-
icon?: string;
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'bold';
|
|
7
5
|
/** Additional classes to add to the box */
|
|
8
6
|
className?: string;
|
|
9
7
|
/** The content to display */
|
|
@@ -11,5 +9,5 @@ interface Props {
|
|
|
11
9
|
/** Additional props to pass to the box */
|
|
12
10
|
style?: React.CSSProperties;
|
|
13
11
|
}
|
|
14
|
-
declare const HighlightedTextBoxWrapper: ({ variant,
|
|
12
|
+
declare const HighlightedTextBoxWrapper: ({ variant, className, children, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
13
|
export default HighlightedTextBoxWrapper;
|
|
@@ -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,15 +0,0 @@
|
|
|
1
|
-
import { InfiniteData } from '@tanstack/query-core';
|
|
2
|
-
import type { EnrichedReaction, EnrichedUser, FeedAPIResponse, FlatActivityEnriched } from 'getstream';
|
|
3
|
-
export type ICache = InfiniteData<ICachePage, string>;
|
|
4
|
-
export type ICachePage = ExtendedFeedAPIResponse;
|
|
5
|
-
export type ICacheItems = ICacheItem[];
|
|
6
|
-
export type ICacheItem = ExtendedFlatActivityEnriched;
|
|
7
|
-
export type ICacheSubitem = EnrichedReaction;
|
|
8
|
-
export type ICacheUser = EnrichedUser;
|
|
9
|
-
interface ExtendedFlatActivityEnriched extends FlatActivityEnriched {
|
|
10
|
-
content: string;
|
|
11
|
-
}
|
|
12
|
-
interface ExtendedFeedAPIResponse extends FeedAPIResponse {
|
|
13
|
-
results: ExtendedFlatActivityEnriched[];
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { IUserContext } from '../../../../../context';
|
|
2
|
-
import type { IQueryContext, ICache } from '.';
|
|
3
|
-
export interface IMutationContext extends IQueryContext {
|
|
4
|
-
mutationHandlers: {
|
|
5
|
-
mutate: (callback: (cache: ICache) => ICache) => Promise<ICache>;
|
|
6
|
-
error: (error: Error, variables: unknown, cache?: ICache) => void;
|
|
7
|
-
};
|
|
8
|
-
user: IUserContext;
|
|
9
|
-
}
|
|
10
|
-
export interface IMutationProps extends IMutationContext {
|
|
11
|
-
mutationFn: (_: any) => Promise<any>;
|
|
12
|
-
}
|
|
@@ -1,147 +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: (content: {
|
|
8
|
-
body: string;
|
|
9
|
-
}) => Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
export declare const buildAddReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildAddReplyHandlersProps) => {
|
|
12
|
-
mutationFn: (content: {
|
|
13
|
-
body: string;
|
|
14
|
-
}) => Promise<void>;
|
|
15
|
-
onMutate: () => Promise<void>;
|
|
16
|
-
onError: (_err: {
|
|
17
|
-
[key: string]: string;
|
|
18
|
-
}, _newActivity: {
|
|
19
|
-
activityId: string;
|
|
20
|
-
}, context: {
|
|
21
|
-
previousActivity: IActivity;
|
|
22
|
-
}) => void;
|
|
23
|
-
onSuccess: (data: IReply) => {
|
|
24
|
-
previousActivity: IActivity;
|
|
25
|
-
} | undefined;
|
|
26
|
-
onSettled: () => void;
|
|
27
|
-
};
|
|
28
|
-
interface buildEditReplyHandlersProps {
|
|
29
|
-
queryClient: QueryClient;
|
|
30
|
-
queryKey: QueryKey;
|
|
31
|
-
mutationFn: ({ parentId, replyId, content, }: {
|
|
32
|
-
parentId: string;
|
|
33
|
-
replyId: string;
|
|
34
|
-
content: {
|
|
35
|
-
body: string;
|
|
36
|
-
};
|
|
37
|
-
}) => Promise<void>;
|
|
38
|
-
}
|
|
39
|
-
export declare const buildEditReplyHanders: ({ queryClient, queryKey, mutationFn, }: buildEditReplyHandlersProps) => {
|
|
40
|
-
mutationFn: ({ parentId, replyId, content, }: {
|
|
41
|
-
parentId: string;
|
|
42
|
-
replyId: string;
|
|
43
|
-
content: {
|
|
44
|
-
body: string;
|
|
45
|
-
};
|
|
46
|
-
}) => Promise<void>;
|
|
47
|
-
onMutate: ({ replyInfo, content: { body }, }: {
|
|
48
|
-
replyInfo: {
|
|
49
|
-
parentId: string;
|
|
50
|
-
replySlug: string;
|
|
51
|
-
};
|
|
52
|
-
content: {
|
|
53
|
-
body: string;
|
|
54
|
-
};
|
|
55
|
-
}) => Promise<{
|
|
56
|
-
previousActivity: IActivity;
|
|
57
|
-
} | undefined>;
|
|
58
|
-
onError: (_err: {
|
|
59
|
-
[key: string]: string;
|
|
60
|
-
}, _changedActivity: {
|
|
61
|
-
activityId: string;
|
|
62
|
-
}, context: {
|
|
63
|
-
previousActivity: IActivity;
|
|
64
|
-
}) => void;
|
|
65
|
-
};
|
|
66
|
-
interface buildRemoveReplyHandlersProps {
|
|
67
|
-
queryClient: QueryClient;
|
|
68
|
-
queryKey: QueryKey;
|
|
69
|
-
mutationFn: ({ replyId }: {
|
|
70
|
-
replyId: string;
|
|
71
|
-
}) => Promise<void>;
|
|
72
|
-
}
|
|
73
|
-
export declare const buildRemoveReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildRemoveReplyHandlersProps) => {
|
|
74
|
-
mutationFn: ({ replyId }: {
|
|
75
|
-
replyId: string;
|
|
76
|
-
}) => Promise<void>;
|
|
77
|
-
onMutate: ({ replyId }: {
|
|
78
|
-
replyId: string;
|
|
79
|
-
}) => Promise<{
|
|
80
|
-
previousActivity: IActivity;
|
|
81
|
-
} | undefined>;
|
|
82
|
-
onError: (_err: {
|
|
83
|
-
[key: string]: string;
|
|
84
|
-
}, _newActivity: {
|
|
85
|
-
activityId: string;
|
|
86
|
-
}, context: {
|
|
87
|
-
previousActivity: IActivity;
|
|
88
|
-
}) => void;
|
|
89
|
-
};
|
|
90
|
-
interface buildLikeReplyHandlersProps {
|
|
91
|
-
queryClient: QueryClient;
|
|
92
|
-
queryKey: QueryKey;
|
|
93
|
-
mutationFn: ({ replyId }: {
|
|
94
|
-
replyId: string;
|
|
95
|
-
}) => Promise<void>;
|
|
96
|
-
}
|
|
97
|
-
export declare const buildLikeReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildLikeReplyHandlersProps) => {
|
|
98
|
-
mutationFn: ({ replyId }: {
|
|
99
|
-
replyId: string;
|
|
100
|
-
}) => Promise<void>;
|
|
101
|
-
onMutate: ({ replyId }: {
|
|
102
|
-
replyId: string;
|
|
103
|
-
}) => Promise<{
|
|
104
|
-
previousActivity: IActivity | undefined;
|
|
105
|
-
}>;
|
|
106
|
-
onError: (_err: {
|
|
107
|
-
[key: string]: string;
|
|
108
|
-
}, _newActivity: {
|
|
109
|
-
activityId: string;
|
|
110
|
-
}, context: {
|
|
111
|
-
previousActivity: IActivity;
|
|
112
|
-
}) => void;
|
|
113
|
-
onSuccess: (data: ILike) => {
|
|
114
|
-
previousActivity: IActivity | undefined;
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
interface buildUnlikeReplyHandlersProps {
|
|
118
|
-
queryClient: QueryClient;
|
|
119
|
-
queryKey: QueryKey;
|
|
120
|
-
user: IUserContext;
|
|
121
|
-
mutationFn: ({ replyId }: {
|
|
122
|
-
replyId: string;
|
|
123
|
-
}) => Promise<void>;
|
|
124
|
-
}
|
|
125
|
-
export declare const buildUnlikeReplyHandlers: ({ queryClient, queryKey, user, mutationFn, }: buildUnlikeReplyHandlersProps) => {
|
|
126
|
-
mutationFn: ({ replyId }: {
|
|
127
|
-
replyId: string;
|
|
128
|
-
}) => Promise<void>;
|
|
129
|
-
onMutate: ({ replyId }: {
|
|
130
|
-
replyId: string;
|
|
131
|
-
}) => Promise<{
|
|
132
|
-
previousActivity: IActivity;
|
|
133
|
-
} | undefined>;
|
|
134
|
-
onError: (_err: {
|
|
135
|
-
[key: string]: string;
|
|
136
|
-
}, _newActivity: {
|
|
137
|
-
activityId: string;
|
|
138
|
-
}, context: {
|
|
139
|
-
previousActivity: IActivity;
|
|
140
|
-
}) => void;
|
|
141
|
-
onSuccess: (data: ILike, { replyId }: {
|
|
142
|
-
replyId: string;
|
|
143
|
-
}) => {
|
|
144
|
-
previousActivity: IActivity;
|
|
145
|
-
} | undefined;
|
|
146
|
-
};
|
|
147
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as RepliesFeed } from './replies-to-replies-feed';
|