@kando-env/kando-ui 1.0.5 → 1.0.7

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.
Files changed (38) hide show
  1. package/lib/CovidView/views/components/Body.js +11 -5
  2. package/lib/CovidView/views/components/MapStyle.scss +7 -30
  3. package/lib/CovidView/views/components/Sidebar.js +22 -4
  4. package/lib/CovidView/views/components/SummaryStyle.scss +1 -1
  5. package/lib/CovidView/views/components/TrendGraphNVL/TrendGraphNVL.js +176 -0
  6. package/lib/CovidView/views/components/TrendGraphNVL/index.js +13 -0
  7. package/lib/CovidView/views/components/TrendGraphNVL/styles.scss +20 -0
  8. package/lib/CovidView/views/components/{areas/TrendPopupContent → TrendPopupContent}/TrendPopupContent.js +36 -24
  9. package/lib/CovidView/views/components/areas/Area.js +74 -64
  10. package/lib/CovidView/views/components/areas/AreaPolygonWBE.js +37 -13
  11. package/lib/CovidView/views/components/areas/AreasList.js +11 -11
  12. package/lib/CovidView/views/components/areas/AreasStyle.scss +76 -1
  13. package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/AreaBox/AreaBox.js +7 -3
  14. package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/AreaBox/styles.js +3 -3
  15. package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/styles.js +1 -1
  16. package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Factories/FactoryBox/styles.js +1 -1
  17. package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Factories/styles.js +1 -1
  18. package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/Tabs.js +2 -2
  19. package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/MostSevereEvents.scss +6 -3
  20. package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/SevereEvent/SevereEvent.scss +193 -0
  21. package/lib/EventsView/views/components/UtilityDashboard/TopBar/MostCommon/styles.js +1 -1
  22. package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/PieChart/PieChart.js +117 -0
  23. package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/QualitySummary.js +4 -34
  24. package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/styles.js +3 -3
  25. package/lib/EventsView/views/components/UtilityDashboard/TopBar/TopBar.js +1 -1
  26. package/lib/EventsView/views/components/UtilityDashboard/TopBar/styles.js +1 -1
  27. package/lib/EventsView/views/components/UtilityDashboard/UtilityDashboard.js +1 -1
  28. package/lib/EventsView/views/components/events/event_info/EventInfo.js +3 -5
  29. package/lib/EventsView/views/components/map/FloatingGraph.js +11 -17
  30. package/lib/EventsView/views/components/map/Map.js +4 -2
  31. package/lib/EventsView/views/components/map/floatingGraphStyle.scss +54 -0
  32. package/lib/EventsView/views/components/map/mapStyle.scss +7 -29
  33. package/lib/EventsView/views/components/points/PointMarker.js +16 -15
  34. package/lib/shared/components/KandoModal/KandoModal.js +9 -6
  35. package/lib/shared/redux/global/actions.js +5 -0
  36. package/package.json +1 -1
  37. /package/lib/CovidView/views/components/{areas/TrendPopupContent → TrendPopupContent}/index.js +0 -0
  38. /package/lib/CovidView/views/components/{areas/TrendPopupContent → TrendPopupContent}/styles.scss +0 -0
