@m4l/components 0.1.77 → 0.1.79

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 (90) hide show
  1. package/@types/export.d.ts +3 -3
  2. package/components/AccountPopover/{index.3a79c395.js → index.d541e4e6.js} +6 -6
  3. package/components/AppBar/{index.71b38ee9.js → index.f90014de.js} +6 -6
  4. package/components/CommonActions/components/ActionCancel/{index.b748a38e.js → index.92536832.js} +1 -1
  5. package/components/CommonActions/components/ActionFormCancel/{index.27ad09e1.js → index.7fb1ed8d.js} +19 -15
  6. package/components/CommonActions/components/ActionFormIntro/{index.2556f054.js → index.bebc0c94.js} +1 -1
  7. package/components/CommonActions/components/ActionIntro/{index.a7d92e66.js → index.aa4e432e.js} +1 -1
  8. package/components/CommonActions/components/Actions/{index.3eba9d91.js → index.5732847f.js} +11 -11
  9. package/components/DataGrid/{index.545b492f.js → index.302080d3.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.0887320f.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.29d5ad65.js} +6 -6
  25. package/components/Icon/{index.ecb63e65.js → index.9fcd1476.js} +1 -1
  26. package/components/LanguagePopover/{index.0023d069.js → index.ce84f099.js} +6 -6
  27. package/components/ModalDialog/{index.d880e685.js → index.ab432b77.js} +4 -4
  28. package/components/NavLink/{index.cd92eceb.js → index.3bf44e30.js} +6 -6
  29. package/components/ObjectLogs/{index.f174c542.js → index.c947ded4.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.adc328ca.js} +12 -12
  33. package/components/PropertyValue/constants.d.ts +3 -0
  34. package/components/PropertyValue/{index.8a1adf3e.js → index.6b583e7a.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.31905078.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.fe18bdbc.js} +151 -163
  43. package/components/areas/components/{index.0f7ac464.js → index.7ae189ba.js} +9 -9
  44. package/components/areas/contexts/AreasContext/helper.d.ts +3 -1
  45. package/components/areas/contexts/AreasContext/{index.c8147e8e.js → index.1213c3ef.js} +104 -78
  46. package/components/areas/contexts/AreasContext/types.d.ts +2 -2
  47. package/components/areas/contexts/WindowToolsMFContext/types.d.ts +1 -0
  48. package/components/areas/contexts/{index.02336412.js → index.84d35ffe.js} +1 -1
  49. package/components/areas/hooks/useAreas/{index.3406a6cb.js → index.cd799cf6.js} +1 -1
  50. package/components/areas/{index.6f2e5dab.js → index.6ee7a4eb.js} +9 -9
  51. package/components/areas/types.d.ts +5 -1
  52. package/components/formatters/BooleanFormatter/{index.5268b024.js → index.e8de8e4c.js} +1 -1
  53. package/components/formatters/{index.137169d8.js → index.67aeb049.js} +2 -2
  54. package/components/hook-form/RHFAutocomplete/{index.ac2b1fae.js → index.e52c1f6a.js} +23 -12
  55. package/components/hook-form/RHFAutocompleteAsync/{index.8b4ccc8d.js → index.a226b8ac.js} +1 -1
  56. package/components/hook-form/RHFCheckbox/{index.acef119c.js → index.9619debd.js} +1 -1
  57. package/components/hook-form/RHFDateTime/{index.5b080342.js → index.5da7b839.js} +7 -7
  58. package/components/hook-form/RHFPeriod/{index.5304e3bd.js → index.7e42c292.js} +2 -2
  59. package/components/hook-form/RHFTextField/{index.e751dca7.js → index.13447584.js} +3 -3
  60. package/components/hook-form/RHFUpload/{index.25db0511.js → index.80071782.js} +7 -10
  61. package/components/modal/{WindowBase.850ea31a.js → WindowBase.90d3c1d5.js} +8 -8
  62. package/components/modal/{WindowConfirm.cb37bc58.js → WindowConfirm.835f8d13.js} +14 -14
  63. package/components/modal/{index.a0978193.js → index.cd34ddb3.js} +11 -11
  64. package/components/mui_extended/Accordion/constants.d.ts +1 -0
  65. package/components/mui_extended/Accordion/{index.12b1339a.js → index.e8ba0755.js} +8 -9
  66. package/components/mui_extended/Accordion/types.d.ts +1 -0
  67. package/components/mui_extended/IconButton/{index.fc5b7c2d.js → index.12f1a3c3.js} +4 -1
  68. package/components/mui_extended/MenuActions/{index.f5b1c022.js → index.43a2e1ae.js} +15 -6
  69. package/components/mui_extended/MenuActions/index.d.ts +3 -2
  70. package/components/mui_extended/MenuActions/types.d.ts +1 -0
  71. package/components/mui_extended/Pager/{index.435af0df.js → index.2f6d6d7d.js} +1 -1
  72. package/components/mui_extended/Tab/constant.d.ts +1 -0
  73. package/components/mui_extended/Tab/{index.9e2f6e34.js → index.3c005df1.js} +5 -6
  74. package/components/mui_extended/Tab/types.d.ts +1 -0
  75. package/components/mui_extended/{index.83979b6a.js → index.ff59a512.js} +6 -6
  76. package/contexts/ModalContext/{index.dee85a61.js → index.feded672.js} +1 -1
  77. package/hooks/useModal/{index.de522a10.js → index.6d238807.js} +1 -1
  78. package/index.js +220 -217
  79. package/package.json +1 -1
  80. package/test/getNameDataTestId.d.ts +1 -0
  81. package/vendor.9b969b18.js +124 -0
  82. package/components/DynamicFilter/subcomponents/InnerForHooks/types.d.ts +0 -2
  83. package/components/DynamicFilter/tests/types.d.ts +0 -2
  84. package/components/DynamicFilter/tests/utils.d.ts +0 -2
  85. package/components/PropertyValue/tests/constants.d.ts +0 -1
  86. package/components/PropertyValue/tests/utils.d.ts +0 -2
  87. package/components/mui_extended/Accordion/tests/constants.d.ts +0 -1
  88. package/components/mui_extended/Accordion/tests/utils.d.ts +0 -2
  89. package/components/mui_extended/Tab/tests/constants.d.ts +0 -1
  90. 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.cd799cf6.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.e8ba0755.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.3c005df1.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.feded672.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.1213c3ef.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.31905078.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.e52c1f6a.js";
