@m4l/layouts 9.1.8 → 9.1.9

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 (75) hide show
  1. package/components/MFHostApp/index.d.ts +0 -4
  2. package/components/MFNoAuthApp/index.d.ts +0 -4
  3. package/components/MFWindowsTitle/MFWindowsTitle.d.ts +0 -4
  4. package/contexts/AuthContext/index.d.ts +0 -4
  5. package/hooks/useAuth/index.d.ts +0 -4
  6. package/hooks/useModule/index.d.ts +0 -4
  7. package/layouts/MasterDetailLayout/MasterDetailLayout.d.ts +0 -4
  8. package/layouts/MasterDetailLayout/classes/index.d.ts +0 -4
  9. package/layouts/MasterDetailLayout/components/ButtonDetail/index.d.ts +0 -4
  10. package/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.d.ts +0 -4
  11. package/layouts/ModuleLayout/ModuleLayout.js +2 -3
  12. package/layouts/ModuleLayout/constants.d.ts +1 -0
  13. package/layouts/ModuleLayout/constants.js +4 -0
  14. package/layouts/ModuleLayout/contexts/ModuleContext/index.d.ts +0 -4
  15. package/layouts/ModuleLayout/contexts/ModuleContext/index.js +0 -5
  16. package/layouts/ModuleLayout/slots/ModuleLayoutEnum.d.ts +3 -0
  17. package/layouts/ModuleLayout/slots/ModuleLayoutEnum.js +7 -0
  18. package/layouts/ModuleLayout/slots/ModuleLayoutSlots.d.ts +1 -0
  19. package/layouts/ModuleLayout/slots/ModuleLayoutSlots.js +11 -0
  20. package/layouts/ModuleLayout/styles.d.ts +2 -0
  21. package/layouts/ModuleLayout/styles.js +16 -0
  22. package/layouts/ModuleLayout/subcomponents/BaseModuleLayout/index.d.ts +2 -0
  23. package/layouts/ModuleLayout/subcomponents/BaseModuleLayout/index.js +19 -0
  24. package/layouts/ModuleLayout/types.d.ts +7 -1
  25. package/layouts/NoAuthModuleLayout/constants.d.ts +1 -0
  26. package/layouts/NoAuthModuleLayout/constants.js +4 -0
  27. package/layouts/NoAuthModuleLayout/index.d.ts +4 -5
  28. package/layouts/NoAuthModuleLayout/index.js +4 -5
  29. package/layouts/NoAuthModuleLayout/slots/NoAuthModuleLayoutEnum.d.ts +25 -0
  30. package/layouts/NoAuthModuleLayout/slots/NoAuthModuleLayoutEnum.js +33 -0
  31. package/layouts/NoAuthModuleLayout/slots/NoAuthModuleLayoutSlots.d.ts +19 -0
  32. package/layouts/NoAuthModuleLayout/slots/NoAuthModuleLayoutSlots.js +100 -0
  33. package/layouts/NoAuthModuleLayout/styles.d.ts +2 -0
  34. package/layouts/NoAuthModuleLayout/styles.js +314 -0
  35. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/index.d.ts +4 -0
  36. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/index.js +16 -0
  37. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/DesktopContent/index.d.ts +4 -0
  38. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/DesktopContent/index.js +47 -0
  39. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/MobileContent/index.d.ts +4 -0
  40. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/MobileContent/index.js +43 -0
  41. package/layouts/NoAuthModuleLayout/tests/NoAuthModuleLayout.test.d.ts +1 -0
  42. package/layouts/NoAuthModuleLayout/types.d.ts +45 -0
  43. package/package.json +8 -3
  44. package/test/HostThemeProviderMock.d.ts +10 -0
  45. package/test/TestAppWrapper.d.ts +29 -0
  46. package/test/TestFormAutoValidation.d.ts +4 -0
  47. package/test/constants.d.ts +69 -0
  48. package/test/constants_no_mock.d.ts +1 -0
  49. package/test/getNameDataTestId.d.ts +15 -0
  50. package/test/index.d.ts +4 -0
  51. package/test/mocks.d.ts +24 -0
  52. package/test/types.d.ts +4 -0
  53. package/test/utils.d.ts +23 -10
  54. package/layouts/ModuleLayout/classes/constants.d.ts +0 -1
  55. package/layouts/ModuleLayout/classes/constants.js +0 -4
  56. package/layouts/ModuleLayout/classes/index.d.ts +0 -14
  57. package/layouts/ModuleLayout/classes/index.js +0 -25
  58. package/layouts/ModuleLayout/classes/types.d.ts +0 -7
  59. package/layouts/ModuleLayout/subcomponents/InnerModule/index.d.ts +0 -2
  60. package/layouts/ModuleLayout/subcomponents/InnerModule/index.js +0 -20
  61. package/layouts/ModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -1
  62. package/layouts/ModuleLayout/subcomponents/InnerModule/styles.js +0 -7
  63. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +0 -8
  64. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.js +0 -16
  65. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -1
  66. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.js +0 -15
  67. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/index.d.ts +0 -8
  68. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/index.js +0 -47
  69. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/styles.d.ts +0 -9
  70. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/styles.js +0 -115
  71. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/index.d.ts +0 -8
  72. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/index.js +0 -43
  73. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/styles.d.ts +0 -8
  74. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/styles.js +0 -96
  75. /package/layouts/ModuleLayout/subcomponents/{InnerModule → BaseModuleLayout}/types.d.ts +0 -0
