@memori.ai/memori-react 8.15.1 → 8.16.0
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/CHANGELOG.md +26 -0
- package/dist/components/Chat/Chat.css +2 -1
- package/dist/components/Chat/Chat.js +17 -17
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.css +1 -1
- package/dist/components/ContentPreviewModal/ContentPreviewModal.css +114 -0
- package/dist/components/ContentPreviewModal/ContentPreviewModal.d.ts +14 -0
- package/dist/components/ContentPreviewModal/ContentPreviewModal.js +18 -0
- package/dist/components/ContentPreviewModal/ContentPreviewModal.js.map +1 -0
- package/dist/components/ContentPreviewModal/index.d.ts +2 -0
- package/dist/components/ContentPreviewModal/index.js +9 -0
- package/dist/components/ContentPreviewModal/index.js.map +1 -0
- package/dist/components/FilePreview/FilePreview.css +1 -1
- package/dist/components/FilePreview/FilePreview.js +43 -13
- package/dist/components/FilePreview/FilePreview.js.map +1 -1
- package/dist/components/MediaWidget/DocumentCard.d.ts +3 -0
- package/dist/components/MediaWidget/DocumentCard.js +9 -0
- package/dist/components/MediaWidget/DocumentCard.js.map +1 -0
- package/dist/components/MediaWidget/MediaItemWidget.css +946 -19
- package/dist/components/MediaWidget/MediaItemWidget.d.ts +5 -36
- package/dist/components/MediaWidget/MediaItemWidget.js +295 -198
- package/dist/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/dist/components/MediaWidget/MediaItemWidget.types.d.ts +62 -0
- package/dist/components/MediaWidget/MediaItemWidget.types.js +3 -0
- package/dist/components/MediaWidget/MediaItemWidget.types.js.map +1 -0
- package/dist/components/MediaWidget/MediaItemWidget.utils.d.ts +23 -0
- package/dist/components/MediaWidget/MediaItemWidget.utils.js +162 -0
- package/dist/components/MediaWidget/MediaItemWidget.utils.js.map +1 -0
- package/dist/components/MediaWidget/MediaPreviewModal.d.ts +15 -0
- package/dist/components/MediaWidget/MediaPreviewModal.js +162 -0
- package/dist/components/MediaWidget/MediaPreviewModal.js.map +1 -0
- package/dist/components/MediaWidget/MediaWidget.js +1 -2
- package/dist/components/MediaWidget/MediaWidget.js.map +1 -1
- package/dist/components/Snippet/Snippet.css +64 -33
- package/dist/components/Snippet/Snippet.js +17 -4
- package/dist/components/Snippet/Snippet.js.map +1 -1
- package/dist/components/StartPanel/StartPanel.js +1 -2
- package/dist/components/StartPanel/StartPanel.js.map +1 -1
- package/dist/components/UploadButton/UploadButton.css +0 -5
- package/dist/components/layouts/WebsiteAssistant.js +8 -8
- package/dist/components/layouts/WebsiteAssistant.js.map +1 -1
- package/dist/components/layouts/chat.css +1 -1
- package/dist/components/layouts/website-assistant.css +405 -197
- package/dist/helpers/constants.js +0 -7
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/utils.d.ts +1 -0
- package/dist/helpers/utils.js +3 -1
- package/dist/helpers/utils.js.map +1 -1
- package/dist/index.js +43 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +0 -2
- package/dist/version.d.ts +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/esm/components/Chat/Chat.css +2 -1
- package/esm/components/Chat/Chat.js +17 -17
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.css +1 -1
- package/esm/components/ContentPreviewModal/ContentPreviewModal.css +114 -0
- package/esm/components/ContentPreviewModal/ContentPreviewModal.d.ts +14 -0
- package/esm/components/ContentPreviewModal/ContentPreviewModal.js +15 -0
- package/esm/components/ContentPreviewModal/ContentPreviewModal.js.map +1 -0
- package/esm/components/ContentPreviewModal/index.d.ts +2 -0
- package/esm/components/ContentPreviewModal/index.js +2 -0
- package/esm/components/ContentPreviewModal/index.js.map +1 -0
- package/esm/components/FilePreview/FilePreview.css +1 -1
- package/esm/components/FilePreview/FilePreview.js +44 -14
- package/esm/components/FilePreview/FilePreview.js.map +1 -1
- package/esm/components/MediaWidget/DocumentCard.d.ts +3 -0
- package/esm/components/MediaWidget/DocumentCard.js +5 -0
- package/esm/components/MediaWidget/DocumentCard.js.map +1 -0
- package/esm/components/MediaWidget/MediaItemWidget.css +946 -19
- package/esm/components/MediaWidget/MediaItemWidget.d.ts +5 -36
- package/esm/components/MediaWidget/MediaItemWidget.js +296 -197
- package/esm/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.types.d.ts +62 -0
- package/esm/components/MediaWidget/MediaItemWidget.types.js +2 -0
- package/esm/components/MediaWidget/MediaItemWidget.types.js.map +1 -0
- package/esm/components/MediaWidget/MediaItemWidget.utils.d.ts +23 -0
- package/esm/components/MediaWidget/MediaItemWidget.utils.js +149 -0
- package/esm/components/MediaWidget/MediaItemWidget.utils.js.map +1 -0
- package/esm/components/MediaWidget/MediaPreviewModal.d.ts +15 -0
- package/esm/components/MediaWidget/MediaPreviewModal.js +157 -0
- package/esm/components/MediaWidget/MediaPreviewModal.js.map +1 -0
- package/esm/components/MediaWidget/MediaWidget.js +1 -2
- package/esm/components/MediaWidget/MediaWidget.js.map +1 -1
- package/esm/components/Snippet/Snippet.css +64 -33
- package/esm/components/Snippet/Snippet.js +18 -5
- package/esm/components/Snippet/Snippet.js.map +1 -1
- package/esm/components/StartPanel/StartPanel.js +1 -2
- package/esm/components/StartPanel/StartPanel.js.map +1 -1
- package/esm/components/UploadButton/UploadButton.css +0 -5
- package/esm/components/layouts/WebsiteAssistant.js +8 -8
- package/esm/components/layouts/WebsiteAssistant.js.map +1 -1
- package/esm/components/layouts/chat.css +1 -1
- package/esm/components/layouts/website-assistant.css +405 -197
- package/esm/helpers/constants.js +0 -7
- package/esm/helpers/constants.js.map +1 -1
- package/esm/helpers/utils.d.ts +1 -0
- package/esm/helpers/utils.js +1 -0
- package/esm/helpers/utils.js.map +1 -1
- package/esm/index.js +43 -1
- package/esm/index.js.map +1 -1
- package/esm/styles.css +0 -2
- package/esm/version.d.ts +1 -0
- package/esm/version.js +2 -0
- package/esm/version.js.map +1 -0
- package/package.json +5 -3
- package/src/components/Chat/Chat.css +2 -1
- package/src/components/Chat/Chat.stories.tsx +124 -0
- package/src/components/Chat/Chat.tsx +72 -71
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +567 -1034
- package/src/components/ChatBubble/ChatBubble.css +1 -1
- package/src/components/ContentPreviewModal/ContentPreviewModal.css +114 -0
- package/src/components/ContentPreviewModal/ContentPreviewModal.tsx +69 -0
- package/src/components/ContentPreviewModal/index.ts +2 -0
- package/src/components/FilePreview/FilePreview.css +1 -1
- package/src/components/FilePreview/FilePreview.tsx +60 -37
- package/src/components/FilePreview/__snapshots__/FilePreview.test.tsx.snap +15 -105
- package/src/components/MediaWidget/DocumentCard.test.tsx +45 -0
- package/src/components/MediaWidget/DocumentCard.tsx +19 -0
- package/src/components/MediaWidget/MediaItemWidget.css +946 -19
- package/src/components/MediaWidget/MediaItemWidget.test.tsx +89 -1
- package/src/components/MediaWidget/MediaItemWidget.tsx +734 -461
- package/src/components/MediaWidget/MediaItemWidget.types.ts +65 -0
- package/src/components/MediaWidget/MediaItemWidget.utils.test.ts +324 -0
- package/src/components/MediaWidget/MediaItemWidget.utils.ts +194 -0
- package/src/components/MediaWidget/MediaPreviewModal.test.tsx +271 -0
- package/src/components/MediaWidget/MediaPreviewModal.tsx +423 -0
- package/src/components/MediaWidget/MediaWidget.stories.tsx +193 -0
- package/src/components/MediaWidget/MediaWidget.tsx +2 -4
- package/src/components/MediaWidget/__snapshots__/DocumentCard.test.tsx.snap +24 -0
- package/src/components/MediaWidget/__snapshots__/MediaItemWidget.test.tsx.snap +162 -170
- package/src/components/MediaWidget/__snapshots__/MediaWidget.test.tsx.snap +21 -63
- package/src/components/Snippet/Snippet.css +64 -33
- package/src/components/Snippet/Snippet.tsx +30 -21
- package/src/components/Snippet/__snapshots__/Snippet.test.tsx.snap +314 -297
- package/src/components/StartPanel/StartPanel.tsx +0 -9
- package/src/components/StartPanel/__snapshots__/StartPanel.test.tsx.snap +12 -636
- package/src/components/UploadButton/UploadButton.css +0 -5
- package/src/components/layouts/WebsiteAssistant.tsx +66 -62
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +1 -53
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +2 -106
- package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +1 -53
- package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +1 -53
- package/src/components/layouts/__snapshots__/WebsiteAssistant.test.tsx.snap +32 -33
- package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +1 -53
- package/src/components/layouts/chat.css +1 -1
- package/src/components/layouts/layouts.stories.tsx +68 -0
- package/src/components/layouts/website-assistant.css +405 -197
- package/src/helpers/constants.ts +0 -7
- package/src/helpers/utils.ts +4 -0
- package/src/index.test.tsx +8 -0
- package/src/index.tsx +51 -1
- package/src/styles.css +0 -2
- package/src/version.ts +2 -0
- package/src/components/AttachmentLinkModal/AttachmentLinkModal.css +0 -68
- package/src/components/AttachmentLinkModal/AttachmentLinkModal.stories.tsx +0 -32
- package/src/components/AttachmentLinkModal/AttachmentLinkModal.test.tsx +0 -10
- package/src/components/AttachmentLinkModal/AttachmentLinkModal.tsx +0 -131
- package/src/components/AttachmentLinkModal/__snapshots__/AttachmentLinkModal.test.tsx.snap +0 -9
- package/src/components/MediaWidget/LinkItemWidget.css +0 -46
- package/src/components/MediaWidget/LinkItemWidget.stories.tsx +0 -61
- package/src/components/MediaWidget/LinkItemWidget.test.tsx +0 -33
- package/src/components/MediaWidget/LinkItemWidget.tsx +0 -204
- package/src/components/MediaWidget/__snapshots__/LinkItemWidget.test.tsx.snap +0 -253
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import File from '../icons/File';
|
|
4
4
|
import CloseIcon from '../icons/Close';
|
|
5
5
|
import Button from '../ui/Button';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import ContentPreviewModal from '../ContentPreviewModal';
|
|
7
|
+
import Snippet from '../Snippet/Snippet';
|
|
8
|
+
import { stripHTML, stripDocumentAttachmentTags } from '../../helpers/utils';
|
|
8
9
|
const FilePreview = ({ previewFiles, removeFile, allowRemove = true, }) => {
|
|
10
|
+
var _a;
|
|
9
11
|
const [selectedFile, setSelectedFile] = useState(null);
|
|
10
12
|
const [hoveredId, setHoveredId] = useState(null);
|
|
11
13
|
const getFileType = (filename, type) => {
|
|
@@ -34,6 +36,8 @@ const FilePreview = ({ previewFiles, removeFile, allowRemove = true, }) => {
|
|
|
34
36
|
return 'Excel';
|
|
35
37
|
case 'csv':
|
|
36
38
|
return 'CSV';
|
|
39
|
+
case 'html':
|
|
40
|
+
return 'HTML';
|
|
37
41
|
case 'jpg':
|
|
38
42
|
case 'jpeg':
|
|
39
43
|
return 'JPEG';
|
|
@@ -55,6 +59,31 @@ const FilePreview = ({ previewFiles, removeFile, allowRemove = true, }) => {
|
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
61
|
}, [previewFiles]);
|
|
62
|
+
const isHtmlFile = (file) => {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
if (!file)
|
|
65
|
+
return false;
|
|
66
|
+
const ext = (_b = (_a = file.name) === null || _a === void 0 ? void 0 : _a.split('.').pop()) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
67
|
+
return (file.type === 'document' && (ext === 'html' || file.mimeType === 'text/html')) || ext === 'html' || file.mimeType === 'text/html';
|
|
68
|
+
};
|
|
69
|
+
const getDisplayContent = (file) => {
|
|
70
|
+
if (!(file === null || file === void 0 ? void 0 : file.content))
|
|
71
|
+
return '';
|
|
72
|
+
const content = file.content;
|
|
73
|
+
if (isHtmlFile(file)) {
|
|
74
|
+
let htmlContent = content;
|
|
75
|
+
if (htmlContent.includes('<') || htmlContent.includes('"')) {
|
|
76
|
+
const div = document.createElement('div');
|
|
77
|
+
div.innerHTML = htmlContent;
|
|
78
|
+
htmlContent = div.textContent || div.innerText || htmlContent;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
htmlContent = stripDocumentAttachmentTags(htmlContent);
|
|
82
|
+
}
|
|
83
|
+
return htmlContent;
|
|
84
|
+
}
|
|
85
|
+
return stripHTML(content);
|
|
86
|
+
};
|
|
58
87
|
const isImageContent = (content, type) => {
|
|
59
88
|
if (type === 'image')
|
|
60
89
|
return true;
|
|
@@ -67,19 +96,20 @@ const FilePreview = ({ previewFiles, removeFile, allowRemove = true, }) => {
|
|
|
67
96
|
};
|
|
68
97
|
return (_jsxs(_Fragment, { children: [previewFiles.length > 0 && (_jsx("div", { className: "memori--preview-container", children: _jsx("div", { className: "memori--preview-list", children: previewFiles.map((file) => (_jsxs("div", { className: `memori--preview-item ${isImageContent(file.content, file.type)
|
|
69
98
|
? 'memori--preview-item--image'
|
|
70
|
-
: 'memori--preview-item--document'}`, onMouseEnter: () => setHoveredId(file.id), onMouseLeave: () => setHoveredId(null), onClick: () => setSelectedFile(file), children: [isImageContent(file.content, file.type) ? (_jsx("div", { className: "memori--preview-thumbnail", children: _jsx("img", { src: file.content, alt: file.name }) })) : (_jsx(
|
|
99
|
+
: 'memori--preview-item--document'}`, onMouseEnter: () => setHoveredId(file.id), onMouseLeave: () => setHoveredId(null), onClick: () => setSelectedFile(file), children: [isImageContent(file.content, file.type) ? (_jsx("div", { className: "memori--preview-thumbnail", children: _jsx("img", { src: file.content, alt: file.name }) })) : (_jsx(File, { className: "memori--preview-icon" })), _jsxs("div", { className: "memori--preview-file-info", children: [_jsx("span", { className: "memori--preview-filename", children: file.name }), _jsx("span", { className: "memori--preview-filetype", children: getFileType(file.name, file.type) })] }), allowRemove && (_jsx(Button, { shape: "rounded", icon: _jsx(CloseIcon, {}), danger: true, className: `memori--remove-button ${hoveredId === file.id ? 'visible' : ''}`, onClick: e => {
|
|
71
100
|
e.stopPropagation();
|
|
72
101
|
removeFile(file.id, file === null || file === void 0 ? void 0 : file.mediumID);
|
|
73
|
-
} }))] }, file.id))) }) })), _jsx(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
: '
|
|
81
|
-
|
|
82
|
-
|
|
102
|
+
} }))] }, file.id))) }) })), _jsx(ContentPreviewModal, { open: !!selectedFile, onClose: () => setSelectedFile(null), title: selectedFile === null || selectedFile === void 0 ? void 0 : selectedFile.name, isImage: !!selectedFile &&
|
|
103
|
+
isImageContent(selectedFile.content, selectedFile.type), imageSrc: selectedFile && isImageContent(selectedFile.content, selectedFile.type)
|
|
104
|
+
? selectedFile.content
|
|
105
|
+
: undefined, imageAlt: (_a = selectedFile === null || selectedFile === void 0 ? void 0 : selectedFile.name) !== null && _a !== void 0 ? _a : '', children: selectedFile &&
|
|
106
|
+
!isImageContent(selectedFile.content, selectedFile.type) &&
|
|
107
|
+
(isHtmlFile(selectedFile) ? (_jsx(Snippet, { preview: false, medium: {
|
|
108
|
+
mediumID: selectedFile.id,
|
|
109
|
+
mimeType: 'application/xml',
|
|
110
|
+
content: getDisplayContent(selectedFile),
|
|
111
|
+
title: selectedFile.name,
|
|
112
|
+
} })) : (getDisplayContent(selectedFile))) })] }));
|
|
83
113
|
};
|
|
84
114
|
export default FilePreview;
|
|
85
115
|
//# sourceMappingURL=FilePreview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreview.js","sourceRoot":"","sources":["../../../src/components/FilePreview/FilePreview.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FilePreview.js","sourceRoot":"","sources":["../../../src/components/FilePreview/FilePreview.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,SAAS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,EAED,KAAC,mBAAmB,IAClB,IAAI,EAAE,CAAC,CAAC,YAAY,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EACpC,KAAK,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,EACzB,OAAO,EACL,CAAC,CAAC,YAAY;oBACd,cAAc,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,EAEzD,QAAQ,EACN,YAAY,IAAI,cAAc,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC;oBACrE,CAAC,CAAC,YAAY,CAAC,OAAO;oBACtB,CAAC,CAAC,SAAS,EAEf,QAAQ,EAAE,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,mCAAI,EAAE,YAEjC,YAAY;oBACX,CAAC,cAAc,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC;oBACxD,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAC1B,KAAC,OAAO,IACN,OAAO,EAAE,KAAK,EACd,MAAM,EAAE;4BACN,QAAQ,EAAE,YAAY,CAAC,EAAE;4BACzB,QAAQ,EAAE,iBAAiB;4BAC3B,OAAO,EAAE,iBAAiB,CAAC,YAAY,CAAC;4BACxC,KAAK,EAAE,YAAY,CAAC,IAAI;yBACzB,GACD,CACH,CAAC,CAAC,CAAC,CACF,iBAAiB,CAAC,YAAY,CAAC,CAChC,CAAC,GACgB,IACrB,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function DocumentCard({ title, badge, }) {
|
|
3
|
+
return (_jsxs("div", { className: "memori-media-item--document", children: [_jsx("div", { className: "memori-media-item--document-header", children: _jsx("div", { className: "memori-media-item--document-title", children: title }) }), _jsx("span", { className: "memori-media-item--document-badge", children: badge })] }));
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=DocumentCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentCard.js","sourceRoot":"","sources":["../../../src/components/MediaWidget/DocumentCard.tsx"],"names":[],"mappings":";AAGA,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,KAAK,GACa;IAClB,OAAO,CACL,eAAK,SAAS,EAAC,6BAA6B,aAC1C,cAAK,SAAS,EAAC,oCAAoC,YAIjD,cAAK,SAAS,EAAC,mCAAmC,YAAE,KAAK,GAAO,GAC5D,EACN,eAAM,SAAS,EAAC,mCAAmC,YAAE,KAAK,GAAQ,IAC9D,CACP,CAAC;AACJ,CAAC"}
|