@apolitical/component-library 6.1.2-ac.0 → 6.1.3-ac.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.
@@ -1,3 +1,3 @@
1
1
  export type { IDiscussionPostProps, IPostContent } from './post';
2
2
  export { default as DiscussionPost } from './post';
3
- export { getPostBody } from './post.helpers';
3
+ export { getPostBody, enrichPostCategories } from './post.helpers';
@@ -84,15 +84,10 @@ 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
- }[];
92
87
  /** The base path, used for slugs */
93
88
  basePath: string;
94
89
  /** The ID of the parent, used for slugs */
95
90
  parentId: string;
96
91
  }
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;
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;
98
93
  export default Post;
@@ -1,3 +1,5 @@
1
1
  import { IMentions } from './../../discussion';
2
2
  import { ListMembers } from '../../../form';
3
+ import { ICategory } from '../../shared';
3
4
  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,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type IProfileFormProps } from '../../../form';
3
+ import { ICategory } from '../../../discussion/shared';
3
4
  import type { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
4
5
  import type { IDiscussionFormFns } from '../../../discussion/discussion.d';
5
6
  import { type IQueryFns } from './cache';
@@ -13,10 +14,7 @@ interface Props {
13
14
  /** Whether the user is an owner of the community */
14
15
  isOwner: boolean;
15
16
  /** The categories for the community */
16
- categories: {
17
- name: string;
18
- slug: string;
19
- }[];
17
+ categories: ICategory[];
20
18
  /** Functions for the activities query */
21
19
  functions: {
22
20
  /** Query functions for the activities */
@@ -3,6 +3,7 @@ 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';
6
7
  interface IActivitySectionQueryFns extends IQueryFns {
7
8
  remove: () => Promise<void>;
8
9
  }
@@ -21,10 +22,7 @@ export interface IActivitySectionProps {
21
22
  leave: () => Promise<void>;
22
23
  };
23
24
  profile: IProfileFormProps;
24
- categories?: {
25
- name: string;
26
- slug: string;
27
- }[];
25
+ categories?: ICategory[];
28
26
  }
29
27
  declare const ActivitySection: React.FC<IActivitySectionProps>;
30
28
  export default ActivitySection;
@@ -1,6 +1,7 @@
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';
4
5
  export type IDiscussionContentType = 'answer' | 'post' | 'response' | 'reply' | 'question';
5
6
  export interface IDiscussionContent {
6
7
  /** The type of content */
@@ -26,7 +27,7 @@ export interface IFullDiscussionContent extends IDiscussionContent {
26
27
  /** The author of the post */
27
28
  author: MemberProps;
28
29
  /** The post categories */
29
- categories?: string[];
30
+ categories?: ICategory[];
30
31
  createdAt: Date | string;
31
32
  /** The number of likes to display */
32
33
  likes?: number;
package/helpers/intl.d.ts CHANGED
@@ -171,7 +171,6 @@ export declare const checkIntlPathExists: (path: string, language?: {
171
171
  discussion_moreMenu_report: string;
172
172
  discussion_comments_screenReader: string;
173
173
  discussion_comments: string;
174
- discussion_comments_loading: string;
175
174
  discussion_responses_answer: string;
176
175
  discussion_responses_comment: string;
177
176
  discussion_responses_title: string;