@m4l/layouts 7.0.0 → 7.0.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 (84) hide show
  1. package/@types/index.d.ts +7 -0
  2. package/components/MFHostApp/index.d.ts +9 -3
  3. package/components/MFHostApp/index.js +60 -0
  4. package/components/MFHostApp/types.d.ts +3 -4
  5. package/components/MFNoAuthApp/index.d.ts +8 -2
  6. package/components/MFNoAuthApp/index.js +39 -0
  7. package/components/MFWindowsTitle/MFWindowsTitle.d.ts +9 -3
  8. package/components/MFWindowsTitle/MFWindowsTitle.js +10 -0
  9. package/contexts/AuthContext/index.d.ts +10 -4
  10. package/contexts/AuthContext/{index-DARkRRM4.js → index.js} +26 -45
  11. package/contexts/AuthContext/types.d.ts +6 -6
  12. package/contexts/AuthContext/types.js +9 -0
  13. package/{m4l_layouts/types.d.ts → hooks/index.js} +1 -1
  14. package/hooks/useAuth/index.d.ts +8 -1
  15. package/hooks/useAuth/{index-8hAi3guc.js → index.js} +4 -2
  16. package/hooks/useMasterDetail/index.d.ts +1 -1
  17. package/hooks/useMasterDetail/{index-D4QUQYYc.js → index.js} +1 -1
  18. package/hooks/useModule/index.d.ts +8 -1
  19. package/hooks/useModule/index.js +12 -0
  20. package/index.js +17 -14
  21. package/layouts/MasterDetailLayout/MasterDetailLayout.d.ts +9 -3
  22. package/layouts/MasterDetailLayout/MasterDetailLayout.js +110 -0
  23. package/layouts/MasterDetailLayout/classes/constants.js +4 -0
  24. package/layouts/MasterDetailLayout/classes/index.d.ts +8 -1
  25. package/layouts/MasterDetailLayout/classes/index.js +23 -0
  26. package/layouts/MasterDetailLayout/classes/types.d.ts +3 -3
  27. package/layouts/MasterDetailLayout/components/ButtonDetail/index.d.ts +9 -0
  28. package/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.d.ts +9 -3
  29. package/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.js +28 -0
  30. package/layouts/MasterDetailLayout/contexts/MasterDetailContext/types.d.ts +1 -1
  31. package/layouts/MasterDetailLayout/dicctionary.d.ts +1 -1
  32. package/layouts/MasterDetailLayout/dicctionary.js +17 -0
  33. package/layouts/MasterDetailLayout/index.d.ts +2 -0
  34. package/layouts/MasterDetailLayout/styles.d.ts +1 -2
  35. package/layouts/MasterDetailLayout/styles.js +7 -0
  36. package/layouts/ModuleLayout/ModuleLayout.d.ts +2 -3
  37. package/layouts/ModuleLayout/ModuleLayout.js +21 -0
  38. package/layouts/ModuleLayout/classes/constants.js +4 -0
  39. package/layouts/ModuleLayout/classes/index.d.ts +7 -0
  40. package/layouts/ModuleLayout/classes/index.js +25 -0
  41. package/layouts/ModuleLayout/classes/types.d.ts +3 -3
  42. package/layouts/ModuleLayout/contexts/ModuleContext/index.d.ts +9 -3
  43. package/layouts/ModuleLayout/contexts/ModuleContext/index.js +38 -0
  44. package/layouts/ModuleLayout/contexts/ModuleContext/types.d.ts +1 -1
  45. package/layouts/ModuleLayout/dicctionary.d.ts +1 -1
  46. package/layouts/ModuleLayout/dicctionary.js +11 -0
  47. package/layouts/ModuleLayout/index.d.ts +2 -0
  48. package/layouts/ModuleLayout/subcomponents/InnerModule/index.d.ts +1 -2
  49. package/layouts/ModuleLayout/subcomponents/InnerModule/index.js +20 -0
  50. package/layouts/ModuleLayout/subcomponents/InnerModule/styles.d.ts +1 -2
  51. package/layouts/ModuleLayout/subcomponents/InnerModule/styles.js +7 -0
  52. package/layouts/ModuleLayout/subcomponents/InnerModule/types.d.ts +1 -1
  53. package/layouts/ModuleLayout/types.d.ts +4 -4
  54. package/layouts/NoAuthModuleLayout/dicctionary.d.ts +1 -1
  55. package/layouts/NoAuthModuleLayout/dicctionary.js +10 -0
  56. package/layouts/NoAuthModuleLayout/index.d.ts +8 -2
  57. package/layouts/NoAuthModuleLayout/index.js +55 -0
  58. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +8 -2
  59. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.js +16 -0
  60. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.d.ts +1 -2
  61. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.js +15 -0
  62. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/index.d.ts +8 -2
  63. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/index.js +49 -0
  64. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/styles.d.ts +9 -10
  65. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/styles.js +115 -0
  66. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/index.d.ts +8 -2
  67. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/index.js +45 -0
  68. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/styles.d.ts +8 -9
  69. package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/styles.js +96 -0
  70. package/layouts/NoAuthModuleLayout/types.d.ts +1 -1
  71. package/layouts/index.js +1 -0
  72. package/package.json +33 -14
  73. package/test/setup.d.ts +0 -0
  74. package/test/utils.d.ts +12 -0
  75. package/vite-env.d.ts +3 -3
  76. package/components/MFHostApp/index-Bz3RUvvY.js +0 -90
  77. package/components/index-uQ5qk7MJ.js +0 -60
  78. package/hooks/useModule/index-FY5nsBmE.js +0 -10
  79. package/layouts/MasterDetailLayout/index-DeC4RoBs.js +0 -160
  80. package/layouts/ModuleLayout/index-DAtDuh6s.js +0 -129
  81. package/layouts/NoAuthModuleLayout/index-txgn4T5B.js +0 -419
  82. /package/{contexts/index-l0sNRNKZ.js → components/MFWindowsTitle/index.js} +0 -0
  83. /package/{hooks/index-l0sNRNKZ.js → components/index.js} +0 -0
  84. /package/{layouts/index-l0sNRNKZ.js → contexts/index.js} +0 -0
