@memori.ai/memori-react 2.18.3 → 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 +12 -0
- package/dist/components/MemoriWidget/MemoriWidget.js +61 -14
- 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/MemoriWidget/MemoriWidget.js +61 -14
- 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/MemoriWidget/MemoriWidget.tsx +55 -9
- 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');
|
|
@@ -956,7 +960,11 @@ const MemoriWidget = ({
|
|
|
956
960
|
recoveryTokens: recoveryTokens || memoriTokens,
|
|
957
961
|
tag,
|
|
958
962
|
pin,
|
|
959
|
-
initialContextVars
|
|
963
|
+
initialContextVars: {
|
|
964
|
+
PATHNAME: window.location.pathname,
|
|
965
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
966
|
+
...(initialContextVars || {}),
|
|
967
|
+
},
|
|
960
968
|
initialQuestion,
|
|
961
969
|
birthDate: birthDate || storageBirthDate || undefined,
|
|
962
970
|
additionalInfo: {
|
|
@@ -1082,7 +1090,11 @@ const MemoriWidget = ({
|
|
|
1082
1090
|
password: secret || memoriPwd || memori.secretToken,
|
|
1083
1091
|
tag: memori.giverTag,
|
|
1084
1092
|
pin: memori.giverPIN,
|
|
1085
|
-
initialContextVars
|
|
1093
|
+
initialContextVars: {
|
|
1094
|
+
PATHNAME: window.location.pathname,
|
|
1095
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
1096
|
+
...(initialContextVars || {}),
|
|
1097
|
+
},
|
|
1086
1098
|
initialQuestion,
|
|
1087
1099
|
birthDate: birthDate || storageBirthDate || undefined,
|
|
1088
1100
|
additionalInfo: {
|
|
@@ -1356,6 +1368,13 @@ const MemoriWidget = ({
|
|
|
1356
1368
|
: 'pl-PL-AgnieszkaNeural'
|
|
1357
1369
|
}`;
|
|
1358
1370
|
break;
|
|
1371
|
+
case 'FI':
|
|
1372
|
+
voice = `${
|
|
1373
|
+
memori.voiceType === 'MALE'
|
|
1374
|
+
? 'fi-FI-HarriNeural'
|
|
1375
|
+
: 'fi-FI-SelmaNeural'
|
|
1376
|
+
}`;
|
|
1377
|
+
break;
|
|
1359
1378
|
default:
|
|
1360
1379
|
voice = `${
|
|
1361
1380
|
memori.voiceType === 'MALE'
|
|
@@ -1405,6 +1424,9 @@ const MemoriWidget = ({
|
|
|
1405
1424
|
case 'PL':
|
|
1406
1425
|
voice = 'pl-PL';
|
|
1407
1426
|
break;
|
|
1427
|
+
case 'FI':
|
|
1428
|
+
voice = 'fi-FI';
|
|
1429
|
+
break;
|
|
1408
1430
|
default:
|
|
1409
1431
|
voice = 'it-IT';
|
|
1410
1432
|
break;
|
|
@@ -2242,7 +2264,11 @@ const MemoriWidget = ({
|
|
|
2242
2264
|
password: secret || memoriPwd || memori.secretToken,
|
|
2243
2265
|
tag: personification?.tag,
|
|
2244
2266
|
pin: personification?.pin,
|
|
2245
|
-
initialContextVars
|
|
2267
|
+
initialContextVars: {
|
|
2268
|
+
PATHNAME: window.location.pathname,
|
|
2269
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2270
|
+
...(initialContextVars || {}),
|
|
2271
|
+
},
|
|
2246
2272
|
initialQuestion,
|
|
2247
2273
|
birthDate: birth,
|
|
2248
2274
|
});
|
|
@@ -2324,7 +2350,11 @@ const MemoriWidget = ({
|
|
|
2324
2350
|
undefined,
|
|
2325
2351
|
memori?.giverTag,
|
|
2326
2352
|
memori?.giverPIN,
|
|
2327
|
-
|
|
2353
|
+
{
|
|
2354
|
+
PATHNAME: window.location.pathname,
|
|
2355
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2356
|
+
...(initialContextVars || {}),
|
|
2357
|
+
},
|
|
2328
2358
|
initialQuestion,
|
|
2329
2359
|
birth
|
|
2330
2360
|
).then(() => {
|
|
@@ -2371,7 +2401,11 @@ const MemoriWidget = ({
|
|
|
2371
2401
|
undefined,
|
|
2372
2402
|
personification.tag,
|
|
2373
2403
|
personification.pin,
|
|
2374
|
-
|
|
2404
|
+
{
|
|
2405
|
+
PATHNAME: window.location.pathname,
|
|
2406
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2407
|
+
...(initialContextVars || {}),
|
|
2408
|
+
},
|
|
2375
2409
|
initialQuestion,
|
|
2376
2410
|
birth
|
|
2377
2411
|
).then(() => {
|
|
@@ -2418,7 +2452,11 @@ const MemoriWidget = ({
|
|
|
2418
2452
|
undefined,
|
|
2419
2453
|
undefined,
|
|
2420
2454
|
undefined,
|
|
2421
|
-
|
|
2455
|
+
{
|
|
2456
|
+
PATHNAME: window.location.pathname,
|
|
2457
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2458
|
+
...(initialContextVars || {}),
|
|
2459
|
+
},
|
|
2422
2460
|
initialQuestion,
|
|
2423
2461
|
birth
|
|
2424
2462
|
).then(() => {
|
|
@@ -2737,7 +2775,11 @@ const MemoriWidget = ({
|
|
|
2737
2775
|
values['tokens'],
|
|
2738
2776
|
instruct ? memori.giverTag : undefined,
|
|
2739
2777
|
instruct ? memori.giverPIN : undefined,
|
|
2740
|
-
|
|
2778
|
+
{
|
|
2779
|
+
PATHNAME: window.location.pathname,
|
|
2780
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2781
|
+
...(initialContextVars || {}),
|
|
2782
|
+
},
|
|
2741
2783
|
initialQuestion,
|
|
2742
2784
|
birthDate
|
|
2743
2785
|
)
|
|
@@ -2772,7 +2814,11 @@ const MemoriWidget = ({
|
|
|
2772
2814
|
memoriTokens,
|
|
2773
2815
|
instruct ? memori.giverTag : undefined,
|
|
2774
2816
|
instruct ? memori.giverPIN : undefined,
|
|
2775
|
-
|
|
2817
|
+
{
|
|
2818
|
+
PATHNAME: window.location.pathname,
|
|
2819
|
+
ROUTE: window.location.pathname?.split('/')?.pop() || '',
|
|
2820
|
+
...(initialContextVars || {}),
|
|
2821
|
+
},
|
|
2776
2822
|
initialQuestion,
|
|
2777
2823
|
birthDate
|
|
2778
2824
|
)
|
package/src/helpers/constants.ts
CHANGED