@widergy/energy-ui 2.12.1 → 2.12.2
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/dist/components/EnergyThemeProvider/index.js +36 -13
- package/dist/components/Loading/constants.js +2 -1
- package/dist/components/Loading/index.js +12 -13
- package/dist/components/Loading/theme.js +2 -4
- package/dist/components/UTAlert/AlertHandler.js +101 -75
- package/dist/components/UTAlert/index.js +87 -65
- package/dist/components/UTAlert/theme.js +32 -32
- package/dist/components/UTAttachment/components/Preview/index.js +9 -8
- package/dist/components/UTAttachment/constants.js +13 -7
- package/dist/components/UTAttachment/index.js +250 -159
- package/dist/components/UTAttachment/layout.js +27 -26
- package/dist/components/UTAttachment/theme.js +2 -4
- package/dist/components/UTAttachment/utils.js +117 -34
- package/dist/components/UTAutocomplete/components/ListBox/index.js +21 -13
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +11 -9
- package/dist/components/UTAutocomplete/constants.js +23 -12
- package/dist/components/UTAutocomplete/index.js +94 -54
- package/dist/components/UTAutocomplete/theme.js +4 -6
- package/dist/components/UTAvatar/constants.js +3 -2
- package/dist/components/UTAvatar/index.js +17 -18
- package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +22 -22
- package/dist/components/UTBarChart/components/Bars/components/Bar/constants.js +1 -1
- package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +22 -21
- package/dist/components/UTBarChart/components/Bars/constants.js +6 -3
- package/dist/components/UTBarChart/components/Bars/index.js +80 -70
- package/dist/components/UTBarChart/components/Legend/constants.js +18 -12
- package/dist/components/UTBarChart/components/Legend/index.js +93 -75
- package/dist/components/UTBarChart/components/Legend/utils.js +5 -1
- package/dist/components/UTBarChart/components/Levels/index.js +14 -16
- package/dist/components/UTBarChart/components/Levels/utils.js +27 -25
- package/dist/components/UTBarChart/components/LinearPlot/constants.js +5 -3
- package/dist/components/UTBarChart/components/LinearPlot/index.js +20 -25
- package/dist/components/UTBarChart/components/LinearPlot/utils.js +39 -37
- package/dist/components/UTBarChart/components/Pagination/constants.js +2 -1
- package/dist/components/UTBarChart/components/Pagination/index.js +24 -20
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +32 -21
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +4 -2
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +19 -20
- package/dist/components/UTBarChart/components/XAxis/constants.js +2 -1
- package/dist/components/UTBarChart/components/XAxis/index.js +65 -54
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +11 -12
- package/dist/components/UTBarChart/components/YAxis/constants.js +2 -1
- package/dist/components/UTBarChart/components/YAxis/index.js +37 -30
- package/dist/components/UTBarChart/components/YAxis/utils.js +6 -4
- package/dist/components/UTBarChart/constants.js +8 -4
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +40 -23
- package/dist/components/UTBarChart/index.js +166 -152
- package/dist/components/UTBarChart/theme.js +2 -4
- package/dist/components/UTBarChart/types.js +19 -10
- package/dist/components/UTBarChart/utils.js +111 -107
- package/dist/components/UTBreadcrumbs/constants.js +31 -23
- package/dist/components/UTBreadcrumbs/index.js +101 -76
- package/dist/components/UTBreadcrumbs/theme.js +2 -4
- package/dist/components/UTButton/constants.js +17 -11
- package/dist/components/UTButton/index.js +31 -28
- package/dist/components/UTButton/theme.js +23 -23
- package/dist/components/UTCBUInput/index.js +40 -36
- package/dist/components/UTCBUInput/theme.js +2 -4
- package/dist/components/UTCaptcha/index.js +45 -19
- package/dist/components/UTCard/components/UTCardFooter/index.js +16 -15
- package/dist/components/UTCard/index.js +120 -85
- package/dist/components/UTCard/theme.js +12 -11
- package/dist/components/UTCard/types.js +3 -2
- package/dist/components/UTCarousel/components/Button/index.js +13 -13
- package/dist/components/UTCarousel/components/Legend/index.js +15 -13
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +16 -16
- package/dist/components/UTCarousel/components/Slider/constants.js +10 -5
- package/dist/components/UTCarousel/components/Slider/index.js +273 -204
- package/dist/components/UTCarousel/components/Slider/layout.js +94 -67
- package/dist/components/UTCarousel/index.js +15 -14
- package/dist/components/UTCarousel/theme.js +2 -4
- package/dist/components/UTCheckList/constants.js +2 -1
- package/dist/components/UTCheckList/index.js +93 -72
- package/dist/components/UTCheckList/theme.js +31 -31
- package/dist/components/UTCheckbox/constants.js +6 -3
- package/dist/components/UTCheckbox/index.js +44 -32
- package/dist/components/UTCheckbox/theme.js +35 -35
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +9 -9
- package/dist/components/UTConsumptionBar/constants.js +6 -3
- package/dist/components/UTConsumptionBar/index.js +80 -53
- package/dist/components/UTCuit/index.js +133 -109
- package/dist/components/UTCuit/theme.js +53 -51
- package/dist/components/UTDatePicker/components/Day/constants.js +2 -1
- package/dist/components/UTDatePicker/components/Day/index.js +12 -12
- package/dist/components/UTDatePicker/constants.js +31 -20
- package/dist/components/UTDatePicker/index.js +102 -60
- package/dist/components/UTDatePicker/theme.js +3 -5
- package/dist/components/UTDatePicker/types.js +3 -2
- package/dist/components/UTDatePicker/utils.js +6 -2
- package/dist/components/UTDialog/constants.js +4 -2
- package/dist/components/UTDialog/index.js +37 -38
- package/dist/components/UTDialog/theme.js +2 -4
- package/dist/components/UTDialog/types.js +3 -2
- package/dist/components/UTDotMenu/index.js +61 -39
- package/dist/components/UTEmojiPicker/constants.js +11 -6
- package/dist/components/UTEmojiPicker/index.js +65 -45
- package/dist/components/UTEmojiPicker/theme.js +2 -4
- package/dist/components/UTEmojiPicker/utils.js +51 -21
- package/dist/components/UTExternalLink/constants.js +5 -3
- package/dist/components/UTExternalLink/index.js +15 -18
- package/dist/components/UTExternalLink/theme.js +6 -8
- package/dist/components/UTFileInput/constants.js +4 -2
- package/dist/components/UTFileInput/index.js +31 -7
- package/dist/components/UTFileInput/layout.js +97 -68
- package/dist/components/UTIconButton/index.js +72 -49
- package/dist/components/UTIconButton/theme.js +2 -4
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +58 -53
- package/dist/components/UTImageRadio/constants.js +6 -3
- package/dist/components/UTImageRadio/index.js +47 -39
- package/dist/components/UTImageRadio/theme.js +12 -11
- package/dist/components/UTImageRadio/types.js +3 -2
- package/dist/components/UTImageRadio/utils.js +6 -2
- package/dist/components/UTLabel/constants.js +20 -14
- package/dist/components/UTLabel/index.js +20 -18
- package/dist/components/UTLabel/theme.js +15 -15
- package/dist/components/UTList/index.js +18 -15
- package/dist/components/UTLoading/index.js +15 -15
- package/dist/components/UTMap/components/GoogleMaps/constants.js +11 -8
- package/dist/components/UTMap/components/GoogleMaps/index.js +91 -63
- package/dist/components/UTMap/components/GoogleMaps/styles.js +3 -2
- package/dist/components/UTMap/constants.js +12 -6
- package/dist/components/UTMap/index.js +198 -163
- package/dist/components/UTMap/types.js +6 -4
- package/dist/components/UTMap/utils.js +46 -29
- package/dist/components/UTMap/withGoogleMapScript.js +22 -18
- package/dist/components/UTMenu/index.js +69 -52
- package/dist/components/UTMenu/theme.js +3 -5
- package/dist/components/UTMenu/utils.js +11 -5
- package/dist/components/UTModal/constants.js +13 -9
- package/dist/components/UTModal/index.js +30 -26
- package/dist/components/UTModal/theme.js +2 -4
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +10 -11
- package/dist/components/UTPagination/components/PageSizeSelector/utils.js +13 -7
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTPagination/components/Pagination/index.js +39 -28
- package/dist/components/UTPagination/components/Pagination/utils.js +14 -8
- package/dist/components/UTPagination/constants.js +6 -3
- package/dist/components/UTPagination/index.js +17 -16
- package/dist/components/UTPagination/theme.js +2 -4
- package/dist/components/UTPanel/index.js +44 -38
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +10 -13
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +19 -22
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +50 -63
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +26 -25
- package/dist/components/UTPasswordField/index.js +23 -26
- package/dist/components/UTPasswordField/theme.js +2 -4
- package/dist/components/UTPhoneInput/constants.js +6 -3
- package/dist/components/UTPhoneInput/index.js +205 -180
- package/dist/components/UTPhoneInput/theme.js +77 -77
- package/dist/components/UTPieChart/components/ArrowLabel/constants.js +8 -4
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +23 -24
- package/dist/components/UTPieChart/components/Legend/contants.js +6 -3
- package/dist/components/UTPieChart/components/Legend/index.js +24 -27
- package/dist/components/UTPieChart/constants.js +26 -13
- package/dist/components/UTPieChart/hooks/use-animated-value/index.js +33 -15
- package/dist/components/UTPieChart/index.js +76 -73
- package/dist/components/UTPieChart/theme.js +2 -4
- package/dist/components/UTPieChart/utils.js +2 -4
- package/dist/components/UTProgressBar/constants.js +4 -2
- package/dist/components/UTProgressBar/index.js +17 -15
- package/dist/components/UTProgressBar/theme.js +2 -4
- package/dist/components/UTProgressBar/types.js +3 -2
- package/dist/components/UTRadioGroup/index.js +83 -56
- package/dist/components/UTRadioGroup/theme.js +52 -52
- package/dist/components/UTRating/components/Circle/index.js +56 -41
- package/dist/components/UTRating/components/Faces/constants.js +4 -2
- package/dist/components/UTRating/components/Faces/index.js +36 -34
- package/dist/components/UTRating/components/Star/index.js +40 -36
- package/dist/components/UTRating/constants.js +8 -4
- package/dist/components/UTRating/index.js +46 -31
- package/dist/components/UTRating/theme.js +2 -4
- package/dist/components/UTRipple/Ripple.js +39 -22
- package/dist/components/UTRipple/index.js +37 -18
- package/dist/components/UTSelect/components/Option/index.js +13 -13
- package/dist/components/UTSelect/constants.js +8 -4
- package/dist/components/UTSelect/index.js +85 -63
- package/dist/components/UTSelect/stylesJS.js +3 -2
- package/dist/components/UTSelect/theme.js +4 -6
- package/dist/components/UTSelect/utils.js +13 -3
- package/dist/components/UTSidebar/components/ListOption/index.js +49 -34
- package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +8 -8
- package/dist/components/UTSidebar/components/LogosContainer/index.js +14 -14
- package/dist/components/UTSidebar/components/Option/constants.js +3 -2
- package/dist/components/UTSidebar/components/Option/index.js +32 -28
- package/dist/components/UTSidebar/components/Toggler/index.js +11 -11
- package/dist/components/UTSidebar/index.js +53 -42
- package/dist/components/UTSidebar/theme.js +2 -4
- package/dist/components/UTSidebar/types.js +10 -5
- package/dist/components/UTSkeleton/index.js +36 -10
- package/dist/components/UTStatus/constants.js +9 -5
- package/dist/components/UTStatus/index.js +15 -16
- package/dist/components/UTStatus/theme.js +49 -66
- package/dist/components/UTSwitch/constants.js +6 -3
- package/dist/components/UTSwitch/index.js +57 -42
- package/dist/components/UTSwitch/theme.js +2 -4
- package/dist/components/UTTable/components/ActionIcons/constants.js +2 -1
- package/dist/components/UTTable/components/ActionIcons/index.js +85 -47
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +12 -10
- package/dist/components/UTTable/components/Cell/index.js +23 -18
- package/dist/components/UTTable/components/HeaderCell/constants.js +3 -2
- package/dist/components/UTTable/components/HeaderCell/index.js +30 -23
- package/dist/components/UTTable/components/HeaderCell/utils.js +3 -3
- package/dist/components/UTTable/components/PrimaryAction/index.js +11 -12
- package/dist/components/UTTable/components/ResponsiveCell/index.js +20 -19
- package/dist/components/UTTable/components/Status/index.js +19 -18
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +9 -10
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +13 -7
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +32 -21
- package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +14 -8
- package/dist/components/UTTable/components/TableFooter/constants.js +2 -1
- package/dist/components/UTTable/components/TableFooter/index.js +15 -15
- package/dist/components/UTTable/components/TableHeader/index.js +11 -11
- package/dist/components/UTTable/components/TableRow/constants.js +6 -3
- package/dist/components/UTTable/components/TableRow/index.js +94 -79
- package/dist/components/UTTable/constants.js +43 -26
- package/dist/components/UTTable/hook.js +26 -11
- package/dist/components/UTTable/index.js +223 -132
- package/dist/components/UTTable/theme.js +17 -17
- package/dist/components/UTTable/types.js +8 -4
- package/dist/components/UTTable/utils.js +74 -70
- package/dist/components/UTTabs/components/TooltipTab/index.js +30 -20
- package/dist/components/UTTabs/constants.js +8 -4
- package/dist/components/UTTabs/index.js +86 -57
- package/dist/components/UTTabs/theme.js +2 -4
- package/dist/components/UTTabs/utils.js +1 -1
- package/dist/components/UTTextArea/constants.js +6 -3
- package/dist/components/UTTextArea/index.js +23 -23
- package/dist/components/UTTextArea/theme.js +2 -4
- package/dist/components/UTTextInput/constants.js +3 -2
- package/dist/components/UTTextInput/index.js +165 -137
- package/dist/components/UTTextInput/theme.js +4 -6
- package/dist/components/UTThirdPartyCookieChecker/index.js +21 -17
- package/dist/components/UTToggle/components/ToggleOption/index.js +17 -16
- package/dist/components/UTToggle/index.js +26 -25
- package/dist/components/UTToggle/theme.js +2 -4
- package/dist/components/UTTooltip/index.js +30 -23
- package/dist/components/UTTooltip/theme.js +2 -4
- package/dist/components/UTTopbar/components/Notifications/index.js +14 -11
- package/dist/components/UTTopbar/components/UserMenu/index.js +15 -15
- package/dist/components/UTTopbar/index.js +31 -28
- package/dist/components/UTTopbar/theme.js +2 -4
- package/dist/components/UTTopbar/types.js +9 -5
- package/dist/components/UTTouchableWithoutFeedback/index.js +27 -14
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +4 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +31 -34
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +4 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +12 -6
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +18 -8
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +47 -23
- package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +34 -31
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +93 -81
- package/dist/components/UTVirtualizedList/constants.js +8 -4
- package/dist/components/UTVirtualizedList/index.js +38 -26
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +21 -17
- package/dist/components/UTWorkflowContainer/constants.js +6 -3
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +3 -3
- package/dist/components/UTWorkflowContainer/index.js +51 -32
- package/dist/components/UTWorkflowContainer/theme.js +53 -60
- package/dist/components/UTWorkflowContainer/types.js +3 -2
- package/dist/components/WithLoading/index.js +15 -10
- package/dist/components/WithTheme/index.js +17 -10
- package/dist/components/WithTheme/layout.js +28 -22
- package/dist/components/WithTouch/index.js +19 -12
- package/dist/constants/UTTable.js +3 -2
- package/dist/index.js +58 -58
- package/dist/theme.js +5 -6
- package/dist/types/commonTypes.js +5 -3
- package/dist/types/consumptionTypes.js +5 -3
- package/dist/types/formTypes.js +7 -4
- package/dist/types/tableTypes.js +3 -2
- package/dist/utils/classesUtils.js +13 -5
- package/dist/utils/componentUtils.js +13 -10
- package/dist/utils/helperFunctions.js +4 -4
- package/dist/utils/shadowUtils.js +11 -13
- package/dist/utils/useScreenSize.js +3 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -15,78 +16,84 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
15
16
|
var _constants = require("./constants");
|
|
16
17
|
var _utils = require("./utils");
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
20
21
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
flatBarData
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
26
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
27
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
|
+
var Legend = function Legend(_ref) {
|
|
29
|
+
var title = _ref.title,
|
|
30
|
+
references = _ref.references,
|
|
31
|
+
flatData = _ref.flatData,
|
|
32
|
+
_ref$displayAs = _ref.displayAs,
|
|
33
|
+
displayAs = _ref$displayAs === void 0 ? 'block' : _ref$displayAs,
|
|
34
|
+
style = _ref.style,
|
|
35
|
+
labels = _ref.labels,
|
|
36
|
+
classes = _ref.classes,
|
|
37
|
+
buttonProps = _ref.buttonProps;
|
|
38
|
+
var _useState = (0, _react.useState)(false),
|
|
39
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
40
|
+
showLegend = _useState2[0],
|
|
41
|
+
setShowLegend = _useState2[1];
|
|
42
|
+
var _ref2 = labels || {},
|
|
43
|
+
referencesModalTitle = _ref2.referencesModalTitle,
|
|
44
|
+
referencesModalButton = _ref2.referencesModalButton,
|
|
45
|
+
showReferencesLabel = _ref2.showReferencesLabel;
|
|
46
|
+
var _ref3 = references || {},
|
|
47
|
+
_ref3$bar = _ref3.bar,
|
|
48
|
+
barReferences = _ref3$bar === void 0 ? [] : _ref3$bar,
|
|
49
|
+
_ref3$linear = _ref3.linear,
|
|
50
|
+
linearReferences = _ref3$linear === void 0 ? [] : _ref3$linear,
|
|
51
|
+
_ref3$levels = _ref3.levels,
|
|
52
|
+
levelsReferences = _ref3$levels === void 0 ? [] : _ref3$levels;
|
|
53
|
+
var _ref4 = flatData || {},
|
|
54
|
+
_ref4$bar = _ref4.bar,
|
|
55
|
+
flatBarData = _ref4$bar === void 0 ? [] : _ref4$bar,
|
|
56
|
+
_ref4$linear = _ref4.linear,
|
|
57
|
+
flatLinearData = _ref4$linear === void 0 ? [] : _ref4$linear,
|
|
58
|
+
_ref4$levels = _ref4.levels,
|
|
59
|
+
levels = _ref4$levels === void 0 ? [] : _ref4$levels;
|
|
60
|
+
var _displayOptions = (0, _constants.displayOptions)(displayAs),
|
|
61
|
+
Wrapper = _displayOptions.Component,
|
|
62
|
+
withButton = _displayOptions.withButton;
|
|
63
|
+
var getReferencesToShow = function getReferencesToShow() {
|
|
64
|
+
var referencesToShow = new Set();
|
|
65
|
+
flatBarData.forEach(function (item) {
|
|
66
|
+
return barReferences.forEach(function (_ref5) {
|
|
67
|
+
var check = _ref5.check,
|
|
68
|
+
id = _ref5.id;
|
|
69
|
+
return check(item) && referencesToShow.add(id);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
flatLinearData.forEach(function (item) {
|
|
73
|
+
return linearReferences.forEach(function (_ref6) {
|
|
74
|
+
var check = _ref6.check,
|
|
75
|
+
id = _ref6.id;
|
|
76
|
+
return check(item) && referencesToShow.add(id);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
levels.forEach(function (_ref7) {
|
|
80
|
+
var id = _ref7.id;
|
|
72
81
|
return referencesToShow.add(id);
|
|
73
82
|
});
|
|
74
83
|
referencesToShow = Array.from(referencesToShow);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
id
|
|
78
|
-
} = _ref5;
|
|
84
|
+
var filterFunction = function filterFunction(_ref8) {
|
|
85
|
+
var id = _ref8.id;
|
|
79
86
|
return referencesToShow.includes(id);
|
|
80
87
|
};
|
|
81
|
-
|
|
82
|
-
return getOrderedLegend(levelsReferences.filter(filterFunction), linearReferences.filter(filterFunction), barReferences.filter(filterFunction)).filter(
|
|
88
|
+
var getOrderedLegend = (0, _utils.orderLegend)(references === null || references === void 0 ? void 0 : references.orderFunction);
|
|
89
|
+
return getOrderedLegend(levelsReferences.filter(filterFunction), linearReferences.filter(filterFunction), barReferences.filter(filterFunction)).filter(function (row) {
|
|
90
|
+
return !(0, _array.isEmpty)(row);
|
|
91
|
+
});
|
|
83
92
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
CustomIcon
|
|
89
|
-
} = reference;
|
|
93
|
+
var referenceRenderer = function referenceRenderer(reference) {
|
|
94
|
+
var label = reference.label,
|
|
95
|
+
className = reference.className,
|
|
96
|
+
CustomIcon = reference.CustomIcon;
|
|
90
97
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
91
98
|
className: _stylesModule.default["item".concat(displayAs)],
|
|
92
99
|
key: label
|
|
@@ -96,15 +103,19 @@ const Legend = _ref => {
|
|
|
96
103
|
className: "".concat(_stylesModule.default.itemLabel, " ").concat(classes.legendItemLabel)
|
|
97
104
|
}, label));
|
|
98
105
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
var referencesToShow = getReferencesToShow(flatData);
|
|
107
|
+
var hasReferences = !(0, _array.isEmpty)(referencesToShow);
|
|
108
|
+
var wrapperProps = displayAs === _constants.MODAL_KEY ? {
|
|
102
109
|
acceptButton: {
|
|
103
|
-
onClick: ()
|
|
110
|
+
onClick: function onClick() {
|
|
111
|
+
return setShowLegend(false);
|
|
112
|
+
},
|
|
104
113
|
text: referencesModalButton || ''
|
|
105
114
|
},
|
|
106
115
|
isOpen: showLegend,
|
|
107
|
-
onRequestClose: ()
|
|
116
|
+
onRequestClose: function onRequestClose() {
|
|
117
|
+
return setShowLegend(false);
|
|
118
|
+
},
|
|
108
119
|
title: referencesModalTitle,
|
|
109
120
|
withCloseButton: true
|
|
110
121
|
} : {};
|
|
@@ -120,10 +131,16 @@ const Legend = _ref => {
|
|
|
120
131
|
},
|
|
121
132
|
disabled: !hasReferences,
|
|
122
133
|
Icon: _InfoOutlined.default,
|
|
123
|
-
onClick: ()
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
},
|
|
134
|
+
onClick: function onClick() {
|
|
135
|
+
return setShowLegend(true);
|
|
136
|
+
}
|
|
137
|
+
}, buttonProps), showReferencesLabel), /*#__PURE__*/_react.default.createElement(Wrapper, wrapperProps, referencesToShow.map(function (row) {
|
|
138
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
139
|
+
className: _stylesModule.default["row".concat(displayAs)]
|
|
140
|
+
}, row.map(function (item) {
|
|
141
|
+
return referenceRenderer(item);
|
|
142
|
+
}));
|
|
143
|
+
})));
|
|
127
144
|
};
|
|
128
145
|
Legend.propTypes = {
|
|
129
146
|
buttonProps: _types.buttonPropsTypes,
|
|
@@ -139,4 +156,5 @@ Legend.propTypes = {
|
|
|
139
156
|
style: _propTypes.object,
|
|
140
157
|
title: _propTypes.string
|
|
141
158
|
};
|
|
142
|
-
var _default =
|
|
159
|
+
var _default = Legend;
|
|
160
|
+
exports.default = _default;
|
|
@@ -4,5 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.orderLegend = void 0;
|
|
7
|
-
|
|
7
|
+
var orderLegend = function orderLegend(legendOrderFunction) {
|
|
8
|
+
return function (levels, linear, bar) {
|
|
9
|
+
return legendOrderFunction ? legendOrderFunction(levels, linear, bar) : [levels, linear, bar];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
8
12
|
exports.orderLegend = orderLegend;
|
|
@@ -11,21 +11,18 @@ var _commonTypes = require("../../../../types/commonTypes");
|
|
|
11
11
|
var _utils = require("./utils");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
classes = {}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
type
|
|
27
|
-
} = _ref2;
|
|
28
|
-
const yValue = yAxis(value);
|
|
14
|
+
var Levels = function Levels(_ref) {
|
|
15
|
+
var levels = _ref.levels,
|
|
16
|
+
yAxis = _ref.yAxis,
|
|
17
|
+
graphXStart = _ref.graphXStart,
|
|
18
|
+
graphXEnd = _ref.graphXEnd,
|
|
19
|
+
_ref$classes = _ref.classes,
|
|
20
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement("g", null, levels.map(function (_ref2) {
|
|
22
|
+
var color = _ref2.color,
|
|
23
|
+
value = _ref2.value,
|
|
24
|
+
type = _ref2.type;
|
|
25
|
+
var yValue = yAxis(value);
|
|
29
26
|
return /*#__PURE__*/_react.default.createElement("line", _extends({
|
|
30
27
|
x1: graphXStart,
|
|
31
28
|
x2: graphXEnd,
|
|
@@ -42,4 +39,5 @@ Levels.propTypes = {
|
|
|
42
39
|
graphXStart: _propTypes.number,
|
|
43
40
|
classes: _commonTypes.classesType
|
|
44
41
|
};
|
|
45
|
-
var _default =
|
|
42
|
+
var _default = Levels;
|
|
43
|
+
exports.default = _default;
|
|
@@ -4,29 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getLineConfiguration = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
7
|
+
var getLineConfiguration = function getLineConfiguration(type, classes) {
|
|
8
|
+
return {
|
|
9
|
+
solid: {
|
|
10
|
+
fill: 'none',
|
|
11
|
+
strokeWidth: '1',
|
|
12
|
+
className: classes.solidLevel
|
|
13
|
+
},
|
|
14
|
+
dashed: {
|
|
15
|
+
fill: 'none',
|
|
16
|
+
strokeWidth: '1',
|
|
17
|
+
strokeDasharray: '2,2',
|
|
18
|
+
className: classes.dashedLevel
|
|
19
|
+
},
|
|
20
|
+
dotted: {
|
|
21
|
+
fill: 'none',
|
|
22
|
+
strokeWidth: '2',
|
|
23
|
+
strokeDasharray: '4',
|
|
24
|
+
className: classes.dottedLevel
|
|
25
|
+
},
|
|
26
|
+
grid: {
|
|
27
|
+
fill: 'none',
|
|
28
|
+
strokeWidth: '1',
|
|
29
|
+
strokeDasharray: '5',
|
|
30
|
+
className: classes.gridLine
|
|
31
|
+
}
|
|
32
|
+
}[type];
|
|
33
|
+
};
|
|
32
34
|
exports.getLineConfiguration = getLineConfiguration;
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MARKER_TYPES = exports.DEFAULT_MARKER_SIZE = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
var DEFAULT_MARKER_SIZE = 4;
|
|
8
|
+
exports.DEFAULT_MARKER_SIZE = DEFAULT_MARKER_SIZE;
|
|
9
|
+
var MARKER_TYPES = {
|
|
9
10
|
DOT: 'dot'
|
|
10
|
-
};
|
|
11
|
+
};
|
|
12
|
+
exports.MARKER_TYPES = MARKER_TYPES;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -9,35 +10,28 @@ var d3 = _interopRequireWildcard(require("d3"));
|
|
|
9
10
|
var _propTypes = require("prop-types");
|
|
10
11
|
var _types = require("../../types");
|
|
11
12
|
var _utils = require("./utils");
|
|
12
|
-
function _getRequireWildcardCache(
|
|
13
|
-
function _interopRequireWildcard(
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
16
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const lineGenerator = d3.line().x(_ref2 => {
|
|
28
|
-
let {
|
|
29
|
-
xCoordinate
|
|
30
|
-
} = _ref2;
|
|
17
|
+
var LinearPlot = function LinearPlot(_ref) {
|
|
18
|
+
var data = _ref.data,
|
|
19
|
+
barWidth = _ref.barWidth,
|
|
20
|
+
yAxis = _ref.yAxis,
|
|
21
|
+
xAxis = _ref.xAxis,
|
|
22
|
+
type = _ref.type,
|
|
23
|
+
color = _ref.color,
|
|
24
|
+
customLineProps = _ref.customLineProps,
|
|
25
|
+
markers = _ref.markers;
|
|
26
|
+
var lineGenerator = d3.line().x(function (_ref2) {
|
|
27
|
+
var xCoordinate = _ref2.xCoordinate;
|
|
31
28
|
return xAxis(xCoordinate) + barWidth / 2;
|
|
32
|
-
}).y(_ref3
|
|
33
|
-
|
|
34
|
-
value
|
|
35
|
-
} = _ref3;
|
|
29
|
+
}).y(function (_ref3) {
|
|
30
|
+
var value = _ref3.value;
|
|
36
31
|
return yAxis(value);
|
|
37
32
|
});
|
|
38
|
-
|
|
39
|
-
props
|
|
40
|
-
} = (0, _utils.getLineConfiguration)(type, lineGenerator);
|
|
33
|
+
var _getLineConfiguration = (0, _utils.getLineConfiguration)(type, lineGenerator),
|
|
34
|
+
props = _getLineConfiguration.props;
|
|
41
35
|
return /*#__PURE__*/_react.default.createElement("g", null, /*#__PURE__*/_react.default.createElement("path", _extends({
|
|
42
36
|
d: lineGenerator(data),
|
|
43
37
|
stroke: color
|
|
@@ -57,4 +51,5 @@ LinearPlot.propTypes = {
|
|
|
57
51
|
strokeDasharray: _propTypes.string
|
|
58
52
|
})
|
|
59
53
|
};
|
|
60
|
-
var _default =
|
|
54
|
+
var _default = LinearPlot;
|
|
55
|
+
exports.default = _default;
|
|
@@ -7,42 +7,44 @@ exports.getMarkers = exports.getLineConfiguration = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _constants = require("./constants");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
10
|
+
var DEFAULT_LINE_TYPE = 'solid';
|
|
11
|
+
var getLineConfiguration = function getLineConfiguration(type) {
|
|
12
|
+
return {
|
|
13
|
+
solid: {
|
|
14
|
+
props: {
|
|
15
|
+
fill: 'none',
|
|
16
|
+
strokeWidth: '1'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
dashed: {
|
|
20
|
+
props: {
|
|
21
|
+
fill: 'none',
|
|
22
|
+
strokeWidth: '1',
|
|
23
|
+
strokeDasharray: '2,2'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
custom: {}
|
|
27
|
+
}[type || DEFAULT_LINE_TYPE];
|
|
28
|
+
};
|
|
27
29
|
exports.getLineConfiguration = getLineConfiguration;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
xCoordinate,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
})
|
|
47
|
-
}
|
|
30
|
+
var getMarkers = function getMarkers(data, xAxis, yAxis, barWidth, color, markersConfig) {
|
|
31
|
+
return data.map(function (_ref) {
|
|
32
|
+
var xCoordinate = _ref.xCoordinate,
|
|
33
|
+
value = _ref.value;
|
|
34
|
+
var x = xAxis(xCoordinate) + barWidth / 2;
|
|
35
|
+
var y = yAxis(value);
|
|
36
|
+
var size = (markersConfig.size || _constants.DEFAULT_MARKER_SIZE) / 2;
|
|
37
|
+
return markersConfig.type === _constants.MARKER_TYPES.DOT && /*#__PURE__*/_react.default.createElement("svg", {
|
|
38
|
+
x: x - size,
|
|
39
|
+
y: y - size,
|
|
40
|
+
height: 2 * size,
|
|
41
|
+
width: 2 * size
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("circle", {
|
|
43
|
+
cx: size,
|
|
44
|
+
cy: size,
|
|
45
|
+
r: size,
|
|
46
|
+
fill: color
|
|
47
|
+
}));
|
|
48
|
+
});
|
|
49
|
+
};
|
|
48
50
|
exports.getMarkers = getMarkers;
|
|
@@ -13,26 +13,25 @@ var _UTButton = _interopRequireDefault(require("../../../UTButton"));
|
|
|
13
13
|
var _constants = require("./constants");
|
|
14
14
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
16
|
+
var Pagination = function Pagination(_ref) {
|
|
17
17
|
var _anchor$current, _anchor$current$getBo;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
height = 0
|
|
31
|
-
|
|
32
|
-
const top = y - parentYPosition + height / 2 - _constants.BUTTONS_SIZE / 2 || 0;
|
|
18
|
+
var anchor = _ref.anchor,
|
|
19
|
+
classes = _ref.classes,
|
|
20
|
+
currentPage = _ref.currentPage,
|
|
21
|
+
graphXEnd = _ref.graphXEnd,
|
|
22
|
+
graphXStart = _ref.graphXStart,
|
|
23
|
+
parentYPosition = _ref.parentYPosition,
|
|
24
|
+
setCurrentPage = _ref.setCurrentPage,
|
|
25
|
+
totalPages = _ref.totalPages;
|
|
26
|
+
var _ref2 = ((_anchor$current = anchor.current) === null || _anchor$current === void 0 || (_anchor$current$getBo = _anchor$current.getBoundingClientRect) === null || _anchor$current$getBo === void 0 ? void 0 : _anchor$current$getBo.call(_anchor$current)) || {},
|
|
27
|
+
_ref2$y = _ref2.y,
|
|
28
|
+
y = _ref2$y === void 0 ? 0 : _ref2$y,
|
|
29
|
+
_ref2$height = _ref2.height,
|
|
30
|
+
height = _ref2$height === void 0 ? 0 : _ref2$height;
|
|
31
|
+
var top = y - parentYPosition + height / 2 - _constants.BUTTONS_SIZE / 2 || 0;
|
|
33
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
33
|
style: {
|
|
35
|
-
top,
|
|
34
|
+
top: top,
|
|
36
35
|
left: graphXStart - 30,
|
|
37
36
|
width: graphXEnd - graphXStart + 60,
|
|
38
37
|
height: _constants.BUTTONS_SIZE
|
|
@@ -45,7 +44,9 @@ const Pagination = _ref => {
|
|
|
45
44
|
},
|
|
46
45
|
disabled: !currentPage,
|
|
47
46
|
Icon: _ChevronLeft.default,
|
|
48
|
-
onClick: ()
|
|
47
|
+
onClick: function onClick() {
|
|
48
|
+
return setCurrentPage(currentPage - 1);
|
|
49
|
+
},
|
|
49
50
|
variant: "text"
|
|
50
51
|
}), /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
51
52
|
classNames: {
|
|
@@ -54,7 +55,9 @@ const Pagination = _ref => {
|
|
|
54
55
|
},
|
|
55
56
|
disabled: currentPage + 1 === totalPages,
|
|
56
57
|
Icon: _ChevronRight.default,
|
|
57
|
-
onClick: ()
|
|
58
|
+
onClick: function onClick() {
|
|
59
|
+
return setCurrentPage(currentPage + 1);
|
|
60
|
+
},
|
|
58
61
|
variant: "text"
|
|
59
62
|
}));
|
|
60
63
|
};
|
|
@@ -72,4 +75,5 @@ Pagination.propTypes = {
|
|
|
72
75
|
setCurrentPage: _propTypes.func,
|
|
73
76
|
totalPages: _propTypes.number
|
|
74
77
|
};
|
|
75
|
-
var _default =
|
|
78
|
+
var _default = Pagination;
|
|
79
|
+
exports.default = _default;
|