@kando-env/kando-ui 1.0.14-alpha.0 → 1.0.16
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/lib/CovidView/views/components/Body.js +3 -3
- package/lib/CovidView/views/components/Map.js +4 -4
- package/lib/CovidView/views/components/MapStyle.scss +0 -4
- package/lib/CovidView/views/components/Sidebar.js +2 -2
- package/lib/CovidView/views/components/Summary.js +3 -3
- package/lib/CovidView/views/components/TrendGraphNVL/TrendGraphNVL.js +4 -4
- package/lib/CovidView/views/components/TrendGraphNVL/index.js +1 -1
- package/lib/CovidView/views/components/TrendPopupContent/TrendPopupContent.js +10 -6
- package/lib/CovidView/views/components/TrendPopupContent/index.js +1 -1
- package/lib/CovidView/views/components/areas/Area.js +3 -3
- package/lib/CovidView/views/components/areas/AreaPolygonWBE.js +2 -2
- package/lib/CovidView/views/components/areas/AreaPolygonsWBE.js +2 -2
- package/lib/CovidView/views/components/areas/AreasList.js +3 -3
- package/lib/CovidView/views/components/areas/Sort.js +3 -3
- package/lib/CovidView/views/covidView.js +2 -2
- package/lib/DashboardV2/AreaDashboard.js +4 -4
- package/lib/DashboardV2/SamplingParameters/NoResults/NoResults.js +10 -18
- package/lib/DashboardV2/SamplingParameters/NoResults/NoResults.stories.js +1 -1
- package/lib/DashboardV2/SamplingParameters/ParametersContainer/ParametersButtons/ParameterButton/ParameterButton.js +1 -1
- package/lib/DashboardV2/SamplingParameters/ParametersContainer/ParametersButtons/ParametersButtons.js +7 -3
- package/lib/DashboardV2/SamplingParameters/ParametersContainer/ParametersButtons/styles.js +1 -1
- package/lib/DashboardV2/SamplingParameters/ParametersContainer/ParametersContainer.js +3 -3
- package/lib/DashboardV2/SamplingParameters/SamplingContainer/ExceptionBar/ExceptionBar.js +7 -3
- package/lib/DashboardV2/SamplingParameters/SamplingContainer/ExceptionBar/ExceptionBar.stories.js +1 -1
- package/lib/DashboardV2/SamplingParameters/SamplingContainer/ExceptionBar/styles.js +1 -1
- package/lib/DashboardV2/SamplingParameters/SamplingContainer/ExpandableSamplingTable/ExpandableSamplingTable.js +14 -14
- package/lib/DashboardV2/SamplingParameters/SamplingContainer/ExpandableSamplingTable/ExpandableSamplingTable.scss +19 -20
- package/lib/DashboardV2/SamplingParameters/SamplingContainer/SamplingContainer.js +1 -1
- package/lib/DashboardV2/SamplingParameters/SamplingParameters.js +8 -7
- package/lib/DashboardV2/SamplingParameters/SamplingParameters.stories.js +3 -2
- package/lib/DashboardV2/SamplingParameters/charts/ParametersChart.js +2 -2
- package/lib/DashboardV2/SamplingParameters/charts/SamplingChart.js +2 -2
- package/lib/DashboardV2/SamplingParameters/dataParser.js +2 -2
- package/lib/DashboardV2/SamplingParameters/styles/samplingParameters.js +8 -13
- package/lib/DashboardV2/SamplingParameters/styles/styles.js +6 -5
- package/lib/DashboardV2/SiteDashboard.js +13 -14
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/AreaBox/AreaBox.js +19 -21
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/AreaBox/Map/Map.js +2 -2
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/AreaBox/Map/Map.scss +2 -9
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/AreaBox/PieChart/PieChart.js +3 -3
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/AreaBox/styles.js +2 -2
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/Areas.js +23 -18
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/Factories.js +25 -21
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/FactoryBox/FactoryBox.js +44 -16
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/FactoryBox/PieChart/PieChart.js +2 -2
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/FactoryBox/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/MostPolluting.js +18 -19
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/MostPolluting.stories.js +107 -75
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/ShowMore/ShowMore.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/ShowMore/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Tabs/Tabs.js +30 -22
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Tabs/Tabs.stories.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Tabs/assets/index.js +5 -5
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/assets/index.js +6 -6
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/models.js +1 -0
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/MostSevereEvents.js +24 -47
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/MostSevereEvents.scss +7 -12
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/MostSevereEvents.stories.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/NoEvents/NoEvents.js +9 -17
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/NoEvents/NoEvents.stories.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/SevereEvent/SevereEvent.js +39 -24
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/SevereEvent/SevereEvent.scss +23 -54
- package/lib/DashboardV2/UtilityDashboard/TopBar/MostCommon/Back/Back.js +6 -5
- package/lib/DashboardV2/UtilityDashboard/TopBar/MostCommon/MostCommon.js +7 -7
- package/lib/DashboardV2/UtilityDashboard/TopBar/MostCommon/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/PieChart/PieChart.js +10 -7
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/PollutedLine/PollutedLine.js +2 -2
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/QualitySummary.js +21 -33
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/styles.js +2 -2
- package/lib/DashboardV2/UtilityDashboard/TopBar/TopBar.js +22 -2
- package/lib/DashboardV2/UtilityDashboard/TopBar/UtilityInformation/UtilityInformation.js +16 -52
- package/lib/DashboardV2/UtilityDashboard/TopBar/UtilityInformation/styles.js +3 -3
- package/lib/DashboardV2/UtilityDashboard/TopBar/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/UtilityDashboard.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/UtilityDashboard.stories.js +121 -63
- package/lib/DashboardV2/UtilityDashboard/mocks/areas.mock.js +320 -0
- package/lib/DashboardV2/UtilityDashboard/mocks/events.mock.js +345 -0
- package/lib/DashboardV2/UtilityDashboard/mocks/factories.mock.js +140 -0
- package/lib/DashboardV2/UtilityDashboard/mocks/index.js +29 -0
- package/lib/DashboardV2/WaterAuthorityDashboard.js +5 -13
- package/lib/DashboardV2/index.js +1 -1
- package/lib/EventsView/views/components/Body.js +26 -48
- package/lib/EventsView/views/components/areas/AreaPolygon.js +2 -2
- package/lib/EventsView/views/components/areas/AreaPolygons.js +3 -3
- package/lib/EventsView/views/components/edges/Edge.js +2 -2
- package/lib/EventsView/views/components/edges/Edges.js +2 -2
- package/lib/EventsView/views/components/events/EventIndicator.js +2 -2
- package/lib/EventsView/views/components/events/EventPath.js +2 -2
- package/lib/EventsView/views/components/events/MoreInfo.js +2 -2
- package/lib/EventsView/views/components/events/Sidebar.js +2 -2
- package/lib/EventsView/views/components/events/event_info/EarlyWarnings.js +2 -2
- package/lib/EventsView/views/components/events/event_info/EventDetails.js +1 -1
- package/lib/EventsView/views/components/events/event_info/EventInfo.js +3 -3
- package/lib/EventsView/views/components/events/event_info/EventTimeRange.js +3 -3
- package/lib/EventsView/views/components/events/event_info/HistoricalInformation.js +1 -1
- package/lib/EventsView/views/components/events/event_info/MiniEventTree.js +3 -3
- package/lib/EventsView/views/components/events/event_info/MobileEventPath.js +1 -1
- package/lib/EventsView/views/components/events/event_info/PollutionDischarge.js +2 -2
- package/lib/EventsView/views/components/events/event_info/charts/EventDetailsLineChart.js +3 -3
- package/lib/EventsView/views/components/events/event_info/charts/EventDetailsPieChart.js +3 -3
- package/lib/EventsView/views/components/events/event_info/damage_type/DamageType.js +3 -3
- package/lib/EventsView/views/components/events/event_info/samplings/Sampling.js +1 -1
- package/lib/EventsView/views/components/events/event_info/samplings/Samplings.js +1 -1
- package/lib/EventsView/views/components/events/event_info/sources/Source.js +1 -1
- package/lib/EventsView/views/components/events/event_info/sources/Sources.js +2 -2
- package/lib/EventsView/views/components/events/events_list/EventItem.js +2 -2
- package/lib/EventsView/views/components/events/events_list/EventsList.js +3 -3
- package/lib/EventsView/views/components/events/events_list/Filter/Filter.js +3 -3
- package/lib/EventsView/views/components/events/events_list/Filter/FilterContainer.js +4 -4
- package/lib/EventsView/views/components/events/events_list/Filter/FilterItem.js +2 -2
- package/lib/EventsView/views/components/events/events_list/Filter/FiltersDropDown.js +2 -2
- package/lib/EventsView/views/components/events/events_list/Filter/OptionsDropDown.js +4 -4
- package/lib/EventsView/views/components/events/events_list/Sort.js +3 -3
- package/lib/EventsView/views/components/map/FloatingGraph.js +1 -1
- package/lib/EventsView/views/components/map/Map.js +11 -8
- package/lib/EventsView/views/components/map/mapStyle.scss +0 -6
- package/lib/EventsView/views/components/points/PointMarker.js +2 -2
- package/lib/EventsView/views/components/points/PointMarkers.js +1 -1
- package/lib/EventsView/views/eventsView.js +2 -2
- package/lib/Router.js +4 -8
- package/lib/index.js +1 -1
- package/lib/shared/TimeRangeSelector/TimeRangeSelector.js +3 -4
- package/lib/shared/TimeRangeSelector/index.js +1 -1
- package/lib/shared/TimeRangeSelector/styles.scss +4 -6
- package/lib/shared/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/lib/shared/components/Breadcrumbs/index.js +1 -1
- package/lib/shared/components/ContentLoader/ContentLoader.js +1 -1
- package/lib/shared/components/DamageType/DamageType.js +3 -3
- package/lib/shared/components/DamageType/index.js +1 -1
- package/lib/shared/components/DischargeHeatmap/DischargeHeatmap.js +3 -3
- package/lib/shared/components/DischargeHeatmap/index.js +1 -1
- package/lib/shared/components/DoubleTabs/DoubleTabs.js +1 -1
- package/lib/shared/components/DoubleTabs/DoubleTabs.stories.js +1 -1
- package/lib/shared/components/DoubleTabs/styles.js +8 -13
- package/lib/shared/components/ErrorBoundary.js +12 -6
- package/lib/shared/components/Events/Events.js +3 -3
- package/lib/shared/components/Events/index.js +1 -1
- package/lib/shared/components/Graph/Graph.js +11 -7
- package/lib/shared/components/Graph/index.js +1 -1
- package/lib/shared/components/KandoModal/KandoModal.js +3 -3
- package/lib/shared/components/KandoModal/index.js +1 -1
- package/lib/shared/components/KandoNavbar/KandoNavbar.js +25 -20
- package/lib/shared/components/KandoNavbar/index.js +1 -1
- package/lib/shared/components/LiveEvents/CarouselSlide.js +1 -1
- package/lib/shared/components/LiveEvents/LiveEvents.js +1 -1
- package/lib/shared/components/LiveEvents/index.js +1 -1
- package/lib/shared/components/LoaderByPercent/LoaderByPercent.js +1 -1
- package/lib/shared/components/Map/Map.js +3 -3
- package/lib/shared/components/Map/index.js +1 -1
- package/lib/shared/components/NarrowHeader.js +12 -6
- package/lib/shared/components/PointInfo/PointInfo.js +1 -1
- package/lib/shared/components/PointInfo/index.js +1 -1
- package/lib/shared/components/Search/Search.js +16 -8
- package/lib/shared/components/Search/index.js +1 -1
- package/lib/shared/components/Sector/Sector.js +8 -4
- package/lib/shared/components/Sector/index.js +1 -1
- package/lib/shared/components/Select/Select.js +10 -6
- package/lib/shared/components/Select/Select.stories.js +1 -1
- package/lib/shared/components/Spinner/Spinner.js +1 -1
- package/lib/shared/components/Spinner/Spinner.stories.js +1 -1
- package/lib/shared/components/Spinner/index.js +1 -1
- package/lib/shared/components/Spinner/style/spinner.js +7 -9
- package/lib/shared/components/Toggle/Toggle.js +3 -3
- package/lib/shared/components/Toggle/index.js +1 -1
- package/lib/shared/components/TrendGraph/TrendGraph.js +11 -8
- package/lib/shared/components/TrendGraph/index.js +1 -1
- package/lib/shared/components/TrendGraphNVL/TrendGraphNVL.js +3 -3
- package/lib/shared/components/TrendGraphNVL/index.js +1 -1
- package/lib/shared/redux/WBE/reducer.js +7 -3
- package/lib/shared/redux/context/reducer.js +7 -3
- package/lib/shared/redux/edges/reducer.js +2 -2
- package/lib/shared/redux/events/reducer.js +11 -7
- package/lib/shared/redux/rootReducer.js +1 -4
- package/lib/shared/redux/rootStore.js +5 -14
- package/lib/shared/utilities/ErrorBoundary.js +12 -6
- package/lib/shared/utilities/KandoDate.js +3 -4
- package/lib/shared/utilities/KandoModal.js +3 -3
- package/lib/shared/utilities/TimeFormat.js +2 -2
- package/lib/shared/utilities/Truncate.js +3 -3
- package/lib/shared/utilities/custom_hooks/useApi.js +5 -11
- package/lib/shared/utilities/custom_hooks/useKandoFetch.js +2 -2
- package/lib/shared/utilities/custom_hooks/useMap.js +3 -3
- package/lib/shared/utilities/custom_hooks/useWindowSize.js +2 -2
- package/lib/shared/utilities/i18n.js +3 -3
- package/package.json +8 -17
- package/lib/DashboardV2/Header/DoubleTabs/DoubleTabs.js +0 -95
- package/lib/DashboardV2/Header/DoubleTabs/DoubleTabs.stories.js +0 -30
- package/lib/DashboardV2/Header/DoubleTabs/styles.js +0 -31
- package/lib/DashboardV2/Header/Header.js +0 -20
- package/lib/DashboardV2/Header/Header.stories.js +0 -28
- package/lib/DashboardV2/Header/InfoBar/Breadcrumbs/Breadcrumbs.js +0 -50
- package/lib/DashboardV2/Header/InfoBar/Breadcrumbs/right-arrow-bold.svg +0 -44
- package/lib/DashboardV2/Header/InfoBar/Breadcrumbs/right-arrow-light.svg +0 -44
- package/lib/DashboardV2/Header/InfoBar/InfoBar.js +0 -63
- package/lib/DashboardV2/Header/Toolbar/Toolbar.js +0 -114
- package/lib/DashboardV2/Header/Toolbar/arrow.svg +0 -44
- package/lib/DashboardV2/Header/Toolbar/user.svg +0 -3
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/areas.mock.js +0 -234
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/factories.mock.js +0 -4296
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/factoriesResponse.interface.js +0 -5
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/qualitySummary.mock.js +0 -29
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/qualitySummaryResponse.interface.js +0 -5
- package/lib/DashboardV2/UtilityDashboard/TopBar/UtilityInformation/UtilityInformationResponse.interface.js +0 -5
- package/lib/DashboardV2/UtilityDashboard/TopBar/UtilityInformation/utilityInformation.mock.js +0 -14
- package/lib/DashboardV2/UtilityDashboard/initMsw.js +0 -16
- package/lib/DashboardV2/useApiWithDashboardQuery.js +0 -57
- package/lib/EventsView/views/components/map/Map.stories.js +0 -32
- package/lib/fonts/Gilroy-ExtraBold.otf +0 -0
- package/lib/fonts/Gilroy-Light.otf +0 -0
- package/lib/fonts/Gilroy-Regular.otf +0 -0
- package/lib/fonts/Gilroy-SemiBold.otf +0 -0
- package/lib/macros/getVersion.js +0 -9
- package/lib/shared/TimeRangeSelector/TimeRangeSelector.stories.js +0 -35
- package/lib/shared/components/InfoBar/InfoBar.js +0 -74
- package/lib/shared/components/InfoBar/InfoBar.stories.js +0 -31
- package/lib/shared/components/PopupModal/PopupModal.js +0 -44
- package/lib/shared/components/PopupModal/PopupModal.stories.js +0 -52
- package/lib/shared/redux/dashboard/dashboardSlice.js +0 -23
- package/lib/styles.scss +0 -38
- /package/lib/DashboardV2/UtilityDashboard/{MostPolluting/Areas/areasResponse.interface.js → TopBar/models.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -22,9 +22,12 @@ var _useWindowSize2 = require("../../../../../shared/utilities/custom_hooks/useW
|
|
|
22
22
|
var PieChart = function PieChart(_ref) {
|
|
23
23
|
var _ref$isUp = _ref.isUp,
|
|
24
24
|
isUp = _ref$isUp === void 0 ? false : _ref$isUp,
|
|
25
|
-
title = _ref.title,
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
_ref$title = _ref.title,
|
|
26
|
+
title = _ref$title === void 0 ? "Clear" : _ref$title,
|
|
27
|
+
_ref$clearPercent = _ref.clearPercent,
|
|
28
|
+
clearPercent = _ref$clearPercent === void 0 ? "75" : _ref$clearPercent,
|
|
29
|
+
_ref$changePercent = _ref.changePercent,
|
|
30
|
+
changePercent = _ref$changePercent === void 0 ? '0.15' : _ref$changePercent;
|
|
28
31
|
|
|
29
32
|
var _useWindowSize = (0, _useWindowSize2.useWindowSize)(),
|
|
30
33
|
width = _useWindowSize.width;
|
|
@@ -97,11 +100,11 @@ var PieChart = function PieChart(_ref) {
|
|
|
97
100
|
innerSize: '85%',
|
|
98
101
|
data: [{
|
|
99
102
|
name: 'Pollution',
|
|
100
|
-
y:
|
|
103
|
+
y: 25,
|
|
101
104
|
legendIndex: 2
|
|
102
105
|
}, {
|
|
103
106
|
name: 'Clear',
|
|
104
|
-
y:
|
|
107
|
+
y: 75,
|
|
105
108
|
legendIndex: 1
|
|
106
109
|
}]
|
|
107
110
|
}]
|
|
@@ -121,5 +124,5 @@ var PieChart = function PieChart(_ref) {
|
|
|
121
124
|
exports.PieChart = PieChart;
|
|
122
125
|
|
|
123
126
|
var downArrow = function downArrow(isUp) {
|
|
124
|
-
return " <svg width=\"10px\" height=\"10px\" fill=\"".concat(isUp ? '#1db232' : '#f6004f', "\" style=\"transform:rotate(").concat(isUp ? '180deg' : '0deg', ")\" version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 512.171 512.171\" style=\"enable-background:new 0 0 512.171 512.171;\" xml:space=\"preserve\">\n<g>\n <g>\n <path d=\"M479.046,283.925c-1.664-3.989-5.547-6.592-9.856-6.592H352.305V10.667C352.305,4.779,347.526,0,341.638,0H170.971\n c-5.888,0-10.667,4.779-10.667,10.667v266.667H42.971c-4.309,0-8.192,2.603-9.856,6.571c-1.643,3.989-0.747,8.576,2.304,11.627\n l212.8,213.504c2.005,2.005,4.715,3.136,7.552,3.136s5.547-1.131,7.552-3.115l213.419-213.504\n C479.793,292.501,480.71,287.915,479.046,283.925z\" />\n </g>\n</g>\n</svg>");
|
|
127
|
+
return " <svg width=\"10px\" height=\"10px\" fill=\"".concat(isUp ? '#1db232' : '#f6004f', "\" style=\"transform:rotate(").concat(isUp ? '180deg' : '0deg', ")\" version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 512.171 512.171\" style=\"enable-background:new 0 0 512.171 512.171;\" xml:space=\"preserve\">\n<g>\n <g>\n <path d=\"M479.046,283.925c-1.664-3.989-5.547-6.592-9.856-6.592H352.305V10.667C352.305,4.779,347.526,0,341.638,0H170.971\n c-5.888,0-10.667,4.779-10.667,10.667v266.667H42.971c-4.309,0-8.192,2.603-9.856,6.571c-1.643,3.989-0.747,8.576,2.304,11.627\n l212.8,213.504c2.005,2.005,4.715,3.136,7.552,3.136s5.547-1.131,7.552-3.115l213.419-213.504\n C479.793,292.501,480.71,287.915,479.046,283.925z\" />\n </g>\n</g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n<g></g>\n</svg>");
|
|
125
128
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -13,7 +13,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
13
13
|
|
|
14
14
|
var _LoaderByPercent = require("../../../../../shared/components/LoaderByPercent/LoaderByPercent");
|
|
15
15
|
|
|
16
|
-
var _downArrow = require("
|
|
16
|
+
var _downArrow = require("../assets/down-arrow.svg");
|
|
17
17
|
|
|
18
18
|
var PollutedLine = function PollutedLine(_ref) {
|
|
19
19
|
var color = _ref.color,
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.QualitySummary = void 0;
|
|
9
9
|
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("/Users/adam/clients/kando/kando-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
-
|
|
12
10
|
var _react = _interopRequireDefault(require("react"));
|
|
13
11
|
|
|
14
12
|
var _PollutedLine = require("./PollutedLine/PollutedLine");
|
|
@@ -17,34 +15,24 @@ var _PieChart = require("./PieChart/PieChart");
|
|
|
17
15
|
|
|
18
16
|
var _styles = require("./styles");
|
|
19
17
|
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
response = _useApiWithDashboardQ2[0],
|
|
28
|
-
isLoading = _useApiWithDashboardQ2[1],
|
|
29
|
-
error = _useApiWithDashboardQ2[2];
|
|
30
|
-
|
|
31
|
-
var qualitySummary = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.utility_quality_summary;
|
|
32
|
-
|
|
33
|
-
if (!qualitySummary) {
|
|
34
|
-
return /*#__PURE__*/_react.default.createElement("div", null, "Loading...");
|
|
35
|
-
}
|
|
36
|
-
|
|
18
|
+
var QualitySummary = function QualitySummary(_ref) {
|
|
19
|
+
var summary = _ref.summary;
|
|
20
|
+
var _summary$polluted = summary.polluted,
|
|
21
|
+
extreme = _summary$polluted.extreme,
|
|
22
|
+
high = _summary$polluted.high,
|
|
23
|
+
medium = _summary$polluted.medium,
|
|
24
|
+
total = _summary$polluted.total;
|
|
37
25
|
return /*#__PURE__*/_react.default.createElement(_styles.Container, null, /*#__PURE__*/_react.default.createElement(_styles.Title, null, "Quality Summary"), /*#__PURE__*/_react.default.createElement(_styles.Content, null, /*#__PURE__*/_react.default.createElement(_styles.CardsHolder, {
|
|
38
26
|
className: "first"
|
|
39
27
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
28
|
className: "triangle-holder"
|
|
41
29
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
42
30
|
className: "triangle"
|
|
43
|
-
}
|
|
31
|
+
})), /*#__PURE__*/_react.default.createElement(_PieChart.PieChart, {
|
|
44
32
|
title: "Clear",
|
|
45
|
-
isUp:
|
|
46
|
-
clearPercent:
|
|
47
|
-
changePercent: Math.abs(
|
|
33
|
+
isUp: summary.clear.increasePercent >= 0,
|
|
34
|
+
clearPercent: summary.clear.percent,
|
|
35
|
+
changePercent: Math.abs(summary.clear.increasePercent)
|
|
48
36
|
})), /*#__PURE__*/_react.default.createElement(_styles.CardsHolder, {
|
|
49
37
|
className: "second"
|
|
50
38
|
}, /*#__PURE__*/_react.default.createElement(_styles.PercentLineBarsHolder, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -54,25 +42,25 @@ var QualitySummary = function QualitySummary() {
|
|
|
54
42
|
}, /*#__PURE__*/_react.default.createElement(_PollutedLine.PollutedLine, {
|
|
55
43
|
color: "#f6004f",
|
|
56
44
|
title: "Extreme",
|
|
57
|
-
percent:
|
|
58
|
-
up:
|
|
59
|
-
upPercent:
|
|
45
|
+
percent: extreme.percent,
|
|
46
|
+
up: extreme.increasePercent >= 0,
|
|
47
|
+
upPercent: extreme.increasePercent
|
|
60
48
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
61
49
|
className: "loader-holder"
|
|
62
50
|
}, /*#__PURE__*/_react.default.createElement(_PollutedLine.PollutedLine, {
|
|
63
51
|
color: "#f67129",
|
|
64
52
|
title: "High",
|
|
65
|
-
percent:
|
|
66
|
-
up:
|
|
67
|
-
upPercent:
|
|
53
|
+
percent: high.percent,
|
|
54
|
+
up: high.increasePercent >= 0,
|
|
55
|
+
upPercent: high.increasePercent
|
|
68
56
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
69
57
|
className: "loader-holder"
|
|
70
58
|
}, /*#__PURE__*/_react.default.createElement(_PollutedLine.PollutedLine, {
|
|
71
59
|
color: "#f6b22f",
|
|
72
60
|
title: "Medium",
|
|
73
|
-
percent:
|
|
74
|
-
up:
|
|
75
|
-
upPercent:
|
|
61
|
+
percent: medium.percent,
|
|
62
|
+
up: medium.increasePercent >= 0,
|
|
63
|
+
upPercent: medium.increasePercent
|
|
76
64
|
}))))));
|
|
77
65
|
};
|
|
78
66
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -34,7 +34,7 @@ exports.CardsHolder = CardsHolder;
|
|
|
34
34
|
var Content = _styledComponents.default.div.withConfig({
|
|
35
35
|
displayName: "styles__Content",
|
|
36
36
|
componentId: "sc-nckm1k-2"
|
|
37
|
-
})(["display:flex;height:calc(100% - 37px);.first{width:33%;border-right:none;position:relative;> .triangle-holder{position:absolute;right
|
|
37
|
+
})(["display:flex;height:calc(100% - 37px);.first{width:33%;border-right:none;position:relative;> .triangle-holder{position:absolute;right:0;width:0;z-index:5;top:50%;transform:translateY(-50%);border-right:1px solid #c7c7c7;border-radius:2px;box-shadow:10px 0px 20px 10px rgba(199,199,199,0.3);height:calc(100% - 60px);> .triangle{right:-9px;background-color:white;position:absolute;top:50%;height:15px;width:15px;transform:translate(0,-50%) rotate(45deg);border:1px solid #c7c7c7;border-left:0;border-bottom:0;&::after{content:'';position:absolute;height:100%;width:50%;}}}}.second{width:67%;border-left:none;padding-left:30px;}@media (max-width:576px){display:flex;flex-direction:column;align-items:center;box-shadow:-0.9px -0.5px 5px 0 rgba(0,0,0,0.06);border:solid 1px #ebebeb;.first{width:calc(100% - 40px);border:none;box-shadow:none;border-bottom:1px solid #ebebeb;> .triangle-holder{display:none;}}.second{width:100%;border:none;box-shadow:none;padding-left:0;}}"]);
|
|
38
38
|
|
|
39
39
|
exports.Content = Content;
|
|
40
40
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.TopBar = void 0;
|
|
9
9
|
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
|
|
10
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
13
|
|
|
12
14
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -17,13 +19,31 @@ var _QualitySummary = require("./QualitySummary/QualitySummary");
|
|
|
17
19
|
|
|
18
20
|
var _UtilityInformation = require("./UtilityInformation/UtilityInformation");
|
|
19
21
|
|
|
22
|
+
var _useApi3 = require("../../../shared/utilities/custom_hooks/useApi");
|
|
23
|
+
|
|
20
24
|
var Container = _styledComponents.default.div.withConfig({
|
|
21
25
|
displayName: "TopBar__Container",
|
|
22
26
|
componentId: "sc-yqrye7-0"
|
|
23
27
|
})(["display:grid;grid-template-columns:1fr 2fr 1fr;grid-gap:25px;@media (max-width:1200px){grid-gap:10px;grid-template-rows:1fr 1fr;grid-template-columns:initial;grid-template-areas:'info common' 'summary summary ';}@media (max-width:768px){grid-template-rows:1fr 1fr 1fr;grid-template-areas:'info ' 'common' 'summary ';}@media (max-width:576px){grid-template-rows:1fr 1fr 1fr 1fr;grid-template-areas:'info ' 'common' 'summary ' 'summary ';}"]);
|
|
24
28
|
|
|
25
29
|
var TopBar = function TopBar() {
|
|
26
|
-
|
|
30
|
+
var endPoint = '/summary';
|
|
31
|
+
|
|
32
|
+
var _useApi = (0, _useApi3.useApi)(endPoint),
|
|
33
|
+
_useApi2 = (0, _slicedToArray2.default)(_useApi, 3),
|
|
34
|
+
response = _useApi2[0],
|
|
35
|
+
isLoading = _useApi2[1],
|
|
36
|
+
Error = _useApi2[2];
|
|
37
|
+
|
|
38
|
+
if (!response || Error) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_UtilityInformation.UtilityInformation, {
|
|
43
|
+
info: response.data.utilityInfo
|
|
44
|
+
}), /*#__PURE__*/_react.default.createElement(_QualitySummary.QualitySummary, {
|
|
45
|
+
summary: response.data.summary
|
|
46
|
+
}), /*#__PURE__*/_react.default.createElement(_MostCommon.MostCommon, null));
|
|
27
47
|
};
|
|
28
48
|
|
|
29
49
|
exports.TopBar = TopBar;
|
|
@@ -1,78 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
4
|
-
|
|
5
|
-
var _typeof = require("/Users/adam/clients/kando/kando-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/typeof");
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
4
|
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.UtilityInformation = void 0;
|
|
11
9
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
11
|
|
|
16
12
|
var _styles = require("./styles");
|
|
17
13
|
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
|
-
var UtilityInformation = function UtilityInformation() {
|
|
31
|
-
var _response$data;
|
|
32
|
-
|
|
33
|
-
var _useState = (0, _react.useState)(false),
|
|
34
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
35
|
-
show = _useState2[0],
|
|
36
|
-
setShow = _useState2[1];
|
|
37
|
-
|
|
38
|
-
var _useApiWithDashboardQ = (0, _useApiWithDashboardQuery.useApiWithDashboardQuery)('/data/utility-information.json'),
|
|
39
|
-
_useApiWithDashboardQ2 = (0, _slicedToArray2.default)(_useApiWithDashboardQ, 3),
|
|
40
|
-
response = _useApiWithDashboardQ2[0],
|
|
41
|
-
isLoading = _useApiWithDashboardQ2[1],
|
|
42
|
-
error = _useApiWithDashboardQ2[2];
|
|
43
|
-
|
|
44
|
-
var utilityResponse = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.data;
|
|
45
|
-
|
|
46
|
-
if (!utilityResponse) {
|
|
47
|
-
return /*#__PURE__*/_react.default.createElement("div", null, "Loading...");
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement(_styles.Container, null, /*#__PURE__*/_react.default.createElement(_PopupModal.PopupModal, {
|
|
51
|
-
show: show,
|
|
52
|
-
setShow: setShow
|
|
53
|
-
}, /*#__PURE__*/_react.default.createElement(_PopupModal2.OldMapStory, null)), /*#__PURE__*/_react.default.createElement(_styles.Title, {
|
|
14
|
+
var UtilityInformation = function UtilityInformation(_ref) {
|
|
15
|
+
var info = _ref.info;
|
|
16
|
+
var _info$scores = info.scores,
|
|
17
|
+
areas = _info$scores.areas,
|
|
18
|
+
factories = _info$scores.factories,
|
|
19
|
+
total = _info$scores.total,
|
|
20
|
+
wwtp = _info$scores.wwtp;
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_styles.Container, null, /*#__PURE__*/_react.default.createElement(_styles.Title, {
|
|
54
22
|
className: "title"
|
|
55
|
-
},
|
|
23
|
+
}, "Utility information"), /*#__PURE__*/_react.default.createElement(_styles.ContentHolder, null, /*#__PURE__*/_react.default.createElement(_styles.ContentTop, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
56
24
|
className: "total-score"
|
|
57
|
-
},
|
|
25
|
+
}, total && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "Utility Score ", /*#__PURE__*/_react.default.createElement("span", {
|
|
58
26
|
className: "score"
|
|
59
|
-
},
|
|
60
|
-
onClick: function onClick() {
|
|
61
|
-
return setShow(!show);
|
|
62
|
-
}
|
|
63
|
-
}, "Show Map ", '>')), /*#__PURE__*/_react.default.createElement(_styles.ContentBottom, null, /*#__PURE__*/_react.default.createElement(_styles.Score, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
+
}, total))), /*#__PURE__*/_react.default.createElement(_styles.ShowMapLink, null, "Show Map ", '>')), /*#__PURE__*/_react.default.createElement(_styles.ContentBottom, null, /*#__PURE__*/_react.default.createElement(_styles.Score, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
64
28
|
className: "subtitle"
|
|
65
29
|
}, "Areas"), /*#__PURE__*/_react.default.createElement("div", {
|
|
66
30
|
className: "number"
|
|
67
|
-
},
|
|
31
|
+
}, areas)), /*#__PURE__*/_react.default.createElement(_styles.Score, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
68
32
|
className: "subtitle"
|
|
69
33
|
}, "Factories"), /*#__PURE__*/_react.default.createElement("div", {
|
|
70
34
|
className: "number"
|
|
71
|
-
},
|
|
35
|
+
}, factories)), /*#__PURE__*/_react.default.createElement(_styles.Score, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
72
36
|
className: "subtitle"
|
|
73
37
|
}, "WWTPs"), /*#__PURE__*/_react.default.createElement("div", {
|
|
74
38
|
className: "number"
|
|
75
|
-
},
|
|
39
|
+
}, wwtp)))));
|
|
76
40
|
};
|
|
77
41
|
|
|
78
42
|
exports.UtilityInformation = UtilityInformation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -38,10 +38,10 @@ var ContentTop = _styledComponents.default.div.withConfig({
|
|
|
38
38
|
|
|
39
39
|
exports.ContentTop = ContentTop;
|
|
40
40
|
|
|
41
|
-
var ShowMapLink = _styledComponents.default.
|
|
41
|
+
var ShowMapLink = _styledComponents.default.a.withConfig({
|
|
42
42
|
displayName: "styles__ShowMapLink",
|
|
43
43
|
componentId: "sc-1ikbh2k-3"
|
|
44
|
-
})(["font-weight:300;color:#f6004f;
|
|
44
|
+
})(["font-weight:300;color:#f6004f;"]);
|
|
45
45
|
|
|
46
46
|
exports.ShowMapLink = ShowMapLink;
|
|
47
47
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -13,17 +13,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
13
13
|
|
|
14
14
|
var _UtilityDashboard = require("./UtilityDashboard");
|
|
15
15
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _utilityInformation = require("./TopBar/UtilityInformation/utilityInformation.mock");
|
|
19
|
-
|
|
20
|
-
var _factories = require("./MostPolluting/Factories/factories.mock");
|
|
21
|
-
|
|
22
|
-
var _areas = require("./MostPolluting/Areas/areas.mock");
|
|
23
|
-
|
|
24
|
-
var _reactRedux = require("react-redux");
|
|
25
|
-
|
|
26
|
-
var _redux = require("redux");
|
|
16
|
+
var _mocks = require("./mocks");
|
|
27
17
|
|
|
28
18
|
var _default = {
|
|
29
19
|
title: 'UI/Widgets/UtilityDashboard',
|
|
@@ -31,68 +21,136 @@ var _default = {
|
|
|
31
21
|
argTypes: {}
|
|
32
22
|
};
|
|
33
23
|
exports.default = _default;
|
|
34
|
-
var state = {
|
|
35
|
-
nav_context_data: {
|
|
36
|
-
navContext: {
|
|
37
|
-
locale: 'en'
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
global_data: {
|
|
41
|
-
waterAuthorityId: '24'
|
|
42
|
-
},
|
|
43
|
-
dashboard: {
|
|
44
|
-
period: '30d'
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
var store = (0, _redux.createStore)(function () {
|
|
48
|
-
return state;
|
|
49
|
-
}, state);
|
|
50
24
|
|
|
51
25
|
var Template = function Template(args) {
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
53
|
-
store: store
|
|
54
|
-
}, /*#__PURE__*/_react.default.createElement(_UtilityDashboard.UtilityDashboard, args));
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_UtilityDashboard.UtilityDashboard, args);
|
|
55
27
|
};
|
|
56
28
|
|
|
57
29
|
var Default = Template.bind({});
|
|
58
30
|
exports.Default = Default;
|
|
59
31
|
Default.args = {};
|
|
60
32
|
Default.parameters = {
|
|
61
|
-
msw: [_msw.rest.get('/
|
|
62
|
-
return res(ctx.json(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
33
|
+
msw: [_msw.rest.get('/summary', function (req, res, ctx) {
|
|
34
|
+
return res(ctx.json({
|
|
35
|
+
utilityInfo: {
|
|
36
|
+
scores: {
|
|
37
|
+
total: 45,
|
|
38
|
+
areas: 7,
|
|
39
|
+
factories: 27,
|
|
40
|
+
wwtp: 5
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
summary: {
|
|
44
|
+
clear: {
|
|
45
|
+
increasePercent: -15,
|
|
46
|
+
percent: 75
|
|
47
|
+
},
|
|
48
|
+
polluted: {
|
|
49
|
+
total: 25,
|
|
50
|
+
extreme: {
|
|
51
|
+
increasePercent: 0.4,
|
|
52
|
+
percent: 5
|
|
53
|
+
},
|
|
54
|
+
high: {
|
|
55
|
+
increasePercent: -0.1,
|
|
56
|
+
percent: 3
|
|
57
|
+
},
|
|
58
|
+
medium: {
|
|
59
|
+
increasePercent: 0.4,
|
|
60
|
+
percent: 17
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
}), _msw.rest.get('/areas', function (req, res, ctx) {
|
|
66
|
+
return res(ctx.json({
|
|
67
|
+
areasArr: _mocks.areasArr
|
|
68
|
+
}));
|
|
69
|
+
}), _msw.rest.get('/factories', function (req, res, ctx) {
|
|
70
|
+
return res(ctx.json({
|
|
71
|
+
factoriesArr: _mocks.factoriesArr
|
|
72
|
+
}));
|
|
73
|
+
}), _msw.rest.get('/wwtp', function (req, res, ctx) {
|
|
74
|
+
return res(ctx.json({
|
|
75
|
+
factoriesArr: _mocks.factoriesArr
|
|
76
|
+
}));
|
|
77
|
+
}), _msw.rest.get('/pumping', function (req, res, ctx) {
|
|
78
|
+
return res(ctx.json({
|
|
79
|
+
factoriesArr: _mocks.factoriesArr
|
|
80
|
+
}));
|
|
81
|
+
}), _msw.rest.get('/collectors', function (req, res, ctx) {
|
|
82
|
+
return res(ctx.json({
|
|
83
|
+
factoriesArr: _mocks.factoriesArr
|
|
84
|
+
}));
|
|
85
|
+
}), _msw.rest.get('/events', function (req, res, ctx) {
|
|
86
|
+
return res(ctx.json({
|
|
87
|
+
eventsArr: _mocks.eventsArr
|
|
88
|
+
}));
|
|
89
|
+
})]
|
|
77
90
|
};
|
|
78
91
|
var NoScore = Template.bind({});
|
|
79
92
|
exports.NoScore = NoScore;
|
|
80
93
|
NoScore.args = {};
|
|
81
94
|
NoScore.parameters = {
|
|
82
|
-
msw: [_msw.rest.get('/
|
|
83
|
-
return res(ctx.json(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
msw: [_msw.rest.get('/summary', function (req, res, ctx) {
|
|
96
|
+
return res(ctx.json({
|
|
97
|
+
utilityInfo: {
|
|
98
|
+
scores: {
|
|
99
|
+
areas: 7,
|
|
100
|
+
factories: 27,
|
|
101
|
+
wwtp: 5
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
summary: {
|
|
105
|
+
clear: {
|
|
106
|
+
up: false,
|
|
107
|
+
increasePercent: 15,
|
|
108
|
+
percent: 75
|
|
109
|
+
},
|
|
110
|
+
polluted: {
|
|
111
|
+
total: 25,
|
|
112
|
+
extreme: {
|
|
113
|
+
up: false,
|
|
114
|
+
increasePercent: 0.4,
|
|
115
|
+
percent: 5
|
|
116
|
+
},
|
|
117
|
+
high: {
|
|
118
|
+
up: true,
|
|
119
|
+
increasePercent: 0.1,
|
|
120
|
+
percent: 3
|
|
121
|
+
},
|
|
122
|
+
medium: {
|
|
123
|
+
up: false,
|
|
124
|
+
increasePercent: 0.4,
|
|
125
|
+
percent: 17
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}));
|
|
130
|
+
}), _msw.rest.get('/areas', function (req, res, ctx) {
|
|
131
|
+
return res(ctx.json({
|
|
132
|
+
areasArr: _mocks.areasArr,
|
|
133
|
+
factoriesArr: _mocks.factoriesArr
|
|
134
|
+
}));
|
|
135
|
+
}), _msw.rest.get('/factories', function (req, res, ctx) {
|
|
136
|
+
return res(ctx.json({
|
|
137
|
+
factoriesArr: _mocks.factoriesArr
|
|
138
|
+
}));
|
|
139
|
+
}), _msw.rest.get('/wwtp', function (req, res, ctx) {
|
|
140
|
+
return res(ctx.json({
|
|
141
|
+
factoriesArr: _mocks.factoriesArr
|
|
142
|
+
}));
|
|
143
|
+
}), _msw.rest.get('/pumping', function (req, res, ctx) {
|
|
144
|
+
return res(ctx.json({
|
|
145
|
+
factoriesArr: _mocks.factoriesArr
|
|
146
|
+
}));
|
|
147
|
+
}), _msw.rest.get('/collectors', function (req, res, ctx) {
|
|
148
|
+
return res(ctx.json({
|
|
149
|
+
factoriesArr: _mocks.factoriesArr
|
|
150
|
+
}));
|
|
151
|
+
}), _msw.rest.get('/events', function (req, res, ctx) {
|
|
152
|
+
return res(ctx.json({
|
|
153
|
+
eventsArr: _mocks.eventsArr
|
|
154
|
+
}));
|
|
155
|
+
})]
|
|
98
156
|
};
|