@m4l/components 1.0.21 → 1.0.23
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 +6 -6
- package/components/AccountPopover/{index.7687487c.js → index.5c97ab79.js} +3 -3
- package/components/AccountPopover/style.d.ts +2 -0
- package/components/AppBar/{index.16d8f79a.js → index.631dac35.js} +4 -4
- package/components/AppBar/styles.d.ts +2 -0
- package/components/CommonActions/components/ActionCancel/{index.d0adf9c4.js → index.4ec04ad9.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.c815247c.js → index.4d61b0fe.js} +4 -4
- package/components/CommonActions/components/ActionFormIntro/{index.f67b79e2.js → index.241ff066.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.6904d0ad.js → index.6c855294.js} +2 -2
- package/components/CommonActions/components/Actions/{index.dff2bcc7.js → index.2083f1d3.js} +1 -1
- package/components/CommonActions/components/Actions/styles.d.ts +2 -0
- package/components/DataGrid/classes/index.d.ts +1 -0
- package/components/DataGrid/classes/types.d.ts +1 -0
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.6fa4e6c3.js → index.371bcc46.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.59985444.js → index.efe5a903.js} +1 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/index.d.ts +2 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/types.d.ts +7 -0
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.94d1860d.js → index.8128c255.js} +1 -1
- package/components/DataGrid/formatters/ColumnPointsFormatter/{index.fc637564.js → index.ab152484.js} +1 -1
- package/components/DataGrid/formatters/index.84c30cd7.js +13 -0
- package/components/DataGrid/{index.768e62a6.js → index.3f13b6aa.js} +7 -5
- package/components/DataGrid/styles.d.ts +2 -0
- package/components/DataGrid/subcomponents/Actions/{index.39dcd931.js → index.feeb7987.js} +11 -11
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +8 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +2 -0
- package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +6 -0
- package/components/DragResizeWindow/DragResizeWindow.d.ts +3 -3
- package/components/DragResizeWindow/index.4e9cf2dc.js +477 -0
- package/components/DragResizeWindow/styled.d.ts +2 -0
- package/components/DynamicFilter/{dictionary.0991b837.js → dictionary.2241d3c2.js} +2 -2
- package/components/DynamicFilter/{index.1aa60703.js → index.94ef8a65.js} +4 -4
- package/components/DynamicFilter/slots/{dynamicFilterSlots.1edc8e23.js → dynamicFilterSlots.cff0c775.js} +5 -5
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +87 -0
- package/components/DynamicFilter/store/{index.0e0854ee.js → index.806ee1a5.js} +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/{index.f47f6ecc.js → index.e75e32be.js} +3 -3
- package/components/DynamicFilter/subcomponents/AppliedFilters/{index.caf0bb7f.js → index.5c30d4c9.js} +4 -4
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/{index.f4fe3a8e.js → index.9a3e7c86.js} +6 -6
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/{index.5c562061.js → index.abfd8da5.js} +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/{index.b53e2fdc.js → index.4937bcea.js} +3 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/{index.9fc191f0.js → index.09549b28.js} +3 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/{index.c002c8f2.js → index.bbca18ab.js} +4 -4
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/{index.12fc8d0c.js → index.4e1c56b6.js} +3 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/{index.e18e1229.js → index.9dd57d81.js} +5 -5
- package/components/DynamicFilter/subcomponents/FilterActions/{index.3266cd55.js → index.d13450e6.js} +3 -3
- package/components/DynamicFilter/subcomponents/InputFilter/{index.2de425a8.js → index.293ccf6f.js} +4 -4
- package/components/DynamicFilter/subcomponents/PopoverFilter/{index.3f270770.js → index.c5e7b96f.js} +6 -6
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/{index.ebd84aa5.js → index.aa8ff6d5.js} +2 -2
- package/components/FieldLabel/{index.15e78848.js → index.170296ed.js} +3 -3
- package/components/FieldLabel/styles.d.ts +2 -0
- package/components/GridLayout/{index.f5fb6d61.js → index.9e93facb.js} +2 -2
- package/components/GridLayout/styles.d.ts +2 -0
- package/components/GridLayout/subcomponents/Griditem/{index.b5c91d2a.js → index.225906d4.js} +1 -1
- package/components/GridLayout/subcomponents/Responsive/{index.a1179064.js → index.3cb5a032.js} +1 -1
- package/components/GridLayout/subcomponents/SizeProvider/{index.25dcc9bb.js → index.16747fc4.js} +1 -1
- package/components/HelperText/{index.f9b6e7a3.js → index.ad6b4907.js} +2 -2
- package/components/HelperText/styles.d.ts +2 -0
- package/components/Icon/{index.b1c014b0.js → index.8168aa10.js} +3 -3
- package/components/Icon/styles.d.ts +4 -0
- package/components/Image/{index.a011d2d2.js → index.92d522f9.js} +2 -2
- package/components/Image/styles.d.ts +2 -0
- package/components/LanguagePopover/{index.763ee58f.js → index.68640a8e.js} +4 -4
- package/components/LanguagePopover/styles.d.ts +6 -0
- package/components/LinearProgressIndeterminate/{index.c5cb15a1.js → index.9f87f47c.js} +1 -1
- package/components/LinearProgressIndeterminate/styles.d.ts +2 -0
- package/components/LoadingError/{index.884275da.js → index.32dc5ad7.js} +5 -5
- package/components/LoadingError/styles.d.ts +2 -0
- package/components/MFLoader/{index.dbb3fc5b.js → index.70b0984a.js} +2 -2
- package/components/MFLoader/styles.d.ts +2 -0
- package/components/ModalDialog/{index.f22ea160.js → index.22eb4873.js} +3 -3
- package/components/NavLink/{index.ab08b249.js → index.ddfdae0b.js} +2 -2
- package/components/NavLink/styles.d.ts +2 -0
- package/components/NoItemSelected/{index.873bbc59.js → index.9ac8f4c8.js} +1 -1
- package/components/NoItemSelected/styles.d.ts +5 -0
- package/components/ObjectLogs/{index.5e6f3846.js → index.032e25fb.js} +9 -9
- package/components/ObjectLogs/styles.d.ts +4 -0
- package/components/PDFViewer/{index.894a79af.js → index.0f8c84da.js} +2 -2
- package/components/PDFViewer/styles.d.ts +2 -0
- package/components/Page/{index.2b86e207.js → index.0268570c.js} +1 -1
- package/components/PaperForm/{index.56dab395.js → index.8a387dab.js} +2 -2
- package/components/PaperForm/styles.d.ts +7 -0
- package/components/Period/{index.dadd4318.js → index.c2efde10.js} +4 -4
- package/components/Period/styles.d.ts +7 -0
- package/components/PrintingSystem/{index.35ee772d.js → index.d3db73b0.js} +13 -13
- package/components/PrintingSystem/styles.d.ts +2 -0
- package/components/PrintingSystem/subcomponents/BodyNode/{index.eac1420d.js → index.0b481469.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.5e651869.js → index.6d961379.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.a0b30aab.js → index.9f5fccbf.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.93a43d5e.js → index.9cb21de9.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.89d57336.js → index.2e8b0108.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.e0d43d06.js → index.683901c4.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.18c1c0a7.js → index.c666cc89.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.75bd0076.js → index.46901d93.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.494cd47d.js → index.4107bf33.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.c8c69687.js → index.ebece5ce.js} +1 -1
- package/components/PropertyValue/{index.370a03cb.js → index.6445835e.js} +3 -3
- package/components/PropertyValue/styles.d.ts +2 -0
- package/components/Resizeable/{index.d1da09c9.js → index.57cbe2be.js} +1 -1
- package/components/ResizeableWindow/styles.d.ts +5 -0
- package/components/ScrollBar/{index.dc4726a5.js → index.56125bbf.js} +1 -1
- package/components/ScrollBar/styles.d.ts +9 -0
- package/components/SideBar/{index.d321beef.js → index.ed48577e.js} +5 -5
- 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/NavListSub/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +6 -0
- package/components/SideBar/subcomponents/ContentMobile/styles.d.ts +3 -0
- package/components/SplitLayout/{index.71372b7e.js → index.dcdc77e6.js} +1 -1
- package/components/SplitLayout/styles.d.ts +4 -0
- package/components/ToastContainer/{index.0b01e1e3.js → index.67f277fd.js} +2 -2
- package/components/ToastContainer/styles.d.ts +2 -0
- package/components/animate/AnimatedScroll/styles.d.ts +6 -0
- package/components/animate/LoadingScreen/{index.5bd42c8b.js → index.782f1eca.js} +1 -1
- package/components/animate/LoadingScreen/styles.d.ts +7 -0
- package/components/animate/PropagateLoader/syles.d.ts +2 -0
- package/components/animate/{index.f61a3540.js → index.3dddf2d3.js} +1 -1
- package/components/areas/components/AreasAdmin/{index.4bbd6b28.js → index.3c8301b9.js} +14 -14
- 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/AreasViewer/{index.8523c06d.js → index.9298ef7a.js} +13 -13
- package/components/areas/components/AreasViewer/styles.d.ts +2 -0
- 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.293de3ad.js → index.55cdde3e.js} +4 -4
- package/components/areas/hooks/useAreas/{index.62a5ceb8.js → index.5275e969.js} +1 -1
- package/components/commercial/AppBarCommercial/{index.5f904c81.js → index.9fa71fbe.js} +1 -1
- package/components/commercial/AppBarCommercial/styles.d.ts +2 -0
- package/components/commercial/HamburgerMenu/styles.d.ts +13 -0
- package/components/commercial/SectionCommercial/{index.8b231d7f.js → index.67cb0e24.js} +1 -1
- package/components/commercial/SectionCommercial/styles.d.ts +6 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/styles.d.ts +2 -0
- package/components/commercial/TopBar/{index.4fe28626.js → index.e307711a.js} +5 -5
- package/components/commercial/TopBar/style.d.ts +2 -0
- package/components/commercial/{index.12cb74f4.js → index.3b81acbf.js} +3 -3
- package/components/formatters/BooleanFormatter/{index.97b1d316.js → index.6b0373e0.js} +2 -2
- package/components/formatters/FormatterRoot/styles.d.ts +2 -0
- package/components/formatters/PointsFormatter/{index.6ad006b8.js → index.51cd6774.js} +0 -2
- package/components/formatters/{index.161191d7.js → index.a0d79071.js} +2 -2
- package/components/hook-form/HelperError/{index.453b8be1.js → index.6b671a90.js} +1 -1
- package/components/hook-form/RHFAutocomplete/{index.9b605832.js → index.0c0f1166.js} +6 -6
- 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.18b4663a.js → index.98c0c8b1.js} +2 -2
- package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +5 -0
- package/components/hook-form/RHFCheckbox/{index.66a883f7.js → index.93b8e70f.js} +3 -3
- package/components/hook-form/RHFCheckbox/styles.d.ts +7 -0
- package/components/hook-form/RHFColorPicker/{index.2962d572.js → index.d6edb266.js} +6 -6
- package/components/hook-form/RHFColorPicker/styles.d.ts +2 -0
- package/components/hook-form/RHFDateTime/{index.c37bf0d0.js → index.d793e753.js} +4 -4
- package/components/hook-form/RHFDateTime/styles.d.ts +2 -0
- package/components/hook-form/RHFPeriod/{index.2edd24fe.js → index.f298b64d.js} +4 -4
- package/components/hook-form/RHFPeriod/styles.d.ts +2 -0
- package/components/hook-form/RHFTextField/{index.b9d95bd9.js → index.8ca96674.js} +4 -4
- 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/RHFTextFieldPassword/styles.d.ts +2 -0
- 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.9759a7a4.js → index.07ebbfc1.js} +5 -5
- package/components/maps/components/GpsTools/{index.94055337.js → index.a19df7ba.js} +558 -402
- package/components/maps/components/Map/constants.d.ts +1 -0
- package/components/maps/components/Map/external/googleMutant/index.d.ts +65 -0
- package/components/maps/components/Map/icons.d.ts +1 -7
- package/components/maps/components/Map/{index.9edada74.js → index.ccb0be2e.js} +29 -31
- package/components/maps/components/Map/styled.d.ts +2 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/types.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/MapGpsTools/MapGpsTools.d.ts +1 -0
- package/components/maps/components/{GpsTools → MapGpsTools}/classes/index.d.ts +1 -1
- package/components/maps/components/{GpsTools → MapGpsTools}/classes/types.d.ts +1 -0
- package/components/maps/components/{GpsTools → MapGpsTools}/constants.d.ts +2 -2
- package/components/maps/components/MapGpsTools/dictionary.d.ts +67 -0
- package/components/maps/components/MapGpsTools/icons.d.ts +23 -0
- package/components/maps/components/{GpsTools → MapGpsTools}/index.d.ts +1 -1
- package/components/maps/components/MapGpsTools/styles.d.ts +2 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/index.d.ts +11 -0
- package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useDrawing.d.ts +1 -1
- package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useValidation.d.ts +6 -6
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles.d.ts +1 -0
- package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/validations.d.ts +2 -2
- package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.d.ts +1 -1
- package/components/maps/components/{GpsTools/subcomponents/TabsGpsTools/index.d.ts → MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/types.d.ts} +1 -2
- package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns.d.ts +1 -1
- package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useMaster.d.ts +1 -1
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.d.ts +6 -0
- package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/model.d.ts +1 -1
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/types.d.ts +8 -0
- package/components/maps/index.d.ts +1 -1
- package/components/modal/{WindowBase.c7d14de4.js → WindowBase.58fc327c.js} +3 -3
- package/components/modal/{WindowConfirm.eaec0ee1.js → WindowConfirm.746fdae7.js} +13 -7
- package/components/mui_extended/Accordion/{index.289b1eea.js → index.fd3b659c.js} +4 -4
- package/components/mui_extended/Accordion/styles.d.ts +4 -0
- package/components/mui_extended/Avatar/{index.f8d0e601.js → index.3ebe1a4b.js} +1 -1
- package/components/mui_extended/Avatar/styles.d.ts +2 -0
- package/components/mui_extended/Badge/{index.a5948eb1.js → index.ecd151e9.js} +1 -1
- package/components/mui_extended/Badge/styles.d.ts +2 -0
- package/components/mui_extended/Button/{index.1f534053.js → index.dc43db94.js} +3 -3
- package/components/mui_extended/Button/styles.d.ts +5 -0
- package/components/mui_extended/CheckBox/styles.d.ts +2 -0
- package/components/mui_extended/{CheckBox.36838947.js → CheckBox.ea329fff.js} +2 -2
- package/components/mui_extended/IconButton/{index.40a12fe0.js → index.3284f1d5.js} +2 -2
- package/components/mui_extended/IconButton/styles.d.ts +2 -0
- package/components/mui_extended/ImageButton/styles.d.ts +2 -0
- package/components/mui_extended/LoadingButton/styles.d.ts +2 -0
- package/components/mui_extended/MenuActions/{index.fdc64d2c.js → index.9e3d7f5d.js} +5 -5
- package/components/mui_extended/MenuActions/styles.d.ts +5 -0
- package/components/mui_extended/Pager/{index.6b48325e.js → index.ef526d95.js} +4 -4
- package/components/mui_extended/Pager/styles.d.ts +2 -0
- package/components/mui_extended/Popover/{index.1758efd3.js → index.57cd2dc0.js} +2 -2
- 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/{index.84103b22.js → index.0c52ffa7.js} +1 -1
- package/components/mui_extended/Stack/styles.d.ts +4 -0
- package/components/mui_extended/Tab/{index.35947f79.js → index.c0a8e330.js} +1 -1
- package/components/mui_extended/Tab/styles.d.ts +3 -0
- package/components/mui_extended/TabContent/styles.d.ts +2 -0
- package/components/mui_extended/Tabs/styles.d.ts +4 -0
- package/components/mui_extended/ToggleButton/{index.f0890b7c.js → index.560c0a3c.js} +1 -1
- package/components/mui_extended/ToggleIconButton/{index.9e8ea15b.js → index.98d85395.js} +1 -1
- package/components/mui_extended/Typography/{index.ddde0fc7.js → index.5a14dd12.js} +1 -1
- package/components/mui_extended/Typography/styles.d.ts +2 -0
- package/components/popups/PopupsProvider/{index.156f6fb2.js → index.b3bb56b7.js} +35 -6
- package/components/popups/PopupsViewer/{index.f36f3bcc.js → index.0f579946.js} +61 -28
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +20 -2
- package/components/popups/components/PopupsViewer/classes/index.d.ts +3 -1
- package/components/popups/components/PopupsViewer/classes/types.d.ts +3 -1
- package/components/popups/components/PopupsViewer/icons.d.ts +1 -0
- package/components/popups/components/PopupsViewer/styled.d.ts +2 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/index.d.ts +2 -1
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/EditionInfo/index.d.ts +2 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/EditionInfo/types.d.ts +2 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +5 -0
- package/contexts/ModalContext/{index.72e60f98.js → index.141fdede.js} +1 -1
- package/contexts/RHFormContext/{index.d9efc253.js → index.8cfee498.js} +1 -1
- package/contexts/RHFormContext/styles.d.ts +2 -0
- package/hooks/useFormAddEdit/{index.4738a32a.js → index.f4f4dccd.js} +2 -2
- package/hooks/useModal/{index.e77737dd.js → index.70c3f0b5.js} +1 -1
- package/hooks/useTab/{index.93e7cf1d.js → index.6f39459c.js} +1 -1
- package/index.js +130 -129
- package/package.json +3 -4
- package/style.css +65 -0
- package/styles/{index.b0a69054.js → index.379fa100.js} +14 -47
- package/components/DataGrid/formatters/index.2c2f0ae4.js +0 -1
- package/components/DragResizeWindow/index.4fea43a8.js +0 -480
- package/components/maps/components/GpsTools/GpsTools.d.ts +0 -1
- package/components/maps/components/GpsTools/icons.d.ts +0 -15
- /package/components/maps/components/{GpsTools → MapGpsTools}/contexts/GpsToolsContext/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/contexts/GpsToolsContext/store.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/contexts/GpsToolsContext/types.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/hooks/useGpsToolsStore/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/hooks/useLayers/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/constants.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/helpers.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSubmit.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSumbitErrorsFocus.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/types.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/types.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/validations.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/types.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/FillData/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/types.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/types.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedFeatures.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedGeofences.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/GeofencesList/subcomponents/Filter/index.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/subcomponents/TabsGpsTools/subcomponents/constants.d.ts +0 -0
- /package/components/maps/components/{GpsTools → MapGpsTools}/types.d.ts +0 -0
|
@@ -1,240 +1,47 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { u as useMapStore, C as CommonFeatureRender, b as MAP_DICCTIONARY } from "../Map/index.9edada74.js";
|
|
2
|
+
import { useEnvironment, useModuleDictionary, useHostTools, useNetwork, useModulePrivileges, usePaginate, useModuleSkeleton } from "@m4l/core";
|
|
3
|
+
import { useState, useMemo, useCallback, useRef, useEffect, createContext, useContext } from "react";
|
|
5
4
|
import { shallow } from "zustand/shallow";
|
|
6
|
-
import { createStore, useStore } from "zustand";
|
|
7
|
-
import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
8
|
-
import { devtools } from "zustand/middleware";
|
|
9
|
-
import { immer } from "zustand/middleware/immer";
|
|
10
|
-
import { enableMapSet } from "immer";
|
|
11
5
|
import "@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css";
|
|
12
6
|
import "@geoman-io/leaflet-geoman-free";
|
|
13
|
-
import { au as RHFormProviderStyled, av as StackGeofenceListRoot, aw as DivGpsToolsRoot } from "../../../../styles/index.b0a69054.js";
|
|
14
|
-
import { generateUtilityClasses } from "@mui/material";
|
|
15
|
-
import "@mui/base";
|
|
16
7
|
import clsx from "clsx";
|
|
17
|
-
import {
|
|
8
|
+
import { au as RHFormProviderStyled, av as StackGeofenceListRoot, aw as DivTabGpsToolsRoot } from "../../../../styles/index.379fa100.js";
|
|
9
|
+
import { D as DynamicFilter } from "../../../DynamicFilter/index.94ef8a65.js";
|
|
10
|
+
import { C as ColumnIconFormatter } from "../../../DataGrid/formatters/index.84c30cd7.js";
|
|
18
11
|
import { C as ColumnDateFormatter } from "../../../DataGrid/formatters/ColumnDateFormatter/index.e00d0cf2.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
12
|
+
import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
13
|
+
import { useFormContext, useWatch, useFormState } from "react-hook-form";
|
|
14
|
+
import { H as HelperError } from "../../../hook-form/HelperError/index.6b671a90.js";
|
|
15
|
+
import { u as useModal } from "../../../../hooks/useModal/index.70c3f0b5.js";
|
|
16
|
+
import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.b3bb56b7.js";
|
|
17
|
+
import { createStore, useStore } from "zustand";
|
|
18
|
+
import { devtools } from "zustand/middleware";
|
|
19
|
+
import { immer } from "zustand/middleware/immer";
|
|
20
|
+
import { enableMapSet } from "immer";
|
|
21
|
+
import { A as ActionFormIntro } from "../../../CommonActions/components/ActionFormIntro/index.241ff066.js";
|
|
22
|
+
import { W as WindowConfirm } from "../../../modal/WindowConfirm.746fdae7.js";
|
|
23
|
+
import { A as Actions } from "../../../CommonActions/components/Actions/index.2083f1d3.js";
|
|
24
|
+
import { B as Button } from "../../../mui_extended/Button/index.dc43db94.js";
|
|
25
25
|
import { useMap } from "react-leaflet";
|
|
26
|
-
import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index.f60f500e.js";
|
|
27
26
|
import * as L from "leaflet";
|
|
28
|
-
import { u as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { R as
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
27
|
+
import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index.f60f500e.js";
|
|
28
|
+
import { u as useTab } from "../../../../hooks/useTab/index.6f39459c.js";
|
|
29
|
+
import { generateUtilityClasses } from "@mui/material";
|
|
30
|
+
import "@mui/base";
|
|
31
|
+
import { P as PaperForm } from "../../../PaperForm/index.8a387dab.js";
|
|
32
|
+
import { R as RHFAutocomplete } from "../../../hook-form/RHFAutocomplete/index.0c0f1166.js";
|
|
33
|
+
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.8ca96674.js";
|
|
34
|
+
import { S as Stack } from "../../../mui_extended/Stack/index.0c52ffa7.js";
|
|
35
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.3284f1d5.js";
|
|
36
|
+
import { P as PropertyValue } from "../../../PropertyValue/index.6445835e.js";
|
|
37
|
+
import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index.d6edb266.js";
|
|
38
|
+
import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index.c0a8e330.js";
|
|
39
|
+
import { I as Icon } from "../../../Icon/index.8168aa10.js";
|
|
37
40
|
import * as Yup from "yup";
|
|
38
|
-
import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.
|
|
39
|
-
import { u as
|
|
40
|
-
import {
|
|
41
|
-
|
|
42
|
-
enableMapSet();
|
|
43
|
-
const createGpsToolsStore = (initProps) => {
|
|
44
|
-
const startProps = {
|
|
45
|
-
currentTabGpsTool: "geofences",
|
|
46
|
-
geofenceState: {
|
|
47
|
-
rows: [],
|
|
48
|
-
checkedGeofences: /* @__PURE__ */ new Set(),
|
|
49
|
-
checkedCrossingFeatures: /* @__PURE__ */ new Set(),
|
|
50
|
-
checkedInternalFeatures: /* @__PURE__ */ new Set(),
|
|
51
|
-
hashGeofences: {}
|
|
52
|
-
},
|
|
53
|
-
...initProps
|
|
54
|
-
};
|
|
55
|
-
return createStore(
|
|
56
|
-
devtools(
|
|
57
|
-
immer((set, _get) => ({
|
|
58
|
-
...startProps,
|
|
59
|
-
gpsToolsActions: {
|
|
60
|
-
init: () => {
|
|
61
|
-
set((state) => {
|
|
62
|
-
state.ownerState.status = "ready";
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
setGpsToolsState: (status) => {
|
|
66
|
-
set((state) => {
|
|
67
|
-
state.ownerState.status = status;
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
setHandlerGetLabel: (newHandler) => {
|
|
71
|
-
set((state) => {
|
|
72
|
-
state.getLabel = newHandler;
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
setExternalState: (newExternalState) => {
|
|
76
|
-
set((state) => {
|
|
77
|
-
state.ownerState = { ...state.ownerState, ...newExternalState };
|
|
78
|
-
});
|
|
79
|
-
},
|
|
80
|
-
setCurrentTabTool: (newTabTool) => {
|
|
81
|
-
set((state) => {
|
|
82
|
-
state.currentTabGpsTool = newTabTool;
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
geofenceActions: {
|
|
87
|
-
addGeofence: (geofenceId, geofence) => {
|
|
88
|
-
set((state) => {
|
|
89
|
-
state.geofenceState.hashGeofences[geofenceId] = geofence;
|
|
90
|
-
});
|
|
91
|
-
},
|
|
92
|
-
updatePartialGeofence: (geofenceId, geofence) => {
|
|
93
|
-
set((state) => {
|
|
94
|
-
state.geofenceState.hashGeofences[geofenceId] = {
|
|
95
|
-
...state.geofenceState.hashGeofences[geofenceId],
|
|
96
|
-
...geofence
|
|
97
|
-
};
|
|
98
|
-
});
|
|
99
|
-
},
|
|
100
|
-
updateRows: (newRows) => {
|
|
101
|
-
set((state) => {
|
|
102
|
-
state.geofenceState.rows = newRows;
|
|
103
|
-
});
|
|
104
|
-
},
|
|
105
|
-
addCheckedGeofence: (geofenceId) => {
|
|
106
|
-
set((state) => {
|
|
107
|
-
state.geofenceState.checkedGeofences.add(geofenceId);
|
|
108
|
-
state.geofenceState.checkedGeofences = new Set(state.geofenceState.checkedGeofences);
|
|
109
|
-
});
|
|
110
|
-
},
|
|
111
|
-
removeCheckedGeofence: (geofenceId) => {
|
|
112
|
-
set((state) => {
|
|
113
|
-
state.geofenceState.checkedGeofences.delete(geofenceId);
|
|
114
|
-
state.geofenceState.checkedGeofences = new Set(state.geofenceState.checkedGeofences);
|
|
115
|
-
});
|
|
116
|
-
},
|
|
117
|
-
setCheckedGeofences: (newGeofences) => {
|
|
118
|
-
set((state) => {
|
|
119
|
-
state.geofenceState.checkedGeofences = new Set(newGeofences);
|
|
120
|
-
});
|
|
121
|
-
},
|
|
122
|
-
setCheckedCrossingFeatures: (newFeatures) => {
|
|
123
|
-
set((state) => {
|
|
124
|
-
state.geofenceState.checkedCrossingFeatures = new Set(newFeatures);
|
|
125
|
-
});
|
|
126
|
-
},
|
|
127
|
-
setCheckedInternalFeatures: (newFeatures) => {
|
|
128
|
-
set((state) => {
|
|
129
|
-
state.geofenceState.checkedInternalFeatures = new Set(newFeatures);
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
})),
|
|
134
|
-
{ name: `Map Tools Store` }
|
|
135
|
-
)
|
|
136
|
-
);
|
|
137
|
-
};
|
|
138
|
-
const GpsToolsContext = createContext(null);
|
|
139
|
-
function GpsToolsProvider(props) {
|
|
140
|
-
const { children } = props;
|
|
141
|
-
const { getLabel } = useModuleDictionary();
|
|
142
|
-
const isDesktop = useResponsiveDesktop();
|
|
143
|
-
const isSkeleton = useModuleSkeleton();
|
|
144
|
-
const isFirstRender = useFirstRender([getLabel]);
|
|
145
|
-
const mapStoreRef = useRef();
|
|
146
|
-
if (!mapStoreRef.current) {
|
|
147
|
-
mapStoreRef.current = createGpsToolsStore({
|
|
148
|
-
getLabel,
|
|
149
|
-
ownerState: {
|
|
150
|
-
status: "init",
|
|
151
|
-
isMobile: !isDesktop,
|
|
152
|
-
isSkeleton,
|
|
153
|
-
focus: false
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
const { setHandlerGetLabel, setExternalState } = useStore(
|
|
158
|
-
mapStoreRef.current,
|
|
159
|
-
(state) => state.gpsToolsActions,
|
|
160
|
-
shallow
|
|
161
|
-
);
|
|
162
|
-
useEffect(() => {
|
|
163
|
-
if (!isFirstRender) {
|
|
164
|
-
setHandlerGetLabel(getLabel);
|
|
165
|
-
}
|
|
166
|
-
}, [getLabel]);
|
|
167
|
-
useEffect(() => {
|
|
168
|
-
if (isFirstRender) {
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
setExternalState({ isMobile: !isDesktop, isSkeleton });
|
|
172
|
-
}, [isDesktop, isSkeleton]);
|
|
173
|
-
return /* @__PURE__ */ jsx(GpsToolsContext.Provider, { value: mapStoreRef.current, children });
|
|
174
|
-
}
|
|
175
|
-
function useGpsToolsStore(selector, equalityFn) {
|
|
176
|
-
const context = useContext(GpsToolsContext);
|
|
177
|
-
if (!context)
|
|
178
|
-
throw new Error("useGpsToolsStore context must be use inside GpsToolsContext");
|
|
179
|
-
return useStore(context, selector, equalityFn);
|
|
180
|
-
}
|
|
181
|
-
const ENDPOINT_GEOFENCE_GET = "geofences";
|
|
182
|
-
const ENDPOINT_GEOFENCE_NEW_EDIT = "geofences";
|
|
183
|
-
var GeofencesFeaturesLayers = /* @__PURE__ */ ((GeofencesFeaturesLayers2) => {
|
|
184
|
-
GeofencesFeaturesLayers2["LAYER_GEOFENCES"] = "geofences";
|
|
185
|
-
GeofencesFeaturesLayers2["LAYER_GEOFENCES_TRANSIT_FEATURES"] = "geofencesCrossingFeatures";
|
|
186
|
-
GeofencesFeaturesLayers2["LAYER_GEOFENCES_INTERNAL_FEATURES"] = "geofencesInternalFeatures";
|
|
187
|
-
return GeofencesFeaturesLayers2;
|
|
188
|
-
})(GeofencesFeaturesLayers || {});
|
|
189
|
-
function useLayers() {
|
|
190
|
-
const { addLayer, removeLayer } = useMapStore((state) => state.mapActions, shallow);
|
|
191
|
-
const { init } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
192
|
-
useEffect(() => {
|
|
193
|
-
addLayer({
|
|
194
|
-
layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES,
|
|
195
|
-
name: "Geocercas",
|
|
196
|
-
renderFeature: CommonFeatureRender,
|
|
197
|
-
geoJsonObject: {
|
|
198
|
-
object: {
|
|
199
|
-
type: "FeatureCollection",
|
|
200
|
-
features: []
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
autoFocus: false
|
|
204
|
-
});
|
|
205
|
-
addLayer({
|
|
206
|
-
layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES,
|
|
207
|
-
name: "Geometr\xEDas de tr\xE1nsito",
|
|
208
|
-
renderFeature: CommonFeatureRender,
|
|
209
|
-
geoJsonObject: {
|
|
210
|
-
object: {
|
|
211
|
-
type: "FeatureCollection",
|
|
212
|
-
features: []
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
autoFocus: false
|
|
216
|
-
});
|
|
217
|
-
addLayer({
|
|
218
|
-
layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES,
|
|
219
|
-
name: "Geometr\xEDas internas",
|
|
220
|
-
renderFeature: CommonFeatureRender,
|
|
221
|
-
geoJsonObject: {
|
|
222
|
-
object: {
|
|
223
|
-
type: "FeatureCollection",
|
|
224
|
-
features: []
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
autoFocus: false
|
|
228
|
-
});
|
|
229
|
-
init();
|
|
230
|
-
return () => {
|
|
231
|
-
removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES);
|
|
232
|
-
removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES);
|
|
233
|
-
removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES);
|
|
234
|
-
};
|
|
235
|
-
}, []);
|
|
236
|
-
}
|
|
237
|
-
const COMPONENT_CLASS_NAME = "M4LGpsTools";
|
|
41
|
+
import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.f4f4dccd.js";
|
|
42
|
+
import { u as useMapStore, C as CommonFeatureRender, G as GPS_TOOLS_POPUP_ID } from "../Map/index.ccb0be2e.js";
|
|
43
|
+
import { D as DataGrid } from "../../../DataGrid/index.3f13b6aa.js";
|
|
44
|
+
const COMPONENT_CLASS_NAME = "M4LMapGpsTools";
|
|
238
45
|
const COMPONENT_MAP_TOOLS_ID = "gps_tools";
|
|
239
46
|
const STYLE_OPACITIES = [
|
|
240
47
|
{
|
|
@@ -305,25 +112,89 @@ const gpsToolsClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
|
305
112
|
"gpsToolsGeofencesList",
|
|
306
113
|
"gpsToolsGeofencesAddEdit",
|
|
307
114
|
"gpsToolsGeofencesAddEditContent",
|
|
115
|
+
"gpsToolsGeofencesAddEditDrawFinishContainer",
|
|
308
116
|
"toolGeofencesAddEditGeneral",
|
|
309
117
|
"toolGeofencesAddEditStyle",
|
|
310
118
|
"visible",
|
|
311
119
|
"hidden"
|
|
312
120
|
]);
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
121
|
+
const MAP_GPSTOOLS_DICCTIONARY = {
|
|
122
|
+
LABEL_GPSTOOLS_NAME: "label_gpstools_name",
|
|
123
|
+
ACTION_GEOFENCE_ADD: "action_geofence_add",
|
|
124
|
+
ACTION_GEOFENCE_EDIT: "action_geofence_edit",
|
|
125
|
+
ROW_ACTION_GEO_EDIT: "row_action_geo_edit",
|
|
126
|
+
ROW_ACTION_GEO_ENABLE: "row_action_geo_enable",
|
|
127
|
+
ROW_ACTION_GEO_DISABLE: "row_action_geo_disable",
|
|
128
|
+
ROW_ACTION_GEO_DELETE: "row_action_geo_delete",
|
|
129
|
+
LABEL_TAB_GEO: "label_tab_geo",
|
|
130
|
+
TAB_GENERAL_CONFIG_TOOLTIP: "tab_general_config_tooltip",
|
|
131
|
+
PAPER_GENERAL: "paper_general",
|
|
132
|
+
LABEL_ID: "label_id",
|
|
133
|
+
LABEL_NAME: "label_name",
|
|
134
|
+
LABEL_GEOMETRY_TYPE: "label_geometry_type",
|
|
135
|
+
LABEL_GEOMETRY_CIRCLE: "label_geometry_circle",
|
|
136
|
+
LABEL_GEOMETRY_RECTANGLE: "label_geometry_rectangle",
|
|
137
|
+
LABEL_GEOMETRY_POLYGON: "label_geometry_polygon",
|
|
138
|
+
LABEL_DRAW: "label_draw",
|
|
139
|
+
LABEL_FINISH: "label_finish",
|
|
140
|
+
PAPER_CONFIG: "paper_config",
|
|
141
|
+
LABEL_ALIAS: "label_alias",
|
|
142
|
+
LABEL_CUSTOMER_ID: "label_customer_id",
|
|
143
|
+
LABEL_TIME_MIN_IN_SECONDS: "label_time_min_in_seconds",
|
|
144
|
+
LABEL_TIME_MIN_OUT_SECONDS: "label_time_min_out_seconds",
|
|
145
|
+
TAB_STYLE_CONFIG_TOOLTIP: "tab_style_tooltip",
|
|
146
|
+
PAPER_STROKE: "paper_stroke",
|
|
147
|
+
LABEL_COLOR: "label_color",
|
|
148
|
+
LABEL_OPACITY: "label_opacity",
|
|
149
|
+
LABEL_WEIGHT: "label_weight",
|
|
150
|
+
LABEL_DASH_ARRAY: "label_dash_array",
|
|
151
|
+
LABEL_DASH_OFFSET: "label_dash_offset",
|
|
152
|
+
PAPER_FILL: "paper_fill",
|
|
153
|
+
LABEL_RADIUS: "label_radius",
|
|
154
|
+
LABEL_LAT: "label_lat",
|
|
155
|
+
LABEL_LON: "label_lon",
|
|
156
|
+
LABEL_PLACE_MARKER: "label_place_marker",
|
|
157
|
+
LABEL_FIRST_VERTEX: "label_first_vertex",
|
|
158
|
+
LABEL_CONTINUE_LINE: "label_continue_line",
|
|
159
|
+
LABEL_FINISH_LINE: "label_finish_line",
|
|
160
|
+
LABEL_FINISH_POLY: "label_finish_poly",
|
|
161
|
+
LABEL_FINISH_RECT: "label_finish_rect",
|
|
162
|
+
LABEL_START_CIRCLE: "label_start_circle",
|
|
163
|
+
LABEL_FINISH_CIRCLE: "label_finish_circle",
|
|
164
|
+
LABEL_PLACE_CIRCLE_MARKER: "label_place_circle_marker",
|
|
165
|
+
VALIDATION_GEOMETRY_REQUIRED: "validation_geometry_required",
|
|
166
|
+
VALIDATION_FIELD_REQUIRED: "validation_field_required",
|
|
167
|
+
VALIDATION_FIELD_TYPE_NUMBER_ERROR: "validation_field_type_number_error",
|
|
168
|
+
VALIDATION_FIELD_MIN_NUMBER_ERROR: "validation_field_min_number_error",
|
|
169
|
+
LABEL_VIEW_TRANSIT_FEATURES: "label_view_crossing_features",
|
|
170
|
+
LABEL_VIEW_INTERNAL_FEATURES: "label_view_internal_features",
|
|
171
|
+
LABEL_CREATED_AT: "label_created_at",
|
|
172
|
+
LABEL_UPDATED_AT: "label_updated_at",
|
|
173
|
+
MODAL_DELETE_GEO_TITLE: "modal_delete_geo_title",
|
|
174
|
+
MODAL_DELETE_GEO_MESSAGE: "modal_delete_geo_message",
|
|
175
|
+
MODAL_DISABLE_GEO_TITLE: "modal_disable_geo_title",
|
|
176
|
+
MODAL_DISABLE_MESSAGE: "modal_disable_geo_message",
|
|
177
|
+
ACTION_CANCEL: "action_cancel"
|
|
178
|
+
};
|
|
179
|
+
const MAP_GPSTOOLS_ICONS = {
|
|
180
|
+
MAP_GPS_TOOLS_TOOL: "cmp_map_gpstools_tool.svg",
|
|
181
|
+
GEOFENCES: "cmp_map_gpstools_geofences.svg",
|
|
182
|
+
GEOFENCE_ID: "cmp_map_gpstools_geofence_id.svg",
|
|
183
|
+
GEOFENCE_NAME: "cmp_map_gpstools_geofence_name.svg",
|
|
184
|
+
GEOFENCE_ADD: "cmp_map_gpstools_add-geofence.svg",
|
|
185
|
+
GEOFENCE_EDIT: "cmp_map_gpstools_edit-geofence.svg",
|
|
186
|
+
GEOFENCE_DELETE: "cmp_map_gpstools_delete-geofence.svg",
|
|
187
|
+
GENERAL: "cmp_map_gpstools_general.svg",
|
|
188
|
+
DATA: "cmp_map_gpstools_data.svg",
|
|
189
|
+
STYLE: "cmp_map_gpstools_style.svg",
|
|
190
|
+
GEOFENCE_DRAW: "cmp_map_gpstools_draw.svg",
|
|
191
|
+
GEOFENCE_FINISH: "cmp_map_gpstools_finish.svg",
|
|
192
|
+
GEOFENCE_TYPE_CIRCLE: "cmp_map_gpstools_circle.svg",
|
|
193
|
+
GEOFENCE_TYPE_RECTANGLE: "cmp_map_gpstools_rectangle.svg",
|
|
194
|
+
GEOFENCE_TYPE_POLYGON: "cmp_map_gpstools_polygon.svg",
|
|
195
|
+
CONFIG: "cmp_map_gpstools_config.svg",
|
|
196
|
+
STROKE: "cmp_map_gpstools_stroke.svg",
|
|
197
|
+
FILL: "cmp_map_gpstools_fill.svg"
|
|
327
198
|
};
|
|
328
199
|
function Filter(props) {
|
|
329
200
|
const { refresh, setBackendQueryParams } = props;
|
|
@@ -345,19 +216,19 @@ function Filter(props) {
|
|
|
345
216
|
fields: [
|
|
346
217
|
{
|
|
347
218
|
name: "id",
|
|
348
|
-
dictionaryId:
|
|
219
|
+
dictionaryId: MAP_GPSTOOLS_DICCTIONARY.LABEL_ID,
|
|
349
220
|
type: "number",
|
|
350
221
|
multiple: true,
|
|
351
222
|
presence: "optional",
|
|
352
|
-
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${
|
|
223
|
+
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_ID}`
|
|
353
224
|
},
|
|
354
225
|
{
|
|
355
226
|
name: "name",
|
|
356
|
-
dictionaryId:
|
|
227
|
+
dictionaryId: MAP_GPSTOOLS_DICCTIONARY.LABEL_NAME,
|
|
357
228
|
type: "string",
|
|
358
229
|
multiple: true,
|
|
359
230
|
presence: "optional",
|
|
360
|
-
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${
|
|
231
|
+
urlIcon: `${host_static_assets}/${environment_assets}/components/${COMPONENT_MAP_TOOLS_ID}/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_NAME}`
|
|
361
232
|
}
|
|
362
233
|
],
|
|
363
234
|
initialAppliedFilters: initialFilter
|
|
@@ -366,24 +237,48 @@ function Filter(props) {
|
|
|
366
237
|
}
|
|
367
238
|
function useColumns(_props) {
|
|
368
239
|
const { getLabel } = useModuleDictionary();
|
|
240
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
369
241
|
const columns = useMemo(
|
|
370
242
|
() => [
|
|
371
243
|
{
|
|
372
244
|
key: "id",
|
|
373
|
-
name: getLabel(
|
|
245
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_ID),
|
|
374
246
|
type: "number",
|
|
375
247
|
width: 40,
|
|
376
248
|
visible: false
|
|
377
249
|
},
|
|
250
|
+
{
|
|
251
|
+
key: "geometry",
|
|
252
|
+
name: "",
|
|
253
|
+
type: "string",
|
|
254
|
+
formatter: ColumnIconFormatter({
|
|
255
|
+
getIconUrl: (formatterRowProps) => {
|
|
256
|
+
const { row } = formatterRowProps;
|
|
257
|
+
let iconUrl;
|
|
258
|
+
if (row.type.id === "gt_polygon") {
|
|
259
|
+
iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_POLYGON;
|
|
260
|
+
} else if (row.type.id === "gt_circle") {
|
|
261
|
+
iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_CIRCLE;
|
|
262
|
+
} else {
|
|
263
|
+
iconUrl = MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_RECTANGLE;
|
|
264
|
+
}
|
|
265
|
+
return {
|
|
266
|
+
iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${iconUrl}`
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
}),
|
|
270
|
+
width: 30,
|
|
271
|
+
minWidth: 25
|
|
272
|
+
},
|
|
378
273
|
{
|
|
379
274
|
key: "name",
|
|
380
|
-
name: getLabel(
|
|
275
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_NAME),
|
|
381
276
|
type: "string",
|
|
382
|
-
width:
|
|
277
|
+
width: 220
|
|
383
278
|
},
|
|
384
279
|
{
|
|
385
280
|
key: "created_at",
|
|
386
|
-
name: getLabel(
|
|
281
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_CREATED_AT),
|
|
387
282
|
type: "date",
|
|
388
283
|
formatter: ColumnDateFormatter({
|
|
389
284
|
presentationType: "datetime",
|
|
@@ -393,7 +288,7 @@ function useColumns(_props) {
|
|
|
393
288
|
},
|
|
394
289
|
{
|
|
395
290
|
key: "updated_at",
|
|
396
|
-
name: getLabel(
|
|
291
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_UPDATED_AT),
|
|
397
292
|
type: "date",
|
|
398
293
|
formatter: ColumnDateFormatter({
|
|
399
294
|
presentationType: "datetime",
|
|
@@ -409,13 +304,36 @@ function useColumns(_props) {
|
|
|
409
304
|
function MyActions(props) {
|
|
410
305
|
const { geofenceId } = props;
|
|
411
306
|
const { control } = useFormContext();
|
|
307
|
+
const { getLabel } = useModuleDictionary();
|
|
308
|
+
const { openModal } = useModal();
|
|
412
309
|
const inEdition = useWatch({
|
|
413
310
|
control,
|
|
414
311
|
name: "inEdition"
|
|
415
312
|
});
|
|
313
|
+
const { isDirty } = useFormState({
|
|
314
|
+
control
|
|
315
|
+
});
|
|
416
316
|
const { closePopup, showPopup } = usePopupsStore((state) => state.popupsActions);
|
|
417
317
|
const { addCheckedGeofence } = useGpsToolsStore((state) => state.geofenceActions);
|
|
418
|
-
const
|
|
318
|
+
const onClickCancelLocal = useCallback(() => {
|
|
319
|
+
if (isDirty) {
|
|
320
|
+
openModal({
|
|
321
|
+
window: /* @__PURE__ */ jsx(
|
|
322
|
+
WindowConfirm,
|
|
323
|
+
{
|
|
324
|
+
variant: "warning",
|
|
325
|
+
title: getLabel("common_actions.confirm_quit_title"),
|
|
326
|
+
msg: getLabel("common_actions.confirm_quit_msg"),
|
|
327
|
+
onClickIntro: onConfirmQuit
|
|
328
|
+
}
|
|
329
|
+
),
|
|
330
|
+
variant: "warning"
|
|
331
|
+
});
|
|
332
|
+
} else {
|
|
333
|
+
onConfirmQuit();
|
|
334
|
+
}
|
|
335
|
+
}, [getLabel, isDirty, openModal]);
|
|
336
|
+
const onConfirmQuit = () => {
|
|
419
337
|
closePopup("geofencesAddEdit");
|
|
420
338
|
if (geofenceId !== void 0) {
|
|
421
339
|
addCheckedGeofence(geofenceId);
|
|
@@ -424,7 +342,7 @@ function MyActions(props) {
|
|
|
424
342
|
};
|
|
425
343
|
return /* @__PURE__ */ jsxs(Actions, { children: [
|
|
426
344
|
/* @__PURE__ */ jsx(HelperError, { name: "geometry" }),
|
|
427
|
-
/* @__PURE__ */ jsx(Button, { onClick:
|
|
345
|
+
/* @__PURE__ */ jsx(Button, { onClick: onClickCancelLocal, disabled: inEdition, children: getLabel(MAP_GPSTOOLS_DICCTIONARY.ACTION_CANCEL) }),
|
|
428
346
|
/* @__PURE__ */ jsx(ActionFormIntro, { disabled: inEdition })
|
|
429
347
|
] });
|
|
430
348
|
}
|
|
@@ -490,11 +408,10 @@ const formatDataEnpoint = (response) => {
|
|
|
490
408
|
const getLayerFromGeometry = (geometry, geofenceTypeId, radius, options) => {
|
|
491
409
|
if (geometry) {
|
|
492
410
|
if (geofenceTypeId === "gt_circle" && geometry.type === "Point") {
|
|
493
|
-
return L.circle(
|
|
494
|
-
|
|
495
|
-
radius || 0
|
|
496
|
-
|
|
497
|
-
);
|
|
411
|
+
return L.circle([geometry.coordinates[1], geometry.coordinates[0]], {
|
|
412
|
+
...options,
|
|
413
|
+
radius: radius || 0
|
|
414
|
+
});
|
|
498
415
|
} else if (geofenceTypeId === "gt_polygon" && geometry.type === "Polygon") {
|
|
499
416
|
const coordinates = geometry.coordinates.map(
|
|
500
417
|
(ring) => ring.map((position) => [position[1], position[0]])
|
|
@@ -593,14 +510,14 @@ function useDrawing() {
|
|
|
593
510
|
map.pm.setLang("en", {
|
|
594
511
|
tooltips: {
|
|
595
512
|
placeMarker: void 0,
|
|
596
|
-
firstVertex: getLabel(
|
|
597
|
-
continueLine: getLabel(
|
|
598
|
-
finishLine: getLabel(
|
|
599
|
-
finishPoly: getLabel(
|
|
600
|
-
finishRect: getLabel(
|
|
601
|
-
startCircle: getLabel(
|
|
602
|
-
finishCircle: getLabel(
|
|
603
|
-
placeCircleMarker: getLabel(
|
|
513
|
+
firstVertex: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FIRST_VERTEX),
|
|
514
|
+
continueLine: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_CONTINUE_LINE),
|
|
515
|
+
finishLine: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_LINE),
|
|
516
|
+
finishPoly: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_POLY),
|
|
517
|
+
finishRect: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_RECT),
|
|
518
|
+
startCircle: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_START_CIRCLE),
|
|
519
|
+
finishCircle: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH_CIRCLE),
|
|
520
|
+
placeCircleMarker: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_PLACE_CIRCLE_MARKER)
|
|
604
521
|
}
|
|
605
522
|
});
|
|
606
523
|
}, [map, getLabel]);
|
|
@@ -627,10 +544,10 @@ function useDrawing() {
|
|
|
627
544
|
fillColor,
|
|
628
545
|
fillOpacity
|
|
629
546
|
});
|
|
630
|
-
setValue("lat", layer.getLatLng().lat);
|
|
631
|
-
setValue("lng", layer.getLatLng().lng);
|
|
547
|
+
setValue("lat", Number(layer.getLatLng().lat.toFixed(8)));
|
|
548
|
+
setValue("lng", Number(layer.getLatLng().lng.toFixed(8)));
|
|
632
549
|
layer.on("pm:change", (_e) => {
|
|
633
|
-
setValue("properties.radius", layer.getRadius());
|
|
550
|
+
setValue("properties.radius", Number(layer.getRadius().toFixed(1)));
|
|
634
551
|
});
|
|
635
552
|
});
|
|
636
553
|
});
|
|
@@ -683,7 +600,10 @@ function useDrawing() {
|
|
|
683
600
|
if (shape === "Circle") {
|
|
684
601
|
currentLayer.current.on("pm:change", (e) => {
|
|
685
602
|
currentLayer.current = e.layer;
|
|
603
|
+
setValue("lat", Number(currentLayer.current.getLatLng().lat.toFixed(8)));
|
|
604
|
+
setValue("lng", Number(currentLayer.current.getLatLng().lng.toFixed(8)));
|
|
686
605
|
setValue("properties.radius", currentLayer.current.getRadius());
|
|
606
|
+
setValue("properties.radius", Number(currentLayer.current.getRadius().toFixed(1)));
|
|
687
607
|
});
|
|
688
608
|
}
|
|
689
609
|
}
|
|
@@ -760,34 +680,34 @@ function GeneralData() {
|
|
|
760
680
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
761
681
|
const { inEdition, handleDraw, handleFinish, geometrTypeIdCached } = useDrawing();
|
|
762
682
|
useSumbitErrorsFocus();
|
|
763
|
-
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/
|
|
683
|
+
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GENERAL}`;
|
|
764
684
|
const geofencesTypes = useMemo(() => {
|
|
765
685
|
return [
|
|
766
686
|
{
|
|
767
687
|
id: "gt_circle",
|
|
768
|
-
name: getLabel(
|
|
769
|
-
url: `${host_static_assets}/${environment_assets}/frontend/
|
|
688
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_CIRCLE),
|
|
689
|
+
url: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_CIRCLE}`
|
|
770
690
|
},
|
|
771
691
|
{
|
|
772
692
|
id: "gt_polygon",
|
|
773
|
-
name: getLabel(
|
|
774
|
-
url: `${host_static_assets}/${environment_assets}/frontend/
|
|
693
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_POLYGON),
|
|
694
|
+
url: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_POLYGON}`
|
|
775
695
|
},
|
|
776
696
|
{
|
|
777
697
|
id: "gt_rectangle",
|
|
778
|
-
name: getLabel(
|
|
779
|
-
url: `${host_static_assets}/${environment_assets}/frontend/
|
|
698
|
+
name: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_RECTANGLE),
|
|
699
|
+
url: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_TYPE_RECTANGLE}`
|
|
780
700
|
}
|
|
781
701
|
];
|
|
782
702
|
}, [getLabel]);
|
|
783
|
-
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(
|
|
703
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_GPSTOOLS_DICCTIONARY.PAPER_GENERAL), children: [
|
|
784
704
|
/* @__PURE__ */ jsx(
|
|
785
705
|
RHFTextField,
|
|
786
706
|
{
|
|
787
707
|
name: "name",
|
|
788
708
|
disabled: false,
|
|
789
709
|
type: "text",
|
|
790
|
-
label: getLabel(`${
|
|
710
|
+
label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_NAME}`)
|
|
791
711
|
}
|
|
792
712
|
),
|
|
793
713
|
/* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 1, alignItems: "center", children: [
|
|
@@ -801,47 +721,78 @@ function GeneralData() {
|
|
|
801
721
|
getOptionLabel: (option) => option.name,
|
|
802
722
|
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
803
723
|
getOptionUrlImage: (option) => option.url,
|
|
804
|
-
|
|
724
|
+
imageHeight: "12px",
|
|
725
|
+
imageWidth: "12px",
|
|
726
|
+
label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_GEOMETRY_TYPE)
|
|
805
727
|
}
|
|
806
728
|
),
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
|
|
729
|
+
/* @__PURE__ */ jsxs(
|
|
730
|
+
Stack,
|
|
731
|
+
{
|
|
732
|
+
className: gpsToolsClasses.gpsToolsGeofencesAddEditDrawFinishContainer,
|
|
733
|
+
direction: "row",
|
|
734
|
+
gap: 1,
|
|
735
|
+
alignItems: "center",
|
|
736
|
+
children: [
|
|
737
|
+
/* @__PURE__ */ jsx(
|
|
738
|
+
IconButton,
|
|
739
|
+
{
|
|
740
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_DRAW}`,
|
|
741
|
+
variant: "primary",
|
|
742
|
+
onClick: handleDraw,
|
|
743
|
+
disabled: inEdition || !geometrTypeIdCached,
|
|
744
|
+
tooltip: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_DRAW)
|
|
745
|
+
}
|
|
746
|
+
),
|
|
747
|
+
/* @__PURE__ */ jsx(
|
|
748
|
+
IconButton,
|
|
749
|
+
{
|
|
750
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_FINISH}`,
|
|
751
|
+
variant: "primary",
|
|
752
|
+
onClick: handleFinish,
|
|
753
|
+
disabled: !inEdition,
|
|
754
|
+
tooltip: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_FINISH)
|
|
755
|
+
}
|
|
756
|
+
)
|
|
757
|
+
]
|
|
758
|
+
}
|
|
759
|
+
)
|
|
809
760
|
] }),
|
|
810
761
|
geometrTypeIdCached && geometrTypeIdCached === "gt_circle" && /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
811
762
|
/* @__PURE__ */ jsx(
|
|
812
763
|
RHFTextField,
|
|
813
764
|
{
|
|
814
765
|
name: "properties.radius",
|
|
815
|
-
label: getLabel(
|
|
816
|
-
autoComplete: "
|
|
766
|
+
label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_RADIUS),
|
|
767
|
+
autoComplete: "off",
|
|
817
768
|
skeletonWidth: "70%",
|
|
818
769
|
skeletonHeight: "18px",
|
|
819
770
|
disabled: true,
|
|
820
|
-
size: "
|
|
771
|
+
size: "small"
|
|
821
772
|
}
|
|
822
773
|
),
|
|
823
774
|
/* @__PURE__ */ jsx(
|
|
824
775
|
RHFTextField,
|
|
825
776
|
{
|
|
826
777
|
name: "lat",
|
|
827
|
-
label: getLabel(
|
|
828
|
-
autoComplete: "
|
|
778
|
+
label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_LAT),
|
|
779
|
+
autoComplete: "off",
|
|
829
780
|
skeletonWidth: "70%",
|
|
830
781
|
skeletonHeight: "18px",
|
|
831
782
|
disabled: true,
|
|
832
|
-
size: "
|
|
783
|
+
size: "small"
|
|
833
784
|
}
|
|
834
785
|
),
|
|
835
786
|
/* @__PURE__ */ jsx(
|
|
836
787
|
RHFTextField,
|
|
837
788
|
{
|
|
838
789
|
name: "lng",
|
|
839
|
-
label: getLabel(
|
|
840
|
-
autoComplete: "
|
|
790
|
+
label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_LON),
|
|
791
|
+
autoComplete: "off",
|
|
841
792
|
skeletonWidth: "70%",
|
|
842
793
|
skeletonHeight: "18px",
|
|
843
794
|
disabled: true,
|
|
844
|
-
size: "
|
|
795
|
+
size: "small"
|
|
845
796
|
}
|
|
846
797
|
)
|
|
847
798
|
] })
|
|
@@ -851,15 +802,15 @@ function GeneralData() {
|
|
|
851
802
|
function ConfigData() {
|
|
852
803
|
const { getLabel } = useModuleDictionary();
|
|
853
804
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
854
|
-
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/
|
|
855
|
-
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(
|
|
805
|
+
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.CONFIG}`;
|
|
806
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_GPSTOOLS_DICCTIONARY.PAPER_CONFIG), children: [
|
|
856
807
|
/* @__PURE__ */ jsx(
|
|
857
808
|
RHFTextField,
|
|
858
809
|
{
|
|
859
810
|
name: "alias",
|
|
860
811
|
disabled: false,
|
|
861
812
|
type: "text",
|
|
862
|
-
label: getLabel(`${
|
|
813
|
+
label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_ALIAS}`)
|
|
863
814
|
}
|
|
864
815
|
),
|
|
865
816
|
/* @__PURE__ */ jsx(
|
|
@@ -868,7 +819,7 @@ function ConfigData() {
|
|
|
868
819
|
name: "customerId",
|
|
869
820
|
disabled: false,
|
|
870
821
|
type: "text",
|
|
871
|
-
label: getLabel(`${
|
|
822
|
+
label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_CUSTOMER_ID}`)
|
|
872
823
|
}
|
|
873
824
|
),
|
|
874
825
|
/* @__PURE__ */ jsx(
|
|
@@ -877,7 +828,7 @@ function ConfigData() {
|
|
|
877
828
|
name: "timeMinInSeconds",
|
|
878
829
|
disabled: false,
|
|
879
830
|
type: "number",
|
|
880
|
-
label: getLabel(`${
|
|
831
|
+
label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_TIME_MIN_IN_SECONDS}`)
|
|
881
832
|
}
|
|
882
833
|
),
|
|
883
834
|
/* @__PURE__ */ jsx(
|
|
@@ -886,7 +837,7 @@ function ConfigData() {
|
|
|
886
837
|
name: "timeMinOutSeconds",
|
|
887
838
|
disabled: false,
|
|
888
839
|
type: "number",
|
|
889
|
-
label: getLabel(`${
|
|
840
|
+
label: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_TIME_MIN_OUT_SECONDS}`)
|
|
890
841
|
}
|
|
891
842
|
)
|
|
892
843
|
] });
|
|
@@ -894,12 +845,12 @@ function ConfigData() {
|
|
|
894
845
|
function FillData() {
|
|
895
846
|
const { getLabel } = useModuleDictionary();
|
|
896
847
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
897
|
-
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/
|
|
898
|
-
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(
|
|
848
|
+
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.FILL}`;
|
|
849
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_GPSTOOLS_DICCTIONARY.PAPER_FILL), children: [
|
|
899
850
|
/* @__PURE__ */ jsx(
|
|
900
851
|
PropertyValue,
|
|
901
852
|
{
|
|
902
|
-
property: getLabel(`${
|
|
853
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_COLOR}`),
|
|
903
854
|
isForm: true,
|
|
904
855
|
propertyWidth: 150,
|
|
905
856
|
value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.fillColor" })
|
|
@@ -909,7 +860,7 @@ function FillData() {
|
|
|
909
860
|
/* @__PURE__ */ jsx(
|
|
910
861
|
PropertyValue,
|
|
911
862
|
{
|
|
912
|
-
property: getLabel(`${
|
|
863
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_OPACITY}`),
|
|
913
864
|
isForm: true,
|
|
914
865
|
propertyWidth: 150,
|
|
915
866
|
value: /* @__PURE__ */ jsx(
|
|
@@ -919,8 +870,7 @@ function FillData() {
|
|
|
919
870
|
autoComplete: "off",
|
|
920
871
|
options: STYLE_OPACITIES,
|
|
921
872
|
getOptionLabel: (option) => option.label,
|
|
922
|
-
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
923
|
-
label: "ssss"
|
|
873
|
+
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
924
874
|
}
|
|
925
875
|
)
|
|
926
876
|
},
|
|
@@ -931,12 +881,12 @@ function FillData() {
|
|
|
931
881
|
function StrokeData() {
|
|
932
882
|
const { getLabel } = useModuleDictionary();
|
|
933
883
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
934
|
-
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/
|
|
935
|
-
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(
|
|
884
|
+
const urlIcon = `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.STROKE}`;
|
|
885
|
+
return /* @__PURE__ */ jsxs(PaperForm, { urlIcon, title: getLabel(MAP_GPSTOOLS_DICCTIONARY.PAPER_STROKE), children: [
|
|
936
886
|
/* @__PURE__ */ jsx(
|
|
937
887
|
PropertyValue,
|
|
938
888
|
{
|
|
939
|
-
property: getLabel(`${
|
|
889
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_COLOR}`),
|
|
940
890
|
isForm: true,
|
|
941
891
|
propertyWidth: 150,
|
|
942
892
|
value: /* @__PURE__ */ jsx(RHFColorPicker, { name: "properties.strokeColor" })
|
|
@@ -946,7 +896,7 @@ function StrokeData() {
|
|
|
946
896
|
/* @__PURE__ */ jsx(
|
|
947
897
|
PropertyValue,
|
|
948
898
|
{
|
|
949
|
-
property: getLabel(`${
|
|
899
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_OPACITY}`),
|
|
950
900
|
isForm: true,
|
|
951
901
|
propertyWidth: 150,
|
|
952
902
|
value: /* @__PURE__ */ jsx(
|
|
@@ -956,8 +906,7 @@ function StrokeData() {
|
|
|
956
906
|
autoComplete: "off",
|
|
957
907
|
options: STYLE_OPACITIES,
|
|
958
908
|
getOptionLabel: (option) => option.label,
|
|
959
|
-
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
960
|
-
label: "ssss"
|
|
909
|
+
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
961
910
|
}
|
|
962
911
|
)
|
|
963
912
|
},
|
|
@@ -966,7 +915,7 @@ function StrokeData() {
|
|
|
966
915
|
/* @__PURE__ */ jsx(
|
|
967
916
|
PropertyValue,
|
|
968
917
|
{
|
|
969
|
-
property: getLabel(`${
|
|
918
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_WEIGHT}`),
|
|
970
919
|
isForm: true,
|
|
971
920
|
propertyWidth: 150,
|
|
972
921
|
value: /* @__PURE__ */ jsx(
|
|
@@ -976,8 +925,7 @@ function StrokeData() {
|
|
|
976
925
|
autoComplete: "off",
|
|
977
926
|
options: STYLE_WHEIGHTS,
|
|
978
927
|
getOptionLabel: (option) => option.label,
|
|
979
|
-
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
980
|
-
label: "ssss"
|
|
928
|
+
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
981
929
|
}
|
|
982
930
|
)
|
|
983
931
|
},
|
|
@@ -986,7 +934,7 @@ function StrokeData() {
|
|
|
986
934
|
/* @__PURE__ */ jsx(
|
|
987
935
|
PropertyValue,
|
|
988
936
|
{
|
|
989
|
-
property: getLabel(`${
|
|
937
|
+
property: getLabel(`${MAP_GPSTOOLS_DICCTIONARY.LABEL_DASH_ARRAY}`),
|
|
990
938
|
isForm: true,
|
|
991
939
|
propertyWidth: 150,
|
|
992
940
|
value: /* @__PURE__ */ jsx(
|
|
@@ -996,8 +944,7 @@ function StrokeData() {
|
|
|
996
944
|
autoComplete: "off",
|
|
997
945
|
options: STYLE_PATTERNS,
|
|
998
946
|
getOptionLabel: (option) => option.label,
|
|
999
|
-
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
1000
|
-
label: "ssss"
|
|
947
|
+
isOptionEqualToValue: (option, value) => option.value === value.value
|
|
1001
948
|
}
|
|
1002
949
|
)
|
|
1003
950
|
},
|
|
@@ -1013,24 +960,25 @@ function StyleData() {
|
|
|
1013
960
|
}
|
|
1014
961
|
function MyTabs() {
|
|
1015
962
|
const { getLabel } = useModuleDictionary();
|
|
963
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
1016
964
|
const { currentTab, handleChange } = useTab();
|
|
1017
965
|
const geofenceAddEditTabs = useMemo(() => {
|
|
1018
966
|
return [
|
|
1019
967
|
{
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
968
|
+
id: "general",
|
|
969
|
+
iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.DATA}`,
|
|
970
|
+
component: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1023
971
|
/* @__PURE__ */ jsx(GeneralData, {}),
|
|
1024
972
|
/* @__PURE__ */ jsx(ConfigData, {})
|
|
1025
973
|
] }),
|
|
1026
|
-
|
|
974
|
+
label: getLabel(MAP_GPSTOOLS_DICCTIONARY.TAB_GENERAL_CONFIG_TOOLTIP),
|
|
1027
975
|
className: gpsToolsClasses.toolGeofencesAddEditGeneral
|
|
1028
976
|
},
|
|
1029
977
|
{
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
978
|
+
id: "style",
|
|
979
|
+
iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.STYLE}`,
|
|
980
|
+
component: /* @__PURE__ */ jsx(StyleData, {}),
|
|
981
|
+
label: getLabel(MAP_GPSTOOLS_DICCTIONARY.TAB_STYLE_CONFIG_TOOLTIP),
|
|
1034
982
|
className: gpsToolsClasses.toolGeofencesAddEditStyle
|
|
1035
983
|
}
|
|
1036
984
|
];
|
|
@@ -1047,18 +995,18 @@ function MyTabs() {
|
|
|
1047
995
|
children: geofenceAddEditTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
1048
996
|
Tab,
|
|
1049
997
|
{
|
|
1050
|
-
value: tab.
|
|
1051
|
-
icon: tab.
|
|
1052
|
-
label:
|
|
998
|
+
value: tab.id,
|
|
999
|
+
icon: /* @__PURE__ */ jsx(Icon, { src: tab.iconUrl }),
|
|
1000
|
+
label: "",
|
|
1053
1001
|
SKTWidth: "100px",
|
|
1054
1002
|
SKTHeight: "14px"
|
|
1055
1003
|
},
|
|
1056
|
-
tab.
|
|
1004
|
+
tab.id
|
|
1057
1005
|
))
|
|
1058
1006
|
}
|
|
1059
1007
|
),
|
|
1060
1008
|
geofenceAddEditTabs.map((tab) => {
|
|
1061
|
-
const isMatched = tab.
|
|
1009
|
+
const isMatched = tab.id === currentTab;
|
|
1062
1010
|
return /* @__PURE__ */ jsx(
|
|
1063
1011
|
TabContent,
|
|
1064
1012
|
{
|
|
@@ -1067,24 +1015,24 @@ function MyTabs() {
|
|
|
1067
1015
|
tab.className,
|
|
1068
1016
|
isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
|
|
1069
1017
|
),
|
|
1070
|
-
children: tab.
|
|
1018
|
+
children: tab.component
|
|
1071
1019
|
},
|
|
1072
|
-
tab.
|
|
1020
|
+
tab.id
|
|
1073
1021
|
);
|
|
1074
1022
|
})
|
|
1075
1023
|
] });
|
|
1076
1024
|
}
|
|
1077
1025
|
function GeneralDataValidation(getLabel) {
|
|
1078
1026
|
return {
|
|
1079
|
-
name: Yup.string().required(getLabel(
|
|
1080
|
-
geometry: Yup.object().nullable().required(getLabel(
|
|
1081
|
-
geofenceType: Yup.object().nullable().required(getLabel(
|
|
1027
|
+
name: Yup.string().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_REQUIRED)),
|
|
1028
|
+
geometry: Yup.object().nullable().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_GEOMETRY_REQUIRED)),
|
|
1029
|
+
geofenceType: Yup.object().nullable().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_REQUIRED))
|
|
1082
1030
|
};
|
|
1083
1031
|
}
|
|
1084
1032
|
function ConfigDataValidation(getLabel) {
|
|
1085
1033
|
return {
|
|
1086
|
-
timeMinInSeconds: Yup.number().required(getLabel(
|
|
1087
|
-
timeMinOutSeconds: Yup.number().required(getLabel(
|
|
1034
|
+
timeMinInSeconds: Yup.number().nullable().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_REQUIRED)).typeError(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_TYPE_NUMBER_ERROR)).min(0, getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_MIN_NUMBER_ERROR)),
|
|
1035
|
+
timeMinOutSeconds: Yup.number().nullable().required(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_REQUIRED)).typeError(getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_TYPE_NUMBER_ERROR)).min(0, getLabel(MAP_GPSTOOLS_DICCTIONARY.VALIDATION_FIELD_MIN_NUMBER_ERROR))
|
|
1088
1036
|
};
|
|
1089
1037
|
}
|
|
1090
1038
|
function useValidation() {
|
|
@@ -1098,6 +1046,14 @@ function useValidation() {
|
|
|
1098
1046
|
);
|
|
1099
1047
|
return { validationSchema };
|
|
1100
1048
|
}
|
|
1049
|
+
const ENDPOINT_GEOFENCE_GET = "geofences";
|
|
1050
|
+
const ENDPOINT_GEOFENCE_NEW_EDIT = "geofences";
|
|
1051
|
+
var GeofencesFeaturesLayers = /* @__PURE__ */ ((GeofencesFeaturesLayers2) => {
|
|
1052
|
+
GeofencesFeaturesLayers2["LAYER_GEOFENCES"] = "geofences";
|
|
1053
|
+
GeofencesFeaturesLayers2["LAYER_GEOFENCES_TRANSIT_FEATURES"] = "geofencesCrossingFeatures";
|
|
1054
|
+
GeofencesFeaturesLayers2["LAYER_GEOFENCES_INTERNAL_FEATURES"] = "geofencesInternalFeatures";
|
|
1055
|
+
return GeofencesFeaturesLayers2;
|
|
1056
|
+
})(GeofencesFeaturesLayers || {});
|
|
1101
1057
|
const getSummitData = (values, geofenceId) => {
|
|
1102
1058
|
const newEditObj = {
|
|
1103
1059
|
name: values.name,
|
|
@@ -1194,7 +1150,7 @@ function GeofenceAddEdit(props) {
|
|
|
1194
1150
|
});
|
|
1195
1151
|
const { validationSchema } = useValidation();
|
|
1196
1152
|
const { onSubmit } = useSubmit({ objectId: geofenceId });
|
|
1197
|
-
return /* @__PURE__ */
|
|
1153
|
+
return /* @__PURE__ */ jsx(
|
|
1198
1154
|
RHFormProviderStyled,
|
|
1199
1155
|
{
|
|
1200
1156
|
statusLoad,
|
|
@@ -1202,10 +1158,10 @@ function GeofenceAddEdit(props) {
|
|
|
1202
1158
|
values: formValues,
|
|
1203
1159
|
validationSchema,
|
|
1204
1160
|
className: gpsToolsClasses.gpsToolsGeofencesAddEdit,
|
|
1205
|
-
children: [
|
|
1161
|
+
children: /* @__PURE__ */ jsxs(Stack, { direction: "column", gap: "8px", children: [
|
|
1206
1162
|
/* @__PURE__ */ jsx(TabProvider, { initialValue: "general", children: /* @__PURE__ */ jsx(MyTabs, {}) }),
|
|
1207
1163
|
/* @__PURE__ */ jsx(MyActions, { ...props })
|
|
1208
|
-
]
|
|
1164
|
+
] })
|
|
1209
1165
|
}
|
|
1210
1166
|
);
|
|
1211
1167
|
}
|
|
@@ -1221,23 +1177,24 @@ function useRowActionsGetter(props) {
|
|
|
1221
1177
|
const { toast } = useHostTools();
|
|
1222
1178
|
const isDesktop = useResponsiveDesktop();
|
|
1223
1179
|
const [urlIconEdit] = useState(
|
|
1224
|
-
`${host_static_assets}/${environment_assets}/frontend/components/
|
|
1180
|
+
`${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_EDIT}`
|
|
1225
1181
|
);
|
|
1226
1182
|
const [urlIconDelete] = useState(
|
|
1227
|
-
`${host_static_assets}/${environment_assets}/frontend/
|
|
1183
|
+
`${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_DELETE}`
|
|
1228
1184
|
);
|
|
1229
|
-
const goEdit = (objectId) => {
|
|
1185
|
+
const goEdit = (objectId, name) => {
|
|
1230
1186
|
hidePopup("gpsTools");
|
|
1231
1187
|
addPopup({
|
|
1232
1188
|
popupId: "geofencesAddEdit",
|
|
1233
|
-
title:
|
|
1189
|
+
title: getLabel(MAP_GPSTOOLS_DICCTIONARY.ACTION_GEOFENCE_EDIT),
|
|
1190
|
+
editionInfo: `${getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_ID)}:${objectId} - ${name} `,
|
|
1234
1191
|
componentProps: { fullRefresh, geofenceId: objectId },
|
|
1235
1192
|
functionComponent: GeofenceAddEdit,
|
|
1236
1193
|
defaultPosition: {
|
|
1237
1194
|
vertical: { top: 50, bottom: 50 },
|
|
1238
1195
|
horizontal: { right: 50, width: 380 }
|
|
1239
1196
|
},
|
|
1240
|
-
iconUrl:
|
|
1197
|
+
iconUrl: urlIconEdit
|
|
1241
1198
|
});
|
|
1242
1199
|
removeCheckedGeofence(objectId);
|
|
1243
1200
|
};
|
|
@@ -1247,8 +1204,8 @@ function useRowActionsGetter(props) {
|
|
|
1247
1204
|
window: /* @__PURE__ */ jsx(
|
|
1248
1205
|
WindowConfirm,
|
|
1249
1206
|
{
|
|
1250
|
-
title: getLabel(
|
|
1251
|
-
msg: getLabel(
|
|
1207
|
+
title: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODAL_DELETE_GEO_TITLE),
|
|
1208
|
+
msg: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODAL_DELETE_GEO_MESSAGE),
|
|
1252
1209
|
onClickIntro: () => onConfirmDelete(row)
|
|
1253
1210
|
}
|
|
1254
1211
|
),
|
|
@@ -1274,10 +1231,19 @@ function useRowActionsGetter(props) {
|
|
|
1274
1231
|
const conditionalItems = [];
|
|
1275
1232
|
conditionalItems.push({
|
|
1276
1233
|
urlIcon: urlIconEdit,
|
|
1277
|
-
dictionaryId:
|
|
1234
|
+
dictionaryId: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_EDIT,
|
|
1235
|
+
onClick: () => {
|
|
1236
|
+
goEdit(row.id, row.name);
|
|
1237
|
+
},
|
|
1238
|
+
disabled: !row.authUserOptions.edit
|
|
1239
|
+
});
|
|
1240
|
+
conditionalItems.push({
|
|
1241
|
+
urlIcon: urlIconDelete,
|
|
1242
|
+
dictionaryId: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_DELETE,
|
|
1278
1243
|
onClick: () => {
|
|
1279
|
-
|
|
1244
|
+
onDelete(row);
|
|
1280
1245
|
},
|
|
1246
|
+
variant: "delete",
|
|
1281
1247
|
disabled: !row.authUserOptions.edit
|
|
1282
1248
|
});
|
|
1283
1249
|
return conditionalItems;
|
|
@@ -1441,18 +1407,20 @@ function useCheckedFeatures(layerId, featuresType, endpoint) {
|
|
|
1441
1407
|
return [checkedFeatures, setCheckedFeatures];
|
|
1442
1408
|
}
|
|
1443
1409
|
function useMaster() {
|
|
1410
|
+
const { getLabel } = useModuleDictionary();
|
|
1411
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
1444
1412
|
const { hidePopup, addPopup } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
1445
|
-
const
|
|
1413
|
+
const goToAdd = () => {
|
|
1446
1414
|
hidePopup("gpsTools");
|
|
1447
1415
|
addPopup({
|
|
1448
1416
|
popupId: "geofencesAddEdit",
|
|
1449
|
-
title:
|
|
1417
|
+
title: getLabel(MAP_GPSTOOLS_DICCTIONARY.ACTION_GEOFENCE_ADD),
|
|
1450
1418
|
functionComponent: () => /* @__PURE__ */ jsx(GeofenceAddEdit, {}),
|
|
1451
1419
|
defaultPosition: {
|
|
1452
1420
|
vertical: { top: 50, bottom: 50 },
|
|
1453
1421
|
horizontal: { right: 50, width: 380 }
|
|
1454
1422
|
},
|
|
1455
|
-
iconUrl:
|
|
1423
|
+
iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCE_ADD}`
|
|
1456
1424
|
});
|
|
1457
1425
|
};
|
|
1458
1426
|
const [checkedGeofences, hashGeofences, initialRows] = useGpsToolsStore(
|
|
@@ -1577,10 +1545,11 @@ function useMaster() {
|
|
|
1577
1545
|
checkedRows: checkedGeofences,
|
|
1578
1546
|
onCheckedRowsChange: setCheckedGeofences,
|
|
1579
1547
|
setRows,
|
|
1580
|
-
|
|
1548
|
+
goToAdd
|
|
1581
1549
|
};
|
|
1582
1550
|
}
|
|
1583
1551
|
function GeofencesList() {
|
|
1552
|
+
const { getLabel } = useModuleDictionary();
|
|
1584
1553
|
const {
|
|
1585
1554
|
refresh,
|
|
1586
1555
|
setBackendQueryParams,
|
|
@@ -1596,7 +1565,7 @@ function GeofencesList() {
|
|
|
1596
1565
|
onCheckedRowsChange,
|
|
1597
1566
|
setRows,
|
|
1598
1567
|
rowKeyGetter,
|
|
1599
|
-
|
|
1568
|
+
goToAdd
|
|
1600
1569
|
} = useMaster();
|
|
1601
1570
|
return /* @__PURE__ */ jsxs(
|
|
1602
1571
|
StackGeofenceListRoot,
|
|
@@ -1636,84 +1605,271 @@ function GeofencesList() {
|
|
|
1636
1605
|
},
|
|
1637
1606
|
"list"
|
|
1638
1607
|
),
|
|
1639
|
-
/* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Button, { onClick: () =>
|
|
1608
|
+
/* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Button, { onClick: () => goToAdd(), children: getLabel(MAP_GPSTOOLS_DICCTIONARY.ACTION_GEOFENCE_ADD) }) })
|
|
1640
1609
|
]
|
|
1641
1610
|
}
|
|
1642
1611
|
);
|
|
1643
1612
|
}
|
|
1613
|
+
enableMapSet();
|
|
1614
|
+
const createGpsToolsStore = (initProps) => {
|
|
1615
|
+
const startProps = {
|
|
1616
|
+
currentTabGpsTool: "geofences",
|
|
1617
|
+
geofenceState: {
|
|
1618
|
+
rows: [],
|
|
1619
|
+
checkedGeofences: /* @__PURE__ */ new Set(),
|
|
1620
|
+
checkedCrossingFeatures: /* @__PURE__ */ new Set(),
|
|
1621
|
+
checkedInternalFeatures: /* @__PURE__ */ new Set(),
|
|
1622
|
+
hashGeofences: {}
|
|
1623
|
+
},
|
|
1624
|
+
...initProps
|
|
1625
|
+
};
|
|
1626
|
+
return createStore(
|
|
1627
|
+
devtools(
|
|
1628
|
+
immer((set, _get) => ({
|
|
1629
|
+
...startProps,
|
|
1630
|
+
gpsToolsActions: {
|
|
1631
|
+
init: () => {
|
|
1632
|
+
set((state) => {
|
|
1633
|
+
state.ownerState.status = "ready";
|
|
1634
|
+
});
|
|
1635
|
+
},
|
|
1636
|
+
setGpsToolsState: (status) => {
|
|
1637
|
+
set((state) => {
|
|
1638
|
+
state.ownerState.status = status;
|
|
1639
|
+
});
|
|
1640
|
+
},
|
|
1641
|
+
setHandlerGetLabel: (newHandler) => {
|
|
1642
|
+
set((state) => {
|
|
1643
|
+
state.getLabel = newHandler;
|
|
1644
|
+
});
|
|
1645
|
+
},
|
|
1646
|
+
setExternalState: (newExternalState) => {
|
|
1647
|
+
set((state) => {
|
|
1648
|
+
state.ownerState = { ...state.ownerState, ...newExternalState };
|
|
1649
|
+
});
|
|
1650
|
+
},
|
|
1651
|
+
setCurrentTabTool: (newTabTool) => {
|
|
1652
|
+
set((state) => {
|
|
1653
|
+
state.currentTabGpsTool = newTabTool;
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
},
|
|
1657
|
+
geofenceActions: {
|
|
1658
|
+
addGeofence: (geofenceId, geofence) => {
|
|
1659
|
+
set((state) => {
|
|
1660
|
+
state.geofenceState.hashGeofences[geofenceId] = geofence;
|
|
1661
|
+
});
|
|
1662
|
+
},
|
|
1663
|
+
updatePartialGeofence: (geofenceId, geofence) => {
|
|
1664
|
+
set((state) => {
|
|
1665
|
+
state.geofenceState.hashGeofences[geofenceId] = {
|
|
1666
|
+
...state.geofenceState.hashGeofences[geofenceId],
|
|
1667
|
+
...geofence
|
|
1668
|
+
};
|
|
1669
|
+
});
|
|
1670
|
+
},
|
|
1671
|
+
updateRows: (newRows) => {
|
|
1672
|
+
set((state) => {
|
|
1673
|
+
state.geofenceState.rows = newRows;
|
|
1674
|
+
});
|
|
1675
|
+
},
|
|
1676
|
+
addCheckedGeofence: (geofenceId) => {
|
|
1677
|
+
set((state) => {
|
|
1678
|
+
state.geofenceState.checkedGeofences.add(geofenceId);
|
|
1679
|
+
state.geofenceState.checkedGeofences = new Set(state.geofenceState.checkedGeofences);
|
|
1680
|
+
});
|
|
1681
|
+
},
|
|
1682
|
+
removeCheckedGeofence: (geofenceId) => {
|
|
1683
|
+
set((state) => {
|
|
1684
|
+
state.geofenceState.checkedGeofences.delete(geofenceId);
|
|
1685
|
+
state.geofenceState.checkedGeofences = new Set(state.geofenceState.checkedGeofences);
|
|
1686
|
+
});
|
|
1687
|
+
},
|
|
1688
|
+
setCheckedGeofences: (newGeofences) => {
|
|
1689
|
+
set((state) => {
|
|
1690
|
+
state.geofenceState.checkedGeofences = new Set(newGeofences);
|
|
1691
|
+
});
|
|
1692
|
+
},
|
|
1693
|
+
setCheckedCrossingFeatures: (newFeatures) => {
|
|
1694
|
+
set((state) => {
|
|
1695
|
+
state.geofenceState.checkedCrossingFeatures = new Set(newFeatures);
|
|
1696
|
+
});
|
|
1697
|
+
},
|
|
1698
|
+
setCheckedInternalFeatures: (newFeatures) => {
|
|
1699
|
+
set((state) => {
|
|
1700
|
+
state.geofenceState.checkedInternalFeatures = new Set(newFeatures);
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
})),
|
|
1705
|
+
{ name: `Map Tools Store` }
|
|
1706
|
+
)
|
|
1707
|
+
);
|
|
1708
|
+
};
|
|
1709
|
+
const GpsToolsContext = createContext(null);
|
|
1710
|
+
function GpsToolsProvider(props) {
|
|
1711
|
+
const { children } = props;
|
|
1712
|
+
const { getLabel } = useModuleDictionary();
|
|
1713
|
+
const isDesktop = useResponsiveDesktop();
|
|
1714
|
+
const isSkeleton = useModuleSkeleton();
|
|
1715
|
+
const isFirstRender = useFirstRender([getLabel]);
|
|
1716
|
+
const mapStoreRef = useRef();
|
|
1717
|
+
if (!mapStoreRef.current) {
|
|
1718
|
+
mapStoreRef.current = createGpsToolsStore({
|
|
1719
|
+
getLabel,
|
|
1720
|
+
ownerState: {
|
|
1721
|
+
status: "init",
|
|
1722
|
+
isMobile: !isDesktop,
|
|
1723
|
+
isSkeleton,
|
|
1724
|
+
focus: false
|
|
1725
|
+
}
|
|
1726
|
+
});
|
|
1727
|
+
}
|
|
1728
|
+
const { setHandlerGetLabel, setExternalState } = useStore(
|
|
1729
|
+
mapStoreRef.current,
|
|
1730
|
+
(state) => state.gpsToolsActions,
|
|
1731
|
+
shallow
|
|
1732
|
+
);
|
|
1733
|
+
useEffect(() => {
|
|
1734
|
+
if (!isFirstRender) {
|
|
1735
|
+
setHandlerGetLabel(getLabel);
|
|
1736
|
+
}
|
|
1737
|
+
}, [getLabel]);
|
|
1738
|
+
useEffect(() => {
|
|
1739
|
+
if (isFirstRender) {
|
|
1740
|
+
return;
|
|
1741
|
+
}
|
|
1742
|
+
setExternalState({ isMobile: !isDesktop, isSkeleton });
|
|
1743
|
+
}, [isDesktop, isSkeleton]);
|
|
1744
|
+
return /* @__PURE__ */ jsx(GpsToolsContext.Provider, { value: mapStoreRef.current, children });
|
|
1745
|
+
}
|
|
1746
|
+
function useGpsToolsStore(selector, equalityFn) {
|
|
1747
|
+
const context = useContext(GpsToolsContext);
|
|
1748
|
+
if (!context)
|
|
1749
|
+
throw new Error("useGpsToolsStore context must be use inside GpsToolsContext");
|
|
1750
|
+
return useStore(context, selector, equalityFn);
|
|
1751
|
+
}
|
|
1752
|
+
function useLayers() {
|
|
1753
|
+
const { addLayer, removeLayer } = useMapStore((state) => state.mapActions, shallow);
|
|
1754
|
+
const { init } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
1755
|
+
useEffect(() => {
|
|
1756
|
+
addLayer({
|
|
1757
|
+
layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES,
|
|
1758
|
+
name: "Geocercas",
|
|
1759
|
+
renderFeature: CommonFeatureRender,
|
|
1760
|
+
geoJsonObject: {
|
|
1761
|
+
object: {
|
|
1762
|
+
type: "FeatureCollection",
|
|
1763
|
+
features: []
|
|
1764
|
+
}
|
|
1765
|
+
},
|
|
1766
|
+
autoFocus: false
|
|
1767
|
+
});
|
|
1768
|
+
addLayer({
|
|
1769
|
+
layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES,
|
|
1770
|
+
name: "Geometr\xEDas de tr\xE1nsito",
|
|
1771
|
+
renderFeature: CommonFeatureRender,
|
|
1772
|
+
geoJsonObject: {
|
|
1773
|
+
object: {
|
|
1774
|
+
type: "FeatureCollection",
|
|
1775
|
+
features: []
|
|
1776
|
+
}
|
|
1777
|
+
},
|
|
1778
|
+
autoFocus: false
|
|
1779
|
+
});
|
|
1780
|
+
addLayer({
|
|
1781
|
+
layerId: GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES,
|
|
1782
|
+
name: "Geometr\xEDas internas",
|
|
1783
|
+
renderFeature: CommonFeatureRender,
|
|
1784
|
+
geoJsonObject: {
|
|
1785
|
+
object: {
|
|
1786
|
+
type: "FeatureCollection",
|
|
1787
|
+
features: []
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
autoFocus: false
|
|
1791
|
+
});
|
|
1792
|
+
init();
|
|
1793
|
+
return () => {
|
|
1794
|
+
removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES);
|
|
1795
|
+
removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES_INTERNAL_FEATURES);
|
|
1796
|
+
removeLayer(GeofencesFeaturesLayers.LAYER_GEOFENCES_TRANSIT_FEATURES);
|
|
1797
|
+
};
|
|
1798
|
+
}, []);
|
|
1799
|
+
}
|
|
1644
1800
|
function TabsGpsTools() {
|
|
1645
1801
|
const { getLabel } = useModuleDictionary();
|
|
1802
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
1646
1803
|
const status = useGpsToolsStore((state) => state.ownerState.status, shallow);
|
|
1647
1804
|
const currentTabTool = useGpsToolsStore((state) => state.currentTabGpsTool, shallow);
|
|
1648
1805
|
const { setCurrentTabTool } = useGpsToolsStore((state) => state.gpsToolsActions, shallow);
|
|
1806
|
+
const { updatePopup } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
1649
1807
|
const toolTabs = useMemo(() => {
|
|
1650
1808
|
return [
|
|
1651
1809
|
{
|
|
1652
1810
|
id: "geofences",
|
|
1653
|
-
|
|
1811
|
+
iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/map_gpstools/assets/icons/${MAP_GPSTOOLS_ICONS.GEOFENCES}`,
|
|
1654
1812
|
component: /* @__PURE__ */ jsx(GeofencesList, {}),
|
|
1655
|
-
label: getLabel(
|
|
1813
|
+
label: getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_TAB_GEO),
|
|
1656
1814
|
className: gpsToolsClasses.gpsToolsGeofencesList
|
|
1657
1815
|
}
|
|
1658
1816
|
];
|
|
1659
1817
|
}, [getLabel]);
|
|
1818
|
+
useEffect(() => {
|
|
1819
|
+
updatePopup(GPS_TOOLS_POPUP_ID, {
|
|
1820
|
+
subTitle: currentTabTool === "geofences" ? getLabel(MAP_GPSTOOLS_DICCTIONARY.LABEL_TAB_GEO) : ""
|
|
1821
|
+
});
|
|
1822
|
+
}, [currentTabTool]);
|
|
1660
1823
|
useLayers();
|
|
1661
1824
|
if (status !== "ready") {
|
|
1662
1825
|
return null;
|
|
1663
1826
|
}
|
|
1664
|
-
return /* @__PURE__ */ jsxs(
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1827
|
+
return /* @__PURE__ */ jsxs(DivTabGpsToolsRoot, { className: gpsToolsClasses.gpsToolsRoot, children: [
|
|
1828
|
+
/* @__PURE__ */ jsx(
|
|
1829
|
+
Tabs,
|
|
1830
|
+
{
|
|
1831
|
+
value: currentTabTool,
|
|
1832
|
+
scrollButtons: "auto",
|
|
1833
|
+
variant: "scrollable",
|
|
1834
|
+
allowScrollButtonsMobile: true,
|
|
1835
|
+
onChange: (_e, value) => setCurrentTabTool(value),
|
|
1836
|
+
children: toolTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
1837
|
+
Tab,
|
|
1671
1838
|
{
|
|
1672
|
-
value:
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
tab.className,
|
|
1699
|
-
isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
|
|
1700
|
-
),
|
|
1701
|
-
children: tab.component
|
|
1702
|
-
},
|
|
1703
|
-
tab.id
|
|
1704
|
-
);
|
|
1705
|
-
})
|
|
1706
|
-
]
|
|
1707
|
-
}
|
|
1708
|
-
);
|
|
1839
|
+
value: tab.id,
|
|
1840
|
+
icon: /* @__PURE__ */ jsx(Icon, { src: tab.iconUrl }),
|
|
1841
|
+
className: clsx(gpsToolsClasses.gpsToolsTab, tab.className),
|
|
1842
|
+
SKTWidth: "100px",
|
|
1843
|
+
SKTHeight: "14px"
|
|
1844
|
+
},
|
|
1845
|
+
tab.id
|
|
1846
|
+
))
|
|
1847
|
+
}
|
|
1848
|
+
),
|
|
1849
|
+
toolTabs.map((tab) => {
|
|
1850
|
+
const isMatched = tab.id === currentTabTool;
|
|
1851
|
+
return /* @__PURE__ */ jsx(
|
|
1852
|
+
TabContent,
|
|
1853
|
+
{
|
|
1854
|
+
className: clsx(
|
|
1855
|
+
gpsToolsClasses.gpsToolsTabContent,
|
|
1856
|
+
tab.className,
|
|
1857
|
+
isMatched ? gpsToolsClasses.visible : gpsToolsClasses.hidden
|
|
1858
|
+
),
|
|
1859
|
+
children: tab.component
|
|
1860
|
+
},
|
|
1861
|
+
tab.id
|
|
1862
|
+
);
|
|
1863
|
+
})
|
|
1864
|
+
] });
|
|
1709
1865
|
}
|
|
1710
|
-
function
|
|
1866
|
+
function MapGpsTools() {
|
|
1711
1867
|
const isSkeleton = useModuleSkeleton();
|
|
1712
|
-
return
|
|
1868
|
+
return !isSkeleton && /* @__PURE__ */ jsx(TabsGpsTools, {});
|
|
1713
1869
|
}
|
|
1714
1870
|
export {
|
|
1715
|
-
|
|
1716
|
-
|
|
1871
|
+
GpsToolsProvider as G,
|
|
1872
|
+
MapGpsTools as M,
|
|
1717
1873
|
gpsToolsClasses as g,
|
|
1718
1874
|
useGpsToolsStore as u
|
|
1719
1875
|
};
|