@m4l/layouts 0.1.25 → 0.1.28

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 (131) hide show
  1. package/package.json +8 -52
  2. package/.eslintignore +0 -2
  3. package/.eslintrc.cjs +0 -118
  4. package/.gitignore +0 -23
  5. package/.gitlab-ci.yml +0 -16
  6. package/.prettierignore +0 -3
  7. package/.prettierrc.json +0 -26
  8. package/.vscode/settings.json +0 -50
  9. package/dist/package.json +0 -36
  10. package/src/@types/index.ts +0 -8
  11. package/src/components/BaseModule/index.tsx +0 -59
  12. package/src/components/BaseModule/types.ts +0 -12
  13. package/src/components/MFHostApp/index.tsx +0 -95
  14. package/src/components/MFHostApp/types.ts +0 -16
  15. package/src/components/MFIsolationApp/index.tsx +0 -164
  16. package/src/components/MFIsolationApp/subcomponents/MFAuthApp/index.tsx +0 -98
  17. package/src/components/MFIsolationApp/subcomponents/MFAuthApp/types.ts +0 -7
  18. package/src/components/MFIsolationApp/types.ts +0 -12
  19. package/src/components/index.ts +0 -5
  20. package/src/contexts/AuthContext/index.tsx +0 -189
  21. package/src/contexts/AuthContext/types.ts +0 -65
  22. package/src/contexts/index.ts +0 -1
  23. package/src/hooks/index.ts +0 -5
  24. package/src/hooks/useAuth/index.ts +0 -12
  25. package/src/hooks/useMasterDetail/index.ts +0 -6
  26. package/src/hooks/useModule/index.ts +0 -13
  27. package/src/index.ts +0 -7
  28. package/src/layouts/MasterDetailLayout/components/ButtonDetail/index.tsx +0 -38
  29. package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.tsx +0 -34
  30. package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/types.ts +0 -19
  31. package/src/layouts/MasterDetailLayout/dicctionary.ts +0 -20
  32. package/src/layouts/MasterDetailLayout/index.tsx +0 -165
  33. package/src/layouts/MasterDetailLayout/types.ts +0 -11
  34. package/src/layouts/ModuleLayout/contexts/ModuleContext/index.tsx +0 -56
  35. package/src/layouts/ModuleLayout/contexts/ModuleContext/types.ts +0 -23
  36. package/src/layouts/ModuleLayout/dicctionary.ts +0 -11
  37. package/src/layouts/ModuleLayout/index.tsx +0 -59
  38. package/src/layouts/ModuleLayout/subcomponents/InnerModule/index.tsx +0 -35
  39. package/src/layouts/ModuleLayout/subcomponents/InnerModule/styles.tsx +0 -31
  40. package/src/layouts/ModuleLayout/subcomponents/InnerModule/types.ts +0 -11
  41. package/src/layouts/ModuleLayout/types.ts +0 -31
  42. package/src/layouts/NoAuthModuleLayout/dicctionary.ts +0 -9
  43. package/src/layouts/NoAuthModuleLayout/index.tsx +0 -85
  44. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.tsx +0 -43
  45. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.tsx +0 -6
  46. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.tsx +0 -14
  47. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.tsx +0 -7
  48. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.tsx +0 -25
  49. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.tsx +0 -11
  50. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.tsx +0 -17
  51. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.tsx +0 -19
  52. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.tsx +0 -25
  53. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.tsx +0 -8
  54. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.ts +0 -5
  55. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.ts +0 -5
  56. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.tsx +0 -28
  57. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.tsx +0 -16
  58. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/types.ts +0 -5
  59. package/src/layouts/NoAuthModuleLayout/types.ts +0 -22
  60. package/src/layouts/index.ts +0 -8
  61. package/src/test/setup.ts +0 -1
  62. package/src/test/utils.tsx +0 -20
  63. package/src/vite-env.d.ts +0 -3
  64. package/tsconfig.json +0 -29
  65. package/tsconfig.node.json +0 -8
  66. package/vite.config.ts +0 -172
  67. /package/{dist/components → components}/BaseModule/index.6309486a.js +0 -0
  68. /package/{dist/components → components}/BaseModule/index.d.ts +0 -0
  69. /package/{dist/components → components}/BaseModule/types.d.ts +0 -0
  70. /package/{dist/components → components}/MFHostApp/index.1700d13a.js +0 -0
  71. /package/{dist/components → components}/MFHostApp/index.d.ts +0 -0
  72. /package/{dist/components → components}/MFHostApp/types.d.ts +0 -0
  73. /package/{dist/components → components}/MFIsolationApp/index.b21e5671.js +0 -0
  74. /package/{dist/components → components}/MFIsolationApp/index.d.ts +0 -0
  75. /package/{dist/components → components}/MFIsolationApp/subcomponents/MFAuthApp/index.d.ts +0 -0
  76. /package/{dist/components → components}/MFIsolationApp/subcomponents/MFAuthApp/types.d.ts +0 -0
  77. /package/{dist/components → components}/MFIsolationApp/types.d.ts +0 -0
  78. /package/{dist/components → components}/index.d.ts +0 -0
  79. /package/{dist/components → components}/index.deb4e7ac.js +0 -0
  80. /package/{dist/contexts → contexts}/AuthContext/index.6f966215.js +0 -0
  81. /package/{dist/contexts → contexts}/AuthContext/index.d.ts +0 -0
  82. /package/{dist/contexts → contexts}/AuthContext/types.d.ts +0 -0
  83. /package/{dist/contexts → contexts}/index.b46a2699.js +0 -0
  84. /package/{dist/contexts → contexts}/index.d.ts +0 -0
  85. /package/{dist/hooks → hooks}/index.2022a179.js +0 -0
  86. /package/{dist/hooks → hooks}/index.d.ts +0 -0
  87. /package/{dist/hooks → hooks}/useAuth/index.cb6a3420.js +0 -0
  88. /package/{dist/hooks → hooks}/useAuth/index.d.ts +0 -0
  89. /package/{dist/hooks → hooks}/useMasterDetail/index.1b024fd5.js +0 -0
  90. /package/{dist/hooks → hooks}/useMasterDetail/index.d.ts +0 -0
  91. /package/{dist/hooks → hooks}/useModule/index.6ff7d08a.js +0 -0
  92. /package/{dist/hooks → hooks}/useModule/index.d.ts +0 -0
  93. /package/{dist/index.d.ts → index.d.ts} +0 -0
  94. /package/{dist/index.js → index.js} +0 -0
  95. /package/{dist/layouts → layouts}/MasterDetailLayout/contexts/MasterDetailContext/index.d.ts +0 -0
  96. /package/{dist/layouts → layouts}/MasterDetailLayout/contexts/MasterDetailContext/types.d.ts +0 -0
  97. /package/{dist/layouts → layouts}/MasterDetailLayout/dicctionary.d.ts +0 -0
  98. /package/{dist/layouts → layouts}/MasterDetailLayout/index.3da0ffda.js +0 -0
  99. /package/{dist/layouts → layouts}/MasterDetailLayout/index.d.ts +0 -0
  100. /package/{dist/layouts → layouts}/MasterDetailLayout/types.d.ts +0 -0
  101. /package/{dist/layouts → layouts}/ModuleLayout/contexts/ModuleContext/index.d.ts +0 -0
  102. /package/{dist/layouts → layouts}/ModuleLayout/contexts/ModuleContext/types.d.ts +0 -0
  103. /package/{dist/layouts → layouts}/ModuleLayout/dicctionary.d.ts +0 -0
  104. /package/{dist/layouts → layouts}/ModuleLayout/index.a76397df.js +0 -0
  105. /package/{dist/layouts → layouts}/ModuleLayout/index.d.ts +0 -0
  106. /package/{dist/layouts → layouts}/ModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
  107. /package/{dist/layouts → layouts}/ModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
  108. /package/{dist/layouts → layouts}/ModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
  109. /package/{dist/layouts → layouts}/ModuleLayout/types.d.ts +0 -0
  110. /package/{dist/layouts → layouts}/NoAuthModuleLayout/dicctionary.d.ts +0 -0
  111. /package/{dist/layouts → layouts}/NoAuthModuleLayout/index.5d1098ef.js +0 -0
  112. /package/{dist/layouts → layouts}/NoAuthModuleLayout/index.d.ts +0 -0
  113. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
  114. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
  115. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.d.ts +0 -0
  116. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.d.ts +0 -0
  117. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.d.ts +0 -0
  118. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.d.ts +0 -0
  119. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.d.ts +0 -0
  120. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.d.ts +0 -0
  121. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.d.ts +0 -0
  122. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.d.ts +0 -0
  123. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.d.ts +0 -0
  124. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.d.ts +0 -0
  125. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.d.ts +0 -0
  126. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.d.ts +0 -0
  127. /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
  128. /package/{dist/layouts → layouts}/NoAuthModuleLayout/types.d.ts +0 -0
  129. /package/{dist/layouts → layouts}/index.014e41ba.js +0 -0
  130. /package/{dist/layouts → layouts}/index.d.ts +0 -0
  131. /package/{dist/vite-env.d.ts → vite-env.d.ts} +0 -0
@@ -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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes