@appquality/unguess-design-system 3.1.92-beta-attachments → 3.1.93-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
CHANGED
|
@@ -4690,12 +4690,12 @@ const Comment = ({ author, message, children, date, media = [], header, }) => {
|
|
|
4690
4690
|
});
|
|
4691
4691
|
return (jsxRuntime.jsxs(CommentCard, { children: [jsxRuntime.jsxs(AuthorContainer, { children: [jsxRuntime.jsx(Avatar, Object.assign({ avatarType: (_a = author.avatarType) !== null && _a !== void 0 ? _a : "text", style: { flexShrink: 0 } }, { children: author.avatar })), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs(CommentTitle, { children: [(_b = author.name) !== null && _b !== void 0 ? _b : "User", jsxRuntime.jsx(CommentDate, { children: date })] }), jsxRuntime.jsx(ReadOnly, { children: jsxRuntime.jsx(EditorContainer$1, Object.assign({ editable: false }, { children: jsxRuntime.jsx(react.EditorContent, { editor: ed }) })) })] })] }), jsxRuntime.jsx(Grid, { children: jsxRuntime.jsx(Row$1, Object.assign({ className: "responsive-container" }, { children: media.map((file, index) => {
|
|
4692
4692
|
// Check if item is an image or a video
|
|
4693
|
-
if (file.type.includes(
|
|
4694
|
-
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 4, className: "flex-3-sm" }, { children: jsxRuntime.jsx(ImageThumbnail, { src: file.url, index: index, showX:
|
|
4693
|
+
if (file.type.includes("image"))
|
|
4694
|
+
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 4, className: "flex-3-sm" }, { children: jsxRuntime.jsx(ImageThumbnail, { src: file.url, index: index, showX: false, isLoadingMedia: false, clickThumbnail: () => {
|
|
4695
4695
|
handleClickThumbnail(file, index);
|
|
4696
4696
|
} }, index) })));
|
|
4697
|
-
if (file.type.includes(
|
|
4698
|
-
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 4, className: "flex-3-sm" }, { children: jsxRuntime.jsx(VideoThumbnail, { src: file.url, index: index, showX:
|
|
4697
|
+
if (file.type.includes("video"))
|
|
4698
|
+
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 4, className: "flex-3-sm" }, { children: jsxRuntime.jsx(VideoThumbnail, { src: file.url, index: index, showX: false, isLoadingMedia: false, clickThumbnail: () => {
|
|
4699
4699
|
handleClickThumbnail(file, index);
|
|
4700
4700
|
} }, index) })));
|
|
4701
4701
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PlaceholderOptions } from "@tiptap/extension-placeholder";
|
|
2
2
|
import { Editor as TipTapEditor } from "@tiptap/react";
|
|
3
|
-
import { ChatEditorArgs, SuggestedUser } from "./_types";
|
|
3
|
+
import { ChatEditorArgs, FileItem, SuggestedUser } from "./_types";
|
|
4
4
|
import { MediaType } from "./parts/comment";
|
|
5
5
|
import { Data } from "./context/chatContext";
|
|
6
6
|
interface EditorStoryArgs extends ChatEditorArgs {
|
|
@@ -18,7 +18,7 @@ interface EditorStoryArgs extends ChatEditorArgs {
|
|
|
18
18
|
editorText?: string;
|
|
19
19
|
background?: string;
|
|
20
20
|
onSave: (editor: TipTapEditor, mentions: SuggestedUser[]) => void;
|
|
21
|
-
onFileUpload?: (files:
|
|
21
|
+
onFileUpload?: (files: FileItem[]) => Promise<Data>;
|
|
22
22
|
placeholderOptions?: Partial<PlaceholderOptions>;
|
|
23
23
|
}
|
|
24
24
|
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
|