@m4l/components 1.0.21 → 1.0.22

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 (289) hide show
  1. package/@types/export.d.ts +274 -274
  2. package/@types/types.d.ts +25 -25
  3. package/components/AccountPopover/{index.7687487c.js → index.f8453a39.js} +3 -3
  4. package/components/AccountPopover/style.d.ts +2 -0
  5. package/components/AppBar/{index.16d8f79a.js → index.48d5220c.js} +4 -4
  6. package/components/AppBar/styles.d.ts +2 -0
  7. package/components/CommonActions/components/ActionCancel/{index.d0adf9c4.js → index.5dc2a47d.js} +2 -2
  8. package/components/CommonActions/components/ActionFormCancel/{index.c815247c.js → index.2a421fd5.js} +4 -4
  9. package/components/CommonActions/components/ActionFormIntro/{index.f67b79e2.js → index.dfab71be.js} +2 -2
  10. package/components/CommonActions/components/ActionIntro/{index.6904d0ad.js → index.3f96d6dc.js} +2 -2
  11. package/components/CommonActions/components/Actions/{index.dff2bcc7.js → index.2569b4df.js} +2 -2
  12. package/components/CommonActions/components/Actions/styles.d.ts +2 -0
  13. package/components/DataGrid/assets/icons/datagrid.svg +4 -4
  14. package/components/DataGrid/classes/index.d.ts +1 -0
  15. package/components/DataGrid/classes/types.d.ts +1 -0
  16. package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.6fa4e6c3.js → index.f29b245f.js} +1 -1
  17. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.59985444.js → index.e54fd4db.js} +1 -1
  18. package/components/DataGrid/formatters/ColumnIconFormatter/index.d.ts +2 -0
  19. package/components/DataGrid/formatters/ColumnIconFormatter/types.d.ts +7 -0
  20. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.94d1860d.js → index.3424cf67.js} +1 -1
  21. package/components/DataGrid/formatters/ColumnPointsFormatter/{index.fc637564.js → index.ab152484.js} +1 -1
  22. package/components/DataGrid/formatters/index.59c6d2a6.js +13 -0
  23. package/components/DataGrid/{index.768e62a6.js → index.79892601.js} +7 -5
  24. package/components/DataGrid/styles.d.ts +2 -0
  25. package/components/DataGrid/subcomponents/Actions/{index.39dcd931.js → index.6d5cb1d7.js} +11 -11
  26. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +8 -0
  27. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +2 -0
  28. package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +6 -0
  29. package/components/DragResizeWindow/DragResizeWindow.d.ts +4 -4
  30. package/components/DragResizeWindow/index.be8a40b2.js +477 -0
  31. package/components/DragResizeWindow/styled.d.ts +2 -0
  32. package/components/DynamicFilter/{dictionary.0991b837.js → dictionary.d15d08fc.js} +2 -2
  33. package/components/DynamicFilter/{index.1aa60703.js → index.900abf99.js} +4 -4
  34. package/components/DynamicFilter/slots/{dynamicFilterSlots.1edc8e23.js → dynamicFilterSlots.95aa2fd6.js} +6 -6
  35. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +87 -0
  36. package/components/DynamicFilter/store/{index.0e0854ee.js → index.13e44665.js} +1 -1
  37. package/components/DynamicFilter/subcomponents/AppliedFilterChip/{index.f47f6ecc.js → index.11860dc2.js} +3 -3
  38. package/components/DynamicFilter/subcomponents/AppliedFilters/{index.caf0bb7f.js → index.1c74b0a2.js} +4 -4
  39. package/components/DynamicFilter/subcomponents/DynamicFilterBase/{index.f4fe3a8e.js → index.11e8fb88.js} +6 -6
  40. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/{index.5c562061.js → index.2c973bfc.js} +2 -2
  41. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/{index.b53e2fdc.js → index.254058ff.js} +4 -4
  42. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/{index.9fc191f0.js → index.2b0a8737.js} +3 -3
  43. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/{index.c002c8f2.js → index.42cb7301.js} +4 -4
  44. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/{index.12fc8d0c.js → index.88923c45.js} +3 -3
  45. package/components/DynamicFilter/subcomponents/FieldTypes/{index.e18e1229.js → index.1f7bcb48.js} +5 -5
  46. package/components/DynamicFilter/subcomponents/FilterActions/{index.3266cd55.js → index.5820ac71.js} +3 -3
  47. package/components/DynamicFilter/subcomponents/InputFilter/{index.2de425a8.js → index.b9a06165.js} +4 -4
  48. package/components/DynamicFilter/subcomponents/PopoverFilter/{index.3f270770.js → index.86a867ab.js} +6 -6
  49. package/components/DynamicFilter/subcomponents/PopoverMenuFields/{index.ebd84aa5.js → index.4cd0d771.js} +2 -2
  50. package/components/FieldLabel/{index.15e78848.js → index.9b515e11.js} +4 -4
  51. package/components/FieldLabel/styles.d.ts +2 -0
  52. package/components/GridLayout/{index.f5fb6d61.js → index.2a975f9d.js} +2 -2
  53. package/components/GridLayout/styles.d.ts +2 -0
  54. package/components/GridLayout/subcomponents/Griditem/{index.b5c91d2a.js → index.d1d38e7a.js} +3 -3
  55. package/components/GridLayout/subcomponents/Responsive/{index.a1179064.js → index.84c3e0eb.js} +1 -1
  56. package/components/GridLayout/subcomponents/SizeProvider/{index.25dcc9bb.js → index.28155002.js} +1 -1
  57. package/components/HelperText/{index.f9b6e7a3.js → index.985f65b9.js} +2 -2
  58. package/components/HelperText/styles.d.ts +2 -0
  59. package/components/Icon/{index.b1c014b0.js → index.735ed5af.js} +3 -3
  60. package/components/Icon/styles.d.ts +4 -0
  61. package/components/Image/{index.a011d2d2.js → index.31093474.js} +2 -2
  62. package/components/Image/styles.d.ts +2 -0
  63. package/components/LanguagePopover/{index.763ee58f.js → index.a7ec1033.js} +4 -4
  64. package/components/LanguagePopover/styles.d.ts +6 -0
  65. package/components/LinearProgressIndeterminate/{index.c5cb15a1.js → index.af8809c0.js} +2 -2
  66. package/components/LinearProgressIndeterminate/styles.d.ts +2 -0
  67. package/components/LoadingError/{index.884275da.js → index.1b480949.js} +5 -5
  68. package/components/LoadingError/styles.d.ts +2 -0
  69. package/components/MFLoader/{index.dbb3fc5b.js → index.c65e5b0f.js} +2 -2
  70. package/components/MFLoader/styles.d.ts +2 -0
  71. package/components/ModalDialog/{index.f22ea160.js → index.52db045e.js} +4 -4
  72. package/components/NavLink/{index.ab08b249.js → index.01b82b32.js} +2 -2
  73. package/components/NavLink/styles.d.ts +2 -0
  74. package/components/NoItemSelected/{index.873bbc59.js → index.55fc2872.js} +1 -1
  75. package/components/NoItemSelected/styles.d.ts +5 -0
  76. package/components/ObjectLogs/{index.5e6f3846.js → index.22344399.js} +9 -9
  77. package/components/ObjectLogs/styles.d.ts +4 -0
  78. package/components/PDFViewer/{index.894a79af.js → index.a8751ff9.js} +2 -2
  79. package/components/PDFViewer/styles.d.ts +2 -0
  80. package/components/Page/{index.2b86e207.js → index.bea04867.js} +1 -1
  81. package/components/PaperForm/{index.56dab395.js → index.b76ee2b3.js} +2 -2
  82. package/components/PaperForm/styles.d.ts +7 -0
  83. package/components/Period/{index.dadd4318.js → index.3731b3c5.js} +4 -4
  84. package/components/Period/styles.d.ts +7 -0
  85. package/components/PrintingSystem/{index.35ee772d.js → index.5941d5ea.js} +14 -14
  86. package/components/PrintingSystem/styles.d.ts +2 -0
  87. package/components/PrintingSystem/subcomponents/BodyNode/{index.eac1420d.js → index.f63e9cca.js} +1 -1
  88. package/components/PrintingSystem/subcomponents/ChartNode/{index.5e651869.js → index.4b32dbc2.js} +1 -1
  89. package/components/PrintingSystem/subcomponents/DividerNode/{index.a0b30aab.js → index.2ac056f3.js} +1 -1
  90. package/components/PrintingSystem/subcomponents/FooterNode/{index.93a43d5e.js → index.dbda1218.js} +1 -1
  91. package/components/PrintingSystem/subcomponents/GridNode/{index.89d57336.js → index.0770d62f.js} +1 -1
  92. package/components/PrintingSystem/subcomponents/HeaderNode/{index.e0d43d06.js → index.f01a96bc.js} +1 -1
  93. package/components/PrintingSystem/subcomponents/PaperNode/{index.18c1c0a7.js → index.76ad4b49.js} +1 -1
  94. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.75bd0076.js → index.8dc2d646.js} +1 -1
  95. package/components/PrintingSystem/subcomponents/SectionNode/{index.494cd47d.js → index.f5e3019c.js} +1 -1
  96. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.c8c69687.js → index.86ad2bd4.js} +1 -1
  97. package/components/PropertyValue/{index.370a03cb.js → index.b8350841.js} +3 -3
  98. package/components/PropertyValue/styles.d.ts +2 -0
  99. package/components/Resizeable/{index.d1da09c9.js → index.031731ec.js} +1 -1
  100. package/components/ResizeableWindow/styles.d.ts +5 -0
  101. package/components/ScrollBar/{index.dc4726a5.js → index.f59feb47.js} +1 -1
  102. package/components/ScrollBar/styles.d.ts +9 -0
  103. package/components/SideBar/{index.d321beef.js → index.6b59320a.js} +6 -6
  104. package/components/SideBar/styles.d.ts +20 -0
  105. package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/styles.d.ts +3 -0
  106. package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +4 -0
  107. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +2 -0
  108. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/styles.d.ts +2 -0
  109. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/styles.d.ts +9 -0
  110. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/styles.d.ts +2 -0
  111. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +6 -0
  112. package/components/SideBar/subcomponents/ContentMobile/styles.d.ts +3 -0
  113. package/components/SplitLayout/{index.71372b7e.js → index.3e816b39.js} +1 -1
  114. package/components/SplitLayout/styles.d.ts +4 -0
  115. package/components/ToastContainer/{index.0b01e1e3.js → index.bb85cf2c.js} +3 -3
  116. package/components/ToastContainer/styles.d.ts +2 -0
  117. package/components/animate/AnimatedScroll/styles.d.ts +6 -0
  118. package/components/animate/LoadingScreen/{index.5bd42c8b.js → index.614abae2.js} +1 -1
  119. package/components/animate/LoadingScreen/styles.d.ts +7 -0
  120. package/components/animate/PropagateLoader/syles.d.ts +2 -0
  121. package/components/animate/{index.f61a3540.js → index.34175ff1.js} +1 -1
  122. package/components/areas/components/AreasAdmin/{index.4bbd6b28.js → index.92015229.js} +15 -15
  123. package/components/areas/components/AreasAdmin/styles.d.ts +5 -0
  124. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +4 -0
  125. package/components/areas/components/AreasViewer/{index.8523c06d.js → index.5613b04c.js} +15 -15
  126. package/components/areas/components/AreasViewer/styles.d.ts +2 -0
  127. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/styles.d.ts +2 -0
  128. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/styles.d.ts +3 -0
  129. package/components/areas/contexts/AreasContext/{index.293de3ad.js → index.ab6739b8.js} +4 -4
  130. package/components/areas/hooks/useAreas/{index.62a5ceb8.js → index.fb7026bb.js} +1 -1
  131. package/components/areas/types.d.ts +1 -1
  132. package/components/commercial/AppBarCommercial/{index.5f904c81.js → index.84ddbcf1.js} +2 -2
  133. package/components/commercial/AppBarCommercial/styles.d.ts +2 -0
  134. package/components/commercial/HamburgerMenu/styles.d.ts +13 -0
  135. package/components/commercial/SectionCommercial/{index.8b231d7f.js → index.b0416595.js} +2 -2
  136. package/components/commercial/SectionCommercial/styles.d.ts +6 -0
  137. package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/styles.d.ts +2 -0
  138. package/components/commercial/TopBar/{index.4fe28626.js → index.fefacbbb.js} +6 -6
  139. package/components/commercial/TopBar/style.d.ts +2 -0
  140. package/components/commercial/{index.12cb74f4.js → index.e852decf.js} +3 -3
  141. package/components/formatters/BooleanFormatter/{index.97b1d316.js → index.bab92b54.js} +2 -2
  142. package/components/formatters/FormatterRoot/styles.d.ts +2 -0
  143. package/components/formatters/PointsFormatter/{index.6ad006b8.js → index.51cd6774.js} +0 -2
  144. package/components/formatters/{index.161191d7.js → index.54397ac7.js} +2 -2
  145. package/components/hook-form/HelperError/{index.453b8be1.js → index.f3c76460.js} +1 -1
  146. package/components/hook-form/RHFAutocomplete/{index.9b605832.js → index.6e22b0e5.js} +6 -6
  147. package/components/hook-form/RHFAutocomplete/styles.d.ts +2 -0
  148. package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +2 -0
  149. package/components/hook-form/RHFAutocompleteAsync/{index.18b4663a.js → index.027097e2.js} +2 -2
  150. package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +5 -0
  151. package/components/hook-form/RHFCheckbox/{index.66a883f7.js → index.f55b8014.js} +3 -3
  152. package/components/hook-form/RHFCheckbox/styles.d.ts +7 -0
  153. package/components/hook-form/RHFColorPicker/{index.2962d572.js → index.b3921a34.js} +6 -6
  154. package/components/hook-form/RHFColorPicker/styles.d.ts +2 -0
  155. package/components/hook-form/RHFDateTime/{index.c37bf0d0.js → index.d017e3ea.js} +4 -4
  156. package/components/hook-form/RHFDateTime/styles.d.ts +2 -0
  157. package/components/hook-form/RHFPeriod/{index.2edd24fe.js → index.f76251fc.js} +4 -4
  158. package/components/hook-form/RHFPeriod/styles.d.ts +2 -0
  159. package/components/hook-form/RHFTextField/{index.b9d95bd9.js → index.d982607c.js} +5 -5
  160. package/components/hook-form/RHFTextField/styles.d.ts +3 -0
  161. package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +3 -0
  162. package/components/hook-form/RHFTextFieldPassword/styles.d.ts +2 -0
  163. package/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +2 -0
  164. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +2 -0
  165. package/components/hook-form/RHFUpload/{index.9759a7a4.js → index.5fa39ab0.js} +5 -5
  166. package/components/maps/components/GpsTools/{index.94055337.js → index.3e432a7d.js} +558 -402
  167. package/components/maps/components/Map/constants.d.ts +1 -0
  168. package/components/maps/components/Map/external/googleMutant/index.d.ts +159 -94
  169. package/components/maps/components/Map/icons.d.ts +1 -7
  170. package/components/maps/components/Map/{index.9edada74.js → index.92f8d4f5.js} +30 -32
  171. package/components/maps/components/Map/styled.d.ts +2 -0
  172. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts +1 -1
  173. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/types.d.ts +1 -1
  174. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +1 -1
  175. package/components/maps/components/MapGpsTools/MapGpsTools.d.ts +1 -0
  176. package/components/maps/components/{GpsTools → MapGpsTools}/classes/index.d.ts +1 -1
  177. package/components/maps/components/{GpsTools → MapGpsTools}/classes/types.d.ts +1 -0
  178. package/components/maps/components/{GpsTools → MapGpsTools}/constants.d.ts +2 -2
  179. package/components/maps/components/MapGpsTools/dictionary.d.ts +67 -0
  180. package/components/maps/components/MapGpsTools/icons.d.ts +23 -0
  181. package/components/maps/components/{GpsTools → MapGpsTools}/index.d.ts +1 -1
  182. package/components/maps/components/MapGpsTools/styles.d.ts +2 -0
  183. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/index.d.ts +11 -0
  184. package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useDrawing.d.ts +1 -1
  185. package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useValidation.d.ts +6 -6
  186. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles.d.ts +1 -0
  187. package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/validations.d.ts +2 -2
  188. package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.d.ts +1 -1
  189. package/components/maps/components/{GpsTools/subcomponents/TabsGpsTools/index.d.ts → MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/types.d.ts} +1 -2
  190. package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.d.ts +1 -1
  191. package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useMaster.d.ts +1 -1
  192. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.d.ts +6 -0
  193. package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/model.d.ts +1 -1
  194. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/types.d.ts +8 -0
  195. package/components/maps/index.d.ts +1 -1
  196. package/components/maps/leaflet-geoman.d.ts +1476 -1476
  197. package/components/modal/{WindowBase.c7d14de4.js → WindowBase.62dc9432.js} +3 -3
  198. package/components/modal/{WindowConfirm.eaec0ee1.js → WindowConfirm.af2047ad.js} +13 -7
  199. package/components/mui_extended/Accordion/{index.289b1eea.js → index.2c184653.js} +4 -4
  200. package/components/mui_extended/Accordion/styles.d.ts +4 -0
  201. package/components/mui_extended/Avatar/{index.f8d0e601.js → index.b4817d98.js} +1 -1
  202. package/components/mui_extended/Avatar/styles.d.ts +2 -0
  203. package/components/mui_extended/Badge/{index.a5948eb1.js → index.40d1aa2c.js} +1 -1
  204. package/components/mui_extended/Badge/styles.d.ts +2 -0
  205. package/components/mui_extended/Button/{index.1f534053.js → index.3f98a33c.js} +3 -3
  206. package/components/mui_extended/Button/styles.d.ts +5 -0
  207. package/components/mui_extended/CheckBox/styles.d.ts +2 -0
  208. package/components/mui_extended/{CheckBox.36838947.js → CheckBox.d1a186d8.js} +2 -2
  209. package/components/mui_extended/IconButton/{index.40a12fe0.js → index.6e1e7606.js} +2 -2
  210. package/components/mui_extended/IconButton/styles.d.ts +2 -0
  211. package/components/mui_extended/ImageButton/styles.d.ts +2 -0
  212. package/components/mui_extended/LoadingButton/styles.d.ts +2 -0
  213. package/components/mui_extended/MenuActions/{index.fdc64d2c.js → index.e40047bd.js} +5 -5
  214. package/components/mui_extended/MenuActions/styles.d.ts +5 -0
  215. package/components/mui_extended/Pager/{index.6b48325e.js → index.3d387e89.js} +4 -4
  216. package/components/mui_extended/Pager/styles.d.ts +2 -0
  217. package/components/mui_extended/Popover/{index.1758efd3.js → index.2dc9ded4.js} +1 -1
  218. package/components/mui_extended/Popover/styles.d.ts +1 -0
  219. package/components/mui_extended/Popover/subcomponts/ArrowIcon/index.d.ts +3 -0
  220. package/components/mui_extended/Stack/{index.84103b22.js → index.5ffdbe1b.js} +1 -1
  221. package/components/mui_extended/Stack/styles.d.ts +4 -0
  222. package/components/mui_extended/Tab/{index.35947f79.js → index.aa10efd0.js} +1 -1
  223. package/components/mui_extended/Tab/styles.d.ts +3 -0
  224. package/components/mui_extended/TabContent/styles.d.ts +2 -0
  225. package/components/mui_extended/Tabs/styles.d.ts +4 -0
  226. package/components/mui_extended/ToggleButton/{index.f0890b7c.js → index.82878215.js} +1 -1
  227. package/components/mui_extended/ToggleIconButton/{index.9e8ea15b.js → index.ce4374ba.js} +1 -1
  228. package/components/mui_extended/Typography/{index.ddde0fc7.js → index.5bd73114.js} +1 -1
  229. package/components/mui_extended/Typography/styles.d.ts +2 -0
  230. package/components/popups/PopupsProvider/{index.156f6fb2.js → index.67239cbd.js} +35 -6
  231. package/components/popups/PopupsViewer/{index.f36f3bcc.js → index.4b9f2606.js} +61 -28
  232. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +20 -2
  233. package/components/popups/components/PopupsViewer/classes/index.d.ts +3 -1
  234. package/components/popups/components/PopupsViewer/classes/types.d.ts +3 -1
  235. package/components/popups/components/PopupsViewer/icons.d.ts +1 -0
  236. package/components/popups/components/PopupsViewer/styled.d.ts +2 -0
  237. package/components/popups/components/PopupsViewer/subcomponents/Popup/index.d.ts +2 -1
  238. package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/EditionInfo/index.d.ts +2 -0
  239. package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/EditionInfo/types.d.ts +2 -0
  240. package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +5 -0
  241. package/contexts/ModalContext/{index.72e60f98.js → index.ca0f8525.js} +1 -1
  242. package/contexts/RHFormContext/{index.d9efc253.js → index.b08da209.js} +1 -1
  243. package/contexts/RHFormContext/styles.d.ts +2 -0
  244. package/hooks/useFormAddEdit/{index.4738a32a.js → index.a5612e31.js} +2 -2
  245. package/hooks/useModal/{index.e77737dd.js → index.f2579c58.js} +1 -1
  246. package/hooks/useTab/{index.93e7cf1d.js → index.36300b7b.js} +1 -1
  247. package/index.js +134 -133
  248. package/package.json +3 -4
  249. package/{react-draggable.1c1ba224.js → react-draggable.310e3387.js} +1 -1
  250. package/{react-resizable.a59c14f4.js → react-resizable.3755959b.js} +2 -2
  251. package/style.css +65 -0
  252. package/styles/{DynamicFilter.27c16026.js → DynamicFilter.c33860d6.js} +35 -49
  253. package/styles/DynamicFilter.styles.d.ts +1 -1
  254. package/styles/{index.b0a69054.js → index.2129f144.js} +14 -47
  255. package/vite-env.d.ts +4 -4
  256. package/components/DataGrid/formatters/index.2c2f0ae4.js +0 -1
  257. package/components/DragResizeWindow/index.4fea43a8.js +0 -480
  258. package/components/maps/components/GpsTools/GpsTools.d.ts +0 -1
  259. package/components/maps/components/GpsTools/icons.d.ts +0 -15
  260. /package/components/maps/components/{GpsTools → MapGpsTools}/contexts/GpsToolsContext/index.d.ts +0 -0
  261. /package/components/maps/components/{GpsTools → MapGpsTools}/contexts/GpsToolsContext/store.d.ts +0 -0
  262. /package/components/maps/components/{GpsTools → MapGpsTools}/contexts/GpsToolsContext/types.d.ts +0 -0
  263. /package/components/maps/components/{GpsTools → MapGpsTools}/hooks/useGpsToolsStore/index.d.ts +0 -0
  264. /package/components/maps/components/{GpsTools → MapGpsTools}/hooks/useLayers/index.d.ts +0 -0
  265. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/constants.d.ts +0 -0
  266. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/helpers.d.ts +0 -0
  267. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSubmit.d.ts +0 -0
  268. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSumbitErrorsFocus.d.ts +0 -0
  269. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/index.d.ts +0 -0
  270. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/index.d.ts +0 -0
  271. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/types.d.ts +0 -0
  272. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index.d.ts +0 -0
  273. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/types.d.ts +0 -0
  274. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/validations.d.ts +0 -0
  275. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/types.d.ts +0 -0
  276. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.d.ts +0 -0
  277. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/index.d.ts +0 -0
  278. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/FillData/index.d.ts +0 -0
  279. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/index.d.ts +0 -0
  280. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/types.d.ts +0 -0
  281. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/types.d.ts +0 -0
  282. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedFeatures.d.ts +0 -0
  283. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedGeofences.d.ts +0 -0
  284. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.d.ts +0 -0
  285. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.d.ts +0 -0
  286. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/subcomponents/Filter/index.d.ts +0 -0
  287. /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/constants.d.ts +0 -0
  288. /package/components/maps/components/{GpsTools → MapGpsTools}/types.d.ts +0 -0
  289. /package/utils/{index.14912462.js → index.78d1638f.js} +0 -0
