@kando-env/kando-ui 1.0.14-alpha.0 → 1.0.15
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,5 +1,5 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
.cell,
|
|
2
|
+
.header {
|
|
3
3
|
flex: 1;
|
|
4
4
|
color: #1d1d1d;
|
|
5
5
|
padding: 20px;
|
|
@@ -7,50 +7,50 @@
|
|
|
7
7
|
font-size: 14px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
11
|
-
.
|
|
10
|
+
.cell:first-child,
|
|
11
|
+
.header:first-child {
|
|
12
12
|
flex: 2;
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
.cell {
|
|
15
15
|
font-weight: 300;
|
|
16
16
|
}
|
|
17
|
-
.
|
|
17
|
+
.cell:first-child span:first-child {
|
|
18
18
|
margin-right: 30px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
21
|
+
.cell[data-color='Normal'] {
|
|
22
22
|
font-weight: 600;
|
|
23
23
|
color: #1db232;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.cell[data-color='Toxic'] {
|
|
27
27
|
font-weight: 600;
|
|
28
28
|
color: #f6004f;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.
|
|
31
|
+
.cell[data-color='Exception'] {
|
|
32
32
|
font-weight: 600;
|
|
33
33
|
color: #f6b22f;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
37
|
-
.
|
|
36
|
+
.table-area,
|
|
37
|
+
.headers {
|
|
38
38
|
display: flex;
|
|
39
39
|
align-items: center;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.table-area {
|
|
43
43
|
border: solid 1px #ebebeb;
|
|
44
44
|
box-shadow: -0.9px -0.5px 5px 0 rgba(0, 0, 0, 0.06);
|
|
45
45
|
position: relative;
|
|
46
46
|
cursor: pointer;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.
|
|
49
|
+
.row {
|
|
50
50
|
margin: 2.5px 0;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.
|
|
53
|
+
.header {
|
|
54
54
|
/* font-family: myriad-hebrew, sans-serif; TODO : use Myriad Hebrew; */
|
|
55
55
|
font-weight: normal;
|
|
56
56
|
font-stretch: normal;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
letter-spacing: 0.35px;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
65
|
+
.rows .content {
|
|
66
66
|
background-color: #f4f4f4;
|
|
67
67
|
display: flex;
|
|
68
68
|
justify-content: center;
|
|
@@ -73,19 +73,18 @@
|
|
|
73
73
|
width: 100%;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.
|
|
76
|
+
.rows .content.open {
|
|
77
77
|
height: 280px;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.
|
|
81
|
-
display: flex;
|
|
80
|
+
.arrow-btn {
|
|
82
81
|
position: absolute;
|
|
83
82
|
right: 22px;
|
|
84
83
|
top: 50%;
|
|
85
84
|
transform: translateY(-50%);
|
|
86
85
|
|
|
87
86
|
width: 11px;
|
|
88
|
-
height:
|
|
87
|
+
height: 8px;
|
|
89
88
|
|
|
90
89
|
opacity: 0.7;
|
|
91
90
|
background: none;
|
|
@@ -95,7 +94,7 @@
|
|
|
95
94
|
transition: transform 0.3s;
|
|
96
95
|
transform: rotate(0deg);
|
|
97
96
|
}
|
|
98
|
-
&.
|
|
97
|
+
&.open > svg {
|
|
99
98
|
transform: rotate(-90deg);
|
|
100
99
|
}
|
|
101
100
|
}
|
|
@@ -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,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
exports.SamplingParameters = void 0;
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
15
|
|
|
14
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
17
|
|
|
@@ -31,6 +33,8 @@ var _samplingParameters = require("./styles/samplingParameters");
|
|
|
31
33
|
|
|
32
34
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
33
35
|
|
|
36
|
+
var _templateObject;
|
|
37
|
+
|
|
34
38
|
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); }
|
|
35
39
|
|
|
36
40
|
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; }
|
|
@@ -122,7 +126,4 @@ var SamplingParameters = function SamplingParameters(_ref) {
|
|
|
122
126
|
|
|
123
127
|
exports.SamplingParameters = SamplingParameters;
|
|
124
128
|
|
|
125
|
-
var Container = _styledComponents.default.div.
|
|
126
|
-
displayName: "SamplingParameters__Container",
|
|
127
|
-
componentId: "sc-6oqmti-0"
|
|
128
|
-
})(["display:flex;width:200%;overflow:hidden;transition:transform 0.5s ease-in-out;&.right{transform:translateX(-50%);}"]);
|
|
129
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 200%;\n overflow: hidden;\n transition: transform 0.5s ease-in-out;\n &.right {\n transform: translateX(-50%);\n }\n"])));
|
|
@@ -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
|
|
@@ -20,7 +20,8 @@ var _default = {
|
|
|
20
20
|
component: _SamplingParameters2.SamplingParameters,
|
|
21
21
|
argTypes: {
|
|
22
22
|
DefaultShowParameters: {
|
|
23
|
-
control: 'boolean'
|
|
23
|
+
control: 'boolean',
|
|
24
|
+
defaultValue: false
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
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
|
|
@@ -78,7 +78,7 @@ var parametersReducer = function parametersReducer(labResults) {
|
|
|
78
78
|
value: param.measured_value
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
if (
|
|
81
|
+
if (param !== null && param !== void 0 && param.symbol && summary[param.symbol] && data) {
|
|
82
82
|
summary[param.symbol].push(data);
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -1,31 +1,26 @@
|
|
|
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.Title = exports.TitleTabsHolder = exports.Main = void 0;
|
|
9
9
|
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
|
|
10
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
13
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})(["font-family:Gilroy;width:100%;overflow-x:hidden;"]);
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
15
|
+
|
|
16
|
+
var Main = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: Gilroy;\n width: 100%;\n overflow-x: hidden;\n"])));
|
|
16
17
|
|
|
17
18
|
exports.Main = Main;
|
|
18
19
|
|
|
19
|
-
var TitleTabsHolder = _styledComponents.default.div.
|
|
20
|
-
displayName: "samplingParameters__TitleTabsHolder",
|
|
21
|
-
componentId: "sc-2mfny1-1"
|
|
22
|
-
})(["display:flex;justify-content:space-between;margin-bottom:10px;"]);
|
|
20
|
+
var TitleTabsHolder = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n margin-bottom: 10px;\n"])));
|
|
23
21
|
|
|
24
22
|
exports.TitleTabsHolder = TitleTabsHolder;
|
|
25
23
|
|
|
26
|
-
var Title = _styledComponents.default.div.
|
|
27
|
-
displayName: "samplingParameters__Title",
|
|
28
|
-
componentId: "sc-2mfny1-2"
|
|
29
|
-
})(["color:#1d1d1d;font-size:24px;line-height:0.92;"]);
|
|
24
|
+
var Title = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: #1d1d1d;\n font-size: 24px;\n line-height: 0.92;\n"])));
|
|
30
25
|
|
|
31
26
|
exports.Title = Title;
|
|
@@ -1,14 +1,18 @@
|
|
|
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.CustomContainer = exports.colors = void 0;
|
|
9
9
|
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
|
|
10
12
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
13
|
|
|
14
|
+
var _templateObject;
|
|
15
|
+
|
|
12
16
|
var colors = {
|
|
13
17
|
red: "#f6004f",
|
|
14
18
|
grey: "#ebebeb",
|
|
@@ -17,10 +21,7 @@ var colors = {
|
|
|
17
21
|
};
|
|
18
22
|
exports.colors = colors;
|
|
19
23
|
|
|
20
|
-
var CustomContainer = _styledComponents.default.div.
|
|
21
|
-
displayName: "styles__CustomContainer",
|
|
22
|
-
componentId: "sc-1hs45bu-0"
|
|
23
|
-
})(["height:", ";width:", ";padding:", ";;"], function (_ref) {
|
|
24
|
+
var CustomContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n width: ", ";\n padding: ", ";;\n"])), function (_ref) {
|
|
24
25
|
var h = _ref.h;
|
|
25
26
|
return "".concat(h);
|
|
26
27
|
}, function (_ref2) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
@@ -11,9 +11,9 @@ exports.default = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
13
|
|
|
14
|
-
var _slicedToArray2 = _interopRequireDefault(require("
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
15
|
|
|
16
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("
|
|
16
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
17
17
|
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
19
|
|
|
@@ -165,7 +165,6 @@ var SiteDashboard = function SiteDashboard() {
|
|
|
165
165
|
var _useParams = (0, _reactRouterDom.useParams)(),
|
|
166
166
|
pointID = _useParams.pointID;
|
|
167
167
|
|
|
168
|
-
var parsedPointID = parseInt(pointID);
|
|
169
168
|
var history = (0, _reactRouterDom.useHistory)();
|
|
170
169
|
|
|
171
170
|
var _useState = (0, _react.useState)(null),
|
|
@@ -197,13 +196,13 @@ var SiteDashboard = function SiteDashboard() {
|
|
|
197
196
|
(0, _react.useEffect)(function () {
|
|
198
197
|
dispatch((0, _actions2.fetchEvents)(waterAuthorityId, ''));
|
|
199
198
|
setSiteData(null);
|
|
200
|
-
fetchSiteData("/data/point/".concat(
|
|
199
|
+
fetchSiteData("/data/point/".concat(pointID), setSiteData).catch(function (e) {
|
|
201
200
|
console.log('Request error: ' + e.message);
|
|
202
201
|
});
|
|
203
|
-
fetchEventsData("/data/events/".concat(
|
|
202
|
+
fetchEventsData("/data/events/".concat(pointID), setEventsData).catch(function (e) {
|
|
204
203
|
console.log('Request error: ' + e.message);
|
|
205
204
|
});
|
|
206
|
-
}, [
|
|
205
|
+
}, [pointID]);
|
|
207
206
|
|
|
208
207
|
var isFetching = function isFetching() {
|
|
209
208
|
return (0, _lodash.isEmpty)(siteData);
|
|
@@ -232,7 +231,7 @@ var SiteDashboard = function SiteDashboard() {
|
|
|
232
231
|
"selected_options": [severity]
|
|
233
232
|
}, {
|
|
234
233
|
"type": "InterestPointFilterItem",
|
|
235
|
-
"selected_options": [
|
|
234
|
+
"selected_options": [pointID]
|
|
236
235
|
}]
|
|
237
236
|
};
|
|
238
237
|
var kql = (0, _kql.buildKQLQuery)(filter);
|
|
@@ -308,7 +307,7 @@ var SiteDashboard = function SiteDashboard() {
|
|
|
308
307
|
geo: geo,
|
|
309
308
|
discharging: discharging,
|
|
310
309
|
waterAuthorityId: waterAuthorityId,
|
|
311
|
-
pointId:
|
|
310
|
+
pointId: pointID,
|
|
312
311
|
locale: navContext.locale
|
|
313
312
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
314
313
|
className: "l2__live-events events-container",
|
|
@@ -336,12 +335,12 @@ var SiteDashboard = function SiteDashboard() {
|
|
|
336
335
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
337
336
|
className: "l2__events"
|
|
338
337
|
}, /*#__PURE__*/_react.default.createElement(_Events.default, {
|
|
339
|
-
pointId:
|
|
338
|
+
pointId: pointID,
|
|
340
339
|
period: periodRange
|
|
341
340
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
342
341
|
className: "l2__damage"
|
|
343
342
|
}, /*#__PURE__*/_react.default.createElement(_DamageType.default, {
|
|
344
|
-
pointId:
|
|
343
|
+
pointId: pointID,
|
|
345
344
|
periodDays: (0, _time.rangeToDays)(periodRange)
|
|
346
345
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
347
346
|
className: "l2__row-2"
|
|
@@ -350,12 +349,12 @@ var SiteDashboard = function SiteDashboard() {
|
|
|
350
349
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
351
350
|
className: "l2__trend-title"
|
|
352
351
|
}, _i18n.default.t('dashboard_v2.trend')), /*#__PURE__*/_react.default.createElement(_TrendGraph.default, {
|
|
353
|
-
pointId:
|
|
352
|
+
pointId: pointID,
|
|
354
353
|
period: periodRange
|
|
355
354
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
356
355
|
className: "l2__discharge"
|
|
357
356
|
}, /*#__PURE__*/_react.default.createElement(_DischargeHeatmap.default, {
|
|
358
|
-
pointId:
|
|
357
|
+
pointId: pointID,
|
|
359
358
|
periodDays: (0, _time.rangeToDays)(periodRange)
|
|
360
359
|
}))))));
|
|
361
360
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
exports.AreaBox = void 0;
|
|
11
11
|
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
@@ -39,7 +39,7 @@ var AreaBox = function AreaBox(_ref) {
|
|
|
39
39
|
enableToolTip = _useState4[0],
|
|
40
40
|
setEnableTooltip = _useState4[1];
|
|
41
41
|
|
|
42
|
-
var up = area.
|
|
42
|
+
var up = area.percent >= 0;
|
|
43
43
|
(0, _react.useEffect)(function () {
|
|
44
44
|
if (titleRef) {
|
|
45
45
|
//check if we want to enable tooltip
|
|
@@ -49,28 +49,26 @@ var AreaBox = function AreaBox(_ref) {
|
|
|
49
49
|
return /*#__PURE__*/_react.default.createElement(_styles.Box, {
|
|
50
50
|
up: up
|
|
51
51
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
-
className: "
|
|
53
|
-
"data-text": area.
|
|
52
|
+
className: "top ".concat(enableToolTip ? ' tooltip' : ''),
|
|
53
|
+
"data-text": area.title
|
|
54
54
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
-
className: "
|
|
55
|
+
className: "title",
|
|
56
56
|
ref: titleRef
|
|
57
|
-
}, area.
|
|
58
|
-
className: "
|
|
59
|
-
}, area.
|
|
60
|
-
className: "
|
|
57
|
+
}, area.title), /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: "factories"
|
|
59
|
+
}, area.factories, " factories")), /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: "content"
|
|
61
61
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
62
|
-
className: "
|
|
62
|
+
className: "percent"
|
|
63
63
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
64
64
|
className: "up"
|
|
65
65
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
66
66
|
className: "number"
|
|
67
|
-
}, Math.abs(area.
|
|
67
|
+
}, Math.abs(area.percent), "% "), /*#__PURE__*/_react.default.createElement(_assets.Arrow, {
|
|
68
68
|
fill: up ? '#1db232' : '#f6004f',
|
|
69
69
|
height: "10px",
|
|
70
70
|
width: "11px",
|
|
71
|
-
|
|
72
|
-
verticalAlign: 'middle'
|
|
73
|
-
}
|
|
71
|
+
css: "\n vertical-align: middle;\n "
|
|
74
72
|
}), ' '), /*#__PURE__*/_react.default.createElement("span", {
|
|
75
73
|
className: "down"
|
|
76
74
|
}, up ? 'Improvement' : 'Decline')), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -84,13 +82,13 @@ var AreaBox = function AreaBox(_ref) {
|
|
|
84
82
|
}, showPieChart ? /*#__PURE__*/_react.default.createElement("span", {
|
|
85
83
|
className: "back"
|
|
86
84
|
}, /*#__PURE__*/_react.default.createElement(_PieChart.PieChart, {
|
|
87
|
-
quality: area.
|
|
85
|
+
quality: area.quality
|
|
88
86
|
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
89
|
-
className: "
|
|
87
|
+
className: "front"
|
|
90
88
|
}, /*#__PURE__*/_react.default.createElement(_Map.Map, {
|
|
91
|
-
color: _styles.colors.
|
|
92
|
-
points: area.
|
|
93
|
-
locationLatLon: area.
|
|
89
|
+
color: _styles.colors[area.status],
|
|
90
|
+
points: area.points,
|
|
91
|
+
locationLatLon: area.locationLatLon
|
|
94
92
|
})))));
|
|
95
93
|
};
|
|
96
94
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
@@ -94,7 +94,7 @@ var PieChart = function PieChart(_ref) {
|
|
|
94
94
|
y: quality.medium
|
|
95
95
|
}, {
|
|
96
96
|
name: 'Clear',
|
|
97
|
-
y: quality.
|
|
97
|
+
y: quality.rest
|
|
98
98
|
}]
|
|
99
99
|
}],
|
|
100
100
|
credits: {
|
|
@@ -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
|
|
@@ -12,7 +12,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
12
12
|
var Box = _styledComponents.default.div.withConfig({
|
|
13
13
|
displayName: "styles__Box",
|
|
14
14
|
componentId: "sc-1re607i-0"
|
|
15
|
-
})(["border:solid 1px #ebebeb;width:100%;height:100%;color:#1d1d1d;> .
|
|
15
|
+
})(["border:solid 1px #ebebeb;width:100%;height:100%;color:#1d1d1d;> .top{height:38px;padding:9px 19px;background-color:#f9f9f9;display:flex;justify-content:space-between;position:relative;align-items:baseline;&.tooltip{&[data-text]::after{content:attr(data-text);position:absolute;color:white;background-color:rgba(0,0,0,0.9);border-radius:5px;top:5px;left:20px;z-index:3;padding:4px 2px;opacity:0;z-index:-1;transition:all 0.5s ease-in-out;}&:hover{&[data-text]::after{opacity:1;z-index:1;}}}> .title{font-size:18px;font-weight:600;line-height:1.22;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:auto;&::-webkit-scrollbar{display:none;}-ms-overflow-style:none;scrollbar-width:none;max-width:60%;}> .factories{font-size:14px;}}> .content{display:flex;justify-content:space-between;padding:11px 20px;height:calc(100% - 38px);> .percent{flex:1;align-items:center;margin:auto 0;font-size:14px;color:", ";> .up{display:block;> .number{font-size:24px;font-weight:700;}> svg{vertical-align:baseline;transform:rotate(", ");}}> .down{}}> .map-holder{flex:3;height:100%;position:relative;padding:5px;@keyframes hide{from{opacity:0;}to{opacity:1;}}> .front{display:flex;height:100%;justify-content:center;align-items:center;animation-name:hide;animation-duration:0.5s;transition:all 1s ease-in-out;}> .back{background-color:#f9f9f9;}}@media (max-width:500px){flex-direction:column-reverse;justify-content:space-between;padding:5x 10px;> .percent{flex:1;align-items:none;font-size:14px;> .up{display:inline-block;> .number{font-size:18px;font-weight:700;}}}> .map-holder{flex:4;padding:0;}}}"], function (_ref) {
|
|
16
16
|
var up = _ref.up;
|
|
17
17
|
return up ? '#1db232' : '#f6004f';
|
|
18
18
|
}, function (_ref2) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
exports.Areas = void 0;
|
|
11
11
|
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
@@ -23,12 +23,12 @@ var _useWindowSize = require("../../../../shared/utilities/custom_hooks/useWindo
|
|
|
23
23
|
|
|
24
24
|
var _ShowMore = require("../ShowMore/ShowMore");
|
|
25
25
|
|
|
26
|
+
var _useApi3 = require("../../../../shared/utilities/custom_hooks/useApi");
|
|
27
|
+
|
|
26
28
|
var _spinner = require("../../../../shared/components/Spinner/style/spinner");
|
|
27
29
|
|
|
28
30
|
var _Select = require("../../../../shared/components/Select/Select");
|
|
29
31
|
|
|
30
|
-
var _useApiWithDashboardQuery = require("../../../useApiWithDashboardQuery");
|
|
31
|
-
|
|
32
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
33
|
|
|
34
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; }
|
|
@@ -68,31 +68,36 @@ var Areas = function Areas(_ref) {
|
|
|
68
68
|
isShowMoreEnabled = _useState8[0],
|
|
69
69
|
setIsShowMoreEnabled = _useState8[1];
|
|
70
70
|
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
var _useState9 = (0, _react.useState)([]),
|
|
72
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
73
|
+
areasArr = _useState10[0],
|
|
74
|
+
setAreasArr = _useState10[1];
|
|
75
|
+
|
|
76
|
+
var _useApi = (0, _useApi3.useApi)(endPoint),
|
|
77
|
+
_useApi2 = (0, _slicedToArray2.default)(_useApi, 3),
|
|
78
|
+
response = _useApi2[0],
|
|
79
|
+
isLoading = _useApi2[1],
|
|
80
|
+
Error = _useApi2[2];
|
|
76
81
|
|
|
77
|
-
var areasArr = response === null || response === void 0 ? void 0 : response.data;
|
|
78
82
|
(0, _react.useEffect)(function () {
|
|
79
|
-
if (!
|
|
80
|
-
|
|
83
|
+
if (response && !Error) {
|
|
84
|
+
setAreasArr(response.data.areasArr);
|
|
81
85
|
}
|
|
82
|
-
|
|
86
|
+
}, [response]);
|
|
87
|
+
(0, _react.useEffect)(function () {
|
|
83
88
|
var data = areasArr.slice(); //select order items by
|
|
84
89
|
|
|
85
90
|
if (order.value === 'pollute') {
|
|
86
91
|
data = data.sort(function (a, b) {
|
|
87
|
-
return a.
|
|
92
|
+
return a.quality.rest - b.quality.rest;
|
|
88
93
|
});
|
|
89
94
|
} else if (order.value === 'clean') {
|
|
90
95
|
data = data.sort(function (a, b) {
|
|
91
|
-
return b.
|
|
96
|
+
return b.quality.rest - a.quality.rest;
|
|
92
97
|
});
|
|
93
98
|
} else if (order.value === 'improve') {
|
|
94
99
|
data = data.sort(function (a, b) {
|
|
95
|
-
return b.
|
|
100
|
+
return b.percent - a.percent;
|
|
96
101
|
});
|
|
97
102
|
}
|
|
98
103
|
|
|
@@ -133,7 +138,7 @@ var Areas = function Areas(_ref) {
|
|
|
133
138
|
menuWidth: 250
|
|
134
139
|
})), /*#__PURE__*/_react.default.createElement(_styles.GridBoxContainer, null, showedAreasArr.map(function (area, index) {
|
|
135
140
|
return /*#__PURE__*/_react.default.createElement(_AreaBox.AreaBox, {
|
|
136
|
-
key: "".concat(area.
|
|
141
|
+
key: "".concat(area.title, "-").concat(index),
|
|
137
142
|
area: area
|
|
138
143
|
});
|
|
139
144
|
})), isShowMoreEnabled && /*#__PURE__*/_react.default.createElement(_ShowMore.ShowMore, {
|