@m4l/components 0.2.35 → 0.2.36

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 (520) hide show
  1. package/@types/export.d.ts +274 -441
  2. package/@types/types.d.ts +25 -0
  3. package/assets/Logo/index.109a182d.js +38 -0
  4. package/components/AccountPopover/classes/types.d.ts +1 -1
  5. package/components/AccountPopover/index.a9dc9f92.js +332 -0
  6. package/components/AccountPopover/style.d.ts +2 -0
  7. package/components/AccountPopover/subcomponents/MyAvatar/types.d.ts +6 -6
  8. package/components/AccountPopover/subcomponents/PopOver/types.d.ts +8 -8
  9. package/components/AccountPopover/types.d.ts +3 -3
  10. package/components/AppBar/classes/types.d.ts +1 -1
  11. package/components/AppBar/index.7dee7427.js +93 -0
  12. package/components/AppBar/styles.d.ts +2 -0
  13. package/components/AppBar/tests/utils.d.ts +1 -1
  14. package/components/AppBar/types.d.ts +9 -9
  15. package/components/CommonActions/classes/types.d.ts +1 -1
  16. package/components/CommonActions/components/ActionCancel/{index.416cbf9b.js → index.46f636e9.js} +5 -13
  17. package/components/CommonActions/components/ActionFormCancel/{index.78267f7c.js → index.2b0bd50d.js} +30 -35
  18. package/components/CommonActions/components/ActionFormIntro/{index.dcb4d280.js → index.4f212c39.js} +19 -26
  19. package/components/CommonActions/components/ActionIntro/{index.094290fd.js → index.7406bd47.js} +16 -17
  20. package/components/CommonActions/components/Actions/{index.fa7ab18c.js → index.273645af.js} +30 -26
  21. package/components/CommonActions/components/Actions/index.d.ts +2 -1
  22. package/components/CommonActions/components/Actions/styles.d.ts +2 -0
  23. package/components/CommonActions/components/Actions/types.d.ts +2 -2
  24. package/components/CommonActions/tests/utils.d.ts +1 -1
  25. package/components/DataGrid/assets/icons/datagrid.svg +4 -4
  26. package/components/DataGrid/classes/types.d.ts +1 -1
  27. package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.cd6e553a.js → index.cee6b676.js} +11 -12
  28. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.0c439ac3.js → index.708f3fb5.js} +4 -12
  29. package/components/DataGrid/formatters/ColumnDateFormatter/{index.704db1ca.js → index.e00d0cf2.js} +4 -12
  30. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.c064bb07.js +23 -0
  31. package/components/DataGrid/formatters/ColumnNestedValueFormatter/{index.925387d2.js → index.880e743b.js} +4 -9
  32. package/components/DataGrid/formatters/ColumnPointsFormatter/{index.4335c26b.js → index.226cc583.js} +2 -5
  33. package/components/DataGrid/formatters/ColumnPriceFormatter/{index.d717405e.js → index.bf9d9e60.js} +2 -5
  34. package/components/DataGrid/formatters/ColumnSetCheckFormatter/{index.0b23ba88.js → index.4045b2f2.js} +13 -17
  35. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/{index.aeea65aa.js → index.a87302d1.js} +2 -5
  36. package/components/DataGrid/{index.abe0f9b9.js → index.304437ee.js} +257 -319
  37. package/components/DataGrid/styles.d.ts +2 -0
  38. package/components/DataGrid/subcomponents/Actions/index.f14590d2.js +595 -0
  39. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +8 -0
  40. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +2 -0
  41. package/components/DataGrid/subcomponents/editors/TextEditor/{index.eac1749c.js → index.3f0d9e28.js} +26 -25
  42. package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +6 -0
  43. package/components/DragResizeWindow/DragResizeWindow.d.ts +3 -3
  44. package/components/DragResizeWindow/classes/types.d.ts +1 -1
  45. package/components/DragResizeWindow/index.a9f25040.js +480 -0
  46. package/components/DragResizeWindow/styled.d.ts +2 -0
  47. package/components/DragResizeWindow/types.d.ts +4 -5
  48. package/components/DragResizeWindow/utils.d.ts +1 -1
  49. package/components/DynamicFilter/DynamicFilter.d.ts +1 -7
  50. package/components/DynamicFilter/constants.d.ts +3 -11
  51. package/components/DynamicFilter/dictionary.d.ts +1 -2
  52. package/components/DynamicFilter/dynamicFilterSlots.d.ts +112 -0
  53. package/components/DynamicFilter/helpers/formatToInitialFilters.d.ts +7 -0
  54. package/components/DynamicFilter/helpers/formatToRowFilter.d.ts +7 -0
  55. package/components/DynamicFilter/helpers/getPurgedInitialFiltersApplied.d.ts +11 -0
  56. package/components/DynamicFilter/index.48d809e2.js +2086 -0
  57. package/components/DynamicFilter/index.d.ts +1 -2
  58. package/components/DynamicFilter/store/DynamicFilterContext.d.ts +16 -0
  59. package/components/DynamicFilter/{contexts/DynamicFilterContext/store.d.ts → store/DynamicFilterStore.d.ts} +28 -60
  60. package/components/DynamicFilter/store/useDynamicFilterStore.d.ts +2 -0
  61. package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.d.ts +3 -0
  62. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index.d.ts +1 -0
  63. package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip.d.ts +10 -0
  64. package/components/DynamicFilter/subcomponents/AppliedFilters/AppliedFilters.d.ts +2 -0
  65. package/components/DynamicFilter/subcomponents/AppliedFilters/index.d.ts +1 -0
  66. package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.d.ts +5 -0
  67. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.d.ts +2 -0
  68. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index.d.ts +1 -0
  69. package/components/DynamicFilter/subcomponents/DynamicFilterBase/useDynamicFilterBase.d.ts +4 -0
  70. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/helpers.d.ts +14 -0
  71. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.d.ts +1 -0
  72. package/components/DynamicFilter/subcomponents/FieldTypes/DataTypeComponent.d.ts +7 -0
  73. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.d.ts +14 -0
  74. package/components/DynamicFilter/subcomponents/FieldTypes/FieldTypeInterface.d.ts +21 -0
  75. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers.d.ts +14 -0
  76. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.d.ts +21 -0
  77. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/helpers.d.ts +14 -0
  78. package/components/DynamicFilter/subcomponents/FieldTypes/fieldFactory.d.ts +7 -0
  79. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.d.ts +2 -0
  80. package/components/DynamicFilter/subcomponents/FilterActions/FilterActionsSkeleton.d.ts +2 -0
  81. package/components/DynamicFilter/subcomponents/FilterActions/index.d.ts +1 -0
  82. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +18 -0
  83. package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.d.ts +2 -0
  84. package/components/DynamicFilter/subcomponents/InputFilter/InputFilterSkeleton.d.ts +2 -0
  85. package/components/DynamicFilter/subcomponents/InputFilter/index.d.ts +1 -7
  86. package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.d.ts +40 -0
  87. package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.d.ts +2 -0
  88. package/components/DynamicFilter/subcomponents/PopoverFilter/index.d.ts +1 -14
  89. package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +24 -0
  90. package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.d.ts +7 -0
  91. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index.d.ts +1 -11
  92. package/components/DynamicFilter/subcomponents/PopoverMenuFields/usePopoverMenuFields.d.ts +9 -0
  93. package/components/DynamicFilter/types.d.ts +101 -30
  94. package/components/FieldLabel/classes/types.d.ts +1 -1
  95. package/components/FieldLabel/index.2622ee40.js +54 -0
  96. package/components/FieldLabel/styles.d.ts +2 -0
  97. package/components/GridLayout/{index.65470f01.js → index.b9c47a4c.js} +516 -468
  98. package/components/GridLayout/styles.d.ts +2 -0
  99. package/components/GridLayout/subcomponents/Griditem/index.69bc14e5.js +397 -0
  100. package/components/GridLayout/subcomponents/Responsive/{index.5b3e0521.js → index.094c1d09.js} +50 -31
  101. package/components/GridLayout/subcomponents/SizeProvider/{index.0328ad0a.js → index.e1d2df80.js} +34 -31
  102. package/components/HelperText/{index.7d2afdb3.js → index.81c5d349.js} +12 -21
  103. package/components/HelperText/styles.d.ts +2 -0
  104. package/components/Icon/{index.ad330e78.js → index.ee7b85c9.js} +67 -59
  105. package/components/Icon/styles.d.ts +4 -0
  106. package/components/Image/{index.b799c514.js → index.8cc036b1.js} +40 -75
  107. package/components/Image/styles.d.ts +2 -0
  108. package/components/Image/tests/utils.d.ts +1 -1
  109. package/components/Image/utils/getRatioValues.d.ts +1 -1
  110. package/components/LanguagePopover/index.72f316fc.js +187 -0
  111. package/components/LanguagePopover/styles.d.ts +6 -0
  112. package/components/LanguagePopover/tests/utils.d.ts +1 -1
  113. package/components/LinearProgressIndeterminate/classes/types.d.ts +1 -1
  114. package/components/LinearProgressIndeterminate/{index.c46da124.js → index.2ecd571e.js} +31 -19
  115. package/components/LinearProgressIndeterminate/styles.d.ts +2 -0
  116. package/components/Loadable/{index.e994fc3e.js → index.97fe63f9.js} +3 -8
  117. package/components/LoadingError/classes/types.d.ts +1 -1
  118. package/components/LoadingError/{index.ee29dd48.js → index.7aaba1cf.js} +30 -47
  119. package/components/LoadingError/styles.d.ts +2 -0
  120. package/components/LoadingError/types.d.ts +1 -1
  121. package/components/MFLoader/classes/types.d.ts +1 -1
  122. package/components/MFLoader/{index.3a37407c.js → index.40c419c0.js} +53 -69
  123. package/components/MFLoader/styles.d.ts +2 -0
  124. package/components/MFLoader/types.d.ts +4 -4
  125. package/components/ModalDialog/index.42349189.js +77 -0
  126. package/components/NavLink/{index.b75c91e1.js → index.9e847eb5.js} +21 -25
  127. package/components/NavLink/styles.d.ts +2 -0
  128. package/components/NavLink/tests/utils.d.ts +1 -1
  129. package/components/NavLink/types.d.ts +2 -2
  130. package/components/NoItemSelected/classes/types.d.ts +1 -1
  131. package/components/NoItemSelected/{index.3a479c64.js → index.5a8160fd.js} +17 -43
  132. package/components/NoItemSelected/styles.d.ts +5 -0
  133. package/components/ObjectLogs/index.6955149e.js +253 -0
  134. package/components/ObjectLogs/styles.d.ts +4 -0
  135. package/components/PDFViewer/classes/types.d.ts +1 -1
  136. package/components/PDFViewer/{index.88c6ff6a.js → index.47bb0928.js} +7 -18
  137. package/components/PDFViewer/styles.d.ts +2 -0
  138. package/components/Page/index.c1d4a319.js +114 -0
  139. package/components/PaperForm/classes/types.d.ts +1 -1
  140. package/components/PaperForm/{index.d08b43f6.js → index.9f6fd02d.js} +20 -63
  141. package/components/PaperForm/styles.d.ts +7 -0
  142. package/components/PaperForm/types.d.ts +1 -2
  143. package/components/Period/classes/types.d.ts +1 -1
  144. package/components/Period/{index.3f89d8a4.js → index.c6d1a95a.js} +108 -125
  145. package/components/Period/styles.d.ts +7 -0
  146. package/components/PrintingSystem/classes/types.d.ts +1 -1
  147. package/components/PrintingSystem/{index.27f1f209.js → index.f51a00f8.js} +45 -57
  148. package/components/PrintingSystem/styles.d.ts +2 -0
  149. package/components/PrintingSystem/subcomponents/BodyNode/index.6792c353.js +49 -0
  150. package/components/PrintingSystem/subcomponents/BodyNode/types.d.ts +1 -1
  151. package/components/PrintingSystem/subcomponents/ChartNode/{index.990e164c.js → index.eec6b4cd.js} +28 -32
  152. package/components/PrintingSystem/subcomponents/ChartNode/types.d.ts +1 -2
  153. package/components/PrintingSystem/subcomponents/DividerNode/index.e58467c9.js +20 -0
  154. package/components/PrintingSystem/subcomponents/DividerNode/types.d.ts +2 -3
  155. package/components/PrintingSystem/subcomponents/FooterNode/index.920b75c9.js +49 -0
  156. package/components/PrintingSystem/subcomponents/FooterNode/types.d.ts +1 -1
  157. package/components/PrintingSystem/subcomponents/GridNode/index.6c1ad53c.js +70 -0
  158. package/components/PrintingSystem/subcomponents/GridNode/types.d.ts +2 -2
  159. package/components/PrintingSystem/subcomponents/HeaderNode/index.e8b151ad.js +49 -0
  160. package/components/PrintingSystem/subcomponents/HeaderNode/types.d.ts +1 -1
  161. package/components/PrintingSystem/subcomponents/ImageNode/types.d.ts +2 -3
  162. package/components/PrintingSystem/subcomponents/Pager/types.d.ts +2 -2
  163. package/components/PrintingSystem/subcomponents/PaperNode/index.bf199422.js +30 -0
  164. package/components/PrintingSystem/subcomponents/PaperNode/types.d.ts +2 -2
  165. package/components/PrintingSystem/subcomponents/PropertyValueNode/index.44d436b9.js +47 -0
  166. package/components/PrintingSystem/subcomponents/PropertyValueNode/types.d.ts +2 -2
  167. package/components/PrintingSystem/subcomponents/QRImageNode/types.d.ts +2 -3
  168. package/components/PrintingSystem/subcomponents/SectionNode/index.879cf13d.js +49 -0
  169. package/components/PrintingSystem/subcomponents/SectionNode/types.d.ts +1 -1
  170. package/components/PrintingSystem/subcomponents/TextBoxNode/index.eb6af0ca.js +24 -0
  171. package/components/PrintingSystem/subcomponents/TextBoxNode/types.d.ts +2 -3
  172. package/components/PrintingSystem/utils/FactoryRender/types.d.ts +1 -1
  173. package/components/PrintingSystem/utils/PageRender/types.d.ts +1 -1
  174. package/components/PropertyValue/classes/types.d.ts +1 -1
  175. package/components/PropertyValue/index.5e59580c.js +264 -0
  176. package/components/PropertyValue/styles.d.ts +2 -0
  177. package/components/Resizeable/{index.cb5aad75.js → index.5e8e48b1.js} +16 -23
  178. package/components/ResizeableWindow/styles.d.ts +5 -0
  179. package/components/ScrollBar/classes/types.d.ts +1 -1
  180. package/components/ScrollBar/{index.7dfc2f29.js → index.4b965665.js} +31 -51
  181. package/components/ScrollBar/styles.d.ts +9 -0
  182. package/components/SideBar/context/sideBarContext/index.d.ts +4 -4
  183. package/components/SideBar/index.5d1f4a23.js +851 -0
  184. package/components/SideBar/styles.d.ts +20 -0
  185. package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/styles.d.ts +3 -0
  186. package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +4 -0
  187. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +2 -0
  188. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/styles.d.ts +2 -0
  189. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/styles.d.ts +9 -0
  190. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +2 -2
  191. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/styles.d.ts +2 -0
  192. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +22 -0
  193. package/components/SideBar/subcomponents/ContentMobile/styles.d.ts +3 -0
  194. package/components/SideBar/subcomponents/ContentMobile/subcomponents/types.d.ts +4 -4
  195. package/components/SideBar/tests/constants.d.ts +1 -1
  196. package/components/SideBar/tests/utils.d.ts +1 -1
  197. package/components/SideBar/types.d.ts +2 -2
  198. package/components/SplitLayout/SplitLayout.d.ts +1 -1
  199. package/components/SplitLayout/classes/types.d.ts +1 -1
  200. package/components/SplitLayout/{index.7302ceb3.js → index.15756f0f.js} +40 -29
  201. package/components/SplitLayout/styles.d.ts +4 -0
  202. package/components/SplitLayout/tests/utils.d.ts +1 -1
  203. package/components/ToastContainer/ToastContainer.d.ts +1 -1
  204. package/components/ToastContainer/classes/types.d.ts +1 -1
  205. package/components/ToastContainer/{index.4d44ce53.js → index.dbd78941.js} +14 -30
  206. package/components/ToastContainer/styles.d.ts +2 -0
  207. package/components/ToastContainer/subcomponents/ToastMessage/index.d.ts +1 -1
  208. package/components/ToastContainer/subcomponents/ToastMessage/types.d.ts +1 -1
  209. package/components/ToastContainer/types.d.ts +1 -1
  210. package/components/WrapperComponent/index.57964195.js +14 -0
  211. package/components/animate/AnimatedScroll/styles.d.ts +6 -0
  212. package/components/animate/AnimatedScroll/types.d.ts +3 -3
  213. package/components/animate/LoadingScreen/{index.1d0c4307.js → index.1a83615a.js} +25 -39
  214. package/components/animate/LoadingScreen/styles.d.ts +7 -0
  215. package/components/animate/MotionContainer/index.3032bd8f.js +34 -0
  216. package/components/animate/MotionContainer/index.d.ts +9 -9
  217. package/components/animate/MotionLazyContainer/index.d.ts +2 -2
  218. package/components/animate/MotionLazyContainer/{index.572dd012.js → index.d2902a6c.js} +3 -9
  219. package/components/animate/PropagateLoader/{index.7fab43c8.js → index.76d7ea70.js} +4 -12
  220. package/components/animate/PropagateLoader/syles.d.ts +2 -0
  221. package/components/animate/{index.5d4575bc.js → index.87296638.js} +35 -56
  222. package/components/areas/components/AreasAdmin/index.f239c717.js +733 -0
  223. package/components/areas/components/AreasAdmin/styles.d.ts +5 -0
  224. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +4 -0
  225. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/types.d.ts +1 -1
  226. package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/index.d.ts +1 -1
  227. package/components/areas/components/AreasViewer/index.61e0538b.js +1071 -0
  228. package/components/areas/components/AreasViewer/styles.d.ts +2 -0
  229. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index.d.ts +1 -1
  230. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/styles.d.ts +2 -0
  231. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/styles.d.ts +3 -0
  232. package/components/areas/contexts/AreasContext/{index.c5a3b322.js → index.19c7b906.js} +32 -77
  233. package/components/areas/contexts/DynamicMFParmsContext/{index.1607c78e.js → index.3d9ad0ad.js} +3 -9
  234. package/components/areas/contexts/DynamicMFParmsContext/types.d.ts +2 -2
  235. package/components/areas/contexts/WindowToolsMFContext/{index.8f3e2a04.js → index.992ae7a3.js} +3 -11
  236. package/components/areas/contexts/WindowToolsMFContext/types.d.ts +29 -29
  237. package/components/areas/hooks/useAreas/{index.caa92660.js → index.cedd30ee.js} +1 -1
  238. package/components/areas/hooks/useDynamicMFParameters/{index.e52c5392.js → index.9e09e1e3.js} +2 -4
  239. package/components/areas/hooks/useWindowToolsMF/{index.b7afaf88.js → index.2fbae9dc.js} +1 -1
  240. package/components/areas/types.d.ts +17 -17
  241. package/components/commercial/AppBarCommercial/classes/types.d.ts +1 -1
  242. package/components/commercial/AppBarCommercial/{index.9cf586a2.js → index.9f654f8e.js} +10 -12
  243. package/components/commercial/AppBarCommercial/styles.d.ts +2 -0
  244. package/components/commercial/AppBarCommercial/types.d.ts +1 -1
  245. package/components/commercial/HamburgerMenu/classes/type.d.ts +1 -1
  246. package/components/commercial/HamburgerMenu/styles.d.ts +13 -0
  247. package/components/commercial/HamburgerMenu/test/utils.d.ts +1 -1
  248. package/components/commercial/HamburgerMenu/types.d.ts +1 -1
  249. package/components/commercial/SectionCommercial/classes/types.d.ts +1 -1
  250. package/components/commercial/SectionCommercial/{index.4dbfc0a7.js → index.3df4685b.js} +28 -19
  251. package/components/commercial/SectionCommercial/styles.d.ts +11 -0
  252. package/components/commercial/SectionCommercial/types.d.ts +3 -4
  253. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.d.ts +1 -1
  254. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/styles.d.ts +2 -0
  255. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/types.d.ts +1 -1
  256. package/components/commercial/TopBar/context/index.d.ts +1 -1
  257. package/components/commercial/TopBar/context/type.d.ts +2 -2
  258. package/components/commercial/TopBar/index.7aeb6ec0.js +234 -0
  259. package/components/commercial/TopBar/style.d.ts +2 -0
  260. package/components/commercial/TopBar/type.d.ts +2 -2
  261. package/components/commercial/TopBar/utils/isActive/index.d.ts +1 -1
  262. package/components/commercial/{index.89ad149c.js → index.b90488db.js} +40 -38
  263. package/components/formatters/BooleanFormatter/{index.9ccf9298.js → index.0c2d8e35.js} +20 -30
  264. package/components/formatters/DateFormatter/{index.578a9f53.js → index.2ef6f261.js} +5 -14
  265. package/components/formatters/FormatterRoot/styles.d.ts +2 -0
  266. package/components/formatters/FormatterRoot/types.d.ts +1 -1
  267. package/components/formatters/PointsFormatter/{index.8a4fa393.js → index.d8a4ee54.js} +4 -11
  268. package/components/formatters/PriceFormatter/{index.83cbe7be.js → index.97f75b4b.js} +5 -13
  269. package/components/formatters/UncertaintyFormatter/{index.08e1b79f.js → index.c3ffdebc.js} +8 -13
  270. package/components/formatters/{index.03471e3f.js → index.b816c6b6.js} +11 -34
  271. package/components/hook-form/HelperError/index.c8b046b7.js +19 -0
  272. package/components/hook-form/RHFAutocomplete/index.ea2ac2b1.js +408 -0
  273. package/components/hook-form/RHFAutocomplete/styles.d.ts +2 -0
  274. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +2 -0
  275. package/components/hook-form/RHFAutocompleteAsync/{index.bc278965.js → index.98dcf0de.js} +47 -45
  276. package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +5 -0
  277. package/components/hook-form/RHFAutocompleteAsync/tests/utils.d.ts +1 -1
  278. package/components/hook-form/RHFCheckbox/index.c32278fa.js +142 -0
  279. package/components/hook-form/RHFCheckbox/styles.d.ts +15 -0
  280. package/components/hook-form/RHFCheckbox/test/utils.d.ts +1 -1
  281. package/components/hook-form/RHFColorPicker/classes/types.d.ts +1 -1
  282. package/components/hook-form/RHFColorPicker/index.8c939bfd.js +191 -0
  283. package/components/hook-form/RHFColorPicker/styles.d.ts +2 -0
  284. package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/types.d.ts +2 -3
  285. package/components/hook-form/RHFColorPicker/types.d.ts +7 -7
  286. package/components/hook-form/RHFDateTime/classes/types.d.ts +1 -1
  287. package/components/hook-form/RHFDateTime/index.ac27deab.js +190 -0
  288. package/components/hook-form/RHFDateTime/styles.d.ts +2 -0
  289. package/components/hook-form/RHFDateTime/types.d.ts +1 -1
  290. package/components/hook-form/RHFMultiCheckbox/index.437e6ba3.js +34 -0
  291. package/components/hook-form/RHFPeriod/classes/types.d.ts +1 -1
  292. package/components/hook-form/RHFPeriod/index.70cfc422.js +104 -0
  293. package/components/hook-form/RHFPeriod/styles.d.ts +2 -0
  294. package/components/hook-form/RHFRadioGroup/index.11c0add8.js +35 -0
  295. package/components/hook-form/RHFRadioGroup/types.d.ts +1 -1
  296. package/components/hook-form/RHFSelect/index.c6c60ecc.js +29 -0
  297. package/components/hook-form/RHFTextField/index.fa97889a.js +325 -0
  298. package/components/hook-form/RHFTextField/styles.d.ts +3 -0
  299. package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +3 -0
  300. package/components/hook-form/RHFTextField/tests/utils.d.ts +1 -1
  301. package/components/hook-form/RHFTextFieldPassword/styles.d.ts +2 -0
  302. package/components/hook-form/RHFTextFieldPassword/tests/utils.d.ts +1 -1
  303. package/components/hook-form/RHFTextFieldPassword/types.d.ts +1 -2
  304. package/components/hook-form/RHFUpload/RHFUploadImage/classes/types.d.ts +1 -1
  305. package/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +2 -0
  306. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +2 -0
  307. package/components/hook-form/RHFUpload/index.c5e5c61c.js +258 -0
  308. package/components/maps/components/GpsTools/constants.d.ts +1 -1
  309. package/components/maps/components/GpsTools/contexts/GpsToolsContext/types.d.ts +3 -3
  310. package/components/maps/components/GpsTools/{index.d93188ad.js → index.4ea69dd1.js} +748 -767
  311. package/components/maps/components/GpsTools/styles.d.ts +2 -0
  312. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles.d.ts +1 -0
  313. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/types.d.ts +2 -2
  314. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/types.d.ts +1 -1
  315. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/types.d.ts +2 -2
  316. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.d.ts +1 -1
  317. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.d.ts +11 -0
  318. package/components/maps/components/GpsTools/types.d.ts +1 -1
  319. package/components/maps/components/Map/contexts/MapContext/helper.d.ts +1 -1
  320. package/components/maps/components/Map/contexts/MapContext/index.d.ts +1 -1
  321. package/components/maps/components/Map/contexts/MapContext/types.d.ts +6 -6
  322. package/components/maps/components/Map/external/googleMutant/index.d.ts +94 -94
  323. package/components/maps/components/Map/featureRenders/CommonFeatureRender/index.d.ts +1 -1
  324. package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/FeatureDivIconLabel/types.d.ts +1 -1
  325. package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/MarkerIconLabel/types.d.ts +2 -2
  326. package/components/maps/components/Map/featureRenders/MarkerFeatureRender/index.d.ts +1 -1
  327. package/components/maps/components/Map/hooks/useAutoFocus/types.d.ts +2 -2
  328. package/components/maps/components/Map/{index.accb1f77.js → index.62b7d09b.js} +731 -770
  329. package/components/maps/components/Map/index.d.ts +1 -1
  330. package/components/maps/components/Map/styled.d.ts +2 -0
  331. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.d.ts +1 -1
  332. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.d.ts +1 -1
  333. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.d.ts +1 -1
  334. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.d.ts +1 -1
  335. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +1 -1
  336. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/types.d.ts +1 -1
  337. package/components/maps/components/Map/subcomponents/Controls/types.d.ts +1 -1
  338. package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/types.d.ts +2 -2
  339. package/components/maps/components/Map/types.d.ts +2 -2
  340. package/components/maps/{index.34ab6a68.js → index.13bb982c.js} +1 -1
  341. package/components/maps/index.d.ts +2 -2
  342. package/components/maps/leaflet-geoman.d.ts +1476 -1633
  343. package/components/modal/WindowBase.2414cd02.js +44 -0
  344. package/components/modal/WindowConfirm/types.d.ts +4 -4
  345. package/components/modal/WindowConfirm.48140481.js +66 -0
  346. package/components/modal/classes/types.d.ts +1 -1
  347. package/components/modal/{index.61389369.js → index.81eb6def.js} +7 -1
  348. package/components/mui_extended/Accordion/classes/types.d.ts +1 -1
  349. package/components/mui_extended/Accordion/index.d08a0361.js +142 -0
  350. package/components/mui_extended/Accordion/styles.d.ts +4 -0
  351. package/components/mui_extended/Avatar/classes/types.d.ts +1 -1
  352. package/components/mui_extended/Avatar/{index.75e6ed57.js → index.fb9ad158.js} +26 -34
  353. package/components/mui_extended/Avatar/styles.d.ts +2 -0
  354. package/components/mui_extended/Avatar/tests/utils.d.ts +1 -1
  355. package/components/mui_extended/Badge/Badge.d.ts +1 -1
  356. package/components/mui_extended/Badge/classes/types.d.ts +1 -1
  357. package/components/mui_extended/Badge/{index.09f5aee5.js → index.2a3aef2c.js} +10 -16
  358. package/components/mui_extended/Badge/styles.d.ts +2 -0
  359. package/components/mui_extended/Badge/types.d.ts +1 -1
  360. package/components/mui_extended/BoxIcon/index.d61e7ac5.js +22 -0
  361. package/components/mui_extended/Breadcrumbs/index.4a44883c.js +87 -0
  362. package/components/mui_extended/Button/classes/types.d.ts +2 -2
  363. package/components/mui_extended/Button/{index.c3084916.js → index.5395d101.js} +71 -79
  364. package/components/mui_extended/Button/styles.d.ts +13 -0
  365. package/components/mui_extended/CheckBox/classes/types.d.ts +1 -1
  366. package/components/mui_extended/CheckBox/styles.d.ts +2 -0
  367. package/components/mui_extended/CheckBox/subcomponents/Skeleton/types.d.ts +1 -1
  368. package/components/mui_extended/CheckBox/types.d.ts +2 -2
  369. package/components/mui_extended/{CheckBox.2a3b86c5.js → CheckBox.256169f0.js} +23 -33
  370. package/components/mui_extended/CircularProgress/{index.ad569afd.js → index.967e70b7.js} +2 -4
  371. package/components/mui_extended/IconButton/{index.f8a3021b.js → index.b0ee4965.js} +42 -48
  372. package/components/mui_extended/IconButton/styles.d.ts +2 -0
  373. package/components/mui_extended/ImageButton/styles.d.ts +2 -0
  374. package/components/mui_extended/ImageButton/tests/utils.d.ts +1 -1
  375. package/components/mui_extended/LinearProgress/{index.c92b9ba9.js → index.4092bb69.js} +3 -7
  376. package/components/mui_extended/LinkWithRoute/index.288c51f3.js +15 -0
  377. package/components/mui_extended/LoadingButton/styles.d.ts +2 -0
  378. package/components/mui_extended/LoadingButton/tests/utils.d.ts +1 -1
  379. package/components/mui_extended/MenuActions/classes/types.d.ts +1 -1
  380. package/components/mui_extended/MenuActions/{index.90f53670.js → index.d92ed0d6.js} +68 -68
  381. package/components/mui_extended/MenuActions/styles.d.ts +30 -0
  382. package/components/mui_extended/Pager/classes/types.d.ts +1 -1
  383. package/components/mui_extended/Pager/{index.ea2a4f3e.js → index.1ba2d52b.js} +114 -112
  384. package/components/mui_extended/Pager/styles.d.ts +2 -0
  385. package/components/mui_extended/Pager/subcomponents/CustomTablePagination/types.d.ts +2 -2
  386. package/components/mui_extended/Pager/subcomponents/PagerActions/types.d.ts +1 -1
  387. package/components/mui_extended/Popover/index.4e7340b4.js +142 -0
  388. package/components/mui_extended/Popover/styles.d.ts +1 -0
  389. package/components/mui_extended/Popover/subcomponts/ArrowIcon/index.d.ts +3 -0
  390. package/components/mui_extended/Stack/Stack.d.ts +1 -1
  391. package/components/mui_extended/Stack/classes/types.d.ts +1 -1
  392. package/components/mui_extended/Stack/{index.0e53197c.js → index.fe363ca5.js} +3 -11
  393. package/components/mui_extended/Stack/styles.d.ts +11 -0
  394. package/components/mui_extended/Stack/types.d.ts +1 -1
  395. package/components/mui_extended/Tab/classes/types.d.ts +1 -1
  396. package/components/mui_extended/Tab/{index.9214d9cc.js → index.c5ad86e2.js} +41 -63
  397. package/components/mui_extended/Tab/styles.d.ts +3 -0
  398. package/components/mui_extended/TabContent/TabContent.d.ts +1 -1
  399. package/components/mui_extended/TabContent/classes/types.d.ts +1 -1
  400. package/components/mui_extended/TabContent/styles.d.ts +2 -0
  401. package/components/mui_extended/TabContent/types.d.ts +1 -1
  402. package/components/mui_extended/Tabs/classes/types.d.ts +1 -1
  403. package/components/mui_extended/Tabs/styles.d.ts +59 -0
  404. package/components/mui_extended/ToggleButton/ToggleButton.d.ts +1 -1
  405. package/components/mui_extended/ToggleButton/index.7fbc8614.js +18 -0
  406. package/components/mui_extended/ToggleIconButton/ToggleIconButton.d.ts +1 -1
  407. package/components/mui_extended/ToggleIconButton/{index.d9dbf650.js → index.0cd347b4.js} +13 -8
  408. package/components/mui_extended/ToggleIconButton/types.d.ts +2 -2
  409. package/components/mui_extended/Tooltip/classes/types.d.ts +1 -1
  410. package/components/mui_extended/Tooltip/{index.24a2bc3f.js → index.49bb5ee1.js} +12 -15
  411. package/components/mui_extended/Tooltip/types.d.ts +3 -3
  412. package/components/mui_extended/Typography/{index.379dd374.js → index.a1e774a2.js} +12 -26
  413. package/components/mui_extended/Typography/styles.d.ts +2 -0
  414. package/components/mui_extended/Typography/tests/utils.d.ts +1 -1
  415. package/components/popups/PopupsProvider/{index.d7409f48.js → index.8fb6232a.js} +12 -26
  416. package/components/popups/PopupsViewer/index.813854e4.js +171 -0
  417. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +4 -4
  418. package/components/popups/components/PopupsViewer/classes/types.d.ts +1 -1
  419. package/components/popups/components/PopupsViewer/styled.d.ts +2 -0
  420. package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +1 -1
  421. package/contexts/ModalContext/{index.2368bb19.js → index.45c275cd.js} +18 -19
  422. package/contexts/RHFormContext/classes/types.d.ts +1 -1
  423. package/contexts/RHFormContext/{index.7b2a8723.js → index.bf3a2812.js} +14 -20
  424. package/contexts/RHFormContext/styles.d.ts +2 -0
  425. package/hocs/index.d.ts +1 -0
  426. package/hocs/withToggle/{index.50aec5e4.js → index.548aeace.js} +3 -11
  427. package/hooks/useFormAddEdit/{index.000ce60b.js → index.9b27ca02.js} +37 -41
  428. package/hooks/useFormFocus/index.d.ts +2 -2
  429. package/hooks/useFormFocus/types.d.ts +1 -1
  430. package/hooks/useModal/{index.f73d7e42.js → index.30674bb7.js} +1 -1
  431. package/hooks/useSizeContainer/{index.62b4e0c4.js → index.3c48670c.js} +1 -1
  432. package/hooks/useTab/{index.976d5e1e.js → index.f7973779.js} +1 -1
  433. package/index.d.ts +2 -1
  434. package/index.js +136 -136
  435. package/package.json +11 -1
  436. package/{react-draggable.e4725f3a.js → react-draggable.79b4c69a.js} +1 -1
  437. package/{react-resizable.c07d63fb.js → react-resizable.af1f31c1.js} +2 -2
  438. package/styles/DynamicFilter.styles.d.ts +2 -0
  439. package/test/getNameDataTestId.0faeade8.js +10 -0
  440. package/test/getNameDataTestId.d.ts +10 -0
  441. package/utils/containerQuery.d.ts +2 -0
  442. package/utils/{index.6469f148.js → index.0718eeac.js} +4 -0
  443. package/utils/index.d.ts +1 -1
  444. package/vite-env.d.ts +4 -4
  445. package/assets/Logo/index.228dcb5a.js +0 -93
  446. package/components/AccountPopover/index.39efc8f0.js +0 -302
  447. package/components/AppBar/index.c8850b99.js +0 -109
  448. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.867b8745.js +0 -26
  449. package/components/DataGrid/subcomponents/Actions/index.4f2071ee.js +0 -663
  450. package/components/DragResizeWindow/index.13ef022e.js +0 -489
  451. package/components/DynamicFilter/classes/index.d.ts +0 -5
  452. package/components/DynamicFilter/classes/types.d.ts +0 -35
  453. package/components/DynamicFilter/contexts/DynamicFilterContext/helpers.d.ts +0 -23
  454. package/components/DynamicFilter/contexts/DynamicFilterContext/index.d.ts +0 -18
  455. package/components/DynamicFilter/contexts/DynamicFilterContext/types.d.ts +0 -5
  456. package/components/DynamicFilter/hooks/useDynamicFilter.d.ts +0 -2
  457. package/components/DynamicFilter/index.c52a8e96.js +0 -1954
  458. package/components/DynamicFilter/subcomponents/ApplyedFilters/index.d.ts +0 -6
  459. package/components/DynamicFilter/subcomponents/ApplyedFilters/subcomponents/ApplyedFilter/index.d.ts +0 -2
  460. package/components/DynamicFilter/subcomponents/ClearFilters/index.d.ts +0 -1
  461. package/components/DynamicFilter/subcomponents/FilterButton/index.d.ts +0 -11
  462. package/components/DynamicFilter/subcomponents/InnerForHooks/index.d.ts +0 -5
  463. package/components/DynamicFilter/subcomponents/PopoverMenuFields/types.d.ts +0 -6
  464. package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/helpers.d.ts +0 -39
  465. package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/index.d.ts +0 -5
  466. package/components/DynamicFilter/subcomponents/fieldstypes/DateTimeFilter/helpers.d.ts +0 -42
  467. package/components/DynamicFilter/subcomponents/fieldstypes/NumberFilter/helpers.d.ts +0 -36
  468. package/components/DynamicFilter/subcomponents/fieldstypes/SelectFilter/helpers.d.ts +0 -51
  469. package/components/DynamicFilter/subcomponents/fieldstypes/StringFilter/helpers.d.ts +0 -39
  470. package/components/DynamicFilter/subcomponents/fieldstypes/factory.d.ts +0 -82
  471. package/components/DynamicFilter/subcomponents/fieldstypes/validations.d.ts +0 -32
  472. package/components/DynamicFilter/tests/contants.d.ts +0 -5
  473. package/components/FieldLabel/index.0412576c.js +0 -82
  474. package/components/GridLayout/subcomponents/Griditem/index.30016fc1.js +0 -366
  475. package/components/LanguagePopover/index.93c48ec5.js +0 -196
  476. package/components/ModalDialog/index.78c9650a.js +0 -92
  477. package/components/ObjectLogs/index.1d85a021.js +0 -293
  478. package/components/Page/index.5d34dc4d.js +0 -127
  479. package/components/PrintingSystem/subcomponents/BodyNode/index.319a3bb9.js +0 -48
  480. package/components/PrintingSystem/subcomponents/DividerNode/index.e504dbd2.js +0 -19
  481. package/components/PrintingSystem/subcomponents/FooterNode/index.9a19a7cb.js +0 -48
  482. package/components/PrintingSystem/subcomponents/GridNode/index.8d14e1b6.js +0 -71
  483. package/components/PrintingSystem/subcomponents/HeaderNode/index.89e4eaab.js +0 -48
  484. package/components/PrintingSystem/subcomponents/PaperNode/index.dd4ca449.js +0 -46
  485. package/components/PrintingSystem/subcomponents/PropertyValueNode/index.048d7ebf.js +0 -41
  486. package/components/PrintingSystem/subcomponents/SectionNode/index.83f1efea.js +0 -48
  487. package/components/PrintingSystem/subcomponents/TextBoxNode/index.5427cb75.js +0 -28
  488. package/components/PropertyValue/index.15c61a4b.js +0 -209
  489. package/components/SideBar/index.b0359a2b.js +0 -916
  490. package/components/SplitLayout/index.d.ts +0 -2
  491. package/components/WrapperComponent/index.5e872594.js +0 -18
  492. package/components/animate/MotionContainer/index.8d9f9d80.js +0 -33
  493. package/components/areas/components/AreasAdmin/index.820a00ab.js +0 -737
  494. package/components/areas/components/AreasViewer/index.6d7194e2.js +0 -1086
  495. package/components/commercial/TopBar/index.93a7d26a.js +0 -275
  496. package/components/hook-form/HelperError/index.66bbcac3.js +0 -30
  497. package/components/hook-form/RHFAutocomplete/index.1f2afb6b.js +0 -429
  498. package/components/hook-form/RHFCheckbox/index.eca64469.js +0 -143
  499. package/components/hook-form/RHFColorPicker/index.dc13d5a3.js +0 -204
  500. package/components/hook-form/RHFDateTime/index.e554b068.js +0 -203
  501. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +0 -34
  502. package/components/hook-form/RHFPeriod/index.e4e4530f.js +0 -112
  503. package/components/hook-form/RHFRadioGroup/index.1ddb3d93.js +0 -45
  504. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +0 -36
  505. package/components/hook-form/RHFTextField/index.1bfa601f.js +0 -358
  506. package/components/hook-form/RHFUpload/index.6e98b291.js +0 -242
  507. package/components/modal/WindowBase.fd86f575.js +0 -74
  508. package/components/modal/WindowConfirm.ee6de236.js +0 -105
  509. package/components/mui_extended/Accordion/index.7dcdfd3a.js +0 -126
  510. package/components/mui_extended/BoxIcon/index.e638ecc8.js +0 -22
  511. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +0 -94
  512. package/components/mui_extended/LinkWithRoute/index.16436ab8.js +0 -30
  513. package/components/mui_extended/Popover/index.d85de73b.js +0 -179
  514. package/components/mui_extended/ToggleButton/index.191711f3.js +0 -19
  515. package/components/popups/PopupsViewer/index.1500ce72.js +0 -186
  516. package/test/getNameDataTestId.14875ec7.js +0 -6
  517. /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/DateTimeFilter/index.d.ts +0 -0
  518. /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/NumberFilter/index.d.ts +0 -0
  519. /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/SelectFilter/index.d.ts +0 -0
  520. /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/StringFilter/index.d.ts +0 -0
