@apolitical/component-library 8.7.18-ac.4 → 8.7.18

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.
@@ -14,15 +14,6 @@ export interface IPostContent extends IFullDiscussionContent {
14
14
  pollOptions?: IPollProps['options'];
15
15
  /** The settings for the Poll */
16
16
  pollSettings?: IPollProps['settings'];
17
- /** The locale of the content */
18
- locale?: string;
19
- /** Translation indicators for easy access */
20
- translationInfo?: {
21
- isOriginalPost?: boolean;
22
- hasTranslation?: boolean;
23
- };
24
- payloadId?: string;
25
- payloadCollection?: string;
26
17
  }
27
18
  export interface IPollFunctions extends IPollFns {
28
19
  removePoll: (args?: object) => void;
@@ -108,12 +99,6 @@ export interface IDiscussionPostProps {
108
99
  disableMentions?: boolean;
109
100
  /** The function to call when the post is clicked */
110
101
  onClick?: (link?: string) => void;
111
- translation?: {
112
- /** Whether the post is translatable - to control what gets the button */
113
- isTranslatable?: boolean;
114
- /** The function to call when the post should be translated */
115
- onTranslate?: (args: any) => void;
116
- };
117
102
  }
118
- declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, setFocus, isCommunity, badges, basePath, parentId, locale, disableMentions, onClick: onClickPost, translation, }: IDiscussionPostProps) => import("react/jsx-runtime").JSX.Element;
103
+ declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, setFocus, isCommunity, badges, basePath, parentId, locale, disableMentions, onClick: onClickPost, }: IDiscussionPostProps) => import("react/jsx-runtime").JSX.Element;
119
104
  export default Post;
@@ -32,15 +32,6 @@ interface Props {
32
32
  profile: IProfileFormProps;
33
33
  /** The locale of the page */
34
34
  locale?: string;
35
- translation?: {
36
- /** Whether the post is translatable - to control what gets the button */
37
- isTranslatable?: boolean;
38
- /** The function to call when the post should be translated */
39
- onTranslate?: (args: any) => Promise<{
40
- title?: string;
41
- body?: string;
42
- }>;
43
- };
44
35
  }
45
36
  declare const ActivitiesFeed: React.FC<Props>;
46
37
  export default ActivitiesFeed;
@@ -8,6 +8,5 @@ export * from './list';
8
8
  export * from './pin';
9
9
  export * from './remove';
10
10
  export * from './remove-vote';
11
- export * from './translate';
12
11
  export * from './unlike';
13
12
  export * from './unpin';
@@ -16,15 +16,12 @@ export declare const activitiesFeedMock: {
16
16
  };
17
17
  };
18
18
  payload: {
19
- id: string;
20
- collection: string;
21
19
  data: {
22
20
  original: {
23
21
  title: string;
24
22
  locale: string;
25
23
  body: string;
26
24
  };
27
- translations?: undefined;
28
25
  };
29
26
  };
30
27
  title: string;
@@ -137,20 +134,12 @@ export declare const activitiesFeedMock: {
137
134
  };
138
135
  };
139
136
  payload: {
140
- id: string;
141
- collection: string;
142
137
  data: {
143
138
  original: {
144
139
  title: string;
145
140
  locale: string;
146
141
  body: string;
147
142
  };
148
- translations: {
149
- en: {
150
- title: string;
151
- body: string;
152
- };
153
- };
154
143
  };
155
144
  };
156
145
  title: string;
@@ -187,20 +176,12 @@ export declare const activitiesFeedMock: {
187
176
  };
188
177
  };
189
178
  payload: {
190
- id: string;
191
- collection: string;
192
179
  data: {
193
180
  original: {
194
181
  title: string;
195
182
  locale: string;
196
183
  body: string;
197
184
  };
198
- translations: {
199
- en: {
200
- title: string;
201
- body: string;
202
- };
203
- };
204
185
  };
205
186
  };
206
187
  categories: string[];
@@ -259,15 +240,12 @@ export declare const activitiesFeedMock: {
259
240
  };
260
241
  };
261
242
  payload: {
262
- id: string;
263
- collection: string;
264
243
  data: {
265
244
  original: {
266
245
  title: string;
267
246
  locale: string;
268
247
  body: string;
269
248
  };
270
- translations?: undefined;
271
249
  };
272
250
  };
273
251
  title: string;
@@ -34,15 +34,6 @@ export interface IActivitySectionProps {
34
34
  id: string;
35
35
  }[];
36
36
  };
37
- translation?: {
38
- /** Whether the post is translatable - to control what gets the button */
39
- isTranslatable?: boolean;
40
- /** The function to call when the post should be translated */
41
- onTranslate?: (args: any) => Promise<{
42
- title?: string;
43
- body?: string;
44
- }>;
45
- };
46
37
  }
47
38
  declare const ActivitySection: React.FC<IActivitySectionProps>;
48
39
  export default ActivitySection;
@@ -100,13 +100,6 @@ export declare const args: {
100
100
  name: string;
101
101
  slug: string;
102
102
  }[];
