@kando-env/kando-ui 1.0.12 → 1.0.14-alpha.0
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 +4 -0
- 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 +6 -10
- 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/Header/DoubleTabs/DoubleTabs.js +95 -0
- package/lib/DashboardV2/Header/DoubleTabs/DoubleTabs.stories.js +30 -0
- package/lib/DashboardV2/Header/DoubleTabs/styles.js +31 -0
- package/lib/DashboardV2/Header/Header.js +20 -0
- package/lib/DashboardV2/Header/Header.stories.js +28 -0
- package/lib/DashboardV2/Header/InfoBar/Breadcrumbs/Breadcrumbs.js +50 -0
- package/lib/DashboardV2/Header/InfoBar/Breadcrumbs/right-arrow-bold.svg +44 -0
- package/lib/DashboardV2/Header/InfoBar/Breadcrumbs/right-arrow-light.svg +44 -0
- package/lib/DashboardV2/Header/InfoBar/InfoBar.js +63 -0
- package/lib/DashboardV2/Header/Toolbar/Toolbar.js +114 -0
- package/lib/DashboardV2/Header/Toolbar/arrow.svg +44 -0
- package/lib/DashboardV2/Header/Toolbar/user.svg +3 -0
- package/lib/DashboardV2/SamplingParameters/NoResults/NoResults.js +18 -10
- 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 +3 -7
- 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 +3 -7
- 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 +20 -19
- package/lib/DashboardV2/SamplingParameters/SamplingContainer/SamplingContainer.js +1 -1
- package/lib/DashboardV2/SamplingParameters/SamplingParameters.js +7 -8
- package/lib/DashboardV2/SamplingParameters/SamplingParameters.stories.js +2 -3
- 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 +13 -8
- package/lib/DashboardV2/SamplingParameters/styles/styles.js +5 -6
- package/lib/DashboardV2/SiteDashboard.js +14 -13
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/AreaBox/AreaBox.js +21 -19
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/AreaBox/Map/Map.js +2 -2
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/AreaBox/Map/Map.scss +9 -2
- 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 +18 -23
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/areas.mock.js +234 -0
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Areas/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/Factories.js +21 -25
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/FactoryBox/FactoryBox.js +16 -44
- 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/factories.mock.js +4296 -0
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/factoriesResponse.interface.js +5 -0
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/MostPolluting.js +19 -18
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/MostPolluting.stories.js +75 -107
- 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 +22 -30
- 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 +0 -1
- package/lib/DashboardV2/UtilityDashboard/MostPolluting/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/MostSevereEvents.js +47 -24
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/MostSevereEvents.scss +12 -7
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/MostSevereEvents.stories.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/NoEvents/NoEvents.js +17 -9
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/NoEvents/NoEvents.stories.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/SevereEvent/SevereEvent.js +24 -39
- package/lib/DashboardV2/UtilityDashboard/MostSevereEvents/SevereEvent/SevereEvent.scss +54 -23
- package/lib/DashboardV2/UtilityDashboard/TopBar/MostCommon/Back/Back.js +5 -6
- 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 +7 -10
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/PollutedLine/PollutedLine.js +2 -2
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/QualitySummary.js +33 -21
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/qualitySummary.mock.js +29 -0
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/qualitySummaryResponse.interface.js +5 -0
- package/lib/DashboardV2/UtilityDashboard/TopBar/QualitySummary/styles.js +2 -2
- package/lib/DashboardV2/UtilityDashboard/TopBar/TopBar.js +2 -22
- package/lib/DashboardV2/UtilityDashboard/TopBar/UtilityInformation/UtilityInformation.js +52 -16
- package/lib/DashboardV2/UtilityDashboard/TopBar/UtilityInformation/UtilityInformationResponse.interface.js +5 -0
- package/lib/DashboardV2/UtilityDashboard/TopBar/UtilityInformation/styles.js +3 -3
- package/lib/DashboardV2/UtilityDashboard/TopBar/UtilityInformation/utilityInformation.mock.js +14 -0
- package/lib/DashboardV2/UtilityDashboard/TopBar/styles.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/UtilityDashboard.js +1 -1
- package/lib/DashboardV2/UtilityDashboard/UtilityDashboard.stories.js +63 -121
- package/lib/DashboardV2/UtilityDashboard/initMsw.js +16 -0
- package/lib/DashboardV2/WaterAuthorityDashboard.js +13 -5
- package/lib/DashboardV2/index.js +1 -1
- package/lib/DashboardV2/useApiWithDashboardQuery.js +57 -0
- package/lib/EventsView/views/components/Body.js +48 -26
- 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 +8 -11
- package/lib/EventsView/views/components/map/Map.stories.js +32 -0
- package/lib/EventsView/views/components/map/mapStyle.scss +6 -0
- 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 +8 -4
- 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/index.js +1 -1
- package/lib/macros/getVersion.js +9 -0
- package/lib/shared/TimeRangeSelector/TimeRangeSelector.js +4 -3
- package/lib/shared/TimeRangeSelector/TimeRangeSelector.stories.js +35 -0
- package/lib/shared/TimeRangeSelector/index.js +1 -1
- package/lib/shared/TimeRangeSelector/styles.scss +6 -4
- 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 +13 -8
- package/lib/shared/components/ErrorBoundary.js +6 -12
- 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 +7 -11
- package/lib/shared/components/Graph/index.js +1 -1
- package/lib/shared/components/InfoBar/InfoBar.js +74 -0
- package/lib/shared/components/InfoBar/InfoBar.stories.js +31 -0
- 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 +20 -18
- 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 +6 -12
- package/lib/shared/components/PointInfo/PointInfo.js +1 -1
- package/lib/shared/components/PointInfo/index.js +1 -1
- package/lib/shared/components/PopupModal/PopupModal.js +44 -0
- package/lib/shared/components/PopupModal/PopupModal.stories.js +52 -0
- package/lib/shared/components/Search/Search.js +8 -16
- package/lib/shared/components/Search/index.js +1 -1
- package/lib/shared/components/Sector/Sector.js +4 -8
- package/lib/shared/components/Sector/index.js +1 -1
- package/lib/shared/components/Select/Select.js +6 -10
- 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 +9 -7
- 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 +8 -11
- 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 +3 -7
- package/lib/shared/redux/context/reducer.js +3 -7
- package/lib/shared/redux/dashboard/dashboardSlice.js +23 -0
- package/lib/shared/redux/edges/reducer.js +2 -2
- package/lib/shared/redux/events/reducer.js +7 -11
- package/lib/shared/redux/rootReducer.js +4 -1
- package/lib/shared/redux/rootStore.js +14 -5
- package/lib/shared/utilities/ErrorBoundary.js +6 -12
- package/lib/shared/utilities/KandoDate.js +4 -3
- 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 +11 -5
- 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/lib/styles.scss +38 -0
- package/package.json +17 -8
- package/lib/DashboardV2/UtilityDashboard/mocks/areas.mock.js +0 -320
- package/lib/DashboardV2/UtilityDashboard/mocks/events.mock.js +0 -345
- package/lib/DashboardV2/UtilityDashboard/mocks/factories.mock.js +0 -140
- package/lib/DashboardV2/UtilityDashboard/mocks/index.js +0 -29
- /package/lib/DashboardV2/UtilityDashboard/{TopBar/models.js → MostPolluting/Areas/areasResponse.interface.js} +0 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.areasResponce = void 0;
|
|
7
|
+
var areasResponce = [{
|
|
8
|
+
area_id: 2,
|
|
9
|
+
area_name: 'גבעת שאול',
|
|
10
|
+
total_factories: 24,
|
|
11
|
+
main_collectors: [{
|
|
12
|
+
lat: 31.785564,
|
|
13
|
+
lng: 35.186972
|
|
14
|
+
}, {
|
|
15
|
+
lat: 31.78594,
|
|
16
|
+
lng: 35.186709
|
|
17
|
+
}, {
|
|
18
|
+
lat: 31.787292,
|
|
19
|
+
lng: 35.185078
|
|
20
|
+
}, {
|
|
21
|
+
lat: 31.787765,
|
|
22
|
+
lng: 35.190605
|
|
23
|
+
}, {
|
|
24
|
+
lat: 31.786041,
|
|
25
|
+
lng: 35.182008
|
|
26
|
+
}, {
|
|
27
|
+
lat: 31.785863,
|
|
28
|
+
lng: 35.184042
|
|
29
|
+
}, {
|
|
30
|
+
lat: 31.786044,
|
|
31
|
+
lng: 35.184477
|
|
32
|
+
}, {
|
|
33
|
+
lat: 31.7915566,
|
|
34
|
+
lng: 35.1840892
|
|
35
|
+
}, {
|
|
36
|
+
lat: 31.793618,
|
|
37
|
+
lng: 35.187935
|
|
38
|
+
}, {
|
|
39
|
+
lat: 31.786778,
|
|
40
|
+
lng: 35.185221
|
|
41
|
+
}, {
|
|
42
|
+
lat: 31.786028,
|
|
43
|
+
lng: 35.187934
|
|
44
|
+
}, {
|
|
45
|
+
lat: 31.785588,
|
|
46
|
+
lng: 35.181779
|
|
47
|
+
}, {
|
|
48
|
+
lat: 31.7974163,
|
|
49
|
+
lng: 35.1942172
|
|
50
|
+
}, {
|
|
51
|
+
lat: 31.794055,
|
|
52
|
+
lng: 35.179859
|
|
53
|
+
}, {
|
|
54
|
+
lat: 31.7796,
|
|
55
|
+
lng: 35.17734
|
|
56
|
+
}, {
|
|
57
|
+
lat: 31.7860677,
|
|
58
|
+
lng: 35.182205
|
|
59
|
+
}, {
|
|
60
|
+
lat: 31.788366,
|
|
61
|
+
lng: 35.183201
|
|
62
|
+
}, {
|
|
63
|
+
lat: 31.786724,
|
|
64
|
+
lng: 35.185711
|
|
65
|
+
}, {
|
|
66
|
+
lat: 31.748577,
|
|
67
|
+
lng: 35.207896
|
|
68
|
+
}, {
|
|
69
|
+
lat: 31.786035,
|
|
70
|
+
lng: 35.182194
|
|
71
|
+
}, {
|
|
72
|
+
lat: 31.789139,
|
|
73
|
+
lng: 35.218355
|
|
74
|
+
}, {
|
|
75
|
+
lat: 31.785733,
|
|
76
|
+
lng: 35.18732
|
|
77
|
+
}, {
|
|
78
|
+
lat: 31.783933,
|
|
79
|
+
lng: 35.188571
|
|
80
|
+
}],
|
|
81
|
+
wwtp_lat_lng: {
|
|
82
|
+
lat: 31.75792,
|
|
83
|
+
lng: 35.10476
|
|
84
|
+
},
|
|
85
|
+
shape_data: [{
|
|
86
|
+
lat: 31.635782,
|
|
87
|
+
lng: 34.549451
|
|
88
|
+
}, {
|
|
89
|
+
lat: 31.850727,
|
|
90
|
+
lng: 35.218821
|
|
91
|
+
}],
|
|
92
|
+
area_score: null,
|
|
93
|
+
pollution: {
|
|
94
|
+
polluted_percent_change: 0,
|
|
95
|
+
type_distribution: {
|
|
96
|
+
clear: 70,
|
|
97
|
+
medium: 18,
|
|
98
|
+
high: 9,
|
|
99
|
+
extreme: 3
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
area_id: 1,
|
|
104
|
+
area_name: 'א.ת. עטרות',
|
|
105
|
+
total_factories: 35,
|
|
106
|
+
main_collectors: [{
|
|
107
|
+
lat: 31.84994,
|
|
108
|
+
lng: 35.21587
|
|
109
|
+
}, {
|
|
110
|
+
lat: 31.8503880295414,
|
|
111
|
+
lng: 35.2238543420235
|
|
112
|
+
}, {
|
|
113
|
+
lat: 31.850788,
|
|
114
|
+
lng: 35.217611
|
|
115
|
+
}, {
|
|
116
|
+
lat: 31.863168,
|
|
117
|
+
lng: 35.220677
|
|
118
|
+
}, {
|
|
119
|
+
lat: 31.856296,
|
|
120
|
+
lng: 35.220484
|
|
121
|
+
}, {
|
|
122
|
+
lat: 31.750312,
|
|
123
|
+
lng: 35.21546
|
|
124
|
+
}, {
|
|
125
|
+
lat: 31.855399,
|
|
126
|
+
lng: 35.219615
|
|
127
|
+
}, {
|
|
128
|
+
lat: 31.853433,
|
|
129
|
+
lng: 35.21542
|
|
130
|
+
}, {
|
|
131
|
+
lat: 31.8510167,
|
|
132
|
+
lng: 35.220676
|
|
133
|
+
}, {
|
|
134
|
+
lat: 31.854786,
|
|
135
|
+
lng: 35.215869
|
|
136
|
+
}, {
|
|
137
|
+
lat: 31.784678,
|
|
138
|
+
lng: 35.212718
|
|
139
|
+
}, {
|
|
140
|
+
lat: 31.850363,
|
|
141
|
+
lng: 35.222093
|
|
142
|
+
}, {
|
|
143
|
+
lat: 31.853899,
|
|
144
|
+
lng: 35.215065
|
|
145
|
+
}, {
|
|
146
|
+
lat: 31.850885,
|
|
147
|
+
lng: 35.222129
|
|
148
|
+
}, {
|
|
149
|
+
lat: 31.8556271,
|
|
150
|
+
lng: 35.2214895
|
|
151
|
+
}, {
|
|
152
|
+
lat: 31.850291,
|
|
153
|
+
lng: 35.224779
|
|
154
|
+
}, {
|
|
155
|
+
lat: 31.855299,
|
|
156
|
+
lng: 35.214813
|
|
157
|
+
}, {
|
|
158
|
+
lat: 31.855693,
|
|
159
|
+
lng: 35.213829
|
|
160
|
+
}, {
|
|
161
|
+
lat: 31.858402,
|
|
162
|
+
lng: 35.216677
|
|
163
|
+
}, {
|
|
164
|
+
lat: 31.8589044,
|
|
165
|
+
lng: 35.220231
|
|
166
|
+
}, {
|
|
167
|
+
lat: 31.85031,
|
|
168
|
+
lng: 35.223748
|
|
169
|
+
}, {
|
|
170
|
+
lat: 31.8555238,
|
|
171
|
+
lng: 35.2150079
|
|
172
|
+
}, {
|
|
173
|
+
lat: 31.8596988483717,
|
|
174
|
+
lng: 35.2196733807555
|
|
175
|
+
}, {
|
|
176
|
+
lat: 31.850727,
|
|
177
|
+
lng: 35.218821
|
|
178
|
+
}, {
|
|
179
|
+
lat: 31.852108,
|
|
180
|
+
lng: 35.224426
|
|
181
|
+
}, {
|
|
182
|
+
lat: 31.84404,
|
|
183
|
+
lng: 35.22873
|
|
184
|
+
}, {
|
|
185
|
+
lat: 31.851238,
|
|
186
|
+
lng: 35.219962
|
|
187
|
+
}, {
|
|
188
|
+
lat: 31.849448,
|
|
189
|
+
lng: 35.226993
|
|
190
|
+
}, {
|
|
191
|
+
lat: 31.850593,
|
|
192
|
+
lng: 35.225867
|
|
193
|
+
}, {
|
|
194
|
+
lat: 31.855944,
|
|
195
|
+
lng: 35.2143168
|
|
196
|
+
}, {
|
|
197
|
+
lat: 31.817605,
|
|
198
|
+
lng: 35.21157
|
|
199
|
+
}, {
|
|
200
|
+
lat: 31.855768,
|
|
201
|
+
lng: 35.220324
|
|
202
|
+
}, {
|
|
203
|
+
lat: 31.850331,
|
|
204
|
+
lng: 35.215637
|
|
205
|
+
}, {
|
|
206
|
+
lat: 31.858103,
|
|
207
|
+
lng: 35.215159
|
|
208
|
+
}, {
|
|
209
|
+
lat: 31.864825,
|
|
210
|
+
lng: 35.214475
|
|
211
|
+
}],
|
|
212
|
+
wwtp_lat_lng: {
|
|
213
|
+
lat: 31.75792,
|
|
214
|
+
lng: 35.10476
|
|
215
|
+
},
|
|
216
|
+
shape_data: [{
|
|
217
|
+
lat: 31.635782,
|
|
218
|
+
lng: 34.549451
|
|
219
|
+
}, {
|
|
220
|
+
lat: 31.850727,
|
|
221
|
+
lng: 35.218821
|
|
222
|
+
}],
|
|
223
|
+
area_score: null,
|
|
224
|
+
pollution: {
|
|
225
|
+
polluted_percent_change: 0,
|
|
226
|
+
type_distribution: {
|
|
227
|
+
clear: 70,
|
|
228
|
+
medium: 18,
|
|
229
|
+
high: 9,
|
|
230
|
+
extreme: 3
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}];
|
|
234
|
+
exports.areasResponce = areasResponce;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/Users/adam/clients/kando/kando-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/Users/adam/clients/kando/kando-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("
|
|
5
|
+
var _typeof = require("/Users/adam/clients/kando/kando-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
exports.Factories = void 0;
|
|
11
11
|
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("/Users/adam/clients/kando/kando-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray"));
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
@@ -21,8 +21,6 @@ var _useWindowSize = require("../../../../shared/utilities/custom_hooks/useWindo
|
|
|
21
21
|
|
|
22
22
|
var _ShowMore = require("../ShowMore/ShowMore");
|
|
23
23
|
|
|
24
|
-
var _useApi3 = require("../../../../shared/utilities/custom_hooks/useApi");
|
|
25
|
-
|
|
26
24
|
var _spinner = require("../../../../shared/components/Spinner/style/spinner");
|
|
27
25
|
|
|
28
26
|
var _styles2 = require("../styles");
|
|
@@ -31,6 +29,8 @@ var _styles3 = require("../Areas/styles");
|
|
|
31
29
|
|
|
32
30
|
var _Select = require("../../../../shared/components/Select/Select");
|
|
33
31
|
|
|
32
|
+
var _useApiWithDashboardQuery = require("../../../useApiWithDashboardQuery");
|
|
33
|
+
|
|
34
34
|
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
35
|
|
|
36
36
|
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; }
|
|
@@ -40,7 +40,8 @@ var Factories = function Factories(_ref) {
|
|
|
40
40
|
_ref$others = _ref.others,
|
|
41
41
|
others = _ref$others === void 0 ? false : _ref$others,
|
|
42
42
|
_ref$title = _ref.title,
|
|
43
|
-
title = _ref$title === void 0 ? 'Factories' : _ref$title
|
|
43
|
+
title = _ref$title === void 0 ? 'Factories' : _ref$title,
|
|
44
|
+
requestParams = _ref.requestParams;
|
|
44
45
|
var optionsInit = [{
|
|
45
46
|
label: "Most Polluting ".concat(title),
|
|
46
47
|
value: 'pollute'
|
|
@@ -79,22 +80,13 @@ var Factories = function Factories(_ref) {
|
|
|
79
80
|
isShowMoreEnabled = _useState10[0],
|
|
80
81
|
setIsShowMoreEnabled = _useState10[1];
|
|
81
82
|
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
response =
|
|
85
|
-
isLoading =
|
|
86
|
-
Error =
|
|
87
|
-
|
|
88
|
-
var _useState11 = (0, _react.useState)([]),
|
|
89
|
-
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
90
|
-
factoriesArr = _useState12[0],
|
|
91
|
-
setFactoriesArr = _useState12[1];
|
|
83
|
+
var _useApiWithDashboardQ = (0, _useApiWithDashboardQuery.useApiWithDashboardQuery)(endPoint, requestParams),
|
|
84
|
+
_useApiWithDashboardQ2 = (0, _slicedToArray2.default)(_useApiWithDashboardQ, 3),
|
|
85
|
+
response = _useApiWithDashboardQ2[0],
|
|
86
|
+
isLoading = _useApiWithDashboardQ2[1],
|
|
87
|
+
Error = _useApiWithDashboardQ2[2];
|
|
92
88
|
|
|
93
|
-
|
|
94
|
-
if (response && !Error) {
|
|
95
|
-
setFactoriesArr(response.data.factoriesArr);
|
|
96
|
-
}
|
|
97
|
-
}, [response]);
|
|
89
|
+
var factoriesArr = response === null || response === void 0 ? void 0 : response.data;
|
|
98
90
|
(0, _react.useEffect)(function () {
|
|
99
91
|
var optionsInit = [{
|
|
100
92
|
label: "Most Polluting ".concat(title),
|
|
@@ -110,19 +102,23 @@ var Factories = function Factories(_ref) {
|
|
|
110
102
|
setOrder(optionsInit[0]);
|
|
111
103
|
}, [title]);
|
|
112
104
|
(0, _react.useEffect)(function () {
|
|
105
|
+
if (!factoriesArr) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
113
109
|
var data = factoriesArr.slice(); //select order items by
|
|
114
110
|
|
|
115
111
|
if (order.value === 'pollute') {
|
|
116
112
|
data = data.sort(function (a, b) {
|
|
117
|
-
return a.
|
|
113
|
+
return a.pollution.type_distribution.clear - b.pollution.type_distribution.clear;
|
|
118
114
|
});
|
|
119
115
|
} else if (order.value === 'clean') {
|
|
120
116
|
data = data.sort(function (a, b) {
|
|
121
|
-
return b.
|
|
117
|
+
return b.pollution.type_distribution.clear - a.pollution.type_distribution.clear;
|
|
122
118
|
});
|
|
123
119
|
} else if (order.value === 'improve') {
|
|
124
120
|
data = data.sort(function (a, b) {
|
|
125
|
-
return b.
|
|
121
|
+
return b.pollution.polluted_percent_change - a.pollution.polluted_percent_change;
|
|
126
122
|
});
|
|
127
123
|
}
|
|
128
124
|
|
|
@@ -163,7 +159,7 @@ var Factories = function Factories(_ref) {
|
|
|
163
159
|
})), /*#__PURE__*/_react.default.createElement(_styles.GridBoxContainer, null, showedFactoriesArr.map(function (factory, index) {
|
|
164
160
|
return /*#__PURE__*/_react.default.createElement(_FactoryBox.FactoryBox, {
|
|
165
161
|
others: others,
|
|
166
|
-
key: "".concat(factory.
|
|
162
|
+
key: "".concat(factory.site_name, "-").concat(index),
|
|
167
163
|
factory: factory
|
|
168
164
|
});
|
|
169
165
|
})), isShowMoreEnabled && /*#__PURE__*/_react.default.createElement(_ShowMore.ShowMore, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/Users/adam/clients/kando/kando-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -18,76 +18,48 @@ var _styles = require("./styles");
|
|
|
18
18
|
var FactoryBox = function FactoryBox(_ref) {
|
|
19
19
|
var factory = _ref.factory,
|
|
20
20
|
others = _ref.others;
|
|
21
|
-
var up = factory.
|
|
21
|
+
var up = factory.pollution.polluted_percent_change >= 0;
|
|
22
22
|
return /*#__PURE__*/_react.default.createElement(_styles.Box, {
|
|
23
23
|
up: up
|
|
24
24
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
25
25
|
className: "top",
|
|
26
|
-
"data-text": factory.
|
|
26
|
+
"data-text": factory.site_name
|
|
27
27
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
28
28
|
className: "title",
|
|
29
|
-
"data-text": factory.
|
|
30
|
-
}, factory.
|
|
29
|
+
"data-text": factory.site_name
|
|
30
|
+
}, factory.site_name), /*#__PURE__*/_react.default.createElement("div", {
|
|
31
31
|
className: "area",
|
|
32
|
-
"data-text": factory.
|
|
33
|
-
}, factory.
|
|
32
|
+
"data-text": factory.area_name
|
|
33
|
+
}, factory.area_name)), /*#__PURE__*/_react.default.createElement("div", {
|
|
34
34
|
className: "content"
|
|
35
35
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
36
36
|
className: "details"
|
|
37
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
+
}, factory.sector_icon_name && /*#__PURE__*/_react.default.createElement("div", {
|
|
38
38
|
className: "sector"
|
|
39
39
|
}, !others && /*#__PURE__*/_react.default.createElement("div", {
|
|
40
40
|
className: "image"
|
|
41
|
-
},
|
|
41
|
+
}, factory.sector_icon_name), /*#__PURE__*/_react.default.createElement("div", {
|
|
42
42
|
className: "text"
|
|
43
43
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
44
44
|
className: "title"
|
|
45
45
|
}, "Sector"), /*#__PURE__*/_react.default.createElement("div", {
|
|
46
46
|
className: "sector-type"
|
|
47
|
-
},
|
|
47
|
+
}, factory.sector_icon_name))), /*#__PURE__*/_react.default.createElement("div", {
|
|
48
48
|
className: "percent"
|
|
49
49
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
50
50
|
className: "number"
|
|
51
|
-
}, Math.abs(factory.
|
|
51
|
+
}, Math.abs(factory.pollution.polluted_percent_change), "%", ' '), /*#__PURE__*/_react.default.createElement(_assets.Arrow, {
|
|
52
52
|
fill: up ? '#1db232' : '#f6004f',
|
|
53
53
|
height: "10px",
|
|
54
54
|
width: "11px",
|
|
55
|
-
|
|
55
|
+
style: {
|
|
56
|
+
verticalAlign: 'middle'
|
|
57
|
+
}
|
|
56
58
|
}), ' ', /*#__PURE__*/_react.default.createElement("br", null), up ? 'Improvement' : 'Decline')), /*#__PURE__*/_react.default.createElement("div", {
|
|
57
59
|
className: "chart"
|
|
58
60
|
}, /*#__PURE__*/_react.default.createElement(_PieChart.PieChart, {
|
|
59
|
-
quality: factory.
|
|
61
|
+
quality: factory.pollution.type_distribution
|
|
60
62
|
}))));
|
|
61
63
|
};
|
|
62
64
|
|
|
63
|
-
exports.FactoryBox = FactoryBox;
|
|
64
|
-
var sector = {
|
|
65
|
-
shop: {
|
|
66
|
-
title: 'Shopping malls, restaurants',
|
|
67
|
-
img: /*#__PURE__*/_react.default.createElement(_assets.ShopSvg, {
|
|
68
|
-
width: "33px",
|
|
69
|
-
height: "29px"
|
|
70
|
-
})
|
|
71
|
-
},
|
|
72
|
-
metal: {
|
|
73
|
-
title: 'Metal Fabrication',
|
|
74
|
-
img: /*#__PURE__*/_react.default.createElement(_assets.MetalSvg, {
|
|
75
|
-
width: "28px",
|
|
76
|
-
height: "28px"
|
|
77
|
-
})
|
|
78
|
-
},
|
|
79
|
-
leather: {
|
|
80
|
-
title: 'Leather factory',
|
|
81
|
-
img: /*#__PURE__*/_react.default.createElement(_assets.LeatherSvg, {
|
|
82
|
-
width: "25px",
|
|
83
|
-
height: "29px"
|
|
84
|
-
})
|
|
85
|
-
},
|
|
86
|
-
gas: {
|
|
87
|
-
title: 'Gas & Liquids',
|
|
88
|
-
img: /*#__PURE__*/_react.default.createElement(_assets.GasSvg, {
|
|
89
|
-
width: "32px",
|
|
90
|
-
height: "29px"
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
};
|
|
65
|
+
exports.FactoryBox = FactoryBox;
|
package/lib/DashboardV2/UtilityDashboard/MostPolluting/Factories/FactoryBox/PieChart/PieChart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/Users/adam/clients/kando/kando-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -93,7 +93,7 @@ var PieChart = function PieChart(_ref) {
|
|
|
93
93
|
y: quality.medium
|
|
94
94
|
}, {
|
|
95
95
|
name: 'Clear',
|
|
96
|
-
y: quality.
|
|
96
|
+
y: quality.clear
|
|
97
97
|
}]
|
|
98
98
|
}],
|
|
99
99
|
legend: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/Users/adam/clients/kando/kando-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|