@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.
- package/{dist/components/MFIsolationApp/index.b21e5671.js → components/MFIsolationApp/index.b89e6800.js} +38 -37
- package/{dist/components/index.deb4e7ac.js → components/index.37205bf4.js} +1 -1
- package/index.js +42 -0
- package/m4l_layouts/types.d.ts +0 -0
- package/package.json +10 -53
- 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/index.js +0 -41
- 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.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/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/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
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { useEffect as y, useMemo as
|
|
1
|
+
import { useEffect as y, useMemo as f, useCallback as _ } from "react";
|
|
2
2
|
import { unstable_HistoryRouter as C } from "react-router-dom";
|
|
3
3
|
import { ToastContainer as D, toast as H } from "react-toastify";
|
|
4
|
-
import { HostThemeProvider as I,
|
|
5
|
-
import { A as
|
|
6
|
-
import { DomainCountryProvider as
|
|
7
|
-
import { createBrowserHistory as
|
|
8
|
-
import
|
|
9
|
-
import { format as
|
|
4
|
+
import { HostThemeProvider as I, FormatterProvider as N, LocalesProvider as O, getLocaleFromNetwork as B } from "@m4l/graphics";
|
|
5
|
+
import { A as j } from "../../contexts/AuthContext/index.6f966215.js";
|
|
6
|
+
import { DomainCountryProvider as S, EnvironmentProvider as U, HostToolsProvider as z, NetworkProvider as R, axiosOperation as q } from "@m4l/core";
|
|
7
|
+
import { createBrowserHistory as G } from "history";
|
|
8
|
+
import J from "eventemitter3";
|
|
9
|
+
import { format as K } from "date-fns";
|
|
10
|
+
import { defaultThemeOptions as Q, fnComponentsOverrides as V } from "@m4l/styles";
|
|
10
11
|
import { u as W } from "../../hooks/useAuth/index.cb6a3420.js";
|
|
11
|
-
import { jsx as
|
|
12
|
+
import { jsx as r, jsxs as X } from "react/jsx-runtime";
|
|
12
13
|
import p from "nprogress";
|
|
13
14
|
import { B as Y } from "../BaseModule/index.6309486a.js";
|
|
14
15
|
import { AreasProvider as Z } from "@m4l/components";
|
|
@@ -21,12 +22,12 @@ function $(m) {
|
|
|
21
22
|
isAuthenticated: s,
|
|
22
23
|
isInitialized: c,
|
|
23
24
|
login: u,
|
|
24
|
-
user:
|
|
25
|
+
user: e
|
|
25
26
|
} = W();
|
|
26
27
|
if (y(() => {
|
|
27
28
|
c && s === !1 && (console.log("useEffect MFAuthApp Login"), u(d, l, !1));
|
|
28
29
|
}, [c, s]), !s)
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ r("div", {
|
|
30
31
|
children: "Pendiente x atenticar"
|
|
31
32
|
});
|
|
32
33
|
const o = {
|
|
@@ -36,17 +37,17 @@ function $(m) {
|
|
|
36
37
|
decimal_symbol: ".",
|
|
37
38
|
thousands_symbol: ","
|
|
38
39
|
};
|
|
39
|
-
return
|
|
40
|
-
hostThemeOptions:
|
|
41
|
-
fnComponentsOverrides:
|
|
40
|
+
return e?.domain_country && (o.id = e?.domain_country.id ?? o.id, o.currency = e?.domain_country.currency ?? o.currency, o.currency_decimal_digits = e?.domain_country.currency_decimal_digits ?? o.currency_decimal_digits, o.decimal_symbol = e?.domain_country.decimal_symbol ?? o.decimal_symbol, o.thousands_symbol = e?.domain_country?.thousands_symbol ?? o.thousands_symbol), /* @__PURE__ */ X(I, {
|
|
41
|
+
hostThemeOptions: Q,
|
|
42
|
+
fnComponentsOverrides: V,
|
|
42
43
|
isMicroFrontEnd: !0,
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ r(D, {}), /* @__PURE__ */ r(S, {
|
|
44
45
|
...o,
|
|
45
46
|
isMicroFrontEnd: !1,
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ r(N, {
|
|
47
48
|
isMicroFrontEnd: !1,
|
|
48
49
|
dateFormatter: {
|
|
49
|
-
formatDate:
|
|
50
|
+
formatDate: K
|
|
50
51
|
},
|
|
51
52
|
currencyFormatter: {
|
|
52
53
|
code: o.currency,
|
|
@@ -57,10 +58,10 @@ function $(m) {
|
|
|
57
58
|
})]
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
|
-
const h =
|
|
61
|
+
const h = G({
|
|
61
62
|
window
|
|
62
63
|
});
|
|
63
|
-
function
|
|
64
|
+
function ho(m) {
|
|
64
65
|
const {
|
|
65
66
|
children: a,
|
|
66
67
|
user: d,
|
|
@@ -68,7 +69,7 @@ function po(m) {
|
|
|
68
69
|
host_api_local: s,
|
|
69
70
|
host_api_remote: c,
|
|
70
71
|
host_static_assets: u,
|
|
71
|
-
environment_assets:
|
|
72
|
+
environment_assets: e,
|
|
72
73
|
moduleId: o,
|
|
73
74
|
skeletonFlags: v,
|
|
74
75
|
moduleNameField: g,
|
|
@@ -76,15 +77,15 @@ function po(m) {
|
|
|
76
77
|
componentsDictionary: P,
|
|
77
78
|
onLoad: A,
|
|
78
79
|
activeAreasNetwork: b = !1
|
|
79
|
-
} = m, t =
|
|
80
|
+
} = m, t = f(() => new J(), []), E = _((i, n) => {
|
|
80
81
|
t.on(i, n);
|
|
81
|
-
}, [t]), w =
|
|
82
|
+
}, [t]), w = _((i, n) => {
|
|
82
83
|
if (n === null) {
|
|
83
84
|
t.removeListener(i);
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
86
87
|
t.removeListener(i, n);
|
|
87
|
-
}, [t]), M =
|
|
88
|
+
}, [t]), M = _((i, n) => {
|
|
88
89
|
t.emit(i, n);
|
|
89
90
|
}, [t]), L = () => {
|
|
90
91
|
p.configure({
|
|
@@ -92,15 +93,15 @@ function po(m) {
|
|
|
92
93
|
}), p.start();
|
|
93
94
|
}, k = () => {
|
|
94
95
|
p.done();
|
|
95
|
-
}, T =
|
|
96
|
+
}, T = f(() => ({
|
|
96
97
|
host: "",
|
|
97
98
|
isLocalhost: !0,
|
|
98
99
|
domain_token: "lab1",
|
|
99
100
|
host_api_local: s,
|
|
100
101
|
host_api_remote: c,
|
|
101
102
|
host_static_assets: u,
|
|
102
|
-
environment_assets:
|
|
103
|
-
}), []), x =
|
|
103
|
+
environment_assets: e
|
|
104
|
+
}), []), x = f(() => ({
|
|
104
105
|
history: h,
|
|
105
106
|
toast: H,
|
|
106
107
|
startProgress: L,
|
|
@@ -111,28 +112,28 @@ function po(m) {
|
|
|
111
112
|
}), []);
|
|
112
113
|
return y(() => {
|
|
113
114
|
console.log("useEffect IsolationApp");
|
|
114
|
-
}, []), /* @__PURE__ */
|
|
115
|
+
}, []), /* @__PURE__ */ r(U, {
|
|
115
116
|
...T,
|
|
116
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ r(z, {
|
|
117
118
|
...x,
|
|
118
|
-
children: /* @__PURE__ */
|
|
119
|
-
axiosOperation:
|
|
120
|
-
children: /* @__PURE__ */
|
|
119
|
+
children: /* @__PURE__ */ r(R, {
|
|
120
|
+
axiosOperation: q,
|
|
121
|
+
children: /* @__PURE__ */ r(C, {
|
|
121
122
|
history: h,
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ r(O, {
|
|
123
124
|
isMicroFrontEnd: !1,
|
|
124
|
-
getLocaleFromNetwork:
|
|
125
|
-
children: /* @__PURE__ */
|
|
126
|
-
children: /* @__PURE__ */
|
|
125
|
+
getLocaleFromNetwork: B,
|
|
126
|
+
children: /* @__PURE__ */ r(j, {
|
|
127
|
+
children: /* @__PURE__ */ r($, {
|
|
127
128
|
user: d,
|
|
128
129
|
pwd: l,
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ r(Y, {
|
|
130
131
|
moduleId: o,
|
|
131
132
|
privileges: F,
|
|
132
133
|
skeletonFlags: v,
|
|
133
134
|
componentsDictionary: P,
|
|
134
135
|
moduleNameField: g,
|
|
135
|
-
children: /* @__PURE__ */
|
|
136
|
+
children: /* @__PURE__ */ r(Z, {
|
|
136
137
|
onLoad: A,
|
|
137
138
|
activeAreasNetwork: b,
|
|
138
139
|
children: a
|
|
@@ -147,5 +148,5 @@ function po(m) {
|
|
|
147
148
|
});
|
|
148
149
|
}
|
|
149
150
|
export {
|
|
150
|
-
|
|
151
|
+
ho as M
|
|
151
152
|
};
|
package/index.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { M as f } from "./components/MFIsolationApp/index.b89e6800.js";
|
|
2
|
+
import { M as D } from "./components/MFHostApp/index.1700d13a.js";
|
|
3
|
+
import { B as L } from "./components/BaseModule/index.6309486a.js";
|
|
4
|
+
import { a as g, A as h } from "./contexts/AuthContext/index.6f966215.js";
|
|
5
|
+
import { a as N, d as B, g as F } from "./layouts/ModuleLayout/index.a76397df.js";
|
|
6
|
+
import { a as H, d as I, g as P } from "./layouts/MasterDetailLayout/index.3da0ffda.js";
|
|
7
|
+
import { N as j, d as k, g as q } from "./layouts/NoAuthModuleLayout/index.5d1098ef.js";
|
|
8
|
+
import { u as z } from "./hooks/useMasterDetail/index.1b024fd5.js";
|
|
9
|
+
import { u as G } from "./hooks/useAuth/index.cb6a3420.js";
|
|
10
|
+
import { u as K } 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 "@m4l/styles";
|
|
20
|
+
import "react/jsx-runtime";
|
|
21
|
+
import "nprogress";
|
|
22
|
+
import "@m4l/components";
|
|
23
|
+
import "@mui/material/styles";
|
|
24
|
+
export {
|
|
25
|
+
g as AuthContext,
|
|
26
|
+
h as AuthProvider,
|
|
27
|
+
L as BaseModule,
|
|
28
|
+
D as MFHostApp,
|
|
29
|
+
f as MFIsolationApp,
|
|
30
|
+
H as MasterDetailLayout,
|
|
31
|
+
N as ModuleLayout,
|
|
32
|
+
j as NoAuthModuleLayout,
|
|
33
|
+
I as defaultMasterDetailDictionary,
|
|
34
|
+
B as defaultModuleLayoutDictionary,
|
|
35
|
+
k as defaultNoAuthModuleLayoutDictionary,
|
|
36
|
+
P as getMasterDetailLayoutComponentsDictionary,
|
|
37
|
+
F as getModuleLayoutComponentsDictionary,
|
|
38
|
+
q as getNoAuthModuleLayoutComponentsDictionary,
|
|
39
|
+
G as useAuth,
|
|
40
|
+
z as useMasterDetail,
|
|
41
|
+
K as useModule
|
|
42
|
+
};
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/layouts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
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": "*",
|
|
21
|
-
"@m4l/graphics": "*"
|
|
8
|
+
"@m4l/graphics": "*",
|
|
9
|
+
"@m4l/styles": "*"
|
|
22
10
|
},
|
|
23
11
|
"peerDependencies": {
|
|
24
12
|
"@types/react": "^17.0.0 || ^18.0.0",
|
|
@@ -30,51 +18,20 @@
|
|
|
30
18
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
31
19
|
"react-toastify": "9.0.5"
|
|
32
20
|
},
|
|
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
21
|
"files": [
|
|
66
22
|
"*"
|
|
67
23
|
],
|
|
68
|
-
"source": "
|
|
69
|
-
"main": "./
|
|
70
|
-
"module": "./
|
|
24
|
+
"source": "./index.js",
|
|
25
|
+
"main": "./index.js",
|
|
26
|
+
"module": "./index.js",
|
|
71
27
|
"type": "module",
|
|
72
|
-
"types": "./
|
|
28
|
+
"types": "./index.d.ts",
|
|
73
29
|
"sideEffects": false,
|
|
74
30
|
"publishConfig": {
|
|
75
31
|
"access": "public"
|
|
76
32
|
},
|
|
77
33
|
"engines": {
|
|
78
34
|
"node": ">=12.0.0"
|
|
79
|
-
}
|
|
80
|
-
|
|
35
|
+
},
|
|
36
|
+
"private": false
|
|
37
|
+
}
|
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/index.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
};
|
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
|
-
}
|