103
- translation: {
104
- isTranslatable: boolean;
105
- onTranslate: () => Promise<{
106
- title: string;
107
- body: string;
108
- }>;
109
- };
110
103
  };
111
104
  export declare const argsForCourseDiscussion: {
112
105
  basePath: string;
@@ -7,4 +7,3 @@ export * from './remove-vote';
7
7
  export * from './section';
8
8
  export * from './unlike';
9
9
  export * from './unpin';
10
- export * from './translate';
@@ -7,9 +7,6 @@ export declare const mockFunctions: {
7
7
  unlike: jest.Mock<any, any, any>;
8
8
  pin: jest.Mock<any, any, any>;
9
9
  unpin: jest.Mock<any, any, any>;
10
- createVote: jest.Mock<any, any, any>;
11
- removeVote: jest.Mock<any, any, any>;
12
- removePoll: jest.Mock<any, any, any>;
13
10
  };
14
11
  reactions: {
15
12
  add: jest.Mock<any, any, any>;
@@ -19,6 +19,7 @@ export declare const activitySectionMock: {
19
19
  };
20
20
  };
21
21
  categories: never[];
22
+ content: string;
22
23
  feed_id: string;
23
24
  foreign_id: string;
24
25
  id: string;
@@ -30,17 +31,6 @@ export declare const activitySectionMock: {
30
31
  like: never[];
31
32
  reply: never[];
32
33
  };
33
- payload: {
34
- id: string;
35
- collection: string;
36
- data: {
37
- original: {
38
- title: string;
39
- locale: string;
40
- body: string;
41
- };
42
- };
43
- };
44
34
  object: string;
45
35
  origin: null;
46
36
  own_reactions: {
@@ -90,5 +90,5 @@ export declare function incrementActivityLikes({ activity, reaction, }: IIncreme
90
90
  export declare function decrementActivityLikes({ activity, user }: IDecrementActivityLikesArgs): void;
91
91
  export declare function incrementActivityPins({ activity, reaction, }: IIncrementActivityLikesArgs): void;
92
92
  export declare function decrementActivityPins({ activity }: IDecrementActivityLikesArgs): void;
93
- export declare const constructActivityContent: (activity: IActivity, categories?: ICategory[], currentLocale?: string) => IPostContent;
93
+ export declare const constructActivityContent: (activity: IActivity, categories?: ICategory[]) => IPostContent;
94
94
  export {};
@@ -62,25 +62,6 @@ export interface IFullDiscussionContent extends IDiscussionContent {
62
62
  mentions?: IMentions;
63
63
  /** Link metadata, to show an enriched url for the first link in the post */
64
64
  link?: false | IEnrichedUrlData;
65
- /** Translation information for the post */
66
- translationInfo?: {
67
- /** Whether the post has been translated */
68
- hasTranslation: boolean;
69
- /** Whether this is the original post */
70
- isOriginalPost: boolean;
71
- /** Current title being displayed */
72
- currentTitle?: string;
73
- /** Current body being displayed */
74
- currentBody?: string;
75
- /** Original title */
76
- originalTitle?: string;
77
- /** Original body */
78
- originalBody?: string;
79
- /** Original locale */
80
- originalLocale?: string;
81
- /** Current locale */
82
- currentLocale?: string;
83
- };
84
65
  };
85
66
  /** If the content has been edited */
86
67
  isEdited?: boolean;
@@ -1,7 +1,5 @@
1
1
  import { ELocale } from '@apolitical/contracts';
2
2
  export interface IPayload {
3
- id: string;
4
- collection: string;
5
3
  data: {
6
4
  original: {
7
5
  body?: string;
package/helpers/intl.d.ts CHANGED
@@ -1,20 +1,5 @@
1
1
  export declare const checkIntlPathExists: (path: string, language?: {
2
2
  apolitical: string;
3
- language_en: string;
4
- language_fr: string;
5
- 'language_fr-CA': string;
6
- language_id: string;
7
- language_pt: string;
8
- language_es: string;
9
- 'language_es-419': string;
10
- language_ar: string;
11
- language_pl: string;
12
- language_it: string;
13
- language_ja: string;
14
- language_sr: string;
15
- language_ko: string;
16
- language_de: string;
17
- language_pt_BR: string;
18
3
  dates_now: string;
19
4
  dates_hours: string;
20
5
  dates_days: string;
@@ -210,13 +195,6 @@ export declare const checkIntlPathExists: (path: string, language?: {
210
195
  discussion_share_copy_link_success: string;
211
196
  discussion_thread_show: string;
212
197
  discussion_thread_hide: string;
213
- discussion_translation_seeOriginal: string;
214
- discussion_translation_seeTranslation: string;
215
- discussion_translation_translate: string;
216
- discussion_translation_translate_loading: string;
217
- discussion_translation_translated: string;
218
- discussion_translation_translate_error: string;
219
- discussion_translation_coming_soon: string;
220
198
  discussion_thread_loadMore: string;
221
199
  profileModalLauncher_successMessage: string;
222
200
  profileModalLauncher_title: string;