@memori.ai/memori-react 2.18.2 → 2.18.4
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/README.md +1 -1
- package/dist/components/Chat/Chat.js +4 -12
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +64 -25
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/helpers/constants.js +1 -0
- package/dist/helpers/constants.js.map +1 -1
- package/esm/components/Chat/Chat.js +4 -12
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +64 -25
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/helpers/constants.js +1 -0
- package/esm/helpers/constants.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Chat/Chat.tsx +6 -16
- package/src/components/MemoriWidget/MemoriWidget.tsx +62 -25
- package/src/components/StartPanel/__snapshots__/StartPanel.test.tsx.snap +6 -0
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +6 -0
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +6 -0
- package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +6 -0
- package/src/helpers/constants.ts +1 -0
|
@@ -679,7 +679,11 @@ const MemoriWidget = ({
|
|
|
679
679
|
memoriTokens,
|
|
680
680
|
instruct && memori.giverTag ? memori.giverTag : undefined,
|
|
681
681
|
instruct && memori.giverPIN ? memori.giverPIN : undefined,
|
|
682
|
-
|
|
682
|
+
{
|
|
683
|
+
PATHNAME: window.location.pathname,
|
|
684
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
685
|
+
...(initialContextVars || {}),
|
|
686
|
+
},
|
|
683
687
|
initialQuestion
|
|
684
688
|
).then(state => {
|
|
685
689
|
console.info('session timeout');
|
|
@@ -806,22 +810,13 @@ const MemoriWidget = ({
|
|
|
806
810
|
new Function(s.content ?? '')();
|
|
807
811
|
|
|
808
812
|
setTimeout(() => {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
0,
|
|
817
|
-
document.querySelector('.memori-chat--content')
|
|
818
|
-
?.scrollHeight ?? 0
|
|
819
|
-
);
|
|
820
|
-
} else {
|
|
821
|
-
document.querySelector('#end-messages-ref')?.scrollIntoView({
|
|
822
|
-
behavior: 'smooth',
|
|
823
|
-
});
|
|
824
|
-
}
|
|
813
|
+
document
|
|
814
|
+
.querySelector('.memori-chat--content')
|
|
815
|
+
?.scrollTo(
|
|
816
|
+
0,
|
|
817
|
+
document.querySelector('.memori-chat--content')?.scrollHeight ??
|
|
818
|
+
0
|
|
819
|
+
);
|
|
825
820
|
}, 400);
|
|
826
821
|
}, 1000);
|
|
827
822
|
} catch (e) {
|
|
@@ -965,7 +960,11 @@ const MemoriWidget = ({
|
|
|
965
960
|
recoveryTokens: recoveryTokens || memoriTokens,
|
|
966
961
|
tag,
|
|
967
962
|
pin,
|
|
968
|
-
initialContextVars
|
|
963
|
+
initialContextVars: {
|
|
964
|
+
PATHNAME: window.location.pathname,
|
|
965
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
966
|
+
...(initialContextVars || {}),
|
|
967
|
+
},
|
|
969
968
|
initialQuestion,
|
|
970
969
|
birthDate: birthDate || storageBirthDate || undefined,
|
|
971
970
|
additionalInfo: {
|
|
@@ -1091,7 +1090,11 @@ const MemoriWidget = ({
|
|
|
1091
1090
|
password: secret || memoriPwd || memori.secretToken,
|
|
1092
1091
|
tag: memori.giverTag,
|
|
1093
1092
|
pin: memori.giverPIN,
|
|
1094
|
-
initialContextVars
|
|
1093
|
+
initialContextVars: {
|
|
1094
|
+
PATHNAME: window.location.pathname,
|
|
1095
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
1096
|
+
...(initialContextVars || {}),
|
|
1097
|
+
},
|
|
1095
1098
|
initialQuestion,
|
|
1096
1099
|
birthDate: birthDate || storageBirthDate || undefined,
|
|
1097
1100
|
additionalInfo: {
|
|
@@ -1365,6 +1368,13 @@ const MemoriWidget = ({
|
|
|
1365
1368
|
: 'pl-PL-AgnieszkaNeural'
|
|
1366
1369
|
}`;
|
|
1367
1370
|
break;
|
|
1371
|
+
case 'FI':
|
|
1372
|
+
voice = `${
|
|
1373
|
+
memori.voiceType === 'MALE'
|
|
1374
|
+
? 'fi-FI-HarriNeural'
|
|
1375
|
+
: 'fi-FI-SelmaNeural'
|
|
1376
|
+
}`;
|
|
1377
|
+
break;
|
|
1368
1378
|
default:
|
|
1369
1379
|
voice = `${
|
|
1370
1380
|
memori.voiceType === 'MALE'
|
|
@@ -1414,6 +1424,9 @@ const MemoriWidget = ({
|
|
|
1414
1424
|
case 'PL':
|
|
1415
1425
|
voice = 'pl-PL';
|
|
1416
1426
|
break;
|
|
1427
|
+
case 'FI':
|
|
1428
|
+
voice = 'fi-FI';
|
|
1429
|
+
break;
|
|
1417
1430
|
default:
|
|
1418
1431
|
voice = 'it-IT';
|
|
1419
1432
|
break;
|
|
@@ -2251,7 +2264,11 @@ const MemoriWidget = ({
|
|
|
2251
2264
|
password: secret || memoriPwd || memori.secretToken,
|
|
2252
2265
|
tag: personification?.tag,
|
|
2253
2266
|
pin: personification?.pin,
|
|
2254
|
-
initialContextVars
|
|
2267
|
+
initialContextVars: {
|
|
2268
|
+
PATHNAME: window.location.pathname,
|
|
2269
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2270
|
+
...(initialContextVars || {}),
|
|
2271
|
+
},
|
|
2255
2272
|
initialQuestion,
|
|
2256
2273
|
birthDate: birth,
|
|
2257
2274
|
});
|
|
@@ -2333,7 +2350,11 @@ const MemoriWidget = ({
|
|
|
2333
2350
|
undefined,
|
|
2334
2351
|
memori?.giverTag,
|
|
2335
2352
|
memori?.giverPIN,
|
|
2336
|
-
|
|
2353
|
+
{
|
|
2354
|
+
PATHNAME: window.location.pathname,
|
|
2355
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2356
|
+
...(initialContextVars || {}),
|
|
2357
|
+
},
|
|
2337
2358
|
initialQuestion,
|
|
2338
2359
|
birth
|
|
2339
2360
|
).then(() => {
|
|
@@ -2380,7 +2401,11 @@ const MemoriWidget = ({
|
|
|
2380
2401
|
undefined,
|
|
2381
2402
|
personification.tag,
|
|
2382
2403
|
personification.pin,
|
|
2383
|
-
|
|
2404
|
+
{
|
|
2405
|
+
PATHNAME: window.location.pathname,
|
|
2406
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2407
|
+
...(initialContextVars || {}),
|
|
2408
|
+
},
|
|
2384
2409
|
initialQuestion,
|
|
2385
2410
|
birth
|
|
2386
2411
|
).then(() => {
|
|
@@ -2427,7 +2452,11 @@ const MemoriWidget = ({
|
|
|
2427
2452
|
undefined,
|
|
2428
2453
|
undefined,
|
|
2429
2454
|
undefined,
|
|
2430
|
-
|
|
2455
|
+
{
|
|
2456
|
+
PATHNAME: window.location.pathname,
|
|
2457
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2458
|
+
...(initialContextVars || {}),
|
|
2459
|
+
},
|
|
2431
2460
|
initialQuestion,
|
|
2432
2461
|
birth
|
|
2433
2462
|
).then(() => {
|
|
@@ -2746,7 +2775,11 @@ const MemoriWidget = ({
|
|
|
2746
2775
|
values['tokens'],
|
|
2747
2776
|
instruct ? memori.giverTag : undefined,
|
|
2748
2777
|
instruct ? memori.giverPIN : undefined,
|
|
2749
|
-
|
|
2778
|
+
{
|
|
2779
|
+
PATHNAME: window.location.pathname,
|
|
2780
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2781
|
+
...(initialContextVars || {}),
|
|
2782
|
+
},
|
|
2750
2783
|
initialQuestion,
|
|
2751
2784
|
birthDate
|
|
2752
2785
|
)
|
|
@@ -2781,7 +2814,11 @@ const MemoriWidget = ({
|
|
|
2781
2814
|
memoriTokens,
|
|
2782
2815
|
instruct ? memori.giverTag : undefined,
|
|
2783
2816
|
instruct ? memori.giverPIN : undefined,
|
|
2784
|
-
|
|
2817
|
+
{
|
|
2818
|
+
PATHNAME: window.location.pathname,
|
|
2819
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2820
|
+
...(initialContextVars || {}),
|
|
2821
|
+
},
|
|
2785
2822
|
initialQuestion,
|
|
2786
2823
|
birthDate
|
|
2787
2824
|
)
|
package/src/helpers/constants.ts
CHANGED