@memori.ai/memori-react 8.12.0 → 8.13.1
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 +32 -0
- package/dist/components/Chat/Chat.css +37 -3
- package/dist/components/Chat/Chat.js +60 -22
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.css +9 -5
- package/dist/components/ChatBubble/ChatBubble.js +54 -11
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/ChatInputs/ChatInputs.css +293 -17
- package/dist/components/ChatInputs/ChatInputs.js +41 -25
- package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
- package/dist/components/ChatTextArea/ChatTextArea.css +75 -31
- package/dist/components/ChatTextArea/ChatTextArea.js +47 -18
- package/dist/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/dist/components/FilePreview/FilePreview.css +225 -146
- package/dist/components/FilePreview/FilePreview.d.ts +1 -2
- package/dist/components/FilePreview/FilePreview.js +20 -6
- package/dist/components/FilePreview/FilePreview.js.map +1 -1
- package/dist/components/Header/Header.css +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/MediaWidget/MediaItemWidget.js +2 -1
- package/dist/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/dist/components/MediaWidget/MediaWidget.css +0 -4
- package/dist/components/MemoriWidget/MemoriWidget.css +11 -2
- package/dist/components/MemoriWidget/MemoriWidget.js +41 -5
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/MicrophoneButton/MicrophoneButton.css +2 -2
- package/dist/components/StartPanel/StartPanel.css +8 -0
- package/dist/components/UploadButton/UploadButton.css +20 -17
- package/dist/components/UploadButton/UploadButton.js +218 -89
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js +14 -4
- package/dist/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/dist/components/UploadButton/UploadImages/UploadImages.js +143 -16
- package/dist/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/dist/components/layouts/chat.css +1 -1
- package/dist/components/ui/Button.css +1 -0
- package/dist/helpers/constants.d.ts +1 -0
- package/dist/helpers/constants.js +2 -1
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/imageCompression.d.ts +7 -0
- package/dist/helpers/imageCompression.js +123 -0
- package/dist/helpers/imageCompression.js.map +1 -0
- package/dist/locales/de.json +7 -4
- package/dist/locales/en.json +8 -5
- package/dist/locales/es.json +7 -4
- package/dist/locales/fr.json +7 -4
- package/dist/locales/it.json +8 -5
- package/dist/styles.css +1 -2
- package/esm/components/Chat/Chat.css +37 -3
- package/esm/components/Chat/Chat.js +60 -22
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.css +9 -5
- package/esm/components/ChatBubble/ChatBubble.js +54 -11
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/ChatInputs/ChatInputs.css +293 -17
- package/esm/components/ChatInputs/ChatInputs.js +42 -26
- package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
- package/esm/components/ChatTextArea/ChatTextArea.css +75 -31
- package/esm/components/ChatTextArea/ChatTextArea.js +49 -20
- package/esm/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/esm/components/FilePreview/FilePreview.css +225 -146
- package/esm/components/FilePreview/FilePreview.d.ts +1 -2
- package/esm/components/FilePreview/FilePreview.js +21 -7
- package/esm/components/FilePreview/FilePreview.js.map +1 -1
- package/esm/components/Header/Header.css +2 -2
- package/esm/components/Header/Header.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.js +2 -1
- package/esm/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/esm/components/MediaWidget/MediaWidget.css +0 -4
- package/esm/components/MemoriWidget/MemoriWidget.css +11 -2
- package/esm/components/MemoriWidget/MemoriWidget.js +41 -5
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/MicrophoneButton/MicrophoneButton.css +2 -2
- package/esm/components/StartPanel/StartPanel.css +8 -0
- package/esm/components/UploadButton/UploadButton.css +20 -17
- package/esm/components/UploadButton/UploadButton.js +219 -90
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js +14 -4
- package/esm/components/UploadButton/UploadDocuments/UploadDocuments.js.map +1 -1
- package/esm/components/UploadButton/UploadImages/UploadImages.js +143 -16
- package/esm/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/esm/components/layouts/chat.css +1 -1
- package/esm/components/ui/Button.css +1 -0
- package/esm/helpers/constants.d.ts +1 -0
- package/esm/helpers/constants.js +1 -0
- package/esm/helpers/constants.js.map +1 -1
- package/esm/helpers/imageCompression.d.ts +7 -0
- package/esm/helpers/imageCompression.js +119 -0
- package/esm/helpers/imageCompression.js.map +1 -0
- package/esm/locales/de.json +7 -4
- package/esm/locales/en.json +8 -5
- package/esm/locales/es.json +7 -4
- package/esm/locales/fr.json +7 -4
- package/esm/locales/it.json +8 -5
- package/esm/styles.css +1 -2
- package/package.json +1 -1
- package/src/__snapshots__/index.test.tsx.snap +5 -5
- package/src/components/Chat/Chat.css +37 -3
- package/src/components/Chat/Chat.tsx +89 -21
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +672 -732
- package/src/components/ChatBubble/ChatBubble.css +9 -5
- package/src/components/ChatBubble/ChatBubble.tsx +111 -20
- package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +4 -4
- package/src/components/ChatInputs/ChatInputs.css +293 -17
- package/src/components/ChatInputs/ChatInputs.tsx +144 -87
- package/src/components/ChatInputs/__snapshots__/ChatInputs.test.tsx.snap +430 -424
- package/src/components/ChatTextArea/ChatTextArea.css +75 -31
- package/src/components/ChatTextArea/ChatTextArea.test.tsx +1 -16
- package/src/components/ChatTextArea/ChatTextArea.tsx +51 -22
- package/src/components/ChatTextArea/__snapshots__/ChatTextArea.test.tsx.snap +9 -72
- package/src/components/FilePreview/FilePreview.css +225 -146
- package/src/components/FilePreview/FilePreview.tsx +49 -36
- package/src/components/FilePreview/__snapshots__/FilePreview.test.tsx.snap +2 -2
- package/src/components/Header/Header.css +2 -2
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/MediaWidget/MediaItemWidget.tsx +2 -1
- package/src/components/MediaWidget/MediaWidget.css +0 -4
- package/src/components/MemoriWidget/MemoriWidget.css +11 -2
- package/src/components/MemoriWidget/MemoriWidget.tsx +61 -12
- package/src/components/MicrophoneButton/MicrophoneButton.css +2 -2
- package/src/components/StartPanel/StartPanel.css +8 -0
- package/src/components/UploadButton/UploadButton.css +20 -17
- package/src/components/UploadButton/UploadButton.stories.tsx +247 -35
- package/src/components/UploadButton/UploadButton.tsx +280 -175
- package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +19 -4
- package/src/components/UploadButton/UploadImages/UploadImages.tsx +195 -35
- package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +10 -1
- package/src/components/layouts/chat.css +1 -1
- package/src/components/ui/Button.css +1 -0
- package/src/helpers/constants.ts +1 -1
- package/src/helpers/imageCompression.ts +230 -0
- package/src/locales/de.json +7 -4
- package/src/locales/en.json +8 -5
- package/src/locales/es.json +7 -4
- package/src/locales/fr.json +7 -4
- package/src/locales/it.json +8 -5
- package/src/styles.css +1 -2
- package/dist/components/SignupForm/SignupForm.d.ts +0 -12
- package/dist/components/SignupForm/SignupForm.js +0 -199
- package/dist/components/SignupForm/SignupForm.js.map +0 -1
- package/dist/components/UploadMenu/UploadMenu.css +0 -47
- package/dist/components/UploadMenu/UploadMenu.d.ts +0 -9
- package/dist/components/UploadMenu/UploadMenu.js +0 -15
- package/dist/components/UploadMenu/UploadMenu.js.map +0 -1
- package/esm/components/SignupForm/SignupForm.d.ts +0 -12
- package/esm/components/SignupForm/SignupForm.js +0 -196
- package/esm/components/SignupForm/SignupForm.js.map +0 -1
- package/esm/components/UploadMenu/UploadMenu.css +0 -47
- package/esm/components/UploadMenu/UploadMenu.d.ts +0 -9
- package/esm/components/UploadMenu/UploadMenu.js +0 -12
- package/esm/components/UploadMenu/UploadMenu.js.map +0 -1
- package/src/components/UploadMenu/UploadMenu.css +0 -47
- package/src/components/UploadMenu/UploadMenu.stories.tsx +0 -66
- package/src/components/UploadMenu/UploadMenu.test.tsx +0 -34
- package/src/components/UploadMenu/UploadMenu.tsx +0 -68
- package/src/components/UploadMenu/__snapshots__/UploadMenu.test.tsx.snap +0 -137
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import Button from '../ui/Button';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import toast from 'react-hot-toast';
|
|
6
|
-
import { mailRegEx, pwdRegEx, usernameRegEx } from '../../helpers/utils';
|
|
7
|
-
import { getErrori18nKey } from '../../helpers/error';
|
|
8
|
-
const reservedUserNames = [
|
|
9
|
-
'memori',
|
|
10
|
-
'private',
|
|
11
|
-
'public',
|
|
12
|
-
'api',
|
|
13
|
-
'404',
|
|
14
|
-
'500',
|
|
15
|
-
'it',
|
|
16
|
-
'en',
|
|
17
|
-
'account',
|
|
18
|
-
'auth',
|
|
19
|
-
'logout',
|
|
20
|
-
'privacy_and_cookie',
|
|
21
|
-
'unauthorized',
|
|
22
|
-
'users',
|
|
23
|
-
'virtual_spaces',
|
|
24
|
-
];
|
|
25
|
-
const SignupForm = ({ tenant, apiClient, onLogin, goToLogin, __TEST__waitingForOtp = false, }) => {
|
|
26
|
-
const { t, i18n } = useTranslation();
|
|
27
|
-
const lang = i18n.language === 'it' ? 'it' : 'en';
|
|
28
|
-
const { userSignUp, userConfirmSignUp, resendVerificationCode } = apiClient.backend;
|
|
29
|
-
const [email, setEmail] = useState();
|
|
30
|
-
const [username, setUsername] = useState();
|
|
31
|
-
const [password, setPassword] = useState();
|
|
32
|
-
const [confirmPassword, setConfirmPassword] = useState();
|
|
33
|
-
const pwdAcceptable = !password || (password && pwdRegEx.test(password));
|
|
34
|
-
const pwdGreen = pwdAcceptable && password && password.length >= 24;
|
|
35
|
-
const pwdEmpty = !password || password.length === 0;
|
|
36
|
-
const pwdMeterValue = !pwdAcceptable || pwdEmpty
|
|
37
|
-
? 0
|
|
38
|
-
: password.length < 8
|
|
39
|
-
? 15
|
|
40
|
-
: password.length >= 32
|
|
41
|
-
? 100
|
|
42
|
-
: (password.length - 8) * (50 / 24) + 50;
|
|
43
|
-
const [loading, setLoading] = useState(false);
|
|
44
|
-
const [loadingOtp, setLoadingOtp] = useState(false);
|
|
45
|
-
const [waitingForOtp, setWaitingForOtp] = useState(__TEST__waitingForOtp);
|
|
46
|
-
const [error, setError] = useState(null);
|
|
47
|
-
const [referral, setReferral] = useState();
|
|
48
|
-
useEffect(() => {
|
|
49
|
-
setReferral(window.location.href);
|
|
50
|
-
}, []);
|
|
51
|
-
const generateUsernameFromEmail = (email) => email.split('@')[0].replace(/[^a-zA-Z0-9]/g, '');
|
|
52
|
-
const signup = async (e) => {
|
|
53
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
54
|
-
e.preventDefault();
|
|
55
|
-
const form = e.currentTarget;
|
|
56
|
-
const tenantID = (_a = form.tenant.value) !== null && _a !== void 0 ? _a : tenant.name;
|
|
57
|
-
const eMail = ((_b = form.eMail.value) !== null && _b !== void 0 ? _b : email).toLowerCase();
|
|
58
|
-
const userName = (_c = form.userName.value) !== null && _c !== void 0 ? _c : username;
|
|
59
|
-
const password = form.password.value;
|
|
60
|
-
const birthDate = new Date((_d = form.birthDate) === null || _d === void 0 ? void 0 : _d.value).toISOString();
|
|
61
|
-
const tnCAndPPAccepted = (_e = form.tnCAndPPAccepted) === null || _e === void 0 ? void 0 : _e.checked;
|
|
62
|
-
const pAndCUAccepted = (_f = form.pAndCUAccepted) === null || _f === void 0 ? void 0 : _f.checked;
|
|
63
|
-
const referral = (_g = form.referral) === null || _g === void 0 ? void 0 : _g.value;
|
|
64
|
-
if (!eMail || !userName || !password || !birthDate || !tnCAndPPAccepted) {
|
|
65
|
-
setError(t('missingData'));
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
setLoading(true);
|
|
69
|
-
setError(null);
|
|
70
|
-
const age = (new Date().getTime() - new Date(birthDate).getTime()) /
|
|
71
|
-
1000 /
|
|
72
|
-
60 /
|
|
73
|
-
60 /
|
|
74
|
-
24 /
|
|
75
|
-
365;
|
|
76
|
-
if (age < 14) {
|
|
77
|
-
toast.error(t('login.underage', { age: 14 }));
|
|
78
|
-
setError(t('login.underage', { age: 14 }));
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
try {
|
|
82
|
-
const { user, ...resp } = await userSignUp({
|
|
83
|
-
tenant: tenantID,
|
|
84
|
-
eMail,
|
|
85
|
-
userName,
|
|
86
|
-
password,
|
|
87
|
-
birthDate,
|
|
88
|
-
tnCAndPPAccepted,
|
|
89
|
-
tnCAndPPAcceptanceDate: new Date().toISOString(),
|
|
90
|
-
pAndCUAccepted,
|
|
91
|
-
pAndCUAcceptanceDate: new Date().toISOString(),
|
|
92
|
-
referral,
|
|
93
|
-
});
|
|
94
|
-
if (resp.resultCode !== 0) {
|
|
95
|
-
console.error(resp);
|
|
96
|
-
toast.error(t(getErrori18nKey(resp.resultCode)));
|
|
97
|
-
}
|
|
98
|
-
else if (user) {
|
|
99
|
-
toast.success(t('success'));
|
|
100
|
-
setWaitingForOtp(true);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
catch (e) {
|
|
104
|
-
let err = e;
|
|
105
|
-
console.error('[signup]', err);
|
|
106
|
-
if (err === null || err === void 0 ? void 0 : err.message)
|
|
107
|
-
toast.error(err.message);
|
|
108
|
-
}
|
|
109
|
-
finally {
|
|
110
|
-
setLoading(false);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
const resendOtp = async (e) => {
|
|
114
|
-
e.preventDefault();
|
|
115
|
-
if (!username)
|
|
116
|
-
return;
|
|
117
|
-
setLoadingOtp(true);
|
|
118
|
-
try {
|
|
119
|
-
const resp = await resendVerificationCode({
|
|
120
|
-
tenant: tenant === null || tenant === void 0 ? void 0 : tenant.name,
|
|
121
|
-
userName: username,
|
|
122
|
-
});
|
|
123
|
-
if (resp.resultCode === 0) {
|
|
124
|
-
toast.success(t('resentVerificationCode'));
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
console.error(resp);
|
|
128
|
-
toast.error(t(getErrori18nKey(resp.resultCode)));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
catch (e) {
|
|
132
|
-
let err = e;
|
|
133
|
-
console.error('[resend otp]', err);
|
|
134
|
-
if (err === null || err === void 0 ? void 0 : err.message)
|
|
135
|
-
toast.error(err.message);
|
|
136
|
-
}
|
|
137
|
-
finally {
|
|
138
|
-
setLoadingOtp(false);
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
const validateOtp = async (e) => {
|
|
142
|
-
var _a, _b, _c;
|
|
143
|
-
e.preventDefault();
|
|
144
|
-
const form = e.currentTarget;
|
|
145
|
-
const tenantID = (_a = form.tenant.value) !== null && _a !== void 0 ? _a : tenant.name;
|
|
146
|
-
const userName = (_b = form.userName.value) !== null && _b !== void 0 ? _b : username;
|
|
147
|
-
const pwd = (_c = form.password.value) !== null && _c !== void 0 ? _c : password;
|
|
148
|
-
const verificationCode = form.verificationCode.value;
|
|
149
|
-
setLoading(true);
|
|
150
|
-
setError(null);
|
|
151
|
-
try {
|
|
152
|
-
const { user, token, ...resp } = await userConfirmSignUp({
|
|
153
|
-
tenant: tenantID,
|
|
154
|
-
userName,
|
|
155
|
-
password: pwd,
|
|
156
|
-
verificationCode,
|
|
157
|
-
});
|
|
158
|
-
if (resp.resultCode !== 0) {
|
|
159
|
-
console.error(resp);
|
|
160
|
-
toast.error(t(getErrori18nKey(resp.resultCode)));
|
|
161
|
-
}
|
|
162
|
-
else if (user && token) {
|
|
163
|
-
toast.success(t('success'));
|
|
164
|
-
onLogin(user, token);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
catch (e) {
|
|
168
|
-
let err = e;
|
|
169
|
-
console.error('[validate otp]', err);
|
|
170
|
-
if (err === null || err === void 0 ? void 0 : err.message)
|
|
171
|
-
toast.error(err.message);
|
|
172
|
-
}
|
|
173
|
-
finally {
|
|
174
|
-
setLoading(false);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
return waitingForOtp ? (_jsxs(_Fragment, { children: [_jsxs("form", { className: "memori--login-drawer--form", onSubmit: validateOtp, children: [_jsx("input", { type: "hidden", name: "userName", value: username }), _jsx("input", { type: "hidden", name: "password", value: password }), _jsx("input", { type: "hidden", name: "tenant", value: tenant.name }), _jsxs("label", { htmlFor: "#verificationCode", children: [t('login.otpCode'), _jsx("input", { id: "verificationCode", name: "verificationCode", type: "text", required: true, autoComplete: "one-time-code", placeholder: t('login.otpCode') || 'OTP' })] }), _jsx("p", { children: _jsx(Button, { outlined: true, onClick: resendOtp, loading: loadingOtp, children: t('login.resendVerificationCode') }) }), _jsx(Button, { htmlType: "submit", primary: true, loading: loading, children: t('confirm') })] }), error && (_jsx("p", { role: "alert", className: "memori--login-drawer--error", children: error }))] })) : (_jsxs(_Fragment, { children: [_jsxs("form", { className: "memori--login-drawer--form", onSubmit: signup, children: [_jsx("input", { type: "hidden", name: "tenant", value: tenant.name }), _jsx("input", { type: "hidden", name: "referral", value: referral }), _jsxs("label", { htmlFor: "#eMail", children: [t('login.email'), _jsx("input", { type: "email", name: "eMail", id: "eMail", required: true, autoComplete: "email", placeholder: t('login.email') || 'Email', onChange: e => setEmail(e.target.value), "aria-invalid": !!(email === null || email === void 0 ? void 0 : email.length) && !mailRegEx.test(email) })] }), !!(email === null || email === void 0 ? void 0 : email.length) && !mailRegEx.test(email) && (_jsx("p", { className: "memori--login-drawer--inline-error", children: t('login.emailFormatError') })), _jsxs("label", { htmlFor: "userName", children: [t('login.username'), _jsx("input", { type: "text", name: "userName", id: "userName", required: true, autoComplete: "username", placeholder: t('login.username') || 'Username', onFocus: () => {
|
|
178
|
-
if (!(username === null || username === void 0 ? void 0 : username.length) && !!(email === null || email === void 0 ? void 0 : email.length)) {
|
|
179
|
-
let username = generateUsernameFromEmail(email);
|
|
180
|
-
const field = document.getElementById('userName');
|
|
181
|
-
if (field) {
|
|
182
|
-
field.value = username;
|
|
183
|
-
setUsername(username);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}, onChange: e => setUsername(e.target.value), "aria-invalid": !!(username === null || username === void 0 ? void 0 : username.length) &&
|
|
187
|
-
(reservedUserNames.includes(username.toLowerCase()) ||
|
|
188
|
-
!usernameRegEx.test(username)) })] }), !!(username === null || username === void 0 ? void 0 : username.length) &&
|
|
189
|
-
reservedUserNames.includes(username.toLowerCase()) && (_jsx("p", { className: "memori--login-drawer--inline-error", children: t('login.usernameContainsReservedWord') })), !!(username === null || username === void 0 ? void 0 : username.length) && !usernameRegEx.test(username) && (_jsx("p", { className: "memori--login-drawer--inline-error", children: t('login.usernameFormatError') })), _jsxs("label", { htmlFor: "#birthDate", children: [t('login.birthDate'), _jsx("input", { id: "birthDate", name: "birthDate", type: "date", required: true, autoComplete: "bday" })] }), _jsx("p", { children: _jsx("small", { children: t('login.birthDateHelper') }) }), _jsxs("label", { htmlFor: "#password", children: [t('login.password'), _jsx("input", { id: "password", name: "password", type: "password", required: true, autoComplete: "new-password", placeholder: t('login.password') || 'Password', onChange: e => setPassword(e.target.value), "aria-invalid": !pwdAcceptable })] }), !pwdAcceptable && (_jsx("p", { className: "memori--login-drawer--inline-error", children: t('login.passwordFormatError') })), _jsxs("label", { htmlFor: "#confirm-password", children: [t('login.confirmPassword'), _jsx("input", { id: "confirm-password", name: "confirmPassword", type: "password", required: true, autoComplete: "new-password", placeholder: t('login.confirmPassword') || 'Password', onChange: e => setConfirmPassword(e.target.value), "aria-invalid": !!(password === null || password === void 0 ? void 0 : password.length) &&
|
|
190
|
-
!!(confirmPassword === null || confirmPassword === void 0 ? void 0 : confirmPassword.length) &&
|
|
191
|
-
password !== confirmPassword })] }), !!(password === null || password === void 0 ? void 0 : password.length) &&
|
|
192
|
-
!!(confirmPassword === null || confirmPassword === void 0 ? void 0 : confirmPassword.length) &&
|
|
193
|
-
password !== confirmPassword && (_jsx("p", { className: "memori--login-drawer--inline-error", children: t('login.passwordMatchingError') })), _jsx("meter", { className: "memori--login-drawer--password-meter", min: 0, low: 33, high: 66, optimum: 80, max: 100, value: pwdMeterValue, id: "password-strength-meter" }), _jsx("small", { children: t(`login.pwd${pwdGreen ? 'Strong' : pwdAcceptable ? 'Acceptable' : 'Weak'}`) }), _jsxs("label", { className: "memori-checkbox", children: [_jsxs("span", { className: "memori-checkbox--input-wrapper", children: [_jsx("input", { type: "checkbox", name: "tnCAndPPAccepted", required: true, className: "memori-checkbox--input" }), _jsx("span", { className: "memori-checkbox--inner" })] }), _jsxs("span", { className: "memori-checkbox--text", children: [t('login.privacyLabel'), ' ', _jsx("a", { href: `https://memori.ai/${lang}/privacy_and_cookie`, target: "_blank", rel: "noopener noreferrer", children: t('login.privacyAndCookiePolicy') }), ' ', t('login.and'), ' ', _jsx("a", { href: `https://memori.ai/${lang}/tos`, target: "_blank", rel: "noopener noreferrer", children: t('login.termsOfService') })] })] }), _jsxs("label", { className: "memori-checkbox", children: [_jsxs("span", { className: "memori-checkbox--input-wrapper", children: [_jsx("input", { type: "checkbox", name: "pAndCUAccepted", className: "memori-checkbox--input" }), _jsx("span", { className: "memori-checkbox--inner" })] }), _jsxs("span", { className: "memori-checkbox--text", children: [t('login.pAndCUAccepted'), ' ', _jsx("small", { children: _jsxs("em", { children: ["(", t('login.optional'), ")"] }) })] })] }), _jsx("p", { children: _jsx("small", { children: t('login.deepThoughtExplaination') }) }), _jsx(Button, { htmlType: "submit", primary: true, loading: loading, children: t('login.signUp') }), _jsxs("p", { className: "memori--login-drawer--signup", children: [t('login.alreadyHaveAnAccount'), ' ', _jsx(Button, { outlined: true, onClick: goToLogin, children: t('login.backToLogin') })] })] }), error && (_jsx("p", { role: "alert", className: "memori--login-drawer--error", children: error }))] }));
|
|
194
|
-
};
|
|
195
|
-
export default SignupForm;
|
|
196
|
-
//# sourceMappingURL=SignupForm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignupForm.js","sourceRoot":"","sources":["../../../src/components/SignupForm/SignupForm.tsx"],"names":[],"mappings":";AACA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,iBAAiB,GAAG;IACxB,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,KAAK;IACL,KAAK;IACL,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,SAAS;IACT,MAAM;IACN,QAAQ;IACR,oBAAoB;IACpB,cAAc;IACd,OAAO;IACP,gBAAgB;CACjB,CAAC;AAUF,MAAM,UAAU,GAAG,CAAC,EAClB,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,EACT,qBAAqB,GAAG,KAAK,GACvB,EAAE,EAAE;IACV,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAElD,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,GAC7D,SAAS,CAAC,O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C,UAAU,EACf,IAAI,EAAC,gBAAgB,EACrB,SAAS,EAAC,wBAAwB,GAClC,EACF,eAAM,SAAS,EAAC,wBAAwB,GAAG,IACtC,EACP,gBAAM,SAAS,EAAC,uBAAuB,aACpC,CAAC,CAAC,sBAAsB,CAAC,EAAE,GAAG,EAC/B,0BACE,8BAAM,CAAC,CAAC,gBAAgB,CAAC,SAAO,GAC1B,IACH,IACD,EACR,sBACE,0BAAQ,CAAC,CAAC,+BAA+B,CAAC,GAAS,GACjD,EAEJ,KAAC,MAAM,IAAC,QAAQ,EAAC,QAAQ,EAAC,OAAO,QAAC,OAAO,EAAE,OAAO,YAC/C,CAAC,CAAC,cAAc,CAAC,GACX,EAET,aAAG,SAAS,EAAC,8BAA8B,aACxC,CAAC,CAAC,4BAA4B,CAAC,EAAE,GAAG,EACrC,KAAC,MAAM,IAAC,QAAQ,QAAC,OAAO,EAAE,SAAS,YAChC,CAAC,CAAC,mBAAmB,CAAC,GAChB,IACP,IACC,EAEN,KAAK,IAAI,CACR,YAAG,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,6BAA6B,YACpD,KAAK,GACJ,CACL,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
.memori-upload-menu {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-block;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.memori--conversation-button {
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.memori-menu--overlay {
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 100%;
|
|
13
|
-
right: 0;
|
|
14
|
-
left: auto;
|
|
15
|
-
display: flex;
|
|
16
|
-
min-width: 12rem;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
padding: 0.5rem 0;
|
|
19
|
-
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
20
|
-
border-radius: 0.375rem;
|
|
21
|
-
margin: 0;
|
|
22
|
-
margin-top: 0.5rem;
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.12);
|
|
25
|
-
list-style: none;
|
|
26
|
-
outline: none;
|
|
27
|
-
transform-origin: top right;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.memori-menu--li {
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
justify-content: center;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
a.memori-menu--button,
|
|
37
|
-
button.memori-menu--button {
|
|
38
|
-
width: 100%;
|
|
39
|
-
justify-content: flex-start;
|
|
40
|
-
color: #000;
|
|
41
|
-
text-align: left;
|
|
42
|
-
text-decoration: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.memori-menu--icon {
|
|
46
|
-
width: 1em;
|
|
47
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface Props {
|
|
3
|
-
attachmentsMenuOpen?: 'link' | 'media';
|
|
4
|
-
setAttachmentsMenuOpen: (value: 'link' | 'media') => void;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
authToken?: string;
|
|
7
|
-
}
|
|
8
|
-
declare const UploadMenu: React.FC<Props>;
|
|
9
|
-
export default UploadMenu;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Menu } from '@headlessui/react';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
import Button from '../ui/Button';
|
|
5
|
-
import Link from '../icons/Link';
|
|
6
|
-
import Picture from '../icons/Picture';
|
|
7
|
-
import PaperClip from '../icons/PaperClip';
|
|
8
|
-
const UploadMenu = ({ attachmentsMenuOpen, setAttachmentsMenuOpen, disabled = false, authToken, }) => {
|
|
9
|
-
return (_jsxs(Menu, { as: "div", className: "memori-upload-menu", children: [_jsx(Menu.Button, { disabled: disabled, className: cx('memori-button', 'memori-button--circle', 'memori-button--icon-only', 'memori-share-button--button', 'memori--conversation-button'), children: _jsx("div", { className: "memori-button--icon", children: _jsx(PaperClip, {}) }) }), _jsxs(Menu.Items, { as: "ul", className: "memori-menu--overlay", children: [_jsx(Menu.Item, { as: "li", className: "memori-menu--li", children: _jsx(Button, { className: "memori-menu--button", ghost: true, icon: _jsx(Link, {}), outlined: attachmentsMenuOpen === 'link', onClick: () => setAttachmentsMenuOpen('link'), children: "Link" }) }), !!(authToken === null || authToken === void 0 ? void 0 : authToken.length) && (_jsx(Menu.Item, { children: _jsx(Button, { className: "memori-menu--button", ghost: true, icon: _jsx(Picture, {}), outlined: attachmentsMenuOpen === 'media', onClick: () => setAttachmentsMenuOpen('media'), children: "Media" }) }))] })] }));
|
|
10
|
-
};
|
|
11
|
-
export default UploadMenu;
|
|
12
|
-
//# sourceMappingURL=UploadMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UploadMenu.js","sourceRoot":"","sources":["../../../src/components/UploadMenu/UploadMenu.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAS3C,MAAM,UAAU,GAAoB,CAAC,EACnC,mBAAmB,EACnB,sBAAsB,EACtB,QAAQ,GAAG,KAAK,EAChB,SAAS,GACV,EAAE,EAAE;IACH,OAAO,CACL,MAAC,IAAI,IAAC,EAAE,EAAC,KAAK,EAAC,SAAS,EAAC,oBAAoB,aAC3C,KAAC,IAAI,CAAC,MAAM,IACV,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,EAAE,CACX,eAAe,EACf,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,6BAA6B,CAC9B,YAED,cAAK,SAAS,EAAC,qBAAqB,YAClC,KAAC,SAAS,KAAG,GACT,GACM,EACd,MAAC,IAAI,CAAC,KAAK,IAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,sBAAsB,aAClD,KAAC,IAAI,CAAC,IAAI,IAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,iBAAiB,YAC5C,KAAC,MAAM,IACL,SAAS,EAAC,qBAAqB,EAC/B,KAAK,QACL,IAAI,EAAE,KAAC,IAAI,KAAG,EACd,QAAQ,EAAE,mBAAmB,KAAK,MAAM,EACxC,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,MAAM,CAAC,qBAGtC,GACC,EACX,CAAC,CAAC,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,CAAA,IAAI,CACtB,KAAC,IAAI,CAAC,IAAI,cACR,KAAC,MAAM,IACL,SAAS,EAAC,qBAAqB,EAC/B,KAAK,QACL,IAAI,EAAE,KAAC,OAAO,KAAG,EACjB,QAAQ,EAAE,mBAAmB,KAAK,OAAO,EACzC,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,OAAO,CAAC,sBAGvC,GACC,CACb,IACU,IACR,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
.memori-upload-menu {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-block;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.memori--conversation-button {
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.memori-menu--overlay {
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 100%;
|
|
13
|
-
right: 0;
|
|
14
|
-
left: auto;
|
|
15
|
-
display: flex;
|
|
16
|
-
min-width: 12rem;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
padding: 0.5rem 0;
|
|
19
|
-
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
20
|
-
border-radius: 0.375rem;
|
|
21
|
-
margin: 0;
|
|
22
|
-
margin-top: 0.5rem;
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.12);
|
|
25
|
-
list-style: none;
|
|
26
|
-
outline: none;
|
|
27
|
-
transform-origin: top right;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.memori-menu--li {
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
justify-content: center;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
a.memori-menu--button,
|
|
37
|
-
button.memori-menu--button {
|
|
38
|
-
width: 100%;
|
|
39
|
-
justify-content: flex-start;
|
|
40
|
-
color: #000;
|
|
41
|
-
text-align: left;
|
|
42
|
-
text-decoration: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.memori-menu--icon {
|
|
46
|
-
width: 1em;
|
|
47
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Meta, Story } from '@storybook/react';
|
|
3
|
-
import I18nWrapper from '../../I18nWrapper';
|
|
4
|
-
import UploadMenu, { Props } from './UploadMenu';
|
|
5
|
-
|
|
6
|
-
import './UploadMenu.css';
|
|
7
|
-
|
|
8
|
-
const meta: Meta = {
|
|
9
|
-
title: 'Widget/Upload Menu',
|
|
10
|
-
component: UploadMenu,
|
|
11
|
-
argTypes: {
|
|
12
|
-
attachmentsMenuOpen: {
|
|
13
|
-
control: {
|
|
14
|
-
type: 'select',
|
|
15
|
-
options: ['link', 'media'],
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
parameters: {
|
|
20
|
-
controls: { expanded: true },
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default meta;
|
|
25
|
-
|
|
26
|
-
const Template: Story<Props> = args => {
|
|
27
|
-
const [attachmentsMenuOpen, setAttachmentsMenuOpen] = useState<
|
|
28
|
-
'link' | 'media' | undefined
|
|
29
|
-
>(args.attachmentsMenuOpen);
|
|
30
|
-
return (
|
|
31
|
-
<I18nWrapper>
|
|
32
|
-
<div
|
|
33
|
-
style={{
|
|
34
|
-
minHeight: '200px',
|
|
35
|
-
display: 'flex',
|
|
36
|
-
alignItems: 'flex-end',
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
<UploadMenu
|
|
40
|
-
{...args}
|
|
41
|
-
attachmentsMenuOpen={attachmentsMenuOpen}
|
|
42
|
-
setAttachmentsMenuOpen={setAttachmentsMenuOpen}
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
</I18nWrapper>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
|
|
50
|
-
// https://storybook.js.org/docs/react/workflows/unit-testing
|
|
51
|
-
export const Default = Template.bind({});
|
|
52
|
-
Default.args = {
|
|
53
|
-
attachmentsMenuOpen: undefined,
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const Disabled = Template.bind({});
|
|
57
|
-
Disabled.args = {
|
|
58
|
-
attachmentsMenuOpen: undefined,
|
|
59
|
-
disabled: true,
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const Authenticated = Template.bind({});
|
|
63
|
-
Authenticated.args = {
|
|
64
|
-
attachmentsMenuOpen: undefined,
|
|
65
|
-
authToken: 'test',
|
|
66
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import UploadMenu from './UploadMenu';
|
|
4
|
-
|
|
5
|
-
it('renders UploadMenu unchanged', () => {
|
|
6
|
-
const { container } = render(
|
|
7
|
-
<UploadMenu setAttachmentsMenuOpen={jest.fn()} />
|
|
8
|
-
);
|
|
9
|
-
expect(container).toMatchSnapshot();
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('renders UploadMenu disabled unchanged', () => {
|
|
13
|
-
const { container } = render(
|
|
14
|
-
<UploadMenu setAttachmentsMenuOpen={jest.fn()} disabled />
|
|
15
|
-
);
|
|
16
|
-
expect(container).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('renders UploadMenu on link selected unchanged', () => {
|
|
20
|
-
const { container } = render(
|
|
21
|
-
<UploadMenu attachmentsMenuOpen="link" setAttachmentsMenuOpen={jest.fn()} />
|
|
22
|
-
);
|
|
23
|
-
expect(container).toMatchSnapshot();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('renders UploadMenu on media selected unchanged', () => {
|
|
27
|
-
const { container } = render(
|
|
28
|
-
<UploadMenu
|
|
29
|
-
attachmentsMenuOpen="media"
|
|
30
|
-
setAttachmentsMenuOpen={jest.fn()}
|
|
31
|
-
/>
|
|
32
|
-
);
|
|
33
|
-
expect(container).toMatchSnapshot();
|
|
34
|
-
});
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Menu } from '@headlessui/react';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
import Button from '../ui/Button';
|
|
5
|
-
import Link from '../icons/Link';
|
|
6
|
-
import Picture from '../icons/Picture';
|
|
7
|
-
import PaperClip from '../icons/PaperClip';
|
|
8
|
-
|
|
9
|
-
export interface Props {
|
|
10
|
-
attachmentsMenuOpen?: 'link' | 'media';
|
|
11
|
-
setAttachmentsMenuOpen: (value: 'link' | 'media') => void;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
authToken?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const UploadMenu: React.FC<Props> = ({
|
|
17
|
-
attachmentsMenuOpen,
|
|
18
|
-
setAttachmentsMenuOpen,
|
|
19
|
-
disabled = false,
|
|
20
|
-
authToken,
|
|
21
|
-
}) => {
|
|
22
|
-
return (
|
|
23
|
-
<Menu as="div" className="memori-upload-menu">
|
|
24
|
-
<Menu.Button
|
|
25
|
-
disabled={disabled}
|
|
26
|
-
className={cx(
|
|
27
|
-
'memori-button',
|
|
28
|
-
'memori-button--circle',
|
|
29
|
-
'memori-button--icon-only',
|
|
30
|
-
'memori-share-button--button',
|
|
31
|
-
'memori--conversation-button'
|
|
32
|
-
)}
|
|
33
|
-
>
|
|
34
|
-
<div className="memori-button--icon">
|
|
35
|
-
<PaperClip />
|
|
36
|
-
</div>
|
|
37
|
-
</Menu.Button>
|
|
38
|
-
<Menu.Items as="ul" className="memori-menu--overlay">
|
|
39
|
-
<Menu.Item as="li" className="memori-menu--li">
|
|
40
|
-
<Button
|
|
41
|
-
className="memori-menu--button"
|
|
42
|
-
ghost
|
|
43
|
-
icon={<Link />}
|
|
44
|
-
outlined={attachmentsMenuOpen === 'link'}
|
|
45
|
-
onClick={() => setAttachmentsMenuOpen('link')}
|
|
46
|
-
>
|
|
47
|
-
Link
|
|
48
|
-
</Button>
|
|
49
|
-
</Menu.Item>
|
|
50
|
-
{!!authToken?.length && (
|
|
51
|
-
<Menu.Item>
|
|
52
|
-
<Button
|
|
53
|
-
className="memori-menu--button"
|
|
54
|
-
ghost
|
|
55
|
-
icon={<Picture />}
|
|
56
|
-
outlined={attachmentsMenuOpen === 'media'}
|
|
57
|
-
onClick={() => setAttachmentsMenuOpen('media')}
|
|
58
|
-
>
|
|
59
|
-
Media
|
|
60
|
-
</Button>
|
|
61
|
-
</Menu.Item>
|
|
62
|
-
)}
|
|
63
|
-
</Menu.Items>
|
|
64
|
-
</Menu>
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export default UploadMenu;
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders UploadMenu disabled unchanged 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="memori-upload-menu"
|
|
7
|
-
data-headlessui-state=""
|
|
8
|
-
>
|
|
9
|
-
<button
|
|
10
|
-
aria-haspopup="true"
|
|
11
|
-
class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
|
|
12
|
-
data-headlessui-state=""
|
|
13
|
-
disabled=""
|
|
14
|
-
id="headlessui-menu-button-:r2:"
|
|
15
|
-
type="button"
|
|
16
|
-
>
|
|
17
|
-
<div
|
|
18
|
-
class="memori-button--icon"
|
|
19
|
-
>
|
|
20
|
-
<svg
|
|
21
|
-
aria-hidden="true"
|
|
22
|
-
focusable="false"
|
|
23
|
-
role="img"
|
|
24
|
-
viewBox="0 0 1024 1024"
|
|
25
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
-
>
|
|
27
|
-
<path
|
|
28
|
-
d="M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 0 0 174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"
|
|
29
|
-
/>
|
|
30
|
-
</svg>
|
|
31
|
-
</div>
|
|
32
|
-
</button>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
|
-
exports[`renders UploadMenu on link selected unchanged 1`] = `
|
|
38
|
-
<div>
|
|
39
|
-
<div
|
|
40
|
-
class="memori-upload-menu"
|
|
41
|
-
data-headlessui-state=""
|
|
42
|
-
>
|
|
43
|
-
<button
|
|
44
|
-
aria-expanded="false"
|
|
45
|
-
aria-haspopup="true"
|
|
46
|
-
class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
|
|
47
|
-
data-headlessui-state=""
|
|
48
|
-
id="headlessui-menu-button-:r4:"
|
|
49
|
-
type="button"
|
|
50
|
-
>
|
|
51
|
-
<div
|
|
52
|
-
class="memori-button--icon"
|
|
53
|
-
>
|
|
54
|
-
<svg
|
|
55
|
-
aria-hidden="true"
|
|
56
|
-
focusable="false"
|
|
57
|
-
role="img"
|
|
58
|
-
viewBox="0 0 1024 1024"
|
|
59
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
60
|
-
>
|
|
61
|
-
<path
|
|
62
|
-
d="M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 0 0 174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"
|
|
63
|
-
/>
|
|
64
|
-
</svg>
|
|
65
|
-
</div>
|
|
66
|
-
</button>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
`;
|
|
70
|
-
|
|
71
|
-
exports[`renders UploadMenu on media selected unchanged 1`] = `
|
|
72
|
-
<div>
|
|
73
|
-
<div
|
|
74
|
-
class="memori-upload-menu"
|
|
75
|
-
data-headlessui-state=""
|
|
76
|
-
>
|
|
77
|
-
<button
|
|
78
|
-
aria-expanded="false"
|
|
79
|
-
aria-haspopup="true"
|
|
80
|
-
class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
|
|
81
|
-
data-headlessui-state=""
|
|
82
|
-
id="headlessui-menu-button-:r6:"
|
|
83
|
-
type="button"
|
|
84
|
-
>
|
|
85
|
-
<div
|
|
86
|
-
class="memori-button--icon"
|
|
87
|
-
>
|
|
88
|
-
<svg
|
|
89
|
-
aria-hidden="true"
|
|
90
|
-
focusable="false"
|
|
91
|
-
role="img"
|
|
92
|
-
viewBox="0 0 1024 1024"
|
|
93
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
94
|
-
>
|
|
95
|
-
<path
|
|
96
|
-
d="M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 0 0 174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"
|
|
97
|
-
/>
|
|
98
|
-
</svg>
|
|
99
|
-
</div>
|
|
100
|
-
</button>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
`;
|
|
104
|
-
|
|
105
|
-
exports[`renders UploadMenu unchanged 1`] = `
|
|
106
|
-
<div>
|
|
107
|
-
<div
|
|
108
|
-
class="memori-upload-menu"
|
|
109
|
-
data-headlessui-state=""
|
|
110
|
-
>
|
|
111
|
-
<button
|
|
112
|
-
aria-expanded="false"
|
|
113
|
-
aria-haspopup="true"
|
|
114
|
-
class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
|
|
115
|
-
data-headlessui-state=""
|
|
116
|
-
id="headlessui-menu-button-:r0:"
|
|
117
|
-
type="button"
|
|
118
|
-
>
|
|
119
|
-
<div
|
|
120
|
-
class="memori-button--icon"
|
|
121
|
-
>
|
|
122
|
-
<svg
|
|
123
|
-
aria-hidden="true"
|
|
124
|
-
focusable="false"
|
|
125
|
-
role="img"
|
|
126
|
-
viewBox="0 0 1024 1024"
|
|
127
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
128
|
-
>
|
|
129
|
-
<path
|
|
130
|
-
d="M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0 0 12.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 0 0 174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"
|
|
131
|
-
/>
|
|
132
|
-
</svg>
|
|
133
|
-
</div>
|
|
134
|
-
</button>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
`;
|