@appquality/unguess-design-system 3.1.86-beta-attachments → 3.1.88-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
@@ -2352,16 +2352,26 @@ const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, childr
2352
2352
  //isMediaUploading, // Incluso nel valore del contesto
2353
2353
  //setIsMediaUploading, // Incluso nel valore del contesto
2354
2354
  addThumbnails: ({ files, }) => {
2355
- onFileUpload && onFileUpload(files);
2356
- /* const media = files.map((file) => ({
2357
- ...file,
2358
- isLoadingMedia: false,
2359
- }));
2360
- media[0].isLoadingMedia = false;*/
2361
- //setIsMediaUploading(true);
2362
2355
  files.forEach((file) => (file.isLoadingMedia = true));
2363
2356
  setThumbnails((prev) => [...prev, ...files]);
2364
- //setIsMediaUploading(false);
2357
+ if (onFileUpload) {
2358
+ onFileUpload(files).then((data) => {
2359
+ var _a;
2360
+ const failed = (_a = data.failed) === null || _a === void 0 ? void 0 : _a.map(f => f.name);
2361
+ setThumbnails((prev) => {
2362
+ return prev.map((file) => {
2363
+ file.isLoadingMedia = false;
2364
+ if ((failed === null || failed === void 0 ? void 0 : failed.length) && failed.includes(file.name)) {
2365
+ file.isError = true;
2366
+ }
2367
+ else {
2368
+ file.isError = false;
2369
+ }
2370
+ return file;
2371
+ });
2372
+ });
2373
+ });
2374
+ }
2365
2375
  },
2366
2376
  removeThumbnail: (index) => setThumbnails(thumbnails.filter((_, i) => i !== index)),
2367
2377
  triggerSave: () => {
@@ -2379,11 +2389,8 @@ const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, childr
2379
2389
  setMentionableUsers,
2380
2390
  thumbnails,
2381
2391
  setThumbnails,
2382
- onFileUpload,
2383
- //setIsMediaUploading,
2384
- //isMediaUploading,
2392
+ onFileUpload
2385
2393
  ]);
2386
- console.log("thumbnails: ", thumbnails);
2387
2394
  return (jsxRuntime.jsx(ChatContext.Provider, Object.assign({ value: chatContextValue }, { children: children })));
2388
2395
  };
