@appquality/unguess-design-system 3.1.93-beta-attachments → 3.1.95-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 +53 -48
- package/build/stories/buttons/utils.d.ts +39 -39
- package/build/stories/chat/_types.d.ts +1 -1
- package/build/stories/chat/context/chatContext.d.ts +3 -1
- package/build/stories/chat/index.stories.d.ts +1 -0
- package/build/stories/chat/parts/ThumbnailContainer/index.d.ts +2 -1
- package/package.json +4 -2
- package/.vscode/settings.json +0 -3
package/build/index.js
CHANGED
|
@@ -25,6 +25,7 @@ var sunburst = require('@nivo/sunburst');
|
|
|
25
25
|
var waffle = require('@nivo/waffle');
|
|
26
26
|
var line = require('@nivo/line');
|
|
27
27
|
var reactForms = require('@zendeskgarden/react-forms');
|
|
28
|
+
var uuid = require('uuid');
|
|
28
29
|
var react = require('@tiptap/react');
|
|
29
30
|
var reactTooltips = require('@zendeskgarden/react-tooltips');
|
|
30
31
|
var Typography = require('@tiptap/extension-typography');
|
|
@@ -2313,7 +2314,7 @@ const ChatFooter = ({ saveText, children, showShortcut, }) => {
|
|
|
2313
2314
|
};
|
|
2314
2315
|
|
|
2315
2316
|
const ChatContext = React.createContext(null);
|
|
2316
|
-
const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, children, }) => {
|
|
2317
|
+
const ChatContextProvider = ({ onSave, onFileUpload, onDeleteThumbnail, setMentionableUsers, children, }) => {
|
|
2317
2318
|
const [editor, setEditor] = React.useState();
|
|
2318
2319
|
const [thumbnails, setThumbnails] = React.useState([]);
|
|
2319
2320
|
const getMentions = (editor) => {
|
|
@@ -2335,6 +2336,7 @@ const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, childr
|
|
|
2335
2336
|
editor,
|
|
2336
2337
|
setEditor,
|
|
2337
2338
|
thumbnails,
|
|
2339
|
+
setThumbnails,
|
|
2338
2340
|
afterUploadCallback: (failed) => {
|
|
2339
2341
|
setThumbnails(thumbnails.map((file) => {
|
|
2340
2342
|
if (failed.includes(file.name)) {
|
|
@@ -2376,15 +2378,18 @@ const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, childr
|
|
|
2376
2378
|
}
|
|
2377
2379
|
if (thumbnails.length > 0)
|
|
2378
2380
|
setThumbnails([]);
|
|
2379
|
-
console.log("thumbnails clear triggered", thumbnails);
|
|
2380
2381
|
},
|
|
2381
|
-
|
|
2382
|
+
onDeleteThumbnail: (id) => {
|
|
2383
|
+
onDeleteThumbnail(id);
|
|
2384
|
+
},
|
|
2385
|
+
removeThumbnail: (index) => {
|
|
2386
|
+
setThumbnails(thumbnails.filter((_, i) => i !== index));
|
|
2387
|
+
},
|
|
2382
2388
|
triggerSave: () => {
|
|
2383
2389
|
if (editor && onSave && !editor.isEmpty) {
|
|
2384
2390
|
onSave(editor, getMentions(editor));
|
|
2385
2391
|
editor.commands.clearContent();
|
|
2386
2392
|
setThumbnails([]);
|
|
2387
|
-
console.log("save triggered", thumbnails);
|
|
2388
2393
|
}
|
|
2389
2394
|
},
|
|
2390
2395
|
mentionableUsers: setMentionableUsers,
|
|
@@ -2396,6 +2401,7 @@ const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, childr
|
|
|
2396
2401
|
thumbnails,
|
|
2397
2402
|
setThumbnails,
|
|
2398
2403
|
onFileUpload,
|
|
2404
|
+
onDeleteThumbnail,
|
|
2399
2405
|
]);
|
|
2400
2406
|
return (jsxRuntime.jsx(ChatContext.Provider, Object.assign({ value: chatContextValue }, { children: children })));
|
|
2401
2407
|
};
|
|
@@ -3090,7 +3096,10 @@ const CommentBar = ({ editor, i18n, }) => {
|
|
|
3090
3096
|
const files = fileInput.files;
|
|
3091
3097
|
if (files) {
|
|
3092
3098
|
const mediaFiles = Array.from(files).map((file) => {
|
|
3093
|
-
return Object.assign(file, {
|
|
3099
|
+
return Object.assign(file, {
|
|
3100
|
+
isLoadingMedia: false,
|
|
3101
|
+
internal_id: uuid.v4(),
|
|
3102
|
+
});
|
|
3094
3103
|
});
|
|
3095
3104
|
if (mediaFiles.length === 0)
|
|
3096
3105
|
return;
|
|
@@ -3523,8 +3532,8 @@ const StyledCol$1 = styled__default["default"](reactGrid.Col) `
|
|
|
3523
3532
|
`;
|
|
3524
3533
|
const Col = (props) => jsxRuntime.jsx(StyledCol$1, Object.assign({}, props));
|
|
3525
3534
|
|
|
3526
|
-
const ThumbnailContainer = ({ openLightbox }) => {
|
|
3527
|
-
const { thumbnails, removeThumbnail } = useChatContext();
|
|
3535
|
+
const ThumbnailContainer = ({ openLightbox, }) => {
|
|
3536
|
+
const { thumbnails, removeThumbnail, onDeleteThumbnail } = useChatContext();
|
|
3528
3537
|
if (!thumbnails || thumbnails.length === 0) {
|
|
3529
3538
|
return null;
|
|
3530
3539
|
}
|
|
@@ -3535,20 +3544,26 @@ const ThumbnailContainer = ({ openLightbox }) => {
|
|
|
3535
3544
|
fileType: file.type,
|
|
3536
3545
|
status: file.isLoadingMedia ? "uploading" : "success",
|
|
3537
3546
|
previewUrl: URL.createObjectURL(file),
|
|
3547
|
+
internal_id: file.internal_id,
|
|
3538
3548
|
});
|
|
3539
3549
|
});
|
|
3540
|
-
console.log("mediafiles", mediaFiles);
|
|
3541
3550
|
if (!mediaFiles || mediaFiles.length === 0) {
|
|
3542
3551
|
return null;
|
|
3543
3552
|
}
|
|
3544
3553
|
return (jsxRuntime.jsx(Grid, { children: jsxRuntime.jsx(Row$1, Object.assign({ className: "responsive-container" }, { children: mediaFiles.map((file, index) => {
|
|
3545
3554
|
// Check if item is an image or a video
|
|
3546
3555
|
if (file.fileType.includes("image"))
|
|
3547
|
-
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.status === "uploading", removeThumbnail: () =>
|
|
3556
|
+
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.status === "uploading", removeThumbnail: () => {
|
|
3557
|
+
removeThumbnail(index);
|
|
3558
|
+
onDeleteThumbnail(file.internal_id);
|
|
3559
|
+
}, clickThumbnail: () => {
|
|
3548
3560
|
openLightbox(thumbnails[index], index);
|
|
3549
3561
|
} }, index) })));
|
|
3550
3562
|
if (file.fileType.includes("video"))
|
|
3551
|
-
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.status === "uploading", removeThumbnail: () =>
|
|
3563
|
+
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.status === "uploading", removeThumbnail: () => {
|
|
3564
|
+
removeThumbnail(index);
|
|
3565
|
+
onDeleteThumbnail(file.internal_id);
|
|
3566
|
+
}, clickThumbnail: () => {
|
|
3552
3567
|
openLightbox(thumbnails[index], index);
|
|
3553
3568
|
} }, index) })));
|
|
3554
3569
|
return null;
|
|
@@ -4540,16 +4555,19 @@ const CommentBox = (_a) => {
|
|
|
4540
4555
|
}
|
|
4541
4556
|
return false;
|
|
4542
4557
|
},
|
|
4543
|
-
handleDrop: function (view, event
|
|
4558
|
+
handleDrop: function (view, event) {
|
|
4544
4559
|
if (!event.dataTransfer || !event.dataTransfer.files)
|
|
4545
4560
|
return false;
|
|
4546
4561
|
event.preventDefault();
|
|
4547
4562
|
const files = Array.from(event.dataTransfer.files).map((file) => {
|
|
4548
|
-
return Object.assign(file, {
|
|
4563
|
+
return Object.assign(file, {
|
|
4564
|
+
isLoadingMedia: false,
|
|
4565
|
+
internal_id: uuid.v4(),
|
|
4566
|
+
});
|
|
4549
4567
|
});
|
|
4550
|
-
const
|
|
4551
|
-
if (
|
|
4552
|
-
for (const file of
|
|
4568
|
+
const wrongFiles = files.filter((file) => !/^(image|video)\//.test(file.type));
|
|
4569
|
+
if (wrongFiles.length > 0) {
|
|
4570
|
+
for (const file of wrongFiles) {
|
|
4553
4571
|
addToast(({ close }) => (jsxRuntime.jsx(Notification, { onClose: close, type: "error", message: `${props.messageBadFileFormat} - ${file.name}`, isPrimary: true })), { placement: "top" });
|
|
4554
4572
|
}
|
|
4555
4573
|
}
|
|
@@ -4559,41 +4577,28 @@ const CommentBox = (_a) => {
|
|
|
4559
4577
|
addThumbnails({ files: mediaFiles });
|
|
4560
4578
|
return false;
|
|
4561
4579
|
},
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
(item) => item.type && item.type.startsWith("image/")
|
|
4571
|
-
);
|
|
4572
|
-
const textItem = items.find((item) => item.type === "text/plain");
|
|
4573
|
-
|
|
4574
|
-
if (imageItems.length > 0) {
|
|
4575
|
-
imageItems.forEach((imageItem) => {
|
|
4576
|
-
const file = imageItem.getAsFile();
|
|
4577
|
-
if (file) {
|
|
4578
|
-
const imageUrl = URL.createObjectURL(file);
|
|
4579
|
-
const node = view.state.schema.nodes.image.create({
|
|
4580
|
-
src: imageUrl,
|
|
4580
|
+
handlePaste: (view, event) => {
|
|
4581
|
+
if (!event.clipboardData || !event.clipboardData.items)
|
|
4582
|
+
return false;
|
|
4583
|
+
event.preventDefault();
|
|
4584
|
+
const files = Array.from(event.clipboardData.files).map((file) => {
|
|
4585
|
+
return Object.assign(file, {
|
|
4586
|
+
isLoadingMedia: false,
|
|
4587
|
+
internal_id: uuid.v4(),
|
|
4581
4588
|
});
|
|
4582
|
-
const transaction = view.state.tr.replaceSelectionWith(node);
|
|
4583
|
-
view.dispatch(transaction);
|
|
4584
|
-
}
|
|
4585
4589
|
});
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4590
|
+
const wrongFiles = files.filter((file) => !/^(image|video)\//.test(file.type));
|
|
4591
|
+
if (wrongFiles.length > 0) {
|
|
4592
|
+
for (const file of wrongFiles) {
|
|
4593
|
+
addToast(({ close }) => (jsxRuntime.jsx(Notification, { onClose: close, type: "error", message: `${props.messageBadFileFormat} - ${file.name}`, isPrimary: true })), { placement: "top" });
|
|
4594
|
+
}
|
|
4595
|
+
}
|
|
4596
|
+
const mediaFiles = files.filter((file) => /^(image|video)\//.test(file.type));
|
|
4597
|
+
if (mediaFiles.length === 0)
|
|
4598
|
+
return false;
|
|
4599
|
+
addThumbnails({ files: mediaFiles });
|
|
4600
|
+
return false;
|
|
4601
|
+
},
|
|
4597
4602
|
} }, props));
|
|
4598
4603
|
const onKeyDown = (event) => {
|
|
4599
4604
|
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
|
@@ -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?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
12
|
+
alignItemsXs?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
13
|
+
alignItemsSm?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
14
|
+
alignItemsMd?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
15
|
+
alignItemsLg?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
16
|
+
alignItemsXl?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
17
|
+
justifyContent?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
18
|
+
justifyContentXs?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
19
|
+
justifyContentSm?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
20
|
+
justifyContentMd?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
21
|
+
justifyContentLg?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
22
|
+
justifyContentXl?: "center" | "start" | "end" | "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?:
|
|
36
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | 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?: "none" | "search" | "text" | "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 | "true" | "false" | "page" | "step" | "location" | "date" | "time" | 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 | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "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" | "additions" | "additions removals" | "additions text" | "all" | "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?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
303
|
+
alignSelfXs?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
304
|
+
alignSelfSm?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
305
|
+
alignSelfMd?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
306
|
+
alignSelfLg?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
307
|
+
alignSelfXl?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
308
|
+
textAlign?: "center" | "start" | "end" | "justify" | undefined;
|
|
309
|
+
textAlignXs?: "center" | "start" | "end" | "justify" | undefined;
|
|
310
|
+
textAlignSm?: "center" | "start" | "end" | "justify" | undefined;
|
|
311
|
+
textAlignMd?: "center" | "start" | "end" | "justify" | undefined;
|
|
312
|
+
textAlignLg?: "center" | "start" | "end" | "justify" | undefined;
|
|
313
|
+
textAlignXl?: "center" | "start" | "end" | "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?:
|
|
333
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | 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?: "none" | "search" | "text" | "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 | "true" | "false" | "page" | "step" | "location" | "date" | "time" | 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 | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "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" | "additions" | "additions removals" | "additions text" | "all" | "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?:
|
|
603
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | 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?: "none" | "search" | "text" | "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 | "true" | "false" | "page" | "step" | "location" | "date" | "time" | 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 | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "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" | "additions" | "additions removals" | "additions text" | "all" | "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;
|
|
@@ -15,6 +15,7 @@ export type ChatContextType = {
|
|
|
15
15
|
}) => SuggestedUser[];
|
|
16
16
|
afterUploadCallback: (failed: string[]) => void;
|
|
17
17
|
clearInput: () => void;
|
|
18
|
+
onDeleteThumbnail: (id: string) => void;
|
|
18
19
|
};
|
|
19
20
|
export declare const ChatContext: React.Context<ChatContextType | null>;
|
|
20
21
|
export interface Data {
|
|
@@ -26,9 +27,10 @@ export interface Data {
|
|
|
26
27
|
errorCode: string;
|
|
27
28
|
}[];
|
|
28
29
|
}
|
|
29
|
-
export declare const ChatContextProvider: ({ onSave, onFileUpload, setMentionableUsers, children, }: {
|
|
30
|
+
export declare const ChatContextProvider: ({ onSave, onFileUpload, onDeleteThumbnail, setMentionableUsers, children, }: {
|
|
30
31
|
onSave?: ((editor: Editor, mentions: SuggestedUser[]) => void) | undefined;
|
|
31
32
|
onFileUpload?: ((files: FileItem[]) => Promise<Data>) | undefined;
|
|
33
|
+
onDeleteThumbnail: (id: string) => void;
|
|
32
34
|
children: React.ReactNode;
|
|
33
35
|
setMentionableUsers: (props: {
|
|
34
36
|
query: string;
|
|
@@ -4,9 +4,10 @@ export interface FileElement {
|
|
|
4
4
|
status: "success" | "failed" | "uploading";
|
|
5
5
|
errorCode?: "FILE_TOO_BIG" | "INVALID_FILE_EXTENSION" | "GENERIC_ERROR";
|
|
6
6
|
previewUrl: string;
|
|
7
|
+
internal_id: string;
|
|
7
8
|
}
|
|
8
9
|
interface Props {
|
|
9
10
|
openLightbox: (file: File, index: number) => void;
|
|
10
11
|
}
|
|
11
|
-
declare const ThumbnailContainer: ({ openLightbox }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
declare const ThumbnailContainer: ({ openLightbox, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
13
|
export default ThumbnailContainer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appquality/unguess-design-system",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.95-beta-attachments",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
"react-slick": "^0.29.0",
|
|
69
69
|
"react-window": "^1.8.6",
|
|
70
70
|
"tippy.js": "^6.3.7",
|
|
71
|
-
"ua-parser-js": "^1.0.2"
|
|
71
|
+
"ua-parser-js": "^1.0.2",
|
|
72
|
+
"uuid": "^9.0.1"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"@babel/preset-env": "^7.21.5",
|
|
@@ -92,6 +93,7 @@
|
|
|
92
93
|
"@types/react-window": "^1.8.5",
|
|
93
94
|
"@types/styled-components": "^5.1.23",
|
|
94
95
|
"@types/ua-parser-js": "^0.7.36",
|
|
96
|
+
"@types/uuid": "^9.0.8",
|
|
95
97
|
"@zendeskgarden/react-dropdowns": "^8.49.0",
|
|
96
98
|
"@zendeskgarden/react-forms": "^8.49.0",
|
|
97
99
|
"@zendeskgarden/react-theming": "^8.48.2",
|
package/.vscode/settings.json
DELETED