@m4l/components 0.2.35 → 1.0.0

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 (529) hide show
  1. package/@types/export.d.ts +274 -441
  2. package/@types/types.d.ts +25 -0
  3. package/components/AccountPopover/classes/types.d.ts +1 -1
  4. package/components/AccountPopover/index.efc74d5c.js +330 -0
  5. package/components/AccountPopover/style.d.ts +2 -0
  6. package/components/AccountPopover/subcomponents/MyAvatar/types.d.ts +6 -6
  7. package/components/AccountPopover/subcomponents/PopOver/types.d.ts +8 -8
  8. package/components/AccountPopover/types.d.ts +3 -3
  9. package/components/AppBar/classes/types.d.ts +1 -1
  10. package/components/AppBar/index.fc126a22.js +94 -0
  11. package/components/AppBar/styles.d.ts +2 -0
  12. package/components/AppBar/tests/utils.d.ts +1 -1
  13. package/components/AppBar/types.d.ts +9 -9
  14. package/components/CommonActions/classes/types.d.ts +1 -1
  15. package/components/CommonActions/components/Actions/index.d.ts +2 -1
  16. package/components/CommonActions/components/Actions/styles.d.ts +2 -0
  17. package/components/CommonActions/components/Actions/types.d.ts +2 -2
  18. package/components/CommonActions/tests/utils.d.ts +1 -1
  19. package/components/DataGrid/assets/icons/datagrid.svg +4 -4
  20. package/components/DataGrid/classes/types.d.ts +1 -1
  21. package/components/DataGrid/styles.d.ts +2 -0
  22. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +8 -0
  23. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +2 -0
  24. package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +6 -0
  25. package/components/DragResizeWindow/DragResizeWindow.d.ts +3 -3
  26. package/components/DragResizeWindow/classes/types.d.ts +1 -1
  27. package/components/DragResizeWindow/index.46b380e1.js +477 -0
  28. package/components/DragResizeWindow/styled.d.ts +2 -0
  29. package/components/DragResizeWindow/types.d.ts +4 -5
  30. package/components/DragResizeWindow/utils.d.ts +1 -1
  31. package/components/DynamicFilter/DynamicFilter.d.ts +1 -7
  32. package/components/DynamicFilter/constants.d.ts +3 -11
  33. package/components/DynamicFilter/dictionary.d.ts +1 -2
  34. package/components/DynamicFilter/dynamicFilterSlots.d.ts +87 -0
  35. package/components/DynamicFilter/helpers/formatToInitialFilters.d.ts +7 -0
  36. package/components/DynamicFilter/helpers/formatToRowFilter.d.ts +7 -0
  37. package/components/DynamicFilter/helpers/getPurgedInitialFiltersApplied.d.ts +11 -0
  38. package/components/DynamicFilter/index.d.ts +1 -2
  39. package/components/DynamicFilter/index.d9168c12.js +2012 -0
  40. package/components/DynamicFilter/store/DynamicFilterContext.d.ts +16 -0
  41. package/components/DynamicFilter/{contexts/DynamicFilterContext/store.d.ts → store/DynamicFilterStore.d.ts} +28 -60
  42. package/components/DynamicFilter/store/useDynamicFilterStore.d.ts +2 -0
  43. package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.d.ts +3 -0
  44. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index.d.ts +1 -0
  45. package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip.d.ts +10 -0
  46. package/components/DynamicFilter/subcomponents/AppliedFilters/AppliedFilters.d.ts +2 -0
  47. package/components/DynamicFilter/subcomponents/AppliedFilters/index.d.ts +1 -0
  48. package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.d.ts +5 -0
  49. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.d.ts +2 -0
  50. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index.d.ts +1 -0
  51. package/components/DynamicFilter/subcomponents/DynamicFilterBase/useDynamicFilterBase.d.ts +4 -0
  52. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/helpers.d.ts +14 -0
  53. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.d.ts +1 -0
  54. package/components/DynamicFilter/subcomponents/FieldTypes/DataTypeComponent.d.ts +7 -0
  55. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.d.ts +14 -0
  56. package/components/DynamicFilter/subcomponents/FieldTypes/FieldTypeInterface.d.ts +21 -0
  57. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers.d.ts +14 -0
  58. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.d.ts +21 -0
  59. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/helpers.d.ts +14 -0
  60. package/components/DynamicFilter/subcomponents/FieldTypes/fieldFactory.d.ts +7 -0
  61. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.d.ts +2 -0
  62. package/components/DynamicFilter/subcomponents/FilterActions/FilterActionsSkeleton.d.ts +2 -0
  63. package/components/DynamicFilter/subcomponents/FilterActions/index.d.ts +1 -0
  64. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +18 -0
  65. package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.d.ts +2 -0
  66. package/components/DynamicFilter/subcomponents/InputFilter/InputFilterSkeleton.d.ts +2 -0
  67. package/components/DynamicFilter/subcomponents/InputFilter/index.d.ts +1 -7
  68. package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.d.ts +40 -0
  69. package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.d.ts +2 -0
  70. package/components/DynamicFilter/subcomponents/PopoverFilter/index.d.ts +1 -14
  71. package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +24 -0
  72. package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.d.ts +7 -0
  73. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index.d.ts +1 -11
  74. package/components/DynamicFilter/subcomponents/PopoverMenuFields/usePopoverMenuFields.d.ts +9 -0
  75. package/components/DynamicFilter/types.d.ts +101 -30
  76. package/components/FieldLabel/classes/types.d.ts +1 -1
  77. package/components/FieldLabel/index.f9cdcc27.js +54 -0
  78. package/components/FieldLabel/styles.d.ts +2 -0
  79. package/components/GridLayout/{index.65470f01.js → index.bb3b7769.js} +526 -501
  80. package/components/GridLayout/styles.d.ts +2 -0
  81. package/components/GridLayout/subcomponents/Griditem/index.bb23f651.js +398 -0
  82. package/components/GridLayout/subcomponents/Responsive/{index.5b3e0521.js → index.b8a2a121.js} +51 -31
  83. package/components/GridLayout/subcomponents/SizeProvider/index.094bc6b5.js +65 -0
  84. package/components/HamburgerMenu/index.5997af31.js +82 -0
  85. package/components/HelperText/{index.7d2afdb3.js → index.be949cdf.js} +14 -22
  86. package/components/HelperText/styles.d.ts +2 -0
  87. package/components/Icon/index.d5fed418.js +420 -0
  88. package/components/Icon/styles.d.ts +4 -0
  89. package/components/Image/index.36a3d440.js +459 -0
  90. package/components/Image/styles.d.ts +2 -0
  91. package/components/Image/tests/utils.d.ts +1 -1
  92. package/components/Image/utils/getRatioValues.d.ts +1 -1
  93. package/components/LanguagePopover/index.e6fa2336.js +184 -0
  94. package/components/LanguagePopover/styles.d.ts +6 -0
  95. package/components/LanguagePopover/tests/utils.d.ts +1 -1
  96. package/components/LinearProgressIndeterminate/classes/types.d.ts +1 -1
  97. package/components/LinearProgressIndeterminate/index.de9d447c.js +53 -0
  98. package/components/LinearProgressIndeterminate/styles.d.ts +2 -0
  99. package/components/Loadable/{index.e994fc3e.js → index.e83cdb4e.js} +3 -8
  100. package/components/LoadingError/classes/types.d.ts +1 -1
  101. package/components/LoadingError/{index.ee29dd48.js → index.9f00c83c.js} +34 -55
  102. package/components/LoadingError/styles.d.ts +2 -0
  103. package/components/LoadingError/types.d.ts +1 -1
  104. package/components/MFLoader/classes/types.d.ts +1 -1
  105. package/components/MFLoader/{index.3a37407c.js → index.402c1acc.js} +55 -75
  106. package/components/MFLoader/styles.d.ts +2 -0
  107. package/components/MFLoader/types.d.ts +4 -4
  108. package/components/ModalDialog/index.ea9189c3.js +68 -0
  109. package/components/NavLink/index.4e548cee.js +55 -0
  110. package/components/NavLink/styles.d.ts +2 -0
  111. package/components/NavLink/tests/utils.d.ts +1 -1
  112. package/components/NavLink/types.d.ts +2 -2
  113. package/components/NoItemSelected/classes/types.d.ts +1 -1
  114. package/components/NoItemSelected/{index.3a479c64.js → index.418c8316.js} +22 -57
  115. package/components/NoItemSelected/styles.d.ts +5 -0
  116. package/components/ObjectLogs/index.bfa7dad3.js +236 -0
  117. package/components/ObjectLogs/styles.d.ts +4 -0
  118. package/components/PDFViewer/classes/types.d.ts +1 -1
  119. package/components/PDFViewer/{index.88c6ff6a.js → index.bb2eca5a.js} +8 -19
  120. package/components/PDFViewer/styles.d.ts +2 -0
  121. package/components/Page/index.fdf04592.js +364 -0
  122. package/components/PaperForm/classes/types.d.ts +1 -1
  123. package/components/PaperForm/index.8121e3da.js +96 -0
  124. package/components/PaperForm/styles.d.ts +7 -0
  125. package/components/PaperForm/types.d.ts +1 -2
  126. package/components/Period/classes/types.d.ts +1 -1
  127. package/components/Period/index.5233694b.js +424 -0
  128. package/components/Period/styles.d.ts +7 -0
  129. package/components/PrintingSystem/classes/types.d.ts +1 -1
  130. package/components/PrintingSystem/{index.27f1f209.js → index.fb176a93.js} +46 -58
  131. package/components/PrintingSystem/styles.d.ts +2 -0
  132. package/components/PrintingSystem/subcomponents/BodyNode/index.c1d61038.js +49 -0
  133. package/components/PrintingSystem/subcomponents/BodyNode/types.d.ts +1 -1
  134. package/components/PrintingSystem/subcomponents/ChartNode/{index.990e164c.js → index.18bd9bad.js} +28 -32
  135. package/components/PrintingSystem/subcomponents/ChartNode/types.d.ts +1 -2
  136. package/components/PrintingSystem/subcomponents/DividerNode/index.67d9f1b4.js +20 -0
  137. package/components/PrintingSystem/subcomponents/DividerNode/types.d.ts +2 -3
  138. package/components/PrintingSystem/subcomponents/FooterNode/index.eaee152a.js +49 -0
  139. package/components/PrintingSystem/subcomponents/FooterNode/types.d.ts +1 -1
  140. package/components/PrintingSystem/subcomponents/GridNode/index.f5f63a2a.js +70 -0
  141. package/components/PrintingSystem/subcomponents/GridNode/types.d.ts +2 -2
  142. package/components/PrintingSystem/subcomponents/HeaderNode/index.7de4e411.js +49 -0
  143. package/components/PrintingSystem/subcomponents/HeaderNode/types.d.ts +1 -1
  144. package/components/PrintingSystem/subcomponents/ImageNode/types.d.ts +2 -3
  145. package/components/PrintingSystem/subcomponents/Pager/types.d.ts +2 -2
  146. package/components/PrintingSystem/subcomponents/PaperNode/index.f9ccf22b.js +30 -0
  147. package/components/PrintingSystem/subcomponents/PaperNode/types.d.ts +2 -2
  148. package/components/PrintingSystem/subcomponents/PropertyValueNode/index.f2f2e903.js +47 -0
  149. package/components/PrintingSystem/subcomponents/PropertyValueNode/types.d.ts +2 -2
  150. package/components/PrintingSystem/subcomponents/QRImageNode/types.d.ts +2 -3
  151. package/components/PrintingSystem/subcomponents/SectionNode/index.540a4b19.js +49 -0
  152. package/components/PrintingSystem/subcomponents/SectionNode/types.d.ts +1 -1
  153. package/components/PrintingSystem/subcomponents/TextBoxNode/index.41e7fcb0.js +24 -0
  154. package/components/PrintingSystem/subcomponents/TextBoxNode/types.d.ts +2 -3
  155. package/components/PrintingSystem/utils/FactoryRender/types.d.ts +1 -1
  156. package/components/PrintingSystem/utils/PageRender/types.d.ts +1 -1
  157. package/components/PropertyValue/classes/types.d.ts +1 -1
  158. package/components/PropertyValue/index.9572c347.js +261 -0
  159. package/components/PropertyValue/styles.d.ts +2 -0
  160. package/components/Resizeable/{index.cb5aad75.js → index.1f0c1359.js} +21 -28
  161. package/components/ResizeableWindow/styles.d.ts +5 -0
  162. package/components/ScrollBar/classes/types.d.ts +1 -1
  163. package/components/ScrollBar/{index.7dfc2f29.js → index.adf0eade.js} +32 -54
  164. package/components/ScrollBar/styles.d.ts +9 -0
  165. package/components/SideBar/classes/index.d.ts +1 -1
  166. package/components/SideBar/context/sideBarContext/index.d.ts +4 -4
  167. package/components/SideBar/index.629ba840.js +849 -0
  168. package/components/SideBar/styles.d.ts +20 -0
  169. package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/styles.d.ts +3 -0
  170. package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +4 -0
  171. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +2 -0
  172. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/styles.d.ts +2 -0
  173. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/styles.d.ts +9 -0
  174. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +2 -2
  175. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/styles.d.ts +2 -0
  176. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +6 -0
  177. package/components/SideBar/subcomponents/ContentMobile/styles.d.ts +3 -0
  178. package/components/SideBar/subcomponents/ContentMobile/subcomponents/types.d.ts +4 -4
  179. package/components/SideBar/tests/constants.d.ts +1 -1
  180. package/components/SideBar/tests/utils.d.ts +1 -1
  181. package/components/SideBar/types.d.ts +2 -2
  182. package/components/SplitLayout/SplitLayout.d.ts +1 -1
  183. package/components/SplitLayout/classes/types.d.ts +1 -1
  184. package/components/SplitLayout/{index.7302ceb3.js → index.74091a81.js} +41 -32
  185. package/components/SplitLayout/styles.d.ts +4 -0
  186. package/components/SplitLayout/tests/utils.d.ts +1 -1
  187. package/components/ToastContainer/ToastContainer.d.ts +1 -1
  188. package/components/ToastContainer/classes/types.d.ts +1 -1
  189. package/components/ToastContainer/{index.4d44ce53.js → index.f9b507b9.js} +15 -31
  190. package/components/ToastContainer/styles.d.ts +2 -0
  191. package/components/ToastContainer/subcomponents/ToastMessage/index.d.ts +1 -1
  192. package/components/ToastContainer/subcomponents/ToastMessage/types.d.ts +1 -1
  193. package/components/ToastContainer/types.d.ts +1 -1
  194. package/components/WrapperComponent/index.57964195.js +14 -0
  195. package/components/animate/AnimatedScroll/styles.d.ts +6 -0
  196. package/components/animate/AnimatedScroll/types.d.ts +3 -3
  197. package/components/animate/LoadingScreen/{index.1d0c4307.js → index.779690a7.js} +26 -42
  198. package/components/animate/LoadingScreen/styles.d.ts +7 -0
  199. package/components/animate/MotionContainer/index.3032bd8f.js +34 -0
  200. package/components/animate/MotionContainer/index.d.ts +9 -9
  201. package/components/animate/MotionLazyContainer/index.d.ts +2 -2
  202. package/components/animate/MotionLazyContainer/{index.572dd012.js → index.d2902a6c.js} +3 -9
  203. package/components/animate/PropagateLoader/index.a9da8d00.js +23 -0
  204. package/components/animate/PropagateLoader/syles.d.ts +2 -0
  205. package/components/animate/{index.5d4575bc.js → index.b8497385.js} +38 -58
  206. package/components/areas/components/AreasAdmin/styles.d.ts +5 -0
  207. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +4 -0
  208. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/types.d.ts +1 -1
  209. package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/index.d.ts +1 -1
  210. package/components/areas/components/AreasViewer/styles.d.ts +2 -0
  211. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index.d.ts +1 -1
  212. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/styles.d.ts +2 -0
  213. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/styles.d.ts +3 -0
  214. package/components/areas/constants.5387d83e.js +412 -0
  215. package/components/areas/contexts/AreasContext/{index.c5a3b322.js → index.bb316000.js} +32 -78
  216. package/components/areas/contexts/DynamicMFParmsContext/{index.1607c78e.js → index.37d1d444.js} +5 -11
  217. package/components/areas/contexts/DynamicMFParmsContext/types.d.ts +2 -2
  218. package/components/areas/contexts/WindowToolsMFContext/{index.8f3e2a04.js → index.69d95c15.js} +5 -13
  219. package/components/areas/contexts/WindowToolsMFContext/types.d.ts +29 -29
  220. package/components/areas/dictionary.7e74022a.js +286 -0
  221. package/components/areas/hooks/useAreas/{index.caa92660.js → index.e24bd74d.js} +1 -1
  222. package/components/areas/hooks/useDynamicMFParameters/{index.e52c5392.js → index.03ce6078.js} +2 -4
  223. package/components/areas/hooks/useWindowToolsMF/{index.b7afaf88.js → index.09801b66.js} +1 -1
  224. package/components/areas/icons.504ec098.js +83 -0
  225. package/components/areas/types.d.ts +17 -17
  226. package/components/commercial/AppBarCommercial/classes/types.d.ts +1 -1
  227. package/components/commercial/AppBarCommercial/styles.d.ts +2 -0
  228. package/components/commercial/AppBarCommercial/types.d.ts +1 -1
  229. package/components/commercial/HamburgerMenu/classes/type.d.ts +1 -1
  230. package/components/commercial/HamburgerMenu/styles.d.ts +13 -0
  231. package/components/commercial/HamburgerMenu/test/utils.d.ts +1 -1
  232. package/components/commercial/HamburgerMenu/types.d.ts +1 -1
  233. package/components/commercial/SectionCommercial/classes/types.d.ts +1 -1
  234. package/components/commercial/SectionCommercial/styles.d.ts +6 -0
  235. package/components/commercial/SectionCommercial/types.d.ts +3 -4
  236. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.d.ts +1 -1
  237. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/styles.d.ts +2 -0
  238. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/types.d.ts +1 -1
  239. package/components/commercial/TopBar/context/index.d.ts +1 -1
  240. package/components/commercial/TopBar/context/type.d.ts +2 -2
  241. package/components/commercial/TopBar/style.d.ts +2 -0
  242. package/components/commercial/TopBar/type.d.ts +2 -2
  243. package/components/commercial/TopBar/utils/isActive/index.d.ts +1 -1
  244. package/components/formatters/FormatterRoot/styles.d.ts +2 -0
  245. package/components/formatters/FormatterRoot/types.d.ts +1 -1
  246. package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -1
  247. package/components/hook-form/RHFAutocomplete/styles.d.ts +2 -0
  248. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +2 -0
  249. package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +5 -0
  250. package/components/hook-form/RHFAutocompleteAsync/tests/utils.d.ts +1 -1
  251. package/components/hook-form/RHFCheckbox/styles.d.ts +7 -0
  252. package/components/hook-form/RHFCheckbox/test/utils.d.ts +1 -1
  253. package/components/hook-form/RHFColorPicker/classes/types.d.ts +1 -1
  254. package/components/hook-form/RHFColorPicker/styles.d.ts +2 -0
  255. package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/types.d.ts +2 -3
  256. package/components/hook-form/RHFColorPicker/types.d.ts +7 -7
  257. package/components/hook-form/RHFDateTime/classes/types.d.ts +1 -1
  258. package/components/hook-form/RHFDateTime/styles.d.ts +2 -0
  259. package/components/hook-form/RHFDateTime/types.d.ts +1 -1
  260. package/components/hook-form/RHFPeriod/classes/types.d.ts +1 -1
  261. package/components/hook-form/RHFPeriod/styles.d.ts +2 -0
  262. package/components/hook-form/RHFRadioGroup/types.d.ts +1 -1
  263. package/components/hook-form/RHFTextField/styles.d.ts +3 -0
  264. package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +3 -0
  265. package/components/hook-form/RHFTextField/tests/utils.d.ts +1 -1
  266. package/components/hook-form/RHFTextFieldPassword/styles.d.ts +2 -0
  267. package/components/hook-form/RHFTextFieldPassword/tests/utils.d.ts +1 -1
  268. package/components/hook-form/RHFTextFieldPassword/types.d.ts +1 -2
  269. package/components/hook-form/RHFUpload/RHFUploadImage/classes/types.d.ts +1 -1
  270. package/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +2 -0
  271. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +2 -0
  272. package/components/maps/components/GpsTools/constants.d.ts +1 -1
  273. package/components/maps/components/GpsTools/contexts/GpsToolsContext/types.d.ts +3 -3
  274. package/components/maps/components/GpsTools/{index.d93188ad.js → index.75880ce0.js} +740 -881
  275. package/components/maps/components/GpsTools/styles.d.ts +2 -0
  276. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles.d.ts +1 -0
  277. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/types.d.ts +2 -2
  278. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/types.d.ts +1 -1
  279. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/types.d.ts +2 -2
  280. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.d.ts +1 -1
  281. package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.d.ts +6 -0
  282. package/components/maps/components/GpsTools/types.d.ts +1 -1
  283. package/components/maps/components/Map/contexts/MapContext/helper.d.ts +1 -1
  284. package/components/maps/components/Map/contexts/MapContext/index.d.ts +1 -1
  285. package/components/maps/components/Map/contexts/MapContext/types.d.ts +6 -6
  286. package/components/maps/components/Map/external/googleMutant/index.d.ts +94 -94
  287. package/components/maps/components/Map/featureRenders/CommonFeatureRender/index.d.ts +1 -1
  288. package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/FeatureDivIconLabel/types.d.ts +1 -1
  289. package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/MarkerIconLabel/types.d.ts +2 -2
  290. package/components/maps/components/Map/featureRenders/MarkerFeatureRender/index.d.ts +1 -1
  291. package/components/maps/components/Map/hooks/useAutoFocus/types.d.ts +2 -2
  292. package/components/maps/components/Map/index.d.ts +1 -1
  293. package/components/maps/components/Map/styled.d.ts +2 -0
  294. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.d.ts +1 -1
  295. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.d.ts +1 -1
  296. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.d.ts +1 -1
  297. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.d.ts +1 -1
  298. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +1 -1
  299. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/types.d.ts +1 -1
  300. package/components/maps/components/Map/subcomponents/Controls/types.d.ts +1 -1
  301. package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/types.d.ts +2 -2
  302. package/components/maps/components/Map/types.d.ts +2 -2
  303. package/components/maps/{components/Map/index.accb1f77.js → index.8ec46ce4.js} +726 -940
  304. package/components/maps/index.d.ts +2 -2
  305. package/components/maps/leaflet-geoman.d.ts +1476 -1633
  306. package/components/modal/WindowBase.a3ac7adc.js +43 -0
  307. package/components/modal/WindowConfirm/types.d.ts +4 -4
  308. package/components/modal/WindowConfirm.e35da619.js +62 -0
  309. package/components/modal/classes/types.d.ts +1 -1
  310. package/components/modal/{index.61389369.js → index.a0e30c8b.js} +8 -6
  311. package/components/mui_extended/Accordion/classes/types.d.ts +1 -1
  312. package/components/mui_extended/Accordion/styles.d.ts +4 -0
  313. package/components/mui_extended/Avatar/classes/types.d.ts +1 -1
  314. package/components/mui_extended/Avatar/styles.d.ts +2 -0
  315. package/components/mui_extended/Avatar/tests/utils.d.ts +1 -1
  316. package/components/mui_extended/Badge/Badge.d.ts +1 -1
  317. package/components/mui_extended/Badge/classes/types.d.ts +1 -1
  318. package/components/mui_extended/Badge/styles.d.ts +2 -0
  319. package/components/mui_extended/Badge/types.d.ts +1 -1
  320. package/components/mui_extended/Button/classes/types.d.ts +2 -2
  321. package/components/mui_extended/Button/styles.d.ts +5 -0
  322. package/components/mui_extended/CheckBox/classes/types.d.ts +1 -1
  323. package/components/mui_extended/CheckBox/styles.d.ts +2 -0
  324. package/components/mui_extended/CheckBox/subcomponents/Skeleton/types.d.ts +1 -1
  325. package/components/mui_extended/CheckBox/types.d.ts +2 -2
  326. package/components/mui_extended/IconButton/styles.d.ts +2 -0
  327. package/components/mui_extended/ImageButton/styles.d.ts +2 -0
  328. package/components/mui_extended/ImageButton/tests/utils.d.ts +1 -1
  329. package/components/mui_extended/LoadingButton/styles.d.ts +2 -0
  330. package/components/mui_extended/LoadingButton/tests/utils.d.ts +1 -1
  331. package/components/mui_extended/MenuActions/classes/types.d.ts +1 -1
  332. package/components/mui_extended/MenuActions/styles.d.ts +5 -0
  333. package/components/mui_extended/Pager/classes/types.d.ts +1 -1
  334. package/components/mui_extended/Pager/styles.d.ts +2 -0
  335. package/components/mui_extended/Pager/subcomponents/CustomTablePagination/types.d.ts +2 -2
  336. package/components/mui_extended/Pager/subcomponents/PagerActions/types.d.ts +1 -1
  337. package/components/mui_extended/Popover/styles.d.ts +1 -0
  338. package/components/mui_extended/Popover/subcomponts/ArrowIcon/index.d.ts +3 -0
  339. package/components/mui_extended/Stack/Stack.d.ts +1 -1
  340. package/components/mui_extended/Stack/classes/types.d.ts +1 -1
  341. package/components/mui_extended/Stack/styles.d.ts +4 -0
  342. package/components/mui_extended/Stack/types.d.ts +1 -1
  343. package/components/mui_extended/Tab/classes/types.d.ts +1 -1
  344. package/components/mui_extended/Tab/styles.d.ts +3 -0
  345. package/components/mui_extended/TabContent/TabContent.d.ts +1 -1
  346. package/components/mui_extended/TabContent/classes/types.d.ts +1 -1
  347. package/components/mui_extended/TabContent/styles.d.ts +2 -0
  348. package/components/mui_extended/TabContent/types.d.ts +1 -1
  349. package/components/mui_extended/Tabs/classes/types.d.ts +1 -1
  350. package/components/mui_extended/Tabs/styles.d.ts +4 -0
  351. package/components/mui_extended/ToggleButton/ToggleButton.d.ts +1 -1
  352. package/components/mui_extended/ToggleIconButton/ToggleIconButton.d.ts +1 -1
  353. package/components/mui_extended/ToggleIconButton/types.d.ts +2 -2
  354. package/components/mui_extended/Tooltip/classes/types.d.ts +1 -1
  355. package/components/mui_extended/Tooltip/types.d.ts +3 -3
  356. package/components/mui_extended/Typography/styles.d.ts +2 -0
  357. package/components/mui_extended/Typography/tests/utils.d.ts +1 -1
  358. package/components/popups/PopupsProvider/{index.d7409f48.js → index.18669fb4.js} +12 -26
  359. package/components/popups/PopupsViewer/index.ba354267.js +166 -0
  360. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +4 -4
  361. package/components/popups/components/PopupsViewer/classes/types.d.ts +1 -1
  362. package/components/popups/components/PopupsViewer/styled.d.ts +2 -0
  363. package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +1 -1
  364. package/contexts/ModalContext/{index.2368bb19.js → index.cf02e6bd.js} +18 -19
  365. package/contexts/RHFormContext/classes/types.d.ts +1 -1
  366. package/contexts/RHFormContext/{index.7b2a8723.js → index.dc955a09.js} +16 -26
  367. package/contexts/RHFormContext/styles.d.ts +2 -0
  368. package/hocs/index.d.ts +1 -0
  369. package/hocs/withToggle/{index.50aec5e4.js → index.548aeace.js} +3 -11
  370. package/hooks/useFormAddEdit/index.f156a2cd.js +86 -0
  371. package/hooks/useFormFocus/index.d.ts +2 -2
  372. package/hooks/useFormFocus/types.d.ts +1 -1
  373. package/hooks/useModal/index.ef54bcf2.js +66 -0
  374. package/hooks/useSizeContainer/{index.62b4e0c4.js → index.3c48670c.js} +1 -1
  375. package/hooks/useTab/{index.976d5e1e.js → index.bce8b99e.js} +1 -1
  376. package/index.d.ts +1 -1
  377. package/index.js +278 -362
  378. package/package.json +13 -2
  379. package/{react-draggable.e4725f3a.js → react-draggable.5331add7.js} +1 -1
  380. package/{react-resizable.c07d63fb.js → react-resizable.37bfb965.js} +3 -5
  381. package/styles/DynamicFilter.styles.d.ts +2 -0
  382. package/test/getNameDataTestId.aee44365.js +10 -0
  383. package/test/getNameDataTestId.d.ts +10 -0
  384. package/test/index.6d4b98b9.js +4 -0
  385. package/utils/containerQuery.d.ts +2 -0
  386. package/utils/{index.6469f148.js → index.9ee4c99a.js} +117 -3
  387. package/utils/index.d.ts +1 -1
  388. package/vendor.a1ce6777.js +6352 -0
  389. package/vite-env.d.ts +4 -4
  390. package/assets/Logo/index.228dcb5a.js +0 -93
  391. package/assets/Logo.d.ts +0 -6
  392. package/components/AccountPopover/index.39efc8f0.js +0 -302
  393. package/components/AppBar/index.c8850b99.js +0 -109
  394. package/components/CommonActions/components/ActionCancel/index.416cbf9b.js +0 -20
  395. package/components/CommonActions/components/ActionFormCancel/index.78267f7c.js +0 -61
  396. package/components/CommonActions/components/ActionFormIntro/index.dcb4d280.js +0 -40
  397. package/components/CommonActions/components/ActionIntro/index.094290fd.js +0 -26
  398. package/components/CommonActions/components/Actions/index.fa7ab18c.js +0 -66
  399. package/components/DataGrid/constants.e334cd50.js +0 -10
  400. package/components/DataGrid/formatters/ColumnBooleanFormatter/index.cd6e553a.js +0 -27
  401. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.0c439ac3.js +0 -30
  402. package/components/DataGrid/formatters/ColumnDateFormatter/index.704db1ca.js +0 -27
  403. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.867b8745.js +0 -26
  404. package/components/DataGrid/formatters/ColumnNestedValueFormatter/index.925387d2.js +0 -19
  405. package/components/DataGrid/formatters/ColumnPointsFormatter/index.4335c26b.js +0 -13
  406. package/components/DataGrid/formatters/ColumnPriceFormatter/index.d717405e.js +0 -13
  407. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index.0b23ba88.js +0 -40
  408. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index.aeea65aa.js +0 -13
  409. package/components/DataGrid/formatters/index.2c2f0ae4.js +0 -1
  410. package/components/DataGrid/index.abe0f9b9.js +0 -979
  411. package/components/DataGrid/subcomponents/Actions/index.4f2071ee.js +0 -663
  412. package/components/DataGrid/subcomponents/editors/TextEditor/index.eac1749c.js +0 -75
  413. package/components/DragResizeWindow/index.13ef022e.js +0 -489
  414. package/components/DynamicFilter/classes/index.d.ts +0 -5
  415. package/components/DynamicFilter/classes/types.d.ts +0 -35
  416. package/components/DynamicFilter/contexts/DynamicFilterContext/helpers.d.ts +0 -23
  417. package/components/DynamicFilter/contexts/DynamicFilterContext/index.d.ts +0 -18
  418. package/components/DynamicFilter/contexts/DynamicFilterContext/types.d.ts +0 -5
  419. package/components/DynamicFilter/hooks/useDynamicFilter.d.ts +0 -2
  420. package/components/DynamicFilter/index.c52a8e96.js +0 -1954
  421. package/components/DynamicFilter/subcomponents/ApplyedFilters/index.d.ts +0 -6
  422. package/components/DynamicFilter/subcomponents/ApplyedFilters/subcomponents/ApplyedFilter/index.d.ts +0 -2
  423. package/components/DynamicFilter/subcomponents/ClearFilters/index.d.ts +0 -1
  424. package/components/DynamicFilter/subcomponents/FilterButton/index.d.ts +0 -11
  425. package/components/DynamicFilter/subcomponents/InnerForHooks/index.d.ts +0 -5
  426. package/components/DynamicFilter/subcomponents/PopoverMenuFields/types.d.ts +0 -6
  427. package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/helpers.d.ts +0 -39
  428. package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/index.d.ts +0 -5
  429. package/components/DynamicFilter/subcomponents/fieldstypes/DateTimeFilter/helpers.d.ts +0 -42
  430. package/components/DynamicFilter/subcomponents/fieldstypes/NumberFilter/helpers.d.ts +0 -36
  431. package/components/DynamicFilter/subcomponents/fieldstypes/SelectFilter/helpers.d.ts +0 -51
  432. package/components/DynamicFilter/subcomponents/fieldstypes/StringFilter/helpers.d.ts +0 -39
  433. package/components/DynamicFilter/subcomponents/fieldstypes/factory.d.ts +0 -82
  434. package/components/DynamicFilter/subcomponents/fieldstypes/validations.d.ts +0 -32
  435. package/components/DynamicFilter/tests/contants.d.ts +0 -5
  436. package/components/FieldLabel/index.0412576c.js +0 -82
  437. package/components/GridLayout/subcomponents/Griditem/index.30016fc1.js +0 -366
  438. package/components/GridLayout/subcomponents/SizeProvider/index.0328ad0a.js +0 -62
  439. package/components/Icon/index.ad330e78.js +0 -184
  440. package/components/Image/index.b799c514.js +0 -203
  441. package/components/LanguagePopover/index.93c48ec5.js +0 -196
  442. package/components/LinearProgressIndeterminate/index.c46da124.js +0 -43
  443. package/components/ModalDialog/index.78c9650a.js +0 -92
  444. package/components/NavLink/index.b75c91e1.js +0 -59
  445. package/components/ObjectLogs/index.1d85a021.js +0 -293
  446. package/components/Page/index.5d34dc4d.js +0 -127
  447. package/components/PaperForm/index.d08b43f6.js +0 -138
  448. package/components/Period/index.3f89d8a4.js +0 -306
  449. package/components/PrintingSystem/subcomponents/BodyNode/index.319a3bb9.js +0 -48
  450. package/components/PrintingSystem/subcomponents/DividerNode/index.e504dbd2.js +0 -19
  451. package/components/PrintingSystem/subcomponents/FooterNode/index.9a19a7cb.js +0 -48
  452. package/components/PrintingSystem/subcomponents/GridNode/index.8d14e1b6.js +0 -71
  453. package/components/PrintingSystem/subcomponents/HeaderNode/index.89e4eaab.js +0 -48
  454. package/components/PrintingSystem/subcomponents/PaperNode/index.dd4ca449.js +0 -46
  455. package/components/PrintingSystem/subcomponents/PropertyValueNode/index.048d7ebf.js +0 -41
  456. package/components/PrintingSystem/subcomponents/SectionNode/index.83f1efea.js +0 -48
  457. package/components/PrintingSystem/subcomponents/TextBoxNode/index.5427cb75.js +0 -28
  458. package/components/PropertyValue/index.15c61a4b.js +0 -209
  459. package/components/SideBar/index.b0359a2b.js +0 -916
  460. package/components/SplitLayout/index.d.ts +0 -2
  461. package/components/WrapperComponent/index.5e872594.js +0 -18
  462. package/components/animate/MotionContainer/index.8d9f9d80.js +0 -33
  463. package/components/animate/PropagateLoader/index.7fab43c8.js +0 -30
  464. package/components/animate/variants/index.7a912140.js +0 -1
  465. package/components/areas/components/AreasAdmin/index.820a00ab.js +0 -737
  466. package/components/areas/components/AreasViewer/index.6d7194e2.js +0 -1086
  467. package/components/areas/components/index.558684b3.js +0 -1
  468. package/components/areas/constants.66529246.js +0 -6
  469. package/components/areas/contexts/index.24025b97.js +0 -1
  470. package/components/areas/dictionary.08cfc4c9.js +0 -36
  471. package/components/areas/hooks/index.d9dc1e21.js +0 -1
  472. package/components/areas/icons.8266ccc8.js +0 -26
  473. package/components/areas/index.4cc6a221.js +0 -22
  474. package/components/commercial/AppBarCommercial/index.9cf586a2.js +0 -30
  475. package/components/commercial/SectionCommercial/index.4dbfc0a7.js +0 -48
  476. package/components/commercial/TopBar/index.93a7d26a.js +0 -275
  477. package/components/commercial/index.89ad149c.js +0 -82
  478. package/components/formatters/BooleanFormatter/index.9ccf9298.js +0 -54
  479. package/components/formatters/DateFormatter/index.578a9f53.js +0 -52
  480. package/components/formatters/PointsFormatter/index.8a4fa393.js +0 -32
  481. package/components/formatters/PriceFormatter/index.83cbe7be.js +0 -43
  482. package/components/formatters/UncertaintyFormatter/index.08e1b79f.js +0 -34
  483. package/components/formatters/index.03471e3f.js +0 -140
  484. package/components/hook-form/HelperError/index.66bbcac3.js +0 -30
  485. package/components/hook-form/RHFAutocomplete/index.1f2afb6b.js +0 -429
  486. package/components/hook-form/RHFAutocompleteAsync/index.bc278965.js +0 -156
  487. package/components/hook-form/RHFCheckbox/index.eca64469.js +0 -143
  488. package/components/hook-form/RHFColorPicker/index.dc13d5a3.js +0 -204
  489. package/components/hook-form/RHFDateTime/index.e554b068.js +0 -203
  490. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +0 -34
  491. package/components/hook-form/RHFPeriod/index.e4e4530f.js +0 -112
  492. package/components/hook-form/RHFRadioGroup/index.1ddb3d93.js +0 -45
  493. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +0 -36
  494. package/components/hook-form/RHFTextField/index.1bfa601f.js +0 -358
  495. package/components/hook-form/RHFUpload/index.6e98b291.js +0 -242
  496. package/components/maps/index.34ab6a68.js +0 -7
  497. package/components/modal/WindowBase.fd86f575.js +0 -74
  498. package/components/modal/WindowConfirm.ee6de236.js +0 -105
  499. package/components/mui_extended/Accordion/index.7dcdfd3a.js +0 -126
  500. package/components/mui_extended/Avatar/index.75e6ed57.js +0 -71
  501. package/components/mui_extended/Badge/index.09f5aee5.js +0 -36
  502. package/components/mui_extended/BoxIcon/index.e638ecc8.js +0 -22
  503. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +0 -94
  504. package/components/mui_extended/Button/index.c3084916.js +0 -221
  505. package/components/mui_extended/CheckBox.2a3b86c5.js +0 -86
  506. package/components/mui_extended/CircularProgress/index.ad569afd.js +0 -10
  507. package/components/mui_extended/IconButton/index.f8a3021b.js +0 -125
  508. package/components/mui_extended/LinearProgress/index.c92b9ba9.js +0 -13
  509. package/components/mui_extended/LinkWithRoute/index.16436ab8.js +0 -30
  510. package/components/mui_extended/MenuActions/index.90f53670.js +0 -175
  511. package/components/mui_extended/Pager/index.ea2a4f3e.js +0 -254
  512. package/components/mui_extended/Popover/index.d85de73b.js +0 -179
  513. package/components/mui_extended/Stack/index.0e53197c.js +0 -39
  514. package/components/mui_extended/Tab/index.9214d9cc.js +0 -156
  515. package/components/mui_extended/ToggleButton/index.191711f3.js +0 -19
  516. package/components/mui_extended/ToggleIconButton/index.d9dbf650.js +0 -19
  517. package/components/mui_extended/Tooltip/index.24a2bc3f.js +0 -43
  518. package/components/mui_extended/Typography/index.379dd374.js +0 -68
  519. package/components/mui_extended/index.b606cd9d.js +0 -1
  520. package/components/popups/PopupsViewer/index.1500ce72.js +0 -186
  521. package/hooks/useFormAddEdit/index.000ce60b.js +0 -94
  522. package/hooks/useModal/index.f73d7e42.js +0 -11
  523. package/style.css +0 -65
  524. package/test/constants_no_mock.86c553a9.js +0 -4
  525. package/test/getNameDataTestId.14875ec7.js +0 -6
  526. /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/DateTimeFilter/index.d.ts +0 -0
  527. /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/NumberFilter/index.d.ts +0 -0
  528. /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/SelectFilter/index.d.ts +0 -0
  529. /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/StringFilter/index.d.ts +0 -0
