@memori.ai/memori-react 8.10.0 → 8.11.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 +24 -0
- package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
- package/dist/components/MediaWidget/MediaItemWidget.js +7 -5
- package/dist/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +1 -5
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.js +7 -5
- package/esm/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +1 -5
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChatInputs/ChatInputs.tsx +0 -1
- package/src/components/MediaWidget/MediaItemWidget.stories.tsx +69 -0
- package/src/components/MediaWidget/MediaItemWidget.tsx +6 -12
- package/src/components/MemoriWidget/MemoriWidget.tsx +2 -9
- package/src/components/layouts/FullBody/FullBody.stories.tsx +111 -0
- package/src/components/layouts/Totem/Totem.stories.tsx +132 -0
- package/src/components/layouts/ZoomedFullBody/ZoomedFullBody.stories.tsx +132 -0
- package/src/components/layouts/layouts.stories.tsx +54 -508
- package/src/index.stories.tsx +1 -329
package/src/index.stories.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { Meta, Story } from '@storybook/react';
|
|
|
3
3
|
import Memori, { Props } from './index';
|
|
4
4
|
|
|
5
5
|
const meta: Meta = {
|
|
6
|
-
title: 'General/
|
|
6
|
+
title: 'General/Functionalities',
|
|
7
7
|
component: Memori,
|
|
8
8
|
argTypes: {
|
|
9
9
|
AZURE_COGNITIVE_SERVICES_TTS_KEY: {
|
|
@@ -22,37 +22,6 @@ export default meta;
|
|
|
22
22
|
|
|
23
23
|
const Template: Story<Props> = args => <Memori {...args} />;
|
|
24
24
|
|
|
25
|
-
// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
|
|
26
|
-
// https://storybook.js.org/docs/react/workflows/unit-testing
|
|
27
|
-
export const Anonymous = Template.bind({});
|
|
28
|
-
Anonymous.args = {
|
|
29
|
-
ownerUserName: 'nzambello',
|
|
30
|
-
memoriName: 'Nicola',
|
|
31
|
-
tenantID: 'www.aisuru.com',
|
|
32
|
-
engineURL: 'https://engine.memori.ai',
|
|
33
|
-
apiURL: 'https://backend.memori.ai',
|
|
34
|
-
baseURL: 'https://www.aisuru.com',
|
|
35
|
-
uiLang: 'IT',
|
|
36
|
-
spokenLang: 'IT',
|
|
37
|
-
enableAudio: true,
|
|
38
|
-
autoStart: true,
|
|
39
|
-
showChatHistory: true,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const Vaccaboia = Template.bind({});
|
|
43
|
-
Vaccaboia.args = {
|
|
44
|
-
ownerUserName: 'francesco.timo',
|
|
45
|
-
memoriName: 'AI-ssistantSafe',
|
|
46
|
-
tenantID: 'tecne.aclambda.online',
|
|
47
|
-
engineURL: 'https://engine.memori.ai',
|
|
48
|
-
apiURL: 'https://backend.memori.ai',
|
|
49
|
-
baseURL: 'https://www.aisuru.com',
|
|
50
|
-
uiLang: 'IT',
|
|
51
|
-
spokenLang: 'IT',
|
|
52
|
-
enableAudio: true,
|
|
53
|
-
autoStart: false,
|
|
54
|
-
showChatHistory: true,
|
|
55
|
-
};
|
|
56
25
|
|
|
57
26
|
export const WithInitialContextAndQuestion = Template.bind({});
|
|
58
27
|
WithInitialContextAndQuestion.args = {
|
|
@@ -131,300 +100,3 @@ WithUpload.args = {
|
|
|
131
100
|
showUpload: true,
|
|
132
101
|
};
|
|
133
102
|
|
|
134
|
-
export const Nunzio = Template.bind({});
|
|
135
|
-
Nunzio.args = {
|
|
136
|
-
ownerUserName: 'nunzio.fiore',
|
|
137
|
-
memoriName: 'Nunzio',
|
|
138
|
-
tenantID: 'aisuru.com',
|
|
139
|
-
engineURL: 'https://engine.memori.ai',
|
|
140
|
-
apiURL: 'https://backend.memori.ai',
|
|
141
|
-
baseURL: 'https://www.aisuru.com',
|
|
142
|
-
uiLang: 'it',
|
|
143
|
-
showShare: true,
|
|
144
|
-
showSettings: true,
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
export const Localhost = Template.bind({});
|
|
148
|
-
Localhost.args = {
|
|
149
|
-
memoriName: 'test9',
|
|
150
|
-
ownerUserName: 'andrea.patini',
|
|
151
|
-
memoriID: 'e31aa393-08c4-469a-b2e8-971eb45f4925',
|
|
152
|
-
ownerUserID: '9266e23e-6822-4658-bbb0-4bebbc232bd4',
|
|
153
|
-
tenantID: 'localhost:3000',
|
|
154
|
-
engineURL: 'http://localhost:7778',
|
|
155
|
-
apiURL: 'http://localhost:7778',
|
|
156
|
-
baseURL: 'http://localhost:3000',
|
|
157
|
-
uiLang: 'IT',
|
|
158
|
-
spokenLang: 'IT',
|
|
159
|
-
layout: 'FULLPAGE',
|
|
160
|
-
showInstruct: false,
|
|
161
|
-
showSettings: true,
|
|
162
|
-
showChatHistory: true,
|
|
163
|
-
showClear: false,
|
|
164
|
-
showTypingText: false,
|
|
165
|
-
showOnlyLastMessages: false,
|
|
166
|
-
showTranslationOriginal: false,
|
|
167
|
-
showCopyButton: false,
|
|
168
|
-
showShare: true,
|
|
169
|
-
showLogin: true,
|
|
170
|
-
useMathFormatting: false,
|
|
171
|
-
showUpload: false,
|
|
172
|
-
autoStart: false,
|
|
173
|
-
enableAudio: true,
|
|
174
|
-
integrationID: 'c13fe42a-2d25-4bde-a502-f34824cd4ff1',
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
export const LocalhostBoE = Template.bind({});
|
|
178
|
-
LocalhostBoE.args = {
|
|
179
|
-
memoriName: 'experts chairman',
|
|
180
|
-
ownerUserName: 'nicola',
|
|
181
|
-
memoriID: '2b094cd6-77b8-4e09-a807-0039b84c988e',
|
|
182
|
-
ownerUserID: '04a8cff9-13d6-4367-9cb2-72b9af9ee494',
|
|
183
|
-
tenantID: 'www.aisuru.com',
|
|
184
|
-
engineURL: 'http://localhost:7777',
|
|
185
|
-
apiURL: 'http://localhost:7778',
|
|
186
|
-
baseURL: 'http://localhost:3000',
|
|
187
|
-
uiLang: 'EN',
|
|
188
|
-
lang: 'IT',
|
|
189
|
-
layout: 'FULLPAGE',
|
|
190
|
-
showShare: true,
|
|
191
|
-
integrationID: '82f017cc-450b-4c47-acf5-47910d336ce9',
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
export const Staging = Template.bind({});
|
|
195
|
-
Staging.args = {
|
|
196
|
-
memoriName: 'Giuseppe Verdi',
|
|
197
|
-
ownerUserName: 'nunziofiore',
|
|
198
|
-
memoriID: 'b996dbb9-3728-44d6-96f7-9b728224698c',
|
|
199
|
-
ownerUserID: 'fbee9aaa-0c46-460e-9800-15e31d7c99c0',
|
|
200
|
-
tenantID: 'aisuru-staging.aclambda.online',
|
|
201
|
-
apiURL: 'https://backend-staging.memori.ai',
|
|
202
|
-
engineURL: 'https://engine-staging.memori.ai',
|
|
203
|
-
baseURL: 'https://aisuru-staging.aclambda.online',
|
|
204
|
-
uiLang: 'EN',
|
|
205
|
-
lang: 'IT',
|
|
206
|
-
layout: 'FULLPAGE',
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
export const Giovanna = Template.bind({});
|
|
210
|
-
Giovanna.args = {
|
|
211
|
-
memoriName: 'Giovanna',
|
|
212
|
-
ownerUserName: 'memoridev',
|
|
213
|
-
memoriID: '3b308d07-0ff8-4f18-b885-fad501164c43',
|
|
214
|
-
ownerUserID: '13ab0379-a51d-4a83-8389-4f4b95e15567',
|
|
215
|
-
tenantID: 'www.aisuru.com',
|
|
216
|
-
engineURL: 'https://engine.memori.ai',
|
|
217
|
-
apiURL: 'https://backend.memori.ai',
|
|
218
|
-
baseURL: 'https://www.aisuru.com',
|
|
219
|
-
uiLang: 'IT',
|
|
220
|
-
spokenLang: 'IT',
|
|
221
|
-
layout: 'ZOOMED_FULL_BODY',
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
export const CreaRiassunti = Template.bind({});
|
|
225
|
-
CreaRiassunti.args = {
|
|
226
|
-
memoriName: 'Crea Riassunti',
|
|
227
|
-
ownerUserName: 'patini929',
|
|
228
|
-
memoriID: '514dd043-ec26-4c57-a014-a512c9014822',
|
|
229
|
-
ownerUserID: '1941d326-6986-4fa1-872b-458d09fb654c',
|
|
230
|
-
tenantID: 'www.aisuru.com',
|
|
231
|
-
engineURL: 'https://engine.memori.ai',
|
|
232
|
-
apiURL: 'https://backend.memori.ai',
|
|
233
|
-
baseURL: 'https://www.aisuru.com',
|
|
234
|
-
uiLang: 'IT',
|
|
235
|
-
spokenLang: 'FR',
|
|
236
|
-
layout: 'CHAT',
|
|
237
|
-
showUpload: true,
|
|
238
|
-
showSettings: true,
|
|
239
|
-
showClear: false,
|
|
240
|
-
showAIicon: true,
|
|
241
|
-
showWhyThisAnswer: true,
|
|
242
|
-
showTypingText: false,
|
|
243
|
-
showOnlyLastMessages: false,
|
|
244
|
-
showTranslationOriginal: false,
|
|
245
|
-
showCopyButton: false,
|
|
246
|
-
showShare: true,
|
|
247
|
-
showLogin: false,
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
export const NunzioFiore = Template.bind({});
|
|
251
|
-
NunzioFiore.args = {
|
|
252
|
-
ownerUserName: 'nunzio.fiore',
|
|
253
|
-
memoriName: 'Nunzio',
|
|
254
|
-
tenantID: 'www.aisuru.com',
|
|
255
|
-
engineURL: 'https://engine.memori.ai',
|
|
256
|
-
apiURL: 'https://backend.memori.ai',
|
|
257
|
-
baseURL: 'https://www.aisuru.com',
|
|
258
|
-
uiLang: 'IT',
|
|
259
|
-
spokenLang: 'IT',
|
|
260
|
-
layout: 'ZOOMED_FULL_BODY',
|
|
261
|
-
showSettings: 'true',
|
|
262
|
-
showClear: 'false',
|
|
263
|
-
showAIicon: 'true',
|
|
264
|
-
showWhyThisAnswer: 'true',
|
|
265
|
-
showTypingText: 'false',
|
|
266
|
-
showOnlyLastMessages: 'false',
|
|
267
|
-
showTranslationOriginal: 'false',
|
|
268
|
-
showCopyButton: 'false',
|
|
269
|
-
showShare: 'true',
|
|
270
|
-
showLogin: 'false',
|
|
271
|
-
enableAudio: 'true',
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
export const TestCustomAnimationsWithRPMSequence = Template.bind({});
|
|
275
|
-
TestCustomAnimationsWithRPMSequence.args = {
|
|
276
|
-
memoriName: 'Dancing Avatar',
|
|
277
|
-
ownerUserName: 'andrea.patini3',
|
|
278
|
-
memoriID: '45420d30-a103-455c-bab1-b708a0566a02',
|
|
279
|
-
ownerUserID: '58770358-a5db-4b49-b3a4-734fc468e745',
|
|
280
|
-
tenantID: 'aisuru-staging.aclambda.online',
|
|
281
|
-
engineURL: 'https://engine-staging.memori.ai/memori/v2',
|
|
282
|
-
apiURL: 'https://backend-staging.memori.ai/api/v2',
|
|
283
|
-
baseURL: 'https://aisuru-staging.aclambda.online',
|
|
284
|
-
uiLang: 'IT',
|
|
285
|
-
spokenLang: 'IT',
|
|
286
|
-
layout: 'HIDDEN_CHAT',
|
|
287
|
-
showLogin: true,
|
|
288
|
-
autoStart: true,
|
|
289
|
-
integrationID: '2f6e11a0-d799-4974-aa17-cf111d0af82a',
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
export const TestCustomGLBSingleAnimation = Template.bind({});
|
|
293
|
-
TestCustomGLBSingleAnimation.args = {
|
|
294
|
-
memoriName: "Dragon's Journey",
|
|
295
|
-
ownerUserName: 'andrea.patini3',
|
|
296
|
-
memoriID: 'fa0568c0-aac2-494b-bde7-6a8ec7725a2d',
|
|
297
|
-
ownerUserID: '58770358-a5db-4b49-b3a4-734fc468e745',
|
|
298
|
-
tenantID: 'aisuru-staging.aclambda.online',
|
|
299
|
-
engineURL: 'https://engine-staging.memori.ai',
|
|
300
|
-
apiURL: 'https://backend-staging.memori.ai',
|
|
301
|
-
baseURL: 'https://aisuru-staging.aclambda.online',
|
|
302
|
-
uiLang: 'IT',
|
|
303
|
-
spokenLang: 'IT',
|
|
304
|
-
layout: 'TOTEM',
|
|
305
|
-
showInstruct: false,
|
|
306
|
-
showLogin: true,
|
|
307
|
-
showSettings: 'true',
|
|
308
|
-
showClear: 'false',
|
|
309
|
-
showTypingText: 'false',
|
|
310
|
-
showOnlyLastMessages: 'false',
|
|
311
|
-
showTranslationOriginal: 'false',
|
|
312
|
-
showCopyButton: 'false',
|
|
313
|
-
showShare: 'true',
|
|
314
|
-
useMathFormatting: 'false',
|
|
315
|
-
showUpload: 'false',
|
|
316
|
-
autoStart: 'false',
|
|
317
|
-
enableAudio: 'true',
|
|
318
|
-
integrationID: 'eea150e2-3ab3-47ae-a9ad-d3ea1704f623',
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
export const TestRPMEmotionFunction = Template.bind({});
|
|
322
|
-
TestRPMEmotionFunction.args = {
|
|
323
|
-
memoriName: 'Test RPM',
|
|
324
|
-
ownerUserName: 'andrea.patini3',
|
|
325
|
-
memoriID: '35b7059f-08f4-45ab-98d8-899957666b77',
|
|
326
|
-
ownerUserID: '58770358-a5db-4b49-b3a4-734fc468e745',
|
|
327
|
-
tenantID: 'aisuru-staging.aclambda.online',
|
|
328
|
-
engineURL: 'https://engine-staging.memori.ai',
|
|
329
|
-
apiURL: 'https://backend-staging.memori.ai',
|
|
330
|
-
baseURL: 'https://aisuru-staging.aclambda.online',
|
|
331
|
-
uiLang: 'IT',
|
|
332
|
-
showUpload: true,
|
|
333
|
-
spokenLang: 'IT',
|
|
334
|
-
layout: 'ZOOMED_FULL_BODY',
|
|
335
|
-
integrationID: '60a37903-44a2-48c2-82e3-c7b8b620cb64',
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
const TemplateWithBatchButton: Story<Props> = args => (
|
|
339
|
-
<div>
|
|
340
|
-
<button
|
|
341
|
-
style={{
|
|
342
|
-
position: 'fixed',
|
|
343
|
-
top: '0.5rem',
|
|
344
|
-
left: '0.5rem',
|
|
345
|
-
zIndex: 99999,
|
|
346
|
-
}}
|
|
347
|
-
onClick={() => {
|
|
348
|
-
window.typeBatchMessages([
|
|
349
|
-
{
|
|
350
|
-
message: 'uno di tre',
|
|
351
|
-
hidden: false,
|
|
352
|
-
waitForPrevious: true,
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
message: 'due di tre',
|
|
356
|
-
hidden: false,
|
|
357
|
-
waitForPrevious: true,
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
message: 'tre di tre',
|
|
361
|
-
hidden: false,
|
|
362
|
-
waitForPrevious: true,
|
|
363
|
-
},
|
|
364
|
-
]);
|
|
365
|
-
}}
|
|
366
|
-
>
|
|
367
|
-
Start Batch
|
|
368
|
-
</button>
|
|
369
|
-
<Memori {...args} />
|
|
370
|
-
</div>
|
|
371
|
-
);
|
|
372
|
-
export const WithBatch = TemplateWithBatchButton.bind({});
|
|
373
|
-
WithBatch.args = {
|
|
374
|
-
ownerUserName: 'nzambello',
|
|
375
|
-
memoriName: 'Nicola',
|
|
376
|
-
tenantID: 'aisuru.com',
|
|
377
|
-
apiURL: 'https://backend.memori.ai',
|
|
378
|
-
engineURL: 'https://engine.memori.ai',
|
|
379
|
-
baseURL: 'https://www.aisuru.com',
|
|
380
|
-
uiLang: 'it',
|
|
381
|
-
showShare: true,
|
|
382
|
-
showSettings: true,
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
export const WithCustomUserAvatar = Template.bind({});
|
|
386
|
-
WithCustomUserAvatar.args = {
|
|
387
|
-
ownerUserName: 'nzambello',
|
|
388
|
-
memoriName: 'Nicola',
|
|
389
|
-
tenantID: 'aisuru.com',
|
|
390
|
-
apiURL: 'https://backend.memori.ai',
|
|
391
|
-
engineURL: 'https://engine.memori.ai',
|
|
392
|
-
baseURL: 'https://www.aisuru.com',
|
|
393
|
-
uiLang: 'it',
|
|
394
|
-
showShare: true,
|
|
395
|
-
showSettings: true,
|
|
396
|
-
userAvatar: 'https://picsum.photos/200',
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
// export const Instruction = Template.bind({});
|
|
400
|
-
// Instruction.args = {
|
|
401
|
-
// ownerUserName: 'nzambello',
|
|
402
|
-
// memoriName: 'Nicola',
|
|
403
|
-
// tenantID: 'aisuru.com',
|
|
404
|
-
// apiURL: 'https://backend.memori.ai',
|
|
405
|
-
// baseURL: 'https://aisuru.com',
|
|
406
|
-
// uiLang: 'it',
|
|
407
|
-
// showShare: true,
|
|
408
|
-
// tag: 'giver',
|
|
409
|
-
// pin: 'giver pin',
|
|
410
|
-
// authToken: 'your login token',
|
|
411
|
-
// };
|
|
412
|
-
|
|
413
|
-
export const Test = Template.bind({});
|
|
414
|
-
Test.args = {
|
|
415
|
-
memoriName: "test23",
|
|
416
|
-
ownerUserName: "Andrea-Patini",
|
|
417
|
-
memoriID: "bb672b4a-712a-4298-b440-61bfe5d67489",
|
|
418
|
-
ownerUserID: "91dbc9ba-b684-4fbe-9828-b5980af6cda9",
|
|
419
|
-
tenantID: "aisuru-staging.aclambda.online",
|
|
420
|
-
apiURL: "https://backend-staging.memori.ai/api/v2",
|
|
421
|
-
engineURL: "https://engine-staging.memori.ai/memori/v2",
|
|
422
|
-
baseURL: "https://aisuru-staging.aclambda.online",
|
|
423
|
-
uiLang: "it",
|
|
424
|
-
spokenLang: "IT",
|
|
425
|
-
layout: "FULLPAGE",
|
|
426
|
-
multilingual: "false",
|
|
427
|
-
showSettings: "true",
|
|
428
|
-
showShare: "true",
|
|
429
|
-
integrationID: "59c6f519-d02a-46e1-9bfb-ef8cf1203ebf",
|
|
430
|
-
};
|