@widergy/utilitygo-smart-bill-web 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/components/Advice/styles.module.scss +4 -4
  3. package/dist/components/Amount/index.js +1 -1
  4. package/dist/components/Amount/styles.module.scss +3 -3
  5. package/dist/components/BarChart/index.js +1 -1
  6. package/dist/components/BarChart/styles.module.scss +2 -2
  7. package/dist/components/BillCalculation/components/ConceptCard/styles.module.scss +4 -4
  8. package/dist/components/BillCalculation/components/Glossary/index.js +2 -2
  9. package/dist/components/BillCalculation/components/Glossary/styles.module.scss +1 -1
  10. package/dist/components/BillCalculation/index.js +2 -2
  11. package/dist/components/BillCalculation/styles.module.scss +3 -3
  12. package/dist/components/BillCalculation/utils.js +2 -2
  13. package/dist/components/BillSummary/components/BilledConcepts/components/Concept/styles.module.scss +3 -3
  14. package/dist/components/BillSummary/components/BilledConcepts/constants.js +2 -2
  15. package/dist/components/BillSummary/components/BilledConcepts/index.js +4 -4
  16. package/dist/components/BillSummary/components/BilledConcepts/styles.module.scss +3 -3
  17. package/dist/components/BillSummary/components/BilledConcepts/utils.js +3 -3
  18. package/dist/components/BillSummary/index.js +6 -6
  19. package/dist/components/BillSummary/styles.module.scss +4 -4
  20. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/styles.module.scss +1 -1
  21. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/styles.module.scss +1 -1
  22. package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +5 -5
  23. package/dist/components/ConsumptionComparison/components/ComparisonTable/styles.module.scss +3 -3
  24. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/styles.module.scss +3 -3
  25. package/dist/components/ConsumptionComparison/components/PercentageComparison/styles.module.scss +4 -4
  26. package/dist/components/ConsumptionComparison/index.js +3 -3
  27. package/dist/components/ConsumptionComparison/styles.module.scss +4 -4
  28. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +3 -3
  29. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/styles.module.scss +3 -3
  30. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/styles.module.scss +1 -1
  31. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +1 -1
  32. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/styles.module.scss +3 -3
  33. package/dist/components/ConsumptionEnergyDetails/index.js +1 -1
  34. package/dist/components/ConsumptionEnergyDetails/styles.module.scss +3 -3
  35. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +1 -1
  36. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/styles.module.scss +3 -3
  37. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/styles.module.scss +2 -2
  38. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +1 -1
  39. package/dist/components/ConsumptionIncluded/components/TimelineRow/styles.module.scss +2 -2
  40. package/dist/components/ConsumptionIncluded/index.js +1 -1
  41. package/dist/components/ConsumptionIncluded/styles.module.scss +1 -1
  42. package/dist/components/ConsumptionIncluded/utils.js +14 -14
  43. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/styles.module.scss +1 -1
  44. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/styles.module.scss +2 -2
  45. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +2 -2
  46. package/dist/components/ConsumptionPeriod/components/HistoryGraph/styles.module.scss +2 -2
  47. package/dist/components/ConsumptionPeriod/components/Reading/styles.module.scss +3 -3
  48. package/dist/components/ConsumptionPeriod/index.js +2 -2
  49. package/dist/components/ConsumptionPeriod/styles.module.scss +1 -1
  50. package/dist/components/DebtState/styles.module.scss +1 -1
  51. package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/styles.module.scss +1 -1
  52. package/dist/components/MainBillData/components/BillAlert/index.js +2 -2
  53. package/dist/components/MainBillData/components/BillAlert/styles.module.scss +3 -3
  54. package/dist/components/MainBillData/components/BillBody/components/ClientData/styles.module.scss +3 -3
  55. package/dist/components/MainBillData/components/BillBody/components/Consumption/styles.module.scss +2 -2
  56. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/styles.module.scss +3 -3
  57. package/dist/components/MainBillData/components/BillBody/index.js +1 -1
  58. package/dist/components/MainBillData/components/BillBody/styles.module.scss +1 -1
  59. package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/styles.module.scss +2 -2
  60. package/dist/components/MainBillData/components/BillHeader/index.js +3 -3
  61. package/dist/components/MainBillData/components/BillHeader/styles.module.scss +3 -3
  62. package/dist/components/MainBillData/index.js +1 -1
  63. package/dist/components/MainBillData/styles.module.scss +3 -3
  64. package/dist/components/Period/index.js +2 -2
  65. package/dist/components/Period/styles.module.scss +4 -4
  66. package/dist/components/PowerProgresBar/index.js +1 -1
  67. package/dist/components/PowerProgresBar/styles.module.scss +3 -3
  68. package/dist/components/RateAndCategory/index.js +1 -1
  69. package/dist/components/RateAndCategory/styles.module.scss +2 -2
  70. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/styles.module.scss +1 -1
  71. package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +3 -3
  72. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/styles.module.scss +3 -3
  73. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/styles.module.scss +1 -1
  74. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/styles.module.scss +2 -2
  75. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +2 -2
  76. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +2 -2
  77. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/styles.module.scss +3 -3
  78. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +3 -3
  79. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +2 -2
  80. package/dist/components/RatesDefinition/components/CategoryByConsumption/styles.module.scss +3 -3
  81. package/dist/components/RatesDefinition/components/PurchasedRate/styles.module.scss +4 -4
  82. package/dist/components/RatesDefinition/styles.module.scss +3 -3
  83. package/dist/components/SmartBillProvider/index.js +1 -1
  84. package/dist/components/StyledAmount/index.js +1 -1
  85. package/dist/components/WithContextApi/index.js +3 -3
  86. package/dist/index.js +1 -1
  87. package/dist/scss/variables/{_colors.scss → colors.module.scss} +1 -1
  88. package/dist/scss/variables/{_colorsExport.scss → colorsExport.module.scss} +2 -2
  89. package/dist/scss/variables/{_commonColors.scss → commonColors.module.scss} +1 -3
  90. package/dist/shared/constants/aliases.js +1 -1
  91. package/dist/shared/types/componentsTypes.js +1 -1
  92. package/dist/shared/types/smartBillTypes.js +3 -3
  93. package/dist/shared/utils/billCalculation.js +4 -4
  94. package/dist/shared/utils/consumptions.js +7 -7
  95. package/dist/shared/utils/context.js +1 -1
  96. package/dist/shared/utils/periods.js +1 -1
  97. package/package.json +3 -3
  98. package/dist/scss/variables/_fontFamilies.scss +0 -6
  99. package/dist/scss/variables/_utils.scss +0 -15
  100. /package/dist/scss/variables/{_fontSizes.scss → fontSizes.module.scss} +0 -0
  101. /package/dist/scss/variables/{_mediaQueries.scss → mediaQueries.module.scss} +0 -0
  102. /package/dist/scss/variables/{_sizes.scss → sizes.module.scss} +0 -0
