@m4l/components 0.1.74 → 0.1.75

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 (111) hide show
  1. package/@types/export.d.ts +46 -1
  2. package/components/AccountPopover/classes/constants.d.ts +1 -1
  3. package/components/AccountPopover/classes/index.d.ts +7 -1
  4. package/components/AccountPopover/classes/types.d.ts +9 -1
  5. package/components/AccountPopover/index.93aefccd.js +265 -0
  6. package/components/AccountPopover/subcomponents/PopOver/types.d.ts +2 -1
  7. package/components/AccountPopover/types.d.ts +13 -0
  8. package/components/AppBar/classes/index.d.ts +3 -1
  9. package/components/AppBar/classes/types.d.ts +4 -0
  10. package/components/AppBar/index.cc974d56.js +85 -0
  11. package/components/AppBar/tests/constants.d.ts +1 -1
  12. package/components/AppBar/types.d.ts +3 -2
  13. package/components/CommonActions/classes/index.d.ts +1 -1
  14. package/components/CommonActions/classes/types.d.ts +3 -2
  15. package/components/CommonActions/components/ActionCancel/{index.fad4a0dc.js → index.574ea031.js} +3 -3
  16. package/components/CommonActions/components/ActionFormCancel/{index.a26820a9.js → index.e62db5d3.js} +20 -20
  17. package/components/CommonActions/components/ActionFormIntro/{index.403d8952.js → index.304da410.js} +4 -4
  18. package/components/CommonActions/components/ActionIntro/{index.0fb6efbe.js → index.d635cbc4.js} +4 -4
  19. package/components/CommonActions/components/Actions/{index.51b9c92a.js → index.37ffde59.js} +35 -25
  20. package/components/CommonActions/tests/constants.d.ts +1 -0
  21. package/components/CommonActions/tests/utils.d.ts +2 -0
  22. package/components/DataGrid/{index.dbae54dd.js → index.c0c626cd.js} +20 -20
  23. package/components/DraggableWindow/index.b95a678e.js +39 -0
  24. package/components/DynamicFilter/{index.cb7fd1b6.js → index.3034c6ba.js} +32 -32
  25. package/components/HelperText/{index.d449d124.js → index.ec9b3e6a.js} +9 -9
  26. package/components/Icon/{index.d214a74d.js → index.f9119f5e.js} +6 -63
  27. package/components/Image/{index.1af119da.js → index.8aae9322.js} +1 -1
  28. package/components/LanguagePopover/classes/index.d.ts +1 -1
  29. package/components/LanguagePopover/{index.4fef99ac.js → index.491e1306.js} +10 -10
  30. package/components/Loadable/{index.117eaced.js → index.e994fc3e.js} +1 -1
  31. package/components/ModalDialog/{index.6c35e653.js → index.f652ea12.js} +6 -6
  32. package/components/NavLink/{index.9e56bcd3.js → index.f8aee9f4.js} +10 -10
  33. package/components/NoItemSelected/{index.cd842b62.js → index.cce86db4.js} +1 -1
  34. package/components/ObjectLogs/{index.e1a1b27c.js → index.c31b3f8b.js} +16 -16
  35. package/components/PaperForm/{index.76bd3a6d.js → index.d79c6f76.js} +1 -1
  36. package/components/Period/{index.b93d22fa.js → index.ff110093.js} +19 -19
  37. package/components/Resizeable/{index.834a9144.js → index.41a8048b.js} +1 -1
  38. package/components/SideBar/classes/index.d.ts +1 -1
  39. package/components/SideBar/{index.ff7cbe91.js → index.1ae13a73.js} +6 -6
  40. package/components/SplitLayout/SplitLayout.d.ts +3 -0
  41. package/components/SplitLayout/classes/constants.d.ts +1 -0
  42. package/components/SplitLayout/classes/index.d.ts +9 -0
  43. package/components/SplitLayout/classes/types.d.ts +10 -0
  44. package/components/SplitLayout/index.9ef430f6.js +99 -0
  45. package/components/SplitLayout/index.d.ts +2 -3
  46. package/components/SplitLayout/styles.d.ts +1 -1
  47. package/components/SplitLayout/tests/constants.d.ts +1 -0
  48. package/components/SplitLayout/tests/utils.d.ts +2 -0
  49. package/components/SplitLayout/types.d.ts +2 -0
  50. package/components/animate/PropagateLoader/{index.be5b02c3.js → index.7fab43c8.js} +1 -1
  51. package/components/animate/index.1f8eadd4.js +66 -0
  52. package/components/areas/components/AreasAdmin/{index.1eda80b9.js → index.158621e0.js} +31 -31
  53. package/components/areas/components/AreasViewer/{index.eddc9945.js → index.621c0de4.js} +50 -44
  54. package/components/areas/components/index.2ed9d60b.js +14 -0
  55. package/components/areas/contexts/AreasContext/{index.a88b73a6.js → index.d98b89fc.js} +2 -2
  56. package/components/areas/contexts/{index.7dd01403.js → index.79d1912d.js} +1 -1
  57. package/components/areas/hooks/useAreas/{index.7a37ede8.js → index.a7b597fb.js} +1 -1
  58. package/components/areas/{index.95c4ed37.js → index.d6b8e205.js} +5 -5
  59. package/components/formatters/BooleanFormatter/{index.820a2130.js → index.60aa1c9d.js} +1 -1
  60. package/components/formatters/{index.0c692a4b.js → index.1f0efb32.js} +2 -2
  61. package/components/hook-form/RHFAutocomplete/{index.72437d8a.js → index.af3296ac.js} +11 -11
  62. package/components/hook-form/RHFAutocompleteAsync/{index.2a84f2b2.js → index.76864056.js} +2 -2
  63. package/components/hook-form/RHFCheckbox/{index.6e6389e7.js → index.865ba239.js} +3 -3
  64. package/components/hook-form/RHFDateTime/classes/index.d.ts +1 -1
  65. package/components/hook-form/RHFDateTime/{index.745b101b.js → index.fd9c5aca.js} +65 -57
  66. package/components/hook-form/RHFDateTime/test/constants.d.ts +1 -0
  67. package/components/hook-form/RHFDateTime/test/utils.d.ts +2 -0
  68. package/components/hook-form/RHFPeriod/{index.6969af99.js → index.77486f61.js} +2 -2
  69. package/components/hook-form/RHFTextField/{index.ca7393a7.js → index.abcbc2d3.js} +6 -6
  70. package/components/hook-form/RHFUpload/{index.d74ca00d.js → index.522bcad5.js} +1 -1
  71. package/components/index.d.ts +1 -1
  72. package/components/modal/{WindowBase.9b93578e.js → WindowBase.c223e4da.js} +11 -11
  73. package/components/modal/{WindowConfirm.7ec9dcd3.js → WindowConfirm.023e293f.js} +16 -16
  74. package/components/modal/index.dbce0cab.js +36 -0
  75. package/components/mui_extended/Accordion/{index.09a89d3d.js → index.03bd0e2a.js} +2 -2
  76. package/components/mui_extended/Avatar/{index.d.ts → Avatar.d.ts} +0 -1
  77. package/components/mui_extended/Avatar/classes/constants.d.ts +1 -0
  78. package/components/mui_extended/Avatar/classes/index.d.ts +7 -0
  79. package/components/mui_extended/Avatar/classes/types.d.ts +7 -0
  80. package/components/mui_extended/Avatar/index.1e1a91a3.js +69 -0
  81. package/components/mui_extended/Avatar/styles.d.ts +2 -0
  82. package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index.d.ts +2 -1
  83. package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/types.d.ts +3 -0
  84. package/components/mui_extended/Avatar/tests/constants.d.ts +1 -0
  85. package/components/mui_extended/Avatar/tests/utils.d.ts +2 -0
  86. package/components/mui_extended/Avatar/types.d.ts +1 -5
  87. package/components/mui_extended/Button/{index.f9d54780.js → index.aebbab34.js} +5 -4
  88. package/components/mui_extended/IconButton/{index.822cdaac.js → index.3b05af71.js} +1 -1
  89. package/components/mui_extended/MenuActions/{index.03403529.js → index.ca5ce35a.js} +2 -2
  90. package/components/mui_extended/Pager/{index.6428b07c.js → index.80ec975a.js} +1 -1
  91. package/components/mui_extended/Typography/{index.e2d9e3f2.js → index.443590d6.js} +1 -1
  92. package/components/mui_extended/index.6dcdbb1f.js +20 -0
  93. package/components/mui_extended/index.d.ts +1 -1
  94. package/contexts/ModalContext/{index.0484ca54.js → index.a0de81f0.js} +1 -1
  95. package/hooks/useModal/{index.c6069beb.js → index.26075cdd.js} +1 -1
  96. package/index.js +207 -203
  97. package/package.json +1 -1
  98. package/{react-draggable.17b4ec8a.js → react-draggable.e625b0d1.js} +1 -1
  99. package/{react-resizable.ffd7c2aa.js → react-resizable.24367d77.js} +2 -2
  100. package/test/constants_no_mock.86c553a9.js +4 -0
  101. package/utils/{index.aca80f3a.js → index.b61dccbe.js} +0 -5
  102. package/components/AccountPopover/subcomponents/PopOver/styles.d.ts +0 -8
  103. package/components/SplitLayout/index.5a8355d8.js +0 -133
  104. package/components/areas/components/index.f3a98b6d.js +0 -14
  105. package/components/modal/index.dba72820.js +0 -36
  106. package/components/mui_extended/Avatar/index.fe06afd7.js +0 -51
  107. package/components/mui_extended/index.b4ced9e3.js +0 -20
  108. package/vendor.99e0c856.js +0 -456
  109. /package/components/{AppBar → AccountPopover}/subcomponents/MyAvatar/createAvatar.d.ts +0 -0
  110. /package/components/{AppBar → AccountPopover}/subcomponents/MyAvatar/index.d.ts +0 -0
  111. /package/{node_modules.416f1da3.js → react-spinners.342a6578.js} +0 -0
