@widergy/energy-ui 2.4.0 → 2.5.1

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 (140) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/EnergyThemeProvider/index.js +1 -1
  3. package/dist/components/UTAlert/AlertHandler.js +3 -3
  4. package/dist/components/UTAlert/index.js +1 -1
  5. package/dist/components/UTAttachment/components/Preview/index.js +1 -1
  6. package/dist/components/UTAttachment/index.js +2 -2
  7. package/dist/components/UTAttachment/utils.js +2 -2
  8. package/dist/components/UTAutocomplete/components/ListBox/index.js +1 -1
  9. package/dist/components/UTAutocomplete/components/ListBox/utils.js +3 -3
  10. package/dist/components/UTAutocomplete/index.js +2 -2
  11. package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +1 -1
  12. package/dist/components/UTBarChart/components/Bars/index.js +4 -4
  13. package/dist/components/UTBarChart/components/Legend/constants.js +1 -1
  14. package/dist/components/UTBarChart/components/Legend/index.js +2 -2
  15. package/dist/components/UTBarChart/components/LinearPlot/index.js +1 -1
  16. package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +2 -2
  17. package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +1 -1
  18. package/dist/components/UTBarChart/components/XAxis/index.js +2 -2
  19. package/dist/components/UTBarChart/components/YAxis/index.js +1 -1
  20. package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +1 -1
  21. package/dist/components/UTBarChart/index.js +4 -4
  22. package/dist/components/UTBarChart/utils.js +3 -3
  23. package/dist/components/UTBreadcrumbs/constants.js +37 -2
  24. package/dist/components/UTBreadcrumbs/index.js +16 -10
  25. package/dist/components/UTBreadcrumbs/styles.module.scss +4 -0
  26. package/dist/components/UTBreadcrumbs/theme.js +3 -7
  27. package/dist/components/UTButton/index.js +1 -1
  28. package/dist/components/UTButton/theme.js +5 -4
  29. package/dist/components/UTCBUInput/index.js +2 -2
  30. package/dist/components/UTCaptcha/index.js +1 -1
  31. package/dist/components/UTCard/index.js +1 -1
  32. package/dist/components/UTCard/theme.js +1 -1
  33. package/dist/components/UTCarousel/components/Button/index.js +1 -1
  34. package/dist/components/UTCarousel/components/Legend/index.js +1 -1
  35. package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +1 -1
  36. package/dist/components/UTCarousel/components/Slider/index.js +3 -3
  37. package/dist/components/UTCarousel/components/Slider/layout.js +1 -1
  38. package/dist/components/UTCheckList/index.js +1 -1
  39. package/dist/components/UTCheckbox/index.js +2 -2
  40. package/dist/components/UTConsumptionBar/index.js +2 -2
  41. package/dist/components/UTCuit/index.js +1 -1
  42. package/dist/components/UTDatePicker/components/Day/index.js +1 -1
  43. package/dist/components/UTDatePicker/index.js +4 -4
  44. package/dist/components/UTDotMenu/index.js +1 -1
  45. package/dist/components/UTEmojiPicker/index.js +2 -2
  46. package/dist/components/UTEmojiPicker/utils.js +3 -3
  47. package/dist/components/UTFileInput/index.js +1 -1
  48. package/dist/components/UTFileInput/layout.js +1 -1
  49. package/dist/components/UTIconButton/index.js +1 -1
  50. package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +1 -1
  51. package/dist/components/UTImageRadio/index.js +1 -1
  52. package/dist/components/UTImageRadio/theme.js +1 -1
  53. package/dist/components/UTLabel/index.js +1 -1
  54. package/dist/components/UTLoading/index.js +1 -1
  55. package/dist/components/UTMap/components/GoogleMaps/index.js +1 -1
  56. package/dist/components/UTMap/index.js +1 -1
  57. package/dist/components/UTMap/utils.js +3 -3
  58. package/dist/components/UTMenu/index.js +2 -2
  59. package/dist/components/UTPagination/assets/arrow-head-left.svg +8 -0
  60. package/dist/components/UTPagination/assets/arrow-head-right.svg +8 -0
  61. package/dist/components/UTPagination/assets/arrow-left.svg +3 -0
  62. package/dist/components/UTPagination/assets/arrow-right.svg +3 -0
  63. package/dist/components/UTPagination/assets/refresh.svg +10 -0
  64. package/dist/components/UTPagination/components/PageSizeSelector/index.js +62 -0
  65. package/dist/components/UTPagination/components/PageSizeSelector/styles.module.scss +24 -0
  66. package/dist/components/UTPagination/components/PageSizeSelector/utils.js +26 -0
  67. package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +45 -0
  68. package/dist/components/UTPagination/components/Pagination/components/NavigationButton/styles.module.scss +9 -0
  69. package/dist/components/UTPagination/components/Pagination/index.js +146 -0
  70. package/dist/components/UTPagination/components/Pagination/styles.module.scss +33 -0
  71. package/dist/components/UTPagination/constants.js +12 -0
  72. package/dist/components/UTPagination/index.js +69 -0
  73. package/dist/components/UTPagination/styles.module.scss +10 -0
  74. package/dist/components/UTPagination/theme.js +36 -0
  75. package/dist/components/UTPagination/utils.js +24 -0
  76. package/dist/components/UTPanel/index.js +3 -3
  77. package/dist/components/UTPasswordField/components/PasswordValidations/index.js +3 -3
  78. package/dist/components/UTPasswordField/components/PasswordWarning/index.js +3 -3
  79. package/dist/components/UTPhoneInput/index.js +3 -3
  80. package/dist/components/UTPieChart/hooks/use-animated-value/index.js +1 -1
  81. package/dist/components/UTPieChart/index.js +1 -1
  82. package/dist/components/UTProgressBar/index.js +1 -1
  83. package/dist/components/UTRadioGroup/index.js +1 -1
  84. package/dist/components/UTRating/components/Circle/index.js +2 -2
  85. package/dist/components/UTRating/components/Star/index.js +1 -1
  86. package/dist/components/UTRating/index.js +2 -2
  87. package/dist/components/UTRipple/Ripple.js +2 -2
  88. package/dist/components/UTRipple/index.js +2 -2
  89. package/dist/components/UTSelect/components/Option/index.js +1 -1
  90. package/dist/components/UTSelect/index.js +3 -3
  91. package/dist/components/UTSidebar/components/ListOption/index.js +2 -5
  92. package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +1 -1
  93. package/dist/components/UTSidebar/components/LogosContainer/index.js +3 -3
  94. package/dist/components/UTSidebar/components/Option/index.js +3 -3
  95. package/dist/components/UTSidebar/components/Option/styles.module.scss +0 -1
  96. package/dist/components/UTSidebar/components/Toggler/index.js +1 -1
  97. package/dist/components/UTSidebar/index.js +2 -2
  98. package/dist/components/UTSidebar/theme.js +1 -1
  99. package/dist/components/UTSkeleton/index.js +1 -1
  100. package/dist/components/UTStatus/theme.js +3 -3
  101. package/dist/components/UTSwitch/index.js +2 -2
  102. package/dist/components/UTTable/components/ActionIcons/index.js +4 -4
  103. package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +1 -1
  104. package/dist/components/UTTable/components/Cell/index.js +3 -3
  105. package/dist/components/UTTable/components/HeaderCell/index.js +3 -3
  106. package/dist/components/UTTable/components/ResponsiveCell/index.js +3 -3
  107. package/dist/components/UTTable/components/Status/index.js +1 -1
  108. package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +1 -1
  109. package/dist/components/UTTable/components/TableFooter/index.js +1 -1
  110. package/dist/components/UTTable/components/TableHeader/index.js +1 -1
  111. package/dist/components/UTTable/components/TableRow/index.js +3 -3
  112. package/dist/components/UTTable/constants.js +1 -1
  113. package/dist/components/UTTable/hook.js +1 -1
  114. package/dist/components/UTTable/index.js +4 -4
  115. package/dist/components/UTTable/theme.js +1 -1
  116. package/dist/components/UTTabs/components/TooltipTab/index.js +3 -3
  117. package/dist/components/UTTabs/index.js +1 -1
  118. package/dist/components/UTTextInput/index.js +1 -1
  119. package/dist/components/UTThirdPartyCookieChecker/index.js +1 -1
  120. package/dist/components/UTTooltip/index.js +1 -1
  121. package/dist/components/UTTopbar/components/Notifications/index.js +37 -0
  122. package/dist/components/UTTopbar/components/Notifications/styles.module.scss +10 -0
  123. package/dist/components/UTTopbar/components/UserMenu/index.js +55 -0
  124. package/dist/components/UTTopbar/components/UserMenu/styles.module.scss +46 -0
  125. package/dist/components/UTTopbar/index.js +102 -0
  126. package/dist/components/UTTopbar/styles.module.scss +21 -0
  127. package/dist/components/UTTopbar/theme.js +83 -0
  128. package/dist/components/UTTopbar/types.js +27 -0
  129. package/dist/components/UTTouchableWithoutFeedback/index.js +2 -2
  130. package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +1 -1
  131. package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +1 -1
  132. package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +1 -1
  133. package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +3 -3
  134. package/dist/components/UTVirtualizedList/index.js +2 -2
  135. package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +3 -3
  136. package/dist/components/UTWorkflowContainer/index.js +2 -2
  137. package/dist/components/UTWorkflowContainer/theme.js +1 -1
  138. package/dist/components/WithTheme/layout.js +3 -3
  139. package/dist/index.js +14 -0
  140. package/package.json +1 -1