@@ -1,6 +1,6 @@
1
- @import '../../../../scss/variables/_colorsExport.scss';
2
- @import '../../../../scss/variables/_mediaQueries';
3
- @import '../../../../scss/variables/_sizes.scss';
1
+ @import '../../../../scss/variables/colorsExport.module.scss';
2
+ @import '../../../../scss/variables/mediaQueries.module.scss';
3
+ @import '../../../../scss/variables/sizes.module.scss';
4
4
 
5
5
  .container {
6
6
  background-color: $white;
@@ -1,7 +1,7 @@
1
- @import '../../../../scss/variables/_colorsExport.scss';
2
- @import '../../../../scss/variables/_mediaQueries';
3
- @import '../../../../scss/variables/_sizes.scss';
4
- @import '../../../../scss/variables/_fontSizes.scss';
1
+ @import '../../../../scss/variables/colorsExport.module.scss';
2
+ @import '../../../../scss/variables/mediaQueries.module.scss';
3
+ @import '../../../../scss/variables/sizes.module.scss';
4
+ @import '../../../../scss/variables/fontSizes.module.scss';
5
5
 
6
6
  .container {
7
7
  align-items: center;
@@ -1,6 +1,6 @@
1
- @import '../../scss/variables/_colorsExport.scss';
2
- @import '../../scss/variables/_mediaQueries';
3
- @import '../../scss/variables/_sizes.scss';
1
+ @import '../../scss/variables/colorsExport.module.scss';
2
+ @import '../../scss/variables/mediaQueries.module.scss';
3
+ @import '../../scss/variables/sizes.module.scss';
4
4
 
5
5
  .container {
6
6
  display: flex;
@@ -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
  });
@@ -16,7 +16,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
16
16
  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."); }
17
17
  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); }
