@kando-env/kando-ui 1.0.1 → 1.0.2
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/package.json +1 -1
- package/src/bundles/Router.tsx +1 -0
- package/lib-build/CovidView/views/components/Body.js +0 -90
- package/lib-build/CovidView/views/components/Map.js +0 -142
- package/lib-build/CovidView/views/components/MapStyle.scss +0 -387
- package/lib-build/CovidView/views/components/Sidebar.js +0 -50
- package/lib-build/CovidView/views/components/SidebarStyle.scss +0 -11
- package/lib-build/CovidView/views/components/Summary.js +0 -145
- package/lib-build/CovidView/views/components/SummaryStyle.scss +0 -61
- package/lib-build/CovidView/views/components/areas/Area.js +0 -171
- package/lib-build/CovidView/views/components/areas/AreaPolygonWBE.js +0 -241
- package/lib-build/CovidView/views/components/areas/AreaPolygonsWBE.js +0 -81
- package/lib-build/CovidView/views/components/areas/AreasList.js +0 -123
- package/lib-build/CovidView/views/components/areas/AreasStyle.scss +0 -237
- package/lib-build/CovidView/views/components/areas/Sort.js +0 -59
- package/lib-build/CovidView/views/components/areas/TrendPopupContent/TrendPopupContent.js +0 -148
- package/lib-build/CovidView/views/components/areas/TrendPopupContent/index.js +0 -13
- package/lib-build/CovidView/views/components/areas/TrendPopupContent/styles.scss +0 -30
- package/lib-build/CovidView/views/covidView.js +0 -46
- package/lib-build/DashboardV2/AreaDashboard.js +0 -116
- package/lib-build/DashboardV2/SiteDashboard.js +0 -364
- package/lib-build/DashboardV2/WaterAuthorityDashboard.js +0 -45
- package/lib-build/DashboardV2/index.js +0 -31
- package/lib-build/DashboardV2/styles.scss +0 -126
- package/lib-build/DashboardV2/types/IDashboardData.js +0 -5
- package/lib-build/EventsView/views/_colors.scss +0 -1
- package/lib-build/EventsView/views/components/Body.js +0 -76
- package/lib-build/EventsView/views/components/areas/AreaPolygon.js +0 -53
- package/lib-build/EventsView/views/components/areas/AreaPolygons.js +0 -63
- package/lib-build/EventsView/views/components/edges/Edge.js +0 -75
- package/lib-build/EventsView/views/components/edges/Edges.js +0 -50
- package/lib-build/EventsView/views/components/events/EventIndicator.js +0 -274
- package/lib-build/EventsView/views/components/events/EventPath.js +0 -94
- package/lib-build/EventsView/views/components/events/EventsStyle.scss +0 -725
- package/lib-build/EventsView/views/components/events/MoreInfo.js +0 -72
- package/lib-build/EventsView/views/components/events/Sidebar.js +0 -62
- package/lib-build/EventsView/views/components/events/event_info/EarlyWarnings.js +0 -151
- package/lib-build/EventsView/views/components/events/event_info/EventDetails.js +0 -100
- package/lib-build/EventsView/views/components/events/event_info/EventInfo.js +0 -138
- package/lib-build/EventsView/views/components/events/event_info/EventInfoStyle.scss +0 -508
- package/lib-build/EventsView/views/components/events/event_info/EventTimeRange.js +0 -152
- package/lib-build/EventsView/views/components/events/event_info/HistoricalInformation.js +0 -44
- package/lib-build/EventsView/views/components/events/event_info/MiniEventTree.js +0 -116
- package/lib-build/EventsView/views/components/events/event_info/MobileEventPath.js +0 -39
- package/lib-build/EventsView/views/components/events/event_info/PollutionDischarge.js +0 -64
- package/lib-build/EventsView/views/components/events/event_info/charts/EventDetailsLineChart.js +0 -75
- package/lib-build/EventsView/views/components/events/event_info/charts/EventDetailsPieChart.js +0 -121
- package/lib-build/EventsView/views/components/events/event_info/damage_type/DamageType.js +0 -109
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/agriculture.svg +0 -29
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/bacteria-process.svg +0 -90
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/effluent.svg +0 -55
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/energy.svg +0 -42
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/equipment.svg +0 -82
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/extra-biological-sludge.svg +0 -40
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/overflow.svg +0 -26
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/pipes-bluckages.svg +0 -29
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/pipes-infrastructure.svg +0 -31
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/reuse.svg +0 -29
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/sea-rivers.svg +0 -54
- package/lib-build/EventsView/views/components/events/event_info/damage_type/svgs/sludge.svg +0 -37
- package/lib-build/EventsView/views/components/events/event_info/samplings/Sampling.js +0 -28
- package/lib-build/EventsView/views/components/events/event_info/samplings/Samplings.js +0 -36
- package/lib-build/EventsView/views/components/events/event_info/sources/Source.js +0 -118
- package/lib-build/EventsView/views/components/events/event_info/sources/Sources.js +0 -46
- package/lib-build/EventsView/views/components/events/events_list/EventItem.js +0 -139
- package/lib-build/EventsView/views/components/events/events_list/EventsList.js +0 -298
- package/lib-build/EventsView/views/components/events/events_list/Filter/Filter.js +0 -137
- package/lib-build/EventsView/views/components/events/events_list/Filter/FilterContainer.js +0 -382
- package/lib-build/EventsView/views/components/events/events_list/Filter/FilterItem.js +0 -218
- package/lib-build/EventsView/views/components/events/events_list/Filter/FiltersDropDown.js +0 -68
- package/lib-build/EventsView/views/components/events/events_list/Filter/OptionsDropDown.js +0 -139
- package/lib-build/EventsView/views/components/events/events_list/Sort.js +0 -92
- package/lib-build/EventsView/views/components/map/FloatingGraph.js +0 -83
- package/lib-build/EventsView/views/components/map/Map.js +0 -162
- package/lib-build/EventsView/views/components/map/mapStyle.scss +0 -387
- package/lib-build/EventsView/views/components/points/PointMarker.js +0 -453
- package/lib-build/EventsView/views/components/points/PointMarkers.js +0 -30
- package/lib-build/EventsView/views/eventsView.js +0 -47
- package/lib-build/ProjectManagement/api/index.js +0 -19
- package/lib-build/ProjectManagement/components/kpi-list-item.js +0 -88
- package/lib-build/ProjectManagement/components/kpi-percentage-item.js +0 -98
- package/lib-build/ProjectManagement/components/kpi.js +0 -71
- package/lib-build/ProjectManagement/components/legend-icon.js +0 -61
- package/lib-build/ProjectManagement/components/link-to-item.js +0 -67
- package/lib-build/ProjectManagement/components/list-of-points.js +0 -111
- package/lib-build/ProjectManagement/components/map-view.js +0 -128
- package/lib-build/ProjectManagement/components/metrics.js +0 -94
- package/lib-build/ProjectManagement/components/node-label.js +0 -66
- package/lib-build/ProjectManagement/components/period-selector-button.js +0 -68
- package/lib-build/ProjectManagement/components/period-selector.js +0 -79
- package/lib-build/ProjectManagement/components/point-preview.js +0 -298
- package/lib-build/ProjectManagement/components/project-management.js +0 -262
- package/lib-build/ProjectManagement/components/tree-legend.js +0 -100
- package/lib-build/ProjectManagement/components/tree-view.js +0 -281
- package/lib-build/ProjectManagement/stores/project-management-store.js +0 -32
- package/lib-build/ProjectManagement/util/constants.js +0 -10
- package/lib-build/ProjectManagement/util/treeUtil.js +0 -45
- package/lib-build/ProjectManagement/util/url.js +0 -24
- package/lib-build/Router.js +0 -64
- 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 +0 -7
- package/lib-build/assets/kando_logo.png +0 -0
- package/lib-build/assets/line-chart.svg +0 -56
- 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 +0 -31
- package/lib-build/assets/no_results.svg +0 -327
- package/lib-build/assets/point_icons/WWTP-icon.svg +0 -26
- package/lib-build/assets/point_icons/blue-circle.svg +0 -3
- package/lib-build/assets/point_icons/bright-blue-circle.svg +0 -3
- package/lib-build/assets/point_icons/factory-icon.svg +0 -23
- package/lib-build/assets/point_icons/green-circle.png +0 -0
- package/lib-build/assets/point_icons/green-circle.svg +0 -3
- package/lib-build/assets/point_icons/observation-icon.svg +0 -12
- package/lib-build/assets/point_icons/pink-circle.svg +0 -3
- package/lib-build/assets/point_icons/pump-station-icon.svg +0 -15
- package/lib-build/assets/point_icons/red-pin-red-shadow.png +0 -0
- package/lib-build/assets/point_icons/sampling-icon.svg +0 -9
- 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 +0 -3
- package/lib-build/assets/sewer.svg +0 -3
- package/lib-build/assets/user.svg +0 -44
- package/lib-build/assets/white-point.png +0 -0
- package/lib-build/index.js +0 -34
- package/lib-build/shared/TimeRangeSelector/TimeRangeSelector.js +0 -111
- package/lib-build/shared/TimeRangeSelector/constants.js +0 -8
- package/lib-build/shared/TimeRangeSelector/index.js +0 -13
- package/lib-build/shared/TimeRangeSelector/styles.scss +0 -65
- package/lib-build/shared/components/Breadcrumbs/Breadcrumbs.js +0 -42
- package/lib-build/shared/components/Breadcrumbs/index.js +0 -13
- package/lib-build/shared/components/Breadcrumbs/styles.scss +0 -8
- package/lib-build/shared/components/ContentLoader/ContentLoader.js +0 -71
- package/lib-build/shared/components/ContentLoader/index.js +0 -13
- package/lib-build/shared/components/DamageType/DamageType.js +0 -263
- package/lib-build/shared/components/DamageType/index.js +0 -13
- package/lib-build/shared/components/DamageType/styles.scss +0 -50
- package/lib-build/shared/components/DischargeHeatmap/DischargeHeatmap.js +0 -218
- package/lib-build/shared/components/DischargeHeatmap/index.js +0 -13
- package/lib-build/shared/components/DischargeHeatmap/styles.scss +0 -17
- package/lib-build/shared/components/ErrorBoundary.js +0 -72
- package/lib-build/shared/components/Events/Events.js +0 -240
- package/lib-build/shared/components/Events/index.js +0 -13
- package/lib-build/shared/components/Events/styles.scss +0 -131
- package/lib-build/shared/components/Graph/Graph.js +0 -213
- package/lib-build/shared/components/Graph/index.js +0 -13
- package/lib-build/shared/components/KandoModal/KandoModal.js +0 -118
- package/lib-build/shared/components/KandoModal/index.js +0 -13
- package/lib-build/shared/components/KandoModal/styles.scss +0 -19
- package/lib-build/shared/components/KandoNavbar/KandoNavbar.js +0 -290
- package/lib-build/shared/components/KandoNavbar/NavbarStyle.scss +0 -238
- package/lib-build/shared/components/KandoNavbar/index.js +0 -13
- package/lib-build/shared/components/LiveEvents/CarouselSlide.js +0 -62
- package/lib-build/shared/components/LiveEvents/LiveEvents.js +0 -58
- package/lib-build/shared/components/LiveEvents/index.js +0 -13
- package/lib-build/shared/components/LiveEvents/styles.scss +0 -80
- package/lib-build/shared/components/Map/Map.js +0 -90
- package/lib-build/shared/components/Map/index.js +0 -13
- package/lib-build/shared/components/Map/styles.scss +0 -7
- package/lib-build/shared/components/NarrowHeader.js +0 -57
- package/lib-build/shared/components/PointInfo/PointInfo.js +0 -83
- package/lib-build/shared/components/PointInfo/index.js +0 -13
- package/lib-build/shared/components/PointInfo/styles.scss +0 -48
- package/lib-build/shared/components/Search/Search.js +0 -159
- package/lib-build/shared/components/Search/index.js +0 -13
- package/lib-build/shared/components/Search/styles.scss +0 -27
- package/lib-build/shared/components/Sector/Sector.js +0 -176
- package/lib-build/shared/components/Sector/index.js +0 -13
- package/lib-build/shared/components/Sector/styles.scss +0 -14
- package/lib-build/shared/components/Sector/svgs/Brewing.svg +0 -93
- package/lib-build/shared/components/Sector/svgs/Cowshed.svg +0 -23
- package/lib-build/shared/components/Sector/svgs/Garage.svg +0 -24
- package/lib-build/shared/components/Sector/svgs/Missing.svg +0 -36
- package/lib-build/shared/components/Sector/svgs/barrel.svg +0 -93
- package/lib-build/shared/components/Sector/svgs/beer.svg +0 -13
- package/lib-build/shared/components/Sector/svgs/beverage.svg +0 -13
- package/lib-build/shared/components/Sector/svgs/car-repair.svg +0 -24
- package/lib-build/shared/components/Sector/svgs/car-wash.svg +0 -36
- package/lib-build/shared/components/Sector/svgs/chemistry.svg +0 -30
- package/lib-build/shared/components/Sector/svgs/conductor-manufacturer.svg +0 -17
- package/lib-build/shared/components/Sector/svgs/cosmetic-manufacturer.svg +0 -23
- package/lib-build/shared/components/Sector/svgs/cow.svg +0 -23
- package/lib-build/shared/components/Sector/svgs/cpu.svg +0 -17
- package/lib-build/shared/components/Sector/svgs/dairy.svg +0 -18
- package/lib-build/shared/components/Sector/svgs/dippel-oil.svg +0 -17
- package/lib-build/shared/components/Sector/svgs/food-donation.svg +0 -29
- package/lib-build/shared/components/Sector/svgs/food-factory.svg +0 -17
- package/lib-build/shared/components/Sector/svgs/garbage-truck-1.svg +0 -34
- package/lib-build/shared/components/Sector/svgs/gas-station.svg +0 -26
- package/lib-build/shared/components/Sector/svgs/glass-manufacturer.svg +0 -21
- package/lib-build/shared/components/Sector/svgs/glass.svg +0 -21
- package/lib-build/shared/components/Sector/svgs/hand-washing.svg +0 -17
- package/lib-build/shared/components/Sector/svgs/hospital.svg +0 -28
- package/lib-build/shared/components/Sector/svgs/hotel.svg +0 -24
- package/lib-build/shared/components/Sector/svgs/laundromat.svg +0 -26
- package/lib-build/shared/components/Sector/svgs/leather-factory.svg +0 -23
- package/lib-build/shared/components/Sector/svgs/leather.svg +0 -23
- package/lib-build/shared/components/Sector/svgs/lipstick.svg +0 -23
- package/lib-build/shared/components/Sector/svgs/meat.svg +0 -24
- package/lib-build/shared/components/Sector/svgs/metal-coating-plant.svg +0 -21
- package/lib-build/shared/components/Sector/svgs/metal-facbrication.svg +0 -20
- package/lib-build/shared/components/Sector/svgs/milk.svg +0 -18
- package/lib-build/shared/components/Sector/svgs/oil-rig.svg +0 -17
- package/lib-build/shared/components/Sector/svgs/petrochemical.svg +0 -13
- package/lib-build/shared/components/Sector/svgs/pie.svg +0 -17
- package/lib-build/shared/components/Sector/svgs/pills.svg +0 -22
- package/lib-build/shared/components/Sector/svgs/plant-unkown-3.svg +0 -36
- package/lib-build/shared/components/Sector/svgs/plastic-rubber.svg +0 -43
- package/lib-build/shared/components/Sector/svgs/printer.svg +0 -17
- package/lib-build/shared/components/Sector/svgs/recycling.svg +0 -17
- package/lib-build/shared/components/Sector/svgs/refinery.svg +0 -18
- package/lib-build/shared/components/Sector/svgs/repair.svg +0 -13
- package/lib-build/shared/components/Sector/svgs/sewing-machine.svg +0 -22
- package/lib-build/shared/components/Sector/svgs/shop.svg +0 -24
- package/lib-build/shared/components/Sector/svgs/soda.svg +0 -13
- package/lib-build/shared/components/Sector/svgs/spray-gun.svg +0 -21
- package/lib-build/shared/components/Sector/svgs/washing-machine.svg +0 -26
- package/lib-build/shared/components/Sector/svgs/waste.svg +0 -43
- package/lib-build/shared/components/Sector/svgs/welder-a.svg +0 -20
- package/lib-build/shared/components/Sector/svgs/wine-glass.svg +0 -15
- package/lib-build/shared/components/Toggle/Toggle.js +0 -62
- package/lib-build/shared/components/Toggle/index.js +0 -13
- package/lib-build/shared/components/Toggle/styles.scss +0 -44
- package/lib-build/shared/components/TrendGraph/TrendGraph.js +0 -217
- package/lib-build/shared/components/TrendGraph/index.js +0 -13
- package/lib-build/shared/components/TrendGraph/styles.scss +0 -2
- package/lib-build/shared/components/TrendGraphNVL/TrendGraphNVL.js +0 -167
- package/lib-build/shared/components/TrendGraphNVL/index.js +0 -13
- package/lib-build/shared/components/TrendGraphNVL/styles.scss +0 -16
- package/lib-build/shared/helpers/kql.js +0 -51
- package/lib-build/shared/helpers/time.js +0 -21
- package/lib-build/shared/models/IAction.js +0 -1
- package/lib-build/shared/models/IAppState.js +0 -5
- package/lib-build/shared/redux/WBE/actionTypes.js +0 -8
- package/lib-build/shared/redux/WBE/actions.js +0 -15
- package/lib-build/shared/redux/WBE/models/IAreaWBE.js +0 -5
- package/lib-build/shared/redux/WBE/models/IWBE.js +0 -5
- package/lib-build/shared/redux/WBE/models/IWBEState.js +0 -5
- package/lib-build/shared/redux/WBE/reducer.js +0 -40
- package/lib-build/shared/redux/areas/actionTypes.js +0 -12
- package/lib-build/shared/redux/areas/actions.js +0 -40
- package/lib-build/shared/redux/areas/models/IArea.js +0 -5
- package/lib-build/shared/redux/areas/models/IAreasState.js +0 -5
- package/lib-build/shared/redux/areas/reducer.js +0 -56
- package/lib-build/shared/redux/context/actionTypes.js +0 -8
- package/lib-build/shared/redux/context/actions.js +0 -15
- package/lib-build/shared/redux/context/models/INavContext.js +0 -5
- package/lib-build/shared/redux/context/models/INavContextState.js +0 -5
- package/lib-build/shared/redux/context/reducer.js +0 -40
- package/lib-build/shared/redux/edges/actionTypes.js +0 -14
- package/lib-build/shared/redux/edges/actions.js +0 -48
- package/lib-build/shared/redux/edges/models/IEdge.js +0 -5
- package/lib-build/shared/redux/edges/models/IEdgesState.js +0 -5
- package/lib-build/shared/redux/edges/reducer.js +0 -79
- package/lib-build/shared/redux/events/actionTypes.js +0 -28
- package/lib-build/shared/redux/events/actions.js +0 -112
- package/lib-build/shared/redux/events/models/IEvent.js +0 -5
- package/lib-build/shared/redux/events/models/IEventsState.js +0 -5
- package/lib-build/shared/redux/events/models/ISource.js +0 -5
- package/lib-build/shared/redux/events/reducer.js +0 -196
- package/lib-build/shared/redux/filters/IFilter.js +0 -5
- package/lib-build/shared/redux/filters/IFilterItem.js +0 -5
- package/lib-build/shared/redux/global/actionTypes.js +0 -24
- package/lib-build/shared/redux/global/actions.js +0 -91
- package/lib-build/shared/redux/global/models/IGlobalState.js +0 -5
- package/lib-build/shared/redux/global/reducer.js +0 -92
- package/lib-build/shared/redux/points/actionTypes.js +0 -10
- package/lib-build/shared/redux/points/actions.js +0 -32
- package/lib-build/shared/redux/points/models/IGroup.js +0 -5
- package/lib-build/shared/redux/points/models/IPoint.js +0 -5
- package/lib-build/shared/redux/points/models/IPointsState.js +0 -5
- package/lib-build/shared/redux/points/reducer.js +0 -37
- package/lib-build/shared/redux/rootActionTypes.js +0 -8
- package/lib-build/shared/redux/rootActions.js +0 -14
- package/lib-build/shared/redux/rootReducer.js +0 -55
- package/lib-build/shared/redux/rootStore.js +0 -40
- package/lib-build/shared/utilities/ActionUtility.js +0 -17
- package/lib-build/shared/utilities/ErrorBoundary.js +0 -76
- package/lib-build/shared/utilities/KandoDate.js +0 -29
- package/lib-build/shared/utilities/KandoModal.js +0 -65
- package/lib-build/shared/utilities/LocalStorage.js +0 -48
- package/lib-build/shared/utilities/TimeFormat.js +0 -70
- package/lib-build/shared/utilities/Truncate.js +0 -81
- package/lib-build/shared/utilities/custom_hooks/useClickOutside.js +0 -26
- package/lib-build/shared/utilities/custom_hooks/useKandoFetch.js +0 -82
- package/lib-build/shared/utilities/custom_hooks/useQueryURL.js +0 -15
- package/lib-build/shared/utilities/custom_hooks/useRemoveExistingLayers.js +0 -34
- package/lib-build/shared/utilities/custom_hooks/useUpdateEventBodyTail.js +0 -62
- package/lib-build/shared/utilities/i18n.js +0 -33
|
@@ -1,81 +0,0 @@
|
|
|
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.AreaPolygonsWBE = void 0;
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
|
-
var _AreaPolygonWBE = _interopRequireDefault(require("./AreaPolygonWBE"));
|
|
15
|
-
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
var AreaPolygonsWBE = function AreaPolygonsWBE(props) {
|
|
21
|
-
var L = props.L,
|
|
22
|
-
areas = props.areas,
|
|
23
|
-
map = props.map,
|
|
24
|
-
mapZoom = props.mapZoom,
|
|
25
|
-
focusedArea = props.focusedArea;
|
|
26
|
-
var group = [];
|
|
27
|
-
|
|
28
|
-
var drawAreas = function drawAreas() {
|
|
29
|
-
if (focusedArea === null) {
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement("div", null, areas.length !== 0 && areas.map(function (area) {
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(_AreaPolygonWBE.default, {
|
|
32
|
-
area: area,
|
|
33
|
-
map: map,
|
|
34
|
-
L: L,
|
|
35
|
-
key: area.id,
|
|
36
|
-
mapZoom: mapZoom
|
|
37
|
-
});
|
|
38
|
-
}));
|
|
39
|
-
} else {
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement("div", null, focusedArea.sub_areas !== undefined && focusedArea.sub_areas.length !== 0 && focusedArea.sub_areas.map(function (area) {
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement(_AreaPolygonWBE.default, {
|
|
42
|
-
area: area,
|
|
43
|
-
map: map,
|
|
44
|
-
L: L,
|
|
45
|
-
key: area.id,
|
|
46
|
-
mapZoom: mapZoom
|
|
47
|
-
});
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
var zoomAreas = function zoomAreas() {
|
|
53
|
-
for (var property in map._layers) {
|
|
54
|
-
if (map._layers[property].kando_object === "Area") {
|
|
55
|
-
group.push(map._layers[property]);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (group.length !== 0) {
|
|
60
|
-
map.fitBounds(L.featureGroup(group).getBounds(), {
|
|
61
|
-
padding: [100, 100]
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
var removeAreas = function removeAreas() {
|
|
67
|
-
for (var property in map._layers) {
|
|
68
|
-
if (map._layers[property].kando_object === "Area" || map._layers[property].kando_object === "Point") {
|
|
69
|
-
map.removeLayer(map._layers[property]);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
(0, _react.useEffect)(function () {
|
|
75
|
-
zoomAreas();
|
|
76
|
-
map.invalidateSize(true);
|
|
77
|
-
}, [areas, focusedArea]);
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, removeAreas(), drawAreas());
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
exports.AreaPolygonsWBE = AreaPolygonsWBE;
|
|
@@ -1,123 +0,0 @@
|
|
|
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.AreasList = void 0;
|
|
11
|
-
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
|
-
var _Area = require("./Area");
|
|
17
|
-
|
|
18
|
-
require("./AreasStyle.scss");
|
|
19
|
-
|
|
20
|
-
var _actions = require("../../../../shared/redux/WBE/actions");
|
|
21
|
-
|
|
22
|
-
var _reactFontawesome = require("@fortawesome/react-fontawesome");
|
|
23
|
-
|
|
24
|
-
var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons");
|
|
25
|
-
|
|
26
|
-
var _reactRedux = require("react-redux");
|
|
27
|
-
|
|
28
|
-
var _Sort = _interopRequireDefault(require("./Sort"));
|
|
29
|
-
|
|
30
|
-
var _i18n = _interopRequireDefault(require("../../../../shared/utilities/i18n"));
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
var AreasList = function AreasList(props) {
|
|
37
|
-
var areas = props.areas,
|
|
38
|
-
isSubAreasDisplayed = props.isSubAreasDisplayed,
|
|
39
|
-
focusedArea = props.focusedArea,
|
|
40
|
-
zoomedArea = props.zoomedArea;
|
|
41
|
-
|
|
42
|
-
var _useState = (0, _react.useState)(areas),
|
|
43
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
44
|
-
modifiedAreas = _useState2[0],
|
|
45
|
-
setModifiedAreas = _useState2[1];
|
|
46
|
-
|
|
47
|
-
var _useState3 = (0, _react.useState)(true),
|
|
48
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
49
|
-
collapsed = _useState4[0],
|
|
50
|
-
setCollapsed = _useState4[1];
|
|
51
|
-
|
|
52
|
-
var dispatch = (0, _reactRedux.useDispatch)();
|
|
53
|
-
|
|
54
|
-
var triggerSort = function triggerSort(sort) {
|
|
55
|
-
var sorted;
|
|
56
|
-
|
|
57
|
-
if (sort == 1) {
|
|
58
|
-
sorted = areas.slice().sort(function (a, b) {
|
|
59
|
-
return a.NVL - b.NVL;
|
|
60
|
-
});
|
|
61
|
-
setModifiedAreas(undefined);
|
|
62
|
-
setTimeout(function () {
|
|
63
|
-
setModifiedAreas(sorted);
|
|
64
|
-
}, 50);
|
|
65
|
-
} else if (sort == 2) {
|
|
66
|
-
sorted = areas.slice().sort(function (a, b) {
|
|
67
|
-
return a.NVL_diff_ratio - b.NVL_diff_ratio;
|
|
68
|
-
});
|
|
69
|
-
setModifiedAreas(undefined);
|
|
70
|
-
setTimeout(function () {
|
|
71
|
-
setModifiedAreas(sorted);
|
|
72
|
-
}, 50);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
(0, _react.useEffect)(function () {
|
|
77
|
-
setModifiedAreas(areas);
|
|
78
|
-
}, [areas, focusedArea]);
|
|
79
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
-
className: "areas-container"
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
82
|
-
className: "areas-list-header"
|
|
83
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
-
className: "main"
|
|
85
|
-
}, isSubAreasDisplayed ? /*#__PURE__*/_react.default.createElement("h3", null, focusedArea.name) : /*#__PURE__*/_react.default.createElement("h3", null, _i18n.default.t("covid_view.main_areas")), isSubAreasDisplayed ? /*#__PURE__*/_react.default.createElement("a", {
|
|
86
|
-
className: "back-button",
|
|
87
|
-
onClick: function onClick() {
|
|
88
|
-
dispatch((0, _actions.updateWBE)({
|
|
89
|
-
focusedArea: null,
|
|
90
|
-
zoomedArea: null
|
|
91
|
-
}));
|
|
92
|
-
}
|
|
93
|
-
}, /*#__PURE__*/_react.default.createElement(_reactFontawesome.FontAwesomeIcon, {
|
|
94
|
-
icon: _freeSolidSvgIcons.faArrowLeft
|
|
95
|
-
}), /*#__PURE__*/_react.default.createElement("span", null, " Back to main areas")) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("span", null, areas !== undefined && areas.length !== 0 && /*#__PURE__*/_react.default.createElement(_Sort.default, {
|
|
96
|
-
triggerSort: triggerSort,
|
|
97
|
-
areas: areas,
|
|
98
|
-
focusedArea: focusedArea
|
|
99
|
-
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
100
|
-
className: "secondary"
|
|
101
|
-
}, collapsed ? /*#__PURE__*/_react.default.createElement(_reactFontawesome.FontAwesomeIcon, {
|
|
102
|
-
icon: _freeSolidSvgIcons.faExpandAlt,
|
|
103
|
-
onClick: function onClick() {
|
|
104
|
-
setCollapsed(false);
|
|
105
|
-
}
|
|
106
|
-
}) : /*#__PURE__*/_react.default.createElement(_reactFontawesome.FontAwesomeIcon, {
|
|
107
|
-
icon: _freeSolidSvgIcons.faCompressAlt,
|
|
108
|
-
onClick: function onClick() {
|
|
109
|
-
setCollapsed(true);
|
|
110
|
-
}
|
|
111
|
-
}))), /*#__PURE__*/_react.default.createElement("ul", {
|
|
112
|
-
className: "areas ".concat(collapsed ? "areas--collapsed" : "")
|
|
113
|
-
}, modifiedAreas !== undefined && modifiedAreas.length !== 0 && modifiedAreas.map(function (area) {
|
|
114
|
-
return /*#__PURE__*/_react.default.createElement(_Area.Area, {
|
|
115
|
-
area: area,
|
|
116
|
-
key: area.id,
|
|
117
|
-
isSubAreasDisplayed: isSubAreasDisplayed,
|
|
118
|
-
zoomedArea: zoomedArea
|
|
119
|
-
});
|
|
120
|
-
})));
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
exports.AreasList = AreasList;
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
@media only screen and (max-width: 450px) {
|
|
2
|
-
.sidebar {
|
|
3
|
-
width: 100vw !important;
|
|
4
|
-
|
|
5
|
-
.areas-list-header {
|
|
6
|
-
width: 100vw !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.area {
|
|
10
|
-
&__header {
|
|
11
|
-
padding: 0 1em !important;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&--collapsed {
|
|
16
|
-
.ltrs & {
|
|
17
|
-
left: -100vw !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.rtls & {
|
|
21
|
-
right: -100vw !important;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.sidebar {
|
|
28
|
-
padding-bottom: 4em;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.areas-container {
|
|
32
|
-
text-align: center;
|
|
33
|
-
overflow: scroll;
|
|
34
|
-
height: 100%;
|
|
35
|
-
|
|
36
|
-
.areas-list-header {
|
|
37
|
-
height: 6.5em;
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: row;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
position: fixed;
|
|
43
|
-
z-index: 9;
|
|
44
|
-
background: white;
|
|
45
|
-
width: 450px;
|
|
46
|
-
padding: 0 1.5em;
|
|
47
|
-
box-shadow: 0px 2px 5px rgba(0,0,0,.2);
|
|
48
|
-
|
|
49
|
-
.main {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
align-items: baseline;
|
|
53
|
-
|
|
54
|
-
.sort {
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
|
|
58
|
-
.form-group {
|
|
59
|
-
margin: 0;
|
|
60
|
-
|
|
61
|
-
select {
|
|
62
|
-
border: none;
|
|
63
|
-
font-weight: 800;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
svg {
|
|
70
|
-
font-size: 1.5em;
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.back-button {
|
|
75
|
-
text-decoration: none;
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
ul {
|
|
81
|
-
list-style: none;
|
|
82
|
-
margin: 0;
|
|
83
|
-
padding: 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.areas {
|
|
87
|
-
flex-direction: column;
|
|
88
|
-
display: flex;
|
|
89
|
-
height: 80%;
|
|
90
|
-
padding: 6em 1.5em 1.5em 1.5em;
|
|
91
|
-
|
|
92
|
-
&--collapsed {
|
|
93
|
-
.area {
|
|
94
|
-
height: 1.6em !important;
|
|
95
|
-
transition: .1s ease-in-out;
|
|
96
|
-
|
|
97
|
-
&--expanded {
|
|
98
|
-
height: 1.6em !important;
|
|
99
|
-
transition: .1s ease-in-out;
|
|
100
|
-
|
|
101
|
-
.area__details {
|
|
102
|
-
display: none;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.area__actions {
|
|
106
|
-
display: none;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.area__details {
|
|
111
|
-
display: none;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.area__actions {
|
|
115
|
-
display: none;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.area {
|
|
121
|
-
position: relative;
|
|
122
|
-
width: 100%;
|
|
123
|
-
height: max-content;
|
|
124
|
-
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
|
|
125
|
-
border-radius: 0;
|
|
126
|
-
text-align: center;
|
|
127
|
-
margin: .8em 0;
|
|
128
|
-
background: white;
|
|
129
|
-
cursor: pointer;
|
|
130
|
-
transition: .1s ease-in-out;
|
|
131
|
-
user-select: none;
|
|
132
|
-
|
|
133
|
-
&:hover {
|
|
134
|
-
box-shadow: 0 8px 16px 0 rgba(0,0,0,.15);
|
|
135
|
-
transition: 0.2s ease;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&:active {
|
|
139
|
-
background: #f2f2f2;
|
|
140
|
-
box-shadow: 0 0 0 rgba(0,0,0,.15);
|
|
141
|
-
transition: 0.1s ease;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&--expanded {
|
|
145
|
-
height: max-content !important;
|
|
146
|
-
transition: .1s ease-in-out;
|
|
147
|
-
|
|
148
|
-
.area__details {
|
|
149
|
-
display: flex;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.area__actions {
|
|
153
|
-
display: flex;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&--no_sampling {
|
|
158
|
-
.area__header {
|
|
159
|
-
background: grey !important;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
&__header {
|
|
164
|
-
font-size: 1.2em;
|
|
165
|
-
display: flex;
|
|
166
|
-
justify-content: space-between;
|
|
167
|
-
padding: 0 3em;
|
|
168
|
-
|
|
169
|
-
&--MAJOR {
|
|
170
|
-
background: lighten(#F21B3F, 10%);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
&--MEDIUM {
|
|
174
|
-
background: #ff7a14;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&--LOW {
|
|
178
|
-
background: #ffb114;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&--CLEAN {
|
|
182
|
-
background: #1db232;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
&__details {
|
|
187
|
-
display: flex;
|
|
188
|
-
flex-direction: column;
|
|
189
|
-
text-align: left;
|
|
190
|
-
padding: 1em 3em;
|
|
191
|
-
opacity: 1;
|
|
192
|
-
transition: .1s ease-in-out;
|
|
193
|
-
|
|
194
|
-
.area__detail {
|
|
195
|
-
padding: .5em 0;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
&__actions {
|
|
200
|
-
display: flex;
|
|
201
|
-
justify-content: space-evenly;
|
|
202
|
-
padding: 0em 3em 1em 3em;
|
|
203
|
-
opacity: 1;
|
|
204
|
-
transition: .1s ease-in-out;
|
|
205
|
-
|
|
206
|
-
a {
|
|
207
|
-
padding: 5px;
|
|
208
|
-
|
|
209
|
-
&:hover {
|
|
210
|
-
background: rgba(0,0,0,.05)
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.divider {
|
|
215
|
-
width: 1px;
|
|
216
|
-
background: rgba(0,0,0,.5);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.truncated-text {
|
|
224
|
-
padding: 2px;
|
|
225
|
-
border-radius: 3px;
|
|
226
|
-
text-align: center;
|
|
227
|
-
text-overflow: ellipsis;
|
|
228
|
-
width: 8em;
|
|
229
|
-
margin: 0;
|
|
230
|
-
font-size: 1em;
|
|
231
|
-
overflow: hidden !important;
|
|
232
|
-
|
|
233
|
-
b {
|
|
234
|
-
white-space: nowrap;
|
|
235
|
-
text-overflow: ellipsis;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
|
-
var _i18n = _interopRequireDefault(require("../../../../shared/utilities/i18n"));
|
|
17
|
-
|
|
18
|
-
require("./AreasStyle.scss");
|
|
19
|
-
|
|
20
|
-
var _reactBootstrap = require("react-bootstrap");
|
|
21
|
-
|
|
22
|
-
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); }
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
var Sort = function Sort(props) {
|
|
27
|
-
var triggerSort = props.triggerSort,
|
|
28
|
-
focusedArea = props.focusedArea;
|
|
29
|
-
|
|
30
|
-
var _useState = (0, _react.useState)(1),
|
|
31
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
32
|
-
sort = _useState2[0],
|
|
33
|
-
setSort = _useState2[1];
|
|
34
|
-
|
|
35
|
-
var handleSelection = function handleSelection(event) {
|
|
36
|
-
setSort(parseInt(event.target.value));
|
|
37
|
-
triggerSort(parseInt(event.target.value));
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
(0, _react.useEffect)(function () {
|
|
41
|
-
triggerSort(sort);
|
|
42
|
-
}, [sort, focusedArea]);
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
-
className: "sort"
|
|
45
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, _i18n.default.t("events_overview.sort.arrange_by"), ": "), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Form, null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Form.Group, null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Form.Control, {
|
|
46
|
-
as: "select",
|
|
47
|
-
size: "sm",
|
|
48
|
-
custom: true,
|
|
49
|
-
onChange: handleSelection,
|
|
50
|
-
value: sort
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement("option", {
|
|
52
|
-
value: 1
|
|
53
|
-
}, _i18n.default.t("covid_view.sort.by_NVL")), /*#__PURE__*/_react.default.createElement("option", {
|
|
54
|
-
value: 2
|
|
55
|
-
}, _i18n.default.t("covid_view.sort.by_NVL_change"))))));
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
var _default = Sort;
|
|
59
|
-
exports.default = _default;
|
|
@@ -1,148 +0,0 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
|
-
var _reactDataTableComponent = _interopRequireDefault(require("react-data-table-component"));
|
|
17
|
-
|
|
18
|
-
var _i18n = _interopRequireDefault(require("../../../../../shared/utilities/i18n"));
|
|
19
|
-
|
|
20
|
-
var _TrendGraphNVL = _interopRequireDefault(require("../../../../../shared/components/TrendGraphNVL"));
|
|
21
|
-
|
|
22
|
-
var _KandoDate = require("../../../../../shared/utilities/KandoDate");
|
|
23
|
-
|
|
24
|
-
var _useKandoFetch2 = _interopRequireDefault(require("../../../../../shared/utilities/custom_hooks/useKandoFetch"));
|
|
25
|
-
|
|
26
|
-
var _no_results = _interopRequireDefault(require("../../../../../assets/no_results.svg"));
|
|
27
|
-
|
|
28
|
-
require("./styles.scss");
|
|
29
|
-
|
|
30
|
-
var _reactRedux = require("react-redux");
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
37
|
-
|
|
38
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
|
-
|
|
40
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
41
|
-
|
|
42
|
-
var TABLE_ROWS_PER_PAGE = 5;
|
|
43
|
-
|
|
44
|
-
var TrendPopupContent = function TrendPopupContent(_ref) {
|
|
45
|
-
var areaID = _ref.areaID,
|
|
46
|
-
period = _ref.period;
|
|
47
|
-
|
|
48
|
-
var _useKandoFetch = (0, _useKandoFetch2.default)("/data/trend-graph-nvl-component-data/".concat(areaID, "?period=").concat(period)),
|
|
49
|
-
data = _useKandoFetch.data,
|
|
50
|
-
isFetching = _useKandoFetch.isFetching;
|
|
51
|
-
|
|
52
|
-
var _useState = (0, _react.useState)([{}]),
|
|
53
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
54
|
-
rows = _useState2[0],
|
|
55
|
-
setRows = _useState2[1];
|
|
56
|
-
|
|
57
|
-
var navContext = (0, _reactRedux.useSelector)(function (state) {
|
|
58
|
-
return state.nav_context_data.navContext;
|
|
59
|
-
});
|
|
60
|
-
var dir = navContext.locale === 'he' ? 'rtl' : 'ltr';
|
|
61
|
-
|
|
62
|
-
var parseRows = function parseRows(values) {
|
|
63
|
-
var rows = [];
|
|
64
|
-
|
|
65
|
-
var _iterator = _createForOfIteratorHelper(values),
|
|
66
|
-
_step;
|
|
67
|
-
|
|
68
|
-
try {
|
|
69
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
70
|
-
var val = _step.value;
|
|
71
|
-
rows.push({
|
|
72
|
-
sample_id: val['sample_id'],
|
|
73
|
-
date: new _KandoDate.KandoDate(val['date']).toDateStr(),
|
|
74
|
-
mrna_copies: val['mrna_copies'],
|
|
75
|
-
status: val['status']
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
} catch (err) {
|
|
79
|
-
_iterator.e(err);
|
|
80
|
-
} finally {
|
|
81
|
-
_iterator.f();
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return rows;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
(0, _react.useEffect)(function () {
|
|
88
|
-
if (!isFetching && (data === null || data === void 0 ? void 0 : data.values.length) > 0) {
|
|
89
|
-
var dataRows = parseRows(data.values);
|
|
90
|
-
setRows(dataRows);
|
|
91
|
-
}
|
|
92
|
-
}, [isFetching]);
|
|
93
|
-
|
|
94
|
-
var columns = _react.default.useMemo(function () {
|
|
95
|
-
return [{
|
|
96
|
-
name: _i18n.default.t('components.area.date'),
|
|
97
|
-
selector: 'date',
|
|
98
|
-
sortable: true
|
|
99
|
-
}, {
|
|
100
|
-
name: _i18n.default.t('components.area.sample_id'),
|
|
101
|
-
selector: 'sample_id',
|
|
102
|
-
sortable: true
|
|
103
|
-
}, {
|
|
104
|
-
name: _i18n.default.t('components.area.mrna_copies'),
|
|
105
|
-
selector: 'mrna_copies',
|
|
106
|
-
sortable: true
|
|
107
|
-
}, {
|
|
108
|
-
name: _i18n.default.t('status'),
|
|
109
|
-
selector: 'status',
|
|
110
|
-
sortable: true
|
|
111
|
-
}];
|
|
112
|
-
}, []);
|
|
113
|
-
|
|
114
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
115
|
-
className: "trend-content"
|
|
116
|
-
}, /*#__PURE__*/_react.default.createElement(_TrendGraphNVL.default, {
|
|
117
|
-
areaID: areaID
|
|
118
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
-
className: "table-title"
|
|
120
|
-
}, _i18n.default.t('components.nvl_trend.sampling_results')), (rows === null || rows === void 0 ? void 0 : rows.length) > 0 ? /*#__PURE__*/_react.default.createElement(_reactDataTableComponent.default, {
|
|
121
|
-
columns: columns,
|
|
122
|
-
data: rows,
|
|
123
|
-
className: "datatable",
|
|
124
|
-
defaultSortAsc: false,
|
|
125
|
-
defaultSortField: "date",
|
|
126
|
-
pagination: true,
|
|
127
|
-
paginationPerPage: TABLE_ROWS_PER_PAGE // @ts-ignore
|
|
128
|
-
,
|
|
129
|
-
direction: dir,
|
|
130
|
-
paginationRowsPerPageOptions: [5, 15, 30, 50],
|
|
131
|
-
paginationComponentOptions: {
|
|
132
|
-
rowsPerPageText: _i18n.default.t('components.data_table.rows_per_page') + ':',
|
|
133
|
-
rangeSeparatorText: _i18n.default.t('components.data_table.of'),
|
|
134
|
-
selectAllRowsItemText: _i18n.default.t('all')
|
|
135
|
-
}
|
|
136
|
-
}) : /*#__PURE__*/_react.default.createElement("div", {
|
|
137
|
-
className: "trend-content__no-results"
|
|
138
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
139
|
-
className: "trend-content__no-results-img",
|
|
140
|
-
src: _no_results.default,
|
|
141
|
-
alt: ""
|
|
142
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
-
className: "trend-content__no-results-text"
|
|
144
|
-
}, _i18n.default.t('components.nvl_trend.no_sampling_results'))));
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
var _default = TrendPopupContent;
|
|
148
|
-
exports.default = _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
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 _TrendPopupContent = _interopRequireDefault(require("./TrendPopupContent"));
|
|
11
|
-
|
|
12
|
-
var _default = _TrendPopupContent.default;
|
|
13
|
-
exports.default = _default;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.trend-content {
|
|
2
|
-
min-width: 300px;
|
|
3
|
-
|
|
4
|
-
.table-title {
|
|
5
|
-
font-size: 1.3rem;
|
|
6
|
-
text-align: center;
|
|
7
|
-
margin: 3rem 0 1rem;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&__no-results {
|
|
11
|
-
text-align: center;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&__no-results-img {
|
|
15
|
-
display: inline-block;
|
|
16
|
-
margin: 0 auto;
|
|
17
|
-
width: 60px;
|
|
18
|
-
height: 60px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&__no-results-text {
|
|
22
|
-
display: block;
|
|
23
|
-
text-align: center;
|
|
24
|
-
margin: 1rem;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.rdt_TableHeader {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
}
|