@widergy/utilitygo-smart-bill-web 1.8.0 → 1.10.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 (46) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/Amount/index.js +2 -2
  3. package/dist/components/BarChart/index.js +1 -1
  4. package/dist/components/BillCalculation/index.js +1 -1
  5. package/dist/components/BillCalculation/utils.js +2 -2
  6. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +9 -3
  7. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +20 -27
  8. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +2 -2
  9. package/dist/components/BillSummary/components/BilledConcepts/index.js +1 -1
  10. package/dist/components/BillSummary/components/BilledConcepts/utils.js +2 -2
  11. package/dist/components/BillSummary/index.js +1 -1
  12. package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +2 -2
  13. package/dist/components/ConsumptionComparison/index.js +1 -1
  14. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +3 -3
  15. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +1 -1
  16. package/dist/components/ConsumptionEnergyDetails/index.js +11 -4
  17. package/dist/components/ConsumptionEnergyDetails/styles.module.scss +12 -0
  18. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +1 -1
  19. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +9 -17
  20. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +1 -1
  21. package/dist/components/ConsumptionIncluded/index.js +1 -1
  22. package/dist/components/ConsumptionIncluded/utils.js +5 -5
  23. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +3 -3
  24. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +1 -1
  25. package/dist/components/ConsumptionPeriod/components/Reading/index.js +2 -2
  26. package/dist/components/Date/index.js +2 -2
  27. package/dist/components/MainBillData/components/BillAlert/index.js +1 -1
  28. package/dist/components/MainBillData/components/BillBody/index.js +1 -1
  29. package/dist/components/Period/index.js +5 -5
  30. package/dist/components/PowerProgresBar/index.js +1 -1
  31. package/dist/components/RateAndCategory/index.js +1 -1
  32. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +1 -1
  33. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/index.js +6 -1
  34. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +1 -1
  35. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +1 -1
  36. package/dist/components/SmartBillProvider/index.js +3 -3
  37. package/dist/components/WithContextApi/index.js +2 -2
  38. package/dist/index.js +1 -1
  39. package/dist/shared/constants/aliases.js +2 -1
  40. package/dist/shared/constants/components.js +2 -1
  41. package/dist/shared/types/componentsTypes.js +3 -2
  42. package/dist/shared/types/smartBillTypes.js +2 -2
  43. package/dist/shared/utils/consumptions.js +2 -2
  44. package/dist/shared/utils/context.js +3 -2
  45. package/package.json +2 -3
  46. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/utils.js +0 -27
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## [1.10.2](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.10.1...v1.10.2) (2022-01-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * color priority in rate stages ([#22](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/22)) ([7062efa](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/7062efa3dcc0f6ff792e822e0dabf8fa8cd1b5da))
7
+
8
+ ## [1.10.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.10.0...v1.10.1) (2021-12-10)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * removed recharts ([#20](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/20)) ([01a9e74](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/01a9e74da24ae7788f92c20719690450559985a8))
14
+
15
+ # [1.10.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.9.0...v1.10.0) (2021-11-17)
16
+
17
+
18
+ ### Features
19
+
20
+ * single settlement days and some fixes ([#19](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/19)) ([4122d95](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/4122d955e005e9c6631785dbf608ec68c9402e0a))
21
+
22
+ # [1.9.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.8.0...v1.9.0) (2021-11-08)
23
+
24
+
25
+ ### Features
26
+
27
+ * added dayjs ([f1c9d68](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/f1c9d68b5e967211e82a3ac892d554903c9aa4fb))
28
+
1
29
  # [1.8.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.7.3...v1.8.0) (2021-10-26)
2
30
 
3
31
 
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _moment = _interopRequireDefault(require("moment"));
10
+ var _dayjs = _interopRequireDefault(require("dayjs"));
11
11
 
12
12
  var _propTypes = require("prop-types");
13
13
 
@@ -63,7 +63,7 @@ var Amount = function Amount(_ref) {
63
63
  }, item.text), /*#__PURE__*/_react.default.createElement(Label, {
64
64
  alias: _aliases.EXPIRATION,
65
65
  className: _stylesModule.default.expiration
66
- }, (0, _moment.default)(item.expiration.date, 'YYYY-MM-DD').format('DD/MM/YYYY')));
66
+ }, (0, _dayjs.default)(item.expiration.date, 'YYYY-MM-DD').format('DD/MM/YYYY')));
67
67
  };
68
68
 
69
69
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -7,7 +7,7 @@ exports.periodToTitleMapper = void 0;
7
7
 
8
8
  var _string = require("@widergy/web-utils/lib/string");
9
9
 
10
- var _moment = _interopRequireDefault(require("moment"));
10
+ var _dayjs = _interopRequireDefault(require("dayjs"));
11
11
 
12
12
  var _periodicities = require("../../shared/constants/periodicities");
13
13
 