18
18
  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; }
19
- 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; } }
19
+ 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; } }
20
20
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
21
  var StyledAmount = function StyledAmount(_ref) {
22
22
  var contextApiInfo = _ref.contextApiInfo,
@@ -10,10 +10,10 @@ var _Context = require("../../shared/Context");
10
10
  var _context = require("../../shared/utils/context");
11
11
  var _layout = _interopRequireDefault(require("./layout"));
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- 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); }
13
+ 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); }
14
14
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
- 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; }
16
- 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; }
15
+ 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; }
16
+ 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; }
17
17
  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; }
18
18
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
19
  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); }
package/dist/index.js CHANGED
@@ -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
  });
@@ -1,4 +1,4 @@
1
- @import '../../scss/variables/_commonColors.scss';
1
+ @import '../../scss/variables/commonColors.module.scss';
2
2
 
3
3
  $black: rgba(0, 0, 0, 0.87);
4
4
  $dark-gray: #666;
@@ -1,5 +1,5 @@
1
- @import './_commonColors';
2
- @import './_colors.scss';
1
+ @import './commonColors.module.scss';
2
+ @import './colors.module.scss';
3
3
 
4
4
  // sass-lint:disable no-misspelled-properties
5
5
  // sass-lint:disable property-sort-order
@@ -1,6 +1,4 @@
1
- @import './utils';
2
-
3
1
  $black: rgba(0, 0, 0, 0.87);
4
- $white: #FFF;
2
+ $white: #fff;
5
3
  $gray: rgba(0, 0, 0, 0.54);
