@m4l/layouts 0.1.37 → 0.1.38
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/MFIsolationApp/index.ed197bc0.js +152 -0
- package/components/MFIsolationApp/types.d.ts +1 -0
- package/components/{index.80a2abab.js → index.604759d6.js} +1 -1
- package/hooks/index.18c6b299.js +4 -0
- package/hooks/useMasterDetail/{index.dd9cb927.js → index.50331312.js} +1 -1
- package/hooks/useModule/{index.97184469.js → index.35cc5fe0.js} +1 -1
- package/index.js +5 -5
- package/layouts/MasterDetailLayout/index.2c363c7a.js +109 -0
- package/layouts/ModuleLayout/contexts/ModuleContext/types.d.ts +1 -0
- package/layouts/ModuleLayout/index.90b4dc8e.js +103 -0
- package/layouts/ModuleLayout/types.d.ts +1 -0
- package/layouts/{index.8e0df44b.js → index.3e2d546f.js} +2 -2
- package/package.json +1 -1
- package/components/MFIsolationApp/index.fb96bc5d.js +0 -150
- package/hooks/index.43202c4e.js +0 -4
- package/layouts/MasterDetailLayout/index.793884be.js +0 -106
- package/layouts/ModuleLayout/index.c673a65f.js +0 -100
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { useEffect as T, useMemo as _, useCallback as f } from "react";
|
|
2
|
+
import { unstable_HistoryRouter as x } from "react-router-dom";
|
|
3
|
+
import { ToastContainer as D, toast as H } from "react-toastify";
|
|
4
|
+
import { HostThemeProvider as O, FormatterProvider as B, LocalesProvider as I, getLocaleFromNetwork as j } from "@m4l/graphics";
|
|
5
|
+
import { A as S } from "../../contexts/AuthContext/index.6f966215.js";
|
|
6
|
+
import { DomainCountryProvider as U, EnvironmentProvider as z, HostToolsProvider as R, NetworkProvider as q, axiosOperation as G } from "@m4l/core";
|
|
7
|
+
import { createBrowserHistory as J } from "history";
|
|
8
|
+
import K from "eventemitter3";
|
|
9
|
+
import { format as Q } from "date-fns";
|
|
10
|
+
import { defaultThemeOptions as V, fnComponentsOverrides as W } from "@m4l/styles";
|
|
11
|
+
import { u as X } from "../../hooks/useAuth/index.cb6a3420.js";
|
|
12
|
+
import { jsx as r, jsxs as Y } from "react/jsx-runtime";
|
|
13
|
+
import h from "nprogress";
|
|
14
|
+
import { B as Z } from "../BaseModule/index.6309486a.js";
|
|
15
|
+
import { AreasProvider as $ } from "@m4l/components";
|
|
16
|
+
function oo(m) {
|
|
17
|
+
const {
|
|
18
|
+
children: a,
|
|
19
|
+
user: d,
|
|
20
|
+
pwd: l
|
|
21
|
+
} = m, {
|
|
22
|
+
isAuthenticated: n,
|
|
23
|
+
isInitialized: c,
|
|
24
|
+
login: u,
|
|
25
|
+
user: e
|
|
26
|
+
} = X();
|
|
27
|
+
if (T(() => {
|
|
28
|
+
c && n === !1 && u(d, l, !1);
|
|
29
|
+
}, [c, n]), !n)
|
|
30
|
+
return /* @__PURE__ */ r("div", {
|
|
31
|
+
children: "Pendiente x atenticar"
|
|
32
|
+
});
|
|
33
|
+
const o = {
|
|
34
|
+
id: 1,
|
|
35
|
+
currency: "USD",
|
|
36
|
+
currency_decimal_digits: 2,
|
|
37
|
+
decimal_symbol: ".",
|
|
38
|
+
thousands_symbol: ","
|
|
39
|
+
};
|
|
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__ */ Y(O, {
|
|
41
|
+
hostThemeOptions: V,
|
|
42
|
+
fnComponentsOverrides: W,
|
|
43
|
+
isMicroFrontEnd: !0,
|
|
44
|
+
children: [/* @__PURE__ */ r(D, {}), /* @__PURE__ */ r(U, {
|
|
45
|
+
...o,
|
|
46
|
+
isMicroFrontEnd: !1,
|
|
47
|
+
children: /* @__PURE__ */ r(B, {
|
|
48
|
+
isMicroFrontEnd: !1,
|
|
49
|
+
dateFormatter: {
|
|
50
|
+
formatDate: Q
|
|
51
|
+
},
|
|
52
|
+
currencyFormatter: {
|
|
53
|
+
code: o.currency,
|
|
54
|
+
decimalDigits: o.currency_decimal_digits
|
|
55
|
+
},
|
|
56
|
+
children: a
|
|
57
|
+
})
|
|
58
|
+
})]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const p = J({
|
|
62
|
+
window
|
|
63
|
+
});
|
|
64
|
+
function yo(m) {
|
|
65
|
+
const {
|
|
66
|
+
children: a,
|
|
67
|
+
user: d,
|
|
68
|
+
pwd: l,
|
|
69
|
+
host_api_local: n,
|
|
70
|
+
host_api_remote: c,
|
|
71
|
+
host_static_assets: u,
|
|
72
|
+
environment_assets: e,
|
|
73
|
+
moduleId: o,
|
|
74
|
+
skeletonFlags: y,
|
|
75
|
+
moduleNameField: v,
|
|
76
|
+
privileges: F,
|
|
77
|
+
componentsDictionary: g,
|
|
78
|
+
onLoad: w,
|
|
79
|
+
activeAreasNetwork: P = !1,
|
|
80
|
+
activeCookiesFromNetwork: b = !1
|
|
81
|
+
} = m, t = _(() => new K(), []), k = f((i, s) => {
|
|
82
|
+
t.on(i, s);
|
|
83
|
+
}, [t]), A = f((i, s) => {
|
|
84
|
+
if (s === null) {
|
|
85
|
+
t.removeListener(i);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
t.removeListener(i, s);
|
|
89
|
+
}, [t]), E = f((i, s) => {
|
|
90
|
+
t.emit(i, s);
|
|
91
|
+
}, [t]), M = () => {
|
|
92
|
+
h.configure({
|
|
93
|
+
showSpinner: !0
|
|
94
|
+
}), h.start();
|
|
95
|
+
}, C = () => {
|
|
96
|
+
h.done();
|
|
97
|
+
}, N = _(() => ({
|
|
98
|
+
host: "",
|
|
99
|
+
isLocalhost: !0,
|
|
100
|
+
domain_token: "lab1",
|
|
101
|
+
host_api_local: n,
|
|
102
|
+
host_api_remote: c,
|
|
103
|
+
host_static_assets: u,
|
|
104
|
+
environment_assets: e
|
|
105
|
+
}), []), L = _(() => ({
|
|
106
|
+
history: p,
|
|
107
|
+
toast: H,
|
|
108
|
+
startProgress: M,
|
|
109
|
+
stopProgress: C,
|
|
110
|
+
events_add_listener: k,
|
|
111
|
+
events_remove_listener: A,
|
|
112
|
+
events_emit: E
|
|
113
|
+
}), []);
|
|
114
|
+
return /* @__PURE__ */ r(z, {
|
|
115
|
+
...N,
|
|
116
|
+
children: /* @__PURE__ */ r(R, {
|
|
117
|
+
...L,
|
|
118
|
+
children: /* @__PURE__ */ r(q, {
|
|
119
|
+
axiosOperation: G,
|
|
120
|
+
children: /* @__PURE__ */ r(x, {
|
|
121
|
+
history: p,
|
|
122
|
+
children: /* @__PURE__ */ r(I, {
|
|
123
|
+
isMicroFrontEnd: !1,
|
|
124
|
+
getLocaleFromNetwork: j,
|
|
125
|
+
children: /* @__PURE__ */ r(S, {
|
|
126
|
+
children: /* @__PURE__ */ r(oo, {
|
|
127
|
+
user: d,
|
|
128
|
+
pwd: l,
|
|
129
|
+
children: /* @__PURE__ */ r(Z, {
|
|
130
|
+
moduleId: o,
|
|
131
|
+
privileges: F,
|
|
132
|
+
skeletonFlags: y,
|
|
133
|
+
componentsDictionary: g,
|
|
134
|
+
moduleNameField: v,
|
|
135
|
+
children: /* @__PURE__ */ r($, {
|
|
136
|
+
onLoad: w,
|
|
137
|
+
loadAreasFromNetwork: P,
|
|
138
|
+
loadCookiesFromNetwork: b,
|
|
139
|
+
children: a
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
export {
|
|
151
|
+
yo as M
|
|
152
|
+
};
|
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { M as f } from "./components/MFIsolationApp/index.
|
|
1
|
+
import { M as f } from "./components/MFIsolationApp/index.ed197bc0.js";
|
|
2
2
|
import { M as D } from "./components/MFHostApp/index.420c2626.js";
|
|
3
3
|
import { B as L } from "./components/BaseModule/index.6309486a.js";
|
|
4
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.
|
|
6
|
-
import { a as H, d as I, g as P } from "./layouts/MasterDetailLayout/index.
|
|
5
|
+
import { a as N, d as B, g as F } from "./layouts/ModuleLayout/index.90b4dc8e.js";
|
|
6
|
+
import { a as H, d as I, g as P } from "./layouts/MasterDetailLayout/index.2c363c7a.js";
|
|
7
7
|
import { N as j, d as k, g as q } from "./layouts/NoAuthModuleLayout/index.eabf38c1.js";
|
|
8
|
-
import { u as z } from "./hooks/useMasterDetail/index.
|
|
8
|
+
import { u as z } from "./hooks/useMasterDetail/index.50331312.js";
|
|
9
9
|
import { u as G } from "./hooks/useAuth/index.cb6a3420.js";
|
|
10
|
-
import { u as K } from "./hooks/useModule/index.
|
|
10
|
+
import { u as K } from "./hooks/useModule/index.35cc5fe0.js";
|
|
11
11
|
import "react";
|
|
12
12
|
import "react-router-dom";
|
|
13
13
|
import "react-toastify";
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { createContext as D, useState as g, useRef as k, useMemo as m, useCallback as f } from "react";
|
|
2
|
+
import { voidFunction as S, useEnvironment as z, useModuleDictionary as P } from "@m4l/core";
|
|
3
|
+
import { SplitLayout as $ } from "@m4l/components";
|
|
4
|
+
import { a as w, g as A } from "../ModuleLayout/index.90b4dc8e.js";
|
|
5
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
6
|
+
import { useResponsiveDesktop as L } from "@m4l/graphics";
|
|
7
|
+
const I = {
|
|
8
|
+
masterSelection: void 0,
|
|
9
|
+
onChangeMasterSelection: S
|
|
10
|
+
}, N = D(I);
|
|
11
|
+
function x(e) {
|
|
12
|
+
const {
|
|
13
|
+
children: i
|
|
14
|
+
} = e, [n, t] = g(void 0);
|
|
15
|
+
return /* @__PURE__ */ c(N.Provider, {
|
|
16
|
+
value: {
|
|
17
|
+
masterSelection: n,
|
|
18
|
+
onChangeMasterSelection: t
|
|
19
|
+
},
|
|
20
|
+
children: i
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function R(e, i = [], n, t) {
|
|
24
|
+
let o = t !== void 0 && t ? [...e] : [n];
|
|
25
|
+
return o = i.concat(o), o;
|
|
26
|
+
}
|
|
27
|
+
function B(e) {
|
|
28
|
+
const {
|
|
29
|
+
moduleId: i,
|
|
30
|
+
masterComponent: n,
|
|
31
|
+
detailComponent: t,
|
|
32
|
+
moduleActions: o,
|
|
33
|
+
version: h
|
|
34
|
+
} = e, {
|
|
35
|
+
host_static_assets: r,
|
|
36
|
+
environment_assets: a
|
|
37
|
+
} = z(), [s, C] = g("vertical"), d = L(), M = k(null), {
|
|
38
|
+
getLabel: l
|
|
39
|
+
} = P(), p = m(() => [{
|
|
40
|
+
urlIcon: `${r}/${a}/frontend/components/masterdetaillayout/assets/icons/split_vertical.svg`,
|
|
41
|
+
onClick: () => u("vertical"),
|
|
42
|
+
visibility: "main",
|
|
43
|
+
label: l("master_detail_layout.split_vertical"),
|
|
44
|
+
tag: "vertical",
|
|
45
|
+
className: "splitactions",
|
|
46
|
+
disabled: s === "vertical",
|
|
47
|
+
key: "vertical"
|
|
48
|
+
}, {
|
|
49
|
+
urlIcon: `${r}/${a}/frontend/components/masterdetaillayout/assets/icons/split_horizontal.svg`,
|
|
50
|
+
onClick: () => u("horizontal"),
|
|
51
|
+
visibility: "main",
|
|
52
|
+
label: l("master_detail_layout.split_horizontal"),
|
|
53
|
+
tag: "horizontal",
|
|
54
|
+
className: "splitactions",
|
|
55
|
+
disabled: s === "horizontal",
|
|
56
|
+
key: "horizontal"
|
|
57
|
+
}, {
|
|
58
|
+
urlIcon: `${r}/${a}/frontend/components/masterdetaillayout/assets/icons/no_split.svg`,
|
|
59
|
+
onClick: () => u("none"),
|
|
60
|
+
visibility: "main",
|
|
61
|
+
label: l("master_detail_layout.no_split"),
|
|
62
|
+
tag: "none",
|
|
63
|
+
className: "splitactions",
|
|
64
|
+
disabled: s === "none",
|
|
65
|
+
key: "none"
|
|
66
|
+
}], [l, s]), u = f((_) => {
|
|
67
|
+
C(_);
|
|
68
|
+
}, []), v = f(() => {
|
|
69
|
+
}, [t]), y = m(() => ({
|
|
70
|
+
urlIcon: `${r}/${a}/frontend/components/masterdetaillayout/assets/icons/view_detail.svg`,
|
|
71
|
+
onClick: v,
|
|
72
|
+
disabled: !1,
|
|
73
|
+
visibility: "allways",
|
|
74
|
+
label: l("master_detail_layout.view_detail"),
|
|
75
|
+
tag: "none",
|
|
76
|
+
className: "",
|
|
77
|
+
key: "detail"
|
|
78
|
+
}), [a, v]), b = m(() => R(p, o, y, d), [p, o, d, y]);
|
|
79
|
+
return /* @__PURE__ */ c(x, {
|
|
80
|
+
children: /* @__PURE__ */ c(w, {
|
|
81
|
+
ref: M,
|
|
82
|
+
moduleId: i,
|
|
83
|
+
moduleActions: b,
|
|
84
|
+
version: h,
|
|
85
|
+
children: /* @__PURE__ */ c($, {
|
|
86
|
+
splitPosition: d ? s : "none",
|
|
87
|
+
firstPart: n,
|
|
88
|
+
secondPart: t
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function G() {
|
|
94
|
+
return ["master_detail_layout"].concat(A());
|
|
95
|
+
}
|
|
96
|
+
const H = {
|
|
97
|
+
master_detail_layout: {
|
|
98
|
+
split_vertical: "Split vertically",
|
|
99
|
+
split_horizontal: "Split horizontally",
|
|
100
|
+
no_split: "No split",
|
|
101
|
+
view_detail: "View detail"
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
export {
|
|
105
|
+
N as M,
|
|
106
|
+
B as a,
|
|
107
|
+
H as d,
|
|
108
|
+
G as g
|
|
109
|
+
};
|
|
@@ -5,6 +5,7 @@ export interface ModuleLayoutContextStateProps {
|
|
|
5
5
|
}
|
|
6
6
|
export interface ModuleLayoutProviderProps extends Omit<ModuleLayoutContextStateProps, 'init'> {
|
|
7
7
|
children: ReactNode;
|
|
8
|
+
version: string;
|
|
8
9
|
moduleActions?: ModuleAction[];
|
|
9
10
|
}
|
|
10
11
|
export interface ModuleLayoutContextProps extends ModuleLayoutContextStateProps {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { useModal as x, useWindowToolsMF as v, ModalProvider as g, getModalDialogComponentsDictionary as h } from "@m4l/components";
|
|
2
|
+
import { forwardRef as p, useRef as m, useImperativeHandle as f, createContext as I, useState as a, useMemo as C, useEffect as A } from "react";
|
|
3
|
+
import { styled as M } from "@mui/material/styles";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
const D = M("div")(() => ({
|
|
6
|
+
display: "flex",
|
|
7
|
+
flexDirection: "column",
|
|
8
|
+
position: "absolute",
|
|
9
|
+
margin: "0px 12px 12px 12px",
|
|
10
|
+
left: "0px",
|
|
11
|
+
right: "0px",
|
|
12
|
+
top: "0px",
|
|
13
|
+
bottom: "0px",
|
|
14
|
+
overflow: "hidden"
|
|
15
|
+
})), w = M("div")(({
|
|
16
|
+
theme: o
|
|
17
|
+
}) => ({
|
|
18
|
+
display: "flex",
|
|
19
|
+
position: "relative",
|
|
20
|
+
marginTop: o.spacing(1),
|
|
21
|
+
justifyContent: "center",
|
|
22
|
+
flexGrow: "1",
|
|
23
|
+
overflow: "hidden"
|
|
24
|
+
})), y = p((o, r) => {
|
|
25
|
+
const {
|
|
26
|
+
children: n
|
|
27
|
+
} = o, {
|
|
28
|
+
openModal: l
|
|
29
|
+
} = x(), e = m(null);
|
|
30
|
+
return f(r, () => ({
|
|
31
|
+
openModal: l,
|
|
32
|
+
current: e.current
|
|
33
|
+
})), /* @__PURE__ */ t(D, {
|
|
34
|
+
id: "WrapperInnerModule",
|
|
35
|
+
className: "m4l_module_layout",
|
|
36
|
+
ref: e,
|
|
37
|
+
children: /* @__PURE__ */ t(w, {
|
|
38
|
+
id: "ModuleContent",
|
|
39
|
+
children: n
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
y.displayName = "InnerModule";
|
|
44
|
+
const L = I(null);
|
|
45
|
+
function R(o) {
|
|
46
|
+
const {
|
|
47
|
+
children: r,
|
|
48
|
+
moduleActions: n,
|
|
49
|
+
moduleId: l,
|
|
50
|
+
version: e
|
|
51
|
+
} = o, [u] = a(() => ({
|
|
52
|
+
moduleId: l,
|
|
53
|
+
dictionary: void 0
|
|
54
|
+
})), {
|
|
55
|
+
setActions: d
|
|
56
|
+
} = v(), [i, s] = a([]), c = C(() => (n || []).concat(i), [n, i]);
|
|
57
|
+
return A(() => {
|
|
58
|
+
console.log("**Version layout", e), d(c, e);
|
|
59
|
+
}, [c]), /* @__PURE__ */ t(L.Provider, {
|
|
60
|
+
value: {
|
|
61
|
+
setDynamicActions: s,
|
|
62
|
+
moduleId: u.moduleId
|
|
63
|
+
},
|
|
64
|
+
children: r
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
const _ = p((o, r) => {
|
|
68
|
+
const {
|
|
69
|
+
moduleId: n,
|
|
70
|
+
moduleActions: l,
|
|
71
|
+
version: e,
|
|
72
|
+
children: u
|
|
73
|
+
} = o, d = m(null), i = (s) => {
|
|
74
|
+
d.current?.openModal(s);
|
|
75
|
+
};
|
|
76
|
+
return f(r, () => ({
|
|
77
|
+
openModal: i,
|
|
78
|
+
current: d.current
|
|
79
|
+
})), /* @__PURE__ */ t(R, {
|
|
80
|
+
moduleId: n,
|
|
81
|
+
moduleActions: l,
|
|
82
|
+
version: e,
|
|
83
|
+
children: /* @__PURE__ */ t(g, {
|
|
84
|
+
children: /* @__PURE__ */ t(y, {
|
|
85
|
+
ref: d,
|
|
86
|
+
children: u
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
_.displayName = "ModuleLayout";
|
|
92
|
+
function j() {
|
|
93
|
+
return ["module_layout"].concat(h());
|
|
94
|
+
}
|
|
95
|
+
const T = {
|
|
96
|
+
module_layout: {}
|
|
97
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
L as M,
|
|
100
|
+
_ as a,
|
|
101
|
+
T as d,
|
|
102
|
+
j as g
|
|
103
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./ModuleLayout/index.
|
|
1
|
+
import "./ModuleLayout/index.90b4dc8e.js";
|
|
2
2
|
import "@m4l/components";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@m4l/core";
|
|
5
|
-
import "./MasterDetailLayout/index.
|
|
5
|
+
import "./MasterDetailLayout/index.2c363c7a.js";
|
|
6
6
|
import "@m4l/graphics";
|
|
7
7
|
import "react/jsx-runtime";
|
|
8
8
|
import "./NoAuthModuleLayout/index.eabf38c1.js";
|
package/package.json
CHANGED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { useEffect as x, useMemo as _, useCallback as f } from "react";
|
|
2
|
-
import { unstable_HistoryRouter as C } from "react-router-dom";
|
|
3
|
-
import { ToastContainer as D, toast as N } from "react-toastify";
|
|
4
|
-
import { HostThemeProvider as H, FormatterProvider as O, LocalesProvider as B, getLocaleFromNetwork as I } 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";
|
|
11
|
-
import { u as W } from "../../hooks/useAuth/index.cb6a3420.js";
|
|
12
|
-
import { jsx as o, jsxs as X } from "react/jsx-runtime";
|
|
13
|
-
import h from "nprogress";
|
|
14
|
-
import { B as Y } from "../BaseModule/index.6309486a.js";
|
|
15
|
-
import { AreasProvider as Z } from "@m4l/components";
|
|
16
|
-
function $(m) {
|
|
17
|
-
const {
|
|
18
|
-
children: a,
|
|
19
|
-
user: d,
|
|
20
|
-
pwd: l
|
|
21
|
-
} = m, {
|
|
22
|
-
isAuthenticated: s,
|
|
23
|
-
isInitialized: c,
|
|
24
|
-
login: u,
|
|
25
|
-
user: e
|
|
26
|
-
} = W();
|
|
27
|
-
if (x(() => {
|
|
28
|
-
c && s === !1 && u(d, l, !1);
|
|
29
|
-
}, [c, s]), !s)
|
|
30
|
-
return /* @__PURE__ */ o("div", {
|
|
31
|
-
children: "Pendiente x atenticar"
|
|
32
|
-
});
|
|
33
|
-
const r = {
|
|
34
|
-
id: 1,
|
|
35
|
-
currency: "USD",
|
|
36
|
-
currency_decimal_digits: 2,
|
|
37
|
-
decimal_symbol: ".",
|
|
38
|
-
thousands_symbol: ","
|
|
39
|
-
};
|
|
40
|
-
return e?.domain_country && (r.id = e?.domain_country.id ?? r.id, r.currency = e?.domain_country.currency ?? r.currency, r.currency_decimal_digits = e?.domain_country.currency_decimal_digits ?? r.currency_decimal_digits, r.decimal_symbol = e?.domain_country.decimal_symbol ?? r.decimal_symbol, r.thousands_symbol = e?.domain_country?.thousands_symbol ?? r.thousands_symbol), /* @__PURE__ */ X(H, {
|
|
41
|
-
hostThemeOptions: Q,
|
|
42
|
-
fnComponentsOverrides: V,
|
|
43
|
-
isMicroFrontEnd: !0,
|
|
44
|
-
children: [/* @__PURE__ */ o(D, {}), /* @__PURE__ */ o(S, {
|
|
45
|
-
...r,
|
|
46
|
-
isMicroFrontEnd: !1,
|
|
47
|
-
children: /* @__PURE__ */ o(O, {
|
|
48
|
-
isMicroFrontEnd: !1,
|
|
49
|
-
dateFormatter: {
|
|
50
|
-
formatDate: K
|
|
51
|
-
},
|
|
52
|
-
currencyFormatter: {
|
|
53
|
-
code: r.currency,
|
|
54
|
-
decimalDigits: r.currency_decimal_digits
|
|
55
|
-
},
|
|
56
|
-
children: a
|
|
57
|
-
})
|
|
58
|
-
})]
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
const p = G({
|
|
62
|
-
window
|
|
63
|
-
});
|
|
64
|
-
function hr(m) {
|
|
65
|
-
const {
|
|
66
|
-
children: a,
|
|
67
|
-
user: d,
|
|
68
|
-
pwd: l,
|
|
69
|
-
host_api_local: s,
|
|
70
|
-
host_api_remote: c,
|
|
71
|
-
host_static_assets: u,
|
|
72
|
-
environment_assets: e,
|
|
73
|
-
moduleId: r,
|
|
74
|
-
skeletonFlags: y,
|
|
75
|
-
moduleNameField: v,
|
|
76
|
-
privileges: g,
|
|
77
|
-
componentsDictionary: F,
|
|
78
|
-
onLoad: P,
|
|
79
|
-
activeAreasNetwork: b = !1
|
|
80
|
-
} = m, t = _(() => new J(), []), w = f((i, n) => {
|
|
81
|
-
t.on(i, n);
|
|
82
|
-
}, [t]), A = f((i, n) => {
|
|
83
|
-
if (n === null) {
|
|
84
|
-
t.removeListener(i);
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
t.removeListener(i, n);
|
|
88
|
-
}, [t]), E = f((i, n) => {
|
|
89
|
-
t.emit(i, n);
|
|
90
|
-
}, [t]), M = () => {
|
|
91
|
-
h.configure({
|
|
92
|
-
showSpinner: !0
|
|
93
|
-
}), h.start();
|
|
94
|
-
}, k = () => {
|
|
95
|
-
h.done();
|
|
96
|
-
}, L = _(() => ({
|
|
97
|
-
host: "",
|
|
98
|
-
isLocalhost: !0,
|
|
99
|
-
domain_token: "lab1",
|
|
100
|
-
host_api_local: s,
|
|
101
|
-
host_api_remote: c,
|
|
102
|
-
host_static_assets: u,
|
|
103
|
-
environment_assets: e
|
|
104
|
-
}), []), T = _(() => ({
|
|
105
|
-
history: p,
|
|
106
|
-
toast: N,
|
|
107
|
-
startProgress: M,
|
|
108
|
-
stopProgress: k,
|
|
109
|
-
events_add_listener: w,
|
|
110
|
-
events_remove_listener: A,
|
|
111
|
-
events_emit: E
|
|
112
|
-
}), []);
|
|
113
|
-
return /* @__PURE__ */ o(U, {
|
|
114
|
-
...L,
|
|
115
|
-
children: /* @__PURE__ */ o(z, {
|
|
116
|
-
...T,
|
|
117
|
-
children: /* @__PURE__ */ o(R, {
|
|
118
|
-
axiosOperation: q,
|
|
119
|
-
children: /* @__PURE__ */ o(C, {
|
|
120
|
-
history: p,
|
|
121
|
-
children: /* @__PURE__ */ o(B, {
|
|
122
|
-
isMicroFrontEnd: !1,
|
|
123
|
-
getLocaleFromNetwork: I,
|
|
124
|
-
children: /* @__PURE__ */ o(j, {
|
|
125
|
-
children: /* @__PURE__ */ o($, {
|
|
126
|
-
user: d,
|
|
127
|
-
pwd: l,
|
|
128
|
-
children: /* @__PURE__ */ o(Y, {
|
|
129
|
-
moduleId: r,
|
|
130
|
-
privileges: g,
|
|
131
|
-
skeletonFlags: y,
|
|
132
|
-
componentsDictionary: F,
|
|
133
|
-
moduleNameField: v,
|
|
134
|
-
children: /* @__PURE__ */ o(Z, {
|
|
135
|
-
onLoad: P,
|
|
136
|
-
loadAreasFromNetwork: b,
|
|
137
|
-
children: a
|
|
138
|
-
})
|
|
139
|
-
})
|
|
140
|
-
})
|
|
141
|
-
})
|
|
142
|
-
})
|
|
143
|
-
})
|
|
144
|
-
})
|
|
145
|
-
})
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
export {
|
|
149
|
-
hr as M
|
|
150
|
-
};
|
package/hooks/index.43202c4e.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { createContext as $, useState as y, useRef as k, useMemo as p, useCallback as g } from "react";
|
|
2
|
-
import { voidFunction as w, useEnvironment as P } from "@m4l/core";
|
|
3
|
-
import { SplitLayout as z } from "@m4l/components";
|
|
4
|
-
import { a as I, g as L } from "../ModuleLayout/index.c673a65f.js";
|
|
5
|
-
import { jsx as c } from "react/jsx-runtime";
|
|
6
|
-
import { useResponsiveDesktop as F } from "@m4l/graphics";
|
|
7
|
-
const N = {
|
|
8
|
-
masterSelection: void 0,
|
|
9
|
-
onChangeMasterSelection: w
|
|
10
|
-
}, x = $(N);
|
|
11
|
-
function R(o) {
|
|
12
|
-
const {
|
|
13
|
-
children: e
|
|
14
|
-
} = o, [n, t] = y(void 0);
|
|
15
|
-
return /* @__PURE__ */ c(x.Provider, {
|
|
16
|
-
value: {
|
|
17
|
-
masterSelection: n,
|
|
18
|
-
onChangeMasterSelection: t
|
|
19
|
-
},
|
|
20
|
-
children: e
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
function V(o, e = [], n, t) {
|
|
24
|
-
let i = t !== void 0 && t ? [...o] : [n];
|
|
25
|
-
return i = e.concat(i), i;
|
|
26
|
-
}
|
|
27
|
-
function H(o) {
|
|
28
|
-
const {
|
|
29
|
-
moduleId: e,
|
|
30
|
-
masterComponent: n,
|
|
31
|
-
detailComponent: t,
|
|
32
|
-
moduleActions: i
|
|
33
|
-
} = o, {
|
|
34
|
-
host_static_assets: r,
|
|
35
|
-
environment_assets: s
|
|
36
|
-
} = P(), [C, h] = y("vertical"), d = F(), M = k(null), S = p(() => [{
|
|
37
|
-
urlIcon: `${r}/${s}/frontend/components/masterdetaillayout/assets/icons/split_vertical.svg`,
|
|
38
|
-
onClick: () => u("vertical"),
|
|
39
|
-
disabled: !0,
|
|
40
|
-
visibility: "main",
|
|
41
|
-
dictionaryField: "master_detail_layout.split_vertical",
|
|
42
|
-
tag: "vertical",
|
|
43
|
-
className: "splitactions"
|
|
44
|
-
}, {
|
|
45
|
-
urlIcon: `${r}/${s}/frontend/components/masterdetaillayout/assets/icons/split_horizontal.svg`,
|
|
46
|
-
onClick: () => u("horizontal"),
|
|
47
|
-
disabled: !1,
|
|
48
|
-
visibility: "main",
|
|
49
|
-
dictionaryField: "master_detail_layout.split_horizontal",
|
|
50
|
-
tag: "horizontal",
|
|
51
|
-
className: "splitactions"
|
|
52
|
-
}, {
|
|
53
|
-
urlIcon: `${r}/${s}/frontend/components/masterdetaillayout/assets/icons/no_split.svg`,
|
|
54
|
-
onClick: () => u("none"),
|
|
55
|
-
disabled: !1,
|
|
56
|
-
visibility: "main",
|
|
57
|
-
dictionaryField: "master_detail_layout.no_split",
|
|
58
|
-
tag: "none",
|
|
59
|
-
className: "splitactions"
|
|
60
|
-
}], []), [v, b] = y(S), u = g((m) => {
|
|
61
|
-
b((A) => {
|
|
62
|
-
const a = [...A];
|
|
63
|
-
for (let l = 0; l < a.length; l++)
|
|
64
|
-
a[l].disabled = !1, a[l].tag === m && (a[l].disabled = !0);
|
|
65
|
-
return a;
|
|
66
|
-
}), h(m);
|
|
67
|
-
}, []), _ = g(() => {
|
|
68
|
-
}, [t]), f = p(() => ({
|
|
69
|
-
urlIcon: `${r}/${s}/frontend/components/masterdetaillayout/assets/icons/view_detail.svg`,
|
|
70
|
-
onClick: _,
|
|
71
|
-
disabled: !1,
|
|
72
|
-
visibility: "allways",
|
|
73
|
-
dictionaryField: "master_detail_layout.view_detail",
|
|
74
|
-
tag: "none",
|
|
75
|
-
className: ""
|
|
76
|
-
}), [s, _]), D = p(() => V(v, i, f, d), [v, i, d, f]);
|
|
77
|
-
return /* @__PURE__ */ c(R, {
|
|
78
|
-
children: /* @__PURE__ */ c(I, {
|
|
79
|
-
ref: M,
|
|
80
|
-
moduleId: e,
|
|
81
|
-
moduleActions: D,
|
|
82
|
-
children: /* @__PURE__ */ c(z, {
|
|
83
|
-
splitPosition: d ? C : "none",
|
|
84
|
-
firstPart: n,
|
|
85
|
-
secondPart: t
|
|
86
|
-
})
|
|
87
|
-
})
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
function J() {
|
|
91
|
-
return ["master_detail_layout"].concat(L());
|
|
92
|
-
}
|
|
93
|
-
const K = {
|
|
94
|
-
master_detail_layout: {
|
|
95
|
-
split_vertical: "Split vertically",
|
|
96
|
-
split_horizontal: "Split horizontally",
|
|
97
|
-
no_split: "No split",
|
|
98
|
-
view_detail: "View detail"
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
export {
|
|
102
|
-
x as M,
|
|
103
|
-
H as a,
|
|
104
|
-
K as d,
|
|
105
|
-
J as g
|
|
106
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { useModal as y, useWindowToolsMF as x, ModalProvider as v, getModalDialogComponentsDictionary as g } from "@m4l/components";
|
|
2
|
-
import { forwardRef as a, useRef as p, useImperativeHandle as m, createContext as h, useState as s, useMemo as I, useEffect as C } from "react";
|
|
3
|
-
import { styled as f } from "@mui/material/styles";
|
|
4
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
-
const A = f("div")(() => ({
|
|
6
|
-
display: "flex",
|
|
7
|
-
flexDirection: "column",
|
|
8
|
-
position: "absolute",
|
|
9
|
-
margin: "0px 12px 12px 12px",
|
|
10
|
-
left: "0px",
|
|
11
|
-
right: "0px",
|
|
12
|
-
top: "0px",
|
|
13
|
-
bottom: "0px",
|
|
14
|
-
overflow: "hidden"
|
|
15
|
-
})), D = f("div")(({
|
|
16
|
-
theme: o
|
|
17
|
-
}) => ({
|
|
18
|
-
display: "flex",
|
|
19
|
-
position: "relative",
|
|
20
|
-
marginTop: o.spacing(1),
|
|
21
|
-
justifyContent: "center",
|
|
22
|
-
flexGrow: "1",
|
|
23
|
-
overflow: "hidden"
|
|
24
|
-
})), M = a((o, r) => {
|
|
25
|
-
const {
|
|
26
|
-
children: e
|
|
27
|
-
} = o, {
|
|
28
|
-
openModal: l
|
|
29
|
-
} = y(), n = p(null);
|
|
30
|
-
return m(r, () => ({
|
|
31
|
-
openModal: l,
|
|
32
|
-
current: n.current
|
|
33
|
-
})), /* @__PURE__ */ t(A, {
|
|
34
|
-
id: "WrapperInnerModule",
|
|
35
|
-
className: "m4l_module_layout",
|
|
36
|
-
ref: n,
|
|
37
|
-
children: /* @__PURE__ */ t(D, {
|
|
38
|
-
id: "ModuleContent",
|
|
39
|
-
children: e
|
|
40
|
-
})
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
M.displayName = "InnerModule";
|
|
44
|
-
const w = h(null);
|
|
45
|
-
function L(o) {
|
|
46
|
-
const {
|
|
47
|
-
children: r,
|
|
48
|
-
moduleActions: e,
|
|
49
|
-
moduleId: l
|
|
50
|
-
} = o, [n] = s(() => ({
|
|
51
|
-
moduleId: l,
|
|
52
|
-
dictionary: void 0
|
|
53
|
-
})), {
|
|
54
|
-
setActions: d
|
|
55
|
-
} = x(), [i, u] = s([]), c = I(() => (e || []).concat(i), [e, i]);
|
|
56
|
-
return C(() => {
|
|
57
|
-
d(c);
|
|
58
|
-
}, [c]), /* @__PURE__ */ t(w.Provider, {
|
|
59
|
-
value: {
|
|
60
|
-
setDynamicActions: u,
|
|
61
|
-
moduleId: n.moduleId
|
|
62
|
-
},
|
|
63
|
-
children: r
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
const R = a((o, r) => {
|
|
67
|
-
const {
|
|
68
|
-
moduleId: e,
|
|
69
|
-
moduleActions: l,
|
|
70
|
-
children: n
|
|
71
|
-
} = o, d = p(null), i = (u) => {
|
|
72
|
-
d.current?.openModal(u);
|
|
73
|
-
};
|
|
74
|
-
return m(r, () => ({
|
|
75
|
-
openModal: i,
|
|
76
|
-
current: d.current
|
|
77
|
-
})), /* @__PURE__ */ t(L, {
|
|
78
|
-
moduleId: e,
|
|
79
|
-
moduleActions: l,
|
|
80
|
-
children: /* @__PURE__ */ t(v, {
|
|
81
|
-
children: /* @__PURE__ */ t(M, {
|
|
82
|
-
ref: d,
|
|
83
|
-
children: n
|
|
84
|
-
})
|
|
85
|
-
})
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
R.displayName = "ModuleLayout";
|
|
89
|
-
function b() {
|
|
90
|
-
return ["module_layout"].concat(g());
|
|
91
|
-
}
|
|
92
|
-
const j = {
|
|
93
|
-
module_layout: {}
|
|
94
|
-
};
|
|
95
|
-
export {
|
|
96
|
-
w as M,
|
|
97
|
-
R as a,
|
|
98
|
-
j as d,
|
|
99
|
-
b as g
|
|
100
|
-
};
|