@memori.ai/memori-react 2.18.3 → 2.18.5

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.
@@ -24,8 +24,13 @@
24
24
  .memori-website_assistant--close-button-wrapper {
25
25
  position: absolute;
26
26
  z-index: 1;
27
- top: 0;
28
- left: 0;
27
+ top: 100%;
28
+ right: 0;
29
+ }
30
+
31
+ .memori-website_assistant--close-button-wrapper button.memori-website_assistant--close-button {
32
+ padding: 1rem;
33
+ font-size: 16px;
29
34
  }
30
35
 
31
36
  .memori-website_assistant--trigger-button .memori-blob {
@@ -106,10 +111,9 @@
106
111
  }
107
112
 
108
113
  .memori-website_assistant-layout .memori--powered-by {
109
- top: 7.5px;
114
+ top: calc(100% + 10px);
110
115
  right: auto;
111
- bottom: auto;
112
- left: 45px;
116
+ left: 0;
113
117
  }
114
118
 
115
119
  .memori-widget.memori-layout-website_assistant {
@@ -133,12 +137,29 @@
133
137
 
134
138
  .memori-widget.memori-layout-website_assistant .memori-website_assistant--expanded {
135
139
  max-height: 60vh !important;
140
+ margin-bottom: 60px;
141
+ }
142
+
143
+ @keyframes showup {
144
+ 0% {
145
+ opacity: 0;
146
+ transform: translateY(100%);
147
+ }
148
+
149
+ 100% {
150
+ opacity: 1;
151
+ transform: translateY(0);
152
+ }
153
+ }
154
+
155
+ .memori-widget.memori-layout-website_assistant .memori-website_assistant--expanded .memori-website_assistant-layout {
156
+ animation: showup 0.3s ease-in-out;
136
157
  }
137
158
 
138
159
 
139
160
  @media (max-width: 600px) {
140
161
  .memori-widget.memori-layout-website_assistant .memori-website_assistant--expanded {
141
- max-height: 80vh;
162
+ min-width: 100% !important;
142
163
  }
143
164
  }
144
165
 
@@ -160,12 +181,12 @@
160
181
  text-align: right;
161
182
  }
162
183
 
163
- .memori-share-button .memori-share-button--overlay {
184
+ .memori-widget.memori-layout-website_assistant .memori-share-button .memori-share-button--overlay {
164
185
  z-index: 1000;
165
186
  top: -6rem;
166
187
  }
167
188
 
168
- .memori-header--button--fullscreen {
189
+ .memori-widget.memori-layout-website_assistant .memori-header--button--fullscreen {
169
190
  display: none;
170
191
  }
171
192
 
@@ -223,17 +244,15 @@
223
244
  background: none;
224
245
  }
225
246
 
226
- .memori-chat--bubble-initial+.memori-chat--bubble-container {
247
+ .memori-website_assistant-layout .memori-chat--bubble-initial+.memori-chat--bubble-container {
227
248
  margin-top: auto;
228
249
  }
229
250
 
230
-
231
-
232
251
  .memori-website_assistant-layout--controls {
233
252
  position: relative;
234
253
  z-index: 5;
235
254
  display: flex;
236
- height: calc(100% - 45px);
255
+ height: calc(100% - 60px);
237
256
  flex-direction: column;
238
257
  justify-content: flex-end;
239
258
  }
@@ -1,6 +1,6 @@
1
1
  .memori-drawer {
2
2
  position: relative;
3
- z-index: 1000;
3
+ z-index: 10000;
4
4
  }
5
5
 
6
6
  .memori-drawer--backdrop {
@@ -123,7 +123,7 @@
123
123
  background-color: #fff;
124
124
  }
125
125
 
126
- .memori-drawer--footer button + button {
126
+ .memori-drawer--footer button+button {
127
127
  margin-left: 0.5em;
128
128
  }
129
129
 
@@ -157,4 +157,4 @@
157
157
 
158
158
  .max-w-100 {
159
159
  max-width: 100%;
160
- }
160
+ }
@@ -11,6 +11,7 @@ exports.chatLanguages = [
11
11
  { value: 'UK', label: 'Українська' },
12
12
  { value: 'RU', label: 'Русский' },
13
13
  { value: 'PL', label: 'Polski' },
14
+ { value: 'FI', label: 'Suomi' },
14
15
  ];
15
16
  exports.allowedMediaTypes = [
16
17
  'image/jpeg',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/helpers/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IAC3B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;IAClC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACjC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAA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I,EAAE,KAAK;QACX,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,UAAU;QACpB,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,IAAI;KACjB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,iBAAiB;QAC3B,UAAU,EAAE,KAAK;KAClB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,kBAAkB;QAC5B,UAAU,EAAE,OAAO;KACpB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,eAAe;QACzB,UAAU,EAAE,QAAQ;KACrB;IACD;QACE,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,eAAe;QACzB,UAAU,EAAE,KAAK;KAClB;IACD;QACE,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,mBAAmB;QAC7B,UAAU,EAAE,KAAK;KAClB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,aAAa;QACvB,UAAU,EAAE,MAAM;KACnB;IACD;QACE,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,KAAK;KAClB;CACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  .memori-header {
2
2
  position: relative;
3
- z-index: 6;
3
+ z-index: 10000;
4
4
  width: calc(50% - 1rem);
5
5
  height: 50px;
6
6
  padding: calc(var(--memori-inner-content-pad) / 4) calc(var(--memori-inner-content-pad) / 2);
@@ -25,7 +25,7 @@
25
25
  justify-content: center;
26
26
  }
27
27
 
28
- .memori-header--button + .memori-header--button {
28
+ .memori-header--button+.memori-header--button {
29
29
  margin-left: 0.25rem;
30
30
  }
31
31
 
@@ -58,4 +58,4 @@
58
58
 
59
59
  .memori-header .memori-share-button {
60
60
  margin-left: 0.25rem;
61
- }
61
+ }
@@ -229,7 +229,7 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
229
229
  });
230
230
  };
