@widergy/energy-ui 1.136.0 → 1.136.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.
Files changed (256) hide show
  1. package/dist/components/EnergyThemeProvider/index.js +13 -36
  2. package/dist/components/Loading/constants.js +1 -2
  3. package/dist/components/Loading/index.js +13 -12
  4. package/dist/components/Loading/theme.js +9 -11
  5. package/dist/components/UTAlert/AlertHandler.js +75 -101
  6. package/dist/components/UTAlert/index.js +65 -87
  7. package/dist/components/UTAlert/theme.js +29 -31
  8. package/dist/components/UTAttachment/components/Preview/index.js +8 -9
  9. package/dist/components/UTAttachment/constants.js +7 -13
  10. package/dist/components/UTAttachment/index.js +153 -232
  11. package/dist/components/UTAttachment/layout.js +25 -26
  12. package/dist/components/UTAttachment/theme.js +12 -14
  13. package/dist/components/UTAttachment/utils.js +34 -117
  14. package/dist/components/UTAutocomplete/components/ListBox/index.js +13 -21
  15. package/dist/components/UTAutocomplete/components/ListBox/utils.js +9 -11
  16. package/dist/components/UTAutocomplete/constants.js +12 -23
  17. package/dist/components/UTAutocomplete/index.js +45 -66
  18. package/dist/components/UTAutocomplete/theme.js +3 -3
  19. package/dist/components/UTAvatar/constants.js +2 -3
  20. package/dist/components/UTAvatar/index.js +15 -12
  21. package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +22 -22
  22. package/dist/components/UTBarChart/components/Bars/components/Bar/constants.js +1 -1
  23. package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +21 -22
  24. package/dist/components/UTBarChart/components/Bars/constants.js +3 -6
  25. package/dist/components/UTBarChart/components/Bars/index.js +70 -80
  26. package/dist/components/UTBarChart/components/Legend/constants.js +12 -18
  27. package/dist/components/UTBarChart/components/Legend/index.js +73 -91
  28. package/dist/components/UTBarChart/components/Legend/utils.js +1 -5
  29. package/dist/components/UTBarChart/components/Levels/index.js +16 -14
  30. package/dist/components/UTBarChart/components/Levels/utils.js +25 -27
  31. package/dist/components/UTBarChart/components/LinearPlot/constants.js +3 -5
  32. package/dist/components/UTBarChart/components/LinearPlot/index.js +25 -20
  33. package/dist/components/UTBarChart/components/LinearPlot/utils.js +37 -39
  34. package/dist/components/UTBarChart/components/Pagination/constants.js +1 -2
  35. package/dist/components/UTBarChart/components/Pagination/index.js +20 -24
  36. package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +21 -32
  37. package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +2 -4
  38. package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +20 -19
  39. package/dist/components/UTBarChart/components/XAxis/constants.js +1 -2
  40. package/dist/components/UTBarChart/components/XAxis/index.js +54 -65
  41. package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +12 -11
  42. package/dist/components/UTBarChart/components/YAxis/constants.js +1 -2
  43. package/dist/components/UTBarChart/components/YAxis/index.js +24 -31
  44. package/dist/components/UTBarChart/components/YAxis/utils.js +4 -6
  45. package/dist/components/UTBarChart/constants.js +4 -8
  46. package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +23 -40
  47. package/dist/components/UTBarChart/index.js +148 -162
  48. package/dist/components/UTBarChart/theme.js +102 -104
  49. package/dist/components/UTBarChart/types.js +9 -17
  50. package/dist/components/UTBarChart/utils.js +107 -111
  51. package/dist/components/UTBreadcrumbs/constants.js +3 -6
  52. package/dist/components/UTBreadcrumbs/index.js +79 -106
  53. package/dist/components/UTBreadcrumbs/theme.js +21 -23
  54. package/dist/components/UTButton/index.js +48 -71
  55. package/dist/components/UTButton/theme.js +172 -174
  56. package/dist/components/UTCBUInput/index.js +36 -40
  57. package/dist/components/UTCBUInput/theme.js +5 -7
  58. package/dist/components/UTCaptcha/index.js +19 -45
  59. package/dist/components/UTCard/components/UTCardFooter/index.js +16 -17
  60. package/dist/components/UTCard/index.js +87 -122
  61. package/dist/components/UTCard/theme.js +8 -11
  62. package/dist/components/UTCard/types.js +2 -3
  63. package/dist/components/UTCarousel/components/Button/index.js +13 -13
  64. package/dist/components/UTCarousel/components/Legend/index.js +14 -16
  65. package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +16 -16
  66. package/dist/components/UTCarousel/components/Slider/constants.js +5 -10
  67. package/dist/components/UTCarousel/components/Slider/index.js +181 -252
  68. package/dist/components/UTCarousel/components/Slider/layout.js +66 -93
  69. package/dist/components/UTCarousel/index.js +14 -15
  70. package/dist/components/UTCarousel/theme.js +35 -37
  71. package/dist/components/UTCheckList/constants.js +1 -2
  72. package/dist/components/UTCheckList/index.js +72 -91
  73. package/dist/components/UTCheckList/theme.js +66 -70
  74. package/dist/components/UTCheckbox/constants.js +3 -6
  75. package/dist/components/UTCheckbox/index.js +31 -42
  76. package/dist/components/UTCheckbox/theme.js +49 -53
  77. package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +9 -9
  78. package/dist/components/UTConsumptionBar/constants.js +3 -6
  79. package/dist/components/UTConsumptionBar/index.js +49 -74
  80. package/dist/components/UTCuit/index.js +109 -133
  81. package/dist/components/UTCuit/theme.js +47 -49
  82. package/dist/components/UTDatePicker/components/Day/constants.js +1 -2
  83. package/dist/components/UTDatePicker/components/Day/index.js +12 -12
  84. package/dist/components/UTDatePicker/constants.js +20 -31
  85. package/dist/components/UTDatePicker/index.js +59 -101
  86. package/dist/components/UTDatePicker/theme.js +173 -177
  87. package/dist/components/UTDatePicker/types.js +2 -3
  88. package/dist/components/UTDatePicker/utils.js +2 -6
  89. package/dist/components/UTDialog/components/ActionButton/index.js +10 -9
  90. package/dist/components/UTDialog/constants.js +2 -4
  91. package/dist/components/UTDialog/index.js +39 -38
  92. package/dist/components/UTDialog/theme.js +93 -95
  93. package/dist/components/UTDialog/types.js +2 -3
  94. package/dist/components/UTDotMenu/index.js +33 -57
  95. package/dist/components/UTEmojiPicker/constants.js +6 -11
  96. package/dist/components/UTEmojiPicker/index.js +45 -65
  97. package/dist/components/UTEmojiPicker/theme.js +1 -1
  98. package/dist/components/UTEmojiPicker/utils.js +21 -51
  99. package/dist/components/UTExternalLink/index.js +17 -14
  100. package/dist/components/UTFileInput/constants.js +2 -4
  101. package/dist/components/UTFileInput/index.js +7 -31
  102. package/dist/components/UTFileInput/layout.js +67 -96
  103. package/dist/components/UTIconButton/index.js +49 -72
  104. package/dist/components/UTIconButton/theme.js +53 -55
  105. package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +53 -58
  106. package/dist/components/UTImageRadio/constants.js +3 -6
  107. package/dist/components/UTImageRadio/index.js +39 -47
  108. package/dist/components/UTImageRadio/theme.js +8 -11
  109. package/dist/components/UTImageRadio/types.js +2 -3
  110. package/dist/components/UTImageRadio/utils.js +2 -6
  111. package/dist/components/UTLabel/index.js +69 -90
  112. package/dist/components/UTLabel/theme.js +84 -86
  113. package/dist/components/UTList/index.js +15 -18
  114. package/dist/components/UTLoading/index.js +15 -15
  115. package/dist/components/UTMap/components/GoogleMaps/constants.js +8 -11
  116. package/dist/components/UTMap/components/GoogleMaps/index.js +63 -91
  117. package/dist/components/UTMap/components/GoogleMaps/styles.js +2 -3
  118. package/dist/components/UTMap/constants.js +6 -12
  119. package/dist/components/UTMap/index.js +163 -198
  120. package/dist/components/UTMap/types.js +4 -6
  121. package/dist/components/UTMap/utils.js +29 -46
  122. package/dist/components/UTMap/withGoogleMapScript.js +12 -17
  123. package/dist/components/UTMenu/index.js +52 -69
  124. package/dist/components/UTMenu/theme.js +2 -2
  125. package/dist/components/UTMenu/utils.js +5 -11
  126. package/dist/components/UTPagination/theme.js +4 -2
  127. package/dist/components/UTPanel/index.js +38 -44
  128. package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +14 -11
  129. package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +24 -21
  130. package/dist/components/UTPasswordField/components/PasswordValidations/index.js +63 -50
  131. package/dist/components/UTPasswordField/components/PasswordWarning/index.js +26 -27
  132. package/dist/components/UTPasswordField/index.js +26 -23
  133. package/dist/components/UTPasswordField/theme.js +37 -39
  134. package/dist/components/UTPhoneInput/constants.js +3 -6
  135. package/dist/components/UTPhoneInput/index.js +180 -205
  136. package/dist/components/UTPhoneInput/theme.js +109 -113
  137. package/dist/components/UTPieChart/components/ArrowLabel/constants.js +4 -8
  138. package/dist/components/UTPieChart/components/ArrowLabel/index.js +24 -23
  139. package/dist/components/UTPieChart/components/Legend/contants.js +3 -6
  140. package/dist/components/UTPieChart/components/Legend/index.js +27 -24
  141. package/dist/components/UTPieChart/constants.js +13 -26
  142. package/dist/components/UTPieChart/hooks/use-animated-value/index.js +15 -33
  143. package/dist/components/UTPieChart/index.js +73 -76
  144. package/dist/components/UTPieChart/theme.js +23 -25
  145. package/dist/components/UTPieChart/utils.js +4 -2
  146. package/dist/components/UTProgressBar/constants.js +2 -4
  147. package/dist/components/UTProgressBar/index.js +12 -11
  148. package/dist/components/UTProgressBar/theme.js +25 -27
  149. package/dist/components/UTProgressBar/types.js +2 -3
  150. package/dist/components/UTRadioGroup/index.js +45 -71
  151. package/dist/components/UTRadioGroup/theme.js +82 -86
  152. package/dist/components/UTRating/components/Circle/index.js +41 -56
  153. package/dist/components/UTRating/components/Faces/constants.js +2 -4
  154. package/dist/components/UTRating/components/Faces/index.js +34 -36
  155. package/dist/components/UTRating/components/Star/index.js +36 -40
  156. package/dist/components/UTRating/constants.js +4 -8
  157. package/dist/components/UTRating/index.js +31 -46
  158. package/dist/components/UTRating/theme.js +77 -79
  159. package/dist/components/UTRipple/Ripple.js +22 -39
  160. package/dist/components/UTRipple/index.js +18 -37
  161. package/dist/components/UTSelect/components/Option/index.js +13 -13
  162. package/dist/components/UTSelect/constants.js +4 -8
  163. package/dist/components/UTSelect/index.js +61 -81
  164. package/dist/components/UTSelect/stylesJS.js +2 -3
  165. package/dist/components/UTSelect/theme.js +43 -45
  166. package/dist/components/UTSelect/utils.js +3 -13
  167. package/dist/components/UTSidebar/components/ListOption/index.js +32 -47
  168. package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +8 -8
  169. package/dist/components/UTSidebar/components/LogosContainer/index.js +14 -14
  170. package/dist/components/UTSidebar/components/Option/constants.js +2 -3
  171. package/dist/components/UTSidebar/components/Option/index.js +28 -32
  172. package/dist/components/UTSidebar/components/Toggler/index.js +11 -11
  173. package/dist/components/UTSidebar/index.js +42 -53
  174. package/dist/components/UTSidebar/theme.js +1 -1
  175. package/dist/components/UTSidebar/types.js +5 -10
  176. package/dist/components/UTSkeleton/index.js +10 -36
  177. package/dist/components/UTSwitch/constants.js +3 -6
  178. package/dist/components/UTSwitch/index.js +42 -57
  179. package/dist/components/UTSwitch/theme.js +115 -117
  180. package/dist/components/UTTable/components/ActionIcons/constants.js +1 -2
  181. package/dist/components/UTTable/components/ActionIcons/index.js +44 -81
  182. package/dist/components/UTTable/components/Cell/index.js +18 -23
  183. package/dist/components/UTTable/components/HeaderCell/constants.js +2 -3
  184. package/dist/components/UTTable/components/HeaderCell/index.js +23 -30
  185. package/dist/components/UTTable/components/HeaderCell/utils.js +3 -3
  186. package/dist/components/UTTable/components/PrimaryAction/index.js +12 -11
  187. package/dist/components/UTTable/components/ResponsiveCell/index.js +19 -20
  188. package/dist/components/UTTable/components/Status/index.js +18 -19
  189. package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +10 -9
  190. package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +7 -13
  191. package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +12 -12
  192. package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +21 -32
  193. package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +8 -14
  194. package/dist/components/UTTable/components/TableFooter/constants.js +1 -2
  195. package/dist/components/UTTable/components/TableFooter/index.js +15 -15
  196. package/dist/components/UTTable/components/TableHeader/index.js +11 -11
  197. package/dist/components/UTTable/components/TableRow/constants.js +3 -6
  198. package/dist/components/UTTable/components/TableRow/index.js +79 -94
  199. package/dist/components/UTTable/constants.js +26 -43
  200. package/dist/components/UTTable/hook.js +11 -26
  201. package/dist/components/UTTable/index.js +125 -213
  202. package/dist/components/UTTable/theme.js +13 -16
  203. package/dist/components/UTTable/types.js +4 -8
  204. package/dist/components/UTTable/utils.js +70 -74
  205. package/dist/components/UTTabs/components/TooltipTab/index.js +20 -30
  206. package/dist/components/UTTabs/constants.js +4 -8
  207. package/dist/components/UTTabs/index.js +55 -84
  208. package/dist/components/UTTabs/theme.js +112 -114
  209. package/dist/components/UTTabs/utils.js +1 -1
  210. package/dist/components/UTTextArea/constants.js +4 -6
  211. package/dist/components/UTTextArea/index.js +40 -24
  212. package/dist/components/UTTextArea/styles.module.scss +20 -1
  213. package/dist/components/UTTextArea/theme.js +1 -1
  214. package/dist/components/UTTextInput/constants.js +2 -3
  215. package/dist/components/UTTextInput/index.js +116 -146
  216. package/dist/components/UTTextInput/theme.js +28 -30
  217. package/dist/components/UTThirdPartyCookieChecker/index.js +17 -21
  218. package/dist/components/UTToggle/components/ToggleOption/index.js +16 -17
  219. package/dist/components/UTToggle/index.js +25 -26
  220. package/dist/components/UTToggle/theme.js +47 -49
  221. package/dist/components/UTTooltip/index.js +23 -30
  222. package/dist/components/UTTooltip/theme.js +1 -1
  223. package/dist/components/UTTopbar/theme.js +4 -2
  224. package/dist/components/UTTouchableWithoutFeedback/index.js +14 -27
  225. package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +2 -4
  226. package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +34 -31
  227. package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +4 -4
  228. package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +6 -12
  229. package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +8 -18
  230. package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +23 -47
  231. package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +31 -34
  232. package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +81 -93
  233. package/dist/components/UTVirtualizedList/constants.js +4 -8
  234. package/dist/components/UTVirtualizedList/index.js +26 -38
  235. package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +11 -11
  236. package/dist/components/UTWorkflowContainer/constants.js +5 -9
  237. package/dist/components/UTWorkflowContainer/hooks/use-previous.js +3 -3
  238. package/dist/components/UTWorkflowContainer/index.js +31 -50
  239. package/dist/components/UTWorkflowContainer/theme.js +70 -64
  240. package/dist/components/UTWorkflowContainer/types.js +2 -3
  241. package/dist/components/WithLoading/index.js +10 -15
  242. package/dist/components/WithTheme/index.js +10 -17
  243. package/dist/components/WithTheme/layout.js +18 -41
  244. package/dist/components/WithTouch/index.js +12 -19
  245. package/dist/index.js +54 -54
  246. package/dist/scss/variables/colors.module.scss +1 -0
  247. package/dist/theme.js +5 -3
  248. package/dist/types/commonTypes.js +3 -5
  249. package/dist/types/consumptionTypes.js +3 -5
  250. package/dist/types/formTypes.js +4 -7
  251. package/dist/types/tableTypes.js +2 -3
  252. package/dist/utils/classesUtils.js +4 -10
  253. package/dist/utils/componentUtils.js +10 -13
  254. package/dist/utils/helperFunctions.js +4 -4
  255. package/dist/utils/useScreenSize.js +2 -3
  256. package/package.json +1 -1
