@m4l/layouts 0.1.15 → 0.1.17
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/components/MFHostApp/index.5af54b8e.js +32 -0
- package/components/MFHostApp/index.d.ts +4 -0
- package/components/MFHostApp/types.d.ts +19 -0
- package/components/MFIsolationApp/index.967f891d.js +105 -0
- package/components/MFIsolationApp/index.d.ts +4 -0
- package/components/MFIsolationApp/subcomponents/MFAuthApp/index.d.ts +4 -0
- package/components/MFIsolationApp/subcomponents/MFAuthApp/types.d.ts +6 -0
- package/components/MFIsolationApp/types.d.ts +10 -0
- package/components/index.d.ts +3 -0
- package/contexts/AuthContext/{index.59755369.js → index.6f966215.js} +2 -2
- package/hooks/useAuth/{index.ae68bf71.js → index.cb6a3420.js} +1 -1
- package/index.d.ts +1 -0
- package/index.js +32 -24
- package/node_modules.6a6cd7c4.js +1601 -0
- package/package.json +5 -2
- package/style.css +1 -0
- package/vendor.496d5f73.js +20 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { unstable_HistoryRouter as c } from "react-router-dom";
|
|
2
|
+
import { LocalesProvider as d, HostThemeProvider as m } from "@m4l/graphics";
|
|
3
|
+
import { DomainCountryProvider as u } from "@m4l/core";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
function f(o) {
|
|
6
|
+
const {
|
|
7
|
+
children: t,
|
|
8
|
+
currentLocale: e,
|
|
9
|
+
hostTheme: i,
|
|
10
|
+
history: n,
|
|
11
|
+
domainCountryId: s
|
|
12
|
+
} = o;
|
|
13
|
+
return /* @__PURE__ */ r(d, {
|
|
14
|
+
isMicroFrontEnd: !0,
|
|
15
|
+
localeHost: e,
|
|
16
|
+
children: /* @__PURE__ */ r(m, {
|
|
17
|
+
isMicroFrontEnd: !0,
|
|
18
|
+
...i,
|
|
19
|
+
children: /* @__PURE__ */ r(u, {
|
|
20
|
+
domainCountryId: s,
|
|
21
|
+
isMicroFrontEnd: !0,
|
|
22
|
+
children: /* @__PURE__ */ r(c, {
|
|
23
|
+
history: n,
|
|
24
|
+
children: t
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
f as M
|
|
32
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { AxiosOperation, EnvironmentType, HostToolsType } from '@m4l/core';
|
|
3
|
+
import { HostThemeType, LocaleType } from '@m4l/graphics';
|
|
4
|
+
import type { BrowserHistory } from 'history';
|
|
5
|
+
export declare type ByHostProps = {
|
|
6
|
+
environment: EnvironmentType;
|
|
7
|
+
hostTools: HostToolsType;
|
|
8
|
+
axiosOperation: AxiosOperation;
|
|
9
|
+
hostTheme: HostThemeType;
|
|
10
|
+
currentLocale: LocaleType;
|
|
11
|
+
domainCountryId: number;
|
|
12
|
+
};
|
|
13
|
+
export declare type MFHostAppProps = {
|
|
14
|
+
domainCountryId: number;
|
|
15
|
+
history: BrowserHistory;
|
|
16
|
+
hostTheme: HostThemeType;
|
|
17
|
+
currentLocale: LocaleType;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { useEffect as v, useMemo as d } from "react";
|
|
2
|
+
import { unstable_HistoryRouter as y } from "react-router-dom";
|
|
3
|
+
import { ToastContainer as P, toast as M } from "react-toastify";
|
|
4
|
+
import { HostThemeProvider as w, defaultThemeOptions as F, fnComponentsOverrides as H, ProgressBarStyle as g, LocalesProvider as A, getLocaleFromNetwork as k } from "@m4l/graphics";
|
|
5
|
+
import { A as T } from "../../contexts/AuthContext/index.6f966215.js";
|
|
6
|
+
import { voidFunction as m, EnvironmentProvider as x, HostToolsProvider as E, NetworkProvider as C, axiosOperation as N, DomainCountryProvider as O } from "@m4l/core";
|
|
7
|
+
import { c as I, f as L, N as _ } from "../../node_modules.6a6cd7c4.js";
|
|
8
|
+
import { u as b } from "../../hooks/useAuth/index.cb6a3420.js";
|
|
9
|
+
import { jsx as o, jsxs as j } from "react/jsx-runtime";
|
|
10
|
+
function B(r) {
|
|
11
|
+
const {
|
|
12
|
+
children: s,
|
|
13
|
+
user: i,
|
|
14
|
+
pwd: n
|
|
15
|
+
} = r, {
|
|
16
|
+
isAuthenticated: t,
|
|
17
|
+
isInitialized: e,
|
|
18
|
+
login: a
|
|
19
|
+
} = b();
|
|
20
|
+
return v(() => {
|
|
21
|
+
e && t === !1 && a(i, n, !1);
|
|
22
|
+
}, [e, t]), t ? /* @__PURE__ */ j(w, {
|
|
23
|
+
hostThemeOptions: F,
|
|
24
|
+
fnComponentsOverrides: H,
|
|
25
|
+
isMicroFrontEnd: !0,
|
|
26
|
+
children: [/* @__PURE__ */ o(g, {}), /* @__PURE__ */ o(P, {}), s]
|
|
27
|
+
}) : /* @__PURE__ */ o("div", {
|
|
28
|
+
children: "Pendiente x atenticar"
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const c = I({
|
|
32
|
+
window
|
|
33
|
+
});
|
|
34
|
+
function U(r) {
|
|
35
|
+
const {
|
|
36
|
+
children: s,
|
|
37
|
+
user: i,
|
|
38
|
+
pwd: n,
|
|
39
|
+
host_api_local: t,
|
|
40
|
+
host_api_remote: e,
|
|
41
|
+
host_static_assets: a,
|
|
42
|
+
environment_assets: l
|
|
43
|
+
} = r, f = () => {
|
|
44
|
+
_.configure({
|
|
45
|
+
showSpinner: !0
|
|
46
|
+
}), _.start();
|
|
47
|
+
}, h = () => {
|
|
48
|
+
_.done();
|
|
49
|
+
}, u = d(() => ({
|
|
50
|
+
host: "",
|
|
51
|
+
isLocalhost: !0,
|
|
52
|
+
domain_token: "lab1",
|
|
53
|
+
host_api_local: t,
|
|
54
|
+
host_api_remote: e,
|
|
55
|
+
host_static_assets: a,
|
|
56
|
+
environment_assets: l,
|
|
57
|
+
dfnsFormat: {
|
|
58
|
+
date_format: "yyyy-MM-dd",
|
|
59
|
+
date_mask: "____-__-__",
|
|
60
|
+
time_format: "HH:mm:ss",
|
|
61
|
+
time_mask: "__:__:__",
|
|
62
|
+
datetime_format: "yyyy-MM-dd HH:mm:ss",
|
|
63
|
+
datetime_mask: "____-__-__ __:__:__"
|
|
64
|
+
}
|
|
65
|
+
}), []), p = d(() => ({
|
|
66
|
+
history: c,
|
|
67
|
+
toast: M,
|
|
68
|
+
startProgress: f,
|
|
69
|
+
stopProgress: h,
|
|
70
|
+
events_add_listener: m,
|
|
71
|
+
events_remove_listener: m,
|
|
72
|
+
events_emit: m,
|
|
73
|
+
formatDate: L
|
|
74
|
+
}), []);
|
|
75
|
+
return /* @__PURE__ */ o(x, {
|
|
76
|
+
...u,
|
|
77
|
+
children: /* @__PURE__ */ o(E, {
|
|
78
|
+
...p,
|
|
79
|
+
children: /* @__PURE__ */ o(C, {
|
|
80
|
+
axiosOperation: N,
|
|
81
|
+
children: /* @__PURE__ */ o(y, {
|
|
82
|
+
history: c,
|
|
83
|
+
children: /* @__PURE__ */ o(A, {
|
|
84
|
+
isMicroFrontEnd: !1,
|
|
85
|
+
getLocaleFromNetwork: k,
|
|
86
|
+
children: /* @__PURE__ */ o(O, {
|
|
87
|
+
domainCountryId: 1,
|
|
88
|
+
isMicroFrontEnd: !1,
|
|
89
|
+
children: /* @__PURE__ */ o(T, {
|
|
90
|
+
children: /* @__PURE__ */ o(B, {
|
|
91
|
+
user: i,
|
|
92
|
+
pwd: n,
|
|
93
|
+
children: s
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
U as M
|
|
105
|
+
};
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,30 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
1
|
+
import { M as n } from "./components/MFIsolationApp/index.967f891d.js";
|
|
2
|
+
import { M as f } from "./components/MFHostApp/index.5af54b8e.js";
|
|
3
|
+
import { a as D, A } from "./contexts/AuthContext/index.6f966215.js";
|
|
4
|
+
import { a as c, d as g, g as h } from "./layouts/ModuleLayout/index.842072c5.js";
|
|
5
|
+
import { a as N, d as F, g as v } from "./layouts/MasterDetailLayout/index.71de0dc7.js";
|
|
6
|
+
import { N as I, d as P, g as b } from "./layouts/NoAuthModuleLayout/index.5d1098ef.js";
|
|
7
|
+
import { u as k } from "./hooks/useMasterDetail/index.8e9e900b.js";
|
|
8
|
+
import { u as w } from "./hooks/useAuth/index.cb6a3420.js";
|
|
9
|
+
import { u as B } from "./hooks/useModule/index.096d7d13.js";
|
|
4
10
|
import "react";
|
|
5
|
-
import "
|
|
6
|
-
import
|
|
11
|
+
import "react-router-dom";
|
|
12
|
+
import "react-toastify";
|
|
7
13
|
import "@m4l/graphics";
|
|
8
|
-
import "@
|
|
14
|
+
import "@m4l/core";
|
|
15
|
+
import "./node_modules.6a6cd7c4.js";
|
|
16
|
+
import "./vendor.496d5f73.js";
|
|
9
17
|
import "react/jsx-runtime";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { u as P } from "./hooks/useAuth/index.ae68bf71.js";
|
|
13
|
-
import { u as j } from "./hooks/useModule/index.096d7d13.js";
|
|
18
|
+
import "@m4l/components";
|
|
19
|
+
import "@mui/material";
|
|
14
20
|
import "@mui/material/styles";
|
|
15
21
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
D as AuthContext,
|
|
23
|
+
A as AuthProvider,
|
|
24
|
+
f as MFHostApp,
|
|
25
|
+
n as MFIsolationApp,
|
|
26
|
+
N as MasterDetailLayout,
|
|
27
|
+
c as ModuleLayout,
|
|
28
|
+
I as NoAuthModuleLayout,
|
|
29
|
+
F as defaultMasterDetailDictionary,
|
|
30
|
+
g as defaultModuleLayoutDictionary,
|
|
31
|
+
P as defaultNoAuthModuleLayoutDictionary,
|
|
32
|
+
v as getMasterDetailLayoutComponentsDictionary,
|
|
33
|
+
h as getModuleLayoutComponentsDictionary,
|
|
34
|
+
b as getNoAuthModuleLayoutComponentsDictionary,
|
|
35
|
+
w as useAuth,
|
|
36
|
+
k as useMasterDetail,
|
|
37
|
+
B as useModule
|
|
30
38
|
};
|