@chimera-pe/mui-saas 3.0.9 → 3.0.11
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/dist/mui-saas.js +129 -127
- package/dist/mui-saas.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/mui-saas.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useSaasStore as
|
|
4
|
-
import { useEffect as b, useMemo as
|
|
5
|
-
import { useMediaQuery as
|
|
6
|
-
import { grey as
|
|
7
|
-
import { create as
|
|
1
|
+
import { jsxs as u, jsx as n, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import i from "prop-types";
|
|
3
|
+
import { useSaasStore as G, SaasApp as H } from "@chimera-pe/react-saas";
|
|
4
|
+
import { useEffect as b, useMemo as Q, useState as z, Children as U, cloneElement as $, useCallback as J } from "react";
|
|
5
|
+
import { useMediaQuery as K, createTheme as _, ThemeProvider as V, CssBaseline as W, Snackbar as X, Alert as R, Box as k, CircularProgress as Y, AlertTitle as Z, List as ee, ListItem as ne, ListItemText as re, Skeleton as ie, Card as S, CardHeader as x, CardContent as v, LinearProgress as ae, Typography as oe, CardActions as te, TablePagination as se } from "@mui/material";
|
|
6
|
+
import { grey as j } from "@mui/material/colors";
|
|
7
|
+
import { create as ce } from "zustand";
|
|
8
8
|
import { useTranslate as C } from "react-polyglot";
|
|
9
|
-
import { get as
|
|
10
|
-
import { useQuery as
|
|
11
|
-
const f =
|
|
9
|
+
import { get as le } from "lodash";
|
|
10
|
+
import { useQuery as pe } from "@tanstack/react-query";
|
|
11
|
+
const f = ce((a) => ({
|
|
12
12
|
tema: "light",
|
|
13
13
|
notificaciones: [],
|
|
14
14
|
cambiarTema: (r) => {
|
|
15
|
-
|
|
15
|
+
a({
|
|
16
16
|
tema: r
|
|
17
17
|
});
|
|
18
18
|
},
|
|
19
19
|
mostrarNotificacion: (r) => {
|
|
20
|
-
|
|
21
|
-
notificaciones: [r, ...
|
|
20
|
+
a((o) => ({
|
|
21
|
+
notificaciones: [r, ...o.notificaciones]
|
|
22
22
|
}));
|
|
23
23
|
},
|
|
24
24
|
ocultarNotificacion: () => {
|
|
25
|
-
|
|
25
|
+
a((r) => ({
|
|
26
26
|
notificaciones: r.notificaciones.slice(1)
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
|
-
})),
|
|
30
|
-
const r = f((s) => s.cambiarTema),
|
|
29
|
+
})), A = ({ children: a }) => {
|
|
30
|
+
const r = f((s) => s.cambiarTema), o = K("(prefers-color-scheme: dark)"), t = f((s) => s.tema), e = G((s) => s.instancia);
|
|
31
31
|
b(() => {
|
|
32
|
-
r(
|
|
33
|
-
}, [r,
|
|
34
|
-
const
|
|
32
|
+
r(o ? "dark" : "light");
|
|
33
|
+
}, [r, o]);
|
|
34
|
+
const c = Q(() => _({
|
|
35
35
|
palette: {
|
|
36
|
-
mode:
|
|
36
|
+
mode: t,
|
|
37
37
|
primary: {
|
|
38
38
|
main: e.color.primary
|
|
39
39
|
},
|
|
@@ -52,190 +52,192 @@ const f = ne((o) => ({
|
|
|
52
52
|
success: {
|
|
53
53
|
main: e.color.success
|
|
54
54
|
},
|
|
55
|
-
...
|
|
55
|
+
...t === "light" && {
|
|
56
56
|
background: {
|
|
57
|
-
default:
|
|
58
|
-
paper:
|
|
57
|
+
default: j.A200,
|
|
58
|
+
paper: j[100]
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
shape: {
|
|
63
63
|
borderRadius: 6
|
|
64
64
|
}
|
|
65
|
-
}), [
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
65
|
+
}), [t, e]);
|
|
66
|
+
return /* @__PURE__ */ u(V, { theme: c, children: [
|
|
67
|
+
/* @__PURE__ */ n(W, {}),
|
|
68
|
+
a
|
|
69
69
|
] });
|
|
70
70
|
};
|
|
71
|
-
|
|
72
|
-
children:
|
|
71
|
+
A.propTypes = {
|
|
72
|
+
children: i.element.isRequired
|
|
73
73
|
};
|
|
74
|
-
const
|
|
75
|
-
const
|
|
74
|
+
const me = () => {
|
|
75
|
+
const a = C(), [r, o] = z(!1), t = f((s) => s.ocultarNotificacion), e = f((s) => s.notificaciones[0]);
|
|
76
76
|
b(() => {
|
|
77
|
-
|
|
77
|
+
o(!!e);
|
|
78
78
|
}, [e]);
|
|
79
|
-
const
|
|
80
|
-
|
|
79
|
+
const c = () => {
|
|
80
|
+
o(!1), t();
|
|
81
81
|
};
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
|
|
82
|
+
return /* @__PURE__ */ n(
|
|
83
|
+
X,
|
|
84
84
|
{
|
|
85
85
|
open: r,
|
|
86
|
-
message: e ? e.tipo === "default" &&
|
|
86
|
+
message: e ? e.tipo === "default" && a(e?.mensaje) : null,
|
|
87
87
|
autoHideDuration: 5e3,
|
|
88
|
-
onClose:
|
|
88
|
+
onClose: c,
|
|
89
89
|
anchorOrigin: e && {
|
|
90
90
|
vertical: e?.posicion.vertical,
|
|
91
91
|
horizontal: e?.posicion.horizontal
|
|
92
92
|
},
|
|
93
|
-
children: e && e?.tipo !== "default" && /* @__PURE__ */
|
|
93
|
+
children: e && e?.tipo !== "default" && /* @__PURE__ */ n(R, { severity: e.tipo, children: a(e.mensaje) })
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
|
-
},
|
|
97
|
-
aplicacion:
|
|
96
|
+
}, ge = ({
|
|
97
|
+
aplicacion: a,
|
|
98
98
|
dev: r = !1,
|
|
99
|
-
devBackendUrl:
|
|
100
|
-
devAuthUrl:
|
|
99
|
+
devBackendUrl: o,
|
|
100
|
+
devAuthUrl: t,
|
|
101
101
|
mensajes: e = {
|
|
102
102
|
en: {},
|
|
103
103
|
es: {}
|
|
104
104
|
},
|
|
105
|
-
children:
|
|
106
|
-
}) => /* @__PURE__ */
|
|
107
|
-
|
|
105
|
+
children: c
|
|
106
|
+
}) => /* @__PURE__ */ n(
|
|
107
|
+
H,
|
|
108
108
|
{
|
|
109
|
-
aplicacion:
|
|
109
|
+
aplicacion: a,
|
|
110
110
|
dev: r,
|
|
111
|
-
devBackendUrl:
|
|
112
|
-
devAuthUrl:
|
|
111
|
+
devBackendUrl: o,
|
|
112
|
+
devAuthUrl: t,
|
|
113
113
|
mensajes: e,
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
|
|
116
|
-
/* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ n(A, { children: /* @__PURE__ */ u(B, { children: [
|
|
115
|
+
c,
|
|
116
|
+
/* @__PURE__ */ n(me, {})
|
|
117
117
|
] }) })
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
|
-
|
|
121
|
-
aplicacion:
|
|
122
|
-
dev:
|
|
123
|
-
devBackendUrl:
|
|
124
|
-
devAuthUrl:
|
|
125
|
-
mensajes:
|
|
126
|
-
children:
|
|
120
|
+
ge.propTypes = {
|
|
121
|
+
aplicacion: i.string.isRequired,
|
|
122
|
+
dev: i.bool,
|
|
123
|
+
devBackendUrl: i.string,
|
|
124
|
+
devAuthUrl: i.string,
|
|
125
|
+
mensajes: i.object,
|
|
126
|
+
children: i.element.isRequired
|
|
127
127
|
};
|
|
128
|
-
const
|
|
128
|
+
const ve = () => /* @__PURE__ */ n(k, { sx: {
|
|
129
129
|
display: "flex",
|
|
130
130
|
flexDirection: "column",
|
|
131
131
|
flexGrow: 1,
|
|
132
132
|
justifyContent: "center",
|
|
133
133
|
alignItems: "center"
|
|
134
|
-
}, children: /* @__PURE__ */
|
|
134
|
+
}, children: /* @__PURE__ */ n(Y, {}) }), N = ({ titulo: a, texto: r, align: o = "center", severity: t = "error" }) => {
|
|
135
135
|
const e = C();
|
|
136
|
-
return /* @__PURE__ */
|
|
136
|
+
return /* @__PURE__ */ n(k, { sx: {
|
|
137
137
|
display: "flex",
|
|
138
138
|
flexDirection: "column",
|
|
139
139
|
flexGrow: 1,
|
|
140
140
|
justifyContent: "center",
|
|
141
|
-
alignItems:
|
|
142
|
-
}, children: /* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
141
|
+
alignItems: o
|
|
142
|
+
}, children: /* @__PURE__ */ u(R, { severity: t, children: [
|
|
143
|
+
/* @__PURE__ */ n(Z, { children: e(a) }),
|
|
144
144
|
r && e(r)
|
|
145
145
|
] }) });
|
|
146
146
|
};
|
|
147
|
-
|
|
148
|
-
titulo:
|
|
149
|
-
texto:
|
|
150
|
-
align:
|
|
151
|
-
severity:
|
|
147
|
+
N.propTypes = {
|
|
148
|
+
titulo: i.string.isRequired,
|
|
149
|
+
texto: i.string,
|
|
150
|
+
align: i.string,
|
|
151
|
+
severity: i.string
|
|
152
152
|
};
|
|
153
|
-
const
|
|
154
|
-
nombre:
|
|
153
|
+
const w = (a) => (a.match(/(\w+)(\.\w+)+/g) || []).length > 0, de = ({
|
|
154
|
+
nombre: a,
|
|
155
155
|
elevation: r = 1,
|
|
156
|
-
api:
|
|
157
|
-
filtros:
|
|
156
|
+
api: o,
|
|
157
|
+
filtros: t,
|
|
158
158
|
titulo: e,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
subtitulo: c,
|
|
160
|
+
tamanioInicial: s = 10,
|
|
161
|
+
ubicacionTotal: q = "totalElements",
|
|
162
|
+
children: D
|
|
162
163
|
}) => {
|
|
163
|
-
const
|
|
164
|
+
const g = C(), [p, y] = z({
|
|
164
165
|
page: 0,
|
|
165
|
-
pageSize:
|
|
166
|
-
});
|
|
166
|
+
pageSize: s
|
|
167
|
+
}), I = JSON.stringify(t);
|
|
167
168
|
b(() => {
|
|
168
|
-
y((
|
|
169
|
-
...
|
|
169
|
+
y((l) => ({
|
|
170
|
+
...l,
|
|
170
171
|
page: 0
|
|
171
172
|
}));
|
|
172
|
-
}, [
|
|
173
|
-
const { isLoading: h, isError:
|
|
174
|
-
queryKey: [`paginable-${
|
|
175
|
-
queryFn: () => t
|
|
173
|
+
}, [I]);
|
|
174
|
+
const { isLoading: h, isError: M, data: d } = pe({
|
|
175
|
+
queryKey: [`paginable-${a}`, p, t],
|
|
176
|
+
queryFn: () => o(t, p.page, p.pageSize),
|
|
176
177
|
keepPreviousData: !0
|
|
177
|
-
});
|
|
178
|
+
}), T = e && w(e) ? g(e) : e, L = c && w(c) ? g(c) : c;
|
|
178
179
|
if (h)
|
|
179
|
-
return /* @__PURE__ */
|
|
180
|
-
if (
|
|
181
|
-
return /* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
180
|
+
return /* @__PURE__ */ n(ee, { children: Array.from(Array(s).keys()).map((l) => /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(re, { primary: /* @__PURE__ */ n(ie, {}) }) }, `row-${l}`)) });
|
|
181
|
+
if (M)
|
|
182
|
+
return /* @__PURE__ */ u(S, { children: [
|
|
183
|
+
/* @__PURE__ */ n(x, { titulo: g(e) }),
|
|
184
|
+
/* @__PURE__ */ n(v, { children: /* @__PURE__ */ n(N, { titulo: "main.paginable.error.carga" }) })
|
|
184
185
|
] });
|
|
185
|
-
const
|
|
186
|
+
const E = (l, m) => {
|
|
186
187
|
h || m === p.page || y({
|
|
187
188
|
page: m,
|
|
188
189
|
pageSize: p.pageSize
|
|
189
190
|
});
|
|
190
|
-
},
|
|
191
|
-
const m =
|
|
191
|
+
}, F = (l) => {
|
|
192
|
+
const m = l.target.value;
|
|
192
193
|
h || m === p.pageSize || y({
|
|
193
194
|
page: 0,
|
|
194
195
|
pageSize: m
|
|
195
196
|
});
|
|
196
|
-
},
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
data:
|
|
201
|
-
})) : /* @__PURE__ */
|
|
202
|
-
|
|
203
|
-
|
|
197
|
+
}, P = le(d, q, 0);
|
|
198
|
+
return /* @__PURE__ */ u(S, { elevation: r, children: [
|
|
199
|
+
T && /* @__PURE__ */ n(x, { title: T, subheader: L }),
|
|
200
|
+
/* @__PURE__ */ n(v, { children: h ? /* @__PURE__ */ n(ae, {}) : d && d.content.length > 0 ? U.map(D, (l) => $(l, {
|
|
201
|
+
data: d.content
|
|
202
|
+
})) : /* @__PURE__ */ n(oe, { children: g("main.paginable.sinResultados") }) }),
|
|
203
|
+
d && P > 0 && /* @__PURE__ */ n(te, { sx: { justifyContent: "flex-end" }, children: /* @__PURE__ */ n(
|
|
204
|
+
se,
|
|
204
205
|
{
|
|
205
206
|
component: "div",
|
|
206
|
-
count:
|
|
207
|
+
count: P,
|
|
207
208
|
page: p.page,
|
|
208
209
|
rowsPerPage: p.pageSize,
|
|
209
|
-
labelRowsPerPage:
|
|
210
|
-
labelDisplayedRows: ({ from:
|
|
210
|
+
labelRowsPerPage: g("main.paginable.filas"),
|
|
211
|
+
labelDisplayedRows: ({ from: l, to: m, count: O }) => g("main.paginable.resultados", { inicial: l, final: m, total: O }),
|
|
211
212
|
rowsPerPageOptions: [5, 10, 15, 20, 25, 50],
|
|
212
|
-
onRowsPerPageChange:
|
|
213
|
-
onPageChange:
|
|
213
|
+
onRowsPerPageChange: F,
|
|
214
|
+
onPageChange: E
|
|
214
215
|
}
|
|
215
216
|
) })
|
|
216
217
|
] });
|
|
217
218
|
};
|
|
218
|
-
|
|
219
|
-
nombre:
|
|
220
|
-
elevation:
|
|
221
|
-
api:
|
|
222
|
-
filtros:
|
|
223
|
-
titulo:
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
219
|
+
de.propTypes = {
|
|
220
|
+
nombre: i.string.isRequired,
|
|
221
|
+
elevation: i.number,
|
|
222
|
+
api: i.func.isRequired,
|
|
223
|
+
filtros: i.object,
|
|
224
|
+
titulo: i.string,
|
|
225
|
+
subtitulo: i.string,
|
|
226
|
+
tamanioInicial: i.number,
|
|
227
|
+
ubicacionTotal: i.string,
|
|
228
|
+
children: i.element
|
|
227
229
|
};
|
|
228
|
-
const
|
|
229
|
-
const
|
|
230
|
-
return
|
|
231
|
-
|
|
232
|
-
}, [
|
|
230
|
+
const je = () => {
|
|
231
|
+
const a = f((r) => r.mostrarNotificacion);
|
|
232
|
+
return J((r, o = "default", t = { vertical: "botton", horizontal: "center" }) => {
|
|
233
|
+
a({ mensaje: r, tipo: o, posicion: t });
|
|
234
|
+
}, [a]);
|
|
233
235
|
};
|
|
234
236
|
export {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
ve as Cargando,
|
|
238
|
+
N as Mensaje,
|
|
239
|
+
ge as MuiApp,
|
|
240
|
+
de as Paginable,
|
|
239
241
|
f as useMuiStore,
|
|
240
|
-
|
|
242
|
+
je as useNotificar
|
|
241
243
|
};
|
package/dist/mui-saas.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("prop-types"),require("@chimera-pe/react-saas"),require("react"),require("@mui/material"),require("@mui/material/colors"),require("zustand"),require("react-polyglot"),require("lodash"),require("@tanstack/react-query")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","prop-types","@chimera-pe/react-saas","react","@mui/material","@mui/material/colors","zustand","react-polyglot","lodash","@tanstack/react-query"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r["mui-saas"]={},r.ReactJSX,r.PropTypes,r.ReactSaas,r.React,r.MuiMaterial,r.MuiMaterialColors,r.Zustand,r.ReactPolyglot,r.Lodash,r.ReactQuery))})(this,(function(r,e,t,v,
|
|
1
|
+
(function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("prop-types"),require("@chimera-pe/react-saas"),require("react"),require("@mui/material"),require("@mui/material/colors"),require("zustand"),require("react-polyglot"),require("lodash"),require("@tanstack/react-query")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","prop-types","@chimera-pe/react-saas","react","@mui/material","@mui/material/colors","zustand","react-polyglot","lodash","@tanstack/react-query"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r["mui-saas"]={},r.ReactJSX,r.PropTypes,r.ReactSaas,r.React,r.MuiMaterial,r.MuiMaterialColors,r.Zustand,r.ReactPolyglot,r.Lodash,r.ReactQuery))})(this,(function(r,e,t,v,f,i,j,N,m,D,E){"use strict";const p=N.create(o=>({tema:"light",notificaciones:[],cambiarTema:a=>{o({tema:a})},mostrarNotificacion:a=>{o(s=>({notificaciones:[a,...s.notificaciones]}))},ocultarNotificacion:()=>{o(a=>({notificaciones:a.notificaciones.slice(1)}))}})),M=({children:o})=>{const a=p(l=>l.cambiarTema),s=i.useMediaQuery("(prefers-color-scheme: dark)"),c=p(l=>l.tema),n=v.useSaasStore(l=>l.instancia);f.useEffect(()=>{a(s?"dark":"light")},[a,s]);const d=f.useMemo(()=>i.createTheme({palette:{mode:c,primary:{main:n.color.primary},secondary:{main:n.color.secondary},error:{main:n.color.error},warning:{main:n.color.warning},info:{main:n.color.info},success:{main:n.color.success},...c==="light"&&{background:{default:j.grey.A200,paper:j.grey[100]}}},shape:{borderRadius:6}}),[c,n]);return e.jsxs(i.ThemeProvider,{theme:d,children:[e.jsx(i.CssBaseline,{}),o]})};M.propTypes={children:t.element.isRequired};const I=()=>{const o=m.useTranslate(),[a,s]=f.useState(!1),c=p(l=>l.ocultarNotificacion),n=p(l=>l.notificaciones[0]);f.useEffect(()=>{s(!!n)},[n]);const d=()=>{s(!1),c()};return e.jsx(i.Snackbar,{open:a,message:n?n.tipo==="default"&&o(n?.mensaje):null,autoHideDuration:5e3,onClose:d,anchorOrigin:n&&{vertical:n?.posicion.vertical,horizontal:n?.posicion.horizontal},children:n&&n?.tipo!=="default"&&e.jsx(i.Alert,{severity:n.tipo,children:o(n.mensaje)})})},z=({aplicacion:o,dev:a=!1,devBackendUrl:s,devAuthUrl:c,mensajes:n={en:{},es:{}},children:d})=>e.jsx(v.SaasApp,{aplicacion:o,dev:a,devBackendUrl:s,devAuthUrl:c,mensajes:n,children:e.jsx(M,{children:e.jsxs(e.Fragment,{children:[d,e.jsx(I,{})]})})});z.propTypes={aplicacion:t.string.isRequired,dev:t.bool,devBackendUrl:t.string,devAuthUrl:t.string,mensajes:t.object,children:t.element.isRequired};const L=()=>e.jsx(i.Box,{sx:{display:"flex",flexDirection:"column",flexGrow:1,justifyContent:"center",alignItems:"center"},children:e.jsx(i.CircularProgress,{})}),q=({titulo:o,texto:a,align:s="center",severity:c="error"})=>{const n=m.useTranslate();return e.jsx(i.Box,{sx:{display:"flex",flexDirection:"column",flexGrow:1,justifyContent:"center",alignItems:s},children:e.jsxs(i.Alert,{severity:c,children:[e.jsx(i.AlertTitle,{children:n(o)}),a&&n(a)]})})};q.propTypes={titulo:t.string.isRequired,texto:t.string,align:t.string,severity:t.string};const k=o=>(o.match(/(\w+)(\.\w+)+/g)||[]).length>0,x=({nombre:o,elevation:a=1,api:s,filtros:c,titulo:n,subtitulo:d,tamanioInicial:l=10,ubicacionTotal:B="totalElements",children:F})=>{const C=m.useTranslate(),[g,b]=f.useState({page:0,pageSize:l}),T=JSON.stringify(c);f.useEffect(()=>{b(u=>({...u,page:0}))},[T]);const{isLoading:S,isError:H,data:y}=E.useQuery({queryKey:[`paginable-${o}`,g,c],queryFn:()=>s(c,g.page,g.pageSize),keepPreviousData:!0}),w=n&&k(n)?C(n):n,Q=d&&k(d)?C(d):d;if(S)return e.jsx(i.List,{children:Array.from(Array(l).keys()).map(u=>e.jsx(i.ListItem,{children:e.jsx(i.ListItemText,{primary:e.jsx(i.Skeleton,{})})},`row-${u}`))});if(H)return e.jsxs(i.Card,{children:[e.jsx(i.CardHeader,{titulo:C(n)}),e.jsx(i.CardContent,{children:e.jsx(q,{titulo:"main.paginable.error.carga"})})]});const G=(u,h)=>{S||h===g.page||b({page:h,pageSize:g.pageSize})},J=u=>{const h=u.target.value;S||h===g.pageSize||b({page:0,pageSize:h})},A=D.get(y,B,0);return e.jsxs(i.Card,{elevation:a,children:[w&&e.jsx(i.CardHeader,{title:w,subheader:Q}),e.jsx(i.CardContent,{children:S?e.jsx(i.LinearProgress,{}):y&&y.content.length>0?f.Children.map(F,u=>f.cloneElement(u,{data:y.content})):e.jsx(i.Typography,{children:C("main.paginable.sinResultados")})}),y&&A>0&&e.jsx(i.CardActions,{sx:{justifyContent:"flex-end"},children:e.jsx(i.TablePagination,{component:"div",count:A,page:g.page,rowsPerPage:g.pageSize,labelRowsPerPage:C("main.paginable.filas"),labelDisplayedRows:({from:u,to:h,count:U})=>C("main.paginable.resultados",{inicial:u,final:h,total:U}),rowsPerPageOptions:[5,10,15,20,25,50],onRowsPerPageChange:J,onPageChange:G})})]})};x.propTypes={nombre:t.string.isRequired,elevation:t.number,api:t.func.isRequired,filtros:t.object,titulo:t.string,subtitulo:t.string,tamanioInicial:t.number,ubicacionTotal:t.string,children:t.element};const O=()=>{const o=p(a=>a.mostrarNotificacion);return f.useCallback((a,s="default",c={vertical:"botton",horizontal:"center"})=>{o({mensaje:a,tipo:s,posicion:c})},[o])};r.Cargando=L,r.Mensaje=q,r.MuiApp=z,r.Paginable=x,r.useMuiStore=p,r.useNotificar=O,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chimera-pe/mui-saas",
|
|
3
3
|
"description": "Librería con componentes comunes para MUI, usando SaaS",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.11",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -52,6 +52,6 @@
|
|
|
52
52
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
53
53
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
54
54
|
"globals": "^16.3.0",
|
|
55
|
-
"vite": "^7.1.
|
|
55
|
+
"vite": "^7.1.4"
|
|
56
56
|
}
|
|
57
57
|
}
|