@m4l/gclick 0.0.2
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/.storybook/constants.d.ts +30 -0
- package/.storybook/decorators/StorybookWithMapProvider/constants.d.ts +2 -0
- package/.storybook/decorators/StorybookWithMapProvider/index.d.ts +1 -0
- package/.storybook/decorators/WithContexts/constants.d.ts +10 -0
- package/.storybook/decorators/WithContexts/index.d.ts +1 -0
- package/.storybook/decorators/WithContexts/types.d.ts +7 -0
- package/.storybook/decorators/WithWindowsContainer/index.d.ts +2 -0
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/index.d.ts +1 -0
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/types.d.ts +4 -0
- package/.storybook/main.d.ts +3 -0
- package/.storybook/mocks/config-msw.d.ts +21 -0
- package/.storybook/mocks/index.d.ts +2 -0
- package/.storybook/mocks/network-mocks.d.ts +1 -0
- package/.storybook/storybook.vite.d.ts +2 -0
- package/@types/augmentations.d.ts +38 -0
- package/@types/constants.d.ts +26 -0
- package/@types/constants.js +21 -0
- package/@types/deviceData.d.ts +90 -0
- package/@types/general.d.ts +21 -0
- package/@types/index.d.ts +2 -0
- package/@types/index.js +1 -0
- package/@types/types.d.js +1 -0
- package/@types/types.d.ts +43 -0
- package/@types/vpts.d.ts +49 -0
- package/components/DataGrid/assets/icons/datagrid.svg +4 -0
- package/components/DeviceLabel/DeviceLabel.d.ts +6 -0
- package/components/DeviceLabel/DeviceLabel.js +32 -0
- package/components/DeviceLabel/DeviceLabel.styles.d.ts +2 -0
- package/components/DeviceLabel/DeviceLabel.styles.js +33 -0
- package/components/DeviceLabel/constants.d.ts +2 -0
- package/components/DeviceLabel/constants.js +4 -0
- package/components/DeviceLabel/index.d.ts +1 -0
- package/components/DeviceLabel/index.js +1 -0
- package/components/DeviceLabel/slots/DeviceLabelSlots.d.ts +3 -0
- package/components/DeviceLabel/slots/DeviceLabelSlots.js +22 -0
- package/components/DeviceLabel/slots/slots.d.ts +5 -0
- package/components/DeviceLabel/slots/slots.js +9 -0
- package/components/DeviceLabel/types.d.ts +26 -0
- package/components/DeviceStatus/DeviceStatus.d.ts +6 -0
- package/components/DeviceStatus/DeviceStatus.js +15 -0
- package/components/DeviceStatus/DeviceStatus.styles.d.ts +2 -0
- package/components/DeviceStatus/DeviceStatus.styles.js +13 -0
- package/components/DeviceStatus/constants.d.ts +2 -0
- package/components/DeviceStatus/constants.js +4 -0
- package/components/DeviceStatus/dictionary.d.ts +13 -0
- package/components/DeviceStatus/dictionary.js +18 -0
- package/components/DeviceStatus/hooks/constants.d.ts +11 -0
- package/components/DeviceStatus/hooks/constants.js +79 -0
- package/components/DeviceStatus/hooks/helper.d.ts +7 -0
- package/components/DeviceStatus/hooks/helper.js +22 -0
- package/components/DeviceStatus/hooks/useDeviceStatus.d.ts +12 -0
- package/components/DeviceStatus/hooks/useDeviceStatus.js +25 -0
- package/components/DeviceStatus/icons.d.ts +11 -0
- package/components/DeviceStatus/icons.js +13 -0
- package/components/DeviceStatus/index.d.ts +4 -0
- package/components/DeviceStatus/index.js +1 -0
- package/components/DeviceStatus/slots/DeviceStatusSlots.d.ts +1 -0
- package/components/DeviceStatus/slots/DeviceStatusSlots.js +11 -0
- package/components/DeviceStatus/slots/slots.d.ts +3 -0
- package/components/DeviceStatus/slots/slots.js +7 -0
- package/components/DeviceStatus/types.d.ts +16 -0
- package/components/gauges/Gauge/Gauge.d.ts +22 -0
- package/components/gauges/Gauge/Gauge.js +25 -0
- package/components/gauges/Gauge/Gauge.styles.d.ts +2 -0
- package/components/gauges/Gauge/Gauge.styles.js +9 -0
- package/components/gauges/Gauge/constants.d.ts +2 -0
- package/components/gauges/Gauge/constants.js +8 -0
- package/components/gauges/Gauge/index.d.ts +1 -0
- package/components/gauges/Gauge/index.js +1 -0
- package/components/gauges/Gauge/slots/GaugeEnum.d.ts +3 -0
- package/components/gauges/Gauge/slots/GaugeEnum.js +7 -0
- package/components/gauges/Gauge/slots/GaugeSlots.d.ts +3 -0
- package/components/gauges/Gauge/slots/GaugeSlots.js +12 -0
- package/components/gauges/Gauge/types.d.ts +16 -0
- package/components/gauges/index.d.ts +1 -0
- package/components/gauges/index.js +1 -0
- package/components/index.d.ts +4 -0
- package/components/index.js +1 -0
- package/components/indicators/IndicatorCSQ/IndicatorCSQ.d.ts +7 -0
- package/components/indicators/IndicatorCSQ/IndicatorCSQ.styles.d.ts +2 -0
- package/components/indicators/IndicatorCSQ/constants.d.ts +8 -0
- package/components/indicators/IndicatorCSQ/dictionary.d.ts +9 -0
- package/components/indicators/IndicatorCSQ/helpers/getQualityLabel/getQualityLabel.d.ts +40 -0
- package/components/indicators/IndicatorCSQ/helpers/getQualityLabel/index.d.ts +0 -0
- package/components/indicators/IndicatorCSQ/helpers/getQualityLabel/types.d.ts +11 -0
- package/components/indicators/IndicatorCSQ/icons.d.ts +1 -0
- package/components/indicators/IndicatorCSQ/index.d.ts +3 -0
- package/components/indicators/IndicatorCSQ/slots/IndicatorCSQEnum.d.ts +7 -0
- package/components/indicators/IndicatorCSQ/slots/IndicatorCSQSlots.d.ts +15 -0
- package/components/indicators/IndicatorCSQ/subcomponents/SignalIcon/SignalIcon.d.ts +7 -0
- package/components/indicators/IndicatorCSQ/subcomponents/SignalIcon/index.d.ts +1 -0
- package/components/indicators/IndicatorCSQ/subcomponents/SignalIcon/types.d.ts +5 -0
- package/components/indicators/IndicatorCSQ/tests/IndicatorCSQ.test.d.ts +1 -0
- package/components/indicators/IndicatorCSQ/types.d.ts +21 -0
- package/components/maps/components/GpsMap/GpsMap.d.ts +8 -0
- package/components/maps/components/GpsMap/GpsMap.js +34 -0
- package/components/maps/components/GpsMap/GpsMap.styles.d.ts +2 -0
- package/components/maps/components/GpsMap/GpsMap.styles.js +228 -0
- package/components/maps/components/GpsMap/classes/index.d.ts +8 -0
- package/components/maps/components/GpsMap/classes/index.js +110 -0
- package/components/maps/components/GpsMap/classes/types.d.ts +69 -0
- package/components/maps/components/GpsMap/constants.d.ts +36 -0
- package/components/maps/components/GpsMap/constants.js +49 -0
- package/components/maps/components/GpsMap/contexts/MapContext/MapContext.d.ts +13 -0
- package/components/maps/components/GpsMap/contexts/MapContext/MapContext.js +59 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helper.d.ts +8 -0
- package/components/maps/components/GpsMap/contexts/MapContext/helper.js +1 -0
- package/components/maps/components/GpsMap/contexts/MapContext/index.d.ts +2 -0
- package/components/maps/components/GpsMap/contexts/MapContext/index.js +1 -0
- package/components/maps/components/GpsMap/contexts/MapContext/store.d.ts +6 -0
- package/components/maps/components/GpsMap/contexts/MapContext/store.js +375 -0
- package/components/maps/components/GpsMap/contexts/MapContext/types.d.ts +569 -0
- package/components/maps/components/GpsMap/dictionary.d.ts +32 -0
- package/components/maps/components/GpsMap/dictionary.js +32 -0
- package/components/maps/components/GpsMap/external/Control/index.d.ts +9 -0
- package/components/maps/components/GpsMap/external/Control/index.js +42 -0
- package/components/maps/components/GpsMap/external/Control/types.d.ts +7 -0
- package/components/maps/components/GpsMap/external/Popup/component.d.ts +4 -0
- package/components/maps/components/GpsMap/external/Popup/div-overlay.d.ts +4 -0
- package/components/maps/components/GpsMap/external/Popup/element.d.ts +4 -0
- package/components/maps/components/GpsMap/external/Popup/generic.d.ts +4 -0
- package/components/maps/components/GpsMap/external/Popup/index.d.ts +4 -0
- package/components/maps/components/GpsMap/external/googleMutant/LRUMap.d.ts +99 -0
- package/components/maps/components/GpsMap/external/googleMutant/LRUMap.js +1 -0
- package/components/maps/components/GpsMap/external/googleMutant/googleMutant.d.ts +1 -0
- package/components/maps/components/GpsMap/external/googleMutant/googleMutant.js +1 -0
- package/components/maps/components/GpsMap/external/googleMutant/googleMutantNoDelete.d.ts +1 -0
- package/components/maps/components/GpsMap/external/googleMutant/index.d.ts +132 -0
- package/components/maps/components/GpsMap/external/googleMutant/index.js +1 -0
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/constants.d.ts +1 -0
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/constants.js +4 -0
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/index.d.ts +8 -0
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/index.js +263 -0
- package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/constants.d.ts +1 -0
- package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/constants.js +4 -0
- package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/index.d.ts +8 -0
- package/components/maps/components/GpsMap/featureRenders/DeviceFeatureRender/index.js +112 -0
- package/components/maps/components/GpsMap/featureRenders/FeatureDivIconLabel/index.d.ts +6 -0
- package/components/maps/components/GpsMap/featureRenders/FeatureDivIconLabel/index.js +33 -0
- package/components/maps/components/GpsMap/featureRenders/FeatureDivIconLabel/types.d.ts +7 -0
- package/components/maps/components/GpsMap/featureRenders/MarkerFeatureRender/IconMarker.d.ts +9 -0
- package/components/maps/components/GpsMap/featureRenders/MarkerFeatureRender/IconMarkerGrua.d.ts +4 -0
- package/components/maps/components/GpsMap/featureRenders/MarkerFeatureRender/IconMarkerTaxi.d.ts +4 -0
- package/components/maps/components/GpsMap/featureRenders/MarkerFeatureRender/index.d.ts +5 -0
- package/components/maps/components/GpsMap/featureRenders/MarkerFeatureRender/index.js +80 -0
- package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/index.d.ts +5 -0
- package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/index.js +83 -0
- package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/types.d.ts +15 -0
- package/components/maps/components/GpsMap/featureRenders/index.d.ts +3 -0
- package/components/maps/components/GpsMap/featureRenders/index.js +1 -0
- package/components/maps/components/GpsMap/hooks/useAutoFocus/index.d.ts +7 -0
- package/components/maps/components/GpsMap/hooks/useAutoFocus/index.js +78 -0
- package/components/maps/components/GpsMap/hooks/useAutoFocus/types.d.ts +15 -0
- package/components/maps/components/GpsMap/hooks/useDisableClickEvents/index.d.ts +6 -0
- package/components/maps/components/GpsMap/hooks/useDisableZoomEvents/index.d.ts +6 -0
- package/components/maps/components/GpsMap/hooks/useDisableZoomEvents/index.js +21 -0
- package/components/maps/components/GpsMap/hooks/useMapStore/index.d.ts +6 -0
- package/components/maps/components/GpsMap/hooks/useMapStore/index.js +13 -0
- package/components/maps/components/GpsMap/icons.d.ts +45 -0
- package/components/maps/components/GpsMap/icons.js +39 -0
- package/components/maps/components/GpsMap/index.d.ts +9 -0
- package/components/maps/components/GpsMap/index.js +1 -0
- package/components/maps/components/GpsMap/pluginLayers/PolylineWithArrows/index.d.ts +11 -0
- package/components/maps/components/GpsMap/pluginLayers/PolylineWithArrows/index.js +74 -0
- package/components/maps/components/GpsMap/pluginLayers/index.d.ts +1 -0
- package/components/maps/components/GpsMap/pluginLayers/index.js +1 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/MapPopupDevice.d.ts +7 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/MapPopupDevice.js +30 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/MapPopupDevice.styles.d.ts +2 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/MapPopupDevice.styles.js +146 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/constants.d.ts +5 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/constants.js +8 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/dictionary.d.ts +16 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/dictionary.js +20 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/index.d.ts +2 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/index.js +1 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/slots/MapPopupDeviceSlots.d.ts +33 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/slots/MapPopupDeviceSlots.js +63 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/slots/slots.d.ts +13 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/slots/slots.js +17 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/subcomponents/Content/GpsDeviceContent.d.ts +6 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/subcomponents/Content/GpsDeviceContent.js +122 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/subcomponents/Header/GpsDeviceHeader.d.ts +5 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/subcomponents/Header/GpsDeviceHeader.js +22 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/subcomponents/PropertyValue/index.d.ts +5 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/subcomponents/PropertyValue/types.d.ts +6 -0
- package/components/maps/components/GpsMap/popups/MapPopupDevice/types.d.ts +10 -0
- package/components/maps/components/GpsMap/popups/index.d.ts +1 -0
- package/components/maps/components/GpsMap/popups/index.js +1 -0
- package/components/maps/components/GpsMap/popups/types.d.ts +10 -0
- package/components/maps/components/GpsMap/slots/GpsMapSlots.d.ts +4 -0
- package/components/maps/components/GpsMap/slots/GpsMapSlots.js +24 -0
- package/components/maps/components/GpsMap/slots/slots.d.ts +6 -0
- package/components/maps/components/GpsMap/slots/slots.js +10 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/index.d.ts +17 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/index.js +32 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/index.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/index.js +13 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index.d.ts +10 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index.js +58 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers.js +17 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns.d.ts +18 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns.js +139 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster.d.ts +12 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster.js +52 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.d.ts +8 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.js +43 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index.js +30 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/model.d.ts +26 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.js +133 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.js +39 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.js +73 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.js +25 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils.js +19 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/types.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/types.d.ts +5 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.d.ts +11 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.js +103 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants.d.ts +30 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants.js +34 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.d.ts +11 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.js +45 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts +13 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.js +245 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/types.d.ts +13 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useValidation.d.ts +13 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useValidation.js +17 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/index.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/index.js +40 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/model.d.ts +17 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/index.d.ts +5 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/index.js +32 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/validations.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/validations.js +6 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MyActions/index.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MyActions/index.js +31 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/types.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ZoomButtons/index.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ZoomButtons/index.js +52 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/types.d.ts +7 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/types.d.ts +22 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/index.d.ts +5 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/index.js +33 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/index.d.ts +14 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/index.js +132 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/index.d.ts +9 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/index.js +24 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/types.d.ts +11 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/RenderByEachFeatureComponent/index.d.ts +11 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/RenderByEachFeatureComponent/index.js +13 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/RenderByEachFeatureComponent/types.d.ts +5 -0
- package/components/maps/components/GpsMap/subcomponents/LayersContainer/subcomponents/MyLayer/types.d.ts +2 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/index.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/index.js +27 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/index.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/index.js +100 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerOthers/index.d.ts +6 -0
- package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerOthers/index.js +35 -0
- package/components/maps/components/GpsMap/types.d.ts +56 -0
- package/components/maps/components/GpsMapTools/GpsMapTools.d.ts +4 -0
- package/components/maps/components/GpsMapTools/GpsMapTools.js +10 -0
- package/components/maps/components/GpsMapTools/classes/index.d.ts +7 -0
- package/components/maps/components/GpsMapTools/classes/index.js +21 -0
- package/components/maps/components/GpsMapTools/classes/types.d.ts +14 -0
- package/components/maps/components/GpsMapTools/constants.d.ts +8 -0
- package/components/maps/components/GpsMapTools/constants.js +71 -0
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/index.d.ts +21 -0
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/index.js +48 -0
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/store.d.ts +19 -0
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/store.js +155 -0
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/types.d.ts +160 -0
- package/components/maps/components/GpsMapTools/dictionary.d.ts +62 -0
- package/components/maps/components/GpsMapTools/dictionary.js +66 -0
- package/components/maps/components/GpsMapTools/hooks/useGpsMapToolsStore/index.d.ts +5 -0
- package/components/maps/components/GpsMapTools/hooks/useGpsMapToolsStore/index.js +13 -0
- package/components/maps/components/GpsMapTools/hooks/useLayers/index.d.ts +4 -0
- package/components/maps/components/GpsMapTools/hooks/useLayers/index.js +57 -0
- package/components/maps/components/GpsMapTools/icons.d.ts +23 -0
- package/components/maps/components/GpsMapTools/icons.js +22 -0
- package/components/maps/components/GpsMapTools/index.d.ts +4 -0
- package/components/maps/components/GpsMapTools/index.js +1 -0
- package/components/maps/components/GpsMapTools/styles.d.ts +1 -0
- package/components/maps/components/GpsMapTools/styles.js +18 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/index.d.ts +9 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/index.js +84 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/constants.d.ts +20 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/constants.js +40 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/helpers.d.ts +34 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/helpers.js +77 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useDrawing.d.ts +14 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useDrawing.js +216 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSubmit.d.ts +11 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSubmit.js +63 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSumbitErrorsFocus.d.ts +5 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSumbitErrorsFocus.js +36 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useValidation.d.ts +25 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useValidation.js +19 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/index.d.ts +5 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/index.js +71 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles.d.ts +1 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles.js +8 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/index.d.ts +4 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/index.js +51 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/types.d.ts +6 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/validations.d.ts +8 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/validations.js +11 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index.d.ts +4 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index.js +128 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/types.d.ts +7 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/validations.d.ts +9 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/validations.js +12 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.d.ts +5 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.js +55 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/types.d.ts +2 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.d.ts +4 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.js +76 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/types.d.ts +7 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/index.d.ts +4 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/index.js +12 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/FillData/index.d.ts +4 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/FillData/index.js +46 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/index.d.ts +4 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/index.js +86 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/types.d.ts +10 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/types.d.ts +27 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedFeatures.d.ts +9 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedFeatures.js +86 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedGeofences.d.ts +7 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedGeofences.js +85 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.d.ts +12 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.js +114 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useMaster.d.ts +22 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useMaster.js +164 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.d.ts +12 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.js +113 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.d.ts +4 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.js +73 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.d.ts +1 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.js +8 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/subcomponents/Filter/index.d.ts +9 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/subcomponents/Filter/index.js +49 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/constants.d.ts +7 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/constants.js +13 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/model.d.ts +114 -0
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/types.d.ts +7 -0
- package/components/maps/components/GpsMapTools/types.d.ts +34 -0
- package/components/maps/index.d.ts +4 -0
- package/components/maps/index.js +1 -0
- package/components/maps/utils/courseToCartesianAngle.d.ts +6 -0
- package/components/maps/utils/courseToCartesianAngle.js +8 -0
- package/components/maps/utils/courseToCssAngle.d.ts +9 -0
- package/components/maps/utils/courseToCssAngle.js +13 -0
- package/components/maps/utils/index.d.ts +6 -0
- package/components/maps/utils/index.js +1 -0
- package/components/maps/utils/isFeature.d.ts +2 -0
- package/components/maps/utils/isFeature.js +6 -0
- package/components/maps/utils/isFeatureCollection.d.ts +2 -0
- package/components/maps/utils/isFeatureCollection.js +6 -0
- package/components/maps/utils/isFeatureCollectionDraft.d.ts +6 -0
- package/components/maps/utils/isFeatureCollectionDraft.js +6 -0
- package/components/maps/utils/isGeometry.d.ts +2 -0
- package/components/maps/utils/isGeometry.js +6 -0
- package/contexts/RealTimeConsumerContext/RealTimeConsumerContext.d.ts +11 -0
- package/contexts/RealTimeConsumerContext/RealTimeConsumerContext.js +39 -0
- package/contexts/RealTimeConsumerContext/constants.d.ts +3 -0
- package/contexts/RealTimeConsumerContext/constants.js +8 -0
- package/contexts/RealTimeConsumerContext/index.d.ts +3 -0
- package/contexts/RealTimeConsumerContext/index.js +1 -0
- package/contexts/RealTimeConsumerContext/store.d.ts +6 -0
- package/contexts/RealTimeConsumerContext/store.js +115 -0
- package/contexts/RealTimeConsumerContext/types.d.ts +64 -0
- package/contexts/RealTimeProducerContext/RealTimeProducerContext.d.ts +11 -0
- package/contexts/RealTimeProducerContext/RealTimeProducerContext.js +20 -0
- package/contexts/RealTimeProducerContext/constants.d.ts +6 -0
- package/contexts/RealTimeProducerContext/constants.js +12 -0
- package/contexts/RealTimeProducerContext/index.d.ts +4 -0
- package/contexts/RealTimeProducerContext/index.js +1 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/athmospherejs/index.d.ts +33 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/athmospherejs/index.js +140 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/athmospherejs/types.d.ts +28 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/base.d.ts +15 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/base.js +14 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/constants.d.ts +23 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/constants.js +136 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/dummy.d.ts +23 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/dummy.js +66 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/group.d.ts +36 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/group.js +45 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/helpers.d.ts +10 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/dummy/helpers.js +15 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/factory.d.ts +12 -0
- package/contexts/RealTimeProducerContext/sourceDataMechanisms/factory.js +20 -0
- package/contexts/RealTimeProducerContext/store.d.ts +6 -0
- package/contexts/RealTimeProducerContext/store.js +136 -0
- package/contexts/RealTimeProducerContext/types.d.ts +196 -0
- package/contexts/index.d.ts +2 -0
- package/contexts/index.js +1 -0
- package/formatters/CourseFormatter/CourseFormatter.d.ts +14 -0
- package/formatters/CourseFormatter/CourseFormatter.js +33 -0
- package/formatters/CourseFormatter/CourseFormatter.styles.d.ts +2 -0
- package/formatters/CourseFormatter/CourseFormatter.styles.js +23 -0
- package/formatters/CourseFormatter/constants.d.ts +3 -0
- package/formatters/CourseFormatter/constants.js +6 -0
- package/formatters/CourseFormatter/dictionary.d.ts +12 -0
- package/formatters/CourseFormatter/dictionary.js +18 -0
- package/formatters/CourseFormatter/helper.d.ts +4 -0
- package/formatters/CourseFormatter/helper.js +28 -0
- package/formatters/CourseFormatter/index.d.ts +2 -0
- package/formatters/CourseFormatter/index.js +1 -0
- package/formatters/CourseFormatter/slots/CourseFormatterEnum.d.ts +3 -0
- package/formatters/CourseFormatter/slots/CourseFormatterEnum.js +7 -0
- package/formatters/CourseFormatter/slots/CourseFormatterSlots.d.ts +3 -0
- package/formatters/CourseFormatter/slots/CourseFormatterSlots.js +12 -0
- package/formatters/CourseFormatter/test/CourserFormatter.test.d.ts +1 -0
- package/formatters/CourseFormatter/types.d.ts +24 -0
- package/formatters/index.d.ts +1 -0
- package/hooks/index.d.ts +2 -0
- package/hooks/index.js +1 -0
- package/hooks/useRealTimeConsumer/index.d.ts +6 -0
- package/hooks/useRealTimeConsumer/index.js +13 -0
- package/hooks/useRealTimeProducer/index.d.ts +6 -0
- package/hooks/useRealTimeProducer/index.js +13 -0
- package/index.d.ts +9 -0
- package/index.js +90 -0
- package/mockServiceWorker.js +307 -0
- package/not_recognized/index.js +406 -0
- package/package.json +93 -0
- package/test/HostThemeProviderMock.d.ts +10 -0
- package/test/TestAppWrapper.d.ts +29 -0
- package/test/TestFormAutoValidation.d.ts +4 -0
- package/test/constants.d.ts +69 -0
- package/test/constants_no_mock.d.ts +1 -0
- package/test/getNameDataTestId.d.ts +15 -0
- package/test/getNameDataTestId.js +16 -0
- package/test/index.d.ts +4 -0
- package/test/mocks.d.ts +27 -0
- package/test/setup.d.ts +0 -0
- package/test/types.d.ts +4 -0
- package/test/utils.d.ts +29 -0
- package/utils/ObjectQueue.d.ts +18 -0
- package/utils/ObjectQueue.js +33 -0
- package/utils/capitalizeFirstLetter.d.ts +4 -0
- package/utils/capitalizeFirstLetter.js +10 -0
- package/utils/containerQuery.d.ts +5 -0
- package/utils/formatDistanceToNow/formatDistanteToNow.d.ts +5 -0
- package/utils/formatDistanceToNow/index.d.ts +2 -0
- package/utils/formatDistanceToNow/types.d.ts +21 -0
- package/utils/getComponentSlotRoot.d.ts +9 -0
- package/utils/getComponentSlotRoot.js +13 -0
- package/utils/getComponentUtilityClass.d.ts +1 -0
- package/utils/getComponentUtilityClass.js +7 -0
- package/utils/getPaletteColor.d.ts +5 -0
- package/utils/getPaletteColor.js +18 -0
- package/utils/getSizeStyles/_test_/getSizeStyles.test.d.ts +1 -0
- package/utils/getSizeStyles/getSizeStyles.d.ts +28 -0
- package/utils/getSizeStyles/getSizeStyles.js +13 -0
- package/utils/getSizeStyles/index.d.ts +1 -0
- package/utils/getSizeStyles/index.js +1 -0
- package/utils/getThemeVariantColor.d.ts +6 -0
- package/utils/getTransformXY.d.ts +7 -0
- package/utils/getTypographyStyles.d.ts +11 -0
- package/utils/getTypographyStyles.js +8 -0
- package/utils/index.d.ts +8 -0
- package/utils/index.js +1 -0
- package/utils/isValidDate.d.ts +1 -0
- package/utils/isValidDate.js +6 -0
- package/utils/types.d.ts +23 -0
- package/vite-env.d.ts +4 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { useState, useRef, useCallback, useEffect } from "react";
|
|
2
|
+
import { useMap } from "react-leaflet";
|
|
3
|
+
import * as L from "leaflet";
|
|
4
|
+
import { useFormContext, useWatch } from "react-hook-form";
|
|
5
|
+
import { useFormReadyForUpdate } from "@m4l/components";
|
|
6
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
7
|
+
import { S as STYLE_MEASURE_OPTIONS } from "../../constants.js";
|
|
8
|
+
import { e as MAP_ZINDEX_DEFAULT } from "../../../../../../../../constants.js";
|
|
9
|
+
import { g as getMarkerPointIcon, a as getMarkerPointLabel } from "./helpers.js";
|
|
10
|
+
import { m as mapClasses } from "../../../../../../../../classes/index.js";
|
|
11
|
+
function useMeasure() {
|
|
12
|
+
const { getLabel } = useModuleDictionary();
|
|
13
|
+
const map = useMap();
|
|
14
|
+
const readyToUpdate = useFormReadyForUpdate();
|
|
15
|
+
const { control, setValue } = useFormContext();
|
|
16
|
+
const fieldsWatch = useWatch({
|
|
17
|
+
control,
|
|
18
|
+
name: ["statusEdition", "value", "magnitudFactor"]
|
|
19
|
+
});
|
|
20
|
+
const statusEdition = fieldsWatch[0];
|
|
21
|
+
const value = fieldsWatch[1];
|
|
22
|
+
const magnitudFactor = fieldsWatch[2];
|
|
23
|
+
const [magnitudFactorCached, setMagnitudFactorCached] = useState(magnitudFactor);
|
|
24
|
+
const currentMeasure = useRef({
|
|
25
|
+
measurePoints: [],
|
|
26
|
+
addMarker: false,
|
|
27
|
+
magnitudFactor,
|
|
28
|
+
dragging: false
|
|
29
|
+
});
|
|
30
|
+
const clearMeasure = useCallback(() => {
|
|
31
|
+
currentMeasure.current.measurePoints.forEach((measurePoint) => {
|
|
32
|
+
measurePoint.marker.remove();
|
|
33
|
+
measurePoint.labelMarker.remove();
|
|
34
|
+
});
|
|
35
|
+
currentMeasure.current.measurePoints = [];
|
|
36
|
+
setValue("value", measureDistante());
|
|
37
|
+
}, []);
|
|
38
|
+
const getFormatFactorDistance = useCallback(
|
|
39
|
+
(distance, withSymbol = false) => {
|
|
40
|
+
if (distance === void 0) {
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
const cMagnitudeFactor = currentMeasure.current.magnitudFactor;
|
|
44
|
+
return (cMagnitudeFactor.factor_x0 + distance * cMagnitudeFactor.factor_x1 + (distance ^ 2 * cMagnitudeFactor.factor_x2)).toFixed(2) + (withSymbol ? ` ${cMagnitudeFactor.symbol}` : "");
|
|
45
|
+
},
|
|
46
|
+
[]
|
|
47
|
+
);
|
|
48
|
+
const measureDistante = useCallback(() => {
|
|
49
|
+
let totalDistance = 0;
|
|
50
|
+
const measurePoints = currentMeasure.current.measurePoints;
|
|
51
|
+
if (currentMeasure.current.layerLine) {
|
|
52
|
+
if (measurePoints.length < 2) {
|
|
53
|
+
currentMeasure.current.layerLine.remove();
|
|
54
|
+
currentMeasure.current.layerLine = void 0;
|
|
55
|
+
} else {
|
|
56
|
+
currentMeasure.current.layerLine.setLatLngs(
|
|
57
|
+
measurePoints.map((measurePoint) => measurePoint.marker.getLatLng())
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
if (measurePoints.length > 1) {
|
|
62
|
+
currentMeasure.current.layerLine = L.polyline(
|
|
63
|
+
measurePoints.map((measurePoint) => measurePoint.marker.getLatLng()),
|
|
64
|
+
{
|
|
65
|
+
color: STYLE_MEASURE_OPTIONS.strokeLineColor,
|
|
66
|
+
weight: STYLE_MEASURE_OPTIONS.strokeLineWeight,
|
|
67
|
+
interactive: false
|
|
68
|
+
//No se puede editar
|
|
69
|
+
}
|
|
70
|
+
).addTo(map);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
for (let i = 0; i < measurePoints.length - 1; i++) {
|
|
74
|
+
totalDistance += measurePoints[i].marker.getLatLng().distanceTo(measurePoints[i + 1].marker.getLatLng());
|
|
75
|
+
}
|
|
76
|
+
if (measurePoints.length > 0 && measurePoints[0].formatDistanceFromPrevious !== void 0) {
|
|
77
|
+
measurePoints[0].formatDistanceFromPrevious = void 0;
|
|
78
|
+
measurePoints[0].labelMarker.setIcon(getMarkerPointLabelMemo(void 0, getLabel));
|
|
79
|
+
addClickListenerForRemove(measurePoints[0].labelMarker);
|
|
80
|
+
}
|
|
81
|
+
for (let i = 1; i < measurePoints.length; i++) {
|
|
82
|
+
const formatDistanceFromPrevious = getFormatFactorDistance(
|
|
83
|
+
measurePoints[i - 1].marker.getLatLng().distanceTo(measurePoints[i].marker.getLatLng()),
|
|
84
|
+
true
|
|
85
|
+
);
|
|
86
|
+
if (measurePoints[i].formatDistanceFromPrevious !== formatDistanceFromPrevious) {
|
|
87
|
+
measurePoints[i].formatDistanceFromPrevious = formatDistanceFromPrevious;
|
|
88
|
+
measurePoints[i].labelMarker.setIcon(
|
|
89
|
+
getMarkerPointLabelMemo(formatDistanceFromPrevious, getLabel)
|
|
90
|
+
);
|
|
91
|
+
addClickListenerForRemove(measurePoints[i].labelMarker);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return getFormatFactorDistance(totalDistance);
|
|
95
|
+
}, [map, getLabel]);
|
|
96
|
+
const getMarkerPointIconMemo = useCallback(getMarkerPointIcon, []);
|
|
97
|
+
const getMarkerPointLabelMemo = useCallback(getMarkerPointLabel, [getLabel]);
|
|
98
|
+
const onClickRemovePoint = useCallback((labelMarker) => {
|
|
99
|
+
return (e) => {
|
|
100
|
+
e.stopPropagation();
|
|
101
|
+
if (!currentMeasure.current.dragging) {
|
|
102
|
+
const markIndex = currentMeasure.current.measurePoints.findIndex(
|
|
103
|
+
(searchElement) => {
|
|
104
|
+
return searchElement.labelMarker === labelMarker;
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
if (markIndex !== -1) {
|
|
108
|
+
const measurePoint = currentMeasure.current.measurePoints[markIndex];
|
|
109
|
+
measurePoint.marker.remove();
|
|
110
|
+
measurePoint.labelMarker.remove();
|
|
111
|
+
currentMeasure.current.measurePoints.splice(markIndex, 1);
|
|
112
|
+
setValue("value", measureDistante());
|
|
113
|
+
currentMeasure.current.addMarker = true;
|
|
114
|
+
}
|
|
115
|
+
currentMeasure.current.measurePoints.forEach((measurePoint, index) => {
|
|
116
|
+
measurePoint.marker.setIcon(getMarkerPointIconMemo(index + 1));
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}, []);
|
|
121
|
+
const addClickListenerForRemove = useCallback((labelMarker) => {
|
|
122
|
+
let element = labelMarker.getElement();
|
|
123
|
+
if (element) {
|
|
124
|
+
const elements = element.getElementsByClassName(
|
|
125
|
+
mapClasses.measureLabelMarkerRemove
|
|
126
|
+
);
|
|
127
|
+
element = elements[0];
|
|
128
|
+
if (element) {
|
|
129
|
+
element.addEventListener("click", onClickRemovePoint(labelMarker));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, []);
|
|
133
|
+
const onClickMap = useCallback(
|
|
134
|
+
(e) => {
|
|
135
|
+
const lat = e.latlng.lat;
|
|
136
|
+
const lng = e.latlng.lng;
|
|
137
|
+
let formatDistanceFromPrevious = void 0;
|
|
138
|
+
if (currentMeasure.current.addMarker === false) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (currentMeasure.current.measurePoints.length > 0) {
|
|
142
|
+
formatDistanceFromPrevious = getFormatFactorDistance(
|
|
143
|
+
currentMeasure.current.measurePoints[currentMeasure.current.measurePoints.length - 1].marker.getLatLng().distanceTo(e.latlng)
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
const marker = L.marker([lat, lng], {
|
|
147
|
+
draggable: true,
|
|
148
|
+
riseOnHover: true,
|
|
149
|
+
//Se pone la marca encima de las otras cuando se hace over
|
|
150
|
+
autoPan: true,
|
|
151
|
+
//Se corre el mapa si llega al extremo, solo para las marcas
|
|
152
|
+
icon: getMarkerPointIconMemo(currentMeasure.current.measurePoints.length + 1),
|
|
153
|
+
zIndexOffset: MAP_ZINDEX_DEFAULT
|
|
154
|
+
}).addTo(map);
|
|
155
|
+
marker.on("moveend", function(_e) {
|
|
156
|
+
const latlng = marker.getLatLng();
|
|
157
|
+
labelMarker.setLatLng(latlng);
|
|
158
|
+
setValue("value", measureDistante());
|
|
159
|
+
});
|
|
160
|
+
marker.on("mouseover", function() {
|
|
161
|
+
currentMeasure.current.addMarker = false;
|
|
162
|
+
});
|
|
163
|
+
marker.on("mouseout", function() {
|
|
164
|
+
currentMeasure.current.addMarker = true;
|
|
165
|
+
});
|
|
166
|
+
var labelMarker = L.marker([lat, lng], {
|
|
167
|
+
draggable: true,
|
|
168
|
+
riseOnHover: true,
|
|
169
|
+
//Se pone la marca encima de las otras cuando se hace over
|
|
170
|
+
icon: getMarkerPointLabelMemo(formatDistanceFromPrevious, getLabel),
|
|
171
|
+
zIndexOffset: MAP_ZINDEX_DEFAULT
|
|
172
|
+
}).addTo(map);
|
|
173
|
+
labelMarker.on("moveend", function(_e) {
|
|
174
|
+
const latlng = labelMarker.getLatLng();
|
|
175
|
+
marker.setLatLng(latlng);
|
|
176
|
+
setValue("value", measureDistante());
|
|
177
|
+
});
|
|
178
|
+
labelMarker.on("mouseover", function(_e) {
|
|
179
|
+
currentMeasure.current.addMarker = false;
|
|
180
|
+
});
|
|
181
|
+
labelMarker.on("mouseout", function(_e) {
|
|
182
|
+
currentMeasure.current.addMarker = true;
|
|
183
|
+
});
|
|
184
|
+
labelMarker.on("dragstart", function(_e) {
|
|
185
|
+
currentMeasure.current.dragging = true;
|
|
186
|
+
});
|
|
187
|
+
labelMarker.on("dragend", function(_e) {
|
|
188
|
+
setTimeout(function() {
|
|
189
|
+
currentMeasure.current.dragging = false;
|
|
190
|
+
}, 10);
|
|
191
|
+
});
|
|
192
|
+
addClickListenerForRemove(labelMarker);
|
|
193
|
+
currentMeasure.current.measurePoints.push({
|
|
194
|
+
marker,
|
|
195
|
+
labelMarker,
|
|
196
|
+
formatDistanceFromPrevious
|
|
197
|
+
});
|
|
198
|
+
setValue("value", measureDistante());
|
|
199
|
+
},
|
|
200
|
+
[map, measureDistante, setValue, getLabel]
|
|
201
|
+
);
|
|
202
|
+
const onMouseMoveMap = useCallback(() => {
|
|
203
|
+
map.getContainer().style.cursor = "crosshair";
|
|
204
|
+
}, [map]);
|
|
205
|
+
const onMouseOutMap = useCallback(() => {
|
|
206
|
+
map.getContainer().style.cursor = "default";
|
|
207
|
+
}, [map]);
|
|
208
|
+
useEffect(() => {
|
|
209
|
+
if (map) {
|
|
210
|
+
if (statusEdition === "initial") {
|
|
211
|
+
map.off("click", onClickMap);
|
|
212
|
+
clearMeasure();
|
|
213
|
+
map.getContainer().style.cursor = "default";
|
|
214
|
+
return;
|
|
215
|
+
} else {
|
|
216
|
+
currentMeasure.current.addMarker = true;
|
|
217
|
+
map.getContainer().style.cursor = "crosshair";
|
|
218
|
+
map.on("click", onClickMap);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}, [map, statusEdition]);
|
|
222
|
+
useEffect(() => {
|
|
223
|
+
if (!readyToUpdate) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (magnitudFactor.id !== magnitudFactorCached.id) {
|
|
227
|
+
setMagnitudFactorCached({ ...magnitudFactor });
|
|
228
|
+
currentMeasure.current.magnitudFactor = magnitudFactor;
|
|
229
|
+
setValue("value", measureDistante());
|
|
230
|
+
}
|
|
231
|
+
}, [magnitudFactor]);
|
|
232
|
+
useEffect(() => {
|
|
233
|
+
return () => {
|
|
234
|
+
map.off("mousemove", onMouseMoveMap);
|
|
235
|
+
map.off("mouseout", onMouseOutMap);
|
|
236
|
+
map.off("click", onClickMap);
|
|
237
|
+
map.getContainer().style.cursor = "default";
|
|
238
|
+
clearMeasure();
|
|
239
|
+
};
|
|
240
|
+
}, []);
|
|
241
|
+
return { statusEdition, magnitudFactor, value };
|
|
242
|
+
}
|
|
243
|
+
export {
|
|
244
|
+
useMeasure as u
|
|
245
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MagnitudeFactorItem } from '../../../../../../../../../GpsMapTools/types';
|
|
2
|
+
export type MeasurePoint = {
|
|
3
|
+
marker: L.Marker;
|
|
4
|
+
labelMarker: L.Marker;
|
|
5
|
+
formatDistanceFromPrevious: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
export interface RefCurrentMeasure {
|
|
8
|
+
dragging: boolean;
|
|
9
|
+
addMarker: boolean;
|
|
10
|
+
measurePoints: Array<MeasurePoint>;
|
|
11
|
+
layerLine?: L.Polyline;
|
|
12
|
+
magnitudFactor: MagnitudeFactorItem;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Yup from 'yup';
|
|
2
|
+
/**
|
|
3
|
+
* TODO: Documentar
|
|
4
|
+
*/
|
|
5
|
+
export declare function useValidation(): {
|
|
6
|
+
validationSchema: Yup.ObjectSchema<{
|
|
7
|
+
[x: string]: Yup.AnySchema | import('yup/lib/Reference').default<unknown> | import('yup/lib/Lazy').default<any, any>;
|
|
8
|
+
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
9
|
+
[x: string]: Yup.AnySchema | import('yup/lib/Reference').default<unknown> | import('yup/lib/Lazy').default<any, any>;
|
|
10
|
+
}>, import('yup/lib/object').AssertsShape<{
|
|
11
|
+
[x: string]: Yup.AnySchema | import('yup/lib/Reference').default<unknown> | import('yup/lib/Lazy').default<any, any>;
|
|
12
|
+
}>>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
3
|
+
import * as Yup from "yup";
|
|
4
|
+
import { M as MeasureDataValidation } from "../subcomponents/MeasureData/validations.js";
|
|
5
|
+
function useValidation() {
|
|
6
|
+
const { getLabel } = useModuleDictionary();
|
|
7
|
+
const validationSchema = useMemo(
|
|
8
|
+
() => Yup.object().shape({
|
|
9
|
+
...MeasureDataValidation()
|
|
10
|
+
}),
|
|
11
|
+
[getLabel]
|
|
12
|
+
);
|
|
13
|
+
return { validationSchema };
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
useValidation as u
|
|
17
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { RHFormProvider, Stack } 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 { useModuleDictionary } from "@m4l/core";
|
|
8
|
+
import { M as MAP_DICCTIONARY } from "../../../../../../dictionary.js";
|
|
9
|
+
import { m as mapClasses } from "../../../../../../classes/index.js";
|
|
10
|
+
function MeasureTool() {
|
|
11
|
+
const { getLabel } = useModuleDictionary();
|
|
12
|
+
const finalInitalValues = {
|
|
13
|
+
...INITIAL_FORM_VALUES
|
|
14
|
+
};
|
|
15
|
+
if (finalInitalValues?.magnitudFactor?.name) {
|
|
16
|
+
finalInitalValues.magnitudFactor.name = getLabel(
|
|
17
|
+
MAP_DICCTIONARY.LABEL_MEASURE_UNIT_BASE_KILOMETERS
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
const { validationSchema } = useValidation();
|
|
21
|
+
const onSubmit = () => {
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
RHFormProvider,
|
|
25
|
+
{
|
|
26
|
+
className: mapClasses.meaureToolRoot,
|
|
27
|
+
statusLoad: INITIAL_FORM_VALUES.statusLoad,
|
|
28
|
+
onSubmit,
|
|
29
|
+
values: finalInitalValues,
|
|
30
|
+
validationSchema,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx(Stack, { direction: "column", children: /* @__PURE__ */ jsx(MeasureData, {}) }),
|
|
33
|
+
/* @__PURE__ */ jsx(MyActions, {})
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
MeasureTool as M
|
|
40
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modelo de datos proveniente del endpoint list de magnitudes/factors
|
|
3
|
+
*/
|
|
4
|
+
export interface MagnitudesFactorsListModel {
|
|
5
|
+
/**
|
|
6
|
+
* id de la magnitude
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* "name" nombre dado por el cliente a la geocerca
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* "symbol" simbolo que sirve como unidad de medida
|
|
15
|
+
*/
|
|
16
|
+
symbol: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { RHFAutocompleteAsync, Stack } from "@m4l/components";
|
|
3
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import { M as MAP_DICCTIONARY } from "../../../../../../../../dictionary.js";
|
|
5
|
+
import { u as useMeasure } from "../../hooks/useMeasure/index.js";
|
|
6
|
+
import { m as mapClasses } from "../../../../../../../../classes/index.js";
|
|
7
|
+
function MeasureData() {
|
|
8
|
+
const { getLabel } = useModuleDictionary();
|
|
9
|
+
const { value, magnitudFactor } = useMeasure();
|
|
10
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11
|
+
/* @__PURE__ */ jsx(
|
|
12
|
+
RHFAutocompleteAsync,
|
|
13
|
+
{
|
|
14
|
+
type: "text",
|
|
15
|
+
endPoint: "magnitudes/factors?origin_unit_reference_id=m_kilometers",
|
|
16
|
+
name: "magnitudFactor",
|
|
17
|
+
autoComplete: "off",
|
|
18
|
+
getOptionLabel: (option) => option.name,
|
|
19
|
+
isOptionEqualToValue: (option, measureItemValue) => option.id === measureItemValue.id,
|
|
20
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_MEASURE_UNIT),
|
|
21
|
+
isRemote: false
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 2, className: mapClasses.measureToolFormValue, children: [
|
|
25
|
+
/* @__PURE__ */ jsx("span", { className: mapClasses.measureToolFormValueDistance, children: value }),
|
|
26
|
+
/* @__PURE__ */ jsx("span", { className: mapClasses.measureToolFormValueSymbol, children: magnitudFactor.symbol })
|
|
27
|
+
] })
|
|
28
|
+
] });
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
MeasureData as M
|
|
32
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useFormContext, useWatch } from "react-hook-form";
|
|
3
|
+
import { ActionsContainer, Button } from "@m4l/components";
|
|
4
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
5
|
+
import { M as MAP_DICCTIONARY } from "../../../../../../../../dictionary.js";
|
|
6
|
+
function MyActions() {
|
|
7
|
+
const { control, setValue } = useFormContext();
|
|
8
|
+
const { getLabel } = useModuleDictionary();
|
|
9
|
+
const fieldsWatch = useWatch({
|
|
10
|
+
control,
|
|
11
|
+
name: ["statusEdition", "reInits"]
|
|
12
|
+
});
|
|
13
|
+
const statusEdition = fieldsWatch[0];
|
|
14
|
+
const initCancelDraw = () => {
|
|
15
|
+
if (statusEdition === "initial") {
|
|
16
|
+
setValue("statusEdition", "draw");
|
|
17
|
+
} else if (statusEdition === "draw") {
|
|
18
|
+
setValue("statusEdition", "initial");
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ jsx(ActionsContainer, { children: /* @__PURE__ */ jsx(
|
|
22
|
+
Button,
|
|
23
|
+
{
|
|
24
|
+
onClick: initCancelDraw,
|
|
25
|
+
label: statusEdition === "initial" ? getLabel(MAP_DICCTIONARY.LABEL_MEASURE_START) : getLabel(MAP_DICCTIONARY.LABEL_MEASURE_CANCEL)
|
|
26
|
+
}
|
|
27
|
+
) });
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
MyActions as M
|
|
31
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FormStatusLoad } from '@m4l/components';
|
|
2
|
+
import { FormGeneralDataValues } from './subcomponents/MeasureData/types';
|
|
3
|
+
export type StatusEdition = 'initial' | 'draw';
|
|
4
|
+
export type FormMeasureValues = FormGeneralDataValues & {
|
|
5
|
+
statusLoad: FormStatusLoad;
|
|
6
|
+
reInits: number;
|
|
7
|
+
statusEdition: StatusEdition;
|
|
8
|
+
value: string | null;
|
|
9
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { useMap } from "react-leaflet";
|
|
4
|
+
import { IconButton } from "@m4l/components";
|
|
5
|
+
import { M as MAP_ICONS } from "../../../../../../icons.js";
|
|
6
|
+
import { useEnvironment } from "@m4l/core";
|
|
7
|
+
import { m as mapClasses } from "../../../../../../classes/index.js";
|
|
8
|
+
function ZoomButtons() {
|
|
9
|
+
const map = useMap();
|
|
10
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
11
|
+
const [, setZoomInDisabled] = useState(false);
|
|
12
|
+
const [, setZoomOutDisabled] = useState(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const updateButtonState = () => {
|
|
15
|
+
const currentZoom = map.getZoom();
|
|
16
|
+
const maxZoom = map.getMaxZoom();
|
|
17
|
+
const minZoom = map.getMinZoom();
|
|
18
|
+
setZoomInDisabled(currentZoom === maxZoom);
|
|
19
|
+
setZoomOutDisabled(currentZoom === minZoom);
|
|
20
|
+
};
|
|
21
|
+
map.on("zoomend", updateButtonState);
|
|
22
|
+
updateButtonState();
|
|
23
|
+
return () => {
|
|
24
|
+
map.off("zoomend", updateButtonState);
|
|
25
|
+
};
|
|
26
|
+
}, [map]);
|
|
27
|
+
const handleZoomIn = () => {
|
|
28
|
+
map.zoomIn();
|
|
29
|
+
};
|
|
30
|
+
const handleZoomOut = () => {
|
|
31
|
+
map.zoomOut();
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", { className: mapClasses.zoomButtons, children: [
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
IconButton,
|
|
36
|
+
{
|
|
37
|
+
onClick: handleZoomIn,
|
|
38
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_ZOOM_IN}`
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
IconButton,
|
|
43
|
+
{
|
|
44
|
+
onClick: handleZoomOut,
|
|
45
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_ZOOM_OUT}`
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
ZoomButtons as Z
|
|
52
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MapProps } from '../../types';
|
|
2
|
+
export type Localization = {
|
|
3
|
+
/**
|
|
4
|
+
* "lat" Posición en del eje "Y" en grados.
|
|
5
|
+
*/
|
|
6
|
+
lat: number;
|
|
7
|
+
/**
|
|
8
|
+
* "lng" Posición en del eje "X" en grados.
|
|
9
|
+
*/
|
|
10
|
+
lng: number;
|
|
11
|
+
};
|
|
12
|
+
export type Point = {
|
|
13
|
+
/**
|
|
14
|
+
* "x" Posición en del eje "X" en pixeles.
|
|
15
|
+
*/
|
|
16
|
+
x: number;
|
|
17
|
+
/**
|
|
18
|
+
* "y" Posición en del eje "Y" en pixeles.
|
|
19
|
+
*/
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
export type ControlsProps = Pick<MapProps, 'tools'>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { shallow } from "zustand/shallow";
|
|
3
|
+
import { M as MyLayer } from "./subcomponents/MyLayer/index.js";
|
|
4
|
+
import L__default from "leaflet";
|
|
5
|
+
import React, { useEffect } from "react";
|
|
6
|
+
import { useMap } from "react-leaflet";
|
|
7
|
+
import { u as useAutoFocus } from "../../hooks/useAutoFocus/index.js";
|
|
8
|
+
import { u as useMapStore } from "../../hooks/useMapStore/index.js";
|
|
9
|
+
const LayersContainer = () => {
|
|
10
|
+
const layersId = useMapStore((state) => state.layersIds, shallow);
|
|
11
|
+
const isSkeleton = useMapStore((state) => state.ownerState.isSkeleton, shallow);
|
|
12
|
+
const map = useMap();
|
|
13
|
+
useAutoFocus();
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!map) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
L__default.control.scale().addTo(map);
|
|
19
|
+
return () => {
|
|
20
|
+
L__default.control.scale().remove();
|
|
21
|
+
};
|
|
22
|
+
}, [map]);
|
|
23
|
+
if (isSkeleton) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
if (!map) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return /* @__PURE__ */ jsx(React.Fragment, { children: layersId.map((l) => /* @__PURE__ */ jsx(MyLayer, { layerId: l }, l)) });
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
LayersContainer as L
|
|
33
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LayerProps } from './types';
|
|
3
|
+
export type LefaletLayerRef = {
|
|
4
|
+
clickTimeout: NodeJS.Timeout | null;
|
|
5
|
+
clickCount: number;
|
|
6
|
+
handleClickSetted: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* "MyLayer" Este compoente es el encargado de renderizar todos los features de una capa.
|
|
10
|
+
* Utilizando la propiedad renderFeature, que tiene cada capa.
|
|
11
|
+
* @param props
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare const MyLayer: React.FC<LayerProps>;
|