@apolitical/component-library 9.0.0-beta.1 → 9.0.0-beta.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/form/form.type.d.ts +2 -0
- package/discussion/components/post/post.d.ts +1 -1
- package/discussion/discussion.helpers.d.ts +1 -1
- package/discussion/shared/helpers/activity.helper.d.ts +3 -1
- package/discussion/shared/interfaces/discussion.interface.d.ts +3 -0
- package/helpers/intl.d.ts +4 -0
- package/index.js +122 -122
- package/index.mjs +14620 -14448
- package/package.json +4 -4
- package/style.css +1 -1
- package/styles/uclasses/uclasses.scss +38 -0
- package/user/member/member.types.d.ts +1 -1
|
@@ -41,6 +41,8 @@ export interface IDiscussionFormMeta {
|
|
|
41
41
|
showDivider?: boolean;
|
|
42
42
|
/** Whether the success message should show on a successful submit */
|
|
43
43
|
showSuccessMessage?: boolean;
|
|
44
|
+
/** Whether anonymous posts are allowed */
|
|
45
|
+
allowAnonymousPosts?: boolean;
|
|
44
46
|
}
|
|
45
47
|
export interface IDiscussionForm {
|
|
46
48
|
/** A unique ID for the form */
|
|
@@ -29,7 +29,7 @@ export interface IPollFunctions extends IPollFns {
|
|
|
29
29
|
}
|
|
30
30
|
export interface IDiscussionPostProps {
|
|
31
31
|
/** The element that will render around the content */
|
|
32
|
-
element?: 'li' | 'div' | 'section' | 'article';
|
|
32
|
+
element?: 'li' | 'div' | 'section' | 'article' | 'button';
|
|
33
33
|
/** Information about the content being posted */
|
|
34
34
|
content: IPostContent;
|
|
35
35
|
/** If the user has permission to interact with the post box and content, e.g. if they're a member of the community */
|
|
@@ -4,7 +4,7 @@ export declare const transformSlugs: (slugs: {
|
|
|
4
4
|
}) => {
|
|
5
5
|
[key: string]: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const getAuthorData: (author: IUser) => "deleted" | {
|
|
7
|
+
export declare const getAuthorData: (author: IUser, isAnonymous?: boolean) => "deleted" | "anonymous" | {
|
|
8
8
|
id: string;
|
|
9
9
|
name: string;
|
|
10
10
|
organization: string;
|
|
@@ -9,6 +9,7 @@ interface IPrepareActivityArgs {
|
|
|
9
9
|
content?: string;
|
|
10
10
|
categories?: string;
|
|
11
11
|
locale?: string;
|
|
12
|
+
is_anonymous?: boolean;
|
|
12
13
|
}
|
|
13
14
|
interface IPreparePollActivityArgs {
|
|
14
15
|
title?: string;
|
|
@@ -51,7 +52,7 @@ interface IDecrementActivityLikesArgs {
|
|
|
51
52
|
activity: IActivity;
|
|
52
53
|
user?: IUserContext;
|
|
53
54
|
}
|
|
54
|
-
export declare function prepareActivity({ title, content, categories, locale, }: IPrepareActivityArgs): {
|
|
55
|
+
export declare function prepareActivity({ title, content, categories, locale, is_anonymous, }: IPrepareActivityArgs): {
|
|
55
56
|
title: string | undefined;
|
|
56
57
|
content: string | undefined;
|
|
57
58
|
payload: {
|
|
@@ -68,6 +69,7 @@ export declare function prepareActivity({ title, content, categories, locale, }:
|
|
|
68
69
|
id: string;
|
|
69
70
|
time: string;
|
|
70
71
|
verb: ActivityType;
|
|
72
|
+
is_anonymous: boolean | undefined;
|
|
71
73
|
};
|
|
72
74
|
export declare function preparePollActivity({ title, options, settings, user, correctActivityId, }: IPreparePollActivityArgs): {
|
|
73
75
|
title: string | undefined;
|
|
@@ -42,6 +42,9 @@ export interface IFullDiscussionContent extends IDiscussionContent {
|
|
|
42
42
|
body?: string;
|
|
43
43
|
/** The author of the post */
|
|
44
44
|
author: MemberProps;
|
|
45
|
+
/** The ID of the deanonymised post author, for identifying the original author when the post is anonymous
|
|
46
|
+
and the user is the author of the post */
|
|
47
|
+
deanonymisedAuthorId?: string;
|
|
45
48
|
/** The post categories */
|
|
46
49
|
categories?: ICategory[];
|
|
47
50
|
createdAt: Date | string;
|
package/helpers/intl.d.ts
CHANGED
|
@@ -155,6 +155,9 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
155
155
|
discussionFormCard_overlay_cta_continue: string;
|
|
156
156
|
discussion_form_postType_label: string;
|
|
157
157
|
'discussion_form__postType_no-category': string;
|
|
158
|
+
discussion_form_isAnonymous_label: string;
|
|
159
|
+
discussion_form_isAnonymous_tooltip_content: string;
|
|
160
|
+
discussion_form_member_anonymous_infoMsg: string;
|
|
158
161
|
discussion_form_title: string;
|
|
159
162
|
discussion_form_titleField_label: string;
|
|
160
163
|
discussion_form_titleField_placeholder: string;
|
|
@@ -508,6 +511,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
508
511
|
header_buttons_login: string;
|
|
509
512
|
header_buttons_signup: string;
|
|
510
513
|
header_language_unavailable_en: string;
|
|
514
|
+
header_language_unavailable_vi: string;
|
|
511
515
|
'header_language_unavailable_sr-Cyrl': string;
|
|
512
516
|
header_language_unavailable_de: string;
|
|
513
517
|
'header_language_unavailable_fr-CA': string;
|