@widergy/energy-ui 2.10.1 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/EnergyThemeProvider/index.js +12 -34
- package/dist/components/Loading/constants.js +1 -1
- package/dist/components/Loading/index.js +12 -10
- package/dist/components/Loading/theme.js +6 -3
- package/dist/components/UTAlert/AlertHandler.js +74 -99
- package/dist/components/UTAlert/index.js +64 -85
- package/dist/components/UTAlert/theme.js +34 -32
- package/dist/components/UTAttachment/components/Preview/index.js +7 -7
- package/dist/components/UTAttachment/constants.js +6 -6
- package/dist/components/UTAttachment/index.js +158 -248
- package/dist/components/UTAttachment/layout.js +25 -25
- package/dist/components/UTAttachment/theme.js +6 -3
- package/dist/components/UTAttachment/utils.js +44 -117
- package/dist/components/UTAutocomplete/components/ListBox/index.js +12 -19
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +11 -12
- package/dist/components/UTAutocomplete/constants.js +11 -11
- package/dist/components/UTAutocomplete/index.js +53 -92
- package/dist/components/UTAutocomplete/theme.js +9 -5
- package/dist/components/UTAvatar/constants.js +1 -1
- package/dist/components/UTAvatar/index.js +17 -15
- package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +21 -20
- package/dist/components/UTBarChart/components/Bars/components/Bar/constants.js +2 -1
- package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +20 -20
- package/dist/components/UTBarChart/components/Bars/constants.js +3 -3
- package/dist/components/UTBarChart/components/Bars/index.js +69 -78
- package/dist/components/UTBarChart/components/Legend/constants.js +14 -17
- package/dist/components/UTBarChart/components/Legend/index.js +74 -91
- package/dist/components/UTBarChart/components/Legend/utils.js +2 -5
- package/dist/components/UTBarChart/components/Levels/index.js +15 -12
- package/dist/components/UTBarChart/components/Levels/utils.js +26 -27
- package/dist/components/UTBarChart/components/LinearPlot/constants.js +2 -2
- package/dist/components/UTBarChart/components/LinearPlot/index.js +24 -18
- package/dist/components/UTBarChart/components/LinearPlot/utils.js +39 -39
- package/dist/components/UTBarChart/components/Pagination/constants.js +1 -1
- package/dist/components/UTBarChart/components/Pagination/index.js +19 -22
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +20 -30
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +2 -2
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +19 -17
- package/dist/components/UTBarChart/components/XAxis/constants.js +1 -1
- package/dist/components/UTBarChart/components/XAxis/index.js +53 -63
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +11 -9
- package/dist/components/UTBarChart/components/YAxis/constants.js +1 -1
- package/dist/components/UTBarChart/components/YAxis/index.js +29 -35
- package/dist/components/UTBarChart/components/YAxis/utils.js +6 -6
- package/dist/components/UTBarChart/constants.js +4 -4
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +22 -38
- package/dist/components/UTBarChart/index.js +151 -164
- package/dist/components/UTBarChart/theme.js +6 -3
- package/dist/components/UTBarChart/types.js +9 -9
- package/dist/components/UTBarChart/utils.js +118 -111
- package/dist/components/UTBreadcrumbs/constants.js +22 -24
- package/dist/components/UTBreadcrumbs/index.js +75 -99
- package/dist/components/UTBreadcrumbs/theme.js +6 -3
- package/dist/components/UTButton/constants.js +11 -11
- package/dist/components/UTButton/index.js +27 -29
- package/dist/components/UTButton/theme.js +26 -24
- package/dist/components/UTCBUInput/index.js +35 -38
- package/dist/components/UTCBUInput/theme.js +6 -3
- package/dist/components/UTCaptcha/index.js +18 -43
- package/dist/components/UTCard/components/UTCardFooter/index.js +14 -14
- package/dist/components/UTCard/index.js +84 -118
- package/dist/components/UTCard/theme.js +13 -13
- package/dist/components/UTCard/types.js +1 -1
- package/dist/components/UTCarousel/components/Button/index.js +12 -11
- package/dist/components/UTCarousel/components/Legend/index.js +12 -13
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +15 -14
- package/dist/components/UTCarousel/components/Slider/constants.js +5 -5
- package/dist/components/UTCarousel/components/Slider/index.js +203 -271
- package/dist/components/UTCarousel/components/Slider/layout.js +66 -92
- package/dist/components/UTCarousel/index.js +13 -13
- package/dist/components/UTCarousel/theme.js +6 -3
- package/dist/components/UTCheckList/constants.js +1 -1
- package/dist/components/UTCheckList/index.js +71 -91
- package/dist/components/UTCheckList/theme.js +34 -32
- package/dist/components/UTCheckbox/constants.js +2 -4
- package/dist/components/UTCheckbox/index.js +31 -42
- package/dist/components/UTCheckbox/theme.js +37 -35
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +8 -7
- package/dist/components/UTConsumptionBar/constants.js +3 -3
- package/dist/components/UTConsumptionBar/index.js +52 -78
- package/dist/components/UTCuit/index.js +108 -131
- package/dist/components/UTCuit/theme.js +52 -53
- package/dist/components/UTDatePicker/components/Day/constants.js +1 -1
- package/dist/components/UTDatePicker/components/Day/index.js +11 -10
- package/dist/components/UTDatePicker/constants.js +21 -22
- package/dist/components/UTDatePicker/index.js +59 -100
- package/dist/components/UTDatePicker/theme.js +8 -4
- package/dist/components/UTDatePicker/types.js +1 -1
- package/dist/components/UTDatePicker/utils.js +4 -6
- package/dist/components/UTDialog/constants.js +2 -2
- package/dist/components/UTDialog/index.js +37 -35
- package/dist/components/UTDialog/theme.js +6 -3
- package/dist/components/UTDialog/types.js +1 -1
- package/dist/components/UTDotMenu/index.js +38 -59
- package/dist/components/UTEmojiPicker/constants.js +5 -5
- package/dist/components/UTEmojiPicker/index.js +44 -63
- package/dist/components/UTEmojiPicker/theme.js +6 -3
- package/dist/components/UTEmojiPicker/utils.js +24 -52
- package/dist/components/UTExternalLink/constants.js +2 -2
- package/dist/components/UTExternalLink/index.js +17 -13
- package/dist/components/UTExternalLink/theme.js +11 -7
- package/dist/components/UTFileInput/constants.js +2 -2
- package/dist/components/UTFileInput/index.js +6 -29
- package/dist/components/UTFileInput/layout.js +67 -95
- package/dist/components/UTIconButton/index.js +48 -70
- package/dist/components/UTIconButton/theme.js +6 -3
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +52 -56
- package/dist/components/UTImageRadio/constants.js +3 -3
- package/dist/components/UTImageRadio/index.js +38 -45
- package/dist/components/UTImageRadio/theme.js +13 -13
- package/dist/components/UTImageRadio/types.js +1 -1
- package/dist/components/UTImageRadio/utils.js +4 -6
- package/dist/components/UTLabel/constants.js +13 -11
- package/dist/components/UTLabel/index.js +17 -18
- package/dist/components/UTLabel/theme.js +19 -16
- package/dist/components/UTList/index.js +14 -16
- package/dist/components/UTLoading/index.js +14 -13
- package/dist/components/UTMap/components/GoogleMaps/constants.js +9 -10
- package/dist/components/UTMap/components/GoogleMaps/index.js +62 -89
- package/dist/components/UTMap/constants.js +6 -6
- package/dist/components/UTMap/index.js +162 -196
- package/dist/components/UTMap/types.js +4 -3
- package/dist/components/UTMap/utils.js +35 -46
- package/dist/components/UTMap/withGoogleMapScript.js +18 -14
- package/dist/components/UTMenu/index.js +51 -67
- package/dist/components/UTMenu/theme.js +8 -4
- package/dist/components/UTMenu/utils.js +10 -12
- package/dist/components/UTModal/constants.js +9 -9
- package/dist/components/UTModal/index.js +25 -28
- package/dist/components/UTModal/theme.js +6 -3
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +10 -8
- package/dist/components/UTPagination/components/PageSizeSelector/utils.js +9 -14
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +11 -10
- package/dist/components/UTPagination/components/Pagination/index.js +27 -37
- package/dist/components/UTPagination/components/Pagination/utils.js +10 -15
- package/dist/components/UTPagination/constants.js +3 -3
- package/dist/components/UTPagination/index.js +15 -15
- package/dist/components/UTPagination/theme.js +6 -3
- package/dist/components/UTPanel/index.js +37 -42
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +12 -8
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +21 -17
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +62 -48
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +24 -24
- package/dist/components/UTPasswordField/index.js +25 -21
- package/dist/components/UTPasswordField/theme.js +6 -3
- package/dist/components/UTPhoneInput/constants.js +3 -3
- package/dist/components/UTPhoneInput/index.js +179 -203
- package/dist/components/UTPhoneInput/theme.js +79 -77
- package/dist/components/UTPieChart/components/ArrowLabel/constants.js +4 -4
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +23 -21
- package/dist/components/UTPieChart/components/Legend/contants.js +3 -3
- package/dist/components/UTPieChart/components/Legend/index.js +26 -22
- package/dist/components/UTPieChart/constants.js +13 -13
- package/dist/components/UTPieChart/hooks/use-animated-value/index.js +14 -31
- package/dist/components/UTPieChart/index.js +72 -74
- package/dist/components/UTPieChart/theme.js +6 -3
- package/dist/components/UTPieChart/utils.js +6 -3
- package/dist/components/UTProgressBar/constants.js +2 -2
- package/dist/components/UTProgressBar/index.js +14 -15
- package/dist/components/UTProgressBar/theme.js +6 -3
- package/dist/components/UTProgressBar/types.js +1 -1
- package/dist/components/UTRadioGroup/index.js +55 -81
- package/dist/components/UTRadioGroup/theme.js +54 -52
- package/dist/components/UTRating/components/Circle/index.js +40 -54
- package/dist/components/UTRating/components/Faces/assets/mood-confuzed.svg +3 -0
- package/dist/components/UTRating/components/Faces/assets/mood-empty.svg +3 -0
- package/dist/components/UTRating/components/Faces/assets/mood-happy.svg +3 -0
- package/dist/components/UTRating/components/Faces/assets/mood-sad.svg +3 -0
- package/dist/components/UTRating/components/Faces/assets/mood-smile.svg +3 -0
- package/dist/components/UTRating/components/Faces/constants.js +85 -0
- package/dist/components/UTRating/components/Faces/index.js +76 -0
- package/dist/components/UTRating/components/Faces/styles.module.scss +78 -0
- package/dist/components/UTRating/components/Star/index.js +35 -38
- package/dist/components/UTRating/constants.js +5 -4
- package/dist/components/UTRating/index.js +35 -46
- package/dist/components/UTRating/styles.module.scss +1 -0
- package/dist/components/UTRating/theme.js +52 -3
- package/dist/components/UTRipple/Ripple.js +21 -37
- package/dist/components/UTRipple/index.js +17 -35
- package/dist/components/UTSelect/components/Option/index.js +12 -11
- package/dist/components/UTSelect/constants.js +4 -4
- package/dist/components/UTSelect/index.js +62 -83
- package/dist/components/UTSelect/theme.js +9 -5
- package/dist/components/UTSelect/utils.js +5 -14
- package/dist/components/UTSidebar/components/ListOption/index.js +33 -47
- package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +7 -6
- package/dist/components/UTSidebar/components/LogosContainer/index.js +13 -12
- package/dist/components/UTSidebar/components/Option/constants.js +1 -1
- package/dist/components/UTSidebar/components/Option/index.js +27 -30
- package/dist/components/UTSidebar/components/Toggler/index.js +10 -9
- package/dist/components/UTSidebar/index.js +41 -51
- package/dist/components/UTSidebar/theme.js +6 -3
- package/dist/components/UTSidebar/types.js +5 -5
- package/dist/components/UTSkeleton/index.js +9 -34
- package/dist/components/UTStatus/constants.js +4 -4
- package/dist/components/UTStatus/index.js +15 -13
- package/dist/components/UTStatus/theme.js +70 -49
- package/dist/components/UTSwitch/constants.js +3 -3
- package/dist/components/UTSwitch/index.js +41 -55
- package/dist/components/UTSwitch/theme.js +6 -3
- package/dist/components/UTTable/components/ActionIcons/constants.js +1 -1
- package/dist/components/UTTable/components/ActionIcons/index.js +46 -83
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +9 -10
- package/dist/components/UTTable/components/Cell/index.js +17 -21
- package/dist/components/UTTable/components/HeaderCell/constants.js +1 -1
- package/dist/components/UTTable/components/HeaderCell/index.js +22 -28
- package/dist/components/UTTable/components/HeaderCell/utils.js +5 -4
- package/dist/components/UTTable/components/PrimaryAction/index.js +11 -9
- package/dist/components/UTTable/components/ResponsiveCell/index.js +18 -18
- package/dist/components/UTTable/components/Status/index.js +17 -17
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +9 -7
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +9 -14
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +11 -10
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +20 -30
- package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +10 -15
- package/dist/components/UTTable/components/TableFooter/constants.js +1 -1
- package/dist/components/UTTable/components/TableFooter/index.js +14 -13
- package/dist/components/UTTable/components/TableHeader/index.js +10 -9
- package/dist/components/UTTable/components/TableRow/constants.js +2 -4
- package/dist/components/UTTable/components/TableRow/index.js +78 -92
- package/dist/components/UTTable/constants.js +26 -24
- package/dist/components/UTTable/hook.js +13 -27
- package/dist/components/UTTable/index.js +125 -213
- package/dist/components/UTTable/theme.js +19 -18
- package/dist/components/UTTable/types.js +4 -4
- package/dist/components/UTTable/utils.js +80 -75
- package/dist/components/UTTabs/components/TooltipTab/index.js +19 -28
- package/dist/components/UTTabs/constants.js +4 -4
- package/dist/components/UTTabs/index.js +56 -84
- package/dist/components/UTTabs/theme.js +6 -3
- package/dist/components/UTTabs/utils.js +3 -2
- package/dist/components/UTTextArea/constants.js +2 -4
- package/dist/components/UTTextArea/index.js +22 -21
- package/dist/components/UTTextArea/theme.js +6 -3
- package/dist/components/UTTextInput/constants.js +1 -1
- package/dist/components/UTTextInput/index.js +136 -163
- package/dist/components/UTTextInput/theme.js +9 -5
- package/dist/components/UTThirdPartyCookieChecker/index.js +16 -19
- package/dist/components/UTToggle/components/ToggleOption/index.js +15 -15
- package/dist/components/UTToggle/index.js +24 -24
- package/dist/components/UTToggle/theme.js +6 -3
- package/dist/components/UTTooltip/index.js +22 -28
- package/dist/components/UTTooltip/theme.js +6 -3
- package/dist/components/UTTopbar/components/Notifications/index.js +10 -12
- package/dist/components/UTTopbar/components/UserMenu/index.js +14 -13
- package/dist/components/UTTopbar/index.js +27 -29
- package/dist/components/UTTopbar/theme.js +6 -3
- package/dist/components/UTTopbar/types.js +4 -4
- package/dist/components/UTTouchableWithoutFeedback/index.js +13 -25
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +2 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +33 -29
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +6 -5
- package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +6 -6
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +7 -16
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +22 -45
- package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +30 -32
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +89 -94
- package/dist/components/UTVirtualizedList/constants.js +4 -4
- package/dist/components/UTVirtualizedList/index.js +25 -36
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +14 -17
- package/dist/components/UTWorkflowContainer/constants.js +3 -3
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +5 -4
- package/dist/components/UTWorkflowContainer/index.js +31 -49
- package/dist/components/UTWorkflowContainer/theme.js +62 -54
- package/dist/components/UTWorkflowContainer/types.js +1 -1
- package/dist/components/WithLoading/index.js +9 -13
- package/dist/components/WithTheme/index.js +9 -15
- package/dist/components/WithTheme/layout.js +21 -26
- package/dist/components/WithTouch/index.js +11 -17
- package/dist/constants/UTTable.js +1 -1
- package/dist/index.js +58 -58
- package/dist/theme.js +8 -4
- package/dist/types/commonTypes.js +2 -2
- package/dist/types/consumptionTypes.js +2 -2
- package/dist/types/formTypes.js +3 -3
- package/dist/types/tableTypes.js +1 -1
- package/dist/utils/classesUtils.js +7 -13
- package/dist/utils/componentUtils.js +8 -10
- package/dist/utils/helperFunctions.js +6 -5
- package/dist/utils/shadowUtils.js +15 -12
- package/dist/utils/useScreenSize.js +1 -1
- package/package.json +2 -2
- package/CHANGELOG.md +0 -2234
|
@@ -4,30 +4,29 @@ 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
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
7
|
+
const getLineConfiguration = (type, classes) => ({
|
|
8
|
+
solid: {
|
|
9
|
+
fill: 'none',
|
|
10
|
+
strokeWidth: '1',
|
|
11
|
+
className: classes.solidLevel
|
|
12
|
+
},
|
|
13
|
+
dashed: {
|
|
14
|
+
fill: 'none',
|
|
15
|
+
strokeWidth: '1',
|
|
16
|
+
strokeDasharray: '2,2',
|
|
17
|
+
className: classes.dashedLevel
|
|
18
|
+
},
|
|
19
|
+
dotted: {
|
|
20
|
+
fill: 'none',
|
|
21
|
+
strokeWidth: '2',
|
|
22
|
+
strokeDasharray: '4',
|
|
23
|
+
className: classes.dottedLevel
|
|
24
|
+
},
|
|
25
|
+
grid: {
|
|
26
|
+
fill: 'none',
|
|
27
|
+
strokeWidth: '1',
|
|
28
|
+
strokeDasharray: '5',
|
|
29
|
+
className: classes.gridLine
|
|
30
|
+
}
|
|
31
|
+
})[type];
|
|
32
|
+
exports.getLineConfiguration = getLineConfiguration;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MARKER_TYPES = exports.DEFAULT_MARKER_SIZE = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const DEFAULT_MARKER_SIZE = exports.DEFAULT_MARKER_SIZE = 4;
|
|
8
|
+
const MARKER_TYPES = exports.MARKER_TYPES = {
|
|
9
9
|
DOT: 'dot'
|
|
10
10
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -10,28 +9,35 @@ var d3 = _interopRequireWildcard(require("d3"));
|
|
|
10
9
|
var _propTypes = require("prop-types");
|
|
11
10
|
var _types = require("../../types");
|
|
12
11
|
var _utils = require("./utils");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
15
|
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); }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
const LinearPlot = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
data,
|
|
19
|
+
barWidth,
|
|
20
|
+
yAxis,
|
|
21
|
+
xAxis,
|
|
22
|
+
type,
|
|
23
|
+
color,
|
|
24
|
+
customLineProps,
|
|
25
|
+
markers
|
|
26
|
+
} = _ref;
|
|
27
|
+
const lineGenerator = d3.line().x(_ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
xCoordinate
|
|
30
|
+
} = _ref2;
|
|
28
31
|
return xAxis(xCoordinate) + barWidth / 2;
|
|
29
|
-
}).y(
|
|
30
|
-
|
|
32
|
+
}).y(_ref3 => {
|
|
33
|
+
let {
|
|
34
|
+
value
|
|
35
|
+
} = _ref3;
|
|
31
36
|
return yAxis(value);
|
|
32
37
|
});
|
|
33
|
-
|
|
34
|
-
props
|
|
38
|
+
const {
|
|
39
|
+
props
|
|
40
|
+
} = (0, _utils.getLineConfiguration)(type, lineGenerator);
|
|
35
41
|
return /*#__PURE__*/_react.default.createElement("g", null, /*#__PURE__*/_react.default.createElement("path", _extends({
|
|
36
42
|
d: lineGenerator(data),
|
|
37
43
|
stroke: color
|
|
@@ -7,42 +7,42 @@ 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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
10
|
+
const DEFAULT_LINE_TYPE = 'solid';
|
|
11
|
+
const getLineConfiguration = type => ({
|
|
12
|
+
solid: {
|
|
13
|
+
props: {
|
|
14
|
+
fill: 'none',
|
|
15
|
+
strokeWidth: '1'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
dashed: {
|
|
19
|
+
props: {
|
|
20
|
+
fill: 'none',
|
|
21
|
+
strokeWidth: '1',
|
|
22
|
+
strokeDasharray: '2,2'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
custom: {}
|
|
26
|
+
})[type || DEFAULT_LINE_TYPE];
|
|
27
|
+
exports.getLineConfiguration = getLineConfiguration;
|
|
28
|
+
const getMarkers = (data, xAxis, yAxis, barWidth, color, markersConfig) => data.map(_ref => {
|
|
29
|
+
let {
|
|
30
|
+
xCoordinate,
|
|
31
|
+
value
|
|
32
|
+
} = _ref;
|
|
33
|
+
const x = xAxis(xCoordinate) + barWidth / 2;
|
|
34
|
+
const y = yAxis(value);
|
|
35
|
+
const size = (markersConfig.size || _constants.DEFAULT_MARKER_SIZE) / 2;
|
|
36
|
+
return markersConfig.type === _constants.MARKER_TYPES.DOT && /*#__PURE__*/_react.default.createElement("svg", {
|
|
37
|
+
x: x - size,
|
|
38
|
+
y: y - size,
|
|
39
|
+
height: 2 * size,
|
|
40
|
+
width: 2 * size
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement("circle", {
|
|
42
|
+
cx: size,
|
|
43
|
+
cy: size,
|
|
44
|
+
r: size,
|
|
45
|
+
fill: color
|
|
46
|
+
}));
|
|
47
|
+
});
|
|
48
|
+
exports.getMarkers = getMarkers;
|
|
@@ -13,25 +13,26 @@ 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
|
+
const Pagination = _ref => {
|
|
17
17
|
var _anchor$current, _anchor$current$getBo;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
height =
|
|
31
|
-
|
|
18
|
+
let {
|
|
19
|
+
anchor,
|
|
20
|
+
classes,
|
|
21
|
+
currentPage,
|
|
22
|
+
graphXEnd,
|
|
23
|
+
graphXStart,
|
|
24
|
+
parentYPosition,
|
|
25
|
+
setCurrentPage,
|
|
26
|
+
totalPages
|
|
27
|
+
} = _ref;
|
|
28
|
+
const {
|
|
29
|
+
y = 0,
|
|
30
|
+
height = 0
|
|
31
|
+
} = ((_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)) || {};
|
|
32
|
+
const top = y - parentYPosition + height / 2 - _constants.BUTTONS_SIZE / 2 || 0;
|
|
32
33
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
34
|
style: {
|
|
34
|
-
top
|
|
35
|
+
top,
|
|
35
36
|
left: graphXStart - 30,
|
|
36
37
|
width: graphXEnd - graphXStart + 60,
|
|
37
38
|
height: _constants.BUTTONS_SIZE
|
|
@@ -44,9 +45,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
44
45
|
},
|
|
45
46
|
disabled: !currentPage,
|
|
46
47
|
Icon: _ChevronLeft.default,
|
|
47
|
-
onClick:
|
|
48
|
-
return setCurrentPage(currentPage - 1);
|
|
49
|
-
},
|
|
48
|
+
onClick: () => setCurrentPage(currentPage - 1),
|
|
50
49
|
variant: "text"
|
|
51
50
|
}), /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
52
51
|
classNames: {
|
|
@@ -55,9 +54,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
55
54
|
},
|
|
56
55
|
disabled: currentPage + 1 === totalPages,
|
|
57
56
|
Icon: _ChevronRight.default,
|
|
58
|
-
onClick:
|
|
59
|
-
return setCurrentPage(currentPage + 1);
|
|
60
|
-
},
|
|
57
|
+
onClick: () => setCurrentPage(currentPage + 1),
|
|
61
58
|
variant: "text"
|
|
62
59
|
}));
|
|
63
60
|
};
|
|
@@ -1,40 +1,32 @@
|
|
|
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _propTypes = require("prop-types");
|
|
10
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
11
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
11
|
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); }
|
|
13
|
-
|
|
14
|
-
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."); }
|
|
15
|
-
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); }
|
|
16
|
-
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; }
|
|
17
|
-
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; } }
|
|
18
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
|
-
var AxisElement = function AxisElement(_ref) {
|
|
12
|
+
const AxisElement = _ref => {
|
|
20
13
|
var _textRef$getBoundingC, _textRef$getBoundingC2, _textRef$getBoundingC3;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
setTextRef = _useState2[1];
|
|
14
|
+
let {
|
|
15
|
+
x,
|
|
16
|
+
graphYStart,
|
|
17
|
+
className,
|
|
18
|
+
mainLabel,
|
|
19
|
+
mainLabelStyles,
|
|
20
|
+
secondaryLabel,
|
|
21
|
+
color,
|
|
22
|
+
yOffset,
|
|
23
|
+
circle,
|
|
24
|
+
selected,
|
|
25
|
+
selectedLabelBackground,
|
|
26
|
+
labelBackgroundPadding
|
|
27
|
+
} = _ref;
|
|
28
|
+
const y = graphYStart + yOffset;
|
|
29
|
+
const [textRef, setTextRef] = (0, _react.useState)();
|
|
38
30
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, secondaryLabel && /*#__PURE__*/_react.default.createElement("text", {
|
|
39
31
|
className: className,
|
|
40
32
|
textAnchor: "middle",
|
|
@@ -52,9 +44,7 @@ var AxisElement = function AxisElement(_ref) {
|
|
|
52
44
|
fill: selectedLabelBackground,
|
|
53
45
|
rx: "14"
|
|
54
46
|
}), /*#__PURE__*/_react.default.createElement("text", _extends({
|
|
55
|
-
ref:
|
|
56
|
-
return setTextRef(el);
|
|
57
|
-
},
|
|
47
|
+
ref: el => setTextRef(el),
|
|
58
48
|
className: className,
|
|
59
49
|
textAnchor: "middle",
|
|
60
50
|
fill: color,
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.LINE_PADDING_Y = exports.LINE_PADDING_X = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const LINE_PADDING_X = exports.LINE_PADDING_X = 5;
|
|
8
|
+
const LINE_PADDING_Y = exports.LINE_PADDING_Y = 20;
|
|
@@ -1,6 +1,5 @@
|
|
|
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -9,23 +8,26 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
8
|
var _propTypes = require("prop-types");
|
|
10
9
|
var _commonTypes = require("../../../../../../types/commonTypes");
|
|
11
10
|
var _constants = require("./constants");
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
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); }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
const Decoration = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
decoration,
|
|
17
|
+
barWidth,
|
|
18
|
+
graphYStart,
|
|
19
|
+
offset,
|
|
20
|
+
classes
|
|
21
|
+
} = _ref;
|
|
22
|
+
const {
|
|
23
|
+
x,
|
|
24
|
+
label,
|
|
25
|
+
position,
|
|
26
|
+
textAnchor,
|
|
27
|
+
textProps = {},
|
|
28
|
+
withLine
|
|
29
|
+
} = decoration;
|
|
30
|
+
const xCoordinate = x + (position === 'center' ? barWidth / 2 : 0);
|
|
29
31
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("text", _extends({
|
|
30
32
|
className: classes.decoration,
|
|
31
33
|
textAnchor: textAnchor,
|
|
@@ -1,6 +1,5 @@
|
|
|
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -14,46 +13,35 @@ var _AxisElement = _interopRequireDefault(require("./components/AxisElement"));
|
|
|
14
13
|
var _Decoration = _interopRequireDefault(require("./components/Decoration"));
|
|
15
14
|
var _constants = require("./constants");
|
|
16
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
18
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
pagination: pagination
|
|
47
|
-
});
|
|
48
|
-
}, [data, currentPage, pagination, decoratorRenderer]) || [];
|
|
49
|
-
var _useState = (0, _react.useState)(0),
|
|
50
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
51
|
-
offset = _useState2[0],
|
|
52
|
-
setOffset = _useState2[1];
|
|
53
|
-
var formattedDecorators = (0, _react.useMemo)(function () {
|
|
54
|
-
return (0, _utils.getFormattedDecorators)(xAxis, decorations, currentPage, pagination);
|
|
55
|
-
}, [decorations]);
|
|
56
|
-
(0, _react.useEffect)(function () {
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
const XAxis = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
data,
|
|
21
|
+
setRef,
|
|
22
|
+
classes,
|
|
23
|
+
barWidth,
|
|
24
|
+
xAxisDefinition,
|
|
25
|
+
xAxis,
|
|
26
|
+
graphYStart,
|
|
27
|
+
graphXStart,
|
|
28
|
+
graphXEnd,
|
|
29
|
+
decoratorRenderer,
|
|
30
|
+
pagination,
|
|
31
|
+
currentPage,
|
|
32
|
+
initialHeight,
|
|
33
|
+
paginationRef,
|
|
34
|
+
currentLabel
|
|
35
|
+
} = _ref;
|
|
36
|
+
const xOffset = barWidth / 2;
|
|
37
|
+
const decorations = (0, _react.useMemo)(() => decoratorRenderer === null || decoratorRenderer === void 0 ? void 0 : decoratorRenderer({
|
|
38
|
+
data,
|
|
39
|
+
currentPage,
|
|
40
|
+
pagination
|
|
41
|
+
}), [data, currentPage, pagination, decoratorRenderer]) || [];
|
|
42
|
+
const [offset, setOffset] = (0, _react.useState)(0);
|
|
43
|
+
const formattedDecorators = (0, _react.useMemo)(() => (0, _utils.getFormattedDecorators)(xAxis, decorations, currentPage, pagination), [decorations]);
|
|
44
|
+
(0, _react.useEffect)(() => {
|
|
57
45
|
if (!offset && initialHeight > 0) {
|
|
58
46
|
setOffset(initialHeight);
|
|
59
47
|
}
|
|
@@ -70,14 +58,16 @@ var XAxis = function XAxis(_ref) {
|
|
|
70
58
|
className: classes.xAxis
|
|
71
59
|
}), /*#__PURE__*/_react.default.createElement("g", null, /*#__PURE__*/_react.default.createElement("g", {
|
|
72
60
|
ref: paginationRef
|
|
73
|
-
}, xAxisDefinition.map(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
61
|
+
}, xAxisDefinition.map((_ref2, index) => {
|
|
62
|
+
let {
|
|
63
|
+
mainLabel,
|
|
64
|
+
color,
|
|
65
|
+
mainLabelStyles,
|
|
66
|
+
circle,
|
|
67
|
+
selectedLabelBackground,
|
|
68
|
+
labelBackgroundPadding
|
|
69
|
+
} = _ref2;
|
|
70
|
+
const selected = index === currentLabel;
|
|
81
71
|
return /*#__PURE__*/_react.default.createElement(_AxisElement.default, {
|
|
82
72
|
className: "".concat(classes.xAxisMainLabel, " ").concat(selected && classes.xAxisSelectedLabel),
|
|
83
73
|
barWidth: barWidth,
|
|
@@ -92,9 +82,11 @@ var XAxis = function XAxis(_ref) {
|
|
|
92
82
|
selectedLabelBackground: selectedLabelBackground,
|
|
93
83
|
labelBackgroundPadding: labelBackgroundPadding
|
|
94
84
|
});
|
|
95
|
-
})), /*#__PURE__*/_react.default.createElement("g", null, xAxisDefinition.map(
|
|
96
|
-
|
|
97
|
-
|
|
85
|
+
})), /*#__PURE__*/_react.default.createElement("g", null, xAxisDefinition.map((_ref3, index) => {
|
|
86
|
+
let {
|
|
87
|
+
secondaryLabel,
|
|
88
|
+
color
|
|
89
|
+
} = _ref3;
|
|
98
90
|
return /*#__PURE__*/_react.default.createElement(_AxisElement.default, {
|
|
99
91
|
className: classes.xAxisSecondaryLabel,
|
|
100
92
|
barWidth: barWidth,
|
|
@@ -104,17 +96,15 @@ var XAxis = function XAxis(_ref) {
|
|
|
104
96
|
graphYStart: graphYStart,
|
|
105
97
|
yOffset: _constants.Y_OFFSET
|
|
106
98
|
});
|
|
107
|
-
})))), /*#__PURE__*/_react.default.createElement("g", null, formattedDecorators.map(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
});
|
|
117
|
-
})));
|
|
99
|
+
})))), /*#__PURE__*/_react.default.createElement("g", null, formattedDecorators.map(decoration => /*#__PURE__*/_react.default.createElement(_Decoration.default, {
|
|
100
|
+
classes: classes,
|
|
101
|
+
barWidth: barWidth,
|
|
102
|
+
xAxis: xAxis,
|
|
103
|
+
decoration: decoration,
|
|
104
|
+
offset: offset + _constants.Y_OFFSET,
|
|
105
|
+
graphYStart: graphYStart,
|
|
106
|
+
yOffset: _constants.Y_OFFSET
|
|
107
|
+
}))));
|
|
118
108
|
};
|
|
119
109
|
XAxis.propTypes = {
|
|
120
110
|
classes: _commonTypes.classesType,
|
|
@@ -8,15 +8,17 @@ var _propTypes = require("prop-types");
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _commonTypes = require("../../../../../types/commonTypes");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
const AxisElement = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
x,
|
|
14
|
+
value,
|
|
15
|
+
label,
|
|
16
|
+
textAnchor,
|
|
17
|
+
yAxis,
|
|
18
|
+
height,
|
|
19
|
+
setRef,
|
|
20
|
+
className
|
|
21
|
+
} = _ref;
|
|
20
22
|
return /*#__PURE__*/_react.default.createElement("text", {
|
|
21
23
|
className: className,
|
|
22
24
|
ref: setRef,
|