@@ -19,39 +19,39 @@ var _useRemoveExistingLayers = _interopRequireWildcard(require("../../../../shar
19
19
 
20
20
  var _i18n = _interopRequireDefault(require("../../../../shared/utilities/i18n"));
21
21
 
22
- var _lineChart = _interopRequireDefault(require("../../../../assets/line-chart.svg"));
22
+ var _lineChart = _interopRequireDefault(require("../../../../assets/images/line-chart.svg"));
23
23
 
24
24
  var _jquery = _interopRequireDefault(require("jquery"));
25
25
 
26
26
  var _actions = require("../../../../shared/redux/global/actions");
27
27
 
28
- var _whitePoint = _interopRequireDefault(require("../../../../assets/white-point.png"));
28
+ var _whitePoint = _interopRequireDefault(require("../../../../assets/images/white-point.png"));
29
29
 
30
- var _whitePinRedShadow = _interopRequireDefault(require("../../../../assets/point_icons/white-pin-red-shadow.png"));
30
+ var _whitePinRedShadow = _interopRequireDefault(require("../../../../assets/images/point_icons/white-pin-red-shadow.png"));
31
31
 
32
- var _whitePinBlackShadow = _interopRequireDefault(require("../../../../assets/point_icons/white-pin-black-shadow.png"));
32
+ var _whitePinBlackShadow = _interopRequireDefault(require("../../../../assets/images/point_icons/white-pin-black-shadow.png"));
33
33
 
34
- var _redPinRedShadow = _interopRequireDefault(require("../../../../assets/point_icons/red-pin-red-shadow.png"));
34
+ var _redPinRedShadow = _interopRequireDefault(require("../../../../assets/images/point_icons/red-pin-red-shadow.png"));
35
35
 
36
- var _yellowCircle = _interopRequireDefault(require("../../../../assets/point_icons/yellow-circle.svg"));
36
+ var _yellowCircle = _interopRequireDefault(require("../../../../assets/images/point_icons/yellow-circle.svg"));
37
37
 
38
- var _brightBlueCircle = _interopRequireDefault(require("../../../../assets/point_icons/bright-blue-circle.svg"));
38
+ var _brightBlueCircle = _interopRequireDefault(require("../../../../assets/images/point_icons/bright-blue-circle.svg"));
39
39
 
40
- var _greenCircle = _interopRequireDefault(require("../../../../assets/point_icons/green-circle.svg"));
40
+ var _greenCircle = _interopRequireDefault(require("../../../../assets/images/point_icons/green-circle.svg"));
41
41
 
42
- var _pinkCircle = _interopRequireDefault(require("../../../../assets/point_icons/pink-circle.svg"));
42
+ var _pinkCircle = _interopRequireDefault(require("../../../../assets/images/point_icons/pink-circle.svg"));
43
43
 
44
- var _blueCircle = _interopRequireDefault(require("../../../../assets/point_icons/blue-circle.svg"));
44
+ var _blueCircle = _interopRequireDefault(require("../../../../assets/images/point_icons/blue-circle.svg"));
45
45
 
46
- var _WWTPIcon = _interopRequireDefault(require("../../../../assets/point_icons/WWTP-icon.svg"));
46
+ var _WWTPIcon = _interopRequireDefault(require("../../../../assets/images/point_icons/WWTP-icon.svg"));
47
47
 
48
- var _factoryIcon = _interopRequireDefault(require("../../../../assets/point_icons/factory-icon.svg"));
48
+ var _factoryIcon = _interopRequireDefault(require("../../../../assets/images/point_icons/factory-icon.svg"));
49
49
 
50
- var _pumpStationIcon = _interopRequireDefault(require("../../../../assets/point_icons/pump-station-icon.svg"));
50
+ var _pumpStationIcon = _interopRequireDefault(require("../../../../assets/images/point_icons/pump-station-icon.svg"));
51
51
 
52
- var _observationIcon = _interopRequireDefault(require("../../../../assets/point_icons/observation-icon.svg"));
52
+ var _observationIcon = _interopRequireDefault(require("../../../../assets/images/point_icons/observation-icon.svg"));
53
53
 
54
- var _samplingIcon = _interopRequireDefault(require("../../../../assets/point_icons/sampling-icon.svg"));
54
+ var _samplingIcon = _interopRequireDefault(require("../../../../assets/images/point_icons/sampling-icon.svg"));
55
55
 
56
56
  var _DamageType = _interopRequireDefault(require("../events/event_info/damage_type/DamageType"));
57
57
 
@@ -377,6 +377,7 @@ var PointMarker = function PointMarker(props) {
377
377
 
378
378
  var attachClickEvent = function attachClickEvent(selector, observation) {
379
379
  (0, _jquery.default)(document.body).on('click', selector, function () {
380
+ dispatch((0, _actions.closeFloatingGraph)());
380
381
  dispatch((0, _actions.openFloatingGraph)(true, observation, point));
381
382
  });
382
383
  };
@@ -13,15 +13,15 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
13
13
 
14
14
  var _react = _interopRequireWildcard(require("react"));
15
15
 
16
- var _reactResponsiveModal = require("react-responsive-modal");
17
-
18
16
  var _lodash = require("lodash");
19
17
 
18
+ var _reactResponsiveModal = require("react-responsive-modal");
19
+
20
20
  require("react-responsive-modal/styles.css");
21
21
 
22
- require("./styles.scss");
22
+ var _useQueryURL = _interopRequireDefault(require("../../../shared/utilities/custom_hooks/useQueryURL"));
23
23
 
24
- var _useQueryURL = _interopRequireDefault(require("../../utilities/custom_hooks/useQueryURL"));
24
+ require("./styles.scss");
25
25
 
26
26
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
27
 
@@ -41,6 +41,8 @@ var KandoModal = function KandoModal(_ref) {
41
41
  openerClass = _ref.openerClass,
42
42
  handleButtonClick = _ref.handleButtonClick;
43
43
 
44
+ var containerRef = _react.default.useRef(null);
45
+
44
46
  var _useState = (0, _react.useState)(isOpen),
45
47
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
46
48
  open = _useState2[0],
@@ -74,7 +76,7 @@ var KandoModal = function KandoModal(_ref) {
74
76
  value = _Object$entries$_i[1];
75
77
 
76
78
  queryURL.set(param, value);
77
- window.history.replaceState({}, '', "".concat(window.location.pathname, "?").concat(queryURL));
79
+ window.history.replaceState({}, '', "".concat(location.pathname, "?").concat(queryURL));
78
80
  }
79
81
  }
80
82
  } // Remove
@@ -88,7 +90,7 @@ var KandoModal = function KandoModal(_ref) {
88
90
  _ = _Object$entries2$_i[1];
89
91
 
90
92
  queryURL.delete(param);
91
- window.history.replaceState({}, '', "".concat(window.location.pathname, "?").concat(queryURL));
93
+ window.history.replaceState({}, '', "".concat(location.pathname, "?").concat(queryURL));
92
94
  }
93
95
  }
94
96
  }
