@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,113 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useNetwork, useModuleDictionary, useModulePrivileges, useEnvironment, useHostTools } from "@m4l/core";
|
|
3
|
+
import { useState, useCallback } from "react";
|
|
4
|
+
import { M as MAP_GPSTOOLS_ICONS } from "../../../../../icons.js";
|
|
5
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
6
|
+
import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../../../../dictionary.js";
|
|
7
|
+
import { useModal, usePopupsStore, WindowConfirm } from "@m4l/components";
|
|
8
|
+
import { shallow } from "zustand/shallow";
|
|
9
|
+
import { G as GeofenceAddEdit } from "../../GeofenceAddEdit/index.js";
|
|
10
|
+
import { u as useGpsMapToolsStore } from "../../../../../hooks/useGpsMapToolsStore/index.js";
|
|
11
|
+
function useRowActionsGetter(props) {
|
|
12
|
+
const { fullRefresh } = props;
|
|
13
|
+
const { networkOperation } = useNetwork();
|
|
14
|
+
const { openModal, closeModal } = useModal();
|
|
15
|
+
const { getLabel } = useModuleDictionary();
|
|
16
|
+
const { hasPrivilege } = useModulePrivileges();
|
|
17
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
18
|
+
const { addPopup } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
19
|
+
const { hide } = usePopupsStore((state) => state.popupActions, shallow);
|
|
20
|
+
const { removeCheckedGeofence } = useGpsMapToolsStore((state) => state.geofenceActions, shallow);
|
|
21
|
+
const { toast } = useHostTools();
|
|
22
|
+
const isDesktop = useResponsiveDesktop();
|
|
23
|
+
const [urlIconEdit] = useState(
|
|
24
|
+
`${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_EDIT}`
|
|
25
|
+
);
|
|
26
|
+
const [urlIconDelete] = useState(
|
|
27
|
+
`${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_DELETE}`
|
|
28
|
+
);
|
|
29
|
+
const goEdit = (objectId, name) => {
|
|
30
|
+
hide("gpsTools");
|
|
31
|
+
addPopup({
|
|
32
|
+
winType: "component",
|
|
33
|
+
popupId: "geofencesAddEdit",
|
|
34
|
+
title: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODULE_NAME_GEOFENCE_EDIT),
|
|
35
|
+
editionInfo: `${getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_ID)}:${objectId} - ${name} `,
|
|
36
|
+
componentProps: { fullRefresh, geofenceId: objectId },
|
|
37
|
+
component: GeofenceAddEdit,
|
|
38
|
+
// onMouseDown,
|
|
39
|
+
defaultPosition: {
|
|
40
|
+
vertical: { top: 50, bottom: 50 },
|
|
41
|
+
horizontal: { right: 50, width: 380 }
|
|
42
|
+
// left:490,top:50,width:360, height:420},
|
|
43
|
+
// bounds:{top:5, left:5, right:-5, bottom:-5}
|
|
44
|
+
},
|
|
45
|
+
iconUrl: urlIconEdit
|
|
46
|
+
});
|
|
47
|
+
removeCheckedGeofence(objectId);
|
|
48
|
+
};
|
|
49
|
+
const onDelete = useCallback(
|
|
50
|
+
(row) => {
|
|
51
|
+
openModal({
|
|
52
|
+
window: /* @__PURE__ */ jsx(
|
|
53
|
+
WindowConfirm,
|
|
54
|
+
{
|
|
55
|
+
title: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODAL_DELETE_GEO_TITLE),
|
|
56
|
+
msg: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODAL_DELETE_GEO_MESSAGE),
|
|
57
|
+
onClickIntro: () => onConfirmDelete(row)
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
variant: "delete",
|
|
61
|
+
initialWidth: 300,
|
|
62
|
+
initialHeight: 350
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
66
|
+
[getLabel]
|
|
67
|
+
);
|
|
68
|
+
const onConfirmDelete = useCallback((row) => {
|
|
69
|
+
networkOperation({
|
|
70
|
+
method: "DELETE",
|
|
71
|
+
endPoint: `geofences/${row.id}`
|
|
72
|
+
}).then((response) => {
|
|
73
|
+
toast({ title: response.message }, { type: "success" });
|
|
74
|
+
fullRefresh();
|
|
75
|
+
});
|
|
76
|
+
closeModal();
|
|
77
|
+
}, []);
|
|
78
|
+
const rowActionsGetter = useCallback(
|
|
79
|
+
(row) => {
|
|
80
|
+
const conditionalItems = [];
|
|
81
|
+
conditionalItems.push({
|
|
82
|
+
type: "menuItem",
|
|
83
|
+
startIcon: urlIconEdit,
|
|
84
|
+
label: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_EDIT,
|
|
85
|
+
onClick: () => {
|
|
86
|
+
goEdit(row.id, row.name);
|
|
87
|
+
},
|
|
88
|
+
// Solo se habilita si intenta editarse a él mismo, o si tiene permisos pero está en un nivel superior al usuario a editar
|
|
89
|
+
// disabled: !(itsMe || (hasPrivilege(PRIVILEGE_EDIT) && (loggedUserType > row.user_type.id)))
|
|
90
|
+
disabled: !row.authUserOptions.edit
|
|
91
|
+
});
|
|
92
|
+
conditionalItems.push({
|
|
93
|
+
type: "menuItem",
|
|
94
|
+
startIcon: urlIconDelete,
|
|
95
|
+
label: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_DELETE,
|
|
96
|
+
onClick: () => {
|
|
97
|
+
onDelete(row);
|
|
98
|
+
},
|
|
99
|
+
error: true,
|
|
100
|
+
// Solo se habilita si intenta editarse a él mismo, o si tiene permisos pero está en un nivel superior al usuario a editar
|
|
101
|
+
// disabled: !(itsMe || (hasPrivilege(PRIVILEGE_EDIT) && (loggedUserType > row.user_type.id)))
|
|
102
|
+
disabled: !row.authUserOptions.edit
|
|
103
|
+
});
|
|
104
|
+
return conditionalItems;
|
|
105
|
+
},
|
|
106
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
107
|
+
[hasPrivilege, goEdit, onDelete, urlIconDelete, urlIconEdit, isDesktop]
|
|
108
|
+
);
|
|
109
|
+
return { rowActionsGetter };
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
useRowActionsGetter as u
|
|
113
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DataGrid, ActionsContainer, Button } from "@m4l/components";
|
|
3
|
+
import { F as Filter } from "./subcomponents/Filter/index.js";
|
|
4
|
+
import { u as useMaster } from "./hooks/useMaster.js";
|
|
5
|
+
import { g as gpsToolsClasses } from "../../../../classes/index.js";
|
|
6
|
+
import { S as StackGeofenceListRoot } from "./styles.js";
|
|
7
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
8
|
+
import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../../../dictionary.js";
|
|
9
|
+
function GeofencesList() {
|
|
10
|
+
const { getLabel } = useModuleDictionary();
|
|
11
|
+
const {
|
|
12
|
+
refresh,
|
|
13
|
+
setBackendQueryParams,
|
|
14
|
+
columns,
|
|
15
|
+
rows,
|
|
16
|
+
rowActionsGetter,
|
|
17
|
+
selectedRows,
|
|
18
|
+
onSelectedRowsChange,
|
|
19
|
+
pagerState,
|
|
20
|
+
onPageChange,
|
|
21
|
+
onRowsPerPageChange,
|
|
22
|
+
checkedRows,
|
|
23
|
+
onCheckedRowsChange,
|
|
24
|
+
setRows,
|
|
25
|
+
rowKeyGetter,
|
|
26
|
+
goToAdd
|
|
27
|
+
} = useMaster();
|
|
28
|
+
return /* @__PURE__ */ jsxs(
|
|
29
|
+
StackGeofenceListRoot,
|
|
30
|
+
{
|
|
31
|
+
direction: "column",
|
|
32
|
+
gap: "8px",
|
|
33
|
+
className: gpsToolsClasses.gpsToolsGeofencesList,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx(Filter, { refresh, setBackendQueryParams }),
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
DataGrid,
|
|
38
|
+
{
|
|
39
|
+
id: "geofences",
|
|
40
|
+
columns,
|
|
41
|
+
rows,
|
|
42
|
+
onRowsChange: setRows,
|
|
43
|
+
checkedRows,
|
|
44
|
+
onCheckedRowsChange,
|
|
45
|
+
rowActionsGetter,
|
|
46
|
+
rowKeyGetter,
|
|
47
|
+
selectedRows,
|
|
48
|
+
onSelectedRowsChange,
|
|
49
|
+
withActions: true,
|
|
50
|
+
actionsProps: {
|
|
51
|
+
withPager: true,
|
|
52
|
+
withLocalFilters: true,
|
|
53
|
+
pagerOptions: {
|
|
54
|
+
records: rows.length,
|
|
55
|
+
totalRecords: pagerState.totalRecords,
|
|
56
|
+
rowsPerPageOptions: [1, 2, 3, 4, 5, 10, 25],
|
|
57
|
+
page: pagerState.page,
|
|
58
|
+
rowsPerPage: pagerState.rowsPerPage,
|
|
59
|
+
onPageChange,
|
|
60
|
+
onRowsPerPageChange
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"list"
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ jsx(ActionsContainer, { children: /* @__PURE__ */ jsx(Button, { onClick: () => goToAdd(), label: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODULE_NAME_GEOFENCE_ADD) }) })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
GeofencesList as G
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StackGeofenceListRoot: import('@emotion/styled').StyledComponent<import('@m4l/components').StackProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, {}, {}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface FilterProps {
|
|
2
|
+
refresh: () => void;
|
|
3
|
+
setBackendQueryParams: React.Dispatch<React.SetStateAction<Record<string, unknown>>>;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* TODO: Documentar
|
|
7
|
+
*/
|
|
8
|
+
export declare function Filter(props: FilterProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DynamicFilter } from "@m4l/components";
|
|
3
|
+
import { useEnvironment } from "@m4l/core";
|
|
4
|
+
import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../../../../../dictionary.js";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { c as COMPONENT_MAP_TOOLS_ID } from "../../../../../../constants.js";
|
|
7
|
+
import { M as MAP_GPSTOOLS_ICONS } from "../../../../../../icons.js";
|
|
8
|
+
function Filter(props) {
|
|
9
|
+
const { refresh, setBackendQueryParams } = props;
|
|
10
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
11
|
+
const [initialFilter] = useState(() => {
|
|
12
|
+
return [];
|
|
13
|
+
});
|
|
14
|
+
const onChangeFilter = (_initialFilters, rawFilters) => {
|
|
15
|
+
setBackendQueryParams({
|
|
16
|
+
f: rawFilters
|
|
17
|
+
});
|
|
18
|
+
refresh();
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
DynamicFilter,
|
|
22
|
+
{
|
|
23
|
+
withAllField: true,
|
|
24
|
+
onChangeFilters: onChangeFilter,
|
|
25
|
+
fields: [
|
|
26
|
+
{
|
|
27
|
+
name: "id",
|
|
28
|
+
dictionaryId: MAP_GPSTOOLS_DICCTIONARY.LABEL_ID,
|
|
29
|
+
type: "number",
|
|
30
|
+
multiple: true,
|
|
31
|
+
presence: "optional",
|
|
32
|
+
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_ID}`
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "name",
|
|
36
|
+
dictionaryId: MAP_GPSTOOLS_DICCTIONARY.LABEL_NAME,
|
|
37
|
+
type: "string",
|
|
38
|
+
multiple: true,
|
|
39
|
+
presence: "optional",
|
|
40
|
+
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_NAME}`
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
initialAppliedFilters: initialFilter
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
Filter as F
|
|
49
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const ENDPOINT_GEOFENCE_GET = "geofences";
|
|
2
|
+
export declare const ENDPOINT_GEOFENCE_NEW_EDIT = "geofences";
|
|
3
|
+
export declare enum GeofencesFeaturesLayers {
|
|
4
|
+
LAYER_GEOFENCES = "geofences",
|
|
5
|
+
LAYER_GEOFENCES_TRANSIT_FEATURES = "geofencesCrossingFeatures",
|
|
6
|
+
LAYER_GEOFENCES_INTERNAL_FEATURES = "geofencesInternalFeatures"
|
|
7
|
+
}
|
package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/constants.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const ENDPOINT_GEOFENCE_GET = "geofences";
|
|
2
|
+
const ENDPOINT_GEOFENCE_NEW_EDIT = "geofences";
|
|
3
|
+
var GeofencesFeaturesLayers = /* @__PURE__ */ ((GeofencesFeaturesLayers2) => {
|
|
4
|
+
GeofencesFeaturesLayers2["LAYER_GEOFENCES"] = "geofences";
|
|
5
|
+
GeofencesFeaturesLayers2["LAYER_GEOFENCES_TRANSIT_FEATURES"] = "geofencesCrossingFeatures";
|
|
6
|
+
GeofencesFeaturesLayers2["LAYER_GEOFENCES_INTERNAL_FEATURES"] = "geofencesInternalFeatures";
|
|
7
|
+
return GeofencesFeaturesLayers2;
|
|
8
|
+
})(GeofencesFeaturesLayers || {});
|
|
9
|
+
export {
|
|
10
|
+
ENDPOINT_GEOFENCE_NEW_EDIT as E,
|
|
11
|
+
GeofencesFeaturesLayers as G,
|
|
12
|
+
ENDPOINT_GEOFENCE_GET as a
|
|
13
|
+
};
|
package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/model.d.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { GeofenceId } from '../../../contexts/GpsMapToolsContext/types';
|
|
2
|
+
import { Feature, GeoJsonProperties, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon } from '../../../../GpsMap/contexts/MapContext/types';
|
|
3
|
+
/**
|
|
4
|
+
* Tipos de geometría compatibles con las geocercas
|
|
5
|
+
*/
|
|
6
|
+
export type GeofenceGeometry = Point | Polygon | MultiPolygon;
|
|
7
|
+
/**
|
|
8
|
+
* Tipos de geometría Compatibles con las geocercas
|
|
9
|
+
*/
|
|
10
|
+
export type CrossingGeometry = Polygon | Point;
|
|
11
|
+
/**
|
|
12
|
+
* Tipos de features de transtio soportados
|
|
13
|
+
*/
|
|
14
|
+
export type CrossingFeature = Feature<CrossingGeometry>;
|
|
15
|
+
export type InternalGeometry = Point | Polygon | MultiPolygon | MultiPoint | LineString | MultiLineString;
|
|
16
|
+
/**
|
|
17
|
+
* Tipos de features de transtio soportados
|
|
18
|
+
*/
|
|
19
|
+
export type InternalFeature = Feature<InternalGeometry>;
|
|
20
|
+
export type GeofenceTypeId = 'gt_polygon' | 'gt_circle' | 'gt_rectangle';
|
|
21
|
+
export type GeofenceType = {
|
|
22
|
+
id: GeofenceTypeId;
|
|
23
|
+
name: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Modelo de datos proveniente del endpoint get de geocercas
|
|
27
|
+
*/
|
|
28
|
+
export interface GeofenceGetModel {
|
|
29
|
+
/**
|
|
30
|
+
* id de la geocerca
|
|
31
|
+
*/
|
|
32
|
+
id: GeofenceId;
|
|
33
|
+
/**
|
|
34
|
+
* "name" nombre dado por el cliente a la geocerca
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
/**
|
|
38
|
+
* "active" si está activa o no lo geocerca
|
|
39
|
+
*/
|
|
40
|
+
active: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* "type" tipo de geocerca con idioma
|
|
43
|
+
*/
|
|
44
|
+
type: GeofenceType;
|
|
45
|
+
/**
|
|
46
|
+
* "geometry" geometría de la geocerca compatible con GeoJSON
|
|
47
|
+
*/
|
|
48
|
+
geometry: GeofenceGeometry;
|
|
49
|
+
/**
|
|
50
|
+
* "properties" propiedades de la geometria
|
|
51
|
+
*/
|
|
52
|
+
properties: GeoJsonProperties;
|
|
53
|
+
/**
|
|
54
|
+
* timeMinInSeconds indica el tiempo mínimo para ingresar a una geocerca
|
|
55
|
+
*/
|
|
56
|
+
timeMinInSeconds: number;
|
|
57
|
+
/**
|
|
58
|
+
* timeMinOutSeconds indica el tiempo mínimo para salir de una geocerca
|
|
59
|
+
*/
|
|
60
|
+
timeMinOutSeconds: number;
|
|
61
|
+
/**
|
|
62
|
+
* "countCrossingFeatures" indica si la cantidad de features de cruce
|
|
63
|
+
*/
|
|
64
|
+
countCrossingFeatures: number;
|
|
65
|
+
/**
|
|
66
|
+
* "countInternalFeatures" indica la cantidad de features internos que tiene la geocerca
|
|
67
|
+
*/
|
|
68
|
+
countInternalFeatures: number;
|
|
69
|
+
/**
|
|
70
|
+
* "alias" alias de la geocerca, si no tiene es null y si tiene, es un string unico en todas las geocercas
|
|
71
|
+
*/
|
|
72
|
+
alias?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* customerId indica el id del cliente al que pertenece la geocerca, si no tiene es null,
|
|
75
|
+
* si es de un cliente es un string unico en todas las geocercas
|
|
76
|
+
*/
|
|
77
|
+
customerId?: string | null;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
updatedAt: string | null;
|
|
80
|
+
}
|
|
81
|
+
interface AuthUserOptionsType {
|
|
82
|
+
activation: boolean;
|
|
83
|
+
delete: boolean;
|
|
84
|
+
edit: boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Modelo de datos proveniente del endpoint list de geocercas
|
|
88
|
+
*/
|
|
89
|
+
export interface GeofenceListModel extends Omit<GeofenceGetModel, 'geometry'> {
|
|
90
|
+
/**
|
|
91
|
+
* "geometry" geometría de la geocerca compatible con GeoJSON
|
|
92
|
+
*/
|
|
93
|
+
geometry: GeofenceGeometry | null;
|
|
94
|
+
authUserOptions: AuthUserOptionsType;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Modelo de datos para enviar al endpoint de creacion de geocercas
|
|
98
|
+
*/
|
|
99
|
+
export interface GeofenceNewModel extends Pick<GeofenceGetModel, 'name' | 'geometry' | 'properties' | 'timeMinInSeconds' | 'timeMinOutSeconds' | 'alias' | 'customerId'> {
|
|
100
|
+
/**
|
|
101
|
+
* "type" tipo de geocerca con idioma
|
|
102
|
+
*/
|
|
103
|
+
typeId: GeofenceTypeId;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Modelo de datos para enviar al endpoint de creacion de geocercas
|
|
107
|
+
*/
|
|
108
|
+
export interface GeofenceEditModel extends GeofenceNewModel {
|
|
109
|
+
/**
|
|
110
|
+
* id de la geocerca
|
|
111
|
+
*/
|
|
112
|
+
geofenceId: GeofenceId;
|
|
113
|
+
}
|
|
114
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GeofenceTypeId } from './subcomponents/TabsGpsTools/subcomponents/model';
|
|
2
|
+
/**
|
|
3
|
+
* Por ahora solo distancia.
|
|
4
|
+
*/
|
|
5
|
+
export type MeasureTypeId = 'distance';
|
|
6
|
+
export interface MeasureTypeItem {
|
|
7
|
+
id: MeasureTypeId;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MagnitudeFactorItem {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
symbol: string;
|
|
14
|
+
factor_x0: number;
|
|
15
|
+
factor_x1: number;
|
|
16
|
+
factor_x2: number;
|
|
17
|
+
}
|
|
18
|
+
export interface GeofenceTypeItem {
|
|
19
|
+
id: GeofenceTypeId;
|
|
20
|
+
name: string;
|
|
21
|
+
url: string;
|
|
22
|
+
}
|
|
23
|
+
export interface StyleOpacity {
|
|
24
|
+
value: number;
|
|
25
|
+
label: string;
|
|
26
|
+
}
|
|
27
|
+
export interface StyleWheight {
|
|
28
|
+
value: number;
|
|
29
|
+
label: string;
|
|
30
|
+
}
|
|
31
|
+
export interface StyleDashArray {
|
|
32
|
+
value: string;
|
|
33
|
+
label: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './components/GpsMap';
|
|
2
|
+
export * from './utils';
|
|
3
|
+
export type { MapProps, RendePropFeatureArgs, ComponentRenderPropFeature, FeatureId, FeatureCollection, Feature, Geometry, } from './components/GpsMap';
|
|
4
|
+
export { GpsMapTools, useGpsMapToolsStore, GpsMapToolsProvider, getGpsMapToolsComponentsDictionary, } from './components/GpsMapTools';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "courseToCartesianAngle" convierte el rumbo del GPS a una rotación en grados cartesianos, recibiendo el rumbo
|
|
3
|
+
* en RAW sin transofrmaciones por parte de minitracker.
|
|
4
|
+
* Importante: NO ES compatible con minitracker v1.0 el cual desplaza la medición 90 grados en complemento así: (450 - propiedadesEquipo->ultima_direccion) % 360
|
|
5
|
+
*/
|
|
6
|
+
export declare function courseToCartesianAngle(course: number): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "courseToCssAngle" convierte el rumbo del GPS a una rotación CSS, recibiendo el rumbo
|
|
3
|
+
* en RAW sin transofrmaciones por parte de minitracker.
|
|
4
|
+
* Importante: NO ES compatible con minitracker v1.0 el cual desplaza la medición 90 grados en complemento así: (450 - propiedadesEquipo->ultima_direccion) % 360
|
|
5
|
+
* @param course
|
|
6
|
+
* @param offsetRotate (offset del icono como viene de la fuente con respecto al Norte (0 = grados) )
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function courseToCssAngle(course: number, offsetRotate: number): number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const getPostiveAngle = (angle) => {
|
|
2
|
+
const newAngle = angle % 360;
|
|
3
|
+
return newAngle < 0 ? newAngle + 360 : newAngle;
|
|
4
|
+
};
|
|
5
|
+
function courseToCssAngle(course, offsetRotate) {
|
|
6
|
+
const newCourse = course - 90;
|
|
7
|
+
const newOffset = offsetRotate - 90;
|
|
8
|
+
const rotation = getPostiveAngle(newCourse - newOffset);
|
|
9
|
+
return rotation;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
courseToCssAngle as c
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WritableDraft } from 'immer/dist/internal';
|
|
2
|
+
import { FeatureCollection } from '../components/GpsMap/contexts/MapContext/types';
|
|
3
|
+
/**
|
|
4
|
+
* TODO: Documentar
|
|
5
|
+
*/
|
|
6
|
+
export declare function isFeatureCollectionDraft(obj: any): obj is WritableDraft<FeatureCollection>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RealTimeProviderProps } from './types';
|
|
2
|
+
declare const RealTimeConsumerContext: import('react').Context<import('zustand').StoreApi<import('./types').RealTimeConsumerStoreStateWithActions> | null>;
|
|
3
|
+
/**
|
|
4
|
+
* Provedor del contexto de los realTimeas
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* TODO: Documentar
|
|
9
|
+
*/
|
|
10
|
+
declare function RealTimeConsumerProvider(props: RealTimeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { RealTimeConsumerProvider, RealTimeConsumerContext };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useRef, useEffect } from "react";
|
|
3
|
+
import { c as createRealTimeStore } from "./store.js";
|
|
4
|
+
import { useWindowToolsMF } from "@m4l/components";
|
|
5
|
+
import { u as useRealTimeProducer } from "../../hooks/useRealTimeProducer/index.js";
|
|
6
|
+
import { shallow } from "zustand/shallow";
|
|
7
|
+
import { R as RESOURCE_TYPE_DEVICES } from "./constants.js";
|
|
8
|
+
const RealTimeConsumerContext = createContext(null);
|
|
9
|
+
function RealTimeConsumerProvider(props) {
|
|
10
|
+
const { children, onMessagesCallbacks = [], onSuscribeCallbacks = [], hasResourcesTypesDecorators = {}, storeDevtoolsEnabled = false, ...other } = props;
|
|
11
|
+
const { suscribe, unsuscribe } = useRealTimeProducer((state) => state.realTimeProducerActions, shallow);
|
|
12
|
+
const { getWindowId } = useWindowToolsMF();
|
|
13
|
+
const realTimeStoreRef = useRef();
|
|
14
|
+
if (!realTimeStoreRef.current) {
|
|
15
|
+
realTimeStoreRef.current = createRealTimeStore({
|
|
16
|
+
...other,
|
|
17
|
+
storeId: getWindowId(),
|
|
18
|
+
hasResourcesTypesDecorators
|
|
19
|
+
}, storeDevtoolsEnabled);
|
|
20
|
+
}
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (realTimeStoreRef.current) {
|
|
23
|
+
const { onMessages, loadResourceType } = realTimeStoreRef.current.getState().realTimeConsumerActions;
|
|
24
|
+
suscribe(RESOURCE_TYPE_DEVICES, {
|
|
25
|
+
clientId: getWindowId(),
|
|
26
|
+
onMessageCallbacks: [onMessages, ...onMessagesCallbacks],
|
|
27
|
+
onSuscribeCallbacks: [loadResourceType, ...onSuscribeCallbacks]
|
|
28
|
+
});
|
|
29
|
+
return () => {
|
|
30
|
+
unsuscribe("rt_devices", getWindowId());
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}, [getWindowId, suscribe, unsuscribe, onMessagesCallbacks, onSuscribeCallbacks]);
|
|
34
|
+
return /* @__PURE__ */ jsx(RealTimeConsumerContext.Provider, { value: realTimeStoreRef.current, children });
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
RealTimeConsumerContext as R,
|
|
38
|
+
RealTimeConsumerProvider as a
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RealTimeConsumerStoreStateWithActions, InitialRealTimeStoreProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* TODO: Documentar
|
|
4
|
+
*/
|
|
5
|
+
export declare function createRealTimeStore(initProps: InitialRealTimeStoreProps, storeDevtoolsEnabled?: boolean): import('zustand').StoreApi<RealTimeConsumerStoreStateWithActions>;
|
|
6
|
+
export type RealTimeStoreType = ReturnType<typeof createRealTimeStore>;
|