@m4l/layouts 0.1.22 → 0.1.25

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.
Files changed (146) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.cjs +118 -0
  3. package/.gitignore +23 -0
  4. package/.gitlab-ci.yml +16 -0
  5. package/.prettierignore +3 -0
  6. package/.prettierrc.json +26 -0
  7. package/.vscode/settings.json +50 -0
  8. package/dist/components/BaseModule/index.6309486a.js +33 -0
  9. package/dist/components/BaseModule/index.d.ts +4 -0
  10. package/dist/components/BaseModule/types.d.ts +9 -0
  11. package/dist/components/MFHostApp/index.1700d13a.js +69 -0
  12. package/{components → dist/components}/MFHostApp/types.d.ts +3 -7
  13. package/dist/components/MFIsolationApp/index.b21e5671.js +151 -0
  14. package/dist/components/MFIsolationApp/types.d.ts +11 -0
  15. package/dist/components/index.d.ts +4 -0
  16. package/dist/components/index.deb4e7ac.js +6 -0
  17. package/{contexts → dist/contexts}/AuthContext/types.d.ts +1 -1
  18. package/dist/contexts/index.b46a2699.js +1 -0
  19. package/dist/hooks/index.2022a179.js +4 -0
  20. package/{hooks/useMasterDetail/index.8e9e900b.js → dist/hooks/useMasterDetail/index.1b024fd5.js} +1 -1
  21. package/{hooks/useModule/index.096d7d13.js → dist/hooks/useModule/index.6ff7d08a.js} +1 -1
  22. package/dist/index.js +41 -0
  23. package/dist/layouts/MasterDetailLayout/index.3da0ffda.js +104 -0
  24. package/{layouts → dist/layouts}/ModuleLayout/contexts/ModuleContext/types.d.ts +2 -7
  25. package/dist/layouts/ModuleLayout/index.a76397df.js +101 -0
  26. package/dist/layouts/ModuleLayout/types.d.ts +15 -0
  27. package/dist/layouts/index.014e41ba.js +8 -0
  28. package/{layouts → dist/layouts}/index.d.ts +0 -1
  29. package/dist/package.json +36 -0
  30. package/package.json +57 -12
  31. package/src/@types/index.ts +8 -0
  32. package/src/components/BaseModule/index.tsx +59 -0
  33. package/src/components/BaseModule/types.ts +12 -0
  34. package/src/components/MFHostApp/index.tsx +95 -0
  35. package/src/components/MFHostApp/types.ts +16 -0
  36. package/src/components/MFIsolationApp/index.tsx +164 -0
  37. package/src/components/MFIsolationApp/subcomponents/MFAuthApp/index.tsx +98 -0
  38. package/src/components/MFIsolationApp/subcomponents/MFAuthApp/types.ts +7 -0
  39. package/src/components/MFIsolationApp/types.ts +12 -0
  40. package/src/components/index.ts +5 -0
  41. package/src/contexts/AuthContext/index.tsx +189 -0
  42. package/src/contexts/AuthContext/types.ts +65 -0
  43. package/src/contexts/index.ts +1 -0
  44. package/src/hooks/index.ts +5 -0
  45. package/src/hooks/useAuth/index.ts +12 -0
  46. package/src/hooks/useMasterDetail/index.ts +6 -0
  47. package/src/hooks/useModule/index.ts +13 -0
  48. package/src/index.ts +7 -0
  49. package/src/layouts/MasterDetailLayout/components/ButtonDetail/index.tsx +38 -0
  50. package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.tsx +34 -0
  51. package/src/layouts/MasterDetailLayout/contexts/MasterDetailContext/types.ts +19 -0
  52. package/src/layouts/MasterDetailLayout/dicctionary.ts +20 -0
  53. package/src/layouts/MasterDetailLayout/index.tsx +165 -0
  54. package/src/layouts/MasterDetailLayout/types.ts +11 -0
  55. package/src/layouts/ModuleLayout/contexts/ModuleContext/index.tsx +56 -0
  56. package/src/layouts/ModuleLayout/contexts/ModuleContext/types.ts +23 -0
  57. package/src/layouts/ModuleLayout/dicctionary.ts +11 -0
  58. package/src/layouts/ModuleLayout/index.tsx +59 -0
  59. package/src/layouts/ModuleLayout/subcomponents/InnerModule/index.tsx +35 -0
  60. package/src/layouts/ModuleLayout/subcomponents/InnerModule/styles.tsx +31 -0
  61. package/src/layouts/ModuleLayout/subcomponents/InnerModule/types.ts +11 -0
  62. package/src/layouts/ModuleLayout/types.ts +31 -0
  63. package/src/layouts/NoAuthModuleLayout/dicctionary.ts +9 -0
  64. package/src/layouts/NoAuthModuleLayout/index.tsx +85 -0
  65. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/index.tsx +43 -0
  66. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/styles.tsx +6 -0
  67. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.tsx +14 -0
  68. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.tsx +7 -0
  69. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.tsx +25 -0
  70. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.tsx +11 -0
  71. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.tsx +17 -0
  72. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.tsx +19 -0
  73. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.tsx +25 -0
  74. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.tsx +8 -0
  75. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.ts +5 -0
  76. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.ts +5 -0
  77. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.tsx +28 -0
  78. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.tsx +16 -0
  79. package/src/layouts/NoAuthModuleLayout/subcomponents/InnerModule/types.ts +5 -0
  80. package/src/layouts/NoAuthModuleLayout/types.ts +22 -0
  81. package/src/layouts/index.ts +8 -0
  82. package/src/test/setup.ts +1 -0
  83. package/src/test/utils.tsx +20 -0
  84. package/src/vite-env.d.ts +3 -0
  85. package/tsconfig.json +29 -0
  86. package/tsconfig.node.json +8 -0
  87. package/vite.config.ts +172 -0
  88. package/components/MFHostApp/index.b3c15ec3.js +0 -52
  89. package/components/MFIsolationApp/index.28f538a3.js +0 -106
  90. package/components/MFIsolationApp/types.d.ts +0 -10
  91. package/components/index.d.ts +0 -3
  92. package/index.js +0 -38
  93. package/layouts/MasterDetailLayout/components/ButtonDetail/index.d.ts +0 -3
  94. package/layouts/MasterDetailLayout/index.71de0dc7.js +0 -141
  95. package/layouts/ModuleLayout/index.842072c5.js +0 -348
  96. package/layouts/ModuleLayout/subcomponents/InnerModule/subcomponents/Header/index.d.ts +0 -2
  97. package/layouts/ModuleLayout/subcomponents/InnerModule/subcomponents/Header/skeleton.d.ts +0 -2
  98. package/layouts/ModuleLayout/subcomponents/InnerModule/subcomponents/Header/styles.d.ts +0 -8
  99. package/layouts/ModuleLayout/subcomponents/InnerModule/subcomponents/Header/types.d.ts +0 -2
  100. package/layouts/ModuleLayout/types.d.ts +0 -29
  101. package/node_modules.26043cf4.js +0 -1601
  102. package/vendor.95e38403.js +0 -20
  103. /package/{components → dist/components}/MFHostApp/index.d.ts +0 -0
  104. /package/{components → dist/components}/MFIsolationApp/index.d.ts +0 -0
  105. /package/{components → dist/components}/MFIsolationApp/subcomponents/MFAuthApp/index.d.ts +0 -0
  106. /package/{components → dist/components}/MFIsolationApp/subcomponents/MFAuthApp/types.d.ts +0 -0
  107. /package/{contexts → dist/contexts}/AuthContext/index.6f966215.js +0 -0
  108. /package/{contexts → dist/contexts}/AuthContext/index.d.ts +0 -0
  109. /package/{contexts → dist/contexts}/index.d.ts +0 -0
  110. /package/{hooks → dist/hooks}/index.d.ts +0 -0
  111. /package/{hooks → dist/hooks}/useAuth/index.cb6a3420.js +0 -0
  112. /package/{hooks → dist/hooks}/useAuth/index.d.ts +0 -0
  113. /package/{hooks → dist/hooks}/useMasterDetail/index.d.ts +0 -0
  114. /package/{hooks → dist/hooks}/useModule/index.d.ts +0 -0
  115. /package/{index.d.ts → dist/index.d.ts} +0 -0
  116. /package/{layouts → dist/layouts}/MasterDetailLayout/contexts/MasterDetailContext/index.d.ts +0 -0
  117. /package/{layouts → dist/layouts}/MasterDetailLayout/contexts/MasterDetailContext/types.d.ts +0 -0
  118. /package/{layouts → dist/layouts}/MasterDetailLayout/dicctionary.d.ts +0 -0
  119. /package/{layouts → dist/layouts}/MasterDetailLayout/index.d.ts +0 -0
  120. /package/{layouts → dist/layouts}/MasterDetailLayout/types.d.ts +0 -0
  121. /package/{layouts → dist/layouts}/ModuleLayout/contexts/ModuleContext/index.d.ts +0 -0
  122. /package/{layouts → dist/layouts}/ModuleLayout/dicctionary.d.ts +0 -0
  123. /package/{layouts → dist/layouts}/ModuleLayout/index.d.ts +0 -0
  124. /package/{layouts → dist/layouts}/ModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
  125. /package/{layouts → dist/layouts}/ModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
  126. /package/{layouts → dist/layouts}/ModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
  127. /package/{layouts → dist/layouts}/NoAuthModuleLayout/dicctionary.d.ts +0 -0
  128. /package/{layouts → dist/layouts}/NoAuthModuleLayout/index.5d1098ef.js +0 -0
  129. /package/{layouts → dist/layouts}/NoAuthModuleLayout/index.d.ts +0 -0
  130. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
  131. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/styles.d.ts +0 -0
  132. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/index.d.ts +0 -0
  133. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/styles.d.ts +0 -0
  134. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/index.d.ts +0 -0
  135. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/AppBar/styles.d.ts +0 -0
  136. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/index.d.ts +0 -0
  137. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/styles.d.ts +0 -0
  138. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/index.d.ts +0 -0
  139. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/subcomponents/NameDescription/styles.d.ts +0 -0
  140. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/subcomponents/Form/types.d.ts +0 -0
  141. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/AppBarForm/types.d.ts +0 -0
  142. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/index.d.ts +0 -0
  143. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/LogoLeyend/styles.d.ts +0 -0
  144. /package/{layouts → dist/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
  145. /package/{layouts → dist/layouts}/NoAuthModuleLayout/types.d.ts +0 -0
  146. /package/{vite-env.d.ts → dist/vite-env.d.ts} +0 -0
@@ -1,141 +0,0 @@
1
- import { createContext as P, useState as v, useRef as z, useCallback as N, useMemo as p } from "react";
2
- import { voidFunction as x, useEnvironment as R } from "@m4l/core";
3
- import { SplitLayout as B } from "@m4l/components";
4
- import { g as V, a as j } from "../ModuleLayout/index.842072c5.js";
5
- import { jsx as r } from "react/jsx-runtime";
6
- import { useResponsiveDesktop as E } from "@m4l/graphics";
7
- import { Button as H } from "@mui/material";
8
- import { u as T } from "../../hooks/useMasterDetail/index.8e9e900b.js";
9
- function W() {
10
- return ["master_detail_layout"].concat(V());
11
- }
12
- const et = {
13
- master_detail_layout: {
14
- split_vertical: "Split vertically",
15
- split_horizontal: "Split horizontally",
16
- no_split: "No split",
17
- view_detail: "View detail"
18
- }
19
- }, q = {
20
- masterSelection: void 0,
21
- onChangeMasterSelection: x
22
- }, G = P(q);
23
- function J(i) {
24
- const {
25
- children: o
26
- } = i, [e, t] = v(void 0);
27
- return /* @__PURE__ */ r(G.Provider, {
28
- value: {
29
- masterSelection: e,
30
- onChangeMasterSelection: t
31
- },
32
- children: o
33
- });
34
- }
35
- function K(i) {
36
- const {
37
- masterSelection: o
38
- } = T(), {
39
- onClick: e,
40
- description: t
41
- } = i;
42
- return /* @__PURE__ */ r(H, {
43
- onClick: e,
44
- variant: "outlined",
45
- disabled: o === void 0,
46
- children: t
47
- }, "miDetail");
48
- }
49
- function O(i, o, e, t) {
50
- let n = t !== void 0 && t ? [...i] : [e];
51
- return n = o.concat(n), n;
52
- }
53
- function nt(i) {
54
- const {
55
- moduleId: o,
56
- moduleNameField: e,
57
- masterComponent: t,
58
- detailComponent: n,
59
- moduleActions: y,
60
- urlIcon: M,
61
- currentLang: S,
62
- componentsDictionary: f,
63
- breadcrumbLinks: b,
64
- privileges: k,
65
- skeletonFlags: A
66
- } = i, {
67
- host_static_assets: c,
68
- environment_assets: a
69
- } = R(), [w, L] = v("vertical"), d = E(), _ = z(null), u = (m) => {
70
- const s = [...g];
71
- for (let l = 0; l < s.length; l++)
72
- s[l].disabled = !1, s[l].tag === m && (s[l].disabled = !0);
73
- $(s), L(m);
74
- }, g = [{
75
- urlIcon: `${c}/${a}/frontend/components/masterdetaillayout/assets/icons/split_vertical.svg`,
76
- onClick: () => u("vertical"),
77
- disabled: !0,
78
- visibility: "main",
79
- dictionaryField: "master_detail_layout.split_vertical",
80
- tag: "vertical",
81
- className: "splitactions"
82
- }, {
83
- urlIcon: `${c}/${a}/frontend/components/masterdetaillayout/assets/icons/split_horizontal.svg`,
84
- onClick: () => u("horizontal"),
85
- disabled: !1,
86
- visibility: "main",
87
- dictionaryField: "master_detail_layout.split_horizontal",
88
- tag: "horizontal",
89
- className: "splitactions"
90
- }, {
91
- urlIcon: `${c}/${a}/frontend/components/masterdetaillayout/assets/icons/no_split.svg`,
92
- onClick: () => u("none"),
93
- disabled: !1,
94
- visibility: "main",
95
- dictionaryField: "master_detail_layout.no_split",
96
- tag: "none",
97
- className: "splitactions"
98
- }], C = N(() => {
99
- _.current?.openModal({
100
- title: "master_detail_layout.view_detail",
101
- initialWidth: 500,
102
- initialHeigth: 680,
103
- contentComponent: n,
104
- actions: void 0
105
- });
106
- }, [n]), h = p(() => ({
107
- urlIcon: `${c}/${a}/frontend/components/masterdetaillayout/assets/icons/view_detail.svg`,
108
- onClick: C,
109
- disabled: !1,
110
- visibility: "allways",
111
- dictionaryField: "master_detail_layout.view_detail",
112
- tag: "none",
113
- className: "",
114
- component: K
115
- }), [a, C]), [D, $] = v(g), F = p(() => O(D, y, h, d), [D, y, d, h]), I = p(() => f.concat(W()), [f]);
116
- return /* @__PURE__ */ r(J, {
117
- children: /* @__PURE__ */ r(j, {
118
- ref: _,
119
- moduleId: o,
120
- moduleNameField: e,
121
- urlIcon: M,
122
- moduleActions: F,
123
- privileges: k,
124
- skeletonFlags: A,
125
- currentLang: S,
126
- componentsDictionary: I,
127
- breadcrumbLinks: b,
128
- children: /* @__PURE__ */ r(B, {
129
- splitPosition: d ? w : "none",
130
- firstPart: t,
131
- secondPart: n
132
- })
133
- })
134
- });
135
- }
136
- export {
137
- G as M,
138
- nt as a,
139
- et as d,
140
- W as g
141
- };
@@ -1,348 +0,0 @@
1
- import { Icon as T, Breadcrumbs as L, BoxIcon as D, MenuActions as N, useModal as R, ModalProvider as $, getModalDialogComponentsDictionary as F } from "@m4l/components";
2
- import { createContext as P, useState as y, useMemo as f, forwardRef as x, useRef as M, useImperativeHandle as b } from "react";
3
- import { styled as s } from "@mui/material/styles";
4
- import { useModuleDictionary as S, useModuleSkeleton as _, FlagsProvider as A, ModuleDictionaryProvider as B, ModuleSkeletonProvider as H, ModulePrivilegesProvider as G } from "@m4l/core";
5
- import { Skeleton as d, Typography as j, IconButton as O } from "@mui/material";
6
- import { useResponsiveDesktop as w } from "@m4l/graphics";
7
- import { jsxs as p, jsx as i, Fragment as W } from "react/jsx-runtime";
8
- import { u as z } from "../../hooks/useModule/index.096d7d13.js";
9
- const q = 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
- })), K = 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
- })), E = 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
- })), J = 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
- })), Q = 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
- })), U = 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
- })), V = 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
- })), X = s("div")(({
97
- theme: e
98
- }) => ({
99
- display: "grid",
100
- alignItems: "center",
101
- gridTemplateColumns: "repeat(3, auto)",
102
- gridGap: e.spacing(2)
103
- })), Y = 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 Z() {
117
- const e = w();
118
- return /* @__PURE__ */ p(J, {
119
- id: "HeaderSkeleton",
120
- children: [/* @__PURE__ */ p(Q, {
121
- children: [/* @__PURE__ */ p(U, {
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(V, {}), /* @__PURE__ */ p(X, {
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(Y, {
147
- children: e ? /* @__PURE__ */ p(W, {
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 ee = P(null);
170
- function ie(e) {
171
- const {
172
- children: n,
173
- initialModuleActions: t,
174
- moduleId: o,
175
- moduleNameField: a,
176
- urlIcon: c,
177
- breadcrumbLinks: g
178
- } = e, [l] = y(() => ({
179
- moduleId: o,
180
- urlIcon: c,
181
- moduleNameField: a,
182
- dictionary: void 0,
183
- breadcrumbLinks: g
184
- })), [u, r] = y([]), m = f(() => t.concat(u), [t, u]);
185
- return /* @__PURE__ */ i(ee.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 te(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 oe(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 ne() {
207
- const {
208
- moduleActions: e,
209
- moduleNameField: n,
210
- breadcrumbLinks: t,
211
- urlIcon: o
212
- } = z(), {
213
- getLabel: a
214
- } = S(), c = w(), g = _(), l = f(
215
- () => te(c, e),
216
- [e, c]
217
- ), u = f(() => oe(c, e), [e, c]);
218
- return g ? /* @__PURE__ */ i(Z, {}) : /* @__PURE__ */ p(E, {
219
- id: "Header",
220
- children: [/* @__PURE__ */ i(T, {
221
- src: o,
222
- bgColor: "primary.main",
223
- size: "24px"
224
- }), /* @__PURE__ */ i(j, {
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(L, {
237
- links: t
238
- }), u.map((r, m) => {
239
- const h = a(r.dictionaryField);
240
- return r.component ? /* @__PURE__ */ i(r.component, {
241
- description: h,
242
- onClick: r.onClick
243
- }, `main_action_${m}`) : /* @__PURE__ */ i(O, {
244
- className: r.className,
245
- onClick: r.onClick,
246
- "aria-label": `${h}`,
247
- disabled: r.disabled,
248
- children: /* @__PURE__ */ i(D, {
249
- src: r.urlIcon,
250
- sx: {
251
- width: 18,
252
- height: 18
253
- }
254
- })
255
- }, `main_action_${m}`);
256
- }), l.length > 0 && /* @__PURE__ */ i(N, {
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 I = x((e, n) => {
272
- const {
273
- children: t
274
- } = e, {
275
- openModal: o
276
- } = R(), a = M(null);
277
- return b(n, () => ({
278
- openModal: o,
279
- current: a.current
280
- })), /* @__PURE__ */ p(q, {
281
- id: "WrapperInnerModule",
282
- className: "m4l_module_layout",
283
- ref: a,
284
- children: [/* @__PURE__ */ i(ne, {}), /* @__PURE__ */ i(K, {
285
- id: "ModuleContent",
286
- children: t
287
- })]
288
- });
289
- });
290
- I.displayName = "InnerModule";
291
- const re = x((e, n) => {
292
- const {
293
- moduleId: t,
294
- moduleNameField: o = "module_name",
295
- moduleActions: a,
296
- urlIcon: c,
297
- children: g,
298
- componentsDictionary: l,
299
- breadcrumbLinks: u,
300
- privileges: r,
301
- currentLang: m,
302
- skeletonFlags: h
303
- } = e, v = M(null), k = (C) => {
304
- v.current?.openModal(C);
305
- };
306
- return b(n, () => ({
307
- openModal: k,
308
- current: v.current
309
- })), /* @__PURE__ */ i(A, {
310
- children: /* @__PURE__ */ i(B, {
311
- moduleId: t,
312
- componentsDictionary: l,
313
- currentLang: m,
314
- children: /* @__PURE__ */ i(H, {
315
- flags: h,
316
- children: /* @__PURE__ */ i(G, {
317
- queryPrivileges: r,
318
- children: /* @__PURE__ */ i(ie, {
319
- moduleId: t,
320
- urlIcon: c,
321
- moduleNameField: o,
322
- initialModuleActions: a,
323
- breadcrumbLinks: u,
324
- children: /* @__PURE__ */ i($, {
325
- children: /* @__PURE__ */ i(I, {
326
- ref: v,
327
- children: g
328
- })
329
- })
330
- })
331
- })
332
- })
333
- })
334
- });
335
- });
336
- re.displayName = "ModuleLayout";
337
- function ge() {
338
- return ["module_layout"].concat(F());
339
- }
340
- const he = {
341
- module_layout: {}
342
- };
343
- export {
344
- ee as M,
345
- re as a,
346
- he as d,
347
- ge as g
348
- };
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function Header(): JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function SKTModuleHeader(): JSX.Element;
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
- export declare const Wrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
4
- export declare const ModuleTitleContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
- export declare const ModuleTitle: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
- export declare const Separator: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
- export declare const Breadcrumbs: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
- export declare const ModuleActions: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,2 +0,0 @@
1
- export interface HeaderProps {
2
- }
@@ -1,29 +0,0 @@
1
- import type { ReactNode } from 'react';
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
- }
11
- export interface ContainerProps {
12
- vertical: boolean;
13
- }
14
- export declare type ModuleLayoutRef = {
15
- openModal: (modalOpenProps: ModalOpenOptions) => void;
16
- current: ModuleRef | null;
17
- };
18
- export interface ModuleLayoutProps extends HeaderProps {
19
- moduleId: string;
20
- urlIcon: string;
21
- currentLang: string;
22
- skeletonFlags: string[];
23
- moduleNameField?: string;
24
- privileges: string[];
25
- breadcrumbLinks: TLink[];
26
- moduleActions: ModuleAction[];
27
- componentsDictionary: string[];
28
- children: ReactNode;
29
- }