@m4l/components 0.2.35 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/export.d.ts +274 -441
- package/@types/types.d.ts +25 -0
- package/components/AccountPopover/classes/types.d.ts +1 -1
- package/components/AccountPopover/index.efc74d5c.js +330 -0
- package/components/AccountPopover/style.d.ts +2 -0
- package/components/AccountPopover/subcomponents/MyAvatar/types.d.ts +6 -6
- package/components/AccountPopover/subcomponents/PopOver/types.d.ts +8 -8
- package/components/AccountPopover/types.d.ts +3 -3
- package/components/AppBar/classes/types.d.ts +1 -1
- package/components/AppBar/index.fc126a22.js +94 -0
- package/components/AppBar/styles.d.ts +2 -0
- package/components/AppBar/tests/utils.d.ts +1 -1
- package/components/AppBar/types.d.ts +9 -9
- package/components/CommonActions/classes/types.d.ts +1 -1
- package/components/CommonActions/components/Actions/index.d.ts +2 -1
- package/components/CommonActions/components/Actions/styles.d.ts +2 -0
- package/components/CommonActions/components/Actions/types.d.ts +2 -2
- package/components/CommonActions/tests/utils.d.ts +1 -1
- package/components/DataGrid/assets/icons/datagrid.svg +4 -4
- package/components/DataGrid/classes/types.d.ts +1 -1
- package/components/DataGrid/styles.d.ts +2 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +8 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +2 -0
- package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +6 -0
- package/components/DragResizeWindow/DragResizeWindow.d.ts +3 -3
- package/components/DragResizeWindow/classes/types.d.ts +1 -1
- package/components/DragResizeWindow/index.46b380e1.js +477 -0
- package/components/DragResizeWindow/styled.d.ts +2 -0
- package/components/DragResizeWindow/types.d.ts +4 -5
- package/components/DragResizeWindow/utils.d.ts +1 -1
- package/components/DynamicFilter/DynamicFilter.d.ts +1 -7
- package/components/DynamicFilter/constants.d.ts +3 -11
- package/components/DynamicFilter/dictionary.d.ts +1 -2
- package/components/DynamicFilter/dynamicFilterSlots.d.ts +87 -0
- package/components/DynamicFilter/helpers/formatToInitialFilters.d.ts +7 -0
- package/components/DynamicFilter/helpers/formatToRowFilter.d.ts +7 -0
- package/components/DynamicFilter/helpers/getPurgedInitialFiltersApplied.d.ts +11 -0
- package/components/DynamicFilter/index.d.ts +1 -2
- package/components/DynamicFilter/index.d9168c12.js +2012 -0
- package/components/DynamicFilter/store/DynamicFilterContext.d.ts +16 -0
- package/components/DynamicFilter/{contexts/DynamicFilterContext/store.d.ts → store/DynamicFilterStore.d.ts} +28 -60
- package/components/DynamicFilter/store/useDynamicFilterStore.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.d.ts +3 -0
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/index.d.ts +1 -0
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip.d.ts +10 -0
- package/components/DynamicFilter/subcomponents/AppliedFilters/AppliedFilters.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/AppliedFilters/index.d.ts +1 -0
- package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.d.ts +5 -0
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/index.d.ts +1 -0
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/useDynamicFilterBase.d.ts +4 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/helpers.d.ts +14 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.d.ts +1 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/DataTypeComponent.d.ts +7 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.d.ts +14 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/FieldTypeInterface.d.ts +21 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers.d.ts +14 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.d.ts +21 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/helpers.d.ts +14 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/fieldFactory.d.ts +7 -0
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActionsSkeleton.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/FilterActions/index.d.ts +1 -0
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +18 -0
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilterSkeleton.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/InputFilter/index.d.ts +1 -7
- package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.d.ts +40 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/index.d.ts +1 -14
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +24 -0
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.d.ts +7 -0
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/index.d.ts +1 -11
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/usePopoverMenuFields.d.ts +9 -0
- package/components/DynamicFilter/types.d.ts +101 -30
- package/components/FieldLabel/classes/types.d.ts +1 -1
- package/components/FieldLabel/index.f9cdcc27.js +54 -0
- package/components/FieldLabel/styles.d.ts +2 -0
- package/components/GridLayout/{index.65470f01.js → index.bb3b7769.js} +526 -501
- package/components/GridLayout/styles.d.ts +2 -0
- package/components/GridLayout/subcomponents/Griditem/index.bb23f651.js +398 -0
- package/components/GridLayout/subcomponents/Responsive/{index.5b3e0521.js → index.b8a2a121.js} +51 -31
- package/components/GridLayout/subcomponents/SizeProvider/index.094bc6b5.js +65 -0
- package/components/HamburgerMenu/index.5997af31.js +82 -0
- package/components/HelperText/{index.7d2afdb3.js → index.be949cdf.js} +14 -22
- package/components/HelperText/styles.d.ts +2 -0
- package/components/Icon/index.d5fed418.js +420 -0
- package/components/Icon/styles.d.ts +4 -0
- package/components/Image/index.36a3d440.js +459 -0
- package/components/Image/styles.d.ts +2 -0
- package/components/Image/tests/utils.d.ts +1 -1
- package/components/Image/utils/getRatioValues.d.ts +1 -1
- package/components/LanguagePopover/index.e6fa2336.js +184 -0
- package/components/LanguagePopover/styles.d.ts +6 -0
- package/components/LanguagePopover/tests/utils.d.ts +1 -1
- package/components/LinearProgressIndeterminate/classes/types.d.ts +1 -1
- package/components/LinearProgressIndeterminate/index.de9d447c.js +53 -0
- package/components/LinearProgressIndeterminate/styles.d.ts +2 -0
- package/components/Loadable/{index.e994fc3e.js → index.e83cdb4e.js} +3 -8
- package/components/LoadingError/classes/types.d.ts +1 -1
- package/components/LoadingError/{index.ee29dd48.js → index.9f00c83c.js} +34 -55
- package/components/LoadingError/styles.d.ts +2 -0
- package/components/LoadingError/types.d.ts +1 -1
- package/components/MFLoader/classes/types.d.ts +1 -1
- package/components/MFLoader/{index.3a37407c.js → index.402c1acc.js} +55 -75
- package/components/MFLoader/styles.d.ts +2 -0
- package/components/MFLoader/types.d.ts +4 -4
- package/components/ModalDialog/index.ea9189c3.js +68 -0
- package/components/NavLink/index.4e548cee.js +55 -0
- package/components/NavLink/styles.d.ts +2 -0
- package/components/NavLink/tests/utils.d.ts +1 -1
- package/components/NavLink/types.d.ts +2 -2
- package/components/NoItemSelected/classes/types.d.ts +1 -1
- package/components/NoItemSelected/{index.3a479c64.js → index.418c8316.js} +22 -57
- package/components/NoItemSelected/styles.d.ts +5 -0
- package/components/ObjectLogs/index.bfa7dad3.js +236 -0
- package/components/ObjectLogs/styles.d.ts +4 -0
- package/components/PDFViewer/classes/types.d.ts +1 -1
- package/components/PDFViewer/{index.88c6ff6a.js → index.bb2eca5a.js} +8 -19
- package/components/PDFViewer/styles.d.ts +2 -0
- package/components/Page/index.fdf04592.js +364 -0
- package/components/PaperForm/classes/types.d.ts +1 -1
- package/components/PaperForm/index.8121e3da.js +96 -0
- package/components/PaperForm/styles.d.ts +7 -0
- package/components/PaperForm/types.d.ts +1 -2
- package/components/Period/classes/types.d.ts +1 -1
- package/components/Period/index.5233694b.js +424 -0
- package/components/Period/styles.d.ts +7 -0
- package/components/PrintingSystem/classes/types.d.ts +1 -1
- package/components/PrintingSystem/{index.27f1f209.js → index.fb176a93.js} +46 -58
- package/components/PrintingSystem/styles.d.ts +2 -0
- package/components/PrintingSystem/subcomponents/BodyNode/index.c1d61038.js +49 -0
- package/components/PrintingSystem/subcomponents/BodyNode/types.d.ts +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.990e164c.js → index.18bd9bad.js} +28 -32
- package/components/PrintingSystem/subcomponents/ChartNode/types.d.ts +1 -2
- package/components/PrintingSystem/subcomponents/DividerNode/index.67d9f1b4.js +20 -0
- package/components/PrintingSystem/subcomponents/DividerNode/types.d.ts +2 -3
- package/components/PrintingSystem/subcomponents/FooterNode/index.eaee152a.js +49 -0
- package/components/PrintingSystem/subcomponents/FooterNode/types.d.ts +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/index.f5f63a2a.js +70 -0
- package/components/PrintingSystem/subcomponents/GridNode/types.d.ts +2 -2
- package/components/PrintingSystem/subcomponents/HeaderNode/index.7de4e411.js +49 -0
- package/components/PrintingSystem/subcomponents/HeaderNode/types.d.ts +1 -1
- package/components/PrintingSystem/subcomponents/ImageNode/types.d.ts +2 -3
- package/components/PrintingSystem/subcomponents/Pager/types.d.ts +2 -2
- package/components/PrintingSystem/subcomponents/PaperNode/index.f9ccf22b.js +30 -0
- package/components/PrintingSystem/subcomponents/PaperNode/types.d.ts +2 -2
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index.f2f2e903.js +47 -0
- package/components/PrintingSystem/subcomponents/PropertyValueNode/types.d.ts +2 -2
- package/components/PrintingSystem/subcomponents/QRImageNode/types.d.ts +2 -3
- package/components/PrintingSystem/subcomponents/SectionNode/index.540a4b19.js +49 -0
- package/components/PrintingSystem/subcomponents/SectionNode/types.d.ts +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/index.41e7fcb0.js +24 -0
- package/components/PrintingSystem/subcomponents/TextBoxNode/types.d.ts +2 -3
- package/components/PrintingSystem/utils/FactoryRender/types.d.ts +1 -1
- package/components/PrintingSystem/utils/PageRender/types.d.ts +1 -1
- package/components/PropertyValue/classes/types.d.ts +1 -1
- package/components/PropertyValue/index.9572c347.js +261 -0
- package/components/PropertyValue/styles.d.ts +2 -0
- package/components/Resizeable/{index.cb5aad75.js → index.1f0c1359.js} +21 -28
- package/components/ResizeableWindow/styles.d.ts +5 -0
- package/components/ScrollBar/classes/types.d.ts +1 -1
- package/components/ScrollBar/{index.7dfc2f29.js → index.adf0eade.js} +32 -54
- package/components/ScrollBar/styles.d.ts +9 -0
- package/components/SideBar/classes/index.d.ts +1 -1
- package/components/SideBar/context/sideBarContext/index.d.ts +4 -4
- package/components/SideBar/index.629ba840.js +849 -0
- package/components/SideBar/styles.d.ts +20 -0
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/styles.d.ts +3 -0
- package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +4 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/styles.d.ts +9 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +2 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +6 -0
- package/components/SideBar/subcomponents/ContentMobile/styles.d.ts +3 -0
- package/components/SideBar/subcomponents/ContentMobile/subcomponents/types.d.ts +4 -4
- package/components/SideBar/tests/constants.d.ts +1 -1
- package/components/SideBar/tests/utils.d.ts +1 -1
- package/components/SideBar/types.d.ts +2 -2
- package/components/SplitLayout/SplitLayout.d.ts +1 -1
- package/components/SplitLayout/classes/types.d.ts +1 -1
- package/components/SplitLayout/{index.7302ceb3.js → index.74091a81.js} +41 -32
- package/components/SplitLayout/styles.d.ts +4 -0
- package/components/SplitLayout/tests/utils.d.ts +1 -1
- package/components/ToastContainer/ToastContainer.d.ts +1 -1
- package/components/ToastContainer/classes/types.d.ts +1 -1
- package/components/ToastContainer/{index.4d44ce53.js → index.f9b507b9.js} +15 -31
- package/components/ToastContainer/styles.d.ts +2 -0
- package/components/ToastContainer/subcomponents/ToastMessage/index.d.ts +1 -1
- package/components/ToastContainer/subcomponents/ToastMessage/types.d.ts +1 -1
- package/components/ToastContainer/types.d.ts +1 -1
- package/components/WrapperComponent/index.57964195.js +14 -0
- package/components/animate/AnimatedScroll/styles.d.ts +6 -0
- package/components/animate/AnimatedScroll/types.d.ts +3 -3
- package/components/animate/LoadingScreen/{index.1d0c4307.js → index.779690a7.js} +26 -42
- package/components/animate/LoadingScreen/styles.d.ts +7 -0
- package/components/animate/MotionContainer/index.3032bd8f.js +34 -0
- package/components/animate/MotionContainer/index.d.ts +9 -9
- package/components/animate/MotionLazyContainer/index.d.ts +2 -2
- package/components/animate/MotionLazyContainer/{index.572dd012.js → index.d2902a6c.js} +3 -9
- package/components/animate/PropagateLoader/index.a9da8d00.js +23 -0
- package/components/animate/PropagateLoader/syles.d.ts +2 -0
- package/components/animate/{index.5d4575bc.js → index.b8497385.js} +38 -58
- package/components/areas/components/AreasAdmin/styles.d.ts +5 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +4 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/types.d.ts +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/styles.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/styles.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/styles.d.ts +3 -0
- package/components/areas/constants.5387d83e.js +412 -0
- package/components/areas/contexts/AreasContext/{index.c5a3b322.js → index.bb316000.js} +32 -78
- package/components/areas/contexts/DynamicMFParmsContext/{index.1607c78e.js → index.37d1d444.js} +5 -11
- package/components/areas/contexts/DynamicMFParmsContext/types.d.ts +2 -2
- package/components/areas/contexts/WindowToolsMFContext/{index.8f3e2a04.js → index.69d95c15.js} +5 -13
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +29 -29
- package/components/areas/dictionary.7e74022a.js +286 -0
- package/components/areas/hooks/useAreas/{index.caa92660.js → index.e24bd74d.js} +1 -1
- package/components/areas/hooks/useDynamicMFParameters/{index.e52c5392.js → index.03ce6078.js} +2 -4
- package/components/areas/hooks/useWindowToolsMF/{index.b7afaf88.js → index.09801b66.js} +1 -1
- package/components/areas/icons.504ec098.js +83 -0
- package/components/areas/types.d.ts +17 -17
- package/components/commercial/AppBarCommercial/classes/types.d.ts +1 -1
- package/components/commercial/AppBarCommercial/styles.d.ts +2 -0
- package/components/commercial/AppBarCommercial/types.d.ts +1 -1
- package/components/commercial/HamburgerMenu/classes/type.d.ts +1 -1
- package/components/commercial/HamburgerMenu/styles.d.ts +13 -0
- package/components/commercial/HamburgerMenu/test/utils.d.ts +1 -1
- package/components/commercial/HamburgerMenu/types.d.ts +1 -1
- package/components/commercial/SectionCommercial/classes/types.d.ts +1 -1
- package/components/commercial/SectionCommercial/styles.d.ts +6 -0
- package/components/commercial/SectionCommercial/types.d.ts +3 -4
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.d.ts +1 -1
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/styles.d.ts +2 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/types.d.ts +1 -1
- package/components/commercial/TopBar/context/index.d.ts +1 -1
- package/components/commercial/TopBar/context/type.d.ts +2 -2
- package/components/commercial/TopBar/style.d.ts +2 -0
- package/components/commercial/TopBar/type.d.ts +2 -2
- package/components/commercial/TopBar/utils/isActive/index.d.ts +1 -1
- package/components/formatters/FormatterRoot/styles.d.ts +2 -0
- package/components/formatters/FormatterRoot/types.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/styles.d.ts +2 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +2 -0
- package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +5 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/utils.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/styles.d.ts +7 -0
- package/components/hook-form/RHFCheckbox/test/utils.d.ts +1 -1
- package/components/hook-form/RHFColorPicker/classes/types.d.ts +1 -1
- package/components/hook-form/RHFColorPicker/styles.d.ts +2 -0
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/types.d.ts +2 -3
- package/components/hook-form/RHFColorPicker/types.d.ts +7 -7
- package/components/hook-form/RHFDateTime/classes/types.d.ts +1 -1
- package/components/hook-form/RHFDateTime/styles.d.ts +2 -0
- package/components/hook-form/RHFDateTime/types.d.ts +1 -1
- package/components/hook-form/RHFPeriod/classes/types.d.ts +1 -1
- package/components/hook-form/RHFPeriod/styles.d.ts +2 -0
- package/components/hook-form/RHFRadioGroup/types.d.ts +1 -1
- package/components/hook-form/RHFTextField/styles.d.ts +3 -0
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +3 -0
- package/components/hook-form/RHFTextField/tests/utils.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/styles.d.ts +2 -0
- package/components/hook-form/RHFTextFieldPassword/tests/utils.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/types.d.ts +1 -2
- package/components/hook-form/RHFUpload/RHFUploadImage/classes/types.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +2 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +2 -0
- package/components/maps/components/GpsTools/constants.d.ts +1 -1
- package/components/maps/components/GpsTools/contexts/GpsToolsContext/types.d.ts +3 -3
- package/components/maps/components/GpsTools/{index.d93188ad.js → index.75880ce0.js} +740 -881
- package/components/maps/components/GpsTools/styles.d.ts +2 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles.d.ts +1 -0
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/types.d.ts +2 -2
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/types.d.ts +1 -1
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/types.d.ts +2 -2
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.d.ts +1 -1
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.d.ts +6 -0
- package/components/maps/components/GpsTools/types.d.ts +1 -1
- package/components/maps/components/Map/contexts/MapContext/helper.d.ts +1 -1
- package/components/maps/components/Map/contexts/MapContext/index.d.ts +1 -1
- package/components/maps/components/Map/contexts/MapContext/types.d.ts +6 -6
- package/components/maps/components/Map/external/googleMutant/index.d.ts +94 -94
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/index.d.ts +1 -1
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/FeatureDivIconLabel/types.d.ts +1 -1
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/MarkerIconLabel/types.d.ts +2 -2
- package/components/maps/components/Map/featureRenders/MarkerFeatureRender/index.d.ts +1 -1
- package/components/maps/components/Map/hooks/useAutoFocus/types.d.ts +2 -2
- package/components/maps/components/Map/index.d.ts +1 -1
- package/components/maps/components/Map/styled.d.ts +2 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/types.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/types.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/types.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/types.d.ts +2 -2
- package/components/maps/components/Map/types.d.ts +2 -2
- package/components/maps/{components/Map/index.accb1f77.js → index.8ec46ce4.js} +726 -940
- package/components/maps/index.d.ts +2 -2
- package/components/maps/leaflet-geoman.d.ts +1476 -1633
- package/components/modal/WindowBase.a3ac7adc.js +43 -0
- package/components/modal/WindowConfirm/types.d.ts +4 -4
- package/components/modal/WindowConfirm.e35da619.js +62 -0
- package/components/modal/classes/types.d.ts +1 -1
- package/components/modal/{index.61389369.js → index.a0e30c8b.js} +8 -6
- package/components/mui_extended/Accordion/classes/types.d.ts +1 -1
- package/components/mui_extended/Accordion/styles.d.ts +4 -0
- package/components/mui_extended/Avatar/classes/types.d.ts +1 -1
- package/components/mui_extended/Avatar/styles.d.ts +2 -0
- package/components/mui_extended/Avatar/tests/utils.d.ts +1 -1
- package/components/mui_extended/Badge/Badge.d.ts +1 -1
- package/components/mui_extended/Badge/classes/types.d.ts +1 -1
- package/components/mui_extended/Badge/styles.d.ts +2 -0
- package/components/mui_extended/Badge/types.d.ts +1 -1
- package/components/mui_extended/Button/classes/types.d.ts +2 -2
- package/components/mui_extended/Button/styles.d.ts +5 -0
- package/components/mui_extended/CheckBox/classes/types.d.ts +1 -1
- package/components/mui_extended/CheckBox/styles.d.ts +2 -0
- package/components/mui_extended/CheckBox/subcomponents/Skeleton/types.d.ts +1 -1
- package/components/mui_extended/CheckBox/types.d.ts +2 -2
- package/components/mui_extended/IconButton/styles.d.ts +2 -0
- package/components/mui_extended/ImageButton/styles.d.ts +2 -0
- package/components/mui_extended/ImageButton/tests/utils.d.ts +1 -1
- package/components/mui_extended/LoadingButton/styles.d.ts +2 -0
- package/components/mui_extended/LoadingButton/tests/utils.d.ts +1 -1
- package/components/mui_extended/MenuActions/classes/types.d.ts +1 -1
- package/components/mui_extended/MenuActions/styles.d.ts +5 -0
- package/components/mui_extended/Pager/classes/types.d.ts +1 -1
- package/components/mui_extended/Pager/styles.d.ts +2 -0
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/types.d.ts +2 -2
- package/components/mui_extended/Pager/subcomponents/PagerActions/types.d.ts +1 -1
- package/components/mui_extended/Popover/styles.d.ts +1 -0
- package/components/mui_extended/Popover/subcomponts/ArrowIcon/index.d.ts +3 -0
- package/components/mui_extended/Stack/Stack.d.ts +1 -1
- package/components/mui_extended/Stack/classes/types.d.ts +1 -1
- package/components/mui_extended/Stack/styles.d.ts +4 -0
- package/components/mui_extended/Stack/types.d.ts +1 -1
- package/components/mui_extended/Tab/classes/types.d.ts +1 -1
- package/components/mui_extended/Tab/styles.d.ts +3 -0
- package/components/mui_extended/TabContent/TabContent.d.ts +1 -1
- package/components/mui_extended/TabContent/classes/types.d.ts +1 -1
- package/components/mui_extended/TabContent/styles.d.ts +2 -0
- package/components/mui_extended/TabContent/types.d.ts +1 -1
- package/components/mui_extended/Tabs/classes/types.d.ts +1 -1
- package/components/mui_extended/Tabs/styles.d.ts +4 -0
- package/components/mui_extended/ToggleButton/ToggleButton.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/ToggleIconButton.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/types.d.ts +2 -2
- package/components/mui_extended/Tooltip/classes/types.d.ts +1 -1
- package/components/mui_extended/Tooltip/types.d.ts +3 -3
- package/components/mui_extended/Typography/styles.d.ts +2 -0
- package/components/mui_extended/Typography/tests/utils.d.ts +1 -1
- package/components/popups/PopupsProvider/{index.d7409f48.js → index.18669fb4.js} +12 -26
- package/components/popups/PopupsViewer/index.ba354267.js +166 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +4 -4
- package/components/popups/components/PopupsViewer/classes/types.d.ts +1 -1
- package/components/popups/components/PopupsViewer/styled.d.ts +2 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +1 -1
- package/contexts/ModalContext/{index.2368bb19.js → index.cf02e6bd.js} +18 -19
- package/contexts/RHFormContext/classes/types.d.ts +1 -1
- package/contexts/RHFormContext/{index.7b2a8723.js → index.dc955a09.js} +16 -26
- package/contexts/RHFormContext/styles.d.ts +2 -0
- package/hocs/index.d.ts +1 -0
- package/hocs/withToggle/{index.50aec5e4.js → index.548aeace.js} +3 -11
- package/hooks/useFormAddEdit/index.f156a2cd.js +86 -0
- package/hooks/useFormFocus/index.d.ts +2 -2
- package/hooks/useFormFocus/types.d.ts +1 -1
- package/hooks/useModal/index.ef54bcf2.js +66 -0
- package/hooks/useSizeContainer/{index.62b4e0c4.js → index.3c48670c.js} +1 -1
- package/hooks/useTab/{index.976d5e1e.js → index.bce8b99e.js} +1 -1
- package/index.d.ts +1 -1
- package/index.js +278 -362
- package/package.json +13 -2
- package/{react-draggable.e4725f3a.js → react-draggable.5331add7.js} +1 -1
- package/{react-resizable.c07d63fb.js → react-resizable.37bfb965.js} +3 -5
- package/styles/DynamicFilter.styles.d.ts +2 -0
- package/test/getNameDataTestId.aee44365.js +10 -0
- package/test/getNameDataTestId.d.ts +10 -0
- package/test/index.6d4b98b9.js +4 -0
- package/utils/containerQuery.d.ts +2 -0
- package/utils/{index.6469f148.js → index.9ee4c99a.js} +117 -3
- package/utils/index.d.ts +1 -1
- package/vendor.a1ce6777.js +6352 -0
- package/vite-env.d.ts +4 -4
- package/assets/Logo/index.228dcb5a.js +0 -93
- package/assets/Logo.d.ts +0 -6
- package/components/AccountPopover/index.39efc8f0.js +0 -302
- package/components/AppBar/index.c8850b99.js +0 -109
- package/components/CommonActions/components/ActionCancel/index.416cbf9b.js +0 -20
- package/components/CommonActions/components/ActionFormCancel/index.78267f7c.js +0 -61
- package/components/CommonActions/components/ActionFormIntro/index.dcb4d280.js +0 -40
- package/components/CommonActions/components/ActionIntro/index.094290fd.js +0 -26
- package/components/CommonActions/components/Actions/index.fa7ab18c.js +0 -66
- package/components/DataGrid/constants.e334cd50.js +0 -10
- package/components/DataGrid/formatters/ColumnBooleanFormatter/index.cd6e553a.js +0 -27
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.0c439ac3.js +0 -30
- package/components/DataGrid/formatters/ColumnDateFormatter/index.704db1ca.js +0 -27
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.867b8745.js +0 -26
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/index.925387d2.js +0 -19
- package/components/DataGrid/formatters/ColumnPointsFormatter/index.4335c26b.js +0 -13
- package/components/DataGrid/formatters/ColumnPriceFormatter/index.d717405e.js +0 -13
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/index.0b23ba88.js +0 -40
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index.aeea65aa.js +0 -13
- package/components/DataGrid/formatters/index.2c2f0ae4.js +0 -1
- package/components/DataGrid/index.abe0f9b9.js +0 -979
- package/components/DataGrid/subcomponents/Actions/index.4f2071ee.js +0 -663
- package/components/DataGrid/subcomponents/editors/TextEditor/index.eac1749c.js +0 -75
- package/components/DragResizeWindow/index.13ef022e.js +0 -489
- package/components/DynamicFilter/classes/index.d.ts +0 -5
- package/components/DynamicFilter/classes/types.d.ts +0 -35
- package/components/DynamicFilter/contexts/DynamicFilterContext/helpers.d.ts +0 -23
- package/components/DynamicFilter/contexts/DynamicFilterContext/index.d.ts +0 -18
- package/components/DynamicFilter/contexts/DynamicFilterContext/types.d.ts +0 -5
- package/components/DynamicFilter/hooks/useDynamicFilter.d.ts +0 -2
- package/components/DynamicFilter/index.c52a8e96.js +0 -1954
- package/components/DynamicFilter/subcomponents/ApplyedFilters/index.d.ts +0 -6
- package/components/DynamicFilter/subcomponents/ApplyedFilters/subcomponents/ApplyedFilter/index.d.ts +0 -2
- package/components/DynamicFilter/subcomponents/ClearFilters/index.d.ts +0 -1
- package/components/DynamicFilter/subcomponents/FilterButton/index.d.ts +0 -11
- package/components/DynamicFilter/subcomponents/InnerForHooks/index.d.ts +0 -5
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/types.d.ts +0 -6
- package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/helpers.d.ts +0 -39
- package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/index.d.ts +0 -5
- package/components/DynamicFilter/subcomponents/fieldstypes/DateTimeFilter/helpers.d.ts +0 -42
- package/components/DynamicFilter/subcomponents/fieldstypes/NumberFilter/helpers.d.ts +0 -36
- package/components/DynamicFilter/subcomponents/fieldstypes/SelectFilter/helpers.d.ts +0 -51
- package/components/DynamicFilter/subcomponents/fieldstypes/StringFilter/helpers.d.ts +0 -39
- package/components/DynamicFilter/subcomponents/fieldstypes/factory.d.ts +0 -82
- package/components/DynamicFilter/subcomponents/fieldstypes/validations.d.ts +0 -32
- package/components/DynamicFilter/tests/contants.d.ts +0 -5
- package/components/FieldLabel/index.0412576c.js +0 -82
- package/components/GridLayout/subcomponents/Griditem/index.30016fc1.js +0 -366
- package/components/GridLayout/subcomponents/SizeProvider/index.0328ad0a.js +0 -62
- package/components/Icon/index.ad330e78.js +0 -184
- package/components/Image/index.b799c514.js +0 -203
- package/components/LanguagePopover/index.93c48ec5.js +0 -196
- package/components/LinearProgressIndeterminate/index.c46da124.js +0 -43
- package/components/ModalDialog/index.78c9650a.js +0 -92
- package/components/NavLink/index.b75c91e1.js +0 -59
- package/components/ObjectLogs/index.1d85a021.js +0 -293
- package/components/Page/index.5d34dc4d.js +0 -127
- package/components/PaperForm/index.d08b43f6.js +0 -138
- package/components/Period/index.3f89d8a4.js +0 -306
- package/components/PrintingSystem/subcomponents/BodyNode/index.319a3bb9.js +0 -48
- package/components/PrintingSystem/subcomponents/DividerNode/index.e504dbd2.js +0 -19
- package/components/PrintingSystem/subcomponents/FooterNode/index.9a19a7cb.js +0 -48
- package/components/PrintingSystem/subcomponents/GridNode/index.8d14e1b6.js +0 -71
- package/components/PrintingSystem/subcomponents/HeaderNode/index.89e4eaab.js +0 -48
- package/components/PrintingSystem/subcomponents/PaperNode/index.dd4ca449.js +0 -46
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index.048d7ebf.js +0 -41
- package/components/PrintingSystem/subcomponents/SectionNode/index.83f1efea.js +0 -48
- package/components/PrintingSystem/subcomponents/TextBoxNode/index.5427cb75.js +0 -28
- package/components/PropertyValue/index.15c61a4b.js +0 -209
- package/components/SideBar/index.b0359a2b.js +0 -916
- package/components/SplitLayout/index.d.ts +0 -2
- package/components/WrapperComponent/index.5e872594.js +0 -18
- package/components/animate/MotionContainer/index.8d9f9d80.js +0 -33
- package/components/animate/PropagateLoader/index.7fab43c8.js +0 -30
- package/components/animate/variants/index.7a912140.js +0 -1
- package/components/areas/components/AreasAdmin/index.820a00ab.js +0 -737
- package/components/areas/components/AreasViewer/index.6d7194e2.js +0 -1086
- package/components/areas/components/index.558684b3.js +0 -1
- package/components/areas/constants.66529246.js +0 -6
- package/components/areas/contexts/index.24025b97.js +0 -1
- package/components/areas/dictionary.08cfc4c9.js +0 -36
- package/components/areas/hooks/index.d9dc1e21.js +0 -1
- package/components/areas/icons.8266ccc8.js +0 -26
- package/components/areas/index.4cc6a221.js +0 -22
- package/components/commercial/AppBarCommercial/index.9cf586a2.js +0 -30
- package/components/commercial/SectionCommercial/index.4dbfc0a7.js +0 -48
- package/components/commercial/TopBar/index.93a7d26a.js +0 -275
- package/components/commercial/index.89ad149c.js +0 -82
- package/components/formatters/BooleanFormatter/index.9ccf9298.js +0 -54
- package/components/formatters/DateFormatter/index.578a9f53.js +0 -52
- package/components/formatters/PointsFormatter/index.8a4fa393.js +0 -32
- package/components/formatters/PriceFormatter/index.83cbe7be.js +0 -43
- package/components/formatters/UncertaintyFormatter/index.08e1b79f.js +0 -34
- package/components/formatters/index.03471e3f.js +0 -140
- package/components/hook-form/HelperError/index.66bbcac3.js +0 -30
- package/components/hook-form/RHFAutocomplete/index.1f2afb6b.js +0 -429
- package/components/hook-form/RHFAutocompleteAsync/index.bc278965.js +0 -156
- package/components/hook-form/RHFCheckbox/index.eca64469.js +0 -143
- package/components/hook-form/RHFColorPicker/index.dc13d5a3.js +0 -204
- package/components/hook-form/RHFDateTime/index.e554b068.js +0 -203
- package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +0 -34
- package/components/hook-form/RHFPeriod/index.e4e4530f.js +0 -112
- package/components/hook-form/RHFRadioGroup/index.1ddb3d93.js +0 -45
- package/components/hook-form/RHFSelect/index.b6ca8bb2.js +0 -36
- package/components/hook-form/RHFTextField/index.1bfa601f.js +0 -358
- package/components/hook-form/RHFUpload/index.6e98b291.js +0 -242
- package/components/maps/index.34ab6a68.js +0 -7
- package/components/modal/WindowBase.fd86f575.js +0 -74
- package/components/modal/WindowConfirm.ee6de236.js +0 -105
- package/components/mui_extended/Accordion/index.7dcdfd3a.js +0 -126
- package/components/mui_extended/Avatar/index.75e6ed57.js +0 -71
- package/components/mui_extended/Badge/index.09f5aee5.js +0 -36
- package/components/mui_extended/BoxIcon/index.e638ecc8.js +0 -22
- package/components/mui_extended/Breadcrumbs/index.5e37d903.js +0 -94
- package/components/mui_extended/Button/index.c3084916.js +0 -221
- package/components/mui_extended/CheckBox.2a3b86c5.js +0 -86
- package/components/mui_extended/CircularProgress/index.ad569afd.js +0 -10
- package/components/mui_extended/IconButton/index.f8a3021b.js +0 -125
- package/components/mui_extended/LinearProgress/index.c92b9ba9.js +0 -13
- package/components/mui_extended/LinkWithRoute/index.16436ab8.js +0 -30
- package/components/mui_extended/MenuActions/index.90f53670.js +0 -175
- package/components/mui_extended/Pager/index.ea2a4f3e.js +0 -254
- package/components/mui_extended/Popover/index.d85de73b.js +0 -179
- package/components/mui_extended/Stack/index.0e53197c.js +0 -39
- package/components/mui_extended/Tab/index.9214d9cc.js +0 -156
- package/components/mui_extended/ToggleButton/index.191711f3.js +0 -19
- package/components/mui_extended/ToggleIconButton/index.d9dbf650.js +0 -19
- package/components/mui_extended/Tooltip/index.24a2bc3f.js +0 -43
- package/components/mui_extended/Typography/index.379dd374.js +0 -68
- package/components/mui_extended/index.b606cd9d.js +0 -1
- package/components/popups/PopupsViewer/index.1500ce72.js +0 -186
- package/hooks/useFormAddEdit/index.000ce60b.js +0 -94
- package/hooks/useModal/index.f73d7e42.js +0 -11
- package/style.css +0 -65
- package/test/constants_no_mock.86c553a9.js +0 -4
- package/test/getNameDataTestId.14875ec7.js +0 -6
- /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/DateTimeFilter/index.d.ts +0 -0
- /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/NumberFilter/index.d.ts +0 -0
- /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/SelectFilter/index.d.ts +0 -0
- /package/components/DynamicFilter/subcomponents/{fieldstypes → FieldTypes}/StringFilter/index.d.ts +0 -0
|
@@ -1,45 +1,37 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { createContext, useRef, useEffect, useContext, useState, useMemo, useCallback } from "react";
|
|
2
3
|
import { useModuleDictionary, useModuleSkeleton, useEnvironment, useHostTools, useNetwork, useModulePrivileges, usePaginate } from "@m4l/core";
|
|
3
|
-
import {
|
|
4
|
+
import { M as MAP_DICCTIONARY } from "../../../areas/dictionary.7e74022a.js";
|
|
4
5
|
import { shallow } from "zustand/shallow";
|
|
5
6
|
import { createStore, useStore } from "zustand";
|
|
6
7
|
import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
7
8
|
import { devtools } from "zustand/middleware";
|
|
8
9
|
import { immer } from "zustand/middleware/immer";
|
|
9
10
|
import { enableMapSet } from "immer";
|
|
10
|
-
import {
|
|
11
|
+
import { u as useMapStore, C as CommonFeatureRender } from "../../index.8ec46ce4.js";
|
|
12
|
+
import { a9 as GeofencesFeaturesLayers, aa as COMPONENT_CLASS_NAME, M as MAP_ZINDEX_OVER_MAP, ab as COMPONENT_MAP_TOOLS_ID, ac as initialValues, ad as STROKE_COLOR_DEFAULT, ae as STROKE_OPACITY_DEFAULT, af as STROKE_WHEIGTH_DEFAULT, ag as STROKE_DASH_ARRAY_DEFAULT, ah as FILL_COLOR_DEFAULT, ai as FILL_OPACITY_DEFAULT, aj as STYLE_OPACITIES, ak as STYLE_WHEIGHTS, al as STYLE_PATTERNS, am as ENDPOINT_GEOFENCE_NEW_EDIT, an as ENDPOINT_GEOFENCE_GET } from "../../../areas/constants.5387d83e.js";
|
|
11
13
|
import "@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css";
|
|
12
14
|
import "@geoman-io/leaflet-geoman-free";
|
|
13
15
|
import { styled } from "@mui/material/styles";
|
|
14
16
|
import { generateUtilityClasses } from "@mui/material";
|
|
15
17
|
import "@mui/base";
|
|
16
18
|
import clsx from "clsx";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
+
import { G as GPSTOOLSICONS } from "../../../areas/icons.504ec098.js";
|
|
20
|
+
import { D as DynamicFilter } from "../../../DynamicFilter/index.d9168c12.js";
|
|
21
|
+
import { j as ColumnDateFormatter, d as Actions, H as HelperError, B as Button, k as ActionFormIntro, a as RHFTextField, S as Stack, R as RHFAutocomplete, l as RHFColorPicker, m as Tabs, n as Tab, o as Tooltip, p as TabContent, q as TabProvider, g as DataGrid } from "../../../../vendor.a1ce6777.js";
|
|
19
22
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
20
|
-
import {
|
|
21
|
-
import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.d7409f48.js";
|
|
22
|
-
import { A as ActionFormIntro } from "../../../CommonActions/components/ActionFormIntro/index.dcb4d280.js";
|
|
23
|
-
import { A as Actions } from "../../../CommonActions/components/Actions/index.fa7ab18c.js";
|
|
24
|
-
import { B as Button } from "../../../mui_extended/Button/index.c3084916.js";
|
|
23
|
+
import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.18669fb4.js";
|
|
25
24
|
import { useMap } from "react-leaflet";
|
|
26
25
|
import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index.f60f500e.js";
|
|
27
26
|
import * as L from "leaflet";
|
|
28
|
-
import { u as useTab } from "../../../../hooks/useTab/index.
|
|
29
|
-
import { P as PaperForm } from "../../../PaperForm/index.
|
|
30
|
-
import {
|
|
31
|
-
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.1bfa601f.js";
|
|
32
|
-
import { S as Stack } from "../../../mui_extended/Stack/index.0e53197c.js";
|
|
33
|
-
import { P as PropertyValue } from "../../../PropertyValue/index.15c61a4b.js";
|
|
34
|
-
import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index.dc13d5a3.js";
|
|
35
|
-
import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index.9214d9cc.js";
|
|
36
|
-
import { T as Tooltip } from "../../../mui_extended/Tooltip/index.24a2bc3f.js";
|
|
27
|
+
import { u as useTab } from "../../../../hooks/useTab/index.bce8b99e.js";
|
|
28
|
+
import { P as PaperForm } from "../../../PaperForm/index.8121e3da.js";
|
|
29
|
+
import { P as PropertyValue } from "../../../PropertyValue/index.9572c347.js";
|
|
37
30
|
import * as Yup from "yup";
|
|
38
|
-
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.
|
|
39
|
-
import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.
|
|
40
|
-
import { u as useModal } from "../../../../hooks/useModal/index.
|
|
41
|
-
import { W as WindowConfirm } from "../../../modal/WindowConfirm.
|
|
42
|
-
import { c as DataGrid } from "../../../DataGrid/index.abe0f9b9.js";
|
|
31
|
+
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.dc955a09.js";
|
|
32
|
+
import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.f156a2cd.js";
|
|
33
|
+
import { u as useModal } from "../../../../hooks/useModal/index.ef54bcf2.js";
|
|
34
|
+
import { W as WindowConfirm } from "../../../modal/WindowConfirm.e35da619.js";
|
|
43
35
|
enableMapSet();
|
|
44
36
|
const createGpsToolsStore = (initProps) => {
|
|
45
37
|
const startProps = {
|
|
@@ -92,7 +84,10 @@ const createGpsToolsStore = (initProps) => {
|
|
|
92
84
|
},
|
|
93
85
|
updatePartialGeofence: (geofenceId, geofence) => {
|
|
94
86
|
set((state) => {
|
|
95
|
-
state.geofenceState.hashGeofences[geofenceId] = {
|
|
87
|
+
state.geofenceState.hashGeofences[geofenceId] = {
|
|
88
|
+
...state.geofenceState.hashGeofences[geofenceId],
|
|
89
|
+
...geofence
|
|
90
|
+
};
|
|
96
91
|
});
|
|
97
92
|
},
|
|
98
93
|
updateRows: (newRows) => {
|
|
@@ -135,12 +130,8 @@ const createGpsToolsStore = (initProps) => {
|
|
|
135
130
|
};
|
|
136
131
|
const GpsToolsContext = createContext(null);
|
|
137
132
|
function GpsToolsProvider(props) {
|
|
138
|
-
const {
|
|
139
|
-
|
|
140
|
-
} = props;
|
|
141
|
-
const {
|
|
142
|
-
getLabel
|
|
143
|
-
} = useModuleDictionary();
|
|
133
|
+
const { children } = props;
|
|
134
|
+
const { getLabel } = useModuleDictionary();
|
|
144
135
|
const isDesktop = useResponsiveDesktop();
|
|
145
136
|
const isSkeleton = useModuleSkeleton();
|
|
146
137
|
const isFirstRender = useFirstRender([getLabel]);
|
|
@@ -156,10 +147,11 @@ function GpsToolsProvider(props) {
|
|
|
156
147
|
}
|
|
157
148
|
});
|
|
158
149
|
}
|
|
159
|
-
const {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
150
|
+
const { setHandlerGetLabel, setExternalState } = useStore(
|
|
151
|
+
mapStoreRef.current,
|
|
152
|
+
(state) => state.gpsToolsActions,
|
|
153
|
+
shallow
|
|
154
|
+
);
|
|
163
155
|
useEffect(() => {
|
|
164
156
|
if (!isFirstRender) {
|
|
165
157
|
setHandlerGetLabel(getLabel);
|
|
@@ -169,15 +161,9 @@ function GpsToolsProvider(props) {
|
|
|
169
161
|
if (isFirstRender) {
|
|
170
162
|
return;
|
|
171
163
|
}
|
|
172
|
-
setExternalState({
|
|
173
|
-
isMobile: !isDesktop,
|
|
174
|
-
isSkeleton
|
|
175
|
-
});
|
|
164
|
+
setExternalState({ isMobile: !isDesktop, isSkeleton });
|
|
176
165
|
}, [isDesktop, isSkeleton]);
|
|
177
|
-
return /* @__PURE__ */ jsx(GpsToolsContext.Provider, {
|
|
178
|
-
value: mapStoreRef.current,
|
|
179
|
-
children
|
|
180
|
-
});
|
|
166
|
+
return /* @__PURE__ */ jsx(GpsToolsContext.Provider, { value: mapStoreRef.current, children });
|
|
181
167
|
}
|
|
182
168
|
function useGpsToolsStore(selector, equalityFn) {
|
|
183
169
|
const context = useContext(GpsToolsContext);
|
|
@@ -185,22 +171,9 @@ function useGpsToolsStore(selector, equalityFn) {
|
|
|
185
171
|
throw new Error("useGpsToolsStore context must be use inside GpsToolsContext");
|
|
186
172
|
return useStore(context, selector, equalityFn);
|
|
187
173
|
}
|
|
188
|
-
const ENDPOINT_GEOFENCE_GET = "geofences";
|
|
189
|
-
const ENDPOINT_GEOFENCE_NEW_EDIT = "geofences";
|
|
190
|
-
var GeofencesFeaturesLayers = /* @__PURE__ */ ((GeofencesFeaturesLayers2) => {
|
|
191
|
-
GeofencesFeaturesLayers2["LAYER_GEOFENCES"] = "geofences";
|
|
192
|
-
GeofencesFeaturesLayers2["LAYER_GEOFENCES_TRANSIT_FEATURES"] = "geofencesCrossingFeatures";
|
|
193
|
-
GeofencesFeaturesLayers2["LAYER_GEOFENCES_INTERNAL_FEATURES"] = "geofencesInternalFeatures";
|
|
194
|
-
return GeofencesFeaturesLayers2;
|
|
195
|
-
})(GeofencesFeaturesLayers || {});
|
|
196
174
|
function useLayers() {
|
|
197
|
-
const {
|
|
198
|
-
|
|
199
|
-
removeLayer
|
|
200
|
-
} = useMapStore((state) => state.mapActions, shallow);
|
|
201
|
-
const {
|
|
202
|
-
init
|
|
203
|
-
} = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
175
|
+
const { addLayer, removeLayer } = useMapStore((state) => state.mapActions, shallow);
|
|
176
|
+
const { init } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
204
177
|
useEffect(() => {
|
|
205
178
|
addLayer({
|
|
206
179
|
layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES,
|
|
@@ -246,70 +219,6 @@ function useLayers() {
|
|
|
246
219
|
};
|
|
247
220
|
}, []);
|
|
248
221
|
}
|
|
249
|
-
const COMPONENT_CLASS_NAME = "M4LGpsTools";
|
|
250
|
-
const COMPONENT_MAP_TOOLS_ID = "gps_tools";
|
|
251
|
-
const STYLE_OPACITIES = [
|
|
252
|
-
{
|
|
253
|
-
value: 0,
|
|
254
|
-
label: "0%"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
value: 0.1,
|
|
258
|
-
label: "10%"
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
value: 0.2,
|
|
262
|
-
label: "20%"
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
value: 0.3,
|
|
266
|
-
label: "30%"
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
value: 0.4,
|
|
270
|
-
label: "40%"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
value: 0.5,
|
|
274
|
-
label: "50%"
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
value: 1,
|
|
278
|
-
label: "100%"
|
|
279
|
-
}
|
|
280
|
-
];
|
|
281
|
-
const STYLE_WHEIGHTS = [
|
|
282
|
-
{
|
|
283
|
-
value: 0,
|
|
284
|
-
label: "0px"
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
value: 1,
|
|
288
|
-
label: "1px"
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
value: 2,
|
|
292
|
-
label: "2px"
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
value: 3,
|
|
296
|
-
label: "3px"
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
value: 4,
|
|
300
|
-
label: "4px"
|
|
301
|
-
}
|
|
302
|
-
];
|
|
303
|
-
const STYLE_PATTERNS = [
|
|
304
|
-
{
|
|
305
|
-
value: "",
|
|
306
|
-
label: "------"
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
value: "4 1 2",
|
|
310
|
-
label: "-- - - --"
|
|
311
|
-
}
|
|
312
|
-
];
|
|
313
222
|
const gpsToolsClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
314
223
|
"gpsToolsRoot",
|
|
315
224
|
"gpsToolsTab",
|
|
@@ -323,59 +232,33 @@ const gpsToolsClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
|
323
232
|
"hidden"
|
|
324
233
|
]);
|
|
325
234
|
const DivGpsToolsRoot = styled("div")`
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
z-index:${MAP_ZINDEX_OVER_MAP};
|
|
335
|
-
|
|
235
|
+
position: relative;
|
|
236
|
+
display: flex;
|
|
237
|
+
flex-direction: column;
|
|
238
|
+
flex-grow: 1;
|
|
239
|
+
width: 100%;
|
|
240
|
+
height: 100%;
|
|
336
241
|
|
|
337
|
-
|
|
338
|
-
display:none;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
.${gpsToolsClasses.gpsToolsGeofencesList} .M4LDataGrid-root{
|
|
343
|
-
height:unset!important;
|
|
344
|
-
flex-grow:1;
|
|
345
|
-
}
|
|
242
|
+
z-index: ${MAP_ZINDEX_OVER_MAP};
|
|
346
243
|
|
|
244
|
+
.${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
|
|
245
|
+
display: none;
|
|
246
|
+
}
|
|
347
247
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
248
|
+
.${gpsToolsClasses.gpsToolsGeofencesList} .M4LDataGrid-root {
|
|
249
|
+
height: unset !important;
|
|
250
|
+
flex-grow: 1;
|
|
251
|
+
}
|
|
351
252
|
|
|
253
|
+
.${gpsToolsClasses.toolGeofencesAddEditGeneral} {
|
|
254
|
+
flex-grow: 1;
|
|
255
|
+
}
|
|
352
256
|
|
|
353
|
-
|
|
257
|
+
${(props) => props.theme.components?.M4LGpsTools?.styleOverrides}
|
|
354
258
|
`;
|
|
355
|
-
const GPSTOOLSICONS = {
|
|
356
|
-
GEOMETRY_CIRCLE: "geometry_circle.svg",
|
|
357
|
-
GEOMETRY_RECTANGLE: "geometry_rectangle.svg",
|
|
358
|
-
GEOMETRY_POLYGON: "geometry_polygon.svg",
|
|
359
|
-
ADD: "add.svg",
|
|
360
|
-
MEASURE: "measure.svg",
|
|
361
|
-
GENERAL: "general.svg",
|
|
362
|
-
CONFIG: "config.svg",
|
|
363
|
-
STROKE: "stroke.svg",
|
|
364
|
-
FILL: "fill.svg",
|
|
365
|
-
EDIT: "edit.svg",
|
|
366
|
-
DELETE: "delete.svg",
|
|
367
|
-
ACTIVE: "active.svg",
|
|
368
|
-
NAME: "name.svg"
|
|
369
|
-
};
|
|
370
259
|
function Filter(props) {
|
|
371
|
-
const {
|
|
372
|
-
|
|
373
|
-
setBackendQueryParams
|
|
374
|
-
} = props;
|
|
375
|
-
const {
|
|
376
|
-
host_static_assets,
|
|
377
|
-
environment_assets
|
|
378
|
-
} = useEnvironment();
|
|
260
|
+
const { refresh, setBackendQueryParams } = props;
|
|
261
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
379
262
|
const [initialFilter] = useState(() => {
|
|
380
263
|
return [];
|
|
381
264
|
});
|
|
@@ -385,88 +268,84 @@ function Filter(props) {
|
|
|
385
268
|
});
|
|
386
269
|
refresh();
|
|
387
270
|
};
|
|
388
|
-
return /* @__PURE__ */ jsx(
|
|
389
|
-
|
|
390
|
-
onChangeFilters: onChangeFilter,
|
|
391
|
-
fields: [{
|
|
392
|
-
name: "id",
|
|
393
|
-
dictionaryId: MAP_DICCTIONARY.LABEL_ID,
|
|
394
|
-
type: "number",
|
|
395
|
-
multiple: true,
|
|
396
|
-
presence: "optional",
|
|
397
|
-
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.ACTIVE}`
|
|
398
|
-
}, {
|
|
399
|
-
name: "name",
|
|
400
|
-
dictionaryId: MAP_DICCTIONARY.LABEL_NAME,
|
|
401
|
-
type: "string",
|
|
402
|
-
multiple: true,
|
|
403
|
-
presence: "optional",
|
|
404
|
-
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.NAME}`
|
|
405
|
-
}],
|
|
406
|
-
initialApplyedFilters: initialFilter
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
function useColumns(props) {
|
|
410
|
-
const {
|
|
411
|
-
getLabel
|
|
412
|
-
} = useModuleDictionary();
|
|
413
|
-
const columns = useMemo(() => [
|
|
271
|
+
return /* @__PURE__ */ jsx(
|
|
272
|
+
DynamicFilter,
|
|
414
273
|
{
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
key: "updated_at",
|
|
439
|
-
name: getLabel(MAP_DICCTIONARY.LABEL_UPDATED_AT),
|
|
440
|
-
type: "date",
|
|
441
|
-
formatter: ColumnDateFormatter({
|
|
442
|
-
presentationType: "datetime",
|
|
443
|
-
fieldValue: "row.updated_at"
|
|
444
|
-
}),
|
|
445
|
-
visible: false
|
|
274
|
+
withAllField: true,
|
|
275
|
+
onChangeFilters: onChangeFilter,
|
|
276
|
+
fields: [
|
|
277
|
+
{
|
|
278
|
+
name: "id",
|
|
279
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_ID,
|
|
280
|
+
type: "number",
|
|
281
|
+
multiple: true,
|
|
282
|
+
presence: "optional",
|
|
283
|
+
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.ACTIVE}`
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
name: "name",
|
|
287
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_NAME,
|
|
288
|
+
type: "string",
|
|
289
|
+
multiple: true,
|
|
290
|
+
presence: "optional",
|
|
291
|
+
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.NAME}`
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
initialAppliedFilters: initialFilter
|
|
446
295
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
};
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
function useColumns(_props) {
|
|
299
|
+
const { getLabel } = useModuleDictionary();
|
|
300
|
+
const columns = useMemo(
|
|
301
|
+
() => [
|
|
302
|
+
{
|
|
303
|
+
key: "id",
|
|
304
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_ID),
|
|
305
|
+
type: "number",
|
|
306
|
+
width: 40,
|
|
307
|
+
visible: false
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
key: "name",
|
|
311
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_NAME),
|
|
312
|
+
type: "string",
|
|
313
|
+
width: 300
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
key: "created_at",
|
|
317
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_CREATED_AT),
|
|
318
|
+
type: "date",
|
|
319
|
+
formatter: ColumnDateFormatter({
|
|
320
|
+
presentationType: "datetime",
|
|
321
|
+
fieldValue: "row.created_at"
|
|
322
|
+
}),
|
|
323
|
+
visible: false
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
key: "updated_at",
|
|
327
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_UPDATED_AT),
|
|
328
|
+
type: "date",
|
|
329
|
+
formatter: ColumnDateFormatter({
|
|
330
|
+
presentationType: "datetime",
|
|
331
|
+
fieldValue: "row.updated_at"
|
|
332
|
+
}),
|
|
333
|
+
visible: false
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
[getLabel]
|
|
337
|
+
);
|
|
338
|
+
return { columns };
|
|
451
339
|
}
|
|
452
340
|
function MyActions(props) {
|
|
453
|
-
const {
|
|
454
|
-
|
|
455
|
-
} = props;
|
|
456
|
-
const {
|
|
457
|
-
control
|
|
458
|
-
} = useFormContext();
|
|
341
|
+
const { geofenceId } = props;
|
|
342
|
+
const { control } = useFormContext();
|
|
459
343
|
const inEdition = useWatch({
|
|
460
344
|
control,
|
|
461
345
|
name: "inEdition"
|
|
462
346
|
});
|
|
463
|
-
const {
|
|
464
|
-
|
|
465
|
-
showPopup
|
|
466
|
-
} = usePopupsStore((state) => state.popupsActions);
|
|
467
|
-
const {
|
|
468
|
-
addCheckedGeofence
|
|
469
|
-
} = useGpsToolsStore((state) => state.geofenceActions);
|
|
347
|
+
const { closePopup, showPopup } = usePopupsStore((state) => state.popupsActions);
|
|
348
|
+
const { addCheckedGeofence } = useGpsToolsStore((state) => state.geofenceActions);
|
|
470
349
|
const onClickCancel = () => {
|
|
471
350
|
closePopup("geofencesAddEdit");
|
|
472
351
|
if (geofenceId !== void 0) {
|
|
@@ -474,45 +353,12 @@ function MyActions(props) {
|
|
|
474
353
|
}
|
|
475
354
|
showPopup("gpsTools");
|
|
476
355
|
};
|
|
477
|
-
return /* @__PURE__ */ jsxs(Actions, {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
disabled: inEdition,
|
|
483
|
-
children: "Cancelar"
|
|
484
|
-
}), /* @__PURE__ */ jsx(ActionFormIntro, {
|
|
485
|
-
disabled: inEdition
|
|
486
|
-
})]
|
|
487
|
-
});
|
|
356
|
+
return /* @__PURE__ */ jsxs(Actions, { children: [
|
|
357
|
+
/* @__PURE__ */ jsx(HelperError, { name: "geometry" }),
|
|
358
|
+
/* @__PURE__ */ jsx(Button, { onClick: onClickCancel, disabled: inEdition, children: "Cancelar" }),
|
|
359
|
+
/* @__PURE__ */ jsx(ActionFormIntro, { disabled: inEdition })
|
|
360
|
+
] });
|
|
488
361
|
}
|
|
489
|
-
const STROKE_COLOR_DEFAULT = "#aaccaa";
|
|
490
|
-
const STROKE_OPACITY_DEFAULT = { value: 1, label: "100%" };
|
|
491
|
-
const STROKE_WHEIGTH_DEFAULT = { value: 1, label: "1 px" };
|
|
492
|
-
const STROKE_DASH_ARRAY_DEFAULT = { value: "", label: "-----" };
|
|
493
|
-
const FILL_COLOR_DEFAULT = "#aa3000";
|
|
494
|
-
const FILL_OPACITY_DEFAULT = { value: 0.2, label: "20%" };
|
|
495
|
-
const initialValues = {
|
|
496
|
-
name: "",
|
|
497
|
-
geofenceType: null,
|
|
498
|
-
alias: null,
|
|
499
|
-
customerId: null,
|
|
500
|
-
timeMinInSeconds: 5,
|
|
501
|
-
timeMinOutSeconds: 5,
|
|
502
|
-
inEdition: false,
|
|
503
|
-
geometry: null,
|
|
504
|
-
lat: null,
|
|
505
|
-
lng: null,
|
|
506
|
-
properties: {
|
|
507
|
-
radius: null,
|
|
508
|
-
strokeColor: STROKE_COLOR_DEFAULT,
|
|
509
|
-
strokeOpacity: STROKE_OPACITY_DEFAULT,
|
|
510
|
-
strokeWeight: STROKE_WHEIGTH_DEFAULT,
|
|
511
|
-
strokeDashArray: STROKE_DASH_ARRAY_DEFAULT,
|
|
512
|
-
fillColor: FILL_COLOR_DEFAULT,
|
|
513
|
-
fillOpacity: FILL_OPACITY_DEFAULT
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
362
|
const formatDataEnpoint = (response) => {
|
|
517
363
|
try {
|
|
518
364
|
const { data } = response;
|
|
@@ -531,7 +377,6 @@ const formatDataEnpoint = (response) => {
|
|
|
531
377
|
fillOpacity: FILL_OPACITY_DEFAULT
|
|
532
378
|
}
|
|
533
379
|
};
|
|
534
|
-
console.log("formatDataEnpoint", obRet);
|
|
535
380
|
if (obRet.geofenceType?.id === "gt_circle") {
|
|
536
381
|
if (data.properties.radius) {
|
|
537
382
|
obRet.properties.radius = data.properties.radius;
|
|
@@ -549,30 +394,32 @@ const formatDataEnpoint = (response) => {
|
|
|
549
394
|
const getLayerFromGeometry = (geometry, geofenceTypeId, radius, options) => {
|
|
550
395
|
if (geometry) {
|
|
551
396
|
if (geofenceTypeId === "gt_circle" && geometry.type === "Point") {
|
|
552
|
-
return L.circle(
|
|
397
|
+
return L.circle(
|
|
398
|
+
[geometry.coordinates[1], geometry.coordinates[0]],
|
|
399
|
+
radius || 0,
|
|
400
|
+
options
|
|
401
|
+
);
|
|
553
402
|
} else if (geofenceTypeId === "gt_polygon" && geometry.type === "Polygon") {
|
|
554
403
|
const coordinates = geometry.coordinates.map(
|
|
555
404
|
(ring) => ring.map((position) => [position[1], position[0]])
|
|
556
405
|
);
|
|
557
406
|
return L.polygon(coordinates, options);
|
|
558
407
|
} else if (geofenceTypeId === "gt_rectangle" && geometry.type === "Polygon") {
|
|
559
|
-
const latLngs = geometry.coordinates[0].map(
|
|
560
|
-
|
|
561
|
-
(coord) => {
|
|
562
|
-
if (Array.isArray(coord)) {
|
|
563
|
-
return coord[0];
|
|
564
|
-
}
|
|
565
|
-
return 0;
|
|
566
|
-
}
|
|
408
|
+
const latLngs = geometry.coordinates[0].map(
|
|
409
|
+
(coord) => [coord[1], coord[0]]
|
|
567
410
|
);
|
|
568
|
-
const
|
|
569
|
-
(coord)
|
|
570
|
-
|
|
571
|
-
return coord[1];
|
|
572
|
-
}
|
|
573
|
-
return 0;
|
|
411
|
+
const lats = latLngs.map((coord) => {
|
|
412
|
+
if (Array.isArray(coord)) {
|
|
413
|
+
return coord[0];
|
|
574
414
|
}
|
|
575
|
-
|
|
415
|
+
return 0;
|
|
416
|
+
});
|
|
417
|
+
const lngs = latLngs.map((coord) => {
|
|
418
|
+
if (Array.isArray(coord)) {
|
|
419
|
+
return coord[1];
|
|
420
|
+
}
|
|
421
|
+
return 0;
|
|
422
|
+
});
|
|
576
423
|
const southWest = [Math.min(...lats), Math.min(...lngs)];
|
|
577
424
|
const northEast = [Math.max(...lats), Math.max(...lngs)];
|
|
578
425
|
return L.rectangle([southWest, northEast], options);
|
|
@@ -615,14 +462,6 @@ function useDrawing() {
|
|
|
615
462
|
const [geometrTypeIdCached, setgeofenceTypeIdCached] = useState(geofenceTypeId);
|
|
616
463
|
useEffect(() => {
|
|
617
464
|
if (geometry) {
|
|
618
|
-
console.log("useEffect geometry load", geometry, {
|
|
619
|
-
color: strokeColor,
|
|
620
|
-
opacity: strokeOpacity,
|
|
621
|
-
weight: strokeWeight,
|
|
622
|
-
dashArray: strokeDashArray,
|
|
623
|
-
fillColor,
|
|
624
|
-
fillOpacity
|
|
625
|
-
});
|
|
626
465
|
currentLayer.current = getLayerFromGeometry(geometry, geofenceTypeId, radius, {
|
|
627
466
|
color: strokeColor,
|
|
628
467
|
opacity: strokeOpacity,
|
|
@@ -683,17 +522,15 @@ function useDrawing() {
|
|
|
683
522
|
if (shape === "Circle") {
|
|
684
523
|
map.on("pm:drawstart", ({ workingLayer }) => {
|
|
685
524
|
workingLayer.on("pm:centerplaced", (e) => {
|
|
686
|
-
|
|
687
|
-
layer.setStyle(
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
}
|
|
696
|
-
);
|
|
525
|
+
const layer = e.workingLayer;
|
|
526
|
+
layer.setStyle({
|
|
527
|
+
color: strokeColor,
|
|
528
|
+
opacity: strokeOpacity,
|
|
529
|
+
weight: strokeWeight,
|
|
530
|
+
dashArray: strokeDashArray,
|
|
531
|
+
fillColor,
|
|
532
|
+
fillOpacity
|
|
533
|
+
});
|
|
697
534
|
setValue("lat", layer.getLatLng().lat);
|
|
698
535
|
setValue("lng", layer.getLatLng().lng);
|
|
699
536
|
layer.on("pm:change", (_e) => {
|
|
@@ -705,31 +542,27 @@ function useDrawing() {
|
|
|
705
542
|
} else if (shape === "Polygon") {
|
|
706
543
|
map.on("pm:drawstart", ({ workingLayer }) => {
|
|
707
544
|
workingLayer.on("pm:vertexadded", (e) => {
|
|
708
|
-
|
|
709
|
-
layer.setStyle(
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
}
|
|
718
|
-
);
|
|
545
|
+
const layer = e.workingLayer;
|
|
546
|
+
layer.setStyle({
|
|
547
|
+
color: strokeColor,
|
|
548
|
+
opacity: strokeOpacity,
|
|
549
|
+
weight: strokeWeight,
|
|
550
|
+
dashArray: strokeDashArray,
|
|
551
|
+
fillColor,
|
|
552
|
+
fillOpacity
|
|
553
|
+
});
|
|
719
554
|
});
|
|
720
555
|
});
|
|
721
556
|
}
|
|
722
557
|
map.pm.enableDraw(shape);
|
|
723
|
-
map.pm.setPathOptions(
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
}
|
|
732
|
-
);
|
|
558
|
+
map.pm.setPathOptions({
|
|
559
|
+
color: strokeColor,
|
|
560
|
+
opacity: strokeOpacity,
|
|
561
|
+
weight: strokeWeight,
|
|
562
|
+
dashArray: strokeDashArray,
|
|
563
|
+
fillColor,
|
|
564
|
+
fillOpacity
|
|
565
|
+
});
|
|
733
566
|
map.on("pm:create", (e) => {
|
|
734
567
|
currentLayer.current = e.layer;
|
|
735
568
|
setValue("geometry", currentLayer.current.toGeoJSON()?.geometry, {
|
|
@@ -744,7 +577,6 @@ function useDrawing() {
|
|
|
744
577
|
setValue("inEdition", true);
|
|
745
578
|
currentLayer.current.on("pm:disable", (e) => {
|
|
746
579
|
currentLayer.current = e.layer;
|
|
747
|
-
console.log("Geometr\xEDa editada **", currentLayer.current.toGeoJSON());
|
|
748
580
|
setValue("geometry", currentLayer.current.toGeoJSON()?.geometry, {
|
|
749
581
|
shouldTouch: false,
|
|
750
582
|
shouldValidate: true
|
|
@@ -807,10 +639,16 @@ function useSumbitErrorsFocus() {
|
|
|
807
639
|
if (isSubmitted) {
|
|
808
640
|
const firstError = Object.keys(errors).reduce((field, a) => {
|
|
809
641
|
const fieldKey = field;
|
|
810
|
-
return
|
|
642
|
+
return errors[fieldKey] ? fieldKey : a;
|
|
811
643
|
}, null);
|
|
812
644
|
if (firstError) {
|
|
813
|
-
|
|
645
|
+
const found = [
|
|
646
|
+
"name",
|
|
647
|
+
"geometry",
|
|
648
|
+
"geofenceType",
|
|
649
|
+
"timeMinInSeconds",
|
|
650
|
+
"timeMinOutSeconds"
|
|
651
|
+
].some((field) => field.includes(firstError));
|
|
814
652
|
if (found) {
|
|
815
653
|
handleChange(null, "general");
|
|
816
654
|
}
|
|
@@ -822,287 +660,323 @@ function useSumbitErrorsFocus() {
|
|
|
822
660
|
}, [isSubmitted, errors]);
|
|
823
661
|
}
|
|
824
662
|
function GeneralData() {
|
|
825
|
-
const {
|
|
826
|
-
|
|
827
|
-
} =
|
|
828
|
-
const {
|
|
829
|
-
host_static_assets,
|
|
830
|
-
environment_assets
|
|
831
|
-
} = useEnvironment();
|
|
832
|
-
const {
|
|
833
|
-
inEdition,
|
|
834
|
-
handleDraw,
|
|
835
|
-
handleFinish,
|
|
836
|
-
geometrTypeIdCached
|
|
837
|
-
} = useDrawing();
|
|
663
|
+
const { getLabel } = useModuleDictionary();
|
|
664
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
665
|
+
const { inEdition, handleDraw, handleFinish, geometrTypeIdCached } = useDrawing();
|
|
838
666
|
useSumbitErrorsFocus();
|
|
839
667
|
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GENERAL}`;
|
|
840
668
|
const geofencesTypes = useMemo(() => {
|
|
841
|
-
return [
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
669
|
+
return [
|
|
670
|
+
{
|
|
671
|
+
id: "gt_circle",
|
|
672
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_CIRCLE),
|
|
673
|
+
url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_CIRCLE}`
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
id: "gt_polygon",
|
|
677
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_POLYGON),
|
|
678
|
+
url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_POLYGON}`
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
id: "gt_rectangle",
|
|
682
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_RECTANGLE),
|
|
683
|
+
url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_RECTANGLE}`
|
|
684
|
+
}
|
|
685
|
+
];
|
|
854
686
|
}, [getLabel]);
|
|
855
|
-
return /* @__PURE__ */ jsxs(PaperForm, {
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
alignItems: "center",
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
687
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_GENERAL), children: [
|
|
688
|
+
/* @__PURE__ */ jsx(
|
|
689
|
+
RHFTextField,
|
|
690
|
+
{
|
|
691
|
+
name: "name",
|
|
692
|
+
disabled: false,
|
|
693
|
+
type: "text",
|
|
694
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_NAME}`)
|
|
695
|
+
}
|
|
696
|
+
),
|
|
697
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 1, alignItems: "center", children: [
|
|
698
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
699
|
+
/* @__PURE__ */ jsx(
|
|
700
|
+
RHFAutocomplete,
|
|
701
|
+
{
|
|
702
|
+
name: "geofenceType",
|
|
703
|
+
autoComplete: "off",
|
|
704
|
+
options: geofencesTypes,
|
|
705
|
+
getOptionLabel: (option) => option.name,
|
|
706
|
+
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
707
|
+
getOptionUrlImage: (option) => option.url,
|
|
708
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_TYPE)
|
|
709
|
+
}
|
|
710
|
+
),
|
|
711
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleDraw, disabled: inEdition || !geometrTypeIdCached, children: getLabel(MAP_DICCTIONARY.LABEL_DRAW) }),
|
|
712
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleFinish, disabled: !inEdition, children: getLabel(MAP_DICCTIONARY.LABEL_FINISH) })
|
|
713
|
+
] }),
|
|
714
|
+
geometrTypeIdCached && geometrTypeIdCached === "gt_circle" && /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
715
|
+
/* @__PURE__ */ jsx(
|
|
716
|
+
RHFTextField,
|
|
717
|
+
{
|
|
718
|
+
name: "properties.radius",
|
|
719
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_RADIUS),
|
|
720
|
+
autoComplete: "on",
|
|
721
|
+
skeletonWidth: "70%",
|
|
722
|
+
skeletonHeight: "18px",
|
|
723
|
+
disabled: true,
|
|
724
|
+
size: "medium"
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
/* @__PURE__ */ jsx(
|
|
728
|
+
RHFTextField,
|
|
729
|
+
{
|
|
730
|
+
name: "lat",
|
|
731
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_LAT),
|
|
732
|
+
autoComplete: "on",
|
|
733
|
+
skeletonWidth: "70%",
|
|
734
|
+
skeletonHeight: "18px",
|
|
735
|
+
disabled: true,
|
|
736
|
+
size: "medium"
|
|
737
|
+
}
|
|
738
|
+
),
|
|
739
|
+
/* @__PURE__ */ jsx(
|
|
740
|
+
RHFTextField,
|
|
741
|
+
{
|
|
742
|
+
name: "lng",
|
|
743
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_LON),
|
|
744
|
+
autoComplete: "on",
|
|
745
|
+
skeletonWidth: "70%",
|
|
746
|
+
skeletonHeight: "18px",
|
|
747
|
+
disabled: true,
|
|
748
|
+
size: "medium"
|
|
749
|
+
}
|
|
750
|
+
)
|
|
751
|
+
] })
|
|
752
|
+
] })
|
|
753
|
+
] });
|
|
920
754
|
}
|
|
921
755
|
function ConfigData() {
|
|
922
|
-
const {
|
|
923
|
-
|
|
924
|
-
} = useModuleDictionary();
|
|
925
|
-
const {
|
|
926
|
-
host_static_assets,
|
|
927
|
-
environment_assets
|
|
928
|
-
} = useEnvironment();
|
|
756
|
+
const { getLabel } = useModuleDictionary();
|
|
757
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
929
758
|
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.CONFIG}`;
|
|
930
|
-
return /* @__PURE__ */ jsxs(PaperForm, {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
759
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_CONFIG), children: [
|
|
760
|
+
/* @__PURE__ */ jsx(
|
|
761
|
+
RHFTextField,
|
|
762
|
+
{
|
|
763
|
+
name: "alias",
|
|
764
|
+
disabled: false,
|
|
765
|
+
type: "text",
|
|
766
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_ALIAS}`)
|
|
767
|
+
}
|
|
768
|
+
),
|
|
769
|
+
/* @__PURE__ */ jsx(
|
|
770
|
+
RHFTextField,
|
|
771
|
+
{
|
|
772
|
+
name: "customerId",
|
|
773
|
+
disabled: false,
|
|
774
|
+
type: "text",
|
|
775
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_CUSTOMER_ID}`)
|
|
776
|
+
}
|
|
777
|
+
),
|
|
778
|
+
/* @__PURE__ */ jsx(
|
|
779
|
+
RHFTextField,
|
|
780
|
+
{
|
|
781
|
+
name: "timeMinInSeconds",
|
|
782
|
+
disabled: false,
|
|
783
|
+
type: "number",
|
|
784
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_IN_SECONDS}`)
|
|
785
|
+
}
|
|
786
|
+
),
|
|
787
|
+
/* @__PURE__ */ jsx(
|
|
788
|
+
RHFTextField,
|
|
789
|
+
{
|
|
790
|
+
name: "timeMinOutSeconds",
|
|
791
|
+
disabled: false,
|
|
792
|
+
type: "number",
|
|
793
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_OUT_SECONDS}`)
|
|
794
|
+
}
|
|
795
|
+
)
|
|
796
|
+
] });
|
|
955
797
|
}
|
|
956
798
|
function FillData() {
|
|
957
|
-
const {
|
|
958
|
-
|
|
959
|
-
} = useModuleDictionary();
|
|
960
|
-
const {
|
|
961
|
-
host_static_assets,
|
|
962
|
-
environment_assets
|
|
963
|
-
} = useEnvironment();
|
|
799
|
+
const { getLabel } = useModuleDictionary();
|
|
800
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
964
801
|
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.FILL}`;
|
|
965
|
-
return /* @__PURE__ */ jsxs(PaperForm, {
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
802
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_STROKE), children: [
|
|
803
|
+
/* @__PURE__ */ jsx(
|
|
804
|
+
PropertyValue,
|
|
805
|
+
{
|
|
806
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
|
|
807
|
+
isForm: true,
|
|
808
|
+
propertyWidth: 150,
|
|
809
|
+
value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.fillColor" })
|
|
810
|
+
},
|
|
811
|
+
"properties.fillColor"
|
|
812
|
+
),
|
|
813
|
+
/* @__PURE__ */ jsx(
|
|
814
|
+
PropertyValue,
|
|
815
|
+
{
|
|
816
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
|
|
817
|
+
isForm: true,
|
|
818
|
+
propertyWidth: 150,
|
|
819
|
+
value: /* @__PURE__ */ jsx(
|
|
820
|
+
RHFAutocomplete,
|
|
821
|
+
{
|
|
822
|
+
name: "properties.fillOpacity",
|
|
823
|
+
autoComplete: "off",
|
|
824
|
+
options: STYLE_OPACITIES,
|
|
825
|
+
getOptionLabel: (option) => option.label,
|
|
826
|
+
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
827
|
+
label: "ssss"
|
|
828
|
+
}
|
|
829
|
+
)
|
|
830
|
+
},
|
|
831
|
+
"properties.fillOpacity"
|
|
832
|
+
)
|
|
833
|
+
] });
|
|
989
834
|
}
|
|
990
835
|
function StrokeData() {
|
|
991
|
-
const {
|
|
992
|
-
|
|
993
|
-
} = useModuleDictionary();
|
|
994
|
-
const {
|
|
995
|
-
host_static_assets,
|
|
996
|
-
environment_assets
|
|
997
|
-
} = useEnvironment();
|
|
836
|
+
const { getLabel } = useModuleDictionary();
|
|
837
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
998
838
|
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.STROKE}`;
|
|
999
|
-
return /* @__PURE__ */ jsxs(PaperForm, {
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
839
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_STROKE), children: [
|
|
840
|
+
/* @__PURE__ */ jsx(
|
|
841
|
+
PropertyValue,
|
|
842
|
+
{
|
|
843
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
|
|
844
|
+
isForm: true,
|
|
845
|
+
propertyWidth: 150,
|
|
846
|
+
value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.strokeColor" })
|
|
847
|
+
},
|
|
848
|
+
"properties.strokeColor"
|
|
849
|
+
),
|
|
850
|
+
/* @__PURE__ */ jsx(
|
|
851
|
+
PropertyValue,
|
|
852
|
+
{
|
|
853
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
|
|
854
|
+
isForm: true,
|
|
855
|
+
propertyWidth: 150,
|
|
856
|
+
value: /* @__PURE__ */ jsx(
|
|
857
|
+
RHFAutocomplete,
|
|
858
|
+
{
|
|
859
|
+
name: "properties.strokeOpacity",
|
|
860
|
+
autoComplete: "off",
|
|
861
|
+
options: STYLE_OPACITIES,
|
|
862
|
+
getOptionLabel: (option) => option.label,
|
|
863
|
+
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
864
|
+
label: "ssss"
|
|
865
|
+
}
|
|
866
|
+
)
|
|
867
|
+
},
|
|
868
|
+
"properties.strokeOpacity"
|
|
869
|
+
),
|
|
870
|
+
/* @__PURE__ */ jsx(
|
|
871
|
+
PropertyValue,
|
|
872
|
+
{
|
|
873
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_WEIGHT}`),
|
|
874
|
+
isForm: true,
|
|
875
|
+
propertyWidth: 150,
|
|
876
|
+
value: /* @__PURE__ */ jsx(
|
|
877
|
+
RHFAutocomplete,
|
|
878
|
+
{
|
|
879
|
+
name: "properties.strokeWeight",
|
|
880
|
+
autoComplete: "off",
|
|
881
|
+
options: STYLE_WHEIGHTS,
|
|
882
|
+
getOptionLabel: (option) => option.label,
|
|
883
|
+
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
884
|
+
label: "ssss"
|
|
885
|
+
}
|
|
886
|
+
)
|
|
887
|
+
},
|
|
888
|
+
"properties.strokeWeight"
|
|
889
|
+
),
|
|
890
|
+
/* @__PURE__ */ jsx(
|
|
891
|
+
PropertyValue,
|
|
892
|
+
{
|
|
893
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_DASH_ARRAY}`),
|
|
894
|
+
isForm: true,
|
|
895
|
+
propertyWidth: 150,
|
|
896
|
+
value: /* @__PURE__ */ jsx(
|
|
897
|
+
RHFAutocomplete,
|
|
898
|
+
{
|
|
899
|
+
name: "properties.strokeDashArray",
|
|
900
|
+
autoComplete: "off",
|
|
901
|
+
options: STYLE_PATTERNS,
|
|
902
|
+
getOptionLabel: (option) => option.label,
|
|
903
|
+
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
904
|
+
label: "ssss"
|
|
905
|
+
}
|
|
906
|
+
)
|
|
907
|
+
},
|
|
908
|
+
"properties.strokeDashArray"
|
|
909
|
+
)
|
|
910
|
+
] });
|
|
1047
911
|
}
|
|
1048
912
|
function StyleData() {
|
|
1049
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
1050
|
-
|
|
1051
|
-
|
|
913
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
914
|
+
/* @__PURE__ */ jsx(StrokeData, {}),
|
|
915
|
+
/* @__PURE__ */ jsx(FillData, {})
|
|
916
|
+
] });
|
|
1052
917
|
}
|
|
1053
918
|
function MyTabs() {
|
|
1054
|
-
const {
|
|
1055
|
-
|
|
1056
|
-
} = useModuleDictionary();
|
|
1057
|
-
const {
|
|
1058
|
-
currentTab,
|
|
1059
|
-
handleChange
|
|
1060
|
-
} = useTab();
|
|
919
|
+
const { getLabel } = useModuleDictionary();
|
|
920
|
+
const { currentTab, handleChange } = useTab();
|
|
1061
921
|
const geofenceAddEditTabs = useMemo(() => {
|
|
1062
|
-
return [
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
922
|
+
return [
|
|
923
|
+
{
|
|
924
|
+
value: "general",
|
|
925
|
+
icon: void 0,
|
|
926
|
+
components: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
927
|
+
/* @__PURE__ */ jsx(GeneralData, {}),
|
|
928
|
+
/* @__PURE__ */ jsx(ConfigData, {})
|
|
929
|
+
] }),
|
|
930
|
+
toolTip: getLabel(MAP_DICCTIONARY.TAB_GENERAL_CONFIG_TOOLTIP),
|
|
931
|
+
className: gpsToolsClasses.toolGeofencesAddEditGeneral
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
value: "style",
|
|
935
|
+
icon: void 0,
|
|
936
|
+
components: /* @__PURE__ */ jsx(StyleData, {}),
|
|
937
|
+
toolTip: getLabel(MAP_DICCTIONARY.TAB_STYLE_CONFIG_TOOLTIP),
|
|
938
|
+
className: gpsToolsClasses.toolGeofencesAddEditStyle
|
|
939
|
+
}
|
|
940
|
+
];
|
|
1077
941
|
}, [getLabel]);
|
|
1078
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
children: tab.toolTip
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
942
|
+
return /* @__PURE__ */ jsxs("div", { className: gpsToolsClasses.gpsToolsGeofencesAddEditContent, children: [
|
|
943
|
+
/* @__PURE__ */ jsx(
|
|
944
|
+
Tabs,
|
|
945
|
+
{
|
|
946
|
+
value: currentTab,
|
|
947
|
+
scrollButtons: "auto",
|
|
948
|
+
variant: "scrollable",
|
|
949
|
+
allowScrollButtonsMobile: true,
|
|
950
|
+
onChange: (_e, newValue) => handleChange(_e, newValue),
|
|
951
|
+
children: geofenceAddEditTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
952
|
+
Tab,
|
|
953
|
+
{
|
|
954
|
+
value: tab.value,
|
|
955
|
+
icon: tab.icon,
|
|
956
|
+
label: /* @__PURE__ */ jsx(Tooltip, { title: tab.toolTip, children: /* @__PURE__ */ jsx("span", { children: tab.toolTip }) }),
|
|
957
|
+
SKTWidth: "100px",
|
|
958
|
+
SKTHeight: "14px"
|
|
959
|
+
},
|
|
960
|
+
tab.value
|
|
961
|
+
))
|
|
962
|
+
}
|
|
963
|
+
),
|
|
964
|
+
geofenceAddEditTabs.map((tab) => {
|
|
1099
965
|
const isMatched = tab.value === currentTab;
|
|
1100
|
-
return /* @__PURE__ */ jsx(
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
966
|
+
return /* @__PURE__ */ jsx(
|
|
967
|
+
TabContent,
|
|
968
|
+
{
|
|
969
|
+
className: clsx(
|
|
970
|
+
gpsToolsClasses.gpsToolsTabContent,
|
|
971
|
+
tab.className,
|
|
972
|
+
isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
|
|
973
|
+
),
|
|
974
|
+
children: tab.components
|
|
975
|
+
},
|
|
976
|
+
tab.value
|
|
977
|
+
);
|
|
978
|
+
})
|
|
979
|
+
] });
|
|
1106
980
|
}
|
|
1107
981
|
function GeneralDataValidation(getLabel) {
|
|
1108
982
|
return {
|
|
@@ -1169,10 +1043,7 @@ function useSubmit(props) {
|
|
|
1169
1043
|
bodyToSnakeCase: true,
|
|
1170
1044
|
isRemote: false
|
|
1171
1045
|
}).then((response) => {
|
|
1172
|
-
toast(
|
|
1173
|
-
response.message,
|
|
1174
|
-
{ type: "success" }
|
|
1175
|
-
);
|
|
1046
|
+
toast(response.message, { type: "success" });
|
|
1176
1047
|
closePopup("geofencesAddEdit");
|
|
1177
1048
|
showPopup("gpsTools");
|
|
1178
1049
|
if (objectId !== void 0) {
|
|
@@ -1187,27 +1058,23 @@ function useSubmit(props) {
|
|
|
1187
1058
|
return { onSubmit };
|
|
1188
1059
|
}
|
|
1189
1060
|
const RHFormProviderStyled = styled(RHFormProvider)`
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
.${gpsToolsClasses.gpsToolsGeofencesAddEditContent} {
|
|
1193
|
-
display:flex;
|
|
1194
|
-
flex-direction:column;
|
|
1195
|
-
flex-grow:1;
|
|
1196
|
-
height:100%;
|
|
1197
|
-
}
|
|
1061
|
+
height: 100% !important;
|
|
1198
1062
|
|
|
1063
|
+
.${gpsToolsClasses.gpsToolsGeofencesAddEditContent} {
|
|
1064
|
+
display: flex;
|
|
1065
|
+
flex-direction: column;
|
|
1066
|
+
flex-grow: 1;
|
|
1067
|
+
height: 100%;
|
|
1068
|
+
}
|
|
1199
1069
|
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1070
|
+
.${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
|
|
1071
|
+
display: none;
|
|
1072
|
+
}
|
|
1204
1073
|
|
|
1205
|
-
|
|
1074
|
+
${(props) => props.theme.components?.M4LGpsToolsGeofencesAddEdit?.styleOverrides}
|
|
1206
1075
|
`;
|
|
1207
1076
|
function GeofenceAddEdit(props) {
|
|
1208
|
-
const {
|
|
1209
|
-
geofenceId
|
|
1210
|
-
} = props;
|
|
1077
|
+
const { geofenceId } = props;
|
|
1211
1078
|
const [finalInitalValues, omitCallEnpoint] = useGpsToolsStore((state) => {
|
|
1212
1079
|
if (geofenceId === void 0) {
|
|
1213
1080
|
return [initialValues, false];
|
|
@@ -1232,17 +1099,12 @@ function GeofenceAddEdit(props) {
|
|
|
1232
1099
|
customerId: geofence.customerId
|
|
1233
1100
|
}
|
|
1234
1101
|
};
|
|
1235
|
-
console.log("emulateResponse", emulateResponse);
|
|
1236
1102
|
return [formatDataEnpoint(emulateResponse), true];
|
|
1237
1103
|
} else {
|
|
1238
1104
|
return [initialValues, false];
|
|
1239
1105
|
}
|
|
1240
1106
|
});
|
|
1241
|
-
|
|
1242
|
-
const {
|
|
1243
|
-
formValues,
|
|
1244
|
-
statusLoad
|
|
1245
|
-
} = useFormAddEdit({
|
|
1107
|
+
const { formValues, statusLoad } = useFormAddEdit({
|
|
1246
1108
|
objectId: geofenceId,
|
|
1247
1109
|
formatDataEnpoint,
|
|
1248
1110
|
initialValues: finalInitalValues,
|
|
@@ -1250,144 +1112,116 @@ function GeofenceAddEdit(props) {
|
|
|
1250
1112
|
isRemote: false,
|
|
1251
1113
|
omitCallEnpoint
|
|
1252
1114
|
});
|
|
1253
|
-
const {
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
children: /* @__PURE__ */ jsx(MyTabs, {})
|
|
1270
|
-
}), /* @__PURE__ */ jsx(MyActions, {
|
|
1271
|
-
...props
|
|
1272
|
-
})]
|
|
1273
|
-
});
|
|
1115
|
+
const { validationSchema } = useValidation();
|
|
1116
|
+
const { onSubmit } = useSubmit({ objectId: geofenceId });
|
|
1117
|
+
return /* @__PURE__ */ jsxs(
|
|
1118
|
+
RHFormProviderStyled,
|
|
1119
|
+
{
|
|
1120
|
+
statusLoad,
|
|
1121
|
+
onSubmit,
|
|
1122
|
+
values: formValues,
|
|
1123
|
+
validationSchema,
|
|
1124
|
+
className: gpsToolsClasses.gpsToolsGeofencesAddEdit,
|
|
1125
|
+
children: [
|
|
1126
|
+
/* @__PURE__ */ jsx(TabProvider, { initialValue: "general", children: /* @__PURE__ */ jsx(MyTabs, {}) }),
|
|
1127
|
+
/* @__PURE__ */ jsx(MyActions, { ...props })
|
|
1128
|
+
]
|
|
1129
|
+
}
|
|
1130
|
+
);
|
|
1274
1131
|
}
|
|
1275
1132
|
function useRowActionsGetter(props) {
|
|
1276
|
-
const {
|
|
1277
|
-
|
|
1278
|
-
} =
|
|
1279
|
-
const {
|
|
1280
|
-
|
|
1281
|
-
} =
|
|
1282
|
-
const {
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
} = useModal();
|
|
1286
|
-
const {
|
|
1287
|
-
getLabel
|
|
1288
|
-
} = useModuleDictionary();
|
|
1289
|
-
const {
|
|
1290
|
-
hasPrivilege
|
|
1291
|
-
} = useModulePrivileges();
|
|
1292
|
-
const {
|
|
1293
|
-
host_static_assets,
|
|
1294
|
-
environment_assets
|
|
1295
|
-
} = useEnvironment();
|
|
1296
|
-
const {
|
|
1297
|
-
hidePopup,
|
|
1298
|
-
addPopup
|
|
1299
|
-
} = usePopupsStore((state) => state.popupsActions, shallow);
|
|
1300
|
-
const {
|
|
1301
|
-
removeCheckedGeofence
|
|
1302
|
-
} = useGpsToolsStore((state) => state.geofenceActions, shallow);
|
|
1303
|
-
const {
|
|
1304
|
-
toast
|
|
1305
|
-
} = useHostTools();
|
|
1133
|
+
const { fullRefresh } = props;
|
|
1134
|
+
const { networkOperation } = useNetwork();
|
|
1135
|
+
const { openModal, closeModal } = useModal();
|
|
1136
|
+
const { getLabel } = useModuleDictionary();
|
|
1137
|
+
const { hasPrivilege } = useModulePrivileges();
|
|
1138
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
1139
|
+
const { hidePopup, addPopup } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
1140
|
+
const { removeCheckedGeofence } = useGpsToolsStore((state) => state.geofenceActions, shallow);
|
|
1141
|
+
const { toast } = useHostTools();
|
|
1306
1142
|
const isDesktop = useResponsiveDesktop();
|
|
1307
|
-
const [urlIconEdit] = useState(
|
|
1308
|
-
|
|
1143
|
+
const [urlIconEdit] = useState(
|
|
1144
|
+
`${host_static_assets}/${environment_assets}/frontend/components/maptools/assets/icons/${GPSTOOLSICONS.EDIT}`
|
|
1145
|
+
);
|
|
1146
|
+
const [urlIconDelete] = useState(
|
|
1147
|
+
`${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/maptools/assets/icons/${GPSTOOLSICONS.DELETE}`
|
|
1148
|
+
);
|
|
1309
1149
|
const goEdit = (objectId) => {
|
|
1310
|
-
console.log("onClickAddGeofence");
|
|
1311
1150
|
hidePopup("gpsTools");
|
|
1312
1151
|
addPopup({
|
|
1313
1152
|
popupId: "geofencesAddEdit",
|
|
1314
1153
|
title: "geofencesAddEdit",
|
|
1315
|
-
componentProps: {
|
|
1316
|
-
fullRefresh,
|
|
1317
|
-
geofenceId: objectId
|
|
1318
|
-
},
|
|
1154
|
+
componentProps: { fullRefresh, geofenceId: objectId },
|
|
1319
1155
|
functionComponent: GeofenceAddEdit,
|
|
1320
1156
|
defaultPosition: {
|
|
1321
|
-
vertical: {
|
|
1322
|
-
|
|
1323
|
-
bottom: 50
|
|
1324
|
-
},
|
|
1325
|
-
horizontal: {
|
|
1326
|
-
right: 50,
|
|
1327
|
-
width: 380
|
|
1328
|
-
}
|
|
1157
|
+
vertical: { top: 50, bottom: 50 },
|
|
1158
|
+
horizontal: { right: 50, width: 380 }
|
|
1329
1159
|
},
|
|
1330
1160
|
iconUrl: ""
|
|
1331
1161
|
});
|
|
1332
1162
|
removeCheckedGeofence(objectId);
|
|
1333
1163
|
};
|
|
1334
|
-
const onDelete = useCallback(
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1164
|
+
const onDelete = useCallback(
|
|
1165
|
+
(row) => {
|
|
1166
|
+
openModal({
|
|
1167
|
+
window: /* @__PURE__ */ jsx(
|
|
1168
|
+
WindowConfirm,
|
|
1169
|
+
{
|
|
1170
|
+
title: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_TITLE),
|
|
1171
|
+
msg: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_MESSAGE),
|
|
1172
|
+
onClickIntro: () => onConfirmDelete(row)
|
|
1173
|
+
}
|
|
1174
|
+
),
|
|
1175
|
+
variant: "delete",
|
|
1176
|
+
initialWidth: 300,
|
|
1177
|
+
initialHeigth: 350
|
|
1178
|
+
});
|
|
1179
|
+
},
|
|
1180
|
+
[getLabel]
|
|
1181
|
+
);
|
|
1346
1182
|
const onConfirmDelete = useCallback((row) => {
|
|
1347
1183
|
networkOperation({
|
|
1348
1184
|
method: "DELETE",
|
|
1349
1185
|
endPoint: `geofences/${row.id}`
|
|
1350
1186
|
}).then((response) => {
|
|
1351
|
-
toast(response.message, {
|
|
1352
|
-
type: "success"
|
|
1353
|
-
});
|
|
1187
|
+
toast(response.message, { type: "success" });
|
|
1354
1188
|
fullRefresh();
|
|
1355
1189
|
});
|
|
1356
1190
|
closeModal();
|
|
1357
1191
|
}, []);
|
|
1358
|
-
const rowActionsGetter = useCallback(
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1192
|
+
const rowActionsGetter = useCallback(
|
|
1193
|
+
(row) => {
|
|
1194
|
+
const conditionalItems = [];
|
|
1195
|
+
conditionalItems.push({
|
|
1196
|
+
urlIcon: urlIconEdit,
|
|
1197
|
+
dictionaryId: MAP_DICCTIONARY.ROW_ACTION_GEO_EDIT,
|
|
1198
|
+
onClick: () => {
|
|
1199
|
+
goEdit(row.id);
|
|
1200
|
+
},
|
|
1201
|
+
disabled: !row.authUserOptions.edit
|
|
1202
|
+
});
|
|
1203
|
+
return conditionalItems;
|
|
1204
|
+
},
|
|
1205
|
+
[hasPrivilege, goEdit, onDelete, urlIconDelete, urlIconEdit, isDesktop]
|
|
1206
|
+
);
|
|
1207
|
+
return { rowActionsGetter };
|
|
1373
1208
|
}
|
|
1374
1209
|
function useCheckedGeofences() {
|
|
1375
1210
|
const layersIds = useMapStore((state) => state.layersIds, shallow);
|
|
1376
|
-
const [checkedGeofences, hashGeofences] = useGpsToolsStore(
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
} = useGpsToolsStore(
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
} = useNetwork();
|
|
1211
|
+
const [checkedGeofences, hashGeofences] = useGpsToolsStore(
|
|
1212
|
+
(state) => [state.geofenceState.checkedGeofences, state.geofenceState.hashGeofences],
|
|
1213
|
+
shallow
|
|
1214
|
+
);
|
|
1215
|
+
const { setCheckedGeofences, updatePartialGeofence } = useGpsToolsStore(
|
|
1216
|
+
(state) => state.geofenceActions,
|
|
1217
|
+
shallow
|
|
1218
|
+
);
|
|
1219
|
+
const { setFeatureData, removeFeature, getFeatureIds } = useMapStore(
|
|
1220
|
+
(state) => state.mapActions,
|
|
1221
|
+
shallow
|
|
1222
|
+
);
|
|
1223
|
+
const { networkOperation } = useNetwork();
|
|
1389
1224
|
useEffect(() => {
|
|
1390
|
-
console.log("useCheckedGeofences, layersIds:", layersIds);
|
|
1391
1225
|
if (!layersIds.includes(GeofencesFeaturesLayers.LAYER_GEOFENCES)) {
|
|
1392
1226
|
return;
|
|
1393
1227
|
}
|
|
@@ -1405,7 +1239,6 @@ function useCheckedGeofences() {
|
|
|
1405
1239
|
isRemote: false,
|
|
1406
1240
|
responseToCamelCase: true
|
|
1407
1241
|
}).then((response) => {
|
|
1408
|
-
console.log("onCheckedRowsChange response:", response.data);
|
|
1409
1242
|
const geoLoaded = {
|
|
1410
1243
|
geometry: response.data.geometry,
|
|
1411
1244
|
name: response.data.name,
|
|
@@ -1425,12 +1258,14 @@ function useCheckedGeofences() {
|
|
|
1425
1258
|
updatePartialGeofence(geofence.id, geoLoaded);
|
|
1426
1259
|
});
|
|
1427
1260
|
} else {
|
|
1428
|
-
setFeatureData(
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1261
|
+
setFeatureData(
|
|
1262
|
+
GeofencesFeaturesLayers.LAYER_GEOFENCES,
|
|
1263
|
+
chkRow,
|
|
1264
|
+
geofence.geometry,
|
|
1265
|
+
geofence.properties,
|
|
1266
|
+
{ label: geofence.name }
|
|
1267
|
+
);
|
|
1268
|
+
updatePartialGeofence(geofence.id, { hasRenderizedGeofence: true });
|
|
1434
1269
|
}
|
|
1435
1270
|
}
|
|
1436
1271
|
});
|
|
@@ -1450,16 +1285,21 @@ function useCheckedGeofences() {
|
|
|
1450
1285
|
function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
1451
1286
|
const layersIds = useMapStore((state) => state.layersIds, shallow);
|
|
1452
1287
|
const [checkedFeatures, setCheckedFeatures, hashGeofences] = useGpsToolsStore((state) => {
|
|
1453
|
-
return featuresType === "CrossingFeatures" ? [
|
|
1288
|
+
return featuresType === "CrossingFeatures" ? [
|
|
1289
|
+
state.geofenceState.checkedCrossingFeatures,
|
|
1290
|
+
state.geofenceActions.setCheckedCrossingFeatures,
|
|
1291
|
+
state.geofenceState.hashGeofences
|
|
1292
|
+
] : [
|
|
1293
|
+
state.geofenceState.checkedInternalFeatures,
|
|
1294
|
+
state.geofenceActions.setCheckedInternalFeatures,
|
|
1295
|
+
state.geofenceState.hashGeofences
|
|
1296
|
+
];
|
|
1454
1297
|
}, shallow);
|
|
1455
|
-
const {
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
} =
|
|
1460
|
-
const {
|
|
1461
|
-
networkOperation
|
|
1462
|
-
} = useNetwork();
|
|
1298
|
+
const { setFeatureData, removeFeature, getFeatureIds } = useMapStore(
|
|
1299
|
+
(state) => state.mapActions,
|
|
1300
|
+
shallow
|
|
1301
|
+
);
|
|
1302
|
+
const { networkOperation } = useNetwork();
|
|
1463
1303
|
useEffect(() => {
|
|
1464
1304
|
if (!layersIds.includes(layerId)) {
|
|
1465
1305
|
return;
|
|
@@ -1479,13 +1319,17 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
|
1479
1319
|
isRemote: false,
|
|
1480
1320
|
responseToCamelCase: true
|
|
1481
1321
|
}).then((response) => {
|
|
1482
|
-
console.log("onCheckedGeometriesChange response:", response.data);
|
|
1483
1322
|
geofence[`loaded${featuresType}`] = response.data;
|
|
1484
1323
|
const newGeofenceLoadedFeatures = geofence[`loaded${featuresType}`];
|
|
1485
1324
|
if (newGeofenceLoadedFeatures && Array.isArray(geofence[`loaded${featuresType}`])) {
|
|
1486
1325
|
if (checkedFeatures.has(geofence.id)) {
|
|
1487
1326
|
newGeofenceLoadedFeatures.forEach((feature) => {
|
|
1488
|
-
setFeatureData(
|
|
1327
|
+
setFeatureData(
|
|
1328
|
+
layerId,
|
|
1329
|
+
`geo_${geofence.id}_fid_${feature.id}`,
|
|
1330
|
+
feature.geometry,
|
|
1331
|
+
feature.properties
|
|
1332
|
+
);
|
|
1489
1333
|
});
|
|
1490
1334
|
geofence[`hasRenderized${featuresType}`] = true;
|
|
1491
1335
|
}
|
|
@@ -1494,7 +1338,12 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
|
1494
1338
|
});
|
|
1495
1339
|
} else {
|
|
1496
1340
|
currentGeofenceLoadedFeatures.forEach((feature) => {
|
|
1497
|
-
setFeatureData(
|
|
1341
|
+
setFeatureData(
|
|
1342
|
+
layerId,
|
|
1343
|
+
`geo_${geofence.id}_fid_${feature.id}`,
|
|
1344
|
+
feature.geometry,
|
|
1345
|
+
feature.properties
|
|
1346
|
+
);
|
|
1498
1347
|
});
|
|
1499
1348
|
geofence[`hasRenderized${featuresType}`] = true;
|
|
1500
1349
|
}
|
|
@@ -1512,54 +1361,48 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
|
1512
1361
|
return [checkedFeatures, setCheckedFeatures];
|
|
1513
1362
|
}
|
|
1514
1363
|
function useMaster() {
|
|
1515
|
-
const {
|
|
1516
|
-
hidePopup,
|
|
1517
|
-
addPopup
|
|
1518
|
-
} = usePopupsStore((state) => state.popupsActions, shallow);
|
|
1364
|
+
const { hidePopup, addPopup } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
1519
1365
|
const onClickAddGeofence = () => {
|
|
1520
|
-
console.log("onClickAddGeofence");
|
|
1521
1366
|
hidePopup("gpsTools");
|
|
1522
1367
|
addPopup({
|
|
1523
1368
|
popupId: "geofencesAddEdit",
|
|
1524
1369
|
title: "geofencesAddEdit",
|
|
1525
1370
|
functionComponent: () => /* @__PURE__ */ jsx(GeofenceAddEdit, {}),
|
|
1526
1371
|
defaultPosition: {
|
|
1527
|
-
vertical: {
|
|
1528
|
-
|
|
1529
|
-
bottom: 50
|
|
1530
|
-
},
|
|
1531
|
-
horizontal: {
|
|
1532
|
-
right: 50,
|
|
1533
|
-
width: 380
|
|
1534
|
-
}
|
|
1372
|
+
vertical: { top: 50, bottom: 50 },
|
|
1373
|
+
horizontal: { right: 50, width: 380 }
|
|
1535
1374
|
},
|
|
1536
1375
|
iconUrl: ""
|
|
1537
1376
|
});
|
|
1538
1377
|
};
|
|
1539
|
-
const [checkedGeofences, hashGeofences, initialRows] = useGpsToolsStore(
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1378
|
+
const [checkedGeofences, hashGeofences, initialRows] = useGpsToolsStore(
|
|
1379
|
+
(state) => [
|
|
1380
|
+
state.geofenceState.checkedGeofences,
|
|
1381
|
+
state.geofenceState.hashGeofences,
|
|
1382
|
+
state.geofenceState.rows
|
|
1383
|
+
],
|
|
1384
|
+
shallow
|
|
1385
|
+
);
|
|
1386
|
+
const { setCheckedGeofences, addGeofence, updatePartialGeofence, updateRows } = useGpsToolsStore(
|
|
1387
|
+
(state) => state.geofenceActions,
|
|
1388
|
+
shallow
|
|
1389
|
+
);
|
|
1546
1390
|
useCheckedGeofences();
|
|
1547
|
-
const [checkedCrossingFeatures, setCheckedCrossingFeatures] = useCheckedFeatures(
|
|
1548
|
-
|
|
1391
|
+
const [checkedCrossingFeatures, setCheckedCrossingFeatures] = useCheckedFeatures(
|
|
1392
|
+
GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES,
|
|
1393
|
+
"CrossingFeatures",
|
|
1394
|
+
"crossing_features"
|
|
1395
|
+
);
|
|
1396
|
+
const [checkedInternalFeatures, setCheckedInternalFeatures] = useCheckedFeatures(
|
|
1397
|
+
GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES,
|
|
1398
|
+
"InternalFeatures",
|
|
1399
|
+
"internal_features"
|
|
1400
|
+
);
|
|
1549
1401
|
const rowKeyGetter = useCallback((row) => row.id, []);
|
|
1550
1402
|
const [selectedRows, setSelectedRows] = useState(/* @__PURE__ */ new Set());
|
|
1551
1403
|
const [backendQueryParams, setBackendQueryParams] = useState({});
|
|
1552
|
-
const {
|
|
1553
|
-
|
|
1554
|
-
} = useColumns();
|
|
1555
|
-
const {
|
|
1556
|
-
pagerState,
|
|
1557
|
-
rows,
|
|
1558
|
-
onPageChange,
|
|
1559
|
-
onRowsPerPageChange,
|
|
1560
|
-
Refresh,
|
|
1561
|
-
setRows
|
|
1562
|
-
} = usePaginate({
|
|
1404
|
+
const { columns } = useColumns();
|
|
1405
|
+
const { pagerState, rows, onPageChange, onRowsPerPageChange, Refresh, setRows } = usePaginate({
|
|
1563
1406
|
endPoint: "geofences",
|
|
1564
1407
|
fireOnChangeParms: false,
|
|
1565
1408
|
fireOnFirstLoad: false,
|
|
@@ -1638,11 +1481,7 @@ function useMaster() {
|
|
|
1638
1481
|
onSelectedRowsChange(selectedRows);
|
|
1639
1482
|
updateRows(rows);
|
|
1640
1483
|
}, [rows]);
|
|
1641
|
-
const {
|
|
1642
|
-
rowActionsGetter
|
|
1643
|
-
} = useRowActionsGetter({
|
|
1644
|
-
fullRefresh
|
|
1645
|
-
});
|
|
1484
|
+
const { rowActionsGetter } = useRowActionsGetter({ fullRefresh });
|
|
1646
1485
|
return {
|
|
1647
1486
|
rowKeyGetter,
|
|
1648
1487
|
columns,
|
|
@@ -1662,17 +1501,17 @@ function useMaster() {
|
|
|
1662
1501
|
};
|
|
1663
1502
|
}
|
|
1664
1503
|
const StackGeofenceListRoot = styled(Stack)`
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1504
|
+
padding: 12px;
|
|
1505
|
+
position: relative !important;
|
|
1506
|
+
flex-grow: 1;
|
|
1507
|
+
width: 100%;
|
|
1669
1508
|
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1509
|
+
.M4LDataGrid-root {
|
|
1510
|
+
height: unset !important;
|
|
1511
|
+
flex-grow: 1;
|
|
1512
|
+
}
|
|
1674
1513
|
|
|
1675
|
-
|
|
1514
|
+
${(props) => props.theme.components?.M4LGpsToolsGeofencesList?.styleOverrides}
|
|
1676
1515
|
`;
|
|
1677
1516
|
function GeofencesList() {
|
|
1678
1517
|
const {
|
|
@@ -1692,98 +1531,118 @@ function GeofencesList() {
|
|
|
1692
1531
|
rowKeyGetter,
|
|
1693
1532
|
goToAddEdit
|
|
1694
1533
|
} = useMaster();
|
|
1695
|
-
return /* @__PURE__ */ jsxs(
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1534
|
+
return /* @__PURE__ */ jsxs(
|
|
1535
|
+
StackGeofenceListRoot,
|
|
1536
|
+
{
|
|
1537
|
+
direction: "column",
|
|
1538
|
+
gap: "8px",
|
|
1539
|
+
className: gpsToolsClasses.gpsToolsGeofencesList,
|
|
1540
|
+
children: [
|
|
1541
|
+
/* @__PURE__ */ jsx(Filter, { refresh, setBackendQueryParams }),
|
|
1542
|
+
/* @__PURE__ */ jsx(
|
|
1543
|
+
DataGrid,
|
|
1544
|
+
{
|
|
1545
|
+
id: "geofences",
|
|
1546
|
+
columns,
|
|
1547
|
+
rows,
|
|
1548
|
+
onRowsChange: setRows,
|
|
1549
|
+
checkedRows,
|
|
1550
|
+
onCheckedRowsChange,
|
|
1551
|
+
rowActionsGetter,
|
|
1552
|
+
rowKeyGetter,
|
|
1553
|
+
selectedRows,
|
|
1554
|
+
onSelectedRowsChange,
|
|
1555
|
+
withActions: true,
|
|
1556
|
+
actionsProps: {
|
|
1557
|
+
withPager: true,
|
|
1558
|
+
withLocalFilters: true,
|
|
1559
|
+
pagerOptions: {
|
|
1560
|
+
records: rows.length,
|
|
1561
|
+
totalRecords: pagerState.totalRecords,
|
|
1562
|
+
rowsPerPageOptions: [1, 2, 3, 4, 5, 10, 25],
|
|
1563
|
+
page: pagerState.page,
|
|
1564
|
+
rowsPerPage: pagerState.rowsPerPage,
|
|
1565
|
+
onPageChange,
|
|
1566
|
+
onRowsPerPageChange
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
"list"
|
|
1571
|
+
),
|
|
1572
|
+
/* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Button, { onClick: () => goToAddEdit(), children: "Agregar geocerca" }) })
|
|
1573
|
+
]
|
|
1574
|
+
}
|
|
1575
|
+
);
|
|
1734
1576
|
}
|
|
1735
1577
|
function TabsGpsTools() {
|
|
1736
|
-
const {
|
|
1737
|
-
getLabel
|
|
1738
|
-
} = useModuleDictionary();
|
|
1578
|
+
const { getLabel } = useModuleDictionary();
|
|
1739
1579
|
const status = useGpsToolsStore((state) => state.ownerState.status, shallow);
|
|
1740
1580
|
const currentTabTool = useGpsToolsStore((state) => state.currentTabGpsTool, shallow);
|
|
1741
|
-
const {
|
|
1742
|
-
setCurrentTabTool
|
|
1743
|
-
} = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
1581
|
+
const { setCurrentTabTool } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
1744
1582
|
const toolTabs = useMemo(() => {
|
|
1745
|
-
return [
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1583
|
+
return [
|
|
1584
|
+
{
|
|
1585
|
+
id: "geofences",
|
|
1586
|
+
icon: void 0,
|
|
1587
|
+
component: /* @__PURE__ */ jsx(GeofencesList, {}),
|
|
1588
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_TAB_GEO),
|
|
1589
|
+
className: gpsToolsClasses.gpsToolsGeofencesList
|
|
1590
|
+
}
|
|
1591
|
+
];
|
|
1752
1592
|
}, [getLabel]);
|
|
1753
1593
|
useLayers();
|
|
1754
1594
|
if (status !== "ready") {
|
|
1755
1595
|
return null;
|
|
1756
1596
|
}
|
|
1757
|
-
return /* @__PURE__ */ jsxs(
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1597
|
+
return /* @__PURE__ */ jsxs(
|
|
1598
|
+
DivGpsToolsRoot,
|
|
1599
|
+
{
|
|
1600
|
+
className: gpsToolsClasses.gpsToolsRoot,
|
|
1601
|
+
children: [
|
|
1602
|
+
/* @__PURE__ */ jsx(
|
|
1603
|
+
Tabs,
|
|
1604
|
+
{
|
|
1605
|
+
value: currentTabTool,
|
|
1606
|
+
scrollButtons: "auto",
|
|
1607
|
+
variant: "scrollable",
|
|
1608
|
+
allowScrollButtonsMobile: true,
|
|
1609
|
+
onChange: (_e, value) => setCurrentTabTool(value),
|
|
1610
|
+
children: toolTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
1611
|
+
Tab,
|
|
1612
|
+
{
|
|
1613
|
+
value: tab.id,
|
|
1614
|
+
icon: tab.icon,
|
|
1615
|
+
label: tab.label,
|
|
1616
|
+
className: clsx(gpsToolsClasses.gpsToolsTab, tab.className),
|
|
1617
|
+
SKTWidth: "100px",
|
|
1618
|
+
SKTHeight: "14px"
|
|
1619
|
+
},
|
|
1620
|
+
tab.id
|
|
1621
|
+
))
|
|
1622
|
+
}
|
|
1623
|
+
),
|
|
1624
|
+
toolTabs.map((tab) => {
|
|
1625
|
+
const isMatched = tab.id === currentTabTool;
|
|
1626
|
+
return /* @__PURE__ */ jsx(
|
|
1627
|
+
TabContent,
|
|
1628
|
+
{
|
|
1629
|
+
className: clsx(
|
|
1630
|
+
gpsToolsClasses.gpsToolsTabContent,
|
|
1631
|
+
tab.className,
|
|
1632
|
+
isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
|
|
1633
|
+
),
|
|
1634
|
+
children: tab.component
|
|
1635
|
+
},
|
|
1636
|
+
tab.id
|
|
1637
|
+
);
|
|
1638
|
+
})
|
|
1639
|
+
]
|
|
1640
|
+
}
|
|
1641
|
+
);
|
|
1781
1642
|
}
|
|
1782
1643
|
function GpsTools() {
|
|
1783
1644
|
const isSkeleton = useModuleSkeleton();
|
|
1784
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
1785
|
-
children: !isSkeleton && /* @__PURE__ */ jsx(TabsGpsTools, {})
|
|
1786
|
-
});
|
|
1645
|
+
return /* @__PURE__ */ jsx(Fragment, { children: !isSkeleton && /* @__PURE__ */ jsx(TabsGpsTools, {}) });
|
|
1787
1646
|
}
|
|
1788
1647
|
export {
|
|
1789
1648
|
GpsTools as G,
|