@m4l/components 0.1.75 → 0.1.77

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 (320) hide show
  1. package/@types/export.d.ts +97 -1
  2. package/components/AccountPopover/classes/index.d.ts +5 -0
  3. package/components/AccountPopover/classes/types.d.ts +5 -0
  4. package/components/AccountPopover/{index.93aefccd.js → index.3a79c395.js} +151 -142
  5. package/components/AccountPopover/subcomponents/MyAvatar/createAvatar.d.ts +1 -1
  6. package/components/AccountPopover/subcomponents/PopOver/types.d.ts +0 -4
  7. package/components/AppBar/classes/index.d.ts +1 -0
  8. package/components/AppBar/classes/types.d.ts +1 -0
  9. package/components/AppBar/{index.cc974d56.js → index.71b38ee9.js} +25 -15
  10. package/components/CommonActions/components/ActionCancel/{index.574ea031.js → index.b748a38e.js} +2 -2
  11. package/components/CommonActions/components/ActionFormCancel/{index.e62db5d3.js → index.27ad09e1.js} +25 -22
  12. package/components/CommonActions/components/ActionFormIntro/{index.304da410.js → index.2556f054.js} +2 -2
  13. package/components/CommonActions/components/ActionIntro/{index.d635cbc4.js → index.a7d92e66.js} +2 -2
  14. package/components/CommonActions/components/Actions/{index.37ffde59.js → index.3eba9d91.js} +20 -20
  15. package/components/DataGrid/{index.c0c626cd.js → index.545b492f.js} +50 -30
  16. package/components/DataGrid/types.d.ts +5 -1
  17. package/components/DraggableWindow/{index.b95a678e.js → index.c702d3f2.js} +1 -1
  18. package/components/DynamicFilter/{index.3034c6ba.js → index.d7be0f37.js} +46 -39
  19. package/components/DynamicFilter/subcomponents/InnerForHooks/index.d.ts +2 -1
  20. package/components/DynamicFilter/subcomponents/InnerForHooks/types.d.ts +2 -0
  21. package/components/DynamicFilter/tests/contants.d.ts +1 -1
  22. package/components/DynamicFilter/types.d.ts +4 -0
  23. package/components/GridLayout/GridLayout.d.ts +6 -0
  24. package/components/GridLayout/Responsive/index.a12a8cec.js +335 -0
  25. package/components/GridLayout/WidthProvider/index.8ff65909.js +67 -0
  26. package/components/GridLayout/calculateUtils.d.ts +42 -0
  27. package/components/GridLayout/index.4ba3767a.js +1400 -0
  28. package/components/GridLayout/index.d.ts +6 -0
  29. package/components/GridLayout/subcomponents/GridItem/index.d.ts +25 -0
  30. package/components/GridLayout/subcomponents/GridItem/types.d.ts +76 -0
  31. package/components/GridLayout/subcomponents/Responsive/index.d.ts +3 -0
  32. package/components/GridLayout/subcomponents/Responsive/responsiveUtils.d.ts +61 -0
  33. package/components/GridLayout/subcomponents/Responsive/types.d.ts +71 -0
  34. package/components/GridLayout/subcomponents/WidthProvider/index.d.ts +16 -0
  35. package/components/GridLayout/types.d.ts +355 -0
  36. package/components/GridLayout/utils.d.ts +123 -0
  37. package/components/HelperText/{index.ec9b3e6a.js → index.ef31df1f.js} +12 -10
  38. package/components/Icon/{index.f9119f5e.js → index.ecb63e65.js} +1 -1
  39. package/components/Image/{index.8aae9322.js → index.c18ebf5a.js} +6 -7
  40. package/components/Image/types.d.ts +1 -4
  41. package/components/LanguagePopover/{index.491e1306.js → index.0023d069.js} +12 -10
  42. package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.d.ts +2 -0
  43. package/components/LinearProgressIndeterminate/classes/constants.d.ts +1 -0
  44. package/components/LinearProgressIndeterminate/classes/index.d.ts +3 -0
  45. package/components/LinearProgressIndeterminate/classes/types.d.ts +7 -0
  46. package/components/LinearProgressIndeterminate/index.60dabc06.js +43 -0
  47. package/components/LinearProgressIndeterminate/index.d.ts +1 -0
  48. package/components/LinearProgressIndeterminate/tests/constants.d.ts +1 -0
  49. package/components/LinearProgressIndeterminate/tests/utils.d.ts +2 -0
  50. package/components/ModalDialog/{index.f652ea12.js → index.d880e685.js} +21 -60
  51. package/components/NavLink/{index.f8aee9f4.js → index.cd92eceb.js} +12 -10
  52. package/components/NoItemSelected/{index.cce86db4.js → index.23dfc897.js} +1 -1
  53. package/components/ObjectLogs/{index.c31b3f8b.js → index.f174c542.js} +31 -21
  54. package/components/PaperForm/classes/constants.d.ts +1 -0
  55. package/components/PaperForm/classes/index.d.ts +11 -0
  56. package/components/PaperForm/classes/types.d.ts +10 -0
  57. package/components/PaperForm/{index.d79c6f76.js → index.1bd86ee5.js} +58 -25
  58. package/components/PaperForm/types.d.ts +5 -2
  59. package/components/Period/Period.d.ts +3 -0
  60. package/components/Period/classes/constants.d.ts +1 -0
  61. package/components/Period/classes/index.d.ts +10 -0
  62. package/components/Period/classes/types.d.ts +13 -0
  63. package/components/Period/index.711db043.js +321 -0
  64. package/components/Period/index.d.ts +2 -3
  65. package/components/Period/tests/constants.d.ts +1 -0
  66. package/components/Period/tests/utils.d.ts +2 -0
  67. package/components/Period/types.d.ts +3 -4
  68. package/components/PropertyValue/classes/constants.d.ts +1 -0
  69. package/components/PropertyValue/classes/index.d.ts +9 -0
  70. package/components/PropertyValue/classes/types.d.ts +9 -0
  71. package/components/PropertyValue/{index.dfcfe1ba.js → index.8a1adf3e.js} +60 -10
  72. package/components/PropertyValue/skeleton.d.ts +2 -1
  73. package/components/PropertyValue/tests/constants.d.ts +1 -0
  74. package/components/PropertyValue/tests/utils.d.ts +2 -0
  75. package/components/PropertyValue/types.d.ts +4 -0
  76. package/components/Resizeable/{index.41a8048b.js → index.9a9c79a4.js} +1 -1
  77. package/components/SideBar/{index.1ae13a73.js → index.c5ce0bad.js} +6 -6
  78. package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
  79. package/components/areas/components/AreasAdmin/classes/types.d.ts +6 -0
  80. package/components/areas/components/AreasAdmin/index.cc4cbf56.js +463 -0
  81. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.d.ts +3 -0
  82. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/types.d.ts +4 -0
  83. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +0 -1
  84. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/index.d.ts +2 -0
  85. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/index.d.ts +3 -0
  86. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/types.d.ts +3 -0
  87. package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
  88. package/components/areas/components/AreasViewer/classes/types.d.ts +15 -0
  89. package/components/areas/components/AreasViewer/{index.621c0de4.js → index.9c2aaaeb.js} +611 -541
  90. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/{GridLayout → AreaGridLayout}/index.d.ts +1 -1
  91. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/index.d.ts +2 -2
  92. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.d.ts +13 -2
  93. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.d.ts +1 -7
  94. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/index.d.ts +3 -0
  95. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/types.d.ts +2 -0
  96. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/types.d.ts +6 -0
  97. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/helper.d.ts +18 -0
  98. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/ProggessLoadingMF/index.d.ts +3 -0
  99. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/ProggessLoadingMF/types.d.ts +4 -0
  100. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/types.d.ts +1 -1
  101. package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/index.d.ts +3 -0
  102. package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/types.d.ts +5 -0
  103. package/components/areas/components/index.0f7ac464.js +29 -0
  104. package/components/areas/contexts/AreasContext/helper.d.ts +6 -16
  105. package/components/areas/contexts/AreasContext/{index.d98b89fc.js → index.c8147e8e.js} +282 -352
  106. package/components/areas/contexts/AreasContext/types.d.ts +28 -24
  107. package/components/areas/contexts/WindowToolsMFContext/types.d.ts +3 -2
  108. package/components/areas/contexts/{index.79d1912d.js → index.02336412.js} +1 -1
  109. package/components/areas/{dictionary.e72db809.js → dictionary.afb7e3d9.js} +10 -2
  110. package/components/areas/dictionary.d.ts +9 -1
  111. package/components/areas/hooks/useAreas/{index.a7b597fb.js → index.3406a6cb.js} +1 -1
  112. package/components/areas/{icons.3ec589d3.js → icons.8266ccc8.js} +8 -1
  113. package/components/areas/icons.d.ts +7 -0
  114. package/components/areas/index.6f2e5dab.js +31 -0
  115. package/components/areas/types.d.ts +34 -22
  116. package/components/formatters/BooleanFormatter/{index.60aa1c9d.js → index.5268b024.js} +1 -1
  117. package/components/formatters/{index.1f0efb32.js → index.137169d8.js} +2 -2
  118. package/components/hook-form/RHFAutocomplete/{index.af3296ac.js → index.ac2b1fae.js} +13 -11
  119. package/components/hook-form/RHFAutocompleteAsync/{index.76864056.js → index.8b4ccc8d.js} +1 -1
  120. package/components/hook-form/RHFCheckbox/classes/types.d.ts +1 -0
  121. package/components/hook-form/RHFCheckbox/{index.865ba239.js → index.acef119c.js} +20 -13
  122. package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/types.d.ts +1 -0
  123. package/components/hook-form/RHFCheckbox/test/utils.d.ts +1 -1
  124. package/components/hook-form/RHFCheckbox/types.d.ts +3 -1
  125. package/components/hook-form/RHFDateTime/{index.fd9c5aca.js → index.5b080342.js} +14 -12
  126. package/components/hook-form/RHFPeriod/classes/constants.d.ts +1 -0
  127. package/components/hook-form/RHFPeriod/classes/index.d.ts +6 -0
  128. package/components/hook-form/RHFPeriod/classes/types.d.ts +6 -0
  129. package/components/hook-form/RHFPeriod/index.5304e3bd.js +77 -0
  130. package/components/hook-form/RHFPeriod/types.d.ts +2 -1
  131. package/components/hook-form/RHFTextField/index.d.ts +1 -0
  132. package/components/hook-form/RHFTextField/{index.abcbc2d3.js → index.e751dca7.js} +9 -6
  133. package/components/hook-form/RHFUpload/RHFUploadImage/classes/constants.d.ts +1 -0
  134. package/components/hook-form/RHFUpload/RHFUploadImage/classes/index.d.ts +19 -0
  135. package/components/hook-form/RHFUpload/RHFUploadImage/classes/types.d.ts +18 -0
  136. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/index.d.ts +2 -1
  137. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/types.d.ts +3 -0
  138. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/types.d.ts +5 -0
  139. package/components/hook-form/RHFUpload/RHFUploadImage/tests/constants.d.ts +1 -0
  140. package/components/hook-form/RHFUpload/RHFUploadImage/tests/utils.d.ts +2 -0
  141. package/components/hook-form/RHFUpload/index.25db0511.js +261 -0
  142. package/components/hook-form/RHFUpload/index.d.ts +1 -1
  143. package/components/index.d.ts +4 -3
  144. package/components/modal/WindowBase/subcomponents/Header/types.d.ts +4 -1
  145. package/components/modal/WindowBase/types.d.ts +0 -3
  146. package/components/modal/WindowBase.850ea31a.js +82 -0
  147. package/components/modal/WindowConfirm/subcomponents/MessageIlustration/types.d.ts +3 -5
  148. package/components/modal/WindowConfirm/types.d.ts +3 -2
  149. package/components/modal/WindowConfirm.cb37bc58.js +122 -0
  150. package/components/modal/classes/constants.d.ts +1 -0
  151. package/components/modal/classes/index.d.ts +19 -0
  152. package/components/modal/classes/types.d.ts +22 -0
  153. package/components/modal/index.a0978193.js +84 -0
  154. package/components/modal/index.d.ts +2 -1
  155. package/components/mui_extended/Accordion/classes/constants.d.ts +1 -0
  156. package/components/mui_extended/Accordion/classes/index.d.ts +10 -0
  157. package/components/mui_extended/Accordion/classes/types.d.ts +10 -0
  158. package/components/mui_extended/Accordion/index.12b1339a.js +127 -0
  159. package/components/mui_extended/Accordion/tests/constants.d.ts +1 -0
  160. package/components/mui_extended/Accordion/tests/utils.d.ts +2 -0
  161. package/components/mui_extended/Accordion/types.d.ts +2 -1
  162. package/components/mui_extended/Avatar/{index.1e1a91a3.js → index.75e6ed57.js} +3 -1
  163. package/components/mui_extended/Badge/Badge.d.ts +3 -0
  164. package/components/mui_extended/Badge/classes/constants.d.ts +1 -0
  165. package/components/mui_extended/Badge/classes/index.d.ts +6 -0
  166. package/components/mui_extended/Badge/classes/types.d.ts +6 -0
  167. package/components/mui_extended/Badge/index.8c2b8b66.js +36 -0
  168. package/components/mui_extended/Badge/index.d.ts +2 -0
  169. package/components/mui_extended/Badge/tests/constants.d.ts +1 -0
  170. package/components/mui_extended/Badge/tests/utils.d.ts +2 -0
  171. package/components/mui_extended/Badge/types.d.ts +4 -0
  172. package/components/mui_extended/Button/{index.aebbab34.js → index.4288f9fc.js} +10 -5
  173. package/components/mui_extended/IconButton/{index.3b05af71.js → index.fc5b7c2d.js} +1 -1
  174. package/components/mui_extended/LoadingButton/tests/constants.d.ts +1 -1
  175. package/components/mui_extended/MenuActions/{index.ca5ce35a.js → index.f5b1c022.js} +30 -11
  176. package/components/mui_extended/MenuActions/types.d.ts +10 -2
  177. package/components/mui_extended/Pager/{index.80ec975a.js → index.435af0df.js} +1 -1
  178. package/components/mui_extended/Tab/classes/constants.d.ts +1 -0
  179. package/components/mui_extended/Tab/classes/index.d.ts +7 -0
  180. package/components/mui_extended/Tab/classes/types.d.ts +7 -0
  181. package/components/mui_extended/Tab/index.9e2f6e34.js +71 -0
  182. package/components/mui_extended/Tab/tests/constants.d.ts +1 -0
  183. package/components/mui_extended/Tab/tests/utils.d.ts +2 -0
  184. package/components/mui_extended/Tooltip/Tooltip.d.ts +3 -0
  185. package/components/mui_extended/Tooltip/classes/constants.d.ts +1 -0
  186. package/components/mui_extended/Tooltip/classes/index.d.ts +6 -0
  187. package/components/mui_extended/Tooltip/classes/types.d.ts +6 -0
  188. package/components/mui_extended/Tooltip/index.5a795dcd.js +43 -0
  189. package/components/mui_extended/Tooltip/index.d.ts +2 -0
  190. package/components/mui_extended/Tooltip/types.d.ts +6 -0
  191. package/components/mui_extended/index.83979b6a.js +22 -0
  192. package/components/mui_extended/index.d.ts +3 -1
  193. package/contexts/ModalContext/{index.a0de81f0.js → index.dee85a61.js} +1 -1
  194. package/contexts/ModalContext/types.d.ts +2 -0
  195. package/contexts/RHFormContext/classes/constants.d.ts +1 -0
  196. package/contexts/RHFormContext/classes/index.d.ts +9 -0
  197. package/contexts/RHFormContext/classes/types.d.ts +6 -0
  198. package/contexts/RHFormContext/{index.a7511399.js → index.fe175bab.js} +33 -9
  199. package/hooks/useModal/{index.26075cdd.js → index.de522a10.js} +1 -1
  200. package/index.js +138 -119
  201. package/node_modules.d73a220d.js +363 -0
  202. package/package.json +4 -3
  203. package/{react-draggable.e625b0d1.js → react-draggable.7abb5d0a.js} +3 -2
  204. package/{react-resizable.24367d77.js → react-resizable.ba08699a.js} +13 -12
  205. package/utils/{index.b61dccbe.js → index.c43a95f4.js} +0 -27
  206. package/utils/types.d.ts +1 -1
  207. package/components/AccountPopover/style.d.ts +0 -2
  208. package/components/AppBar/styles.d.ts +0 -2
  209. package/components/CommonActions/components/Actions/styles.d.ts +0 -2
  210. package/components/DataGrid/styles.d.ts +0 -3
  211. package/components/DataGrid/subcomponents/Actions/styles.d.ts +0 -2
  212. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/styles.d.ts +0 -3
  213. package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/styles.d.ts +0 -2
  214. package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/styles.d.ts +0 -4
  215. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/styles.d.ts +0 -2
  216. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +0 -8
  217. package/components/DataGrid/subcomponents/Table/styles.d.ts +0 -3
  218. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +0 -2
  219. package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +0 -6
  220. package/components/DynamicFilter/subcomponents/ApplyedFilters/styles.d.ts +0 -3
  221. package/components/DynamicFilter/subcomponents/ApplyedFilters/subcomponents/ApplyedFilter/styles.d.ts +0 -6
  222. package/components/DynamicFilter/subcomponents/ClearFilters/styles.d.ts +0 -3
  223. package/components/DynamicFilter/subcomponents/FilterButton/styles.d.ts +0 -3
  224. package/components/DynamicFilter/subcomponents/InnerForHooks/styles.d.ts +0 -3
  225. package/components/DynamicFilter/subcomponents/PopoverFilter/styles.d.ts +0 -2
  226. package/components/HelperText/styles.d.ts +0 -2
  227. package/components/Icon/styles.d.ts +0 -4
  228. package/components/Image/styles.d.ts +0 -3
  229. package/components/Image/subcomponents/LazyLoadComponent/styles.d.ts +0 -2
  230. package/components/Image/subcomponents/Skeleton/styles.d.ts +0 -2
  231. package/components/LanguagePopover/styles.d.ts +0 -6
  232. package/components/NavLink/styles.d.ts +0 -2
  233. package/components/NoItemSelected/styles.d.ts +0 -5
  234. package/components/ObjectLogs/components/DetailDialog/styles.d.ts +0 -3
  235. package/components/ObjectLogs/styles.d.ts +0 -4
  236. package/components/PaperForm/styles.d.ts +0 -7
  237. package/components/Period/index.ff110093.js +0 -280
  238. package/components/Period/styles.d.ts +0 -7
  239. package/components/PropertyValue/styles.d.ts +0 -6
  240. package/components/ResizeableWindow/styles.d.ts +0 -5
  241. package/components/ScrollBar/styles.d.ts +0 -8
  242. package/components/SideBar/styles.d.ts +0 -5
  243. package/components/SideBar/subcomponents/ContentDesktop/style.d.ts +0 -2
  244. package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/styles.d.ts +0 -3
  245. package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +0 -5
  246. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +0 -2
  247. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/styles.d.ts +0 -2
  248. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/styles.d.ts +0 -9
  249. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/subcomponents/NavItemRootContent/styles.d.ts +0 -3
  250. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/styles.d.ts +0 -2
  251. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +0 -22
  252. package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/styles.d.ts +0 -6
  253. package/components/SideBar/subcomponents/ContentMobile/styles.d.ts +0 -3
  254. package/components/SplitLayout/styles.d.ts +0 -4
  255. package/components/animate/LoadingScreen/styles.d.ts +0 -3
  256. package/components/animate/PropagateLoader/syles.d.ts +0 -2
  257. package/components/areas/components/AreasAdmin/index.158621e0.js +0 -289
  258. package/components/areas/components/AreasAdmin/styles.d.ts +0 -2
  259. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +0 -4
  260. package/components/areas/components/AreasViewer/styles.d.ts +0 -2
  261. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/styles.d.ts +0 -2
  262. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/styles.d.ts +0 -9
  263. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/index.d.ts +0 -3
  264. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/styles.d.ts +0 -2
  265. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/index.d.ts +0 -3
  266. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/styles.d.ts +0 -2
  267. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/types.d.ts +0 -2
  268. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/types.d.ts +0 -6
  269. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/styles.d.ts +0 -3
  270. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowPopUp/index.d.ts +0 -4
  271. package/components/areas/components/index.2ed9d60b.js +0 -14
  272. package/components/areas/index.d6b8e205.js +0 -16
  273. package/components/hook-form/RHFAutocomplete/styles.d.ts +0 -2
  274. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +0 -2
  275. package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/styles.d.ts +0 -4
  276. package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +0 -5
  277. package/components/hook-form/RHFCheckbox/styles.d.ts +0 -15
  278. package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/styles.d.ts +0 -3
  279. package/components/hook-form/RHFDateTime/styles.d.ts +0 -2
  280. package/components/hook-form/RHFDateTime/subcomponents/Skeleton/styles.d.ts +0 -2
  281. package/components/hook-form/RHFPeriod/index.77486f61.js +0 -55
  282. package/components/hook-form/RHFPeriod/styles.d.ts +0 -2
  283. package/components/hook-form/RHFTextField/styles.d.ts +0 -3
  284. package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +0 -3
  285. package/components/hook-form/RHFTextFieldPassword/styles.d.ts +0 -2
  286. package/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +0 -2
  287. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +0 -12
  288. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/styles.d.ts +0 -2
  289. package/components/hook-form/RHFUpload/index.522bcad5.js +0 -283
  290. package/components/modal/ModalDialog/styles.d.ts +0 -9
  291. package/components/modal/ModalDialog/types.d.ts +0 -7
  292. package/components/modal/WindowBase/styles.d.ts +0 -2
  293. package/components/modal/WindowBase/subcomponents/Header/styles.d.ts +0 -6
  294. package/components/modal/WindowBase.c223e4da.js +0 -126
  295. package/components/modal/WindowConfirm/subcomponents/MessageIlustration/styles.d.ts +0 -6
  296. package/components/modal/WindowConfirm.023e293f.js +0 -132
  297. package/components/modal/index.dbce0cab.js +0 -36
  298. package/components/mui_extended/Accordion/components/AccordionLabel.d.ts +0 -3
  299. package/components/mui_extended/Accordion/index.03bd0e2a.js +0 -107
  300. package/components/mui_extended/Accordion/styles.d.ts +0 -4
  301. package/components/mui_extended/Avatar/styles.d.ts +0 -2
  302. package/components/mui_extended/Button/styles.d.ts +0 -13
  303. package/components/mui_extended/IconButton/styles.d.ts +0 -2
  304. package/components/mui_extended/ImageButton/styles.d.ts +0 -2
  305. package/components/mui_extended/LoadingButton/styles.d.ts +0 -2
  306. package/components/mui_extended/MenuActions/styles.d.ts +0 -30
  307. package/components/mui_extended/Pager/components/PagerActions/styles.d.ts +0 -2
  308. package/components/mui_extended/Pager/styles.d.ts +0 -6
  309. package/components/mui_extended/Popover/styles.d.ts +0 -1
  310. package/components/mui_extended/Popover/subcomponts/ArrowIcon/index.d.ts +0 -3
  311. package/components/mui_extended/Tab/index.e0653a0a.js +0 -32
  312. package/components/mui_extended/Tab/styles.d.ts +0 -2
  313. package/components/mui_extended/Typography/styles.d.ts +0 -2
  314. package/components/mui_extended/index.6dcdbb1f.js +0 -20
  315. package/contexts/RHFormContext/styles.d.ts +0 -2
  316. /package/components/PaperForm/{index.d.ts → PaperForm.d.ts} +0 -0
  317. /package/components/PropertyValue/{index.d.ts → PropertyValue.d.ts} +0 -0
  318. /package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/{GridLayout → AreaGridLayout}/types.d.ts +0 -0
  319. /package/components/hook-form/RHFUpload/RHFUploadImage/{index.d.ts → RHFUploadImage.d.ts} +0 -0
  320. /package/components/mui_extended/Accordion/{index.d.ts → Accordion.d.ts} +0 -0
