@dashadmin/dash-admin 1.0.0 → 1.3.17
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/{ChangePassword-CTfQfSBO.js → dist/ChangePassword-DmWAQAX_.js} +55 -56
- package/{Login-BtJDpF6O.js → dist/Login-t41HMhVT.js} +1 -1
- package/{Profile-DUF5jGpL.js → dist/Profile-By-gdPUd.js} +80 -81
- package/{RecoverPassword-CQd17LpL.js → dist/RecoverPassword-DzPdbkg2.js} +26 -27
- package/{VerifyAccount-DEKnDV6A.js → dist/VerifyAccount-Bofaxe5w.js} +1 -1
- package/{index-U84xs0Dc.js → dist/index-gfebuoyf.js} +7820 -7974
- package/{index.js → dist/index.js} +1 -1
- package/package.json +50 -23
- package/src/index.tsx +110 -0
- package/index.d.ts +0 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { Box as n, Alert as
|
|
3
|
-
import { useState as a, useEffect as
|
|
4
|
-
import { useRedirect as
|
|
5
|
-
import { b as
|
|
2
|
+
import { Box as n, Alert as g, Button as x, Grid as m, IconButton as N, TextField as S } from "@mui/material";
|
|
3
|
+
import { useState as a, useEffect as I } from "react";
|
|
4
|
+
import { useRedirect as R, useNotify as k } from "react-admin";
|
|
5
|
+
import { b as E, c as j, F as A } from "./index-gfebuoyf.js";
|
|
6
6
|
import "react-redux";
|
|
7
7
|
import "@dashadmin/dash-admin-state";
|
|
8
8
|
import "@mui/icons-material/MenuOpen";
|
|
9
9
|
import "@dashadmin/dash-auth";
|
|
10
10
|
import "react-router-dom";
|
|
11
11
|
import "@mui/icons-material/NavigateNext";
|
|
12
|
-
import
|
|
12
|
+
import B from "@mui/icons-material/Home";
|
|
13
13
|
import "@dashadmin/dash-constants";
|
|
14
14
|
import "react-toastify";
|
|
15
15
|
import "@dashadmin/dash-dialog";
|
|
@@ -19,32 +19,31 @@ import "@dashadmin/dash-auto-admin";
|
|
|
19
19
|
import "react-router";
|
|
20
20
|
import "@mui/icons-material/NotificationsActive";
|
|
21
21
|
import "react-custom-scrollbars-2";
|
|
22
|
-
import { dashStorage as
|
|
22
|
+
import { dashStorage as F } from "@dashadmin/dash-utils";
|
|
23
23
|
import "@mui/x-date-pickers";
|
|
24
24
|
import "@mui/x-date-pickers/AdapterDayjs";
|
|
25
|
-
const
|
|
26
|
-
const [l,
|
|
27
|
-
var g;
|
|
25
|
+
const ie = ({}) => {
|
|
26
|
+
const [l, y] = a(""), [c, p] = a(!1), [d, u] = a(""), [b, v] = a(!1), { axios: C } = E(), h = R(), f = k(), w = async (s) => {
|
|
28
27
|
s.preventDefault(), u(""), p(!0);
|
|
29
28
|
try {
|
|
30
|
-
const { data: r } = await
|
|
29
|
+
const { data: r } = await C.post("password/email", {
|
|
31
30
|
email: l
|
|
32
31
|
});
|
|
33
|
-
|
|
32
|
+
v(!0), f(r.message, { type: "success" });
|
|
34
33
|
} catch (r) {
|
|
35
34
|
let i = "Ha ocurrido un error";
|
|
36
|
-
if (
|
|
35
|
+
if (r?.response?.data) {
|
|
37
36
|
const t = r.response.data;
|
|
38
37
|
t.errors && t.errors.email && t.errors.email.length > 0 ? i = t.errors.email[0] : t.message && (i = t.message);
|
|
39
|
-
} else r
|
|
38
|
+
} else r?.message && (i = r.message);
|
|
40
39
|
u(i), f(i, { type: "warning" });
|
|
41
40
|
} finally {
|
|
42
41
|
p(!1);
|
|
43
42
|
}
|
|
44
43
|
};
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
}, []), /* @__PURE__ */ e(
|
|
44
|
+
return I(() => {
|
|
45
|
+
F.clear(), j();
|
|
46
|
+
}, []), /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
48
47
|
n,
|
|
49
48
|
{
|
|
50
49
|
sx: {
|
|
@@ -64,7 +63,7 @@ const ae = ({}) => {
|
|
|
64
63
|
maxWidth: 420,
|
|
65
64
|
mx: "auto"
|
|
66
65
|
},
|
|
67
|
-
children:
|
|
66
|
+
children: b ? /* @__PURE__ */ o(
|
|
68
67
|
n,
|
|
69
68
|
{
|
|
70
69
|
sx: {
|
|
@@ -84,9 +83,9 @@ const ae = ({}) => {
|
|
|
84
83
|
},
|
|
85
84
|
children: [
|
|
86
85
|
/* @__PURE__ */ e("h1", { className: "dash-app-login-form-title", style: { margin: 0 }, children: "Recuperar Contraseña" }),
|
|
87
|
-
/* @__PURE__ */ e(
|
|
86
|
+
/* @__PURE__ */ e(g, { severity: "success", sx: { mt: 2, mb: 2 }, children: "Si el correo existe en nuestro sistema, recibirás un enlace para restablecer tu contraseña." }),
|
|
88
87
|
/* @__PURE__ */ e(
|
|
89
|
-
|
|
88
|
+
x,
|
|
90
89
|
{
|
|
91
90
|
variant: "contained",
|
|
92
91
|
color: "primary",
|
|
@@ -97,22 +96,22 @@ const ae = ({}) => {
|
|
|
97
96
|
)
|
|
98
97
|
]
|
|
99
98
|
}
|
|
100
|
-
) : /* @__PURE__ */ o("form", { onSubmit:
|
|
99
|
+
) : /* @__PURE__ */ o("form", { onSubmit: w, className: "dash-app-login-form", children: [
|
|
101
100
|
/* @__PURE__ */ o(m, { container: !0, sx: { mb: 4, mt: 2 }, spacing: 2, alignItems: "center", children: [
|
|
102
101
|
/* @__PURE__ */ e(m, { item: !0, xs: 2, children: /* @__PURE__ */ e(
|
|
103
|
-
|
|
102
|
+
N,
|
|
104
103
|
{
|
|
105
104
|
color: "primary",
|
|
106
105
|
size: "large",
|
|
107
106
|
onClick: () => h("/"),
|
|
108
|
-
children: /* @__PURE__ */ e(
|
|
107
|
+
children: /* @__PURE__ */ e(B, {})
|
|
109
108
|
}
|
|
110
109
|
) }),
|
|
111
110
|
/* @__PURE__ */ e(m, { item: !0, xs: 10, children: /* @__PURE__ */ e("h1", { className: "dash-app-login-form-title", style: { margin: 0 }, children: "Recuperar Contraseña" }) })
|
|
112
111
|
] }),
|
|
113
|
-
d && /* @__PURE__ */ e(
|
|
112
|
+
d && /* @__PURE__ */ e(g, { severity: "error", sx: { mb: 2 }, children: d }),
|
|
114
113
|
/* @__PURE__ */ e("div", { className: "dash-app-form-item", children: /* @__PURE__ */ e(
|
|
115
|
-
|
|
114
|
+
S,
|
|
116
115
|
{
|
|
117
116
|
fullWidth: !0,
|
|
118
117
|
variant: "outlined",
|
|
@@ -121,7 +120,7 @@ const ae = ({}) => {
|
|
|
121
120
|
required: !0,
|
|
122
121
|
value: l,
|
|
123
122
|
inputProps: { type: "email" },
|
|
124
|
-
onChange: (s) =>
|
|
123
|
+
onChange: (s) => y(s.target.value),
|
|
125
124
|
className: "dash-app-form-item-input",
|
|
126
125
|
autoComplete: "username",
|
|
127
126
|
name: "email",
|
|
@@ -130,7 +129,7 @@ const ae = ({}) => {
|
|
|
130
129
|
}
|
|
131
130
|
) }),
|
|
132
131
|
/* @__PURE__ */ e("div", { className: "dash-app-form-item mt-1", children: /* @__PURE__ */ e(
|
|
133
|
-
|
|
132
|
+
x,
|
|
134
133
|
{
|
|
135
134
|
type: "submit",
|
|
136
135
|
variant: "contained",
|
|
@@ -146,5 +145,5 @@ const ae = ({}) => {
|
|
|
146
145
|
) });
|
|
147
146
|
};
|
|
148
147
|
export {
|
|
149
|
-
|
|
148
|
+
ie as default
|
|
150
149
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m, useEffect as h } from "react";
|
|
3
3
|
import { useSearchParams as v, useNavigate as x } from "react-router-dom";
|
|
4
|
-
import { b as y, F as b } from "./index-
|
|
4
|
+
import { b as y, F as b } from "./index-gfebuoyf.js";
|
|
5
5
|
import { Box as k, CircularProgress as C, Typography as P } from "@mui/material";
|
|
6
6
|
import { getEnv as T } from "@dashadmin/dash-constants/src/DASHAdminSystemConstants";
|
|
7
7
|
import "react-redux";
|