@@ -30,7 +30,7 @@ var periodToTitleMapper = function periodToTitleMapper(billData, texts, periodFo
30
30
  period = _texts$commons.period,
31
31
  bimester = _texts$commons.bimester;
32
32
  var issueedDate = settlements === null || settlements === void 0 ? void 0 : (_settlements$current2 = settlements.current) === null || _settlements$current2 === void 0 ? void 0 : _settlements$current2.issued_on;
33
- var issuedDateLabel = withBillCalcTitleDate ? " (".concat((0, _moment.default)(issueedDate, 'YYYY-MM-DD').format('MM/YYYY'), ")") : '';
33
+ var issuedDateLabel = withBillCalcTitleDate ? " (".concat((0, _dayjs.default)(issueedDate, 'YYYY-MM-DD').format('MM/YYYY'), ")") : '';
34
34
  if (periodFormatter) return periodFormatter({
35
35
  startDate: settlements === null || settlements === void 0 ? void 0 : settlements.start_date,
36
36
  endDate: settlements === null || settlements === void 0 ? void 0 : settlements.end_date
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.RADIAN = void 0;
7
- var RADIAN = Math.PI / 180;
8
- exports.RADIAN = RADIAN;
6
+ exports.PIE_CHART_CUSTOMIZATION = void 0;
7
+ var PIE_CHART_CUSTOMIZATION = {
8
+ animationLength: 800,
9
+ height: 200,
10
+ minAngle: 0.1,
11
+ outerRadius: 100,
12
+ width: 200
13
+ };
14
+ exports.PIE_CHART_CUSTOMIZATION = PIE_CHART_CUSTOMIZATION;
@@ -7,21 +7,27 @@ exports.default = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _recharts = require("recharts");
11
-
12
10
  var _propTypes = require("prop-types");
13
11
 
12
+ var _smartBillTypes = require("../../../../../../shared/types/smartBillTypes");
13
+
14
+ var _WithContextApi = _interopRequireDefault(require("../../../../../WithContextApi"));
15
+
14
16
  var _utils = require("../../utils");
15
17
 
16
- var _utils2 = require("./utils");
18
+ var _constants = require("./constants");
17
19
 
18
20
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
24
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
+
22
26
  var PieChartContainer = function PieChartContainer(_ref) {
23
27
  var concepts = _ref.concepts,
24
- additionalInfo = _ref.additionalInfo;
28
+ additionalInfo = _ref.additionalInfo,
29
+ contextApiInfo = _ref.contextApiInfo;
30
+ var PieChart = contextApiInfo.PieChart;
25
31
  var pieConceptsData = concepts.map(function (concept) {
26
32
  return {
27
33
  color: concept.color,
@@ -31,35 +37,22 @@ var PieChartContainer = function PieChartContainer(_ref) {
31
37
  });
32
38
  return /*#__PURE__*/_react.default.createElement("div", {
33
39
  className: _stylesModule.default.container
34
- }, /*#__PURE__*/_react.default.createElement("div", {
35
- className: _stylesModule.default.graphContainer
36
- }, !additionalInfo.negativeAmmount && /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
37
- height: 250
38
- }, /*#__PURE__*/_react.default.createElement(_recharts.PieChart, {
39
- width: 400,
40
- height: 250
41
- }, /*#__PURE__*/_react.default.createElement(_recharts.Pie, {
40
+ }, !additionalInfo.negativeAmmount && /*#__PURE__*/_react.default.createElement(PieChart, _extends({
41
+ className: _stylesModule.default.pie,
42
42
  data: pieConceptsData,
43
- cx: "50%",
44
- cy: "50%",
45
- labelLine: false,
46
- label: _utils2.renderCustomizedLabel,
47
- outerRadius: 100,
48
- fill: "#8884d8",
49
- dataKey: "value"
50
- }, concepts === null || concepts === void 0 ? void 0 : concepts.map(function (concept) {
51
- return /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
52
- fill: concept.color,
53
- stroke: "none"
54
- });
55
- }))))), concepts.map(function (concept, index) {
43
+ withLabels: false,
44
+ withLegend: false
45
+ }, _constants.PIE_CHART_CUSTOMIZATION)), concepts.map(function (concept, index) {
56
46
  return (0, _utils.renderConcept)(concept, additionalInfo, index === 0);
57
47
  }));
58
48
  };
59
49
 
60
50
  PieChartContainer.propTypes = {
51
+ additionalInfo: (0, _propTypes.shape)((0, _propTypes.objectOf)(_propTypes.any)),
61
52
  concepts: (0, _propTypes.shape)((0, _propTypes.objectOf)(_propTypes.any)),
62
- additionalInfo: (0, _propTypes.shape)((0, _propTypes.objectOf)(_propTypes.any))
53
+ contextApiInfo: _smartBillTypes.contextApiInfoTypes
63
54
  };
64
- var _default = PieChartContainer;
55
+
56
+ var _default = (0, _WithContextApi.default)()(PieChartContainer);
57
+
65
58
  exports.default = _default;
@@ -5,6 +5,6 @@
5
5
  flex-direction: column;
6
6
  }
7
7
 
8
- .graphContainer {
9
- margin-bottom: 20px;
8
+ .pie {
9
+ margin: auto auto 20px auto;
10
10
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -13,9 +13,9 @@ var _Concept = _interopRequireDefault(require("./components/Concept"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
16
+ 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; }
17
17
 
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
18
+ 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; }
19
19
 
20
20
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
21
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -7,7 +7,7 @@ exports.noPeriodData = exports.getField = exports.desktopGetHeaderFields = expor
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _moment = _interopRequireDefault(require("moment"));
10
+ var _dayjs = _interopRequireDefault(require("dayjs"));
11
11
 
12
12
  var _consumptions = require("../../../../shared/utils/consumptions");
13
13
 
@@ -109,7 +109,7 @@ var formatInterval = function formatInterval(period) {
109
109
 
110
110
  var startDate = period === null || period === void 0 ? void 0 : (_period$settlements = period.settlements) === null || _period$settlements === void 0 ? void 0 : _period$settlements.start_date;
111
111
  var endDate = period === null || period === void 0 ? void 0 : (_period$settlements2 = period.settlements) === null || _period$settlements2 === void 0 ? void 0 : _period$settlements2.end_date;
112
- return startDate && endDate && "".concat((0, _moment.default)(startDate).format('DD/MM'), " - ").concat((0, _moment.default)(endDate).format('DD/MM'));
112
+ return startDate && endDate && "".concat((0, _dayjs.default)(startDate).format('DD/MM'), " - ").concat((0, _dayjs.default)(endDate).format('DD/MM'));
113
113
  };
114
114
 
115
115
  var getField = function getField() {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _moment = _interopRequireDefault(require("moment"));
12
+ var _dayjs = _interopRequireDefault(require("dayjs"));
13
13
 
14
14
  var _string = require("@widergy/web-utils/lib/string");
15
15
 
@@ -104,7 +104,7 @@ var ConsumptionEnergyComparison = function ConsumptionEnergyComparison(_ref) {
104
104
  className: _stylesModule.default.totalConsumptionContainer
105
105
  }, periodicity && periodNumber && year && /*#__PURE__*/_react.default.createElement(Label, {
106
106
  alias: _aliases.CONSUMPTION_PERIODICITY
107
- }, "".concat((0, _string.stringToCompareWithoutAccentsInclusive)(periodicity, _periodicities.PERIODICITY.BIMONTHLY) ? texts.commons.bimester : '-', " ").concat(periodNumber, "/").concat((0, _moment.default)(year, 'YYYY').format('YY'), ":")), /*#__PURE__*/_react.default.createElement(_ConsumptionInDaysLabel.default, {
107
+ }, "".concat((0, _string.stringToCompareWithoutAccentsInclusive)(periodicity, _periodicities.PERIODICITY.BIMONTHLY) ? texts.commons.bimester : '-', " ").concat(periodNumber, "/").concat((0, _dayjs.default)(year, 'YYYY').format('YY'), ":")), /*#__PURE__*/_react.default.createElement(_ConsumptionInDaysLabel.default, {
108
108
  consumption: dataValidation(totalConsumption.value),
109
109
  unit: dataValidation(totalConsumption.unit),
110
110
  totalDays: dataValidation(settlements.total_settlements_days),
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -58,7 +58,8 @@ var ConsumptionEnergyDetails = function ConsumptionEnergyDetails(_ref) {
58
58
  var RedAlertIcon = assets.RedAlertIcon;
59
59
  var useCosinePhi = validations.useCosinePhi,
60
60
  showMultipleSettlementsConsumption = validations.showMultipleSettlementsConsumption,
61
- showPercentageComparison = validations.showPercentageComparison;
61
+ showPercentageComparison = validations.showPercentageComparison,
62
+ showSingleSettlementDays = validations.showSingleSettlementDays;
62
63
  var currentConsumption = (0, _consumptions.getCurrentConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
63
64
  var remainingConsumption = (0, _consumptions.getRemainingConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
64
65
  var totalConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
@@ -100,7 +101,7 @@ var ConsumptionEnergyDetails = function ConsumptionEnergyDetails(_ref) {
100
101
  savingsPercentage: savingsPercentage,
101
102
  currentIsFirstSettlement: currentIsFirstSettlement
102
103
  }) : /*#__PURE__*/_react.default.createElement("div", {
103
- className: _stylesModule.default.multipleSettlementsInfo && _stylesModule.default.percentageContainer
104
+ className: _stylesModule.default.multipleSettlementsInfo && _stylesModule.default.percentageContainer && showSingleSettlementDays(billData) && _stylesModule.default.singleSettlementDays
104
105
  }, /*#__PURE__*/_react.default.createElement("div", {
105
106
  className: _stylesModule.default.multipleSettlementsContainer
106
107
  }, Title(false), /*#__PURE__*/_react.default.createElement("div", {
@@ -111,7 +112,13 @@ var ConsumptionEnergyDetails = function ConsumptionEnergyDetails(_ref) {
111
112
  value: dataValidation((0, _utils.numberOrDash)(currentConsumption.value)),
112
113
  unit: dataValidation(currentConsumption.unit),
113
114
  xxxlarge: true
114
- })))) : /*#__PURE__*/_react.default.createElement(_react.Fragment, null, Title(true), /*#__PURE__*/_react.default.createElement("div", {
115
+ }))), showSingleSettlementDays(billData) && /*#__PURE__*/_react.default.createElement("div", {
116
+ className: _stylesModule.default.singleSettlementDaysContainer
117
+ }, /*#__PURE__*/_react.default.createElement(Label, {
118
+ alias: _aliases.CONSUMPTION_PERIODICITY
119
+ }, texts.mainBillData.singleSettlementConsumptionDays), /*#__PURE__*/_react.default.createElement(Label, {
120
+ alias: _aliases.CONSUMPTION_BIMESTER_DAYS
121
+ }, "".concat(currentPeriod.settlements.total_settlements_days, " ").concat(texts.commons.days)))) : /*#__PURE__*/_react.default.createElement(_react.Fragment, null, Title(true), /*#__PURE__*/_react.default.createElement("div", {
115
122
  className: _stylesModule.default.indiviadualSettlementInfo
116
123
  }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_EnergyTotalConsumption.default, {
117
124
  consumption: dataValidation((0, _utils.numberOrDash)(totalConsumption.value)),
@@ -27,6 +27,18 @@ $border-radius: 5px;
27
27
  }
28
28
  }
29
29
 
30
+ .singleSettlementDays {
31
+ display: flex;
32
+ flex-direction: column;
33
+ }
34
+
35
+ .singleSettlementDaysContainer {
36
+ border-top: 1px solid $borders-gray;
37
+ display: flex;
38
+ padding: 12px 24px;
39
+ justify-content: space-between;
40
+ }
41
+
30
42
  .multipleSettlementsContainer {
31
43
  align-items: center;
32
44
  display: flex;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _propTypes = require("prop-types");
11
11
 
12
- var _momentWithLocales = _interopRequireDefault(require("moment/min/moment-with-locales"));
12
+ var _dayjs = _interopRequireDefault(require("dayjs"));
13
13
 
14
14
  var _smartBillTypes = require("../../../../../../shared/types/smartBillTypes");
15
15
 
@@ -28,25 +28,17 @@ var HeaderConsumption = function HeaderConsumption(_ref) {
28
28
  var Label = contextApiInfo.Label,
29
29
  assets = contextApiInfo.assets,
30
30
  config = contextApiInfo.config;
31
- var texts = config.texts;
31
+ var _config$texts$commons = config.texts.commons,
32
+ ofPreposition = _config$texts$commons.ofPreposition,
33
+ toPreposition = _config$texts$commons.toPreposition;
32
34
  var CalendarIcon = assets.CalendarIcon;
33
35
 
34
- _momentWithLocales.default.locale('es');
35
-
36
- var formatDate = function formatDate(date) {
37
- return (0, _momentWithLocales.default)(date, 'DD-MM-YYYY');
38
- };
39
-
40
- var dateDay = function dateDay(date) {
41
- return formatDate(date).format('DD');
36
+ var parseDate = function parseDate(date) {
37
+ return (0, _dayjs.default)(date, 'DD/MM/YYYY');
42
38
  };
43
39
 
44
- var firstDateMonth = function firstDateMonth(date) {
45
- return formatDate(date).format('MMM').replace('.', '');
46
- };
47
-
48
- var getDate = function getDate(date) {
49
- return "".concat(dateDay(date), " ").concat(texts.commons.ofPreposition, " ").concat(firstDateMonth(date));
40
+ var formatDate = function formatDate(date) {
41
+ return "".concat(parseDate(date).format('DD'), " ").concat(ofPreposition, " ").concat(parseDate(date).format('MMM'));
50
42
  };
51
43
 
52
44
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -58,7 +50,7 @@ var HeaderConsumption = function HeaderConsumption(_ref) {
58
50
  }), /*#__PURE__*/_react.default.createElement(Label, {
59
51
  alias: _aliases.HEADER_CONSUMPTION,
60
52
  className: _stylesModule.default.label
61
- }, "".concat(getDate(startDate), " ").concat(texts.commons.toPreposition, " ").concat(getDate(endDate)))));
53
+ }, "".concat(formatDate(startDate), " ").concat(toPreposition, " ").concat(formatDate(endDate)))));
62
54
  };
63
55
 
64
56
  HeaderConsumption.propTypes = {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getBimesterDate = exports.dataMapper = void 0;
7
7
 
8
- var _moment = _interopRequireDefault(require("moment"));
8
+ var _dayjs = _interopRequireDefault(require("dayjs"));
9
9
 
10
10
  var _string = require("@widergy/web-utils/lib/string");
11
11
 
@@ -80,8 +80,8 @@ var consumptionMapper = function consumptionMapper(period, texts) {
80
80
  var _period$settlements6, _period$settlements7;
81
81
 
82
82
  return {
83
- startDate: period !== null && period !== void 0 && (_period$settlements6 = period.settlements) !== null && _period$settlements6 !== void 0 && _period$settlements6.start_date ? (0, _moment.default)(period.settlements.start_date).format('DD/MM/YYYY') : '-',
84
- endDate: period !== null && period !== void 0 && (_period$settlements7 = period.settlements) !== null && _period$settlements7 !== void 0 && _period$settlements7.end_date ? (0, _moment.default)(period.settlements.end_date).format('DD/MM/YYYY') : '-',
83
+ startDate: period !== null && period !== void 0 && (_period$settlements6 = period.settlements) !== null && _period$settlements6 !== void 0 && _period$settlements6.start_date ? (0, _dayjs.default)(period.settlements.start_date).format('DD/MM/YYYY') : '-',
84
+ endDate: period !== null && period !== void 0 && (_period$settlements7 = period.settlements) !== null && _period$settlements7 !== void 0 && _period$settlements7.end_date ? (0, _dayjs.default)(period.settlements.end_date).format('DD/MM/YYYY') : '-',
85
85
  cardTitle: getBimesterDateTitle(period, texts),
86
86
  cardSubtitle: texts.consumption,
87
87
  cardDescription1: getTotalDaysDescriptionComsumption(period, texts),
@@ -102,7 +102,7 @@ var settlementCurrentMapper = function settlementCurrentMapper(period, texts) {
102
102
  cardDescription2: getTotalDaysDescriptionSettlement(period, texts, getCurrent),
103
103
  value: (0, _consumptions.getCurrentConsumption)(period, _consumptions2.ENERGY_TYPES.ACTIVE).value,
104
104
  unit: (0, _consumptions.getCurrentConsumption)(period, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
105
- date: period !== null && period !== void 0 && (_period$settlements8 = period.settlements) !== null && _period$settlements8 !== void 0 && (_period$settlements8$ = _period$settlements8.current) !== null && _period$settlements8$ !== void 0 && _period$settlements8$.issued_on ? (0, _moment.default)(period.settlements.current.issued_on, 'YYYY-MM-DD').format('DD/MM/YYYY') : '-',
105
+ date: period !== null && period !== void 0 && (_period$settlements8 = period.settlements) !== null && _period$settlements8 !== void 0 && (_period$settlements8$ = _period$settlements8.current) !== null && _period$settlements8$ !== void 0 && _period$settlements8$.issued_on ? (0, _dayjs.default)(period.settlements.current.issued_on, 'YYYY-MM-DD').format('DD/MM/YYYY') : '-',
106
106
  settlementNumber: (period === null || period === void 0 ? void 0 : (_period$settlements9 = period.settlements) === null || _period$settlements9 === void 0 ? void 0 : (_period$settlements9$ = _period$settlements9.current) === null || _period$settlements9$ === void 0 ? void 0 : _period$settlements9$.number) || '-',
107
107
  isCurrent: true,
108
108
  order: period === null || period === void 0 ? void 0 : (_period$settlements10 = period.settlements) === null || _period$settlements10 === void 0 ? void 0 : (_period$settlements11 = _period$settlements10.current) === null || _period$settlements11 === void 0 ? void 0 : _period$settlements11.number
@@ -119,7 +119,7 @@ var settlementRemainingMapper = function settlementRemainingMapper(period, texts
119
119
  cardDescription2: getTotalDaysDescriptionSettlement(period, texts, getRemaining),
120
120
  value: (0, _consumptions.getRemainingConsumption)(period, _consumptions2.ENERGY_TYPES.ACTIVE).value,
121
121
  unit: (0, _consumptions.getRemainingConsumption)(period, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
122
- date: (period === null || period === void 0 ? void 0 : (_period$settlements12 = period.settlements) === null || _period$settlements12 === void 0 ? void 0 : (_period$settlements13 = _period$settlements12.remaining) === null || _period$settlements13 === void 0 ? void 0 : _period$settlements13.length) > 0 ? (0, _moment.default)(period.settlements.remaining[0].issued_on, 'YYYY-MM-DD').format('DD/MM/YYYY') : '-',
122
+ date: (period === null || period === void 0 ? void 0 : (_period$settlements12 = period.settlements) === null || _period$settlements12 === void 0 ? void 0 : (_period$settlements13 = _period$settlements12.remaining) === null || _period$settlements13 === void 0 ? void 0 : _period$settlements13.length) > 0 ? (0, _dayjs.default)(period.settlements.remaining[0].issued_on, 'YYYY-MM-DD').format('DD/MM/YYYY') : '-',
123
123
  settlementNumber: (period === null || period === void 0 ? void 0 : (_period$settlements14 = period.settlements) === null || _period$settlements14 === void 0 ? void 0 : (_period$settlements15 = _period$settlements14.remaining) === null || _period$settlements15 === void 0 ? void 0 : (_period$settlements16 = _period$settlements15[0]) === null || _period$settlements16 === void 0 ? void 0 : _period$settlements16.number) || '-',
124
124
  isRemaining: true,
125
125
  order: period === null || period === void 0 ? void 0 : (_period$settlements17 = period.settlements) === null || _period$settlements17 === void 0 ? void 0 : (_period$settlements18 = _period$settlements17.remaining) === null || _period$settlements18 === void 0 ? void 0 : (_period$settlements19 = _period$settlements18[0]) === null || _period$settlements19 === void 0 ? void 0 : _period$settlements19.number
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _propTypes = require("prop-types");
11
11
 
12
- var _moment = _interopRequireDefault(require("moment"));
12
+ var _dayjs = _interopRequireDefault(require("dayjs"));
13
13
 
14
14
  var _aliases = require("../../../../shared/constants/aliases");
15
15
 
@@ -41,7 +41,7 @@ var ConsumptionSummary = function ConsumptionSummary(_ref) {
41
41
  var texts = config.texts;
42
42
 
43
43
  var formatDate = function formatDate(date) {
44
- return (0, _moment.default)(date).format('DD/MM/YYYY');
44
+ return (0, _dayjs.default)(date).format('DD/MM/YYYY');
45
45
  };
46
46
 
47
47
  var daysLabel = totalSettlementsDays ? "(".concat(totalSettlementsDays, " ").concat(texts.consumptionPeriod.days, ")") : '';
@@ -50,7 +50,7 @@ var ConsumptionSummary = function ConsumptionSummary(_ref) {
50
50
  }, periodNumber && year && /*#__PURE__*/_react.default.createElement(Label, {
51
51
  alias: _aliases.SUMMARY_TITLE,
52
52
  className: _stylesModule.default.summaryTitle
53
- }, "".concat(texts.commons.bimester, " ").concat(periodNumber, "/").concat((0, _moment.default)(year, 'YYYY').format('YY'))), initialReadingDate && finalReadingDate && /*#__PURE__*/_react.default.createElement(Label, {
53
+ }, "".concat(texts.commons.bimester, " ").concat(periodNumber, "/").concat((0, _dayjs.default)(year, 'YYYY').format('YY'))), initialReadingDate && finalReadingDate && /*#__PURE__*/_react.default.createElement(Label, {
54
54
  alias: _aliases.SUMMARY_SUBTITLE,
55
55
  className: _stylesModule.default.daysLabel
56
56
  }, "".concat(formatDate(initialReadingDate), " - ").concat(formatDate(finalReadingDate), " ").concat(daysLabel)), /*#__PURE__*/_react.default.createElement("div", {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _propTypes = require("prop-types");
11
11
 
12
- var _moment = _interopRequireDefault(require("moment"));
12
+ var _dayjs = _interopRequireDefault(require("dayjs"));
13
13
 
14
14
  var _numeral = _interopRequireDefault(require("config/numeral"));
15
15
 
@@ -79,7 +79,7 @@ var Reading = function Reading(_ref) {
79
79
  Icon: ReadingDateIcon,
80
80
  mainAlias: _aliases.READING_MAIN,
81
81
  secondaryAlias: _aliases.READING_DETAIL,
82
- mainText: (0, _moment.default)(date).format('DD/MM/YYYY'),
82
+ mainText: (0, _dayjs.default)(date).format('DD/MM/YYYY'),
83
83
  secondaryText: texts.consumptionPeriod.readingDate,
84
84
  classes: {
85
85
  container: _stylesModule.default.iconAndDetailsContainer
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _propTypes = require("prop-types");
11
11
 
12
- var _moment = _interopRequireDefault(require("moment"));
12
+ var _dayjs = _interopRequireDefault(require("dayjs"));
13
13
 
14
14
  var _smartBillTypes = require("../../shared/types/smartBillTypes");
15
15
 
@@ -33,7 +33,7 @@ var Date = function Date(_ref) {
33
33
  }, /*#__PURE__*/_react.default.createElement(Label, {
34
34
  alias: mainAlias,
35
35
  className: _stylesModule.default.valueContainer
36
- }, (0, _moment.default)(date, 'YYYY-MM-DD').format('DD/MM/YYYY')), /*#__PURE__*/_react.default.createElement(Label, {
36
+ }, (0, _dayjs.default)(date, 'YYYY-MM-DD').format('DD/MM/YYYY')), /*#__PURE__*/_react.default.createElement(Label, {
37
37
  alias: detailAlias
38
38
  }, text));
39
39
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _moment = _interopRequireDefault(require("moment"));
12
+ var _dayjs = _interopRequireDefault(require("dayjs"));
13
13
 
14
14
  var _propTypes = require("prop-types");
15
15
 
@@ -75,11 +75,11 @@ var Period = function Period(_ref) {
75
75
  year = currentPeriod.year;
76
76
  var currentSettlement = settlements === null || settlements === void 0 ? void 0 : (_settlements$current = settlements.current) === null || _settlements$current === void 0 ? void 0 : _settlements$current.number;
77
77
  var totalSettlements = settlements === null || settlements === void 0 ? void 0 : settlements.total_settlements;
78
- var startDate = (0, _moment.default)(settlements === null || settlements === void 0 ? void 0 : settlements.start_date).format('DD/MM');
79
- var endDate = (0, _moment.default)(settlements === null || settlements === void 0 ? void 0 : settlements.end_date).format('DD/MM');
78
+ var startDate = (0, _dayjs.default)(settlements === null || settlements === void 0 ? void 0 : settlements.start_date).format('DD/MM');
79
+ var endDate = (0, _dayjs.default)(settlements === null || settlements === void 0 ? void 0 : settlements.end_date).format('DD/MM');
80
80
  var periodicityLabel = "".concat(multipleSettlements ? (0, _string.stringToCompareWithoutAccentsInclusive)(periodicity, _periodicities.PERIODICITY.BIMONTHLY) ? bimester : '-' : period, " ").concat((0, _utils.stringOrDash)(periodNumber));
81
81
  var settlementLabel = "".concat(settlement, " ").concat((0, _utils.numberOrDash)(currentSettlement), " ").concat(ofPreposition, " ").concat((0, _utils.numberOrDash)(totalSettlements));
82
- var issuedDateLabel = "".concat((0, _moment.default)(issueedDate, 'YYYY-MM-DD').format('DD/MM/YYYY'));
82
+ var issuedDateLabel = "".concat((0, _dayjs.default)(issueedDate, 'YYYY-MM-DD').format('DD/MM/YYYY'));
83
83
 
84
84
  var issuedOnDateLabel = /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
85
85
  className: _stylesModule.default.issueDateContainer
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -39,7 +39,7 @@ var SubStage = function SubStage(_ref) {
39
39
  return /*#__PURE__*/_react.default.createElement("div", {
40
40
  style: {
41
41
  marginRight: isLast ? _constants.LAST_SUB_STAGE_MARGIN : isDesktop ? _constants.SUB_STAGE_MARGIN_DESKTOP : _constants.SUB_STAGE_MARGIN_MOBILE,
42
- backgroundColor: getStageColor ? getStageColor(index, totalSubStages) : subStage.color,
42
+ backgroundColor: subStage.color || getStageColor && getStageColor(index, totalSubStages),
43
43
  width: width
44
44
  },
45
45
  className: _stylesModule.default.container
@@ -37,6 +37,11 @@ var LegendItem = function LegendItem(_ref) {
37
37
  consumptionUpToDesktop = _texts$ratesDefinitio.consumptionUpToDesktop,
38
38
  consumptionMoreThanDesktop = _texts$ratesDefinitio.consumptionMoreThanDesktop,
39
39
  consumptionStartingFormDesktop = _texts$ratesDefinitio.consumptionStartingFormDesktop;
40
+
41
+ var format = function format(text) {
42
+ return text.toUpperCase();
43
+ };
44
+
40
45
  return /*#__PURE__*/_react.default.createElement("div", {
41
46
  className: stage ? _stylesModule.default.legendItemContainer : _stylesModule.default.numberItemContainer
42
47
  }, showNumber && /*#__PURE__*/_react.default.createElement("div", {
@@ -46,7 +51,7 @@ var LegendItem = function LegendItem(_ref) {
46
51
  }, /*#__PURE__*/_react.default.createElement(Label, {
47
52
  alias: _aliases.STAGE_DETAIL,
48
53
  className: _stylesModule.default.header
49
- }, legendNumber === 1 ? consumptionUpToDesktop : legendNumber === stagesLength ? consumptionMoreThanDesktop : consumptionStartingFormDesktop), /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
54
+ }, format(legendNumber === 1 ? consumptionUpToDesktop : legendNumber === stagesLength ? consumptionMoreThanDesktop : consumptionStartingFormDesktop)), /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
50
55
  numberAlias: _aliases.RATE_STAGE_MAGNITUDE,
51
56
  unitAlias: _aliases.RATE_STAGE_MAGNITUDE,
52
57
  value: legendNumber === 1 ? stage.range.at(-1) : stage.range.at(0),
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -21,9 +21,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
21
21
 
22
22
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
23
23
 
24
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
24
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
@@ -19,9 +19,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
19
19
 
20
20
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
21
 
22
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
22
+ 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; }
23
23
 
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
24
+ 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; }
25
25
 
26
26
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
27
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -628,7 +628,8 @@ var DEFAULT_PROPS = (_DEFAULT_PROPS = {}, _defineProperty(_DEFAULT_PROPS, TITLE,
628
628
  weight: 'regular'
629
629
  }), _defineProperty(_DEFAULT_PROPS, STAGE_DETAIL, {
630
630
  variant: 'small',
631
- weight: 'regular'
631
+ weight: 'regular',
632
+ color: COLORS.GRAY
632
633
  }), _defineProperty(_DEFAULT_PROPS, ADVICE_TITLE, {
633
634
  weight: 'medium',
634
635
  variant: 'subtitle1'
@@ -10,4 +10,5 @@ exports.TOUCHABLE = 'Components::Touchable';
10
10
  exports.CARD = 'Components::Card';
11
11
  exports.MARKDOWN = 'Components::Markdown';
12
12
  exports.TOGGLE = 'Components::Toggle';
13
- exports.BAR_CHART = 'Components::BarChart';
13
+ exports.BAR_CHART = 'Components::BarChart';
14
+ exports.PIE_CHART = 'Components::PieChart';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -33,6 +33,7 @@ var unpackedComponentsTypes = {
33
33
  Card: componentTypes,
34
34
  Markdown: componentTypes,
35
35
  Toggle: componentTypes,
36
- BarChart: componentTypes
36
+ BarChart: componentTypes,
37
+ PieChart: componentTypes
37
38
  };
38
39
  exports.unpackedComponentsTypes = unpackedComponentsTypes;
@@ -15,9 +15,9 @@ var _formattersTypes = require("./formattersTypes");
15
15
 
16
16
  var _componentsTypes = require("./componentsTypes");
17
17
 
18
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
18
+ 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; }
19
19
 
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
20
+ 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; }
21
21
 
22
22
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
23
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getTotalConsumption = exports.getRemainingConsumption = exports.getDailyConsumption = exports.getCurrentConsumption = exports.getConsumptionHistoryData = exports.consumptionDataMapper = void 0;
7
7
 
8
- var _moment = _interopRequireDefault(require("moment"));
8
+ var _dayjs = _interopRequireDefault(require("dayjs"));
9
9
 
10
10
  var _lodash = _interopRequireDefault(require("lodash"));
11
11
 
@@ -71,7 +71,7 @@ var getDailyConsumption = function getDailyConsumption(period, energyType) {
71
71
  exports.getDailyConsumption = getDailyConsumption;
72
72
 
73
73
  var formatPeriod = function formatPeriod(period) {
74
- return period.number && period.year && "".concat(period.number, "/").concat((0, _moment.default)(period.year, 'YYYY').format('YY'));
74
+ return period.number && period.year && "".concat(period.number, "/").concat((0, _dayjs.default)(period.year, 'YYYY').format('YY'));
75
75
  };
76
76
 
77
77
  var getConsumptionHistoryData = function getConsumptionHistoryData(billDataParameter, energyType, showPeriodsInChronologicalOrder) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -26,7 +26,8 @@ var unpackComponents = function unpackComponents(contextApiInfo) {
26
26
  Card: components[COMPONENTS.CARD],
27
27
  Markdown: components[COMPONENTS.MARKDOWN],
28
28
  Toggle: components[COMPONENTS.TOGGLE],
29
- BarChart: components[COMPONENTS.BAR_CHART]
29
+ BarChart: components[COMPONENTS.BAR_CHART],
30
+ PieChart: components[COMPONENTS.PIE_CHART]
30
31
  };
31
32
  };
32
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/utilitygo-smart-bill-web",
3
- "version": "1.8.0",
3
+ "version": "1.10.2",
4
4
  "description": "UtilityGO SmartBill Web",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -52,14 +52,13 @@
52
52
  ],
53
53
  "dependencies": {
54
54
  "@widergy/web-utils": ">=0.4.1",
55
+ "dayjs": "^1.10.7",
55
56
  "lodash": ">=4.17.4",
56
- "moment": ">=2.19.1",
57
57
  "node-sass": "^4.11.0",
58
58
  "numeral": ">=2.0.6",
59
59
  "react-jss": "^8.6.1",
60
60
  "react-perfect-scrollbar": "^1.5.3",
61
61
  "react-responsive": "^4.1.0",
62
- "recharts": "github:widergy/recharts#master",
63
62
  "sass-loader": "^7.1.0",
64
63
  "seamless-immutable": "^7.1.4",
65
64
  "yarn": "^1.22.10"
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.renderCustomizedLabel = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _constants = require("./constants");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- var renderCustomizedLabel = function renderCustomizedLabel(cx, cy, midAngle, innerRadius, outerRadius, percent) {
15
- var radius = innerRadius + (outerRadius - innerRadius) * 0.5;
16
- var x = cx + radius * Math.cos(-midAngle * _constants.RADIAN);
17
- var y = cy + radius * Math.sin(-midAngle * _constants.RADIAN);
18
- return /*#__PURE__*/_react.default.createElement("text", {
19
- x: x,
20
- y: y,
21
- fill: "white",
22
- textAnchor: x > cx ? 'start' : 'end',
23
- dominantBaseline: "central"
24
- }, "".concat((percent * 100).toFixed(0), "%"));
25
- };
26
-
27
- exports.renderCustomizedLabel = renderCustomizedLabel;