@m4l/layouts 0.1.23 → 0.1.26
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.
- package/.eslintignore +2 -0
- package/.eslintrc.cjs +118 -0
- package/.gitignore +23 -0
- package/.gitlab-ci.yml +16 -0
- package/.prettierignore +3 -0
- package/.prettierrc.json +26 -0
- package/.vscode/settings.json +50 -0
- package/dist/components/BaseModule/index.6309486a.js +33 -0
- package/dist/components/BaseModule/index.d.ts +4 -0
- package/dist/components/BaseModule/types.d.ts +9 -0
- package/dist/components/MFHostApp/index.1700d13a.js +69 -0
- package/{components → dist/components}/MFHostApp/types.d.ts +3 -7
- package/dist/components/MFIsolationApp/index.b21e5671.js +151 -0
- package/dist/components/MFIsolationApp/types.d.ts +11 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.deb4e7ac.js +6 -0
- package/dist/contexts/index.b46a2699.js +1 -0
- package/dist/hooks/index.2022a179.js +4 -0
- package/{hooks/useMasterDetail/index.8e9e900b.js → dist/hooks/useMasterDetail/index.1b024fd5.js} +1 -1
- package/{hooks/useModule/index.096d7d13.js → dist/hooks/useModule/index.6ff7d08a.js} +1 -1
- package/dist/index.js +41 -0
- package/dist/layouts/MasterDetailLayout/index.3da0ffda.js +104 -0
- package/{layouts → dist/layouts}/ModuleLayout/contexts/ModuleContext/types.d.ts +2 -7
- package/dist/layouts/ModuleLayout/index.a76397df.js +101 -0
- package/dist/layouts/ModuleLayout/types.d.ts +15 -0
- package/dist/layouts/index.014e41ba.js +8 -0
- package/{layouts → dist/layouts}/index.d.ts +0 -1
- package/dist/package.json +36 -0
- package/package.json +57 -12
- package/src/@types/index.ts +8 -0
- package/src/components/BaseModule/index.tsx +59 -0
- package/src/components/BaseModule/types.ts +12 -0
- package/src/components/MFHostApp/index.tsx +95 -0
- package/src/components/MFHostApp/types.ts +16 -0
- package/src/components/MFIsolationApp/index.tsx +164 -0
- package/src/components/MFIsolationApp/subcomponents/MFAuthApp/index.tsx +98 -0
- package/src/components/MFIsolationApp/subcomponents/MFAuthApp/types.ts +7 -0
- package/src/components/MFIsolationApp/types.ts +12 -0
- package/src/components/index.ts +5 -0
- package/src/contexts/AuthContext/index.tsx +189 -0
- package/src/contexts/AuthContext/types.ts +65 -0
- package/src/contexts/index.ts +1 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useAuth/index.ts +12 -0
- package/src/hooks/useMasterDetail/index.ts +6 -0
- package/src/hooks/useModule/index.ts +13 -0
- package/src/index.ts +7 -0
- package/src/layouts/MasterDetailLayout/components/ButtonDetail/index.tsx +38 -0
- package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.tsx +34 -0
- package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/types.ts +19 -0
- package/src/layouts/MasterDetailLayout/dicctionary.ts +20 -0
- package/src/layouts/MasterDetailLayout/index.tsx +165 -0
- package/src/layouts/MasterDetailLayout/types.ts +11 -0
- package/src/layouts/ModuleLayout/contexts/ModuleContext/index.tsx +56 -0
- package/src/layouts/ModuleLayout/contexts/ModuleContext/types.ts +23 -0
- package/src/layouts/ModuleLayout/dicctionary.ts +11 -0
- package/src/layouts/ModuleLayout/index.tsx +59 -0
- package/src/layouts/ModuleLayout/subcomponents/InnerModule/index.tsx +35 -0
- package/src/layouts/ModuleLayout/subcomponents/InnerModule/styles.tsx +31 -0
- package/src/layouts/ModuleLayout/subcomponents/InnerModule/types.ts +11 -0
- package/src/layouts/ModuleLayout/types.ts +31 -0
- package/src/layouts/NoAuthModuleLayout/dicctionary.ts +9 -0
- package/src/layouts/NoAuthModuleLayout/index.tsx +85 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.tsx +43 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.tsx +6 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.tsx +14 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.tsx +7 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.tsx +25 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.tsx +11 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.tsx +17 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.tsx +19 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.tsx +25 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.tsx +8 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.ts +5 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.ts +5 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.tsx +28 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.tsx +16 -0
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/types.ts +5 -0
- package/src/layouts/NoAuthModuleLayout/types.ts +22 -0
- package/src/layouts/index.ts +8 -0
- package/src/test/setup.ts +1 -0
- package/src/test/utils.tsx +20 -0
- package/src/vite-env.d.ts +3 -0
- package/tsconfig.json +29 -0
- package/tsconfig.node.json +8 -0
- package/vite.config.ts +172 -0
- package/components/MFHostApp/index.55a1f3a4.js +0 -52
- package/components/MFIsolationApp/index.eaf655eb.js +0 -116
- package/components/MFIsolationApp/types.d.ts +0 -10
- package/components/index.d.ts +0 -3
- package/index.js +0 -38
- package/layouts/MasterDetailLayout/components/ButtonDetail/index.d.ts +0 -3
- package/layouts/MasterDetailLayout/index.71de0dc7.js +0 -141
- package/layouts/ModuleLayout/index.842072c5.js +0 -348
- package/layouts/ModuleLayout/subcomponents/InnerModule/subcomponents/Header/index.d.ts +0 -2
- package/layouts/ModuleLayout/subcomponents/InnerModule/subcomponents/Header/skeleton.d.ts +0 -2
- package/layouts/ModuleLayout/subcomponents/InnerModule/subcomponents/Header/styles.d.ts +0 -8
- package/layouts/ModuleLayout/subcomponents/InnerModule/subcomponents/Header/types.d.ts +0 -2
- package/layouts/ModuleLayout/types.d.ts +0 -29
- package/node_modules.d8c1c0ec.js +0 -1601
- package/vendor.172dc010.js +0 -20
- /package/{components → dist/components}/MFHostApp/index.d.ts +0 -0
- /package/{components → dist/components}/MFIsolationApp/index.d.ts +0 -0
- /package/{components → dist/components}/MFIsolationApp/subcomponents/MFAuthApp/index.d.ts +0 -0
- /package/{components → dist/components}/MFIsolationApp/subcomponents/MFAuthApp/types.d.ts +0 -0
- /package/{contexts → dist/contexts}/AuthContext/index.6f966215.js +0 -0
- /package/{contexts → dist/contexts}/AuthContext/index.d.ts +0 -0
- /package/{contexts → dist/contexts}/AuthContext/types.d.ts +0 -0
- /package/{contexts → dist/contexts}/index.d.ts +0 -0
- /package/{hooks → dist/hooks}/index.d.ts +0 -0
- /package/{hooks → dist/hooks}/useAuth/index.cb6a3420.js +0 -0
- /package/{hooks → dist/hooks}/useAuth/index.d.ts +0 -0
- /package/{hooks → dist/hooks}/useMasterDetail/index.d.ts +0 -0
- /package/{hooks → dist/hooks}/useModule/index.d.ts +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{layouts → dist/layouts}/MasterDetailLayout/contexts/MasterDetailContext/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/MasterDetailLayout/contexts/MasterDetailContext/types.d.ts +0 -0
- /package/{layouts → dist/layouts}/MasterDetailLayout/dicctionary.d.ts +0 -0
- /package/{layouts → dist/layouts}/MasterDetailLayout/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/MasterDetailLayout/types.d.ts +0 -0
- /package/{layouts → dist/layouts}/ModuleLayout/contexts/ModuleContext/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/ModuleLayout/dicctionary.d.ts +0 -0
- /package/{layouts → dist/layouts}/ModuleLayout/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/ModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/ModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
- /package/{layouts → dist/layouts}/ModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/dicctionary.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/index.5d1098ef.js +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
- /package/{layouts → dist/layouts}/NoAuthModuleLayout/types.d.ts +0 -0
- /package/{vite-env.d.ts → dist/vite-env.d.ts} +0 -0
package/.eslintignore
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const prettierOptions = JSON.parse(fs.readFileSync(path.resolve(__dirname, '.prettierrc.json'), 'utf8'));
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
env: {
|
|
9
|
+
browser: true,
|
|
10
|
+
es2021: true,
|
|
11
|
+
},
|
|
12
|
+
extends: [
|
|
13
|
+
'plugin:react/recommended',
|
|
14
|
+
// 'airbnb',
|
|
15
|
+
'eslint:recommended',
|
|
16
|
+
'plugin:jsx-a11y/recommended',
|
|
17
|
+
'plugin:import/typescript',
|
|
18
|
+
'plugin:react/jsx-runtime',
|
|
19
|
+
'plugin:prettier/recommended',
|
|
20
|
+
'plugin:@typescript-eslint/recommended',
|
|
21
|
+
'prettier',
|
|
22
|
+
],
|
|
23
|
+
parser: '@typescript-eslint/parser',
|
|
24
|
+
parserOptions: {
|
|
25
|
+
ecmaFeatures: {
|
|
26
|
+
jsx: true,
|
|
27
|
+
},
|
|
28
|
+
ecmaVersion: 'latest',
|
|
29
|
+
sourceType: 'module',
|
|
30
|
+
},
|
|
31
|
+
plugins: ['react', '@typescript-eslint', 'import', 'jsx-a11y', 'react-hooks', 'prettier', 'unused-imports'],
|
|
32
|
+
rules: {
|
|
33
|
+
'prettier/prettier': ['error', prettierOptions],
|
|
34
|
+
'react/jsx-filename-extension': [1, {extensions: ['.ts', '.tsx']}], //En que archivos va a haber jsx
|
|
35
|
+
'@typescript-eslint/no-explicit-any':"off",
|
|
36
|
+
'react/jsx-props-no-spreading':"off", //Que se pueda usar el spread
|
|
37
|
+
"react/prop-types":"off", //Desactivar los proptypes
|
|
38
|
+
"react/require-default-props":"off", //Cuando se usan props parametros opcionales no es necesariio definir los valores por defecto
|
|
39
|
+
"react/jsx-no-useless-fragment":"warn", //No usar jsx dentro de un fragment
|
|
40
|
+
"react/no-unstable-nested-components": [
|
|
41
|
+
"off",
|
|
42
|
+
{ "allowAsProps": true }
|
|
43
|
+
],
|
|
44
|
+
"@typescript-eslint/no-empty-interface":"warn",
|
|
45
|
+
"@typescript-eslint/ban-ts-comment":"off",
|
|
46
|
+
"no-empty-pattern":"warn",
|
|
47
|
+
"no-shadow":"warn", //que se puedan declarar las mismas variables dentro del scope
|
|
48
|
+
'no-console': 'off', //Que no se puedan imprimir en la consola
|
|
49
|
+
"no-empty": "off",
|
|
50
|
+
// "no-empty-function": "error",
|
|
51
|
+
"@typescript-eslint/no-empty-function": "off","no-unused-vars": "off",
|
|
52
|
+
"@typescript-eslint/no-unused-vars": [
|
|
53
|
+
"warn", // or "error"
|
|
54
|
+
{
|
|
55
|
+
"argsIgnorePattern": "^_",
|
|
56
|
+
"varsIgnorePattern": "^_",
|
|
57
|
+
"caughtErrorsIgnorePattern": "^_"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
|
|
61
|
+
'import/extensions': [
|
|
62
|
+
'off',
|
|
63
|
+
'ignorePackages',
|
|
64
|
+
{
|
|
65
|
+
// js: 'never',
|
|
66
|
+
// mjs: 'never',
|
|
67
|
+
// jsx: 'never',
|
|
68
|
+
ts: 'never', //se especifica q tipo de librerias se pueden importar
|
|
69
|
+
tsx: 'never',
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
'import/prefer-default-export': 'off',
|
|
73
|
+
},
|
|
74
|
+
overrides: [
|
|
75
|
+
{
|
|
76
|
+
files: ['**/*.ts?(x)','**/*.js?(x)'],
|
|
77
|
+
rules: {
|
|
78
|
+
'prettier/prettier': ['warn', prettierOptions],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
settings: {
|
|
83
|
+
"react": {
|
|
84
|
+
"createClass": "createReactClass", // Regex for Component Factory to use,
|
|
85
|
+
// default to "createReactClass"
|
|
86
|
+
"pragma": "React", // Pragma to use, default to "React"
|
|
87
|
+
"fragment": "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
|
|
88
|
+
"version": "detect", // React version. "detect" automatically picks the version you have installed.
|
|
89
|
+
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
|
|
90
|
+
// It will default to "latest" and warn if missing, and to "detect" in the future
|
|
91
|
+
"flowVersion": "0.53" // Flow version
|
|
92
|
+
},
|
|
93
|
+
'import/extensions': ['.js', '.mjs', '.jsx', '.ts', '.tsx'],
|
|
94
|
+
'import/resolver': { //Permite encontrar los alias de los paths de importación
|
|
95
|
+
alias: {
|
|
96
|
+
map: [['~', path.resolve(__dirname)]],
|
|
97
|
+
extensions: ['.ts', '.js', '.tsx'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// {
|
|
104
|
+
// "jsxSingleQuote": false,
|
|
105
|
+
// "singleQuote": true,
|
|
106
|
+
// "semi": true,
|
|
107
|
+
// "tabWidth": 4,
|
|
108
|
+
// "trailingComma": "all",
|
|
109
|
+
// "printWidth": 100,
|
|
110
|
+
// "bracketSpacing": false,
|
|
111
|
+
// "bracketSameLine": false,
|
|
112
|
+
// "useTabs": false,
|
|
113
|
+
// "arrowParens": "always",
|
|
114
|
+
// "endOfLine": "crlf",
|
|
115
|
+
// "proseWrap": "preserve",
|
|
116
|
+
// "quoteProps": "as-needed",
|
|
117
|
+
// "htmlWhitespaceSensitivity": "css"
|
|
118
|
+
// }
|
package/.gitignore
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
package-lock.json
|
|
15
|
+
|
|
16
|
+
# Editor directories and files
|
|
17
|
+
.idea
|
|
18
|
+
.DS_Store
|
|
19
|
+
*.suo
|
|
20
|
+
*.ntvs*
|
|
21
|
+
*.njsproj
|
|
22
|
+
*.sln
|
|
23
|
+
*.sw?
|
package/.gitlab-ci.yml
ADDED
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"printWidth": 100,
|
|
3
|
+
"endOfLine":"auto",
|
|
4
|
+
"tabWidth": 4,
|
|
5
|
+
"useTabs": false,
|
|
6
|
+
"semi": true,
|
|
7
|
+
"singleQuote": true,
|
|
8
|
+
"trailingComma": "all",
|
|
9
|
+
"arrowParens" : "avoid",
|
|
10
|
+
"bracketSpacing": true,
|
|
11
|
+
"bracketSameLine":false,
|
|
12
|
+
"proseWrap": "never",
|
|
13
|
+
"quoteProps": "as-needed",
|
|
14
|
+
"singleAttributePerLine":false ,
|
|
15
|
+
|
|
16
|
+
"overrides": [
|
|
17
|
+
{
|
|
18
|
+
"files": ".prettierrc",
|
|
19
|
+
"options": { "parser": "typescript" }
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"explorer.confirmDelete": false,
|
|
3
|
+
"code-runner.clearPreviousOutput": true,
|
|
4
|
+
"explorer.confirmDragAndDrop": false,
|
|
5
|
+
"liveServer.settings.donotShowInfoMsg": true,
|
|
6
|
+
"prettier.eslintIntegration": true,
|
|
7
|
+
"editor.codeActionsOnSave": {
|
|
8
|
+
"source.fixAll.eslint": true
|
|
9
|
+
},
|
|
10
|
+
"eslint.probe": [
|
|
11
|
+
"javascriptreact",
|
|
12
|
+
"typescript",
|
|
13
|
+
"typescriptreact",
|
|
14
|
+
"html",
|
|
15
|
+
"markdown"
|
|
16
|
+
],
|
|
17
|
+
"color-highlight.matchRgbWithNoFunction": true,
|
|
18
|
+
"color-highlight.matchWords": true,
|
|
19
|
+
"[typescript]": {
|
|
20
|
+
"editor.defaultFormatter": "vscode.typescript-language-features"
|
|
21
|
+
},
|
|
22
|
+
"thunder-client.codeSnippetLanguage": "js-axios",
|
|
23
|
+
"editor.formatOnSave": false,
|
|
24
|
+
"[typescriptreact]": {
|
|
25
|
+
"editor.defaultFormatter": "vscode.typescript-language-features"
|
|
26
|
+
},
|
|
27
|
+
"javascript.updateImportsOnFileMove.enabled": "always",
|
|
28
|
+
"typescript.updateImportsOnFileMove.enabled": "always",
|
|
29
|
+
// "git.autofetch": true,
|
|
30
|
+
"eslint.nodeEnv": "",
|
|
31
|
+
// "prettier.useEditorConfig": false,
|
|
32
|
+
// "prettier.typescriptEnable": [
|
|
33
|
+
// "typescript",
|
|
34
|
+
// "typescriptreact"
|
|
35
|
+
// ],
|
|
36
|
+
// "prettier.tabWidth": 4,
|
|
37
|
+
// "prettier.jsonEnable": [
|
|
38
|
+
// "json"
|
|
39
|
+
// ],
|
|
40
|
+
// "prettier.trailingComma": "all",
|
|
41
|
+
// "prettier.singleQuote": true,
|
|
42
|
+
// "prettier.printWidth": 100,
|
|
43
|
+
// "prettier.bracketSpacing": true,
|
|
44
|
+
// "prettier.singleAttributePerLine": false,
|
|
45
|
+
// "prettier.graphqlEnable": [
|
|
46
|
+
// "graphql"
|
|
47
|
+
// ],
|
|
48
|
+
// "eslint.rules.customizations": [],
|
|
49
|
+
// "eslint.runtime": ""
|
|
50
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ModalProvider as s } from "@m4l/components";
|
|
2
|
+
import { FlagsProvider as u, ModuleDictionaryProvider as c, ModuleSkeletonProvider as m, ModulePrivilegesProvider as a } from "@m4l/core";
|
|
3
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
4
|
+
function h(r) {
|
|
5
|
+
const {
|
|
6
|
+
children: o,
|
|
7
|
+
moduleId: i,
|
|
8
|
+
moduleNameField: l,
|
|
9
|
+
skeletonFlags: d,
|
|
10
|
+
privileges: n,
|
|
11
|
+
componentsDictionary: t
|
|
12
|
+
} = r;
|
|
13
|
+
return /* @__PURE__ */ e(u, {
|
|
14
|
+
children: /* @__PURE__ */ e(c, {
|
|
15
|
+
isAuth: !0,
|
|
16
|
+
moduleId: i,
|
|
17
|
+
moduleNameField: l,
|
|
18
|
+
componentsDictionary: t,
|
|
19
|
+
children: /* @__PURE__ */ e(m, {
|
|
20
|
+
flags: d,
|
|
21
|
+
children: /* @__PURE__ */ e(a, {
|
|
22
|
+
queryPrivileges: n,
|
|
23
|
+
children: /* @__PURE__ */ e(s, {
|
|
24
|
+
children: o
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
h as B
|
|
33
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { unstable_HistoryRouter as F } from "react-router-dom";
|
|
2
|
+
import { EnvironmentProvider as p, HostToolsProvider as v, NetworkProvider as P, DomainCountryProvider as M } from "@m4l/core";
|
|
3
|
+
import { LocalesProvider as f, HostThemeProvider as b, FormatterProvider as E } from "@m4l/graphics";
|
|
4
|
+
import { B as H } from "../BaseModule/index.6309486a.js";
|
|
5
|
+
import { DynamicMFParmsProvider as _ } from "@m4l/components";
|
|
6
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
7
|
+
function L(t) {
|
|
8
|
+
const {
|
|
9
|
+
children: n,
|
|
10
|
+
currentLocale: m,
|
|
11
|
+
hostTheme: d,
|
|
12
|
+
environment: s,
|
|
13
|
+
hostTools: e,
|
|
14
|
+
axiosOperation: c,
|
|
15
|
+
formatters: o,
|
|
16
|
+
dynamicMFParameters: i,
|
|
17
|
+
moduleId: l,
|
|
18
|
+
moduleNameField: a,
|
|
19
|
+
skeletonFlags: u,
|
|
20
|
+
privileges: h,
|
|
21
|
+
componentsDictionary: y
|
|
22
|
+
} = t;
|
|
23
|
+
return /* @__PURE__ */ r(p, {
|
|
24
|
+
...s,
|
|
25
|
+
children: /* @__PURE__ */ r(v, {
|
|
26
|
+
...e,
|
|
27
|
+
children: /* @__PURE__ */ r(P, {
|
|
28
|
+
axiosOperation: c,
|
|
29
|
+
children: /* @__PURE__ */ r(f, {
|
|
30
|
+
isMicroFrontEnd: !0,
|
|
31
|
+
localeHost: m,
|
|
32
|
+
children: /* @__PURE__ */ r(b, {
|
|
33
|
+
isMicroFrontEnd: !0,
|
|
34
|
+
...d,
|
|
35
|
+
children: /* @__PURE__ */ r(F, {
|
|
36
|
+
history: e.history,
|
|
37
|
+
children: /* @__PURE__ */ r(M, {
|
|
38
|
+
isMicroFrontEnd: !0,
|
|
39
|
+
id: i?.id || 1,
|
|
40
|
+
currency: o.currencyFormatter.code,
|
|
41
|
+
currency_decimal_digits: o.currencyFormatter.decimalDigits,
|
|
42
|
+
decimal_symbol: o.numberFormatter.decimalSymbol,
|
|
43
|
+
thousands_symbol: o.numberFormatter.thousandsSymbol,
|
|
44
|
+
children: /* @__PURE__ */ r(H, {
|
|
45
|
+
moduleId: l,
|
|
46
|
+
moduleNameField: a,
|
|
47
|
+
componentsDictionary: y,
|
|
48
|
+
skeletonFlags: u,
|
|
49
|
+
privileges: h,
|
|
50
|
+
children: /* @__PURE__ */ r(E, {
|
|
51
|
+
isMicroFrontEnd: !0,
|
|
52
|
+
...o,
|
|
53
|
+
children: /* @__PURE__ */ r(_, {
|
|
54
|
+
...i,
|
|
55
|
+
children: n
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
L as M
|
|
69
|
+
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import type { AxiosOperation, EnvironmentType, HostToolsType } from '@m4l/core';
|
|
3
2
|
import { Formatters, HostThemeType, LocaleType } from '@m4l/graphics';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
3
|
+
import { DynamicMFParameters } from '@m4l/components';
|
|
4
|
+
import { BaseModuleProps } from '../BaseModule/types';
|
|
7
5
|
export interface ByHostProps {
|
|
8
6
|
environment: EnvironmentType;
|
|
9
7
|
hostTools: HostToolsType;
|
|
@@ -13,6 +11,4 @@ export interface ByHostProps {
|
|
|
13
11
|
formatters: Formatters;
|
|
14
12
|
dynamicMFParameters: DynamicMFParameters;
|
|
15
13
|
}
|
|
16
|
-
export
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
}
|
|
14
|
+
export declare type MFHostAppProps = ByHostProps & BaseModuleProps;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { useEffect as y, useMemo as _, useCallback as f } from "react";
|
|
2
|
+
import { unstable_HistoryRouter as C } from "react-router-dom";
|
|
3
|
+
import { ToastContainer as D, toast as H } from "react-toastify";
|
|
4
|
+
import { HostThemeProvider as I, defaultThemeOptions as N, fnComponentsOverrides as O, FormatterProvider as B, LocalesProvider as j, getLocaleFromNetwork as S } from "@m4l/graphics";
|
|
5
|
+
import { A as U } from "../../contexts/AuthContext/index.6f966215.js";
|
|
6
|
+
import { DomainCountryProvider as z, EnvironmentProvider as R, HostToolsProvider as q, NetworkProvider as G, axiosOperation as J } from "@m4l/core";
|
|
7
|
+
import { createBrowserHistory as K } from "history";
|
|
8
|
+
import Q from "eventemitter3";
|
|
9
|
+
import { format as V } from "date-fns";
|
|
10
|
+
import { u as W } from "../../hooks/useAuth/index.cb6a3420.js";
|
|
11
|
+
import { jsx as e, jsxs as X } from "react/jsx-runtime";
|
|
12
|
+
import p from "nprogress";
|
|
13
|
+
import { B as Y } from "../BaseModule/index.6309486a.js";
|
|
14
|
+
import { AreasProvider as Z } from "@m4l/components";
|
|
15
|
+
function $(m) {
|
|
16
|
+
const {
|
|
17
|
+
children: a,
|
|
18
|
+
user: d,
|
|
19
|
+
pwd: l
|
|
20
|
+
} = m, {
|
|
21
|
+
isAuthenticated: s,
|
|
22
|
+
isInitialized: c,
|
|
23
|
+
login: u,
|
|
24
|
+
user: r
|
|
25
|
+
} = W();
|
|
26
|
+
if (y(() => {
|
|
27
|
+
c && s === !1 && (console.log("useEffect MFAuthApp Login"), u(d, l, !1));
|
|
28
|
+
}, [c, s]), !s)
|
|
29
|
+
return /* @__PURE__ */ e("div", {
|
|
30
|
+
children: "Pendiente x atenticar"
|
|
31
|
+
});
|
|
32
|
+
const o = {
|
|
33
|
+
id: 1,
|
|
34
|
+
currency: "USD",
|
|
35
|
+
currency_decimal_digits: 2,
|
|
36
|
+
decimal_symbol: ".",
|
|
37
|
+
thousands_symbol: ","
|
|
38
|
+
};
|
|
39
|
+
return r?.domain_country && (o.id = r?.domain_country.id ?? o.id, o.currency = r?.domain_country.currency ?? o.currency, o.currency_decimal_digits = r?.domain_country.currency_decimal_digits ?? o.currency_decimal_digits, o.decimal_symbol = r?.domain_country.decimal_symbol ?? o.decimal_symbol, o.thousands_symbol = r?.domain_country?.thousands_symbol ?? o.thousands_symbol), /* @__PURE__ */ X(I, {
|
|
40
|
+
hostThemeOptions: N,
|
|
41
|
+
fnComponentsOverrides: O,
|
|
42
|
+
isMicroFrontEnd: !0,
|
|
43
|
+
children: [/* @__PURE__ */ e(D, {}), /* @__PURE__ */ e(z, {
|
|
44
|
+
...o,
|
|
45
|
+
isMicroFrontEnd: !1,
|
|
46
|
+
children: /* @__PURE__ */ e(B, {
|
|
47
|
+
isMicroFrontEnd: !1,
|
|
48
|
+
dateFormatter: {
|
|
49
|
+
formatDate: V
|
|
50
|
+
},
|
|
51
|
+
currencyFormatter: {
|
|
52
|
+
code: o.currency,
|
|
53
|
+
decimalDigits: o.currency_decimal_digits
|
|
54
|
+
},
|
|
55
|
+
children: a
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
const h = K({
|
|
61
|
+
window
|
|
62
|
+
});
|
|
63
|
+
function po(m) {
|
|
64
|
+
const {
|
|
65
|
+
children: a,
|
|
66
|
+
user: d,
|
|
67
|
+
pwd: l,
|
|
68
|
+
host_api_local: s,
|
|
69
|
+
host_api_remote: c,
|
|
70
|
+
host_static_assets: u,
|
|
71
|
+
environment_assets: r,
|
|
72
|
+
moduleId: o,
|
|
73
|
+
skeletonFlags: v,
|
|
74
|
+
moduleNameField: g,
|
|
75
|
+
privileges: F,
|
|
76
|
+
componentsDictionary: P,
|
|
77
|
+
onLoad: A,
|
|
78
|
+
activeAreasNetwork: b = !1
|
|
79
|
+
} = m, t = _(() => new Q(), []), E = f((i, n) => {
|
|
80
|
+
t.on(i, n);
|
|
81
|
+
}, [t]), w = f((i, n) => {
|
|
82
|
+
if (n === null) {
|
|
83
|
+
t.removeListener(i);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
t.removeListener(i, n);
|
|
87
|
+
}, [t]), M = f((i, n) => {
|
|
88
|
+
t.emit(i, n);
|
|
89
|
+
}, [t]), L = () => {
|
|
90
|
+
p.configure({
|
|
91
|
+
showSpinner: !0
|
|
92
|
+
}), p.start();
|
|
93
|
+
}, k = () => {
|
|
94
|
+
p.done();
|
|
95
|
+
}, T = _(() => ({
|
|
96
|
+
host: "",
|
|
97
|
+
isLocalhost: !0,
|
|
98
|
+
domain_token: "lab1",
|
|
99
|
+
host_api_local: s,
|
|
100
|
+
host_api_remote: c,
|
|
101
|
+
host_static_assets: u,
|
|
102
|
+
environment_assets: r
|
|
103
|
+
}), []), x = _(() => ({
|
|
104
|
+
history: h,
|
|
105
|
+
toast: H,
|
|
106
|
+
startProgress: L,
|
|
107
|
+
stopProgress: k,
|
|
108
|
+
events_add_listener: E,
|
|
109
|
+
events_remove_listener: w,
|
|
110
|
+
events_emit: M
|
|
111
|
+
}), []);
|
|
112
|
+
return y(() => {
|
|
113
|
+
console.log("useEffect IsolationApp");
|
|
114
|
+
}, []), /* @__PURE__ */ e(R, {
|
|
115
|
+
...T,
|
|
116
|
+
children: /* @__PURE__ */ e(q, {
|
|
117
|
+
...x,
|
|
118
|
+
children: /* @__PURE__ */ e(G, {
|
|
119
|
+
axiosOperation: J,
|
|
120
|
+
children: /* @__PURE__ */ e(C, {
|
|
121
|
+
history: h,
|
|
122
|
+
children: /* @__PURE__ */ e(j, {
|
|
123
|
+
isMicroFrontEnd: !1,
|
|
124
|
+
getLocaleFromNetwork: S,
|
|
125
|
+
children: /* @__PURE__ */ e(U, {
|
|
126
|
+
children: /* @__PURE__ */ e($, {
|
|
127
|
+
user: d,
|
|
128
|
+
pwd: l,
|
|
129
|
+
children: /* @__PURE__ */ e(Y, {
|
|
130
|
+
moduleId: o,
|
|
131
|
+
privileges: F,
|
|
132
|
+
skeletonFlags: v,
|
|
133
|
+
componentsDictionary: P,
|
|
134
|
+
moduleNameField: g,
|
|
135
|
+
children: /* @__PURE__ */ e(Z, {
|
|
136
|
+
onLoad: A,
|
|
137
|
+
activeAreasNetwork: b,
|
|
138
|
+
children: a
|
|
139
|
+
})
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
export {
|
|
150
|
+
po as M
|
|
151
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModuleProps } from '../BaseModule/types';
|
|
2
|
+
export declare type MFIsolationAppProps = BaseModuleProps & {
|
|
3
|
+
user: string;
|
|
4
|
+
pwd: string;
|
|
5
|
+
host_api_local: string;
|
|
6
|
+
host_api_remote: string;
|
|
7
|
+
host_static_assets: string;
|
|
8
|
+
environment_assets: string;
|
|
9
|
+
onLoad: () => void;
|
|
10
|
+
activeAreasNetwork?: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./AuthContext/index.6f966215.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { M as y } from "./components/MFIsolationApp/index.b21e5671.js";
|
|
2
|
+
import { M as x } from "./components/MFHostApp/index.1700d13a.js";
|
|
3
|
+
import { B as A } from "./components/BaseModule/index.6309486a.js";
|
|
4
|
+
import { a as c, A as g } from "./contexts/AuthContext/index.6f966215.js";
|
|
5
|
+
import { a as C, d as N, g as B } from "./layouts/ModuleLayout/index.a76397df.js";
|
|
6
|
+
import { a as v, d as H, g as I } from "./layouts/MasterDetailLayout/index.3da0ffda.js";
|
|
7
|
+
import { N as b, d as j, g as k } from "./layouts/NoAuthModuleLayout/index.5d1098ef.js";
|
|
8
|
+
import { u as w } from "./hooks/useMasterDetail/index.1b024fd5.js";
|
|
9
|
+
import { u as E } from "./hooks/useAuth/index.cb6a3420.js";
|
|
10
|
+
import { u as J } from "./hooks/useModule/index.6ff7d08a.js";
|
|
11
|
+
import "react";
|
|
12
|
+
import "react-router-dom";
|
|
13
|
+
import "react-toastify";
|
|
14
|
+
import "@m4l/graphics";
|
|
15
|
+
import "@m4l/core";
|
|
16
|
+
import "history";
|
|
17
|
+
import "eventemitter3";
|
|
18
|
+
import "date-fns";
|
|
19
|
+
import "react/jsx-runtime";
|
|
20
|
+
import "nprogress";
|
|
21
|
+
import "@m4l/components";
|
|
22
|
+
import "@mui/material/styles";
|
|
23
|
+
export {
|
|
24
|
+
c as AuthContext,
|
|
25
|
+
g as AuthProvider,
|
|
26
|
+
A as BaseModule,
|
|
27
|
+
x as MFHostApp,
|
|
28
|
+
y as MFIsolationApp,
|
|
29
|
+
v as MasterDetailLayout,
|
|
30
|
+
C as ModuleLayout,
|
|
31
|
+
b as NoAuthModuleLayout,
|
|
32
|
+
H as defaultMasterDetailDictionary,
|
|
33
|
+
N as defaultModuleLayoutDictionary,
|
|
34
|
+
j as defaultNoAuthModuleLayoutDictionary,
|
|
35
|
+
I as getMasterDetailLayoutComponentsDictionary,
|
|
36
|
+
B as getModuleLayoutComponentsDictionary,
|
|
37
|
+
k as getNoAuthModuleLayoutComponentsDictionary,
|
|
38
|
+
E as useAuth,
|
|
39
|
+
w as useMasterDetail,
|
|
40
|
+
J as useModule
|
|
41
|
+
};
|