@memori.ai/memori-react 9.0.0-alpha.16 → 9.0.0-alpha.18
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 +4 -6944
- package/dist/components/Chat/Chat.css +11 -15
- package/dist/components/Chat/Chat.js +11 -3
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.css +96 -22
- package/dist/components/ChatBubble/ChatBubble.js +31 -2
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/ChatHistoryDrawer/ChatHistory.css +1 -0
- package/dist/components/ChatInputs/ChatInputs.css +72 -147
- package/dist/components/ChatInputs/ChatInputs.js +3 -4
- package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
- package/dist/components/Header/ChatConsumptionDropdown.js +2 -1
- package/dist/components/Header/ChatConsumptionDropdown.js.map +1 -1
- package/dist/components/Header/Header.css +199 -34
- package/dist/components/Header/Header.d.ts +1 -0
- package/dist/components/Header/Header.js +42 -34
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/IconButton/IconButton.css +144 -0
- package/dist/components/IconButton/IconButton.d.ts +9 -0
- package/dist/components/IconButton/IconButton.js +36 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/KnownFacts/KnownFacts.css +22 -9
- package/dist/components/KnownFacts/KnownFacts.js +13 -4
- package/dist/components/KnownFacts/KnownFacts.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +29 -44
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +3 -2
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.css +2 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +27 -30
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/MicrophoneButton/MicrophoneButton.css +2 -183
- package/dist/components/MicrophoneButton/MicrophoneButton.js +3 -1
- package/dist/components/MicrophoneButton/MicrophoneButton.js.map +1 -1
- package/dist/components/MobileSessionPanel/MobileSessionPanel.css +22 -7
- package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +1 -0
- package/dist/components/MobileSessionPanel/MobileSessionPanel.js +6 -4
- package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -1
- package/dist/components/PositionPopover/PositionPopover.d.ts +2 -0
- package/dist/components/PositionPopover/PositionPopover.js +18 -4
- package/dist/components/PositionPopover/PositionPopover.js.map +1 -1
- package/dist/components/ShareButton/ShareButton.css +3 -2
- package/dist/components/ShareButton/ShareButton.js +3 -2
- package/dist/components/ShareButton/ShareButton.js.map +1 -1
- package/dist/components/UploadButton/UploadButton.css +2 -20
- package/dist/components/UploadButton/UploadButton.js +2 -1
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/layouts/Chat.js +59 -73
- package/dist/components/layouts/Chat.js.map +1 -1
- package/dist/components/layouts/FullPage.js +53 -34
- package/dist/components/layouts/FullPage.js.map +1 -1
- package/dist/components/layouts/HiddenChat.js +3 -3
- package/dist/components/layouts/HiddenChat.js.map +1 -1
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +3 -3
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
- package/dist/components/layouts/WebsiteAssistant/website-assistant.css +28 -15
- package/dist/components/layouts/ZoomedFullBody.js +53 -34
- package/dist/components/layouts/ZoomedFullBody.js.map +1 -1
- package/dist/components/layouts/chat.css +76 -41
- package/dist/components/layouts/fullpage.css +18 -9
- package/dist/components/layouts/hidden-chat.css +45 -69
- package/dist/components/layouts/zoomed-full-body.css +6 -5
- package/dist/helpers/positionPopover.d.ts +1 -1
- package/dist/helpers/positionPopover.js +2 -2
- package/dist/helpers/positionPopover.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/Chat/Chat.css +11 -15
- package/esm/components/Chat/Chat.js +11 -3
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.css +96 -22
- package/esm/components/ChatBubble/ChatBubble.js +31 -2
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/ChatHistoryDrawer/ChatHistory.css +1 -0
- package/esm/components/ChatInputs/ChatInputs.css +72 -147
- package/esm/components/ChatInputs/ChatInputs.js +3 -4
- package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
- package/esm/components/Header/ChatConsumptionDropdown.js +3 -2
- package/esm/components/Header/ChatConsumptionDropdown.js.map +1 -1
- package/esm/components/Header/Header.css +199 -34
- package/esm/components/Header/Header.d.ts +1 -0
- package/esm/components/Header/Header.js +42 -34
- package/esm/components/Header/Header.js.map +1 -1
- package/esm/components/IconButton/IconButton.css +144 -0
- package/esm/components/IconButton/IconButton.d.ts +9 -0
- package/esm/components/IconButton/IconButton.js +33 -0
- package/esm/components/IconButton/IconButton.js.map +1 -0
- package/esm/components/KnownFacts/KnownFacts.css +22 -9
- package/esm/components/KnownFacts/KnownFacts.js +13 -4
- package/esm/components/KnownFacts/KnownFacts.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +29 -44
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +3 -2
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.css +2 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +27 -30
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/MicrophoneButton/MicrophoneButton.css +2 -183
- package/esm/components/MicrophoneButton/MicrophoneButton.js +3 -2
- package/esm/components/MicrophoneButton/MicrophoneButton.js.map +1 -1
- package/esm/components/MobileSessionPanel/MobileSessionPanel.css +22 -7
- package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +1 -0
- package/esm/components/MobileSessionPanel/MobileSessionPanel.js +6 -4
- package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -1
- package/esm/components/PositionPopover/PositionPopover.d.ts +2 -0
- package/esm/components/PositionPopover/PositionPopover.js +18 -4
- package/esm/components/PositionPopover/PositionPopover.js.map +1 -1
- package/esm/components/ShareButton/ShareButton.css +3 -2
- package/esm/components/ShareButton/ShareButton.js +4 -3
- package/esm/components/ShareButton/ShareButton.js.map +1 -1
- package/esm/components/UploadButton/UploadButton.css +2 -20
- package/esm/components/UploadButton/UploadButton.js +2 -1
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/layouts/Chat.js +62 -76
- package/esm/components/layouts/Chat.js.map +1 -1
- package/esm/components/layouts/FullPage.js +54 -35
- package/esm/components/layouts/FullPage.js.map +1 -1
- package/esm/components/layouts/HiddenChat.js +3 -3
- package/esm/components/layouts/HiddenChat.js.map +1 -1
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +3 -3
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
- package/esm/components/layouts/WebsiteAssistant/website-assistant.css +28 -15
- package/esm/components/layouts/ZoomedFullBody.js +54 -35
- package/esm/components/layouts/ZoomedFullBody.js.map +1 -1
- package/esm/components/layouts/chat.css +76 -41
- package/esm/components/layouts/fullpage.css +18 -9
- package/esm/components/layouts/hidden-chat.css +45 -69
- package/esm/components/layouts/zoomed-full-body.css +6 -5
- package/esm/helpers/positionPopover.d.ts +1 -1
- package/esm/helpers/positionPopover.js +2 -2
- package/esm/helpers/positionPopover.js.map +1 -1
- package/esm/styles.css +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +1 -1
- package/src/components/Chat/Chat.css +11 -15
- package/src/components/Chat/Chat.tsx +13 -2
- package/src/components/ChatBubble/ChatBubble.css +96 -22
- package/src/components/ChatBubble/ChatBubble.tsx +39 -0
- package/src/components/ChatHistoryDrawer/ChatHistory.css +1 -0
- package/src/components/ChatInputs/ChatInputs.css +72 -147
- package/src/components/ChatInputs/ChatInputs.tsx +7 -7
- package/src/components/Header/ChatConsumptionDropdown.tsx +3 -2
- package/src/components/Header/Header.css +199 -34
- package/src/components/Header/Header.tsx +120 -100
- package/src/components/Header/__snapshots__/Header.test.tsx.snap +90 -57
- package/src/components/IconButton/IconButton.css +144 -0
- package/src/components/IconButton/IconButton.tsx +89 -0
- package/src/components/KnownFacts/KnownFacts.css +22 -9
- package/src/components/KnownFacts/KnownFacts.tsx +13 -3
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +29 -44
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.tsx +11 -20
- package/src/components/MemoriWidget/MemoriWidget.css +2 -1
- package/src/components/MemoriWidget/MemoriWidget.tsx +38 -31
- package/src/components/MicrophoneButton/MicrophoneButton.css +2 -183
- package/src/components/MicrophoneButton/MicrophoneButton.tsx +5 -5
- package/src/components/MobileSessionPanel/MobileSessionPanel.css +22 -7
- package/src/components/MobileSessionPanel/MobileSessionPanel.tsx +8 -6
- package/src/components/PositionPopover/PositionPopover.tsx +30 -4
- package/src/components/ShareButton/ShareButton.css +3 -2
- package/src/components/ShareButton/ShareButton.tsx +8 -9
- package/src/components/ShareButton/__snapshots__/ShareButton.test.tsx.snap +9 -9
- package/src/components/StartPanel/StartPanel.stories.tsx +1 -1
- package/src/components/UploadButton/UploadButton.css +2 -20
- package/src/components/UploadButton/UploadButton.tsx +3 -5
- package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +29 -25
- package/src/components/layouts/Chat.tsx +210 -232
- package/src/components/layouts/FullPage.tsx +61 -40
- package/src/components/layouts/HiddenChat.tsx +5 -6
- package/src/components/layouts/WebsiteAssistant/WebsiteAssistant.tsx +2 -2
- package/src/components/layouts/WebsiteAssistant/__snapshots__/WebsiteAssistant.test.tsx.snap +2 -0
- package/src/components/layouts/WebsiteAssistant/website-assistant.css +28 -15
- package/src/components/layouts/ZoomedFullBody.tsx +61 -40
- package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +145 -143
- package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +22 -18
- package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +10 -145
- package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +12 -10
- package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +11 -9
- package/src/components/layouts/chat.css +76 -41
- package/src/components/layouts/fullpage.css +18 -9
- package/src/components/layouts/hidden-chat.css +45 -69
- package/src/components/layouts/layouts.stories.tsx +1 -1
- package/src/components/layouts/zoomed-full-body.css +6 -5
- package/src/helpers/positionPopover.test.ts +10 -4
- package/src/helpers/positionPopover.ts +8 -5
- package/src/styles.css +1 -0
- package/src/version.ts +1 -1
|
@@ -186,10 +186,16 @@
|
|
|
186
186
|
opacity: 0.6;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
/* Logout action */
|
|
190
|
-
.memori-dropdown--action-button.memori-dropdown--action-button--logout
|
|
189
|
+
/* Logout action — full-width labeled control inside user menu */
|
|
190
|
+
.memori-dropdown--action-button.memori-dropdown--action-button--logout,
|
|
191
|
+
.memori-widget
|
|
192
|
+
.memori-icon-button.memori-icon-button--labeled.memori-dropdown--action-button--logout.memori-button {
|
|
191
193
|
display: flex;
|
|
192
194
|
width: 100%;
|
|
195
|
+
min-width: 0;
|
|
196
|
+
max-width: none;
|
|
197
|
+
height: auto;
|
|
198
|
+
min-height: var(--memori-icon-button-size, 36px);
|
|
193
199
|
box-sizing: border-box;
|
|
194
200
|
align-items: center;
|
|
195
201
|
justify-content: center;
|
|
@@ -240,8 +246,8 @@
|
|
|
240
246
|
}
|
|
241
247
|
|
|
242
248
|
.memori-header--button svg {
|
|
243
|
-
width:
|
|
244
|
-
height:
|
|
249
|
+
width: 1.25em;
|
|
250
|
+
height: 1.25em;
|
|
245
251
|
font-size: 1em;
|
|
246
252
|
line-height: 1;
|
|
247
253
|
}
|
|
@@ -250,6 +256,19 @@
|
|
|
250
256
|
fill: currentColor;
|
|
251
257
|
}
|
|
252
258
|
|
|
259
|
+
/* Accedi / login CTA — ~1.8:1 horizontal:vertical padding, height aligned to icon tools */
|
|
260
|
+
.memori-header .memori-header--button-login.memori-button {
|
|
261
|
+
height: var(--memori-icon-button-size, 40px);
|
|
262
|
+
min-height: var(--memori-icon-button-size, 40px);
|
|
263
|
+
padding: 0.5rem 0.9rem;
|
|
264
|
+
gap: 0.4rem;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.memori-header .memori-header--button-login.memori-button svg {
|
|
268
|
+
width: var(--memori-icon-button-icon-size, 20px);
|
|
269
|
+
height: var(--memori-icon-button-icon-size, 20px);
|
|
270
|
+
}
|
|
271
|
+
|
|
253
272
|
.memori-header--position {
|
|
254
273
|
display: inline-flex;
|
|
255
274
|
align-items: center;
|
|
@@ -302,10 +321,175 @@
|
|
|
302
321
|
pointer-events: none;
|
|
303
322
|
}
|
|
304
323
|
|
|
305
|
-
.memori-header .memori-button.memori-button--active:not(:disabled):not(.memori-button--disabled),
|
|
324
|
+
.memori-header .memori-icon-button.memori-button.memori-icon-button--active:not(:disabled):not(.memori-button--disabled),
|
|
306
325
|
.memori-header
|
|
307
|
-
.memori-dropdown--user-trigger-button.memori-button--active:not(:disabled):not(.memori-button--disabled) {
|
|
308
|
-
|
|
326
|
+
.memori-dropdown--user-trigger-button.memori-icon-button.memori-button--active:not(:disabled):not(.memori-button--disabled) {
|
|
327
|
+
/* Soft active owned by IconButton.css — do not use CTA ring/fill here */
|
|
328
|
+
box-shadow: none;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/* Header (+ mobile overflow) icon tools: primary icon on hover (not logout / recording) */
|
|
332
|
+
.memori-widget
|
|
333
|
+
.memori-header
|
|
334
|
+
.memori-icon-button.memori-button:hover:not(
|
|
335
|
+
:disabled,
|
|
336
|
+
.memori-button--disabled,
|
|
337
|
+
.memori-icon-button--recording,
|
|
338
|
+
.memori-dropdown--action-button--logout
|
|
339
|
+
),
|
|
340
|
+
.memori-widget
|
|
341
|
+
.memori-fullpage-header-row
|
|
342
|
+
.memori-icon-button.memori-button:hover:not(
|
|
343
|
+
:disabled,
|
|
344
|
+
.memori-button--disabled,
|
|
345
|
+
.memori-icon-button--recording
|
|
346
|
+
),
|
|
347
|
+
.memori-widget
|
|
348
|
+
.memori-chat-layout--header
|
|
349
|
+
.memori-icon-button.memori-button:hover:not(
|
|
350
|
+
:disabled,
|
|
351
|
+
.memori-button--disabled,
|
|
352
|
+
.memori-icon-button--recording
|
|
353
|
+
),
|
|
354
|
+
.memori-widget
|
|
355
|
+
.memori-chat-layout--overflow-trigger.memori-icon-button.memori-button:hover:not(
|
|
356
|
+
:disabled,
|
|
357
|
+
.memori-button--disabled
|
|
358
|
+
) {
|
|
359
|
+
color: var(--memori-primary);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.memori-widget
|
|
363
|
+
.memori-header
|
|
364
|
+
.memori-icon-button.memori-button:hover:not(
|
|
365
|
+
:disabled,
|
|
366
|
+
.memori-button--disabled,
|
|
367
|
+
.memori-icon-button--recording,
|
|
368
|
+
.memori-dropdown--action-button--logout
|
|
369
|
+
)
|
|
370
|
+
svg,
|
|
371
|
+
.memori-widget
|
|
372
|
+
.memori-fullpage-header-row
|
|
373
|
+
.memori-icon-button.memori-button:hover:not(
|
|
374
|
+
:disabled,
|
|
375
|
+
.memori-button--disabled,
|
|
376
|
+
.memori-icon-button--recording
|
|
377
|
+
)
|
|
378
|
+
svg,
|
|
379
|
+
.memori-widget
|
|
380
|
+
.memori-chat-layout--header
|
|
381
|
+
.memori-icon-button.memori-button:hover:not(
|
|
382
|
+
:disabled,
|
|
383
|
+
.memori-button--disabled,
|
|
384
|
+
.memori-icon-button--recording
|
|
385
|
+
)
|
|
386
|
+
svg,
|
|
387
|
+
.memori-widget
|
|
388
|
+
.memori-chat-layout--overflow-trigger.memori-icon-button.memori-button:hover:not(
|
|
389
|
+
:disabled,
|
|
390
|
+
.memori-button--disabled
|
|
391
|
+
)
|
|
392
|
+
svg {
|
|
393
|
+
color: var(--memori-primary);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/* Dark: keep white at rest and on hover for icon tools */
|
|
397
|
+
.memori-widget[data-theme='dark']
|
|
398
|
+
.memori-header
|
|
399
|
+
.memori-icon-button.memori-button:hover:not(
|
|
400
|
+
:disabled,
|
|
401
|
+
.memori-button--disabled,
|
|
402
|
+
.memori-icon-button--recording,
|
|
403
|
+
.memori-dropdown--action-button--logout
|
|
404
|
+
),
|
|
405
|
+
[data-theme='dark']
|
|
406
|
+
.memori-widget
|
|
407
|
+
.memori-header
|
|
408
|
+
.memori-icon-button.memori-button:hover:not(
|
|
409
|
+
:disabled,
|
|
410
|
+
.memori-button--disabled,
|
|
411
|
+
.memori-icon-button--recording,
|
|
412
|
+
.memori-dropdown--action-button--logout
|
|
413
|
+
),
|
|
414
|
+
.memori-widget[data-theme='dark']
|
|
415
|
+
.memori-fullpage-header-row
|
|
416
|
+
.memori-icon-button.memori-button:hover:not(
|
|
417
|
+
:disabled,
|
|
418
|
+
.memori-button--disabled,
|
|
419
|
+
.memori-icon-button--recording
|
|
420
|
+
),
|
|
421
|
+
[data-theme='dark']
|
|
422
|
+
.memori-widget
|
|
423
|
+
.memori-fullpage-header-row
|
|
424
|
+
.memori-icon-button.memori-button:hover:not(
|
|
425
|
+
:disabled,
|
|
426
|
+
.memori-button--disabled,
|
|
427
|
+
.memori-icon-button--recording
|
|
428
|
+
),
|
|
429
|
+
.memori-widget[data-theme='dark']
|
|
430
|
+
.memori-chat-layout--overflow-trigger.memori-icon-button.memori-button:hover:not(
|
|
431
|
+
:disabled,
|
|
432
|
+
.memori-button--disabled
|
|
433
|
+
),
|
|
434
|
+
[data-theme='dark']
|
|
435
|
+
.memori-widget
|
|
436
|
+
.memori-chat-layout--overflow-trigger.memori-icon-button.memori-button:hover:not(
|
|
437
|
+
:disabled,
|
|
438
|
+
.memori-button--disabled
|
|
439
|
+
) {
|
|
440
|
+
color: #fff;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.memori-widget[data-theme='dark']
|
|
444
|
+
.memori-header
|
|
445
|
+
.memori-icon-button.memori-button:hover:not(
|
|
446
|
+
:disabled,
|
|
447
|
+
.memori-button--disabled,
|
|
448
|
+
.memori-icon-button--recording,
|
|
449
|
+
.memori-dropdown--action-button--logout
|
|
450
|
+
)
|
|
451
|
+
svg,
|
|
452
|
+
[data-theme='dark']
|
|
453
|
+
.memori-widget
|
|
454
|
+
.memori-header
|
|
455
|
+
.memori-icon-button.memori-button:hover:not(
|
|
456
|
+
:disabled,
|
|
457
|
+
.memori-button--disabled,
|
|
458
|
+
.memori-icon-button--recording,
|
|
459
|
+
.memori-dropdown--action-button--logout
|
|
460
|
+
)
|
|
461
|
+
svg,
|
|
462
|
+
.memori-widget[data-theme='dark']
|
|
463
|
+
.memori-fullpage-header-row
|
|
464
|
+
.memori-icon-button.memori-button:hover:not(
|
|
465
|
+
:disabled,
|
|
466
|
+
.memori-button--disabled,
|
|
467
|
+
.memori-icon-button--recording
|
|
468
|
+
)
|
|
469
|
+
svg,
|
|
470
|
+
[data-theme='dark']
|
|
471
|
+
.memori-widget
|
|
472
|
+
.memori-fullpage-header-row
|
|
473
|
+
.memori-icon-button.memori-button:hover:not(
|
|
474
|
+
:disabled,
|
|
475
|
+
.memori-button--disabled,
|
|
476
|
+
.memori-icon-button--recording
|
|
477
|
+
)
|
|
478
|
+
svg,
|
|
479
|
+
.memori-widget[data-theme='dark']
|
|
480
|
+
.memori-chat-layout--overflow-trigger.memori-icon-button.memori-button:hover:not(
|
|
481
|
+
:disabled,
|
|
482
|
+
.memori-button--disabled
|
|
483
|
+
)
|
|
484
|
+
svg,
|
|
485
|
+
[data-theme='dark']
|
|
486
|
+
.memori-widget
|
|
487
|
+
.memori-chat-layout--overflow-trigger.memori-icon-button.memori-button:hover:not(
|
|
488
|
+
:disabled,
|
|
489
|
+
.memori-button--disabled
|
|
490
|
+
)
|
|
491
|
+
svg {
|
|
492
|
+
color: #fff;
|
|
309
493
|
}
|
|
310
494
|
|
|
311
495
|
.memori-dropdown--avatar-input {
|
|
@@ -518,18 +702,18 @@
|
|
|
518
702
|
/* Full-page layout: labeled primary actions, utility cluster, shared control chrome */
|
|
519
703
|
.memori-header.memori-header--fullpage {
|
|
520
704
|
width: auto;
|
|
521
|
-
min-width:
|
|
705
|
+
min-width: 0;
|
|
522
706
|
max-width: 100%;
|
|
523
707
|
height: auto;
|
|
524
708
|
min-height: 40px;
|
|
525
|
-
flex-wrap:
|
|
709
|
+
flex-wrap: nowrap;
|
|
526
710
|
align-items: center;
|
|
527
711
|
justify-content: center;
|
|
528
712
|
padding: 0;
|
|
529
713
|
margin-left: 0;
|
|
530
714
|
-webkit-backdrop-filter: none;
|
|
531
715
|
backdrop-filter: none;
|
|
532
|
-
gap: 0.
|
|
716
|
+
gap: 0.75rem;
|
|
533
717
|
text-align: right;
|
|
534
718
|
}
|
|
535
719
|
|
|
@@ -548,21 +732,16 @@
|
|
|
548
732
|
|
|
549
733
|
.memori-header--fullpage-secondary {
|
|
550
734
|
justify-content: flex-end;
|
|
551
|
-
/* margin-left: auto; */
|
|
552
735
|
}
|
|
553
736
|
|
|
554
737
|
.memori-header--fullpage-divider {
|
|
555
738
|
width: 1px;
|
|
739
|
+
height: 28px;
|
|
556
740
|
min-height: 28px;
|
|
557
|
-
|
|
558
|
-
|
|
741
|
+
flex-shrink: 0;
|
|
742
|
+
align-self: center;
|
|
743
|
+
margin: 0;
|
|
559
744
|
background: color-mix(in srgb, var(--memori-text-color, #111827) 18%, transparent);
|
|
560
|
-
/* margin-left: auto; */
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
/* Tighter spacing before Profile / login (divider sits in secondary row) */
|
|
564
|
-
.memori-header--fullpage-secondary > .memori-header--fullpage-divider {
|
|
565
|
-
margin-right: calc(0.125rem - 5px);
|
|
566
745
|
}
|
|
567
746
|
|
|
568
747
|
.memori-header--fullpage .memori-dropdown--user-trigger--fullpage {
|
|
@@ -576,19 +755,9 @@
|
|
|
576
755
|
gap: 0.5rem;
|
|
577
756
|
}
|
|
578
757
|
|
|
579
|
-
.memori-header--auth-icon-button {
|
|
580
|
-
width: 38px;
|
|
581
|
-
min-width: 38px;
|
|
582
|
-
height: 38px;
|
|
583
|
-
min-height: 38px;
|
|
584
|
-
padding: 8px;
|
|
585
|
-
border: 1px solid color-mix(in srgb, var(--memori-text-color, #111827) 16%, transparent);
|
|
586
|
-
background: transparent;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
758
|
.memori-header--auth-icon-button:has(.memori-header--action-label) {
|
|
590
759
|
width: auto;
|
|
591
|
-
min-width:
|
|
760
|
+
min-width: var(--memori-icon-button-size, 36px);
|
|
592
761
|
gap: 0.35rem;
|
|
593
762
|
padding-inline: 10px;
|
|
594
763
|
}
|
|
@@ -600,10 +769,6 @@
|
|
|
600
769
|
white-space: nowrap;
|
|
601
770
|
}
|
|
602
771
|
|
|
603
|
-
.memori-header--auth-icon-button:hover {
|
|
604
|
-
background: color-mix(in srgb, var(--memori-text-color, #111827) 8%, transparent);
|
|
605
|
-
}
|
|
606
|
-
|
|
607
772
|
.memori-dropdown--auth-menu {
|
|
608
773
|
min-width: 320px;
|
|
609
774
|
padding: 0.45rem;
|
|
@@ -13,6 +13,7 @@ export interface Props {
|
|
|
13
13
|
setVenue: (venue?: Venue) => void;
|
|
14
14
|
positionPopoverOpen: boolean;
|
|
15
15
|
setPositionPopoverOpen: (open: boolean) => void;
|
|
16
|
+
autoStartPositionGeolocation?: boolean;
|
|
16
17
|
setShowSettingsDrawer: (show: boolean) => void;
|
|
17
18
|
setShowChatHistoryDrawer: (show: boolean) => void;
|
|
18
19
|
setShowKnownFactsDrawer: (show: boolean) => void;
|
|
@@ -12,9 +12,10 @@ const PositionPopover_1 = tslib_1.__importDefault(require("../PositionPopover/Po
|
|
|
12
12
|
const GasStation_1 = tslib_1.__importDefault(require("../icons/GasStation"));
|
|
13
13
|
const error_1 = require("../../helpers/error");
|
|
14
14
|
const ChatConsumptionDropdown_1 = tslib_1.__importDefault(require("./ChatConsumptionDropdown"));
|
|
15
|
+
const IconButton_1 = tslib_1.__importDefault(require("../IconButton/IconButton"));
|
|
15
16
|
const utils_1 = require("../../helpers/utils");
|
|
16
17
|
const media_1 = require("../../helpers/media");
|
|
17
|
-
const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, position, setVenue, positionPopoverOpen, setPositionPopoverOpen, setShowSettingsDrawer, setShowChatHistoryDrawer, setShowKnownFactsDrawer, setShowExpertsDrawer, enableAudio = true, speakerMuted, setSpeakerMuted, hasUserActivatedSpeak = false, showShare = true, showSettings = true, showReload = false, showClear = false, showLogin = true, setShowLoginDrawer, clearHistory, loginToken, user, sessionID, showChatHistory = true, fullScreenHandler, baseUrl, onLogout, apiClient, layout, additionalSettings, showMessageConsumption = false, showFullscreen = true, extraActions, }) => {
|
|
18
|
+
const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, position, setVenue, positionPopoverOpen, setPositionPopoverOpen, autoStartPositionGeolocation = false, setShowSettingsDrawer, setShowChatHistoryDrawer, setShowKnownFactsDrawer, setShowExpertsDrawer, enableAudio = true, speakerMuted, setSpeakerMuted, hasUserActivatedSpeak = false, showShare = true, showSettings = true, showReload = false, showClear = false, showLogin = true, setShowLoginDrawer, clearHistory, loginToken, user, sessionID, showChatHistory = true, fullScreenHandler, baseUrl, onLogout, apiClient, layout, additionalSettings, showMessageConsumption = false, showFullscreen = true, extraActions, }) => {
|
|
18
19
|
var _a;
|
|
19
20
|
const { t, i18n } = (0, react_i18next_1.useTranslation)();
|
|
20
21
|
const { add } = (0, ui_1.useAlertManager)();
|
|
@@ -194,7 +195,7 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
194
195
|
}
|
|
195
196
|
};
|
|
196
197
|
const isFullPageChrome = layout === 'FULLPAGE' || layout === 'CHAT';
|
|
197
|
-
const showFullpageChromeDividers =
|
|
198
|
+
const showFullpageChromeDividers = showFullpageDividers;
|
|
198
199
|
const fullpageGuestChrome = layout === 'FULLPAGE' && !loginToken;
|
|
199
200
|
(0, react_1.useEffect)(() => {
|
|
200
201
|
if (!isFullPageChrome)
|
|
@@ -227,7 +228,7 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
227
228
|
const fullscreenLabel = fullScreen
|
|
228
229
|
? t('fullscreenExit') || 'Exit fullscreen'
|
|
229
230
|
: t('fullscreenEnter') || 'Full screen';
|
|
230
|
-
const isAuthenticated = !!loginToken && !!user;
|
|
231
|
+
const isAuthenticated = !!loginToken && !!(user === null || user === void 0 ? void 0 : user.userID);
|
|
231
232
|
const isConversationStarted = Boolean(sessionID && hasUserActivatedSpeak);
|
|
232
233
|
const brandTitle = ((_a = memori === null || memori === void 0 ? void 0 : memori.name) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
233
234
|
const brandRole = (0, react_1.useMemo)(() => {
|
|
@@ -260,7 +261,7 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
260
261
|
apiURL: '',
|
|
261
262
|
});
|
|
262
263
|
}, [isFullPageChrome, memori, tenant, baseUrl]);
|
|
263
|
-
const fullpagePrimaryHasContent =
|
|
264
|
+
const fullpagePrimaryHasContent = showChatHistory && !!loginToken;
|
|
264
265
|
const fullpageSecondaryHasContent = !!memori.needsPosition ||
|
|
265
266
|
showReload ||
|
|
266
267
|
showClear ||
|
|
@@ -275,8 +276,21 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
275
276
|
enableAudio ||
|
|
276
277
|
!!(showSettings && hasSettingsContent(layout, additionalSettings)) ||
|
|
277
278
|
showShare;
|
|
278
|
-
const
|
|
279
|
-
|
|
279
|
+
const loggedInSecondaryHasActions = (isConversationStarted && showFullpageDividers) ||
|
|
280
|
+
(showFullscreen && fullScreenAvailable) ||
|
|
281
|
+
enableAudio ||
|
|
282
|
+
!!memori.needsPosition ||
|
|
283
|
+
showShare;
|
|
284
|
+
const showHistoryDivider = showFullpageChromeDividers &&
|
|
285
|
+
fullpagePrimaryHasContent &&
|
|
286
|
+
(isAuthenticated
|
|
287
|
+
? loggedInSecondaryHasActions || !!showLogin
|
|
288
|
+
: fullpageSecondaryHasContent || !!showLogin);
|
|
289
|
+
const showLoginDivider = showFullpageChromeDividers &&
|
|
290
|
+
!!showLogin &&
|
|
291
|
+
(isAuthenticated ? loggedInSecondaryHasActions : fullpageSecondaryHasContent);
|
|
292
|
+
const chatHistoryNode = showChatHistory && !!loginToken && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('write_and_speak.chatHistory') || 'Chat history', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, className: "memori-header--chat-history-button", disabled: !loginToken, "aria-label": t('write_and_speak.chatHistory') || 'Chat history', icon: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, {}), onClick: () => setShowChatHistoryDrawer(true), children: chatHistoryButtonLabel ? ((0, jsx_runtime_1.jsx)("span", { className: "memori-header--action-label", children: chatHistoryButtonLabel })) : null }) }) }));
|
|
293
|
+
const loginNode = showLogin && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: loginToken && (user === null || user === void 0 ? void 0 : user.userID) ? ((0, jsx_runtime_1.jsx)(ui_1.Popover, { className: "memori-header--dropdown", open: userPopoverOpen, onOpenChange: open => {
|
|
280
294
|
setUserPopoverOpen(open);
|
|
281
295
|
if (open) {
|
|
282
296
|
setInfoPopoverOpen(false);
|
|
@@ -285,7 +299,7 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
285
299
|
}, placement: "bottom-end", sideOffset: 8, closable: false, contentClassName: "memori-dropdown--menu", slotProps: {
|
|
286
300
|
trigger: {
|
|
287
301
|
className: (0, classnames_1.default)('memori-dropdown--user-trigger', isFullPageChrome && 'memori-dropdown--user-trigger--fullpage'),
|
|
288
|
-
render: (props) => ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('login.user') || 'User', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
302
|
+
render: (props) => ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('login.user') || 'User', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { ...props, active: userPopoverOpen, variant: buttonVariant, className: "memori-dropdown--user-trigger-button", "aria-label": t('login.user') || 'User', icon: (0, jsx_runtime_1.jsx)(lucide_react_1.User, {}) }) }) })),
|
|
289
303
|
},
|
|
290
304
|
}, content: (0, jsx_runtime_1.jsxs)("div", { className: "memori-dropdown--content", children: [(0, jsx_runtime_1.jsx)("div", { className: "memori-dropdown--user-item", children: (0, jsx_runtime_1.jsxs)("div", { className: "memori-dropdown--user-info", children: [(0, jsx_runtime_1.jsx)("div", { className: "memori-dropdown--avatar-wrap", children: user.avatarURL ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { src: user.avatarURL, alt: user.userName || user.eMail, className: "memori-dropdown--avatar" }), (0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--avatar-overlay", "aria-hidden": true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Camera, { size: 20, strokeWidth: 2 }) }), (0, jsx_runtime_1.jsx)("label", { htmlFor: "avatar", className: "sr-only", children: t('login.avatarChange') }), (0, jsx_runtime_1.jsx)("input", { type: "file", name: "avatar", id: "avatar", className: "memori-dropdown--avatar-input", onChange: e => {
|
|
291
305
|
var _a, _b;
|
|
@@ -297,8 +311,8 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
297
311
|
return updateAvatar((_b = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null);
|
|
298
312
|
}, accept: utils_1.imgMimeTypes.join(', ') })] }) })) }), (0, jsx_runtime_1.jsxs)("div", { className: "memori-dropdown--user-details", children: [(0, jsx_runtime_1.jsx)("h3", { className: "memori-dropdown--user-name", children: user.userName || t('login.welcomeUser') }), (0, jsx_runtime_1.jsx)("p", { className: "memori-dropdown--user-email", children: user.eMail }), (0, jsx_runtime_1.jsx)("div", { className: "memori-dropdown--user-badge", children: user.birthDate
|
|
299
313
|
? new Date(user.birthDate).toLocaleDateString()
|
|
300
|
-
: t('login.notSet') })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "memori-dropdown--separator" }), (0, jsx_runtime_1.jsx)(
|
|
301
|
-
const headerActionsBeforeChatHistory = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [memori.needsPosition && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--position", children: (0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('widget.position') || 'Position', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(PositionPopover_1.default, { venue: position, setVenue: setVenue, open: positionPopoverOpen, onOpenChange: open => {
|
|
314
|
+
: t('login.notSet') })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "memori-dropdown--separator" }), (0, jsx_runtime_1.jsx)(IconButton_1.default, { type: "button", variant: buttonVariant, onClick: onLogout, className: "memori-dropdown--action-button memori-dropdown--action-button--logout", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.LogOut, { size: 18, strokeWidth: 2, "aria-hidden": true }), children: (0, jsx_runtime_1.jsx)("span", { className: "memori-header--action-label", children: t('login.logout') || 'Logout' }) })] }), children: null })) : ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('login.login') || 'Login', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(ui_1.Button, { variant: isFullPageChrome ? 'primary' : buttonVariant, className: "memori-header--button memori-header--button-login", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.User, {}), title: t('login.login') || 'Login', "aria-label": t('login.login') || 'Login', onClick: () => setShowLoginDrawer(true), children: isFullPageChrome ? fullpageHeaderLoginLabel : null }) }) })) }));
|
|
315
|
+
const headerActionsBeforeChatHistory = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [memori.needsPosition && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--position", children: (0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('widget.position') || 'Position', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(PositionPopover_1.default, { venue: position, setVenue: setVenue, open: positionPopoverOpen, autoStartGeolocation: autoStartPositionGeolocation, onOpenChange: open => {
|
|
302
316
|
setPositionPopoverOpen(open);
|
|
303
317
|
if (open) {
|
|
304
318
|
setInfoPopoverOpen(false);
|
|
@@ -306,16 +320,16 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
306
320
|
}
|
|
307
321
|
}, triggerButtonVariant: buttonVariant, triggerAriaLabel: t('widget.position') || 'Position', positionerClassName: layout === 'WEBSITE_ASSISTANT'
|
|
308
322
|
? 'memori-position-popover__positioner--website-assistant'
|
|
309
|
-
: undefined }) }) }) })), showReload && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('reload') || 'Reload', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
323
|
+
: undefined }) }) }) })), showReload && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('reload') || 'Reload', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, "aria-label": t('reload') || 'Reload', icon: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, {}), onClick: () => {
|
|
310
324
|
window.location.reload();
|
|
311
|
-
} }) }) })), showClear && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('clearHistory') || 'Clear chat', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
325
|
+
} }) }) })), showClear && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('clearHistory') || 'Clear chat', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, "aria-label": t('clearHistory') || 'Clear chat', icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash2, {}), onClick: () => {
|
|
312
326
|
clearHistory();
|
|
313
327
|
add((0, ui_1.createAlertOptions)({
|
|
314
328
|
description: t('clearHistoryDone'),
|
|
315
329
|
severity: 'success',
|
|
316
330
|
}));
|
|
317
331
|
} }) }) }))] }));
|
|
318
|
-
const headerActionsAfterChatHistory = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showMessageConsumption && ((0, jsx_runtime_1.jsx)(ChatConsumptionDropdown_1.default, { history: history, triggerVariant: buttonVariant })), showFullscreen && fullScreenAvailable && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: fullscreenLabel, placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
332
|
+
const headerActionsAfterChatHistory = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showMessageConsumption && ((0, jsx_runtime_1.jsx)(ChatConsumptionDropdown_1.default, { history: history, triggerVariant: buttonVariant })), showFullscreen && fullScreenAvailable && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: fullscreenLabel, placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, title: fullscreenLabel, "aria-label": fullscreenLabel, icon: fullScreen ? (0, jsx_runtime_1.jsx)(lucide_react_1.Maximize, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.Minimize, {}), onClick: fullScreenHandler ||
|
|
319
333
|
(() => {
|
|
320
334
|
var _a;
|
|
321
335
|
if (!document.fullscreenElement) {
|
|
@@ -362,7 +376,7 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
362
376
|
!!loginToken &&
|
|
363
377
|
(user === null || user === void 0 ? void 0 : user.pAndCUAccepted) &&
|
|
364
378
|
hasUserActivatedSpeak &&
|
|
365
|
-
!!sessionID && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('knownFacts.title') || 'Known facts', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
379
|
+
!!sessionID && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('knownFacts.title') || 'Known facts', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Brain, {}), "aria-label": t('knownFacts.title') || 'Known facts', onClick: () => setShowKnownFactsDrawer(true) }) }) })), memori.enableBoardOfExperts && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('widget.showExpertsInTheBoard') || 'Experts in this board', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, {}), disabled: !hasUserActivatedSpeak || !sessionID, "aria-label": t('widget.showExpertsInTheBoard') || 'Experts in this board', onClick: () => setShowExpertsDrawer(true) }) }) })), enableAudio && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: soundLabel, placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, icon: speakerMuted ? (0, jsx_runtime_1.jsx)(lucide_react_1.VolumeX, { size: 20, strokeWidth: 2.35, "aria-hidden": true }) : (0, jsx_runtime_1.jsx)(lucide_react_1.Volume2, { size: 20, strokeWidth: 2, "aria-hidden": true }), title: soundLabel, "aria-label": soundLabel, onClick: () => setSpeakerMuted(!speakerMuted) }) }) })), showSettings && hasSettingsContent(layout, additionalSettings) && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('widget.settings') || 'Settings', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Settings, {}), "aria-label": t('widget.settings') || 'Settings', onClick: () => setShowSettingsDrawer(true) }) }) })), showShare && ((0, jsx_runtime_1.jsx)(ShareButton_1.default, { title: memori.name, memori: memori, sessionID: sessionID, tenant: tenant, showQrCode: true, align: "left", baseUrl: baseUrl, history: history, triggerVariant: buttonVariant }))] }));
|
|
366
380
|
const sessionInfoConsumptionSubtitle = hasSustainabilityData
|
|
367
381
|
? `${formatImpactInReadableUnit(sustainabilityTotals.energy, 'energy', currentLocale)} • ${formatImpactInReadableUnit(sustainabilityTotals.gwp, 'co2', currentLocale)}`
|
|
368
382
|
: t('widget.noData', { defaultValue: 'Nessun dato disponibile' });
|
|
@@ -374,12 +388,12 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
374
388
|
}
|
|
375
389
|
}, placement: "bottom-end", sideOffset: 8, closable: false, contentClassName: "memori-dropdown--menu memori-dropdown--auth-menu", slotProps: {
|
|
376
390
|
trigger: {
|
|
377
|
-
render: (props) => ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: "Info sessione", placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
391
|
+
render: (props) => ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: "Info sessione", placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { ...props, active: infoPopoverOpen, variant: buttonVariant, className: "memori-header--auth-icon-button", "aria-label": "Info sessione", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.MoreVertical, {}) }) }) })),
|
|
378
392
|
},
|
|
379
393
|
}, content: (0, jsx_runtime_1.jsxs)("div", { className: "memori-dropdown--auth-content", children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", className: "memori-dropdown--auth-row memori-dropdown--auth-row--navigable", onClick: () => {
|
|
380
394
|
setShowKnownFactsDrawer(true);
|
|
381
395
|
setInfoPopoverOpen(false);
|
|
382
|
-
}, children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-icon-wrap", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Brain, { size: 16 }) }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-dropdown--auth-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-title", children: t('knownFacts.title') || 'Known facts' }), (0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-subtitle", children: t('widget.knownFactsHint') || 'What I remember about you' })] })] }), hasChatConsumptionData ? ((0, jsx_runtime_1.jsx)(ChatConsumptionDropdown_1.default, { history: history, triggerVariant: buttonVariant, menuAlign: "start", trigger: (triggerProps, { open }) => ((0, jsx_runtime_1.jsxs)("button", { ...triggerProps, type: "button", className: (0, classnames_1.default)('memori-dropdown--auth-row', 'memori-dropdown--auth-row--navigable', open && 'memori-dropdown--auth-row--active', triggerProps.className), children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-icon-wrap", children: (0, jsx_runtime_1.jsx)(GasStation_1.default, {}) }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-dropdown--auth-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-title", children: t('widget.aiConsumption') || 'AI usage' }), (0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-subtitle", children: sessionInfoConsumptionSubtitle })] }), open ? ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16, "aria-hidden": true })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: 16, "aria-hidden": true }))] })) })) : ((0, jsx_runtime_1.jsxs)("button", { type: "button", disabled: true, className: "memori-dropdown--auth-row memori-dropdown--auth-row--navigable memori-dropdown--auth-row--disabled", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-icon-wrap", children: (0, jsx_runtime_1.jsx)(GasStation_1.default, {}) }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-dropdown--auth-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-title", children: t('widget.aiConsumption') || 'AI usage' }), (0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-subtitle", children: sessionInfoConsumptionSubtitle })] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: 16, "aria-hidden": true })] }))] }), children: null })), showFullscreen && fullScreenAvailable && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: fullscreenLabel, placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
396
|
+
}, children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-icon-wrap", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Brain, { size: 16 }) }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-dropdown--auth-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-title", children: t('knownFacts.title') || 'Known facts' }), (0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-subtitle", children: t('widget.knownFactsHint') || 'What I remember about you' })] })] }), hasChatConsumptionData ? ((0, jsx_runtime_1.jsx)(ChatConsumptionDropdown_1.default, { history: history, triggerVariant: buttonVariant, menuAlign: "start", trigger: (triggerProps, { open }) => ((0, jsx_runtime_1.jsxs)("button", { ...triggerProps, type: "button", className: (0, classnames_1.default)('memori-dropdown--auth-row', 'memori-dropdown--auth-row--navigable', open && 'memori-dropdown--auth-row--active', triggerProps.className), children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-icon-wrap", children: (0, jsx_runtime_1.jsx)(GasStation_1.default, {}) }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-dropdown--auth-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-title", children: t('widget.aiConsumption') || 'AI usage' }), (0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-subtitle", children: sessionInfoConsumptionSubtitle })] }), open ? ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16, "aria-hidden": true })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: 16, "aria-hidden": true }))] })) })) : ((0, jsx_runtime_1.jsxs)("button", { type: "button", disabled: true, className: "memori-dropdown--auth-row memori-dropdown--auth-row--navigable memori-dropdown--auth-row--disabled", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-icon-wrap", children: (0, jsx_runtime_1.jsx)(GasStation_1.default, {}) }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-dropdown--auth-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-title", children: t('widget.aiConsumption') || 'AI usage' }), (0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--auth-subtitle", children: sessionInfoConsumptionSubtitle })] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: 16, "aria-hidden": true })] }))] }), children: null })), showFullscreen && fullScreenAvailable && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: fullscreenLabel, placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, className: "memori-header--auth-icon-button", title: fullscreenLabel, "aria-label": fullscreenLabel, icon: fullScreen ? (0, jsx_runtime_1.jsx)(lucide_react_1.Minimize, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.Maximize, {}), onClick: fullScreenHandler ||
|
|
383
397
|
(() => {
|
|
384
398
|
var _a;
|
|
385
399
|
if (!document.fullscreenElement) {
|
|
@@ -419,7 +433,7 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
419
433
|
console.warn('Error attempting to exit fullscreen:', err);
|
|
420
434
|
});
|
|
421
435
|
}
|
|
422
|
-
}) }) }) })), enableAudio && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: soundLabel, placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
436
|
+
}) }) }) })), enableAudio && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: soundLabel, placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, className: "memori-header--auth-icon-button", title: soundLabel, "aria-label": soundLabel, icon: speakerMuted ? (0, jsx_runtime_1.jsx)(lucide_react_1.VolumeX, { size: 20, strokeWidth: 2.35, "aria-hidden": true }) : (0, jsx_runtime_1.jsx)(lucide_react_1.Volume2, { size: 20, strokeWidth: 2, "aria-hidden": true }), onClick: () => setSpeakerMuted(!speakerMuted) }) }) })), memori.needsPosition && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: t('widget.position') || 'Position', placement: "bottom", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(PositionPopover_1.default, { venue: position, setVenue: setVenue, open: positionPopoverOpen, autoStartGeolocation: autoStartPositionGeolocation, onOpenChange: open => {
|
|
423
437
|
setPositionPopoverOpen(open);
|
|
424
438
|
if (open) {
|
|
425
439
|
setInfoPopoverOpen(false);
|
|
@@ -452,7 +466,7 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
452
466
|
!!(user === null || user === void 0 ? void 0 : user.pAndCUAccepted) &&
|
|
453
467
|
hasUserActivatedSpeak &&
|
|
454
468
|
!!sessionID;
|
|
455
|
-
const totemRail = ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('memori-totem-rail', className), role: "toolbar", "aria-label": String(t('widget.sessionControls', { defaultValue: 'Controlli' })), "aria-orientation": "vertical", children: [(0, jsx_runtime_1.jsxs)("div", { className: "memori-totem-rail--group", children: [enableAudio && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: soundLabel, placement: "left", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
469
|
+
const totemRail = ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('memori-totem-rail', className), role: "toolbar", "aria-label": String(t('widget.sessionControls', { defaultValue: 'Controlli' })), "aria-orientation": "vertical", children: [(0, jsx_runtime_1.jsxs)("div", { className: "memori-totem-rail--group", children: [enableAudio && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: soundLabel, placement: "left", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, className: "memori-totem-rail--button", icon: speakerMuted ? (0, jsx_runtime_1.jsx)(lucide_react_1.VolumeX, { size: 20, strokeWidth: 2.35, "aria-hidden": true }) : (0, jsx_runtime_1.jsx)(lucide_react_1.Volume2, { size: 20, strokeWidth: 2, "aria-hidden": true }), title: soundLabel, "aria-label": soundLabel, "aria-pressed": speakerMuted, onClick: () => setSpeakerMuted(!speakerMuted) }) }) })), showFullscreen && fullScreenAvailable && ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: fullscreenLabel, placement: "left", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { variant: buttonVariant, className: "memori-totem-rail--button", icon: fullScreen ? (0, jsx_runtime_1.jsx)(lucide_react_1.Minimize, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.Maximize, {}), title: fullscreenLabel, "aria-label": fullscreenLabel, "aria-pressed": fullScreen, onClick: handleTotemFullscreen }) }) })), showShare && ((0, jsx_runtime_1.jsx)(ShareButton_1.default, { title: memori.name, memori: memori, sessionID: sessionID, tenant: tenant, showQrCode: true, align: "left", baseUrl: baseUrl, history: history, triggerVariant: buttonVariant, className: "memori-totem-rail--button" }))] }), (0, jsx_runtime_1.jsx)("div", { className: "memori-totem-rail--divider", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { className: "memori-totem-rail--group", children: (0, jsx_runtime_1.jsx)(ui_1.Popover, { className: "memori-header--dropdown", open: userPopoverOpen, onOpenChange: open => {
|
|
456
470
|
setUserPopoverOpen(open);
|
|
457
471
|
if (open) {
|
|
458
472
|
setInfoPopoverOpen(false);
|
|
@@ -460,9 +474,9 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
460
474
|
}
|
|
461
475
|
}, placement: "left-start", sideOffset: 8, closable: false, contentClassName: "memori-dropdown--menu memori-totem-rail--menu", slotProps: {
|
|
462
476
|
trigger: {
|
|
463
|
-
render: (props) => ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: totemAccountLabel, placement: "left", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(
|
|
477
|
+
render: (props) => ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { title: totemAccountLabel, placement: "left", children: (0, jsx_runtime_1.jsx)("span", { style: { display: 'inline-flex' }, children: (0, jsx_runtime_1.jsx)(IconButton_1.default, { ...props, active: userPopoverOpen, variant: buttonVariant, className: (0, classnames_1.default)('memori-totem-rail--button', 'memori-totem-rail--account-trigger'), title: totemAccountLabel, "aria-label": totemAccountLabel, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.User, {}) }) }) })),
|
|
464
478
|
},
|
|
465
|
-
}, content: (0, jsx_runtime_1.jsxs)("div", { className: "memori-totem-rail--menu-content", children: [isAuthenticated && ((0, jsx_runtime_1.jsxs)("div", { className: "memori-totem-rail--menu-identity", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-totem-rail--menu-identity-name", children: (user === null || user === void 0 ? void 0 : user.userName) || t('login.welcomeUser') }), (user === null || user === void 0 ? void 0 : user.eMail) && ((0, jsx_runtime_1.jsx)("span", { className: "memori-totem-rail--menu-identity-email", children: user.eMail }))] })), showReload && ((0, jsx_runtime_1.jsx)(ui_1.Button, { type: "button", variant: "ghost", className: "memori-totem-rail--menu-item", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { size: 18, "aria-hidden": true }), title: totemResetLabel, "aria-label": totemResetLabel, onClick: () => {
|
|
479
|
+
}, content: (0, jsx_runtime_1.jsxs)("div", { className: "memori-totem-rail--menu-content", children: [showLogin && isAuthenticated && ((0, jsx_runtime_1.jsxs)("div", { className: "memori-totem-rail--menu-identity", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-totem-rail--menu-identity-name", children: (user === null || user === void 0 ? void 0 : user.userName) || t('login.welcomeUser') }), (user === null || user === void 0 ? void 0 : user.eMail) && ((0, jsx_runtime_1.jsx)("span", { className: "memori-totem-rail--menu-identity-email", children: user.eMail }))] })), showReload && ((0, jsx_runtime_1.jsx)(ui_1.Button, { type: "button", variant: "ghost", className: "memori-totem-rail--menu-item", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { size: 18, "aria-hidden": true }), title: totemResetLabel, "aria-label": totemResetLabel, onClick: () => {
|
|
466
480
|
setUserPopoverOpen(false);
|
|
467
481
|
window.location.reload();
|
|
468
482
|
}, children: totemResetLabel })), totemShowSettings && ((0, jsx_runtime_1.jsx)(ui_1.Button, { type: "button", variant: "ghost", className: "memori-totem-rail--menu-item", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Settings, { size: 18, "aria-hidden": true }), title: totemSettingsLabel, "aria-label": totemSettingsLabel, onClick: () => {
|
|
@@ -471,21 +485,15 @@ const Header = ({ className, buttonVariant = 'ghost', memori, tenant, history, p
|
|
|
471
485
|
}, children: totemSettingsLabel })), totemShowKnownFacts && ((0, jsx_runtime_1.jsx)(ui_1.Button, { type: "button", variant: "ghost", className: "memori-totem-rail--menu-item", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Brain, { size: 18, "aria-hidden": true }), title: totemKnownFactsLabel, "aria-label": totemKnownFactsLabel, onClick: () => {
|
|
472
486
|
setUserPopoverOpen(false);
|
|
473
487
|
setShowKnownFactsDrawer(true);
|
|
474
|
-
}, children: totemKnownFactsLabel })),
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
!fullpageGuestChrome && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-divider", "aria-hidden": "true" })), (0, jsx_runtime_1.jsxs)("div", { className: "memori-header--fullpage-secondary", children: [loggedInFullpageRightControls, showFullpageChromeDividers && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-divider", "aria-hidden": "true" })), loginNode] })] })) : isFullPageChrome ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [fullpagePrimaryHasContent && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-primary", children: chatHistoryNode })), fullpagePrimaryHasContent &&
|
|
484
|
-
fullpageSecondaryHasContent &&
|
|
485
|
-
showFullpageChromeDividers &&
|
|
486
|
-
!fullpageGuestChrome && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-divider", "aria-hidden": "true" })), (0, jsx_runtime_1.jsxs)("div", { className: "memori-header--fullpage-secondary", children: [headerActionsBeforeChatHistory, headerActionsAfterChatHistory, fullpagePrimaryHasContent &&
|
|
487
|
-
fullpageSecondaryHasContent &&
|
|
488
|
-
showFullpageChromeDividers && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-divider", "aria-hidden": "true" })), loginNode] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [headerActionsBeforeChatHistory, chatHistoryNode, headerActionsAfterChatHistory, loginNode] })), extraActions] }));
|
|
488
|
+
}, children: totemKnownFactsLabel })), showLogin &&
|
|
489
|
+
(isAuthenticated ? ((0, jsx_runtime_1.jsx)(ui_1.Button, { type: "button", variant: "ghost", className: "memori-totem-rail--menu-item memori-totem-rail--menu-item--logout", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.LogOut, { size: 18, "aria-hidden": true }), title: t('login.logout') || 'Logout', "aria-label": t('login.logout') || 'Logout', onClick: () => {
|
|
490
|
+
setUserPopoverOpen(false);
|
|
491
|
+
onLogout === null || onLogout === void 0 ? void 0 : onLogout();
|
|
492
|
+
}, children: t('login.logout') || 'Logout' })) : ((0, jsx_runtime_1.jsx)(ui_1.Button, { type: "button", variant: "ghost", className: "memori-totem-rail--menu-item", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.User, { size: 18, "aria-hidden": true }), title: t('login.login') || 'Login', "aria-label": t('login.login') || 'Login', onClick: () => {
|
|
493
|
+
setUserPopoverOpen(false);
|
|
494
|
+
setShowLoginDrawer(true);
|
|
495
|
+
}, children: t('login.login') || 'Login' })))] }), children: null }) })] }));
|
|
496
|
+
const headerControls = ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('memori-header', className, isFullPageChrome && 'memori-header--fullpage', fullpageGuestChrome && 'memori-header--fullpage-guest'), children: [isFullPageChrome && isAuthenticated ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [fullpagePrimaryHasContent && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-primary", children: chatHistoryNode })), showHistoryDivider && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-divider", "aria-hidden": "true" })), loggedInSecondaryHasActions && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-secondary", children: loggedInFullpageRightControls })), showLoginDivider && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-divider", "aria-hidden": "true" })), loginNode] })) : isFullPageChrome ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [fullpagePrimaryHasContent && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-primary", children: chatHistoryNode })), showHistoryDivider && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-divider", "aria-hidden": "true" })), fullpageSecondaryHasContent && ((0, jsx_runtime_1.jsxs)("div", { className: "memori-header--fullpage-secondary", children: [headerActionsBeforeChatHistory, headerActionsAfterChatHistory] })), showLoginDivider && ((0, jsx_runtime_1.jsx)("div", { className: "memori-header--fullpage-divider", "aria-hidden": "true" })), loginNode] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [headerActionsBeforeChatHistory, chatHistoryNode, headerActionsAfterChatHistory, loginNode] })), extraActions] }));
|
|
489
497
|
if (layout === 'TOTEM') {
|
|
490
498
|
return totemRail;
|
|
491
499
|
}
|