@m4l/gclick 0.1.0 → 0.2.0-JAEBeta.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 (267) hide show
  1. package/@types/deviceData.d.ts +12 -9
  2. package/@types/general.d.ts +1 -1
  3. package/@types/index.d.ts +2 -2
  4. package/@types/types.d.ts +25 -1
  5. package/@types/vpts.d.ts +6 -3
  6. package/components/Device/Device.d.ts +6 -0
  7. package/components/Device/Device.js +32 -0
  8. package/components/Device/Device.styles.d.ts +2 -0
  9. package/components/Device/Device.styles.js +95 -0
  10. package/components/Device/constants.d.ts +14 -0
  11. package/components/Device/constants.js +4 -0
  12. package/components/Device/dictionary.d.ts +14 -0
  13. package/components/Device/dictionary.js +19 -0
  14. package/components/{DeviceStatus/hooks/helper.d.ts → Device/helpers/helperDeviceStatus.d.ts} +1 -1
  15. package/components/{DeviceStatus/hooks/helper.js → Device/helpers/helperDeviceStatus.js} +5 -5
  16. package/components/Device/helpers.d.ts +18 -0
  17. package/components/Device/helpers.js +27 -0
  18. package/components/Device/hooks/constants.d.ts +16 -0
  19. package/components/{DeviceStatus → Device}/hooks/constants.js +13 -15
  20. package/components/Device/hooks/useDevice.d.ts +12 -0
  21. package/components/Device/hooks/useDevice.js +23 -0
  22. package/components/{DeviceStatus → Device}/hooks/useDeviceStatus.d.ts +2 -2
  23. package/components/{DeviceStatus → Device}/hooks/useDeviceStatus.js +4 -4
  24. package/components/Device/icons.d.ts +11 -0
  25. package/components/{DeviceStatus → Device}/icons.js +2 -2
  26. package/components/Device/index.d.ts +6 -0
  27. package/components/Device/slots/DeviceSlots.d.ts +15 -0
  28. package/components/Device/slots/DeviceSlots.js +32 -0
  29. package/components/Device/slots/slots.d.ts +7 -0
  30. package/components/Device/slots/slots.js +11 -0
  31. package/components/Device/types.d.ts +30 -0
  32. package/components/DeviceLabel/DeviceLabel.js +1 -1
  33. package/components/DeviceLabel/slots/DeviceLabelSlots.d.ts +9 -3
  34. package/components/DeviceLabel/types.d.ts +2 -2
  35. package/components/DeviceStatus/DeviceStatus.js +3 -15
  36. package/components/DeviceStatus/DeviceStatus.styles.js +1 -13
  37. package/components/DeviceStatus/constants.js +1 -4
  38. package/components/DeviceStatus/dictionary.d.ts +10 -10
  39. package/components/DeviceStatus/dictionary.js +1 -12
  40. package/components/DeviceStatus/icons.d.ts +1 -1
  41. package/components/DeviceStatus/index.d.ts +3 -2
  42. package/components/DeviceStatus/slots/DeviceStatusSlots.js +1 -11
  43. package/components/DeviceStatus/slots/slots.js +1 -7
  44. package/components/index.d.ts +1 -1
  45. package/components/indicators/IndicatorBattery/IndicatorBattery.styles.js +2 -2
  46. package/components/indicators/IndicatorBattery/dictionary.js +5 -1
  47. package/components/indicators/IndicatorBattery/index.d.ts +1 -0
  48. package/components/indicators/IndicatorCSQ/IndicatorCSQ.js +7 -5
  49. package/components/indicators/IndicatorCSQ/constants.d.ts +2 -2
  50. package/components/indicators/IndicatorCSQ/constants.js +4 -3
  51. package/components/indicators/IndicatorCSQ/dictionary.d.ts +5 -2
  52. package/components/indicators/IndicatorCSQ/dictionary.js +15 -12
  53. package/components/indicators/IndicatorCSQ/helpers/getQualityLabel/getQualityLabel.d.ts +22 -2
  54. package/components/indicators/IndicatorCSQ/helpers/getQualityLabel/getQualityLabel.js +15 -29
  55. package/components/indicators/IndicatorCSQ/index.d.ts +3 -3
  56. package/components/indicators/IndicatorCSQ/slots/IndicatorCSQSlots.js +6 -6
  57. package/components/indicators/IndicatorCSQ/types.d.ts +6 -2
  58. package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.d.ts +5 -0
  59. package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.js +15 -0
  60. package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.styles.d.ts +2 -0
  61. package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.styles.js +41 -0
  62. package/components/indicators/IndicatorValueAndMagnitude/constants.d.ts +2 -0
  63. package/components/indicators/IndicatorValueAndMagnitude/constants.js +7 -0
  64. package/components/indicators/IndicatorValueAndMagnitude/index.d.ts +1 -0
  65. package/components/indicators/IndicatorValueAndMagnitude/index.js +1 -0
  66. package/components/indicators/IndicatorValueAndMagnitude/slots/slots.d.ts +6 -0
  67. package/components/indicators/IndicatorValueAndMagnitude/slots/slots.js +10 -0
  68. package/components/indicators/IndicatorValueAndMagnitude/slots/styled.d.ts +12 -0
  69. package/components/indicators/IndicatorValueAndMagnitude/slots/styled.js +27 -0
  70. package/components/indicators/IndicatorValueAndMagnitude/types.d.ts +14 -0
  71. package/components/indicators/IndicatorValueStatus/IndicatorValueStatus.js +25 -0
  72. package/components/indicators/IndicatorValueStatus/IndicatorValueStatus.styles.js +76 -0
  73. package/components/indicators/IndicatorValueStatus/constants.js +8 -0
  74. package/components/indicators/IndicatorValueStatus/index.js +1 -0
  75. package/components/indicators/IndicatorValueStatus/slots/IndicatorValueStatusEnum.js +11 -0
  76. package/components/indicators/IndicatorValueStatus/slots/IndicatorValueStatusSlots.js +32 -0
  77. package/components/indicators/IndicatorValueStatus/types.d.ts +4 -0
  78. package/components/indicators/index.d.ts +2 -0
  79. package/components/maps/components/GpsMap/GpsMap.js +26 -9
  80. package/components/maps/components/GpsMap/GpsMap.styles.js +81 -93
  81. package/components/maps/components/GpsMap/classes/index.d.ts +1 -1
  82. package/components/maps/components/GpsMap/classes/index.js +6 -76
  83. package/components/maps/components/GpsMap/classes/types.d.ts +5 -16
  84. package/components/maps/components/GpsMap/constants.d.ts +9 -3
  85. package/components/maps/components/GpsMap/constants.js +25 -13
  86. package/components/maps/components/GpsMap/contexts/MapContext/MapContext.js +4 -26
  87. package/components/maps/components/GpsMap/contexts/MapContext/index.d.ts +1 -1
  88. package/components/maps/components/GpsMap/contexts/MapContext/store.js +50 -75
  89. package/components/maps/components/GpsMap/contexts/MapContext/types.d.ts +98 -87
  90. package/components/maps/components/GpsMap/dictionary.d.ts +19 -8
  91. package/components/maps/components/GpsMap/dictionary.js +30 -17
  92. package/components/maps/components/GpsMap/external/{Control → MapControl}/index.d.ts +3 -3
  93. package/components/maps/components/GpsMap/external/{Control → MapControl}/index.js +9 -7
  94. package/components/maps/components/GpsMap/external/MapControl/types.d.ts +26 -0
  95. package/components/maps/components/GpsMap/external/googleMutant/index.d.ts +1 -1
  96. package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/index.js +3 -3
  97. package/components/maps/components/GpsMap/featureRenders/FeatureDivIconLabel/index.js +1 -1
  98. package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/types.d.ts +3 -2
  99. package/components/maps/components/GpsMap/featureRenders/index.d.ts +0 -1
  100. package/components/maps/components/GpsMap/hooks/index.d.ts +3 -0
  101. package/components/maps/components/GpsMap/hooks/index.js +1 -0
  102. package/components/maps/components/GpsMap/hooks/useDisableMapEventsOnFlag/index.d.ts +6 -0
  103. package/components/maps/components/GpsMap/hooks/useDisableMapEventsOnFlag/index.js +31 -0
  104. package/components/maps/components/GpsMap/hooks/useDisableMapEventsOnMouseOver/index.d.ts +6 -0
  105. package/components/maps/components/GpsMap/hooks/{useDisableZoomEvents → useDisableMapEventsOnMouseOver}/index.js +10 -2
  106. package/components/maps/components/GpsMap/icons.d.ts +10 -7
  107. package/components/maps/components/GpsMap/icons.js +17 -16
  108. package/components/maps/components/GpsMap/index.d.ts +2 -1
  109. package/components/maps/components/GpsMap/leaflet.styles.d.ts +6 -0
  110. package/components/maps/components/GpsMap/popups/MapPopupDevice/MapPopupDevice.js +9 -1
  111. package/components/maps/components/GpsMap/popups/index.d.ts +1 -0
  112. package/components/maps/components/GpsMap/slots/slots.d.ts +27 -4
  113. package/components/maps/components/GpsMap/slots/slots.js +16 -7
  114. package/components/maps/components/GpsMap/slots/styled.d.ts +18 -0
  115. package/components/maps/components/GpsMap/slots/styled.js +37 -0
  116. package/components/maps/components/GpsMap/subcomponents/Controls/index.js +8 -7
  117. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/index.d.ts +10 -0
  118. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/index.js +10 -0
  119. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → BottomRigthTools}/subcomponents/ZoomButtons/index.js +3 -3
  120. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/types.d.ts +2 -0
  121. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/hooks/types.d.ts +8 -0
  122. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/hooks/useTool.d.ts +13 -0
  123. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/hooks/useTool.js +64 -0
  124. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.d.ts +0 -2
  125. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.js +42 -87
  126. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/index.d.ts +9 -0
  127. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/index.js +24 -0
  128. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/types.d.ts +2 -0
  129. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.d.ts +4 -0
  130. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.js +30 -0
  131. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.styles.d.ts +2 -0
  132. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.styles.js +45 -0
  133. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/hooks/types.d.ts +11 -0
  134. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/hooks/useMapLayersTool.d.ts +9 -0
  135. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/hooks/useMapLayersTool.js +37 -0
  136. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/slots.d.ts +6 -0
  137. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/slots.js +10 -0
  138. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/styled.d.ts +12 -0
  139. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/styled.js +26 -0
  140. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/subcomponents/MapLayerRow.d.ts +5 -0
  141. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/subcomponents/MapLayerRow.js +71 -0
  142. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/subcomponents/types.d.ts +6 -0
  143. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/types.d.ts +9 -0
  144. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.d.ts → TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.d.ts} +1 -1
  145. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.js +38 -0
  146. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.styles.d.ts +2 -0
  147. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.styles.js +87 -0
  148. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/hooks/useMapSourcesTool.d.ts +12 -0
  149. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/hooks/useMapSourcesTool.js +22 -0
  150. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/slots.d.ts +9 -0
  151. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/slots.js +13 -0
  152. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/styled.d.ts +21 -0
  153. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/styled.js +41 -0
  154. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/bing.d.ts +2 -0
  155. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/bing.js +47 -0
  156. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/google.d.ts +2 -0
  157. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/google.js +107 -0
  158. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/others.d.ts +2 -0
  159. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/others.js +33 -0
  160. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/subcomponents/MapSourceCard.d.ts +6 -0
  161. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/subcomponents/MapSourceCard.js +88 -0
  162. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/subcomponents/types.d.ts +7 -0
  163. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/types.d.ts +9 -0
  164. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/MeasureTool.js +31 -0
  165. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/MeasureTool.styles.d.ts +7 -0
  166. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/MeasureTool.styles.js +154 -0
  167. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants.d.ts +25 -0
  168. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants.js +37 -14
  169. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.d.ts +29 -0
  170. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.js +14 -6
  171. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts +2 -2
  172. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.js +26 -20
  173. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/types.d.ts +1 -2
  174. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/slots.d.ts +8 -0
  175. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/slots.js +12 -0
  176. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/styled.d.ts +18 -0
  177. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/styled.js +37 -0
  178. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/index.js +19 -17
  179. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +18 -2
  180. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/types.d.ts +9 -1
  181. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/types.d.ts +2 -5
  182. package/components/maps/components/GpsMap/subcomponents/Controls/types.d.ts +1 -1
  183. package/components/maps/components/GpsMap/subcomponents/LayersContainer/index.js +2 -1
  184. package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/index.js +2 -1
  185. package/components/maps/components/GpsMap/subcomponents/MapEventController/MapEventController.d.ts +6 -0
  186. package/components/maps/components/GpsMap/subcomponents/MapEventController/MapEventController.js +8 -0
  187. package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/darkStyles.d.ts +13 -0
  188. package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/index.js +82 -59
  189. package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerOthers/index.js +25 -15
  190. package/components/maps/components/GpsMap/types.d.ts +24 -5
  191. package/components/maps/components/GpsMapTools/GpsMapTools.d.ts +1 -0
  192. package/components/maps/components/GpsMapTools/index.d.ts +1 -0
  193. package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/index.js +1 -1
  194. package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.js +29 -32
  195. package/components/maps/components/GpsMapTools/types.d.ts +0 -16
  196. package/components/maps/index.d.ts +1 -0
  197. package/components/maps/utils/coordsToQuadKey.d.ts +4 -0
  198. package/components/maps/{components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils.js → utils/coordsToQuadKey.js} +2 -2
  199. package/components/maps/utils/index.d.ts +1 -0
  200. package/contexts/RealTimeConsumerContext/RealTimeConsumerContext.js +1 -1
  201. package/contexts/RealTimeProducerContext/sourceDataMechanisms/athmospherejs/index.d.ts +1 -1
  202. package/contexts/RealTimeProducerContext/sourceDataMechanisms/athmospherejs/index.js +1 -1
  203. package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/constants.d.ts +67 -2
  204. package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/constants.js +115 -30
  205. package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/dummy.js +5 -38
  206. package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/group.d.ts +9 -36
  207. package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/group.js +27 -19
  208. package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/helpers.d.ts +3 -2
  209. package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/helpers.js +9 -2
  210. package/contexts/RealTimeProducerContext/sourceDataMechanisms/factory.js +1 -1
  211. package/formatters/CourseFormatter/CourseFormatter.js +6 -4
  212. package/formatters/CourseFormatter/helper.d.ts +2 -1
  213. package/formatters/CourseFormatter/helper.js +2 -4
  214. package/formatters/CourseFormatter/index.d.ts +1 -0
  215. package/formatters/CourseFormatter/slots/CourseFormatterSlots.d.ts +1 -1
  216. package/formatters/CourseFormatter/slots/CourseFormatterSlots.js +2 -2
  217. package/formatters/index.js +1 -0
  218. package/index.d.ts +1 -0
  219. package/index.js +94 -59
  220. package/package.json +16 -3
  221. package/utils/cssToCSSProperties.d.ts +37 -0
  222. package/utils/getPrecisionFromHdop/constants.d.ts +13 -0
  223. package/utils/getPrecisionFromHdop/constants.js +73 -0
  224. package/utils/getPrecisionFromHdop/getPrecisionFromHdop.d.ts +31 -0
  225. package/utils/getPrecisionFromHdop/getPrecisionFromHdop.js +59 -0
  226. package/utils/getPrecisionFromHdop/index.d.ts +3 -0
  227. package/utils/getPrecisionFromHdop/index.js +1 -0
  228. package/utils/getPrecisionFromHdop/types.d.ts +42 -0
  229. package/utils/getVptUpdatedAtWithGuard.d.ts +4 -0
  230. package/utils/getVptUpdatedAtWithGuard.js +13 -0
  231. package/utils/getVptValueWithGuard.d.ts +9 -0
  232. package/utils/getVptValueWithGuard.js +18 -0
  233. package/utils/index.d.ts +3 -0
  234. package/components/DeviceStatus/hooks/constants.d.ts +0 -11
  235. package/components/maps/components/GpsMap/external/Control/types.d.ts +0 -7
  236. package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/constants.js +0 -4
  237. package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/index.js +0 -112
  238. package/components/maps/components/GpsMap/hooks/useDisableZoomEvents/index.d.ts +0 -6
  239. package/components/maps/components/GpsMap/slots/GpsMapSlots.d.ts +0 -4
  240. package/components/maps/components/GpsMap/slots/GpsMapSlots.js +0 -24
  241. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/index.js +0 -13
  242. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index.d.ts +0 -10
  243. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index.js +0 -58
  244. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers.d.ts +0 -9
  245. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers.js +0 -17
  246. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns.d.ts +0 -18
  247. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns.js +0 -139
  248. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster.d.ts +0 -12
  249. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster.js +0 -52
  250. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.d.ts +0 -8
  251. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.js +0 -43
  252. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index.d.ts +0 -4
  253. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index.js +0 -30
  254. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/model.d.ts +0 -26
  255. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.js +0 -133
  256. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.d.ts +0 -2
  257. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.js +0 -39
  258. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.d.ts +0 -4
  259. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.js +0 -73
  260. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.d.ts +0 -2
  261. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.js +0 -25
  262. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils.d.ts +0 -4
  263. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/types.d.ts +0 -4
  264. package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/index.js +0 -40
  265. /package/components/{maps/components/GpsMap/contexts/MapContext/helper.js → Device/index.js} +0 -0
  266. /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → BottomRigthTools}/subcomponents/ZoomButtons/index.d.ts +0 -0
  267. /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/{index.d.ts → MeasureTool.d.ts} +0 -0
