@apolitical/component-library 8.7.9 → 8.7.10-ac.0
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/form/form.type.d.ts +2 -0
- package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +36 -0
- package/discussion/index.d.ts +1 -1
- package/discussion/shared/helpers/get-localised-content.helper.d.ts +8 -9
- package/discussion/shared/helpers/poll.helper.d.ts +1 -1
- package/discussion/shared/interfaces/index.d.ts +1 -0
- package/discussion/shared/interfaces/payload.interface.d.ts +16 -0
- package/index.js +123 -123
- package/index.mjs +7548 -7570
- package/modals/components/overlay/overlay.d.ts +3 -1
- package/package.json +1 -1
- package/styles/uclasses/uclasses.scss +36 -0
|
@@ -15,6 +15,15 @@ export declare const activitiesFeedMock: {
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
+
payload: {
|
|
19
|
+
data: {
|
|
20
|
+
original: {
|
|
21
|
+
title: string;
|
|
22
|
+
locale: string;
|
|
23
|
+
body: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
18
27
|
title: string;
|
|
19
28
|
categories: string[];
|
|
20
29
|
content: string;
|
|
@@ -124,6 +133,15 @@ export declare const activitiesFeedMock: {
|
|
|
124
133
|
};
|
|
125
134
|
};
|
|
126
135
|
};
|
|
136
|
+
payload: {
|
|
137
|
+
data: {
|
|
138
|
+
original: {
|
|
139
|
+
title: string;
|
|
140
|
+
locale: string;
|
|
141
|
+
body: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
127
145
|
title: string;
|
|
128
146
|
categories: string[];
|
|
129
147
|
content: string;
|
|
@@ -157,6 +175,15 @@ export declare const activitiesFeedMock: {
|
|
|
157
175
|
badges?: undefined;
|
|
158
176
|
};
|
|
159
177
|
};
|
|
178
|
+
payload: {
|
|
179
|
+
data: {
|
|
180
|
+
original: {
|
|
181
|
+
title: string;
|
|
182
|
+
locale: string;
|
|
183
|
+
body: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
160
187
|
categories: string[];
|
|
161
188
|
content: string;
|
|
162
189
|
feed_id: string;
|
|
@@ -212,6 +239,15 @@ export declare const activitiesFeedMock: {
|
|
|
212
239
|
badges?: undefined;
|
|
213
240
|
};
|
|
214
241
|
};
|
|
242
|
+
payload: {
|
|
243
|
+
data: {
|
|
244
|
+
original: {
|
|
245
|
+
title: string;
|
|
246
|
+
locale: string;
|
|
247
|
+
body: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
215
251
|
title: string;
|
|
216
252
|
content: string;
|
|
217
253
|
feed_id: string;
|
package/discussion/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export * from './feeds';
|
|
|
3
3
|
export * from './discussion.helpers';
|
|
4
4
|
export * from './sections';
|
|
5
5
|
export * from './shared/interfaces';
|
|
6
|
-
export { getActivityPollOptions, constructActivityContent } from './shared/helpers';
|
|
6
|
+
export { getActivityPollOptions, constructActivityContent, getLocalisedActivityContent, getLocalisedReactionContent, } from './shared/helpers';
|
|
7
7
|
export { useScrollToPost } from './shared/hooks';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
locale:
|
|
1
|
+
import { ELocale } from '@apolitical/contracts';
|
|
2
|
+
import { IPayload } from '../interfaces';
|
|
3
|
+
export declare const getLocalisedActivityContent: ({ payload, locale, }: {
|
|
4
|
+
payload: IPayload['data'];
|
|
5
|
+
locale: ELocale;
|
|
6
6
|
}) => string;
|
|
7
|
-
export declare const getLocalisedReactionContent: ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
7
|
+
export declare const getLocalisedReactionContent: ({ payload, locale, }: {
|
|
8
|
+
payload: IPayload['data'];
|
|
9
|
+
locale: ELocale;
|
|
11
10
|
}) => string;
|
|
@@ -26,7 +26,7 @@ interface IRemovePollVoteArgs {
|
|
|
26
26
|
activity: IActivity;
|
|
27
27
|
reactionId: string;
|
|
28
28
|
}
|
|
29
|
-
export declare const getActivityPollOptions: (pollOption: ICacheItem,
|
|
29
|
+
export declare const getActivityPollOptions: (pollOption: ICacheItem, _locale?: string) => IPollOption[];
|
|
30
30
|
export declare function preparePollVote({ activity, reactionId, user }: IPreparePollVoteArgs): void;
|
|
31
31
|
export declare function enrichPollVote({ activity, reactionId, correctReactionId, user, }: IEnrichPollVoteArgs): void;
|
|
32
32
|
export declare function removePollVote({ activity, reactionId }: IRemovePollVoteArgs): void;
|
|
@@ -2,5 +2,6 @@ export * from './activity.interface';
|
|
|
2
2
|
export * from './community.category.interface';
|
|
3
3
|
export * from './context.interface';
|
|
4
4
|
export * from './discussion.interface';
|
|
5
|
+
export * from './payload.interface';
|
|
5
6
|
export * from './reaction.interface';
|
|
6
7
|
export * from './user.interface';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ELocale } from '@apolitical/contracts';
|
|
2
|
+
export interface IPayload {
|
|
3
|
+
data: {
|
|
4
|
+
original: {
|
|
5
|
+
body?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
locale: ELocale;
|
|
8
|
+
};
|
|
9
|
+
translations?: {
|
|
10
|
+
[key in ELocale]?: {
|
|
11
|
+
body?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|