@apolitical/component-library 8.7.10-ac.0 → 8.7.10-ac.2
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.helpers.d.ts +1 -1
- package/discussion/feeds/activities-feed/cache/mocks/cache.mock.d.ts +4 -4
- package/discussion/sections/activity-section/cache/mocks/cache.mock.d.ts +4 -4
- package/discussion/shared/helpers/activity.helper.d.ts +2 -1
- package/discussion/shared/helpers/get-localised-content.helper.d.ts +3 -4
- package/discussion/shared/helpers/poll.helper.d.ts +1 -1
- package/discussion/shared/interfaces/activity.interface.d.ts +2 -25
- package/index.js +68 -68
- package/index.mjs +4702 -4702
- package/package.json +1 -1
- package/polls/poll/poll.d.ts +2 -2
|
@@ -3,7 +3,7 @@ import { ListMembers } from '../../../form';
|
|
|
3
3
|
import { ICategory } from '../../shared';
|
|
4
4
|
export declare const getInitialBody: (body: string, isTruncated: boolean | number, mentions?: IMentions) => string;
|
|
5
5
|
export declare const getPostBody: (body: string, isTruncated: boolean | number, mentions?: IMentions, listMembers?: ListMembers) => Promise<string>;
|
|
6
|
-
export declare const enrichPostCategories: (postCategories: string[], allCategories: ICategory[]) => (ICategory | undefined)[];
|
|
6
|
+
export declare const enrichPostCategories: (postCategories: string[] | ICategory[], allCategories: ICategory[]) => (ICategory | undefined)[];
|
|
7
7
|
export declare const allowClickUntilClassNameFound: (event: React.MouseEvent<HTMLElement, MouseEvent>, contentClasses: string[], breakClassName: string) => boolean;
|
|
8
8
|
export declare const getTitleText: (title: string | {
|
|
9
9
|
[key: string]: string;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export declare const cacheMock1: Readonly<{
|
|
2
2
|
pages: {
|
|
3
3
|
next: string;
|
|
4
|
-
results: import(
|
|
4
|
+
results: import("@apolitical/contracts").IActivity[];
|
|
5
5
|
}[];
|
|
6
6
|
}>;
|
|
7
7
|
export declare const cacheMock2: Readonly<{
|
|
8
8
|
pages: {
|
|
9
9
|
next: string;
|
|
10
|
-
results: import(
|
|
10
|
+
results: import("@apolitical/contracts").IActivity[];
|
|
11
11
|
}[];
|
|
12
12
|
}>;
|
|
13
13
|
export declare const cacheMock3: Readonly<{
|
|
14
14
|
pages: {
|
|
15
15
|
next: string;
|
|
16
|
-
results: import(
|
|
16
|
+
results: import("@apolitical/contracts").IActivity[];
|
|
17
17
|
}[];
|
|
18
18
|
}>;
|
|
19
19
|
export declare const cacheMock4: Readonly<{
|
|
20
20
|
pages: {
|
|
21
21
|
next: string;
|
|
22
|
-
results: import(
|
|
22
|
+
results: import("@apolitical/contracts").IActivity[];
|
|
23
23
|
}[];
|
|
24
24
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const cacheMock1: Readonly<import(
|
|
2
|
-
export declare const cacheMock2: Readonly<import(
|
|
3
|
-
export declare const cacheMock3: Readonly<import(
|
|
4
|
-
export declare const cacheMock4: Readonly<import(
|
|
1
|
+
export declare const cacheMock1: Readonly<import("@apolitical/contracts").IActivity>;
|
|
2
|
+
export declare const cacheMock2: Readonly<import("@apolitical/contracts").IActivity>;
|
|
3
|
+
export declare const cacheMock3: Readonly<import("@apolitical/contracts").IActivity>;
|
|
4
|
+
export declare const cacheMock4: Readonly<import("@apolitical/contracts").IActivity>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IUserContext } from '../../../context';
|
|
2
|
-
import type
|
|
2
|
+
import { type IActivity } from '@apolitical/contracts';
|
|
3
|
+
import type { ICategory, IReaction } from '..';
|
|
3
4
|
import { ActivityType } from '../../../discussion/shared';
|
|
4
5
|
import { ResultsVisibility } from '../../../polls';
|
|
5
6
|
import { IPostContent } from '../../components';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ELocale } from '@apolitical/contracts';
|
|
2
|
-
import { IPayload } from '../interfaces';
|
|
1
|
+
import { ELocale, IActivity } from '@apolitical/contracts';
|
|
3
2
|
export declare const getLocalisedActivityContent: ({ payload, locale, }: {
|
|
4
|
-
payload:
|
|
3
|
+
payload: IActivity['payload']['data'];
|
|
5
4
|
locale: ELocale;
|
|
6
5
|
}) => string;
|
|
7
6
|
export declare const getLocalisedReactionContent: ({ payload, locale, }: {
|
|
8
|
-
payload:
|
|
7
|
+
payload: IActivity['payload']['data'];
|
|
9
8
|
locale: ELocale;
|
|
10
9
|
}) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IPollOption } from '../../../polls';
|
|
2
|
-
import { type IActivity } from '
|
|
2
|
+
import { type IActivity } from '@apolitical/contracts';
|
|
3
3
|
import type { IUserContext } from '../../../context';
|
|
4
4
|
import { ICacheItem } from '../../feeds/activities-feed/cache';
|
|
5
5
|
interface IPreparePollVoteArgs {
|
|
@@ -1,30 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { IEnrichedUrlData } from '../../../navigation/enriched-url';
|
|
3
|
-
import { ResultsVisibility } from '../../../polls/poll';
|
|
1
|
+
import { type IActivity as IActivityContract } from '@apolitical/contracts';
|
|
4
2
|
export declare enum ActivityType {
|
|
5
3
|
Post = "post",
|
|
6
4
|
Poll = "poll"
|
|
7
5
|
}
|
|
8
|
-
export interface IActivity extends
|
|
9
|
-
content: string | {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
categories?: string[];
|
|
13
|
-
feed_id?: string;
|
|
14
|
-
title: string | {
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
};
|
|
17
|
-
total_replies?: number;
|
|
18
|
-
total_likes?: number;
|
|
19
|
-
additional_data?: {
|
|
20
|
-
link?: IEnrichedUrlData | false | undefined;
|
|
21
|
-
};
|
|
22
|
-
settings?: {
|
|
23
|
-
show_remove_vote?: boolean;
|
|
24
|
-
allow_multiple_votes?: boolean;
|
|
25
|
-
deadline_at?: string;
|
|
26
|
-
hide_participants?: boolean;
|
|
27
|
-
number_of_winners?: number;
|
|
28
|
-
results_visibility?: ResultsVisibility;
|
|
29
|
-
};
|
|
6
|
+
export interface IActivity extends IActivityContract {
|
|
30
7
|
}
|