@widergy/utilitygo-smart-bill-web 1.10.0 → 1.12.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.
- package/CHANGELOG.md +28 -0
- package/dist/components/Advice/index.js +6 -10
- package/dist/components/Amount/index.js +21 -26
- package/dist/components/Amount/utils.js +5 -1
- package/dist/components/Banner/index.js +6 -10
- package/dist/components/BarChart/constants.js +3 -3
- package/dist/components/BarChart/index.js +25 -28
- package/dist/components/BarChart/utils.js +15 -15
- package/dist/components/BillCalculation/components/ConceptCard/index.js +48 -47
- package/dist/components/BillCalculation/constants.js +1 -1
- package/dist/components/BillCalculation/index.js +54 -44
- package/dist/components/BillCalculation/utils.js +14 -17
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +25 -26
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +9 -3
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +31 -34
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +2 -2
- package/dist/components/BillSummary/components/BilledConcepts/constants.js +14 -12
- package/dist/components/BillSummary/components/BilledConcepts/index.js +49 -31
- package/dist/components/BillSummary/components/BilledConcepts/utils.js +76 -44
- package/dist/components/BillSummary/index.js +78 -76
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +8 -8
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +12 -17
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +1 -1
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +135 -148
- package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +14 -16
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +94 -89
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +11 -21
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +1 -1
- package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +16 -21
- package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +9 -13
- package/dist/components/ConsumptionComparison/index.js +56 -42
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +26 -30
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +13 -18
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +15 -17
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +17 -21
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +1 -1
- package/dist/components/ConsumptionEnergyDetails/index.js +47 -51
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +65 -66
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +13 -11
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +19 -22
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +10 -16
- package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +39 -43
- package/dist/components/ConsumptionIncluded/index.js +36 -34
- package/dist/components/ConsumptionIncluded/utils.js +33 -29
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +10 -14
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +22 -25
- package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +34 -18
- package/dist/components/ConsumptionPeriod/components/Reading/index.js +34 -37
- package/dist/components/ConsumptionPeriod/index.js +8 -12
- package/dist/components/ConsumptionPeriod/utils.js +15 -13
- package/dist/components/Date/index.js +9 -12
- package/dist/components/DebtState/index.js +8 -14
- package/dist/components/IconAndDetails/index.js +17 -19
- package/dist/components/Magnitude/index.js +12 -15
- package/dist/components/Magnitude/utils.js +8 -2
- package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +16 -20
- package/dist/components/MainBillData/components/BillAlert/index.js +45 -28
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +11 -19
- package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +11 -14
- package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +3 -1
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +15 -23
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +1 -1
- package/dist/components/MainBillData/components/BillBody/index.js +50 -45
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +9 -15
- package/dist/components/MainBillData/components/BillHeader/index.js +26 -29
- package/dist/components/MainBillData/index.js +5 -7
- package/dist/components/MainBillData/theme.js +9 -7
- package/dist/components/MainBillData/utils.js +5 -1
- package/dist/components/Period/index.js +47 -55
- package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +11 -15
- package/dist/components/PowerProgresBar/index.js +36 -36
- package/dist/components/RateAndCategory/index.js +31 -30
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +13 -20
- package/dist/components/RatesDefinition/components/BillRate/index.js +14 -24
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +9 -14
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +21 -26
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +13 -19
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +1 -4
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +13 -56
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +50 -0
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/styles.module.scss +34 -0
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +65 -0
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +88 -0
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +6 -37
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +51 -16
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/styles.module.scss +4 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +68 -23
- package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +42 -0
- package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +45 -36
- package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +16 -0
- package/dist/components/RatesDefinition/components/PurchasedRate/index.js +13 -19
- package/dist/components/RatesDefinition/index.js +15 -20
- package/dist/components/SmartBillProvider/index.js +47 -12
- package/dist/components/StyledAmount/constants.js +1 -1
- package/dist/components/StyledAmount/index.js +35 -19
- package/dist/components/WithContextApi/index.js +27 -16
- package/dist/components/WithContextApi/layout.js +2 -2
- package/dist/components/WithSeason/index.js +9 -5
- package/dist/constants/deviceSizes.js +17 -27
- package/dist/constants/seasons.js +2 -2
- package/dist/index.js +16 -14
- package/dist/shared/Context/index.js +3 -5
- package/dist/shared/constants/aliases.js +550 -683
- package/dist/shared/constants/components.js +2 -1
- package/dist/shared/constants/consumptions.js +4 -4
- package/dist/shared/constants/periodicities.js +1 -1
- package/dist/shared/constants/rates.js +1 -1
- package/dist/shared/constants/readings.js +2 -2
- package/dist/shared/constants/seasons.js +2 -2
- package/dist/shared/constants/stagesGraph.js +4 -4
- package/dist/shared/types/assetsTypes.js +1 -1
- package/dist/shared/types/billDataTypes.js +4 -4
- package/dist/shared/types/componentsTypes.js +13 -18
- package/dist/shared/types/formattersTypes.js +1 -1
- package/dist/shared/types/rateStagesTypes.js +4 -4
- package/dist/shared/types/smartBillTypes.js +10 -5
- package/dist/shared/types/textsTypes.js +1 -1
- package/dist/shared/utils/billCalculation.js +9 -9
- package/dist/shared/utils/consumptions.js +62 -28
- package/dist/shared/utils/context.js +8 -7
- package/dist/shared/utils/expirations.js +5 -1
- package/dist/shared/utils/periods.js +20 -14
- package/dist/shared/utils/rates.js +5 -1
- package/dist/shared/utils/readings.js +10 -2
- package/dist/shared/utils/season.js +5 -1
- package/dist/shared/utils/stagesGraph.js +15 -11
- package/dist/utils/hooks.js +5 -37
- package/dist/utils.js +8 -4
- package/package.json +2 -2
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/utils.js +0 -27
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/index.js +0 -21
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/styles.module.scss +0 -15
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +0 -69
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/styles.module.scss +0 -5
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/utils.js +0 -12
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/index.js +0 -68
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/styles.module.scss +0 -32
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/index.js +0 -59
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/styles.module.scss +0 -3
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/index.js +0 -83
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/styles.module.scss +0 -57
|
@@ -1,5 +1,7 @@
|
|
|
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); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -25,39 +27,52 @@ var _Category = _interopRequireDefault(require("./components/Category"));
|
|
|
25
27
|
|
|
26
28
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
27
29
|
|
|
28
|
-
var _LegendItem = _interopRequireDefault(require("./components/RateStagesGraph/components/LegendItem"));
|
|
29
|
-
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
31
|
|
|
32
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
-
|
|
34
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
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."); }
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
var CategoryByConsumption = function CategoryByConsumption(_ref) {
|
|
49
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
50
|
+
value = _ref.value,
|
|
51
|
+
unit = _ref.unit,
|
|
52
|
+
category = _ref.category;
|
|
53
|
+
var config = contextApiInfo.config,
|
|
54
|
+
Label = contextApiInfo.Label;
|
|
55
|
+
var rateStages = config.rateStages,
|
|
56
|
+
texts = config.texts,
|
|
57
|
+
getStageColor = config.getStageColor;
|
|
58
|
+
|
|
59
|
+
var _useState = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint)),
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
isDesktopSize = _useState2[0],
|
|
62
|
+
setIsDesktopSize = _useState2[1];
|
|
63
|
+
|
|
64
|
+
var handleResizeScreen = function handleResizeScreen() {
|
|
65
|
+
return setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
(0, _react.useEffect)(function () {
|
|
56
69
|
window.addEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
|
|
57
70
|
handleResizeScreen();
|
|
58
|
-
return ()
|
|
71
|
+
return function () {
|
|
72
|
+
return window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
|
|
73
|
+
};
|
|
59
74
|
}, []);
|
|
60
|
-
|
|
75
|
+
var valueCorrected = value < 0 ? 0 : value && Math.round(value);
|
|
61
76
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
62
77
|
className: _stylesModule.default.container
|
|
63
78
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -72,17 +87,11 @@ const CategoryByConsumption = _ref => {
|
|
|
72
87
|
category: category,
|
|
73
88
|
wrap: true
|
|
74
89
|
}), (valueCorrected === 0 || valueCorrected) && /*#__PURE__*/_react.default.createElement(_RateStagesGraph.default, {
|
|
90
|
+
getStageColor: getStageColor,
|
|
75
91
|
value: valueCorrected,
|
|
76
92
|
unit: unit,
|
|
77
93
|
rateStages: rateStages
|
|
78
|
-
}))
|
|
79
|
-
className: _stylesModule.default.ratesLegend
|
|
80
|
-
}, rateStages.map((rateStage, index) => /*#__PURE__*/_react.default.createElement(_LegendItem.default, {
|
|
81
|
-
legendNumber: index + 1,
|
|
82
|
-
showNumber: true,
|
|
83
|
-
stagesLength: rateStages.length,
|
|
84
|
-
stage: rateStage
|
|
85
|
-
}))));
|
|
94
|
+
})));
|
|
86
95
|
};
|
|
87
96
|
|
|
88
97
|
CategoryByConsumption.propTypes = {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getCurrentStage = void 0;
|
|
7
|
+
|
|
8
|
+
var _constants = require("./constants");
|
|
9
|
+
|
|
10
|
+
var getCurrentStage = function getCurrentStage(value, rateStages) {
|
|
11
|
+
return rateStages.find(function (stage) {
|
|
12
|
+
return stage.range[_constants.MIN_VALUE] <= value && (value <= stage.range[_constants.MAX_VALUE] || stage.range[_constants.MAX_VALUE] === _constants.INFINITE);
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.getCurrentStage = getCurrentStage;
|
|
@@ -21,25 +21,19 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
purchasedRateErrorLink
|
|
38
|
-
} = config.externalLinks;
|
|
39
|
-
const {
|
|
40
|
-
purchasedRateTitle,
|
|
41
|
-
purchasedRateError
|
|
42
|
-
} = config.texts.ratesDefinition;
|
|
24
|
+
var PurchasedRate = function PurchasedRate(_ref) {
|
|
25
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
26
|
+
rate = _ref.rate,
|
|
27
|
+
category = _ref.category,
|
|
28
|
+
_ref$classes = _ref.classes,
|
|
29
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
30
|
+
var config = contextApiInfo.config,
|
|
31
|
+
ExternalLink = contextApiInfo.ExternalLink,
|
|
32
|
+
Label = contextApiInfo.Label;
|
|
33
|
+
var purchasedRateErrorLink = config.externalLinks.purchasedRateErrorLink;
|
|
34
|
+
var _config$texts$ratesDe = config.texts.ratesDefinition,
|
|
35
|
+
purchasedRateTitle = _config$texts$ratesDe.purchasedRateTitle,
|
|
36
|
+
purchasedRateError = _config$texts$ratesDe.purchasedRateError;
|
|
43
37
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
38
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
45
39
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -39,26 +39,21 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
39
39
|
|
|
40
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const {
|
|
58
|
-
adviceTitle,
|
|
59
|
-
adviceText,
|
|
60
|
-
rateDataTitle
|
|
61
|
-
} = contextApiInfo.config.texts.ratesDefinition;
|
|
42
|
+
var RatesDefinition = function RatesDefinition(_ref) {
|
|
43
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
44
|
+
billData = _ref.billData;
|
|
45
|
+
var rate = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'purchased']);
|
|
46
|
+
var category = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'category']);
|
|
47
|
+
var description = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'description']);
|
|
48
|
+
var fixedCharge = (0, _rates.getCharge)(billData, _rates2.CHARGE_TYPES.FIXED).amount;
|
|
49
|
+
var variableCharge = (0, _rates.getCharge)(billData, _rates2.CHARGE_TYPES.VARIABLE).amount;
|
|
50
|
+
var Label = contextApiInfo.Label;
|
|
51
|
+
var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
52
|
+
var currentConsumption = (0, _consumptions.getCurrentConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
|
|
53
|
+
var _contextApiInfo$confi = contextApiInfo.config.texts.ratesDefinition,
|
|
54
|
+
adviceTitle = _contextApiInfo$confi.adviceTitle,
|
|
55
|
+
adviceText = _contextApiInfo$confi.adviceText,
|
|
56
|
+
rateDataTitle = _contextApiInfo$confi.rateDataTitle;
|
|
62
57
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
63
58
|
className: _stylesModule.default.container
|
|
64
59
|
}, /*#__PURE__*/_react.default.createElement(_CategoryByConsumption.default, {
|
|
@@ -1,5 +1,7 @@
|
|
|
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); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -11,22 +13,55 @@ var _Context = require("../../shared/Context");
|
|
|
11
13
|
|
|
12
14
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
13
15
|
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
+
|
|
22
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
23
|
+
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
|
+
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
|
|
30
|
+
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); }; }
|
|
15
31
|
|
|
16
|
-
function
|
|
32
|
+
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); }
|
|
17
33
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
+
|
|
36
|
+
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; } }
|
|
37
|
+
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
+
|
|
40
|
+
var SmartBillProvider = /*#__PURE__*/function (_PureComponent) {
|
|
41
|
+
_inherits(SmartBillProvider, _PureComponent);
|
|
42
|
+
|
|
43
|
+
var _super = _createSuper(SmartBillProvider);
|
|
44
|
+
|
|
45
|
+
function SmartBillProvider() {
|
|
46
|
+
_classCallCheck(this, SmartBillProvider);
|
|
47
|
+
|
|
48
|
+
return _super.apply(this, arguments);
|
|
27
49
|
}
|
|
28
50
|
|
|
29
|
-
|
|
51
|
+
_createClass(SmartBillProvider, [{
|
|
52
|
+
key: "render",
|
|
53
|
+
value: function render() {
|
|
54
|
+
var _this$props = this.props,
|
|
55
|
+
children = _this$props.children,
|
|
56
|
+
contextApiInfo = _this$props.contextApiInfo;
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_Context.SmartBillProvider, {
|
|
58
|
+
value: contextApiInfo
|
|
59
|
+
}, children);
|
|
60
|
+
}
|
|
61
|
+
}]);
|
|
62
|
+
|
|
63
|
+
return SmartBillProvider;
|
|
64
|
+
}(_react.PureComponent);
|
|
30
65
|
|
|
31
66
|
SmartBillProvider.propTypes = {
|
|
32
67
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes
|
|
@@ -9,7 +9,7 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
var VARIANTS = {
|
|
13
13
|
small: {
|
|
14
14
|
currencyLabelStyle: _stylesModule.default.smallCurrency,
|
|
15
15
|
decimalLabelStyle: _stylesModule.default.smallDecimalPart
|
|
@@ -21,25 +21,41 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
|
|
26
|
+
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."); }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
33
|
+
|
|
34
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
|
|
36
|
+
var StyledAmount = function StyledAmount(_ref) {
|
|
37
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
38
|
+
_ref$currency = _ref.currency,
|
|
39
|
+
currency = _ref$currency === void 0 ? '$' : _ref$currency,
|
|
40
|
+
amount = _ref.amount,
|
|
41
|
+
_ref$amountFormat = _ref.amountFormat,
|
|
42
|
+
amountFormat = _ref$amountFormat === void 0 ? '0,0.00' : _ref$amountFormat,
|
|
43
|
+
_ref$splitChar = _ref.splitChar,
|
|
44
|
+
splitChar = _ref$splitChar === void 0 ? ',' : _ref$splitChar,
|
|
45
|
+
_ref$variant = _ref.variant,
|
|
46
|
+
variant = _ref$variant === void 0 ? 'medium' : _ref$variant,
|
|
47
|
+
alias = _ref.alias,
|
|
48
|
+
aliasDecimal = _ref.aliasDecimal;
|
|
49
|
+
var Label = contextApiInfo.Label;
|
|
50
|
+
var _VARIANTS$variant = _constants.VARIANTS[variant],
|
|
51
|
+
currencyLabelStyle = _VARIANTS$variant.currencyLabelStyle,
|
|
52
|
+
decimalLabelStyle = _VARIANTS$variant.decimalLabelStyle;
|
|
53
|
+
|
|
54
|
+
var _ref2 = amount !== null && amount !== undefined && (0, _numeral.default)(amount).format(amountFormat).split(splitChar) || ['-', '-'],
|
|
55
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
|
56
|
+
integerPart = _ref3[0],
|
|
57
|
+
decimalPart = _ref3[1];
|
|
58
|
+
|
|
43
59
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
60
|
className: _stylesModule.default.container
|
|
45
61
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -19,23 +19,34 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
19
19
|
|
|
20
20
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
+
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
|
|
28
|
+
var withContextApi = function withContextApi(retrieveStyle) {
|
|
29
|
+
return function (Component) {
|
|
30
|
+
return function (props) {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_Context.SmartBillConsumer, null, function (contextApiInfo) {
|
|
32
|
+
var infoWithUnpackedComponents = _objectSpread(_objectSpread({}, contextApiInfo), (0, _context.unpackComponents)(contextApiInfo));
|
|
33
|
+
|
|
34
|
+
var infoWithDefaultColors = _objectSpread(_objectSpread({}, infoWithUnpackedComponents), {}, {
|
|
35
|
+
config: _objectSpread({
|
|
36
|
+
colors: contextApiInfo.colors || _aliases.DEFAULT_COLORS
|
|
37
|
+
}, contextApiInfo.config)
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
delete infoWithUnpackedComponents.components;
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_layout.default, _extends({}, props, {
|
|
42
|
+
Component: Component,
|
|
43
|
+
contextApiInfo: infoWithDefaultColors,
|
|
44
|
+
retrieveStyle: retrieveStyle
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
};
|
|
25
48
|
};
|
|
26
|
-
|
|
27
|
-
config: {
|
|
28
|
-
colors: contextApiInfo.colors || _aliases.DEFAULT_COLORS,
|
|
29
|
-
...contextApiInfo.config
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
delete infoWithUnpackedComponents.components;
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement(_layout.default, _extends({}, props, {
|
|
34
|
-
Component: Component,
|
|
35
|
-
contextApiInfo: infoWithDefaultColors,
|
|
36
|
-
retrieveStyle: retrieveStyle
|
|
37
|
-
}));
|
|
38
|
-
});
|
|
49
|
+
};
|
|
39
50
|
|
|
40
51
|
var _default = withContextApi;
|
|
41
52
|
exports.default = _default;
|
|
@@ -17,10 +17,10 @@ var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
var ThemedComponent = function ThemedComponent(props) {
|
|
21
21
|
var _props$contextApiInfo;
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
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;
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement(StyledComponent, props);
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -13,11 +13,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
13
|
|
|
14
14
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
var withSeason = function withSeason() {
|
|
17
|
+
return function (Component) {
|
|
18
|
+
return function (props) {
|
|
19
|
+
var season = (0, _season.getSeason)(props.monthNumber);
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(Component, _extends({
|
|
21
|
+
season: season
|
|
22
|
+
}, props));
|
|
23
|
+
};
|
|
24
|
+
};
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
var _default = withSeason;
|
|
@@ -11,26 +11,24 @@ var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
var TabletBreakpoint = 1024;
|
|
15
15
|
exports.TabletBreakpoint = TabletBreakpoint;
|
|
16
|
-
|
|
16
|
+
var MobileBreakpoint = 768;
|
|
17
17
|
exports.MobileBreakpoint = MobileBreakpoint;
|
|
18
|
-
|
|
18
|
+
var FullHDBreakpoint = 1920;
|
|
19
19
|
exports.FullHDBreakpoint = FullHDBreakpoint;
|
|
20
|
-
|
|
20
|
+
var HDBreakpoint = 1380;
|
|
21
21
|
exports.HDBreakpoint = HDBreakpoint;
|
|
22
|
-
|
|
22
|
+
var DESKTOP = 'desktop';
|
|
23
23
|
exports.DESKTOP = DESKTOP;
|
|
24
|
-
|
|
24
|
+
var MOBILE = 'mobile';
|
|
25
25
|
exports.MOBILE = MOBILE;
|
|
26
|
-
|
|
26
|
+
var TABLET = 'tablet'; // For conditional rendering
|
|
27
27
|
|
|
28
28
|
exports.TABLET = TABLET;
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
children
|
|
33
|
-
} = _ref;
|
|
30
|
+
var DesktopViewport = function DesktopViewport(_ref) {
|
|
31
|
+
var children = _ref.children;
|
|
34
32
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
35
33
|
minWidth: TabletBreakpoint
|
|
36
34
|
}, children);
|
|
@@ -38,10 +36,8 @@ const DesktopViewport = _ref => {
|
|
|
38
36
|
|
|
39
37
|
exports.DesktopViewport = DesktopViewport;
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
children
|
|
44
|
-
} = _ref2;
|
|
39
|
+
var TabletViewport = function TabletViewport(_ref2) {
|
|
40
|
+
var children = _ref2.children;
|
|
45
41
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
46
42
|
minWidth: MobileBreakpoint,
|
|
47
43
|
maxWidth: TabletBreakpoint - 1
|
|
@@ -50,10 +46,8 @@ const TabletViewport = _ref2 => {
|
|
|
50
46
|
|
|
51
47
|
exports.TabletViewport = TabletViewport;
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
children
|
|
56
|
-
} = _ref3;
|
|
49
|
+
var MobileViewport = function MobileViewport(_ref3) {
|
|
50
|
+
var children = _ref3.children;
|
|
57
51
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
58
52
|
maxWidth: MobileBreakpoint - 1
|
|
59
53
|
}, children);
|
|
@@ -62,10 +56,8 @@ const MobileViewport = _ref3 => {
|
|
|
62
56
|
|
|
63
57
|
exports.MobileViewport = MobileViewport;
|
|
64
58
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
children
|
|
68
|
-
} = _ref4;
|
|
59
|
+
var DefaultViewport = function DefaultViewport(_ref4) {
|
|
60
|
+
var children = _ref4.children;
|
|
69
61
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
70
62
|
minWidth: MobileBreakpoint
|
|
71
63
|
}, children);
|
|
@@ -73,10 +65,8 @@ const DefaultViewport = _ref4 => {
|
|
|
73
65
|
|
|
74
66
|
exports.DefaultViewport = DefaultViewport;
|
|
75
67
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
children
|
|
79
|
-
} = _ref5;
|
|
68
|
+
var TabletMobileViewport = function TabletMobileViewport(_ref5) {
|
|
69
|
+
var children = _ref5.children;
|
|
80
70
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
81
71
|
maxWidth: TabletBreakpoint - 1
|
|
82
72
|
}, children);
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SEASON_PERIODS = exports.SEASONS = void 0;
|
|
7
|
-
|
|
7
|
+
var SEASONS = {
|
|
8
8
|
SPRING: 'spring',
|
|
9
9
|
SUMMER: 'summer',
|
|
10
10
|
AUTUMN: 'autumn',
|
|
11
11
|
WINTER: 'winter'
|
|
12
12
|
};
|
|
13
13
|
exports.SEASONS = SEASONS;
|
|
14
|
-
|
|
14
|
+
var SEASON_PERIODS = [{
|
|
15
15
|
initMonth: 1,
|
|
16
16
|
endingMonth: 2,
|
|
17
17
|
season: SEASONS.SUMMER
|