@@ -17,7 +17,7 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
  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); }
19
19
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
20
+ 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); }
21
21
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
22
22
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
23
  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); }
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.retrieveAddressByCoords = exports.isValidConfiguration = exports.getValue = exports.geolocation = exports.findAddressComponent = exports.checkAddressIsValid = void 0;
7
7
  var _array = require("@widergy/web-utils/lib/array");
8
8
  var _constants = require("./constants");
9
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
10
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
11
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
+ 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); }
10
+ 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; }
11
+ 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; }
12
12
  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; }
13
13
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
14
  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); }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
@@ -32,7 +32,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
32
32
  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."); }
33
33
  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); }
34
34
  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; }
35
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
35
+ 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; } }
36
36
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
37
  var UTMenu = function UTMenu(_ref) {
38
38
  var anchor = _ref.anchor,
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
4
+ <g transform="translate(-5.000000, -5.000000)">
5
+ <path fill="#FFFFFF" d="M10.2321,5.3599 C10.5851,4.9359 11.2151,4.8789 11.6401,5.2319 C12.0641,5.5859 12.1211,6.2159 11.7681,6.6399 L11.7681,6.6399 L7.2921,12.0109 L11.6071,17.3729 C11.9531,17.8029 11.8851,18.4329 11.4551,18.7789 C11.2701,18.9279 11.0491,18.9999 10.8281,18.9999 C10.5361,18.9999 10.2461,18.8729 10.0491,18.6269 L10.0491,18.6269 L5.2211,12.6269 C4.9221,12.2559 4.9271,11.7259 5.2321,11.3599 L5.2321,11.3599 Z M17.2315,5.3602 C17.5855,4.9352 18.2155,4.8792 18.6405,5.2322 C19.0645,5.5852 19.1215,6.2162 18.7685,6.6402 L18.7685,6.6402 L14.2925,12.0112 L18.6075,17.3732 C18.9535,17.8032 18.8855,18.4322 18.4555,18.7792 C18.2705,18.9282 18.0485,19.0002 17.8285,19.0002 C17.5365,19.0002 17.2465,18.8722 17.0485,18.6272 L17.0485,18.6272 L12.2205,12.6272 C11.9225,12.2562 11.9265,11.7252 12.2315,11.3602 L12.2315,11.3602 Z" id="path-arrow-head-left"></path>
6
+ </g>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
4
+ <g transform="translate(-5.000000, -5.000000)">
5
+ <path fill="#FFFFFF" d="M12.5453,5.221 C12.9753,4.874 13.6043,4.943 13.9513,5.373 L13.9513,5.373 L18.7793,11.373 C19.0783,11.744 19.0733,12.274 18.7683,12.64 L18.7683,12.64 L13.7683,18.64 C13.5703,18.877 13.2863,19 12.9993,19 C12.7743,19 12.5473,18.924 12.3603,18.768 C11.9353,18.415 11.8783,17.784 12.2323,17.36 L12.2323,17.36 L16.7083,11.989 L12.3923,6.627 C12.0463,6.197 12.1143,5.567 12.5453,5.221 Z M5.5452,5.221 C5.9752,4.875 6.6042,4.943 6.9512,5.373 L6.9512,5.373 L11.7792,11.373 C12.0772,11.744 12.0732,12.274 11.7682,12.64 L11.7682,12.64 L6.7682,18.64 C6.5702,18.877 6.2862,19 5.9992,19 C5.7742,19 5.5472,18.924 5.3602,18.768 C4.9352,18.415 4.8782,17.784 5.2322,17.36 L5.2322,17.36 L9.7072,11.989 L5.3922,6.627 C5.0462,6.197 5.1152,5.567 5.5452,5.221 Z" id="path-1"></path>
6
+ </g>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13.3623 17C13.1003 17 12.8393 16.898 12.6433 16.695L8.78028 12.695C8.40228 12.302 8.40728 11.679 8.79328 11.293L12.7933 7.29301C13.1833 6.90201 13.8163 6.90201 14.2073 7.29301C14.5973 7.68401 14.5973 8.31601 14.2073 8.70701L10.9023 12.012L14.0813 15.305C14.4653 15.703 14.4543 16.336 14.0573 16.719C13.8623 16.907 13.6123 17 13.3623 17Z" fill="#091E42"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10.5 17C10.244 17 9.98801 16.902 9.79301 16.707C9.40201 16.316 9.40201 15.684 9.79301 15.293L13.098 11.988L9.91801 8.695C9.53501 8.297 9.54601 7.664 9.94301 7.281C10.341 6.898 10.974 6.909 11.357 7.305L15.219 11.305C15.598 11.698 15.593 12.321 15.207 12.707L11.207 16.707C11.012 16.902 10.756 17 10.5 17Z" fill="#091E42"/>
3
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
4
+ <g transform="translate(-1091.000000, -182.000000)">
5
+ <g transform="translate(1088.000000, 179.000000)">
6
+ <path fill="#FF6026" d="M20.3032,13.4258 C19.7772,13.2588 19.2152,13.5498 19.0472,14.0758 C18.1102,17.0218 15.3522,18.9998 12.1842,18.9998 C8.2222,18.9998 5.0002,15.8598 5.0002,11.9998 C5.0002,8.1408 8.2222,4.9998 12.1842,4.9998 C13.9122,4.9998 15.5422,5.6018 16.8292,6.6698 L14.6632,6.3128 C14.1132,6.2128 13.6032,6.5918 13.5132,7.1358 C13.4232,7.6808 13.7922,8.1958 14.3372,8.2848 L18.5832,8.9868 C18.6382,8.9958 18.6942,8.9998 18.7472,8.9998 C18.8662,8.9998 18.9822,8.9788 19.0902,8.9388 C19.1272,8.9248 19.1572,8.8988 19.1932,8.8798 C19.2592,8.8458 19.3282,8.8158 19.3852,8.7678 C19.4212,8.7388 19.4442,8.6968 19.4752,8.6628 C19.5222,8.6138 19.5722,8.5668 19.6072,8.5068 C19.6322,8.4638 19.6422,8.4128 19.6612,8.3648 C19.6852,8.3058 19.7172,8.2508 19.7292,8.1858 L20.4832,4.1858 C20.5852,3.6428 20.2282,3.1188 19.6852,3.0178 C19.1442,2.9198 18.6192,3.2728 18.5172,3.8148 L18.2452,5.2558 C16.5812,3.8148 14.4482,2.9998 12.1842,2.9998 C7.1202,2.9998 3.0002,7.0368 3.0002,11.9998 C3.0002,16.9628 7.1202,20.9998 12.1842,20.9998 C16.2262,20.9998 19.7502,18.4608 20.9532,14.6818 C21.1202,14.1558 20.8292,13.5938 20.3032,13.4258" id="path-refresh"></path>
7
+ </g>
8
+ </g>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = require("prop-types");
9
+ var _UTSelect = _interopRequireDefault(require("../../../UTSelect"));
10
+ var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
11
+ var _commonTypes = require("../../../../types/commonTypes");
12
+ var _utils = require("./utils");
13
+ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ var PageSizeSelector = function PageSizeSelector(_ref) {
16
+ var classes = _ref.classes,
17
+ colorThemes = _ref.colorThemes,
18
+ options = _ref.options,
19
+ rowsPerPage = _ref.rowsPerPage,
20
+ onChangeRowPerPage = _ref.onChangeRowPerPage,
21
+ label = _ref.label,
22
+ totalRows = _ref.totalRows;
23
+ return /*#__PURE__*/_react.default.createElement("div", {
24
+ className: _stylesModule.default.pageSizeSelector
25
+ }, /*#__PURE__*/_react.default.createElement("div", {
26
+ className: _stylesModule.default.selectorContainer
27
+ }, /*#__PURE__*/_react.default.createElement(_UTSelect.default, {
28
+ options: (0, _utils.getPageSizeOptions)(options, totalRows),
29
+ labelKey: "label",
30
+ valueKey: "value",
31
+ input: {
32
+ onChange: onChangeRowPerPage,
33
+ value: rowsPerPage
34
+ },
35
+ disableFirstOption: true,
36
+ variant: "outlined",
37
+ selectProps: {
38
+ className: "".concat(_stylesModule.default.pageSizeSelectContainer, " ").concat(classes.pageSizeSelectContainer),
39
+ classes: {
40
+ select: classes.pageSizeSelect
41
+ }
42
+ }
43
+ })), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
44
+ className: "".concat(_stylesModule.default.label, " ").concat(classes.totalRowsLabel),
45
+ colorTheme: colorThemes.totalRows || 'gray'
46
+ }, label));
47
+ };
48
+ PageSizeSelector.propTypes = {
49
+ classes: _commonTypes.classesType,
50
+ colorThemes: (0, _propTypes.shape)({
51
+ pageButton: _propTypes.string,
52
+ navigationButton: _propTypes.string,
53
+ totalRows: _propTypes.string
54
+ }),
55
+ options: (0, _propTypes.arrayOf)(_propTypes.number),
56
+ rowsPerPage: _propTypes.number,
57
+ onChangeRowPerPage: _propTypes.func,
58
+ label: _propTypes.string,
59
+ totalRows: _propTypes.number
60
+ };
61
+ var _default = PageSizeSelector;
62
+ exports.default = _default;
@@ -0,0 +1,24 @@
1
+ .pageSizeSelector {
2
+ align-items: center;
3
+ display: flex;
4
+ white-space: nowrap;
5
+ }
6
+
7
+ .label {
8
+ margin-left: 10px;
9
+ }
10
+
11
+ .selectorContainer {
12
+ flex-shrink: 1;
13
+ min-width: 80px;
14
+
15
+ legend {
16
+ display: none;
17
+ }
18
+ }
19
+
20
+ .pageSizeSelectContainer {
21
+ & fieldset {
22
+ top: 0;
23
+ }
24
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getPageSizeOptions = void 0;
7
+ var _array = require("@widergy/web-utils/lib/array");
8
+ var getPrevOption = function getPrevOption(options, index) {
9
+ return index === 0 ? 0 : options[index - 1];
10
+ };
11
+ var getPageSizeOptions = function getPageSizeOptions(originalOptions, totalRows) {
12
+ var filteredOptions = originalOptions.filter(function (_, index) {
13
+ return getPrevOption(originalOptions, index) < totalRows;
14
+ });
15
+ if ((0, _array.isEmpty)(filteredOptions)) return [{
16
+ value: originalOptions[0],
17
+ label: totalRows
18
+ }];
19
+ return filteredOptions.map(function (value) {
20
+ return {
21
+ value: value,
22
+ label: Math.min(value, totalRows)
23
+ };
24
+ });
25
+ };
26
+ exports.getPageSizeOptions = getPageSizeOptions;
@@ -0,0 +1,45 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _propTypes = require("prop-types");
10
+ var _UTButton = _interopRequireDefault(require("../../../../../UTButton"));
11
+ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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; }
15
+ var NavigationButton = function NavigationButton(_ref) {
16
+ var className = _ref.className,
17
+ colorTheme = _ref.colorTheme,
18
+ disabled = _ref.disabled,
19
+ Icon = _ref.Icon,
20
+ label = _ref.label,
21
+ onClick = _ref.onClick;
22
+ return /*#__PURE__*/_react.default.createElement(_UTButton.default, {
23
+ classNames: {
24
+ root: "\n ".concat(className, "\n ").concat(_stylesModule.default.navigationButton, "\n ")
25
+ },
26
+ colorTheme: colorTheme,
27
+ disabled: disabled,
28
+ Icon: Icon,
29
+ onClick: onClick,
30
+ size: "large",
31
+ variant: "semitransparent"
32
+ }, label && /*#__PURE__*/_react.default.createElement("span", {
33
+ className: _stylesModule.default.label
34
+ }, label));
35
+ };
36
+ NavigationButton.propTypes = {
37
+ className: _propTypes.string,
38
+ colorTheme: _propTypes.string,
39
+ disabled: _propTypes.bool,
40
+ Icon: _propTypes.elementType,
41
+ label: (0, _propTypes.oneOfType)([_propTypes.string, _propTypes.number]),
42
+ onClick: _propTypes.func
43
+ };
44
+ var _default = /*#__PURE__*/(0, _react.memo)(NavigationButton);
45
+ exports.default = _default;
@@ -0,0 +1,9 @@
1
+ .navigationButton {
2
+ align-items: center;
3
+ display: flex;
4
+ justify-content: center;
5
+
6
+ + .navigationButton {
7
+ margin-left: 4px;
8
+ }
9
+ }
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = require("prop-types");
9
+ var _UTButton = _interopRequireDefault(require("../../../UTButton"));
10
+ var _constants = require("../../constants");
11
+ var _commonTypes = require("../../../../types/commonTypes");
12
+ var _NavigationButton = _interopRequireDefault(require("./components/NavigationButton"));
13
+ var _utils = require("./utils");
14
+ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ var NavigateBeforeIcon = function NavigateBeforeIcon(props) {
17
+ return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
18
+ fillRule: "evenodd",
19
+ clipRule: "evenodd",
20
+ d: "M13.362 17a.996.996 0 0 1-.719-.305l-3.863-4a1 1 0 0 1 .013-1.402l4-4a.999.999 0 1 1 1.414 1.414l-3.305 3.305 3.18 3.293a1 1 0 0 1-.72 1.695z",
21
+ fill: "#091E42"
22
+ }));
23
+ };
24
+ NavigateBeforeIcon.defaultProps = {
25
+ width: "24",
26
+ height: "24",
27
+ viewBox: "0 0 24 24",
28
+ fill: "none",
29
+ xmlns: "http://www.w3.org/2000/svg"
30
+ };
31
+ var NavigateNextIcon = function NavigateNextIcon(props) {
32
+ return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
33
+ fillRule: "evenodd",
34
+ clipRule: "evenodd",
35
+ d: "M10.5 17a.999.999 0 0 1-.707-1.707l3.305-3.305-3.18-3.293a1 1 0 0 1 1.439-1.39l3.862 4a1 1 0 0 1-.012 1.402l-4 4A.997.997 0 0 1 10.5 17z",
36
+ fill: "#091E42"
37
+ }));
38
+ };
39
+ NavigateNextIcon.defaultProps = {
40
+ width: "24",
41
+ height: "24",
42
+ viewBox: "0 0 24 24",
43
+ fill: "none",
44
+ xmlns: "http://www.w3.org/2000/svg"
45
+ };
46
+ var NavigateHeaderBeforeIcon = function NavigateHeaderBeforeIcon(props) {
47
+ return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
48
+ fill: "#FFF",
49
+ d: "M5.232.36a1 1 0 0 1 1.536 1.28L2.292 7.01l4.315 5.363a1 1 0 0 1-1.558 1.254l-4.828-6A1 1 0 0 1 .232 6.36zm7 0a1 1 0 0 1 1.537 1.28L9.293 7.011l4.315 5.362a1 1 0 0 1-1.56 1.254l-4.828-6a1 1 0 0 1 .012-1.267z",
50
+ fillRule: "evenodd"
51
+ }));
52
+ };
53
+ NavigateHeaderBeforeIcon.defaultProps = {
54
+ width: "14",
55
+ height: "14",
56
+ viewBox: "0 0 14 14",
57
+ xmlns: "http://www.w3.org/2000/svg"
58
+ };
59
+ var NavigateHeaderNextIcon = function NavigateHeaderNextIcon(props) {
60
+ return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
61
+ fill: "#FFF",
62
+ d: "M7.545.221a1 1 0 0 1 1.406.152l4.828 6a1 1 0 0 1-.01 1.267l-5 6a1 1 0 1 1-1.537-1.28l4.476-5.371-4.316-5.362A1 1 0 0 1 7.545.221zm-7 0a1 1 0 0 1 1.406.152l4.828 6a1 1 0 0 1-.01 1.267l-5 6a1 1 0 1 1-1.537-1.28l4.475-5.371L.392 1.627A1 1 0 0 1 .545.221z",
63
+ fillRule: "evenodd"
64
+ }));
65
+ };
66
+ NavigateHeaderNextIcon.defaultProps = {
67
+ width: "14",
68
+ height: "14",
69
+ viewBox: "0 0 14 14",
70
+ xmlns: "http://www.w3.org/2000/svg"
71
+ };
72
+ var Pagination = function Pagination(_ref) {
73
+ var classes = _ref.classes,
74
+ colorThemes = _ref.colorThemes,
75
+ currentPage = _ref.currentPage,
76
+ onChangePage = _ref.onChangePage,
77
+ rowsPerPage = _ref.rowsPerPage,
78
+ totalRows = _ref.totalRows,
79
+ isResponsive = _ref.isResponsive;
80
+ var totalPages = rowsPerPage >= totalRows ? 1 : Math.ceil(totalRows / rowsPerPage);
81
+ var pageList = (0, _utils.getPageNumbers)(totalPages, currentPage, isResponsive);
82
+ var navigationButtonColorTheme = colorThemes.navigationButton || 'secondary';
83
+ return /*#__PURE__*/_react.default.createElement("div", {
84
+ className: "".concat(_stylesModule.default.pagination, " ").concat(classes.pagination)
85
+ }, totalPages > _constants.PAGINATION_LIMIT_DOUBLE_ARROWS && !isResponsive && /*#__PURE__*/_react.default.createElement(_NavigationButton.default, {
86
+ className: _stylesModule.default.invertNavigationLabel,
87
+ colorTheme: navigationButtonColorTheme,
88
+ Icon: NavigateHeaderBeforeIcon,
89
+ label: "1",
90
+ disabled: currentPage === 0,
91
+ onClick: function onClick() {
92
+ return onChangePage(0);
93
+ }
94
+ }), /*#__PURE__*/_react.default.createElement(_NavigationButton.default, {
95
+ colorTheme: navigationButtonColorTheme,
96
+ Icon: NavigateBeforeIcon,
97
+ disabled: currentPage === 0,
98
+ onClick: function onClick() {
99
+ return onChangePage(currentPage - 1);
100
+ }
101
+ }), pageList.map(function (page) {
102
+ return /*#__PURE__*/_react.default.createElement(_UTButton.default, {
103
+ key: "page_".concat(page),
104
+ classNames: {
105
+ childrenContainer: _stylesModule.default.pageButtonChildrenContainer,
106
+ root: "".concat(_stylesModule.default.pageButton, " ").concat(currentPage === page && _stylesModule.default.pageButtondisabled)
107
+ },
108
+ colorTheme: colorThemes.pageButton || 'primary',
109
+ onClick: function onClick() {
110
+ return onChangePage(page);
111
+ },
112
+ variant: currentPage === page ? 'semitransparent' : 'text'
113
+ }, page + 1);
114
+ }), /*#__PURE__*/_react.default.createElement(_NavigationButton.default, {
115
+ colorTheme: navigationButtonColorTheme,
116
+ Icon: NavigateNextIcon,
117
+ disabled: currentPage === totalPages - 1,
118
+ onClick: function onClick() {
119
+ return onChangePage(currentPage + 1);
120
+ }
121
+ }), totalPages > _constants.PAGINATION_LIMIT_DOUBLE_ARROWS && !isResponsive && /*#__PURE__*/_react.default.createElement(_NavigationButton.default, {
122
+ className: _stylesModule.default.navigationLabel,
123
+ colorTheme: navigationButtonColorTheme,
124
+ Icon: NavigateHeaderNextIcon,
125
+ label: totalPages,
126
+ disabled: currentPage === totalPages - 1,
127
+ onClick: function onClick() {
128
+ return onChangePage(totalPages - 1);
129
+ }
130
+ }));
131
+ };
132
+ Pagination.propTypes = {
133
+ classes: _commonTypes.classesType,
134
+ colorThemes: (0, _propTypes.shape)({
135
+ pageButton: _propTypes.string,
136
+ navigationButton: _propTypes.string,
137
+ totalRows: _propTypes.string
138
+ }),
139
+ currentPage: _propTypes.number,
140
+ isResponsive: _propTypes.bool,
141
+ onChangePage: _propTypes.func,
142
+ rowsPerPage: _propTypes.number,
143
+ totalRows: _propTypes.number
144
+ };
145
+ var _default = Pagination;
146
+ exports.default = _default;
@@ -0,0 +1,33 @@
1
+ .pagination {
2
+ align-items: center;
3
+ display: flex;
4
+ }
5
+
6
+ .pageButton {
7
+ align-items: center;
8
+ display: flex;
9
+ justify-content: center;
10
+ }
11
+
12
+ .pageButtonChildrenContainer {
13
+ justify-content: center;
14
+ width: 14px;
15
+ }
16
+
17
+ .pageButtondisabled {
18
+ pointer-events: none;
19
+ }
20
+
21
+ .invertNavigationLabel {
22
+ flex-direction: row-reverse;
23
+
24
+ :first-child {
25
+ margin-left: 4px;
26
+ }
27
+ }
28
+
29
+ .navigationLabel {
30
+ :first-child {
31
+ margin-right: 4px;
32
+ }
33
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PREPOSITION = exports.PAGINATION_LIMIT_DOUBLE_ARROWS = exports.MAX_PAGINATION_ITEMS = void 0;
7
+ var PREPOSITION = 'de';
8
+ exports.PREPOSITION = PREPOSITION;
9
+ var PAGINATION_LIMIT_DOUBLE_ARROWS = 10;
10
+ exports.PAGINATION_LIMIT_DOUBLE_ARROWS = PAGINATION_LIMIT_DOUBLE_ARROWS;
11
+ var MAX_PAGINATION_ITEMS = 5;
12
+ exports.MAX_PAGINATION_ITEMS = MAX_PAGINATION_ITEMS;
@@ -0,0 +1,69 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _propTypes = require("prop-types");
10
+ var _WithTheme = _interopRequireDefault(require("../WithTheme"));
11
+ var _commonTypes = require("../../types/commonTypes");
12
+ var _PageSizeSelector = _interopRequireDefault(require("./components/PageSizeSelector"));
13
+ var _Pagination = _interopRequireDefault(require("./components/Pagination"));
14
+ var _constants = require("./constants");
15
+ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
16
+ var _theme = require("./theme");
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ 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); }
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+ var UTPagination = function UTPagination(_ref) {
21
+ var classes = _ref.classes,
22
+ _ref$colorThemes = _ref.colorThemes,
23
+ colorThemes = _ref$colorThemes === void 0 ? {} : _ref$colorThemes,
24
+ isResponsive = _ref.isResponsive,
25
+ onChangePage = _ref.onChangePage,
26
+ onChangeRowPerPage = _ref.onChangeRowPerPage,
27
+ page = _ref.page,
28
+ rowsPerPage = _ref.rowsPerPage,
29
+ rowsPerPageOptions = _ref.rowsPerPageOptions,
30
+ totalRows = _ref.totalRows,
31
+ totalRowsLabel = _ref.totalRowsLabel;
32
+ return /*#__PURE__*/_react.default.createElement("div", {
33
+ className: "".concat(_stylesModule.default.paginationContainer, " ").concat(classes.paginationContainer)
34
+ }, /*#__PURE__*/_react.default.createElement(_PageSizeSelector.default, {
35
+ classes: classes,
36
+ colorThemes: colorThemes,
37
+ label: "".concat(_constants.PREPOSITION, " ").concat(totalRows, " ").concat(totalRowsLabel),
38
+ onChangeRowPerPage: onChangeRowPerPage,
39
+ options: rowsPerPageOptions,
40
+ rowsPerPage: rowsPerPage,
41
+ totalRows: totalRows
42
+ }), /*#__PURE__*/_react.default.createElement(_Pagination.default, {
43
+ classes: classes,
44
+ colorThemes: colorThemes,
45
+ currentPage: page,
46
+ isResponsive: isResponsive,
47
+ onChangePage: onChangePage,
48
+ rowsPerPage: rowsPerPage,
49
+ totalRows: totalRows
50
+ }));
51
+ };
52
+ UTPagination.propTypes = {
53
+ classes: _commonTypes.classesType,
54
+ colorThemes: (0, _propTypes.shape)({
55
+ pageButton: _propTypes.string,
56
+ navigationButton: _propTypes.string,
57
+ totalRows: _propTypes.string
58
+ }),
59
+ isResponsive: _propTypes.bool,
60
+ page: _propTypes.number,
61
+ onChangePage: _propTypes.func,
62
+ onChangeRowPerPage: _propTypes.func,
63
+ rowsPerPage: _propTypes.number,
64
+ rowsPerPageOptions: (0, _propTypes.arrayOf)(_propTypes.number),
65
+ totalRows: _propTypes.number,
66
+ totalRowsLabel: _propTypes.string
67
+ };
68
+ var _default = (0, _WithTheme.default)(_theme.retrieveStyle)( /*#__PURE__*/(0, _react.memo)(UTPagination));
69
+ exports.default = _default;
@@ -0,0 +1,10 @@
1
+ .paginationContainer {
2
+ align-content: center;
3
+ display: flex;
4
+ justify-content: space-between;
5
+ }
6
+
7
+ .totalRowsLabel {
8
+ align-items: center;
9
+ display: flex;
10
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.retrieveStyle = void 0;
7
+ var _colors = _interopRequireDefault(require("../../scss/variables/_colors.scss"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ var retrieveStyle = function retrieveStyle(_ref) {
10
+ var _theme$UTPagination, _theme$UTPagination2, _theme$Fonts, _theme$UTPagination3, _theme$UTPagination4, _theme$UTPagination5, _theme$UTPagination6, _theme$UTPagination7, _theme$UTPagination8;
11
+ var theme = _ref.theme;
12
+ return {
13
+ paginationContainer: {
14
+ marginTop: (theme === null || theme === void 0 || (_theme$UTPagination = theme.UTPagination) === null || _theme$UTPagination === void 0 || (_theme$UTPagination = _theme$UTPagination.paginationContainer) === null || _theme$UTPagination === void 0 ? void 0 : _theme$UTPagination.marginTop) || 32
15
+ },
16
+ pageSizeSelect: {
17
+ background: theme === null || theme === void 0 || (_theme$UTPagination2 = theme.UTPagination) === null || _theme$UTPagination2 === void 0 || (_theme$UTPagination2 = _theme$UTPagination2.pageSizeSelect) === null || _theme$UTPagination2 === void 0 ? void 0 : _theme$UTPagination2.background,
18
+ fontFamily: theme === null || theme === void 0 || (_theme$Fonts = theme.Fonts) === null || _theme$Fonts === void 0 ? void 0 : _theme$Fonts.fontFamily,
19
+ fontSize: theme === null || theme === void 0 || (_theme$UTPagination3 = theme.UTPagination) === null || _theme$UTPagination3 === void 0 || (_theme$UTPagination3 = _theme$UTPagination3.pageSizeSelect) === null || _theme$UTPagination3 === void 0 ? void 0 : _theme$UTPagination3.fontSize,
20
+ padding: (theme === null || theme === void 0 || (_theme$UTPagination4 = theme.UTPagination) === null || _theme$UTPagination4 === void 0 || (_theme$UTPagination4 = _theme$UTPagination4.pageSizeSelect) === null || _theme$UTPagination4 === void 0 ? void 0 : _theme$UTPagination4.padding) || 6,
21
+ textAlign: theme === null || theme === void 0 || (_theme$UTPagination5 = theme.UTPagination) === null || _theme$UTPagination5 === void 0 || (_theme$UTPagination5 = _theme$UTPagination5.pageSizeSelect) === null || _theme$UTPagination5 === void 0 ? void 0 : _theme$UTPagination5.textAlign
22
+ },
23
+ pageSizeSelectContainer: {
24
+ '& fieldset': {
25
+ border: (theme === null || theme === void 0 || (_theme$UTPagination6 = theme.UTPagination) === null || _theme$UTPagination6 === void 0 || (_theme$UTPagination6 = _theme$UTPagination6.pageSizeSelect) === null || _theme$UTPagination6 === void 0 ? void 0 : _theme$UTPagination6.border) || "1px solid ".concat(_colors.default.gray3)
26
+ },
27
+ '&:hover fieldset': {
28
+ border: (theme === null || theme === void 0 || (_theme$UTPagination7 = theme.UTPagination) === null || _theme$UTPagination7 === void 0 || (_theme$UTPagination7 = _theme$UTPagination7.pageSizeSelect) === null || _theme$UTPagination7 === void 0 || (_theme$UTPagination7 = _theme$UTPagination7.hover) === null || _theme$UTPagination7 === void 0 ? void 0 : _theme$UTPagination7.border) || "1px solid ".concat(_colors.default.gray2)
29
+ }
30
+ },
31
+ pagination: {
32
+ gridGap: (theme === null || theme === void 0 || (_theme$UTPagination8 = theme.UTPagination) === null || _theme$UTPagination8 === void 0 || (_theme$UTPagination8 = _theme$UTPagination8.pagination) === null || _theme$UTPagination8 === void 0 ? void 0 : _theme$UTPagination8.gridGap) || '16px'
33
+ }
34
+ };
35
+ };
36
+ exports.retrieveStyle = retrieveStyle;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getPageNumbers = void 0;
7
+ var _constants = require("../../constants");
8
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ 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); }
11
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
12
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
13
+ 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; }
14
+ var getPageNumbers = function getPageNumbers(totalPages, currentPage, isResponsive) {
15
+ if (isResponsive) return [currentPage];
16
+ if (totalPages <= _constants.MAX_PAGINATION_ITEMS) return _toConsumableArray(Array(totalPages).keys());
17
+ var paginationFactor = _constants.MAX_PAGINATION_ITEMS / 2;
18
+ if (currentPage < Math.ceil(paginationFactor)) return _toConsumableArray(Array(_constants.MAX_PAGINATION_ITEMS).keys());
19
+ if (totalPages - currentPage < paginationFactor) return _toConsumableArray(Array(totalPages).keys()).slice(totalPages - _constants.MAX_PAGINATION_ITEMS, totalPages);
20
+ var floorFactor = Math.floor(paginationFactor);
21
+ var ceilFactor = Math.ceil(paginationFactor);
22
+ return _toConsumableArray(Array(currentPage + ceilFactor).keys()).slice(currentPage - floorFactor);
23
+ };
24
+ exports.getPageNumbers = getPageNumbers;