@m4l/components 0.1.77 → 0.1.78

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 (89) hide show
  1. package/@types/export.d.ts +3 -3
  2. package/components/AccountPopover/{index.3a79c395.js → index.7e76dbb7.js} +6 -6
  3. package/components/AppBar/{index.71b38ee9.js → index.06858422.js} +6 -6
  4. package/components/CommonActions/components/ActionCancel/{index.b748a38e.js → index.d536ccfa.js} +1 -1
  5. package/components/CommonActions/components/ActionFormCancel/{index.27ad09e1.js → index.a915b105.js} +13 -13
  6. package/components/CommonActions/components/ActionFormIntro/{index.2556f054.js → index.14e65d6c.js} +1 -1
  7. package/components/CommonActions/components/ActionIntro/{index.a7d92e66.js → index.aa1648eb.js} +1 -1
  8. package/components/CommonActions/components/Actions/{index.3eba9d91.js → index.52125041.js} +11 -11
  9. package/components/DataGrid/{index.545b492f.js → index.9fb3e6a1.js} +20 -23
  10. package/components/DataGrid/types.d.ts +1 -1
  11. package/components/DynamicFilter/constants.d.ts +1 -0
  12. package/components/DynamicFilter/contexts/DynamicFilterContext/store.d.ts +6 -1
  13. package/components/DynamicFilter/{index.d7be0f37.js → index.d1a2e2d1.js} +50 -50
  14. package/components/DynamicFilter/subcomponents/InnerForHooks/index.d.ts +1 -2
  15. package/components/DynamicFilter/tests/contants.d.ts +2 -3
  16. package/components/GridLayout/Responsive/{index.a12a8cec.js → index.0905a698.js} +61 -43
  17. package/components/GridLayout/WidthProvider/{index.8ff65909.js → index.9a26dfe4.js} +1 -3
  18. package/components/GridLayout/index.d.ts +1 -1
  19. package/components/GridLayout/{index.4ba3767a.js → index.da6fd387.js} +103 -93
  20. package/components/GridLayout/subcomponents/GridItem/index.d.ts +1 -0
  21. package/components/GridLayout/subcomponents/GridItem/types.d.ts +2 -0
  22. package/components/GridLayout/subcomponents/Responsive/responsiveUtils.d.ts +6 -3
  23. package/components/GridLayout/subcomponents/Responsive/types.d.ts +1 -3
  24. package/components/HelperText/{index.ef31df1f.js → index.a019742c.js} +6 -6
  25. package/components/Icon/{index.ecb63e65.js → index.9fcd1476.js} +1 -1
  26. package/components/LanguagePopover/{index.0023d069.js → index.98b63dcb.js} +6 -6
  27. package/components/ModalDialog/{index.d880e685.js → index.d9937d46.js} +4 -4
  28. package/components/NavLink/{index.cd92eceb.js → index.a5dea6d3.js} +6 -6
  29. package/components/ObjectLogs/{index.f174c542.js → index.d9d20b9d.js} +22 -16
  30. package/components/ObjectLogs/types.d.ts +1 -0
  31. package/components/PaperForm/{index.1bd86ee5.js → index.ba38a0bd.js} +1 -1
  32. package/components/Period/{index.711db043.js → index.7b94c418.js} +12 -12
  33. package/components/PropertyValue/constants.d.ts +3 -0
  34. package/components/PropertyValue/{index.8a1adf3e.js → index.45c73161.js} +17 -11
  35. package/components/PropertyValue/types.d.ts +2 -1
  36. package/components/SideBar/{index.c5ce0bad.js → index.2f497e6c.js} +2 -2
  37. package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
  38. package/components/areas/components/AreasAdmin/classes/types.d.ts +3 -0
  39. package/components/areas/components/AreasAdmin/{index.cc4cbf56.js → index.43ecd998.js} +91 -79
  40. package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
  41. package/components/areas/components/AreasViewer/classes/types.d.ts +1 -0
  42. package/components/areas/components/AreasViewer/{index.9c2aaaeb.js → index.14e62059.js} +143 -161
  43. package/components/areas/components/{index.0f7ac464.js → index.a87653a9.js} +9 -9
  44. package/components/areas/contexts/AreasContext/helper.d.ts +3 -1
  45. package/components/areas/contexts/AreasContext/{index.c8147e8e.js → index.02c4e7be.js} +99 -78
  46. package/components/areas/contexts/AreasContext/types.d.ts +1 -2
  47. package/components/areas/contexts/{index.02336412.js → index.1ff9b360.js} +1 -1
  48. package/components/areas/hooks/useAreas/{index.3406a6cb.js → index.85e4b2e2.js} +1 -1
  49. package/components/areas/{index.6f2e5dab.js → index.d1dcccf5.js} +9 -9
  50. package/components/areas/types.d.ts +0 -1
  51. package/components/formatters/BooleanFormatter/{index.5268b024.js → index.e8de8e4c.js} +1 -1
  52. package/components/formatters/{index.137169d8.js → index.67aeb049.js} +2 -2
  53. package/components/hook-form/RHFAutocomplete/{index.ac2b1fae.js → index.6aa51705.js} +23 -12
  54. package/components/hook-form/RHFAutocompleteAsync/{index.8b4ccc8d.js → index.1a3dfe5f.js} +1 -1
  55. package/components/hook-form/RHFCheckbox/{index.acef119c.js → index.a08a65b3.js} +1 -1
  56. package/components/hook-form/RHFDateTime/{index.5b080342.js → index.4d671108.js} +7 -7
  57. package/components/hook-form/RHFPeriod/{index.5304e3bd.js → index.39b4be49.js} +2 -2
  58. package/components/hook-form/RHFTextField/{index.e751dca7.js → index.9004e898.js} +3 -3
  59. package/components/hook-form/RHFUpload/{index.25db0511.js → index.bed8573e.js} +7 -10
  60. package/components/modal/{WindowBase.850ea31a.js → WindowBase.a0c0b322.js} +8 -8
  61. package/components/modal/{WindowConfirm.cb37bc58.js → WindowConfirm.6c063f2d.js} +14 -14
  62. package/components/modal/{index.a0978193.js → index.00efea85.js} +11 -11
  63. package/components/mui_extended/Accordion/constants.d.ts +1 -0
  64. package/components/mui_extended/Accordion/{index.12b1339a.js → index.9877f7bf.js} +8 -9
  65. package/components/mui_extended/Accordion/types.d.ts +1 -0
  66. package/components/mui_extended/IconButton/{index.fc5b7c2d.js → index.12f1a3c3.js} +4 -1
  67. package/components/mui_extended/MenuActions/{index.f5b1c022.js → index.43a2e1ae.js} +15 -6
  68. package/components/mui_extended/MenuActions/index.d.ts +3 -2
  69. package/components/mui_extended/MenuActions/types.d.ts +1 -0
  70. package/components/mui_extended/Pager/{index.435af0df.js → index.2f6d6d7d.js} +1 -1
  71. package/components/mui_extended/Tab/constant.d.ts +1 -0
  72. package/components/mui_extended/Tab/{index.9e2f6e34.js → index.7c82e43d.js} +5 -6
  73. package/components/mui_extended/Tab/types.d.ts +1 -0
  74. package/components/mui_extended/{index.83979b6a.js → index.0e2ff642.js} +6 -6
  75. package/contexts/ModalContext/{index.dee85a61.js → index.e9a7ba4a.js} +1 -1
  76. package/hooks/useModal/{index.de522a10.js → index.8e85f7ae.js} +1 -1
  77. package/index.js +220 -217
  78. package/package.json +1 -1
  79. package/test/getNameDataTestId.d.ts +1 -0
  80. package/vendor.e353394b.js +124 -0
  81. package/components/DynamicFilter/subcomponents/InnerForHooks/types.d.ts +0 -2
  82. package/components/DynamicFilter/tests/types.d.ts +0 -2
  83. package/components/DynamicFilter/tests/utils.d.ts +0 -2
  84. package/components/PropertyValue/tests/constants.d.ts +0 -1
  85. package/components/PropertyValue/tests/utils.d.ts +0 -2
  86. package/components/mui_extended/Accordion/tests/constants.d.ts +0 -1
  87. package/components/mui_extended/Accordion/tests/utils.d.ts +0 -2
  88. package/components/mui_extended/Tab/tests/constants.d.ts +0 -1
  89. package/components/mui_extended/Tab/tests/utils.d.ts +0 -2