@@ -1,45 +1,37 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
1
2
  import { createContext, useRef, useEffect, useContext, useState, useMemo, useCallback } from "react";
2
3
  import { useModuleDictionary, useModuleSkeleton, useEnvironment, useHostTools, useNetwork, useModulePrivileges, usePaginate } from "@m4l/core";
3
- import { u as useMapStore, C as CommonFeatureRender, M as MAP_ZINDEX_OVER_MAP, b as MAP_DICCTIONARY } from "../Map/index.accb1f77.js";
4
+ import { M as MAP_DICCTIONARY } from "../../../areas/dictionary.7e74022a.js";
4
5
  import { shallow } from "zustand/shallow";
5
6
  import { createStore, useStore } from "zustand";
6
7
  import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
7
8
  import { devtools } from "zustand/middleware";
8
9
  import { immer } from "zustand/middleware/immer";
9
10
  import { enableMapSet } from "immer";
10
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
11
+ import { u as useMapStore, C as CommonFeatureRender } from "../../index.8ec46ce4.js";
12
+ import { a9 as GeofencesFeaturesLayers, aa as COMPONENT_CLASS_NAME, M as MAP_ZINDEX_OVER_MAP, ab as COMPONENT_MAP_TOOLS_ID, ac as initialValues, ad as STROKE_COLOR_DEFAULT, ae as STROKE_OPACITY_DEFAULT, af as STROKE_WHEIGTH_DEFAULT, ag as STROKE_DASH_ARRAY_DEFAULT, ah as FILL_COLOR_DEFAULT, ai as FILL_OPACITY_DEFAULT, aj as STYLE_OPACITIES, ak as STYLE_WHEIGHTS, al as STYLE_PATTERNS, am as ENDPOINT_GEOFENCE_NEW_EDIT, an as ENDPOINT_GEOFENCE_GET } from "../../../areas/constants.5387d83e.js";
11
13
  import "@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css";
