@m4l/layouts 0.1.26 → 0.1.30

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 (133) hide show
  1. package/{dist/components/MFIsolationApp/index.b21e5671.js → components/MFIsolationApp/index.b89e6800.js} +38 -37
  2. package/{dist/components/index.deb4e7ac.js → components/index.37205bf4.js} +1 -1
  3. package/index.js +42 -0
  4. package/m4l_layouts/types.d.ts +0 -0
  5. package/package.json +10 -53
  6. package/.eslintignore +0 -2
  7. package/.eslintrc.cjs +0 -118
  8. package/.gitignore +0 -23
  9. package/.gitlab-ci.yml +0 -16
  10. package/.prettierignore +0 -3
  11. package/.prettierrc.json +0 -26
  12. package/.vscode/settings.json +0 -50
  13. package/dist/index.js +0 -41
  14. package/dist/package.json +0 -36
  15. package/src/@types/index.ts +0 -8
  16. package/src/components/BaseModule/index.tsx +0 -59
  17. package/src/components/BaseModule/types.ts +0 -12
  18. package/src/components/MFHostApp/index.tsx +0 -95
  19. package/src/components/MFHostApp/types.ts +0 -16
  20. package/src/components/MFIsolationApp/index.tsx +0 -164
  21. package/src/components/MFIsolationApp/subcomponents/MFAuthApp/index.tsx +0 -98
  22. package/src/components/MFIsolationApp/subcomponents/MFAuthApp/types.ts +0 -7
  23. package/src/components/MFIsolationApp/types.ts +0 -12
  24. package/src/components/index.ts +0 -5
  25. package/src/contexts/AuthContext/index.tsx +0 -189
  26. package/src/contexts/AuthContext/types.ts +0 -65
  27. package/src/contexts/index.ts +0 -1
  28. package/src/hooks/index.ts +0 -5
  29. package/src/hooks/useAuth/index.ts +0 -12
  30. package/src/hooks/useMasterDetail/index.ts +0 -6
  31. package/src/hooks/useModule/index.ts +0 -13
  32. package/src/index.ts +0 -7
  33. package/src/layouts/MasterDetailLayout/components/ButtonDetail/index.tsx +0 -38
  34. package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.tsx +0 -34
  35. package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/types.ts +0 -19
  36. package/src/layouts/MasterDetailLayout/dicctionary.ts +0 -20
  37. package/src/layouts/MasterDetailLayout/index.tsx +0 -165
  38. package/src/layouts/MasterDetailLayout/types.ts +0 -11
  39. package/src/layouts/ModuleLayout/contexts/ModuleContext/index.tsx +0 -56
  40. package/src/layouts/ModuleLayout/contexts/ModuleContext/types.ts +0 -23
  41. package/src/layouts/ModuleLayout/dicctionary.ts +0 -11
  42. package/src/layouts/ModuleLayout/index.tsx +0 -59
  43. package/src/layouts/ModuleLayout/subcomponents/InnerModule/index.tsx +0 -35
  44. package/src/layouts/ModuleLayout/subcomponents/InnerModule/styles.tsx +0 -31
  45. package/src/layouts/ModuleLayout/subcomponents/InnerModule/types.ts +0 -11
  46. package/src/layouts/ModuleLayout/types.ts +0 -31
  47. package/src/layouts/NoAuthModuleLayout/dicctionary.ts +0 -9
  48. package/src/layouts/NoAuthModuleLayout/index.tsx +0 -85
  49. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.tsx +0 -43
  50. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.tsx +0 -6
  51. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.tsx +0 -14
  52. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.tsx +0 -7
  53. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.tsx +0 -25
  54. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.tsx +0 -11
  55. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.tsx +0 -17
  56. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.tsx +0 -19
  57. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.tsx +0 -25
  58. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.tsx +0 -8
  59. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.ts +0 -5
  60. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.ts +0 -5
  61. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.tsx +0 -28
  62. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.tsx +0 -16
  63. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/types.ts +0 -5
  64. package/src/layouts/NoAuthModuleLayout/types.ts +0 -22
  65. package/src/layouts/index.ts +0 -8
  66. package/src/test/setup.ts +0 -1
  67. package/src/test/utils.tsx +0 -20
  68. package/src/vite-env.d.ts +0 -3
  69. package/tsconfig.json +0 -29
  70. package/tsconfig.node.json +0 -8
  71. package/vite.config.ts +0 -172
  72. /package/{dist/components → components}/BaseModule/index.6309486a.js +0 -0
  73. /package/{dist/components → components}/BaseModule/index.d.ts +0 -0
  74. /package/{dist/components → components}/BaseModule/types.d.ts +0 -0
  75. /package/{dist/components → components}/MFHostApp/index.1700d13a.js +0 -0
  76. /package/{dist/components → components}/MFHostApp/index.d.ts +0 -0
  77. /package/{dist/components → components}/MFHostApp/types.d.ts +0 -0
  78. /package/{dist/components → components}/MFIsolationApp/index.d.ts +0 -0
  79. /package/{dist/components → components}/MFIsolationApp/subcomponents/MFAuthApp/index.d.ts +0 -0
  80. /package/{dist/components → components}/MFIsolationApp/subcomponents/MFAuthApp/types.d.ts +0 -0
  81. /package/{dist/components → components}/MFIsolationApp/types.d.ts +0 -0
  82. /package/{dist/components → components}/index.d.ts +0 -0
  83. /package/{dist/contexts → contexts}/AuthContext/index.6f966215.js +0 -0
  84. /package/{dist/contexts → contexts}/AuthContext/index.d.ts +0 -0
  85. /package/{dist/contexts → contexts}/AuthContext/types.d.ts +0 -0
  86. /package/{dist/contexts → contexts}/index.b46a2699.js +0 -0
  87. /package/{dist/contexts → contexts}/index.d.ts +0 -0
  88. /package/{dist/hooks → hooks}/index.2022a179.js +0 -0
  89. /package/{dist/hooks → hooks}/index.d.ts +0 -0
  90. /package/{dist/hooks → hooks}/useAuth/index.cb6a3420.js +0 -0
  91. /package/{dist/hooks → hooks}/useAuth/index.d.ts +0 -0
  92. /package/{dist/hooks → hooks}/useMasterDetail/index.1b024fd5.js +0 -0
  93. /package/{dist/hooks → hooks}/useMasterDetail/index.d.ts +0 -0
  94. /package/{dist/hooks → hooks}/useModule/index.6ff7d08a.js +0 -0
  95. /package/{dist/hooks → hooks}/useModule/index.d.ts +0 -0
  96. /package/{dist/index.d.ts → index.d.ts} +0 -0
  97. /package/{dist/layouts → layouts}/MasterDetailLayout/contexts/MasterDetailContext/index.d.ts +0 -0
  98. /package/{dist/layouts → layouts}/MasterDetailLayout/contexts/MasterDetailContext/types.d.ts +0 -0
  99. /package/{dist/layouts → layouts}/MasterDetailLayout/dicctionary.d.ts +0 -0
  100. /package/{dist/layouts → layouts}/MasterDetailLayout/index.3da0ffda.js +0 -0
  101. /package/{dist/layouts → layouts}/MasterDetailLayout/index.d.ts +0 -0
  102. /package/{dist/layouts → layouts}/MasterDetailLayout/types.d.ts +0 -0
  103. /package/{dist/layouts → layouts}/ModuleLayout/contexts/ModuleContext/index.d.ts +0 -0
  104. /package/{dist/layouts → layouts}/ModuleLayout/contexts/ModuleContext/types.d.ts +0 -0
  105. /package/{dist/layouts → layouts}/ModuleLayout/dicctionary.d.ts +0 -0
  106. /package/{dist/layouts → layouts}/ModuleLayout/index.a76397df.js +0 -0
  107. /package/{dist/layouts → layouts}/ModuleLayout/index.d.ts +0 -0
  108. /package/{dist/layouts → layouts}/ModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
  109. /package/{dist/layouts → layouts}/ModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
  110. /package/{dist/layouts → layouts}/ModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
  111. /package/{dist/layouts → layouts}/ModuleLayout/types.d.ts +0 -0
  112. /package/{dist/layouts → layouts}/NoAuthModuleLayout/dicctionary.d.ts +0 -0
  113. /package/{dist/layouts → layouts}/NoAuthModuleLayout/index.5d1098ef.js +0 -0
  114. /package/{dist/layouts → layouts}/NoAuthModuleLayout/index.d.ts +0 -0
  115. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
  116. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
  117. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.d.ts +0 -0
  118. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.d.ts +0 -0
  119. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.d.ts +0 -0
  120. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.d.ts +0 -0
  121. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.d.ts +0 -0
  122. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.d.ts +0 -0
  123. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.d.ts +0 -0
  124. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.d.ts +0 -0
  125. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.d.ts +0 -0
  126. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.d.ts +0 -0
  127. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.d.ts +0 -0
  128. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.d.ts +0 -0
  129. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
  130. /package/{dist/layouts → layouts}/NoAuthModuleLayout/types.d.ts +0 -0
  131. /package/{dist/layouts → layouts}/index.014e41ba.js +0 -0
  132. /package/{dist/layouts → layouts}/index.d.ts +0 -0
  133. /package/{dist/vite-env.d.ts → vite-env.d.ts} +0 -0