@@ -1,32 +1,32 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
1
2
  import { useMap, LayerGroup, MapContainer, Marker, Polyline, Circle, Polygon } from "react-leaflet";
2
3
  import { shallow } from "zustand/shallow";
3
4
  import React__default, { createContext, useRef, useEffect, useContext, useMemo, useState, useCallback } from "react";
4
5
  import * as L from "leaflet";
5
6
  import L__default from "leaflet";
6
7
  import { Loader } from "@googlemaps/js-api-loader";
7
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
8
8
  import { createPortal } from "react-dom";
9
9
  import { useModuleDictionary, useModuleSkeleton, useEnvironment, useModulePrivileges } from "@m4l/core";
10
10
  import clsx from "clsx";
11
11
  import { useFormContext, useWatch } from "react-hook-form";
12
- import { A as Actions } from "../../../CommonActions/components/Actions/index.fa7ab18c.js";
13
- import { B as Button } from "../../../mui_extended/Button/index.c3084916.js";
12
+ import { A as Actions } from "../../../CommonActions/components/Actions/index.273645af.js";
13
+ import { B as Button } from "../../../mui_extended/Button/index.5395d101.js";
14
14
  import * as Yup from "yup";
15
15
  import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index.f60f500e.js";
16
- import { R as RHFAutocompleteAsync } from "../../../hook-form/RHFAutocompleteAsync/index.bc278965.js";
17
- import { S as Stack } from "../../../mui_extended/Stack/index.0e53197c.js";
18
- import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.7b2a8723.js";
19
- import { I as IconButton } from "../../../mui_extended/IconButton/index.f8a3021b.js";
20
- import { u as usePopupsStore, P as PopupsProvider } from "../../../popups/PopupsProvider/index.d7409f48.js";
21
- import { T as ToggleIconButton } from "../../../mui_extended/ToggleIconButton/index.d9dbf650.js";
22
- import { c as DataGrid } from "../../../DataGrid/index.abe0f9b9.js";
16
+ import { R as RHFAutocompleteAsync } from "../../../hook-form/RHFAutocompleteAsync/index.98dcf0de.js";
17
+ import { S as Stack } from "../../../mui_extended/Stack/index.fe363ca5.js";
18
+ import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.bf3a2812.js";
19
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.b0ee4965.js";
20
+ import { u as usePopupsStore, P as PopupsProvider } from "../../../popups/PopupsProvider/index.8fb6232a.js";
21
+ import { T as ToggleIconButton } from "../../../mui_extended/ToggleIconButton/index.0cd347b4.js";
22
+ import { c as DataGrid } from "../../../DataGrid/index.304437ee.js";
23
23
  import { generateUtilityClasses, Tooltip, FormControl, RadioGroup, FormControlLabel, Radio, useTheme } from "@mui/material";
