@m4l/components 0.1.68 → 0.1.70

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 (389) hide show
  1. package/@types/export.d.ts +24 -0
  2. package/assets/Logo.d.ts +2 -1
  3. package/components/AccountPopover/AccountPopover.d.ts +2 -1
  4. package/components/AccountPopover/style.d.ts +2 -0
  5. package/components/AccountPopover/subcomponents/PopOver/index.d.ts +2 -1
  6. package/components/AccountPopover/subcomponents/PopOver/styles.d.ts +8 -0
  7. package/components/AppBar/AppBar.d.ts +2 -1
  8. package/components/AppBar/styles.d.ts +2 -0
  9. package/components/AppBar/subcomponents/MyAvatar/index.d.ts +2 -1
  10. package/components/CommonActions/classes/constants.d.ts +1 -0
  11. package/components/CommonActions/classes/index.d.ts +4 -0
  12. package/components/CommonActions/classes/types.d.ts +11 -0
  13. package/components/CommonActions/components/ActionCancel/{index.49e5c8b2.js → index.9d521b2a.js} +4 -1
  14. package/components/CommonActions/components/ActionCancel/index.d.ts +2 -1
  15. package/components/CommonActions/components/ActionFormCancel/{index.58b30b03.js → index.4756457f.js} +27 -12
  16. package/components/CommonActions/components/ActionFormCancel/index.d.ts +2 -1
  17. package/components/CommonActions/components/ActionFormIntro/{index.a9ecbb73.js → index.40321b1b.js} +4 -1
  18. package/components/CommonActions/components/ActionFormIntro/index.d.ts +2 -1
  19. package/components/CommonActions/components/ActionIntro/{index.6605ee21.js → index.1ba5b02b.js} +5 -2
  20. package/components/CommonActions/components/ActionIntro/index.d.ts +2 -1
  21. package/components/CommonActions/components/Actions/index.154d7cb6.js +96 -0
  22. package/components/CommonActions/components/Actions/index.d.ts +2 -1
  23. package/components/CommonActions/components/Actions/styles.d.ts +2 -0
  24. package/components/DataGrid/contexts/DataGridContext/index.d.ts +1 -1
  25. package/components/DataGrid/contexts/FilterContext/index.d.ts +1 -1
  26. package/components/DataGrid/formatters/columnBooleanFormatter/index.d.ts +2 -1
  27. package/components/DataGrid/formatters/columnConcatenatedValueFormatter/index.d.ts +2 -1
  28. package/components/DataGrid/formatters/columnDateFormatter/index.d.ts +2 -1
  29. package/components/DataGrid/formatters/columnNestedValueFormatter/index.d.ts +2 -1
  30. package/components/DataGrid/formatters/columnPointsFormatter/index.d.ts +2 -1
  31. package/components/DataGrid/formatters/columnPriceFormatter/index.d.ts +2 -1
  32. package/components/DataGrid/formatters/columnUncertaintyFormatter/index.d.ts +2 -1
  33. package/components/DataGrid/{index.f4f7f858.js → index.2f4a0e64.js} +21 -19
  34. package/components/DataGrid/index.d.ts +2 -1
  35. package/components/DataGrid/styles.d.ts +3 -0
  36. package/components/DataGrid/subcomponents/Actions/index.d.ts +2 -1
  37. package/components/DataGrid/subcomponents/Actions/styles.d.ts +2 -0
  38. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.d.ts +2 -1
  39. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/styles.d.ts +3 -0
  40. package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/index.d.ts +2 -1
  41. package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/styles.d.ts +2 -0
  42. package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/index.d.ts +2 -1
  43. package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/styles.d.ts +4 -0
  44. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/index.d.ts +2 -1
  45. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/styles.d.ts +2 -0
  46. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +8 -0
  47. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/subcomponents/FormatterColumn/index.d.ts +2 -1
  48. package/components/DataGrid/subcomponents/Table/index.d.ts +2 -1
  49. package/components/DataGrid/subcomponents/Table/styles.d.ts +3 -0
  50. package/components/DataGrid/subcomponents/Table/subcomponents/CustomIcons.d.ts +14 -13
  51. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/index.d.ts +2 -1
  52. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +2 -0
  53. package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +6 -0
  54. package/components/DraggableWindow/index.d.ts +2 -1
  55. package/components/DynamicFilter/DynamicFilter.d.ts +2 -1
  56. package/components/DynamicFilter/classes/index.d.ts +1 -1
  57. package/components/DynamicFilter/classes/types.d.ts +5 -0
  58. package/components/DynamicFilter/constants.d.ts +2 -2
  59. package/components/DynamicFilter/contexts/DynamicFilterContext/index.d.ts +1 -1
  60. package/components/DynamicFilter/contexts/DynamicFilterContext/store.d.ts +1 -1
  61. package/components/DynamicFilter/dictionary.d.ts +10 -0
  62. package/components/DynamicFilter/{index.2485b282.js → index.789ab474.js} +144 -136
  63. package/components/DynamicFilter/subcomponents/ApplyedFilters/index.d.ts +2 -1
  64. package/components/DynamicFilter/subcomponents/ApplyedFilters/styles.d.ts +3 -0
  65. package/components/DynamicFilter/subcomponents/ApplyedFilters/subcomponents/ApplyedFilter/index.d.ts +2 -1
  66. package/components/DynamicFilter/subcomponents/ApplyedFilters/subcomponents/ApplyedFilter/styles.d.ts +6 -0
  67. package/components/DynamicFilter/subcomponents/ClearFilters/index.d.ts +2 -1
  68. package/components/DynamicFilter/subcomponents/ClearFilters/styles.d.ts +3 -0
  69. package/components/DynamicFilter/subcomponents/FilterButton/index.d.ts +2 -1
  70. package/components/DynamicFilter/subcomponents/FilterButton/styles.d.ts +3 -0
  71. package/components/DynamicFilter/subcomponents/InnerForHooks/index.d.ts +2 -1
  72. package/components/DynamicFilter/subcomponents/InnerForHooks/styles.d.ts +3 -0
  73. package/components/DynamicFilter/subcomponents/InputFilter/index.d.ts +2 -1
  74. package/components/DynamicFilter/subcomponents/PopoverFilter/index.d.ts +2 -1
  75. package/components/DynamicFilter/subcomponents/PopoverFilter/styles.d.ts +2 -0
  76. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index.d.ts +2 -1
  77. package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/index.d.ts +2 -1
  78. package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/styles.d.ts +2 -0
  79. package/components/DynamicFilter/subcomponents/fieldstypes/DateTimeFilter/index.d.ts +2 -1
  80. package/components/DynamicFilter/subcomponents/fieldstypes/DateTimeFilter/styles.d.ts +2 -0
  81. package/components/DynamicFilter/subcomponents/fieldstypes/NumberFilter/index.d.ts +2 -1
  82. package/components/DynamicFilter/subcomponents/fieldstypes/NumberFilter/styles.d.ts +2 -0
  83. package/components/DynamicFilter/subcomponents/fieldstypes/StringFilter/index.d.ts +2 -1
  84. package/components/DynamicFilter/subcomponents/fieldstypes/StringFilter/styles.d.ts +2 -0
  85. package/components/DynamicFilter/subcomponents/fieldstypes/factory.d.ts +2 -1
  86. package/components/HelmetPage/index.d.ts +2 -1
  87. package/components/HelperText/{index.dba051a9.js → index.a69e9509.js} +9 -9
  88. package/components/HelperText/index.d.ts +2 -1
  89. package/components/HelperText/styles.d.ts +2 -0
  90. package/components/Icon/Icon.d.ts +2 -1
  91. package/components/Icon/{index.f0a7d42d.js → index.caaed284.js} +2 -2
  92. package/components/Icon/styles.d.ts +4 -0
  93. package/components/Image/Image.d.ts +2 -1
  94. package/components/Image/{index.b216f30c.js → index.82a6cd46.js} +1 -1
  95. package/components/Image/styles.d.ts +3 -0
  96. package/components/Image/subcomponents/LazyLoadComponent/index.d.ts +2 -1
  97. package/components/Image/subcomponents/LazyLoadComponent/styles.d.ts +2 -0
  98. package/components/Image/subcomponents/Skeleton/index.d.ts +2 -1
  99. package/components/Image/subcomponents/Skeleton/styles.d.ts +2 -0
  100. package/components/LanguagePopover/LanguagePopover.d.ts +2 -1
  101. package/components/LanguagePopover/{index.8032715d.js → index.5af28b9e.js} +10 -10
  102. package/components/LanguagePopover/styles.d.ts +6 -0
  103. package/components/Loadable/index.d.ts +1 -1
  104. package/components/ModalDialog/{index.20a9b77a.js → index.cdfd1ae8.js} +5 -5
  105. package/components/NavLink/NavLink.d.ts +2 -1
  106. package/components/NavLink/{index.488dc01c.js → index.251fcf0d.js} +10 -10
  107. package/components/NavLink/styles.d.ts +2 -0
  108. package/components/NoItemSelected/{index.02c6c7ac.js → index.3b9d16e3.js} +1 -1
  109. package/components/NoItemSelected/index.d.ts +2 -1
  110. package/components/NoItemSelected/styles.d.ts +5 -0
  111. package/components/ObjectLogs/components/DetailDialog/index.d.ts +2 -1
  112. package/components/ObjectLogs/components/DetailDialog/styles.d.ts +3 -0
  113. package/components/ObjectLogs/components/DetailFormatter/index.d.ts +2 -1
  114. package/components/ObjectLogs/{index.9ff8250d.js → index.57ea68b3.js} +17 -15
  115. package/components/ObjectLogs/index.d.ts +2 -1
  116. package/components/ObjectLogs/styles.d.ts +4 -0
  117. package/components/PaperForm/components/Header.d.ts +2 -1
  118. package/components/PaperForm/index.d.ts +2 -1
  119. package/components/PaperForm/{index.0285a63f.js → index.d2d492ea.js} +1 -1
  120. package/components/PaperForm/styles.d.ts +7 -0
  121. package/components/Period/index.d.ts +2 -1
  122. package/components/Period/{index.41358ce0.js → index.fbf074d3.js} +24 -14
  123. package/components/Period/styles.d.ts +7 -0
  124. package/components/PropertyValue/index.d.ts +2 -1
  125. package/components/PropertyValue/skeleton.d.ts +2 -1
  126. package/components/PropertyValue/styles.d.ts +6 -0
  127. package/components/Resizeable/{index.18a50191.js → index.aafda79e.js} +1 -1
  128. package/components/ResizeableWindow/index.d.ts +2 -1
  129. package/components/ResizeableWindow/styles.d.ts +5 -0
  130. package/components/ScrollBar/index.d.ts +1 -1
  131. package/components/ScrollBar/styles.d.ts +8 -0
  132. package/components/SideBar/SideBar.d.ts +2 -1
  133. package/components/SideBar/classes/index.d.ts +2 -0
  134. package/components/SideBar/classes/types.d.ts +2 -4
  135. package/components/SideBar/context/sideBarContext/index.d.ts +1 -1
  136. package/components/SideBar/context/sideBarContext/types.d.ts +2 -2
  137. package/components/SideBar/{index.3ba3a821.js → index.3bc6a634.js} +190 -201
  138. package/components/SideBar/styles.d.ts +5 -0
  139. package/components/SideBar/subcomponents/ContentDesktop/index.d.ts +2 -1
  140. package/components/SideBar/subcomponents/ContentDesktop/style.d.ts +2 -0
  141. package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/index.d.ts +2 -1
  142. package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/styles.d.ts +3 -0
  143. package/components/SideBar/subcomponents/ContentGroups/index.d.ts +2 -1
  144. package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +5 -0
  145. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/index.d.ts +2 -1
  146. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +2 -0
  147. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/index.d.ts +2 -1
  148. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/styles.d.ts +2 -0
  149. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/index.d.ts +2 -1
  150. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/styles.d.ts +9 -0
  151. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/subcomponents/NavItemRootContent/index.d.ts +2 -1
  152. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/subcomponents/NavItemRootContent/styles.d.ts +3 -0
  153. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +0 -1
  154. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/index.d.ts +2 -1
  155. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/styles.d.ts +2 -0
  156. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/index.d.ts +2 -1
  157. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/index.d.ts +2 -1
  158. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +22 -0
  159. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/types.d.ts +3 -2
  160. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/types.d.ts +4 -1
  161. package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/index.d.ts +2 -1
  162. package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/styles.d.ts +6 -0
  163. package/components/SideBar/subcomponents/ContentMobile/index.d.ts +2 -1
  164. package/components/SideBar/subcomponents/ContentMobile/styles.d.ts +3 -0
  165. package/components/SideBar/types.d.ts +2 -0
  166. package/components/SplitLayout/index.d.ts +2 -1
  167. package/components/SplitLayout/styles.d.ts +4 -0
  168. package/components/WrapperComponent/index.d.ts +1 -0
  169. package/components/animate/LoadingScreen/index.d.ts +2 -1
  170. package/components/animate/LoadingScreen/styles.d.ts +3 -0
  171. package/components/animate/MotionContainer/index.d.ts +2 -1
  172. package/components/animate/MotionLazyContainer/index.d.ts +1 -1
  173. package/components/animate/PropagateLoader/index.d.ts +2 -1
  174. package/components/animate/PropagateLoader/syles.d.ts +2 -0
  175. package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
  176. package/components/areas/components/AreasAdmin/classes/types.d.ts +4 -1
  177. package/components/areas/components/AreasAdmin/index.d.ts +2 -1
  178. package/components/areas/components/AreasAdmin/styles.d.ts +2 -0
  179. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index.d.ts +2 -1
  180. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +1 -0
  181. package/components/areas/components/AreasViewer/classes/types.d.ts +1 -0
  182. package/components/areas/components/AreasViewer/index.d.ts +2 -1
  183. package/components/areas/components/AreasViewer/styles.d.ts +2 -0
  184. package/components/areas/components/AreasViewer/subcomponents/Area/index.d.ts +3 -2
  185. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/GridLayout/index.d.ts +3 -1
  186. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/GridLayout/types.d.ts +3 -0
  187. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/InnerForHooks/index.d.ts +3 -1
  188. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/InnerForHooks/types.d.ts +3 -0
  189. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/PanelWindows/index.d.ts +3 -1
  190. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/PanelWindows/types.d.ts +3 -0
  191. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/index.d.ts +3 -3
  192. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/styles.d.ts +2 -0
  193. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/index.d.ts +4 -0
  194. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/types.d.ts +9 -0
  195. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.d.ts +3 -0
  196. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.d.ts +9 -0
  197. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/skeleton.d.ts +2 -0
  198. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/styles.d.ts +9 -0
  199. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/MainActions/index.d.ts +6 -0
  200. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/index.d.ts +4 -0
  201. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/{InnerForHooks/subcomponents/MicroFrontend → MicroFrontend}/subcomponents/MFLoader/index.d.ts +3 -2
  202. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/index.d.ts +3 -0
  203. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/styles.d.ts +2 -0
  204. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/{InnerForHooks/subcomponents/MicroFrontend → MicroFrontend}/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/index.d.ts +2 -1
  205. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/styles.d.ts +2 -0
  206. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/types.d.ts +8 -0
  207. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/types.d.ts +8 -0
  208. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/types.d.ts +2 -0
  209. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/index.d.ts +2 -2
  210. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/styles.d.ts +3 -0
  211. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowPopUp/index.d.ts +2 -2
  212. package/components/areas/components/AreasViewer/subcomponents/Area/types.d.ts +4 -0
  213. package/components/areas/components/index.359c2b18.js +1514 -0
  214. package/components/areas/components/index.d.ts +1 -1
  215. package/components/areas/contexts/AreasContext/helper.d.ts +59 -0
  216. package/components/areas/contexts/AreasContext/index.d.ts +1 -1
  217. package/components/areas/contexts/AreasContext/index.de8b4e78.js +1015 -0
  218. package/components/areas/contexts/AreasContext/store.d.ts +1 -2
  219. package/components/areas/contexts/AreasContext/types.d.ts +86 -13
  220. package/components/areas/contexts/DynamicMFParmsContext/index.1607c78e.js +42 -0
  221. package/components/areas/contexts/DynamicMFParmsContext/index.d.ts +8 -0
  222. package/components/areas/{components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts → contexts}/DynamicMFParmsContext/store.d.ts +3 -9
  223. package/components/areas/contexts/WindowToolsMFContext/index.8f3e2a04.js +20 -0
  224. package/components/areas/{components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts → contexts}/WindowToolsMFContext/index.d.ts +1 -1
  225. package/components/areas/{components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts → contexts}/WindowToolsMFContext/types.d.ts +3 -2
  226. package/components/areas/contexts/index.771827bb.js +2 -0
  227. package/components/areas/contexts/index.d.ts +4 -4
  228. package/components/areas/dictionary.d.ts +1 -0
  229. package/components/areas/hooks/index.ae8d8631.js +13 -0
  230. package/components/areas/hooks/useArea/index.2adbe001.js +12 -0
  231. package/components/areas/hooks/useDynamicMFParameters/index.d.ts +3 -9
  232. package/components/areas/hooks/useDynamicMFParameters/{index.c9a35fad.js → index.e52c5392.js} +1 -1
  233. package/components/areas/hooks/useWindowToolsMF/index.d.ts +1 -1
  234. package/components/areas/icons.d.ts +4 -0
  235. package/components/areas/{index.38620c15.js → index.8a58bcbf.js} +15 -8
  236. package/components/areas/types.d.ts +32 -23
  237. package/components/formatters/BooleanFormatter/{index.083362c8.js → index.7eb0498c.js} +1 -1
  238. package/components/formatters/BooleanFormatter/index.d.ts +2 -1
  239. package/components/formatters/ConcatenatedFormatter/index.d.ts +1 -0
  240. package/components/formatters/DateFormatter/index.d.ts +2 -1
  241. package/components/formatters/PeriodFormatter/index.d.ts +1 -0
  242. package/components/formatters/PointsFormatter/index.d.ts +2 -1
  243. package/components/formatters/PriceFormatter/index.d.ts +2 -1
  244. package/components/formatters/UncertaintyFormatter/index.d.ts +2 -1
  245. package/components/formatters/{index.2d587e05.js → index.f6b9ed01.js} +2 -2
  246. package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +2 -1
  247. package/components/hook-form/RHFAutocomplete/{index.6f0823fb.js → index.09c400c3.js} +11 -11
  248. package/components/hook-form/RHFAutocomplete/styles.d.ts +2 -0
  249. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index.d.ts +1 -1
  250. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +2 -0
  251. package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/index.d.ts +2 -1
  252. package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/styles.d.ts +4 -0
  253. package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.d.ts +2 -1
  254. package/components/hook-form/RHFAutocompleteAsync/{index.dec5535b.js → index.e8acff04.js} +2 -2
  255. package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +5 -0
  256. package/components/hook-form/RHFCheckbox/RHFCheckbox.d.ts +2 -1
  257. package/components/hook-form/RHFCheckbox/{index.7ae098fb.js → index.70310f35.js} +3 -3
  258. package/components/hook-form/RHFCheckbox/styles.d.ts +15 -0
  259. package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/index.d.ts +2 -1
  260. package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/styles.d.ts +3 -0
  261. package/components/hook-form/RHFDateTime/RHFDateTime.d.ts +3 -0
  262. package/components/hook-form/RHFDateTime/classes/constants.d.ts +1 -0
  263. package/components/hook-form/RHFDateTime/classes/index.d.ts +8 -0
  264. package/components/hook-form/RHFDateTime/classes/types.d.ts +13 -0
  265. package/components/hook-form/RHFDateTime/index.7b815072.js +187 -0
  266. package/components/hook-form/RHFDateTime/index.d.ts +1 -3
  267. package/components/hook-form/RHFDateTime/styles.d.ts +2 -0
  268. package/components/hook-form/RHFDateTime/subcomponents/Skeleton/index.d.ts +2 -1
  269. package/components/hook-form/RHFDateTime/subcomponents/Skeleton/styles.d.ts +2 -0
  270. package/components/hook-form/RHFDateTime/subcomponents/Skeleton/types.d.ts +3 -1
  271. package/components/hook-form/RHFDateTime/types.d.ts +13 -0
  272. package/components/hook-form/RHFMultiCheckbox/index.d.ts +2 -1
  273. package/components/hook-form/RHFPeriod/{index.81da23cf.js → index.3c7d393c.js} +2 -2
  274. package/components/hook-form/RHFPeriod/index.d.ts +2 -1
  275. package/components/hook-form/RHFPeriod/styles.d.ts +2 -0
  276. package/components/hook-form/RHFRadioGroup.d.ts +2 -1
  277. package/components/hook-form/RHFSelect.d.ts +2 -1
  278. package/components/hook-form/RHFTextField/{index.ef829e80.js → index.d4c39859.js} +6 -7
  279. package/components/hook-form/RHFTextField/styles.d.ts +3 -0
  280. package/components/hook-form/RHFTextField/subcomponents/Skeleton/index.d.ts +2 -1
  281. package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +3 -0
  282. package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.d.ts +2 -1
  283. package/components/hook-form/RHFTextFieldPassword/styles.d.ts +2 -0
  284. package/components/hook-form/RHFUpload/RHFUploadImage/index.d.ts +2 -1
  285. package/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +2 -0
  286. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/index.d.ts +2 -1
  287. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +12 -0
  288. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/index.d.ts +2 -1
  289. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/styles.d.ts +2 -0
  290. package/components/hook-form/RHFUpload/{index.0b97dc3c.js → index.31044674.js} +1 -1
  291. package/components/modal/ModalDialog/index.d.ts +2 -1
  292. package/components/modal/ModalDialog/styles.d.ts +9 -0
  293. package/components/modal/WindowBase/index.d.ts +2 -1
  294. package/components/modal/WindowBase/styles.d.ts +2 -0
  295. package/components/modal/WindowBase/subcomponents/Header/index.d.ts +2 -1
  296. package/components/modal/WindowBase/subcomponents/Header/styles.d.ts +6 -0
  297. package/components/modal/WindowBase/subcomponents/Header/types.d.ts +1 -1
  298. package/components/modal/WindowBase/types.d.ts +1 -0
  299. package/components/modal/{WindowBase.77a5aeb2.js → WindowBase.6a40a945.js} +28 -21
  300. package/components/modal/WindowConfirm/index.d.ts +2 -1
  301. package/components/modal/WindowConfirm/subcomponents/MessageIlustration/index.d.ts +2 -1
  302. package/components/modal/WindowConfirm/subcomponents/MessageIlustration/styles.d.ts +6 -0
  303. package/components/modal/{WindowConfirm.fcc6d9f8.js → WindowConfirm.e21763cb.js} +17 -15
  304. package/components/modal/index.438777d9.js +34 -0
  305. package/components/mui_extended/Accordion/components/AccordionLabel.d.ts +2 -1
  306. package/components/mui_extended/Accordion/{index.5370ebbf.js → index.437bb3f8.js} +2 -2
  307. package/components/mui_extended/Accordion/index.d.ts +2 -1
  308. package/components/mui_extended/Accordion/styles.d.ts +4 -0
  309. package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index.d.ts +2 -1
  310. package/components/mui_extended/BoxIcon/index.d.ts +2 -1
  311. package/components/mui_extended/Breadcrumbs/components/LinkItem/index.d.ts +2 -1
  312. package/components/mui_extended/Breadcrumbs/index.d.ts +2 -1
  313. package/components/mui_extended/Button/Button.d.ts +2 -1
  314. package/components/mui_extended/Button/{index.4d13dbda.js → index.f8ce9ccd.js} +3 -3
  315. package/components/mui_extended/Button/styles.d.ts +13 -0
  316. package/components/mui_extended/CircularProgress/index.d.ts +2 -1
  317. package/components/mui_extended/IconButton/IconButton.d.ts +2 -1
  318. package/components/mui_extended/IconButton/{index.06b5c4a8.js → index.57824447.js} +1 -3
  319. package/components/mui_extended/IconButton/styles.d.ts +2 -0
  320. package/components/mui_extended/IconButton/subcomponents/SkeletonIconButton/index.d.ts +2 -1
  321. package/components/mui_extended/ImageButton/ImageButton.d.ts +2 -1
  322. package/components/mui_extended/ImageButton/styles.d.ts +2 -0
  323. package/components/mui_extended/LinearProgress/index.d.ts +2 -1
  324. package/components/mui_extended/LinkWithRoute/index.d.ts +2 -1
  325. package/components/mui_extended/LoadingButton/index.d.ts +2 -1
  326. package/components/mui_extended/LoadingButton/styles.d.ts +2 -0
  327. package/components/mui_extended/MenuActions/{index.e05e6158.js → index.37043326.js} +3 -3
  328. package/components/mui_extended/MenuActions/index.d.ts +2 -1
  329. package/components/mui_extended/MenuActions/styles.d.ts +30 -0
  330. package/components/mui_extended/Pager/components/PagerActions/index.d.ts +2 -1
  331. package/components/mui_extended/Pager/components/PagerActions/styles.d.ts +2 -0
  332. package/components/mui_extended/Pager/index.d.ts +2 -1
  333. package/components/mui_extended/Pager/{index.b9db40bc.js → index.eeed3bd5.js} +1 -1
  334. package/components/mui_extended/Pager/styles.d.ts +6 -0
  335. package/components/mui_extended/Popover/Popover.d.ts +2 -1
  336. package/components/mui_extended/Popover/{index.e271e4f0.js → index.226f247e.js} +3 -1
  337. package/components/mui_extended/Popover/styles.d.ts +1 -0
  338. package/components/mui_extended/Popover/subcomponts/ArrowIcon/index.d.ts +3 -0
  339. package/components/mui_extended/Tab/index.d.ts +2 -1
  340. package/components/mui_extended/Tab/styles.d.ts +2 -0
  341. package/components/mui_extended/Typography/Typography.d.ts +2 -1
  342. package/components/mui_extended/Typography/{index.ab4ee376.js → index.b3c6e71c.js} +1 -1
  343. package/components/mui_extended/Typography/styles.d.ts +2 -0
  344. package/components/mui_extended/Typography/subcomponents/index.d.ts +2 -1
  345. package/components/mui_extended/index.dacbb059.js +19 -0
  346. package/contexts/ModalContext/{index.fcb7d228.js → index.8e3cd7a8.js} +1 -1
  347. package/contexts/ModalContext/index.d.ts +1 -1
  348. package/contexts/RHFormContext/index.d.ts +2 -1
  349. package/contexts/RHFormContext/styles.d.ts +2 -0
  350. package/contexts/index.d.ts +1 -1
  351. package/hooks/useModal/{index.95fb6ba1.js → index.d590f506.js} +1 -1
  352. package/index.js +97 -95
  353. package/package.json +3 -4
  354. package/{react-draggable.26a0b105.js → react-draggable.0d64c8b1.js} +1 -1
  355. package/{react-resizable.3bd8013b.js → react-resizable.8307e056.js} +2 -2
  356. package/utils/{index.d4755e7e.js → index.a2312a73.js} +1 -1
  357. package/{vendor.659fcc31.js → vendor.8edaef93.js} +48 -46
  358. package/components/CommonActions/components/Actions/index.377c342e.js +0 -61
  359. package/components/areas/components/AreasViewer/subcomponents/Area/contexts/AreaContext/helper.d.ts +0 -39
  360. package/components/areas/components/AreasViewer/subcomponents/Area/contexts/AreaContext/index.d.ts +0 -20
  361. package/components/areas/components/AreasViewer/subcomponents/Area/contexts/AreaContext/store.d.ts +0 -11
  362. package/components/areas/components/AreasViewer/subcomponents/Area/contexts/AreaContext/types.d.ts +0 -82
  363. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts/DynamicMFParmsContext/index.d.ts +0 -14
  364. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts/WindowContext/helper.d.ts +0 -1
  365. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts/WindowContext/index.d.ts +0 -13
  366. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts/WindowContext/store.d.ts +0 -36
  367. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts/WindowContext/types.d.ts +0 -5
  368. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/index.d.ts +0 -4
  369. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/Component/index.d.ts +0 -8
  370. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/Header/helper.d.ts +0 -3
  371. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/Header/index.d.ts +0 -1
  372. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/Header/skeleton.d.ts +0 -1
  373. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/Header/subcomponents/MainActions/index.d.ts +0 -1
  374. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/MicroFrontend/index.d.ts +0 -4
  375. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/index.d.ts +0 -2
  376. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/MicroFrontend/types.d.ts +0 -8
  377. package/components/areas/components/index.b21d60d8.js +0 -2127
  378. package/components/areas/contexts/AreasContext/index.ded4e1bd.js +0 -230
  379. package/components/areas/contexts/index.65b0f324.js +0 -2
  380. package/components/areas/hooks/index.18cb3d8a.js +0 -26
  381. package/components/areas/hooks/useArea/index.d.ts +0 -11
  382. package/components/areas/hooks/useArea/index.d503dc0b.js +0 -34
  383. package/components/areas/hooks/useWindow/index.d.ts +0 -11
  384. package/components/hook-form/RHFDateTime/index.6c129ce4.js +0 -95
  385. package/components/modal/index.b13922a1.js +0 -24
  386. package/components/mui_extended/index.08799321.js +0 -19
  387. /package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/{InnerForHooks/subcomponents/MicroFrontend → MicroFrontend}/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/types.d.ts +0 -0
  388. /package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/{InnerForHooks/subcomponents/MicroFrontend → MicroFrontend}/subcomponents/MFLoader/subcomponents/LoadingMF/types.d.ts +0 -0
  389. /package/components/areas/{components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts → contexts}/DynamicMFParmsContext/types.d.ts +0 -0
