@mx-cartographer/experiences 9.3.1 → 9.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/core/api/SettingsApi.d.ts +4 -0
- package/dist/core/api/SettingsApi.es.js +5 -4
- package/dist/core/api/SettingsApi.es.js.map +1 -1
- package/dist/core/constants/ApiEndpoints.d.ts +1 -0
- package/dist/core/constants/ApiEndpoints.es.js +1 -0
- package/dist/core/constants/ApiEndpoints.es.js.map +1 -1
- package/dist/core/stores/SettingsStore.d.ts +4 -0
- package/dist/core/stores/SettingsStore.es.js +80 -73
- package/dist/core/stores/SettingsStore.es.js.map +1 -1
- package/dist/core/types/localization/SettingsCopy.d.ts +6 -0
- package/dist/core/utils/TransactionUtils.es.js +31 -30
- package/dist/core/utils/TransactionUtils.es.js.map +1 -1
- package/dist/dashboard/Greeting.es.js +18 -19
- package/dist/dashboard/Greeting.es.js.map +1 -1
- package/dist/settings/components/profile/ProfileTab.d.ts +1 -1
- package/dist/settings/components/profile/ProfileTab.es.js +115 -108
- package/dist/settings/components/profile/ProfileTab.es.js.map +1 -1
- package/dist/settings/components/profile/actions/ResetPasswordAction.d.ts +4 -0
- package/dist/settings/components/profile/actions/ResetPasswordAction.es.js +94 -0
- package/dist/settings/components/profile/actions/ResetPasswordAction.es.js.map +1 -0
- package/dist/settings/components/profile/actions/VerifyEmailAction.es.js +20 -37
- package/dist/settings/components/profile/actions/VerifyEmailAction.es.js.map +1 -1
- package/dist/settings/components/profile/actions/VerifyPhoneAction.es.js +11 -17
- package/dist/settings/components/profile/actions/VerifyPhoneAction.es.js.map +1 -1
- package/dist/settings/constants/Settings.d.ts +8 -0
- package/dist/settings/constants/Settings.es.js +10 -3
- package/dist/settings/constants/Settings.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { useGlobalCopyStore as v, useSettingsStore as E } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import N from "../../../../common/components/dialog/Dialog.es.js";
|
|
3
|
+
import { HAS_LETTER as W, HAS_NUMBER as D, HIDE_CONFIRM_PASSWORD as I, HIDE_NEW_PASSWORD as T, PASSWORD_REQUIREMENTS as H, SHOW_CONFIRM_PASSWORD as M, SHOW_NEW_PASSWORD as k } from "../../../constants/Settings.es.js";
|
|
4
|
+
import s from "react";
|
|
5
|
+
import { observer as B } from "mobx-react-lite";
|
|
6
|
+
import S from "@mui/material/Stack";
|
|
7
|
+
import { Text as h } from "@mxenabled/mxui";
|
|
8
|
+
import j from "@mui/material/Button";
|
|
9
|
+
import { ChevronRight as F, Visibility as u, VisibilityOff as _ } from "@mxenabled/mx-icons";
|
|
10
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
11
|
+
import P from "@mui/material/IconButton";
|
|
12
|
+
import C from "@mui/material/InputAdornment";
|
|
13
|
+
import g from "@mui/material/TextField";
|
|
14
|
+
var ee = B(() => {
|
|
15
|
+
const { common: y, settings: t } = v(), { updatePassword: x } = E(), [A, l] = s.useState(!1), [o, p] = s.useState(""), [a, c] = s.useState(""), [r, m] = s.useState(!1), [n, w] = s.useState(!1), R = o.length >= 12 && W.test(o) && D.test(o) && o === a, f = () => {
|
|
16
|
+
l(!1), p(""), c(""), m(!1), w(!1);
|
|
17
|
+
}, b = () => {
|
|
18
|
+
l(!0);
|
|
19
|
+
}, O = () => {
|
|
20
|
+
x({
|
|
21
|
+
new_password: o,
|
|
22
|
+
new_password_again: a
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ d(S, { children: [/* @__PURE__ */ d(j, {
|
|
26
|
+
onClick: b,
|
|
27
|
+
children: [/* @__PURE__ */ e(h, {
|
|
28
|
+
variant: "body2",
|
|
29
|
+
children: t.reset_password
|
|
30
|
+
}), /* @__PURE__ */ e(F, {})]
|
|
31
|
+
}), /* @__PURE__ */ e(N, {
|
|
32
|
+
copy: { title: t.reset_password },
|
|
33
|
+
disablePrimaryButton: !R,
|
|
34
|
+
isOpen: A,
|
|
35
|
+
onClose: f,
|
|
36
|
+
onPrimaryAction: O,
|
|
37
|
+
onSecondaryAction: f,
|
|
38
|
+
primaryText: t.save_password,
|
|
39
|
+
secondaryText: y.cancel_button,
|
|
40
|
+
sx: { "& .MuiToolbar-root:last-child": {
|
|
41
|
+
padding: 24,
|
|
42
|
+
justifyContent: "flex-end"
|
|
43
|
+
} },
|
|
44
|
+
children: /* @__PURE__ */ d(S, {
|
|
45
|
+
spacing: 16,
|
|
46
|
+
sx: {
|
|
47
|
+
px: 40,
|
|
48
|
+
textAlign: "center",
|
|
49
|
+
width: "100%"
|
|
50
|
+
},
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ e(h, {
|
|
53
|
+
variant: "body1",
|
|
54
|
+
children: H
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ e(g, {
|
|
57
|
+
label: t.new_password,
|
|
58
|
+
onChange: (i) => p(i.target.value),
|
|
59
|
+
slotProps: { input: { endAdornment: /* @__PURE__ */ e(C, {
|
|
60
|
+
position: "end",
|
|
61
|
+
children: /* @__PURE__ */ e(P, {
|
|
62
|
+
"aria-label": r ? T : k,
|
|
63
|
+
edge: "end",
|
|
64
|
+
onClick: () => m(!r),
|
|
65
|
+
children: r ? /* @__PURE__ */ e(_, {}) : /* @__PURE__ */ e(u, {})
|
|
66
|
+
})
|
|
67
|
+
}) } },
|
|
68
|
+
type: r ? "text" : "password",
|
|
69
|
+
value: o
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ e(g, {
|
|
72
|
+
label: t.confirm_new_password,
|
|
73
|
+
onChange: (i) => c(i.target.value),
|
|
74
|
+
slotProps: { input: { endAdornment: /* @__PURE__ */ e(C, {
|
|
75
|
+
position: "end",
|
|
76
|
+
children: /* @__PURE__ */ e(P, {
|
|
77
|
+
"aria-label": n ? I : M,
|
|
78
|
+
edge: "end",
|
|
79
|
+
onClick: () => w(!n),
|
|
80
|
+
children: n ? /* @__PURE__ */ e(_, {}) : /* @__PURE__ */ e(u, {})
|
|
81
|
+
})
|
|
82
|
+
}) } },
|
|
83
|
+
type: n ? "text" : "password",
|
|
84
|
+
value: a
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
})
|
|
88
|
+
})] });
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
ee as default
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=ResetPasswordAction.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResetPasswordAction.es.js","names":[],"sources":["../../../../../src/settings/components/profile/actions/ResetPasswordAction.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Button from '@mui/material/Button'\nimport IconButton from '@mui/material/IconButton'\nimport InputAdornment from '@mui/material/InputAdornment'\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\n\nimport { Text } from '@mxenabled/mxui'\nimport { ChevronRight, Visibility, VisibilityOff } from '@mxenabled/mx-icons'\n\nimport { Dialog, useGlobalCopyStore, useSettingsStore } from '../../../../common'\nimport {\n HAS_LETTER,\n HAS_NUMBER,\n HIDE_CONFIRM_PASSWORD,\n HIDE_NEW_PASSWORD,\n MIN_PASSWORD_LENGTH,\n PASSWORD_REQUIREMENTS,\n SHOW_CONFIRM_PASSWORD,\n SHOW_NEW_PASSWORD,\n} from '../../../constants/Settings'\n\nconst ResetPasswordAction = observer(() => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { updatePassword } = useSettingsStore()\n\n const [isOpen, setIsOpen] = React.useState(false)\n const [newPassword, setNewPassword] = React.useState('')\n const [confirmPassword, setConfirmPassword] = React.useState('')\n const [showNewPassword, setShowNewPassword] = React.useState(false)\n const [showConfirmPassword, setShowConfirmPassword] = React.useState(false)\n const isValid =\n newPassword.length >= MIN_PASSWORD_LENGTH &&\n HAS_LETTER.test(newPassword) &&\n HAS_NUMBER.test(newPassword) &&\n newPassword === confirmPassword\n\n const handleClose = (): void => {\n setIsOpen(false)\n setNewPassword('')\n setConfirmPassword('')\n setShowNewPassword(false)\n setShowConfirmPassword(false)\n }\n\n const handleOpen = (): void => {\n setIsOpen(true)\n }\n\n const handleSave = () => {\n updatePassword({ new_password: newPassword, new_password_again: confirmPassword })\n }\n\n return (\n <Stack>\n <Button onClick={handleOpen}>\n <Text variant=\"body2\">{settingsCopy.reset_password}</Text>\n <ChevronRight />\n </Button>\n <Dialog\n copy={{ title: settingsCopy.reset_password }}\n disablePrimaryButton={!isValid}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={handleSave}\n onSecondaryAction={handleClose}\n primaryText={settingsCopy.save_password}\n secondaryText={commonCopy.cancel_button}\n sx={{\n '& .MuiToolbar-root:last-child': {\n padding: 24,\n justifyContent: 'flex-end',\n },\n }}\n >\n <Stack spacing={16} sx={{ px: 40, textAlign: 'center', width: '100%' }}>\n <Text variant=\"body1\">{PASSWORD_REQUIREMENTS}</Text>\n <TextField\n label={settingsCopy.new_password}\n onChange={(e) => setNewPassword(e.target.value)}\n slotProps={{\n input: {\n endAdornment: (\n <InputAdornment position=\"end\">\n <IconButton\n aria-label={showNewPassword ? HIDE_NEW_PASSWORD : SHOW_NEW_PASSWORD}\n edge=\"end\"\n onClick={() => setShowNewPassword(!showNewPassword)}\n >\n {showNewPassword ? <VisibilityOff /> : <Visibility />}\n </IconButton>\n </InputAdornment>\n ),\n },\n }}\n type={showNewPassword ? 'text' : 'password'}\n value={newPassword}\n />\n <TextField\n label={settingsCopy.confirm_new_password}\n onChange={(e) => setConfirmPassword(e.target.value)}\n slotProps={{\n input: {\n endAdornment: (\n <InputAdornment position=\"end\">\n <IconButton\n aria-label={\n showConfirmPassword ? HIDE_CONFIRM_PASSWORD : SHOW_CONFIRM_PASSWORD\n }\n edge=\"end\"\n onClick={() => setShowConfirmPassword(!showConfirmPassword)}\n >\n {showConfirmPassword ? <VisibilityOff /> : <Visibility />}\n </IconButton>\n </InputAdornment>\n ),\n },\n }}\n type={showConfirmPassword ? 'text' : 'password'}\n value={confirmPassword}\n />\n </Stack>\n </Dialog>\n </Stack>\n )\n})\n\nexport default ResetPasswordAction\n"],"mappings":";;;;;;;;;;;;;AAwBA,IAAM,KAAsB,EAAA,MAAe;AACzC,QAAM,EAAE,QAAQ,GAAY,UAAU,EAAA,IAAiB,EAAmB,GACpE,EAAE,gBAAA,EAAA,IAAmB,EAAiB,GAEtC,CAAC,GAAQ,CAAA,IAAa,EAAM,SAAS,EAAK,GAC1C,CAAC,GAAa,CAAA,IAAkB,EAAM,SAAS,EAAE,GACjD,CAAC,GAAiB,CAAA,IAAsB,EAAM,SAAS,EAAE,GACzD,CAAC,GAAiB,CAAA,IAAsB,EAAM,SAAS,EAAK,GAC5D,CAAC,GAAqB,CAAA,IAA0B,EAAM,SAAS,EAAK,GACpE,IACJ,EAAY,UAAA,MACZ,EAAW,KAAK,CAAW,KAC3B,EAAW,KAAK,CAAW,KAC3B,MAAgB,GAEZ,IAAA,MAA0B;AAC9B,IAAA,EAAU,EAAK,GACf,EAAe,EAAE,GACjB,EAAmB,EAAE,GACrB,EAAmB,EAAK,GACxB,EAAuB,EAAK;AAAA,EAC9B,GAEM,IAAA,MAAyB;AAC7B,IAAA,EAAU,EAAI;AAAA,EAChB,GAEM,IAAA,MAAmB;AACvB,IAAA,EAAe;AAAA,MAAE,cAAc;AAAA,MAAa,oBAAoB;AAAA,IAAgB,CAAC;AAAA,EACnF;AAEA,SACE,gBAAA,EAAC,GAAD,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IAAQ,SAAS;AAAA,IAAjB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAM,SAAQ;AAAA,MAAS,UAAA,EAAa;AAAA,IAAqB,CAAA,GACzD,gBAAA,EAAC,GAAD,CAAe,CAAA,CACT;AAAA,EACR,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,IAC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ACvB,UAAA,gBAAA,EAAC,GAAD;AAAA,cACE,cACE,IAAsB,IAAwB;AAAA,cAEhD,MAAK;AAAA,cACL,SAAA,MAAe,EAAuB,CAAC,CAAmB;AAAA,cAEzD,UAAA,IAAsB,gBAAA,EAAC,GAAD,CAAgB,CAAA,IAAI,gBAAA,EAAC,GAAD,CAAa,CAAA;AAAA,YAC9C,CAAA;AAAA,UACE,CAAA,EAEpB,EACF;AAAA,UACA,MAAM,IAAsB,SAAS;AAAA,UACrC,OAAO;AAAA,QACR,CAAA;AAAA,MACI;AAAA;EACD,CAAA,CACH,EAAA,CAAA;AAEX,CAAC"}
|
|
@@ -4,46 +4,35 @@ import a from "react";
|
|
|
4
4
|
import { observer as y } from "mobx-react-lite";
|
|
5
5
|
import g from "@mui/material/Stack";
|
|
6
6
|
import { Text as o } from "@mxenabled/mxui";
|
|
7
|
-
import
|
|
8
|
-
import { ChevronRight as
|
|
9
|
-
import { jsx as
|
|
7
|
+
import v from "@mui/material/Button";
|
|
8
|
+
import { ChevronRight as b } from "@mxenabled/mx-icons";
|
|
9
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
10
10
|
import { useTheme as C } from "@mui/material/styles";
|
|
11
|
-
var
|
|
12
|
-
const { common: s, settings:
|
|
11
|
+
var V = y(() => {
|
|
12
|
+
const { common: s, settings: t } = f(), { sendEmailVerification: c } = h(), { user: m } = u(), l = C(), [p, i] = a.useState(!1), n = () => {
|
|
13
13
|
i(!1);
|
|
14
14
|
}, d = () => {
|
|
15
15
|
i(!0);
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */ r(a.Fragment, { children: [/* @__PURE__ */ r(
|
|
17
|
+
return /* @__PURE__ */ r(a.Fragment, { children: [/* @__PURE__ */ r(v, {
|
|
18
18
|
onClick: d,
|
|
19
19
|
sx: {
|
|
20
20
|
height: "auto",
|
|
21
21
|
p: 4,
|
|
22
22
|
width: "fit-content"
|
|
23
23
|
},
|
|
24
|
-
children: [/* @__PURE__ */
|
|
24
|
+
children: [/* @__PURE__ */ e(o, {
|
|
25
25
|
variant: "body2",
|
|
26
|
-
children:
|
|
27
|
-
}), /* @__PURE__ */
|
|
28
|
-
}), /* @__PURE__ */
|
|
29
|
-
copy: { title:
|
|
26
|
+
children: t.verify_email
|
|
27
|
+
}), /* @__PURE__ */ e(b, {})]
|
|
28
|
+
}), /* @__PURE__ */ e(x, {
|
|
29
|
+
copy: { title: t.confirm_your_email },
|
|
30
30
|
isOpen: p,
|
|
31
31
|
onClose: n,
|
|
32
32
|
onPrimaryAction: c,
|
|
33
33
|
onSecondaryAction: n,
|
|
34
|
-
primaryText:
|
|
34
|
+
primaryText: t.send_verification,
|
|
35
35
|
secondaryText: s.back,
|
|
36
|
-
sx: {
|
|
37
|
-
"& .MuiDialogContent-root": {
|
|
38
|
-
pt: 0,
|
|
39
|
-
width: 400
|
|
40
|
-
},
|
|
41
|
-
"& .MuiToolbar-root:last-child": {
|
|
42
|
-
gap: 16,
|
|
43
|
-
padding: "32px 60px 48px",
|
|
44
|
-
justifyContent: "center"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
36
|
children: /* @__PURE__ */ r(g, {
|
|
48
37
|
spacing: 16,
|
|
49
38
|
sx: {
|
|
@@ -52,37 +41,31 @@ var E = y(() => {
|
|
|
52
41
|
width: "100%"
|
|
53
42
|
},
|
|
54
43
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
bold: !0,
|
|
57
|
-
truncate: !1,
|
|
58
|
-
variant: "body1",
|
|
59
|
-
children: e.confirm_your_email
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */ t(o, {
|
|
44
|
+
/* @__PURE__ */ e(o, {
|
|
62
45
|
truncate: !1,
|
|
63
46
|
variant: "body2",
|
|
64
|
-
children:
|
|
47
|
+
children: t.confirm_email
|
|
65
48
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ e(o, {
|
|
67
50
|
sx: {
|
|
68
|
-
border: `1px solid ${
|
|
51
|
+
border: `1px solid ${l.palette.neutral.light}`,
|
|
69
52
|
borderRadius: "4px",
|
|
70
53
|
p: "16px 32px"
|
|
71
54
|
},
|
|
72
55
|
variant: "h3",
|
|
73
|
-
children:
|
|
56
|
+
children: m.email
|
|
74
57
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ e(o, {
|
|
76
59
|
truncate: !1,
|
|
77
60
|
variant: "body2",
|
|
78
|
-
children:
|
|
61
|
+
children: t.verification_notice_email
|
|
79
62
|
})
|
|
80
63
|
]
|
|
81
64
|
})
|
|
82
65
|
})] });
|
|
83
66
|
});
|
|
84
67
|
export {
|
|
85
|
-
|
|
68
|
+
V as default
|
|
86
69
|
};
|
|
87
70
|
|
|
88
71
|
//# sourceMappingURL=VerifyEmailAction.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyEmailAction.es.js","names":[],"sources":["../../../../../src/settings/components/profile/actions/VerifyEmailAction.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { Dialog, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../../common'\n\nconst VerifyEmailAction = observer(() => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { sendEmailVerification } = useSettingsStore()\n const { user } = useUserStore()\n const theme = useTheme()\n\n const [isOpen, setIsOpen] = React.useState(false)\n\n const handleClose = (): void => {\n setIsOpen(false)\n }\n\n const handleOpen = (): void => {\n setIsOpen(true)\n }\n\n return (\n <React.Fragment>\n <Button onClick={handleOpen} sx={{ height: 'auto', p: 4, width: 'fit-content' }}>\n <Text variant=\"body2\">{settingsCopy.verify_email}</Text>\n <ChevronRight />\n </Button>\n <Dialog\n copy={{ title:
|
|
1
|
+
{"version":3,"file":"VerifyEmailAction.es.js","names":[],"sources":["../../../../../src/settings/components/profile/actions/VerifyEmailAction.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { ChevronRight } from '@mxenabled/mx-icons'\n\nimport { Dialog, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../../common'\n\nconst VerifyEmailAction = observer(() => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { sendEmailVerification } = useSettingsStore()\n const { user } = useUserStore()\n const theme = useTheme()\n\n const [isOpen, setIsOpen] = React.useState(false)\n\n const handleClose = (): void => {\n setIsOpen(false)\n }\n\n const handleOpen = (): void => {\n setIsOpen(true)\n }\n\n return (\n <React.Fragment>\n <Button onClick={handleOpen} sx={{ height: 'auto', p: 4, width: 'fit-content' }}>\n <Text variant=\"body2\">{settingsCopy.verify_email}</Text>\n <ChevronRight />\n </Button>\n <Dialog\n copy={{ title: settingsCopy.confirm_your_email }}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={sendEmailVerification}\n onSecondaryAction={handleClose}\n primaryText={settingsCopy.send_verification}\n secondaryText={commonCopy.back}\n >\n <Stack spacing={16} sx={{ px: 40, textAlign: 'center', width: '100%' }}>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.confirm_email}\n </Text>\n <Text\n sx={{\n border: `1px solid ${theme.palette.neutral.light}`,\n borderRadius: '4px',\n p: '16px 32px',\n }}\n variant=\"h3\"\n >\n {user.email}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.verification_notice_email}\n </Text>\n </Stack>\n </Dialog>\n </React.Fragment>\n )\n})\n\nexport default VerifyEmailAction\n"],"mappings":";;;;;;;;;;AAYA,IAAM,IAAoB,EAAA,MAAe;AACvC,QAAM,EAAE,QAAQ,G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AA,UACL;AAAA,UACA,SAAQ;AAAA,UAEP,UAAA,EAAK;AAAA,QACF,CAAA;AAAA,QACN,gBAAA,EAAC,GAAD;AAAA,UAAM,UAAU;AAAA,UAAO,SAAQ;AAAA,UAC5B,UAAA,EAAa;AAAA,QACV,CAAA;AAAA,MACD;AAAA;EACD,CAAA,CACM,EAAA,CAAA;AAEpB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useGlobalCopyStore as v, useSettingsStore as
|
|
2
|
-
import
|
|
1
|
+
import { useGlobalCopyStore as v, useSettingsStore as C, useUserStore as T } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import b from "../../../../common/components/dialog/Dialog.es.js";
|
|
3
3
|
import S from "./VerifyTokenAction.es.js";
|
|
4
4
|
import r from "react";
|
|
5
5
|
import { observer as k } from "mobx-react-lite";
|
|
@@ -10,10 +10,10 @@ import { ChevronRight as w } from "@mxenabled/mx-icons";
|
|
|
10
10
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
11
11
|
import { useTheme as A } from "@mui/material/styles";
|
|
12
12
|
var $ = k(() => {
|
|
13
|
-
const { common: c, settings: o } = v(), { sendPhoneVerification: l, verifyPhoneToken: p } =
|
|
14
|
-
|
|
13
|
+
const { common: c, settings: o } = v(), { sendPhoneVerification: l, verifyPhoneToken: p } = C(), { user: f } = T(), h = A(), [m, s] = r.useState(!1), [d, n] = r.useState(!1), a = () => {
|
|
14
|
+
s(!1);
|
|
15
15
|
}, y = () => {
|
|
16
|
-
|
|
16
|
+
s(!0);
|
|
17
17
|
}, u = () => {
|
|
18
18
|
l().finally(() => {
|
|
19
19
|
n(!0);
|
|
@@ -36,12 +36,12 @@ var $ = k(() => {
|
|
|
36
36
|
children: o.verify_phone
|
|
37
37
|
}), /* @__PURE__ */ e(w, {})]
|
|
38
38
|
}),
|
|
39
|
-
/* @__PURE__ */ e(
|
|
40
|
-
copy: { title:
|
|
41
|
-
isOpen:
|
|
42
|
-
onClose:
|
|
39
|
+
/* @__PURE__ */ e(b, {
|
|
40
|
+
copy: { title: o.confirm_your_phone },
|
|
41
|
+
isOpen: m,
|
|
42
|
+
onClose: a,
|
|
43
43
|
onPrimaryAction: u,
|
|
44
|
-
onSecondaryAction:
|
|
44
|
+
onSecondaryAction: a,
|
|
45
45
|
primaryText: o.send_verification,
|
|
46
46
|
secondaryText: c.back,
|
|
47
47
|
sx: {
|
|
@@ -63,12 +63,6 @@ var $ = k(() => {
|
|
|
63
63
|
width: "100%"
|
|
64
64
|
},
|
|
65
65
|
children: [
|
|
66
|
-
/* @__PURE__ */ e(t, {
|
|
67
|
-
bold: !0,
|
|
68
|
-
truncate: !1,
|
|
69
|
-
variant: "body1",
|
|
70
|
-
children: o.confirm_your_phone
|
|
71
|
-
}),
|
|
72
66
|
/* @__PURE__ */ e(t, {
|
|
73
67
|
truncate: !1,
|
|
74
68
|
variant: "body2",
|
|
@@ -94,7 +88,7 @@ var $ = k(() => {
|
|
|
94
88
|
/* @__PURE__ */ e(S, {
|
|
95
89
|
handleClose: () => n(!1),
|
|
96
90
|
handleVerify: x,
|
|
97
|
-
isOpen:
|
|
91
|
+
isOpen: d
|
|
98
92
|
})
|
|
99
93
|
] });
|
|
100
94
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyPhoneAction.es.js","names":[],"sources":["../../../../../src/settings/components/profile/actions/VerifyPhoneAction.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { ChevronRight } from '@mxenabled/mx-icons'\nimport { Dialog, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../../common'\nimport VerifyTokenAction from './VerifyTokenAction'\n\nconst VerifyPhoneAction = observer(() => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { sendPhoneVerification, verifyPhoneToken } = useSettingsStore()\n const { user } = useUserStore()\n const theme = useTheme()\n\n const [isOpen, setIsOpen] = React.useState(false)\n const [showVerifyToken, setShowVerifyToken] = React.useState(false)\n\n const handleClose = (): void => {\n setIsOpen(false)\n }\n\n const handleOpen = (): void => {\n setIsOpen(true)\n }\n\n const handlePhoneVerify = () => {\n sendPhoneVerification().finally(() => {\n setShowVerifyToken(true)\n })\n }\n\n const handleTokenVerify = (token: string) => {\n verifyPhoneToken(token).finally(() => {\n setShowVerifyToken(false)\n })\n }\n\n return (\n <React.Fragment>\n <Button onClick={handleOpen} sx={{ height: 'auto', p: 4, width: 'fit-content' }}>\n <Text variant=\"body2\">{settingsCopy.verify_phone}</Text>\n <ChevronRight />\n </Button>\n <Dialog\n copy={{ title:
|
|
1
|
+
{"version":3,"file":"VerifyPhoneAction.es.js","names":[],"sources":["../../../../../src/settings/components/profile/actions/VerifyPhoneAction.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\nimport React from 'react'\n\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { ChevronRight } from '@mxenabled/mx-icons'\nimport { Dialog, useGlobalCopyStore, useSettingsStore, useUserStore } from '../../../../common'\nimport VerifyTokenAction from './VerifyTokenAction'\n\nconst VerifyPhoneAction = observer(() => {\n const { common: commonCopy, settings: settingsCopy } = useGlobalCopyStore()\n const { sendPhoneVerification, verifyPhoneToken } = useSettingsStore()\n const { user } = useUserStore()\n const theme = useTheme()\n\n const [isOpen, setIsOpen] = React.useState(false)\n const [showVerifyToken, setShowVerifyToken] = React.useState(false)\n\n const handleClose = (): void => {\n setIsOpen(false)\n }\n\n const handleOpen = (): void => {\n setIsOpen(true)\n }\n\n const handlePhoneVerify = () => {\n sendPhoneVerification().finally(() => {\n setShowVerifyToken(true)\n })\n }\n\n const handleTokenVerify = (token: string) => {\n verifyPhoneToken(token).finally(() => {\n setShowVerifyToken(false)\n })\n }\n\n return (\n <React.Fragment>\n <Button onClick={handleOpen} sx={{ height: 'auto', p: 4, width: 'fit-content' }}>\n <Text variant=\"body2\">{settingsCopy.verify_phone}</Text>\n <ChevronRight />\n </Button>\n <Dialog\n copy={{ title: settingsCopy.confirm_your_phone }}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={handlePhoneVerify}\n onSecondaryAction={handleClose}\n primaryText={settingsCopy.send_verification}\n secondaryText={commonCopy.back}\n sx={{\n '& .MuiDialogContent-root': { pt: 0, width: 400 },\n\n '& .MuiToolbar-root:last-child': {\n gap: 16,\n padding: '32px 60px 48px',\n justifyContent: 'center',\n },\n }}\n >\n <Stack spacing={16} sx={{ px: 40, textAlign: 'center', width: '100%' }}>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.confirm_phone}\n </Text>\n <Text\n sx={{\n border: `1px solid ${theme.palette.neutral.light}`,\n borderRadius: '4px',\n p: '16px 32px',\n }}\n variant=\"h3\"\n >\n {user.phone}\n </Text>\n <Text truncate={false} variant=\"body2\">\n {settingsCopy.verification_notice_phone}\n </Text>\n </Stack>\n </Dialog>\n <VerifyTokenAction\n handleClose={() => setShowVerifyToken(false)}\n handleVerify={handleTokenVerify}\n isOpen={showVerifyToken}\n />\n </React.Fragment>\n )\n})\n\nexport default VerifyPhoneAction\n"],"mappings":";;;;;;;;;;;AAYA,IAAM,IAAoB,EAAA,MAAe;AACvC,QAAM,EAAE,QAAQ,GAAY,UAAU,EAAA,IAAiB,EAAmB,GACpE,EAAE,uBAAA,GAAuB,kBAAA,EAAA,IAAqB,EAAiB,GAC/D,EAAE,MAAA,EAAA,IAAS,EAAa,GACxB,IAAQ,EAAS,GAEjB,CAAC,GAAQ,CAAA,IAAa,EAAM,SAAS,EAAK,GAC1C,CAAC,GAAiB,CAAA,IAAsB,EAAM,SAAS,EAAK,GAE5D,IAAA,MAA0B;AAC9B,IAAA,EAAU,EAAK;AAAA,EACjB,GAEM,IAAA,MAAyB;AAC7B,IAAA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AA,UACV,CAAA;AAAA,UACN,gBAAA,EAAC,GAAD;AAAA,YACE,IAAI;AAAA,cACF,QAAQ,aAAa,EAAM,QAAQ,QAAQ,KAAA;AAAA,cAC3C,cAAc;AAAA,cACd,GAAG;AAAA,YACL;AAAA,YACA,SAAQ;AAAA,YAEP,UAAA,EAAK;AAAA,UACF,CAAA;AAAA,UACN,gBAAA,EAAC,GAAD;AAAA,YAAM,UAAU;AAAA,YAAO,SAAQ;AAAA,YAC5B,UAAA,EAAa;AAAA,UACV,CAAA;AAAA,QACD;AAAA;IACD,CAAA;AAAA,IACR,gBAAA,EAAC,GAAD;AAAA,MACE,aAAA,MAAmB,EAAmB,EAAK;AAAA,MAC3C,cAAc;AAAA,MACd,QAAQ;AAAA,IACT,CAAA;AAAA,EACa,EAAA,CAAA;AAEpB,CAAC"}
|
|
@@ -3,3 +3,11 @@ export declare enum DialogType {
|
|
|
3
3
|
Edit = "edit",
|
|
4
4
|
Token = "token"
|
|
5
5
|
}
|
|
6
|
+
export declare const MIN_PASSWORD_LENGTH = 12;
|
|
7
|
+
export declare const HAS_LETTER: RegExp;
|
|
8
|
+
export declare const HAS_NUMBER: RegExp;
|
|
9
|
+
export declare const HIDE_NEW_PASSWORD = "Hide new password";
|
|
10
|
+
export declare const SHOW_NEW_PASSWORD = "Show new password";
|
|
11
|
+
export declare const HIDE_CONFIRM_PASSWORD = "Hide confirm password";
|
|
12
|
+
export declare const SHOW_CONFIRM_PASSWORD = "Show confirm password";
|
|
13
|
+
export declare const PASSWORD_REQUIREMENTS = "Passwords must be at least 12 characters, and must contain at least one number and one letter.";
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
var
|
|
1
|
+
var r = /* @__PURE__ */ (function(e) {
|
|
2
2
|
return e.Delete = "delete", e.Edit = "edit", e.Token = "token", e;
|
|
3
|
-
})({});
|
|
3
|
+
})({}), a = /[a-zA-Z]/, t = /\d/, S = "Hide new password", n = "Show new password", s = "Hide confirm password", o = "Show confirm password", d = "Passwords must be at least 12 characters, and must contain at least one number and one letter.";
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
r as DialogType,
|
|
6
|
+
a as HAS_LETTER,
|
|
7
|
+
t as HAS_NUMBER,
|
|
8
|
+
s as HIDE_CONFIRM_PASSWORD,
|
|
9
|
+
S as HIDE_NEW_PASSWORD,
|
|
10
|
+
d as PASSWORD_REQUIREMENTS,
|
|
11
|
+
o as SHOW_CONFIRM_PASSWORD,
|
|
12
|
+
n as SHOW_NEW_PASSWORD
|
|
6
13
|
};
|
|
7
14
|
|
|
8
15
|
//# sourceMappingURL=Settings.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.es.js","names":[],"sources":["../../../src/settings/constants/Settings.ts"],"sourcesContent":["export enum DialogType {\n Delete = 'delete',\n Edit = 'edit',\n Token = 'token',\n}\n"],"mappings":"AAAA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,SAAA,UACA,EAAA,OAAA,QACA,EAAA,QAAA;AACF,GAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"Settings.es.js","names":[],"sources":["../../../src/settings/constants/Settings.ts"],"sourcesContent":["export enum DialogType {\n Delete = 'delete',\n Edit = 'edit',\n Token = 'token',\n}\n\nexport const MIN_PASSWORD_LENGTH = 12\nexport const HAS_LETTER = /[a-zA-Z]/\nexport const HAS_NUMBER = /\\d/\nexport const HIDE_NEW_PASSWORD = 'Hide new password'\nexport const SHOW_NEW_PASSWORD = 'Show new password'\nexport const HIDE_CONFIRM_PASSWORD = 'Hide confirm password'\nexport const SHOW_CONFIRM_PASSWORD = 'Show confirm password'\nexport const PASSWORD_REQUIREMENTS =\n 'Passwords must be at least 12 characters, and must contain at least one number and one letter.'\n"],"mappings":"AAAA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,SAAA,UACA,EAAA,OAAA,QACA,EAAA,QAAA;AACF,GAAA,CAAA,CAAA,GAGa,IAAa,YACb,IAAa,MACb,IAAoB,qBACpB,IAAoB,qBACpB,IAAwB,yBACxB,IAAwB,yBACxB,IACX"}
|