@apolitical/component-library 5.3.2-ac.3 → 5.3.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/add-post/add-post.d.ts +0 -3
- package/discussion/components/form/form.type.d.ts +0 -5
- package/discussion/components/post/post.d.ts +1 -6
- package/discussion/feeds/activities-feed/activities-feed.d.ts +0 -5
- package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +2 -5
- package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +0 -4
- package/discussion/sections/activity-section/activity-section.d.ts +0 -4
- package/discussion/sections/activity-section/mocks/activity-section.mock.d.ts +0 -1
- package/discussion/shared/helpers/activity.helper.d.ts +1 -3
- package/discussion/shared/interfaces/activity.interface.d.ts +0 -1
- package/discussion/shared/interfaces/discussion.interface.d.ts +0 -2
- package/discussion/shared/interfaces/index.d.ts +0 -1
- package/form/components/form/components/fields/checkbox/checkbox.d.ts +2 -2
- package/form/components/form/components/fields/input/input.d.ts +0 -5
- package/form/components/form/components/fields/multiple-options/multiple-options.d.ts +1 -1
- package/form/components/form/form.types.d.ts +0 -8
- package/helpers/intl.d.ts +0 -2
- package/index.js +59 -59
- package/index.mjs +6332 -6445
- package/navigation/filters/filters.d.ts +1 -5
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/base/_accessibility.scss +0 -1
- package/styles/base/_text.scss +1 -1
- package/styles/variables/colors/theme/_navigation.scss +4 -4
- package/discussion/shared/interfaces/community.category.interface.d.ts +0 -4
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { IDiscussionForm } from '../../../discussion/components/form';
|
|
3
|
-
import { ICategory } from '../../shared';
|
|
4
3
|
interface Props {
|
|
5
4
|
/** Whether the form should be displayed as a card */
|
|
6
5
|
isCard?: boolean;
|
|
@@ -8,8 +7,6 @@ interface Props {
|
|
|
8
7
|
parentId?: string;
|
|
9
8
|
/** Props for the form - this uses everything the `DiscussionForm` component does */
|
|
10
9
|
form: IDiscussionForm;
|
|
11
|
-
/** The categories to show in the form */
|
|
12
|
-
categories?: ICategory[];
|
|
13
10
|
/** Details about what a user needs to have to be able to access the form */
|
|
14
11
|
membershipRequiredToPost: {
|
|
15
12
|
/** Whether the user needs to be a member of the community to post */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ListMembers, ClickMentionFallback } from '../../../form';
|
|
2
2
|
import { DiscussionCreateContentFunction, IDiscussionContent, IListMemberData, IMentions } from './../../discussion';
|
|
3
|
-
import { ICategory } from '../../shared';
|
|
4
3
|
export interface IDiscussionFormMeta {
|
|
5
4
|
/** Whether the form data is still loading */
|
|
6
5
|
isLoading?: boolean;
|
|
@@ -24,10 +23,6 @@ export interface IDiscussionFormMeta {
|
|
|
24
23
|
};
|
|
25
24
|
/** Whether title text should show above the form */
|
|
26
25
|
showTitle?: boolean;
|
|
27
|
-
/** What category options should be made available for the form */
|
|
28
|
-
postCategories?: ICategory[];
|
|
29
|
-
/** Whether the post type should show */
|
|
30
|
-
showPostType?: boolean;
|
|
31
26
|
/** Whether the community guidelines text should show beneath the form */
|
|
32
27
|
showGuidelines?: boolean;
|
|
33
28
|
/** Whether to show a divider before the buttons */
|
|
@@ -87,15 +87,10 @@ export interface IDiscussionPostProps {
|
|
|
87
87
|
isCommunity?: boolean;
|
|
88
88
|
/** Whether to show badges and the scope of the badge */
|
|
89
89
|
badges?: IBadgesOption;
|
|
90
|
-
/** Categories for the community */
|
|
91
|
-
categories?: {
|
|
92
|
-
name: string;
|
|
93
|
-
slug: string;
|
|
94
|
-
}[];
|
|
95
90
|
/** The base path, used for slugs */
|
|
96
91
|
basePath: string;
|
|
97
92
|
/** The ID of the parent, used for slugs */
|
|
98
93
|
parentId: string;
|
|
99
94
|
}
|
|
100
|
-
declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, styling: { showShareLinkButton, showMoreMenuButton }, setFocus, isCommunity, badges,
|
|
95
|
+
declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, styling: { showShareLinkButton, showMoreMenuButton }, setFocus, isCommunity, badges, basePath, parentId, }: IDiscussionPostProps) => import("react/jsx-runtime").JSX.Element;
|
|
101
96
|
export default Post;
|
|
@@ -12,11 +12,6 @@ interface Props {
|
|
|
12
12
|
isMember: boolean;
|
|
13
13
|
/** Whether the user is an owner of the community */
|
|
14
14
|
isOwner: boolean;
|
|
15
|
-
/** The categories for the community */
|
|
16
|
-
categories: {
|
|
17
|
-
name: string;
|
|
18
|
-
slug: string;
|
|
19
|
-
}[];
|
|
20
15
|
/** Functions for the activities query */
|
|
21
16
|
functions: {
|
|
22
17
|
/** Query functions for the activities */
|
|
@@ -3,12 +3,9 @@ import type { ICache, ICachePage } from '../..';
|
|
|
3
3
|
export interface IListActivitiesArgs {
|
|
4
4
|
queryFn: (_: unknown) => Promise<ICachePage>;
|
|
5
5
|
queryKey: QueryKey;
|
|
6
|
-
|
|
7
|
-
id: string;
|
|
8
|
-
type: string;
|
|
9
|
-
};
|
|
6
|
+
rankingMethod?: string;
|
|
10
7
|
}
|
|
11
|
-
export declare function useListActivities({ queryFn, queryKey,
|
|
8
|
+
export declare function useListActivities({ queryFn, queryKey, rankingMethod, }: IListActivitiesArgs): {
|
|
12
9
|
activities: import('../../../../../../discussion/shared').IActivity[];
|
|
13
10
|
error: Error | null;
|
|
14
11
|
isLoading: boolean;
|
|
@@ -16,7 +16,6 @@ export declare const activitiesFeedMock: {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
title: string;
|
|
19
|
-
categories: string[];
|
|
20
19
|
content: string;
|
|
21
20
|
feed_id: string;
|
|
22
21
|
foreign_id: string;
|
|
@@ -125,7 +124,6 @@ export declare const activitiesFeedMock: {
|
|
|
125
124
|
};
|
|
126
125
|
};
|
|
127
126
|
title: string;
|
|
128
|
-
categories: string[];
|
|
129
127
|
content: string;
|
|
130
128
|
feed_id: string;
|
|
131
129
|
foreign_id: string;
|
|
@@ -157,7 +155,6 @@ export declare const activitiesFeedMock: {
|
|
|
157
155
|
badges?: undefined;
|
|
158
156
|
};
|
|
159
157
|
};
|
|
160
|
-
categories: string[];
|
|
161
158
|
content: string;
|
|
162
159
|
feed_id: string;
|
|
163
160
|
foreign_id: string;
|
|
@@ -232,7 +229,6 @@ export declare const activitiesFeedMock: {
|
|
|
232
229
|
target: string;
|
|
233
230
|
time: string;
|
|
234
231
|
verb: string;
|
|
235
|
-
categories?: undefined;
|
|
236
232
|
})[];
|
|
237
233
|
next: string;
|
|
238
234
|
duration: string;
|
|
@@ -22,10 +22,6 @@ export interface IActivitySectionProps {
|
|
|
22
22
|
leave: () => Promise<void>;
|
|
23
23
|
};
|
|
24
24
|
profile: IProfileFormProps;
|
|
25
|
-
categories?: {
|
|
26
|
-
name: string;
|
|
27
|
-
slug: string;
|
|
28
|
-
}[];
|
|
29
25
|
}
|
|
30
26
|
declare const ActivitySection: React.FC<IActivitySectionProps>;
|
|
31
27
|
export default ActivitySection;
|
|
@@ -3,7 +3,6 @@ import type { IActivity, IReaction } from '..';
|
|
|
3
3
|
interface IPrepareActivityArgs {
|
|
4
4
|
title?: string;
|
|
5
5
|
content?: string;
|
|
6
|
-
categories?: string;
|
|
7
6
|
}
|
|
8
7
|
interface IEnrichActivityArgs {
|
|
9
8
|
activity: IActivity | Partial<IActivity>;
|
|
@@ -18,10 +17,9 @@ interface IDecrementActivityLikesArgs {
|
|
|
18
17
|
activity: IActivity;
|
|
19
18
|
user?: IUserContext;
|
|
20
19
|
}
|
|
21
|
-
export declare function prepareActivity({ title, content
|
|
20
|
+
export declare function prepareActivity({ title, content }: IPrepareActivityArgs): {
|
|
22
21
|
title: string | undefined;
|
|
23
22
|
content: string | undefined;
|
|
24
|
-
categories: string[];
|
|
25
23
|
id: string;
|
|
26
24
|
time: string;
|
|
27
25
|
verb: string;
|
|
@@ -24,8 +24,6 @@ export interface IFullDiscussionContent extends IDiscussionContent {
|
|
|
24
24
|
body?: string;
|
|
25
25
|
/** The author of the post */
|
|
26
26
|
author: MemberProps;
|
|
27
|
-
/** The post categories */
|
|
28
|
-
categories?: string[];
|
|
29
27
|
createdAt: Date | string;
|
|
30
28
|
/** The number of likes to display */
|
|
31
29
|
likes?: number;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IField } from '../../../form.types';
|
|
3
|
-
export declare const Checkbox: ({ className, disabled, element, functions: allFunctions, id, inputRef: ref, intlPath, label, shownValue: value, type, value: isChecked,
|
|
3
|
+
export declare const Checkbox: ({ className, disabled, element, functions: allFunctions, id, inputRef: ref, intlPath, label, shownValue: value, type, value: isChecked, ...props }: IField) => React.DOMElement<{
|
|
4
4
|
onMultiSelectSubmit?: ((arg1: import("../../../form.types").FormValues) => void) | undefined;
|
|
5
5
|
onBlur?: (() => void) | undefined;
|
|
6
6
|
onFocus?: (() => void) | undefined;
|
|
7
7
|
onKeyInput?: (<T>(arg1: import("../../../form.types").FormValues) => Promise<T>) | undefined;
|
|
8
|
-
onKeyDown
|
|
8
|
+
onKeyDown?: ((e: React.KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
9
9
|
submitForm?: ((arg: import("../../../form.types").IFormValues) => void) | undefined;
|
|
10
10
|
'aria-describedby'?: string | undefined;
|
|
11
11
|
'aria-errormessage'?: string | undefined;
|
|
@@ -15,11 +15,6 @@ export declare const Input: ({ className, element, id, inputRef: ref, functions,
|
|
|
15
15
|
value: InputValues;
|
|
16
16
|
placeholder: string | undefined;
|
|
17
17
|
autoFocus: boolean | undefined;
|
|
18
|
-
accessibilityOptions?: {
|
|
19
|
-
checkboxes?: {
|
|
20
|
-
navigateWithArrowKeys?: boolean | undefined;
|
|
21
|
-
} | undefined;
|
|
22
|
-
} | undefined;
|
|
23
18
|
'aria-describedby'?: string | undefined;
|
|
24
19
|
'aria-errormessage'?: string | undefined;
|
|
25
20
|
'aria-invalid'?: boolean | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IField } from '../../../form.types';
|
|
2
|
-
export declare const MultipleOptions: ({ className, functions, intlPath, id: groupId, label, multiSelect, name, options, required, type, value,
|
|
2
|
+
export declare const MultipleOptions: ({ className, functions, intlPath, id: groupId, label, multiSelect, name, options, required, type, value, ...props }: IField) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultipleOptions;
|
|
@@ -82,14 +82,6 @@ export interface IFieldFunctions {
|
|
|
82
82
|
submitForm?: (arg: IFormValues) => void;
|
|
83
83
|
}
|
|
84
84
|
export interface IField {
|
|
85
|
-
/** Additional accessibility configuration */
|
|
86
|
-
accessibilityOptions?: {
|
|
87
|
-
/** Additional options for checkboxes */
|
|
88
|
-
checkboxes?: {
|
|
89
|
-
/** Whether the field should be navigable with arrow keys */
|
|
90
|
-
navigateWithArrowKeys?: boolean;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
85
|
/** Optional ID of the element which describes this field, for screen readers */
|
|
94
86
|
'aria-describedby'?: string;
|
|
95
87
|
/** Optional ID of the element which provides an error message for this field */
|
package/helpers/intl.d.ts
CHANGED
|
@@ -127,8 +127,6 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
127
127
|
discussionFormCard_overlay_text: string;
|
|
128
128
|
discussionFormCard_overlay_cta_discard: string;
|
|
129
129
|
discussionFormCard_overlay_cta_continue: string;
|
|
130
|
-
discussion_form_postType_label: string;
|
|
131
|
-
'discussion_form__postType_no-category': string;
|
|
132
130
|
discussion_form_title: string;
|
|
133
131
|
discussion_form_titleField_label: string;
|
|
134
132
|
discussion_form_titleField_placeholder: string;
|