@@ -0,0 +1,1514 @@
1
+ import { I as IconButton } from "../../mui_extended/IconButton/index.57824447.js";
2
+ import { u as useAreasStore } from "../hooks/useArea/index.2adbe001.js";
3
+ import { useEnvironment, useModuleDictionary, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
4
+ import { shallow } from "zustand/shallow";
5
+ import { A as AREAS_VIEWER_CLASS_NAME, a as AREAS_ADMIN_CLASS_NAME, I as ICONS, g as getAreasDictionary } from "../index.8a58bcbf.js";
6
+ import { I as Icon } from "../../Icon/index.caaed284.js";
7
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
8
+ import React__default, { useMemo, useState, useRef, useCallback, useEffect } from "react";
9
+ import { generateUtilityClasses, Skeleton, styled as styled$1, Typography as Typography$1, Dialog } from "@mui/material";
10
+ import clsx from "clsx";
11
+ import "zustand";
12
+ import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, C as CONTAINER_PADDING_GRIDLAYOUT, T as THROTTLE_RESIZE_TIME } from "../contexts/AreasContext/index.de8b4e78.js";
13
+ import "../../mui_extended/Accordion/index.437bb3f8.js";
14
+ import "../../mui_extended/Avatar/index.fe06afd7.js";
15
+ import "react-router-dom";
16
+ import "@mui/material/Button";
17
+ import { B as Button } from "../../mui_extended/Button/index.f8ce9ccd.js";
18
+ import { I as Image } from "../../Image/index.82a6cd46.js";
19
+ import "@mui/lab";
20
+ import { T as Typography } from "../../mui_extended/Typography/index.b3c6e71c.js";
21
+ import "../../mui_extended/Popover/index.226f247e.js";
22
+ import { M as MenuActions } from "../../mui_extended/MenuActions/index.37043326.js";
23
+ import "../../mui_extended/Pager/index.eeed3bd5.js";
24
+ import "../../mui_extended/Tab/index.e0653a0a.js";
25
+ import { unstable_composeClasses } from "@mui/base";
26
+ import { g as getComponentUtilityClass } from "../../../utils/index.a2312a73.js";
27
+ import { styled } from "@mui/material/styles";
28
+ import { r as react_resizable_css } from "../../../react-resizable.8307e056.js";
29
+ import { WidthProvider, Responsive } from "react-grid-layout";
30
+ import { m } from "framer-motion";
31
+ import "../../animate/LoadingScreen/index.1d0c4307.js";
32
+ import "../../animate/PropagateLoader/index.be5b02c3.js";
33
+ import { W as WindowToolsMFProvider } from "../contexts/WindowToolsMFContext/index.8f3e2a04.js";
34
+ import { D as DynamicMFParmsProvider } from "../contexts/DynamicMFParmsContext/index.1607c78e.js";
35
+ import "react-hook-form";
36
+ import "../../hook-form/RHFAutocomplete/index.09c400c3.js";
37
+ import "../../HelperText/index.a69e9509.js";
38
+ import debounce from "lodash/debounce";
39
+ import "../../hook-form/RHFAutocompleteAsync/index.e8acff04.js";
40
+ import "../../hook-form/RHFCheckbox/index.70310f35.js";
41
+ import "@mui/x-date-pickers";
42
+ import "../../hook-form/RHFDateTime/index.7b815072.js";
43
+ import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender, useResizeObserver } from "@m4l/graphics";
44
+ import "../../hook-form/RHFTextField/index.d4c39859.js";
45
+ import "../../hook-form/RHFPeriod/index.3c7d393c.js";
46
+ import "../../Period/index.fbf074d3.js";
47
+ import "../../CommonActions/components/Actions/index.154d7cb6.js";
48
+ import "../../../contexts/ModalContext/index.8e3cd7a8.js";
49
+ import { c as cjs } from "../../../react-draggable.0d64c8b1.js";
50
+ import "../../ModalDialog/index.cdfd1ae8.js";
51
+ import { R as ResizeableWindow } from "../../Resizeable/index.aafda79e.js";
52
+ import "../../modal/WindowConfirm.e21763cb.js";
53
+ import "../../modal/WindowBase.6a40a945.js";
54
+ import "lodash/isString";
55
+ import "react-dropzone";
56
+ import "../../hook-form/RHFUpload/index.31044674.js";
57
+ import "../../DataGrid/index.2f4a0e64.js";
58
+ import "react-dnd";
59
+ import "react-dnd-html5-backend";
60
+ import "../../DynamicFilter/index.789ab474.js";
61
+ import "../../ScrollBar/index.bbe48f4d.js";
62
+ import "yup";
63
+ import "@hookform/resolvers/yup";
64
+ import "../../../contexts/RHFormContext/index.a7511399.js";
65
+ import "../../LanguagePopover/index.5af28b9e.js";
66
+ import "../../NavLink/index.251fcf0d.js";
67
+ import "../../NoItemSelected/index.3b9d16e3.js";
68
+ import "../../ObjectLogs/index.57ea68b3.js";
69
+ import "../../../react-json-view.57125fcf.js";
70
+ import "../../PaperForm/index.d2d492ea.js";
71
+ import "../../Page/index.4237c241.js";
72
+ import "../../PropertyValue/index.dfcfe1ba.js";
73
+ import "../../../react-splitter-layout.8b1655c8.js";
74
+ import "../../SplitLayout/index.5a8355d8.js";
75
+ import "../../SideBar/index.3bc6a634.js";
76
+ import { D as DraggableWindow } from "../../../vendor.8edaef93.js";
77
+ import { L as LinearProgress } from "../../mui_extended/LinearProgress/index.c92b9ba9.js";
78
+ import { v as varBounce } from "../../animate/variants/bounce.784aaaaa.js";
79
+ import { throttle } from "lodash";
80
+ const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
81
+ "root",
82
+ "areaRoot",
83
+ "areaGridLayoutPanelContainer",
84
+ "areaGridLayout",
85
+ "areaGridLayoutPopupsContainer",
86
+ "windowRoot",
87
+ "windowHeader",
88
+ "windowHeaderTitle",
89
+ "windowHeaderMainActions",
90
+ "windowContent",
91
+ "windowPopupRoot",
92
+ "windowModalRoot",
93
+ "panelWindowsRoot",
94
+ "panelWindowsButtonContainer",
95
+ "selected",
96
+ "isMobile",
97
+ "loading"
98
+ ], AREAS_VIEWER_CLASS_NAME);
99
+ const useAreasViewerUtilityClasses = (ownerState) => {
100
+ const slots = {
101
+ root: ["root", ownerState.status, ownerState.isMobile && "isMobile", ownerState.isSkeleton && "isSkeleton"],
102
+ areaRoot: ["areaRoot"],
103
+ areaGridLayoutPanelContainer: ["areaGridLayoutPanelContainer"],
104
+ areaGridLayout: ["areaGridLayout"],
105
+ areaGridLayoutPopupsContainer: ["areaGridLayoutPopupsContainer"],
106
+ windowRoot: ["windowRoot"],
107
+ windowHeader: ["windowHeader"],
108
+ windowHeaderTitle: ["windowHeaderTitle"],
109
+ windowHeaderMainActions: ["windowHeaderMainActions"],
110
+ windowContent: ["windowContent"],
111
+ windowPopupRoot: ["windowPopupRoot"],
112
+ windowModalRoot: ["windowModalRoot"],
113
+ panelWindowsRoot: ["panelWindowsRoot"],
114
+ panelWindowsButtonContainer: ["panelWindowsButtonContainer"]
115
+ };
116
+ return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_VIEWER_CLASS_NAME), {});
117
+ };
118
+ const areasAdminClasses = generateUtilityClasses(AREAS_ADMIN_CLASS_NAME, [
119
+ "root",
120
+ "areaChipRoot",
121
+ "areaChipTitle",
122
+ "areaChipDeleteButton",
123
+ "areaChipEditButton",
124
+ "areasAddButton",
125
+ "areaContainerChips",
126
+ "areaIconLayer",
127
+ "selected",
128
+ "isMobile",
129
+ "disabled"
130
+ ], AREAS_ADMIN_CLASS_NAME);
131
+ const useAreasAdminUtilityClasses = (ownerState) => {
132
+ const slots = {
133
+ root: ["root", ownerState.status, ownerState.isMobile && "isMobile", ownerState.isSkeleton && "isSkeleton"],
134
+ areaChipRoot: ["areaChipRoot"],
135
+ areaIconLayer: ["areaIconLayer"],
136
+ areaContainerChips: ["areaContainerChips"],
137
+ areaChipTitle: ["areaChipTitle"],
138
+ areaChipDeleteButton: ["areaChipDeleteButton"],
139
+ areaChipEditButton: ["areaChipEditButton"],
140
+ areasAddButton: ["areasAddButton"]
141
+ };
142
+ return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_ADMIN_CLASS_NAME), {});
143
+ };
144
+ const AreaChip = (props) => {
145
+ const {
146
+ areaId,
147
+ selected,
148
+ areaName,
149
+ disabled
150
+ } = props;
151
+ const {
152
+ host_static_assets,
153
+ environment_assets
154
+ } = useEnvironment();
155
+ const {
156
+ deleteArea,
157
+ selectArea
158
+ } = useAreasStore((state) => state.areasActions);
159
+ const onClickDeleteArea = (e) => {
160
+ e.stopPropagation();
161
+ deleteArea(areaId);
162
+ };
163
+ return /* @__PURE__ */ jsxs("div", {
164
+ role: "presentation",
165
+ className: clsx(areasAdminClasses.areaChipRoot, selected ? areasAdminClasses.selected : null, disabled ? areasAdminClasses.disabled : null),
166
+ onClick: () => {
167
+ selectArea(areaId);
168
+ },
169
+ children: [/* @__PURE__ */ jsx("span", {
170
+ className: areasAdminClasses.areaChipTitle,
171
+ children: areaName
172
+ }), /* @__PURE__ */ jsx(IconButton, {
173
+ className: areasAdminClasses.areaChipDeleteButton,
174
+ src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.DELETE_AREA}`,
175
+ size: "small",
176
+ disabled,
177
+ onClick: onClickDeleteArea
178
+ })]
179
+ });
180
+ };
181
+ AreaChip.displayName = "AreaButtons";
182
+ const AreasAdminRoot = styled("div")`
183
+ display: flex;
184
+ position: relative;
185
+
186
+ //areaRoot
187
+ & .${areasAdminClasses.areaChipRoot} {
188
+ display: flex;
189
+ }
190
+
191
+ & .${areasAdminClasses.areaChipRoot}.${areasAdminClasses.selected}::before {
192
+ content: "";
193
+ background-color: ${(props) => props.theme.palette.primary.main};
194
+ height: 100%;
195
+ width: 8px;
196
+ }
197
+
198
+ ${(props) => props.theme.components?.M4LAreasAdmin?.styleOverrides}
199
+
200
+
201
+ `;
202
+ function AreasAdmin() {
203
+ const areas = useAreasStore((state) => state.areas, shallow);
204
+ const currentArea = useAreasStore((state) => state.currentAreaId, shallow);
205
+ const status = useAreasStore((state) => state.ownerState.status);
206
+ const classesRoot = useAreasStore((state) => state.adminClasses.root);
207
+ const areasLength = useAreasStore((state) => state.areas.length);
208
+ const {
209
+ addArea
210
+ } = useAreasStore((state) => state.areasActions, shallow);
211
+ const {
212
+ host_static_assets,
213
+ environment_assets
214
+ } = useEnvironment();
215
+ console.log("Render AreasAdmin", areas);
216
+ if (status !== "loaded") {
217
+ return null;
218
+ }
219
+ return /* @__PURE__ */ jsxs(AreasAdminRoot, {
220
+ className: classesRoot,
221
+ children: [/* @__PURE__ */ jsx("div", {
222
+ className: areasAdminClasses.areaIconLayer,
223
+ children: /* @__PURE__ */ jsx(Icon, {
224
+ src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`
225
+ })
226
+ }), /* @__PURE__ */ jsx("div", {
227
+ className: areasAdminClasses.areaContainerChips,
228
+ children: areas.map((area) => /* @__PURE__ */ jsx(AreaChip, {
229
+ areaId: area.id,
230
+ selected: area.id === currentArea,
231
+ areaName: area.name,
232
+ disabled: areasLength === 1
233
+ }, area.id))
234
+ }), /* @__PURE__ */ jsx(IconButton, {
235
+ className: areasAdminClasses.areasAddButton,
236
+ src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
237
+ size: "small",
238
+ onClick: addArea
239
+ })]
240
+ });
241
+ }
242
+ const AreasViewerRoot = styled("div")`
243
+ /* display: flex; */
244
+ width: 100%;
245
+ height: 100%;
246
+ overflow: hidden;
247
+ /* flex-grow: 1; */
248
+ position: relative;
249
+
250
+ //areaRoot
251
+ & .${areasViewerClasses.areaRoot} {
252
+ display: none;
253
+ position: absolute;
254
+ /* flex-grow: 1; */
255
+ flex-direction: row;
256
+ inset: 0;
257
+ /* width: 100%; */
258
+ overflow: hidden;
259
+ justify-content: top;
260
+ align-items: flex-start;
261
+
262
+ visibility: hidden;
263
+ }
264
+
265
+ & .${areasViewerClasses.areaRoot}.${areasViewerClasses.selected} {
266
+ display: block;
267
+ visibility: visible;
268
+ }
269
+
270
+ &.${areasViewerClasses.isMobile} .${areasViewerClasses.areaRoot} {
271
+ }
272
+
273
+ // areaGridLayoutPanelContainer
274
+ & .${areasViewerClasses.areaGridLayoutPanelContainer} {
275
+ display: flex;
276
+ flex-direction: row;
277
+ height: 100%;
278
+ width: 100%;
279
+ overflow: hidden;
280
+ }
281
+ &.${areasViewerClasses.isMobile} .${areasViewerClasses.areaGridLayoutPanelContainer} {
282
+ flex-direction: column-reverse;
283
+ }
284
+ // areaGridLayout
285
+ & .${areasViewerClasses.areaGridLayout} {
286
+ height: 100% !important;
287
+ overflow: auto;
288
+ flex-grow: 1;
289
+ }
290
+ &.${areasViewerClasses.isMobile} .${areasViewerClasses.areaGridLayout} {
291
+ flex-direction: column-reverse;
292
+ height: unset;
293
+ width: 100%;
294
+ }
295
+ // areaGridLayoutPopupsContainer
296
+ & .${areasViewerClasses.areaGridLayoutPopupsContainer} {
297
+ z-index: 1; //Garantizar q el contenedor de los popus este por encima de los layouts
298
+ // // ' .react-draggable': {
299
+ // // position: 'absolute',
300
+ // // },
301
+ }
302
+
303
+ // PanelWindowsRoot
304
+ & .${areasViewerClasses.panelWindowsRoot} {
305
+ display: flex;
306
+ flex-direction: column;
307
+ position: relative;
308
+ }
309
+ &.${areasViewerClasses.isMobile} .${areasViewerClasses.panelWindowsRoot} {
310
+ flex-direction: row;
311
+ }
312
+ & .${areasViewerClasses.panelWindowsButtonContainer}.${areasViewerClasses.selected} {
313
+ border: 1px solid red;
314
+ }
315
+
316
+ // windowRoot
317
+
318
+ // windowModalRoot
319
+ & .${areasViewerClasses.windowModalRoot} {
320
+ padding: 16px;
321
+ }
322
+
323
+ .react-grid-layout {
324
+ position: relative;
325
+ transition: height 200ms ease;
326
+ }
327
+ .react-grid-item {
328
+ transition: all 200ms ease;
329
+ transition-property: left, top;
330
+ }
331
+ .react-grid-item img {
332
+ pointer-events: none;
333
+ user-select: none;
334
+ }
335
+ .react-grid-item.cssTransforms {
336
+ transition-property: transform;
337
+ }
338
+ .react-grid-item.resizing {
339
+ z-index: 1;
340
+ will-change: width, height;
341
+ }
342
+
343
+ .react-grid-item.react-draggable-dragging {
344
+ transition: none;
345
+ z-index: 3;
346
+ will-change: transform;
347
+ }
348
+
349
+ .react-grid-item.dropping {
350
+ visibility: hidden;
351
+ }
352
+
353
+ .react-grid-item.react-grid-placeholder {
354
+ background: green;
355
+ opacity: 0.2;
356
+ transition-duration: 100ms;
357
+ z-index: 2;
358
+ -webkit-user-select: none;
359
+ -moz-user-select: none;
360
+ -ms-user-select: none;
361
+ -o-user-select: none;
362
+ user-select: none;
363
+ }
364
+
365
+ .react-grid-item > .react-resizable-handle {
366
+ position: absolute;
367
+ width: 20px;
368
+ height: 20px;
369
+ }
370
+
371
+ .react-grid-item > .react-resizable-handle::after {
372
+ content: '';
373
+ position: absolute;
374
+ right: 3px;
375
+ bottom: 3px;
376
+ width: 5px;
377
+ height: 5px;
378
+ border-right: 2px solid rgba(0, 0, 0, 0.4);
379
+ border-bottom: 2px solid rgba(0, 0, 0, 0.4);
380
+ }
381
+
382
+ .react-resizable-hide > .react-resizable-handle {
383
+ display: none;
384
+ }
385
+
386
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-sw {
387
+ bottom: 0;
388
+ left: 0;
389
+ cursor: sw-resize;
390
+ transform: rotate(90deg);
391
+ }
392
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-se {
393
+ bottom: 0;
394
+ right: 0;
395
+ cursor: se-resize;
396
+ }
397
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-nw {
398
+ top: 0;
399
+ left: 0;
400
+ cursor: nw-resize;
401
+ transform: rotate(180deg);
402
+ }
403
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-ne {
404
+ top: 0;
405
+ right: 0;
406
+ cursor: ne-resize;
407
+ transform: rotate(270deg);
408
+ }
409
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-w,
410
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-e {
411
+ top: 50%;
412
+ margin-top: -10px;
413
+ cursor: ew-resize;
414
+ }
415
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-w {
416
+ left: 0;
417
+ transform: rotate(135deg);
418
+ }
419
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-e {
420
+ right: 0;
421
+ transform: rotate(315deg);
422
+ }
423
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-n,
424
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-s {
425
+ left: 50%;
426
+ margin-left: -10px;
427
+ cursor: ns-resize;
428
+ }
429
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-n {
430
+ top: 0;
431
+ transform: rotate(225deg);
432
+ }
433
+ .react-grid-item > .react-resizable-handle.react-resizable-handle-s {
434
+ bottom: 0;
435
+ transform: rotate(45deg);
436
+ }
437
+
438
+ ${react_resizable_css}
439
+
440
+ ${(props) => props.theme.components?.M4LAreasViewer?.styleOverrides}
441
+ `;
442
+ styled("div")(({
443
+ theme
444
+ }) => ({
445
+ display: "flex",
446
+ alignItems: "center",
447
+ position: "relative",
448
+ justifyContent: "space-between",
449
+ minHeight: theme.spacing(5),
450
+ borderBottom: `1px solid ${theme.palette.divider}`,
451
+ overflow: "hidden",
452
+ cursor: "move",
453
+ height: "60px",
454
+ " > span": {
455
+ marginRight: "12px"
456
+ },
457
+ "& > h5": {
458
+ paddingRight: theme.spacing(3),
459
+ borderRight: `1px solid ${theme.palette.divider}`
460
+ },
461
+ " > nav": {
462
+ marginRight: "12px",
463
+ flexGrow: 1
464
+ },
465
+ "& .splitactions.Mui-disabled": {
466
+ color: theme.palette.primary.main
467
+ },
468
+ "& svg ": {
469
+ width: "20px",
470
+ height: "20px"
471
+ }
472
+ }));
473
+ styled("div")(({
474
+ theme
475
+ }) => ({
476
+ display: "flex",
477
+ alignItems: "center",
478
+ position: "relative",
479
+ borderBottom: `1px solid ${theme.palette.divider}`,
480
+ height: "60px",
481
+ minHeight: "60px",
482
+ " > span": {
483
+ marginRight: "12px"
484
+ },
485
+ "& > h5": {
486
+ paddingRight: theme.spacing(3),
487
+ borderRight: `1px solid ${theme.palette.divider}`
488
+ },
489
+ " > nav": {
490
+ marginRight: "12px",
491
+ flexGrow: 1
492
+ },
493
+ "& .splitactions.Mui-disabled": {
494
+ color: theme.palette.primary.main
495
+ },
496
+ "& svg ": {
497
+ width: "20px",
498
+ height: "20px"
499
+ }
500
+ }));
501
+ const Wrapper = styled("div")(({
502
+ theme
503
+ }) => ({
504
+ display: "flex",
505
+ justifyContent: "space-between",
506
+ padding: `0 0`,
507
+ borderBottom: `1px solid ${theme.palette.divider}`,
508
+ minHeight: "60px"
509
+ }));
510
+ const ModuleTitleContent = styled("div")(({
511
+ theme
512
+ }) => ({
513
+ display: "grid",
514
+ gridTemplateColumns: "auto",
515
+ gridGap: theme.spacing(1.75),
516
+ alignItems: "center",
517
+ width: "auto",
518
+ height: "auto",
519
+ [theme.breakpoints.up("sm")]: {
520
+ gridTemplateColumns: "repeat(3, auto)"
521
+ }
522
+ }));
523
+ const ModuleTitle = styled("div")(({
524
+ theme
525
+ }) => ({
526
+ display: "grid",
527
+ gridTemplateColumns: `${theme.spacing(3)} auto`,
528
+ gridGap: theme.spacing(2),
529
+ alignItems: "center",
530
+ width: "auto",
531
+ height: "auto"
532
+ }));
533
+ const Separator = styled("div")(({
534
+ theme
535
+ }) => ({
536
+ display: "none",
537
+ alignItems: "center",
538
+ width: "1px",
539
+ background: theme.palette.divider,
540
+ height: "100%",
541
+ margin: `0 ${theme.spacing(2)}`,
542
+ [theme.breakpoints.up("sm")]: {
543
+ display: "flex"
544
+ }
545
+ }));
546
+ const Breadcrumbs = styled("div")(({
547
+ theme
548
+ }) => ({
549
+ display: "grid",
550
+ alignItems: "center",
551
+ gridTemplateColumns: `repeat(3, auto)`,
552
+ gridGap: theme.spacing(2)
553
+ }));
554
+ const ModuleActions = styled("div")(({
555
+ theme
556
+ }) => ({
557
+ display: "grid",
558
+ gridTemplateColumns: "auto",
559
+ alignItems: "center",
560
+ width: "auto",
561
+ height: "auto",
562
+ [theme.breakpoints.up("sm")]: {
563
+ gridTemplateColumns: `repeat(3, ${theme.spacing(3)})`,
564
+ gridGap: theme.spacing(2)
565
+ }
566
+ }));
567
+ function SKTModuleHeader() {
568
+ const isDesktop = useResponsiveDesktop();
569
+ return /* @__PURE__ */ jsxs(Wrapper, {
570
+ id: "HeaderSkeleton",
571
+ children: [/* @__PURE__ */ jsxs(ModuleTitleContent, {
572
+ children: [/* @__PURE__ */ jsxs(ModuleTitle, {
573
+ children: [/* @__PURE__ */ jsx(Skeleton, {
574
+ variant: "circular",
575
+ width: 24,
576
+ height: 24
577
+ }), /* @__PURE__ */ jsx(Skeleton, {
578
+ variant: "text",
579
+ width: 120,
580
+ height: 14
581
+ })]
582
+ }), /* @__PURE__ */ jsx(Separator, {}), /* @__PURE__ */ jsxs(Breadcrumbs, {
583
+ children: [/* @__PURE__ */ jsx(Skeleton, {
584
+ variant: "text",
585
+ width: 68,
586
+ height: 14
587
+ }), /* @__PURE__ */ jsx(Skeleton, {
588
+ variant: "circular",
589
+ width: 4,
590
+ height: 4
591
+ }), /* @__PURE__ */ jsx(Skeleton, {
592
+ variant: "text",
593
+ width: 68,
594
+ height: 14
595
+ })]
596
+ })]
597
+ }), /* @__PURE__ */ jsx(ModuleActions, {
598
+ children: isDesktop ? /* @__PURE__ */ jsxs(Fragment, {
599
+ children: [/* @__PURE__ */ jsx(Skeleton, {
600
+ variant: "circular",
601
+ width: 24,
602
+ height: 24
603
+ }), /* @__PURE__ */ jsx(Skeleton, {
604
+ variant: "circular",
605
+ width: 24,
606
+ height: 24
607
+ }), /* @__PURE__ */ jsx(Skeleton, {
608
+ variant: "circular",
609
+ width: 24,
610
+ height: 24
611
+ })]
612
+ }) : /* @__PURE__ */ jsx(Skeleton, {
613
+ variant: "circular",
614
+ width: 24,
615
+ height: 24
616
+ })
617
+ })]
618
+ });
619
+ }
620
+ function getMainActions(isDesktop, moduleActions) {
621
+ let mainActions = [];
622
+ if (isDesktop !== void 0 && isDesktop) {
623
+ mainActions = mainActions.concat(
624
+ moduleActions.filter((action) => action.visibility === "main")
625
+ );
626
+ }
627
+ mainActions = mainActions.concat(
628
+ moduleActions.filter((action) => action.visibility === "allways")
629
+ );
630
+ return mainActions;
631
+ }
632
+ function getMenuActions(windowId, isDesktop, moduleActions, urlPrefix, saveModuleCookies, resetModuleCookies, version) {
633
+ let menuActions = [...moduleActions.filter((action) => action.visibility !== "allways")];
634
+ if (isDesktop !== void 0 && isDesktop) {
635
+ menuActions = menuActions.filter((action) => action.visibility === "normal");
636
+ }
637
+ const saveCookiesAction = {
638
+ urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.SAVE_COOKIES}`,
639
+ onClick: () => saveModuleCookies(windowId),
640
+ disabled: false,
641
+ visibility: "normal",
642
+ dictionaryId: getAreasDictionary("label_persist_module_cookies"),
643
+ key: "save_cookies"
644
+ };
645
+ menuActions.push(saveCookiesAction);
646
+ const resetCookiesAction = {
647
+ urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.RESET_COOKIES}`,
648
+ onClick: () => resetModuleCookies(windowId),
649
+ disabled: false,
650
+ visibility: "normal",
651
+ dictionaryId: getAreasDictionary("label_reset_module_cookies"),
652
+ key: "reset_cookes"
653
+ };
654
+ menuActions.push(resetCookiesAction);
655
+ if (version) {
656
+ const versionAction = {
657
+ urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.VERSION}`,
658
+ onClick: () => {
659
+ },
660
+ disabled: true,
661
+ visibility: "normal",
662
+ label: version,
663
+ key: "version"
664
+ };
665
+ menuActions.push(versionAction);
666
+ }
667
+ return menuActions;
668
+ }
669
+ function MainActions(props) {
670
+ const {
671
+ windowId
672
+ } = props;
673
+ const moduleActions = useAreasStore((state) => {
674
+ const window2 = state.hashWindows[windowId];
675
+ return window2?.moduleActions || [];
676
+ }, shallow);
677
+ const {
678
+ getLabel
679
+ } = useModuleDictionary();
680
+ const isDesktop = useResponsiveDesktop();
681
+ const mainActions = useMemo(() => {
682
+ return getMainActions(isDesktop, moduleActions);
683
+ }, [moduleActions, isDesktop]);
684
+ return /* @__PURE__ */ jsx("div", {
685
+ className: areasViewerClasses.windowHeaderMainActions,
686
+ children: mainActions.map((mainAction) => {
687
+ const tooltip = mainAction.label !== void 0 ? mainAction.label : getLabel(mainAction.dictionaryId || "");
688
+ return /* @__PURE__ */ jsx(IconButton, {
689
+ src: mainAction.urlIcon,
690
+ className: mainAction.className,
691
+ onClick: mainAction.onClick,
692
+ "aria-label": mainAction.label,
693
+ disabled: mainAction.disabled,
694
+ tooltip
695
+ }, mainAction.key);
696
+ })
697
+ });
698
+ }
699
+ function Header(props) {
700
+ const {
701
+ areaId,
702
+ windowId,
703
+ emergeType
704
+ } = props;
705
+ const [url_icon, title, moduleActions, onClose, version, singleId] = useAreasStore((state) => {
706
+ const window2 = state.hashWindows[windowId];
707
+ return [window2.url_icon, window2.title, window2.moduleActions, window2.onClose, window2.version, state.hashAreas[areaId].singleId];
708
+ }, shallow);
709
+ const {
710
+ saveModuleCookies,
711
+ resetModuleCookies
712
+ } = useAreasStore((state) => state.windowActions, shallow);
713
+ const {
714
+ maximizeLayout,
715
+ normalizeLayouts
716
+ } = useAreasStore((state) => state.areaActions, shallow);
717
+ const {
718
+ host_static_assets,
719
+ environment_assets
720
+ } = useEnvironment();
721
+ const isDesktop = useResponsiveDesktop();
722
+ const isSkeleton = useModuleSkeleton();
723
+ const urlPrefix = `${host_static_assets}/${environment_assets}`;
724
+ const menuActions = useMemo(() => {
725
+ return getMenuActions(windowId, isDesktop, moduleActions, urlPrefix, saveModuleCookies, resetModuleCookies, version);
726
+ }, [moduleActions, isDesktop]);
727
+ const onCloseLocal = () => {
728
+ onClose && onClose(windowId);
729
+ };
730
+ const maxNormalize = () => {
731
+ if (singleId) {
732
+ normalizeLayouts(areaId);
733
+ } else {
734
+ maximizeLayout(areaId, windowId);
735
+ }
736
+ };
737
+ if (isSkeleton) {
738
+ return /* @__PURE__ */ jsx(SKTModuleHeader, {});
739
+ }
740
+ return /* @__PURE__ */ jsxs("div", {
741
+ className: clsx(areasViewerClasses.windowHeader, "m4l_draggable_handle"),
742
+ children: [/* @__PURE__ */ jsx(Icon, {
743
+ src: url_icon,
744
+ size: "medium"
745
+ }), /* @__PURE__ */ jsx(Typography, {
746
+ className: areasViewerClasses.windowHeaderTitle,
747
+ variant: "h5",
748
+ children: `${title}`
749
+ }), /* @__PURE__ */ jsx(MainActions, {
750
+ windowId
751
+ }), isDesktop && emergeType === "layout" && /* @__PURE__ */ jsx(IconButton, {
752
+ onClick: maxNormalize,
753
+ "aria-label": "click",
754
+ src: singleId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`
755
+ }), menuActions.length > 0 && /* @__PURE__ */ jsx(MenuActions, {
756
+ arrowType: "no-arrow",
757
+ marginTop: "12px!important",
758
+ marginLeft: "14px!important",
759
+ anchorOrigin: {
760
+ vertical: "bottom",
761
+ horizontal: "right"
762
+ },
763
+ transformOrigin: {
764
+ vertical: "top",
765
+ horizontal: "right"
766
+ },
767
+ menuActions
768
+ }), onClose && /* @__PURE__ */ jsx(IconButton, {
769
+ onClick: onCloseLocal,
770
+ "aria-label": "click",
771
+ src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CLOSE}`
772
+ })]
773
+ });
774
+ }
775
+ const WrapperLinearProgress = styled$1("div")(() => ({
776
+ width: "70%",
777
+ margin: "auto auto"
778
+ }));
779
+ const WrapperFallBackNotFound = styled$1("div")(({
780
+ theme
781
+ }) => ({
782
+ width: "100%",
783
+ height: "100%",
784
+ display: "flex",
785
+ flexDirection: "column",
786
+ justifyContent: "center",
787
+ alignItems: "center",
788
+ gap: theme.spacing(3)
789
+ }));
790
+ function FallBackNotFound(props) {
791
+ const {
792
+ setNetworkRefresh
793
+ } = props;
794
+ const {
795
+ getLabel
796
+ } = useModuleDictionary();
797
+ const {
798
+ host_static_assets,
799
+ environment_assets
800
+ } = useEnvironment();
801
+ const handlerClick = () => {
802
+ setNetworkRefresh((prop) => !prop);
803
+ };
804
+ return /* @__PURE__ */ jsxs(WrapperFallBackNotFound, {
805
+ children: [/* @__PURE__ */ jsx(m.div, {
806
+ variants: varBounce().in,
807
+ children: /* @__PURE__ */ jsx(Typography$1, {
808
+ variant: "h3",
809
+ paragraph: true,
810
+ children: getLabel("loading_mf_title")
811
+ })
812
+ }), /* @__PURE__ */ jsx(Typography$1, {
813
+ sx: {
814
+ color: "text.secondary"
815
+ },
816
+ children: getLabel("loading_mf_description")
817
+ }), /* @__PURE__ */ jsx(m.div, {
818
+ variants: varBounce().in,
819
+ children: /* @__PURE__ */ jsx(Image, {
820
+ src: `${host_static_assets}/${environment_assets}/frontend/domain/host/commons/assets/img/illustration_noauth.png`,
821
+ ratio: "1:1"
822
+ })
823
+ }), /* @__PURE__ */ jsx(Button, {
824
+ size: "medium",
825
+ variant: "contained",
826
+ onClick: handlerClick,
827
+ children: getLabel("loading_mf_intro")
828
+ })]
829
+ });
830
+ }
831
+ const LoadingMF = (props) => {
832
+ const {
833
+ loadingProgress,
834
+ setNetworkRefresh
835
+ } = props;
836
+ if (loadingProgress !== -1) {
837
+ return /* @__PURE__ */ jsx(WrapperLinearProgress, {
838
+ id: "WrapperLinearProgress",
839
+ children: /* @__PURE__ */ jsx(LinearProgress, {
840
+ variant: "determinate",
841
+ value: loadingProgress
842
+ })
843
+ });
844
+ }
845
+ return /* @__PURE__ */ jsx(FallBackNotFound, {
846
+ setNetworkRefresh
847
+ });
848
+ };
849
+ function getDivScritId(prefix, moduleId) {
850
+ const rotational_id = `${Math.round(new Date().getTime() / 1e3)}_rnd_${Math.round(Math.random() * 1e3)}`;
851
+ return {
852
+ divContainerId: `container_${prefix}_${moduleId}_${rotational_id}`,
853
+ scriptId: `script_${moduleId}_${rotational_id}`,
854
+ moduleId
855
+ };
856
+ }
857
+ function MFLoader(props) {
858
+ const {
859
+ prefix,
860
+ moduleId,
861
+ cache = true,
862
+ debug_port,
863
+ dynamicMFStore,
864
+ windowTools
865
+ } = props;
866
+ const {
867
+ hostThemeOptions,
868
+ fnComponentsOverrides
869
+ } = useHostTheme();
870
+ const {
871
+ networkOperation
872
+ } = useNetwork();
873
+ const environment = useEnvironment();
874
+ const hostTools = useHostTools();
875
+ const formatter = useFormatter();
876
+ const [isLoading, setIsLoading] = useState(true);
877
+ const [networkProgress, setNetworkProgress] = useState(-1);
878
+ const [_networkRefresh, setNetworkRefresh] = useState(false);
879
+ const {
880
+ currentLocale
881
+ } = useLocales();
882
+ const [divScript, setDivScript] = useState(getDivScritId(prefix, moduleId));
883
+ const refTime = useRef(0);
884
+ const isFirstRender = useFirstRender([moduleId]);
885
+ const final_host = environment.isLocalhost ? `https://localhost:${debug_port}` : `https://${window.location.host}/mf/${moduleId}`;
886
+ function cleanUp(dScript) {
887
+ try {
888
+ if (window[`unmount_${prefix}_${dScript.moduleId}`]) {
889
+ window[`unmount_${prefix}_${dScript.moduleId}`](dScript.divContainerId);
890
+ }
891
+ } catch (error) {
892
+ }
893
+ if (!cache) {
894
+ const script = document.getElementById(dScript.scriptId);
895
+ if (script) {
896
+ try {
897
+ document.head.removeChild(script);
898
+ delete window[`render_${prefix}_${dScript.moduleId}`];
899
+ delete window[`unmount_${prefix}_${dScript.moduleId}`];
900
+ } catch (error) {
901
+ }
902
+ }
903
+ }
904
+ }
905
+ const renderMicroFrontend = useCallback((newDScript) => {
906
+ try {
907
+ setIsLoading(false);
908
+ window[`render_${prefix}_${newDScript.moduleId}`](newDScript.divContainerId, environment, hostTools, currentLocale, {
909
+ hostThemeOptions,
910
+ fnComponentsOverrides
911
+ }, axiosOperation, formatter, dynamicMFStore, windowTools);
912
+ } catch (error) {
913
+ }
914
+ }, [hostThemeOptions, currentLocale, formatter]);
915
+ const debouncedSetDivScript = useCallback(debounce((newName) => {
916
+ const newDivScript = getDivScritId(prefix, newName);
917
+ if (newName !== divScript.moduleId) {
918
+ setDivScript({
919
+ ...newDivScript
920
+ });
921
+ }
922
+ }, 200), [divScript]);
923
+ useEffect(() => {
924
+ if (!isFirstRender) {
925
+ debouncedSetDivScript(moduleId + "");
926
+ if (moduleId !== divScript.moduleId)
927
+ ;
928
+ }
929
+ return () => {
930
+ };
931
+ }, [moduleId]);
932
+ useEffect(() => {
933
+ setIsLoading(true);
934
+ let mounted = true;
935
+ const controller = new AbortController();
936
+ const dsScript = {
937
+ ...divScript
938
+ };
939
+ const loadIfNotLoaded = async () => {
940
+ if (!window[`render_${prefix}_${moduleId}`]) {
941
+ let urlFile = "";
942
+ setNetworkProgress(0);
943
+ const manifest = await fetch(`${final_host}/manifest.json?rnd=${Math.random()}`).then((res) => res.json()).catch(() => {
944
+ console.debug("Error fetching manifest", `${final_host}/manifest.json`);
945
+ return void 0;
946
+ });
947
+ if (!manifest) {
948
+ return;
949
+ }
950
+ setNetworkProgress(10);
951
+ if (mounted) {
952
+ urlFile = `${final_host}/${manifest["src/index.tsx"]["file"]}?rnd=${Math.random()}`;
953
+ refTime.current = 0;
954
+ await networkOperation({
955
+ method: "GET",
956
+ endPoint: urlFile,
957
+ isRemote: !environment.isLocalhost,
958
+ headers: {
959
+ "Content-Type": "application/json"
960
+ },
961
+ onDownloadProgress: (progressEvent) => {
962
+ let percentCompleted = 0;
963
+ try {
964
+ if (progressEvent.lengthComputable) {
965
+ percentCompleted = 10 + Math.round(progressEvent.loaded * 90 / progressEvent.total);
966
+ } else {
967
+ if (refTime.current === 0) {
968
+ refTime.current = new Date().getTime();
969
+ }
970
+ percentCompleted = 10 + progressEvent.loaded / 15e5 * 90;
971
+ if (percentCompleted > 95)
972
+ percentCompleted = 95;
973
+ }
974
+ } catch (error) {
975
+ }
976
+ if (mounted) {
977
+ setNetworkProgress(percentCompleted);
978
+ }
979
+ },
980
+ isExternalUrl: true,
981
+ responseType: "text",
982
+ signal: controller.signal
983
+ }).then(() => {
984
+ if (mounted) {
985
+ setNetworkProgress(100);
986
+ }
987
+ }).catch(() => {
988
+ });
989
+ if (mounted) {
990
+ const script = document.createElement("script");
991
+ script.id = divScript.scriptId;
992
+ script.crossOrigin = "";
993
+ script.type = "module";
994
+ script.src = urlFile || "";
995
+ script.onload = () => {
996
+ if (mounted) {
997
+ console.debug("Script loaded", new Date().getTime());
998
+ setNetworkProgress(100);
999
+ renderMicroFrontend(dsScript);
1000
+ }
1001
+ };
1002
+ document.head.appendChild(script);
1003
+ console.debug("Script appened", new Date().getTime());
1004
+ }
1005
+ }
1006
+ } else {
1007
+ if (mounted) {
1008
+ renderMicroFrontend(dsScript);
1009
+ }
1010
+ }
1011
+ };
1012
+ loadIfNotLoaded();
1013
+ return () => {
1014
+ mounted = false;
1015
+ controller.abort();
1016
+ cleanUp(dsScript);
1017
+ };
1018
+ }, [divScript]);
1019
+ return /* @__PURE__ */ jsxs(Fragment, {
1020
+ children: [/* @__PURE__ */ jsx("div", {
1021
+ id: divScript.divContainerId,
1022
+ style: {
1023
+ width: "100%",
1024
+ height: "100%"
1025
+ }
1026
+ }), isLoading ? /* @__PURE__ */ jsx(LoadingMF, {
1027
+ loadingProgress: networkProgress,
1028
+ setNetworkRefresh
1029
+ }) : null]
1030
+ });
1031
+ }
1032
+ MFLoader.defaultProps = {
1033
+ document,
1034
+ window
1035
+ };
1036
+ const MicroFrontend = (props) => {
1037
+ return /* @__PURE__ */ jsx(MFLoader, {
1038
+ ...props
1039
+ });
1040
+ };
1041
+ const MemonizedMicroFrontend = React__default.memo(MicroFrontend);
1042
+ const Component = (props) => {
1043
+ const {
1044
+ component,
1045
+ dynamicMFStore,
1046
+ windowTools
1047
+ } = props;
1048
+ return /* @__PURE__ */ jsx(WindowToolsMFProvider, {
1049
+ ...windowTools,
1050
+ children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, {
1051
+ store: dynamicMFStore,
1052
+ children: typeof component === "function" ? component() : component
1053
+ })
1054
+ });
1055
+ };
1056
+ React__default.memo(Component);
1057
+ const WindowRoot = styled("div")`
1058
+
1059
+ inset:0;
1060
+ position: absolute;
1061
+ display: flex;
1062
+ flex-direction: column;
1063
+ /* height: 100%; */
1064
+ /* width: 100%; */
1065
+ overflow: hidden;
1066
+ border: 1px solid gray;
1067
+
1068
+ background-color: ${(props) => props.theme.palette.background.default};
1069
+ padding: ${(props) => props.theme.spacing(0)};
1070
+ &.${areasViewerClasses.selected} {
1071
+ border-top: 1px solid green;
1072
+ }
1073
+ &.${areasViewerClasses.loading} {
1074
+ border-left: 2px solid red;
1075
+ }
1076
+ // windowHeader
1077
+ & .${areasViewerClasses.windowHeader} {
1078
+ display: flex;
1079
+ gap: 4px;
1080
+
1081
+ align-items: center;
1082
+ position: relative;
1083
+
1084
+ padding: 8px;
1085
+ justify-content: end;
1086
+ min-height: ${(props) => props.theme.spacing(5)} ;
1087
+
1088
+ border-bottom: 1px solid ${(props) => props.theme.palette.divider},
1089
+ overflow: hidden;
1090
+ cursor: move;
1091
+ height: 60px;
1092
+
1093
+
1094
+
1095
+ > span: {
1096
+ margin-right: 12px;
1097
+ }
1098
+ }
1099
+ // windowHeaderTitle
1100
+ & .${areasViewerClasses.windowHeaderTitle} {
1101
+ width: 100%;
1102
+ max-width: 100%;
1103
+ overflow: hidden;
1104
+ white-space: nowrap;
1105
+ color: ${(props) => props.theme.palette.text.primary};
1106
+ margin-left: 12px;
1107
+ margin-right: 24px;
1108
+ text-overflow: ellipsis;
1109
+ }
1110
+ // windowHeaderMainActions
1111
+ & .${areasViewerClasses.windowHeaderMainActions} {
1112
+ display: flex;
1113
+
1114
+ gap: 4px;
1115
+ }
1116
+
1117
+
1118
+ // windowHeaderMainActions
1119
+ & .${areasViewerClasses.windowContent} {
1120
+ flex-grow: 1;
1121
+ position: relative;
1122
+ }
1123
+
1124
+ // windowModalRoot
1125
+ & .${areasViewerClasses.windowModalRoot} {
1126
+ padding: 16px;
1127
+ }
1128
+
1129
+ ${(props) => props.theme.components?.M4LAreasViewerWindow?.styleOverrides}
1130
+
1131
+
1132
+ `;
1133
+ const Window = (props) => {
1134
+ const {
1135
+ emergeType,
1136
+ windowId,
1137
+ moduleId,
1138
+ areaId
1139
+ } = props;
1140
+ const selected = useAreasStore((state) => emergeType === "layout" ? state.hashAreas[areaId].currentLayoutId : state.hashAreas[areaId].currentPopUpId) === windowId;
1141
+ const wd = useAreasStore((state) => state.hashWindows[windowId], shallow);
1142
+ const {
1143
+ setActions,
1144
+ getCookie,
1145
+ getCookies,
1146
+ setCookie,
1147
+ close,
1148
+ setLoading
1149
+ } = useAreasStore((state) => state.windowActions, shallow);
1150
+ const {
1151
+ selectWindowPopUp,
1152
+ selectWindowLayout
1153
+ } = useAreasStore((state) => state.areaActions);
1154
+ const {
1155
+ loadCookiesFromApi
1156
+ } = useAreasStore((state) => state.windowActions);
1157
+ const onTouch = () => {
1158
+ if (!selected) {
1159
+ if (emergeType === "popup") {
1160
+ selectWindowPopUp(areaId, props.windowId);
1161
+ } else if (emergeType === "layout") {
1162
+ selectWindowLayout(areaId, props.windowId);
1163
+ }
1164
+ }
1165
+ };
1166
+ const windowTools = useMemo(() => ({
1167
+ getWindowId: () => windowId,
1168
+ setActions: (newActions, version) => {
1169
+ setActions(windowId, newActions, version);
1170
+ },
1171
+ getCookie: (id) => getCookie(windowId, id),
1172
+ getCookies: (type) => getCookies(windowId, type),
1173
+ setCookie: (id, type, cookie) => {
1174
+ setCookie(windowId, id, type, cookie);
1175
+ },
1176
+ close: () => close(windowId),
1177
+ setLoading: (isLoading) => {
1178
+ setLoading(windowId, isLoading);
1179
+ }
1180
+ }), []);
1181
+ useEffect(() => {
1182
+ loadCookiesFromApi(windowId);
1183
+ }, []);
1184
+ return /* @__PURE__ */ jsxs(WindowRoot, {
1185
+ role: "presentation",
1186
+ className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selected : null, wd.loading ? areasViewerClasses.loading : null),
1187
+ onMouseDown: onTouch,
1188
+ children: [/* @__PURE__ */ jsx(Header, {
1189
+ areaId,
1190
+ windowId,
1191
+ emergeType
1192
+ }), /* @__PURE__ */ jsx("div", {
1193
+ className: areasViewerClasses.windowContent,
1194
+ children: wd.status === "init" ? /* @__PURE__ */ jsx("div", {
1195
+ children: "BRUCE cargando"
1196
+ }) : wd.winType === "microfrontend" ? /* @__PURE__ */ jsx(MemonizedMicroFrontend, {
1197
+ moduleId,
1198
+ dynamicMFStore: wd.dynamicMFStore,
1199
+ windowTools,
1200
+ ...wd.mfProps
1201
+ }) : /* @__PURE__ */ jsx(Component, {
1202
+ moduleId,
1203
+ dynamicMFStore: wd.dynamicMFStore,
1204
+ windowTools,
1205
+ component: wd.component
1206
+ })
1207
+ })]
1208
+ });
1209
+ };
1210
+ const MemonizedWindow = React__default.memo(Window);
1211
+ const WindowPopUp = (props) => {
1212
+ const {
1213
+ areaId,
1214
+ windowProps,
1215
+ windowId
1216
+ } = props;
1217
+ const {
1218
+ selectWindowPopUp
1219
+ } = useAreasStore((store) => store.areaActions);
1220
+ const selectedPopUpId = useAreasStore((store) => store.hashAreas[areaId].currentPopUpId);
1221
+ const zIndex = useAreasStore((store) => store.hashAreas[areaId].hashWindowsPopups[props.windowId].zIndex);
1222
+ const isSelected = props.windowId === selectedPopUpId;
1223
+ const onTouch = () => {
1224
+ if (!isSelected) {
1225
+ selectWindowPopUp(areaId, props.windowId);
1226
+ }
1227
+ };
1228
+ return /* @__PURE__ */ jsx(DraggableWindow, {
1229
+ handle: ".m4l_draggable_handle",
1230
+ cancel: "",
1231
+ defaultPosition: windowProps,
1232
+ children: /* @__PURE__ */ jsx(ResizeableWindow, {
1233
+ className: clsx(areasViewerClasses.windowPopupRoot, `${areasViewerClasses.windowPopupRoot}-${windowId}`),
1234
+ width: windowProps.width,
1235
+ height: windowProps.height,
1236
+ style: {
1237
+ zIndex,
1238
+ position: "absolute"
1239
+ },
1240
+ onResizeStart: () => {
1241
+ onTouch();
1242
+ },
1243
+ children: /* @__PURE__ */ jsx(Window, {
1244
+ ...props
1245
+ })
1246
+ })
1247
+ });
1248
+ };
1249
+ const MemonizedWindowPopUp = React__default.memo(WindowPopUp);
1250
+ const ResponsiveGridLayout = WidthProvider(Responsive);
1251
+ const GridLayout = (props) => {
1252
+ const {
1253
+ areaId
1254
+ } = props;
1255
+ const windowsLayouts = useAreasStore((state) => state.hashAreas[areaId].windowsLayouts, shallow);
1256
+ const hashWindowsPopups = useAreasStore((state) => state.hashAreas[areaId].hashWindowsPopups, shallow);
1257
+ const hashWindowsLayouts = useAreasStore((state) => state.hashAreas[areaId].hashWindowsLayouts, shallow);
1258
+ const breakPointsLayouts = useAreasStore((state) => state.hashAreas[areaId].breakPointsLayouts, shallow);
1259
+ const windowsPopUps = useAreasStore((state) => state.hashAreas[areaId].windowsPopUps, shallow);
1260
+ const breakpoints = useAreasStore((state) => state.hashAreas[areaId].breakpoints, shallow);
1261
+ const viewMode = useAreasStore((state) => state.hashAreas[areaId].viewMode, shallow);
1262
+ const cols = useAreasStore((state) => state.hashAreas[areaId].cols, shallow);
1263
+ const {
1264
+ onBreakpointsLayoutsChange
1265
+ } = useAreasStore((state) => state.areaActions, shallow);
1266
+ function onBreakpointChange(_newBreakpoint, _newCols) {
1267
+ }
1268
+ useEffect(() => {
1269
+ setTimeout(() => {
1270
+ window.dispatchEvent(new Event("resize"));
1271
+ }, 100);
1272
+ }, [viewMode, windowsLayouts]);
1273
+ return /* @__PURE__ */ jsxs(
1274
+ ResponsiveGridLayout,
1275
+ {
1276
+ autoSize: false,
1277
+ compactType: "vertical",
1278
+ measureBeforeMount: true,
1279
+ resizeHandles: ["nw", "se"],
1280
+ className: clsx(areasViewerClasses.areaGridLayout, `${areasViewerClasses.areaGridLayout}-${areaId}`),
1281
+ layouts: breakPointsLayouts,
1282
+ onLayoutChange: (currentLayouts, newAllLayouts) => onBreakpointsLayoutsChange(areaId, currentLayouts, newAllLayouts),
1283
+ onBreakpointChange,
1284
+ breakpoints,
1285
+ cols,
1286
+ rowHeight: ROW_HEIGTH_GRIDLAYOUT,
1287
+ margin: [MARGIN_GRIDLAYOUT, MARGIN_GRIDLAYOUT],
1288
+ containerPadding: [CONTAINER_PADDING_GRIDLAYOUT, CONTAINER_PADDING_GRIDLAYOUT],
1289
+ draggableHandle: ".m4l_draggable_handle",
1290
+ onWidthChange: () => {
1291
+ console.log("onWidthChange", areaId);
1292
+ },
1293
+ preventCollision: false,
1294
+ verticalCompact: true,
1295
+ children: [/* @__PURE__ */ jsx("div", {
1296
+ className: areasViewerClasses.areaGridLayoutPopupsContainer,
1297
+ "data-grid": {
1298
+ i: "none",
1299
+ x: 0,
1300
+ y: 0,
1301
+ w: 0,
1302
+ h: 0,
1303
+ maxW: 0,
1304
+ maxH: 0,
1305
+ minW: 0,
1306
+ minH: 0,
1307
+ static: true,
1308
+ isDraggable: false,
1309
+ isResizable: false
1310
+ },
1311
+ children: windowsPopUps.map((wp) => {
1312
+ if (hashWindowsPopups[wp]) {
1313
+ return /* @__PURE__ */ jsx(MemonizedWindowPopUp, {
1314
+ ...hashWindowsPopups[wp]
1315
+ }, hashWindowsPopups[wp].windowId);
1316
+ }
1317
+ return null;
1318
+ })
1319
+ }, "none"), windowsLayouts.map((l) => {
1320
+ if (hashWindowsLayouts[l.i]) {
1321
+ return /* @__PURE__ */ jsx("div", {
1322
+ children: /* @__PURE__ */ jsx(MemonizedWindow, {
1323
+ ...hashWindowsLayouts[l.i]
1324
+ })
1325
+ }, l.i);
1326
+ }
1327
+ return null;
1328
+ })]
1329
+ }
1330
+ );
1331
+ };
1332
+ const PanelWindows = (props) => {
1333
+ const {
1334
+ areaId
1335
+ } = props;
1336
+ const status = useAreasStore((state) => state.hashAreas[areaId].status);
1337
+ const mode = useAreasStore((state) => state.hashAreas[areaId].viewMode);
1338
+ const singleId = useAreasStore((state) => state.hashAreas[areaId].singleId);
1339
+ const windowsLayouts = useAreasStore((state) => state.hashAreas[areaId].windowsLayouts, shallow);
1340
+ const hashWindowsLayouts = useAreasStore((state) => state.hashAreas[areaId].hashWindowsLayouts, shallow);
1341
+ const {
1342
+ maximizeLayout
1343
+ } = useAreasStore((state) => state.areaActions);
1344
+ const onTouched = (layoutId) => {
1345
+ maximizeLayout(areaId, layoutId);
1346
+ };
1347
+ if (status === "loaded") {
1348
+ if (mode !== "single" || windowsLayouts.length < 2) {
1349
+ return null;
1350
+ }
1351
+ return /* @__PURE__ */ jsx("div", {
1352
+ className: areasViewerClasses.panelWindowsRoot,
1353
+ children: windowsLayouts.map((l) => {
1354
+ return /* @__PURE__ */ jsx("div", {
1355
+ className: clsx(areasViewerClasses.panelWindowsButtonContainer, singleId === l.i ? areasViewerClasses.selected : null),
1356
+ children: /* @__PURE__ */ jsx(IconButton, {
1357
+ src: hashWindowsLayouts[l.i].url_icon,
1358
+ size: "small",
1359
+ onClick: () => onTouched(l.i)
1360
+ })
1361
+ }, l.i);
1362
+ })
1363
+ });
1364
+ } else {
1365
+ return null;
1366
+ }
1367
+ };
1368
+ const InnerForHooks = (props) => {
1369
+ const {
1370
+ areaId
1371
+ } = props;
1372
+ const status = useAreasStore((state) => state.hashAreas[areaId].status);
1373
+ return /* @__PURE__ */ jsxs("div", {
1374
+ className: clsx(areasViewerClasses.areaGridLayoutPanelContainer, `${areasViewerClasses.areaGridLayoutPanelContainer}-${areaId}`),
1375
+ children: [
1376
+ status === "loaded" ? /* @__PURE__ */ jsx(GridLayout, {
1377
+ areaId
1378
+ }) : /* @__PURE__ */ jsx("div", {
1379
+ children: "Loading.. Intentar si falla."
1380
+ }),
1381
+ /* @__PURE__ */ jsx(PanelWindows, {
1382
+ areaId
1383
+ })
1384
+ ]
1385
+ });
1386
+ };
1387
+ const Area = (props) => {
1388
+ const {
1389
+ selected,
1390
+ areaId
1391
+ } = props;
1392
+ const classesAreaRoot = useAreasStore((state) => state.viwerClasses.areaRoot);
1393
+ const status = useAreasStore((state) => state.hashAreas[areaId].status);
1394
+ const {
1395
+ resizeMaximixedLayout
1396
+ } = useAreasStore((state) => state.areaActions, shallow);
1397
+ const throttleResizeMaximixedLayout = throttle(() => {
1398
+ console.log("throttleResizeMaximixedLayout", areaId);
1399
+ resizeMaximixedLayout(areaId);
1400
+ }, THROTTLE_RESIZE_TIME, {
1401
+ leading: false
1402
+ });
1403
+ const onResize = useCallback((_target) => {
1404
+ throttleResizeMaximixedLayout();
1405
+ }, []);
1406
+ const ref = useResizeObserver(onResize);
1407
+ if (status === "init") {
1408
+ return null;
1409
+ }
1410
+ return /* @__PURE__ */ jsx("div", {
1411
+ className: clsx(classesAreaRoot, selected ? areasViewerClasses.selected : null, status === "loading" ? areasViewerClasses.loading : null),
1412
+ ref,
1413
+ children: /* @__PURE__ */ jsx(InnerForHooks, {
1414
+ areaId
1415
+ })
1416
+ });
1417
+ };
1418
+ Area.displayName = "Area";
1419
+ styled("div")(({ theme }) => ({
1420
+ display: "flex",
1421
+ flexDirection: "column",
1422
+ height: "100%",
1423
+ overflow: "hidden",
1424
+ padding: theme.spacing(3)
1425
+ }));
1426
+ const WrapperWindowModal = styled(Dialog)(({ theme }) => ({
1427
+ hola: 1,
1428
+ backgroundColor: theme.palette.background.paper,
1429
+ "& .MuiDialog-container": {},
1430
+ "&.m4l_selected": {
1431
+ borderTop: "1px solid green"
1432
+ },
1433
+ ...theme.components?.M4LAreasViewerModal?.styleOverrides
1434
+ }));
1435
+ const WindowModal = (props) => {
1436
+ const {
1437
+ windowId
1438
+ } = props;
1439
+ const {
1440
+ onClose
1441
+ } = useAreasStore((state) => state.hashWindowsModals[windowId]);
1442
+ const isDesktop = useResponsiveDesktop();
1443
+ const DragabblePaperComponent = (_props) => {
1444
+ return /* @__PURE__ */ jsx(cjs.exports, {
1445
+ handle: ".m4l_draggable_handle",
1446
+ bounds: "parent",
1447
+ children: /* @__PURE__ */ jsx(ResizeableWindow, {
1448
+ width: props.windowProps?.width || 400,
1449
+ height: props.windowProps?.height || 300,
1450
+ children: /* @__PURE__ */ jsx(Window, {
1451
+ ...props
1452
+ })
1453
+ })
1454
+ });
1455
+ };
1456
+ function PaperComponent(_props) {
1457
+ return /* @__PURE__ */ jsx(Window, {
1458
+ ...props
1459
+ });
1460
+ }
1461
+ return /* @__PURE__ */ jsx(WrapperWindowModal, {
1462
+ className: areasViewerClasses.windowModalRoot,
1463
+ open: true,
1464
+ scroll: "paper",
1465
+ onKeyDown: (event) => {
1466
+ if (event.key === "Escape") {
1467
+ onClose && onClose(windowId);
1468
+ }
1469
+ },
1470
+ "aria-labelledby": "child-modal-title",
1471
+ "aria-describedby": "child-modal-description",
1472
+ PaperComponent: isDesktop ? DragabblePaperComponent : PaperComponent,
1473
+ maxWidth: false,
1474
+ fullWidth: !isDesktop,
1475
+ fullScreen: false,
1476
+ disableEnforceFocus: true
1477
+ });
1478
+ };
1479
+ const MemonizedWindowModal = React__default.memo(WindowModal);
1480
+ function AreasViewer() {
1481
+ const areas = useAreasStore((state) => state.areas, shallow);
1482
+ const windowsModals = useAreasStore((state) => state.windowsModals);
1483
+ const hashWindowsModals = useAreasStore((state) => state.hashWindowsModals);
1484
+ const currentArea = useAreasStore((state) => state.currentAreaId);
1485
+ const status = useAreasStore((state) => state.ownerState.status);
1486
+ const classesRoot = useAreasStore((state) => state.viwerClasses.root);
1487
+ return /* @__PURE__ */ jsxs(Fragment, {
1488
+ children: [/* @__PURE__ */ jsx(AreasViewerRoot, {
1489
+ className: classesRoot,
1490
+ children: status === "loaded" ? areas.map((area) => {
1491
+ return /* @__PURE__ */ jsx(Area, {
1492
+ areaId: area.id,
1493
+ selected: currentArea === area.id
1494
+ }, area.id);
1495
+ }) : /* @__PURE__ */ jsx(Fragment, {
1496
+ children: "Bruce cargando"
1497
+ })
1498
+ }), windowsModals.map((wm) => {
1499
+ if (hashWindowsModals[wm]) {
1500
+ return /* @__PURE__ */ jsx(MemonizedWindowModal, {
1501
+ ...hashWindowsModals[wm]
1502
+ }, wm);
1503
+ }
1504
+ return null;
1505
+ })]
1506
+ });
1507
+ }
1508
+ export {
1509
+ AreasAdmin as A,
1510
+ useAreasAdminUtilityClasses as a,
1511
+ areasViewerClasses as b,
1512
+ AreasViewer as c,
1513
+ useAreasViewerUtilityClasses as u
1514
+ };