@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.
- 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/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/leaflet.styles.d.ts +6 -0
- 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
|
@@ -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
|
|
5
|
+
const getMarkerPointIcon2 = (position) => {
|
|
6
6
|
return L__default.divIcon({
|
|
7
7
|
className: mapClasses.measureMarkerRoot,
|
|
8
8
|
html: `<div class="${mapClasses.measureMarkerContainer}">
|
|
9
|
-
<
|
|
10
|
-
|
|
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
|
-
|
|
44
|
-
|
|
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
|
-
|
|
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 {
|
|
9
|
-
import { g as
|
|
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", "
|
|
20
|
+
name: ["statusEdition", "value", "magnitude"]
|
|
19
21
|
});
|
|
20
22
|
const statusEdition = fieldsWatch[0];
|
|
21
23
|
const value = fieldsWatch[1];
|
|
22
|
-
const
|
|
23
|
-
const
|
|
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
|
-
|
|
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.
|
|
44
|
-
|
|
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:
|
|
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(
|
|
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 (
|
|
227
|
-
|
|
228
|
-
currentMeasure.current.
|
|
229
|
-
|
|
231
|
+
if (magnitude !== magnitudeCached) {
|
|
232
|
+
setMagnitudeCached(magnitude);
|
|
233
|
+
currentMeasure.current.magnitude = magnitude;
|
|
234
|
+
const valueNew = measureDistante();
|
|
235
|
+
setValue("value", valueNew);
|
|
230
236
|
}
|
|
231
|
-
}, [
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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 {
|
|
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
|
|
10
|
-
|
|
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
|
-
|
|
19
|
+
GpsMapMeasureToolRHFSelectStyled,
|
|
13
20
|
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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(
|
|
25
|
-
/* @__PURE__ */ jsx("
|
|
26
|
-
/* @__PURE__ */ jsx(
|
|
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
|
-
|
|
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
|
-
|
|
20
|
+
magnitude?: string | null;
|
|
5
21
|
unitArea?: MagnitudeFactorItem | null;
|
|
6
22
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
2
|
-
/**
|
|
3
|
-
* Propiedades para el componente TopRigthTools.
|
|
4
|
-
*/
|
|
1
|
+
import { JSX_REACT_NODE } from '@m4l/components';
|
|
5
2
|
export interface TopRigthToolsProps {
|
|
6
|
-
|
|
3
|
+
GpsTools?: JSX_REACT_NODE;
|
|
7
4
|
}
|
|
@@ -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 =
|
|
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
|
-
},
|
|
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],
|
|
@@ -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
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
...options
|
|
66
|
+
type: layer.type
|
|
67
|
+
// styles: [],
|
|
68
|
+
// ...layer.options,
|
|
40
69
|
});
|
|
41
70
|
mutantRefLayer.current = googleMutantLayer;
|
|
42
|
-
if (
|
|
71
|
+
if (layersStatus.current.trafficLayer) {
|
|
43
72
|
googleMutantLayer.addGoogleLayer("TrafficLayer");
|
|
44
73
|
}
|
|
45
|
-
if (
|
|
74
|
+
if (layersStatus.current.transitLayer) {
|
|
46
75
|
googleMutantLayer.addGoogleLayer("TransitLayer");
|
|
47
76
|
}
|
|
48
|
-
if (
|
|
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,
|
|
89
|
+
}, [map, layer.type, sourceId, googleApiKey, googleMapVersion, someActiveLayers]);
|
|
60
90
|
React.useEffect(() => {
|
|
61
|
-
if (
|
|
91
|
+
if (sourceId !== "google") {
|
|
62
92
|
return;
|
|
63
93
|
}
|
|
64
|
-
if (mutantRefLayer.current
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
}, [
|
|
118
|
+
}, [trafficLayer, transitLayer, bicyclingLayer]);
|
|
96
119
|
return null;
|
|
97
120
|
}
|
|
98
121
|
export {
|