@m4l/layouts 9.1.8 → 9.1.10-beta.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 (129) hide show
  1. package/.storybook/constants.d.ts +21 -0
  2. package/.storybook/decorators/WithContexts/WithContexts.d.ts +5 -0
  3. package/.storybook/decorators/WithContexts/constants.d.ts +10 -0
  4. package/.storybook/decorators/WithContexts/index.d.ts +1 -0
  5. package/.storybook/decorators/WithContexts/styles.d.ts +1 -0
  6. package/.storybook/decorators/WithContexts/subcomponents/AppWithTheme.d.ts +6 -0
  7. package/.storybook/decorators/WithContexts/types.d.ts +7 -0
  8. package/.storybook/decorators/index.d.ts +1 -0
  9. package/.storybook/main.d.ts +3 -0
  10. package/.storybook/storybook.vite.d.ts +2 -0
  11. package/.storybook/utils/getGlobalsFromSearchParams.d.ts +7 -0
  12. package/.storybook/utils/getStylesColorsByMode.d.ts +744 -0
  13. package/components/MFHostApp/MFHostApp.d.ts +6 -0
  14. package/components/MFHostApp/MFHostApp.js +59 -0
  15. package/components/MFHostApp/index.d.ts +2 -10
  16. package/components/MFHostApp/index.js +1 -60
  17. package/components/MFHostApp/types.d.ts +4 -1
  18. package/components/MFNoAuthApp/index.d.ts +0 -4
  19. package/components/MFNoAuthApp/index.js +3 -4
  20. package/components/MFNoAuthApp/types.d.ts +4 -1
  21. package/components/MFWindowsTitle/MFWindowsTitle.d.ts +0 -4
  22. package/components/ModuleDetailTabs/ModuleDetailTabs.d.ts +5 -0
  23. package/components/ModuleDetailTabs/ModuleDetailTabs.js +42 -0
  24. package/components/ModuleDetailTabs/index.d.ts +2 -0
  25. package/components/ModuleDetailTabs/index.js +1 -0
  26. package/components/ModuleDetailTabs/types.d.ts +88 -0
  27. package/components/ModuleDetailTabs/useModuleDatailTabs.d.ts +308 -0
  28. package/components/ModuleDetailTabs/useModuleDatailTabs.js +86 -0
  29. package/components/index.d.ts +3 -2
  30. package/contexts/AuthContext/index.d.ts +0 -4
  31. package/hooks/index.d.ts +1 -0
  32. package/hooks/useAuth/index.d.ts +0 -4
  33. package/hooks/useDynamicAccordions/index.d.ts +2 -0
  34. package/hooks/useDynamicAccordions/index.js +1 -0
  35. package/hooks/useDynamicAccordions/types.d.ts +42 -0
  36. package/hooks/useDynamicAccordions/useBaseAccordions.d.ts +5 -0
  37. package/hooks/useDynamicAccordions/useBaseAccordions.js +38 -0
  38. package/hooks/useDynamicAccordions/useDynamicAccordions.d.ts +6 -0
  39. package/hooks/useDynamicAccordions/useDynamicAccordions.js +18 -0
  40. package/hooks/useMasterDetail/index.d.ts +1 -1
  41. package/hooks/useModule/index.d.ts +0 -4
  42. package/index.d.ts +1 -0
  43. package/index.js +14 -9
  44. package/layouts/MasterDetailLayout/MasterDetailLayout.d.ts +0 -4
  45. package/layouts/MasterDetailLayout/MasterDetailLayout.js +6 -6
  46. package/layouts/MasterDetailLayout/classes/index.d.ts +0 -4
  47. package/layouts/MasterDetailLayout/components/ButtonDetail/index.d.ts +0 -4
  48. package/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.d.ts +0 -4
  49. package/layouts/MasterDetailLayout/dicctionary.js +2 -11
  50. package/layouts/MasterDetailLayout/index.d.ts +2 -0
  51. package/layouts/MasterDetailLayout/index.js +1 -0
  52. package/layouts/ModuleLayout/ModuleLayout.js +6 -3
  53. package/layouts/ModuleLayout/constants.d.ts +1 -0
  54. package/layouts/ModuleLayout/constants.js +4 -0
  55. package/layouts/ModuleLayout/contexts/ModuleContext/index.d.ts +0 -4
  56. package/layouts/ModuleLayout/contexts/ModuleContext/index.js +0 -5
  57. package/layouts/ModuleLayout/slots/ModuleLayoutEnum.d.ts +3 -0
  58. package/layouts/ModuleLayout/slots/ModuleLayoutEnum.js +7 -0
  59. package/layouts/ModuleLayout/slots/ModuleLayoutSlots.d.ts +1 -0
  60. package/layouts/ModuleLayout/slots/ModuleLayoutSlots.js +11 -0
  61. package/layouts/ModuleLayout/styles.d.ts +2 -0
  62. package/layouts/ModuleLayout/styles.js +16 -0
  63. package/layouts/ModuleLayout/subcomponents/BaseModuleLayout/index.d.ts +2 -0
  64. package/layouts/ModuleLayout/subcomponents/BaseModuleLayout/index.js +20 -0
  65. package/layouts/ModuleLayout/subcomponents/{InnerModule → BaseModuleLayout}/types.d.ts +1 -0
  66. package/layouts/ModuleLayout/types.d.ts +8 -1
  67. package/layouts/NoAuthModuleLayout/constants.d.ts +1 -0
  68. package/layouts/NoAuthModuleLayout/constants.js +4 -0
  69. package/layouts/NoAuthModuleLayout/index.d.ts +4 -5
  70. package/layouts/NoAuthModuleLayout/index.js +4 -5
  71. package/layouts/NoAuthModuleLayout/slots/NoAuthModuleLayoutEnum.d.ts +25 -0
  72. package/layouts/NoAuthModuleLayout/slots/NoAuthModuleLayoutEnum.js +33 -0
  73. package/layouts/NoAuthModuleLayout/slots/NoAuthModuleLayoutSlots.d.ts +19 -0
  74. package/layouts/NoAuthModuleLayout/slots/NoAuthModuleLayoutSlots.js +100 -0
  75. package/layouts/NoAuthModuleLayout/styles.d.ts +2 -0
  76. package/layouts/NoAuthModuleLayout/styles.js +314 -0
  77. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/index.d.ts +4 -0
  78. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/index.js +16 -0
  79. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/DesktopContent/index.d.ts +4 -0
  80. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/DesktopContent/index.js +47 -0
  81. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/MobileContent/index.d.ts +4 -0
  82. package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/MobileContent/index.js +43 -0
  83. package/layouts/NoAuthModuleLayout/tests/NoAuthModuleLayout.test.d.ts +1 -0
  84. package/layouts/NoAuthModuleLayout/types.d.ts +45 -0
  85. package/layouts/index.d.ts +1 -2
  86. package/package.json +4 -3
  87. package/storybook/layouts/ModuleLayout/ModuleLayout.stories.d.ts +6 -0
  88. package/storybook/layouts/ModuleLayout/moks/mokData.d.ts +14 -0
  89. package/storybook/layouts/ModuleLayout/subcomponents/ClientsHeaderActions.d.ts +4 -0
  90. package/storybook/layouts/ModuleLayout/subcomponents/RenderModuleLayout.d.ts +6 -0
  91. package/storybook/layouts/ModuleLayout/subcomponents/UsersHeaderActions.d.ts +4 -0
  92. package/storybook/layouts/ModuleLayout/subcomponents/WithExtendedContainer.d.ts +5 -0
  93. package/storybook/layouts/NoAuthModuleLayout/NoAuthModuleLayout.stories.d.ts +9 -0
  94. package/test/HostThemeProviderMock.d.ts +10 -0
  95. package/test/TestAppWrapper.d.ts +29 -0
  96. package/test/TestFormAutoValidation.d.ts +4 -0
  97. package/test/constants.d.ts +69 -0
  98. package/test/constants_no_mock.d.ts +1 -0
  99. package/test/getNameDataTestId.d.ts +15 -0
  100. package/test/index.d.ts +4 -0
  101. package/test/mocks.d.ts +24 -0
  102. package/test/types.d.ts +4 -0
  103. package/test/utils.d.ts +23 -10
  104. package/utils/createAppMF.d.ts +13 -0
  105. package/utils/createAppMF.js +58 -0
  106. package/utils/index.d.ts +1 -0
  107. package/utils/index.js +1 -0
  108. package/vite-env.d.ts +19 -0
  109. package/layouts/ModuleLayout/classes/constants.d.ts +0 -1
  110. package/layouts/ModuleLayout/classes/constants.js +0 -4
  111. package/layouts/ModuleLayout/classes/index.d.ts +0 -14
  112. package/layouts/ModuleLayout/classes/index.js +0 -25
  113. package/layouts/ModuleLayout/classes/types.d.ts +0 -7
  114. package/layouts/ModuleLayout/subcomponents/InnerModule/index.d.ts +0 -2
  115. package/layouts/ModuleLayout/subcomponents/InnerModule/index.js +0 -20
  116. package/layouts/ModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -1
  117. package/layouts/ModuleLayout/subcomponents/InnerModule/styles.js +0 -7
  118. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +0 -8
  119. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.js +0 -16
  120. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -1
  121. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.js +0 -15
  122. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/index.d.ts +0 -8
  123. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/index.js +0 -47
  124. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/styles.d.ts +0 -9
  125. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/styles.js +0 -115
  126. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/index.d.ts +0 -8
  127. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/index.js +0 -43
  128. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/styles.d.ts +0 -8
  129. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/styles.js +0 -96