12
14
  import "@geoman-io/leaflet-geoman-free";
13
15
  import { styled } from "@mui/material/styles";
14
16
  import { generateUtilityClasses } from "@mui/material";
15
17
  import "@mui/base";
16
18
  import clsx from "clsx";
17
- import { D as DynamicFilter } from "../../../DynamicFilter/index.c52a8e96.js";
18
- import { C as ColumnDateFormatter } from "../../../DataGrid/formatters/ColumnDateFormatter/index.704db1ca.js";
19
+ import { G as GPSTOOLSICONS } from "../../../areas/icons.504ec098.js";
20
+ import { D as DynamicFilter } from "../../../DynamicFilter/index.d9168c12.js";
21
+ import { j as ColumnDateFormatter, d as Actions, H as HelperError, B as Button, k as ActionFormIntro, a as RHFTextField, S as Stack, R as RHFAutocomplete, l as RHFColorPicker, m as Tabs, n as Tab, o as Tooltip, p as TabContent, q as TabProvider, g as DataGrid } from "../../../../vendor.a1ce6777.js";
19
22
  import { useFormContext, useWatch } from "react-hook-form";
20
- import { H as HelperError } from "../../../hook-form/HelperError/index.66bbcac3.js";
21
- import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.d7409f48.js";
22
- import { A as ActionFormIntro } from "../../../CommonActions/components/ActionFormIntro/index.dcb4d280.js";
23
- import { A as Actions } from "../../../CommonActions/components/Actions/index.fa7ab18c.js";
24
- import { B as Button } from "../../../mui_extended/Button/index.c3084916.js";
23
+ import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.18669fb4.js";
25
24
  import { useMap } from "react-leaflet";
26
25
  import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index.f60f500e.js";
27
26
  import * as L from "leaflet";
28
- import { u as useTab } from "../../../../hooks/useTab/index.976d5e1e.js";
29
- import { P as PaperForm } from "../../../PaperForm/index.d08b43f6.js";
30
- import { R as RHFAutocomplete } from "../../../hook-form/RHFAutocomplete/index.1f2afb6b.js";
31
- import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.1bfa601f.js";
32
- import { S as Stack } from "../../../mui_extended/Stack/index.0e53197c.js";
33
- import { P as PropertyValue } from "../../../PropertyValue/index.15c61a4b.js";
34
- import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index.dc13d5a3.js";
35
- import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index.9214d9cc.js";
36
- import { T as Tooltip } from "../../../mui_extended/Tooltip/index.24a2bc3f.js";
27
+ import { u as useTab } from "../../../../hooks/useTab/index.bce8b99e.js";
28
+ import { P as PaperForm } from "../../../PaperForm/index.8121e3da.js";
29
+ import { P as PropertyValue } from "../../../PropertyValue/index.9572c347.js";
37
30
  import * as Yup from "yup";
38
- import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.7b2a8723.js";
39
- import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.000ce60b.js";
40
- import { u as useModal } from "../../../../hooks/useModal/index.f73d7e42.js";
41
- import { W as WindowConfirm } from "../../../modal/WindowConfirm.ee6de236.js";
42
- import { c as DataGrid } from "../../../DataGrid/index.abe0f9b9.js";
31
+ import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.dc955a09.js";
32
+ import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.f156a2cd.js";
33
+ import { u as useModal } from "../../../../hooks/useModal/index.ef54bcf2.js";
34
+ import { W as WindowConfirm } from "../../../modal/WindowConfirm.e35da619.js";
43
35
  enableMapSet();
