@apolitical/component-library 6.1.3-ac.0 → 6.2.0-jc.0
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/index.d.ts +1 -1
- package/discussion/components/post/post.d.ts +6 -1
- package/discussion/components/post/post.helpers.d.ts +0 -2
- package/discussion/feeds/activities-feed/activities-feed.d.ts +4 -2
- package/discussion/sections/activity-section/activity-section.d.ts +4 -2
- package/discussion/shared/interfaces/discussion.interface.d.ts +1 -2
- package/form/components/form/form.types.d.ts +1 -1
- package/form/types/password-form/password-form.d.ts +3 -11
- package/index.js +42 -42
- package/index.mjs +7108 -7109
- package/package.json +1 -1
- package/text/pill/index.d.ts +1 -0
- package/text/pill/pill.d.ts +2 -2
- package/text/status-banner/index.d.ts +1 -0
- package/text/status-banner/status-banner.d.ts +2 -2
- package/user/badge/interface/badge.interfaces.d.ts +3 -3
- package/user/badges/badges.interface.d.ts +1 -1
|
@@ -84,10 +84,15 @@ export interface IDiscussionPostProps {
|
|
|
84
84
|
isCommunity?: boolean;
|
|
85
85
|
/** Whether to show badges and the scope of the badge */
|
|
86
86
|
badges?: IBadgesOption;
|
|
87
|
+
/** Categories for the community */
|
|
88
|
+
categories?: {
|
|
89
|
+
name: string;
|
|
90
|
+
slug: string;
|
|
91
|
+
}[];
|
|
87
92
|
/** The base path, used for slugs */
|
|
88
93
|
basePath: string;
|
|
89
94
|
/** The ID of the parent, used for slugs */
|
|
90
95
|
parentId: string;
|
|
91
96
|
}
|
|
92
|
-
declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, setFocus, isCommunity, badges, basePath, parentId, }: IDiscussionPostProps) => import("react/jsx-runtime").JSX.Element;
|
|
97
|
+
declare const Post: ({ element, content, userHasPermissions, userHasOwnerPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, setFocus, isCommunity, badges, categories, basePath, parentId, }: IDiscussionPostProps) => import("react/jsx-runtime").JSX.Element;
|
|
93
98
|
export default Post;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { IMentions } from './../../discussion';
|
|
2
2
|
import { ListMembers } from '../../../form';
|
|
3
|
-
import { ICategory } from '../../shared';
|
|
4
3
|
export declare const getPostBody: (body: string, isTruncated: boolean | number, mentions?: IMentions, listMembers?: ListMembers) => Promise<string>;
|
|
5
|
-
export declare const enrichPostCategories: (postCategories: string[], allCategories: ICategory[]) => (ICategory | undefined)[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type IProfileFormProps } from '../../../form';
|
|
3
|
-
import { ICategory } from '../../../discussion/shared';
|
|
4
3
|
import type { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
|
|
5
4
|
import type { IDiscussionFormFns } from '../../../discussion/discussion.d';
|
|
6
5
|
import { type IQueryFns } from './cache';
|
|
@@ -14,7 +13,10 @@ interface Props {
|
|
|
14
13
|
/** Whether the user is an owner of the community */
|
|
15
14
|
isOwner: boolean;
|
|
16
15
|
/** The categories for the community */
|
|
17
|
-
categories:
|
|
16
|
+
categories: {
|
|
17
|
+
name: string;
|
|
18
|
+
slug: string;
|
|
19
|
+
}[];
|
|
18
20
|
/** Functions for the activities query */
|
|
19
21
|
functions: {
|
|
20
22
|
/** Query functions for the activities */
|
|
@@ -3,7 +3,6 @@ import { type IProfileFormProps } from '../../../form';
|
|
|
3
3
|
import { type IRepliesFeedQueryFns, type ILikesFeedQueryFns } from '../../../discussion/feeds';
|
|
4
4
|
import type { IDiscussionFormFns } from './../../discussion.d';
|
|
5
5
|
import { type IQueryFns } from './cache';
|
|
6
|
-
import { ICategory } from '../../shared';
|
|
7
6
|
interface IActivitySectionQueryFns extends IQueryFns {
|
|
8
7
|
remove: () => Promise<void>;
|
|
9
8
|
}
|
|
@@ -22,7 +21,10 @@ export interface IActivitySectionProps {
|
|
|
22
21
|
leave: () => Promise<void>;
|
|
23
22
|
};
|
|
24
23
|
profile: IProfileFormProps;
|
|
25
|
-
categories?:
|
|
24
|
+
categories?: {
|
|
25
|
+
name: string;
|
|
26
|
+
slug: string;
|
|
27
|
+
}[];
|
|
26
28
|
}
|
|
27
29
|
declare const ActivitySection: React.FC<IActivitySectionProps>;
|
|
28
30
|
export default ActivitySection;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MemberProps, MemberDetailsProps } from '../../../user';
|
|
2
2
|
import type { ListMembers, ClickMentionFallback } from '../../../form';
|
|
3
3
|
import type { IEnrichedUrlData } from '../../../navigation';
|
|
4
|
-
import { ICategory } from './community.category.interface';
|
|
5
4
|
export type IDiscussionContentType = 'answer' | 'post' | 'response' | 'reply' | 'question';
|
|
6
5
|
export interface IDiscussionContent {
|
|
7
6
|
/** The type of content */
|
|
@@ -27,7 +26,7 @@ export interface IFullDiscussionContent extends IDiscussionContent {
|
|
|
27
26
|
/** The author of the post */
|
|
28
27
|
author: MemberProps;
|
|
29
28
|
/** The post categories */
|
|
30
|
-
categories?:
|
|
29
|
+
categories?: string[];
|
|
31
30
|
createdAt: Date | string;
|
|
32
31
|
/** The number of likes to display */
|
|
33
32
|
likes?: number;
|
|
@@ -13,7 +13,7 @@ export interface ILabel {
|
|
|
13
13
|
htmlFor?: string;
|
|
14
14
|
}
|
|
15
15
|
export type FormActionTypes = 'addError' | 'formSubmitted' | 'formSubmittedAndReset' | 'removeError' | 'submitForm' | 'updateValue';
|
|
16
|
-
export type FieldValidationConditions = boolean | 'no-numbers' | 'required' | 'valid-email' | 'valid-url' | 'custom-validation' | ((arg: IFormValues) => boolean);
|
|
16
|
+
export type FieldValidationConditions = boolean | 'no-numbers' | 'required' | 'valid-email' | 'valid-url' | 'custom-validation' | ((arg: IFormValues) => boolean | null | string);
|
|
17
17
|
export interface IFieldOption {
|
|
18
18
|
/** The ID of the option */
|
|
19
19
|
id: string;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface IPasswordFormProps {
|
|
2
|
+
import type { IFormProps, IFormValues } from '../../components/form/form.types';
|
|
3
|
+
export interface IPasswordFormProps extends Omit<IFormProps, 'id' | 'fields'> {
|
|
4
4
|
/** Indicated for whether to show the current password field */
|
|
5
5
|
isPasswordChange?: boolean;
|
|
6
6
|
/** The functions being passed to the form */
|
|
7
|
-
functions: {
|
|
7
|
+
functions: IFormProps['functions'] & {
|
|
8
8
|
/** The function to call to create the password */
|
|
9
9
|
createPassword: (arg: IFormValues) => Promise<void>;
|
|
10
|
-
/** The function to call when onSuccess fails */
|
|
11
|
-
onCatch?: (error?: unknown) => void;
|
|
12
|
-
/** The function to call when the form submission fails */
|
|
13
|
-
onFailure?: (arg: IFormValues, arg2?: FormValues) => void;
|
|
14
|
-
/** The function to call when the form is successfully submitted */
|
|
15
|
-
onSuccess?: (arg: IFormValues) => Promise<void>;
|
|
16
|
-
/** The function to call when the cancel button is clicked */
|
|
17
|
-
onCancel?: () => void;
|
|
18
10
|
};
|
|
19
11
|
/** Specify custom text for the submit button */
|
|
20
12
|
button?: {
|