@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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { M as MAP_DICCTIONARY } from "../../../../../../../dictionary.js";
|
|
2
|
+
import { M as MAP_ICONS } from "../../../../../../../icons.js";
|
|
3
|
+
import { c as coordsToQuadKey } from "../../../../../../../../../utils/coordsToQuadKey.js";
|
|
4
|
+
const BING_URL_TEMPLATE = "https://{s}.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/|QK|?mkt=en-us&it=G,VE,BX,L,LA&shading=hill&og=22&n=z";
|
|
5
|
+
const BING_SUB_DOMAINS = ["t2", "t3"];
|
|
6
|
+
const TILE_LAYER_BING = {
|
|
7
|
+
id: "bing",
|
|
8
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_TILE_BING,
|
|
9
|
+
imageId: MAP_ICONS.MAP_SOURCE_BING,
|
|
10
|
+
layers: [
|
|
11
|
+
{
|
|
12
|
+
id: "streets",
|
|
13
|
+
iconId: MAP_ICONS.MAP_SOURCE_LAYER_STREETS,
|
|
14
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_TILE_STREETS,
|
|
15
|
+
urlTemplate: BING_URL_TEMPLATE,
|
|
16
|
+
options: {
|
|
17
|
+
minZoom: 0,
|
|
18
|
+
maxZoom: 21,
|
|
19
|
+
subdomains: BING_SUB_DOMAINS,
|
|
20
|
+
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>',
|
|
21
|
+
tms: true
|
|
22
|
+
},
|
|
23
|
+
hasTrafficLayer: false,
|
|
24
|
+
hasTransitLayer: false,
|
|
25
|
+
hasBicyclingLayer: false,
|
|
26
|
+
roadSelectedOptions: {
|
|
27
|
+
trafficLayer: false,
|
|
28
|
+
transitLayer: false,
|
|
29
|
+
bicyclingLayer: false
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* TODO: Documentar
|
|
33
|
+
*/
|
|
34
|
+
getTileUrl: (tileCoord) => {
|
|
35
|
+
const i = Math.abs(tileCoord.x + tileCoord.y) % BING_SUB_DOMAINS.length;
|
|
36
|
+
const z = tileCoord.z;
|
|
37
|
+
const x = tileCoord.x;
|
|
38
|
+
const y = tileCoord.y;
|
|
39
|
+
const gk = coordsToQuadKey(x, y, z);
|
|
40
|
+
return BING_URL_TEMPLATE.replace("|QK|", gk).replace("{s}", BING_SUB_DOMAINS[i]);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
TILE_LAYER_BING as T
|
|
47
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { M as MAP_DICCTIONARY } from "../../../../../../../dictionary.js";
|
|
2
|
+
import { M as MAP_ICONS } from "../../../../../../../icons.js";
|
|
3
|
+
const TILE_SORCE_GOOGLE = {
|
|
4
|
+
id: "google",
|
|
5
|
+
imageId: MAP_ICONS.MAP_SOURCE_GOOGLE,
|
|
6
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_TILE_GOOGLE,
|
|
7
|
+
// urlTemplate:
|
|
8
|
+
// 'http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&key=AIzaSyDfhTK9us4kuqPTeFIm89yB3uvk2_G5AMw',
|
|
9
|
+
// hasBicyclingLayer: true,
|
|
10
|
+
// hasTrafficLayer: true,
|
|
11
|
+
// hasTransitLayer: true,
|
|
12
|
+
layers: [
|
|
13
|
+
{
|
|
14
|
+
id: "streets",
|
|
15
|
+
type: "roadmap",
|
|
16
|
+
iconId: MAP_ICONS.MAP_SOURCE_LAYER_STREETS,
|
|
17
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_TILE_STREETS,
|
|
18
|
+
urlTemplate: "https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}",
|
|
19
|
+
options: {
|
|
20
|
+
minZoom: 0,
|
|
21
|
+
maxZoom: 22,
|
|
22
|
+
subdomains: ["mt0", "mt1", "mt2", "mt3"],
|
|
23
|
+
// attribution: 'Map data © Google',
|
|
24
|
+
tms: false
|
|
25
|
+
},
|
|
26
|
+
hasTrafficLayer: true,
|
|
27
|
+
hasTransitLayer: true,
|
|
28
|
+
hasBicyclingLayer: true,
|
|
29
|
+
roadSelectedOptions: {
|
|
30
|
+
trafficLayer: false,
|
|
31
|
+
transitLayer: false,
|
|
32
|
+
bicyclingLayer: false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "satellite",
|
|
37
|
+
type: "satellite",
|
|
38
|
+
iconId: MAP_ICONS.MAP_SOURCE_LAYER_SATELLITE,
|
|
39
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_TILE_SATELLITE,
|
|
40
|
+
urlTemplate: "https://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
|
|
41
|
+
options: {
|
|
42
|
+
minZoom: 0,
|
|
43
|
+
maxZoom: 22,
|
|
44
|
+
subdomains: ["mt0", "mt1", "mt2", "mt3"],
|
|
45
|
+
// attribution: 'Map data © Google',
|
|
46
|
+
tms: false
|
|
47
|
+
},
|
|
48
|
+
hasTrafficLayer: false,
|
|
49
|
+
hasTransitLayer: false,
|
|
50
|
+
hasBicyclingLayer: false,
|
|
51
|
+
roadSelectedOptions: {
|
|
52
|
+
trafficLayer: false,
|
|
53
|
+
transitLayer: false,
|
|
54
|
+
bicyclingLayer: false
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "hybrid",
|
|
59
|
+
type: "hybrid",
|
|
60
|
+
iconId: MAP_ICONS.MAP_SOURCE_LAYER_HYBRID,
|
|
61
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_TILE_HYBRID,
|
|
62
|
+
urlTemplate: "https://{s}.google.com/vt/lyrs=y&x={x}&y={y}&z={z}",
|
|
63
|
+
options: {
|
|
64
|
+
minZoom: 0,
|
|
65
|
+
maxZoom: 22,
|
|
66
|
+
subdomains: ["mt0", "mt1", "mt2", "mt3"],
|
|
67
|
+
// attribution: 'Map data © Google',
|
|
68
|
+
tms: false
|
|
69
|
+
},
|
|
70
|
+
hasTrafficLayer: true,
|
|
71
|
+
hasTransitLayer: true,
|
|
72
|
+
hasBicyclingLayer: true,
|
|
73
|
+
roadSelectedOptions: {
|
|
74
|
+
trafficLayer: false,
|
|
75
|
+
transitLayer: false,
|
|
76
|
+
bicyclingLayer: false
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "terrain",
|
|
81
|
+
type: "terrain",
|
|
82
|
+
iconId: MAP_ICONS.MAP_SOURCE_LAYER_TERRAIN,
|
|
83
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_TILE_TERRAIN,
|
|
84
|
+
urlTemplate: "https://{s}.google.com/vt/lyrs=p&x={x}&y={y}&z={z}",
|
|
85
|
+
options: {
|
|
86
|
+
minZoom: 3,
|
|
87
|
+
maxZoom: 22,
|
|
88
|
+
subdomains: ["mt0", "mt1", "mt2", "mt3"],
|
|
89
|
+
// attribution: 'Map data © Google',
|
|
90
|
+
tms: false
|
|
91
|
+
},
|
|
92
|
+
hasTrafficLayer: false,
|
|
93
|
+
hasTransitLayer: false,
|
|
94
|
+
hasBicyclingLayer: false,
|
|
95
|
+
roadSelectedOptions: {
|
|
96
|
+
trafficLayer: false,
|
|
97
|
+
transitLayer: false,
|
|
98
|
+
bicyclingLayer: false
|
|
99
|
+
}
|
|
100
|
+
// subLayers: [
|
|
101
|
+
// ],
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
TILE_SORCE_GOOGLE as T
|
|
107
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { M as MAP_DICCTIONARY } from "../../../../../../../dictionary.js";
|
|
2
|
+
import { M as MAP_ICONS } from "../../../../../../../icons.js";
|
|
3
|
+
const TILE_LAYER_OTHERS = {
|
|
4
|
+
id: "others",
|
|
5
|
+
imageId: MAP_ICONS.MAP_SOURCE_OTHERS,
|
|
6
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_TILE_OTHERS,
|
|
7
|
+
layers: [
|
|
8
|
+
{
|
|
9
|
+
id: "other_osm",
|
|
10
|
+
iconId: MAP_ICONS.MAP_SOURCE_LAYER_STREETS,
|
|
11
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_TILE_OSM,
|
|
12
|
+
urlTemplate: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
13
|
+
options: {
|
|
14
|
+
minZoom: 0,
|
|
15
|
+
maxZoom: 19,
|
|
16
|
+
subdomains: ["a", "b", "c"],
|
|
17
|
+
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>',
|
|
18
|
+
tms: false
|
|
19
|
+
},
|
|
20
|
+
hasTrafficLayer: false,
|
|
21
|
+
hasTransitLayer: false,
|
|
22
|
+
hasBicyclingLayer: false,
|
|
23
|
+
roadSelectedOptions: {
|
|
24
|
+
trafficLayer: false,
|
|
25
|
+
transitLayer: false,
|
|
26
|
+
bicyclingLayer: false
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
TILE_LAYER_OTHERS as T
|
|
33
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MapSourceLayerCardProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* MapSourceCard componente para mostrar una fuente de mapa
|
|
4
|
+
* Si tiene opciones de carretera, se muestran los botones de las opciones de carretera
|
|
5
|
+
*/
|
|
6
|
+
export declare function MapSourceCard(props: MapSourceLayerCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Card, Typography, ToggleIconButton } from "@m4l/components";
|
|
3
|
+
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
4
|
+
import { c as GpsMapSourceToolCardIconTitleContainerStyled, d as GpsMapSourceToolCardIconStyled, e as GpsMapSourceToolCardRoadOptionsContainerStyled } from "../slots/styled.js";
|
|
5
|
+
import { M as MAP_ICONS } from "../../../../../../../icons.js";
|
|
6
|
+
import { M as MAP_DICCTIONARY } from "../../../../../../../dictionary.js";
|
|
7
|
+
function MapSourceCard(props) {
|
|
8
|
+
const {
|
|
9
|
+
mapSourceId,
|
|
10
|
+
id,
|
|
11
|
+
hasBicyclingLayer,
|
|
12
|
+
hasTrafficLayer,
|
|
13
|
+
hasTransitLayer,
|
|
14
|
+
selected,
|
|
15
|
+
roadSelectedOptions,
|
|
16
|
+
iconId,
|
|
17
|
+
dictionaryId,
|
|
18
|
+
label,
|
|
19
|
+
setCurrentMapSourceLayer,
|
|
20
|
+
setMapSourceLayerRoadOptions
|
|
21
|
+
} = props;
|
|
22
|
+
const { getLabel } = useModuleDictionary();
|
|
23
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
24
|
+
const hasSomeRoadOptions = hasTrafficLayer || hasBicyclingLayer || hasTransitLayer;
|
|
25
|
+
return /* @__PURE__ */ jsxs(Card, { direction: "row", selected, onClick: () => {
|
|
26
|
+
setCurrentMapSourceLayer(mapSourceId, id);
|
|
27
|
+
}, padding: "compact", children: [
|
|
28
|
+
/* @__PURE__ */ jsxs(GpsMapSourceToolCardIconTitleContainerStyled, { children: [
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
GpsMapSourceToolCardIconStyled,
|
|
31
|
+
{
|
|
32
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${iconId}`,
|
|
33
|
+
color: selected ? "primary.semanticText" : "text.secondary"
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
Typography,
|
|
38
|
+
{
|
|
39
|
+
variant: "caption",
|
|
40
|
+
color: selected ? "primary.semanticText" : "text.secondary",
|
|
41
|
+
ellipsis: true,
|
|
42
|
+
children: label || getLabel(dictionaryId)
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] }),
|
|
46
|
+
hasSomeRoadOptions && /* @__PURE__ */ jsxs(GpsMapSourceToolCardRoadOptionsContainerStyled, { children: [
|
|
47
|
+
hasTrafficLayer && /* @__PURE__ */ jsx(
|
|
48
|
+
ToggleIconButton,
|
|
49
|
+
{
|
|
50
|
+
disabled: !selected,
|
|
51
|
+
isToggled: roadSelectedOptions?.trafficLayer,
|
|
52
|
+
onToggle: () => {
|
|
53
|
+
setMapSourceLayerRoadOptions(mapSourceId, id, { trafficLayer: !roadSelectedOptions?.trafficLayer });
|
|
54
|
+
},
|
|
55
|
+
tooltip: getLabel(MAP_DICCTIONARY.LABEL_MAP_SOURCE_ROAD_TRAFFIC),
|
|
56
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_SOURCE_LAYER_ROAD_OPTION_TRAFFIC}`
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
hasBicyclingLayer && /* @__PURE__ */ jsx(
|
|
60
|
+
ToggleIconButton,
|
|
61
|
+
{
|
|
62
|
+
disabled: !selected,
|
|
63
|
+
isToggled: roadSelectedOptions?.bicyclingLayer,
|
|
64
|
+
onToggle: () => {
|
|
65
|
+
setMapSourceLayerRoadOptions(mapSourceId, id, { bicyclingLayer: !roadSelectedOptions?.bicyclingLayer });
|
|
66
|
+
},
|
|
67
|
+
tooltip: getLabel(MAP_DICCTIONARY.LABEL_MAP_SOURCE_ROAD_BICYCLING),
|
|
68
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_SOURCE_LAYER_ROAD_OPTION_BICYCLING}`
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
hasTransitLayer && /* @__PURE__ */ jsx(
|
|
72
|
+
ToggleIconButton,
|
|
73
|
+
{
|
|
74
|
+
disabled: !selected,
|
|
75
|
+
isToggled: roadSelectedOptions?.transitLayer,
|
|
76
|
+
tooltip: getLabel(MAP_DICCTIONARY.LABEL_MAP_SOURCE_ROAD_TRANSIT),
|
|
77
|
+
onToggle: () => {
|
|
78
|
+
setMapSourceLayerRoadOptions(mapSourceId, id, { transitLayer: !roadSelectedOptions?.transitLayer });
|
|
79
|
+
},
|
|
80
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_SOURCE_LAYER_ROAD_OPTION_TRANSIT}`
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] })
|
|
84
|
+
] });
|
|
85
|
+
}
|
|
86
|
+
export {
|
|
87
|
+
MapSourceCard as M
|
|
88
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MapSourceLayerRoadOptionsType, MapTileSourceId, MapTileSourceLayer, MapTileSourceLayerId } from '../../../../../../../contexts/MapContext/types';
|
|
2
|
+
export interface MapSourceLayerCardProps extends MapTileSourceLayer {
|
|
3
|
+
mapSourceId: MapTileSourceId;
|
|
4
|
+
selected: boolean;
|
|
5
|
+
setCurrentMapSourceLayer: (mapSourceId: MapTileSourceId, mapSourceLayerId: MapTileSourceLayerId) => void;
|
|
6
|
+
setMapSourceLayerRoadOptions: (mapSourceId: MapTileSourceId, mapSourceLayerId: MapTileSourceLayerId, options: Partial<MapSourceLayerRoadOptionsType>) => void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Theme } from '@mui/material/styles';
|
|
2
|
+
import { MAP_COMPONET_KEY_COMPONENT } from '../../../../../../constants';
|
|
3
|
+
import { M4LOverridesStyleRules } from '@m4l/components';
|
|
4
|
+
import { MapSlotsSourcesTool } from './slots/slots';
|
|
5
|
+
export type MapSourcesToolOwnerState = {
|
|
6
|
+
isLast?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type MapSourcesToolSlotsType = keyof typeof MapSlotsSourcesTool;
|
|
9
|
+
export type MapSourcesToolStyles = M4LOverridesStyleRules<MapSourcesToolSlotsType, typeof MAP_COMPONET_KEY_COMPONENT, Theme>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { RHFormProvider } from "@m4l/components";
|
|
3
|
+
import { M as MyActions } from "./subcomponents/MyActions/index.js";
|
|
4
|
+
import { u as useValidation } from "./hooks/useValidation.js";
|
|
5
|
+
import { I as INITIAL_FORM_VALUES } from "./constants.js";
|
|
6
|
+
import { M as MeasureData } from "./subcomponents/MeasureData/index.js";
|
|
7
|
+
import { G as GpsMapMeasureToolRootStyled } from "./slots/styled.js";
|
|
8
|
+
function MeasureTool() {
|
|
9
|
+
const finalInitalValues = {
|
|
10
|
+
...INITIAL_FORM_VALUES
|
|
11
|
+
};
|
|
12
|
+
const { validationSchema } = useValidation();
|
|
13
|
+
const onSubmit = () => {
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
RHFormProvider,
|
|
17
|
+
{
|
|
18
|
+
statusLoad: INITIAL_FORM_VALUES.statusLoad,
|
|
19
|
+
onSubmit,
|
|
20
|
+
values: finalInitalValues,
|
|
21
|
+
validationSchema,
|
|
22
|
+
children: /* @__PURE__ */ jsxs(GpsMapMeasureToolRootStyled, { children: [
|
|
23
|
+
/* @__PURE__ */ jsx(MeasureData, {}),
|
|
24
|
+
/* @__PURE__ */ jsx(MyActions, {})
|
|
25
|
+
] })
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
MeasureTool as M
|
|
31
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MapMeasureToolStyles } from './types';
|
|
2
|
+
import { Theme } from '@mui/material/styles';
|
|
3
|
+
export declare const mapMeasureToolStyles: MapMeasureToolStyles;
|
|
4
|
+
/**
|
|
5
|
+
* getMapContainerMeasureToolStyles: Función que retorna los estilos del componente MeasureTool que deben ser aplicados al contenedor del mapa
|
|
6
|
+
*/
|
|
7
|
+
export declare const getMapContainerMeasureToolStyles: (theme: Theme) => React.CSSProperties;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { m as mapClasses } from "../../../../../../classes/index.js";
|
|
2
|
+
import { S as STYLE_MEASURE_OPTIONS } from "./constants.js";
|
|
3
|
+
import { getTypographyStyles } from "@m4l/components";
|
|
4
|
+
import { BASE_COLORS, BASE_OPACITY_COLORS } from "@m4l/styles";
|
|
5
|
+
const mapMeasureToolStyles = {
|
|
6
|
+
/**
|
|
7
|
+
* Estilos del componente MapSourcesTool
|
|
8
|
+
*/
|
|
9
|
+
mapMeasureToolRoot: ({ theme }) => ({
|
|
10
|
+
display: "flex",
|
|
11
|
+
flexDirection: "column",
|
|
12
|
+
gap: theme.vars.size.baseSpacings.sp3,
|
|
13
|
+
position: "absolute",
|
|
14
|
+
left: "-16px",
|
|
15
|
+
top: "-16px",
|
|
16
|
+
right: "-16px",
|
|
17
|
+
bottom: "-16px",
|
|
18
|
+
overflowX: "hidden",
|
|
19
|
+
overflowY: "auto",
|
|
20
|
+
margin: theme.vars.size.baseSpacings.sp3
|
|
21
|
+
}),
|
|
22
|
+
/**
|
|
23
|
+
* Estilos del componente MapMeasureToolDataContainer
|
|
24
|
+
*/
|
|
25
|
+
mapMeasureToolDataContainer: ({ theme }) => ({
|
|
26
|
+
display: "flex",
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
gap: theme.vars.size.baseSpacings.sp4
|
|
29
|
+
}),
|
|
30
|
+
/**
|
|
31
|
+
* Estilos del componente MapMeasureToolAutocomplete
|
|
32
|
+
*/
|
|
33
|
+
mapMeasureToolRHFAutocompleteAsync: () => ({
|
|
34
|
+
flexGrow: 1,
|
|
35
|
+
overflow: "hidden"
|
|
36
|
+
}),
|
|
37
|
+
/**
|
|
38
|
+
* Estilos del componente MapMeasureToolValueContainer
|
|
39
|
+
*/
|
|
40
|
+
mapMeasureToolValueContainer: ({ theme }) => ({
|
|
41
|
+
alignSelf: "center",
|
|
42
|
+
display: "flex",
|
|
43
|
+
width: "100%",
|
|
44
|
+
justifyContent: "center",
|
|
45
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
46
|
+
padding: theme.vars.size.baseSpacings.sp2,
|
|
47
|
+
backgroundColor: theme.vars.palette.primary.opacity,
|
|
48
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
49
|
+
alignItems: "flex-end"
|
|
50
|
+
}),
|
|
51
|
+
/**
|
|
52
|
+
* Estilos del componente MapMeasureToolValue
|
|
53
|
+
*/
|
|
54
|
+
mapMeasureToolValue: ({ theme }) => ({
|
|
55
|
+
color: theme.vars.palette.primary.semanticText
|
|
56
|
+
}),
|
|
57
|
+
/**
|
|
58
|
+
* Estilos del componente MapMeasureToolValueUnit
|
|
59
|
+
*/
|
|
60
|
+
mapMeasureToolValueUnit: ({ theme }) => ({
|
|
61
|
+
paddingBottom: "3px",
|
|
62
|
+
color: `${theme.vars.palette.primary.semanticText} !important`
|
|
63
|
+
})
|
|
64
|
+
};
|
|
65
|
+
const getMapContainerMeasureToolStyles = (theme) => ({
|
|
66
|
+
[`& .${mapClasses.measureMarkerRoot}`]: {
|
|
67
|
+
"--color": "green"
|
|
68
|
+
},
|
|
69
|
+
[`& .${mapClasses.measureMarkerContainer}`]: {
|
|
70
|
+
position: "relative",
|
|
71
|
+
cursor: "pointer"
|
|
72
|
+
},
|
|
73
|
+
[`& .${mapClasses.measureMarkerSvgRoot}`]: {
|
|
74
|
+
overflow: "hidden",
|
|
75
|
+
stroke: theme.vars.palette.primary.light,
|
|
76
|
+
filter: "drop-shadow(0px 2px 3px rgba(0, 0, 0, .2))",
|
|
77
|
+
strokeWidth: "2px",
|
|
78
|
+
width: `${STYLE_MEASURE_OPTIONS.markerWidth}px`,
|
|
79
|
+
height: `${STYLE_MEASURE_OPTIONS.markerHeight}px`
|
|
80
|
+
},
|
|
81
|
+
[`& .${mapClasses.measureMarkerContainerRhomb}`]: {
|
|
82
|
+
position: "absolute",
|
|
83
|
+
filter: "drop-shadow(0px 0px 3px rgba(0,0,0,.4))",
|
|
84
|
+
width: "31px",
|
|
85
|
+
height: "31px",
|
|
86
|
+
borderRadius: "50% 50% 50% 0",
|
|
87
|
+
border: "4px solid var(--color)",
|
|
88
|
+
backgroundColor: "var(--color)",
|
|
89
|
+
transform: "rotate(-45deg)"
|
|
90
|
+
},
|
|
91
|
+
[`& .${mapClasses.measureMarkerContainerSlot}`]: {
|
|
92
|
+
position: "absolute",
|
|
93
|
+
background: "#fff",
|
|
94
|
+
borderRadius: "50%",
|
|
95
|
+
overflow: "hidden",
|
|
96
|
+
top: "5px",
|
|
97
|
+
left: "3px",
|
|
98
|
+
width: "26px",
|
|
99
|
+
height: "24px"
|
|
100
|
+
},
|
|
101
|
+
[`& .${mapClasses.measureMarkerContainerSlotNumber}`]: {
|
|
102
|
+
fontSize: "14px",
|
|
103
|
+
fontWeight: "600",
|
|
104
|
+
textAlign: "center",
|
|
105
|
+
marginTop: "1px",
|
|
106
|
+
color: theme.vars.palette.primary.main
|
|
107
|
+
},
|
|
108
|
+
//Marker Point Label
|
|
109
|
+
[`& .${mapClasses.measureLabelMarkerRoot}`]: {
|
|
110
|
+
"--color": BASE_OPACITY_COLORS.marble[60]
|
|
111
|
+
},
|
|
112
|
+
[`& .${mapClasses.measureLabelMarkerContainer}`]: {
|
|
113
|
+
border: `2px solid ${BASE_COLORS.marbleLight[10]}`,
|
|
114
|
+
backdropFilter: "blur(4px)",
|
|
115
|
+
boxShadow: "0 0 6px 0 rgba(0, 0, 0, 0.20)",
|
|
116
|
+
backgroundColor: "var(--color)",
|
|
117
|
+
padding: ` ${theme.vars.size.baseSpacings.sp1} ${theme.vars.size.baseSpacings.sp1} ${theme.vars.size.baseSpacings["sp1"]} ${theme.vars.size.baseSpacings.sp1} `,
|
|
118
|
+
borderRadius: theme.vars.size.borderRadius["r1-5"],
|
|
119
|
+
color: "#fff",
|
|
120
|
+
width: "fit-content",
|
|
121
|
+
overflow: "hidden",
|
|
122
|
+
// width: '80px',
|
|
123
|
+
maxWidth: "80px"
|
|
124
|
+
},
|
|
125
|
+
[`& .${mapClasses.measureLabelMarkerDistance}`]: {
|
|
126
|
+
color: theme.vars.palette.text.primary,
|
|
127
|
+
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
128
|
+
fontFamily: "Jura",
|
|
129
|
+
...getTypographyStyles(
|
|
130
|
+
theme.generalSettings.isMobile,
|
|
131
|
+
"medium",
|
|
132
|
+
"subtitleDens"
|
|
133
|
+
),
|
|
134
|
+
overflow: "hidden",
|
|
135
|
+
textOverflow: "ellipsis",
|
|
136
|
+
whiteSpace: "nowrap"
|
|
137
|
+
},
|
|
138
|
+
[`& .${mapClasses.measureLabelMarkerRemove}`]: {
|
|
139
|
+
color: theme.vars.palette.text.secondary,
|
|
140
|
+
...getTypographyStyles(
|
|
141
|
+
theme.generalSettings.isMobile,
|
|
142
|
+
"medium",
|
|
143
|
+
"body"
|
|
144
|
+
),
|
|
145
|
+
textDecoration: "underline",
|
|
146
|
+
overflow: "hidden",
|
|
147
|
+
textOverflow: "ellipsis",
|
|
148
|
+
whiteSpace: "nowrap"
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
export {
|
|
152
|
+
getMapContainerMeasureToolStyles as g,
|
|
153
|
+
mapMeasureToolStyles as m
|
|
154
|
+
};
|
|
@@ -28,3 +28,28 @@ export declare const STYLE_MEASURE_OPTIONS: {
|
|
|
28
28
|
labelMarkerAnchorY: number;
|
|
29
29
|
labelMarkerAnchorX: number;
|
|
30
30
|
};
|
|
31
|
+
export declare const MAGNITUDE_FACTOR_ITEMS: ({
|
|
32
|
+
id: string;
|
|
33
|
+
dictionaryLabelId: "map.label_measure_unit_kilometers";
|
|
34
|
+
dictionarySymbolId: "map.label_measure_unit_kilometers_symbol";
|
|
35
|
+
factor_x0: number;
|
|
36
|
+
factor_x1: number;
|
|
37
|
+
factor_x2: number;
|
|
38
|
+
decimalDigits: number;
|
|
39
|
+
} | {
|
|
40
|
+
id: string;
|
|
41
|
+
dictionaryLabelId: "map.label_measure_unit_meters";
|
|
42
|
+
dictionarySymbolId: "map.label_measure_unit_meters_symbol";
|
|
43
|
+
factor_x0: number;
|
|
44
|
+
factor_x1: number;
|
|
45
|
+
factor_x2: number;
|
|
46
|
+
decimalDigits: number;
|
|
47
|
+
} | {
|
|
48
|
+
id: string;
|
|
49
|
+
dictionaryLabelId: "map.label_measure_unit_miles";
|
|
50
|
+
dictionarySymbolId: "map.label_measure_unit_miles_symbol";
|
|
51
|
+
factor_x0: number;
|
|
52
|
+
factor_x1: number;
|
|
53
|
+
factor_x2: number;
|
|
54
|
+
decimalDigits: number;
|
|
55
|
+
})[];
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
+
import { M as MAP_DICCTIONARY } from "../../../../../../dictionary.js";
|
|
1
2
|
const INITIAL_FORM_VALUES = {
|
|
2
3
|
/** General Data */
|
|
3
4
|
statusLoad: "ready",
|
|
4
5
|
reInits: 0,
|
|
5
6
|
value: "0",
|
|
6
7
|
measureTypeId: "distance",
|
|
7
|
-
|
|
8
|
-
id: "m_kilometers",
|
|
9
|
-
name: "Kilometers",
|
|
10
|
-
symbol: "k",
|
|
11
|
-
factor_x0: 0,
|
|
12
|
-
factor_x1: 1,
|
|
13
|
-
factor_x2: 0
|
|
14
|
-
},
|
|
8
|
+
magnitude: "k",
|
|
15
9
|
unitArea: null,
|
|
16
10
|
/** Config Data */
|
|
17
11
|
/** de Apoyo */
|
|
@@ -19,16 +13,45 @@ const INITIAL_FORM_VALUES = {
|
|
|
19
13
|
// geometry: null ,
|
|
20
14
|
};
|
|
21
15
|
const STYLE_MEASURE_OPTIONS = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
markerWidth: 26,
|
|
16
|
+
strokeLineWeight: 4,
|
|
17
|
+
markerHeight: 38,
|
|
18
|
+
markerWidth: 32,
|
|
26
19
|
labelMarkerHeight: 0,
|
|
27
20
|
labelMarkerWidth: 0,
|
|
28
|
-
labelMarkerAnchorY:
|
|
29
|
-
labelMarkerAnchorX:
|
|
21
|
+
labelMarkerAnchorY: 25,
|
|
22
|
+
labelMarkerAnchorX: -23
|
|
30
23
|
};
|
|
24
|
+
const MAGNITUDE_FACTOR_ITEMS = [
|
|
25
|
+
{
|
|
26
|
+
id: "k",
|
|
27
|
+
dictionaryLabelId: MAP_DICCTIONARY.LABEL_MEASURE_UNIT_KILOMETERS,
|
|
28
|
+
dictionarySymbolId: MAP_DICCTIONARY.LABEL_MEASURE_UNIT_KILOMETERS_SYMBOL,
|
|
29
|
+
factor_x0: 0,
|
|
30
|
+
factor_x1: 1,
|
|
31
|
+
factor_x2: 0,
|
|
32
|
+
decimalDigits: 2
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: "m",
|
|
36
|
+
dictionaryLabelId: MAP_DICCTIONARY.LABEL_MEASURE_UNIT_METERS,
|
|
37
|
+
dictionarySymbolId: MAP_DICCTIONARY.LABEL_MEASURE_UNIT_METERS_SYMBOL,
|
|
38
|
+
factor_x0: 0,
|
|
39
|
+
factor_x1: 1e3,
|
|
40
|
+
factor_x2: 0,
|
|
41
|
+
decimalDigits: 0
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "mi",
|
|
45
|
+
dictionaryLabelId: MAP_DICCTIONARY.LABEL_MEASURE_UNIT_MILES,
|
|
46
|
+
dictionarySymbolId: MAP_DICCTIONARY.LABEL_MEASURE_UNIT_MILES_SYMBOL,
|
|
47
|
+
factor_x0: 0,
|
|
48
|
+
factor_x1: 0.621371,
|
|
49
|
+
factor_x2: 0,
|
|
50
|
+
decimalDigits: 2
|
|
51
|
+
}
|
|
52
|
+
];
|
|
31
53
|
export {
|
|
32
54
|
INITIAL_FORM_VALUES as I,
|
|
55
|
+
MAGNITUDE_FACTOR_ITEMS as M,
|
|
33
56
|
STYLE_MEASURE_OPTIONS as S
|
|
34
57
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { default as L } from 'leaflet';
|
|
2
2
|
import { GetLabelType } from '@m4l/core';
|
|
3
|
+
/**
|
|
4
|
+
* getMarkerPointIcon: Función que retorna el icono/div que representa un punto de medición
|
|
5
|
+
*/
|
|
6
|
+
export declare const getMarkerPointIcon2: (position: number) => L.DivIcon;
|
|
3
7
|
/**
|
|
4
8
|
* getMarkerPointIcon: Función que retorna el icono/div que representa un punto de medición
|
|
5
9
|
*/
|
|
@@ -9,3 +13,28 @@ export declare const getMarkerPointIcon: (position: number) => L.DivIcon;
|
|
|
9
13
|
* entre puntos, y el link para borrar el punto
|
|
10
14
|
*/
|
|
11
15
|
export declare const getMarkerPointLabel: (distance: string | undefined, getLabel: GetLabelType) => L.DivIcon;
|
|
16
|
+
export declare const getMagnitudeFactor: (magnitude: string) => {
|
|
17
|
+
id: string;
|
|
18
|
+
dictionaryLabelId: "map.label_measure_unit_kilometers";
|
|
19
|
+
dictionarySymbolId: "map.label_measure_unit_kilometers_symbol";
|
|
20
|
+
factor_x0: number;
|
|
21
|
+
factor_x1: number;
|
|
22
|
+
factor_x2: number;
|
|
23
|
+
decimalDigits: number;
|
|
24
|
+
} | {
|
|
25
|
+
id: string;
|
|
26
|
+
dictionaryLabelId: "map.label_measure_unit_meters";
|
|
27
|
+
dictionarySymbolId: "map.label_measure_unit_meters_symbol";
|
|
28
|
+
factor_x0: number;
|
|
29
|
+
factor_x1: number;
|
|
30
|
+
factor_x2: number;
|
|
31
|
+
decimalDigits: number;
|
|
32
|
+
} | {
|
|
33
|
+
id: string;
|
|
34
|
+
dictionaryLabelId: "map.label_measure_unit_miles";
|
|
35
|
+
dictionarySymbolId: "map.label_measure_unit_miles_symbol";
|
|
36
|
+
factor_x0: number;
|
|
37
|
+
factor_x1: number;
|
|
38
|
+
factor_x2: number;
|
|
39
|
+
decimalDigits: number;
|
|
40
|
+
};
|