@@ -11,18 +11,21 @@ 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
- 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);
14
+ const Levels = _ref => {
15
+ let {
16
+ levels,
17
+ yAxis,
18
+ graphXStart,
19
+ graphXEnd,
20
+ classes = {}
21
+ } = _ref;
22
+ return /*#__PURE__*/_react.default.createElement("g", null, levels.map(_ref2 => {
23
+ let {
24
+ color,
25
+ value,
26
+ type
27
+ } = _ref2;
28
+ const yValue = yAxis(value);
26
29
  return /*#__PURE__*/_react.default.createElement("line", _extends({
27
30
  x1: graphXStart,
28
31
  x2: graphXEnd,
@@ -39,5 +42,4 @@ Levels.propTypes = {
39
42
  graphXStart: _propTypes.number,
40
43
  classes: _commonTypes.classesType
41
44
  };
42
- var _default = Levels;
43
- exports.default = _default;
45
+ var _default = exports.default = Levels;
@@ -4,31 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getLineConfiguration = void 0;
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
- };
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];
34
32
  exports.getLineConfiguration = getLineConfiguration;
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.MARKER_TYPES = exports.DEFAULT_MARKER_SIZE = void 0;
7
- var DEFAULT_MARKER_SIZE = 4;
8
- exports.DEFAULT_MARKER_SIZE = DEFAULT_MARKER_SIZE;
9
- var MARKER_TYPES = {
7
+ const DEFAULT_MARKER_SIZE = exports.DEFAULT_MARKER_SIZE = 4;
8
+ const MARKER_TYPES = exports.MARKER_TYPES = {
10
9
  DOT: 'dot'
11
- };
12
- exports.MARKER_TYPES = MARKER_TYPES;
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(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; }
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
- 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;
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(function (_ref3) {
30
- var value = _ref3.value;
32
+ }).y(_ref3 => {
33
+ let {
34
+ value
35
+ } = _ref3;
31
36
  return yAxis(value);
32
37
  });
33
- var _getLineConfiguration = (0, _utils.getLineConfiguration)(type, lineGenerator),
34
- props = _getLineConfiguration.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
@@ -51,5 +57,4 @@ LinearPlot.propTypes = {
51
57
  strokeDasharray: _propTypes.string
52
58
  })
53
59
  };
54
- var _default = LinearPlot;
55
- exports.default = _default;
60
+ var _default = exports.default = LinearPlot;
@@ -7,44 +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
- 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
- };
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];
29
27
  exports.getLineConfiguration = getLineConfiguration;
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
- };
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
+ });
50
48
  exports.getMarkers = getMarkers;
