@kando-env/kando-ui 1.0.3 → 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/SamplingParameters/NoResults/NoResults.js +42 -0
- package/lib/EventsView/views/components/SamplingParameters/NoResults/NoResults.stories.js +26 -0
- package/lib/EventsView/views/components/SamplingParameters/NoResults/discover.svg +66 -0
- package/lib/EventsView/views/components/SamplingParameters/ParametersContainer/ParametersButtons/ParameterButton/ParameterButton.js +29 -0
- package/lib/EventsView/views/components/SamplingParameters/ParametersContainer/ParametersButtons/ParametersButtons.js +44 -0
- package/lib/EventsView/views/components/SamplingParameters/ParametersContainer/ParametersButtons/styles.js +41 -0
- package/lib/EventsView/views/components/SamplingParameters/ParametersContainer/ParametersContainer.js +62 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingContainer/ExceptionBar/ExceptionBar.js +70 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingContainer/ExceptionBar/ExceptionBar.stories.js +41 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingContainer/ExceptionBar/styles.js +47 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingContainer/ExpandableSamplingTable/ExpandableSamplingTable.js +92 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingContainer/ExpandableSamplingTable/ExpandableSamplingTable.scss +102 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingContainer/ExpandableSamplingTable/assets/rigth.svg +3 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingContainer/SamplingContainer.js +37 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingParameters.js +129 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingParameters.mock.js +972 -0
- package/lib/EventsView/views/components/SamplingParameters/SamplingParameters.stories.js +171 -0
- package/lib/EventsView/views/components/SamplingParameters/charts/ParametersChart.js +50 -0
- package/lib/EventsView/views/components/SamplingParameters/charts/SamplingChart.js +53 -0
- package/lib/EventsView/views/components/SamplingParameters/charts/options/options.js +209 -0
- package/lib/EventsView/views/components/SamplingParameters/dataParser.js +107 -0
- package/lib/EventsView/views/components/SamplingParameters/models.js +5 -0
- package/lib/EventsView/views/components/SamplingParameters/styles/samplingParameters.js +26 -0
- package/lib/EventsView/views/components/SamplingParameters/styles/styles.js +35 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/AreaBox/AreaBox.js +95 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/AreaBox/AreaMap/AreaMap.js +66 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/AreaBox/PieChart/PieChart.js +124 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/AreaBox/styles.js +30 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/Areas.js +157 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Areas/styles.js +24 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Factories/Factories.js +182 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Factories/FactoryBox/FactoryBox.js +92 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Factories/FactoryBox/PieChart/PieChart.js +117 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Factories/FactoryBox/styles.js +31 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Factories/styles.js +24 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/MostPolluting.js +68 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/MostPolluting.stories.js +148 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/ShowMore/ShowMore.js +29 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/ShowMore/styles.js +20 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/Tabs.js +109 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/Tabs.stories.js +37 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/assets/home.svg +15 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/assets/index.js +45 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/assets/matash.svg +1 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/assets/plant.svg +23 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/assets/shape.svg +37 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/Tabs/assets/water.svg +20 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/assets/down-arrow.svg +27 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/assets/gas.svg +17 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/assets/index.js +53 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/assets/leather.svg +23 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/assets/metal.svg +20 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/assets/shop.svg +24 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/assets/show-more.svg +3 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/models.js +5 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostPolluting/styles.js +24 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/MostSevereEvents.js +83 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/MostSevereEvents.scss +34 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/MostSevereEvents.stories.js +383 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/NoEvents/NoEvents.js +37 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/NoEvents/NoEvents.stories.js +26 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/NoEvents/discover.svg +66 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/SevereEvent/SevereEvent.js +107 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/SevereEvent/SevereEvent.scss +361 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/SevereEvent/assets/info.svg +1 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/SevereEvent/assets/pipe-bluckages.svg +51 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/SevereEvent/assets/pipe.svg +61 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/SevereEvent/assets/sludge.svg +127 -0
- package/lib/EventsView/views/components/UtilityDashboard/MostSevereEvents/models.js +5 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/MostCommon/Back/Back.js +34 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/MostCommon/MostCommon.js +83 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/MostCommon/assets/arrow.svg +44 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/MostCommon/assets/bacteria.svg +90 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/MostCommon/assets/clock.svg +8 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/MostCommon/assets/pipes.svg +31 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/MostCommon/styles.js +80 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/PieChart/PieChart.js +117 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/PollutedLine/PollutedLine.js +68 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/QualitySummary.js +56 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/assets/down-arrow.svg +27 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/QualitySummary/styles.js +62 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/TopBar.js +49 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/UtilityInformation/UtilityInformation.js +42 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/UtilityInformation/styles.js +60 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/models.js +5 -0
- package/lib/EventsView/views/components/UtilityDashboard/TopBar/styles.js +17 -0
- package/lib/EventsView/views/components/UtilityDashboard/UtilityDashboard.js +35 -0
- package/lib/EventsView/views/components/UtilityDashboard/UtilityDashboard.stories.js +95 -0
- package/lib/EventsView/views/components/UtilityDashboard/mocks/areas.mock.js +344 -0
- package/lib/EventsView/views/components/UtilityDashboard/mocks/events.mock.js +345 -0
- package/lib/EventsView/views/components/UtilityDashboard/mocks/factories.mock.js +152 -0
- package/lib/EventsView/views/components/UtilityDashboard/mocks/index.js +29 -0
- 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/index.js +4 -9
- package/lib/shared/components/DoubleTabs/DoubleTabs.js +44 -0
- package/lib/shared/components/DoubleTabs/DoubleTabs.stories.js +30 -0
- package/lib/shared/components/DoubleTabs/styles.js +26 -0
- package/lib/shared/components/KandoModal/KandoModal.js +9 -6
- package/lib/shared/components/LoaderByPercent/LoaderByPercent.js +50 -0
- package/lib/shared/components/Select/Select.js +58 -0
- package/lib/shared/components/Select/Select.scss +49 -0
- package/lib/shared/components/Select/Select.stories.js +44 -0
- package/lib/shared/components/Spinner/Spinner.js +23 -0
- package/lib/shared/components/Spinner/Spinner.stories.js +38 -0
- package/lib/shared/components/Spinner/index.js +13 -0
- package/lib/shared/components/Spinner/style/spinner.js +25 -0
- package/lib/shared/redux/global/actions.js +5 -0
- package/lib/shared/utilities/custom_hooks/useApi.js +83 -0
- package/lib/shared/utilities/custom_hooks/useWindowSize.js +47 -0
- package/package.json +7 -3
- package/lib/ProjectManagement/api/index.js +0 -19
- package/lib/ProjectManagement/components/kpi-list-item.js +0 -88
- package/lib/ProjectManagement/components/kpi-percentage-item.js +0 -98
- package/lib/ProjectManagement/components/kpi.js +0 -71
- package/lib/ProjectManagement/components/legend-icon.js +0 -61
- package/lib/ProjectManagement/components/link-to-item.js +0 -67
- package/lib/ProjectManagement/components/list-of-points.js +0 -111
- package/lib/ProjectManagement/components/map-view.js +0 -128
- package/lib/ProjectManagement/components/metrics.js +0 -94
- package/lib/ProjectManagement/components/node-label.js +0 -66
- package/lib/ProjectManagement/components/period-selector-button.js +0 -68
- package/lib/ProjectManagement/components/period-selector.js +0 -79
- package/lib/ProjectManagement/components/point-preview.js +0 -298
- package/lib/ProjectManagement/components/project-management.js +0 -262
- package/lib/ProjectManagement/components/tree-legend.js +0 -100
- package/lib/ProjectManagement/components/tree-view.js +0 -281
- package/lib/ProjectManagement/stores/project-management-store.js +0 -32
- package/lib/ProjectManagement/util/constants.js +0 -10
- package/lib/ProjectManagement/util/treeUtil.js +0 -45
- package/lib/ProjectManagement/util/url.js +0 -24
- /package/lib/CovidView/views/components/{areas/TrendPopupContent → TrendPopupContent}/index.js +0 -0
- /package/lib/CovidView/views/components/{areas/TrendPopupContent → TrendPopupContent}/styles.scss +0 -0
|
@@ -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("
|
|
22
|
+
var _useQueryURL = _interopRequireDefault(require("../../../shared/utilities/custom_hooks/useQueryURL"));
|
|
23
23
|
|
|
24
|
-
|
|
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(
|
|
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(
|
|
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,
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.LoaderByPercent = exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var Container = _styledComponents.default.div.withConfig({
|
|
15
|
+
displayName: "LoaderByPercent__Container",
|
|
16
|
+
componentId: "sc-1uzywos-0"
|
|
17
|
+
})(["background-color:", ";height:100%;width:100%;>div{width:", "%;height:100%;background-color:", ";border-radius:", ";}"], function (_ref) {
|
|
18
|
+
var background = _ref.background;
|
|
19
|
+
return background;
|
|
20
|
+
}, function (_ref2) {
|
|
21
|
+
var percent = _ref2.percent;
|
|
22
|
+
return percent;
|
|
23
|
+
}, function (_ref3) {
|
|
24
|
+
var color = _ref3.color;
|
|
25
|
+
return color;
|
|
26
|
+
}, function (_ref4) {
|
|
27
|
+
var borderRadios = _ref4.borderRadios;
|
|
28
|
+
return borderRadios;
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
exports.Container = Container;
|
|
32
|
+
|
|
33
|
+
var LoaderByPercent = function LoaderByPercent(_ref5) {
|
|
34
|
+
var _ref5$percent = _ref5.percent,
|
|
35
|
+
percent = _ref5$percent === void 0 ? 24 : _ref5$percent,
|
|
36
|
+
_ref5$background = _ref5.background,
|
|
37
|
+
background = _ref5$background === void 0 ? "#f6b22f" : _ref5$background,
|
|
38
|
+
_ref5$color = _ref5.color,
|
|
39
|
+
color = _ref5$color === void 0 ? "#f6004f" : _ref5$color,
|
|
40
|
+
_ref5$borderRadios = _ref5.borderRadios,
|
|
41
|
+
borderRadios = _ref5$borderRadios === void 0 ? "none" : _ref5$borderRadios;
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(Container, {
|
|
43
|
+
percent: percent,
|
|
44
|
+
background: background,
|
|
45
|
+
color: color,
|
|
46
|
+
borderRadios: borderRadios
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement("div", null));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
exports.LoaderByPercent = LoaderByPercent;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.Select = void 0;
|
|
11
|
+
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _reactSelect = _interopRequireWildcard(require("react-select"));
|
|
17
|
+
|
|
18
|
+
require("./Select.scss");
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
+
|
|
26
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
27
|
+
|
|
28
|
+
var Select = function Select(_ref) {
|
|
29
|
+
var options = _ref.options,
|
|
30
|
+
setValue = _ref.setValue,
|
|
31
|
+
value = _ref.value,
|
|
32
|
+
_ref$defaultValue = _ref.defaultValue,
|
|
33
|
+
defaultValue = _ref$defaultValue === void 0 ? "" : _ref$defaultValue;
|
|
34
|
+
|
|
35
|
+
var onChange = function onChange(e) {
|
|
36
|
+
return setValue(e);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_reactSelect.default, {
|
|
40
|
+
className: "react-select",
|
|
41
|
+
classNamePrefix: "react-select",
|
|
42
|
+
label: "asfasf",
|
|
43
|
+
value: value,
|
|
44
|
+
onChange: onChange,
|
|
45
|
+
defaultValue: options[0],
|
|
46
|
+
styles: {
|
|
47
|
+
// Fixes the overlapping problem of the component
|
|
48
|
+
menu: function menu(provided) {
|
|
49
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
50
|
+
zIndex: 9999
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
options: options
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.Select = Select;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.react-select {
|
|
2
|
+
font-family: Gilroy;
|
|
3
|
+
font-size: 18px;
|
|
4
|
+
font-weight: 700;
|
|
5
|
+
color: #1d1d1d !important;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
&__indicators svg {
|
|
9
|
+
transform: rotate(0) ;
|
|
10
|
+
transition: all .3s ease;
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
&__menu {
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__option {
|
|
18
|
+
background-color: white;
|
|
19
|
+
&--is-focused {
|
|
20
|
+
background-color: rgba(246, 0, 79, 0.3) !important;
|
|
21
|
+
}
|
|
22
|
+
&--is-selected {
|
|
23
|
+
background-color: rgba(246, 0, 79, 0.8) !important;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__control {
|
|
28
|
+
border-color: transparent !important;
|
|
29
|
+
border: none !important;
|
|
30
|
+
box-shadow: none !important;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
&--menu-is-open {
|
|
34
|
+
|
|
35
|
+
.react-select__indicator > svg {
|
|
36
|
+
transform: rotate(180deg) ;
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__indicator-separator {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Primary = exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Select = require("./Select");
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
title: 'UI/components/Select',
|
|
16
|
+
component: _Select.Select,
|
|
17
|
+
argTypes: {
|
|
18
|
+
color: {
|
|
19
|
+
control: 'color'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.default = _default;
|
|
24
|
+
|
|
25
|
+
var Template = function Template(args) {
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_Select.Select, args);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var Primary = Template.bind({});
|
|
30
|
+
exports.Primary = Primary;
|
|
31
|
+
Primary.args = {
|
|
32
|
+
options: [{
|
|
33
|
+
value: 'chocolate',
|
|
34
|
+
label: 'Chocolate'
|
|
35
|
+
}, {
|
|
36
|
+
value: 'strawberry',
|
|
37
|
+
label: 'Strawberry'
|
|
38
|
+
}, {
|
|
39
|
+
value: 'vanilla',
|
|
40
|
+
label: 'Vanilla'
|
|
41
|
+
}],
|
|
42
|
+
setValue: function setValue(e) {},
|
|
43
|
+
value: 'chocolate'
|
|
44
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _spinner = require("./style/spinner");
|
|
13
|
+
|
|
14
|
+
var Spinner = function Spinner(_ref) {
|
|
15
|
+
var _ref$color = _ref.color,
|
|
16
|
+
color = _ref$color === void 0 ? "#f6004f" : _ref$color;
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_spinner.Container, null, /*#__PURE__*/_react.default.createElement(_spinner.Spinner, {
|
|
18
|
+
color: color
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var _default = Spinner;
|
|
23
|
+
exports.default = _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Secondary = exports.Primary = exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Spinner = _interopRequireDefault(require("./Spinner"));
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
title: 'UI/components/Spinner',
|
|
16
|
+
component: _Spinner.default,
|
|
17
|
+
argTypes: {
|
|
18
|
+
color: {
|
|
19
|
+
control: 'color'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.default = _default;
|
|
24
|
+
|
|
25
|
+
var Template = function Template(args) {
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_Spinner.default, args);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var Primary = Template.bind({});
|
|
30
|
+
exports.Primary = Primary;
|
|
31
|
+
Primary.args = {
|
|
32
|
+
color: ''
|
|
33
|
+
};
|
|
34
|
+
var Secondary = Template.bind({});
|
|
35
|
+
exports.Secondary = Secondary;
|
|
36
|
+
Secondary.args = {
|
|
37
|
+
color: 'blue'
|
|
38
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _Spinner = _interopRequireDefault(require("./Spinner"));
|
|
11
|
+
|
|
12
|
+
var _default = _Spinner.default;
|
|
13
|
+
exports.default = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Spinner = exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _templateObject, _templateObject2;
|
|
15
|
+
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex; \n justify-content: center;\n align-items: center;\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
19
|
+
|
|
20
|
+
var Spinner = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 6rem;\n\theight: 6rem;\n\tborder-top: ", ";\n\t border-right: 3px solid transparent;\n\t border-radius: 50%;\n\t animation: rotation 0.8s linear infinite;\n \n @keyframes rotation {\n\t from {\n\t\t transform: rotate(0deg);\n\t}\n\t to {\n\t\t transform: rotate(360deg);\n\t}\n}\n @keyframes flip {\n\t 0% {\n\t\t transform: perspective(120px) rotateX(0deg) rotateY(0deg);\n\t}\n\t 50% {\n\t\t transform: perspective(120px) rotateX(-180deg) rotateY(0deg);\n\t}\n\t 100% {\n\t\t transform: perspective(120px) rotateX(-180deg) rotateY(-180deg);\n\t}\n}\n @keyframes progress {\n\t 0% {\n\t\t left: -130%;\n\t\t background: rgba(0, 0, 0, .5);\n\t}\n\t 50% {\n\t\t left: 130%;\n\t\t background: rgba(0, 0, 0, .5);\n\t}\n\t 51% {\n\t\t background: rgba(255, 255, 255, .5);\n\t}\n\t 100% {\n\t\t background: rgba(255, 255, 255, .5);\n\t}\n}\n @keyframes pulse {\n\t 0% {\n\t\t transform: translate(-50%, -50%) scale(0);\n\t\t opacity: 1;\n\t}\n\t 100% {\n\t\t transform: translate(-50%, -50%) scale(1);\n\t\t opacity: 0;\n\t}\n}\n @keyframes pulse2 {\n\t 0%, 100% {\n\t\t transform: translate(-50%, -50%) scale(0);\n\t\t opacity: 1;\n\t}\n\t 50% {\n\t\t transform: translate(-50%, -50%) scale(1);\n\t\t opacity: 0;\n\t}\n}\n @keyframes flipWalker {\n\t 0% {\n\t\t transform: translate(0, 0) rotateX(0) rotateY(0);\n\t}\n\t 25% {\n\t\t transform: translate(100%, 0) rotateX(0) rotateY(180deg);\n\t}\n\t 50% {\n\t\t transform: translate(100%, 100%) rotateX(-180deg) rotateY(180deg);\n\t}\n\t 75% {\n\t\t transform: translate(0, 100%) rotateX(-180deg) rotateY(360deg);\n\t}\n\t 100% {\n\t\t transform: translate(0, 0) rotateX(0) rotateY(360deg);\n\t}\n}\n \n"])), function (_ref) {
|
|
21
|
+
var color = _ref.color;
|
|
22
|
+
return "3px solid ".concat(color);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.Spinner = Spinner;
|
|
@@ -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,
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.useApi = void 0;
|
|
9
|
+
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
17
|
+
|
|
18
|
+
var _react = require("react");
|
|
19
|
+
|
|
20
|
+
var useApi = function useApi(url) {
|
|
21
|
+
var _useState = (0, _react.useState)(),
|
|
22
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
23
|
+
response = _useState2[0],
|
|
24
|
+
setResponse = _useState2[1];
|
|
25
|
+
|
|
26
|
+
var _useState3 = (0, _react.useState)(''),
|
|
27
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
28
|
+
error = _useState4[0],
|
|
29
|
+
setError = _useState4[1];
|
|
30
|
+
|
|
31
|
+
var _useState5 = (0, _react.useState)(true),
|
|
32
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
33
|
+
isLoading = _useState6[0],
|
|
34
|
+
setIsLoading = _useState6[1];
|
|
35
|
+
|
|
36
|
+
(0, _react.useEffect)(function () {
|
|
37
|
+
var fetchData = /*#__PURE__*/function () {
|
|
38
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
39
|
+
var res;
|
|
40
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
41
|
+
while (1) {
|
|
42
|
+
switch (_context.prev = _context.next) {
|
|
43
|
+
case 0:
|
|
44
|
+
_context.prev = 0;
|
|
45
|
+
setIsLoading(true);
|
|
46
|
+
_context.next = 4;
|
|
47
|
+
return _axios.default.get(url);
|
|
48
|
+
|
|
49
|
+
case 4:
|
|
50
|
+
res = _context.sent;
|
|
51
|
+
setResponse(res);
|
|
52
|
+
_context.next = 11;
|
|
53
|
+
break;
|
|
54
|
+
|
|
55
|
+
case 8:
|
|
56
|
+
_context.prev = 8;
|
|
57
|
+
_context.t0 = _context["catch"](0);
|
|
58
|
+
setError('Request Failed');
|
|
59
|
+
|
|
60
|
+
case 11:
|
|
61
|
+
_context.prev = 11;
|
|
62
|
+
setIsLoading(false);
|
|
63
|
+
return _context.finish(11);
|
|
64
|
+
|
|
65
|
+
case 14:
|
|
66
|
+
case "end":
|
|
67
|
+
return _context.stop();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, _callee, null, [[0, 8, 11, 14]]);
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
return function fetchData() {
|
|
74
|
+
return _ref.apply(this, arguments);
|
|
75
|
+
};
|
|
76
|
+
}();
|
|
77
|
+
|
|
78
|
+
fetchData();
|
|
79
|
+
}, [url]);
|
|
80
|
+
return [response, isLoading, error];
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
exports.useApi = useApi;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.useWindowSize = useWindowSize;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
|
|
14
|
+
// Hook
|
|
15
|
+
function useWindowSize() {
|
|
16
|
+
// Initialize state with undefined width/height so server and client renders match
|
|
17
|
+
// Learn more here: https://joshwcomeau.com/react/the-perils-of-rehydration/
|
|
18
|
+
var _useState = (0, _react.useState)({
|
|
19
|
+
width: undefined,
|
|
20
|
+
height: undefined
|
|
21
|
+
}),
|
|
22
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
23
|
+
windowSize = _useState2[0],
|
|
24
|
+
setWindowSize = _useState2[1];
|
|
25
|
+
|
|
26
|
+
(0, _react.useEffect)(function () {
|
|
27
|
+
// Handler to call on window resize
|
|
28
|
+
function handleResize() {
|
|
29
|
+
// Set window width/height to state
|
|
30
|
+
setWindowSize({
|
|
31
|
+
width: window.innerWidth,
|
|
32
|
+
height: window.innerHeight
|
|
33
|
+
});
|
|
34
|
+
} // Add event listener
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
window.addEventListener('resize', handleResize); // Call handler right away so state gets updated with initial window size
|
|
38
|
+
|
|
39
|
+
handleResize(); // Remove event listener on cleanup
|
|
40
|
+
|
|
41
|
+
return function () {
|
|
42
|
+
return window.removeEventListener('resize', handleResize);
|
|
43
|
+
};
|
|
44
|
+
}, []); // Empty array ensures that effect is only run on mount
|
|
45
|
+
|
|
46
|
+
return windowSize;
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kando-env/kando-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"author": "Nadav(Private) <nadavk72@gmail.com>",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
"build-demo": "TSC_COMPILE_ON_ERROR=true react-scripts build",
|
|
11
11
|
"serve-demo": "nodemon demo-server.js",
|
|
12
12
|
"pre-build": "rimraf lib",
|
|
13
|
-
"
|
|
13
|
+
"babel": "cross-env NODE_ENV=production babel src/bundles --extensions .ts,.tsx,.js,.jsx --out-dir lib --copy-files --ignore __tests__,spec.js,test.js,stories.js,__snapshots__",
|
|
14
|
+
"babel-watch": "cross-env NODE_ENV=production babel src/bundles --watch --extensions .ts,.tsx,.js,.jsx --out-dir lib --copy-files --ignore __tests__,spec.js,test.js,stories.js,__snapshots__",
|
|
15
|
+
"build-watch": "npm run babel-watch",
|
|
16
|
+
"build": "npm run pre-build && npm run babel",
|
|
14
17
|
"storybook": "start-storybook -p 6006 -s ./static",
|
|
15
18
|
"build-storybook": "build-storybook -s ./static",
|
|
16
19
|
"lint-staged": "lint-staged",
|
|
@@ -85,7 +88,7 @@
|
|
|
85
88
|
"react-responsive-carousel": "^3.2.18",
|
|
86
89
|
"react-responsive-modal": "^6.1.0",
|
|
87
90
|
"react-router-dom": "^5.2.0",
|
|
88
|
-
"react-select": "^3.1
|
|
91
|
+
"react-select": "^4.3.1",
|
|
89
92
|
"redux": "^4.0.5",
|
|
90
93
|
"redux-logger": "^3.0.6",
|
|
91
94
|
"redux-thunk": "^2.3.0",
|
|
@@ -115,6 +118,7 @@
|
|
|
115
118
|
"@storybook/addon-essentials": "^6.2.9",
|
|
116
119
|
"@storybook/addon-links": "^6.2.9",
|
|
117
120
|
"@storybook/react": "^6.2.9",
|
|
121
|
+
"@types/leaflet": "^1.7.3",
|
|
118
122
|
"@types/styled-components": "^5.1.10",
|
|
119
123
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
120
124
|
"cache-loader": "^4.1.0",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getDataFromServer = getDataFromServer;
|
|
7
|
-
exports.getDetection = getDetection;
|
|
8
|
-
|
|
9
|
-
function getDataFromServer(period, waterAuthorityId) {
|
|
10
|
-
return fetch("/project_management/points_tree.json?period=" + period + "&water_authority_id=" + waterAuthorityId).then(function (res) {
|
|
11
|
-
return res.json();
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function getDetection(period, waterAuthorityId) {
|
|
16
|
-
return fetch("/project_management/detection.json?period=" + period + "&water_authority_id=" + waterAuthorityId).then(function (res) {
|
|
17
|
-
return res.json();
|
|
18
|
-
});
|
|
19
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
|
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
|
|
18
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireDefault(require("react"));
|
|
21
|
-
|
|
22
|
-
var _linkToItem = _interopRequireDefault(require("./link-to-item"));
|
|
23
|
-
|
|
24
|
-
var _metrics = _interopRequireDefault(require("./metrics"));
|
|
25
|
-
|
|
26
|
-
var _reactContentLoader = require("react-content-loader");
|
|
27
|
-
|
|
28
|
-
var _ErrorBoundary = _interopRequireDefault(require("../../shared/components/ErrorBoundary"));
|
|
29
|
-
|
|
30
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
31
|
-
|
|
32
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
33
|
-
|
|
34
|
-
function ItemsList(props) {
|
|
35
|
-
var items = props.items;
|
|
36
|
-
var listItems = items.map(function (item) {
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
-
key: item.id,
|
|
39
|
-
className: "prj-mng-item"
|
|
40
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
-
className: "item-details"
|
|
42
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
className: "row"
|
|
44
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
-
className: "col-lg-9"
|
|
46
|
-
}, /*#__PURE__*/_react.default.createElement(_linkToItem.default, {
|
|
47
|
-
item: item,
|
|
48
|
-
handleSetSelectedPoint: props.handleSetSelectedPoint
|
|
49
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
-
className: "col-lg-3"
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement(_metrics.default, {
|
|
52
|
-
item: item
|
|
53
|
-
})))));
|
|
54
|
-
});
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement("div", null, listItems);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
var KpiListItem = /*#__PURE__*/function (_React$Component) {
|
|
59
|
-
(0, _inherits2.default)(KpiListItem, _React$Component);
|
|
60
|
-
|
|
61
|
-
var _super = _createSuper(KpiListItem);
|
|
62
|
-
|
|
63
|
-
function KpiListItem() {
|
|
64
|
-
(0, _classCallCheck2.default)(this, KpiListItem);
|
|
65
|
-
return _super.apply(this, arguments);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
(0, _createClass2.default)(KpiListItem, [{
|
|
69
|
-
key: "render",
|
|
70
|
-
value: function render() {
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
72
|
-
className: "col col-lg-3 col-md-6"
|
|
73
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
-
className: "ibox float-e-margins ibox-sm"
|
|
75
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
-
className: "ibox-title"
|
|
77
|
-
}, /*#__PURE__*/_react.default.createElement("h5", null, this.props.title)), /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
-
className: "ibox-content"
|
|
79
|
-
}, /*#__PURE__*/_react.default.createElement(_ErrorBoundary.default, null, this.props.loading ? /*#__PURE__*/_react.default.createElement(_reactContentLoader.BulletList, null) : /*#__PURE__*/_react.default.createElement(ItemsList, {
|
|
80
|
-
items: this.props.items,
|
|
81
|
-
handleSetSelectedPoint: this.props.handleSetSelectedPoint
|
|
82
|
-
})))));
|
|
83
|
-
}
|
|
84
|
-
}]);
|
|
85
|
-
return KpiListItem;
|
|
86
|
-
}(_react.default.Component);
|
|
87
|
-
|
|
88
|
-
exports.default = KpiListItem;
|