@apolitical/component-library 5.2.0-jc.0 → 5.2.0-jc.10
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/communities/members-list/index.d.ts +2 -0
- package/communities/members-list/members-list.constants.d.ts +1 -0
- package/communities/members-list/members-list.d.ts +6 -2
- package/discussion/components/likes/components/index.d.ts +1 -0
- package/discussion/components/likes/components/likes-modal/index.d.ts +1 -0
- package/discussion/components/likes/components/likes-modal/likes-modal.d.ts +17 -0
- package/discussion/components/likes/index.d.ts +1 -0
- package/discussion/components/likes/likes.d.ts +14 -3
- package/discussion/components/likes/likes.mock.d.ts +2 -0
- package/discussion/components/likes/mocks/index.d.ts +1 -0
- package/discussion/components/likes/mocks/likes-response.mock.d.ts +64 -0
- package/discussion/components/likes/tooltip.hook.d.ts +5 -0
- package/discussion/components/post/index.d.ts +1 -0
- package/discussion/components/post/post.d.ts +17 -6
- package/discussion/components/post/post.mock.d.ts +64 -0
- package/discussion/feeds/activities-feed/activities-feed.d.ts +2 -0
- package/discussion/feeds/activities-feed/cache/cache.helper.d.ts +5 -0
- package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +75 -1
- package/discussion/feeds/index.d.ts +1 -0
- package/discussion/feeds/likes-feed/cache/hooks/feed/feed.hook.d.ts +1 -1
- package/discussion/feeds/likes-feed/index.d.ts +1 -0
- package/discussion/feeds/likes-feed/likes-feed.d.ts +5 -9
- package/discussion/feeds/replies-feed/cache/cache.helper.d.ts +16 -0
- package/discussion/feeds/replies-feed/nested-replies-feed/nested-replies-feed.d.ts +7 -1
- package/discussion/feeds/replies-feed/replies-feed.d.ts +14 -10
- package/discussion/index.d.ts +2 -1
- package/discussion/sections/activity-section/activity-section.d.ts +2 -0
- package/discussion/sections/activity-section/cache/hooks/read/read.hook.d.ts +1 -1
- package/discussion/shared/interfaces/activity.interface.d.ts +2 -1
- package/discussion/shared/interfaces/discussion.interface.d.ts +84 -0
- package/discussion/shared/interfaces/index.d.ts +1 -0
- package/general/link/link.d.ts +2 -2
- package/helpers/intl.d.ts +1 -1
- package/index.js +53 -53
- package/index.mjs +8518 -8288
- package/navigation/enriched-url/enriched-url.d.ts +33 -0
- package/navigation/enriched-url/enriched-url.mock.d.ts +9 -0
- package/navigation/enriched-url/index.d.ts +1 -0
- package/navigation/index.d.ts +1 -0
- package/package.json +4 -1
- package/style.css +1 -1
- package/styles/variables/colors/theme/_general.scss +1 -0
- package/styles/variables/colors/theme/_navigation.scss +4 -0
- package/text/helper-text-box/helper-text-box.d.ts +2 -2
- package/text/helper-text-box/index.d.ts +1 -0
- package/user/member/member.d.ts +3 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { MemberProps, MemberDetailsProps } from '../../../user';
|
|
2
|
+
import type { ListMembers, ClickMentionFallback } from '../../../form';
|
|
3
|
+
export type IDiscussionContentType = 'answer' | 'post' | 'response' | 'reply' | 'question';
|
|
4
|
+
export interface IDiscussionContent {
|
|
5
|
+
/** The type of content */
|
|
6
|
+
type: IDiscussionContentType;
|
|
7
|
+
/** The slugs we're dealing with - used in functions */
|
|
8
|
+
slugs: {
|
|
9
|
+
question?: string;
|
|
10
|
+
answer?: string;
|
|
11
|
+
reply?: string;
|
|
12
|
+
};
|
|
13
|
+
/** The ID for the content */
|
|
14
|
+
slug?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IFullDiscussionContent extends IDiscussionContent {
|
|
17
|
+
/** The ID for the content */
|
|
18
|
+
id?: string;
|
|
19
|
+
/** The content slug */
|
|
20
|
+
slug: string;
|
|
21
|
+
/** The title of the content post */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** The body of the content post */
|
|
24
|
+
body?: string;
|
|
25
|
+
/** The author of the post */
|
|
26
|
+
author: MemberProps;
|
|
27
|
+
createdAt: Date | string;
|
|
28
|
+
/** The number of likes to display */
|
|
29
|
+
likes?: number;
|
|
30
|
+
/** If the current user liked the content */
|
|
31
|
+
userLiked?: boolean;
|
|
32
|
+
peopleWhoLiked?: MemberProps[] | false;
|
|
33
|
+
/** If the content is pinned */
|
|
34
|
+
pinned?: boolean;
|
|
35
|
+
/** If the user is able to like the content (e.g. they can't like if they're not a member) */
|
|
36
|
+
canLike?: boolean;
|
|
37
|
+
/** The number of comments the post has */
|
|
38
|
+
comments?: number;
|
|
39
|
+
/** Details of users mentioned in the content */
|
|
40
|
+
mentions?: IMentions;
|
|
41
|
+
/** If the content has been edited */
|
|
42
|
+
isEdited?: boolean;
|
|
43
|
+
/** The URL to use for reporting context, etc. */
|
|
44
|
+
linkBase?: string;
|
|
45
|
+
}
|
|
46
|
+
export type IForceHide = {
|
|
47
|
+
/** Whether to hide the whole action bar */
|
|
48
|
+
actionBar?: boolean;
|
|
49
|
+
/** Whether to hide the comments */
|
|
50
|
+
comments?: boolean;
|
|
51
|
+
/** Whether to hide the likes */
|
|
52
|
+
likes?: boolean;
|
|
53
|
+
};
|
|
54
|
+
export type DiscussionCreateContentFunction = (args1: void | object, args2?: object) => void;
|
|
55
|
+
export type DiscussionCreateLikeFunction = (args1: object) => void;
|
|
56
|
+
export type DiscussionDeleteLikeFunction = (args: object) => void;
|
|
57
|
+
export interface IMentions {
|
|
58
|
+
[key: string]: IMentionData;
|
|
59
|
+
}
|
|
60
|
+
export interface IMentionData {
|
|
61
|
+
/** The time the mention was created */
|
|
62
|
+
created_at: string;
|
|
63
|
+
/** The time the mention was updated */
|
|
64
|
+
updated_at: string;
|
|
65
|
+
/** The ID, matching the key */
|
|
66
|
+
id: string;
|
|
67
|
+
/** The data of the user being mentioned */
|
|
68
|
+
data: MemberDetailsProps;
|
|
69
|
+
/** An error message, shown if the user was deleted */
|
|
70
|
+
error?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface IMentionsFns {
|
|
73
|
+
listMembers: ListMembers;
|
|
74
|
+
clickMentionFallback: ClickMentionFallback;
|
|
75
|
+
}
|
|
76
|
+
export interface IListMemberData {
|
|
77
|
+
id?: string;
|
|
78
|
+
name?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface IConversation {
|
|
81
|
+
showForm: boolean;
|
|
82
|
+
prepopulateForm?: string;
|
|
83
|
+
mentionData?: IListMemberData;
|
|
84
|
+
}
|
package/general/link/link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface
|
|
2
|
+
export interface ILinkProps {
|
|
3
3
|
/** URL for link */
|
|
4
4
|
href?: string | undefined;
|
|
5
5
|
/** Content to rendered */
|
|
@@ -33,5 +33,5 @@ interface Props {
|
|
|
33
33
|
/** Data attributes for the link */
|
|
34
34
|
'data-before'?: string;
|
|
35
35
|
}
|
|
36
|
-
declare const Link: ({ href, children, fallbackElement, className, onClick, gtmContext, gtmType, ...props }:
|
|
36
|
+
declare const Link: ({ href, children, fallbackElement, className, onClick, gtmContext, gtmType, ...props }: ILinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
export default Link;
|
package/helpers/intl.d.ts
CHANGED
|
@@ -154,7 +154,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
154
154
|
discussion_form_explainer_question: string;
|
|
155
155
|
discussion_likes: string;
|
|
156
156
|
discussion_likes_short: string;
|
|
157
|
-
|
|
157
|
+
discussion_likes_showAll: string;
|
|
158
158
|
discussion_likes_like: string;
|
|
159
159
|
discussion_likes_unlike: string;
|
|
160
160
|
discussion_likes_show: string;
|