@m4l/components 1.1.0 → 1.1.2

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 (151) hide show
  1. package/@types/export.d.ts +0 -5
  2. package/@types/types.d.ts +9 -0
  3. package/components/AccountPopover/{index.789ca5b9.js → index.84049a50.js} +3 -3
  4. package/components/AppBar/{index.a1734c3b.js → index.22ed1a0e.js} +4 -4
  5. package/components/BaseModule/{index.db78c929.js → index.0fc648c5.js} +1 -1
  6. package/components/CommonActions/components/ActionCancel/{index.a44544d1.js → index.33cf608e.js} +2 -2
  7. package/components/CommonActions/components/ActionFormCancel/{index.1b921390.js → index.d1359a38.js} +4 -4
  8. package/components/CommonActions/components/ActionFormIntro/{index.624a468b.js → index.415de2bb.js} +2 -2
  9. package/components/CommonActions/components/ActionIntro/{index.63222f6a.js → index.0893587b.js} +2 -2
  10. package/components/CommonActions/components/Actions/{index.46d6c3d1.js → index.2342a37e.js} +2 -2
  11. package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.8ba7afb9.js → index.9d6f8597.js} +1 -1
  12. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.5a93dc9b.js → index.9bcaba12.js} +1 -1
  13. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.35597c7f.js → index.a58a8712.js} +1 -1
  14. package/components/DataGrid/formatters/{index.4a07af63.js → index.6698b419.js} +2 -2
  15. package/components/DataGrid/{index.65f1da52.js → index.b1cac6af.js} +4 -4
  16. package/components/DataGrid/subcomponents/Actions/{index.1fed83ce.js → index.a60b17d5.js} +11 -11
  17. package/components/DragResizeWindow/classes/types.d.ts +1 -0
  18. package/components/DragResizeWindow/helpers/index.d.ts +3 -0
  19. package/components/DragResizeWindow/{index.ad0da648.js → index.46048367.js} +52 -39
  20. package/components/DragResizeWindow/types.d.ts +7 -0
  21. package/components/DynamicFilter/{dictionary.7aeaab97.js → dictionary.da256925.js} +2 -2
  22. package/components/DynamicFilter/{index.895da58e.js → index.08abfc2c.js} +4 -4
  23. package/components/DynamicFilter/slots/{dynamicFilterSlots.84150a22.js → dynamicFilterSlots.b02bff6a.js} +6 -6
  24. package/components/DynamicFilter/store/{index.6ec4c67c.js → index.1e4af8b4.js} +1 -1
  25. package/components/DynamicFilter/subcomponents/AppliedFilterChip/{index.42446f8e.js → index.37bcd016.js} +3 -3
  26. package/components/DynamicFilter/subcomponents/AppliedFilters/{index.621ca411.js → index.2740f285.js} +4 -4
  27. package/components/DynamicFilter/subcomponents/DynamicFilterBase/{index.0c3af964.js → index.63102514.js} +6 -6
  28. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/{index.f92d2a9c.js → index.3824d701.js} +2 -2
  29. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/{index.aad7a12c.js → index.57ddf344.js} +4 -4
  30. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/{index.852c4c73.js → index.7beac9f0.js} +3 -3
  31. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/{index.4beced1d.js → index.e9e1af93.js} +4 -4
  32. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/{index.17191093.js → index.d27a8bcc.js} +3 -3
  33. package/components/DynamicFilter/subcomponents/FieldTypes/{index.10c9c338.js → index.e8f1d8e5.js} +5 -5
  34. package/components/DynamicFilter/subcomponents/FilterActions/{index.7bee6c25.js → index.35014c15.js} +3 -3
  35. package/components/DynamicFilter/subcomponents/InputFilter/{index.85d720be.js → index.f42e9571.js} +4 -4
  36. package/components/DynamicFilter/subcomponents/PopoverFilter/{index.0fdc8a51.js → index.ada7eb0c.js} +6 -6
  37. package/components/DynamicFilter/subcomponents/PopoverMenuFields/{index.3674da6c.js → index.144885cf.js} +2 -2
  38. package/components/FieldLabel/{index.523aaa62.js → index.59b9b63a.js} +4 -4
  39. package/components/GridLayout/{index.3b90ce9b.js → index.56c3f4fa.js} +2 -2
  40. package/components/GridLayout/subcomponents/Griditem/{index.83d54714.js → index.02bcb3b3.js} +3 -3
  41. package/components/GridLayout/subcomponents/Responsive/{index.f06bbf5e.js → index.65aeef5e.js} +1 -1
  42. package/components/GridLayout/subcomponents/SizeProvider/{index.72bfaedb.js → index.0aad6f90.js} +1 -1
  43. package/components/HelperText/{index.af402ba9.js → index.5c72277a.js} +2 -2
  44. package/components/Icon/{index.ab280d41.js → index.13aaae3c.js} +3 -3
  45. package/components/Image/{index.ec13c4a1.js → index.4b51d4ba.js} +2 -2
  46. package/components/LanguagePopover/{index.6af275d0.js → index.7605fda8.js} +4 -4
  47. package/components/LinearProgressIndeterminate/{index.6739ff49.js → index.292a4af8.js} +2 -2
  48. package/components/LoadingError/{index.cfdfb380.js → index.b129b573.js} +5 -5
  49. package/components/MFIsolationApp/{index.96eb2a32.js → index.9f718621.js} +2 -2
  50. package/components/MFLoader/{index.9f542136.js → index.5d340e32.js} +2 -2
  51. package/components/ModalDialog/{index.b975fc7b.js → index.ff275011.js} +4 -4
  52. package/components/NavLink/{index.9cc3caf4.js → index.506c7827.js} +2 -2
  53. package/components/NoItemSelected/{index.4ea373aa.js → index.1d7d5a9d.js} +1 -1
  54. package/components/ObjectLogs/{index.55d93ddb.js → index.473ebd65.js} +9 -9
  55. package/components/PDFViewer/{index.8d8c9d39.js → index.4e7ffac8.js} +2 -2
  56. package/components/Page/{index.eb107182.js → index.b75c74e3.js} +1 -1
  57. package/components/PaperForm/{index.37170e07.js → index.8289409f.js} +2 -2
  58. package/components/Period/{index.2a193da0.js → index.13e4c351.js} +4 -4
  59. package/components/PrintingSystem/{index.6d6cd410.js → index.e1535b80.js} +14 -14
  60. package/components/PrintingSystem/subcomponents/BodyNode/{index.2f4b2285.js → index.6b36842d.js} +1 -1
  61. package/components/PrintingSystem/subcomponents/ChartNode/{index.0e11ce1a.js → index.4aab9d2c.js} +1 -1
  62. package/components/PrintingSystem/subcomponents/DividerNode/{index.774c0eb8.js → index.23a9dc95.js} +1 -1
  63. package/components/PrintingSystem/subcomponents/FooterNode/{index.23fb8a3e.js → index.d0e8fd15.js} +1 -1
  64. package/components/PrintingSystem/subcomponents/GridNode/{index.9cd30c38.js → index.35ff7dab.js} +1 -1
  65. package/components/PrintingSystem/subcomponents/HeaderNode/{index.9f4f2196.js → index.9547c826.js} +1 -1
  66. package/components/PrintingSystem/subcomponents/PaperNode/{index.7b78e756.js → index.71afe03e.js} +1 -1
  67. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.6c924beb.js → index.abbb154c.js} +1 -1
  68. package/components/PrintingSystem/subcomponents/SectionNode/{index.2da2a062.js → index.b3f2ba6c.js} +1 -1
  69. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.334ff3ef.js → index.809aaad2.js} +1 -1
  70. package/components/PropertyValue/{index.cec68741.js → index.36555931.js} +3 -3
  71. package/components/Resizeable/{index.a27cb569.js → index.57363836.js} +1 -1
  72. package/components/ScrollBar/{index.4e447b30.js → index.236e2aa3.js} +1 -1
  73. package/components/SideBar/{index.902789b8.js → index.bb6c2c7b.js} +6 -6
  74. package/components/SplitLayout/{index.e048f8c4.js → index.75953afb.js} +1 -1
  75. package/components/ToastContainer/{index.319037c5.js → index.bb972338.js} +3 -3
  76. package/components/animate/LoadingScreen/{index.d22d67a3.js → index.09915798.js} +1 -1
  77. package/components/animate/{index.271410bf.js → index.5c545243.js} +1 -1
  78. package/components/areas/components/AreasAdmin/{index.f3a211a4.js → index.42d40964.js} +15 -15
  79. package/components/areas/components/AreasViewer/{index.8e9d24c2.js → index.266a3815.js} +15 -15
  80. package/components/areas/components/AreasViewer/styles.d.ts +1 -1
  81. package/components/areas/contexts/AreasContext/{index.b29fb29f.js → index.c2289888.js} +4 -4
  82. package/components/areas/hooks/useAreas/{index.5f7f615d.js → index.509c1703.js} +1 -1
  83. package/components/commercial/AppBarCommercial/{index.8b27200f.js → index.3fd10868.js} +2 -2
  84. package/components/commercial/SectionCommercial/{index.6ffe7283.js → index.bd45c64e.js} +2 -2
  85. package/components/commercial/TopBar/{index.67ee203b.js → index.4e55cffa.js} +6 -6
  86. package/components/commercial/{index.196f2f16.js → index.4bdbb8fe.js} +3 -3
  87. package/components/formatters/BooleanFormatter/{index.71e5727f.js → index.ac870381.js} +2 -2
  88. package/components/formatters/{index.6c7fdd6c.js → index.53ad2f51.js} +2 -2
  89. package/components/hook-form/HelperError/{index.af99c705.js → index.9f93c627.js} +1 -1
  90. package/components/hook-form/RHFAutocomplete/{index.b295a0b4.js → index.b8347185.js} +6 -6
  91. package/components/hook-form/RHFAutocompleteAsync/{index.ad51f3e2.js → index.aeb3bf66.js} +2 -2
  92. package/components/hook-form/RHFCheckbox/{index.4aa49169.js → index.c3b7ce0f.js} +3 -3
  93. package/components/hook-form/RHFColorPicker/{index.6e788803.js → index.c259b8ac.js} +6 -6
  94. package/components/hook-form/RHFDateTime/{index.4c686856.js → index.4efe48ce.js} +4 -4
  95. package/components/hook-form/RHFPeriod/{index.7bd17690.js → index.0f912e3e.js} +4 -4
  96. package/components/hook-form/RHFRadioGroup/RHFRadioGroup.d.ts +1 -1
  97. package/components/hook-form/RHFRadioGroup/formatters/OptionIconLabelFormatter/index.d.ts +2 -0
  98. package/components/hook-form/RHFRadioGroup/index.96c94958.js +52 -0
  99. package/components/hook-form/RHFRadioGroup/types.d.ts +10 -4
  100. package/components/hook-form/RHFTextField/{index.ec3f5dd5.js → index.828b30f5.js} +5 -5
  101. package/components/hook-form/RHFUpload/{index.1275836a.js → index.b664c68b.js} +5 -5
  102. package/components/maps/components/GpsTools/{index.44b82290.js → index.e759163d.js} +23 -23
  103. package/components/maps/components/Map/external/Control/index.d.ts +1 -1
  104. package/components/maps/components/Map/{index.7cb66143.js → index.c568e68d.js} +30 -27
  105. package/components/modal/{WindowBase.e663941b.js → WindowBase.58f9e2b0.js} +3 -3
  106. package/components/modal/{WindowConfirm.abcfd142.js → WindowConfirm.60955735.js} +6 -6
  107. package/components/mui_extended/Accordion/{index.1d692b19.js → index.e6971e30.js} +4 -4
  108. package/components/mui_extended/Avatar/{index.561ed0f7.js → index.8cc99f13.js} +1 -1
  109. package/components/mui_extended/Badge/{index.abad2c28.js → index.07fb40c0.js} +1 -1
  110. package/components/mui_extended/Button/{index.8afd5131.js → index.111f830e.js} +3 -3
  111. package/components/mui_extended/{CheckBox.d84658da.js → CheckBox.a8958eb8.js} +2 -2
  112. package/components/mui_extended/IconButton/{index.cb274bbe.js → index.9425bdc5.js} +2 -2
  113. package/components/mui_extended/MenuActions/{index.8168ad20.js → index.8b0d69b7.js} +5 -5
  114. package/components/mui_extended/Pager/{index.9184e616.js → index.cb749e65.js} +4 -4
  115. package/components/mui_extended/Popover/{index.594e3587.js → index.5e78a637.js} +2 -2
  116. package/components/mui_extended/Stack/{index.6516b2b5.js → index.3674daf7.js} +1 -1
  117. package/components/mui_extended/Tab/{index.2ac4a667.js → index.a94a92c1.js} +1 -1
  118. package/components/mui_extended/ToggleButton/{index.94cd32f3.js → index.a55def3b.js} +1 -1
  119. package/components/mui_extended/ToggleIconButton/{index.3cb364d1.js → index.cd20de81.js} +1 -1
  120. package/components/mui_extended/Typography/{index.71fbb5c4.js → index.45e97bdd.js} +1 -1
  121. package/components/popups/PopupsProvider/{index.07940e4f.js → index.776c62e7.js} +8 -34
  122. package/components/popups/PopupsViewer/constants.29247547.js +4 -0
  123. package/components/popups/PopupsViewer/icons.066abd43.js +7 -0
  124. package/components/popups/PopupsViewer/{index.d8b9a059.js → index.8fe4aa5d.js} +43 -78
  125. package/components/popups/PopupsViewer/slots/index.154e4e5f.js +14 -0
  126. package/components/popups/PopupsViewer/slots/popupsViewerSlots.aaf546e2.js +39 -0
  127. package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts +1 -1
  128. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +27 -47
  129. package/components/popups/components/PopupsViewer/PopupsViewer.d.ts +1 -2
  130. package/components/popups/components/PopupsViewer/constants.d.ts +1 -1
  131. package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +25 -0
  132. package/components/popups/components/PopupsViewer/slots/slots.d.ts +10 -0
  133. package/components/popups/components/PopupsViewer/types.d.ts +17 -3
  134. package/contexts/ModalContext/{index.dd147fa6.js → index.a5c622d6.js} +1 -1
  135. package/contexts/RHFormContext/{index.cedd3482.js → index.40a9547e.js} +1 -1
  136. package/hooks/useFormAddEdit/{index.00c86b5b.js → index.b6a3cf63.js} +2 -2
  137. package/hooks/useModal/{index.84233480.js → index.3ad1e014.js} +1 -1
  138. package/hooks/useTab/{index.74399f56.js → index.4081b113.js} +1 -1
  139. package/index.js +126 -122
  140. package/package.json +1 -1
  141. package/{react-draggable.079122b0.js → react-draggable.310e3387.js} +1 -1
  142. package/{react-resizable.330f1499.js → react-resizable.3755959b.js} +2 -2
  143. package/styles/{DynamicFilter.0713a406.js → DynamicFilter.557ee3a7.js} +1 -1
  144. package/styles/PopupViewer.styles.d.ts +2 -0
  145. package/styles/{index.1735a866.js → index.239f949e.js} +100 -10
  146. package/components/hook-form/RHFRadioGroup/index.11c0add8.js +0 -35
  147. package/components/popups/components/PopupsProvider/contexts/PopupsContext/helper.d.ts +0 -7
  148. package/components/popups/components/PopupsViewer/classes/index.d.ts +0 -17
  149. package/components/popups/components/PopupsViewer/classes/types.d.ts +0 -15
  150. package/components/popups/components/PopupsViewer/styled.d.ts +0 -2
  151. /package/utils/{index.f77cc2ab.js → index.78d1638f.js} +0 -0