@@ -1,240 +1,47 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { createContext, useRef, useEffect, useContext, useState, useMemo, useCallback } from "react";
3
- import { useModuleDictionary, useModuleSkeleton, useEnvironment, useHostTools, useNetwork, useModulePrivileges, usePaginate } from "@m4l/core";
4
- import { u as useMapStore, C as CommonFeatureRender, b as MAP_DICCTIONARY } from "../Map/index.9edada74.js";
2
+ import { useEnvironment, useModuleDictionary, useHostTools, useNetwork, useModulePrivileges, usePaginate, useModuleSkeleton } from "@m4l/core";
3
+ import { useState, useMemo, useCallback, useRef, useEffect, createContext, useContext } from "react";
5
4
  import { shallow } from "zustand/shallow";
6
- import { createStore, useStore } from "zustand";
7
- import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
8
- import { devtools } from "zustand/middleware";
9
- import { immer } from "zustand/middleware/immer";
10
- import { enableMapSet } from "immer";
11
5
  import "@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css";
12
6
  import "@geoman-io/leaflet-geoman-free";
13
- import { au as RHFormProviderStyled, av as StackGeofenceListRoot, aw as DivGpsToolsRoot } from "../../../../styles/index.b0a69054.js";
14
- import { generateUtilityClasses } from "@mui/material";
15
- import "@mui/base";
16
7
  import clsx from "clsx";
