@apolitical/component-library 6.1.2 → 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/form/form.type.d.ts +21 -2
- package/discussion/components/form/index.d.ts +1 -1
- package/discussion/feeds/replies-feed/cache/hooks/feed/index.d.ts +0 -1
- package/discussion/feeds/replies-feed/mocks/index.d.ts +0 -1
- package/discussion/feeds/replies-feed/{components/nested-replies-feed → nested-replies-feed}/nested-replies-feed.d.ts +3 -3
- package/discussion/feeds/replies-feed/replies-feed.d.ts +2 -4
- package/discussion/sections/activity-section/mocks/activity-section.mock.d.ts +39 -45
- package/discussion/sections/activity-section/mocks/index.d.ts +0 -1
- package/discussion/shared/interfaces/discussion.interface.d.ts +0 -19
- package/form/components/form/form.types.d.ts +1 -1
- package/form/types/password-form/password-form.d.ts +3 -11
- package/helpers/intl.d.ts +0 -1
- package/index.js +36 -36
- package/index.mjs +7604 -7717
- 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/discussion/feeds/replies-feed/cache/hooks/feed/parse-replies/index.d.ts +0 -1
- package/discussion/feeds/replies-feed/cache/hooks/feed/parse-replies/mocks/index.d.ts +0 -2
- package/discussion/feeds/replies-feed/cache/hooks/feed/parse-replies/mocks/replies.mock.d.ts +0 -2
- package/discussion/feeds/replies-feed/cache/hooks/feed/parse-replies/mocks/user.mock.d.ts +0 -4
- package/discussion/feeds/replies-feed/cache/hooks/feed/parse-replies/parse-replies.d.ts +0 -28
- package/discussion/feeds/replies-feed/components/add-reply-form/add-reply-form.d.ts +0 -16
- package/discussion/feeds/replies-feed/components/add-reply-form/index.d.ts +0 -1
- package/discussion/feeds/replies-feed/components/index.d.ts +0 -3
- package/discussion/feeds/replies-feed/components/load-more-replies-button/index.d.ts +0 -1
- package/discussion/feeds/replies-feed/components/load-more-replies-button/load-more-replies-button.d.ts +0 -13
- package/discussion/feeds/replies-feed/components/reply-item/index.d.ts +0 -1
- package/discussion/feeds/replies-feed/components/reply-item/reply-item.d.ts +0 -26
- package/discussion/feeds/replies-feed/mocks/parsed-replies-feed.mock.d.ts +0 -13
- package/discussion/sections/activity-section/activity-section.helpers.d.ts +0 -2
- package/discussion/sections/activity-section/activity-section.mock.d.ts +0 -103
- package/discussion/sections/activity-section/mocks/activity-functions.mock.d.ts +0 -46
- /package/discussion/feeds/replies-feed/{components/nested-replies-feed → nested-replies-feed}/index.d.ts +0 -0
- /package/discussion/feeds/replies-feed/{components/nested-replies-feed → nested-replies-feed}/mocks/index.d.ts +0 -0
- /package/discussion/feeds/replies-feed/{components/nested-replies-feed → nested-replies-feed}/mocks/nested-replies-feed.mock.d.ts +0 -0
package/package.json
CHANGED
package/text/pill/index.d.ts
CHANGED
package/text/pill/pill.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface
|
|
2
|
+
export interface IPillProps {
|
|
3
3
|
/** The element to render the pill as; defaults to span. */
|
|
4
4
|
element?: 'span' | 'li';
|
|
5
5
|
/** The size of the pill */
|
|
@@ -20,7 +20,7 @@ interface Props {
|
|
|
20
20
|
/** Optional test ID */
|
|
21
21
|
'data-testid'?: string;
|
|
22
22
|
}
|
|
23
|
-
declare const Pill: ({ size, variant, className, icon, tooltip, children, element, ...props }:
|
|
23
|
+
declare const Pill: ({ size, variant, className, icon, tooltip, children, element, ...props }: IPillProps) => React.DetailedReactHTMLElement<{
|
|
24
24
|
className: string;
|
|
25
25
|
}, HTMLElement>;
|
|
26
26
|
export default Pill;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface
|
|
2
|
+
export interface IStatusBannerProps {
|
|
3
3
|
/** The element that will render around the content */
|
|
4
4
|
element?: 'span' | 'small' | 'strong' | 'em' | 'p' | 'li';
|
|
5
5
|
/** The content to be hidden from screen readers */
|
|
@@ -11,7 +11,7 @@ interface Props {
|
|
|
11
11
|
/** Test ID for Jest tests */
|
|
12
12
|
'data-testid'?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const StatusBanner: ({ element, children, className, ...props }:
|
|
14
|
+
declare const StatusBanner: ({ element, children, className, ...props }: IStatusBannerProps) => React.DetailedReactHTMLElement<{
|
|
15
15
|
className: string;
|
|
16
16
|
'aria-live': "assertive";
|
|
17
17
|
/** Optional ID, for errors */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './parse-replies';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IUserContext } from '../../../../../../../context';
|
|
2
|
-
import { IMentions, IReaction } from '../../../../../../../discussion/shared';
|
|
3
|
-
import { DefaultGenerics, EnrichedUser } from 'getstream';
|
|
4
|
-
interface ExtractedReplyData {
|
|
5
|
-
mentions?: IMentions;
|
|
6
|
-
[key: string]: unknown;
|
|
7
|
-
}
|
|
8
|
-
export interface IParsedReplies {
|
|
9
|
-
body: string;
|
|
10
|
-
data: ExtractedReplyData;
|
|
11
|
-
likeId: string;
|
|
12
|
-
liked: boolean;
|
|
13
|
-
likes: number;
|
|
14
|
-
peopleWhoLiked: {
|
|
15
|
-
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
}[] | false;
|
|
18
|
-
replyId: string;
|
|
19
|
-
userLiked: boolean;
|
|
20
|
-
createdAt: string;
|
|
21
|
-
parent: string;
|
|
22
|
-
user: EnrichedUser<DefaultGenerics> | undefined;
|
|
23
|
-
}
|
|
24
|
-
export declare function parseReplies({ replies, user, }: {
|
|
25
|
-
replies: IReaction[];
|
|
26
|
-
user: IUserContext;
|
|
27
|
-
}): IParsedReplies[];
|
|
28
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IDiscussionFormFunctions } from '../../../../../discussion/shared';
|
|
3
|
-
interface Props {
|
|
4
|
-
/** Whether the user is a member of the community */
|
|
5
|
-
isMember: boolean;
|
|
6
|
-
/** The ID of the parent, used for slugs */
|
|
7
|
-
parentId: string;
|
|
8
|
-
/** Query functions for the mentions */
|
|
9
|
-
formFunctions: IDiscussionFormFunctions;
|
|
10
|
-
/** Function to join the community */
|
|
11
|
-
join: () => Promise<void>;
|
|
12
|
-
/** Function to leave the community */
|
|
13
|
-
leave: () => Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
export default function AddReplyForm({ parentId, isMember, formFunctions, leave, join, }: Props): JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as AddReplyForm } from './add-reply-form';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as LoadMoreRepliesButton } from './load-more-replies-button';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface Props {
|
|
3
|
-
/** Whether there is a next page */
|
|
4
|
-
hasNextPage: boolean;
|
|
5
|
-
/** Function to fetch the next page */
|
|
6
|
-
fetchNextPage: () => void;
|
|
7
|
-
/** The index to focus on */
|
|
8
|
-
setFocusReplyIndex: (index: number) => void;
|
|
9
|
-
/** The total number of replies */
|
|
10
|
-
totalReplies: number;
|
|
11
|
-
}
|
|
12
|
-
export default function LoadMoreRepliesButton({ hasNextPage, fetchNextPage, setFocusReplyIndex, totalReplies, }: Props): JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ReplyItem } from './reply-item';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ILikesFeedQueryFns } from '../../../../../discussion/feeds/likes-feed';
|
|
3
|
-
import type { IDiscussionFormFns } from '../../../../discussion';
|
|
4
|
-
import type { IQueryFns, IParsedReplies } from '../../cache';
|
|
5
|
-
interface Props {
|
|
6
|
-
/** The ID of the activity the replies are for */
|
|
7
|
-
activityId: string;
|
|
8
|
-
/** The base path, used for slugs */
|
|
9
|
-
basePath: string;
|
|
10
|
-
/** The ID of the parent, used for slugs */
|
|
11
|
-
parentId: string;
|
|
12
|
-
/** Whether the user is a member of the community */
|
|
13
|
-
isMember: boolean;
|
|
14
|
-
/** The reply data */
|
|
15
|
-
reply: IParsedReplies;
|
|
16
|
-
/** Whether to show the replies */
|
|
17
|
-
focus: boolean;
|
|
18
|
-
/** Functions for the replies query */
|
|
19
|
-
formFns: {
|
|
20
|
-
form: IDiscussionFormFns;
|
|
21
|
-
reactions: IQueryFns;
|
|
22
|
-
likes: ILikesFeedQueryFns;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export default function ReplyItem({ formFns, activityId, basePath, focus, isMember, parentId, reply, }: Props): JSX.Element;
|
|
26
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const parsedRepliesMock: {
|
|
2
|
-
user: string;
|
|
3
|
-
body: string;
|
|
4
|
-
createdAt: string;
|
|
5
|
-
data: {};
|
|
6
|
-
likeId: string;
|
|
7
|
-
liked: boolean;
|
|
8
|
-
likes: number;
|
|
9
|
-
peopleWhoLiked: never[];
|
|
10
|
-
replyId: string;
|
|
11
|
-
parent: string;
|
|
12
|
-
userLiked: boolean;
|
|
13
|
-
}[];
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import type { IActivity, IReaction } from '../../shared';
|
|
2
|
-
import { type IMention } from '../../../form';
|
|
3
|
-
export declare const functions: {
|
|
4
|
-
activities: {
|
|
5
|
-
read: () => Promise<IActivity>;
|
|
6
|
-
edit: () => Promise<IActivity>;
|
|
7
|
-
like: () => Promise<IReaction>;
|
|
8
|
-
remove: () => Promise<void>;
|
|
9
|
-
unlike: () => Promise<IReaction>;
|
|
10
|
-
pin: () => Promise<IReaction>;
|
|
11
|
-
unpin: () => Promise<IReaction>;
|
|
12
|
-
};
|
|
13
|
-
reactions: {
|
|
14
|
-
create: () => Promise<IReaction>;
|
|
15
|
-
edit: () => Promise<IReaction>;
|
|
16
|
-
like: () => Promise<IReaction>;
|
|
17
|
-
list: () => Promise<{
|
|
18
|
-
results: IReaction[];
|
|
19
|
-
next: string;
|
|
20
|
-
duration: string;
|
|
21
|
-
}>;
|
|
22
|
-
remove: () => Promise<void>;
|
|
23
|
-
unlike: () => Promise<IReaction>;
|
|
24
|
-
};
|
|
25
|
-
form: {
|
|
26
|
-
listMembers: () => Promise<IMention[]>;
|
|
27
|
-
clickMentionFallback: () => Promise<unknown>;
|
|
28
|
-
};
|
|
29
|
-
likes: {
|
|
30
|
-
list: () => Promise<{
|
|
31
|
-
results: never[];
|
|
32
|
-
next: string;
|
|
33
|
-
duration: string;
|
|
34
|
-
}>;
|
|
35
|
-
};
|
|
36
|
-
join: () => Promise<void>;
|
|
37
|
-
leave: () => Promise<void>;
|
|
38
|
-
};
|
|
39
|
-
export declare const args: {
|
|
40
|
-
basePath: string;
|
|
41
|
-
parentId: string;
|
|
42
|
-
activityId: string;
|
|
43
|
-
isMember: boolean;
|
|
44
|
-
isOwner: boolean;
|
|
45
|
-
profile: {
|
|
46
|
-
hooks: {
|
|
47
|
-
useMaps: () => {
|
|
48
|
-
buildLocation: (input: string) => Promise<{
|
|
49
|
-
id: string;
|
|
50
|
-
en: string;
|
|
51
|
-
code: string;
|
|
52
|
-
}>;
|
|
53
|
-
isValidPlace: (input: string) => boolean;
|
|
54
|
-
predictPlaces: (input: string) => Promise<never[]>;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
functions: {
|
|
58
|
-
uploadImage: () => Promise<void>;
|
|
59
|
-
onSuccess: () => Promise<void>;
|
|
60
|
-
onFailure: () => void;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
functions: {
|
|
64
|
-
activities: {
|
|
65
|
-
read: () => Promise<IActivity>;
|
|
66
|
-
edit: () => Promise<IActivity>;
|
|
67
|
-
like: () => Promise<IReaction>;
|
|
68
|
-
remove: () => Promise<void>;
|
|
69
|
-
unlike: () => Promise<IReaction>;
|
|
70
|
-
pin: () => Promise<IReaction>;
|
|
71
|
-
unpin: () => Promise<IReaction>;
|
|
72
|
-
};
|
|
73
|
-
reactions: {
|
|
74
|
-
create: () => Promise<IReaction>;
|
|
75
|
-
edit: () => Promise<IReaction>;
|
|
76
|
-
like: () => Promise<IReaction>;
|
|
77
|
-
list: () => Promise<{
|
|
78
|
-
results: IReaction[];
|
|
79
|
-
next: string;
|
|
80
|
-
duration: string;
|
|
81
|
-
}>;
|
|
82
|
-
remove: () => Promise<void>;
|
|
83
|
-
unlike: () => Promise<IReaction>;
|
|
84
|
-
};
|
|
85
|
-
form: {
|
|
86
|
-
listMembers: () => Promise<IMention[]>;
|
|
87
|
-
clickMentionFallback: () => Promise<unknown>;
|
|
88
|
-
};
|
|
89
|
-
likes: {
|
|
90
|
-
list: () => Promise<{
|
|
91
|
-
results: never[];
|
|
92
|
-
next: string;
|
|
93
|
-
duration: string;
|
|
94
|
-
}>;
|
|
95
|
-
};
|
|
96
|
-
join: () => Promise<void>;
|
|
97
|
-
leave: () => Promise<void>;
|
|
98
|
-
};
|
|
99
|
-
categories: {
|
|
100
|
-
name: string;
|
|
101
|
-
slug: string;
|
|
102
|
-
}[];
|
|
103
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare const mockFunctions: {
|
|
2
|
-
activities: {
|
|
3
|
-
edit: jest.Mock<any, any, any>;
|
|
4
|
-
like: jest.Mock<any, any, any>;
|
|
5
|
-
read: jest.Mock<any, any, any>;
|
|
6
|
-
remove: jest.Mock<any, any, any>;
|
|
7
|
-
unlike: jest.Mock<any, any, any>;
|
|
8
|
-
pin: jest.Mock<any, any, any>;
|
|
9
|
-
unpin: jest.Mock<any, any, any>;
|
|
10
|
-
};
|
|
11
|
-
reactions: {
|
|
12
|
-
add: jest.Mock<any, any, any>;
|
|
13
|
-
remove: jest.Mock<any, any, any>;
|
|
14
|
-
create: jest.Mock<any, any, any>;
|
|
15
|
-
edit: jest.Mock<any, any, any>;
|
|
16
|
-
like: jest.Mock<any, any, any>;
|
|
17
|
-
list: jest.Mock<any, any, any>;
|
|
18
|
-
unlike: jest.Mock<any, any, any>;
|
|
19
|
-
};
|
|
20
|
-
likes: {
|
|
21
|
-
add: jest.Mock<any, any, any>;
|
|
22
|
-
remove: jest.Mock<any, any, any>;
|
|
23
|
-
list: jest.Mock<any, any, any>;
|
|
24
|
-
};
|
|
25
|
-
form: {
|
|
26
|
-
submit: jest.Mock<any, any, any>;
|
|
27
|
-
validate: jest.Mock<any, any, any>;
|
|
28
|
-
listMembers: jest.Mock<any, any, any>;
|
|
29
|
-
clickMentionFallback: jest.Mock<any, any, any>;
|
|
30
|
-
};
|
|
31
|
-
join: jest.Mock<any, any, any>;
|
|
32
|
-
leave: jest.Mock<any, any, any>;
|
|
33
|
-
};
|
|
34
|
-
export declare const mockProfileHooks: {
|
|
35
|
-
useProfile: jest.Mock<any, any, any>;
|
|
36
|
-
useProfileUpdate: jest.Mock<any, any, any>;
|
|
37
|
-
useMaps: jest.Mock<any, any, any>;
|
|
38
|
-
};
|
|
39
|
-
export declare const mockProfileFunctions: {
|
|
40
|
-
updateProfile: jest.Mock<any, any, any>;
|
|
41
|
-
getProfile: jest.Mock<any, any, any>;
|
|
42
|
-
uploadImage: jest.Mock<any, any, any>;
|
|
43
|
-
onSuccess: jest.Mock<any, any, any>;
|
|
44
|
-
onCancel: jest.Mock<any, any, any>;
|
|
45
|
-
onFailure: jest.Mock<any, any, any>;
|
|
46
|
-
};
|
|
File without changes
|
|
File without changes
|