@@ -0,0 +1,115 @@
1
+ import { styled, alpha } from "@mui/material/styles";
2
+ const DesktopContentRoot = styled("div")(({ theme }) => ({
3
+ display: "flex",
4
+ borderRadius: "16px",
5
+ backgroundColor: theme.vars.palette.background.surface,
6
+ boxShadow: theme.vars.customShadows?.z4,
7
+ padding: "20px 0 20px 20px",
8
+ width: "100%",
9
+ height: "100%",
10
+ maxWidth: "965px",
11
+ maxHeight: "900px",
12
+ position: "relative",
13
+ overflow: "auto",
14
+ "& .M4LanguagePopover-root": {
15
+ position: "absolute",
16
+ top: "20px",
17
+ right: "20px",
18
+ zIndex: 1
19
+ },
20
+ "& .M4LIconButton-root.config-icon": {
21
+ position: "absolute",
22
+ top: "25px",
23
+ right: "56px",
24
+ zIndex: 1
25
+ }
26
+ }));
27
+ const DesktopBanner = styled("div")(({ theme }) => ({
28
+ display: "flex",
29
+ flexDirection: "column",
30
+ justifyContent: "center",
31
+ alignItems: "center",
32
+ borderRadius: "12px",
33
+ width: "100%",
34
+ maxWidth: "400px",
35
+ height: "100%",
36
+ backgroundColor: theme.vars.palette.primary.focusActive,
37
+ boxShadow: theme.vars.customShadows?.z4,
38
+ padding: "0 60px",
39
+ gap: "40px",
40
+ overflow: "hidden",
41
+ "& .MuiTypography-root": {
42
+ color: theme.palette.common?.white,
43
+ display: "flex",
44
+ justifyContent: "center",
45
+ textAlign: "center",
46
+ textTransform: "uppercase"
47
+ },
48
+ "& .M4LTypography-root .MuiSkeleton-root": {
49
+ backgroundColor: alpha(`${theme.colorSchemes.finalTheme.palette.common.white}`, 0.24),
50
+ margin: "auto"
51
+ }
52
+ }));
53
+ const ContainerLogo = styled("div")(({ theme }) => ({
54
+ display: "flex",
55
+ width: "84px",
56
+ height: "84px",
57
+ borderRadius: "6px",
58
+ backgroundColor: theme.vars.palette.primary?.focusActive,
59
+ justifyContent: "center",
60
+ alignItems: "center",
61
+ boxShadow: `0px 4px 8px ${alpha(theme.colorSchemes.finalTheme.palette.grey["700"] || "", 0.16)}`,
62
+ "& .M4LImage-root": {
63
+ backgroundColor: theme.vars.palette.common?.white,
64
+ borderRadius: "6px"
65
+ }
66
+ }));
67
+ const CompanyName = styled("div")(() => ({
68
+ display: "flex",
69
+ flexDirection: "column",
70
+ gap: "5px",
71
+ width: "100%"
72
+ }));
73
+ const CompanyLeyend = styled("div")(() => ({
74
+ display: "flex",
75
+ flexDirection: "column",
76
+ gap: "5px",
77
+ width: "100%"
78
+ }));
79
+ const FormContent = styled("div")(() => ({
80
+ display: "flex",
81
+ flexDirection: "column",
82
+ padding: "0 60px 0 80px",
83
+ margin: "auto 0",
84
+ width: "100%",
85
+ height: "auto",
86
+ gap: "20px"
87
+ }));
88
+ const WrapperFormContent = styled("div")(() => ({
89
+ display: "flex",
90
+ width: "100%",
91
+ height: "100%"
92
+ }));
93
+ const ContainerModuleName = styled("div")(() => ({
94
+ display: "flex",
95
+ flexDirection: "column",
96
+ width: "100%",
97
+ gap: "4px"
98
+ }));
99
+ styled("div")(() => ({
100
+ display: "flex",
101
+ width: "100%",
102
+ height: "100%",
103
+ justifyContent: "center",
104
+ alignItems: "center"
105
+ }));
106
+ export {
107
+ ContainerLogo as C,
108
+ DesktopContentRoot as D,
109
+ FormContent as F,
110
+ WrapperFormContent as W,
111
+ DesktopBanner as a,
112
+ CompanyName as b,
113
+ CompanyLeyend as c,
114
+ ContainerModuleName as d
115
+ };
@@ -1,2 +1,8 @@
1
- /// <reference types="react" />
2
- export declare const MobileContent: () => import("react").JSX.Element;
1
+ /**
2
+ * Contenido de la vista mobile
3
+ * @author Juan Escobar - automatic
4
+ * @createdAt 2024-10-09 19:56:26 - automatic
5
+ * @updatedAt 2024-10-09 20:00:30 - automatic
6
+ * @updatedUser Juan Escobar - automatic
7
+ */
8
+ export declare const MobileContent: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,45 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Image, Typography, LanguagePopover, ScrollBar } from "@m4l/components";
3
+ import { M as MobileContentRoot, a as MobileBanner, C as ContainerLogo, b as CompanyName, W as WrapperFormContent, F as FormContent, c as ContainerModuleName } from "./styles.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(MobileContentRoot, { children: [
10
+ /* @__PURE__ */ jsxs(MobileBanner, { children: [
11
+ /* @__PURE__ */ jsx(ContainerLogo, { children: /* @__PURE__ */ jsx(Image, { src: companyLogoSmallUrl, ratio: "1:1", width: "44px", height: "44px" }) }),
12
+ /* @__PURE__ */ jsxs(CompanyName, { children: [
13
+ /* @__PURE__ */ jsx(
14
+ Typography,
15
+ {
16
+ variant: "subtitleDens",
17
+ skeletonWidth: "70%",
18
+ skeletonHeight: "24px",
19
+ children: name
20
+ }
21
+ ),
22
+ /* @__PURE__ */ jsx(Typography, { variant: "paragraph", skeletonWidth: "40%", skeletonHeight: "20px", children: getLabel("company_name_subtitle") })
23
+ ] }),
24
+ /* @__PURE__ */ jsx(LanguagePopover, {})
25
+ ] }),
26
+ /* @__PURE__ */ jsx(WrapperFormContent, { children: /* @__PURE__ */ jsx(ScrollBar, { children: /* @__PURE__ */ jsxs(FormContent, { children: [
27
+ /* @__PURE__ */ jsxs(ContainerModuleName, { children: [
28
+ /* @__PURE__ */ jsx(Typography, { variant: "h5", skeletonWidth: "20%", skeletonHeight: "36px", children: getLabel("module_name") }),
29
+ /* @__PURE__ */ jsx(
30
+ Typography,
31
+ {
32
+ variant: "paragraph",
33
+ skeletonWidth: "40%",
34
+ skeletonHeight: "20px",
35
+ children: getLabel("module_description")
36
+ }
37
+ )
38
+ ] }),
39
+ children
40
+ ] }) }) })
41
+ ] });
42
+ };
43
+ export {
44
+ MobileContent as M
45
+ };
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
- export declare const MobileContentRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
- export declare const MobileBanner: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
4
- export declare const ContainerImageLanguage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
- export declare const ContainerLogo: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
- export declare const CompanyName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
- export declare const FormContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
- export declare const WrapperFormContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
- export declare const ContainerModuleName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1
+ export declare const MobileContentRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
2
+ export declare const MobileBanner: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
+ export declare const ContainerImageLanguage: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
4
+ export declare const ContainerLogo: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
+ export declare const CompanyName: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
+ export declare const FormContent: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
+ export declare const WrapperFormContent: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
+ export declare const ContainerModuleName: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,96 @@
1
+ import { styled, alpha } from "@mui/material/styles";
2
+ const MobileContentRoot = styled("div")(({ theme }) => ({
3
+ display: "flex",
4
+ flexDirection: "column",
5
+ width: "100%",
6
+ height: "100%",
7
+ backgroundColor: theme.vars.palette.background.surface,
8
+ padding: "12px",
9
+ gap: "32px"
10
+ }));
11
+ const MobileBanner = styled("div")(({ theme }) => ({
12
+ display: "flex",
13
+ flexDirection: "column",
14
+ padding: "12px",
15
+ gap: "20px",
16
+ width: "100%",
17
+ backgroundColor: theme.vars.palette.primary.focusActive,
18
+ boxShadow: theme.customShadows?.z4,
19
+ position: "relative",
20
+ borderRadius: "8px",
21
+ "& .M4LanguagePopover-root": {
22
+ position: "absolute",
23
+ top: "12px",
24
+ right: "12px",
25
+ zIndex: 1
26
+ },
27
+ "& .M4LIconButton-root.config-icon": {
28
+ position: "absolute",
29
+ top: "13px",
30
+ right: "40px",
31
+ zIndex: 1,
32
+ "& .M4LIcon-root .M4LIcon-icon": {
33
+ backgroundColor: theme.vars.palette.common?.white
34
+ }
35
+ },
36
+ "& .MuiTypography-root": {
37
+ color: theme.vars.palette.common?.white,
38
+ display: "flex",
39
+ textTransform: "uppercase"
40
+ },
41
+ "& .MuiSkeleton-root": {
42
+ backgroundColor: alpha(`${theme.colorSchemes.finalTheme.palette.common.white}`, 0.24),
43
+ margin: "auto"
44
+ }
45
+ }));
46
+ styled("div")(() => ({
47
+ display: "flex"
48
+ }));
49
+ const ContainerLogo = styled("div")(({ theme }) => ({
50
+ display: "flex",
51
+ width: "52px",
52
+ height: "52px",
53
+ borderRadius: "6px",
54
+ backgroundColor: theme.vars.palette.primary?.focusActive,
55
+ justifyContent: "center",
56
+ alignItems: "center",
57
+ boxShadow: `0px 4px 8px ${alpha(theme.colorSchemes.finalTheme.palette.grey["700"] || "", 0.16)}`,
58
+ "& .M4LImage-root": {
59
+ backgroundColor: theme.vars.palette.common?.white,
60
+ borderRadius: "6px"
61
+ }
62
+ }));
63
+ const CompanyName = styled("div")(() => ({
64
+ display: "flex",
65
+ flexDirection: "column",
66
+ width: "100%"
67
+ }));
68
+ const FormContent = styled("div")(() => ({
69
+ display: "flex",
70
+ flexDirection: "column",
71
+ padding: "12px",
72
+ margin: "auto 0",
73
+ width: "100%",
74
+ gap: "20px"
75
+ }));
76
+ const WrapperFormContent = styled("div")(() => ({
77
+ display: "flex",
78
+ width: "100%",
79
+ height: "100%",
80
+ overflow: "hidden"
81
+ }));
82
+ const ContainerModuleName = styled("div")(() => ({
83
+ display: "flex",
84
+ flexDirection: "column",
85
+ width: "100%",
86
+ gap: "4px"
87
+ }));
88
+ export {
89
+ ContainerLogo as C,
90
+ FormContent as F,
91
+ MobileContentRoot as M,
92
+ WrapperFormContent as W,
93
+ MobileBanner as a,
94
+ CompanyName as b,
95
+ ContainerModuleName as c
96
+ };
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  export interface ContainerProps {
3
3
  vertical: boolean;
4
4
  }