17
- import { D as DynamicFilter } from "../../../DynamicFilter/index.1aa60703.js";
8
+ import { au as RHFormProviderStyled, av as StackGeofenceListRoot, aw as DivTabGpsToolsRoot } from "../../../../styles/index.2129f144.js";
9
+ import { D as DynamicFilter } from "../../../DynamicFilter/index.900abf99.js";
10
+ import { C as ColumnIconFormatter } from "../../../DataGrid/formatters/index.59c6d2a6.js";
18
11
  import { C as ColumnDateFormatter } from "../../../DataGrid/formatters/ColumnDateFormatter/index.e00d0cf2.js";
19
- import { useFormContext, useWatch } from "react-hook-form";
20
- import { H as HelperError } from "../../../hook-form/HelperError/index.453b8be1.js";
21
- import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.156f6fb2.js";
22
- import { A as ActionFormIntro } from "../../../CommonActions/components/ActionFormIntro/index.f67b79e2.js";
23
- import { A as Actions } from "../../../CommonActions/components/Actions/index.dff2bcc7.js";
24
- import { B as Button } from "../../../mui_extended/Button/index.1f534053.js";
12
+ import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
13
+ import { useFormContext, useWatch, useFormState } from "react-hook-form";
14
+ import { H as HelperError } from "../../../hook-form/HelperError/index.f3c76460.js";
15
+ import { u as useModal } from "../../../../hooks/useModal/index.f2579c58.js";
16
+ import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.67239cbd.js";
17
+ import { createStore, useStore } from "zustand";
18
+ import { devtools } from "zustand/middleware";
19
+ import { immer } from "zustand/middleware/immer";
20
+ import { enableMapSet } from "immer";
21
+ import { A as ActionFormIntro } from "../../../CommonActions/components/ActionFormIntro/index.dfab71be.js";
22
+ import { W as WindowConfirm } from "../../../modal/WindowConfirm.af2047ad.js";
23
+ import { A as Actions } from "../../../CommonActions/components/Actions/index.2569b4df.js";
24
+ import { B as Button } from "../../../mui_extended/Button/index.3f98a33c.js";
25
25
  import { useMap } from "react-leaflet";
26
- 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.93e7cf1d.js";
29
- import { P as PaperForm } from "../../../PaperForm/index.56dab395.js";
30
- import { R as RHFAutocomplete } from "../../../hook-form/RHFAutocomplete/index.9b605832.js";
31
- import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.b9d95bd9.js";
32
- import { S as Stack } from "../../../mui_extended/Stack/index.84103b22.js";
33
- import { P as PropertyValue } from "../../../PropertyValue/index.370a03cb.js";
34
- import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index.2962d572.js";
35
- import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index.35947f79.js";
36
- import { T as Tooltip } from "../../../mui_extended/Tooltip/index.49bb5ee1.js";
27
+ import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index.f60f500e.js";
28
+ import { u as useTab } from "../../../../hooks/useTab/index.36300b7b.js";
29
+ import { generateUtilityClasses } from "@mui/material";
30
+ import "@mui/base";
31
+ import { P as PaperForm } from "../../../PaperForm/index.b76ee2b3.js";
32
+ import { R as RHFAutocomplete } from "../../../hook-form/RHFAutocomplete/index.6e22b0e5.js";
33
+ import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.d982607c.js";
34
+ import { S as Stack } from "../../../mui_extended/Stack/index.5ffdbe1b.js";
35
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.6e1e7606.js";
36
+ import { P as PropertyValue } from "../../../PropertyValue/index.b8350841.js";
37
+ import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index.b3921a34.js";
38
+ import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index.aa10efd0.js";
39
+ import { I as Icon } from "../../../Icon/index.735ed5af.js";
37
40
  import * as Yup from "yup";
38
- import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.4738a32a.js";
39
- import { u as useModal } from "../../../../hooks/useModal/index.e77737dd.js";
40
- import { W as WindowConfirm } from "../../../modal/WindowConfirm.eaec0ee1.js";
41
- import { D as DataGrid } from "../../../DataGrid/index.768e62a6.js";
42
- enableMapSet();
43
- const createGpsToolsStore = (initProps) => {
44
- const startProps = {
45
- currentTabGpsTool: "geofences",
46
- geofenceState: {
47
- rows: [],
48
- checkedGeofences: /* @__PURE__ */ new Set(),
49
- checkedCrossingFeatures: /* @__PURE__ */ new Set(),
50
- checkedInternalFeatures: /* @__PURE__ */ new Set(),
51
- hashGeofences: {}
52
- },
53
- ...initProps
54
- };
55
- return createStore(
56
- devtools(
57
- immer((set, _get) => ({
58
- ...startProps,
59
- gpsToolsActions: {
60
- init: () => {
61
- set((state) => {
62
- state.ownerState.status = "ready";
63
- });
64
- },
65
- setGpsToolsState: (status) => {
66
- set((state) => {
67
- state.ownerState.status = status;
68
- });
69
- },
70
- setHandlerGetLabel: (newHandler) => {
71
- set((state) => {
72
- state.getLabel = newHandler;
73
- });
74
- },
75
- setExternalState: (newExternalState) => {
76
- set((state) => {
77
- state.ownerState = { ...state.ownerState, ...newExternalState };
78
- });
79
- },
80
- setCurrentTabTool: (newTabTool) => {
81
- set((state) => {
82
- state.currentTabGpsTool = newTabTool;
83
- });
84
- }
85
- },
86
- geofenceActions: {
87
- addGeofence: (geofenceId, geofence) => {
88
- set((state) => {
89
- state.geofenceState.hashGeofences[geofenceId] = geofence;
90
- });
91
- },
92
- updatePartialGeofence: (geofenceId, geofence) => {
93
- set((state) => {
94
- state.geofenceState.hashGeofences[geofenceId] = {
95
- ...state.geofenceState.hashGeofences[geofenceId],
96
- ...geofence
97
- };
98
- });
99
- },
100
- updateRows: (newRows) => {
101
- set((state) => {
102
- state.geofenceState.rows = newRows;
103
- });
104
- },
105
- addCheckedGeofence: (geofenceId) => {
106
- set((state) => {
107
- state.geofenceState.checkedGeofences.add(geofenceId);
108
- state.geofenceState.checkedGeofences = new Set(state.geofenceState.checkedGeofences);
109
- });
110
- },
111
- removeCheckedGeofence: (geofenceId) => {
112
- set((state) => {
113
- state.geofenceState.checkedGeofences.delete(geofenceId);
114
- state.geofenceState.checkedGeofences = new Set(state.geofenceState.checkedGeofences);
115
- });
116
- },
117
- setCheckedGeofences: (newGeofences) => {
118
- set((state) => {
119
- state.geofenceState.checkedGeofences = new Set(newGeofences);
120
- });
121
- },
122
- setCheckedCrossingFeatures: (newFeatures) => {
123
- set((state) => {
124
- state.geofenceState.checkedCrossingFeatures = new Set(newFeatures);
125
- });
126
- },
127
- setCheckedInternalFeatures: (newFeatures) => {
128
- set((state) => {
129
- state.geofenceState.checkedInternalFeatures = new Set(newFeatures);
130
- });
131
- }
132
- }
133
- })),
134
- { name: `Map Tools Store` }
135
- )
136
- );
137
- };
138
- const GpsToolsContext = createContext(null);
139
- function GpsToolsProvider(props) {
140
- const { children } = props;
141
- const { getLabel } = useModuleDictionary();
142
- const isDesktop = useResponsiveDesktop();
143
- const isSkeleton = useModuleSkeleton();
144
- const isFirstRender = useFirstRender([getLabel]);
145
- const mapStoreRef = useRef();
146
- if (!mapStoreRef.current) {
147
- mapStoreRef.current = createGpsToolsStore({
148
- getLabel,
149
- ownerState: {
150
- status: "init",
151
- isMobile: !isDesktop,
152
- isSkeleton,
153
- focus: false
154
- }
155
- });
156
- }
157
- const { setHandlerGetLabel, setExternalState } = useStore(
158
- mapStoreRef.current,
159
- (state) => state.gpsToolsActions,
160
- shallow
161
- );
162
- useEffect(() => {
163
- if (!isFirstRender) {
164
- setHandlerGetLabel(getLabel);
165
- }
166
- }, [getLabel]);
167
- useEffect(() => {
168
- if (isFirstRender) {
169
- return;
170
- }
171
- setExternalState({ isMobile: !isDesktop, isSkeleton });
172
- }, [isDesktop, isSkeleton]);
173
- return /* @__PURE__ */ jsx(GpsToolsContext.Provider, { value: mapStoreRef.current, children });
174
- }
175
- function useGpsToolsStore(selector, equalityFn) {
176
- const context = useContext(GpsToolsContext);
177
- if (!context)
178
- throw new Error("useGpsToolsStore context must be use inside GpsToolsContext");
179
- return useStore(context, selector, equalityFn);
180
- }
181
- const ENDPOINT_GEOFENCE_GET = "geofences";
182
- const ENDPOINT_GEOFENCE_NEW_EDIT = "geofences";
183
- var GeofencesFeaturesLayers = /* @__PURE__ */ ((GeofencesFeaturesLayers2) => {
184
- GeofencesFeaturesLayers2["LAYER_GEOFENCES"] = "geofences";
185
- GeofencesFeaturesLayers2["LAYER_GEOFENCES_TRANSIT_FEATURES"] = "geofencesCrossingFeatures";
186
- GeofencesFeaturesLayers2["LAYER_GEOFENCES_INTERNAL_FEATURES"] = "geofencesInternalFeatures";
187
- return GeofencesFeaturesLayers2;
188
- })(GeofencesFeaturesLayers || {});
189
- function useLayers() {
190
- const { addLayer, removeLayer } = useMapStore((state) => state.mapActions, shallow);
191
- const { init } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
192
- useEffect(() => {
193
- addLayer({
194
- layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES,
195
- name: "Geocercas",
196
- renderFeature: CommonFeatureRender,
197
- geoJsonObject: {
198
- object: {
199
- type: "FeatureCollection",
200
- features: []
201
- }
202
- },
203
- autoFocus: false
204
- });
205
- addLayer({
206
- layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES,
207
- name: "Geometr\xEDas de tr\xE1nsito",
208
- renderFeature: CommonFeatureRender,
209
- geoJsonObject: {
210
- object: {
211
- type: "FeatureCollection",
212
- features: []
213
- }
214
- },
215
- autoFocus: false
216
- });
217
- addLayer({
218
- layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES,
219
- name: "Geometr\xEDas internas",
220
- renderFeature: CommonFeatureRender,
221
- geoJsonObject: {
222
- object: {
223
- type: "FeatureCollection",
224
- features: []
225
- }
226
- },
227
- autoFocus: false
228
- });
229
- init();
230
- return () => {
231
- removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES);
232
- removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES);
233
- removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES);
234
- };
235
- }, []);
236
- }
237
- const COMPONENT_CLASS_NAME = "M4LGpsTools";
41
+ import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.a5612e31.js";
42
+ import { u as useMapStore, C as CommonFeatureRender, G as GPS_TOOLS_POPUP_ID } from "../Map/index.92f8d4f5.js";
43
+ import { D as DataGrid } from "../../../DataGrid/index.79892601.js";
44
+ const COMPONENT_CLASS_NAME = "M4LMapGpsTools";
238
45
  const COMPONENT_MAP_TOOLS_ID = "gps_tools";
