@apolitical/component-library 1.8.0-beta.0 → 1.8.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/context/index.d.ts +0 -1
- package/context/user/user.context.d.ts +0 -2
- package/discussion/{components/form → form}/form.d.ts +4 -2
- package/discussion/index.d.ts +6 -3
- package/discussion/{components/likes → likes}/likes.d.ts +3 -3
- package/discussion/{components/likes → likes}/likes.helpers.d.ts +1 -1
- package/discussion/{components/post → post}/post.d.ts +4 -2
- package/general/buttons/button/button.d.ts +1 -1
- package/index.js +101 -1
- package/index.mjs +19591 -77
- package/navigation/breadcrumbs/breadcrumbs.d.ts +3 -1
- package/package.json +2 -4
- package/style.css +1 -1
- package/styles/base/_links.scss +1 -1
- package/text/markdown-text/components/index.d.ts +1 -0
- package/text/markdown-text/components/span/index.d.ts +1 -0
- package/text/markdown-text/components/span/span.d.ts +5 -0
- package/text/markdown-text/index.d.ts +1 -0
- package/4TNE5QTO-808bed4c.js +0 -987
- package/4TNE5QTO-ebb3b7dd.mjs +0 -9077
- package/context/react-query/index.d.ts +0 -1
- package/context/react-query/react-query.provider.d.ts +0 -7
- package/discussion/components/add-post/add-post.d.ts +0 -16
- package/discussion/components/add-post/index.d.ts +0 -1
- package/discussion/components/index.d.ts +0 -7
- package/discussion/feeds/activities-feed/activities-feed.d.ts +0 -24
- package/discussion/feeds/activities-feed/activities-feed.handlers.d.ts +0 -28
- package/discussion/feeds/activities-feed/activities-feed.helpers.d.ts +0 -23
- package/discussion/feeds/activities-feed/activities-feed.mock.d.ts +0 -318
- package/discussion/feeds/activities-feed/index.d.ts +0 -1
- package/discussion/feeds/index.d.ts +0 -2
- package/discussion/feeds/replies-feed/index.d.ts +0 -1
- package/discussion/feeds/replies-feed/replies-feed.d.ts +0 -24
- package/discussion/feeds/replies-feed/replies-feed.handlers.d.ts +0 -81
- package/discussion/feeds/replies-feed/replies-feed.mock.d.ts +0 -2
- package/discussion/sections/activity-section/activity-section.d.ts +0 -32
- package/discussion/sections/activity-section/activity-section.handlers.d.ts +0 -58
- package/discussion/sections/activity-section/activity.mock.d.ts +0 -2
- package/discussion/sections/activity-section/index.d.ts +0 -1
- package/discussion/sections/index.d.ts +0 -1
- package/index-83c4dbce.js +0 -101
- package/index-d78dd523.mjs +0 -23254
- /package/discussion/{components/conversation → conversation}/conversation.d.ts +0 -0
- /package/discussion/{components/conversation → conversation}/index.d.ts +0 -0
- /package/discussion/{components/form → form}/index.d.ts +0 -0
- /package/discussion/{components/likes → likes}/index.d.ts +0 -0
- /package/discussion/{components/post → post}/index.d.ts +0 -0
- /package/discussion/{components/post → post}/post.mock.d.ts +0 -0
- /package/discussion/{components/responses-heading → responses-heading}/index.d.ts +0 -0
- /package/discussion/{components/responses-heading → responses-heading}/responses-heading.d.ts +0 -0
- /package/discussion/{components/thread → thread}/index.d.ts +0 -0
- /package/discussion/{components/thread → thread}/thread.d.ts +0 -0
package/context/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DiscussionCreateContentFunction, IDiscussionContent } from '
|
|
2
|
+
import { DiscussionCreateContentFunction, IDiscussionContent } from './../discussion';
|
|
3
3
|
interface Props {
|
|
4
4
|
/** Information about the content being created/edited */
|
|
5
5
|
content: IDiscussionContent;
|
|
6
|
+
/** If the user has permission to interact with the form, e.g. if they're a member of the community */
|
|
7
|
+
userHasPermissions?: boolean;
|
|
6
8
|
/** Information about the form */
|
|
7
9
|
meta?: {
|
|
8
10
|
/** Whether the form data is still loading */
|
|
@@ -46,5 +48,5 @@ interface Props {
|
|
|
46
48
|
/** The language to use for the text */
|
|
47
49
|
locale?: string;
|
|
48
50
|
}
|
|
49
|
-
declare const Form: ({ content, meta, inputRef, maxLength, minRows, forceShow, functions, gtmContext, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare const Form: ({ content, userHasPermissions, meta, inputRef, maxLength, minRows, forceShow, functions, gtmContext, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
50
52
|
export default Form;
|
package/discussion/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
1
|
+
export * from './conversation';
|
|
2
|
+
export * from './form';
|
|
3
|
+
export * from './likes';
|
|
4
|
+
export * from './post';
|
|
5
|
+
export * from './responses-heading';
|
|
6
|
+
export * from './thread';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MemberProps } from '
|
|
3
|
-
import { IDiscussionContent } from '
|
|
2
|
+
import { MemberProps } from '../../user';
|
|
3
|
+
import { IDiscussionContent } from './../discussion';
|
|
4
4
|
interface Props {
|
|
5
5
|
/** The element to render around the content */
|
|
6
6
|
element?: 'li' | 'div';
|
|
@@ -26,7 +26,7 @@ interface Props {
|
|
|
26
26
|
/** The language to use for the text */
|
|
27
27
|
locale?: string;
|
|
28
28
|
}
|
|
29
|
-
declare const Likes: ({ element, likes, peopleWhoLiked, isShort, userLiked, content, canLike, functions: { createLike, deleteLike }
|
|
29
|
+
declare const Likes: ({ element, likes, peopleWhoLiked, isShort, userLiked, content, canLike, functions: { createLike, deleteLike } }: Props) => React.DetailedReactHTMLElement<{
|
|
30
30
|
className: string;
|
|
31
31
|
onClick: (e: React.MouseEvent<HTMLElement>) => false | undefined;
|
|
32
32
|
onMouseEnter: () => void;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DiscussionCreateContentFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, IFullDiscussionContent } from '
|
|
2
|
+
import { DiscussionCreateContentFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, IFullDiscussionContent } from './../discussion';
|
|
3
3
|
interface Props {
|
|
4
4
|
/** The element that will render around the content */
|
|
5
5
|
element?: 'li' | 'div' | 'section' | 'article';
|
|
6
6
|
/** Information about the content being posted */
|
|
7
7
|
content: IFullDiscussionContent;
|
|
8
|
+
/** If the user has permission to interact with the post box and content, e.g. if they're a member of the community */
|
|
9
|
+
userHasPermissions?: boolean;
|
|
8
10
|
/** If the post is still loading */
|
|
9
11
|
isLoading?: boolean;
|
|
10
12
|
/** The ID of the original post author, for threads */
|
|
@@ -44,5 +46,5 @@ interface Props {
|
|
|
44
46
|
/** The language for the text */
|
|
45
47
|
locale?: string;
|
|
46
48
|
}
|
|
47
|
-
declare const Post: ({ element, content, isLoading, originalAuthorId, functions: { content: { createContent, deleteContent, updateContent }, likes: { createLike, deleteLike }, comments: { openComments }, }, links, className, gtmContext,
|
|
49
|
+
declare const Post: ({ element, content, userHasPermissions, isLoading, originalAuthorId, functions: { content: { createContent, deleteContent, updateContent }, likes: { createLike, deleteLike }, comments: { openComments }, }, links, className, gtmContext, children, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
48
50
|
export default Post;
|
|
@@ -7,7 +7,7 @@ export type ButtonIconType = false | string | {
|
|
|
7
7
|
animate?: true | string;
|
|
8
8
|
};
|
|
9
9
|
export interface ButtonSizeType {
|
|
10
|
-
[key: string]: 'large' | 'medium' | 'small';
|
|
10
|
+
[key: string | number]: 'large' | 'medium' | 'small';
|
|
11
11
|
}
|
|
12
12
|
export type ButtonVariantType = 'primary' | 'secondary' | 'tertiary';
|
|
13
13
|
export interface ButtonPropsType {
|