5
- export declare type MenuActionType = 'main' | 'allways' | 'normal';
5
+ export type MenuActionType = 'main' | 'allways' | 'normal';
6
6
  export declare interface NoAuthBaseProviderProps {
7
7
  subtitle?: string;
8
8
  companyLogoSmallUrl: string;
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1,26 +1,43 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "license": "UNLICENSED",
5
5
  "author": "M4L Team",
6
- "private": false,
7
- "dependencies": {
8
- "@mui/material": "5.15.19"
6
+ "lint-staged": {
7
+ "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
9
8
  },
10
9
  "peerDependencies": {
11
- "@m4l/core": "^2.0.0",
12
- "@m4l/graphics": "^6.0.0",
13
- "@m4l/styles": "^6.0.0",
14
- "@m4l/components": "^7.0.0",
15
- "@types/react": "^17.0.0 || ^18.0.0",
16
- "@types/react-dom": "^17.0.0 || ^18.0.0",
17
- "eventemitter3": "^4.0.7",
10
+ "@m4l/components": "^7.1.2",
11
+ "@m4l/core": "^2.0.10",
12
+ "@m4l/graphics": "^7.0.2",
13
+ "@m4l/styles": "^7.0.1",
14
+ "@mui/lab": "5.0.0-alpha.173",
15
+ "@mui/material": "^5.15.19",
16
+ "@mui/x-date-pickers": "^6.11.1",
17
+ "@types/react": "^18.0.0",
18
+ "@types/react-dom": "^18.0.0",
18
19
  "history": "5.3.0",
19
20
  "nprogress": "^0.2.0",
20
- "react": "^17.0.0 || ^18.0.0",
21
- "react-dom": "^17.0.0 || ^18.0.0",
21
+ "react": "^18.0.0",
22
+ "react-dom": "^18.0.0",
22
23
  "react-toastify": "10.0.5"
23
24
  },
25
+ "resolutions": {
26
+ "glob": "^10.4.5",
27
+ "react": "^18.0.0",
28
+ "@types/react": "^18.0.0",
29
+ "@types/react-dom": "^18.0.0",
30
+ "react-dom": "^18.0.0",
31
+ "@vitejs/plugin-react": "^4.0.0"
32
+ },
33
+ "overrides": {
34
+ "glob": "^10.4.5",
35
+ "eslint": "^9.0.0",
36
+ "react": "^18.0.0",
37
+ "@types/react": "^18.0.0",
38
+ "@types/react-dom": "^18.0.0",
39
+ "react-dom": "^18.0.0"
40
+ },
24
41
  "files": [
25
42
  "*"
26
43
  ],
@@ -35,5 +52,7 @@
35
52
  },
36
53
  "engines": {
37
54
  "node": ">=12.0.0"
38
- }
55
+ },
56
+ "packageManager": "yarn@4.5.0",
57
+ "private": false
39
58
  }
