@memori.ai/memori-react 8.38.4 → 8.38.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.
- package/CHANGELOG.md +12 -0
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.css +12 -3
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +18 -7
- package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -1
- package/dist/components/DrawerFooter/DrawerFooter.js +1 -1
- package/dist/components/DrawerFooter/DrawerFooter.js.map +1 -1
- package/dist/components/MobileSessionPanel/MobileSessionPanel.css +19 -1
- package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +5 -1
- package/dist/components/MobileSessionPanel/MobileSessionPanel.js +172 -55
- package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -1
- package/dist/components/PositionPopover/PositionPopover.js +2 -1
- package/dist/components/PositionPopover/PositionPopover.js.map +1 -1
- package/dist/components/UploadButton/UploadButton.js +25 -10
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.d.ts +0 -2
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js +8 -22
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +1 -1
- package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
- package/dist/components/layouts/fullpage.css +25 -8
- package/dist/components/ui/Tooltip.js +3 -3
- package/dist/components/ui/Tooltip.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.css +12 -3
- package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js +18 -7
- package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -1
- package/esm/components/DrawerFooter/DrawerFooter.js +1 -1
- package/esm/components/DrawerFooter/DrawerFooter.js.map +1 -1
- package/esm/components/MobileSessionPanel/MobileSessionPanel.css +19 -1
- package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +5 -1
- package/esm/components/MobileSessionPanel/MobileSessionPanel.js +173 -57
- package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -1
- package/esm/components/PositionPopover/PositionPopover.js +2 -1
- package/esm/components/PositionPopover/PositionPopover.js.map +1 -1
- package/esm/components/UploadButton/UploadButton.js +25 -10
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.d.ts +0 -2
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js +8 -22
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +1 -1
- package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -1
- package/esm/components/layouts/fullpage.css +25 -8
- package/esm/components/ui/Tooltip.js +3 -3
- package/esm/components/ui/Tooltip.js.map +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +1 -1
- package/src/components/UploadButton/UploadButton.tsx +139 -104
- package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +6 -33
- package/src/components/ui/Tooltip.tsx +3 -2
- package/src/version.ts +1 -1
- package/dist/helpers/userMessage.d.ts +0 -2
- package/dist/helpers/userMessage.js +0 -23
- package/dist/helpers/userMessage.js.map +0 -1
- package/esm/helpers/userMessage.d.ts +0 -2
- package/esm/helpers/userMessage.js +0 -18
- package/esm/helpers/userMessage.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [8.38.5](https://github.com/memori-ai/memori-react/compare/v8.38.4...v8.38.5) (2026-05-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* increase tooltip close delay and enable pointer events for content ([22f596b](https://github.com/memori-ai/memori-react/commit/22f596b308c0263331b93faf0b3b5b7c11af52b0))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Changes
|
|
12
|
+
|
|
13
|
+
* improve file selection handling and document upload logic in UploadButton ([71117bc](https://github.com/memori-ai/memori-react/commit/71117bc0926779c103a57d9574ee69ccc6b914a8))
|
|
14
|
+
|
|
3
15
|
## [8.38.4](https://github.com/memori-ai/memori-react/compare/v8.38.3...v8.38.4) (2026-05-12)
|
|
4
16
|
|
|
5
17
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
width: min(100%, 430px);
|
|
24
24
|
height: 100%;
|
|
25
25
|
flex-direction: column;
|
|
26
|
-
background: var(--memori-main-background);
|
|
26
|
+
/* background: var(--memori-main-background); */
|
|
27
27
|
box-shadow: -10px 0 30px rgba(0, 0, 0, 0.16);
|
|
28
28
|
transform: translateX(100%);
|
|
29
29
|
transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
min-height: 0;
|
|
140
140
|
flex: 1;
|
|
141
141
|
flex-direction: column;
|
|
142
|
-
padding:
|
|
142
|
+
padding: var(--memori-spacing-lg);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.memori-chat-resume-drawer--embedded-chat {
|
|
@@ -166,6 +166,15 @@
|
|
|
166
166
|
display: none;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
.memori-chat-resume-drawer--embedded-chat .memori-chat--bubble-container {
|
|
170
|
+
padding-right: 0;
|
|
171
|
+
padding-left: 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.memori-chat-resume-drawer--embedded-chat .memori-chat--bubble-message-row {
|
|
175
|
+
align-items: flex-start;
|
|
176
|
+
}
|
|
177
|
+
|
|
169
178
|
/* .memori-chat-resume-drawer--embedded-chat .memori-chat--bubble-container,
|
|
170
179
|
.memori-chat-resume-drawer--embedded-chat .memori-chat--timestamp,
|
|
171
180
|
.memori-chat-resume-drawer--embedded-chat .memori-media-widget,
|
|
@@ -297,7 +306,7 @@
|
|
|
297
306
|
padding: 16px 24px;
|
|
298
307
|
margin-bottom: 1rem;
|
|
299
308
|
/* border-top: 0.5px solid var(--color-border-tertiary, var(--memori-border-color, #e5e7eb)); */
|
|
300
|
-
background: var(--memori-main-background);
|
|
309
|
+
/* background: var(--memori-main-background); */
|
|
301
310
|
gap: 12px;
|
|
302
311
|
}
|
|
303
312
|
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const ui_1 = require("@memori.ai/ui");
|
|
7
7
|
const lucide_react_1 = require("lucide-react");
|
|
8
|
+
const react_i18next_1 = require("react-i18next");
|
|
8
9
|
const utils_1 = require("../../helpers/utils");
|
|
9
10
|
const Chat_1 = tslib_1.__importDefault(require("../Chat/Chat"));
|
|
10
11
|
require("./ChatResumeDrawer.css");
|
|
@@ -26,8 +27,11 @@ const stripMarkdownChars = (value) => {
|
|
|
26
27
|
};
|
|
27
28
|
const escapeAttachmentAttr = (value) => value.replaceAll('"', '"');
|
|
28
29
|
const ChatResumeDrawer = ({ isOpen, onClose, onBack, embedded = false, session, onResume, isLoading = false, onExportChat, }) => {
|
|
30
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
31
|
+
const dialogRef = (0, react_1.useRef)(null);
|
|
29
32
|
const panelRef = (0, react_1.useRef)(null);
|
|
30
33
|
const backButtonRef = (0, react_1.useRef)(null);
|
|
34
|
+
const titleId = 'chat-resume-drawer-title';
|
|
31
35
|
const [shouldRender, setShouldRender] = (0, react_1.useState)(isOpen);
|
|
32
36
|
const [isVisible, setIsVisible] = (0, react_1.useState)(isOpen);
|
|
33
37
|
(0, react_1.useEffect)(() => {
|
|
@@ -49,16 +53,20 @@ const ChatResumeDrawer = ({ isOpen, onClose, onBack, embedded = false, session,
|
|
|
49
53
|
(_a = backButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
50
54
|
}, [isOpen]);
|
|
51
55
|
(0, react_1.useEffect)(() => {
|
|
52
|
-
if (!isOpen)
|
|
56
|
+
if (!isOpen || embedded)
|
|
57
|
+
return;
|
|
58
|
+
const previouslyFocused = document.activeElement;
|
|
59
|
+
const root = dialogRef.current;
|
|
60
|
+
if (!root)
|
|
53
61
|
return;
|
|
54
62
|
const handleKeyDown = (event) => {
|
|
55
63
|
if (event.key === 'Escape') {
|
|
56
64
|
onClose();
|
|
57
65
|
return;
|
|
58
66
|
}
|
|
59
|
-
if (event.key !== 'Tab'
|
|
67
|
+
if (event.key !== 'Tab')
|
|
60
68
|
return;
|
|
61
|
-
const focusableElements =
|
|
69
|
+
const focusableElements = root.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
62
70
|
if (!focusableElements.length)
|
|
63
71
|
return;
|
|
64
72
|
const first = focusableElements[0];
|
|
@@ -74,8 +82,11 @@ const ChatResumeDrawer = ({ isOpen, onClose, onBack, embedded = false, session,
|
|
|
74
82
|
}
|
|
75
83
|
};
|
|
76
84
|
document.addEventListener('keydown', handleKeyDown);
|
|
77
|
-
return () =>
|
|
78
|
-
|
|
85
|
+
return () => {
|
|
86
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
87
|
+
previouslyFocused === null || previouslyFocused === void 0 ? void 0 : previouslyFocused.focus();
|
|
88
|
+
};
|
|
89
|
+
}, [embedded, isOpen, onClose]);
|
|
79
90
|
const safeTitle = (0, react_1.useMemo)(() => {
|
|
80
91
|
const cleaned = stripMarkdownChars((0, utils_1.stripHTML)(session.title || ''));
|
|
81
92
|
return cleaned || 'Conversazione';
|
|
@@ -96,11 +107,11 @@ const ChatResumeDrawer = ({ isOpen, onClose, onBack, embedded = false, session,
|
|
|
96
107
|
}), [session.messages]);
|
|
97
108
|
if (!embedded && !shouldRender)
|
|
98
109
|
return null;
|
|
99
|
-
const content = ((0, jsx_runtime_1.jsxs)("div", { ref: panelRef, className: `memori-chat-resume-drawer--panel ${embedded ? 'memori-chat-resume-drawer--panel-embedded' : ''}`, onClick: event => event.stopPropagation(), children: [(0, jsx_runtime_1.jsxs)("header", { className: "memori-chat-resume-drawer--header", children: [(0, jsx_runtime_1.jsx)(ui_1.Button, { ref: backButtonRef, variant: "ghost", type: "button", className: "memori-chat-resume-drawer--header-icon-button", onClick: onBack || onClose, "aria-label":
|
|
110
|
+
const content = ((0, jsx_runtime_1.jsxs)("div", { ref: panelRef, className: `memori-chat-resume-drawer--panel ${embedded ? 'memori-chat-resume-drawer--panel-embedded' : ''}`, onClick: event => event.stopPropagation(), children: [(0, jsx_runtime_1.jsxs)("header", { className: "memori-chat-resume-drawer--header", children: [(0, jsx_runtime_1.jsx)(ui_1.Button, { ref: backButtonRef, variant: "ghost", type: "button", className: "memori-chat-resume-drawer--header-icon-button", onClick: onBack || onClose, "aria-label": String(t('back', { defaultValue: 'Back' })), children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 16, "aria-hidden": true }) }), (0, jsx_runtime_1.jsxs)("div", { className: "memori-chat-resume-drawer--header-main", children: [(0, jsx_runtime_1.jsx)("h2", { id: titleId, className: "memori-chat-resume-drawer--title", title: safeTitle, children: safeTitle }), (0, jsx_runtime_1.jsx)("p", { className: "memori-chat-resume-drawer--subtitle", children: session.subtitle })] }), (0, jsx_runtime_1.jsx)(ui_1.Button, { variant: "ghost", size: "sm", className: "memori-chat-history-drawer--header-download-button", "aria-label": String(t('download', { defaultValue: 'Download' })), title: String(t('download', { defaultValue: 'Download' })), icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Download, { "aria-hidden": true }), onClick: onExportChat })] }), (0, jsx_runtime_1.jsxs)("div", { className: "memori-chat-resume-drawer--thread", children: [isLoading && ((0, jsx_runtime_1.jsx)("div", { className: "memori-chat-resume-drawer--skeletons", children: [0, 1, 2].map(item => ((0, jsx_runtime_1.jsx)("div", { className: "memori-chat-resume-drawer--skeleton-bubble" }, item))) })), !isLoading && ((0, jsx_runtime_1.jsx)("div", { className: "memori-chat-resume-drawer--embedded-chat", children: (0, jsx_runtime_1.jsx)(Chat_1.default, { memori: EMPTY_MEMORI, sessionID: "chat-resume-drawer", history: history, pushMessage: NOOP, simulateUserPrompt: NOOP, setSendOnEnter: NOOP, setAttachmentsMenuOpen: NOOP, onChangeUserMessage: NOOP, sendMessage: NOOP, setEnableFocusChatInput: NOOP, stopAudio: NOOP, startListening: NOOP, stopListening: NOOP, showInputs: false, showAIicon: true, showCopyButton: true, isHistoryView: true, isChatlogPanel: true }) }))] }), (0, jsx_runtime_1.jsx)("footer", { className: "memori-chat-resume-drawer--actions", children: (0, jsx_runtime_1.jsxs)(ui_1.Button, { className: "memori-chat-resume-drawer--resume-cta", variant: "primary", onClick: () => onResume(), children: [t('chatResume.resume', { defaultValue: 'Resume conversation' }), ' ', (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowUpRight, { size: 16, "aria-hidden": true })] }) })] }));
|
|
100
111
|
if (embedded) {
|
|
101
112
|
return ((0, jsx_runtime_1.jsx)("div", { className: "memori-chat-resume-drawer--embedded-shell", children: content }));
|
|
102
113
|
}
|
|
103
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `memori-chat-resume-drawer ${isVisible ? 'memori-chat-resume-drawer--open' : ''}`, role: "dialog", "aria-modal": "true", "aria-
|
|
114
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: dialogRef, className: `memori-chat-resume-drawer ${isVisible ? 'memori-chat-resume-drawer--open' : ''}`, role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, children: [(0, jsx_runtime_1.jsx)(ui_1.Button, { className: "memori-chat-resume-drawer--backdrop", type: "button", "aria-label": String(t('close', { defaultValue: 'Close' })), onClick: onClose }), content] }));
|
|
104
115
|
};
|
|
105
116
|
exports.default = ChatResumeDrawer;
|
|
106
117
|
//# sourceMappingURL=ChatResumeDrawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
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aAExB,CAAC,CAAC,mBAAmB,EAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,EAAE,GAAG,EACrE,uBAAC,2BAAY,IAAC,IAAI,EAAE,EAAE,wBAAgB,IAC/B,GACF,IACL,CACP,CAAC;IAEF,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CACL,gCAAK,SAAS,EAAC,2CAA2C,YAAE,OAAO,GAAO,CAC3E,CAAC;IACJ,CAAC;IAED,OAAO,CACL,iCACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,6BACT,SAAS,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,EAClD,EAAE,EACF,IAAI,EAAC,QAAQ,gBACF,MAAM,qBACA,OAAO,aAExB,uBAAC,WAAM,IACL,SAAS,EAAC,qCAAqC,EAC/C,IAAI,EAAC,QAAQ,gBACD,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC,EACzD,OAAO,EAAE,OAAO,GAChB,EACD,OAAO,IACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -4,7 +4,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
4
4
|
const ui_1 = require("@memori.ai/ui");
|
|
5
5
|
const DrawerFooter = ({ children, start, end, center, closeLabel, onClose, className = '', }) => {
|
|
6
6
|
const hasSlots = start != null || end != null || center != null || closeLabel != null;
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("footer", { className: `memori-drawer-footer ${className}`.trim(),
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("footer", { className: `memori-drawer-footer ${className}`.trim(), children: center != null ? ((0, jsx_runtime_1.jsx)("div", { className: "memori-drawer-footer__inner memori-drawer-footer__inner--centered", children: center })) : children != null && !hasSlots ? ((0, jsx_runtime_1.jsx)("div", { className: "memori-drawer-footer__inner memori-drawer-footer__inner--centered", children: children })) : ((0, jsx_runtime_1.jsxs)("div", { className: "memori-drawer-footer__inner", children: [start != null && ((0, jsx_runtime_1.jsx)("div", { className: "memori-drawer-footer__start", children: start })), (0, jsx_runtime_1.jsxs)("div", { className: "memori-drawer-footer__end", children: [end, closeLabel != null && onClose != null && ((0, jsx_runtime_1.jsx)(ui_1.Button, { variant: "primary", onClick: onClose, children: closeLabel }))] })] })) }));
|
|
8
8
|
};
|
|
9
9
|
exports.default = DrawerFooter;
|
|
10
10
|
//# sourceMappingURL=DrawerFooter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerFooter.js","sourceRoot":"","sources":["../../../src/components/DrawerFooter/DrawerFooter.tsx"],"names":[],"mappings":";;;AACA,sCAAuC;AAgBvC,MAAM,YAAY,GAAgC,CAAC,EACjD,QAAQ,EACR,KAAK,EACL,GAAG,EACH,MAAM,EACN,UAAU,EACV,OAAO,EACP,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,KAAK,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,UAAU,IAAI,IAAI,CAAC;IAEtF,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"DrawerFooter.js","sourceRoot":"","sources":["../../../src/components/DrawerFooter/DrawerFooter.tsx"],"names":[],"mappings":";;;AACA,sCAAuC;AAgBvC,MAAM,YAAY,GAAgC,CAAC,EACjD,QAAQ,EACR,KAAK,EACL,GAAG,EACH,MAAM,EACN,UAAU,EACV,OAAO,EACP,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,KAAK,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,UAAU,IAAI,IAAI,CAAC;IAEtF,OAAO,CACL,mCAAQ,SAAS,EAAE,wBAAwB,SAAS,EAAE,CAAC,IAAI,EAAE,YAC1D,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,CAChB,gCAAK,SAAS,EAAC,mEAAmE,YAC/E,MAAM,GACH,CACP,CAAC,CAAC,CAAC,QAAQ,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAClC,gCAAK,SAAS,EAAC,mEAAmE,YAC/E,QAAQ,GACL,CACP,CAAC,CAAC,CAAC,CACF,iCAAK,SAAS,EAAC,6BAA6B,aACzC,KAAK,IAAI,IAAI,IAAI,CAChB,gCAAK,SAAS,EAAC,6BAA6B,YAAE,KAAK,GAAO,CAC3D,EACD,iCAAK,SAAS,EAAC,2BAA2B,aACvC,GAAG,EACH,UAAU,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI,IAAI,CACxC,uBAAC,WAAM,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,YACvC,UAAU,GACJ,CACV,IACG,IACF,CACP,GACM,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC"}
|
|
@@ -10,6 +10,17 @@
|
|
|
10
10
|
background: rgba(0, 0, 0, 0.34);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
.memori-mobile-session-panel--backdrop {
|
|
14
|
+
position: absolute;
|
|
15
|
+
z-index: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
border: none;
|
|
18
|
+
margin: 0;
|
|
19
|
+
background: transparent;
|
|
20
|
+
cursor: default;
|
|
21
|
+
inset: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
.memori-mobile-session-panel--overlay-popover {
|
|
14
25
|
align-items: flex-start;
|
|
15
26
|
justify-content: flex-end;
|
|
@@ -19,6 +30,7 @@
|
|
|
19
30
|
|
|
20
31
|
.memori-mobile-session-panel {
|
|
21
32
|
position: relative;
|
|
33
|
+
z-index: 1;
|
|
22
34
|
overflow: auto;
|
|
23
35
|
width: 100%;
|
|
24
36
|
max-height: 90vh;
|
|
@@ -128,6 +140,12 @@
|
|
|
128
140
|
white-space: nowrap;
|
|
129
141
|
}
|
|
130
142
|
|
|
143
|
+
.memori-mobile-session-panel--session-info {
|
|
144
|
+
padding-bottom: 0.15rem;
|
|
145
|
+
border-bottom: 1px solid var(--memori-border-color, rgba(0, 0, 0, 0.08));
|
|
146
|
+
margin-bottom: 0.15rem;
|
|
147
|
+
}
|
|
148
|
+
|
|
131
149
|
.memori-mobile-session-panel--section-title {
|
|
132
150
|
padding: 0.85rem 1rem 0.3rem;
|
|
133
151
|
color: var(--memori-text-color);
|
|
@@ -221,7 +239,7 @@
|
|
|
221
239
|
width: calc(100% - 2rem);
|
|
222
240
|
align-items: center !important;
|
|
223
241
|
justify-content: flex-start !important;
|
|
224
|
-
padding: 0.78rem 0.4rem;
|
|
242
|
+
padding: 0.78rem 0.4rem !important;
|
|
225
243
|
border: 0;
|
|
226
244
|
border-radius: 0 !important;
|
|
227
245
|
border-top: 1px solid var(--memori-border-color);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { User } from '@memori.ai/memori-api-client/dist/types';
|
|
2
|
+
import { Message, User } from '@memori.ai/memori-api-client/dist/types';
|
|
3
3
|
import './MobileSessionPanel.css';
|
|
4
4
|
type SessionAction = {
|
|
5
5
|
key: string;
|
|
@@ -49,6 +49,10 @@ export interface MobileSessionPanelProps {
|
|
|
49
49
|
knownFactsCountLabel?: string;
|
|
50
50
|
shareContent?: React.ReactNode;
|
|
51
51
|
knownFactsDisabled?: boolean;
|
|
52
|
+
knownFactsHint?: string;
|
|
53
|
+
showSessionInfo?: boolean;
|
|
54
|
+
history?: Message[];
|
|
55
|
+
aiUsageTitle?: string;
|
|
52
56
|
isLoggedIn?: boolean;
|
|
53
57
|
loginLabel?: string;
|
|
54
58
|
onLogin?: () => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
3
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
5
|
const react_1 = require("react");
|
|
5
6
|
const lucide_react_1 = require("lucide-react");
|
|
@@ -8,14 +9,89 @@ const react_i18next_1 = require("react-i18next");
|
|
|
8
9
|
require("./MobileSessionPanel.css");
|
|
9
10
|
const error_1 = require("../../helpers/error");
|
|
10
11
|
const utils_1 = require("../../helpers/utils");
|
|
11
|
-
const
|
|
12
|
+
const GasStation_1 = tslib_1.__importDefault(require("../icons/GasStation"));
|
|
13
|
+
const ChatConsumptionDropdown_1 = tslib_1.__importDefault(require("../Header/ChatConsumptionDropdown"));
|
|
14
|
+
const getMetricValue = (metric) => {
|
|
15
|
+
if (typeof metric === 'number' && Number.isFinite(metric))
|
|
16
|
+
return metric;
|
|
17
|
+
if (!metric || typeof metric !== 'object')
|
|
18
|
+
return undefined;
|
|
19
|
+
if (typeof metric.parsedValue === 'number' &&
|
|
20
|
+
Number.isFinite(metric.parsedValue)) {
|
|
21
|
+
return metric.parsedValue;
|
|
22
|
+
}
|
|
23
|
+
if (typeof metric.source === 'string') {
|
|
24
|
+
const parsed = Number(metric.source);
|
|
25
|
+
if (Number.isFinite(parsed))
|
|
26
|
+
return parsed;
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
};
|
|
30
|
+
const formatMetricValue = (value, locale) => new Intl.NumberFormat(locale, {
|
|
31
|
+
minimumFractionDigits: 0,
|
|
32
|
+
maximumFractionDigits: Math.abs(value) >= 1 ? 3 : 4,
|
|
33
|
+
}).format(value);
|
|
34
|
+
const formatImpactInReadableUnit = (value, metricType, locale) => {
|
|
35
|
+
const absValue = Math.abs(value);
|
|
36
|
+
if (metricType === 'energy') {
|
|
37
|
+
if (absValue >= 1)
|
|
38
|
+
return `${formatMetricValue(value, locale)} kWh`;
|
|
39
|
+
const wh = value * 1000;
|
|
40
|
+
if (Math.abs(wh) >= 1)
|
|
41
|
+
return `${formatMetricValue(wh, locale)} Wh`;
|
|
42
|
+
return `${formatMetricValue(wh * 1000, locale)} mWh`;
|
|
43
|
+
}
|
|
44
|
+
if (metricType === 'co2') {
|
|
45
|
+
if (absValue >= 1)
|
|
46
|
+
return `${formatMetricValue(value, locale)} kg`;
|
|
47
|
+
const g = value * 1000;
|
|
48
|
+
if (Math.abs(g) >= 1)
|
|
49
|
+
return `${formatMetricValue(g, locale)} g`;
|
|
50
|
+
return `${formatMetricValue(g * 1000, locale)} mg`;
|
|
51
|
+
}
|
|
52
|
+
if (absValue >= 1)
|
|
53
|
+
return `${formatMetricValue(value, locale)} L`;
|
|
54
|
+
const ml = value * 1000;
|
|
55
|
+
if (Math.abs(ml) >= 1)
|
|
56
|
+
return `${formatMetricValue(ml, locale)} mL`;
|
|
57
|
+
return `${formatMetricValue(ml * 1000, locale)} μL`;
|
|
58
|
+
};
|
|
59
|
+
const MobileSessionPanel = ({ open, onClose, presentation = 'sheet', title, loginToken, userName, user, apiClient, userEmail, birthDate, avatarURL, actions, logoutLabel = 'Log out', onLogout, onKnownFactsOpen, onLocationEnable, onLocationDisable, knownFactsPageTitle = 'Known facts', sharePageTitle = 'Share', locationPageTitle = 'Location tracking', backLabel = 'Back', locationStatusLabel = 'Status', locationPlace, locationUnknownLabel = 'Unknown position', locationEnableLabel = 'Use current position', locationDisableLabel = 'Disable location sharing', knownFactsDescription, knownFactsCtaLabel = 'Open full known facts', knownFactsCountLabel, shareContent, knownFactsDisabled = false, knownFactsHint, showSessionInfo = false, history = [], aiUsageTitle, isLoggedIn = false, loginLabel = 'Log in', onLogin, }) => {
|
|
12
60
|
const panelRef = (0, react_1.useRef)(null);
|
|
61
|
+
const dialogRef = (0, react_1.useRef)(null);
|
|
62
|
+
const panelTitleId = 'mobile-session-panel-title';
|
|
13
63
|
const touchStartYRef = (0, react_1.useRef)(0);
|
|
14
64
|
const [dragOffset, setDragOffset] = (0, react_1.useState)(0);
|
|
15
65
|
const [activeView, setActiveView] = (0, react_1.useState)('session');
|
|
16
66
|
const { uploadAsset, pwlUpdateUser } = (apiClient === null || apiClient === void 0 ? void 0 : apiClient.backend) || {};
|
|
17
67
|
const { add } = (0, ui_1.useAlertManager)();
|
|
18
|
-
const { t } = (0, react_i18next_1.useTranslation)();
|
|
68
|
+
const { t, i18n } = (0, react_i18next_1.useTranslation)();
|
|
69
|
+
const currentLocale = i18n.language || navigator.language || 'en';
|
|
70
|
+
const sustainabilityTotals = (0, react_1.useMemo)(() => {
|
|
71
|
+
const totals = { energy: 0, gwp: 0, wcf: 0 };
|
|
72
|
+
history.forEach(line => {
|
|
73
|
+
var _a, _b, _c, _d;
|
|
74
|
+
const energyImpact = (_a = line.llmUsage) === null || _a === void 0 ? void 0 : _a.energyImpact;
|
|
75
|
+
if (!energyImpact)
|
|
76
|
+
return;
|
|
77
|
+
totals.energy += (_b = getMetricValue(energyImpact.energy)) !== null && _b !== void 0 ? _b : 0;
|
|
78
|
+
totals.gwp += (_c = getMetricValue(energyImpact.gwp)) !== null && _c !== void 0 ? _c : 0;
|
|
79
|
+
totals.wcf += (_d = getMetricValue(energyImpact.wcf)) !== null && _d !== void 0 ? _d : 0;
|
|
80
|
+
});
|
|
81
|
+
return totals;
|
|
82
|
+
}, [history]);
|
|
83
|
+
const hasSustainabilityData = (0, react_1.useMemo)(() => history.some(line => {
|
|
84
|
+
var _a;
|
|
85
|
+
return !!((_a = line.llmUsage) === null || _a === void 0 ? void 0 : _a.energyImpact);
|
|
86
|
+
}), [history]);
|
|
87
|
+
const hasChatConsumptionData = (0, react_1.useMemo)(() => history.some(line => !!line.llmUsage), [history]);
|
|
88
|
+
const aiUsageSubtitle = hasSustainabilityData
|
|
89
|
+
? `${formatImpactInReadableUnit(sustainabilityTotals.energy, 'energy', currentLocale)} • ${formatImpactInReadableUnit(sustainabilityTotals.gwp, 'co2', currentLocale)}`
|
|
90
|
+
: t('widget.noData', { defaultValue: 'Nessun dato disponibile' });
|
|
91
|
+
const resolvedKnownFactsHint = knownFactsHint ||
|
|
92
|
+
t('widget.knownFactsHint') ||
|
|
93
|
+
'What I remember about you';
|
|
94
|
+
const resolvedAiUsageTitle = aiUsageTitle || t('widget.aiConsumption') || 'AI usage';
|
|
19
95
|
(0, react_1.useEffect)(() => {
|
|
20
96
|
if (!open)
|
|
21
97
|
return;
|
|
@@ -26,6 +102,39 @@ const MobileSessionPanel = ({ open, onClose, presentation = 'sheet', title, logi
|
|
|
26
102
|
document.addEventListener('keydown', onEscape);
|
|
27
103
|
return () => document.removeEventListener('keydown', onEscape);
|
|
28
104
|
}, [open, onClose]);
|
|
105
|
+
(0, react_1.useEffect)(() => {
|
|
106
|
+
var _a;
|
|
107
|
+
if (!open)
|
|
108
|
+
return;
|
|
109
|
+
const previouslyFocused = document.activeElement;
|
|
110
|
+
const root = dialogRef.current;
|
|
111
|
+
if (!root)
|
|
112
|
+
return;
|
|
113
|
+
const handleKeyDown = (event) => {
|
|
114
|
+
if (event.key !== 'Tab')
|
|
115
|
+
return;
|
|
116
|
+
const focusableElements = root.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
117
|
+
if (!focusableElements.length)
|
|
118
|
+
return;
|
|
119
|
+
const first = focusableElements[0];
|
|
120
|
+
const last = focusableElements[focusableElements.length - 1];
|
|
121
|
+
const active = document.activeElement;
|
|
122
|
+
if (event.shiftKey && active === first) {
|
|
123
|
+
event.preventDefault();
|
|
124
|
+
last.focus();
|
|
125
|
+
}
|
|
126
|
+
else if (!event.shiftKey && active === last) {
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
first.focus();
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
132
|
+
(_a = panelRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
133
|
+
return () => {
|
|
134
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
135
|
+
previouslyFocused === null || previouslyFocused === void 0 ? void 0 : previouslyFocused.focus();
|
|
136
|
+
};
|
|
137
|
+
}, [open]);
|
|
29
138
|
(0, react_1.useEffect)(() => {
|
|
30
139
|
if (open)
|
|
31
140
|
setActiveView('session');
|
|
@@ -110,63 +219,71 @@ const MobileSessionPanel = ({ open, onClose, presentation = 'sheet', title, logi
|
|
|
110
219
|
normalizedTitle.includes('sound');
|
|
111
220
|
return !isLocationAction && !isKnownFactsAction && !isAudioAction;
|
|
112
221
|
});
|
|
113
|
-
return ((0, jsx_runtime_1.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}, accept: utils_1.imgMimeTypes.join(', ') })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: "memori-dropdown--avatar-placeholder", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--avatar-initial", children: (userName || userEmail || 'U')
|
|
137
|
-
.charAt(0)
|
|
138
|
-
.toUpperCase() }), (0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--avatar-overlay", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Camera, { size: 20, strokeWidth: 2 }) }), (0, jsx_runtime_1.jsx)("input", { type: "file", name: "avatar", id: "avatar", className: "memori-dropdown--avatar-input", onChange: e => {
|
|
222
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: dialogRef, className: `memori-mobile-session-panel--overlay ${isPopover ? 'memori-mobile-session-panel--overlay-popover' : ''}`, role: "presentation", children: [!isPopover && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "memori-mobile-session-panel--backdrop", "aria-label": String(t('close', { defaultValue: 'Close' })), onClick: onClose })), (0, jsx_runtime_1.jsxs)("section", { ref: panelRef, tabIndex: -1, className: `memori-mobile-session-panel ${isPopover ? 'memori-mobile-session-panel--popover' : ''}`, role: "dialog", "aria-modal": "true", "aria-labelledby": panelTitleId, onClick: event => event.stopPropagation(), onTouchStart: isPopover
|
|
223
|
+
? undefined
|
|
224
|
+
: event => {
|
|
225
|
+
touchStartYRef.current = event.touches[0].clientY;
|
|
226
|
+
setDragOffset(0);
|
|
227
|
+
}, onTouchMove: isPopover
|
|
228
|
+
? undefined
|
|
229
|
+
: event => {
|
|
230
|
+
const delta = event.touches[0].clientY - touchStartYRef.current;
|
|
231
|
+
if (delta > 0)
|
|
232
|
+
setDragOffset(delta);
|
|
233
|
+
}, onTouchEnd: isPopover
|
|
234
|
+
? undefined
|
|
235
|
+
: () => {
|
|
236
|
+
if (dragOffset > 90) {
|
|
237
|
+
onClose();
|
|
238
|
+
}
|
|
239
|
+
setDragOffset(0);
|
|
240
|
+
}, style: {
|
|
241
|
+
transform: dragOffset ? `translateY(${dragOffset}px)` : undefined,
|
|
242
|
+
}, children: [!isPopover && (0, jsx_runtime_1.jsx)("div", { className: "memori-mobile-session-panel--handle" }), activeView === 'session' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isLoggedIn && ((0, jsx_runtime_1.jsxs)("div", { className: "memori-mobile-session-panel--user", children: [(0, jsx_runtime_1.jsx)("div", { className: "memori-dropdown--avatar-wrap", children: avatarURL ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { src: avatarURL, alt: userName || userEmail, 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: "mobile-session-avatar-upload", className: "sr-only", children: t('login.changeAvatar', {
|
|
243
|
+
defaultValue: 'Change profile picture',
|
|
244
|
+
}) }), (0, jsx_runtime_1.jsx)("input", { type: "file", name: "avatar", id: "mobile-session-avatar-upload", className: "memori-dropdown--avatar-input", onChange: e => {
|
|
139
245
|
var _a, _b;
|
|
140
246
|
return updateAvatar((_b = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null);
|
|
141
|
-
}, accept: utils_1.imgMimeTypes.join(', ') })] })
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
247
|
+
}, accept: utils_1.imgMimeTypes.join(', ') })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: "memori-dropdown--avatar-placeholder", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-dropdown--avatar-initial", children: (userName || userEmail || 'U')
|
|
248
|
+
.charAt(0)
|
|
249
|
+
.toUpperCase() }), (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: "mobile-session-avatar-upload-placeholder", className: "sr-only", children: t('login.changeAvatar', {
|
|
250
|
+
defaultValue: 'Change profile picture',
|
|
251
|
+
}) }), (0, jsx_runtime_1.jsx)("input", { type: "file", name: "avatar", id: "mobile-session-avatar-upload-placeholder", className: "memori-dropdown--avatar-input", onChange: e => {
|
|
252
|
+
var _a, _b;
|
|
253
|
+
return updateAvatar((_b = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null);
|
|
254
|
+
}, 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: userName }), (0, jsx_runtime_1.jsx)("p", { className: "memori-dropdown--user-email", children: userEmail }), (0, jsx_runtime_1.jsx)("div", { className: "memori-dropdown--user-badge", children: birthDate
|
|
255
|
+
? new Date(birthDate).toLocaleDateString()
|
|
256
|
+
: 'Not set' })] })] })), (0, jsx_runtime_1.jsx)("h2", { id: panelTitleId, className: "memori-mobile-session-panel--section-title", children: title }), showSessionInfo && isLoggedIn && ((0, jsx_runtime_1.jsxs)("ul", { className: "memori-mobile-session-panel--actions memori-mobile-session-panel--session-info", children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(ui_1.Button, { variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--action", disabled: knownFactsDisabled, onClick: () => {
|
|
257
|
+
if (knownFactsDisabled)
|
|
258
|
+
return;
|
|
259
|
+
onKnownFactsOpen === null || onKnownFactsOpen === void 0 ? void 0 : onKnownFactsOpen();
|
|
260
|
+
}, children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Brain, { size: 18 }) }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-mobile-session-panel--action-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-title", children: knownFactsPageTitle }), (0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-subtitle", children: resolvedKnownFactsHint })] }), (0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-trailing", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16 }) })] }) }), (0, jsx_runtime_1.jsx)("li", { children: hasChatConsumptionData ? ((0, jsx_runtime_1.jsx)(ChatConsumptionDropdown_1.default, { history: history, triggerVariant: "toolbar", menuAlign: "start", trigger: triggerProps => ((0, jsx_runtime_1.jsxs)(ui_1.Button, { ...triggerProps, variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--action", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-icon", children: (0, jsx_runtime_1.jsx)(GasStation_1.default, {}) }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-mobile-session-panel--action-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-title", children: resolvedAiUsageTitle }), (0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-subtitle", children: aiUsageSubtitle })] }), (0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-trailing", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] })) })) : ((0, jsx_runtime_1.jsxs)(ui_1.Button, { variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--action", disabled: true, children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-icon", children: (0, jsx_runtime_1.jsx)(GasStation_1.default, {}) }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-mobile-session-panel--action-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-title", children: resolvedAiUsageTitle }), (0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-subtitle", children: aiUsageSubtitle })] }), (0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-trailing", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] })) })] })), (0, jsx_runtime_1.jsx)("ul", { className: "memori-mobile-session-panel--actions", children: visibleActions.map(action => ((0, jsx_runtime_1.jsx)("li", { children: (() => {
|
|
261
|
+
const isKnownFactsAction = action.view === 'knownFacts';
|
|
262
|
+
const isShareAction = action.view === 'share';
|
|
263
|
+
const isActionDisabled = action.disabled || (isKnownFactsAction && !isLoggedIn);
|
|
264
|
+
return ((0, jsx_runtime_1.jsxs)(ui_1.Button, { variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--action", disabled: isActionDisabled, onClick: () => {
|
|
265
|
+
var _a;
|
|
266
|
+
if (isActionDisabled)
|
|
267
|
+
return;
|
|
268
|
+
if (action.view === 'knownFacts') {
|
|
269
|
+
if (onKnownFactsOpen) {
|
|
270
|
+
onKnownFactsOpen();
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (action.view) {
|
|
275
|
+
setActiveView(action.view);
|
|
154
276
|
return;
|
|
155
277
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
: activeView === 'share'
|
|
166
|
-
? sharePageTitle
|
|
167
|
-
: knownFactsPageTitle }), activeView === 'location' ? ((0, jsx_runtime_1.jsxs)("div", { className: "memori-mobile-session-panel--page-content", children: [(0, jsx_runtime_1.jsx)("p", { className: "memori-mobile-session-panel--meta-label", children: locationStatusLabel }), (0, jsx_runtime_1.jsx)("p", { className: "memori-mobile-session-panel--meta-value", children: locationPlace || locationUnknownLabel }), (0, jsx_runtime_1.jsxs)("div", { className: "memori-mobile-session-panel--page-actions", children: [(0, jsx_runtime_1.jsx)(ui_1.Button, { variant: "toolbar", size: "sm", className: `memori-mobile-session-panel--page-btn ${isLocationEnabled
|
|
168
|
-
? 'memori-mobile-session-panel--page-btn-active'
|
|
169
|
-
: ''}`, onClick: onLocationEnable, children: (0, jsx_runtime_1.jsx)("span", { children: locationEnableLabel }) }), (0, jsx_runtime_1.jsx)(ui_1.Button, { variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--page-btn memori-mobile-session-panel--page-btn-secondary", onClick: onLocationDisable, children: locationDisableLabel })] })] })) : activeView === 'share' ? ((0, jsx_runtime_1.jsx)("div", { className: "memori-mobile-session-panel--page-content memori-mobile-session-panel--share-content", children: shareContent })) : ((0, jsx_runtime_1.jsxs)("div", { className: "memori-mobile-session-panel--page-content", children: [knownFactsDescription && ((0, jsx_runtime_1.jsx)("p", { className: "memori-mobile-session-panel--known-facts-description", children: knownFactsDescription })), knownFactsCountLabel && ((0, jsx_runtime_1.jsx)("p", { className: "memori-mobile-session-panel--known-facts-count", children: knownFactsCountLabel })), (0, jsx_runtime_1.jsx)(ui_1.Button, { variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--page-btn", disabled: knownFactsDisabled, onClick: onKnownFactsOpen, children: knownFactsCtaLabel })] }))] }))] }) }));
|
|
278
|
+
(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action);
|
|
279
|
+
}, children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-icon", children: action.icon }), (0, jsx_runtime_1.jsxs)("span", { className: "memori-mobile-session-panel--action-copy", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-title", children: action.title }), action.subtitle && ((0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-subtitle", children: action.subtitle }))] }), (isShareAction || action.view === 'location') && ((0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-trailing", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16 }) }))] }));
|
|
280
|
+
})() }, action.key))) }), isLoggedIn && ((0, jsx_runtime_1.jsxs)(ui_1.Button, { variant: "toolbar", size: "sm", shape: "default", className: "memori-mobile-session-panel--logout", onClick: onLogout, children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.LogOut, { size: 18 }) }), (0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--logout-label", children: logoutLabel })] })), !isLoggedIn && ((0, jsx_runtime_1.jsx)("div", { className: "memori-mobile-session-panel--login-cta-wrap", children: (0, jsx_runtime_1.jsxs)(ui_1.Button, { variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--login-cta", onClick: onLogin, children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-mobile-session-panel--action-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.LogIn, { size: 18 }) }), loginLabel] }) }))] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "memori-mobile-session-panel--page", children: [(0, jsx_runtime_1.jsxs)(ui_1.Button, { variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--back", onClick: () => setActiveView('session'), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 16 }), backLabel] }), (0, jsx_runtime_1.jsx)("h3", { className: "memori-mobile-session-panel--page-title", children: activeView === 'location'
|
|
281
|
+
? locationPageTitle
|
|
282
|
+
: activeView === 'share'
|
|
283
|
+
? sharePageTitle
|
|
284
|
+
: knownFactsPageTitle }), activeView === 'location' ? ((0, jsx_runtime_1.jsxs)("div", { className: "memori-mobile-session-panel--page-content", children: [(0, jsx_runtime_1.jsx)("p", { className: "memori-mobile-session-panel--meta-label", children: locationStatusLabel }), (0, jsx_runtime_1.jsx)("p", { className: "memori-mobile-session-panel--meta-value", children: locationPlace || locationUnknownLabel }), (0, jsx_runtime_1.jsxs)("div", { className: "memori-mobile-session-panel--page-actions", children: [(0, jsx_runtime_1.jsx)(ui_1.Button, { variant: "toolbar", size: "sm", className: `memori-mobile-session-panel--page-btn ${isLocationEnabled
|
|
285
|
+
? 'memori-mobile-session-panel--page-btn-active'
|
|
286
|
+
: ''}`, onClick: onLocationEnable, children: (0, jsx_runtime_1.jsx)("span", { children: locationEnableLabel }) }), (0, jsx_runtime_1.jsx)(ui_1.Button, { variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--page-btn memori-mobile-session-panel--page-btn-secondary", onClick: onLocationDisable, children: locationDisableLabel })] })] })) : activeView === 'share' ? ((0, jsx_runtime_1.jsx)("div", { className: "memori-mobile-session-panel--page-content memori-mobile-session-panel--share-content", children: shareContent })) : ((0, jsx_runtime_1.jsxs)("div", { className: "memori-mobile-session-panel--page-content", children: [knownFactsDescription && ((0, jsx_runtime_1.jsx)("p", { className: "memori-mobile-session-panel--known-facts-description", children: knownFactsDescription })), knownFactsCountLabel && ((0, jsx_runtime_1.jsx)("p", { className: "memori-mobile-session-panel--known-facts-count", children: knownFactsCountLabel })), (0, jsx_runtime_1.jsx)(ui_1.Button, { variant: "toolbar", size: "sm", className: "memori-mobile-session-panel--page-btn", disabled: knownFactsDisabled, onClick: onKnownFactsOpen, children: knownFactsCtaLabel })] }))] }))] })] }));
|
|
170
287
|
};
|
|
171
288
|
exports.default = MobileSessionPanel;
|
|
172
289
|
//# sourceMappingURL=MobileSessionPanel.js.map
|