@m4l/components 0.1.36 → 0.1.37

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 (61) hide show
  1. package/dist/{commonjs.bcc6b707.js → commonjs.565e6834.js} +0 -1
  2. package/dist/components/CommonActions/components/ActionCancel/{index.4b36950f.js → index.9230c57b.js} +1 -1
  3. package/dist/components/CommonActions/components/ActionFormCancel/{index.945e9887.js → index.ab514bd9.js} +9 -7
  4. package/dist/components/CommonActions/components/ActionIntro/{index.35a0d240.js → index.a0a341c7.js} +1 -1
  5. package/dist/components/CommonActions/components/Actions/index.d3e1f36e.js +54 -0
  6. package/dist/components/DataGrid/{index.156cc30c.js → index.67260455.js} +663 -15
  7. package/dist/components/DynamicFilter/{index.32f84995.js → index.071aa795.js} +92 -18
  8. package/dist/components/Icon/{index.1dbd3e58.js → index.8d754623.js} +62 -5
  9. package/dist/components/LanguagePopover/index.cbc4b282.js +144 -0
  10. package/dist/components/Loadable/{index.8c6006be.js → index.117eaced.js} +1 -1
  11. package/dist/components/ModalDialog/{index.91777582.js → index.a684827f.js} +5 -5
  12. package/dist/components/ObjectLogs/{index.9d3fc2ae.js → index.4a859658.js} +12 -10
  13. package/dist/components/PaperForm/{index.218a6c4b.js → index.c5948756.js} +1 -1
  14. package/dist/components/Period/{index.74f35862.js → index.abe445bd.js} +9 -7
  15. package/dist/components/Resizeable/{index.44a0dd46.js → index.c96c0f09.js} +1 -1
  16. package/dist/components/SplitLayout/{index.81fc4750.js → index.5a8355d8.js} +1 -1
  17. package/dist/components/animate/PropagateLoader/index.be5b02c3.js +30 -0
  18. package/dist/components/areas/components/AreasAdmin/index.6794b22f.js +112 -0
  19. package/dist/components/areas/components/AreasContainer/index.a2f8899b.js +43 -0
  20. package/dist/components/areas/components/GridLayout/index.b9c1e846.js +92 -0
  21. package/dist/components/areas/components/Window/index.252fbf4e.js +646 -0
  22. package/dist/components/areas/components/WindowPopUp/index.214cf099.js +120 -0
  23. package/dist/components/areas/components/index.7d6cd649.js +67 -0
  24. package/dist/components/areas/contexts/AreaContext/index.4894cf23.js +286 -0
  25. package/dist/components/areas/contexts/AreasContext/index.cd8e4bee.js +158 -0
  26. package/dist/components/areas/contexts/DynamicMFParmsContext/index.668bc2e2.js +17 -0
  27. package/dist/components/areas/contexts/index.f9196fb2.js +1 -0
  28. package/dist/components/areas/hooks/useArea/index.9b85ce24.js +19 -0
  29. package/dist/components/areas/hooks/useDynamicMFParameters/index.e6a44ae3.js +11 -0
  30. package/dist/components/areas/index.d1bf612c.js +16 -0
  31. package/dist/components/formatters/BooleanFormatter/{index.efc8ffc2.js → index.3a9b16c8.js} +1 -1
  32. package/dist/components/formatters/{index.c3f4b687.js → index.0b5f95d0.js} +1 -1
  33. package/dist/components/hook-form/RHFPeriod/{index.2b8e63a2.js → index.3772295b.js} +1 -1
  34. package/dist/components/hook-form/RHFTextField/{index.7feaec71.js → index.b17d68f4.js} +1 -1
  35. package/dist/components/modal/WindowBase.04439b8e.js +120 -0
  36. package/dist/components/modal/WindowConfirm.0b8a6818.js +115 -0
  37. package/dist/components/modal/index.8387e90e.js +18 -0
  38. package/dist/components/mui_extended/Accordion/{index.8e123c57.js → index.a541c71c.js} +2 -2
  39. package/dist/components/mui_extended/Button/index.86a155a2.js +101 -0
  40. package/dist/components/mui_extended/IconButton/{index.e3adaa33.js → index.82f16572.js} +5 -62
  41. package/dist/components/mui_extended/MenuActions/index.ee17bddd.js +112 -0
  42. package/dist/components/mui_extended/Pager/{index.d245f821.js → index.74d3f5fc.js} +66 -1
  43. package/dist/components/mui_extended/Popover/index.53c77d23.js +137 -0
  44. package/dist/components/mui_extended/index.85dfadf1.js +16 -0
  45. package/dist/contexts/ModalContext/{index.0797eb17.js → index.b90eec94.js} +1 -1
  46. package/dist/hooks/useModal/{index.32da4dcb.js → index.d14edee3.js} +1 -1
  47. package/dist/index.js +128 -1691
  48. package/dist/{components/animate/PropagateLoader/index.eb401503.js → node_modules.416f1da3.js} +59 -28
  49. package/dist/package.json +2 -1
  50. package/dist/{react-draggable.3b5b6680.js → react-draggable.84d6b038.js} +1 -1
  51. package/dist/{react-json-view.03ae95f5.js → react-json-view.57125fcf.js} +1 -1
  52. package/dist/{react-resizable.6eae0397.js → react-resizable.1d00271d.js} +3 -4
  53. package/dist/{react-splitter-layout.873aece3.js → react-splitter-layout.8b1655c8.js} +1 -1
  54. package/dist/style.css +0 -114
  55. package/dist/utils/{index.9dce2e2f.js → index.899eb67b.js} +28 -460
  56. package/package.json +3 -1
  57. package/vite.config.ts +201 -129
  58. package/dist/components/CommonActions/components/Actions/index.ba86f72f.js +0 -868
  59. package/dist/components/mui_extended/Button/index.55fc70dc.js +0 -178
  60. package/dist/components/mui_extended/Popover/index.97cf3a3e.js +0 -275
  61. package/dist/node_modules.e0b84fac.js +0 -2154