58
+ import "../../../HelperText/index.29d5ad65.js";
59
+ import "../../../hook-form/RHFAutocompleteAsync/index.a226b8ac.js";
60
+ import "../../../hook-form/RHFCheckbox/index.9619debd.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.5da7b839.js";
63
+ import "../../../hook-form/RHFTextField/index.13447584.js";
64
+ import "../../../hook-form/RHFPeriod/index.7e42c292.js";
65
+ import "../../../Period/index.adc328ca.js";
66
+ import "../../../CommonActions/components/Actions/index.5732847f.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.cd34ddb3.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.80071782.js";
73
+ import "../../../DataGrid/index.302080d3.js";
74
74
  import "react-dnd";
75
75
  import "react-dnd-html5-backend";
76
- import "../../../DynamicFilter/index.d7be0f37.js";
76
+ import "../../../DynamicFilter/index.0887320f.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.ce84f099.js";
80
+ import "../../../NavLink/index.3bf44e30.js";
81
81
  import "../../../NoItemSelected/index.23dfc897.js";
82
- import "../../../ObjectLogs/index.f174c542.js";
82
+ import "../../../ObjectLogs/index.c947ded4.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.6b583e7a.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.f90014de.js";
91
+ import "../../../AccountPopover/index.d541e4e6.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,30 @@ 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, fnQueryClose] = 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
+ window2.fnQueryClose
732
+ ];
753
733
  }, shallow);
