@m4l/layouts 0.1.9 → 0.1.11
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/hooks/useMasterDetail/{index.32172709.js → index.d5830f95.js} +1 -1
- package/hooks/useModule/{index.5ec82e11.js → index.f9e8dfff.js} +1 -1
- package/index.js +5 -5
- package/layouts/MasterDetailLayout/{index.93d98363.js → index.a35e475f.js} +2 -2
- package/layouts/ModuleLayout/contexts/ModuleContext/index.d.ts +1 -1
- package/layouts/ModuleLayout/contexts/ModuleContext/types.d.ts +1 -1
- package/layouts/ModuleLayout/index.fe7cec18.js +346 -0
- package/layouts/ModuleLayout/subcomponents/InnerModule/index.d.ts +3 -0
- package/layouts/ModuleLayout/{components/ModuleContent → subcomponents/InnerModule}/styles.d.ts +1 -1
- package/layouts/ModuleLayout/{components → subcomponents/InnerModule/subcomponents}/Header/index.d.ts +0 -0
- package/layouts/ModuleLayout/{components → subcomponents/InnerModule/subcomponents}/Header/skeleton.d.ts +0 -0
- package/layouts/ModuleLayout/{components → subcomponents/InnerModule/subcomponents}/Header/styles.d.ts +0 -0
- package/layouts/ModuleLayout/{components → subcomponents/InnerModule/subcomponents}/Header/types.d.ts +0 -0
- package/layouts/ModuleLayout/{components/ModuleContent → subcomponents/InnerModule}/types.d.ts +0 -0
- package/layouts/ModuleLayout/types.d.ts +9 -9
- package/layouts/NoAuthModuleLayout/index.798fbe31.js +200 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +3 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.d.ts +2 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.d.ts +3 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.d.ts +2 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.d.ts +2 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.d.ts +2 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.d.ts +3 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.d.ts +3 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.d.ts +2 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.d.ts +2 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.d.ts +4 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.d.ts +4 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.d.ts +2 -0
- package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.d.ts +2 -0
- package/layouts/NoAuthModuleLayout/{ModuleWrapper → subcomponents/InnerModule}/types.d.ts +0 -0
- package/layouts/NoAuthModuleLayout/types.d.ts +8 -2
- package/layouts/index.d.ts +1 -1
- package/package.json +1 -1
- package/layouts/ModuleLayout/components/ModuleContent/index.d.ts +0 -3
- package/layouts/ModuleLayout/index.76b867fc.js +0 -356
- package/layouts/NoAuthModuleLayout/ModuleWrapper/index.d.ts +0 -3
- package/layouts/NoAuthModuleLayout/ModuleWrapper/styles.d.ts +0 -13
- package/layouts/NoAuthModuleLayout/index.5050b988.js +0 -178
package/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as p, d as l, g as y } from "./layouts/ModuleLayout/index.
|
|
1
|
+
import { a as p, d as l, g as y } from "./layouts/ModuleLayout/index.fe7cec18.js";
|
|
2
2
|
import "@m4l/components";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@m4l/core";
|
|
5
|
-
import { a as n, d as M, g as D } from "./layouts/MasterDetailLayout/index.
|
|
5
|
+
import { a as n, d as M, g as D } from "./layouts/MasterDetailLayout/index.a35e475f.js";
|
|
6
6
|
import "@m4l/graphics";
|
|
7
7
|
import "@mui/material";
|
|
8
8
|
import "react/jsx-runtime";
|
|
9
|
-
import { N as L, d as c, g } from "./layouts/NoAuthModuleLayout/index.
|
|
10
|
-
import { u as N } from "./hooks/useMasterDetail/index.
|
|
11
|
-
import { u as A } from "./hooks/useModule/index.
|
|
9
|
+
import { N as L, d as c, g } from "./layouts/NoAuthModuleLayout/index.798fbe31.js";
|
|
10
|
+
import { u as N } from "./hooks/useMasterDetail/index.d5830f95.js";
|
|
11
|
+
import { u as A } from "./hooks/useModule/index.f9e8dfff.js";
|
|
12
12
|
import "@mui/material/styles";
|
|
13
13
|
export {
|
|
14
14
|
n as MasterDetailLayout,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createContext as L, useState as v, useRef as P, useCallback as z, useMemo as p } from "react";
|
|
2
2
|
import { voidFunction as N, useEnvironment as x } from "@m4l/core";
|
|
3
3
|
import { SplitLayout as R } from "@m4l/components";
|
|
4
|
-
import { g as B, a as V } from "../ModuleLayout/index.
|
|
4
|
+
import { g as B, a as V } from "../ModuleLayout/index.fe7cec18.js";
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
6
|
import { useResponsiveDesktop as j } from "@m4l/graphics";
|
|
7
7
|
import { Button as E } from "@mui/material";
|
|
8
|
-
import { u as H } from "../../hooks/useMasterDetail/index.
|
|
8
|
+
import { u as H } from "../../hooks/useMasterDetail/index.d5830f95.js";
|
|
9
9
|
function T() {
|
|
10
10
|
return ["master_detail_layout"].concat(B());
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ModuleLayoutContextProps, ModuleLayoutProviderProps } from './types';
|
|
3
|
-
declare const ModuleContext: import("react").Context<ModuleLayoutContextProps>;
|
|
3
|
+
declare const ModuleContext: import("react").Context<ModuleLayoutContextProps | null>;
|
|
4
4
|
declare function ModuleProvider(props: ModuleLayoutProviderProps): JSX.Element;
|
|
5
5
|
export { ModuleProvider, ModuleContext };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TLink } from '@m4l/components';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { ModuleAction } from '../../types';
|
|
4
4
|
export interface ModuleLayoutContextStateProps {
|
|
5
5
|
urlIcon: string;
|
|
6
6
|
moduleId: string;
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { Icon as C, Breadcrumbs as T, BoxIcon as L, MenuActions as D, useModal as N, ModalProvider as R, getModalDialogComponentsDictionary as $ } from "@m4l/components";
|
|
2
|
+
import { createContext as F, useState as f, useMemo as v, forwardRef as y, useRef as x, useImperativeHandle as M } from "react";
|
|
3
|
+
import { styled as s } from "@mui/material/styles";
|
|
4
|
+
import { useModuleDictionary as P, useModuleSkeleton as S, FlagsProvider as _, ModuleDictionaryProvider as A, ModuleSkeletonProvider as B, ModulePrivilegesProvider as H } from "@m4l/core";
|
|
5
|
+
import { Skeleton as d, Typography as G, IconButton as j } from "@mui/material";
|
|
6
|
+
import { useResponsiveDesktop as b } from "@m4l/graphics";
|
|
7
|
+
import { jsxs as p, jsx as i, Fragment as O } from "react/jsx-runtime";
|
|
8
|
+
import { u as W } from "../../hooks/useModule/index.f9e8dfff.js";
|
|
9
|
+
const z = s("div")(() => ({
|
|
10
|
+
display: "flex",
|
|
11
|
+
flexDirection: "column",
|
|
12
|
+
position: "absolute",
|
|
13
|
+
margin: "0px 12px 12px 12px",
|
|
14
|
+
left: "0px",
|
|
15
|
+
right: "0px",
|
|
16
|
+
top: "0px",
|
|
17
|
+
bottom: "0px",
|
|
18
|
+
overflow: "hidden"
|
|
19
|
+
})), q = s("div")(({
|
|
20
|
+
theme: e
|
|
21
|
+
}) => ({
|
|
22
|
+
display: "flex",
|
|
23
|
+
position: "relative",
|
|
24
|
+
marginTop: e.spacing(1),
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
flexGrow: "1",
|
|
27
|
+
overflow: "hidden"
|
|
28
|
+
})), K = s("div")(({
|
|
29
|
+
theme: e
|
|
30
|
+
}) => ({
|
|
31
|
+
display: "flex",
|
|
32
|
+
position: "relative",
|
|
33
|
+
borderBottom: `1px solid ${e.palette.divider}`,
|
|
34
|
+
height: "60px",
|
|
35
|
+
minHeight: "60px",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
" > span": {
|
|
38
|
+
marginRight: "12px"
|
|
39
|
+
},
|
|
40
|
+
"& > h5": {
|
|
41
|
+
paddingRight: e.spacing(3),
|
|
42
|
+
borderRight: `1px solid ${e.palette.divider}`
|
|
43
|
+
},
|
|
44
|
+
" > nav": {
|
|
45
|
+
marginRight: "12px",
|
|
46
|
+
flexGrow: 1
|
|
47
|
+
},
|
|
48
|
+
"& .splitactions.Mui-disabled": {
|
|
49
|
+
color: e.palette.primary.main
|
|
50
|
+
},
|
|
51
|
+
"& svg ": {
|
|
52
|
+
width: "20px",
|
|
53
|
+
height: "20px"
|
|
54
|
+
}
|
|
55
|
+
})), E = s("div")(({
|
|
56
|
+
theme: e
|
|
57
|
+
}) => ({
|
|
58
|
+
display: "flex",
|
|
59
|
+
justifyContent: "space-between",
|
|
60
|
+
padding: "0 0",
|
|
61
|
+
borderBottom: `1px solid ${e.palette.divider}`,
|
|
62
|
+
minHeight: "60px"
|
|
63
|
+
})), J = s("div")(({
|
|
64
|
+
theme: e
|
|
65
|
+
}) => ({
|
|
66
|
+
display: "grid",
|
|
67
|
+
gridTemplateColumns: "auto",
|
|
68
|
+
gridGap: e.spacing(1.75),
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
width: "auto",
|
|
71
|
+
height: "auto",
|
|
72
|
+
[e.breakpoints.up("sm")]: {
|
|
73
|
+
gridTemplateColumns: "repeat(3, auto)"
|
|
74
|
+
}
|
|
75
|
+
})), Q = s("div")(({
|
|
76
|
+
theme: e
|
|
77
|
+
}) => ({
|
|
78
|
+
display: "grid",
|
|
79
|
+
gridTemplateColumns: `${e.spacing(3)} auto`,
|
|
80
|
+
gridGap: e.spacing(2),
|
|
81
|
+
alignItems: "center",
|
|
82
|
+
width: "auto",
|
|
83
|
+
height: "auto"
|
|
84
|
+
})), U = s("div")(({
|
|
85
|
+
theme: e
|
|
86
|
+
}) => ({
|
|
87
|
+
display: "none",
|
|
88
|
+
alignItems: "center",
|
|
89
|
+
width: "1px",
|
|
90
|
+
background: e.palette.divider,
|
|
91
|
+
height: "100%",
|
|
92
|
+
margin: `0 ${e.spacing(2)}`,
|
|
93
|
+
[e.breakpoints.up("sm")]: {
|
|
94
|
+
display: "flex"
|
|
95
|
+
}
|
|
96
|
+
})), V = s("div")(({
|
|
97
|
+
theme: e
|
|
98
|
+
}) => ({
|
|
99
|
+
display: "grid",
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
gridTemplateColumns: "repeat(3, auto)",
|
|
102
|
+
gridGap: e.spacing(2)
|
|
103
|
+
})), X = s("div")(({
|
|
104
|
+
theme: e
|
|
105
|
+
}) => ({
|
|
106
|
+
display: "grid",
|
|
107
|
+
gridTemplateColumns: "auto",
|
|
108
|
+
alignItems: "center",
|
|
109
|
+
width: "auto",
|
|
110
|
+
height: "auto",
|
|
111
|
+
[e.breakpoints.up("sm")]: {
|
|
112
|
+
gridTemplateColumns: `repeat(3, ${e.spacing(3)})`,
|
|
113
|
+
gridGap: e.spacing(2)
|
|
114
|
+
}
|
|
115
|
+
}));
|
|
116
|
+
function Y() {
|
|
117
|
+
const e = b();
|
|
118
|
+
return /* @__PURE__ */ p(E, {
|
|
119
|
+
id: "HeaderSkeleton",
|
|
120
|
+
children: [/* @__PURE__ */ p(J, {
|
|
121
|
+
children: [/* @__PURE__ */ p(Q, {
|
|
122
|
+
children: [/* @__PURE__ */ i(d, {
|
|
123
|
+
variant: "circular",
|
|
124
|
+
width: 24,
|
|
125
|
+
height: 24
|
|
126
|
+
}), /* @__PURE__ */ i(d, {
|
|
127
|
+
variant: "text",
|
|
128
|
+
width: 120,
|
|
129
|
+
height: 14
|
|
130
|
+
})]
|
|
131
|
+
}), /* @__PURE__ */ i(U, {}), /* @__PURE__ */ p(V, {
|
|
132
|
+
children: [/* @__PURE__ */ i(d, {
|
|
133
|
+
variant: "text",
|
|
134
|
+
width: 68,
|
|
135
|
+
height: 14
|
|
136
|
+
}), /* @__PURE__ */ i(d, {
|
|
137
|
+
variant: "circular",
|
|
138
|
+
width: 4,
|
|
139
|
+
height: 4
|
|
140
|
+
}), /* @__PURE__ */ i(d, {
|
|
141
|
+
variant: "text",
|
|
142
|
+
width: 68,
|
|
143
|
+
height: 14
|
|
144
|
+
})]
|
|
145
|
+
})]
|
|
146
|
+
}), /* @__PURE__ */ i(X, {
|
|
147
|
+
children: e ? /* @__PURE__ */ p(O, {
|
|
148
|
+
children: [/* @__PURE__ */ i(d, {
|
|
149
|
+
variant: "circular",
|
|
150
|
+
width: 24,
|
|
151
|
+
height: 24
|
|
152
|
+
}), /* @__PURE__ */ i(d, {
|
|
153
|
+
variant: "circular",
|
|
154
|
+
width: 24,
|
|
155
|
+
height: 24
|
|
156
|
+
}), /* @__PURE__ */ i(d, {
|
|
157
|
+
variant: "circular",
|
|
158
|
+
width: 24,
|
|
159
|
+
height: 24
|
|
160
|
+
})]
|
|
161
|
+
}) : /* @__PURE__ */ i(d, {
|
|
162
|
+
variant: "circular",
|
|
163
|
+
width: 24,
|
|
164
|
+
height: 24
|
|
165
|
+
})
|
|
166
|
+
})]
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
const Z = F(null);
|
|
170
|
+
function ee(e) {
|
|
171
|
+
const {
|
|
172
|
+
children: n,
|
|
173
|
+
initialModuleActions: t,
|
|
174
|
+
moduleId: o,
|
|
175
|
+
moduleNameField: a,
|
|
176
|
+
urlIcon: c,
|
|
177
|
+
breadcrumbLinks: h
|
|
178
|
+
} = e, [l] = f(() => ({
|
|
179
|
+
moduleId: o,
|
|
180
|
+
urlIcon: c,
|
|
181
|
+
moduleNameField: a,
|
|
182
|
+
dictionary: void 0,
|
|
183
|
+
breadcrumbLinks: h
|
|
184
|
+
})), [u, r] = f([]), m = v(() => t.concat(u), [t, u]);
|
|
185
|
+
return /* @__PURE__ */ i(Z.Provider, {
|
|
186
|
+
value: {
|
|
187
|
+
moduleActions: m,
|
|
188
|
+
dynamicActions: u,
|
|
189
|
+
setDynamicActions: r,
|
|
190
|
+
moduleId: l.moduleId,
|
|
191
|
+
moduleNameField: l.moduleNameField,
|
|
192
|
+
urlIcon: l.urlIcon,
|
|
193
|
+
breadcrumbLinks: l.breadcrumbLinks
|
|
194
|
+
},
|
|
195
|
+
children: n
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function ie(e, n) {
|
|
199
|
+
let t = [...n.filter((o) => o.visibility !== "allways")];
|
|
200
|
+
return e !== void 0 && e && (t = t.filter((o) => o.visibility === "normal")), t;
|
|
201
|
+
}
|
|
202
|
+
function te(e, n) {
|
|
203
|
+
let t = [];
|
|
204
|
+
return e !== void 0 && e && (t = t.concat(n.filter((o) => o.visibility === "main"))), t = t.concat(n.filter((o) => o.visibility === "allways")), t;
|
|
205
|
+
}
|
|
206
|
+
function oe() {
|
|
207
|
+
const {
|
|
208
|
+
moduleActions: e,
|
|
209
|
+
moduleNameField: n,
|
|
210
|
+
breadcrumbLinks: t,
|
|
211
|
+
urlIcon: o
|
|
212
|
+
} = W(), {
|
|
213
|
+
getLabel: a
|
|
214
|
+
} = P(), c = b(), h = S(), l = v(
|
|
215
|
+
() => ie(c, e),
|
|
216
|
+
[e, c]
|
|
217
|
+
), u = v(() => te(c, e), [e, c]);
|
|
218
|
+
return h ? /* @__PURE__ */ i(Y, {}) : /* @__PURE__ */ p(K, {
|
|
219
|
+
id: "Header",
|
|
220
|
+
children: [/* @__PURE__ */ i(C, {
|
|
221
|
+
src: o,
|
|
222
|
+
bgColor: "primary.main",
|
|
223
|
+
size: "24px"
|
|
224
|
+
}), /* @__PURE__ */ i(G, {
|
|
225
|
+
variant: "h5",
|
|
226
|
+
sx: {
|
|
227
|
+
maxWidth: 260,
|
|
228
|
+
overflow: "hidden",
|
|
229
|
+
whiteSpace: "nowrap",
|
|
230
|
+
color: "text.primary",
|
|
231
|
+
marginLeft: "12px",
|
|
232
|
+
marginRight: "24px",
|
|
233
|
+
textOverflow: "ellipsis"
|
|
234
|
+
},
|
|
235
|
+
children: a(n)
|
|
236
|
+
}), /* @__PURE__ */ i(T, {
|
|
237
|
+
links: t
|
|
238
|
+
}), u.map((r, m) => {
|
|
239
|
+
const g = a(r.dictionaryField);
|
|
240
|
+
return r.component ? /* @__PURE__ */ i(r.component, {
|
|
241
|
+
description: g,
|
|
242
|
+
onClick: r.onClick
|
|
243
|
+
}, `main_action_${m}`) : /* @__PURE__ */ i(j, {
|
|
244
|
+
className: r.className,
|
|
245
|
+
onClick: r.onClick,
|
|
246
|
+
"aria-label": `${g}`,
|
|
247
|
+
disabled: r.disabled,
|
|
248
|
+
children: /* @__PURE__ */ i(L, {
|
|
249
|
+
src: r.urlIcon,
|
|
250
|
+
sx: {
|
|
251
|
+
width: 18,
|
|
252
|
+
height: 18
|
|
253
|
+
}
|
|
254
|
+
})
|
|
255
|
+
}, `main_action_${m}`);
|
|
256
|
+
}), l.length > 0 && /* @__PURE__ */ i(D, {
|
|
257
|
+
arrowType: "right-top",
|
|
258
|
+
marginTop: "11px",
|
|
259
|
+
anchorOrigin: {
|
|
260
|
+
vertical: "top",
|
|
261
|
+
horizontal: "left"
|
|
262
|
+
},
|
|
263
|
+
transformOrigin: {
|
|
264
|
+
vertical: "top",
|
|
265
|
+
horizontal: "right"
|
|
266
|
+
},
|
|
267
|
+
menuActions: l
|
|
268
|
+
})]
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
const w = y((e, n) => {
|
|
272
|
+
const {
|
|
273
|
+
children: t
|
|
274
|
+
} = e, {
|
|
275
|
+
openModal: o
|
|
276
|
+
} = N(), a = x(null);
|
|
277
|
+
return M(n, () => ({
|
|
278
|
+
openModal: o,
|
|
279
|
+
current: a.current
|
|
280
|
+
})), /* @__PURE__ */ p(z, {
|
|
281
|
+
id: "WrapperInnerModule",
|
|
282
|
+
className: "m4l_module_layout",
|
|
283
|
+
ref: a,
|
|
284
|
+
children: [/* @__PURE__ */ i(oe, {}), /* @__PURE__ */ i(q, {
|
|
285
|
+
id: "ModuleContent",
|
|
286
|
+
children: t
|
|
287
|
+
})]
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
w.displayName = "InnerModule";
|
|
291
|
+
const ne = y((e, n) => {
|
|
292
|
+
const {
|
|
293
|
+
moduleId: t,
|
|
294
|
+
moduleNameField: o = "module_name",
|
|
295
|
+
moduleActions: a,
|
|
296
|
+
urlIcon: c,
|
|
297
|
+
children: h,
|
|
298
|
+
componentsDictionary: l,
|
|
299
|
+
breadcrumbLinks: u,
|
|
300
|
+
privileges: r,
|
|
301
|
+
skeletonFlags: m
|
|
302
|
+
} = e, g = x(null), I = (k) => {
|
|
303
|
+
g.current?.openModal(k);
|
|
304
|
+
};
|
|
305
|
+
return M(n, () => ({
|
|
306
|
+
openModal: I,
|
|
307
|
+
current: g.current
|
|
308
|
+
})), /* @__PURE__ */ i(_, {
|
|
309
|
+
children: /* @__PURE__ */ i(A, {
|
|
310
|
+
moduleId: t,
|
|
311
|
+
componentsDictionary: l,
|
|
312
|
+
children: /* @__PURE__ */ i(B, {
|
|
313
|
+
flags: m,
|
|
314
|
+
children: /* @__PURE__ */ i(H, {
|
|
315
|
+
queryPrivileges: r,
|
|
316
|
+
children: /* @__PURE__ */ i(ee, {
|
|
317
|
+
moduleId: t,
|
|
318
|
+
urlIcon: c,
|
|
319
|
+
moduleNameField: o,
|
|
320
|
+
initialModuleActions: a,
|
|
321
|
+
breadcrumbLinks: u,
|
|
322
|
+
children: /* @__PURE__ */ i(R, {
|
|
323
|
+
children: /* @__PURE__ */ i(w, {
|
|
324
|
+
ref: g,
|
|
325
|
+
children: h
|
|
326
|
+
})
|
|
327
|
+
})
|
|
328
|
+
})
|
|
329
|
+
})
|
|
330
|
+
})
|
|
331
|
+
})
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
ne.displayName = "ModuleLayout";
|
|
335
|
+
function me() {
|
|
336
|
+
return ["module_layout"].concat($());
|
|
337
|
+
}
|
|
338
|
+
const ge = {
|
|
339
|
+
module_layout: {}
|
|
340
|
+
};
|
|
341
|
+
export {
|
|
342
|
+
Z as M,
|
|
343
|
+
ne as a,
|
|
344
|
+
ge as d,
|
|
345
|
+
me as g
|
|
346
|
+
};
|
package/layouts/ModuleLayout/{components/ModuleContent → subcomponents/InnerModule}/styles.d.ts
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const WrapperInnerModule: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
3
|
export declare const ModuleContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/layouts/ModuleLayout/{components/ModuleContent → subcomponents/InnerModule}/types.d.ts
RENAMED
|
File without changes
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
import type { HeaderProps } from './
|
|
4
|
-
import type { ModuleRef } from './
|
|
2
|
+
import type { TLink, ModalOpenOptions, MenuAction } from '@m4l/components';
|
|
3
|
+
import type { HeaderProps } from './subcomponents/InnerModule/subcomponents/Header/types';
|
|
4
|
+
import type { ModuleRef } from './subcomponents/InnerModule/types';
|
|
5
|
+
export declare type MenuActionType = 'main' | 'allways' | 'normal';
|
|
6
|
+
export interface ModuleAction extends MenuAction {
|
|
7
|
+
visibility: MenuActionType;
|
|
8
|
+
tag?: any;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
5
11
|
export interface ContainerProps {
|
|
6
12
|
vertical: boolean;
|
|
7
13
|
}
|
|
8
|
-
export declare type MenuActionType = 'main' | 'allways' | 'normal';
|
|
9
14
|
export declare type ModuleLayoutRef = {
|
|
10
15
|
openModal: (modalOpenProps: ModalOpenOptions) => void;
|
|
11
16
|
current: ModuleRef | null;
|
|
12
17
|
};
|
|
13
|
-
export interface ModuleAction extends MenuAction {
|
|
14
|
-
visibility: MenuActionType;
|
|
15
|
-
tag?: any;
|
|
16
|
-
className?: string;
|
|
17
|
-
}
|
|
18
18
|
export interface ModuleLayoutProps extends HeaderProps {
|
|
19
19
|
moduleId: string;
|
|
20
20
|
urlIcon: string;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { useResponsive as h, useLocales as N } from "@m4l/graphics";
|
|
2
|
+
import { Image as p, Typography as u, LanguagePopover as W, HelmetPage as k } from "@m4l/components";
|
|
3
|
+
import { useModuleDictionary as m, useBase as g, useEnvironment as b, BaseProvider as I, FlagsProvider as F, ModuleDictionaryProvider as S, ModuleSkeletonProvider as A } from "@m4l/core";
|
|
4
|
+
import { styled as t } from "@mui/material/styles";
|
|
5
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
6
|
+
const C = t("div")(({
|
|
7
|
+
theme: o
|
|
8
|
+
}) => ({
|
|
9
|
+
boxShadow: o.customShadows.card,
|
|
10
|
+
borderRadius: o.spacing(2),
|
|
11
|
+
width: "100%",
|
|
12
|
+
maxWidth: "464px",
|
|
13
|
+
display: "flex",
|
|
14
|
+
flexDirection: "column",
|
|
15
|
+
justifyContent: "flex-start",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
margin: o.spacing(2, 0, 2, 2),
|
|
18
|
+
padding: o.spacing(4, 3),
|
|
19
|
+
gap: o.spacing(3),
|
|
20
|
+
overflow: "hidden"
|
|
21
|
+
})), j = () => {
|
|
22
|
+
const {
|
|
23
|
+
getLabel: o
|
|
24
|
+
} = m(), {
|
|
25
|
+
companyLogoNormalUrl: n,
|
|
26
|
+
moduleIlustrationUrl: l
|
|
27
|
+
} = g();
|
|
28
|
+
return /* @__PURE__ */ i(C, {
|
|
29
|
+
children: [/* @__PURE__ */ e(p, {
|
|
30
|
+
width: "400px",
|
|
31
|
+
height: "400px",
|
|
32
|
+
src: n,
|
|
33
|
+
alt: "logo"
|
|
34
|
+
}, "Logo"), l ? /* @__PURE__ */ e(p, {
|
|
35
|
+
src: l,
|
|
36
|
+
width: "100%",
|
|
37
|
+
height: "300px"
|
|
38
|
+
}) : null, /* @__PURE__ */ e(u, {
|
|
39
|
+
variant: "h3",
|
|
40
|
+
skeletonWidth: "30%",
|
|
41
|
+
skeletongHeight: "18px",
|
|
42
|
+
children: o("module_leyend")
|
|
43
|
+
}, "Leyend")]
|
|
44
|
+
});
|
|
45
|
+
}, B = t("div")(() => ({
|
|
46
|
+
flexGrow: "1",
|
|
47
|
+
display: "flex",
|
|
48
|
+
flexDirection: "column"
|
|
49
|
+
})), P = t("header")(({
|
|
50
|
+
theme: o
|
|
51
|
+
}) => ({
|
|
52
|
+
width: "100%",
|
|
53
|
+
display: "flex",
|
|
54
|
+
justifyContent: "space-between",
|
|
55
|
+
padding: o.spacing(1, 3),
|
|
56
|
+
[o.breakpoints.up("md")]: {
|
|
57
|
+
justifyContent: "flex-end"
|
|
58
|
+
}
|
|
59
|
+
})), $ = () => {
|
|
60
|
+
const {
|
|
61
|
+
companyLogoSmallUrl: o
|
|
62
|
+
} = g(), n = h("down", "md");
|
|
63
|
+
return /* @__PURE__ */ i(P, {
|
|
64
|
+
children: [n ? /* @__PURE__ */ e(p, {
|
|
65
|
+
src: o,
|
|
66
|
+
width: "40px",
|
|
67
|
+
height: "40px",
|
|
68
|
+
skeletonVariant: "circle"
|
|
69
|
+
}, "Isotipo") : null, /* @__PURE__ */ e(W, {})]
|
|
70
|
+
});
|
|
71
|
+
}, H = t("div")(() => ({
|
|
72
|
+
display: "flex",
|
|
73
|
+
overflow: "auto",
|
|
74
|
+
width: "100%",
|
|
75
|
+
height: "100%",
|
|
76
|
+
justifyContent: "center"
|
|
77
|
+
})), R = t("div")(({
|
|
78
|
+
theme: o
|
|
79
|
+
}) => ({
|
|
80
|
+
display: "flex",
|
|
81
|
+
width: "100%",
|
|
82
|
+
height: "auto",
|
|
83
|
+
margin: "auto",
|
|
84
|
+
maxWidth: "480px",
|
|
85
|
+
flexDirection: "column",
|
|
86
|
+
gap: o.spacing(3)
|
|
87
|
+
})), E = t("div")(({
|
|
88
|
+
theme: o
|
|
89
|
+
}) => ({
|
|
90
|
+
display: "flex",
|
|
91
|
+
flexDirection: "column",
|
|
92
|
+
gap: o.spacing(2),
|
|
93
|
+
padding: o.spacing(0, 3)
|
|
94
|
+
})), G = () => {
|
|
95
|
+
const {
|
|
96
|
+
getModuleLabel: o,
|
|
97
|
+
getLabel: n
|
|
98
|
+
} = m();
|
|
99
|
+
return /* @__PURE__ */ i(E, {
|
|
100
|
+
children: [/* @__PURE__ */ e(u, {
|
|
101
|
+
variant: "h4",
|
|
102
|
+
skeletonWidth: "35%",
|
|
103
|
+
skeletongHeight: "36px",
|
|
104
|
+
children: o()
|
|
105
|
+
}, "ModuleName"), /* @__PURE__ */ e(u, {
|
|
106
|
+
skeletonWidth: "60%",
|
|
107
|
+
skeletongHeight: "21px",
|
|
108
|
+
children: n("module_description")
|
|
109
|
+
}, "ModuleDescription")]
|
|
110
|
+
});
|
|
111
|
+
}, T = (o) => {
|
|
112
|
+
const {
|
|
113
|
+
children: n
|
|
114
|
+
} = o;
|
|
115
|
+
return /* @__PURE__ */ e(H, {
|
|
116
|
+
children: /* @__PURE__ */ i(R, {
|
|
117
|
+
children: [/* @__PURE__ */ e(G, {}), n]
|
|
118
|
+
})
|
|
119
|
+
});
|
|
120
|
+
}, V = (o) => {
|
|
121
|
+
const {
|
|
122
|
+
children: n
|
|
123
|
+
} = o;
|
|
124
|
+
return /* @__PURE__ */ i(B, {
|
|
125
|
+
children: [/* @__PURE__ */ e($, {}), /* @__PURE__ */ e(T, {
|
|
126
|
+
children: n
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
129
|
+
}, q = t("div")(() => ({
|
|
130
|
+
display: "flex",
|
|
131
|
+
height: "100vh"
|
|
132
|
+
})), z = (o) => {
|
|
133
|
+
const {
|
|
134
|
+
children: n
|
|
135
|
+
} = o, {
|
|
136
|
+
getModuleLabel: l
|
|
137
|
+
} = m(), r = h("up", "md"), {
|
|
138
|
+
subtitle: a
|
|
139
|
+
} = g();
|
|
140
|
+
return /* @__PURE__ */ e(k, {
|
|
141
|
+
title: l(),
|
|
142
|
+
subtitle: a,
|
|
143
|
+
children: /* @__PURE__ */ i(q, {
|
|
144
|
+
children: [r ? /* @__PURE__ */ e(j, {}) : null, /* @__PURE__ */ e(V, {
|
|
145
|
+
children: n
|
|
146
|
+
})]
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
}, Y = (o) => {
|
|
150
|
+
const {
|
|
151
|
+
moduleId: n,
|
|
152
|
+
moduleNameField: l,
|
|
153
|
+
children: r,
|
|
154
|
+
componentsDictionary: a,
|
|
155
|
+
skeletonFlags: f,
|
|
156
|
+
subtitle: y,
|
|
157
|
+
companyLogoSmallUrl: x,
|
|
158
|
+
companyLogoNormalUrl: L,
|
|
159
|
+
moduleIlustrationUrl: v
|
|
160
|
+
} = o, {
|
|
161
|
+
host_static_assets: s,
|
|
162
|
+
environment_assets: d
|
|
163
|
+
} = b(), {
|
|
164
|
+
currentLang: _
|
|
165
|
+
} = N(), w = L || `${s}/${d}/frontend/commons/assets/icons/logotipo_m4l.svg`, M = x || `${s}/${d}/frontend/commons/assets/icons/isotipo_m4l.svg`, U = v || `${s}/${d}/frontend/domain/host/commons/assets/img/illustration_noauth.png`, c = f;
|
|
166
|
+
return c.findIndex((D) => D === "dictionary_loaded") < 0 && c.push("dictionary_loaded"), /* @__PURE__ */ e(I, {
|
|
167
|
+
value: {
|
|
168
|
+
subtitle: y,
|
|
169
|
+
companyLogoSmallUrl: M,
|
|
170
|
+
companyLogoNormalUrl: w,
|
|
171
|
+
moduleIlustrationUrl: U
|
|
172
|
+
},
|
|
173
|
+
children: /* @__PURE__ */ e(F, {
|
|
174
|
+
children: /* @__PURE__ */ e(S, {
|
|
175
|
+
isAuth: !1,
|
|
176
|
+
moduleId: n,
|
|
177
|
+
moduleNameField: l,
|
|
178
|
+
componentsDictionary: a,
|
|
179
|
+
currentLang: _.value,
|
|
180
|
+
children: /* @__PURE__ */ e(A, {
|
|
181
|
+
flags: c,
|
|
182
|
+
children: /* @__PURE__ */ e(z, {
|
|
183
|
+
children: r
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
})
|
|
187
|
+
})
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
function Z() {
|
|
191
|
+
return ["no_auth_module_layout"];
|
|
192
|
+
}
|
|
193
|
+
const oo = {
|
|
194
|
+
no_auth_module_layout: {}
|
|
195
|
+
};
|
|
196
|
+
export {
|
|
197
|
+
Y as N,
|
|
198
|
+
oo as d,
|
|
199
|
+
Z as g
|
|
200
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WrapperMain: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WrapperAppBarForm: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|