@@ -1,103 +1,122 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
1
7
  import { styled } from "@mui/material/styles";
2
- import { r as react_resizable_css } from "../../../../react-resizable.24367d77.js";
3
- import { generateUtilityClasses, Skeleton, styled as styled$1, Typography as Typography$1, Dialog } from "@mui/material";
8
+ import { r as react_resizable_css } from "../../../../react-resizable.ba08699a.js";
9
+ import { generateUtilityClasses, Skeleton, useTheme, Dialog } from "@mui/material";
4
10
  import { unstable_composeClasses } from "@mui/base";
5
- import { g as getComponentUtilityClass } from "../../../../utils/index.b61dccbe.js";
11
+ import { g as getComponentUtilityClass } from "../../../../utils/index.c43a95f4.js";
6
12
  import { a as AREAS_VIEWER_CLASS_NAME } from "../../constants.66529246.js";
7
- import React__default, { useMemo, useState, useRef, useCallback, useEffect } from "react";
8
- import { WidthProvider, Responsive } from "react-grid-layout";
9
13
  import { shallow } from "zustand/shallow";
10
- import "../../../animate/index.1f8eadd4.js";
11
- import { m } from "framer-motion";
14
+ import React__default, { useMemo, useState, useCallback, useEffect } from "react";
15
+ import clsx from "clsx";
16
+ import { u as useAreasStore } from "../../hooks/useAreas/index.3406a6cb.js";
17
+ import { useModuleDictionary, useEnvironment, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
18
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.fc5b7c2d.js";
19
+ import "../../../mui_extended/Accordion/index.12b1339a.js";
20
+ import { I as Icon } from "../../../Icon/index.ecb63e65.js";
21
+ import { T as Typography } from "../../../mui_extended/Typography/index.443590d6.js";
12
22
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
23
+ import "../../../mui_extended/Avatar/index.75e6ed57.js";
13
24
  import "react-router-dom";
25
+ import "@mui/material/Button";
26
+ import { B as Button } from "../../../mui_extended/Button/index.4288f9fc.js";
27
+ import "../../../mui_extended/Badge/index.8c2b8b66.js";
28
+ import "../../../Image/index.c18ebf5a.js";
29
+ import "@mui/lab";
30
+ import { M as MenuActions } from "../../../mui_extended/MenuActions/index.f5b1c022.js";
31
+ import "../../../mui_extended/Popover/index.9f35d0eb.js";
32
+ import "../../../mui_extended/Pager/index.435af0df.js";
33
+ import "../../../mui_extended/Tab/index.9e2f6e34.js";
34
+ import "../../../mui_extended/Tooltip/index.5a795dcd.js";
35
+ import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/graphics";
36
+ import { I as ICONS } from "../../icons.8266ccc8.js";
37
+ import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
38
+ import { L as LinearProgressIndeterminate } from "../../../LinearProgressIndeterminate/index.60dabc06.js";
39
+ import debounce from "lodash/debounce";
40
+ import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
41
+ import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
42
+ import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
43
+ import "../../../../contexts/ModalContext/index.dee85a61.js";
44
+ import "../../../../contexts/RHFormContext/index.fe175bab.js";
45
+ import "../../../GridLayout/index.4ba3767a.js";
46
+ import { R as Responsive } from "../../../GridLayout/Responsive/index.a12a8cec.js";
47
+ import { W as WidthProvider } from "../../../GridLayout/WidthProvider/index.8ff65909.js";
48
+ import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.c8147e8e.js";
49
+ import "../../../animate/index.1f8eadd4.js";
50
+ import "framer-motion";
14
51
  import "../../../animate/LoadingScreen/index.1d0c4307.js";
15
52
  import "../../../animate/PropagateLoader/index.7fab43c8.js";
16
- import { useModuleDictionary, useEnvironment, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
17
- import { I as Icon } from "../../../Icon/index.f9119f5e.js";
18
- import { I as IconButton } from "../../../mui_extended/IconButton/index.3b05af71.js";
19
- import clsx from "clsx";
20
- import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender, useResizeObserver } from "@m4l/graphics";
21
- import { u as useAreasStore } from "../../hooks/useAreas/index.a7b597fb.js";
22
- import "../AreasAdmin/index.158621e0.js";
23
- import { I as ICONS } from "../../icons.3ec589d3.js";
53
+ import "../AreasAdmin/index.cc4cbf56.js";
24
54
  import "../../../ScrollBar/index.bbe48f4d.js";
25
- import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, C as CONTAINER_PADDING_GRIDLAYOUT, T as THROTTLE_RESIZE_TIME } from "../../contexts/AreasContext/index.d98b89fc.js";
26
- import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
27
55
  import "zustand";
