@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.
@@ -84,6 +84,8 @@ export interface IDiscussionForm {
84
84
  gtmContext?: string;
85
85
  /** The language to use for the text */
86
86
  locale?: string;
87
+ /** Whether to use the focus trap */
88
+ withFocusTrap?: boolean;
87
89
  }
88
90
  export interface IRTEValues {
89
91
  body?: string;
@@ -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;
@@ -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
- export declare const getLocalisedActivityContent: ({ content, locale, }: {
2
- content: {
3
- [key: string]: string;
4
- };
5
- locale: string;
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: ({ content, }: {
8
- content: {
9
- [key: string]: string;
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, locale?: string) => IPollOption[];
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
+ }