@m4l/layouts 0.1.28 → 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.
|
@@ -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
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { M as
|
|
2
|
-
import { M as
|
|
3
|
-
import { B as
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as
|
|
6
|
-
import { a as
|
|
7
|
-
import { N as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
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
11
|
import "react";
|
|
12
12
|
import "react-router-dom";
|
|
13
13
|
import "react-toastify";
|
|
@@ -16,26 +16,27 @@ import "@m4l/core";
|
|
|
16
16
|
import "history";
|
|
17
17
|
import "eventemitter3";
|
|
18
18
|
import "date-fns";
|
|
19
|
+
import "@m4l/styles";
|
|
19
20
|
import "react/jsx-runtime";
|
|
20
21
|
import "nprogress";
|
|
21
22
|
import "@m4l/components";
|
|
22
23
|
import "@mui/material/styles";
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
|
41
42
|
};
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/layouts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@m4l/components": "*",
|
|
7
7
|
"@m4l/core": "*",
|
|
8
|
-
"@m4l/graphics": "*"
|
|
8
|
+
"@m4l/graphics": "*",
|
|
9
|
+
"@m4l/styles": "*"
|
|
9
10
|
},
|
|
10
11
|
"peerDependencies": {
|
|
11
12
|
"@types/react": "^17.0.0 || ^18.0.0",
|