@memori.ai/memori-react 8.11.0 → 8.13.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 +74 -0
- package/dist/components/AgeVerificationModal/AgeVerificationModal.css +41 -14
- package/dist/components/AgeVerificationModal/AgeVerificationModal.js +2 -2
- package/dist/components/AgeVerificationModal/AgeVerificationModal.js.map +1 -1
- package/dist/components/Auth/Auth.js +36 -8
- package/dist/components/Auth/Auth.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.css +2 -2
- package/dist/components/Chat/Chat.css +37 -3
- package/dist/components/Chat/Chat.js +61 -23
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.css +87 -15
- package/dist/components/ChatBubble/ChatBubble.js +129 -19
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/ChatHistoryDrawer/ChatHistory.css +5 -1
- package/dist/components/ChatInputs/ChatInputs.css +293 -17
- package/dist/components/ChatInputs/ChatInputs.d.ts +1 -0
- package/dist/components/ChatInputs/ChatInputs.js +48 -27
- package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
- package/dist/components/ChatTextArea/ChatTextArea.css +75 -31
- package/dist/components/ChatTextArea/ChatTextArea.js +47 -18
- package/dist/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/dist/components/DateSelector/DateSelector.css +125 -104
- package/dist/components/DateSelector/DateSelector.d.ts +1 -1
- package/dist/components/DateSelector/DateSelector.js +110 -52
- package/dist/components/DateSelector/DateSelector.js.map +1 -1
- package/dist/components/FilePreview/FilePreview.css +225 -146
- package/dist/components/FilePreview/FilePreview.d.ts +1 -2
- package/dist/components/FilePreview/FilePreview.js +20 -6
- package/dist/components/FilePreview/FilePreview.js.map +1 -1
- package/dist/components/Header/Header.css +2 -2
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/LoginDrawer/LoginDrawer.css +37 -5
- package/dist/components/LoginDrawer/LoginDrawer.d.ts +1 -2
- package/dist/components/LoginDrawer/LoginDrawer.js +2 -9
- package/dist/components/LoginDrawer/LoginDrawer.js.map +1 -1
- package/dist/components/MediaWidget/MediaItemWidget.js +2 -1
- package/dist/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.js +3 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +2 -2
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +16 -7
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +6 -4
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.css +11 -2
- package/dist/components/MemoriWidget/MemoriWidget.js +105 -25
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/MicrophoneButton/MicrophoneButton.css +2 -2
- package/dist/components/StartPanel/StartPanel.css +8 -0
- package/dist/components/UploadButton/UploadButton.css +20 -17
- package/dist/components/UploadButton/UploadButton.js +218 -87
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js +14 -4
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/dist/components/UploadButton/UploadImages/UploadImages.js +143 -16
- package/dist/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/dist/components/layouts/chat.css +1 -1
- package/dist/components/ui/Drawer.css +8 -0
- package/dist/components/ui/Drawer.d.ts +2 -0
- package/dist/components/ui/Drawer.js +2 -2
- package/dist/components/ui/Drawer.js.map +1 -1
- package/dist/components/ui/Tooltip.css +49 -1
- package/dist/components/ui/Tooltip.d.ts +1 -1
- package/dist/helpers/constants.d.ts +1 -0
- package/dist/helpers/constants.js +2 -1
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/imageCompression.d.ts +7 -0
- package/dist/helpers/imageCompression.js +123 -0
- package/dist/helpers/imageCompression.js.map +1 -0
- package/dist/locales/de.json +13 -5
- package/dist/locales/en.json +17 -6
- package/dist/locales/es.json +13 -5
- package/dist/locales/fr.json +12 -5
- package/dist/locales/it.json +16 -6
- package/dist/styles.css +4 -4
- package/esm/components/AgeVerificationModal/AgeVerificationModal.css +41 -14
- package/esm/components/AgeVerificationModal/AgeVerificationModal.js +2 -2
- package/esm/components/AgeVerificationModal/AgeVerificationModal.js.map +1 -1
- package/esm/components/Auth/Auth.js +36 -8
- package/esm/components/Auth/Auth.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.css +2 -2
- package/esm/components/Chat/Chat.css +37 -3
- package/esm/components/Chat/Chat.js +61 -23
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.css +87 -15
- package/esm/components/ChatBubble/ChatBubble.js +130 -20
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/ChatHistoryDrawer/ChatHistory.css +5 -1
- package/esm/components/ChatInputs/ChatInputs.css +293 -17
- package/esm/components/ChatInputs/ChatInputs.d.ts +1 -0
- package/esm/components/ChatInputs/ChatInputs.js +49 -28
- package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
- package/esm/components/ChatTextArea/ChatTextArea.css +75 -31
- package/esm/components/ChatTextArea/ChatTextArea.js +49 -20
- package/esm/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/esm/components/DateSelector/DateSelector.css +125 -104
- package/esm/components/DateSelector/DateSelector.d.ts +1 -1
- package/esm/components/DateSelector/DateSelector.js +111 -52
- package/esm/components/DateSelector/DateSelector.js.map +1 -1
- package/esm/components/FilePreview/FilePreview.css +225 -146
- package/esm/components/FilePreview/FilePreview.d.ts +1 -2
- package/esm/components/FilePreview/FilePreview.js +21 -7
- package/esm/components/FilePreview/FilePreview.js.map +1 -1
- package/esm/components/Header/Header.css +2 -2
- package/esm/components/Header/Header.js +1 -1
- package/esm/components/Header/Header.js.map +1 -1
- package/esm/components/LoginDrawer/LoginDrawer.css +37 -5
- package/esm/components/LoginDrawer/LoginDrawer.d.ts +1 -2
- package/esm/components/LoginDrawer/LoginDrawer.js +2 -9
- package/esm/components/LoginDrawer/LoginDrawer.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.js +2 -1
- package/esm/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.js +3 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +2 -2
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +16 -7
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +6 -4
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.css +11 -2
- package/esm/components/MemoriWidget/MemoriWidget.js +105 -25
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/MicrophoneButton/MicrophoneButton.css +2 -2
- package/esm/components/StartPanel/StartPanel.css +8 -0
- package/esm/components/UploadButton/UploadButton.css +20 -17
- package/esm/components/UploadButton/UploadButton.js +219 -88
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js +14 -4
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/esm/components/UploadButton/UploadImages/UploadImages.js +143 -16
- package/esm/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/esm/components/layouts/chat.css +1 -1
- package/esm/components/ui/Drawer.css +8 -0
- package/esm/components/ui/Drawer.d.ts +2 -0
- package/esm/components/ui/Drawer.js +2 -2
- package/esm/components/ui/Drawer.js.map +1 -1
- package/esm/components/ui/Tooltip.css +49 -1
- package/esm/components/ui/Tooltip.d.ts +1 -1
- package/esm/helpers/constants.d.ts +1 -0
- package/esm/helpers/constants.js +1 -0
- package/esm/helpers/constants.js.map +1 -1
- package/esm/helpers/imageCompression.d.ts +7 -0
- package/esm/helpers/imageCompression.js +119 -0
- package/esm/helpers/imageCompression.js.map +1 -0
- package/esm/locales/de.json +13 -5
- package/esm/locales/en.json +17 -6
- package/esm/locales/es.json +13 -5
- package/esm/locales/fr.json +12 -5
- package/esm/locales/it.json +16 -6
- package/esm/styles.css +4 -4
- package/package.json +2 -2
- package/src/components/AgeVerificationModal/AgeVerificationModal.css +41 -14
- package/src/components/AgeVerificationModal/AgeVerificationModal.tsx +3 -1
- package/src/components/Auth/Auth.tsx +55 -11
- package/src/components/Avatar/Avatar.stories.tsx +3 -0
- package/src/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.css +2 -2
- package/src/components/Chat/Chat.css +37 -3
- package/src/components/Chat/Chat.stories.tsx +16 -2
- package/src/components/Chat/Chat.tsx +90 -21
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +1752 -812
- package/src/components/ChatBubble/ChatBubble.css +87 -15
- package/src/components/ChatBubble/ChatBubble.stories.tsx +16 -2
- package/src/components/ChatBubble/ChatBubble.test.tsx +17 -0
- package/src/components/ChatBubble/ChatBubble.tsx +237 -33
- package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +304 -8
- package/src/components/ChatHistoryDrawer/ChatHistory.css +5 -1
- package/src/components/ChatInputs/ChatInputs.css +293 -17
- package/src/components/ChatInputs/ChatInputs.tsx +156 -86
- package/src/components/ChatInputs/__snapshots__/ChatInputs.test.tsx.snap +430 -424
- package/src/components/ChatTextArea/ChatTextArea.css +75 -31
- package/src/components/ChatTextArea/ChatTextArea.test.tsx +1 -16
- package/src/components/ChatTextArea/ChatTextArea.tsx +51 -22
- package/src/components/ChatTextArea/__snapshots__/ChatTextArea.test.tsx.snap +9 -72
- package/src/components/DateSelector/DateSelector.css +125 -104
- package/src/components/DateSelector/DateSelector.stories.tsx +1 -1
- package/src/components/DateSelector/DateSelector.test.tsx +137 -23
- package/src/components/DateSelector/DateSelector.tsx +203 -177
- package/src/components/FilePreview/FilePreview.css +225 -146
- package/src/components/FilePreview/FilePreview.tsx +49 -36
- package/src/components/FilePreview/__snapshots__/FilePreview.test.tsx.snap +2 -2
- package/src/components/Header/Header.css +2 -2
- package/src/components/Header/Header.stories.tsx +5 -1
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/Header/__snapshots__/Header.test.tsx.snap +1 -1
- package/src/components/LoginDrawer/LoginDrawer.css +37 -5
- package/src/components/LoginDrawer/LoginDrawer.stories.tsx +0 -1
- package/src/components/LoginDrawer/LoginDrawer.test.tsx +0 -1
- package/src/components/LoginDrawer/LoginDrawer.tsx +0 -19
- package/src/components/MediaWidget/MediaItemWidget.tsx +2 -1
- package/src/components/MemoriArtifactSystem/ArtifactDrawer.stories.tsx +996 -204
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.tsx +2 -2
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.tsx +1 -1
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.tsx +3 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.tsx +56 -54
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +16 -7
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +12 -3
- package/src/components/MemoriWidget/MemoriWidget.css +11 -2
- package/src/components/MemoriWidget/MemoriWidget.stories.tsx +6 -3
- package/src/components/MemoriWidget/MemoriWidget.tsx +173 -49
- package/src/components/MicrophoneButton/MicrophoneButton.css +2 -2
- package/src/components/StartPanel/StartPanel.css +8 -0
- package/src/components/UploadButton/UploadButton.css +20 -17
- package/src/components/UploadButton/UploadButton.stories.tsx +247 -35
- package/src/components/UploadButton/UploadButton.tsx +280 -173
- package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +19 -4
- package/src/components/UploadButton/UploadImages/UploadImages.tsx +196 -35
- package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +10 -1
- package/src/components/layouts/FullBody/FullBody.stories.tsx +9 -10
- package/src/components/layouts/Totem/Totem.stories.tsx +8 -9
- package/src/components/layouts/ZoomedFullBody/ZoomedFullBody.stories.tsx +8 -9
- package/src/components/layouts/chat.css +1 -1
- package/src/components/layouts/layouts.stories.tsx +10 -9
- package/src/components/ui/Drawer.css +8 -0
- package/src/components/ui/Drawer.tsx +16 -12
- package/src/components/ui/Tooltip.css +49 -1
- package/src/components/ui/Tooltip.tsx +1 -1
- package/src/helpers/constants.ts +1 -1
- package/src/helpers/imageCompression.ts +230 -0
- package/src/index.stories.tsx +18 -0
- package/src/locales/de.json +13 -5
- package/src/locales/en.json +17 -6
- package/src/locales/es.json +13 -5
- package/src/locales/fr.json +12 -5
- package/src/locales/it.json +16 -6
- package/src/mocks/data.ts +4 -2
- package/src/styles.css +4 -4
- package/src/components/SignupForm/SignupForm.test.tsx +0 -40
- package/src/components/SignupForm/SignupForm.tsx +0 -457
- package/src/components/SignupForm/__snapshots__/SignupForm.test.tsx.snap +0 -247
- package/src/components/UploadMenu/UploadMenu.css +0 -47
- package/src/components/UploadMenu/UploadMenu.stories.tsx +0 -66
- package/src/components/UploadMenu/UploadMenu.test.tsx +0 -34
- package/src/components/UploadMenu/UploadMenu.tsx +0 -68
- package/src/components/UploadMenu/__snapshots__/UploadMenu.test.tsx.snap +0 -137
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
.memori-tooltip {
|
|
4
4
|
position: relative;
|
|
5
|
+
z-index: 1000;
|
|
5
6
|
display: inline-block;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
.memori-tooltip--content {
|
|
9
10
|
position: absolute;
|
|
10
|
-
z-index:
|
|
11
|
+
z-index: 1000;
|
|
11
12
|
top: 50%;
|
|
12
13
|
left: 100%;
|
|
13
14
|
display: none;
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
transition: 0.3s;
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
|
|
50
52
|
.memori-tooltip.memori-tooltip--align-left .memori-tooltip--content::before {
|
|
51
53
|
right: -15px;
|
|
52
54
|
left: auto;
|
|
@@ -113,3 +115,49 @@
|
|
|
113
115
|
.memori-tooltip.memori-tooltip--disabled {
|
|
114
116
|
cursor: not-allowed;
|
|
115
117
|
}
|
|
118
|
+
|
|
119
|
+
.memori-tooltip.memori-tooltip--align-bottomLeft .memori-tooltip--content,
|
|
120
|
+
.memori-tooltip.memori-tooltip--align-bottomRight .memori-tooltip--content {
|
|
121
|
+
top: 100%;
|
|
122
|
+
right: initial;
|
|
123
|
+
left: 50%;
|
|
124
|
+
margin: initial;
|
|
125
|
+
margin-top: 15px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.memori-tooltip.memori-tooltip--align-bottomLeft .memori-tooltip--content::before {
|
|
129
|
+
z-index: 1001;
|
|
130
|
+
top: -15px;
|
|
131
|
+
bottom: initial;
|
|
132
|
+
left: 66%;
|
|
133
|
+
border-color: transparent transparent rgba(0, 0, 0, 0.8) transparent;
|
|
134
|
+
margin-top: 0px;
|
|
135
|
+
margin-bottom: initial;
|
|
136
|
+
margin-left: 5px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.memori-tooltip.memori-tooltip--align-bottomRight .memori-tooltip--content::before {
|
|
140
|
+
z-index: 1001;
|
|
141
|
+
top: -15px;
|
|
142
|
+
right: 10px;
|
|
143
|
+
bottom: initial;
|
|
144
|
+
left: auto;
|
|
145
|
+
border-color: transparent transparent rgba(0, 0, 0, 0.8) transparent;
|
|
146
|
+
margin-top: -5px;
|
|
147
|
+
margin-right: 5px;
|
|
148
|
+
margin-bottom: initial;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.memori-tooltip.memori-tooltip--align-bottomLeft:not(.memori-tooltip--disabled).memori-tooltip--visible
|
|
152
|
+
.memori-tooltip--content,
|
|
153
|
+
.memori-tooltip.memori-tooltip--align-bottomLeft:not(.memori-tooltip--disabled):not(.memori-tooltip--visible):hover
|
|
154
|
+
.memori-tooltip--content {
|
|
155
|
+
transform: translateX(-73%);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.memori-tooltip.memori-tooltip--align-bottomRight:not(.memori-tooltip--disabled).memori-tooltip--visible
|
|
159
|
+
.memori-tooltip--content,
|
|
160
|
+
.memori-tooltip.memori-tooltip--align-bottomRight:not(.memori-tooltip--disabled):not(.memori-tooltip--visible):hover
|
|
161
|
+
.memori-tooltip--content {
|
|
162
|
+
transform: translateX(33%);
|
|
163
|
+
}
|
|
@@ -4,7 +4,7 @@ import cx from 'classnames';
|
|
|
4
4
|
export interface Props {
|
|
5
5
|
content: string | JSX.Element | React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
-
align?: 'left' | 'right' | 'topLeft' | 'topRight';
|
|
7
|
+
align?: 'left' | 'right' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
visible?: boolean;
|
package/src/helpers/constants.ts
CHANGED
|
@@ -215,5 +215,5 @@ export const MAX_MSG_WORDS = 300;
|
|
|
215
215
|
|
|
216
216
|
// Document upload limits
|
|
217
217
|
export const MAX_DOCUMENTS_PER_MESSAGE = 5;
|
|
218
|
-
|
|
218
|
+
export const MAX_TOTAL_MESSAGE_PAYLOAD = 200000; // 200KB total payload limit
|
|
219
219
|
export const MAX_DOCUMENT_CONTENT_LENGTH = 200000; // 200KB per document content
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image compression utility using HTML5 Canvas API
|
|
3
|
+
* Compresses images before upload to reduce file size and LLM context usage
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface CompressionOptions {
|
|
7
|
+
maxWidth?: number;
|
|
8
|
+
maxHeight?: number;
|
|
9
|
+
quality?: number;
|
|
10
|
+
maxSizeMB?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const DEFAULT_OPTIONS: Required<CompressionOptions> = {
|
|
14
|
+
maxWidth: 1920,
|
|
15
|
+
maxHeight: 1920,
|
|
16
|
+
quality: 0.85,
|
|
17
|
+
maxSizeMB: 2,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Apply EXIF orientation to canvas context
|
|
23
|
+
*/
|
|
24
|
+
const applyOrientation = (
|
|
25
|
+
ctx: CanvasRenderingContext2D,
|
|
26
|
+
orientation: number,
|
|
27
|
+
width: number,
|
|
28
|
+
height: number
|
|
29
|
+
) => {
|
|
30
|
+
switch (orientation) {
|
|
31
|
+
case 2:
|
|
32
|
+
// Horizontal flip
|
|
33
|
+
ctx.transform(-1, 0, 0, 1, width, 0);
|
|
34
|
+
break;
|
|
35
|
+
case 3:
|
|
36
|
+
// 180° rotation
|
|
37
|
+
ctx.transform(-1, 0, 0, -1, width, height);
|
|
38
|
+
break;
|
|
39
|
+
case 4:
|
|
40
|
+
// Vertical flip
|
|
41
|
+
ctx.transform(1, 0, 0, -1, 0, height);
|
|
42
|
+
break;
|
|
43
|
+
case 5:
|
|
44
|
+
// Vertical flip + 90° rotation
|
|
45
|
+
ctx.transform(0, 1, 1, 0, 0, 0);
|
|
46
|
+
break;
|
|
47
|
+
case 6:
|
|
48
|
+
// 90° rotation
|
|
49
|
+
ctx.transform(0, 1, -1, 0, height, 0);
|
|
50
|
+
break;
|
|
51
|
+
case 7:
|
|
52
|
+
// Horizontal flip + 90° rotation
|
|
53
|
+
ctx.transform(0, -1, -1, 0, height, width);
|
|
54
|
+
break;
|
|
55
|
+
case 8:
|
|
56
|
+
// 270° rotation
|
|
57
|
+
ctx.transform(0, -1, 1, 0, 0, width);
|
|
58
|
+
break;
|
|
59
|
+
default:
|
|
60
|
+
// No transformation needed
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Load image from File and return HTMLImageElement
|
|
67
|
+
*/
|
|
68
|
+
const loadImage = (file: File): Promise<HTMLImageElement> => {
|
|
69
|
+
return new Promise((resolve, reject) => {
|
|
70
|
+
const img = new Image();
|
|
71
|
+
const url = URL.createObjectURL(file);
|
|
72
|
+
|
|
73
|
+
img.onload = () => {
|
|
74
|
+
URL.revokeObjectURL(url);
|
|
75
|
+
resolve(img);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
img.onerror = () => {
|
|
79
|
+
URL.revokeObjectURL(url);
|
|
80
|
+
reject(new Error('Failed to load image'));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
img.src = url;
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Calculate new dimensions maintaining aspect ratio
|
|
89
|
+
*/
|
|
90
|
+
const calculateDimensions = (
|
|
91
|
+
width: number,
|
|
92
|
+
height: number,
|
|
93
|
+
maxWidth: number,
|
|
94
|
+
maxHeight: number
|
|
95
|
+
): { width: number; height: number } => {
|
|
96
|
+
// If image is already smaller than max dimensions, return original
|
|
97
|
+
if (width <= maxWidth && height <= maxHeight) {
|
|
98
|
+
return { width, height };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Calculate scale factor
|
|
102
|
+
const scaleWidth = maxWidth / width;
|
|
103
|
+
const scaleHeight = maxHeight / height;
|
|
104
|
+
const scale = Math.min(scaleWidth, scaleHeight, 1);
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
width: Math.round(width * scale),
|
|
108
|
+
height: Math.round(height * scale),
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Compress image using Canvas API
|
|
114
|
+
* @param file - Original image file
|
|
115
|
+
* @param options - Compression options
|
|
116
|
+
* @returns Compressed File object
|
|
117
|
+
*/
|
|
118
|
+
export const compressImage = async (
|
|
119
|
+
file: File,
|
|
120
|
+
options: CompressionOptions = {}
|
|
121
|
+
): Promise<File> => {
|
|
122
|
+
const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
123
|
+
|
|
124
|
+
// Check if compression is needed
|
|
125
|
+
const fileSizeMB = file.size / (1024 * 1024);
|
|
126
|
+
const shouldCompress = fileSizeMB > 1; // Compress if > 1 MB
|
|
127
|
+
|
|
128
|
+
if (!shouldCompress) {
|
|
129
|
+
// Load image to check dimensions
|
|
130
|
+
try {
|
|
131
|
+
const img = await loadImage(file);
|
|
132
|
+
const needsResize =
|
|
133
|
+
img.width > opts.maxWidth || img.height > opts.maxHeight;
|
|
134
|
+
|
|
135
|
+
if (!needsResize) {
|
|
136
|
+
// File is already small enough, return original
|
|
137
|
+
return file;
|
|
138
|
+
}
|
|
139
|
+
} catch (error) {
|
|
140
|
+
// If we can't load the image, return original
|
|
141
|
+
return file;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
try {
|
|
146
|
+
// Load image
|
|
147
|
+
const img = await loadImage(file);
|
|
148
|
+
|
|
149
|
+
// Get orientation (simplified - full EXIF parsing would require a library)
|
|
150
|
+
const orientation = 1;
|
|
151
|
+
|
|
152
|
+
// Calculate new dimensions
|
|
153
|
+
const { width, height } = calculateDimensions(
|
|
154
|
+
img.width,
|
|
155
|
+
img.height,
|
|
156
|
+
opts.maxWidth,
|
|
157
|
+
opts.maxHeight
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
// Create canvas
|
|
161
|
+
const canvas = document.createElement('canvas');
|
|
162
|
+
canvas.width = width;
|
|
163
|
+
canvas.height = height;
|
|
164
|
+
|
|
165
|
+
const ctx = canvas.getContext('2d');
|
|
166
|
+
if (!ctx) {
|
|
167
|
+
throw new Error('Failed to get canvas context');
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Apply orientation transformation
|
|
171
|
+
applyOrientation(ctx, orientation, width, height);
|
|
172
|
+
|
|
173
|
+
// Draw image to canvas
|
|
174
|
+
ctx.drawImage(img, 0, 0, width, height);
|
|
175
|
+
|
|
176
|
+
// Convert canvas to blob
|
|
177
|
+
return new Promise((resolve, reject) => {
|
|
178
|
+
canvas.toBlob(
|
|
179
|
+
(blob) => {
|
|
180
|
+
if (!blob) {
|
|
181
|
+
reject(new Error('Failed to compress image'));
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Check if compressed size is acceptable
|
|
186
|
+
const compressedSizeMB = blob.size / (1024 * 1024);
|
|
187
|
+
|
|
188
|
+
if (compressedSizeMB > opts.maxSizeMB) {
|
|
189
|
+
// If still too large, try lower quality
|
|
190
|
+
canvas.toBlob(
|
|
191
|
+
(lowerQualityBlob) => {
|
|
192
|
+
if (!lowerQualityBlob) {
|
|
193
|
+
// Fallback to original blob
|
|
194
|
+
const compressedFile = new File(
|
|
195
|
+
[blob],
|
|
196
|
+
file.name.replace(/\.[^/.]+$/, '.jpg'),
|
|
197
|
+
{ type: 'image/jpeg' }
|
|
198
|
+
);
|
|
199
|
+
resolve(compressedFile);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const compressedFile = new File(
|
|
203
|
+
[lowerQualityBlob],
|
|
204
|
+
file.name.replace(/\.[^/.]+$/, '.jpg'),
|
|
205
|
+
{ type: 'image/jpeg' }
|
|
206
|
+
);
|
|
207
|
+
resolve(compressedFile);
|
|
208
|
+
},
|
|
209
|
+
'image/jpeg',
|
|
210
|
+
Math.max(0.5, opts.quality - 0.2) // Reduce quality by 0.2, min 0.5
|
|
211
|
+
);
|
|
212
|
+
} else {
|
|
213
|
+
// Create new File with JPEG extension
|
|
214
|
+
const compressedFile = new File(
|
|
215
|
+
[blob],
|
|
216
|
+
file.name.replace(/\.[^/.]+$/, '.jpg'),
|
|
217
|
+
{ type: 'image/jpeg' }
|
|
218
|
+
);
|
|
219
|
+
resolve(compressedFile);
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
'image/jpeg', // Always convert to JPEG for better compression
|
|
223
|
+
opts.quality
|
|
224
|
+
);
|
|
225
|
+
});
|
|
226
|
+
} catch (error) {
|
|
227
|
+
// If compression fails, return original file
|
|
228
|
+
return file;
|
|
229
|
+
}
|
|
230
|
+
};
|
package/src/index.stories.tsx
CHANGED
|
@@ -100,3 +100,21 @@ WithUpload.args = {
|
|
|
100
100
|
showUpload: true,
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
+
export const WithPrivateAgent = Template.bind({});
|
|
104
|
+
WithPrivateAgent.args = {
|
|
105
|
+
memoriName: 'Test Private',
|
|
106
|
+
ownerUserName: 'Andrea-Patini',
|
|
107
|
+
memoriID: 'c58cd5f9-43c4-4a3b-9fb6-56aedf58ff7a',
|
|
108
|
+
ownerUserID: '91dbc9ba-b684-4fbe-9828-b5980af6cda9',
|
|
109
|
+
tenantID: 'aisuru-staging.aclambda.online',
|
|
110
|
+
apiURL: 'https://backend-staging.memori.ai/api/v2',
|
|
111
|
+
engineURL: 'https://engine-staging.memori.ai/memori/v2',
|
|
112
|
+
baseURL: 'https://aisuru-staging.aclambda.online',
|
|
113
|
+
uiLang: 'EN',
|
|
114
|
+
spokenLang: 'IT',
|
|
115
|
+
layout: 'FULLPAGE',
|
|
116
|
+
multilingual: true,
|
|
117
|
+
showSettings: true,
|
|
118
|
+
showShare: true,
|
|
119
|
+
integrationID: '19f95abe-3493-4568-971d-14471480e5bc',
|
|
120
|
+
};
|
package/src/locales/de.json
CHANGED
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
"last_7_days": "Letzte 7 Tage",
|
|
25
25
|
"last_30_days": "Letzte 30 Tage",
|
|
26
26
|
"missingData": "Fehlende Informationen",
|
|
27
|
+
"date": "Geburtsdatum",
|
|
27
28
|
"day": "Tag",
|
|
29
|
+
"copied": "Kopiert!",
|
|
30
|
+
"placeholder": "Stellen Sie eine Frage",
|
|
28
31
|
"month": "Monat",
|
|
29
32
|
"year": "Jahr",
|
|
30
33
|
"createdAt": "Erstellungsdatum",
|
|
@@ -106,6 +109,8 @@
|
|
|
106
109
|
"tokens": "Token",
|
|
107
110
|
"addToken": "Token hinzufügen",
|
|
108
111
|
"usePassword": "Passwort verwenden",
|
|
112
|
+
"passwordRequired": "Passwort erforderlich",
|
|
113
|
+
"invalidCredentials": "Ungültige Zugangsdaten",
|
|
109
114
|
"atLeast": "Mindestens"
|
|
110
115
|
},
|
|
111
116
|
"widget": {
|
|
@@ -233,9 +238,10 @@
|
|
|
233
238
|
"upload": {
|
|
234
239
|
"loginRequired": "Login erforderlich",
|
|
235
240
|
"loginRequiredDescription": "Bitte melden Sie sich an, um Bilder hochzuladen",
|
|
236
|
-
"uploadFiles": "Dateien hochladen",
|
|
237
|
-
"
|
|
238
|
-
"
|
|
241
|
+
"uploadFiles": "Dateien hochladen ({{shortcut}}+O zum Öffnen des Datei-Selektors)",
|
|
242
|
+
"uploadFilesWithShortcut": "{{shortcut}}+O zum Öffnen des Datei-Selektors",
|
|
243
|
+
"uploadImages": "Bilder hochladen",
|
|
244
|
+
"uploadDocuments": "Dokumente hochladen",
|
|
239
245
|
"replace": "Ersetzen",
|
|
240
246
|
"remaining": "verbleibend",
|
|
241
247
|
"maxReached": "Maximal erreicht",
|
|
@@ -244,7 +250,8 @@
|
|
|
244
250
|
"uploadFailed": "Hochladen fehlgeschlagen",
|
|
245
251
|
"uploadSuccess": "Hochladen erfolgreich",
|
|
246
252
|
"uploadSuccessDescription": "Die Datei wurde erfolgreich hochgeladen",
|
|
247
|
-
"maxImagesReached": "Sie können bis zu {{max}} Bilder hochladen"
|
|
253
|
+
"maxImagesReached": "Sie können bis zu {{max}} Bilder hochladen",
|
|
254
|
+
"dragAndDropFiles": "Ziehen Sie Dateien hierher, um sie zur Chat hinzuzufügen"
|
|
248
255
|
},
|
|
249
256
|
"media": {
|
|
250
257
|
"title": "Titel",
|
|
@@ -342,7 +349,8 @@
|
|
|
342
349
|
"termsOfService": "Nutzungsbedingungen",
|
|
343
350
|
"pAndCUAccepted": "Ich akzeptiere die Nutzungsbedingungen von Deep Thought",
|
|
344
351
|
"editAccount": "Konto bearbeiten",
|
|
345
|
-
"save": "Speichern"
|
|
352
|
+
"save": "Speichern",
|
|
353
|
+
"successfullyLoggedIn": "{{username}} hat sich erfolgreich angemeldet"
|
|
346
354
|
},
|
|
347
355
|
"chatLogs": {
|
|
348
356
|
"anyMessage": "Jede Nachricht",
|
package/src/locales/en.json
CHANGED
|
@@ -22,11 +22,17 @@
|
|
|
22
22
|
"all": "All",
|
|
23
23
|
"today": "Today",
|
|
24
24
|
"yesterday": "Yesterday",
|
|
25
|
+
"placeholder": "Ask a question",
|
|
25
26
|
"last_7_days": "Last 7 days",
|
|
26
27
|
"last_30_days": "Last 30 days",
|
|
27
28
|
"month": "Month",
|
|
29
|
+
"copied": "Copied!",
|
|
28
30
|
"year": "Year",
|
|
31
|
+
"dayPlaceholder": "DD",
|
|
32
|
+
"monthPlaceholder": "MM",
|
|
33
|
+
"yearPlaceholder": "YYYY",
|
|
29
34
|
"createdAt": "Creation date",
|
|
35
|
+
"date": "Birth date",
|
|
30
36
|
"selected": "Selected",
|
|
31
37
|
"page": "page",
|
|
32
38
|
"actions": "Actions",
|
|
@@ -105,6 +111,8 @@
|
|
|
105
111
|
"tokens": "Tokens",
|
|
106
112
|
"addToken": "Add token",
|
|
107
113
|
"usePassword": "Use password",
|
|
114
|
+
"passwordRequired": "Password required",
|
|
115
|
+
"invalidCredentials": "Invalid credentials",
|
|
108
116
|
"atLeast": "At least"
|
|
109
117
|
},
|
|
110
118
|
"widget": {
|
|
@@ -243,14 +251,15 @@
|
|
|
243
251
|
"upload": {
|
|
244
252
|
"loginRequired": "Login required",
|
|
245
253
|
"loginRequiredDescription": "Please login to upload images",
|
|
246
|
-
"uploadFiles": "Upload files",
|
|
247
|
-
"
|
|
254
|
+
"uploadFiles": "Upload files ({{shortcut}}+O to open file chooser)",
|
|
255
|
+
"uploadFilesWithShortcut": "{{shortcut}}+O to open file chooser",
|
|
256
|
+
"uploadImages": "Upload images",
|
|
248
257
|
"replace": "Replace",
|
|
249
258
|
"maxImagesReached": "You can upload up to {{max}} images",
|
|
250
259
|
"maxDocumentsReached": "You can upload up to {{max}} documents",
|
|
251
260
|
"remaining": "remaining",
|
|
252
261
|
"lastDocumentSlot": "Upload last document",
|
|
253
|
-
"
|
|
262
|
+
"uploadDocuments": "Upload documents",
|
|
254
263
|
"maxReached": "Max limit reached",
|
|
255
264
|
"imageTitle": "Image title: {{title}}",
|
|
256
265
|
"titleHelp": "Adding a descriptive title helps the AI provide more context and appropriate responses.",
|
|
@@ -259,12 +268,13 @@
|
|
|
259
268
|
"fileReadingFailed": "File reading failed",
|
|
260
269
|
"uploadFailed": "Upload failed",
|
|
261
270
|
"uploadSuccess": "Upload success",
|
|
262
|
-
"titleImage": "Image: {{title}}",
|
|
271
|
+
"titleImage": "Image title: {{title}}",
|
|
263
272
|
"uploadSuccessDescription": "The file has been uploaded successfully",
|
|
264
273
|
"titleImageUpload": "Upload images",
|
|
265
274
|
"partialUpload": "Only {{uploaded}} images on {{total}} will be uploaded. Maximum {{max}} images allowed.",
|
|
266
275
|
"maxImages": "Maximum {{max}} images allowed.",
|
|
267
|
-
"upload": "Upload"
|
|
276
|
+
"upload": "Upload",
|
|
277
|
+
"dragAndDropFiles": "Drag and drop files here to add them to the chat"
|
|
268
278
|
},
|
|
269
279
|
"media": {
|
|
270
280
|
"title": "Title",
|
|
@@ -406,7 +416,8 @@
|
|
|
406
416
|
"termsStatus": "Terms Status",
|
|
407
417
|
"enabled": "Enabled",
|
|
408
418
|
"disabled": "Disabled",
|
|
409
|
-
"advancedFeatures": "Advanced Features"
|
|
419
|
+
"advancedFeatures": "Advanced Features",
|
|
420
|
+
"successfullyLoggedIn": "{{username}} has successfully logged in"
|
|
410
421
|
},
|
|
411
422
|
"chatLogs": {
|
|
412
423
|
"anyMessage": "Any message",
|
package/src/locales/es.json
CHANGED
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
"yesterday": "Ayer",
|
|
25
25
|
"last_7_days": "Últimos 7 días",
|
|
26
26
|
"last_30_days": "Últimos 30 días",
|
|
27
|
+
"placeholder": "Haz una pregunta",
|
|
28
|
+
"date": "Fecha de nacimiento",
|
|
27
29
|
"month": "Mes",
|
|
30
|
+
"copied": "¡Copiado!",
|
|
28
31
|
"missingData": "Información faltante",
|
|
29
32
|
"year": "Año",
|
|
30
33
|
"createdAt": "Fecha de creación",
|
|
@@ -106,6 +109,8 @@
|
|
|
106
109
|
"tokens": "Fichas",
|
|
107
110
|
"addToken": "Agregar token",
|
|
108
111
|
"usePassword": "Usar contraseña",
|
|
112
|
+
"passwordRequired": "Contraseña obligatoria",
|
|
113
|
+
"invalidCredentials": "Credenciales no válidas",
|
|
109
114
|
"atLeast": "Al menos"
|
|
110
115
|
},
|
|
111
116
|
"widget": {
|
|
@@ -233,9 +238,10 @@
|
|
|
233
238
|
"upload": {
|
|
234
239
|
"loginRequired": "Connexion requise",
|
|
235
240
|
"loginRequiredDescription": "Veuillez vous connecter pour télécharger des images",
|
|
236
|
-
"uploadFiles": "Télécharger des fichiers",
|
|
237
|
-
"
|
|
238
|
-
"
|
|
241
|
+
"uploadFiles": "Télécharger des fichiers ({{shortcut}}+O para abrir el selector de archivos)",
|
|
242
|
+
"uploadFilesWithShortcut": "{{shortcut}}+O para abrir el selector de archivos",
|
|
243
|
+
"uploadImages": "Télécharger des images",
|
|
244
|
+
"uploadDocuments": "Télécharger des documents",
|
|
239
245
|
"apiClientNotConfigured": "API client non configuré correctement pour le téléchargement de médias",
|
|
240
246
|
"fileReadingFailed": "Échec de la lecture du fichier",
|
|
241
247
|
"uploadFailed": "Échec du téléchargement",
|
|
@@ -244,7 +250,8 @@
|
|
|
244
250
|
"replace": "Remplacer",
|
|
245
251
|
"maxImagesReached": "Vous pouvez télécharger jusqu'à {{max}} images",
|
|
246
252
|
"remaining": "restant",
|
|
247
|
-
"maxReached": "Limite atteinte"
|
|
253
|
+
"maxReached": "Limite atteinte",
|
|
254
|
+
"dragAndDropFiles": "Arrastre y suelte los archivos aquí para agregarlos a la chat"
|
|
248
255
|
},
|
|
249
256
|
"media": {
|
|
250
257
|
"title": "Título",
|
|
@@ -369,7 +376,8 @@
|
|
|
369
376
|
"termsOfService": "Términos de servicio",
|
|
370
377
|
"pAndCUAccepted": "Acepto los términos de servicio sobre Deep Thought",
|
|
371
378
|
"editAccount": "Editar cuenta",
|
|
372
|
-
"save": "Ahorrar"
|
|
379
|
+
"save": "Ahorrar",
|
|
380
|
+
"successfullyLoggedIn": "{{username}} ha iniciado sesión correctamente"
|
|
373
381
|
},
|
|
374
382
|
"chatLogs": {
|
|
375
383
|
"anyMessage": "Cualquier mensaje",
|
package/src/locales/fr.json
CHANGED
|
@@ -21,11 +21,14 @@
|
|
|
21
21
|
"day": "Jour",
|
|
22
22
|
"month": "Mois",
|
|
23
23
|
"year": "Année",
|
|
24
|
+
"placeholder": "Faites une question",
|
|
24
25
|
"createdAt": "Date de création",
|
|
25
26
|
"all": "Tous",
|
|
26
27
|
"today": "Aujourd'hui",
|
|
28
|
+
"date": "Date de naissance",
|
|
27
29
|
"yesterday": "Hier",
|
|
28
30
|
"last_7_days": "7 derniers jours",
|
|
31
|
+
"copied": "Copié !",
|
|
29
32
|
"missingData": "Informations manquantes",
|
|
30
33
|
"last_30_days": "30 derniers jours",
|
|
31
34
|
"selected": "Choisi",
|
|
@@ -104,6 +107,7 @@
|
|
|
104
107
|
"useRecoveryTokens": "Utiliser des jetons de récupération",
|
|
105
108
|
"tokens": "Jetons",
|
|
106
109
|
"addToken": "Ajouter un jeton",
|
|
110
|
+
"invalidCredentials": "Identifiants invalides",
|
|
107
111
|
"usePassword": "Utiliser le mot de passe",
|
|
108
112
|
"atLeast": "Au moins"
|
|
109
113
|
},
|
|
@@ -242,9 +246,10 @@
|
|
|
242
246
|
"upload": {
|
|
243
247
|
"loginRequired": "Connexion requise",
|
|
244
248
|
"loginRequiredDescription": "Veuillez vous connecter pour télécharger des images",
|
|
245
|
-
"uploadFiles": "Télécharger des fichiers",
|
|
246
|
-
"
|
|
247
|
-
"
|
|
249
|
+
"uploadFiles": "Télécharger des fichiers ({{shortcut}}+O pour ouvrir le sélecteur de fichiers)",
|
|
250
|
+
"uploadFilesWithShortcut": "{{shortcut}}+O pour ouvrir le sélecteur de fichiers",
|
|
251
|
+
"uploadImages": "Télécharger des images",
|
|
252
|
+
"uploadDocuments": "Télécharger des documents",
|
|
248
253
|
"replace": "Remplacer",
|
|
249
254
|
"remaining": "restant",
|
|
250
255
|
"maxReached": "Limite atteinte",
|
|
@@ -253,7 +258,8 @@
|
|
|
253
258
|
"fileReadingFailed": "Échec de la lecture du fichier",
|
|
254
259
|
"uploadFailed": "Échec du téléchargement",
|
|
255
260
|
"uploadSuccess": "Téléchargement réussi",
|
|
256
|
-
"uploadSuccessDescription": "Le fichier a été téléchargé avec succès"
|
|
261
|
+
"uploadSuccessDescription": "Le fichier a été téléchargé avec succès",
|
|
262
|
+
"dragAndDropFiles": "Glissez et déposez les fichiers ici pour les ajouter à la chat"
|
|
257
263
|
},
|
|
258
264
|
"media": {
|
|
259
265
|
"title": "Titre",
|
|
@@ -378,7 +384,8 @@
|
|
|
378
384
|
"termsOfService": "Conditions d'utilisation",
|
|
379
385
|
"pAndCUAccepted": "J'accepte les conditions d'utilisation de Deep Thought",
|
|
380
386
|
"editAccount": "Modifier le compte",
|
|
381
|
-
"save": "Sauvegarder"
|
|
387
|
+
"save": "Sauvegarder",
|
|
388
|
+
"successfullyLoggedIn": "{{username}} s'est connecté avec succès"
|
|
382
389
|
},
|
|
383
390
|
"chatLogs": {
|
|
384
391
|
"anyMessage": "Tout message",
|
package/src/locales/it.json
CHANGED
|
@@ -21,17 +21,23 @@
|
|
|
21
21
|
"day": "Giorno",
|
|
22
22
|
"month": "Mese",
|
|
23
23
|
"year": "Anno",
|
|
24
|
+
"dayPlaceholder": "GG",
|
|
25
|
+
"monthPlaceholder": "MM",
|
|
26
|
+
"yearPlaceholder": "AAAA",
|
|
24
27
|
"createdAt": "Data creazione",
|
|
25
28
|
"selected": "Selezionati",
|
|
26
29
|
"page": "pagina",
|
|
27
30
|
"actions": "Azioni",
|
|
28
31
|
"next": "Successivo",
|
|
29
32
|
"all": "Tutti",
|
|
33
|
+
"copied": "Copiato!",
|
|
30
34
|
"today": "Oggi",
|
|
31
35
|
"yesterday": "Ieri",
|
|
36
|
+
"date": "Data di nascita",
|
|
32
37
|
"last_7_days": "Ultimi 7 giorni",
|
|
33
38
|
"last_30_days": "Ultimi 30 giorni",
|
|
34
39
|
"previous": "Precedente",
|
|
40
|
+
"placeholder": "Fai una domanda",
|
|
35
41
|
"copy": "Copia",
|
|
36
42
|
"copyRawCode": "Copia codice sorgente",
|
|
37
43
|
"copyToClipboard": "Copia negli appunti",
|
|
@@ -106,6 +112,7 @@
|
|
|
106
112
|
"tokens": "Token",
|
|
107
113
|
"addToken": "Aggiungi token",
|
|
108
114
|
"usePassword": "Utilizza la password",
|
|
115
|
+
"invalidCredentials": "Credenziali non valide",
|
|
109
116
|
"atLeast": "Almeno"
|
|
110
117
|
},
|
|
111
118
|
"widget": {
|
|
@@ -268,10 +275,11 @@
|
|
|
268
275
|
"upload": {
|
|
269
276
|
"loginRequired": "Login richiesto",
|
|
270
277
|
"loginRequiredDescription": "Per caricare immagini, devi prima accedere",
|
|
271
|
-
"uploadFiles": "Carica file",
|
|
272
|
-
"
|
|
278
|
+
"uploadFiles": "Carica file ({{shortcut}}+O per aprire il selettore file)",
|
|
279
|
+
"uploadFilesWithShortcut": "{{shortcut}}+O per aprire il selettore file",
|
|
280
|
+
"uploadImages": "Carica immagini",
|
|
273
281
|
"lastDocumentSlot": "Carica ultimo documento",
|
|
274
|
-
"
|
|
282
|
+
"uploadDocuments": "Carica documenti",
|
|
275
283
|
"maxDocumentsReached": "Puoi caricare fino a {{max}} documenti",
|
|
276
284
|
"replace": "Sostituisci documento",
|
|
277
285
|
"maxImagesReached": "Puoi caricare fino a {{max}} immagini",
|
|
@@ -281,13 +289,14 @@
|
|
|
281
289
|
"uploadSuccess": "Caricamento riuscito",
|
|
282
290
|
"remaining": "rimanenti",
|
|
283
291
|
"maxReached": "Limite raggiunto",
|
|
284
|
-
"titleImage": "
|
|
292
|
+
"titleImage": "Titolo immagine: {{title}}",
|
|
285
293
|
"titleImageUpload": "Carica immagini",
|
|
286
294
|
"titleHelp": "Aggiungi un titolo descrittivo per aiutare l'AI a fornire risposte più appropriate.",
|
|
287
295
|
"titlePlaceholder": "Inserisci il titolo dell'immagine",
|
|
288
296
|
"uploadSuccessDescription": "Il file è stato caricato con successo",
|
|
289
297
|
"partialUpload": "Solo {{uploaded}} immagini su {{total}} immagini saranno caricate. Massimo {{max}} immagini consentite.",
|
|
290
|
-
"cancel": "Annulla"
|
|
298
|
+
"cancel": "Annulla",
|
|
299
|
+
"dragAndDropFiles": "Trascina qui i file per aggiungerli alla chat"
|
|
291
300
|
},
|
|
292
301
|
"gamification": {
|
|
293
302
|
"level": "Livello",
|
|
@@ -406,7 +415,8 @@
|
|
|
406
415
|
"termsOfService": "i termini del servizio",
|
|
407
416
|
"pAndCUAccepted": "Accetto le condizioni di utilizzo relative a Pensiero Profondo",
|
|
408
417
|
"editAccount": "Modifica account",
|
|
409
|
-
"save": "Salva"
|
|
418
|
+
"save": "Salva",
|
|
419
|
+
"successfullyLoggedIn": "{{username}} ha effettuato l'accesso con successo"
|
|
410
420
|
},
|
|
411
421
|
"chatLogs": {
|
|
412
422
|
"atLeast": "Almeno {{count}} messaggi",
|
package/src/mocks/data.ts
CHANGED
|
@@ -474,7 +474,8 @@ export const historyWithAIGeneratedMessages: Message[] = [
|
|
|
474
474
|
timestamp: '2021-03-01T12:00:00.000Z',
|
|
475
475
|
},
|
|
476
476
|
{
|
|
477
|
-
text: 'Sa. Sa. Prova',
|
|
477
|
+
text: 'Sa. Sa. Prova. Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
|
|
478
|
+
generatedByAI: true,
|
|
478
479
|
timestamp: '2021-03-01T12:00:00.000Z',
|
|
479
480
|
},
|
|
480
481
|
{
|
|
@@ -504,8 +505,9 @@ export const historyWithAIGeneratedMessages: Message[] = [
|
|
|
504
505
|
timestamp: '2021-03-01T12:00:00.000Z',
|
|
505
506
|
},
|
|
506
507
|
{
|
|
507
|
-
text: 'Arrivederci.',
|
|
508
|
+
text: 'Arrivederci. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
508
509
|
timestamp: '2021-03-01T12:00:00.000Z',
|
|
510
|
+
generatedByAI: true,
|
|
509
511
|
contextVars: {
|
|
510
512
|
TEST: 'test',
|
|
511
513
|
},
|