@m4l/components 0.1.84 → 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.
Files changed (91) hide show
  1. package/@types/export.d.ts +25 -4
  2. package/components/AccountPopover/{index.bbeb9142.js → index.35c29a55.js} +23 -19
  3. package/components/AppBar/{index.43f8b54f.js → index.291da9fd.js} +8 -7
  4. package/components/CommonActions/components/ActionCancel/{index.29517521.js → index.67b91376.js} +1 -1
  5. package/components/CommonActions/components/ActionFormCancel/{index.89f1ac8e.js → index.d4503410.js} +16 -15
  6. package/components/CommonActions/components/ActionFormIntro/{index.bbc35e74.js → index.01ed67de.js} +1 -1
  7. package/components/CommonActions/components/ActionIntro/{index.a9420126.js → index.53e7fe2b.js} +1 -1
  8. package/components/CommonActions/components/Actions/{index.e70e8779.js → index.c91c27f9.js} +14 -13
  9. package/components/DataGrid/{index.1d0a3dec.js → index.37e14e83.js} +8 -7
  10. package/components/DataGrid/subcomponents/Actions/{index.a8fc9f6a.js → index.155c63af.js} +19 -18
  11. package/components/DynamicFilter/{index.912679cc.js → index.a8c2609c.js} +28 -27
  12. package/components/GridLayout/{index.c55f16eb.js → index.2383aaf9.js} +69 -10
  13. package/components/GridLayout/index.d.ts +1 -1
  14. package/components/GridLayout/subcomponents/Griditem/{index.6c68811f.js → index.58168132.js} +1 -1
  15. package/components/GridLayout/subcomponents/Responsive/{index.a6e33b8d.js → index.a6642437.js} +1 -1
  16. package/components/HelperText/{index.a47ff233.js → index.8b5911d1.js} +8 -7
  17. package/components/Icon/{index.d1402200.js → index.c3a579e7.js} +1 -1
  18. package/components/LanguagePopover/{index.807f5272.js → index.7681b08e.js} +8 -7
  19. package/components/ModalDialog/{index.42e804cf.js → index.b85ee3cb.js} +4 -4
  20. package/components/NavLink/{index.ff5a939c.js → index.bb879650.js} +8 -7
  21. package/components/NoItemSelected/classes/constants.d.ts +1 -0
  22. package/components/NoItemSelected/classes/index.d.ts +6 -0
  23. package/components/NoItemSelected/classes/types.d.ts +6 -0
  24. package/components/NoItemSelected/{index.23dfc897.js → index.a2807715.js} +46 -31
  25. package/components/NoItemSelected/index.d.ts +2 -1
  26. package/components/NoItemSelected/types.d.ts +4 -0
  27. package/components/ObjectLogs/{index.dc02715d.js → index.2ed38a84.js} +21 -18
  28. package/components/PaperForm/{index.249c2404.js → index.989377a5.js} +1 -1
  29. package/components/Period/{index.e129cdec.js → index.061c9b2f.js} +15 -14
  30. package/components/PropertyValue/{index.93e40532.js → index.ac46f441.js} +1 -1
  31. package/components/ScrollBar/{index.d4410cb5.js → index.1247c1c5.js} +38 -9
  32. package/components/SideBar/{index.327679a6.js → index.e0587639.js} +111 -50
  33. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +5 -0
  34. package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
  35. package/components/areas/components/AreasAdmin/classes/types.d.ts +2 -0
  36. package/components/areas/components/AreasAdmin/{index.8ab71eb9.js → index.f505897a.js} +102 -53
  37. package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
  38. package/components/areas/components/AreasViewer/classes/types.d.ts +1 -1
  39. package/components/areas/components/AreasViewer/{index.933e506b.js → index.cacec884.js} +71 -125
  40. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index.d.ts +4 -0
  41. package/components/areas/components/{index.9e48d8ff.js → index.6d5dfeec.js} +12 -11
  42. package/components/areas/contexts/AreasContext/helper.d.ts +3 -3
  43. package/components/areas/contexts/AreasContext/{index.230d1584.js → index.6f56b1da.js} +91 -78
  44. package/components/areas/contexts/AreasContext/types.d.ts +20 -8
  45. package/components/areas/contexts/{index.f494e241.js → index.999e8b1e.js} +1 -1
  46. package/components/areas/hooks/useAreas/{index.b8449343.js → index.4baec91c.js} +1 -1
  47. package/components/areas/{index.32db4fa7.js → index.3088f99e.js} +12 -11
  48. package/components/formatters/BooleanFormatter/{index.b2f02bc4.js → index.e7f0b76a.js} +1 -1
  49. package/components/formatters/{index.f9ad88b4.js → index.d911949d.js} +2 -2
  50. package/components/hook-form/RHFAutocomplete/{index.d5afb409.js → index.aca6984f.js} +9 -8
  51. package/components/hook-form/RHFAutocompleteAsync/{index.a4f00088.js → index.8511bcf8.js} +1 -1
  52. package/components/hook-form/RHFCheckbox/{index.9bf6edb0.js → index.0f45e6b0.js} +9 -8
  53. package/components/hook-form/RHFDateTime/{index.a2c1ed2c.js → index.07412ef0.js} +9 -8
  54. package/components/hook-form/RHFPeriod/{index.b5204ce2.js → index.15b8f11e.js} +2 -2
  55. package/components/hook-form/RHFTextField/{index.5a0fa776.js → index.94c8c59b.js} +3 -3
  56. package/components/hook-form/RHFUpload/{index.b36539d6.js → index.7ef1e124.js} +9 -8
  57. package/components/modal/{WindowBase.37158e8d.js → WindowBase.d485315d.js} +10 -9
  58. package/components/modal/{WindowConfirm.a68aa0f1.js → WindowConfirm.3d9cd6e1.js} +17 -16
  59. package/components/modal/{index.6f281ef8.js → index.c7e4beba.js} +14 -13
  60. package/components/mui_extended/Accordion/{index.46771196.js → index.854f4c90.js} +3 -3
  61. package/components/mui_extended/Badge/classes/constants.d.ts +1 -1
  62. package/components/mui_extended/Badge/{index.cad260fe.js → index.8c2b8b66.js} +1 -1
  63. package/components/mui_extended/IconButton/{index.62aea582.js → index.be111a34.js} +1 -1
  64. package/components/mui_extended/MenuActions/{index.2493b1b1.js → index.b16e84c1.js} +7 -4
  65. package/components/mui_extended/MenuActions/types.d.ts +1 -0
  66. package/components/mui_extended/Pager/{index.a7f87c96.js → index.5b77fa4c.js} +1 -1
  67. package/components/mui_extended/Stack/Stack.d.ts +3 -0
  68. package/components/mui_extended/Stack/classes/constants.d.ts +1 -0
  69. package/components/mui_extended/Stack/classes/index.d.ts +6 -0
  70. package/components/mui_extended/Stack/classes/types.d.ts +6 -0
  71. package/components/mui_extended/Stack/index.0e53197c.js +39 -0
  72. package/components/mui_extended/Stack/index.d.ts +2 -0
  73. package/components/mui_extended/Stack/types.d.ts +2 -0
  74. package/components/mui_extended/Tab/{index.756fe693.js → index.c1dc7bbf.js} +42 -9
  75. package/components/mui_extended/Tabs/Tabs.d.ts +3 -0
  76. package/components/mui_extended/Tabs/classes/constants.d.ts +1 -0
  77. package/components/mui_extended/Tabs/classes/index.d.ts +6 -0
  78. package/components/mui_extended/Tabs/classes/types.d.ts +6 -0
  79. package/components/mui_extended/Tabs/index.d.ts +1 -0
  80. package/components/mui_extended/index.d.ts +2 -0
  81. package/components/mui_extended/{index.ba27649e.js → index.d1ee9a6a.js} +8 -7
  82. package/contexts/ModalContext/{index.51da83de.js → index.1ea79d7e.js} +1 -1
  83. package/contexts/RHFormContext/{index.b9266262.js → index.e019f87d.js} +1 -1
  84. package/hooks/useModal/{index.7611bf21.js → index.c906706c.js} +1 -1
  85. package/index.js +67 -65
  86. package/package.json +1 -1
  87. package/{vendor.1af105d6.js → vendor.f27b86c9.js} +50 -50
  88. package/components/GridLayout/subcomponents/SizeProvider/index.bfa05dfa.js +0 -62
  89. /package/components/GridLayout/subcomponents/{SizeProvider → WidthProvider}/index.d.ts +0 -0
  90. /package/components/areas/components/{AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header → AreasAdmin}/subcomponents/PanelWindowPopUp/index.d.ts +0 -0
  91. /package/components/areas/components/{AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header → AreasAdmin}/subcomponents/PanelWindowPopUp/types.d.ts +0 -0