6
4
  $transparent: transparent;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.POWER_CONSUMPTION = exports.PERIOD_RESPONSIVE = exports.PERIOD_RANGE = exports.PERIOD_ISSUED_DATE = exports.PERIOD_COMPARISON_UNIT_PREV = exports.PERIOD_COMPARISON_UNIT = exports.PERIOD_COMPARISON_TEXT_PREV = exports.PERIOD_COMPARISON_TEXT = exports.PERIOD_COMPARISON_NUMBER_PREV = exports.PERIOD_COMPARISON_NUMBER = exports.PERIOD = exports.PERCENTAGE_COMPARISON_TITLE = exports.PERCENTAGE_COMPARISON_SUBTITLE = exports.PERCENTAGE_COMPARISON_DETAIL = exports.PERCENTAGE_COMPARISON = exports.PARTICULAR_CONDITIONS_TITLE = exports.PARTICULAR_CONDITIONS_LIST_TITLE = exports.PARTICULAR_CONDITION = exports.MAIN_SECONDARY = exports.MAIN_LIGHT = exports.MAIN = exports.LINE_DESCRIPTION = exports.ISSUED_DATE = exports.HEADER_SETTLEMENT_REMAINING_DATE = exports.HEADER_SETTLEMENT_REMAINING = exports.HEADER_SETTLEMENT_DATE = exports.HEADER_SETTLEMENT = exports.HEADER_CONSUMPTION = exports.GLOSSARY_LINK = exports.GET_PERIOD_FIELDS_NO_DATA = exports.EXPIRATION = exports.EXCEEDED_POWER_VALUE = exports.EXCEEDED_POWER_MESSAGE = exports.EXCEEDED_POWER_FINE = exports.ENERGY_TOTAL_CONSUMPTION_UNIT = exports.ENERGY_TOTAL_CONSUMPTION_EXCEEDED_UNIT = exports.ENERGY_TOTAL_CONSUMPTION_EXCEEDED = exports.ENERGY_TOTAL_CONSUMPTION_DETAIL = exports.ENERGY_TOTAL_CONSUMPTION = exports.DETAIL = exports.DEFAULT_PROPS = exports.DEFAULT_COLORS = exports.CONSUMPTION_PERIODICITY = exports.CONSUMPTION_NEXT_DETAIL = exports.CONSUMPTION_DAYS_UNIT_NEXT = exports.CONSUMPTION_DAYS_UNIT_ACTUAL = exports.CONSUMPTION_DAYS_NUMBER_NEXT = exports.CONSUMPTION_DAYS_NUMBER_ACTUAL = exports.CONSUMPTION_DAYS_DAYS_NEXT = exports.CONSUMPTION_DAYS_DAYS_ACTUAL = exports.CONSUMPTION_BIMESTER_UNIT = exports.CONSUMPTION_BIMESTER_NUMBER = exports.CONSUMPTION_BIMESTER_DAYS = exports.CONSUMPTION_ACTUAL_DETAIL = exports.CONCEPT_TITLE = exports.CONCEPT_SECONDARY_NAME = exports.CONCEPT_SECONDARY_AMOUNT_DECIMAL = exports.CONCEPT_SECONDARY_AMOUNT = exports.CONCEPT_LIST_AMOUNT_DECIMAL = exports.CONCEPT_LIST_AMOUNT = exports.CONCEPT_FIRST_NAME = exports.CONCEPT_FIRST_AMOUNT_DECIMAL = exports.CONCEPT_FIRST_AMOUNT = exports.CONCEPT_CARD_AMOUNT_DECIMAL = exports.CONCEPT_CARD_AMOUNT = exports.COLORS = exports.CATEGORY_DEFINITION = exports.CATEGORY = exports.CARD_WHITE_UNIT = exports.CARD_WHITE_MAGNITUDE = exports.CARD_WHITE_CONSUMPTION = exports.CARD_SUBTITLE_REMAINING = exports.CARD_SUBTITLE = exports.CARD_SECONDARY_TITLE = exports.CARD_PRIMARY_UNIT = exports.CARD_PRIMARY_MAGNITUDE = exports.CARD_PRIMARY_CONSUMPTION = exports.CARD_MAIN_TITLE = exports.CARD_GRAY_UNIT = exports.CARD_GRAY_MAGNITUDE = exports.CARD_GRAY_CONSUMPTION = exports.CARD_DESCRIPTION_REMAINING = exports.CARD_DESCRIPTION = exports.CARD_CONSUMPTION_TEXT_REMAINING = exports.CARD_CONSUMPTION_TEXT_CURRENT = exports.CARD_CONSUMPTION_DESCRIPTION_WHITE = exports.CARD_CONSUMPTION_DESCRIPTION_GRAY = exports.BILL_RATE_PRICES_SUBTITLE = exports.BILL_CALC_TOTAL = exports.BILL_CALC_CONCEPT_TITLE = exports.BILL_CALC_CONCEPT = exports.BILL_CALC_AMOUNT_DECIMAL = exports.BILL_CALC_AMOUNT = exports.BILL_ALERT = exports.AMOUNT_DECIMAL = exports.AMOUNT = exports.ADVICE_TITLE = exports.ADVICE_SUBTITLE = exports.ADVICE_CONTENT = exports.ADHERED_DIGITAL_BILL = void 0;