231
231
  const sendMessage = async (text, media, newSessionId, translate = true, translatedText, hidden = false, typingText, useLoaderTextAsMsg = false, hasBatchQueued = false) => {
232
- var _a, _b;
232
+ var _a, _b, _c, _d;
233
233
  const sessionID = newSessionId ||
234
234
  sessionId ||
235
235
  ((_a = window.getMemoriState()) === null || _a === void 0 ? void 0 : _a.sessionID);
@@ -341,7 +341,11 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
341
341
  }
342
342
  else if (response.resultCode === 404) {
343
343
  setHistory(h => [...h.slice(0, h.length - 1)]);
344
- reopenSession(false, memoriPwd || memori.secretToken, memoriTokens, instruct && memori.giverTag ? memori.giverTag : undefined, instruct && memori.giverPIN ? memori.giverPIN : undefined, initialContextVars, initialQuestion).then(state => {
344
+ reopenSession(false, memoriPwd || memori.secretToken, memoriTokens, instruct && memori.giverTag ? memori.giverTag : undefined, instruct && memori.giverPIN ? memori.giverPIN : undefined, {
345
+ PATHNAME: window.location.pathname,
346
+ ROUTE: ((_d = (_c = window.location.pathname) === null || _c === void 0 ? void 0 : _c.split('/')) === null || _d === void 0 ? void 0 : _d.pop()) || '',
347
+ ...(initialContextVars || {}),
348
+ }, initialQuestion).then(state => {
345
349
  console.info('session timeout');
346
350
  if (state === null || state === void 0 ? void 0 : state.sessionID) {
347
351
  setTimeout(() => {
@@ -521,7 +525,7 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
521
525
  }
522
526
  };
523
527
  const reopenSession = async (updateDialogState = false, password, recoveryTokens, tag, pin, initialContextVars, initialQuestion, birthDate) => {
524
- var _a, _b;
528
+ var _a, _b, _c, _d;
525
529
  setLoading(true);
526
530
  try {
527
531
  let storageBirthDate = getLocalConfig('birthDate', undefined);
@@ -553,12 +557,16 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
553
557
  recoveryTokens: recoveryTokens || memoriTokens,
554
558
  tag,
555
559
  pin,
556
- initialContextVars,
560
+ initialContextVars: {
561
+ PATHNAME: window.location.pathname,
562
+ ROUTE: ((_c = (_b = window.location.pathname) === null || _b === void 0 ? void 0 : _b.split('/')) === null || _c === void 0 ? void 0 : _c.pop()) || '',
563
+ ...(initialContextVars || {}),
564
+ },
557
565
  initialQuestion,
558
566
  birthDate: birthDate || storageBirthDate || undefined,
559
567
  additionalInfo: {
560
568
  ...(additionalInfo || {}),
561
- loginToken: (_b = additionalInfo === null || additionalInfo === void 0 ? void 0 : additionalInfo.loginToken) !== null && _b !== void 0 ? _b : authToken,
569
+ loginToken: (_d = additionalInfo === null || additionalInfo === void 0 ? void 0 : additionalInfo.loginToken) !== null && _d !== void 0 ? _d : authToken,
562
570
  language: getCultureCodeByLanguage(userLang),
563
571
  referral: referral,
564
572
  },
@@ -615,7 +623,7 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
615
623
  return null;
616
624
  };
617
625
  const changeTag = async (memoriId, sessionId, tag, pin) => {
618
- var _a, _b;
626
+ var _a, _b, _c, _d;
619
627
  if (!memoriId || !sessionId) {
620
628
  console.error('CHANGETAG/Session not found');
621
629
  return Promise.reject('Session not found');
@@ -660,12 +668,16 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
660
668
  password: secret || memoriPwd || memori.secretToken,
661
669
  tag: memori.giverTag,
662
670
  pin: memori.giverPIN,
663
- initialContextVars,
671
+ initialContextVars: {
672
+ PATHNAME: window.location.pathname,
673
+ ROUTE: ((_c = (_b = window.location.pathname) === null || _b === void 0 ? void 0 : _b.split('/')) === null || _c === void 0 ? void 0 : _c.pop()) || '',
674
+ ...(initialContextVars || {}),
675
+ },
664
676
  initialQuestion,
665
677
  birthDate: birthDate || storageBirthDate || undefined,
666
678
  additionalInfo: {
667
679
  ...(additionalInfo || {}),
668
- loginToken: (_b = additionalInfo === null || additionalInfo === void 0 ? void 0 : additionalInfo.loginToken) !== null && _b !== void 0 ? _b : authToken,
680
+ loginToken: (_d = additionalInfo === null || additionalInfo === void 0 ? void 0 : additionalInfo.loginToken) !== null && _d !== void 0 ? _d : authToken,
669
681
  language: getCultureCodeByLanguage(userLang),
670
682
  referral: referral,
671
683
  },
@@ -874,6 +886,11 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
874
886
  ? 'pl-PL-MarekNeural'
875
887
  : 'pl-PL-AgnieszkaNeural'}`;
876
888
  break;
889
+ case 'FI':
890
+ voice = `${memori.voiceType === 'MALE'
891
+ ? 'fi-FI-HarriNeural'
892
+ : 'fi-FI-SelmaNeural'}`;
893
+ break;
877
894
  default:
878
895
  voice = `${memori.voiceType === 'MALE'
879
896
  ? 'it-IT-DiegoNeural'
@@ -917,6 +934,9 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
917
934
  case 'PL':
918
935
  voice = 'pl-PL';
919
936
  break;
937
+ case 'FI':
938
+ voice = 'fi-FI';
939
+ break;
920
940
  default:
921
941
  voice = 'it-IT';
922
942
  break;
@@ -1240,7 +1260,6 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
1240
1260
  try {
1241
1261
  clearListening();
1242
1262
  clearInteractionTimeout();
1243
- setHasUserActivatedSpeak(false);
1244
1263
  setClickedStart(false);
1245
1264
  timeoutRef.current = undefined;
1246
1265
  stopAudio();
@@ -1501,6 +1520,7 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
1501
1520
  };
1502
1521
  }, [sessionId, userLang]);
1503
1522
  const onClickStart = useCallback(async (session) => {
1523
+ var _a, _b, _c, _d, _f, _g, _h, _j;
1504
1524
  const sessionID = (session === null || session === void 0 ? void 0 : session.sessionID) || sessionId;
1505
1525
  const dialogState = (session === null || session === void 0 ? void 0 : session.dialogState) || currentDialogState;
1506
1526
  setClickedStart(true);
@@ -1537,7 +1557,11 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
1537
1557
  password: secret || memoriPwd || memori.secretToken,
1538
1558
  tag: personification === null || personification === void 0 ? void 0 : personification.tag,
1539
1559
  pin: personification === null || personification === void 0 ? void 0 : personification.pin,
1540
- initialContextVars,
1560
+ initialContextVars: {
1561
+ PATHNAME: window.location.pathname,
1562
+ ROUTE: ((_b = (_a = window.location.pathname) === null || _a === void 0 ? void 0 : _a.split('/')) === null || _b === void 0 ? void 0 : _b.pop()) || '',
1563
+ ...(initialContextVars || {}),
1564
+ },
1541
1565
  initialQuestion,
1542
1566
  birthDate: birth,
1543
1567
  });
@@ -1594,7 +1618,11 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
1594
1618
  }
1595
1619
  catch (e) {
1596
1620
  console.error('session #2', e);
1597
- reopenSession(true, memori === null || memori === void 0 ? void 0 : memori.secretToken, undefined, memori === null || memori === void 0 ? void 0 : memori.giverTag, memori === null || memori === void 0 ? void 0 : memori.giverPIN, initialContextVars, initialQuestion, birth).then(() => {
1621
+ reopenSession(true, memori === null || memori === void 0 ? void 0 : memori.secretToken, undefined, memori === null || memori === void 0 ? void 0 : memori.giverTag, memori === null || memori === void 0 ? void 0 : memori.giverPIN, {
1622
+ PATHNAME: window.location.pathname,
1623
+ ROUTE: ((_d = (_c = window.location.pathname) === null || _c === void 0 ? void 0 : _c.split('/')) === null || _d === void 0 ? void 0 : _d.pop()) || '',
1624
+ ...(initialContextVars || {}),
1625
+ }, initialQuestion, birth).then(() => {
1598
1626
  setHasUserActivatedSpeak(true);
1599
1627
  });
1600
1628
  }
@@ -1624,7 +1652,11 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
1624
1652
  }
1625
1653
  catch (e) {
1626
1654
  console.error('session #5', e);
1627
- reopenSession(true, memori === null || memori === void 0 ? void 0 : memori.secretToken, undefined, personification.tag, personification.pin, initialContextVars, initialQuestion, birth).then(() => {
1655
+ reopenSession(true, memori === null || memori === void 0 ? void 0 : memori.secretToken, undefined, personification.tag, personification.pin, {
1656
+ PATHNAME: window.location.pathname,
1657
+ ROUTE: ((_g = (_f = window.location.pathname) === null || _f === void 0 ? void 0 : _f.split('/')) === null || _g === void 0 ? void 0 : _g.pop()) || '',
1658
+ ...(initialContextVars || {}),
1659
+ }, initialQuestion, birth).then(() => {
1628
1660
  setHasUserActivatedSpeak(true);
1629
1661
  });
1630
1662
  }
@@ -1654,7 +1686,11 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
1654
1686
  }
1655
1687
  catch (e) {
1656
1688
  console.error('session #8', e);
1657
- reopenSession(true, memori === null || memori === void 0 ? void 0 : memori.secretToken, undefined, undefined, undefined, initialContextVars, initialQuestion, birth).then(() => {
1689
+ reopenSession(true, memori === null || memori === void 0 ? void 0 : memori.secretToken, undefined, undefined, undefined, {
1690
+ PATHNAME: window.location.pathname,
1691
+ ROUTE: ((_j = (_h = window.location.pathname) === null || _h === void 0 ? void 0 : _h.split('/')) === null || _j === void 0 ? void 0 : _j.pop()) || '',
1692
+ ...(initialContextVars || {}),
1693
+ }, initialQuestion, birth).then(() => {
1658
1694
  setHasUserActivatedSpeak(true);
1659
1695
  });
1660
1696
  }
@@ -1867,13 +1903,18 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
1867
1903
  ...currentDialogState,
1868
1904
  sessionID: sessionId,
1869
1905
  }), style: { height }, children: [_jsx(Layout, { Header: Header, headerProps: headerProps, Avatar: Avatar, avatarProps: avatarProps, Chat: Chat, chatProps: chatProps, StartPanel: StartPanel, startPanelProps: startPanelProps, integrationStyle: integrationStyle, integrationBackground: integrationBackground, ChangeMode: ChangeMode, changeModeProps: changeModeProps, poweredBy: poweredBy, sessionId: sessionId, hasUserActivatedSpeak: hasUserActivatedSpeak, showInstruct: showInstruct, loading: loading }), _jsx("audio", { id: "memori-audio", style: { display: 'none' }, src: "https://app.twincreator.com/intro.mp3" }), isClient && (_jsx(MemoriAuth, { withModal: true, pwdOrTokens: authModalState, openModal: !!authModalState, setPwdOrTokens: setAuthModalState, showTokens: memori.privacyType === 'SECRET', onFinish: async (values) => {
1906
+ var _a, _b;
1870
1907
  if (values['password'])
1871
1908
  setMemoriPwd(values['password']);
1872
1909
  if (values['password'])
1873
1910
  memoriPassword = values['password'];
1874
1911
  if (values['tokens'])
1875
1912
  setMemoriTokens(values['tokens']);
1876
- reopenSession(!sessionId, values['password'], values['tokens'], instruct ? memori.giverTag : undefined, instruct ? memori.giverPIN : undefined, initialContextVars, initialQuestion, birthDate)
1913
+ reopenSession(!sessionId, values['password'], values['tokens'], instruct ? memori.giverTag : undefined, instruct ? memori.giverPIN : undefined, {
1914
+ PATHNAME: window.location.pathname,
1915
+ ROUTE: ((_b = (_a = window.location.pathname) === null || _a === void 0 ? void 0 : _a.split('/')) === null || _b === void 0 ? void 0 : _b.pop()) || '',
1916
+ ...(initialContextVars || {}),
1917
+ }, initialQuestion, birthDate)
1877
1918
  .then(state => {
1878
1919
  setAuthModalState(null);
1879
1920
  onClickStart(state || undefined);
@@ -1883,10 +1924,15 @@ const MemoriWidget = ({ memori, memoriConfigs, memoriLang, multilingual, integra
1883
1924
  setGotErrorInOpening(true);
1884
1925
  });
1885
1926
  }, minimumNumberOfRecoveryTokens: (_y = memori === null || memori === void 0 ? void 0 : memori.minimumNumberOfRecoveryTokens) !== null && _y !== void 0 ? _y : 1 })), isClient && (_jsx(AgeVerificationModal, { visible: showAgeVerification, minAge: minAge, onClose: birthDate => {
1927
+ var _a, _b;
1886
1928
  if (birthDate) {
1887
1929
  setBirthDate(birthDate);
1888
1930
  setLocalConfig('birthDate', birthDate);
1889
- reopenSession(!sessionId, memoriPassword || memoriPwd || (memori === null || memori === void 0 ? void 0 : memori.secretToken), memoriTokens, instruct ? memori.giverTag : undefined, instruct ? memori.giverPIN : undefined, initialContextVars, initialQuestion, birthDate)
1931
+ reopenSession(!sessionId, memoriPassword || memoriPwd || (memori === null || memori === void 0 ? void 0 : memori.secretToken), memoriTokens, instruct ? memori.giverTag : undefined, instruct ? memori.giverPIN : undefined, {
1932
+ PATHNAME: window.location.pathname,
1933
+ ROUTE: ((_b = (_a = window.location.pathname) === null || _a === void 0 ? void 0 : _a.split('/')) === null || _b === void 0 ? void 0 : _b.pop()) || '',
1934
+ ...(initialContextVars || {}),
1935
+ }, initialQuestion, birthDate)
1890
1936
  .then(state => {
1891
1937
  setShowAgeVerification(false);
1892
1938
  setAuthModalState(null);