@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,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Componente que renderiza las herramientas de GPS a traves de los tabs
|
|
3
|
+
* Funcionalidad:
|
|
4
|
+
* - Cuando se cambia el tab, se actualiza el subtitulo del popup
|
|
5
|
+
* - Los tabs no visible se ocultan a traves de css, para que no destruyan los componentes evitando
|
|
6
|
+
* la recargar de los mismos entre cambio de pestañas.
|
|
7
|
+
* @returns Tabs con las herramientas de GPS
|
|
8
|
+
*/
|
|
9
|
+
export declare function TabsGpsTools(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useEffect } from "react";
|
|
3
|
+
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
4
|
+
import "leaflet";
|
|
5
|
+
import { shallow } from "zustand/shallow";
|
|
6
|
+
import "@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css";
|
|
7
|
+
import "@geoman-io/leaflet-geoman-free";
|
|
8
|
+
import clsx from "clsx";
|
|
9
|
+
import { D as DivTabGpsToolsRoot } from "../../styles.js";
|
|
10
|
+
import { usePopupsStore, Tabs, Tab, Icon, TabContent } from "@m4l/components";
|
|
11
|
+
import { G as GeofencesList } from "./subcomponents/GeofencesList/index.js";
|
|
12
|
+
import { u as useLayers } from "../../hooks/useLayers/index.js";
|
|
13
|
+
import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../dictionary.js";
|
|
14
|
+
import { g as gpsToolsClasses } from "../../classes/index.js";
|
|
15
|
+
import { M as MAP_GPSTOOLS_ICONS } from "../../icons.js";
|
|
16
|
+
import { c as GPS_TOOLS_POPUP_ID } from "../../../GpsMap/constants.js";
|
|
17
|
+
import { u as useGpsMapToolsStore } from "../../hooks/useGpsMapToolsStore/index.js";
|
|
18
|
+
function TabsGpsTools() {
|
|
19
|
+
const { getLabel } = useModuleDictionary();
|
|
20
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
21
|
+
const status = useGpsMapToolsStore((state) => state.ownerState.status, shallow);
|
|
22
|
+
const currentTabTool = useGpsMapToolsStore((state) => state.currentTabGpsTool, shallow);
|
|
23
|
+
const { setCurrentTabTool } = useGpsMapToolsStore((state) => state.gpsToolsActions, shallow);
|
|
24
|
+
const { update } = usePopupsStore((state) => state.popupActions, shallow);
|
|
25
|
+
const toolTabs = useMemo(() => {
|
|
26
|
+
return [
|
|
27
|
+
{
|
|
28
|
+
id: "geofences",
|
|
29
|
+
iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCES}`,
|
|
30
|
+
component: /* @__PURE__ */ jsx(GeofencesList, {}),
|
|
31
|
+
label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_TAB_GEO),
|
|
32
|
+
className: gpsToolsClasses.gpsToolsGeofencesList
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
}, [getLabel]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
update(GPS_TOOLS_POPUP_ID, {
|
|
38
|
+
subTitle: currentTabTool === "geofences" ? getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_TAB_GEO) : ""
|
|
39
|
+
});
|
|
40
|
+
}, [currentTabTool]);
|
|
41
|
+
useLayers();
|
|
42
|
+
if (status !== "ready") {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return /* @__PURE__ */ jsxs(DivTabGpsToolsRoot, { className: gpsToolsClasses.gpsToolsRoot, children: [
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
Tabs,
|
|
48
|
+
{
|
|
49
|
+
value: currentTabTool,
|
|
50
|
+
scrollButtons: "auto",
|
|
51
|
+
variant: "scrollable",
|
|
52
|
+
allowScrollButtonsMobile: true,
|
|
53
|
+
onChange: (_e, value) => setCurrentTabTool(value),
|
|
54
|
+
children: toolTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
55
|
+
Tab,
|
|
56
|
+
{
|
|
57
|
+
value: tab.id,
|
|
58
|
+
icon: /* @__PURE__ */ jsx(Icon, { src: tab.iconUrl }),
|
|
59
|
+
className: clsx(gpsToolsClasses.gpsToolsTab, tab.className)
|
|
60
|
+
},
|
|
61
|
+
tab.id
|
|
62
|
+
))
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
toolTabs.map((tab) => {
|
|
66
|
+
const isMatched = tab.id === currentTabTool;
|
|
67
|
+
return /* @__PURE__ */ jsx(
|
|
68
|
+
TabContent,
|
|
69
|
+
{
|
|
70
|
+
className: clsx(
|
|
71
|
+
gpsToolsClasses.gpsToolsTabContent,
|
|
72
|
+
tab.className,
|
|
73
|
+
isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
|
|
74
|
+
),
|
|
75
|
+
children: tab.component
|
|
76
|
+
},
|
|
77
|
+
tab.id
|
|
78
|
+
);
|
|
79
|
+
})
|
|
80
|
+
] });
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
TabsGpsTools as T
|
|
84
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FormAddEditValues } from './types';
|
|
2
|
+
export declare const STROKE_COLOR_DEFAULT = "#aaccaa";
|
|
3
|
+
export declare const STROKE_OPACITY_DEFAULT: {
|
|
4
|
+
value: number;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const STROKE_WHEIGTH_DEFAULT: {
|
|
8
|
+
value: number;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const STROKE_DASH_ARRAY_DEFAULT: {
|
|
12
|
+
value: string;
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const FILL_COLOR_DEFAULT = "#aa3000";
|
|
16
|
+
export declare const FILL_OPACITY_DEFAULT: {
|
|
17
|
+
value: number;
|
|
18
|
+
label: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const initialValues: FormAddEditValues;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const STROKE_COLOR_DEFAULT = "#aaccaa";
|
|
2
|
+
const STROKE_OPACITY_DEFAULT = { value: 1, label: "100%" };
|
|
3
|
+
const STROKE_WHEIGTH_DEFAULT = { value: 1, label: "1 px" };
|
|
4
|
+
const STROKE_DASH_ARRAY_DEFAULT = { value: "", label: "-----" };
|
|
5
|
+
const FILL_COLOR_DEFAULT = "#aa3000";
|
|
6
|
+
const FILL_OPACITY_DEFAULT = { value: 0.2, label: "20%" };
|
|
7
|
+
const initialValues = {
|
|
8
|
+
/** General Data */
|
|
9
|
+
name: "",
|
|
10
|
+
geofenceType: null,
|
|
11
|
+
/** Config Data */
|
|
12
|
+
alias: null,
|
|
13
|
+
customerId: null,
|
|
14
|
+
timeMinInSeconds: 5,
|
|
15
|
+
timeMinOutSeconds: 5,
|
|
16
|
+
/** de Apoyo */
|
|
17
|
+
inEdition: false,
|
|
18
|
+
geometry: null,
|
|
19
|
+
lat: null,
|
|
20
|
+
lng: null,
|
|
21
|
+
properties: {
|
|
22
|
+
radius: null,
|
|
23
|
+
/** Style Data */
|
|
24
|
+
strokeColor: STROKE_COLOR_DEFAULT,
|
|
25
|
+
strokeOpacity: STROKE_OPACITY_DEFAULT,
|
|
26
|
+
strokeWeight: STROKE_WHEIGTH_DEFAULT,
|
|
27
|
+
strokeDashArray: STROKE_DASH_ARRAY_DEFAULT,
|
|
28
|
+
fillColor: FILL_COLOR_DEFAULT,
|
|
29
|
+
fillOpacity: FILL_OPACITY_DEFAULT
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
FILL_OPACITY_DEFAULT as F,
|
|
34
|
+
STROKE_DASH_ARRAY_DEFAULT as S,
|
|
35
|
+
FILL_COLOR_DEFAULT as a,
|
|
36
|
+
STROKE_WHEIGTH_DEFAULT as b,
|
|
37
|
+
STROKE_OPACITY_DEFAULT as c,
|
|
38
|
+
STROKE_COLOR_DEFAULT as d,
|
|
39
|
+
initialValues as i
|
|
40
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GeofenceGeometry, GeofenceGetModel, GeofenceTypeId } from '../model';
|
|
2
|
+
import { FormAddEditValues } from './types';
|
|
3
|
+
import * as L from 'leaflet';
|
|
4
|
+
/**
|
|
5
|
+
* TODO: Documentar
|
|
6
|
+
*/
|
|
7
|
+
export declare const getFormStrokeOpacityFromData: (strokeOpacity?: number) => {
|
|
8
|
+
value: number;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* TODO: Documentar
|
|
13
|
+
*/
|
|
14
|
+
export declare const getFormStrokeWeightFromData: (strokeWeight?: number) => {
|
|
15
|
+
value: number;
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* TODO: Documentar
|
|
20
|
+
*/
|
|
21
|
+
export declare const getFormstrokeDashArrayFromData: (strokeDashArray?: string) => {
|
|
22
|
+
value: string;
|
|
23
|
+
label: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* TODO: Documentar
|
|
27
|
+
*/
|
|
28
|
+
export declare const formatDataEnpoint: (response: {
|
|
29
|
+
data: GeofenceGetModel;
|
|
30
|
+
}) => FormAddEditValues;
|
|
31
|
+
/**
|
|
32
|
+
* TODO: Documentar
|
|
33
|
+
*/
|
|
34
|
+
export declare const getLayerFromGeometry: (geometry: GeofenceGeometry | null, geofenceTypeId: GeofenceTypeId | null, radius: number | null, options?: L.PolylineOptions | L.CircleOptions) => L.Circle<any> | L.Polygon<any> | null;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { F as FILL_OPACITY_DEFAULT, a as FILL_COLOR_DEFAULT, S as STROKE_DASH_ARRAY_DEFAULT, b as STROKE_WHEIGTH_DEFAULT, c as STROKE_OPACITY_DEFAULT, d as STROKE_COLOR_DEFAULT, i as initialValues } from "./constants.js";
|
|
2
|
+
import * as L from "leaflet";
|
|
3
|
+
const formatDataEnpoint = (response) => {
|
|
4
|
+
try {
|
|
5
|
+
const { data } = response;
|
|
6
|
+
const obRet = {
|
|
7
|
+
...initialValues,
|
|
8
|
+
inEdition: false,
|
|
9
|
+
name: data.name,
|
|
10
|
+
geometry: data.geometry,
|
|
11
|
+
geofenceType: { id: data.type.id, name: data.type.name, url: "" },
|
|
12
|
+
properties: {
|
|
13
|
+
strokeColor: data.properties.strokeColor || STROKE_COLOR_DEFAULT,
|
|
14
|
+
strokeOpacity: STROKE_OPACITY_DEFAULT,
|
|
15
|
+
//getFormStrokeOpacityFromData(data.properties.strokeOpacity),
|
|
16
|
+
strokeWeight: STROKE_WHEIGTH_DEFAULT,
|
|
17
|
+
//,getFormStrokeWeightFromData(data.properties.strokeWeight) ,
|
|
18
|
+
strokeDashArray: STROKE_DASH_ARRAY_DEFAULT,
|
|
19
|
+
// getFormstrokeDashArrayFromData(data.properties.strokeDashArray) ,
|
|
20
|
+
fillColor: data.properties.fillColor || FILL_COLOR_DEFAULT,
|
|
21
|
+
fillOpacity: FILL_OPACITY_DEFAULT
|
|
22
|
+
//data.properties.fillOpacity || FILL_OPACITY_DEFAULT,
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
if (obRet.geofenceType?.id === "gt_circle") {
|
|
26
|
+
if (data.properties.radius) {
|
|
27
|
+
obRet.properties.radius = data.properties.radius;
|
|
28
|
+
}
|
|
29
|
+
if (data.geometry && data.geometry.type === "Point") {
|
|
30
|
+
obRet.lng = data.geometry.coordinates[0];
|
|
31
|
+
obRet.lat = data.geometry.coordinates[1];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return obRet;
|
|
35
|
+
} catch (_e) {
|
|
36
|
+
return { ...initialValues };
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const getLayerFromGeometry = (geometry, geofenceTypeId, radius, options) => {
|
|
40
|
+
if (geometry) {
|
|
41
|
+
if (geofenceTypeId === "gt_circle" && geometry.type === "Point") {
|
|
42
|
+
return L.circle([geometry.coordinates[1], geometry.coordinates[0]], {
|
|
43
|
+
...options,
|
|
44
|
+
radius: radius || 0
|
|
45
|
+
});
|
|
46
|
+
} else if (geofenceTypeId === "gt_polygon" && geometry.type === "Polygon") {
|
|
47
|
+
const coordinates = geometry.coordinates.map(
|
|
48
|
+
(ring) => ring.map((position) => [position[1], position[0]])
|
|
49
|
+
);
|
|
50
|
+
return L.polygon(coordinates, options);
|
|
51
|
+
} else if (geofenceTypeId === "gt_rectangle" && geometry.type === "Polygon") {
|
|
52
|
+
const latLngs = geometry.coordinates[0].map(
|
|
53
|
+
(coord) => [coord[1], coord[0]]
|
|
54
|
+
);
|
|
55
|
+
const lats = latLngs.map((coord) => {
|
|
56
|
+
if (Array.isArray(coord)) {
|
|
57
|
+
return coord[0];
|
|
58
|
+
}
|
|
59
|
+
return 0;
|
|
60
|
+
});
|
|
61
|
+
const lngs = latLngs.map((coord) => {
|
|
62
|
+
if (Array.isArray(coord)) {
|
|
63
|
+
return coord[1];
|
|
64
|
+
}
|
|
65
|
+
return 0;
|
|
66
|
+
});
|
|
67
|
+
const southWest = [Math.min(...lats), Math.min(...lngs)];
|
|
68
|
+
const northEast = [Math.max(...lats), Math.max(...lngs)];
|
|
69
|
+
return L.rectangle([southWest, northEast], options);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
formatDataEnpoint as f,
|
|
76
|
+
getLayerFromGeometry as g
|
|
77
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hook Encargado manejar los eventos de dibujo y setear en hook forms values,
|
|
3
|
+
* los datos asociados a una geocerca
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* TODO: Documentar
|
|
8
|
+
*/
|
|
9
|
+
export declare function useDrawing(): {
|
|
10
|
+
inEdition: boolean;
|
|
11
|
+
handleDraw: () => void;
|
|
12
|
+
handleFinish: () => void;
|
|
13
|
+
geometrTypeIdCached: "gt_polygon" | "gt_circle" | "gt_rectangle" | null;
|
|
14
|
+
};
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { useState, useRef, useEffect, useCallback } from "react";
|
|
2
|
+
import { useFormContext, useWatch } from "react-hook-form";
|
|
3
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import { useMap } from "react-leaflet";
|
|
5
|
+
import { g as getLayerFromGeometry } from "../helpers.js";
|
|
6
|
+
import { useFormReadyForUpdate } from "@m4l/components";
|
|
7
|
+
import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../../../../dictionary.js";
|
|
8
|
+
function useDrawing() {
|
|
9
|
+
const { getLabel } = useModuleDictionary();
|
|
10
|
+
const readyToUpdate = useFormReadyForUpdate();
|
|
11
|
+
const map = useMap();
|
|
12
|
+
const { control, setValue } = useFormContext();
|
|
13
|
+
const fieldsWatch = useWatch({
|
|
14
|
+
control,
|
|
15
|
+
name: [
|
|
16
|
+
"geofenceType",
|
|
17
|
+
"inEdition",
|
|
18
|
+
"properties.strokeColor",
|
|
19
|
+
"properties.strokeOpacity",
|
|
20
|
+
"properties.strokeWeight",
|
|
21
|
+
"properties.strokeDashArray",
|
|
22
|
+
"properties.fillColor",
|
|
23
|
+
"properties.fillOpacity",
|
|
24
|
+
"geometry",
|
|
25
|
+
"properties.radius"
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
const geofenceTypeId = fieldsWatch[0]?.id;
|
|
29
|
+
const inEdition = fieldsWatch[1];
|
|
30
|
+
const strokeColor = fieldsWatch[2];
|
|
31
|
+
const strokeOpacity = fieldsWatch[3].value;
|
|
32
|
+
const strokeWeight = fieldsWatch[4].value;
|
|
33
|
+
const strokeDashArray = fieldsWatch[5].value;
|
|
34
|
+
const fillColor = fieldsWatch[6];
|
|
35
|
+
const fillOpacity = fieldsWatch[7].value;
|
|
36
|
+
const geometry = fieldsWatch[8];
|
|
37
|
+
const radius = fieldsWatch[9];
|
|
38
|
+
const [drawing, setDrawing] = useState(false);
|
|
39
|
+
const currentLayer = useRef(null);
|
|
40
|
+
const [geometrTypeIdCached, setgeofenceTypeIdCached] = useState(geofenceTypeId);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (geometry) {
|
|
43
|
+
currentLayer.current = getLayerFromGeometry(geometry, geofenceTypeId, radius, {
|
|
44
|
+
color: strokeColor,
|
|
45
|
+
opacity: strokeOpacity,
|
|
46
|
+
weight: strokeWeight,
|
|
47
|
+
dashArray: strokeDashArray,
|
|
48
|
+
fillColor,
|
|
49
|
+
fillOpacity
|
|
50
|
+
});
|
|
51
|
+
if (currentLayer.current) {
|
|
52
|
+
map.addLayer(currentLayer.current);
|
|
53
|
+
map.fitBounds(currentLayer.current.getBounds());
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return () => {
|
|
57
|
+
if (currentLayer.current) {
|
|
58
|
+
currentLayer.current.remove();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}, [map]);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (currentLayer.current) {
|
|
64
|
+
currentLayer.current.setStyle({
|
|
65
|
+
color: strokeColor,
|
|
66
|
+
opacity: strokeOpacity,
|
|
67
|
+
weight: strokeWeight,
|
|
68
|
+
dashArray: strokeDashArray,
|
|
69
|
+
fillColor,
|
|
70
|
+
fillOpacity
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}, [strokeColor, strokeOpacity, strokeWeight, strokeDashArray, fillColor, fillOpacity]);
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
map.pm.setLang("en", {
|
|
76
|
+
tooltips: {
|
|
77
|
+
placeMarker: void 0,
|
|
78
|
+
firstVertex: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FIRST_VERTEX),
|
|
79
|
+
continueLine: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_CONTINUE_LINE),
|
|
80
|
+
finishLine: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_LINE),
|
|
81
|
+
finishPoly: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_POLY),
|
|
82
|
+
finishRect: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_RECT),
|
|
83
|
+
startCircle: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_START_CIRCLE),
|
|
84
|
+
finishCircle: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_CIRCLE),
|
|
85
|
+
placeCircleMarker: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_PLACE_CIRCLE_MARKER)
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}, [map, getLabel]);
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
if (map) {
|
|
91
|
+
let shape = "Circle";
|
|
92
|
+
if (geometrTypeIdCached === "gt_polygon") {
|
|
93
|
+
shape = "Polygon";
|
|
94
|
+
} else if (geometrTypeIdCached === "gt_rectangle") {
|
|
95
|
+
shape = "Rectangle";
|
|
96
|
+
}
|
|
97
|
+
if (drawing) {
|
|
98
|
+
if (!currentLayer.current) {
|
|
99
|
+
setValue("inEdition", true);
|
|
100
|
+
if (shape === "Circle") {
|
|
101
|
+
map.on("pm:drawstart", ({ workingLayer }) => {
|
|
102
|
+
workingLayer.on("pm:centerplaced", (e) => {
|
|
103
|
+
const layer = e.workingLayer;
|
|
104
|
+
layer.setStyle({
|
|
105
|
+
color: strokeColor,
|
|
106
|
+
opacity: strokeOpacity,
|
|
107
|
+
weight: strokeWeight,
|
|
108
|
+
dashArray: strokeDashArray,
|
|
109
|
+
fillColor,
|
|
110
|
+
fillOpacity
|
|
111
|
+
});
|
|
112
|
+
setValue("lat", Number(layer.getLatLng().lat.toFixed(8)));
|
|
113
|
+
setValue("lng", Number(layer.getLatLng().lng.toFixed(8)));
|
|
114
|
+
layer.on("pm:change", (_e) => {
|
|
115
|
+
setValue("properties.radius", Number(layer.getRadius().toFixed(1)));
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
setValue("properties.subType", shape);
|
|
120
|
+
} else if (shape === "Polygon") {
|
|
121
|
+
map.on("pm:drawstart", ({ workingLayer }) => {
|
|
122
|
+
workingLayer.on("pm:vertexadded", (e) => {
|
|
123
|
+
const layer = e.workingLayer;
|
|
124
|
+
layer.setStyle({
|
|
125
|
+
color: strokeColor,
|
|
126
|
+
opacity: strokeOpacity,
|
|
127
|
+
weight: strokeWeight,
|
|
128
|
+
dashArray: strokeDashArray,
|
|
129
|
+
fillColor,
|
|
130
|
+
fillOpacity
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
map.pm.enableDraw(shape);
|
|
136
|
+
map.pm.setPathOptions({
|
|
137
|
+
color: strokeColor,
|
|
138
|
+
opacity: strokeOpacity,
|
|
139
|
+
weight: strokeWeight,
|
|
140
|
+
dashArray: strokeDashArray,
|
|
141
|
+
fillColor,
|
|
142
|
+
fillOpacity
|
|
143
|
+
});
|
|
144
|
+
map.on("pm:create", (e) => {
|
|
145
|
+
currentLayer.current = e.layer;
|
|
146
|
+
setValue("geometry", currentLayer.current.toGeoJSON()?.geometry, {
|
|
147
|
+
shouldTouch: false,
|
|
148
|
+
shouldValidate: true
|
|
149
|
+
});
|
|
150
|
+
setValue("inEdition", false);
|
|
151
|
+
setDrawing(false);
|
|
152
|
+
});
|
|
153
|
+
} else {
|
|
154
|
+
currentLayer.current.pm.enable();
|
|
155
|
+
setValue("inEdition", true);
|
|
156
|
+
currentLayer.current.on("pm:disable", (e) => {
|
|
157
|
+
currentLayer.current = e.layer;
|
|
158
|
+
setValue("geometry", currentLayer.current.toGeoJSON()?.geometry, {
|
|
159
|
+
shouldTouch: false,
|
|
160
|
+
shouldValidate: true
|
|
161
|
+
});
|
|
162
|
+
setValue("inEdition", false);
|
|
163
|
+
setDrawing(false);
|
|
164
|
+
});
|
|
165
|
+
if (shape === "Circle") {
|
|
166
|
+
currentLayer.current.on("pm:change", (e) => {
|
|
167
|
+
currentLayer.current = e.layer;
|
|
168
|
+
setValue("lat", Number(currentLayer.current.getLatLng().lat.toFixed(8)));
|
|
169
|
+
setValue("lng", Number(currentLayer.current.getLatLng().lng.toFixed(8)));
|
|
170
|
+
setValue("properties.radius", currentLayer.current.getRadius());
|
|
171
|
+
setValue("properties.radius", Number(currentLayer.current.getRadius().toFixed(1)));
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
map.pm.disableDraw("Polygon");
|
|
177
|
+
map.off("pm:create");
|
|
178
|
+
map.off("pm:edit");
|
|
179
|
+
map.off("pm:drawstart");
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}, [map, drawing]);
|
|
183
|
+
const handleDraw = useCallback(() => {
|
|
184
|
+
setDrawing(true);
|
|
185
|
+
}, []);
|
|
186
|
+
const handleFinish = useCallback(() => {
|
|
187
|
+
if (currentLayer.current) {
|
|
188
|
+
currentLayer.current.pm.disable();
|
|
189
|
+
currentLayer.current.setStyle({ color: "#ff0000", fillColor: "#ff0000" });
|
|
190
|
+
}
|
|
191
|
+
}, []);
|
|
192
|
+
useEffect(() => {
|
|
193
|
+
if (!readyToUpdate) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (geofenceTypeId) {
|
|
197
|
+
if (geofenceTypeId !== geometrTypeIdCached) {
|
|
198
|
+
setgeofenceTypeIdCached(geofenceTypeId);
|
|
199
|
+
if (geometrTypeIdCached !== "gt_circle") {
|
|
200
|
+
setValue("properties.radius", null);
|
|
201
|
+
setValue("lat", null);
|
|
202
|
+
setValue("lng", null);
|
|
203
|
+
}
|
|
204
|
+
setValue("geometry", null);
|
|
205
|
+
if (currentLayer.current) {
|
|
206
|
+
currentLayer.current.remove();
|
|
207
|
+
currentLayer.current = null;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}, [geofenceTypeId]);
|
|
212
|
+
return { inEdition, handleDraw, handleFinish, geometrTypeIdCached };
|
|
213
|
+
}
|
|
214
|
+
export {
|
|
215
|
+
useDrawing as u
|
|
216
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { FormAddEditValues, GeofenceAddEditProps } from '../types';
|
|
3
|
+
export interface UseSubmitProps extends Pick<GeofenceAddEditProps, 'fullRefresh'> {
|
|
4
|
+
objectId?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* TODO: Documentar
|
|
8
|
+
*/
|
|
9
|
+
export declare function useSubmit(props: UseSubmitProps): {
|
|
10
|
+
onSubmit: (data: FormAddEditValues | FieldValues) => Promise<void>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useHostTools, useNetwork } from "@m4l/core";
|
|
2
|
+
import { E as ENDPOINT_GEOFENCE_NEW_EDIT } from "../../constants.js";
|
|
3
|
+
import { usePopupsStore } from "@m4l/components";
|
|
4
|
+
import { shallow } from "zustand/shallow";
|
|
5
|
+
import { u as useGpsMapToolsStore } from "../../../../../hooks/useGpsMapToolsStore/index.js";
|
|
6
|
+
const getSummitData = (values, geofenceId) => {
|
|
7
|
+
const newEditObj = {
|
|
8
|
+
name: values.name,
|
|
9
|
+
typeId: values.geofenceType.id,
|
|
10
|
+
geometry: values.geometry,
|
|
11
|
+
properties: {
|
|
12
|
+
subType: values.properties.subType,
|
|
13
|
+
strokeColor: values.properties.fillColor,
|
|
14
|
+
strokeOpacity: values.properties.strokeOpacity.value,
|
|
15
|
+
strokeWeight: values.properties.strokeWeight.value,
|
|
16
|
+
strokeDashArray: values.properties.strokeDashArray.value,
|
|
17
|
+
fillColor: values.properties.fillColor,
|
|
18
|
+
fillOpacity: values.properties.fillOpacity.value
|
|
19
|
+
},
|
|
20
|
+
timeMinInSeconds: values.timeMinInSeconds,
|
|
21
|
+
timeMinOutSeconds: values.timeMinOutSeconds,
|
|
22
|
+
alias: values.alias,
|
|
23
|
+
customerId: values.customerId,
|
|
24
|
+
...geofenceId ? { geofenceId } : {}
|
|
25
|
+
};
|
|
26
|
+
if (values.geofenceType.id === "gt_circle") {
|
|
27
|
+
newEditObj.properties.radius = values.properties.radius;
|
|
28
|
+
}
|
|
29
|
+
return newEditObj;
|
|
30
|
+
};
|
|
31
|
+
function useSubmit(props) {
|
|
32
|
+
const { objectId, fullRefresh } = props;
|
|
33
|
+
const { toast } = useHostTools();
|
|
34
|
+
const { networkOperation } = useNetwork();
|
|
35
|
+
const { close, show } = usePopupsStore((state) => state.popupActions);
|
|
36
|
+
const { addCheckedGeofence } = useGpsMapToolsStore((state) => state.geofenceActions, shallow);
|
|
37
|
+
const onSubmit = async (data) => {
|
|
38
|
+
await networkOperation({
|
|
39
|
+
method: objectId ? "PUT" : "POST",
|
|
40
|
+
endPoint: `${ENDPOINT_GEOFENCE_NEW_EDIT}${objectId ? `/${objectId}` : ""}`,
|
|
41
|
+
data: getSummitData(data, objectId),
|
|
42
|
+
toastError: true,
|
|
43
|
+
toastSuccess: false,
|
|
44
|
+
bodyToSnakeCase: true,
|
|
45
|
+
isRemote: false
|
|
46
|
+
}).then((response) => {
|
|
47
|
+
toast({ title: response.message }, { type: "success" });
|
|
48
|
+
close("geofencesAddEdit");
|
|
49
|
+
show("gpsTools");
|
|
50
|
+
if (objectId !== void 0) {
|
|
51
|
+
addCheckedGeofence(objectId);
|
|
52
|
+
}
|
|
53
|
+
if (fullRefresh) {
|
|
54
|
+
fullRefresh();
|
|
55
|
+
}
|
|
56
|
+
}).catch(() => {
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
return { onSubmit };
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
useSubmit as u
|
|
63
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { useFormContext } from "react-hook-form";
|
|
3
|
+
import { useTab } from "@m4l/components";
|
|
4
|
+
function useSumbitErrorsFocus() {
|
|
5
|
+
const {
|
|
6
|
+
setFocus,
|
|
7
|
+
formState: { isSubmitted, errors }
|
|
8
|
+
} = useFormContext();
|
|
9
|
+
const { handleChange } = useTab();
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (isSubmitted) {
|
|
12
|
+
const firstError = Object.keys(errors).reduce((field, a) => {
|
|
13
|
+
const fieldKey = field;
|
|
14
|
+
return errors[fieldKey] ? fieldKey : a;
|
|
15
|
+
}, null);
|
|
16
|
+
if (firstError) {
|
|
17
|
+
const found = [
|
|
18
|
+
"name",
|
|
19
|
+
"geometry",
|
|
20
|
+
"geofenceType",
|
|
21
|
+
"timeMinInSeconds",
|
|
22
|
+
"timeMinOutSeconds"
|
|
23
|
+
].some((field) => field.includes(firstError));
|
|
24
|
+
if (found) {
|
|
25
|
+
handleChange(null, "general");
|
|
26
|
+
}
|
|
27
|
+
if (firstError) {
|
|
28
|
+
setFocus(firstError);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, [isSubmitted, errors]);
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
useSumbitErrorsFocus as u
|
|
36
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as Yup from 'yup';
|
|
2
|
+
/**
|
|
3
|
+
* TODO: Documentar
|
|
4
|
+
*/
|
|
5
|
+
export declare function useValidation(): {
|
|
6
|
+
validationSchema: Yup.ObjectSchema<import('yup/lib/object').Assign<import('yup/lib/object').ObjectShape, {
|
|
7
|
+
timeMinInSeconds: import('yup/lib/number').RequiredNumberSchema<number | null | undefined, import('yup/lib/types').AnyObject>;
|
|
8
|
+
timeMinOutSeconds: import('yup/lib/number').RequiredNumberSchema<number | null | undefined, import('yup/lib/types').AnyObject>;
|
|
9
|
+
name: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
10
|
+
geometry: import('yup/lib/object').RequiredObjectSchema<import('yup/lib/object').ObjectShape, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<import('yup/lib/object').ObjectShape> | null>;
|
|
11
|
+
geofenceType: import('yup/lib/object').RequiredObjectSchema<import('yup/lib/object').ObjectShape, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<import('yup/lib/object').ObjectShape> | null>;
|
|
12
|
+
}>, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<import('yup/lib/object').Assign<import('yup/lib/object').ObjectShape, {
|
|
13
|
+
timeMinInSeconds: import('yup/lib/number').RequiredNumberSchema<number | null | undefined, import('yup/lib/types').AnyObject>;
|
|
14
|
+
timeMinOutSeconds: import('yup/lib/number').RequiredNumberSchema<number | null | undefined, import('yup/lib/types').AnyObject>;
|
|
15
|
+
name: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
16
|
+
geometry: import('yup/lib/object').RequiredObjectSchema<import('yup/lib/object').ObjectShape, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<import('yup/lib/object').ObjectShape> | null>;
|
|
17
|
+
geofenceType: import('yup/lib/object').RequiredObjectSchema<import('yup/lib/object').ObjectShape, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<import('yup/lib/object').ObjectShape> | null>;
|
|
18
|
+
}>>, import('yup/lib/object').AssertsShape<import('yup/lib/object').Assign<import('yup/lib/object').ObjectShape, {
|
|
19
|
+
timeMinInSeconds: import('yup/lib/number').RequiredNumberSchema<number | null | undefined, import('yup/lib/types').AnyObject>;
|
|
20
|
+
timeMinOutSeconds: import('yup/lib/number').RequiredNumberSchema<number | null | undefined, import('yup/lib/types').AnyObject>;
|
|
21
|
+
name: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
22
|
+
geometry: import('yup/lib/object').RequiredObjectSchema<import('yup/lib/object').ObjectShape, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<import('yup/lib/object').ObjectShape> | null>;
|
|
23
|
+
geofenceType: import('yup/lib/object').RequiredObjectSchema<import('yup/lib/object').ObjectShape, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<import('yup/lib/object').ObjectShape> | null>;
|
|
24
|
+
}>>>;
|
|
25
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
3
|
+
import * as Yup from "yup";
|
|
4
|
+
import { G as GeneralDataValidation } from "../subcomponents/GeneralData/validations.js";
|
|
5
|
+
import { C as ConfigDataValidation } from "../subcomponents/ConfigData/validations.js";
|
|
6
|
+
function useValidation() {
|
|
7
|
+
const { getLabel } = useModuleDictionary();
|
|
8
|
+
const validationSchema = useMemo(
|
|
9
|
+
() => Yup.object().shape({
|
|
10
|
+
...GeneralDataValidation(getLabel),
|
|
11
|
+
...ConfigDataValidation(getLabel)
|
|
12
|
+
}),
|
|
13
|
+
[getLabel]
|
|
14
|
+
);
|
|
15
|
+
return { validationSchema };
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
useValidation as u
|
|
19
|
+
};
|