7
7
  exports.WEATHER_PROVIDER_INFORMATION = exports.TYPE_AND_NUMBER_TYPE = exports.TITLE = exports.TINY_DECIMAL = exports.SUMMARY_TITLE = exports.SUMMARY_SUBTITLE = exports.SUMMARY_ROW_NUMBER = exports.SUMMARY_ROW_FOCUSED = exports.SUMMARY_ROW = exports.SUMMARY_RESULT_UNIT = exports.SUMMARY_RESULT_NUMBER = exports.SUMMARY_RESULT = exports.SUMMARY_PERIOD = exports.SUBSTAGE = exports.STAGE_DETAIL = exports.SEASON = exports.REGULAR_LINK = exports.READING_TITLE = exports.READING_STATE_DETAIL = exports.READING_STATE = exports.READING_MAIN = exports.READING_DETAIL = exports.RATE_STAGE_MAGNITUDE = exports.RATE_PRICES_AMOUNT = exports.RATE_MAGNITUDE_UNIT_INDICATOR = exports.RATE_MAGNITUDE_NUMBER_INDICATOR = exports.RATE_LABEL_INDICATOR = exports.RATE_DATA_SUBTITLE = exports.RATE_AND_CATEGORY_MAIN_TEXT = exports.RATE = exports.PURCHASED_RATE_DESCRIPTION = exports.POWER_FACTOR_EXCEEDED_VALUE = exports.POWER_FACTOR_EXCEEDED_MESSAGE = exports.POWER_CONSUMPTION_UNIT_GRAY = exports.POWER_CONSUMPTION_UNIT = exports.POWER_CONSUMPTION_TEXT_GRAY = exports.POWER_CONSUMPTION_TEXT = exports.POWER_CONSUMPTION_GRAY = void 0;
8
8
  var _DEFAULT_COLORS, _DEFAULT_PROPS;
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); }
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
10
  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; }
11
11
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
12
  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); }
@@ -9,7 +9,7 @@ var COMPONENTS = _interopRequireWildcard(require("../constants/components"));
9
9
  var _shape;
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
- 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); }
12
+ 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); }
13
13
  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; }
14
14
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
15
  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); }
@@ -9,9 +9,9 @@ var _assetsTypes = require("./assetsTypes");
9
9
  var _textsTypes = require("./textsTypes");
10
10
  var _formattersTypes = require("./formattersTypes");
11
11
  var _componentsTypes = require("./componentsTypes");
12
- 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); }
13
- 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; }
14
- 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; }
12
+ 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); }
13
+ 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; }
14
+ 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; }
15
15
  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; }
16
16
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
17
17
  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); }
@@ -8,11 +8,11 @@ var _string = require("@widergy/web-utils/lib/string");
8
8
  var _periodicities = require("../constants/periodicities");
9
9
  var _periods = require("./periods");