File without changes
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * Custom render function to wrap providers
4
+ * @author Juan Escobar - automatic
5
+ * @createdAt 2024-10-09 19:56:26 - automatic
6
+ * @updatedAt 2024-10-09 20:00:30 - automatic
7
+ * @updatedUser Juan Escobar - automatic
8
+ */
9
+ declare const customRender: (ui: React.ReactElement, options?: {}) => import('@testing-library/react').RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
10
+ export * from '@testing-library/react';
11
+ export { default as userEvent } from '@testing-library/user-event';
12
+ export { customRender as render };
package/vite-env.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- /// <reference types="vite/client" />
2
- /// <reference types="vitest" />
3
- /// <reference types="vitest/importMeta" />
1
+ /// <reference types="vite/client" />
2
+ /// <reference types="vitest" />
3
+ /// <reference types="vitest/importMeta" />
@@ -1,90 +0,0 @@
1
- import { unstable_HistoryRouter } from "react-router-dom";
2
- import { EnvironmentProvider, HostToolsProvider, NetworkProvider, DomainCountryProvider } from "@m4l/core";
3
- import { LocalesProvider, HostThemeProvider, ResponsiveContainerProvider, FormatterProvider } from "@m4l/graphics";
4
- import { BaseModule, WindowToolsMFProvider, DynamicMFParmsProvider, AppearanceComponentProvider } from "@m4l/components";
5
- import { useTheme } from "@mui/material";
6
- import { jsx } from "react/jsx-runtime";
7
- import { M as MFWindowsTitle } from "../index-uQ5qk7MJ.js";
8
- function MFHostApp(props) {
9
- const {
10
- children,
11
- currentLocale,
12
- hostTheme,
13
- environment,
14
- hostTools,
15
- axiosOperation,
16
- formatters,
17
- isAuth = true,
18
- moduleId,
19
- moduleNameField,
20
- skeletonFlags,
21
- privileges,
22
- componentsDictionary,
23
- dynamicMFStore,
24
- windowTools,
25
- observedDivRef,
26
- isAddEditModule = false
27
- } = props;
28
- const {
29
- generalSettings
30
- } = useTheme();
31
- return /* @__PURE__ */ jsx(EnvironmentProvider, {
32
- ...environment,
33
- children: /* @__PURE__ */ jsx(HostToolsProvider, {
34
- ...hostTools,
35
- children: /* @__PURE__ */ jsx(NetworkProvider, {
36
- axiosOperation,
37
- children: /* @__PURE__ */ jsx(LocalesProvider, {
38
- isMicroFrontEnd: true,
39
- localeHost: currentLocale,
40
- children: /* @__PURE__ */ jsx(HostThemeProvider, {
41
- isMicroFrontEnd: true,
42
- ...hostTheme,
43
- isMobile: generalSettings?.isMobile,
44
- children: /* @__PURE__ */ jsx(ResponsiveContainerProvider, {
45
- observedDivRef,
46
- children: /* @__PURE__ */ jsx(unstable_HistoryRouter, {
47
- history: hostTools.history,
48
- children: /* @__PURE__ */ jsx(DomainCountryProvider, {
49
- isMicroFrontEnd: true,
50
- id: dynamicMFStore?.getState().dynamicMFParameters?.id || 1,
51
- currency: formatters.currencyFormatter.code,
52
- currency_decimal_digits: formatters.currencyFormatter.decimalDigits,
53
- decimal_symbol: formatters.numberFormatter.decimalSymbol,
54
- thousands_symbol: formatters.numberFormatter.thousandsSymbol,
55
- children: /* @__PURE__ */ jsx(BaseModule, {
56
- isAuth,
57
- moduleId,
58
- moduleNameField,
59
- componentsDictionary,
60
- skeletonFlags,
61
- privileges,
62
- children: /* @__PURE__ */ jsx(FormatterProvider, {
63
- isMicroFrontEnd: true,
64
- ...formatters,
65
- children: /* @__PURE__ */ jsx(WindowToolsMFProvider, {
66
- ...windowTools,
67
- children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, {
68
- store: dynamicMFStore,
69
- children: /* @__PURE__ */ jsx(MFWindowsTitle, {
70
- isAddEditModule,
71
- children: /* @__PURE__ */ jsx(AppearanceComponentProvider, {
72
- children
73
- })
74
- })
75
- })
76
- })
77
- })
78
- })
79
- })
80
- })
81
- })
82
- })
83
- })
84
- })
85
- })
86
- });
87
- }
88
- export {
89
- MFHostApp as M
90
- };
@@ -1,60 +0,0 @@
1
- import { DomainCountryProvider } from "@m4l/core";
2
- import { FormatterProvider, ResponsiveContainerProvider } from "@m4l/graphics";
3
- import { BaseModule, useSetWindowsTitle } from "@m4l/components";
4
- import { jsx } from "react/jsx-runtime";
5
- import { Fragment } from "react";
6
- function MFNoAuthApp(props) {
7
- const {
8
- children,
9
- formatters,
10
- moduleId,
11
- moduleNameField,
12
- skeletonFlags,
13
- privileges,
14
- componentsDictionary,
15
- isAuth,
16
- observedDivRef
17
- } = props;
18
- const domianCountry = {
19
- id: 1,
20
- currency: "USD",
21
- currency_decimal_digits: 2,
22
- decimal_symbol: ".",
23
- thousands_symbol: ","
24
- };
25
- return /* @__PURE__ */ jsx(DomainCountryProvider, {
26
- isMicroFrontEnd: true,
27
- ...domianCountry,
28
- children: /* @__PURE__ */ jsx(BaseModule, {
29
- isAuth,
30
- moduleId,
31
- moduleNameField,
32
- componentsDictionary,
33
- skeletonFlags,
34
- privileges,
35
- children: /* @__PURE__ */ jsx(FormatterProvider, {
36
- isMicroFrontEnd: true,
37
- ...formatters,
38
- children: /* @__PURE__ */ jsx(ResponsiveContainerProvider, {
39
- observedDivRef,
40
- children
41
- })
42
- })
43
- })
44
- });
45
- }
46
- function MFWindowsTitle({
47
- isAddEditModule = false,
48
- children
49
- }) {
50
- useSetWindowsTitle({
51
- isAddEditModule
52
- });
53
- return /* @__PURE__ */ jsx(Fragment, {
54
- children
55
- });
56
- }
57
- export {
58
- MFWindowsTitle as M,
59
- MFNoAuthApp as a
60
- };
@@ -1,10 +0,0 @@
1
- import { useContext } from "react";
2
- import { M as ModuleContext } from "../../layouts/ModuleLayout/index-DAtDuh6s.js";
3
- const useModule = () => {
4
- const context = useContext(ModuleContext);
5
- if (!context) throw new Error("useModule context must be use inside ModuleContext");
6
- return context;
7
- };
8
- export {
9
- useModule as u
10
- };