@m4l/components 0.2.32 → 0.2.34
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/@types/export.d.ts +441 -413
- package/{commonjs.333e55c7.js → commonjs.565e6834.js} +0 -5
- package/components/AccountPopover/{index.69cda48b.js → index.39efc8f0.js} +1 -1
- package/components/AppBar/{index.0cc0bd40.js → index.c8850b99.js} +2 -2
- package/components/CommonActions/components/ActionCancel/{index.f00f026d.js → index.416cbf9b.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.08fe4e27.js → index.78267f7c.js} +4 -4
- package/components/CommonActions/components/ActionFormIntro/{index.b5a5c4b4.js → index.dcb4d280.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.574967a0.js → index.094290fd.js} +2 -2
- package/components/CommonActions/components/Actions/{index.23bfc86b.js → index.fa7ab18c.js} +1 -8
- package/components/DataGrid/assets/icons/datagrid.svg +4 -4
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.cf410875.js → index.cd6e553a.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.00f9ed87.js → index.0c439ac3.js} +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.4089f91b.js → index.867b8745.js} +1 -1
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/{index.eb406256.js → index.0b23ba88.js} +6 -0
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/types.d.ts +1 -0
- package/components/DataGrid/{index.c283b50b.js → index.abe0f9b9.js} +43 -41
- package/components/DataGrid/subcomponents/Actions/{index.d945647f.js → index.4f2071ee.js} +12 -11
- package/components/DragResizeWindow/DragResizeWindow.d.ts +15 -9
- package/components/DragResizeWindow/classes/types.d.ts +1 -0
- package/components/DragResizeWindow/{index.82cf6408.js → index.13ef022e.js} +108 -63
- package/components/DragResizeWindow/types.d.ts +23 -1
- package/components/DynamicFilter/DynamicFilter.d.ts +2 -2
- package/components/DynamicFilter/classes/index.d.ts +1 -1
- package/components/DynamicFilter/classes/types.d.ts +1 -0
- package/components/DynamicFilter/constants.d.ts +2 -1
- package/components/DynamicFilter/contexts/DynamicFilterContext/helpers.d.ts +2 -3
- package/components/DynamicFilter/contexts/DynamicFilterContext/store.d.ts +3 -2
- package/components/DynamicFilter/dictionary.d.ts +4 -0
- package/components/DynamicFilter/{index.75c66024.js → index.c52a8e96.js} +189 -35
- package/components/DynamicFilter/subcomponents/fieldstypes/SelectFilter/helpers.d.ts +51 -0
- package/components/DynamicFilter/subcomponents/fieldstypes/SelectFilter/index.d.ts +5 -0
- package/components/DynamicFilter/subcomponents/fieldstypes/factory.d.ts +12 -4
- package/components/DynamicFilter/subcomponents/fieldstypes/validations.d.ts +8 -1
- package/components/DynamicFilter/types.d.ts +40 -19
- package/components/FieldLabel/{index.75e89ace.js → index.0412576c.js} +2 -2
- package/components/GridLayout/{index.00740f82.js → index.65470f01.js} +2 -2
- package/components/GridLayout/subcomponents/Griditem/{index.3d479abb.js → index.30016fc1.js} +3 -3
- package/components/GridLayout/subcomponents/Responsive/{index.733e8ba6.js → index.5b3e0521.js} +1 -1
- package/components/GridLayout/subcomponents/SizeProvider/{index.247cc027.js → index.0328ad0a.js} +1 -1
- package/components/Icon/{index.14670a00.js → index.ad330e78.js} +65 -89
- package/components/Image/{index.6aa1ae49.js → index.b799c514.js} +2 -2
- package/components/LanguagePopover/{index.4149a8da.js → index.93c48ec5.js} +2 -2
- package/components/LinearProgressIndeterminate/{index.6e5db737.js → index.c46da124.js} +1 -1
- package/components/LoadingError/{index.1ec78dd5.js → index.ee29dd48.js} +3 -3
- package/components/MFLoader/{index.6037f834.js → index.3a37407c.js} +1 -1
- package/components/ModalDialog/{index.f27b7c2d.js → index.78c9650a.js} +4 -4
- package/components/NoItemSelected/{index.54023226.js → index.3a479c64.js} +1 -1
- package/components/ObjectLogs/{index.32ddae31.js → index.1d85a021.js} +6 -6
- package/components/PDFViewer/{index.d185afd0.js → index.88c6ff6a.js} +1 -1
- package/components/Page/{index.2c550c91.js → index.5d34dc4d.js} +1 -1
- package/components/PaperForm/{index.63dc4b29.js → index.d08b43f6.js} +1 -1
- package/components/Period/{index.ddf8716c.js → index.3f89d8a4.js} +2 -2
- package/components/PrintingSystem/{index.bcef9a6f.js → index.27f1f209.js} +13 -13
- package/components/PrintingSystem/subcomponents/BodyNode/{index.14ecdd97.js → index.319a3bb9.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.aa2b8706.js → index.990e164c.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.ce81726b.js → index.e504dbd2.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.7fc8c316.js → index.9a19a7cb.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.88fcc856.js → index.8d14e1b6.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.d3f4e000.js → index.89e4eaab.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.30cbab70.js → index.dd4ca449.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.05a3579e.js → index.048d7ebf.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.d6344807.js → index.83f1efea.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.79d2e283.js → index.5427cb75.js} +1 -1
- package/components/PropertyValue/{index.1dbf6ef8.js → index.15c61a4b.js} +2 -2
- package/components/Resizeable/{index.eba4fda9.js → index.cb5aad75.js} +1 -1
- package/components/SideBar/{index.b1455bd0.js → index.b0359a2b.js} +4 -4
- package/components/SplitLayout/{index.3856385c.js → index.7302ceb3.js} +1 -1
- package/components/ToastContainer/{index.a33ebb52.js → index.4d44ce53.js} +4 -4
- package/components/areas/components/AreasAdmin/{index.922cdb11.js → index.820a00ab.js} +10 -10
- package/components/areas/components/AreasViewer/{index.f7126815.js → index.6d7194e2.js} +14 -14
- package/components/areas/contexts/AreasContext/{index.37be3e4e.js → index.c5a3b322.js} +4 -4
- package/components/areas/hooks/useAreas/{index.e3971ffa.js → index.caa92660.js} +1 -1
- package/components/areas/types.d.ts +1 -1
- package/components/commercial/AppBarCommercial/{index.3e0ad6ef.js → index.9cf586a2.js} +1 -1
- package/components/commercial/SectionCommercial/index.4dbfc0a7.js +48 -0
- package/components/commercial/TopBar/{index.7b22d97b.js → index.93a7d26a.js} +4 -4
- package/components/{HamburgerMenu/index.fb1a3aae.js → commercial/index.89ad149c.js} +2 -2
- package/components/formatters/BooleanFormatter/{index.fb44d69d.js → index.9ccf9298.js} +2 -2
- package/components/formatters/{index.05c4e1a4.js → index.03471e3f.js} +1 -1
- package/components/hook-form/HelperError/index.66bbcac3.js +30 -0
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +2 -1
- package/components/hook-form/RHFAutocomplete/{index.3592430b.js → index.1f2afb6b.js} +75 -42
- package/components/hook-form/RHFAutocomplete/types.d.ts +4 -2
- package/components/hook-form/RHFAutocompleteAsync/{index.dfbaece5.js → index.bc278965.js} +1 -1
- package/components/hook-form/RHFCheckbox/{index.251a36b5.js → index.eca64469.js} +2 -2
- package/components/hook-form/RHFColorPicker/{index.e7d27ca0.js → index.dc13d5a3.js} +6 -8
- package/components/hook-form/RHFDateTime/{index.fc474c35.js → index.e554b068.js} +3 -3
- package/components/hook-form/RHFHelperError/index.d.ts +4 -0
- package/components/hook-form/RHFPeriod/{index.2bf650c4.js → index.e4e4530f.js} +3 -3
- package/components/hook-form/RHFTextField/{index.db56e769.js → index.1bfa601f.js} +4 -4
- package/components/hook-form/RHFUpload/{index.9d4d4460.js → index.6e98b291.js} +4 -4
- package/components/index.d.ts +2 -0
- package/components/maps/components/GpsTools/GpsTools.d.ts +1 -0
- package/components/maps/components/GpsTools/classes/index.d.ts +4 -0
- package/components/maps/components/GpsTools/classes/types.d.ts +13 -0
- package/components/maps/components/GpsTools/constants.d.ts +8 -0
- package/components/maps/components/GpsTools/contexts/GpsToolsContext/index.d.ts +19 -0
- package/components/maps/components/GpsTools/contexts/GpsToolsContext/store.d.ts +16 -0
- package/components/maps/components/GpsTools/contexts/GpsToolsContext/types.d.ts +165 -0
- package/components/maps/components/GpsTools/hooks/useGpsToolsStore/index.d.ts +2 -0
- package/components/maps/components/GpsTools/hooks/useLayers/index.d.ts +1 -0
- package/components/maps/components/GpsTools/icons.d.ts +15 -0
- package/components/maps/components/GpsTools/index.d.ts +3 -0
- package/components/maps/components/GpsTools/index.d93188ad.js +1792 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/index.d.ts +9 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/constants.d.ts +20 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/helpers.d.ts +19 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useDrawing.d.ts +11 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSubmit.d.ts +8 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSumbitErrorsFocus.d.ts +5 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useValidation.d.ts +22 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/index.d.ts +2 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/index.d.ts +1 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/types.d.ts +6 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/validations.d.ts +5 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index.d.ts +1 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/types.d.ts +7 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/validations.d.ts +6 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.d.ts +2 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/types.d.ts +2 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.d.ts +1 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/index.d.ts +1 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/FillData/index.d.ts +1 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/index.d.ts +1 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/types.d.ts +10 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/types.d.ts +27 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedFeatures.d.ts +9 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedGeofences.d.ts +4 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.d.ts +9 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useMaster.d.ts +20 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.d.ts +9 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.d.ts +1 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/subcomponents/Filter/index.d.ts +7 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/constants.d.ts +7 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/model.d.ts +122 -0
- package/components/maps/components/GpsTools/types.d.ts +34 -0
- package/components/maps/components/Map/Map.d.ts +9 -0
- package/components/maps/components/Map/classes/index.d.ts +5 -0
- package/components/maps/components/Map/classes/types.d.ts +69 -0
- package/components/maps/components/Map/constants.d.ts +24 -0
- package/components/maps/components/Map/contexts/MapContext/MapContext.d.ts +19 -0
- package/components/maps/components/Map/contexts/MapContext/helper.d.ts +8 -0
- package/components/maps/components/Map/contexts/MapContext/index.d.ts +2 -0
- package/components/maps/components/Map/contexts/MapContext/store.d.ts +16 -0
- package/components/maps/components/Map/contexts/MapContext/types.d.ts +592 -0
- package/components/maps/components/Map/dictionary.d.ts +86 -0
- package/components/maps/components/Map/external/Control/index.d.ts +11 -0
- package/components/maps/components/Map/external/Control/types.d.ts +8 -0
- package/components/maps/components/Map/external/googleMutant/index.d.ts +94 -0
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/index.d.ts +8 -0
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/FeatureDivIconLabel/index.d.ts +3 -0
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/FeatureDivIconLabel/types.d.ts +7 -0
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/MarkerIconLabel/index.d.ts +2 -0
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/MarkerIconLabel/types.d.ts +6 -0
- package/components/maps/components/Map/featureRenders/MarkerFeatureRender/IconMarker.d.ts +6 -0
- package/components/maps/components/Map/featureRenders/MarkerFeatureRender/IconMarkerGrua.d.ts +1 -0
- package/components/maps/components/Map/featureRenders/MarkerFeatureRender/IconMarkerTaxi.d.ts +1 -0
- package/components/maps/components/Map/featureRenders/MarkerFeatureRender/index.d.ts +2 -0
- package/components/maps/components/Map/featureRenders/index.d.ts +2 -0
- package/components/maps/components/Map/hooks/useAutoFocus/index.d.ts +8 -0
- package/components/maps/components/Map/hooks/useAutoFocus/types.d.ts +15 -0
- package/components/maps/components/Map/hooks/useDisableZoomEvents/index.d.ts +6 -0
- package/components/maps/components/Map/hooks/useMapStore/index.d.ts +3 -0
- package/components/maps/components/Map/icons.d.ts +50 -0
- package/components/maps/components/Map/index.accb1f77.js +2386 -0
- package/components/maps/components/Map/index.d.ts +7 -0
- package/components/maps/components/Map/pluginLayers/PolylineWithArrows/index.d.ts +9 -0
- package/components/maps/components/Map/pluginLayers/index.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/Controls/index.d.ts +17 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/index.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index.d.ts +7 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers.d.ts +9 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns.d.ts +15 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster.d.ts +13 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.d.ts +5 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/model.d.ts +27 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.d.ts +2 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.d.ts +4 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.d.ts +2 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/types.d.ts +4 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/index.d.ts +12 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants.d.ts +30 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.d.ts +11 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts +13 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/types.d.ts +13 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useValidation.d.ts +10 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/index.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/index.d.ts +5 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +6 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/validations.d.ts +2 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MyActions/index.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/types.d.ts +9 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ZoomButtons/index.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/types.d.ts +4 -0
- package/components/maps/components/Map/subcomponents/Controls/types.d.ts +22 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/index.d.ts +2 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/index.d.ts +17 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/index.d.ts +20 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/types.d.ts +11 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/RenderByEachFeatureComponent/index.d.ts +12 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/RenderByEachFeatureComponent/types.d.ts +5 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/types.d.ts +2 -0
- package/components/maps/components/Map/subcomponents/TileLayers/index.d.ts +6 -0
- package/components/maps/components/Map/subcomponents/TileLayers/subcomponents/TileLayerGoogle/index.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/TileLayers/subcomponents/TileLayerOthers/index.d.ts +6 -0
- package/components/maps/components/Map/types.d.ts +40 -0
- package/components/maps/index.34ab6a68.js +7 -0
- package/components/maps/index.d.ts +3 -0
- package/components/maps/leaflet-geoman.d.ts +1633 -1633
- package/components/maps/utils.d.ts +15 -0
- package/components/modal/{WindowBase.2e5506d7.js → WindowBase.fd86f575.js} +3 -3
- package/components/modal/{WindowConfirm.ce47a48a.js → WindowConfirm.ee6de236.js} +6 -6
- package/components/mui_extended/Accordion/{index.f9042228.js → index.7dcdfd3a.js} +2 -2
- package/components/mui_extended/Button/{index.d5a031be.js → index.c3084916.js} +1 -1
- package/components/mui_extended/{CheckBox.0dcf39ae.js → CheckBox.2a3b86c5.js} +1 -1
- package/components/mui_extended/IconButton/{index.d8bdadaa.js → index.f8a3021b.js} +1 -1
- package/components/mui_extended/MenuActions/{index.154d57f0.js → index.90f53670.js} +2 -2
- package/components/mui_extended/Pager/{index.da7ea851.js → index.ea2a4f3e.js} +2 -2
- package/components/mui_extended/Tab/{index.2068925d.js → index.9214d9cc.js} +4 -4
- package/components/mui_extended/TabContent/types.d.ts +1 -1
- package/components/mui_extended/ToggleButton/ToggleButton.d.ts +2 -1
- package/components/mui_extended/ToggleButton/{index.595ea955.js → index.191711f3.js} +6 -9
- package/components/mui_extended/ToggleButton/types.d.ts +2 -2
- package/components/mui_extended/ToggleIconButton/ToggleIconButton.d.ts +1 -12
- package/components/mui_extended/ToggleIconButton/index.d9dbf650.js +19 -0
- package/components/mui_extended/ToggleIconButton/types.d.ts +2 -3
- package/components/popups/PopupsProvider/index.d7409f48.js +179 -0
- package/components/popups/PopupsViewer/index.1500ce72.js +186 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.d.ts +19 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/helper.d.ts +7 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/index.d.ts +1 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts +16 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +160 -0
- package/components/popups/components/PopupsProvider/hooks/usePopupsStore/index.d.ts +3 -0
- package/components/popups/components/PopupsProvider/index.d.ts +2 -0
- package/components/popups/components/PopupsViewer/PopupsViewer.d.ts +8 -0
- package/components/popups/components/PopupsViewer/classes/index.d.ts +15 -0
- package/components/popups/components/PopupsViewer/classes/types.d.ts +13 -0
- package/components/{PopupsProvider → popups/components/PopupsViewer}/constants.d.ts +2 -2
- package/components/popups/components/PopupsViewer/icons.d.ts +3 -0
- package/components/popups/components/PopupsViewer/index.d.ts +1 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/index.d.ts +9 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/Header/index.d.ts +2 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/Header/types.d.ts +2 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +16 -0
- package/components/popups/components/PopupsViewer/types.d.ts +3 -0
- package/components/popups/index.c5eae682.js +1 -0
- package/components/popups/index.d.ts +2 -0
- package/contexts/ModalContext/{index.3d48d675.js → index.2368bb19.js} +1 -1
- package/hocs/withToggle/index.50aec5e4.js +22 -0
- package/hocs/withToggle/index.d.ts +2 -2
- package/hocs/withToggle/types.d.ts +6 -4
- package/hooks/useFormAddEdit/{index.07e5258d.js → index.000ce60b.js} +2 -2
- package/hooks/useFormReadyForUpdate/index.d.ts +6 -0
- package/hooks/useFormReadyForUpdate/index.f60f500e.js +20 -0
- package/hooks/useModal/{index.cb1d6a37.js → index.f73d7e42.js} +1 -1
- package/hooks/useSizeContainer/contants.d.ts +1 -0
- package/hooks/useSizeContainer/index.62b4e0c4.js +35 -0
- package/hooks/useSizeContainer/index.d.ts +8 -0
- package/hooks/useStateRef/index.538edb89.js +15 -0
- package/hooks/useStateRef/index.d.ts +8 -0
- package/hooks/useTab/{index.c0564138.js → index.976d5e1e.js} +1 -1
- package/index.js +157 -115
- package/package.json +11 -5
- package/{react-draggable.6cf19cba.js → react-draggable.e4725f3a.js} +4 -4
- package/{react-json-view.5636414a.js → react-json-view.57125fcf.js} +1 -1
- package/{react-resizable.0ebffd82.js → react-resizable.c07d63fb.js} +5 -5
- package/{react-splitter-layout.c5d98bf7.js → react-splitter-layout.8b1655c8.js} +3 -3
- package/vite-env.d.ts +3 -3
- package/components/PopupsProvider/index.3d5ad0ee.js +0 -4
- package/components/mui_extended/ToggleIconButton/index.c588d5e1.js +0 -29
- package/hocs/withToggle/index.e44eb0da.js +0 -24
- package/node_modules.98455a76.js +0 -6921
- package/vendor.55925cb3.js +0 -182
- /package/utils/{index.24b5284a.js → index.6469f148.js} +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { GetLabelType } from '@m4l/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { PopupsClasses } from '../../../PopupsViewer/classes/types';
|
|
4
|
+
import { DraggableWindowProps } from '../../../../../DragResizeWindow/types';
|
|
5
|
+
import { PositionXY } from '../../../../../../utils/types';
|
|
6
|
+
export declare type PopupStatus = 'init' | 'closing' | 'hidden';
|
|
7
|
+
export interface PopupStoreProps extends Pick<DraggableWindowProps, 'bounds' | 'defaultPosition'> {
|
|
8
|
+
/**
|
|
9
|
+
* "popupId" Indetificador del popupId
|
|
10
|
+
*/
|
|
11
|
+
popupId: string;
|
|
12
|
+
/**
|
|
13
|
+
* "status" Estado del popup
|
|
14
|
+
*/
|
|
15
|
+
status: PopupStatus;
|
|
16
|
+
/**
|
|
17
|
+
* "iconUrl" Icono de la ventan
|
|
18
|
+
*/
|
|
19
|
+
iconUrl: string;
|
|
20
|
+
/**
|
|
21
|
+
* "title" Titulo de la ventan
|
|
22
|
+
*/
|
|
23
|
+
title: string;
|
|
24
|
+
/**
|
|
25
|
+
* "subTitle" Subtitulo de la ventan
|
|
26
|
+
*/
|
|
27
|
+
subTitle?: string;
|
|
28
|
+
/**
|
|
29
|
+
* "editionInfo" Mensaje que muestra el registro que se está editando.
|
|
30
|
+
*/
|
|
31
|
+
editionInfo?: string;
|
|
32
|
+
/**
|
|
33
|
+
* draggable Indica si el popup es arrastrable, default true
|
|
34
|
+
*/
|
|
35
|
+
draggable?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* resizable Indica si el popup es redimensionable, default true
|
|
38
|
+
*/
|
|
39
|
+
resizable?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* maxSizeByPadding Tamaño maximo del popup en terminos de padding con respecto al conenedor padre
|
|
42
|
+
*/
|
|
43
|
+
maxSizeByPadding?: PositionXY;
|
|
44
|
+
/**
|
|
45
|
+
* "componentProps" Propiedades que se le pasan al componente que se va a mostrar en el popup.
|
|
46
|
+
*/
|
|
47
|
+
componentProps?: Record<string, any>;
|
|
48
|
+
/**
|
|
49
|
+
* functionComponent retorna el componente que se va a mostrar en el popup.
|
|
50
|
+
*
|
|
51
|
+
* Lo unico que necesita es guardar la referencia la función que retorna el componente.
|
|
52
|
+
*/
|
|
53
|
+
functionComponent?: React.FC<Record<string, any>>;
|
|
54
|
+
/**
|
|
55
|
+
* "onMouseDown" Evento nativo del Draggable, para tomar acciones externamente
|
|
56
|
+
*/
|
|
57
|
+
onMouseDown?: (e: MouseEvent) => void;
|
|
58
|
+
}
|
|
59
|
+
export declare type PopupsClassStatus = 'init' | 'ready';
|
|
60
|
+
export declare type OwnerState = {
|
|
61
|
+
status: PopupsClassStatus;
|
|
62
|
+
/**
|
|
63
|
+
* "isMobile" cuando el navegador está en modo celular
|
|
64
|
+
*/
|
|
65
|
+
isMobile: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* "isSkeleton" indica si el componente está en skeleton.
|
|
68
|
+
*/
|
|
69
|
+
isSkeleton: boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* @type
|
|
73
|
+
* @name ExternalOwnerState
|
|
74
|
+
* @description Estados que se actulizan por fuera del store, a través de hooks
|
|
75
|
+
*/
|
|
76
|
+
export declare type ExternalOwnerState = Pick<OwnerState, 'isMobile' | 'isSkeleton'>;
|
|
77
|
+
/**
|
|
78
|
+
* @interface
|
|
79
|
+
* @description Interface que define el estado del componente (variables y funciones )
|
|
80
|
+
*/
|
|
81
|
+
export interface PopupsState {
|
|
82
|
+
ownerState: OwnerState;
|
|
83
|
+
/**
|
|
84
|
+
* "classes" enfocado al funcionamiento de las clases a nivel de map
|
|
85
|
+
*/
|
|
86
|
+
classes: PopupsClasses;
|
|
87
|
+
/**
|
|
88
|
+
* "poupsIds" Poups para saber en que orden se muestran
|
|
89
|
+
*/
|
|
90
|
+
popupsIds: string[];
|
|
91
|
+
/**
|
|
92
|
+
* "hashPoups" Poups
|
|
93
|
+
*/
|
|
94
|
+
hashPopups: Record<string, PopupStoreProps>;
|
|
95
|
+
/**
|
|
96
|
+
* "getLabel" funcion que usará para traducir las etiquetas de diccionario
|
|
97
|
+
*/
|
|
98
|
+
getLabel: GetLabelType;
|
|
99
|
+
}
|
|
100
|
+
export declare type OpenPopupOptions = {
|
|
101
|
+
/**
|
|
102
|
+
* @description Indica si se deben cerrar primero los otros propus.
|
|
103
|
+
*/
|
|
104
|
+
closeOthers: boolean;
|
|
105
|
+
};
|
|
106
|
+
export interface PopupsStateWithActions extends PopupsState {
|
|
107
|
+
popupsActions: {
|
|
108
|
+
/**
|
|
109
|
+
* @description
|
|
110
|
+
*/
|
|
111
|
+
init(layersStore: PopupStoreProps[]): void;
|
|
112
|
+
/**
|
|
113
|
+
* @description Cambia el estado del popus
|
|
114
|
+
*/
|
|
115
|
+
setState: (state: PopupsClassStatus) => void;
|
|
116
|
+
/**
|
|
117
|
+
* @description Agrega una un poupup nuevo al hash de popups y al array de ids,
|
|
118
|
+
*/
|
|
119
|
+
addPopup: (popupProps: Omit<PopupStoreProps, 'status'>, options?: OpenPopupOptions) => void;
|
|
120
|
+
/**
|
|
121
|
+
* @description Remueve el poupup del hash de poups y de arrays de ids
|
|
122
|
+
*/
|
|
123
|
+
removePopup: (popupId: string) => void;
|
|
124
|
+
/**
|
|
125
|
+
* @description pasa el status a closing para que las las transiciones se ejecuten.
|
|
126
|
+
*/
|
|
127
|
+
closePopup: (popupId: string) => void;
|
|
128
|
+
/**
|
|
129
|
+
* @description Modifica un popup espeficio
|
|
130
|
+
*/
|
|
131
|
+
updatePopup: (popupId: string, popupProps: Partial<Omit<PopupStoreProps, 'status'>>) => void;
|
|
132
|
+
/**
|
|
133
|
+
* @description pasa el status a init, no se ejecutan las transiciones, porque el popup viene de estar hide .
|
|
134
|
+
*/
|
|
135
|
+
showPopup: (popupId: string) => void;
|
|
136
|
+
/**
|
|
137
|
+
* @description pasa el status a hide, no se ejecutan las transiciones, porque el popup se esconde inmediatamente.
|
|
138
|
+
*/
|
|
139
|
+
hidePopup: (popupId: string) => void;
|
|
140
|
+
/**
|
|
141
|
+
* @description Actualiza la variable de estado "getLabel"
|
|
142
|
+
* @param newHandler handle o función que va a traducir las etiquetas, esto es necesario debido que getLabel de useModuleDictionary
|
|
143
|
+
* cambia por el useCallback, cuando el diccionario se carga.
|
|
144
|
+
* @returns void
|
|
145
|
+
*/
|
|
146
|
+
setHandlerGetLabel: (newHandler: GetLabelType) => void;
|
|
147
|
+
/**
|
|
148
|
+
* @description Modifica los estados que se actualizan externamente al Store
|
|
149
|
+
* @param newIsMobile
|
|
150
|
+
* @returns
|
|
151
|
+
*/
|
|
152
|
+
setExternalState: (newExternalState: ExternalOwnerState) => void;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
export declare type DefaultPopupsStoreProps = PopupsState;
|
|
156
|
+
export declare type InitialPopupsStoreProps = Pick<PopupsState, 'getLabel' | 'ownerState'> & Partial<DefaultPopupsStoreProps>;
|
|
157
|
+
export interface PopupsProviderProps {
|
|
158
|
+
initialPopups?: PopupStoreProps[];
|
|
159
|
+
children: ReactNode;
|
|
160
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PopupContainerProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @description Visor de poups, cuyo funcionamineto depende del proveedor de popups. PoupsProvider.
|
|
4
|
+
* Utiliza la librería de tranciones para animar la apertura y cierre de los popups.
|
|
5
|
+
* @param props
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const PopupsViewer: (props: PopupContainerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PopupsClasses } from './types';
|
|
2
|
+
import { OwnerState } from '../../PopupsProvider/contexts/PopupsContext/types';
|
|
3
|
+
export declare const popupsClasses: PopupsClasses;
|
|
4
|
+
export declare function getPopupsUtilityClass(slot: string): string;
|
|
5
|
+
export declare const popupsUtilityClasses: (_ownerState: OwnerState) => {
|
|
6
|
+
containerRoot: string;
|
|
7
|
+
popupRoot: string;
|
|
8
|
+
popupHeaderContainer: string;
|
|
9
|
+
popupHeaderTitle: string;
|
|
10
|
+
popupHeaderSubTitle: string;
|
|
11
|
+
popupContent: string;
|
|
12
|
+
popupHidden: string;
|
|
13
|
+
popupWithSubTitle: string;
|
|
14
|
+
popupsContainer: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { popupsUtilityClasses } from ".";
|
|
2
|
+
export interface PopupsClasses {
|
|
3
|
+
containerRoot: string;
|
|
4
|
+
popupRoot: string;
|
|
5
|
+
popupHeaderContainer: string;
|
|
6
|
+
popupHeaderTitle: string;
|
|
7
|
+
popupHeaderSubTitle: string;
|
|
8
|
+
popupContent: string;
|
|
9
|
+
popupHidden: string;
|
|
10
|
+
popupWithSubTitle: string;
|
|
11
|
+
}
|
|
12
|
+
export declare type PopupsClassesKey = keyof PopupsClasses;
|
|
13
|
+
export declare type Classes = ReturnType<typeof popupsUtilityClasses>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const COMPONENT_TEST_ID = "
|
|
2
|
-
export declare const COMPONENT_CLASS_NAME = "
|
|
1
|
+
export declare const COMPONENT_TEST_ID = "M4LPopupsViewer";
|
|
2
|
+
export declare const COMPONENT_CLASS_NAME = "M4LPopupsViewer";
|
|
3
3
|
export declare const EARTH_RADIO = 6378137;
|
|
4
4
|
export declare const DN = 500;
|
|
5
5
|
export declare const DE = 500;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PopupsViewer } from './PopupsViewer';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PopupProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @description Componente que representa un popup. Al estar dentro DragResizeWindow, por medio del contendor padre
|
|
4
|
+
* y su size, los popus se adaptan al tamaño del contenedor. La documetanción las funcionalidades estan directamente en
|
|
5
|
+
* DragResizeWindow.
|
|
6
|
+
* @param props
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const Popup: (props: PopupProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ContainerSize } from "../../../../../../utils/types";
|
|
2
|
+
export declare type ResizeReason = 'start' | 'resize' | 'stop';
|
|
3
|
+
export interface PopupProps {
|
|
4
|
+
/**
|
|
5
|
+
* "popupId" Indetificador del popupId
|
|
6
|
+
*/
|
|
7
|
+
popupId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Referencia el contendedor donde van a estar los popups
|
|
10
|
+
*/
|
|
11
|
+
containerElement: HTMLElement;
|
|
12
|
+
/**
|
|
13
|
+
* "containerSize" tamaño del contenedor padre
|
|
14
|
+
*/
|
|
15
|
+
containerSize?: ContainerSize | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useState } from "react";
|
|
2
|
-
import { M as ModalDialog } from "../../components/ModalDialog/index.
|
|
2
|
+
import { M as ModalDialog } from "../../components/ModalDialog/index.78c9650a.js";
|
|
3
3
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
4
|
const ModalContext = createContext(null);
|
|
5
5
|
function ModalProvider({
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
function withToggle(Component) {
|
|
4
|
+
return (props) => {
|
|
5
|
+
const {
|
|
6
|
+
isToggled: propIsToggled,
|
|
7
|
+
onToggle: propOnToggle,
|
|
8
|
+
...rest
|
|
9
|
+
} = props;
|
|
10
|
+
const [internalIsToggled, setInternalIsToggled] = useState(props.defaultIsPressed || false);
|
|
11
|
+
const isToggled = propIsToggled !== void 0 ? propIsToggled : internalIsToggled;
|
|
12
|
+
const onToggle = propOnToggle !== void 0 ? propOnToggle : () => setInternalIsToggled((prev) => !prev);
|
|
13
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
14
|
+
...rest,
|
|
15
|
+
onToggle,
|
|
16
|
+
isToggled
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
withToggle as w
|
|
22
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare function withToggle<T extends
|
|
2
|
+
import { ToggleableProps } from './types';
|
|
3
|
+
export declare function withToggle<T extends ToggleableProps>(Component: React.ComponentType<T>): (props: T) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export interface
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export interface ToggleableProps {
|
|
3
|
+
isToggled?: boolean;
|
|
4
|
+
onToggle?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
5
|
+
defaultIsPressed?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare type ComponentWithToggleProps = {
|
|
7
|
-
|
|
8
|
+
onToggle: (e: React.MouseEvent<HTMLButtonElement>, isPressed?: boolean) => void;
|
|
8
9
|
defaultIsPressed?: boolean;
|
|
10
|
+
isPressed?: boolean;
|
|
9
11
|
children?: React.ReactNode;
|
|
10
12
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useNetwork, useFlags, useModuleDictionary } from "@m4l/core";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import { u as useModal } from "../useModal/index.
|
|
3
|
+
import { u as useModal } from "../useModal/index.f73d7e42.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { W as WindowConfirm } from "../../components/modal/WindowConfirm.
|
|
5
|
+
import { W as WindowConfirm } from "../../components/modal/WindowConfirm.ee6de236.js";
|
|
6
6
|
function useFormAddEdit(props) {
|
|
7
7
|
const {
|
|
8
8
|
initialValues,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
import { useFormContext, useWatch } from "react-hook-form";
|
|
3
|
+
function useFormReadyForUpdate() {
|
|
4
|
+
const [readyToUpdate, setReadyToUpdate] = useState(false);
|
|
5
|
+
const { control } = useFormContext();
|
|
6
|
+
const statusLoad = useWatch({
|
|
7
|
+
control,
|
|
8
|
+
name: "statusLoad"
|
|
9
|
+
});
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (statusLoad !== "ready") {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
setReadyToUpdate(true);
|
|
15
|
+
}, [statusLoad]);
|
|
16
|
+
return readyToUpdate;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
useFormReadyForUpdate as u
|
|
20
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { M as ModalContext } from "../../contexts/ModalContext/index.
|
|
2
|
+
import { M as ModalContext } from "../../contexts/ModalContext/index.2368bb19.js";
|
|
3
3
|
function useModal() {
|
|
4
4
|
const context = useContext(ModalContext);
|
|
5
5
|
if (!context)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const THROTTLE_RESIZE_TIMEOUT = 200;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
import { throttle } from "lodash";
|
|
3
|
+
const THROTTLE_RESIZE_TIMEOUT = 200;
|
|
4
|
+
function useSizeContainer(containerElement) {
|
|
5
|
+
const [currentState, setCurrentState] = useState();
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (!containerElement) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const throttleResize = throttle(setCurrentState, THROTTLE_RESIZE_TIMEOUT, {
|
|
11
|
+
leading: false,
|
|
12
|
+
trailing: true
|
|
13
|
+
});
|
|
14
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
15
|
+
for (let entry of entries) {
|
|
16
|
+
throttleResize({
|
|
17
|
+
containerWidth: entry.contentRect.width,
|
|
18
|
+
containerHeight: entry.contentRect.height
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
if (containerElement) {
|
|
23
|
+
resizeObserver.observe(containerElement);
|
|
24
|
+
}
|
|
25
|
+
return () => {
|
|
26
|
+
if (containerElement) {
|
|
27
|
+
resizeObserver.unobserve(containerElement);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}, [containerElement]);
|
|
31
|
+
return currentState;
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
useSizeContainer as u
|
|
35
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ContainerSize } from '../../utils/types';
|
|
2
|
+
/**
|
|
3
|
+
* useSizeContainer: hook encargado de obtener el tamaño de un elemento contenedor
|
|
4
|
+
* TODO: Usar throttle para evitar llamadas innecesarias
|
|
5
|
+
* @param containerElement
|
|
6
|
+
* @returns un objeto con el ancho y alto del contenedor
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSizeContainer(containerElement?: HTMLElement | undefined): ContainerSize | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useState, useRef } from "react";
|
|
2
|
+
function useStateRef(initialValue) {
|
|
3
|
+
const [refState, setRefState] = useState(initialValue);
|
|
4
|
+
const nodeRef = useRef(null);
|
|
5
|
+
const ref = (node) => {
|
|
6
|
+
if (node && nodeRef.current !== node) {
|
|
7
|
+
nodeRef.current = node;
|
|
8
|
+
setRefState(node);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
return [refState, ref];
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
useStateRef as u
|
|
15
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "useStateRef" es un hook que permite tener una referencia a un elemento del DOM
|
|
3
|
+
* y al mismo tiempo tener un estado para ese elemento, lo que hace que se rerenderize
|
|
4
|
+
* donde se usa refState
|
|
5
|
+
* @param initialValue
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function useStateRef<T>(initialValue: T | null): [T | null, (node: T | null) => void];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { d as TabContext } from "../../components/mui_extended/Tab/index.9214d9cc.js";
|
|
3
3
|
const useTab = () => {
|
|
4
4
|
const context = useContext(TabContext);
|
|
5
5
|
if (context === null) {
|