10
10
  var titleMapper = function titleMapper(billData, texts) {
11
- var _currentPeriod$settle, _currentPeriod$settle2, _currentPeriod$settle3, _currentPeriod$settle4;
11
+ var _currentPeriod$settle, _currentPeriod$settle2, _currentPeriod$settle3;
12
12
  var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
13
- var periodicity = currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 ? void 0 : _currentPeriod$settle.periodicity;
14
- var currentSettlement = (currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle2 = currentPeriod.settlements) === null || _currentPeriod$settle2 === void 0 ? void 0 : (_currentPeriod$settle3 = _currentPeriod$settle2.current) === null || _currentPeriod$settle3 === void 0 ? void 0 : _currentPeriod$settle3.number) || '-';
15
- var totalSettlements = (currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle4 = currentPeriod.settlements) === null || _currentPeriod$settle4 === void 0 ? void 0 : _currentPeriod$settle4.total_settlements) || '-';
13
+ var periodicity = currentPeriod === null || currentPeriod === void 0 || (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 ? void 0 : _currentPeriod$settle.periodicity;
14
+ var currentSettlement = (currentPeriod === null || currentPeriod === void 0 || (_currentPeriod$settle2 = currentPeriod.settlements) === null || _currentPeriod$settle2 === void 0 || (_currentPeriod$settle2 = _currentPeriod$settle2.current) === null || _currentPeriod$settle2 === void 0 ? void 0 : _currentPeriod$settle2.number) || '-';
15
+ var totalSettlements = (currentPeriod === null || currentPeriod === void 0 || (_currentPeriod$settle3 = currentPeriod.settlements) === null || _currentPeriod$settle3 === void 0 ? void 0 : _currentPeriod$settle3.total_settlements) || '-';
16
16
  var periodYear = (currentPeriod === null || currentPeriod === void 0 ? void 0 : currentPeriod.year) || '-';
17
17
  return {
18
18
  periodicity: (0, _string.stringToCompareWithoutAccentsInclusive)(periodicity, _periodicities.PERIODICITY.BIMONTHLY) ? texts.commons.bimester : '-',
@@ -17,15 +17,15 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
17
17
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
18
18
  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; }
19
19
  var getCurrentConsumption = function getCurrentConsumption(period, energyType) {
20
- var _period$settlements, _period$settlements$c, _period$settlements$c2;
21
- return (period === null || period === void 0 ? void 0 : (_period$settlements = period.settlements) === null || _period$settlements === void 0 ? void 0 : (_period$settlements$c = _period$settlements.current) === null || _period$settlements$c === void 0 ? void 0 : (_period$settlements$c2 = _period$settlements$c.consumptions) === null || _period$settlements$c2 === void 0 ? void 0 : _period$settlements$c2.find(function (consumption) {
20
+ var _period$settlements;
21
+ return (period === null || period === void 0 || (_period$settlements = period.settlements) === null || _period$settlements === void 0 || (_period$settlements = _period$settlements.current) === null || _period$settlements === void 0 || (_period$settlements = _period$settlements.consumptions) === null || _period$settlements === void 0 ? void 0 : _period$settlements.find(function (consumption) {
22
22
  return (0, _string.stringToCompareWithoutAccentsInclusive)(consumption.magnitude, energyType);
23
23
  })) || {};
24
24
  };
25
25
  exports.getCurrentConsumption = getCurrentConsumption;
26
26
  var getRemainingConsumption = function getRemainingConsumption(period, energyType) {
27
- var _period$settlements2, _period$settlements2$, _period$settlements2$2;
28
- var remaining = (period === null || period === void 0 ? void 0 : (_period$settlements2 = period.settlements) === null || _period$settlements2 === void 0 ? void 0 : (_period$settlements2$ = _period$settlements2.remaining) === null || _period$settlements2$ === void 0 ? void 0 : (_period$settlements2$2 = _period$settlements2$[0]) === null || _period$settlements2$2 === void 0 ? void 0 : _period$settlements2$2.consumptions) || [];
27
+ var _period$settlements2;
28
+ var remaining = (period === null || period === void 0 || (_period$settlements2 = period.settlements) === null || _period$settlements2 === void 0 || (_period$settlements2 = _period$settlements2.remaining) === null || _period$settlements2 === void 0 || (_period$settlements2 = _period$settlements2[0]) === null || _period$settlements2 === void 0 ? void 0 : _period$settlements2.consumptions) || [];
29
29
  return remaining.find(function (item) {
30
30
  return (0, _string.stringToCompareWithoutAccentsInclusive)(item.magnitude, energyType);
31
31
  }) || {};
@@ -33,14 +33,14 @@ var getRemainingConsumption = function getRemainingConsumption(period, energyTyp
33
33
  exports.getRemainingConsumption = getRemainingConsumption;
34
34
  var getTotalConsumption = function getTotalConsumption(period, energyOrPowerType) {
35
35
  var _period$consumptions;
36
- return (period === null || period === void 0 ? void 0 : (_period$consumptions = period.consumptions) === null || _period$consumptions === void 0 ? void 0 : _period$consumptions.find(function (consumption) {
36
+ return (period === null || period === void 0 || (_period$consumptions = period.consumptions) === null || _period$consumptions === void 0 ? void 0 : _period$consumptions.find(function (consumption) {
37
37
  return (0, _string.stringToCompareWithoutAccentsInclusive)(consumption.type, _consumptions.CONSUMPTION_TYPES.TOTAL) && (0, _string.stringToCompareWithoutAccentsInclusive)(consumption.magnitude, energyOrPowerType);
38
38
  })) || {};
39
39
  };
40
40
  exports.getTotalConsumption = getTotalConsumption;
41
41
  var getDailyConsumption = function getDailyConsumption(period, energyType) {
42
42
  var _period$consumptions2;
43
- return (period === null || period === void 0 ? void 0 : (_period$consumptions2 = period.consumptions) === null || _period$consumptions2 === void 0 ? void 0 : _period$consumptions2.find(function (consumption) {
43
+ return (period === null || period === void 0 || (_period$consumptions2 = period.consumptions) === null || _period$consumptions2 === void 0 ? void 0 : _period$consumptions2.find(function (consumption) {
44
44
  return (0, _string.stringToCompareWithoutAccentsInclusive)(consumption.type, _consumptions.CONSUMPTION_TYPES.DAILY) && (0, _string.stringToCompareWithoutAccentsInclusive)(consumption.magnitude, energyType);
45
45
  })) || {};
46
46
  };
@@ -53,7 +53,7 @@ var getConsumptionHistoryData = function getConsumptionHistoryData(billDataParam
53
53
  var billData = _lodash.default.cloneDeep(billDataParameter);
54
54
  var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
55
55
  var lastYearPeriod = (0, _periods.getLastYearPeriod)(billData);
56
- var otherPeriods = billData === null || billData === void 0 ? void 0 : (_billData$periods = billData.periods) === null || _billData$periods === void 0 ? void 0 : _billData$periods.filter(function (period) {
56
+ var otherPeriods = billData === null || billData === void 0 || (_billData$periods = billData.periods) === null || _billData$periods === void 0 ? void 0 : _billData$periods.filter(function (period) {
57
57
  return !(0, _periods.areSamePeriods)(period, currentPeriod) && !(0, _periods.areSamePeriods)(period, lastYearPeriod) && period.consumptions;
58
58
  }).sort(_periods.comparePeriods);
59
59
  var periods = [].concat(_toConsumableArray(lastYearPeriod.consumptions && showPeriodsInChronologicalOrder ? [lastYearPeriod] : []), _toConsumableArray(otherPeriods), _toConsumableArray(currentPeriod.consumptions ? [currentPeriod] : []), _toConsumableArray(lastYearPeriod.consumptions && !showPeriodsInChronologicalOrder ? [lastYearPeriod] : [])).filter(function (period) {
@@ -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
  });
@@ -43,6 +43,6 @@ var comparePeriods = function comparePeriods(period1, period2) {
43
43
  exports.comparePeriods = comparePeriods;
44
44
  var getSavingsPercentage = function getSavingsPercentage(period) {
45
45
  var _period$additional_in;
46
- return period === null || period === void 0 ? void 0 : (_period$additional_in = period.additional_information) === null || _period$additional_in === void 0 ? void 0 : _period$additional_in.savings_percentage;
46
+ return period === null || period === void 0 || (_period$additional_in = period.additional_information) === null || _period$additional_in === void 0 ? void 0 : _period$additional_in.savings_percentage;
47
47
  };
48
48
  exports.getSavingsPercentage = getSavingsPercentage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/utilitygo-smart-bill-web",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "UtilityGO SmartBill Web",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -55,12 +55,12 @@
55
55
  "@widergy/web-utils": ">=0.4.1",
56
56
  "dayjs": "^1.10.7",
57
57
  "lodash": ">=4.17.4",
58
- "node-sass": "^4.11.0",
58
+ "node-sass": "^8.0.0",
59
59
  "numeral": ">=2.0.6",
60
60
  "react-jss": "^8.6.1",
61
61
  "react-perfect-scrollbar": "^1.5.3",
62
62
  "react-responsive": "^4.1.0",
63
- "sass-loader": "^7.1.0",
63
+ "sass-loader": "^10.0.5",
64
64
  "seamless-immutable": "^7.1.4",
65
65
  "yarn": "^1.22.10"
66
66
  },
@@ -1,6 +0,0 @@
1
- $nunito: 'Nunito';
2
-
3
- // sass-lint:disable no-misspelled-properties
4
- :export {
5
- nunito: $nunito;
6
- }
@@ -1,15 +0,0 @@
1
- // sass-lint:disable no-warn
2
- @function getIn($map, $keys...) {
3
- $map-buff: $map;
4
- $map: map-get($color-map, $map);
5
- @if not $map {
6
- @return '';
7
- }
8
- @each $key in $keys {
9
- $map: map-get($map, $key);
10
- @if not $map {
11
- @return '';
12
- }
13
- }
14
- @return $map;
15
- }