@m4l/gclick 0.2.0 → 0.2.3-beta.1
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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { c as MAP_SOURCES_TOOL_POPUP_DEFAULT_POSITION, d as MAP_LAYERS_TOOL_POPUP_DEFAULT_POSITION, e as MESURE_TOOL_POPUP_DEFAULT_POSITION } from "../../../../constants.js";
|
|
2
|
+
import { M as MAP_DICCTIONARY } from "../../../../dictionary.js";
|
|
3
|
+
import { M as MAP_ICONS } from "../../../../icons.js";
|
|
4
|
+
import { M as MapSourcesTool } from "./subcomponents/MapSourcesTool/MapSourcesTool.js";
|
|
5
|
+
import { M as MapLayersTool } from "./subcomponents/MapLayersTool/MapLayersTool.js";
|
|
6
|
+
import { M as MeasureTool } from "./subcomponents/MeasureTool/MeasureTool.js";
|
|
7
|
+
const MAP_SOURCES_TOOL = {
|
|
8
|
+
isInternal: true,
|
|
9
|
+
id: "sourcesTools",
|
|
10
|
+
type: "popup",
|
|
11
|
+
componentPathId: "map",
|
|
12
|
+
iconId: MAP_ICONS.MAP_SOURCES_TOOL,
|
|
13
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_MAP_SOURCES,
|
|
14
|
+
popupDefaultPosition: MAP_SOURCES_TOOL_POPUP_DEFAULT_POSITION,
|
|
15
|
+
PopupContentComponent: MapSourcesTool
|
|
16
|
+
};
|
|
17
|
+
const MAP_LAYERS_TOOL = {
|
|
18
|
+
isInternal: true,
|
|
19
|
+
id: "layersTools",
|
|
20
|
+
type: "popup",
|
|
21
|
+
componentPathId: "map",
|
|
22
|
+
iconId: MAP_ICONS.MAP_LAYERS_TOOL,
|
|
23
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_LAYERS,
|
|
24
|
+
popupDefaultPosition: MAP_LAYERS_TOOL_POPUP_DEFAULT_POSITION,
|
|
25
|
+
PopupContentComponent: MapLayersTool
|
|
26
|
+
};
|
|
27
|
+
const MAP_MEASURE_TOOL = {
|
|
28
|
+
isInternal: true,
|
|
29
|
+
id: "measureTools",
|
|
30
|
+
type: "popup",
|
|
31
|
+
componentPathId: "map",
|
|
32
|
+
iconId: MAP_ICONS.MAP_MEASURE_TOOL,
|
|
33
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_MEASURE,
|
|
34
|
+
popupDefaultPosition: MESURE_TOOL_POPUP_DEFAULT_POSITION,
|
|
35
|
+
PopupContentComponent: MeasureTool
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
MAP_SOURCES_TOOL as M,
|
|
39
|
+
MAP_LAYERS_TOOL as a,
|
|
40
|
+
MAP_MEASURE_TOOL as b
|
|
41
|
+
};
|
|
@@ -2,7 +2,7 @@ import { JSX_REACT_NODE, RNDDefaultPosition } from '@m4l/components';
|
|
|
2
2
|
export type useToolProps = {
|
|
3
3
|
popupId: string;
|
|
4
4
|
ToolComponent?: JSX_REACT_NODE;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
iconUrl: string;
|
|
6
|
+
title: string;
|
|
7
7
|
defaultPosition: RNDDefaultPosition;
|
|
8
8
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
2
1
|
import { useMap } from "react-leaflet";
|
|
3
2
|
import { usePopupsStore, deepShallow } from "@m4l/components";
|
|
4
3
|
import { useCallback } from "react";
|
|
5
4
|
function useTool(props) {
|
|
6
|
-
const { ToolComponent, popupId,
|
|
5
|
+
const { ToolComponent, popupId, iconUrl, title, defaultPosition } = props;
|
|
7
6
|
const { addPopup } = usePopupsStore((state) => state.popupsActions);
|
|
8
7
|
const { close } = usePopupsStore((state) => state.popupActions);
|
|
9
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
10
|
-
const { getLabel } = useModuleDictionary();
|
|
11
8
|
const { isToggled, isDisabled } = usePopupsStore(
|
|
12
9
|
(state) => {
|
|
13
10
|
const openPopupsIds = state.popupsIds.filter((pId) => {
|
|
@@ -40,19 +37,22 @@ function useTool(props) {
|
|
|
40
37
|
{
|
|
41
38
|
winType: "component",
|
|
42
39
|
popupId,
|
|
43
|
-
title
|
|
44
|
-
iconUrl
|
|
40
|
+
title,
|
|
41
|
+
iconUrl,
|
|
45
42
|
component: ToolComponent,
|
|
46
43
|
onMouseDown,
|
|
47
|
-
defaultPosition
|
|
44
|
+
defaultPosition,
|
|
45
|
+
dynamicParams: {
|
|
46
|
+
mytool: "juan"
|
|
47
|
+
}
|
|
48
48
|
},
|
|
49
|
-
{ closeOthers:
|
|
49
|
+
{ closeOthers: false }
|
|
50
50
|
);
|
|
51
51
|
} else {
|
|
52
52
|
close(popupId);
|
|
53
53
|
}
|
|
54
54
|
e.stopPropagation();
|
|
55
|
-
}, [ToolComponent, isToggled, addPopup, popupId,
|
|
55
|
+
}, [ToolComponent, isToggled, addPopup, popupId, title, iconUrl, onMouseDown, defaultPosition, close]);
|
|
56
56
|
return {
|
|
57
57
|
onToolClick,
|
|
58
58
|
isToggled,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useCallback, useMemo } from "react";
|
|
3
|
+
import { useMap } from "react-leaflet";
|
|
4
|
+
import { M as MAP_ICONS } from "../../../../../icons.js";
|
|
5
|
+
import { useEnvironment } from "@m4l/core";
|
|
6
|
+
import { Z as ZoomButtonStyled } from "../../../../../slots/styled.js";
|
|
7
|
+
function useZoomBottons() {
|
|
8
|
+
const map = useMap();
|
|
9
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
10
|
+
const [zoomInDisabled, setZoomInDisabled] = useState(false);
|
|
11
|
+
const [zoomOutDisabled, setZoomOutDisabled] = useState(false);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const updateButtonState = () => {
|
|
14
|
+
const currentZoom = map.getZoom();
|
|
15
|
+
const maxZoom = map.getMaxZoom();
|
|
16
|
+
const minZoom = map.getMinZoom();
|
|
17
|
+
setZoomInDisabled(currentZoom === maxZoom);
|
|
18
|
+
setZoomOutDisabled(currentZoom === minZoom);
|
|
19
|
+
};
|
|
20
|
+
map.on("zoomend", updateButtonState);
|
|
21
|
+
updateButtonState();
|
|
22
|
+
return () => {
|
|
23
|
+
map.off("zoomend", updateButtonState);
|
|
24
|
+
};
|
|
25
|
+
}, [map]);
|
|
26
|
+
const handleZoomIn = useCallback(() => {
|
|
27
|
+
map.zoomIn();
|
|
28
|
+
}, [map]);
|
|
29
|
+
const handleZoomOut = useCallback(() => {
|
|
30
|
+
map.zoomOut();
|
|
31
|
+
}, [map]);
|
|
32
|
+
return useMemo(() => [
|
|
33
|
+
{
|
|
34
|
+
id: "zoom-in",
|
|
35
|
+
type: "button",
|
|
36
|
+
ButtonComponent: /* @__PURE__ */ jsx(
|
|
37
|
+
ZoomButtonStyled,
|
|
38
|
+
{
|
|
39
|
+
onClick: handleZoomIn,
|
|
40
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_ZOOM_IN}`,
|
|
41
|
+
disabled: zoomInDisabled
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "zoom-out",
|
|
47
|
+
type: "button",
|
|
48
|
+
ButtonComponent: /* @__PURE__ */ jsx(
|
|
49
|
+
ZoomButtonStyled,
|
|
50
|
+
{
|
|
51
|
+
onClick: handleZoomOut,
|
|
52
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map/assets/icons/${MAP_ICONS.MAP_ZOOM_OUT}`,
|
|
53
|
+
disabled: zoomOutDisabled
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
], [handleZoomIn, host_static_assets, environment_assets, zoomInDisabled, handleZoomOut, zoomOutDisabled]);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
useZoomBottons as u
|
|
61
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ButtonsToolsListProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Inserta los botones de herramientas en los controles del mapa
|
|
4
|
+
* @param props
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare function ButtonsToolsList(props: ButtonsToolsListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { M as MapControl } from "../../../../external/MapControl/index.js";
|
|
4
|
+
import { B as ButtonPopupTool } from "./subcomponents/ButtonPopupTool/index.js";
|
|
5
|
+
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
6
|
+
function ButtonsToolsList(props) {
|
|
7
|
+
const { tools, ControlContainer, position } = props;
|
|
8
|
+
const { getLabel } = useModuleDictionary();
|
|
9
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
10
|
+
const toolsList = useMemo(() => {
|
|
11
|
+
return tools.map((tool) => {
|
|
12
|
+
if (tool.type === "popup") {
|
|
13
|
+
const isInternal = "isInternal" in tool && tool.isInternal;
|
|
14
|
+
const iconUrl = isInternal ? `${host_static_assets}/${environment_assets}/frontend/components/${tool.componentPathId}/assets/icons/${tool.iconId}` : tool.iconUrl;
|
|
15
|
+
const title = isInternal ? getLabel(tool.dictionaryId) : tool.PopupTitle;
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
ButtonPopupTool,
|
|
18
|
+
{
|
|
19
|
+
ToolComponent: tool.PopupContentComponent,
|
|
20
|
+
iconUrl,
|
|
21
|
+
popupId: tool.id,
|
|
22
|
+
title,
|
|
23
|
+
defaultPosition: tool.popupDefaultPosition
|
|
24
|
+
},
|
|
25
|
+
tool.id
|
|
26
|
+
);
|
|
27
|
+
} else if (tool.type === "button") {
|
|
28
|
+
const ButtonComponent = tool.ButtonComponent;
|
|
29
|
+
return typeof ButtonComponent === "function" ? /* @__PURE__ */ jsx(ButtonComponent, {}, tool.id) : ButtonComponent;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
});
|
|
33
|
+
}, [tools, host_static_assets, environment_assets, getLabel]);
|
|
34
|
+
return /* @__PURE__ */ jsx(MapControl, { position, prepend: true, ControlContainer, children: toolsList });
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
ButtonsToolsList as B
|
|
38
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ButtonToolProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Boton de herramienta, se encarga de renderizar el boton de herramienta y gestionar el popup asociado.
|
|
4
|
+
*/
|
|
5
|
+
export declare function ButtonPopupTool(props: ButtonToolProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEnvironment } from "@m4l/core";
|
|
3
2
|
import { ToggleIconButton } from "@m4l/components";
|
|
4
3
|
import { u as useTool } from "../../hooks/useTool.js";
|
|
5
|
-
function
|
|
6
|
-
const { ToolComponent,
|
|
7
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
4
|
+
function ButtonPopupTool(props) {
|
|
5
|
+
const { ToolComponent, iconUrl } = props;
|
|
8
6
|
const { onToolClick, isDisabled, isToggled } = useTool(props);
|
|
9
7
|
if (!ToolComponent) {
|
|
10
8
|
return null;
|
|
@@ -15,10 +13,10 @@ function ButtonTool(props) {
|
|
|
15
13
|
isToggled,
|
|
16
14
|
disabled: isDisabled,
|
|
17
15
|
onToggle: onToolClick,
|
|
18
|
-
icon:
|
|
16
|
+
icon: iconUrl
|
|
19
17
|
}
|
|
20
18
|
);
|
|
21
19
|
}
|
|
22
20
|
export {
|
|
23
|
-
|
|
21
|
+
ButtonPopupTool as B
|
|
24
22
|
};
|
|
@@ -5,7 +5,7 @@ import { useFormContext, useWatch } from "react-hook-form";
|
|
|
5
5
|
import { useFormReadyForUpdate } from "@m4l/components";
|
|
6
6
|
import { useModuleDictionary } from "@m4l/core";
|
|
7
7
|
import { S as STYLE_MEASURE_OPTIONS } from "../../constants.js";
|
|
8
|
-
import {
|
|
8
|
+
import { f as MAP_ZINDEX_DEFAULT } from "../../../../../../../../constants.js";
|
|
9
9
|
import { g as getMagnitudeFactor, a as getMarkerPointIcon2, b as getMarkerPointLabel } from "./helpers.js";
|
|
10
10
|
import { m as mapClasses } from "../../../../../../../../classes/index.js";
|
|
11
11
|
import { useTheme } from "@mui/material";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StyledComponentType } from '../../../../external/MapControl/types';
|
|
2
|
+
import { MapTool, MapToolPosition } from '../../../../types';
|
|
3
|
+
export interface ButtonsToolsListProps {
|
|
4
|
+
position: MapToolPosition;
|
|
5
|
+
ControlContainer: StyledComponentType;
|
|
6
|
+
tools: MapTool[];
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { shallow } from "zustand/shallow";
|
|
3
|
-
import {
|
|
3
|
+
import { L as Layer } from "./subcomponents/Layer/index.js";
|
|
4
4
|
import L__default from "leaflet";
|
|
5
5
|
import React, { useEffect } from "react";
|
|
6
6
|
import { useMap } from "react-leaflet";
|
|
@@ -27,7 +27,7 @@ const LayersContainer = () => {
|
|
|
27
27
|
if (!map) {
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
|
-
return /* @__PURE__ */ jsx(React.Fragment, { children: layersId.map((l) => /* @__PURE__ */ jsx(
|
|
30
|
+
return /* @__PURE__ */ jsx(React.Fragment, { children: layersId.map((l) => /* @__PURE__ */ jsx(Layer, { layerId: l }, l)) });
|
|
31
31
|
};
|
|
32
32
|
export {
|
|
33
33
|
LayersContainer as L
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MarkerClusterGroupProps } from '../subcomponents/MarkerClusterGroup/types';
|
|
2
|
+
export type LefaletLayerRef = {
|
|
3
|
+
clickTimeout: NodeJS.Timeout | null;
|
|
4
|
+
clickCount: number;
|
|
5
|
+
handleClickSetted: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* "MyLayer" Este compoente es el encargado de renderizar todos los features de una capa.
|
|
9
|
+
* Utilizando la propiedad renderFeature, que tiene cada capa.
|
|
10
|
+
* @param props
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare const useClusterMarkers: () => import('react').RefObject<MarkerClusterGroupProps>;
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useMap, LayerGroup } from "react-leaflet";
|
|
2
|
+
import { LayerGroup } from "react-leaflet";
|
|
4
3
|
import L__default from "leaflet";
|
|
5
4
|
import { shallow } from "zustand/shallow";
|
|
6
5
|
import { M as MarkerClusterGroup } from "./subcomponents/MarkerClusterGroup/index.js";
|
|
7
6
|
import { R as RenderByEachFeatureComponent, M as MemonizedRenderByEachFeatureComponent } from "./subcomponents/RenderByEachFeatureComponent/index.js";
|
|
8
|
-
import { T as TIME_DOUBLE_CLICK } from "../../../../constants.js";
|
|
9
7
|
import { deepShallow } from "@m4l/components";
|
|
10
8
|
import { u as useMapStore } from "../../../../hooks/useMapStore/index.js";
|
|
11
|
-
const
|
|
9
|
+
const Layer = (props) => {
|
|
12
10
|
const { layerId } = props;
|
|
13
|
-
const map = useMap();
|
|
14
|
-
const popupRef = useRef(null);
|
|
15
|
-
const lefaletLayerRef = useRef({
|
|
16
|
-
clickTimeout: null,
|
|
17
|
-
clickCount: 0,
|
|
18
|
-
handleClickSetted: false
|
|
19
|
-
});
|
|
20
11
|
const featureIdOrCollection = useMapStore((state) => {
|
|
21
12
|
const geoJsonObject = state.hashLayers[layerId]?.geoJsonObject;
|
|
22
13
|
if (geoJsonObject && geoJsonObject.object.type === "Feature") {
|
|
@@ -30,33 +21,6 @@ const MyLayer = (props) => {
|
|
|
30
21
|
(state) => [state.hashLayers[layerId]?.visible, state.hashLayers[layerId]?.cluster],
|
|
31
22
|
shallow
|
|
32
23
|
);
|
|
33
|
-
const markerClusterGroupRef = useRef(null);
|
|
34
|
-
const handleClick = (a) => {
|
|
35
|
-
lefaletLayerRef.current.clickCount++;
|
|
36
|
-
if (lefaletLayerRef.current.clickCount === 1) {
|
|
37
|
-
lefaletLayerRef.current.clickTimeout = setTimeout(() => {
|
|
38
|
-
const clusterMarker = a.propagatedFrom;
|
|
39
|
-
if (clusterMarker && clusterMarker instanceof L__default.MarkerCluster) ;
|
|
40
|
-
if (!popupRef.current) {
|
|
41
|
-
popupRef.current = L__default.popup().setLatLng(a.sourceTarget._cLatLng).setContent("Hello, World!");
|
|
42
|
-
map.addLayer(popupRef.current);
|
|
43
|
-
} else {
|
|
44
|
-
popupRef.current.openOn(map);
|
|
45
|
-
}
|
|
46
|
-
lefaletLayerRef.current.clickCount = 0;
|
|
47
|
-
}, TIME_DOUBLE_CLICK);
|
|
48
|
-
} else if (lefaletLayerRef.current.clickCount === 2) {
|
|
49
|
-
if (lefaletLayerRef.current?.clickTimeout) {
|
|
50
|
-
clearTimeout(lefaletLayerRef.current.clickTimeout);
|
|
51
|
-
}
|
|
52
|
-
lefaletLayerRef.current.clickCount = 0;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
if (markerClusterGroupRef.current) {
|
|
57
|
-
markerClusterGroupRef.current.on("clusterclick", handleClick);
|
|
58
|
-
}
|
|
59
|
-
}, [markerClusterGroupRef.current]);
|
|
60
24
|
if (!featureIdOrCollection || !renderFeature) {
|
|
61
25
|
return null;
|
|
62
26
|
}
|
|
@@ -129,5 +93,5 @@ const MyLayer = (props) => {
|
|
|
129
93
|
}
|
|
130
94
|
};
|
|
131
95
|
export {
|
|
132
|
-
|
|
96
|
+
Layer as L
|
|
133
97
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { RenderByEachFeatureProps } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* "RenderByEachFeatureComponent":
|
|
4
|
+
* "RenderByEachFeatureComponent": Basicamente lo que este componente es crear el renderFeature en un envoltorio JSX en una nuevo Fiber ya que JSX crea un elemento con React.createElement y React.createElement crea un nuevo Fiber.
|
|
5
5
|
* Se realizó con el fin de que no haya re-renderizado de los features,
|
|
6
6
|
* Sin este wrapper cada vez que se actualiza LeafletLayer, se re-renderiza todos lo features.
|
|
7
7
|
* @param param0
|
|
@@ -3,10 +3,10 @@ import { Theme } from '@mui/material/styles';
|
|
|
3
3
|
import { MapSlots } from './slots/slots';
|
|
4
4
|
import { MAP_COMPONET_KEY_COMPONENT } from './constants';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
|
-
import { JSX_REACT_NODE, M4LOverridesStyleRules } from '@m4l/components';
|
|
7
|
-
import { MapSourcesToolOwnerState } from './subcomponents/Controls/subcomponents/
|
|
8
|
-
import { MapLayersToolOwnerState } from './subcomponents/Controls/subcomponents/
|
|
9
|
-
import { MapMeasureToolOwnerState } from './subcomponents/Controls/subcomponents/
|
|
6
|
+
import { JSX_REACT_NODE, M4LOverridesStyleRules, RNDDefaultPosition } from '@m4l/components';
|
|
7
|
+
import { MapSourcesToolOwnerState } from './subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MapSourcesTool/types';
|
|
8
|
+
import { MapLayersToolOwnerState } from './subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MapLayersTool/types';
|
|
9
|
+
import { MapMeasureToolOwnerState } from './subcomponents/Controls/subcomponents/ButtonsToolsList/subcomponents/MeasureTool/types';
|
|
10
10
|
export type Localization = {
|
|
11
11
|
/**
|
|
12
12
|
* "lat" Posición en del eje "Y" en grados.
|
|
@@ -27,6 +27,93 @@ export type Point = {
|
|
|
27
27
|
*/
|
|
28
28
|
y: number;
|
|
29
29
|
};
|
|
30
|
+
export type MapToolPosition = Extract<L.ControlPosition, 'topright' | 'bottomright'>;
|
|
31
|
+
export type MapToolType = 'popup' | 'button';
|
|
32
|
+
export interface BaseMapTool {
|
|
33
|
+
/**
|
|
34
|
+
* "id" id de la herramienta, tambien sirve como id del popup cuando es de tipo popup
|
|
35
|
+
*/
|
|
36
|
+
id: string;
|
|
37
|
+
/**
|
|
38
|
+
* "type" tipo de herramienta
|
|
39
|
+
*/
|
|
40
|
+
type: MapToolType;
|
|
41
|
+
/**
|
|
42
|
+
* "disabled" si la herramienta está deshabilitada
|
|
43
|
+
*/
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* "MapToolPopup" tipo de herramienta popup que ingresa como props al componente Map
|
|
48
|
+
*/
|
|
49
|
+
export interface BaseMapToolPopup extends BaseMapTool {
|
|
50
|
+
/**
|
|
51
|
+
* "type" tipo de herramienta
|
|
52
|
+
*/
|
|
53
|
+
type: 'popup';
|
|
54
|
+
/**
|
|
55
|
+
* "popupDefaultPosition" posición por defecto del arranque de el popup de la herramienta
|
|
56
|
+
*/
|
|
57
|
+
popupDefaultPosition: RNDDefaultPosition;
|
|
58
|
+
/**
|
|
59
|
+
* "PopupContentComponent" componente que se renderiza dentro del popup de la herramienta
|
|
60
|
+
*/
|
|
61
|
+
PopupContentComponent: JSX_REACT_NODE;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* "MapToolPopup" tipo de herramienta popup que ingresa como props al componente Map
|
|
65
|
+
* Que es agregado por el sistema y hace parte de las herramientas internas del mapa.
|
|
66
|
+
*/
|
|
67
|
+
export interface MapToolPopupInternal extends BaseMapToolPopup {
|
|
68
|
+
/**
|
|
69
|
+
* "isInternal" si la herramienta es interna del mapa
|
|
70
|
+
*/
|
|
71
|
+
isInternal: true;
|
|
72
|
+
/**
|
|
73
|
+
* Id componente donde se encuentran los iconos en s3
|
|
74
|
+
*/
|
|
75
|
+
componentPathId: string;
|
|
76
|
+
/**
|
|
77
|
+
* "iconUrl" url del icono de la herramienta
|
|
78
|
+
*/
|
|
79
|
+
iconId: string;
|
|
80
|
+
/**
|
|
81
|
+
* "popupTitle" titulo del popup de la herramienta
|
|
82
|
+
*/
|
|
83
|
+
dictionaryId: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* "MapToolPopupExternal" tipo de herramienta popup que ingresa como props al componente Map
|
|
87
|
+
* Que es agregado por el usuario y no hace parte de las herramientas internas del mapa.
|
|
88
|
+
*/
|
|
89
|
+
export interface MapToolPopupExternal extends BaseMapToolPopup {
|
|
90
|
+
/**
|
|
91
|
+
* "iconUrl" url del icono de la herramienta
|
|
92
|
+
*/
|
|
93
|
+
iconUrl: string;
|
|
94
|
+
/**
|
|
95
|
+
* "popupTitle" titulo del popup de la herramienta
|
|
96
|
+
*/
|
|
97
|
+
PopupTitle: string;
|
|
98
|
+
}
|
|
99
|
+
export type MapToolPopup = MapToolPopupInternal | MapToolPopupExternal;
|
|
100
|
+
export interface MapToolButton extends BaseMapTool {
|
|
101
|
+
/**
|
|
102
|
+
* "type" tipo de herramienta
|
|
103
|
+
*/
|
|
104
|
+
type: 'button';
|
|
105
|
+
/**
|
|
106
|
+
* "Button"
|
|
107
|
+
*/
|
|
108
|
+
ButtonComponent: JSX_REACT_NODE;
|
|
109
|
+
}
|
|
110
|
+
export type MapTool = MapToolPopup | MapToolButton;
|
|
111
|
+
export type PositionMapTool = MapTool & {
|
|
112
|
+
/**
|
|
113
|
+
* "position" posición de la herramienta
|
|
114
|
+
*/
|
|
115
|
+
position: MapToolPosition;
|
|
116
|
+
};
|
|
30
117
|
export interface MapProps {
|
|
31
118
|
/**
|
|
32
119
|
* "className" className del mapa
|
|
@@ -44,10 +131,6 @@ export interface MapProps {
|
|
|
44
131
|
* "maxZoom" Max Zoom global, por defecto es 22, sin embargo cada TileLayer coloca su propio maxZoom.
|
|
45
132
|
*/
|
|
46
133
|
maxZoom?: number;
|
|
47
|
-
/**
|
|
48
|
-
* "GpsTools" Componente que gestiona la herramienta de guardian GPS, geocercas, puntos de interes, etc.
|
|
49
|
-
*/
|
|
50
|
-
GpsTools?: JSX_REACT_NODE;
|
|
51
134
|
children?: ReactNode;
|
|
52
135
|
/**
|
|
53
136
|
* "disableMapEvents" permite deshabilitar los eventos del mapa, cuando se requiera
|
|
@@ -57,6 +140,10 @@ export interface MapProps {
|
|
|
57
140
|
* "style" permite definir el estilo del mapa
|
|
58
141
|
*/
|
|
59
142
|
style?: React.CSSProperties;
|
|
143
|
+
/**
|
|
144
|
+
* "tools" Herramientas del mapa, se pueden agregar herramientas como geocercas, puntos de interes, etc.
|
|
145
|
+
*/
|
|
146
|
+
tools?: PositionMapTool[];
|
|
60
147
|
}
|
|
61
148
|
export type MapSlotsType = keyof typeof MapSlots;
|
|
62
149
|
export type MapOwnerState = {
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { StyleOpacity, StyleDashArray, StyleWheight } from './types';
|
|
2
1
|
export declare const COMPONENT_TEST_ID = "M4LGpsMapTools";
|
|
3
2
|
export declare const COMPONENT_CLASS_NAME = "M4LGpsMapTools";
|
|
3
|
+
export declare const GPS_TOOLS_COMPONENT_PATH_ID = "map_gps_tools";
|
|
4
4
|
export declare const COOKIE_MAP_GEO_FILTER = "filter_map_geo";
|
|
5
|
-
export declare const COMPONENT_MAP_TOOLS_ID = "gps_tools";
|
|
6
|
-
export declare const STYLE_OPACITIES: StyleOpacity[];
|
|
7
|
-
export declare const STYLE_WHEIGHTS: StyleWheight[];
|
|
8
|
-
export declare const STYLE_PATTERNS: StyleDashArray[];
|
|
@@ -1,71 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
const COMPONENT_MAP_TOOLS_ID = "gps_tools";
|
|
3
|
-
const STYLE_OPACITIES = [
|
|
4
|
-
{
|
|
5
|
-
value: 0,
|
|
6
|
-
label: "0%"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
value: 0.1,
|
|
10
|
-
label: "10%"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
value: 0.2,
|
|
14
|
-
label: "20%"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
value: 0.3,
|
|
18
|
-
label: "30%"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
value: 0.4,
|
|
22
|
-
label: "40%"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
value: 0.5,
|
|
26
|
-
label: "50%"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
value: 1,
|
|
30
|
-
label: "100%"
|
|
31
|
-
}
|
|
32
|
-
];
|
|
33
|
-
const STYLE_WHEIGHTS = [
|
|
34
|
-
{
|
|
35
|
-
value: 0,
|
|
36
|
-
label: "0px"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
value: 1,
|
|
40
|
-
label: "1px"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
value: 2,
|
|
44
|
-
label: "2px"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
value: 3,
|
|
48
|
-
label: "3px"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
value: 4,
|
|
52
|
-
label: "4px"
|
|
53
|
-
}
|
|
54
|
-
];
|
|
55
|
-
const STYLE_PATTERNS = [
|
|
56
|
-
{
|
|
57
|
-
value: "",
|
|
58
|
-
label: "------"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
value: "4 1 2",
|
|
62
|
-
label: "-- - - --"
|
|
63
|
-
}
|
|
64
|
-
];
|
|
1
|
+
const GPS_TOOLS_COMPONENT_PATH_ID = "map_gps_tools";
|
|
65
2
|
export {
|
|
66
|
-
|
|
67
|
-
STYLE_OPACITIES as S,
|
|
68
|
-
STYLE_WHEIGHTS as a,
|
|
69
|
-
STYLE_PATTERNS as b,
|
|
70
|
-
COMPONENT_MAP_TOOLS_ID as c
|
|
3
|
+
GPS_TOOLS_COMPONENT_PATH_ID as G
|
|
71
4
|
};
|
package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/GpsMapToolsContext.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GpsMapToolsProviderProps } from './types';
|
|
2
|
+
declare const GpsMapToolsContext: import('react').Context<(Omit<Omit<import('zustand').StoreApi<import('./types').GpsMapToolsStateWithActions>, "setState"> & {
|
|
3
|
+
setState<A extends string | {
|
|
4
|
+
type: unknown;
|
|
5
|
+
}>(partial: import('./types').GpsMapToolsStateWithActions | Partial<import('./types').GpsMapToolsStateWithActions> | ((state: import('./types').GpsMapToolsStateWithActions) => import('./types').GpsMapToolsStateWithActions | Partial<import('./types').GpsMapToolsStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
6
|
+
}, "setState"> & {
|
|
7
|
+
setState(nextStateOrUpdater: import('./types').GpsMapToolsStateWithActions | Partial<import('./types').GpsMapToolsStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<import('./types').GpsMapToolsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
8
|
+
type: unknown;
|
|
9
|
+
} | undefined): void;
|
|
10
|
+
}) | null>;
|
|
11
|
+
/**
|
|
12
|
+
* Provedor del contexto de los mapas
|
|
13
|
+
* Expone el store (MapStore) encargado de gestionar la creación, modificación y borrado de capas.
|
|
14
|
+
* @param props
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* TODO: Documentar
|
|
19
|
+
*/
|
|
20
|
+
declare function GpsMapToolsProvider(props: GpsMapToolsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export { GpsMapToolsProvider, GpsMapToolsContext };
|
package/components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/GpsMapToolsContext.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useRef } from "react";
|
|
3
|
+
import { c as createGpsMapToolsStore } from "./store.js";
|
|
4
|
+
const GpsMapToolsContext = createContext(null);
|
|
5
|
+
function GpsMapToolsProvider(props) {
|
|
6
|
+
const { children } = props;
|
|
7
|
+
const mapStoreRef = useRef();
|
|
8
|
+
if (!mapStoreRef.current) {
|
|
9
|
+
mapStoreRef.current = createGpsMapToolsStore({
|
|
10
|
+
ownerState: {
|
|
11
|
+
status: "init"
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsx(GpsMapToolsContext.Provider, { value: mapStoreRef.current, children });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
GpsMapToolsContext as G,
|
|
19
|
+
GpsMapToolsProvider as a
|
|
20
|
+
};
|