@@ -13,11 +13,11 @@ 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.b8449343.js";
16
+ import { u as useAreasStore } from "../../hooks/useAreas/index.4baec91c.js";
17
17
  import { useModuleDictionary, useEnvironment, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
18
- import { I as IconButton } from "../../../mui_extended/IconButton/index.62aea582.js";
19
- import "../../../mui_extended/Accordion/index.46771196.js";
20
- import { I as Icon } from "../../../Icon/index.d1402200.js";
18
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.be111a34.js";
19
+ import "../../../mui_extended/Accordion/index.854f4c90.js";
20
+ import { I as Icon } from "../../../Icon/index.c3a579e7.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";
@@ -25,14 +25,15 @@ import "react-router-dom";
25
25
  import "@mui/material/Button";
26
26
  import { B as Button } from "../../../mui_extended/Button/index.40af964e.js";
27
27
  import "../../../mui_extended/CheckBox.38abccd8.js";
28
- import "../../../mui_extended/Badge/index.cad260fe.js";
29
- import "../../../Image/index.c18ebf5a.js";
28
+ import "../../../mui_extended/Badge/index.8c2b8b66.js";
29
+ import { I as Image } from "../../../Image/index.c18ebf5a.js";
30
30
  import "@mui/lab";
31
- import { M as MenuActions, a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.2493b1b1.js";
31
+ import { M as MenuActions, a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.b16e84c1.js";
32
32
  import "../../../mui_extended/Popover/index.9f35d0eb.js";
33
- import "../../../mui_extended/Pager/index.a7f87c96.js";
33
+ import "../../../mui_extended/Stack/index.0e53197c.js";
34
+ import "../../../mui_extended/Tab/index.c1dc7bbf.js";
35
+ import "../../../mui_extended/Pager/index.5b77fa4c.js";
34
36
  import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/graphics";
35
- import "../../../mui_extended/Tab/index.756fe693.js";
36
37
  import "../../../mui_extended/Tooltip/index.5a795dcd.js";
37
38
  import { I as ICONS } from "../../icons.8266ccc8.js";
38
39
  import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
@@ -41,58 +42,57 @@ import debounce from "lodash/debounce";
41
42
  import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
42
43
  import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
43
44
  import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
44
- import "../../../../contexts/ModalContext/index.51da83de.js";
45
- import "../../../../contexts/RHFormContext/index.b9266262.js";
46
- import "../../../GridLayout/subcomponents/Griditem/index.6c68811f.js";
47
- import "../../../GridLayout/index.c55f16eb.js";
48
- import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.a6e33b8d.js";
49
- import { S as SizeProvider } from "../../../GridLayout/subcomponents/SizeProvider/index.bfa05dfa.js";
50
- import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.230d1584.js";
45
+ import "../../../../contexts/ModalContext/index.1ea79d7e.js";
46
+ import "../../../../contexts/RHFormContext/index.e019f87d.js";
47
+ import "../../../GridLayout/subcomponents/Griditem/index.58168132.js";
48
+ import { S as SizeProvider } from "../../../GridLayout/index.2383aaf9.js";
49
+ import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.a6642437.js";
50
+ import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.6f56b1da.js";
51
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.8ab71eb9.js";
56
- import "../../../ScrollBar/index.d4410cb5.js";
55
+ import "../AreasAdmin/index.f505897a.js";
56
+ import "../../../ScrollBar/index.1247c1c5.js";
57
57
  import "zustand";
58
58
  import "react-hook-form";
59
- import "../../../hook-form/RHFAutocomplete/index.d5afb409.js";
60
- import "../../../HelperText/index.a47ff233.js";
61
- import "../../../hook-form/RHFAutocompleteAsync/index.a4f00088.js";
62
- import "../../../hook-form/RHFCheckbox/index.9bf6edb0.js";
59
+ import "../../../hook-form/RHFAutocomplete/index.aca6984f.js";
60
+ import "../../../HelperText/index.8b5911d1.js";
61
+ import "../../../hook-form/RHFAutocompleteAsync/index.8511bcf8.js";
62
+ import "../../../hook-form/RHFCheckbox/index.0f45e6b0.js";
63
63
  import "@mui/x-date-pickers";
64
- import "../../../hook-form/RHFDateTime/index.a2c1ed2c.js";
65
- import "../../../hook-form/RHFTextField/index.5a0fa776.js";
66
- import "../../../hook-form/RHFPeriod/index.b5204ce2.js";
67
- import "../../../Period/index.e129cdec.js";
68
- import "../../../CommonActions/components/Actions/index.e70e8779.js";
64
+ import "../../../hook-form/RHFDateTime/index.07412ef0.js";
65
+ import "../../../hook-form/RHFTextField/index.94c8c59b.js";
66
+ import "../../../hook-form/RHFPeriod/index.15b8f11e.js";
67
+ import "../../../Period/index.061c9b2f.js";
68
+ import "../../../CommonActions/components/Actions/index.c91c27f9.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.6f281ef8.js";
71
+ import "../../../modal/index.c7e4beba.js";
72
72
  import "lodash/isString";
73
73
  import "react-dropzone";
74
- import "../../../hook-form/RHFUpload/index.b36539d6.js";
75
- import "../../../DataGrid/index.1d0a3dec.js";
74
+ import "../../../hook-form/RHFUpload/index.7ef1e124.js";
75
+ import "../../../DataGrid/index.37e14e83.js";
76
76
  import "react-dnd";
77
77
  import "react-dnd-html5-backend";
78
- import "../../../DataGrid/subcomponents/Actions/index.a8fc9f6a.js";
78
+ import "../../../DataGrid/subcomponents/Actions/index.155c63af.js";
79
79
  import "../../../DataGrid/subcomponents/editors/TextEditor/index.91380a55.js";
80
- import "../../../DynamicFilter/index.912679cc.js";
80
+ import "../../../DynamicFilter/index.a8c2609c.js";
81
81
  import "yup";
82
82
  import "lodash";
83
- import "../../../LanguagePopover/index.807f5272.js";
84
- import "../../../NavLink/index.ff5a939c.js";
85
- import "../../../NoItemSelected/index.23dfc897.js";
86
- import "../../../ObjectLogs/index.dc02715d.js";
83
+ import "../../../LanguagePopover/index.7681b08e.js";
84
+ import "../../../NavLink/index.bb879650.js";
85
+ import "../../../NoItemSelected/index.a2807715.js";
86
+ import "../../../ObjectLogs/index.2ed38a84.js";
87
87
  import "../../../../react-json-view.57125fcf.js";
88
- import "../../../PaperForm/index.249c2404.js";
88
+ import "../../../PaperForm/index.989377a5.js";
89
89
  import "../../../Page/index.4237c241.js";
90
- import "../../../PropertyValue/index.93e40532.js";
90
+ import "../../../PropertyValue/index.ac46f441.js";
91
91
  import "../../../SplitLayout/index.9ef430f6.js";
92
92
  import "../../../../react-splitter-layout.8b1655c8.js";
93
- import "../../../SideBar/index.327679a6.js";
94
- import "../../../AppBar/index.43f8b54f.js";
95
- import "../../../AccountPopover/index.bbeb9142.js";
93
+ import "../../../SideBar/index.e0587639.js";
94
+ import "../../../AppBar/index.291da9fd.js";
95
+ import "../../../AccountPopover/index.35c29a55.js";
96
96
  const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
97
97
  "root",
98
98
  "areaRoot",
@@ -131,7 +131,7 @@ const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
131
131
  "panelWindowsRoot",
132
132
  "panelWindowsButtonContainer",
133
133
  "containerLinearProgress",
134
- "areasPopoverListWindows",
134
+ "resizeHandle",
135
135
  "selected",
136
136
  "colapsed",
137
137
  "selectedWindow",
@@ -180,7 +180,7 @@ const useAreasViewerUtilityClasses = (ownerState) => {
180
180
  windowToastyClose: ["windowToastyClose"],
181
181
  panelWindowsRoot: ["panelWindowsRoot"],
182
182
  panelWindowsButtonContainer: ["panelWindowsButtonContainer"],
183
- areasPopoverListWindows: ["areasPopoverListWindows"]
183
+ resizeHandle: ["resizeHandle"]
184
184
  };
185
185
  return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_VIEWER_CLASS_NAME), {});
186
186
  };
