@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,15 @@
|
|
|
1
|
+
import { WritableDraft } from 'immer/dist/internal';
|
|
2
|
+
import type { FeatureCollection, Feature, Geometry } from './components/Map/contexts/MapContext/types';
|
|
3
|
+
export declare function isGeometry(obj: any): obj is Geometry;
|
|
4
|
+
export declare function isFeature(obj: any): obj is Feature;
|
|
5
|
+
export declare function isFeatureCollection(obj: any): obj is FeatureCollection;
|
|
6
|
+
export declare function isFeatureCollectionDraft(obj: any): obj is WritableDraft<FeatureCollection>;
|
|
7
|
+
/**
|
|
8
|
+
* "bearingRawToCSS" convierte el rumbo del GPS a una rotación CSS, recibiendo el rumbo
|
|
9
|
+
* en RAW sin transofrmaciones por parte de minitracker.
|
|
10
|
+
* Importante: NO ES compatible con minitracker v1.0 el cual desplaza la medición 90 grados en complemento así: (450 - propiedadesEquipo->ultima_direccion) % 360
|
|
11
|
+
* @param gpsBearing
|
|
12
|
+
* @param offsetRotate (offset del icono como viene de la fuente con respecto al Norte (0 = grados) )
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function bearingRawToCSS(gpsBearing: number, offsetRotate: number): number;
|
|
@@ -2,9 +2,9 @@ import { m as modalUtilityClasses } from "./index.61389369.js";
|
|
|
2
2
|
import { useEnvironment } from "@m4l/core";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.
|
|
6
|
-
import { I as Icon } from "../Icon/index.
|
|
7
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
5
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.f8a3021b.js";
|
|
6
|
+
import { I as Icon } from "../Icon/index.ad330e78.js";
|
|
7
|
+
import { u as useModal } from "../../hooks/useModal/index.f73d7e42.js";
|
|
8
8
|
const Header = (props) => {
|
|
9
9
|
const {
|
|
10
10
|
title,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as Actions } from "../CommonActions/components/Actions/index.
|
|
1
|
+
import { A as Actions } from "../CommonActions/components/Actions/index.fa7ab18c.js";
|
|
2
2
|
import { Typography } from "@mui/material";
|
|
3
3
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
4
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
4
|
+
import { u as useModal } from "../../hooks/useModal/index.f73d7e42.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { I as Image } from "../Image/index.
|
|
6
|
+
import { I as Image } from "../Image/index.b799c514.js";
|
|
7
7
|
import { m as modalUtilityClasses } from "./index.61389369.js";
|
|
8
|
-
import { W as WindowBase } from "./WindowBase.
|
|
9
|
-
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.
|
|
10
|
-
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.
|
|
8
|
+
import { W as WindowBase } from "./WindowBase.fd86f575.js";
|
|
9
|
+
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.416cbf9b.js";
|
|
10
|
+
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.094290fd.js";
|
|
11
11
|
const dictionary = {
|
|
12
12
|
MESSAGE: "common_actions.confirm_quit_msg"
|
|
13
13
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { generateUtilityClasses, generateUtilityClass, styled, Accordion as Accordion$1, AccordionSummary, AccordionDetails } from "@mui/material";
|
|
2
|
-
import { I as IconButton } from "../IconButton/index.
|
|
2
|
+
import { I as IconButton } from "../IconButton/index.f8a3021b.js";
|
|
3
3
|
import { useEnvironment } from "@m4l/core";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
7
|
import { g as getNameDataTestId } from "../../../test/getNameDataTestId.14875ec7.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { I as Icon } from "../../Icon/index.
|
|
9
|
+
import { I as Icon } from "../../Icon/index.ad330e78.js";
|
|
10
10
|
import { T as Typography } from "../Typography/index.379dd374.js";
|
|
11
11
|
const componentName = "M4LAccordion";
|
|
12
12
|
generateUtilityClasses(componentName, [
|
|
@@ -5,7 +5,7 @@ import { unstable_composeClasses } from "@mui/base";
|
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { useMemo } from "react";
|
|
8
|
-
import { I as Image } from "../../Image/index.
|
|
8
|
+
import { I as Image } from "../../Image/index.b799c514.js";
|
|
9
9
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
10
10
|
import { LoadingButton as LoadingButton$1 } from "@mui/lab";
|
|
11
11
|
import { T as Typography } from "../Typography/index.379dd374.js";
|
|
@@ -5,7 +5,7 @@ import { unstable_composeClasses } from "@mui/base";
|
|
|
5
5
|
import { useModuleSkeleton } from "@m4l/core";
|
|
6
6
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { forwardRef } from "react";
|
|
8
|
-
import { F as FieldLabel } from "../FieldLabel/index.
|
|
8
|
+
import { F as FieldLabel } from "../FieldLabel/index.0412576c.js";
|
|
9
9
|
const COMPONENT_CLASS_NAME = "M4LCheckBox";
|
|
10
10
|
generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
11
11
|
"root",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo, useState } from "react";
|
|
2
2
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { Skeleton, styled, generateUtilityClasses, generateUtilityClass, Tooltip, IconButton as IconButton$1 } from "@mui/material";
|
|
4
|
-
import { I as Icon } from "../../Icon/index.
|
|
4
|
+
import { I as Icon } from "../../Icon/index.ad330e78.js";
|
|
5
5
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
7
|
import clsx from "clsx";
|
|
@@ -2,12 +2,12 @@ import React__default, { useState, useEffect, useMemo } from "react";
|
|
|
2
2
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { styled, IconButton, generateUtilityClasses, generateUtilityClass, useTheme, MenuItem } from "@mui/material";
|
|
4
4
|
import { P as Popover } from "../Popover/index.d85de73b.js";
|
|
5
|
-
import { I as Icon } from "../../Icon/index.
|
|
5
|
+
import { I as Icon } from "../../Icon/index.ad330e78.js";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
8
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
9
9
|
import { B as Badge } from "../Badge/index.09f5aee5.js";
|
|
10
|
-
import { I as IconButton$1 } from "../IconButton/index.
|
|
10
|
+
import { I as IconButton$1 } from "../IconButton/index.f8a3021b.js";
|
|
11
11
|
styled(IconButton)(() => ({}));
|
|
12
12
|
const LabelMemuItem = styled("div")(({
|
|
13
13
|
theme
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { styled, generateUtilityClasses, generateUtilityClass, useTheme, Select, InputBase, MenuItem } from "@mui/material";
|
|
3
3
|
import { unstable_composeClasses } from "@mui/base";
|
|
4
|
-
import { I as IconButton } from "../IconButton/index.
|
|
4
|
+
import { I as IconButton } from "../IconButton/index.f8a3021b.js";
|
|
5
5
|
import { useEnvironment } from "@m4l/core";
|
|
6
6
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
7
7
|
import { useResponsiveContainerStore } from "@m4l/graphics";
|
|
8
8
|
import { shallow } from "zustand/shallow";
|
|
9
9
|
import { T as Typography } from "../Typography/index.379dd374.js";
|
|
10
|
-
import { I as Icon } from "../../Icon/index.
|
|
10
|
+
import { I as Icon } from "../../Icon/index.ad330e78.js";
|
|
11
11
|
const PagerRoot = styled("div")(({ theme }) => ({
|
|
12
12
|
...theme.components?.M4LPager?.styleOverrides
|
|
13
13
|
}));
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ToggleButtonProps } from "./types";
|
|
2
|
+
export declare const ToggleButton: (props: ToggleButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
|
-
import { B as Button, b as buttonClasses } from "../Button/index.
|
|
3
|
-
import { w as withToggle } from "../../../hocs/withToggle/index.
|
|
2
|
+
import { B as Button, b as buttonClasses } from "../Button/index.c3084916.js";
|
|
3
|
+
import { w as withToggle } from "../../../hocs/withToggle/index.50aec5e4.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const ToggleAbleButton = ({
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
onToggle,
|
|
7
|
+
isToggled,
|
|
8
8
|
...props
|
|
9
9
|
}) => {
|
|
10
|
-
const onLocalClick = (e) => {
|
|
11
|
-
onClick(e, !isPressed);
|
|
12
|
-
};
|
|
13
10
|
return /* @__PURE__ */ jsx(Button, {
|
|
14
|
-
onClick:
|
|
11
|
+
onClick: onToggle,
|
|
15
12
|
...props,
|
|
16
|
-
className: clsx(
|
|
13
|
+
className: clsx(isToggled ? buttonClasses.togglePressed : buttonClasses.toggleNotPressed)
|
|
17
14
|
});
|
|
18
15
|
};
|
|
19
16
|
const ToggleButton = withToggle(ToggleAbleButton);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ToggleableProps } from '../../../hocs/withToggle/types';
|
|
2
2
|
import { ButtonProps } from '../Button';
|
|
3
|
-
export interface ToggleButtonProps extends Omit<ButtonProps, 'onClick'>,
|
|
3
|
+
export interface ToggleButtonProps extends Omit<ButtonProps, 'onClick'>, ToggleableProps {
|
|
4
4
|
}
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ToggleIconButtonProps } from "./types";
|
|
3
|
-
|
|
4
|
-
src: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Para no tener que poner src en ComponentWithToggleProps, dejando de ser generico
|
|
8
|
-
* se crea wrapper que recibe src a traves de ToggleIconButtonWrapperProps el cual extiende ComponentWithToggleProps
|
|
9
|
-
* por lo tanto es aceptado withToggle.
|
|
10
|
-
|
|
11
|
-
**/
|
|
12
|
-
export declare const ToggleIconButton: React.FC<ToggleIconButtonWrapperProps>;
|
|
13
|
-
export {};
|
|
2
|
+
export declare const ToggleIconButton: (props: ToggleIconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { I as IconButton, i as iconButtonClasses } from "../IconButton/index.f8a3021b.js";
|
|
3
|
+
import { w as withToggle } from "../../../hocs/withToggle/index.50aec5e4.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
const ToggleAbleIconButton = ({
|
|
6
|
+
onToggle,
|
|
7
|
+
isToggled,
|
|
8
|
+
...props
|
|
9
|
+
}) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
11
|
+
onClick: onToggle,
|
|
12
|
+
...props,
|
|
13
|
+
className: clsx(onToggle ? iconButtonClasses.togglePressed : iconButtonClasses.toggleNotPressed)
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
const ToggleIconButton = withToggle(ToggleAbleIconButton);
|
|
17
|
+
export {
|
|
18
|
+
ToggleIconButton as T
|
|
19
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToggleableProps } from "../../../hocs/withToggle/types";
|
|
2
2
|
import { IconButtonProps } from "../IconButton";
|
|
3
|
-
export interface ToggleIconButtonProps extends Omit<IconButtonProps, 'onClick'>,
|
|
4
|
-
src: string;
|
|
3
|
+
export interface ToggleIconButtonProps extends Omit<IconButtonProps, 'onClick'>, ToggleableProps {
|
|
5
4
|
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import React__default, { createContext, useRef, useEffect, useContext } from "react";
|
|
2
|
+
import { createStore, useStore } from "zustand";
|
|
3
|
+
import { shallow } from "zustand/shallow";
|
|
4
|
+
import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
5
|
+
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
6
|
+
import { devtools } from "zustand/middleware";
|
|
7
|
+
import { immer } from "zustand/middleware/immer";
|
|
8
|
+
import { p as popupsUtilityClasses } from "../PopupsViewer/index.1500ce72.js";
|
|
9
|
+
import { cloneDeep } from "lodash";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
const updateOwnerStateClasses = (state) => {
|
|
12
|
+
state.classes = popupsUtilityClasses(state.ownerState);
|
|
13
|
+
};
|
|
14
|
+
const createPopupsStore = (initProps) => {
|
|
15
|
+
const startProps = {
|
|
16
|
+
classes: popupsUtilityClasses(initProps.ownerState),
|
|
17
|
+
popupsIds: [],
|
|
18
|
+
hashPopups: {},
|
|
19
|
+
...initProps
|
|
20
|
+
};
|
|
21
|
+
return createStore(
|
|
22
|
+
devtools(
|
|
23
|
+
immer((set, get) => ({
|
|
24
|
+
...startProps,
|
|
25
|
+
popupsActions: {
|
|
26
|
+
init: (initialPopups) => {
|
|
27
|
+
set((state) => {
|
|
28
|
+
for (let index = 0; index < initialPopups.length; index++) {
|
|
29
|
+
state.hashPopups[initialPopups[index].popupId] = cloneDeep(
|
|
30
|
+
initialPopups[index]
|
|
31
|
+
);
|
|
32
|
+
state.popupsIds.push(initialPopups[index].popupId);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
setState: (status) => {
|
|
37
|
+
set((state) => {
|
|
38
|
+
state.ownerState.status = status;
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
addPopup: (popupProps, options) => {
|
|
42
|
+
if (get().hashPopups[popupProps.popupId]) {
|
|
43
|
+
throw new Error(`Poupup with id ${popupProps.popupId} already exists`);
|
|
44
|
+
}
|
|
45
|
+
if (options?.closeOthers) {
|
|
46
|
+
set((state) => {
|
|
47
|
+
state.popupsIds.forEach((popupId) => {
|
|
48
|
+
state.hashPopups[popupId].status = "closing";
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
set((state) => {
|
|
52
|
+
state.hashPopups[popupProps.popupId] = { ...popupProps, status: "init" };
|
|
53
|
+
state.popupsIds.push(popupProps.popupId);
|
|
54
|
+
});
|
|
55
|
+
} else {
|
|
56
|
+
set((state) => {
|
|
57
|
+
state.hashPopups[popupProps.popupId] = { ...popupProps, status: "init" };
|
|
58
|
+
state.popupsIds.push(popupProps.popupId);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
removePopup: (popupId) => {
|
|
63
|
+
if (!get().hashPopups[popupId]) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
set((state) => {
|
|
67
|
+
state.popupsIds.splice(state.popupsIds.indexOf(popupId), 1);
|
|
68
|
+
delete state.hashPopups[popupId];
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
closePopup: (popupId) => {
|
|
72
|
+
if (!get().hashPopups[popupId]) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
set((state) => {
|
|
76
|
+
state.hashPopups[popupId].status = "closing";
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
updatePopup: (popupId, popupProps) => {
|
|
80
|
+
if (!get().hashPopups[popupId]) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
set((state) => {
|
|
84
|
+
state.hashPopups[popupId] = { ...state.hashPopups[popupId], ...popupProps };
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
showPopup: (popupId) => {
|
|
88
|
+
if (!get().hashPopups[popupId]) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
set((state) => {
|
|
92
|
+
state.hashPopups[popupId].status = "init";
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
hidePopup: (popupId) => {
|
|
96
|
+
if (!get().hashPopups[popupId]) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
set((state) => {
|
|
100
|
+
state.hashPopups[popupId].status = "hidden";
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
setHandlerGetLabel: (newHandler) => {
|
|
104
|
+
set((state) => {
|
|
105
|
+
state.getLabel = newHandler;
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
setExternalState: (newExternalState) => {
|
|
109
|
+
set((state) => {
|
|
110
|
+
state.ownerState = { ...state.ownerState, ...newExternalState };
|
|
111
|
+
updateOwnerStateClasses(state);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
})),
|
|
116
|
+
{ name: `Popups store` }
|
|
117
|
+
)
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
const PopupsContext = createContext(null);
|
|
121
|
+
function PopupsProvider(props) {
|
|
122
|
+
const {
|
|
123
|
+
children,
|
|
124
|
+
initialPopups
|
|
125
|
+
} = props;
|
|
126
|
+
const {
|
|
127
|
+
getLabel
|
|
128
|
+
} = useModuleDictionary();
|
|
129
|
+
const isDesktop = useResponsiveDesktop();
|
|
130
|
+
const isSkeleton = useModuleSkeleton();
|
|
131
|
+
const isFirstRender = useFirstRender([getLabel]);
|
|
132
|
+
const popupsStoreRef = useRef();
|
|
133
|
+
if (!popupsStoreRef.current) {
|
|
134
|
+
popupsStoreRef.current = createPopupsStore({
|
|
135
|
+
getLabel,
|
|
136
|
+
ownerState: {
|
|
137
|
+
status: "init",
|
|
138
|
+
isMobile: !isDesktop,
|
|
139
|
+
isSkeleton
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
popupsStoreRef.current?.getState().popupsActions.init(initialPopups || []);
|
|
143
|
+
}
|
|
144
|
+
const {
|
|
145
|
+
setHandlerGetLabel,
|
|
146
|
+
setExternalState
|
|
147
|
+
} = useStore(popupsStoreRef.current, (state) => state.popupsActions, shallow);
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
if (!isFirstRender) {
|
|
150
|
+
setHandlerGetLabel(getLabel);
|
|
151
|
+
}
|
|
152
|
+
}, [getLabel]);
|
|
153
|
+
useEffect(() => {
|
|
154
|
+
if (isFirstRender) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
setExternalState({
|
|
158
|
+
isMobile: !isDesktop,
|
|
159
|
+
isSkeleton
|
|
160
|
+
});
|
|
161
|
+
}, [isDesktop, isSkeleton]);
|
|
162
|
+
return /* @__PURE__ */ jsx(PopupsContext.Provider, {
|
|
163
|
+
value: popupsStoreRef.current,
|
|
164
|
+
children: /* @__PURE__ */ jsx(React__default.Fragment, {
|
|
165
|
+
children
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function usePopupsStore(selector, equalityFn) {
|
|
170
|
+
const context = useContext(PopupsContext);
|
|
171
|
+
if (!context)
|
|
172
|
+
throw new Error("usePopupsStore context must be use inside PopupsContext");
|
|
173
|
+
return useStore(context, selector, equalityFn);
|
|
174
|
+
}
|
|
175
|
+
export {
|
|
176
|
+
PopupsProvider as P,
|
|
177
|
+
PopupsContext as a,
|
|
178
|
+
usePopupsStore as u
|
|
179
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { TransitionGroup, CSSTransition } from "react-transition-group";
|
|
2
|
+
import { shallow } from "zustand/shallow";
|
|
3
|
+
import { useState, useRef } from "react";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { useEnvironment } from "@m4l/core";
|
|
6
|
+
import { u as usePopupsStore } from "../PopupsProvider/index.d7409f48.js";
|
|
7
|
+
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
8
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
9
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
10
|
+
import { d as draggableWindowClasses, D as DragResizeWindow } from "../../DragResizeWindow/index.13ef022e.js";
|
|
11
|
+
import { I as Icon } from "../../Icon/index.ad330e78.js";
|
|
12
|
+
import { I as IconButton } from "../../mui_extended/IconButton/index.f8a3021b.js";
|
|
13
|
+
import { u as useSizeContainer } from "../../../hooks/useSizeContainer/index.62b4e0c4.js";
|
|
14
|
+
import { styled } from "@mui/material/styles";
|
|
15
|
+
const COMPONENT_CLASS_NAME = "M4LPopupsViewer";
|
|
16
|
+
const MAP_ZINDEX_OVER_MAP = 1100;
|
|
17
|
+
const popupsClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
18
|
+
"containerRoot",
|
|
19
|
+
"popupRoot",
|
|
20
|
+
"popupHeaderContainer",
|
|
21
|
+
"popupHeaderTitle",
|
|
22
|
+
"popupHeaderSubTitle",
|
|
23
|
+
"popupContent",
|
|
24
|
+
"popupHidden",
|
|
25
|
+
"popupWithSubTitle"
|
|
26
|
+
]);
|
|
27
|
+
function getPopupsUtilityClass(slot) {
|
|
28
|
+
return generateUtilityClass(COMPONENT_CLASS_NAME, slot);
|
|
29
|
+
}
|
|
30
|
+
const popupsUtilityClasses = (_ownerState) => {
|
|
31
|
+
const slots = {
|
|
32
|
+
containerRoot: ["containerRoot"],
|
|
33
|
+
popupsContainer: ["popupsContainer"],
|
|
34
|
+
popupRoot: ["popupRoot"],
|
|
35
|
+
popupHeaderContainer: ["popupHeaderContainer"],
|
|
36
|
+
popupHeaderTitle: ["popupHeaderTitle"],
|
|
37
|
+
popupHeaderSubTitle: ["popupHeaderSubTitle"],
|
|
38
|
+
popupContent: ["popupContent"],
|
|
39
|
+
popupHidden: ["popupHidden"],
|
|
40
|
+
popupWithSubTitle: ["popupWithSubTitle"]
|
|
41
|
+
};
|
|
42
|
+
const composedClasses = unstable_composeClasses(slots, getPopupsUtilityClass, {});
|
|
43
|
+
return {
|
|
44
|
+
...composedClasses
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
const POPUPS_ICONS = {
|
|
48
|
+
CLOSE: "close.svg"
|
|
49
|
+
};
|
|
50
|
+
const Header = (props) => {
|
|
51
|
+
const {
|
|
52
|
+
popupId
|
|
53
|
+
} = props;
|
|
54
|
+
const {
|
|
55
|
+
host_static_assets,
|
|
56
|
+
environment_assets
|
|
57
|
+
} = useEnvironment();
|
|
58
|
+
const popup = usePopupsStore((state) => state.hashPopups[popupId], shallow);
|
|
59
|
+
usePopupsStore((state) => state.popupsActions, shallow);
|
|
60
|
+
const {
|
|
61
|
+
iconUrl
|
|
62
|
+
} = popup || {};
|
|
63
|
+
const [inProp, setInProp] = useState(false);
|
|
64
|
+
const onClose = () => {
|
|
65
|
+
setInProp((l) => !l);
|
|
66
|
+
};
|
|
67
|
+
console.log("Render", inProp);
|
|
68
|
+
if (!popup) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
72
|
+
className: clsx(popupsClasses.popupHeaderContainer, draggableWindowClasses.draggableHandle),
|
|
73
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
74
|
+
src: iconUrl,
|
|
75
|
+
size: "small"
|
|
76
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
77
|
+
className: clsx(popupsClasses.popupHeaderTitle, popup.subTitle ? popupsClasses.popupWithSubTitle : null),
|
|
78
|
+
children: popup.title
|
|
79
|
+
}), popup.subTitle && /* @__PURE__ */ jsx("span", {
|
|
80
|
+
className: popupsClasses.popupHeaderSubTitle,
|
|
81
|
+
children: popup.subTitle
|
|
82
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
83
|
+
className: draggableWindowClasses.draggableCancel,
|
|
84
|
+
onClick: onClose,
|
|
85
|
+
"aria-label": "click",
|
|
86
|
+
src: `${host_static_assets}/${environment_assets}/frontend/commons/assets/icons/${POPUPS_ICONS.CLOSE}`
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
const Popup = (props) => {
|
|
91
|
+
const {
|
|
92
|
+
popupId,
|
|
93
|
+
containerElement,
|
|
94
|
+
containerSize
|
|
95
|
+
} = props;
|
|
96
|
+
const popup = usePopupsStore((state) => state.hashPopups[popupId], shallow);
|
|
97
|
+
const {
|
|
98
|
+
draggable = true,
|
|
99
|
+
resizable = true,
|
|
100
|
+
defaultPosition,
|
|
101
|
+
bounds,
|
|
102
|
+
...others
|
|
103
|
+
} = popup || {};
|
|
104
|
+
const nodeRef = useRef(null);
|
|
105
|
+
if (!popup) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
return /* @__PURE__ */ jsxs(DragResizeWindow, {
|
|
109
|
+
ref: nodeRef,
|
|
110
|
+
className: clsx(popupsClasses.popupRoot, popup.status === "hidden" && popupsClasses.popupHidden),
|
|
111
|
+
onMouseDown: popup?.onMouseDown,
|
|
112
|
+
containerElement,
|
|
113
|
+
containerSize,
|
|
114
|
+
bounds,
|
|
115
|
+
draggable,
|
|
116
|
+
resizeable: resizable,
|
|
117
|
+
defaultPosition,
|
|
118
|
+
...others,
|
|
119
|
+
children: [/* @__PURE__ */ jsx(Header, {
|
|
120
|
+
popupId: popup.popupId
|
|
121
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
122
|
+
className: popupsClasses.popupContent,
|
|
123
|
+
children: popup.functionComponent && popup.functionComponent({
|
|
124
|
+
...popup.componentProps
|
|
125
|
+
})
|
|
126
|
+
})]
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
const PopupsViewerRoot = styled("div")`
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
${(props) => props.theme.components?.M4LPopupsViewer?.styleOverrides}
|
|
133
|
+
|
|
134
|
+
`;
|
|
135
|
+
const PopupsViewer = (props) => {
|
|
136
|
+
const {
|
|
137
|
+
containerElement
|
|
138
|
+
} = props;
|
|
139
|
+
const popupsIds = usePopupsStore((state) => state.popupsIds.filter((pId) => state.hashPopups[pId].status !== "closing"), shallow);
|
|
140
|
+
const {
|
|
141
|
+
removePopup
|
|
142
|
+
} = usePopupsStore((state) => state.popupsActions, shallow);
|
|
143
|
+
const containerSize = useSizeContainer(containerElement);
|
|
144
|
+
if (!containerElement) {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
return /* @__PURE__ */ jsx(PopupsViewerRoot, {
|
|
148
|
+
className: popupsClasses.containerRoot,
|
|
149
|
+
children: /* @__PURE__ */ jsx(TransitionGroup, {
|
|
150
|
+
children: popupsIds.map((id) => {
|
|
151
|
+
return /* @__PURE__ */ jsx(
|
|
152
|
+
CSSTransition,
|
|
153
|
+
{
|
|
154
|
+
in: true,
|
|
155
|
+
timeout: {
|
|
156
|
+
appear: 500,
|
|
157
|
+
enter: 300,
|
|
158
|
+
exit: 1300
|
|
159
|
+
},
|
|
160
|
+
unmountOnExit: true,
|
|
161
|
+
onEnter: () => console.log("onEnter"),
|
|
162
|
+
onExit: () => {
|
|
163
|
+
console.log("onExit");
|
|
164
|
+
},
|
|
165
|
+
onExited: () => {
|
|
166
|
+
console.log("onExited");
|
|
167
|
+
removePopup(id);
|
|
168
|
+
},
|
|
169
|
+
classNames: "popup-fade",
|
|
170
|
+
children: /* @__PURE__ */ jsx(Popup, {
|
|
171
|
+
popupId: id,
|
|
172
|
+
containerElement,
|
|
173
|
+
containerSize
|
|
174
|
+
}, id)
|
|
175
|
+
},
|
|
176
|
+
id
|
|
177
|
+
);
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
export {
|
|
183
|
+
MAP_ZINDEX_OVER_MAP as M,
|
|
184
|
+
PopupsViewer as P,
|
|
185
|
+
popupsUtilityClasses as p
|
|
186
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PopupsProviderProps } from './types';
|
|
3
|
+
declare const PopupsContext: React.Context<(Omit<Omit<import("zustand").StoreApi<import("./types").PopupsStateWithActions>, "setState"> & {
|
|
4
|
+
setState<A extends string | {
|
|
5
|
+
type: unknown;
|
|
6
|
+
}>(partial: import("./types").PopupsStateWithActions | Partial<import("./types").PopupsStateWithActions> | ((state: import("./types").PopupsStateWithActions) => import("./types").PopupsStateWithActions | Partial<import("./types").PopupsStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
7
|
+
}, "setState"> & {
|
|
8
|
+
setState(nextStateOrUpdater: import("./types").PopupsStateWithActions | Partial<import("./types").PopupsStateWithActions> | ((state: import("immer/dist/internal").WritableDraft<import("./types").PopupsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
9
|
+
type: unknown;
|
|
10
|
+
} | undefined): void;
|
|
11
|
+
}) | null>;
|
|
12
|
+
/**
|
|
13
|
+
* @description Provedor del contexto de los popups.
|
|
14
|
+
* Expone el store (PopupsStore) encargado de gestionar la creación, modificación y borrado de capas.
|
|
15
|
+
* @param props
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
declare function PopupsProvider(props: PopupsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { PopupsProvider, PopupsContext };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WritableDraft } from 'immer/dist/internal';
|
|
2
|
+
import type { PopupsStateWithActions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @description Actualiza la clases basado en owner state
|
|
5
|
+
* @param state immer State
|
|
6
|
+
*/
|
|
7
|
+
export declare const updateOwnerStateClasses: (state: WritableDraft<PopupsStateWithActions>) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PopupsProvider, PopupsContext } from './PopupsContext';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PopupsStateWithActions, InitialPopupsStoreProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @description Crea el Store, por defecto inicia en estado 'init'
|
|
4
|
+
* @param initProps propiedades iniciales del store
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare const createPopupsStore: (initProps: InitialPopupsStoreProps) => Omit<Omit<import("zustand").StoreApi<PopupsStateWithActions>, "setState"> & {
|
|
8
|
+
setState<A extends string | {
|
|
9
|
+
type: unknown;
|
|
10
|
+
}>(partial: PopupsStateWithActions | Partial<PopupsStateWithActions> | ((state: PopupsStateWithActions) => PopupsStateWithActions | Partial<PopupsStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
11
|
+
}, "setState"> & {
|
|
12
|
+
setState(nextStateOrUpdater: PopupsStateWithActions | Partial<PopupsStateWithActions> | ((state: import("immer/dist/internal").WritableDraft<PopupsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
13
|
+
type: unknown;
|
|
14
|
+
} | undefined): void;
|
|
15
|
+
};
|
|
16
|
+
export declare type PopupsStore = ReturnType<typeof createPopupsStore>;
|