@kando-env/kando-ui 1.0.0 → 1.0.1
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/.DS_Store +0 -0
- package/.babelrc +10 -0
- package/.eslintrc.json +25 -0
- package/.nvmrc +1 -0
- package/.prettierrc.json +6 -0
- package/.storybook/main.js +11 -0
- package/.storybook/preview-head.html +43 -0
- package/.storybook/preview.js +15 -0
- package/.storybook/webpack.config.js +48 -0
- package/babel.config.js +15 -0
- package/demo-server.js +11 -0
- package/index.html +14 -0
- package/javascript/.DS_Store +0 -0
- package/javascript/bundles/.DS_Store +0 -0
- package/javascript/bundles/overview/.DS_Store +0 -0
- package/javascript/bundles/overview/views/.DS_Store +0 -0
- package/lib-build/CovidView/views/components/Body.js +90 -0
- package/lib-build/CovidView/views/components/Map.js +142 -0
- package/lib-build/CovidView/views/components/MapStyle.scss +387 -0
- package/lib-build/CovidView/views/components/Sidebar.js +50 -0
- package/lib-build/CovidView/views/components/SidebarStyle.scss +11 -0
- package/lib-build/CovidView/views/components/Summary.js +145 -0
- package/lib-build/CovidView/views/components/SummaryStyle.scss +61 -0
- package/lib-build/CovidView/views/components/areas/Area.js +171 -0
- package/lib-build/CovidView/views/components/areas/AreaPolygonWBE.js +241 -0
- package/lib-build/CovidView/views/components/areas/AreaPolygonsWBE.js +81 -0
- package/lib-build/CovidView/views/components/areas/AreasList.js +123 -0
- package/lib-build/CovidView/views/components/areas/AreasStyle.scss +237 -0
- package/lib-build/CovidView/views/components/areas/Sort.js +59 -0
- package/lib-build/CovidView/views/components/areas/TrendPopupContent/TrendPopupContent.js +148 -0
- package/lib-build/CovidView/views/components/areas/TrendPopupContent/index.js +13 -0
- package/lib-build/CovidView/views/components/areas/TrendPopupContent/styles.scss +30 -0
- package/lib-build/CovidView/views/covidView.js +46 -0
- package/lib-build/DashboardV2/AreaDashboard.js +116 -0
- package/lib-build/DashboardV2/SiteDashboard.js +364 -0
- package/lib-build/DashboardV2/WaterAuthorityDashboard.js +45 -0
- package/lib-build/DashboardV2/index.js +31 -0
- package/lib-build/DashboardV2/styles.scss +126 -0
- package/lib-build/DashboardV2/types/IDashboardData.js +5 -0
- package/lib-build/EventsView/views/_colors.scss +1 -0
- package/lib-build/EventsView/views/components/Body.js +76 -0
- package/lib-build/EventsView/views/components/areas/AreaPolygon.js +53 -0
- package/lib-build/EventsView/views/components/areas/AreaPolygons.js +63 -0
- package/lib-build/EventsView/views/components/edges/Edge.js +75 -0
- package/lib-build/EventsView/views/components/edges/Edges.js +50 -0
- package/lib-build/EventsView/views/components/events/EventIndicator.js +274 -0
- package/lib-build/EventsView/views/components/events/EventPath.js +94 -0
- package/lib-build/EventsView/views/components/events/EventsStyle.scss +725 -0
- package/lib-build/EventsView/views/components/events/MoreInfo.js +72 -0
- package/lib-build/EventsView/views/components/events/Sidebar.js +62 -0
- package/lib-build/EventsView/views/components/events/event_info/EarlyWarnings.js +151 -0
- package/lib-build/EventsView/views/components/events/event_info/EventDetails.js +100 -0
- package/lib-build/EventsView/views/components/events/event_info/EventInfo.js +138 -0
- package/lib-build/EventsView/views/components/events/event_info/EventInfoStyle.scss +508 -0
- package/lib-build/EventsView/views/components/events/event_info/EventTimeRange.js +152 -0
- package/lib-build/EventsView/views/components/events/event_info/HistoricalInformation.js +44 -0
- package/lib-build/EventsView/views/components/events/event_info/MiniEventTree.js +116 -0
- package/lib-build/EventsView/views/components/events/event_info/MobileEventPath.js +39 -0
- package/lib-build/EventsView/views/components/events/event_info/PollutionDischarge.js +64 -0
- package/lib-build/EventsView/views/components/events/event_info/charts/EventDetailsLineChart.js +75 -0
- package/lib-build/EventsView/views/components/events/event_info/charts/EventDetailsPieChart.js +121 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/DamageType.js +109 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/agriculture.svg +29 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/bacteria-process.svg +90 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/effluent.svg +55 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/energy.svg +42 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/equipment.svg +82 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/extra-biological-sludge.svg +40 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/overflow.svg +26 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/pipes-bluckages.svg +29 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/pipes-infrastructure.svg +31 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/reuse.svg +29 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/sea-rivers.svg +54 -0
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/sludge.svg +37 -0
- package/lib-build/EventsView/views/components/events/event_info/samplings/Sampling.js +28 -0
- package/lib-build/EventsView/views/components/events/event_info/samplings/Samplings.js +36 -0
- package/lib-build/EventsView/views/components/events/event_info/sources/Source.js +118 -0
- package/lib-build/EventsView/views/components/events/event_info/sources/Sources.js +46 -0
- package/lib-build/EventsView/views/components/events/events_list/EventItem.js +139 -0
- package/lib-build/EventsView/views/components/events/events_list/EventsList.js +298 -0
- package/lib-build/EventsView/views/components/events/events_list/Filter/Filter.js +137 -0
- package/lib-build/EventsView/views/components/events/events_list/Filter/FilterContainer.js +382 -0
- package/lib-build/EventsView/views/components/events/events_list/Filter/FilterItem.js +218 -0
- package/lib-build/EventsView/views/components/events/events_list/Filter/FiltersDropDown.js +68 -0
- package/lib-build/EventsView/views/components/events/events_list/Filter/OptionsDropDown.js +139 -0
- package/lib-build/EventsView/views/components/events/events_list/Sort.js +92 -0
- package/lib-build/EventsView/views/components/map/FloatingGraph.js +83 -0
- package/lib-build/EventsView/views/components/map/Map.js +162 -0
- package/lib-build/EventsView/views/components/map/mapStyle.scss +387 -0
- package/lib-build/EventsView/views/components/points/PointMarker.js +453 -0
- package/lib-build/EventsView/views/components/points/PointMarkers.js +30 -0
- package/lib-build/EventsView/views/eventsView.js +47 -0
- package/lib-build/ProjectManagement/api/index.js +19 -0
- package/lib-build/ProjectManagement/components/kpi-list-item.js +88 -0
- package/lib-build/ProjectManagement/components/kpi-percentage-item.js +98 -0
- package/lib-build/ProjectManagement/components/kpi.js +71 -0
- package/lib-build/ProjectManagement/components/legend-icon.js +61 -0
- package/lib-build/ProjectManagement/components/link-to-item.js +67 -0
- package/lib-build/ProjectManagement/components/list-of-points.js +111 -0
- package/lib-build/ProjectManagement/components/map-view.js +128 -0
- package/lib-build/ProjectManagement/components/metrics.js +94 -0
- package/lib-build/ProjectManagement/components/node-label.js +66 -0
- package/lib-build/ProjectManagement/components/period-selector-button.js +68 -0
- package/lib-build/ProjectManagement/components/period-selector.js +79 -0
- package/lib-build/ProjectManagement/components/point-preview.js +298 -0
- package/lib-build/ProjectManagement/components/project-management.js +262 -0
- package/lib-build/ProjectManagement/components/tree-legend.js +100 -0
- package/lib-build/ProjectManagement/components/tree-view.js +281 -0
- package/lib-build/ProjectManagement/stores/project-management-store.js +32 -0
- package/lib-build/ProjectManagement/util/constants.js +10 -0
- package/lib-build/ProjectManagement/util/treeUtil.js +45 -0
- package/lib-build/ProjectManagement/util/url.js +24 -0
- package/lib-build/Router.js +64 -0
- package/lib-build/assets/NVL_trends/down.png +0 -0
- package/lib-build/assets/NVL_trends/same.png +0 -0
- package/lib-build/assets/NVL_trends/up.png +0 -0
- package/lib-build/assets/area_statuses/invalid-sampling.png +0 -0
- package/lib-build/assets/area_statuses/missing-sampling.png +0 -0
- package/lib-build/assets/area_statuses/pending-sampling.png +0 -0
- package/lib-build/assets/area_statuses/valid-sampling.png +0 -0
- package/lib-build/assets/factory-icon.png +0 -0
- package/lib-build/assets/flask.svg +7 -0
- package/lib-build/assets/kando_logo.png +0 -0
- package/lib-build/assets/line-chart.svg +56 -0
- package/lib-build/assets/missing/authority.png +0 -0
- package/lib-build/assets/missing/group.png +0 -0
- package/lib-build/assets/missing/point.png +0 -0
- package/lib-build/assets/no_events.svg +31 -0
- package/lib-build/assets/no_results.svg +327 -0
- package/lib-build/assets/point_icons/WWTP-icon.svg +26 -0
- package/lib-build/assets/point_icons/blue-circle.svg +3 -0
- package/lib-build/assets/point_icons/bright-blue-circle.svg +3 -0
- package/lib-build/assets/point_icons/factory-icon.svg +23 -0
- package/lib-build/assets/point_icons/green-circle.png +0 -0
- package/lib-build/assets/point_icons/green-circle.svg +3 -0
- package/lib-build/assets/point_icons/observation-icon.svg +12 -0
- package/lib-build/assets/point_icons/pink-circle.svg +3 -0
- package/lib-build/assets/point_icons/pump-station-icon.svg +15 -0
- package/lib-build/assets/point_icons/red-pin-red-shadow.png +0 -0
- package/lib-build/assets/point_icons/sampling-icon.svg +9 -0
- package/lib-build/assets/point_icons/white-pin-black-shadow.png +0 -0
- package/lib-build/assets/point_icons/white-pin-red-shadow.png +0 -0
- package/lib-build/assets/point_icons/yellow-circle.svg +3 -0
- package/lib-build/assets/sewer.svg +3 -0
- package/lib-build/assets/user.svg +44 -0
- package/lib-build/assets/white-point.png +0 -0
- package/lib-build/index.js +34 -0
- package/lib-build/shared/TimeRangeSelector/TimeRangeSelector.js +111 -0
- package/lib-build/shared/TimeRangeSelector/constants.js +8 -0
- package/lib-build/shared/TimeRangeSelector/index.js +13 -0
- package/lib-build/shared/TimeRangeSelector/styles.scss +65 -0
- package/lib-build/shared/components/Breadcrumbs/Breadcrumbs.js +42 -0
- package/lib-build/shared/components/Breadcrumbs/index.js +13 -0
- package/lib-build/shared/components/Breadcrumbs/styles.scss +8 -0
- package/lib-build/shared/components/ContentLoader/ContentLoader.js +71 -0
- package/lib-build/shared/components/ContentLoader/index.js +13 -0
- package/lib-build/shared/components/DamageType/DamageType.js +263 -0
- package/lib-build/shared/components/DamageType/index.js +13 -0
- package/lib-build/shared/components/DamageType/styles.scss +50 -0
- package/lib-build/shared/components/DischargeHeatmap/DischargeHeatmap.js +218 -0
- package/lib-build/shared/components/DischargeHeatmap/index.js +13 -0
- package/lib-build/shared/components/DischargeHeatmap/styles.scss +17 -0
- package/lib-build/shared/components/ErrorBoundary.js +72 -0
- package/lib-build/shared/components/Events/Events.js +240 -0
- package/lib-build/shared/components/Events/index.js +13 -0
- package/lib-build/shared/components/Events/styles.scss +131 -0
- package/lib-build/shared/components/Graph/Graph.js +213 -0
- package/lib-build/shared/components/Graph/index.js +13 -0
- package/lib-build/shared/components/KandoModal/KandoModal.js +118 -0
- package/lib-build/shared/components/KandoModal/index.js +13 -0
- package/lib-build/shared/components/KandoModal/styles.scss +19 -0
- package/lib-build/shared/components/KandoNavbar/KandoNavbar.js +290 -0
- package/lib-build/shared/components/KandoNavbar/NavbarStyle.scss +238 -0
- package/lib-build/shared/components/KandoNavbar/index.js +13 -0
- package/lib-build/shared/components/LiveEvents/CarouselSlide.js +62 -0
- package/lib-build/shared/components/LiveEvents/LiveEvents.js +58 -0
- package/lib-build/shared/components/LiveEvents/index.js +13 -0
- package/lib-build/shared/components/LiveEvents/styles.scss +80 -0
- package/lib-build/shared/components/Map/Map.js +90 -0
- package/lib-build/shared/components/Map/index.js +13 -0
- package/lib-build/shared/components/Map/styles.scss +7 -0
- package/lib-build/shared/components/NarrowHeader.js +57 -0
- package/lib-build/shared/components/PointInfo/PointInfo.js +83 -0
- package/lib-build/shared/components/PointInfo/index.js +13 -0
- package/lib-build/shared/components/PointInfo/styles.scss +48 -0
- package/lib-build/shared/components/Search/Search.js +159 -0
- package/lib-build/shared/components/Search/index.js +13 -0
- package/lib-build/shared/components/Search/styles.scss +27 -0
- package/lib-build/shared/components/Sector/Sector.js +176 -0
- package/lib-build/shared/components/Sector/index.js +13 -0
- package/lib-build/shared/components/Sector/styles.scss +14 -0
- package/lib-build/shared/components/Sector/svgs/Brewing.svg +93 -0
- package/lib-build/shared/components/Sector/svgs/Cowshed.svg +23 -0
- package/lib-build/shared/components/Sector/svgs/Garage.svg +24 -0
- package/lib-build/shared/components/Sector/svgs/Missing.svg +36 -0
- package/lib-build/shared/components/Sector/svgs/barrel.svg +93 -0
- package/lib-build/shared/components/Sector/svgs/beer.svg +13 -0
- package/lib-build/shared/components/Sector/svgs/beverage.svg +13 -0
- package/lib-build/shared/components/Sector/svgs/car-repair.svg +24 -0
- package/lib-build/shared/components/Sector/svgs/car-wash.svg +36 -0
- package/lib-build/shared/components/Sector/svgs/chemistry.svg +30 -0
- package/lib-build/shared/components/Sector/svgs/conductor-manufacturer.svg +17 -0
- package/lib-build/shared/components/Sector/svgs/cosmetic-manufacturer.svg +23 -0
- package/lib-build/shared/components/Sector/svgs/cow.svg +23 -0
- package/lib-build/shared/components/Sector/svgs/cpu.svg +17 -0
- package/lib-build/shared/components/Sector/svgs/dairy.svg +18 -0
- package/lib-build/shared/components/Sector/svgs/dippel-oil.svg +17 -0
- package/lib-build/shared/components/Sector/svgs/food-donation.svg +29 -0
- package/lib-build/shared/components/Sector/svgs/food-factory.svg +17 -0
- package/lib-build/shared/components/Sector/svgs/garbage-truck-1.svg +34 -0
- package/lib-build/shared/components/Sector/svgs/gas-station.svg +26 -0
- package/lib-build/shared/components/Sector/svgs/glass-manufacturer.svg +21 -0
- package/lib-build/shared/components/Sector/svgs/glass.svg +21 -0
- package/lib-build/shared/components/Sector/svgs/hand-washing.svg +17 -0
- package/lib-build/shared/components/Sector/svgs/hospital.svg +28 -0
- package/lib-build/shared/components/Sector/svgs/hotel.svg +24 -0
- package/lib-build/shared/components/Sector/svgs/laundromat.svg +26 -0
- package/lib-build/shared/components/Sector/svgs/leather-factory.svg +23 -0
- package/lib-build/shared/components/Sector/svgs/leather.svg +23 -0
- package/lib-build/shared/components/Sector/svgs/lipstick.svg +23 -0
- package/lib-build/shared/components/Sector/svgs/meat.svg +24 -0
- package/lib-build/shared/components/Sector/svgs/metal-coating-plant.svg +21 -0
- package/lib-build/shared/components/Sector/svgs/metal-facbrication.svg +20 -0
- package/lib-build/shared/components/Sector/svgs/milk.svg +18 -0
- package/lib-build/shared/components/Sector/svgs/oil-rig.svg +17 -0
- package/lib-build/shared/components/Sector/svgs/petrochemical.svg +13 -0
- package/lib-build/shared/components/Sector/svgs/pie.svg +17 -0
- package/lib-build/shared/components/Sector/svgs/pills.svg +22 -0
- package/lib-build/shared/components/Sector/svgs/plant-unkown-3.svg +36 -0
- package/lib-build/shared/components/Sector/svgs/plastic-rubber.svg +43 -0
- package/lib-build/shared/components/Sector/svgs/printer.svg +17 -0
- package/lib-build/shared/components/Sector/svgs/recycling.svg +17 -0
- package/lib-build/shared/components/Sector/svgs/refinery.svg +18 -0
- package/lib-build/shared/components/Sector/svgs/repair.svg +13 -0
- package/lib-build/shared/components/Sector/svgs/sewing-machine.svg +22 -0
- package/lib-build/shared/components/Sector/svgs/shop.svg +24 -0
- package/lib-build/shared/components/Sector/svgs/soda.svg +13 -0
- package/lib-build/shared/components/Sector/svgs/spray-gun.svg +21 -0
- package/lib-build/shared/components/Sector/svgs/washing-machine.svg +26 -0
- package/lib-build/shared/components/Sector/svgs/waste.svg +43 -0
- package/lib-build/shared/components/Sector/svgs/welder-a.svg +20 -0
- package/lib-build/shared/components/Sector/svgs/wine-glass.svg +15 -0
- package/lib-build/shared/components/Toggle/Toggle.js +62 -0
- package/lib-build/shared/components/Toggle/index.js +13 -0
- package/lib-build/shared/components/Toggle/styles.scss +44 -0
- package/lib-build/shared/components/TrendGraph/TrendGraph.js +217 -0
- package/lib-build/shared/components/TrendGraph/index.js +13 -0
- package/lib-build/shared/components/TrendGraph/styles.scss +2 -0
- package/lib-build/shared/components/TrendGraphNVL/TrendGraphNVL.js +167 -0
- package/lib-build/shared/components/TrendGraphNVL/index.js +13 -0
- package/lib-build/shared/components/TrendGraphNVL/styles.scss +16 -0
- package/lib-build/shared/helpers/kql.js +51 -0
- package/lib-build/shared/helpers/time.js +21 -0
- package/lib-build/shared/models/IAction.js +1 -0
- package/lib-build/shared/models/IAppState.js +5 -0
- package/lib-build/shared/redux/WBE/actionTypes.js +8 -0
- package/lib-build/shared/redux/WBE/actions.js +15 -0
- package/lib-build/shared/redux/WBE/models/IAreaWBE.js +5 -0
- package/lib-build/shared/redux/WBE/models/IWBE.js +5 -0
- package/lib-build/shared/redux/WBE/models/IWBEState.js +5 -0
- package/lib-build/shared/redux/WBE/reducer.js +40 -0
- package/lib-build/shared/redux/areas/actionTypes.js +12 -0
- package/lib-build/shared/redux/areas/actions.js +40 -0
- package/lib-build/shared/redux/areas/models/IArea.js +5 -0
- package/lib-build/shared/redux/areas/models/IAreasState.js +5 -0
- package/lib-build/shared/redux/areas/reducer.js +56 -0
- package/lib-build/shared/redux/context/actionTypes.js +8 -0
- package/lib-build/shared/redux/context/actions.js +15 -0
- package/lib-build/shared/redux/context/models/INavContext.js +5 -0
- package/lib-build/shared/redux/context/models/INavContextState.js +5 -0
- package/lib-build/shared/redux/context/reducer.js +40 -0
- package/lib-build/shared/redux/edges/actionTypes.js +14 -0
- package/lib-build/shared/redux/edges/actions.js +48 -0
- package/lib-build/shared/redux/edges/models/IEdge.js +5 -0
- package/lib-build/shared/redux/edges/models/IEdgesState.js +5 -0
- package/lib-build/shared/redux/edges/reducer.js +79 -0
- package/lib-build/shared/redux/events/actionTypes.js +28 -0
- package/lib-build/shared/redux/events/actions.js +112 -0
- package/lib-build/shared/redux/events/models/IEvent.js +5 -0
- package/lib-build/shared/redux/events/models/IEventsState.js +5 -0
- package/lib-build/shared/redux/events/models/ISource.js +5 -0
- package/lib-build/shared/redux/events/reducer.js +196 -0
- package/lib-build/shared/redux/filters/IFilter.js +5 -0
- package/lib-build/shared/redux/filters/IFilterItem.js +5 -0
- package/lib-build/shared/redux/global/actionTypes.js +24 -0
- package/lib-build/shared/redux/global/actions.js +91 -0
- package/lib-build/shared/redux/global/models/IGlobalState.js +5 -0
- package/lib-build/shared/redux/global/reducer.js +92 -0
- package/lib-build/shared/redux/points/actionTypes.js +10 -0
- package/lib-build/shared/redux/points/actions.js +32 -0
- package/lib-build/shared/redux/points/models/IGroup.js +5 -0
- package/lib-build/shared/redux/points/models/IPoint.js +5 -0
- package/lib-build/shared/redux/points/models/IPointsState.js +5 -0
- package/lib-build/shared/redux/points/reducer.js +37 -0
- package/lib-build/shared/redux/rootActionTypes.js +8 -0
- package/lib-build/shared/redux/rootActions.js +14 -0
- package/lib-build/shared/redux/rootReducer.js +55 -0
- package/lib-build/shared/redux/rootStore.js +40 -0
- package/lib-build/shared/utilities/ActionUtility.js +17 -0
- package/lib-build/shared/utilities/ErrorBoundary.js +76 -0
- package/lib-build/shared/utilities/KandoDate.js +29 -0
- package/lib-build/shared/utilities/KandoModal.js +65 -0
- package/lib-build/shared/utilities/LocalStorage.js +48 -0
- package/lib-build/shared/utilities/TimeFormat.js +70 -0
- package/lib-build/shared/utilities/Truncate.js +81 -0
- package/lib-build/shared/utilities/custom_hooks/useClickOutside.js +26 -0
- package/lib-build/shared/utilities/custom_hooks/useKandoFetch.js +82 -0
- package/lib-build/shared/utilities/custom_hooks/useQueryURL.js +15 -0
- package/lib-build/shared/utilities/custom_hooks/useRemoveExistingLayers.js +34 -0
- package/lib-build/shared/utilities/custom_hooks/useUpdateEventBodyTail.js +62 -0
- package/lib-build/shared/utilities/i18n.js +33 -0
- package/package.json +131 -3
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/src/bundles/CovidView/views/components/Body.tsx +59 -0
- package/src/bundles/CovidView/views/components/Map.tsx +110 -0
- package/src/bundles/CovidView/views/components/MapStyle.scss +387 -0
- package/src/bundles/CovidView/views/components/Sidebar.tsx +32 -0
- package/src/bundles/CovidView/views/components/SidebarStyle.scss +11 -0
- package/src/bundles/CovidView/views/components/Summary.tsx +134 -0
- package/src/bundles/CovidView/views/components/SummaryStyle.scss +61 -0
- package/src/bundles/CovidView/views/components/areas/Area.tsx +130 -0
- package/src/bundles/CovidView/views/components/areas/AreaPolygonWBE.tsx +186 -0
- package/src/bundles/CovidView/views/components/areas/AreaPolygonsWBE.tsx +71 -0
- package/src/bundles/CovidView/views/components/areas/AreasList.tsx +84 -0
- package/src/bundles/CovidView/views/components/areas/AreasStyle.scss +237 -0
- package/src/bundles/CovidView/views/components/areas/Sort.tsx +40 -0
- package/src/bundles/CovidView/views/components/areas/TrendPopupContent/TrendPopupContent.tsx +112 -0
- package/src/bundles/CovidView/views/components/areas/TrendPopupContent/index.ts +3 -0
- package/src/bundles/CovidView/views/components/areas/TrendPopupContent/styles.scss +30 -0
- package/src/bundles/CovidView/views/covidView.tsx +30 -0
- package/src/bundles/DashboardV2/AreaDashboard.tsx +59 -0
- package/src/bundles/DashboardV2/SiteDashboard.tsx +218 -0
- package/src/bundles/DashboardV2/WaterAuthorityDashboard.tsx +33 -0
- package/src/bundles/DashboardV2/index.ts +5 -0
- package/src/bundles/DashboardV2/styles.scss +126 -0
- package/src/bundles/DashboardV2/types/IDashboardData.ts +28 -0
- package/src/bundles/EventsView/views/_colors.scss +1 -0
- package/src/bundles/EventsView/views/components/Body.tsx +73 -0
- package/src/bundles/EventsView/views/components/areas/AreaPolygon.tsx +42 -0
- package/src/bundles/EventsView/views/components/areas/AreaPolygons.tsx +43 -0
- package/src/bundles/EventsView/views/components/edges/Edge.tsx +60 -0
- package/src/bundles/EventsView/views/components/edges/Edges.tsx +41 -0
- package/src/bundles/EventsView/views/components/events/EventIndicator.tsx +241 -0
- package/src/bundles/EventsView/views/components/events/EventPath.tsx +88 -0
- package/src/bundles/EventsView/views/components/events/EventsStyle.scss +725 -0
- package/src/bundles/EventsView/views/components/events/MoreInfo.tsx +48 -0
- package/src/bundles/EventsView/views/components/events/Sidebar.tsx +49 -0
- package/src/bundles/EventsView/views/components/events/event_info/EarlyWarnings.tsx +146 -0
- package/src/bundles/EventsView/views/components/events/event_info/EventDetails.tsx +106 -0
- package/src/bundles/EventsView/views/components/events/event_info/EventInfo.tsx +102 -0
- package/src/bundles/EventsView/views/components/events/event_info/EventInfoStyle.scss +508 -0
- package/src/bundles/EventsView/views/components/events/event_info/EventTimeRange.tsx +109 -0
- package/src/bundles/EventsView/views/components/events/event_info/HistoricalInformation.tsx +37 -0
- package/src/bundles/EventsView/views/components/events/event_info/MiniEventTree.tsx +89 -0
- package/src/bundles/EventsView/views/components/events/event_info/MobileEventPath.tsx +29 -0
- package/src/bundles/EventsView/views/components/events/event_info/PollutionDischarge.tsx +57 -0
- package/src/bundles/EventsView/views/components/events/event_info/charts/EventDetailsLineChart.tsx +61 -0
- package/src/bundles/EventsView/views/components/events/event_info/charts/EventDetailsPieChart.tsx +107 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/DamageType.tsx +98 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/agriculture.svg +29 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/bacteria-process.svg +90 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/effluent.svg +55 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/energy.svg +42 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/equipment.svg +82 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/extra-biological-sludge.svg +40 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/overflow.svg +26 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/pipes-bluckages.svg +29 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/pipes-infrastructure.svg +31 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/reuse.svg +29 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/sea-rivers.svg +54 -0
- package/src/bundles/EventsView/views/components/events/event_info/damage_type/svgs/sludge.svg +37 -0
- package/src/bundles/EventsView/views/components/events/event_info/samplings/Sampling.tsx +26 -0
- package/src/bundles/EventsView/views/components/events/event_info/samplings/Samplings.tsx +32 -0
- package/src/bundles/EventsView/views/components/events/event_info/sources/Source.tsx +120 -0
- package/src/bundles/EventsView/views/components/events/event_info/sources/Sources.tsx +35 -0
- package/src/bundles/EventsView/views/components/events/events_list/EventItem.tsx +122 -0
- package/src/bundles/EventsView/views/components/events/events_list/EventsList.tsx +242 -0
- package/src/bundles/EventsView/views/components/events/events_list/Filter/Filter.tsx +91 -0
- package/src/bundles/EventsView/views/components/events/events_list/Filter/FilterContainer.tsx +302 -0
- package/src/bundles/EventsView/views/components/events/events_list/Filter/FilterItem.tsx +180 -0
- package/src/bundles/EventsView/views/components/events/events_list/Filter/FiltersDropDown.tsx +48 -0
- package/src/bundles/EventsView/views/components/events/events_list/Filter/OptionsDropDown.tsx +97 -0
- package/src/bundles/EventsView/views/components/events/events_list/Sort.tsx +70 -0
- package/src/bundles/EventsView/views/components/map/FloatingGraph.tsx +61 -0
- package/src/bundles/EventsView/views/components/map/Map.tsx +137 -0
- package/src/bundles/EventsView/views/components/map/mapStyle.scss +387 -0
- package/src/bundles/EventsView/views/components/points/PointMarker.tsx +447 -0
- package/src/bundles/EventsView/views/components/points/PointMarkers.tsx +23 -0
- package/src/bundles/EventsView/views/eventsView.tsx +32 -0
- package/src/bundles/ProjectManagement/api/index.js +10 -0
- package/src/bundles/ProjectManagement/components/kpi-list-item.jsx +57 -0
- package/src/bundles/ProjectManagement/components/kpi-percentage-item.jsx +69 -0
- package/src/bundles/ProjectManagement/components/kpi.jsx +23 -0
- package/src/bundles/ProjectManagement/components/legend-icon.jsx +14 -0
- package/src/bundles/ProjectManagement/components/link-to-item.jsx +16 -0
- package/src/bundles/ProjectManagement/components/list-of-points.jsx +76 -0
- package/src/bundles/ProjectManagement/components/map-view.jsx +95 -0
- package/src/bundles/ProjectManagement/components/metrics.jsx +42 -0
- package/src/bundles/ProjectManagement/components/node-label.jsx +23 -0
- package/src/bundles/ProjectManagement/components/period-selector-button.jsx +23 -0
- package/src/bundles/ProjectManagement/components/period-selector.jsx +25 -0
- package/src/bundles/ProjectManagement/components/point-preview.jsx +225 -0
- package/src/bundles/ProjectManagement/components/project-management.jsx +229 -0
- package/src/bundles/ProjectManagement/components/tree-legend.jsx +59 -0
- package/src/bundles/ProjectManagement/components/tree-view.jsx +215 -0
- package/src/bundles/ProjectManagement/stores/project-management-store.js +16 -0
- package/src/bundles/ProjectManagement/util/constants.js +2 -0
- package/src/bundles/ProjectManagement/util/treeUtil.js +32 -0
- package/src/bundles/ProjectManagement/util/url.js +10 -0
- package/src/bundles/Router.tsx +56 -0
- package/src/bundles/assets/NVL_trends/down.png +0 -0
- package/src/bundles/assets/NVL_trends/same.png +0 -0
- package/src/bundles/assets/NVL_trends/up.png +0 -0
- package/src/bundles/assets/area_statuses/invalid-sampling.png +0 -0
- package/src/bundles/assets/area_statuses/missing-sampling.png +0 -0
- package/src/bundles/assets/area_statuses/pending-sampling.png +0 -0
- package/src/bundles/assets/area_statuses/valid-sampling.png +0 -0
- package/src/bundles/assets/factory-icon.png +0 -0
- package/src/bundles/assets/flask.svg +7 -0
- package/src/bundles/assets/kando_logo.png +0 -0
- package/src/bundles/assets/line-chart.svg +56 -0
- package/src/bundles/assets/missing/authority.png +0 -0
- package/src/bundles/assets/missing/group.png +0 -0
- package/src/bundles/assets/missing/point.png +0 -0
- package/src/bundles/assets/no_events.svg +31 -0
- package/src/bundles/assets/no_results.svg +327 -0
- package/src/bundles/assets/point_icons/WWTP-icon.svg +26 -0
- package/src/bundles/assets/point_icons/blue-circle.svg +3 -0
- package/src/bundles/assets/point_icons/bright-blue-circle.svg +3 -0
- package/src/bundles/assets/point_icons/factory-icon.svg +23 -0
- package/src/bundles/assets/point_icons/green-circle.png +0 -0
- package/src/bundles/assets/point_icons/green-circle.svg +3 -0
- package/src/bundles/assets/point_icons/observation-icon.svg +12 -0
- package/src/bundles/assets/point_icons/pink-circle.svg +3 -0
- package/src/bundles/assets/point_icons/pump-station-icon.svg +15 -0
- package/src/bundles/assets/point_icons/red-pin-red-shadow.png +0 -0
- package/src/bundles/assets/point_icons/sampling-icon.svg +9 -0
- package/src/bundles/assets/point_icons/white-pin-black-shadow.png +0 -0
- package/src/bundles/assets/point_icons/white-pin-red-shadow.png +0 -0
- package/src/bundles/assets/point_icons/yellow-circle.svg +3 -0
- package/src/bundles/assets/sewer.svg +3 -0
- package/src/bundles/assets/user.svg +44 -0
- package/src/bundles/assets/white-point.png +0 -0
- package/src/bundles/index.js +26 -0
- package/src/bundles/shared/TimeRangeSelector/TimeRangeSelector.tsx +79 -0
- package/src/bundles/shared/TimeRangeSelector/constants.ts +1 -0
- package/src/bundles/shared/TimeRangeSelector/index.ts +3 -0
- package/src/bundles/shared/TimeRangeSelector/styles.scss +65 -0
- package/src/bundles/shared/components/Breadcrumbs/Breadcrumbs.tsx +34 -0
- package/src/bundles/shared/components/Breadcrumbs/index.ts +3 -0
- package/src/bundles/shared/components/Breadcrumbs/styles.scss +8 -0
- package/src/bundles/shared/components/ContentLoader/ContentLoader.tsx +39 -0
- package/src/bundles/shared/components/ContentLoader/index.ts +1 -0
- package/src/bundles/shared/components/DamageType/DamageType.tsx +234 -0
- package/src/bundles/shared/components/DamageType/index.ts +3 -0
- package/src/bundles/shared/components/DamageType/styles.scss +50 -0
- package/src/bundles/shared/components/DischargeHeatmap/DischargeHeatmap.tsx +205 -0
- package/src/bundles/shared/components/DischargeHeatmap/index.ts +3 -0
- package/src/bundles/shared/components/DischargeHeatmap/styles.scss +17 -0
- package/src/bundles/shared/components/ErrorBoundary.jsx +40 -0
- package/src/bundles/shared/components/Events/Events.tsx +205 -0
- package/src/bundles/shared/components/Events/index.ts +3 -0
- package/src/bundles/shared/components/Events/styles.scss +131 -0
- package/src/bundles/shared/components/Graph/Graph.tsx +156 -0
- package/src/bundles/shared/components/Graph/index.ts +3 -0
- package/src/bundles/shared/components/KandoModal/KandoModal.tsx +88 -0
- package/src/bundles/shared/components/KandoModal/index.ts +3 -0
- package/src/bundles/shared/components/KandoModal/styles.scss +19 -0
- package/src/bundles/shared/components/KandoNavbar/KandoNavbar.tsx +232 -0
- package/src/bundles/shared/components/KandoNavbar/NavbarStyle.scss +238 -0
- package/src/bundles/shared/components/KandoNavbar/index.ts +3 -0
- package/src/bundles/shared/components/LiveEvents/CarouselSlide.tsx +80 -0
- package/src/bundles/shared/components/LiveEvents/LiveEvents.tsx +38 -0
- package/src/bundles/shared/components/LiveEvents/index.ts +3 -0
- package/src/bundles/shared/components/LiveEvents/styles.scss +80 -0
- package/src/bundles/shared/components/Map/Map.tsx +79 -0
- package/src/bundles/shared/components/Map/index.ts +3 -0
- package/src/bundles/shared/components/Map/styles.scss +7 -0
- package/src/bundles/shared/components/NarrowHeader.jsx +18 -0
- package/src/bundles/shared/components/PointInfo/PointInfo.tsx +80 -0
- package/src/bundles/shared/components/PointInfo/index.ts +3 -0
- package/src/bundles/shared/components/PointInfo/styles.scss +48 -0
- package/src/bundles/shared/components/Search/Search.tsx +106 -0
- package/src/bundles/shared/components/Search/index.ts +3 -0
- package/src/bundles/shared/components/Search/styles.scss +27 -0
- package/src/bundles/shared/components/Sector/Sector.tsx +156 -0
- package/src/bundles/shared/components/Sector/index.ts +3 -0
- package/src/bundles/shared/components/Sector/styles.scss +14 -0
- package/src/bundles/shared/components/Sector/svgs/Brewing.svg +93 -0
- package/src/bundles/shared/components/Sector/svgs/Cowshed.svg +23 -0
- package/src/bundles/shared/components/Sector/svgs/Garage.svg +24 -0
- package/src/bundles/shared/components/Sector/svgs/Missing.svg +36 -0
- package/src/bundles/shared/components/Sector/svgs/barrel.svg +93 -0
- package/src/bundles/shared/components/Sector/svgs/beer.svg +13 -0
- package/src/bundles/shared/components/Sector/svgs/beverage.svg +13 -0
- package/src/bundles/shared/components/Sector/svgs/car-repair.svg +24 -0
- package/src/bundles/shared/components/Sector/svgs/car-wash.svg +36 -0
- package/src/bundles/shared/components/Sector/svgs/chemistry.svg +30 -0
- package/src/bundles/shared/components/Sector/svgs/conductor-manufacturer.svg +17 -0
- package/src/bundles/shared/components/Sector/svgs/cosmetic-manufacturer.svg +23 -0
- package/src/bundles/shared/components/Sector/svgs/cow.svg +23 -0
- package/src/bundles/shared/components/Sector/svgs/cpu.svg +17 -0
- package/src/bundles/shared/components/Sector/svgs/dairy.svg +18 -0
- package/src/bundles/shared/components/Sector/svgs/dippel-oil.svg +17 -0
- package/src/bundles/shared/components/Sector/svgs/food-donation.svg +29 -0
- package/src/bundles/shared/components/Sector/svgs/food-factory.svg +17 -0
- package/src/bundles/shared/components/Sector/svgs/garbage-truck-1.svg +34 -0
- package/src/bundles/shared/components/Sector/svgs/gas-station.svg +26 -0
- package/src/bundles/shared/components/Sector/svgs/glass-manufacturer.svg +21 -0
- package/src/bundles/shared/components/Sector/svgs/glass.svg +21 -0
- package/src/bundles/shared/components/Sector/svgs/hand-washing.svg +17 -0
- package/src/bundles/shared/components/Sector/svgs/hospital.svg +28 -0
- package/src/bundles/shared/components/Sector/svgs/hotel.svg +24 -0
- package/src/bundles/shared/components/Sector/svgs/laundromat.svg +26 -0
- package/src/bundles/shared/components/Sector/svgs/leather-factory.svg +23 -0
- package/src/bundles/shared/components/Sector/svgs/leather.svg +23 -0
- package/src/bundles/shared/components/Sector/svgs/lipstick.svg +23 -0
- package/src/bundles/shared/components/Sector/svgs/meat.svg +24 -0
- package/src/bundles/shared/components/Sector/svgs/metal-coating-plant.svg +21 -0
- package/src/bundles/shared/components/Sector/svgs/metal-facbrication.svg +20 -0
- package/src/bundles/shared/components/Sector/svgs/milk.svg +18 -0
- package/src/bundles/shared/components/Sector/svgs/oil-rig.svg +17 -0
- package/src/bundles/shared/components/Sector/svgs/petrochemical.svg +13 -0
- package/src/bundles/shared/components/Sector/svgs/pie.svg +17 -0
- package/src/bundles/shared/components/Sector/svgs/pills.svg +22 -0
- package/src/bundles/shared/components/Sector/svgs/plant-unkown-3.svg +36 -0
- package/src/bundles/shared/components/Sector/svgs/plastic-rubber.svg +43 -0
- package/src/bundles/shared/components/Sector/svgs/printer.svg +17 -0
- package/src/bundles/shared/components/Sector/svgs/recycling.svg +17 -0
- package/src/bundles/shared/components/Sector/svgs/refinery.svg +18 -0
- package/src/bundles/shared/components/Sector/svgs/repair.svg +13 -0
- package/src/bundles/shared/components/Sector/svgs/sewing-machine.svg +22 -0
- package/src/bundles/shared/components/Sector/svgs/shop.svg +24 -0
- package/src/bundles/shared/components/Sector/svgs/soda.svg +13 -0
- package/src/bundles/shared/components/Sector/svgs/spray-gun.svg +21 -0
- package/src/bundles/shared/components/Sector/svgs/washing-machine.svg +26 -0
- package/src/bundles/shared/components/Sector/svgs/waste.svg +43 -0
- package/src/bundles/shared/components/Sector/svgs/welder-a.svg +20 -0
- package/src/bundles/shared/components/Sector/svgs/wine-glass.svg +15 -0
- package/src/bundles/shared/components/Toggle/Toggle.tsx +51 -0
- package/src/bundles/shared/components/Toggle/index.ts +3 -0
- package/src/bundles/shared/components/Toggle/styles.scss +44 -0
- package/src/bundles/shared/components/TrendGraph/TrendGraph.tsx +166 -0
- package/src/bundles/shared/components/TrendGraph/index.ts +3 -0
- package/src/bundles/shared/components/TrendGraph/styles.scss +2 -0
- package/src/bundles/shared/components/TrendGraphNVL/TrendGraphNVL.tsx +134 -0
- package/src/bundles/shared/components/TrendGraphNVL/index.ts +3 -0
- package/src/bundles/shared/components/TrendGraphNVL/styles.scss +16 -0
- package/src/bundles/shared/helpers/kql.ts +39 -0
- package/src/bundles/shared/helpers/time.ts +12 -0
- package/src/bundles/shared/models/IAction.ts +9 -0
- package/src/bundles/shared/models/IAppState.ts +18 -0
- package/src/bundles/shared/redux/WBE/actionTypes.ts +1 -0
- package/src/bundles/shared/redux/WBE/actions.ts +8 -0
- package/src/bundles/shared/redux/WBE/models/IAreaWBE.ts +21 -0
- package/src/bundles/shared/redux/WBE/models/IWBE.ts +7 -0
- package/src/bundles/shared/redux/WBE/models/IWBEState.ts +5 -0
- package/src/bundles/shared/redux/WBE/reducer.ts +24 -0
- package/src/bundles/shared/redux/areas/actionTypes.ts +3 -0
- package/src/bundles/shared/redux/areas/actions.ts +31 -0
- package/src/bundles/shared/redux/areas/models/IArea.ts +6 -0
- package/src/bundles/shared/redux/areas/models/IAreasState.ts +6 -0
- package/src/bundles/shared/redux/areas/reducer.ts +44 -0
- package/src/bundles/shared/redux/context/actionTypes.ts +1 -0
- package/src/bundles/shared/redux/context/actions.ts +8 -0
- package/src/bundles/shared/redux/context/models/INavContext.ts +4 -0
- package/src/bundles/shared/redux/context/models/INavContextState.ts +5 -0
- package/src/bundles/shared/redux/context/reducer.ts +25 -0
- package/src/bundles/shared/redux/edges/actionTypes.ts +4 -0
- package/src/bundles/shared/redux/edges/actions.ts +37 -0
- package/src/bundles/shared/redux/edges/models/IEdge.ts +9 -0
- package/src/bundles/shared/redux/edges/models/IEdgesState.ts +6 -0
- package/src/bundles/shared/redux/edges/reducer.ts +59 -0
- package/src/bundles/shared/redux/events/actionTypes.ts +11 -0
- package/src/bundles/shared/redux/events/actions.ts +100 -0
- package/src/bundles/shared/redux/events/models/IEvent.ts +29 -0
- package/src/bundles/shared/redux/events/models/IEventsState.ts +9 -0
- package/src/bundles/shared/redux/events/models/ISource.ts +6 -0
- package/src/bundles/shared/redux/events/reducer.ts +167 -0
- package/src/bundles/shared/redux/filters/IFilter.ts +13 -0
- package/src/bundles/shared/redux/filters/IFilterItem.ts +9 -0
- package/src/bundles/shared/redux/global/actionTypes.ts +9 -0
- package/src/bundles/shared/redux/global/actions.ts +76 -0
- package/src/bundles/shared/redux/global/models/IGlobalState.ts +16 -0
- package/src/bundles/shared/redux/global/reducer.ts +81 -0
- package/src/bundles/shared/redux/points/actionTypes.ts +3 -0
- package/src/bundles/shared/redux/points/actions.ts +24 -0
- package/src/bundles/shared/redux/points/models/IGroup.ts +7 -0
- package/src/bundles/shared/redux/points/models/IPoint.ts +16 -0
- package/src/bundles/shared/redux/points/models/IPointsState.ts +6 -0
- package/src/bundles/shared/redux/points/reducer.ts +26 -0
- package/src/bundles/shared/redux/rootActionTypes.ts +1 -0
- package/src/bundles/shared/redux/rootActions.ts +7 -0
- package/src/bundles/shared/redux/rootReducer.ts +33 -0
- package/src/bundles/shared/redux/rootStore.ts +34 -0
- package/src/bundles/shared/utilities/ActionUtility.ts +9 -0
- package/src/bundles/shared/utilities/ErrorBoundary.tsx +40 -0
- package/src/bundles/shared/utilities/KandoDate.ts +11 -0
- package/src/bundles/shared/utilities/KandoModal.tsx +40 -0
- package/src/bundles/shared/utilities/LocalStorage.tsx +31 -0
- package/src/bundles/shared/utilities/TimeFormat.tsx +64 -0
- package/src/bundles/shared/utilities/Truncate.tsx +54 -0
- package/src/bundles/shared/utilities/custom_hooks/useClickOutside.ts +18 -0
- package/src/bundles/shared/utilities/custom_hooks/useKandoFetch.ts +45 -0
- package/src/bundles/shared/utilities/custom_hooks/useQueryURL.ts +7 -0
- package/src/bundles/shared/utilities/custom_hooks/useRemoveExistingLayers.tsx +24 -0
- package/src/bundles/shared/utilities/custom_hooks/useUpdateEventBodyTail.tsx +52 -0
- package/src/bundles/shared/utilities/i18n.tsx +9 -0
- package/src/index.js +21 -0
- package/src/init-api-mock.js +11 -0
- package/src/locals.js +12296 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/stories/examples/Button.stories.tsx +37 -0
- package/src/stories/examples/Button.tsx +48 -0
- package/src/stories/examples/Header.stories.tsx +19 -0
- package/src/stories/examples/Header.tsx +47 -0
- package/src/stories/examples/Introduction.stories.mdx +211 -0
- package/src/stories/examples/Page.stories.tsx +22 -0
- package/src/stories/examples/Page.tsx +67 -0
- package/src/stories/examples/assets/code-brackets.svg +1 -0
- package/src/stories/examples/assets/colors.svg +1 -0
- package/src/stories/examples/assets/comments.svg +1 -0
- package/src/stories/examples/assets/direction.svg +1 -0
- package/src/stories/examples/assets/flow.svg +1 -0
- package/src/stories/examples/assets/plugin.svg +1 -0
- package/src/stories/examples/assets/repo.svg +1 -0
- package/src/stories/examples/assets/stackalt.svg +1 -0
- package/src/stories/examples/button.css +30 -0
- package/src/stories/examples/header.css +26 -0
- package/src/stories/examples/page.css +69 -0
- package/static/fonts/Gilroy-ExtraBold.otf +0 -0
- package/static/fonts/Gilroy-Light.otf +0 -0
- package/static/fonts/Gilroy-Regular.otf +0 -0
- package/static/fonts/Gilroy-SemiBold.otf +0 -0
- package/static/fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/static/mockServiceWorker.js +323 -0
- package/temp-fix-paths/fix-paths.test.js +143 -0
- package/temp-fix-paths/lib.js +97 -0
- package/temp-fix-paths/run.js +4 -0
- package/temp-fix-paths/test-dir/a/a.ts +0 -0
- package/temp-fix-paths/test-dir/a/aa/aa.ts +0 -0
- package/temp-fix-paths/test-dir/a/aa/aaa/aaa.ts +8 -0
- package/temp-fix-paths/test-dir/b/b.ts +0 -0
- package/temp-fix-paths/test-dir/b/bb/bb.ts +0 -0
- package/temp-fix-paths/test-dir/b/bb/bbb/bbb.ts +1 -0
- package/tsconfig.json +39 -0
- package/types/global/index.d.ts +28 -0
- package/index.js +0 -1
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
15
|
+
|
|
16
|
+
var _reactRedux = require("react-redux");
|
|
17
|
+
|
|
18
|
+
var _useRemoveExistingLayers = _interopRequireWildcard(require("../../../../shared/utilities/custom_hooks/useRemoveExistingLayers"));
|
|
19
|
+
|
|
20
|
+
var _i18n = _interopRequireDefault(require("../../../../shared/utilities/i18n"));
|
|
21
|
+
|
|
22
|
+
var _lineChart = _interopRequireDefault(require("../../../../assets/line-chart.svg"));
|
|
23
|
+
|
|
24
|
+
var _jquery = _interopRequireDefault(require("jquery"));
|
|
25
|
+
|
|
26
|
+
var _actions = require("../../../../shared/redux/global/actions");
|
|
27
|
+
|
|
28
|
+
var _whitePoint = _interopRequireDefault(require("../../../../assets/white-point.png"));
|
|
29
|
+
|
|
30
|
+
var _whitePinRedShadow = _interopRequireDefault(require("../../../../assets/point_icons/white-pin-red-shadow.png"));
|
|
31
|
+
|
|
32
|
+
var _whitePinBlackShadow = _interopRequireDefault(require("../../../../assets/point_icons/white-pin-black-shadow.png"));
|
|
33
|
+
|
|
34
|
+
var _redPinRedShadow = _interopRequireDefault(require("../../../../assets/point_icons/red-pin-red-shadow.png"));
|
|
35
|
+
|
|
36
|
+
var _yellowCircle = _interopRequireDefault(require("../../../../assets/point_icons/yellow-circle.svg"));
|
|
37
|
+
|
|
38
|
+
var _brightBlueCircle = _interopRequireDefault(require("../../../../assets/point_icons/bright-blue-circle.svg"));
|
|
39
|
+
|
|
40
|
+
var _greenCircle = _interopRequireDefault(require("../../../../assets/point_icons/green-circle.svg"));
|
|
41
|
+
|
|
42
|
+
var _pinkCircle = _interopRequireDefault(require("../../../../assets/point_icons/pink-circle.svg"));
|
|
43
|
+
|
|
44
|
+
var _blueCircle = _interopRequireDefault(require("../../../../assets/point_icons/blue-circle.svg"));
|
|
45
|
+
|
|
46
|
+
var _WWTPIcon = _interopRequireDefault(require("../../../../assets/point_icons/WWTP-icon.svg"));
|
|
47
|
+
|
|
48
|
+
var _factoryIcon = _interopRequireDefault(require("../../../../assets/point_icons/factory-icon.svg"));
|
|
49
|
+
|
|
50
|
+
var _pumpStationIcon = _interopRequireDefault(require("../../../../assets/point_icons/pump-station-icon.svg"));
|
|
51
|
+
|
|
52
|
+
var _observationIcon = _interopRequireDefault(require("../../../../assets/point_icons/observation-icon.svg"));
|
|
53
|
+
|
|
54
|
+
var _samplingIcon = _interopRequireDefault(require("../../../../assets/point_icons/sampling-icon.svg"));
|
|
55
|
+
|
|
56
|
+
var _DamageType = _interopRequireDefault(require("../events/event_info/damage_type/DamageType"));
|
|
57
|
+
|
|
58
|
+
var _TimeFormat = _interopRequireDefault(require("../../../../shared/utilities/TimeFormat"));
|
|
59
|
+
|
|
60
|
+
var _Sector = _interopRequireDefault(require("../../../../shared/components/Sector"));
|
|
61
|
+
|
|
62
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
63
|
+
|
|
64
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
65
|
+
|
|
66
|
+
function mapStateToProps(state) {
|
|
67
|
+
var events_data = state.events_data;
|
|
68
|
+
return {
|
|
69
|
+
events_data: events_data
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
var PointMarker = function PointMarker(props) {
|
|
74
|
+
var L = props.L,
|
|
75
|
+
map = props.map,
|
|
76
|
+
point = props.point,
|
|
77
|
+
events_data = props.events_data;
|
|
78
|
+
var focusedEvent = events_data.focusedEvent;
|
|
79
|
+
var dispatch = (0, _reactRedux.useDispatch)(); // iconSize: [width, height],
|
|
80
|
+
// Icon Anchor: [(-right)(+left), (-down)(+up)]
|
|
81
|
+
|
|
82
|
+
var selectedBackground = function selectedBackground() {
|
|
83
|
+
return L.icon({
|
|
84
|
+
iconUrl: _redPinRedShadow.default,
|
|
85
|
+
iconSize: [67, 70],
|
|
86
|
+
iconAnchor: [32, 54],
|
|
87
|
+
popupAnchor: [0, -30]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var belongsToSourceBackground = function belongsToSourceBackground() {
|
|
92
|
+
return L.icon({
|
|
93
|
+
iconUrl: _whitePinRedShadow.default,
|
|
94
|
+
iconSize: [67, 70],
|
|
95
|
+
iconAnchor: [32, 54],
|
|
96
|
+
popupAnchor: [0, -30]
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var standardBackground = function standardBackground() {
|
|
101
|
+
var secondary = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
102
|
+
var third = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
103
|
+
return L.icon({
|
|
104
|
+
iconUrl: _whitePinBlackShadow.default,
|
|
105
|
+
iconSize: secondary ? [20, 20] : [43, 46],
|
|
106
|
+
iconAnchor: secondary && third ? [-2, 19] : secondary ? [-2, 44] : [20, 42],
|
|
107
|
+
popupAnchor: [0, -30]
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
var combinedFactoryIcon = [L.icon({
|
|
112
|
+
iconUrl: _yellowCircle.default,
|
|
113
|
+
iconSize: [25, 24],
|
|
114
|
+
iconAnchor: [10.7, 33.7],
|
|
115
|
+
popupAnchor: [0, -30]
|
|
116
|
+
}), L.icon({
|
|
117
|
+
iconUrl: _factoryIcon.default,
|
|
118
|
+
iconSize: [15, 15],
|
|
119
|
+
iconAnchor: [5, 30],
|
|
120
|
+
popupAnchor: [0, -30]
|
|
121
|
+
})];
|
|
122
|
+
var combinedPumpStationIcon = [L.icon({
|
|
123
|
+
iconUrl: _greenCircle.default,
|
|
124
|
+
iconSize: [25, 24],
|
|
125
|
+
iconAnchor: [10.7, 33.7],
|
|
126
|
+
popupAnchor: [0, -30]
|
|
127
|
+
}), L.icon({
|
|
128
|
+
iconUrl: _pumpStationIcon.default,
|
|
129
|
+
iconSize: [20, 20],
|
|
130
|
+
iconAnchor: [7, 32],
|
|
131
|
+
popupAnchor: [0, -30]
|
|
132
|
+
})];
|
|
133
|
+
var combinedWWTPIcon = [L.icon({
|
|
134
|
+
iconUrl: _brightBlueCircle.default,
|
|
135
|
+
iconSize: [25, 25],
|
|
136
|
+
iconAnchor: [10.7, 33.7],
|
|
137
|
+
popupAnchor: [0, -30]
|
|
138
|
+
}), L.icon({
|
|
139
|
+
iconUrl: _WWTPIcon.default,
|
|
140
|
+
iconSize: [20, 20],
|
|
141
|
+
iconAnchor: [8, 31],
|
|
142
|
+
popupAnchor: [0, -30]
|
|
143
|
+
})];
|
|
144
|
+
|
|
145
|
+
var markerBelongsToSelectedSource = function markerBelongsToSelectedSource() {
|
|
146
|
+
var source;
|
|
147
|
+
|
|
148
|
+
if (events_data.focusedEvent !== null) {
|
|
149
|
+
source = events_data.focusedEvent.sources.filter(function (source) {
|
|
150
|
+
return source.point_id === point.id;
|
|
151
|
+
})[0];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return events_data.focusedEvent !== null && source && events_data.focusedEvent.selected_source === source.point_id;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
var markerBelongsToSource = function markerBelongsToSource() {
|
|
158
|
+
return events_data.focusedEvent !== null && events_data.focusedEvent.sources.filter(function (source) {
|
|
159
|
+
return source.point_id === point.id;
|
|
160
|
+
})[0];
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
var matchIconToPoint = function matchIconToPoint(point) {
|
|
164
|
+
switch (point.group.type) {
|
|
165
|
+
case "Groups::Factory":
|
|
166
|
+
if (combinedFactoryIcon.length === 2) {
|
|
167
|
+
if (markerBelongsToSelectedSource()) {
|
|
168
|
+
combinedFactoryIcon.unshift(selectedBackground());
|
|
169
|
+
} else if (markerBelongsToSource()) {
|
|
170
|
+
combinedFactoryIcon.unshift(belongsToSourceBackground());
|
|
171
|
+
} else {
|
|
172
|
+
combinedFactoryIcon.unshift(standardBackground());
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return combinedFactoryIcon;
|
|
177
|
+
break;
|
|
178
|
+
|
|
179
|
+
case "Groups::PumpStation":
|
|
180
|
+
if (combinedPumpStationIcon.length === 2) {
|
|
181
|
+
if (markerBelongsToSelectedSource()) {
|
|
182
|
+
combinedPumpStationIcon.unshift(selectedBackground());
|
|
183
|
+
} else if (markerBelongsToSource()) {
|
|
184
|
+
combinedPumpStationIcon.unshift(belongsToSourceBackground());
|
|
185
|
+
} else {
|
|
186
|
+
combinedPumpStationIcon.unshift(standardBackground());
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return combinedPumpStationIcon;
|
|
191
|
+
break;
|
|
192
|
+
|
|
193
|
+
case "Groups::WastewaterTreatmentPlant":
|
|
194
|
+
if (combinedWWTPIcon.length === 2) {
|
|
195
|
+
if (markerBelongsToSelectedSource()) {
|
|
196
|
+
combinedWWTPIcon.unshift(selectedBackground());
|
|
197
|
+
} else if (markerBelongsToSource()) {
|
|
198
|
+
combinedWWTPIcon.unshift(belongsToSourceBackground());
|
|
199
|
+
} else {
|
|
200
|
+
combinedWWTPIcon.unshift(standardBackground());
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return combinedWWTPIcon;
|
|
205
|
+
break;
|
|
206
|
+
|
|
207
|
+
default:
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
var createManholePoint = function createManholePoint(markerLocation) {
|
|
213
|
+
var pointIcon = L.icon({
|
|
214
|
+
iconUrl: _whitePoint.default,
|
|
215
|
+
iconSize: [9, 9],
|
|
216
|
+
iconAnchor: [4.5, 4.5]
|
|
217
|
+
});
|
|
218
|
+
var manholeIcon = L.marker(markerLocation, {
|
|
219
|
+
icon: pointIcon,
|
|
220
|
+
riseOnHover: true
|
|
221
|
+
}).addTo(map);
|
|
222
|
+
manholeIcon.bindTooltip("".concat(point.group.name, " (").concat(point.id, ")"));
|
|
223
|
+
manholeIcon["kando_object_id"] = point.id;
|
|
224
|
+
manholeIcon["kando_object"] = "Point";
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
var createCustomIconPoint = function createCustomIconPoint(markerLocation) {
|
|
228
|
+
// @ts-ignore
|
|
229
|
+
matchIconToPoint(point) !== null && matchIconToPoint(point).map(function (icon) {
|
|
230
|
+
var pointCustomIcon = L.marker(markerLocation, {
|
|
231
|
+
icon: icon,
|
|
232
|
+
riseOnHover: false
|
|
233
|
+
}).addTo(map);
|
|
234
|
+
pointCustomIcon.bindTooltip("".concat(point.group.name, " (").concat(point.id, ")"));
|
|
235
|
+
pointCustomIcon["kando_object_id"] = point.id;
|
|
236
|
+
pointCustomIcon["kando_object"] = "Point";
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
var createSamplingIconPoint = function createSamplingIconPoint(markerLocation, secondaryIcon) {
|
|
241
|
+
// iconSize: [width, height],
|
|
242
|
+
// Icon Anchor: [(-right)(+left), (-down)(+up)]
|
|
243
|
+
var samplingIcon = [L.icon({
|
|
244
|
+
iconUrl: _blueCircle.default,
|
|
245
|
+
iconSize: secondaryIcon ? [10, 10] : [25, 24],
|
|
246
|
+
iconAnchor: secondaryIcon ? [-7, 15] : [10.7, 33.7],
|
|
247
|
+
popupAnchor: [0, -30]
|
|
248
|
+
}), L.icon({
|
|
249
|
+
iconUrl: _samplingIcon.default,
|
|
250
|
+
iconSize: secondaryIcon ? [7, 7] : [13, 15],
|
|
251
|
+
iconAnchor: secondaryIcon ? [-8, 13] : [5, 30],
|
|
252
|
+
popupAnchor: [0, -30]
|
|
253
|
+
})];
|
|
254
|
+
|
|
255
|
+
if (markerBelongsToSelectedSource() && !secondaryIcon) {
|
|
256
|
+
samplingIcon.unshift(selectedBackground());
|
|
257
|
+
} else if (markerBelongsToSource() && !secondaryIcon) {
|
|
258
|
+
samplingIcon.unshift(belongsToSourceBackground());
|
|
259
|
+
} else {
|
|
260
|
+
samplingIcon.unshift(standardBackground(secondaryIcon, true));
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
samplingIcon.map(function (icon) {
|
|
264
|
+
var pointCustomIcon = L.marker(markerLocation, {
|
|
265
|
+
icon: icon,
|
|
266
|
+
riseOnHover: false
|
|
267
|
+
}).addTo(map);
|
|
268
|
+
pointCustomIcon.bindTooltip("".concat(point.group.name, " (").concat(point.id, ")"));
|
|
269
|
+
pointCustomIcon["kando_object_id"] = point.id;
|
|
270
|
+
pointCustomIcon["kando_object"] = "Sampling";
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
var createObservationIconPoint = function createObservationIconPoint(markerLocation, secondaryIcon) {
|
|
275
|
+
// iconSize: [width, height],
|
|
276
|
+
// Icon Anchor: [(-right)(+left), (-down)(+up)]
|
|
277
|
+
var observationIcon = [L.icon({
|
|
278
|
+
iconUrl: _pinkCircle.default,
|
|
279
|
+
iconSize: secondaryIcon ? [10, 10] : [25, 24],
|
|
280
|
+
iconAnchor: secondaryIcon ? [-7, 40] : [10.7, 33.7],
|
|
281
|
+
popupAnchor: [0, -30]
|
|
282
|
+
}), L.icon({
|
|
283
|
+
iconUrl: _observationIcon.default,
|
|
284
|
+
iconSize: secondaryIcon ? [7, 7] : [13, 15],
|
|
285
|
+
iconAnchor: secondaryIcon ? [-8, 38] : [5, 30],
|
|
286
|
+
popupAnchor: [0, -30]
|
|
287
|
+
})];
|
|
288
|
+
|
|
289
|
+
if (markerBelongsToSelectedSource() && !secondaryIcon) {
|
|
290
|
+
observationIcon.unshift(selectedBackground());
|
|
291
|
+
} else if (markerBelongsToSource() && !secondaryIcon) {
|
|
292
|
+
observationIcon.unshift(belongsToSourceBackground());
|
|
293
|
+
} else {
|
|
294
|
+
observationIcon.unshift(standardBackground(secondaryIcon));
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
observationIcon.map(function (icon) {
|
|
298
|
+
var pointCustomIcon = L.marker(markerLocation, {
|
|
299
|
+
icon: icon,
|
|
300
|
+
riseOnHover: false
|
|
301
|
+
}).addTo(map);
|
|
302
|
+
pointCustomIcon.bindTooltip("".concat(point.group.name, " (").concat(point.id, ")"));
|
|
303
|
+
pointCustomIcon["kando_object_id"] = point.id;
|
|
304
|
+
pointCustomIcon["kando_object"] = "Observation";
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
var popupContent = function popupContent(obs) {
|
|
309
|
+
if (obs === null) {
|
|
310
|
+
return "\n <div class=\"event-popup\">\n <div class=\"popup-graph-icon popup-graph-icon-".concat(point.id, "\">\n <img src=\"").concat(_lineChart.default, "\"/>\n </div>\n <div class=\"popup-content\">\n <h5 class=\"popup-content__site-name\"><b>").concat(point.group.name, "</b></h5>\n <hr/>\n \n <div id=\"sector\"></div>\n </div>\n </div>\n ");
|
|
311
|
+
} else {
|
|
312
|
+
return "\n <div class=\"event-popup\">\n <div class=\"popup-graph-icon popup-graph-icon-".concat(obs.id, "\">\n <img src=\"").concat(_lineChart.default, "\"/>\n </div>\n <div class=\"popup-content\">\n <h5 class=\"popup-content__site-name\"><b>").concat(point.group.name, "</b></h5>\n <div class=\"popup-content__severity\">\n <p>").concat(_i18n.default.t("events_overview.severity"), "</p>\n <span class=\"").concat('popup-content__severity--' + obs.severity, "\"><b>").concat(_i18n.default.t("events_overview.severities.".concat(obs.severity)), "</b></span>\n </div>\n \n <hr/>\n \n <div class=\"popup-content__damage-type\" id=\"damage-type-popup\">\n <p>").concat(_i18n.default.t("events_overview.local_damage_type"), "</p>\n </div>\n \n <hr/>\n\n <div class=\"popup-content__discharge-time\">\n <div>\n <p>").concat(_i18n.default.t("events_overview.first_seen"), "</p>\n <span><b id=\"first-seen-popup\"></b></span>\n </div>\n <div>\n <p>").concat(_i18n.default.t("events_overview.last_seen"), "</p>\n <span><b id=\"last-seen-popup\"></b></span>\n </div> \n </div>\n </div>\n </div>\n ");
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
(0, _useRemoveExistingLayers.default)(map, point, "Point");
|
|
317
|
+
(0, _useRemoveExistingLayers.default)(map, point, "Observation");
|
|
318
|
+
(0, _useRemoveExistingLayers.default)(map, point, "Sampling");
|
|
319
|
+
|
|
320
|
+
var pointIsObservation = function pointIsObservation() {
|
|
321
|
+
return focusedEvent !== null && focusedEvent.observations.filter(function (obs) {
|
|
322
|
+
return obs.point_id === point.id;
|
|
323
|
+
})[0];
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
var pointBelongsToEvent = function pointBelongsToEvent() {
|
|
327
|
+
return true;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
var bindPopupToPoint = function bindPopupToPoint() {
|
|
331
|
+
var obs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
332
|
+
var layers = map._layers;
|
|
333
|
+
|
|
334
|
+
var _loop = function _loop(property) {
|
|
335
|
+
if (["Point", "Observation"].includes(layers[property].kando_object) && layers[property].kando_object_id === point.id) {
|
|
336
|
+
layers[property].bindPopup(popupContent(obs), {
|
|
337
|
+
minWidth: 200
|
|
338
|
+
});
|
|
339
|
+
layers[property].on('popupopen', function (e) {
|
|
340
|
+
if (focusedEvent !== null) {
|
|
341
|
+
var damages = document.createElement('div');
|
|
342
|
+
var firstSeen = document.createElement('div');
|
|
343
|
+
var lastSeen = document.createElement('div');
|
|
344
|
+
var sector = document.createElement('div');
|
|
345
|
+
|
|
346
|
+
if (obs !== null) {
|
|
347
|
+
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_TimeFormat.default, {
|
|
348
|
+
timestamp: obs.start_time,
|
|
349
|
+
time_zone: obs.time_zone
|
|
350
|
+
}), firstSeen);
|
|
351
|
+
|
|
352
|
+
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_TimeFormat.default, {
|
|
353
|
+
timestamp: obs.last_seen_time,
|
|
354
|
+
time_zone: obs.time_zone
|
|
355
|
+
}), lastSeen);
|
|
356
|
+
|
|
357
|
+
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_DamageType.default, {
|
|
358
|
+
event: focusedEvent,
|
|
359
|
+
forEvent: false,
|
|
360
|
+
observation: obs
|
|
361
|
+
}), damages);
|
|
362
|
+
} else {
|
|
363
|
+
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_Sector.default, {
|
|
364
|
+
sectorName: point.group.sector_name,
|
|
365
|
+
sectorIconName: point.group.sector_icon_name,
|
|
366
|
+
width: "37"
|
|
367
|
+
}), sector);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
setTimeout(function () {
|
|
371
|
+
(0, _jquery.default)("#damage-type-popup").append(damages);
|
|
372
|
+
(0, _jquery.default)("#first-seen-popup").append(firstSeen);
|
|
373
|
+
(0, _jquery.default)("#last-seen-popup").append(lastSeen);
|
|
374
|
+
(0, _jquery.default)("#sector").append(sector);
|
|
375
|
+
}, 200);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
var attachClickEvent = function attachClickEvent(selector, observation) {
|
|
379
|
+
(0, _jquery.default)(document.body).on('click', selector, function () {
|
|
380
|
+
dispatch((0, _actions.openFloatingGraph)(true, observation, point));
|
|
381
|
+
});
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
if (obs !== null) {
|
|
385
|
+
attachClickEvent(".popup-graph-icon-" + obs.id, obs);
|
|
386
|
+
} else {
|
|
387
|
+
attachClickEvent(".popup-graph-icon-" + point.id, null);
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
layers[property].on("click", function () {
|
|
391
|
+
layers[property].openPopup();
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
for (var property in layers) {
|
|
397
|
+
_loop(property);
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
(0, _react.useEffect)(function () {
|
|
402
|
+
var markerLocation = [point['latitude'], point['longitude']];
|
|
403
|
+
|
|
404
|
+
if (markerLocation[0] !== null) {
|
|
405
|
+
createManholePoint(markerLocation);
|
|
406
|
+
|
|
407
|
+
if (matchIconToPoint(point) !== null && (focusedEvent === null || focusedEvent !== null && pointIsObservation() || point.group.type === 'Groups::WastewaterTreatmentPlant')) {
|
|
408
|
+
createCustomIconPoint(markerLocation);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
if (focusedEvent !== null && pointIsObservation()) {
|
|
412
|
+
var hasPrimaryIcon = matchIconToPoint(point) !== null;
|
|
413
|
+
createObservationIconPoint(markerLocation, hasPrimaryIcon); // @ts-ignore
|
|
414
|
+
|
|
415
|
+
if (focusedEvent !== null && focusedEvent.samplings.length !== 0 && focusedEvent.samplings[0].point_id === point.id) {
|
|
416
|
+
createSamplingIconPoint(markerLocation, hasPrimaryIcon);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
if (focusedEvent !== null && pointBelongsToEvent()) {
|
|
421
|
+
var obs = focusedEvent.observations.filter(function (obs) {
|
|
422
|
+
return obs.point_id === point.id;
|
|
423
|
+
})[0];
|
|
424
|
+
bindPopupToPoint(obs);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
return function cleanup() {
|
|
429
|
+
// UNBIND POPUP
|
|
430
|
+
(0, _useRemoveExistingLayers.removeFromMap)(map, point, "Observation");
|
|
431
|
+
(0, _useRemoveExistingLayers.removeFromMap)(map, point, "Point");
|
|
432
|
+
(0, _useRemoveExistingLayers.removeFromMap)(map, point, "Sampling");
|
|
433
|
+
};
|
|
434
|
+
}, [focusedEvent]);
|
|
435
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
var connector = (0, _reactRedux.connect)(mapStateToProps);
|
|
439
|
+
|
|
440
|
+
var _default = connector( /*#__PURE__*/_react.default.memo(PointMarker, function (prevProps, nextProps) {
|
|
441
|
+
var prev_focusedEventId = (((prevProps || {}).events_data || {}).focusedEvent || {}).id;
|
|
442
|
+
var next_focusedEventId = (((nextProps || {}).events_data || {}).focusedEvent || {}).id;
|
|
443
|
+
var prev_selectedSource = (((prevProps || {}).events_data || {}).focusedEvent || {}).selected_source;
|
|
444
|
+
var next_selectedSource = (((nextProps || {}).events_data || {}).focusedEvent || {}).selected_source;
|
|
445
|
+
|
|
446
|
+
if (prev_focusedEventId != next_focusedEventId || prev_selectedSource != next_selectedSource) {
|
|
447
|
+
return false;
|
|
448
|
+
} else {
|
|
449
|
+
return true;
|
|
450
|
+
}
|
|
451
|
+
}));
|
|
452
|
+
|
|
453
|
+
exports.default = _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.PointMarkers = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _PointMarker = _interopRequireDefault(require("./PointMarker"));
|
|
13
|
+
|
|
14
|
+
var PointMarkers = function PointMarkers(props) {
|
|
15
|
+
var L = props.L,
|
|
16
|
+
points = props.points,
|
|
17
|
+
map = props.map;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", null, points.length !== 0 && points.filter(function (point) {
|
|
19
|
+
return point.has_device;
|
|
20
|
+
}).map(function (point) {
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_PointMarker.default, {
|
|
22
|
+
map: map,
|
|
23
|
+
L: L,
|
|
24
|
+
point: point,
|
|
25
|
+
key: point.id
|
|
26
|
+
});
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.PointMarkers = PointMarkers;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _reactRedux = require("react-redux");
|
|
15
|
+
|
|
16
|
+
require("bootstrap/dist/css/bootstrap.min.css");
|
|
17
|
+
|
|
18
|
+
var _Body = _interopRequireDefault(require("./components/Body"));
|
|
19
|
+
|
|
20
|
+
var _actions = require("../../shared/redux/context/actions");
|
|
21
|
+
|
|
22
|
+
var _KandoNavbar = _interopRequireDefault(require("../../shared/components/KandoNavbar"));
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
var eventsView = function eventsView() {
|
|
29
|
+
var dispatch = (0, _reactRedux.useDispatch)();
|
|
30
|
+
var waterAuthorityId = (0, _reactRedux.useSelector)(function (state) {
|
|
31
|
+
return state.global_data.waterAuthorityId;
|
|
32
|
+
});
|
|
33
|
+
(0, _react.useEffect)(function () {
|
|
34
|
+
console.log("HEY");
|
|
35
|
+
dispatch((0, _actions.updateNavContext)({
|
|
36
|
+
name: 'events_view'
|
|
37
|
+
}));
|
|
38
|
+
}, [dispatch]);
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_KandoNavbar.default, {
|
|
40
|
+
waterAuthorityId: waterAuthorityId
|
|
41
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
+
className: "app-wrapper"
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_Body.default, null)));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var _default = eventsView;
|
|
47
|
+
exports.default = _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDataFromServer = getDataFromServer;
|
|
7
|
+
exports.getDetection = getDetection;
|
|
8
|
+
|
|
9
|
+
function getDataFromServer(period, waterAuthorityId) {
|
|
10
|
+
return fetch("/project_management/points_tree.json?period=" + period + "&water_authority_id=" + waterAuthorityId).then(function (res) {
|
|
11
|
+
return res.json();
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function getDetection(period, waterAuthorityId) {
|
|
16
|
+
return fetch("/project_management/detection.json?period=" + period + "&water_authority_id=" + waterAuthorityId).then(function (res) {
|
|
17
|
+
return res.json();
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
+
|
|
16
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
+
|
|
18
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
+
|
|
20
|
+
var _react = _interopRequireDefault(require("react"));
|
|
21
|
+
|
|
22
|
+
var _linkToItem = _interopRequireDefault(require("./link-to-item"));
|
|
23
|
+
|
|
24
|
+
var _metrics = _interopRequireDefault(require("./metrics"));
|
|
25
|
+
|
|
26
|
+
var _reactContentLoader = require("react-content-loader");
|
|
27
|
+
|
|
28
|
+
var _ErrorBoundary = _interopRequireDefault(require("../../shared/components/ErrorBoundary"));
|
|
29
|
+
|
|
30
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
31
|
+
|
|
32
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
33
|
+
|
|
34
|
+
function ItemsList(props) {
|
|
35
|
+
var items = props.items;
|
|
36
|
+
var listItems = items.map(function (item) {
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
+
key: item.id,
|
|
39
|
+
className: "prj-mng-item"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: "item-details"
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
+
className: "row"
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
+
className: "col-lg-9"
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement(_linkToItem.default, {
|
|
47
|
+
item: item,
|
|
48
|
+
handleSetSelectedPoint: props.handleSetSelectedPoint
|
|
49
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
+
className: "col-lg-3"
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement(_metrics.default, {
|
|
52
|
+
item: item
|
|
53
|
+
})))));
|
|
54
|
+
});
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement("div", null, listItems);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var KpiListItem = /*#__PURE__*/function (_React$Component) {
|
|
59
|
+
(0, _inherits2.default)(KpiListItem, _React$Component);
|
|
60
|
+
|
|
61
|
+
var _super = _createSuper(KpiListItem);
|
|
62
|
+
|
|
63
|
+
function KpiListItem() {
|
|
64
|
+
(0, _classCallCheck2.default)(this, KpiListItem);
|
|
65
|
+
return _super.apply(this, arguments);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
(0, _createClass2.default)(KpiListItem, [{
|
|
69
|
+
key: "render",
|
|
70
|
+
value: function render() {
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
72
|
+
className: "col col-lg-3 col-md-6"
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
+
className: "ibox float-e-margins ibox-sm"
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
className: "ibox-title"
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement("h5", null, this.props.title)), /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
+
className: "ibox-content"
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_ErrorBoundary.default, null, this.props.loading ? /*#__PURE__*/_react.default.createElement(_reactContentLoader.BulletList, null) : /*#__PURE__*/_react.default.createElement(ItemsList, {
|
|
80
|
+
items: this.props.items,
|
|
81
|
+
handleSetSelectedPoint: this.props.handleSetSelectedPoint
|
|
82
|
+
})))));
|
|
83
|
+
}
|
|
84
|
+
}]);
|
|
85
|
+
return KpiListItem;
|
|
86
|
+
}(_react.default.Component);
|
|
87
|
+
|
|
88
|
+
exports.default = KpiListItem;
|