@memori.ai/memori-react 7.4.6 → 7.5.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 +25 -0
- package/README.md +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -0
- package/dist/components/Avatar/Avatar.js +64 -60
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/components/controls.d.ts +23 -0
- package/dist/components/Avatar/AvatarView/components/controls.js +55 -0
- package/dist/components/Avatar/AvatarView/components/controls.js.map +1 -0
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.d.ts +18 -0
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.js +60 -0
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.js.map +1 -0
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.d.ts +9 -0
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.js +39 -0
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.js.map +1 -0
- package/dist/components/Avatar/AvatarView/components/loader.d.ts +5 -0
- package/dist/components/Avatar/AvatarView/components/loader.js +12 -0
- package/dist/components/Avatar/AvatarView/components/loader.js.map +1 -0
- package/dist/components/Avatar/AvatarView/index.d.ts +18 -0
- package/dist/components/Avatar/AvatarView/index.js +109 -0
- package/dist/components/Avatar/AvatarView/index.js.map +1 -0
- package/dist/components/Avatar/AvatarView/utils/useEyeBlink.d.ts +2 -0
- package/dist/components/Avatar/AvatarView/utils/useEyeBlink.js +47 -0
- package/dist/components/Avatar/AvatarView/utils/useEyeBlink.js.map +1 -0
- package/dist/components/Avatar/AvatarView/utils/useHeadMovement.d.ts +2 -0
- package/dist/components/Avatar/AvatarView/utils/useHeadMovement.js +53 -0
- package/dist/components/Avatar/AvatarView/utils/useHeadMovement.js.map +1 -0
- package/dist/components/Avatar/AvatarView/utils/useLoadingMorphAnim.d.ts +2 -0
- package/dist/components/Avatar/AvatarView/utils/useLoadingMorphAnim.js +34 -0
- package/dist/components/Avatar/AvatarView/utils/useLoadingMorphAnim.js.map +1 -0
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.d.ts +2 -0
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.js +68 -0
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.js.map +1 -0
- package/dist/components/Avatar/AvatarView/utils/useSmile.d.ts +2 -0
- package/dist/components/Avatar/AvatarView/utils/useSmile.js +28 -0
- package/dist/components/Avatar/AvatarView/utils/useSmile.js.map +1 -0
- package/dist/components/Avatar/AvatarView/utils/utils.d.ts +13 -0
- package/dist/components/Avatar/AvatarView/utils/utils.js +42 -0
- package/dist/components/Avatar/AvatarView/utils/utils.js.map +1 -0
- package/dist/components/MemoriWidget/MemoriWidget.js +5 -0
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/StartPanel/StartPanel.js +3 -2
- package/dist/components/StartPanel/StartPanel.js.map +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/error.js +5 -0
- package/dist/helpers/error.js.map +1 -1
- package/dist/i18n.js +13 -1
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/locales/de.json +426 -0
- package/dist/locales/en.json +5 -0
- package/dist/locales/es.json +426 -0
- package/dist/locales/fr.json +426 -0
- package/dist/locales/it.json +5 -0
- package/esm/components/Avatar/Avatar.d.ts +1 -0
- package/esm/components/Avatar/Avatar.js +66 -62
- package/esm/components/Avatar/Avatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/components/controls.d.ts +23 -0
- package/esm/components/Avatar/AvatarView/components/controls.js +52 -0
- package/esm/components/Avatar/AvatarView/components/controls.js.map +1 -0
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.d.ts +18 -0
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.js +56 -0
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.js.map +1 -0
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.d.ts +9 -0
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.js +35 -0
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.js.map +1 -0
- package/esm/components/Avatar/AvatarView/components/loader.d.ts +5 -0
- package/esm/components/Avatar/AvatarView/components/loader.js +9 -0
- package/esm/components/Avatar/AvatarView/components/loader.js.map +1 -0
- package/esm/components/Avatar/AvatarView/index.d.ts +18 -0
- package/esm/components/Avatar/AvatarView/index.js +105 -0
- package/esm/components/Avatar/AvatarView/index.js.map +1 -0
- package/esm/components/Avatar/AvatarView/utils/useEyeBlink.d.ts +2 -0
- package/esm/components/Avatar/AvatarView/utils/useEyeBlink.js +44 -0
- package/esm/components/Avatar/AvatarView/utils/useEyeBlink.js.map +1 -0
- package/esm/components/Avatar/AvatarView/utils/useHeadMovement.d.ts +2 -0
- package/esm/components/Avatar/AvatarView/utils/useHeadMovement.js +50 -0
- package/esm/components/Avatar/AvatarView/utils/useHeadMovement.js.map +1 -0
- package/esm/components/Avatar/AvatarView/utils/useLoadingMorphAnim.d.ts +2 -0
- package/esm/components/Avatar/AvatarView/utils/useLoadingMorphAnim.js +31 -0
- package/esm/components/Avatar/AvatarView/utils/useLoadingMorphAnim.js.map +1 -0
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.d.ts +2 -0
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.js +65 -0
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.js.map +1 -0
- package/esm/components/Avatar/AvatarView/utils/useSmile.d.ts +2 -0
- package/esm/components/Avatar/AvatarView/utils/useSmile.js +25 -0
- package/esm/components/Avatar/AvatarView/utils/useSmile.js.map +1 -0
- package/esm/components/Avatar/AvatarView/utils/utils.d.ts +13 -0
- package/esm/components/Avatar/AvatarView/utils/utils.js +33 -0
- package/esm/components/Avatar/AvatarView/utils/utils.js.map +1 -0
- package/esm/components/MemoriWidget/MemoriWidget.js +6 -1
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/StartPanel/StartPanel.js +3 -2
- package/esm/components/StartPanel/StartPanel.js.map +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/error.js +5 -0
- package/esm/helpers/error.js.map +1 -1
- package/esm/i18n.js +13 -1
- package/esm/i18n.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +12 -1
- package/esm/index.js.map +1 -1
- package/esm/locales/de.json +426 -0
- package/esm/locales/en.json +5 -0
- package/esm/locales/es.json +426 -0
- package/esm/locales/fr.json +426 -0
- package/esm/locales/it.json +5 -0
- package/package.json +2 -1
- package/src/components/Avatar/Avatar.tsx +149 -144
- package/src/components/{AvatarView → Avatar/AvatarView}/AvatarView.stories.tsx +9 -2
- package/src/components/Avatar/AvatarView/components/controls.tsx +94 -0
- package/src/components/Avatar/AvatarView/components/fullbodyAvatar.tsx +120 -0
- package/src/components/Avatar/AvatarView/components/halfbodyAvatar.tsx +69 -0
- package/src/components/{AvatarView → Avatar/AvatarView}/components/loader.tsx +1 -1
- package/src/components/Avatar/AvatarView/index.tsx +251 -0
- package/src/components/Avatar/AvatarView/utils/useEyeBlink.ts +59 -0
- package/src/components/Avatar/AvatarView/utils/useMouthSpeaking.ts +87 -0
- package/src/components/Avatar/AvatarView/utils/useSmile.ts +39 -0
- package/src/components/Avatar/__snapshots__/Avatar.test.tsx.snap +1 -1
- package/src/components/MemoriWidget/MemoriWidget.tsx +11 -1
- package/src/components/StartPanel/StartPanel.tsx +3 -2
- package/src/components/layouts/Chat.test.tsx +12 -9
- package/src/components/layouts/FullPage.test.tsx +12 -9
- package/src/components/layouts/Totem.test.tsx +12 -9
- package/src/components/layouts/WebsiteAssistant.test.tsx +12 -9
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +13 -8
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +14 -9
- package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +14 -9
- package/src/components/layouts/__snapshots__/WebsiteAssistant.test.tsx.snap +6 -1
- package/src/helpers/constants.ts +2 -0
- package/src/helpers/error.ts +5 -0
- package/src/i18n.ts +13 -1
- package/src/index.stories.tsx +29 -0
- package/src/index.tsx +14 -3
- package/src/locales/de.json +454 -0
- package/src/locales/en.json +5 -0
- package/src/locales/es.json +426 -0
- package/src/locales/fr.json +426 -0
- package/src/locales/it.json +5 -0
- package/src/components/AvatarView/components/avatar.tsx +0 -57
- package/src/components/AvatarView/components/fullbodyAvatar.tsx +0 -99
- package/src/components/AvatarView/index.tsx +0 -101
- package/src/components/AvatarView/utils/useEyeBlink.ts +0 -48
- package/src/components/AvatarView/utils/useMouthSpeaking.ts +0 -70
- package/src/components/AvatarView/utils/useSmile.ts +0 -31
- /package/src/components/{AvatarView → Avatar/AvatarView}/utils/useHeadMovement.ts +0 -0
- /package/src/components/{AvatarView → Avatar/AvatarView}/utils/useLoadingMorphAnim.ts +0 -0
- /package/src/components/{AvatarView → Avatar/AvatarView}/utils/utils.ts +0 -0
|
@@ -69,7 +69,7 @@ exports[`renders Chat layout unchanged 1`] = `
|
|
|
69
69
|
<div
|
|
70
70
|
class="memori-export-history-button memori-header--button memori-header--button--export"
|
|
71
71
|
data-headlessui-state=""
|
|
72
|
-
title="
|
|
72
|
+
title="Vuoi esportare la cronologia chat?"
|
|
73
73
|
>
|
|
74
74
|
<button
|
|
75
75
|
class="memori-button memori-button--circle memori-button--icon-only memori-button--disabled"
|
|
@@ -97,7 +97,7 @@ exports[`renders Chat layout unchanged 1`] = `
|
|
|
97
97
|
</div>
|
|
98
98
|
<button
|
|
99
99
|
class="memori-button memori-button--primary memori-button--circle memori-button--padded memori-button--icon-only memori-header--button memori-header--button-settings"
|
|
100
|
-
title="
|
|
100
|
+
title="Impostazioni"
|
|
101
101
|
>
|
|
102
102
|
<span
|
|
103
103
|
class="memori-button--icon"
|
|
@@ -125,7 +125,7 @@ exports[`renders Chat layout unchanged 1`] = `
|
|
|
125
125
|
class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori-header--button memori-header--button-share memori-button--primary"
|
|
126
126
|
data-headlessui-state=""
|
|
127
127
|
id="headlessui-menu-button-:r5:"
|
|
128
|
-
title="
|
|
128
|
+
title="Condividi"
|
|
129
129
|
type="button"
|
|
130
130
|
>
|
|
131
131
|
<div
|
|
@@ -168,13 +168,13 @@ exports[`renders Chat layout unchanged 1`] = `
|
|
|
168
168
|
<div
|
|
169
169
|
class="memori-tooltip--content"
|
|
170
170
|
>
|
|
171
|
-
|
|
171
|
+
IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette
|
|
172
172
|
</div>
|
|
173
173
|
<div
|
|
174
174
|
class="memori-tooltip--trigger"
|
|
175
175
|
>
|
|
176
176
|
<span
|
|
177
|
-
aria-label="
|
|
177
|
+
aria-label="IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette"
|
|
178
178
|
>
|
|
179
179
|
<svg
|
|
180
180
|
aria-hidden="true"
|
|
@@ -244,7 +244,7 @@ exports[`renders Chat layout unchanged 1`] = `
|
|
|
244
244
|
for="user-lang-pref"
|
|
245
245
|
id="user-lang-pref-label"
|
|
246
246
|
>
|
|
247
|
-
|
|
247
|
+
Voglio parlare con Memori in
|
|
248
248
|
</label>
|
|
249
249
|
<select
|
|
250
250
|
aria-labelledby="user-lang-pref-label"
|
|
@@ -340,12 +340,12 @@ exports[`renders Chat layout unchanged 1`] = `
|
|
|
340
340
|
<button
|
|
341
341
|
class="memori-button memori-button--primary memori-button--rounded memori-button--padded memori--start-button"
|
|
342
342
|
>
|
|
343
|
-
|
|
343
|
+
INIZIAMO
|
|
344
344
|
</button>
|
|
345
345
|
<p
|
|
346
346
|
class="memori--start-description"
|
|
347
347
|
>
|
|
348
|
-
|
|
348
|
+
Per parlare con me clicca sul pulsante INIZIAMO per cominciare
|
|
349
349
|
</p>
|
|
350
350
|
</div>
|
|
351
351
|
</div>
|
|
@@ -373,5 +373,10 @@ exports[`renders Chat layout unchanged 1`] = `
|
|
|
373
373
|
style="display: none;"
|
|
374
374
|
/>
|
|
375
375
|
</div>
|
|
376
|
+
<script
|
|
377
|
+
async=""
|
|
378
|
+
id="MathJax-script"
|
|
379
|
+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
|
|
380
|
+
/>
|
|
376
381
|
</div>
|
|
377
382
|
`;
|
|
@@ -44,7 +44,7 @@ exports[`renders FullPage layout unchanged 1`] = `
|
|
|
44
44
|
<div
|
|
45
45
|
class="memori-export-history-button memori-header--button memori-header--button--export"
|
|
46
46
|
data-headlessui-state=""
|
|
47
|
-
title="
|
|
47
|
+
title="Vuoi esportare la cronologia chat?"
|
|
48
48
|
>
|
|
49
49
|
<button
|
|
50
50
|
class="memori-button memori-button--circle memori-button--icon-only memori-button--disabled"
|
|
@@ -72,7 +72,7 @@ exports[`renders FullPage layout unchanged 1`] = `
|
|
|
72
72
|
</div>
|
|
73
73
|
<button
|
|
74
74
|
class="memori-button memori-button--primary memori-button--circle memori-button--padded memori-button--icon-only memori-header--button memori-header--button-settings"
|
|
75
|
-
title="
|
|
75
|
+
title="Impostazioni"
|
|
76
76
|
>
|
|
77
77
|
<span
|
|
78
78
|
class="memori-button--icon"
|
|
@@ -100,7 +100,7 @@ exports[`renders FullPage layout unchanged 1`] = `
|
|
|
100
100
|
class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori-header--button memori-header--button-share memori-button--primary"
|
|
101
101
|
data-headlessui-state=""
|
|
102
102
|
id="headlessui-menu-button-:r5:"
|
|
103
|
-
title="
|
|
103
|
+
title="Condividi"
|
|
104
104
|
type="button"
|
|
105
105
|
>
|
|
106
106
|
<div
|
|
@@ -181,7 +181,7 @@ exports[`renders FullPage layout unchanged 1`] = `
|
|
|
181
181
|
<span
|
|
182
182
|
class="memori--avatar-toggle-text"
|
|
183
183
|
>
|
|
184
|
-
|
|
184
|
+
Nascondi
|
|
185
185
|
</span>
|
|
186
186
|
</button>
|
|
187
187
|
</div>
|
|
@@ -207,13 +207,13 @@ exports[`renders FullPage layout unchanged 1`] = `
|
|
|
207
207
|
<div
|
|
208
208
|
class="memori-tooltip--content"
|
|
209
209
|
>
|
|
210
|
-
|
|
210
|
+
IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette
|
|
211
211
|
</div>
|
|
212
212
|
<div
|
|
213
213
|
class="memori-tooltip--trigger"
|
|
214
214
|
>
|
|
215
215
|
<span
|
|
216
|
-
aria-label="
|
|
216
|
+
aria-label="IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette"
|
|
217
217
|
>
|
|
218
218
|
<svg
|
|
219
219
|
aria-hidden="true"
|
|
@@ -283,7 +283,7 @@ exports[`renders FullPage layout unchanged 1`] = `
|
|
|
283
283
|
for="user-lang-pref"
|
|
284
284
|
id="user-lang-pref-label"
|
|
285
285
|
>
|
|
286
|
-
|
|
286
|
+
Voglio parlare con Memori in
|
|
287
287
|
</label>
|
|
288
288
|
<select
|
|
289
289
|
aria-labelledby="user-lang-pref-label"
|
|
@@ -379,12 +379,12 @@ exports[`renders FullPage layout unchanged 1`] = `
|
|
|
379
379
|
<button
|
|
380
380
|
class="memori-button memori-button--primary memori-button--rounded memori-button--padded memori--start-button"
|
|
381
381
|
>
|
|
382
|
-
|
|
382
|
+
INIZIAMO
|
|
383
383
|
</button>
|
|
384
384
|
<p
|
|
385
385
|
class="memori--start-description"
|
|
386
386
|
>
|
|
387
|
-
|
|
387
|
+
Per parlare con me clicca sul pulsante INIZIAMO per cominciare
|
|
388
388
|
</p>
|
|
389
389
|
</div>
|
|
390
390
|
</div>
|
|
@@ -435,5 +435,10 @@ exports[`renders FullPage layout unchanged 1`] = `
|
|
|
435
435
|
style="display: none;"
|
|
436
436
|
/>
|
|
437
437
|
</div>
|
|
438
|
+
<script
|
|
439
|
+
async=""
|
|
440
|
+
id="MathJax-script"
|
|
441
|
+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
|
|
442
|
+
/>
|
|
438
443
|
</div>
|
|
439
444
|
`;
|
|
@@ -100,7 +100,7 @@ exports[`renders Totem layout unchanged 1`] = `
|
|
|
100
100
|
<div
|
|
101
101
|
class="memori-export-history-button memori-header--button memori-header--button--export"
|
|
102
102
|
data-headlessui-state=""
|
|
103
|
-
title="
|
|
103
|
+
title="Vuoi esportare la cronologia chat?"
|
|
104
104
|
>
|
|
105
105
|
<button
|
|
106
106
|
class="memori-button memori-button--circle memori-button--icon-only memori-button--disabled"
|
|
@@ -128,7 +128,7 @@ exports[`renders Totem layout unchanged 1`] = `
|
|
|
128
128
|
</div>
|
|
129
129
|
<button
|
|
130
130
|
class="memori-button memori-button--primary memori-button--circle memori-button--padded memori-button--icon-only memori-header--button memori-header--button-settings"
|
|
131
|
-
title="
|
|
131
|
+
title="Impostazioni"
|
|
132
132
|
>
|
|
133
133
|
<span
|
|
134
134
|
class="memori-button--icon"
|
|
@@ -156,7 +156,7 @@ exports[`renders Totem layout unchanged 1`] = `
|
|
|
156
156
|
class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori-header--button memori-header--button-share memori-button--primary"
|
|
157
157
|
data-headlessui-state=""
|
|
158
158
|
id="headlessui-menu-button-:r5:"
|
|
159
|
-
title="
|
|
159
|
+
title="Condividi"
|
|
160
160
|
type="button"
|
|
161
161
|
>
|
|
162
162
|
<div
|
|
@@ -235,7 +235,7 @@ exports[`renders Totem layout unchanged 1`] = `
|
|
|
235
235
|
<span
|
|
236
236
|
class="memori--avatar-toggle-text"
|
|
237
237
|
>
|
|
238
|
-
|
|
238
|
+
Nascondi
|
|
239
239
|
</span>
|
|
240
240
|
</button>
|
|
241
241
|
</div>
|
|
@@ -261,13 +261,13 @@ exports[`renders Totem layout unchanged 1`] = `
|
|
|
261
261
|
<div
|
|
262
262
|
class="memori-tooltip--content"
|
|
263
263
|
>
|
|
264
|
-
|
|
264
|
+
IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette
|
|
265
265
|
</div>
|
|
266
266
|
<div
|
|
267
267
|
class="memori-tooltip--trigger"
|
|
268
268
|
>
|
|
269
269
|
<span
|
|
270
|
-
aria-label="
|
|
270
|
+
aria-label="IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette"
|
|
271
271
|
>
|
|
272
272
|
<svg
|
|
273
273
|
aria-hidden="true"
|
|
@@ -337,7 +337,7 @@ exports[`renders Totem layout unchanged 1`] = `
|
|
|
337
337
|
for="user-lang-pref"
|
|
338
338
|
id="user-lang-pref-label"
|
|
339
339
|
>
|
|
340
|
-
|
|
340
|
+
Voglio parlare con Memori in
|
|
341
341
|
</label>
|
|
342
342
|
<select
|
|
343
343
|
aria-labelledby="user-lang-pref-label"
|
|
@@ -433,12 +433,12 @@ exports[`renders Totem layout unchanged 1`] = `
|
|
|
433
433
|
<button
|
|
434
434
|
class="memori-button memori-button--primary memori-button--rounded memori-button--padded memori--start-button"
|
|
435
435
|
>
|
|
436
|
-
|
|
436
|
+
INIZIAMO
|
|
437
437
|
</button>
|
|
438
438
|
<p
|
|
439
439
|
class="memori--start-description"
|
|
440
440
|
>
|
|
441
|
-
|
|
441
|
+
Per parlare con me clicca sul pulsante INIZIAMO per cominciare
|
|
442
442
|
</p>
|
|
443
443
|
</div>
|
|
444
444
|
</div>
|
|
@@ -466,5 +466,10 @@ exports[`renders Totem layout unchanged 1`] = `
|
|
|
466
466
|
style="display: none;"
|
|
467
467
|
/>
|
|
468
468
|
</div>
|
|
469
|
+
<script
|
|
470
|
+
async=""
|
|
471
|
+
id="MathJax-script"
|
|
472
|
+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
|
|
473
|
+
/>
|
|
469
474
|
</div>
|
|
470
475
|
`;
|
|
@@ -19,7 +19,7 @@ exports[`renders WEBSITE_ASSISTANT layout unchanged 1`] = `
|
|
|
19
19
|
>
|
|
20
20
|
<button
|
|
21
21
|
class="memori-button memori-button--ghost memori-button--circle memori-button--padded memori-website_assistant--trigger-button"
|
|
22
|
-
title="
|
|
22
|
+
title="Espandi"
|
|
23
23
|
>
|
|
24
24
|
<div
|
|
25
25
|
class="memori-blob"
|
|
@@ -56,5 +56,10 @@ exports[`renders WEBSITE_ASSISTANT layout unchanged 1`] = `
|
|
|
56
56
|
style="display: none;"
|
|
57
57
|
/>
|
|
58
58
|
</div>
|
|
59
|
+
<script
|
|
60
|
+
async=""
|
|
61
|
+
id="MathJax-script"
|
|
62
|
+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
|
|
63
|
+
/>
|
|
59
64
|
</div>
|
|
60
65
|
`;
|
package/src/helpers/constants.ts
CHANGED
package/src/helpers/error.ts
CHANGED
|
@@ -38,6 +38,8 @@ const errors = {
|
|
|
38
38
|
USER_CANT_ENABLE_DCM_INTEGRATION: -43,
|
|
39
39
|
USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS: -44,
|
|
40
40
|
USER_CREATION_BILLING_DENIED_PERMISSION: -46,
|
|
41
|
+
USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS: -47,
|
|
42
|
+
USER_CANT_BE_DELETED: -48,
|
|
41
43
|
|
|
42
44
|
MEMORI_NOT_FOUND: -51,
|
|
43
45
|
MEMORI_NOT_ACCESSIBLE: -52,
|
|
@@ -145,6 +147,7 @@ const errors = {
|
|
|
145
147
|
IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR: -1506,
|
|
146
148
|
IMPORTCSV_INVALID_RECEIVER_ID: -1507,
|
|
147
149
|
IMPORTCSV_INVALID_MEDIA_LINK: -1508,
|
|
150
|
+
IMPORTCSV_INVALID_LINK_TITLE_HANDLING: -1509,
|
|
148
151
|
IMPORTCSV_UNDETECTABLE_CHAR_ENCODING: -1521,
|
|
149
152
|
IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI: -1531,
|
|
150
153
|
|
|
@@ -152,6 +155,7 @@ const errors = {
|
|
|
152
155
|
IMPORTTXT_INVALID_GRANULARITY: -1602,
|
|
153
156
|
IMPORTTXT_INVALID_RECEIVER_ID: -1603,
|
|
154
157
|
IMPORTTXT_INVALID_MEDIA_LINK: -1604,
|
|
158
|
+
IMPORTTXT_INVALID_LINK_TITLE_HANDLING: -1605,
|
|
155
159
|
IMPORTTXT_UNDETECTABLE_CHAR_ENCODING: -1621,
|
|
156
160
|
IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI: -1631,
|
|
157
161
|
IMPORTTXT_IMPORT_LIMIT_EXCEEDED: -1632,
|
|
@@ -203,6 +207,7 @@ const errors = {
|
|
|
203
207
|
COMPLETION_CONFIG_MISSING_API_KEY: -2404,
|
|
204
208
|
COMPLETION_CONFIG_MISSING_MODEL: -2405,
|
|
205
209
|
COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED: -2406,
|
|
210
|
+
COMPLETION_CONFIG_INVALID_NAME: -2407,
|
|
206
211
|
COMPLETION_CONFIG_INVALID_PURPOSE: -2411,
|
|
207
212
|
COMPLETION_CONFIG_INVALID_ENDPOINT: -2412,
|
|
208
213
|
COMPLETION_CONFIG_INCONSISTENT_ENDPOINT: -2413,
|
package/src/i18n.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { createInstance } from 'i18next';
|
|
2
2
|
import it from './locales/it.json';
|
|
3
3
|
import en from './locales/en.json';
|
|
4
|
+
import fr from './locales/fr.json';
|
|
5
|
+
import de from './locales/de.json';
|
|
6
|
+
import es from './locales/es.json';
|
|
4
7
|
|
|
5
8
|
const resources = {
|
|
6
9
|
en: {
|
|
@@ -9,13 +12,22 @@ const resources = {
|
|
|
9
12
|
it: {
|
|
10
13
|
translation: it,
|
|
11
14
|
},
|
|
15
|
+
es: {
|
|
16
|
+
translation: es,
|
|
17
|
+
},
|
|
18
|
+
fr: {
|
|
19
|
+
translation: fr,
|
|
20
|
+
},
|
|
21
|
+
de: {
|
|
22
|
+
translation: de,
|
|
23
|
+
},
|
|
12
24
|
};
|
|
13
25
|
|
|
14
26
|
const i18n = createInstance({
|
|
15
27
|
resources,
|
|
16
28
|
lng: 'en',
|
|
17
29
|
fallbackLng: 'it',
|
|
18
|
-
supportedLngs: ['en', 'it'],
|
|
30
|
+
supportedLngs: ['en', 'it', 'fr', 'es', 'de'],
|
|
19
31
|
nonExplicitSupportedLngs: true,
|
|
20
32
|
interpolation: {
|
|
21
33
|
escapeValue: false,
|
package/src/index.stories.tsx
CHANGED
|
@@ -82,6 +82,35 @@ Staging.args = {
|
|
|
82
82
|
layout: 'FULLPAGE',
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
+
export const ProductionTotem = Template.bind({});
|
|
86
|
+
ProductionTotem.args = {
|
|
87
|
+
memoriName: 'Prova12345',
|
|
88
|
+
ownerUserName: 'patini929',
|
|
89
|
+
memoriID: '514dd043-ec26-4c57-a014-a512c9014822',
|
|
90
|
+
ownerUserID: '1941d326-6986-4fa1-872b-458d09fb654c',
|
|
91
|
+
tenantID: 'www.aisuru.com',
|
|
92
|
+
engineURL: 'https://engine.memori.ai',
|
|
93
|
+
apiURL: 'https://backend.memori.ai',
|
|
94
|
+
baseURL: 'https://www.aisuru.com',
|
|
95
|
+
uiLang: 'IT',
|
|
96
|
+
spokenLang: 'FR',
|
|
97
|
+
layout: 'FULLPAGE',
|
|
98
|
+
|
|
99
|
+
showInstruct: false,
|
|
100
|
+
showSettings: true,
|
|
101
|
+
showClear: false,
|
|
102
|
+
showAIicon: 'true',
|
|
103
|
+
showWhyThisAnswer: true,
|
|
104
|
+
showTypingText: false,
|
|
105
|
+
showOnlyLastMessages: false,
|
|
106
|
+
showTranslationOriginal: false,
|
|
107
|
+
showCopyButton: false,
|
|
108
|
+
showShare: true,
|
|
109
|
+
showLogin: false,
|
|
110
|
+
enableAudio: true,
|
|
111
|
+
integrationID: '37d368cf-6241-4cc8-a1f3-742786f22431',
|
|
112
|
+
};
|
|
113
|
+
|
|
85
114
|
const TemplateWithBatchButton: Story<Props> = args => (
|
|
86
115
|
<div>
|
|
87
116
|
<button
|
package/src/index.tsx
CHANGED
|
@@ -14,7 +14,7 @@ import { getTenant } from './helpers/tenant';
|
|
|
14
14
|
import { installMathJax } from './helpers/utils';
|
|
15
15
|
|
|
16
16
|
import i18n from './i18n';
|
|
17
|
-
import {
|
|
17
|
+
import { useTranslation } from 'react-i18next';
|
|
18
18
|
import I18nWrapper from './I18nWrapper';
|
|
19
19
|
|
|
20
20
|
export interface Props {
|
|
@@ -48,7 +48,7 @@ export interface Props {
|
|
|
48
48
|
pin?: string;
|
|
49
49
|
context?: { [key: string]: string };
|
|
50
50
|
initialQuestion?: string;
|
|
51
|
-
uiLang?: 'en' | 'it' | 'IT' | 'EN';
|
|
51
|
+
uiLang?: 'en' | 'it' | 'fr' | 'es' | 'de' | 'IT' | 'EN' | 'FR' | 'ES' | 'DE';
|
|
52
52
|
spokenLang?: string;
|
|
53
53
|
multilingual?: boolean;
|
|
54
54
|
authToken?: string;
|
|
@@ -343,7 +343,18 @@ Memori.propTypes = {
|
|
|
343
343
|
pin: PropTypes.string,
|
|
344
344
|
context: PropTypes.objectOf(PropTypes.any),
|
|
345
345
|
initialQuestion: PropTypes.string,
|
|
346
|
-
uiLang: PropTypes.oneOf([
|
|
346
|
+
uiLang: PropTypes.oneOf([
|
|
347
|
+
'en',
|
|
348
|
+
'it',
|
|
349
|
+
'fr',
|
|
350
|
+
'es',
|
|
351
|
+
'de',
|
|
352
|
+
'EN',
|
|
353
|
+
'IT',
|
|
354
|
+
'FR',
|
|
355
|
+
'ES',
|
|
356
|
+
'DE',
|
|
357
|
+
]),
|
|
347
358
|
spokenLang: PropTypes.string,
|
|
348
359
|
multilingual: PropTypes.bool,
|
|
349
360
|
authToken: PropTypes.string,
|