44
36
  const createGpsToolsStore = (initProps) => {
45
37
  const startProps = {
@@ -92,7 +84,10 @@ const createGpsToolsStore = (initProps) => {
92
84
  },
93
85
  updatePartialGeofence: (geofenceId, geofence) => {
94
86
  set((state) => {
95
- state.geofenceState.hashGeofences[geofenceId] = { ...state.geofenceState.hashGeofences[geofenceId], ...geofence };
87
+ state.geofenceState.hashGeofences[geofenceId] = {
88
+ ...state.geofenceState.hashGeofences[geofenceId],
89
+ ...geofence
90
+ };
96
91
  });
97
92
  },
98
93
  updateRows: (newRows) => {
@@ -135,12 +130,8 @@ const createGpsToolsStore = (initProps) => {
135
130
  };
136
131
  const GpsToolsContext = createContext(null);
137
132
  function GpsToolsProvider(props) {
138
- const {
139
- children
140
- } = props;
141
- const {
142
- getLabel
143
- } = useModuleDictionary();
133
+ const { children } = props;
134
+ const { getLabel } = useModuleDictionary();
144
135
  const isDesktop = useResponsiveDesktop();
145
136
  const isSkeleton = useModuleSkeleton();
146
137
  const isFirstRender = useFirstRender([getLabel]);
@@ -156,10 +147,11 @@ function GpsToolsProvider(props) {
156
147
  }
157
148
  });
158
149
  }
159
- const {
160
- setHandlerGetLabel,
161
- setExternalState
162
- } = useStore(mapStoreRef.current, (state) => state.gpsToolsActions, shallow);
150
+ const { setHandlerGetLabel, setExternalState } = useStore(
151
+ mapStoreRef.current,
152
+ (state) => state.gpsToolsActions,
153
+ shallow
154
+ );
163
155
  useEffect(() => {
164
156
  if (!isFirstRender) {
165
157
  setHandlerGetLabel(getLabel);
@@ -169,15 +161,9 @@ function GpsToolsProvider(props) {
169
161
  if (isFirstRender) {
170
162
  return;
171
163
  }
172
- setExternalState({
173
- isMobile: !isDesktop,
174
- isSkeleton
175
- });
164
+ setExternalState({ isMobile: !isDesktop, isSkeleton });
176
165
  }, [isDesktop, isSkeleton]);
177
- return /* @__PURE__ */ jsx(GpsToolsContext.Provider, {
178
- value: mapStoreRef.current,
179
- children
180
- });
166
+ return /* @__PURE__ */ jsx(GpsToolsContext.Provider, { value: mapStoreRef.current, children });
181
167
  }
182
168
  function useGpsToolsStore(selector, equalityFn) {
183
169
  const context = useContext(GpsToolsContext);
@@ -185,22 +171,9 @@ function useGpsToolsStore(selector, equalityFn) {
185
171
  throw new Error("useGpsToolsStore context must be use inside GpsToolsContext");
186
172
  return useStore(context, selector, equalityFn);
187
173
  }
188
- const ENDPOINT_GEOFENCE_GET = "geofences";
189
- const ENDPOINT_GEOFENCE_NEW_EDIT = "geofences";
190
- var GeofencesFeaturesLayers = /* @__PURE__ */ ((GeofencesFeaturesLayers2) => {
191
- GeofencesFeaturesLayers2["LAYER_GEOFENCES"] = "geofences";
192
- GeofencesFeaturesLayers2["LAYER_GEOFENCES_TRANSIT_FEATURES"] = "geofencesCrossingFeatures";
193
- GeofencesFeaturesLayers2["LAYER_GEOFENCES_INTERNAL_FEATURES"] = "geofencesInternalFeatures";
194
- return GeofencesFeaturesLayers2;
195
- })(GeofencesFeaturesLayers || {});
196
174
  function useLayers() {
197
- const {
198
- addLayer,
199
- removeLayer
200
- } = useMapStore((state) => state.mapActions, shallow);
201
- const {
202
- init
203
- } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
175
+ const { addLayer, removeLayer } = useMapStore((state) => state.mapActions, shallow);
176
+ const { init } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
204
177
  useEffect(() => {
205
178
  addLayer({
206
179
  layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES,
@@ -246,70 +219,6 @@ function useLayers() {
246
219
  };
247
220
  }, []);
248
221
  }
249
- const COMPONENT_CLASS_NAME = "M4LGpsTools";
250
- const COMPONENT_MAP_TOOLS_ID = "gps_tools";
251
- const STYLE_OPACITIES = [
252
- {
253
- value: 0,
254
- label: "0%"
255
- },
256
- {
257
- value: 0.1,
258
- label: "10%"
259
- },
260
- {
261
- value: 0.2,
262
- label: "20%"
263
- },
264
- {
265
- value: 0.3,
266
- label: "30%"
267
- },
268
- {
269
- value: 0.4,
270
- label: "40%"
271
- },
272
- {
273
- value: 0.5,
274
- label: "50%"
275
- },
276
- {
277
- value: 1,
278
- label: "100%"
279
- }
280
- ];
281
- const STYLE_WHEIGHTS = [
282
- {
283
- value: 0,
284
- label: "0px"
285
- },
286
- {
287
- value: 1,
288
- label: "1px"
289
- },
290
- {
291
- value: 2,
292
- label: "2px"
293
- },
294
- {
295
- value: 3,
296
- label: "3px"
297
- },
298
- {
299
- value: 4,
300
- label: "4px"
301
- }
302
- ];
303
- const STYLE_PATTERNS = [
304
- {
305
- value: "",
306
- label: "------"
307
- },
308
- {
309
- value: "4 1 2",
310
- label: "-- - - --"
311
- }
312
- ];
313
222
  const gpsToolsClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
314
223
  "gpsToolsRoot",
315
224
  "gpsToolsTab",
@@ -323,59 +232,33 @@ const gpsToolsClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
323
232
  "hidden"
324
233
  ]);
325
234
  const DivGpsToolsRoot = styled("div")`
326
- position:relative;
327
- display:flex;
328
- flex-direction:column;
329
- flex-grow:1;
330
- width:100%;
331
- height:100%;
332
-
333
-
334
- z-index:${MAP_ZINDEX_OVER_MAP};
335
-
235
+ position: relative;
236
+ display: flex;
237
+ flex-direction: column;
238
+ flex-grow: 1;
239
+ width: 100%;
240
+ height: 100%;
336
241
 
337
- .${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
338
- display:none;
339
- }
340
-
341
-
342
- .${gpsToolsClasses.gpsToolsGeofencesList} .M4LDataGrid-root{
343
- height:unset!important;
344
- flex-grow:1;
345
- }
242
+ z-index: ${MAP_ZINDEX_OVER_MAP};
346
243
 
244
+ .${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
245
+ display: none;
246
+ }
347
247
 
348
- .${gpsToolsClasses.toolGeofencesAddEditGeneral} {
349
- flex-grow:1;
350
- }
248
+ .${gpsToolsClasses.gpsToolsGeofencesList} .M4LDataGrid-root {
249
+ height: unset !important;
250
+ flex-grow: 1;
251
+ }
351
252
 
253
+ .${gpsToolsClasses.toolGeofencesAddEditGeneral} {
254
+ flex-grow: 1;
255
+ }
352
256
 
353
- ${(props) => props.theme.components?.M4LGpsTools?.styleOverrides}
257
+ ${(props) => props.theme.components?.M4LGpsTools?.styleOverrides}
354
258
  `;
355
- const GPSTOOLSICONS = {
356
- GEOMETRY_CIRCLE: "geometry_circle.svg",
357
- GEOMETRY_RECTANGLE: "geometry_rectangle.svg",
358
- GEOMETRY_POLYGON: "geometry_polygon.svg",
359
- ADD: "add.svg",
360
- MEASURE: "measure.svg",
361
- GENERAL: "general.svg",
362
- CONFIG: "config.svg",
363
- STROKE: "stroke.svg",
364
- FILL: "fill.svg",
365
- EDIT: "edit.svg",
366
- DELETE: "delete.svg",
367
- ACTIVE: "active.svg",
368
- NAME: "name.svg"
369
- };
370
259
  function Filter(props) {
371
- const {
372
- refresh,
373
- setBackendQueryParams
374
- } = props;
375
- const {
376
- host_static_assets,
377
- environment_assets
378
- } = useEnvironment();
260
+ const { refresh, setBackendQueryParams } = props;
261
+ const { host_static_assets, environment_assets } = useEnvironment();
379
262
  const [initialFilter] = useState(() => {
380
263
  return [];
381
264
  });
@@ -385,88 +268,84 @@ function Filter(props) {
385
268
  });
386
269
  refresh();
387
270
  };
388
- return /* @__PURE__ */ jsx(DynamicFilter, {
389
- withAllField: true,
390
- onChangeFilters: onChangeFilter,
391
- fields: [{
392
- name: "id",
393
- dictionaryId: MAP_DICCTIONARY.LABEL_ID,
394
- type: "number",
395
- multiple: true,
396
- presence: "optional",
397
- urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.ACTIVE}`
398
- }, {
399
- name: "name",
400
- dictionaryId: MAP_DICCTIONARY.LABEL_NAME,
401
- type: "string",
402
- multiple: true,
403
- presence: "optional",
404
- urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.NAME}`
405
- }],
406
- initialApplyedFilters: initialFilter
407
- });
408
- }
409
- function useColumns(props) {
410
- const {
411
- getLabel
412
- } = useModuleDictionary();
413
- const columns = useMemo(() => [
271
+ return /* @__PURE__ */ jsx(
272
+ DynamicFilter,
414
273
  {
415
- key: "id",
416
- name: getLabel(MAP_DICCTIONARY.LABEL_ID),
417
- type: "number",
418
- width: 40,
419
- visible: false
420
- },
421
- {
422
- key: "name",
423
- name: getLabel(MAP_DICCTIONARY.LABEL_NAME),
424
- type: "string",
425
- width: 300
426
- },
427
- {
428
- key: "created_at",
429
- name: getLabel(MAP_DICCTIONARY.LABEL_CREATED_AT),
430
- type: "date",
431
- formatter: ColumnDateFormatter({
432
- presentationType: "datetime",
433
- fieldValue: "row.created_at"
434
- }),
435
- visible: false
436
- },
437
- {
438
- key: "updated_at",
439
- name: getLabel(MAP_DICCTIONARY.LABEL_UPDATED_AT),
440
- type: "date",
441
- formatter: ColumnDateFormatter({
442
- presentationType: "datetime",
443
- fieldValue: "row.updated_at"
444
- }),
445
- visible: false
274
+ withAllField: true,
275
+ onChangeFilters: onChangeFilter,
276
+ fields: [
277
+ {
278
+ name: "id",
279
+ dictionaryId: MAP_DICCTIONARY.LABEL_ID,
280
+ type: "number",
281
+ multiple: true,
282
+ presence: "optional",
283
+ urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.ACTIVE}`
284
+ },
285
+ {
286
+ name: "name",
287
+ dictionaryId: MAP_DICCTIONARY.LABEL_NAME,
288
+ type: "string",
289
+ multiple: true,
290
+ presence: "optional",
291
+ urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.NAME}`
292
+ }
293
+ ],
294
+ initialAppliedFilters: initialFilter
446
295
  }
447
- ], [getLabel]);
448
- return {
449
- columns
450
- };
296
+ );
297
+ }
298
+ function useColumns(_props) {
299
+ const { getLabel } = useModuleDictionary();
300
+ const columns = useMemo(
301
+ () => [
302
+ {
303
+ key: "id",
304
+ name: getLabel(MAP_DICCTIONARY.LABEL_ID),
305
+ type: "number",
306
+ width: 40,
307
+ visible: false
308
+ },
309
+ {
310
+ key: "name",
311
+ name: getLabel(MAP_DICCTIONARY.LABEL_NAME),
312
+ type: "string",
313
+ width: 300
314
+ },
315
+ {
316
+ key: "created_at",
317
+ name: getLabel(MAP_DICCTIONARY.LABEL_CREATED_AT),
318
+ type: "date",
319
+ formatter: ColumnDateFormatter({
320
+ presentationType: "datetime",
321
+ fieldValue: "row.created_at"
322
+ }),
323
+ visible: false
324
+ },
325
+ {
326
+ key: "updated_at",
327
+ name: getLabel(MAP_DICCTIONARY.LABEL_UPDATED_AT),
328
+ type: "date",
329
+ formatter: ColumnDateFormatter({
330
+ presentationType: "datetime",
331
+ fieldValue: "row.updated_at"
332
+ }),
333
+ visible: false
334
+ }
335
+ ],
336
+ [getLabel]
337
+ );
338
+ return { columns };
451
339
  }
