@m4l/components 0.2.35 → 0.2.36
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/assets/Logo/index.109a182d.js +38 -0
- package/components/AccountPopover/classes/types.d.ts +1 -1
- package/components/AccountPopover/index.a9dc9f92.js +332 -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.7dee7427.js +93 -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/ActionCancel/{index.416cbf9b.js → index.46f636e9.js} +5 -13
- package/components/CommonActions/components/ActionFormCancel/{index.78267f7c.js → index.2b0bd50d.js} +30 -35
- package/components/CommonActions/components/ActionFormIntro/{index.dcb4d280.js → index.4f212c39.js} +19 -26
- package/components/CommonActions/components/ActionIntro/{index.094290fd.js → index.7406bd47.js} +16 -17
- package/components/CommonActions/components/Actions/{index.fa7ab18c.js → index.273645af.js} +30 -26
- 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/formatters/ColumnBooleanFormatter/{index.cd6e553a.js → index.cee6b676.js} +11 -12
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.0c439ac3.js → index.708f3fb5.js} +4 -12
- package/components/DataGrid/formatters/ColumnDateFormatter/{index.704db1ca.js → index.e00d0cf2.js} +4 -12
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.c064bb07.js +23 -0
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/{index.925387d2.js → index.880e743b.js} +4 -9
- package/components/DataGrid/formatters/ColumnPointsFormatter/{index.4335c26b.js → index.226cc583.js} +2 -5
- package/components/DataGrid/formatters/ColumnPriceFormatter/{index.d717405e.js → index.bf9d9e60.js} +2 -5
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/{index.0b23ba88.js → index.4045b2f2.js} +13 -17
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/{index.aeea65aa.js → index.a87302d1.js} +2 -5
- package/components/DataGrid/{index.abe0f9b9.js → index.304437ee.js} +257 -319
- package/components/DataGrid/styles.d.ts +2 -0
- package/components/DataGrid/subcomponents/Actions/index.f14590d2.js +595 -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.eac1749c.js → index.3f0d9e28.js} +26 -25
- 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.a9f25040.js +480 -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 +112 -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.48d809e2.js +2086 -0
- package/components/DynamicFilter/index.d.ts +1 -2
- 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.2622ee40.js +54 -0
- package/components/FieldLabel/styles.d.ts +2 -0
- package/components/GridLayout/{index.65470f01.js → index.b9c47a4c.js} +516 -468
- package/components/GridLayout/styles.d.ts +2 -0
- package/components/GridLayout/subcomponents/Griditem/index.69bc14e5.js +397 -0
- package/components/GridLayout/subcomponents/Responsive/{index.5b3e0521.js → index.094c1d09.js} +50 -31
- package/components/GridLayout/subcomponents/SizeProvider/{index.0328ad0a.js → index.e1d2df80.js} +34 -31
- package/components/HelperText/{index.7d2afdb3.js → index.81c5d349.js} +12 -21
- package/components/HelperText/styles.d.ts +2 -0
- package/components/Icon/{index.ad330e78.js → index.ee7b85c9.js} +67 -59
- package/components/Icon/styles.d.ts +4 -0
- package/components/Image/{index.b799c514.js → index.8cc036b1.js} +40 -75
- 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.72f316fc.js +187 -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.c46da124.js → index.2ecd571e.js} +31 -19
- package/components/LinearProgressIndeterminate/styles.d.ts +2 -0
- package/components/Loadable/{index.e994fc3e.js → index.97fe63f9.js} +3 -8
- package/components/LoadingError/classes/types.d.ts +1 -1
- package/components/LoadingError/{index.ee29dd48.js → index.7aaba1cf.js} +30 -47
- 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.40c419c0.js} +53 -69
- package/components/MFLoader/styles.d.ts +2 -0
- package/components/MFLoader/types.d.ts +4 -4
- package/components/ModalDialog/index.42349189.js +77 -0
- package/components/NavLink/{index.b75c91e1.js → index.9e847eb5.js} +21 -25
- 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.5a8160fd.js} +17 -43
- package/components/NoItemSelected/styles.d.ts +5 -0
- package/components/ObjectLogs/index.6955149e.js +253 -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.47bb0928.js} +7 -18
- package/components/PDFViewer/styles.d.ts +2 -0
- package/components/Page/index.c1d4a319.js +114 -0
- package/components/PaperForm/classes/types.d.ts +1 -1
- package/components/PaperForm/{index.d08b43f6.js → index.9f6fd02d.js} +20 -63
- 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.3f89d8a4.js → index.c6d1a95a.js} +108 -125
- package/components/Period/styles.d.ts +7 -0
- package/components/PrintingSystem/classes/types.d.ts +1 -1
- package/components/PrintingSystem/{index.27f1f209.js → index.f51a00f8.js} +45 -57
- package/components/PrintingSystem/styles.d.ts +2 -0
- package/components/PrintingSystem/subcomponents/BodyNode/index.6792c353.js +49 -0
- package/components/PrintingSystem/subcomponents/BodyNode/types.d.ts +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.990e164c.js → index.eec6b4cd.js} +28 -32
- package/components/PrintingSystem/subcomponents/ChartNode/types.d.ts +1 -2
- package/components/PrintingSystem/subcomponents/DividerNode/index.e58467c9.js +20 -0
- package/components/PrintingSystem/subcomponents/DividerNode/types.d.ts +2 -3
- package/components/PrintingSystem/subcomponents/FooterNode/index.920b75c9.js +49 -0
- package/components/PrintingSystem/subcomponents/FooterNode/types.d.ts +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/index.6c1ad53c.js +70 -0
- package/components/PrintingSystem/subcomponents/GridNode/types.d.ts +2 -2
- package/components/PrintingSystem/subcomponents/HeaderNode/index.e8b151ad.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.bf199422.js +30 -0
- package/components/PrintingSystem/subcomponents/PaperNode/types.d.ts +2 -2
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index.44d436b9.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.879cf13d.js +49 -0
- package/components/PrintingSystem/subcomponents/SectionNode/types.d.ts +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/index.eb6af0ca.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.5e59580c.js +264 -0
- package/components/PropertyValue/styles.d.ts +2 -0
- package/components/Resizeable/{index.cb5aad75.js → index.5e8e48b1.js} +16 -23
- package/components/ResizeableWindow/styles.d.ts +5 -0
- package/components/ScrollBar/classes/types.d.ts +1 -1
- package/components/ScrollBar/{index.7dfc2f29.js → index.4b965665.js} +31 -51
- package/components/ScrollBar/styles.d.ts +9 -0
- package/components/SideBar/context/sideBarContext/index.d.ts +4 -4
- package/components/SideBar/index.5d1f4a23.js +851 -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 +22 -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.15756f0f.js} +40 -29
- 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.dbd78941.js} +14 -30
- 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.1a83615a.js} +25 -39
- 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.7fab43c8.js → index.76d7ea70.js} +4 -12
- package/components/animate/PropagateLoader/syles.d.ts +2 -0
- package/components/animate/{index.5d4575bc.js → index.87296638.js} +35 -56
- package/components/areas/components/AreasAdmin/index.f239c717.js +733 -0
- 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/index.61e0538b.js +1071 -0
- 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/contexts/AreasContext/{index.c5a3b322.js → index.19c7b906.js} +32 -77
- package/components/areas/contexts/DynamicMFParmsContext/{index.1607c78e.js → index.3d9ad0ad.js} +3 -9
- package/components/areas/contexts/DynamicMFParmsContext/types.d.ts +2 -2
- package/components/areas/contexts/WindowToolsMFContext/{index.8f3e2a04.js → index.992ae7a3.js} +3 -11
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +29 -29
- package/components/areas/hooks/useAreas/{index.caa92660.js → index.cedd30ee.js} +1 -1
- package/components/areas/hooks/useDynamicMFParameters/{index.e52c5392.js → index.9e09e1e3.js} +2 -4
- package/components/areas/hooks/useWindowToolsMF/{index.b7afaf88.js → index.2fbae9dc.js} +1 -1
- package/components/areas/types.d.ts +17 -17
- package/components/commercial/AppBarCommercial/classes/types.d.ts +1 -1
- package/components/commercial/AppBarCommercial/{index.9cf586a2.js → index.9f654f8e.js} +10 -12
- 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/{index.4dbfc0a7.js → index.3df4685b.js} +28 -19
- package/components/commercial/SectionCommercial/styles.d.ts +11 -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/index.7aeb6ec0.js +234 -0
- 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/commercial/{index.89ad149c.js → index.b90488db.js} +40 -38
- package/components/formatters/BooleanFormatter/{index.9ccf9298.js → index.0c2d8e35.js} +20 -30
- package/components/formatters/DateFormatter/{index.578a9f53.js → index.2ef6f261.js} +5 -14
- package/components/formatters/FormatterRoot/styles.d.ts +2 -0
- package/components/formatters/FormatterRoot/types.d.ts +1 -1
- package/components/formatters/PointsFormatter/{index.8a4fa393.js → index.d8a4ee54.js} +4 -11
- package/components/formatters/PriceFormatter/{index.83cbe7be.js → index.97f75b4b.js} +5 -13
- package/components/formatters/UncertaintyFormatter/{index.08e1b79f.js → index.c3ffdebc.js} +8 -13
- package/components/formatters/{index.03471e3f.js → index.b816c6b6.js} +11 -34
- package/components/hook-form/HelperError/index.c8b046b7.js +19 -0
- package/components/hook-form/RHFAutocomplete/index.ea2ac2b1.js +408 -0
- 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/{index.bc278965.js → index.98dcf0de.js} +47 -45
- 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/index.c32278fa.js +142 -0
- package/components/hook-form/RHFCheckbox/styles.d.ts +15 -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/index.8c939bfd.js +191 -0
- 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/index.ac27deab.js +190 -0
- package/components/hook-form/RHFDateTime/styles.d.ts +2 -0
- package/components/hook-form/RHFDateTime/types.d.ts +1 -1
- package/components/hook-form/RHFMultiCheckbox/index.437e6ba3.js +34 -0
- package/components/hook-form/RHFPeriod/classes/types.d.ts +1 -1
- package/components/hook-form/RHFPeriod/index.70cfc422.js +104 -0
- package/components/hook-form/RHFPeriod/styles.d.ts +2 -0
- package/components/hook-form/RHFRadioGroup/index.11c0add8.js +35 -0
- package/components/hook-form/RHFRadioGroup/types.d.ts +1 -1
- package/components/hook-form/RHFSelect/index.c6c60ecc.js +29 -0
- package/components/hook-form/RHFTextField/index.fa97889a.js +325 -0
- 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/hook-form/RHFUpload/index.c5e5c61c.js +258 -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.4ea69dd1.js} +748 -767
- 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 +11 -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.accb1f77.js → index.62b7d09b.js} +731 -770
- 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/{index.34ab6a68.js → index.13bb982c.js} +1 -1
- package/components/maps/index.d.ts +2 -2
- package/components/maps/leaflet-geoman.d.ts +1476 -1633
- package/components/modal/WindowBase.2414cd02.js +44 -0
- package/components/modal/WindowConfirm/types.d.ts +4 -4
- package/components/modal/WindowConfirm.48140481.js +66 -0
- package/components/modal/classes/types.d.ts +1 -1
- package/components/modal/{index.61389369.js → index.81eb6def.js} +7 -1
- package/components/mui_extended/Accordion/classes/types.d.ts +1 -1
- package/components/mui_extended/Accordion/index.d08a0361.js +142 -0
- 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/{index.75e6ed57.js → index.fb9ad158.js} +26 -34
- 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/{index.09f5aee5.js → index.2a3aef2c.js} +10 -16
- package/components/mui_extended/Badge/styles.d.ts +2 -0
- package/components/mui_extended/Badge/types.d.ts +1 -1
- package/components/mui_extended/BoxIcon/index.d61e7ac5.js +22 -0
- package/components/mui_extended/Breadcrumbs/index.4a44883c.js +87 -0
- package/components/mui_extended/Button/classes/types.d.ts +2 -2
- package/components/mui_extended/Button/{index.c3084916.js → index.5395d101.js} +71 -79
- package/components/mui_extended/Button/styles.d.ts +13 -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/{CheckBox.2a3b86c5.js → CheckBox.256169f0.js} +23 -33
- package/components/mui_extended/CircularProgress/{index.ad569afd.js → index.967e70b7.js} +2 -4
- package/components/mui_extended/IconButton/{index.f8a3021b.js → index.b0ee4965.js} +42 -48
- 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/LinearProgress/{index.c92b9ba9.js → index.4092bb69.js} +3 -7
- package/components/mui_extended/LinkWithRoute/index.288c51f3.js +15 -0
- 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/{index.90f53670.js → index.d92ed0d6.js} +68 -68
- package/components/mui_extended/MenuActions/styles.d.ts +30 -0
- package/components/mui_extended/Pager/classes/types.d.ts +1 -1
- package/components/mui_extended/Pager/{index.ea2a4f3e.js → index.1ba2d52b.js} +114 -112
- 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/index.4e7340b4.js +142 -0
- 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/{index.0e53197c.js → index.fe363ca5.js} +3 -11
- package/components/mui_extended/Stack/styles.d.ts +11 -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/{index.9214d9cc.js → index.c5ad86e2.js} +41 -63
- 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 +59 -0
- package/components/mui_extended/ToggleButton/ToggleButton.d.ts +1 -1
- package/components/mui_extended/ToggleButton/index.7fbc8614.js +18 -0
- package/components/mui_extended/ToggleIconButton/ToggleIconButton.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/{index.d9dbf650.js → index.0cd347b4.js} +13 -8
- 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/{index.24a2bc3f.js → index.49bb5ee1.js} +12 -15
- package/components/mui_extended/Tooltip/types.d.ts +3 -3
- package/components/mui_extended/Typography/{index.379dd374.js → index.a1e774a2.js} +12 -26
- 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.8fb6232a.js} +12 -26
- package/components/popups/PopupsViewer/index.813854e4.js +171 -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.45c275cd.js} +18 -19
- package/contexts/RHFormContext/classes/types.d.ts +1 -1
- package/contexts/RHFormContext/{index.7b2a8723.js → index.bf3a2812.js} +14 -20
- 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.000ce60b.js → index.9b27ca02.js} +37 -41
- package/hooks/useFormFocus/index.d.ts +2 -2
- package/hooks/useFormFocus/types.d.ts +1 -1
- package/hooks/useModal/{index.f73d7e42.js → index.30674bb7.js} +1 -1
- package/hooks/useSizeContainer/{index.62b4e0c4.js → index.3c48670c.js} +1 -1
- package/hooks/useTab/{index.976d5e1e.js → index.f7973779.js} +1 -1
- package/index.d.ts +2 -1
- package/index.js +136 -136
- package/package.json +11 -1
- package/{react-draggable.e4725f3a.js → react-draggable.79b4c69a.js} +1 -1
- package/{react-resizable.c07d63fb.js → react-resizable.af1f31c1.js} +2 -2
- package/styles/DynamicFilter.styles.d.ts +2 -0
- package/test/getNameDataTestId.0faeade8.js +10 -0
- package/test/getNameDataTestId.d.ts +10 -0
- package/utils/containerQuery.d.ts +2 -0
- package/utils/{index.6469f148.js → index.0718eeac.js} +4 -0
- package/utils/index.d.ts +1 -1
- package/vite-env.d.ts +4 -4
- package/assets/Logo/index.228dcb5a.js +0 -93
- package/components/AccountPopover/index.39efc8f0.js +0 -302
- package/components/AppBar/index.c8850b99.js +0 -109
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.867b8745.js +0 -26
- package/components/DataGrid/subcomponents/Actions/index.4f2071ee.js +0 -663
- 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/LanguagePopover/index.93c48ec5.js +0 -196
- package/components/ModalDialog/index.78c9650a.js +0 -92
- package/components/ObjectLogs/index.1d85a021.js +0 -293
- package/components/Page/index.5d34dc4d.js +0 -127
- 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/areas/components/AreasAdmin/index.820a00ab.js +0 -737
- package/components/areas/components/AreasViewer/index.6d7194e2.js +0 -1086
- package/components/commercial/TopBar/index.93a7d26a.js +0 -275
- package/components/hook-form/HelperError/index.66bbcac3.js +0 -30
- package/components/hook-form/RHFAutocomplete/index.1f2afb6b.js +0 -429
- 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/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/BoxIcon/index.e638ecc8.js +0 -22
- package/components/mui_extended/Breadcrumbs/index.5e37d903.js +0 -94
- package/components/mui_extended/LinkWithRoute/index.16436ab8.js +0 -30
- package/components/mui_extended/Popover/index.d85de73b.js +0 -179
- package/components/mui_extended/ToggleButton/index.191711f3.js +0 -19
- package/components/popups/PopupsViewer/index.1500ce72.js +0 -186
- 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,45 @@
|
|
|
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 { u as useMapStore, C as CommonFeatureRender, M as MAP_ZINDEX_OVER_MAP, b as MAP_DICCTIONARY } from "../Map/index.
|
|
4
|
+
import { u as useMapStore, C as CommonFeatureRender, M as MAP_ZINDEX_OVER_MAP, b as MAP_DICCTIONARY } from "../Map/index.62b7d09b.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 { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
11
11
|
import "@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css";
|
|
12
12
|
import "@geoman-io/leaflet-geoman-free";
|
|
13
13
|
import { styled } from "@mui/material/styles";
|
|
14
14
|
import { generateUtilityClasses } from "@mui/material";
|
|
15
15
|
import "@mui/base";
|
|
16
16
|
import clsx from "clsx";
|
|
17
|
-
import { D as DynamicFilter } from "../../../DynamicFilter/index.
|
|
18
|
-
import { C as ColumnDateFormatter } from "../../../DataGrid/formatters/ColumnDateFormatter/index.
|
|
17
|
+
import { D as DynamicFilter } from "../../../DynamicFilter/index.48d809e2.js";
|
|
18
|
+
import { C as ColumnDateFormatter } from "../../../DataGrid/formatters/ColumnDateFormatter/index.e00d0cf2.js";
|
|
19
19
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
20
|
-
import { H as HelperError } from "../../../hook-form/HelperError/index.
|
|
21
|
-
import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.
|
|
22
|
-
import { A as ActionFormIntro } from "../../../CommonActions/components/ActionFormIntro/index.
|
|
23
|
-
import { A as Actions } from "../../../CommonActions/components/Actions/index.
|
|
24
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
20
|
+
import { H as HelperError } from "../../../hook-form/HelperError/index.c8b046b7.js";
|
|
21
|
+
import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.8fb6232a.js";
|
|
22
|
+
import { A as ActionFormIntro } from "../../../CommonActions/components/ActionFormIntro/index.4f212c39.js";
|
|
23
|
+
import { A as Actions } from "../../../CommonActions/components/Actions/index.273645af.js";
|
|
24
|
+
import { B as Button } from "../../../mui_extended/Button/index.5395d101.js";
|
|
25
25
|
import { useMap } from "react-leaflet";
|
|
26
26
|
import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index.f60f500e.js";
|
|
27
27
|
import * as L from "leaflet";
|
|
28
|
-
import { u as useTab } from "../../../../hooks/useTab/index.
|
|
29
|
-
import { P as PaperForm } from "../../../PaperForm/index.
|
|
30
|
-
import { R as RHFAutocomplete } from "../../../hook-form/RHFAutocomplete/index.
|
|
31
|
-
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.
|
|
32
|
-
import { S as Stack } from "../../../mui_extended/Stack/index.
|
|
33
|
-
import { P as PropertyValue } from "../../../PropertyValue/index.
|
|
34
|
-
import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index.
|
|
35
|
-
import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index.
|
|
36
|
-
import { T as Tooltip } from "../../../mui_extended/Tooltip/index.
|
|
28
|
+
import { u as useTab } from "../../../../hooks/useTab/index.f7973779.js";
|
|
29
|
+
import { P as PaperForm } from "../../../PaperForm/index.9f6fd02d.js";
|
|
30
|
+
import { R as RHFAutocomplete } from "../../../hook-form/RHFAutocomplete/index.ea2ac2b1.js";
|
|
31
|
+
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.fa97889a.js";
|
|
32
|
+
import { S as Stack } from "../../../mui_extended/Stack/index.fe363ca5.js";
|
|
33
|
+
import { P as PropertyValue } from "../../../PropertyValue/index.5e59580c.js";
|
|
34
|
+
import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index.8c939bfd.js";
|
|
35
|
+
import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index.c5ad86e2.js";
|
|
36
|
+
import { T as Tooltip } from "../../../mui_extended/Tooltip/index.49bb5ee1.js";
|
|
37
37
|
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.
|
|
38
|
+
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.bf3a2812.js";
|
|
39
|
+
import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.9b27ca02.js";
|
|
40
|
+
import { u as useModal } from "../../../../hooks/useModal/index.30674bb7.js";
|
|
41
|
+
import { W as WindowConfirm } from "../../../modal/WindowConfirm.48140481.js";
|
|
42
|
+
import { c as DataGrid } from "../../../DataGrid/index.304437ee.js";
|
|
43
43
|
enableMapSet();
|
|
44
44
|
const createGpsToolsStore = (initProps) => {
|
|
45
45
|
const startProps = {
|
|
@@ -92,7 +92,10 @@ const createGpsToolsStore = (initProps) => {
|
|
|
92
92
|
},
|
|
93
93
|
updatePartialGeofence: (geofenceId, geofence) => {
|
|
94
94
|
set((state) => {
|
|
95
|
-
state.geofenceState.hashGeofences[geofenceId] = {
|
|
95
|
+
state.geofenceState.hashGeofences[geofenceId] = {
|
|
96
|
+
...state.geofenceState.hashGeofences[geofenceId],
|
|
97
|
+
...geofence
|
|
98
|
+
};
|
|
96
99
|
});
|
|
97
100
|
},
|
|
98
101
|
updateRows: (newRows) => {
|
|
@@ -135,12 +138,8 @@ const createGpsToolsStore = (initProps) => {
|
|
|
135
138
|
};
|
|
136
139
|
const GpsToolsContext = createContext(null);
|
|
137
140
|
function GpsToolsProvider(props) {
|
|
138
|
-
const {
|
|
139
|
-
|
|
140
|
-
} = props;
|
|
141
|
-
const {
|
|
142
|
-
getLabel
|
|
143
|
-
} = useModuleDictionary();
|
|
141
|
+
const { children } = props;
|
|
142
|
+
const { getLabel } = useModuleDictionary();
|
|
144
143
|
const isDesktop = useResponsiveDesktop();
|
|
145
144
|
const isSkeleton = useModuleSkeleton();
|
|
146
145
|
const isFirstRender = useFirstRender([getLabel]);
|
|
@@ -156,10 +155,11 @@ function GpsToolsProvider(props) {
|
|
|
156
155
|
}
|
|
157
156
|
});
|
|
158
157
|
}
|
|
159
|
-
const {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
const { setHandlerGetLabel, setExternalState } = useStore(
|
|
159
|
+
mapStoreRef.current,
|
|
160
|
+
(state) => state.gpsToolsActions,
|
|
161
|
+
shallow
|
|
162
|
+
);
|
|
163
163
|
useEffect(() => {
|
|
164
164
|
if (!isFirstRender) {
|
|
165
165
|
setHandlerGetLabel(getLabel);
|
|
@@ -169,15 +169,9 @@ function GpsToolsProvider(props) {
|
|
|
169
169
|
if (isFirstRender) {
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
setExternalState({
|
|
173
|
-
isMobile: !isDesktop,
|
|
174
|
-
isSkeleton
|
|
175
|
-
});
|
|
172
|
+
setExternalState({ isMobile: !isDesktop, isSkeleton });
|
|
176
173
|
}, [isDesktop, isSkeleton]);
|
|
177
|
-
return /* @__PURE__ */ jsx(GpsToolsContext.Provider, {
|
|
178
|
-
value: mapStoreRef.current,
|
|
179
|
-
children
|
|
180
|
-
});
|
|
174
|
+
return /* @__PURE__ */ jsx(GpsToolsContext.Provider, { value: mapStoreRef.current, children });
|
|
181
175
|
}
|
|
182
176
|
function useGpsToolsStore(selector, equalityFn) {
|
|
183
177
|
const context = useContext(GpsToolsContext);
|
|
@@ -194,13 +188,8 @@ var GeofencesFeaturesLayers = /* @__PURE__ */ ((GeofencesFeaturesLayers2) => {
|
|
|
194
188
|
return GeofencesFeaturesLayers2;
|
|
195
189
|
})(GeofencesFeaturesLayers || {});
|
|
196
190
|
function useLayers() {
|
|
197
|
-
const {
|
|
198
|
-
|
|
199
|
-
removeLayer
|
|
200
|
-
} = useMapStore((state) => state.mapActions, shallow);
|
|
201
|
-
const {
|
|
202
|
-
init
|
|
203
|
-
} = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
191
|
+
const { addLayer, removeLayer } = useMapStore((state) => state.mapActions, shallow);
|
|
192
|
+
const { init } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
204
193
|
useEffect(() => {
|
|
205
194
|
addLayer({
|
|
206
195
|
layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES,
|
|
@@ -323,34 +312,29 @@ const gpsToolsClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
|
323
312
|
"hidden"
|
|
324
313
|
]);
|
|
325
314
|
const DivGpsToolsRoot = styled("div")`
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
z-index:${MAP_ZINDEX_OVER_MAP};
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
.${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
|
|
338
|
-
display:none;
|
|
339
|
-
}
|
|
340
|
-
|
|
315
|
+
position: relative;
|
|
316
|
+
display: flex;
|
|
317
|
+
flex-direction: column;
|
|
318
|
+
flex-grow: 1;
|
|
319
|
+
width: 100%;
|
|
320
|
+
height: 100%;
|
|
341
321
|
|
|
342
|
-
|
|
343
|
-
height:unset!important;
|
|
344
|
-
flex-grow:1;
|
|
345
|
-
}
|
|
322
|
+
z-index: ${MAP_ZINDEX_OVER_MAP};
|
|
346
323
|
|
|
324
|
+
.${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
|
|
325
|
+
display: none;
|
|
326
|
+
}
|
|
347
327
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
328
|
+
.${gpsToolsClasses.gpsToolsGeofencesList} .M4LDataGrid-root {
|
|
329
|
+
height: unset !important;
|
|
330
|
+
flex-grow: 1;
|
|
331
|
+
}
|
|
351
332
|
|
|
333
|
+
.${gpsToolsClasses.toolGeofencesAddEditGeneral} {
|
|
334
|
+
flex-grow: 1;
|
|
335
|
+
}
|
|
352
336
|
|
|
353
|
-
|
|
337
|
+
${(props) => props.theme.components?.M4LGpsTools?.styleOverrides}
|
|
354
338
|
`;
|
|
355
339
|
const GPSTOOLSICONS = {
|
|
356
340
|
GEOMETRY_CIRCLE: "geometry_circle.svg",
|
|
@@ -368,14 +352,8 @@ const GPSTOOLSICONS = {
|
|
|
368
352
|
NAME: "name.svg"
|
|
369
353
|
};
|
|
370
354
|
function Filter(props) {
|
|
371
|
-
const {
|
|
372
|
-
|
|
373
|
-
setBackendQueryParams
|
|
374
|
-
} = props;
|
|
375
|
-
const {
|
|
376
|
-
host_static_assets,
|
|
377
|
-
environment_assets
|
|
378
|
-
} = useEnvironment();
|
|
355
|
+
const { refresh, setBackendQueryParams } = props;
|
|
356
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
379
357
|
const [initialFilter] = useState(() => {
|
|
380
358
|
return [];
|
|
381
359
|
});
|
|
@@ -385,88 +363,84 @@ function Filter(props) {
|
|
|
385
363
|
});
|
|
386
364
|
refresh();
|
|
387
365
|
};
|
|
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(() => [
|
|
414
|
-
{
|
|
415
|
-
key: "id",
|
|
416
|
-
name: getLabel(MAP_DICCTIONARY.LABEL_ID),
|
|
417
|
-
type: "number",
|
|
418
|
-
width: 40,
|
|
419
|
-
visible: false
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
key: "name",
|
|
423
|
-
name: getLabel(MAP_DICCTIONARY.LABEL_NAME),
|
|
424
|
-
type: "string",
|
|
425
|
-
width: 300
|
|
426
|
-
},
|
|
366
|
+
return /* @__PURE__ */ jsx(
|
|
367
|
+
DynamicFilter,
|
|
427
368
|
{
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
369
|
+
withAllField: true,
|
|
370
|
+
onChangeFilters: onChangeFilter,
|
|
371
|
+
fields: [
|
|
372
|
+
{
|
|
373
|
+
name: "id",
|
|
374
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_ID,
|
|
375
|
+
type: "number",
|
|
376
|
+
multiple: true,
|
|
377
|
+
presence: "optional",
|
|
378
|
+
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.ACTIVE}`
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: "name",
|
|
382
|
+
dictionaryId: MAP_DICCTIONARY.LABEL_NAME,
|
|
383
|
+
type: "string",
|
|
384
|
+
multiple: true,
|
|
385
|
+
presence: "optional",
|
|
386
|
+
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${GPSTOOLSICONS.NAME}`
|
|
387
|
+
}
|
|
388
|
+
],
|
|
389
|
+
initialAppliedFilters: initialFilter
|
|
446
390
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
};
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
function useColumns(_props) {
|
|
394
|
+
const { getLabel } = useModuleDictionary();
|
|
395
|
+
const columns = useMemo(
|
|
396
|
+
() => [
|
|
397
|
+
{
|
|
398
|
+
key: "id",
|
|
399
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_ID),
|
|
400
|
+
type: "number",
|
|
401
|
+
width: 40,
|
|
402
|
+
visible: false
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
key: "name",
|
|
406
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_NAME),
|
|
407
|
+
type: "string",
|
|
408
|
+
width: 300
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
key: "created_at",
|
|
412
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_CREATED_AT),
|
|
413
|
+
type: "date",
|
|
414
|
+
formatter: ColumnDateFormatter({
|
|
415
|
+
presentationType: "datetime",
|
|
416
|
+
fieldValue: "row.created_at"
|
|
417
|
+
}),
|
|
418
|
+
visible: false
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
key: "updated_at",
|
|
422
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_UPDATED_AT),
|
|
423
|
+
type: "date",
|
|
424
|
+
formatter: ColumnDateFormatter({
|
|
425
|
+
presentationType: "datetime",
|
|
426
|
+
fieldValue: "row.updated_at"
|
|
427
|
+
}),
|
|
428
|
+
visible: false
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
[getLabel]
|
|
432
|
+
);
|
|
433
|
+
return { columns };
|
|
451
434
|
}
|
|
452
435
|
function MyActions(props) {
|
|
453
|
-
const {
|
|
454
|
-
|
|
455
|
-
} = props;
|
|
456
|
-
const {
|
|
457
|
-
control
|
|
458
|
-
} = useFormContext();
|
|
436
|
+
const { geofenceId } = props;
|
|
437
|
+
const { control } = useFormContext();
|
|
459
438
|
const inEdition = useWatch({
|
|
460
439
|
control,
|
|
461
440
|
name: "inEdition"
|
|
462
441
|
});
|
|
463
|
-
const {
|
|
464
|
-
|
|
465
|
-
showPopup
|
|
466
|
-
} = usePopupsStore((state) => state.popupsActions);
|
|
467
|
-
const {
|
|
468
|
-
addCheckedGeofence
|
|
469
|
-
} = useGpsToolsStore((state) => state.geofenceActions);
|
|
442
|
+
const { closePopup, showPopup } = usePopupsStore((state) => state.popupsActions);
|
|
443
|
+
const { addCheckedGeofence } = useGpsToolsStore((state) => state.geofenceActions);
|
|
470
444
|
const onClickCancel = () => {
|
|
471
445
|
closePopup("geofencesAddEdit");
|
|
472
446
|
if (geofenceId !== void 0) {
|
|
@@ -474,17 +448,11 @@ function MyActions(props) {
|
|
|
474
448
|
}
|
|
475
449
|
showPopup("gpsTools");
|
|
476
450
|
};
|
|
477
|
-
return /* @__PURE__ */ jsxs(Actions, {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
disabled: inEdition,
|
|
483
|
-
children: "Cancelar"
|
|
484
|
-
}), /* @__PURE__ */ jsx(ActionFormIntro, {
|
|
485
|
-
disabled: inEdition
|
|
486
|
-
})]
|
|
487
|
-
});
|
|
451
|
+
return /* @__PURE__ */ jsxs(Actions, { children: [
|
|
452
|
+
/* @__PURE__ */ jsx(HelperError, { name: "geometry" }),
|
|
453
|
+
/* @__PURE__ */ jsx(Button, { onClick: onClickCancel, disabled: inEdition, children: "Cancelar" }),
|
|
454
|
+
/* @__PURE__ */ jsx(ActionFormIntro, { disabled: inEdition })
|
|
455
|
+
] });
|
|
488
456
|
}
|
|
489
457
|
const STROKE_COLOR_DEFAULT = "#aaccaa";
|
|
490
458
|
const STROKE_OPACITY_DEFAULT = { value: 1, label: "100%" };
|
|
@@ -531,7 +499,6 @@ const formatDataEnpoint = (response) => {
|
|
|
531
499
|
fillOpacity: FILL_OPACITY_DEFAULT
|
|
532
500
|
}
|
|
533
501
|
};
|
|
534
|
-
console.log("formatDataEnpoint", obRet);
|
|
535
502
|
if (obRet.geofenceType?.id === "gt_circle") {
|
|
536
503
|
if (data.properties.radius) {
|
|
537
504
|
obRet.properties.radius = data.properties.radius;
|
|
@@ -549,30 +516,32 @@ const formatDataEnpoint = (response) => {
|
|
|
549
516
|
const getLayerFromGeometry = (geometry, geofenceTypeId, radius, options) => {
|
|
550
517
|
if (geometry) {
|
|
551
518
|
if (geofenceTypeId === "gt_circle" && geometry.type === "Point") {
|
|
552
|
-
return L.circle(
|
|
519
|
+
return L.circle(
|
|
520
|
+
[geometry.coordinates[1], geometry.coordinates[0]],
|
|
521
|
+
radius || 0,
|
|
522
|
+
options
|
|
523
|
+
);
|
|
553
524
|
} else if (geofenceTypeId === "gt_polygon" && geometry.type === "Polygon") {
|
|
554
525
|
const coordinates = geometry.coordinates.map(
|
|
555
526
|
(ring) => ring.map((position) => [position[1], position[0]])
|
|
556
527
|
);
|
|
557
528
|
return L.polygon(coordinates, options);
|
|
558
529
|
} 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
|
-
}
|
|
530
|
+
const latLngs = geometry.coordinates[0].map(
|
|
531
|
+
(coord) => [coord[1], coord[0]]
|
|
567
532
|
);
|
|
568
|
-
const
|
|
569
|
-
(coord)
|
|
570
|
-
|
|
571
|
-
return coord[1];
|
|
572
|
-
}
|
|
573
|
-
return 0;
|
|
533
|
+
const lats = latLngs.map((coord) => {
|
|
534
|
+
if (Array.isArray(coord)) {
|
|
535
|
+
return coord[0];
|
|
574
536
|
}
|
|
575
|
-
|
|
537
|
+
return 0;
|
|
538
|
+
});
|
|
539
|
+
const lngs = latLngs.map((coord) => {
|
|
540
|
+
if (Array.isArray(coord)) {
|
|
541
|
+
return coord[1];
|
|
542
|
+
}
|
|
543
|
+
return 0;
|
|
544
|
+
});
|
|
576
545
|
const southWest = [Math.min(...lats), Math.min(...lngs)];
|
|
577
546
|
const northEast = [Math.max(...lats), Math.max(...lngs)];
|
|
578
547
|
return L.rectangle([southWest, northEast], options);
|
|
@@ -615,14 +584,6 @@ function useDrawing() {
|
|
|
615
584
|
const [geometrTypeIdCached, setgeofenceTypeIdCached] = useState(geofenceTypeId);
|
|
616
585
|
useEffect(() => {
|
|
617
586
|
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
587
|
currentLayer.current = getLayerFromGeometry(geometry, geofenceTypeId, radius, {
|
|
627
588
|
color: strokeColor,
|
|
628
589
|
opacity: strokeOpacity,
|
|
@@ -683,17 +644,15 @@ function useDrawing() {
|
|
|
683
644
|
if (shape === "Circle") {
|
|
684
645
|
map.on("pm:drawstart", ({ workingLayer }) => {
|
|
685
646
|
workingLayer.on("pm:centerplaced", (e) => {
|
|
686
|
-
|
|
687
|
-
layer.setStyle(
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
}
|
|
696
|
-
);
|
|
647
|
+
const layer = e.workingLayer;
|
|
648
|
+
layer.setStyle({
|
|
649
|
+
color: strokeColor,
|
|
650
|
+
opacity: strokeOpacity,
|
|
651
|
+
weight: strokeWeight,
|
|
652
|
+
dashArray: strokeDashArray,
|
|
653
|
+
fillColor,
|
|
654
|
+
fillOpacity
|
|
655
|
+
});
|
|
697
656
|
setValue("lat", layer.getLatLng().lat);
|
|
698
657
|
setValue("lng", layer.getLatLng().lng);
|
|
699
658
|
layer.on("pm:change", (_e) => {
|
|
@@ -705,31 +664,27 @@ function useDrawing() {
|
|
|
705
664
|
} else if (shape === "Polygon") {
|
|
706
665
|
map.on("pm:drawstart", ({ workingLayer }) => {
|
|
707
666
|
workingLayer.on("pm:vertexadded", (e) => {
|
|
708
|
-
|
|
709
|
-
layer.setStyle(
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
}
|
|
718
|
-
);
|
|
667
|
+
const layer = e.workingLayer;
|
|
668
|
+
layer.setStyle({
|
|
669
|
+
color: strokeColor,
|
|
670
|
+
opacity: strokeOpacity,
|
|
671
|
+
weight: strokeWeight,
|
|
672
|
+
dashArray: strokeDashArray,
|
|
673
|
+
fillColor,
|
|
674
|
+
fillOpacity
|
|
675
|
+
});
|
|
719
676
|
});
|
|
720
677
|
});
|
|
721
678
|
}
|
|
722
679
|
map.pm.enableDraw(shape);
|
|
723
|
-
map.pm.setPathOptions(
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
}
|
|
732
|
-
);
|
|
680
|
+
map.pm.setPathOptions({
|
|
681
|
+
color: strokeColor,
|
|
682
|
+
opacity: strokeOpacity,
|
|
683
|
+
weight: strokeWeight,
|
|
684
|
+
dashArray: strokeDashArray,
|
|
685
|
+
fillColor,
|
|
686
|
+
fillOpacity
|
|
687
|
+
});
|
|
733
688
|
map.on("pm:create", (e) => {
|
|
734
689
|
currentLayer.current = e.layer;
|
|
735
690
|
setValue("geometry", currentLayer.current.toGeoJSON()?.geometry, {
|
|
@@ -744,7 +699,6 @@ function useDrawing() {
|
|
|
744
699
|
setValue("inEdition", true);
|
|
745
700
|
currentLayer.current.on("pm:disable", (e) => {
|
|
746
701
|
currentLayer.current = e.layer;
|
|
747
|
-
console.log("Geometr\xEDa editada **", currentLayer.current.toGeoJSON());
|
|
748
702
|
setValue("geometry", currentLayer.current.toGeoJSON()?.geometry, {
|
|
749
703
|
shouldTouch: false,
|
|
750
704
|
shouldValidate: true
|
|
@@ -807,10 +761,16 @@ function useSumbitErrorsFocus() {
|
|
|
807
761
|
if (isSubmitted) {
|
|
808
762
|
const firstError = Object.keys(errors).reduce((field, a) => {
|
|
809
763
|
const fieldKey = field;
|
|
810
|
-
return
|
|
764
|
+
return errors[fieldKey] ? fieldKey : a;
|
|
811
765
|
}, null);
|
|
812
766
|
if (firstError) {
|
|
813
|
-
|
|
767
|
+
const found = [
|
|
768
|
+
"name",
|
|
769
|
+
"geometry",
|
|
770
|
+
"geofenceType",
|
|
771
|
+
"timeMinInSeconds",
|
|
772
|
+
"timeMinOutSeconds"
|
|
773
|
+
].some((field) => field.includes(firstError));
|
|
814
774
|
if (found) {
|
|
815
775
|
handleChange(null, "general");
|
|
816
776
|
}
|
|
@@ -822,287 +782,323 @@ function useSumbitErrorsFocus() {
|
|
|
822
782
|
}, [isSubmitted, errors]);
|
|
823
783
|
}
|
|
824
784
|
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();
|
|
785
|
+
const { getLabel } = useModuleDictionary();
|
|
786
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
787
|
+
const { inEdition, handleDraw, handleFinish, geometrTypeIdCached } = useDrawing();
|
|
838
788
|
useSumbitErrorsFocus();
|
|
839
789
|
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GENERAL}`;
|
|
840
790
|
const geofencesTypes = useMemo(() => {
|
|
841
|
-
return [
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
791
|
+
return [
|
|
792
|
+
{
|
|
793
|
+
id: "gt_circle",
|
|
794
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_CIRCLE),
|
|
795
|
+
url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_CIRCLE}`
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
id: "gt_polygon",
|
|
799
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_POLYGON),
|
|
800
|
+
url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_POLYGON}`
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
id: "gt_rectangle",
|
|
804
|
+
name: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_RECTANGLE),
|
|
805
|
+
url: `${host_static_assets}/${environment_assets}/frontend/domain/components/map/assets/icons/${GPSTOOLSICONS.GEOMETRY_RECTANGLE}`
|
|
806
|
+
}
|
|
807
|
+
];
|
|
854
808
|
}, [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
|
-
|
|
809
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_GENERAL), children: [
|
|
810
|
+
/* @__PURE__ */ jsx(
|
|
811
|
+
RHFTextField,
|
|
812
|
+
{
|
|
813
|
+
name: "name",
|
|
814
|
+
disabled: false,
|
|
815
|
+
type: "text",
|
|
816
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_NAME}`)
|
|
817
|
+
}
|
|
818
|
+
),
|
|
819
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 1, alignItems: "center", children: [
|
|
820
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
821
|
+
/* @__PURE__ */ jsx(
|
|
822
|
+
RHFAutocomplete,
|
|
823
|
+
{
|
|
824
|
+
name: "geofenceType",
|
|
825
|
+
autoComplete: "off",
|
|
826
|
+
options: geofencesTypes,
|
|
827
|
+
getOptionLabel: (option) => option.name,
|
|
828
|
+
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
829
|
+
getOptionUrlImage: (option) => option.url,
|
|
830
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_GEOMETRY_TYPE)
|
|
831
|
+
}
|
|
832
|
+
),
|
|
833
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleDraw, disabled: inEdition || !geometrTypeIdCached, children: getLabel(MAP_DICCTIONARY.LABEL_DRAW) }),
|
|
834
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleFinish, disabled: !inEdition, children: getLabel(MAP_DICCTIONARY.LABEL_FINISH) })
|
|
835
|
+
] }),
|
|
836
|
+
geometrTypeIdCached && geometrTypeIdCached === "gt_circle" && /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
837
|
+
/* @__PURE__ */ jsx(
|
|
838
|
+
RHFTextField,
|
|
839
|
+
{
|
|
840
|
+
name: "properties.radius",
|
|
841
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_RADIUS),
|
|
842
|
+
autoComplete: "on",
|
|
843
|
+
skeletonWidth: "70%",
|
|
844
|
+
skeletonHeight: "18px",
|
|
845
|
+
disabled: true,
|
|
846
|
+
size: "medium"
|
|
847
|
+
}
|
|
848
|
+
),
|
|
849
|
+
/* @__PURE__ */ jsx(
|
|
850
|
+
RHFTextField,
|
|
851
|
+
{
|
|
852
|
+
name: "lat",
|
|
853
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_LAT),
|
|
854
|
+
autoComplete: "on",
|
|
855
|
+
skeletonWidth: "70%",
|
|
856
|
+
skeletonHeight: "18px",
|
|
857
|
+
disabled: true,
|
|
858
|
+
size: "medium"
|
|
859
|
+
}
|
|
860
|
+
),
|
|
861
|
+
/* @__PURE__ */ jsx(
|
|
862
|
+
RHFTextField,
|
|
863
|
+
{
|
|
864
|
+
name: "lng",
|
|
865
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_LON),
|
|
866
|
+
autoComplete: "on",
|
|
867
|
+
skeletonWidth: "70%",
|
|
868
|
+
skeletonHeight: "18px",
|
|
869
|
+
disabled: true,
|
|
870
|
+
size: "medium"
|
|
871
|
+
}
|
|
872
|
+
)
|
|
873
|
+
] })
|
|
874
|
+
] })
|
|
875
|
+
] });
|
|
920
876
|
}
|
|
921
877
|
function ConfigData() {
|
|
922
|
-
const {
|
|
923
|
-
|
|
924
|
-
} = useModuleDictionary();
|
|
925
|
-
const {
|
|
926
|
-
host_static_assets,
|
|
927
|
-
environment_assets
|
|
928
|
-
} = useEnvironment();
|
|
878
|
+
const { getLabel } = useModuleDictionary();
|
|
879
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
929
880
|
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
|
-
|
|
881
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_CONFIG), children: [
|
|
882
|
+
/* @__PURE__ */ jsx(
|
|
883
|
+
RHFTextField,
|
|
884
|
+
{
|
|
885
|
+
name: "alias",
|
|
886
|
+
disabled: false,
|
|
887
|
+
type: "text",
|
|
888
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_ALIAS}`)
|
|
889
|
+
}
|
|
890
|
+
),
|
|
891
|
+
/* @__PURE__ */ jsx(
|
|
892
|
+
RHFTextField,
|
|
893
|
+
{
|
|
894
|
+
name: "customerId",
|
|
895
|
+
disabled: false,
|
|
896
|
+
type: "text",
|
|
897
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_CUSTOMER_ID}`)
|
|
898
|
+
}
|
|
899
|
+
),
|
|
900
|
+
/* @__PURE__ */ jsx(
|
|
901
|
+
RHFTextField,
|
|
902
|
+
{
|
|
903
|
+
name: "timeMinInSeconds",
|
|
904
|
+
disabled: false,
|
|
905
|
+
type: "number",
|
|
906
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_IN_SECONDS}`)
|
|
907
|
+
}
|
|
908
|
+
),
|
|
909
|
+
/* @__PURE__ */ jsx(
|
|
910
|
+
RHFTextField,
|
|
911
|
+
{
|
|
912
|
+
name: "timeMinOutSeconds",
|
|
913
|
+
disabled: false,
|
|
914
|
+
type: "number",
|
|
915
|
+
label: getLabel(`${MAP_DICCTIONARY.LABEL_TIME_MIN_OUT_SECONDS}`)
|
|
916
|
+
}
|
|
917
|
+
)
|
|
918
|
+
] });
|
|
955
919
|
}
|
|
956
920
|
function FillData() {
|
|
957
|
-
const {
|
|
958
|
-
|
|
959
|
-
} = useModuleDictionary();
|
|
960
|
-
const {
|
|
961
|
-
host_static_assets,
|
|
962
|
-
environment_assets
|
|
963
|
-
} = useEnvironment();
|
|
921
|
+
const { getLabel } = useModuleDictionary();
|
|
922
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
964
923
|
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
|
-
|
|
924
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_STROKE), children: [
|
|
925
|
+
/* @__PURE__ */ jsx(
|
|
926
|
+
PropertyValue,
|
|
927
|
+
{
|
|
928
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
|
|
929
|
+
isForm: true,
|
|
930
|
+
propertyWidth: 150,
|
|
931
|
+
value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.fillColor" })
|
|
932
|
+
},
|
|
933
|
+
"properties.fillColor"
|
|
934
|
+
),
|
|
935
|
+
/* @__PURE__ */ jsx(
|
|
936
|
+
PropertyValue,
|
|
937
|
+
{
|
|
938
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
|
|
939
|
+
isForm: true,
|
|
940
|
+
propertyWidth: 150,
|
|
941
|
+
value: /* @__PURE__ */ jsx(
|
|
942
|
+
RHFAutocomplete,
|
|
943
|
+
{
|
|
944
|
+
name: "properties.fillOpacity",
|
|
945
|
+
autoComplete: "off",
|
|
946
|
+
options: STYLE_OPACITIES,
|
|
947
|
+
getOptionLabel: (option) => option.label,
|
|
948
|
+
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
949
|
+
label: "ssss"
|
|
950
|
+
}
|
|
951
|
+
)
|
|
952
|
+
},
|
|
953
|
+
"properties.fillOpacity"
|
|
954
|
+
)
|
|
955
|
+
] });
|
|
989
956
|
}
|
|
990
957
|
function StrokeData() {
|
|
991
|
-
const {
|
|
992
|
-
|
|
993
|
-
} = useModuleDictionary();
|
|
994
|
-
const {
|
|
995
|
-
host_static_assets,
|
|
996
|
-
environment_assets
|
|
997
|
-
} = useEnvironment();
|
|
958
|
+
const { getLabel } = useModuleDictionary();
|
|
959
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
998
960
|
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
|
-
|
|
961
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_DICCTIONARY.PAPER_STROKE), children: [
|
|
962
|
+
/* @__PURE__ */ jsx(
|
|
963
|
+
PropertyValue,
|
|
964
|
+
{
|
|
965
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_COLOR}`),
|
|
966
|
+
isForm: true,
|
|
967
|
+
propertyWidth: 150,
|
|
968
|
+
value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.strokeColor" })
|
|
969
|
+
},
|
|
970
|
+
"properties.strokeColor"
|
|
971
|
+
),
|
|
972
|
+
/* @__PURE__ */ jsx(
|
|
973
|
+
PropertyValue,
|
|
974
|
+
{
|
|
975
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_OPACITY}`),
|
|
976
|
+
isForm: true,
|
|
977
|
+
propertyWidth: 150,
|
|
978
|
+
value: /* @__PURE__ */ jsx(
|
|
979
|
+
RHFAutocomplete,
|
|
980
|
+
{
|
|
981
|
+
name: "properties.strokeOpacity",
|
|
982
|
+
autoComplete: "off",
|
|
983
|
+
options: STYLE_OPACITIES,
|
|
984
|
+
getOptionLabel: (option) => option.label,
|
|
985
|
+
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
986
|
+
label: "ssss"
|
|
987
|
+
}
|
|
988
|
+
)
|
|
989
|
+
},
|
|
990
|
+
"properties.strokeOpacity"
|
|
991
|
+
),
|
|
992
|
+
/* @__PURE__ */ jsx(
|
|
993
|
+
PropertyValue,
|
|
994
|
+
{
|
|
995
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_WEIGHT}`),
|
|
996
|
+
isForm: true,
|
|
997
|
+
propertyWidth: 150,
|
|
998
|
+
value: /* @__PURE__ */ jsx(
|
|
999
|
+
RHFAutocomplete,
|
|
1000
|
+
{
|
|
1001
|
+
name: "properties.strokeWeight",
|
|
1002
|
+
autoComplete: "off",
|
|
1003
|
+
options: STYLE_WHEIGHTS,
|
|
1004
|
+
getOptionLabel: (option) => option.label,
|
|
1005
|
+
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
1006
|
+
label: "ssss"
|
|
1007
|
+
}
|
|
1008
|
+
)
|
|
1009
|
+
},
|
|
1010
|
+
"properties.strokeWeight"
|
|
1011
|
+
),
|
|
1012
|
+
/* @__PURE__ */ jsx(
|
|
1013
|
+
PropertyValue,
|
|
1014
|
+
{
|
|
1015
|
+
property: getLabel(`${MAP_DICCTIONARY.LABEL_DASH_ARRAY}`),
|
|
1016
|
+
isForm: true,
|
|
1017
|
+
propertyWidth: 150,
|
|
1018
|
+
value: /* @__PURE__ */ jsx(
|
|
1019
|
+
RHFAutocomplete,
|
|
1020
|
+
{
|
|
1021
|
+
name: "properties.strokeDashArray",
|
|
1022
|
+
autoComplete: "off",
|
|
1023
|
+
options: STYLE_PATTERNS,
|
|
1024
|
+
getOptionLabel: (option) => option.label,
|
|
1025
|
+
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
1026
|
+
label: "ssss"
|
|
1027
|
+
}
|
|
1028
|
+
)
|
|
1029
|
+
},
|
|
1030
|
+
"properties.strokeDashArray"
|
|
1031
|
+
)
|
|
1032
|
+
] });
|
|
1047
1033
|
}
|
|
1048
1034
|
function StyleData() {
|
|
1049
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
1050
|
-
|
|
1051
|
-
|
|
1035
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1036
|
+
/* @__PURE__ */ jsx(StrokeData, {}),
|
|
1037
|
+
/* @__PURE__ */ jsx(FillData, {})
|
|
1038
|
+
] });
|
|
1052
1039
|
}
|
|
1053
1040
|
function MyTabs() {
|
|
1054
|
-
const {
|
|
1055
|
-
|
|
1056
|
-
} = useModuleDictionary();
|
|
1057
|
-
const {
|
|
1058
|
-
currentTab,
|
|
1059
|
-
handleChange
|
|
1060
|
-
} = useTab();
|
|
1041
|
+
const { getLabel } = useModuleDictionary();
|
|
1042
|
+
const { currentTab, handleChange } = useTab();
|
|
1061
1043
|
const geofenceAddEditTabs = useMemo(() => {
|
|
1062
|
-
return [
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1044
|
+
return [
|
|
1045
|
+
{
|
|
1046
|
+
value: "general",
|
|
1047
|
+
icon: void 0,
|
|
1048
|
+
components: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1049
|
+
/* @__PURE__ */ jsx(GeneralData, {}),
|
|
1050
|
+
/* @__PURE__ */ jsx(ConfigData, {})
|
|
1051
|
+
] }),
|
|
1052
|
+
toolTip: getLabel(MAP_DICCTIONARY.TAB_GENERAL_CONFIG_TOOLTIP),
|
|
1053
|
+
className: gpsToolsClasses.toolGeofencesAddEditGeneral
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
value: "style",
|
|
1057
|
+
icon: void 0,
|
|
1058
|
+
components: /* @__PURE__ */ jsx(StyleData, {}),
|
|
1059
|
+
toolTip: getLabel(MAP_DICCTIONARY.TAB_STYLE_CONFIG_TOOLTIP),
|
|
1060
|
+
className: gpsToolsClasses.toolGeofencesAddEditStyle
|
|
1061
|
+
}
|
|
1062
|
+
];
|
|
1077
1063
|
}, [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
|
-
|
|
1064
|
+
return /* @__PURE__ */ jsxs("div", { className: gpsToolsClasses.gpsToolsGeofencesAddEditContent, children: [
|
|
1065
|
+
/* @__PURE__ */ jsx(
|
|
1066
|
+
Tabs,
|
|
1067
|
+
{
|
|
1068
|
+
value: currentTab,
|
|
1069
|
+
scrollButtons: "auto",
|
|
1070
|
+
variant: "scrollable",
|
|
1071
|
+
allowScrollButtonsMobile: true,
|
|
1072
|
+
onChange: (_e, newValue) => handleChange(_e, newValue),
|
|
1073
|
+
children: geofenceAddEditTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
1074
|
+
Tab,
|
|
1075
|
+
{
|
|
1076
|
+
value: tab.value,
|
|
1077
|
+
icon: tab.icon,
|
|
1078
|
+
label: /* @__PURE__ */ jsx(Tooltip, { title: tab.toolTip, children: /* @__PURE__ */ jsx("span", { children: tab.toolTip }) }),
|
|
1079
|
+
SKTWidth: "100px",
|
|
1080
|
+
SKTHeight: "14px"
|
|
1081
|
+
},
|
|
1082
|
+
tab.value
|
|
1083
|
+
))
|
|
1084
|
+
}
|
|
1085
|
+
),
|
|
1086
|
+
geofenceAddEditTabs.map((tab) => {
|
|
1099
1087
|
const isMatched = tab.value === currentTab;
|
|
1100
|
-
return /* @__PURE__ */ jsx(
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1088
|
+
return /* @__PURE__ */ jsx(
|
|
1089
|
+
TabContent,
|
|
1090
|
+
{
|
|
1091
|
+
className: clsx(
|
|
1092
|
+
gpsToolsClasses.gpsToolsTabContent,
|
|
1093
|
+
tab.className,
|
|
1094
|
+
isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
|
|
1095
|
+
),
|
|
1096
|
+
children: tab.components
|
|
1097
|
+
},
|
|
1098
|
+
tab.value
|
|
1099
|
+
);
|
|
1100
|
+
})
|
|
1101
|
+
] });
|
|
1106
1102
|
}
|
|
1107
1103
|
function GeneralDataValidation(getLabel) {
|
|
1108
1104
|
return {
|
|
@@ -1169,10 +1165,7 @@ function useSubmit(props) {
|
|
|
1169
1165
|
bodyToSnakeCase: true,
|
|
1170
1166
|
isRemote: false
|
|
1171
1167
|
}).then((response) => {
|
|
1172
|
-
toast(
|
|
1173
|
-
response.message,
|
|
1174
|
-
{ type: "success" }
|
|
1175
|
-
);
|
|
1168
|
+
toast(response.message, { type: "success" });
|
|
1176
1169
|
closePopup("geofencesAddEdit");
|
|
1177
1170
|
showPopup("gpsTools");
|
|
1178
1171
|
if (objectId !== void 0) {
|
|
@@ -1187,27 +1180,23 @@ function useSubmit(props) {
|
|
|
1187
1180
|
return { onSubmit };
|
|
1188
1181
|
}
|
|
1189
1182
|
const RHFormProviderStyled = styled(RHFormProvider)`
|
|
1190
|
-
|
|
1183
|
+
height: 100% !important;
|
|
1191
1184
|
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
.${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
|
|
1201
|
-
display:none;
|
|
1202
|
-
}
|
|
1185
|
+
.${gpsToolsClasses.gpsToolsGeofencesAddEditContent} {
|
|
1186
|
+
display: flex;
|
|
1187
|
+
flex-direction: column;
|
|
1188
|
+
flex-grow: 1;
|
|
1189
|
+
height: 100%;
|
|
1190
|
+
}
|
|
1203
1191
|
|
|
1192
|
+
.${gpsToolsClasses.gpsToolsTabContent}.${gpsToolsClasses.hidden} {
|
|
1193
|
+
display: none;
|
|
1194
|
+
}
|
|
1204
1195
|
|
|
1205
|
-
|
|
1196
|
+
${(props) => props.theme.components?.M4LGpsToolsGeofencesAddEdit?.styleOverrides}
|
|
1206
1197
|
`;
|
|
1207
1198
|
function GeofenceAddEdit(props) {
|
|
1208
|
-
const {
|
|
1209
|
-
geofenceId
|
|
1210
|
-
} = props;
|
|
1199
|
+
const { geofenceId } = props;
|
|
1211
1200
|
const [finalInitalValues, omitCallEnpoint] = useGpsToolsStore((state) => {
|
|
1212
1201
|
if (geofenceId === void 0) {
|
|
1213
1202
|
return [initialValues, false];
|
|
@@ -1232,17 +1221,12 @@ function GeofenceAddEdit(props) {
|
|
|
1232
1221
|
customerId: geofence.customerId
|
|
1233
1222
|
}
|
|
1234
1223
|
};
|
|
1235
|
-
console.log("emulateResponse", emulateResponse);
|
|
1236
1224
|
return [formatDataEnpoint(emulateResponse), true];
|
|
1237
1225
|
} else {
|
|
1238
1226
|
return [initialValues, false];
|
|
1239
1227
|
}
|
|
1240
1228
|
});
|
|
1241
|
-
|
|
1242
|
-
const {
|
|
1243
|
-
formValues,
|
|
1244
|
-
statusLoad
|
|
1245
|
-
} = useFormAddEdit({
|
|
1229
|
+
const { formValues, statusLoad } = useFormAddEdit({
|
|
1246
1230
|
objectId: geofenceId,
|
|
1247
1231
|
formatDataEnpoint,
|
|
1248
1232
|
initialValues: finalInitalValues,
|
|
@@ -1250,144 +1234,116 @@ function GeofenceAddEdit(props) {
|
|
|
1250
1234
|
isRemote: false,
|
|
1251
1235
|
omitCallEnpoint
|
|
1252
1236
|
});
|
|
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
|
-
});
|
|
1237
|
+
const { validationSchema } = useValidation();
|
|
1238
|
+
const { onSubmit } = useSubmit({ objectId: geofenceId });
|
|
1239
|
+
return /* @__PURE__ */ jsxs(
|
|
1240
|
+
RHFormProviderStyled,
|
|
1241
|
+
{
|
|
1242
|
+
statusLoad,
|
|
1243
|
+
onSubmit,
|
|
1244
|
+
values: formValues,
|
|
1245
|
+
validationSchema,
|
|
1246
|
+
className: gpsToolsClasses.gpsToolsGeofencesAddEdit,
|
|
1247
|
+
children: [
|
|
1248
|
+
/* @__PURE__ */ jsx(TabProvider, { initialValue: "general", children: /* @__PURE__ */ jsx(MyTabs, {}) }),
|
|
1249
|
+
/* @__PURE__ */ jsx(MyActions, { ...props })
|
|
1250
|
+
]
|
|
1251
|
+
}
|
|
1252
|
+
);
|
|
1274
1253
|
}
|
|
1275
1254
|
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();
|
|
1255
|
+
const { fullRefresh } = props;
|
|
1256
|
+
const { networkOperation } = useNetwork();
|
|
1257
|
+
const { openModal, closeModal } = useModal();
|
|
1258
|
+
const { getLabel } = useModuleDictionary();
|
|
1259
|
+
const { hasPrivilege } = useModulePrivileges();
|
|
1260
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
1261
|
+
const { hidePopup, addPopup } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
1262
|
+
const { removeCheckedGeofence } = useGpsToolsStore((state) => state.geofenceActions, shallow);
|
|
1263
|
+
const { toast } = useHostTools();
|
|
1306
1264
|
const isDesktop = useResponsiveDesktop();
|
|
1307
|
-
const [urlIconEdit] = useState(
|
|
1308
|
-
|
|
1265
|
+
const [urlIconEdit] = useState(
|
|
1266
|
+
`${host_static_assets}/${environment_assets}/frontend/components/maptools/assets/icons/${GPSTOOLSICONS.EDIT}`
|
|
1267
|
+
);
|
|
1268
|
+
const [urlIconDelete] = useState(
|
|
1269
|
+
`${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/maptools/assets/icons/${GPSTOOLSICONS.DELETE}`
|
|
1270
|
+
);
|
|
1309
1271
|
const goEdit = (objectId) => {
|
|
1310
|
-
console.log("onClickAddGeofence");
|
|
1311
1272
|
hidePopup("gpsTools");
|
|
1312
1273
|
addPopup({
|
|
1313
1274
|
popupId: "geofencesAddEdit",
|
|
1314
1275
|
title: "geofencesAddEdit",
|
|
1315
|
-
componentProps: {
|
|
1316
|
-
fullRefresh,
|
|
1317
|
-
geofenceId: objectId
|
|
1318
|
-
},
|
|
1276
|
+
componentProps: { fullRefresh, geofenceId: objectId },
|
|
1319
1277
|
functionComponent: GeofenceAddEdit,
|
|
1320
1278
|
defaultPosition: {
|
|
1321
|
-
vertical: {
|
|
1322
|
-
|
|
1323
|
-
bottom: 50
|
|
1324
|
-
},
|
|
1325
|
-
horizontal: {
|
|
1326
|
-
right: 50,
|
|
1327
|
-
width: 380
|
|
1328
|
-
}
|
|
1279
|
+
vertical: { top: 50, bottom: 50 },
|
|
1280
|
+
horizontal: { right: 50, width: 380 }
|
|
1329
1281
|
},
|
|
1330
1282
|
iconUrl: ""
|
|
1331
1283
|
});
|
|
1332
1284
|
removeCheckedGeofence(objectId);
|
|
1333
1285
|
};
|
|
1334
|
-
const onDelete = useCallback(
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1286
|
+
const onDelete = useCallback(
|
|
1287
|
+
(row) => {
|
|
1288
|
+
openModal({
|
|
1289
|
+
window: /* @__PURE__ */ jsx(
|
|
1290
|
+
WindowConfirm,
|
|
1291
|
+
{
|
|
1292
|
+
title: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_TITLE),
|
|
1293
|
+
msg: getLabel(MAP_DICCTIONARY.MODAL_DELETE_GEO_MESSAGE),
|
|
1294
|
+
onClickIntro: () => onConfirmDelete(row)
|
|
1295
|
+
}
|
|
1296
|
+
),
|
|
1297
|
+
variant: "delete",
|
|
1298
|
+
initialWidth: 300,
|
|
1299
|
+
initialHeigth: 350
|
|
1300
|
+
});
|
|
1301
|
+
},
|
|
1302
|
+
[getLabel]
|
|
1303
|
+
);
|
|
1346
1304
|
const onConfirmDelete = useCallback((row) => {
|
|
1347
1305
|
networkOperation({
|
|
1348
1306
|
method: "DELETE",
|
|
1349
1307
|
endPoint: `geofences/${row.id}`
|
|
1350
1308
|
}).then((response) => {
|
|
1351
|
-
toast(response.message, {
|
|
1352
|
-
type: "success"
|
|
1353
|
-
});
|
|
1309
|
+
toast(response.message, { type: "success" });
|
|
1354
1310
|
fullRefresh();
|
|
1355
1311
|
});
|
|
1356
1312
|
closeModal();
|
|
1357
1313
|
}, []);
|
|
1358
|
-
const rowActionsGetter = useCallback(
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1314
|
+
const rowActionsGetter = useCallback(
|
|
1315
|
+
(row) => {
|
|
1316
|
+
const conditionalItems = [];
|
|
1317
|
+
conditionalItems.push({
|
|
1318
|
+
urlIcon: urlIconEdit,
|
|
1319
|
+
dictionaryId: MAP_DICCTIONARY.ROW_ACTION_GEO_EDIT,
|
|
1320
|
+
onClick: () => {
|
|
1321
|
+
goEdit(row.id);
|
|
1322
|
+
},
|
|
1323
|
+
disabled: !row.authUserOptions.edit
|
|
1324
|
+
});
|
|
1325
|
+
return conditionalItems;
|
|
1326
|
+
},
|
|
1327
|
+
[hasPrivilege, goEdit, onDelete, urlIconDelete, urlIconEdit, isDesktop]
|
|
1328
|
+
);
|
|
1329
|
+
return { rowActionsGetter };
|
|
1373
1330
|
}
|
|
1374
1331
|
function useCheckedGeofences() {
|
|
1375
1332
|
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();
|
|
1333
|
+
const [checkedGeofences, hashGeofences] = useGpsToolsStore(
|
|
1334
|
+
(state) => [state.geofenceState.checkedGeofences, state.geofenceState.hashGeofences],
|
|
1335
|
+
shallow
|
|
1336
|
+
);
|
|
1337
|
+
const { setCheckedGeofences, updatePartialGeofence } = useGpsToolsStore(
|
|
1338
|
+
(state) => state.geofenceActions,
|
|
1339
|
+
shallow
|
|
1340
|
+
);
|
|
1341
|
+
const { setFeatureData, removeFeature, getFeatureIds } = useMapStore(
|
|
1342
|
+
(state) => state.mapActions,
|
|
1343
|
+
shallow
|
|
1344
|
+
);
|
|
1345
|
+
const { networkOperation } = useNetwork();
|
|
1389
1346
|
useEffect(() => {
|
|
1390
|
-
console.log("useCheckedGeofences, layersIds:", layersIds);
|
|
1391
1347
|
if (!layersIds.includes(GeofencesFeaturesLayers.LAYER_GEOFENCES)) {
|
|
1392
1348
|
return;
|
|
1393
1349
|
}
|
|
@@ -1405,7 +1361,6 @@ function useCheckedGeofences() {
|
|
|
1405
1361
|
isRemote: false,
|
|
1406
1362
|
responseToCamelCase: true
|
|
1407
1363
|
}).then((response) => {
|
|
1408
|
-
console.log("onCheckedRowsChange response:", response.data);
|
|
1409
1364
|
const geoLoaded = {
|
|
1410
1365
|
geometry: response.data.geometry,
|
|
1411
1366
|
name: response.data.name,
|
|
@@ -1425,12 +1380,14 @@ function useCheckedGeofences() {
|
|
|
1425
1380
|
updatePartialGeofence(geofence.id, geoLoaded);
|
|
1426
1381
|
});
|
|
1427
1382
|
} else {
|
|
1428
|
-
setFeatureData(
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1383
|
+
setFeatureData(
|
|
1384
|
+
GeofencesFeaturesLayers.LAYER_GEOFENCES,
|
|
1385
|
+
chkRow,
|
|
1386
|
+
geofence.geometry,
|
|
1387
|
+
geofence.properties,
|
|
1388
|
+
{ label: geofence.name }
|
|
1389
|
+
);
|
|
1390
|
+
updatePartialGeofence(geofence.id, { hasRenderizedGeofence: true });
|
|
1434
1391
|
}
|
|
1435
1392
|
}
|
|
1436
1393
|
});
|
|
@@ -1450,16 +1407,21 @@ function useCheckedGeofences() {
|
|
|
1450
1407
|
function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
1451
1408
|
const layersIds = useMapStore((state) => state.layersIds, shallow);
|
|
1452
1409
|
const [checkedFeatures, setCheckedFeatures, hashGeofences] = useGpsToolsStore((state) => {
|
|
1453
|
-
return featuresType === "CrossingFeatures" ? [
|
|
1410
|
+
return featuresType === "CrossingFeatures" ? [
|
|
1411
|
+
state.geofenceState.checkedCrossingFeatures,
|
|
1412
|
+
state.geofenceActions.setCheckedCrossingFeatures,
|
|
1413
|
+
state.geofenceState.hashGeofences
|
|
1414
|
+
] : [
|
|
1415
|
+
state.geofenceState.checkedInternalFeatures,
|
|
1416
|
+
state.geofenceActions.setCheckedInternalFeatures,
|
|
1417
|
+
state.geofenceState.hashGeofences
|
|
1418
|
+
];
|
|
1454
1419
|
}, shallow);
|
|
1455
|
-
const {
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
} =
|
|
1460
|
-
const {
|
|
1461
|
-
networkOperation
|
|
1462
|
-
} = useNetwork();
|
|
1420
|
+
const { setFeatureData, removeFeature, getFeatureIds } = useMapStore(
|
|
1421
|
+
(state) => state.mapActions,
|
|
1422
|
+
shallow
|
|
1423
|
+
);
|
|
1424
|
+
const { networkOperation } = useNetwork();
|
|
1463
1425
|
useEffect(() => {
|
|
1464
1426
|
if (!layersIds.includes(layerId)) {
|
|
1465
1427
|
return;
|
|
@@ -1479,13 +1441,17 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
|
1479
1441
|
isRemote: false,
|
|
1480
1442
|
responseToCamelCase: true
|
|
1481
1443
|
}).then((response) => {
|
|
1482
|
-
console.log("onCheckedGeometriesChange response:", response.data);
|
|
1483
1444
|
geofence[`loaded${featuresType}`] = response.data;
|
|
1484
1445
|
const newGeofenceLoadedFeatures = geofence[`loaded${featuresType}`];
|
|
1485
1446
|
if (newGeofenceLoadedFeatures && Array.isArray(geofence[`loaded${featuresType}`])) {
|
|
1486
1447
|
if (checkedFeatures.has(geofence.id)) {
|
|
1487
1448
|
newGeofenceLoadedFeatures.forEach((feature) => {
|
|
1488
|
-
setFeatureData(
|
|
1449
|
+
setFeatureData(
|
|
1450
|
+
layerId,
|
|
1451
|
+
`geo_${geofence.id}_fid_${feature.id}`,
|
|
1452
|
+
feature.geometry,
|
|
1453
|
+
feature.properties
|
|
1454
|
+
);
|
|
1489
1455
|
});
|
|
1490
1456
|
geofence[`hasRenderized${featuresType}`] = true;
|
|
1491
1457
|
}
|
|
@@ -1494,7 +1460,12 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
|
1494
1460
|
});
|
|
1495
1461
|
} else {
|
|
1496
1462
|
currentGeofenceLoadedFeatures.forEach((feature) => {
|
|
1497
|
-
setFeatureData(
|
|
1463
|
+
setFeatureData(
|
|
1464
|
+
layerId,
|
|
1465
|
+
`geo_${geofence.id}_fid_${feature.id}`,
|
|
1466
|
+
feature.geometry,
|
|
1467
|
+
feature.properties
|
|
1468
|
+
);
|
|
1498
1469
|
});
|
|
1499
1470
|
geofence[`hasRenderized${featuresType}`] = true;
|
|
1500
1471
|
}
|
|
@@ -1512,54 +1483,48 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
|
1512
1483
|
return [checkedFeatures, setCheckedFeatures];
|
|
1513
1484
|
}
|
|
1514
1485
|
function useMaster() {
|
|
1515
|
-
const {
|
|
1516
|
-
hidePopup,
|
|
1517
|
-
addPopup
|
|
1518
|
-
} = usePopupsStore((state) => state.popupsActions, shallow);
|
|
1486
|
+
const { hidePopup, addPopup } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
1519
1487
|
const onClickAddGeofence = () => {
|
|
1520
|
-
console.log("onClickAddGeofence");
|
|
1521
1488
|
hidePopup("gpsTools");
|
|
1522
1489
|
addPopup({
|
|
1523
1490
|
popupId: "geofencesAddEdit",
|
|
1524
1491
|
title: "geofencesAddEdit",
|
|
1525
1492
|
functionComponent: () => /* @__PURE__ */ jsx(GeofenceAddEdit, {}),
|
|
1526
1493
|
defaultPosition: {
|
|
1527
|
-
vertical: {
|
|
1528
|
-
|
|
1529
|
-
bottom: 50
|
|
1530
|
-
},
|
|
1531
|
-
horizontal: {
|
|
1532
|
-
right: 50,
|
|
1533
|
-
width: 380
|
|
1534
|
-
}
|
|
1494
|
+
vertical: { top: 50, bottom: 50 },
|
|
1495
|
+
horizontal: { right: 50, width: 380 }
|
|
1535
1496
|
},
|
|
1536
1497
|
iconUrl: ""
|
|
1537
1498
|
});
|
|
1538
1499
|
};
|
|
1539
|
-
const [checkedGeofences, hashGeofences, initialRows] = useGpsToolsStore(
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1500
|
+
const [checkedGeofences, hashGeofences, initialRows] = useGpsToolsStore(
|
|
1501
|
+
(state) => [
|
|
1502
|
+
state.geofenceState.checkedGeofences,
|
|
1503
|
+
state.geofenceState.hashGeofences,
|
|
1504
|
+
state.geofenceState.rows
|
|
1505
|
+
],
|
|
1506
|
+
shallow
|
|
1507
|
+
);
|
|
1508
|
+
const { setCheckedGeofences, addGeofence, updatePartialGeofence, updateRows } = useGpsToolsStore(
|
|
1509
|
+
(state) => state.geofenceActions,
|
|
1510
|
+
shallow
|
|
1511
|
+
);
|
|
1546
1512
|
useCheckedGeofences();
|
|
1547
|
-
const [checkedCrossingFeatures, setCheckedCrossingFeatures] = useCheckedFeatures(
|
|
1548
|
-
|
|
1513
|
+
const [checkedCrossingFeatures, setCheckedCrossingFeatures] = useCheckedFeatures(
|
|
1514
|
+
GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES,
|
|
1515
|
+
"CrossingFeatures",
|
|
1516
|
+
"crossing_features"
|
|
1517
|
+
);
|
|
1518
|
+
const [checkedInternalFeatures, setCheckedInternalFeatures] = useCheckedFeatures(
|
|
1519
|
+
GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES,
|
|
1520
|
+
"InternalFeatures",
|
|
1521
|
+
"internal_features"
|
|
1522
|
+
);
|
|
1549
1523
|
const rowKeyGetter = useCallback((row) => row.id, []);
|
|
1550
1524
|
const [selectedRows, setSelectedRows] = useState(/* @__PURE__ */ new Set());
|
|
1551
1525
|
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({
|
|
1526
|
+
const { columns } = useColumns();
|
|
1527
|
+
const { pagerState, rows, onPageChange, onRowsPerPageChange, Refresh, setRows } = usePaginate({
|
|
1563
1528
|
endPoint: "geofences",
|
|
1564
1529
|
fireOnChangeParms: false,
|
|
1565
1530
|
fireOnFirstLoad: false,
|
|
@@ -1638,11 +1603,7 @@ function useMaster() {
|
|
|
1638
1603
|
onSelectedRowsChange(selectedRows);
|
|
1639
1604
|
updateRows(rows);
|
|
1640
1605
|
}, [rows]);
|
|
1641
|
-
const {
|
|
1642
|
-
rowActionsGetter
|
|
1643
|
-
} = useRowActionsGetter({
|
|
1644
|
-
fullRefresh
|
|
1645
|
-
});
|
|
1606
|
+
const { rowActionsGetter } = useRowActionsGetter({ fullRefresh });
|
|
1646
1607
|
return {
|
|
1647
1608
|
rowKeyGetter,
|
|
1648
1609
|
columns,
|
|
@@ -1662,17 +1623,17 @@ function useMaster() {
|
|
|
1662
1623
|
};
|
|
1663
1624
|
}
|
|
1664
1625
|
const StackGeofenceListRoot = styled(Stack)`
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1626
|
+
padding: 12px;
|
|
1627
|
+
position: relative !important;
|
|
1628
|
+
flex-grow: 1;
|
|
1629
|
+
width: 100%;
|
|
1669
1630
|
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1631
|
+
.M4LDataGrid-root {
|
|
1632
|
+
height: unset !important;
|
|
1633
|
+
flex-grow: 1;
|
|
1634
|
+
}
|
|
1674
1635
|
|
|
1675
|
-
|
|
1636
|
+
${(props) => props.theme.components?.M4LGpsToolsGeofencesList?.styleOverrides}
|
|
1676
1637
|
`;
|
|
1677
1638
|
function GeofencesList() {
|
|
1678
1639
|
const {
|
|
@@ -1692,98 +1653,118 @@ function GeofencesList() {
|
|
|
1692
1653
|
rowKeyGetter,
|
|
1693
1654
|
goToAddEdit
|
|
1694
1655
|
} = 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
|
-
|
|
1656
|
+
return /* @__PURE__ */ jsxs(
|
|
1657
|
+
StackGeofenceListRoot,
|
|
1658
|
+
{
|
|
1659
|
+
direction: "column",
|
|
1660
|
+
gap: "8px",
|
|
1661
|
+
className: gpsToolsClasses.gpsToolsGeofencesList,
|
|
1662
|
+
children: [
|
|
1663
|
+
/* @__PURE__ */ jsx(Filter, { refresh, setBackendQueryParams }),
|
|
1664
|
+
/* @__PURE__ */ jsx(
|
|
1665
|
+
DataGrid,
|
|
1666
|
+
{
|
|
1667
|
+
id: "geofences",
|
|
1668
|
+
columns,
|
|
1669
|
+
rows,
|
|
1670
|
+
onRowsChange: setRows,
|
|
1671
|
+
checkedRows,
|
|
1672
|
+
onCheckedRowsChange,
|
|
1673
|
+
rowActionsGetter,
|
|
1674
|
+
rowKeyGetter,
|
|
1675
|
+
selectedRows,
|
|
1676
|
+
onSelectedRowsChange,
|
|
1677
|
+
withActions: true,
|
|
1678
|
+
actionsProps: {
|
|
1679
|
+
withPager: true,
|
|
1680
|
+
withLocalFilters: true,
|
|
1681
|
+
pagerOptions: {
|
|
1682
|
+
records: rows.length,
|
|
1683
|
+
totalRecords: pagerState.totalRecords,
|
|
1684
|
+
rowsPerPageOptions: [1, 2, 3, 4, 5, 10, 25],
|
|
1685
|
+
page: pagerState.page,
|
|
1686
|
+
rowsPerPage: pagerState.rowsPerPage,
|
|
1687
|
+
onPageChange,
|
|
1688
|
+
onRowsPerPageChange
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
"list"
|
|
1693
|
+
),
|
|
1694
|
+
/* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Button, { onClick: () => goToAddEdit(), children: "Agregar geocerca" }) })
|
|
1695
|
+
]
|
|
1696
|
+
}
|
|
1697
|
+
);
|
|
1734
1698
|
}
|
|
1735
1699
|
function TabsGpsTools() {
|
|
1736
|
-
const {
|
|
1737
|
-
getLabel
|
|
1738
|
-
} = useModuleDictionary();
|
|
1700
|
+
const { getLabel } = useModuleDictionary();
|
|
1739
1701
|
const status = useGpsToolsStore((state) => state.ownerState.status, shallow);
|
|
1740
1702
|
const currentTabTool = useGpsToolsStore((state) => state.currentTabGpsTool, shallow);
|
|
1741
|
-
const {
|
|
1742
|
-
setCurrentTabTool
|
|
1743
|
-
} = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
1703
|
+
const { setCurrentTabTool } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
1744
1704
|
const toolTabs = useMemo(() => {
|
|
1745
|
-
return [
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1705
|
+
return [
|
|
1706
|
+
{
|
|
1707
|
+
id: "geofences",
|
|
1708
|
+
icon: void 0,
|
|
1709
|
+
component: /* @__PURE__ */ jsx(GeofencesList, {}),
|
|
1710
|
+
label: getLabel(MAP_DICCTIONARY.LABEL_TAB_GEO),
|
|
1711
|
+
className: gpsToolsClasses.gpsToolsGeofencesList
|
|
1712
|
+
}
|
|
1713
|
+
];
|
|
1752
1714
|
}, [getLabel]);
|
|
1753
1715
|
useLayers();
|
|
1754
1716
|
if (status !== "ready") {
|
|
1755
1717
|
return null;
|
|
1756
1718
|
}
|
|
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
|
-
|
|
1719
|
+
return /* @__PURE__ */ jsxs(
|
|
1720
|
+
DivGpsToolsRoot,
|
|
1721
|
+
{
|
|
1722
|
+
className: gpsToolsClasses.gpsToolsRoot,
|
|
1723
|
+
children: [
|
|
1724
|
+
/* @__PURE__ */ jsx(
|
|
1725
|
+
Tabs,
|
|
1726
|
+
{
|
|
1727
|
+
value: currentTabTool,
|
|
1728
|
+
scrollButtons: "auto",
|
|
1729
|
+
variant: "scrollable",
|
|
1730
|
+
allowScrollButtonsMobile: true,
|
|
1731
|
+
onChange: (_e, value) => setCurrentTabTool(value),
|
|
1732
|
+
children: toolTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
1733
|
+
Tab,
|
|
1734
|
+
{
|
|
1735
|
+
value: tab.id,
|
|
1736
|
+
icon: tab.icon,
|
|
1737
|
+
label: tab.label,
|
|
1738
|
+
className: clsx(gpsToolsClasses.gpsToolsTab, tab.className),
|
|
1739
|
+
SKTWidth: "100px",
|
|
1740
|
+
SKTHeight: "14px"
|
|
1741
|
+
},
|
|
1742
|
+
tab.id
|
|
1743
|
+
))
|
|
1744
|
+
}
|
|
1745
|
+
),
|
|
1746
|
+
toolTabs.map((tab) => {
|
|
1747
|
+
const isMatched = tab.id === currentTabTool;
|
|
1748
|
+
return /* @__PURE__ */ jsx(
|
|
1749
|
+
TabContent,
|
|
1750
|
+
{
|
|
1751
|
+
className: clsx(
|
|
1752
|
+
gpsToolsClasses.gpsToolsTabContent,
|
|
1753
|
+
tab.className,
|
|
1754
|
+
isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
|
|
1755
|
+
),
|
|
1756
|
+
children: tab.component
|
|
1757
|
+
},
|
|
1758
|
+
tab.id
|
|
1759
|
+
);
|
|
1760
|
+
})
|
|
1761
|
+
]
|
|
1762
|
+
}
|
|
1763
|
+
);
|
|
1781
1764
|
}
|
|
1782
1765
|
function GpsTools() {
|
|
1783
1766
|
const isSkeleton = useModuleSkeleton();
|
|
1784
|
-
return /* @__PURE__ */ jsx(Fragment, {
|
|
1785
|
-
children: !isSkeleton && /* @__PURE__ */ jsx(TabsGpsTools, {})
|
|
1786
|
-
});
|
|
1767
|
+
return /* @__PURE__ */ jsx(Fragment, { children: !isSkeleton && /* @__PURE__ */ jsx(TabsGpsTools, {}) });
|
|
1787
1768
|
}
|
|
1788
1769
|
export {
|
|
1789
1770
|
GpsTools as G,
|