@@ -1,9 +0,0 @@
1
- import type { Dictionary } from '@m4l/core';
2
-
3
- export function getNoAuthModuleLayoutComponentsDictionary() {
4
- return ['no_auth_module_layout'];
5
- }
6
-
7
- export const defaultNoAuthModuleLayoutDictionary: Dictionary = {
8
- no_auth_module_layout: {},
9
- };
@@ -1,85 +0,0 @@
1
- //react
2
-
3
- //external libraries
4
-
5
- //componentes estilados
6
-
7
- //sub components
8
- import { InnerModule } from './subcomponents/InnerModule';
9
-
10
- //types
11
- import { NoAuthBaseProviderProps, NoAuthModuleLayoutProps } from './types';
12
-
13
- //constants
14
-
15
- //context
16
-
17
- import {
18
- BaseProvider,
19
- FlagsProvider,
20
- ModuleDictionaryProvider,
21
- ModuleSkeletonProvider,
22
- useEnvironment,
23
- } from '@m4l/core';
24
- import { useLocales } from '@m4l/graphics';
25
-
26
- //hooks
27
-
28
- export const NoAuthModuleLayout = (props: NoAuthModuleLayoutProps) => {
29
- const {
30
- moduleId,
31
- moduleNameField,
32
- children,
33
- componentsDictionary,
34
- skeletonFlags,
35
- subtitle,
36
- companyLogoSmallUrl,
37
- companyLogoNormalUrl,
38
- moduleIlustrationUrl,
39
- } = props;
40
-
41
- const { host_static_assets, environment_assets } = useEnvironment();
42
-
43
- const localeString = useLocales().currentLocale?.localeString;
44
-
45
- const finalCompanyLogoNormalUrl =
46
- companyLogoNormalUrl ||
47
- `${host_static_assets}/${environment_assets}/frontend/commons/assets/icons/logotipo_m4l.svg`;
48
- const finalCompanyLogoSmallUrl =
49
- companyLogoSmallUrl ||
50
- `${host_static_assets}/${environment_assets}/frontend/commons/assets/icons/isotipo_m4l.svg`;
51
- const finalIllustrationUrl =
52
- moduleIlustrationUrl ||
53
- `${host_static_assets}/${environment_assets}/frontend/domain/host/commons/assets/img/illustration_noauth.png`;
54
-
55
- const finalSkeletonFlags = skeletonFlags;
56
-
57
- if (finalSkeletonFlags.findIndex(f => f === 'dictionary_loaded') < 0) {
58
- finalSkeletonFlags.push('dictionary_loaded');
59
- }
60
-
61
- return (
62
- <BaseProvider<NoAuthBaseProviderProps>
63
- value={{
64
- subtitle,
65
- companyLogoSmallUrl: finalCompanyLogoSmallUrl,
66
- companyLogoNormalUrl: finalCompanyLogoNormalUrl,
67
- moduleIlustrationUrl: finalIllustrationUrl,
68
- }}
69
- >
70
- <FlagsProvider>
71
- <ModuleDictionaryProvider
72
- isAuth={false}
73
- moduleId={moduleId}
74
- moduleNameField={moduleNameField}
75
- componentsDictionary={componentsDictionary}
76
- currentLang={localeString}
77
- >
78
- <ModuleSkeletonProvider flags={finalSkeletonFlags}>
79
- <InnerModule>{children}</InnerModule>
80
- </ModuleSkeletonProvider>
81
- </ModuleDictionaryProvider>
82
- </FlagsProvider>
83
- </BaseProvider>
84
- );
85
- };
@@ -1,43 +0,0 @@
1
- //react
2
- // m4l
3
- import { useResponsive } from '@m4l/graphics';
4
- import { HelmetPage } from '@m4l/components';
5
-
6
- //mui
7
- //external libraries
8
-
9
- //my components
10
- import { LogoLeyend } from './subcomponents/LogoLeyend';
11
- import { AppBarForm } from './subcomponents/AppBarForm';
12
- //componentes estilados
13
-
14
- import { WrapperMain } from './styles';
15
-
16
- //sub components
17
-
18
- //types
19
-
20
- //constants
21
-
22
- //hooks
23
-
24
- import { useBase, useModuleDictionary } from '@m4l/core';
25
-
26
- import { ModuleProps } from './types';
27
- import { NoAuthBaseProviderProps } from '../../types';
28
-
29
- export const InnerModule = (props: ModuleProps) => {
30
- const { children } = props;
31
- const { getModuleLabel } = useModuleDictionary();
32
- const mdUp = useResponsive('up', 'md');
33
- const { subtitle } = useBase<NoAuthBaseProviderProps>();
34
-
35
- return (
36
- <HelmetPage title={getModuleLabel()} subtitle={subtitle}>
37
- <WrapperMain>
38
- {mdUp ? <LogoLeyend /> : null}
39
- <AppBarForm>{children}</AppBarForm>
40
- </WrapperMain>
41
- </HelmetPage>
42
- );
43
- };
@@ -1,6 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
-
3
- export const WrapperMain = styled('div')(() => ({
4
- display: 'flex',
5
- height: '100vh',
6
- }));
@@ -1,14 +0,0 @@
1
- import { WrapperAppBarForm } from './styles';
2
- import { AppBar } from './subcomponents/AppBar';
3
- import { Form } from './subcomponents/Form';
4
- import { WrapperAppBarFormProps } from './types';
5
-
6
- export const AppBarForm = (props: WrapperAppBarFormProps) => {
7
- const { children } = props;
8
- return (
9
- <WrapperAppBarForm>
10
- <AppBar />
11
- <Form>{children}</Form>
12
- </WrapperAppBarForm>
13
- );
14
- };
@@ -1,7 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
-
3
- export const WrapperAppBarForm = styled('div')(() => ({
4
- flexGrow: '1',
5
- display: 'flex',
6
- flexDirection: 'column',
7
- }));
@@ -1,25 +0,0 @@
1
- import { Image, LanguagePopover } from '@m4l/components';
2
- import { useBase } from '@m4l/core';
3
- import { useResponsive } from '@m4l/graphics';
4
- import { NoAuthBaseProviderProps } from '../../../../../../types';
5
-
6
- import { WrapperAppBar } from './styles';
7
- export const AppBar = () => {
8
- const { companyLogoSmallUrl } = useBase<NoAuthBaseProviderProps>();
9
- const downMd = useResponsive('down', 'md');
10
-
11
- return (
12
- <WrapperAppBar>
13
- {downMd ? (
14
- <Image
15
- key={'Isotipo'}
16
- src={companyLogoSmallUrl}
17
- width={'40px'}
18
- height={'40px'}
19
- skeletonVariant="circle"
20
- />
21
- ) : null}
22
- <LanguagePopover />
23
- </WrapperAppBar>
24
- );
25
- };
@@ -1,11 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
-
3
- export const WrapperAppBar = styled('header')(({ theme }) => ({
4
- width: '100%',
5
- display: 'flex',
6
- justifyContent: 'space-between',
7
- padding: theme.spacing(1, 3),
8
- [theme.breakpoints.up('md')]: {
9
- justifyContent: 'flex-end',
10
- },
11
- }));
@@ -1,17 +0,0 @@
1
- // import { useDomain } from '@m4l/core';
2
- // import { useResponsive } from '@m4l/graphics';
3
- import { WrapperFormScroll, WrapperForm } from './styles';
4
- import { NameDescription } from './subcomponents/NameDescription';
5
- import { WrapperFormScrollProps } from './types';
6
-
7
- export const Form = (props: WrapperFormScrollProps) => {
8
- const { children } = props;
9
- return (
10
- <WrapperFormScroll>
11
- <WrapperForm>
12
- <NameDescription />
13
- {children}
14
- </WrapperForm>
15
- </WrapperFormScroll>
16
- );
17
- };
@@ -1,19 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
-
3
- export const WrapperFormScroll = styled('div')(() => ({
4
- display: 'flex',
5
- overflow: 'auto',
6
- width: '100%',
7
- height: '100%',
8
- justifyContent: 'center',
9
- }));
10
-
11
- export const WrapperForm = styled('div')(({ theme }) => ({
12
- display: 'flex',
13
- width: '100%',
14
- height: 'auto',
15
- margin: 'auto',
16
- maxWidth: '480px',
17
- flexDirection: 'column',
18
- gap: theme.spacing(3),
19
- }));
@@ -1,25 +0,0 @@
1
- // import { useDomain } from '@m4l/core';
2
- // import { useResponsive } from '@m4l/graphics';
3
- import { Typography } from '@m4l/components';
4
- import { useModuleDictionary } from '@m4l/core';
5
- import { WrapperNameDescription } from './styles';
6
- export const NameDescription = () => {
7
- /* const downMd = useResponsive('down', 'md'); */
8
-
9
- const { getModuleLabel, getLabel } = useModuleDictionary();
10
- return (
11
- <WrapperNameDescription>
12
- <Typography
13
- key={'ModuleName'}
14
- variant="h4"
15
- skeletonWidth={'35%'}
16
- skeletongHeight={'36px'}
17
- >
18
- {getModuleLabel()}
19
- </Typography>
20
- <Typography key={'ModuleDescription'} skeletonWidth={'60%'} skeletongHeight={'21px'}>
21
- {getLabel('module_description')}
22
- </Typography>
23
- </WrapperNameDescription>
24
- );
25
- };
@@ -1,8 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
-
3
- export const WrapperNameDescription = styled('div')(({ theme }) => ({
4
- display: 'flex',
5
- flexDirection: 'column',
6
- gap: theme.spacing(2),
7
- padding: theme.spacing(0, 3),
8
- }));
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- export interface WrapperFormScrollProps {
4
- children: ReactNode;
5
- }
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- export interface WrapperAppBarFormProps {
4
- children: ReactNode;
5
- }
@@ -1,28 +0,0 @@
1
- import { Image, Typography } from '@m4l/components';
2
- import { useBase, useModuleDictionary } from '@m4l/core';
3
- import { NoAuthBaseProviderProps } from '../../../../types';
4
- import { WrapperLogoLeyend } from './styles';
5
-
6
- export const LogoLeyend = () => {
7
- const { getLabel } = useModuleDictionary();
8
- const { companyLogoNormalUrl, moduleIlustrationUrl } = useBase<NoAuthBaseProviderProps>();
9
- return (
10
- <WrapperLogoLeyend>
11
- <Image
12
- key={'Logo'}
13
- width={'400px'}
14
- height={'400px'}
15
- src={companyLogoNormalUrl}
16
- // effect="opacity"
17
- alt="logo"
18
- />
19
- {moduleIlustrationUrl ? (
20
- <Image src={moduleIlustrationUrl} width={'100%'} height={'300px'} />
21
- ) : null}
22
-
23
- <Typography key={'Leyend'} variant="h3" skeletonWidth={'30%'} skeletongHeight={'18px'}>
24
- {getLabel('module_leyend')}
25
- </Typography>
26
- </WrapperLogoLeyend>
27
- );
28
- };
@@ -1,16 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
-
3
- export const WrapperLogoLeyend = styled('div')(({ theme }) => ({
4
- boxShadow: theme.customShadows.card,
5
- borderRadius: theme.spacing(2),
6
- width: '100%',
7
- maxWidth: '464px',
8
- display: 'flex',
9
- flexDirection: 'column',
10
- justifyContent: 'flex-start',
11
- alignItems: 'center',
12
- margin: theme.spacing(2, 0, 2, 2),
13
- padding: theme.spacing(4, 3),
14
- gap: theme.spacing(3),
15
- overflow: 'hidden',
16
- }));
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- export interface ModuleProps {
4
- children: ReactNode;
5
- }
@@ -1,22 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- export interface ContainerProps {
4
- vertical: boolean;
5
- }
6
-
7
- export type MenuActionType = 'main' | 'allways' | 'normal';
8
-
9
- export declare interface NoAuthBaseProviderProps {
10
- subtitle?: string;
11
- companyLogoSmallUrl: string;
12
- companyLogoNormalUrl: string;
13
- moduleIlustrationUrl?: string;
14
- }
15
-
16
- export interface NoAuthModuleLayoutProps extends NoAuthBaseProviderProps {
17
- moduleId: string;
18
- moduleNameField?: string;
19
- componentsDictionary: string[];
20
- skeletonFlags: string[];
21
- children: ReactNode;
22
- }
@@ -1,8 +0,0 @@
1
- export { ModuleLayout } from './ModuleLayout';
2
- export * from './ModuleLayout/dicctionary';
3
-
4
- export { MasterDetailLayout } from './MasterDetailLayout';
5
- export * from './MasterDetailLayout/dicctionary';
6
-
7
- export { NoAuthModuleLayout } from './NoAuthModuleLayout';
8
- export * from './NoAuthModuleLayout/dicctionary';
package/src/test/setup.ts DELETED
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom';
@@ -1,20 +0,0 @@
1
- import { cleanup, render } from '@testing-library/react';
2
- import React from 'react';
3
- import { afterEach } from 'vitest';
4
-
5
- afterEach(() => {
6
- cleanup();
7
- });
8
-
9
- const customRender = (ui: React.ReactElement, options = {}) => {
10
- return render(ui, {
11
- // wrap provider(s) here if needed
12
- wrapper: ({ children }) => children,
13
- ...options,
14
- });
15
- };
16
-
17
- export * from '@testing-library/react';
18
- export { default as userEvent } from '@testing-library/user-event';
19
-
20
- export { customRender as render };
package/src/vite-env.d.ts DELETED
@@ -1,3 +0,0 @@
1
- /// <reference types="vite/client" />
2
- /// <reference types="vitest" />
3
- /// <reference types="vitest/importMeta" />
package/tsconfig.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esNext",
4
- "useDefineForClassFields": true,
5
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
6
- "allowJs": false,
7
- "skipLibCheck": true,
8
- "esModuleInterop": false,
9
- "allowSyntheticDefaultImports": true,
10
- "strict": true,
11
- "downlevelIteration":true,
12
- "importHelpers": true,
13
- "experimentalDecorators": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "module": "ESNext",
16
- "moduleResolution": "Node",
17
- "resolveJsonModule": true,
18
- "isolatedModules": true,
19
- "noEmit": true,
20
- "jsx": "preserve",
21
- "importsNotUsedAsValues":"remove",
22
- "baseUrl": ".",
23
- "paths": {
24
- }
25
- },
26
- "include": ["src", "../m4l_components/src/contexts/DynamicMFParmsContext", "../m4l_components/src/hooks/useDynamicMFParameters"],
27
- "exclude": ["node_modules","dist"],
28
- "references": [{ "path": "./tsconfig.node.json" }]
29
- }
@@ -1,8 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "module": "esnext",
5
- "moduleResolution": "node"
6
- },
7
- "include": ["vite.config.ts"]
8
- }
package/vite.config.ts DELETED
@@ -1,172 +0,0 @@
1
- import react from '@vitejs/plugin-react';
2
- import * as path from 'path';
3
- import { defineConfig } from 'vite';
4
- import dts from 'vite-plugin-dts';
5
-
6
- // eslint-disable-next-line @typescript-eslint/no-var-requires
7
-
8
- function manualChunks(id: string, _api: any) {
9
- //components
10
- if (id.includes('src/components/')) {
11
- if (id.includes('MFHostApp')) {
12
- return 'components/MFHostApp/index';
13
- }
14
- if (id.includes('MFIsolationApp')) {
15
- return 'components/MFIsolationApp/index';
16
- }
17
- if (id.includes('BaseModule')) {
18
- return 'components/BaseModule/index';
19
- }
20
- return 'components/index';
21
- }
22
- if (id.includes('src/contexts/')) {
23
- //context
24
- if (id.includes('AuthContext')) {
25
- return 'contexts/AuthContext/index';
26
- }
27
- return 'contexts/index';
28
- }
29
- //layouts
30
- if (id.includes('src/layouts/')) {
31
- if (id.includes('NoAuthModuleLayout')) {
32
- return 'layouts/NoAuthModuleLayout/index';
33
- }
34
-
35
- if (id.includes('MasterDetailLayout')) {
36
- return 'layouts/MasterDetailLayout/index';
37
- }
38
-
39
- if (id.includes('ModuleLayout')) {
40
- return 'layouts/ModuleLayout/index';
41
- }
42
-
43
- return 'layouts/index';
44
- }
45
- //hooks
46
- if (id.includes('src/hooks/')) {
47
- if (id.includes('useMasterDetail')) {
48
- return 'hooks/useMasterDetail/index';
49
- }
50
-
51
- if (id.includes('useModule')) {
52
- return 'hooks/useModule/index';
53
- }
54
-
55
- if (id.includes('useAuth')) {
56
- return 'hooks/useAuth/index';
57
- }
58
- return 'hooks/index';
59
- }
60
- //node_modules no reconocidos
61
- if (id.includes('node_modules')) {
62
- console.log('node_modules******^', id);
63
- return 'node_modules';
64
- }
65
-
66
- return 'vendor';
67
- }
68
-
69
- const examined_libs = [];
70
-
71
- const isExternal = (source: string, importer: string | undefined, isResolved: boolean): boolean => {
72
- const internal_exact_libs = ['lib1', 'lib2']; //librerias que van incluirse en el bundle final da la librería
73
- const external_exact_libs = [
74
- 'react',
75
- 'react-dom',
76
- 'react/jsx-runtime',
77
- '@m4l/core',
78
- '@m4l/graphics',
79
- '@m4l/components',
80
- '@emotion/styled',
81
- 'react-router-dom',
82
- 'react-toastify',
83
- ];
84
- const external_parcial_libs = [
85
- '@mui',
86
- '@m4l',
87
- 'date-fns',
88
- 'nprogress',
89
- 'history',
90
- 'eventemitter3',
91
- ];
92
-
93
- if (internal_exact_libs.findIndex(l => source === l) > -1) {
94
- return false;
95
- }
96
-
97
- const isExt =
98
- external_exact_libs.findIndex(l => source === l) > -1 ||
99
- external_parcial_libs.findIndex(pl => source.indexOf(pl) > -1) > -1;
100
- if (isExt) {
101
- if (examined_libs.findIndex(l => source === l) < 0) {
102
- console.log(
103
- 'Source: ',
104
- source,
105
- ' Importer:',
106
- ' isResolved:',
107
- isResolved,
108
- ' IsExt:',
109
- isExt,
110
- );
111
- examined_libs.push(source);
112
- }
113
- }
114
-
115
- return isExt;
116
- };
117
-
118
- export default defineConfig({
119
- server: { https: true, port: 4002 },
120
- // test: {
121
- // globals: true,
122
- // include: ['**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
123
- // environment: 'jsdom',
124
- // setupFiles: './src/test/setup.ts',
125
- // coverage: {
126
- // all: true,
127
- // include: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
128
- // reporter: ['text', 'json', 'html'],
129
- // },
130
- // },
131
-
132
- plugins: [
133
- dts({
134
- insertTypesEntry: true,
135
- beforeWriteFile: (filePath: string, content: string) => {
136
- return { filePath: filePath.replace('m4l_layouts/src/', ''), content };
137
- },
138
- }),
139
- react(),
140
- // terser(),
141
- ],
142
- // mode: 'production',
143
- build: {
144
- //manifest: true,
145
- target: 'esNext', //Compila en esNext teniendo en cuenta que va a ser leida no por el navedado,sino por otros proyectos
146
- lib: {
147
- entry: path.resolve(__dirname, 'src/index.ts'),
148
- name: 'm4l_layouts',
149
- formats: ['es'],
150
- fileName: () => `index.js`,
151
- },
152
- rollupOptions: {
153
- external: isExternal,
154
-
155
- // input: ['src/index.ts'],
156
-
157
- output: {
158
- manualChunks,
159
- exports: 'auto',
160
- format: 'esm',
161
- generatedCode: 'es2015',
162
-
163
- dir: 'dist', // Carpenta donde se genera el bundle
164
- globals: {
165
- react: 'React',
166
- 'react-dom': 'ReactDOM',
167
- 'react/jsx-runtime': 'react/jsx-runtime',
168
- },
169
- },
170
- },
171
- },
172
- });
File without changes
File without changes