452
340
  function MyActions(props) {
453
- const {
454
- geofenceId
455
- } = props;
456
- const {
457
- control
458
- } = useFormContext();
341
+ const { geofenceId } = props;
342
+ const { control } = useFormContext();
459
343
  const inEdition = useWatch({
460
344
  control,
461
345
  name: "inEdition"
462
346
  });
463
- const {
464
- closePopup,
465
- showPopup
466
- } = usePopupsStore((state) => state.popupsActions);
467
- const {
468
- addCheckedGeofence
469
- } = useGpsToolsStore((state) => state.geofenceActions);
347
+ const { closePopup, showPopup } = usePopupsStore((state) => state.popupsActions);
348
+ const { addCheckedGeofence } = useGpsToolsStore((state) => state.geofenceActions);
470
349
  const onClickCancel = () => {
471
350
  closePopup("geofencesAddEdit");
472
351
  if (geofenceId !== void 0) {
@@ -474,45 +353,12 @@ function MyActions(props) {
474
353
  }
475
354
  showPopup("gpsTools");
476
355
  };
477
- return /* @__PURE__ */ jsxs(Actions, {
478
- children: [/* @__PURE__ */ jsx(HelperError, {
479
- name: "geometry"
480
- }), /* @__PURE__ */ jsx(Button, {
481
- onClick: onClickCancel,
482
- disabled: inEdition,
483
- children: "Cancelar"
484
- }), /* @__PURE__ */ jsx(ActionFormIntro, {
485
- disabled: inEdition
486
- })]
487
- });
356
+ return /* @__PURE__ */ jsxs(Actions, { children: [
357
+ /* @__PURE__ */ jsx(HelperError, { name: "geometry" }),
358
+ /* @__PURE__ */ jsx(Button, { onClick: onClickCancel, disabled: inEdition, children: "Cancelar" }),
359
+ /* @__PURE__ */ jsx(ActionFormIntro, { disabled: inEdition })
360
+ ] });
488
361
  }
489
- const STROKE_COLOR_DEFAULT = "#aaccaa";
490
- const STROKE_OPACITY_DEFAULT = { value: 1, label: "100%" };
491
- const STROKE_WHEIGTH_DEFAULT = { value: 1, label: "1 px" };
492
- const STROKE_DASH_ARRAY_DEFAULT = { value: "", label: "-----" };
493
- const FILL_COLOR_DEFAULT = "#aa3000";
494
- const FILL_OPACITY_DEFAULT = { value: 0.2, label: "20%" };
495
- const initialValues = {
496
- name: "",
497
- geofenceType: null,
498
- alias: null,
499
- customerId: null,
500
- timeMinInSeconds: 5,
501
- timeMinOutSeconds: 5,
502
- inEdition: false,
503
- geometry: null,
504
- lat: null,
505
- lng: null,
506
- properties: {
507
- radius: null,
508
- strokeColor: STROKE_COLOR_DEFAULT,
509
- strokeOpacity: STROKE_OPACITY_DEFAULT,
510
- strokeWeight: STROKE_WHEIGTH_DEFAULT,
511
- strokeDashArray: STROKE_DASH_ARRAY_DEFAULT,
512
- fillColor: FILL_COLOR_DEFAULT,
513
- fillOpacity: FILL_OPACITY_DEFAULT
514
- }
515
- };
516
362
  const formatDataEnpoint = (response) => {
517
363
  try {
518
364
  const { data } = response;
@@ -531,7 +377,6 @@ const formatDataEnpoint = (response) => {
531
377
  fillOpacity: FILL_OPACITY_DEFAULT
532
378
  }
533
379
  };
534
- console.log("formatDataEnpoint", obRet);
535
380
  if (obRet.geofenceType?.id === "gt_circle") {
536
381
  if (data.properties.radius) {
537
382
  obRet.properties.radius = data.properties.radius;
@@ -549,30 +394,32 @@ const formatDataEnpoint = (response) => {
549
394
  const getLayerFromGeometry = (geometry, geofenceTypeId, radius, options) => {
550
395
  if (geometry) {
551
396
  if (geofenceTypeId === "gt_circle" && geometry.type === "Point") {
552
- return L.circle([geometry.coordinates[1], geometry.coordinates[0]], radius || 0, options);
397
+ return L.circle(
398
+ [geometry.coordinates[1], geometry.coordinates[0]],
399
+ radius || 0,
400
+ options
401
+ );
553
402
  } else if (geofenceTypeId === "gt_polygon" && geometry.type === "Polygon") {
554
403
  const coordinates = geometry.coordinates.map(
555
404
  (ring) => ring.map((position) => [position[1], position[0]])
556
405
  );
557
406
  return L.polygon(coordinates, options);
558
407
  } else if (geofenceTypeId === "gt_rectangle" && geometry.type === "Polygon") {
559
- const latLngs = geometry.coordinates[0].map((coord) => [coord[1], coord[0]]);
560
- const lats = latLngs.map(
561
- (coord) => {
562
- if (Array.isArray(coord)) {
563
- return coord[0];
564
- }
565
- return 0;
566
- }
408
+ const latLngs = geometry.coordinates[0].map(
409
+ (coord) => [coord[1], coord[0]]
567
410
  );
568
- const lngs = latLngs.map(
569
- (coord) => {
570
- if (Array.isArray(coord)) {
571
- return coord[1];
572
- }
573
- return 0;
411
+ const lats = latLngs.map((coord) => {
412
+ if (Array.isArray(coord)) {
413
+ return coord[0];
574
414
  }
575
- );
415
+ return 0;
416
+ });
417
+ const lngs = latLngs.map((coord) => {
418
+ if (Array.isArray(coord)) {
419
+ return coord[1];
420
+ }
421
+ return 0;
422
+ });
576
423
  const southWest = [Math.min(...lats), Math.min(...lngs)];
577
424
  const northEast = [Math.max(...lats), Math.max(...lngs)];
578
425
  return L.rectangle([southWest, northEast], options);
@@ -615,14 +462,6 @@ function useDrawing() {
615
462
  const [geometrTypeIdCached, setgeofenceTypeIdCached] = useState(geofenceTypeId);
616
463
  useEffect(() => {
617
464
  if (geometry) {
618
- console.log("useEffect geometry load", geometry, {
619
- color: strokeColor,
620
- opacity: strokeOpacity,
621
- weight: strokeWeight,
622
- dashArray: strokeDashArray,
623
- fillColor,
624
- fillOpacity
625
- });
626
465
  currentLayer.current = getLayerFromGeometry(geometry, geofenceTypeId, radius, {
627
466
  color: strokeColor,
628
467
  opacity: strokeOpacity,
@@ -683,17 +522,15 @@ function useDrawing() {
683
522
  if (shape === "Circle") {
684
523
  map.on("pm:drawstart", ({ workingLayer }) => {
685
524
  workingLayer.on("pm:centerplaced", (e) => {
686
- var layer = e.workingLayer;
687
- layer.setStyle(
688
- {
689
- color: strokeColor,
690
- opacity: strokeOpacity,
691
- weight: strokeWeight,
692
- dashArray: strokeDashArray,
693
- fillColor,
694
- fillOpacity
695
- }
696
- );
525
+ const layer = e.workingLayer;
526
+ layer.setStyle({
527
+ color: strokeColor,
528
+ opacity: strokeOpacity,
529
+ weight: strokeWeight,
530
+ dashArray: strokeDashArray,
531
+ fillColor,
532
+ fillOpacity
533
+ });
697
534
  setValue("lat", layer.getLatLng().lat);
698
535
  setValue("lng", layer.getLatLng().lng);
699
536
  layer.on("pm:change", (_e) => {
@@ -705,31 +542,27 @@ function useDrawing() {
705
542
  } else if (shape === "Polygon") {
706
543
  map.on("pm:drawstart", ({ workingLayer }) => {
707
544
  workingLayer.on("pm:vertexadded", (e) => {
708
- var layer = e.workingLayer;
709
- layer.setStyle(
710
- {
711
- color: strokeColor,
712
- opacity: strokeOpacity,
713
- weight: strokeWeight,
714
- dashArray: strokeDashArray,
715
- fillColor,
716
- fillOpacity
717
- }
718
- );
545
+ const layer = e.workingLayer;
546
+ layer.setStyle({
547
+ color: strokeColor,
548
+ opacity: strokeOpacity,
549
+ weight: strokeWeight,
550
+ dashArray: strokeDashArray,
551
+ fillColor,
552
+ fillOpacity
553
+ });
719
554
  });
720
555
  });
721
556
  }
722
557
  map.pm.enableDraw(shape);
723
- map.pm.setPathOptions(
724
- {
725
- color: strokeColor,
726
- opacity: strokeOpacity,
727
- weight: strokeWeight,
728
- dashArray: strokeDashArray,
729
- fillColor,
730
- fillOpacity
731
- }
732
- );
558
+ map.pm.setPathOptions({
559
+ color: strokeColor,
560
+ opacity: strokeOpacity,
561
+ weight: strokeWeight,
562
+ dashArray: strokeDashArray,
563
+ fillColor,
564
+ fillOpacity
565
+ });
733
566
  map.on("pm:create", (e) => {
734
567
  currentLayer.current = e.layer;
735
568
  setValue("geometry", currentLayer.current.toGeoJSON()?.geometry, {
@@ -744,7 +577,6 @@ function useDrawing() {
744
577
  setValue("inEdition", true);
745
578
  currentLayer.current.on("pm:disable", (e) => {
746
579
  currentLayer.current = e.layer;
747
- console.log("Geometr\xEDa editada **", currentLayer.current.toGeoJSON());
748
580
  setValue("geometry", currentLayer.current.toGeoJSON()?.geometry, {
749
581
  shouldTouch: false,
750
582
  shouldValidate: true
@@ -807,10 +639,16 @@ function useSumbitErrorsFocus() {
807
639
  if (isSubmitted) {
808
640
  const firstError = Object.keys(errors).reduce((field, a) => {
809
641
  const fieldKey = field;
810
- return !!errors[fieldKey] ? fieldKey : a;
642
+ return errors[fieldKey] ? fieldKey : a;
811
643
  }, null);
812
644
  if (firstError) {
813
- let found = ["name", "geometry", "geofenceType", "timeMinInSeconds", "timeMinOutSeconds"].some((field) => field.includes(firstError));
645
+ const found = [
646
+ "name",
647
+ "geometry",
648
+ "geofenceType",
649
+ "timeMinInSeconds",
650
+ "timeMinOutSeconds"
651
+ ].some((field) => field.includes(firstError));
814
652
  if (found) {
815
653
  handleChange(null, "general");
816
654
  }
@@ -822,287 +660,323 @@ function useSumbitErrorsFocus() {
822
660
  }, [isSubmitted, errors]);
823
661
  }
824
662
  function GeneralData() {
825
- const {
826
- getLabel
827
- } = useModuleDictionary();
828
- const {
829
- host_static_assets,
830
- environment_assets
831
- } = useEnvironment();
832
- const {
833
- inEdition,
834
- handleDraw,
835
- handleFinish,
836
- geometrTypeIdCached
837
- } = useDrawing();
663
+ const { getLabel } = useModuleDictionary();
664
+ const { host_static_assets, environment_assets } = useEnvironment();
665
+ const { inEdition, handleDraw, handleFinish, geometrTypeIdCached } = useDrawing();
838
666
  useSumbitErrorsFocus();
839
667
  const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GENERAL}`;
840
668
  const geofencesTypes = useMemo(() => {
841
- return [{
842
- id: "gt_circle",
843
- name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_CIRCLE),
844
- url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_CIRCLE}`
845
- }, {
846
- id: "gt_polygon",
847
- name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_POLYGON),
848
- url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_POLYGON}`
849
- }, {
850
- id: "gt_rectangle",
851
- name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_RECTANGLE),
852
- url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_RECTANGLE}`
853
- }];
669
+ return [
670
+ {
671
+ id: "gt_circle",
672
+ name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_CIRCLE),
673
+ url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_CIRCLE}`
674
+ },
675
+ {
676
+ id: "gt_polygon",
677
+ name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_POLYGON),
678
+ url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_POLYGON}`
679
+ },
680
+ {
681
+ id: "gt_rectangle",
682
+ name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_RECTANGLE),
683
+ url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_RECTANGLE}`
684
+ }
685
+ ];
854
686
  }, [getLabel]);
855
- return /* @__PURE__ */ jsxs(PaperForm, {
856
- urlIcon,
857
- title: getLabel(MAP_DICCTIONARY.PAPER_GENERAL),
858
- children: [/* @__PURE__ */ jsx(RHFTextField, {
859
- name: "name",
860
- disabled: false,
861
- type: "text",
862
- label: getLabel(`${MAP_DICCTIONARY.LABEL_NAME}`)
863
- }), /* @__PURE__ */ jsxs(Stack, {
864
- direction: "column",
865
- spacing: 1,
866
- alignItems: "center",
867
- children: [/* @__PURE__ */ jsxs(Stack, {
868
- direction: "row",
869
- spacing: 1,
870
- alignItems: "center",
871
- children: [/* @__PURE__ */ jsx(RHFAutocomplete, {
872
- name: "geofenceType",
873
- autoComplete: "off",
874
- options: geofencesTypes,
875
- getOptionLabel: (option) => option.name,
876
- isOptionEqualToValue: (option, value) => option.id === value.id,
877
- getOptionUrlImage: (option) => option.url,
878
- label: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_TYPE)
879
- }), /* @__PURE__ */ jsx(Button, {
880
- onClick: handleDraw,
881
- disabled: inEdition || !geometrTypeIdCached,
882
- children: getLabel(MAP_DICCTIONARY.LABEL_DRAW)
883
- }), /* @__PURE__ */ jsx(Button, {
884
- onClick: handleFinish,
885
- disabled: !inEdition,
886
- children: getLabel(MAP_DICCTIONARY.LABEL_FINISH)
887
- })]
888
- }), geometrTypeIdCached && geometrTypeIdCached === "gt_circle" && /* @__PURE__ */ jsxs(Stack, {
889
- direction: "row",
890
- spacing: 1,
891
- alignItems: "center",
892
- children: [/* @__PURE__ */ jsx(RHFTextField, {
893
- name: "properties.radius",
894
- label: getLabel(MAP_DICCTIONARY.LABEL_RADIUS),
895
- autoComplete: "on",
896
- skeletonWidth: "70%",
897
- skeletonHeight: "18px",
898
- disabled: true,
899
- size: "medium"
900
- }), /* @__PURE__ */ jsx(RHFTextField, {
901
- name: "lat",
902
- label: getLabel(MAP_DICCTIONARY.LABEL_LAT),
903
- autoComplete: "on",
904
- skeletonWidth: "70%",
905
- skeletonHeight: "18px",
906
- disabled: true,
907
- size: "medium"
908
- }), /* @__PURE__ */ jsx(RHFTextField, {
909
- name: "lng",
910
- label: getLabel(MAP_DICCTIONARY.LABEL_LON),
911
- autoComplete: "on",
912
- skeletonWidth: "70%",
913
- skeletonHeight: "18px",
914
- disabled: true,
915
- size: "medium"
916
- })]
917
- })]
918
- })]
919
- });
687
+ return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_GENERAL), children: [
688
+ /* @__PURE__ */ jsx(
689
+ RHFTextField,
690
+ {
691
+ name: "name",
692
+ disabled: false,
693
+ type: "text",
694
+ label: getLabel(`${MAP_DICCTIONARY.LABEL_NAME}`)
695
+ }
696
+ ),
697
+ /* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 1, alignItems: "center", children: [
698
+ /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
699
+ /* @__PURE__ */ jsx(
700
+ RHFAutocomplete,
701
+ {
702
+ name: "geofenceType",
703
+ autoComplete: "off",
704
+ options: geofencesTypes,
705
+ getOptionLabel: (option) => option.name,
706
+ isOptionEqualToValue: (option, value) => option.id === value.id,
707
+ getOptionUrlImage: (option) => option.url,
708
+ label: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_TYPE)
709
+ }
710
+ ),
711
+ /* @__PURE__ */ jsx(Button, { onClick: handleDraw, disabled: inEdition || !geometrTypeIdCached, children: getLabel(MAP_DICCTIONARY.LABEL_DRAW) }),
712
+ /* @__PURE__ */ jsx(Button, { onClick: handleFinish, disabled: !inEdition, children: getLabel(MAP_DICCTIONARY.LABEL_FINISH) })
713
+ ] }),
714
+ geometrTypeIdCached && geometrTypeIdCached === "gt_circle" && /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
715
+ /* @__PURE__ */ jsx(
716
+ RHFTextField,
717
+ {
718
+ name: "properties.radius",
719
+ label: getLabel(MAP_DICCTIONARY.LABEL_RADIUS),
720
+ autoComplete: "on",
721
+ skeletonWidth: "70%",
722
+ skeletonHeight: "18px",
723
+ disabled: true,
724
+ size: "medium"
725
+ }
726
+ ),
727
+ /* @__PURE__ */ jsx(
728
+ RHFTextField,
729
+ {
730
+ name: "lat",
731
+ label: getLabel(MAP_DICCTIONARY.LABEL_LAT),
732
+ autoComplete: "on",
733
+ skeletonWidth: "70%",
734
+ skeletonHeight: "18px",
735
+ disabled: true,
736
+ size: "medium"
737
+ }
738
+ ),
739
+ /* @__PURE__ */ jsx(
740
+ RHFTextField,
741
+ {
742
+ name: "lng",
743
+ label: getLabel(MAP_DICCTIONARY.LABEL_LON),
744
+ autoComplete: "on",
745
+ skeletonWidth: "70%",
746
+ skeletonHeight: "18px",
747
+ disabled: true,
748
+ size: "medium"
749
+ }
750
+ )
751
+ ] })
752
+ ] })
753
+ ] });
920
754
  }
921
755
  function ConfigData() {
922
- const {
923
- getLabel
924
- } = useModuleDictionary();
925
- const {
926
- host_static_assets,
927
- environment_assets
928
- } = useEnvironment();
756
+ const { getLabel } = useModuleDictionary();
757
+ const { host_static_assets, environment_assets } = useEnvironment();
929
758
  const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.CONFIG}`;
930
- return /* @__PURE__ */ jsxs(PaperForm, {
931
- urlIcon,
932
- title: getLabel(MAP_DICCTIONARY.PAPER_CONFIG),
933
- children: [/* @__PURE__ */ jsx(RHFTextField, {
934
- name: "alias",
935
- disabled: false,
936
- type: "text",
937
- label: getLabel(`${MAP_DICCTIONARY.LABEL_ALIAS}`)
938
- }), /* @__PURE__ */ jsx(RHFTextField, {
939
- name: "customerId",
940
- disabled: false,
941
- type: "text",
942
- label: getLabel(`${MAP_DICCTIONARY.LABEL_CUSTOMER_ID}`)
943
- }), /* @__PURE__ */ jsx(RHFTextField, {
944
- name: "timeMinInSeconds",
945
- disabled: false,
946
- type: "number",
947
- label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_IN_SECONDS}`)
948
- }), /* @__PURE__ */ jsx(RHFTextField, {
949
- name: "timeMinOutSeconds",
950
- disabled: false,
951
- type: "number",
952
- label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_OUT_SECONDS}`)
953
- })]
954
- });
759
+ return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_CONFIG), children: [
760
+ /* @__PURE__ */ jsx(
761
+ RHFTextField,
762
+ {
763
+ name: "alias",
764
+ disabled: false,
765
+ type: "text",
766
+ label: getLabel(`${MAP_DICCTIONARY.LABEL_ALIAS}`)
767
+ }
768
+ ),
769
+ /* @__PURE__ */ jsx(
770
+ RHFTextField,
771
+ {
772
+ name: "customerId",
773
+ disabled: false,
774
+ type: "text",
775
+ label: getLabel(`${MAP_DICCTIONARY.LABEL_CUSTOMER_ID}`)
776
+ }
777
+ ),
778
+ /* @__PURE__ */ jsx(
779
+ RHFTextField,
780
+ {
781
+ name: "timeMinInSeconds",
782
+ disabled: false,
783
+ type: "number",
784
+ label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_IN_SECONDS}`)
785
+ }
786
+ ),
787
+ /* @__PURE__ */ jsx(
788
+ RHFTextField,
789
+ {
790
+ name: "timeMinOutSeconds",
791
+ disabled: false,
792
+ type: "number",
793
+ label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_OUT_SECONDS}`)
794
+ }
795
+ )
796
+ ] });
955
797
  }
956
798
  function FillData() {
957
- const {
958
- getLabel
959
- } = useModuleDictionary();
960
- const {
961
- host_static_assets,
962
- environment_assets
963
- } = useEnvironment();
799
+ const { getLabel } = useModuleDictionary();
800
+ const { host_static_assets, environment_assets } = useEnvironment();
964
801
  const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.FILL}`;
965
- return /* @__PURE__ */ jsxs(PaperForm, {
966
- urlIcon,
967
- title: getLabel(MAP_DICCTIONARY.PAPER_STROKE),
968
- children: [/* @__PURE__ */ jsx(PropertyValue, {
969
- property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
970
- isForm: true,
971
- propertyWidth: 150,
972
- value: /* @__PURE__ */ jsx(RHFColorPicker, {
973
- name: "properties.fillColor"
974
- })
975
- }, "properties.fillColor"), /* @__PURE__ */ jsx(PropertyValue, {
976
- property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
977
- isForm: true,
978
- propertyWidth: 150,
979
- value: /* @__PURE__ */ jsx(RHFAutocomplete, {
980
- name: "properties.fillOpacity",
981
- autoComplete: "off",
982
- options: STYLE_OPACITIES,
983
- getOptionLabel: (option) => option.label,
984
- isOptionEqualToValue: (option, value) => option.value === value.value,
985
- label: "ssss"
986
- })
987
- }, "properties.fillOpacity")]
988
- });
802
+ return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_STROKE), children: [
803
+ /* @__PURE__ */ jsx(
804
+ PropertyValue,
805
+ {
806
+ property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
807
+ isForm: true,
808
+ propertyWidth: 150,
809
+ value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.fillColor" })
810
+ },
811
+ "properties.fillColor"
812
+ ),
813
+ /* @__PURE__ */ jsx(
814
+ PropertyValue,
815
+ {
816
+ property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
817
+ isForm: true,
818
+ propertyWidth: 150,
819
+ value: /* @__PURE__ */ jsx(
820
+ RHFAutocomplete,
821
+ {
822
+ name: "properties.fillOpacity",
823
+ autoComplete: "off",
824
+ options: STYLE_OPACITIES,
825
+ getOptionLabel: (option) => option.label,
826
+ isOptionEqualToValue: (option, value) => option.value === value.value,
827
+ label: "ssss"
828
+ }
829
+ )
830
+ },
831
+ "properties.fillOpacity"
832
+ )
833
+ ] });
989
834
  }
990
835
  function StrokeData() {
991
- const {
992
- getLabel
993
- } = useModuleDictionary();
994
- const {
995
- host_static_assets,
996
- environment_assets
997
- } = useEnvironment();
836
+ const { getLabel } = useModuleDictionary();
837
+ const { host_static_assets, environment_assets } = useEnvironment();
998
838
  const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.STROKE}`;
999
- return /* @__PURE__ */ jsxs(PaperForm, {
1000
- urlIcon,
1001
- title: getLabel(MAP_DICCTIONARY.PAPER_STROKE),
1002
- children: [/* @__PURE__ */ jsx(PropertyValue, {
1003
- property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
1004
- isForm: true,
1005
- propertyWidth: 150,
1006
- value: /* @__PURE__ */ jsx(RHFColorPicker, {
1007
- name: "properties.strokeColor"
1008
- })
1009
- }, "properties.strokeColor"), /* @__PURE__ */ jsx(PropertyValue, {
1010
- property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
1011
- isForm: true,
1012
- propertyWidth: 150,
1013
- value: /* @__PURE__ */ jsx(RHFAutocomplete, {
1014
- name: "properties.strokeOpacity",
1015
- autoComplete: "off",
1016
- options: STYLE_OPACITIES,
1017
- getOptionLabel: (option) => option.label,
1018
- isOptionEqualToValue: (option, value) => option.value === value.value,
1019
- label: "ssss"
1020
- })
1021
- }, "properties.strokeOpacity"), /* @__PURE__ */ jsx(PropertyValue, {
1022
- property: getLabel(`${MAP_DICCTIONARY.LABEL_WEIGHT}`),
1023
- isForm: true,
1024
- propertyWidth: 150,
1025
- value: /* @__PURE__ */ jsx(RHFAutocomplete, {
1026
- name: "properties.strokeWeight",
1027
- autoComplete: "off",
1028
- options: STYLE_WHEIGHTS,
1029
- getOptionLabel: (option) => option.label,
1030
- isOptionEqualToValue: (option, value) => option.value === value.value,
1031
- label: "ssss"
1032
- })
1033
- }, "properties.strokeWeight"), /* @__PURE__ */ jsx(PropertyValue, {
1034
- property: getLabel(`${MAP_DICCTIONARY.LABEL_DASH_ARRAY}`),
1035
- isForm: true,
1036
- propertyWidth: 150,
1037
- value: /* @__PURE__ */ jsx(RHFAutocomplete, {
1038
- name: "properties.strokeDashArray",
1039
- autoComplete: "off",
1040
- options: STYLE_PATTERNS,
1041
- getOptionLabel: (option) => option.label,
1042
- isOptionEqualToValue: (option, value) => option.value === value.value,
1043
- label: "ssss"
1044
- })
1045
- }, "properties.strokeDashArray")]
1046
- });
839
+ return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_STROKE), children: [
840
+ /* @__PURE__ */ jsx(
841
+ PropertyValue,
842
+ {
843
+ property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
844
+ isForm: true,
845
+ propertyWidth: 150,
846
+ value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.strokeColor" })
847
+ },
848
+ "properties.strokeColor"
849
+ ),
850
+ /* @__PURE__ */ jsx(
851
+ PropertyValue,
852
+ {
853
+ property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
854
+ isForm: true,
855
+ propertyWidth: 150,
856
+ value: /* @__PURE__ */ jsx(
857
+ RHFAutocomplete,
858
+ {
859
+ name: "properties.strokeOpacity",
860
+ autoComplete: "off",
861
+ options: STYLE_OPACITIES,
862
+ getOptionLabel: (option) => option.label,
863
+ isOptionEqualToValue: (option, value) => option.value === value.value,
864
+ label: "ssss"
865
+ }
866
+ )
867
+ },
868
+ "properties.strokeOpacity"
869
+ ),
870
+ /* @__PURE__ */ jsx(
871
+ PropertyValue,
872
+ {
873
+ property: getLabel(`${MAP_DICCTIONARY.LABEL_WEIGHT}`),
874
+ isForm: true,
875
+ propertyWidth: 150,
876
+ value: /* @__PURE__ */ jsx(
877
+ RHFAutocomplete,
878
+ {
879
+ name: "properties.strokeWeight",
880
+ autoComplete: "off",
881
+ options: STYLE_WHEIGHTS,
882
+ getOptionLabel: (option) => option.label,
883
+ isOptionEqualToValue: (option, value) => option.value === value.value,
884
+ label: "ssss"
885
+ }
886
+ )
887
+ },
888
+ "properties.strokeWeight"
889
+ ),
890
+ /* @__PURE__ */ jsx(
891
+ PropertyValue,
892
+ {
893
+ property: getLabel(`${MAP_DICCTIONARY.LABEL_DASH_ARRAY}`),
894
+ isForm: true,
895
+ propertyWidth: 150,
896
+ value: /* @__PURE__ */ jsx(
897
+ RHFAutocomplete,
898
+ {
899
+ name: "properties.strokeDashArray",
900
+ autoComplete: "off",
901
+ options: STYLE_PATTERNS,
902
+ getOptionLabel: (option) => option.label,
903
+ isOptionEqualToValue: (option, value) => option.value === value.value,
904
+ label: "ssss"
905
+ }
906
+ )
907
+ },
908
+ "properties.strokeDashArray"
909
+ )
910
+ ] });
1047
911
  }
1048
912
  function StyleData() {
1049
- return /* @__PURE__ */ jsxs(Fragment, {
1050
- children: [/* @__PURE__ */ jsx(StrokeData, {}), /* @__PURE__ */ jsx(FillData, {})]
1051
- });
913
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
914
+ /* @__PURE__ */ jsx(StrokeData, {}),
915
+ /* @__PURE__ */ jsx(FillData, {})
916
+ ] });
1052
917
  }
1053
918
  function MyTabs() {
1054
- const {
1055
- getLabel
1056
- } = useModuleDictionary();
1057
- const {
1058
- currentTab,
1059
- handleChange
1060
- } = useTab();
919
+ const { getLabel } = useModuleDictionary();
920
+ const { currentTab, handleChange } = useTab();
1061
921
  const geofenceAddEditTabs = useMemo(() => {
1062
- return [{
1063
- value: "general",
1064
- icon: void 0,
1065
- components: /* @__PURE__ */ jsxs(Fragment, {
1066
- children: [/* @__PURE__ */ jsx(GeneralData, {}), /* @__PURE__ */ jsx(ConfigData, {})]
1067
- }),
1068
- toolTip: getLabel(MAP_DICCTIONARY.TAB_GENERAL_CONFIG_TOOLTIP),
1069
- className: gpsToolsClasses.toolGeofencesAddEditGeneral
1070
- }, {
1071
- value: "style",
1072
- icon: void 0,
1073
- components: /* @__PURE__ */ jsx(StyleData, {}),
1074
- toolTip: getLabel(MAP_DICCTIONARY.TAB_STYLE_CONFIG_TOOLTIP),
1075
- className: gpsToolsClasses.toolGeofencesAddEditStyle
1076
- }];
922
+ return [
923
+ {
924
+ value: "general",
925
+ icon: void 0,
926
+ components: /* @__PURE__ */ jsxs(Fragment, { children: [
927
+ /* @__PURE__ */ jsx(GeneralData, {}),
928
+ /* @__PURE__ */ jsx(ConfigData, {})
929
+ ] }),
930
+ toolTip: getLabel(MAP_DICCTIONARY.TAB_GENERAL_CONFIG_TOOLTIP),
931
+ className: gpsToolsClasses.toolGeofencesAddEditGeneral
932
+ },
933
+ {
934
+ value: "style",
935
+ icon: void 0,
936
+ components: /* @__PURE__ */ jsx(StyleData, {}),
937
+ toolTip: getLabel(MAP_DICCTIONARY.TAB_STYLE_CONFIG_TOOLTIP),
938
+ className: gpsToolsClasses.toolGeofencesAddEditStyle
939
+ }
940
+ ];
1077
941
  }, [getLabel]);
1078
- return /* @__PURE__ */ jsxs("div", {
1079
- className: gpsToolsClasses.gpsToolsGeofencesAddEditContent,
1080
- children: [/* @__PURE__ */ jsx(Tabs, {
1081
- value: currentTab,
1082
- scrollButtons: "auto",
1083
- variant: "scrollable",
1084
- allowScrollButtonsMobile: true,
1085
- onChange: (_e, newValue) => handleChange(_e, newValue),
1086
- children: geofenceAddEditTabs.map((tab) => /* @__PURE__ */ jsx(Tab, {
1087
- value: tab.value,
1088
- icon: tab.icon,
1089
- label: /* @__PURE__ */ jsx(Tooltip, {
1090
- title: tab.toolTip,
1091
- children: /* @__PURE__ */ jsx("span", {
1092
- children: tab.toolTip
1093
- })
1094
- }),
1095
- SKTWidth: "100px",
1096
- SKTHeight: "14px"
1097
- }, tab.value))
1098
- }), geofenceAddEditTabs.map((tab) => {
942
+ return /* @__PURE__ */ jsxs("div", { className: gpsToolsClasses.gpsToolsGeofencesAddEditContent, children: [
943
+ /* @__PURE__ */ jsx(
944
+ Tabs,
945
+ {
946
+ value: currentTab,
947
+ scrollButtons: "auto",
948
+ variant: "scrollable",
949
+ allowScrollButtonsMobile: true,
950
+ onChange: (_e, newValue) => handleChange(_e, newValue),
951
+ children: geofenceAddEditTabs.map((tab) => /* @__PURE__ */ jsx(
952
+ Tab,
953
+ {
954
+ value: tab.value,
955
+ icon: tab.icon,
956
+ label: /* @__PURE__ */ jsx(Tooltip, { title: tab.toolTip, children: /* @__PURE__ */ jsx("span", { children: tab.toolTip }) }),
957
+ SKTWidth: "100px",
958
+ SKTHeight: "14px"
959
+ },
960
+ tab.value
961
+ ))
962
+ }
963
+ ),
964
+ geofenceAddEditTabs.map((tab) => {
1099
965
  const isMatched = tab.value === currentTab;
1100
- return /* @__PURE__ */ jsx(TabContent, {
1101
- className: clsx(gpsToolsClasses.gpsToolsTabContent, tab.className, isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden),
1102
- children: tab.components
1103
- }, tab.value);
1104
- })]
1105
- });
966
+ return /* @__PURE__ */ jsx(
967
+ TabContent,
968
+ {
969
+ className: clsx(
970
+ gpsToolsClasses.gpsToolsTabContent,
971
+ tab.className,
972
+ isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
973
+ ),
974
+ children: tab.components
975
+ },
976
+ tab.value
977
+ );
978
+ })
979
+ ] });
1106
980
  }
1107
981
  function GeneralDataValidation(getLabel) {
1108
982
  return {
@@ -1169,10 +1043,7 @@ function useSubmit(props) {
1169
1043
  bodyToSnakeCase: true,
1170
1044
  isRemote: false
1171
1045
  }).then((response) => {
1172
- toast(
1173
- response.message,
1174
- { type: "success" }
1175
- );
1046
+ toast(response.message, { type: "success" });
1176
1047
  closePopup("geofencesAddEdit");
1177
1048
  showPopup("gpsTools");
1178
1049
  if (objectId !== void 0) {
@@ -1187,27 +1058,23 @@ function useSubmit(props) {
1187
1058
  return { onSubmit };
1188
1059
  }
1189
1060
  const RHFormProviderStyled = styled(RHFormProvider)`
1190
- height:100%!important;
1191
-
1192
- .${gpsToolsClasses.gpsToolsGeofencesAddEditContent} {
1193
- display:flex;
1194
- flex-direction:column;
1195
- flex-grow:1;
1196
- height:100%;
1197
- }
1061
+ height: 100% !important;
1198
1062
 
1063
+ .${gpsToolsClasses.gpsToolsGeofencesAddEditContent} {
1064
+ display: flex;
1065
+ flex-direction: column;
1066
+ flex-grow: 1;
1067
+ height: 100%;
1068
+ }
1199
1069
 
1200
- .${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
1201
- display:none;
1202
- }
1203
-
1070
+ .${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
1071
+ display: none;
1072
+ }
1204
1073
 
1205
- ${(props) => props.theme.components?.M4LGpsToolsGeofencesAddEdit?.styleOverrides}
1074
+ ${(props) => props.theme.components?.M4LGpsToolsGeofencesAddEdit?.styleOverrides}
1206
1075
  `;
1207
1076
  function GeofenceAddEdit(props) {
1208
- const {
1209
- geofenceId
1210
- } = props;
1077
+ const { geofenceId } = props;
1211
1078
  const [finalInitalValues, omitCallEnpoint] = useGpsToolsStore((state) => {
1212
1079
  if (geofenceId === void 0) {
1213
1080
  return [initialValues, false];
@@ -1232,17 +1099,12 @@ function GeofenceAddEdit(props) {
1232
1099
  customerId: geofence.customerId
1233
1100
  }
1234
1101
  };
1235
- console.log("emulateResponse", emulateResponse);
1236
1102
  return [formatDataEnpoint(emulateResponse), true];
1237
1103
  } else {
1238
1104
  return [initialValues, false];
1239
1105
  }
1240
1106
  });
1241
- console.log("finalInitalValues", finalInitalValues);
1242
- const {
1243
- formValues,
1244
- statusLoad
1245
- } = useFormAddEdit({
1107
+ const { formValues, statusLoad } = useFormAddEdit({
1246
1108
  objectId: geofenceId,
1247
1109
  formatDataEnpoint,
1248
1110
  initialValues: finalInitalValues,
@@ -1250,144 +1112,116 @@ function GeofenceAddEdit(props) {
1250
1112
  isRemote: false,
1251
1113
  omitCallEnpoint
1252
1114
  });
1253
- const {
1254
- validationSchema
1255
- } = useValidation();
1256
- const {
1257
- onSubmit
1258
- } = useSubmit({
1259
- objectId: geofenceId
1260
- });
1261
- return /* @__PURE__ */ jsxs(RHFormProviderStyled, {
1262
- statusLoad,
1263
- onSubmit,
1264
- values: formValues,
1265
- validationSchema,
1266
- className: gpsToolsClasses.gpsToolsGeofencesAddEdit,
1267
- children: [/* @__PURE__ */ jsx(TabProvider, {
1268
- initialValue: "general",
1269
- children: /* @__PURE__ */ jsx(MyTabs, {})
1270
- }), /* @__PURE__ */ jsx(MyActions, {
1271
- ...props
1272
- })]
1273
- });
1115
+ const { validationSchema } = useValidation();
1116
+ const { onSubmit } = useSubmit({ objectId: geofenceId });
1117
+ return /* @__PURE__ */ jsxs(
1118
+ RHFormProviderStyled,
1119
+ {
1120
+ statusLoad,
1121
+ onSubmit,
1122
+ values: formValues,
1123
+ validationSchema,
1124
+ className: gpsToolsClasses.gpsToolsGeofencesAddEdit,
1125
+ children: [
1126
+ /* @__PURE__ */ jsx(TabProvider, { initialValue: "general", children: /* @__PURE__ */ jsx(MyTabs, {}) }),
1127
+ /* @__PURE__ */ jsx(MyActions, { ...props })
1128
+ ]
1129
+ }
1130
+ );
1274
1131
  }
1275
1132
  function useRowActionsGetter(props) {
1276
- const {
1277
- fullRefresh
1278
- } = props;
1279
- const {
1280
- networkOperation
1281
- } = useNetwork();
1282
- const {
1283
- openModal,
1284
- closeModal
1285
- } = useModal();
1286
- const {
1287
- getLabel
1288
- } = useModuleDictionary();
1289
- const {
1290
- hasPrivilege
1291
- } = useModulePrivileges();
1292
- const {
1293
- host_static_assets,
1294
- environment_assets
1295
- } = useEnvironment();
1296
- const {
1297
- hidePopup,
1298
- addPopup
1299
- } = usePopupsStore((state) => state.popupsActions, shallow);
1300
- const {
1301
- removeCheckedGeofence
1302
- } = useGpsToolsStore((state) => state.geofenceActions, shallow);
1303
- const {
1304
- toast
1305
- } = useHostTools();
1133
+ const { fullRefresh } = props;
1134
+ const { networkOperation } = useNetwork();
1135
+ const { openModal, closeModal } = useModal();
1136
+ const { getLabel } = useModuleDictionary();
1137
+ const { hasPrivilege } = useModulePrivileges();
1138
+ const { host_static_assets, environment_assets } = useEnvironment();
1139
+ const { hidePopup, addPopup } = usePopupsStore((state) => state.popupsActions, shallow);
1140
+ const { removeCheckedGeofence } = useGpsToolsStore((state) => state.geofenceActions, shallow);
1141
+ const { toast } = useHostTools();
1306
1142
  const isDesktop = useResponsiveDesktop();
1307
- const [urlIconEdit] = useState(`${host_static_assets}/${environment_assets}/frontend/components/maptools/assets/icons/${GPSTOOLSICONS.EDIT}`);
1308
- const [urlIconDelete] = useState(`${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/maptools/assets/icons/${GPSTOOLSICONS.DELETE}`);
1143
+ const [urlIconEdit] = useState(
1144
+ `${host_static_assets}/${environment_assets}/frontend/components/maptools/assets/icons/${GPSTOOLSICONS.EDIT}`
1145
+ );
1146
+ const [urlIconDelete] = useState(
1147
+ `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/maptools/assets/icons/${GPSTOOLSICONS.DELETE}`
1148
+ );
1309
1149
  const goEdit = (objectId) => {
1310
- console.log("onClickAddGeofence");
1311
1150
  hidePopup("gpsTools");
1312
1151
  addPopup({
1313
1152
  popupId: "geofencesAddEdit",
1314
1153
  title: "geofencesAddEdit",
1315
- componentProps: {
1316
- fullRefresh,
1317
- geofenceId: objectId
1318
- },
1154
+ componentProps: { fullRefresh, geofenceId: objectId },
1319
1155
  functionComponent: GeofenceAddEdit,
1320
1156
  defaultPosition: {
1321
- vertical: {
1322
- top: 50,
1323
- bottom: 50
1324
- },
1325
- horizontal: {
1326
- right: 50,
1327
- width: 380
1328
- }
1157
+ vertical: { top: 50, bottom: 50 },
1158
+ horizontal: { right: 50, width: 380 }
1329
1159
  },
1330
1160
  iconUrl: ""
1331
1161
  });
1332
1162
  removeCheckedGeofence(objectId);
1333
1163
  };
1334
- const onDelete = useCallback((row) => {
1335
- openModal({
1336
- window: /* @__PURE__ */ jsx(WindowConfirm, {
1337
- title: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_TITLE),
1338
- msg: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_MESSAGE),
1339
- onClickIntro: () => onConfirmDelete(row)
1340
- }),
1341
- variant: "delete",
1342
- initialWidth: 300,
1343
- initialHeigth: 350
1344
- });
1345
- }, [getLabel]);
1164
+ const onDelete = useCallback(
1165
+ (row) => {
1166
+ openModal({
1167
+ window: /* @__PURE__ */ jsx(
1168
+ WindowConfirm,
1169
+ {
1170
+ title: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_TITLE),
1171
+ msg: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_MESSAGE),
1172
+ onClickIntro: () => onConfirmDelete(row)
1173
+ }
1174
+ ),
1175
+ variant: "delete",
1176
+ initialWidth: 300,
1177
+ initialHeigth: 350
1178
+ });
1179
+ },
1180
+ [getLabel]
1181
+ );
1346
1182
  const onConfirmDelete = useCallback((row) => {
1347
1183
  networkOperation({
1348
1184
  method: "DELETE",
1349
1185
  endPoint: `geofences/${row.id}`
1350
1186
  }).then((response) => {
1351
- toast(response.message, {
1352
- type: "success"
1353
- });
1187
+ toast(response.message, { type: "success" });
1354
1188
  fullRefresh();
1355
1189
  });
1356
1190
  closeModal();
1357
1191
  }, []);
1358
- const rowActionsGetter = useCallback((row) => {
1359
- const conditionalItems = [];
1360
- conditionalItems.push({
1361
- urlIcon: urlIconEdit,
1362
- dictionaryId: MAP_DICCTIONARY.ROW_ACTION_GEO_EDIT,
1363
- onClick: () => {
1364
- goEdit(row.id);
1365
- },
1366
- disabled: !row.authUserOptions.edit
1367
- });
1368
- return conditionalItems;
1369
- }, [hasPrivilege, goEdit, onDelete, urlIconDelete, urlIconEdit, isDesktop]);
1370
- return {
1371
- rowActionsGetter
1372
- };
1192
+ const rowActionsGetter = useCallback(
1193
+ (row) => {
1194
+ const conditionalItems = [];
1195
+ conditionalItems.push({
1196
+ urlIcon: urlIconEdit,
1197
+ dictionaryId: MAP_DICCTIONARY.ROW_ACTION_GEO_EDIT,
1198
+ onClick: () => {
1199
+ goEdit(row.id);
1200
+ },
1201
+ disabled: !row.authUserOptions.edit
1202
+ });
1203
+ return conditionalItems;
1204
+ },
1205
+ [hasPrivilege, goEdit, onDelete, urlIconDelete, urlIconEdit, isDesktop]
1206
+ );
1207
+ return { rowActionsGetter };
1373
1208
  }
1374
1209
  function useCheckedGeofences() {
1375
1210
  const layersIds = useMapStore((state) => state.layersIds, shallow);
1376
- const [checkedGeofences, hashGeofences] = useGpsToolsStore((state) => [state.geofenceState.checkedGeofences, state.geofenceState.hashGeofences], shallow);
1377
- const {
1378
- setCheckedGeofences,
1379
- updatePartialGeofence
1380
- } = useGpsToolsStore((state) => state.geofenceActions, shallow);
1381
- const {
1382
- setFeatureData,
1383
- removeFeature,
1384
- getFeatureIds
1385
- } = useMapStore((state) => state.mapActions, shallow);
1386
- const {
1387
- networkOperation
1388
- } = useNetwork();
1211
+ const [checkedGeofences, hashGeofences] = useGpsToolsStore(
1212
+ (state) => [state.geofenceState.checkedGeofences, state.geofenceState.hashGeofences],
1213
+ shallow
1214
+ );
1215
+ const { setCheckedGeofences, updatePartialGeofence } = useGpsToolsStore(
1216
+ (state) => state.geofenceActions,
1217
+ shallow
1218
+ );
1219
+ const { setFeatureData, removeFeature, getFeatureIds } = useMapStore(
1220
+ (state) => state.mapActions,
1221
+ shallow
1222
+ );
1223
+ const { networkOperation } = useNetwork();
1389
1224
  useEffect(() => {
1390
- console.log("useCheckedGeofences, layersIds:", layersIds);
1391
1225
  if (!layersIds.includes(GeofencesFeaturesLayers.LAYER_GEOFENCES)) {
1392
1226
  return;
1393
1227
  }
@@ -1405,7 +1239,6 @@ function useCheckedGeofences() {
1405
1239
  isRemote: false,
1406
1240
  responseToCamelCase: true
1407
1241
  }).then((response) => {
1408
- console.log("onCheckedRowsChange response:", response.data);
1409
1242
  const geoLoaded = {
1410
1243
  geometry: response.data.geometry,
1411
1244
  name: response.data.name,
@@ -1425,12 +1258,14 @@ function useCheckedGeofences() {
1425
1258
  updatePartialGeofence(geofence.id, geoLoaded);
1426
1259
  });
1427
1260
  } else {
1428
- setFeatureData(GeofencesFeaturesLayers.LAYER_GEOFENCES, chkRow, geofence.geometry, geofence.properties, {
1429
- label: geofence.name
1430
- });
1431
- updatePartialGeofence(geofence.id, {
1432
- hasRenderizedGeofence: true
1433
- });
1261
+ setFeatureData(
1262
+ GeofencesFeaturesLayers.LAYER_GEOFENCES,
1263
+ chkRow,
1264
+ geofence.geometry,
1265
+ geofence.properties,
1266
+ { label: geofence.name }
1267
+ );
1268
+ updatePartialGeofence(geofence.id, { hasRenderizedGeofence: true });
1434
1269
  }
1435
1270
  }
1436
1271
  });
@@ -1450,16 +1285,21 @@ function useCheckedGeofences() {
1450
1285
  function useCheckedFeatures(layerId, featuresType, endpoint) {
1451
1286
  const layersIds = useMapStore((state) => state.layersIds, shallow);
1452
1287
  const [checkedFeatures, setCheckedFeatures, hashGeofences] = useGpsToolsStore((state) => {
1453
- return featuresType === "CrossingFeatures" ? [state.geofenceState.checkedCrossingFeatures, state.geofenceActions.setCheckedCrossingFeatures, state.geofenceState.hashGeofences] : [state.geofenceState.checkedInternalFeatures, state.geofenceActions.setCheckedInternalFeatures, state.geofenceState.hashGeofences];
1288
+ return featuresType === "CrossingFeatures" ? [
1289
+ state.geofenceState.checkedCrossingFeatures,
1290
+ state.geofenceActions.setCheckedCrossingFeatures,
1291
+ state.geofenceState.hashGeofences
1292
+ ] : [
1293
+ state.geofenceState.checkedInternalFeatures,
1294
+ state.geofenceActions.setCheckedInternalFeatures,
1295
+ state.geofenceState.hashGeofences
1296
+ ];
1454
1297
  }, shallow);
1455
- const {
1456
- setFeatureData,
1457
- removeFeature,
1458
- getFeatureIds
1459
- } = useMapStore((state) => state.mapActions, shallow);
1460
- const {
1461
- networkOperation
1462
- } = useNetwork();
1298
+ const { setFeatureData, removeFeature, getFeatureIds } = useMapStore(
1299
+ (state) => state.mapActions,
1300
+ shallow
1301
+ );
1302
+ const { networkOperation } = useNetwork();
1463
1303
  useEffect(() => {
1464
1304
  if (!layersIds.includes(layerId)) {
1465
1305
  return;
@@ -1479,13 +1319,17 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
1479
1319
  isRemote: false,
1480
1320
  responseToCamelCase: true
1481
1321
  }).then((response) => {
1482
- console.log("onCheckedGeometriesChange response:", response.data);
1483
1322
  geofence[`loaded${featuresType}`] = response.data;
1484
1323
  const newGeofenceLoadedFeatures = geofence[`loaded${featuresType}`];
1485
1324
  if (newGeofenceLoadedFeatures && Array.isArray(geofence[`loaded${featuresType}`])) {
1486
1325
  if (checkedFeatures.has(geofence.id)) {
1487
1326
  newGeofenceLoadedFeatures.forEach((feature) => {
1488
- setFeatureData(layerId, `geo_${geofence.id}_fid_${feature.id}`, feature.geometry, feature.properties);
1327
+ setFeatureData(
1328
+ layerId,
1329
+ `geo_${geofence.id}_fid_${feature.id}`,
1330
+ feature.geometry,
1331
+ feature.properties
1332
+ );
1489
1333
  });
1490
1334
  geofence[`hasRenderized${featuresType}`] = true;
1491
1335
  }
@@ -1494,7 +1338,12 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
1494
1338
  });
1495
1339
  } else {
1496
1340
  currentGeofenceLoadedFeatures.forEach((feature) => {
1497
- setFeatureData(layerId, `geo_${geofence.id}_fid_${feature.id}`, feature.geometry, feature.properties);
1341
+ setFeatureData(
1342
+ layerId,
1343
+ `geo_${geofence.id}_fid_${feature.id}`,
1344
+ feature.geometry,
1345
+ feature.properties
1346
+ );
1498
1347
  });
1499
1348
  geofence[`hasRenderized${featuresType}`] = true;
1500
1349
  }
@@ -1512,54 +1361,48 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
1512
1361
  return [checkedFeatures, setCheckedFeatures];
1513
1362
  }
1514
1363
  function useMaster() {
1515
- const {
1516
- hidePopup,
1517
- addPopup
1518
- } = usePopupsStore((state) => state.popupsActions, shallow);
1364
+ const { hidePopup, addPopup } = usePopupsStore((state) => state.popupsActions, shallow);
1519
1365
  const onClickAddGeofence = () => {
1520
- console.log("onClickAddGeofence");
1521
1366
  hidePopup("gpsTools");
1522
1367
  addPopup({
1523
1368
  popupId: "geofencesAddEdit",
1524
1369
  title: "geofencesAddEdit",
1525
1370
  functionComponent: () => /* @__PURE__ */ jsx(GeofenceAddEdit, {}),
1526
1371
  defaultPosition: {
1527
- vertical: {
1528
- top: 50,
1529
- bottom: 50
1530
- },
1531
- horizontal: {
1532
- right: 50,
1533
- width: 380
1534
- }
1372
+ vertical: { top: 50, bottom: 50 },
1373
+ horizontal: { right: 50, width: 380 }
1535
1374
  },
1536
1375
  iconUrl: ""
1537
1376
  });
1538
1377
  };
1539
- const [checkedGeofences, hashGeofences, initialRows] = useGpsToolsStore((state) => [state.geofenceState.checkedGeofences, state.geofenceState.hashGeofences, state.geofenceState.rows], shallow);
1540
- const {
1541
- setCheckedGeofences,
1542
- addGeofence,
1543
- updatePartialGeofence,
1544
- updateRows
1545
- } = useGpsToolsStore((state) => state.geofenceActions, shallow);
1378
+ const [checkedGeofences, hashGeofences, initialRows] = useGpsToolsStore(
1379
+ (state) => [
1380
+ state.geofenceState.checkedGeofences,
1381
+ state.geofenceState.hashGeofences,
1382
+ state.geofenceState.rows
1383
+ ],
1384
+ shallow
1385
+ );
1386
+ const { setCheckedGeofences, addGeofence, updatePartialGeofence, updateRows } = useGpsToolsStore(
1387
+ (state) => state.geofenceActions,
1388
+ shallow
1389
+ );
1546
1390
  useCheckedGeofences();
1547
- const [checkedCrossingFeatures, setCheckedCrossingFeatures] = useCheckedFeatures(GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES, "CrossingFeatures", "crossing_features");
1548
- const [checkedInternalFeatures, setCheckedInternalFeatures] = useCheckedFeatures(GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES, "InternalFeatures", "internal_features");
1391
+ const [checkedCrossingFeatures, setCheckedCrossingFeatures] = useCheckedFeatures(
1392
+ GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES,
1393
+ "CrossingFeatures",
1394
+ "crossing_features"
1395
+ );
1396
+ const [checkedInternalFeatures, setCheckedInternalFeatures] = useCheckedFeatures(
1397
+ GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES,
1398
+ "InternalFeatures",
1399
+ "internal_features"
1400
+ );
1549
1401
  const rowKeyGetter = useCallback((row) => row.id, []);
1550
1402
  const [selectedRows, setSelectedRows] = useState(/* @__PURE__ */ new Set());
1551
1403
  const [backendQueryParams, setBackendQueryParams] = useState({});
1552
- const {
1553
- columns
1554
- } = useColumns();
1555
- const {
1556
- pagerState,
1557
- rows,
1558
- onPageChange,
1559
- onRowsPerPageChange,
1560
- Refresh,
1561
- setRows
1562
- } = usePaginate({
1404
+ const { columns } = useColumns();
1405
+ const { pagerState, rows, onPageChange, onRowsPerPageChange, Refresh, setRows } = usePaginate({
1563
1406
  endPoint: "geofences",
1564
1407
  fireOnChangeParms: false,
1565
1408
  fireOnFirstLoad: false,
@@ -1638,11 +1481,7 @@ function useMaster() {
1638
1481
  onSelectedRowsChange(selectedRows);
1639
1482
  updateRows(rows);
1640
1483
  }, [rows]);
1641
- const {
1642
- rowActionsGetter
1643
- } = useRowActionsGetter({
1644
- fullRefresh
1645
- });
1484
+ const { rowActionsGetter } = useRowActionsGetter({ fullRefresh });
1646
1485
  return {
1647
1486
  rowKeyGetter,
1648
1487
  columns,
@@ -1662,17 +1501,17 @@ function useMaster() {
1662
1501
  };
1663
1502
  }
1664
1503
  const StackGeofenceListRoot = styled(Stack)`
1665
- padding:12px;
1666
- position: relative!important;
1667
- flex-grow:1;
1668
- width:100%;
1504
+ padding: 12px;
1505
+ position: relative !important;
1506
+ flex-grow: 1;
1507
+ width: 100%;
1669
1508
 
1670
- .M4LDataGrid-root{
1671
- height:unset!important;
1672
- flex-grow:1;
1673
- }
1509
+ .M4LDataGrid-root {
1510
+ height: unset !important;
1511
+ flex-grow: 1;
1512
+ }
1674
1513
 
1675
- ${(props) => props.theme.components?.M4LGpsToolsGeofencesList?.styleOverrides}
1514
+ ${(props) => props.theme.components?.M4LGpsToolsGeofencesList?.styleOverrides}
1676
1515
  `;
1677
1516
  function GeofencesList() {
1678
1517
  const {
@@ -1692,98 +1531,118 @@ function GeofencesList() {
1692
1531
  rowKeyGetter,
1693
1532
  goToAddEdit
1694
1533
  } = useMaster();
1695
- return /* @__PURE__ */ jsxs(StackGeofenceListRoot, {
1696
- direction: "column",
1697
- gap: "8px",
1698
- className: gpsToolsClasses.gpsToolsGeofencesList,
1699
- children: [/* @__PURE__ */ jsx(Filter, {
1700
- refresh,
1701
- setBackendQueryParams
1702
- }), /* @__PURE__ */ jsx(DataGrid, {
1703
- id: "geofences",
1704
- columns,
1705
- rows,
1706
- onRowsChange: setRows,
1707
- checkedRows,
1708
- onCheckedRowsChange,
1709
- rowActionsGetter,
1710
- rowKeyGetter,
1711
- selectedRows,
1712
- onSelectedRowsChange,
1713
- withActions: true,
1714
- actionsProps: {
1715
- withPager: true,
1716
- withLocalFilters: true,
1717
- pagerOptions: {
1718
- records: rows.length,
1719
- totalRecords: pagerState.totalRecords,
1720
- rowsPerPageOptions: [1, 2, 3, 4, 5, 10, 25],
1721
- page: pagerState.page,
1722
- rowsPerPage: pagerState.rowsPerPage,
1723
- onPageChange,
1724
- onRowsPerPageChange
1725
- }
1726
- }
1727
- }, "list"), /* @__PURE__ */ jsx(Actions, {
1728
- children: /* @__PURE__ */ jsx(Button, {
1729
- onClick: () => goToAddEdit(),
1730
- children: "Agregar geocerca"
1731
- })
1732
- })]
1733
- });
1534
+ return /* @__PURE__ */ jsxs(
1535
+ StackGeofenceListRoot,
1536
+ {
1537
+ direction: "column",
1538
+ gap: "8px",
1539
+ className: gpsToolsClasses.gpsToolsGeofencesList,
1540
+ children: [
1541
+ /* @__PURE__ */ jsx(Filter, { refresh, setBackendQueryParams }),
1542
+ /* @__PURE__ */ jsx(
1543
+ DataGrid,
1544
+ {
1545
+ id: "geofences",
1546
+ columns,
1547
+ rows,
1548
+ onRowsChange: setRows,
1549
+ checkedRows,
1550
+ onCheckedRowsChange,
1551
+ rowActionsGetter,
1552
+ rowKeyGetter,
1553
+ selectedRows,
1554
+ onSelectedRowsChange,
1555
+ withActions: true,
1556
+ actionsProps: {
1557
+ withPager: true,
1558
+ withLocalFilters: true,
1559
+ pagerOptions: {
1560
+ records: rows.length,
1561
+ totalRecords: pagerState.totalRecords,
1562
+ rowsPerPageOptions: [1, 2, 3, 4, 5, 10, 25],
1563
+ page: pagerState.page,
1564
+ rowsPerPage: pagerState.rowsPerPage,
1565
+ onPageChange,
1566
+ onRowsPerPageChange
1567
+ }
1568
+ }
1569
+ },
1570
+ "list"
1571
+ ),
1572
+ /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Button, { onClick: () => goToAddEdit(), children: "Agregar geocerca" }) })
1573
+ ]
1574
+ }
1575
+ );
1734
1576
  }
1735
1577
  function TabsGpsTools() {
1736
- const {
1737
- getLabel
1738
- } = useModuleDictionary();
1578
+ const { getLabel } = useModuleDictionary();
1739
1579
  const status = useGpsToolsStore((state) => state.ownerState.status, shallow);
1740
1580
  const currentTabTool = useGpsToolsStore((state) => state.currentTabGpsTool, shallow);
1741
- const {
1742
- setCurrentTabTool
1743
- } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
1581
+ const { setCurrentTabTool } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
1744
1582
  const toolTabs = useMemo(() => {
1745
- return [{
1746
- id: "geofences",
1747
- icon: void 0,
1748
- component: /* @__PURE__ */ jsx(GeofencesList, {}),
1749
- label: getLabel(MAP_DICCTIONARY.LABEL_TAB_GEO),
1750
- className: gpsToolsClasses.gpsToolsGeofencesList
1751
- }];
1583
+ return [
1584
+ {
1585
+ id: "geofences",
1586
+ icon: void 0,
1587
+ component: /* @__PURE__ */ jsx(GeofencesList, {}),
1588
+ label: getLabel(MAP_DICCTIONARY.LABEL_TAB_GEO),
1589
+ className: gpsToolsClasses.gpsToolsGeofencesList
1590
+ }
1591
+ ];
1752
1592
  }, [getLabel]);
1753
1593
  useLayers();
1754
1594
  if (status !== "ready") {
1755
1595
  return null;
1756
1596
  }
1757
- return /* @__PURE__ */ jsxs(DivGpsToolsRoot, {
1758
- className: gpsToolsClasses.gpsToolsRoot,
1759
- children: [/* @__PURE__ */ jsx(Tabs, {
1760
- value: currentTabTool,
1761
- scrollButtons: "auto",
1762
- variant: "scrollable",
1763
- allowScrollButtonsMobile: true,
1764
- onChange: (_e, value) => setCurrentTabTool(value),
1765
- children: toolTabs.map((tab) => /* @__PURE__ */ jsx(Tab, {
1766
- value: tab.id,
1767
- icon: tab.icon,
1768
- label: tab.label,
1769
- className: clsx(gpsToolsClasses.gpsToolsTab, tab.className),
1770
- SKTWidth: "100px",
1771
- SKTHeight: "14px"
1772
- }, tab.id))
1773
- }), toolTabs.map((tab) => {
1774
- const isMatched = tab.id === currentTabTool;
1775
- return /* @__PURE__ */ jsx(TabContent, {
1776
- className: clsx(gpsToolsClasses.gpsToolsTabContent, tab.className, isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden),
1777
- children: tab.component
1778
- }, tab.id);
1779
- })]
1780
- });
1597
+ return /* @__PURE__ */ jsxs(
1598
+ DivGpsToolsRoot,
1599
+ {
1600
+ className: gpsToolsClasses.gpsToolsRoot,
1601
+ children: [
1602
+ /* @__PURE__ */ jsx(
1603
+ Tabs,
1604
+ {
1605
+ value: currentTabTool,
1606
+ scrollButtons: "auto",
1607
+ variant: "scrollable",
1608
+ allowScrollButtonsMobile: true,
1609
+ onChange: (_e, value) => setCurrentTabTool(value),
1610
+ children: toolTabs.map((tab) => /* @__PURE__ */ jsx(
1611
+ Tab,
1612
+ {
1613
+ value: tab.id,
1614
+ icon: tab.icon,
1615
+ label: tab.label,
1616
+ className: clsx(gpsToolsClasses.gpsToolsTab, tab.className),
1617
+ SKTWidth: "100px",
1618
+ SKTHeight: "14px"
1619
+ },
1620
+ tab.id
1621
+ ))
1622
+ }
1623
+ ),
1624
+ toolTabs.map((tab) => {
1625
+ const isMatched = tab.id === currentTabTool;
1626
+ return /* @__PURE__ */ jsx(
1627
+ TabContent,
1628
+ {
1629
+ className: clsx(
1630
+ gpsToolsClasses.gpsToolsTabContent,
1631
+ tab.className,
1632
+ isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
1633
+ ),
1634
+ children: tab.component
1635
+ },
1636
+ tab.id
1637
+ );
1638
+ })
1639
+ ]
1640
+ }
1641
+ );
1781
1642
  }
1782
1643
  function GpsTools() {
1783
1644
  const isSkeleton = useModuleSkeleton();
1784
- return /* @__PURE__ */ jsx(Fragment, {
1785
- children: !isSkeleton && /* @__PURE__ */ jsx(TabsGpsTools, {})
1786
- });
1645
+ return /* @__PURE__ */ jsx(Fragment, { children: !isSkeleton && /* @__PURE__ */ jsx(TabsGpsTools, {}) });
1787
1646
  }
1788
1647
  export {
1789
1648
  GpsTools as G,