@@ -604,56 +604,6 @@ const WindowPopUpsList = (props) => {
604
604
  return null;
605
605
  }
606
606
  };
607
- const PanelWindowPopUp = (props) => {
608
- const {
609
- currentAreaId
610
- } = props;
611
- const {
612
- host_static_assets,
613
- environment_assets
614
- } = useEnvironment();
615
- const windowsLayouts = useAreasStore((state) => state.hashAreas[currentAreaId].layoutItemsIds.filter((li) => state.hashWindows[li].emergeType === "layout").map((lim) => {
616
- const w = state.hashWindows[lim];
617
- return {
618
- i: w.windowId,
619
- url_icon: w.url_icon,
620
- title: w.title
621
- };
622
- }), shallow);
623
- const theme = useTheme();
624
- const {
625
- maximizeLayout
626
- } = useAreasStore((state) => state.areaActions);
627
- const onTouched = (layoutId) => {
628
- maximizeLayout(currentAreaId, layoutId);
629
- };
630
- const menuActions = windowsLayouts.map((element) => {
631
- return {
632
- onClick: () => onTouched(element.i),
633
- label: element.title,
634
- urlIcon: element.url_icon
635
- };
636
- });
637
- return /* @__PURE__ */ jsx(Fragment, {
638
- children: menuActions.length > 0 ? /* @__PURE__ */ jsx(MenuActions, {
639
- urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MODULE}`,
640
- arrowType: "no-arrow",
641
- marginTop: "12px!important",
642
- marginLeft: "14px!important",
643
- anchorOrigin: {
644
- vertical: "bottom",
645
- horizontal: "right"
646
- },
647
- transformOrigin: {
648
- vertical: "top",
649
- horizontal: "right"
650
- },
651
- menuActions,
652
- className: areasViewerClasses.areasPopoverListWindows,
653
- menuActionSx: theme.components?.M4LAreasAdminMobilePopoverOptions?.styleOverrides
654
- }) : null
655
- });
656
- };
657
607
  function Header(props) {
658
608
  const {
659
609
  areaId,
@@ -672,12 +622,6 @@ function Header(props) {
672
622
  window2.fnQueryClose
673
623
  ];
674
624
  }, shallow);
675
- const currentAreaId = useAreasStore((state) => state.currentAreaId, shallow);
676
- const areas = useAreasStore((state) => state.areas.map((a) => ({
677
- id: a,
678
- name: state.hashAreas[a].name
679
- })), shallow);
680
- const currentArea = areas.find((area) => area.id === currentAreaId);
681
625
  const {
682
626
  saveModuleCookies,
683
627
  resetModuleCookies
@@ -769,9 +713,7 @@ function Header(props) {
769
713
  horizontal: "right"
770
714
  },
771
715
  menuActions
772
- }), maximizedId && emergeType === "layout" && currentArea ? /* @__PURE__ */ jsx(PanelWindowPopUp, {
773
- currentAreaId: currentArea.id
774
- }) : null, !colapsed && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
716
+ }), !colapsed && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
775
717
  className: "m4l_draggableCancel",
776
718
  onClick: maxNormalize,
777
719
  "aria-label": "click",
@@ -1375,29 +1317,31 @@ const Window = (props) => {
1375
1317
  });
1376
1318
  };
1377
1319
  React__default.memo(Window);
1378
- const ResponsiveGridLayout = SizeProvider(Responsive);
1379
- const AreaGridLayout = (props) => {
1320
+ const ResizeHandle = React__default.forwardRef((props, ref) => {
1380
1321
  const {
1381
- areaId
1322
+ handleAxis,
1323
+ ...restProps
1382
1324
  } = props;
1383
1325
  const {
1384
1326
  host_static_assets,
1385
1327
  environment_assets
1386
1328
  } = useEnvironment();
1387
- const ResizeHandle = React__default.forwardRef((props2, ref) => {
1388
- const {
1389
- handleAxis,
1390
- ...restProps
1391
- } = props2;
1392
- return /* @__PURE__ */ jsx("div", {
1393
- ref,
1394
- className: `react-resizable-handle react-resizable-handle-${handleAxis}`,
1395
- ...restProps,
1396
- children: /* @__PURE__ */ jsx(Icon, {
1397
- src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/control_size.svg`
1398
- })
1399
- });
1329
+ return /* @__PURE__ */ jsx("div", {
1330
+ ref,
1331
+ className: clsx(`react-resizable-handle react-resizable-handle-${handleAxis}`, areasViewerClasses.resizeHandle),
1332
+ ...restProps,
1333
+ children: /* @__PURE__ */ jsx(Image, {
1334
+ width: "12px",
1335
+ height: "12px",
1336
+ src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/control_size.svg`
1337
+ })
1400
1338
  });
1339
+ });
1340
+ const ResponsiveGridLayout = SizeProvider(Responsive);
1341
+ const AreaGridLayout = (props) => {
1342
+ const {
1343
+ areaId
1344
+ } = props;
1401
1345
  const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].layoutItemsIds, shallow);
1402
1346
  const layouts = useAreasStore((state) => state.hashAreas[areaId].layouts, shallow);
1403
1347
  const breakpoints = useAreasStore((state) => state.hashAreas[areaId].breakpoints, shallow);
@@ -1599,15 +1543,17 @@ const WindowModal = (props) => {
1599
1543
  };
1600
1544
  const MemonizedWindowModal = React__default.memo(WindowModal);
1601
1545
  function AreasViewer() {
1602
- const areas = useAreasStore((state) => state.areas, shallow);
1603
- const windowsModals = useAreasStore((state) => state.windowsModals);
1604
- const hashWindowsModals = useAreasStore((state) => state.hashWindowsModals);
1605
- const currentArea = useAreasStore((state) => state.currentAreaId);
1606
- const status = useAreasStore((state) => state.ownerState.status);
1607
- const classesRoot = useAreasStore((state) => state.viwerClasses.root);
1546
+ const areas = useAreasStore((state2) => state2.areasIds, shallow);
1547
+ const windowsModals = useAreasStore((state2) => state2.windowsModals);
1548
+ const hashWindowsModals = useAreasStore((state2) => state2.hashWindowsModals);
1549
+ const currentArea = useAreasStore((state2) => state2.currentAreaId);
1550
+ const status = useAreasStore((state2) => state2.ownerState.status);
1551
+ const classesRoot = useAreasStore((state2) => state2.viwerClasses.root);
1552
+ const state = useAreasStore((state2) => state2);
1553
+ console.log("Areas state >>>>", state);
1608
1554
  const {
1609
1555
  init
1610
- } = useAreasStore((state) => state.areasActions);
1556
+ } = useAreasStore((state2) => state2.areasActions);
1611
1557
  return /* @__PURE__ */ jsxs(Fragment, {
1612
1558
  children: [/* @__PURE__ */ jsx(AreasViewerRoot, {
1613
1559
  className: classesRoot,
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare const ResizeHandle: React.ForwardRefExoticComponent<{
3
+ handleAxis?: string | undefined;
4
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -1,30 +1,31 @@
1
1
  import "react";
2
2
  import "@m4l/core";
3
3
  import "@mui/material";
4
- import "../../Icon/index.d1402200.js";
4
+ import "../../Icon/index.c3a579e7.js";
5
5
  import "clsx";
6
6
  import "react/jsx-runtime";
7
- import "../../mui_extended/IconButton/index.62aea582.js";
7
+ import "../../mui_extended/IconButton/index.be111a34.js";
8
8
  import "@m4l/graphics";
9
9
  import "zustand";
10
- import "../contexts/AreasContext/index.230d1584.js";
11
- import "./AreasAdmin/index.8ab71eb9.js";
10
+ import "../contexts/AreasContext/index.6f56b1da.js";
11
+ import "./AreasAdmin/index.f505897a.js";
12
12
  import "zustand/shallow";
13
- import "../../ScrollBar/index.d4410cb5.js";
14
- import "../../mui_extended/Accordion/index.46771196.js";
13
+ import "../../ScrollBar/index.1247c1c5.js";
14
+ import "../../mui_extended/Accordion/index.854f4c90.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
19
  import "../../mui_extended/Button/index.40af964e.js";
20
20
  import "../../mui_extended/CheckBox.38abccd8.js";
21
- import "../../mui_extended/Badge/index.cad260fe.js";
21
+ import "../../mui_extended/Badge/index.8c2b8b66.js";
22
22
  import "../../Image/index.c18ebf5a.js";
23
23
  import "@mui/lab";
24
- import "../../mui_extended/MenuActions/index.2493b1b1.js";
24
+ import "../../mui_extended/MenuActions/index.b16e84c1.js";
25
25
  import "../../mui_extended/Popover/index.9f35d0eb.js";
26
- import "../../mui_extended/Pager/index.a7f87c96.js";
27
- import "../../mui_extended/Tab/index.756fe693.js";
26
+ import "../../mui_extended/Stack/index.0e53197c.js";
27
+ import "../../mui_extended/Tab/index.c1dc7bbf.js";
28
+ import "../../mui_extended/Pager/index.5b77fa4c.js";
28
29
  import "../../mui_extended/Tooltip/index.5a795dcd.js";
29
- import "./AreasViewer/index.933e506b.js";
30
+ import "./AreasViewer/index.cacec884.js";
30
31
  import "../../LinearProgressIndeterminate/index.60dabc06.js";
@@ -2,8 +2,8 @@ import { WritableDraft } from 'immer/dist/internal';
2
2
  import type { Area, AreasStateWithActions } from './types';
3
3
  import type { WindowState, WindowStateProps } from '../../types';
4
4
  export declare const ROW_HEIGTH_GRIDLAYOUT = 20;
5
- export declare const PADDING_GRIDLAYOUT = 3;
6
- export declare const MARGIN_GRIDLAYOUT = 3;
5
+ export declare const PADDING_GRIDLAYOUT = 4;
6
+ export declare const MARGIN_GRIDLAYOUT = 4;
7
7
  export declare const DEBOUCED_SAVE_TIME = 500;
8
8
  export declare const THROTTLE_RESIZE_TIME = 300;
9
9
  export declare const COOKIE_BREAKPOINT_LAYOUTS = "layoutPros";
@@ -31,7 +31,7 @@ export declare const DEFAULT_LAYOUTS: {
31
31
  };
32
32
  import { Layouts } from '../../../GridLayout/types';
33
33
  export declare const DEFAULT_WINDOW: Pick<WindowState, 'status' | 'moduleActions' | 'cookies' | 'loading' | 'toasties' | 'toastyCount' | 'hashToasties'>;
34
- export declare const DEFAULT_AREA: Omit<Area, 'id' | 'name' | 'loadWindows' | 'viewMode'>;
34
+ export declare const DEFAULT_AREA: Omit<Area, 'id' | 'name' | 'viewMode'>;
35
35
  /**
36
36
  * @description Función de apoyo que crea un área de trabajo,
37
37
  * El Id del area sale de concatenar la fecha actual con un número aleeatorio de 3 digitos
@@ -5,19 +5,20 @@ 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.933e506b.js";
9
- import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.8ab71eb9.js";
8
+ import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.cacec884.js";
9
+ import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.f505897a.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";
13
- import "../../../GridLayout/subcomponents/Griditem/index.6c68811f.js";
14
- import { z as isEqualLayouts } from "../../../GridLayout/index.c55f16eb.js";
13
+ import "../../../GridLayout/subcomponents/Griditem/index.58168132.js";
14
+ import { z as isEqualLayouts } from "../../../GridLayout/index.2383aaf9.js";
15
15
  import { jsx } from "react/jsx-runtime";
16
- import { a as addLayoutItemToBreakPointIfNoExists, b as addLayoutItemToBreakPoints, c as cloneLayouts } from "../../../GridLayout/subcomponents/Responsive/index.a6e33b8d.js";
16
+ import { a as addLayoutItemToBreakPointIfNoExists, b as addLayoutItemToBreakPoints, c as cloneLayouts } from "../../../GridLayout/subcomponents/Responsive/index.a6642437.js";
17
17
  import { debounce, cloneDeep } from "lodash";
18
+ import { useNavigate } from "react-router-dom";
18
19
  const ROW_HEIGTH_GRIDLAYOUT = 20;
19
- const PADDING_GRIDLAYOUT = 3;
20
- const MARGIN_GRIDLAYOUT = 3;
20
+ const PADDING_GRIDLAYOUT = 4;
21
+ const MARGIN_GRIDLAYOUT = 4;
21
22
  const DEBOUCED_SAVE_TIME = 500;
22
23
  const COOKIE_BREAKPOINT_LAYOUTS = "layoutPros";
23
24
  const COOKIE_WINDOWS = "windows";
@@ -41,18 +42,19 @@ const DEFAULT_AREA = {
41
42
  currentLayoutId: "",
42
43
  currentPopUpId: "",
43
44
  breakpoints: BREAKPOINT_SIZES,
44
- cols: NORMALIZED_COLS
45
+ cols: NORMALIZED_COLS,
46
+ loadWindows: false
45
47
  };
46
48
  const addArea = (state) => {
47
49
  const areaId = `area_${new Date().getTime()}_${(Math.random() * 1e3).toFixed(0)}`;
48
50
  const labelNewArea = state.getLabel(getAreasDictionary(DICCTIONARY.label_new_area));
49
51
  let isFree;
50
52
  let name = `${labelNewArea} 1`;
51
- for (let indexNames = 1; indexNames <= state.areas.length + 1; indexNames++) {
52
- name = `${labelNewArea} ${indexNames + state.areas.length}`;
53
+ for (let indexNames = 1; indexNames <= state.areasIds.length + 1; indexNames++) {
54
+ name = `${labelNewArea} ${indexNames + state.areasIds.length}`;
53
55
  isFree = true;
54
- for (let index = 0; index < state.areas.length; index++) {
55
- if (state.hashAreas[state.areas[index]].name === name) {
56
+ for (let index = 0; index < state.areasIds.length; index++) {
57
+ if (state.hashAreas[state.areasIds[index]].name === name) {
56
58
  isFree = false;
57
59
  break;
58
60
  }
@@ -64,11 +66,11 @@ const addArea = (state) => {
64
66
  const newArea = {
65
67
  id: areaId,
66
68
  name,
67
- loadWindows: false,
68
69
  ...DEFAULT_AREA
69
70
  };
70
- state.areas.push(areaId);
71
+ state.areasIds.push(areaId);
71
72
  state.hashAreas[areaId] = newArea;
73
+ state.currentModuleId = "";
72
74
  if (state.loadAreasFromNetwork) {
73
75
  state.networkOperation({
74
76
  method: "POST",
@@ -250,7 +252,7 @@ const createAreasStore = (initProps) => {
250
252
  adminClasses: useAreasAdminUtilityClasses(initProps.ownerState),
251
253
  currentAreaId: "",
252
254
  currentModuleId: "",
253
- areas: [],
255
+ areasIds: [],
254
256
  hashAreas: {},
255
257
  hashWindows: {},
256
258
  hashWindowsModals: {},
@@ -263,63 +265,49 @@ const createAreasStore = (initProps) => {
263
265
  ...startProps,
264
266
  areasActions: {
265
267
  init: () => {
266
- if (get().ownerState.status === "init") {
267
- if (!get().loadAreasFromNetwork) {
268
- get().areasActions.addArea();
269
- set((state) => {
270
- state.ownerState.status = "loaded";
271
- updateOwnerStateClasses(state);
272
- });
273
- } else {
274
- set((state) => {
275
- state.ownerState.status = "loading";
276
- updateOwnerStateClasses(state);
277
- state.networkOperation({
278
- method: "GET",
279
- endPoint: `areas`,
280
- parms: {},
281
- toastSuccess: false
282
- }).then((response) => {
283
- set((otherState) => {
284
- if (response?.data && Array.isArray(response.data) && response.data.length > 0) {
285
- for (let i = 0; i < response.data.length; i++) {
286
- const newArea = {
287
- ...DEFAULT_AREA,
288
- ...response.data[i],
289
- loadWindows: true
290
- };
291
- otherState.hashAreas[newArea.id] = newArea;
292
- otherState.areas.push(newArea.id);
293
- }
294
- } else {
295
- addArea(otherState);
296
- }
297
- });
298
- }).finally(() => {
299
- set((state2) => {
300
- state2.ownerState.status = "loaded";
301
- updateOwnerStateClasses(state2);
302
- });
303
- if (get().areas.length > 0) {
304
- get().areasActions.selectArea(get().areas[0]);
305
- }
306
- });
307
- });
308
- }
268
+ if (get().ownerState.status !== "init") {
269
+ return;
270
+ }
271
+ if (!get().loadAreasFromNetwork) {
272
+ get().areasActions.addArea();
273
+ set((state) => {
274
+ state.ownerState.status = "loaded";
275
+ updateOwnerStateClasses(state);
276
+ });
277
+ return;
309
278
  }
310
- },
311
- editArea: (areaId, newName) => {
312
279
  set((state) => {
313
- if (state.hashAreas[areaId]) {
314
- purgeToastsArea(state, areaId);
315
- state.hashAreas[areaId].name = newName;
316
- state.networkOperation({
317
- method: "PATCH",
318
- endPoint: `areas/${areaId}`,
319
- data: { name: newName },
320
- toastSuccess: false,
321
- toastError: false
322
- });
280
+ state.ownerState.status = "loading";
281
+ updateOwnerStateClasses(state);
282
+ });
283
+ get().networkOperation({
284
+ method: "GET",
285
+ endPoint: `areas`,
286
+ parms: {},
287
+ toastSuccess: false
288
+ }).then((response) => {
289
+ set((state) => {
290
+ if (response?.data && Array.isArray(response.data) && response.data.length > 0) {
291
+ for (let i = 0; i < response.data.length; i++) {
292
+ const newArea = {
293
+ ...DEFAULT_AREA,
294
+ ...response.data[i],
295
+ loadWindows: true
296
+ };
297
+ state.hashAreas[newArea.id] = newArea;
298
+ state.areasIds.push(newArea.id);
299
+ }
300
+ } else {
301
+ addArea(state);
302
+ }
303
+ });
304
+ }).finally(() => {
305
+ set((state) => {
306
+ state.ownerState.status = "loaded";
307
+ updateOwnerStateClasses(state);
308
+ });
309
+ if (get().areasIds.length > 0 && get().currentAreaId === "") {
310
+ get().areasActions.selectArea(get().areasIds[0]);
323
311
  }
324
312
  });
325
313
  },
@@ -331,25 +319,42 @@ const createAreasStore = (initProps) => {
331
319
  get().areasActions.selectArea(newId);
332
320
  return newId;
333
321
  },
322
+ editArea: (areaId, newName) => {
323
+ set((state) => {
324
+ if (state.hashAreas[areaId]) {
325
+ state.hashAreas[areaId].name = newName;
326
+ if (state.loadAreasFromNetwork) {
327
+ state.networkOperation({
328
+ method: "PATCH",
329
+ endPoint: `areas/${areaId}`,
330
+ data: { name: newName },
331
+ toastSuccess: false,
332
+ toastError: false
333
+ });
334
+ }
335
+ }
336
+ });
337
+ },
334
338
  deleteArea: (areaId) => {
335
339
  let selectNewAreaId = "";
336
340
  set((state) => {
337
- const removeIndex = state.areas.indexOf(areaId);
341
+ const ha = state.hashAreas[areaId];
342
+ if (!ha || state.areasIds.length < 2) {
343
+ return;
344
+ }
345
+ purgeToastsArea(state, areaId);
346
+ const removeIndex = state.areasIds.indexOf(areaId);
338
347
  if (removeIndex > -1) {
339
348
  for (const key in state.hashWindows) {
340
349
  if (state.hashWindows[key].areaId === areaId) {
341
350
  delete state.hashWindows[key];
342
351
  }
343
352
  }
344
- state.areas.splice(removeIndex, 1);
353
+ state.areasIds.splice(removeIndex, 1);
345
354
  delete state.hashAreas[areaId];
346
355
  }
347
356
  if (state.currentAreaId === areaId) {
348
- if (state.areas.length > 0) {
349
- selectNewAreaId = state.areas[0];
350
- } else {
351
- state.currentAreaId = "";
352
- }
357
+ selectNewAreaId = state.areasIds[0];
353
358
  }
354
359
  if (state.loadAreasFromNetwork) {
355
360
  state.networkOperation({
@@ -652,6 +657,12 @@ const createAreasStore = (initProps) => {
652
657
  selectLayout: (areaId, layoutId) => {
653
658
  set((state) => {
654
659
  const area = state.hashAreas[areaId];
660
+ const moduleId = state.hashWindows[layoutId].moduleId;
661
+ const searchParams = new URLSearchParams(window.location.search);
662
+ searchParams.set("module", moduleId);
663
+ state.navigate({
664
+ search: `?${searchParams.toString()}`
665
+ });
655
666
  if (state.hashWindows[layoutId].emergeType === "layout") {
656
667
  area.currentLayoutId = layoutId;
657
668
  state.currentModuleId = state.hashWindows[layoutId].moduleId;
@@ -1035,6 +1046,7 @@ function AreasProvider(props) {
1035
1046
  } = useNetwork();
1036
1047
  const isDesktop = useResponsiveDesktop();
1037
1048
  const isSkeleton = useModuleSkeleton();
1049
+ const navigate = useNavigate();
1038
1050
  const isFirstRender = useFirstRender([getLabel]);
1039
1051
  const areasStoreRef = useRef();
1040
1052
  if (!areasStoreRef.current) {
@@ -1043,6 +1055,7 @@ function AreasProvider(props) {
1043
1055
  loadAreasFromNetwork,
1044
1056
  loadCookiesFromNetwork,
1045
1057
  networkOperation,
1058
+ navigate,
1046
1059
  ownerState: {
1047
1060
  status: "init",
1048
1061
  isMobile: !isDesktop,
@@ -1061,7 +1074,7 @@ function AreasProvider(props) {
1061
1074
  } = useStore(areasStoreRef.current, (state) => state.areasActions, shallow);
1062
1075
  const addWindow = useCallback((newWindow) => {
1063
1076
  const currentAreaId = areasStoreRef.current?.getState().currentAreaId;
1064
- const areas = areasStoreRef.current?.getState().areas;
1077
+ const areas = areasStoreRef.current?.getState().areasIds;
1065
1078
  if (currentAreaId && areas) {
1066
1079
  areasStoreRef.current?.getState().areaActions.addWindow(newWindow);
1067
1080
  }