@widergy/utilitygo-smart-bill-web 2.2.2 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/components/Advice/index.js +10 -6
  3. package/dist/components/Amount/index.js +26 -21
  4. package/dist/components/Amount/utils.js +2 -5
  5. package/dist/components/Banner/index.js +10 -6
  6. package/dist/components/BarChart/constants.js +3 -3
  7. package/dist/components/BarChart/index.js +28 -22
  8. package/dist/components/BarChart/utils.js +17 -16
  9. package/dist/components/BillCalculation/components/ConceptCard/index.js +52 -45
  10. package/dist/components/BillCalculation/components/Glossary/index.js +48 -64
  11. package/dist/components/BillCalculation/components/Glossary/styles.module.scss +1 -0
  12. package/dist/components/BillCalculation/constants.js +1 -1
  13. package/dist/components/BillCalculation/index.js +48 -51
  14. package/dist/components/BillCalculation/utils.js +22 -22
  15. package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +25 -22
  16. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +1 -1
  17. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +15 -15
  18. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +3 -3
  19. package/dist/components/BillSummary/components/BilledConcepts/constants.js +13 -14
  20. package/dist/components/BillSummary/components/BilledConcepts/index.js +29 -39
  21. package/dist/components/BillSummary/components/BilledConcepts/utils.js +50 -69
  22. package/dist/components/BillSummary/index.js +70 -69
  23. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +8 -8
  24. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +17 -10
  25. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +3 -2
  26. package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +147 -133
  27. package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +16 -14
  28. package/dist/components/ConsumptionComparison/components/ComparisonTable/styles.module.scss +1 -0
  29. package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +88 -89
  30. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +21 -11
  31. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +3 -2
  32. package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +21 -14
  33. package/dist/components/ConsumptionComparison/components/PercentageComparison/styles.module.scss +1 -0
  34. package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +15 -10
  35. package/dist/components/ConsumptionComparison/index.js +41 -45
  36. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +27 -22
  37. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/styles.module.scss +1 -1
  38. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +18 -13
  39. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +15 -12
  40. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +21 -15
  41. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +3 -2
  42. package/dist/components/ConsumptionEnergyDetails/index.js +46 -41
  43. package/dist/components/ConsumptionEnergyDetails/styles.module.scss +2 -2
  44. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +64 -60
  45. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +12 -13
  46. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +20 -17
  47. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +16 -10
  48. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +42 -37
  49. package/dist/components/ConsumptionIncluded/components/TimelineRow/styles.module.scss +2 -2
  50. package/dist/components/ConsumptionIncluded/index.js +31 -32
  51. package/dist/components/ConsumptionIncluded/utils.js +32 -34
  52. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +14 -10
  53. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/styles.module.scss +1 -0
  54. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +23 -20
  55. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/styles.module.scss +1 -0
  56. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +18 -26
  57. package/dist/components/ConsumptionPeriod/components/Reading/index.js +35 -32
  58. package/dist/components/ConsumptionPeriod/index.js +12 -8
  59. package/dist/components/ConsumptionPeriod/styles.module.scss +1 -0
  60. package/dist/components/ConsumptionPeriod/utils.js +14 -15
  61. package/dist/components/Date/index.js +12 -9
  62. package/dist/components/DebtState/index.js +14 -8
  63. package/dist/components/IconAndDetails/index.js +19 -17
  64. package/dist/components/Magnitude/index.js +15 -12
  65. package/dist/components/Magnitude/utils.js +3 -8
  66. package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +18 -14
  67. package/dist/components/MainBillData/components/BillAlert/index.js +24 -31
  68. package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +19 -11
  69. package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +14 -11
  70. package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +2 -3
  71. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +23 -15
  72. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/styles.module.scss +3 -2
  73. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +3 -2
  74. package/dist/components/MainBillData/components/BillBody/index.js +42 -44
  75. package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +16 -11
  76. package/dist/components/MainBillData/components/BillHeader/index.js +29 -24
  77. package/dist/components/MainBillData/components/BillHeader/styles.module.scss +1 -1
  78. package/dist/components/MainBillData/index.js +7 -5
  79. package/dist/components/MainBillData/theme.js +8 -9
  80. package/dist/components/MainBillData/utils.js +2 -5
  81. package/dist/components/Period/index.js +54 -43
  82. package/dist/components/Period/styles.module.scss +0 -6
  83. package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +15 -11
  84. package/dist/components/PowerProgresBar/index.js +31 -30
  85. package/dist/components/RateAndCategory/index.js +25 -27
  86. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +20 -13
  87. package/dist/components/RatesDefinition/components/BillRate/index.js +24 -14
  88. package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +1 -1
  89. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +14 -9
  90. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +26 -21
  91. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +11 -7
  92. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +1 -1
  93. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +11 -10
  94. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +21 -19
  95. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +34 -36
  96. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +2 -2
  97. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +17 -30
  98. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +37 -48
  99. package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +18 -18
  100. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +23 -31
  101. package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +2 -5
  102. package/dist/components/RatesDefinition/components/PurchasedRate/index.js +19 -13
  103. package/dist/components/RatesDefinition/index.js +20 -15
  104. package/dist/components/RatesDefinition/styles.module.scss +1 -1
  105. package/dist/components/SmartBillProvider/index.js +12 -34
  106. package/dist/components/StyledAmount/constants.js +1 -1
  107. package/dist/components/StyledAmount/index.js +19 -27
  108. package/dist/components/WithContextApi/index.js +18 -25
  109. package/dist/components/WithContextApi/layout.js +2 -2
  110. package/dist/components/WithSeason/index.js +6 -9
  111. package/dist/constants/deviceSizes.js +33 -18
  112. package/dist/constants/seasons.js +2 -2
  113. package/dist/index.js +14 -15
  114. package/dist/scss/variables/commonColors.module.scss +1 -1
  115. package/dist/shared/Context/index.js +7 -3
  116. package/dist/shared/constants/aliases.js +691 -556
  117. package/dist/shared/constants/consumptions.js +4 -4
  118. package/dist/shared/constants/periodicities.js +1 -1
  119. package/dist/shared/constants/rates.js +1 -1
  120. package/dist/shared/constants/readings.js +2 -2
  121. package/dist/shared/constants/seasons.js +2 -2
  122. package/dist/shared/constants/stagesGraph.js +4 -4
  123. package/dist/shared/types/assetsTypes.js +1 -1
  124. package/dist/shared/types/billDataTypes.js +5 -5
  125. package/dist/shared/types/componentsTypes.js +18 -10
  126. package/dist/shared/types/formattersTypes.js +1 -1
  127. package/dist/shared/types/rateStagesTypes.js +3 -3
  128. package/dist/shared/types/smartBillTypes.js +5 -10
  129. package/dist/shared/types/textsTypes.js +1 -1
  130. package/dist/shared/utils/billCalculation.js +11 -10
  131. package/dist/shared/utils/consumptions.js +34 -56
  132. package/dist/shared/utils/context.js +8 -6
  133. package/dist/shared/utils/expirations.js +2 -5
  134. package/dist/shared/utils/periods.js +20 -21
  135. package/dist/shared/utils/rates.js +2 -5
  136. package/dist/shared/utils/readings.js +4 -10
  137. package/dist/shared/utils/season.js +2 -5
  138. package/dist/shared/utils/stagesGraph.js +15 -15
  139. package/dist/utils/hooks.js +1 -1
  140. package/dist/utils.js +7 -8
  141. package/package.json +26 -63