239
46
  const STYLE_OPACITIES = [
240
47
  {
@@ -305,25 +112,89 @@ const gpsToolsClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
305
112
  "gpsToolsGeofencesList",
306
113
  "gpsToolsGeofencesAddEdit",
307
114
  "gpsToolsGeofencesAddEditContent",
115
+ "gpsToolsGeofencesAddEditDrawFinishContainer",
308
116
  "toolGeofencesAddEditGeneral",
309
117
  "toolGeofencesAddEditStyle",
310
118
  "visible",
311
119
  "hidden"
312
120
  ]);
313
- const GPSTOOLSICONS = {
314
- GEOMETRY_CIRCLE: "geometry_circle.svg",
315
- GEOMETRY_RECTANGLE: "geometry_rectangle.svg",
316
- GEOMETRY_POLYGON: "geometry_polygon.svg",
317
- ADD: "add.svg",
318
- MEASURE: "measure.svg",
319
- GENERAL: "general.svg",
320
- CONFIG: "config.svg",
321
- STROKE: "stroke.svg",
322
- FILL: "fill.svg",
323
- EDIT: "edit.svg",
324
- DELETE: "delete.svg",
325
- ACTIVE: "active.svg",
326
- NAME: "name.svg"
121
+ const MAP_GPSTOOLS_DICCTIONARY = {
122
+ LABEL_GPSTOOLS_NAME: "label_gpstools_name",
123
+ ACTION_GEOFENCE_ADD: "action_geofence_add",
124
+ ACTION_GEOFENCE_EDIT: "action_geofence_edit",
125
+ ROW_ACTION_GEO_EDIT: "row_action_geo_edit",
126
+ ROW_ACTION_GEO_ENABLE: "row_action_geo_enable",
127
+ ROW_ACTION_GEO_DISABLE: "row_action_geo_disable",
128
+ ROW_ACTION_GEO_DELETE: "row_action_geo_delete",
129
+ LABEL_TAB_GEO: "label_tab_geo",
130
+ TAB_GENERAL_CONFIG_TOOLTIP: "tab_general_config_tooltip",
131
+ PAPER_GENERAL: "paper_general",
132
+ LABEL_ID: "label_id",
133
+ LABEL_NAME: "label_name",
134
+ LABEL_GEOMETRY_TYPE: "label_geometry_type",
135
+ LABEL_GEOMETRY_CIRCLE: "label_geometry_circle",
136
+ LABEL_GEOMETRY_RECTANGLE: "label_geometry_rectangle",
137
+ LABEL_GEOMETRY_POLYGON: "label_geometry_polygon",
138
+ LABEL_DRAW: "label_draw",
139
+ LABEL_FINISH: "label_finish",
140
+ PAPER_CONFIG: "paper_config",
141
+ LABEL_ALIAS: "label_alias",
142
+ LABEL_CUSTOMER_ID: "label_customer_id",
143
+ LABEL_TIME_MIN_IN_SECONDS: "label_time_min_in_seconds",
144
+ LABEL_TIME_MIN_OUT_SECONDS: "label_time_min_out_seconds",
145
+ TAB_STYLE_CONFIG_TOOLTIP: "tab_style_tooltip",
146
+ PAPER_STROKE: "paper_stroke",
147
+ LABEL_COLOR: "label_color",
148
+ LABEL_OPACITY: "label_opacity",
149
+ LABEL_WEIGHT: "label_weight",
150
+ LABEL_DASH_ARRAY: "label_dash_array",
151
+ LABEL_DASH_OFFSET: "label_dash_offset",
152
+ PAPER_FILL: "paper_fill",
153
+ LABEL_RADIUS: "label_radius",
154
+ LABEL_LAT: "label_lat",
155
+ LABEL_LON: "label_lon",
156
+ LABEL_PLACE_MARKER: "label_place_marker",
157
+ LABEL_FIRST_VERTEX: "label_first_vertex",
158
+ LABEL_CONTINUE_LINE: "label_continue_line",
159
+ LABEL_FINISH_LINE: "label_finish_line",
160
+ LABEL_FINISH_POLY: "label_finish_poly",
161
+ LABEL_FINISH_RECT: "label_finish_rect",
162
+ LABEL_START_CIRCLE: "label_start_circle",
163
+ LABEL_FINISH_CIRCLE: "label_finish_circle",
164
+ LABEL_PLACE_CIRCLE_MARKER: "label_place_circle_marker",
165
+ VALIDATION_GEOMETRY_REQUIRED: "validation_geometry_required",
166
+ VALIDATION_FIELD_REQUIRED: "validation_field_required",
167
+ VALIDATION_FIELD_TYPE_NUMBER_ERROR: "validation_field_type_number_error",
168
+ VALIDATION_FIELD_MIN_NUMBER_ERROR: "validation_field_min_number_error",
169
+ LABEL_VIEW_TRANSIT_FEATURES: "label_view_crossing_features",
170
+ LABEL_VIEW_INTERNAL_FEATURES: "label_view_internal_features",
171
+ LABEL_CREATED_AT: "label_created_at",
172
+ LABEL_UPDATED_AT: "label_updated_at",
173
+ MODAL_DELETE_GEO_TITLE: "modal_delete_geo_title",
174
+ MODAL_DELETE_GEO_MESSAGE: "modal_delete_geo_message",
175
+ MODAL_DISABLE_GEO_TITLE: "modal_disable_geo_title",
176
+ MODAL_DISABLE_MESSAGE: "modal_disable_geo_message",
177
+ ACTION_CANCEL: "action_cancel"
178
+ };
179
+ const MAP_GPSTOOLS_ICONS = {
180
+ MAP_GPS_TOOLS_TOOL: "cmp_map_gpstools_tool.svg",
181
+ GEOFENCES: "cmp_map_gpstools_geofences.svg",
182
+ GEOFENCE_ID: "cmp_map_gpstools_geofence_id.svg",
183
+ GEOFENCE_NAME: "cmp_map_gpstools_geofence_name.svg",
184
+ GEOFENCE_ADD: "cmp_map_gpstools_add-geofence.svg",
185
+ GEOFENCE_EDIT: "cmp_map_gpstools_edit-geofence.svg",
186
+ GEOFENCE_DELETE: "cmp_map_gpstools_delete-geofence.svg",
187
+ GENERAL: "cmp_map_gpstools_general.svg",
188
+ DATA: "cmp_map_gpstools_data.svg",
189
+ STYLE: "cmp_map_gpstools_style.svg",
190
+ GEOFENCE_DRAW: "cmp_map_gpstools_draw.svg",
191
+ GEOFENCE_FINISH: "cmp_map_gpstools_finish.svg",
192
+ GEOFENCE_TYPE_CIRCLE: "cmp_map_gpstools_circle.svg",
193
+ GEOFENCE_TYPE_RECTANGLE: "cmp_map_gpstools_rectangle.svg",
194
+ GEOFENCE_TYPE_POLYGON: "cmp_map_gpstools_polygon.svg",
195
+ CONFIG: "cmp_map_gpstools_config.svg",
196
+ STROKE: "cmp_map_gpstools_stroke.svg",
197
+ FILL: "cmp_map_gpstools_fill.svg"
327
198
  };
328
199
  function Filter(props) {
329
200
  const { refresh, setBackendQueryParams } = props;
@@ -345,19 +216,19 @@ function Filter(props) {
345
216
  fields: [
346
217
  {
347
218
  name: "id",
348
- dictionaryId: MAP_DICCTIONARY.LABEL_ID,
219
+ dictionaryId: MAP_GPSTOOLS_DICCTIONARY.LABEL_ID,
349
220
  type: "number",
350
221
  multiple: true,
351
222
  presence: "optional",
352
- urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.ACTIVE}`
223
+ urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_ID}`
353
224
  },
354
225
  {
355
226
  name: "name",
356
- dictionaryId: MAP_DICCTIONARY.LABEL_NAME,
227
+ dictionaryId: MAP_GPSTOOLS_DICCTIONARY.LABEL_NAME,
357
228
  type: "string",
358
229
  multiple: true,
359
230
  presence: "optional",
360
- urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.NAME}`
231
+ urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_NAME}`
361
232
  }
362
233
  ],
363
234
  initialAppliedFilters: initialFilter
@@ -366,24 +237,48 @@ function Filter(props) {
366
237
  }
367
238
  function useColumns(_props) {
368
239
  const { getLabel } = useModuleDictionary();
240
+ const { host_static_assets, environment_assets } = useEnvironment();
369
241
  const columns = useMemo(
370
242
  () => [
371
243
  {
372
244
  key: "id",
373
- name: getLabel(MAP_DICCTIONARY.LABEL_ID),
245
+ name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_ID),
374
246
  type: "number",
375
247
  width: 40,
376
248
  visible: false
377
249
  },
250
+ {
251
+ key: "geometry",
252
+ name: "",
253
+ type: "string",
254
+ formatter: ColumnIconFormatter({
255
+ getIconUrl: (formatterRowProps) => {
256
+ const { row } = formatterRowProps;
257
+ let iconUrl;
258
+ if (row.type.id === "gt_polygon") {
259
+ iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_POLYGON;
260
+ } else if (row.type.id === "gt_circle") {
261
+ iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_CIRCLE;
262
+ } else {
263
+ iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_RECTANGLE;
264
+ }
265
+ return {
266
+ iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${iconUrl}`
267
+ };
268
+ }
269
+ }),
270
+ width: 30,
271
+ minWidth: 25
272
+ },
378
273
  {
379
274
  key: "name",
380
- name: getLabel(MAP_DICCTIONARY.LABEL_NAME),
275
+ name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_NAME),
381
276
  type: "string",
382
- width: 300
277
+ width: 220
383
278
  },
384
279
  {
385
280
  key: "created_at",
386
- name: getLabel(MAP_DICCTIONARY.LABEL_CREATED_AT),
281
+ name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_CREATED_AT),
387
282
  type: "date",
388
283
  formatter: ColumnDateFormatter({
389
284
  presentationType: "datetime",
@@ -393,7 +288,7 @@ function useColumns(_props) {
393
288
  },
394
289
  {
395
290
  key: "updated_at",
396
- name: getLabel(MAP_DICCTIONARY.LABEL_UPDATED_AT),
291
+ name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_UPDATED_AT),
397
292
  type: "date",
398
293
  formatter: ColumnDateFormatter({
399
294
  presentationType: "datetime",
@@ -409,13 +304,36 @@ function useColumns(_props) {
409
304
  function MyActions(props) {
410
305
  const { geofenceId } = props;
411
306
  const { control } = useFormContext();
307
+ const { getLabel } = useModuleDictionary();
308
+ const { openModal } = useModal();
412
309
  const inEdition = useWatch({
413
310
  control,
414
311
  name: "inEdition"
415
312
  });
313
+ const { isDirty } = useFormState({
314
+ control
315
+ });
416
316
  const { closePopup, showPopup } = usePopupsStore((state) => state.popupsActions);
417
317
  const { addCheckedGeofence } = useGpsToolsStore((state) => state.geofenceActions);
418
- const onClickCancel = () => {
318
+ const onClickCancelLocal = useCallback(() => {
319
+ if (isDirty) {
320
+ openModal({
321
+ window: /* @__PURE__ */ jsx(
322
+ WindowConfirm,
323
+ {
324
+ variant: "warning",
325
+ title: getLabel("common_actions.confirm_quit_title"),
326
+ msg: getLabel("common_actions.confirm_quit_msg"),
327
+ onClickIntro: onConfirmQuit
328
+ }
329
+ ),
330
+ variant: "warning"
331
+ });
332
+ } else {
333
+ onConfirmQuit();
334
+ }
335
+ }, [getLabel, isDirty, openModal]);
336
+ const onConfirmQuit = () => {
419
337
  closePopup("geofencesAddEdit");
420
338
  if (geofenceId !== void 0) {
421
339
  addCheckedGeofence(geofenceId);
@@ -424,7 +342,7 @@ function MyActions(props) {
424
342
  };
425
343
  return /* @__PURE__ */ jsxs(Actions, { children: [
426
344
  /* @__PURE__ */ jsx(HelperError, { name: "geometry" }),
427
- /* @__PURE__ */ jsx(Button, { onClick: onClickCancel, disabled: inEdition, children: "Cancelar" }),
345
+ /* @__PURE__ */ jsx(Button, { onClick: onClickCancelLocal, disabled: inEdition, children: getLabel(MAP_GPSTOOLS_DICCTIONARY.ACTION_CANCEL) }),
428
346
  /* @__PURE__ */ jsx(ActionFormIntro, { disabled: inEdition })
429
347
  ] });
430
348
  }
@@ -490,11 +408,10 @@ const formatDataEnpoint = (response) => {
490
408
  const getLayerFromGeometry = (geometry, geofenceTypeId, radius, options) => {
491
409
  if (geometry) {
492
410
  if (geofenceTypeId === "gt_circle" && geometry.type === "Point") {
493
- return L.circle(
494
- [geometry.coordinates[1], geometry.coordinates[0]],
495
- radius || 0,
496
- options
497
- );
411
+ return L.circle([geometry.coordinates[1], geometry.coordinates[0]], {
412
+ ...options,
413
+ radius: radius || 0
414
+ });
498
415
  } else if (geofenceTypeId === "gt_polygon" && geometry.type === "Polygon") {
499
416
  const coordinates = geometry.coordinates.map(
500
417
  (ring) => ring.map((position) => [position[1], position[0]])
@@ -593,14 +510,14 @@ function useDrawing() {
593
510
  map.pm.setLang("en", {
594
511
  tooltips: {
595
512
  placeMarker: void 0,
596
- firstVertex: getLabel(MAP_DICCTIONARY.LABEL_FIRST_VERTEX),
597
- continueLine: getLabel(MAP_DICCTIONARY.LABEL_CONTINUE_LINE),
598
- finishLine: getLabel(MAP_DICCTIONARY.LABEL_FINISH_LINE),
599
- finishPoly: getLabel(MAP_DICCTIONARY.LABEL_FINISH_POLY),
600
- finishRect: getLabel(MAP_DICCTIONARY.LABEL_FINISH_RECT),
601
- startCircle: getLabel(MAP_DICCTIONARY.LABEL_START_CIRCLE),
602
- finishCircle: getLabel(MAP_DICCTIONARY.LABEL_FINISH_CIRCLE),
603
- placeCircleMarker: getLabel(MAP_DICCTIONARY.LABEL_PLACE_CIRCLE_MARKER)
513
+ firstVertex: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FIRST_VERTEX),
514
+ continueLine: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_CONTINUE_LINE),
515
+ finishLine: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_LINE),
516
+ finishPoly: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_POLY),
517
+ finishRect: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_RECT),
518
+ startCircle: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_START_CIRCLE),
519
+ finishCircle: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_CIRCLE),
520
+ placeCircleMarker: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_PLACE_CIRCLE_MARKER)
604
521
  }
605
522
  });
606
523
  }, [map, getLabel]);
@@ -627,10 +544,10 @@ function useDrawing() {
627
544
  fillColor,
628
545
  fillOpacity
629
546
  });
630
- setValue("lat", layer.getLatLng().lat);
631
- setValue("lng", layer.getLatLng().lng);
547
+ setValue("lat", Number(layer.getLatLng().lat.toFixed(8)));
548
+ setValue("lng", Number(layer.getLatLng().lng.toFixed(8)));
632
549
  layer.on("pm:change", (_e) => {
633
- setValue("properties.radius", layer.getRadius());
550
+ setValue("properties.radius", Number(layer.getRadius().toFixed(1)));
634
551
  });
635
552
  });
636
553
  });
@@ -683,7 +600,10 @@ function useDrawing() {
683
600
  if (shape === "Circle") {
684
601
  currentLayer.current.on("pm:change", (e) => {
685
602
  currentLayer.current = e.layer;
603
+ setValue("lat", Number(currentLayer.current.getLatLng().lat.toFixed(8)));
604
+ setValue("lng", Number(currentLayer.current.getLatLng().lng.toFixed(8)));
686
605
  setValue("properties.radius", currentLayer.current.getRadius());
606
+ setValue("properties.radius", Number(currentLayer.current.getRadius().toFixed(1)));
687
607
  });
688
608
  }
689
609
  }
@@ -760,34 +680,34 @@ function GeneralData() {
760
680
  const { host_static_assets, environment_assets } = useEnvironment();
761
681
  const { inEdition, handleDraw, handleFinish, geometrTypeIdCached } = useDrawing();
762
682
  useSumbitErrorsFocus();
763
- const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GENERAL}`;
683
+ const urlIcon = `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GENERAL}`;
764
684
  const geofencesTypes = useMemo(() => {
765
685
  return [
766
686
  {
767
687
  id: "gt_circle",
768
- name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_CIRCLE),
769
- url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_CIRCLE}`
688
+ name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_CIRCLE),
689
+ url: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_CIRCLE}`
770
690
  },
771
691
  {
772
692
  id: "gt_polygon",
773
- name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_POLYGON),
774
- url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_POLYGON}`
693
+ name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_POLYGON),
694
+ url: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_POLYGON}`
775
695
  },
776
696
  {
777
697
  id: "gt_rectangle",
778
- name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_RECTANGLE),
779
- url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_RECTANGLE}`
698
+ name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_RECTANGLE),
699
+ url: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_RECTANGLE}`
780
700
  }
781
701
  ];
782
702
  }, [getLabel]);
783
- return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_GENERAL), children: [
703
+ return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_GPSTOOLS_DICCTIONARY.PAPER_GENERAL), children: [
784
704
  /* @__PURE__ */ jsx(
785
705
  RHFTextField,
786
706
  {
787
707
  name: "name",
788
708
  disabled: false,
789
709
  type: "text",
790
- label: getLabel(`${MAP_DICCTIONARY.LABEL_NAME}`)
710
+ label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_NAME}`)
791
711
  }
792
712
  ),
793
713
  /* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 1, alignItems: "center", children: [
@@ -801,47 +721,78 @@ function GeneralData() {
801
721
  getOptionLabel: (option) => option.name,
802
722
  isOptionEqualToValue: (option, value) => option.id === value.id,
803
723
  getOptionUrlImage: (option) => option.url,
804
- label: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_TYPE)
724
+ imageHeight: "12px",
725
+ imageWidth: "12px",
726
+ label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_TYPE)
805
727
  }
806
728
  ),
807
- /* @__PURE__ */ jsx(Button, { onClick: handleDraw, disabled: inEdition || !geometrTypeIdCached, children: getLabel(MAP_DICCTIONARY.LABEL_DRAW) }),
808
- /* @__PURE__ */ jsx(Button, { onClick: handleFinish, disabled: !inEdition, children: getLabel(MAP_DICCTIONARY.LABEL_FINISH) })
729
+ /* @__PURE__ */ jsxs(
730
+ Stack,
731
+ {
732
+ className: gpsToolsClasses.gpsToolsGeofencesAddEditDrawFinishContainer,
733
+ direction: "row",
734
+ gap: 1,
735
+ alignItems: "center",
736
+ children: [
737
+ /* @__PURE__ */ jsx(
738
+ IconButton,
739
+ {
740
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_DRAW}`,
741
+ variant: "primary",
742
+ onClick: handleDraw,
743
+ disabled: inEdition || !geometrTypeIdCached,
744
+ tooltip: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_DRAW)
745
+ }
746
+ ),
747
+ /* @__PURE__ */ jsx(
748
+ IconButton,
749
+ {
750
+ src: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_FINISH}`,
751
+ variant: "primary",
752
+ onClick: handleFinish,
753
+ disabled: !inEdition,
754
+ tooltip: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH)
755
+ }
756
+ )
757
+ ]
758
+ }
759
+ )
809
760
  ] }),
810
761
  geometrTypeIdCached && geometrTypeIdCached === "gt_circle" && /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
811
762
  /* @__PURE__ */ jsx(
812
763
  RHFTextField,
813
764
  {
814
765
  name: "properties.radius",
815
- label: getLabel(MAP_DICCTIONARY.LABEL_RADIUS),
816
- autoComplete: "on",
766
+ label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_RADIUS),
767
+ autoComplete: "off",
817
768
  skeletonWidth: "70%",
818
769
  skeletonHeight: "18px",
819
770
  disabled: true,
820
- size: "medium"
771
+ size: "small"
821
772
  }
822
773
  ),
823
774
  /* @__PURE__ */ jsx(
824
775
  RHFTextField,
825
776
  {
826
777
  name: "lat",
827
- label: getLabel(MAP_DICCTIONARY.LABEL_LAT),
828
- autoComplete: "on",
778
+ label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_LAT),
779
+ autoComplete: "off",
829
780
  skeletonWidth: "70%",
830
781
  skeletonHeight: "18px",
831
782
  disabled: true,
832
- size: "medium"
783
+ size: "small"
833
784
  }
834
785
  ),
835
786
  /* @__PURE__ */ jsx(
836
787
  RHFTextField,
837
788
  {
838
789
  name: "lng",
839
- label: getLabel(MAP_DICCTIONARY.LABEL_LON),
840
- autoComplete: "on",
790
+ label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_LON),
791
+ autoComplete: "off",
841
792
  skeletonWidth: "70%",
842
793
  skeletonHeight: "18px",
843
794
  disabled: true,
844
- size: "medium"
795
+ size: "small"
845
796
  }
846
797
  )
847
798
  ] })
@@ -851,15 +802,15 @@ function GeneralData() {
851
802
  function ConfigData() {
852
803
  const { getLabel } = useModuleDictionary();
853
804
  const { host_static_assets, environment_assets } = useEnvironment();
854
- const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.CONFIG}`;
855
- return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_CONFIG), children: [
805
+ const urlIcon = `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.CONFIG}`;
806
+ return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_GPSTOOLS_DICCTIONARY.PAPER_CONFIG), children: [
856
807
  /* @__PURE__ */ jsx(
857
808
  RHFTextField,
858
809
  {
859
810
  name: "alias",
860
811
  disabled: false,
861
812
  type: "text",
862
- label: getLabel(`${MAP_DICCTIONARY.LABEL_ALIAS}`)
813
+ label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_ALIAS}`)
863
814
  }
864
815
  ),
865
816
  /* @__PURE__ */ jsx(
@@ -868,7 +819,7 @@ function ConfigData() {
868
819
  name: "customerId",
869
820
  disabled: false,
870
821
  type: "text",
871
- label: getLabel(`${MAP_DICCTIONARY.LABEL_CUSTOMER_ID}`)
822
+ label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_CUSTOMER_ID}`)
872
823
  }
