@m4l/components 0.1.71 → 0.1.72
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/components/CommonActions/components/ActionCancel/{index.ff90f2c0.js → index.07ba5a89.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.392a17c0.js → index.9bdae569.js} +19 -18
- package/components/CommonActions/components/ActionFormIntro/{index.f88d8849.js → index.e077d11f.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.e31ab7e9.js → index.a454d0e4.js} +3 -3
- package/components/CommonActions/components/Actions/{index.6b7d480a.js → index.e190561b.js} +18 -17
- package/components/DataGrid/{index.77ae9b4c.js → index.549bd646.js} +20 -19
- package/components/DynamicFilter/{index.b2ba5167.js → index.c1a3e2f1.js} +31 -30
- package/components/HelperText/{index.d7b1b21a.js → index.4c27bfc1.js} +8 -8
- package/components/Icon/{index.6f2a5618.js → index.9839297c.js} +2 -2
- package/components/Image/{index.1e3b7ff6.js → index.a88f6341.js} +1 -1
- package/components/LanguagePopover/{index.310e9a3a.js → index.84c51cd3.js} +9 -9
- package/components/ModalDialog/{index.598f9a86.js → index.75ddf6de.js} +7 -7
- package/components/NavLink/{index.ac3778af.js → index.e88494ef.js} +9 -9
- package/components/NoItemSelected/{index.3809e3d1.js → index.c3b67da1.js} +1 -1
- package/components/ObjectLogs/{index.949d3595.js → index.88bcf75a.js} +16 -15
- package/components/PaperForm/{index.cf8af08b.js → index.b141d583.js} +1 -1
- package/components/Period/{index.53ea0562.js → index.2ab4f2a1.js} +18 -17
- package/components/Resizeable/{index.ff4ce7a4.js → index.086ff29e.js} +1 -1
- package/components/SideBar/{index.4daafbab.js → index.90137dc5.js} +6 -6
- package/components/areas/components/AreasAdmin/index.218451cf.js +289 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +1 -1
- package/components/areas/components/{index.31f39977.js → AreasViewer/index.51ee3d38.js} +69 -296
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.d.ts +3 -3
- package/components/areas/components/index.ae4cbf2e.js +14 -0
- package/components/areas/constants.66529246.js +6 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +6 -4
- package/components/areas/contexts/AreasContext/{index.e14d6799.js → index.0b50676d.js} +88 -16
- package/components/areas/contexts/AreasContext/types.d.ts +3 -3
- package/components/areas/contexts/DynamicMFParmsContext/store.d.ts +1 -1
- package/components/areas/contexts/DynamicMFParmsContext/types.d.ts +1 -1
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +2 -10
- package/components/areas/contexts/{index.5ba05323.js → index.b0ce327e.js} +1 -1
- package/components/areas/contexts/index.d.ts +2 -1
- package/components/areas/dictionary.e72db809.js +22 -0
- package/components/areas/hooks/index.0184c6f7.js +4 -0
- package/components/areas/hooks/{useArea/index.c135e0cf.js → useAreas/index.e868e3d9.js} +1 -1
- package/components/areas/hooks/{index.ae8d8631.js → useWindowToolsMF/index.b7afaf88.js} +1 -3
- package/components/areas/icons.b36751f2.js +17 -0
- package/components/areas/index.05b7b8e2.js +16 -0
- package/components/areas/types.d.ts +25 -3
- package/components/formatters/BooleanFormatter/{index.99c7fe49.js → index.e610de08.js} +1 -1
- package/components/formatters/{index.1a92006b.js → index.982e909b.js} +2 -2
- package/components/hook-form/RHFAutocomplete/{index.c4ba070a.js → index.b185393e.js} +10 -10
- package/components/hook-form/RHFAutocompleteAsync/{index.a63f3704.js → index.7a569646.js} +2 -2
- package/components/hook-form/RHFCheckbox/{index.9055f88d.js → index.7a9ea396.js} +3 -3
- package/components/hook-form/RHFDateTime/{index.2cb94a66.js → index.2fd1d56b.js} +9 -9
- package/components/hook-form/RHFPeriod/{index.14dcf762.js → index.df3d3f69.js} +2 -2
- package/components/hook-form/RHFTextField/{index.7ce2b16e.js → index.e1b50c30.js} +6 -6
- package/components/hook-form/RHFUpload/{index.c57a43f8.js → index.ec977af6.js} +1 -1
- package/components/modal/{WindowBase.32d35d71.js → WindowBase.e5ec6128.js} +10 -10
- package/components/modal/{WindowConfirm.70bcbb69.js → WindowConfirm.b89712de.js} +16 -15
- package/components/modal/index.97752555.js +36 -0
- package/components/mui_extended/Accordion/{index.44e96bb8.js → index.d420b666.js} +2 -2
- package/components/mui_extended/Button/{index.ec6525e0.js → index.1cd0c4e4.js} +3 -3
- package/components/mui_extended/IconButton/{index.7aab3e04.js → index.590049b4.js} +1 -1
- package/components/mui_extended/MenuActions/{index.bff47c06.js → index.f9eb6463.js} +2 -2
- package/components/mui_extended/Pager/{index.907d5801.js → index.c058b933.js} +1 -1
- package/components/mui_extended/Typography/{index.d5e0f69f.js → index.1659d310.js} +1 -1
- package/components/mui_extended/{index.1f766f93.js → index.ec312b5a.js} +8 -8
- package/contexts/ModalContext/{index.fca184e2.js → index.92e80136.js} +1 -1
- package/hooks/useModal/{index.9b244379.js → index.18a7cb8f.js} +1 -1
- package/index.js +84 -81
- package/package.json +4 -4
- package/{react-draggable.29f78f6d.js → react-draggable.21aa9ee1.js} +1 -1
- package/{react-resizable.baf54eb2.js → react-resizable.e78d1cc8.js} +2 -2
- package/utils/{index.ee16888d.js → index.8608d16c.js} +1 -1
- package/{vendor.619c3533.js → vendor.d194839d.js} +45 -44
- package/components/areas/index.bd29b1db.js +0 -56
- package/components/modal/index.ef3aa9ac.js +0 -35
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
2
2
|
import { useEnvironment } from "@m4l/core";
|
|
3
3
|
import { createContext, useContext, useState } from "react";
|
|
4
|
-
import { T as TEST_PROP_ID } from "../../vendor.
|
|
5
|
-
import { I as Image } from "../Image/index.
|
|
6
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.
|
|
4
|
+
import { T as TEST_PROP_ID } from "../../vendor.d194839d.js";
|
|
5
|
+
import { I as Image } from "../Image/index.a88f6341.js";
|
|
6
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.590049b4.js";
|
|
7
7
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
8
8
|
import { styled as styled$1, generateUtilityClasses, ListItemText, ListItemButton, Collapse, useTheme, Skeleton, Drawer as Drawer$1 } from "@mui/material";
|
|
9
|
-
import { I as Icon, A as ArrowIcon } from "../Icon/index.
|
|
10
|
-
import { T as Typography } from "../mui_extended/Typography/index.
|
|
9
|
+
import { I as Icon, A as ArrowIcon } from "../Icon/index.9839297c.js";
|
|
10
|
+
import { T as Typography } from "../mui_extended/Typography/index.1659d310.js";
|
|
11
11
|
import clsx from "clsx";
|
|
12
12
|
import { P as Popover } from "../mui_extended/Popover/index.9f35d0eb.js";
|
|
13
13
|
import { S as ScrollBar } from "../ScrollBar/index.bbe48f4d.js";
|
|
14
14
|
import { styled, alpha } from "@mui/material/styles";
|
|
15
15
|
import { unstable_composeClasses } from "@mui/base";
|
|
16
|
-
import { g as getComponentUtilityClass } from "../../utils/index.
|
|
16
|
+
import { g as getComponentUtilityClass } from "../../utils/index.8608d16c.js";
|
|
17
17
|
const SideBarRoot = styled("div")(({
|
|
18
18
|
theme
|
|
19
19
|
}) => ({
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.590049b4.js";
|
|
2
|
+
import { u as useAreasStore } from "../../hooks/useAreas/index.e868e3d9.js";
|
|
3
|
+
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import { useState, useRef, useMemo } from "react";
|
|
5
|
+
import * as Yup from "yup";
|
|
6
|
+
import { generateUtilityClasses } from "@mui/material";
|
|
7
|
+
import { I as Icon } from "../../../Icon/index.9839297c.js";
|
|
8
|
+
import clsx from "clsx";
|
|
9
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
10
|
+
import "../../../mui_extended/Accordion/index.d420b666.js";
|
|
11
|
+
import "../../../mui_extended/Avatar/index.fe06afd7.js";
|
|
12
|
+
import "react-router-dom";
|
|
13
|
+
import "@mui/material/Button";
|
|
14
|
+
import "../../../mui_extended/Button/index.1cd0c4e4.js";
|
|
15
|
+
import "../../../Image/index.a88f6341.js";
|
|
16
|
+
import "@mui/lab";
|
|
17
|
+
import { T as Typography } from "../../../mui_extended/Typography/index.1659d310.js";
|
|
18
|
+
import { P as Popover } from "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
19
|
+
import "../../../mui_extended/MenuActions/index.f9eb6463.js";
|
|
20
|
+
import "../../../mui_extended/Pager/index.c058b933.js";
|
|
21
|
+
import "../../../mui_extended/Tab/index.e0653a0a.js";
|
|
22
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
23
|
+
import { g as getComponentUtilityClass } from "../../../../utils/index.8608d16c.js";
|
|
24
|
+
import { A as AREAS_ADMIN_CLASS_NAME } from "../../constants.66529246.js";
|
|
25
|
+
import { I as ICONS } from "../../icons.b36751f2.js";
|
|
26
|
+
import "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
27
|
+
import "../../../../contexts/ModalContext/index.92e80136.js";
|
|
28
|
+
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.a7511399.js";
|
|
29
|
+
import "react-hook-form";
|
|
30
|
+
import "../../../hook-form/RHFAutocomplete/index.b185393e.js";
|
|
31
|
+
import "../../../HelperText/index.4c27bfc1.js";
|
|
32
|
+
import "lodash/debounce";
|
|
33
|
+
import "../../../hook-form/RHFAutocompleteAsync/index.7a569646.js";
|
|
34
|
+
import "../../../hook-form/RHFCheckbox/index.7a9ea396.js";
|
|
35
|
+
import "@mui/x-date-pickers";
|
|
36
|
+
import "../../../hook-form/RHFDateTime/index.2fd1d56b.js";
|
|
37
|
+
import "@m4l/graphics";
|
|
38
|
+
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.e1b50c30.js";
|
|
39
|
+
import "../../../hook-form/RHFPeriod/index.df3d3f69.js";
|
|
40
|
+
import "../../../Period/index.2ab4f2a1.js";
|
|
41
|
+
import { A as Actions } from "../../../CommonActions/components/Actions/index.e190561b.js";
|
|
42
|
+
import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.07ba5a89.js";
|
|
43
|
+
import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.a454d0e4.js";
|
|
44
|
+
import "../../../../react-draggable.21aa9ee1.js";
|
|
45
|
+
import "../../../ModalDialog/index.75ddf6de.js";
|
|
46
|
+
import "../../../Resizeable/index.086ff29e.js";
|
|
47
|
+
import "../../../modal/WindowConfirm.b89712de.js";
|
|
48
|
+
import "../../../modal/WindowBase.e5ec6128.js";
|
|
49
|
+
import { shallow } from "zustand/shallow";
|
|
50
|
+
import { styled } from "@mui/material/styles";
|
|
51
|
+
import { S as ScrollBar } from "../../../ScrollBar/index.bbe48f4d.js";
|
|
52
|
+
import "../AreasViewer/index.51ee3d38.js";
|
|
53
|
+
import "../../contexts/AreasContext/index.0b50676d.js";
|
|
54
|
+
import "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
55
|
+
import "zustand";
|
|
56
|
+
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.e72db809.js";
|
|
57
|
+
import "lodash/isString";
|
|
58
|
+
import "react-dropzone";
|
|
59
|
+
import "../../../hook-form/RHFUpload/index.ec977af6.js";
|
|
60
|
+
const areasAdminClasses = generateUtilityClasses(AREAS_ADMIN_CLASS_NAME, [
|
|
61
|
+
"root",
|
|
62
|
+
"areaChipRoot",
|
|
63
|
+
"areaChipTitle",
|
|
64
|
+
"areaChipDeleteButton",
|
|
65
|
+
"areasAddButton",
|
|
66
|
+
"areaContainerChips",
|
|
67
|
+
"areaIconLayer",
|
|
68
|
+
"areaChipEditButton",
|
|
69
|
+
"selected",
|
|
70
|
+
"isMobile",
|
|
71
|
+
"disabled"
|
|
72
|
+
], AREAS_ADMIN_CLASS_NAME);
|
|
73
|
+
const useAreasAdminUtilityClasses = (ownerState) => {
|
|
74
|
+
const slots = {
|
|
75
|
+
root: ["root", ownerState.status, ownerState.isMobile && "isMobile", ownerState.isSkeleton && "isSkeleton"],
|
|
76
|
+
areaChipRoot: ["areaChipRoot"],
|
|
77
|
+
areaIconLayer: ["areaIconLayer"],
|
|
78
|
+
areaContainerChips: ["areaContainerChips"],
|
|
79
|
+
areaChipTitle: ["areaChipTitle"],
|
|
80
|
+
areaChipDeleteButton: ["areaChipDeleteButton"],
|
|
81
|
+
areaChipEditButton: ["areaChipEditButton"],
|
|
82
|
+
areasAddButton: ["areasAddButton"]
|
|
83
|
+
};
|
|
84
|
+
return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_ADMIN_CLASS_NAME), {});
|
|
85
|
+
};
|
|
86
|
+
styled("div")(() => ({
|
|
87
|
+
display: "flex",
|
|
88
|
+
flexDirection: "row",
|
|
89
|
+
border: "1px solid gray",
|
|
90
|
+
"&.active": {
|
|
91
|
+
border: "1px solid red"
|
|
92
|
+
}
|
|
93
|
+
}));
|
|
94
|
+
styled("div")(({
|
|
95
|
+
theme
|
|
96
|
+
}) => ({
|
|
97
|
+
height: "100%",
|
|
98
|
+
width: theme.spacing(1),
|
|
99
|
+
backgroundColor: theme.palette.background.default,
|
|
100
|
+
"&.active": {
|
|
101
|
+
backgroundColor: theme.palette.primary.main
|
|
102
|
+
}
|
|
103
|
+
}));
|
|
104
|
+
const EditAreaHeader = styled("div")(({
|
|
105
|
+
theme
|
|
106
|
+
}) => ({
|
|
107
|
+
display: "flex",
|
|
108
|
+
width: "100%",
|
|
109
|
+
height: "25px",
|
|
110
|
+
borderBottom: "1px solid",
|
|
111
|
+
borderColor: theme.palette.state.default,
|
|
112
|
+
justifyContent: "space-between",
|
|
113
|
+
alignItems: "center"
|
|
114
|
+
}));
|
|
115
|
+
const AreaChip = (props) => {
|
|
116
|
+
const {
|
|
117
|
+
areaId,
|
|
118
|
+
selected,
|
|
119
|
+
areaName,
|
|
120
|
+
disabled
|
|
121
|
+
} = props;
|
|
122
|
+
const {
|
|
123
|
+
host_static_assets,
|
|
124
|
+
environment_assets
|
|
125
|
+
} = useEnvironment();
|
|
126
|
+
const {
|
|
127
|
+
deleteArea,
|
|
128
|
+
selectArea,
|
|
129
|
+
editArea
|
|
130
|
+
} = useAreasStore((state) => state.areasActions);
|
|
131
|
+
const [open, setOpen] = useState(false);
|
|
132
|
+
const {
|
|
133
|
+
getLabel
|
|
134
|
+
} = useModuleDictionary();
|
|
135
|
+
const anchorRef = useRef(null);
|
|
136
|
+
const onClickDeleteArea = (e) => {
|
|
137
|
+
e.stopPropagation();
|
|
138
|
+
deleteArea(areaId);
|
|
139
|
+
};
|
|
140
|
+
const onSubmit = (data) => {
|
|
141
|
+
console.log("data areachip", data);
|
|
142
|
+
editArea(areaId, data.inputEditArea);
|
|
143
|
+
setOpen(false);
|
|
144
|
+
};
|
|
145
|
+
const handlerOpenPopover = () => {
|
|
146
|
+
setOpen(true);
|
|
147
|
+
};
|
|
148
|
+
const initialValues = {
|
|
149
|
+
inputEditArea: areaName
|
|
150
|
+
};
|
|
151
|
+
const validationSchema = useMemo(() => Yup.object().shape({
|
|
152
|
+
inputEditArea: Yup.string().required(getLabel(getAreasDictionary("validation_edit_area")))
|
|
153
|
+
}), [getLabel]);
|
|
154
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
155
|
+
role: "presentation",
|
|
156
|
+
className: clsx(areasAdminClasses.areaChipRoot, selected ? areasAdminClasses.selected : null, disabled ? areasAdminClasses.disabled : null),
|
|
157
|
+
onClick: () => {
|
|
158
|
+
selectArea(areaId);
|
|
159
|
+
},
|
|
160
|
+
ref: anchorRef,
|
|
161
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
162
|
+
className: areasAdminClasses.areaChipTitle,
|
|
163
|
+
children: areaName
|
|
164
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
165
|
+
style: {
|
|
166
|
+
display: "flex"
|
|
167
|
+
},
|
|
168
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
169
|
+
className: areasAdminClasses.areaChipEditButton,
|
|
170
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.EDIT_AREA}`,
|
|
171
|
+
size: "extraSmall",
|
|
172
|
+
onClick: handlerOpenPopover
|
|
173
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
174
|
+
className: areasAdminClasses.areaChipDeleteButton,
|
|
175
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.DELETE_AREA}`,
|
|
176
|
+
size: "extraSmall",
|
|
177
|
+
onClick: onClickDeleteArea
|
|
178
|
+
})]
|
|
179
|
+
}), /* @__PURE__ */ jsx(Popover, {
|
|
180
|
+
arrowType: "top-center",
|
|
181
|
+
open,
|
|
182
|
+
anchorEl: anchorRef.current,
|
|
183
|
+
anchorOrigin: {
|
|
184
|
+
vertical: "bottom",
|
|
185
|
+
horizontal: "center"
|
|
186
|
+
},
|
|
187
|
+
transformOrigin: {
|
|
188
|
+
vertical: "top",
|
|
189
|
+
horizontal: "center"
|
|
190
|
+
},
|
|
191
|
+
onClose: () => setOpen(false),
|
|
192
|
+
sx: {
|
|
193
|
+
mt: "10px"
|
|
194
|
+
},
|
|
195
|
+
children: /* @__PURE__ */ jsxs(RHFormProvider, {
|
|
196
|
+
onSubmit,
|
|
197
|
+
values: initialValues,
|
|
198
|
+
validationSchema,
|
|
199
|
+
children: [/* @__PURE__ */ jsxs(EditAreaHeader, {
|
|
200
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
201
|
+
children: getLabel(getAreasDictionary(DICCTIONARY.label_edit_area))
|
|
202
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
203
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CLOSE}`,
|
|
204
|
+
size: "small",
|
|
205
|
+
onClick: () => setOpen(false)
|
|
206
|
+
})]
|
|
207
|
+
}), /* @__PURE__ */ jsx(RHFTextField, {
|
|
208
|
+
name: "inputEditArea",
|
|
209
|
+
skeletonWidth: "70%",
|
|
210
|
+
skeletonHeight: "18px",
|
|
211
|
+
sx: {
|
|
212
|
+
mt: "20px"
|
|
213
|
+
}
|
|
214
|
+
}), /* @__PURE__ */ jsxs(Actions, {
|
|
215
|
+
children: [/* @__PURE__ */ jsx(ActionCancel, {
|
|
216
|
+
onClick: () => setOpen(false),
|
|
217
|
+
variant: "outlined",
|
|
218
|
+
skeletonWidth: "100%"
|
|
219
|
+
}), /* @__PURE__ */ jsx(ActionIntro, {
|
|
220
|
+
skeletonWidth: "100%"
|
|
221
|
+
})]
|
|
222
|
+
})]
|
|
223
|
+
})
|
|
224
|
+
})]
|
|
225
|
+
});
|
|
226
|
+
};
|
|
227
|
+
AreaChip.displayName = "AreaButtons";
|
|
228
|
+
const AreasAdminRoot = styled("div")`
|
|
229
|
+
display: flex;
|
|
230
|
+
position: relative;
|
|
231
|
+
|
|
232
|
+
//areaRoot
|
|
233
|
+
& .${areasAdminClasses.areaChipRoot} {
|
|
234
|
+
display: flex;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
${(props) => props.theme.components?.M4LAreasAdmin?.styleOverrides}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
`;
|
|
242
|
+
function AreasAdmin() {
|
|
243
|
+
const areas = useAreasStore((state) => state.areas, shallow);
|
|
244
|
+
const currentArea = useAreasStore((state) => state.currentAreaId, shallow);
|
|
245
|
+
const status = useAreasStore((state) => state.ownerState.status);
|
|
246
|
+
const classesRoot = useAreasStore((state) => state.adminClasses.root);
|
|
247
|
+
const areasLength = useAreasStore((state) => state.areas.length);
|
|
248
|
+
const {
|
|
249
|
+
addArea
|
|
250
|
+
} = useAreasStore((state) => state.areasActions, shallow);
|
|
251
|
+
const {
|
|
252
|
+
host_static_assets,
|
|
253
|
+
environment_assets
|
|
254
|
+
} = useEnvironment();
|
|
255
|
+
console.log("Render AreasAdmin", areas);
|
|
256
|
+
if (status !== "loaded") {
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
return /* @__PURE__ */ jsxs(AreasAdminRoot, {
|
|
260
|
+
className: classesRoot,
|
|
261
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
262
|
+
className: areasAdminClasses.areaIconLayer,
|
|
263
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
264
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`
|
|
265
|
+
})
|
|
266
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
267
|
+
className: areasAdminClasses.areaContainerChips,
|
|
268
|
+
children: /* @__PURE__ */ jsx(ScrollBar, {
|
|
269
|
+
children: /* @__PURE__ */ jsx(Fragment, {
|
|
270
|
+
children: areas.map((area) => /* @__PURE__ */ jsx(AreaChip, {
|
|
271
|
+
areaId: area.id,
|
|
272
|
+
selected: area.id === currentArea,
|
|
273
|
+
areaName: area.name,
|
|
274
|
+
disabled: areasLength === 1
|
|
275
|
+
}, area.id))
|
|
276
|
+
})
|
|
277
|
+
})
|
|
278
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
279
|
+
className: areasAdminClasses.areasAddButton,
|
|
280
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
|
|
281
|
+
size: "small",
|
|
282
|
+
onClick: addArea
|
|
283
|
+
})]
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
export {
|
|
287
|
+
AreasAdmin as A,
|
|
288
|
+
useAreasAdminUtilityClasses as u
|
|
289
|
+
};
|