@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,86 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
3
|
+
import { PaperForm, PropertyValue, RHFColorPicker, RHFAutocomplete } from "@m4l/components";
|
|
4
|
+
import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../../../../../../../dictionary.js";
|
|
5
|
+
import { M as MAP_GPSTOOLS_ICONS } from "../../../../../../../../icons.js";
|
|
6
|
+
import { S as STYLE_OPACITIES, a as STYLE_WHEIGHTS, b as STYLE_PATTERNS } from "../../../../../../../../constants.js";
|
|
7
|
+
function StrokeData() {
|
|
8
|
+
const { getLabel } = useModuleDictionary();
|
|
9
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
10
|
+
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.STROKE}`;
|
|
11
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_GPSTOOLS_DICCTIONARY.PAPER_STROKE), children: [
|
|
12
|
+
/* @__PURE__ */ jsx(
|
|
13
|
+
PropertyValue,
|
|
14
|
+
{
|
|
15
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_COLOR}`),
|
|
16
|
+
isForm: true,
|
|
17
|
+
propertyWidth: 150,
|
|
18
|
+
value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.strokeColor" })
|
|
19
|
+
},
|
|
20
|
+
"properties.strokeColor"
|
|
21
|
+
),
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
PropertyValue,
|
|
24
|
+
{
|
|
25
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_OPACITY}`),
|
|
26
|
+
isForm: true,
|
|
27
|
+
propertyWidth: 150,
|
|
28
|
+
value: /* @__PURE__ */ jsx(
|
|
29
|
+
RHFAutocomplete,
|
|
30
|
+
{
|
|
31
|
+
type: "text",
|
|
32
|
+
name: "properties.strokeOpacity",
|
|
33
|
+
autoComplete: "off",
|
|
34
|
+
options: STYLE_OPACITIES,
|
|
35
|
+
getOptionLabel: (option) => option.label,
|
|
36
|
+
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
"properties.strokeOpacity"
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
PropertyValue,
|
|
44
|
+
{
|
|
45
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_WEIGHT}`),
|
|
46
|
+
isForm: true,
|
|
47
|
+
propertyWidth: 150,
|
|
48
|
+
value: /* @__PURE__ */ jsx(
|
|
49
|
+
RHFAutocomplete,
|
|
50
|
+
{
|
|
51
|
+
type: "text",
|
|
52
|
+
name: "properties.strokeWeight",
|
|
53
|
+
autoComplete: "off",
|
|
54
|
+
options: STYLE_WHEIGHTS,
|
|
55
|
+
getOptionLabel: (option) => option.label,
|
|
56
|
+
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
},
|
|
60
|
+
"properties.strokeWeight"
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
PropertyValue,
|
|
64
|
+
{
|
|
65
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_DASH_ARRAY}`),
|
|
66
|
+
isForm: true,
|
|
67
|
+
propertyWidth: 150,
|
|
68
|
+
value: /* @__PURE__ */ jsx(
|
|
69
|
+
RHFAutocomplete,
|
|
70
|
+
{
|
|
71
|
+
type: "text",
|
|
72
|
+
name: "properties.strokeDashArray",
|
|
73
|
+
autoComplete: "off",
|
|
74
|
+
options: STYLE_PATTERNS,
|
|
75
|
+
getOptionLabel: (option) => option.label,
|
|
76
|
+
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
},
|
|
80
|
+
"properties.strokeDashArray"
|
|
81
|
+
)
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
StrokeData as S
|
|
86
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Maybe } from '@m4l/core';
|
|
2
|
+
import { StyleOpacity, StyleDashArray, StyleWheight } from '../../../../../../types';
|
|
3
|
+
export interface FormStyleDataValues {
|
|
4
|
+
strokeColor?: string;
|
|
5
|
+
strokeOpacity?: Maybe<StyleOpacity>;
|
|
6
|
+
strokeWeight?: Maybe<StyleWheight>;
|
|
7
|
+
strokeDashArray?: Maybe<StyleDashArray>;
|
|
8
|
+
fillColor?: string;
|
|
9
|
+
fillOpacity?: Maybe<StyleOpacity>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StyleOpacity, StyleDashArray, StyleWheight } from '../../../../types';
|
|
2
|
+
import { GeofenceGetModel } from '../model';
|
|
3
|
+
import { FormConfigDataValues } from './subcomponents/ConfigData/types';
|
|
4
|
+
import { FormGeneralDataValues } from './subcomponents/GeneralData/types';
|
|
5
|
+
import { FormStyleDataValues } from './subcomponents/StyleData/types';
|
|
6
|
+
export type ResponseGet = {
|
|
7
|
+
data: GeofenceGetModel;
|
|
8
|
+
};
|
|
9
|
+
export type FormAddEditValues = FormGeneralDataValues & FormConfigDataValues & FormStyleDataValues & {
|
|
10
|
+
inEdition: boolean;
|
|
11
|
+
lat?: number | null;
|
|
12
|
+
lng?: number | null;
|
|
13
|
+
properties: {
|
|
14
|
+
radius?: number | null;
|
|
15
|
+
strokeColor: string;
|
|
16
|
+
strokeOpacity: StyleOpacity;
|
|
17
|
+
strokeWeight: StyleWheight;
|
|
18
|
+
strokeDashArray: StyleDashArray;
|
|
19
|
+
fillColor: string;
|
|
20
|
+
fillOpacity: StyleOpacity;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export interface GeofenceAddEditProps {
|
|
24
|
+
geofenceId?: number;
|
|
25
|
+
fullRefresh?: (id?: number) => void;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GeofencesFeaturesLayers } from '../../constants';
|
|
2
|
+
/**
|
|
3
|
+
* Hook encargado de cargar los features y pintarlos cuando los seleccionen
|
|
4
|
+
* @param layerId
|
|
5
|
+
* @param featuresType
|
|
6
|
+
* @param endpoint
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function useCheckedFeatures(layerId: GeofencesFeaturesLayers, featuresType: 'CrossingFeatures' | 'InternalFeatures', endpoint: string): [ReadonlySet<number>, (newFeatures: ReadonlySet<number>) => void];
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { shallow } from "zustand/shallow";
|
|
3
|
+
import { useNetwork } from "@m4l/core";
|
|
4
|
+
import { u as useGpsMapToolsStore } from "../../../../../hooks/useGpsMapToolsStore/index.js";
|
|
5
|
+
import { u as useMapStore } from "../../../../../../GpsMap/hooks/useMapStore/index.js";
|
|
6
|
+
function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
7
|
+
const layersIds = useMapStore((state) => state.layersIds, shallow);
|
|
8
|
+
const [checkedFeatures, setCheckedFeatures, hashGeofences] = useGpsMapToolsStore((state) => {
|
|
9
|
+
return featuresType === "CrossingFeatures" ? [
|
|
10
|
+
state.geofenceState.checkedCrossingFeatures,
|
|
11
|
+
state.geofenceActions.setCheckedCrossingFeatures,
|
|
12
|
+
state.geofenceState.hashGeofences
|
|
13
|
+
] : [
|
|
14
|
+
state.geofenceState.checkedInternalFeatures,
|
|
15
|
+
state.geofenceActions.setCheckedInternalFeatures,
|
|
16
|
+
state.geofenceState.hashGeofences
|
|
17
|
+
];
|
|
18
|
+
}, shallow);
|
|
19
|
+
const { setFeatureData, removeFeature, getFeatureIds } = useMapStore(
|
|
20
|
+
(state) => state.mapActions,
|
|
21
|
+
shallow
|
|
22
|
+
);
|
|
23
|
+
const { networkOperation } = useNetwork();
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!layersIds.includes(layerId)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const mapFeatureIds = getFeatureIds(layerId);
|
|
29
|
+
checkedFeatures.forEach((chkRow) => {
|
|
30
|
+
const geofence = hashGeofences[chkRow];
|
|
31
|
+
if (!geofence) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (!mapFeatureIds.find((fId) => fId.toString().includes(`geo_${geofence.id}_fid`)) || !geofence[`hasRenderized${featuresType}`]) {
|
|
35
|
+
const currentGeofenceLoadedFeatures = geofence[`loaded${featuresType}`];
|
|
36
|
+
if (!currentGeofenceLoadedFeatures) {
|
|
37
|
+
networkOperation({
|
|
38
|
+
method: "GET",
|
|
39
|
+
endPoint: `geofences/${geofence.id}/${endpoint}`,
|
|
40
|
+
isRemote: false,
|
|
41
|
+
responseToCamelCase: true
|
|
42
|
+
}).then((response) => {
|
|
43
|
+
geofence[`loaded${featuresType}`] = response.data;
|
|
44
|
+
const newGeofenceLoadedFeatures = geofence[`loaded${featuresType}`];
|
|
45
|
+
if (newGeofenceLoadedFeatures && Array.isArray(geofence[`loaded${featuresType}`])) {
|
|
46
|
+
if (checkedFeatures.has(geofence.id)) {
|
|
47
|
+
newGeofenceLoadedFeatures.forEach((feature) => {
|
|
48
|
+
setFeatureData(
|
|
49
|
+
layerId,
|
|
50
|
+
`geo_${geofence.id}_fid_${feature.id}`,
|
|
51
|
+
feature.geometry,
|
|
52
|
+
feature.properties
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
geofence[`hasRenderized${featuresType}`] = true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}).catch(() => {
|
|
59
|
+
});
|
|
60
|
+
} else {
|
|
61
|
+
currentGeofenceLoadedFeatures.forEach((feature) => {
|
|
62
|
+
setFeatureData(
|
|
63
|
+
layerId,
|
|
64
|
+
`geo_${geofence.id}_fid_${feature.id}`,
|
|
65
|
+
feature.geometry,
|
|
66
|
+
feature.properties
|
|
67
|
+
);
|
|
68
|
+
});
|
|
69
|
+
geofence[`hasRenderized${featuresType}`] = true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
mapFeatureIds.forEach((mapFeatureId) => {
|
|
74
|
+
const featureId = Number(mapFeatureId.toString().split("_")[1]);
|
|
75
|
+
if (!checkedFeatures.has(featureId)) {
|
|
76
|
+
removeFeature(layerId, mapFeatureId);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
return () => {
|
|
80
|
+
};
|
|
81
|
+
}, [checkedFeatures, layersIds]);
|
|
82
|
+
return [checkedFeatures, setCheckedFeatures];
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
useCheckedFeatures as u
|
|
86
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { shallow } from "zustand/shallow";
|
|
3
|
+
import { useNetwork } from "@m4l/core";
|
|
4
|
+
import { G as GeofencesFeaturesLayers } from "../../constants.js";
|
|
5
|
+
import { u as useGpsMapToolsStore } from "../../../../../hooks/useGpsMapToolsStore/index.js";
|
|
6
|
+
import { u as useMapStore } from "../../../../../../GpsMap/hooks/useMapStore/index.js";
|
|
7
|
+
function useCheckedGeofences() {
|
|
8
|
+
const layersIds = useMapStore((state) => state.layersIds, shallow);
|
|
9
|
+
const [checkedGeofences, hashGeofences] = useGpsMapToolsStore(
|
|
10
|
+
(state) => [state.geofenceState.checkedGeofences, state.geofenceState.hashGeofences],
|
|
11
|
+
shallow
|
|
12
|
+
);
|
|
13
|
+
const { setCheckedGeofences, updatePartialGeofence } = useGpsMapToolsStore(
|
|
14
|
+
(state) => state.geofenceActions,
|
|
15
|
+
shallow
|
|
16
|
+
);
|
|
17
|
+
const { setFeatureData, removeFeature, getFeatureIds } = useMapStore(
|
|
18
|
+
(state) => state.mapActions,
|
|
19
|
+
shallow
|
|
20
|
+
);
|
|
21
|
+
const { networkOperation } = useNetwork();
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (!layersIds.includes(GeofencesFeaturesLayers.LAYER_GEOFENCES)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const mapFeatureIds = getFeatureIds(GeofencesFeaturesLayers.LAYER_GEOFENCES);
|
|
27
|
+
checkedGeofences.forEach((chkRow) => {
|
|
28
|
+
const geofence = hashGeofences[chkRow];
|
|
29
|
+
if (!geofence) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (!mapFeatureIds.includes(chkRow) || !geofence.hasRenderizedGeofence) {
|
|
33
|
+
if (!geofence.geometry) {
|
|
34
|
+
networkOperation({
|
|
35
|
+
method: "GET",
|
|
36
|
+
endPoint: `geofences/${geofence.id}`,
|
|
37
|
+
isRemote: false,
|
|
38
|
+
responseToCamelCase: true
|
|
39
|
+
}).then((response) => {
|
|
40
|
+
const geoLoaded = {
|
|
41
|
+
geometry: response.data.geometry,
|
|
42
|
+
name: response.data.name,
|
|
43
|
+
properties: response.data.properties,
|
|
44
|
+
countCrossingFeatures: response.data.countCrossingFeatures,
|
|
45
|
+
hasRenderizedGeofence: false
|
|
46
|
+
};
|
|
47
|
+
if (geoLoaded.geometry) {
|
|
48
|
+
if (checkedGeofences.has(geofence.id)) {
|
|
49
|
+
setFeatureData("geofences", chkRow, geoLoaded.geometry, geoLoaded.properties, {
|
|
50
|
+
label: geoLoaded.name,
|
|
51
|
+
labelColor: geoLoaded.properties?.color
|
|
52
|
+
});
|
|
53
|
+
geoLoaded.hasRenderizedGeofence = true;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
updatePartialGeofence(geofence.id, geoLoaded);
|
|
57
|
+
});
|
|
58
|
+
} else {
|
|
59
|
+
setFeatureData(
|
|
60
|
+
GeofencesFeaturesLayers.LAYER_GEOFENCES,
|
|
61
|
+
chkRow,
|
|
62
|
+
geofence.geometry,
|
|
63
|
+
geofence.properties,
|
|
64
|
+
{ label: geofence.name }
|
|
65
|
+
);
|
|
66
|
+
updatePartialGeofence(geofence.id, { hasRenderizedGeofence: true });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
mapFeatureIds.forEach((mapFeatureId) => {
|
|
71
|
+
if (!checkedGeofences.has(Number(mapFeatureId))) {
|
|
72
|
+
removeFeature(GeofencesFeaturesLayers.LAYER_GEOFENCES, mapFeatureId);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return () => {
|
|
76
|
+
};
|
|
77
|
+
}, [checkedGeofences, layersIds]);
|
|
78
|
+
return {
|
|
79
|
+
checkedGeofences,
|
|
80
|
+
setCheckedGeofences
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
useCheckedGeofences as u
|
|
85
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GeofenceListModel } from '../../model';
|
|
2
|
+
import { Column } from 'react-data-grid';
|
|
3
|
+
type UseColumnsProps<Row> = {
|
|
4
|
+
rowKeyGetter: (row: Row) => number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* TODO: Documentar
|
|
8
|
+
*/
|
|
9
|
+
export declare function useColumns(_props: UseColumnsProps<GeofenceListModel>): {
|
|
10
|
+
columns: Column<GeofenceListModel, unknown>[];
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../../../../dictionary.js";
|
|
4
|
+
import { ColumnIconFormatter, ColumnDateFormatter } from "@m4l/components";
|
|
5
|
+
import { M as MAP_GPSTOOLS_ICONS } from "../../../../../icons.js";
|
|
6
|
+
function useColumns(_props) {
|
|
7
|
+
const { getLabel } = useModuleDictionary();
|
|
8
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
9
|
+
const columns = useMemo(
|
|
10
|
+
() => [
|
|
11
|
+
{
|
|
12
|
+
key: "id",
|
|
13
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_ID),
|
|
14
|
+
type: "number",
|
|
15
|
+
width: 40,
|
|
16
|
+
visible: false
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
key: "geometry",
|
|
20
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_TYPE),
|
|
21
|
+
headerRenderer: () => "",
|
|
22
|
+
//Para que no salga el nombre de la columna, pero si en el configurador
|
|
23
|
+
type: "string",
|
|
24
|
+
formatter: ColumnIconFormatter({
|
|
25
|
+
/**
|
|
26
|
+
* TODO: Documentar
|
|
27
|
+
*/
|
|
28
|
+
getIconProps: (row) => {
|
|
29
|
+
let iconUrl;
|
|
30
|
+
if (row.type.id === "gt_polygon") {
|
|
31
|
+
iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_POLYGON;
|
|
32
|
+
} else if (row.type.id === "gt_circle") {
|
|
33
|
+
iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_CIRCLE;
|
|
34
|
+
} else {
|
|
35
|
+
iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_RECTANGLE;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${iconUrl}`
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
width: 30,
|
|
43
|
+
minWidth: 25
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: "name",
|
|
47
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_NAME),
|
|
48
|
+
type: "string",
|
|
49
|
+
width: 220
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: "customerId",
|
|
53
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_CUSTOMER_ID),
|
|
54
|
+
type: "string",
|
|
55
|
+
width: 40,
|
|
56
|
+
visible: false
|
|
57
|
+
},
|
|
58
|
+
// {
|
|
59
|
+
// key: 'checkedCrossingFeatures',
|
|
60
|
+
// name: getLabel(DICCTIONARY.LABEL_VIEW_TRANSIT_FEATURES),
|
|
61
|
+
// width: 32,
|
|
62
|
+
// type: 'boolean',
|
|
63
|
+
// // frozen: true,
|
|
64
|
+
// // isDraggable: false,
|
|
65
|
+
// formatter: ColumnSetCheckFormatter({
|
|
66
|
+
// field: 'CrossingFeatures',
|
|
67
|
+
// rowKeyGetter,
|
|
68
|
+
// useHook,
|
|
69
|
+
// }),
|
|
70
|
+
// cellClass: 'rdg-cell-align-center',
|
|
71
|
+
// },
|
|
72
|
+
// {
|
|
73
|
+
// key: 'checkedInternalFeatures',
|
|
74
|
+
// name: getLabel(DICCTIONARY.LABEL_VIEW_INTERNAL_FEATURES),
|
|
75
|
+
// width: 32,
|
|
76
|
+
// type: 'boolean',
|
|
77
|
+
// // isDraggable: false,
|
|
78
|
+
// // frozen: true,
|
|
79
|
+
// formatter: ColumnSetCheckFormatter({
|
|
80
|
+
// field: 'InternalFeatures',
|
|
81
|
+
// rowKeyGetter,
|
|
82
|
+
// useHook,
|
|
83
|
+
// }),
|
|
84
|
+
// cellClass: 'rdg-cell-align-center',
|
|
85
|
+
// },
|
|
86
|
+
{
|
|
87
|
+
key: "created_at",
|
|
88
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_CREATED_AT),
|
|
89
|
+
type: "date",
|
|
90
|
+
formatter: ColumnDateFormatter({
|
|
91
|
+
presentationType: "datetime",
|
|
92
|
+
fieldValue: "row.created_at"
|
|
93
|
+
}),
|
|
94
|
+
visible: false
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
key: "updated_at",
|
|
98
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_UPDATED_AT),
|
|
99
|
+
type: "date",
|
|
100
|
+
formatter: ColumnDateFormatter({
|
|
101
|
+
presentationType: "datetime",
|
|
102
|
+
fieldValue: "row.updated_at"
|
|
103
|
+
}),
|
|
104
|
+
visible: false
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
108
|
+
[getLabel]
|
|
109
|
+
);
|
|
110
|
+
return { columns };
|
|
111
|
+
}
|
|
112
|
+
export {
|
|
113
|
+
useColumns as u
|
|
114
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GeofenceId } from '../../../../../contexts/GpsMapToolsContext/types';
|
|
2
|
+
import { GeofenceListModel } from '../../model';
|
|
3
|
+
/**
|
|
4
|
+
* TODO: Documentar
|
|
5
|
+
*/
|
|
6
|
+
export declare function useMaster(): {
|
|
7
|
+
rowKeyGetter: (row: GeofenceListModel) => number;
|
|
8
|
+
columns: import('react-data-grid').Column<GeofenceListModel, unknown>[];
|
|
9
|
+
refresh: () => void;
|
|
10
|
+
setBackendQueryParams: import('react').Dispatch<import('react').SetStateAction<Record<string, unknown>>>;
|
|
11
|
+
pagerState: import('@m4l/core').PagerState;
|
|
12
|
+
rows: GeofenceListModel[];
|
|
13
|
+
onPageChange: (newPage: number) => void;
|
|
14
|
+
onRowsPerPageChange: (newRowsPerPage: number) => void;
|
|
15
|
+
rowActionsGetter: (row: GeofenceListModel) => import('@m4l/components').MenuAction[] | [];
|
|
16
|
+
selectedRows: ReadonlySet<number>;
|
|
17
|
+
onSelectedRowsChange: (newRowsSelectSet: ReadonlySet<GeofenceId>) => void;
|
|
18
|
+
checkedRows: ReadonlySet<number>;
|
|
19
|
+
onCheckedRowsChange: (newGeofences: ReadonlySet<GeofenceId>) => void;
|
|
20
|
+
setRows: import('react').Dispatch<import('react').SetStateAction<GeofenceListModel[]>>;
|
|
21
|
+
goToAdd: () => void;
|
|
22
|
+
};
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useState, useEffect } from "react";
|
|
3
|
+
import { useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
|
|
4
|
+
import { u as useColumns } from "./useColumns.js";
|
|
5
|
+
import { u as useRowActionsGetter } from "./useRowActionsGetter.js";
|
|
6
|
+
import { u as useCheckedGeofences } from "./useCheckedGeofences.js";
|
|
7
|
+
import { u as useCheckedFeatures } from "./useCheckedFeatures.js";
|
|
8
|
+
import { G as GeofencesFeaturesLayers } from "../../constants.js";
|
|
9
|
+
import { shallow } from "zustand/shallow";
|
|
10
|
+
import { usePopupsStore } from "@m4l/components";
|
|
11
|
+
import { G as GeofenceAddEdit } from "../../GeofenceAddEdit/index.js";
|
|
12
|
+
import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../../../../dictionary.js";
|
|
13
|
+
import { M as MAP_GPSTOOLS_ICONS } from "../../../../../icons.js";
|
|
14
|
+
import { u as useGpsMapToolsStore } from "../../../../../hooks/useGpsMapToolsStore/index.js";
|
|
15
|
+
function useMaster() {
|
|
16
|
+
const { getLabel } = useModuleDictionary();
|
|
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 goToAdd = () => {
|
|
21
|
+
hide("gpsTools");
|
|
22
|
+
addPopup({
|
|
23
|
+
popupId: "geofencesAddEdit",
|
|
24
|
+
winType: "component",
|
|
25
|
+
title: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODULE_NAME_GEOFENCE_ADD),
|
|
26
|
+
component: () => /* @__PURE__ */ jsx(GeofenceAddEdit, {}),
|
|
27
|
+
// onMouseDown,
|
|
28
|
+
defaultPosition: {
|
|
29
|
+
vertical: { top: 50, bottom: 50 },
|
|
30
|
+
horizontal: { right: 50, width: 380 }
|
|
31
|
+
// left:490,top:50,width:360, height:420},
|
|
32
|
+
// bounds:{top:5, left:5, right:-5, bottom:-5}
|
|
33
|
+
},
|
|
34
|
+
iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_ADD}`
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
const [checkedGeofences, hashGeofences, initialRows] = useGpsMapToolsStore(
|
|
38
|
+
(state) => [
|
|
39
|
+
state.geofenceState.checkedGeofences,
|
|
40
|
+
state.geofenceState.hashGeofences,
|
|
41
|
+
state.geofenceState.rows
|
|
42
|
+
],
|
|
43
|
+
shallow
|
|
44
|
+
);
|
|
45
|
+
const { setCheckedGeofences, addGeofence, updatePartialGeofence, updateRows } = useGpsMapToolsStore(
|
|
46
|
+
(state) => state.geofenceActions,
|
|
47
|
+
shallow
|
|
48
|
+
);
|
|
49
|
+
useCheckedGeofences();
|
|
50
|
+
const [checkedCrossingFeatures, setCheckedCrossingFeatures] = useCheckedFeatures(
|
|
51
|
+
GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES,
|
|
52
|
+
"CrossingFeatures",
|
|
53
|
+
"crossing_features"
|
|
54
|
+
);
|
|
55
|
+
const [checkedInternalFeatures, setCheckedInternalFeatures] = useCheckedFeatures(
|
|
56
|
+
GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES,
|
|
57
|
+
"InternalFeatures",
|
|
58
|
+
"internal_features"
|
|
59
|
+
);
|
|
60
|
+
const rowKeyGetter = useCallback((row) => row.id, []);
|
|
61
|
+
const [selectedRows, setSelectedRows] = useState(/* @__PURE__ */ new Set());
|
|
62
|
+
const [backendQueryParams, setBackendQueryParams] = useState({});
|
|
63
|
+
const { columns } = useColumns();
|
|
64
|
+
const { pagerState, rows, onPageChange, onRowsPerPageChange, Refresh, setRows } = usePaginate({
|
|
65
|
+
endPoint: "geofences",
|
|
66
|
+
fireOnChangeParms: false,
|
|
67
|
+
fireOnFirstLoad: false,
|
|
68
|
+
queryParams: backendQueryParams,
|
|
69
|
+
isRemote: false,
|
|
70
|
+
responseToCamelCase: true,
|
|
71
|
+
initialRows
|
|
72
|
+
});
|
|
73
|
+
const onSelectedRowsChange = (newRowsSelectSet) => {
|
|
74
|
+
setSelectedRows(newRowsSelectSet);
|
|
75
|
+
};
|
|
76
|
+
const fullRefresh = useCallback((_id) => {
|
|
77
|
+
Refresh();
|
|
78
|
+
}, []);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
const newCheckedGeofences = new Set(checkedGeofences);
|
|
81
|
+
const newCheckedCrossingFeatures = new Set(checkedCrossingFeatures);
|
|
82
|
+
const newCheckedInternalFeatures = new Set(checkedInternalFeatures);
|
|
83
|
+
let updatedCheckedGeofences = false;
|
|
84
|
+
let updatedCheckedCrossingFeatures = false;
|
|
85
|
+
let updatedCheckedInternalFeatures = false;
|
|
86
|
+
newCheckedGeofences.forEach((chkRow) => {
|
|
87
|
+
if (rows.findIndex((row) => row.id === chkRow) === -1) {
|
|
88
|
+
newCheckedGeofences.delete(chkRow);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
newCheckedCrossingFeatures.forEach((chkTF) => {
|
|
92
|
+
if (rows.findIndex((row) => row.id === chkTF) === -1) {
|
|
93
|
+
newCheckedCrossingFeatures.delete(chkTF);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
newCheckedInternalFeatures.forEach((chkIF) => {
|
|
97
|
+
if (rows.findIndex((row) => row.id === chkIF) === -1) {
|
|
98
|
+
newCheckedInternalFeatures.delete(chkIF);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
rows.forEach((row) => {
|
|
102
|
+
let hasGeo = hashGeofences[row.id];
|
|
103
|
+
if (!hasGeo) {
|
|
104
|
+
hasGeo = {
|
|
105
|
+
...row,
|
|
106
|
+
hasRenderizedGeofence: false,
|
|
107
|
+
loadedCrossingFeatures: null,
|
|
108
|
+
loadedInternalFeatures: null,
|
|
109
|
+
hasRenderizedCrossingFeatures: false,
|
|
110
|
+
hasRenderizedInternalFeatures: false,
|
|
111
|
+
createdAt: row.createdAt
|
|
112
|
+
};
|
|
113
|
+
addGeofence(row.id, hasGeo);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (row.updatedAt && row.updatedAt !== hasGeo.updatedAt) {
|
|
117
|
+
updatePartialGeofence(row.id, {
|
|
118
|
+
updatedAt: row.updatedAt,
|
|
119
|
+
geometry: null,
|
|
120
|
+
hasRenderizedGeofence: false,
|
|
121
|
+
hasRenderizedCrossingFeatures: false,
|
|
122
|
+
hasRenderizedInternalFeatures: false,
|
|
123
|
+
loadedCrossingFeatures: null,
|
|
124
|
+
loadedInternalFeatures: null
|
|
125
|
+
});
|
|
126
|
+
updatedCheckedGeofences = true;
|
|
127
|
+
updatedCheckedCrossingFeatures = true;
|
|
128
|
+
updatedCheckedInternalFeatures = true;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
if (newCheckedGeofences.size !== checkedGeofences.size || updatedCheckedGeofences) {
|
|
132
|
+
setCheckedGeofences(newCheckedGeofences);
|
|
133
|
+
}
|
|
134
|
+
if (newCheckedCrossingFeatures.size !== checkedCrossingFeatures.size || updatedCheckedCrossingFeatures) {
|
|
135
|
+
setCheckedCrossingFeatures(newCheckedCrossingFeatures);
|
|
136
|
+
}
|
|
137
|
+
if (newCheckedInternalFeatures.size !== checkedInternalFeatures.size || updatedCheckedInternalFeatures) {
|
|
138
|
+
setCheckedInternalFeatures(newCheckedInternalFeatures);
|
|
139
|
+
}
|
|
140
|
+
onSelectedRowsChange(selectedRows);
|
|
141
|
+
updateRows(rows);
|
|
142
|
+
}, [rows]);
|
|
143
|
+
const { rowActionsGetter } = useRowActionsGetter({ fullRefresh });
|
|
144
|
+
return {
|
|
145
|
+
rowKeyGetter,
|
|
146
|
+
columns,
|
|
147
|
+
refresh: Refresh,
|
|
148
|
+
setBackendQueryParams,
|
|
149
|
+
pagerState,
|
|
150
|
+
rows,
|
|
151
|
+
onPageChange,
|
|
152
|
+
onRowsPerPageChange,
|
|
153
|
+
rowActionsGetter,
|
|
154
|
+
selectedRows,
|
|
155
|
+
onSelectedRowsChange,
|
|
156
|
+
checkedRows: checkedGeofences,
|
|
157
|
+
onCheckedRowsChange: setCheckedGeofences,
|
|
158
|
+
setRows,
|
|
159
|
+
goToAdd
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
export {
|
|
163
|
+
useMaster as u
|
|
164
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MenuAction } from '@m4l/components';
|
|
2
|
+
import { GeofenceListModel } from '../../model';
|
|
3
|
+
interface UseRowActionsProps {
|
|
4
|
+
fullRefresh: (id?: number) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* TODO: Documentar
|
|
8
|
+
*/
|
|
9
|
+
export declare function useRowActionsGetter(props: UseRowActionsProps): {
|
|
10
|
+
rowActionsGetter: (row: GeofenceListModel) => MenuAction[] | [];
|
|
11
|
+
};
|
|
12
|
+
export {};
|