@@ -1,13 +1,17 @@
1
- import { S as STYLE_MEASURE_OPTIONS } from "../../constants.js";
1
+ import { M as MAGNITUDE_FACTOR_ITEMS, S as STYLE_MEASURE_OPTIONS } from "../../constants.js";
2
2
  import { m as mapClasses } from "../../../../../../../../classes/index.js";
3
3
  import { M as MAP_DICCTIONARY } from "../../../../../../../../dictionary.js";
4
4
  import L__default from "leaflet";
5
- const getMarkerPointIcon = (position) => {
5
+ const getMarkerPointIcon2 = (position) => {
6
6
  return L__default.divIcon({
7
7
  className: mapClasses.measureMarkerRoot,
8
8
  html: `<div class="${mapClasses.measureMarkerContainer}">
9
- <div class="${mapClasses.measureMarkerContainerRhomb}">
10
- </div>
9
+ <svg
10
+ xmlns="http://www.w3.org/2000/svg" viewBox="-3982 1178 40 46.658" class="${mapClasses.measureMarkerSvgRoot}">
11
+ <g fill="#fff">
12
+ <path d="M -3962 1223.328857421875 L -3962.658447265625 1222.752685546875 L -3969.23291015625 1217 L -3975.999755859375 1217 C -3978.757080078125 1217 -3981.000244140625 1214.7568359375 -3981.000244140625 1211.999633789063 L -3981.000244140625 1183.999877929688 C -3981.000244140625 1181.24267578125 -3978.757080078125 1178.99951171875 -3975.999755859375 1178.99951171875 L -3948.000244140625 1178.99951171875 C -3945.242919921875 1178.99951171875 -3942.999755859375 1181.24267578125 -3942.999755859375 1183.999877929688 L -3942.999755859375 1211.999633789063 C -3942.999755859375 1214.7568359375 -3945.242919921875 1217 -3948.000244140625 1217 L -3954.76708984375 1217 L -3961.341552734375 1222.752685546875 L -3962 1223.328857421875 Z" fill="#FFF"></path>
13
+ </g>
14
+ </svg>
11
15
  <div class="${mapClasses.measureMarkerContainerSlot}">
12
16
  <div class="${mapClasses.measureMarkerContainerSlotNumber}">
13
17
  ${position}
@@ -39,7 +43,11 @@ const getMarkerPointLabel = (distance, getLabel) => {
39
43
  //
40
44
  });
41
45
  };
46
+ const getMagnitudeFactor = (magnitude) => {
47
+ return MAGNITUDE_FACTOR_ITEMS.find((item) => item.id === magnitude) || MAGNITUDE_FACTOR_ITEMS[0];
48
+ };
42
49
  export {
43
- getMarkerPointLabel as a,
44
- getMarkerPointIcon as g
50
+ getMarkerPointIcon2 as a,
51
+ getMarkerPointLabel as b,
52
+ getMagnitudeFactor as g
45
53
  };
@@ -1,4 +1,3 @@
1
- import { MagnitudeFactorItem } from '../../../../../../../../../GpsMapTools/types';
2
1
  import { StatusEdition } from '../../types';
3
2
  /**
4
3
  * useMeasure hook se encarga de pintar las marcas y una línea que las une, para calcular la distancia o el area (NextMVP)
@@ -8,6 +7,7 @@ import { StatusEdition } from '../../types';
8
7
  */
9
8
  export declare function useMeasure(): {
10
9
  statusEdition: StatusEdition;
11
- magnitudFactor: MagnitudeFactorItem;
10
+ magnitude: string;
11
+ symbol: string;
12
12
  value: number;
13
13
  };
@@ -5,26 +5,29 @@ import { useFormContext, useWatch } from "react-hook-form";
5
5
  import { useFormReadyForUpdate } from "@m4l/components";
6
6
  import { useModuleDictionary } from "@m4l/core";
7
7
  import { S as STYLE_MEASURE_OPTIONS } from "../../constants.js";
8
- import { e as MAP_ZINDEX_DEFAULT } from "../../../../../../../../constants.js";
9
- import { g as getMarkerPointIcon, a as getMarkerPointLabel } from "./helpers.js";
8
+ import { g as MAP_ZINDEX_DEFAULT } from "../../../../../../../../constants.js";
9
+ import { g as getMagnitudeFactor, a as getMarkerPointIcon2, b as getMarkerPointLabel } from "./helpers.js";
10
10
  import { m as mapClasses } from "../../../../../../../../classes/index.js";
11
+ import { useTheme } from "@mui/material";
11
12
  function useMeasure() {
12
13
  const { getLabel } = useModuleDictionary();
13
14
  const map = useMap();
14
15
  const readyToUpdate = useFormReadyForUpdate();
15
16
  const { control, setValue } = useFormContext();
17
+ const theme = useTheme();
16
18
  const fieldsWatch = useWatch({
17
19
  control,
18
- name: ["statusEdition", "value", "magnitudFactor"]
20
+ name: ["statusEdition", "value", "magnitude"]
19
21
  });
20
22
  const statusEdition = fieldsWatch[0];
21
23
  const value = fieldsWatch[1];
22
- const magnitudFactor = fieldsWatch[2];
23
- const [magnitudFactorCached, setMagnitudFactorCached] = useState(magnitudFactor);
24
+ const magnitude = fieldsWatch[2];
25
+ const symbol = getLabel(getMagnitudeFactor(magnitude).dictionarySymbolId);
26
+ const [magnitudeCached, setMagnitudeCached] = useState(magnitude);
24
27
  const currentMeasure = useRef({
25
28
  measurePoints: [],
26
29
  addMarker: false,
27
- magnitudFactor,
30
+ magnitude,
28
31
  dragging: false
29
32
  });
30
33
  const clearMeasure = useCallback(() => {
@@ -40,10 +43,11 @@ function useMeasure() {
40
43
  if (distance === void 0) {
41
44
  return void 0;
42
45
  }
43
- const cMagnitudeFactor = currentMeasure.current.magnitudFactor;
44
- return (cMagnitudeFactor.factor_x0 + distance * cMagnitudeFactor.factor_x1 + (distance ^ 2 * cMagnitudeFactor.factor_x2)).toFixed(2) + (withSymbol ? ` ${cMagnitudeFactor.symbol}` : "");
46
+ const cMagnitudeFactor = getMagnitudeFactor(currentMeasure.current.magnitude);
47
+ const result = cMagnitudeFactor.factor_x0 + distance * cMagnitudeFactor.factor_x1 + cMagnitudeFactor.factor_x2 * (distance ^ 2);
48
+ return result.toFixed(cMagnitudeFactor.decimalDigits) + (withSymbol ? ` ${getLabel(cMagnitudeFactor.dictionarySymbolId)}` : "");
45
49
  },
46
- []
50
+ [getLabel]
47
51
  );
48
52
  const measureDistante = useCallback(() => {
49
53
  let totalDistance = 0;
@@ -62,7 +66,8 @@ function useMeasure() {
62
66
  currentMeasure.current.layerLine = L.polyline(
63
67
  measurePoints.map((measurePoint) => measurePoint.marker.getLatLng()),
64
68
  {
65
- color: STYLE_MEASURE_OPTIONS.strokeLineColor,
69
+ color: theme.palette.primary.enabled,
70
+ //STYLE_MEASURE_OPTIONS.strokeLineColor,
66
71
  weight: STYLE_MEASURE_OPTIONS.strokeLineWeight,
67
72
  interactive: false
68
73
  //No se puede editar
@@ -71,7 +76,7 @@ function useMeasure() {
71
76
  }
72
77
  }
73
78
  for (let i = 0; i < measurePoints.length - 1; i++) {
74
- totalDistance += measurePoints[i].marker.getLatLng().distanceTo(measurePoints[i + 1].marker.getLatLng());
79
+ totalDistance += measurePoints[i].marker.getLatLng().distanceTo(measurePoints[i + 1].marker.getLatLng()) / 1e3;
75
80
  }
76
81
  if (measurePoints.length > 0 && measurePoints[0].formatDistanceFromPrevious !== void 0) {
77
82
  measurePoints[0].formatDistanceFromPrevious = void 0;
@@ -80,7 +85,7 @@ function useMeasure() {
80
85
  }
81
86
  for (let i = 1; i < measurePoints.length; i++) {
82
87
  const formatDistanceFromPrevious = getFormatFactorDistance(
83
- measurePoints[i - 1].marker.getLatLng().distanceTo(measurePoints[i].marker.getLatLng()),
88
+ measurePoints[i - 1].marker.getLatLng().distanceTo(measurePoints[i].marker.getLatLng()) / 1e3,
84
89
  true
85
90
  );
86
91
  if (measurePoints[i].formatDistanceFromPrevious !== formatDistanceFromPrevious) {
@@ -93,7 +98,7 @@ function useMeasure() {
93
98
  }
94
99
  return getFormatFactorDistance(totalDistance);
95
100
  }, [map, getLabel]);
96
- const getMarkerPointIconMemo = useCallback(getMarkerPointIcon, []);
101
+ const getMarkerPointIconMemo = useCallback(getMarkerPointIcon2, []);
97
102
  const getMarkerPointLabelMemo = useCallback(getMarkerPointLabel, [getLabel]);
98
103
  const onClickRemovePoint = useCallback((labelMarker) => {
99
104
  return (e) => {
@@ -140,7 +145,7 @@ function useMeasure() {
140
145
  }
141
146
  if (currentMeasure.current.measurePoints.length > 0) {
142
147
  formatDistanceFromPrevious = getFormatFactorDistance(
143
- currentMeasure.current.measurePoints[currentMeasure.current.measurePoints.length - 1].marker.getLatLng().distanceTo(e.latlng)
148
+ currentMeasure.current.measurePoints[currentMeasure.current.measurePoints.length - 1].marker.getLatLng().distanceTo(e.latlng) / 1e3
144
149
  );
145
150
  }
146
151
  const marker = L.marker([lat, lng], {
@@ -223,12 +228,13 @@ function useMeasure() {
223
228
  if (!readyToUpdate) {
224
229
  return;
225
230
  }
226
- if (magnitudFactor.id !== magnitudFactorCached.id) {
227
- setMagnitudFactorCached({ ...magnitudFactor });
228
- currentMeasure.current.magnitudFactor = magnitudFactor;
229
- setValue("value", measureDistante());
231
+ if (magnitude !== magnitudeCached) {
232
+ setMagnitudeCached(magnitude);
233
+ currentMeasure.current.magnitude = magnitude;
234
+ const valueNew = measureDistante();
235
+ setValue("value", valueNew);
230
236
  }
231
- }, [magnitudFactor]);
237
+ }, [magnitude]);
232
238
  useEffect(() => {
233
239
  return () => {
234
240
  map.off("mousemove", onMouseMoveMap);
@@ -238,7 +244,7 @@ function useMeasure() {
238
244
  clearMeasure();
239
245
  };
240
246
  }, []);
241
- return { statusEdition, magnitudFactor, value };
247
+ return { statusEdition, magnitude, symbol, value };
242
248
  }
243
249
  export {
244
250
  useMeasure as u
@@ -1,4 +1,3 @@
1
- import { MagnitudeFactorItem } from '../../../../../../../../../GpsMapTools/types';
2
1
  export type MeasurePoint = {
3
2
  marker: L.Marker;
4
3
  labelMarker: L.Marker;
@@ -9,5 +8,5 @@ export interface RefCurrentMeasure {
9
8
  addMarker: boolean;
10
9
  measurePoints: Array<MeasurePoint>;
11
10
  layerLine?: L.Polyline;
12
- magnitudFactor: MagnitudeFactorItem;
11
+ magnitude: string;
13
12
  }
@@ -0,0 +1,8 @@
1
+ export declare enum MapSlotsMeasureTool {
2
+ mapMeasureToolRoot = "mapMeasureToolRoot",
3
+ mapMeasureToolDataContainer = "mapMeasureToolDataContainer",
4
+ mapMeasureToolRHFAutocompleteAsync = "mapMeasureToolRHFAutocompleteAsync",
5
+ mapMeasureToolValueContainer = "mapMeasureToolValueContainer",
6
+ mapMeasureToolValue = "mapMeasureToolValue",
7
+ mapMeasureToolValueUnit = "mapMeasureToolValueUnit"
8
+ }
@@ -0,0 +1,12 @@
1
+ var MapSlotsMeasureTool = /* @__PURE__ */ ((MapSlotsMeasureTool2) => {
2
+ MapSlotsMeasureTool2["mapMeasureToolRoot"] = "mapMeasureToolRoot";
3
+ MapSlotsMeasureTool2["mapMeasureToolDataContainer"] = "mapMeasureToolDataContainer";
4
+ MapSlotsMeasureTool2["mapMeasureToolRHFAutocompleteAsync"] = "mapMeasureToolRHFAutocompleteAsync";
5
+ MapSlotsMeasureTool2["mapMeasureToolValueContainer"] = "mapMeasureToolValueContainer";
6
+ MapSlotsMeasureTool2["mapMeasureToolValue"] = "mapMeasureToolValue";
7
+ MapSlotsMeasureTool2["mapMeasureToolValueUnit"] = "mapMeasureToolValueUnit";
8
+ return MapSlotsMeasureTool2;
9
+ })(MapSlotsMeasureTool || {});
10
+ export {
11
+ MapSlotsMeasureTool as M
12
+ };
@@ -0,0 +1,18 @@
1
+ export declare const GpsMapMeasureToolRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
2
+ ownerState?: (Partial<import('../../../../../../../types').MapOwnerState> & Record<string, unknown>) | undefined;
3
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
4
+ export declare const GpsMapMeasureToolDataContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
5
+ ownerState?: (Partial<import('../../../../../../../types').MapOwnerState> & Record<string, unknown>) | undefined;
6
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
7
+ export declare const GpsMapMeasureToolRHFSelectStyled: import('@emotion/styled').StyledComponent<Pick<import('@m4l/components/src/components/hook-form/RHFSelect').RHFSelectProps<string | number, boolean | undefined>, keyof import('@m4l/components/src/components/hook-form/RHFSelect').RHFSelectProps<string | number, boolean | undefined>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
8
+ ownerState?: (Partial<import('../../../../../../../types').MapOwnerState> & Record<string, unknown>) | undefined;
9
+ }, {}, {}>;
10
+ export declare const GpsMapMeasureToolValueContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
11
+ ownerState?: (Partial<import('../../../../../../../types').MapOwnerState> & Record<string, unknown>) | undefined;
12
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
13
+ export declare const GpsMapMeasureToolValueStyled: import('@emotion/styled').StyledComponent<Pick<import('@m4l/components/src/components/mui_extended/Typography/types').TypographyProps, keyof import('@m4l/components/src/components/mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
14
+ ownerState?: (Partial<import('../../../../../../../types').MapOwnerState> & Record<string, unknown>) | undefined;
15
+ }, {}, {}>;
16
+ export declare const GpsMapMeasureToolValueUnitStyled: import('@emotion/styled').StyledComponent<Pick<import('@m4l/components/src/components/mui_extended/Typography/types').TypographyProps, keyof import('@m4l/components/src/components/mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
17
+ ownerState?: (Partial<import('../../../../../../../types').MapOwnerState> & Record<string, unknown>) | undefined;
18
+ }, {}, {}>;
@@ -0,0 +1,37 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { M as MAP_COMPONET_KEY_COMPONENT } from "../../../../../../../constants.js";
3
+ import { m as mapMeasureToolStyles } from "../MeasureTool.styles.js";
4
+ import { M as MapSlotsMeasureTool } from "./slots.js";
5
+ import { RHFSelect, Typography } from "@m4l/components";
6
+ const GpsMapMeasureToolRootStyled = styled("div", {
7
+ name: MAP_COMPONET_KEY_COMPONENT,
8
+ slot: MapSlotsMeasureTool.mapMeasureToolRoot
9
+ })(mapMeasureToolStyles?.mapMeasureToolRoot);
10
+ const GpsMapMeasureToolDataContainerStyled = styled("div", {
11
+ name: MAP_COMPONET_KEY_COMPONENT,
12
+ slot: MapSlotsMeasureTool.mapMeasureToolDataContainer
13
+ })(mapMeasureToolStyles?.mapMeasureToolDataContainer);
14
+ const GpsMapMeasureToolRHFSelectStyled = styled(RHFSelect, {
15
+ name: MAP_COMPONET_KEY_COMPONENT,
16
+ slot: MapSlotsMeasureTool.mapMeasureToolRHFAutocompleteAsync
17
+ })(mapMeasureToolStyles?.mapMeasureToolRHFAutocompleteAsync);
18
+ const GpsMapMeasureToolValueContainerStyled = styled("div", {
19
+ name: MAP_COMPONET_KEY_COMPONENT,
20
+ slot: MapSlotsMeasureTool.mapMeasureToolValueContainer
21
+ })(mapMeasureToolStyles?.mapMeasureToolValueContainer);
22
+ const GpsMapMeasureToolValueStyled = styled(Typography, {
23
+ name: MAP_COMPONET_KEY_COMPONENT,
24
+ slot: MapSlotsMeasureTool.mapMeasureToolValue
25
+ })(mapMeasureToolStyles?.mapMeasureToolValue);
26
+ const GpsMapMeasureToolValueUnitStyled = styled(Typography, {
27
+ name: MAP_COMPONET_KEY_COMPONENT,
28
+ slot: MapSlotsMeasureTool.mapMeasureToolValueUnit
29
+ })(mapMeasureToolStyles?.mapMeasureToolValueUnit);
30
+ export {
31
+ GpsMapMeasureToolRootStyled as G,
32
+ GpsMapMeasureToolDataContainerStyled as a,
33
+ GpsMapMeasureToolRHFSelectStyled as b,
34
+ GpsMapMeasureToolValueContainerStyled as c,
35
+ GpsMapMeasureToolValueStyled as d,
36
+ GpsMapMeasureToolValueUnitStyled as e
37
+ };
@@ -1,29 +1,31 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { RHFAutocompleteAsync, Stack } from "@m4l/components";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
3
2
  import { useModuleDictionary } from "@m4l/core";
4
3
  import { M as MAP_DICCTIONARY } from "../../../../../../../../dictionary.js";
5
4
  import { u as useMeasure } from "../../hooks/useMeasure/index.js";
6
- import { m as mapClasses } from "../../../../../../../../classes/index.js";
5
+ import { a as GpsMapMeasureToolDataContainerStyled, b as GpsMapMeasureToolRHFSelectStyled, c as GpsMapMeasureToolValueContainerStyled, d as GpsMapMeasureToolValueStyled, e as GpsMapMeasureToolValueUnitStyled } from "../../slots/styled.js";
6
+ import { useMemo } from "react";
7
+ import { M as MAGNITUDE_FACTOR_ITEMS } from "../../constants.js";
7
8
  function MeasureData() {
8
9
  const { getLabel } = useModuleDictionary();
9
- const { value, magnitudFactor } = useMeasure();
10
- return /* @__PURE__ */ jsxs(Fragment, { children: [
10
+ const units = useMemo(() => {
11
+ return MAGNITUDE_FACTOR_ITEMS.map((item) => ({
12
+ id: item.id,
13
+ label: getLabel(item.dictionaryLabelId)
14
+ }));
15
+ }, [getLabel]);
16
+ const { value, symbol } = useMeasure();
17
+ return /* @__PURE__ */ jsxs(GpsMapMeasureToolDataContainerStyled, { children: [
11
18
  /* @__PURE__ */ jsx(
12
- RHFAutocompleteAsync,
19
+ GpsMapMeasureToolRHFSelectStyled,
13
20
  {
14
- type: "text",
15
- endPoint: "magnitudes/factors?origin_unit_reference_id=m_kilometers",
16
- name: "magnitudFactor",
17
- autoComplete: "off",
18
- getOptionLabel: (option) => option.name,
19
- isOptionEqualToValue: (option, measureItemValue) => option.id === measureItemValue.id,
20
- label: getLabel(MAP_DICCTIONARY.LABEL_MEASURE_UNIT),
21
- isRemote: false
21
+ name: "magnitude",
22
+ options: units,
23
+ label: getLabel(MAP_DICCTIONARY.LABEL_MEASURE_UNIT)
22
24
  }
23
25
  ),
24
- /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 2, className: mapClasses.measureToolFormValue, children: [
25
- /* @__PURE__ */ jsx("span", { className: mapClasses.measureToolFormValueDistance, children: value }),
26
- /* @__PURE__ */ jsx("span", { className: mapClasses.measureToolFormValueSymbol, children: magnitudFactor.symbol })
26
+ /* @__PURE__ */ jsxs(GpsMapMeasureToolValueContainerStyled, { children: [
27
+ /* @__PURE__ */ jsx(GpsMapMeasureToolValueStyled, { fontFamily: "Jura", variant: "h5", color: "primary.semanticText", children: value }),
28
+ /* @__PURE__ */ jsx(GpsMapMeasureToolValueUnitStyled, { fontFamily: "Jura", variant: "paragraph", children: symbol })
27
29
  ] })
28
30
  ] });
29
31
  }
@@ -1,6 +1,22 @@
1
- import { MagnitudeFactorItem, MeasureTypeId } from '../../../../../../../../../GpsMapTools/types';
1
+ /**
2
+ * Por ahora solo distancia.
3
+ */
4
+ export type MeasureTypeId = 'distance';
5
+ export interface MagnitudeFactorOption {
6
+ id: string;
7
+ label: string;
8
+ }
9
+ export interface MagnitudeFactorItem {
10
+ id: string;
11
+ dictionaryLabelId: string;
12
+ dictionarySymbolId: string;
13
+ factor_x0: number;
14
+ factor_x1: number;
15
+ factor_x2: number;
16
+ decimalDigits: number;
17
+ }
2
18
  export interface FormGeneralDataValues {
3
19
  measureTypeId: MeasureTypeId;
4
- magnitudFactor?: MagnitudeFactorItem | null;
20
+ magnitude?: string | null;
5
21
  unitArea?: MagnitudeFactorItem | null;
6
22
  }
@@ -1,5 +1,8 @@
1
- import { FormStatusLoad } from '@m4l/components';
1
+ import { MAP_COMPONET_KEY_COMPONENT } from '../../../../../../constants';
2
+ import { FormStatusLoad, M4LOverridesStyleRules } from '@m4l/components';
2
3
  import { FormGeneralDataValues } from './subcomponents/MeasureData/types';
4
+ import { MapSlotsMeasureTool } from './slots/slots';
5
+ import { Theme } from '@mui/material/styles';
3
6
  export type StatusEdition = 'initial' | 'draw';
4
7
  export type FormMeasureValues = FormGeneralDataValues & {
5
8
  statusLoad: FormStatusLoad;
@@ -7,3 +10,8 @@ export type FormMeasureValues = FormGeneralDataValues & {
7
10
  statusEdition: StatusEdition;
8
11
  value: string | null;
9
12
  };
13
+ export type MapMeasureToolOwnerState = {
14
+ visible: boolean;
15
+ };
16
+ export type MapMeasureToolSlotsType = keyof typeof MapSlotsMeasureTool;
17
+ export type MapMeasureToolStyles = M4LOverridesStyleRules<MapMeasureToolSlotsType, typeof MAP_COMPONET_KEY_COMPONENT, Theme>;
@@ -1,7 +1,4 @@
1
- import { ReactNode } from 'react';
2
- /**
3
- * Propiedades para el componente TopRigthTools.
4
- */
1
+ import { JSX_REACT_NODE } from '@m4l/components';
5
2
  export interface TopRigthToolsProps {
6
- tools?: ((props?: any) => JSX.Element) | ReactNode;
3
+ GpsTools?: JSX_REACT_NODE;
7
4
  }
@@ -19,4 +19,4 @@ export type Point = {
19
19
  */
20
20
  y: number;
21
21
  };
22
- export type ControlsProps = Pick<MapProps, 'tools'>;
22
+ export type ControlsProps = Pick<MapProps, 'GpsTools'>;
@@ -5,10 +5,11 @@ import L__default from "leaflet";
5
5
  import React, { useEffect } from "react";
6
6
  import { useMap } from "react-leaflet";
7
7
  import { u as useAutoFocus } from "../../hooks/useAutoFocus/index.js";
8
+ import { useModuleSkeleton } from "@m4l/core";
8
9
  import { u as useMapStore } from "../../hooks/useMapStore/index.js";
9
10
  const LayersContainer = () => {
10
11
  const layersId = useMapStore((state) => state.layersIds, shallow);
11
- const isSkeleton = useMapStore((state) => state.ownerState.isSkeleton, shallow);
12
+ const isSkeleton = useModuleSkeleton();
12
13
  const map = useMap();
13
14
  useAutoFocus();
14
15
  useEffect(() => {
@@ -6,6 +6,7 @@ import { shallow } from "zustand/shallow";
6
6
  import { M as MarkerClusterGroup } from "./subcomponents/MarkerClusterGroup/index.js";
7
7
  import { R as RenderByEachFeatureComponent, M as MemonizedRenderByEachFeatureComponent } from "./subcomponents/RenderByEachFeatureComponent/index.js";
8
8
  import { T as TIME_DOUBLE_CLICK } from "../../../../constants.js";
9
+ import { deepShallow } from "@m4l/components";
9
10
  import { u as useMapStore } from "../../../../hooks/useMapStore/index.js";
10
11
  const MyLayer = (props) => {
11
12
  const { layerId } = props;
@@ -23,7 +24,7 @@ const MyLayer = (props) => {
23
24
  } else if (geoJsonObject && geoJsonObject.object.type === "FeatureCollection") {
24
25
  return geoJsonObject && geoJsonObject.object.features.map((feature) => feature.id);
25
26
  }
26
- }, shallow);
27
+ }, deepShallow);
27
28
  const renderFeature = useMapStore((state) => state.hashLayers[layerId]?.renderFeature, shallow);
28
29
  const [visible, cluster = false] = useMapStore(
29
30
  (state) => [state.hashLayers[layerId]?.visible, state.hashLayers[layerId]?.cluster],
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Componente interno que maneja la desactivación de eventos del mapa
3
+ */
4
+ export declare function MapEventController({ disableMapEvents }: {
5
+ disableMapEvents: boolean;
6
+ }): null;
@@ -0,0 +1,8 @@
1
+ import { u as useDisableMapEventsOnFlag } from "../../hooks/useDisableMapEventsOnFlag/index.js";
2
+ function MapEventController({ disableMapEvents }) {
3
+ useDisableMapEventsOnFlag(disableMapEvents);
4
+ return null;
5
+ }
6
+ export {
7
+ MapEventController as M
8
+ };
@@ -0,0 +1,13 @@
1
+ export declare const DARK_STYLES: ({
2
+ elementType: string;
3
+ stylers: {
4
+ color: string;
5
+ }[];
6
+ featureType?: undefined;
7
+ } | {
8
+ featureType: string;
9
+ elementType: string;
10
+ stylers: {
11
+ color: string;
12
+ }[];
13
+ })[];
@@ -1,53 +1,83 @@
1
- import React from "react";
1
+ import React, { useEffect } from "react";
2
2
  import { useMap } from "react-leaflet";
3
3
  import L__default from "leaflet";
4
4
  import { u as useMapStore } from "../../../../hooks/useMapStore/index.js";
5
- import { shallow } from "zustand/shallow";
6
5
  import { Loader } from "@googlemaps/js-api-loader";
6
+ import { deepShallow } from "@m4l/components";
7
7
  function TileLayerGoogle() {
8
8
  const map = useMap();
9
9
  const mutantRefLayer = React.useRef(null);
10
- const { options, sourceType, mapTypeTile } = useMapStore(
11
- (state) => state.hashMapSources[state.currentMapSourceId],
12
- shallow
10
+ const loaderRef = React.useRef(null);
11
+ const { sourceId, layer, trafficLayer, transitLayer, bicyclingLayer, googleApiKey, googleMapVersion } = useMapStore(
12
+ (state) => {
13
+ const source = state.mapSources.find((source2) => source2.id === state.currentMapSourceLayer.mapSourceId) || state.mapSources[0];
14
+ const layer2 = source.layers.find((layer3) => layer3.id === state.currentMapSourceLayer.mapSourceLayerId) || source.layers[0];
15
+ return {
16
+ sourceId: source.id,
17
+ layer: layer2,
18
+ trafficLayer: layer2?.roadSelectedOptions?.trafficLayer || false,
19
+ transitLayer: layer2?.roadSelectedOptions?.transitLayer || false,
20
+ bicyclingLayer: layer2?.roadSelectedOptions?.bicyclingLayer || false,
21
+ googleApiKey: state.googleMapsApiKey,
22
+ googleMapVersion: state.googleMapVersion
23
+ };
24
+ },
25
+ deepShallow
13
26
  );
14
- const roadOptions = useMapStore(
15
- (state) => state.hashMapSources[state.currentMapSourceId].roadSelectedOptions,
16
- shallow
17
- );
18
- const [googleApiKey, googleMapVersion] = useMapStore(
19
- (state) => [state.googleMapsApiKey, state.googleMapVersion],
20
- shallow
21
- );
22
- React.useEffect(() => {
23
- if (sourceType !== "Google") {
24
- return;
25
- }
26
- let googleMutantLayer;
27
- const loader = new Loader({
27
+ const someActiveLayers = trafficLayer || transitLayer || bicyclingLayer;
28
+ const lastLayersStatus = React.useRef({ trafficLayer, transitLayer, bicyclingLayer });
29
+ const layersStatus = React.useRef({ trafficLayer, transitLayer, bicyclingLayer });
30
+ layersStatus.current = { trafficLayer, transitLayer, bicyclingLayer };
31
+ useEffect(() => {
32
+ loaderRef.current = new Loader({
28
33
  apiKey: googleApiKey,
29
34
  version: googleMapVersion
30
35
  });
31
- loader.importLibrary("maps").then(() => {
36
+ }, [googleApiKey, googleMapVersion]);
37
+ useEffect(() => {
38
+ let leafletLayerGoogle;
39
+ if (sourceId !== "google") {
40
+ return;
41
+ }
42
+ if (!(trafficLayer || transitLayer || bicyclingLayer)) {
43
+ leafletLayerGoogle = L__default.tileLayer(layer.urlTemplate, layer.options);
44
+ if (layer.getTileUrl) {
45
+ leafletLayerGoogle.getTileUrl = layer.getTileUrl;
46
+ }
47
+ map.addLayer(leafletLayerGoogle);
48
+ if (layer.options && layer.options.maxZoom) {
49
+ map.setMaxZoom(layer.options.maxZoom);
50
+ }
51
+ }
52
+ return () => {
53
+ if (leafletLayerGoogle) {
54
+ map.removeLayer(leafletLayerGoogle);
55
+ }
56
+ };
57
+ }, [sourceId, layer.urlTemplate, layer.options, layer.getTileUrl, map, trafficLayer, transitLayer, bicyclingLayer]);
58
+ useEffect(() => {
59
+ if (sourceId !== "google" || !someActiveLayers || !loaderRef.current) {
60
+ return;
61
+ }
62
+ let googleMutantLayer;
63
+ loaderRef.current.importLibrary("maps").then(() => {
32
64
  googleMutantLayer = L__default.gridLayer.googleMutant({
33
- type: mapTypeTile,
34
- // map type, can be 'roadmap', 'satellite', etc.
35
65
  maxZoom: 20,
36
- // styles: [
37
- // // Google Maps styles array, can be generated here: https://mapstyle.withgoogle.coxm/
38
- // ],
39
- ...options
66
+ type: layer.type
67
+ // styles: [],
68
+ // ...layer.options,
40
69
  });
41
70
  mutantRefLayer.current = googleMutantLayer;
42
- if (roadOptions.trafficLayer) {
71
+ if (layersStatus.current.trafficLayer) {
43
72
  googleMutantLayer.addGoogleLayer("TrafficLayer");
44
73
  }
45
- if (roadOptions.transitLayer) {
74
+ if (layersStatus.current.transitLayer) {
46
75
  googleMutantLayer.addGoogleLayer("TransitLayer");
47
76
  }
48
- if (roadOptions.bicyclingLayer) {
77
+ if (layersStatus.current.bicyclingLayer) {
49
78
  googleMutantLayer.addGoogleLayer("BicyclingLayer");
50
79
  }
80
+ lastLayersStatus.current = { ...layersStatus.current };
51
81
  map.addLayer(googleMutantLayer);
52
82
  });
53
83
  return () => {
@@ -56,43 +86,36 @@ function TileLayerGoogle() {
56
86
  mutantRefLayer.current = null;
57
87
  }
58
88
  };
59
- }, [map, sourceType, mapTypeTile]);
89
+ }, [map, layer.type, sourceId, googleApiKey, googleMapVersion, someActiveLayers]);
60
90
  React.useEffect(() => {
61
- if (sourceType !== "Google") {
91
+ if (sourceId !== "google") {
62
92
  return;
63
93
  }
64
- if (mutantRefLayer.current && roadOptions) {
65
- if (roadOptions.trafficLayer) {
66
- mutantRefLayer.current.addGoogleLayer("TrafficLayer");
67
- } else if (roadOptions.trafficLayer === false) {
68
- mutantRefLayer.current.removeGoogleLayer("TrafficLayer");
94
+ if (mutantRefLayer.current) {
95
+ if (trafficLayer !== lastLayersStatus.current.trafficLayer) {
96
+ if (trafficLayer) {
97
+ mutantRefLayer.current.addGoogleLayer("TrafficLayer");
98
+ } else if (trafficLayer === false) {
99
+ mutantRefLayer.current.removeGoogleLayer("TrafficLayer");
100
+ }
69
101
  }
70
- }
71
- }, [roadOptions.trafficLayer]);
72
- React.useEffect(() => {
73
- if (sourceType !== "Google") {
74
- return;
75
- }
76
- if (mutantRefLayer.current && roadOptions) {
77
- if (roadOptions.transitLayer) {
78
- mutantRefLayer.current.addGoogleLayer("TransitLayer");
79
- } else if (roadOptions.transitLayer === false) {
80
- mutantRefLayer.current.removeGoogleLayer("TransitLayer");
102
+ if (transitLayer !== lastLayersStatus.current.transitLayer) {
103
+ if (transitLayer) {
104
+ mutantRefLayer.current.addGoogleLayer("TransitLayer");
105
+ } else if (transitLayer === false) {
106
+ mutantRefLayer.current.removeGoogleLayer("TransitLayer");
107
+ }
81
108
  }
82
- }
83
- }, [roadOptions.transitLayer]);
84
- React.useEffect(() => {
85
- if (sourceType !== "Google") {
86
- return;
87
- }
88
- if (mutantRefLayer.current && roadOptions) {
89
- if (roadOptions.bicyclingLayer) {
90
- mutantRefLayer.current.addGoogleLayer("BicyclingLayer");
91
- } else if (roadOptions.bicyclingLayer === false) {
92
- mutantRefLayer.current.removeGoogleLayer("BicyclingLayer");
109
+ if (bicyclingLayer !== lastLayersStatus.current.bicyclingLayer) {
110
+ if (bicyclingLayer) {
111
+ mutantRefLayer.current.addGoogleLayer("BicyclingLayer");
112
+ } else if (bicyclingLayer === false) {
113
+ mutantRefLayer.current.removeGoogleLayer("BicyclingLayer");
114
+ }
93
115
  }
116
+ lastLayersStatus.current = { ...layersStatus.current };
94
117
  }
95
- }, [roadOptions.bicyclingLayer]);
118
+ }, [trafficLayer, transitLayer, bicyclingLayer]);
96
119
  return null;
97
120
  }
98
121
  export {