@m4l/layouts 0.1.35 → 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/BaseModule/index.d.ts +0 -1
- package/components/MFHostApp/index.d.ts +0 -1
- package/components/MFIsolationApp/index.d.ts +0 -1
- package/components/MFIsolationApp/index.ed197bc0.js +152 -0
- package/components/MFIsolationApp/subcomponents/MFAuthApp/index.d.ts +0 -1
- 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 +6 -6
- package/layouts/MasterDetailLayout/index.2c363c7a.js +109 -0
- package/layouts/MasterDetailLayout/index.d.ts +0 -1
- 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/NoAuthModuleLayout/index.d.ts +0 -1
- package/layouts/NoAuthModuleLayout/index.eabf38c1.js +345 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +1 -3
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/index.d.ts +1 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/index.d.ts +1 -0
- package/layouts/NoAuthModuleLayout/types.d.ts +1 -1
- package/layouts/index.3e2d546f.js +8 -0
- 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
- package/layouts/NoAuthModuleLayout/index.5d946846.js +0 -198
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.d.ts +0 -3
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.d.ts +0 -2
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.d.ts +0 -3
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.d.ts +0 -2
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.d.ts +0 -4
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.d.ts +0 -4
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.d.ts +0 -2
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/types.d.ts +0 -4
- package/layouts/index.8748e200.js +0 -8
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { useResponsiveDesktop as I, useLocales as $ } from "@m4l/graphics";
|
|
2
|
+
import { LanguagePopover as h, Image as x, Typography as a, ScrollBar as m, HelmetPage as W } from "@m4l/components";
|
|
3
|
+
import { styled as t, alpha as d } from "@mui/material/styles";
|
|
4
|
+
import { useBase as u, useModuleDictionary as g, useDomain as y, useEnvironment as H, BaseProvider as N, FlagsProvider as R, ModuleDictionaryProvider as U, ModuleSkeletonProvider as F } from "@m4l/core";
|
|
5
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
6
|
+
const P = t("div")(({
|
|
7
|
+
theme: o
|
|
8
|
+
}) => ({
|
|
9
|
+
display: "flex",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
height: "100vh",
|
|
13
|
+
padding: "20px",
|
|
14
|
+
backgroundColor: o.palette.background.background,
|
|
15
|
+
[o.breakpoints.down("md")]: {
|
|
16
|
+
padding: "0px"
|
|
17
|
+
}
|
|
18
|
+
})), j = t("div")(({ theme: o }) => ({
|
|
19
|
+
display: "flex",
|
|
20
|
+
borderRadius: "16px",
|
|
21
|
+
backgroundColor: o.palette.background.neutral,
|
|
22
|
+
boxShadow: o.customShadows?.z4,
|
|
23
|
+
padding: "20px 0 20px 20px",
|
|
24
|
+
width: "100%",
|
|
25
|
+
height: "100%",
|
|
26
|
+
maxWidth: "965px",
|
|
27
|
+
maxHeight: "900px",
|
|
28
|
+
position: "relative",
|
|
29
|
+
overflow: "auto",
|
|
30
|
+
"& .M4LanguagePopover-root": {
|
|
31
|
+
position: "absolute",
|
|
32
|
+
top: "20px",
|
|
33
|
+
right: "20px",
|
|
34
|
+
zIndex: 1
|
|
35
|
+
}
|
|
36
|
+
})), T = t("div")(({ theme: o }) => ({
|
|
37
|
+
display: "flex",
|
|
38
|
+
flexDirection: "column",
|
|
39
|
+
justifyContent: "center",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
borderRadius: "16px",
|
|
42
|
+
width: "100%",
|
|
43
|
+
maxWidth: "400px",
|
|
44
|
+
height: "100%",
|
|
45
|
+
backgroundColor: o.palette.state?.focus,
|
|
46
|
+
boxShadow: o.customShadows?.z4,
|
|
47
|
+
padding: "0 60px",
|
|
48
|
+
gap: "40px",
|
|
49
|
+
overflow: "hidden",
|
|
50
|
+
"& .MuiTypography-root": {
|
|
51
|
+
color: o.palette.patronus?.marbleLight[10],
|
|
52
|
+
display: "flex",
|
|
53
|
+
justifyContent: "center",
|
|
54
|
+
textAlign: "center",
|
|
55
|
+
textTransform: "uppercase"
|
|
56
|
+
},
|
|
57
|
+
"& .M4LTypography-root .MuiSkeleton-root": {
|
|
58
|
+
backgroundColor: d(`${o.palette.patronus?.marbleLight[10]}`, 0.24),
|
|
59
|
+
margin: "auto"
|
|
60
|
+
}
|
|
61
|
+
})), A = t("div")(({ theme: o }) => ({
|
|
62
|
+
display: "flex",
|
|
63
|
+
width: "84px",
|
|
64
|
+
height: "84px",
|
|
65
|
+
borderRadius: "6px",
|
|
66
|
+
backgroundColor: o.palette.state?.active,
|
|
67
|
+
justifyContent: "center",
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
boxShadow: `0px 4px 8px ${d(o.palette.patronus?.coolGrey[70] || "", 0.16)}`,
|
|
70
|
+
"& .M4LImage-root": {
|
|
71
|
+
backgroundColor: o.palette.patronus?.marbleLight[10],
|
|
72
|
+
borderRadius: "6px"
|
|
73
|
+
}
|
|
74
|
+
})), B = t("div")(() => ({
|
|
75
|
+
display: "flex",
|
|
76
|
+
flexDirection: "column",
|
|
77
|
+
gap: "5px",
|
|
78
|
+
width: "100%"
|
|
79
|
+
})), z = t("div")(() => ({
|
|
80
|
+
display: "flex",
|
|
81
|
+
flexDirection: "column",
|
|
82
|
+
gap: "5px",
|
|
83
|
+
width: "100%"
|
|
84
|
+
})), G = t("div")(() => ({
|
|
85
|
+
display: "flex",
|
|
86
|
+
flexDirection: "column",
|
|
87
|
+
padding: "0 60px 0 80px",
|
|
88
|
+
margin: "auto 0",
|
|
89
|
+
width: "100%",
|
|
90
|
+
gap: "20px"
|
|
91
|
+
})), E = t("div")(() => ({
|
|
92
|
+
display: "flex",
|
|
93
|
+
width: "100%",
|
|
94
|
+
height: "100%"
|
|
95
|
+
})), q = t("div")(() => ({
|
|
96
|
+
display: "flex",
|
|
97
|
+
flexDirection: "column",
|
|
98
|
+
width: "100%",
|
|
99
|
+
gap: "4px"
|
|
100
|
+
})), J = () => {
|
|
101
|
+
const {
|
|
102
|
+
children: o,
|
|
103
|
+
companyLogoSmallUrl: l
|
|
104
|
+
} = u(), {
|
|
105
|
+
getLabel: n
|
|
106
|
+
} = g(), {
|
|
107
|
+
name: r
|
|
108
|
+
} = y();
|
|
109
|
+
return /* @__PURE__ */ i(j, {
|
|
110
|
+
children: [/* @__PURE__ */ e(h, {}), /* @__PURE__ */ i(T, {
|
|
111
|
+
children: [/* @__PURE__ */ e(A, {
|
|
112
|
+
children: /* @__PURE__ */ e(x, {
|
|
113
|
+
src: l,
|
|
114
|
+
ratio: "1:1",
|
|
115
|
+
width: "64px",
|
|
116
|
+
height: "64px"
|
|
117
|
+
})
|
|
118
|
+
}), /* @__PURE__ */ i(B, {
|
|
119
|
+
children: [/* @__PURE__ */ e(a, {
|
|
120
|
+
variant: "subtitleDens",
|
|
121
|
+
skeletonWidth: "70%",
|
|
122
|
+
skeletongHeight: "24px",
|
|
123
|
+
children: r
|
|
124
|
+
}), /* @__PURE__ */ e(a, {
|
|
125
|
+
variant: "paragraph",
|
|
126
|
+
skeletonWidth: "40%",
|
|
127
|
+
skeletongHeight: "20px",
|
|
128
|
+
children: n("company_name_subtitle")
|
|
129
|
+
})]
|
|
130
|
+
}), /* @__PURE__ */ i(z, {
|
|
131
|
+
children: [/* @__PURE__ */ e(a, {
|
|
132
|
+
variant: "h5",
|
|
133
|
+
skeletonWidth: "50%",
|
|
134
|
+
skeletongHeight: "36px",
|
|
135
|
+
children: n("module_leyend")
|
|
136
|
+
}), /* @__PURE__ */ e(a, {
|
|
137
|
+
variant: "subtitle",
|
|
138
|
+
skeletonWidth: "80%",
|
|
139
|
+
skeletongHeight: "24px",
|
|
140
|
+
children: "slogan"
|
|
141
|
+
})]
|
|
142
|
+
})]
|
|
143
|
+
}), /* @__PURE__ */ e(E, {
|
|
144
|
+
children: /* @__PURE__ */ e(m, {
|
|
145
|
+
children: /* @__PURE__ */ i(G, {
|
|
146
|
+
children: [/* @__PURE__ */ i(q, {
|
|
147
|
+
children: [/* @__PURE__ */ e(a, {
|
|
148
|
+
variant: "h5",
|
|
149
|
+
skeletonWidth: "20%",
|
|
150
|
+
skeletongHeight: "36px",
|
|
151
|
+
children: n("module_name")
|
|
152
|
+
}), /* @__PURE__ */ e(a, {
|
|
153
|
+
variant: "paragraph",
|
|
154
|
+
skeletonWidth: "40%",
|
|
155
|
+
skeletongHeight: "20px",
|
|
156
|
+
children: n("module_description")
|
|
157
|
+
})]
|
|
158
|
+
}), o]
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
})]
|
|
162
|
+
});
|
|
163
|
+
}, K = t("div")(({ theme: o }) => ({
|
|
164
|
+
display: "flex",
|
|
165
|
+
flexDirection: "column",
|
|
166
|
+
width: "100%",
|
|
167
|
+
height: "100%",
|
|
168
|
+
backgroundColor: o.palette.background.neutral,
|
|
169
|
+
padding: "12px",
|
|
170
|
+
gap: "32px"
|
|
171
|
+
})), O = t("div")(({ theme: o }) => ({
|
|
172
|
+
display: "flex",
|
|
173
|
+
flexDirection: "column",
|
|
174
|
+
padding: "12px",
|
|
175
|
+
gap: "20px",
|
|
176
|
+
width: "100%",
|
|
177
|
+
backgroundColor: o.palette.state?.focus,
|
|
178
|
+
boxShadow: o.customShadows?.z4,
|
|
179
|
+
position: "relative",
|
|
180
|
+
borderRadius: "8px",
|
|
181
|
+
"& .M4LanguagePopover-root": {
|
|
182
|
+
position: "absolute",
|
|
183
|
+
top: "12px",
|
|
184
|
+
right: "12px"
|
|
185
|
+
},
|
|
186
|
+
"& .MuiTypography-root": {
|
|
187
|
+
color: o.palette.patronus?.marbleLight[10],
|
|
188
|
+
display: "flex",
|
|
189
|
+
textTransform: "uppercase"
|
|
190
|
+
},
|
|
191
|
+
"& .MuiSkeleton-root": {
|
|
192
|
+
backgroundColor: d(`${o.palette.patronus?.marbleLight[10]}`, 0.24),
|
|
193
|
+
margin: "auto"
|
|
194
|
+
}
|
|
195
|
+
}));
|
|
196
|
+
t("div")(() => ({
|
|
197
|
+
display: "flex"
|
|
198
|
+
}));
|
|
199
|
+
const Q = t("div")(({ theme: o }) => ({
|
|
200
|
+
display: "flex",
|
|
201
|
+
width: "52px",
|
|
202
|
+
height: "52px",
|
|
203
|
+
borderRadius: "6px",
|
|
204
|
+
backgroundColor: o.palette.state?.active,
|
|
205
|
+
justifyContent: "center",
|
|
206
|
+
alignItems: "center",
|
|
207
|
+
boxShadow: `0px 4px 8px ${d(o.palette.patronus?.coolGrey[70] || "", 0.16)}`,
|
|
208
|
+
"& .M4LImage-root": {
|
|
209
|
+
backgroundColor: o.palette.patronus?.marbleLight[10],
|
|
210
|
+
borderRadius: "6px"
|
|
211
|
+
}
|
|
212
|
+
})), V = t("div")(() => ({
|
|
213
|
+
display: "flex",
|
|
214
|
+
flexDirection: "column",
|
|
215
|
+
width: "100%"
|
|
216
|
+
})), X = t("div")(() => ({
|
|
217
|
+
display: "flex",
|
|
218
|
+
flexDirection: "column",
|
|
219
|
+
padding: "12px",
|
|
220
|
+
margin: "auto 0",
|
|
221
|
+
width: "100%",
|
|
222
|
+
gap: "20px"
|
|
223
|
+
})), Y = t("div")(() => ({
|
|
224
|
+
display: "flex",
|
|
225
|
+
width: "100%",
|
|
226
|
+
height: "100%",
|
|
227
|
+
overflow: "hidden"
|
|
228
|
+
})), Z = t("div")(() => ({
|
|
229
|
+
display: "flex",
|
|
230
|
+
flexDirection: "column",
|
|
231
|
+
width: "100%",
|
|
232
|
+
gap: "4px"
|
|
233
|
+
})), oo = () => {
|
|
234
|
+
const {
|
|
235
|
+
children: o,
|
|
236
|
+
companyLogoSmallUrl: l
|
|
237
|
+
} = u(), {
|
|
238
|
+
getLabel: n
|
|
239
|
+
} = g(), {
|
|
240
|
+
name: r
|
|
241
|
+
} = y();
|
|
242
|
+
return /* @__PURE__ */ i(K, {
|
|
243
|
+
children: [/* @__PURE__ */ i(O, {
|
|
244
|
+
children: [/* @__PURE__ */ e(Q, {
|
|
245
|
+
children: /* @__PURE__ */ e(x, {
|
|
246
|
+
src: l,
|
|
247
|
+
ratio: "1:1",
|
|
248
|
+
width: "44px",
|
|
249
|
+
height: "44px"
|
|
250
|
+
})
|
|
251
|
+
}), /* @__PURE__ */ i(V, {
|
|
252
|
+
children: [/* @__PURE__ */ e(a, {
|
|
253
|
+
variant: "subtitleDens",
|
|
254
|
+
skeletonWidth: "70%",
|
|
255
|
+
skeletongHeight: "24px",
|
|
256
|
+
children: r
|
|
257
|
+
}), /* @__PURE__ */ e(a, {
|
|
258
|
+
variant: "paragraph",
|
|
259
|
+
skeletonWidth: "40%",
|
|
260
|
+
skeletongHeight: "20px",
|
|
261
|
+
children: n("company_name_subtitle")
|
|
262
|
+
})]
|
|
263
|
+
}), /* @__PURE__ */ e(h, {})]
|
|
264
|
+
}), /* @__PURE__ */ e(Y, {
|
|
265
|
+
children: /* @__PURE__ */ e(m, {
|
|
266
|
+
children: /* @__PURE__ */ i(X, {
|
|
267
|
+
children: [/* @__PURE__ */ i(Z, {
|
|
268
|
+
children: [/* @__PURE__ */ e(a, {
|
|
269
|
+
variant: "h5",
|
|
270
|
+
skeletonWidth: "20%",
|
|
271
|
+
skeletongHeight: "36px",
|
|
272
|
+
children: n("module_name")
|
|
273
|
+
}), /* @__PURE__ */ e(a, {
|
|
274
|
+
variant: "paragraph",
|
|
275
|
+
skeletonWidth: "40%",
|
|
276
|
+
skeletongHeight: "20px",
|
|
277
|
+
children: n("module_description")
|
|
278
|
+
})]
|
|
279
|
+
}), o]
|
|
280
|
+
})
|
|
281
|
+
})
|
|
282
|
+
})]
|
|
283
|
+
});
|
|
284
|
+
}, eo = () => {
|
|
285
|
+
const {
|
|
286
|
+
getModuleLabel: o
|
|
287
|
+
} = g(), l = I(), {
|
|
288
|
+
subtitle: n
|
|
289
|
+
} = u();
|
|
290
|
+
return /* @__PURE__ */ e(W, {
|
|
291
|
+
title: o(),
|
|
292
|
+
subtitle: n,
|
|
293
|
+
children: /* @__PURE__ */ e(P, {
|
|
294
|
+
children: l ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ e(oo, {})
|
|
295
|
+
})
|
|
296
|
+
});
|
|
297
|
+
}, ro = (o) => {
|
|
298
|
+
const {
|
|
299
|
+
moduleId: l,
|
|
300
|
+
moduleNameField: n,
|
|
301
|
+
children: r,
|
|
302
|
+
componentsDictionary: f,
|
|
303
|
+
skeletonFlags: b,
|
|
304
|
+
subtitle: v,
|
|
305
|
+
companyLogoSmallUrl: k,
|
|
306
|
+
companyLogoNormalUrl: C,
|
|
307
|
+
moduleIlustrationUrl: L
|
|
308
|
+
} = o, {
|
|
309
|
+
host_static_assets: s,
|
|
310
|
+
environment_assets: p
|
|
311
|
+
} = H(), w = $().currentLocale?.localeString, D = C || `${s}/${p}/frontend/commons/assets/icons/logotipo_m4l.svg`, M = k || `${s}/${p}/frontend/commons/assets/icons/isotipo_m4l.svg`, _ = L || `${s}/${p}/frontend/domain/host/commons/assets/img/illustration_noauth.png`, c = b;
|
|
312
|
+
return c.findIndex((S) => S === "dictionary_loaded") < 0 && c.push("dictionary_loaded"), /* @__PURE__ */ e(N, {
|
|
313
|
+
value: {
|
|
314
|
+
subtitle: v,
|
|
315
|
+
companyLogoSmallUrl: M,
|
|
316
|
+
companyLogoNormalUrl: D,
|
|
317
|
+
moduleIlustrationUrl: _,
|
|
318
|
+
children: r
|
|
319
|
+
},
|
|
320
|
+
children: /* @__PURE__ */ e(R, {
|
|
321
|
+
children: /* @__PURE__ */ e(U, {
|
|
322
|
+
isAuth: !1,
|
|
323
|
+
moduleId: l,
|
|
324
|
+
moduleNameField: n,
|
|
325
|
+
componentsDictionary: f,
|
|
326
|
+
currentLang: w,
|
|
327
|
+
children: /* @__PURE__ */ e(F, {
|
|
328
|
+
flags: c,
|
|
329
|
+
children: /* @__PURE__ */ e(eo, {})
|
|
330
|
+
})
|
|
331
|
+
})
|
|
332
|
+
})
|
|
333
|
+
});
|
|
334
|
+
};
|
|
335
|
+
function so() {
|
|
336
|
+
return ["no_auth_module_layout"];
|
|
337
|
+
}
|
|
338
|
+
const po = {
|
|
339
|
+
no_auth_module_layout: {}
|
|
340
|
+
};
|
|
341
|
+
export {
|
|
342
|
+
ro as N,
|
|
343
|
+
po as d,
|
|
344
|
+
so as g
|
|
345
|
+
};
|
package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DesktopContent: () => JSX.Element;
|
package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MobileContent: () => JSX.Element;
|
|
@@ -8,11 +8,11 @@ export declare interface NoAuthBaseProviderProps {
|
|
|
8
8
|
companyLogoSmallUrl: string;
|
|
9
9
|
companyLogoNormalUrl: string;
|
|
10
10
|
moduleIlustrationUrl?: string;
|
|
11
|
+
children: ReactNode;
|
|
11
12
|
}
|
|
12
13
|
export interface NoAuthModuleLayoutProps extends NoAuthBaseProviderProps {
|
|
13
14
|
moduleId: string;
|
|
14
15
|
moduleNameField?: string;
|
|
15
16
|
componentsDictionary: string[];
|
|
16
17
|
skeletonFlags: string[];
|
|
17
|
-
children: ReactNode;
|
|
18
18
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ModuleLayout/index.90b4dc8e.js";
|
|
2
|
+
import "@m4l/components";
|
|
3
|
+
import "react";
|
|
4
|
+
import "@m4l/core";
|
|
5
|
+
import "./MasterDetailLayout/index.2c363c7a.js";
|
|
6
|
+
import "@m4l/graphics";
|
|
7
|
+
import "react/jsx-runtime";
|
|
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
|
-
};
|