@@ -2,59 +2,28 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { TransitionGroup, CSSTransition } from "react-transition-group";
3
3
  import { shallow } from "zustand/shallow";
4
4
  import { forwardRef } from "react";
5
- import clsx from "clsx";
6
5
  import { useEnvironment } from "@m4l/core";
7
- import { u as usePopupsStore } from "../PopupsProvider/index.07940e4f.js";
8
- import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
9
- import { unstable_composeClasses } from "@mui/base";
10
- import { d as draggableWindowClasses, D as DragResizeWindow } from "../../DragResizeWindow/index.ad0da648.js";
11
- import { I as Icon } from "../../Icon/index.ab280d41.js";
12
- import { I as IconButton } from "../../mui_extended/IconButton/index.cb274bbe.js";
6
+ import { u as usePopupsStore } from "../PopupsProvider/index.776c62e7.js";
7
+ import { P as POPUPS_ICONS } from "./icons.066abd43.js";
8
+ import { P as PopupHeaderContainerStyled, a as PopupHeaderTitleStyled, b as PopupHeaderSubTitleStyled, c as PopupContentEditionInfoStyled, d as PopupDragWindowRootStyled, e as PopupContentRootStyled, f as PopupContentWrapperStyled, R as RootStyled } from "./slots/popupsViewerSlots.aaf546e2.js";
9
+ import { d as draggableWindowClasses } from "../../DragResizeWindow/index.46048367.js";
10
+ import { I as Icon } from "../../Icon/index.13aaae3c.js";
11
+ import { I as IconButton } from "../../mui_extended/IconButton/index.9425bdc5.js";
13
12
  import { u as useSizeContainer } from "../../../hooks/useSizeContainer/index.3c48670c.js";