@@ -1,456 +0,0 @@
1
- import "./components/Icon/index.d214a74d.js";
2
- import "framer-motion";
3
- import { generateUtilityClasses, generateUtilityClass, styled as styled$1 } from "@mui/material";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import { styled } from "@mui/material/styles";
6
- import "react-router-dom";
7
- import "./components/animate/LoadingScreen/index.1d0c4307.js";
8
- import "./components/animate/PropagateLoader/index.be5b02c3.js";
9
- import "./components/areas/contexts/DynamicMFParmsContext/index.1607c78e.js";
10
- import "./contexts/ModalContext/index.0484ca54.js";
11
- import { useState, useEffect } from "react";
12
- import "react-hook-form";
13
- import "@hookform/resolvers/yup";
14
- import "./contexts/RHFormContext/index.a7511399.js";
15
- import { useModuleDictionary, useNetwork, useEnvironment } from "@m4l/core";
16
- import "./components/hook-form/RHFAutocomplete/index.72437d8a.js";
17
- import "./components/Image/index.1af119da.js";
18
- import { T as Typography } from "./components/mui_extended/Typography/index.e2d9e3f2.js";
19
- import "clsx";
20
- import { I as IconButton } from "./components/mui_extended/IconButton/index.822cdaac.js";
21
- import { useResponsiveDesktop } from "@m4l/graphics";
22
- import "./components/mui_extended/Accordion/index.09a89d3d.js";
23
- import { A as Avatar } from "./components/mui_extended/Avatar/index.fe06afd7.js";
24
- import "@mui/material/Button";
25
- import "./components/mui_extended/Button/index.f9d54780.js";
26
- import "@mui/lab";
27
- import { P as Popover } from "./components/mui_extended/Popover/index.9f35d0eb.js";
28
- import "./components/mui_extended/MenuActions/index.03403529.js";
29
- import "./components/mui_extended/Pager/index.6428b07c.js";
30
- import "./components/mui_extended/Tab/index.e0653a0a.js";
31
- import "./components/HelperText/index.d449d124.js";
32
- import "lodash/debounce";
33
- import "./components/hook-form/RHFAutocompleteAsync/index.2a84f2b2.js";
34
- import "./components/hook-form/RHFCheckbox/index.6e6389e7.js";
35
- import "@mui/x-date-pickers";
36
- import "./components/hook-form/RHFDateTime/index.745b101b.js";
37
- import "./components/hook-form/RHFTextField/index.ca7393a7.js";
38
- import "./components/hook-form/RHFPeriod/index.6969af99.js";
39
- import "./components/Period/index.b93d22fa.js";
40
- import "./components/CommonActions/components/Actions/index.51b9c92a.js";
41
- import { c as cjs } from "./react-draggable.17b4ec8a.js";
42
- import "./components/ModalDialog/index.6c35e653.js";
43
- import "./components/Resizeable/index.834a9144.js";
44
- import "./components/modal/WindowConfirm.7ec9dcd3.js";
45
- import "./components/modal/WindowBase.9b93578e.js";
46
- import "zustand";
47
- import "./components/areas/contexts/AreasContext/index.a88b73a6.js";
48
- import { A as AreasAdmin } from "./components/areas/components/AreasAdmin/index.1eda80b9.js";
49
- import "zustand/shallow";
50
- import "./components/ScrollBar/index.bbe48f4d.js";
51
- import "./components/areas/components/AreasViewer/index.eddc9945.js";
52
- import "./components/areas/contexts/WindowToolsMFContext/index.8f3e2a04.js";
53
- import "lodash/isString";
54
- import "react-dropzone";
55
- import "./components/hook-form/RHFUpload/index.d74ca00d.js";
56
- import "./components/DataGrid/index.dbae54dd.js";
57
- import "react-dnd";
58
- import "react-dnd-html5-backend";
59
- import "./components/DynamicFilter/index.cb7fd1b6.js";
60
- import "yup";
61
- import "./components/LanguagePopover/index.4fef99ac.js";
62
- import "./components/NavLink/index.9e56bcd3.js";
63
- import "./components/NoItemSelected/index.cd842b62.js";
64
- import "./components/ObjectLogs/index.e1a1b27c.js";
65
- import "./react-json-view.57125fcf.js";
66
- import "./components/PaperForm/index.76bd3a6d.js";
67
- import "./components/Page/index.4237c241.js";
68
- import "./components/PropertyValue/index.dfcfe1ba.js";
69
- import "./react-splitter-layout.8b1655c8.js";
70
- import "./components/SplitLayout/index.5a8355d8.js";
71
- import "./components/SideBar/index.ff7cbe91.js";
72
- import "./components/animate/variants/fade.b561c0fc.js";
73
- import "./components/animate/variants/bounce.784aaaaa.js";
74
- import "./components/animate/variants/container.11f82b76.js";
75
- import "./components/animate/variants/transition.bd46b9ce.js";
76
- import "./components/animate/MotionContainer/index.8d9f9d80.js";
77
- import "./components/animate/MotionLazyContainer/index.572dd012.js";
78
- import "./components/areas/hooks/useDynamicMFParameters/index.e52c5392.js";
79
- import "./components/areas/hooks/useWindowToolsMF/index.b7afaf88.js";
80
- import "./components/areas/dictionary.e72db809.js";
81
- import "./components/hook-form/RHFMultiCheckbox/index.2680b3b6.js";
82
- import "./components/hook-form/RHFSelect/index.b6ca8bb2.js";
83
- import "./components/hook-form/RHFRadioGroup/index.b3335e13.js";
84
- import "./components/mui_extended/BoxIcon/index.e638ecc8.js";
85
- import "./components/mui_extended/Breadcrumbs/index.5e37d903.js";
86
- import { C as CircularProgress } from "./components/mui_extended/CircularProgress/index.ad569afd.js";
87
- import "./components/mui_extended/LinearProgress/index.c92b9ba9.js";
88
- import "./components/mui_extended/LinkWithRoute/index.16436ab8.js";
89
- import "./components/formatters/BooleanFormatter/index.820a2130.js";
90
- import "./components/formatters/DateFormatter/index.578a9f53.js";
91
- import "./components/formatters/UncertaintyFormatter/index.08e1b79f.js";
92
- import "./components/formatters/PointsFormatter/index.80a4e414.js";
93
- import "./components/formatters/index.0c692a4b.js";
94
- import "./components/formatters/PriceFormatter/index.83cbe7be.js";
95
- import "./components/DataGrid/formatters/columnUncertaintyFormatter/index.cae2057a.js";
96
- import "./components/DataGrid/formatters/columnPointsFormatter/index.5e645334.js";
97
- import "./components/DataGrid/formatters/columnNestedValueFormatter/index.f68ef4e1.js";
98
- import "./components/DataGrid/formatters/columnPriceFormatter/index.e612fda3.js";
99
- import "./components/CommonActions/components/ActionCancel/index.fad4a0dc.js";
100
- import "./components/CommonActions/components/ActionIntro/index.0fb6efbe.js";
101
- import "./components/CommonActions/components/ActionFormCancel/index.a26820a9.js";
102
- import "./components/CommonActions/components/ActionFormIntro/index.403d8952.js";
103
- import "./components/Loadable/index.117eaced.js";
104
- import "./components/ScrollToTop/index.e06f98f6.js";
105
- import { unstable_composeClasses } from "@mui/base";
106
- import { c as getNameDataTestId } from "./utils/index.aca80f3a.js";
107
- import "./hooks/useFormAddEdit/index.15de3ba8.js";
108
- import "./hooks/useModal/index.c6069beb.js";
109
- import "./assets/Logo/index.228dcb5a.js";
110
- const TEST_PROP_ID = "data-testid";
111
- const DraggableWindow = (props) => {
112
- const {
113
- children,
114
- handle = "m4l_draggable_handle",
115
- cancel = '[class*="MuiDialogContent-root"]',
116
- defaultPosition,
117
- ...others
118
- } = props;
119
- const [position, setPosition] = useState(defaultPosition || {
120
- x: 0,
121
- y: 0
122
- });
123
- const onDrag = (_e, data) => {
124
- const {
125
- x,
126
- y
127
- } = data;
128
- const xPos = x < 0 ? 0 : Math.round(x);
129
- const yPos = y < 0 ? 0 : Math.round(y);
130
- setPosition({
131
- x: xPos,
132
- y: yPos
133
- });
134
- };
135
- return /* @__PURE__ */ jsx(cjs.exports, {
136
- handle,
137
- cancel,
138
- position,
139
- onDrag,
140
- ...others,
141
- children
142
- });
143
- };
144
- const AppBarRoot = styled("header")(({
145
- theme
146
- }) => ({
147
- display: "flex",
148
- justifyContent: "space-between",
149
- alignItems: "center",
150
- height: theme.spacing(6),
151
- boxShadow: "none",
152
- borderBottom: `1px dashed ${theme.palette.divider}`,
153
- padding: theme.spacing(0, 1.25),
154
- [theme.breakpoints.up("sm")]: {
155
- padding: theme.spacing(0, 3),
156
- justifyContent: "flex-end"
157
- }
158
- }));
159
- const componentName$1 = "M4LAppBar";
160
- generateUtilityClasses(componentName$1, [
161
- "root"
162
- ]);
163
- function getAppBarClassesUtilityClass(slot) {
164
- return generateUtilityClass(componentName$1, slot);
165
- }
166
- const useUtilityClasses$1 = () => {
167
- const slots = {
168
- root: ["root"]
169
- };
170
- const composedClasses = unstable_composeClasses(slots, getAppBarClassesUtilityClass, {});
171
- return {
172
- ...composedClasses
173
- };
174
- };
175
- const ICON_PREFIX = "M4LAppBar";
176
- const PRIMARY_NAME = ["A", "N", "H", "L", "Q", "9", "8"];
177
- const INFO_NAME = ["F", "G", "T", "I", "J", "1", "2", "3"];
178
- const SUCCESS_NAME = ["K", "D", "Y", "B", "O", "4", "5"];
179
- const WARNING_NAME = ["P", "E", "R", "S", "C", "U", "6", "7"];
180
- const ERROR_NAME = ["V", "W", "X", "M", "Z"];
181
- function getFirstCharacter(name) {
182
- return name && name.charAt(0).toUpperCase();
183
- }
184
- function getAvatarColor(name) {
185
- if (PRIMARY_NAME.includes(getFirstCharacter(name)))
186
- return "primary";
187
- if (INFO_NAME.includes(getFirstCharacter(name)))
188
- return "info";
189
- if (SUCCESS_NAME.includes(getFirstCharacter(name)))
190
- return "success";
191
- if (WARNING_NAME.includes(getFirstCharacter(name)))
192
- return "warning";
193
- if (ERROR_NAME.includes(getFirstCharacter(name)))
194
- return "error";
195
- return "default";
196
- }
197
- function createAvatar(name) {
198
- return {
199
- name: getFirstCharacter(name),
200
- color: getAvatarColor(name)
201
- };
202
- }
203
- function MyAvatar({
204
- ...other
205
- }) {
206
- return /* @__PURE__ */ jsx(
207
- Avatar,
208
- {
209
- src: "",
210
- alt: "full_name",
211
- color: "default",
212
- ...other,
213
- children: createAvatar("").name
214
- }
215
- );
216
- }
217
- const AcountPopOverRoot = styled$1("div")(() => ({
218
- display: "flex"
219
- }));
220
- const ContainerUserInfo = styled$1("div")(({
221
- theme
222
- }) => ({
223
- margin: theme.spacing(0, 1.5),
224
- padding: theme.spacing(3.75, 0)
225
- }));
226
- const ContainerAppVersion = styled$1("div")(({
227
- theme
228
- }) => ({
229
- margin: theme.spacing(0, 1.5),
230
- paddingBottom: theme.spacing(2.5),
231
- display: "flex",
232
- flexDirection: "column"
233
- }));
234
- const MenuItem = styled$1("div")(({
235
- theme
236
- }) => ({
237
- ...theme.typography.body2,
238
- color: theme.palette.text.primary,
239
- padding: theme.spacing(0.75, 0),
240
- margin: theme.spacing(0, 1.25),
241
- textDecoration: "none"
242
- }));
243
- const LogOut = styled$1("div")(({
244
- theme
245
- }) => ({
246
- ...theme.typography.body2,
247
- cursor: "pointer",
248
- color: theme.palette.text.primary,
249
- padding: theme.spacing(0.75, 1.25)
250
- }));
251
- const ContainerMenuItems = styled$1("div")(({
252
- theme
253
- }) => ({
254
- display: "flex",
255
- flexDirection: "column",
256
- borderBottom: "1px solid",
257
- borderColor: theme.palette.divider,
258
- marginBottom: theme.spacing(1),
259
- paddingBottom: theme.spacing(1)
260
- }));
261
- const ContainerProgress = styled$1("div")(({
262
- theme
263
- }) => ({
264
- padding: theme.spacing(0.75, 0),
265
- margin: theme.spacing(0, 1.25)
266
- }));
267
- styled$1("div")(({
268
- theme
269
- }) => ({
270
- maxWidth: theme.spacing(26),
271
- overflow: "auto"
272
- }));
273
- const MenuPopOver = (props) => {
274
- const {
275
- setOpen,
276
- open,
277
- data,
278
- handleClick: onClick,
279
- version,
280
- handleLogOut,
281
- classes
282
- } = props;
283
- const {
284
- getLabel
285
- } = useModuleDictionary();
286
- const handleClick = (item) => {
287
- onClick(item);
288
- handleClose();
289
- };
290
- const handleClose = () => {
291
- setOpen(null);
292
- };
293
- return /* @__PURE__ */ jsxs(Popover, {
294
- open: Boolean(open),
295
- anchorEl: open,
296
- onClose: handleClose,
297
- arrowType: "top-right",
298
- anchorOrigin: {
299
- vertical: "bottom",
300
- horizontal: "center"
301
- },
302
- transformOrigin: {
303
- vertical: "top",
304
- horizontal: "right"
305
- },
306
- sx: {
307
- ml: "26px",
308
- mt: "10px",
309
- maxWidth: "200px",
310
- width: "200px"
311
- },
312
- children: [/* @__PURE__ */ jsxs(ContainerUserInfo, {
313
- className: classes.containerUserInfo,
314
- children: [/* @__PURE__ */ jsx(Typography, {
315
- variant: "subtitle2",
316
- noWrap: true
317
- }), /* @__PURE__ */ jsx(Typography, {
318
- variant: "body2",
319
- sx: {
320
- color: "text.secondary"
321
- },
322
- noWrap: true
323
- })]
324
- }), /* @__PURE__ */ jsx(ContainerAppVersion, {
325
- children: /* @__PURE__ */ jsx(Typography, {
326
- variant: "subtitle2",
327
- noWrap: true,
328
- children: `${getLabel("version")} ${version}`
329
- })
330
- }), /* @__PURE__ */ jsx(ContainerMenuItems, {
331
- children: data ? data.length !== 0 && data.map((option) => /* @__PURE__ */ jsx(MenuItem, {
332
- onClick: () => handleClick(option),
333
- children: option.title
334
- }, option.title)) : /* @__PURE__ */ jsx(ContainerProgress, {
335
- children: /* @__PURE__ */ jsx(CircularProgress, {
336
- size: "20px"
337
- })
338
- })
339
- }), /* @__PURE__ */ jsx(LogOut, {
340
- onClick: handleLogOut,
341
- children: getLabel("logout")
342
- })]
343
- });
344
- };
345
- const componentName = "M4LAcountPopover";
346
- generateUtilityClasses(componentName, [
347
- "root",
348
- "containerUserInfo"
349
- ]);
350
- function getAccountPopoverClassesUtilityClass(slot) {
351
- return generateUtilityClass(componentName, slot);
352
- }
353
- const useUtilityClasses = () => {
354
- const slots = {
355
- root: ["root"],
356
- containerUserInfo: ["containerUserInfo"]
357
- };
358
- const composedClasses = unstable_composeClasses(slots, getAccountPopoverClassesUtilityClass, {});
359
- return {
360
- ...composedClasses
361
- };
362
- };
363
- const AccountPopover = (props) => {
364
- const {
365
- handleClick,
366
- version,
367
- handleLogOut
368
- } = props;
369
- const [open, setOpen] = useState(null);
370
- const [asyncState, setAsyncState] = useState("unLoad");
371
- const [menuData, setMenuData] = useState([]);
372
- const {
373
- networkOperation
374
- } = useNetwork();
375
- useEffect(() => {
376
- let mounted = true;
377
- if (open && asyncState === "unLoad") {
378
- setAsyncState("loading");
379
- networkOperation({
380
- method: "GET",
381
- endPoint: `menus`,
382
- parms: {
383
- position: 1
384
- }
385
- }).then((response) => {
386
- if (mounted) {
387
- setAsyncState("loaded");
388
- setMenuData(response.data);
389
- }
390
- }).catch((_error) => {
391
- console.error("AccountData network request error - get menus", _error);
392
- });
393
- }
394
- return function cleanUp() {
395
- mounted = false;
396
- };
397
- }, [open]);
398
- const handleOpen = (event) => {
399
- setOpen(event.currentTarget);
400
- };
401
- const classes = useUtilityClasses();
402
- return /* @__PURE__ */ jsxs(AcountPopOverRoot, {
403
- className: classes.root,
404
- children: [/* @__PURE__ */ jsx(MyAvatar, {
405
- sx: {
406
- width: 32,
407
- height: 32
408
- },
409
- onClick: handleOpen
410
- }), /* @__PURE__ */ jsx(MenuPopOver, {
411
- open,
412
- setOpen,
413
- data: menuData,
414
- handleClick,
415
- version,
416
- handleLogOut,
417
- classes
418
- })]
419
- });
420
- };
421
- const AppBar = (props) => {
422
- const {
423
- onToggleVisible,
424
- handleClick,
425
- handleLogOut,
426
- version
427
- } = props;
428
- const isDesktop = useResponsiveDesktop();
429
- const {
430
- host_static_assets,
431
- environment_assets
432
- } = useEnvironment();
433
- const classes = useUtilityClasses$1();
434
- return /* @__PURE__ */ jsxs(AppBarRoot, {
435
- className: classes.root,
436
- ...process.env.NODE_ENV !== "production" ? {
437
- [TEST_PROP_ID]: getNameDataTestId("root")
438
- } : {},
439
- children: [!isDesktop ? /* @__PURE__ */ jsx(IconButton, {
440
- tooltip: "test",
441
- src: `${host_static_assets}/${environment_assets}/frontend/components/settings/assets/icons/options.svg`,
442
- onClick: onToggleVisible
443
- }) : null, /* @__PURE__ */ jsx(AreasAdmin, {}), /* @__PURE__ */ jsx(AccountPopover, {
444
- handleClick,
445
- handleLogOut,
446
- version
447
- })]
448
- });
449
- };
450
- export {
451
- AppBar as A,
452
- DraggableWindow as D,
453
- ICON_PREFIX as I,
454
- TEST_PROP_ID as T,
455
- AccountPopover as a
456
- };