@popmenu/common-ui 0.153.0 → 0.154.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/Avatar/Avatar.d.ts +1 -1
- package/build/cjs/components/BrowserSilhouette/BrowserSilhouette.d.ts +2 -2
- package/build/cjs/components/Checkbox/Checkbox.d.ts +1 -1
- package/build/cjs/components/Chip/Chip.d.ts +1 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.d.ts +1 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +17 -2
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationLogoContainer.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.d.ts +2 -0
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationUserForm.d.ts +2 -0
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationVipBenefitRows.d.ts +2 -1
- package/build/cjs/components/FollowerAuthenticationDialog/phoneValidation.d.ts +2 -0
- package/build/cjs/components/IconButton/IconButton.d.ts +1 -1
- package/build/cjs/components/Paper/Paper.d.ts +1 -1
- package/build/cjs/components/PaperContent/PaperContent.d.ts +1 -1
- package/build/cjs/components/Radio/Radio.d.ts +1 -1
- package/build/cjs/components/Switch/Switch.d.ts +1 -1
- package/build/cjs/components/TabPanel/TabPanel.d.ts +2 -2
- package/build/cjs/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/build/cjs/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/build/cjs/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/cjs/index.js +275 -52
- package/build/cjs/index.js.map +1 -1
- package/build/esm/components/Avatar/Avatar.d.ts +1 -1
- package/build/esm/components/BrowserSilhouette/BrowserSilhouette.d.ts +2 -2
- package/build/esm/components/Checkbox/Checkbox.d.ts +1 -1
- package/build/esm/components/Chip/Chip.d.ts +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.d.ts +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +17 -2
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +28 -47
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationLogoContainer.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.js +29 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationUserForm.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationUserForm.js +201 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationUserForm.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationVipBenefitRows.d.ts +2 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationVipBenefitRows.js +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationVipBenefitRows.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/phoneValidation.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/phoneValidation.js +32 -0
- package/build/esm/components/FollowerAuthenticationDialog/phoneValidation.js.map +1 -0
- package/build/esm/components/IconButton/IconButton.d.ts +1 -1
- package/build/esm/components/Paper/Paper.d.ts +1 -1
- package/build/esm/components/PaperContent/PaperContent.d.ts +1 -1
- package/build/esm/components/Radio/Radio.d.ts +1 -1
- package/build/esm/components/Switch/Switch.d.ts +1 -1
- package/build/esm/components/TabPanel/TabPanel.d.ts +2 -2
- package/build/esm/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/build/esm/components/Tooltip/Tooltip.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect } from 'react';
|
|
2
2
|
import { useFollowerAuthenticationDialogContext } from './context.js';
|
|
3
3
|
import { makeStyles, TextField, Button, Box, FormControlLabel, Typography, Checkbox, MenuItem } from '@material-ui/core';
|
|
4
|
+
import { FollowerAuthenticationUserForm } from './FollowerAuthenticationUserForm.js';
|
|
5
|
+
import { FollowerAuthenticationPrivacyPolicy } from './FollowerAuthenticationPrivacyPolicy.js';
|
|
6
|
+
import { validatePhoneNumber } from './phoneValidation.js';
|
|
4
7
|
|
|
5
|
-
const useStyles = makeStyles(
|
|
8
|
+
const useStyles = makeStyles({
|
|
6
9
|
checkboxLabel: {
|
|
7
10
|
'& > a': {
|
|
8
11
|
textDecoration: 'underline',
|
|
@@ -20,18 +23,7 @@ const useStyles = makeStyles((theme) => ({
|
|
|
20
23
|
alignSelf: 'start',
|
|
21
24
|
fontSize: '0.85rem',
|
|
22
25
|
},
|
|
23
|
-
|
|
24
|
-
fontSize: '0.75rem',
|
|
25
|
-
margin: theme.spacing(0, 0.5),
|
|
26
|
-
padding: 0,
|
|
27
|
-
textDecoration: 'underline',
|
|
28
|
-
width: 'auto',
|
|
29
|
-
},
|
|
30
|
-
privacyPolicyText: {
|
|
31
|
-
fontSize: '0.75rem',
|
|
32
|
-
textAlign: 'center',
|
|
33
|
-
},
|
|
34
|
-
}));
|
|
26
|
+
});
|
|
35
27
|
function LocationAndBirthday({ checkFieldValidity, classes, loading, locationOptions, messages, showLocationErrorText, showV2, }) {
|
|
36
28
|
const locationSelect = (React.createElement(TextField, { disabled: loading, select: true, onChange: checkFieldValidity, label: messages.signUpLocationInputLabel, error: showLocationErrorText, helperText: showLocationErrorText && messages.signUpLocationErrorText, id: "location-input", inputProps: { required: true }, name: "location" }, locationOptions.map((locationOption) => (React.createElement(MenuItem, { "data-cy": 'option', key: locationOption.value, value: locationOption.value }, locationOption.label)))));
|
|
37
29
|
if (showV2) {
|
|
@@ -49,13 +41,6 @@ function LocationAndBirthday({ checkFieldValidity, classes, loading, locationOpt
|
|
|
49
41
|
React.createElement(TextField, { disabled: loading, label: messages.signUpMonthInputLabel, id: "birthday-month-input", name: "birthdayMonth" }),
|
|
50
42
|
React.createElement(TextField, { disabled: loading, label: messages.signUpDayInputLabel, id: "birthday-date-input", name: "birthdayDate" })));
|
|
51
43
|
}
|
|
52
|
-
const northAmericanPhoneRegex = /^(\()?[2-9]{1}\d{2}(\))?[-\s.]?[2-9]{1}\d{2}[-\s.]?\d{4}$/;
|
|
53
|
-
const ukPhoneRegex = /^((\+?44\s?|0044\s?)(\s?\d{3,5}|\(\d{3,5}\))(\s?\d{3,4})(\s?\d{3,4})$|^07\d{9}$)/;
|
|
54
|
-
const validatePhoneNumber = (phone) => {
|
|
55
|
-
if (!phone)
|
|
56
|
-
return false;
|
|
57
|
-
return northAmericanPhoneRegex.test(phone) || ukPhoneRegex.test(phone);
|
|
58
|
-
};
|
|
59
44
|
const FollowerAuthenticationForm = () => {
|
|
60
45
|
const { state, messages, locationOptions, onActionButtonClick, loading, showV2, showSubscribeEmail, showSubscribeSms, } = useFollowerAuthenticationDialogContext();
|
|
61
46
|
const classes = useStyles();
|
|
@@ -142,6 +127,7 @@ const FollowerAuthenticationForm = () => {
|
|
|
142
127
|
onActionButtonClick('submit-form', values);
|
|
143
128
|
};
|
|
144
129
|
const formProps = {
|
|
130
|
+
key: state.value,
|
|
145
131
|
id: 'follower-authentication-form',
|
|
146
132
|
className: classes.form,
|
|
147
133
|
onSubmit: handleSubmit,
|
|
@@ -149,17 +135,17 @@ const FollowerAuthenticationForm = () => {
|
|
|
149
135
|
switch (state.value) {
|
|
150
136
|
case 'initial':
|
|
151
137
|
return (React.createElement("form", { ...formProps },
|
|
152
|
-
React.createElement(TextField, { disabled: loading, label: messages.initialInputLabel,
|
|
138
|
+
React.createElement(TextField, { disabled: loading, label: messages.initialInputLabel, id: "identifier-input", name: "identifier" }),
|
|
153
139
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.initialCtaButtonLabel)));
|
|
154
140
|
case 'signUp':
|
|
155
141
|
return (React.createElement("form", { ref: formRef, ...formProps, onInvalid: (e) => {
|
|
156
142
|
e.preventDefault();
|
|
157
143
|
} },
|
|
158
|
-
React.createElement(TextField, { disabled: loading, label: messages.signUpPhoneInputLabel,
|
|
144
|
+
React.createElement(TextField, { disabled: loading, label: messages.signUpPhoneInputLabel, id: "phone-input", name: "phone", onChange: checkFieldValidity, error: showPhoneErrorText, helperText: showPhoneErrorText && messages.signUpPhoneErrorText, inputProps: {
|
|
159
145
|
required: showV2 || !signUpEmailValue,
|
|
160
146
|
}, defaultValue: state.context.phone }),
|
|
161
|
-
React.createElement(TextField, { disabled: loading, label: messages.signUpNameInputLabel,
|
|
162
|
-
React.createElement(TextField, { disabled: loading, label: messages.signUpEmailInputLabel,
|
|
147
|
+
React.createElement(TextField, { disabled: loading, label: messages.signUpNameInputLabel, id: "name-input", name: "name", onChange: checkFieldValidity, error: showNameErrorText, inputProps: { required: true }, defaultValue: state.context.name }),
|
|
148
|
+
React.createElement(TextField, { disabled: loading, label: messages.signUpEmailInputLabel, id: "email-input", name: "email", error: showEmailErrorText, helperText: showEmailErrorText && messages.signUpEmailErrorText, onChange: checkFieldValidity, inputProps: {
|
|
163
149
|
required: showV2 || !signUpPhoneValue,
|
|
164
150
|
type: 'email',
|
|
165
151
|
}, defaultValue: state.context.email }),
|
|
@@ -167,58 +153,53 @@ const FollowerAuthenticationForm = () => {
|
|
|
167
153
|
React.createElement(Box, { display: "flex", flexDirection: "column", alignItems: "flex-start", gridGap: 2, width: "100%" },
|
|
168
154
|
showSubscribeEmail && (React.createElement(FormControlLabel, { style: { alignItems: 'flex-start' }, control: React.createElement(Checkbox, { id: "subscribe-email", name: "subscribeEmail", disabled: loading, color: "primary" }), label: React.createElement(Typography, { className: classes.checkboxLabel }, messages.subscribeEmailCheckboxLabel) })),
|
|
169
155
|
showSubscribeSms && (React.createElement(FormControlLabel, { style: { alignItems: 'flex-start' }, control: React.createElement(Checkbox, { id: "subscribe-sms", name: "subscribeSms", disabled: loading, color: "primary" }), label: React.createElement(Typography, { className: classes.checkboxLabel }, messages.subscribeSmsCheckboxLabel) }))),
|
|
170
|
-
|
|
171
|
-
messages.privacyPolicyText,
|
|
172
|
-
React.createElement(Button, { className: classes.privacyPolicyButton, onClick: () => onActionButtonClick('open-privacy-policy'), variant: "text" }, messages.privacyPolicyButtonLabel))),
|
|
156
|
+
React.createElement(FollowerAuthenticationPrivacyPolicy, null),
|
|
173
157
|
React.createElement(Button, { disabled: loading || !formValidity, type: "submit" }, messages.signUp)));
|
|
174
158
|
case 'emailFound':
|
|
175
159
|
return (React.createElement("form", { ...formProps },
|
|
176
|
-
React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel,
|
|
160
|
+
React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, id: "email-input", name: "email", value: state.context.email }),
|
|
177
161
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.emailFoundCtaButtonLabel)));
|
|
178
162
|
case 'emailAuthCode':
|
|
179
163
|
return (React.createElement("form", { ...formProps },
|
|
180
|
-
React.createElement(TextField, { disabled: loading, label: messages.emailAuthCodeInputLabel,
|
|
164
|
+
React.createElement(TextField, { disabled: loading, label: messages.emailAuthCodeInputLabel, id: "code-input", name: "code" }),
|
|
181
165
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
|
|
182
166
|
case 'emailMagicLinkSent':
|
|
183
167
|
return (React.createElement(Button, { disabled: loading, onClick: () => {
|
|
184
168
|
onActionButtonClick('close');
|
|
185
169
|
} }, messages.emailMagicLinkSentCtaButtonLabel));
|
|
186
170
|
case 'indirectUserFound': {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
React.createElement(Button, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
|
|
191
|
-
}
|
|
192
|
-
else if (state.context.phone) {
|
|
193
|
-
return (React.createElement("form", { ...formProps },
|
|
194
|
-
React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
|
|
195
|
-
React.createElement(Button, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
|
|
196
|
-
}
|
|
197
|
-
else
|
|
171
|
+
const isEmail = Boolean(state.context.email);
|
|
172
|
+
const isPhone = Boolean(state.context.phone);
|
|
173
|
+
if (!isEmail && !isPhone)
|
|
198
174
|
return null;
|
|
175
|
+
return (React.createElement("form", { ...formProps },
|
|
176
|
+
React.createElement(TextField, { disabled: loading, label: isEmail ? messages.emailFoundInputLabel : messages.phoneFoundInputLabel, id: isEmail ? 'email-input' : 'phone-input', name: isEmail ? 'email' : 'phone', value: isEmail ? state.context.email : state.context.phone }),
|
|
177
|
+
React.createElement(Button, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
|
|
199
178
|
}
|
|
200
179
|
case 'emailPasswordSignIn':
|
|
201
180
|
return (React.createElement("form", { ...formProps },
|
|
202
|
-
React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel,
|
|
203
|
-
React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel,
|
|
181
|
+
React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, id: "email-input", name: "email", value: state.context.email, InputLabelProps: { shrink: true } }),
|
|
182
|
+
React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel, id: "password-input", name: "password", inputProps: { type: 'password' } }),
|
|
204
183
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
|
|
205
184
|
case 'phoneFound':
|
|
206
185
|
return (React.createElement("form", { ...formProps },
|
|
207
|
-
React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel,
|
|
186
|
+
React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, id: "phone-input", name: "phone", value: state.context.phone }),
|
|
208
187
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.phoneFoundCtaButtonLabel)));
|
|
209
188
|
case 'phoneAuthCode':
|
|
210
189
|
return (React.createElement("form", { ...formProps },
|
|
211
|
-
React.createElement(TextField, { disabled: loading, label: messages.phoneAuthCodeInputLabel,
|
|
190
|
+
React.createElement(TextField, { disabled: loading, label: messages.phoneAuthCodeInputLabel, id: "code-input", name: "code", autoComplete: "one-time-code" }),
|
|
212
191
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
|
|
213
192
|
case 'phonePasswordSignIn':
|
|
214
193
|
return (React.createElement("form", { ...formProps },
|
|
215
|
-
React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel,
|
|
216
|
-
React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel,
|
|
194
|
+
React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, id: "phone-input", name: "phone", value: state.context.phone, InputLabelProps: { shrink: true } }),
|
|
195
|
+
React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel, id: "password-input", name: "password", inputProps: { type: 'password' } }),
|
|
217
196
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
|
|
218
197
|
case 'requirePhone':
|
|
219
198
|
return (React.createElement("form", { ...formProps },
|
|
220
|
-
React.createElement(TextField, { disabled: loading, label: messages.requirePhoneInputLabel,
|
|
199
|
+
React.createElement(TextField, { disabled: loading, label: messages.requirePhoneInputLabel, id: "phone-input", name: "phone", value: state.context.phone }),
|
|
221
200
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.requirePhoneCtaButtonLabel)));
|
|
201
|
+
case 'completeProfile':
|
|
202
|
+
return React.createElement(FollowerAuthenticationUserForm, null);
|
|
222
203
|
case 'welcome':
|
|
223
204
|
return null;
|
|
224
205
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationForm.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.tsx"],"sourcesContent":["import React, { ChangeEventHandler, ReactNode, useEffect, useRef, useState } from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Button, Checkbox, FormControlLabel, makeStyles, MenuItem, TextField, Typography } from '@material-ui/core'\nimport { MessageKey } from './FollowerAuthenticationDialogProps'\n\nconst useStyles = makeStyles((theme) => ({\n checkboxLabel: {\n '& > a': {\n textDecoration: 'underline',\n },\n fontSize: '0.75rem',\n },\n form: {\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n gridGap: 16,\n width: '100%',\n },\n label: {\n alignSelf: 'start',\n fontSize: '0.85rem',\n },\n privacyPolicyButton: {\n fontSize: '0.75rem',\n margin: theme.spacing(0, 0.5),\n padding: 0,\n textDecoration: 'underline',\n width: 'auto',\n },\n privacyPolicyText: {\n fontSize: '0.75rem',\n textAlign: 'center',\n },\n}))\n\ntype LocationAndBirthdayProps = {\n checkFieldValidity: ChangeEventHandler<HTMLInputElement>\n classes: { label: string }\n loading: boolean\n locationOptions: { label: string; value: string }[]\n messages: Record<MessageKey, ReactNode>\n showLocationErrorText: boolean | undefined\n showV2: boolean | undefined\n}\n\nfunction LocationAndBirthday({\n checkFieldValidity,\n classes,\n loading,\n locationOptions,\n messages,\n showLocationErrorText,\n showV2,\n}: LocationAndBirthdayProps) {\n const locationSelect = (\n <TextField\n disabled={loading}\n select\n onChange={checkFieldValidity}\n label={messages.signUpLocationInputLabel}\n error={showLocationErrorText}\n helperText={showLocationErrorText && messages.signUpLocationErrorText}\n id=\"location-input\"\n inputProps={{ required: true }}\n name=\"location\"\n >\n {locationOptions.map((locationOption) => (\n <MenuItem data-cy={'option'} key={locationOption.value} value={locationOption.value}>\n {locationOption.label}\n </MenuItem>\n ))}\n </TextField>\n )\n\n if (showV2) {\n return (\n <>\n <Box display=\"flex\" flexDirection=\"column\" gridGap={4} style={{ width: '100%' }}>\n <Typography className={classes.label}>{messages.signUpBirthdaySectionLabel}</Typography>\n <Box display=\"flex\" gridGap={16}>\n <TextField\n disabled={loading}\n label={messages.signUpMonthInputLabel}\n id=\"birthday-month-input\"\n name=\"birthdayMonth\"\n style={{ flex: 1 }}\n />\n <TextField\n disabled={loading}\n label={messages.signUpDayInputLabel}\n id=\"birthday-date-input\"\n name=\"birthdayDate\"\n style={{ flex: 1 }}\n />\n </Box>\n </Box>\n {locationSelect}\n </>\n )\n }\n\n return (\n <>\n {locationSelect}\n <Typography style={{ alignSelf: 'start' }}>{messages.signUpBirthdaySectionLabel}</Typography>\n <TextField\n disabled={loading}\n label={messages.signUpMonthInputLabel}\n id=\"birthday-month-input\"\n name=\"birthdayMonth\"\n />\n <TextField disabled={loading} label={messages.signUpDayInputLabel} id=\"birthday-date-input\" name=\"birthdayDate\" />\n </>\n )\n}\n\nconst northAmericanPhoneRegex = /^(\\()?[2-9]{1}\\d{2}(\\))?[-\\s.]?[2-9]{1}\\d{2}[-\\s.]?\\d{4}$/\nconst ukPhoneRegex = /^((\\+?44\\s?|0044\\s?)(\\s?\\d{3,5}|\\(\\d{3,5}\\))(\\s?\\d{3,4})(\\s?\\d{3,4})$|^07\\d{9}$)/\n\nconst validatePhoneNumber = (phone: string): boolean => {\n if (!phone) return false\n return northAmericanPhoneRegex.test(phone) || ukPhoneRegex.test(phone)\n}\n\nexport const FollowerAuthenticationForm = () => {\n const {\n state,\n messages,\n locationOptions,\n onActionButtonClick,\n loading,\n showV2,\n showSubscribeEmail,\n showSubscribeSms,\n } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n\n // sign-up form state\n const formRef = useRef<HTMLFormElement>(null)\n const [formValidity, setFormValidity] = useState(false)\n const [showNameErrorText, setShowNameErrorText] = useState<boolean | undefined>()\n const [showPhoneErrorText, setShowPhoneErrorText] = useState<boolean | undefined>()\n const [showEmailErrorText, setShowEmailErrorText] = useState<boolean | undefined>()\n const [showLocationErrorText, setShowLocationErrorText] = useState<boolean | undefined>()\n const [signUpNameValue, setSignUpNameValue] = useState(state.context.name || '')\n const [signUpPhoneValue, setSignUpPhoneValue] = useState(state.context.phone || '')\n const [signUpEmailValue, setSignUpEmailValue] = useState(state.context.email || '')\n\n const checkFieldValidity: ChangeEventHandler<HTMLInputElement> = (e) => {\n const fieldName = e.target.name\n const fieldValue = e.target.value\n\n switch (fieldName) {\n case 'name':\n const isNameValid = fieldValue.length > 0\n setSignUpNameValue(fieldValue)\n setShowNameErrorText(!isNameValid)\n break\n case 'phone':\n const isPhoneValid = validatePhoneNumber(fieldValue)\n setSignUpPhoneValue(fieldValue)\n setShowPhoneErrorText(!isPhoneValid && fieldValue.length > 0)\n break\n case 'email':\n const emailField = formRef.current?.elements.namedItem(fieldName) as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setSignUpEmailValue(fieldValue)\n setShowEmailErrorText(!isEmailValid && fieldValue.length > 0)\n break\n case 'location':\n setShowLocationErrorText(!fieldValue)\n break\n default:\n break\n }\n }\n\n useEffect(() => {\n setSignUpNameValue(state.context.name || '')\n setSignUpPhoneValue(state.context.phone || '')\n setSignUpEmailValue(state.context.email || '')\n }, [state.context.name, state.context.phone, state.context.email])\n\n useEffect(() => {\n // Validate pre-filled values (only in signUp state)\n if (state.value === 'signUp') {\n if (signUpPhoneValue) {\n const isPhoneValid = validatePhoneNumber(signUpPhoneValue)\n setShowPhoneErrorText(!isPhoneValid)\n }\n if (signUpEmailValue) {\n const emailField = formRef.current?.elements.namedItem('email') as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setShowEmailErrorText(!isEmailValid)\n }\n }\n\n const hasValidName = Boolean(signUpNameValue) && !showNameErrorText\n const hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText\n const hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText\n\n const locationField = formRef.current?.elements.namedItem('location') as HTMLInputElement\n const hasValidLocation = locationField ? Boolean(locationField.value) : true\n\n const hasValidContact = showV2 ? hasValidName && hasValidPhone && hasValidEmail : hasValidPhone || hasValidEmail\n setFormValidity(hasValidContact && hasValidLocation)\n }, [\n showV2,\n state.value,\n signUpPhoneValue,\n signUpEmailValue,\n showPhoneErrorText,\n showEmailErrorText,\n showLocationErrorText,\n signUpNameValue,\n showNameErrorText,\n ])\n\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const form = e.target as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n if (state.value === 'signUp') {\n values.subscribeEmail = String(formData.has('subscribeEmail'))\n values.subscribeSms = String(formData.has('subscribeSms'))\n }\n onActionButtonClick('submit-form', values)\n }\n const formProps = {\n id: 'follower-authentication-form',\n className: classes.form,\n onSubmit: handleSubmit,\n }\n switch (state.value) {\n case 'initial':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.initialInputLabel}\n key=\"identifier-input\"\n id=\"identifier-input\"\n name=\"identifier\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.initialCtaButtonLabel}\n </Button>\n </form>\n )\n case 'signUp':\n return (\n <form\n ref={formRef}\n {...formProps}\n onInvalid={(e) => {\n e.preventDefault()\n }}\n >\n <TextField\n disabled={loading}\n label={messages.signUpPhoneInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n onChange={checkFieldValidity}\n error={showPhoneErrorText}\n helperText={showPhoneErrorText && messages.signUpPhoneErrorText}\n inputProps={{\n required: showV2 || !signUpEmailValue,\n }}\n defaultValue={state.context.phone}\n />\n <TextField\n disabled={loading}\n label={messages.signUpNameInputLabel}\n key=\"name-input\"\n id=\"name-input\"\n name=\"name\"\n onChange={checkFieldValidity}\n error={showNameErrorText}\n inputProps={{ required: true }}\n defaultValue={state.context.name}\n />\n <TextField\n disabled={loading}\n label={messages.signUpEmailInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n error={showEmailErrorText}\n helperText={showEmailErrorText && messages.signUpEmailErrorText}\n onChange={checkFieldValidity}\n inputProps={{\n required: showV2 || !signUpPhoneValue,\n type: 'email',\n }}\n defaultValue={state.context.email}\n />\n <LocationAndBirthday\n checkFieldValidity={checkFieldValidity}\n classes={classes}\n loading={loading}\n locationOptions={locationOptions}\n messages={messages}\n showLocationErrorText={showLocationErrorText}\n showV2={showV2}\n />\n <Box display=\"flex\" flexDirection=\"column\" alignItems=\"flex-start\" gridGap={2} width=\"100%\">\n {showSubscribeEmail && (\n <FormControlLabel\n style={{ alignItems: 'flex-start' }}\n control={<Checkbox id=\"subscribe-email\" name=\"subscribeEmail\" disabled={loading} color=\"primary\" />}\n label={\n <Typography className={classes.checkboxLabel}>{messages.subscribeEmailCheckboxLabel}</Typography>\n }\n />\n )}\n {showSubscribeSms && (\n <FormControlLabel\n style={{ alignItems: 'flex-start' }}\n control={<Checkbox id=\"subscribe-sms\" name=\"subscribeSms\" disabled={loading} color=\"primary\" />}\n label={<Typography className={classes.checkboxLabel}>{messages.subscribeSmsCheckboxLabel}</Typography>}\n />\n )}\n </Box>\n {showV2 && messages.privacyPolicyText && (\n <Typography className={classes.privacyPolicyText}>\n {messages.privacyPolicyText}\n <Button\n className={classes.privacyPolicyButton}\n onClick={() => onActionButtonClick('open-privacy-policy')}\n variant=\"text\"\n >\n {messages.privacyPolicyButtonLabel}\n </Button>\n </Typography>\n )}\n <Button disabled={loading || !formValidity} type=\"submit\">\n {messages.signUp}\n </Button>\n </form>\n )\n case 'emailFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.emailFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'emailAuthCode':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailAuthCodeInputLabel}\n key=\"code-input\"\n id=\"code-input\"\n name=\"code\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'emailMagicLinkSent':\n return (\n <Button\n disabled={loading}\n onClick={() => {\n onActionButtonClick('close')\n }}\n >\n {messages.emailMagicLinkSentCtaButtonLabel}\n </Button>\n )\n case 'indirectUserFound': {\n if (state.context.email) {\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.indirectUserFoundCtaButtonLabel}\n </Button>\n </form>\n )\n } else if (state.context.phone) {\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.indirectUserFoundCtaButtonLabel}\n </Button>\n </form>\n )\n } else return null\n }\n case 'emailPasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n key=\"email-input\"\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n key=\"password-input\"\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phoneFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.phoneFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'phoneAuthCode':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneAuthCodeInputLabel}\n key=\"code-input\"\n id=\"code-input\"\n name=\"code\"\n autoComplete=\"one-time-code\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phonePasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n key=\"password-input\"\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'requirePhone':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.requirePhoneInputLabel}\n key=\"phone-input\"\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.requirePhoneCtaButtonLabel}\n </Button>\n </form>\n )\n case 'welcome':\n return null\n default:\n return null\n }\n}\n"],"names":[],"mappings":";;;;AAKA,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,MAAM;AACvC,IAAA,aAAa,EAAE;AACb,QAAA,OAAO,EAAE;AACP,YAAA,cAAc,EAAE,WAAW;AAC5B,SAAA;AACD,QAAA,QAAQ,EAAE,SAAS;AACpB,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,KAAK,EAAE,MAAM;AACd,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,SAAS,EAAE,OAAO;AAClB,QAAA,QAAQ,EAAE,SAAS;AACpB,KAAA;AACD,IAAA,mBAAmB,EAAE;AACnB,QAAA,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,KAAK,CAAC,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ChC,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAC,EAAA,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAA,EACrC,QAAQ,CAAC,MAAM,CACT,CACJ;AAEX,QAAA,KAAK,cAAc;YACjB,QACE,iCAAU,SAAS,EAAA;AACjB,gBAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,QAAQ,CAAC,sBAAsB,EACtC,GAAG,EAAC,aAAa,EACjB,EAAE,EAAC,aAAa,EAChB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAC1B,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAC,EAAA,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAA,EACrC,QAAQ,CAAC,0BAA0B,CAC7B,CACJ;AAEX,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,IAAI;AACb,QAAA;AACE,YAAA,OAAO,IAAI;;AAEjB;;;;"}
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationForm.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.tsx"],"sourcesContent":["import React, { ChangeEventHandler, ReactNode, useEffect, useRef, useState } from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Button, Checkbox, FormControlLabel, makeStyles, MenuItem, TextField, Typography } from '@material-ui/core'\nimport { MessageKey } from './FollowerAuthenticationDialogProps'\nimport { FollowerAuthenticationUserForm } from './FollowerAuthenticationUserForm'\nimport { FollowerAuthenticationPrivacyPolicy } from './FollowerAuthenticationPrivacyPolicy'\nimport { validatePhoneNumber } from './phoneValidation'\n\nconst useStyles = makeStyles({\n checkboxLabel: {\n '& > a': {\n textDecoration: 'underline',\n },\n fontSize: '0.75rem',\n },\n form: {\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n gridGap: 16,\n width: '100%',\n },\n label: {\n alignSelf: 'start',\n fontSize: '0.85rem',\n },\n})\n\ntype LocationAndBirthdayProps = {\n checkFieldValidity: ChangeEventHandler<HTMLInputElement>\n classes: { label: string }\n loading: boolean\n locationOptions: { label: string; value: string }[]\n messages: Record<MessageKey, ReactNode>\n showLocationErrorText: boolean | undefined\n showV2: boolean | undefined\n}\n\nfunction LocationAndBirthday({\n checkFieldValidity,\n classes,\n loading,\n locationOptions,\n messages,\n showLocationErrorText,\n showV2,\n}: LocationAndBirthdayProps) {\n const locationSelect = (\n <TextField\n disabled={loading}\n select\n onChange={checkFieldValidity}\n label={messages.signUpLocationInputLabel}\n error={showLocationErrorText}\n helperText={showLocationErrorText && messages.signUpLocationErrorText}\n id=\"location-input\"\n inputProps={{ required: true }}\n name=\"location\"\n >\n {locationOptions.map((locationOption) => (\n <MenuItem data-cy={'option'} key={locationOption.value} value={locationOption.value}>\n {locationOption.label}\n </MenuItem>\n ))}\n </TextField>\n )\n\n if (showV2) {\n return (\n <>\n <Box display=\"flex\" flexDirection=\"column\" gridGap={4} style={{ width: '100%' }}>\n <Typography className={classes.label}>{messages.signUpBirthdaySectionLabel}</Typography>\n <Box display=\"flex\" gridGap={16}>\n <TextField\n disabled={loading}\n label={messages.signUpMonthInputLabel}\n id=\"birthday-month-input\"\n name=\"birthdayMonth\"\n style={{ flex: 1 }}\n />\n <TextField\n disabled={loading}\n label={messages.signUpDayInputLabel}\n id=\"birthday-date-input\"\n name=\"birthdayDate\"\n style={{ flex: 1 }}\n />\n </Box>\n </Box>\n {locationSelect}\n </>\n )\n }\n\n return (\n <>\n {locationSelect}\n <Typography style={{ alignSelf: 'start' }}>{messages.signUpBirthdaySectionLabel}</Typography>\n <TextField\n disabled={loading}\n label={messages.signUpMonthInputLabel}\n id=\"birthday-month-input\"\n name=\"birthdayMonth\"\n />\n <TextField disabled={loading} label={messages.signUpDayInputLabel} id=\"birthday-date-input\" name=\"birthdayDate\" />\n </>\n )\n}\n\nexport const FollowerAuthenticationForm = () => {\n const {\n state,\n messages,\n locationOptions,\n onActionButtonClick,\n loading,\n showV2,\n showSubscribeEmail,\n showSubscribeSms,\n } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n\n // sign-up form state\n const formRef = useRef<HTMLFormElement>(null)\n const [formValidity, setFormValidity] = useState(false)\n const [showNameErrorText, setShowNameErrorText] = useState<boolean | undefined>()\n const [showPhoneErrorText, setShowPhoneErrorText] = useState<boolean | undefined>()\n const [showEmailErrorText, setShowEmailErrorText] = useState<boolean | undefined>()\n const [showLocationErrorText, setShowLocationErrorText] = useState<boolean | undefined>()\n const [signUpNameValue, setSignUpNameValue] = useState(state.context.name || '')\n const [signUpPhoneValue, setSignUpPhoneValue] = useState(state.context.phone || '')\n const [signUpEmailValue, setSignUpEmailValue] = useState(state.context.email || '')\n\n const checkFieldValidity: ChangeEventHandler<HTMLInputElement> = (e) => {\n const fieldName = e.target.name\n const fieldValue = e.target.value\n\n switch (fieldName) {\n case 'name':\n const isNameValid = fieldValue.length > 0\n setSignUpNameValue(fieldValue)\n setShowNameErrorText(!isNameValid)\n break\n case 'phone':\n const isPhoneValid = validatePhoneNumber(fieldValue)\n setSignUpPhoneValue(fieldValue)\n setShowPhoneErrorText(!isPhoneValid && fieldValue.length > 0)\n break\n case 'email':\n const emailField = formRef.current?.elements.namedItem(fieldName) as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setSignUpEmailValue(fieldValue)\n setShowEmailErrorText(!isEmailValid && fieldValue.length > 0)\n break\n case 'location':\n setShowLocationErrorText(!fieldValue)\n break\n default:\n break\n }\n }\n\n useEffect(() => {\n setSignUpNameValue(state.context.name || '')\n setSignUpPhoneValue(state.context.phone || '')\n setSignUpEmailValue(state.context.email || '')\n }, [state.context.name, state.context.phone, state.context.email])\n\n useEffect(() => {\n // Validate pre-filled values (only in signUp state)\n if (state.value === 'signUp') {\n if (signUpPhoneValue) {\n const isPhoneValid = validatePhoneNumber(signUpPhoneValue)\n setShowPhoneErrorText(!isPhoneValid)\n }\n if (signUpEmailValue) {\n const emailField = formRef.current?.elements.namedItem('email') as HTMLInputElement\n const isEmailValid = emailField?.validity.valid ?? false\n setShowEmailErrorText(!isEmailValid)\n }\n }\n\n const hasValidName = Boolean(signUpNameValue) && !showNameErrorText\n const hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText\n const hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText\n\n const locationField = formRef.current?.elements.namedItem('location') as HTMLInputElement\n const hasValidLocation = locationField ? Boolean(locationField.value) : true\n\n const hasValidContact = showV2 ? hasValidName && hasValidPhone && hasValidEmail : hasValidPhone || hasValidEmail\n setFormValidity(hasValidContact && hasValidLocation)\n }, [\n showV2,\n state.value,\n signUpPhoneValue,\n signUpEmailValue,\n showPhoneErrorText,\n showEmailErrorText,\n showLocationErrorText,\n signUpNameValue,\n showNameErrorText,\n ])\n\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const form = e.target as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n if (state.value === 'signUp') {\n values.subscribeEmail = String(formData.has('subscribeEmail'))\n values.subscribeSms = String(formData.has('subscribeSms'))\n }\n onActionButtonClick('submit-form', values)\n }\n const formProps = {\n key: state.value,\n id: 'follower-authentication-form',\n className: classes.form,\n onSubmit: handleSubmit,\n }\n switch (state.value) {\n case 'initial':\n return (\n <form {...formProps}>\n <TextField disabled={loading} label={messages.initialInputLabel} id=\"identifier-input\" name=\"identifier\" />\n <Button disabled={loading} type=\"submit\">\n {messages.initialCtaButtonLabel}\n </Button>\n </form>\n )\n case 'signUp':\n return (\n <form\n ref={formRef}\n {...formProps}\n onInvalid={(e) => {\n e.preventDefault()\n }}\n >\n <TextField\n disabled={loading}\n label={messages.signUpPhoneInputLabel}\n id=\"phone-input\"\n name=\"phone\"\n onChange={checkFieldValidity}\n error={showPhoneErrorText}\n helperText={showPhoneErrorText && messages.signUpPhoneErrorText}\n inputProps={{\n required: showV2 || !signUpEmailValue,\n }}\n defaultValue={state.context.phone}\n />\n <TextField\n disabled={loading}\n label={messages.signUpNameInputLabel}\n id=\"name-input\"\n name=\"name\"\n onChange={checkFieldValidity}\n error={showNameErrorText}\n inputProps={{ required: true }}\n defaultValue={state.context.name}\n />\n <TextField\n disabled={loading}\n label={messages.signUpEmailInputLabel}\n id=\"email-input\"\n name=\"email\"\n error={showEmailErrorText}\n helperText={showEmailErrorText && messages.signUpEmailErrorText}\n onChange={checkFieldValidity}\n inputProps={{\n required: showV2 || !signUpPhoneValue,\n type: 'email',\n }}\n defaultValue={state.context.email}\n />\n <LocationAndBirthday\n checkFieldValidity={checkFieldValidity}\n classes={classes}\n loading={loading}\n locationOptions={locationOptions}\n messages={messages}\n showLocationErrorText={showLocationErrorText}\n showV2={showV2}\n />\n <Box display=\"flex\" flexDirection=\"column\" alignItems=\"flex-start\" gridGap={2} width=\"100%\">\n {showSubscribeEmail && (\n <FormControlLabel\n style={{ alignItems: 'flex-start' }}\n control={<Checkbox id=\"subscribe-email\" name=\"subscribeEmail\" disabled={loading} color=\"primary\" />}\n label={\n <Typography className={classes.checkboxLabel}>{messages.subscribeEmailCheckboxLabel}</Typography>\n }\n />\n )}\n {showSubscribeSms && (\n <FormControlLabel\n style={{ alignItems: 'flex-start' }}\n control={<Checkbox id=\"subscribe-sms\" name=\"subscribeSms\" disabled={loading} color=\"primary\" />}\n label={<Typography className={classes.checkboxLabel}>{messages.subscribeSmsCheckboxLabel}</Typography>}\n />\n )}\n </Box>\n <FollowerAuthenticationPrivacyPolicy />\n <Button disabled={loading || !formValidity} type=\"submit\">\n {messages.signUp}\n </Button>\n </form>\n )\n case 'emailFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.emailFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'emailAuthCode':\n return (\n <form {...formProps}>\n <TextField disabled={loading} label={messages.emailAuthCodeInputLabel} id=\"code-input\" name=\"code\" />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'emailMagicLinkSent':\n return (\n <Button\n disabled={loading}\n onClick={() => {\n onActionButtonClick('close')\n }}\n >\n {messages.emailMagicLinkSentCtaButtonLabel}\n </Button>\n )\n case 'indirectUserFound': {\n const isEmail = Boolean(state.context.email)\n const isPhone = Boolean(state.context.phone)\n if (!isEmail && !isPhone) return null\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={isEmail ? messages.emailFoundInputLabel : messages.phoneFoundInputLabel}\n id={isEmail ? 'email-input' : 'phone-input'}\n name={isEmail ? 'email' : 'phone'}\n value={isEmail ? state.context.email : state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.indirectUserFoundCtaButtonLabel}\n </Button>\n </form>\n )\n }\n case 'emailPasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.emailFoundInputLabel}\n id=\"email-input\"\n name=\"email\"\n value={state.context.email}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phoneFound':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.phoneFoundCtaButtonLabel}\n </Button>\n </form>\n )\n case 'phoneAuthCode':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneAuthCodeInputLabel}\n id=\"code-input\"\n name=\"code\"\n autoComplete=\"one-time-code\"\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'phonePasswordSignIn':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.phoneFoundInputLabel}\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n InputLabelProps={{ shrink: true }}\n />\n <TextField\n disabled={loading}\n label={messages.passwordInputLabel}\n id=\"password-input\"\n name=\"password\"\n inputProps={{ type: 'password' }}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.signIn}\n </Button>\n </form>\n )\n case 'requirePhone':\n return (\n <form {...formProps}>\n <TextField\n disabled={loading}\n label={messages.requirePhoneInputLabel}\n id=\"phone-input\"\n name=\"phone\"\n value={state.context.phone}\n />\n <Button disabled={loading} type=\"submit\">\n {messages.requirePhoneCtaButtonLabel}\n </Button>\n </form>\n )\n case 'completeProfile':\n return <FollowerAuthenticationUserForm />\n case 'welcome':\n return null\n default:\n return null\n }\n}\n"],"names":[],"mappings":";;;;;;;AAQA,MAAM,SAAS,GAAG,UAAU,CAAC;AAC3B,IAAA,aAAa,EAAE;AACb,QAAA,OAAO,EAAE;AACP,YAAA,cAAc,EAAE,WAAW;AAC5B,SAAA;AACD,QAAA,QAAQ,EAAE,SAAS;AACpB,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,KAAK,EAAE,MAAM;AACd,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,SAAS,EAAE,OAAO;AAClB,QAAA,QAAQ,EAAE,SAAS;AACpB,KAAA;AACF,CAAA,CAAC;AAYF,SAAS,mBAAmB,CAAC,EAC3B,kBAAkB,EAClB,OAAO,EACP,OAAO,EACP,eAAe,EACf,QAAQ,EACR,qBAAqB,EACrB,MAAM,GACmB,EAAA;AACzB,IAAA,MAAM,cAAc,IAClB,oBAAC,SAAS,EAAA,EACR,QAAQ,EAAE,OA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,CAAC,sBAAsB,EACtC,EAAE,EAAC,aAAa,EAChB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAC1B,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAC,EAAA,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAA,EACrC,QAAQ,CAAC,0BAA0B,CAC7B,CACJ;AAEX,QAAA,KAAK,iBAAiB;YACpB,OAAO,KAAA,CAAA,aAAA,CAAC,8BAA8B,EAAA,IAAA,CAAG;AAC3C,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,IAAI;AACb,QAAA;AACE,YAAA,OAAO,IAAI;;AAEjB;;;;"}
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationGraphic: () => React.JSX.Element | null;
|
|
@@ -4,7 +4,7 @@ import { Box } from '@material-ui/core';
|
|
|
4
4
|
|
|
5
5
|
const FollowerAuthenticationGraphic = () => {
|
|
6
6
|
const { state, graphics, showV2 } = useFollowerAuthenticationDialogContext();
|
|
7
|
-
if (showV2 && state.value === 'signUp')
|
|
7
|
+
if (showV2 && (state.value === 'signUp' || state.value === 'completeProfile'))
|
|
8
8
|
return null;
|
|
9
9
|
const graphic = graphics[state.value];
|
|
10
10
|
if (!graphic)
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationGraphic.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box } from '@material-ui/core'\n\nexport const FollowerAuthenticationGraphic = () => {\n const { state, graphics, showV2 } = useFollowerAuthenticationDialogContext()\n if (showV2 && state.value === 'signUp') return null\n\n const graphic = graphics[state.value]\n if (!graphic) return null\n return (\n <Box>\n <img src={graphic} alt=\"\" style={showV2 ? { width: 95, height: 95 } : undefined} />\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAIO,MAAM,6BAA6B,GAAG,MAAK;IAChD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,sCAAsC,EAAE;AAC5E,IAAA,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationGraphic.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box } from '@material-ui/core'\n\nexport const FollowerAuthenticationGraphic = () => {\n const { state, graphics, showV2 } = useFollowerAuthenticationDialogContext()\n if (showV2 && (state.value === 'signUp' || state.value === 'completeProfile')) return null\n\n const graphic = graphics[state.value]\n if (!graphic) return null\n return (\n <Box>\n <img src={graphic} alt=\"\" style={showV2 ? { width: 95, height: 95 } : undefined} />\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAIO,MAAM,6BAA6B,GAAG,MAAK;IAChD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,sCAAsC,EAAE;AAC5E,IAAA,IAAI,MAAM,KAAK,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,KAAK,iBAAiB,CAAC;AAAE,QAAA,OAAO,IAAI;IAE1F,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;AACrC,IAAA,IAAI,CAAC,OAAO;AAAE,QAAA,OAAO,IAAI;IACzB,QACE,oBAAC,GAAG,EAAA,IAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,EAAE,EAAC,KAAK,EAAE,MAAM,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,SAAS,EAAI,CAAA,CAC/E;AAEV;;;;"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationInfo: () => React.JSX.Element | null;
|
|
@@ -4,7 +4,7 @@ import { Box, Typography } from '@material-ui/core';
|
|
|
4
4
|
|
|
5
5
|
const FollowerAuthenticationInfo = () => {
|
|
6
6
|
const { state, messages, showV2 } = useFollowerAuthenticationDialogContext();
|
|
7
|
-
if (showV2 && state.value === 'signUp')
|
|
7
|
+
if (showV2 && (state.value === 'signUp' || state.value === 'completeProfile'))
|
|
8
8
|
return null;
|
|
9
9
|
const info = messages[`${state.value}Info`];
|
|
10
10
|
const last4Digits = state.context.phone?.slice(-4);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationInfo.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Typography } from '@material-ui/core'\nimport { MessageKey } from './FollowerAuthenticationDialogProps'\n\nexport const FollowerAuthenticationInfo = () => {\n const { state, messages, showV2 } = useFollowerAuthenticationDialogContext()\n if (showV2 && state.value === 'signUp') return null\n\n const info = messages[`${state.value}Info` as MessageKey]\n const last4Digits = state.context.phone?.slice(-4)\n\n if (!info) return null\n return (\n <Box>\n <Typography align=\"center\">{info}</Typography>\n {showV2 && state.value === 'phoneAuthCode' && (\n <Typography align=\"center\" variant=\"h5\" style={{ marginTop: 16 }}>\n ***-***-{last4Digits}\n </Typography>\n )}\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAKO,MAAM,0BAA0B,GAAG,MAAK;IAC7C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,sCAAsC,EAAE;AAC5E,IAAA,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationInfo.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Typography } from '@material-ui/core'\nimport { MessageKey } from './FollowerAuthenticationDialogProps'\n\nexport const FollowerAuthenticationInfo = () => {\n const { state, messages, showV2 } = useFollowerAuthenticationDialogContext()\n if (showV2 && (state.value === 'signUp' || state.value === 'completeProfile')) return null\n\n const info = messages[`${state.value}Info` as MessageKey]\n const last4Digits = state.context.phone?.slice(-4)\n\n if (!info) return null\n return (\n <Box>\n <Typography align=\"center\">{info}</Typography>\n {showV2 && state.value === 'phoneAuthCode' && (\n <Typography align=\"center\" variant=\"h5\" style={{ marginTop: 16 }}>\n ***-***-{last4Digits}\n </Typography>\n )}\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAKO,MAAM,0BAA0B,GAAG,MAAK;IAC7C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,sCAAsC,EAAE;AAC5E,IAAA,IAAI,MAAM,KAAK,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,KAAK,iBAAiB,CAAC;AAAE,QAAA,OAAO,IAAI;IAE1F,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAA,EAAG,KAAK,CAAC,KAAK,CAAoB,IAAA,CAAA,CAAC;AACzD,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;AAElD,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,IAAI;IACtB,QACE,oBAAC,GAAG,EAAA,IAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,UAAU,EAAC,EAAA,KAAK,EAAC,QAAQ,EAAA,EAAE,IAAI,CAAc;QAC7C,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,eAAe,KACxC,KAAC,CAAA,aAAA,CAAA,UAAU,EAAC,EAAA,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAA;;AACrD,YAAA,WAAW,CACT,CACd,CACG;AAEV;;;;"}
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationLogoContainer.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationLogoContainer: () => React.JSX.Element;
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useFollowerAuthenticationDialogContext } from './context.js';
|
|
3
|
+
import { makeStyles, Typography, Button } from '@material-ui/core';
|
|
4
|
+
|
|
5
|
+
const useStyles = makeStyles((theme) => ({
|
|
6
|
+
button: {
|
|
7
|
+
fontSize: '0.75rem',
|
|
8
|
+
margin: theme.spacing(0, 0.5),
|
|
9
|
+
padding: 0,
|
|
10
|
+
textDecoration: 'underline',
|
|
11
|
+
width: 'auto',
|
|
12
|
+
},
|
|
13
|
+
text: {
|
|
14
|
+
fontSize: '0.75rem',
|
|
15
|
+
textAlign: 'center',
|
|
16
|
+
},
|
|
17
|
+
}));
|
|
18
|
+
const FollowerAuthenticationPrivacyPolicy = () => {
|
|
19
|
+
const classes = useStyles();
|
|
20
|
+
const { messages, onActionButtonClick, showV2 } = useFollowerAuthenticationDialogContext();
|
|
21
|
+
if (!showV2 || !messages.privacyPolicyText)
|
|
22
|
+
return null;
|
|
23
|
+
return (React.createElement(Typography, { className: classes.text },
|
|
24
|
+
messages.privacyPolicyText,
|
|
25
|
+
React.createElement(Button, { className: classes.button, onClick: () => onActionButtonClick('open-privacy-policy'), variant: "text" }, messages.privacyPolicyButtonLabel)));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { FollowerAuthenticationPrivacyPolicy };
|
|
29
|
+
//# sourceMappingURL=FollowerAuthenticationPrivacyPolicy.js.map
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationPrivacyPolicy.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationPrivacyPolicy.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Button, makeStyles, Typography } from '@material-ui/core'\n\nconst useStyles = makeStyles((theme) => ({\n button: {\n fontSize: '0.75rem',\n margin: theme.spacing(0, 0.5),\n padding: 0,\n textDecoration: 'underline',\n width: 'auto',\n },\n text: {\n fontSize: '0.75rem',\n textAlign: 'center',\n },\n}))\n\nexport const FollowerAuthenticationPrivacyPolicy = () => {\n const classes = useStyles()\n const { messages, onActionButtonClick, showV2 } = useFollowerAuthenticationDialogContext()\n if (!showV2 || !messages.privacyPolicyText) return null\n return (\n <Typography className={classes.text}>\n {messages.privacyPolicyText}\n <Button className={classes.button} onClick={() => onActionButtonClick('open-privacy-policy')} variant=\"text\">\n {messages.privacyPolicyButtonLabel}\n </Button>\n </Typography>\n )\n}\n"],"names":[],"mappings":";;;;AAIA,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,MAAM;AACvC,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC;AAC7B,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,cAAc,EAAE,WAAW;AAC3B,QAAA,KAAK,EAAE,MAAM;AACd,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,QAAQ,EAAE,SAAS;AACnB,QAAA,SAAS,EAAE,QAAQ;AACpB,KAAA;AACF,CAAA,CAAC,CAAC;AAEI,MAAM,mCAAmC,GAAG,MAAK;AACtD,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE;IAC3B,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,EAAE,GAAG,sCAAsC,EAAE;AAC1F,IAAA,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,iBAAiB;AAAE,QAAA,OAAO,IAAI;IACvD,QACE,oBAAC,UAAU,EAAA,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,EAAA;AAChC,QAAA,QAAQ,CAAC,iBAAiB;AAC3B,QAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAC,MAAM,EAAA,EACzG,QAAQ,CAAC,wBAAwB,CAC3B,CACE;AAEjB;;;;"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const FollowerAuthenticationTitle: () => React.JSX.Element;
|