@popmenu/common-ui 0.127.0 → 0.128.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/AvatarProps.d.ts +2 -2
- package/build/cjs/components/Button/Button.d.ts +1 -1
- package/build/cjs/components/Button/ButtonProps.d.ts +1 -1
- package/build/cjs/components/Button/ButtonStyles.d.ts +1 -1
- package/build/cjs/components/Chip/Chip.d.ts +1 -1
- package/build/cjs/components/Chip/ChipProps.d.ts +2 -2
- package/build/cjs/components/CollapsibleText/CollapsibleTextStyles.d.ts +2 -2
- package/build/cjs/components/Divider/DividerProps.d.ts +1 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -6
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/context.d.ts +0 -1
- package/build/cjs/components/Icon/IconStyles.d.ts +1 -1
- package/build/cjs/components/IconButton/IconButtonProps.d.ts +1 -1
- package/build/cjs/components/Link/LinkStyles.d.ts +1 -1
- package/build/cjs/components/NumberField/NumberField.d.ts +0 -1
- package/build/cjs/components/NumberField/NumberFieldStyles.d.ts +1 -1
- package/build/cjs/components/SplitInput/SplitInputStyles.d.ts +1 -1
- package/build/cjs/components/Tooltip/TooltipProps.d.ts +1 -1
- package/build/cjs/components/Typography/Typography.d.ts +1 -1
- package/build/cjs/components/Typography/TypographyProps.d.ts +3 -3
- package/build/cjs/components/Typography/TypographyStyles.d.ts +1 -1
- package/build/cjs/hooks/useTabs/useTabsResult.d.ts +3 -3
- package/build/cjs/index.js +412 -437
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/index.d.ts +2 -2
- package/build/esm/components/Avatar/Avatar.js +9 -10
- package/build/esm/components/Avatar/Avatar.js.map +1 -1
- package/build/esm/components/Avatar/AvatarProps.d.ts +2 -2
- package/build/esm/components/Avatar/avatar.styles.js +11 -11
- package/build/esm/components/Avatar/avatar.styles.js.map +1 -1
- package/build/esm/components/Avatar/util/useImageProps.js +9 -8
- package/build/esm/components/Avatar/util/useImageProps.js.map +1 -1
- package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js +2 -3
- package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js.map +1 -1
- package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js +5 -5
- package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js.map +1 -1
- package/build/esm/components/Button/Button.d.ts +1 -1
- package/build/esm/components/Button/Button.js +7 -8
- package/build/esm/components/Button/Button.js.map +1 -1
- package/build/esm/components/Button/ButtonProps.d.ts +1 -1
- package/build/esm/components/Button/ButtonStyles.d.ts +1 -1
- package/build/esm/components/Button/ButtonStyles.js +3 -6
- package/build/esm/components/Button/ButtonStyles.js.map +1 -1
- package/build/esm/components/Checkbox/Checkbox.js +5 -5
- package/build/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/build/esm/components/Chip/Chip.d.ts +1 -1
- package/build/esm/components/Chip/Chip.js +7 -8
- package/build/esm/components/Chip/Chip.js.map +1 -1
- package/build/esm/components/Chip/ChipProps.d.ts +2 -2
- package/build/esm/components/Chip/ChipStyles.js +19 -19
- package/build/esm/components/Chip/ChipStyles.js.map +1 -1
- package/build/esm/components/CollapsibleText/CollapsibleText.js +19 -20
- package/build/esm/components/CollapsibleText/CollapsibleText.js.map +1 -1
- package/build/esm/components/CollapsibleText/CollapsibleTextStyles.d.ts +2 -2
- package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js +5 -6
- package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js.map +1 -1
- package/build/esm/components/Divider/Divider.js +11 -15
- package/build/esm/components/Divider/Divider.js.map +1 -1
- package/build/esm/components/Divider/DividerProps.d.ts +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js +26 -26
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js +6 -6
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js +4 -4
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js +11 -15
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -6
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js +2 -2
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +49 -52
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js +4 -4
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js +3 -3
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js +3 -3
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/context.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/context.js +4 -4
- package/build/esm/components/FollowerAuthenticationDialog/context.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/theme.js +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/theme.js.map +1 -1
- package/build/esm/components/Icon/Icon.js +12 -8
- package/build/esm/components/Icon/Icon.js.map +1 -1
- package/build/esm/components/Icon/IconStyles.d.ts +1 -1
- package/build/esm/components/Icon/IconStyles.js +7 -9
- package/build/esm/components/Icon/IconStyles.js.map +1 -1
- package/build/esm/components/IconButton/IconButton.js +2 -3
- package/build/esm/components/IconButton/IconButton.js.map +1 -1
- package/build/esm/components/IconButton/IconButtonProps.d.ts +1 -1
- package/build/esm/components/Link/Link.js +4 -5
- package/build/esm/components/Link/Link.js.map +1 -1
- package/build/esm/components/Link/LinkStyles.d.ts +1 -1
- package/build/esm/components/Link/LinkStyles.js +8 -8
- package/build/esm/components/Link/LinkStyles.js.map +1 -1
- package/build/esm/components/NumberField/NumberField.d.ts +0 -1
- package/build/esm/components/NumberField/NumberField.js +14 -9
- package/build/esm/components/NumberField/NumberField.js.map +1 -1
- package/build/esm/components/NumberField/NumberFieldStyles.d.ts +1 -1
- package/build/esm/components/NumberField/NumberFieldStyles.js +4 -4
- package/build/esm/components/NumberField/NumberFieldStyles.js.map +1 -1
- package/build/esm/components/Paper/Paper.js +12 -16
- package/build/esm/components/Paper/Paper.js.map +1 -1
- package/build/esm/components/PaperContent/PaperContent.js +2 -2
- package/build/esm/components/PaperContent/PaperContent.js.map +1 -1
- package/build/esm/components/Radio/Radio.js +5 -5
- package/build/esm/components/Radio/Radio.js.map +1 -1
- package/build/esm/components/SplitInput/SplitInput.js +4 -6
- package/build/esm/components/SplitInput/SplitInput.js.map +1 -1
- package/build/esm/components/SplitInput/SplitInputStyles.d.ts +1 -1
- package/build/esm/components/SplitInput/SplitInputStyles.js +4 -4
- package/build/esm/components/SplitInput/SplitInputStyles.js.map +1 -1
- package/build/esm/components/Switch/Switch.js +6 -6
- package/build/esm/components/Switch/Switch.js.map +1 -1
- package/build/esm/components/Switch/switch.styles.js +2 -2
- package/build/esm/components/Switch/switch.styles.js.map +1 -1
- package/build/esm/components/TabPanel/TabPanel.js +2 -2
- package/build/esm/components/TabPanel/TabPanel.js.map +1 -1
- package/build/esm/components/ToggleButton/ToggleButton.js +5 -6
- package/build/esm/components/ToggleButton/ToggleButton.js.map +1 -1
- package/build/esm/components/ToggleButton/ToggleButtonStyles.js +4 -4
- package/build/esm/components/ToggleButton/ToggleButtonStyles.js.map +1 -1
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js +6 -7
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -1
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js +2 -2
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js.map +1 -1
- package/build/esm/components/Tooltip/Tooltip.js +3 -4
- package/build/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/build/esm/components/Tooltip/TooltipProps.d.ts +1 -1
- package/build/esm/components/Tooltip/TooltipStyles.js +5 -8
- package/build/esm/components/Tooltip/TooltipStyles.js.map +1 -1
- package/build/esm/components/Typography/Typography.d.ts +1 -1
- package/build/esm/components/Typography/Typography.js +4 -6
- package/build/esm/components/Typography/Typography.js.map +1 -1
- package/build/esm/components/Typography/TypographyProps.d.ts +3 -3
- package/build/esm/components/Typography/TypographyStyles.d.ts +1 -1
- package/build/esm/components/Typography/TypographyStyles.js +29 -47
- package/build/esm/components/Typography/TypographyStyles.js.map +1 -1
- package/build/esm/hooks/useCollapsibleText.js +7 -7
- package/build/esm/hooks/useCollapsibleText.js.map +1 -1
- package/build/esm/hooks/useTabs/useTabs.js +15 -15
- package/build/esm/hooks/useTabs/useTabs.js.map +1 -1
- package/build/esm/hooks/useTabs/useTabsResult.d.ts +3 -3
- package/build/esm/types/index.d.ts +2 -2
- package/package.json +2 -2
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationAltActions.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Button, Divider, makeStyles } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n main: {\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n gridGap: 16,\n },\n}))\nexport const FollowerAuthenticationAltActions = () => {\n const { state, messages, logos, loading, onActionButtonClick } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n switch (state.value) {\n case 'initial':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n startIcon={logos.facebook}\n onClick={() => {\n onActionButtonClick('sign-in-with-facebook')\n }}\n >\n {messages.continueWithFacebookButtonLabel}\n </Button>\n <Button\n variant=\"outlined\"\n startIcon={logos.google}\n onClick={() => {\n onActionButtonClick('sign-in-with-google')\n }}\n >\n {messages.continueWithGoogleButtonLabel}\n </Button>\n </Box>\n )\n case 'signUp':\n return null\n case 'emailFound':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n onActionButtonClick('sign-in-with-password')\n }}\n >\n {messages.signInWithPassword}\n </Button>\n </Box>\n )\n case 'emailAuthCode':\n return (\n <Box className={classes.main}>\n <Button\n disabled={loading}\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-email', values)\n }}\n >\n {messages.resendAuthCode}\n </Button>\n </Box>\n )\n case 'indirectUserFound':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n onActionButtonClick('use-different-account')\n }}\n >\n {messages.indirectUserFoundCtaButtonLabelAlt}\n </Button>\n </Box>\n )\n case 'emailPasswordSignIn':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-email', values)\n }}\n >\n {messages.emailFoundCtaButtonLabel}\n </Button>\n </Box>\n )\n case 'phoneFound':\n return null\n case 'phoneAuthCode':\n return (\n <Box className={classes.main}>\n <Button\n disabled={loading}\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-sms', values)\n }}\n >\n {messages.resendAuthCode}\n </Button>\n </Box>\n )\n case 'phonePasswordSignIn':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-sms', values)\n }}\n >\n {messages.phoneFoundCtaButtonLabel}\n </Button>\n </Box>\n )\n case 'welcome':\n return (\n <Button\n onClick={() => {\n onActionButtonClick('close')\n }}\n >\n {messages.done}\n </Button>\n )\n default:\n return null\n }\n}\n"],"names":[],"mappings":";;;;AAIA,
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationAltActions.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.tsx"],"sourcesContent":["import React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { Box, Button, Divider, makeStyles } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n main: {\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n gridGap: 16,\n },\n}))\nexport const FollowerAuthenticationAltActions = () => {\n const { state, messages, logos, loading, onActionButtonClick } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n switch (state.value) {\n case 'initial':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n startIcon={logos.facebook}\n onClick={() => {\n onActionButtonClick('sign-in-with-facebook')\n }}\n >\n {messages.continueWithFacebookButtonLabel}\n </Button>\n <Button\n variant=\"outlined\"\n startIcon={logos.google}\n onClick={() => {\n onActionButtonClick('sign-in-with-google')\n }}\n >\n {messages.continueWithGoogleButtonLabel}\n </Button>\n </Box>\n )\n case 'signUp':\n return null\n case 'emailFound':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n onActionButtonClick('sign-in-with-password')\n }}\n >\n {messages.signInWithPassword}\n </Button>\n </Box>\n )\n case 'emailAuthCode':\n return (\n <Box className={classes.main}>\n <Button\n disabled={loading}\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-email', values)\n }}\n >\n {messages.resendAuthCode}\n </Button>\n </Box>\n )\n case 'indirectUserFound':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n onActionButtonClick('use-different-account')\n }}\n >\n {messages.indirectUserFoundCtaButtonLabelAlt}\n </Button>\n </Box>\n )\n case 'emailPasswordSignIn':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-email', values)\n }}\n >\n {messages.emailFoundCtaButtonLabel}\n </Button>\n </Box>\n )\n case 'phoneFound':\n return null\n case 'phoneAuthCode':\n return (\n <Box className={classes.main}>\n <Button\n disabled={loading}\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-sms', values)\n }}\n >\n {messages.resendAuthCode}\n </Button>\n </Box>\n )\n case 'phonePasswordSignIn':\n return (\n <Box className={classes.main}>\n <Divider />\n <Button\n variant=\"outlined\"\n onClick={() => {\n const form = document.querySelector('#follower-authentication-form') as HTMLFormElement\n const formData = new FormData(form)\n const values = Object.fromEntries(formData.entries()) as Record<string, string>\n onActionButtonClick('request-auth-code-sms', values)\n }}\n >\n {messages.phoneFoundCtaButtonLabel}\n </Button>\n </Box>\n )\n case 'welcome':\n return (\n <Button\n onClick={() => {\n onActionButtonClick('close')\n }}\n >\n {messages.done}\n </Button>\n )\n default:\n return null\n }\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { FollowerAuthenticationForm } from './FollowerAuthenticationForm.js';
|
|
3
3
|
import { FollowerAuthenticationAltActions } from './FollowerAuthenticationAltActions.js';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const FollowerAuthenticationBody = () => {
|
|
6
6
|
return (React.createElement(React.Fragment, null,
|
|
7
7
|
React.createElement(FollowerAuthenticationForm, null),
|
|
8
8
|
React.createElement(FollowerAuthenticationAltActions, null)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationBody.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.tsx"],"sourcesContent":["import React from 'react'\nimport { FollowerAuthenticationForm } from './FollowerAuthenticationForm'\nimport { FollowerAuthenticationAltActions } from './FollowerAuthenticationAltActions'\n\nexport const FollowerAuthenticationBody = () => {\n return (\n <React.Fragment>\n <FollowerAuthenticationForm />\n <FollowerAuthenticationAltActions />\n </React.Fragment>\n )\n}\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationBody.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.tsx"],"sourcesContent":["import React from 'react'\nimport { FollowerAuthenticationForm } from './FollowerAuthenticationForm'\nimport { FollowerAuthenticationAltActions } from './FollowerAuthenticationAltActions'\n\nexport const FollowerAuthenticationBody = () => {\n return (\n <React.Fragment>\n <FollowerAuthenticationForm />\n <FollowerAuthenticationAltActions />\n </React.Fragment>\n )\n}\n"],"names":[],"mappings":";;;;AAIO,MAAM,0BAA0B,GAAG,MAAK;AAC7C,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,IAAA;AACb,QAAA,KAAA,CAAA,aAAA,CAAC,0BAA0B,EAAG,IAAA,CAAA;AAC9B,QAAA,KAAA,CAAA,aAAA,CAAC,gCAAgC,EAAA,IAAA,CAAG,CACrB;AAErB;;;;"}
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js
CHANGED
|
@@ -3,17 +3,17 @@ import React from 'react';
|
|
|
3
3
|
import { useFollowerAuthenticationDialogContext } from './context.js';
|
|
4
4
|
import { X } from '@popmenu/web-icons';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const useStyles = makeStyles(() => ({
|
|
7
7
|
root: {
|
|
8
8
|
position: 'absolute',
|
|
9
9
|
top: 0,
|
|
10
10
|
right: 0,
|
|
11
11
|
},
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
}));
|
|
13
|
+
const FollowerAuthenticationCloseButton = () => {
|
|
14
|
+
const { messages, onActionButtonClick } = useFollowerAuthenticationDialogContext();
|
|
15
|
+
const classes = useStyles();
|
|
16
|
+
const handleClose = () => {
|
|
17
17
|
onActionButtonClick('close');
|
|
18
18
|
};
|
|
19
19
|
return (React.createElement(IconButton, { classes: classes, "aria-label": messages.closeButtonLabel, onClick: handleClose },
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationCloseButton.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.tsx"],"sourcesContent":["import { IconButton, makeStyles } from '@material-ui/core'\nimport React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { X as XIcon } from '@popmenu/web-icons'\n\nconst useStyles = makeStyles(() => ({\n root: {\n position: 'absolute',\n top: 0,\n right: 0,\n },\n}))\nexport const FollowerAuthenticationCloseButton = () => {\n const { messages, onActionButtonClick } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n const handleClose = () => {\n onActionButtonClick('close')\n }\n return (\n <IconButton classes={classes} aria-label={messages.closeButtonLabel} onClick={handleClose}>\n <XIcon />\n </IconButton>\n )\n}\n"],"names":["XIcon"],"mappings":";;;;;AAKA,
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationCloseButton.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.tsx"],"sourcesContent":["import { IconButton, makeStyles } from '@material-ui/core'\nimport React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\nimport { X as XIcon } from '@popmenu/web-icons'\n\nconst useStyles = makeStyles(() => ({\n root: {\n position: 'absolute',\n top: 0,\n right: 0,\n },\n}))\nexport const FollowerAuthenticationCloseButton = () => {\n const { messages, onActionButtonClick } = useFollowerAuthenticationDialogContext()\n const classes = useStyles()\n const handleClose = () => {\n onActionButtonClick('close')\n }\n return (\n <IconButton classes={classes} aria-label={messages.closeButtonLabel} onClick={handleClose}>\n <XIcon />\n </IconButton>\n )\n}\n"],"names":["XIcon"],"mappings":";;;;;AAKA,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,KAAK,EAAE,CAAC;AACT,KAAA;AACF,CAAA,CAAC,CAAC;AACI,MAAM,iCAAiC,GAAG,MAAK;IACpD,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,sCAAsC,EAAE;AAClF,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE;IAC3B,MAAM,WAAW,GAAG,MAAK;QACvB,mBAAmB,CAAC,OAAO,CAAC;AAC9B,KAAC;AACD,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAC,OAAO,EAAE,OAAO,EAAc,YAAA,EAAA,QAAQ,CAAC,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAA;AACvF,QAAA,KAAA,CAAA,aAAA,CAACA,CAAK,EAAA,IAAA,CAAG,CACE;AAEjB;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { makeStyles, DialogContent } from '@material-ui/core';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const useStyles = makeStyles(() => ({
|
|
5
5
|
root: {
|
|
6
6
|
display: 'flex',
|
|
7
7
|
flexDirection: 'column',
|
|
8
8
|
alignItems: 'center',
|
|
9
9
|
gridGap: 16,
|
|
10
10
|
},
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
}));
|
|
12
|
+
const FollowerAuthenticationContent = (props) => {
|
|
13
|
+
const classes = useStyles();
|
|
14
14
|
return React.createElement(DialogContent, { classes: classes }, props.children);
|
|
15
15
|
};
|
|
16
16
|
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationContent.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.tsx"],"sourcesContent":["import React from 'react'\nimport { DialogContent, makeStyles } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n gridGap: 16,\n },\n}))\nexport const FollowerAuthenticationContent = (props: { children: React.ReactNode }) => {\n const classes = useStyles()\n return <DialogContent classes={classes}>{props.children}</DialogContent>\n}\n"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationContent.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.tsx"],"sourcesContent":["import React from 'react'\nimport { DialogContent, makeStyles } from '@material-ui/core'\n\nconst useStyles = makeStyles(() => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n gridGap: 16,\n },\n}))\nexport const FollowerAuthenticationContent = (props: { children: React.ReactNode }) => {\n const classes = useStyles()\n return <DialogContent classes={classes}>{props.children}</DialogContent>\n}\n"],"names":[],"mappings":";;;AAGA,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,QAAQ;AACvB,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,OAAO,EAAE,EAAE;AACZ,KAAA;AACF,CAAA,CAAC,CAAC;AACU,MAAA,6BAA6B,GAAG,CAAC,KAAoC,KAAI;AACpF,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE;IAC3B,OAAO,KAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EAAC,OAAO,EAAE,OAAO,EAAA,EAAG,KAAK,CAAC,QAAQ,CAAiB;AAC1E;;;;"}
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import { __rest } from 'tslib';
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { createTheme, useMediaQuery, ThemeProvider, Dialog } from '@material-ui/core';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FollowerAuthenticationDialogContextProvider } from './context.js';
|
|
6
4
|
import { FollowerAuthenticationBody } from './FollowerAuthenticationBody.js';
|
|
5
|
+
import { FollowerAuthenticationCloseButton } from './FollowerAuthenticationCloseButton.js';
|
|
6
|
+
import { FollowerAuthenticationContent } from './FollowerAuthenticationContent.js';
|
|
7
7
|
import { FollowerAuthenticationFooter } from './FollowerAuthenticationFooter.js';
|
|
8
|
-
import {
|
|
9
|
-
import { FollowerAuthenticationTitle } from './FollowerAuthenticationTitle.js';
|
|
8
|
+
import { FollowerAuthenticationGraphic } from './FollowerAuthenticationGraphic.js';
|
|
10
9
|
import { FollowerAuthenticationInfo } from './FollowerAuthenticationInfo.js';
|
|
11
|
-
import {
|
|
10
|
+
import { FollowerAuthenticationTitle } from './FollowerAuthenticationTitle.js';
|
|
12
11
|
import { theme } from './theme.js';
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return breakpoints.down('sm');
|
|
20
|
-
});
|
|
21
|
-
var handleClose = function () {
|
|
13
|
+
const FollowerAuthenticationDialog = (props) => {
|
|
14
|
+
const { open, ...restProps } = props;
|
|
15
|
+
const theme$1 = createTheme(theme);
|
|
16
|
+
const fullScreen = useMediaQuery((theme) => theme.breakpoints.down('sm'));
|
|
17
|
+
const handleClose = () => {
|
|
22
18
|
restProps.onActionButtonClick('close');
|
|
23
19
|
};
|
|
24
20
|
return (React.createElement(ThemeProvider, { theme: theme$1 },
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationDialog.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationDialog.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.tsx"],"sourcesContent":["import { createTheme, Dialog, Theme, ThemeProvider, useMediaQuery } from '@material-ui/core'\nimport React from 'react'\nimport { FollowerAuthenticationDialogContextProvider } from './context'\nimport { FollowerAuthenticationBody } from './FollowerAuthenticationBody'\nimport { FollowerAuthenticationCloseButton } from './FollowerAuthenticationCloseButton'\nimport { FollowerAuthenticationContent } from './FollowerAuthenticationContent'\nimport { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialogProps'\nimport { FollowerAuthenticationFooter } from './FollowerAuthenticationFooter'\nimport { FollowerAuthenticationGraphic } from './FollowerAuthenticationGraphic'\nimport { FollowerAuthenticationInfo } from './FollowerAuthenticationInfo'\nimport { FollowerAuthenticationTitle } from './FollowerAuthenticationTitle'\nimport { theme as themeOptions } from './theme'\n\nexport const FollowerAuthenticationDialog = (props: FollowerAuthenticationDialogProps) => {\n const { open, ...restProps } = props\n const theme = createTheme(themeOptions)\n const fullScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))\n const handleClose = () => {\n restProps.onActionButtonClick('close')\n }\n return (\n <ThemeProvider theme={theme}>\n <FollowerAuthenticationDialogContextProvider value={restProps}>\n <Dialog open={open} fullScreen={fullScreen} onClose={handleClose}>\n <FollowerAuthenticationContent>\n <FollowerAuthenticationCloseButton />\n <FollowerAuthenticationGraphic />\n <FollowerAuthenticationTitle />\n <FollowerAuthenticationInfo />\n <FollowerAuthenticationBody />\n <FollowerAuthenticationFooter />\n </FollowerAuthenticationContent>\n </Dialog>\n </FollowerAuthenticationDialogContextProvider>\n </ThemeProvider>\n )\n}\n"],"names":["theme","themeOptions"],"mappings":";;;;;;;;;;;;AAaa,MAAA,4BAA4B,GAAG,CAAC,KAAwC,KAAI;IACvF,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK;AACpC,IAAA,MAAMA,OAAK,GAAG,WAAW,CAACC,KAAY,CAAC;AACvC,IAAA,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,KAAY,KAAK,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChF,MAAM,WAAW,GAAG,MAAK;AACvB,QAAA,SAAS,CAAC,mBAAmB,CAAC,OAAO,CAAC;AACxC,KAAC;AACD,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,aAAa,EAAC,EAAA,KAAK,EAAED,OAAK,EAAA;AACzB,QAAA,KAAA,CAAA,aAAA,CAAC,2CAA2C,EAAA,EAAC,KAAK,EAAE,SAAS,EAAA;AAC3D,YAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAA;AAC9D,gBAAA,KAAA,CAAA,aAAA,CAAC,6BAA6B,EAAA,IAAA;AAC5B,oBAAA,KAAA,CAAA,aAAA,CAAC,iCAAiC,EAAG,IAAA,CAAA;AACrC,oBAAA,KAAA,CAAA,aAAA,CAAC,6BAA6B,EAAG,IAAA,CAAA;AACjC,oBAAA,KAAA,CAAA,aAAA,CAAC,2BAA2B,EAAG,IAAA,CAAA;AAC/B,oBAAA,KAAA,CAAA,aAAA,CAAC,0BAA0B,EAAG,IAAA,CAAA;AAC9B,oBAAA,KAAA,CAAA,aAAA,CAAC,0BAA0B,EAAG,IAAA,CAAA;AAC9B,oBAAA,KAAA,CAAA,aAAA,CAAC,4BAA4B,EAAG,IAAA,CAAA,CACF,CACzB,CACmC,CAChC;AAEpB;;;;"}
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type FollowerAuthenticationDialogProps = {
|
|
3
3
|
open: boolean;
|
|
4
4
|
state: ReducerState;
|
|
5
5
|
messages: Record<MessageKey, ReactNode> & {
|
|
@@ -11,7 +11,7 @@ export declare type FollowerAuthenticationDialogProps = {
|
|
|
11
11
|
logos: Record<'popmenu' | 'facebook' | 'google', ReactNode>;
|
|
12
12
|
onActionButtonClick: (eventType: ClickEventType, values?: Record<string, string>) => void;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type ReducerState = {
|
|
15
15
|
value: ReducerStateValue;
|
|
16
16
|
context: {
|
|
17
17
|
email?: string;
|
|
@@ -19,10 +19,10 @@ export declare type ReducerState = {
|
|
|
19
19
|
name?: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
|
|
22
|
+
export type ReducerStateValue = 'initial' | 'signUp' | 'emailFound' | 'indirectUserFound' | 'emailAuthCode' | 'emailPasswordSignIn' | 'phoneFound' | 'phoneAuthCode' | 'phonePasswordSignIn' | 'welcome' | 'requirePhone';
|
|
23
|
+
export type ClickEventType = 'submit-form' | 'click-close' | 'code-sent' | 'request-auth-code-email' | 'request-auth-code-sms' | 'close' | 'use-different-account' | 'sign-in-with-password' | 'sign-in-with-facebook' | 'sign-in-with-google';
|
|
24
|
+
export type MessageKey = `${ReducerStateValue}Title` | `${ReducerStateValue}Info` | `${ReducerStateValue}GraphicAlt` | 'requirePhoneInputLabel' | 'requirePhoneCtaButtonLabel' | 'indirectUserFoundLabel' | 'indirectUserFoundCtaButtonLabel' | 'indirectUserFoundCtaButtonLabelAlt' | 'signUpPhoneErrorText' | 'signUpPhoneInputLabel' | 'signUpNameInputLabel' | 'signUpEmailErrorText' | 'signUpEmailInputLabel' | 'signUpLocationErrorText' | 'signUpLocationInputLabel' | 'signUpBirthdaySectionLabel' | 'signUpMonthInputLabel' | 'signUpDayInputLabel' | 'signUp' | 'signUpFinePrint' | 'emailFoundInputLabel' | 'emailFoundCtaButtonLabel' | 'phoneFoundInputLabel' | 'phoneFoundCtaButtonLabel' | 'emailAuthCodeInputLabel' | 'phoneAuthCodeInputLabel' | 'resendAuthCode' | 'or' | 'popmenuLogoAlt' | 'continueWithFacebookButtonLabel' | 'continueWithGoogleButtonLabel' | 'initialCtaButtonLabel' | 'initialInputLabel' | 'passwordInputLabel' | 'poweredBy' | 'done' | 'signIn' | 'signInWithPassword';
|
|
25
|
+
type LocationOption = {
|
|
26
26
|
label: string;
|
|
27
27
|
value: string;
|
|
28
28
|
};
|
|
@@ -2,8 +2,8 @@ import { Box, Typography } from '@material-ui/core';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useFollowerAuthenticationDialogContext } from './context.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const FollowerAuthenticationFooter = () => {
|
|
6
|
+
const { messages, logos } = useFollowerAuthenticationDialogContext();
|
|
7
7
|
return (React.createElement(Box, { display: "flex", gridGap: 8 },
|
|
8
8
|
React.createElement(Typography, { variant: "body2" }, messages.poweredBy),
|
|
9
9
|
logos.popmenu));
|
package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowerAuthenticationFooter.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.tsx"],"sourcesContent":["import { Box, Typography } from '@material-ui/core'\nimport React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\n\nexport const FollowerAuthenticationFooter = () => {\n const { messages, logos } = useFollowerAuthenticationDialogContext()\n return (\n <Box display=\"flex\" gridGap={8}>\n <Typography variant=\"body2\">{messages.poweredBy}</Typography>\n {logos.popmenu}\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"FollowerAuthenticationFooter.js","sources":["../../../../src/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.tsx"],"sourcesContent":["import { Box, Typography } from '@material-ui/core'\nimport React from 'react'\nimport { useFollowerAuthenticationDialogContext } from './context'\n\nexport const FollowerAuthenticationFooter = () => {\n const { messages, logos } = useFollowerAuthenticationDialogContext()\n return (\n <Box display=\"flex\" gridGap={8}>\n <Typography variant=\"body2\">{messages.poweredBy}</Typography>\n {logos.popmenu}\n </Box>\n )\n}\n"],"names":[],"mappings":";;;;AAIO,MAAM,4BAA4B,GAAG,MAAK;IAC/C,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,sCAAsC,EAAE;IACpE,QACE,KAAC,CAAA,aAAA,CAAA,GAAG,EAAC,EAAA,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,CAAC,EAAA;QAC5B,KAAC,CAAA,aAAA,CAAA,UAAU,IAAC,OAAO,EAAC,OAAO,EAAE,EAAA,QAAQ,CAAC,SAAS,CAAc;AAC5D,QAAA,KAAK,CAAC,OAAO,CACV;AAEV;;;;"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { __assign } from 'tslib';
|
|
2
1
|
import React, { useRef, useState, useEffect } from 'react';
|
|
3
2
|
import { useFollowerAuthenticationDialogContext } from './context.js';
|
|
4
3
|
import { makeStyles, TextField, Button, MenuItem, Typography } from '@material-ui/core';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
const useStyles = makeStyles(() => ({
|
|
7
6
|
form: {
|
|
8
7
|
display: 'flex',
|
|
9
8
|
flexDirection: 'column',
|
|
@@ -11,38 +10,37 @@ var useStyles = makeStyles(function () { return ({
|
|
|
11
10
|
width: '100%',
|
|
12
11
|
gridGap: 16,
|
|
13
12
|
},
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
}));
|
|
14
|
+
const northAmericanPhoneRegex = /^(\()?[2-9]{1}\d{2}(\))?[-\s.]?[2-9]{1}\d{2}[-\s.]?\d{4}$/;
|
|
15
|
+
const ukPhoneRegex = /^((\+?44\s?|0044\s?)(\s?\d{3,5}|\(\d{3,5}\))(\s?\d{3,4})(\s?\d{3,4})$|^07\d{9}$)/;
|
|
16
|
+
const validatePhoneNumber = (phone) => {
|
|
18
17
|
if (!phone)
|
|
19
18
|
return false;
|
|
20
19
|
return northAmericanPhoneRegex.test(phone) || ukPhoneRegex.test(phone);
|
|
21
20
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const FollowerAuthenticationForm = () => {
|
|
22
|
+
const { state, messages, locationOptions, onActionButtonClick, loading } = useFollowerAuthenticationDialogContext();
|
|
23
|
+
const classes = useStyles();
|
|
25
24
|
// sign-up form state
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var fieldValue = e.target.value;
|
|
25
|
+
const formRef = useRef(null);
|
|
26
|
+
const [formValidity, setFormValidity] = useState(false);
|
|
27
|
+
const [showPhoneErrorText, setShowPhoneErrorText] = useState();
|
|
28
|
+
const [showEmailErrorText, setShowEmailErrorText] = useState();
|
|
29
|
+
const [showLocationErrorText, setShowLocationErrorText] = useState();
|
|
30
|
+
const [signUpPhoneValue, setSignUpPhoneValue] = useState(state.context.phone || '');
|
|
31
|
+
const [signUpEmailValue, setSignUpEmailValue] = useState(state.context.email || '');
|
|
32
|
+
const checkFieldValidity = (e) => {
|
|
33
|
+
const fieldName = e.target.name;
|
|
34
|
+
const fieldValue = e.target.value;
|
|
37
35
|
switch (fieldName) {
|
|
38
36
|
case 'phone':
|
|
39
|
-
|
|
37
|
+
const isPhoneValid = validatePhoneNumber(fieldValue);
|
|
40
38
|
setSignUpPhoneValue(fieldValue);
|
|
41
39
|
setShowPhoneErrorText(!isPhoneValid && fieldValue.length > 0);
|
|
42
40
|
break;
|
|
43
41
|
case 'email':
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
const emailField = formRef.current?.elements.namedItem(fieldName);
|
|
43
|
+
const isEmailValid = emailField?.validity.valid ?? false;
|
|
46
44
|
setSignUpEmailValue(fieldValue);
|
|
47
45
|
setShowEmailErrorText(!isEmailValid && fieldValue.length > 0);
|
|
48
46
|
break;
|
|
@@ -51,52 +49,51 @@ var FollowerAuthenticationForm = function () {
|
|
|
51
49
|
break;
|
|
52
50
|
}
|
|
53
51
|
};
|
|
54
|
-
useEffect(
|
|
52
|
+
useEffect(() => {
|
|
55
53
|
setSignUpPhoneValue(state.context.phone || '');
|
|
56
54
|
setSignUpEmailValue(state.context.email || '');
|
|
57
55
|
}, [state.context.phone, state.context.email]);
|
|
58
|
-
useEffect(
|
|
59
|
-
var _a, _b, _c;
|
|
56
|
+
useEffect(() => {
|
|
60
57
|
// Validate pre-filled values (only in signUp state)
|
|
61
58
|
if (state.value === 'signUp') {
|
|
62
59
|
if (signUpPhoneValue) {
|
|
63
|
-
|
|
60
|
+
const isPhoneValid = validatePhoneNumber(signUpPhoneValue);
|
|
64
61
|
setShowPhoneErrorText(!isPhoneValid);
|
|
65
62
|
}
|
|
66
63
|
if (signUpEmailValue) {
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
const emailField = formRef.current?.elements.namedItem('email');
|
|
65
|
+
const isEmailValid = emailField?.validity.valid ?? false;
|
|
69
66
|
setShowEmailErrorText(!isEmailValid);
|
|
70
67
|
}
|
|
71
68
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
const hasValidPhone = Boolean(signUpPhoneValue) && !showPhoneErrorText;
|
|
70
|
+
const hasValidEmail = Boolean(signUpEmailValue) && !showEmailErrorText;
|
|
71
|
+
const locationField = formRef.current?.elements.namedItem('location');
|
|
72
|
+
const hasValidLocation = locationField ? Boolean(locationField.value) : true;
|
|
73
|
+
const hasValidContact = hasValidPhone || hasValidEmail;
|
|
77
74
|
setFormValidity(hasValidContact && hasValidLocation);
|
|
78
75
|
}, [state.value, signUpPhoneValue, signUpEmailValue, showPhoneErrorText, showEmailErrorText, showLocationErrorText]);
|
|
79
|
-
|
|
76
|
+
const handleSubmit = (e) => {
|
|
80
77
|
e.preventDefault();
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
const form = e.target;
|
|
79
|
+
const formData = new FormData(form);
|
|
80
|
+
const values = Object.fromEntries(formData.entries());
|
|
84
81
|
onActionButtonClick('submit-form', values);
|
|
85
82
|
};
|
|
86
|
-
|
|
83
|
+
const formProps = {
|
|
87
84
|
id: 'follower-authentication-form',
|
|
88
85
|
className: classes.form,
|
|
89
86
|
onSubmit: handleSubmit,
|
|
90
87
|
};
|
|
91
88
|
switch (state.value) {
|
|
92
89
|
case 'initial':
|
|
93
|
-
return (React.createElement("form",
|
|
90
|
+
return (React.createElement("form", { ...formProps },
|
|
94
91
|
React.createElement(TextField, { disabled: loading, label: messages.initialInputLabel, key: "identifier-input", id: "identifier-input", name: "identifier" }),
|
|
95
92
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.initialCtaButtonLabel)));
|
|
96
93
|
case 'signUp':
|
|
97
|
-
return (React.createElement("form",
|
|
94
|
+
return (React.createElement("form", { ref: formRef, ...formProps, onInvalid: (e) => {
|
|
98
95
|
e.preventDefault();
|
|
99
|
-
} }
|
|
96
|
+
} },
|
|
100
97
|
React.createElement(TextField, { disabled: loading, label: messages.signUpPhoneInputLabel, key: "phone-input", id: "phone-input", name: "phone", onChange: checkFieldValidity, error: showPhoneErrorText, helperText: showPhoneErrorText && messages.signUpPhoneErrorText, inputProps: {
|
|
101
98
|
required: signUpEmailValue ? false : true,
|
|
102
99
|
}, defaultValue: state.context.phone }),
|
|
@@ -105,27 +102,27 @@ var FollowerAuthenticationForm = function () {
|
|
|
105
102
|
required: signUpPhoneValue ? false : true,
|
|
106
103
|
type: 'email',
|
|
107
104
|
}, defaultValue: state.context.email }),
|
|
108
|
-
React.createElement(TextField, { disabled: loading, select: true, onChange: checkFieldValidity, label: messages.signUpLocationInputLabel, error: showLocationErrorText, helperText: showLocationErrorText && messages.signUpLocationErrorText, key: "location-input", id: "location-input", inputProps: { required: true }, name: "location" }, locationOptions.map(
|
|
105
|
+
React.createElement(TextField, { disabled: loading, select: true, onChange: checkFieldValidity, label: messages.signUpLocationInputLabel, error: showLocationErrorText, helperText: showLocationErrorText && messages.signUpLocationErrorText, key: "location-input", 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)))),
|
|
109
106
|
React.createElement(Typography, { style: { alignSelf: 'start' } }, messages.signUpBirthdaySectionLabel),
|
|
110
107
|
React.createElement(TextField, { disabled: loading, label: messages.signUpMonthInputLabel, key: "birthday-month-input", id: "birthday-month-input", name: "birthdayMonth" }),
|
|
111
108
|
React.createElement(TextField, { disabled: loading, label: messages.signUpDayInputLabel, key: "birthday-date-input", id: "birthday-date-input", name: "birthdayDate" }),
|
|
112
109
|
React.createElement(Button, { disabled: loading || !formValidity, type: "submit" }, messages.signUp)));
|
|
113
110
|
case 'emailFound':
|
|
114
|
-
return (React.createElement("form",
|
|
111
|
+
return (React.createElement("form", { ...formProps },
|
|
115
112
|
React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email }),
|
|
116
113
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.emailFoundCtaButtonLabel)));
|
|
117
114
|
case 'emailAuthCode':
|
|
118
|
-
return (React.createElement("form",
|
|
115
|
+
return (React.createElement("form", { ...formProps },
|
|
119
116
|
React.createElement(TextField, { disabled: loading, label: messages.emailAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code" }),
|
|
120
117
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
|
|
121
118
|
case 'indirectUserFound': {
|
|
122
119
|
if (state.context.email) {
|
|
123
|
-
return (React.createElement("form",
|
|
120
|
+
return (React.createElement("form", { ...formProps },
|
|
124
121
|
React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email }),
|
|
125
122
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
|
|
126
123
|
}
|
|
127
124
|
else if (state.context.phone) {
|
|
128
|
-
return (React.createElement("form",
|
|
125
|
+
return (React.createElement("form", { ...formProps },
|
|
129
126
|
React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
|
|
130
127
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.indirectUserFoundCtaButtonLabel)));
|
|
131
128
|
}
|
|
@@ -133,25 +130,25 @@ var FollowerAuthenticationForm = function () {
|
|
|
133
130
|
return null;
|
|
134
131
|
}
|
|
135
132
|
case 'emailPasswordSignIn':
|
|
136
|
-
return (React.createElement("form",
|
|
133
|
+
return (React.createElement("form", { ...formProps },
|
|
137
134
|
React.createElement(TextField, { disabled: loading, label: messages.emailFoundInputLabel, key: "email-input", id: "email-input", name: "email", value: state.context.email, InputLabelProps: { shrink: true } }),
|
|
138
135
|
React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel, key: "password-input", id: "password-input", name: "password", inputProps: { type: 'password' } }),
|
|
139
136
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
|
|
140
137
|
case 'phoneFound':
|
|
141
|
-
return (React.createElement("form",
|
|
138
|
+
return (React.createElement("form", { ...formProps },
|
|
142
139
|
React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
|
|
143
140
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.phoneFoundCtaButtonLabel)));
|
|
144
141
|
case 'phoneAuthCode':
|
|
145
|
-
return (React.createElement("form",
|
|
142
|
+
return (React.createElement("form", { ...formProps },
|
|
146
143
|
React.createElement(TextField, { disabled: loading, label: messages.phoneAuthCodeInputLabel, key: "code-input", id: "code-input", name: "code", autoComplete: "one-time-code" }),
|
|
147
144
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
|
|
148
145
|
case 'phonePasswordSignIn':
|
|
149
|
-
return (React.createElement("form",
|
|
146
|
+
return (React.createElement("form", { ...formProps },
|
|
150
147
|
React.createElement(TextField, { disabled: loading, label: messages.phoneFoundInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone, InputLabelProps: { shrink: true } }),
|
|
151
148
|
React.createElement(TextField, { disabled: loading, label: messages.passwordInputLabel, key: "password-input", id: "password-input", name: "password", inputProps: { type: 'password' } }),
|
|
152
149
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.signIn)));
|
|
153
150
|
case 'requirePhone':
|
|
154
|
-
return (React.createElement("form",
|
|
151
|
+
return (React.createElement("form", { ...formProps },
|
|
155
152
|
React.createElement(TextField, { disabled: loading, label: messages.requirePhoneInputLabel, key: "phone-input", id: "phone-input", name: "phone", value: state.context.phone }),
|
|
156
153
|
React.createElement(Button, { disabled: loading, type: "submit" }, messages.requirePhoneCtaButtonLabel)));
|
|
157
154
|
case 'welcome':
|