@m4l/components 0.1.81 → 0.1.82
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/@types/export.d.ts +6 -0
- package/components/AccountPopover/AccountPopover.d.ts +21 -0
- package/components/AccountPopover/classes/types.d.ts +1 -1
- package/components/AccountPopover/{index.fea740a5.js → index.0ba26726.js} +68 -72
- package/components/AccountPopover/subcomponents/MyAvatar/index.d.ts +2 -2
- package/components/AccountPopover/subcomponents/MyAvatar/types.d.ts +7 -0
- package/components/AccountPopover/subcomponents/PopOver/index.d.ts +6 -0
- package/components/AccountPopover/subcomponents/PopOver/types.d.ts +5 -4
- package/components/AccountPopover/types.d.ts +3 -4
- package/components/AppBar/{index.6bdee075.js → index.fadcefc6.js} +7 -7
- package/components/CommonActions/components/ActionCancel/{index.6928b5ae.js → index.6cf96d04.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.28d32483.js → index.a0335cbf.js} +15 -15
- package/components/CommonActions/components/ActionFormIntro/{index.f044e93c.js → index.273b1b9f.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.8b1b3afc.js → index.856df8ef.js} +2 -2
- package/components/CommonActions/components/Actions/{index.265d99c8.js → index.5abb6ac4.js} +13 -13
- package/components/DataGrid/classes/index.d.ts +1 -0
- package/components/DataGrid/classes/types.d.ts +1 -0
- package/components/DataGrid/constants.d.ts +1 -0
- package/components/DataGrid/{index.820e0043.js → index.03ad08af.js} +14 -9
- package/components/DataGrid/subcomponents/Actions/{index.43325b59.js → index.db54ec98.js} +23 -20
- package/components/DynamicFilter/constants.d.ts +1 -1
- package/components/DynamicFilter/{index.2b80238b.js → index.9b72180b.js} +28 -28
- package/components/HelperText/{index.2c408d8a.js → index.6c3adb40.js} +7 -7
- package/components/Icon/{index.9fcd1476.js → index.2414ff25.js} +1 -1
- package/components/LanguagePopover/{index.4596bf54.js → index.66e11634.js} +7 -7
- package/components/ModalDialog/{index.62ffad3a.js → index.4dc1c8ed.js} +4 -4
- package/components/NavLink/{index.68392bd4.js → index.5859e048.js} +7 -7
- package/components/ObjectLogs/{index.665e043d.js → index.51de2deb.js} +17 -17
- package/components/PaperForm/{index.ba38a0bd.js → index.f931dc02.js} +1 -1
- package/components/Period/{index.7d44c0e5.js → index.4fd9df2a.js} +14 -14
- package/components/PropertyValue/{index.a66988e1.js → index.1b09f426.js} +1 -1
- package/components/ScrollBar/{index.bbe48f4d.js → index.d4410cb5.js} +5 -0
- package/components/SideBar/{index.2f497e6c.js → index.72564ef2.js} +11 -6
- package/components/animate/AnimatedScroll/animatedScroll.d.ts +3 -0
- package/components/animate/AnimatedScroll/index.d.ts +1 -0
- package/components/animate/AnimatedScroll/types.d.ts +5 -0
- package/components/animate/index.4e9774a6.js +150 -0
- package/components/animate/index.d.ts +1 -0
- package/components/areas/components/AreasAdmin/{index.5562f65f.js → index.f011d49d.js} +60 -49
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/{index.1004b7a0.js → index.51a52736.js} +36 -36
- package/components/areas/components/{index.a441c8b1.js → index.f496660b.js} +11 -11
- package/components/areas/contexts/AreasContext/{index.4bf1eabe.js → index.9820bc7f.js} +2 -2
- package/components/areas/contexts/{index.2938bc5a.js → index.361acb6f.js} +1 -1
- package/components/areas/hooks/useAreas/{index.c77a2416.js → index.b403f383.js} +1 -1
- package/components/areas/{index.09851bae.js → index.eacab372.js} +11 -11
- package/components/formatters/BooleanFormatter/{index.e8de8e4c.js → index.32de0803.js} +1 -1
- package/components/formatters/{index.67aeb049.js → index.d16d2331.js} +2 -2
- package/components/hook-form/RHFAutocomplete/{index.9a9d7c73.js → index.6edb51b1.js} +8 -8
- package/components/hook-form/RHFAutocompleteAsync/{index.172df421.js → index.c2ca5c66.js} +1 -1
- package/components/hook-form/RHFCheckbox/{index.47f0157b.js → index.c6c3933b.js} +8 -8
- package/components/hook-form/RHFDateTime/{index.f46e987f.js → index.3add0fa4.js} +8 -8
- package/components/hook-form/RHFPeriod/{index.2e07ba7b.js → index.72edef4d.js} +2 -2
- package/components/hook-form/RHFTextField/{index.253620eb.js → index.20daa95e.js} +3 -3
- package/components/hook-form/RHFUpload/{index.9f00121f.js → index.cc5adc15.js} +8 -8
- package/components/modal/{WindowBase.37b59511.js → WindowBase.4016485b.js} +9 -9
- package/components/modal/{WindowConfirm.1a8c8c21.js → WindowConfirm.f148e495.js} +16 -16
- package/components/modal/{index.c8e23b8d.js → index.e9fece72.js} +13 -13
- package/components/mui_extended/Accordion/{index.fa658639.js → index.42cef1c7.js} +3 -3
- package/components/mui_extended/Avatar/types.d.ts +3 -1
- package/components/mui_extended/Button/classes/types.d.ts +3 -0
- package/components/mui_extended/Button/{index.4288f9fc.js → index.40af964e.js} +8 -3
- package/components/mui_extended/Button/types.d.ts +2 -1
- package/components/mui_extended/IconButton/{index.12f1a3c3.js → index.a318316e.js} +1 -1
- package/components/mui_extended/MenuActions/{index.43a2e1ae.js → index.f6bfdd40.js} +2 -2
- package/components/mui_extended/Pager/classes/index.d.ts +12 -0
- package/components/mui_extended/Pager/classes/types.d.ts +12 -4
- package/components/mui_extended/Pager/{index.82e89328.js → index.da26e9d4.js} +114 -62
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/index.d.ts +3 -0
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/types.d.ts +12 -0
- package/components/mui_extended/Pager/{components → subcomponents}/PagerActions/types.d.ts +2 -0
- package/components/mui_extended/Tab/{index.f94d233e.js → index.0d5f96e6.js} +1 -1
- package/components/mui_extended/{index.07fcc38f.js → index.f6a356b9.js} +7 -7
- package/contexts/ModalContext/{index.66e060a3.js → index.efc1135a.js} +1 -1
- package/contexts/RHFormContext/{index.fe175bab.js → index.b9266262.js} +1 -1
- package/hooks/useModal/{index.61968b84.js → index.9b0cc3fe.js} +1 -1
- package/index.js +67 -66
- package/package.json +1 -1
- package/{vendor.fefd45a3.js → vendor.88ed58a5.js} +46 -46
- package/components/AccountPopover/subcomponents/MyAvatar/createAvatar.d.ts +0 -4
- package/components/animate/index.1f8eadd4.js +0 -66
- /package/components/mui_extended/Pager/{components → subcomponents}/PagerActions/index.d.ts +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { forwardRef, useRef } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { m } from "framer-motion";
|
|
4
|
+
import { IconButton, Box, styled, alpha } from "@mui/material";
|
|
5
|
+
import "@mui/material/styles";
|
|
6
|
+
import "react-router-dom";
|
|
7
|
+
import "./LoadingScreen/index.1d0c4307.js";
|
|
8
|
+
import "./PropagateLoader/index.7fab43c8.js";
|
|
9
|
+
import SimpleBarReact from "simplebar-react";
|
|
10
|
+
const varSmall = {
|
|
11
|
+
hover: {
|
|
12
|
+
scale: 1.1
|
|
13
|
+
},
|
|
14
|
+
tap: {
|
|
15
|
+
scale: 0.95
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const varMedium = {
|
|
19
|
+
hover: {
|
|
20
|
+
scale: 1.09
|
|
21
|
+
},
|
|
22
|
+
tap: {
|
|
23
|
+
scale: 0.97
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const varLarge = {
|
|
27
|
+
hover: {
|
|
28
|
+
scale: 1.08
|
|
29
|
+
},
|
|
30
|
+
tap: {
|
|
31
|
+
scale: 0.99
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function AnimateWrap({
|
|
35
|
+
size,
|
|
36
|
+
children
|
|
37
|
+
}) {
|
|
38
|
+
const isSmall = size === "small";
|
|
39
|
+
const isLarge = size === "large";
|
|
40
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
41
|
+
component: m.div,
|
|
42
|
+
whileTap: "tap",
|
|
43
|
+
whileHover: "hover",
|
|
44
|
+
variants: isSmall && varSmall || isLarge && varLarge || varMedium,
|
|
45
|
+
sx: {
|
|
46
|
+
display: "inline-flex"
|
|
47
|
+
},
|
|
48
|
+
children
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
const IconButtonAnimate = forwardRef(({
|
|
52
|
+
children,
|
|
53
|
+
size = "medium",
|
|
54
|
+
...other
|
|
55
|
+
}, ref) => /* @__PURE__ */ jsx(AnimateWrap, {
|
|
56
|
+
size,
|
|
57
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
58
|
+
size,
|
|
59
|
+
ref,
|
|
60
|
+
...other,
|
|
61
|
+
children
|
|
62
|
+
})
|
|
63
|
+
}));
|
|
64
|
+
IconButtonAnimate.displayName = "IconButtonAnimate";
|
|
65
|
+
styled(SimpleBarReact)(({ theme }) => ({
|
|
66
|
+
height: "100%",
|
|
67
|
+
"& .simplebar-scrollbar": {
|
|
68
|
+
"&:before": {
|
|
69
|
+
backgroundColor: alpha(theme.palette.grey[600], 0.48)
|
|
70
|
+
},
|
|
71
|
+
"&.simplebar-visible:before": {
|
|
72
|
+
opacity: 1
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"& .simplebar-track.simplebar-vertical": {
|
|
76
|
+
width: 10
|
|
77
|
+
},
|
|
78
|
+
"& .simplebar-track.simplebar-horizontal .simplebar-scrollbar": {
|
|
79
|
+
height: 6
|
|
80
|
+
},
|
|
81
|
+
"& .simplebar-mask": {
|
|
82
|
+
zIndex: "inherit"
|
|
83
|
+
},
|
|
84
|
+
"& .simplebar-content": {
|
|
85
|
+
display: "flex",
|
|
86
|
+
height: "100%"
|
|
87
|
+
}
|
|
88
|
+
}));
|
|
89
|
+
const AnimatedScrollRoot = styled("div")(() => ({
|
|
90
|
+
width: "100%",
|
|
91
|
+
height: "100%",
|
|
92
|
+
overflowX: "auto",
|
|
93
|
+
overflowY: "hidden",
|
|
94
|
+
transition: "scroll-behavior 0.5s",
|
|
95
|
+
scrollbarWidth: "none",
|
|
96
|
+
msOverflowStyle: "none",
|
|
97
|
+
"&::-webkit-scrollbar": {
|
|
98
|
+
width: 0
|
|
99
|
+
}
|
|
100
|
+
}));
|
|
101
|
+
const AnimatedScroll = (props) => {
|
|
102
|
+
const {
|
|
103
|
+
children
|
|
104
|
+
} = props;
|
|
105
|
+
const containerRef = useRef(null);
|
|
106
|
+
const scrollSpeed = 0.1;
|
|
107
|
+
let animationId;
|
|
108
|
+
const handleMouseEnter = () => {
|
|
109
|
+
if (containerRef.current) {
|
|
110
|
+
let scrollStep = function(timestamp) {
|
|
111
|
+
if (!startTime) {
|
|
112
|
+
startTime = timestamp;
|
|
113
|
+
}
|
|
114
|
+
currentTime = timestamp - startTime;
|
|
115
|
+
const scrollAmount = startScrollLeft + distance * (currentTime / duration);
|
|
116
|
+
container.scrollLeft = scrollAmount;
|
|
117
|
+
if (currentTime < duration) {
|
|
118
|
+
animationId = requestAnimationFrame(scrollStep);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const container = containerRef.current;
|
|
122
|
+
const startScrollLeft = container.scrollLeft;
|
|
123
|
+
const endScrollLeft = container.scrollWidth;
|
|
124
|
+
const distance = endScrollLeft - startScrollLeft;
|
|
125
|
+
const duration = distance / scrollSpeed;
|
|
126
|
+
let startTime;
|
|
127
|
+
let currentTime;
|
|
128
|
+
animationId = requestAnimationFrame(scrollStep);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
const handleMouseLeave = () => {
|
|
132
|
+
if (animationId !== void 0) {
|
|
133
|
+
cancelAnimationFrame(animationId);
|
|
134
|
+
}
|
|
135
|
+
if (containerRef.current) {
|
|
136
|
+
containerRef.current.scrollLeft = 0;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
return /* @__PURE__ */ jsx(AnimatedScrollRoot, {
|
|
140
|
+
className: "animated-scroll-container",
|
|
141
|
+
ref: containerRef,
|
|
142
|
+
onMouseEnter: handleMouseEnter,
|
|
143
|
+
onMouseLeave: handleMouseLeave,
|
|
144
|
+
children
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
export {
|
|
148
|
+
AnimatedScroll as A,
|
|
149
|
+
IconButtonAnimate as I
|
|
150
|
+
};
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/index.
|
|
2
|
-
import { u as useAreasStore } from "../../hooks/useAreas/index.
|
|
1
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.a318316e.js";
|
|
2
|
+
import { u as useAreasStore } from "../../hooks/useAreas/index.b403f383.js";
|
|
3
3
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
4
|
import { useState, useRef, useMemo } from "react";
|
|
5
5
|
import * as Yup from "yup";
|
|
6
6
|
import { generateUtilityClasses, useTheme } from "@mui/material";
|
|
7
|
-
import "../../../mui_extended/Accordion/index.
|
|
8
|
-
import { I as Icon } from "../../../Icon/index.
|
|
7
|
+
import "../../../mui_extended/Accordion/index.42cef1c7.js";
|
|
8
|
+
import { I as Icon } from "../../../Icon/index.2414ff25.js";
|
|
9
9
|
import clsx from "clsx";
|
|
10
10
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
11
11
|
import { T as Typography } from "../../../mui_extended/Typography/index.443590d6.js";
|
|
12
12
|
import "../../../mui_extended/Avatar/index.75e6ed57.js";
|
|
13
13
|
import "react-router-dom";
|
|
14
14
|
import "@mui/material/Button";
|
|
15
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
15
|
+
import { B as Button } from "../../../mui_extended/Button/index.40af964e.js";
|
|
16
16
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
17
17
|
import "../../../mui_extended/CheckBox.5f6c78b0.js";
|
|
18
18
|
import "../../../mui_extended/Badge/index.cad260fe.js";
|
|
19
19
|
import "../../../Image/index.c18ebf5a.js";
|
|
20
20
|
import "@mui/lab";
|
|
21
|
-
import { M as MenuActions } from "../../../mui_extended/MenuActions/index.
|
|
21
|
+
import { M as MenuActions } from "../../../mui_extended/MenuActions/index.f6bfdd40.js";
|
|
22
22
|
import { P as Popover } from "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
23
|
-
import "../../../mui_extended/Pager/index.
|
|
24
|
-
import "../../../mui_extended/Tab/index.
|
|
23
|
+
import "../../../mui_extended/Pager/index.da26e9d4.js";
|
|
24
|
+
import "../../../mui_extended/Tab/index.0d5f96e6.js";
|
|
25
25
|
import "../../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
26
26
|
import { unstable_composeClasses } from "@mui/base";
|
|
27
27
|
import { g as getComponentUtilityClass } from "../../../../utils/index.c43a95f4.js";
|
|
28
28
|
import { A as AREAS_ADMIN_CLASS_NAME } from "../../constants.66529246.js";
|
|
29
29
|
import { I as ICONS } from "../../icons.8266ccc8.js";
|
|
30
30
|
import "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
31
|
-
import "../../../../contexts/ModalContext/index.
|
|
32
|
-
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.
|
|
31
|
+
import "../../../../contexts/ModalContext/index.efc1135a.js";
|
|
32
|
+
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.b9266262.js";
|
|
33
33
|
import "react-hook-form";
|
|
34
|
-
import "../../../hook-form/RHFAutocomplete/index.
|
|
35
|
-
import "../../../HelperText/index.
|
|
34
|
+
import "../../../hook-form/RHFAutocomplete/index.6edb51b1.js";
|
|
35
|
+
import "../../../HelperText/index.6c3adb40.js";
|
|
36
36
|
import "lodash/debounce";
|
|
37
|
-
import "../../../hook-form/RHFAutocompleteAsync/index.
|
|
38
|
-
import "../../../hook-form/RHFCheckbox/index.
|
|
37
|
+
import "../../../hook-form/RHFAutocompleteAsync/index.c2ca5c66.js";
|
|
38
|
+
import "../../../hook-form/RHFCheckbox/index.c6c3933b.js";
|
|
39
39
|
import "@mui/x-date-pickers";
|
|
40
|
-
import "../../../hook-form/RHFDateTime/index.
|
|
41
|
-
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.
|
|
42
|
-
import "../../../hook-form/RHFPeriod/index.
|
|
43
|
-
import "../../../Period/index.
|
|
44
|
-
import { A as Actions } from "../../../CommonActions/components/Actions/index.
|
|
45
|
-
import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.
|
|
46
|
-
import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.
|
|
40
|
+
import "../../../hook-form/RHFDateTime/index.3add0fa4.js";
|
|
41
|
+
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.20daa95e.js";
|
|
42
|
+
import "../../../hook-form/RHFPeriod/index.72edef4d.js";
|
|
43
|
+
import "../../../Period/index.4fd9df2a.js";
|
|
44
|
+
import { A as Actions } from "../../../CommonActions/components/Actions/index.5abb6ac4.js";
|
|
45
|
+
import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.6cf96d04.js";
|
|
46
|
+
import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.856df8ef.js";
|
|
47
47
|
import "../../../../react-draggable.7abb5d0a.js";
|
|
48
48
|
import "../../../Resizeable/index.9a9c79a4.js";
|
|
49
|
-
import "../../../modal/index.
|
|
49
|
+
import "../../../modal/index.e9fece72.js";
|
|
50
50
|
import { shallow } from "zustand/shallow";
|
|
51
51
|
import { styled } from "@mui/material/styles";
|
|
52
|
-
import { S as ScrollBar } from "../../../ScrollBar/index.
|
|
52
|
+
import { S as ScrollBar } from "../../../ScrollBar/index.d4410cb5.js";
|
|
53
53
|
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
|
|
54
|
-
import "../AreasViewer/index.
|
|
54
|
+
import "../AreasViewer/index.51a52736.js";
|
|
55
55
|
import "../../../LinearProgressIndeterminate/index.60dabc06.js";
|
|
56
|
-
import "../../contexts/AreasContext/index.
|
|
56
|
+
import "../../contexts/AreasContext/index.9820bc7f.js";
|
|
57
57
|
import "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
58
58
|
import "zustand";
|
|
59
59
|
import "lodash/isString";
|
|
60
60
|
import "react-dropzone";
|
|
61
|
-
import "../../../hook-form/RHFUpload/index.
|
|
61
|
+
import "../../../hook-form/RHFUpload/index.cc5adc15.js";
|
|
62
62
|
const areasAdminClasses = generateUtilityClasses(AREAS_ADMIN_CLASS_NAME, [
|
|
63
63
|
"root",
|
|
64
64
|
"areaChipRoot",
|
|
@@ -139,6 +139,7 @@ const ChipActionsMobile = (props) => {
|
|
|
139
139
|
const {
|
|
140
140
|
deleteArea
|
|
141
141
|
} = useAreasStore((state) => state.areasActions);
|
|
142
|
+
const listAreas = useAreasStore((state) => state.areas, shallow);
|
|
142
143
|
const {
|
|
143
144
|
host_static_assets,
|
|
144
145
|
environment_assets
|
|
@@ -150,11 +151,14 @@ const ChipActionsMobile = (props) => {
|
|
|
150
151
|
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.EDIT_AREA}`,
|
|
151
152
|
onClick: handlerOpenPopoverEditArea,
|
|
152
153
|
label: getLabel(getAreasDictionary(DICCTIONARY.label_edit_area))
|
|
153
|
-
}, {
|
|
154
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.DELETE_AREA}`,
|
|
155
|
-
onClick: () => deleteArea(areaId),
|
|
156
|
-
label: getLabel(getAreasDictionary(DICCTIONARY.label_delete_area))
|
|
157
154
|
}];
|
|
155
|
+
if (listAreas.length > 1) {
|
|
156
|
+
menuActions.push({
|
|
157
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.DELETE_AREA}`,
|
|
158
|
+
onClick: () => deleteArea(areaId),
|
|
159
|
+
label: getLabel(getAreasDictionary(DICCTIONARY.label_delete_area))
|
|
160
|
+
});
|
|
161
|
+
}
|
|
158
162
|
return /* @__PURE__ */ jsx(MenuActions, {
|
|
159
163
|
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.SHOW_OPTIONS}`,
|
|
160
164
|
arrowType: "no-arrow",
|
|
@@ -186,6 +190,7 @@ const AreaChip = (props) => {
|
|
|
186
190
|
editArea
|
|
187
191
|
} = useAreasStore((state) => state.areasActions);
|
|
188
192
|
const areaName = useAreasStore((state) => state.hashAreas[areaId].name, shallow);
|
|
193
|
+
const listAreas = useAreasStore((state) => state.areas, shallow);
|
|
189
194
|
const [open, setOpen] = useState(false);
|
|
190
195
|
const {
|
|
191
196
|
getLabel
|
|
@@ -194,8 +199,11 @@ const AreaChip = (props) => {
|
|
|
194
199
|
const anchorRef = useRef(null);
|
|
195
200
|
const theme = useTheme();
|
|
196
201
|
const onClickDeleteArea = (e) => {
|
|
197
|
-
|
|
198
|
-
|
|
202
|
+
console.log("listAreas", listAreas);
|
|
203
|
+
if (listAreas.length > 1) {
|
|
204
|
+
e.stopPropagation();
|
|
205
|
+
deleteArea(areaId);
|
|
206
|
+
}
|
|
199
207
|
};
|
|
200
208
|
const onSubmit = (data) => {
|
|
201
209
|
editArea(areaId, data.inputEditArea);
|
|
@@ -331,22 +339,24 @@ const PanelWindowPopUp = (props) => {
|
|
|
331
339
|
urlIcon: element.url_icon
|
|
332
340
|
};
|
|
333
341
|
});
|
|
334
|
-
return /* @__PURE__ */ jsx(
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
342
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
343
|
+
children: menuActions.length > 0 ? /* @__PURE__ */ jsx(MenuActions, {
|
|
344
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MODULE}`,
|
|
345
|
+
arrowType: "no-arrow",
|
|
346
|
+
marginTop: "12px!important",
|
|
347
|
+
marginLeft: "14px!important",
|
|
348
|
+
anchorOrigin: {
|
|
349
|
+
vertical: "bottom",
|
|
350
|
+
horizontal: "right"
|
|
351
|
+
},
|
|
352
|
+
transformOrigin: {
|
|
353
|
+
vertical: "top",
|
|
354
|
+
horizontal: "right"
|
|
355
|
+
},
|
|
356
|
+
menuActions,
|
|
357
|
+
className: areasAdminClasses.areasPopoverListWindows,
|
|
358
|
+
menuActionSx: theme.components?.M4LAreasAdminMobilePopoverOptions?.styleOverrides
|
|
359
|
+
}) : null
|
|
350
360
|
});
|
|
351
361
|
};
|
|
352
362
|
const AreaChipMobile = () => {
|
|
@@ -377,6 +387,7 @@ const AreaChipMobile = () => {
|
|
|
377
387
|
label: area.name
|
|
378
388
|
};
|
|
379
389
|
}), [areas, currentAreaId]);
|
|
390
|
+
console.log("menuActions areas", menuActions);
|
|
380
391
|
return /* @__PURE__ */ jsx("div", {
|
|
381
392
|
className: areasAdminClasses.areaChipMobileRoot,
|
|
382
393
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -385,7 +396,7 @@ const AreaChipMobile = () => {
|
|
|
385
396
|
areaId: currentArea.id,
|
|
386
397
|
selected: true,
|
|
387
398
|
disabled: true
|
|
388
|
-
}, currentArea.id) : null, menuActions.length
|
|
399
|
+
}, currentArea.id) : null, menuActions.length >= 0 ? /* @__PURE__ */ jsxs("div", {
|
|
389
400
|
className: areasAdminClasses.areaChipMobileIconContainer,
|
|
390
401
|
children: [currentArea ? /* @__PURE__ */ jsx(PanelWindowPopUp, {
|
|
391
402
|
currentAreaId: currentArea.id
|
|
@@ -13,26 +13,26 @@ import { a as AREAS_VIEWER_CLASS_NAME } from "../../constants.66529246.js";
|
|
|
13
13
|
import { shallow } from "zustand/shallow";
|
|
14
14
|
import React__default, { useMemo, useState, useCallback, useEffect } from "react";
|
|
15
15
|
import clsx from "clsx";
|
|
16
|
-
import { u as useAreasStore } from "../../hooks/useAreas/index.
|
|
16
|
+
import { u as useAreasStore } from "../../hooks/useAreas/index.b403f383.js";
|
|
17
17
|
import { useModuleDictionary, useEnvironment, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
|
|
18
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/index.
|
|
19
|
-
import "../../../mui_extended/Accordion/index.
|
|
20
|
-
import { I as Icon } from "../../../Icon/index.
|
|
18
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.a318316e.js";
|
|
19
|
+
import "../../../mui_extended/Accordion/index.42cef1c7.js";
|
|
20
|
+
import { I as Icon } from "../../../Icon/index.2414ff25.js";
|
|
21
21
|
import { T as Typography } from "../../../mui_extended/Typography/index.443590d6.js";
|
|
22
22
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
23
23
|
import "../../../mui_extended/Avatar/index.75e6ed57.js";
|
|
24
24
|
import "react-router-dom";
|
|
25
25
|
import "@mui/material/Button";
|
|
26
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
26
|
+
import { B as Button } from "../../../mui_extended/Button/index.40af964e.js";
|
|
27
27
|
import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/graphics";
|
|
28
28
|
import "../../../mui_extended/CheckBox.5f6c78b0.js";
|
|
29
29
|
import "../../../mui_extended/Badge/index.cad260fe.js";
|
|
30
30
|
import "../../../Image/index.c18ebf5a.js";
|
|
31
31
|
import "@mui/lab";
|
|
32
|
-
import { M as MenuActions, a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.
|
|
32
|
+
import { M as MenuActions, a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.f6bfdd40.js";
|
|
33
33
|
import "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
34
|
-
import "../../../mui_extended/Pager/index.
|
|
35
|
-
import "../../../mui_extended/Tab/index.
|
|
34
|
+
import "../../../mui_extended/Pager/index.da26e9d4.js";
|
|
35
|
+
import "../../../mui_extended/Tab/index.0d5f96e6.js";
|
|
36
36
|
import "../../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
37
37
|
import { I as ICONS } from "../../icons.8266ccc8.js";
|
|
38
38
|
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
|
|
@@ -41,58 +41,58 @@ import debounce from "lodash/debounce";
|
|
|
41
41
|
import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
42
42
|
import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
43
43
|
import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
44
|
-
import "../../../../contexts/ModalContext/index.
|
|
45
|
-
import "../../../../contexts/RHFormContext/index.
|
|
44
|
+
import "../../../../contexts/ModalContext/index.efc1135a.js";
|
|
45
|
+
import "../../../../contexts/RHFormContext/index.b9266262.js";
|
|
46
46
|
import "../../../GridLayout/subcomponents/Griditem/index.01fc14c3.js";
|
|
47
47
|
import "../../../GridLayout/index.76bccc4f.js";
|
|
48
48
|
import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.e589d8bf.js";
|
|
49
49
|
import { W as WidthProvider } from "../../../GridLayout/subcomponents/WidthProvider/index.50dafd87.js";
|
|
50
|
-
import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.
|
|
51
|
-
import "../../../animate/index.
|
|
50
|
+
import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.9820bc7f.js";
|
|
51
|
+
import "../../../animate/index.4e9774a6.js";
|
|
52
52
|
import "framer-motion";
|
|
53
53
|
import "../../../animate/LoadingScreen/index.1d0c4307.js";
|
|
54
54
|
import "../../../animate/PropagateLoader/index.7fab43c8.js";
|
|
55
|
-
import "../AreasAdmin/index.
|
|
56
|
-
import "../../../ScrollBar/index.
|
|
55
|
+
import "../AreasAdmin/index.f011d49d.js";
|
|
56
|
+
import "../../../ScrollBar/index.d4410cb5.js";
|
|
57
57
|
import "zustand";
|
|
58
58
|
import "react-hook-form";
|
|
59
|
-
import "../../../hook-form/RHFAutocomplete/index.
|
|
60
|
-
import "../../../HelperText/index.
|
|
61
|
-
import "../../../hook-form/RHFAutocompleteAsync/index.
|
|
62
|
-
import "../../../hook-form/RHFCheckbox/index.
|
|
59
|
+
import "../../../hook-form/RHFAutocomplete/index.6edb51b1.js";
|
|
60
|
+
import "../../../HelperText/index.6c3adb40.js";
|
|
61
|
+
import "../../../hook-form/RHFAutocompleteAsync/index.c2ca5c66.js";
|
|
62
|
+
import "../../../hook-form/RHFCheckbox/index.c6c3933b.js";
|
|
63
63
|
import "@mui/x-date-pickers";
|
|
64
|
-
import "../../../hook-form/RHFDateTime/index.
|
|
65
|
-
import "../../../hook-form/RHFTextField/index.
|
|
66
|
-
import "../../../hook-form/RHFPeriod/index.
|
|
67
|
-
import "../../../Period/index.
|
|
68
|
-
import "../../../CommonActions/components/Actions/index.
|
|
64
|
+
import "../../../hook-form/RHFDateTime/index.3add0fa4.js";
|
|
65
|
+
import "../../../hook-form/RHFTextField/index.20daa95e.js";
|
|
66
|
+
import "../../../hook-form/RHFPeriod/index.72edef4d.js";
|
|
67
|
+
import "../../../Period/index.4fd9df2a.js";
|
|
68
|
+
import "../../../CommonActions/components/Actions/index.5abb6ac4.js";
|
|
69
69
|
import { c as cjs } from "../../../../react-draggable.7abb5d0a.js";
|
|
70
70
|
import { R as ResizeableWindow } from "../../../Resizeable/index.9a9c79a4.js";
|
|
71
|
-
import "../../../modal/index.
|
|
71
|
+
import "../../../modal/index.e9fece72.js";
|
|
72
72
|
import "lodash/isString";
|
|
73
73
|
import "react-dropzone";
|
|
74
|
-
import "../../../hook-form/RHFUpload/index.
|
|
75
|
-
import "../../../DataGrid/index.
|
|
74
|
+
import "../../../hook-form/RHFUpload/index.cc5adc15.js";
|
|
75
|
+
import "../../../DataGrid/index.03ad08af.js";
|
|
76
76
|
import "react-dnd";
|
|
77
77
|
import "react-dnd-html5-backend";
|
|
78
|
-
import "../../../DataGrid/subcomponents/Actions/index.
|
|
78
|
+
import "../../../DataGrid/subcomponents/Actions/index.db54ec98.js";
|
|
79
79
|
import "../../../DataGrid/subcomponents/editors/TextEditor/index.91380a55.js";
|
|
80
|
-
import "../../../DynamicFilter/index.
|
|
80
|
+
import "../../../DynamicFilter/index.9b72180b.js";
|
|
81
81
|
import "yup";
|
|
82
82
|
import "lodash";
|
|
83
|
-
import "../../../LanguagePopover/index.
|
|
84
|
-
import "../../../NavLink/index.
|
|
83
|
+
import "../../../LanguagePopover/index.66e11634.js";
|
|
84
|
+
import "../../../NavLink/index.5859e048.js";
|
|
85
85
|
import "../../../NoItemSelected/index.23dfc897.js";
|
|
86
|
-
import "../../../ObjectLogs/index.
|
|
86
|
+
import "../../../ObjectLogs/index.51de2deb.js";
|
|
87
87
|
import "../../../../react-json-view.57125fcf.js";
|
|
88
|
-
import "../../../PaperForm/index.
|
|
88
|
+
import "../../../PaperForm/index.f931dc02.js";
|
|
89
89
|
import "../../../Page/index.4237c241.js";
|
|
90
|
-
import "../../../PropertyValue/index.
|
|
90
|
+
import "../../../PropertyValue/index.1b09f426.js";
|
|
91
91
|
import "../../../SplitLayout/index.9ef430f6.js";
|
|
92
92
|
import "../../../../react-splitter-layout.8b1655c8.js";
|
|
93
|
-
import "../../../SideBar/index.
|
|
94
|
-
import "../../../AppBar/index.
|
|
95
|
-
import "../../../AccountPopover/index.
|
|
93
|
+
import "../../../SideBar/index.72564ef2.js";
|
|
94
|
+
import "../../../AppBar/index.fadcefc6.js";
|
|
95
|
+
import "../../../AccountPopover/index.0ba26726.js";
|
|
96
96
|
const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
97
97
|
"root",
|
|
98
98
|
"areaRoot",
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "@m4l/core";
|
|
3
3
|
import "@mui/material";
|
|
4
|
-
import "../../Icon/index.
|
|
4
|
+
import "../../Icon/index.2414ff25.js";
|
|
5
5
|
import "clsx";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
|
-
import "../../mui_extended/IconButton/index.
|
|
7
|
+
import "../../mui_extended/IconButton/index.a318316e.js";
|
|
8
8
|
import "@m4l/graphics";
|
|
9
9
|
import "zustand";
|
|
10
|
-
import "../contexts/AreasContext/index.
|
|
11
|
-
import "./AreasAdmin/index.
|
|
10
|
+
import "../contexts/AreasContext/index.9820bc7f.js";
|
|
11
|
+
import "./AreasAdmin/index.f011d49d.js";
|
|
12
12
|
import "zustand/shallow";
|
|
13
|
-
import "../../ScrollBar/index.
|
|
14
|
-
import "../../mui_extended/Accordion/index.
|
|
13
|
+
import "../../ScrollBar/index.d4410cb5.js";
|
|
14
|
+
import "../../mui_extended/Accordion/index.42cef1c7.js";
|
|
15
15
|
import "../../mui_extended/Typography/index.443590d6.js";
|
|
16
16
|
import "../../mui_extended/Avatar/index.75e6ed57.js";
|
|
17
17
|
import "react-router-dom";
|
|
18
18
|
import "@mui/material/Button";
|
|
19
|
-
import "../../mui_extended/Button/index.
|
|
19
|
+
import "../../mui_extended/Button/index.40af964e.js";
|
|
20
20
|
import "../../mui_extended/CheckBox.5f6c78b0.js";
|
|
21
21
|
import "../../mui_extended/Badge/index.cad260fe.js";
|
|
22
22
|
import "../../Image/index.c18ebf5a.js";
|
|
23
23
|
import "@mui/lab";
|
|
24
|
-
import "../../mui_extended/MenuActions/index.
|
|
24
|
+
import "../../mui_extended/MenuActions/index.f6bfdd40.js";
|
|
25
25
|
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
26
|
-
import "../../mui_extended/Pager/index.
|
|
27
|
-
import "../../mui_extended/Tab/index.
|
|
26
|
+
import "../../mui_extended/Pager/index.da26e9d4.js";
|
|
27
|
+
import "../../mui_extended/Tab/index.0d5f96e6.js";
|
|
28
28
|
import "../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
29
|
-
import "./AreasViewer/index.
|
|
29
|
+
import "./AreasViewer/index.51a52736.js";
|
|
30
30
|
import "../../LinearProgressIndeterminate/index.60dabc06.js";
|
|
@@ -5,8 +5,8 @@ import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
|
5
5
|
import { useHostTools, useModuleDictionary, useNetwork, useModuleSkeleton, EmitEvents } from "@m4l/core";
|
|
6
6
|
import { devtools } from "zustand/middleware";
|
|
7
7
|
import { immer } from "zustand/middleware/immer";
|
|
8
|
-
import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.
|
|
9
|
-
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.
|
|
8
|
+
import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.51a52736.js";
|
|
9
|
+
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.f011d49d.js";
|
|
10
10
|
import { c as createDynamicMFStore } from "../DynamicMFParmsContext/index.1607c78e.js";
|
|
11
11
|
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
|
|
12
12
|
import "clsx";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./AreasContext/index.
|
|
1
|
+
import "./AreasContext/index.9820bc7f.js";
|
|
2
2
|
import "./WindowToolsMFContext/index.8f3e2a04.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
2
|
import { useStore } from "zustand";
|
|
3
|
-
import { A as AreasContext } from "../../contexts/AreasContext/index.
|
|
3
|
+
import { A as AreasContext } from "../../contexts/AreasContext/index.9820bc7f.js";
|
|
4
4
|
function useAreasStore(selector, equalityFn) {
|
|
5
5
|
const context = useContext(AreasContext);
|
|
6
6
|
if (!context)
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "@m4l/core";
|
|
3
3
|
import "@mui/material";
|
|
4
|
-
import "../Icon/index.
|
|
4
|
+
import "../Icon/index.2414ff25.js";
|
|
5
5
|
import "clsx";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
|
-
import "../mui_extended/IconButton/index.
|
|
7
|
+
import "../mui_extended/IconButton/index.a318316e.js";
|
|
8
8
|
import "@m4l/graphics";
|
|
9
9
|
import "zustand";
|
|
10
|
-
import "./contexts/AreasContext/index.
|
|
11
|
-
import "./components/AreasAdmin/index.
|
|
10
|
+
import "./contexts/AreasContext/index.9820bc7f.js";
|
|
11
|
+
import "./components/AreasAdmin/index.f011d49d.js";
|
|
12
12
|
import "zustand/shallow";
|
|
13
|
-
import "../ScrollBar/index.
|
|
14
|
-
import "../mui_extended/Accordion/index.
|
|
13
|
+
import "../ScrollBar/index.d4410cb5.js";
|
|
14
|
+
import "../mui_extended/Accordion/index.42cef1c7.js";
|
|
15
15
|
import "../mui_extended/Typography/index.443590d6.js";
|
|
16
16
|
import "../mui_extended/Avatar/index.75e6ed57.js";
|
|
17
17
|
import "react-router-dom";
|
|
18
18
|
import "@mui/material/Button";
|
|
19
|
-
import "../mui_extended/Button/index.
|
|
19
|
+
import "../mui_extended/Button/index.40af964e.js";
|
|
20
20
|
import "../mui_extended/CheckBox.5f6c78b0.js";
|
|
21
21
|
import "../mui_extended/Badge/index.cad260fe.js";
|
|
22
22
|
import "../Image/index.c18ebf5a.js";
|
|
23
23
|
import "@mui/lab";
|
|
24
|
-
import "../mui_extended/MenuActions/index.
|
|
24
|
+
import "../mui_extended/MenuActions/index.f6bfdd40.js";
|
|
25
25
|
import "../mui_extended/Popover/index.9f35d0eb.js";
|
|
26
|
-
import "../mui_extended/Pager/index.
|
|
27
|
-
import "../mui_extended/Tab/index.
|
|
26
|
+
import "../mui_extended/Pager/index.da26e9d4.js";
|
|
27
|
+
import "../mui_extended/Tab/index.0d5f96e6.js";
|
|
28
28
|
import "../mui_extended/Tooltip/index.5a795dcd.js";
|
|
29
|
-
import "./components/AreasViewer/index.
|
|
29
|
+
import "./components/AreasViewer/index.51a52736.js";
|
|
30
30
|
import "../LinearProgressIndeterminate/index.60dabc06.js";
|
|
31
31
|
import "./contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
32
32
|
import "./contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
3
|
-
import { I as Icon } from "../../Icon/index.
|
|
3
|
+
import { I as Icon } from "../../Icon/index.2414ff25.js";
|
|
4
4
|
import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
const BOOLEAN_FORMATTER_DICTIONARY_KEY = `boolean_formatter`;
|
|
@@ -2,11 +2,11 @@ import { W as WrapperComponent } from "../WrapperComponent/index.5e872594.js";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useModuleDictionary } from "@m4l/core";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../Icon/index.
|
|
5
|
+
import "../Icon/index.2414ff25.js";
|
|
6
6
|
import "@mui/material";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "@m4l/graphics";
|
|
9
|
-
import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY, b as BOOLEAN_FORMATTER_DICTIONARY_LABELS } from "./BooleanFormatter/index.
|
|
9
|
+
import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY, b as BOOLEAN_FORMATTER_DICTIONARY_LABELS } from "./BooleanFormatter/index.32de0803.js";
|
|
10
10
|
function getFormatConcatenated(values, separator) {
|
|
11
11
|
const returnSymbol = "";
|
|
12
12
|
if (values === null)
|