@@ -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>;
@@ -1,6 +1,5 @@
1
1
  export { ModuleLayout } from './ModuleLayout/ModuleLayout';
2
2
  export * from './ModuleLayout/dicctionary';
3
- export { MasterDetailLayout } from './MasterDetailLayout/MasterDetailLayout';
4
- export * from './MasterDetailLayout/dicctionary';
3
+ export * from './MasterDetailLayout';
5
4
  export { NoAuthModuleLayout } from './NoAuthModuleLayout';
6
5
  export * from './NoAuthModuleLayout/dicctionary';
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
- "version": "9.1.8",
3
+ "version": "9.1.10-beta.1",
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.2.15-beta.2",
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",
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { AreasAdmin, PaperForm } from '@m4l/components';
3
+ declare const meta: Meta<typeof AreasAdmin>;
4
+ type Story = StoryObj<typeof PaperForm>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1,14 @@
1
+ export declare const MOCK_CLIENTS: {
2
+ nombre: string;
3
+ correo: string;
4
+ telefono: string;
5
+ direccion: string;
6
+ ciudad: string;
7
+ }[];
8
+ export declare const MOCK_USERS: {
9
+ nombre: string;
10
+ apellido: string;
11
+ email: string;
12
+ telefono: string;
13
+ activo: boolean;
14
+ }[];
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Componente que define las acciones del header para "clientes"
3
+ */
4
+ export declare function ClientsHeaderActions(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Render para utilizar el componente ModuleLayout
3
+ * en AreasViewer en el storybook
4
+ */
5
+ declare const RenderModuleLayout: () => import("react/jsx-runtime").JSX.Element;
6
+ export default RenderModuleLayout;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Componente que define las acciones del header para "usuarios"
3
+ */
4
+ export declare function UsersHeaderActions(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { StoryContext, StoryFn } from '@storybook/react';
2
+ /**
3
+ * con contenedor extendido
4
+ */
5
+ export declare const WithExtendedContainer: (MyStory: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from '@storybook/react/*';
2
+ import { NoAuthModuleLayout } from '../../../src/layouts/NoAuthModuleLayout/index';
3
+ declare const meta: Meta<typeof NoAuthModuleLayout>;
4
+ type Story = StoryObj<typeof NoAuthModuleLayout>;
5
+ /**
6
+ * NoAuthModuleLayout component por defecto con el logo de la compañía.
7
+ */
8
+ export declare const Default: Story;
9
+ export default meta;
@@ -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;