@@ -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.3406a6cb.js";
16
+ import { u as useAreasStore } from "../../hooks/useAreas/index.85e4b2e2.js";
17
17
  import { useModuleDictionary, useEnvironment, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
18
- import { I as IconButton } from "../../../mui_extended/IconButton/index.fc5b7c2d.js";
19
- import "../../../mui_extended/Accordion/index.12b1339a.js";
20
- import { I as Icon } from "../../../Icon/index.ecb63e65.js";
18
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.12f1a3c3.js";
19
+ import "../../../mui_extended/Accordion/index.9877f7bf.js";
20
+ import { I as Icon } from "../../../Icon/index.9fcd1476.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";
@@ -27,10 +27,10 @@ import { B as Button } from "../../../mui_extended/Button/index.4288f9fc.js";
27
27
  import "../../../mui_extended/Badge/index.8c2b8b66.js";
28
28
  import "../../../Image/index.c18ebf5a.js";
29
29
  import "@mui/lab";
30
- import { M as MenuActions } from "../../../mui_extended/MenuActions/index.f5b1c022.js";
30
+ import { M as MenuActions, a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.43a2e1ae.js";
31
31
  import "../../../mui_extended/Popover/index.9f35d0eb.js";
32
- import "../../../mui_extended/Pager/index.435af0df.js";
33
- import "../../../mui_extended/Tab/index.9e2f6e34.js";
32
+ import "../../../mui_extended/Pager/index.2f6d6d7d.js";
33
+ import "../../../mui_extended/Tab/index.7c82e43d.js";
34
34
  import "../../../mui_extended/Tooltip/index.5a795dcd.js";
35
35
  import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/graphics";
36
36
  import { I as ICONS } from "../../icons.8266ccc8.js";
@@ -40,55 +40,55 @@ import debounce from "lodash/debounce";
40
40
  import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
41
41
  import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
42
42
  import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
43
- import "../../../../contexts/ModalContext/index.dee85a61.js";
43
+ import "../../../../contexts/ModalContext/index.e9a7ba4a.js";
44
44
  import "../../../../contexts/RHFormContext/index.fe175bab.js";
45
- import "../../../GridLayout/index.4ba3767a.js";
46
- import { R as Responsive } from "../../../GridLayout/Responsive/index.a12a8cec.js";
47
- import { W as WidthProvider } from "../../../GridLayout/WidthProvider/index.8ff65909.js";
48
- import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.c8147e8e.js";
45
+ import "../../../GridLayout/index.da6fd387.js";
46
+ import { R as Responsive } from "../../../GridLayout/Responsive/index.0905a698.js";
47
+ import { W as WidthProvider } from "../../../GridLayout/WidthProvider/index.9a26dfe4.js";
48
+ import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.02c4e7be.js";
49
49
  import "../../../animate/index.1f8eadd4.js";
50
50
  import "framer-motion";
51
51
  import "../../../animate/LoadingScreen/index.1d0c4307.js";
52
52
  import "../../../animate/PropagateLoader/index.7fab43c8.js";
53
- import "../AreasAdmin/index.cc4cbf56.js";
53
+ import "../AreasAdmin/index.43ecd998.js";
54
54
  import "../../../ScrollBar/index.bbe48f4d.js";
55
55
  import "zustand";
56
56
  import "react-hook-form";
57
- import "../../../hook-form/RHFAutocomplete/index.ac2b1fae.js";
58
- import "../../../HelperText/index.ef31df1f.js";
59
- import "../../../hook-form/RHFAutocompleteAsync/index.8b4ccc8d.js";
60
- import "../../../hook-form/RHFCheckbox/index.acef119c.js";
57
+ import "../../../hook-form/RHFAutocomplete/index.6aa51705.js";
58
+ import "../../../HelperText/index.a019742c.js";
59
+ import "../../../hook-form/RHFAutocompleteAsync/index.1a3dfe5f.js";
60
+ import "../../../hook-form/RHFCheckbox/index.a08a65b3.js";
61
61
  import "@mui/x-date-pickers";
62
- import "../../../hook-form/RHFDateTime/index.5b080342.js";
63
- import "../../../hook-form/RHFTextField/index.e751dca7.js";
64
- import "../../../hook-form/RHFPeriod/index.5304e3bd.js";
65
- import "../../../Period/index.711db043.js";
66
- import "../../../CommonActions/components/Actions/index.3eba9d91.js";
62
+ import "../../../hook-form/RHFDateTime/index.4d671108.js";
63
+ import "../../../hook-form/RHFTextField/index.9004e898.js";
64
+ import "../../../hook-form/RHFPeriod/index.39b4be49.js";
65
+ import "../../../Period/index.7b94c418.js";
66
+ import "../../../CommonActions/components/Actions/index.52125041.js";
67
67
  import { c as cjs } from "../../../../react-draggable.7abb5d0a.js";
68
68
  import { R as ResizeableWindow } from "../../../Resizeable/index.9a9c79a4.js";
69
- import "../../../modal/index.a0978193.js";
69
+ import "../../../modal/index.00efea85.js";
70
70
  import "lodash/isString";
71
71
  import "react-dropzone";
72
- import "../../../hook-form/RHFUpload/index.25db0511.js";
73
- import "../../../DataGrid/index.545b492f.js";
72
+ import "../../../hook-form/RHFUpload/index.bed8573e.js";
73
+ import "../../../DataGrid/index.9fb3e6a1.js";
74
74
  import "react-dnd";
75
75
  import "react-dnd-html5-backend";
76
- import "../../../DynamicFilter/index.d7be0f37.js";
76
+ import "../../../DynamicFilter/index.d1a2e2d1.js";
77
77
  import "yup";
78
78
  import "lodash";
79
- import "../../../LanguagePopover/index.0023d069.js";
80
- import "../../../NavLink/index.cd92eceb.js";
79
+ import "../../../LanguagePopover/index.98b63dcb.js";
80
+ import "../../../NavLink/index.a5dea6d3.js";
81
81
  import "../../../NoItemSelected/index.23dfc897.js";
82
- import "../../../ObjectLogs/index.f174c542.js";
82
+ import "../../../ObjectLogs/index.d9d20b9d.js";
83
83
  import "../../../../react-json-view.57125fcf.js";
84
- import "../../../PaperForm/index.1bd86ee5.js";
84
+ import "../../../PaperForm/index.ba38a0bd.js";
85
85
  import "../../../Page/index.4237c241.js";
86
- import "../../../PropertyValue/index.8a1adf3e.js";
86
+ import "../../../PropertyValue/index.45c73161.js";
87
87
  import "../../../SplitLayout/index.9ef430f6.js";
88
88
  import "../../../../react-splitter-layout.8b1655c8.js";
89
- import "../../../SideBar/index.c5ce0bad.js";
90
- import "../../../AppBar/index.71b38ee9.js";
91
- import "../../../AccountPopover/index.3a79c395.js";
89
+ import "../../../SideBar/index.2f497e6c.js";
90
+ import "../../../AppBar/index.06858422.js";
91
+ import "../../../AccountPopover/index.7e76dbb7.js";
92
92
  const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
93
93
  "root",
94
94
  "areaRoot",
@@ -109,6 +109,7 @@ const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
109
109
  "windowHeaderContent",
110
110
  "windowHeaderTitle",
111
111
  "windowHeaderMainActions",
112
+ "windowHeaderCancelHandle",
112
113
  "windowContent",
113
114
  "windowPopupRoot",
114
115
  "windowModalRoot",
@@ -157,6 +158,7 @@ const useAreasViewerUtilityClasses = (ownerState) => {
157
158
  windowHeader: ["windowHeader"],
158
159
  windowHeaderTitle: ["windowHeaderTitle"],
159
160
  windowHeaderMainActions: ["windowHeaderMainActions"],
161
+ windowHeaderCancelHandle: ["windowHeaderCancelHandle"],
160
162
  windowContent: ["windowContent"],
161
163
  windowLinearProgressRoot: ["windowLinearProgressRoot"],
162
164
  windowLinearProgressBar: ["windowLinearProgressBar"],
@@ -413,37 +415,6 @@ const AreasViewerRoot = styled("div")`
413
415
 
414
416
  ${(props) => props.theme.components?.M4LAreasViewer?.styleOverrides}
415
417
  `;
416
- styled("div")(({
417
- theme
418
- }) => ({
419
- display: "flex",
420
- alignItems: "center",
421
- position: "relative",
422
- justifyContent: "space-between",
423
- minHeight: theme.spacing(5),
424
- borderBottom: `1px solid ${theme.palette.divider}`,
425
- overflow: "hidden",
426
- cursor: "move",
427
- height: "60px",
428
- " > span": {
429
- marginRight: "12px"
430
- },
431
- "& > h5": {
432
- paddingRight: theme.spacing(3),
433
- borderRight: `1px solid ${theme.palette.divider}`
434
- },
435
- " > nav": {
436
- marginRight: "12px",
437
- flexGrow: 1
438
- },
439
- "& .splitactions.Mui-disabled": {
440
- color: theme.palette.primary.main
441
- },
442
- "& svg ": {
443
- width: "20px",
444
- height: "20px"
445
- }
446
- }));
447
418
  styled("div")(({
448
419
  theme
449
420
  }) => ({
@@ -671,10 +642,15 @@ function MainActions(props) {
671
642
  className: areasViewerClasses.windowHeaderMainActions,
672
643
  children: mainActions.map((mainAction) => {
673
644
  const tooltip = mainAction.label !== void 0 ? mainAction.label : getLabel(mainAction.dictionaryId || "");
645
+ const onClick = (e) => {
646
+ console.log("onClick MainActions");
647
+ mainAction.onClick(e);
648
+ e.stopPropagation();
649
+ };
674
650
  return /* @__PURE__ */ jsx(IconButton, {
675
651
  src: mainAction.urlIcon || "",
676
- className: mainAction.className,
677
- onClick: mainAction.onClick,
652
+ className: clsx(mainAction.className, "m4l_draggableCancel"),
653
+ onClick,
678
654
  "aria-label": mainAction.label,
679
655
  disabled: mainAction.disabled,
680
656
  tooltip
@@ -691,25 +667,21 @@ const WindowPopUpsList = (props) => {
691
667
  host_static_assets,
692
668
  environment_assets
693
669
  } = useEnvironment();
694
- const windowsPopUps = useAreasStore((state2) => state2.hashAreas[areaId].hashLayoutItems.filter((li) => state2.hashWindows[li].parentLayoutId === windowId && state2.hashWindows[li].emergeType === "popup").map((lim) => {
695
- const w = state2.hashWindows[lim];
670
+ const windowsPopUps = useAreasStore((state) => state.hashAreas[areaId].layoutItemsIds.filter((li) => state.hashWindows[li].parentLayoutId === windowId && state.hashWindows[li].emergeType === "popup").map((lim) => {
671
+ const w = state.hashWindows[lim];
696
672
  return {
697
673
  i: w.windowId,
698
674
  url_icon: w.url_icon,
699
675
  title: w.title
700
676
  };
701
677
  }), shallow);
702
- const state = useAreasStore((state2) => state2);
703
678
  const theme = useTheme();
704
679
  const {
705
680
  maximizeLayout
706
- } = useAreasStore((state2) => state2.areaActions);
681
+ } = useAreasStore((state) => state.areaActions);
707
682
  const onTouched = (layoutId) => {
708
683
  maximizeLayout(areaId, layoutId);
709
684
  };
710
- console.log("windowsPopUps", windowsPopUps);
711
- console.log("areaId", areaId);
712
- console.log("state", state);
713
685
  const menuActions = windowsPopUps ? windowsPopUps.map((element) => {
714
686
  return {
715
687
  onClick: () => onTouched(element.i),
@@ -747,15 +719,29 @@ function Header(props) {
747
719
  windowId,
748
720
  emergeType
749
721
  } = props;
750
- const [url_icon, title, moduleActions, onClose, version, windowOptions, colapsed] = useAreasStore((state) => {
722
+ const [url_icon, title, moduleActions, onClose, version, windowOptions] = useAreasStore((state) => {
751
723
  const window2 = state.hashWindows[windowId];
752
- return [window2.url_icon, window2.title, window2.moduleActions, window2.onClose, window2.version, window2.windowOptions, window2.colapsed];
724
+ return [
725
+ window2.url_icon,
726
+ window2.title,
727
+ window2.moduleActions,
728
+ window2.onClose,
729
+ window2.version,
730
+ window2.windowOptions
731
+ ];
753
732
  }, shallow);
754
733
  const {
755
734
  saveModuleCookies,
756
735
  resetModuleCookies
757
736
  } = useAreasStore((state) => state.windowActions, shallow);
758
737
  const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId, shallow);
738
+ const colapsed = useAreasStore((state) => {
739
+ const currentBreakpoint = state.hashAreas[areaId].currentBreakpoint;
740
+ if (currentBreakpoint) {
741
+ return state.hashAreas[areaId].layouts[currentBreakpoint].find((li) => li.i === windowId)?.colapsed;
742
+ }
743
+ return false;
744
+ }, shallow);
759
745
  const {
760
746
  maximizeLayout,
761
747
  normalizeLayouts,
@@ -768,7 +754,6 @@ function Header(props) {
768
754
  } = useEnvironment();
769
755
  const isDesktop = useResponsiveDesktop();
770
756
  const isSkeleton = useModuleSkeleton();
771
- useModuleDictionary();
772
757
  const urlPrefix = `${host_static_assets}/${environment_assets}`;
773
758
  const menuActions = useMemo(() => {
774
759
  return getMenuActions({
@@ -785,20 +770,21 @@ function Header(props) {
785
770
  const onCloseLocal = () => {
786
771
  onClose && onClose(windowId);
787
772
  };
788
- const maxNormalize = () => {
773
+ const maxNormalize = (e) => {
789
774
  if (maximizedId === windowId) {
790
775
  normalizeLayouts(areaId);
791
776
  } else {
792
777
  maximizeLayout(areaId, windowId);
793
778
  }
779
+ e.stopPropagation();
794
780
  };
795
- const colapedToggle = () => {
796
- console.log("Toggle", colapsed);
781
+ const colapedToggle = (e) => {
797
782
  if (!colapsed) {
798
783
  colapseLayoutItem(areaId, windowId);
799
784
  } else {
800
785
  unColapseLayoutItem(areaId, windowId);
801
786
  }
787
+ e.stopPropagation();
802
788
  };
803
789
  if (isSkeleton) {
804
790
  return /* @__PURE__ */ jsx(SKTModuleHeader, {});
@@ -814,55 +800,63 @@ function Header(props) {
814
800
  className: areasViewerClasses.windowHeaderTitle,
815
801
  variant: "h5",
816
802
  children: `${title}`
817
- }), /* @__PURE__ */ jsx(MainActions, {
818
- windowId
819
- }), emergeType === "layout" ? /* @__PURE__ */ jsx(WindowPopUpsList, {
820
- areaId,
821
- windowId
822
- }) : null, menuActions.length > 0 && /* @__PURE__ */ jsx(MenuActions, {
823
- arrowType: "no-arrow",
824
- marginTop: "12px!important",
825
- marginLeft: "14px!important",
826
- anchorOrigin: {
827
- vertical: "bottom",
828
- horizontal: "right"
829
- },
830
- transformOrigin: {
831
- vertical: "top",
832
- horizontal: "right"
833
- },
834
- menuActions
835
- }), !colapsed && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
836
- onClick: maxNormalize,
837
- "aria-label": "click",
838
- src: maximizedId === windowId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`
839
- }), !maximizedId && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
840
- onClick: colapedToggle,
841
- "aria-label": "click",
842
- src: !colapsed ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.COLAPSE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.UNCOLPASE}`,
843
- dictionaryTooltipId: "pendiente"
844
- }), onClose && /* @__PURE__ */ jsx(IconButton, {
845
- onClick: onCloseLocal,
846
- "aria-label": "click",
847
- src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CLOSE}`
803
+ }), /* @__PURE__ */ jsxs("div", {
804
+ className: areasViewerClasses.windowHeaderCancelHandle,
805
+ children: [/* @__PURE__ */ jsx(MainActions, {
806
+ windowId
807
+ }), emergeType === "layout" ? /* @__PURE__ */ jsx(WindowPopUpsList, {
808
+ areaId,
809
+ windowId
810
+ }) : null, menuActions.length > 0 && /* @__PURE__ */ jsx(MemonizedMenuActions, {
811
+ arrowType: "no-arrow",
812
+ marginTop: "12px!important",
813
+ marginLeft: "14px!important",
814
+ anchorOrigin: {
815
+ vertical: "bottom",
816
+ horizontal: "right"
817
+ },
818
+ transformOrigin: {
819
+ vertical: "top",
820
+ horizontal: "right"
821
+ },
822
+ menuActions
823
+ }), !colapsed && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
824
+ className: "m4l_draggableCancel",
825
+ onClick: maxNormalize,
826
+ "aria-label": "click",
827
+ src: maximizedId === windowId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`
828
+ }), !maximizedId && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
829
+ className: "m4l_draggableCancel",
830
+ onClick: colapedToggle,
831
+ "aria-label": "click",
832
+ src: !colapsed ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.COLAPSE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.UNCOLPASE}`,
833
+ dictionaryTooltipId: "pendiente"
834
+ }), onClose && /* @__PURE__ */ jsx(IconButton, {
835
+ className: "m4l_draggableCancel",
836
+ onPointerDown: onCloseLocal,
837
+ "aria-label": "click",
838
+ src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CLOSE}`
839
+ })]
848
840
  })]
849
841
  })]
850
842
  });
851
843
  }
852
844
  const ProggessLoadingMF = (props) => {
853
- const {
854
- loadingProgress
855
- } = props;
856
- if (loadingProgress >= 0 && loadingProgress <= 100) {
857
- return /* @__PURE__ */ jsx("div", {
858
- className: areasViewerClasses.containerLinearProgress,
859
- children: /* @__PURE__ */ jsx(LinearProgress, {
860
- variant: "determinate",
861
- value: loadingProgress
862
- })
863
- });
864
- } else {
865
- console.log("LoadingMF***************************************", loadingProgress);
845
+ try {
846
+ const {
847
+ loadingProgress
848
+ } = props;
849
+ if (loadingProgress >= 0 && loadingProgress <= 100) {
850
+ return /* @__PURE__ */ jsx("div", {
851
+ className: areasViewerClasses.containerLinearProgress,
852
+ children: /* @__PURE__ */ jsx(LinearProgress, {
853
+ variant: "determinate",
854
+ value: loadingProgress
855
+ })
856
+ });
857
+ } else {
858
+ }
859
+ } catch (error) {
866
860
  }
867
861
  return null;
868
862
  };
@@ -880,7 +874,6 @@ class ObservableLoaderMF {
880
874
  this.networkOperation = networkOperation;
881
875
  this.isRemote = isRemote;
882
876
  this.eventStatus = "progress";
883
- console.log("ObservableLoaderMF constructor", this.host, scriptId);
884
877
  this.start = this.start.bind(this);
885
878
  this.subscribe = this.subscribe.bind(this);
886
879
  this.unsubscribe = this.unsubscribe.bind(this);
@@ -889,7 +882,6 @@ class ObservableLoaderMF {
889
882
  setTimeout(this.start, 100);
890
883
  }
891
884
  tryAgain() {
892
- console.log("start tryAgain");
893
885
  if (this.eventStatus === "error") {
894
886
  setTimeout(this.start, 100);
895
887
  new Promise((resolve) => {
@@ -898,25 +890,20 @@ class ObservableLoaderMF {
898
890
  this.start();
899
891
  });
900
892
  }
901
- console.log("end tryAgain");
902
893
  }
903
894
  async start() {
904
895
  let percentCompleted = 0;
905
896
  this.notify("progress", percentCompleted);
906
- console.log("ObservableLoaderMF start", this.host);
907
897
  const manifest = await fetch(`${this.host}/manifest.json?rnd=${Math.random()}`).then((res) => res.json()).catch(() => {
908
- console.debug("Error fetching manifest", `${this.host}/manifest.json`);
909
898
  setTimeout(() => this.notify("error", 0), 300);
910
899
  return void 0;
911
900
  });
912
- console.log("ObservableLoaderMF cargado de manifest");
913
901
  if (!manifest) {
914
902
  return;
915
903
  }
916
904
  percentCompleted = 10;
917
905
  this.notify("progress", percentCompleted);
918
906
  const urlFile = `${this.host}/${manifest["src/index.tsx"]["file"]}?rnd=${Math.random()}`;
919
- console.log("ObservableLoaderMF file", urlFile);
920
907
  const controller = new AbortController();
921
908
  const ret = await this.networkOperation({
922
909
  method: "GET",
@@ -953,7 +940,6 @@ class ObservableLoaderMF {
953
940
  script.type = "module";
954
941
  script.src = urlFile || "";
955
942
  script.onload = () => {
956
- console.debug("Completed", new Date().getTime(), new Date().getTime() - startTime);
957
943
  this.notify("complete", 100);
958
944
  };
959
945
  document.head.appendChild(script);
@@ -974,7 +960,7 @@ class ObservableLoaderMF {
974
960
  notify(newEvent, progress) {
975
961
  this.eventStatus = newEvent;
976
962
  this.subscribers.forEach((subscriber) => {
977
- subscriber(newEvent, progress);
963
+ setTimeout(() => subscriber(newEvent, progress), 1);
978
964
  });
979
965
  }
980
966
  }
@@ -990,7 +976,6 @@ const AreasLoadingError = (props) => {
990
976
  const {
991
977
  getLabel
992
978
  } = useModuleDictionary();
993
- console.log("test status view", status);
994
979
  return /* @__PURE__ */ jsx("div", {
995
980
  className: areasViewerClasses.areasLoadingErrorRoot,
996
981
  children: status !== "error" ? /* @__PURE__ */ jsx("div", {
@@ -1109,20 +1094,17 @@ function MFLoader(props) {
1109
1094
  window[`observable_${prefix}_${moduleId}`]?.tryAgain();
1110
1095
  }, []);
1111
1096
  useEffect(() => {
1112
- const dsScript = {
1097
+ const dsNowScript = {
1113
1098
  ...divScript
1114
1099
  };
1115
1100
  const observableDownload = (event, progress) => {
1116
1101
  setLoadingProgress(progress);
1117
1102
  setStatusLoader(event);
1118
- if (event === "complete") {
1119
- renderMicroFrontend(dsScript);
1120
- }
1121
1103
  };
1122
1104
  if (!window[`render_${prefix}_${moduleId}`]) {
1123
1105
  let observableLoaderMF;
1124
1106
  if (!window[`observable_${prefix}_${moduleId}`]) {
1125
- observableLoaderMF = new ObservableLoaderMF(final_host, dsScript.scriptId, networkOperation, !environment.isLocalhost);
1107
+ observableLoaderMF = new ObservableLoaderMF(final_host, dsNowScript.scriptId, networkOperation, !environment.isLocalhost);
1126
1108
  window[`observable_${prefix}_${moduleId}`] = observableLoaderMF;
1127
1109
  } else {
1128
1110
  observableLoaderMF = window[`observable_${prefix}_${moduleId}`];
@@ -1130,13 +1112,17 @@ function MFLoader(props) {
1130
1112
  observableLoaderMF.subscribe(observableDownload);
1131
1113
  } else {
1132
1114
  setStatusLoader("complete");
1133
- renderMicroFrontend(dsScript);
1134
1115
  }
1135
1116
  return () => {
1136
1117
  window[`observable_${prefix}_${moduleId}`].unsubscribe(observableDownload);
1137
- cleanUp(dsScript);
1118
+ cleanUp(dsNowScript);
1138
1119
  };
1139
1120
  }, [divScript]);
1121
+ useEffect(() => {
1122
+ if (statusLoader === "complete") {
1123
+ renderMicroFrontend(divScript);
1124
+ }
1125
+ }, [statusLoader]);
1140
1126
  return /* @__PURE__ */ jsxs("div", {
1141
1127
  id: divScript.divContainerId,
1142
1128
  style: {
@@ -1212,6 +1198,12 @@ const WindowRoot = styled("div")`
1212
1198
  margin-right: 24px;
1213
1199
  text-overflow: ellipsis;
1214
1200
  }
1201
+
1202
+ & .${areasViewerClasses.windowHeaderCancelHandle} {
1203
+ display: flex;
1204
+ cursor: default;
1205
+ }
1206
+
1215
1207
  // windowHeaderMainActions
1216
1208
  & .${areasViewerClasses.windowHeaderMainActions} {
1217
1209
  display: flex;
@@ -1227,7 +1219,6 @@ const WindowRoot = styled("div")`
1227
1219
 
1228
1220
  & .${areasViewerClasses.windowContent}.${areasViewerClasses.colapsed} {
1229
1221
  display: none !important;
1230
- prop1: juan;
1231
1222
  }
1232
1223
  // windowModalRoot
1233
1224
  & .${areasViewerClasses.windowModalRoot} {
@@ -1275,7 +1266,6 @@ function Toasty(props) {
1275
1266
  toastyId
1276
1267
  } = props;
1277
1268
  const toasty = useAreasStore((state) => state.hashWindows[windowId].hashToasties[toastyId], shallow);
1278
- console.log("percentExecuted", toasty.percentExecuted, toasty.timer);
1279
1269
  const {
1280
1270
  pinToast: pinToasty,
1281
1271
  closeToast: closeToasty
@@ -1349,7 +1339,6 @@ const Window = (props) => {
1349
1339
  const component = useAreasStore((state) => state.hashWindows[windowId]?.component, shallow);
1350
1340
  const loading = useAreasStore((state) => state.hashWindows[windowId]?.loading, shallow);
1351
1341
  const status = useAreasStore((state) => state.hashWindows[windowId]?.status, shallow);
1352
- const colapsed = useAreasStore((state) => state.hashWindows[windowId]?.colapsed, shallow);
1353
1342
  const dynamicMFStore = useAreasStore((state) => state.hashWindows[windowId]?.dynamicMFStore, shallow);
1354
1343
  const {
1355
1344
  setActions,
@@ -1394,18 +1383,12 @@ const Window = (props) => {
1394
1383
  loadCookiesFromApi(windowId);
1395
1384
  }
1396
1385
  }, [status]);
1397
- console.log(
1398
- `Window Render***#,selected:${selected}`,
1399
- moduleId,
1400
- status,
1401
- loading
1402
- );
1403
1386
  if (status === void 0) {
1404
1387
  return null;
1405
1388
  }
1406
1389
  return /* @__PURE__ */ jsx(WindowRoot, {
1407
1390
  role: "presentation",
1408
- className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null, loading ? areasViewerClasses.loading : null),
1391
+ className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null, loading ? areasViewerClasses.loading : null, emergeType === "popup" ? areasViewerClasses.windowPopupRoot : null, emergeType === "modal" ? areasViewerClasses.windowModalRoot : null),
1409
1392
  onMouseDown: onTouch,
1410
1393
  children: /* @__PURE__ */ jsxs("div", {
1411
1394
  className: areasViewerClasses.windowRootContainer,
@@ -1416,7 +1399,9 @@ const Window = (props) => {
1416
1399
  }), /* @__PURE__ */ jsx(Toasties, {
1417
1400
  windowId
1418
1401
  }), /* @__PURE__ */ jsxs("div", {
1419
- className: clsx(areasViewerClasses.windowContent, colapsed ? areasViewerClasses.colapsed : null),
1402
+ className: clsx(
1403
+ areasViewerClasses.windowContent
1404
+ ),
1420
1405
  children: [status === "init" ? /* @__PURE__ */ jsx(Fragment, {
1421
1406
  children: "...Brucee porr analizar Componente de carga"
1422
1407
  }) : null, status === "loaded" ? winType === "microfrontend" ? /* @__PURE__ */ jsx(MemonizedMicroFrontend, {
@@ -1440,9 +1425,8 @@ const AreaGridLayout = (props) => {
1440
1425
  const {
1441
1426
  areaId
1442
1427
  } = props;
1443
- const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].hashLayoutItems, shallow);
1428
+ const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].layoutItemsIds, shallow);
1444
1429
  const layouts = useAreasStore((state) => state.hashAreas[areaId].layouts, shallow);
1445
- const colapsedItems = useAreasStore((state) => state.hashAreas[areaId].colapsedItems, shallow);
1446
1430
  const breakpoints = useAreasStore((state) => state.hashAreas[areaId].breakpoints, shallow);
1447
1431
  const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId, shallow);
1448
1432
  const cols = useAreasStore((state) => state.hashAreas[areaId].cols, shallow);
@@ -1450,7 +1434,6 @@ const AreaGridLayout = (props) => {
1450
1434
  onBreakpointsLayoutsChange,
1451
1435
  onContainerChange
1452
1436
  } = useAreasStore((state) => state.areaActions, shallow);
1453
- console.debug("Window***", hashLayoutItems, layouts);
1454
1437
  return /* @__PURE__ */ jsx(
1455
1438
  ResponsiveGridLayout,
1456
1439
  {
@@ -1461,8 +1444,9 @@ const AreaGridLayout = (props) => {
1461
1444
  className: clsx(areasViewerClasses.areaGridLayout, `${areasViewerClasses.areaGridLayout}-${areaId}`),
1462
1445
  layouts,
1463
1446
  onLayoutChange: (layout, newLayouts) => onBreakpointsLayoutsChange(areaId, layout, newLayouts),
1447
+ draggableHandle: ".m4l_draggable_handle",
1448
+ draggableCancel: `.${areasViewerClasses.windowHeaderCancelHandle}`,
1464
1449
  layoutItemRender: (p) => {
1465
- console.debug("layoutItemRender window", hashLayoutItems, p.i, p.type);
1466
1450
  if (hashLayoutItems.indexOf(p.i) === -1) {
1467
1451
  console.debug("NO EXISTE window", hashLayoutItems, p.i);
1468
1452
  return /* @__PURE__ */ jsx(Fragment, {});
@@ -1472,6 +1456,7 @@ const AreaGridLayout = (props) => {
1472
1456
  children: "Place holder"
1473
1457
  });
1474
1458
  }
1459
+ console.debug("layoutItemRender window", hashLayoutItems, p.i, p.type);
1475
1460
  return /* @__PURE__ */ jsx(Window, {
1476
1461
  windowId: p.i,
1477
1462
  areaId
@@ -1482,14 +1467,12 @@ const AreaGridLayout = (props) => {
1482
1467
  rowHeight: ROW_HEIGTH_GRIDLAYOUT,
1483
1468
  containerMargin: [MARGIN_GRIDLAYOUT, MARGIN_GRIDLAYOUT],
1484
1469
  containerPadding: [PADDING_GRIDLAYOUT, PADDING_GRIDLAYOUT],
1485
- draggableHandle: ".m4l_draggable_handle",
1486
1470
  onContainerChange: (e) => {
1487
1471
  onContainerChange(areaId, e);
1488
1472
  },
1489
1473
  preventCollision: false,
1490
1474
  verticalCompact: true,
1491
- maximizeId: maximizedId,
1492
- colapsedItems
1475
+ maximizeId: maximizedId
1493
1476
  }
1494
1477
  );
1495
1478
  };
@@ -1499,7 +1482,7 @@ const PanelWindows = (props) => {
1499
1482
  } = props;
1500
1483
  const status = useAreasStore((state) => state.hashAreas[areaId].status);
1501
1484
  const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId);
1502
- const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].hashLayoutItems.map((key) => ({
1485
+ const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].layoutItemsIds.filter((itemId) => state.hashWindows[itemId].emergeType === "layout").map((key) => ({
1503
1486
  i: key,
1504
1487
  url_icon: state.hashWindows[key].url_icon,
1505
1488
  title: state.hashWindows[key].title
@@ -1538,7 +1521,6 @@ const InnerForHooks = (props) => {
1538
1521
  } = props;
1539
1522
  const isDesktop = useResponsiveDesktop();
1540
1523
  const status = useAreasStore((state) => state.hashAreas[areaId].status);
1541
- console.debug("Area InnerForHooks***", status);
1542
1524
  return /* @__PURE__ */ jsxs("div", {
1543
1525
  className: clsx(areasViewerClasses.areaGridLayoutPanelContainer, `${areasViewerClasses.areaGridLayoutPanelContainer}-${areaId}`),
1544
1526
  children: [