873
824
  ),
874
825
  /* @__PURE__ */ jsx(
@@ -877,7 +828,7 @@ function ConfigData() {
877
828
  name: "timeMinInSeconds",
878
829
  disabled: false,
879
830
  type: "number",
880
- label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_IN_SECONDS}`)
831
+ label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_TIME_MIN_IN_SECONDS}`)
881
832
  }
882
833
  ),
883
834
  /* @__PURE__ */ jsx(
@@ -886,7 +837,7 @@ function ConfigData() {
886
837
  name: "timeMinOutSeconds",
887
838
  disabled: false,
888
839
  type: "number",
889
- label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_OUT_SECONDS}`)
840
+ label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_TIME_MIN_OUT_SECONDS}`)
890
841
  }
891
842
  )
892
843
  ] });
@@ -894,12 +845,12 @@ function ConfigData() {
894
845
  function FillData() {
895
846
  const { getLabel } = useModuleDictionary();
896
847
  const { host_static_assets, environment_assets } = useEnvironment();
897
- const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.FILL}`;
898
- return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_STROKE), children: [
848
+ const urlIcon = `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.FILL}`;
849
+ return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_GPSTOOLS_DICCTIONARY.PAPER_FILL), children: [
899
850
  /* @__PURE__ */ jsx(
900
851
  PropertyValue,
901
852
  {
902
- property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
853
+ property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_COLOR}`),
903
854
  isForm: true,
