@m4l/gclick 0.2.0 → 0.2.3-beta.0
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/components/maps/components/GpsMap/GpsMap.js +3 -3
- package/components/maps/components/GpsMap/GpsMap.styles.js +74 -4
- package/components/maps/components/GpsMap/constants.d.ts +3 -1
- package/components/maps/components/GpsMap/constants.js +9 -41
- package/components/maps/components/GpsMap/contexts/MapContext/store.js +5 -7
- package/components/maps/components/GpsMap/contexts/MapContext/types.d.ts +6 -21
- package/components/maps/components/GpsMap/dictionary.js +0 -4
- package/components/maps/components/GpsMap/external/MapControl/types.d.ts +1 -2
- package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/index.d.ts +3 -1
- package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/index.js +13 -15
- package/components/maps/components/GpsMap/featureRenders/{FeatureDivIconLabel → MarkerIconLabel/subcomponents/FeatureDivIconLabel}/index.d.ts +1 -1
- package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/subcomponents/FeatureDivIconLabel/index.js +33 -0
- package/components/maps/components/GpsMap/featureRenders/{FeatureDivIconLabel → MarkerIconLabel/subcomponents/FeatureDivIconLabel}/types.d.ts +1 -1
- package/components/maps/components/GpsMap/featureRenders/MarkerIconLabel/types.d.ts +1 -2
- package/components/maps/components/GpsMap/featureRenders/index.d.ts +0 -1
- package/components/maps/components/GpsMap/hooks/useAutoFocus/index.js +5 -4
- package/components/maps/components/GpsMap/icons.js +0 -5
- package/components/maps/components/GpsMap/slots/slots.d.ts +2 -2
- package/components/maps/components/GpsMap/slots/slots.js +2 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/hooks/useControls.d.ts +23 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/hooks/useControls.js +32 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/index.d.ts +0 -12
- package/components/maps/components/GpsMap/subcomponents/Controls/index.js +7 -9
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/constants.d.ts +4 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/constants.js +41 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/hooks/types.d.ts +2 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/hooks/useTool.js +9 -9
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/hooks/useZoomBottons.d.ts +5 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/hooks/useZoomBottons.js +61 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/index.d.ts +7 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/index.js +38 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/ButtonPopupTool/index.d.ts +5 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools/subcomponents/ButtonTool → ButtonsToolsList/subcomponents/ButtonPopupTool}/index.js +4 -6
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/hooks/useMeasure/index.js +1 -1
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/ButtonsToolsList/types.d.ts +7 -0
- package/components/maps/components/GpsMap/subcomponents/Controls/types.d.ts +1 -1
- package/components/maps/components/GpsMap/subcomponents/{LayersContainer → Layers}/index.js +2 -2
- package/components/maps/components/GpsMap/subcomponents/Layers/subcomponents/Layer/hooks/useClusterMarkers.d.ts +13 -0
- package/components/maps/components/GpsMap/subcomponents/{LayersContainer/subcomponents/MyLayer → Layers/subcomponents/Layer}/index.d.ts +1 -1
- package/components/maps/components/GpsMap/subcomponents/{LayersContainer/subcomponents/MyLayer → Layers/subcomponents/Layer}/index.js +3 -39
- package/components/maps/components/GpsMap/subcomponents/{LayersContainer/subcomponents/MyLayer → Layers/subcomponents/Layer}/subcomponents/RenderByEachFeatureComponent/index.d.ts +1 -1
- package/components/maps/components/GpsMap/subcomponents/{LayersContainer/subcomponents/MyLayer → Layers/subcomponents/Layer}/subcomponents/RenderByEachFeatureComponent/index.js +1 -1
- package/components/maps/components/GpsMap/types.d.ts +95 -8
- package/components/maps/components/GpsMapTools/constants.d.ts +1 -5
- package/components/maps/components/GpsMapTools/constants.js +2 -69
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/GpsMapToolsContext.d.ts +21 -0
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/GpsMapToolsContext.js +20 -0
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/index.d.ts +1 -21
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/index.js +1 -48
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/store.d.ts +1 -1
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/store.js +54 -58
- package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/types.d.ts +20 -79
- package/components/maps/components/GpsMapTools/dictionary.d.ts +67 -53
- package/components/maps/components/GpsMapTools/dictionary.js +58 -50
- package/components/maps/components/GpsMapTools/hooks/useGpsMapToolsStore/index.js +1 -1
- package/components/maps/components/GpsMapTools/icons.d.ts +58 -17
- package/components/maps/components/GpsMapTools/icons.js +45 -18
- package/components/maps/components/GpsMapTools/index.d.ts +4 -5
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/GeofencesTool.d.ts +4 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/GeofencesTool.js +16 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/constants.d.ts +12 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/constants.js +52 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/helpers.d.ts +9 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/helpers.js +17 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useColumns.d.ts +8 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useColumns.js +88 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useDatagridFiltered.d.ts +27 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useDatagridFiltered.js +79 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useDatagridSelected.d.ts +16 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useDatagridSelected.js +57 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useFilterAndSort/useFilterAndSort.d.ts +19 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useFilterAndSort/useFilterAndSort.js +57 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useFilterAndSort/useFilterFields.d.ts +5 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useFilterAndSort/useFilterFields.js +32 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useFilterAndSort/useSortFields.d.ts +5 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useFilterAndSort/useSortFields.js +20 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useLayers.js +32 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useLoadDrawGeometry.d.ts +8 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useLoadDrawGeometry.js +104 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useMaster.d.ts +7 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useMaster.js +39 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useModuleDynamicActions.d.ts +12 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useModuleDynamicActions.js +55 -0
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools/subcomponents/GeofencesList → GeofencesTool}/hooks/useRowActionsGetter.d.ts +2 -2
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools/subcomponents/GeofencesList → GeofencesTool}/hooks/useRowActionsGetter.js +30 -35
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useTabFiltered.d.ts +18 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useTabFiltered.js +70 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useTabSelected.d.ts +17 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/hooks/useTabSelected.js +48 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/index.d.ts +1 -0
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools/subcomponents → GeofencesTool}/model.d.ts +40 -12
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/Form.d.ts +5 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/Form.js +45 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/constants.d.ts +3 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/constants.js +31 -0
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/helpers.d.ts +6 -15
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/helpers.js +32 -15
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/hooks/useDrawing.d.ts +1 -1
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/hooks/useDrawing.js +108 -85
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/hooks/useForm.d.ts +10 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/hooks/useForm.js +98 -0
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/hooks/useSubmit.d.ts +1 -3
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/hooks/useSubmit.js +23 -24
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/hooks/useValidation.d.ts +6 -3
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/index.js +67 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/GeneralData.js +78 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/hooks/useGeneral.d.ts +8 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/hooks/useGeneral.js +43 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/types.d.ts +6 -0
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/validations.d.ts +3 -1
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/validations.js +6 -1
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/MyActionFormCancel/MyActionFormCancel.d.ts +5 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/MyActionFormCancel/MyActionFormCancel.js +19 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/StyleData/constants.d.ts +9 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/StyleData/constants.js +64 -0
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/StyleData/index.js +2 -2
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/FillData/index.js +7 -10
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/hooks/useStrokePatternOptions.d.ts +11 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/hooks/useStrokePatternOptions.js +19 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/hooks/useStrokeWeightsOptions.d.ts +9 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/hooks/useStrokeWeightsOptions.js +17 -0
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/index.js +15 -22
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/StyleData/types.d.ts +9 -0
- package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/types.d.ts +17 -11
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceFeatureRender/GeofenceFeatureRender.d.ts +5 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceFeatureRender/GeofenceFeatureRender.js +163 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceFeatureRender/constants.d.ts +1 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceFeatureRender/helpers.d.ts +17 -0
- package/components/maps/components/GpsMapTools/subcomponents/GeofencesTool/subcomponents/GeofenceFeatureRender/helpers.js +35 -0
- package/components/maps/components/GpsMapTools/types.d.ts +0 -18
- package/components/maps/index.d.ts +1 -1
- package/index.js +65 -66
- package/package.json +3 -2
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/constants.js +0 -4
- package/components/maps/components/GpsMap/featureRenders/CommonFeatureRender/index.js +0 -263
- package/components/maps/components/GpsMap/featureRenders/FeatureDivIconLabel/index.js +0 -33
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/index.d.ts +0 -10
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/index.js +0 -10
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/subcomponents/ZoomButtons/index.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/subcomponents/ZoomButtons/index.js +0 -52
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/BottomRigthTools/types.d.ts +0 -2
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/index.d.ts +0 -4
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopLeftTools/types.d.ts +0 -5
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.d.ts +0 -9
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/index.js +0 -58
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ButtonTool/index.d.ts +0 -9
- package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/TopRigthTools/types.d.ts +0 -4
- package/components/maps/components/GpsMapTools/GpsMapTools.d.ts +0 -5
- package/components/maps/components/GpsMapTools/GpsMapTools.js +0 -10
- package/components/maps/components/GpsMapTools/classes/index.d.ts +0 -7
- package/components/maps/components/GpsMapTools/classes/index.js +0 -21
- package/components/maps/components/GpsMapTools/classes/types.d.ts +0 -14
- package/components/maps/components/GpsMapTools/hooks/useLayers/index.js +0 -57
- package/components/maps/components/GpsMapTools/styles.d.ts +0 -1
- package/components/maps/components/GpsMapTools/styles.js +0 -18
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/index.d.ts +0 -9
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/index.js +0 -84
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/constants.d.ts +0 -20
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/constants.js +0 -40
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSumbitErrorsFocus.js +0 -36
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/index.d.ts +0 -5
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/index.js +0 -71
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles.d.ts +0 -1
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles.js +0 -8
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/index.js +0 -51
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index.js +0 -128
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/types.d.ts +0 -7
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.d.ts +0 -5
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.js +0 -55
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.d.ts +0 -4
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.js +0 -76
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/types.d.ts +0 -7
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/types.d.ts +0 -10
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedFeatures.d.ts +0 -9
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedFeatures.js +0 -86
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedGeofences.d.ts +0 -7
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedGeofences.js +0 -85
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.d.ts +0 -12
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.js +0 -111
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useMaster.d.ts +0 -22
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useMaster.js +0 -164
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.d.ts +0 -4
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.js +0 -73
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.d.ts +0 -1
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.js +0 -8
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/subcomponents/Filter/index.d.ts +0 -9
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/subcomponents/Filter/index.js +0 -49
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/constants.d.ts +0 -7
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/subcomponents/constants.js +0 -13
- package/components/maps/components/GpsMapTools/subcomponents/TabsGpsTools/types.d.ts +0 -7
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/hooks/useTool.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools/subcomponents/ButtonTool → ButtonsToolsList/subcomponents/ButtonPopupTool}/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/MapLayersTool.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/MapLayersTool.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/MapLayersTool.styles.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/MapLayersTool.styles.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/hooks/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/hooks/useMapLayersTool.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/hooks/useMapLayersTool.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/slots/slots.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/slots/slots.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/slots/styled.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/slots/styled.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/subcomponents/MapLayerRow.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/subcomponents/MapLayerRow.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/subcomponents/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapLayersTool/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/MapSourcesTool.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/MapSourcesTool.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/MapSourcesTool.styles.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/MapSourcesTool.styles.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/hooks/useMapSourcesTool.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/hooks/useMapSourcesTool.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/slots/slots.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/slots/slots.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/slots/styled.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/slots/styled.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/sourceTypes/bing.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/sourceTypes/bing.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/sourceTypes/google.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/sourceTypes/google.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/sourceTypes/others.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/sourceTypes/others.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/subcomponents/MapSourceCard.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/subcomponents/MapSourceCard.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/subcomponents/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MapSourcesTool/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/MeasureTool.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/MeasureTool.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/MeasureTool.styles.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/MeasureTool.styles.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/constants.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/constants.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/hooks/useMeasure/helpers.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/hooks/useMeasure/helpers.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/hooks/useMeasure/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/hooks/useValidation.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/hooks/useValidation.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/model.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/slots/slots.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/slots/slots.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/slots/styled.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/slots/styled.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/subcomponents/MeasureData/index.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/subcomponents/MeasureData/index.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/subcomponents/MeasureData/validations.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/subcomponents/MeasureData/validations.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/subcomponents/MyActions/index.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/subcomponents/MyActions/index.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/Controls/subcomponents/{TopRigthTools → ButtonsToolsList}/subcomponents/MeasureTool/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/{LayersContainer → Layers}/index.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/{LayersContainer/subcomponents/MyLayer → Layers/subcomponents/Layer}/subcomponents/MarkerClusterGroup/index.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/{LayersContainer/subcomponents/MyLayer → Layers/subcomponents/Layer}/subcomponents/MarkerClusterGroup/index.js +0 -0
- /package/components/maps/components/GpsMap/subcomponents/{LayersContainer/subcomponents/MyLayer → Layers/subcomponents/Layer}/subcomponents/MarkerClusterGroup/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/{LayersContainer/subcomponents/MyLayer → Layers/subcomponents/Layer}/subcomponents/RenderByEachFeatureComponent/types.d.ts +0 -0
- /package/components/maps/components/GpsMap/subcomponents/{LayersContainer/subcomponents/MyLayer → Layers/subcomponents/Layer}/types.d.ts +0 -0
- /package/components/maps/components/GpsMapTools/{hooks/useLayers/index.d.ts → subcomponents/GeofencesTool/hooks/useLayers.d.ts} +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/hooks/useSumbitErrorsFocus.d.ts +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/hooks/useValidation.js +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/index.d.ts +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/types.d.ts +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/validations.d.ts +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/validations.js +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index.d.ts → GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/GeneralData.d.ts} +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions → GeofencesTool/subcomponents/GeofenceAddEdit/subcomponents/MyActionFormCancel}/types.d.ts +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/StyleData/index.d.ts +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/FillData/index.d.ts +0 -0
- /package/components/maps/components/GpsMapTools/subcomponents/{TabsGpsTools → GeofencesTool}/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/index.d.ts +0 -0
|
@@ -1,86 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { useModuleDictionary } from "@m4l/core";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../../../../dictionary.js";
|
|
4
|
-
import { ColumnDateFormatter } from "@m4l/components";
|
|
5
|
-
function useColumns(_props) {
|
|
6
|
-
const { getLabel } = useModuleDictionary();
|
|
7
|
-
const columns = useMemo(
|
|
8
|
-
() => [
|
|
9
|
-
{
|
|
10
|
-
key: "id",
|
|
11
|
-
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_ID),
|
|
12
|
-
type: "number",
|
|
13
|
-
width: 40,
|
|
14
|
-
visible: false
|
|
15
|
-
},
|
|
16
|
-
// {
|
|
17
|
-
// key: 'geometry',
|
|
18
|
-
// name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_TYPE),
|
|
19
|
-
// headerRenderer: () => '', //Para que no salga el nombre de la columna, pero si en el configurador
|
|
20
|
-
// type: 'string',
|
|
21
|
-
// formatter: ColumnIconFormatter({
|
|
22
|
-
// /**
|
|
23
|
-
// * TODO: Documentar
|
|
24
|
-
// */
|
|
25
|
-
// getIconUrl: (formatterRowProps: FormatterProps<GeofenceListModel>) => {
|
|
26
|
-
// const { row } = formatterRowProps;
|
|
27
|
-
// let iconUrl: string;
|
|
28
|
-
// if (row.type.id === 'gt_polygon') {
|
|
29
|
-
// iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_POLYGON;
|
|
30
|
-
// } else if (row.type.id === 'gt_circle') {
|
|
31
|
-
// iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_CIRCLE;
|
|
32
|
-
// } else {
|
|
33
|
-
// iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_RECTANGLE;
|
|
34
|
-
// }
|
|
35
|
-
// return {
|
|
36
|
-
// iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${iconUrl}`,
|
|
37
|
-
// };
|
|
38
|
-
// },
|
|
39
|
-
// }),
|
|
40
|
-
// width: 30,
|
|
41
|
-
// minWidth: 25,
|
|
42
|
-
// },
|
|
43
|
-
{
|
|
44
|
-
key: "name",
|
|
45
|
-
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_NAME),
|
|
46
|
-
type: "string",
|
|
47
|
-
width: 220
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
key: "customerId",
|
|
51
|
-
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_CUSTOMER_ID),
|
|
52
|
-
type: "string",
|
|
53
|
-
width: 40,
|
|
54
|
-
visible: false
|
|
55
|
-
},
|
|
56
|
-
// {
|
|
57
|
-
// key: 'checkedCrossingFeatures',
|
|
58
|
-
// name: getLabel(DICCTIONARY.LABEL_VIEW_TRANSIT_FEATURES),
|
|
59
|
-
// width: 32,
|
|
60
|
-
// type: 'boolean',
|
|
61
|
-
// // frozen: true,
|
|
62
|
-
// // isDraggable: false,
|
|
63
|
-
// formatter: ColumnSetCheckFormatter({
|
|
64
|
-
// field: 'CrossingFeatures',
|
|
65
|
-
// rowKeyGetter,
|
|
66
|
-
// useHook,
|
|
67
|
-
// }),
|
|
68
|
-
// cellClass: 'rdg-cell-align-center',
|
|
69
|
-
// },
|
|
70
|
-
// {
|
|
71
|
-
// key: 'checkedInternalFeatures',
|
|
72
|
-
// name: getLabel(DICCTIONARY.LABEL_VIEW_INTERNAL_FEATURES),
|
|
73
|
-
// width: 32,
|
|
74
|
-
// type: 'boolean',
|
|
75
|
-
// // isDraggable: false,
|
|
76
|
-
// // frozen: true,
|
|
77
|
-
// formatter: ColumnSetCheckFormatter({
|
|
78
|
-
// field: 'InternalFeatures',
|
|
79
|
-
// rowKeyGetter,
|
|
80
|
-
// useHook,
|
|
81
|
-
// }),
|
|
82
|
-
// cellClass: 'rdg-cell-align-center',
|
|
83
|
-
// },
|
|
84
|
-
{
|
|
85
|
-
key: "created_at",
|
|
86
|
-
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_CREATED_AT),
|
|
87
|
-
type: "date",
|
|
88
|
-
formatter: ColumnDateFormatter({
|
|
89
|
-
presentationType: "datetime",
|
|
90
|
-
fieldValue: "row.created_at"
|
|
91
|
-
}),
|
|
92
|
-
visible: false
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
key: "updated_at",
|
|
96
|
-
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_UPDATED_AT),
|
|
97
|
-
type: "date",
|
|
98
|
-
formatter: ColumnDateFormatter({
|
|
99
|
-
presentationType: "datetime",
|
|
100
|
-
fieldValue: "row.updated_at"
|
|
101
|
-
}),
|
|
102
|
-
visible: false
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
[getLabel]
|
|
106
|
-
);
|
|
107
|
-
return { columns };
|
|
108
|
-
}
|
|
109
|
-
export {
|
|
110
|
-
useColumns as u
|
|
111
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,164 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const StackGeofenceListRoot: import('@emotion/styled').StyledComponent<import('@m4l/components').StackProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, {}, {}>;
|
|
@@ -1,9 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
};
|