@@ -1,5 +1,5 @@
1
1
  import { S as ScrollBar } from "../ScrollBar/index.39eeb2de.js";
2
- import { styled } from "@mui/material/styles";
2
+ import { styled, alpha as alpha$1 } from "@mui/material/styles";
3
3
  import { useRef, useState, useMemo, useCallback, useEffect, createContext, useContext } from "react";
4
4
  import { useModuleDictionary, voidFunction, useEnvironment, useHostTools, useFlagsPresent } from "@m4l/core";
5
5
  import * as Yup from "yup";
@@ -12,30 +12,32 @@ import { alpha, styled as styled$1, Skeleton, MenuItem, useTheme, Popper, ClickA
12
12
  import "@mui/x-date-pickers";
13
13
  import { R as RHFDateTime } from "../hook-form/RHFDateTime/index.7f1cbd85.js";
14
14
  import { useFormatter, useResponsiveDesktop } from "@m4l/graphics";
15
- import { R as RHFTextField } from "../hook-form/RHFTextField/index.7feaec71.js";
16
- import { I as Icon } from "../Icon/index.1dbd3e58.js";
17
- import "../hook-form/RHFPeriod/index.2b8e63a2.js";
15
+ import { R as RHFTextField } from "../hook-form/RHFTextField/index.b17d68f4.js";
16
+ import { I as Icon } from "../Icon/index.8d754623.js";
17
+ import "../hook-form/RHFPeriod/index.3772295b.js";
18
18
  import "../ErrorLabel/index.c8615f16.js";
19
- import "../Period/index.74f35862.js";
20
- import { L as LabelMemuItem, b as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.ba86f72f.js";
19
+ import "../Period/index.abe445bd.js";
20
+ import { A as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.d3e1f36e.js";
21
21
  import "@mui/material/Button";
22
- import "../../contexts/ModalContext/index.0797eb17.js";
23
- import "../../react-draggable.3b5b6680.js";
24
- import "../ModalDialog/index.91777582.js";
25
- import "../Resizeable/index.44a0dd46.js";
26
- import "../../index.js";
22
+ import "../../contexts/ModalContext/index.b90eec94.js";
23
+ import "../../react-draggable.84d6b038.js";
24
+ import "../ModalDialog/index.a684827f.js";
25
+ import "../Resizeable/index.c96c0f09.js";
26
+ import "../areas/contexts/DynamicMFParmsContext/index.668bc2e2.js";
27
+ import "../modal/WindowConfirm.0b8a6818.js";
28
+ import "../modal/WindowBase.04439b8e.js";
27
29
  import "@mui/lab";
28
30
  import "lodash/isString";
29
31
  import "react-dropzone";
30
32
  import "../Image/index.93d5f37f.js";
31
33
  import "../hook-form/RHFUpload/index.d5cc7c13.js";
32
- import { I as IconButton } from "../mui_extended/IconButton/index.e3adaa33.js";
34
+ import { I as IconButton } from "../mui_extended/IconButton/index.82f16572.js";
33
35
  import "simplebar/dist/simplebar.min.css";
34
- import { F as FilterButton } from "../mui_extended/Button/index.55fc70dc.js";
35
- import { P as Popover } from "../mui_extended/Popover/index.97cf3a3e.js";
36
+ import { L as LabelMemuItem } from "../mui_extended/MenuActions/index.ee17bddd.js";
37
+ import { P as Popover } from "../mui_extended/Popover/index.53c77d23.js";
36
38
  import { R as RHFormProvider } from "../../contexts/RHFormContext/index.d88e6e27.js";
37
- import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.4b36950f.js";
38
- import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.35a0d240.js";
39
+ import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.9230c57b.js";
40
+ import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.a0a341c7.js";
39
41
  const WrapperApplyedFilters = styled("div")(({
40
42
  theme
41
43
  }) => ({
@@ -1221,6 +1223,79 @@ const ClearFilters = () => {
1221
1223
  }
1222
1224
  return /* @__PURE__ */ jsx(Fragment, {});
1223
1225
  };
1226
+ const SKTWrapperFilterButton = styled("div")(({
1227
+ theme
1228
+ }) => ({
1229
+ display: "flex",
1230
+ justifyContent: "center",
1231
+ alignItems: "center",
1232
+ minWidth: theme.spacing(3.75),
1233
+ height: theme.spacing(3.75),
1234
+ background: alpha$1(theme.palette.primary.main, 0.3)
1235
+ }));
1236
+ const WrapperFilterButton = styled("div")(() => ({
1237
+ "&.isDirty": {
1238
+ animationName: "dirtyEffect",
1239
+ animationDuration: "1s",
1240
+ animationFillMode: "both",
1241
+ animationIterationCount: "infinite",
1242
+ transition: "all .3s",
1243
+ "@keyframes dirtyEffect": {
1244
+ "20%": {
1245
+ opacity: 1
1246
+ },
1247
+ "50%": {
1248
+ opacity: 0.5
1249
+ },
1250
+ "100%": {
1251
+ opacity: 1
1252
+ }
1253
+ }
1254
+ },
1255
+ "&.isDirtyError": {}
1256
+ }));
1257
+ function FilterButton() {
1258
+ const {
1259
+ isSkeleton,
1260
+ fireOnChangeFilters,
1261
+ automatic,
1262
+ isDirty,
1263
+ isValid
1264
+ } = useBase();
1265
+ const {
1266
+ host_static_assets,
1267
+ environment_assets
1268
+ } = useEnvironment();
1269
+ if (isSkeleton) {
1270
+ return /* @__PURE__ */ jsx(SKTWrapperFilterButton, {
1271
+ children: /* @__PURE__ */ jsx(Skeleton, {
1272
+ variant: "circular",
1273
+ width: 20,
1274
+ height: 20
1275
+ })
1276
+ });
1277
+ }
1278
+ const color = useMemo(() => {
1279
+ if (automatic || !isDirty) {
1280
+ return "action.active";
1281
+ }
1282
+ if (!isValid) {
1283
+ return "error.main";
1284
+ }
1285
+ return "primary.main";
1286
+ }, [automatic, isValid, isDirty]);
1287
+ return /* @__PURE__ */ jsx(WrapperFilterButton, {
1288
+ id: "WrapperFilterButton",
1289
+ className: isDirty && isValid ? "isDirty" : "",
1290
+ children: /* @__PURE__ */ jsx(IconButton, {
1291
+ bgColor: color,
1292
+ dictionaryTooltip: "dynamic_filter.filter_tooltip",
1293
+ onClick: () => fireOnChangeFilters(),
1294
+ "aria-label": "settings",
1295
+ src: `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/${automatic ? "refresh" : "search"}.svg`
1296
+ })
1297
+ });
1298
+ }
1224
1299
  const WrapperInputFilter = styled("div")(({
1225
1300
  theme
1226
1301
  }) => ({
@@ -1579,6 +1654,5 @@ const defaultDynamicFilterDictionary = {
1579
1654
  export {
1580
1655
  DynamicFilter as D,
1581
1656
  defaultDynamicFilterDictionary as d,
1582
- getDynamicFilterComponentsDictionary as g,
1583
- useBase as u
1657
+ getDynamicFilterComponentsDictionary as g
1584
1658
  };
@@ -1,8 +1,64 @@
1
- import { styled } from "@mui/material";
2
- import { useState, useMemo, useEffect } from "react";
3
- import { useTheme } from "@mui/material/styles";
4
- import { g as getPaletteColor } from "../../utils/index.9dce2e2f.js";
1
+ import { m } from "framer-motion";
2
+ import { forwardRef, useState, useMemo, useEffect } from "react";
3
+ import { IconButton, Box, styled } from "@mui/material";
5
4
  import { jsx } from "react/jsx-runtime";
5
+ import { useTheme } from "@mui/material/styles";
6
+ import { g as getPaletteColor } from "../../utils/index.899eb67b.js";
7
+ const varSmall = {
8
+ hover: {
9
+ scale: 1.1
10
+ },
11
+ tap: {
12
+ scale: 0.95
13
+ }
14
+ };
15
+ const varMedium = {
16
+ hover: {
17
+ scale: 1.09
18
+ },
19
+ tap: {
20
+ scale: 0.97
21
+ }
22
+ };
23
+ const varLarge = {
24
+ hover: {
25
+ scale: 1.08
26
+ },
27
+ tap: {
28
+ scale: 0.99
29
+ }
30
+ };
31
+ function AnimateWrap({
32
+ size,
33
+ children
34
+ }) {
35
+ const isSmall = size === "small";
36
+ const isLarge = size === "large";
37
+ return /* @__PURE__ */ jsx(Box, {
38
+ component: m.div,
39
+ whileTap: "tap",
40
+ whileHover: "hover",
41
+ variants: isSmall && varSmall || isLarge && varLarge || varMedium,
42
+ sx: {
43
+ display: "inline-flex"
44
+ },
45
+ children
46
+ });
47
+ }
48
+ const IconButtonAnimate = forwardRef(({
49
+ children,
50
+ size = "medium",
51
+ ...other
52
+ }, ref) => /* @__PURE__ */ jsx(AnimateWrap, {
53
+ size,
54
+ children: /* @__PURE__ */ jsx(IconButton, {
55
+ size,
56
+ ref,
57
+ ...other,
58
+ children
59
+ })
60
+ }));
61
+ IconButtonAnimate.displayName = "IconButtonAnimate";
6
62
  const DivIcon = styled("div", {
7
63
  shouldForwardProp: (props) => props !== "src" && props !== "size" && props !== "bgColor" && props !== "rotationAngle" && props !== "angleTransition"
8
64
  })(({
@@ -92,5 +148,6 @@ function Icon(props) {
92
148
  });
93
149
  }
94
150
  export {
95
- Icon as I
151
+ Icon as I,
152
+ IconButtonAnimate as a
96
153
  };
@@ -0,0 +1,144 @@
1
+ import { useState, useEffect } from "react";
2
+ import { styled, Stack, MenuItem } from "@mui/material";
3
+ import { I as Image } from "../Image/index.93d5f37f.js";
4
+ import { useLocales } from "@m4l/graphics";
5
+ import { useEnvironment, useNetwork } from "@m4l/core";
6
+ import "../Icon/index.8d754623.js";
7
+ import "@mui/material/styles";
8
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
9
+ import "../mui_extended/Accordion/index.a541c71c.js";
10
+ import "../mui_extended/Avatar/index.fe06afd7.js";
11
+ import "react-router-dom";
12
+ import "@mui/material/Button";
13
+ import { C as CircularProgress } from "../mui_extended/CircularProgress/index.ad569afd.js";
14
+ import "@mui/lab";
15
+ import { I as ImageButton } from "../mui_extended/Button/index.86a155a2.js";
16
+ import { P as Popover } from "../mui_extended/Popover/index.53c77d23.js";
17
+ import "../mui_extended/MenuActions/index.ee17bddd.js";
18
+ import "../mui_extended/Pager/index.74d3f5fc.js";
19
+ import "../mui_extended/Tab/index.e0653a0a.js";
20
+ const LabelItem = styled("span")(({
21
+ theme
22
+ }) => ({
23
+ marginLeft: theme.spacing(1)
24
+ }));
25
+ const ContainerProgress = styled("div")(({
26
+ theme
27
+ }) => ({
28
+ padding: theme.spacing(0.75, 0),
29
+ margin: theme.spacing(0, 1.25)
30
+ }));
31
+ const ContainerMenuItems = styled("div")(() => ({
32
+ display: "flex",
33
+ flexDirection: "column"
34
+ }));
35
+ function LanguagePopover() {
36
+ const {
37
+ currentLocale,
38
+ onChangeLocale
39
+ } = useLocales();
40
+ const {
41
+ domain_token
42
+ } = useEnvironment();
43
+ const {
44
+ networkOperation
45
+ } = useNetwork();
46
+ const [open, setOpen] = useState(null);
47
+ const [loading, setLoading] = useState(false);
48
+ const [allLocales, setAllLocales] = useState([]);
49
+ const handleOpen = (event) => {
50
+ setOpen(event.currentTarget);
51
+ };
52
+ const handleClose = () => {
53
+ setOpen(null);
54
+ };
55
+ useEffect(() => {
56
+ let mounted = true;
57
+ if (open === null || loading || allLocales.length > 0) {
58
+ return;
59
+ }
60
+ setLoading(true);
61
+ networkOperation({
62
+ method: "GET",
63
+ endPoint: `na/locales`,
64
+ parms: {
65
+ domain_token
66
+ }
67
+ }).then((response) => {
68
+ if (mounted) {
69
+ setAllLocales(response.data);
70
+ }
71
+ }).finally(() => {
72
+ setLoading(false);
73
+ });
74
+ return function cleanUp() {
75
+ mounted = false;
76
+ };
77
+ }, [open]);
78
+ return /* @__PURE__ */ jsxs(Fragment, {
79
+ children: [/* @__PURE__ */ jsx(ImageButton, {
80
+ className: "m4l_language_popover",
81
+ onClick: handleOpen,
82
+ sx: {
83
+ width: 40,
84
+ height: 40,
85
+ ...open && {
86
+ bgcolor: "action.selected"
87
+ }
88
+ },
89
+ src: currentLocale?.url_icon || "",
90
+ alt: currentLocale?.name,
91
+ width: "24px",
92
+ height: "24px",
93
+ skeletonVariant: "circle",
94
+ tooltip: "dddd"
95
+ }), /* @__PURE__ */ jsx(Popover, {
96
+ arrowType: "top-right",
97
+ open: Boolean(open),
98
+ anchorEl: open,
99
+ anchorOrigin: {
100
+ vertical: "bottom",
101
+ horizontal: "right"
102
+ },
103
+ onClose: handleClose,
104
+ sx: {
105
+ mt: 1.5,
106
+ ml: 0.75,
107
+ width: 180,
108
+ rowGap: "100px",
109
+ "& .MuiMenuItem-root": {
110
+ px: 1,
111
+ typography: "body2",
112
+ borderRadius: 0.75
113
+ }
114
+ },
115
+ children: /* @__PURE__ */ jsxs(ContainerMenuItems, {
116
+ children: [allLocales.length === 0 && /* @__PURE__ */ jsx(ContainerProgress, {
117
+ children: /* @__PURE__ */ jsx(CircularProgress, {
118
+ size: "20px"
119
+ })
120
+ }), allLocales.length > 0 && /* @__PURE__ */ jsx(Stack, {
121
+ spacing: 0.75,
122
+ children: allLocales.map((option) => /* @__PURE__ */ jsxs(MenuItem, {
123
+ selected: option.lang === currentLocale?.lang && option?.script === currentLocale?.script && option?.region === currentLocale?.region,
124
+ onClick: () => {
125
+ onChangeLocale(option);
126
+ handleClose();
127
+ },
128
+ children: [/* @__PURE__ */ jsx(Image, {
129
+ alt: option.name,
130
+ src: option.url_icon,
131
+ width: "24px",
132
+ height: "24px"
133
+ }), /* @__PURE__ */ jsx(LabelItem, {
134
+ children: option.name
135
+ })]
136
+ }, option.lang || option.script || option.region))
137
+ })]
138
+ })
139
+ })]
140
+ });
141
+ }
142
+ export {
143
+ LanguagePopover as L
144
+ };
@@ -1,5 +1,5 @@
1
1
  import { Suspense } from "react";
2
- import { P as PropagateLoader } from "../animate/PropagateLoader/index.eb401503.js";
2
+ import { P as PropagateLoader } from "../animate/PropagateLoader/index.be5b02c3.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  const Loadable = (Component) => function EmbededLoadable(props) {
5
5
  return /* @__PURE__ */ jsx(Suspense, {
@@ -1,12 +1,12 @@
1
1
  import { Dialog, Paper } from "@mui/material";
2
- import { c as cjs } from "../../react-draggable.3b5b6680.js";
3
- import { u as useModal } from "../../hooks/useModal/index.32da4dcb.js";
2
+ import { c as cjs } from "../../react-draggable.84d6b038.js";
3
+ import { u as useModal } from "../../hooks/useModal/index.d14edee3.js";
4
4
  import { styled } from "@mui/material/styles";
5
- import { a as getThemeVariantColor } from "../../utils/index.9dce2e2f.js";
6
- import { R as ResizeableWindow } from "../Resizeable/index.44a0dd46.js";
5
+ import { a as getThemeVariantColor } from "../../utils/index.899eb67b.js";
6
+ import { R as ResizeableWindow } from "../Resizeable/index.c96c0f09.js";
7
7
  import { useResponsiveDesktop } from "@m4l/graphics";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.ba86f72f.js";
9
+ import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.d3e1f36e.js";
10
10
  const WrapperDialog = styled(Dialog)(() => ({}));
11
11
  const Container = styled("div")(({ theme }) => ({
12
12
  display: "flex",
@@ -1,23 +1,25 @@
1
1
  import { useState, useEffect, useCallback, useMemo } from "react";
2
2
  import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
3
3
  import { styled } from "@mui/material/styles";
4
- import { D as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.156cc30c.js";
4
+ import { D as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.67260455.js";
5
5
  import { D as DateFormatter } from "../formatters/DateFormatter/index.80522f69.js";
6
6
  import { Tooltip, IconButton } from "@mui/material";
7
7
  import { useHostTheme, useResponsiveDesktop } from "@m4l/graphics";
8
- import { R as ReactJson } from "../../react-json-view.03ae95f5.js";
8
+ import { R as ReactJson } from "../../react-json-view.57125fcf.js";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
- import { u as useModal } from "../../hooks/useModal/index.32da4dcb.js";
11
- import { I as Icon } from "../Icon/index.1dbd3e58.js";
12
- import "../../react-draggable.3b5b6680.js";
13
- import "../ModalDialog/index.91777582.js";
14
- import "../Resizeable/index.44a0dd46.js";
15
- import { WindowBase } from "../../index.js";
16
- import "../CommonActions/components/Actions/index.ba86f72f.js";
10
+ import { u as useModal } from "../../hooks/useModal/index.d14edee3.js";
11
+ import { I as Icon } from "../Icon/index.8d754623.js";
12
+ import "../../react-draggable.84d6b038.js";
13
+ import "../ModalDialog/index.a684827f.js";
14
+ import "../Resizeable/index.c96c0f09.js";
15
+ import "../areas/contexts/DynamicMFParmsContext/index.668bc2e2.js";
16
+ import "../CommonActions/components/Actions/index.d3e1f36e.js";
17
17
  import "@mui/material/Button";
18
18
  import "react-hook-form";
19
19
  import "@mui/lab";
20
- import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.32f84995.js";
20
+ import "../modal/WindowConfirm.0b8a6818.js";
21
+ import { W as WindowBase } from "../modal/WindowBase.04439b8e.js";
22
+ import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.071aa795.js";
21
23
  const Container$1 = styled("div")(() => ({
22
24
  height: "100%",
23
25
  width: "100%",
@@ -1,7 +1,7 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { useModuleSkeleton } from "@m4l/core";
3
3
  import { Skeleton } from "@mui/material";
4
- import { I as Icon } from "../Icon/index.1dbd3e58.js";
4
+ import { I as Icon } from "../Icon/index.8d754623.js";
5
5
  import { jsxs, jsx } from "react/jsx-runtime";
6
6
  const WrapperPaper = styled("div")(({
7
7
  theme
@@ -1,18 +1,20 @@
1
1
  import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/core";
2
2
  import { styled, Skeleton, Autocomplete, TextField } from "@mui/material";
3
3
  import { useMemo } from "react";
4
- import { I as Icon } from "../Icon/index.1dbd3e58.js";
4
+ import { I as Icon } from "../Icon/index.8d754623.js";
5
5
  import { jsxs, jsx } from "react/jsx-runtime";
6
- import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.ba86f72f.js";
6
+ import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.d3e1f36e.js";
7
7
  import "@mui/material/Button";
8
8
  import "react-hook-form";
9
- import "../../contexts/ModalContext/index.0797eb17.js";
10
- import "../../react-draggable.3b5b6680.js";
11
- import "../ModalDialog/index.91777582.js";
12
- import "../Resizeable/index.44a0dd46.js";
9
+ import "../../contexts/ModalContext/index.b90eec94.js";
10
+ import "../../react-draggable.84d6b038.js";
11
+ import "../ModalDialog/index.a684827f.js";
12
+ import "../Resizeable/index.c96c0f09.js";
13
13
  import "@m4l/graphics";
14
- import "../../index.js";
14
+ import "../areas/contexts/DynamicMFParmsContext/index.668bc2e2.js";
15
+ import "../modal/WindowConfirm.0b8a6818.js";
15
16
  import "@mui/material/styles";
17
+ import "../modal/WindowBase.04439b8e.js";
16
18
  import "@mui/lab";
17
19
  const ContainerPeriod = styled("div")(({
18
20
  theme,
@@ -1,5 +1,5 @@
1
1
  import { styled } from "@mui/material/styles";
2
- import { R as ResizableBox } from "../../react-resizable.6eae0397.js";
2
+ import { R as ResizableBox } from "../../react-resizable.1d00271d.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  const WrapperResizeable = styled(ResizableBox)(({
5
5
  theme
@@ -1,4 +1,4 @@
1
- import { S as SplitterLayout } from "../../react-splitter-layout.873aece3.js";
1
+ import { S as SplitterLayout } from "../../react-splitter-layout.8b1655c8.js";
2
2
  import { styled } from "@mui/material/styles";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  const WrapperSplit = styled("div")(({
@@ -0,0 +1,30 @@
1
+ import { styled, useTheme } from "@mui/material";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { P as PropagateLoader$1 } from "../../../node_modules.416f1da3.js";
4
+ const WrapperPropageteLoader = styled("div")(({
5
+ theme
6
+ }) => ({
7
+ right: 0,
8
+ bottom: 0,
9
+ zIndex: 99999,
10
+ width: "100%",
11
+ height: "100%",
12
+ position: "fixed",
13
+ display: "flex",
14
+ alignItems: "center",
15
+ justifyContent: "center",
16
+ background: theme.palette.background.default
17
+ }));
18
+ const PropagateLoader = () => {
19
+ const {
20
+ palette
21
+ } = useTheme();
22
+ return /* @__PURE__ */ jsx(WrapperPropageteLoader, {
23
+ children: /* @__PURE__ */ jsx(PropagateLoader$1, {
24
+ color: palette.primary.main
25
+ })
26
+ });
27
+ };
28
+ export {
29
+ PropagateLoader as P
30
+ };
@@ -0,0 +1,112 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.82f16572.js";
3
+ import { u as useAreas } from "../../hooks/useArea/index.9b85ce24.js";
4
+ import { useEnvironment } from "@m4l/core";
5
+ import "@mui/material";
6
+ import "../../../Icon/index.8d754623.js";
7
+ import "react";
8
+ import { jsxs, jsx } from "react/jsx-runtime";
9
+ import "../../../mui_extended/Accordion/index.a541c71c.js";
10
+ import "../../../mui_extended/Avatar/index.fe06afd7.js";
11
+ import "react-router-dom";
12
+ import "@mui/material/Button";
13
+ import "@mui/lab";
14
+ import "../../../mui_extended/Button/index.86a155a2.js";
15
+ import "../../../mui_extended/Popover/index.53c77d23.js";
16
+ import "../../../mui_extended/MenuActions/index.ee17bddd.js";
17
+ import "../../../mui_extended/Pager/index.74d3f5fc.js";
18
+ import "../../../mui_extended/Tab/index.e0653a0a.js";
19
+ const WrapperAreasAdmin = styled("div")(({
20
+ theme
21
+ }) => ({
22
+ display: "flex",
23
+ width: "100%",
24
+ height: "100%",
25
+ flexGrow: "1",
26
+ position: "relative",
27
+ marginTop: theme.spacing(3)
28
+ }));
29
+ const WrapperAreaChips = styled("div")(() => ({
30
+ display: "flex",
31
+ flexDirection: "row",
32
+ border: "1px solid gray",
33
+ "&.active": {
34
+ border: "1px solid red"
35
+ }
36
+ }));
37
+ const AreaSelect = styled("div")(({
38
+ theme
39
+ }) => ({
40
+ height: "100%",
41
+ width: theme.spacing(1),
42
+ backgroundColor: theme.palette.background.default,
43
+ "&.active": {
44
+ backgroundColor: theme.palette.primary.main
45
+ }
46
+ }));
47
+ const AreaChip = (props) => {
48
+ const {
49
+ areaId,
50
+ active,
51
+ areaName
52
+ } = props;
53
+ const {
54
+ host_static_assets,
55
+ environment_assets
56
+ } = useEnvironment();
57
+ const {
58
+ deleteArea,
59
+ selectArea
60
+ } = useAreas();
61
+ return /* @__PURE__ */ jsxs(WrapperAreaChips, {
62
+ className: active ? "active" : "",
63
+ onClick: () => {
64
+ selectArea(areaId);
65
+ },
66
+ children: [/* @__PURE__ */ jsx(AreaSelect, {
67
+ className: active ? "active" : ""
68
+ }), /* @__PURE__ */ jsx("span", {
69
+ children: areaName
70
+ }), /* @__PURE__ */ jsx(IconButton, {
71
+ src: `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/users/assets/icons/edit.svg`,
72
+ size: "small",
73
+ onClick: () => {
74
+ }
75
+ }), /* @__PURE__ */ jsx(IconButton, {
76
+ src: `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/users/assets/icons/delete.svg`,
77
+ size: "small",
78
+ onClick: () => deleteArea(areaId)
79
+ })]
80
+ });
81
+ };
82
+ AreaChip.displayName = "AreaButtons";
83
+ function AreasAdmin() {
84
+ const {
85
+ areas,
86
+ currentArea,
87
+ addArea,
88
+ status
89
+ } = useAreas();
90
+ const {
91
+ host_static_assets,
92
+ environment_assets
93
+ } = useEnvironment();
94
+ if (status !== "loaded") {
95
+ return null;
96
+ }
97
+ return /* @__PURE__ */ jsxs(WrapperAreasAdmin, {
98
+ id: "ContainerTabs",
99
+ children: [areas.map((area) => /* @__PURE__ */ jsx(AreaChip, {
100
+ areaId: area.id,
101
+ active: area.id === currentArea,
102
+ areaName: area.name
103
+ }, area.id)), /* @__PURE__ */ jsx(IconButton, {
104
+ src: `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/users/assets/icons/add.svg`,
105
+ size: "small",
106
+ onClick: addArea
107
+ })]
108
+ });
109
+ }
110
+ export {
111
+ AreasAdmin as A
112
+ };
@@ -0,0 +1,43 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { A as Area } from "../index.7d6cd649.js";
3
+ import "react-grid-layout/css/styles.css";
4
+ import "../../../../react-resizable.1d00271d.js";
5
+ import { u as useAreas } from "../../hooks/useArea/index.9b85ce24.js";
6
+ import { useEffect } from "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ const ContainerAreas = styled("div")(({
9
+ theme
10
+ }) => ({
11
+ display: "flex",
12
+ width: "100%",
13
+ height: "100%",
14
+ flexGrow: "1",
15
+ position: "relative",
16
+ marginTop: theme.spacing(3)
17
+ }));
18
+ function AreasContainer() {
19
+ const {
20
+ areas,
21
+ currentArea,
22
+ status
23
+ } = useAreas();
24
+ useEffect(() => {
25
+ console.log("useEffect AreasContainer");
26
+ }, []);
27
+ if (status !== "loaded") {
28
+ return null;
29
+ }
30
+ console.log("Render AreasContainer", status, currentArea, areas);
31
+ return /* @__PURE__ */ jsx(ContainerAreas, {
32
+ id: "ContainerAreas",
33
+ children: areas.map((area) => {
34
+ return /* @__PURE__ */ jsx(Area, {
35
+ id: area.id,
36
+ active: currentArea === area.id
37
+ }, area.id);
38
+ })
39
+ });
40
+ }
41
+ export {
42
+ AreasContainer as A
43
+ };