@memori.ai/memori-react 7.30.0 → 7.30.1
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 +14 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +38 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +181 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +1 -0
- package/dist/components/ChatBubble/VirtualizedContent/VirtualizedContent.d.ts +7 -0
- package/dist/components/ChatBubble/VirtualizedContent/VirtualizedContent.js +69 -0
- package/dist/components/ChatBubble/VirtualizedContent/VirtualizedContent.js.map +1 -0
- package/dist/components/ChatHistoryDrawer/ChatHistory.css +67 -39
- package/dist/components/ChatHistoryDrawer/ChatHistory.d.ts +4 -2
- package/dist/components/ChatHistoryDrawer/ChatHistory.js +87 -12
- package/dist/components/ChatHistoryDrawer/ChatHistory.js.map +1 -1
- package/dist/components/Header/Header.js +3 -4
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +1 -11
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/locales/de.json +1 -0
- package/dist/locales/en.json +1 -0
- package/dist/locales/es.json +1 -0
- package/dist/locales/fr.json +1 -0
- package/dist/locales/it.json +1 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +38 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +177 -0
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +1 -0
- package/esm/components/ChatBubble/VirtualizedContent/VirtualizedContent.d.ts +7 -0
- package/esm/components/ChatBubble/VirtualizedContent/VirtualizedContent.js +67 -0
- package/esm/components/ChatBubble/VirtualizedContent/VirtualizedContent.js.map +1 -0
- package/esm/components/ChatHistoryDrawer/ChatHistory.css +67 -39
- package/esm/components/ChatHistoryDrawer/ChatHistory.d.ts +4 -2
- package/esm/components/ChatHistoryDrawer/ChatHistory.js +88 -13
- package/esm/components/ChatHistoryDrawer/ChatHistory.js.map +1 -1
- package/esm/components/Header/Header.js +3 -4
- package/esm/components/Header/Header.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +1 -11
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/locales/de.json +1 -0
- package/esm/locales/en.json +1 -0
- package/esm/locales/es.json +1 -0
- package/esm/locales/fr.json +1 -0
- package/esm/locales/it.json +1 -0
- package/package.json +1 -1
- package/src/components/ChatHistoryDrawer/ChatHistory.css +67 -39
- package/src/components/ChatHistoryDrawer/ChatHistory.stories.tsx +7 -7
- package/src/components/ChatHistoryDrawer/ChatHistory.test.tsx +4 -0
- package/src/components/ChatHistoryDrawer/ChatHistory.tsx +300 -92
- package/src/components/Header/Header.tsx +4 -7
- package/src/components/Header/__snapshots__/Header.test.tsx.snap +26 -472
- package/src/components/MemoriWidget/MemoriWidget.tsx +11 -10
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +1 -30
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +2 -60
- package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +1 -30
- package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +1 -30
- package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +1 -30
- package/src/locales/de.json +1 -0
- package/src/locales/en.json +1 -0
- package/src/locales/es.json +1 -0
- package/src/locales/fr.json +1 -0
- package/src/locales/it.json +1 -0
- package/src/components/ChatHistoryDrawer/ChatHistory.scss +0 -41
- package/src/components/ExportHistoryButton/ExportHistoryButton.stories.tsx +0 -73
- package/src/components/ExportHistoryButton/ExportHistoryButton.test.tsx +0 -69
- package/src/components/ExportHistoryButton/ExportHistoryButton.tsx +0 -103
- package/src/components/ExportHistoryButton/__snapshots__/ExportHistoryButton.test.tsx.snap +0 -239
package/esm/locales/de.json
CHANGED
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"pageInstructExplanation": "Um mir neue Dinge beizubringen, klicken Sie auf die Schaltfläche \"ANLEITEN\", um zu beginnen",
|
|
122
122
|
"pageTryMeExplanation": "Um mit mir zu sprechen, klicken Sie auf die Schaltfläche START, um zu beginnen",
|
|
123
123
|
"pagePrivacyExplanation": "Die Konversationen sind sichtbar von dem Autor des Agenten",
|
|
124
|
+
"downloadChat": "Chat herunterladen",
|
|
124
125
|
"pagePrivacyExplanationList": {
|
|
125
126
|
"allConversations": "Alle Konversationen mit diesem Agenten sind sichtbar von dem Autor des Agenten",
|
|
126
127
|
"anonymousUser": "Für anonyme Benutzer: der Autor wird den Inhalt der Konversation und Ihre IP-Adresse sehen",
|
package/esm/locales/en.json
CHANGED
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"pageInstructExplanation": "To teach me new things click on the INSTRUCT ME button to get started",
|
|
122
122
|
"pageTryMeExplanation": "To talk to me click on the START button to get started",
|
|
123
123
|
"pagePrivacyExplanation": "The conversations are visible by the author of the agent",
|
|
124
|
+
"downloadChat": "Download chat",
|
|
124
125
|
"pagePrivacyExplanationList": {
|
|
125
126
|
"allConversations": "All conversations with this agent are visible to the author of the agent",
|
|
126
127
|
"anonymousUser": "For anonymous users: the author will see the content of the conversation and your IP address",
|
package/esm/locales/es.json
CHANGED
|
@@ -128,6 +128,7 @@
|
|
|
128
128
|
"authorUsesInfo": "El autor utiliza estas informaciones para mejorar las funciones del agente y para ofrecerte un mejor servicio. Continuando la conversación, acepta estas condiciones."
|
|
129
129
|
},
|
|
130
130
|
"instructButton": "INSTRUÍME",
|
|
131
|
+
"downloadChat": "Descargar chat",
|
|
131
132
|
"tryMeButton": "COMENZAR",
|
|
132
133
|
"chatHistory": "Historial de chat",
|
|
133
134
|
"chatHistoryDescription": "Mostrar el historial de chat con este agente",
|
package/esm/locales/fr.json
CHANGED
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"pageTryMeExplanation": "Pour me parler, cliquez sur le bouton START pour commencer",
|
|
131
131
|
"pagePrivacyExplanation": "Les conversations sont visibles par l'auteur de l'agent",
|
|
132
132
|
"pagePrivacyExplanationTooltip": "En commençant la conversation, nous vous informons que :\n\n- Toutes les conversations avec cet agent sont visibles par l'auteur de l'agent\n- Si vous utilisez la chat comme utilisateur anonyme, l'auteur pourra voir le contenu de la conversation et votre adresse IP\n- Si vous utilisez la chat comme utilisateur enregistré (connecté), l'auteur pourra voir le contenu de la conversation et votre nom d'utilisateur\n- L'auteur utilise ces informations pour améliorer les fonctionnalités de l'agent et pour vous fournir un meilleur service\n- En continuant la conversation, vous acceptez ces conditions.",
|
|
133
|
+
"downloadChat": "Télécharger le chat",
|
|
133
134
|
"instructButton": "INSTRUCTEZ-MOI",
|
|
134
135
|
"tryMeButton": "COMMENCER",
|
|
135
136
|
"chatHistory": "Historique des discussions",
|
package/esm/locales/it.json
CHANGED
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"pageInstructExplanation": "Per insegnarmi nuove cose clicca sul pulsante ISTRUISCIMI per cominciare",
|
|
122
122
|
"pageTryMeExplanation": "Per parlare con me clicca sul pulsante INIZIAMO per cominciare",
|
|
123
123
|
"pagePrivacyExplanation": "Le conversazioni sono visibili all'autore dell'agente",
|
|
124
|
+
"downloadChat": "Scarica chat",
|
|
124
125
|
"pagePrivacyExplanationList": {
|
|
125
126
|
"allConversations": "Tutte le conversazioni con questo agente sono visibili all'autore dell'agente",
|
|
126
127
|
"anonymousUser": "Per utenti anonimi: l'autore vedrà il contenuto e l'indirizzo IP",
|
package/package.json
CHANGED
|
@@ -105,18 +105,49 @@
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.memori-chat-history-drawer--card--content {
|
|
108
|
+
position: relative;
|
|
108
109
|
display: flex;
|
|
110
|
+
height: 100%;
|
|
109
111
|
flex-direction: column;
|
|
110
|
-
padding: 1rem;
|
|
111
|
-
border-top: 1px solid var(--memori-border);
|
|
112
|
-
background-color: var(--memori-background-alt);
|
|
113
|
-
gap: 1rem;
|
|
114
112
|
}
|
|
115
113
|
|
|
116
|
-
.memori-chat-history-drawer--card--content--
|
|
114
|
+
.memori-chat-history-drawer--card--content--header {
|
|
115
|
+
position: absolute;
|
|
116
|
+
z-index: 10;
|
|
117
|
+
right: 12px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.memori-chat-history-drawer--card--content--export-button {
|
|
117
121
|
display: flex;
|
|
118
|
-
|
|
119
|
-
|
|
122
|
+
align-items: center;
|
|
123
|
+
padding: 8px;
|
|
124
|
+
border: none;
|
|
125
|
+
background: transparent;
|
|
126
|
+
color: var(--memori-text-color, #666);
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
gap: 8px;
|
|
129
|
+
transition: color 0.2s ease;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.memori-chat-history-drawer--card--content--export-button:hover {
|
|
133
|
+
color: var(--memori-primary);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.memori-chat-history-drawer--card--content--export-button--content {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 8px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.memori-chat-history-drawer--card--content--export-button--icon {
|
|
143
|
+
width: 16px;
|
|
144
|
+
height: 16px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.memori-chat-history-drawer--card--content--messages {
|
|
148
|
+
flex: 1;
|
|
149
|
+
padding: 16px;
|
|
150
|
+
overflow-y: auto;
|
|
120
151
|
}
|
|
121
152
|
|
|
122
153
|
.memori-chat-history-drawer--card--content--messages .memori-chat--cover {
|
|
@@ -143,55 +174,40 @@
|
|
|
143
174
|
|
|
144
175
|
.memori-chat-history-drawer--card--content--actions {
|
|
145
176
|
position: sticky;
|
|
177
|
+
z-index: 10;
|
|
178
|
+
right: 0;
|
|
146
179
|
bottom: 0;
|
|
180
|
+
left: 0;
|
|
147
181
|
display: flex;
|
|
148
|
-
width: 100%;
|
|
149
182
|
justify-content: center;
|
|
150
|
-
padding:
|
|
151
|
-
|
|
152
|
-
margin-top: 1rem;
|
|
153
|
-
background-color: var(--memori-background-alt);
|
|
183
|
+
padding: 16px;
|
|
184
|
+
background: linear-gradient(to top, var(--memori-background-color, #fff) 80%, transparent);
|
|
154
185
|
}
|
|
155
186
|
|
|
156
187
|
.memori-chat-history-drawer--card--content--resume-button {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
transition:
|
|
188
|
+
display: flex;
|
|
189
|
+
min-width: 200px;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
padding: 12px 24px;
|
|
193
|
+
border-radius: 24px;
|
|
194
|
+
gap: 8px;
|
|
195
|
+
transition: transform 0.2s ease;
|
|
165
196
|
}
|
|
166
197
|
|
|
167
198
|
.memori-chat-history-drawer--card--content--resume-button:hover {
|
|
168
|
-
|
|
169
|
-
backdrop-filter: blur(0);
|
|
170
|
-
background-color: var(--memori-primary);
|
|
171
|
-
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.27), 0 2px 4px -1px rgba(0, 0, 0, 0.35);
|
|
172
|
-
color: var(--memori-primary-text);
|
|
173
|
-
transform: translateY(-1px);
|
|
199
|
+
transform: translateY(-2px);
|
|
174
200
|
}
|
|
175
201
|
|
|
176
202
|
.memori-chat-history-drawer--card--content--resume-button--content {
|
|
177
203
|
display: flex;
|
|
178
204
|
align-items: center;
|
|
179
|
-
gap:
|
|
205
|
+
gap: 8px;
|
|
180
206
|
}
|
|
181
207
|
|
|
182
208
|
.memori-chat-history-drawer--card--content--resume-button--icon {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.memori-chat-history-drawer--card--content--resume-button:hover
|
|
188
|
-
.memori-chat-history-drawer--card--content--resume-button--icon {
|
|
189
|
-
color: #fff;
|
|
190
|
-
transform: scale(1.1);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.memori-chat-history-drawer--card--content--resume-button--text {
|
|
194
|
-
font-weight: 500;
|
|
209
|
+
width: 20px;
|
|
210
|
+
height: 20px;
|
|
195
211
|
}
|
|
196
212
|
|
|
197
213
|
/* Loading state */
|
|
@@ -322,3 +338,15 @@
|
|
|
322
338
|
border-color: var(--memori-primary);
|
|
323
339
|
box-shadow: 0 0 0 2px var(--memori-primary-light);
|
|
324
340
|
}
|
|
341
|
+
|
|
342
|
+
.memori-chat-history-drawer--download-button-wrapper{
|
|
343
|
+
display: flex;
|
|
344
|
+
align-items: center;
|
|
345
|
+
gap: 8px;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.memori-chat-history-drawer--download-button-wrapper--text{
|
|
349
|
+
color: var(--memori-primary);
|
|
350
|
+
font-size: 0.875rem;
|
|
351
|
+
font-weight: 500;
|
|
352
|
+
}
|
|
@@ -167,18 +167,18 @@ const meta: Meta<typeof ChatHistory> = {
|
|
|
167
167
|
memori: mockMemori,
|
|
168
168
|
apiClient: mockApiClient as any,
|
|
169
169
|
onClose: () => console.log('Close button clicked'),
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
history: mockChatLogs.map(chatLog => ({
|
|
171
|
+
text: chatLog.lines[0].text,
|
|
172
|
+
fromUser: chatLog.lines[0].inbound,
|
|
173
|
+
timestamp: chatLog.lines[0].timestamp
|
|
174
|
+
})),
|
|
175
|
+
resumeSession: (chatLog: ChatLog) => {
|
|
176
|
+
console.log('Resume session called with:', chatLog);
|
|
172
177
|
}
|
|
173
178
|
},
|
|
174
179
|
// Add argTypes to configure controls in Storybook
|
|
175
180
|
argTypes: {
|
|
176
181
|
open: { control: 'boolean', description: 'Whether the drawer is open' },
|
|
177
|
-
layout: {
|
|
178
|
-
control: { type: 'select' },
|
|
179
|
-
options: ['DEFAULT', 'FLOATING', 'FULLPAGE', 'INLINE'],
|
|
180
|
-
description: 'Layout mode for the drawer'
|
|
181
|
-
},
|
|
182
182
|
onClose: { action: 'closed' },
|
|
183
183
|
resumeSession: { action: 'resumed session' }
|
|
184
184
|
}
|
|
@@ -29,6 +29,7 @@ const client = memoriApiClient();
|
|
|
29
29
|
it('renders ChatHistoryDrawer unchanged', () => {
|
|
30
30
|
const { container } = render(
|
|
31
31
|
<ChatHistoryDrawer
|
|
32
|
+
history={[]}
|
|
32
33
|
open={true}
|
|
33
34
|
onClose={jest.fn()}
|
|
34
35
|
apiClient={client}
|
|
@@ -45,6 +46,7 @@ it('renders ChatHistoryDrawer unchanged', () => {
|
|
|
45
46
|
it('renders ChatHistoryDrawer with chat logs unchanged', () => {
|
|
46
47
|
const { container } = render(
|
|
47
48
|
<ChatHistoryDrawer
|
|
49
|
+
history={[]}
|
|
48
50
|
open={true}
|
|
49
51
|
onClose={jest.fn()}
|
|
50
52
|
apiClient={client}
|
|
@@ -61,6 +63,7 @@ it('renders ChatHistoryDrawer with chat logs unchanged', () => {
|
|
|
61
63
|
it('renders ChatHistoryDrawer with selected chat log unchanged', () => {
|
|
62
64
|
const { container } = render(
|
|
63
65
|
<ChatHistoryDrawer
|
|
66
|
+
history={[]}
|
|
64
67
|
open={true}
|
|
65
68
|
onClose={jest.fn()}
|
|
66
69
|
apiClient={client}
|
|
@@ -77,6 +80,7 @@ it('renders ChatHistoryDrawer with selected chat log unchanged', () => {
|
|
|
77
80
|
it('renders ChatHistoryDrawer closed unchanged', () => {
|
|
78
81
|
const { container } = render(
|
|
79
82
|
<ChatHistoryDrawer
|
|
83
|
+
history={[]}
|
|
80
84
|
open={false}
|
|
81
85
|
onClose={jest.fn()}
|
|
82
86
|
apiClient={client}
|