@widergy/utilitygo-smart-bill-web 2.2.1 → 3.0.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 (136) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/components/Advice/index.js +11 -8
  3. package/dist/components/Amount/index.js +27 -23
  4. package/dist/components/Amount/utils.js +1 -5
  5. package/dist/components/Banner/index.js +11 -8
  6. package/dist/components/BarChart/constants.js +3 -6
  7. package/dist/components/BarChart/index.js +29 -24
  8. package/dist/components/BarChart/utils.js +15 -15
  9. package/dist/components/BillCalculation/components/ConceptCard/index.js +53 -47
  10. package/dist/components/BillCalculation/components/Glossary/index.js +49 -66
  11. package/dist/components/BillCalculation/components/Glossary/styles.module.scss +1 -0
  12. package/dist/components/BillCalculation/constants.js +1 -2
  13. package/dist/components/BillCalculation/index.js +49 -53
  14. package/dist/components/BillCalculation/utils.js +19 -22
  15. package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +26 -24
  16. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +2 -3
  17. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +16 -17
  18. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +3 -3
  19. package/dist/components/BillSummary/components/BilledConcepts/constants.js +12 -17
  20. package/dist/components/BillSummary/components/BilledConcepts/index.js +30 -41
  21. package/dist/components/BillSummary/components/BilledConcepts/utils.js +44 -68
  22. package/dist/components/BillSummary/index.js +71 -71
  23. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +9 -10
  24. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +18 -12
  25. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +1 -1
  26. package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +144 -143
  27. package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +17 -16
  28. package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +84 -88
  29. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +22 -13
  30. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +1 -1
  31. package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +22 -16
  32. package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +13 -9
  33. package/dist/components/ConsumptionComparison/index.js +42 -47
  34. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +28 -24
  35. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/styles.module.scss +1 -1
  36. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +19 -15
  37. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +16 -14
  38. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +22 -17
  39. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +1 -1
  40. package/dist/components/ConsumptionEnergyDetails/index.js +47 -43
  41. package/dist/components/ConsumptionEnergyDetails/styles.module.scss +2 -2
  42. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +65 -62
  43. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +11 -13
  44. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +21 -19
  45. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +17 -12
  46. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +43 -39
  47. package/dist/components/ConsumptionIncluded/components/TimelineRow/styles.module.scss +2 -2
  48. package/dist/components/ConsumptionIncluded/index.js +32 -34
  49. package/dist/components/ConsumptionIncluded/utils.js +29 -33
  50. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +15 -12
  51. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +24 -22
  52. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +19 -28
  53. package/dist/components/ConsumptionPeriod/components/Reading/index.js +36 -34
  54. package/dist/components/ConsumptionPeriod/index.js +13 -10
  55. package/dist/components/ConsumptionPeriod/utils.js +13 -15
  56. package/dist/components/Date/index.js +13 -11
  57. package/dist/components/DebtState/index.js +15 -10
  58. package/dist/components/IconAndDetails/index.js +20 -19
  59. package/dist/components/Magnitude/index.js +16 -14
  60. package/dist/components/Magnitude/utils.js +2 -8
  61. package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +19 -16
  62. package/dist/components/MainBillData/components/BillAlert/index.js +25 -33
  63. package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +20 -13
  64. package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +15 -13
  65. package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +1 -3
  66. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +24 -17
  67. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/styles.module.scss +2 -2
  68. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +1 -1
  69. package/dist/components/MainBillData/components/BillBody/index.js +43 -46
  70. package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +17 -13
  71. package/dist/components/MainBillData/components/BillHeader/index.js +30 -26
  72. package/dist/components/MainBillData/components/BillHeader/styles.module.scss +1 -1
  73. package/dist/components/MainBillData/index.js +8 -7
  74. package/dist/components/MainBillData/theme.js +7 -9
  75. package/dist/components/MainBillData/utils.js +1 -5
  76. package/dist/components/Period/index.js +55 -45
  77. package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +16 -13
  78. package/dist/components/PowerProgresBar/index.js +32 -32
  79. package/dist/components/RateAndCategory/index.js +26 -29
  80. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +21 -15
  81. package/dist/components/RatesDefinition/components/BillRate/index.js +25 -16
  82. package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +1 -1
  83. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +15 -11
  84. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +27 -23
  85. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +12 -9
  86. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +1 -1
  87. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +9 -9
  88. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +22 -21
  89. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +35 -38
  90. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +0 -1
  91. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +2 -4
  92. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +18 -32
  93. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +35 -47
  94. package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +18 -36
  95. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +24 -33
  96. package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +1 -5
  97. package/dist/components/RatesDefinition/components/PurchasedRate/index.js +20 -15
  98. package/dist/components/RatesDefinition/index.js +21 -17
  99. package/dist/components/RatesDefinition/styles.module.scss +1 -1
  100. package/dist/components/SmartBillProvider/index.js +13 -36
  101. package/dist/components/StyledAmount/constants.js +2 -3
  102. package/dist/components/StyledAmount/index.js +20 -29
  103. package/dist/components/WithContextApi/index.js +19 -27
  104. package/dist/components/WithContextApi/layout.js +3 -4
  105. package/dist/components/WithSeason/index.js +7 -11
  106. package/dist/constants/deviceSizes.js +27 -24
  107. package/dist/constants/seasons.js +3 -5
  108. package/dist/index.js +19 -19
  109. package/dist/scss/variables/commonColors.module.scss +1 -1
  110. package/dist/shared/Context/index.js +5 -3
  111. package/dist/shared/constants/aliases.js +691 -694
  112. package/dist/shared/constants/consumptions.js +5 -9
  113. package/dist/shared/constants/periodicities.js +2 -3
  114. package/dist/shared/constants/rates.js +2 -3
  115. package/dist/shared/constants/readings.js +3 -5
  116. package/dist/shared/constants/seasons.js +3 -5
  117. package/dist/shared/constants/stagesGraph.js +4 -8
  118. package/dist/shared/types/assetsTypes.js +1 -2
  119. package/dist/shared/types/billDataTypes.js +6 -11
  120. package/dist/shared/types/componentsTypes.js +19 -14
  121. package/dist/shared/types/formattersTypes.js +2 -3
  122. package/dist/shared/types/rateStagesTypes.js +3 -6
  123. package/dist/shared/types/smartBillTypes.js +5 -11
  124. package/dist/shared/types/textsTypes.js +2 -3
  125. package/dist/shared/utils/billCalculation.js +9 -9
  126. package/dist/shared/utils/consumptions.js +27 -55
  127. package/dist/shared/utils/context.js +6 -5
  128. package/dist/shared/utils/expirations.js +1 -5
  129. package/dist/shared/utils/periods.js +14 -20
  130. package/dist/shared/utils/rates.js +1 -5
  131. package/dist/shared/utils/readings.js +2 -10
  132. package/dist/shared/utils/season.js +1 -5
  133. package/dist/shared/utils/stagesGraph.js +11 -15
  134. package/dist/utils/hooks.js +2 -3
  135. package/dist/utils.js +4 -8
  136. package/package.json +26 -63
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -16,39 +15,32 @@ var _RateStagesGraph = _interopRequireDefault(require("./components/RateStagesGr
16
15
  var _Category = _interopRequireDefault(require("./components/Category"));
17
16
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
18
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
- 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); }
20
- 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; }
21
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
22
- 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."); }
23
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
24
- 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; }
25
- 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; } }
26
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
- var CategoryByConsumption = function CategoryByConsumption(_ref) {
28
- var contextApiInfo = _ref.contextApiInfo,
29
- value = _ref.value,
30
- unit = _ref.unit,
31
- category = _ref.category;
32
- var config = contextApiInfo.config,
33
- Label = contextApiInfo.Label;
34
- var rateStages = config.rateStages,
35
- texts = config.texts,
36
- getStageColor = config.getStageColor;
37
- var _useState = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint)),
38
- _useState2 = _slicedToArray(_useState, 2),
39
- isDesktopSize = _useState2[0],
40
- setIsDesktopSize = _useState2[1];
41
- var handleResizeScreen = function handleResizeScreen() {
42
- return setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
43
- };
44
- (0, _react.useEffect)(function () {
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ const CategoryByConsumption = _ref => {
21
+ let {
22
+ contextApiInfo,
23
+ value,
24
+ unit,
25
+ category
26
+ } = _ref;
27
+ const {
28
+ config,
29
+ Label
30
+ } = contextApiInfo;
31
+ const {
32
+ rateStages,
33
+ texts,
34
+ getStageColor
35
+ } = config;
36
+ const [isDesktopSize, setIsDesktopSize] = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
37
+ const handleResizeScreen = () => setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
38
+ (0, _react.useEffect)(() => {
45
39
  window.addEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
46
40
  handleResizeScreen();
47
- return function () {
48
- return window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
49
- };
41
+ return () => window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
50
42
  }, []);
51
- var valueCorrected = value < 0 ? 0 : value && Math.round(value);
43
+ const valueCorrected = value < 0 ? 0 : value && Math.round(value);
52
44
  return /*#__PURE__*/_react.default.createElement("div", {
53
45
  className: _stylesModule.default.container
54
46
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -75,5 +67,4 @@ CategoryByConsumption.propTypes = {
75
67
  unit: _propTypes.string,
76
68
  category: _propTypes.string
77
69
  };
78
- var _default = (0, _WithContextApi.default)()(CategoryByConsumption);
79
- exports.default = _default;
70
+ var _default = exports.default = (0, _WithContextApi.default)()(CategoryByConsumption);
@@ -5,9 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getCurrentStage = void 0;
7
7
  var _constants = require("./constants");
8
- var getCurrentStage = function getCurrentStage(value, rateStages) {
9
- return rateStages.find(function (stage) {
10
- return stage.range[_constants.MIN_VALUE] <= value && (value <= stage.range[_constants.MAX_VALUE] || stage.range[_constants.MAX_VALUE] === _constants.INFINITE);
11
- });
12
- };
8
+ const getCurrentStage = (value, rateStages) => rateStages.find(stage => stage.range[_constants.MIN_VALUE] <= value && (value <= stage.range[_constants.MAX_VALUE] || stage.range[_constants.MAX_VALUE] === _constants.INFINITE));
13
9
  exports.getCurrentStage = getCurrentStage;
@@ -12,19 +12,25 @@ var _aliases = require("../../../../shared/constants/aliases");
12
12
  var _RateAndCategory = _interopRequireDefault(require("../../../RateAndCategory"));
13
13
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- var PurchasedRate = function PurchasedRate(_ref) {
16
- var contextApiInfo = _ref.contextApiInfo,
17
- rate = _ref.rate,
18
- category = _ref.category,
19
- _ref$classes = _ref.classes,
20
- classes = _ref$classes === void 0 ? {} : _ref$classes;
21
- var config = contextApiInfo.config,
22
- ExternalLink = contextApiInfo.ExternalLink,
23
- Label = contextApiInfo.Label;
24
- var purchasedRateErrorLink = config.externalLinks.purchasedRateErrorLink;
25
- var _config$texts$ratesDe = config.texts.ratesDefinition,
26
- purchasedRateTitle = _config$texts$ratesDe.purchasedRateTitle,
27
- purchasedRateError = _config$texts$ratesDe.purchasedRateError;
15
+ const PurchasedRate = _ref => {
16
+ let {
17
+ contextApiInfo,
18
+ rate,
19
+ category,
20
+ classes = {}
21
+ } = _ref;
22
+ const {
23
+ config,
24
+ ExternalLink,
25
+ Label
26
+ } = contextApiInfo;
27
+ const {
28
+ purchasedRateErrorLink
29
+ } = config.externalLinks;
30
+ const {
31
+ purchasedRateTitle,
32
+ purchasedRateError
33
+ } = config.texts.ratesDefinition;
28
34
  return /*#__PURE__*/_react.default.createElement("div", {
29
35
  className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
30
36
  }, /*#__PURE__*/_react.default.createElement(Label, {
@@ -52,5 +58,4 @@ PurchasedRate.propTypes = {
52
58
  container: _propTypes.string
53
59
  })
54
60
  };
55
- var _default = (0, _WithContextApi.default)()(PurchasedRate);
56
- exports.default = _default;
61
+ var _default = exports.default = (0, _WithContextApi.default)()(PurchasedRate);
@@ -21,21 +21,26 @@ var _PurchasedRate = _interopRequireDefault(require("./components/PurchasedRate"
21
21
  var _BillRate = _interopRequireDefault(require("./components/BillRate"));
22
22
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
23
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
- var RatesDefinition = function RatesDefinition(_ref) {
25
- var contextApiInfo = _ref.contextApiInfo,
26
- billData = _ref.billData;
27
- var rate = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'purchased']);
28
- var category = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'category']);
29
- var description = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'description']);
30
- var fixedCharge = (0, _rates.getCharge)(billData, _rates2.CHARGE_TYPES.FIXED).amount;
31
- var variableCharge = (0, _rates.getCharge)(billData, _rates2.CHARGE_TYPES.VARIABLE).amount;
32
- var Label = contextApiInfo.Label;
33
- var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
34
- var currentConsumption = (0, _consumptions.getCurrentConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
35
- var _contextApiInfo$confi = contextApiInfo.config.texts.ratesDefinition,
36
- adviceTitle = _contextApiInfo$confi.adviceTitle,
37
- adviceText = _contextApiInfo$confi.adviceText,
38
- rateDataTitle = _contextApiInfo$confi.rateDataTitle;
24
+ const RatesDefinition = _ref => {
25
+ let {
26
+ contextApiInfo,
27
+ billData
28
+ } = _ref;
29
+ const rate = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'purchased']);
30
+ const category = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'category']);
31
+ const description = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'description']);
32
+ const fixedCharge = (0, _rates.getCharge)(billData, _rates2.CHARGE_TYPES.FIXED).amount;
33
+ const variableCharge = (0, _rates.getCharge)(billData, _rates2.CHARGE_TYPES.VARIABLE).amount;
34
+ const {
35
+ Label
36
+ } = contextApiInfo;
37
+ const currentPeriod = (0, _periods.getCurrentPeriod)(billData);
38
+ const currentConsumption = (0, _consumptions.getCurrentConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
39
+ const {
40
+ adviceTitle,
41
+ adviceText,
42
+ rateDataTitle
43
+ } = contextApiInfo.config.texts.ratesDefinition;
39
44
  return /*#__PURE__*/_react.default.createElement("div", {
40
45
  className: _stylesModule.default.container
41
46
  }, /*#__PURE__*/_react.default.createElement(_CategoryByConsumption.default, {
@@ -71,5 +76,4 @@ RatesDefinition.propTypes = {
71
76
  contextApiInfo: _smartBillTypes.contextApiInfoTypes,
72
77
  billData: _billDataTypes.billDataTypes
73
78
  };
74
- var _default = (0, _WithContextApi.default)()(RatesDefinition);
75
- exports.default = _default;
79
+ var _default = exports.default = (0, _WithContextApi.default)()(RatesDefinition);
@@ -19,9 +19,9 @@
19
19
 
20
20
  .rateDataTitle {
21
21
  align-items: center;
22
+ border-bottom: 1px solid $borders-gray;
22
23
  display: flex;
23
24
  height: min-content;
24
- border-bottom: 1px solid $borders-gray;
25
25
  padding: 16px;
26
26
 
27
27
  @media #{$tablet-mobile} {
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -8,42 +7,20 @@ exports.default = void 0;
8
7
  var _react = _interopRequireWildcard(require("react"));
9
8
  var _Context = require("../../shared/Context");
10
9
  var _smartBillTypes = require("../../shared/types/smartBillTypes");
11
- 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); }
12
- 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; }
13
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
- 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, _toPropertyKey(descriptor.key), descriptor); } }
15
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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); }
18
- 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); }
19
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
20
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
21
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
22
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
23
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
- var SmartBillProvider = /*#__PURE__*/function (_PureComponent) {
26
- _inherits(SmartBillProvider, _PureComponent);
27
- var _super = _createSuper(SmartBillProvider);
28
- function SmartBillProvider() {
29
- _classCallCheck(this, SmartBillProvider);
30
- return _super.apply(this, arguments);
10
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ class SmartBillProvider extends _react.PureComponent {
13
+ render() {
14
+ const {
15
+ children,
16
+ contextApiInfo
17
+ } = this.props;
18
+ return /*#__PURE__*/_react.default.createElement(_Context.SmartBillProvider, {
19
+ value: contextApiInfo
20
+ }, children);
31
21
  }
32
- _createClass(SmartBillProvider, [{
33
- key: "render",
34
- value: function render() {
35
- var _this$props = this.props,
36
- children = _this$props.children,
37
- contextApiInfo = _this$props.contextApiInfo;
38
- return /*#__PURE__*/_react.default.createElement(_Context.SmartBillProvider, {
39
- value: contextApiInfo
40
- }, children);
41
- }
42
- }]);
43
- return SmartBillProvider;
44
- }(_react.PureComponent);
22
+ }
45
23
  SmartBillProvider.propTypes = {
46
24
  contextApiInfo: _smartBillTypes.contextApiInfoTypes
47
25
  };
48
- var _default = SmartBillProvider;
49
- exports.default = _default;
26
+ var _default = exports.default = SmartBillProvider;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.VARIANTS = void 0;
7
7
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- var VARIANTS = {
9
+ const VARIANTS = exports.VARIANTS = {
10
10
  small: {
11
11
  currencyLabelStyle: _stylesModule.default.smallCurrency,
12
12
  decimalLabelStyle: _stylesModule.default.smallDecimalPart
@@ -27,5 +27,4 @@ var VARIANTS = {
27
27
  currencyLabelStyle: _stylesModule.default.titleCurrency,
28
28
  decimalLabelStyle: _stylesModule.default.titleDecimalPart
29
29
  }
30
- };
31
- exports.VARIANTS = VARIANTS;
30
+ };
@@ -12,33 +12,25 @@ var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
12
12
  var _constants = require("./constants");
13
13
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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
- 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
- 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(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
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
- var StyledAmount = function StyledAmount(_ref) {
22
- var contextApiInfo = _ref.contextApiInfo,
23
- _ref$currency = _ref.currency,
24
- currency = _ref$currency === void 0 ? '$' : _ref$currency,
25
- amount = _ref.amount,
26
- _ref$amountFormat = _ref.amountFormat,
27
- amountFormat = _ref$amountFormat === void 0 ? '0,0.00' : _ref$amountFormat,
28
- _ref$splitChar = _ref.splitChar,
29
- splitChar = _ref$splitChar === void 0 ? ',' : _ref$splitChar,
30
- _ref$variant = _ref.variant,
31
- variant = _ref$variant === void 0 ? 'medium' : _ref$variant,
32
- alias = _ref.alias,
33
- aliasDecimal = _ref.aliasDecimal;
34
- var Label = contextApiInfo.Label;
35
- var _VARIANTS$variant = _constants.VARIANTS[variant],
36
- currencyLabelStyle = _VARIANTS$variant.currencyLabelStyle,
37
- decimalLabelStyle = _VARIANTS$variant.decimalLabelStyle;
38
- var _ref2 = amount !== null && amount !== undefined && (0, _numeral.default)(amount).format(amountFormat).split(splitChar) || ['-', '-'],
39
- _ref3 = _slicedToArray(_ref2, 2),
40
- integerPart = _ref3[0],
41
- decimalPart = _ref3[1];
15
+ const StyledAmount = _ref => {
16
+ let {
17
+ contextApiInfo,
18
+ currency = '$',
19
+ amount,
20
+ amountFormat = '0,0.00',
21
+ splitChar = ',',
22
+ variant = 'medium',
23
+ alias,
24
+ aliasDecimal
25
+ } = _ref;
26
+ const {
27
+ Label
28
+ } = contextApiInfo;
29
+ const {
30
+ currencyLabelStyle,
31
+ decimalLabelStyle
32
+ } = _constants.VARIANTS[variant];
33
+ const [integerPart, decimalPart] = amount !== null && amount !== undefined && (0, _numeral.default)(amount).format(amountFormat).split(splitChar) || ['-', '-'];
42
34
  return /*#__PURE__*/_react.default.createElement("div", {
43
35
  className: _stylesModule.default.container
44
36
  }, /*#__PURE__*/_react.default.createElement(Label, {
@@ -61,5 +53,4 @@ StyledAmount.propTypes = {
61
53
  aliasDecimal: _propTypes.string,
62
54
  variant: _propTypes.string
63
55
  };
64
- var _default = (0, _WithContextApi.default)()(StyledAmount);
65
- exports.default = _default;
56
+ var _default = exports.default = (0, _WithContextApi.default)()(StyledAmount);
@@ -10,32 +10,24 @@ 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(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
13
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
- 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
- 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
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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); }
20
- var withContextApi = function withContextApi(retrieveStyle) {
21
- return function (Component) {
22
- return function (props) {
23
- return /*#__PURE__*/_react.default.createElement(_Context.SmartBillConsumer, null, function (contextApiInfo) {
24
- var infoWithUnpackedComponents = _objectSpread(_objectSpread({}, contextApiInfo), (0, _context.unpackComponents)(contextApiInfo));
25
- var infoWithDefaultColors = _objectSpread(_objectSpread({}, infoWithUnpackedComponents), {}, {
26
- config: _objectSpread({
27
- colors: contextApiInfo.colors || _aliases.DEFAULT_COLORS
28
- }, contextApiInfo.config)
29
- });
30
- delete infoWithUnpackedComponents.components;
31
- return /*#__PURE__*/_react.default.createElement(_layout.default, _extends({}, props, {
32
- Component: Component,
33
- contextApiInfo: infoWithDefaultColors,
34
- retrieveStyle: retrieveStyle
35
- }));
36
- });
37
- };
14
+ const withContextApi = retrieveStyle => Component => props => /*#__PURE__*/_react.default.createElement(_Context.SmartBillConsumer, null, contextApiInfo => {
15
+ const infoWithUnpackedComponents = {
16
+ ...contextApiInfo,
17
+ ...(0, _context.unpackComponents)(contextApiInfo)
38
18
  };
39
- };
40
- var _default = withContextApi;
41
- exports.default = _default;
19
+ const infoWithDefaultColors = {
20
+ ...infoWithUnpackedComponents,
21
+ config: {
22
+ colors: contextApiInfo.colors || _aliases.DEFAULT_COLORS,
23
+ ...contextApiInfo.config
24
+ }
25
+ };
26
+ delete infoWithUnpackedComponents.components;
27
+ return /*#__PURE__*/_react.default.createElement(_layout.default, _extends({}, props, {
28
+ Component: Component,
29
+ contextApiInfo: infoWithDefaultColors,
30
+ retrieveStyle: retrieveStyle
31
+ }));
32
+ });
33
+ var _default = exports.default = withContextApi;
@@ -10,9 +10,9 @@ var _reactJss = _interopRequireDefault(require("react-jss"));
10
10
  var _componentsTypes = require("../../shared/types/componentsTypes");
11
11
  var _smartBillTypes = require("../../shared/types/smartBillTypes");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- var ThemedComponent = function ThemedComponent(props) {
13
+ const ThemedComponent = props => {
14
14
  var _props$contextApiInfo;
15
- var StyledComponent = props.retrieveStyle && (_props$contextApiInfo = props.contextApiInfo) !== null && _props$contextApiInfo !== void 0 && _props$contextApiInfo.theme ? (0, _reactJss.default)(props.retrieveStyle(props.contextApiInfo.theme))(props.Component) : props.Component;
15
+ const StyledComponent = props.retrieveStyle && (_props$contextApiInfo = props.contextApiInfo) !== null && _props$contextApiInfo !== void 0 && _props$contextApiInfo.theme ? (0, _reactJss.default)(props.retrieveStyle(props.contextApiInfo.theme))(props.Component) : props.Component;
16
16
  return /*#__PURE__*/_react.default.createElement(StyledComponent, props);
17
17
  };
18
18
  ThemedComponent.propTypes = {
@@ -20,5 +20,4 @@ ThemedComponent.propTypes = {
20
20
  retrieveStyle: _propTypes.func,
21
21
  contextApiInfo: _smartBillTypes.contextApiInfoTypes
22
22
  };
23
- var _default = ThemedComponent;
24
- exports.default = _default;
23
+ var _default = exports.default = ThemedComponent;
@@ -8,15 +8,11 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _season = require("../../shared/utils/season");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
10
  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); }
11
- var withSeason = function withSeason() {
12
- return function (Component) {
13
- return function (props) {
14
- var season = (0, _season.getSeason)(props.monthNumber);
15
- return /*#__PURE__*/_react.default.createElement(Component, _extends({
16
- season: season
17
- }, props));
18
- };
19
- };
11
+ const withSeason = () => Component => props => {
12
+ // eslint-disable-next-line react/prop-types
13
+ const season = (0, _season.getSeason)(props.monthNumber);
14
+ return /*#__PURE__*/_react.default.createElement(Component, _extends({
15
+ season: season
16
+ }, props));
20
17
  };
21
- var _default = withSeason;
22
- exports.default = _default;
18
+ var _default = exports.default = withSeason;
@@ -7,39 +7,38 @@ exports.TabletViewport = exports.TabletMobileViewport = exports.TabletBreakpoint
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _reactResponsive = _interopRequireDefault(require("react-responsive"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- var TabletBreakpoint = 1024;
11
- exports.TabletBreakpoint = TabletBreakpoint;
12
- var MobileBreakpoint = 768;
13
- exports.MobileBreakpoint = MobileBreakpoint;
14
- var FullHDBreakpoint = 1920;
15
- exports.FullHDBreakpoint = FullHDBreakpoint;
16
- var HDBreakpoint = 1380;
17
- exports.HDBreakpoint = HDBreakpoint;
18
- var DESKTOP = 'desktop';
19
- exports.DESKTOP = DESKTOP;
20
- var MOBILE = 'mobile';
21
- exports.MOBILE = MOBILE;
22
- var TABLET = 'tablet';
10
+ const TabletBreakpoint = exports.TabletBreakpoint = 1024;
11
+ const MobileBreakpoint = exports.MobileBreakpoint = 768;
12
+ const FullHDBreakpoint = exports.FullHDBreakpoint = 1920;
13
+ const HDBreakpoint = exports.HDBreakpoint = 1380;
14
+ const DESKTOP = exports.DESKTOP = 'desktop';
15
+ const MOBILE = exports.MOBILE = 'mobile';
16
+ const TABLET = exports.TABLET = 'tablet';
23
17
 
24
18
  // For conditional rendering
25
- exports.TABLET = TABLET;
26
- var DesktopViewport = function DesktopViewport(_ref) {
27
- var children = _ref.children;
19
+ const DesktopViewport = _ref => {
20
+ let {
21
+ children
22
+ } = _ref;
28
23
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
29
24
  minWidth: TabletBreakpoint
30
25
  }, children);
31
26
  };
32
27
  exports.DesktopViewport = DesktopViewport;
33
- var TabletViewport = function TabletViewport(_ref2) {
34
- var children = _ref2.children;
28
+ const TabletViewport = _ref2 => {
29
+ let {
30
+ children
31
+ } = _ref2;
35
32
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
36
33
  minWidth: MobileBreakpoint,
37
34
  maxWidth: TabletBreakpoint - 1
38
35
  }, children);
39
36
  };
40
37
  exports.TabletViewport = TabletViewport;
41
- var MobileViewport = function MobileViewport(_ref3) {
42
- var children = _ref3.children;
38
+ const MobileViewport = _ref3 => {
39
+ let {
40
+ children
41
+ } = _ref3;
43
42
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
44
43
  maxWidth: MobileBreakpoint - 1
45
44
  }, children);
@@ -47,15 +46,19 @@ var MobileViewport = function MobileViewport(_ref3) {
47
46
 
48
47
  // Group tablet & desktop viewport
49
48
  exports.MobileViewport = MobileViewport;
50
- var DefaultViewport = function DefaultViewport(_ref4) {
51
- var children = _ref4.children;
49
+ const DefaultViewport = _ref4 => {
50
+ let {
51
+ children
52
+ } = _ref4;
52
53
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
53
54
  minWidth: MobileBreakpoint
54
55
  }, children);
55
56
  };
56
57
  exports.DefaultViewport = DefaultViewport;
57
- var TabletMobileViewport = function TabletMobileViewport(_ref5) {
58
- var children = _ref5.children;
58
+ const TabletMobileViewport = _ref5 => {
59
+ let {
60
+ children
61
+ } = _ref5;
59
62
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
60
63
  maxWidth: TabletBreakpoint - 1
61
64
  }, children);
@@ -4,14 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SEASON_PERIODS = exports.SEASONS = void 0;
7
- var SEASONS = {
7
+ const SEASONS = exports.SEASONS = {
8
8
  SPRING: 'spring',
9
9
  SUMMER: 'summer',
10
10
  AUTUMN: 'autumn',
11
11
  WINTER: 'winter'
12
12
  };
13
- exports.SEASONS = SEASONS;
14
- var SEASON_PERIODS = [{
13
+ const SEASON_PERIODS = exports.SEASON_PERIODS = [{
15
14
  initMonth: 1,
16
15
  endingMonth: 2,
17
16
  season: SEASONS.SUMMER
@@ -31,5 +30,4 @@ var SEASON_PERIODS = [{
31
30
  initMonth: 12,
32
31
  endingMonth: 12,
33
32
  season: SEASONS.SUMMER
34
- }];
35
- exports.SEASON_PERIODS = SEASON_PERIODS;
33
+ }];