28
- import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
29
56
  import "react-hook-form";
30
- import "../../../hook-form/RHFAutocomplete/index.af3296ac.js";
31
- import { I as Image } from "../../../Image/index.8aae9322.js";
32
- import { T as Typography } from "../../../mui_extended/Typography/index.443590d6.js";
33
- import "../../../mui_extended/Accordion/index.03bd0e2a.js";
34
- import "../../../mui_extended/Avatar/index.1e1a91a3.js";
35
- import "@mui/material/Button";
36
- import { B as Button } from "../../../mui_extended/Button/index.aebbab34.js";
37
- import "@mui/lab";
38
- import "../../../mui_extended/Popover/index.9f35d0eb.js";
39
- import { M as MenuActions } from "../../../mui_extended/MenuActions/index.ca5ce35a.js";
40
- import "../../../mui_extended/Pager/index.80ec975a.js";
41
- import "../../../mui_extended/Tab/index.e0653a0a.js";
42
- import "../../../HelperText/index.ec9b3e6a.js";
43
- import debounce from "lodash/debounce";
44
- import "../../../hook-form/RHFAutocompleteAsync/index.76864056.js";
45
- import "../../../hook-form/RHFCheckbox/index.865ba239.js";
57
+ import "../../../hook-form/RHFAutocomplete/index.ac2b1fae.js";
58
+ import "../../../HelperText/index.ef31df1f.js";
59
+ import "../../../hook-form/RHFAutocompleteAsync/index.8b4ccc8d.js";
60
+ import "../../../hook-form/RHFCheckbox/index.acef119c.js";
46
61
  import "@mui/x-date-pickers";
47
- import "../../../hook-form/RHFDateTime/index.fd9c5aca.js";
48
- import "../../../hook-form/RHFTextField/index.abcbc2d3.js";
49
- import "../../../hook-form/RHFPeriod/index.77486f61.js";
50
- import "../../../Period/index.ff110093.js";
51
- import "../../../CommonActions/components/Actions/index.37ffde59.js";
52
- import "../../../../contexts/ModalContext/index.a0de81f0.js";
53
- import { c as cjs } from "../../../../react-draggable.e625b0d1.js";
54
- import "../../../ModalDialog/index.f652ea12.js";
55
- import { R as ResizeableWindow } from "../../../Resizeable/index.41a8048b.js";
56
- import "../../../modal/WindowConfirm.023e293f.js";
57
- import "../../../modal/WindowBase.c223e4da.js";
62
+ import "../../../hook-form/RHFDateTime/index.5b080342.js";
63
+ import "../../../hook-form/RHFTextField/index.e751dca7.js";
64
+ import "../../../hook-form/RHFPeriod/index.5304e3bd.js";
65
+ import "../../../Period/index.711db043.js";
66
+ import "../../../CommonActions/components/Actions/index.3eba9d91.js";
67
+ import { c as cjs } from "../../../../react-draggable.7abb5d0a.js";
68
+ import { R as ResizeableWindow } from "../../../Resizeable/index.9a9c79a4.js";
69
+ import "../../../modal/index.a0978193.js";
58
70
  import "lodash/isString";
59
71
  import "react-dropzone";
60
- import "../../../hook-form/RHFUpload/index.522bcad5.js";
61
- import "../../../DataGrid/index.c0c626cd.js";
72
+ import "../../../hook-form/RHFUpload/index.25db0511.js";
73
+ import "../../../DataGrid/index.545b492f.js";
62
74
  import "react-dnd";
63
75
  import "react-dnd-html5-backend";
64
- import "../../../DynamicFilter/index.3034c6ba.js";
76
+ import "../../../DynamicFilter/index.d7be0f37.js";
65
77
  import "yup";
66
- import "@hookform/resolvers/yup";
67
- import "../../../../contexts/RHFormContext/index.a7511399.js";
68
- import "../../../LanguagePopover/index.491e1306.js";
69
- import "../../../NavLink/index.f8aee9f4.js";
70
- import "../../../NoItemSelected/index.cce86db4.js";
71
- import "../../../ObjectLogs/index.c31b3f8b.js";
78
+ import "lodash";
79
+ import "../../../LanguagePopover/index.0023d069.js";
80
+ import "../../../NavLink/index.cd92eceb.js";
81
+ import "../../../NoItemSelected/index.23dfc897.js";
82
+ import "../../../ObjectLogs/index.f174c542.js";
72
83
  import "../../../../react-json-view.57125fcf.js";
73
- import "../../../PaperForm/index.d79c6f76.js";
84
+ import "../../../PaperForm/index.1bd86ee5.js";
74
85
  import "../../../Page/index.4237c241.js";
75
- import "../../../PropertyValue/index.dfcfe1ba.js";
86
+ import "../../../PropertyValue/index.8a1adf3e.js";
76
87
  import "../../../SplitLayout/index.9ef430f6.js";
77
88
  import "../../../../react-splitter-layout.8b1655c8.js";
78
- import "../../../SideBar/index.1ae13a73.js";
79
- import "../../../AppBar/index.cc974d56.js";
80
- import "../../../AccountPopover/index.93aefccd.js";
81
- import { g as getAreasDictionary } from "../../dictionary.e72db809.js";
82
- import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
83
- import { v as varBounce } from "../../../animate/variants/bounce.784aaaaa.js";
84
- import { D as DraggableWindow } from "../../../DraggableWindow/index.b95a678e.js";
85
- import { throttle } from "lodash";
89
+ import "../../../SideBar/index.c5ce0bad.js";
90
+ import "../../../AppBar/index.71b38ee9.js";
91
+ import "../../../AccountPopover/index.3a79c395.js";
86
92
  const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
87
93
  "root",
88
94
  "areaRoot",
95
+ "areasLoadingErrorRoot",
96
+ "areasLoadingErrorLoading",
97
+ "areasLoadingError",
98
+ "areasLoadingErrorIcon",
99
+ "areasLoadingErrorTitle",
100
+ "areasLoadingErrorDescription",
101
+ "areasLoadingErrorDivider",
102
+ "areasLoadingErrorTextAction",
89
103
  "areaGridLayoutPanelContainer",
90
104
  "areaGridLayout",
91
105
  "areaGridLayoutPopupsContainer",
106
+ "areasWindowPopUpList",
92
107
  "windowRoot",
93
108
  "windowHeader",
109
+ "windowHeaderContent",
94
110
  "windowHeaderTitle",
95
111
  "windowHeaderMainActions",
96
112
  "windowContent",
97
113
  "windowPopupRoot",
98
114
  "windowModalRoot",
115
+ "windowLinearProgressRoot",
116
+ "windowLinearProgressBar",
99
117
  "windowRootContainer",
100
118
  "windowToastiesContainer",
119
+ "windowToastiesContainerTostys",
101
120
  "windowToastyContainer",
102
121
  "windowToastyMeesageButtonsContainer",
103
122
  "windowToastyMessage",
@@ -106,7 +125,9 @@ const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
106
125
  "windowToastyClose",
107
126
  "panelWindowsRoot",
108
127
  "panelWindowsButtonContainer",
128
+ "containerLinearProgress",
109
129
  "selected",
130
+ "colapsed",
110
131
  "selectedWindow",
111
132
  "isMobile",
112
133
  "loading",