904
855
  propertyWidth: 150,
905
856
  value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.fillColor" })
@@ -909,7 +860,7 @@ function FillData() {
909
860
  /* @__PURE__ */ jsx(
910
861
  PropertyValue,
911
862
  {
912
- property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
863
+ property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_OPACITY}`),
913
864
  isForm: true,
914
865
  propertyWidth: 150,
915
866
  value: /* @__PURE__ */ jsx(
@@ -919,8 +870,7 @@ function FillData() {
919
870
  autoComplete: "off",
920
871
  options: STYLE_OPACITIES,
921
872
  getOptionLabel: (option) => option.label,
922
- isOptionEqualToValue: (option, value) => option.value === value.value,
923
- label: "ssss"
873
+ isOptionEqualToValue: (option, value) => option.value === value.value
924
874
  }
925
875
  )
926
876
  },
@@ -931,12 +881,12 @@ function FillData() {
931
881
  function StrokeData() {
932
882
  const { getLabel } = useModuleDictionary();
933
883
  const { host_static_assets, environment_assets } = useEnvironment();
934
- const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.STROKE}`;
935
- return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_STROKE), children: [
884
+ const urlIcon = `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.STROKE}`;
885
+ return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_GPSTOOLS_DICCTIONARY.PAPER_STROKE), children: [
936
886
  /* @__PURE__ */ jsx(
937
887
  PropertyValue,
938
888
  {
939
- property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
889
+ property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_COLOR}`),
940
890
  isForm: true,
941
891
  propertyWidth: 150,
942
892
  value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.strokeColor" })
@@ -946,7 +896,7 @@ function StrokeData() {
946
896
  /* @__PURE__ */ jsx(
947
897
  PropertyValue,
948
898
  {
949
- property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
899
+ property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_OPACITY}`),
950
900
  isForm: true,
951
901
  propertyWidth: 150,
952
902
  value: /* @__PURE__ */ jsx(
@@ -956,8 +906,7 @@ function StrokeData() {
956
906
  autoComplete: "off",
957
907
  options: STYLE_OPACITIES,
958
908
  getOptionLabel: (option) => option.label,
959
- isOptionEqualToValue: (option, value) => option.value === value.value,
960
- label: "ssss"
909
+ isOptionEqualToValue: (option, value) => option.value === value.value
961
910
  }
962
911
  )
963
912
  },
@@ -966,7 +915,7 @@ function StrokeData() {
966
915
  /* @__PURE__ */ jsx(
967
916
  PropertyValue,
968
917
  {
969
- property: getLabel(`${MAP_DICCTIONARY.LABEL_WEIGHT}`),
918
+ property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_WEIGHT}`),
970
919
  isForm: true,
971
920
  propertyWidth: 150,
972
921
  value: /* @__PURE__ */ jsx(
@@ -976,8 +925,7 @@ function StrokeData() {
976
925
  autoComplete: "off",
977
926
  options: STYLE_WHEIGHTS,
978
927
  getOptionLabel: (option) => option.label,
979
- isOptionEqualToValue: (option, value) => option.value === value.value,
980
- label: "ssss"
928
+ isOptionEqualToValue: (option, value) => option.value === value.value
981
929
  }
982
930
  )
983
931
  },
@@ -986,7 +934,7 @@ function StrokeData() {
986
934
  /* @__PURE__ */ jsx(
987
935
  PropertyValue,
988
936
  {
989
- property: getLabel(`${MAP_DICCTIONARY.LABEL_DASH_ARRAY}`),
937
+ property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_DASH_ARRAY}`),
990
938
  isForm: true,
991
939
  propertyWidth: 150,
992
940
  value: /* @__PURE__ */ jsx(
@@ -996,8 +944,7 @@ function StrokeData() {
996
944
  autoComplete: "off",
997
945
  options: STYLE_PATTERNS,
998
946
  getOptionLabel: (option) => option.label,
999
- isOptionEqualToValue: (option, value) => option.value === value.value,
1000
- label: "ssss"
947
+ isOptionEqualToValue: (option, value) => option.value === value.value
1001
948
  }
1002
949
  )
1003
950
  },
@@ -1013,24 +960,25 @@ function StyleData() {
1013
960
  }
1014
961
  function MyTabs() {
1015
962
  const { getLabel } = useModuleDictionary();
963
+ const { host_static_assets, environment_assets } = useEnvironment();
1016
964
  const { currentTab, handleChange } = useTab();
1017
965
  const geofenceAddEditTabs = useMemo(() => {
1018
966
  return [
1019
967
  {
1020
- value: "general",
1021
- icon: void 0,
1022
- components: /* @__PURE__ */ jsxs(Fragment, { children: [
968
+ id: "general",
969
+ iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.DATA}`,
970
+ component: /* @__PURE__ */ jsxs(Fragment, { children: [
1023
971
  /* @__PURE__ */ jsx(GeneralData, {}),
1024
972
  /* @__PURE__ */ jsx(ConfigData, {})
1025
973
  ] }),
1026
- toolTip: getLabel(MAP_DICCTIONARY.TAB_GENERAL_CONFIG_TOOLTIP),
974
+ label: getLabel(MAP_GPSTOOLS_DICCTIONARY.TAB_GENERAL_CONFIG_TOOLTIP),
1027
975
  className: gpsToolsClasses.toolGeofencesAddEditGeneral
1028
976
  },
1029
977
  {
1030
- value: "style",
1031
- icon: void 0,
1032
- components: /* @__PURE__ */ jsx(StyleData, {}),
1033
- toolTip: getLabel(MAP_DICCTIONARY.TAB_STYLE_CONFIG_TOOLTIP),
978
+ id: "style",
979
+ iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.STYLE}`,
980
+ component: /* @__PURE__ */ jsx(StyleData, {}),
981
+ label: getLabel(MAP_GPSTOOLS_DICCTIONARY.TAB_STYLE_CONFIG_TOOLTIP),
1034
982
  className: gpsToolsClasses.toolGeofencesAddEditStyle
1035
983
  }
1036
984
  ];
@@ -1047,18 +995,18 @@ function MyTabs() {
1047
995
  children: geofenceAddEditTabs.map((tab) => /* @__PURE__ */ jsx(
1048
996
  Tab,
1049
997
  {
1050
- value: tab.value,
1051
- icon: tab.icon,
1052
- label: /* @__PURE__ */ jsx(Tooltip, { title: tab.toolTip, children: /* @__PURE__ */ jsx("span", { children: tab.toolTip }) }),
998
+ value: tab.id,
999
+ icon: /* @__PURE__ */ jsx(Icon, { src: tab.iconUrl }),
1000
+ label: "",
1053
1001
  SKTWidth: "100px",
1054
1002
  SKTHeight: "14px"
1055
1003
  },
1056
- tab.value
1004
+ tab.id
1057
1005
  ))
1058
1006
  }
1059
1007
  ),
1060
1008
  geofenceAddEditTabs.map((tab) => {
1061
- const isMatched = tab.value === currentTab;
1009
+ const isMatched = tab.id === currentTab;
1062
1010
  return /* @__PURE__ */ jsx(
1063
1011
  TabContent,
1064
1012
  {
@@ -1067,24 +1015,24 @@ function MyTabs() {
1067
1015
  tab.className,
1068
1016
  isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
1069
1017
  ),
1070
- children: tab.components
1018
+ children: tab.component
1071
1019
  },
1072
- tab.value
1020
+ tab.id
1073
1021
  );
1074
1022
  })
1075
1023
  ] });
1076
1024
  }
1077
1025
  function GeneralDataValidation(getLabel) {
1078
1026
  return {
1079
- name: Yup.string().required(getLabel(MAP_DICCTIONARY.VALIDATION_FIELD_REQUIRED)),
1080
- geometry: Yup.object().nullable().required(getLabel(MAP_DICCTIONARY.VALIDATION_GEOMETRY_REQUIRED)),
1081
- geofenceType: Yup.object().nullable().required(getLabel(MAP_DICCTIONARY.VALIDATION_FIELD_REQUIRED))
1027
+ name: Yup.string().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_REQUIRED)),
1028
+ geometry: Yup.object().nullable().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_GEOMETRY_REQUIRED)),
1029
+ geofenceType: Yup.object().nullable().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_REQUIRED))
1082
1030
  };
