@apolitical/component-library 4.3.0 → 4.3.1-beta.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/conversation/conversation.d.ts +4 -3
- package/discussion/components/form/form.d.ts +6 -0
- package/discussion/index.d.ts +1 -1
- package/form/components/rich-text-editor/rich-text-editor.types.d.ts +2 -4
- package/index.js +17 -17
- package/index.mjs +928 -888
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { IConversation, IListMemberData } from './../../discussion';
|
|
2
3
|
export declare const ConversationContext: React.Context<{
|
|
3
4
|
showForm: boolean;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
prepopulateForm?: string | undefined;
|
|
6
|
+
mentionData?: IListMemberData | undefined;
|
|
7
|
+
updateConversation?: React.Dispatch<React.SetStateAction<IConversation>> | undefined;
|
|
7
8
|
}>;
|
|
8
9
|
declare const Conversation: ({ children }: {
|
|
9
10
|
children: React.ReactNode;
|
|
@@ -13,10 +13,16 @@ export interface IDiscussionForm {
|
|
|
13
13
|
isLoading?: boolean;
|
|
14
14
|
/** Whether the form is in a wrapper or not - used for styling */
|
|
15
15
|
isInWrapper?: boolean;
|
|
16
|
+
/** Whether the form should be autofocused. (It will always be autofocused when `isEditing`. */
|
|
17
|
+
isAutoFocused?: boolean;
|
|
16
18
|
/** Whether we're editing or creating */
|
|
17
19
|
isEditing: false | {
|
|
18
20
|
text?: string;
|
|
19
21
|
};
|
|
22
|
+
/** Whether the form is prepopulated with text (different to isEditing, as we want different buttons and text to show */
|
|
23
|
+
isPrepopulated: false | {
|
|
24
|
+
text?: string;
|
|
25
|
+
};
|
|
20
26
|
/** Whether the title should show */
|
|
21
27
|
showTitle?: boolean;
|
|
22
28
|
/** Whether the success message should show on a successful submit */
|
package/discussion/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseElement, BaseText, Descendant, Range } from 'slate';
|
|
2
|
+
import type { IListMemberData } from '../../../discussion';
|
|
2
3
|
import type { MemberDetailsProps } from '../../../user';
|
|
3
4
|
export declare enum Formatting {
|
|
4
5
|
blockquote = "block_quote",
|
|
@@ -62,10 +63,7 @@ export interface IMention {
|
|
|
62
63
|
userId?: string;
|
|
63
64
|
user: MemberDetailsProps;
|
|
64
65
|
}
|
|
65
|
-
export type ListMembers = ({ id, name
|
|
66
|
-
id?: string;
|
|
67
|
-
name?: string;
|
|
68
|
-
}) => Promise<IMention[]>;
|
|
66
|
+
export type ListMembers = ({ id, name }: IListMemberData) => Promise<IMention[]>;
|
|
69
67
|
export interface IMentionPopOver {
|
|
70
68
|
show: boolean;
|
|
71
69
|
selectedUser: number;
|