@@ -4,5 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.BUTTONS_SIZE = void 0;
7
- var BUTTONS_SIZE = 48;
8
- exports.BUTTONS_SIZE = BUTTONS_SIZE;
7
+ const BUTTONS_SIZE = exports.BUTTONS_SIZE = 48;
@@ -13,25 +13,26 @@ var _UTIconButton = _interopRequireDefault(require("../../../UTIconButton"));
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
- var Pagination = function Pagination(_ref) {
16
+ const Pagination = _ref => {
17
17
  var _anchor$current, _anchor$current$getBo;
18
- var setCurrentPage = _ref.setCurrentPage,
19
- currentPage = _ref.currentPage,
20
- totalPages = _ref.totalPages,
21
- anchor = _ref.anchor,
22
- graphXStart = _ref.graphXStart,
23
- graphXEnd = _ref.graphXEnd,
24
- parentYPosition = _ref.parentYPosition,
25
- classes = _ref.classes;
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;
18
+ let {
19
+ setCurrentPage,
20
+ currentPage,
21
+ totalPages,
22
+ anchor,
23
+ graphXStart,
24
+ graphXEnd,
25
+ parentYPosition,
26
+ classes
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: top,
35
+ top,
35
36
  left: graphXStart - 30,
36
37
  width: graphXEnd - graphXStart + 60,
37
38
  height: _constants.BUTTONS_SIZE
@@ -39,17 +40,13 @@ var Pagination = function Pagination(_ref) {
39
40
  className: _stylesModule.default.container
40
41
  }, /*#__PURE__*/_react.default.createElement(_UTIconButton.default, {
41
42
  disabled: !currentPage,
42
- onClick: function onClick() {
43
- return setCurrentPage(currentPage - 1);
44
- },
43
+ onClick: () => setCurrentPage(currentPage - 1),
45
44
  className: _stylesModule.default.button
46
45
  }, /*#__PURE__*/_react.default.createElement(_ChevronLeft.default, {
47
46
  className: currentPage ? classes.paginationButton : classes.paginationButtonDisabled
48
47
  })), /*#__PURE__*/_react.default.createElement(_UTIconButton.default, {
49
48
  disabled: currentPage + 1 === totalPages,
50
- onClick: function onClick() {
51
- return setCurrentPage(currentPage + 1);
52
- },
49
+ onClick: () => setCurrentPage(currentPage + 1),
53
50
  className: _stylesModule.default.button
54
51
  }, /*#__PURE__*/_react.default.createElement(_ChevronRight.default, {
55
52
  className: currentPage + 1 === totalPages ? classes.paginationButtonDisabled : classes.paginationButton
@@ -69,5 +66,4 @@ Pagination.propTypes = {
69
66
  parentYPosition: _propTypes.number,
70
67
  classes: _commonTypes.classesType
71
68
  };
72
- var _default = Pagination;
73
- exports.default = _default;
69
+ var _default = exports.default = Pagination;
@@ -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(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); }
11
- 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; }
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
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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
- var x = _ref.x,
22
- graphYStart = _ref.graphYStart,
23
- className = _ref.className,
24
- mainLabel = _ref.mainLabel,
25
- mainLabelStyles = _ref.mainLabelStyles,
26
- secondaryLabel = _ref.secondaryLabel,
27
- color = _ref.color,
28
- yOffset = _ref.yOffset,
29
- circle = _ref.circle,
30
- selected = _ref.selected,
31
- selectedLabelBackground = _ref.selectedLabelBackground,
32
- labelBackgroundPadding = _ref.labelBackgroundPadding;
33
- var y = graphYStart + yOffset;
34
- var _useState = (0, _react.useState)(),
35
- _useState2 = _slicedToArray(_useState, 2),
36
- textRef = _useState2[0],
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: function ref(el) {
56
- return setTextRef(el);
57
- },
47
+ ref: el => setTextRef(el),
58
48
  className: className,
59
49
  textAnchor: "middle",
60
50
  fill: color,
@@ -76,5 +66,4 @@ AxisElement.propTypes = {
76
66
  selectedLabelBackground: _propTypes.string,
77
67
  labelBackgroundPadding: _propTypes.number
78
68
  };
79
- var _default = AxisElement;
80
- exports.default = _default;
69
+ var _default = exports.default = AxisElement;
@@ -4,7 +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
- var LINE_PADDING_X = 5;
8
- exports.LINE_PADDING_X = LINE_PADDING_X;
9
- var LINE_PADDING_Y = 20;
10
- exports.LINE_PADDING_Y = LINE_PADDING_Y;
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(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); }
13
- 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; }
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
- var Decoration = function Decoration(_ref) {
16
- var decoration = _ref.decoration,
17
- barWidth = _ref.barWidth,
18
- graphYStart = _ref.graphYStart,
19
- offset = _ref.offset,
20
- classes = _ref.classes;
21
- var x = decoration.x,
22
- label = decoration.label,
23
- position = decoration.position,
24
- textAnchor = decoration.textAnchor,
25
- _decoration$textProps = decoration.textProps,
26
- textProps = _decoration$textProps === void 0 ? {} : _decoration$textProps,
27
- withLine = decoration.withLine;
28
- var xCoordinate = x + (position === 'center' ? barWidth / 2 : 0);
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,
@@ -53,5 +55,4 @@ Decoration.propTypes = {
53
55
  offset: _propTypes.number,
54
56
  classes: _commonTypes.classesType
55
57
  };
56
- var _default = Decoration;
57
- exports.default = _default;
58
+ var _default = exports.default = Decoration;
@@ -4,5 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Y_OFFSET = void 0;
7
- var Y_OFFSET = 20;
8
- exports.Y_OFFSET = Y_OFFSET;
7
+ const Y_OFFSET = exports.Y_OFFSET = 20;