@kando-env/kando-ui 1.0.5 → 1.0.6
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 +13 -7
- package/lib/CovidView/views/components/MapStyle.scss +7 -30
- package/lib/CovidView/views/components/Sidebar.js +22 -4
- package/lib/CovidView/views/components/SummaryStyle.scss +1 -1
- package/lib/CovidView/views/components/TrendGraphNVL/TrendGraphNVL.js +176 -0
- package/lib/CovidView/views/components/TrendGraphNVL/index.js +13 -0
- package/lib/CovidView/views/components/TrendGraphNVL/styles.scss +20 -0
- package/lib/CovidView/views/components/{areas/TrendPopupContent → TrendPopupContent}/TrendPopupContent.js +35 -23
- package/lib/CovidView/views/components/areas/Area.js +74 -64
- package/lib/CovidView/views/components/areas/AreaPolygonWBE.js +37 -13
- package/lib/CovidView/views/components/areas/AreasList.js +11 -11
- package/lib/CovidView/views/components/areas/AreasStyle.scss +76 -1
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/AreaBox/AreaBox.js +7 -3
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/AreaBox/styles.js +3 -3
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/styles.js +1 -1
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Factories/FactoryBox/styles.js +1 -1
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Factories/styles.js +1 -1
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/Tabs.js +2 -2
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/MostSevereEvents.scss +6 -3
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/SevereEvent/SevereEvent.scss +193 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/MostCommon/styles.js +1 -1
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/PieChart/PieChart.js +117 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/QualitySummary.js +4 -34
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/styles.js +3 -3
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/TopBar.js +1 -1
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/styles.js +1 -1
- package/lib/EventsView/views/components/UtilityDashboard/UtilityDashboard.js +1 -1
- package/lib/EventsView/views/components/events/event_info/EventInfo.js +3 -5
- package/lib/EventsView/views/components/map/FloatingGraph.js +12 -18
- package/lib/EventsView/views/components/map/Map.js +5 -3
- package/lib/EventsView/views/components/map/floatingGraphStyle.scss +54 -0
- package/lib/EventsView/views/components/map/mapStyle.scss +7 -29
- package/lib/EventsView/views/components/points/PointMarker.js +16 -15
- package/lib/shared/components/KandoModal/KandoModal.js +9 -6
- package/lib/shared/redux/global/actions.js +5 -0
- package/package.json +1 -1
- /package/lib/CovidView/views/components/{areas/TrendPopupContent → TrendPopupContent}/index.js +0 -0
- /package/lib/CovidView/views/components/{areas/TrendPopupContent → TrendPopupContent}/styles.scss +0 -0
|
@@ -166,3 +166,196 @@
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
+
|
|
170
|
+
@media (max-width: 470px) {
|
|
171
|
+
.severe-event {
|
|
172
|
+
height: 100%;
|
|
173
|
+
width: 100%;
|
|
174
|
+
// box-shadow: -0.9px -0.5px 5px 0 rgba(0, 0, 0, 0.06);
|
|
175
|
+
// border: solid 1px #ebebeb;
|
|
176
|
+
|
|
177
|
+
> .top {
|
|
178
|
+
// padding: 2px ;
|
|
179
|
+
background-color: rgba(246, 0, 79, 0.5);
|
|
180
|
+
height: 38px;
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: space-between;
|
|
184
|
+
> .source {
|
|
185
|
+
font-size: 14px;
|
|
186
|
+
font-weight: 300;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
> .discharging {
|
|
190
|
+
font-size: 12px;
|
|
191
|
+
font-weight: 300;
|
|
192
|
+
border-radius: 11px;
|
|
193
|
+
border: solid 1px #f6004f;
|
|
194
|
+
padding: 3px 13px;
|
|
195
|
+
display: flex;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
align-items: center;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@media (max-width: 400px) {
|
|
201
|
+
> .source {
|
|
202
|
+
font-size: 12px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
> .discharging {
|
|
206
|
+
font-size: 10px;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
> .content {
|
|
212
|
+
height: calc(100% - 38px);
|
|
213
|
+
position: relative;
|
|
214
|
+
padding: 0 22px;
|
|
215
|
+
.type-title {
|
|
216
|
+
font-size: 14px;
|
|
217
|
+
font-weight: 300;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.w-50 {
|
|
221
|
+
width: 50%;
|
|
222
|
+
}
|
|
223
|
+
> .damage {
|
|
224
|
+
height: unset;
|
|
225
|
+
border-bottom: 1px solid #ebebeb;
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
@media (max-width: 400px) {
|
|
229
|
+
display: unset;
|
|
230
|
+
text-align: left;
|
|
231
|
+
|
|
232
|
+
> .icons {
|
|
233
|
+
display: block;
|
|
234
|
+
align-items: unset;
|
|
235
|
+
padding-left: 0px;
|
|
236
|
+
padding-top: 5px;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
> .icons {
|
|
240
|
+
display: flex;
|
|
241
|
+
align-items: center;
|
|
242
|
+
padding-left: 12px;
|
|
243
|
+
> .svg-holder {
|
|
244
|
+
visibility: hidden;
|
|
245
|
+
&.on {
|
|
246
|
+
visibility: visible;
|
|
247
|
+
}
|
|
248
|
+
margin-right: 23px;
|
|
249
|
+
&:not(:first-child) {
|
|
250
|
+
border-left: 1px solid #d5d5d5;
|
|
251
|
+
padding-left: 23px;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
> .seen {
|
|
258
|
+
height: unset;
|
|
259
|
+
border-bottom: 1px solid #ebebeb;
|
|
260
|
+
|
|
261
|
+
padding: 20px 0;
|
|
262
|
+
> .details {
|
|
263
|
+
display: flex;
|
|
264
|
+
// align-items: center;
|
|
265
|
+
text-align: left;
|
|
266
|
+
flex-direction: column;
|
|
267
|
+
|
|
268
|
+
> .first {
|
|
269
|
+
margin-right: 0;
|
|
270
|
+
}
|
|
271
|
+
> .first,
|
|
272
|
+
> .last {
|
|
273
|
+
width: 100%;
|
|
274
|
+
> .addr,
|
|
275
|
+
.date {
|
|
276
|
+
font-size: 14px;
|
|
277
|
+
font-weight: 600;
|
|
278
|
+
line-height: 1.29;
|
|
279
|
+
letter-spacing: 0.35px;
|
|
280
|
+
text-overflow: ellipsis;
|
|
281
|
+
white-space: nowrap;
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
padding-right: 8px;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
> .date {
|
|
287
|
+
font-size: 12px;
|
|
288
|
+
margin-bottom: 18px;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
> .total-time {
|
|
294
|
+
display: flex;
|
|
295
|
+
> .time {
|
|
296
|
+
margin-left: 5px;
|
|
297
|
+
font-size: 14px;
|
|
298
|
+
font-weight: 600;
|
|
299
|
+
font-stretch: normal;
|
|
300
|
+
font-style: normal;
|
|
301
|
+
line-height: 1.29;
|
|
302
|
+
letter-spacing: 0.35px;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
> .eta-wwtp {
|
|
308
|
+
padding: 25px 0 52px 0;
|
|
309
|
+
> .info {
|
|
310
|
+
display: grid;
|
|
311
|
+
grid-template-columns: 1fr 1fr;
|
|
312
|
+
align-items: baseline;
|
|
313
|
+
grid-gap: 20px;
|
|
314
|
+
justify-content: space-between;
|
|
315
|
+
> .date {
|
|
316
|
+
font-size: 12px;
|
|
317
|
+
line-height: 1.29;
|
|
318
|
+
letter-spacing: 0.35px;
|
|
319
|
+
font-weight: 600;
|
|
320
|
+
|
|
321
|
+
> .time {
|
|
322
|
+
font-weight: 300;
|
|
323
|
+
color: #f6004f;
|
|
324
|
+
font: 'Myriad';
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
> .more {
|
|
328
|
+
font-size: 12px;
|
|
329
|
+
font-weight: 300;
|
|
330
|
+
line-height: 1.29;
|
|
331
|
+
letter-spacing: 0.35px;
|
|
332
|
+
color: #1d1d1d;
|
|
333
|
+
text-decoration: underline;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
> .msg {
|
|
339
|
+
display: none;
|
|
340
|
+
|
|
341
|
+
&.on {
|
|
342
|
+
display: flex;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
position: absolute;
|
|
346
|
+
padding: 9px 25px 9px 20px;
|
|
347
|
+
bottom: 0;
|
|
348
|
+
left: 0;
|
|
349
|
+
height: 32px;
|
|
350
|
+
width: 100%;
|
|
351
|
+
font-size: 14px;
|
|
352
|
+
font-weight: 300;
|
|
353
|
+
align-items: center;
|
|
354
|
+
background-color: rgba(244, 244, 244, 0.5);
|
|
355
|
+
> svg {
|
|
356
|
+
margin-right: 5px;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
@@ -27,7 +27,7 @@ exports.Container = Container;
|
|
|
27
27
|
var ComingSoon = _styledComponents.default.div.withConfig({
|
|
28
28
|
displayName: "styles__ComingSoon",
|
|
29
29
|
componentId: "sc-3jnmk3-1"
|
|
30
|
-
})(["position:absolute;left:
|
|
30
|
+
})(["position:absolute;left:1px;top:38px;width:calc( 100% - 2px );height:calc( 100% - 40px );display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:2;background-color:rgba(255,255,255,0.9);font-size:18px;font-weight:600;line-height:1.22;color:#1d1d1d;>svg{margin-bottom:15px;}"]);
|
|
31
31
|
|
|
32
32
|
exports.ComingSoon = ComingSoon;
|
|
33
33
|
|
package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/PieChart/PieChart.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.PieChart = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _highcharts = _interopRequireDefault(require("highcharts"));
|
|
15
|
+
|
|
16
|
+
var _highchartsReactOfficial = _interopRequireDefault(require("highcharts-react-official"));
|
|
17
|
+
|
|
18
|
+
var _highchartsMore = _interopRequireDefault(require("highcharts/highcharts-more"));
|
|
19
|
+
|
|
20
|
+
(0, _highchartsMore.default)(_highcharts.default); // impo
|
|
21
|
+
|
|
22
|
+
var PieChart = function PieChart(_ref) {
|
|
23
|
+
(0, _objectDestructuringEmpty2.default)(_ref);
|
|
24
|
+
var config = {
|
|
25
|
+
credits: {
|
|
26
|
+
enabled: false
|
|
27
|
+
},
|
|
28
|
+
tooltip: {
|
|
29
|
+
enabled: false
|
|
30
|
+
},
|
|
31
|
+
chart: {
|
|
32
|
+
type: 'pie',
|
|
33
|
+
// margin: [22, 22, 22, 22],
|
|
34
|
+
marginBottom: 30 // spacingTop: 20,
|
|
35
|
+
// spacingBottom: 20,
|
|
36
|
+
// spacingLeft: 20,
|
|
37
|
+
// spacingRight: 20,
|
|
38
|
+
|
|
39
|
+
},
|
|
40
|
+
title: {
|
|
41
|
+
text: '<span style="font-size:20px;font-weight:700;">75%</span> <br> Clear',
|
|
42
|
+
align: 'center',
|
|
43
|
+
verticalAlign: 'middle',
|
|
44
|
+
y: -5,
|
|
45
|
+
style: {
|
|
46
|
+
fontSize: '14px'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
subtitle: {
|
|
50
|
+
text: "75%",
|
|
51
|
+
style: {
|
|
52
|
+
fontSize: '14px',
|
|
53
|
+
fontWeight: 700,
|
|
54
|
+
color: '#1d1d1d'
|
|
55
|
+
},
|
|
56
|
+
align: 'center',
|
|
57
|
+
verticalAlign: 'middle',
|
|
58
|
+
y: 10
|
|
59
|
+
},
|
|
60
|
+
legend: {
|
|
61
|
+
style: {
|
|
62
|
+
fontSize: "10px",
|
|
63
|
+
fontWeight: 300
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
plotOptions: {
|
|
67
|
+
series: {
|
|
68
|
+
enableMouseTracking: false,
|
|
69
|
+
states: {
|
|
70
|
+
hover: {
|
|
71
|
+
enabled: false
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
pie: {
|
|
76
|
+
allowPointSelect: false,
|
|
77
|
+
dataLabels: {
|
|
78
|
+
enabled: false
|
|
79
|
+
},
|
|
80
|
+
point: {
|
|
81
|
+
events: {
|
|
82
|
+
enabled: false,
|
|
83
|
+
legendItemClick: function legendItemClick() {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
// showInLegend: true,
|
|
89
|
+
// borderWidth: 0,
|
|
90
|
+
colors: ['#1db232', '#1d1d1d']
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
series: [{
|
|
94
|
+
animation: false,
|
|
95
|
+
innerSize: '85%',
|
|
96
|
+
data: [{
|
|
97
|
+
name: 'Clear',
|
|
98
|
+
y: 75
|
|
99
|
+
}, {
|
|
100
|
+
name: 'Pollution',
|
|
101
|
+
y: 25
|
|
102
|
+
}]
|
|
103
|
+
}]
|
|
104
|
+
};
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(_highchartsReactOfficial.default, {
|
|
106
|
+
highcharts: _highcharts.default,
|
|
107
|
+
options: config,
|
|
108
|
+
containerProps: {
|
|
109
|
+
style: {
|
|
110
|
+
height: '100%',
|
|
111
|
+
width: '100%'
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
exports.PieChart = PieChart;
|
package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/QualitySummary.js
CHANGED
|
@@ -9,10 +9,10 @@ exports.QualitySummary = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var _downArrow = require("./assets/down-arrow.svg");
|
|
13
|
-
|
|
14
12
|
var _PollutedLine = require("./PollutedLine/PollutedLine");
|
|
15
13
|
|
|
14
|
+
var _PieChart = require("./PieChart/PieChart");
|
|
15
|
+
|
|
16
16
|
var _styles = require("./styles");
|
|
17
17
|
|
|
18
18
|
var QualitySummary = function QualitySummary(_ref) {
|
|
@@ -24,39 +24,9 @@ var QualitySummary = function QualitySummary(_ref) {
|
|
|
24
24
|
total = _summary$polluted.total;
|
|
25
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, {
|
|
26
26
|
className: "first"
|
|
27
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.
|
|
28
|
-
color: "#1db232",
|
|
29
|
-
up: false,
|
|
30
|
-
className: "bg-grey"
|
|
31
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
-
className: "top"
|
|
33
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
-
className: "title"
|
|
35
|
-
}, "Clear"), /*#__PURE__*/_react.default.createElement("div", {
|
|
36
|
-
className: "percent"
|
|
37
|
-
}, summary.clear.increasePercent, "%"), /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
-
className: "subtitle"
|
|
39
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
-
className: "up"
|
|
41
|
-
}, /*#__PURE__*/_react.default.createElement(_downArrow.ReactComponent, {
|
|
42
|
-
fill: summary.clear.up ? '#1db232' : '#f6004f',
|
|
43
|
-
height: "10px",
|
|
44
|
-
width: "9px"
|
|
45
|
-
}), summary.clear.increasePercent, "%"), /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
-
className: "down"
|
|
47
|
-
}, "decline"))))), /*#__PURE__*/_react.default.createElement(_styles.CardsHolder, {
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_PieChart.PieChart, null)), /*#__PURE__*/_react.default.createElement(_styles.CardsHolder, {
|
|
48
28
|
className: "second"
|
|
49
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.
|
|
50
|
-
color: "#1d1d1d",
|
|
51
|
-
up: true,
|
|
52
|
-
className: "bg-grey"
|
|
53
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
-
className: "top"
|
|
55
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
-
className: "title"
|
|
57
|
-
}, "Polluted"), /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
-
className: "percent"
|
|
59
|
-
}, total, "%"))), /*#__PURE__*/_react.default.createElement(_styles.PercentLineBarsHolder, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.PercentLineBarsHolder, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
60
30
|
className: "loader-holder"
|
|
61
31
|
}, /*#__PURE__*/_react.default.createElement(_PollutedLine.PollutedLine, {
|
|
62
32
|
color: "#f6004f",
|
|
@@ -20,7 +20,7 @@ var _styles = require("../styles");
|
|
|
20
20
|
var Container = _styledComponents.default.div.withConfig({
|
|
21
21
|
displayName: "styles__Container",
|
|
22
22
|
componentId: "sc-e271h4-0"
|
|
23
|
-
})(["@media (max-width:1200px){grid-area:summary;height:100%;}"]);
|
|
23
|
+
})(["@media (max-width:1200px){grid-area:summary;height:100%;}@media (max-width:500px){display:none;}"]);
|
|
24
24
|
|
|
25
25
|
exports.Container = Container;
|
|
26
26
|
|
|
@@ -34,14 +34,14 @@ exports.CardsHolder = CardsHolder;
|
|
|
34
34
|
var Content = _styledComponents.default.div.withConfig({
|
|
35
35
|
displayName: "styles__Content",
|
|
36
36
|
componentId: "sc-e271h4-2"
|
|
37
|
-
})(["display:flex;height:calc(100% - 37px);.first{
|
|
37
|
+
})(["display:flex;height:calc(100% - 37px);.first{width:33%}.second{width:67%;}"]);
|
|
38
38
|
|
|
39
39
|
exports.Content = Content;
|
|
40
40
|
|
|
41
41
|
var Card = _styledComponents.default.div.withConfig({
|
|
42
42
|
displayName: "styles__Card",
|
|
43
43
|
componentId: "sc-e271h4-3"
|
|
44
|
-
})(["text-align:center;display:flex;justify-content:center;align-items:center;flex:1;&.bg-grey{background-color:#f4f4f4;}> .top{position:relative;> .title{font-size:14px;font-weight:600;}> .percent{font-size:48px;font-weight:800;color:", ";@media (min-width:1200px){@media (max-width:1700px){font-size:40px;@media (max-width:1450px){font-size:35px;@media (max-width:1200px){font-size:30px;}}}}}> .subtitle{position:absolute;font-size:14px;font-weight:300;display:flex;justify-content:center;align-items:center;bottom:-25px;left:50%;transform:translateX(-50%);color:", ";> .up{margin-right:4px;display:flex;justify-content:center;align-items:center;> svg{margin-right:2px;transform:rotate(", ");}}
|
|
44
|
+
})(["text-align:center;display:flex;justify-content:center;align-items:center;flex:1;&.bg-grey{background-color:#f4f4f4;}> .top{position:relative;> .title{font-size:14px;font-weight:600;}> .percent{font-size:48px;font-weight:800;color:", ";@media (min-width:1200px){@media (max-width:1700px){font-size:40px;@media (max-width:1450px){font-size:35px;@media (max-width:1200px){font-size:30px;}}}}}> .subtitle{position:absolute;font-size:14px;font-weight:300;display:flex;justify-content:center;align-items:center;bottom:-25px;left:50%;transform:translateX(-50%);color:", ";> .up{margin-right:4px;display:flex;justify-content:center;align-items:center;> svg{margin-right:2px;transform:rotate(", ");}}}}"], function (_ref) {
|
|
45
45
|
var color = _ref.color;
|
|
46
46
|
return color;
|
|
47
47
|
}, function (_ref2) {
|
|
@@ -24,7 +24,7 @@ var _useApi3 = require("../../../../../shared/utilities/custom_hooks/useApi");
|
|
|
24
24
|
var Container = _styledComponents.default.div.withConfig({
|
|
25
25
|
displayName: "TopBar__Container",
|
|
26
26
|
componentId: "sc-5uivzb-0"
|
|
27
|
-
})(["display:grid;grid-template-columns:1fr 2fr 1fr;grid-gap:25px
|
|
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 ';}"]);
|
|
28
28
|
|
|
29
29
|
var TopBar = function TopBar() {
|
|
30
30
|
var endPoint = '/summary';
|
|
@@ -12,6 +12,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
12
12
|
var BoxTitle = _styledComponents.default.div.withConfig({
|
|
13
13
|
displayName: "styles__BoxTitle",
|
|
14
14
|
componentId: "sc-qoak0r-0"
|
|
15
|
-
})(["font-family:Gilroy;font-size:24px;line-height:0.92;color:#1d1d1d;font-weight:normal;margin-bottom:14px;@media (min-width:1200px){@media (max-width:1450px){font-size:20px;@media (max-width:1250px){font-size:16px;}}}"]);
|
|
15
|
+
})(["font-family:Gilroy;font-size:24px;line-height:0.92;color:#1d1d1d;font-weight:normal;margin-bottom:14px;@media (min-width:1200px){@media (max-width:1450px){font-size:20px;@media (max-width:1250px){font-size:16px;}}}@media (max-width:400px){font-size:16px;}"]);
|
|
16
16
|
|
|
17
17
|
exports.BoxTitle = BoxTitle;
|
|
@@ -20,7 +20,7 @@ var _TopBar = require("./TopBar/TopBar");
|
|
|
20
20
|
var Container = _styledComponents.default.div.withConfig({
|
|
21
21
|
displayName: "UtilityDashboard__Container",
|
|
22
22
|
componentId: "sc-1aaqwhc-0"
|
|
23
|
-
})(["padding:50px 30px
|
|
23
|
+
})(["padding:50px 30px;width:100%;overflow:hidden;@media (max-width:768px){padding:25px 5px;}> .title{font-family:Gilroy;font-size:36px;font-weight:700;line-height:0.61;color:#1d1d1d;margin-bottom:25px;}> .top-bar{margin-bottom:45px;}> .most-polluting{margin-bottom:45px;}"]);
|
|
24
24
|
|
|
25
25
|
var UtilityDashboard = function UtilityDashboard() {
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -35,8 +35,6 @@ require("./EventInfoStyle.scss");
|
|
|
35
35
|
|
|
36
36
|
var _actions2 = require("../../../../../shared/redux/global/actions");
|
|
37
37
|
|
|
38
|
-
var _FloatingGraph = _interopRequireDefault(require("../../map/FloatingGraph"));
|
|
39
|
-
|
|
40
38
|
var _reactRouterDom = require("react-router-dom");
|
|
41
39
|
|
|
42
40
|
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); }
|
|
@@ -91,7 +89,7 @@ var EventInfo = function EventInfo(props) {
|
|
|
91
89
|
dispatch((0, _actions.setFocusedEventPaths)([]));
|
|
92
90
|
dispatch((0, _actions.setEventIndicator)(null));
|
|
93
91
|
dispatch((0, _actions2.setCurrentTime)(Date.now() / 1000 | 0));
|
|
94
|
-
dispatch((0, _actions2.
|
|
92
|
+
dispatch((0, _actions2.closeFloatingGraph)());
|
|
95
93
|
removeObjectsFromMap();
|
|
96
94
|
history.push("/".concat(nav_context_data.navContext.name, "/index?water_authority_id=").concat(global_data.waterAuthorityId, "&locale=").concat(nav_context_data.navContext.locale, "&valuesFromKQL=").concat(global_data.eventFilterParam));
|
|
97
95
|
};
|
|
@@ -105,7 +103,7 @@ var EventInfo = function EventInfo(props) {
|
|
|
105
103
|
if (selectedSource === null && event.sources.length !== 0) {
|
|
106
104
|
toggleSourceSelection(event.sources[0].point_id);
|
|
107
105
|
}
|
|
108
|
-
}, [props.points_data, props.events_data, event]);
|
|
106
|
+
}, [props.points_data, props.events_data, event, global_data.floatingGraph.open]);
|
|
109
107
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
110
108
|
className: "back_button_container"
|
|
111
109
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
@@ -128,7 +126,7 @@ var EventInfo = function EventInfo(props) {
|
|
|
128
126
|
toggleSourceSelection: toggleSourceSelection,
|
|
129
127
|
points: points_data,
|
|
130
128
|
focusedEvent: event
|
|
131
|
-
})
|
|
129
|
+
}))));
|
|
132
130
|
};
|
|
133
131
|
|
|
134
132
|
var connector = (0, _reactRedux.connect)(mapStateToProps);
|
|
@@ -11,13 +11,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _reactRedux = require("react-redux");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _actions = require("@/shared/redux/global/actions");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _Graph = _interopRequireDefault(require("@/shared/components/Graph"));
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _Graph = _interopRequireDefault(require("../../../../shared/components/Graph"));
|
|
18
|
+
require("./floatingGraphStyle.scss");
|
|
21
19
|
|
|
22
20
|
function mapStateToProps(state) {
|
|
23
21
|
var global_data = state.global_data,
|
|
@@ -32,8 +30,8 @@ var FloatingGraph = function FloatingGraph(props) {
|
|
|
32
30
|
var global_data = props.global_data;
|
|
33
31
|
var focusedEvent = props.events_data.focusedEvent;
|
|
34
32
|
var observation = global_data.floatingGraph.observation;
|
|
35
|
-
var dispatch = (0, _reactRedux.useDispatch)();
|
|
36
33
|
var graphTitle = global_data.floatingGraph.point.group.name;
|
|
34
|
+
var dispatch = (0, _reactRedux.useDispatch)();
|
|
37
35
|
|
|
38
36
|
var matchGraph = function matchGraph() {
|
|
39
37
|
if (observation === null) {
|
|
@@ -58,22 +56,18 @@ var FloatingGraph = function FloatingGraph(props) {
|
|
|
58
56
|
plotTo: observation.last_seen_time
|
|
59
57
|
});
|
|
60
58
|
}
|
|
61
|
-
};
|
|
62
|
-
// <ReactModal isOpen={global_data.floatingGraph.open} className={"floating-graph"} left={450} initWidth={"calc(100vw - 450px)"} top={"calc(100vh - 458px)"}>
|
|
59
|
+
};
|
|
63
60
|
|
|
61
|
+
var closeGraph = function closeGraph() {
|
|
62
|
+
dispatch((0, _actions.closeFloatingGraph)());
|
|
63
|
+
};
|
|
64
64
|
|
|
65
65
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
-
className:
|
|
66
|
+
className: "floating-graph"
|
|
67
67
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
-
className:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
onClick: function onClick() {
|
|
72
|
-
dispatch((0, _actions.openFloatingGraph)(false, null, null));
|
|
73
|
-
}
|
|
74
|
-
}, /*#__PURE__*/_react.default.createElement(_reactFontawesome.FontAwesomeIcon, {
|
|
75
|
-
icon: _freeSolidSvgIcons.faTimes
|
|
76
|
-
}))), matchGraph()); // </ReactModal>
|
|
68
|
+
className: "floating-graph__close",
|
|
69
|
+
onClick: closeGraph
|
|
70
|
+
}, "\xA0"), matchGraph());
|
|
77
71
|
};
|
|
78
72
|
|
|
79
73
|
var connector = (0, _reactRedux.connect)(mapStateToProps);
|
|
@@ -17,7 +17,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
|
|
18
18
|
var _reactRedux = require("react-redux");
|
|
19
19
|
|
|
20
|
-
require("./mapStyle
|
|
20
|
+
require("./mapStyle");
|
|
21
21
|
|
|
22
22
|
var _AreaPolygons = require("../areas/AreaPolygons");
|
|
23
23
|
|
|
@@ -41,6 +41,8 @@ var _ErrorBoundary = _interopRequireDefault(require("../../../../shared/utilitie
|
|
|
41
41
|
|
|
42
42
|
var _Edges = _interopRequireDefault(require("../edges/Edges"));
|
|
43
43
|
|
|
44
|
+
var _FloatingGraph = _interopRequireDefault(require("../../../../EventsView/views/components/map/FloatingGraph"));
|
|
45
|
+
|
|
44
46
|
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); }
|
|
45
47
|
|
|
46
48
|
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; }
|
|
@@ -142,9 +144,9 @@ var Map = function Map(props) {
|
|
|
142
144
|
map: mapRef.current,
|
|
143
145
|
L: _leaflet.default,
|
|
144
146
|
points: props.points_data.items
|
|
145
|
-
}))), /*#__PURE__*/_react.default.createElement(_ErrorBoundary.default, null, focusedEvent !== null && /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
+
}), global_data.floatingGraph.open ? /*#__PURE__*/_react.default.createElement(_FloatingGraph.default, null) : ''), /*#__PURE__*/_react.default.createElement(_ErrorBoundary.default, null, focusedEvent !== null && /*#__PURE__*/_react.default.createElement("div", {
|
|
146
148
|
className: "event-timerange"
|
|
147
|
-
}, /*#__PURE__*/_react.default.createElement(_EventTimeRange.default, null))), focusedEvent !== null && /*#__PURE__*/_react.default.createElement(_ErrorBoundary.default, null, /*#__PURE__*/_react.default.createElement(_EventPath.default, {
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement(_EventTimeRange.default, null)))), focusedEvent !== null && /*#__PURE__*/_react.default.createElement(_ErrorBoundary.default, null, /*#__PURE__*/_react.default.createElement(_EventPath.default, {
|
|
148
150
|
event: focusedEvent,
|
|
149
151
|
focusedEvent: focusedEvent
|
|
150
152
|
}), focusedEventPaths.length !== 0 && /*#__PURE__*/_react.default.createElement(_EventIndicator.default, {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.floating-graph {
|
|
2
|
+
position: absolute;
|
|
3
|
+
background: white;
|
|
4
|
+
right: 0;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
padding: 20px;
|
|
7
|
+
z-index: 9999;
|
|
8
|
+
width: 100%;
|
|
9
|
+
min-height: 350px;
|
|
10
|
+
box-shadow: 0px -2px 13px #cfcfcfaa;
|
|
11
|
+
|
|
12
|
+
&__close {
|
|
13
|
+
border: 1px solid #ddd;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
float: right;
|
|
16
|
+
margin: 6px;
|
|
17
|
+
}
|
|
18
|
+
&__close {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 0;
|
|
21
|
+
right: 0;
|
|
22
|
+
display: block;
|
|
23
|
+
width: 24px;
|
|
24
|
+
height: 24px;
|
|
25
|
+
font-size: 0;
|
|
26
|
+
}
|
|
27
|
+
&__close:before,
|
|
28
|
+
&__close:after {
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 50%;
|
|
31
|
+
left: 50%;
|
|
32
|
+
width: 3px;
|
|
33
|
+
height: 18px;
|
|
34
|
+
background: #555;
|
|
35
|
+
transform: rotate(45deg) translate(-50%, -50%);
|
|
36
|
+
transform-origin: top left;
|
|
37
|
+
content: '';
|
|
38
|
+
}
|
|
39
|
+
&__close:after {
|
|
40
|
+
transform: rotate(-45deg) translate(-50%, -50%);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.rtls {
|
|
45
|
+
.floating-graph {
|
|
46
|
+
left: 0;
|
|
47
|
+
|
|
48
|
+
&__close {
|
|
49
|
+
float: left;
|
|
50
|
+
left: 0;
|
|
51
|
+
right: unset;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
.event-timerange {
|
|
12
12
|
max-width: 85%!important;
|
|
13
|
-
bottom: .78em!important;
|
|
14
13
|
padding: 13px!important;
|
|
15
14
|
border: 2px solid rgba(0,0,0,.2);
|
|
16
15
|
box-shadow: unset !important;
|
|
16
|
+
z-index: 999;
|
|
17
|
+
bottom: 4.5rem !important;
|
|
18
|
+
left: 5rem !important;
|
|
17
19
|
|
|
18
20
|
.ltrs & {
|
|
19
21
|
left: 3em !important;
|
|
@@ -144,8 +146,9 @@
|
|
|
144
146
|
|
|
145
147
|
.event-timerange {
|
|
146
148
|
position: absolute;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
z-index: 999;
|
|
150
|
+
bottom: 4.5rem !important;
|
|
151
|
+
left: 5rem !important;
|
|
149
152
|
background: white;
|
|
150
153
|
padding: 8.5px;
|
|
151
154
|
border-radius: 3px;
|
|
@@ -260,6 +263,7 @@
|
|
|
260
263
|
.popup-graph-icon {
|
|
261
264
|
position: absolute;
|
|
262
265
|
top: 20px;
|
|
266
|
+
cursor: pointer;
|
|
263
267
|
|
|
264
268
|
.ltrs & {
|
|
265
269
|
right: 18px;
|
|
@@ -359,29 +363,3 @@
|
|
|
359
363
|
cursor: move;
|
|
360
364
|
width: 100% !important;
|
|
361
365
|
}
|
|
362
|
-
|
|
363
|
-
.floating-graph {
|
|
364
|
-
.ltrs & {
|
|
365
|
-
left: 450px !important;
|
|
366
|
-
}
|
|
367
|
-
.rtls & {
|
|
368
|
-
left: 0 !important;
|
|
369
|
-
right: 450px !important;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
&__content {
|
|
373
|
-
padding: 4em 0 0 0;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
&__close {
|
|
377
|
-
position: absolute;
|
|
378
|
-
top: 2px;
|
|
379
|
-
font-size: 20px;
|
|
380
|
-
left: 5px;
|
|
381
|
-
z-index: 9;
|
|
382
|
-
|
|
383
|
-
a {
|
|
384
|
-
color: black !important;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|