754
734
  const {
755
735
  saveModuleCookies,
756
736
  resetModuleCookies
757
737
  } = useAreasStore((state) => state.windowActions, shallow);
758
738
  const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId, shallow);
739
+ const colapsed = useAreasStore((state) => {
740
+ const currentBreakpoint = state.hashAreas[areaId].currentBreakpoint;
741
+ if (currentBreakpoint) {
742
+ return state.hashAreas[areaId].layouts[currentBreakpoint].find((li) => li.i === windowId)?.colapsed;
743
+ }
744
+ return false;
745
+ }, shallow);
759
746
  const {
760
747
  maximizeLayout,
761
748
  normalizeLayouts,
@@ -768,7 +755,6 @@ function Header(props) {
768
755
  } = useEnvironment();
769
756
  const isDesktop = useResponsiveDesktop();
770
757
  const isSkeleton = useModuleSkeleton();
771
- useModuleDictionary();
772
758
  const urlPrefix = `${host_static_assets}/${environment_assets}`;
773
759
  const menuActions = useMemo(() => {
774
760
  return getMenuActions({
@@ -783,22 +769,24 @@ function Header(props) {
783
769
  });
784
770
  }, [moduleActions, isDesktop]);
785
771
  const onCloseLocal = () => {
786
- onClose && onClose(windowId);
772
+ const fnClose = fnQueryClose || onClose;
773
+ fnClose && fnClose(windowId);
787
774
  };
788
- const maxNormalize = () => {
775
+ const maxNormalize = (e) => {
789
776
  if (maximizedId === windowId) {
790
777
  normalizeLayouts(areaId);
791
778
  } else {
792
779
  maximizeLayout(areaId, windowId);
793
780
  }
781
+ e.stopPropagation();
794
782
  };
795
- const colapedToggle = () => {
796
- console.log("Toggle", colapsed);
783
+ const colapedToggle = (e) => {
797
784
  if (!colapsed) {
798
785
  colapseLayoutItem(areaId, windowId);
799
786
  } else {
800
787
  unColapseLayoutItem(areaId, windowId);
801
788
  }
789
+ e.stopPropagation();
802
790
  };
803
791
  if (isSkeleton) {
804
792
  return /* @__PURE__ */ jsx(SKTModuleHeader, {});
@@ -814,55 +802,63 @@ function Header(props) {
814
802
  className: areasViewerClasses.windowHeaderTitle,
815
803
  variant: "h5",
816
804
  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}`
805
+ }), /* @__PURE__ */ jsxs("div", {
806
+ className: areasViewerClasses.windowHeaderCancelHandle,
807
+ children: [/* @__PURE__ */ jsx(MainActions, {
808
+ windowId
809
+ }), emergeType === "layout" ? /* @__PURE__ */ jsx(WindowPopUpsList, {
810
+ areaId,
811
+ windowId
812
+ }) : null, menuActions.length > 0 && /* @__PURE__ */ jsx(MemonizedMenuActions, {
813
+ arrowType: "no-arrow",
814
+ marginTop: "12px!important",
815
+ marginLeft: "14px!important",
816
+ anchorOrigin: {
817
+ vertical: "bottom",
818
+ horizontal: "right"
819
+ },
820
+ transformOrigin: {
821
+ vertical: "top",
822
+ horizontal: "right"
823
+ },
824
+ menuActions
825
+ }), !colapsed && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
826
+ className: "m4l_draggableCancel",
827
+ onClick: maxNormalize,
828
+ "aria-label": "click",
829
+ 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}`
830
+ }), !maximizedId && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
831
+ className: "m4l_draggableCancel",
832
+ onClick: colapedToggle,
833
+ "aria-label": "click",
834
+ 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}`,
835
+ dictionaryTooltipId: "pendiente"
836
+ }), onClose && /* @__PURE__ */ jsx(IconButton, {
837
+ className: "m4l_draggableCancel",
838
+ onPointerDown: onCloseLocal,
839
+ "aria-label": "click",
840
+ src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CLOSE}`
841
+ })]
848
842
  })]