14
- import { styled } from "@mui/material/styles";
15
- const COMPONENT_CLASS_NAME = "M4LPopupsViewer";
16
- const popupsClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
17
- "containerRoot",
18
- "popupRoot",
19
- "popupHeaderContainer",
20
- "popupHeaderTitle",
21
- "popupHeaderSubTitle",
22
- "popupContentRoot",
23
- "popupContentEditionInfo",
24
- "popupContentWrapper",
25
- "popupHidden",
26
- "popupWithSubTitle"
27
- ]);
28
- function getPopupsUtilityClass(slot) {
29
- return generateUtilityClass(COMPONENT_CLASS_NAME, slot);
30
- }
31
- const popupsUtilityClasses = (_ownerState) => {
32
- const slots = {
33
- containerRoot: ["containerRoot"],
34
- popupsContainer: ["popupsContainer"],
35
- popupRoot: ["popupRoot"],
36
- popupHeaderContainer: ["popupHeaderContainer"],
37
- popupHeaderTitle: ["popupHeaderTitle"],
38
- popupHeaderSubTitle: ["popupHeaderSubTitle"],
39
- popupContentRoot: ["popupContentRoot"],
40
- popupContentEditionInfo: ["popupContentEditionInfo"],
41
- popupContentWrapper: ["popupContentWrapper"],
42
- popupHidden: ["popupHidden"],
43
- popupWithSubTitle: ["popupWithSubTitle"]
44
- };
45
- const composedClasses = unstable_composeClasses(slots, getPopupsUtilityClass, {});
46
- return {
47
- ...composedClasses
48
- };
49
- };
50
- const POPUPS_ICONS = {
51
- CLOSE: "close.svg",
52
- EDITION_INFO: "edition_info.svg"
53
- };
54
13
  const Header = (props) => {
55
14
  const { popupId } = props;
56
15
  const { host_static_assets, environment_assets } = useEnvironment();
57
16
  const popup = usePopupsStore((state) => state.hashPopups[popupId], shallow);
17
+ const {
18
+ status,
19
+ subTitle,
20
+ zIndex
21
+ } = popup || {};
22
+ const ownerState = {
23
+ status,
24
+ subTitle,
25
+ zIndex
26
+ };
58
27
  const { closePopup } = usePopupsStore((state) => state.popupsActions, shallow);
59
28
  const { iconUrl } = popup || {};
60
29
  const onClose = () => {
@@ -64,22 +33,14 @@ const Header = (props) => {
64
33
  return null;
65
34
  }
66
35
  return /* @__PURE__ */ jsxs(
67
- "div",
36
+ PopupHeaderContainerStyled,
68
37
  {
69
- className: clsx(popupsClasses.popupHeaderContainer, draggableWindowClasses.draggableHandle),
38
+ ownerState,
39
+ className: draggableWindowClasses.draggableHandle,
70
40
  children: [
71
41
  /* @__PURE__ */ jsx(Icon, { src: iconUrl, size: "small" }),
72
- /* @__PURE__ */ jsx(
73
- "span",
74
- {
75
- className: clsx(
76
- popupsClasses.popupHeaderTitle,
77
- popup.subTitle ? popupsClasses.popupWithSubTitle : null
78
- ),
79
- children: popup.title
80
- }
81
- ),
82
- popup.subTitle && /* @__PURE__ */ jsx("span", { className: popupsClasses.popupHeaderSubTitle, children: popup.subTitle }),
42
+ /* @__PURE__ */ jsx(PopupHeaderTitleStyled, { ownerState: { ...popup }, children: popup.title }),
43
+ popup.subTitle && /* @__PURE__ */ jsx(PopupHeaderSubTitleStyled, { ownerState, children: popup.subTitle }),
83
44
  /* @__PURE__ */ jsx(
84
45
  IconButton,
85
46
  {
@@ -96,7 +57,7 @@ const Header = (props) => {
96
57
  const EditionInfo = (props) => {
97
58
  const { editionInfo } = props;
98
59
  const { host_static_assets, environment_assets } = useEnvironment();
99
- return /* @__PURE__ */ jsxs("div", { className: popupsClasses.popupContentEditionInfo, children: [
60
+ return /* @__PURE__ */ jsxs(PopupContentEditionInfoStyled, { ownerState: { editionInfo }, children: [
100
61
  /* @__PURE__ */ jsx(
101
62
  Icon,
102
63
  {
@@ -112,6 +73,10 @@ const Popup = forwardRef((props, ref) => {
112
73
  const popup = usePopupsStore((state) => state.hashPopups[popupId], shallow);
113
74
  const { setPopupOnTop } = usePopupsStore((state) => state.popupsActions, shallow);
114
75
  const {
76
+ status,
77
+ subTitle,
78
+ editionInfo,
79
+ zIndex,
115
80
  draggable = true,
116
81
  resizable = true,
117
82
  defaultPosition,
@@ -119,6 +84,12 @@ const Popup = forwardRef((props, ref) => {
119
84
  onMouseDown,
120
85
  ...others
121
86
  } = popup || {};
87
+ const ownerState = {
88
+ status,
89
+ subTitle,
90
+ editionInfo,
91
+ zIndex
92
+ };
122
93
  const onMouseDownLocal = (e) => {
123
94
  setPopupOnTop(popupId);
124
95
  if (onMouseDown) {
@@ -129,13 +100,11 @@ const Popup = forwardRef((props, ref) => {
129
100
  return null;
130
101
  }
131
102
  return /* @__PURE__ */ jsxs(
132
- DragResizeWindow,
103
+ PopupDragWindowRootStyled,
133
104
  {
105
+ ownerState,
134
106
  ref,
135
- className: clsx(
136
- popupsClasses.popupRoot,
137
- popup.status === "hidden" && popupsClasses.popupHidden
138
- ),
107
+ hidden: popup.status === "hidden",
139
108
  onMouseDown: onMouseDownLocal,
140
109
  containerElement,
141
110
  containerSize,
@@ -147,30 +116,27 @@ const Popup = forwardRef((props, ref) => {
147
116
  ...others,
148
117
  children: [
149
118
  /* @__PURE__ */ jsx(Header, { popupId: popup.popupId }),
150
- /* @__PURE__ */ jsxs("div", { className: popupsClasses.popupContentRoot, children: [
119
+ /* @__PURE__ */ jsxs(PopupContentRootStyled, { ownerState, children: [
151
120
  popup.editionInfo && /* @__PURE__ */ jsx(EditionInfo, { editionInfo: popup.editionInfo }),
152
- /* @__PURE__ */ jsx("div", { className: popupsClasses.popupContentWrapper, children: popup.functionComponent && popup.functionComponent({ ...popup.componentProps }) })
121
+ /* @__PURE__ */ jsx(PopupContentWrapperStyled, { ownerState, children: popup.functionComponent && popup.functionComponent({ ...popup.componentProps }) })
153
122
  ] })
154
123
  ]
155
124
  }
156
125
  );
157
126
  });
158
- const PopupsViewerRoot = styled("div")`
159
- ${(props) => props.theme.components?.M4LPopupsViewer?.styleOverrides}
160
- `;
161
- const PopupsViewer = (props) => {
162
- const { containerElement } = props;
127
+ const PopupsViewer = () => {
163
128
  const popupsIds = usePopupsStore(
164
129
  (state) => state.popupsIds.filter((pId) => state.hashPopups[pId].status !== "closing"),
165
130
  shallow
166
131
  );
132
+ const baseZindex = usePopupsStore((state) => state.baseZindex, shallow);
133
+ const containerElement = usePopupsStore((state) => state.getContainer, shallow)();
167
134
  const { removePopup } = usePopupsStore((state) => state.popupsActions, shallow);
168
135
  const containerSize = useSizeContainer(containerElement);
169
- if (!containerElement) {
136
+ if (!containerElement || !containerSize) {
170
137
  return null;
171
138
  }
172
- return /* @__PURE__ */ jsx(PopupsViewerRoot, { className: popupsClasses.containerRoot, children: /* @__PURE__ */ jsx(TransitionGroup, { children: popupsIds.map((id) => {
173
- console.log(`${new Date().toLocaleString()}: Render`);
139
+ return /* @__PURE__ */ jsx(RootStyled, { ownerState: { baseZindex }, children: /* @__PURE__ */ jsx(TransitionGroup, { children: popupsIds.map((id) => {
174
140
  return /* @__PURE__ */ jsx(
175
141
  CSSTransition,
176
142
  {
@@ -199,6 +165,5 @@ const PopupsViewer = (props) => {
199
165
  }) }) });
200
166
  };
201
167
  export {
202
- PopupsViewer as P,
203
- popupsUtilityClasses as p
168
+ PopupsViewer as P
204
169
  };
@@ -0,0 +1,14 @@
1
+ var PopupViewerSlots = /* @__PURE__ */ ((PopupViewerSlots2) => {
2
+ PopupViewerSlots2["root"] = "root";
3
+ PopupViewerSlots2["popupDragWindowRoot"] = "popupRoot";
4
+ PopupViewerSlots2["pDWHeaderContainer"] = "pDWHeaderContainer";
5
+ PopupViewerSlots2["pDWHeaderTitle"] = "pDWHeaderTitle";
6
+ PopupViewerSlots2["pDWHeaderSubTitle"] = "pDWHeaderSubTitle";
7
+ PopupViewerSlots2["pDWContentRoot"] = "pDWContentRoot";
8
+ PopupViewerSlots2["pDWContentEditionInfo"] = "pDWContentEditionInfo";
9
+ PopupViewerSlots2["pDWContentWrapper"] = "pDWContentWrapper";
10
+ return PopupViewerSlots2;
11
+ })(PopupViewerSlots || {});
12
+ export {
13
+ PopupViewerSlots as P
14
+ };
@@ -0,0 +1,39 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { P as POPUPS_VIEWER_KEY_COMPONENT } from "../constants.29247547.js";
3
+ import { aO as popupsViewerStyles } from "../../../../styles/index.239f949e.js";
4
+ import { P as PopupViewerSlots } from "./index.154e4e5f.js";
5
+ import { D as DragResizeWindow } from "../../../DragResizeWindow/index.46048367.js";
6
+ const RootStyled = styled("div", { name: POPUPS_VIEWER_KEY_COMPONENT, slot: PopupViewerSlots.root })(
7
+ popupsViewerStyles?.root
8
+ );
9
+ const PopupDragWindowRootStyled = styled(DragResizeWindow, { name: POPUPS_VIEWER_KEY_COMPONENT, slot: PopupViewerSlots.root })(
10
+ popupsViewerStyles?.popupDragWindowRoot
11
+ );
12
+ const PopupContentEditionInfoStyled = styled("div", { name: POPUPS_VIEWER_KEY_COMPONENT, slot: PopupViewerSlots.root })(
13
+ popupsViewerStyles?.pDWContentEditionInfo
14
+ );
15
+ const PopupHeaderContainerStyled = styled("div", { name: POPUPS_VIEWER_KEY_COMPONENT, slot: PopupViewerSlots.root })(
16
+ popupsViewerStyles?.pDWHeaderContainer
17
+ );
18
+ const PopupHeaderTitleStyled = styled("span", { name: POPUPS_VIEWER_KEY_COMPONENT, slot: PopupViewerSlots.root })(
19
+ popupsViewerStyles?.pDWHeaderTitle
20
+ );
21
+ const PopupHeaderSubTitleStyled = styled("span", { name: POPUPS_VIEWER_KEY_COMPONENT, slot: PopupViewerSlots.root })(
22
+ popupsViewerStyles?.pDWHeaderSubTitle
23
+ );
24
+ const PopupContentRootStyled = styled("div", { name: POPUPS_VIEWER_KEY_COMPONENT, slot: PopupViewerSlots.root })(
25
+ popupsViewerStyles?.pDWContentRoot
26
+ );
27
+ const PopupContentWrapperStyled = styled("div", { name: POPUPS_VIEWER_KEY_COMPONENT, slot: PopupViewerSlots.root })(
28
+ popupsViewerStyles?.pDWContentWrapper
29
+ );
30
+ export {
31
+ PopupHeaderContainerStyled as P,
32
+ RootStyled as R,
33
+ PopupHeaderTitleStyled as a,
34
+ PopupHeaderSubTitleStyled as b,
35
+ PopupContentEditionInfoStyled as c,
36
+ PopupDragWindowRootStyled as d,
37
+ PopupContentRootStyled as e,
38
+ PopupContentWrapperStyled as f
39
+ };
@@ -13,4 +13,4 @@ export declare const createPopupsStore: (initProps: InitialPopupsStoreProps) =>
13
13
  type: unknown;
14
14
  } | undefined): void;
15
15
  };
16
- export declare type PopupsStore = ReturnType<typeof createPopupsStore>;
16
+ export declare type PopupsStoreWithActionsType = ReturnType<typeof createPopupsStore>;
@@ -1,9 +1,7 @@
1
1
  import { GetLabelType } from '@m4l/core';
2
2
  import { ReactNode } from 'react';
3
- import { PopupsClasses } from '../../../PopupsViewer/classes/types';
4
3
  import { DraggableWindowProps } from '../../../../../DragResizeWindow/types';
5
- import { PositionXY } from '../../../../../../utils/types';
6
- export declare type PopupStatus = 'init' | 'closing' | 'hidden';
4
+ import { PopupStatus } from '../../../PopupsViewer/types';
7
5
  export interface PopupStoreProps extends Pick<DraggableWindowProps, 'bounds' | 'defaultPosition'> {
8
6
  /**
9
7
  * "popupId" Indetificador del popupId
@@ -38,9 +36,9 @@ export interface PopupStoreProps extends Pick<DraggableWindowProps, 'bounds' | '
38
36
  */
39
37
  resizable?: boolean;
40
38
  /**
41
- * maxSizeByPadding Tamaño maximo del popup en terminos de padding con respecto al conenedor padre
39
+ * "zIndex" Zindex del popup, tener en cuenta que se usa el baseZindex como offset para el zIndex
42
40
  */
43
- maxSizeByPadding?: PositionXY;
41
+ zIndex: number;
44
42
  /**
45
43
  * "componentProps" Propiedades que se le pasan al componente que se va a mostrar en el popup.
46
44
  */
@@ -55,39 +53,16 @@ export interface PopupStoreProps extends Pick<DraggableWindowProps, 'bounds' | '
55
53
  * "onMouseDown" Evento nativo del Draggable, para tomar acciones externamente
56
54
  */
57
55
  onMouseDown?: (e: MouseEvent) => void;
58
- /**
59
- * "zIndex" Zindex del popup
60
- */
61
- zIndex: number;
62
56
  }
63
- export declare type PopupsClassStatus = 'init' | 'ready';
64
- export declare type OwnerState = {
65
- status: PopupsClassStatus;
66
- /**
67
- * "isMobile" cuando el navegador está en modo celular
68
- */
69
- isMobile: boolean;
70
- /**
71
- * "isSkeleton" indica si el componente está en skeleton.
72
- */
73
- isSkeleton: boolean;
74
- };
75
- /**
76
- * @type
77
- * @name ExternalOwnerState
78
- * @description Estados que se actulizan por fuera del store, a través de hooks
79
- */
80
- export declare type ExternalOwnerState = Pick<OwnerState, 'isMobile' | 'isSkeleton'>;
81
57
  /**
82
58
  * @interface
83
- * @description Interface que define el estado del componente (variables y funciones )
59
+ * @description Interface que define el store del componente (variables y funciones )
84
60
  */
85
- export interface PopupsState {
86
- ownerState: OwnerState;
61
+ export interface PopupsStore {
87
62
  /**
88
- * "classes" enfocado al funcionamiento de las clases a nivel de map
63
+ * @description Id del store, para identificarlo en las herramientas de redux.
89
64
  */
90
- classes: PopupsClasses;
65
+ storeId?: string;
91
66
  /**
92
67
  * "poupsIds" Poups para saber en que orden se muestran
93
68
  */
@@ -109,6 +84,10 @@ export interface PopupsState {
109
84
  * "getLabel" funcion que usará para traducir las etiquetas de diccionario
110
85
  */
111
86
  getLabel: GetLabelType;
87
+ /**
88
+ * "getLabel" funcion que usará para traducir las etiquetas de diccionario
89
+ */
90
+ getContainer: () => HTMLElement;
112
91
  }
113
92
  export declare type OpenPopupOptions = {
114
93
  /**
@@ -116,16 +95,12 @@ export declare type OpenPopupOptions = {
116
95
  */
117
96
  closeOthers: boolean;
118
97
  };
119
- export interface PopupsStateWithActions extends PopupsState {
98
+ export interface PopupsStateWithActions extends PopupsStore {
120
99
  popupsActions: {
121
100
  /**
122
101
  * @description
123
102
  */
124
103
  init(layersStore: PopupStoreProps[]): void;
125
- /**
126
- * @description Cambia el estado del popus
127
- */
128
- setState: (state: PopupsClassStatus) => void;
129
104
  /**
130
105
  * @description Agrega una un poupup nuevo al hash de popups y al array de ids,
131
106
  */
@@ -161,18 +136,23 @@ export interface PopupsStateWithActions extends PopupsState {
161
136
  * @returns void
162
137
  */
163
138
  setHandlerGetLabel: (newHandler: GetLabelType) => void;
164
- /**
165
- * @description Modifica los estados que se actualizan externamente al Store
166
- * @param newIsMobile
167
- * @returns
168
- */
169
- setExternalState: (newExternalState: ExternalOwnerState) => void;
170
139
  };
171
140
  }
172
- export declare type DefaultPopupsStoreProps = PopupsState;
173
- export declare type InitialPopupsStoreProps = Pick<PopupsState, 'getLabel' | 'ownerState' | 'baseZindex'> & Partial<DefaultPopupsStoreProps>;
174
- export interface PopupsProviderProps {
175
- baseZindex?: number;
141
+ export declare type DefaultPopupsStoreProps = PopupsStore;
142
+ export declare type InitialPopupsStoreProps = Pick<PopupsStore, 'getLabel' | 'baseZindex'> & Partial<DefaultPopupsStoreProps> & {
143
+ containerElement: HTMLElement;
144
+ };
145
+ export interface PopupsProviderProps extends Pick<PopupsStore, 'baseZindex' | 'storeId'> {
146
+ /**
147
+ * Contenedor donde los popups serán renderizados
148
+ */
149
+ containerElement: HTMLElement;
150
+ /**
151
+ * @description Poopus abiertos desde el principio, puede servir para abrir los poupus previamente cargados en las cookies
152
+ */
176
153
  initialPopups?: PopupStoreProps[];
154
+ /**
155
+ * @description children
156
+ */
177
157
  children: ReactNode;
178
158
  }
@@ -1,8 +1,7 @@
1
- import type { PopupContainerProps } from './types';
2
1
  /**
3
2
  * @description Visor de poups, cuyo funcionamineto depende del proveedor de popups. PoupsProvider.
4
3
  * Utiliza la librería de tranciones para animar la apertura y cierre de los popups.
5
4
  * @param props
6
5
  * @returns
7
6
  */
8
- export declare const PopupsViewer: (props: PopupContainerProps) => import("react/jsx-runtime").JSX.Element | null;
7
+ export declare const PopupsViewer: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,5 @@
1
1
  export declare const COMPONENT_TEST_ID = "M4LPopupsViewer";
2
- export declare const COMPONENT_CLASS_NAME = "M4LPopupsViewer";
2
+ export declare const POPUPS_VIEWER_KEY_COMPONENT = "M4LPopupsViewer";
3
3
  export declare const EARTH_RADIO = 6378137;
4
4
  export declare const DN = 500;
5
5
  export declare const DE = 500;
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ export declare const RootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown> & {
3
+ ownerState: Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown>;
4
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
5
+ export declare const PopupDragWindowRootStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../DragResizeWindow/types").DraggableWindowProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../../../DragResizeWindow/types").DraggableWindowProps | keyof import("react").RefAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown> & {
6
+ ownerState: Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown>;
7
+ }, {}, {}>;
8
+ export declare const PopupContentEditionInfoStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown> & {
9
+ ownerState: Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown>;
10
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
11
+ export declare const PopupHeaderContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown> & {
12
+ ownerState: Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown>;
13
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
14
+ export declare const PopupHeaderTitleStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown> & {
15
+ ownerState: Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown>;
16
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("react").ClassAttributes<HTMLSpanElement> | keyof import("react").HTMLAttributes<HTMLSpanElement>>, {}>;
17
+ export declare const PopupHeaderSubTitleStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown> & {
18
+ ownerState: Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown>;
19
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("react").ClassAttributes<HTMLSpanElement> | keyof import("react").HTMLAttributes<HTMLSpanElement>>, {}>;
20
+ export declare const PopupContentRootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown> & {
21
+ ownerState: Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown>;
22
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
23
+ export declare const PopupContentWrapperStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown> & {
24
+ ownerState: Partial<import("../types").PopupsViewerOwnerState> & Record<string, unknown>;
25
+ }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
@@ -0,0 +1,10 @@
1
+ export declare enum PopupViewerSlots {
2
+ root = "root",
3
+ popupDragWindowRoot = "popupRoot",
4
+ pDWHeaderContainer = "pDWHeaderContainer",
5
+ pDWHeaderTitle = "pDWHeaderTitle",
6
+ pDWHeaderSubTitle = "pDWHeaderSubTitle",
7
+ pDWContentRoot = "pDWContentRoot",
8
+ pDWContentEditionInfo = "pDWContentEditionInfo",
9
+ pDWContentWrapper = "pDWContentWrapper"
10
+ }
@@ -1,3 +1,17 @@
1
- export declare type PopupContainerProps = {
2
- containerElement: HTMLElement;
3
- };
1
+ import { Theme } from '@mui/material/styles';
2
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
3
+ import { PopupViewerSlots } from './slots/slots';
4
+ import { POPUPS_VIEWER_KEY_COMPONENT } from './constants';
5
+ import { PopupStoreProps, PopupsStore } from '../PopupsProvider/contexts/PopupsContext/types';
6
+ export declare type PopupViewerSlotsType = keyof typeof PopupViewerSlots;
7
+ export declare type PopupsViewerProps = {};
8
+ export declare type PopupStatus = 'init' | 'closing' | 'hidden';
9
+ export interface PopupOwnerState extends Pick<PopupStoreProps, 'status' | 'subTitle' | 'editionInfo' | 'zIndex'> {
10
+ /**
11
+ * "isMobile" cuando el navegador está corriendo en dispositivo móvil
12
+ */
13
+ isMobile?: boolean;
14
+ }
15
+ export interface PopupsViewerOwnerState extends Pick<PopupsStore, 'baseZindex'>, PopupOwnerState {
16
+ }
17
+ export declare type PopupsViewerStyles = Partial<OverridesStyleRules<PopupViewerSlotsType, typeof POPUPS_VIEWER_KEY_COMPONENT, Theme> | undefined> | undefined;
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { createContext, useState } from "react";
3
- import { M as ModalDialog } from "../../components/ModalDialog/index.b975fc7b.js";
3
+ import { M as ModalDialog } from "../../components/ModalDialog/index.ff275011.js";
4
4
  const ModalContext = createContext(null);
5
5
  function ModalProvider({ children }) {
6
6
  const [modalOptions, setModalOptions] = useState({
@@ -3,7 +3,7 @@ import { useEffect } from "react";
3
3
  import clsx from "clsx";
4
4
  import { useForm, FormProvider } from "react-hook-form";
5
5
  import { yupResolver } from "@hookform/resolvers/yup";
6
- import { aO as FormProviderRoot } from "../../styles/index.1735a866.js";
6
+ import { aP as FormProviderRoot } from "../../styles/index.239f949e.js";
7
7
  import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
8
8
  import { unstable_composeClasses } from "@mui/base";
9
9
  const componentName = "M4LRHFormProvider";
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useNetwork, useFlagsStore, useModuleDictionary } from "@m4l/core";
3
3
  import { useState, useEffect } from "react";
4
- import { u as useModal } from "../useModal/index.84233480.js";
5
- import { W as WindowConfirm } from "../../components/modal/WindowConfirm.abcfd142.js";
4
+ import { u as useModal } from "../useModal/index.3ad1e014.js";
5
+ import { W as WindowConfirm } from "../../components/modal/WindowConfirm.60955735.js";
6
6
  function useFormAddEdit(props) {
7
7
  const {
8
8
  initialValues,
@@ -1,5 +1,5 @@
1
1
  import { useContext } from "react";
2
- import { a as ModalContext } from "../../contexts/ModalContext/index.dd147fa6.js";
2
+ import { a as ModalContext } from "../../contexts/ModalContext/index.a5c622d6.js";
3
3
  function useModal() {
4
4
  const context = useContext(ModalContext);
5
5
  if (!context)
@@ -1,5 +1,5 @@
1
1
  import { useContext } from "react";
2
- import { d as TabContext } from "../../components/mui_extended/Tab/index.2ac4a667.js";
2
+ import { d as TabContext } from "../../components/mui_extended/Tab/index.a94a92c1.js";
3
3
  const useTab = () => {
4
4
  const context = useContext(TabContext);
5
5
  if (context === null) {