@blaze-cms/react-page-builder 0.125.0-auth-updates.5 → 0.125.0-core-styles.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/CHANGELOG.md +2 -30
  2. package/README.md +1 -2
  3. package/lib/components/Card/Card.js +22 -31
  4. package/lib/components/Card/Card.js.map +1 -1
  5. package/lib/components/Card/CardContainer.js +1 -2
  6. package/lib/components/Card/CardContainer.js.map +1 -1
  7. package/lib/components/List/components/Cards/CardsRender.js.map +1 -1
  8. package/lib/components/List/components/Cards/CardsRenderItem.js +1 -2
  9. package/lib/components/List/components/Cards/CardsRenderItem.js.map +1 -1
  10. package/lib/components/Login/LoggedInMessage.js +28 -0
  11. package/lib/components/Login/LoggedInMessage.js.map +1 -0
  12. package/lib/components/Login/Login.js +135 -0
  13. package/lib/components/Login/Login.js.map +1 -0
  14. package/lib/components/Login/LoginForm.js +112 -0
  15. package/lib/components/Login/LoginForm.js.map +1 -0
  16. package/lib/components/Login/helpers/check-gtm-children.js +42 -0
  17. package/lib/components/Login/helpers/check-gtm-children.js.map +1 -0
  18. package/lib/components/Login/helpers/get-url-to-use.js +18 -0
  19. package/lib/components/Login/helpers/get-url-to-use.js.map +1 -0
  20. package/lib/components/Login/helpers/index.js +22 -0
  21. package/lib/components/Login/helpers/index.js.map +1 -0
  22. package/lib/components/Login/index.js +12 -0
  23. package/lib/components/Login/index.js.map +1 -0
  24. package/lib/components/PasswordReset/PasswordReset.js +172 -0
  25. package/lib/components/PasswordReset/PasswordReset.js.map +1 -0
  26. package/lib/components/PasswordReset/helpers/index.js +15 -0
  27. package/lib/components/PasswordReset/helpers/index.js.map +1 -0
  28. package/lib/components/PasswordReset/helpers/validatePassword.js +16 -0
  29. package/lib/components/PasswordReset/helpers/validatePassword.js.map +1 -0
  30. package/lib/components/PasswordReset/index.js +12 -0
  31. package/lib/components/PasswordReset/index.js.map +1 -0
  32. package/lib/components/PasswordResetRequest/PasswordResetRequest.js +114 -0
  33. package/lib/components/PasswordResetRequest/PasswordResetRequest.js.map +1 -0
  34. package/lib/components/PasswordResetRequest/index.js +12 -0
  35. package/lib/components/PasswordResetRequest/index.js.map +1 -0
  36. package/lib/components/index.js +15 -0
  37. package/lib/components/index.js.map +1 -1
  38. package/lib/constants/index.js +14 -2
  39. package/lib/constants/index.js.map +1 -1
  40. package/lib/index.js +0 -6
  41. package/lib/index.js.map +1 -1
  42. package/lib-es/components/Card/Card.js +5 -15
  43. package/lib-es/components/Card/Card.js.map +1 -1
  44. package/lib-es/components/Card/CardContainer.js +1 -2
  45. package/lib-es/components/Card/CardContainer.js.map +1 -1
  46. package/lib-es/components/List/components/Cards/CardsRender.js.map +1 -1
  47. package/lib-es/components/List/components/Cards/CardsRenderItem.js +1 -2
  48. package/lib-es/components/List/components/Cards/CardsRenderItem.js.map +1 -1
  49. package/lib-es/components/Login/LoggedInMessage.js +18 -0
  50. package/lib-es/components/Login/LoggedInMessage.js.map +1 -0
  51. package/lib-es/components/Login/Login.js +83 -0
  52. package/lib-es/components/Login/Login.js.map +1 -0
  53. package/lib-es/components/Login/LoginForm.js +89 -0
  54. package/lib-es/components/Login/LoginForm.js.map +1 -0
  55. package/lib-es/components/Login/helpers/check-gtm-children.js +35 -0
  56. package/lib-es/components/Login/helpers/check-gtm-children.js.map +1 -0
  57. package/lib-es/components/Login/helpers/get-url-to-use.js +10 -0
  58. package/lib-es/components/Login/helpers/get-url-to-use.js.map +1 -0
  59. package/lib-es/components/Login/helpers/index.js +4 -0
  60. package/lib-es/components/Login/helpers/index.js.map +1 -0
  61. package/lib-es/components/Login/index.js +3 -0
  62. package/lib-es/components/Login/index.js.map +1 -0
  63. package/lib-es/components/PasswordReset/PasswordReset.js +144 -0
  64. package/lib-es/components/PasswordReset/PasswordReset.js.map +1 -0
  65. package/lib-es/components/PasswordReset/helpers/index.js +3 -0
  66. package/lib-es/components/PasswordReset/helpers/index.js.map +1 -0
  67. package/lib-es/components/PasswordReset/helpers/validatePassword.js +7 -0
  68. package/lib-es/components/PasswordReset/helpers/validatePassword.js.map +1 -0
  69. package/lib-es/components/PasswordReset/index.js +3 -0
  70. package/lib-es/components/PasswordReset/index.js.map +1 -0
  71. package/lib-es/components/PasswordResetRequest/PasswordResetRequest.js +92 -0
  72. package/lib-es/components/PasswordResetRequest/PasswordResetRequest.js.map +1 -0
  73. package/lib-es/components/PasswordResetRequest/index.js +3 -0
  74. package/lib-es/components/PasswordResetRequest/index.js.map +1 -0
  75. package/lib-es/components/index.js +3 -0
  76. package/lib-es/components/index.js.map +1 -1
  77. package/lib-es/constants/index.js +7 -1
  78. package/lib-es/constants/index.js.map +1 -1
  79. package/lib-es/index.js +1 -1
  80. package/lib-es/index.js.map +1 -1
  81. package/package.json +7 -7
  82. package/src/components/Card/Card.js +3 -13
  83. package/src/components/Card/CardContainer.js +1 -2
  84. package/src/components/List/components/Cards/CardsRender.js +0 -1
  85. package/src/components/List/components/Cards/CardsRenderItem.js +1 -2
  86. package/src/components/Login/LoggedInMessage.js +24 -0
  87. package/src/components/Login/Login.js +74 -0
  88. package/src/components/Login/LoginForm.js +81 -0
  89. package/src/components/Login/helpers/check-gtm-children.js +30 -0
  90. package/src/components/Login/helpers/get-url-to-use.js +6 -0
  91. package/src/components/Login/helpers/index.js +4 -0
  92. package/src/components/Login/index.js +3 -0
  93. package/src/components/PasswordReset/PasswordReset.js +120 -0
  94. package/src/components/PasswordReset/helpers/index.js +3 -0
  95. package/src/components/PasswordReset/helpers/validatePassword.js +8 -0
  96. package/src/components/PasswordReset/index.js +3 -0
  97. package/src/components/PasswordResetRequest/PasswordResetRequest.js +82 -0
  98. package/src/components/PasswordResetRequest/index.js +3 -0
  99. package/src/components/index.js +7 -1
  100. package/src/constants/index.js +13 -0
  101. package/src/index.js +1 -1
  102. package/tests/unit/src/components/Card/Card.test.js +7 -18
  103. package/tests/unit/src/components/Card/__snapshots__/Card.test.js.snap +0 -5
  104. package/tests/unit/src/components/Login/Login.test.js +36 -0
  105. package/tests/unit/src/components/Login/__snapshots__/Login.test.js.snap +103 -0
  106. package/tests/unit/src/components/Login/helpers/check-gtm-children.test.js +60 -0
  107. package/tests/unit/src/components/Login/helpers/get-url-to-use.test.js +15 -0
  108. package/tests/unit/src/components/PasswordReset/PasswordReset.test.js +85 -0
  109. package/tests/unit/src/components/PasswordReset/__snapshots__/PasswordReset.test.js.snap +83 -0
  110. package/tests/unit/src/components/PasswordReset/helpers/validatePassword.test.js +21 -0
  111. package/tests/unit/src/components/PasswordResetRequest/PasswordResetRequest.test.js +79 -0
  112. package/tests/unit/src/components/PasswordResetRequest/__snapshots__/PasswordResetRequest.test.js.snap +39 -0
  113. package/tests/unit/src/components/__snapshots__/index.test.js.snap +12 -0