@@ -104,6 +106,7 @@ var KandoModal = function KandoModal(_ref) {
104
106
  return handleClick();
105
107
  }
106
108
  }, buttonLabel), /*#__PURE__*/_react.default.createElement(_reactResponsiveModal.Modal, {
109
+ container: containerRef.current,
107
110
  center: true,
108
111
  open: open,
109
112
  onClose: onCloseModal,
@@ -10,6 +10,7 @@ exports.moreInfo = moreInfo;
10
10
  exports.setWaterAuthority = setWaterAuthority;
11
11
  exports.setCurrentTime = setCurrentTime;
12
12
  exports.openFloatingGraph = openFloatingGraph;
13
+ exports.closeFloatingGraph = closeFloatingGraph;
13
14
  exports.setEventFilterParam = setEventFilterParam;
14
15
  exports.setActiveFilterGlobally = setActiveFilterGlobally;
15
16
 
@@ -76,6 +77,10 @@ function openFloatingGraph(open, observation, point) {
76
77
  };
77
78
  }
78
79
 
80
+ function closeFloatingGraph() {
81
+ return openFloatingGraph(false, null, null);
82
+ }
83
+
79
84
  function setEventFilterParam(param) {
80
85
  return {
81
86
  type: _actionTypes.SET_EVENT_FILTER_PARAM,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kando-env/kando-ui",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "main": "lib/index.js",
5
5
  "author": "Nadav(Private) <nadavk72@gmail.com>",
6
6
  "license": "UNLICENSED",