@appquality/unguess-design-system 3.1.103-attachments → 3.1.104-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
|
@@ -2337,6 +2337,19 @@ const ChatContextProvider = ({ onSave, onFileUpload, onDeleteThumbnail, setMenti
|
|
|
2337
2337
|
setEditor,
|
|
2338
2338
|
thumbnails,
|
|
2339
2339
|
setThumbnails,
|
|
2340
|
+
afterUploadCallback: (failed) => {
|
|
2341
|
+
setThumbnails(thumbnails.map((file) => {
|
|
2342
|
+
if (failed.includes(file.name)) {
|
|
2343
|
+
file.isLoadingMedia = false;
|
|
2344
|
+
//file.isError = true;
|
|
2345
|
+
}
|
|
2346
|
+
else {
|
|
2347
|
+
file.isLoadingMedia = false;
|
|
2348
|
+
//file.isError = false
|
|
2349
|
+
}
|
|
2350
|
+
return file;
|
|
2351
|
+
}));
|
|
2352
|
+
},
|
|
2340
2353
|
addThumbnails: ({ files }) => {
|
|
2341
2354
|
files.forEach((file) => (file.isLoadingMedia = true));
|
|
2342
2355
|
setThumbnails((prev) => [...prev, ...files]);
|
|
@@ -3085,7 +3098,7 @@ const CommentBar = ({ editor, i18n, }) => {
|
|
|
3085
3098
|
const mediaFiles = Array.from(files).map((file) => {
|
|
3086
3099
|
return Object.assign(file, {
|
|
3087
3100
|
isLoadingMedia: false,
|
|
3088
|
-
|
|
3101
|
+
internal_id: uuid.v4(),
|
|
3089
3102
|
});
|
|
3090
3103
|
});
|
|
3091
3104
|
if (mediaFiles.length === 0)
|
|
@@ -3521,31 +3534,34 @@ const Col = (props) => jsxRuntime.jsx(StyledCol$1, Object.assign({}, props));
|
|
|
3521
3534
|
|
|
3522
3535
|
const ThumbnailContainer = ({ openLightbox }) => {
|
|
3523
3536
|
const { thumbnails, removeThumbnail, onDeleteThumbnail } = useChatContext();
|
|
3524
|
-
const
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3537
|
+
const mediaFiles = React.useMemo(() => {
|
|
3538
|
+
return thumbnails.map((file) => ({
|
|
3539
|
+
fileName: file.name,
|
|
3540
|
+
fileType: file.type,
|
|
3541
|
+
previewUrl: URL.createObjectURL(file),
|
|
3542
|
+
internal_id: file.internal_id,
|
|
3543
|
+
isLoadingMedia: file.isLoadingMedia,
|
|
3544
|
+
}));
|
|
3545
|
+
}, [thumbnails]);
|
|
3546
|
+
if (!mediaFiles || mediaFiles.length === 0) {
|
|
3531
3547
|
return null;
|
|
3532
3548
|
}
|
|
3533
|
-
return (jsxRuntime.jsx(Grid, { children: jsxRuntime.jsx(Row$1, Object.assign({ className: "responsive-container" }, { children:
|
|
3549
|
+
return (jsxRuntime.jsx(Grid, { children: jsxRuntime.jsx(Row$1, Object.assign({ className: "responsive-container" }, { children: mediaFiles.map((file, index) => {
|
|
3534
3550
|
// Check if item is an image or a video
|
|
3535
|
-
if (file.
|
|
3536
|
-
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 3, xl: 3, lg: 3, className: "flex-3-sm" }, { children: jsxRuntime.jsx(ImageThumbnail, { src: file.
|
|
3551
|
+
if (file.fileType.includes("image"))
|
|
3552
|
+
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 3, xl: 3, lg: 3, className: "flex-3-sm" }, { children: jsxRuntime.jsx(ImageThumbnail, { src: file.previewUrl, index: index, showX: true, isLoadingMedia: file.isLoadingMedia, removeThumbnail: () => {
|
|
3537
3553
|
removeThumbnail(index);
|
|
3538
|
-
onDeleteThumbnail(file.
|
|
3554
|
+
onDeleteThumbnail(file.internal_id);
|
|
3539
3555
|
}, clickThumbnail: () => {
|
|
3540
3556
|
openLightbox(thumbnails[index], index);
|
|
3541
|
-
} },
|
|
3542
|
-
if (file.
|
|
3543
|
-
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 3, className: "flex-3-sm" }, { children: jsxRuntime.jsx(VideoThumbnail, { src: file.
|
|
3557
|
+
} }, index) })));
|
|
3558
|
+
if (file.fileType.includes("video"))
|
|
3559
|
+
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 3, className: "flex-3-sm" }, { children: jsxRuntime.jsx(VideoThumbnail, { src: file.previewUrl, index: index, showX: true, isLoadingMedia: file.isLoadingMedia, removeThumbnail: () => {
|
|
3544
3560
|
removeThumbnail(index);
|
|
3545
|
-
onDeleteThumbnail(file.
|
|
3561
|
+
onDeleteThumbnail(file.internal_id);
|
|
3546
3562
|
}, clickThumbnail: () => {
|
|
3547
3563
|
openLightbox(thumbnails[index], index);
|
|
3548
|
-
} },
|
|
3564
|
+
} }, index) })));
|
|
3549
3565
|
return null;
|
|
3550
3566
|
}) })) }));
|
|
3551
3567
|
};
|
|
@@ -4796,7 +4812,7 @@ const CommentBox = (_a) => {
|
|
|
4796
4812
|
const files = Array.from(event.dataTransfer.files).map((file) => {
|
|
4797
4813
|
return Object.assign(file, {
|
|
4798
4814
|
isLoadingMedia: false,
|
|
4799
|
-
|
|
4815
|
+
internal_id: uuid.v4(),
|
|
4800
4816
|
});
|
|
4801
4817
|
});
|
|
4802
4818
|
const wrongFiles = files.filter((file) => !/^(image|video)\//.test(file.type));
|
|
@@ -4818,7 +4834,7 @@ const CommentBox = (_a) => {
|
|
|
4818
4834
|
const files = Array.from(event.clipboardData.files).map((file) => {
|
|
4819
4835
|
return Object.assign(file, {
|
|
4820
4836
|
isLoadingMedia: false,
|
|
4821
|
-
|
|
4837
|
+
internal_id: uuid.v4(),
|
|
4822
4838
|
});
|
|
4823
4839
|
});
|
|
4824
4840
|
const wrongFiles = files.filter((file) => !/^(image|video)\//.test(file.type));
|
|
@@ -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?: "
|
|
12
|
-
alignItemsXs?: "
|
|
13
|
-
alignItemsSm?: "
|
|
14
|
-
alignItemsMd?: "
|
|
15
|
-
alignItemsLg?: "
|
|
16
|
-
alignItemsXl?: "
|
|
17
|
-
justifyContent?: "
|
|
18
|
-
justifyContentXs?: "
|
|
19
|
-
justifyContentSm?: "
|
|
20
|
-
justifyContentMd?: "
|
|
21
|
-
justifyContentLg?: "
|
|
22
|
-
justifyContentXl?: "
|
|
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") |
|
|
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?: "
|
|
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 | "
|
|
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 | "
|
|
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" | "
|
|
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?: "
|
|
303
|
-
alignSelfXs?: "
|
|
304
|
-
alignSelfSm?: "
|
|
305
|
-
alignSelfMd?: "
|
|
306
|
-
alignSelfLg?: "
|
|
307
|
-
alignSelfXl?: "
|
|
308
|
-
textAlign?: "
|
|
309
|
-
textAlignXs?: "
|
|
310
|
-
textAlignSm?: "
|
|
311
|
-
textAlignMd?: "
|
|
312
|
-
textAlignLg?: "
|
|
313
|
-
textAlignXl?: "
|
|
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") |
|
|
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?: "
|
|
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 | "
|
|
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 | "
|
|
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" | "
|
|
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") |
|
|
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?: "
|
|
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 | "
|
|
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 | "
|
|
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" | "
|
|
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;
|
|
@@ -19,7 +19,7 @@ export interface ChatEditorArgs extends Partial<EditorOptions> {
|
|
|
19
19
|
bold?: string;
|
|
20
20
|
italic?: string;
|
|
21
21
|
mention?: string;
|
|
22
|
-
attachment?: React.ReactNode;
|
|
22
|
+
attachment?: string | React.ReactNode;
|
|
23
23
|
};
|
|
24
24
|
mention?: {
|
|
25
25
|
noResults?: string;
|
|
@@ -40,10 +40,8 @@ export interface EditorHeaderArgs {
|
|
|
40
40
|
}
|
|
41
41
|
export interface FileItem extends File {
|
|
42
42
|
isLoadingMedia: boolean;
|
|
43
|
-
internalId: string;
|
|
44
|
-
type: string;
|
|
45
43
|
isError?: boolean;
|
|
46
|
-
|
|
44
|
+
internal_id: string;
|
|
47
45
|
}
|
|
48
46
|
export interface FloatingMenuArgs extends Partial<BubbleMenuProps> {
|
|
49
47
|
}
|