@m4l/components 0.1.83 → 0.1.85
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 +25 -4
- package/components/AccountPopover/classes/index.d.ts +4 -0
- package/components/AccountPopover/classes/types.d.ts +4 -0
- package/components/AccountPopover/dictionary.d.ts +1 -0
- package/components/AccountPopover/{index.2677fe77.js → index.35c29a55.js} +86 -36
- package/components/AccountPopover/index.d.ts +1 -0
- package/components/AccountPopover/types.d.ts +2 -0
- package/components/AppBar/dictionary.d.ts +1 -0
- package/components/AppBar/{index.ad2a6f0e.js → index.291da9fd.js} +19 -11
- package/components/AppBar/index.d.ts +1 -0
- package/components/CommonActions/components/ActionCancel/{index.b2fc495d.js → index.67b91376.js} +1 -1
- package/components/CommonActions/components/ActionFormCancel/{index.60d8963e.js → index.d4503410.js} +17 -16
- package/components/CommonActions/components/ActionFormIntro/{index.fde4ea51.js → index.01ed67de.js} +1 -1
- package/components/CommonActions/components/ActionIntro/{index.724d8e17.js → index.53e7fe2b.js} +1 -1
- package/components/CommonActions/components/Actions/{index.23a2d6ae.js → index.c91c27f9.js} +15 -14
- package/components/DataGrid/{index.d5d0d62f.js → index.37e14e83.js} +14 -12
- package/components/DataGrid/subcomponents/Actions/{index.201394f5.js → index.155c63af.js} +47 -31
- package/components/DynamicFilter/{index.7d134537.js → index.a8c2609c.js} +29 -28
- package/components/GridLayout/constants.d.ts +1 -1
- package/components/GridLayout/{index.70085b00.js → index.2383aaf9.js} +86 -23
- package/components/GridLayout/index.d.ts +1 -1
- package/components/GridLayout/subcomponents/Griditem/{index.c09681ff.js → index.58168132.js} +1 -6
- package/components/GridLayout/subcomponents/Responsive/{index.eb04fd5e.js → index.a6642437.js} +1 -2
- package/components/GridLayout/types.d.ts +2 -2
- package/components/HelperText/{index.28e9105d.js → index.8b5911d1.js} +9 -8
- package/components/Icon/{index.2414ff25.js → index.c3a579e7.js} +1 -1
- package/components/LanguagePopover/{index.065e0296.js → index.7681b08e.js} +9 -8
- package/components/ModalDialog/{index.fb148f76.js → index.b85ee3cb.js} +4 -6
- package/components/NavLink/{index.2ef07c44.js → index.bb879650.js} +9 -8
- package/components/NoItemSelected/classes/constants.d.ts +1 -0
- package/components/NoItemSelected/classes/index.d.ts +6 -0
- package/components/NoItemSelected/classes/types.d.ts +6 -0
- package/components/NoItemSelected/{index.23dfc897.js → index.a2807715.js} +46 -31
- package/components/NoItemSelected/index.d.ts +2 -1
- package/components/NoItemSelected/types.d.ts +4 -0
- package/components/ObjectLogs/{index.5d74dfe0.js → index.2ed38a84.js} +22 -19
- package/components/PaperForm/{index.f931dc02.js → index.989377a5.js} +1 -1
- package/components/Period/{index.0e6512b2.js → index.061c9b2f.js} +16 -15
- package/components/PropertyValue/{index.a67c9916.js → index.ac46f441.js} +1 -1
- package/components/ScrollBar/{index.d4410cb5.js → index.1247c1c5.js} +38 -9
- package/components/SideBar/classes/index.d.ts +0 -1
- package/components/SideBar/classes/types.d.ts +0 -1
- package/components/SideBar/{index.72564ef2.js → index.e0587639.js} +131 -75
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +5 -0
- package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
- package/components/areas/components/AreasAdmin/classes/types.d.ts +3 -0
- package/components/areas/components/AreasAdmin/index.d.ts +2 -2
- package/components/areas/components/AreasAdmin/index.f505897a.js +767 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/types.d.ts +2 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +2 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +6 -0
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +1 -0
- package/components/areas/components/AreasViewer/{index.9ed7dfd7.js → index.cacec884.js} +77 -52
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/index.d.ts +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index.d.ts +4 -0
- package/components/areas/components/index.6d5dfeec.js +31 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +10 -3
- package/components/areas/contexts/AreasContext/{index.36fe6953.js → index.6f56b1da.js} +103 -80
- package/components/areas/contexts/AreasContext/types.d.ts +28 -8
- package/components/areas/contexts/{index.68c53fc9.js → index.999e8b1e.js} +1 -1
- package/components/areas/hooks/useAreas/{index.a4c03e23.js → index.4baec91c.js} +1 -1
- package/components/areas/index.3088f99e.js +54 -0
- package/components/areas/utils/useOnClickOutside/index.d.ts +4 -0
- package/components/formatters/BooleanFormatter/{index.32de0803.js → index.e7f0b76a.js} +1 -1
- package/components/formatters/{index.d16d2331.js → index.d911949d.js} +2 -2
- package/components/hook-form/RHFAutocomplete/{index.42df8eb4.js → index.aca6984f.js} +11 -9
- package/components/hook-form/RHFAutocompleteAsync/{index.0441524c.js → index.8511bcf8.js} +1 -1
- package/components/hook-form/RHFCheckbox/{index.c66147f7.js → index.0f45e6b0.js} +10 -9
- package/components/hook-form/RHFDateTime/{index.4698ca29.js → index.07412ef0.js} +10 -9
- package/components/hook-form/RHFPeriod/{index.f653934b.js → index.15b8f11e.js} +2 -2
- package/components/hook-form/RHFTextField/{index.1fa07688.js → index.94c8c59b.js} +3 -3
- package/components/hook-form/RHFUpload/{index.93c2dcb5.js → index.7ef1e124.js} +10 -9
- package/components/modal/{WindowBase.92ce9b8f.js → WindowBase.d485315d.js} +17 -12
- package/components/modal/{WindowConfirm.4c3d2cd7.js → WindowConfirm.3d9cd6e1.js} +18 -17
- package/components/modal/{index.1bd35bd5.js → index.c7e4beba.js} +15 -14
- package/components/mui_extended/Accordion/{index.5111314b.js → index.854f4c90.js} +3 -3
- package/components/mui_extended/Badge/classes/constants.d.ts +1 -1
- package/components/mui_extended/Badge/{index.cad260fe.js → index.8c2b8b66.js} +1 -1
- package/components/mui_extended/CheckBox/CheckBox.d.ts +1 -1
- package/components/mui_extended/{CheckBox.5f6c78b0.js → CheckBox.38abccd8.js} +5 -3
- package/components/mui_extended/IconButton/{index.a318316e.js → index.be111a34.js} +2 -12
- package/components/mui_extended/MenuActions/{index.f6bfdd40.js → index.b16e84c1.js} +26 -8
- package/components/mui_extended/MenuActions/types.d.ts +3 -0
- package/components/mui_extended/Pager/{index.da26e9d4.js → index.5b77fa4c.js} +84 -82
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/index.d.ts +5 -0
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/types.d.ts +1 -4
- package/components/mui_extended/Stack/Stack.d.ts +3 -0
- package/components/mui_extended/Stack/classes/constants.d.ts +1 -0
- package/components/mui_extended/Stack/classes/index.d.ts +6 -0
- package/components/mui_extended/Stack/classes/types.d.ts +6 -0
- package/components/mui_extended/Stack/index.0e53197c.js +39 -0
- package/components/mui_extended/Stack/index.d.ts +2 -0
- package/components/mui_extended/Stack/types.d.ts +2 -0
- package/components/mui_extended/Tab/{index.0989d15d.js → index.c1dc7bbf.js} +42 -9
- package/components/mui_extended/Tabs/Tabs.d.ts +3 -0
- package/components/mui_extended/Tabs/classes/constants.d.ts +1 -0
- package/components/mui_extended/Tabs/classes/index.d.ts +6 -0
- package/components/mui_extended/Tabs/classes/types.d.ts +6 -0
- package/components/mui_extended/Tabs/index.d.ts +1 -0
- package/components/mui_extended/index.d.ts +2 -0
- package/components/mui_extended/{index.813723c5.js → index.d1ee9a6a.js} +9 -8
- package/contexts/ModalContext/{index.577bf36b.js → index.1ea79d7e.js} +1 -1
- package/contexts/RHFormContext/{index.b9266262.js → index.e019f87d.js} +1 -1
- package/hooks/useModal/{index.7a07c208.js → index.c906706c.js} +1 -1
- package/index.js +81 -75
- package/package.json +1 -1
- package/{vendor.5365cc7e.js → vendor.f27b86c9.js} +51 -51
- package/components/GridLayout/subcomponents/SizeProvider/index.9c5e80b2.js +0 -65
- package/components/areas/components/AreasAdmin/index.7bfec13f.js +0 -487
- package/components/areas/components/index.654b08aa.js +0 -30
- package/components/areas/index.ec4f088c.js +0 -32
- /package/components/GridLayout/subcomponents/{SizeProvider → WidthProvider}/index.d.ts +0 -0
- /package/components/areas/components/AreasAdmin/subcomponents/{AreaChipMobile/subcomponents/PanelWindowPopUp → PanelWindowPopUp}/index.d.ts +0 -0
- /package/components/areas/components/AreasAdmin/subcomponents/{AreaChipMobile/subcomponents/PanelWindowPopUp → PanelWindowPopUp}/types.d.ts +0 -0
|
@@ -1,487 +0,0 @@
|
|
|
1
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/index.a318316e.js";
|
|
2
|
-
import { u as useAreasStore } from "../../hooks/useAreas/index.a4c03e23.js";
|
|
3
|
-
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import { useState, useRef, useMemo } from "react";
|
|
5
|
-
import * as Yup from "yup";
|
|
6
|
-
import { generateUtilityClasses, useTheme } from "@mui/material";
|
|
7
|
-
import "../../../mui_extended/Accordion/index.5111314b.js";
|
|
8
|
-
import { I as Icon } from "../../../Icon/index.2414ff25.js";
|
|
9
|
-
import clsx from "clsx";
|
|
10
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
11
|
-
import { T as Typography } from "../../../mui_extended/Typography/index.443590d6.js";
|
|
12
|
-
import "../../../mui_extended/Avatar/index.75e6ed57.js";
|
|
13
|
-
import "react-router-dom";
|
|
14
|
-
import "@mui/material/Button";
|
|
15
|
-
import { B as Button } from "../../../mui_extended/Button/index.40af964e.js";
|
|
16
|
-
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
17
|
-
import "../../../mui_extended/CheckBox.5f6c78b0.js";
|
|
18
|
-
import "../../../mui_extended/Badge/index.cad260fe.js";
|
|
19
|
-
import "../../../Image/index.c18ebf5a.js";
|
|
20
|
-
import "@mui/lab";
|
|
21
|
-
import { M as MenuActions } from "../../../mui_extended/MenuActions/index.f6bfdd40.js";
|
|
22
|
-
import { P as Popover } from "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
23
|
-
import "../../../mui_extended/Pager/index.da26e9d4.js";
|
|
24
|
-
import "../../../mui_extended/Tab/index.0989d15d.js";
|
|
25
|
-
import "../../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
26
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
27
|
-
import { g as getComponentUtilityClass } from "../../../../utils/index.c43a95f4.js";
|
|
28
|
-
import { A as AREAS_ADMIN_CLASS_NAME } from "../../constants.66529246.js";
|
|
29
|
-
import { I as ICONS } from "../../icons.8266ccc8.js";
|
|
30
|
-
import "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
31
|
-
import "../../../../contexts/ModalContext/index.577bf36b.js";
|
|
32
|
-
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.b9266262.js";
|
|
33
|
-
import "react-hook-form";
|
|
34
|
-
import "../../../hook-form/RHFAutocomplete/index.42df8eb4.js";
|
|
35
|
-
import "../../../HelperText/index.28e9105d.js";
|
|
36
|
-
import "lodash/debounce";
|
|
37
|
-
import "../../../hook-form/RHFAutocompleteAsync/index.0441524c.js";
|
|
38
|
-
import "../../../hook-form/RHFCheckbox/index.c66147f7.js";
|
|
39
|
-
import "@mui/x-date-pickers";
|
|
40
|
-
import "../../../hook-form/RHFDateTime/index.4698ca29.js";
|
|
41
|
-
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.1fa07688.js";
|
|
42
|
-
import "../../../hook-form/RHFPeriod/index.f653934b.js";
|
|
43
|
-
import "../../../Period/index.0e6512b2.js";
|
|
44
|
-
import { A as Actions } from "../../../CommonActions/components/Actions/index.23a2d6ae.js";
|
|
45
|
-
import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.b2fc495d.js";
|
|
46
|
-
import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.724d8e17.js";
|
|
47
|
-
import "../../../../react-draggable.7abb5d0a.js";
|
|
48
|
-
import "../../../Resizeable/index.9a9c79a4.js";
|
|
49
|
-
import "../../../modal/index.1bd35bd5.js";
|
|
50
|
-
import { shallow } from "zustand/shallow";
|
|
51
|
-
import { styled } from "@mui/material/styles";
|
|
52
|
-
import { S as ScrollBar } from "../../../ScrollBar/index.d4410cb5.js";
|
|
53
|
-
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
|
|
54
|
-
import "../AreasViewer/index.9ed7dfd7.js";
|
|
55
|
-
import "../../../LinearProgressIndeterminate/index.60dabc06.js";
|
|
56
|
-
import "../../contexts/AreasContext/index.36fe6953.js";
|
|
57
|
-
import "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
58
|
-
import "zustand";
|
|
59
|
-
import "lodash/isString";
|
|
60
|
-
import "react-dropzone";
|
|
61
|
-
import "../../../hook-form/RHFUpload/index.93c2dcb5.js";
|
|
62
|
-
const areasAdminClasses = generateUtilityClasses(AREAS_ADMIN_CLASS_NAME, [
|
|
63
|
-
"root",
|
|
64
|
-
"areaChipRoot",
|
|
65
|
-
"areaChipTitle",
|
|
66
|
-
"areaChipDeleteButton",
|
|
67
|
-
"areasAddButton",
|
|
68
|
-
"areaContainerChipEditButton",
|
|
69
|
-
"areaContainerChips",
|
|
70
|
-
"areaContainerContentChips",
|
|
71
|
-
"areaContainerChipsIcon",
|
|
72
|
-
"areaEditPopover",
|
|
73
|
-
"areaChipMobileRoot",
|
|
74
|
-
"areaChipMobileIconContainer",
|
|
75
|
-
"areaIconLayer",
|
|
76
|
-
"areaIconLayerContent",
|
|
77
|
-
"areaChipEditButton",
|
|
78
|
-
"areasPopoverMobileOptions",
|
|
79
|
-
"areasPopoverListWindows",
|
|
80
|
-
"selected",
|
|
81
|
-
"isMobile",
|
|
82
|
-
"disabled"
|
|
83
|
-
], AREAS_ADMIN_CLASS_NAME);
|
|
84
|
-
const useAreasAdminUtilityClasses = (ownerState) => {
|
|
85
|
-
const slots = {
|
|
86
|
-
root: ["root", ownerState.status, ownerState.isMobile && "isMobile", ownerState.isSkeleton && "isSkeleton"],
|
|
87
|
-
areaChipRoot: ["areaChipRoot"],
|
|
88
|
-
areaIconLayer: ["areaIconLayer"],
|
|
89
|
-
areaContainerChipsIcon: ["areaContainerChipsIcon"],
|
|
90
|
-
areaContainerChips: ["areaContainerChips"],
|
|
91
|
-
areaContainerContentChips: ["areaContainerContentChips"],
|
|
92
|
-
areaEditPopover: ["areaEditPopover"],
|
|
93
|
-
areaChipMobileRoot: ["areaChipMobileRoot"],
|
|
94
|
-
areaChipMobileIconContainer: ["areaChipMobileIconContainer"],
|
|
95
|
-
areaChipTitle: ["areaChipTitle"],
|
|
96
|
-
areaContainerChipEditButton: ["areaContainerChipEditButton"],
|
|
97
|
-
areaChipDeleteButton: ["areaChipDeleteButton"],
|
|
98
|
-
areaChipEditButton: ["areaChipEditButton"],
|
|
99
|
-
areasAddButton: ["areasAddButton"],
|
|
100
|
-
areasPopoverMobileOptions: ["areasPopoverMobileOptions"],
|
|
101
|
-
areasPopoverListWindows: ["areasPopoverListWindows"]
|
|
102
|
-
};
|
|
103
|
-
return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_ADMIN_CLASS_NAME), {});
|
|
104
|
-
};
|
|
105
|
-
styled("div")(() => ({
|
|
106
|
-
display: "flex",
|
|
107
|
-
flexDirection: "row",
|
|
108
|
-
border: "1px solid gray",
|
|
109
|
-
"&.active": {
|
|
110
|
-
border: "1px solid red"
|
|
111
|
-
}
|
|
112
|
-
}));
|
|
113
|
-
styled("div")(({
|
|
114
|
-
theme
|
|
115
|
-
}) => ({
|
|
116
|
-
height: "100%",
|
|
117
|
-
width: theme.spacing(1),
|
|
118
|
-
backgroundColor: theme.palette.background.default,
|
|
119
|
-
"&.active": {
|
|
120
|
-
backgroundColor: theme.palette.primary.main
|
|
121
|
-
}
|
|
122
|
-
}));
|
|
123
|
-
const EditAreaHeader = styled("div")(({
|
|
124
|
-
theme
|
|
125
|
-
}) => ({
|
|
126
|
-
display: "flex",
|
|
127
|
-
width: "100%",
|
|
128
|
-
height: "25px",
|
|
129
|
-
borderBottom: "1px solid",
|
|
130
|
-
borderColor: theme.palette.state.default,
|
|
131
|
-
justifyContent: "space-between",
|
|
132
|
-
alignItems: "center"
|
|
133
|
-
}));
|
|
134
|
-
const ChipActionsMobile = (props) => {
|
|
135
|
-
const {
|
|
136
|
-
handlerOpenPopoverEditArea,
|
|
137
|
-
areaId
|
|
138
|
-
} = props;
|
|
139
|
-
const {
|
|
140
|
-
deleteArea
|
|
141
|
-
} = useAreasStore((state) => state.areasActions);
|
|
142
|
-
const listAreas = useAreasStore((state) => state.areas, shallow);
|
|
143
|
-
const {
|
|
144
|
-
host_static_assets,
|
|
145
|
-
environment_assets
|
|
146
|
-
} = useEnvironment();
|
|
147
|
-
const {
|
|
148
|
-
getLabel
|
|
149
|
-
} = useModuleDictionary();
|
|
150
|
-
const menuActions = [{
|
|
151
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.EDIT_AREA}`,
|
|
152
|
-
onClick: handlerOpenPopoverEditArea,
|
|
153
|
-
label: getLabel(getAreasDictionary(DICCTIONARY.label_edit_area))
|
|
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
|
-
}
|
|
162
|
-
return /* @__PURE__ */ jsx(MenuActions, {
|
|
163
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.SHOW_OPTIONS}`,
|
|
164
|
-
arrowType: "no-arrow",
|
|
165
|
-
marginTop: "12px",
|
|
166
|
-
anchorOrigin: {
|
|
167
|
-
vertical: "bottom",
|
|
168
|
-
horizontal: "right"
|
|
169
|
-
},
|
|
170
|
-
transformOrigin: {
|
|
171
|
-
vertical: "top",
|
|
172
|
-
horizontal: "right"
|
|
173
|
-
},
|
|
174
|
-
menuActions
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
const AreaChip = (props) => {
|
|
178
|
-
const {
|
|
179
|
-
areaId,
|
|
180
|
-
selected,
|
|
181
|
-
disabled
|
|
182
|
-
} = props;
|
|
183
|
-
const {
|
|
184
|
-
host_static_assets,
|
|
185
|
-
environment_assets
|
|
186
|
-
} = useEnvironment();
|
|
187
|
-
const {
|
|
188
|
-
deleteArea,
|
|
189
|
-
selectArea,
|
|
190
|
-
editArea
|
|
191
|
-
} = useAreasStore((state) => state.areasActions);
|
|
192
|
-
const areaName = useAreasStore((state) => state.hashAreas[areaId].name, shallow);
|
|
193
|
-
const listAreas = useAreasStore((state) => state.areas, shallow);
|
|
194
|
-
const [open, setOpen] = useState(false);
|
|
195
|
-
const {
|
|
196
|
-
getLabel
|
|
197
|
-
} = useModuleDictionary();
|
|
198
|
-
const isDesktop = useResponsiveDesktop();
|
|
199
|
-
const anchorRef = useRef(null);
|
|
200
|
-
const theme = useTheme();
|
|
201
|
-
const onClickDeleteArea = (e) => {
|
|
202
|
-
console.log("listAreas", listAreas);
|
|
203
|
-
if (listAreas.length > 1) {
|
|
204
|
-
e.stopPropagation();
|
|
205
|
-
deleteArea(areaId);
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
const onSubmit = (data) => {
|
|
209
|
-
editArea(areaId, data.inputEditArea);
|
|
210
|
-
setOpen(false);
|
|
211
|
-
};
|
|
212
|
-
const handlerOpenPopoverEditArea = () => {
|
|
213
|
-
setOpen(true);
|
|
214
|
-
};
|
|
215
|
-
const initialValues = {
|
|
216
|
-
inputEditArea: areaName
|
|
217
|
-
};
|
|
218
|
-
const validationSchema = useMemo(() => Yup.object().shape({
|
|
219
|
-
inputEditArea: Yup.string().required(getLabel(getAreasDictionary(DICCTIONARY.validation_edit_area)))
|
|
220
|
-
}), [getLabel]);
|
|
221
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
222
|
-
role: "presentation",
|
|
223
|
-
className: clsx(areasAdminClasses.areaChipRoot, selected ? areasAdminClasses.selected : null, disabled ? areasAdminClasses.disabled : null),
|
|
224
|
-
onClick: () => {
|
|
225
|
-
selectArea(areaId);
|
|
226
|
-
},
|
|
227
|
-
ref: anchorRef,
|
|
228
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
229
|
-
className: areasAdminClasses.areaChipTitle,
|
|
230
|
-
children: areaName
|
|
231
|
-
}), isDesktop ? /* @__PURE__ */ jsxs("div", {
|
|
232
|
-
className: areasAdminClasses.areaContainerChipEditButton,
|
|
233
|
-
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
234
|
-
className: areasAdminClasses.areaChipEditButton,
|
|
235
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.EDIT_AREA}`,
|
|
236
|
-
size: "extraSmall",
|
|
237
|
-
onClick: handlerOpenPopoverEditArea
|
|
238
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
239
|
-
className: areasAdminClasses.areaChipDeleteButton,
|
|
240
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.DELETE_AREA}`,
|
|
241
|
-
size: "extraSmall",
|
|
242
|
-
onClick: onClickDeleteArea
|
|
243
|
-
})]
|
|
244
|
-
}) : /* @__PURE__ */ jsx(ChipActionsMobile, {
|
|
245
|
-
areaId,
|
|
246
|
-
handlerOpenPopoverEditArea
|
|
247
|
-
}), /* @__PURE__ */ jsx(Popover, {
|
|
248
|
-
arrowType: "top-center",
|
|
249
|
-
open,
|
|
250
|
-
className: areasAdminClasses.areaEditPopover,
|
|
251
|
-
anchorEl: anchorRef.current,
|
|
252
|
-
anchorOrigin: {
|
|
253
|
-
vertical: "bottom",
|
|
254
|
-
horizontal: "center"
|
|
255
|
-
},
|
|
256
|
-
transformOrigin: {
|
|
257
|
-
vertical: "top",
|
|
258
|
-
horizontal: "center"
|
|
259
|
-
},
|
|
260
|
-
onClose: () => setOpen(false),
|
|
261
|
-
sx: {
|
|
262
|
-
mt: "10px",
|
|
263
|
-
...theme.components?.M4LAreasAdminEditPopover?.styleOverrides
|
|
264
|
-
},
|
|
265
|
-
children: /* @__PURE__ */ jsxs(RHFormProvider, {
|
|
266
|
-
onSubmit,
|
|
267
|
-
values: initialValues,
|
|
268
|
-
validationSchema,
|
|
269
|
-
children: [/* @__PURE__ */ jsxs(EditAreaHeader, {
|
|
270
|
-
children: [/* @__PURE__ */ jsx(Typography, {
|
|
271
|
-
children: getLabel(DICCTIONARY.label_edit_area)
|
|
272
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
273
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CLOSE}`,
|
|
274
|
-
size: "small",
|
|
275
|
-
onClick: () => setOpen(false)
|
|
276
|
-
})]
|
|
277
|
-
}), /* @__PURE__ */ jsx(RHFTextField, {
|
|
278
|
-
name: "inputEditArea",
|
|
279
|
-
skeletonWidth: "70%",
|
|
280
|
-
skeletonHeight: "18px",
|
|
281
|
-
sx: {
|
|
282
|
-
mt: "20px"
|
|
283
|
-
}
|
|
284
|
-
}), /* @__PURE__ */ jsxs(Actions, {
|
|
285
|
-
children: [/* @__PURE__ */ jsx(ActionCancel, {
|
|
286
|
-
onClick: () => setOpen(false),
|
|
287
|
-
variant: "outlined",
|
|
288
|
-
skeletonWidth: "100%"
|
|
289
|
-
}), /* @__PURE__ */ jsx(ActionIntro, {
|
|
290
|
-
skeletonWidth: "100%"
|
|
291
|
-
})]
|
|
292
|
-
})]
|
|
293
|
-
})
|
|
294
|
-
})]
|
|
295
|
-
});
|
|
296
|
-
};
|
|
297
|
-
AreaChip.displayName = "AreaButtons";
|
|
298
|
-
const AreasAdminRoot = styled("div")`
|
|
299
|
-
display: flex;
|
|
300
|
-
position: relative;
|
|
301
|
-
|
|
302
|
-
//areaRoot
|
|
303
|
-
& .${areasAdminClasses.areaChipRoot} {
|
|
304
|
-
display: flex;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
${(props) => props.theme.components?.M4LAreasAdmin?.styleOverrides}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
`;
|
|
312
|
-
const PanelWindowPopUp = (props) => {
|
|
313
|
-
const {
|
|
314
|
-
currentAreaId
|
|
315
|
-
} = props;
|
|
316
|
-
const {
|
|
317
|
-
host_static_assets,
|
|
318
|
-
environment_assets
|
|
319
|
-
} = useEnvironment();
|
|
320
|
-
const windowsLayouts = useAreasStore((state) => state.hashAreas[currentAreaId].layoutItemsIds.filter((li) => state.hashWindows[li].emergeType === "layout").map((lim) => {
|
|
321
|
-
const w = state.hashWindows[lim];
|
|
322
|
-
return {
|
|
323
|
-
i: w.windowId,
|
|
324
|
-
url_icon: w.url_icon,
|
|
325
|
-
title: w.title
|
|
326
|
-
};
|
|
327
|
-
}), shallow);
|
|
328
|
-
const theme = useTheme();
|
|
329
|
-
const {
|
|
330
|
-
maximizeLayout
|
|
331
|
-
} = useAreasStore((state) => state.areaActions);
|
|
332
|
-
const onTouched = (layoutId) => {
|
|
333
|
-
maximizeLayout(currentAreaId, layoutId);
|
|
334
|
-
};
|
|
335
|
-
const menuActions = windowsLayouts.map((element) => {
|
|
336
|
-
return {
|
|
337
|
-
onClick: () => onTouched(element.i),
|
|
338
|
-
label: element.title,
|
|
339
|
-
urlIcon: element.url_icon
|
|
340
|
-
};
|
|
341
|
-
});
|
|
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
|
|
360
|
-
});
|
|
361
|
-
};
|
|
362
|
-
const AreaChipMobile = () => {
|
|
363
|
-
const areas = useAreasStore((state) => state.areas.map((a) => ({
|
|
364
|
-
id: a,
|
|
365
|
-
name: state.hashAreas[a].name
|
|
366
|
-
})), shallow);
|
|
367
|
-
const {
|
|
368
|
-
selectArea
|
|
369
|
-
} = useAreasStore((state) => state.areasActions);
|
|
370
|
-
const currentAreaId = useAreasStore((state) => state.currentAreaId, shallow);
|
|
371
|
-
const {
|
|
372
|
-
addArea
|
|
373
|
-
} = useAreasStore((state) => state.areasActions, shallow);
|
|
374
|
-
const {
|
|
375
|
-
getLabel
|
|
376
|
-
} = useModuleDictionary();
|
|
377
|
-
const theme = useTheme();
|
|
378
|
-
const currentArea = areas.find((area) => area.id === currentAreaId);
|
|
379
|
-
const {
|
|
380
|
-
host_static_assets,
|
|
381
|
-
environment_assets
|
|
382
|
-
} = useEnvironment();
|
|
383
|
-
const menuActions = useMemo(() => areas.filter((area) => area.id !== currentAreaId).map((area) => {
|
|
384
|
-
return {
|
|
385
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`,
|
|
386
|
-
onClick: () => selectArea(area.id),
|
|
387
|
-
label: area.name
|
|
388
|
-
};
|
|
389
|
-
}), [areas, currentAreaId]);
|
|
390
|
-
console.log("menuActions areas", menuActions);
|
|
391
|
-
return /* @__PURE__ */ jsx("div", {
|
|
392
|
-
className: areasAdminClasses.areaChipMobileRoot,
|
|
393
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
394
|
-
className: areasAdminClasses.areaContainerContentChips,
|
|
395
|
-
children: [currentArea ? /* @__PURE__ */ jsx(AreaChip, {
|
|
396
|
-
areaId: currentArea.id,
|
|
397
|
-
selected: true,
|
|
398
|
-
disabled: true
|
|
399
|
-
}, currentArea.id) : null, menuActions.length >= 0 ? /* @__PURE__ */ jsxs("div", {
|
|
400
|
-
className: areasAdminClasses.areaChipMobileIconContainer,
|
|
401
|
-
children: [currentArea ? /* @__PURE__ */ jsx(PanelWindowPopUp, {
|
|
402
|
-
currentAreaId: currentArea.id
|
|
403
|
-
}) : null, /* @__PURE__ */ jsx(MenuActions, {
|
|
404
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CHEVRON_DOWN}`,
|
|
405
|
-
arrowType: "no-arrow",
|
|
406
|
-
marginTop: "12px!important",
|
|
407
|
-
marginLeft: "14px!important",
|
|
408
|
-
anchorOrigin: {
|
|
409
|
-
vertical: "bottom",
|
|
410
|
-
horizontal: "right"
|
|
411
|
-
},
|
|
412
|
-
transformOrigin: {
|
|
413
|
-
vertical: "top",
|
|
414
|
-
horizontal: "right"
|
|
415
|
-
},
|
|
416
|
-
menuActions,
|
|
417
|
-
className: areasAdminClasses.areasPopoverMobileOptions,
|
|
418
|
-
menuActionSx: theme.components?.M4LAreasAdminMobilePopoverOptions?.styleOverrides,
|
|
419
|
-
endListElement: /* @__PURE__ */ jsx(Button, {
|
|
420
|
-
onClick: addArea,
|
|
421
|
-
variant: "outlined",
|
|
422
|
-
startIcon: /* @__PURE__ */ jsx(Icon, {
|
|
423
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`
|
|
424
|
-
}),
|
|
425
|
-
children: getLabel(getAreasDictionary(DICCTIONARY.area_add_new))
|
|
426
|
-
})
|
|
427
|
-
})]
|
|
428
|
-
}) : null]
|
|
429
|
-
})
|
|
430
|
-
});
|
|
431
|
-
};
|
|
432
|
-
function AreasAdmin() {
|
|
433
|
-
const areas = useAreasStore((state) => state.areas, shallow);
|
|
434
|
-
const currentArea = useAreasStore((state) => state.currentAreaId, shallow);
|
|
435
|
-
const status = useAreasStore((state) => state.ownerState.status);
|
|
436
|
-
const classesRoot = useAreasStore((state) => state.adminClasses.root);
|
|
437
|
-
const areasLength = useAreasStore((state) => state.areas.length);
|
|
438
|
-
const isDesktop = useResponsiveDesktop();
|
|
439
|
-
const {
|
|
440
|
-
addArea
|
|
441
|
-
} = useAreasStore((state) => state.areasActions, shallow);
|
|
442
|
-
const {
|
|
443
|
-
host_static_assets,
|
|
444
|
-
environment_assets
|
|
445
|
-
} = useEnvironment();
|
|
446
|
-
if (status !== "loaded") {
|
|
447
|
-
return null;
|
|
448
|
-
}
|
|
449
|
-
return /* @__PURE__ */ jsxs(AreasAdminRoot, {
|
|
450
|
-
className: classesRoot,
|
|
451
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
452
|
-
className: areasAdminClasses.areaContainerChipsIcon,
|
|
453
|
-
children: [isDesktop ? /* @__PURE__ */ jsx("div", {
|
|
454
|
-
className: areasAdminClasses.areaIconLayer,
|
|
455
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
456
|
-
className: areasAdminClasses.areaIconLayerContent,
|
|
457
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
458
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`
|
|
459
|
-
})
|
|
460
|
-
})
|
|
461
|
-
}) : null, /* @__PURE__ */ jsx("div", {
|
|
462
|
-
className: areasAdminClasses.areaContainerChips,
|
|
463
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
464
|
-
className: areasAdminClasses.areaContainerContentChips,
|
|
465
|
-
children: isDesktop ? /* @__PURE__ */ jsx(ScrollBar, {
|
|
466
|
-
children: /* @__PURE__ */ jsx(Fragment, {
|
|
467
|
-
children: areas.map((area) => /* @__PURE__ */ jsx(AreaChip, {
|
|
468
|
-
areaId: area,
|
|
469
|
-
selected: area === currentArea,
|
|
470
|
-
disabled: areasLength === 1
|
|
471
|
-
}, area))
|
|
472
|
-
})
|
|
473
|
-
}) : /* @__PURE__ */ jsx(AreaChipMobile, {})
|
|
474
|
-
})
|
|
475
|
-
})]
|
|
476
|
-
}), isDesktop ? /* @__PURE__ */ jsx(IconButton, {
|
|
477
|
-
className: areasAdminClasses.areasAddButton,
|
|
478
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
|
|
479
|
-
size: "small",
|
|
480
|
-
onClick: addArea
|
|
481
|
-
}) : null]
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
export {
|
|
485
|
-
AreasAdmin as A,
|
|
486
|
-
useAreasAdminUtilityClasses as u
|
|
487
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import "@m4l/core";
|
|
3
|
-
import "@mui/material";
|
|
4
|
-
import "../../Icon/index.2414ff25.js";
|
|
5
|
-
import "clsx";
|
|
6
|
-
import "react/jsx-runtime";
|
|
7
|
-
import "../../mui_extended/IconButton/index.a318316e.js";
|
|
8
|
-
import "@m4l/graphics";
|
|
9
|
-
import "zustand";
|
|
10
|
-
import "../contexts/AreasContext/index.36fe6953.js";
|
|
11
|
-
import "./AreasAdmin/index.7bfec13f.js";
|
|
12
|
-
import "zustand/shallow";
|
|
13
|
-
import "../../ScrollBar/index.d4410cb5.js";
|
|
14
|
-
import "../../mui_extended/Accordion/index.5111314b.js";
|
|
15
|
-
import "../../mui_extended/Typography/index.443590d6.js";
|
|
16
|
-
import "../../mui_extended/Avatar/index.75e6ed57.js";
|
|
17
|
-
import "react-router-dom";
|
|
18
|
-
import "@mui/material/Button";
|
|
19
|
-
import "../../mui_extended/Button/index.40af964e.js";
|
|
20
|
-
import "../../mui_extended/CheckBox.5f6c78b0.js";
|
|
21
|
-
import "../../mui_extended/Badge/index.cad260fe.js";
|
|
22
|
-
import "../../Image/index.c18ebf5a.js";
|
|
23
|
-
import "@mui/lab";
|
|
24
|
-
import "../../mui_extended/MenuActions/index.f6bfdd40.js";
|
|
25
|
-
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
26
|
-
import "../../mui_extended/Pager/index.da26e9d4.js";
|
|
27
|
-
import "../../mui_extended/Tab/index.0989d15d.js";
|
|
28
|
-
import "../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
29
|
-
import "./AreasViewer/index.9ed7dfd7.js";
|
|
30
|
-
import "../../LinearProgressIndeterminate/index.60dabc06.js";
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import "@m4l/core";
|
|
3
|
-
import "@mui/material";
|
|
4
|
-
import "../Icon/index.2414ff25.js";
|
|
5
|
-
import "clsx";
|
|
6
|
-
import "react/jsx-runtime";
|
|
7
|
-
import "../mui_extended/IconButton/index.a318316e.js";
|
|
8
|
-
import "@m4l/graphics";
|
|
9
|
-
import "zustand";
|
|
10
|
-
import "./contexts/AreasContext/index.36fe6953.js";
|
|
11
|
-
import "./components/AreasAdmin/index.7bfec13f.js";
|
|
12
|
-
import "zustand/shallow";
|
|
13
|
-
import "../ScrollBar/index.d4410cb5.js";
|
|
14
|
-
import "../mui_extended/Accordion/index.5111314b.js";
|
|
15
|
-
import "../mui_extended/Typography/index.443590d6.js";
|
|
16
|
-
import "../mui_extended/Avatar/index.75e6ed57.js";
|
|
17
|
-
import "react-router-dom";
|
|
18
|
-
import "@mui/material/Button";
|
|
19
|
-
import "../mui_extended/Button/index.40af964e.js";
|
|
20
|
-
import "../mui_extended/CheckBox.5f6c78b0.js";
|
|
21
|
-
import "../mui_extended/Badge/index.cad260fe.js";
|
|
22
|
-
import "../Image/index.c18ebf5a.js";
|
|
23
|
-
import "@mui/lab";
|
|
24
|
-
import "../mui_extended/MenuActions/index.f6bfdd40.js";
|
|
25
|
-
import "../mui_extended/Popover/index.9f35d0eb.js";
|
|
26
|
-
import "../mui_extended/Pager/index.da26e9d4.js";
|
|
27
|
-
import "../mui_extended/Tab/index.0989d15d.js";
|
|
28
|
-
import "../mui_extended/Tooltip/index.5a795dcd.js";
|
|
29
|
-
import "./components/AreasViewer/index.9ed7dfd7.js";
|
|
30
|
-
import "../LinearProgressIndeterminate/index.60dabc06.js";
|
|
31
|
-
import "./contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
32
|
-
import "./contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
File without changes
|
|
File without changes
|