@m4l/layouts 0.1.26 → 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.
- package/package.json +8 -52
- package/.eslintignore +0 -2
- package/.eslintrc.cjs +0 -118
- package/.gitignore +0 -23
- package/.gitlab-ci.yml +0 -16
- package/.prettierignore +0 -3
- package/.prettierrc.json +0 -26
- package/.vscode/settings.json +0 -50
- package/dist/package.json +0 -36
- package/src/@types/index.ts +0 -8
- package/src/components/BaseModule/index.tsx +0 -59
- package/src/components/BaseModule/types.ts +0 -12
- package/src/components/MFHostApp/index.tsx +0 -95
- package/src/components/MFHostApp/types.ts +0 -16
- package/src/components/MFIsolationApp/index.tsx +0 -164
- package/src/components/MFIsolationApp/subcomponents/MFAuthApp/index.tsx +0 -98
- package/src/components/MFIsolationApp/subcomponents/MFAuthApp/types.ts +0 -7
- package/src/components/MFIsolationApp/types.ts +0 -12
- package/src/components/index.ts +0 -5
- package/src/contexts/AuthContext/index.tsx +0 -189
- package/src/contexts/AuthContext/types.ts +0 -65
- package/src/contexts/index.ts +0 -1
- package/src/hooks/index.ts +0 -5
- package/src/hooks/useAuth/index.ts +0 -12
- package/src/hooks/useMasterDetail/index.ts +0 -6
- package/src/hooks/useModule/index.ts +0 -13
- package/src/index.ts +0 -7
- package/src/layouts/MasterDetailLayout/components/ButtonDetail/index.tsx +0 -38
- package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.tsx +0 -34
- package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/types.ts +0 -19
- package/src/layouts/MasterDetailLayout/dicctionary.ts +0 -20
- package/src/layouts/MasterDetailLayout/index.tsx +0 -165
- package/src/layouts/MasterDetailLayout/types.ts +0 -11
- package/src/layouts/ModuleLayout/contexts/ModuleContext/index.tsx +0 -56
- package/src/layouts/ModuleLayout/contexts/ModuleContext/types.ts +0 -23
- package/src/layouts/ModuleLayout/dicctionary.ts +0 -11
- package/src/layouts/ModuleLayout/index.tsx +0 -59
- package/src/layouts/ModuleLayout/subcomponents/InnerModule/index.tsx +0 -35
- package/src/layouts/ModuleLayout/subcomponents/InnerModule/styles.tsx +0 -31
- package/src/layouts/ModuleLayout/subcomponents/InnerModule/types.ts +0 -11
- package/src/layouts/ModuleLayout/types.ts +0 -31
- package/src/layouts/NoAuthModuleLayout/dicctionary.ts +0 -9
- package/src/layouts/NoAuthModuleLayout/index.tsx +0 -85
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.tsx +0 -43
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.tsx +0 -6
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.tsx +0 -14
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.tsx +0 -7
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.tsx +0 -25
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.tsx +0 -11
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.tsx +0 -17
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.tsx +0 -19
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.tsx +0 -25
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.tsx +0 -8
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.ts +0 -5
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.ts +0 -5
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.tsx +0 -28
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.tsx +0 -16
- package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/types.ts +0 -5
- package/src/layouts/NoAuthModuleLayout/types.ts +0 -22
- package/src/layouts/index.ts +0 -8
- package/src/test/setup.ts +0 -1
- package/src/test/utils.tsx +0 -20
- package/src/vite-env.d.ts +0 -3
- package/tsconfig.json +0 -29
- package/tsconfig.node.json +0 -8
- package/vite.config.ts +0 -172
- /package/{dist/components → components}/BaseModule/index.6309486a.js +0 -0
- /package/{dist/components → components}/BaseModule/index.d.ts +0 -0
- /package/{dist/components → components}/BaseModule/types.d.ts +0 -0
- /package/{dist/components → components}/MFHostApp/index.1700d13a.js +0 -0
- /package/{dist/components → components}/MFHostApp/index.d.ts +0 -0
- /package/{dist/components → components}/MFHostApp/types.d.ts +0 -0
- /package/{dist/components → components}/MFIsolationApp/index.b21e5671.js +0 -0
- /package/{dist/components → components}/MFIsolationApp/index.d.ts +0 -0
- /package/{dist/components → components}/MFIsolationApp/subcomponents/MFAuthApp/index.d.ts +0 -0
- /package/{dist/components → components}/MFIsolationApp/subcomponents/MFAuthApp/types.d.ts +0 -0
- /package/{dist/components → components}/MFIsolationApp/types.d.ts +0 -0
- /package/{dist/components → components}/index.d.ts +0 -0
- /package/{dist/components → components}/index.deb4e7ac.js +0 -0
- /package/{dist/contexts → contexts}/AuthContext/index.6f966215.js +0 -0
- /package/{dist/contexts → contexts}/AuthContext/index.d.ts +0 -0
- /package/{dist/contexts → contexts}/AuthContext/types.d.ts +0 -0
- /package/{dist/contexts → contexts}/index.b46a2699.js +0 -0
- /package/{dist/contexts → contexts}/index.d.ts +0 -0
- /package/{dist/hooks → hooks}/index.2022a179.js +0 -0
- /package/{dist/hooks → hooks}/index.d.ts +0 -0
- /package/{dist/hooks → hooks}/useAuth/index.cb6a3420.js +0 -0
- /package/{dist/hooks → hooks}/useAuth/index.d.ts +0 -0
- /package/{dist/hooks → hooks}/useMasterDetail/index.1b024fd5.js +0 -0
- /package/{dist/hooks → hooks}/useMasterDetail/index.d.ts +0 -0
- /package/{dist/hooks → hooks}/useModule/index.6ff7d08a.js +0 -0
- /package/{dist/hooks → hooks}/useModule/index.d.ts +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/layouts → layouts}/MasterDetailLayout/contexts/MasterDetailContext/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/MasterDetailLayout/contexts/MasterDetailContext/types.d.ts +0 -0
- /package/{dist/layouts → layouts}/MasterDetailLayout/dicctionary.d.ts +0 -0
- /package/{dist/layouts → layouts}/MasterDetailLayout/index.3da0ffda.js +0 -0
- /package/{dist/layouts → layouts}/MasterDetailLayout/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/MasterDetailLayout/types.d.ts +0 -0
- /package/{dist/layouts → layouts}/ModuleLayout/contexts/ModuleContext/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/ModuleLayout/contexts/ModuleContext/types.d.ts +0 -0
- /package/{dist/layouts → layouts}/ModuleLayout/dicctionary.d.ts +0 -0
- /package/{dist/layouts → layouts}/ModuleLayout/index.a76397df.js +0 -0
- /package/{dist/layouts → layouts}/ModuleLayout/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/ModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/ModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
- /package/{dist/layouts → layouts}/ModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
- /package/{dist/layouts → layouts}/ModuleLayout/types.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/dicctionary.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/index.5d1098ef.js +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
- /package/{dist/layouts → layouts}/NoAuthModuleLayout/types.d.ts +0 -0
- /package/{dist/layouts → layouts}/index.014e41ba.js +0 -0
- /package/{dist/layouts → layouts}/index.d.ts +0 -0
- /package/{dist/vite-env.d.ts → vite-env.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/layouts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"typescript": "tsc",
|
|
7
|
-
"build:package": "node ../../scripts/buildpackage.js",
|
|
8
|
-
"build": "tsc && vite build",
|
|
9
|
-
"build:monorepo": "tsc && vite build && yarn build:package",
|
|
10
|
-
"release:monorepo": "yarn build:monorepo && npm publish ./dist",
|
|
11
|
-
"lint": "npx eslint src",
|
|
12
|
-
"lint:fix": "npm run lint -- --fix",
|
|
13
|
-
"prettier": "npx prettier src --check",
|
|
14
|
-
"prettier:fix": "npm run prettier -- --write",
|
|
15
|
-
"format": "npm run prettier:fix && npm run lint:fix",
|
|
16
|
-
"coverage": "vitest run --coverage"
|
|
17
|
-
},
|
|
18
5
|
"dependencies": {
|
|
19
6
|
"@m4l/components": "*",
|
|
20
7
|
"@m4l/core": "*",
|
|
@@ -30,51 +17,20 @@
|
|
|
30
17
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
31
18
|
"react-toastify": "9.0.5"
|
|
32
19
|
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@emotion/react": "^11.5.0",
|
|
35
|
-
"@emotion/styled": "^11.3.0",
|
|
36
|
-
"@testing-library/dom": "^8.17.1",
|
|
37
|
-
"@testing-library/react": "^13.3.0",
|
|
38
|
-
"@testing-library/user-event": "^14.2.1",
|
|
39
|
-
"@types/node": "^16.7.10",
|
|
40
|
-
"@types/react": "^18.0.0",
|
|
41
|
-
"@types/react-dom": "^18.0.0",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "5.27.1",
|
|
43
|
-
"@typescript-eslint/parser": "5.27.1",
|
|
44
|
-
"@vitejs/plugin-react": "1.3.2",
|
|
45
|
-
"eslint": "8.17.0",
|
|
46
|
-
"eslint-config-prettier": "8.5.0",
|
|
47
|
-
"eslint-import-resolver-alias": "1.1.2",
|
|
48
|
-
"eslint-plugin-import": "2.26.0",
|
|
49
|
-
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
50
|
-
"eslint-plugin-prettier": "4.0.0",
|
|
51
|
-
"eslint-plugin-react": "7.30.0",
|
|
52
|
-
"eslint-plugin-react-hooks": "4.5.0",
|
|
53
|
-
"eslint-plugin-unused-imports": "2.0.0",
|
|
54
|
-
"eventemitter3": "^4.0.7",
|
|
55
|
-
"history": "5.3.0",
|
|
56
|
-
"nprogress": "^0.2.0",
|
|
57
|
-
"prettier": "2.6.2",
|
|
58
|
-
"react": "^18.0.0",
|
|
59
|
-
"rollup": "2.79.0",
|
|
60
|
-
"typescript": "4.6.3",
|
|
61
|
-
"vite": "3.1.0",
|
|
62
|
-
"vite-plugin-dts": "1.2.0",
|
|
63
|
-
"vitest": "^0.23.4"
|
|
64
|
-
},
|
|
65
20
|
"files": [
|
|
66
21
|
"*"
|
|
67
22
|
],
|
|
68
|
-
"source": "
|
|
69
|
-
"main": "./
|
|
70
|
-
"module": "./
|
|
23
|
+
"source": "./index.js",
|
|
24
|
+
"main": "./index.js",
|
|
25
|
+
"module": "./index.js",
|
|
71
26
|
"type": "module",
|
|
72
|
-
"types": "./
|
|
27
|
+
"types": "./index.d.ts",
|
|
73
28
|
"sideEffects": false,
|
|
74
29
|
"publishConfig": {
|
|
75
30
|
"access": "public"
|
|
76
31
|
},
|
|
77
32
|
"engines": {
|
|
78
33
|
"node": ">=12.0.0"
|
|
79
|
-
}
|
|
80
|
-
|
|
34
|
+
},
|
|
35
|
+
"private": false
|
|
36
|
+
}
|
package/.eslintignore
DELETED
package/.eslintrc.cjs
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
DELETED
package/.prettierignore
DELETED
package/.prettierrc.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
|
package/.vscode/settings.json
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/package.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@m4l/layouts",
|
|
3
|
-
"version": "0.1.26",
|
|
4
|
-
"license": "UNLICENSED",
|
|
5
|
-
"dependencies": {
|
|
6
|
-
"@m4l/components": "*",
|
|
7
|
-
"@m4l/core": "*",
|
|
8
|
-
"@m4l/graphics": "*"
|
|
9
|
-
},
|
|
10
|
-
"peerDependencies": {
|
|
11
|
-
"@types/react": "^17.0.0 || ^18.0.0",
|
|
12
|
-
"@types/react-dom": "^17.0.0 || ^18.0.0",
|
|
13
|
-
"eventemitter3": "^4.0.7",
|
|
14
|
-
"history": "5.3.0",
|
|
15
|
-
"nprogress": "^0.2.0",
|
|
16
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
17
|
-
"react-dom": "^17.0.0 || ^18.0.0",
|
|
18
|
-
"react-toastify": "9.0.5"
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"*"
|
|
22
|
-
],
|
|
23
|
-
"source": "src/index.ts",
|
|
24
|
-
"main": "./index.js",
|
|
25
|
-
"module": "./index.js",
|
|
26
|
-
"type": "module",
|
|
27
|
-
"types": "./index.d.ts",
|
|
28
|
-
"sideEffects": false,
|
|
29
|
-
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
31
|
-
},
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">=12.0.0"
|
|
34
|
-
},
|
|
35
|
-
"private": false
|
|
36
|
-
}
|
package/src/@types/index.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// react
|
|
2
|
-
|
|
3
|
-
//m4l
|
|
4
|
-
|
|
5
|
-
import { ModalProvider } from '@m4l/components';
|
|
6
|
-
import {
|
|
7
|
-
FlagsProvider,
|
|
8
|
-
ModuleDictionaryProvider,
|
|
9
|
-
ModulePrivilegesProvider,
|
|
10
|
-
ModuleSkeletonProvider,
|
|
11
|
-
} from '@m4l/core';
|
|
12
|
-
// external components
|
|
13
|
-
|
|
14
|
-
// mui
|
|
15
|
-
// internal components
|
|
16
|
-
// hooks /providers
|
|
17
|
-
|
|
18
|
-
// sub comoponents
|
|
19
|
-
|
|
20
|
-
// types
|
|
21
|
-
import { BaseModuleProps } from './types';
|
|
22
|
-
// network
|
|
23
|
-
|
|
24
|
-
// config
|
|
25
|
-
|
|
26
|
-
// utils
|
|
27
|
-
|
|
28
|
-
// css
|
|
29
|
-
|
|
30
|
-
export function BaseModule(props: BaseModuleProps) {
|
|
31
|
-
const {
|
|
32
|
-
children,
|
|
33
|
-
|
|
34
|
-
moduleId,
|
|
35
|
-
moduleNameField,
|
|
36
|
-
skeletonFlags,
|
|
37
|
-
privileges,
|
|
38
|
-
componentsDictionary,
|
|
39
|
-
} = props;
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<FlagsProvider>
|
|
43
|
-
<ModuleDictionaryProvider
|
|
44
|
-
isAuth={true}
|
|
45
|
-
moduleId={moduleId}
|
|
46
|
-
moduleNameField={moduleNameField}
|
|
47
|
-
componentsDictionary={componentsDictionary}
|
|
48
|
-
>
|
|
49
|
-
<ModuleSkeletonProvider flags={skeletonFlags}>
|
|
50
|
-
<ModulePrivilegesProvider queryPrivileges={privileges}>
|
|
51
|
-
<ModalProvider>{children}</ModalProvider>
|
|
52
|
-
</ModulePrivilegesProvider>
|
|
53
|
-
</ModuleSkeletonProvider>
|
|
54
|
-
</ModuleDictionaryProvider>
|
|
55
|
-
</FlagsProvider>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export default BaseModule;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export type BaseModuleProps = {
|
|
4
|
-
//Parametros del modulo
|
|
5
|
-
moduleId: string;
|
|
6
|
-
skeletonFlags: string[];
|
|
7
|
-
moduleNameField?: string;
|
|
8
|
-
privileges: string[];
|
|
9
|
-
componentsDictionary: string[];
|
|
10
|
-
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
// react
|
|
2
|
-
import { unstable_HistoryRouter as HistoryRouter } from 'react-router-dom';
|
|
3
|
-
|
|
4
|
-
//m4l
|
|
5
|
-
import {
|
|
6
|
-
DomainCountryProvider,
|
|
7
|
-
EnvironmentProvider,
|
|
8
|
-
HostToolsProvider,
|
|
9
|
-
NetworkProvider,
|
|
10
|
-
} from '@m4l/core';
|
|
11
|
-
import { FormatterProvider, HostThemeProvider, LocalesProvider } from '@m4l/graphics';
|
|
12
|
-
|
|
13
|
-
// external components
|
|
14
|
-
|
|
15
|
-
// mui
|
|
16
|
-
|
|
17
|
-
// internal components
|
|
18
|
-
|
|
19
|
-
// hooks /providers
|
|
20
|
-
|
|
21
|
-
// sub comoponents
|
|
22
|
-
|
|
23
|
-
// types
|
|
24
|
-
|
|
25
|
-
// network
|
|
26
|
-
|
|
27
|
-
// config
|
|
28
|
-
|
|
29
|
-
// utils
|
|
30
|
-
|
|
31
|
-
// css
|
|
32
|
-
|
|
33
|
-
import { MFHostAppProps } from './types';
|
|
34
|
-
|
|
35
|
-
import BaseModule from '../BaseModule';
|
|
36
|
-
import { DynamicMFParmsProvider } from '@m4l/components';
|
|
37
|
-
|
|
38
|
-
export function MFHostApp(props: MFHostAppProps) {
|
|
39
|
-
const {
|
|
40
|
-
children,
|
|
41
|
-
currentLocale,
|
|
42
|
-
hostTheme,
|
|
43
|
-
environment,
|
|
44
|
-
hostTools,
|
|
45
|
-
axiosOperation,
|
|
46
|
-
formatters,
|
|
47
|
-
dynamicMFParameters,
|
|
48
|
-
moduleId,
|
|
49
|
-
moduleNameField,
|
|
50
|
-
skeletonFlags,
|
|
51
|
-
privileges,
|
|
52
|
-
componentsDictionary,
|
|
53
|
-
} = props;
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<EnvironmentProvider {...environment}>
|
|
57
|
-
<HostToolsProvider {...hostTools}>
|
|
58
|
-
<NetworkProvider axiosOperation={axiosOperation}>
|
|
59
|
-
<LocalesProvider isMicroFrontEnd localeHost={currentLocale}>
|
|
60
|
-
<HostThemeProvider isMicroFrontEnd={true} {...hostTheme}>
|
|
61
|
-
<HistoryRouter history={hostTools.history}>
|
|
62
|
-
<DomainCountryProvider
|
|
63
|
-
isMicroFrontEnd
|
|
64
|
-
id={dynamicMFParameters?.id || 1}
|
|
65
|
-
currency={formatters.currencyFormatter.code}
|
|
66
|
-
currency_decimal_digits={
|
|
67
|
-
formatters.currencyFormatter.decimalDigits
|
|
68
|
-
}
|
|
69
|
-
decimal_symbol={formatters.numberFormatter.decimalSymbol}
|
|
70
|
-
thousands_symbol={formatters.numberFormatter.thousandsSymbol}
|
|
71
|
-
>
|
|
72
|
-
<BaseModule
|
|
73
|
-
moduleId={moduleId}
|
|
74
|
-
moduleNameField={moduleNameField}
|
|
75
|
-
componentsDictionary={componentsDictionary}
|
|
76
|
-
skeletonFlags={skeletonFlags}
|
|
77
|
-
privileges={privileges}
|
|
78
|
-
>
|
|
79
|
-
<FormatterProvider isMicroFrontEnd {...formatters}>
|
|
80
|
-
<DynamicMFParmsProvider {...dynamicMFParameters}>
|
|
81
|
-
{children}
|
|
82
|
-
</DynamicMFParmsProvider>
|
|
83
|
-
</FormatterProvider>
|
|
84
|
-
</BaseModule>
|
|
85
|
-
</DomainCountryProvider>
|
|
86
|
-
</HistoryRouter>
|
|
87
|
-
</HostThemeProvider>
|
|
88
|
-
</LocalesProvider>
|
|
89
|
-
</NetworkProvider>
|
|
90
|
-
</HostToolsProvider>
|
|
91
|
-
</EnvironmentProvider>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export default MFHostApp;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AxiosOperation, EnvironmentType, HostToolsType } from '@m4l/core';
|
|
2
|
-
import { Formatters, HostThemeType, LocaleType } from '@m4l/graphics';
|
|
3
|
-
import { DynamicMFParameters } from '@m4l/components';
|
|
4
|
-
import { BaseModuleProps } from '../BaseModule/types';
|
|
5
|
-
|
|
6
|
-
export interface ByHostProps {
|
|
7
|
-
environment: EnvironmentType;
|
|
8
|
-
hostTools: HostToolsType;
|
|
9
|
-
hostTheme: HostThemeType;
|
|
10
|
-
currentLocale: LocaleType;
|
|
11
|
-
axiosOperation: AxiosOperation;
|
|
12
|
-
formatters: Formatters;
|
|
13
|
-
dynamicMFParameters: DynamicMFParameters;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type MFHostAppProps = ByHostProps & BaseModuleProps;
|