1083
1031
  }
1084
1032
  function ConfigDataValidation(getLabel) {
1085
1033
  return {
1086
- timeMinInSeconds: Yup.number().required(getLabel(MAP_DICCTIONARY.VALIDATION_FIELD_REQUIRED)).typeError(getLabel(MAP_DICCTIONARY.VALIDATION_FIELD_TYPE_NUMBER_ERROR)),
1087
- timeMinOutSeconds: Yup.number().required(getLabel(MAP_DICCTIONARY.VALIDATION_FIELD_REQUIRED)).typeError(getLabel(MAP_DICCTIONARY.VALIDATION_FIELD_TYPE_NUMBER_ERROR))
1034
+ timeMinInSeconds: Yup.number().nullable().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_REQUIRED)).typeError(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_TYPE_NUMBER_ERROR)).min(0, getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_MIN_NUMBER_ERROR)),
1035
+ timeMinOutSeconds: Yup.number().nullable().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_REQUIRED)).typeError(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_TYPE_NUMBER_ERROR)).min(0, getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_MIN_NUMBER_ERROR))
1088
1036
  };
1089
1037
  }
1090
1038
  function useValidation() {
@@ -1098,6 +1046,14 @@ function useValidation() {
1098
1046
  );
1099
1047
  return { validationSchema };
1100
1048
  }
1049
+ const ENDPOINT_GEOFENCE_GET = "geofences";
1050
+ const ENDPOINT_GEOFENCE_NEW_EDIT = "geofences";
1051
+ var GeofencesFeaturesLayers = /* @__PURE__ */ ((GeofencesFeaturesLayers2) => {
1052
+ GeofencesFeaturesLayers2["LAYER_GEOFENCES"] = "geofences";
1053
+ GeofencesFeaturesLayers2["LAYER_GEOFENCES_TRANSIT_FEATURES"] = "geofencesCrossingFeatures";
1054
+ GeofencesFeaturesLayers2["LAYER_GEOFENCES_INTERNAL_FEATURES"] = "geofencesInternalFeatures";
1055
+ return GeofencesFeaturesLayers2;
1056
+ })(GeofencesFeaturesLayers || {});
1101
1057
  const getSummitData = (values, geofenceId) => {
1102
1058
  const newEditObj = {
1103
1059
  name: values.name,
@@ -1194,7 +1150,7 @@ function GeofenceAddEdit(props) {
1194
1150
  });
1195
1151
  const { validationSchema } = useValidation();
1196
1152
  const { onSubmit } = useSubmit({ objectId: geofenceId });
1197
- return /* @__PURE__ */ jsxs(
1153
+ return /* @__PURE__ */ jsx(
1198
1154
  RHFormProviderStyled,
1199
1155
  {
1200
1156
  statusLoad,
@@ -1202,10 +1158,10 @@ function GeofenceAddEdit(props) {
1202
1158
  values: formValues,
1203
1159
  validationSchema,
1204
1160
  className: gpsToolsClasses.gpsToolsGeofencesAddEdit,
1205
- children: [
1161
+ children: /* @__PURE__ */ jsxs(Stack, { direction: "column", gap: "8px", children: [
1206
1162
  /* @__PURE__ */ jsx(TabProvider, { initialValue: "general", children: /* @__PURE__ */ jsx(MyTabs, {}) }),
1207
1163
  /* @__PURE__ */ jsx(MyActions, { ...props })
1208
- ]
1164
+ ] })
1209
1165
  }
1210
1166
  );
1211
1167
  }
@@ -1221,23 +1177,24 @@ function useRowActionsGetter(props) {
1221
1177
  const { toast } = useHostTools();
1222
1178
  const isDesktop = useResponsiveDesktop();
1223
1179
  const [urlIconEdit] = useState(
1224
- `${host_static_assets}/${environment_assets}/frontend/components/maptools/assets/icons/${GPSTOOLSICONS.EDIT}`
1180
+ `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_EDIT}`
1225
1181
  );
1226
1182
  const [urlIconDelete] = useState(
1227
- `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/maptools/assets/icons/${GPSTOOLSICONS.DELETE}`
1183
+ `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_DELETE}`
1228
1184
  );
1229
- const goEdit = (objectId) => {
1185
+ const goEdit = (objectId, name) => {
1230
1186
  hidePopup("gpsTools");
1231
1187
  addPopup({
1232
1188
  popupId: "geofencesAddEdit",
1233
- title: "geofencesAddEdit",
1189
+ title: getLabel(MAP_GPSTOOLS_DICCTIONARY.ACTION_GEOFENCE_EDIT),
1190
+ editionInfo: `${getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_ID)}:${objectId} - ${name} `,
1234
1191
  componentProps: { fullRefresh, geofenceId: objectId },
1235
1192
  functionComponent: GeofenceAddEdit,
1236
1193
  defaultPosition: {
1237
1194
  vertical: { top: 50, bottom: 50 },
1238
1195
  horizontal: { right: 50, width: 380 }
1239
1196
  },
1240
- iconUrl: ""
1197
+ iconUrl: urlIconEdit
1241
1198
  });
1242
1199
  removeCheckedGeofence(objectId);
1243
1200
  };
@@ -1247,8 +1204,8 @@ function useRowActionsGetter(props) {
1247
1204
  window: /* @__PURE__ */ jsx(
1248
1205
  WindowConfirm,
1249
1206
  {
1250
- title: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_TITLE),
1251
- msg: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_MESSAGE),
1207
+ title: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODAL_DELETE_GEO_TITLE),
1208
+ msg: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODAL_DELETE_GEO_MESSAGE),
1252
1209
  onClickIntro: () => onConfirmDelete(row)
1253
1210
  }
1254
1211
  ),
@@ -1274,10 +1231,19 @@ function useRowActionsGetter(props) {
1274
1231
  const conditionalItems = [];
1275
1232
  conditionalItems.push({
1276
1233
  urlIcon: urlIconEdit,
1277
- dictionaryId: MAP_DICCTIONARY.ROW_ACTION_GEO_EDIT,
1234
+ dictionaryId: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_EDIT,
1235
+ onClick: () => {
1236
+ goEdit(row.id, row.name);
1237
+ },
1238
+ disabled: !row.authUserOptions.edit
1239
+ });
1240
+ conditionalItems.push({
1241
+ urlIcon: urlIconDelete,
1242
+ dictionaryId: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_DELETE,
1278
1243
  onClick: () => {
1279
- goEdit(row.id);
1244
+ onDelete(row);
1280
1245
  },
1246
+ variant: "delete",
1281
1247
  disabled: !row.authUserOptions.edit
1282
1248
  });
1283
1249
  return conditionalItems;
@@ -1441,18 +1407,20 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
1441
1407
  return [checkedFeatures, setCheckedFeatures];
1442
1408
  }
1443
1409
  function useMaster() {
1410
+ const { getLabel } = useModuleDictionary();
1411
+ const { host_static_assets, environment_assets } = useEnvironment();
1444
1412
  const { hidePopup, addPopup } = usePopupsStore((state) => state.popupsActions, shallow);
1445
- const onClickAddGeofence = () => {
1413
+ const goToAdd = () => {
1446
1414
  hidePopup("gpsTools");
1447
1415
  addPopup({
1448
1416
  popupId: "geofencesAddEdit",
1449
- title: "geofencesAddEdit",
1417
+ title: getLabel(MAP_GPSTOOLS_DICCTIONARY.ACTION_GEOFENCE_ADD),
1450
1418
  functionComponent: () => /* @__PURE__ */ jsx(GeofenceAddEdit, {}),
1451
1419
  defaultPosition: {
1452
1420
  vertical: { top: 50, bottom: 50 },
1453
1421
  horizontal: { right: 50, width: 380 }
1454
1422
  },
1455
- iconUrl: ""
1423
+ iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_ADD}`
1456
1424
  });
1457
1425
  };
1458
1426
  const [checkedGeofences, hashGeofences, initialRows] = useGpsToolsStore(
@@ -1577,10 +1545,11 @@ function useMaster() {
1577
1545
  checkedRows: checkedGeofences,
1578
1546
  onCheckedRowsChange: setCheckedGeofences,
1579
1547
  setRows,
1580
- goToAddEdit: onClickAddGeofence
1548
+ goToAdd
1581
1549
  };
1582
1550
  }
1583
1551
  function GeofencesList() {
1552
+ const { getLabel } = useModuleDictionary();
1584
1553
  const {
1585
1554
  refresh,
1586
1555
  setBackendQueryParams,
@@ -1596,7 +1565,7 @@ function GeofencesList() {
1596
1565
  onCheckedRowsChange,
1597
1566
  setRows,
1598
1567
  rowKeyGetter,
1599
- goToAddEdit
1568
+ goToAdd
1600
1569
  } = useMaster();
1601
1570
  return /* @__PURE__ */ jsxs(
1602
1571
  StackGeofenceListRoot,
@@ -1636,84 +1605,271 @@ function GeofencesList() {
1636
1605
  },
1637
1606
  "list"
1638
1607
  ),
1639
- /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Button, { onClick: () => goToAddEdit(), children: "Agregar geocerca" }) })
1608
+ /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Button, { onClick: () => goToAdd(), children: getLabel(MAP_GPSTOOLS_DICCTIONARY.ACTION_GEOFENCE_ADD) }) })
1640
1609
  ]
1641
1610
  }
1642
1611
  );
1643
1612
  }
1613
+ enableMapSet();
1614
+ const createGpsToolsStore = (initProps) => {
1615
+ const startProps = {
1616
+ currentTabGpsTool: "geofences",
1617
+ geofenceState: {
1618
+ rows: [],
1619
+ checkedGeofences: /* @__PURE__ */ new Set(),
1620
+ checkedCrossingFeatures: /* @__PURE__ */ new Set(),
1621
+ checkedInternalFeatures: /* @__PURE__ */ new Set(),
1622
+ hashGeofences: {}
1623
+ },
1624
+ ...initProps
1625
+ };
1626
+ return createStore(
1627
+ devtools(
1628
+ immer((set, _get) => ({
1629
+ ...startProps,
1630
+ gpsToolsActions: {
1631
+ init: () => {
1632
+ set((state) => {
1633
+ state.ownerState.status = "ready";
1634
+ });
1635
+ },
1636
+ setGpsToolsState: (status) => {
1637
+ set((state) => {
1638
+ state.ownerState.status = status;
1639
+ });
1640
+ },
1641
+ setHandlerGetLabel: (newHandler) => {
1642
+ set((state) => {
1643
+ state.getLabel = newHandler;
1644
+ });
1645
+ },
1646
+ setExternalState: (newExternalState) => {
1647
+ set((state) => {
1648
+ state.ownerState = { ...state.ownerState, ...newExternalState };
1649
+ });
1650
+ },
1651
+ setCurrentTabTool: (newTabTool) => {
1652
+ set((state) => {
1653
+ state.currentTabGpsTool = newTabTool;
1654
+ });
1655
+ }
1656
+ },
1657
+ geofenceActions: {
1658
+ addGeofence: (geofenceId, geofence) => {
1659
+ set((state) => {
1660
+ state.geofenceState.hashGeofences[geofenceId] = geofence;
1661
+ });
1662
+ },
1663
+ updatePartialGeofence: (geofenceId, geofence) => {
1664
+ set((state) => {
1665
+ state.geofenceState.hashGeofences[geofenceId] = {
1666
+ ...state.geofenceState.hashGeofences[geofenceId],
1667
+ ...geofence
1668
+ };
1669
+ });
1670
+ },
1671
+ updateRows: (newRows) => {
1672
+ set((state) => {
1673
+ state.geofenceState.rows = newRows;
1674
+ });
1675
+ },
1676
+ addCheckedGeofence: (geofenceId) => {
1677
+ set((state) => {
1678
+ state.geofenceState.checkedGeofences.add(geofenceId);
1679
+ state.geofenceState.checkedGeofences = new Set(state.geofenceState.checkedGeofences);
1680
+ });
1681
+ },
1682
+ removeCheckedGeofence: (geofenceId) => {
1683
+ set((state) => {
1684
+ state.geofenceState.checkedGeofences.delete(geofenceId);
1685
+ state.geofenceState.checkedGeofences = new Set(state.geofenceState.checkedGeofences);
1686
+ });
1687
+ },
1688
+ setCheckedGeofences: (newGeofences) => {
1689
+ set((state) => {
1690
+ state.geofenceState.checkedGeofences = new Set(newGeofences);
1691
+ });
1692
+ },
1693
+ setCheckedCrossingFeatures: (newFeatures) => {
1694
+ set((state) => {
1695
+ state.geofenceState.checkedCrossingFeatures = new Set(newFeatures);
1696
+ });
1697
+ },
1698
+ setCheckedInternalFeatures: (newFeatures) => {
1699
+ set((state) => {
1700
+ state.geofenceState.checkedInternalFeatures = new Set(newFeatures);
1701
+ });
1702
+ }
1703
+ }
1704
+ })),
1705
+ { name: `Map Tools Store` }
1706
+ )
1707
+ );
1708
+ };
1709
+ const GpsToolsContext = createContext(null);
1710
+ function GpsToolsProvider(props) {
1711
+ const { children } = props;
1712
+ const { getLabel } = useModuleDictionary();
1713
+ const isDesktop = useResponsiveDesktop();
1714
+ const isSkeleton = useModuleSkeleton();
1715
+ const isFirstRender = useFirstRender([getLabel]);
1716
+ const mapStoreRef = useRef();
1717
+ if (!mapStoreRef.current) {
1718
+ mapStoreRef.current = createGpsToolsStore({
1719
+ getLabel,
1720
+ ownerState: {
1721
+ status: "init",
1722
+ isMobile: !isDesktop,
1723
+ isSkeleton,
1724
+ focus: false
1725
+ }
1726
+ });
1727
+ }
1728
+ const { setHandlerGetLabel, setExternalState } = useStore(
1729
+ mapStoreRef.current,
1730
+ (state) => state.gpsToolsActions,
1731
+ shallow
1732
+ );
1733
+ useEffect(() => {
1734
+ if (!isFirstRender) {
1735
+ setHandlerGetLabel(getLabel);
1736
+ }
1737
+ }, [getLabel]);
1738
+ useEffect(() => {
1739
+ if (isFirstRender) {
1740
+ return;
1741
+ }
1742
+ setExternalState({ isMobile: !isDesktop, isSkeleton });
1743
+ }, [isDesktop, isSkeleton]);
1744
+ return /* @__PURE__ */ jsx(GpsToolsContext.Provider, { value: mapStoreRef.current, children });
1745
+ }
1746
+ function useGpsToolsStore(selector, equalityFn) {
1747
+ const context = useContext(GpsToolsContext);
1748
+ if (!context)
1749
+ throw new Error("useGpsToolsStore context must be use inside GpsToolsContext");
1750
+ return useStore(context, selector, equalityFn);
1751
+ }
1752
+ function useLayers() {
1753
+ const { addLayer, removeLayer } = useMapStore((state) => state.mapActions, shallow);
1754
+ const { init } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
1755
+ useEffect(() => {
1756
+ addLayer({
1757
+ layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES,
1758
+ name: "Geocercas",
1759
+ renderFeature: CommonFeatureRender,
1760
+ geoJsonObject: {
1761
+ object: {
1762
+ type: "FeatureCollection",
1763
+ features: []
1764
+ }
1765
+ },
1766
+ autoFocus: false
1767
+ });
1768
+ addLayer({
1769
+ layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES,
1770
+ name: "Geometr\xEDas de tr\xE1nsito",
1771
+ renderFeature: CommonFeatureRender,
1772
+ geoJsonObject: {
1773
+ object: {
1774
+ type: "FeatureCollection",
1775
+ features: []
1776
+ }
1777
+ },
1778
+ autoFocus: false
1779
+ });
1780
+ addLayer({
1781
+ layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES,
1782
+ name: "Geometr\xEDas internas",
1783
+ renderFeature: CommonFeatureRender,
1784
+ geoJsonObject: {
1785
+ object: {
1786
+ type: "FeatureCollection",
1787
+ features: []
1788
+ }
1789
+ },
1790
+ autoFocus: false
1791
+ });
1792
+ init();
1793
+ return () => {
1794
+ removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES);
1795
+ removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES);
1796
+ removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES);
1797
+ };
1798
+ }, []);
1799
+ }
1644
1800
  function TabsGpsTools() {
1645
1801
  const { getLabel } = useModuleDictionary();
1802
+ const { host_static_assets, environment_assets } = useEnvironment();
1646
1803
  const status = useGpsToolsStore((state) => state.ownerState.status, shallow);
1647
1804
  const currentTabTool = useGpsToolsStore((state) => state.currentTabGpsTool, shallow);
1648
1805
  const { setCurrentTabTool } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
1806
+ const { updatePopup } = usePopupsStore((state) => state.popupsActions, shallow);
1649
1807
  const toolTabs = useMemo(() => {
1650
1808
  return [
1651
1809
  {
1652
1810
  id: "geofences",
1653
- icon: void 0,
1811
+ iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCES}`,
1654
1812
  component: /* @__PURE__ */ jsx(GeofencesList, {}),
1655
- label: getLabel(MAP_DICCTIONARY.LABEL_TAB_GEO),
1813
+ label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_TAB_GEO),
1656
1814
  className: gpsToolsClasses.gpsToolsGeofencesList
1657
1815
  }
1658
1816
  ];
1659
1817
  }, [getLabel]);