@@ -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, {
@@ -10,31 +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
- };
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
+ });
40
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 = {
@@ -8,14 +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
18
  var _default = exports.default = withSeason;
@@ -7,45 +7,60 @@ 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 = exports.TabletBreakpoint = 1024;
11
- var MobileBreakpoint = exports.MobileBreakpoint = 768;
12
- var FullHDBreakpoint = exports.FullHDBreakpoint = 1920;
13
- var HDBreakpoint = exports.HDBreakpoint = 1380;
14
- var DESKTOP = exports.DESKTOP = 'desktop';
15
- var MOBILE = exports.MOBILE = 'mobile';
16
- var TABLET = exports.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';
17
17
 
18
18
  // For conditional rendering
19
- var DesktopViewport = exports.DesktopViewport = function DesktopViewport(_ref) {
20
- var children = _ref.children;
19
+ const DesktopViewport = _ref => {
20
+ let {
21
+ children
22
+ } = _ref;
21
23
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
22
24
  minWidth: TabletBreakpoint
23
25
  }, children);
24
26
  };
25
- var TabletViewport = exports.TabletViewport = function TabletViewport(_ref2) {
26
- var children = _ref2.children;
27
+ exports.DesktopViewport = DesktopViewport;
28
+ const TabletViewport = _ref2 => {
29
+ let {
30
+ children
31
+ } = _ref2;
27
32
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
28
33
  minWidth: MobileBreakpoint,
29
34
  maxWidth: TabletBreakpoint - 1
30
35
  }, children);
31
36
  };
32
- var MobileViewport = exports.MobileViewport = function MobileViewport(_ref3) {
33
- var children = _ref3.children;
37
+ exports.TabletViewport = TabletViewport;
38
+ const MobileViewport = _ref3 => {
39
+ let {
40
+ children
41
+ } = _ref3;
34
42
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
35
43
  maxWidth: MobileBreakpoint - 1
36
44
  }, children);
37
45
  };
38
46
 
39
47
  // Group tablet & desktop viewport
40
- var DefaultViewport = exports.DefaultViewport = function DefaultViewport(_ref4) {
41
- var children = _ref4.children;
48
+ exports.MobileViewport = MobileViewport;
49
+ const DefaultViewport = _ref4 => {
50
+ let {
51
+ children
52
+ } = _ref4;
42
53
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
43
54
  minWidth: MobileBreakpoint
44
55
  }, children);
45
56
  };
