@m4l/gclick 0.1.0 → 0.2.0-JAEBeta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/deviceData.d.ts +12 -9
- package/@types/general.d.ts +1 -1
- package/@types/index.d.ts +2 -2
- package/@types/types.d.ts +25 -1
- package/@types/vpts.d.ts +6 -3
- package/components/Device/Device.d.ts +6 -0
- package/components/Device/Device.js +32 -0
- package/components/Device/Device.styles.d.ts +2 -0
- package/components/Device/Device.styles.js +95 -0
- package/components/Device/constants.d.ts +14 -0
- package/components/Device/constants.js +4 -0
- package/components/Device/dictionary.d.ts +14 -0
- package/components/Device/dictionary.js +19 -0
- package/components/{DeviceStatus/hooks/helper.d.ts → Device/helpers/helperDeviceStatus.d.ts} +1 -1
- package/components/{DeviceStatus/hooks/helper.js → Device/helpers/helperDeviceStatus.js} +5 -5
- package/components/Device/helpers.d.ts +18 -0
- package/components/Device/helpers.js +27 -0
- package/components/Device/hooks/constants.d.ts +16 -0
- package/components/{DeviceStatus → Device}/hooks/constants.js +13 -15
- package/components/Device/hooks/useDevice.d.ts +12 -0
- package/components/Device/hooks/useDevice.js +23 -0
- package/components/{DeviceStatus → Device}/hooks/useDeviceStatus.d.ts +2 -2
- package/components/{DeviceStatus → Device}/hooks/useDeviceStatus.js +4 -4
- package/components/Device/icons.d.ts +11 -0
- package/components/{DeviceStatus → Device}/icons.js +2 -2
- package/components/Device/index.d.ts +6 -0
- package/components/Device/slots/DeviceSlots.d.ts +15 -0
- package/components/Device/slots/DeviceSlots.js +32 -0
- package/components/Device/slots/slots.d.ts +7 -0
- package/components/Device/slots/slots.js +11 -0
- package/components/Device/types.d.ts +30 -0
- package/components/DeviceLabel/DeviceLabel.js +1 -1
- package/components/DeviceLabel/slots/DeviceLabelSlots.d.ts +9 -3
- package/components/DeviceLabel/types.d.ts +2 -2
- package/components/DeviceStatus/DeviceStatus.js +3 -15
- package/components/DeviceStatus/DeviceStatus.styles.js +1 -13
- package/components/DeviceStatus/constants.js +1 -4
- package/components/DeviceStatus/dictionary.d.ts +10 -10
- package/components/DeviceStatus/dictionary.js +1 -12
- package/components/DeviceStatus/icons.d.ts +1 -1
- package/components/DeviceStatus/index.d.ts +3 -2
- package/components/DeviceStatus/slots/DeviceStatusSlots.js +1 -11
- package/components/DeviceStatus/slots/slots.js +1 -7
- package/components/index.d.ts +1 -1
- package/components/indicators/IndicatorBattery/IndicatorBattery.styles.js +2 -2
- package/components/indicators/IndicatorBattery/dictionary.js +5 -1
- package/components/indicators/IndicatorBattery/index.d.ts +1 -0
- package/components/indicators/IndicatorCSQ/IndicatorCSQ.js +7 -5
- package/components/indicators/IndicatorCSQ/constants.d.ts +2 -2
- package/components/indicators/IndicatorCSQ/constants.js +4 -3
- package/components/indicators/IndicatorCSQ/dictionary.d.ts +5 -2
- package/components/indicators/IndicatorCSQ/dictionary.js +15 -12
- package/components/indicators/IndicatorCSQ/helpers/getQualityLabel/getQualityLabel.d.ts +22 -2
- package/components/indicators/IndicatorCSQ/helpers/getQualityLabel/getQualityLabel.js +15 -29
- package/components/indicators/IndicatorCSQ/index.d.ts +3 -3
- package/components/indicators/IndicatorCSQ/slots/IndicatorCSQSlots.js +6 -6
- package/components/indicators/IndicatorCSQ/types.d.ts +6 -2
- package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.d.ts +5 -0
- package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.js +15 -0
- package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.styles.d.ts +2 -0
- package/components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.styles.js +41 -0
- package/components/indicators/IndicatorValueAndMagnitude/constants.d.ts +2 -0
- package/components/indicators/IndicatorValueAndMagnitude/constants.js +7 -0
- package/components/indicators/IndicatorValueAndMagnitude/index.d.ts +1 -0
- package/components/indicators/IndicatorValueAndMagnitude/index.js +1 -0
- package/components/indicators/IndicatorValueAndMagnitude/slots/slots.d.ts +6 -0
- package/components/indicators/IndicatorValueAndMagnitude/slots/slots.js +10 -0
- package/components/indicators/IndicatorValueAndMagnitude/slots/styled.d.ts +12 -0
- package/components/indicators/IndicatorValueAndMagnitude/slots/styled.js +27 -0
- package/components/indicators/IndicatorValueAndMagnitude/types.d.ts +14 -0
- package/components/indicators/IndicatorValueStatus/IndicatorValueStatus.js +25 -0
- package/components/indicators/IndicatorValueStatus/IndicatorValueStatus.styles.js +76 -0
- package/components/indicators/IndicatorValueStatus/constants.js +8 -0
- package/components/indicators/IndicatorValueStatus/index.js +1 -0
- package/components/indicators/IndicatorValueStatus/slots/IndicatorValueStatusEnum.js +11 -0
- package/components/indicators/IndicatorValueStatus/slots/IndicatorValueStatusSlots.js +32 -0
- package/components/indicators/IndicatorValueStatus/types.d.ts +4 -0
- package/components/indicators/index.d.ts +2 -0
- package/components/maps/components/GpsMap/GpsMap.js +26 -9
- package/components/maps/components/GpsMap/GpsMap.styles.js +81 -93
- package/components/maps/components/GpsMap/Leaflet.styles.d.ts +6 -0
- package/components/maps/components/GpsMap/Leaflet.styles.js +535 -0
- package/components/maps/components/GpsMap/classes/index.d.ts +1 -1
- package/components/maps/components/GpsMap/classes/index.js +6 -76
- package/components/maps/components/GpsMap/classes/types.d.ts +5 -16
- package/components/maps/components/GpsMap/constants.d.ts +9 -3
- package/components/maps/components/GpsMap/constants.js +25 -13
- package/components/maps/components/GpsMap/contexts/MapContext/MapContext.js +4 -26
- package/components/maps/components/GpsMap/contexts/MapContext/index.d.ts +1 -1
- package/components/maps/components/GpsMap/contexts/MapContext/store.js +50 -75
- package/components/maps/components/GpsMap/contexts/MapContext/types.d.ts +98 -87
- package/components/maps/components/GpsMap/dictionary.d.ts +19 -8
- package/components/maps/components/GpsMap/dictionary.js +30 -17
- package/components/maps/components/GpsMap/external/{Control → MapControl}/index.d.ts +3 -3
- package/components/maps/components/GpsMap/external/{Control → MapControl}/index.js +9 -7
- package/components/maps/components/GpsMap/external/MapControl/types.d.ts +26 -0
- package/components/maps/components/GpsMap/external/googleMutant/index.d.ts +1 -1
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/index.js +3 -3
- package/components/maps/components/GpsMap/featureRenders/FeatureDivIconLabel/index.js +1 -1
- package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/types.d.ts +3 -2
- package/components/maps/components/GpsMap/featureRenders/index.d.ts +0 -1
- package/components/maps/components/GpsMap/hooks/index.d.ts +3 -0
- package/components/maps/components/GpsMap/hooks/index.js +1 -0
- package/components/maps/components/GpsMap/hooks/useDisableMapEventsOnFlag/index.d.ts +6 -0
- package/components/maps/components/GpsMap/hooks/useDisableMapEventsOnFlag/index.js +31 -0
- package/components/maps/components/GpsMap/hooks/useDisableMapEventsOnMouseOver/index.d.ts +6 -0
- package/components/maps/components/GpsMap/hooks/{useDisableZoomEvents → useDisableMapEventsOnMouseOver}/index.js +10 -2
- package/components/maps/components/GpsMap/icons.d.ts +10 -7
- package/components/maps/components/GpsMap/icons.js +17 -16
- package/components/maps/components/GpsMap/index.d.ts +2 -1
- package/components/maps/components/GpsMap/popups/MapPopupDevice/MapPopupDevice.js +9 -1
- package/components/maps/components/GpsMap/popups/index.d.ts +1 -0
- package/components/maps/components/GpsMap/slots/slots.d.ts +27 -4
- package/components/maps/components/GpsMap/slots/slots.js +16 -7
- package/components/maps/components/GpsMap/slots/styled.d.ts +18 -0
- package/components/maps/components/GpsMap/slots/styled.js +37 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/index.js +8 -7
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/index.d.ts +10 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/index.js +10 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → BottomRigthTools}/subcomponents/ZoomButtons/index.js +3 -3
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/types.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/hooks/types.d.ts +8 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/hooks/useTool.d.ts +13 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/hooks/useTool.js +64 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.d.ts +0 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.js +42 -87
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/index.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/index.js +24 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/types.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.js +30 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.styles.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/MapLayersTool.styles.js +45 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/hooks/types.d.ts +11 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/hooks/useMapLayersTool.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/hooks/useMapLayersTool.js +37 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/slots.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/slots.js +10 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/styled.d.ts +12 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/slots/styled.js +26 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/subcomponents/MapLayerRow.d.ts +5 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/subcomponents/MapLayerRow.js +71 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/subcomponents/types.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapLayersTool/types.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.d.ts → TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.d.ts} +1 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.js +38 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.styles.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/MapSourcesTool.styles.js +87 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/hooks/useMapSourcesTool.d.ts +12 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/hooks/useMapSourcesTool.js +22 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/slots.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/slots.js +13 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/styled.d.ts +21 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/slots/styled.js +41 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/bing.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/bing.js +47 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/google.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/google.js +107 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/others.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/others.js +33 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/subcomponents/MapSourceCard.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/subcomponents/MapSourceCard.js +88 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/subcomponents/types.d.ts +7 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/types.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/MeasureTool.js +31 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/MeasureTool.styles.d.ts +7 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/MeasureTool.styles.js +154 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants.d.ts +25 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants.js +37 -14
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.d.ts +29 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.js +14 -6
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts +2 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.js +26 -20
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/types.d.ts +1 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/slots.d.ts +8 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/slots.js +12 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/styled.d.ts +18 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/slots/styled.js +37 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/index.js +19 -17
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +18 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/types.d.ts +9 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/types.d.ts +2 -5
- package/components/maps/components/GpsMap/subcomponents/Controls/types.d.ts +1 -1
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/index.js +2 -1
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/index.js +2 -1
- package/components/maps/components/GpsMap/subcomponents/MapEventController/MapEventController.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/MapEventController/MapEventController.js +8 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/darkStyles.d.ts +13 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/index.js +82 -59
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerOthers/index.js +25 -15
- package/components/maps/components/GpsMap/types.d.ts +24 -5
- package/components/maps/components/GpsMapTools/GpsMapTools.d.ts +1 -0
- package/components/maps/components/GpsMapTools/index.d.ts +1 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/index.js +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.js +29 -32
- package/components/maps/components/GpsMapTools/types.d.ts +0 -16
- package/components/maps/index.d.ts +1 -0
- package/components/maps/utils/coordsToQuadKey.d.ts +4 -0
- package/components/maps/{components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils.js → utils/coordsToQuadKey.js} +2 -2
- package/components/maps/utils/index.d.ts +1 -0
- package/contexts/RealTimeConsumerContext/RealTimeConsumerContext.js +1 -1
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/athmospherejs/index.d.ts +1 -1
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/athmospherejs/index.js +1 -1
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/constants.d.ts +67 -2
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/constants.js +115 -30
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/dummy.js +5 -38
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/group.d.ts +9 -36
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/group.js +27 -19
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/helpers.d.ts +3 -2
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/helpers.js +9 -2
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/factory.js +1 -1
- package/formatters/CourseFormatter/CourseFormatter.js +6 -4
- package/formatters/CourseFormatter/helper.d.ts +2 -1
- package/formatters/CourseFormatter/helper.js +2 -4
- package/formatters/CourseFormatter/index.d.ts +1 -0
- package/formatters/CourseFormatter/slots/CourseFormatterSlots.d.ts +1 -1
- package/formatters/CourseFormatter/slots/CourseFormatterSlots.js +2 -2
- package/formatters/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +94 -59
- package/package.json +16 -3
- package/utils/cssToCSSProperties.d.ts +37 -0
- package/utils/getPrecisionFromHdop/constants.d.ts +13 -0
- package/utils/getPrecisionFromHdop/constants.js +73 -0
- package/utils/getPrecisionFromHdop/getPrecisionFromHdop.d.ts +31 -0
- package/utils/getPrecisionFromHdop/getPrecisionFromHdop.js +59 -0
- package/utils/getPrecisionFromHdop/index.d.ts +3 -0
- package/utils/getPrecisionFromHdop/index.js +1 -0
- package/utils/getPrecisionFromHdop/types.d.ts +42 -0
- package/utils/getVptUpdatedAtWithGuard.d.ts +4 -0
- package/utils/getVptUpdatedAtWithGuard.js +13 -0
- package/utils/getVptValueWithGuard.d.ts +9 -0
- package/utils/getVptValueWithGuard.js +18 -0
- package/utils/index.d.ts +3 -0
- package/components/DeviceStatus/hooks/constants.d.ts +0 -11
- package/components/maps/components/GpsMap/external/Control/types.d.ts +0 -7
- package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/constants.js +0 -4
- package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/index.js +0 -112
- package/components/maps/components/GpsMap/hooks/useDisableZoomEvents/index.d.ts +0 -6
- package/components/maps/components/GpsMap/slots/GpsMapSlots.d.ts +0 -4
- package/components/maps/components/GpsMap/slots/GpsMapSlots.js +0 -24
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/index.js +0 -13
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index.d.ts +0 -10
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index.js +0 -58
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers.d.ts +0 -9
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers.js +0 -17
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns.d.ts +0 -18
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns.js +0 -139
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster.d.ts +0 -12
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster.js +0 -52
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.d.ts +0 -8
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.js +0 -43
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index.js +0 -30
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/model.d.ts +0 -26
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.js +0 -133
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.d.ts +0 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.js +0 -39
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.js +0 -73
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.d.ts +0 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.js +0 -25
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/types.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/index.js +0 -40
- /package/components/{maps/components/GpsMap/contexts/MapContext/helper.js → Device/index.js} +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → BottomRigthTools}/subcomponents/ZoomButtons/index.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/{index.d.ts → MeasureTool.d.ts} +0 -0
|
@@ -8,6 +8,10 @@ export interface MapClasses {
|
|
|
8
8
|
* Root element for the top right tools
|
|
9
9
|
*/
|
|
10
10
|
topRigthToolsRoot: string;
|
|
11
|
+
/**
|
|
12
|
+
* Root element for the bottom right tools
|
|
13
|
+
*/
|
|
14
|
+
bottomRightToolsRoot: string;
|
|
11
15
|
/**
|
|
12
16
|
* Container de zoom buttons
|
|
13
17
|
*/
|
|
@@ -28,13 +32,6 @@ export interface MapClasses {
|
|
|
28
32
|
* Contenedor de las etiquetas de las marcas, poligonoes, etc, en general de los features
|
|
29
33
|
*/
|
|
30
34
|
featureLabel: string;
|
|
31
|
-
meaureToolRoot: string;
|
|
32
|
-
measureToolFormValue: string;
|
|
33
|
-
measureToolFormValueDistance: string;
|
|
34
|
-
measureToolFormValueSymbol: string;
|
|
35
|
-
measureToolLabel: string;
|
|
36
|
-
meausureToolLabelDistance: string;
|
|
37
|
-
meausureToolLabelSymbol: string;
|
|
38
35
|
/**
|
|
39
36
|
* Root element de la marca cread con L.divIcon, esta al mismo nivel de leaflet-marker-icon para denotar las marcas de medición
|
|
40
37
|
*/
|
|
@@ -43,6 +40,7 @@ export interface MapClasses {
|
|
|
43
40
|
* Contenedor de la marca de medición, que indica el numero y forma el forma el rombo de la marca
|
|
44
41
|
*/
|
|
45
42
|
measureMarkerContainer: string;
|
|
43
|
+
measureMarkerSvgRoot: string;
|
|
46
44
|
measureMarkerContainerRhomb: string;
|
|
47
45
|
measureMarkerContainerSlot: string;
|
|
48
46
|
measureMarkerContainerSlotNumber: string;
|
|
@@ -50,15 +48,6 @@ export interface MapClasses {
|
|
|
50
48
|
measureLabelMarkerContainer: string;
|
|
51
49
|
measureLabelMarkerDistance: string;
|
|
52
50
|
measureLabelMarkerRemove: string;
|
|
53
|
-
/**
|
|
54
|
-
* Map sources
|
|
55
|
-
*/
|
|
56
|
-
mapSourcesPopoverRoot: string;
|
|
57
|
-
mapSourcesRoot: string;
|
|
58
|
-
mapSourcesOption: string;
|
|
59
|
-
mapSourcesOptionIconLabel: string;
|
|
60
|
-
mapSourcesOptionRoadOptions: string;
|
|
61
|
-
mapSourcesOptionRoadOptionsCheck: string;
|
|
62
51
|
/**
|
|
63
52
|
* Layers
|
|
64
53
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
import { RNDDefaultPosition } from '@m4l/components';
|
|
2
|
+
export declare const MAP_COMPONENT_TEST_ID = "M4LMap";
|
|
3
|
+
export declare const MAP_COMPONET_KEY_COMPONENT = "M4LMap";
|
|
3
4
|
export declare const EARTH_RADIO = 6378137;
|
|
4
5
|
export declare const DN = 500;
|
|
5
6
|
export declare const DE = 500;
|
|
@@ -13,6 +14,9 @@ export declare const MARKER_COLOR_DEFAULT = "#1E96DC";
|
|
|
13
14
|
export declare const LABEL_BK_COLOR_DEFAULT = "#1E96DC";
|
|
14
15
|
export declare const LABEL_COLOR_DEFAULT = "#FFFFFF";
|
|
15
16
|
export declare const GPS_TOOLS_POPUP_ID = "gpsTools";
|
|
17
|
+
export declare const LAT_LON_FIXED_DIGITS = 8;
|
|
18
|
+
export declare const MAP_SOURCES_TOOL_POPUP_DEFAULT_POSITION: RNDDefaultPosition;
|
|
19
|
+
export declare const MAP_LAYERS_TOOL_POPUP_DEFAULT_POSITION: RNDDefaultPosition;
|
|
16
20
|
export declare const GPS_TOOLS_POPUP_DEFAULT_POSITION: {
|
|
17
21
|
vertical: {
|
|
18
22
|
top: number;
|
|
@@ -21,9 +25,10 @@ export declare const GPS_TOOLS_POPUP_DEFAULT_POSITION: {
|
|
|
21
25
|
horizontal: {
|
|
22
26
|
right: number;
|
|
23
27
|
width: number;
|
|
28
|
+
magnetize: boolean;
|
|
24
29
|
};
|
|
25
30
|
};
|
|
26
|
-
export declare const
|
|
31
|
+
export declare const MESURE_TOOL_POPUP_DEFAULT_POSITION: {
|
|
27
32
|
vertical: {
|
|
28
33
|
top: number;
|
|
29
34
|
height: number;
|
|
@@ -31,6 +36,7 @@ export declare const MESURE_POPUP_DEFAULT_POSITION: {
|
|
|
31
36
|
horizontal: {
|
|
32
37
|
right: number;
|
|
33
38
|
width: number;
|
|
39
|
+
magnetize: boolean;
|
|
34
40
|
};
|
|
35
41
|
};
|
|
36
42
|
export declare const SVG_ICON_DEFAULT = "<svg viewBox=\"0 0 640 640\" height=\"32\" width=\"32\" xmlns=\"http://www.w3.org/2000/svg\">\n<g>\n <circle\n cx=\"320\"\n cy=\"320\"\n r=\"280\"\n fill=\"#1E96DC\"\n />\n <text\n x=\"320\"\n y=\"320\"\n font-size=\"320\"\n font-family=\"sans-serif\"\n fill=\"#FFFFFF\"\n text-anchor=\"middle\"\n alignment-baseline=\"central\"\n dominant-baseline=\"central\"\n >P</text>\n</g>\n</svg>";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const MAP_COMPONET_KEY_COMPONENT = "M4LMap";
|
|
2
2
|
const MAP_ZINDEX_DEFAULT = 0;
|
|
3
3
|
const MAP_ZINDEX_OVER_MAP = 1100;
|
|
4
4
|
const TIME_DOUBLE_CLICK = 250;
|
|
@@ -6,13 +6,22 @@ const MARKER_COLOR_DEFAULT = "#1E96DC";
|
|
|
6
6
|
const LABEL_BK_COLOR_DEFAULT = "#1E96DC";
|
|
7
7
|
const LABEL_COLOR_DEFAULT = "#FFFFFF";
|
|
8
8
|
const GPS_TOOLS_POPUP_ID = "gpsTools";
|
|
9
|
+
const LAT_LON_FIXED_DIGITS = 8;
|
|
10
|
+
const MAP_SOURCES_TOOL_POPUP_DEFAULT_POSITION = {
|
|
11
|
+
vertical: { top: 16, height: 430 },
|
|
12
|
+
horizontal: { right: -55, width: 280, magnetize: true }
|
|
13
|
+
};
|
|
14
|
+
const MAP_LAYERS_TOOL_POPUP_DEFAULT_POSITION = {
|
|
15
|
+
vertical: { top: 16, height: 160 },
|
|
16
|
+
horizontal: { right: -55, width: 280, magnetize: true }
|
|
17
|
+
};
|
|
9
18
|
const GPS_TOOLS_POPUP_DEFAULT_POSITION = {
|
|
10
|
-
vertical: { top:
|
|
11
|
-
horizontal: { right:
|
|
19
|
+
vertical: { top: 16, bottom: 50 },
|
|
20
|
+
horizontal: { right: -55, width: 280, magnetize: true }
|
|
12
21
|
};
|
|
13
|
-
const
|
|
14
|
-
vertical: { top:
|
|
15
|
-
horizontal: { right:
|
|
22
|
+
const MESURE_TOOL_POPUP_DEFAULT_POSITION = {
|
|
23
|
+
vertical: { top: 16, height: 215 },
|
|
24
|
+
horizontal: { right: -55, width: 280, magnetize: true }
|
|
16
25
|
};
|
|
17
26
|
const SVG_ICON_DEFAULT = `<svg viewBox="0 0 640 640" height="32" width="32" xmlns="http://www.w3.org/2000/svg">
|
|
18
27
|
<g>
|
|
@@ -35,15 +44,18 @@ const SVG_ICON_DEFAULT = `<svg viewBox="0 0 640 640" height="32" width="32" xmln
|
|
|
35
44
|
</g>
|
|
36
45
|
</svg>`;
|
|
37
46
|
export {
|
|
38
|
-
COMPONET_KEY_COMPONENT as C,
|
|
39
47
|
GPS_TOOLS_POPUP_DEFAULT_POSITION as G,
|
|
40
48
|
LABEL_BK_COLOR_DEFAULT as L,
|
|
41
|
-
|
|
49
|
+
MAP_COMPONET_KEY_COMPONENT as M,
|
|
42
50
|
SVG_ICON_DEFAULT as S,
|
|
43
51
|
TIME_DOUBLE_CLICK as T,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
MARKER_COLOR_DEFAULT as a,
|
|
53
|
+
LABEL_COLOR_DEFAULT as b,
|
|
54
|
+
MAP_ZINDEX_OVER_MAP as c,
|
|
55
|
+
MAP_SOURCES_TOOL_POPUP_DEFAULT_POSITION as d,
|
|
56
|
+
MAP_LAYERS_TOOL_POPUP_DEFAULT_POSITION as e,
|
|
57
|
+
MESURE_TOOL_POPUP_DEFAULT_POSITION as f,
|
|
58
|
+
MAP_ZINDEX_DEFAULT as g,
|
|
59
|
+
GPS_TOOLS_POPUP_ID as h,
|
|
60
|
+
LAT_LON_FIXED_DIGITS as i
|
|
49
61
|
};
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useRef
|
|
3
|
-
import {
|
|
4
|
-
import { shallow } from "zustand/shallow";
|
|
5
|
-
import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
6
|
-
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
2
|
+
import { createContext, useRef } from "react";
|
|
3
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
7
4
|
import { c as createMapStore } from "./store.js";
|
|
8
5
|
const MapContext = createContext(null);
|
|
9
6
|
function MapProvider(props) {
|
|
10
7
|
const {
|
|
11
8
|
children,
|
|
12
9
|
initialLayers,
|
|
10
|
+
initialMapData,
|
|
13
11
|
googleMapsApiKey: apiKey,
|
|
14
12
|
googleMapVersion = "weekly",
|
|
15
13
|
storeId,
|
|
16
14
|
storeDevtoolsEnabled = false
|
|
17
15
|
} = props;
|
|
18
16
|
const { getLabel } = useModuleDictionary();
|
|
19
|
-
const isDesktop = useResponsiveDesktop();
|
|
20
|
-
const isSkeleton = useModuleSkeleton();
|
|
21
|
-
const isFirstRender = useFirstRender([getLabel]);
|
|
22
17
|
const mapStoreRef = useRef();
|
|
23
18
|
if (!mapStoreRef.current) {
|
|
24
19
|
mapStoreRef.current = createMapStore({
|
|
@@ -26,31 +21,14 @@ function MapProvider(props) {
|
|
|
26
21
|
getLabel,
|
|
27
22
|
ownerState: {
|
|
28
23
|
status: "init",
|
|
29
|
-
isMobile: !isDesktop,
|
|
30
|
-
isSkeleton,
|
|
31
24
|
focus: false
|
|
32
25
|
},
|
|
26
|
+
hasMapData: initialMapData || {},
|
|
33
27
|
googleMapsApiKey: apiKey,
|
|
34
28
|
googleMapVersion
|
|
35
29
|
}, storeDevtoolsEnabled);
|
|
36
30
|
mapStoreRef.current?.getState().mapActions.init(initialLayers || []);
|
|
37
31
|
}
|
|
38
|
-
const { setHandlerGetLabel, setExternalState } = useStore(
|
|
39
|
-
mapStoreRef.current,
|
|
40
|
-
(state) => state.mapActions,
|
|
41
|
-
shallow
|
|
42
|
-
);
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
if (!isFirstRender) {
|
|
45
|
-
setHandlerGetLabel(getLabel);
|
|
46
|
-
}
|
|
47
|
-
}, [getLabel]);
|
|
48
|
-
useEffect(() => {
|
|
49
|
-
if (isFirstRender) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
setExternalState({ isMobile: !isDesktop, isSkeleton });
|
|
53
|
-
}, [isDesktop, isSkeleton]);
|
|
54
32
|
return /* @__PURE__ */ jsx(MapContext.Provider, { value: mapStoreRef.current, children });
|
|
55
33
|
}
|
|
56
34
|
export {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MapProvider, MapContext } from './MapContext';
|
|
2
|
-
export type { RendePropFeatureArgs, ComponentRenderPropFeature, FeatureId, FeatureCollection, Feature, Geometry, Point as GeometryPoint, GeoJsonProperties, } from './types';
|
|
2
|
+
export type { RendePropFeatureArgs, ComponentRenderPropFeature, FeatureId, FeatureCollection, Feature, Geometry, Point as GeometryPoint, GeoJsonProperties, FeatureLayerData, } from './types';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { createStore } from "zustand";
|
|
2
2
|
import { devtools } from "zustand/middleware";
|
|
3
3
|
import { immer } from "zustand/middleware/immer";
|
|
4
|
-
import { u as useMapUtilityClasses } from "../../classes/index.js";
|
|
5
4
|
import cloneDeep from "lodash-es/cloneDeep";
|
|
6
5
|
import merge from "lodash-es/merge";
|
|
7
|
-
import { T as
|
|
8
|
-
import { T as
|
|
9
|
-
import { T as TILE_LAYER_BING } from "../../subcomponents/Controls/subcomponents/
|
|
6
|
+
import { T as TILE_LAYER_OTHERS } from "../../subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/others.js";
|
|
7
|
+
import { T as TILE_SORCE_GOOGLE } from "../../subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/google.js";
|
|
8
|
+
import { T as TILE_LAYER_BING } from "../../subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MapSourcesTool/sourceTypes/bing.js";
|
|
10
9
|
const createDevtools = (immerMiddlewere, config) => {
|
|
11
10
|
const { enabled = false } = config;
|
|
12
11
|
if (enabled && process.env.NODE_ENV === "development") {
|
|
@@ -16,17 +15,16 @@ const createDevtools = (immerMiddlewere, config) => {
|
|
|
16
15
|
};
|
|
17
16
|
const createMapStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
18
17
|
const startProps = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
hashMapSources: {},
|
|
25
|
-
mapSourcesIds: [],
|
|
18
|
+
currentMapSourceLayer: {
|
|
19
|
+
mapSourceId: "google",
|
|
20
|
+
mapSourceLayerId: "streets"
|
|
21
|
+
},
|
|
22
|
+
mapSources: [TILE_SORCE_GOOGLE, TILE_LAYER_BING, TILE_LAYER_OTHERS],
|
|
26
23
|
layersIds: [],
|
|
27
24
|
hashLayers: {},
|
|
28
25
|
...initProps
|
|
29
26
|
};
|
|
27
|
+
let mapRef = null;
|
|
30
28
|
return createStore(
|
|
31
29
|
createDevtools(
|
|
32
30
|
immer((set, get) => ({
|
|
@@ -37,36 +35,24 @@ const createMapStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
37
35
|
*/
|
|
38
36
|
init: (layersStore) => {
|
|
39
37
|
set((state) => {
|
|
40
|
-
state.hashMapSources = {
|
|
41
|
-
osm_roadmap: TILE_LAYER_OSM,
|
|
42
|
-
google_rodmap: TILE_LAYER_GOOGLE,
|
|
43
|
-
google_satellite: TILE_LAYER_GOOGLE_SATELLITE,
|
|
44
|
-
google_hybrid: TILE_LAYER_GOOGLE_HYBRID,
|
|
45
|
-
bing_rodmap: TILE_LAYER_BING
|
|
46
|
-
};
|
|
47
|
-
state.mapSourcesIds = [
|
|
48
|
-
"osm_roadmap",
|
|
49
|
-
"google_rodmap",
|
|
50
|
-
"google_satellite",
|
|
51
|
-
"google_hybrid",
|
|
52
|
-
"bing_rodmap"
|
|
53
|
-
];
|
|
54
|
-
state.currentMapSourceId = "osm_roadmap";
|
|
55
38
|
for (let index = 0; index < layersStore.length; index++) {
|
|
56
39
|
state.hashLayers[layersStore[index].layerId] = cloneDeep(layersStore[index]);
|
|
57
40
|
state.layersIds.push(layersStore[index].layerId);
|
|
58
|
-
if (layersStore[index].visible !== false) {
|
|
59
|
-
state.visibleCheckedLayers.add(layersStore[index].layerId);
|
|
60
|
-
}
|
|
61
|
-
if (state.hashLayers[layersStore[index].layerId].autoFocus !== false) {
|
|
62
|
-
state.autoFocusCheckedLayers.add(layersStore[index].layerId);
|
|
63
|
-
}
|
|
64
|
-
if (state.hashLayers[layersStore[index].layerId].cluster !== false) {
|
|
65
|
-
state.clusterCheckedLayers.add(layersStore[index].layerId);
|
|
66
|
-
}
|
|
67
41
|
}
|
|
68
42
|
});
|
|
69
43
|
},
|
|
44
|
+
/**
|
|
45
|
+
* Actualiza el ref del mapa
|
|
46
|
+
*/
|
|
47
|
+
setMapRef: (map) => {
|
|
48
|
+
mapRef = map;
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Retorna el ref del mapa
|
|
52
|
+
*/
|
|
53
|
+
getMap: () => {
|
|
54
|
+
return mapRef;
|
|
55
|
+
},
|
|
70
56
|
/**
|
|
71
57
|
* TODO: Documentar
|
|
72
58
|
*/
|
|
@@ -75,6 +61,14 @@ const createMapStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
75
61
|
state.ownerState.status = status;
|
|
76
62
|
});
|
|
77
63
|
},
|
|
64
|
+
/**
|
|
65
|
+
* Actualiza la información transversal a todas las capas.
|
|
66
|
+
*/
|
|
67
|
+
setMapData: (data) => {
|
|
68
|
+
set((state) => {
|
|
69
|
+
state.hasMapData = { ...state.hasMapData, ...data };
|
|
70
|
+
});
|
|
71
|
+
},
|
|
78
72
|
// isEqualsMapProperties: (_newMapProperties: MapProperties) => {
|
|
79
73
|
// // if (get().mapProperties === undefined) {
|
|
80
74
|
// // return false;
|
|
@@ -156,14 +150,14 @@ const createMapStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
156
150
|
if (feature) {
|
|
157
151
|
feature.geometry = cloneDeep(geometry);
|
|
158
152
|
feature.properties = merge(feature.properties, properties);
|
|
159
|
-
feature.
|
|
153
|
+
feature.label = featureLabel;
|
|
160
154
|
} else {
|
|
161
155
|
feature = {
|
|
162
156
|
type: "Feature",
|
|
163
157
|
geometry,
|
|
164
158
|
id: featureId,
|
|
165
159
|
properties,
|
|
166
|
-
featureLabel
|
|
160
|
+
label: featureLabel
|
|
167
161
|
};
|
|
168
162
|
layer.features.push(feature);
|
|
169
163
|
}
|
|
@@ -216,15 +210,12 @@ const createMapStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
216
210
|
state.layersIds.push(layer.layerId);
|
|
217
211
|
if (layer.visible !== false) {
|
|
218
212
|
state.hashLayers[layer.layerId].visible = true;
|
|
219
|
-
state.visibleCheckedLayers.add(layer.layerId);
|
|
220
213
|
}
|
|
221
214
|
if (layer.autoFocus !== false) {
|
|
222
215
|
state.hashLayers[layer.layerId].autoFocus = true;
|
|
223
|
-
state.autoFocusCheckedLayers.add(layer.layerId);
|
|
224
216
|
}
|
|
225
217
|
if (layer.clusterAble && layer.cluster !== false) {
|
|
226
218
|
state.hashLayers[layer.layerId].cluster = true;
|
|
227
|
-
state.clusterCheckedLayers.add(layer.layerId);
|
|
228
219
|
}
|
|
229
220
|
});
|
|
230
221
|
},
|
|
@@ -239,7 +230,6 @@ const createMapStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
239
230
|
const feature = layer.features.find((f) => f.id === featureId);
|
|
240
231
|
if (feature) {
|
|
241
232
|
feature.layerData = merge(feature.layerData || {}, layerData);
|
|
242
|
-
feature.juan = "hola juan";
|
|
243
233
|
}
|
|
244
234
|
} else if (state.hashLayers[layerId].geoJsonObject?.object.type === "Feature") {
|
|
245
235
|
const feature = state.hashLayers[layerId].geoJsonObject?.object;
|
|
@@ -258,10 +248,6 @@ const createMapStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
258
248
|
return;
|
|
259
249
|
}
|
|
260
250
|
set((state) => {
|
|
261
|
-
if (!state.hashLayers[layerId].visible) {
|
|
262
|
-
state.visibleCheckedLayers.delete(layerId);
|
|
263
|
-
state.autoFocusCheckedLayers.delete(layerId);
|
|
264
|
-
}
|
|
265
251
|
state.layersIds.splice(state.layersIds.indexOf(layerId), 1);
|
|
266
252
|
delete state.hashLayers[layerId];
|
|
267
253
|
});
|
|
@@ -314,55 +300,44 @@ const createMapStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
314
300
|
/**
|
|
315
301
|
* TODO: Documentar
|
|
316
302
|
*/
|
|
317
|
-
setCheckedLayers: (
|
|
303
|
+
setCheckedLayers: (layerId, checkedNameProp, newValue) => {
|
|
318
304
|
set((state) => {
|
|
319
|
-
state[
|
|
320
|
-
|
|
321
|
-
state.hashLayers[layerId][checkedNameSet] = newCheckedSet.has(layerId);
|
|
305
|
+
if (state.hashLayers[layerId]) {
|
|
306
|
+
state.hashLayers[layerId][checkedNameProp] = newValue;
|
|
322
307
|
}
|
|
323
308
|
});
|
|
324
309
|
},
|
|
325
310
|
/**
|
|
326
|
-
*
|
|
311
|
+
* Actualizar la capa actual del mapa
|
|
327
312
|
*/
|
|
328
|
-
|
|
313
|
+
setCurrentMapSourceLayer: (mapSourceId, mapSourceLayerId) => {
|
|
329
314
|
set((state) => {
|
|
330
|
-
|
|
331
|
-
|
|
315
|
+
const source = state.mapSources.find((source2) => source2.id === mapSourceId);
|
|
316
|
+
if (source && source.layers.find((layer) => layer.id === mapSourceLayerId)) {
|
|
317
|
+
state.currentMapSourceLayer = {
|
|
318
|
+
mapSourceId,
|
|
319
|
+
mapSourceLayerId
|
|
320
|
+
};
|
|
332
321
|
}
|
|
333
322
|
});
|
|
334
323
|
},
|
|
335
324
|
/**
|
|
336
325
|
* TODO: Documentar
|
|
337
326
|
*/
|
|
338
|
-
|
|
327
|
+
setMapSourceLayerRoadOptions: (mapSourceId, mapSourceLayerId, partialRoadOptions) => {
|
|
339
328
|
set((state) => {
|
|
340
|
-
|
|
329
|
+
const source = state.mapSources.find((source2) => source2.id === mapSourceId);
|
|
330
|
+
const layer = source?.layers.find((layer2) => layer2.id === mapSourceLayerId);
|
|
331
|
+
if (!layer) {
|
|
341
332
|
return;
|
|
342
333
|
}
|
|
343
|
-
|
|
344
|
-
bicyclingLayer:
|
|
345
|
-
trafficLayer:
|
|
346
|
-
transitLayer:
|
|
334
|
+
layer.roadSelectedOptions = {
|
|
335
|
+
bicyclingLayer: layer.roadSelectedOptions?.bicyclingLayer || false,
|
|
336
|
+
trafficLayer: layer.roadSelectedOptions?.trafficLayer || false,
|
|
337
|
+
transitLayer: layer.roadSelectedOptions?.transitLayer || false,
|
|
347
338
|
...partialRoadOptions
|
|
348
339
|
};
|
|
349
340
|
});
|
|
350
|
-
},
|
|
351
|
-
/**
|
|
352
|
-
* TODO: Documentar
|
|
353
|
-
*/
|
|
354
|
-
setHandlerGetLabel: (newHandler) => {
|
|
355
|
-
set((state) => {
|
|
356
|
-
state.getLabel = newHandler;
|
|
357
|
-
});
|
|
358
|
-
},
|
|
359
|
-
/**
|
|
360
|
-
* TODO: Documentar
|
|
361
|
-
*/
|
|
362
|
-
setExternalState: (newExternalState) => {
|
|
363
|
-
set((state) => {
|
|
364
|
-
state.ownerState = { ...state.ownerState, ...newExternalState };
|
|
365
|
-
});
|
|
366
341
|
}
|
|
367
342
|
}
|
|
368
343
|
})),
|