24
- import { C as ColumnSetCheckFormatter } from "../../../DataGrid/formatters/ColumnSetCheckFormatter/index.0b23ba88.js";
25
- import { I as Icon, M as MarkerIconLabel } from "../../../Icon/index.ad330e78.js";
24
+ import { C as ColumnSetCheckFormatter } from "../../../DataGrid/formatters/ColumnSetCheckFormatter/index.4045b2f2.js";
25
+ import { I as Icon, M as MarkerIconLabel } from "../../../Icon/index.ee7b85c9.js";
26
26
  import { u as useStateRef } from "../../../../hooks/useStateRef/index.538edb89.js";
27
- import { C as CheckBox } from "../../../mui_extended/CheckBox.2a3b86c5.js";
28
- import { P as Popover } from "../../../mui_extended/Popover/index.d85de73b.js";
29
- import { P as PopupsViewer } from "../../../popups/PopupsViewer/index.1500ce72.js";
27
+ import { C as CheckBox } from "../../../mui_extended/CheckBox.256169f0.js";
28
+ import { P as Popover } from "../../../mui_extended/Popover/index.4e7340b4.js";
29
+ import { P as PopupsViewer } from "../../../popups/PopupsViewer/index.813854e4.js";
30
30
  import { createPathComponent } from "@react-leaflet/core";
31
31
  import "leaflet.markercluster";
32
32
  import { cloneDeep, throttle } from "lodash";
@@ -37,8 +37,8 @@ import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
37
37
  import { devtools } from "zustand/middleware";
38
38
  import { immer } from "zustand/middleware/immer";
39
39
  import { unstable_composeClasses } from "@mui/base";
40
- import { g as getComponentUtilityClass } from "../../../../utils/index.6469f148.js";
41
- import { b as bearingRawToCSS } from "../../index.34ab6a68.js";
40
+ import { g as getComponentUtilityClass } from "../../../../utils/index.0718eeac.js";
41
+ import { b as bearingRawToCSS } from "../../index.13bb982c.js";
42
42
  import "leaflet-polylinedecorator";
43
43
  const COMPONENT_CLASS_NAME = "M4LMap";
44
44
  const MAP_ZINDEX_DEFAULT = 0;
@@ -75,7 +75,7 @@ const SVG_ICON_DEFAULT = `<svg viewBox="0 0 640 640" height="32" width="32" xmln
75
75
  >P</text>
76
76
  </g>
77
77
  </svg>`;
