@appquality/unguess-design-system 3.1.87-beta-attachments → 3.1.89-beta-attachments
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/build/index.js +384 -314
- package/build/stories/chat/_types.d.ts +6 -1
- package/build/stories/chat/context/chatContext.d.ts +5 -10
- package/build/stories/chat/parts/ThumbnailContainer/DeleteThumbnailX.d.ts +1 -2
- package/build/stories/chat/parts/ThumbnailContainer/ImageThumbnail.d.ts +11 -0
- package/build/stories/chat/parts/ThumbnailContainer/VideoThumbnail.d.ts +11 -0
- package/package.json +1 -1
- package/build/stories/chat/parts/ThumbnailContainer/Thumbnail.d.ts +0 -13
- package/yarn-error.log +0 -17994
|
@@ -8,11 +8,12 @@ export type SuggestedUser = {
|
|
|
8
8
|
email: string;
|
|
9
9
|
};
|
|
10
10
|
export interface ChatEditorArgs extends Partial<EditorOptions> {
|
|
11
|
+
author: Author;
|
|
12
|
+
messageBadFileFormat: string;
|
|
11
13
|
placeholderOptions?: Partial<PlaceholderOptions>;
|
|
12
14
|
hasFloatingMenu?: boolean;
|
|
13
15
|
hasButtonsMenu?: boolean;
|
|
14
16
|
bubbleOptions?: any;
|
|
15
|
-
author: Author;
|
|
16
17
|
i18n?: {
|
|
17
18
|
menu?: {
|
|
18
19
|
bold?: string;
|
|
@@ -37,6 +38,10 @@ export interface EditorHeaderArgs {
|
|
|
37
38
|
title?: string;
|
|
38
39
|
validation?: validationStatus;
|
|
39
40
|
}
|
|
41
|
+
export interface FileItem extends File {
|
|
42
|
+
isLoadingMedia?: boolean;
|
|
43
|
+
isError?: boolean;
|
|
44
|
+
}
|
|
40
45
|
export interface FloatingMenuArgs extends Partial<BubbleMenuProps> {
|
|
41
46
|
}
|
|
42
47
|
export {};
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { Editor } from "@tiptap/react";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { SuggestedUser } from "../_types";
|
|
3
|
+
import { FileItem, SuggestedUser } from "../_types";
|
|
4
4
|
export type ChatContextType = {
|
|
5
5
|
triggerSave: () => void;
|
|
6
6
|
editor?: Editor;
|
|
7
7
|
setEditor: React.Dispatch<React.SetStateAction<Editor | undefined>>;
|
|
8
8
|
addThumbnails: (props: {
|
|
9
|
-
files: (
|
|
10
|
-
isLoadingMedia: boolean;
|
|
11
|
-
})[];
|
|
9
|
+
files: (FileItem)[];
|
|
12
10
|
}) => void;
|
|
13
11
|
removeThumbnail: (index: number) => void;
|
|
14
|
-
thumbnails: (
|
|
15
|
-
isLoadingMedia: boolean;
|
|
16
|
-
})[];
|
|
12
|
+
thumbnails: (FileItem)[];
|
|
17
13
|
mentionableUsers: (props: {
|
|
18
14
|
query: string;
|
|
19
15
|
}) => SuggestedUser[];
|
|
20
16
|
afterUploadCallback: (failed: string[]) => void;
|
|
17
|
+
clearThumbnails: () => void;
|
|
21
18
|
};
|
|
22
19
|
export declare const ChatContext: React.Context<ChatContextType | null>;
|
|
23
20
|
export interface Data {
|
|
@@ -29,9 +26,7 @@ export interface Data {
|
|
|
29
26
|
}
|
|
30
27
|
export declare const ChatContextProvider: ({ onSave, onFileUpload, setMentionableUsers, children, }: {
|
|
31
28
|
onSave?: ((editor: Editor, mentions: SuggestedUser[]) => void) | undefined;
|
|
32
|
-
onFileUpload?: ((files: (
|
|
33
|
-
isLoadingMedia: boolean;
|
|
34
|
-
})[]) => Promise<Data>) | undefined;
|
|
29
|
+
onFileUpload?: ((files: (FileItem)[]) => Promise<Data>) | undefined;
|
|
35
30
|
children: React.ReactNode;
|
|
36
31
|
setMentionableUsers: (props: {
|
|
37
32
|
query: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
-
content: string;
|
|
3
2
|
deleteThumbnail: (e: any) => void;
|
|
4
3
|
}
|
|
5
|
-
declare const DeleteThumbnailX: ({
|
|
4
|
+
declare const DeleteThumbnailX: ({ deleteThumbnail }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default DeleteThumbnailX;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
src: string;
|
|
3
|
+
index?: number;
|
|
4
|
+
removeThumbnail?: (index: number) => void;
|
|
5
|
+
clickThumbnail: () => void;
|
|
6
|
+
showX?: boolean;
|
|
7
|
+
isLoadingMedia: boolean;
|
|
8
|
+
isError?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const ImageThumbnail: ({ src, index, removeThumbnail, clickThumbnail, showX, isLoadingMedia, isError, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default ImageThumbnail;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
src: string;
|
|
3
|
+
index?: number;
|
|
4
|
+
removeThumbnail?: (index: number) => void;
|
|
5
|
+
clickThumbnail: () => void;
|
|
6
|
+
showX?: boolean;
|
|
7
|
+
isLoadingMedia: boolean;
|
|
8
|
+
isError?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const VideoThumbnail: ({ src, index, removeThumbnail, clickThumbnail, showX, isLoadingMedia, isError, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default VideoThumbnail;
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
src: string;
|
|
3
|
-
label: string;
|
|
4
|
-
index?: number;
|
|
5
|
-
removeThumbnail?: (index: number) => void;
|
|
6
|
-
clickThumbnail: () => void;
|
|
7
|
-
showX?: boolean;
|
|
8
|
-
showLabel?: boolean;
|
|
9
|
-
mediaType: string;
|
|
10
|
-
isLoadingMedia: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const Thumbnail: ({ clickThumbnail, src, label, index, removeThumbnail, showX, showLabel, mediaType, isLoadingMedia, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default Thumbnail;
|