@memori.ai/memori-react 7.23.1 → 7.25.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 +38 -0
- package/dist/components/ChatBubble/ChatBubble.css +4 -0
- package/dist/components/ChatBubble/ChatBubble.js +5 -75
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/CompletionProviderStatus/CompletionProviderStatus.js +1 -1
- package/dist/components/CompletionProviderStatus/CompletionProviderStatus.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +22 -18
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/StartPanel/StartPanel.css +1 -0
- package/dist/components/StartPanel/StartPanel.d.ts +4 -1
- package/dist/components/StartPanel/StartPanel.js +7 -2
- package/dist/components/StartPanel/StartPanel.js.map +1 -1
- package/dist/components/UploadButton/UploadButton.js +53 -22
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/WhyThisAnswer/WhyThisAnswer.js +1 -1
- package/dist/components/WhyThisAnswer/WhyThisAnswer.js.map +1 -1
- package/dist/components/ui/Expandable.d.ts +3 -2
- package/dist/components/ui/Expandable.js +35 -20
- package/dist/components/ui/Expandable.js.map +1 -1
- package/dist/helpers/constants.d.ts +2 -0
- package/dist/helpers/constants.js +3 -1
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/message.d.ts +5 -0
- package/dist/helpers/message.js +96 -0
- package/dist/helpers/message.js.map +1 -0
- package/esm/components/ChatBubble/ChatBubble.css +4 -0
- package/esm/components/ChatBubble/ChatBubble.js +6 -76
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/CompletionProviderStatus/CompletionProviderStatus.js +1 -1
- package/esm/components/CompletionProviderStatus/CompletionProviderStatus.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +22 -18
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/StartPanel/StartPanel.css +1 -0
- package/esm/components/StartPanel/StartPanel.d.ts +4 -1
- package/esm/components/StartPanel/StartPanel.js +7 -2
- package/esm/components/StartPanel/StartPanel.js.map +1 -1
- package/esm/components/UploadButton/UploadButton.js +53 -22
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/WhyThisAnswer/WhyThisAnswer.js +1 -1
- package/esm/components/WhyThisAnswer/WhyThisAnswer.js.map +1 -1
- package/esm/components/ui/Expandable.d.ts +3 -2
- package/esm/components/ui/Expandable.js +35 -20
- package/esm/components/ui/Expandable.js.map +1 -1
- package/esm/helpers/constants.d.ts +2 -0
- package/esm/helpers/constants.js +2 -0
- package/esm/helpers/constants.js.map +1 -1
- package/esm/helpers/message.d.ts +5 -0
- package/esm/helpers/message.js +89 -0
- package/esm/helpers/message.js.map +1 -0
- package/package.json +2 -2
- package/src/components/Chat/Chat.stories.tsx +16 -0
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +378 -135
- package/src/components/ChatBubble/ChatBubble.css +4 -0
- package/src/components/ChatBubble/ChatBubble.tsx +23 -123
- package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +84 -30
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.tsx +1 -1
- package/src/components/CompletionProviderStatus/__snapshots__/CompletionProviderStatus.test.tsx.snap +2 -2
- package/src/components/MemoriWidget/MemoriWidget.stories.tsx +9 -0
- package/src/components/MemoriWidget/MemoriWidget.tsx +15 -9
- package/src/components/StartPanel/StartPanel.css +1 -0
- package/src/components/StartPanel/StartPanel.stories.tsx +35 -0
- package/src/components/StartPanel/StartPanel.test.tsx +22 -0
- package/src/components/StartPanel/StartPanel.tsx +194 -170
- package/src/components/StartPanel/__snapshots__/StartPanel.test.tsx.snap +108 -1
- package/src/components/UploadButton/UploadButton.tsx +71 -31
- package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +1 -1
- package/src/components/WhyThisAnswer/WhyThisAnswer.tsx +2 -1
- package/src/components/ui/Expandable.stories.tsx +128 -1
- package/src/components/ui/Expandable.tsx +44 -22
- package/src/helpers/constants.ts +3 -0
- package/src/helpers/message.ts +139 -0
- package/src/mocks/data.ts +11 -0
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/AnimationController.d.ts +0 -34
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/AnimationController.js +0 -147
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/AnimationController.js.map +0 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/MorhTargetController.d.ts +0 -17
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/MorhTargetController.js +0 -73
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/MorhTargetController.js.map +0 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.d.ts +0 -17
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.js +0 -25
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.js.map +0 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/MorphTargetController.d.ts +0 -17
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/MorphTargetController.js +0 -76
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/MorphTargetController.js.map +0 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/PositionController.d.ts +0 -19
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/PositionController.js +0 -60
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/PositionController.js.map +0 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/constants.d.ts +0 -18
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/constants.js +0 -26
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/constants.js.map +0 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +0 -38
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +0 -181
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +0 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +0 -26
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +0 -166
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +0 -1
- package/dist/helpers/tenant.d.ts +0 -2
- package/dist/helpers/tenant.js +0 -40
- package/dist/helpers/tenant.js.map +0 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/AnimationController.d.ts +0 -34
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/AnimationController.js +0 -143
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/AnimationController.js.map +0 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/MorhTargetController.d.ts +0 -17
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/MorhTargetController.js +0 -69
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/MorhTargetController.js.map +0 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.d.ts +0 -17
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.js +0 -22
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.js.map +0 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/MorphTargetController.d.ts +0 -17
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/MorphTargetController.js +0 -72
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/MorphTargetController.js.map +0 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/PositionController.d.ts +0 -19
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/PositionController.js +0 -56
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/PositionController.js.map +0 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/constants.d.ts +0 -18
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/constants.js +0 -23
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/constants.js.map +0 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +0 -38
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +0 -177
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +0 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +0 -26
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +0 -163
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +0 -1
- package/esm/helpers/tenant.d.ts +0 -2
- package/esm/helpers/tenant.js +0 -36
- package/esm/helpers/tenant.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Memori,
|
|
2
|
+
Memori as MemoriOriginal,
|
|
3
3
|
Tenant,
|
|
4
4
|
Venue,
|
|
5
5
|
User,
|
|
@@ -20,8 +20,13 @@ import CompletionProviderStatus, {
|
|
|
20
20
|
Props as CPSProps,
|
|
21
21
|
} from '../CompletionProviderStatus/CompletionProviderStatus';
|
|
22
22
|
import MapMarker from '../icons/MapMarker';
|
|
23
|
+
import UserIcon from '../icons/User';
|
|
23
24
|
import QuestionHelp from '../icons/QuestionHelp';
|
|
24
25
|
|
|
26
|
+
interface Memori extends MemoriOriginal {
|
|
27
|
+
requireLoginToken?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
export interface Props {
|
|
26
31
|
memori: Memori;
|
|
27
32
|
tenant?: Tenant;
|
|
@@ -194,191 +199,210 @@ const StartPanel: React.FC<Props> = ({
|
|
|
194
199
|
</Button>
|
|
195
200
|
</div>
|
|
196
201
|
)}
|
|
197
|
-
{((memori.needsPosition && position) || !memori.needsPosition) &&
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
{((memori.needsPosition && position) || !memori.needsPosition) &&
|
|
203
|
+
!!memori.requireLoginToken &&
|
|
204
|
+
!isUserLoggedIn && (
|
|
205
|
+
<div className="memori--needsLogin">
|
|
206
|
+
<p>
|
|
207
|
+
{t('write_and_speak.requirePositionHelp', { name: memori.name })}
|
|
208
|
+
</p>
|
|
209
|
+
<Button
|
|
210
|
+
primary
|
|
211
|
+
onClick={() => setShowLoginDrawer(true)}
|
|
212
|
+
className="memori--start-button"
|
|
213
|
+
icon={<UserIcon />}
|
|
214
|
+
>
|
|
215
|
+
{t('login.login') || 'Login'}
|
|
216
|
+
</Button>
|
|
217
|
+
</div>
|
|
218
|
+
)}
|
|
219
|
+
{((memori.needsPosition && position) || !memori.needsPosition) &&
|
|
220
|
+
(!memori.requireLoginToken ||
|
|
221
|
+
(memori.requireLoginToken && isUserLoggedIn)) && (
|
|
222
|
+
<div className="memori--description">
|
|
223
|
+
<p>
|
|
224
|
+
<span className="memori--description-text">
|
|
225
|
+
{translatedDescription && showTranslation
|
|
226
|
+
? translatedDescription
|
|
227
|
+
: memori.description}
|
|
228
|
+
</span>
|
|
205
229
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
230
|
+
{translatedDescription !== memori.description && (
|
|
231
|
+
<Button
|
|
232
|
+
ghost
|
|
233
|
+
className="memori--translation-toggle"
|
|
234
|
+
icon={<Translation />}
|
|
235
|
+
onClick={() => toggleTranslations()}
|
|
236
|
+
>
|
|
237
|
+
{showTranslation
|
|
238
|
+
? t('showOriginalText')
|
|
239
|
+
: t('showTranslatedText')}
|
|
240
|
+
</Button>
|
|
241
|
+
)}
|
|
242
|
+
</p>
|
|
219
243
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
244
|
+
{isMultilanguageEnabled && !instruct && (
|
|
245
|
+
<div className="memori--language-chooser">
|
|
246
|
+
<label id="user-lang-pref-label" htmlFor="user-lang-pref">
|
|
247
|
+
{t('write_and_speak.iWantToTalkToIn', {
|
|
248
|
+
name: memori.name,
|
|
249
|
+
})}
|
|
250
|
+
</label>
|
|
251
|
+
<select
|
|
252
|
+
id="user-lang-pref"
|
|
253
|
+
className="memori-select--button"
|
|
254
|
+
value={(userLang ?? i18n.language).toUpperCase()}
|
|
255
|
+
aria-labelledby="user-lang-pref-label"
|
|
256
|
+
onChange={e => {
|
|
257
|
+
setUserLang(e.target.value);
|
|
258
|
+
}}
|
|
259
|
+
>
|
|
260
|
+
{chatLanguages.map(lang => (
|
|
261
|
+
<option
|
|
262
|
+
key={lang.value}
|
|
263
|
+
value={lang.value}
|
|
264
|
+
aria-label={lang.label}
|
|
265
|
+
>
|
|
266
|
+
{lang.label}
|
|
267
|
+
</option>
|
|
268
|
+
))}
|
|
269
|
+
</select>
|
|
270
|
+
</div>
|
|
271
|
+
)}
|
|
248
272
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
{t(
|
|
260
|
-
'write_and_speak.pagePrivacyExplanationList.allConversations'
|
|
261
|
-
)}
|
|
262
|
-
</p>
|
|
263
|
-
<ul className="memori--privacy-tooltip-content-list">
|
|
264
|
-
<li>
|
|
273
|
+
<div className="memori--start-privacy-explanation-container">
|
|
274
|
+
<p className="memori--start-privacy-explanation">
|
|
275
|
+
{t('write_and_speak.pagePrivacyExplanation')}
|
|
276
|
+
</p>
|
|
277
|
+
<Tooltip
|
|
278
|
+
align="right"
|
|
279
|
+
content={
|
|
280
|
+
<div className="memori--privacy-tooltip-content">
|
|
281
|
+
<p>
|
|
282
|
+
{' '}
|
|
265
283
|
{t(
|
|
266
|
-
'write_and_speak.pagePrivacyExplanationList.
|
|
284
|
+
'write_and_speak.pagePrivacyExplanationList.allConversations'
|
|
267
285
|
)}
|
|
268
|
-
</
|
|
269
|
-
<
|
|
286
|
+
</p>
|
|
287
|
+
<ul className="memori--privacy-tooltip-content-list">
|
|
288
|
+
<li>
|
|
289
|
+
{t(
|
|
290
|
+
'write_and_speak.pagePrivacyExplanationList.anonymousUser'
|
|
291
|
+
)}
|
|
292
|
+
</li>
|
|
293
|
+
<li>
|
|
294
|
+
{t(
|
|
295
|
+
'write_and_speak.pagePrivacyExplanationList.registeredUser'
|
|
296
|
+
)}
|
|
297
|
+
</li>
|
|
298
|
+
</ul>
|
|
299
|
+
<p>
|
|
270
300
|
{t(
|
|
271
|
-
'write_and_speak.pagePrivacyExplanationList.
|
|
301
|
+
'write_and_speak.pagePrivacyExplanationList.authorUsesInfo'
|
|
272
302
|
)}
|
|
273
|
-
</
|
|
274
|
-
</ul>
|
|
275
|
-
<p>
|
|
276
|
-
{t(
|
|
277
|
-
'write_and_speak.pagePrivacyExplanationList.authorUsesInfo'
|
|
278
|
-
)}
|
|
279
|
-
</p>
|
|
303
|
+
</p>
|
|
280
304
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
305
|
+
<a
|
|
306
|
+
href={'https://memori.ai/en/privacy-policy'}
|
|
307
|
+
target="_blank"
|
|
308
|
+
rel="noopener noreferrer"
|
|
309
|
+
>
|
|
310
|
+
{t('privacyPolicy')}
|
|
311
|
+
</a>
|
|
312
|
+
</div>
|
|
313
|
+
}
|
|
314
|
+
>
|
|
315
|
+
<QuestionHelp className="memori--start-privacy-explanation-icon" />
|
|
316
|
+
</Tooltip>
|
|
317
|
+
</div>
|
|
294
318
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
loading={clickedStart}
|
|
301
|
-
onClick={_e => {
|
|
302
|
-
try {
|
|
303
|
-
window.speechSynthesis.speak(
|
|
304
|
-
new SpeechSynthesisUtterance('') // This is needed to enable the speech synthesis on iOS
|
|
305
|
-
);
|
|
306
|
-
} catch (e) {
|
|
307
|
-
console.error(e);
|
|
319
|
+
<Button
|
|
320
|
+
primary
|
|
321
|
+
disabled={
|
|
322
|
+
(!!memori.blockedUntil && !memori.isGiver) || notEnoughCredits
|
|
308
323
|
}
|
|
324
|
+
loading={clickedStart}
|
|
325
|
+
onClick={_e => {
|
|
326
|
+
try {
|
|
327
|
+
window.speechSynthesis.speak(
|
|
328
|
+
new SpeechSynthesisUtterance('') // This is needed to enable the speech synthesis on iOS
|
|
329
|
+
);
|
|
330
|
+
} catch (e) {
|
|
331
|
+
console.error(e);
|
|
332
|
+
}
|
|
309
333
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
334
|
+
if (initializeTTS) initializeTTS();
|
|
335
|
+
if (onClickStart) onClickStart();
|
|
336
|
+
}}
|
|
337
|
+
className="memori--start-button"
|
|
338
|
+
>
|
|
339
|
+
{t(
|
|
340
|
+
`write_and_speak.${
|
|
341
|
+
instruct
|
|
342
|
+
? 'instructButton'
|
|
343
|
+
: !hasInitialSession
|
|
344
|
+
? 'tryMeButton'
|
|
345
|
+
: 'resumeButton'
|
|
346
|
+
}`
|
|
347
|
+
)}
|
|
348
|
+
</Button>
|
|
325
349
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
350
|
+
<CompletionProviderStatus
|
|
351
|
+
provider={memori?.completionConfigForQuestionAnswering?.provider}
|
|
352
|
+
forceStatus={_TEST_forceProviderStatus}
|
|
353
|
+
/>
|
|
330
354
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
355
|
+
<p className="memori--start-description">
|
|
356
|
+
{instruct
|
|
357
|
+
? t('write_and_speak.pageInstructExplanation')
|
|
358
|
+
: t('write_and_speak.pageTryMeExplanation')}
|
|
359
|
+
</p>
|
|
336
360
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
361
|
+
{(memori.blockedUntil || notEnoughCredits) && (
|
|
362
|
+
<BlockedMemoriBadge
|
|
363
|
+
memoriName={memori.name}
|
|
364
|
+
blockedUntil={memori.blockedUntil}
|
|
365
|
+
notEnoughCredits={notEnoughCredits}
|
|
366
|
+
showGiverInfo={memori.isGiver}
|
|
367
|
+
showTitle
|
|
368
|
+
marginLeft
|
|
369
|
+
/>
|
|
370
|
+
)}
|
|
347
371
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
372
|
+
{!!memori.enableDeepThought && !instruct && (
|
|
373
|
+
<div className="memori--deep-thought-disclaimer">
|
|
374
|
+
<Tooltip align="left" content={t('deepThoughtHelper')}>
|
|
375
|
+
<DeepThought />
|
|
376
|
+
</Tooltip>
|
|
377
|
+
<h2>
|
|
378
|
+
{isUserLoggedIn && !!user?.pAndCUAccepted
|
|
379
|
+
? t('deepThoughtDisclaimerTitle')
|
|
380
|
+
: t('deepThought')}
|
|
381
|
+
</h2>
|
|
382
|
+
{isUserLoggedIn && !user?.pAndCUAccepted && (
|
|
383
|
+
<p>{t('deepThoughtPreDisclaimerNotAllowed')}</p>
|
|
384
|
+
)}
|
|
385
|
+
{!isUserLoggedIn && (
|
|
386
|
+
<p>{t('deepThoughtPreDisclaimerUnlogged')}</p>
|
|
387
|
+
)}
|
|
388
|
+
{!isUserLoggedIn && showLogin && (
|
|
389
|
+
<p>
|
|
390
|
+
<Button
|
|
391
|
+
outlined
|
|
392
|
+
padded={false}
|
|
393
|
+
onClick={() => setShowLoginDrawer(true)}
|
|
394
|
+
>
|
|
395
|
+
{t('login.login') || 'Login'}
|
|
396
|
+
</Button>
|
|
397
|
+
</p>
|
|
398
|
+
)}
|
|
399
|
+
<p className="memori--deep-thought-disclaimer-text">
|
|
400
|
+
{t('deepThoughtDisclaimer')}
|
|
373
401
|
</p>
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
</div>
|
|
379
|
-
)}
|
|
380
|
-
</div>
|
|
381
|
-
)}
|
|
402
|
+
</div>
|
|
403
|
+
)}
|
|
404
|
+
</div>
|
|
405
|
+
)}
|
|
382
406
|
</div>
|
|
383
407
|
);
|
|
384
408
|
};
|
|
@@ -1257,7 +1257,7 @@ exports[`renders StartPanel with deep thought but unlogged unchanged 1`] = `
|
|
|
1257
1257
|
<button
|
|
1258
1258
|
class="memori-button memori-button--outlined memori-button--rounded"
|
|
1259
1259
|
>
|
|
1260
|
-
|
|
1260
|
+
login.login
|
|
1261
1261
|
</button>
|
|
1262
1262
|
</p>
|
|
1263
1263
|
<p
|
|
@@ -2188,6 +2188,113 @@ exports[`renders StartPanel with integrationConfig unchanged 1`] = `
|
|
|
2188
2188
|
</div>
|
|
2189
2189
|
`;
|
|
2190
2190
|
|
|
2191
|
+
exports[`renders StartPanel with login required unchanged 1`] = `
|
|
2192
|
+
<div>
|
|
2193
|
+
<div
|
|
2194
|
+
class="memori--start-panel"
|
|
2195
|
+
>
|
|
2196
|
+
<div
|
|
2197
|
+
class="memori--cover"
|
|
2198
|
+
>
|
|
2199
|
+
<div
|
|
2200
|
+
class="memori--completions-enabled"
|
|
2201
|
+
>
|
|
2202
|
+
<div
|
|
2203
|
+
class="memori-tooltip memori-tooltip--align-left"
|
|
2204
|
+
>
|
|
2205
|
+
<div
|
|
2206
|
+
class="memori-tooltip--content"
|
|
2207
|
+
>
|
|
2208
|
+
completionsEnabled
|
|
2209
|
+
</div>
|
|
2210
|
+
<div
|
|
2211
|
+
class="memori-tooltip--trigger"
|
|
2212
|
+
>
|
|
2213
|
+
<span
|
|
2214
|
+
aria-label="completionsEnabled"
|
|
2215
|
+
>
|
|
2216
|
+
<svg
|
|
2217
|
+
aria-hidden="true"
|
|
2218
|
+
fill="none"
|
|
2219
|
+
focusable="false"
|
|
2220
|
+
role="img"
|
|
2221
|
+
viewBox="0 0 24 24"
|
|
2222
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2223
|
+
>
|
|
2224
|
+
<g
|
|
2225
|
+
clip-rule="evenodd"
|
|
2226
|
+
fill="currentColor"
|
|
2227
|
+
fill-rule="evenodd"
|
|
2228
|
+
>
|
|
2229
|
+
<path
|
|
2230
|
+
clip-rule="evenodd"
|
|
2231
|
+
d="M0 4a4 4 0 014-4h16a4 4 0 014 4v16a4 4 0 01-4 4H4a4 4 0 01-4-4zm4-2.4A2.4 2.4 0 001.6 4v16A2.4 2.4 0 004 22.4h16a2.4 2.4 0 002.4-2.4V4A2.4 2.4 0 0020 1.6z"
|
|
2232
|
+
fill-rule="evenodd"
|
|
2233
|
+
/>
|
|
2234
|
+
<path
|
|
2235
|
+
clip-rule="evenodd"
|
|
2236
|
+
d="M9.715 8.442a.798.798 0 00-1.43 0l-3.2 6.4a.799.799 0 101.431.716l.579-1.158h3.811l.578 1.158a.8.8 0 001.431-.716zm.391 4.358L9 10.589 7.894 12.8z"
|
|
2237
|
+
fill-rule="evenodd"
|
|
2238
|
+
/>
|
|
2239
|
+
<path
|
|
2240
|
+
clip-rule="evenodd"
|
|
2241
|
+
d="M17 8c.552 0 1 .358 1 .8v6.4c0 .442-.448.8-1 .8s-1-.358-1-.8V8.8c0-.442.448-.8 1-.8z"
|
|
2242
|
+
fill-rule="evenodd"
|
|
2243
|
+
/>
|
|
2244
|
+
</g>
|
|
2245
|
+
</svg>
|
|
2246
|
+
</span>
|
|
2247
|
+
</div>
|
|
2248
|
+
</div>
|
|
2249
|
+
</div>
|
|
2250
|
+
</div>
|
|
2251
|
+
<picture
|
|
2252
|
+
class="memori--avatar"
|
|
2253
|
+
>
|
|
2254
|
+
<source
|
|
2255
|
+
src="https://aisuru.com/images/aisuru/square_logo.png"
|
|
2256
|
+
/>
|
|
2257
|
+
<img
|
|
2258
|
+
alt="Memori"
|
|
2259
|
+
src="https://aisuru.com/images/aisuru/square_logo.png"
|
|
2260
|
+
/>
|
|
2261
|
+
</picture>
|
|
2262
|
+
<h2
|
|
2263
|
+
class="memori--title"
|
|
2264
|
+
>
|
|
2265
|
+
Memori
|
|
2266
|
+
</h2>
|
|
2267
|
+
<div
|
|
2268
|
+
class="memori--needsLogin"
|
|
2269
|
+
>
|
|
2270
|
+
<p>
|
|
2271
|
+
write_and_speak.requirePositionHelp
|
|
2272
|
+
</p>
|
|
2273
|
+
<button
|
|
2274
|
+
class="memori-button memori-button--primary memori-button--rounded memori-button--padded memori-button--with-icon memori--start-button"
|
|
2275
|
+
>
|
|
2276
|
+
<span
|
|
2277
|
+
class="memori-button--icon"
|
|
2278
|
+
>
|
|
2279
|
+
<svg
|
|
2280
|
+
aria-hidden="true"
|
|
2281
|
+
focusable="false"
|
|
2282
|
+
role="img"
|
|
2283
|
+
viewBox="0 0 1024 1024"
|
|
2284
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2285
|
+
>
|
|
2286
|
+
<path
|
|
2287
|
+
d="M858.5 763.6a374 374 0 0 0-80.6-119.5 375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"
|
|
2288
|
+
/>
|
|
2289
|
+
</svg>
|
|
2290
|
+
</span>
|
|
2291
|
+
login.login
|
|
2292
|
+
</button>
|
|
2293
|
+
</div>
|
|
2294
|
+
</div>
|
|
2295
|
+
</div>
|
|
2296
|
+
`;
|
|
2297
|
+
|
|
2191
2298
|
exports[`renders StartPanel with multilangual unchanged 1`] = `
|
|
2192
2299
|
<div>
|
|
2193
2300
|
<div
|