849
843
  })]
850
844
  });
851
845
  }
852
846
  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);
847
+ try {
848
+ const {
849
+ loadingProgress
850
+ } = props;
851
+ if (loadingProgress >= 0 && loadingProgress <= 100) {
852
+ return /* @__PURE__ */ jsx("div", {
853
+ className: areasViewerClasses.containerLinearProgress,
854
+ children: /* @__PURE__ */ jsx(LinearProgress, {
855
+ variant: "determinate",
856
+ value: loadingProgress
857
+ })
858
+ });
859
+ } else {
860
+ }
861
+ } catch (error) {
866
862
  }
867
863
  return null;
868
864
  };
@@ -880,7 +876,6 @@ class ObservableLoaderMF {
880
876
  this.networkOperation = networkOperation;
881
877
  this.isRemote = isRemote;
882
878
  this.eventStatus = "progress";
883
- console.log("ObservableLoaderMF constructor", this.host, scriptId);
884
879
  this.start = this.start.bind(this);
885
880
  this.subscribe = this.subscribe.bind(this);
886
881
  this.unsubscribe = this.unsubscribe.bind(this);
@@ -889,7 +884,6 @@ class ObservableLoaderMF {
889
884
  setTimeout(this.start, 100);
890
885
  }
891
886
  tryAgain() {
892
- console.log("start tryAgain");
893
887
  if (this.eventStatus === "error") {
894
888
  setTimeout(this.start, 100);
895
889
  new Promise((resolve) => {
@@ -898,25 +892,20 @@ class ObservableLoaderMF {
898
892
  this.start();
899
893
  });
900
894
  }
901
- console.log("end tryAgain");
902
895
  }
903
896
  async start() {
904
897
  let percentCompleted = 0;
905
898
  this.notify("progress", percentCompleted);
906
- console.log("ObservableLoaderMF start", this.host);
907
899
  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
900
  setTimeout(() => this.notify("error", 0), 300);
910
901
  return void 0;
911
902
  });
912
- console.log("ObservableLoaderMF cargado de manifest");
913
903
  if (!manifest) {
914
904
  return;
915
905
  }
916
906
  percentCompleted = 10;
917
907
  this.notify("progress", percentCompleted);
918
908
  const urlFile = `${this.host}/${manifest["src/index.tsx"]["file"]}?rnd=${Math.random()}`;
919
- console.log("ObservableLoaderMF file", urlFile);
920
909
  const controller = new AbortController();
921
910
  const ret = await this.networkOperation({
922
911
  method: "GET",
@@ -953,7 +942,6 @@ class ObservableLoaderMF {
953
942
  script.type = "module";
954
943
  script.src = urlFile || "";
955
944
  script.onload = () => {
956
- console.debug("Completed", new Date().getTime(), new Date().getTime() - startTime);
957
945
  this.notify("complete", 100);
958
946
  };
959
947
  document.head.appendChild(script);
@@ -974,7 +962,7 @@ class ObservableLoaderMF {
974
962
  notify(newEvent, progress) {
975
963
  this.eventStatus = newEvent;
976
964
  this.subscribers.forEach((subscriber) => {
977
- subscriber(newEvent, progress);
965
+ setTimeout(() => subscriber(newEvent, progress), 1);
978
966
  });
979
967
  }
980
968
  }
@@ -990,7 +978,6 @@ const AreasLoadingError = (props) => {
990
978
  const {
991
979
  getLabel
992
980
  } = useModuleDictionary();
993
- console.log("test status view", status);
994
981
  return /* @__PURE__ */ jsx("div", {
995
982
  className: areasViewerClasses.areasLoadingErrorRoot,
996
983
  children: status !== "error" ? /* @__PURE__ */ jsx("div", {
@@ -1109,20 +1096,17 @@ function MFLoader(props) {
1109
1096
  window[`observable_${prefix}_${moduleId}`]?.tryAgain();
1110
1097
  }, []);
1111
1098
  useEffect(() => {
1112
- const dsScript = {
1099
+ const dsNowScript = {
1113
1100
  ...divScript
1114
1101
  };
1115
1102
  const observableDownload = (event, progress) => {
1116
1103
  setLoadingProgress(progress);
1117
1104
  setStatusLoader(event);
1118
- if (event === "complete") {
1119
- renderMicroFrontend(dsScript);
1120
- }
1121
1105
  };
1122
1106
  if (!window[`render_${prefix}_${moduleId}`]) {
1123
1107
  let observableLoaderMF;
1124
1108
  if (!window[`observable_${prefix}_${moduleId}`]) {
1125
- observableLoaderMF = new ObservableLoaderMF(final_host, dsScript.scriptId, networkOperation, !environment.isLocalhost);
1109
+ observableLoaderMF = new ObservableLoaderMF(final_host, dsNowScript.scriptId, networkOperation, !environment.isLocalhost);
1126
1110
  window[`observable_${prefix}_${moduleId}`] = observableLoaderMF;
1127
1111
  } else {
1128
1112
  observableLoaderMF = window[`observable_${prefix}_${moduleId}`];
@@ -1130,13 +1114,17 @@ function MFLoader(props) {
1130
1114
  observableLoaderMF.subscribe(observableDownload);
1131
1115
  } else {
1132
1116
  setStatusLoader("complete");
1133
- renderMicroFrontend(dsScript);
1134
1117
  }
1135
1118
  return () => {
1136
1119
  window[`observable_${prefix}_${moduleId}`].unsubscribe(observableDownload);
1137
- cleanUp(dsScript);
1120
+ cleanUp(dsNowScript);
1138
1121
  };
1139
1122
  }, [divScript]);
1123
+ useEffect(() => {
1124
+ if (statusLoader === "complete") {
1125
+ renderMicroFrontend(divScript);
1126
+ }
1127
+ }, [statusLoader]);
1140
1128
  return /* @__PURE__ */ jsxs("div", {
1141
1129
  id: divScript.divContainerId,
1142
1130
  style: {
@@ -1212,6 +1200,12 @@ const WindowRoot = styled("div")`
1212
1200
  margin-right: 24px;
1213
1201
  text-overflow: ellipsis;
1214
1202
  }
1203
+
1204
+ & .${areasViewerClasses.windowHeaderCancelHandle} {
1205
+ display: flex;
1206
+ cursor: default;
1207
+ }
1208
+
1215
1209
  // windowHeaderMainActions
1216
1210
  & .${areasViewerClasses.windowHeaderMainActions} {
1217
1211
  display: flex;
@@ -1227,7 +1221,6 @@ const WindowRoot = styled("div")`
1227
1221
 
1228
1222
  & .${areasViewerClasses.windowContent}.${areasViewerClasses.colapsed} {
1229
1223
  display: none !important;
1230
- prop1: juan;
1231
1224
  }
1232
1225
  // windowModalRoot
1233
1226
  & .${areasViewerClasses.windowModalRoot} {
@@ -1275,7 +1268,6 @@ function Toasty(props) {
1275
1268
  toastyId
1276
1269
  } = props;
1277
1270
  const toasty = useAreasStore((state) => state.hashWindows[windowId].hashToasties[toastyId], shallow);
1278
- console.log("percentExecuted", toasty.percentExecuted, toasty.timer);
1279
1271
  const {
1280
1272
  pinToast: pinToasty,
1281
1273
  closeToast: closeToasty
@@ -1349,7 +1341,6 @@ const Window = (props) => {
1349
1341
  const component = useAreasStore((state) => state.hashWindows[windowId]?.component, shallow);
1350
1342
  const loading = useAreasStore((state) => state.hashWindows[windowId]?.loading, shallow);
1351
1343
  const status = useAreasStore((state) => state.hashWindows[windowId]?.status, shallow);
1352
- const colapsed = useAreasStore((state) => state.hashWindows[windowId]?.colapsed, shallow);
1353
1344
  const dynamicMFStore = useAreasStore((state) => state.hashWindows[windowId]?.dynamicMFStore, shallow);
1354
1345
  const {
1355
1346
  setActions,
@@ -1359,7 +1350,8 @@ const Window = (props) => {
1359
1350
  close,
1360
1351
  startProgress,
1361
1352
  stopProgress,
1362
- toast
1353
+ toast,
1354
+ setFnQueryClose
1363
1355
  } = useAreasStore((state) => state.windowActions, shallow);
1364
1356
  const {
1365
1357
  selectLayout
@@ -1385,6 +1377,9 @@ const Window = (props) => {
1385
1377
  close: () => close(windowId),
1386
1378
  startProgress: () => startProgress(windowId),
1387
1379
  stopProgress: () => stopProgress(windowId),
1380
+ setFnQueryClose: (fnQueryClose) => {
1381
+ setFnQueryClose(windowId, fnQueryClose);
1382
+ },
1388
1383
  toast: (toastyOptions) => {
1389
1384
  toast(windowId, toastyOptions);
1390
1385
  }
@@ -1394,18 +1389,12 @@ const Window = (props) => {
1394
1389
  loadCookiesFromApi(windowId);
1395
1390
  }
1396
1391
  }, [status]);
1397
- console.log(
1398
- `Window Render***#,selected:${selected}`,
1399
- moduleId,
1400
- status,
1401
- loading
1402
- );
1403
1392
  if (status === void 0) {
1404
1393
  return null;
1405
1394
  }
1406
1395
  return /* @__PURE__ */ jsx(WindowRoot, {
1407
1396
  role: "presentation",
1408
- className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null, loading ? areasViewerClasses.loading : null),
1397
+ className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null, loading ? areasViewerClasses.loading : null, emergeType === "popup" ? areasViewerClasses.windowPopupRoot : null, emergeType === "modal" ? areasViewerClasses.windowModalRoot : null),
1409
1398
  onMouseDown: onTouch,
1410
1399
  children: /* @__PURE__ */ jsxs("div", {
1411
1400
  className: areasViewerClasses.windowRootContainer,
@@ -1416,7 +1405,9 @@ const Window = (props) => {
1416
1405
  }), /* @__PURE__ */ jsx(Toasties, {
1417
1406
  windowId
1418
1407
  }), /* @__PURE__ */ jsxs("div", {
1419
- className: clsx(areasViewerClasses.windowContent, colapsed ? areasViewerClasses.colapsed : null),
1408
+ className: clsx(
1409
+ areasViewerClasses.windowContent
1410
+ ),
1420
1411
  children: [status === "init" ? /* @__PURE__ */ jsx(Fragment, {
1421
1412
  children: "...Brucee porr analizar Componente de carga"
1422
1413
  }) : null, status === "loaded" ? winType === "microfrontend" ? /* @__PURE__ */ jsx(MemonizedMicroFrontend, {
@@ -1440,9 +1431,8 @@ const AreaGridLayout = (props) => {
1440
1431
  const {
1441
1432
  areaId
1442
1433
  } = props;
1443
- const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].hashLayoutItems, shallow);
1434
+ const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].layoutItemsIds, shallow);
1444
1435
  const layouts = useAreasStore((state) => state.hashAreas[areaId].layouts, shallow);
1445
- const colapsedItems = useAreasStore((state) => state.hashAreas[areaId].colapsedItems, shallow);
1446
1436
  const breakpoints = useAreasStore((state) => state.hashAreas[areaId].breakpoints, shallow);
1447
1437
  const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId, shallow);
1448
1438
  const cols = useAreasStore((state) => state.hashAreas[areaId].cols, shallow);
@@ -1450,7 +1440,6 @@ const AreaGridLayout = (props) => {
1450
1440
  onBreakpointsLayoutsChange,
1451
1441
  onContainerChange
1452
1442
  } = useAreasStore((state) => state.areaActions, shallow);
1453
- console.debug("Window***", hashLayoutItems, layouts);
1454
1443
  return /* @__PURE__ */ jsx(
1455
1444
  ResponsiveGridLayout,
1456
1445
  {
@@ -1461,8 +1450,9 @@ const AreaGridLayout = (props) => {
1461
1450
  className: clsx(areasViewerClasses.areaGridLayout, `${areasViewerClasses.areaGridLayout}-${areaId}`),
1462
1451
  layouts,
1463
1452
  onLayoutChange: (layout, newLayouts) => onBreakpointsLayoutsChange(areaId, layout, newLayouts),
1453
+ draggableHandle: ".m4l_draggable_handle",
1454
+ draggableCancel: `.${areasViewerClasses.windowHeaderCancelHandle}`,
1464
1455
  layoutItemRender: (p) => {
1465
- console.debug("layoutItemRender window", hashLayoutItems, p.i, p.type);
1466
1456
  if (hashLayoutItems.indexOf(p.i) === -1) {
1467
1457
  console.debug("NO EXISTE window", hashLayoutItems, p.i);
1468
1458
  return /* @__PURE__ */ jsx(Fragment, {});
@@ -1472,6 +1462,7 @@ const AreaGridLayout = (props) => {
1472
1462
  children: "Place holder"
1473
1463
  });
1474
1464
  }
1465
+ console.debug("layoutItemRender window", hashLayoutItems, p.i, p.type);
1475
1466
  return /* @__PURE__ */ jsx(Window, {
1476
1467
  windowId: p.i,
1477
1468
  areaId
@@ -1482,14 +1473,12 @@ const AreaGridLayout = (props) => {
1482
1473
  rowHeight: ROW_HEIGTH_GRIDLAYOUT,
1483
1474
  containerMargin: [MARGIN_GRIDLAYOUT, MARGIN_GRIDLAYOUT],
1484
1475
  containerPadding: [PADDING_GRIDLAYOUT, PADDING_GRIDLAYOUT],
1485
- draggableHandle: ".m4l_draggable_handle",
1486
1476
  onContainerChange: (e) => {
1487
1477
  onContainerChange(areaId, e);
1488
1478
  },
1489
1479
  preventCollision: false,
1490
1480
  verticalCompact: true,
1491
- maximizeId: maximizedId,
1492
- colapsedItems
1481
+ maximizeId: maximizedId
1493
1482
  }
1494
1483
  );
1495
1484
  };
@@ -1499,7 +1488,7 @@ const PanelWindows = (props) => {
1499
1488
  } = props;
1500
1489
  const status = useAreasStore((state) => state.hashAreas[areaId].status);
1501
1490
  const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId);
1502
- const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].hashLayoutItems.map((key) => ({
1491
+ const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].layoutItemsIds.filter((itemId) => state.hashWindows[itemId].emergeType === "layout").map((key) => ({
1503
1492
  i: key,
1504
1493
  url_icon: state.hashWindows[key].url_icon,
1505
1494
  title: state.hashWindows[key].title
@@ -1538,7 +1527,6 @@ const InnerForHooks = (props) => {
1538
1527
  } = props;
1539
1528
  const isDesktop = useResponsiveDesktop();
1540
1529
  const status = useAreasStore((state) => state.hashAreas[areaId].status);
1541
- console.debug("Area InnerForHooks***", status);
1542
1530
  return /* @__PURE__ */ jsxs("div", {
1543
1531
  className: clsx(areasViewerClasses.areaGridLayoutPanelContainer, `${areasViewerClasses.areaGridLayoutPanelContainer}-${areaId}`),
1544
1532
  children: [