@m4l/gclick 0.1.0 → 0.2.0-JAEBeta.1
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.
- package/@types/deviceData.d.ts +12 -9
- package/@types/general.d.ts +1 -1
- package/@types/index.d.ts +2 -2
- package/@types/types.d.ts +25 -1
- package/@types/vpts.d.ts +6 -3
- package/components/Device/Device.d.ts +6 -0
- package/components/Device/Device.js +32 -0
- package/components/Device/Device.styles.d.ts +2 -0
- package/components/Device/Device.styles.js +95 -0
- package/components/Device/constants.d.ts +14 -0
- package/components/Device/constants.js +4 -0
- package/components/Device/dictionary.d.ts +14 -0
- package/components/Device/dictionary.js +19 -0
- package/components/{DeviceStatus/hooks/helper.d.ts → Device/helpers/helperDeviceStatus.d.ts} +1 -1
- package/components/{DeviceStatus/hooks/helper.js → Device/helpers/helperDeviceStatus.js} +5 -5
- package/components/Device/helpers.d.ts +18 -0
- package/components/Device/helpers.js +27 -0
- package/components/Device/hooks/constants.d.ts +16 -0
- package/components/{DeviceStatus → Device}/hooks/constants.js +13 -15
- package/components/Device/hooks/useDevice.d.ts +12 -0
- package/components/Device/hooks/useDevice.js +23 -0
- package/components/{DeviceStatus → Device}/hooks/useDeviceStatus.d.ts +2 -2
- package/components/{DeviceStatus → Device}/hooks/useDeviceStatus.js +4 -4
- package/components/Device/icons.d.ts +11 -0
- package/components/{DeviceStatus → Device}/icons.js +2 -2
- package/components/Device/index.d.ts +6 -0
- package/components/Device/slots/DeviceSlots.d.ts +15 -0
- package/components/Device/slots/DeviceSlots.js +32 -0
- package/components/Device/slots/slots.d.ts +7 -0
- package/components/Device/slots/slots.js +11 -0
- package/components/Device/types.d.ts +30 -0
- package/components/DeviceLabel/DeviceLabel.js +1 -1
- package/components/DeviceLabel/slots/DeviceLabelSlots.d.ts +9 -3
- package/components/DeviceLabel/types.d.ts +2 -2
- package/components/DeviceStatus/DeviceStatus.js +3 -15
- package/components/DeviceStatus/DeviceStatus.styles.js +1 -13
- package/components/DeviceStatus/constants.js +1 -4
- package/components/DeviceStatus/dictionary.d.ts +10 -10
- package/components/DeviceStatus/dictionary.js +1 -12
- package/components/DeviceStatus/icons.d.ts +1 -1
- package/components/DeviceStatus/index.d.ts +3 -2
- package/components/DeviceStatus/slots/DeviceStatusSlots.js +1 -11
- package/components/DeviceStatus/slots/slots.js +1 -7
- package/components/index.d.ts +1 -1
- package/components/indicators/IndicatorBattery/IndicatorBattery.styles.js +2 -2
- package/components/indicators/IndicatorBattery/dictionary.js +5 -1
- package/components/indicators/IndicatorBattery/index.d.ts +1 -0
- package/components/indicators/IndicatorCSQ/IndicatorCSQ.js +7 -5
- package/components/indicators/IndicatorCSQ/constants.d.ts +2 -2
- package/components/indicators/IndicatorCSQ/constants.js +4 -3
- package/components/indicators/IndicatorCSQ/dictionary.d.ts +5 -2
- package/components/indicators/IndicatorCSQ/dictionary.js +15 -12
- package/components/indicators/IndicatorCSQ/helpers/getQualityLabel/getQualityLabel.d.ts +22 -2
- package/components/indicators/IndicatorCSQ/helpers/getQualityLabel/getQualityLabel.js +15 -29
- package/components/indicators/IndicatorCSQ/index.d.ts +3 -3
- package/components/indicators/IndicatorCSQ/slots/IndicatorCSQSlots.js +6 -6
- package/components/indicators/IndicatorCSQ/types.d.ts +6 -2
- package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.d.ts +5 -0
- package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.js +15 -0
- package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.styles.d.ts +2 -0
- package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.styles.js +41 -0
- package/components/indicators/IndicatorValueAndMagnitude/constants.d.ts +2 -0
- package/components/indicators/IndicatorValueAndMagnitude/constants.js +7 -0
- package/components/indicators/IndicatorValueAndMagnitude/index.d.ts +1 -0
- package/components/indicators/IndicatorValueAndMagnitude/index.js +1 -0
- package/components/indicators/IndicatorValueAndMagnitude/slots/slots.d.ts +6 -0
- package/components/indicators/IndicatorValueAndMagnitude/slots/slots.js +10 -0
- package/components/indicators/IndicatorValueAndMagnitude/slots/styled.d.ts +12 -0
- package/components/indicators/IndicatorValueAndMagnitude/slots/styled.js +27 -0
- package/components/indicators/IndicatorValueAndMagnitude/types.d.ts +14 -0
- package/components/indicators/IndicatorValueStatus/IndicatorValueStatus.js +25 -0
- package/components/indicators/IndicatorValueStatus/IndicatorValueStatus.styles.js +76 -0
- package/components/indicators/IndicatorValueStatus/constants.js +8 -0
- package/components/indicators/IndicatorValueStatus/index.js +1 -0
- package/components/indicators/IndicatorValueStatus/slots/IndicatorValueStatusEnum.js +11 -0
- package/components/indicators/IndicatorValueStatus/slots/IndicatorValueStatusSlots.js +32 -0
- package/components/indicators/IndicatorValueStatus/types.d.ts +4 -0
- package/components/indicators/index.d.ts +2 -0
- package/components/maps/components/GpsMap/GpsMap.js +26 -9
- package/components/maps/components/GpsMap/GpsMap.styles.js +81 -93
- package/components/maps/components/GpsMap/Leaflet.styles.d.ts +6 -0
- package/components/maps/components/GpsMap/Leaflet.styles.js +535 -0
- package/components/maps/components/GpsMap/classes/index.d.ts +1 -1
- package/components/maps/components/GpsMap/classes/index.js +6 -76
- package/components/maps/components/GpsMap/classes/types.d.ts +5 -16
- package/components/maps/components/GpsMap/constants.d.ts +9 -3
- package/components/maps/components/GpsMap/constants.js +25 -13
- package/components/maps/components/GpsMap/contexts/MapContext/MapContext.js +4 -26
- package/components/maps/components/GpsMap/contexts/MapContext/index.d.ts +1 -1
- package/components/maps/components/GpsMap/contexts/MapContext/store.js +50 -75
- package/components/maps/components/GpsMap/contexts/MapContext/types.d.ts +98 -87
- package/components/maps/components/GpsMap/dictionary.d.ts +19 -8
- package/components/maps/components/GpsMap/dictionary.js +30 -17
- package/components/maps/components/GpsMap/external/{Control → MapControl}/index.d.ts +3 -3
- package/components/maps/components/GpsMap/external/{Control → MapControl}/index.js +9 -7
- package/components/maps/components/GpsMap/external/MapControl/types.d.ts +26 -0
- package/components/maps/components/GpsMap/external/googleMutant/index.d.ts +1 -1
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/index.js +3 -3
- package/components/maps/components/GpsMap/featureRenders/FeatureDivIconLabel/index.js +1 -1
- package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/types.d.ts +3 -2
- package/components/maps/components/GpsMap/featureRenders/index.d.ts +0 -1
- package/components/maps/components/GpsMap/hooks/index.d.ts +3 -0
- package/components/maps/components/GpsMap/hooks/index.js +1 -0
- package/components/maps/components/GpsMap/hooks/useDisableMapEventsOnFlag/index.d.ts +6 -0
- package/components/maps/components/GpsMap/hooks/useDisableMapEventsOnFlag/index.js +31 -0
- package/components/maps/components/GpsMap/hooks/useDisableMapEventsOnMouseOver/index.d.ts +6 -0
- package/components/maps/components/GpsMap/hooks/{useDisableZoomEvents → useDisableMapEventsOnMouseOver}/index.js +10 -2
- package/components/maps/components/GpsMap/icons.d.ts +10 -7
- package/components/maps/components/GpsMap/icons.js +17 -16
- package/components/maps/components/GpsMap/index.d.ts +2 -1
- package/components/maps/components/GpsMap/popups/MapPopupDevice/MapPopupDevice.js +9 -1
- package/components/maps/components/GpsMap/popups/index.d.ts +1 -0
- package/components/maps/components/GpsMap/slots/slots.d.ts +27 -4
- package/components/maps/components/GpsMap/slots/slots.js +16 -7
- package/components/maps/components/GpsMap/slots/styled.d.ts +18 -0
- package/components/maps/components/GpsMap/slots/styled.js +37 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/index.js +8 -7
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/index.d.ts +10 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/index.js +10 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → BottomRigthTools}/subcomponents/ZoomButtons/index.js +3 -3
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/types.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/hooks/types.d.ts +8 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/hooks/useTool.d.ts +13 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/hooks/useTool.js +64 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.d.ts +0 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.js +42 -87
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/index.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/index.js +24 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/types.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.js +30 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.styles.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.styles.js +45 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/hooks/types.d.ts +11 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/hooks/useMapLayersTool.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/hooks/useMapLayersTool.js +37 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/slots.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/slots.js +10 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/styled.d.ts +12 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/styled.js +26 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/subcomponents/MapLayerRow.d.ts +5 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/subcomponents/MapLayerRow.js +71 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/subcomponents/types.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/types.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.d.ts → TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.d.ts} +1 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.js +38 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.styles.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.styles.js +87 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/hooks/useMapSourcesTool.d.ts +12 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/hooks/useMapSourcesTool.js +22 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/slots.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/slots.js +13 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/styled.d.ts +21 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/styled.js +41 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/bing.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/bing.js +47 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/google.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/google.js +107 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/others.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/others.js +33 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/subcomponents/MapSourceCard.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/subcomponents/MapSourceCard.js +88 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/subcomponents/types.d.ts +7 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/types.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/MeasureTool.js +31 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/MeasureTool.styles.d.ts +7 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/MeasureTool.styles.js +154 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants.d.ts +25 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants.js +37 -14
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.d.ts +29 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.js +14 -6
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts +2 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.js +26 -20
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/types.d.ts +1 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/slots.d.ts +8 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/slots.js +12 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/styled.d.ts +18 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/styled.js +37 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/index.js +19 -17
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +18 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/types.d.ts +9 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/types.d.ts +2 -5
- package/components/maps/components/GpsMap/subcomponents/Controls/types.d.ts +1 -1
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/index.js +2 -1
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/index.js +2 -1
- package/components/maps/components/GpsMap/subcomponents/MapEventController/MapEventController.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/MapEventController/MapEventController.js +8 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/darkStyles.d.ts +13 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/index.js +82 -59
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerOthers/index.js +25 -15
- package/components/maps/components/GpsMap/types.d.ts +24 -5
- package/components/maps/components/GpsMapTools/GpsMapTools.d.ts +1 -0
- package/components/maps/components/GpsMapTools/index.d.ts +1 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/index.js +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.js +29 -32
- package/components/maps/components/GpsMapTools/types.d.ts +0 -16
- package/components/maps/index.d.ts +1 -0
- package/components/maps/utils/coordsToQuadKey.d.ts +4 -0
- package/components/maps/{components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils.js → utils/coordsToQuadKey.js} +2 -2
- package/components/maps/utils/index.d.ts +1 -0
- package/contexts/RealTimeConsumerContext/RealTimeConsumerContext.js +1 -1
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/athmospherejs/index.d.ts +1 -1
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/athmospherejs/index.js +1 -1
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/constants.d.ts +67 -2
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/constants.js +115 -30
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/dummy.js +5 -38
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/group.d.ts +9 -36
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/group.js +27 -19
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/helpers.d.ts +3 -2
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/helpers.js +9 -2
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/factory.js +1 -1
- package/formatters/CourseFormatter/CourseFormatter.js +6 -4
- package/formatters/CourseFormatter/helper.d.ts +2 -1
- package/formatters/CourseFormatter/helper.js +2 -4
- package/formatters/CourseFormatter/index.d.ts +1 -0
- package/formatters/CourseFormatter/slots/CourseFormatterSlots.d.ts +1 -1
- package/formatters/CourseFormatter/slots/CourseFormatterSlots.js +2 -2
- package/formatters/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +94 -59
- package/package.json +16 -3
- package/utils/cssToCSSProperties.d.ts +37 -0
- package/utils/getPrecisionFromHdop/constants.d.ts +13 -0
- package/utils/getPrecisionFromHdop/constants.js +73 -0
- package/utils/getPrecisionFromHdop/getPrecisionFromHdop.d.ts +31 -0
- package/utils/getPrecisionFromHdop/getPrecisionFromHdop.js +59 -0
- package/utils/getPrecisionFromHdop/index.d.ts +3 -0
- package/utils/getPrecisionFromHdop/index.js +1 -0
- package/utils/getPrecisionFromHdop/types.d.ts +42 -0
- package/utils/getVptUpdatedAtWithGuard.d.ts +4 -0
- package/utils/getVptUpdatedAtWithGuard.js +13 -0
- package/utils/getVptValueWithGuard.d.ts +9 -0
- package/utils/getVptValueWithGuard.js +18 -0
- package/utils/index.d.ts +3 -0
- package/components/DeviceStatus/hooks/constants.d.ts +0 -11
- package/components/maps/components/GpsMap/external/Control/types.d.ts +0 -7
- package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/constants.js +0 -4
- package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/index.js +0 -112
- package/components/maps/components/GpsMap/hooks/useDisableZoomEvents/index.d.ts +0 -6
- package/components/maps/components/GpsMap/slots/GpsMapSlots.d.ts +0 -4
- package/components/maps/components/GpsMap/slots/GpsMapSlots.js +0 -24
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/index.js +0 -13
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index.d.ts +0 -10
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index.js +0 -58
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers.d.ts +0 -9
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers.js +0 -17
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns.d.ts +0 -18
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns.js +0 -139
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster.d.ts +0 -12
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster.js +0 -52
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.d.ts +0 -8
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.js +0 -43
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index.js +0 -30
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/model.d.ts +0 -26
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.js +0 -133
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.d.ts +0 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.js +0 -39
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.js +0 -73
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.d.ts +0 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.js +0 -25
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/types.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/index.js +0 -40
- /package/components/{maps/components/GpsMap/contexts/MapContext/helper.js → Device/index.js} +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → BottomRigthTools}/subcomponents/ZoomButtons/index.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/{index.d.ts → MeasureTool.d.ts} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const HDOP_QUALITY_STATUS = {
|
|
2
|
+
IDEAL: "IDEAL",
|
|
3
|
+
EXCELLENT: "EXCELLENT",
|
|
4
|
+
GOOD: "GOOD",
|
|
5
|
+
MODERATE: "MODERATE",
|
|
6
|
+
REGULAR: "REGULAR",
|
|
7
|
+
POOR: "POOR",
|
|
8
|
+
NOT_DETECTABLE: "NOT_DETECTABLE"
|
|
9
|
+
};
|
|
10
|
+
const DEFAULT_RMS_ERROR = 3.5;
|
|
11
|
+
const SPECIAL_HDOP_VALUES = [0, 99, 999];
|
|
12
|
+
const HDOP_QUALITY_RANGES = [
|
|
13
|
+
{
|
|
14
|
+
minPrecision: 0,
|
|
15
|
+
maxPrecision: 3.5,
|
|
16
|
+
// HDOP < 1
|
|
17
|
+
status: HDOP_QUALITY_STATUS.IDEAL,
|
|
18
|
+
color: "persianGreen",
|
|
19
|
+
percentage: 100,
|
|
20
|
+
category: "excellent"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
minPrecision: 3.5,
|
|
24
|
+
maxPrecision: 7,
|
|
25
|
+
// HDOP 1-2
|
|
26
|
+
status: HDOP_QUALITY_STATUS.EXCELLENT,
|
|
27
|
+
color: "persianGreen",
|
|
28
|
+
percentage: 95,
|
|
29
|
+
category: "excellent"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
minPrecision: 7,
|
|
33
|
+
maxPrecision: 17.5,
|
|
34
|
+
// HDOP 2-5
|
|
35
|
+
status: HDOP_QUALITY_STATUS.GOOD,
|
|
36
|
+
color: "info",
|
|
37
|
+
percentage: 80,
|
|
38
|
+
category: "good"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
minPrecision: 17.5,
|
|
42
|
+
maxPrecision: 35,
|
|
43
|
+
// HDOP 5-10
|
|
44
|
+
status: HDOP_QUALITY_STATUS.MODERATE,
|
|
45
|
+
color: "warning",
|
|
46
|
+
percentage: 60,
|
|
47
|
+
category: "deficient"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
minPrecision: 35,
|
|
51
|
+
maxPrecision: 70,
|
|
52
|
+
// HDOP 10-20
|
|
53
|
+
status: HDOP_QUALITY_STATUS.REGULAR,
|
|
54
|
+
color: "error",
|
|
55
|
+
percentage: 40,
|
|
56
|
+
category: "deficient"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
minPrecision: 70,
|
|
60
|
+
maxPrecision: Infinity,
|
|
61
|
+
// HDOP > 20
|
|
62
|
+
status: HDOP_QUALITY_STATUS.POOR,
|
|
63
|
+
color: "error",
|
|
64
|
+
percentage: 20,
|
|
65
|
+
category: "deficient"
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
export {
|
|
69
|
+
DEFAULT_RMS_ERROR as D,
|
|
70
|
+
HDOP_QUALITY_STATUS as H,
|
|
71
|
+
SPECIAL_HDOP_VALUES as S,
|
|
72
|
+
HDOP_QUALITY_RANGES as a
|
|
73
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GetPrecisionFromHdopProps, GetPrecisionFromHdopReturn } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Calculate GPS precision in meters based on HDOP value
|
|
4
|
+
* Formula: Precision = HDOP × RMS_Error
|
|
5
|
+
* @param props - GetPrecisionFromHdopProps containing HDOP value and configuration
|
|
6
|
+
* @returns precision data with quality classification
|
|
7
|
+
*
|
|
8
|
+
* Quality ranges based on standard GPS HDOP classification:
|
|
9
|
+
* - 0-3.5m: Ideal (HDOP < 1) - Máxima confianza para aplicaciones de alta precisión
|
|
10
|
+
* - 3.5-7m: Excellent (HDOP 1-2) - Alta precisión para la mayoría de aplicaciones
|
|
11
|
+
* - 7-17.5m: Good (HDOP 2-5) - Posicionamiento fiable para navegación
|
|
12
|
+
* - 17.5-35m: Moderate (HDOP 5-10) - Posicionamiento aceptable, pero mejorable
|
|
13
|
+
* - 35-70m: Regular (HDOP 10-20) - Posicionamiento impreciso, usar con precaución
|
|
14
|
+
* - 70m+: Poor (HDOP > 20) - Posicionamiento muy impreciso, datos no confiables
|
|
15
|
+
* - Invalid values: Not detectable
|
|
16
|
+
*/
|
|
17
|
+
export declare const getPrecisionFromHdop: (props: GetPrecisionFromHdopProps) => GetPrecisionFromHdopReturn;
|
|
18
|
+
/**
|
|
19
|
+
* Get HDOP value from precision in meters (reverse calculation)
|
|
20
|
+
* Formula: HDOP = Precision / RMS_Error
|
|
21
|
+
* @param precisionMeters - Desired precision in meters
|
|
22
|
+
* @param rmsError - RMS error of GPS receiver (default: 3.5m)
|
|
23
|
+
* @returns HDOP value needed to achieve the precision
|
|
24
|
+
*/
|
|
25
|
+
export declare const getHdopFromPrecision: (precisionMeters: number, rmsError?: number) => number;
|
|
26
|
+
/**
|
|
27
|
+
* Get quality category from precision in meters
|
|
28
|
+
* @param precisionMeters - Precision in meters
|
|
29
|
+
* @returns Quality category
|
|
30
|
+
*/
|
|
31
|
+
export declare const getQualityCategoryFromPrecision: (precisionMeters: number) => "excellent" | "good" | "deficient" | "not_detectable";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { D as DEFAULT_RMS_ERROR, H as HDOP_QUALITY_STATUS, S as SPECIAL_HDOP_VALUES, a as HDOP_QUALITY_RANGES } from "./constants.js";
|
|
2
|
+
const getPrecisionFromHdop = (props) => {
|
|
3
|
+
const { hdop, rmsError = DEFAULT_RMS_ERROR } = props;
|
|
4
|
+
if (hdop === null || hdop === void 0 || hdop === 0) {
|
|
5
|
+
return {
|
|
6
|
+
precisionMeters: null,
|
|
7
|
+
status: HDOP_QUALITY_STATUS.NOT_DETECTABLE,
|
|
8
|
+
color: "disabled",
|
|
9
|
+
percentage: 0,
|
|
10
|
+
category: "not_detectable"
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const hdopValue = Number(hdop);
|
|
14
|
+
if (isNaN(hdopValue)) {
|
|
15
|
+
return {
|
|
16
|
+
precisionMeters: null,
|
|
17
|
+
status: HDOP_QUALITY_STATUS.NOT_DETECTABLE,
|
|
18
|
+
color: "disabled",
|
|
19
|
+
percentage: 0,
|
|
20
|
+
category: "not_detectable"
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (SPECIAL_HDOP_VALUES.includes(hdopValue)) {
|
|
24
|
+
return {
|
|
25
|
+
precisionMeters: null,
|
|
26
|
+
status: HDOP_QUALITY_STATUS.NOT_DETECTABLE,
|
|
27
|
+
color: "disabled",
|
|
28
|
+
percentage: 0,
|
|
29
|
+
category: "not_detectable"
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const precisionMeters = hdopValue * rmsError;
|
|
33
|
+
const qualityRange = HDOP_QUALITY_RANGES.find(
|
|
34
|
+
(range) => precisionMeters >= range.minPrecision && precisionMeters < range.maxPrecision
|
|
35
|
+
);
|
|
36
|
+
const selectedRange = qualityRange || HDOP_QUALITY_RANGES[HDOP_QUALITY_RANGES.length - 1];
|
|
37
|
+
return {
|
|
38
|
+
precisionMeters: Math.round(precisionMeters * 10) / 10,
|
|
39
|
+
// Round to 1 decimal place
|
|
40
|
+
status: selectedRange.status,
|
|
41
|
+
color: selectedRange.color,
|
|
42
|
+
percentage: selectedRange.percentage,
|
|
43
|
+
category: selectedRange.category
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
const getHdopFromPrecision = (precisionMeters, rmsError = DEFAULT_RMS_ERROR) => {
|
|
47
|
+
return Math.round(precisionMeters / rmsError * 10) / 10;
|
|
48
|
+
};
|
|
49
|
+
const getQualityCategoryFromPrecision = (precisionMeters) => {
|
|
50
|
+
const range = HDOP_QUALITY_RANGES.find(
|
|
51
|
+
(range2) => precisionMeters >= range2.minPrecision && precisionMeters < range2.maxPrecision
|
|
52
|
+
);
|
|
53
|
+
return range?.category || "deficient";
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
getHdopFromPrecision as a,
|
|
57
|
+
getQualityCategoryFromPrecision as b,
|
|
58
|
+
getPrecisionFromHdop as g
|
|
59
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { getPrecisionFromHdop, getHdopFromPrecision, getQualityCategoryFromPrecision } from './getPrecisionFromHdop';
|
|
2
|
+
export { HDOP_QUALITY_STATUS, DEFAULT_RMS_ERROR, HDOP_QUALITY_RANGES } from './constants';
|
|
3
|
+
export type { GetPrecisionFromHdopProps, GetPrecisionFromHdopReturn, HdopQualityRange } from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ChipColorOptions } from '@m4l/styles';
|
|
2
|
+
import { HDOP_QUALITY_STATUS } from './constants';
|
|
3
|
+
export interface GetPrecisionFromHdopProps {
|
|
4
|
+
/**
|
|
5
|
+
* HDOP value from GPS device
|
|
6
|
+
*/
|
|
7
|
+
hdop: number | null | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* RMS error in meters (default: 3.5m for typical GPS receivers)
|
|
10
|
+
*/
|
|
11
|
+
rmsError?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface GetPrecisionFromHdopReturn {
|
|
14
|
+
/**
|
|
15
|
+
* Calculated precision in meters
|
|
16
|
+
*/
|
|
17
|
+
precisionMeters: number | null;
|
|
18
|
+
/**
|
|
19
|
+
* Quality label based on precision
|
|
20
|
+
*/
|
|
21
|
+
status: typeof HDOP_QUALITY_STATUS[keyof typeof HDOP_QUALITY_STATUS];
|
|
22
|
+
/**
|
|
23
|
+
* Color for UI display
|
|
24
|
+
*/
|
|
25
|
+
color: ChipColorOptions;
|
|
26
|
+
/**
|
|
27
|
+
* Percentage for progress indicators
|
|
28
|
+
*/
|
|
29
|
+
percentage: number;
|
|
30
|
+
/**
|
|
31
|
+
* Quality category
|
|
32
|
+
*/
|
|
33
|
+
category: 'excellent' | 'good' | 'deficient' | 'not_detectable';
|
|
34
|
+
}
|
|
35
|
+
export interface HdopQualityRange {
|
|
36
|
+
minPrecision: number;
|
|
37
|
+
maxPrecision: number;
|
|
38
|
+
status: typeof HDOP_QUALITY_STATUS[keyof typeof HDOP_QUALITY_STATUS];
|
|
39
|
+
color: ChipColorOptions;
|
|
40
|
+
percentage: number;
|
|
41
|
+
category: 'excellent' | 'good' | 'deficient' | 'not_detectable';
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function getVptUpdatedAtWithGuard(value, defaultValue = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
2
|
+
let returnValue = defaultValue;
|
|
3
|
+
try {
|
|
4
|
+
if (typeof value === "object") {
|
|
5
|
+
returnValue = value.updatedAt || defaultValue;
|
|
6
|
+
}
|
|
7
|
+
} catch (_e) {
|
|
8
|
+
}
|
|
9
|
+
return returnValue;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
getVptUpdatedAtWithGuard as g
|
|
13
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Maybe } from '@m4l/core';
|
|
2
|
+
type VptValue<T> = Maybe<T> | Maybe<{
|
|
3
|
+
value: T;
|
|
4
|
+
}>;
|
|
5
|
+
/**
|
|
6
|
+
* "getVptValueWithGuard" obtiene el valor de un vpt con un guardia de valor por defecto
|
|
7
|
+
*/
|
|
8
|
+
export declare function getVptValueWithGuard<T, K>(valueOrOjectWhitValue: VptValue<T>, defaultValue: K): K | T;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function getVptValueWithGuard(valueOrOjectWhitValue, defaultValue) {
|
|
2
|
+
let returnValue;
|
|
3
|
+
try {
|
|
4
|
+
if (valueOrOjectWhitValue === null || valueOrOjectWhitValue === void 0) {
|
|
5
|
+
returnValue = defaultValue;
|
|
6
|
+
} else if (typeof valueOrOjectWhitValue === "object") {
|
|
7
|
+
returnValue = valueOrOjectWhitValue?.value || defaultValue;
|
|
8
|
+
} else {
|
|
9
|
+
returnValue = valueOrOjectWhitValue;
|
|
10
|
+
}
|
|
11
|
+
} catch (_e) {
|
|
12
|
+
returnValue = defaultValue;
|
|
13
|
+
}
|
|
14
|
+
return returnValue;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
getVptValueWithGuard as g
|
|
18
|
+
};
|
package/utils/index.d.ts
CHANGED
|
@@ -6,3 +6,6 @@ export * from './ObjectQueue';
|
|
|
6
6
|
export * from './getComponentSlotRoot';
|
|
7
7
|
export { getTypographyStyles } from './getTypographyStyles';
|
|
8
8
|
export { getHeightSizeStyles } from './getSizeStyles';
|
|
9
|
+
export * from './getVptValueWithGuard';
|
|
10
|
+
export * from './getVptUpdatedAtWithGuard';
|
|
11
|
+
export * from './getPrecisionFromHdop';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { GNSSEnumMotionStatus } from '../../../@types/constants';
|
|
2
|
-
export type StatusDeviceData = {
|
|
3
|
-
id: GNSSEnumMotionStatus;
|
|
4
|
-
statusLabelId: string;
|
|
5
|
-
iconKey: string;
|
|
6
|
-
color: string;
|
|
7
|
-
palletColor: string;
|
|
8
|
-
course?: number;
|
|
9
|
-
speed?: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const DEVICE_STATUSES_CONFIG: Record<GNSSEnumMotionStatus, StatusDeviceData>;
|
|
@@ -1,4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EwLDMgLTMsMCAtOCwxIC0xNSw0IC0yLDAgLTUsLTEgLTgsLTR6Ii8+DQogICA8cGF0aCBjbGFzcz0iY2FyLWZpbDQiIHN0eWxlPSJtYXNrOnVybCgjaWQ0KSIgZD0iTTg1IDhjLTIsLTQgLTMsLTYgLTYsLTZsLTUwIDAgMSAtMmMwLDAgLTEsMSAtMiwybC0yMCAwYy0yLDAgLTUsMiAtNyw2IDAsMCAtMSwyIC0xLDggOCwtNiAxNSwtOSAyMywtMTAgLTEsMyAtMiw2IC0yLDkgNCwtMiA4LC00IDEyLC00IDEyLC0yIDI0LC0yIDM2LDAgMywwIDUsMSA3LDIgNSwtNCA4LC01IDksLTMgMCwtMiAwLC0yIDAsLTJ6Ii8+DQogICA8cGF0aCBjbGFzcz0iY2FyLWZpbDYiIHN0eWxlPSJtYXNrOnVybCgjaWQ2KSIgZD0iTTg1IDMyYy0yLDMgLTMsNSAtNiw1bC01MCAwIDEgMmMwLDAgLTEsLTEgLTIsLTJsLTIwIDBjLTIsMCAtNSwtMiAtNywtNSAwLDAgLTEsLTUgLTEsLTEzIDAsLTcgMSwtMTEgMSwtMTEgMSwtMyA1LC02IDcsLTZsMjAgMGMxLC0xIDIsLTIgMiwtMmwtMSAyIDUwIDBjMywwIDUsMyA2LDYgMCwwIDEsNCAxLDExIDAsOCAtMSwxMyAtMSwxM3oiLz4NCiAgPC9nPg0KIDwvZz4NCjwvc3ZnPg0K";
|
|
2
|
-
export {
|
|
3
|
-
FALLBACK_SVG as F
|
|
4
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { shallow } from "zustand/shallow";
|
|
3
|
-
import { u as useMapStore } from "../../hooks/useMapStore/index.js";
|
|
4
|
-
import { useCallback } from "react";
|
|
5
|
-
import { a as LABEL_COLOR_DEFAULT, L as LABEL_BK_COLOR_DEFAULT } from "../../constants.js";
|
|
6
|
-
import { M as MarkerIconLabel } from "../MarkerIconLabel/index.js";
|
|
7
|
-
import { F as FALLBACK_SVG } from "./constants.js";
|
|
8
|
-
import { useSvgColor, SKELETON_SVG_ICON } from "@m4l/components";
|
|
9
|
-
import { u as useDeviceStatus } from "../../../../../DeviceStatus/hooks/useDeviceStatus.js";
|
|
10
|
-
import { useEnvironment, getPropertyByString } from "@m4l/core";
|
|
11
|
-
import { c as courseToCssAngle } from "../../../../utils/courseToCssAngle.js";
|
|
12
|
-
const DeviceFeatureRender = (props) => {
|
|
13
|
-
const { id, layerId } = props;
|
|
14
|
-
const feature = useMapStore((state) => {
|
|
15
|
-
const gObject = state.hashLayers[layerId].geoJsonObject;
|
|
16
|
-
if (!gObject) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
if (gObject.object.type === "Feature") {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
const feat = gObject.object.features.find((f) => f.id === id);
|
|
23
|
-
if (feat) {
|
|
24
|
-
if (!(feat.geometry.type === "Point" && feat.properties?.subType === "Marker")) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
id: feat.id,
|
|
29
|
-
geometry: feat.geometry,
|
|
30
|
-
properties: feat.properties,
|
|
31
|
-
featureLabel: feat.featureLabel,
|
|
32
|
-
popupRender: state.hashLayers[layerId].popupComponent,
|
|
33
|
-
popupOptions: state.hashLayers[layerId].popupOptions
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
return null;
|
|
37
|
-
}, shallow);
|
|
38
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
39
|
-
const propFeature = {
|
|
40
|
-
featureId: feature?.id
|
|
41
|
-
};
|
|
42
|
-
const {
|
|
43
|
-
deviceData
|
|
44
|
-
} = feature?.properties || { deviceData: void 0 };
|
|
45
|
-
const { iconKey, filteredCourse, label: statusLabel, palletColor: statusPalletColor, speed } = useDeviceStatus({ deviceData, withLabel: true });
|
|
46
|
-
const iconRotate = courseToCssAngle(filteredCourse || 0, 0);
|
|
47
|
-
const color = deviceData?.settings?.group?.color || LABEL_COLOR_DEFAULT;
|
|
48
|
-
const bgColor = deviceData?.settings?.group?.bgColor || LABEL_BK_COLOR_DEFAULT;
|
|
49
|
-
const src = `${host_static_assets}/${environment_assets}/frontend/components/device_status/assets/icons/${iconKey}_contained.svg`;
|
|
50
|
-
const markerLabel = deviceData?.settings?.name || "name";
|
|
51
|
-
const reportTime = new Date(getPropertyByString(deviceData, "current.vpts.vptModem.lastConnection.value", (/* @__PURE__ */ new Date()).toISOString()));
|
|
52
|
-
const reportStatus = new Date(getPropertyByString(deviceData, "current.vpts.vptGnss.status.udaptedAt", (/* @__PURE__ */ new Date()).toISOString()));
|
|
53
|
-
const [lng, lat] = feature?.geometry?.coordinates || [0, 0];
|
|
54
|
-
const svg = useSvgColor({
|
|
55
|
-
src,
|
|
56
|
-
cacheKey: iconKey,
|
|
57
|
-
//Id del icono
|
|
58
|
-
primaryColor: bgColor,
|
|
59
|
-
secondaryColor: color,
|
|
60
|
-
skeletonIcon: SKELETON_SVG_ICON,
|
|
61
|
-
fallBackIcon: FALLBACK_SVG
|
|
62
|
-
});
|
|
63
|
-
const { addLayerDataToFeature } = useMapStore((state) => state.mapActions, shallow);
|
|
64
|
-
const onAddPointLayer = useCallback((e) => {
|
|
65
|
-
if (!feature) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const layerData = {
|
|
69
|
-
// visible: true,
|
|
70
|
-
boundsNW: e.target?._latlng,
|
|
71
|
-
boundsSE: e.target?._latlng,
|
|
72
|
-
getTarget: () => e.target
|
|
73
|
-
// {
|
|
74
|
-
// id: e.target?._leaflet_id,
|
|
75
|
-
// openPopup: e.target?.openPopup,
|
|
76
|
-
// },
|
|
77
|
-
// target: e.target,
|
|
78
|
-
};
|
|
79
|
-
addLayerDataToFeature(layerId, feature.id, layerData);
|
|
80
|
-
}, [feature]);
|
|
81
|
-
if (!feature || !svg) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
return /* @__PURE__ */ jsx(
|
|
85
|
-
MarkerIconLabel,
|
|
86
|
-
{
|
|
87
|
-
position: { lat, lng },
|
|
88
|
-
...{
|
|
89
|
-
label: markerLabel,
|
|
90
|
-
iconSrc: svg.dataWithColor,
|
|
91
|
-
iconScale: 1,
|
|
92
|
-
iconRotate,
|
|
93
|
-
iconWidth: 38,
|
|
94
|
-
iconHeight: 38,
|
|
95
|
-
labelBkColor: bgColor,
|
|
96
|
-
labelColor: color,
|
|
97
|
-
offsetLeftTop: [42, 0]
|
|
98
|
-
},
|
|
99
|
-
draggable: false,
|
|
100
|
-
eventHandlers: {
|
|
101
|
-
add: onAddPointLayer
|
|
102
|
-
},
|
|
103
|
-
popupRender: feature.popupRender,
|
|
104
|
-
properties: { ...feature.properties, statusLabel, statusPalletColor, reportTime, reportStatus, speed, iconKey },
|
|
105
|
-
popupOptions: feature.popupOptions,
|
|
106
|
-
...propFeature
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
};
|
|
110
|
-
export {
|
|
111
|
-
DeviceFeatureRender as D
|
|
112
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const GpsMapRootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-leaflet').MapContainerProps & import('react').RefAttributes<import('leaflet').Map>, keyof import('react-leaflet').MapContainerProps | keyof import('react').RefAttributes<import('leaflet').Map>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
|
|
2
|
-
export declare const PopupGpsDeviceStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
3
|
-
export declare const PopupGpsDeviceHeaderStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
-
export declare const PopupGpsDeviceContentStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material/styles";
|
|
2
|
-
import { C as COMPONET_KEY_COMPONENT } from "../constants.js";
|
|
3
|
-
import { m as mapStyles } from "../GpsMap.styles.js";
|
|
4
|
-
import { M as MapSlots } from "./slots.js";
|
|
5
|
-
import { MapContainer } from "react-leaflet";
|
|
6
|
-
const GpsMapRootStyled = styled(MapContainer, {
|
|
7
|
-
name: COMPONET_KEY_COMPONENT,
|
|
8
|
-
slot: MapSlots.root
|
|
9
|
-
})(mapStyles?.root);
|
|
10
|
-
styled("div", {
|
|
11
|
-
name: COMPONET_KEY_COMPONENT,
|
|
12
|
-
slot: MapSlots.popupGpsDevice
|
|
13
|
-
})(mapStyles?.popupGpsDevice);
|
|
14
|
-
styled("div", {
|
|
15
|
-
name: COMPONET_KEY_COMPONENT,
|
|
16
|
-
slot: MapSlots.popupGpsDeviceHeader
|
|
17
|
-
})(mapStyles?.popupGpsDeviceHeader);
|
|
18
|
-
styled("div", {
|
|
19
|
-
name: COMPONET_KEY_COMPONENT,
|
|
20
|
-
slot: MapSlots.popupGpsDeviceContent
|
|
21
|
-
})(mapStyles?.popupGpsDeviceContent);
|
|
22
|
-
export {
|
|
23
|
-
GpsMapRootStyled as G
|
|
24
|
-
};
|
package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { L as LayersButton } from "./subcomponents/PopoverToolButton/index.js";
|
|
3
|
-
import { C as Control } from "../../../../external/Control/index.js";
|
|
4
|
-
import { m as mapClasses } from "../../../../classes/index.js";
|
|
5
|
-
function TopLeftTools() {
|
|
6
|
-
return /* @__PURE__ */ jsxs(Control, { position: "topleft", prepend: true, className: mapClasses.topLeftToolsRoot, children: [
|
|
7
|
-
/* @__PURE__ */ jsx(LayersButton, { type: "MapSources" }),
|
|
8
|
-
/* @__PURE__ */ jsx(LayersButton, { type: "Layers" })
|
|
9
|
-
] });
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
TopLeftTools as T
|
|
13
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PopoverToolButtonProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Provee un componente que le permite al usuario cambiar la configuración del idioma en la plataforma.
|
|
4
|
-
* @param props
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* TODO: Documentar
|
|
9
|
-
*/
|
|
10
|
-
export declare function LayersButton(props: PopoverToolButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import { IconButton, Popover } from "@m4l/components";
|
|
4
|
-
import { L as LayersTool } from "./subcomponentes/LayersTool/index.js";
|
|
5
|
-
import { M as MapSourcesTool } from "./subcomponentes/MapSourcesTool/index.js";
|
|
6
|
-
import { useEnvironment } from "@m4l/core";
|
|
7
|
-
import { useTheme } from "@mui/material";
|
|
8
|
-
import { m as mapClasses } from "../../../../../../classes/index.js";
|
|
9
|
-
import { M as MAP_ICONS } from "../../../../../../icons.js";
|
|
10
|
-
function LayersButton(props) {
|
|
11
|
-
const { type } = props;
|
|
12
|
-
const [open, setOpen] = useState(null);
|
|
13
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
14
|
-
const theme = useTheme();
|
|
15
|
-
const handleOpen = (event) => {
|
|
16
|
-
setOpen(event.currentTarget);
|
|
17
|
-
};
|
|
18
|
-
const handleClose = () => {
|
|
19
|
-
setOpen(null);
|
|
20
|
-
};
|
|
21
|
-
return (
|
|
22
|
-
/* LanguagePopoverRoot: Contenedor principal del componente, es usado para aplicar los estilos css de los overrides que
|
|
23
|
-
provienen del objeto del tema. Se usa para garantizar de que estos estilos no se propaguen a otros componentes
|
|
24
|
-
de la plataforna web. */
|
|
25
|
-
/* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
26
|
-
/* @__PURE__ */ jsx(
|
|
27
|
-
IconButton,
|
|
28
|
-
{
|
|
29
|
-
onClick: handleOpen,
|
|
30
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${type === "MapSources" ? MAP_ICONS.MAP_SOURCES_TOOL : MAP_ICONS.MAP_LAYERS_TOOL}`
|
|
31
|
-
}
|
|
32
|
-
),
|
|
33
|
-
/* @__PURE__ */ jsx(
|
|
34
|
-
Popover,
|
|
35
|
-
{
|
|
36
|
-
className: type === "MapSources" ? mapClasses.mapSourcesPopoverRoot : mapClasses.layersPopoverRoot,
|
|
37
|
-
arrowType: "no-arrow",
|
|
38
|
-
open: Boolean(open),
|
|
39
|
-
anchorEl: open,
|
|
40
|
-
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
41
|
-
onClose: handleClose,
|
|
42
|
-
sx: {
|
|
43
|
-
...type === "MapSources" ? theme.components?.M4LMapMapSources?.styleOverrides : theme.components?.M4LMapLayers?.styleOverrides
|
|
44
|
-
// width: 180,
|
|
45
|
-
// '& .MuiMenuItem-root': { px: 1, typography: 'body2', borderRadius: 0.75 },
|
|
46
|
-
},
|
|
47
|
-
disableAutoFocus: true,
|
|
48
|
-
disableRestoreFocus: true,
|
|
49
|
-
disableEnforceFocus: true,
|
|
50
|
-
children: type === "MapSources" ? /* @__PURE__ */ jsx(MapSourcesTool, {}) : /* @__PURE__ */ jsx(LayersTool, {})
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] })
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
export {
|
|
57
|
-
LayersButton as L
|
|
58
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CheckedNameSet } from '../../../../../../../../../contexts/MapContext/types';
|
|
2
|
-
/**
|
|
3
|
-
* Hook encargado de cargar las capas checkeadas y setter de acuerdo al nombre del set de capas
|
|
4
|
-
* @param layerId
|
|
5
|
-
* @param checkedType
|
|
6
|
-
* @param endpoint
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
export declare function useCheckedLayers(checkedNameSet: CheckedNameSet): [ReadonlySet<string>, (newFeatures: ReadonlySet<string>) => void];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { shallow } from "zustand/shallow";
|
|
2
|
-
import { u as useMapStore } from "../../../../../../../../../hooks/useMapStore/index.js";
|
|
3
|
-
function useCheckedLayers(checkedNameSet) {
|
|
4
|
-
const [checkedLayers, setCheckedLayers] = useMapStore(
|
|
5
|
-
(state) => [
|
|
6
|
-
state[`${checkedNameSet}CheckedLayers`],
|
|
7
|
-
(newSet) => {
|
|
8
|
-
state.mapActions.setCheckedLayers(checkedNameSet, newSet);
|
|
9
|
-
}
|
|
10
|
-
],
|
|
11
|
-
shallow
|
|
12
|
-
);
|
|
13
|
-
return [checkedLayers, setCheckedLayers];
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
useCheckedLayers as u
|
|
17
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Column } from 'react-data-grid';
|
|
2
|
-
import { LayersListModel } from '../model';
|
|
3
|
-
type UseColumnsProps<Row> = {
|
|
4
|
-
rowKeyGetter: (row: Row) => string;
|
|
5
|
-
visibleLayers: ReadonlySet<string>;
|
|
6
|
-
setVisibleLayers: (newSet: ReadonlySet<string>) => void;
|
|
7
|
-
autoFocusLayers: ReadonlySet<string>;
|
|
8
|
-
setAutoFocusLayers: (newSet: ReadonlySet<string>) => void;
|
|
9
|
-
clusterLayers: ReadonlySet<string>;
|
|
10
|
-
setClusterLayers: (newSet: ReadonlySet<string>) => void;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* TODO: Documentar
|
|
14
|
-
*/
|
|
15
|
-
export declare function useColumns(props: UseColumnsProps<LayersListModel>): {
|
|
16
|
-
columns: Column<LayersListModel, unknown>[];
|
|
17
|
-
};
|
|
18
|
-
export {};
|