78
- const updateOwnerStateClasses = (state) => {
78
+ const updateOwnerStateClasses = (_state) => {
79
79
  };
80
80
  const mapClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
81
81
  "root",
@@ -349,7 +349,7 @@ function toQuadKey(x, y, z) {
349
349
  let quadKey = "";
350
350
  for (let i = z; i > 0; i--) {
351
351
  let digit = 0;
352
- let mask = 1 << i - 1;
352
+ const mask = 1 << i - 1;
353
353
  if ((x & mask) !== 0) {
354
354
  digit++;
355
355
  }
@@ -418,12 +418,16 @@ const createMapStore = (initProps) => {
418
418
  google_hybrid: TILE_LAYER_GOOGLE_HYBRID,
419
419
  bing_rodmap: TILE_LAYER_BING
420
420
  };
421
- state.mapSourcesIds = ["osm_roadmap", "google_rodmap", "google_satellite", "google_hybrid", "bing_rodmap"];
421
+ state.mapSourcesIds = [
422
+ "osm_roadmap",
423
+ "google_rodmap",
424
+ "google_satellite",
425
+ "google_hybrid",
426
+ "bing_rodmap"
427
+ ];
422
428
  state.currentMapSourceId = "osm_roadmap";
423
429
  for (let index = 0; index < layersStore.length; index++) {
424
- state.hashLayers[layersStore[index].layerId] = cloneDeep(
425
- layersStore[index]
426
- );
430
+ state.hashLayers[layersStore[index].layerId] = cloneDeep(layersStore[index]);
427
431
  state.layersIds.push(layersStore[index].layerId);
428
432
  if (layersStore[index].visible !== false) {
429
433
  state.visibleCheckedLayers.add(layersStore[index].layerId);
@@ -542,7 +546,9 @@ const createMapStore = (initProps) => {
542
546
  if (state.hashLayers[layerId]) {
543
547
  if (state.hashLayers[layerId].geoJsonObject?.object.type === "FeatureCollection") {
544
548
  const layer = state.hashLayers[layerId].geoJsonObject?.object;
545
- const feature = layer.features.find((feature2) => feature2.id === featureId);
549
+ const feature = layer.features.find(
550
+ (currentFeature) => currentFeature.id === featureId
551
+ );
546
552
  if (feature) {
547
553
  feature.layerData = layerData;
548
554
  }
@@ -615,15 +621,8 @@ const createMapStore = (initProps) => {
615
621
  };
616
622
  const MapContext = createContext(null);
617
623
  function MapProvider(props) {
618
- const {
619
- children,
620
- initialLayers,
621
- googleApiKey: apiKey,
622
- googleMapVersion = "weekly"
623
- } = props;
624
- const {
625
- getLabel
626
- } = useModuleDictionary();
624
+ const { children, initialLayers, googleApiKey: apiKey, googleMapVersion = "weekly" } = props;
625
+ const { getLabel } = useModuleDictionary();
627
626
  const isDesktop = useResponsiveDesktop();
628
627
  const isSkeleton = useModuleSkeleton();
629
628
  const isFirstRender = useFirstRender([getLabel]);
@@ -642,10 +641,11 @@ function MapProvider(props) {
642
641
  });
643
642
  mapStoreRef.current?.getState().mapActions.init(initialLayers || []);
644
643
  }
645
- const {
646
- setHandlerGetLabel,
647
- setExternalState
648
- } = useStore(mapStoreRef.current, (state) => state.mapActions, shallow);
644
+ const { setHandlerGetLabel, setExternalState } = useStore(
645
+ mapStoreRef.current,
646
+ (state) => state.mapActions,
647
+ shallow
648
+ );
649
649
  useEffect(() => {
650
650
  if (!isFirstRender) {
651
651
  setHandlerGetLabel(getLabel);
@@ -655,15 +655,9 @@ function MapProvider(props) {
655
655
  if (isFirstRender) {
656
656
  return;
657
657
  }
658
- setExternalState({
659
- isMobile: !isDesktop,
660
- isSkeleton
661
- });
658
+ setExternalState({ isMobile: !isDesktop, isSkeleton });
662
659
  }, [isDesktop, isSkeleton]);
663
- return /* @__PURE__ */ jsx(MapContext.Provider, {
664
- value: mapStoreRef.current,
665
- children
666
- });
660
+ return /* @__PURE__ */ jsx(MapContext.Provider, { value: mapStoreRef.current, children });
667
661
  }
668
662
  function useMapStore(selector, equalityFn) {
669
663
  const context = useContext(MapContext);
@@ -673,13 +667,10 @@ function useMapStore(selector, equalityFn) {
673
667
  }
674
668
  const TileLayerOthers = () => {
675
669
  const map = useMap();
676
- const {
677
- urlTemplate,
678
- dictionaryId,
679
- options,
680
- getTileUrl,
681
- sourceType
682
- } = useMapStore((state) => state.hashMapSources[state.currentMapSourceId], shallow);
670
+ const { urlTemplate, dictionaryId, options, getTileUrl, sourceType } = useMapStore(
671
+ (state) => state.hashMapSources[state.currentMapSourceId],
672
+ shallow
673
+ );
683
674
  useEffect(() => {
684
675
  let layer;
685
676
  if (sourceType === "Google") {
@@ -704,13 +695,18 @@ const TileLayerOthers = () => {
704
695
  function TileLayerGoogle() {
705
696
  const map = useMap();
706
697
  const mutantRefLayer = React__default.useRef(null);
707
- const {
708
- options,
709
- sourceType,
710
- mapTypeTile
711
- } = useMapStore((state) => state.hashMapSources[state.currentMapSourceId], shallow);
712
- const roadOptions = useMapStore((state) => state.hashMapSources[state.currentMapSourceId].roadSelectedOptions, shallow);
713
- const [googleApiKey, googleMapVersion] = useMapStore((state) => [state.googleApiKey, state.googleMapVersion], shallow);
698
+ const { options, sourceType, mapTypeTile } = useMapStore(
699
+ (state) => state.hashMapSources[state.currentMapSourceId],
700
+ shallow
701
+ );
702
+ const roadOptions = useMapStore(
703
+ (state) => state.hashMapSources[state.currentMapSourceId].roadSelectedOptions,
704
+ shallow
705
+ );
706
+ const [googleApiKey, googleMapVersion] = useMapStore(
707
+ (state) => [state.googleApiKey, state.googleMapVersion],
708
+ shallow
709
+ );
714
710
  React__default.useEffect(() => {
715
711
  if (sourceType !== "Google") {
716
712
  return;
@@ -750,7 +746,6 @@ function TileLayerGoogle() {
750
746
  return;
751
747
  }
752
748
  if (mutantRefLayer.current && roadOptions) {
753
- console.log("roadOptions.trafficLayer", roadOptions.trafficLayer);
754
749
  if (roadOptions.trafficLayer) {
755
750
  mutantRefLayer.current.addGoogleLayer("TrafficLayer");
756
751
  } else if (roadOptions.trafficLayer === false) {
@@ -785,9 +780,10 @@ function TileLayerGoogle() {
785
780
  return null;
786
781
  }
787
782
  function TileLayers() {
788
- return /* @__PURE__ */ jsxs(React__default.Fragment, {
789
- children: [/* @__PURE__ */ jsx(TileLayerOthers, {}), /* @__PURE__ */ jsx(TileLayerGoogle, {})]
790
- });
783
+ return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
784
+ /* @__PURE__ */ jsx(TileLayerOthers, {}),
785
+ /* @__PURE__ */ jsx(TileLayerGoogle, {})
786
+ ] });
791
787
  }
792
788
  const POSITION_CLASSES = {
793
789
  bottomleft: "leaflet-bottom leaflet-left",
@@ -801,7 +797,6 @@ const Control = (props) => {
801
797
  const controlContainerRef = React__default.createRef();
802
798
  const map = useMap();
803
799
  React__default.useEffect(() => {
804
- console.log("useEffect, controlContainerRef", controlContainerRef);
805
800
  if (controlContainerRef.current !== null) {
806
801
  L__default.DomEvent.disableClickPropagation(controlContainerRef.current);
807
802
  L__default.DomEvent.disableScrollPropagation(controlContainerRef.current);
@@ -822,22 +817,11 @@ const Control = (props) => {
822
817
  }
823
818
  }, [portalRoot, props.prepend, controlContainerRef]);
824
819
  const className = clsx(props.container?.className, "leaflet-control", props.className);
825
- console.log("Control Render", controlContainerRef);
826
- return /* @__PURE__ */ jsx("div", {
827
- ...props.container,
828
- ref: controlContainerRef,
829
- className,
830
- children: props.children
831
- });
820
+ return /* @__PURE__ */ jsx("div", { ...props.container, ref: controlContainerRef, className, children: props.children });
832
821
  };
833
822
  function MyActions() {
834
- const {
835
- control,
836
- setValue
837
- } = useFormContext();
838
- const {
839
- getLabel
840
- } = useModuleDictionary();
823
+ const { control, setValue } = useFormContext();
824
+ const { getLabel } = useModuleDictionary();
841
825
  const fieldsWatch = useWatch({
842
826
  control,
843
827
  name: ["statusEdition", "reInits"]
@@ -850,12 +834,7 @@ function MyActions() {
850
834
  setValue("statusEdition", "initial");
851
835
  }
852
836
  };
853
- return /* @__PURE__ */ jsx(Actions, {
854
- children: /* @__PURE__ */ jsx(Button, {
855
- onClick: initCancelDraw,
856
- children: statusEdition === "initial" ? getLabel(MAP_DICCTIONARY.LABEL_MEASURE_START) : getLabel(MAP_DICCTIONARY.LABEL_MEASURE_CANCEL)
857
- })
858
- });
837
+ return /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Button, { onClick: initCancelDraw, children: statusEdition === "initial" ? getLabel(MAP_DICCTIONARY.LABEL_MEASURE_START) : getLabel(MAP_DICCTIONARY.LABEL_MEASURE_CANCEL) }) });
859
838
  }
860
839
  function MeasureDataValidation(_getLabel) {
861
840
  return {};
@@ -875,7 +854,14 @@ const INITIAL_FORM_VALUES = {
875
854
  reInits: 0,
876
855
  value: "0",
877
856
  measureTypeId: "distance",
878
- magnitudFactor: { id: "m_kilometers", name: "Kilometers", symbol: "k", factor_x0: 0, factor_x1: 1, factor_x2: 0 },
857
+ magnitudFactor: {
858
+ id: "m_kilometers",
859
+ name: "Kilometers",
860
+ symbol: "k",
861
+ factor_x0: 0,
862
+ factor_x1: 1,
863
+ factor_x2: 0
864
+ },
879
865
  unitArea: null,
880
866
  statusEdition: "initial"
881
867
  };
@@ -911,10 +897,15 @@ const getMarkerPointLabel = (distance, getLabel) => {
911
897
  className: mapClasses.measureLabelMarkerRoot,
912
898
  html: `<div class="${mapClasses.measureLabelMarkerContainer}">
913
899
  ${distance ? `<span class="${mapClasses.measureLabelMarkerDistance}">${distance}</span>` : ""}
914
- <div class="${mapClasses.measureLabelMarkerRemove}">${getLabel(MAP_DICCTIONARY.LABEL_MEASURE_REMOVE_POINT)}</div>
900
+ <div class="${mapClasses.measureLabelMarkerRemove}">${getLabel(
901
+ MAP_DICCTIONARY.LABEL_MEASURE_REMOVE_POINT
902
+ )}</div>
915
903
  </div>`,
916
904
  iconSize: [STYLE_MEASURE_OPTIONS.labelMarkerWidth, STYLE_MEASURE_OPTIONS.labelMarkerHeight],
917
- iconAnchor: [STYLE_MEASURE_OPTIONS.labelMarkerAnchorX, STYLE_MEASURE_OPTIONS.labelMarkerAnchorY]
905
+ iconAnchor: [
906
+ STYLE_MEASURE_OPTIONS.labelMarkerAnchorX,
907
+ STYLE_MEASURE_OPTIONS.labelMarkerAnchorY
908
+ ]
918
909
  });
919
910
  };
920
911
  function useMeasure() {
@@ -924,17 +915,18 @@ function useMeasure() {
924
915
  const { control, setValue } = useFormContext();
925
916
  const fieldsWatch = useWatch({
926
917
  control,
927
- name: [
928
- "statusEdition",
929
- "value",
930
- "magnitudFactor"
931
- ]
918
+ name: ["statusEdition", "value", "magnitudFactor"]
932
919
  });
933
920
  const statusEdition = fieldsWatch[0];
934
921
  const value = fieldsWatch[1];
935
922
  const magnitudFactor = fieldsWatch[2];
936
923
  const [magnitudFactorCached, setMagnitudFactorCached] = useState(magnitudFactor);
937
- const currentMeasure = useRef({ measurePoints: [], addMarker: false, magnitudFactor, dragging: false });
924
+ const currentMeasure = useRef({
925
+ measurePoints: [],
926
+ addMarker: false,
927
+ magnitudFactor,
928
+ dragging: false
929
+ });
938
930
  const clearMeasure = useCallback(() => {
939
931
  currentMeasure.current.measurePoints.forEach((measurePoint) => {
940
932
  measurePoint.marker.remove();
@@ -943,22 +935,27 @@ function useMeasure() {
943
935
  currentMeasure.current.measurePoints = [];
944
936
  setValue("value", measureDistante());
945
937
  }, []);
946
- const getFormatFactorDistance = useCallback((distance, withSymbol = false) => {
947
- if (distance === void 0) {
948
- return void 0;
949
- }
950
- const cMagnitudeFactor = currentMeasure.current.magnitudFactor;
951
- return (cMagnitudeFactor.factor_x0 + distance * cMagnitudeFactor.factor_x1 + (distance ^ 2 * cMagnitudeFactor.factor_x2)).toFixed(2) + (withSymbol ? ` ${cMagnitudeFactor.symbol}` : "");
952
- }, []);
938
+ const getFormatFactorDistance = useCallback(
939
+ (distance, withSymbol = false) => {
940
+ if (distance === void 0) {
941
+ return void 0;
942
+ }
943
+ const cMagnitudeFactor = currentMeasure.current.magnitudFactor;
944
+ return (cMagnitudeFactor.factor_x0 + distance * cMagnitudeFactor.factor_x1 + (distance ^ 2 * cMagnitudeFactor.factor_x2)).toFixed(2) + (withSymbol ? ` ${cMagnitudeFactor.symbol}` : "");
945
+ },
946
+ []
947
+ );
953
948
  const measureDistante = useCallback(() => {
954
- var totalDistance = 0;
949
+ let totalDistance = 0;
955
950
  const measurePoints = currentMeasure.current.measurePoints;
956
951
  if (currentMeasure.current.layerLine) {
957
952
  if (measurePoints.length < 2) {
958
953
  currentMeasure.current.layerLine.remove();
959
954
  currentMeasure.current.layerLine = void 0;
960
955
  } else {
961
- currentMeasure.current.layerLine.setLatLngs(measurePoints.map((measurePoint) => measurePoint.marker.getLatLng()));
956
+ currentMeasure.current.layerLine.setLatLngs(
957
+ measurePoints.map((measurePoint) => measurePoint.marker.getLatLng())
958
+ );
962
959
  }
963
960
  } else {
964
961
  if (measurePoints.length > 1) {
@@ -981,10 +978,15 @@ function useMeasure() {
981
978
  addClickListenerForRemove(measurePoints[0].labelMarker);
982
979
  }
983
980
  for (let i = 1; i < measurePoints.length; i++) {
984
- const formatDistanceFromPrevious = getFormatFactorDistance(measurePoints[i - 1].marker.getLatLng().distanceTo(measurePoints[i].marker.getLatLng()), true);
981
+ const formatDistanceFromPrevious = getFormatFactorDistance(
982
+ measurePoints[i - 1].marker.getLatLng().distanceTo(measurePoints[i].marker.getLatLng()),
983
+ true
984
+ );
985
985
  if (measurePoints[i].formatDistanceFromPrevious !== formatDistanceFromPrevious) {
986
986
  measurePoints[i].formatDistanceFromPrevious = formatDistanceFromPrevious;
987
- measurePoints[i].labelMarker.setIcon(getMarkerPointLabelMemo(formatDistanceFromPrevious, getLabel));
987
+ measurePoints[i].labelMarker.setIcon(
988
+ getMarkerPointLabelMemo(formatDistanceFromPrevious, getLabel)
989
+ );
988
990
  addClickListenerForRemove(measurePoints[i].labelMarker);
989
991
  }
990
992
  }
@@ -996,96 +998,103 @@ function useMeasure() {
996
998
  return (e) => {
997
999
  e.stopPropagation();
998
1000
  if (!currentMeasure.current.dragging) {
999
- var markIndex = currentMeasure.current.measurePoints.findIndex((searchElement) => {
1000
- return searchElement.labelMarker === labelMarker;
1001
- });
1001
+ const markIndex = currentMeasure.current.measurePoints.findIndex(
1002
+ (searchElement) => {
1003
+ return searchElement.labelMarker === labelMarker;
1004
+ }
1005
+ );
1002
1006
  if (markIndex !== -1) {
1003
- var measurePoint = currentMeasure.current.measurePoints[markIndex];
1007
+ const measurePoint = currentMeasure.current.measurePoints[markIndex];
1004
1008
  measurePoint.marker.remove();
1005
1009
  measurePoint.labelMarker.remove();
1006
1010
  currentMeasure.current.measurePoints.splice(markIndex, 1);
1007
1011
  setValue("value", measureDistante());
1008
1012
  currentMeasure.current.addMarker = true;
1009
1013
  }
1010
- currentMeasure.current.measurePoints.forEach((measurePoint2, index) => {
1011
- measurePoint2.marker.setIcon(getMarkerPointIconMemo(index + 1));
1014
+ currentMeasure.current.measurePoints.forEach((measurePoint, index) => {
1015
+ measurePoint.marker.setIcon(getMarkerPointIconMemo(index + 1));
1012
1016
  });
1013
1017
  }
1014
1018
  };
1015
1019
  }, []);
1016
1020
  const addClickListenerForRemove = useCallback((labelMarker) => {
1017
- var element = labelMarker.getElement();
1021
+ let element = labelMarker.getElement();
1018
1022
  if (element) {
1019
- var elements = element.getElementsByClassName(mapClasses.measureLabelMarkerRemove);
1023
+ const elements = element.getElementsByClassName(
1024
+ mapClasses.measureLabelMarkerRemove
1025
+ );
1020
1026
  element = elements[0];
1021
- console.log("addClickListenerForRemove event", element);
1022
1027
  if (element) {
1023
1028
  element.addEventListener("click", onClickRemovePoint(labelMarker));
1024
1029
  }
1025
1030
  }
1026
1031
  }, []);
1027
- const onClickMap = useCallback((e) => {
1028
- console.log("onClickMap event");
1029
- var lat = e.latlng.lat;
1030
- var lng = e.latlng.lng;
1031
- var formatDistanceFromPrevious = void 0;
1032
- if (currentMeasure.current.addMarker === false) {
1033
- return;
1034
- }
1035
- if (currentMeasure.current.measurePoints.length > 0) {
1036
- formatDistanceFromPrevious = getFormatFactorDistance(currentMeasure.current.measurePoints[currentMeasure.current.measurePoints.length - 1].marker.getLatLng().distanceTo(e.latlng));
1037
- }
1038
- var marker = L.marker([lat, lng], {
1039
- draggable: true,
1040
- riseOnHover: true,
1041
- autoPan: true,
1042
- icon: getMarkerPointIconMemo(currentMeasure.current.measurePoints.length + 1),
1043
- zIndexOffset: MAP_ZINDEX_DEFAULT
1044
- }).addTo(map);
1045
- marker.on("moveend", function(_e) {
1046
- var latlng = marker.getLatLng();
1047
- labelMarker.setLatLng(latlng);
1048
- setValue("value", measureDistante());
1049
- });
1050
- marker.on("mouseover", function() {
1051
- currentMeasure.current.addMarker = false;
1052
- });
1053
- marker.on("mouseout", function() {
1054
- currentMeasure.current.addMarker = true;
1055
- });
1056
- var labelMarker = L.marker([lat, lng], {
1057
- draggable: true,
1058
- riseOnHover: true,
1059
- icon: getMarkerPointLabelMemo(formatDistanceFromPrevious, getLabel),
1060
- zIndexOffset: MAP_ZINDEX_DEFAULT
1061
- }).addTo(map);
1062
- labelMarker.on("moveend", function(_e) {
1063
- var latlng = labelMarker.getLatLng();
1064
- marker.setLatLng(latlng);
1032
+ const onClickMap = useCallback(
1033
+ (e) => {
1034
+ const lat = e.latlng.lat;
1035
+ const lng = e.latlng.lng;
1036
+ let formatDistanceFromPrevious = void 0;
1037
+ if (currentMeasure.current.addMarker === false) {
1038
+ return;
1039
+ }
1040
+ if (currentMeasure.current.measurePoints.length > 0) {
1041
+ formatDistanceFromPrevious = getFormatFactorDistance(
1042
+ currentMeasure.current.measurePoints[currentMeasure.current.measurePoints.length - 1].marker.getLatLng().distanceTo(e.latlng)
1043
+ );
1044
+ }
1045
+ const marker = L.marker([lat, lng], {
1046
+ draggable: true,
1047
+ riseOnHover: true,
1048
+ autoPan: true,
1049
+ icon: getMarkerPointIconMemo(currentMeasure.current.measurePoints.length + 1),
1050
+ zIndexOffset: MAP_ZINDEX_DEFAULT
1051
+ }).addTo(map);
1052
+ marker.on("moveend", function(_e) {
1053
+ const latlng = marker.getLatLng();
1054
+ labelMarker.setLatLng(latlng);
1055
+ setValue("value", measureDistante());
1056
+ });
1057
+ marker.on("mouseover", function() {
1058
+ currentMeasure.current.addMarker = false;
1059
+ });
1060
+ marker.on("mouseout", function() {
1061
+ currentMeasure.current.addMarker = true;
1062
+ });
1063
+ var labelMarker = L.marker([lat, lng], {
1064
+ draggable: true,
1065
+ riseOnHover: true,
1066
+ icon: getMarkerPointLabelMemo(formatDistanceFromPrevious, getLabel),
1067
+ zIndexOffset: MAP_ZINDEX_DEFAULT
1068
+ }).addTo(map);
1069
+ labelMarker.on("moveend", function(_e) {
1070
+ const latlng = labelMarker.getLatLng();
1071
+ marker.setLatLng(latlng);
1072
+ setValue("value", measureDistante());
1073
+ });
1074
+ labelMarker.on("mouseover", function(_e) {
1075
+ currentMeasure.current.addMarker = false;
1076
+ });
1077
+ labelMarker.on("mouseout", function(_e) {
1078
+ currentMeasure.current.addMarker = true;
1079
+ });
1080
+ labelMarker.on("dragstart", function(_e) {
1081
+ currentMeasure.current.dragging = true;
1082
+ });
1083
+ labelMarker.on("dragend", function(_e) {
1084
+ setTimeout(function() {
1085
+ currentMeasure.current.dragging = false;
1086
+ }, 10);
1087
+ });
1088
+ addClickListenerForRemove(labelMarker);
1089
+ currentMeasure.current.measurePoints.push({
1090
+ marker,
1091
+ labelMarker,
1092
+ formatDistanceFromPrevious
1093
+ });
1065
1094
  setValue("value", measureDistante());
1066
- });
1067
- labelMarker.on("mouseover", function(_e) {
1068
- currentMeasure.current.addMarker = false;
1069
- });
1070
- labelMarker.on("mouseout", function(_e) {
1071
- currentMeasure.current.addMarker = true;
1072
- });
1073
- labelMarker.on("dragstart", function(_e) {
1074
- currentMeasure.current.dragging = true;
1075
- });
1076
- labelMarker.on("dragend", function(_e) {
1077
- setTimeout(function() {
1078
- currentMeasure.current.dragging = false;
1079
- }, 10);
1080
- });
1081
- addClickListenerForRemove(labelMarker);
1082
- currentMeasure.current.measurePoints.push({
1083
- marker,
1084
- labelMarker,
1085
- formatDistanceFromPrevious
1086
- });
1087
- setValue("value", measureDistante());
1088
- }, [map, measureDistante, setValue, getLabel]);
1095
+ },
1096
+ [map, measureDistante, setValue, getLabel]
1097
+ );
1089
1098
  const onMouseMoveMap = useCallback(() => {
1090
1099
  map.getContainer().style.cursor = "crosshair";
1091
1100
  }, [map]);
@@ -1107,11 +1116,9 @@ function useMeasure() {
1107
1116
  }
1108
1117
  }, [map, statusEdition]);
1109
1118
  useEffect(() => {
1110
- console.log("useEffect magnitudFactor", readyToUpdate, magnitudFactor);
1111
1119
  if (!readyToUpdate)
1112
1120
  return;
1113
1121
  if (magnitudFactor.id !== magnitudFactorCached.id) {
1114
- console.log("useEffect magnitudFactor CAMBIO");
1115
1122
  setMagnitudFactorCached({ ...magnitudFactor });
1116
1123
  currentMeasure.current.magnitudFactor = magnitudFactor;
1117
1124
  setValue("value", measureDistante());
@@ -1129,69 +1136,58 @@ function useMeasure() {
1129
1136
  return { statusEdition, magnitudFactor, value };
1130
1137
  }
1131
1138
  function MeasureData() {
1132
- const {
1133
- getLabel
1134
- } = useModuleDictionary();
1135
- const {
1136
- value,
1137
- magnitudFactor
1138
- } = useMeasure();
1139
- return /* @__PURE__ */ jsxs(Fragment, {
1140
- children: [/* @__PURE__ */ jsx(RHFAutocompleteAsync, {
1141
- endPoint: "magnitudes/factors?origin_unit_reference_id=m_kilometers",
1142
- name: "magnitudFactor",
1143
- autoComplete: "off",
1144
- getOptionLabel: (option) => option.name,
1145
- isOptionEqualToValue: (option, value2) => option.id === value2.id,
1146
- label: getLabel(MAP_DICCTIONARY.LABEL_MEASURE_UNIT),
1147
- isRemote: false
1148
- }), /* @__PURE__ */ jsxs(Stack, {
1149
- direction: "row",
1150
- spacing: 2,
1151
- className: mapClasses.measureToolFormValue,
1152
- children: [/* @__PURE__ */ jsx("span", {
1153
- className: mapClasses.measureToolFormValueDistance,
1154
- children: value
1155
- }), /* @__PURE__ */ jsx("span", {
1156
- className: mapClasses.measureToolFormValueSymbol,
1157
- children: magnitudFactor.symbol
1158
- })]
1159
- })]
1160
- });
1139
+ const { getLabel } = useModuleDictionary();
1140
+ const { value, magnitudFactor } = useMeasure();
1141
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1142
+ /* @__PURE__ */ jsx(
1143
+ RHFAutocompleteAsync,
1144
+ {
1145
+ endPoint: "magnitudes/factors?origin_unit_reference_id=m_kilometers",
1146
+ name: "magnitudFactor",
1147
+ autoComplete: "off",
1148
+ getOptionLabel: (option) => option.name,
1149
+ isOptionEqualToValue: (option, measureItemValue) => option.id === measureItemValue.id,
1150
+ label: getLabel(MAP_DICCTIONARY.LABEL_MEASURE_UNIT),
1151
+ isRemote: false
1152
+ }
1153
+ ),
1154
+ /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 2, className: mapClasses.measureToolFormValue, children: [
1155
+ /* @__PURE__ */ jsx("span", { className: mapClasses.measureToolFormValueDistance, children: value }),
1156
+ /* @__PURE__ */ jsx("span", { className: mapClasses.measureToolFormValueSymbol, children: magnitudFactor.symbol })
1157
+ ] })
1158
+ ] });
1161
1159
  }
1162
1160
  function MeasureTool() {
1163
- const {
1164
- getLabel
1165
- } = useModuleDictionary();
1161
+ const { getLabel } = useModuleDictionary();
1166
1162
  const finalInitalValues = {
1167
1163
  ...INITIAL_FORM_VALUES
1168
1164
  };
1169
1165
  if (finalInitalValues?.magnitudFactor?.name) {
1170
- finalInitalValues.magnitudFactor.name = getLabel(MAP_DICCTIONARY.LABEL_MEASURE_UNIT_BASE_KILOMETERS);
1166
+ finalInitalValues.magnitudFactor.name = getLabel(
1167
+ MAP_DICCTIONARY.LABEL_MEASURE_UNIT_BASE_KILOMETERS
1168
+ );
1171
1169
  }
1172
- const {
1173
- validationSchema
1174
- } = useValidation();
1170
+ const { validationSchema } = useValidation();
1175
1171
  const onSubmit = () => {
1176
1172
  };
1177
- return /* @__PURE__ */ jsxs(RHFormProvider, {
1178
- className: mapClasses.meaureToolRoot,
1179
- statusLoad: INITIAL_FORM_VALUES.statusLoad,
1180
- onSubmit,
1181
- values: finalInitalValues,
1182
- validationSchema,
1183
- children: [/* @__PURE__ */ jsx(Stack, {
1184
- direction: "column",
1185
- children: /* @__PURE__ */ jsx(MeasureData, {})
1186
- }), /* @__PURE__ */ jsx(MyActions, {})]
1187
- });
1173
+ return /* @__PURE__ */ jsxs(
1174
+ RHFormProvider,
1175
+ {
1176
+ className: mapClasses.meaureToolRoot,
1177
+ statusLoad: INITIAL_FORM_VALUES.statusLoad,
1178
+ onSubmit,
1179
+ values: finalInitalValues,
1180
+ validationSchema,
1181
+ children: [
1182
+ /* @__PURE__ */ jsx(Stack, { direction: "column", children: /* @__PURE__ */ jsx(MeasureData, {}) }),
1183
+ /* @__PURE__ */ jsx(MyActions, {})
1184
+ ]
1185
+ }
1186
+ );
1188
1187
  }
1189
1188
  function ZoomButtons() {
1190
1189
  const map = useMap();
1191
- const {
1192
- host_static_assets,
1193
- environment_assets
1194
- } = useEnvironment();
1190
+ const { host_static_assets, environment_assets } = useEnvironment();
1195
1191
  const [, setZoomInDisabled] = useState(false);
1196
1192
  const [, setZoomOutDisabled] = useState(false);
1197
1193
  useEffect(() => {
@@ -1214,35 +1210,34 @@ function ZoomButtons() {
1214
1210
  const handleZoomOut = () => {
1215
1211
  map.zoomOut();
1216
1212
  };
1217
- return /* @__PURE__ */ jsxs("div", {
1218
- className: mapClasses.zoomButtons,
1219
- children: [/* @__PURE__ */ jsx(IconButton, {
1220
- onClick: handleZoomIn,
1221
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_ZOOM_IN}`
1222
- }), /* @__PURE__ */ jsx(IconButton, {
1223
- onClick: handleZoomOut,
1224
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_ZOOM_OUT}`
1225
- })]
1226
- });
1213
+ return /* @__PURE__ */ jsxs("div", { className: mapClasses.zoomButtons, children: [
1214
+ /* @__PURE__ */ jsx(
1215
+ IconButton,
1216
+ {
1217
+ onClick: handleZoomIn,
1218
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_ZOOM_IN}`
1219
+ }
1220
+ ),
1221
+ /* @__PURE__ */ jsx(
1222
+ IconButton,
1223
+ {
1224
+ onClick: handleZoomOut,
1225
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_ZOOM_OUT}`
1226
+ }
1227
+ )
1228
+ ] });
1227
1229
  }
1228
1230
  function TopRightTools(props) {
1229
- const {
1230
- gpsTools
1231
- } = props;
1232
- const {
1233
- addPopup,
1234
- closePopup
1235
- } = usePopupsStore((state) => state.popupsActions);
1236
- const {
1237
- host_static_assets,
1238
- environment_assets
1239
- } = useEnvironment();
1240
- const {
1241
- getLabel
1242
- } = useModuleDictionary();
1243
- const openPopupsIds = usePopupsStore((state) => state.popupsIds.filter((pId) => {
1244
- return state.hashPopups[pId].status === "init";
1245
- }), shallow);
1231
+ const { gpsTools } = props;
1232
+ const { addPopup, closePopup } = usePopupsStore((state) => state.popupsActions);
1233
+ const { host_static_assets, environment_assets } = useEnvironment();
1234
+ const { getLabel } = useModuleDictionary();
1235
+ const openPopupsIds = usePopupsStore(
1236
+ (state) => state.popupsIds.filter((pId) => {
1237
+ return state.hashPopups[pId].status === "init";
1238
+ }),
1239
+ shallow
1240
+ );
1246
1241
  const popupsIds = usePopupsStore((state) => state.popupsIds, shallow);
1247
1242
  const map = useMap();
1248
1243
  const isToggledGpsTools = openPopupsIds.indexOf("gpsTools") > -1;
@@ -1261,16 +1256,17 @@ function TopRightTools(props) {
1261
1256
  };
1262
1257
  const onGpsToolsClick = (e) => {
1263
1258
  if (!isToggledGpsTools) {
1264
- addPopup({
1265
- popupId: "gpsTools",
1266
- title: getLabel(MAP_DICCTIONARY.LABEL_GPSTOOLS_NAME),
1267
- iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_GPS_TOOLS_TOOL}`,
1268
- functionComponent: gpsTools,
1269
- onMouseDown,
1270
- defaultPosition: GPS_TOOLS_POPUP_DEFAULT_POSITION
1271
- }, {
1272
- closeOthers: true
1273
- });
1259
+ addPopup(
1260
+ {
1261
+ popupId: "gpsTools",
1262
+ title: getLabel(MAP_DICCTIONARY.LABEL_GPSTOOLS_NAME),
1263
+ iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_GPS_TOOLS_TOOL}`,
1264
+ functionComponent: gpsTools,
1265
+ onMouseDown,
1266
+ defaultPosition: GPS_TOOLS_POPUP_DEFAULT_POSITION
1267
+ },
1268
+ { closeOthers: true }
1269
+ );
1274
1270
  } else {
1275
1271
  closePopup("gpsTools");
1276
1272
  }
@@ -1278,37 +1274,43 @@ function TopRightTools(props) {
1278
1274
  };
1279
1275
  const onMeasureToolClick = (e) => {
1280
1276
  if (!isToggledMeasureTool) {
1281
- addPopup({
1282
- popupId: "measureTool",
1283
- iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_MEASURE_TOOL}`,
1284
- title: "Measure Tool",
1285
- functionComponent: MeasureTool,
1286
- onMouseDown,
1287
- defaultPosition: MESURE_POPUP_DEFAULT_POSITION
1288
- }, {
1289
- closeOthers: true
1290
- });
1277
+ addPopup(
1278
+ {
1279
+ popupId: "measureTool",
1280
+ iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_MEASURE_TOOL}`,
1281
+ title: "Measure Tool",
1282
+ functionComponent: MeasureTool,
1283
+ onMouseDown,
1284
+ defaultPosition: MESURE_POPUP_DEFAULT_POSITION
1285
+ },
1286
+ { closeOthers: true }
1287
+ );
1291
1288
  } else {
1292
1289
  closePopup("measureTool");
1293
1290
  }
1294
1291
  e.stopPropagation();
1295
1292
  };
1296
- return /* @__PURE__ */ jsxs(Control, {
1297
- position: "topright",
1298
- prepend: true,
1299
- className: mapClasses.topRigthToolsRoot,
1300
- children: [/* @__PURE__ */ jsx(ToggleIconButton, {
1301
- isToggled: isToggledGpsTools,
1302
- disabled: isDisabledGpsTools,
1303
- onToggle: onGpsToolsClick,
1304
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_GPS_TOOLS_TOOL}`
1305
- }), /* @__PURE__ */ jsx(ToggleIconButton, {
1306
- isToggled: isToggledMeasureTool,
1307
- disabled: isDisabledMeasureTool,
1308
- onToggle: onMeasureToolClick,
1309
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_MEASURE_TOOL}`
1310
- }), /* @__PURE__ */ jsx(ZoomButtons, {})]
1311
- });
1293
+ return /* @__PURE__ */ jsxs(Control, { position: "topright", prepend: true, className: mapClasses.topRigthToolsRoot, children: [
1294
+ /* @__PURE__ */ jsx(
1295
+ ToggleIconButton,
1296
+ {
1297
+ isToggled: isToggledGpsTools,
1298
+ disabled: isDisabledGpsTools,
1299
+ onToggle: onGpsToolsClick,
1300
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_GPS_TOOLS_TOOL}`
1301
+ }
1302
+ ),
1303
+ /* @__PURE__ */ jsx(
1304
+ ToggleIconButton,
1305
+ {
1306
+ isToggled: isToggledMeasureTool,
1307
+ disabled: isDisabledMeasureTool,
1308
+ onToggle: onMeasureToolClick,
1309
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_MEASURE_TOOL}`
1310
+ }
1311
+ ),
1312
+ /* @__PURE__ */ jsx(ZoomButtons, {})
1313
+ ] });
1312
1314
  }
1313
1315
  function useColumns(props) {
1314
1316
  const {
@@ -1320,138 +1322,143 @@ function useColumns(props) {
1320
1322
  clusterLayers,
1321
1323
  setClusterLayers
1322
1324
  } = props;
1323
- const {
1324
- getLabel
1325
- } = useModuleDictionary();
1326
- const {
1327
- host_static_assets,
1328
- environment_assets
1329
- } = useEnvironment();
1330
- const useHook = useCallback((field) => {
1331
- if (field === "visible") {
1332
- return [visibleLayers, setVisibleLayers];
1333
- } else if (field === "autoFocus") {
1334
- return [autoFocusLayers, setAutoFocusLayers];
1335
- } else {
1336
- return [clusterLayers, setClusterLayers];
1337
- }
1338
- }, [visibleLayers, autoFocusLayers, clusterLayers]);
1339
- const columns = useMemo(() => [
1340
- {
1341
- key: "name",
1342
- name: getLabel(MAP_DICCTIONARY.LABEL_NAME),
1343
- type: "string",
1344
- width: 150,
1345
- frozen: true
1346
- },
1347
- {
1348
- key: "visible",
1349
- name: getLabel(MAP_DICCTIONARY.LABEL_LAYER_VISIBLE),
1350
- width: 50,
1351
- minWidth: 20,
1352
- type: "boolean",
1353
- formatter: ColumnSetCheckFormatter({
1354
- field: "visible",
1355
- rowKeyGetter,
1356
- useHook
1357
- }),
1358
- cellClass: "rdg-cell-align-center",
1359
- headerRenderer: (p) => /* @__PURE__ */ jsx(Tooltip, {
1360
- title: getLabel(MAP_DICCTIONARY.LABEL_LAYER_VISIBLE),
1361
- children: /* @__PURE__ */ jsx(Icon, {
1362
- size: "medium",
1363
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_LAYER_VISIBLE}`
1364
- })
1365
- })
1366
- },
1367
- {
1368
- key: "autoFocus",
1369
- name: getLabel(MAP_DICCTIONARY.LABEL_LAYER_AUTOFOCUS),
1370
- minWidth: 20,
1371
- width: 50,
1372
- type: "boolean",
1373
- formatter: ColumnSetCheckFormatter({
1374
- field: "autoFocus",
1375
- rowKeyGetter,
1376
- useHook
1377
- }),
1378
- cellClass: "rdg-cell-align-center",
1379
- headerRenderer: (p) => /* @__PURE__ */ jsx(Tooltip, {
1380
- title: getLabel(MAP_DICCTIONARY.LABEL_LAYER_AUTOFOCUS),
1381
- children: /* @__PURE__ */ jsx(Icon, {
1382
- size: "medium",
1383
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_LAYER_AUTOFOCUS}`
1384
- })
1385
- })
1325
+ const { getLabel } = useModuleDictionary();
1326
+ const { host_static_assets, environment_assets } = useEnvironment();
1327
+ const useHook = useCallback(
1328
+ (field) => {
1329
+ if (field === "visible") {
1330
+ return [visibleLayers, setVisibleLayers];
1331
+ } else if (field === "autoFocus") {
1332
+ return [autoFocusLayers, setAutoFocusLayers];
1333
+ } else {
1334
+ return [clusterLayers, setClusterLayers];
1335
+ }
1386
1336
  },
1387
- {
1388
- key: "cluster",
1389
- name: getLabel(MAP_DICCTIONARY.LABEL_LAYER_CLUSTER),
1390
- minWidth: 20,
1391
- width: 50,
1392
- type: "boolean",
1393
- formatter: ColumnSetCheckFormatter({
1394
- field: "cluster",
1395
- disabledGetter: (row) => !row.clusterAble,
1396
- rowKeyGetter,
1397
- useHook
1398
- }),
1399
- cellClass: "rdg-cell-align-center",
1400
- headerRenderer: (p) => /* @__PURE__ */ jsx(Tooltip, {
1401
- title: getLabel(MAP_DICCTIONARY.LABEL_LAYER_CLUSTER),
1402
- children: /* @__PURE__ */ jsx(Icon, {
1403
- size: "medium",
1404
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_LAYER_CLUSTER}`
1405
- })
1406
- })
1407
- }
1408
- ], [getLabel, useHook]);
1409
- return {
1410
- columns
1411
- };
1337
+ [visibleLayers, autoFocusLayers, clusterLayers]
1338
+ );
1339
+ const columns = useMemo(
1340
+ () => [
1341
+ {
1342
+ key: "name",
1343
+ name: getLabel(MAP_DICCTIONARY.LABEL_NAME),
1344
+ type: "string",
1345
+ width: 150,
1346
+ frozen: true
1347
+ },
1348
+ {
1349
+ key: "visible",
1350
+ name: getLabel(MAP_DICCTIONARY.LABEL_LAYER_VISIBLE),
1351
+ width: 50,
1352
+ minWidth: 20,
1353
+ type: "boolean",
1354
+ formatter: ColumnSetCheckFormatter({
1355
+ field: "visible",
1356
+ rowKeyGetter,
1357
+ useHook
1358
+ }),
1359
+ cellClass: "rdg-cell-align-center",
1360
+ headerRenderer: (_p) => /* @__PURE__ */ jsx(Tooltip, { title: getLabel(MAP_DICCTIONARY.LABEL_LAYER_VISIBLE), children: /* @__PURE__ */ jsx(
1361
+ Icon,
1362
+ {
1363
+ size: "medium",
1364
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_LAYER_VISIBLE}`
1365
+ }
1366
+ ) })
1367
+ },
1368
+ {
1369
+ key: "autoFocus",
1370
+ name: getLabel(MAP_DICCTIONARY.LABEL_LAYER_AUTOFOCUS),
1371
+ minWidth: 20,
1372
+ width: 50,
1373
+ type: "boolean",
1374
+ formatter: ColumnSetCheckFormatter({
1375
+ field: "autoFocus",
1376
+ rowKeyGetter,
1377
+ useHook
1378
+ }),
1379
+ cellClass: "rdg-cell-align-center",
1380
+ headerRenderer: (_p) => /* @__PURE__ */ jsx(Tooltip, { title: getLabel(MAP_DICCTIONARY.LABEL_LAYER_AUTOFOCUS), children: /* @__PURE__ */ jsx(
1381
+ Icon,
1382
+ {
1383
+ size: "medium",
1384
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_LAYER_AUTOFOCUS}`
1385
+ }
1386
+ ) })
1387
+ },
1388
+ {
1389
+ key: "cluster",
1390
+ name: getLabel(MAP_DICCTIONARY.LABEL_LAYER_CLUSTER),
1391
+ minWidth: 20,
1392
+ width: 50,
1393
+ type: "boolean",
1394
+ formatter: ColumnSetCheckFormatter({
1395
+ field: "cluster",
1396
+ disabledGetter: (row) => !row.clusterAble,
1397
+ rowKeyGetter,
1398
+ useHook
1399
+ }),
1400
+ cellClass: "rdg-cell-align-center",
1401
+ headerRenderer: (_p) => /* @__PURE__ */ jsx(Tooltip, { title: getLabel(MAP_DICCTIONARY.LABEL_LAYER_CLUSTER), children: /* @__PURE__ */ jsx(
1402
+ Icon,
1403
+ {
1404
+ size: "medium",
1405
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_LAYER_CLUSTER}`
1406
+ }
1407
+ ) })
1408
+ }
1409
+ ],
1410
+ [getLabel, useHook]
1411
+ );
1412
+ return { columns };
1412
1413
  }
1413
1414
  function useCheckedLayers(checkedNameSet) {
1414
- const [checkedLayers, setCheckedLayers] = useMapStore((state) => [state[`${checkedNameSet}CheckedLayers`], (newSet) => {
1415
- state.mapActions.setCheckedLayers(checkedNameSet, newSet);
1416
- }], shallow);
1415
+ const [checkedLayers, setCheckedLayers] = useMapStore(
1416
+ (state) => [
1417
+ state[`${checkedNameSet}CheckedLayers`],
1418
+ (newSet) => {
1419
+ state.mapActions.setCheckedLayers(checkedNameSet, newSet);
1420
+ }
1421
+ ],
1422
+ shallow
1423
+ );
1417
1424
  return [checkedLayers, setCheckedLayers];
1418
1425
  }
1419
1426
  function useRowActionsGetter() {
1420
- const {
1421
- getLabel
1422
- } = useModuleDictionary();
1423
- const {
1424
- hasPrivilege
1425
- } = useModulePrivileges();
1426
- const {
1427
- host_static_assets,
1428
- environment_assets
1429
- } = useEnvironment();
1430
- const {
1431
- removeLayer
1432
- } = useMapStore((state) => state.mapActions, shallow);
1433
- const [urlIconDelete] = useState(`${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_LAYER_DELETE}`);
1434
- const onDelete = useCallback((row) => {
1435
- removeLayer(row.id);
1436
- }, [getLabel]);
1437
- const rowActionsGetter = useCallback((row) => {
1438
- const conditionalItems = [];
1439
- conditionalItems.push({
1440
- urlIcon: urlIconDelete,
1441
- dictionaryId: MAP_DICCTIONARY.ROW_ACTION_LAYER_DELETE,
1442
- onClick: () => {
1443
- onDelete(row);
1444
- },
1445
- disabled: !row.deleteAble
1446
- });
1447
- return conditionalItems;
1448
- }, [hasPrivilege, onDelete, urlIconDelete]);
1449
- return {
1450
- rowActionsGetter
1451
- };
1427
+ const { getLabel } = useModuleDictionary();
1428
+ const { hasPrivilege } = useModulePrivileges();
1429
+ const { host_static_assets, environment_assets } = useEnvironment();
1430
+ const { removeLayer } = useMapStore((state) => state.mapActions, shallow);
1431
+ const [urlIconDelete] = useState(
1432
+ `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_LAYER_DELETE}`
1433
+ );
1434
+ const onDelete = useCallback(
1435
+ (row) => {
1436
+ removeLayer(row.id);
1437
+ },
1438
+ [getLabel]
1439
+ );
1440
+ const rowActionsGetter = useCallback(
1441
+ (row) => {
1442
+ const conditionalItems = [];
1443
+ conditionalItems.push({
1444
+ urlIcon: urlIconDelete,
1445
+ dictionaryId: MAP_DICCTIONARY.ROW_ACTION_LAYER_DELETE,
1446
+ onClick: () => {
1447
+ onDelete(row);
1448
+ },
1449
+ disabled: !row.deleteAble
1450
+ });
1451
+ return conditionalItems;
1452
+ },
1453
+ [hasPrivilege, onDelete, urlIconDelete]
1454
+ );
1455
+ return { rowActionsGetter };
1452
1456
  }
1453
1457
  function useMaster() {
1454
- const [hashLayers, layersIds] = useMapStore((state) => [state.hashLayers, state.layersIds], shallow);
1458
+ const [hashLayers, layersIds] = useMapStore(
1459
+ (state) => [state.hashLayers, state.layersIds],
1460
+ shallow
1461
+ );
1455
1462
  const rowKeyGetter = useCallback((row) => row.id, []);
1456
1463
  const [visibleLayers, setVisibleLayers] = useCheckedLayers("visible");
1457
1464
  const [autoFocusLayers, setAutoFocusLayers] = useCheckedLayers("autoFocus");
@@ -1471,12 +1478,8 @@ function useMaster() {
1471
1478
  });
1472
1479
  return rows2;
1473
1480
  }, [hashLayers, layersIds]);
1474
- const {
1475
- rowActionsGetter
1476
- } = useRowActionsGetter();
1477
- const {
1478
- columns
1479
- } = useColumns({
1481
+ const { rowActionsGetter } = useRowActionsGetter();
1482
+ const { columns } = useColumns({
1480
1483
  rowKeyGetter,
1481
1484
  visibleLayers,
1482
1485
  setVisibleLayers,
@@ -1500,33 +1503,22 @@ function useDisableZoomEvents(node) {
1500
1503
  if (!map || !node)
1501
1504
  return;
1502
1505
  node.addEventListener("mouseover", function() {
1503
- console.log("Desactivar zoom");
1504
1506
  map.doubleClickZoom.disable();
1505
1507
  map.scrollWheelZoom.disable();
1506
1508
  });
1507
1509
  node.addEventListener("mouseleave", function() {
1508
- console.log("Activar zoom");
1509
1510
  map.scrollWheelZoom.enable();
1510
1511
  map.doubleClickZoom.enable();
1511
1512
  });
1512
1513
  }, [map, node]);
1513
1514
  }
1514
1515
  function LayersTool() {
1515
- const {
1516
- columns,
1517
- rows,
1518
- rowKeyGetter,
1519
- rowActionsGetter
1520
- } = useMaster();
1516
+ const { columns, rows, rowKeyGetter, rowActionsGetter } = useMaster();
1521
1517
  const [divRef, setDivRef] = useStateRef(null);
1522
1518
  useDisableZoomEvents(divRef);
1523
- return /* @__PURE__ */ jsx("div", {
1524
- ref: setDivRef,
1525
- style: {
1526
- position: "relative",
1527
- height: "100%"
1528
- },
1529
- children: /* @__PURE__ */ jsx(DataGrid, {
1519
+ return /* @__PURE__ */ jsx("div", { ref: setDivRef, style: { position: "relative", height: "100%" }, children: /* @__PURE__ */ jsx(
1520
+ DataGrid,
1521
+ {
1530
1522
  id: "layers",
1531
1523
  columns,
1532
1524
  rows,
@@ -1539,17 +1531,12 @@ function LayersTool() {
1539
1531
  withPager: false,
1540
1532
  withLocalFilters: false
1541
1533
  }
1542
- })
1543
- });
1534
+ }
1535
+ ) });
1544
1536
  }
1545
1537
  function MapSourcesTool() {
1546
- const {
1547
- getLabel
1548
- } = useModuleDictionary();
1549
- const {
1550
- host_static_assets,
1551
- environment_assets
1552
- } = useEnvironment();
1538
+ const { getLabel } = useModuleDictionary();
1539
+ const { host_static_assets, environment_assets } = useEnvironment();
1553
1540
  const currentMapSourceId = useMapStore((state) => state.currentMapSourceId, shallow);
1554
1541
  const mapSources = useMapStore((state) => {
1555
1542
  return state.mapSourcesIds.map((id) => ({
@@ -1562,144 +1549,157 @@ function MapSourcesTool() {
1562
1549
  roadSeletedOptions: state.hashMapSources[id].roadSelectedOptions
1563
1550
  }));
1564
1551
  }, shallow);
1565
- const {
1566
- setCurrentMapSource,
1567
- setMapSourceRoadOptions: setMapSourceRoadMapOptions
1568
- } = useMapStore((state) => state.mapActions, shallow);
1552
+ const { setCurrentMapSource, setMapSourceRoadOptions: setMapSourceRoadMapOptions } = useMapStore(
1553
+ (state) => state.mapActions,
1554
+ shallow
1555
+ );
1569
1556
  const [divRef, setDivRef] = useStateRef(null);
1570
1557
  useDisableZoomEvents(divRef);
1571
1558
  const handleChange = (event) => {
1572
1559
  setCurrentMapSource(event.target.value);
1573
1560
  };
1574
- return /* @__PURE__ */ jsx("div", {
1575
- className: mapClasses.mapSourcesRoot,
1576
- ref: setDivRef,
1577
- children: /* @__PURE__ */ jsx(FormControl, {
1578
- children: /* @__PURE__ */ jsx(RadioGroup, {
1579
- "aria-labelledby": "demo-controlled-radio-buttons-group",
1580
- name: "controlled-radio-buttons-group",
1581
- value: currentMapSourceId,
1582
- onChange: handleChange,
1583
- children: mapSources.map((mapSourceOption) => /* @__PURE__ */ jsxs("div", {
1584
- className: mapClasses.mapSourcesOption,
1585
- children: [/* @__PURE__ */ jsx(FormControlLabel, {
1561
+ return /* @__PURE__ */ jsx("div", { className: mapClasses.mapSourcesRoot, ref: setDivRef, children: /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
1562
+ RadioGroup,
1563
+ {
1564
+ "aria-labelledby": "demo-controlled-radio-buttons-group",
1565
+ name: "controlled-radio-buttons-group",
1566
+ value: currentMapSourceId,
1567
+ onChange: handleChange,
1568
+ children: mapSources.map((mapSourceOption) => /* @__PURE__ */ jsxs("div", { className: mapClasses.mapSourcesOption, children: [
1569
+ /* @__PURE__ */ jsx(
1570
+ FormControlLabel,
1571
+ {
1586
1572
  className: "",
1587
1573
  value: mapSourceOption.id,
1588
1574
  control: /* @__PURE__ */ jsx(Radio, {}),
1589
- label: /* @__PURE__ */ jsxs("div", {
1590
- className: mapClasses.mapSourcesOptionIconLabel,
1591
- children: [/* @__PURE__ */ jsx(Icon, {
1592
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${mapSourceOption.iconUrl}`
1593
- }), /* @__PURE__ */ jsx("span", {
1594
- children: getLabel(mapSourceOption.dictionaryId)
1595
- })]
1596
- })
1597
- }), (mapSourceOption.hasBicyclingLayer || mapSourceOption.hasTrafficLayer || mapSourceOption.hasTransitLayer) && /* @__PURE__ */ jsxs("div", {
1598
- className: clsx(mapClasses.mapSourcesOptionRoadOptions, currentMapSourceId !== mapSourceOption.id ? mapClasses.disabled : mapClasses.active),
1599
- children: [mapSourceOption.hasTrafficLayer && /* @__PURE__ */ jsxs("div", {
1600
- className: mapClasses.mapSourcesOptionRoadOptionsCheck,
1601
- children: [/* @__PURE__ */ jsx(CheckBox, {
1602
- disabled: currentMapSourceId !== mapSourceOption.id,
1603
- checked: mapSourceOption.roadSeletedOptions?.trafficLayer || false,
1604
- onChange: (e, checked) => {
1605
- setMapSourceRoadMapOptions({
1606
- trafficLayer: checked
1607
- });
1575
+ label: /* @__PURE__ */ jsxs("div", { className: mapClasses.mapSourcesOptionIconLabel, children: [
1576
+ /* @__PURE__ */ jsx(
1577
+ Icon,
1578
+ {
1579
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${mapSourceOption.iconUrl}`
1608
1580
  }
1609
- }), /* @__PURE__ */ jsx(Icon, {
1610
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_SOURCE_ROAD_TRAFFIC}`
1611
- })]
1612
- }), mapSourceOption.hasTransitLayer && /* @__PURE__ */ jsxs("div", {
1613
- className: mapClasses.mapSourcesOptionRoadOptionsCheck,
1614
- children: [/* @__PURE__ */ jsx(CheckBox, {
1615
- disabled: currentMapSourceId !== mapSourceOption.id,
1616
- checked: mapSourceOption.roadSeletedOptions?.transitLayer || false,
1617
- onChange: (e, checked) => {
1618
- setMapSourceRoadMapOptions({
1619
- transitLayer: checked
1620
- });
1621
- }
1622
- }), /* @__PURE__ */ jsx(Icon, {
1623
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_SOURCE_ROAD_TRANSIT}`
1624
- })]
1625
- }), mapSourceOption.hasBicyclingLayer && /* @__PURE__ */ jsxs("div", {
1626
- className: mapClasses.mapSourcesOptionRoadOptionsCheck,
1627
- children: [/* @__PURE__ */ jsx(CheckBox, {
1628
- disabled: currentMapSourceId !== mapSourceOption.id,
1629
- checked: mapSourceOption.roadSeletedOptions?.bicyclingLayer || false,
1630
- label: "Bycicle",
1631
- onChange: (e, checked) => {
1632
- setMapSourceRoadMapOptions({
1633
- bicyclingLayer: checked
1634
- });
1635
- }
1636
- }), /* @__PURE__ */ jsx(Icon, {
1637
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_SOURCE_ROAD_BICYCLING}`
1638
- })]
1639
- })]
1640
- })]
1641
- }, mapSourceOption.dictionaryId))
1642
- })
1643
- })
1644
- });
1581
+ ),
1582
+ /* @__PURE__ */ jsx("span", { children: getLabel(mapSourceOption.dictionaryId) })
1583
+ ] })
1584
+ }
1585
+ ),
1586
+ (mapSourceOption.hasBicyclingLayer || mapSourceOption.hasTrafficLayer || mapSourceOption.hasTransitLayer) && /* @__PURE__ */ jsxs(
1587
+ "div",
1588
+ {
1589
+ className: clsx(
1590
+ mapClasses.mapSourcesOptionRoadOptions,
1591
+ currentMapSourceId !== mapSourceOption.id ? mapClasses.disabled : mapClasses.active
1592
+ ),
1593
+ children: [
1594
+ mapSourceOption.hasTrafficLayer && /* @__PURE__ */ jsxs("div", { className: mapClasses.mapSourcesOptionRoadOptionsCheck, children: [
1595
+ /* @__PURE__ */ jsx(
1596
+ CheckBox,
1597
+ {
1598
+ disabled: currentMapSourceId !== mapSourceOption.id,
1599
+ checked: mapSourceOption.roadSeletedOptions?.trafficLayer || false,
1600
+ onChange: (_e, checked) => {
1601
+ setMapSourceRoadMapOptions({ trafficLayer: checked });
1602
+ }
1603
+ }
1604
+ ),
1605
+ /* @__PURE__ */ jsx(
1606
+ Icon,
1607
+ {
1608
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_SOURCE_ROAD_TRAFFIC}`
1609
+ }
1610
+ )
1611
+ ] }),
1612
+ mapSourceOption.hasTransitLayer && /* @__PURE__ */ jsxs("div", { className: mapClasses.mapSourcesOptionRoadOptionsCheck, children: [
1613
+ /* @__PURE__ */ jsx(
1614
+ CheckBox,
1615
+ {
1616
+ disabled: currentMapSourceId !== mapSourceOption.id,
1617
+ checked: mapSourceOption.roadSeletedOptions?.transitLayer || false,
1618
+ onChange: (_e, checked) => {
1619
+ setMapSourceRoadMapOptions({ transitLayer: checked });
1620
+ }
1621
+ }
1622
+ ),
1623
+ /* @__PURE__ */ jsx(
1624
+ Icon,
1625
+ {
1626
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_SOURCE_ROAD_TRANSIT}`
1627
+ }
1628
+ )
1629
+ ] }),
1630
+ mapSourceOption.hasBicyclingLayer && /* @__PURE__ */ jsxs("div", { className: mapClasses.mapSourcesOptionRoadOptionsCheck, children: [
1631
+ /* @__PURE__ */ jsx(
1632
+ CheckBox,
1633
+ {
1634
+ disabled: currentMapSourceId !== mapSourceOption.id,
1635
+ checked: mapSourceOption.roadSeletedOptions?.bicyclingLayer || false,
1636
+ label: "Bycicle",
1637
+ onChange: (_e, checked) => {
1638
+ setMapSourceRoadMapOptions({ bicyclingLayer: checked });
1639
+ }
1640
+ }
1641
+ ),
1642
+ /* @__PURE__ */ jsx(
1643
+ Icon,
1644
+ {
1645
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_SOURCE_ROAD_BICYCLING}`
1646
+ }
1647
+ )
1648
+ ] })
1649
+ ]
1650
+ }
1651
+ )
1652
+ ] }, mapSourceOption.dictionaryId))
1653
+ }
1654
+ ) }) });
1645
1655
  }
1646
1656
  function LayersButton(props) {
1647
- const {
1648
- type
1649
- } = props;
1657
+ const { type } = props;
1650
1658
  const [open, setOpen] = useState(null);
1651
- const {
1652
- host_static_assets,
1653
- environment_assets
1654
- } = useEnvironment();
1659
+ const { host_static_assets, environment_assets } = useEnvironment();
1655
1660
  const theme = useTheme();
1656
1661
  const handleOpen = (event) => {
1657
1662
  setOpen(event.currentTarget);
1658
- console.log("open", event.currentTarget);
1659
1663
  };
1660
1664
  const handleClose = () => {
1661
1665
  setOpen(null);
1662
1666
  };
1663
- return /* @__PURE__ */ jsxs(React__default.Fragment, {
1664
- children: [/* @__PURE__ */ jsx(IconButton, {
1665
- onClick: handleOpen,
1666
- src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${type === "MapSources" ? MAP_ICONS.MAP_SOURCES_TOOL : MAP_ICONS.MAP_LAYERS_TOOL}`
1667
- }), /* @__PURE__ */ jsx(Popover, {
1668
- className: type === "MapSources" ? mapClasses.mapSourcesPopoverRoot : mapClasses.layersPopoverRoot,
1669
- arrowType: "no-arrow",
1670
- open: Boolean(open),
1671
- anchorEl: open,
1672
- anchorOrigin: {
1673
- vertical: "bottom",
1674
- horizontal: "left"
1675
- },
1676
- onClose: handleClose,
1677
- sx: {
1678
- ...type === "MapSources" ? theme.components?.M4LMapMapSources?.styleOverrides : theme.components?.M4LMapLayers?.styleOverrides
1679
- },
1680
- disableAutoFocus: true,
1681
- disableRestoreFocus: true,
1682
- disableEnforceFocus: true,
1683
- children: type === "MapSources" ? /* @__PURE__ */ jsx(MapSourcesTool, {}) : /* @__PURE__ */ jsx(LayersTool, {})
1684
- })]
1685
- });
1667
+ return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
1668
+ /* @__PURE__ */ jsx(
1669
+ IconButton,
1670
+ {
1671
+ onClick: handleOpen,
1672
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${type === "MapSources" ? MAP_ICONS.MAP_SOURCES_TOOL : MAP_ICONS.MAP_LAYERS_TOOL}`
1673
+ }
1674
+ ),
1675
+ /* @__PURE__ */ jsx(
1676
+ Popover,
1677
+ {
1678
+ className: type === "MapSources" ? mapClasses.mapSourcesPopoverRoot : mapClasses.layersPopoverRoot,
1679
+ arrowType: "no-arrow",
1680
+ open: Boolean(open),
1681
+ anchorEl: open,
1682
+ anchorOrigin: { vertical: "bottom", horizontal: "left" },
1683
+ onClose: handleClose,
1684
+ sx: {
1685
+ ...type === "MapSources" ? theme.components?.M4LMapMapSources?.styleOverrides : theme.components?.M4LMapLayers?.styleOverrides
1686
+ },
1687
+ disableAutoFocus: true,
1688
+ disableRestoreFocus: true,
1689
+ disableEnforceFocus: true,
1690
+ children: type === "MapSources" ? /* @__PURE__ */ jsx(MapSourcesTool, {}) : /* @__PURE__ */ jsx(LayersTool, {})
1691
+ }
1692
+ )
1693
+ ] });
1686
1694
  }
1687
1695
  function TopLeftTools() {
1688
- return /* @__PURE__ */ jsxs(Control, {
1689
- position: "topleft",
1690
- prepend: true,
1691
- className: mapClasses.topLeftToolsRoot,
1692
- children: [/* @__PURE__ */ jsx(LayersButton, {
1693
- type: "MapSources"
1694
- }), /* @__PURE__ */ jsx(LayersButton, {
1695
- type: "Layers"
1696
- })]
1697
- });
1696
+ return /* @__PURE__ */ jsxs(Control, { position: "topleft", prepend: true, className: mapClasses.topLeftToolsRoot, children: [
1697
+ /* @__PURE__ */ jsx(LayersButton, { type: "MapSources" }),
1698
+ /* @__PURE__ */ jsx(LayersButton, { type: "Layers" })
1699
+ ] });
1698
1700
  }
1699
1701
  function Controls(props) {
1700
- const {
1701
- gpsTools
1702
- } = props;
1702
+ const { gpsTools } = props;
1703
1703
  const map = useMap();
1704
1704
  const [controlContainer, setControlContainer] = useState(null);
1705
1705
  useEffect(() => {
@@ -1710,18 +1710,13 @@ function Controls(props) {
1710
1710
  L__default.DomEvent.disableScrollPropagation(cContainer);
1711
1711
  }
1712
1712
  }, [map]);
1713
- return /* @__PURE__ */ jsxs(PopupsProvider, {
1714
- children: [/* @__PURE__ */ jsx(TopLeftTools, {}), /* @__PURE__ */ jsx(TopRightTools, {
1715
- gpsTools
1716
- }), controlContainer && createPortal(/* @__PURE__ */ jsx(PopupsViewer, {
1717
- containerElement: map.getContainer()
1718
- }), controlContainer)]
1719
- });
1713
+ return /* @__PURE__ */ jsxs(PopupsProvider, { children: [
1714
+ /* @__PURE__ */ jsx(TopLeftTools, {}),
1715
+ /* @__PURE__ */ jsx(TopRightTools, { gpsTools }),
1716
+ controlContainer && createPortal(/* @__PURE__ */ jsx(PopupsViewer, { containerElement: map.getContainer() }), controlContainer)
1717
+ ] });
1720
1718
  }
1721
- const MarkerClusterGroup = createPathComponent(({
1722
- children: _c,
1723
- ...props
1724
- }, ctx) => {
1719
+ const MarkerClusterGroup = createPathComponent(({ children: _c, ...props }, ctx) => {
1725
1720
  const clusterProps = {};
1726
1721
  const clusterEvents = {};
1727
1722
  Object.entries(props).forEach(([propName, prop]) => {
@@ -1736,10 +1731,7 @@ const MarkerClusterGroup = createPathComponent(({
1736
1731
  });
1737
1732
  return {
1738
1733
  instance: markerClusterGroup,
1739
- context: {
1740
- ...ctx,
1741
- layerContainer: markerClusterGroup
1742
- }
1734
+ context: { ...ctx, layerContainer: markerClusterGroup }
1743
1735
  };
1744
1736
  });
1745
1737
  const RenderByEachFeatureComponent = ({
@@ -1747,15 +1739,11 @@ const RenderByEachFeatureComponent = ({
1747
1739
  ...props
1748
1740
  }) => {
1749
1741
  const feature = renderFeature(props);
1750
- return feature ? /* @__PURE__ */ jsx(Fragment, {
1751
- children: feature
1752
- }) : null;
1742
+ return feature ? /* @__PURE__ */ jsx(Fragment, { children: feature }) : null;
1753
1743
  };
1754
1744
  const MemonizedRenderByEachFeatureComponent = React__default.memo(RenderByEachFeatureComponent);
1755
1745
  const MyLayer = (props) => {
1756
- const {
1757
- layerId
1758
- } = props;
1746
+ const { layerId } = props;
1759
1747
  const map = useMap();
1760
1748
  const popupRef = useRef(null);
1761
1749
  const lefaletLayerRef = useRef({
@@ -1772,13 +1760,15 @@ const MyLayer = (props) => {
1772
1760
  }
1773
1761
  }, shallow);
1774
1762
  const renderFeature = useMapStore((state) => state.hashLayers[layerId]?.renderFeature, shallow);
1775
- const [visible, cluster = false] = useMapStore((state) => [state.hashLayers[layerId]?.visible, state.hashLayers[layerId]?.cluster], shallow);
1763
+ const [visible, cluster = false] = useMapStore(
1764
+ (state) => [state.hashLayers[layerId]?.visible, state.hashLayers[layerId]?.cluster],
1765
+ shallow
1766
+ );
1776
1767
  const markerClusterGroupRef = useRef(null);
1777
1768
  const handleClick = (a) => {
1778
1769
  lefaletLayerRef.current.clickCount++;
1779
1770
  if (lefaletLayerRef.current.clickCount === 1) {
1780
1771
  lefaletLayerRef.current.clickTimeout = setTimeout(() => {
1781
- console.log("cluster clicked", a, popupRef.current);
1782
1772
  const cluster2 = a.propagatedFrom;
1783
1773
  if (cluster2 && cluster2 instanceof L__default.MarkerCluster) {
1784
1774
  const childMarkers = cluster2.getAllChildMarkers();
@@ -1793,8 +1783,9 @@ const MyLayer = (props) => {
1793
1783
  lefaletLayerRef.current.clickCount = 0;
1794
1784
  }, TIME_DOUBLE_CLICK);
1795
1785
  } else if (lefaletLayerRef.current.clickCount === 2) {
1796
- clearTimeout(lefaletLayerRef.current.clickTimeout);
1797
- console.log("Double click");
1786
+ if (lefaletLayerRef.current?.clickTimeout) {
1787
+ clearTimeout(lefaletLayerRef.current.clickTimeout);
1788
+ }
1798
1789
  lefaletLayerRef.current.clickCount = 0;
1799
1790
  }
1800
1791
  };
@@ -1803,7 +1794,6 @@ const MyLayer = (props) => {
1803
1794
  markerClusterGroupRef.current.on("clusterclick", handleClick);
1804
1795
  }
1805
1796
  }, [markerClusterGroupRef.current]);
1806
- console.log("Render MyLayer", layerId, featureIdOrCollection, visible, cluster);
1807
1797
  if (!featureIdOrCollection || !renderFeature) {
1808
1798
  return null;
1809
1799
  }
@@ -1812,15 +1802,18 @@ const MyLayer = (props) => {
1812
1802
  }
1813
1803
  const isFeaturCollection = Array.isArray(featureIdOrCollection);
1814
1804
  if (!isFeaturCollection) {
1815
- return /* @__PURE__ */ jsx(RenderByEachFeatureComponent, {
1816
- renderFeature,
1817
- id: featureIdOrCollection,
1818
- layerId
1819
- });
1805
+ return /* @__PURE__ */ jsx(
1806
+ RenderByEachFeatureComponent,
1807
+ {
1808
+ renderFeature,
1809
+ id: featureIdOrCollection,
1810
+ layerId
1811
+ }
1812
+ );
1820
1813
  } else {
1821
1814
  const createClusterCustomIcon = (cluster2) => {
1822
- var childCount = cluster2.getChildCount();
1823
- var c = " marker-cluster-";
1815
+ const childCount = cluster2.getChildCount();
1816
+ let c = " marker-cluster-";
1824
1817
  if (childCount < 10) {
1825
1818
  c += "small";
1826
1819
  } else if (childCount < 100) {
@@ -1836,15 +1829,17 @@ const MyLayer = (props) => {
1836
1829
  return DivIcon2;
1837
1830
  };
1838
1831
  if (!cluster) {
1839
- return /* @__PURE__ */ jsx(LayerGroup, {
1840
- children: featureIdOrCollection.map((featureId) => {
1841
- return /* @__PURE__ */ jsx(MemonizedRenderByEachFeatureComponent, {
1832
+ return /* @__PURE__ */ jsx(LayerGroup, { children: featureIdOrCollection.map((featureId) => {
1833
+ return /* @__PURE__ */ jsx(
1834
+ MemonizedRenderByEachFeatureComponent,
1835
+ {
1842
1836
  renderFeature,
1843
1837
  id: featureId,
1844
1838
  layerId
1845
- }, `k_${featureId}`);
1846
- })
1847
- });
1839
+ },
1840
+ `k_${featureId}`
1841
+ );
1842
+ }) });
1848
1843
  } else {
1849
1844
  return /* @__PURE__ */ jsx(
1850
1845
  MarkerClusterGroup,
@@ -1855,11 +1850,15 @@ const MyLayer = (props) => {
1855
1850
  spiderfyOnMaxZoom: false,
1856
1851
  iconCreateFunction: createClusterCustomIcon,
1857
1852
  children: featureIdOrCollection.map((featureId) => {
1858
- return /* @__PURE__ */ jsx(MemonizedRenderByEachFeatureComponent, {
1859
- renderFeature,
1860
- id: featureId,
1861
- layerId
1862
- }, `k_${featureId}`);
1853
+ return /* @__PURE__ */ jsx(
1854
+ MemonizedRenderByEachFeatureComponent,
1855
+ {
1856
+ renderFeature,
1857
+ id: featureId,
1858
+ layerId
1859
+ },
1860
+ `k_${featureId}`
1861
+ );
1863
1862
  })
1864
1863
  }
1865
1864
  );
@@ -1879,17 +1878,11 @@ function useAutoFocus() {
1879
1878
  features: function() {
1880
1879
  if (state.hashLayers[layerId].geoJsonObject?.object.type === "FeatureCollection") {
1881
1880
  const layer = state.hashLayers[layerId].geoJsonObject?.object;
1882
- return layer.features.filter((feature) => feature.layerData !== void 0).map((feature) => ({
1883
- featureId: feature.id,
1884
- layerData: feature.layerData
1885
- }));
1881
+ return layer.features.filter((feature) => feature.layerData !== void 0).map((feature) => ({ featureId: feature.id, layerData: feature.layerData }));
1886
1882
  } else {
1887
1883
  const feature = state.hashLayers[layerId].geoJsonObject?.object;
1888
1884
  if (feature.layerData !== void 0) {
1889
- return [{
1890
- featureId: feature.id,
1891
- layerData: feature.layerData
1892
- }];
1885
+ return [{ featureId: feature.id, layerData: feature.layerData }];
1893
1886
  }
1894
1887
  }
1895
1888
  return [];
@@ -1917,17 +1910,19 @@ function useAutoFocus() {
1917
1910
  }
1918
1911
  if (layersToFitBounds.length > 0) {
1919
1912
  let featureForBounds = layersToFitBounds[0];
1920
- let bounds = L__default.latLngBounds(featureForBounds.layerData.boundsNW, featureForBounds.layerData.boundsSE);
1913
+ let bounds = L__default.latLngBounds(
1914
+ featureForBounds.layerData.boundsNW,
1915
+ featureForBounds.layerData.boundsSE
1916
+ );
1921
1917
  for (let i = 1; i < layersToFitBounds.length; i++) {
1922
1918
  featureForBounds = layersToFitBounds[i];
1923
- const newBounds = L__default.latLngBounds(featureForBounds.layerData.boundsNW, featureForBounds.layerData.boundsSE);
1919
+ const newBounds = L__default.latLngBounds(
1920
+ featureForBounds.layerData.boundsNW,
1921
+ featureForBounds.layerData.boundsSE
1922
+ );
1924
1923
  bounds = bounds.extend(newBounds);
1925
1924
  }
1926
- map.fitBounds(bounds, {
1927
- animate: false,
1928
- maxZoom: 22,
1929
- padding: [50, 50]
1930
- });
1925
+ map.fitBounds(bounds, { animate: false, maxZoom: 22, padding: [50, 50] });
1931
1926
  }
1932
1927
  };
1933
1928
  const throttleBounds = throttle(proccesLayerWithAutoFocus, 300, {
@@ -1957,35 +1952,12 @@ const LayersContainer = () => {
1957
1952
  if (!map) {
1958
1953
  return null;
1959
1954
  }
1960
- return /* @__PURE__ */ jsx(React__default.Fragment, {
1961
- children: layersId.map((l) => /* @__PURE__ */ jsx(MyLayer, {
1962
- layerId: l
1963
- }, l))
1964
- });
1955
+ return /* @__PURE__ */ jsx(React__default.Fragment, { children: layersId.map((l) => /* @__PURE__ */ jsx(MyLayer, { layerId: l }, l)) });
1965
1956
  };
1966
1957
  const MapRootContainer = styled(MapContainer)`
1958
+ ${leaflet_css}
1967
1959
 
1968
-
1969
-
1970
-
1971
-
1972
-
1973
-
1974
-
1975
-
1976
-
1977
-
1978
-
1979
-
1980
-
1981
-
1982
-
1983
-
1984
-
1985
- ${leaflet_css}
1986
-
1987
- ${(props) => props.theme.components?.M4LMap?.styleOverrides}
1988
-
1960
+ ${(props) => props.theme.components?.M4LMap?.styleOverrides}
1989
1961
  `;
1990
1962
  function Map$1(props) {
1991
1963
  const {
@@ -1994,28 +1966,26 @@ function Map$1(props) {
1994
1966
  initalZoom = 16,
1995
1967
  maxZoom = 22
1996
1968
  } = props;
1997
- return /* @__PURE__ */ jsxs(MapRootContainer, {
1998
- className: mapClasses.root,
1999
- center,
2000
- zoom: initalZoom,
2001
- maxZoom,
2002
- boxZoom: true,
2003
- preferCanvas: true,
2004
- zoomControl: false,
2005
- children: [/* @__PURE__ */ jsx(TileLayers, {}), /* @__PURE__ */ jsx(LayersContainer, {}), /* @__PURE__ */ jsx(Controls, {
2006
- gpsTools
2007
- })]
2008
- });
1969
+ return /* @__PURE__ */ jsxs(
1970
+ MapRootContainer,
1971
+ {
1972
+ className: mapClasses.root,
1973
+ center,
1974
+ zoom: initalZoom,
1975
+ maxZoom,
1976
+ boxZoom: true,
1977
+ preferCanvas: true,
1978
+ zoomControl: false,
1979
+ children: [
1980
+ /* @__PURE__ */ jsx(TileLayers, {}),
1981
+ /* @__PURE__ */ jsx(LayersContainer, {}),
1982
+ /* @__PURE__ */ jsx(Controls, { gpsTools })
1983
+ ]
1984
+ }
1985
+ );
2009
1986
  }
2010
1987
  function CustomMarker(props) {
2011
- const {
2012
- position,
2013
- width,
2014
- height,
2015
- iconForm,
2016
- bearing,
2017
- ...other
2018
- } = props;
1988
+ const { position, width, height, iconForm, bearing, ...other } = props;
2019
1989
  const html = useMemo(() => {
2020
1990
  }, [bearing]);
2021
1991
  const customIcon = useMemo(() => {
@@ -2025,17 +1995,17 @@ function CustomMarker(props) {
2025
1995
  html: `<div>Hola</div>`
2026
1996
  });
2027
1997
  }, [html]);
2028
- return /* @__PURE__ */ jsx(Marker, {
2029
- position,
2030
- icon: customIcon,
2031
- ...other
2032
- });
1998
+ return /* @__PURE__ */ jsx(
1999
+ Marker,
2000
+ {
2001
+ position,
2002
+ icon: customIcon,
2003
+ ...other
2004
+ }
2005
+ );
2033
2006
  }
2034
2007
  const MarkerFeatureRender = (props) => {
2035
- const {
2036
- id,
2037
- layerId
2038
- } = props;
2008
+ const { id, layerId } = props;
2039
2009
  const feature = useMapStore((state) => {
2040
2010
  const gObject = state.hashLayers[layerId].geoJsonObject;
2041
2011
  if (!gObject) {
@@ -2065,17 +2035,17 @@ const MarkerFeatureRender = (props) => {
2065
2035
  if (feature.geometry.type === "Point") {
2066
2036
  const [lat, lng] = feature.geometry.coordinates;
2067
2037
  const bearing = feature.properties?.iconBearing ?? 0;
2068
- return /* @__PURE__ */ jsx(CustomMarker, {
2069
- position: {
2070
- lat,
2071
- lng
2072
- },
2073
- width: 32,
2074
- height: 32,
2075
- bearing,
2076
- iconForm: "grua",
2077
- id: feature.id
2078
- });
2038
+ return /* @__PURE__ */ jsx(
2039
+ CustomMarker,
2040
+ {
2041
+ position: { lat, lng },
2042
+ width: 32,
2043
+ height: 32,
2044
+ bearing,
2045
+ iconForm: "grua",
2046
+ id: feature.id
2047
+ }
2048
+ );
2079
2049
  }
2080
2050
  return null;
2081
2051
  };
@@ -2090,18 +2060,20 @@ const PolylineWithArrows = ({
2090
2060
  useEffect(() => {
2091
2061
  if (polylineRef.current) {
2092
2062
  const decorator = L__default.polylineDecorator(polylineRef.current, {
2093
- patterns: [{
2094
- repeat: 50,
2095
- symbol: L__default.Symbol.arrowHead({
2096
- pixelSize: 4,
2097
- polygon: false,
2098
- pathOptions: {
2099
- stroke: true,
2100
- color: "#ffffff",
2101
- weight: 2
2102
- }
2103
- })
2104
- }]
2063
+ patterns: [
2064
+ {
2065
+ repeat: 50,
2066
+ symbol: L__default.Symbol.arrowHead({
2067
+ pixelSize: 4,
2068
+ polygon: false,
2069
+ pathOptions: {
2070
+ stroke: true,
2071
+ color: "#ffffff",
2072
+ weight: 2
2073
+ }
2074
+ })
2075
+ }
2076
+ ]
2105
2077
  }).addTo(map);
2106
2078
  decoratorRef.current = decorator;
2107
2079
  if (enableEdit) {
@@ -2115,18 +2087,20 @@ const PolylineWithArrows = ({
2115
2087
  }
2116
2088
  if (polylineRef.current) {
2117
2089
  decoratorRef.current = L__default.polylineDecorator(polylineRef.current, {
2118
- patterns: [{
2119
- repeat: 40,
2120
- symbol: L__default.Symbol.arrowHead({
2121
- pixelSize: 4,
2122
- polygon: false,
2123
- pathOptions: {
2124
- stroke: true,
2125
- color: "#cc0000",
2126
- weight: 2
2127
- }
2128
- })
2129
- }]
2090
+ patterns: [
2091
+ {
2092
+ repeat: 40,
2093
+ symbol: L__default.Symbol.arrowHead({
2094
+ pixelSize: 4,
2095
+ polygon: false,
2096
+ pathOptions: {
2097
+ stroke: true,
2098
+ color: "#cc0000",
2099
+ weight: 2
2100
+ }
2101
+ })
2102
+ }
2103
+ ]
2130
2104
  }).addTo(map);
2131
2105
  }
2132
2106
  });
@@ -2137,17 +2111,10 @@ const PolylineWithArrows = ({
2137
2111
  };
2138
2112
  }
2139
2113
  }, [map, enableEdit]);
2140
- return /* @__PURE__ */ jsx(Polyline, {
2141
- positions,
2142
- ref: polylineRef,
2143
- ...other
2144
- });
2114
+ return /* @__PURE__ */ jsx(Polyline, { positions, ref: polylineRef, ...other });
2145
2115
  };
2146
2116
  const CommonFeatureRender = (props) => {
2147
- const {
2148
- id,
2149
- layerId
2150
- } = props;
2117
+ const { id, layerId } = props;
2151
2118
  const feature = useMapStore((state) => {
2152
2119
  const gObject = state.hashLayers[layerId].geoJsonObject;
2153
2120
  if (!gObject) {
@@ -2173,19 +2140,14 @@ const CommonFeatureRender = (props) => {
2173
2140
  return null;
2174
2141
  }
2175
2142
  }, shallow);
2176
- const {
2177
- addLayerDataToFeature
2178
- } = useMapStore((state) => state.mapActions, shallow);
2143
+ const { addLayerDataToFeature } = useMapStore((state) => state.mapActions, shallow);
2179
2144
  const [svg, setSvg] = useState(null);
2180
2145
  useEffect(() => {
2181
2146
  if (!feature) {
2182
2147
  return;
2183
2148
  }
2184
2149
  if (feature.geometry?.type === "Point" && (feature.properties?.subType === "Marker" || feature.properties?.subType === void 0)) {
2185
- const {
2186
- iconUrl,
2187
- markerColor = MARKER_COLOR_DEFAULT
2188
- } = feature?.properties;
2150
+ const { iconUrl, markerColor = MARKER_COLOR_DEFAULT } = feature?.properties;
2189
2151
  const fetchData = async () => {
2190
2152
  if (svg && svg.path === iconUrl && svg.color === markerColor) {
2191
2153
  return;
@@ -2255,23 +2217,22 @@ const CommonFeatureRender = (props) => {
2255
2217
  return /* @__PURE__ */ jsx(
2256
2218
  MarkerIconLabel,
2257
2219
  {
2258
- position: {
2259
- lat,
2260
- lng
2220
+ position: { lat, lng },
2221
+ ...{
2222
+ label,
2223
+ iconSrc: svg?.data,
2224
+ iconScale: scaleIcon,
2225
+ iconRotate: bearingRawToCSS(iconBearing, iconOffsetRotate),
2226
+ iconWidth,
2227
+ iconHeight,
2228
+ labelBkColor,
2229
+ labelColor,
2230
+ offsetLeftTop
2261
2231
  },
2262
- label,
2263
- iconSrc: svg?.data,
2264
- iconScale: scaleIcon,
2265
- iconRotate: bearingRawToCSS(iconBearing, iconOffsetRotate),
2266
- iconWidth,
2267
- iconHeight,
2268
- labelBkColor,
2269
- labelColor,
2270
- offsetLeftTop,
2271
2232
  draggable: false,
2272
2233
  eventHandlers: {
2273
2234
  add: onAddPointLayer,
2274
- click: (e) => {
2235
+ click: (_e) => {
2275
2236
  }
2276
2237
  },
2277
2238
  ...styleProperties,
@@ -2280,31 +2241,34 @@ const CommonFeatureRender = (props) => {
2280
2241
  Math.random()
2281
2242
  );
2282
2243
  } else if (feature.properties?.subType === "Circle" && feature.properties?.radius) {
2283
- const {
2284
- subType,
2285
- radius,
2286
- ...styleProperties
2287
- } = feature.properties;
2288
- return /* @__PURE__ */ jsxs(Fragment, {
2289
- children: [/* @__PURE__ */ jsx(Circle, {
2290
- center: {
2291
- lat,
2292
- lng
2293
- },
2294
- radius: feature.properties?.radius,
2295
- eventHandlers: {
2296
- add: onAddMultipointLayer
2244
+ const { subType, radius, ...styleProperties } = feature.properties;
2245
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
2246
+ /* @__PURE__ */ jsx(
2247
+ Circle,
2248
+ {
2249
+ center: { lat, lng },
2250
+ radius: feature.properties?.radius,
2251
+ eventHandlers: {
2252
+ add: onAddMultipointLayer
2253
+ },
2254
+ ...styleProperties,
2255
+ ...propFeature
2297
2256
  },
2298
- ...styleProperties,
2299
- ...propFeature
2300
- }, Math.random()), feature?.featureLabel && /* @__PURE__ */ jsx(MarkerIconLabel, {
2301
- position: [lat + feature.properties.radius / 111319, lng],
2302
- ...feature?.featureLabel
2303
- })]
2304
- });
2257
+ Math.random()
2258
+ ),
2259
+ feature?.featureLabel && /* @__PURE__ */ jsx(
2260
+ MarkerIconLabel,
2261
+ {
2262
+ position: [lat + feature.properties.radius / 111319, lng],
2263
+ ...feature?.featureLabel
2264
+ }
2265
+ )
2266
+ ] });
2305
2267
  }
2306
2268
  } else if (feature.geometry?.type === "LineString") {
2307
- const polylinePositions = feature.geometry.coordinates.map((coord) => [coord[1], coord[0]]);
2269
+ const polylinePositions = feature.geometry.coordinates.map(
2270
+ (coord) => [coord[1], coord[0]]
2271
+ );
2308
2272
  if (feature.properties?.subType === "PolylineWithArrows") {
2309
2273
  return /* @__PURE__ */ jsx(
2310
2274
  PolylineWithArrows,
@@ -2339,20 +2303,19 @@ const CommonFeatureRender = (props) => {
2339
2303
  );
2340
2304
  }
2341
2305
  } else if (feature.geometry?.type === "Polygon") {
2342
- const polygonPositions = feature.geometry.coordinates.map((ring) => ring.map(([lng, lat]) => [lat, lng]));
2306
+ const polygonPositions = feature.geometry.coordinates.map(
2307
+ (ring) => ring.map(([lng, lat]) => [lat, lng])
2308
+ );
2343
2309
  let topRightPoint = null;
2344
2310
  polygonPositions[0].forEach((coord) => {
2345
- console.log("coord", coord);
2346
2311
  const [lat, lng] = coord;
2347
2312
  if (!topRightPoint || lat >= topRightPoint[0] && lng >= topRightPoint[1]) {
2348
- console.log("coord elegida", coord);
2349
2313
  topRightPoint = coord;
2350
2314
  }
2351
2315
  });
2352
2316
  topRightPoint = topRightPoint || polygonPositions[0][0];
2353
- console.log("Polygon Render", feature.featureLabel?.label, polygonPositions);
2354
- return /* @__PURE__ */ jsxs(React__default.Fragment, {
2355
- children: [/* @__PURE__ */ jsx(
2317
+ return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
2318
+ /* @__PURE__ */ jsx(
2356
2319
  Polygon,
2357
2320
  {
2358
2321
  positions: polygonPositions,
@@ -2363,11 +2326,9 @@ const CommonFeatureRender = (props) => {
2363
2326
  ...feature.properties,
2364
2327
  ...propFeature
2365
2328
  }
2366
- ), feature?.featureLabel && /* @__PURE__ */ jsx(MarkerIconLabel, {
2367
- position: topRightPoint,
2368
- ...feature?.featureLabel
2369
- })]
2370
- });
2329
+ ),
2330
+ feature?.featureLabel && /* @__PURE__ */ jsx(MarkerIconLabel, { position: topRightPoint, ...feature?.featureLabel })
2331
+ ] });
2371
2332
  }
2372
2333
  return null;
2373
2334
  };