2389
2396
  const useChatContext = () => {
@@ -3326,14 +3333,16 @@ const StyledThumbnail = styled__default["default"].div `
3326
3333
  font-weight: 100;
3327
3334
  }
3328
3335
  `;
3329
- const Thumbnail = ({ clickThumbnail, src, label, index = 0, removeThumbnail, showX = true, showLabel = false, mediaType, isLoadingMedia = false, }) => {
3336
+ const Thumbnail = ({ clickThumbnail, src, label, index = 0, removeThumbnail, showX = true, showLabel = false, mediaType, isLoadingMedia = false, isError = false, }) => {
3330
3337
  //const { isMediaUploading, setIsMediaUploading } = useChatContext();
3331
3338
  const handleCancel = (e) => {
3332
3339
  e.stopPropagation();
3333
3340
  if (removeThumbnail)
3334
3341
  removeThumbnail(index);
3335
3342
  };
3336
- return (jsxRuntime.jsxs(StyledThumbnail, Object.assign({ className: "singleThumbnail", onClick: clickThumbnail }, { children: [showX && (jsxRuntime.jsx(DeleteThumbnailX, { content: "╳", deleteThumbnail: (e) => handleCancel(e) })), isLoadingMedia && (jsxRuntime.jsx(reactLoaders.Spinner, { style: { position: "absolute", top: "39%", left: "37%" }, size: "large" })), !isLoadingMedia && mediaType.includes("image") && (jsxRuntime.jsx("img", { src: src, alt: label })), !isLoadingMedia && mediaType.includes("video") && (jsxRuntime.jsxs("span", Object.assign({ style: {
3343
+ return (jsxRuntime.jsxs(StyledThumbnail, Object.assign({ className: "singleThumbnail", onClick: clickThumbnail }, { children: [showX && (jsxRuntime.jsx(DeleteThumbnailX, { content: "╳", deleteThumbnail: (e) => handleCancel(e) })), isLoadingMedia && (jsxRuntime.jsx(reactLoaders.Spinner, { style: { position: "absolute", top: "39%", left: "37%" }, size: "large" })), isError && (
3344
+ // todo: add error icon
3345
+ jsxRuntime.jsx("span", { children: "error uploading media" })), !isLoadingMedia && mediaType.includes("image") && (jsxRuntime.jsx("img", { src: src, alt: label })), !isLoadingMedia && mediaType.includes("video") && (jsxRuntime.jsxs("span", Object.assign({ style: {
3337
3346
  width: "100%",
3338
3347
  height: "100%",
3339
3348
  backgroundColor: "gray",
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ButtonArgs } from "./_types";
2
3
  export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ButtonArgs>;
3
4
  export declare const Basic: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ButtonArgs>;
@@ -8,18 +8,18 @@ export declare const variants: readonly [{}, {
8
8
  readonly disabled: true;
9
9
  }];
10
10
  export declare const Row: import("styled-components").IStyledComponent<"web", {
11
- alignItems?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
12
- alignItemsXs?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
13
- alignItemsSm?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
14
- alignItemsMd?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
15
- alignItemsLg?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
16
- alignItemsXl?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
17
- justifyContent?: "start" | "center" | "end" | "between" | "around" | undefined;
18
- justifyContentXs?: "start" | "center" | "end" | "between" | "around" | undefined;
19
- justifyContentSm?: "start" | "center" | "end" | "between" | "around" | undefined;
20
- justifyContentMd?: "start" | "center" | "end" | "between" | "around" | undefined;
21
- justifyContentLg?: "start" | "center" | "end" | "between" | "around" | undefined;
22
- justifyContentXl?: "start" | "center" | "end" | "between" | "around" | undefined;
11
+ alignItems?: "start" | "end" | "center" | "baseline" | "stretch" | undefined;
12
+ alignItemsXs?: "start" | "end" | "center" | "baseline" | "stretch" | undefined;
13
+ alignItemsSm?: "start" | "end" | "center" | "baseline" | "stretch" | undefined;
14
+ alignItemsMd?: "start" | "end" | "center" | "baseline" | "stretch" | undefined;
15
+ alignItemsLg?: "start" | "end" | "center" | "baseline" | "stretch" | undefined;
16
+ alignItemsXl?: "start" | "end" | "center" | "baseline" | "stretch" | undefined;
17
+ justifyContent?: "start" | "end" | "center" | "between" | "around" | undefined;
18
+ justifyContentXs?: "start" | "end" | "center" | "between" | "around" | undefined;
19
+ justifyContentSm?: "start" | "end" | "center" | "between" | "around" | undefined;
20
+ justifyContentMd?: "start" | "end" | "center" | "between" | "around" | undefined;
21
+ justifyContentLg?: "start" | "end" | "center" | "between" | "around" | undefined;
22
+ justifyContentXl?: "start" | "end" | "center" | "between" | "around" | undefined;
23
23
  wrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
24
24
  wrapXs?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
25
25
  wrapSm?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
@@ -33,7 +33,7 @@ export declare const Row: import("styled-components").IStyledComponent<"web", {
33
33
  accessKey?: string | undefined;
34
34
  autoFocus?: boolean | undefined;
35
35
  className?: string | undefined;
36
- contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
36
+ contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
37
37
  contextMenu?: string | undefined;
38
38
  dir?: string | undefined;
39
39
  draggable?: (boolean | "true" | "false") | undefined;
@@ -73,7 +73,7 @@ export declare const Row: import("styled-components").IStyledComponent<"web", {
73
73
  results?: number | undefined;
74
74
  security?: string | undefined;
75
75
  unselectable?: "on" | "off" | undefined;
76
- inputMode?: "decimal" | "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | undefined;
76
+ inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
77
77
  is?: string | undefined;
78
78
  "aria-activedescendant"?: string | undefined;
79
79
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
@@ -84,7 +84,7 @@ export declare const Row: import("styled-components").IStyledComponent<"web", {
84
84
  "aria-colindex"?: number | undefined;
85
85
  "aria-colspan"?: number | undefined;
86
86
  "aria-controls"?: string | undefined;
87
- "aria-current"?: boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined;
87
+ "aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
88
88
  "aria-describedby"?: string | undefined;
89
89
  "aria-details"?: string | undefined;
90
90
  "aria-disabled"?: (boolean | "true" | "false") | undefined;
@@ -93,7 +93,7 @@ export declare const Row: import("styled-components").IStyledComponent<"web", {
93
93
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
94
94
  "aria-flowto"?: string | undefined;
95
95
  "aria-grabbed"?: (boolean | "true" | "false") | undefined;
96
- "aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
96
+ "aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
97
97
  "aria-hidden"?: (boolean | "true" | "false") | undefined;
98
98
  "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
99
99
  "aria-keyshortcuts"?: string | undefined;
@@ -110,7 +110,7 @@ export declare const Row: import("styled-components").IStyledComponent<"web", {
110
110
  "aria-posinset"?: number | undefined;
111
111
  "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
112
112
  "aria-readonly"?: (boolean | "true" | "false") | undefined;
113
- "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
113
+ "aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
114
114
  "aria-required"?: (boolean | "true" | "false") | undefined;
115
115
  "aria-roledescription"?: string | undefined;
116
116
  "aria-rowcount"?: number | undefined;
@@ -299,18 +299,18 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
299
299
  md?: string | number | boolean | undefined;
300
300
  lg?: string | number | boolean | undefined;
301
301
  xl?: string | number | boolean | undefined;
302
- alignSelf?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
303
- alignSelfXs?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
304
- alignSelfSm?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
305
- alignSelfMd?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
306
- alignSelfLg?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
307
- alignSelfXl?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
308
- textAlign?: "start" | "center" | "end" | "justify" | undefined;
309
- textAlignXs?: "start" | "center" | "end" | "justify" | undefined;
310
- textAlignSm?: "start" | "center" | "end" | "justify" | undefined;
311
- textAlignMd?: "start" | "center" | "end" | "justify" | undefined;
312
- textAlignLg?: "start" | "center" | "end" | "justify" | undefined;
313
- textAlignXl?: "start" | "center" | "end" | "justify" | undefined;
302
+ alignSelf?: "start" | "end" | "center" | "baseline" | "stretch" | "auto" | undefined;
303
+ alignSelfXs?: "start" | "end" | "center" | "baseline" | "stretch" | "auto" | undefined;
304
+ alignSelfSm?: "start" | "end" | "center" | "baseline" | "stretch" | "auto" | undefined;
305
+ alignSelfMd?: "start" | "end" | "center" | "baseline" | "stretch" | "auto" | undefined;
306
+ alignSelfLg?: "start" | "end" | "center" | "baseline" | "stretch" | "auto" | undefined;
307
+ alignSelfXl?: "start" | "end" | "center" | "baseline" | "stretch" | "auto" | undefined;
308
+ textAlign?: "start" | "end" | "center" | "justify" | undefined;
309
+ textAlignXs?: "start" | "end" | "center" | "justify" | undefined;
310
+ textAlignSm?: "start" | "end" | "center" | "justify" | undefined;
311
+ textAlignMd?: "start" | "end" | "center" | "justify" | undefined;
312
+ textAlignLg?: "start" | "end" | "center" | "justify" | undefined;
313
+ textAlignXl?: "start" | "end" | "center" | "justify" | undefined;
314
314
  offset?: string | number | undefined;
315
315
  offsetXs?: string | number | undefined;
316
316
  offsetSm?: string | number | undefined;
@@ -330,7 +330,7 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
330
330
  accessKey?: string | undefined;
331
331
  autoFocus?: boolean | undefined;
332
332
  className?: string | undefined;
333
- contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
333
+ contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
334
334
  contextMenu?: string | undefined;
335
335
  dir?: string | undefined;
336
336
  draggable?: (boolean | "true" | "false") | undefined;
@@ -370,7 +370,7 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
370
370
  results?: number | undefined;
371
371
  security?: string | undefined;
372
372
  unselectable?: "on" | "off" | undefined;
373
- inputMode?: "decimal" | "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | undefined;
373
+ inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
374
374
  is?: string | undefined;
375
375
  "aria-activedescendant"?: string | undefined;
376
376
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
@@ -381,7 +381,7 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
381
381
  "aria-colindex"?: number | undefined;
382
382
  "aria-colspan"?: number | undefined;
383
383
  "aria-controls"?: string | undefined;
384
- "aria-current"?: boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined;
384
+ "aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
385
385
  "aria-describedby"?: string | undefined;
386
386
  "aria-details"?: string | undefined;
387
387
  "aria-disabled"?: (boolean | "true" | "false") | undefined;
@@ -390,7 +390,7 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
390
390
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
391
391
  "aria-flowto"?: string | undefined;
392
392
  "aria-grabbed"?: (boolean | "true" | "false") | undefined;
393
- "aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
393
+ "aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
394
394
  "aria-hidden"?: (boolean | "true" | "false") | undefined;
395
395
  "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
396
396
  "aria-keyshortcuts"?: string | undefined;
@@ -407,7 +407,7 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
407
407
  "aria-posinset"?: number | undefined;
408
408
  "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
409
409
  "aria-readonly"?: (boolean | "true" | "false") | undefined;
410
- "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
410
+ "aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
411
411
  "aria-required"?: (boolean | "true" | "false") | undefined;
412
412
  "aria-roledescription"?: string | undefined;
413
413
  "aria-rowcount"?: number | undefined;
@@ -600,7 +600,7 @@ export declare const MD: import("styled-components").IStyledComponent<"web", {
600
600
  accessKey?: string | undefined;
601
601
  autoFocus?: boolean | undefined;
602
602
  className?: string | undefined;
603
- contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
603
+ contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
604
604
  contextMenu?: string | undefined;
605
605
  dir?: string | undefined;
606
606
  draggable?: (boolean | "true" | "false") | undefined;
@@ -640,7 +640,7 @@ export declare const MD: import("styled-components").IStyledComponent<"web", {
640
640
  results?: number | undefined;
641
641
  security?: string | undefined;
642
642
  unselectable?: "on" | "off" | undefined;
643
- inputMode?: "decimal" | "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | undefined;
643
+ inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
644
644
  is?: string | undefined;
645
645
  "aria-activedescendant"?: string | undefined;
646
646
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
@@ -651,7 +651,7 @@ export declare const MD: import("styled-components").IStyledComponent<"web", {
651
651
  "aria-colindex"?: number | undefined;
652
652
  "aria-colspan"?: number | undefined;
653
653
  "aria-controls"?: string | undefined;
654
- "aria-current"?: boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined;
654
+ "aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
655
655
  "aria-describedby"?: string | undefined;
656
656
  "aria-details"?: string | undefined;
657
657
  "aria-disabled"?: (boolean | "true" | "false") | undefined;
@@ -660,7 +660,7 @@ export declare const MD: import("styled-components").IStyledComponent<"web", {
660
660
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
661
661
  "aria-flowto"?: string | undefined;
662
662
  "aria-grabbed"?: (boolean | "true" | "false") | undefined;
663
- "aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
663
+ "aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
664
664
  "aria-hidden"?: (boolean | "true" | "false") | undefined;
665
665
  "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
666
666
  "aria-keyshortcuts"?: string | undefined;
@@ -677,7 +677,7 @@ export declare const MD: import("styled-components").IStyledComponent<"web", {
677
677
  "aria-posinset"?: number | undefined;
678
678
  "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
679
679
  "aria-readonly"?: (boolean | "true" | "false") | undefined;
680
- "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
680
+ "aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
681
681
  "aria-required"?: (boolean | "true" | "false") | undefined;
682
682
  "aria-roledescription"?: string | undefined;
683
683
  "aria-rowcount"?: number | undefined;
@@ -10,7 +10,6 @@ export type SuggestedUser = {
10
10
  export interface ChatEditorArgs extends Partial<EditorOptions> {
11
11
  placeholderOptions?: Partial<PlaceholderOptions>;
12
12
  hasFloatingMenu?: boolean;
13
- isNewMedia: boolean;
14
13
  hasButtonsMenu?: boolean;
15
14
  bubbleOptions?: any;
16
15
  author: Author;
@@ -38,6 +37,10 @@ export interface EditorHeaderArgs {
38
37
  title?: string;
39
38
  validation?: validationStatus;
40
39
  }
40
+ export interface FileItem extends File {
41
+ isLoadingMedia?: boolean;
42
+ isError?: boolean;
43
+ }
41
44
  export interface FloatingMenuArgs extends Partial<BubbleMenuProps> {
42
45
  }
43
46
  export {};
@@ -1,30 +1,31 @@
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: (File & {
10
- isLoadingMedia: boolean;
11
- })[];
9
+ files: (FileItem)[];
12
10
  }) => void;
13
11
  removeThumbnail: (index: number) => void;
14
- thumbnails: (File & {
15
- isLoadingMedia: boolean;
16
- })[];
12
+ thumbnails: (FileItem)[];
17
13
  mentionableUsers: (props: {
18
14
  query: string;
19
15
  }) => SuggestedUser[];
20
16
  afterUploadCallback: (failed: string[]) => void;
21
17
  };
22
18
  export declare const ChatContext: React.Context<ChatContextType | null>;
19
+ export interface Data {
20
+ uploaded_ids?: number[];
21
+ failed?: {
22
+ name: string;
23
+ errorCode: string;
24
+ }[];
25
+ }
23
26
  export declare const ChatContextProvider: ({ onSave, onFileUpload, setMentionableUsers, children, }: {
24
27
  onSave?: ((editor: Editor, mentions: SuggestedUser[]) => void) | undefined;
25
- onFileUpload?: ((files: (File & {
26
- isLoadingMedia: boolean;
27
- })[]) => Promise<void>) | undefined;
28
+ onFileUpload?: ((files: (FileItem)[]) => Promise<Data>) | undefined;
28
29
  children: React.ReactNode;
29
30
  setMentionableUsers: (props: {
30
31
  query: string;
@@ -2,6 +2,7 @@ import { PlaceholderOptions } from "@tiptap/extension-placeholder";
2
2
  import { Editor as TipTapEditor } from "@tiptap/react";
3
3
  import { ChatEditorArgs, SuggestedUser } from "./_types";
4
4
  import { MediaType } from "./parts/comment";
5
+ import { Data } from "./context/chatContext";
5
6
  interface EditorStoryArgs extends ChatEditorArgs {
6
7
  children?: any;
7
8
  comments?: {
@@ -17,7 +18,7 @@ interface EditorStoryArgs extends ChatEditorArgs {
17
18
  editorText?: string;
18
19
  background?: string;
19
20
  onSave: (editor: TipTapEditor, mentions: SuggestedUser[]) => void;
20
- onFileUpload?: (files: File[]) => Promise<void>;
21
+ onFileUpload?: (files: File[]) => Promise<Data>;
21
22
  placeholderOptions?: Partial<PlaceholderOptions>;
22
23
  }
23
24
  export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
@@ -8,6 +8,7 @@ interface Props {
8
8
  showLabel?: boolean;
9
9
  mediaType: string;
10
10
  isLoadingMedia: boolean;
11
+ isError?: boolean;
11
12
  }
12
- declare const Thumbnail: ({ clickThumbnail, src, label, index, removeThumbnail, showX, showLabel, mediaType, isLoadingMedia, }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ declare const Thumbnail: ({ clickThumbnail, src, label, index, removeThumbnail, showX, showLabel, mediaType, isLoadingMedia, isError, }: Props) => import("react/jsx-runtime").JSX.Element;
13
14
  export default Thumbnail;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DropdownArgs, SelectArgs } from "./_types";
2
3
  import { MenuArgs } from "../menu/_types";
3
4
  interface IItem {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EditorArgs } from "./_types";
2
3
  interface EditorStoryArgs extends EditorArgs {
3
4
  children?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.86-beta-attachments",
3
+ "version": "3.1.88-beta-attachments",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",