@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.
@@ -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
- initialContextVars,
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
- initialContextVars,
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
- initialContextVars,
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
- initialContextVars,
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
- initialContextVars,
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
- initialContextVars,
2817
+ {
2818
+ PATHNAME: window.location.pathname,
2819
+ ROUTE: window.location.pathname?.split('/')?.pop() || '',
2820
+ ...(initialContextVars || {}),
2821
+ },
2776
2822
  initialQuestion,
2777
2823
  birthDate
2778
2824
  )
@@ -602,6 +602,12 @@ exports[`renders StartPanel with integrationConfig unchanged 1`] = `
602
602
  >
603
603
  Polski
604
604
  </option>
605
+ <option
606
+ aria-label="Suomi"
607
+ value="FI"
608
+ >
609
+ Suomi
610
+ </option>
605
611
  </select>
606
612
  </div>
607
613
  <button
@@ -302,6 +302,12 @@ exports[`renders Chat layout unchanged 1`] = `
302
302
  >
303
303
  Polski
304
304
  </option>
305
+ <option
306
+ aria-label="Suomi"
307
+ value="FI"
308
+ >
309
+ Suomi
310
+ </option>
305
311
  </select>
306
312
  </div>
307
313
  <button
@@ -344,6 +344,12 @@ exports[`renders FullPage layout unchanged 1`] = `
344
344
  >
345
345
  Polski
346
346
  </option>
347
+ <option
348
+ aria-label="Suomi"
349
+ value="FI"
350
+ >
351
+ Suomi
352
+ </option>
347
353
  </select>
348
354
  </div>
349
355
  <button
@@ -395,6 +395,12 @@ exports[`renders Totem layout unchanged 1`] = `
395
395
  >
396
396
  Polski
397
397
  </option>
398
+ <option
399
+ aria-label="Suomi"
400
+ value="FI"
401
+ >
402
+ Suomi
403
+ </option>
398
404
  </select>
399
405
  </div>
400
406
  <button
@@ -8,6 +8,7 @@ export const chatLanguages = [
8
8
  { value: 'UK', label: 'Українська' },
9
9
  { value: 'RU', label: 'Русский' },
10
10
  { value: 'PL', label: 'Polski' },
11
+ { value: 'FI', label: 'Suomi' },
11
12
  ];
12
13
 
13
14
  export const allowedMediaTypes = [