@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,167 +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 _highchartsReactOfficial = _interopRequireDefault(require("highcharts-react-official"));
|
|
17
|
-
|
|
18
|
-
var _highstock = _interopRequireDefault(require("highcharts/highstock"));
|
|
19
|
-
|
|
20
|
-
var _trendline = _interopRequireDefault(require("highcharts/indicators/trendline"));
|
|
21
|
-
|
|
22
|
-
var _indicators = _interopRequireDefault(require("highcharts/indicators/indicators"));
|
|
23
|
-
|
|
24
|
-
var _useKandoFetch2 = _interopRequireDefault(require("../../utilities/custom_hooks/useKandoFetch"));
|
|
25
|
-
|
|
26
|
-
var _ContentLoader = require("../ContentLoader");
|
|
27
|
-
|
|
28
|
-
var _i18n = _interopRequireDefault(require("../../utilities/i18n"));
|
|
29
|
-
|
|
30
|
-
require("./styles.scss");
|
|
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
|
-
(0, _indicators.default)(_highstock.default);
|
|
37
|
-
(0, _trendline.default)(_highstock.default);
|
|
38
|
-
|
|
39
|
-
var parseData = function parseData(jsonData) {
|
|
40
|
-
var values = jsonData.map(function (data) {
|
|
41
|
-
return data.mrna_copies;
|
|
42
|
-
});
|
|
43
|
-
var x_axis = jsonData.map(function (data) {
|
|
44
|
-
return data.date;
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
if (!values.length || !x_axis.length) {
|
|
48
|
-
return [];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
values: values,
|
|
53
|
-
x_axis: x_axis
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
var TrendGraphNVL = function TrendGraphNVL(_ref) {
|
|
58
|
-
var areaID = _ref.areaID;
|
|
59
|
-
|
|
60
|
-
var _useKandoFetch = (0, _useKandoFetch2.default)("/data/trend-graph-nvl-component-data/".concat(areaID)),
|
|
61
|
-
data = _useKandoFetch.data,
|
|
62
|
-
isFetching = _useKandoFetch.isFetching;
|
|
63
|
-
|
|
64
|
-
var _useState = (0, _react.useState)({}),
|
|
65
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
66
|
-
options = _useState2[0],
|
|
67
|
-
setOptions = _useState2[1];
|
|
68
|
-
|
|
69
|
-
var createOptions = function createOptions(parsedData) {
|
|
70
|
-
return {
|
|
71
|
-
chart: {
|
|
72
|
-
height: 254
|
|
73
|
-
},
|
|
74
|
-
// @ts-ignore
|
|
75
|
-
credits: {
|
|
76
|
-
enabled: false
|
|
77
|
-
},
|
|
78
|
-
title: {
|
|
79
|
-
text: null
|
|
80
|
-
},
|
|
81
|
-
subtitle: {
|
|
82
|
-
text: null
|
|
83
|
-
},
|
|
84
|
-
rangeSelector: {
|
|
85
|
-
selected: 5
|
|
86
|
-
},
|
|
87
|
-
legend: {
|
|
88
|
-
enabled: false
|
|
89
|
-
},
|
|
90
|
-
plotOptions: {
|
|
91
|
-
series: {
|
|
92
|
-
marker: {
|
|
93
|
-
radius: 6
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
xAxis: [{
|
|
98
|
-
labels: {
|
|
99
|
-
format: "{value:%e-%b}",
|
|
100
|
-
rotation: -45
|
|
101
|
-
},
|
|
102
|
-
// @ts-ignore
|
|
103
|
-
categories: parsedData.x_axis,
|
|
104
|
-
crosshair: true,
|
|
105
|
-
type: 'datetime'
|
|
106
|
-
}],
|
|
107
|
-
yAxis: {
|
|
108
|
-
// Primary yAxis
|
|
109
|
-
softMax: 0,
|
|
110
|
-
title: {
|
|
111
|
-
text: ''
|
|
112
|
-
},
|
|
113
|
-
labels: {
|
|
114
|
-
format: '{value}',
|
|
115
|
-
style: {
|
|
116
|
-
// @ts-ignore
|
|
117
|
-
color: _highstock.default.getOptions().colors[1]
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
series: [{
|
|
122
|
-
type: 'line',
|
|
123
|
-
id: 'PIs',
|
|
124
|
-
name: _i18n.default.t("components.trend.pi_value"),
|
|
125
|
-
// @ts-ignore
|
|
126
|
-
data: parsedData.values,
|
|
127
|
-
lineWidth: 3,
|
|
128
|
-
color: '#fec107'
|
|
129
|
-
}],
|
|
130
|
-
time: {
|
|
131
|
-
timezoneOffset: data['timezone_offset']
|
|
132
|
-
},
|
|
133
|
-
tooltip: {
|
|
134
|
-
// @ts-ignore
|
|
135
|
-
formatter: function formatter() {
|
|
136
|
-
// @ts-ignore
|
|
137
|
-
return this.series.name + '<br/>' + '<b>' + this.y + '</b>'; // eslint-disable-line
|
|
138
|
-
},
|
|
139
|
-
useHTML: true
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
(0, _react.useEffect)(function () {
|
|
145
|
-
if (!isFetching && (data === null || data === void 0 ? void 0 : data.values.length) > 0) {
|
|
146
|
-
var opts = createOptions(parseData(data.values));
|
|
147
|
-
setOptions(opts);
|
|
148
|
-
}
|
|
149
|
-
}, [isFetching]);
|
|
150
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
151
|
-
className: "trend-graph-nvl"
|
|
152
|
-
}, isFetching ? /*#__PURE__*/_react.default.createElement(_ContentLoader.RowLoader, {
|
|
153
|
-
margin: "26px 0 0",
|
|
154
|
-
bgColor: "#f2f2f2",
|
|
155
|
-
fgColor: "#fff"
|
|
156
|
-
}) : /*#__PURE__*/_react.default.createElement("div", {
|
|
157
|
-
className: "trend-graph-nvl__content"
|
|
158
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
159
|
-
className: "trend-graph-nvl__title"
|
|
160
|
-
}, data === null || data === void 0 ? void 0 : data.area_name, "\xA0", _i18n.default.t("components.nvl_trend.over_time")), /*#__PURE__*/_react.default.createElement(_highchartsReactOfficial.default, {
|
|
161
|
-
highcharts: _highstock.default,
|
|
162
|
-
options: options
|
|
163
|
-
})));
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
var _default = TrendGraphNVL;
|
|
167
|
-
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 _TrendGraphNVL = _interopRequireDefault(require("./TrendGraphNVL"));
|
|
11
|
-
|
|
12
|
-
var _default = _TrendGraphNVL.default;
|
|
13
|
-
exports.default = _default;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.parseSelectedItems = exports.buildKQLQuery = void 0;
|
|
7
|
-
|
|
8
|
-
var buildKQLQuery = function buildKQLQuery(activeFilter) {
|
|
9
|
-
var orderBy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'newest';
|
|
10
|
-
var query = [];
|
|
11
|
-
|
|
12
|
-
if (activeFilter.filter_items.length === 0) {
|
|
13
|
-
return "ALL ORDER_BY ".concat(orderBy);
|
|
14
|
-
} else {
|
|
15
|
-
activeFilter.filter_items.map(function (filter_item) {
|
|
16
|
-
query.push(filter_item.type);
|
|
17
|
-
query.push('IN');
|
|
18
|
-
query.push('(');
|
|
19
|
-
parseSelectedItems(filter_item).map(function (selected_option) {
|
|
20
|
-
if (typeof selected_option === 'string') {
|
|
21
|
-
var replacedQ = selected_option.replace(/[' '&]/g, '-');
|
|
22
|
-
replacedQ = replacedQ.replace(/[\,]/g, ' ');
|
|
23
|
-
query.push(replacedQ);
|
|
24
|
-
} else {
|
|
25
|
-
query.push(selected_option);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
query.push(')');
|
|
29
|
-
});
|
|
30
|
-
query.push("ORDER_BY ".concat(orderBy));
|
|
31
|
-
return query.join(' ');
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
exports.buildKQLQuery = buildKQLQuery;
|
|
36
|
-
|
|
37
|
-
var parseSelectedItems = function parseSelectedItems(filterItem) {
|
|
38
|
-
var parsedItems = filterItem.selected_options;
|
|
39
|
-
|
|
40
|
-
if (typeof filterItem.selected_options === 'string') {
|
|
41
|
-
parsedItems = JSON.parse(parsedItems);
|
|
42
|
-
} else if (filterItem.type === "AreaFilterItem" || filterItem.type === "SectorFilterItem") {
|
|
43
|
-
parsedItems = parsedItems.map(function (item) {
|
|
44
|
-
return parseInt(item);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return parsedItems;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
exports.parseSelectedItems = parseSelectedItems;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.rangeToDays = void 0;
|
|
7
|
-
|
|
8
|
-
var rangeToDays = function rangeToDays(range) {
|
|
9
|
-
var dict = {
|
|
10
|
-
'24h': 1,
|
|
11
|
-
'48h': 2,
|
|
12
|
-
'7d': 7,
|
|
13
|
-
'30d': 30,
|
|
14
|
-
'3m': 92,
|
|
15
|
-
'6m': 183,
|
|
16
|
-
'1y': 365
|
|
17
|
-
};
|
|
18
|
-
return dict[range];
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.rangeToDays = rangeToDays;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.updateWBE = updateWBE;
|
|
7
|
-
|
|
8
|
-
var _actionTypes = require("./actionTypes");
|
|
9
|
-
|
|
10
|
-
function updateWBE(data) {
|
|
11
|
-
return {
|
|
12
|
-
type: _actionTypes.UPDATE_WBE,
|
|
13
|
-
payload: data
|
|
14
|
-
};
|
|
15
|
-
}
|
|
@@ -1,40 +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.WBEReducer = WBEReducer;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _immer = _interopRequireDefault(require("immer"));
|
|
13
|
-
|
|
14
|
-
var _actionTypes = require("./actionTypes");
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
var initialWBEState = {
|
|
21
|
-
WBE: {
|
|
22
|
-
focusedArea: null,
|
|
23
|
-
areas: null
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
function WBEReducer() {
|
|
28
|
-
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialWBEState;
|
|
29
|
-
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
30
|
-
return (0, _immer.default)(state, function (draft) {
|
|
31
|
-
var type = action.type,
|
|
32
|
-
WBE = action.payload;
|
|
33
|
-
|
|
34
|
-
switch (type) {
|
|
35
|
-
case _actionTypes.UPDATE_WBE:
|
|
36
|
-
draft.WBE = _objectSpread(_objectSpread({}, state.WBE), WBE);
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UPDATE_AREAS = exports.RECEIVE_AREAS = exports.REQUEST_AREAS = void 0;
|
|
7
|
-
var REQUEST_AREAS = 'Area.Request';
|
|
8
|
-
exports.REQUEST_AREAS = REQUEST_AREAS;
|
|
9
|
-
var RECEIVE_AREAS = 'Area.Receive';
|
|
10
|
-
exports.RECEIVE_AREAS = RECEIVE_AREAS;
|
|
11
|
-
var UPDATE_AREAS = 'Area.Update';
|
|
12
|
-
exports.UPDATE_AREAS = UPDATE_AREAS;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.updateAreas = updateAreas;
|
|
7
|
-
exports.fetchAreas = fetchAreas;
|
|
8
|
-
|
|
9
|
-
var _actionTypes = require("./actionTypes");
|
|
10
|
-
|
|
11
|
-
function requestAreas() {
|
|
12
|
-
return {
|
|
13
|
-
type: _actionTypes.REQUEST_AREAS
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function receiveAreas(json) {
|
|
18
|
-
return {
|
|
19
|
-
type: _actionTypes.RECEIVE_AREAS,
|
|
20
|
-
payload: json
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function updateAreas(data) {
|
|
25
|
-
return {
|
|
26
|
-
type: _actionTypes.UPDATE_AREAS,
|
|
27
|
-
payload: data
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function fetchAreas(waterAuthorityId) {
|
|
32
|
-
return function (dispatch) {
|
|
33
|
-
dispatch(requestAreas());
|
|
34
|
-
return fetch("/areas.json?water_authority_id=".concat(waterAuthorityId)).then(function (response) {
|
|
35
|
-
return response.json();
|
|
36
|
-
}).then(function (json) {
|
|
37
|
-
return dispatch(receiveAreas(json));
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.areasReducer = areasReducer;
|
|
7
|
-
|
|
8
|
-
var _actionTypes = require("./actionTypes");
|
|
9
|
-
|
|
10
|
-
var initialAreasState = {
|
|
11
|
-
items: [],
|
|
12
|
-
isFetching: false
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
function areasReducer() {
|
|
16
|
-
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialAreasState;
|
|
17
|
-
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
18
|
-
var type = action.type,
|
|
19
|
-
error = action.error,
|
|
20
|
-
payload = action.payload;
|
|
21
|
-
|
|
22
|
-
switch (type) {
|
|
23
|
-
case _actionTypes.REQUEST_AREAS:
|
|
24
|
-
return Object.assign({}, state, {
|
|
25
|
-
isFetching: true
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
case _actionTypes.RECEIVE_AREAS:
|
|
29
|
-
return Object.assign({}, state, {
|
|
30
|
-
isFetching: false,
|
|
31
|
-
items: action.payload
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
case _actionTypes.UPDATE_AREAS:
|
|
35
|
-
return Object.assign({}, state, {
|
|
36
|
-
isFetching: false,
|
|
37
|
-
items: [{
|
|
38
|
-
areas: state.items[0].areas.map(function (area) {
|
|
39
|
-
if (area.id === action.payload.id) {
|
|
40
|
-
return Object.assign({}, area, {
|
|
41
|
-
id: action.payload.id,
|
|
42
|
-
name: action.payload.name,
|
|
43
|
-
shape_data: action.payload.shape_data,
|
|
44
|
-
type: action.payload.type
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return area;
|
|
49
|
-
})
|
|
50
|
-
}]
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
default:
|
|
54
|
-
return state;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.updateNavContext = updateNavContext;
|
|
7
|
-
|
|
8
|
-
var _actionTypes = require("./actionTypes");
|
|
9
|
-
|
|
10
|
-
function updateNavContext(data) {
|
|
11
|
-
return {
|
|
12
|
-
type: _actionTypes.UPDATE_NAV_CONTEXT,
|
|
13
|
-
payload: data
|
|
14
|
-
};
|
|
15
|
-
}
|
|
@@ -1,40 +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.navContextReducer = navContextReducer;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _actionTypes = require("./actionTypes");
|
|
13
|
-
|
|
14
|
-
var _immer = _interopRequireDefault(require("immer"));
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
var initialNavContextState = {
|
|
21
|
-
navContext: {
|
|
22
|
-
name: '',
|
|
23
|
-
locale: ''
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
function navContextReducer() {
|
|
28
|
-
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialNavContextState;
|
|
29
|
-
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
30
|
-
return (0, _immer.default)(state, function (draft) {
|
|
31
|
-
var type = action.type,
|
|
32
|
-
navContext = action.payload;
|
|
33
|
-
|
|
34
|
-
switch (type) {
|
|
35
|
-
case _actionTypes.UPDATE_NAV_CONTEXT:
|
|
36
|
-
draft.navContext = _objectSpread(_objectSpread({}, state.navContext), navContext);
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UPDATE_EDGE_SHAPE_DATA = exports.UPDATE_EDGES = exports.RECEIVE_EDGES = exports.REQUEST_EDGES = void 0;
|
|
7
|
-
var REQUEST_EDGES = 'Edge.Request';
|
|
8
|
-
exports.REQUEST_EDGES = REQUEST_EDGES;
|
|
9
|
-
var RECEIVE_EDGES = 'Edge.Receive';
|
|
10
|
-
exports.RECEIVE_EDGES = RECEIVE_EDGES;
|
|
11
|
-
var UPDATE_EDGES = 'Edge.Update';
|
|
12
|
-
exports.UPDATE_EDGES = UPDATE_EDGES;
|
|
13
|
-
var UPDATE_EDGE_SHAPE_DATA = 'Edge.UpdateEdgeShapeData';
|
|
14
|
-
exports.UPDATE_EDGE_SHAPE_DATA = UPDATE_EDGE_SHAPE_DATA;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.updateEdges = updateEdges;
|
|
7
|
-
exports.updateEdgeShapeData = updateEdgeShapeData;
|
|
8
|
-
exports.fetchEdges = fetchEdges;
|
|
9
|
-
|
|
10
|
-
var _actionTypes = require("./actionTypes");
|
|
11
|
-
|
|
12
|
-
function requestEdges() {
|
|
13
|
-
return {
|
|
14
|
-
type: _actionTypes.REQUEST_EDGES
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function receiveEdges(json) {
|
|
19
|
-
return {
|
|
20
|
-
type: _actionTypes.RECEIVE_EDGES,
|
|
21
|
-
payload: json
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function updateEdges(data) {
|
|
26
|
-
return {
|
|
27
|
-
type: _actionTypes.UPDATE_EDGES,
|
|
28
|
-
payload: data
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function updateEdgeShapeData(data) {
|
|
33
|
-
return {
|
|
34
|
-
type: _actionTypes.UPDATE_EDGE_SHAPE_DATA,
|
|
35
|
-
payload: data
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function fetchEdges(waterAuthorityId) {
|
|
40
|
-
return function (dispatch) {
|
|
41
|
-
dispatch(requestEdges());
|
|
42
|
-
return fetch("/control_room/network_edges.json?water_authority_id=".concat(waterAuthorityId)).then(function (response) {
|
|
43
|
-
return response.json();
|
|
44
|
-
}).then(function (json) {
|
|
45
|
-
return dispatch(receiveEdges(json));
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
}
|