1818
+ useEffect(() => {
1819
+ updatePopup(GPS_TOOLS_POPUP_ID, {
1820
+ subTitle: currentTabTool === "geofences" ? getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_TAB_GEO) : ""
1821
+ });
1822
+ }, [currentTabTool]);
1660
1823
  useLayers();
1661
1824
  if (status !== "ready") {
1662
1825
  return null;
1663
1826
  }
1664
- return /* @__PURE__ */ jsxs(
1665
- DivGpsToolsRoot,
1666
- {
1667
- className: gpsToolsClasses.gpsToolsRoot,
1668
- children: [
1669
- /* @__PURE__ */ jsx(
1670
- Tabs,
1827
+ return /* @__PURE__ */ jsxs(DivTabGpsToolsRoot, { className: gpsToolsClasses.gpsToolsRoot, children: [
1828
+ /* @__PURE__ */ jsx(
1829
+ Tabs,
1830
+ {
1831
+ value: currentTabTool,
1832
+ scrollButtons: "auto",
1833
+ variant: "scrollable",
1834
+ allowScrollButtonsMobile: true,
1835
+ onChange: (_e, value) => setCurrentTabTool(value),
1836
+ children: toolTabs.map((tab) => /* @__PURE__ */ jsx(
1837
+ Tab,
1671
1838
  {
1672
- value: currentTabTool,
1673
- scrollButtons: "auto",
1674
- variant: "scrollable",
1675
- allowScrollButtonsMobile: true,
1676
- onChange: (_e, value) => setCurrentTabTool(value),
1677
- children: toolTabs.map((tab) => /* @__PURE__ */ jsx(
1678
- Tab,
1679
- {
1680
- value: tab.id,
1681
- icon: tab.icon,
1682
- label: tab.label,
1683
- className: clsx(gpsToolsClasses.gpsToolsTab, tab.className),
1684
- SKTWidth: "100px",
1685
- SKTHeight: "14px"
1686
- },
1687
- tab.id
1688
- ))
1689
- }
1690
- ),
1691
- toolTabs.map((tab) => {
1692
- const isMatched = tab.id === currentTabTool;
1693
- return /* @__PURE__ */ jsx(
1694
- TabContent,
1695
- {
1696
- className: clsx(
1697
- gpsToolsClasses.gpsToolsTabContent,
1698
- tab.className,
1699
- isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
1700
- ),
1701
- children: tab.component
1702
- },
1703
- tab.id
1704
- );
1705
- })
1706
- ]
1707
- }
1708
- );
1839
+ value: tab.id,
1840
+ icon: /* @__PURE__ */ jsx(Icon, { src: tab.iconUrl }),
1841
+ className: clsx(gpsToolsClasses.gpsToolsTab, tab.className),
1842
+ SKTWidth: "100px",
1843
+ SKTHeight: "14px"
1844
+ },
1845
+ tab.id
1846
+ ))
1847
+ }
1848
+ ),
1849
+ toolTabs.map((tab) => {
1850
+ const isMatched = tab.id === currentTabTool;
1851
+ return /* @__PURE__ */ jsx(
1852
+ TabContent,
1853
+ {
1854
+ className: clsx(
1855
+ gpsToolsClasses.gpsToolsTabContent,
1856
+ tab.className,
1857
+ isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
1858
+ ),
1859
+ children: tab.component
1860
+ },
1861
+ tab.id
1862
+ );
1863
+ })
1864
+ ] });
1709
1865
  }
1710
- function GpsTools() {
1866
+ function MapGpsTools() {
1711
1867
  const isSkeleton = useModuleSkeleton();
1712
- return /* @__PURE__ */ jsx(Fragment, { children: !isSkeleton && /* @__PURE__ */ jsx(TabsGpsTools, {}) });
1868
+ return !isSkeleton && /* @__PURE__ */ jsx(TabsGpsTools, {});
1713
1869
  }
1714
1870
  export {
1715
- GpsTools as G,
1716
- GpsToolsProvider as a,
1871
+ GpsToolsProvider as G,
1872
+ MapGpsTools as M,
1717
1873
  gpsToolsClasses as g,
1718
1874
  useGpsToolsStore as u
1719
1875
  };