@@ -120,19 +141,30 @@ const useAreasViewerUtilityClasses = (ownerState) => {
120
141
  const slots = {
121
142
  root: ["root", ownerState.status, ownerState.isMobile && "isMobile", ownerState.isSkeleton && "isSkeleton"],
122
143
  areaRoot: ["areaRoot"],
144
+ areasLoadingErrorRoot: ["areasLoadingErrorRoot"],
145
+ areasLoadingErrorLoading: ["areasLoadingErrorLoading"],
146
+ areasLoadingError: ["areasLoadingError"],
147
+ areasLoadingErrorIcon: ["areasLoadingErrorIcon"],
148
+ areasLoadingErrorTitle: ["areasLoadingErrorTitle"],
149
+ areasLoadingErrorDescription: ["areasLoadingErrorDescription"],
150
+ areasLoadingErrorDivider: ["areasLoadingErrorDivider"],
123
151
  areaGridLayoutPanelContainer: ["areaGridLayoutPanelContainer"],
124
152
  areaGridLayout: ["areaGridLayout"],
125
153
  areaGridLayoutPopupsContainer: ["areaGridLayoutPopupsContainer"],
154
+ areasWindowPopUpList: ["areasWindowPopUpList"],
126
155
  windowRoot: ["windowRoot"],
127
156
  windowRootContainer: ["windowRootContainer"],
128
157
  windowHeader: ["windowHeader"],
129
158
  windowHeaderTitle: ["windowHeaderTitle"],
130
159
  windowHeaderMainActions: ["windowHeaderMainActions"],
131
160
  windowContent: ["windowContent"],
161
+ windowLinearProgressRoot: ["windowLinearProgressRoot"],
162
+ windowLinearProgressBar: ["windowLinearProgressBar"],
132
163
  windowPopupRoot: ["windowPopupRoot"],
133
164
  windowModalRoot: ["windowModalRoot"],
134
165
  selectedWindow: ["selectedWindow"],
135
166
  windowToastiesContainer: ["windowToastiesContainer"],
167
+ windowToastiesContainerTostys: ["windowToastiesContainerTostys"],
136
168
  windowToastyContainer: ["windowToastiesContainer"],
137
169
  windowToastyMeesageButtonsContainer: ["windowToastyMeesageButtonsContainer"],
138
170
  windowToastyMessage: ["windowToastyMessage"],
@@ -233,27 +265,6 @@ const AreasViewerRoot = styled("div")`
233
265
  & .${areasViewerClasses.windowRoot}.${areasViewerClasses.selected} {
234
266
  border-top: 1px solid green;
235
267
  }
236
- // windowHeader
237
- & .${areasViewerClasses.windowHeader} {
238
- display: flex;
239
- gap: 4px;
240
-
241
- align-items: center;
242
- position: relative;
243
-
244
- padding: 8px;
245
- justify-content: end;
246
- min-height: ${(props) => props.theme.spacing(5)};
247
-
248
- border-bottom: 1px solid ${(props) => props.theme.palette.divider};
249
- overflow: hidden;
250
- cursor: move;
251
- height: 60px;
252
-
253
- > span: {
254
- margin-right: 12px;
255
- }
256
- }
257
268
  // windowHeaderTitle
258
269
  & .${areasViewerClasses.windowHeaderTitle} {
259
270
  width: 100%;
@@ -314,7 +325,7 @@ const AreasViewerRoot = styled("div")`
314
325
  }
315
326
 
316
327
  .react-grid-item.react-grid-placeholder {
317
- background: green;
328
+ background: ${(props) => props.theme.palette.state.focus};
318
329
  opacity: 0.2;
319
330
  transition-duration: 100ms;
320
331
  z-index: 2;
@@ -592,29 +603,41 @@ function getMainActions(isDesktop, moduleActions) {
592
603
  );
593
604
  return mainActions;
594
605
  }
595
- function getMenuActions(windowId, isDesktop, moduleActions, urlPrefix, saveModuleCookies, resetModuleCookies, version) {
606
+ function getMenuActions(options) {
607
+ const {
608
+ windowId,
609
+ isDesktop,
610
+ moduleActions,
611
+ urlPrefix,
612
+ saveModuleCookies,
613
+ resetModuleCookies,
614
+ version,
615
+ windowOptions = { allowPersistCookies: false }
616
+ } = options;
596
617
  let menuActions = [...moduleActions.filter((action) => action.visibility !== "allways")];
597
618
  if (isDesktop !== void 0 && isDesktop) {
598
619
  menuActions = menuActions.filter((action) => action.visibility === "normal");
599
620
  }
600
- const saveCookiesAction = {
601
- urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.SAVE_COOKIES}`,
602
- onClick: () => saveModuleCookies(windowId),
603
- disabled: false,
604
- visibility: "normal",
605
- dictionaryId: getAreasDictionary("label_persist_module_cookies"),
606
- key: "save_cookies"
607
- };
608
- menuActions.push(saveCookiesAction);
609
- const resetCookiesAction = {
610
- urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.RESET_COOKIES}`,
611
- onClick: () => resetModuleCookies(windowId),
612
- disabled: false,
613
- visibility: "normal",
614
- dictionaryId: getAreasDictionary("label_reset_module_cookies"),
615
- key: "reset_cookes"
616
- };
617
- menuActions.push(resetCookiesAction);
621
+ if (windowOptions.allowPersistCookies) {
622
+ const saveCookiesAction = {
623
+ urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.SAVE_COOKIES}`,
624
+ onClick: () => saveModuleCookies(windowId),
625
+ disabled: false,
626
+ visibility: "normal",
627
+ dictionaryId: getAreasDictionary(DICCTIONARY.label_persist_module_cookies),
628
+ key: "save_cookies"
629
+ };
630
+ menuActions.push(saveCookiesAction);
631
+ const resetCookiesAction = {
632
+ urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.RESET_COOKIES}`,
633
+ onClick: () => resetModuleCookies(windowId),
634
+ disabled: false,
635
+ visibility: "normal",
636
+ dictionaryId: getAreasDictionary(DICCTIONARY.label_reset_module_cookies),
637
+ key: "reset_cookes"
638
+ };
639
+ menuActions.push(resetCookiesAction);
640
+ }
618
641
  if (version) {
619
642
  const versionAction = {
620
643
  urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.VERSION}`,
@@ -649,7 +672,7 @@ function MainActions(props) {
649
672
  children: mainActions.map((mainAction) => {
650
673
  const tooltip = mainAction.label !== void 0 ? mainAction.label : getLabel(mainAction.dictionaryId || "");
651
674
  return /* @__PURE__ */ jsx(IconButton, {
652
- src: mainAction.urlIcon,
675
+ src: mainAction.urlIcon || "",
653
676
  className: mainAction.className,
654
677
  onClick: mainAction.onClick,
655
678
  "aria-label": mainAction.label,
@@ -659,23 +682,85 @@ function MainActions(props) {
659
682
  })
660
683
  });
661
684
  }
685
+ const WindowPopUpsList = (props) => {
686
+ const {
687
+ areaId,
688
+ windowId
689
+ } = props;
690
+ const {
691
+ host_static_assets,
692
+ environment_assets
693
+ } = useEnvironment();
694
+ const windowsPopUps = useAreasStore((state2) => state2.hashAreas[areaId].hashLayoutItems.filter((li) => state2.hashWindows[li].parentLayoutId === windowId && state2.hashWindows[li].emergeType === "popup").map((lim) => {
695
+ const w = state2.hashWindows[lim];
696
+ return {
697
+ i: w.windowId,
698
+ url_icon: w.url_icon,
699
+ title: w.title
700
+ };
701
+ }), shallow);
702
+ const state = useAreasStore((state2) => state2);
703
+ const theme = useTheme();
704
+ const {
705
+ maximizeLayout
706
+ } = useAreasStore((state2) => state2.areaActions);
707
+ const onTouched = (layoutId) => {
708
+ maximizeLayout(areaId, layoutId);
709
+ };
710
+ console.log("windowsPopUps", windowsPopUps);
711
+ console.log("areaId", areaId);
712
+ console.log("state", state);
713
+ const menuActions = windowsPopUps ? windowsPopUps.map((element) => {
714
+ return {
715
+ onClick: () => onTouched(element.i),
716
+ label: element.title,
717
+ urlIcon: element.url_icon
718
+ };
719
+ }) : null;
720
+ if (menuActions && menuActions.length > 0) {
721
+ return /* @__PURE__ */ jsx(MenuActions, {
722
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.POPUP}`,
723
+ arrowType: "no-arrow",
724
+ marginTop: "12px!important",
725
+ marginLeft: "14px!important",
726
+ anchorOrigin: {
727
+ vertical: "bottom",
728
+ horizontal: "right"
729
+ },
730
+ transformOrigin: {
731
+ vertical: "top",
732
+ horizontal: "right"
733
+ },
734
+ menuActions,
735
+ className: areasViewerClasses.areasWindowPopUpList,
736
+ menuActionSx: theme.components?.M4LAreasViewerWindowPopUpList?.styleOverrides,
737
+ withBadge: true,
738
+ badgeContent: menuActions.length.toString()
739
+ });
740
+ } else {
741
+ return null;
742
+ }
743
+ };
662
744
  function Header(props) {
663
745
  const {
664
746
  areaId,
665
747
  windowId,
666
748
  emergeType
667
749
  } = props;
668
- const [url_icon, title, moduleActions, onClose, version, singleId] = useAreasStore((state) => {
750
+ const [url_icon, title, moduleActions, onClose, version, windowOptions, colapsed] = useAreasStore((state) => {
669
751
  const window2 = state.hashWindows[windowId];
670
- return [window2.url_icon, window2.title, window2.moduleActions, window2.onClose, window2.version, state.hashAreas[areaId].singleId];
752
+ return [window2.url_icon, window2.title, window2.moduleActions, window2.onClose, window2.version, window2.windowOptions, window2.colapsed];
671
753
  }, shallow);
672
754
  const {
673
755
  saveModuleCookies,
674
756
  resetModuleCookies
675
757
  } = useAreasStore((state) => state.windowActions, shallow);
758
+ const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId, shallow);
676
759
  const {
677
760
  maximizeLayout,
678
- normalizeLayouts
761
+ normalizeLayouts,
762
+ colapseLayoutItem,
763
+ unColapseLayoutItem
679
764
  } = useAreasStore((state) => state.areaActions, shallow);
680
765
  const {
681
766
  host_static_assets,
@@ -683,131 +768,261 @@ function Header(props) {
683
768
  } = useEnvironment();
684
769
  const isDesktop = useResponsiveDesktop();
685
770
  const isSkeleton = useModuleSkeleton();
771
+ useModuleDictionary();
686
772
  const urlPrefix = `${host_static_assets}/${environment_assets}`;
687
773
  const menuActions = useMemo(() => {
688
- return getMenuActions(windowId, isDesktop, moduleActions, urlPrefix, saveModuleCookies, resetModuleCookies, version);
774
+ return getMenuActions({
775
+ windowId,
776
+ isDesktop,
777
+ moduleActions,
778
+ urlPrefix,
779
+ saveModuleCookies,
780
+ resetModuleCookies,
781
+ version,
782
+ windowOptions
783
+ });
689
784
  }, [moduleActions, isDesktop]);
690
785
  const onCloseLocal = () => {
691
786
  onClose && onClose(windowId);
692
787
  };
693
788
  const maxNormalize = () => {
694
- if (singleId) {
789
+ if (maximizedId === windowId) {
695
790
  normalizeLayouts(areaId);
696
791
  } else {
697
792
  maximizeLayout(areaId, windowId);
698
793
  }
699
794
  };
795
+ const colapedToggle = () => {
796
+ console.log("Toggle", colapsed);
797
+ if (!colapsed) {
798
+ colapseLayoutItem(areaId, windowId);
799
+ } else {
800
+ unColapseLayoutItem(areaId, windowId);
801
+ }
802
+ };
700
803
  if (isSkeleton) {
701
804
  return /* @__PURE__ */ jsx(SKTModuleHeader, {});
702
805
  }
703
806
  return /* @__PURE__ */ jsxs("div", {
704
807
  className: clsx(areasViewerClasses.windowHeader, "m4l_draggable_handle"),
705
- children: [/* @__PURE__ */ jsx(Icon, {
706
- src: url_icon,
707
- size: "medium"
708
- }), /* @__PURE__ */ jsx(Typography, {
709
- className: areasViewerClasses.windowHeaderTitle,
710
- variant: "h5",
711
- children: `${title}`
712
- }), /* @__PURE__ */ jsx(MainActions, {
713
- windowId
714
- }), isDesktop && emergeType === "layout" && /* @__PURE__ */ jsx(IconButton, {
715
- onClick: maxNormalize,
716
- "aria-label": "click",
717
- 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}`
718
- }), menuActions.length > 0 && /* @__PURE__ */ jsx(MenuActions, {
719
- arrowType: "no-arrow",
720
- marginTop: "12px!important",
721
- marginLeft: "14px!important",
722
- anchorOrigin: {
723
- vertical: "bottom",
724
- horizontal: "right"
725
- },
726
- transformOrigin: {
727
- vertical: "top",
728
- horizontal: "right"
729
- },
730
- menuActions
731
- }), onClose && /* @__PURE__ */ jsx(IconButton, {
732
- onClick: onCloseLocal,
733
- "aria-label": "click",
734
- src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CLOSE}`
735
- })]
736
- });
737
- }
738
- const WrapperLinearProgress = styled$1("div")(() => ({
739
- width: "70%",
740
- margin: "auto auto",
741
- position: "absolute"
742
- }));
743
- const WrapperFallBackNotFound = styled$1("div")(({
744
- theme
745
- }) => ({
746
- width: "100%",
747
- height: "100%",
748
- display: "flex",
749
- flexDirection: "column",
750
- justifyContent: "center",
751
- alignItems: "center",
752
- gap: theme.spacing(3)
753
- }));
754
- function FallBackNotFound(props) {
755
- const {
756
- setNetworkRefresh
757
- } = props;
758
- const {
759
- getLabel
760
- } = useModuleDictionary();
761
- const {
762
- host_static_assets,
763
- environment_assets
764
- } = useEnvironment();
765
- const handlerClick = () => {
766
- setNetworkRefresh((prop) => !prop);
767
- };
768
- return /* @__PURE__ */ jsxs(WrapperFallBackNotFound, {
769
- children: [/* @__PURE__ */ jsx(m.div, {
770
- variants: varBounce().in,
771
- children: /* @__PURE__ */ jsx(Typography$1, {
772
- variant: "h3",
773
- paragraph: true,
774
- children: getLabel("loading_mf_title")
775
- })
776
- }), /* @__PURE__ */ jsx(Typography$1, {
777
- sx: {
778
- color: "text.secondary"
779
- },
780
- children: getLabel("loading_mf_description")
781
- }), /* @__PURE__ */ jsx(m.div, {
782
- variants: varBounce().in,
783
- children: /* @__PURE__ */ jsx(Image, {
784
- src: `${host_static_assets}/${environment_assets}/frontend/domain/host/commons/assets/img/illustration_noauth.png`,
785
- ratio: "1:1"
786
- })
787
- }), /* @__PURE__ */ jsx(Button, {
788
- size: "medium",
789
- variant: "contained",
790
- onClick: handlerClick,
791
- children: getLabel("loading_mf_intro")
808
+ children: [/* @__PURE__ */ jsx(LinearProgressIndeterminate, {}), /* @__PURE__ */ jsxs("div", {
809
+ className: areasViewerClasses.windowHeaderContent,
810
+ children: [/* @__PURE__ */ jsx(Icon, {
811
+ src: url_icon,
812
+ size: "medium"
813
+ }), /* @__PURE__ */ jsx(Typography, {
814
+ className: areasViewerClasses.windowHeaderTitle,
815
+ variant: "h5",
816
+ children: `${title}`
817
+ }), /* @__PURE__ */ jsx(MainActions, {
818
+ windowId
819
+ }), emergeType === "layout" ? /* @__PURE__ */ jsx(WindowPopUpsList, {
820
+ areaId,
821
+ windowId
822
+ }) : null, menuActions.length > 0 && /* @__PURE__ */ jsx(MenuActions, {
823
+ arrowType: "no-arrow",
824
+ marginTop: "12px!important",
825
+ marginLeft: "14px!important",
826
+ anchorOrigin: {
827
+ vertical: "bottom",
828
+ horizontal: "right"
829
+ },
830
+ transformOrigin: {
831
+ vertical: "top",
832
+ horizontal: "right"
833
+ },
834
+ menuActions
835
+ }), !colapsed && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
836
+ onClick: maxNormalize,
837
+ "aria-label": "click",
838
+ src: maximizedId === windowId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`
839
+ }), !maximizedId && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
840
+ onClick: colapedToggle,
841
+ "aria-label": "click",
842
+ src: !colapsed ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.COLAPSE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.UNCOLPASE}`,
843
+ dictionaryTooltipId: "pendiente"
844
+ }), onClose && /* @__PURE__ */ jsx(IconButton, {
845
+ onClick: onCloseLocal,
846
+ "aria-label": "click",
847
+ src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.CLOSE}`
848
+ })]
792
849
  })]
793
850
  });
794
851
  }
795
- const LoadingMF = (props) => {
852
+ const ProggessLoadingMF = (props) => {
796
853
  const {
797
- loadingProgress,
798
- setNetworkRefresh
854
+ loadingProgress
799
855
  } = props;
800
- if (loadingProgress !== -1) {
801
- return /* @__PURE__ */ jsx(WrapperLinearProgress, {
802
- id: "WrapperLinearProgress",
856
+ if (loadingProgress >= 0 && loadingProgress <= 100) {
857
+ return /* @__PURE__ */ jsx("div", {
858
+ className: areasViewerClasses.containerLinearProgress,
803
859
  children: /* @__PURE__ */ jsx(LinearProgress, {
804
860
  variant: "determinate",
805
861
  value: loadingProgress
806
862
  })
807
863
  });
864
+ } else {
865
+ console.log("LoadingMF***************************************", loadingProgress);
866
+ }
867
+ return null;
868
+ };
869
+ class ObservableLoaderMF {
870
+ constructor(host, scriptId, networkOperation, isRemote) {
871
+ __publicField(this, "host");
872
+ __publicField(this, "isRemote");
873
+ __publicField(this, "eventStatus");
874
+ __publicField(this, "scriptId");
875
+ __publicField(this, "networkOperation");
876
+ __publicField(this, "subscribers");
877
+ this.host = host;
878
+ this.subscribers = [];
879
+ this.scriptId = scriptId;
880
+ this.networkOperation = networkOperation;
881
+ this.isRemote = isRemote;
882
+ this.eventStatus = "progress";
883
+ console.log("ObservableLoaderMF constructor", this.host, scriptId);
884
+ this.start = this.start.bind(this);
885
+ this.subscribe = this.subscribe.bind(this);
886
+ this.unsubscribe = this.unsubscribe.bind(this);
887
+ this.notify = this.notify.bind(this);
888
+ this.tryAgain = this.tryAgain.bind(this);
889
+ setTimeout(this.start, 100);
890
+ }
891
+ tryAgain() {
892
+ console.log("start tryAgain");
893
+ if (this.eventStatus === "error") {
894
+ setTimeout(this.start, 100);
895
+ new Promise((resolve) => {
896
+ resolve("ok");
897
+ }).then(() => {
898
+ this.start();
899
+ });
900
+ }
901
+ console.log("end tryAgain");
902
+ }
903
+ async start() {
904
+ let percentCompleted = 0;
905
+ this.notify("progress", percentCompleted);
906
+ console.log("ObservableLoaderMF start", this.host);
907
+ const manifest = await fetch(`${this.host}/manifest.json?rnd=${Math.random()}`).then((res) => res.json()).catch(() => {
908
+ console.debug("Error fetching manifest", `${this.host}/manifest.json`);
909
+ setTimeout(() => this.notify("error", 0), 300);
910
+ return void 0;
911
+ });
912
+ console.log("ObservableLoaderMF cargado de manifest");
913
+ if (!manifest) {
914
+ return;
915
+ }
916
+ percentCompleted = 10;
917
+ this.notify("progress", percentCompleted);
918
+ const urlFile = `${this.host}/${manifest["src/index.tsx"]["file"]}?rnd=${Math.random()}`;
919
+ console.log("ObservableLoaderMF file", urlFile);
920
+ const controller = new AbortController();
921
+ const ret = await this.networkOperation({
922
+ method: "GET",
923
+ endPoint: urlFile,
924
+ isRemote: this.isRemote,
925
+ headers: { "Content-Type": "application/json" },
926
+ onDownloadProgress: (progressEvent) => {
927
+ try {
928
+ if (progressEvent.lengthComputable) {
929
+ percentCompleted = 10 + Math.round(progressEvent.loaded * 90 / progressEvent.total);
930
+ } else {
931
+ percentCompleted = 10 + progressEvent.loaded / 15e5 * 90;
932
+ if (percentCompleted > 95)
933
+ percentCompleted = 95;
934
+ }
935
+ } catch (error) {
936
+ }
937
+ this.notify("progress", percentCompleted);
938
+ },
939
+ isExternalUrl: true,
940
+ responseType: "text",
941
+ signal: controller.signal
942
+ }).then(() => {
943
+ return "ok";
944
+ }).catch(() => {
945
+ this.notify("error", 0);
946
+ return "error";
947
+ });
948
+ if (ret == "ok") {
949
+ const script = document.createElement("script");
950
+ const startTime = new Date().getTime();
951
+ script.id = this.scriptId;
952
+ script.crossOrigin = "";
953
+ script.type = "module";
954
+ script.src = urlFile || "";
955
+ script.onload = () => {
956
+ console.debug("Completed", new Date().getTime(), new Date().getTime() - startTime);
957
+ this.notify("complete", 100);
958
+ };
959
+ document.head.appendChild(script);
960
+ console.debug("Script appened", startTime);
961
+ }
808
962
  }
809
- return /* @__PURE__ */ jsx(FallBackNotFound, {
810
- setNetworkRefresh
963
+ subscribe(subscriber) {
964
+ this.subscribers.push(subscriber);
965
+ this.tryAgain();
966
+ }
967
+ unsubscribe(subscriber) {
968
+ console.log("unsubscribe", subscriber);
969
+ const index = this.subscribers.indexOf(subscriber);
970
+ if (index !== -1) {
971
+ this.subscribers.splice(index, 1);
972
+ }
973
+ }
974
+ notify(newEvent, progress) {
975
+ this.eventStatus = newEvent;
976
+ this.subscribers.forEach((subscriber) => {
977
+ subscriber(newEvent, progress);
978
+ });
979
+ }
980
+ }
981
+ const AreasLoadingError = (props) => {
982
+ const {
983
+ status,
984
+ action
985
+ } = props;
986
+ const {
987
+ host_static_assets,
988
+ environment_assets
989
+ } = useEnvironment();
990
+ const {
991
+ getLabel
992
+ } = useModuleDictionary();
993
+ console.log("test status view", status);
994
+ return /* @__PURE__ */ jsx("div", {
995
+ className: areasViewerClasses.areasLoadingErrorRoot,
996
+ children: status !== "error" ? /* @__PURE__ */ jsx("div", {
997
+ className: areasViewerClasses.areasLoadingErrorLoading,
998
+ children: /* @__PURE__ */ jsx(LinearProgressIndeterminate, {})
999
+ }) : /* @__PURE__ */ jsxs("div", {
1000
+ className: areasViewerClasses.areasLoadingError,
1001
+ children: [/* @__PURE__ */ jsx(Icon, {
1002
+ className: areasViewerClasses.areasLoadingErrorIcon,
1003
+ src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NAVIGATE_ERROR}`
1004
+ }), /* @__PURE__ */ jsx(Typography, {
1005
+ variant: "h3",
1006
+ skeletonWidth: "100px",
1007
+ className: areasViewerClasses.areasLoadingErrorTitle,
1008
+ children: getLabel(getAreasDictionary(DICCTIONARY.area_error_title))
1009
+ }), /* @__PURE__ */ jsx(Typography, {
1010
+ variant: "subtitle",
1011
+ skeletonWidth: "100px",
1012
+ className: areasViewerClasses.areasLoadingErrorDescription,
1013
+ children: getLabel(getAreasDictionary(DICCTIONARY.area_error_description))
1014
+ }), /* @__PURE__ */ jsx("div", {
1015
+ className: areasViewerClasses.areasLoadingErrorDivider
1016
+ }), /* @__PURE__ */ jsx(Typography, {
1017
+ variant: "paragraph",
1018
+ skeletonWidth: "100px",
1019
+ className: areasViewerClasses.areasLoadingErrorTextAction,
1020
+ children: getLabel(getAreasDictionary(DICCTIONARY.area_error_recommendation))
1021
+ }), /* @__PURE__ */ jsx(Button, {
1022
+ onClick: action,
1023
+ children: getLabel(getAreasDictionary(DICCTIONARY.area_error_intro))
1024
+ })]
1025
+ })
811
1026
  });
812
1027
  };
813
1028
  function getDivScritId(prefix, moduleId) {
@@ -837,14 +1052,12 @@ function MFLoader(props) {
837
1052
  const environment = useEnvironment();
838
1053
  const hostTools = useHostTools();
839
1054
  const formatter = useFormatter();
840
- const [isLoading, setIsLoading] = useState(true);
841
- const [networkProgress, setNetworkProgress] = useState(-1);
842
- const [_networkRefresh, setNetworkRefresh] = useState(false);
1055
+ const [statusLoader, setStatusLoader] = useState("progress");
1056
+ const [loadingProgress, setLoadingProgress] = useState(-1);
843
1057
  const {
844
1058
  currentLocale
845
1059
  } = useLocales();
846
1060
  const [divScript, setDivScript] = useState(getDivScritId(prefix, moduleId));
847
- const refTime = useRef(0);
848
1061
  const isFirstRender = useFirstRender([moduleId]);
849
1062
  const final_host = environment.isLocalhost ? `https://localhost:${debug_port}` : `https://${window.location.host}/mf/${moduleId}`;
850
1063
  function cleanUp(dScript) {
@@ -868,7 +1081,6 @@ function MFLoader(props) {
868
1081
  }
869
1082
  const renderMicroFrontend = useCallback((newDScript) => {
870
1083
  try {
871
- setIsLoading(false);
872
1084
  window[`render_${prefix}_${newDScript.moduleId}`](newDScript.divContainerId, environment, hostTools, currentLocale, {
873
1085
  hostThemeOptions,
874
1086
  fnComponentsOverrides
@@ -893,103 +1105,49 @@ function MFLoader(props) {
893
1105
  return () => {
894
1106
  };
895
1107
  }, [moduleId]);
1108
+ const tryAgainOnError = useCallback(() => {
1109
+ window[`observable_${prefix}_${moduleId}`]?.tryAgain();
1110
+ }, []);
896
1111
  useEffect(() => {
897
- setIsLoading(true);
898
- let mounted = true;
899
- const controller = new AbortController();
900
1112
  const dsScript = {
901
1113
  ...divScript
902
1114
  };
903
- const loadIfNotLoaded = async () => {
904
- if (!window[`render_${prefix}_${moduleId}`]) {
905
- let urlFile = "";
906
- setNetworkProgress(0);
907
- const manifest = await fetch(`${final_host}/manifest.json?rnd=${Math.random()}`).then((res) => res.json()).catch(() => {
908
- console.debug("Error fetching manifest", `${final_host}/manifest.json`);
909
- return void 0;
910
- });
911
- if (!manifest) {
912
- return;
913
- }
914
- setNetworkProgress(10);
915
- if (mounted) {
916
- urlFile = `${final_host}/${manifest["src/index.tsx"]["file"]}?rnd=${Math.random()}`;
917
- refTime.current = 0;
918
- await networkOperation({
919
- method: "GET",
920
- endPoint: urlFile,
921
- isRemote: !environment.isLocalhost,
922
- headers: {
923
- "Content-Type": "application/json"
924
- },
925
- onDownloadProgress: (progressEvent) => {
926
- let percentCompleted = 0;
927
- try {
928
- if (progressEvent.lengthComputable) {
929
- percentCompleted = 10 + Math.round(progressEvent.loaded * 90 / progressEvent.total);
930
- } else {
931
- if (refTime.current === 0) {
932
- refTime.current = new Date().getTime();
933
- }
934
- percentCompleted = 10 + progressEvent.loaded / 15e5 * 90;
935
- if (percentCompleted > 95)
936
- percentCompleted = 95;
937
- }
938
- } catch (error) {
939
- }
940
- if (mounted) {
941
- setNetworkProgress(percentCompleted);
942
- }
943
- },
944
- isExternalUrl: true,
945
- responseType: "text",
946
- signal: controller.signal
947
- }).then(() => {
948
- if (mounted) {
949
- setNetworkProgress(100);
950
- }
951
- }).catch(() => {
952
- });
953
- if (mounted) {
954
- const script = document.createElement("script");
955
- script.id = divScript.scriptId;
956
- script.crossOrigin = "";
957
- script.type = "module";
958
- script.src = urlFile || "";
959
- script.onload = () => {
960
- if (mounted) {
961
- console.debug("Script loaded", new Date().getTime());
962
- setNetworkProgress(100);
963
- renderMicroFrontend(dsScript);
964
- }
965
- };
966
- document.head.appendChild(script);
967
- console.debug("Script appened", new Date().getTime());
968
- }
969
- }
970
- } else {
971
- if (mounted) {
972
- renderMicroFrontend(dsScript);
973
- }
1115
+ const observableDownload = (event, progress) => {
1116
+ setLoadingProgress(progress);
1117
+ setStatusLoader(event);
1118
+ if (event === "complete") {
1119
+ renderMicroFrontend(dsScript);
974
1120
  }
975
1121
  };
976
- loadIfNotLoaded();
1122
+ if (!window[`render_${prefix}_${moduleId}`]) {
1123
+ let observableLoaderMF;
1124
+ if (!window[`observable_${prefix}_${moduleId}`]) {
1125
+ observableLoaderMF = new ObservableLoaderMF(final_host, dsScript.scriptId, networkOperation, !environment.isLocalhost);
1126
+ window[`observable_${prefix}_${moduleId}`] = observableLoaderMF;
1127
+ } else {
1128
+ observableLoaderMF = window[`observable_${prefix}_${moduleId}`];
1129
+ }
1130
+ observableLoaderMF.subscribe(observableDownload);
1131
+ } else {
1132
+ setStatusLoader("complete");
1133
+ renderMicroFrontend(dsScript);
1134
+ }
977
1135
  return () => {
978
- mounted = false;
979
- controller.abort();
1136
+ window[`observable_${prefix}_${moduleId}`].unsubscribe(observableDownload);
980
1137
  cleanUp(dsScript);
981
1138
  };
982
1139
  }, [divScript]);
983
- return /* @__PURE__ */ jsxs(Fragment, {
984
- children: [/* @__PURE__ */ jsx("div", {
985
- id: divScript.divContainerId,
986
- style: {
987
- width: "100%",
988
- height: "100%"
989
- }
990
- }), isLoading ? /* @__PURE__ */ jsx(LoadingMF, {
991
- loadingProgress: networkProgress,
992
- setNetworkRefresh
1140
+ return /* @__PURE__ */ jsxs("div", {
1141
+ id: divScript.divContainerId,
1142
+ style: {
1143
+ width: "100%",
1144
+ height: "100%"
1145
+ },
1146
+ children: [statusLoader === "progress" ? /* @__PURE__ */ jsx(ProggessLoadingMF, {
1147
+ loadingProgress
1148
+ }) : null, statusLoader === "error" ? /* @__PURE__ */ jsx(AreasLoadingError, {
1149
+ status: statusLoader,
1150
+ action: tryAgainOnError
993
1151
  }) : null]
994
1152
  });
995
1153
  }
@@ -1022,8 +1180,7 @@ const Component = (props) => {
1022
1180
  };
1023
1181
  React__default.memo(Component);
1024
1182
  const WindowRoot = styled("div")`
1025
-
1026
- inset:0;
1183
+ inset: 0;
1027
1184
  position: absolute;
1028
1185
  display: flex;
1029
1186
  flex-direction: column;
@@ -1039,28 +1196,6 @@ const WindowRoot = styled("div")`
1039
1196
  }
1040
1197
 
1041
1198
  // windowHeader
1042
- & .${areasViewerClasses.windowHeader} {
1043
- display: flex;
1044
- gap: 4px;
1045
-
1046
- align-items: center;
1047
- position: relative;
1048
-
1049
- padding: 8px;
1050
- justify-content: end;
1051
- min-height: ${(props) => props.theme.spacing(5)} ;
1052
-
1053
- border-bottom: 1px solid ${(props) => props.theme.palette.divider},
1054
- overflow: hidden;
1055
- cursor: move;
1056
- height: 60px;
1057
-
1058
-
1059
-
1060
- > span: {
1061
- margin-right: 12px;
1062
- }
1063
- }
1064
1199
  /*
1065
1200
  &.${areasViewerClasses.loading} .${areasViewerClasses.windowHeader} {
1066
1201
  border-bottom: 2px solid red !important;
@@ -1084,13 +1219,16 @@ const WindowRoot = styled("div")`
1084
1219
  gap: 4px;
1085
1220
  }
1086
1221
 
1087
-
1088
1222
  // windowHeaderMainActions
1089
1223
  & .${areasViewerClasses.windowContent} {
1090
1224
  flex-grow: 1;
1091
1225
  position: relative;
1092
1226
  }
1093
1227
 
1228
+ & .${areasViewerClasses.windowContent}.${areasViewerClasses.colapsed} {
1229
+ display: none !important;
1230
+ prop1: juan;
1231
+ }
1094
1232
  // windowModalRoot
1095
1233
  & .${areasViewerClasses.windowModalRoot} {
1096
1234
  padding: 16px;
@@ -1107,37 +1245,29 @@ const WindowRoot = styled("div")`
1107
1245
  flex-direction: column;
1108
1246
  }
1109
1247
  // windowToastyContainer
1110
- & .${areasViewerClasses.windowToastyContainer}.${areasViewerClasses.success} {
1111
- background-color: ${(props) => props.theme.palette.success.main}
1248
+ & .${areasViewerClasses.windowToastyContainer}.${areasViewerClasses.success} {
1249
+ background-color: ${(props) => props.theme.palette.success.main};
1112
1250
  }
1113
1251
 
1114
1252
  // windowToastyMeesageButtonsContainer
1115
1253
  & .${areasViewerClasses.windowToastyMeesageButtonsContainer} {
1116
1254
  display: flex;
1117
-
1118
1255
  }
1119
1256
  & .MuiLinearProgress-root {
1120
1257
  width: 100%;
1121
1258
  }
1122
1259
 
1123
-
1124
-
1125
-
1126
1260
  // windowToastyMessage
1127
1261
  & .${areasViewerClasses.windowToastyMessage} {
1128
1262
  flex-grow: 1;
1129
1263
  }
1130
1264
 
1131
- // windowToastyContainer
1265
+ // windowToastyContainer
1132
1266
  & .${areasViewerClasses.windowToastyPin}.${areasViewerClasses.pinIn} {
1133
1267
  border: 1px solid red;
1134
1268
  }
1135
1269
 
1136
-
1137
-
1138
1270
  ${(props) => props.theme.components?.M4LAreasViewerWindow?.styleOverrides}
1139
-
1140
-
1141
1271
  `;
1142
1272
  function Toasty(props) {
1143
1273
  const {
@@ -1147,23 +1277,23 @@ function Toasty(props) {
1147
1277
  const toasty = useAreasStore((state) => state.hashWindows[windowId].hashToasties[toastyId], shallow);
1148
1278
  console.log("percentExecuted", toasty.percentExecuted, toasty.timer);
1149
1279
  const {
1150
- pinToasty,
1151
- closeToasty
1280
+ pinToast: pinToasty,
1281
+ closeToast: closeToasty
1152
1282
  } = useAreasStore((state) => state.windowActions, shallow);
1153
1283
  const {
1154
1284
  host_static_assets,
1155
1285
  environment_assets
1156
1286
  } = useEnvironment();
1157
- return /* @__PURE__ */ jsxs("div", {
1287
+ return /* @__PURE__ */ jsx("div", {
1158
1288
  className: clsx(areasViewerClasses.windowToastyContainer, areasViewerClasses[toasty.type]),
1159
- children: [toasty.timer ? /* @__PURE__ */ jsx(LinearProgress, {
1160
- variant: "determinate",
1161
- value: toasty.percentExecuted
1162
- }) : null, /* @__PURE__ */ jsxs("div", {
1289
+ children: /* @__PURE__ */ jsxs("div", {
1163
1290
  className: areasViewerClasses.windowToastyMeesageButtonsContainer,
1164
- children: [/* @__PURE__ */ jsx("div", {
1291
+ children: [/* @__PURE__ */ jsxs("div", {
1165
1292
  className: areasViewerClasses.windowToastyMessage,
1166
- children: toasty.message
1293
+ children: [toasty.timer ? /* @__PURE__ */ jsx(LinearProgress, {
1294
+ variant: "determinate",
1295
+ value: toasty.percentExecuted
1296
+ }) : null, toasty.message]
1167
1297
  }), /* @__PURE__ */ jsxs("div", {
1168
1298
  className: areasViewerClasses.windowToastyButtonsContainer,
1169
1299
  children: [/* @__PURE__ */ jsx(IconButton, {
@@ -1180,7 +1310,7 @@ function Toasty(props) {
1180
1310
  src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.TOASTY_CLOSE}`
1181
1311
  })]
1182
1312
  })]
1183
- })]
1313
+ })
1184
1314
  });
1185
1315
  }
1186
1316
  function Toasties(props) {
@@ -1193,46 +1323,53 @@ function Toasties(props) {
1193
1323
  }
1194
1324
  return /* @__PURE__ */ jsx("div", {
1195
1325
  className: areasViewerClasses.windowToastiesContainer,
1196
- children: tosties.map((t) => {
1197
- return /* @__PURE__ */ jsx(Toasty, {
1198
- windowId,
1199
- toastyId: t.id
1200
- }, t.id);
1326
+ children: /* @__PURE__ */ jsx("div", {
1327
+ className: areasViewerClasses.windowToastiesContainerTostys,
1328
+ children: tosties.map((t) => {
1329
+ return /* @__PURE__ */ jsx(Toasty, {
1330
+ windowId,
1331
+ toastyId: t.id
1332
+ }, t.id);
1333
+ })
1201
1334
  })
1202
1335
  });
1203
1336
  }
1204
1337
  const Window = (props) => {
1205
1338
  const {
1206
- emergeType,
1207
- windowId,
1208
- moduleId,
1209
- areaId
1339
+ areaId,
1340
+ windowId
1210
1341
  } = props;
1211
- const selected = useAreasStore((state) => emergeType === "layout" ? state.hashAreas[areaId].currentLayoutId : state.hashAreas[areaId].currentPopUpId) === windowId;
1212
- const wd = useAreasStore((state) => state.hashWindows[windowId], shallow);
1342
+ const [emergeType, moduleId, winType] = useAreasStore((state) => {
1343
+ return [state.hashWindows[windowId]?.emergeType, state.hashWindows[windowId]?.moduleId, state.hashWindows[windowId]?.winType];
1344
+ }, shallow);
1345
+ const selected = useAreasStore((state) => {
1346
+ return emergeType === "layout" ? state.hashAreas[areaId]?.currentLayoutId : state.hashAreas[areaId]?.currentPopUpId;
1347
+ }) === windowId;
1348
+ const mfProps = useAreasStore((state) => state.hashWindows[windowId]?.mfProps, shallow);
1349
+ const component = useAreasStore((state) => state.hashWindows[windowId]?.component, shallow);
1350
+ const loading = useAreasStore((state) => state.hashWindows[windowId]?.loading, shallow);
1351
+ const status = useAreasStore((state) => state.hashWindows[windowId]?.status, shallow);
1352
+ const colapsed = useAreasStore((state) => state.hashWindows[windowId]?.colapsed, shallow);
1353
+ const dynamicMFStore = useAreasStore((state) => state.hashWindows[windowId]?.dynamicMFStore, shallow);
1213
1354
  const {
1214
1355
  setActions,
1215
1356
  getCookie,
1216
1357
  getCookies,
1217
1358
  setCookie,
1218
1359
  close,
1219
- setLoading,
1220
- toasty
1360
+ startProgress,
1361
+ stopProgress,
1362
+ toast
1221
1363
  } = useAreasStore((state) => state.windowActions, shallow);
1222
1364
  const {
1223
- selectWindowPopUp,
1224
- selectWindowLayout
1225
- } = useAreasStore((state) => state.areaActions);
1365
+ selectLayout
1366
+ } = useAreasStore((state) => state.areaActions, shallow);
1226
1367
  const {
1227
1368
  loadCookiesFromApi
1228
- } = useAreasStore((state) => state.windowActions);
1369
+ } = useAreasStore((state) => state.windowActions, shallow);
1229
1370
  const onTouch = () => {
1230
1371
  if (!selected) {
1231
- if (emergeType === "popup") {
1232
- selectWindowPopUp(areaId, props.windowId);
1233
- } else if (emergeType === "layout") {
1234
- selectWindowLayout(areaId, props.windowId);
1235
- }
1372
+ selectLayout(areaId, props.windowId);
1236
1373
  }
1237
1374
  };
1238
1375
  const windowTools = useMemo(() => ({
@@ -1246,119 +1383,75 @@ const Window = (props) => {
1246
1383
  setCookie(windowId, id, type, cookie);
1247
1384
  },
1248
1385
  close: () => close(windowId),
1249
- setLoading: (isLoading) => {
1250
- setLoading(windowId, isLoading);
1251
- },
1252
- toasty: (toastyOptions) => {
1253
- toasty(windowId, toastyOptions);
1386
+ startProgress: () => startProgress(windowId),
1387
+ stopProgress: () => stopProgress(windowId),
1388
+ toast: (toastyOptions) => {
1389
+ toast(windowId, toastyOptions);
1254
1390
  }
1255
1391
  }), []);
1256
1392
  useEffect(() => {
1257
- loadCookiesFromApi(windowId);
1258
- }, []);
1259
- return /* @__PURE__ */ jsxs(WindowRoot, {
1393
+ if (status === "init") {
1394
+ loadCookiesFromApi(windowId);
1395
+ }
1396
+ }, [status]);
1397
+ console.log(
1398
+ `Window Render***#,selected:${selected}`,
1399
+ moduleId,
1400
+ status,
1401
+ loading
1402
+ );
1403
+ if (status === void 0) {
1404
+ return null;
1405
+ }
1406
+ return /* @__PURE__ */ jsx(WindowRoot, {
1260
1407
  role: "presentation",
1261
- className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null, wd.loading ? areasViewerClasses.loading : null),
1408
+ className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null, loading ? areasViewerClasses.loading : null),
1262
1409
  onMouseDown: onTouch,
1263
- children: [/* @__PURE__ */ jsx(Header, {
1264
- areaId,
1265
- windowId,
1266
- emergeType
1267
- }), /* @__PURE__ */ jsx(Toasties, {
1268
- windowId
1269
- }), /* @__PURE__ */ jsx("div", {
1270
- className: areasViewerClasses.windowContent,
1271
- children: wd.status === "init" ? /* @__PURE__ */ jsx("div", {
1272
- children: "BRUCE cargando"
1273
- }) : wd.winType === "microfrontend" ? /* @__PURE__ */ jsx(MemonizedMicroFrontend, {
1274
- moduleId,
1275
- dynamicMFStore: wd.dynamicMFStore,
1276
- windowTools,
1277
- ...wd.mfProps
1278
- }) : /* @__PURE__ */ jsx(Component, {
1279
- moduleId,
1280
- dynamicMFStore: wd.dynamicMFStore,
1281
- windowTools,
1282
- component: wd.component
1283
- })
1284
- })]
1285
- });
1286
- };
1287
- const MemonizedWindow = React__default.memo(Window);
1288
- const WindowPopUp = (props) => {
1289
- const {
1290
- areaId,
1291
- windowProps,
1292
- windowId
1293
- } = props;
1294
- const {
1295
- host_static_assets,
1296
- environment_assets
1297
- } = useEnvironment();
1298
- const {
1299
- selectWindowPopUp
1300
- } = useAreasStore((store) => store.areaActions);
1301
- const selectedPopUpId = useAreasStore((store) => store.hashAreas[areaId].currentPopUpId);
1302
- const zIndex = useAreasStore((store) => store.hashAreas[areaId].hashWindowsPopups[props.windowId].zIndex);
1303
- const isSelected = props.windowId === selectedPopUpId;
1304
- const onTouch = () => {
1305
- if (!isSelected) {
1306
- selectWindowPopUp(areaId, props.windowId);
1307
- }
1308
- };
1309
- return /* @__PURE__ */ jsx(DraggableWindow, {
1310
- handle: ".m4l_draggable_handle",
1311
- cancel: "",
1312
- defaultPosition: windowProps,
1313
- children: /* @__PURE__ */ jsx(ResizeableWindow, {
1314
- className: clsx(areasViewerClasses.windowPopupRoot, `${areasViewerClasses.windowPopupRoot}-${windowId}`),
1315
- width: windowProps.width,
1316
- height: windowProps.height,
1317
- style: {
1318
- zIndex,
1319
- position: "absolute"
1320
- },
1321
- onResizeStart: () => {
1322
- onTouch();
1323
- },
1324
- handle: (resizeHandle, ref) => /* @__PURE__ */ jsx("div", {
1325
- ref,
1326
- children: /* @__PURE__ */ jsx(Icon, {
1327
- src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.RESIZE}`,
1328
- className: `custom-handle custom-handle-${resizeHandle}`
1329
- })
1330
- }, resizeHandle),
1331
- children: /* @__PURE__ */ jsx(Window, {
1332
- ...props
1333
- })
1410
+ children: /* @__PURE__ */ jsxs("div", {
1411
+ className: areasViewerClasses.windowRootContainer,
1412
+ children: [/* @__PURE__ */ jsx(Header, {
1413
+ areaId,
1414
+ windowId,
1415
+ emergeType
1416
+ }), /* @__PURE__ */ jsx(Toasties, {
1417
+ windowId
1418
+ }), /* @__PURE__ */ jsxs("div", {
1419
+ className: clsx(areasViewerClasses.windowContent, colapsed ? areasViewerClasses.colapsed : null),
1420
+ children: [status === "init" ? /* @__PURE__ */ jsx(Fragment, {
1421
+ children: "...Brucee porr analizar Componente de carga"
1422
+ }) : null, status === "loaded" ? winType === "microfrontend" ? /* @__PURE__ */ jsx(MemonizedMicroFrontend, {
1423
+ moduleId,
1424
+ dynamicMFStore,
1425
+ windowTools,
1426
+ ...mfProps
1427
+ }) : /* @__PURE__ */ jsx(Component, {
1428
+ moduleId,
1429
+ dynamicMFStore,
1430
+ windowTools,
1431
+ component
1432
+ }) : null]
1433
+ })]
1334
1434
  })
1335
1435
  });
1336
1436
  };
1337
- const MemonizedWindowPopUp = React__default.memo(WindowPopUp);
1437
+ React__default.memo(Window);
1338
1438
  const ResponsiveGridLayout = WidthProvider(Responsive);
1339
- const GridLayout = (props) => {
1439
+ const AreaGridLayout = (props) => {
1340
1440
  const {
1341
1441
  areaId
1342
1442
  } = props;
1343
- const windowsLayouts = useAreasStore((state) => state.hashAreas[areaId].windowsLayouts, shallow);
1344
- const hashWindowsPopups = useAreasStore((state) => state.hashAreas[areaId].hashWindowsPopups, shallow);
1345
- const hashWindowsLayouts = useAreasStore((state) => state.hashAreas[areaId].hashWindowsLayouts, shallow);
1346
- const breakPointsLayouts = useAreasStore((state) => state.hashAreas[areaId].breakPointsLayouts, shallow);
1347
- const windowsPopUps = useAreasStore((state) => state.hashAreas[areaId].windowsPopUps, shallow);
1443
+ const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].hashLayoutItems, shallow);
1444
+ const layouts = useAreasStore((state) => state.hashAreas[areaId].layouts, shallow);
1445
+ const colapsedItems = useAreasStore((state) => state.hashAreas[areaId].colapsedItems, shallow);
1348
1446
  const breakpoints = useAreasStore((state) => state.hashAreas[areaId].breakpoints, shallow);
1349
- const viewMode = useAreasStore((state) => state.hashAreas[areaId].viewMode, shallow);
1447
+ const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId, shallow);
1350
1448
  const cols = useAreasStore((state) => state.hashAreas[areaId].cols, shallow);
1351
1449
  const {
1352
- onBreakpointsLayoutsChange
1450
+ onBreakpointsLayoutsChange,
1451
+ onContainerChange
1353
1452
  } = useAreasStore((state) => state.areaActions, shallow);
1354
- function onBreakpointChange(_newBreakpoint, _newCols) {
1355
- }
1356
- useEffect(() => {
1357
- setTimeout(() => {
1358
- window.dispatchEvent(new Event("resize"));
1359
- }, 100);
1360
- }, [viewMode, windowsLayouts]);
1361
- return /* @__PURE__ */ jsxs(
1453
+ console.debug("Window***", hashLayoutItems, layouts);
1454
+ return /* @__PURE__ */ jsx(
1362
1455
  ResponsiveGridLayout,
1363
1456
  {
1364
1457
  autoSize: false,
@@ -1366,54 +1459,37 @@ const GridLayout = (props) => {
1366
1459
  measureBeforeMount: true,
1367
1460
  resizeHandles: ["nw", "se"],
1368
1461
  className: clsx(areasViewerClasses.areaGridLayout, `${areasViewerClasses.areaGridLayout}-${areaId}`),
1369
- layouts: breakPointsLayouts,
1370
- onLayoutChange: (currentLayouts, newAllLayouts) => onBreakpointsLayoutsChange(areaId, currentLayouts, newAllLayouts),
1371
- onBreakpointChange,
1462
+ layouts,
1463
+ onLayoutChange: (layout, newLayouts) => onBreakpointsLayoutsChange(areaId, layout, newLayouts),
1464
+ layoutItemRender: (p) => {
1465
+ console.debug("layoutItemRender window", hashLayoutItems, p.i, p.type);
1466
+ if (hashLayoutItems.indexOf(p.i) === -1) {
1467
+ console.debug("NO EXISTE window", hashLayoutItems, p.i);
1468
+ return /* @__PURE__ */ jsx(Fragment, {});
1469
+ }
1470
+ if (p.type === "placeholder") {
1471
+ return /* @__PURE__ */ jsx("div", {
1472
+ children: "Place holder"
1473
+ });
1474
+ }
1475
+ return /* @__PURE__ */ jsx(Window, {
1476
+ windowId: p.i,
1477
+ areaId
1478
+ });
1479
+ },
1372
1480
  breakpoints,
1373
1481
  cols,
1374
1482
  rowHeight: ROW_HEIGTH_GRIDLAYOUT,
1375
- margin: [MARGIN_GRIDLAYOUT, MARGIN_GRIDLAYOUT],
1376
- containerPadding: [CONTAINER_PADDING_GRIDLAYOUT, CONTAINER_PADDING_GRIDLAYOUT],
1483
+ containerMargin: [MARGIN_GRIDLAYOUT, MARGIN_GRIDLAYOUT],
1484
+ containerPadding: [PADDING_GRIDLAYOUT, PADDING_GRIDLAYOUT],
1377
1485
  draggableHandle: ".m4l_draggable_handle",
1378
- onWidthChange: () => {
1379
- console.log("onWidthChange", areaId);
1486
+ onContainerChange: (e) => {
1487
+ onContainerChange(areaId, e);
1380
1488
  },
1381
1489
  preventCollision: false,
1382
1490
  verticalCompact: true,
1383
- children: [/* @__PURE__ */ jsx("div", {
1384
- className: areasViewerClasses.areaGridLayoutPopupsContainer,
1385
- "data-grid": {
1386
- i: "none",
1387
- x: 0,
1388
- y: 0,
1389
- w: 0,
1390
- h: 0,
1391
- maxW: 0,
1392
- maxH: 0,
1393
- minW: 0,
1394
- minH: 0,
1395
- static: true,
1396
- isDraggable: false,
1397
- isResizable: false
1398
- },
1399
- children: windowsPopUps.map((wp) => {
1400
- if (hashWindowsPopups[wp]) {
1401
- return /* @__PURE__ */ jsx(MemonizedWindowPopUp, {
1402
- ...hashWindowsPopups[wp]
1403
- }, hashWindowsPopups[wp].windowId);
1404
- }
1405
- return null;
1406
- })
1407
- }, "none"), windowsLayouts.map((l) => {
1408
- if (hashWindowsLayouts[l.i]) {
1409
- return /* @__PURE__ */ jsx("div", {
1410
- children: /* @__PURE__ */ jsx(MemonizedWindow, {
1411
- ...hashWindowsLayouts[l.i]
1412
- })
1413
- }, l.i);
1414
- }
1415
- return null;
1416
- })]
1491
+ maximizeId: maximizedId,
1492
+ colapsedItems
1417
1493
  }
1418
1494
  );
1419
1495
  };
@@ -1422,10 +1498,12 @@ const PanelWindows = (props) => {
1422
1498
  areaId
1423
1499
  } = props;
1424
1500
  const status = useAreasStore((state) => state.hashAreas[areaId].status);
1425
- const mode = useAreasStore((state) => state.hashAreas[areaId].viewMode);
1426
- const singleId = useAreasStore((state) => state.hashAreas[areaId].singleId);
1427
- const windowsLayouts = useAreasStore((state) => state.hashAreas[areaId].windowsLayouts, shallow);
1428
- const hashWindowsLayouts = useAreasStore((state) => state.hashAreas[areaId].hashWindowsLayouts, shallow);
1501
+ const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId);
1502
+ const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].hashLayoutItems.map((key) => ({
1503
+ i: key,
1504
+ url_icon: state.hashWindows[key].url_icon,
1505
+ title: state.hashWindows[key].title
1506
+ })), shallow);
1429
1507
  const {
1430
1508
  maximizeLayout
1431
1509
  } = useAreasStore((state) => state.areaActions);
@@ -1433,21 +1511,21 @@ const PanelWindows = (props) => {
1433
1511
  maximizeLayout(areaId, layoutId);
1434
1512
  };
1435
1513
  if (status === "loaded") {
1436
- if (mode !== "single" || windowsLayouts.length < 2) {
1514
+ if (!maximizedId || hashLayoutItems.length < 2) {
1437
1515
  return null;
1438
1516
  }
1439
1517
  return /* @__PURE__ */ jsx("div", {
1440
1518
  className: areasViewerClasses.panelWindowsRoot,
1441
- children: windowsLayouts.map((l) => {
1519
+ children: hashLayoutItems.map((kl) => {
1442
1520
  return /* @__PURE__ */ jsx("div", {
1443
- className: clsx(areasViewerClasses.panelWindowsButtonContainer, singleId === l.i ? areasViewerClasses.selected : null),
1521
+ className: clsx(areasViewerClasses.panelWindowsButtonContainer, maximizedId === kl.i ? areasViewerClasses.selected : null),
1444
1522
  children: /* @__PURE__ */ jsx(IconButton, {
1445
- src: hashWindowsLayouts[l.i].url_icon,
1523
+ src: kl.url_icon,
1446
1524
  size: "small",
1447
- onClick: () => onTouched(l.i),
1448
- tooltip: singleId !== l.i ? hashWindowsLayouts[l.i].title : void 0
1525
+ onClick: () => onTouched(kl.i),
1526
+ tooltip: maximizedId !== kl.i ? kl.title : void 0
1449
1527
  })
1450
- }, l.i);
1528
+ }, kl.i);
1451
1529
  })
1452
1530
  });
1453
1531
  } else {
@@ -1458,18 +1536,22 @@ const InnerForHooks = (props) => {
1458
1536
  const {
1459
1537
  areaId
1460
1538
  } = props;
1539
+ const isDesktop = useResponsiveDesktop();
1461
1540
  const status = useAreasStore((state) => state.hashAreas[areaId].status);
1541
+ console.debug("Area InnerForHooks***", status);
1462
1542
  return /* @__PURE__ */ jsxs("div", {
1463
1543
  className: clsx(areasViewerClasses.areaGridLayoutPanelContainer, `${areasViewerClasses.areaGridLayoutPanelContainer}-${areaId}`),
1464
1544
  children: [
1465
- status === "loaded" ? /* @__PURE__ */ jsx(GridLayout, {
1545
+ status === "loaded" ? /* @__PURE__ */ jsx(AreaGridLayout, {
1466
1546
  areaId
1467
- }) : /* @__PURE__ */ jsx("div", {
1468
- children: "Loading.. Intentar si falla."
1547
+ }) : /* @__PURE__ */ jsx(AreasLoadingError, {
1548
+ status,
1549
+ action: () => {
1550
+ }
1469
1551
  }),
1470
- /* @__PURE__ */ jsx(PanelWindows, {
1552
+ isDesktop ? /* @__PURE__ */ jsx(PanelWindows, {
1471
1553
  areaId
1472
- })
1554
+ }) : null
1473
1555
  ]
1474
1556
  });
1475
1557
  };
@@ -1480,25 +1562,11 @@ const Area = (props) => {
1480
1562
  } = props;
1481
1563
  const classesAreaRoot = useAreasStore((state) => state.viwerClasses.areaRoot);
1482
1564
  const status = useAreasStore((state) => state.hashAreas[areaId].status);
1483
- const {
1484
- resizeMaximixedLayout
1485
- } = useAreasStore((state) => state.areaActions, shallow);
1486
- const throttleResizeMaximixedLayout = throttle(() => {
1487
- console.log("throttleResizeMaximixedLayout", areaId);
1488
- resizeMaximixedLayout(areaId);
1489
- }, THROTTLE_RESIZE_TIME, {
1490
- leading: false
1491
- });
1492
- const onResize = useCallback((_target) => {
1493
- throttleResizeMaximixedLayout();
1494
- }, []);
1495
- const ref = useResizeObserver(onResize);
1496
1565
  if (status === "init") {
1497
1566
  return null;
1498
1567
  }
1499
1568
  return /* @__PURE__ */ jsx("div", {
1500
1569
  className: clsx(classesAreaRoot, selected ? areasViewerClasses.selected : null, status === "loading" ? areasViewerClasses.loading : null),
1501
- ref,
1502
1570
  children: /* @__PURE__ */ jsx(InnerForHooks, {
1503
1571
  areaId
1504
1572
  })
@@ -1540,7 +1608,6 @@ const WindowModal = (props) => {
1540
1608
  children: /* @__PURE__ */ jsx(ResizeableWindow, {
1541
1609
  width: props.windowProps?.width || 400,
1542
1610
  height: props.windowProps?.height || 300,
1543
- className: areasViewerClasses.windowModalRoot,
1544
1611
  handle: (resizeHandle, ref) => /* @__PURE__ */ jsx("div", {
1545
1612
  ref,
1546
1613
  children: /* @__PURE__ */ jsx(Icon, {
@@ -1585,16 +1652,20 @@ function AreasViewer() {
1585
1652
  const currentArea = useAreasStore((state) => state.currentAreaId);
1586
1653
  const status = useAreasStore((state) => state.ownerState.status);
1587
1654
  const classesRoot = useAreasStore((state) => state.viwerClasses.root);
1655
+ const {
1656
+ init
1657
+ } = useAreasStore((state) => state.areasActions);
1588
1658
  return /* @__PURE__ */ jsxs(Fragment, {
1589
1659
  children: [/* @__PURE__ */ jsx(AreasViewerRoot, {
1590
1660
  className: classesRoot,
1591
1661
  children: status === "loaded" ? areas.map((area) => {
1592
1662
  return /* @__PURE__ */ jsx(Area, {
1593
- areaId: area.id,
1594
- selected: currentArea === area.id
1595
- }, area.id);
1596
- }) : /* @__PURE__ */ jsx(Fragment, {
1597
- children: "Bruce cargando"
1663
+ areaId: area,
1664
+ selected: currentArea === area
1665
+ }, area);
1666
+ }) : /* @__PURE__ */ jsx(AreasLoadingError, {
1667
+ status,
1668
+ action: () => init()
1598
1669
  })
1599
1670
  }), windowsModals.map((wm) => {
1600
1671
  if (hashWindowsModals[wm]) {
@@ -1608,6 +1679,5 @@ function AreasViewer() {
1608
1679
  }
1609
1680
  export {
1610
1681
  AreasViewer as A,
1611
- areasViewerClasses as a,
1612
1682
  useAreasViewerUtilityClasses as u
1613
1683
  };