46
- var TabletMobileViewport = exports.TabletMobileViewport = function TabletMobileViewport(_ref5) {
47
- var children = _ref5.children;
57
+ exports.DefaultViewport = DefaultViewport;
58
+ const TabletMobileViewport = _ref5 => {
59
+ let {
60
+ children
61
+ } = _ref5;
48
62
  return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
49
63
  maxWidth: TabletBreakpoint - 1
50
64
  }, children);
51
- };
65
+ };
66
+ exports.TabletMobileViewport = TabletMobileViewport;
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SEASON_PERIODS = exports.SEASONS = void 0;
7
- var SEASONS = exports.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
- var SEASON_PERIODS = exports.SEASON_PERIODS = [{
13
+ const SEASON_PERIODS = exports.SEASON_PERIODS = [{
14
14
  initMonth: 1,
15
15
  endingMonth: 2,
16
16
  season: SEASONS.SUMMER
package/dist/index.js CHANGED
@@ -1,80 +1,79 @@
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
  });
7
6
  exports.Aliases = void 0;
8
7
  Object.defineProperty(exports, "BillCalculation", {
9
8
  enumerable: true,
10
- get: function get() {
9
+ get: function () {
11
10
  return _BillCalculation.default;
12
11
  }
13
12
  });
14
13
  Object.defineProperty(exports, "BillSummary", {
15
14
  enumerable: true,
16
- get: function get() {
15
+ get: function () {
17
16
  return _BillSummary.default;
18
17
  }
19
18
  });
20
19
  Object.defineProperty(exports, "ColorAliases", {
21
20
  enumerable: true,
22
- get: function get() {
21
+ get: function () {
23
22
  return _aliases.COLORS;
24
23
  }
25
24
  });
26
25
  exports.ComponentNames = void 0;
27
26
  Object.defineProperty(exports, "ConsumptionComparison", {
28
27
  enumerable: true,
29
- get: function get() {
28
+ get: function () {
30
29
  return _ConsumptionComparison.default;
31
30
  }
32
31
  });
33
32
  Object.defineProperty(exports, "ConsumptionIncluded", {
34
33
  enumerable: true,
35
- get: function get() {
34
+ get: function () {
36
35
  return _ConsumptionIncluded.default;
37
36
  }
38
37
  });
39
38
  Object.defineProperty(exports, "ConsumptionPeriod", {
40
39
  enumerable: true,
41
- get: function get() {
40
+ get: function () {
42
41
  return _ConsumptionPeriod.default;
43
42
  }
44
43
  });
45
44
  Object.defineProperty(exports, "DefaultLabelProps", {
46
45
  enumerable: true,
47
- get: function get() {
46
+ get: function () {
48
47
  return _aliases.DEFAULT_PROPS;
49
48
  }
50
49
  });
51
50
  Object.defineProperty(exports, "MainBillData", {
52
51
  enumerable: true,
53
- get: function get() {
52
+ get: function () {
54
53
  return _MainBillData.default;
55
54
  }
56
55
  });
57
56
  Object.defineProperty(exports, "RatesDefinition", {
58
57
  enumerable: true,
59
- get: function get() {
58
+ get: function () {
60
59
  return _RatesDefinition.default;
61
60
  }
62
61
  });
63
62
  Object.defineProperty(exports, "SmartBillProvider", {
64
63
  enumerable: true,
65
- get: function get() {
64
+ get: function () {
66
65
  return _SmartBillProvider.default;
67
66
  }
68
67
  });
69
68
  Object.defineProperty(exports, "billDataTypes", {
70
69
  enumerable: true,
71
- get: function get() {
70
+ get: function () {
72
71
  return _billDataTypes.billDataTypes;
73
72
  }
74
73
  });
75
74
  Object.defineProperty(exports, "rateStagesTypes", {
76
75
  enumerable: true,
77
- get: function get() {
76
+ get: function () {
78
77
  return _rateStagesTypes.rateStagesTypes;
79
78
  }
80
79
  });
@@ -93,6 +92,6 @@ var Aliases = _aliases;
93
92
  exports.Aliases = _aliases;
94
93
  var _billDataTypes = require("./shared/types/billDataTypes");
95
94
  var _rateStagesTypes = require("./shared/types/rateStagesTypes");
96
- 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); }
97
- 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; }
95
+ 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); }
96
+ 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; }
98
97
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,4 +1,4 @@
1
1
  $black: rgba(0, 0, 0, 0.87);
2
- $white: #fff;
2
+ $white: #FFF;
3
3
  $gray: rgba(0, 0, 0, 0.54);
4
4
  $transparent: transparent;
@@ -6,6 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.SmartBillProvider = exports.SmartBillConsumer = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- var ContextApi = /*#__PURE__*/_react.default.createContext({});
10
- var SmartBillProvider = exports.SmartBillProvider = ContextApi.Provider,
11
- SmartBillConsumer = exports.SmartBillConsumer = ContextApi.Consumer;
9
+ const ContextApi = /*#__PURE__*/_react.default.createContext({});
10
+ const {
11
+ Provider: SmartBillProvider,
12
+ Consumer: SmartBillConsumer
13
+ } = ContextApi;
14
+ exports.SmartBillConsumer = SmartBillConsumer;
15
+ exports.SmartBillProvider = SmartBillProvider;