@@ -0,0 +1,83 @@
1
+ import React, { useState } from 'react';
2
+ import { handleLogin, checkIfLoggedIn, LOGIN_MUTATION } from '@blaze-cms/core-auth-ui';
3
+ import PropTypes from 'prop-types';
4
+ import { useMutation } from '@apollo/client';
5
+ import { useRouter } from 'next/router';
6
+ import { parseUrl } from 'query-string';
7
+ import LoggedInMessage from './LoggedInMessage';
8
+ import LoginForm from './LoginForm';
9
+ import { checkGtmChildren, getUrlToUse } from './helpers';
10
+ import { GRAPH_QL_ERROR } from '../../constants';
11
+ function shouldShowAlreadyLoggedInMessage(called) {
12
+ const {
13
+ isLoggedIn
14
+ } = checkIfLoggedIn();
15
+ return !called && isLoggedIn;
16
+ }
17
+ const Login = ({
18
+ modifier,
19
+ url,
20
+ children
21
+ }) => {
22
+ const router = useRouter();
23
+ const {
24
+ asPath
25
+ } = router;
26
+ const {
27
+ query: {
28
+ redirectUrl
29
+ } = {}
30
+ } = parseUrl(asPath);
31
+ const [isLoginDone, setIsLoginDone] = useState(false);
32
+ const [errorMessageToDisplay, setErrorMessage] = useState(null);
33
+ const urlToUse = getUrlToUse({
34
+ redirectUrl,
35
+ url,
36
+ asPath
37
+ });
38
+ const goToUrl = reload => {
39
+ urlToUse === asPath && reload ? router.reload() : router.push('/Resolver', urlToUse);
40
+ };
41
+ const [hasOnSuccessChildren, updatedChildren] = checkGtmChildren(children, goToUrl);
42
+ const [loginMutation, {
43
+ client,
44
+ called
45
+ }] = useMutation(LOGIN_MUTATION, {
46
+ update: (cache, {
47
+ data
48
+ }) => afterLogin(data),
49
+ onError: ({
50
+ message
51
+ }) => {
52
+ const parsedMessage = message.replace(GRAPH_QL_ERROR, '');
53
+ setErrorMessage(parsedMessage);
54
+ }
55
+ });
56
+ const afterLogin = async data => {
57
+ if (!(await handleLogin(data, client))) return;
58
+ if (!hasOnSuccessChildren) goToUrl();
59
+ setIsLoginDone(true);
60
+ };
61
+ const showAlreadyLoggedInMessage = shouldShowAlreadyLoggedInMessage(called);
62
+ const shouldRenderForm = !showAlreadyLoggedInMessage && !isLoginDone;
63
+ return /*#__PURE__*/React.createElement(React.Fragment, null, showAlreadyLoggedInMessage && /*#__PURE__*/React.createElement(LoggedInMessage, {
64
+ goToUrl: goToUrl,
65
+ urlToUse: urlToUse
66
+ }), shouldRenderForm && /*#__PURE__*/React.createElement(LoginForm, {
67
+ errorMessageToDisplay: errorMessageToDisplay,
68
+ loginMutation: loginMutation,
69
+ modifier: modifier
70
+ }), isLoginDone && updatedChildren);
71
+ };
72
+ Login.propTypes = {
73
+ modifier: PropTypes.string,
74
+ url: PropTypes.string,
75
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
76
+ };
77
+ Login.defaultProps = {
78
+ modifier: '',
79
+ url: '',
80
+ children: null
81
+ };
82
+ export default Login;
83
+ //# sourceMappingURL=Login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Login.js","names":["React","useState","handleLogin","checkIfLoggedIn","LOGIN_MUTATION","PropTypes","useMutation","useRouter","parseUrl","LoggedInMessage","LoginForm","checkGtmChildren","getUrlToUse","GRAPH_QL_ERROR","shouldShowAlreadyLoggedInMessage","called","isLoggedIn","Login","modifier","url","children","router","asPath","query","redirectUrl","isLoginDone","setIsLoginDone","errorMessageToDisplay","setErrorMessage","urlToUse","goToUrl","reload","push","hasOnSuccessChildren","updatedChildren","loginMutation","client","update","cache","data","afterLogin","onError","message","parsedMessage","replace","showAlreadyLoggedInMessage","shouldRenderForm","propTypes","string","oneOfType","arrayOf","node","defaultProps"],"sources":["../../../src/components/Login/Login.js"],"sourcesContent":["import React, { useState } from 'react';\nimport { handleLogin, checkIfLoggedIn, LOGIN_MUTATION } from '@blaze-cms/core-auth-ui';\nimport PropTypes from 'prop-types';\nimport { useMutation } from '@apollo/client';\nimport { useRouter } from 'next/router';\nimport { parseUrl } from 'query-string';\nimport LoggedInMessage from './LoggedInMessage';\nimport LoginForm from './LoginForm';\nimport { checkGtmChildren, getUrlToUse } from './helpers';\nimport { GRAPH_QL_ERROR } from '../../constants';\n\nfunction shouldShowAlreadyLoggedInMessage(called) {\n const { isLoggedIn } = checkIfLoggedIn();\n return !called && isLoggedIn;\n}\n\nconst Login = ({ modifier, url, children }) => {\n const router = useRouter();\n const { asPath } = router;\n const { query: { redirectUrl } = {} } = parseUrl(asPath);\n\n const [isLoginDone, setIsLoginDone] = useState(false);\n const [errorMessageToDisplay, setErrorMessage] = useState(null);\n const urlToUse = getUrlToUse({ redirectUrl, url, asPath });\n const goToUrl = reload => {\n urlToUse === asPath && reload ? router.reload() : router.push('/Resolver', urlToUse);\n };\n const [hasOnSuccessChildren, updatedChildren] = checkGtmChildren(children, goToUrl);\n\n const [loginMutation, { client, called }] = useMutation(LOGIN_MUTATION, {\n update: (cache, { data }) => afterLogin(data),\n onError: ({ message }) => {\n const parsedMessage = message.replace(GRAPH_QL_ERROR, '');\n setErrorMessage(parsedMessage);\n }\n });\n\n const afterLogin = async data => {\n if (!(await handleLogin(data, client))) return;\n if (!hasOnSuccessChildren) goToUrl();\n setIsLoginDone(true);\n };\n\n const showAlreadyLoggedInMessage = shouldShowAlreadyLoggedInMessage(called);\n const shouldRenderForm = !showAlreadyLoggedInMessage && !isLoginDone;\n\n return (\n <>\n {showAlreadyLoggedInMessage && <LoggedInMessage goToUrl={goToUrl} urlToUse={urlToUse} />}\n {shouldRenderForm && (\n <LoginForm\n errorMessageToDisplay={errorMessageToDisplay}\n loginMutation={loginMutation}\n modifier={modifier}\n />\n )}\n {isLoginDone && updatedChildren}\n </>\n );\n};\n\nLogin.propTypes = {\n modifier: PropTypes.string,\n url: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nLogin.defaultProps = {\n modifier: '',\n url: '',\n children: null\n};\n\nexport default Login;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,WAAW,EAAEC,eAAe,EAAEC,cAAc,QAAQ,yBAAyB;AACtF,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,QAAQ,QAAQ,cAAc;AACvC,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,SAAS,MAAM,aAAa;AACnC,SAASC,gBAAgB,EAAEC,WAAW,QAAQ,WAAW;AACzD,SAASC,cAAc,QAAQ,iBAAiB;AAEhD,SAASC,gCAAgC,CAACC,MAAM,EAAE;EAChD,MAAM;IAAEC;EAAW,CAAC,GAAGb,eAAe,EAAE;EACxC,OAAO,CAACY,MAAM,IAAIC,UAAU;AAC9B;AAEA,MAAMC,KAAK,GAAG,CAAC;EAAEC,QAAQ;EAAEC,GAAG;EAAEC;AAAS,CAAC,KAAK;EAC7C,MAAMC,MAAM,GAAGd,SAAS,EAAE;EAC1B,MAAM;IAAEe;EAAO,CAAC,GAAGD,MAAM;EACzB,MAAM;IAAEE,KAAK,EAAE;MAAEC;IAAY,CAAC,GAAG,CAAC;EAAE,CAAC,GAAGhB,QAAQ,CAACc,MAAM,CAAC;EAExD,MAAM,CAACG,WAAW,EAAEC,cAAc,CAAC,GAAGzB,QAAQ,CAAC,KAAK,C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Ef,OAAQ;IAAC,QAAQ,EAAED;EAAS,EAAG,EACvFiB,gBAAgB,iBACf,oBAAC,SAAS;IACR,qBAAqB,EAAEnB,qBAAsB;IAC7C,aAAa,EAAEQ,aAAc;IAC7B,QAAQ,EAAEjB;EAAS,EAEtB,EACAO,WAAW,IAAIS,eAAe,CAC9B;AAEP,CAAC;AAEDjB,KAAK,CAAC8B,SAAS,GAAG;EAChB7B,QAAQ,EAAEb,SAAS,CAAC2C,MAAM;EAC1B7B,GAAG,EAAEd,SAAS,CAAC2C,MAAM;EACrB5B,QAAQ,EAAEf,SAAS,CAAC4C,SAAS,CAAC,CAAC5C,SAAS,CAAC6C,OAAO,CAAC7C,SAAS,CAAC8C,IAAI,CAAC,EAAE9C,SAAS,CAAC8C,IAAI,CAAC;AACnF,CAAC;AAEDlC,KAAK,CAACmC,YAAY,GAAG;EACnBlC,QAAQ,EAAE,EAAE;EACZC,GAAG,EAAE,EAAE;EACPC,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeH,KAAK"}
@@ -0,0 +1,89 @@
1
+ import React, { useState } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Input from '@blaze-react/input';
4
+ import Button from '@blaze-react/button';
5
+ import { Checkbox } from '@blaze-react/checkboxes';
6
+ import { EMAIL, PASSWORD, LOGIN_FORM } from '../../constants';
7
+ const LoginForm = ({
8
+ errorMessageToDisplay,
9
+ loginMutation,
10
+ modifier
11
+ }) => {
12
+ const [email, setEmail] = useState('');
13
+ const [password, setPassword] = useState('');
14
+ const [rememberMe, setRememberMe] = useState(false);
15
+ const handleChange = ({
16
+ event
17
+ }) => {
18
+ const {
19
+ target: {
20
+ name: iName,
21
+ value: iValue
22
+ }
23
+ } = event;
24
+ if (iName === EMAIL) setEmail(iValue);
25
+ if (iName === PASSWORD) setPassword(iValue);
26
+ };
27
+ const isDisabled = !email || !password;
28
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("form", {
29
+ id: LOGIN_FORM,
30
+ className: modifier,
31
+ onSubmit: e => {
32
+ e.preventDefault();
33
+ if (isDisabled) return;
34
+ loginMutation({
35
+ variables: {
36
+ input: {
37
+ identity: email,
38
+ password,
39
+ rememberMe
40
+ }
41
+ }
42
+ });
43
+ }
44
+ }, /*#__PURE__*/React.createElement(Input, {
45
+ key: "email",
46
+ type: "email",
47
+ name: "email",
48
+ placeholder: "example@email.com",
49
+ label: "Email",
50
+ required: true,
51
+ onChange: handleChange,
52
+ value: email
53
+ }), /*#__PURE__*/React.createElement(Input, {
54
+ key: "password",
55
+ type: "password",
56
+ name: "password",
57
+ label: "Password",
58
+ required: true,
59
+ onChange: handleChange,
60
+ value: password
61
+ }), /*#__PURE__*/React.createElement(Checkbox, {
62
+ checked: rememberMe,
63
+ label: "Remember Me",
64
+ name: "rememberme",
65
+ id: "remember-me",
66
+ onChange: ({
67
+ value: {
68
+ checked
69
+ }
70
+ }) => setRememberMe(checked)
71
+ }), !!errorMessageToDisplay && /*#__PURE__*/React.createElement("div", {
72
+ className: "error_message"
73
+ }, errorMessageToDisplay)), /*#__PURE__*/React.createElement(Button, {
74
+ type: "submit",
75
+ name: "button",
76
+ form: LOGIN_FORM,
77
+ disabled: isDisabled
78
+ }, "Login"));
79
+ };
80
+ LoginForm.propTypes = {
81
+ errorMessageToDisplay: PropTypes.string,
82
+ modifier: PropTypes.string.isRequired,
83
+ loginMutation: PropTypes.func.isRequired
84
+ };
85
+ LoginForm.defaultProps = {
86
+ errorMessageToDisplay: PropTypes.string.isRequired
87
+ };
88
+ export default LoginForm;
89
+ //# sourceMappingURL=LoginForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoginForm.js","names":["React","useState","PropTypes","Input","Button","Checkbox","EMAIL","PASSWORD","LOGIN_FORM","LoginForm","errorMessageToDisplay","loginMutation","modifier","email","setEmail","password","setPassword","rememberMe","setRememberMe","handleChange","event","target","name","iName","value","iValue","isDisabled","e","preventDefault","variables","input","identity","checked","propTypes","string","isRequired","func","defaultProps"],"sources":["../../../src/components/Login/LoginForm.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from '@blaze-react/input';\nimport Button from '@blaze-react/button';\nimport { Checkbox } from '@blaze-react/checkboxes';\nimport { EMAIL, PASSWORD, LOGIN_FORM } from '../../constants';\n\nconst LoginForm = ({ errorMessageToDisplay, loginMutation, modifier }) => {\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [rememberMe, setRememberMe] = useState(false);\n\n const handleChange = ({ event }) => {\n const {\n target: { name: iName, value: iValue }\n } = event;\n\n if (iName === EMAIL) setEmail(iValue);\n if (iName === PASSWORD) setPassword(iValue);\n };\n\n const isDisabled = !email || !password;\n\n return (\n <>\n <form\n id={LOGIN_FORM}\n className={modifier}\n onSubmit={e => {\n e.preventDefault();\n if (isDisabled) return;\n loginMutation({\n variables: { input: { identity: email, password, rememberMe } }\n });\n }}>\n <Input\n key=\"email\"\n type=\"email\"\n name=\"email\"\n placeholder=\"example@email.com\"\n label=\"Email\"\n required\n onChange={handleChange}\n value={email}\n />\n <Input\n key=\"password\"\n type=\"password\"\n name=\"password\"\n label=\"Password\"\n required\n onChange={handleChange}\n value={password}\n />\n <Checkbox\n checked={rememberMe}\n label=\"Remember Me\"\n name=\"rememberme\"\n id=\"remember-me\"\n onChange={({ value: { checked } }) => setRememberMe(checked)}\n />\n {!!errorMessageToDisplay && <div className=\"error_message\">{errorMessageToDisplay}</div>}\n </form>\n <Button type=\"submit\" name=\"button\" form={LOGIN_FORM} disabled={isDisabled}>\n Login\n </Button>\n </>\n );\n};\n\nLoginForm.propTypes = {\n errorMessageToDisplay: PropTypes.string,\n modifier: PropTypes.string.isRequired,\n loginMutation: PropTypes.func.isRequired\n};\n\nLoginForm.defaultProps = {\n errorMessageToDisplay: PropTypes.string.isRequired\n};\n\nexport default LoginForm;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAA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Z,IAAI,EAAC,OAAO;IACZ,WAAW,EAAC,mBAAmB;IAC/B,KAAK,EAAC,OAAO;IACb,QAAQ;IACR,QAAQ,EAAEE,YAAa;IACvB,KAAK,EAAEN;EAAM,EACb,eACF,oBAAC,KAAK;IACJ,GAAG,EAAC,UAAU;IACd,IAAI,EAAC,UAAU;IACf,IAAI,EAAC,UAAU;IACf,KAAK,EAAC,UAAU;IAChB,QAAQ;IACR,QAAQ,EAAEM,YAAa;IACvB,KAAK,EAAEJ;EAAS,EAChB,eACF,oBAAC,QAAQ;IACP,OAAO,EAAEE,UAAW;IACpB,KAAK,EAAC,aAAa;IACnB,IAAI,EAAC,YAAY;IACjB,EAAE,EAAC,aAAa;IAChB,QAAQ,EAAE,CAAC;MAAEO,KAAK,EAAE;QAAEQ;MAAQ;IAAE,CAAC,KAAKd,aAAa,CAACc,OAAO;EAAE,EAC7D,EACD,CAAC,CAACtB,qBAAqB,iBAAI;IAAK,SAAS,EAAC;EAAe,GAAEA,qBAAqB,CAAO,CACnF,eACP,oBAAC,MAAM;IAAC,IAAI,EAAC,QAAQ;IAAC,IAAI,EAAC,QAAQ;IAAC,IAAI,EAAEF,UAAW;IAAC,QAAQ,EAAEkB;EAAW,WAElE,CACR;AAEP,CAAC;AAEDjB,SAAS,CAACwB,SAAS,GAAG;EACpBvB,qBAAqB,EAAER,SAAS,CAACgC,MAAM;EACvCtB,QAAQ,EAAEV,SAAS,CAACgC,MAAM,CAACC,UAAU;EACrCxB,aAAa,EAAET,SAAS,CAACkC,IAAI,CAACD;AAChC,CAAC;AAED1B,SAAS,CAAC4B,YAAY,GAAG;EACvB3B,qBAAqB,EAAER,SAAS,CAACgC,MAAM,CAACC;AAC1C,CAAC;AAED,eAAe1B,SAAS"}
@@ -0,0 +1,35 @@
1
+ const checkGtmChildren = (children, handleOnSuccess) => {
2
+ let hasOnSuccessChildren = false;
3
+ if (!children || Array.isArray(children)) return [hasOnSuccessChildren, children];
4
+ const {
5
+ props: {
6
+ children: [, allChildren]
7
+ }
8
+ } = children;
9
+ if (allChildren && allChildren.length) {
10
+ allChildren.forEach(({
11
+ props
12
+ }) => {
13
+ let {
14
+ component: {
15
+ settings: {
16
+ gtmEvents
17
+ }
18
+ } = {}
19
+ } = props;
20
+ if (gtmEvents) {
21
+ gtmEvents = gtmEvents.map(gtmEvent => {
22
+ const updatedEvent = gtmEvent;
23
+ if (gtmEvent.eventTrigger === 'onSuccess') {
24
+ updatedEvent.handleOnSuccess = handleOnSuccess;
25
+ hasOnSuccessChildren = true;
26
+ }
27
+ return updatedEvent;
28
+ });
29
+ }
30
+ });
31
+ }
32
+ return [hasOnSuccessChildren, children];
33
+ };
34
+ export default checkGtmChildren;
35
+ //# sourceMappingURL=check-gtm-children.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-gtm-children.js","names":["checkGtmChildren","children","handleOnSuccess","hasOnSuccessChildren","Array","isArray","props","allChildren","length","forEach","component","settings","gtmEvents","map","gtmEvent","updatedEvent","eventTrigger"],"sources":["../../../../src/components/Login/helpers/check-gtm-children.js"],"sourcesContent":["const checkGtmChildren = (children, handleOnSuccess) => {\n let hasOnSuccessChildren = false;\n if (!children || Array.isArray(children)) return [hasOnSuccessChildren, children];\n const {\n props: {\n children: [, allChildren]\n }\n } = children;\n\n if (allChildren && allChildren.length) {\n allChildren.forEach(({ props }) => {\n let { component: { settings: { gtmEvents } } = {} } = props;\n if (gtmEvents) {\n gtmEvents = gtmEvents.map(gtmEvent => {\n const updatedEvent = gtmEvent;\n if (gtmEvent.eventTrigger === 'onSuccess') {\n updatedEvent.handleOnSuccess = handleOnSuccess;\n hasOnSuccessChildren = true;\n }\n\n return updatedEvent;\n });\n }\n });\n }\n\n return [hasOnSuccessChildren, children];\n};\n\nexport default checkGtmChildren;\n"],"mappings":"AAAA,MAAMA,gBAAgB,GAAG,CAACC,QAAQ,EAAEC,eAAe,KAAK;EACtD,IAAIC,oBAAoB,GAAG,KAAK;EAChC,IAAI,CAACF,QAAQ,IAAIG,KAAK,CAACC,OAAO,CAACJ,QAAQ,CAAC,EAAE,OAAO,CAACE,oBAAoB,EAAEF,QAAQ,CAAC;EACjF,MAAM;IACJK,KAAK,EAAE;MACLL,QAAQ,EAAE,GAAGM,WAAW;IAC1B;EACF,CAAC,GAAGN,QAAQ;EAEZ,IAAIM,WAAW,IAAIA,WAAW,CAACC,MAAM,EAAE;IACrCD,WAAW,CAACE,OAAO,CAAC,CAAC;MAAEH;IAAM,CAAC,KAAK;MACjC,IAAI;QAAEI,SAAS,EAAE;UAAEC,QAAQ,EAAE;YAAEC;UAAU;QAAE,CAAC,GAAG,CAAC;MAAE,CAAC,GAAGN,KAAK;MAC3D,IAAIM,SAAS,EAAE;QACbA,SAAS,GAAGA,SAAS,CAACC,GAAG,CAACC,QAAQ,IAAI;UACpC,MAAMC,YAAY,GAAGD,QAAQ;UAC7B,IAAIA,QAAQ,CAACE,YAAY,KAAK,WAAW,EAAE;YACzCD,YAAY,CAACb,eAAe,GAAGA,eAAe;YAC9CC,oBAAoB,GAAG,IAAI;UAC7B;UAEA,OAAOY,YAAY;QACrB,CAAC,CAAC;MACJ;IACF,CAAC,CAAC;EACJ;EAEA,OAAO,CAACZ,oBAAoB,EAAEF,QAAQ,CAAC;AACzC,CAAC;AAED,eAAeD,gBAAgB"}
@@ -0,0 +1,10 @@
1
+ const getUrlToUse = ({
2
+ redirectUrl,
3
+ url,
4
+ asPath
5
+ }) => {
6
+ const singleRedirectUrl = Array.isArray(redirectUrl) ? redirectUrl[0] : redirectUrl;
7
+ return singleRedirectUrl || url || asPath;
8
+ };
9
+ export default getUrlToUse;
10
+ //# sourceMappingURL=get-url-to-use.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-url-to-use.js","names":["getUrlToUse","redirectUrl","url","asPath","singleRedirectUrl","Array","isArray"],"sources":["../../../../src/components/Login/helpers/get-url-to-use.js"],"sourcesContent":["const getUrlToUse = ({ redirectUrl, url, asPath }) => {\n const singleRedirectUrl = Array.isArray(redirectUrl) ? redirectUrl[0] : redirectUrl;\n return singleRedirectUrl || url || asPath;\n};\n\nexport default getUrlToUse;\n"],"mappings":"AAAA,MAAMA,WAAW,GAAG,CAAC;EAAEC,WAAW;EAAEC,GAAG;EAAEC;AAAO,CAAC,KAAK;EACpD,MAAMC,iBAAiB,GAAGC,KAAK,CAACC,OAAO,CAACL,WAAW,CAAC,GAAGA,WAAW,CAAC,CAAC,CAAC,GAAGA,WAAW;EACnF,OAAOG,iBAAiB,IAAIF,GAAG,IAAIC,MAAM;AAC3C,CAAC;AAED,eAAeH,WAAW"}
@@ -0,0 +1,4 @@
1
+ import getUrlToUse from './get-url-to-use';
2
+ import checkGtmChildren from './check-gtm-children';
3
+ export { getUrlToUse, checkGtmChildren };
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["getUrlToUse","checkGtmChildren"],"sources":["../../../../src/components/Login/helpers/index.js"],"sourcesContent":["import getUrlToUse from './get-url-to-use';\nimport checkGtmChildren from './check-gtm-children';\n\nexport { getUrlToUse, checkGtmChildren };\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,kBAAkB;AAC1C,OAAOC,gBAAgB,MAAM,sBAAsB;AAEnD,SAASD,WAAW,EAAEC,gBAAgB"}
@@ -0,0 +1,3 @@
1
+ import Login from './Login';
2
+ export default Login;
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Login"],"sources":["../../../src/components/Login/index.js"],"sourcesContent":["import Login from './Login';\n\nexport default Login;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,SAAS;AAE3B,eAAeA,KAAK"}
@@ -0,0 +1,144 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ import React, { useState } from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import Input from '@blaze-react/input';
7
+ import Button from '@blaze-react/button';
8
+ import { useMutation } from '@apollo/client';
9
+ import { useRouter } from 'next/router';
10
+ import { parseUrl } from 'query-string';
11
+ import { RESET_USER_PASSWORD_MUTATION } from '@blaze-cms/core-auth-ui';
12
+ import { validatePassword } from './helpers';
13
+ import { withTitle } from '../../HOC';
14
+ import { GRAPH_QL_ERROR, PASSWORD_CONFIRM_MESSAGE, PASSWORD_VALIDATION_MESSAGE } from '../../constants';
15
+ import { hasChildren } from '../../helpers';
16
+ const PasswordReset = ({
17
+ children,
18
+ modifier
19
+ }) => {
20
+ const router = useRouter();
21
+ const {
22
+ asPath
23
+ } = router;
24
+ const {
25
+ query: {
26
+ token
27
+ } = {}
28
+ } = parseUrl(asPath);
29
+ const [displayChildren, setShouldDisplayChildren] = useState(false);
30
+ const [formValues, setFormValues] = useState({
31
+ password: '',
32
+ passwordConfirm: ''
33
+ });
34
+ const [validationErrors, setValidationErrors] = useState([]);
35
+ const [errorMessageToDisplay, setErrorMessage] = useState(null);
36
+ const {
37
+ password,
38
+ passwordConfirm
39
+ } = formValues;
40
+ const [passwordResetMutation] = useMutation(RESET_USER_PASSWORD_MUTATION, {
41
+ onCompleted: ({
42
+ resetUserPasswordResult
43
+ }) => {
44
+ const {
45
+ result: {
46
+ extras
47
+ }
48
+ } = resetUserPasswordResult || {};
49
+ const {
50
+ redirectUrl
51
+ } = extras || {};
52
+ setShouldDisplayChildren(true);
53
+ setErrorMessage(null);
54
+ setValidationErrors([false, false]);
55
+ if (redirectUrl) {
56
+ router.push(`/Resolver`, `${asPath}&redirectUrl=${redirectUrl}`, {
57
+ shallow: true
58
+ });
59
+ }
60
+ },
61
+ onError: ({
62
+ message
63
+ }) => {
64
+ const parsedMessage = message.replace(GRAPH_QL_ERROR, '');
65
+ setErrorMessage(parsedMessage);
66
+ }
67
+ });
68
+ const handleChange = ({
69
+ event
70
+ }) => {
71
+ const {
72
+ target: {
73
+ name: iName,
74
+ value: iValue
75
+ }
76
+ } = event;
77
+ if (iName === 'password') setFormValues(_objectSpread(_objectSpread({}, formValues), {}, {
78
+ password: iValue
79
+ }));
80
+ if (iName === 'passwordConfirm') setFormValues(_objectSpread(_objectSpread({}, formValues), {}, {
81
+ passwordConfirm: iValue
82
+ }));
83
+ };
84
+ const handleSubmit = e => {
85
+ e.preventDefault();
86
+ const isPasswordValid = validatePassword(password);
87
+ if (!isPasswordValid) return setValidationErrors([true, false]);
88
+ if (password !== passwordConfirm) return setValidationErrors([false, true]);
89
+ passwordResetMutation({
90
+ variables: {
91
+ input: {
92
+ token,
93
+ password
94
+ }
95
+ }
96
+ });
97
+ };
98
+ const isDisabled = !passwordConfirm || !password;
99
+ const shouldDisplayChildren = displayChildren && hasChildren(children);
100
+ if (!token) return null;
101
+ return /*#__PURE__*/React.createElement("div", {
102
+ className: modifier
103
+ }, !displayChildren && /*#__PURE__*/React.createElement("form", {
104
+ id: "passwordReset",
105
+ onSubmit: handleSubmit
106
+ }, /*#__PURE__*/React.createElement(Input, {
107
+ id: "password",
108
+ type: "password",
109
+ name: "password",
110
+ label: "Password",
111
+ required: true,
112
+ error: validationErrors[0],
113
+ validationMessage: PASSWORD_VALIDATION_MESSAGE,
114
+ onChange: handleChange,
115
+ value: password
116
+ }), /*#__PURE__*/React.createElement(Input, {
117
+ id: "passwordConfirm",
118
+ type: "password",
119
+ name: "passwordConfirm",
120
+ label: "Confirm New Password",
121
+ required: true,
122
+ error: validationErrors[1],
123
+ validationMessage: PASSWORD_CONFIRM_MESSAGE,
124
+ onChange: handleChange,
125
+ value: passwordConfirm
126
+ })), !displayChildren && /*#__PURE__*/React.createElement(Button, {
127
+ type: "submit",
128
+ name: "button",
129
+ form: "passwordReset",
130
+ disabled: isDisabled
131
+ }, "Reset Password"), !!errorMessageToDisplay && /*#__PURE__*/React.createElement("div", {
132
+ className: "error_message"
133
+ }, errorMessageToDisplay), shouldDisplayChildren && /*#__PURE__*/React.createElement("div", null, children));
134
+ };
135
+ PasswordReset.propTypes = {
136
+ modifier: PropTypes.string,
137
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
138
+ };
139
+ PasswordReset.defaultProps = {
140
+ modifier: '',
141
+ children: null
142
+ };
143
+ export default withTitle(PasswordReset);
144
+ //# sourceMappingURL=PasswordReset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordReset.js","names":["React","useState","PropTypes","Input","Button","useMutation","useRouter","parseUrl","RESET_USER_PASSWORD_MUTATION","validatePassword","withTitle","GRAPH_QL_ERROR","PASSWORD_CONFIRM_MESSAGE","PASSWORD_VALIDATION_MESSAGE","hasChildren","PasswordReset","children","modifier","router","asPath","query","token","displayChildren","setShouldDisplayChildren","formValues","setFormValues","password","passwordConfirm","validationErrors","setValidationErrors","errorMessageToDisplay","setErrorMessage","passwordResetMutation","onCompleted","resetUserPasswordResult","result","extras","redirectUrl","push","shallow","onError","message","parsedMessage","replace","handleChange","event","target","name","iName","value","iValue","handleSubmit","e","preventDefault","isPasswordValid","variables","input","isDisabled","shouldDisplayChildren","propTypes","string","oneOfType","arrayOf","node","defaultProps"],"sources":["../../../src/components/PasswordReset/PasswordReset.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from '@blaze-react/input';\nimport Button from '@blaze-react/button';\nimport { useMutation } from '@apollo/client';\nimport { useRouter } from 'next/router';\nimport { parseUrl } from 'query-string';\nimport { RESET_USER_PASSWORD_MUTATION } from '@blaze-cms/core-auth-ui';\nimport { validatePassword } from './helpers';\nimport { withTitle } from '../../HOC';\nimport {\n GRAPH_QL_ERROR,\n PASSWORD_CONFIRM_MESSAGE,\n PASSWORD_VALIDATION_MESSAGE\n} from '../../constants';\nimport { hasChildren } from '../../helpers';\n\nconst PasswordReset = ({ children, modifier }) => {\n const router = useRouter();\n const { asPath } = router;\n const { query: { token } = {} } = parseUrl(asPath);\n const [displayChildren, setShouldDisplayChildren] = useState(false);\n const [formValues, setFormValues] = useState({ password: '', passwordConfirm: '' });\n const [validationErrors, setValidationErrors] = useState([]);\n const [errorMessageToDisplay, setErrorMessage] = useState(null);\n const { password, passwordConfirm } = formValues;\n\n const [passwordResetMutation] = useMutation(RESET_USER_PASSWORD_MUTATION, {\n onCompleted: ({ resetUserPasswordResult }) => {\n const {\n result: { extras }\n } =\n resetUserPasswordResult || {};\n const { redirectUrl } = extras || {};\n setShouldDisplayChildren(true);\n setErrorMessage(null);\n setValidationErrors([false, false]);\n if (redirectUrl) {\n router.push(`/Resolver`, `${asPath}&redirectUrl=${redirectUrl}`, { shallow: true });\n }\n },\n onError: ({ message }) => {\n const parsedMessage = message.replace(GRAPH_QL_ERROR, '');\n setErrorMessage(parsedMessage);\n }\n });\n\n const handleChange = ({ event }) => {\n const {\n target: { name: iName, value: iValue }\n } = event;\n\n if (iName === 'password') setFormValues({ ...formValues, password: iValue });\n if (iName === 'passwordConfirm') setFormValues({ ...formValues, passwordConfirm: iValue });\n };\n\n const handleSubmit = e => {\n e.preventDefault();\n const isPasswordValid = validatePassword(password);\n if (!isPasswordValid) return setValidationErrors([true, false]);\n if (password !== passwordConfirm) return setValidationErrors([false, true]);\n passwordResetMutation({\n variables: { input: { token, password } }\n });\n };\n\n const isDisabled = !passwordConfirm || !password;\n const shouldDisplayChildren = displayChildren && hasChildren(children);\n if (!token) return null;\n\n return (\n <div className={modifier}>\n {!displayChildren && (\n <form id=\"passwordReset\" onSubmit={handleSubmit}>\n <Input\n id=\"password\"\n type=\"password\"\n name=\"password\"\n label=\"Password\"\n required\n error={validationErrors[0]}\n validationMessage={PASSWORD_VALIDATION_MESSAGE}\n onChange={handleChange}\n value={password}\n />\n <Input\n id=\"passwordConfirm\"\n type=\"password\"\n name=\"passwordConfirm\"\n label=\"Confirm New Password\"\n required\n error={validationErrors[1]}\n validationMessage={PASSWORD_CONFIRM_MESSAGE}\n onChange={handleChange}\n value={passwordConfirm}\n />\n </form>\n )}\n {!displayChildren && (\n <Button type=\"submit\" name=\"button\" form=\"passwordReset\" disabled={isDisabled}>\n Reset Password\n </Button>\n )}\n {!!errorMessageToDisplay && <div className=\"error_message\">{errorMessageToDisplay}</div>}\n {shouldDisplayChildren && <div>{children}</div>}\n </div>\n );\n};\n\nPasswordReset.propTypes = {\n modifier: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nPasswordReset.defaultProps = {\n modifier: '',\n children: null\n};\n\nexport default withTitle(PasswordReset);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,oBAAoB;AACtC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,4BAA4B,QAAQ,yBAAyB;AACtE,SAASC,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,SAAS,QAAQ,WAAW;AACrC,SACEC,cAAc,EACdC,wBAAwB,EACxBC,2BAA2B,QACtB,iBAAiB;AACxB,SAASC,WAAW,QAAQ,eAAe;AAE3C,MAAMC,aAAa,GAAG,CAAC;EAAEC,QAAQ;EAAEC;AAAS,CAAC,KAAK;EAChD,MAAMC,MAAM,GAAGZ,SAAS,EAAE;EAC1B,MAAM;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# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["validatePassword"],"sources":["../../../../src/components/PasswordReset/helpers/index.js"],"sourcesContent":["import validatePassword from './validatePassword';\n\nexport { validatePassword };\n"],"mappings":"AAAA,OAAOA,gBAAgB,MAAM,oBAAoB;AAEjD,SAASA,gBAAgB"}
@@ -0,0 +1,7 @@
1
+ import { PASSWORD_REGEX } from '../../../constants';
2
+ const validatePassword = password => {
3
+ if (!password) return false;
4
+ return PASSWORD_REGEX.test(password);
5
+ };
6
+ export default validatePassword;
7
+ //# sourceMappingURL=validatePassword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatePassword.js","names":["PASSWORD_REGEX","validatePassword","password","test"],"sources":["../../../../src/components/PasswordReset/helpers/validatePassword.js"],"sourcesContent":["import { PASSWORD_REGEX } from '../../../constants';\n\nconst validatePassword = password => {\n if (!password) return false;\n return PASSWORD_REGEX.test(password);\n};\n\nexport default validatePassword;\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,oBAAoB;AAEnD,MAAMC,gBAAgB,GAAGC,QAAQ,IAAI;EACnC,IAAI,CAACA,QAAQ,EAAE,OAAO,KAAK;EAC3B,OAAOF,cAAc,CAACG,IAAI,CAACD,QAAQ,CAAC;AACtC,CAAC;AAED,eAAeD,gBAAgB"}
@@ -0,0 +1,3 @@
1
+ import PasswordReset from './PasswordReset';
2
+ export default PasswordReset;
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["PasswordReset"],"sources":["../../../src/components/PasswordReset/index.js"],"sourcesContent":["import PasswordReset from './PasswordReset';\n\nexport default PasswordReset;\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAE3C,eAAeA,aAAa"}
@@ -0,0 +1,92 @@
1
+ import React, { useState } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Input from '@blaze-react/input';
4
+ import Button from '@blaze-react/button';
5
+ import { useMutation } from '@apollo/client';
6
+ import { useRouter } from 'next/router';
7
+ import { checkIfLoggedIn, REQUEST_USER_PASSWORD_RESET_MUTATION } from '@blaze-cms/core-auth-ui';
8
+ import { GRAPH_QL_ERROR } from '../../constants';
9
+ import { hasChildren } from '../../helpers';
10
+ const PasswordResetRequest = ({
11
+ children,
12
+ modifier
13
+ }) => {
14
+ const {
15
+ id: userId
16
+ } = checkIfLoggedIn();
17
+ const router = useRouter();
18
+ const {
19
+ asPath
20
+ } = router;
21
+ const [displayChildren, setShouldDisplayChildren] = useState(false);
22
+ const [errorMessageToDisplay, setErrorMessage] = useState(null);
23
+ const [email, setEmail] = useState('');
24
+ const [requestUserPasswordResetMutation] = useMutation(REQUEST_USER_PASSWORD_RESET_MUTATION, {
25
+ onCompleted: () => {
26
+ setShouldDisplayChildren(true);
27
+ setErrorMessage(null);
28
+ },
29
+ onError: ({
30
+ message
31
+ }) => {
32
+ const parsedMessage = message.replace(GRAPH_QL_ERROR, '');
33
+ setErrorMessage(parsedMessage);
34
+ }
35
+ });
36
+ const isDisabled = !email;
37
+ const displayValidChildren = displayChildren && hasChildren(children);
38
+ return /*#__PURE__*/React.createElement("div", {
39
+ className: modifier
40
+ }, !displayChildren && /*#__PURE__*/React.createElement("form", {
41
+ id: "passwordResetRequest",
42
+ onSubmit: e => {
43
+ e.preventDefault();
44
+ if (isDisabled) return;
45
+ requestUserPasswordResetMutation({
46
+ variables: {
47
+ input: {
48
+ email,
49
+ userId,
50
+ extras: {
51
+ redirectUrl: asPath
52
+ }
53
+ }
54
+ }
55
+ });
56
+ }
57
+ }, /*#__PURE__*/React.createElement(Input, {
58
+ key: "email",
59
+ type: "email",
60
+ name: "email",
61
+ label: "Email",
62
+ required: true,
63
+ onChange: ({
64
+ event
65
+ }) => {
66
+ const {
67
+ target: {
68
+ value
69
+ }
70
+ } = event;
71
+ setEmail(value);
72
+ },
73
+ value: email
74
+ })), !displayChildren && /*#__PURE__*/React.createElement(Button, {
75
+ type: "submit",
76
+ name: "button",
77
+ form: "passwordResetRequest",
78
+ disabled: isDisabled
79
+ }, "Request Password Reset"), !!errorMessageToDisplay && /*#__PURE__*/React.createElement("div", {
80
+ className: "error_message"
81
+ }, errorMessageToDisplay), displayValidChildren && /*#__PURE__*/React.createElement("div", null, children));
82
+ };
83
+ PasswordResetRequest.propTypes = {
84
+ modifier: PropTypes.string,
85
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
86
+ };
87
+ PasswordResetRequest.defaultProps = {
88
+ modifier: '',
89
+ children: null
90
+ };
91
+ export default PasswordResetRequest;
92
+ //# sourceMappingURL=PasswordResetRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordResetRequest.js","names":["React","useState","PropTypes","Input","Button","useMutation","useRouter","checkIfLoggedIn","REQUEST_USER_PASSWORD_RESET_MUTATION","GRAPH_QL_ERROR","hasChildren","PasswordResetRequest","children","modifier","id","userId","router","asPath","displayChildren","setShouldDisplayChildren","errorMessageToDisplay","setErrorMessage","email","setEmail","requestUserPasswordResetMutation","onCompleted","onError","message","parsedMessage","replace","isDisabled","displayValidChildren","e","preventDefault","variables","input","extras","redirectUrl","event","target","value","propTypes","string","oneOfType","arrayOf","node","defaultProps"],"sources":["../../../src/components/PasswordResetRequest/PasswordResetRequest.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from '@blaze-react/input';\nimport Button from '@blaze-react/button';\nimport { useMutation } from '@apollo/client';\nimport { useRouter } from 'next/router';\nimport { checkIfLoggedIn, REQUEST_USER_PASSWORD_RESET_MUTATION } from '@blaze-cms/core-auth-ui';\nimport { GRAPH_QL_ERROR } from '../../constants';\nimport { hasChildren } from '../../helpers';\n\nconst PasswordResetRequest = ({ children, modifier }) => {\n const { id: userId } = checkIfLoggedIn();\n const router = useRouter();\n const { asPath } = router;\n const [displayChildren, setShouldDisplayChildren] = useState(false);\n const [errorMessageToDisplay, setErrorMessage] = useState(null);\n const [email, setEmail] = useState('');\n\n const [requestUserPasswordResetMutation] = useMutation(REQUEST_USER_PASSWORD_RESET_MUTATION, {\n onCompleted: () => {\n setShouldDisplayChildren(true);\n setErrorMessage(null);\n },\n onError: ({ message }) => {\n const parsedMessage = message.replace(GRAPH_QL_ERROR, '');\n setErrorMessage(parsedMessage);\n }\n });\n\n const isDisabled = !email;\n const displayValidChildren = displayChildren && hasChildren(children);\n\n return (\n <div className={modifier}>\n {!displayChildren && (\n <form\n id=\"passwordResetRequest\"\n onSubmit={e => {\n e.preventDefault();\n if (isDisabled) return;\n requestUserPasswordResetMutation({\n variables: { input: { email, userId, extras: { redirectUrl: asPath } } }\n });\n }}>\n <Input\n key=\"email\"\n type=\"email\"\n name=\"email\"\n label=\"Email\"\n required\n onChange={({ event }) => {\n const {\n target: { value }\n } = event;\n setEmail(value);\n }}\n value={email}\n />\n </form>\n )}\n {!displayChildren && (\n <Button type=\"submit\" name=\"button\" form=\"passwordResetRequest\" disabled={isDisabled}>\n Request Password Reset\n </Button>\n )}\n {!!errorMessageToDisplay && <div className=\"error_message\">{errorMessageToDisplay}</div>}\n {displayValidChildren && <div>{children}</div>}\n </div>\n );\n};\n\nPasswordResetRequest.propTypes = {\n modifier: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nPasswordResetRequest.defaultProps = {\n modifier: '',\n children: null\n};\n\nexport default PasswordResetRequest;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,oBAAoB;AACtC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,eAAe,EAAEC,oCAAoC,QAAQ,yBAAyB;AAC/F,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,WAAW,QAAQ,eAAe;AAE3C,MA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AE;MACzE,CAAC,CAAC;IACJ;EAAE,gBACF,oBAAC,KAAK;IACJ,GAAG,EAAC,OAAO;IACX,IAAI,EAAC,OAAO;IACZ,IAAI,EAAC,OAAO;IACZ,KAAK,EAAC,OAAO;IACb,QAAQ;IACR,QAAQ,EAAE,CAAC;MAAEqB;IAAM,CAAC,KAAK;MACvB,MAAM;QACJC,MAAM,EAAE;UAAEC;QAAM;MAClB,CAAC,GAAGF,KAAK;MACTf,QAAQ,CAACiB,KAAK,CAAC;IACjB,CAAE;IACF,KAAK,EAAElB;EAAM,EACb,CAEL,EACA,CAACJ,eAAe,iBACf,oBAAC,MAAM;IAAC,IAAI,EAAC,QAAQ;IAAC,IAAI,EAAC,QAAQ;IAAC,IAAI,EAAC,sBAAsB;IAAC,QAAQ,EAAEY;EAAW,4BAGtF,EACA,CAAC,CAACV,qBAAqB,iBAAI;IAAK,SAAS,EAAC;EAAe,GAAEA,qBAAqB,CAAO,EACvFW,oBAAoB,iBAAI,iCAAMnB,QAAQ,CAAO,CAC1C;AAEV,CAAC;AAEDD,oBAAoB,CAAC8B,SAAS,GAAG;EAC/B5B,QAAQ,EAAEX,SAAS,CAACwC,MAAM;EAC1B9B,QAAQ,EAAEV,SAAS,CAACyC,SAAS,CAAC,CAACzC,SAAS,CAAC0C,OAAO,CAAC1C,SAAS,CAAC2C,IAAI,CAAC,EAAE3C,SAAS,CAAC2C,IAAI,CAAC;AACnF,CAAC;AAEDlC,oBAAoB,CAACmC,YAAY,GAAG;EAClCjC,QAAQ,EAAE,EAAE;EACZD,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeD,oBAAoB"}
@@ -0,0 +1,3 @@
1
+ import PasswordResetRequest from './PasswordResetRequest';
2
+ export default PasswordResetRequest;
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["PasswordResetRequest"],"sources":["../../../src/components/PasswordResetRequest/index.js"],"sourcesContent":["import PasswordResetRequest from './PasswordResetRequest';\n\nexport default PasswordResetRequest;\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,wBAAwB;AAEzD,eAAeA,oBAAoB"}
@@ -19,10 +19,13 @@ export default {
19
19
  searchfiltersort: dynamic(() => import( /* webpackChunkName: "blazePbSearchFilteSort" */'./SearchFilterSort')),
20
20
  modal: dynamic(() => import( /* webpackChunkName: "blazePbModal" */'./Modal')),
21
21
  code: dynamic(() => import( /* webpackChunkName: "blazePbCode" */'./Code')),
22
+ login: dynamic(() => import( /* webpackChunkName: "blazePbLogin" */'./Login')),
22
23
  menu: dynamic(() => import( /* webpackChunkName: "blazePbMenu" */'./Menu')),
23
24
  menuitem: dynamic(() => import( /* webpackChunkName: "blazePbMenuItem" */'./MenuItem')),
24
25
  submenu: dynamic(() => import( /* webpackChunkName: "blazePbSubMenu" */'./SubMenu')),
25
26
  emailconfirm: dynamic(() => import( /* webpackChunkName: "blazePbEmailConfirm" */'./EmailConfirm')),
27
+ passwordreset: dynamic(() => import( /* webpackChunkName: "blazePbPasswordReset" */'./PasswordReset')),
28
+ passwordresetrequest: dynamic(() => import( /* webpackChunkName: "blazePbPasswordResetRequest" */'./PasswordResetRequest')),
26
29
  breadcrumb: dynamic(() => import( /* webpackChunkName: "blazePbBreadcrumb" */'./Breadcrumb')),
27
30
  itemlistbutton: dynamic(() => import( /* webpackChunkName: "blazePbItemListButton" */'./ItemList/ItemListButton')),
28
31
  itemlistcounter: dynamic(() => import( /* webpackChunkName: "blazePbItemListCounter" */'./ItemList/ItemListCounter')),