@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
@@ -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
  });
@@ -16,7 +15,7 @@ var _commonTypes = require("../../types/commonTypes");
16
15
  var _WithTheme = _interopRequireDefault(require("../WithTheme"));
17
16
  var _theme = require("./theme");
18
17
  var _utils = require("./utils");
19
- var _useDynamicMargins2 = _interopRequireDefault(require("./hooks/use-dynamic-margins"));
18
+ var _useDynamicMargins = _interopRequireDefault(require("./hooks/use-dynamic-margins"));
20
19
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
21
20
  var _YAxis = _interopRequireDefault(require("./components/YAxis"));
22
21
  var _XAxis = _interopRequireDefault(require("./components/XAxis"));
@@ -26,137 +25,125 @@ var _Levels = _interopRequireDefault(require("./components/Levels"));
26
25
  var _Pagination = _interopRequireDefault(require("./components/Pagination"));
27
26
  var _Legend = _interopRequireDefault(require("./components/Legend"));
28
27
  var _types = require("./types");
29
- var _excluded = ["data"];
30
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
- 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); }
32
- 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; }
33
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
34
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
35
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
36
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
37
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
38
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
39
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
40
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
41
- 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."); }
42
- 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); }
43
- 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; }
44
- 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; } }
45
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
46
- var UTBarChart = function UTBarChart(_ref) {
47
- var barBorderRadius = _ref.barBorderRadius,
48
- barData = _ref.barData,
49
- barPadding = _ref.barPadding,
50
- center = _ref.center,
51
- theme = _ref.classes,
52
- className = _ref.className,
53
- classNames = _ref.classNames,
54
- decoratorRenderer = _ref.decoratorRenderer,
55
- displayLegendAs = _ref.displayLegendAs,
56
- gradientGenerator = _ref.gradientGenerator,
57
- hideYAxis = _ref.hideYAxis,
58
- highlightWidth = _ref.highlightWidth,
59
- labelFormatters = _ref.labelFormatters,
60
- labels = _ref.labels,
61
- levels = _ref.levels,
62
- linearData = _ref.linearData,
63
- minBarWidth = _ref.minBarWidth,
64
- NoDataComponent = _ref.NoDataComponent,
65
- onBarClick = _ref.onBarClick,
66
- pagination = _ref.pagination,
67
- selectable = _ref.selectable,
68
- references = _ref.references,
69
- showGrid = _ref.showGrid,
70
- singleYAxis = _ref.singleYAxis,
71
- spacingOptions = _ref.spacingOptions,
72
- fitLegend = _ref.fitLegend,
73
- title = _ref.title,
74
- transitionDuration = _ref.transitionDuration,
75
- units = _ref.units,
76
- valuesOnTop = _ref.valuesOnTop,
77
- xAxisDefinition = _ref.xAxisDefinition,
78
- yAxisTicks = _ref.yAxisTicks;
79
- var classes = (0, _classesUtils.mergeClasses)(theme, classNames);
80
- var _useState = (0, _react.useState)(0),
81
- _useState2 = _slicedToArray(_useState, 2),
82
- currentPage = _useState2[0],
83
- setCurrentPage = _useState2[1];
84
- var _useState3 = (0, _react.useState)(),
85
- _useState4 = _slicedToArray(_useState3, 2),
86
- currentLabel = _useState4[0],
87
- setCurrentLabel = _useState4[1];
88
- var _useDynamicMargins = (0, _useDynamicMargins2.default)(center, spacingOptions),
89
- marginLeftRef = _useDynamicMargins.marginLeftRef,
90
- marginRightRef = _useDynamicMargins.marginRightRef,
91
- marginBottomRef = _useDynamicMargins.marginBottomRef,
92
- marginBottom = _useDynamicMargins.marginBottom,
93
- marginRight = _useDynamicMargins.marginRight,
94
- marginLeft = _useDynamicMargins.marginLeft;
95
- var _useComponentDimensio = (0, _energyHooks.useComponentDimensions)(),
96
- containerRef = _useComponentDimensio.ref,
97
- containerWidth = _useComponentDimensio.width,
98
- containerHeight = _useComponentDimensio.height;
99
- var _useComponentPosition = (0, _energyHooks.useComponentPosition)({
100
- externalRef: containerRef
101
- }),
102
- parentYPosition = _useComponentPosition.y;
103
- var paginationRef = (0, _react.useRef)();
104
- var groups = barData.length;
105
- var totalPages = (0, _react.useMemo)(function () {
106
- return (0, _utils.getPages)(barData[0], pagination);
107
- }, [barData, pagination]);
108
- var formattedData = (0, _react.useMemo)(function () {
109
- return pagination ? barData === null || barData === void 0 ? void 0 : barData.map(function (data) {
110
- return (0, _utils.getFormattedData)(data, pagination, currentPage);
111
- }) : barData;
112
- }, [pagination, barData, currentPage]);
113
- var formattedLinearData = (0, _react.useMemo)(function () {
114
- return linearData === null || linearData === void 0 ? void 0 : linearData.map(function (_ref2) {
115
- var data = _ref2.data,
116
- config = _objectWithoutProperties(_ref2, _excluded);
117
- return _objectSpread({
118
- data: pagination ? (0, _utils.getFormattedLinearData)(data, currentPage, pagination) : data
119
- }, config);
120
- });
121
- }, [pagination, linearData, currentPage]);
122
- var flattenedAndReducedBarData = (0, _utils.flattenAndReduceBarData)(barData);
123
- var _flattenData = (0, _utils.flattenData)(formattedData, linearData),
124
- flatBarData = _flattenData.flatBarData,
125
- flatLinearData = _flattenData.flatLinearData;
126
- var _flattenData2 = (0, _utils.flattenData)(barData, linearData),
127
- fullFlatBarData = _flattenData2.flatBarData;
128
- var _getMaxValues = (0, _utils.getMaxValues)(flattenedAndReducedBarData, flatLinearData, levels),
129
- maxBarValue = _getMaxValues.maxBarValue,
130
- maxLinearValue = _getMaxValues.maxLinearValue;
131
- var withLinearData = !(0, _array.isEmpty)(flatLinearData);
132
- var withBarData = !(0, _array.isEmpty)(fullFlatBarData);
133
- var _getGraphAttributes = (0, _utils.getGraphAttributes)(containerWidth, containerHeight, marginLeft, marginRight, marginBottom, pagination ? 0 : minBarWidth, formattedData[0].length, barPadding, groups, spacingOptions),
134
- TOTAL_HEIGHT = _getGraphAttributes.TOTAL_HEIGHT,
135
- TOTAL_WIDTH = _getGraphAttributes.TOTAL_WIDTH,
136
- GRAPH_X_END = _getGraphAttributes.GRAPH_X_END,
137
- GRAPH_X_START = _getGraphAttributes.GRAPH_X_START,
138
- GRAPH_Y_END = _getGraphAttributes.GRAPH_Y_END,
139
- GRAPH_Y_START = _getGraphAttributes.GRAPH_Y_START;
140
- var roundedMaxBarValue = Math.round(maxBarValue);
141
- var roundedMaxLinearValue = Math.round(maxLinearValue);
142
- var maxAbsoluteValue = Math.max(roundedMaxBarValue, roundedMaxLinearValue);
143
- var yAxis = d3.scaleLinear().domain([0, singleYAxis ? maxAbsoluteValue : roundedMaxBarValue]).range([GRAPH_Y_START, GRAPH_Y_END]);
144
- var xAxis = d3.scaleBand().domain(d3.range(formattedData[0].length)).range([GRAPH_X_START, GRAPH_X_END]).padding(barPadding);
145
- var groupWidth = xAxis.bandwidth();
146
- var xSubAxis = d3.scaleBand().domain(d3.range(groups)).range([0, groupWidth]).padding(barPadding);
147
- var barWidth = xSubAxis.bandwidth();
148
- var linearYAxis = singleYAxis ? yAxis : d3.scaleLinear().domain([0, roundedMaxLinearValue]).range([GRAPH_Y_START, GRAPH_Y_END]);
149
- (0, _react.useEffect)(function () {
29
+ 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); }
30
+ 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; }
31
+ const UTBarChart = _ref => {
32
+ let {
33
+ barBorderRadius,
34
+ barData,
35
+ barPadding,
36
+ center,
37
+ classes: theme,
38
+ className,
39
+ classNames,
40
+ decoratorRenderer,
41
+ displayLegendAs,
42
+ gradientGenerator,
43
+ hideYAxis,
44
+ highlightWidth,
45
+ labelFormatters,
46
+ labels,
47
+ levels,
48
+ linearData,
49
+ minBarWidth,
50
+ NoDataComponent,
51
+ onBarClick,
52
+ pagination,
53
+ selectable,
54
+ references,
55
+ showGrid,
56
+ singleYAxis,
57
+ spacingOptions,
58
+ fitLegend,
59
+ title,
60
+ transitionDuration,
61
+ units,
62
+ valuesOnTop,
63
+ xAxisDefinition,
64
+ yAxisTicks
65
+ } = _ref;
66
+ const classes = (0, _classesUtils.mergeClasses)(theme, classNames);
67
+ const [currentPage, setCurrentPage] = (0, _react.useState)(0);
68
+ const [currentLabel, setCurrentLabel] = (0, _react.useState)();
69
+ const {
70
+ marginLeftRef,
71
+ marginRightRef,
72
+ marginBottomRef,
73
+ marginBottom,
74
+ marginRight,
75
+ marginLeft
76
+ } = (0, _useDynamicMargins.default)(center, spacingOptions);
77
+ const {
78
+ ref: containerRef,
79
+ width: containerWidth,
80
+ height: containerHeight
81
+ } = (0, _energyHooks.useComponentDimensions)();
82
+ const {
83
+ y: parentYPosition
84
+ } = (0, _energyHooks.useComponentPosition)({
85
+ externalRef: containerRef
86
+ });
87
+ const paginationRef = (0, _react.useRef)();
88
+ const groups = barData.length;
89
+ const totalPages = (0, _react.useMemo)(() => (0, _utils.getPages)(barData[0], pagination), [barData, pagination]);
90
+ const formattedData = (0, _react.useMemo)(() => pagination ? barData === null || barData === void 0 ? void 0 : barData.map(data => (0, _utils.getFormattedData)(data, pagination, currentPage)) : barData, [pagination, barData, currentPage]);
91
+ const formattedLinearData = (0, _react.useMemo)(() => linearData === null || linearData === void 0 ? void 0 : linearData.map(_ref2 => {
92
+ let {
93
+ data,
94
+ ...config
95
+ } = _ref2;
96
+ return {
97
+ data: pagination ? (0, _utils.getFormattedLinearData)(data, currentPage, pagination) : data,
98
+ ...config
99
+ };
100
+ }), [pagination, linearData, currentPage]);
101
+ const flattenedAndReducedBarData = (0, _utils.flattenAndReduceBarData)(barData);
102
+ const {
103
+ flatBarData,
104
+ flatLinearData
105
+ } = (0, _utils.flattenData)(formattedData, linearData);
106
+ const {
107
+ flatBarData: fullFlatBarData
108
+ } = (0, _utils.flattenData)(barData, linearData);
109
+ const {
110
+ maxBarValue,
111
+ maxLinearValue
112
+ } = (0, _utils.getMaxValues)(flattenedAndReducedBarData, flatLinearData, levels);
113
+ const withLinearData = !(0, _array.isEmpty)(flatLinearData);
114
+ const withBarData = !(0, _array.isEmpty)(fullFlatBarData);
115
+ const {
116
+ TOTAL_HEIGHT,
117
+ TOTAL_WIDTH,
118
+ GRAPH_X_END,
119
+ GRAPH_X_START,
120
+ GRAPH_Y_END,
121
+ GRAPH_Y_START
122
+ } = (0, _utils.getGraphAttributes)(containerWidth, containerHeight, marginLeft, marginRight, marginBottom, pagination ? 0 : minBarWidth, formattedData[0].length, barPadding, groups, spacingOptions);
123
+ const roundedMaxBarValue = Math.round(maxBarValue);
124
+ const roundedMaxLinearValue = Math.round(maxLinearValue);
125
+ const maxAbsoluteValue = Math.max(roundedMaxBarValue, roundedMaxLinearValue);
126
+ const yAxis = d3.scaleLinear().domain([0, singleYAxis ? maxAbsoluteValue : roundedMaxBarValue]).range([GRAPH_Y_START, GRAPH_Y_END]);
127
+ const xAxis = d3.scaleBand().domain(d3.range(formattedData[0].length)).range([GRAPH_X_START, GRAPH_X_END]).padding(barPadding);
128
+ const groupWidth = xAxis.bandwidth();
129
+ const xSubAxis = d3.scaleBand().domain(d3.range(groups)).range([0, groupWidth]).padding(barPadding);
130
+ const barWidth = xSubAxis.bandwidth();
131
+ const linearYAxis = singleYAxis ? yAxis : d3.scaleLinear().domain([0, roundedMaxLinearValue]).range([GRAPH_Y_START, GRAPH_Y_END]);
132
+ (0, _react.useEffect)(() => {
150
133
  setCurrentPage(0);
151
134
  }, [barData]);
152
- (0, _react.useEffect)(function () {
135
+ (0, _react.useEffect)(() => {
153
136
  setCurrentLabel(null);
154
137
  }, [currentPage]);
155
- var barAxisLabelFormatter = labelFormatters.bar,
156
- linearAxisLabelFormatter = labelFormatters.linear;
157
- var barUnit = units.bar,
158
- linearUnit = units.linear;
159
- var Wrapper = pagination ? 'div' : _reactPerfectScrollbar.default;
138
+ const {
139
+ bar: barAxisLabelFormatter,
140
+ linear: linearAxisLabelFormatter
141
+ } = labelFormatters;
142
+ const {
143
+ bar: barUnit,
144
+ linear: linearUnit
145
+ } = units;
146
+ const Wrapper = pagination ? 'div' : _reactPerfectScrollbar.default;
160
147
  return !withBarData ? NoDataComponent ? /*#__PURE__*/_react.default.createElement(NoDataComponent, null) : null : /*#__PURE__*/_react.default.createElement("div", {
161
148
  className: _stylesModule.default.container
162
149
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -176,37 +163,37 @@ var UTBarChart = function UTBarChart(_ref) {
176
163
  graphXStart: GRAPH_X_START,
177
164
  graphXEnd: GRAPH_X_END,
178
165
  graphYStart: GRAPH_Y_START
179
- }), formattedData.map(function (data, group) {
180
- return /*#__PURE__*/_react.default.createElement(_Bars.default, {
181
- totalData: barData,
182
- highlightWidth: highlightWidth,
183
- selectable: selectable,
184
- groupWidth: groupWidth,
185
- xSubAxis: xSubAxis,
186
- barData: data,
187
- xAxis: xAxis,
188
- classes: classes,
189
- yAxis: yAxis,
190
- barBorderRadius: barBorderRadius,
191
- onBarClick: onBarClick,
192
- barWidth: barWidth,
193
- graphYStart: GRAPH_Y_START,
194
- maxBarValue: roundedMaxBarValue,
195
- padding: barPadding,
196
- group: group,
197
- groups: groups,
198
- spacingOptions: spacingOptions,
199
- currentPage: currentPage,
200
- valuesOnTop: valuesOnTop,
201
- transitionDuration: transitionDuration,
202
- setCurrentLabel: setCurrentLabel
203
- });
204
- }), formattedLinearData.map(function (_ref3) {
205
- var data = _ref3.data,
206
- type = _ref3.type,
207
- color = _ref3.color,
208
- customLineProps = _ref3.customLineProps,
209
- markers = _ref3.markers;
166
+ }), formattedData.map((data, group) => /*#__PURE__*/_react.default.createElement(_Bars.default, {
167
+ totalData: barData,
168
+ highlightWidth: highlightWidth,
169
+ selectable: selectable,
170
+ groupWidth: groupWidth,
171
+ xSubAxis: xSubAxis,
172
+ barData: data,
173
+ xAxis: xAxis,
174
+ classes: classes,
175
+ yAxis: yAxis,
176
+ barBorderRadius: barBorderRadius,
177
+ onBarClick: onBarClick,
178
+ barWidth: barWidth,
179
+ graphYStart: GRAPH_Y_START,
180
+ maxBarValue: roundedMaxBarValue,
181
+ padding: barPadding,
182
+ group: group,
183
+ groups: groups,
184
+ spacingOptions: spacingOptions,
185
+ currentPage: currentPage,
186
+ valuesOnTop: valuesOnTop,
187
+ transitionDuration: transitionDuration,
188
+ setCurrentLabel: setCurrentLabel
189
+ })), formattedLinearData.map(_ref3 => {
190
+ let {
191
+ data,
192
+ type,
193
+ color,
194
+ customLineProps,
195
+ markers
196
+ } = _ref3;
210
197
  return /*#__PURE__*/_react.default.createElement(_LinearPlot.default, {
211
198
  data: data,
212
199
  type: type,
@@ -283,7 +270,7 @@ var UTBarChart = function UTBarChart(_ref) {
283
270
  flatData: {
284
271
  bar: flatBarData,
285
272
  linear: flatLinearData,
286
- levels: levels
273
+ levels
287
274
  },
288
275
  references: references,
289
276
  title: title,
@@ -344,5 +331,4 @@ UTBarChart.defaultProps = {
344
331
  linearData: [],
345
332
  transitionDuration: 0
346
333
  };
347
- var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTBarChart);
348
- exports.default = _default;
334
+ var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTBarChart);
@@ -5,108 +5,106 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.retrieveStyle = void 0;
7
7
  var _seamlessImmutable = require("seamless-immutable");
8
- var retrieveStyle = function retrieveStyle(theme) {
9
- return {
10
- solidLevel: {
11
- strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'solidLevel', 'strokeWidth'], 1)
12
- },
13
- dashedLevel: {
14
- strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'dashedLevel', 'strokeWidth'], 1),
15
- strokeDasharray: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'dashedLevel', 'strokeDasharray'], 2.2)
16
- },
17
- dottedLevel: {
18
- strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'dottedLevel', 'strokeWidth'], 2),
19
- strokeDasharray: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'dottedLevel', 'strokeDasharray'], 4)
20
- },
21
- gridLine: {
22
- strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'gridLine', 'strokeWidth'], 1),
23
- strokeDasharray: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'gridLine', 'strokeDasharray'], 5.5),
24
- stroke: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'gridLine', 'stroke'])
25
- },
26
- legendItemLabel: {
27
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'legendItemLabel', 'fontSize']),
28
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'legendItemLabel', 'fontWeight']),
29
- fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
30
- color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'legendItemLabel', 'color']),
31
- userSelect: 'none'
32
- },
33
- showLegendButton: {
34
- backgroundColor: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendButton', 'backgroundColor']), " !important"),
35
- padding: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendButton', 'padding']), " !important"),
36
- borderRadius: '0 !important'
37
- },
38
- showLegendIcon: {
39
- color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendIcon', 'color']),
40
- marginRight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendIcon', 'marginRight'], 10)
41
- },
42
- showLegendLabel: {
43
- fontSize: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendLabel', 'fontSize']), " !important"),
44
- fontWeight: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendLabel', 'fontWeight']), " !important"),
45
- fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
46
- color: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendLabel', 'color']), " !important"),
47
- userSelect: 'none'
48
- },
49
- paginationButton: {
50
- color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'paginationButton', 'color'])
51
- },
52
- paginationButtonDisabled: {
53
- color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'paginationButtonDisabled', 'color'])
54
- },
55
- xAxis: {
56
- strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxis', 'strokeWidth'], 1),
57
- stroke: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxis', 'stroke'])
58
- },
59
- xAxisMainLabel: {
60
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisMainLabel', 'fontSize']),
61
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisMainLabel', 'fontWeight']),
62
- fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
63
- fill: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisMainLabel', 'fill']),
64
- userSelect: 'none'
65
- },
66
- xAxisSelectedLabel: {
67
- fill: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisSelectedLabel', 'fill'])
68
- },
69
- xAxisSecondaryLabel: {
70
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisSecondaryLabel', 'fontSize']),
71
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisSecondaryLabel', 'fontWeight']),
72
- fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
73
- color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisSecondaryLabel', 'color']),
74
- userSelect: 'none'
75
- },
76
- decoration: {
77
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decoration', 'fontSize']),
78
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decoration', 'fontWeight']),
79
- color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decoration', 'color']),
80
- userSelect: 'none'
81
- },
82
- decorationLine: {
83
- strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decorationLine', 'strokeWidth'], 1),
84
- strokeDasharray: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decorationLine', 'strokeDasharray'], 0),
85
- stroke: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decorationLine', 'stroke'])
86
- },
87
- yAxisUnit: {
88
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisUnit', 'fontSize']),
89
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisUnit', 'fontWeight']),
90
- fill: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisUnit', 'fill']),
91
- userSelect: 'none'
92
- },
93
- yAxisLabel: {
94
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisLabel', 'fontSize']),
95
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisLabel', 'fontWeight']),
96
- fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
97
- fill: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisLabel', 'fill']),
98
- userSelect: 'none'
99
- },
100
- onTopBarLabel: {
101
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'onTopBarLabel', 'fontSize']),
102
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'onTopBarLabel', 'fontWeight']),
103
- fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
104
- color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'onTopBarLabel', 'color']),
105
- userSelect: 'none'
106
- },
107
- tooltip: {
108
- backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'tooltip', 'width'])
109
- }
110
- };
111
- };
8
+ const retrieveStyle = theme => ({
9
+ solidLevel: {
10
+ strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'solidLevel', 'strokeWidth'], 1)
11
+ },
12
+ dashedLevel: {
13
+ strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'dashedLevel', 'strokeWidth'], 1),
14
+ strokeDasharray: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'dashedLevel', 'strokeDasharray'], 2.2)
15
+ },
16
+ dottedLevel: {
17
+ strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'dottedLevel', 'strokeWidth'], 2),
18
+ strokeDasharray: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'dottedLevel', 'strokeDasharray'], 4)
19
+ },
20
+ gridLine: {
21
+ strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'gridLine', 'strokeWidth'], 1),
22
+ strokeDasharray: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'gridLine', 'strokeDasharray'], 5.5),
23
+ stroke: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'gridLine', 'stroke'])
24
+ },
25
+ legendItemLabel: {
26
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'legendItemLabel', 'fontSize']),
27
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'legendItemLabel', 'fontWeight']),
28
+ fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
29
+ color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'legendItemLabel', 'color']),
30
+ userSelect: 'none'
31
+ },
32
+ showLegendButton: {
33
+ backgroundColor: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendButton', 'backgroundColor']), " !important"),
34
+ padding: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendButton', 'padding']), " !important"),
35
+ borderRadius: '0 !important'
36
+ },
37
+ showLegendIcon: {
38
+ color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendIcon', 'color']),
39
+ marginRight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendIcon', 'marginRight'], 10)
40
+ },
41
+ showLegendLabel: {
42
+ fontSize: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendLabel', 'fontSize']), " !important"),
43
+ fontWeight: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendLabel', 'fontWeight']), " !important"),
44
+ fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
45
+ color: "".concat((0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'showLegendLabel', 'color']), " !important"),
46
+ userSelect: 'none'
47
+ },
48
+ paginationButton: {
49
+ color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'paginationButton', 'color'])
50
+ },
51
+ paginationButtonDisabled: {
52
+ color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'paginationButtonDisabled', 'color'])
53
+ },
54
+ xAxis: {
55
+ strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxis', 'strokeWidth'], 1),
56
+ stroke: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxis', 'stroke'])
57
+ },
58
+ xAxisMainLabel: {
59
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisMainLabel', 'fontSize']),
60
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisMainLabel', 'fontWeight']),
61
+ fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
62
+ fill: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisMainLabel', 'fill']),
63
+ userSelect: 'none'
64
+ },
65
+ xAxisSelectedLabel: {
66
+ fill: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisSelectedLabel', 'fill'])
67
+ },
68
+ xAxisSecondaryLabel: {
69
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisSecondaryLabel', 'fontSize']),
70
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisSecondaryLabel', 'fontWeight']),
71
+ fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
72
+ color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'xAxisSecondaryLabel', 'color']),
73
+ userSelect: 'none'
74
+ },
75
+ decoration: {
76
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decoration', 'fontSize']),
77
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decoration', 'fontWeight']),
78
+ color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decoration', 'color']),
79
+ userSelect: 'none'
80
+ },
81
+ decorationLine: {
82
+ strokeWidth: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decorationLine', 'strokeWidth'], 1),
83
+ strokeDasharray: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decorationLine', 'strokeDasharray'], 0),
84
+ stroke: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'decorationLine', 'stroke'])
85
+ },
86
+ yAxisUnit: {
87
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisUnit', 'fontSize']),
88
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisUnit', 'fontWeight']),
89
+ fill: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisUnit', 'fill']),
90
+ userSelect: 'none'
91
+ },
92
+ yAxisLabel: {
93
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisLabel', 'fontSize']),
94
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisLabel', 'fontWeight']),
95
+ fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
96
+ fill: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'yAxisLabel', 'fill']),
97
+ userSelect: 'none'
98
+ },
99
+ onTopBarLabel: {
100
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'onTopBarLabel', 'fontSize']),
101
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'onTopBarLabel', 'fontWeight']),
102
+ fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'Fonts', 'fontFamily']),
103
+ color: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'onTopBarLabel', 'color']),
104
+ userSelect: 'none'
105
+ },
106
+ tooltip: {
107
+ backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTBarChart', 'tooltip', 'width'])
108
+ }
109
+ });
112
110
  exports.retrieveStyle = retrieveStyle;