@@ -0,0 +1,314 @@
1
+ import { alpha } from "@mui/material/styles";
2
+ const noAuthModuleLayoutStyles = {
3
+ /**
4
+ * ****************************************************
5
+ * Estilos para el contenedor raíz del componente
6
+ * BaseNoAuthModuleLayout.
7
+ * ****************************************************
8
+ */
9
+ baseNoAuthModuleLayoutRoot: ({ theme }) => ({
10
+ display: "flex",
11
+ justifyContent: "center",
12
+ alignItems: "center",
13
+ height: "100vh",
14
+ padding: theme.vars.size.baseSpacings.sp5,
15
+ [theme.breakpoints.down("md")]: {
16
+ padding: theme.vars.size.baseSpacings.sp0
17
+ }
18
+ }),
19
+ /**
20
+ * ****************************************************
21
+ * Estilos para el contenedor raíz del componente
22
+ * DesktopContent.
23
+ * ****************************************************
24
+ */
25
+ desktopContentRoot: ({ theme }) => ({
26
+ display: "flex",
27
+ borderRadius: theme.vars.size.borderRadius.r4,
28
+ backgroundColor: theme.vars.palette.background.surface,
29
+ boxShadow: theme.vars.customShadows?.z4,
30
+ padding: `${theme.vars.size.baseSpacings.sp5}`,
31
+ width: "100%",
32
+ height: "100%",
33
+ maxWidth: "965px",
34
+ //No hay token para este valor
35
+ maxHeight: "900px",
36
+ //No hay token para este valor
37
+ position: "relative",
38
+ overflow: "auto",
39
+ "& .M4LLanguagePopover-root": {
40
+ position: "absolute",
41
+ top: theme.vars.size.baseSpacings.sp5,
42
+ right: theme.vars.size.baseSpacings.sp5,
43
+ zIndex: 1
44
+ },
45
+ "& .M4LIconButton-root.config-icon": {
46
+ position: "absolute",
47
+ top: "25px",
48
+ //No hay token para este valor
49
+ right: theme.vars.size.baseSpacings.sp14,
50
+ zIndex: 1
51
+ }
52
+ }),
53
+ /**
54
+ * ****************************************************
55
+ * Estilos para el contenedor del banner en Desktop.
56
+ * ****************************************************
57
+ */
58
+ desktopBanner: ({ theme }) => ({
59
+ display: "flex",
60
+ flexDirection: "column",
61
+ justifyContent: "center",
62
+ alignItems: "center",
63
+ borderRadius: theme.vars.size.borderRadius.r3,
64
+ width: "100%",
65
+ maxWidth: "400px",
66
+ //No hay token para este valor
67
+ height: "100%",
68
+ backgroundColor: theme.vars.palette.primary.enabled,
69
+ boxShadow: theme.vars.customShadows?.z4,
70
+ padding: `${theme.vars.size.baseSpacings.sp0} 60px`,
71
+ //No hay token para el valor 60px
72
+ gap: theme.vars.size.baseSpacings.sp10,
73
+ overflow: "hidden",
74
+ "& .MuiTypography-root": {
75
+ color: theme.palette.common?.white,
76
+ display: "flex",
77
+ justifyContent: "center",
78
+ textAlign: "center",
79
+ textTransform: "uppercase"
80
+ },
81
+ "& .M4LTypography-root .MuiSkeleton-root": {
82
+ backgroundColor: alpha(`${theme.colorSchemes.finalTheme.palette.common.white}`, 0.24),
83
+ margin: "auto"
84
+ }
85
+ }),
86
+ /**
87
+ * ****************************************************
88
+ * Estilos para el contenedor del logo en Desktop.
89
+ * ****************************************************
90
+ */
91
+ containerLogoDesktop: ({ theme }) => ({
92
+ display: "flex",
93
+ width: "84px",
94
+ //No hay token para este valor
95
+ height: "84px",
96
+ //No hay token para este valor
97
+ borderRadius: theme.vars.size.borderRadius["r1-5"],
98
+ backgroundColor: theme.vars.palette.primary.hover,
99
+ justifyContent: "center",
100
+ alignItems: "center",
101
+ padding: theme.vars.size.baseSpacings.sp3,
102
+ "& .M4LImage-root": {
103
+ backgroundColor: theme.vars.palette.common?.white,
104
+ borderRadius: theme.vars.size.borderRadius["r1-5"]
105
+ }
106
+ }),
107
+ /**
108
+ * ****************************************************
109
+ * Estilos para el contenedor del nombre de la empresa
110
+ * en Desktop.
111
+ * ****************************************************
112
+ */
113
+ companyNameDesktop: ({ theme }) => ({
114
+ display: "flex",
115
+ flexDirection: "column",
116
+ gap: theme.vars.size.baseSpacings.sp2,
117
+ width: "100%"
118
+ }),
119
+ /**
120
+ * ****************************************************
121
+ * Estilos para el contenedor del eslogan de la empresa
122
+ * en Desktop.
123
+ * ****************************************************
124
+ */
125
+ companyLeyendDesktop: ({ theme }) => ({
126
+ display: "flex",
127
+ flexDirection: "column",
128
+ gap: theme.vars.size.baseSpacings.sp2,
129
+ width: "100%"
130
+ }),
131
+ /**
132
+ * ****************************************************
133
+ * Estilos para el contenedor del formulario en Desktop.
134
+ * ****************************************************
135
+ */
136
+ formContentDesktop: ({ theme }) => ({
137
+ display: "flex",
138
+ flexDirection: "column",
139
+ padding: `${theme.vars.size.baseSpacings.sp0} 72px`,
140
+ //No hay token para los valores 60px y 80px
141
+ margin: "auto 0",
142
+ width: "100%",
143
+ height: "auto",
144
+ gap: theme.vars.size.baseSpacings.sp5
145
+ }),
146
+ /**
147
+ * ****************************************************
148
+ * Estilos para el wrapper del contenedor en desktop
149
+ * ****************************************************
150
+ */
151
+ wrapperFormContentDesktop: () => ({
152
+ display: "flex",
153
+ width: "100%",
154
+ height: "100%"
155
+ }),
156
+ /**
157
+ * ************************************************************
158
+ * Estilos para el contenedor del nombre de la app en desktop
159
+ * ************************************************************
160
+ */
161
+ containerModuleNameDesktop: ({ theme }) => ({
162
+ display: "flex",
163
+ flexDirection: "column",
164
+ width: "100%",
165
+ gap: theme.vars.size.baseSpacings.sp2
166
+ }),
167
+ /**
168
+ * ************************************************************
169
+ * Estilos para el contenedor del formulario en desktop
170
+ * ************************************************************
171
+ */
172
+ contentFormDesktop: () => ({
173
+ display: "flex",
174
+ width: "100%",
175
+ height: "100%",
176
+ justifyContent: "center",
177
+ alignItems: "center"
178
+ }),
179
+ typographyBanner: ({ theme }) => ({
180
+ color: `${theme.vars.palette.primary.contrastText} !important`
181
+ }),
182
+ /**
183
+ * ****************************************************
184
+ * Estilos para el contenedor raíz del componente
185
+ * MobileContent.
186
+ * ****************************************************
187
+ */
188
+ mobileContentRoot: ({ theme }) => ({
189
+ display: "flex",
190
+ flexDirection: "column",
191
+ width: "100%",
192
+ height: "100%",
193
+ backgroundColor: theme.vars.palette.background.surface,
194
+ padding: theme.vars.size.baseSpacings.sp3,
195
+ gap: theme.vars.size.baseSpacings.sp8
196
+ }),
197
+ /**
198
+ * ****************************************************
199
+ * Estilos para el contenedor del banner móvil.
200
+ * ****************************************************
201
+ */
202
+ mobileBanner: ({ theme }) => ({
203
+ display: "flex",
204
+ flexDirection: "column",
205
+ padding: theme.vars.size.baseSpacings.sp3,
206
+ gap: theme.vars.size.baseSpacings.sp5,
207
+ width: "100%",
208
+ backgroundColor: theme.vars.palette.primary.enabled,
209
+ boxShadow: theme.customShadows?.z4,
210
+ position: "relative",
211
+ borderRadius: theme.vars.size.borderRadius.r2,
212
+ "& .M4LLanguagePopover-root": {
213
+ position: "absolute",
214
+ top: theme.vars.size.baseSpacings.sp3,
215
+ right: theme.vars.size.baseSpacings.sp3,
216
+ zIndex: 1
217
+ },
218
+ "& .M4LIconButton-root.config-icon": {
219
+ position: "absolute",
220
+ top: theme.vars.size.baseSpacings.sp3,
221
+ right: theme.vars.size.baseSpacings.sp10,
222
+ zIndex: 1,
223
+ "& .M4LIcon-root .M4LIcon-icon": {
224
+ backgroundColor: theme.vars.palette.common?.white
225
+ }
226
+ },
227
+ "& .MuiTypography-root": {
228
+ color: theme.vars.palette.common?.white,
229
+ display: "flex",
230
+ textTransform: "uppercase"
231
+ },
232
+ "& .MuiSkeleton-root": {
233
+ backgroundColor: alpha(`${theme.colorSchemes.finalTheme.palette.common.white}`, 0.24),
234
+ margin: "auto"
235
+ }
236
+ }),
237
+ /**
238
+ * ****************************************************
239
+ * Estilos para el contenedor de la imagen que
240
+ * representa el lenguaje
241
+ * ****************************************************
242
+ */
243
+ containerImageLanguage: () => ({
244
+ display: "flex"
245
+ }),
246
+ /**
247
+ * ****************************************************
248
+ * Estilos para el contenedor del logo
249
+ * ****************************************************
250
+ */
251
+ containerLogo: ({ theme }) => ({
252
+ display: "flex",
253
+ width: theme.vars.size.baseSpacings.sp13,
254
+ height: theme.vars.size.baseSpacings.sp13,
255
+ borderRadius: theme.vars.size.borderRadius["r1-5"],
256
+ backgroundColor: theme.vars.palette.primary.hover,
257
+ justifyContent: "center",
258
+ alignItems: "center",
259
+ "& .M4LImage-root": {
260
+ backgroundColor: theme.vars.palette.common?.white,
261
+ borderRadius: theme.vars.size.borderRadius["r1-5"]
262
+ }
263
+ }),
264
+ /**
265
+ * ****************************************************
266
+ * Estilos para el contenedor del nombre de la empresa
267
+ * ****************************************************
268
+ */
269
+ companyName: ({ theme }) => ({
270
+ display: "flex",
271
+ flexDirection: "column",
272
+ width: "100%",
273
+ gap: theme.vars.size.baseSpacings.sp2
274
+ }),
275
+ /**
276
+ * ****************************************************
277
+ * Estilos para el contenedor del formulario
278
+ * ****************************************************
279
+ */
280
+ formContent: ({ theme }) => ({
281
+ display: "flex",
282
+ flexDirection: "column",
283
+ padding: theme.vars.size.baseSpacings.sp4,
284
+ margin: "auto 0",
285
+ width: "100%",
286
+ gap: theme.vars.size.baseSpacings.sp5
287
+ }),
288
+ /**
289
+ * ****************************************************
290
+ * Estilos para el wrapper del contenedor del formulario
291
+ * ****************************************************
292
+ */
293
+ wrapperFormContent: () => ({
294
+ display: "flex",
295
+ width: "100%",
296
+ height: "100%",
297
+ overflow: "hidden"
298
+ }),
299
+ /**
300
+ * ****************************************************
301
+ * Estilos para el contenedor del nombre del módulo
302
+ * de la plataforma
303
+ * ****************************************************
304
+ */
305
+ containerModuleName: ({ theme }) => ({
306
+ display: "flex",
307
+ flexDirection: "column",
308
+ width: "100%",
309
+ gap: theme.vars.size.baseSpacings.sp2
310
+ })
311
+ };
312
+ export {
313
+ noAuthModuleLayoutStyles as n
314
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Componente que contiene el contenido de la vista de escritorio/ móvil
3
+ */
4
+ export declare const BaseNoAuthModuleLayout: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { HelmetPage } from "@m4l/components";
3
+ import { useModuleDictionary, useBase } from "@m4l/core";
4
+ import { D as DesktopContent } from "./subcomponents/DesktopContent/index.js";
5
+ import { M as MobileContent } from "./subcomponents/MobileContent/index.js";
6
+ import { useIsMobile } from "@m4l/graphics";
7
+ import { B as BaseNoAuthModuleLayoutRootStyled } from "../../slots/NoAuthModuleLayoutSlots.js";
8
+ const BaseNoAuthModuleLayout = () => {
9
+ const { getModuleLabel } = useModuleDictionary();
10
+ const isMobile = useIsMobile();
11
+ const { subtitle } = useBase();
12
+ return /* @__PURE__ */ jsx(HelmetPage, { title: getModuleLabel(), subtitle, children: /* @__PURE__ */ jsx(BaseNoAuthModuleLayoutRootStyled, { id: "modulerootnouth", "data-testid": "modulerootnouth", children: isMobile ? /* @__PURE__ */ jsx(MobileContent, {}) : /* @__PURE__ */ jsx(DesktopContent, {}) }) });
13
+ };
14
+ export {
15
+ BaseNoAuthModuleLayout as B
16
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Componente que contiene el contenido de la vista de escritorio
3
+ */
4
+ export declare const DesktopContent: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { LanguagePopover, Image, Typography, Stack, ScrollBar } from "@m4l/components";
3
+ import { D as DesktopContentRootStyled, a as DesktopBannerStyled, C as ContainerLogoDesktopStyled, b as CompanyNameDesktopStyled, T as TypographyBannerStyled, c as CompanyLeyendDesktopStyled, W as WrapperFormContentDesktopStyled, F as FormContentDesktopStyled, d as ContainerModuleNameDesktopStyled } from "../../../../slots/NoAuthModuleLayoutSlots.js";
4
+ import { useBase, useModuleDictionary, useDomain } from "@m4l/core";
5
+ const DesktopContent = () => {
6
+ const { children, companyLogoSmallUrl } = useBase();
7
+ const { getLabel } = useModuleDictionary();
8
+ const { name, slogan } = useDomain();
9
+ return /* @__PURE__ */ jsxs(DesktopContentRootStyled, { children: [
10
+ /* @__PURE__ */ jsx(LanguagePopover, {}),
11
+ /* @__PURE__ */ jsxs(DesktopBannerStyled, { children: [
12
+ /* @__PURE__ */ jsx(ContainerLogoDesktopStyled, { children: /* @__PURE__ */ jsx(Image, { src: companyLogoSmallUrl, width: "60px", height: "60px" }) }),
13
+ /* @__PURE__ */ jsxs(CompanyNameDesktopStyled, { children: [
14
+ /* @__PURE__ */ jsx(
15
+ TypographyBannerStyled,
16
+ {
17
+ variant: "subtitleDens",
18
+ skeletonWidth: "70%",
19
+ children: name
20
+ }
21
+ ),
22
+ /* @__PURE__ */ jsx(TypographyBannerStyled, { variant: "subtitle", skeletonWidth: "40%", children: getLabel("company_name_subtitle") })
23
+ ] }),
24
+ /* @__PURE__ */ jsxs(CompanyLeyendDesktopStyled, { children: [
25
+ /* @__PURE__ */ jsx(TypographyBannerStyled, { variant: "h5", skeletonWidth: "50%", children: getLabel("module_leyend") }),
26
+ /* @__PURE__ */ jsx(TypographyBannerStyled, { variant: "paragraph", skeletonWidth: "80%", children: slogan })
27
+ ] })
28
+ ] }),
29
+ /* @__PURE__ */ jsx(WrapperFormContentDesktopStyled, { children: /* @__PURE__ */ jsxs(FormContentDesktopStyled, { children: [
30
+ /* @__PURE__ */ jsxs(ContainerModuleNameDesktopStyled, { children: [
31
+ /* @__PURE__ */ jsx(Typography, { variant: "h3", skeletonWidth: "20%", children: getLabel("module_name") }),
32
+ /* @__PURE__ */ jsx(
33
+ Typography,
34
+ {
35
+ variant: "subtitle",
36
+ skeletonWidth: "40%",
37
+ children: getLabel("module_description")
38
+ }
39
+ )
40
+ ] }),
41
+ /* @__PURE__ */ jsx(Stack, { direction: "column", height: "auto", children: /* @__PURE__ */ jsx(ScrollBar, { children: /* @__PURE__ */ jsx(Fragment, { children }) }) })
42
+ ] }) })
43
+ ] });
44
+ };
45
+ export {
46
+ DesktopContent as D
47
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Contenido de la vista mobile
3
+ */
4
+ export declare const MobileContent: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Image, LanguagePopover, ScrollBar, Typography } from "@m4l/components";
3
+ import { M as MobileContentRootStyled, e as MobileBannerStyled, f as ContainerLogoStyled, g as CompanyNameStyled, T as TypographyBannerStyled, h as WrapperFormContentStyled, i as FormContentStyled, j as ContainerModuleNameStyled } from "../../../../slots/NoAuthModuleLayoutSlots.js";
4
+ import { useBase, useModuleDictionary, useDomain } from "@m4l/core";
5
+ const MobileContent = () => {
6
+ const { children, companyLogoSmallUrl } = useBase();
7
+ const { getLabel } = useModuleDictionary();
8
+ const { name } = useDomain();
9
+ return /* @__PURE__ */ jsxs(MobileContentRootStyled, { children: [
10
+ /* @__PURE__ */ jsxs(MobileBannerStyled, { children: [
11
+ /* @__PURE__ */ jsx(ContainerLogoStyled, { children: /* @__PURE__ */ jsx(Image, { src: companyLogoSmallUrl, width: "44px", height: "44px" }) }),
12
+ /* @__PURE__ */ jsxs(CompanyNameStyled, { children: [
13
+ /* @__PURE__ */ jsx(
14
+ TypographyBannerStyled,
15
+ {
16
+ variant: "subtitleDens",
17
+ skeletonWidth: "70%",
18
+ children: name
19
+ }
20
+ ),
21
+ /* @__PURE__ */ jsx(TypographyBannerStyled, { variant: "subtitle", skeletonWidth: "40%", children: getLabel("company_name_subtitle") })
22
+ ] }),
23
+ /* @__PURE__ */ jsx(LanguagePopover, {})
24
+ ] }),
25
+ /* @__PURE__ */ jsx(WrapperFormContentStyled, { children: /* @__PURE__ */ jsx(ScrollBar, { children: /* @__PURE__ */ jsxs(FormContentStyled, { children: [
26
+ /* @__PURE__ */ jsxs(ContainerModuleNameStyled, { children: [
27
+ /* @__PURE__ */ jsx(Typography, { variant: "h3", skeletonWidth: "20%", children: getLabel("module_name") }),
28
+ /* @__PURE__ */ jsx(
29
+ Typography,
30
+ {
31
+ variant: "subtitle",
32
+ skeletonWidth: "40%",
33
+ children: getLabel("module_description")
34
+ }
35
+ )
36
+ ] }),
37
+ children
38
+ ] }) }) })
39
+ ] });
40
+ };
41
+ export {
42
+ MobileContent as M
43
+ };
@@ -1,20 +1,65 @@
1
1
  import { ReactNode } from 'react';
2
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
3
+ import { Theme } from '@mui/material/styles';
4
+ import { DesktopContentSlots, InnerModuleSlots, MobileContentSlots } from './slots/NoAuthModuleLayoutEnum';
5
+ import { NOT_AUTH_MODULE_LAYOUT_KEY } from './constants';
2
6
  export interface ContainerProps {
3
7
  vertical: boolean;
4
8
  }
5
9
  export type MenuActionType = 'main' | 'allways' | 'normal';
6
10
  export declare interface NoAuthBaseProviderProps {
11
+ /**
12
+ * Indica el Subtitulo del layout
13
+ */
7
14
  subtitle?: string;
15
+ /**
16
+ * Url de la imagen de la compañía en tamaño pequeño
17
+ */
8
18
  companyLogoSmallUrl: string;
19
+ /**
20
+ * Url de la imagen de la compañía en tamaño normal
21
+ */
9
22
  companyLogoNormalUrl: string;
23
+ /**
24
+ * Url de la imagen de ilustración del módulo
25
+ */
10
26
  moduleIlustrationUrl?: string;
27
+ /**
28
+ * Componente que será envuelto por el layout
29
+ */
11
30
  children: ReactNode;
31
+ /**
32
+ * Función que se ejecuta al hacer clic en el botón de configuración
33
+ */
12
34
  handleSetting?: () => void;
13
35
  }
14
36
  export interface NoAuthModuleLayoutProps extends NoAuthBaseProviderProps {
37
+ /**
38
+ * Identificador del módulo
39
+ */
15
40
  moduleId: string;
41
+ /**
42
+ * Campo del nombre del módulo
43
+ */
16
44
  moduleNameField?: string;
45
+ /**
46
+ * Lista de componentes que se deben cargar del diccionario
47
+ */
17
48
  componentsDictionary: string[];
49
+ /**
50
+ * Lista de flags que se deben cargar en el esqueleto
51
+ */
18
52
  skeletonFlags: string[];
53
+ /**
54
+ * Referencia al div observado
55
+ */
19
56
  observedDivRef: Element | Text | null;
20
57
  }
58
+ /**
59
+ * Define los tipos de Slots disponibles para el `NoAuthModuleLayout`.
60
+ */
61
+ export type NoAuthModuleLayoutSlotsType = InnerModuleSlots | MobileContentSlots | DesktopContentSlots;
62
+ /**
63
+ * Estilos aplicables al `NoAuthModuleLayout`
64
+ */
65
+ export type NoAuthModuleLayoutStyles = OverridesStyleRules<NoAuthModuleLayoutSlotsType, typeof NOT_AUTH_MODULE_LAYOUT_KEY, Theme>;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
- "version": "9.1.8",
3
+ "version": "9.1.9",
4
4
  "license": "UNLICENSED",
5
5
  "author": "M4L Team",
6
6
  "lint-staged": {
7
7
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
8
8
  },
9
9
  "peerDependencies": {
10
- "@m4l/components": "^9.0.0",
10
+ "@m4l/components": "^9.1.140",
11
11
  "@m4l/core": "^2.0.0",
12
12
  "@m4l/graphics": "^7.0.0",
13
13
  "@m4l/styles": "^7.0.0"
@@ -18,7 +18,8 @@
18
18
  "@types/react": "^18.0.0",
19
19
  "@types/react-dom": "^18.0.0",
20
20
  "react-dom": "^18.0.0",
21
- "@vitejs/plugin-react": "^4.0.0"
21
+ "@vitejs/plugin-react": "^4.0.0",
22
+ "storybook": "^8.3.4"
22
23
  },
23
24
  "overrides": {
24
25
  "glob": "^10.4.5",
@@ -44,6 +45,10 @@
44
45
  "node": ">=12.0.0"
45
46
  },
46
47
  "packageManager": "yarn@4.5.0",
48
+ "dependencies": {
49
+ "cross-fetch": "^4.1.0",
50
+ "storybook-multilevel-sort": "^2.0.1"
51
+ },
47
52
  "private": false,
48
53
  "exports": {
49
54
  ".": {
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ interface HostThemeProviderMockProps {
3
+ dataTestId?: string;
4
+ children: React.ReactNode;
5
+ }
6
+ /**
7
+ * TODO: Documentar
8
+ */
9
+ declare const HostThemeProviderMock: (props: HostThemeProviderMockProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default HostThemeProviderMock;
@@ -0,0 +1,29 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { DeviceType } from '@m4l/graphics';
3
+ interface TestAppWrapperProps {
4
+ forcedDeviceType?: DeviceType;
5
+ children: ReactNode;
6
+ }
7
+ /**
8
+ * TestWrapper is a React functional component that provides a consistent testing environment
9
+ * for components that rely on various context providers.
10
+ *
11
+ * It wraps the children components with the following contexts:
12
+ * - ModuleSkeletonContext: Provides the skeleton loading state for components that require it.
13
+ * - HostThemeProviderMock: Mocks the theme provider to ensure components are styled correctly during tests.
14
+ * - AppearanceComponentProvider: Supplies the necessary context for appearance-related components.
15
+ *
16
+ * This wrapper is useful for reducing redundancy in tests by encapsulating common providers,
17
+ * allowing for cleaner and more maintainable test code.
18
+ * @param {Object} props - The properties passed to the component.
19
+ * @param {ReactNode} props.children - The child components that will be rendered within the context providers.
20
+ * @example
21
+ * // Usage example
22
+ * render(
23
+ * <TestWrapper>
24
+ * <MyComponent />
25
+ * </TestWrapper>
26
+ * );
27
+ */
28
+ export declare const TestAppWrapper: FC<TestAppWrapperProps>;
29
+ export default TestAppWrapper;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Envoltorio para el estado de error
3
+ */
4
+ export declare const TestFormAutoValidation: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,69 @@
1
+ import { Formatters } from '@m4l/graphics';
2
+ import { HostToolsType, Toaster } from '@m4l/core';
3
+ import { BaseDataForTesting } from './types';
4
+ export declare const moduleIdForTesting = "testing";
5
+ export declare const moduleNameForTesting = "label_for_module_name";
6
+ export declare const dictionaryDataForTesting: {
7
+ data: {
8
+ module_name: string;
9
+ label1: string;
10
+ };
11
+ comp1: {
12
+ key1: string;
13
+ };
14
+ };
15
+ export declare const queryPrivilegesForTesting: string[];
16
+ export declare const resultpPrivilegesForTesting: {
17
+ data: {
18
+ priv1: boolean;
19
+ };
20
+ };
21
+ export declare const domainDataForTesting: {
22
+ data: {
23
+ name: string;
24
+ company_logo_small_url: string;
25
+ company_logo_normal_url: string;
26
+ };
27
+ };
28
+ export declare const domainCountry1DataForTesting: {
29
+ id: number;
30
+ currency: string;
31
+ currency_decimal_digits: number;
32
+ decimal_symbol: string;
33
+ thousands_symbol: string;
34
+ };
35
+ export declare const domainCountry2DataForTesting: {
36
+ id: number;
37
+ currency: string;
38
+ currency_decimal_digits: number;
39
+ decimal_symbol: string;
40
+ thousands_symbol: string;
41
+ };
42
+ export declare const resultAxiosOperationForTesting: {
43
+ data: {
44
+ a: number;
45
+ b: string;
46
+ };
47
+ };
48
+ export declare const networkPropsForTesting: {
49
+ method: string;
50
+ endPoint: string;
51
+ parms: {};
52
+ };
53
+ export declare const environmentDataForTesting: {
54
+ isLocalhost: boolean;
55
+ host: string;
56
+ database: string;
57
+ domain_token: string;
58
+ host_api_local: string;
59
+ host_api_remote: string;
60
+ host_static_assets: string;
61
+ environment_assets: string;
62
+ isIsolatation: boolean;
63
+ isMicroFrontend: boolean;
64
+ getModuleUrlIconAsset: () => string;
65
+ };
66
+ export declare const baseDataForTesting: BaseDataForTesting;
67
+ export declare const mock_toaster: Toaster;
68
+ export declare const hostToolsDataForTesting: HostToolsType;
69
+ export declare const formatterValues: Formatters;
@@ -0,0 +1 @@
1
+ export declare const TEST_PROP_ID = "data-testid";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * TODO: Documentar
3
+ */
4
+ export declare const getNameDataTestId: (componentName: string, slotKey: string, instaceId?: string) => string;
5
+ /**
6
+ * Utilidad que permite generar el nombre único que sirve para realizar las pruebas unitarias y de integración.
7
+ * Genera el atributo data-testid
8
+ * @param componentName -
9
+ * @param slotKey
10
+ */
11
+ export declare function getPropDataTestId(componentName: string, slotKey: string, instaceId?: string): {
12
+ "data-testid": string;
13
+ } | {
14
+ "data-testid"?: undefined;
15
+ };