@widergy/utilitygo-smart-bill-web 1.13.4 → 2.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.
- package/CHANGELOG.md +12 -0
- package/dist/components/Advice/index.js +3 -14
- package/dist/components/Amount/index.js +11 -29
- package/dist/components/Amount/styles.module.scss +1 -2
- package/dist/components/Amount/utils.js +0 -3
- package/dist/components/Banner/index.js +3 -12
- package/dist/components/BarChart/index.js +12 -32
- package/dist/components/BarChart/styles.module.scss +5 -5
- package/dist/components/BarChart/utils.js +1 -6
- package/dist/components/BillCalculation/components/ConceptCard/index.js +31 -36
- package/dist/components/BillCalculation/components/Glossary/index.js +30 -50
- package/dist/components/BillCalculation/components/Glossary/styles.module.scss +0 -6
- package/dist/components/BillCalculation/index.js +13 -46
- package/dist/components/BillCalculation/utils.js +3 -15
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +11 -29
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +2 -15
- package/dist/components/BillSummary/components/BilledConcepts/constants.js +0 -4
- package/dist/components/BillSummary/components/BilledConcepts/index.js +11 -40
- package/dist/components/BillSummary/components/BilledConcepts/styles.module.scss +1 -1
- package/dist/components/BillSummary/components/BilledConcepts/utils.js +13 -38
- package/dist/components/BillSummary/index.js +7 -42
- package/dist/components/BillSummary/styles.module.scss +0 -4
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +0 -8
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +5 -20
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +0 -7
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +18 -39
- package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +2 -16
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +15 -37
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +8 -16
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +0 -7
- package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +12 -25
- package/dist/components/ConsumptionComparison/components/PercentageComparison/styles.module.scss +0 -10
- package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +4 -11
- package/dist/components/ConsumptionComparison/index.js +9 -44
- package/dist/components/ConsumptionComparison/styles.module.scss +0 -5
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +13 -38
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +9 -20
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +14 -26
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/styles.module.scss +0 -6
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +10 -24
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +0 -6
- package/dist/components/ConsumptionEnergyDetails/index.js +14 -41
- package/dist/components/ConsumptionEnergyDetails/styles.module.scss +2 -6
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +39 -55
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/styles.module.scss +2 -8
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +0 -3
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +7 -23
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/styles.module.scss +0 -4
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +4 -15
- package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +16 -33
- package/dist/components/ConsumptionIncluded/index.js +1 -18
- package/dist/components/ConsumptionIncluded/utils.js +2 -30
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +7 -19
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +12 -27
- package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +6 -30
- package/dist/components/ConsumptionPeriod/components/Reading/index.js +15 -33
- package/dist/components/ConsumptionPeriod/components/Reading/styles.module.scss +0 -1
- package/dist/components/ConsumptionPeriod/index.js +1 -20
- package/dist/components/ConsumptionPeriod/utils.js +0 -6
- package/dist/components/Date/index.js +6 -17
- package/dist/components/Date/styles.module.scss +2 -4
- package/dist/components/DebtState/index.js +6 -16
- package/dist/components/DebtState/styles.module.scss +2 -11
- package/dist/components/IconAndDetails/index.js +13 -26
- package/dist/components/Magnitude/index.js +18 -39
- package/dist/components/Magnitude/utils.js +0 -29
- package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +6 -17
- package/dist/components/MainBillData/components/BillAlert/index.js +12 -39
- package/dist/components/MainBillData/components/BillAlert/styles.module.scss +4 -1
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +5 -19
- package/dist/components/MainBillData/components/BillBody/components/ClientData/styles.module.scss +1 -3
- package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +4 -20
- package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +0 -2
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +16 -30
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +0 -5
- package/dist/components/MainBillData/components/BillBody/index.js +3 -35
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +7 -19
- package/dist/components/MainBillData/components/BillHeader/index.js +4 -27
- package/dist/components/MainBillData/index.js +1 -16
- package/dist/components/MainBillData/theme.js +0 -3
- package/dist/components/MainBillData/utils.js +0 -3
- package/dist/components/Period/index.js +18 -44
- package/dist/components/Period/styles.module.scss +9 -9
- package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +21 -28
- package/dist/components/PowerProgresBar/components/PowerConsumption/styles.module.scss +0 -7
- package/dist/components/PowerProgresBar/index.js +8 -29
- package/dist/components/PowerProgresBar/styles.module.scss +5 -9
- package/dist/components/RateAndCategory/index.js +8 -26
- package/dist/components/RateAndCategory/styles.module.scss +1 -4
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +11 -23
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/styles.module.scss +0 -1
- package/dist/components/RatesDefinition/components/BillRate/index.js +8 -20
- package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +5 -17
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/styles.module.scss +2 -4
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +8 -22
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +4 -18
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +0 -7
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +4 -14
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/styles.module.scss +1 -9
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +8 -16
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +0 -4
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +0 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +12 -39
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +14 -24
- package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +11 -38
- package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +0 -3
- package/dist/components/RatesDefinition/components/PurchasedRate/index.js +11 -23
- package/dist/components/RatesDefinition/components/PurchasedRate/styles.module.scss +5 -4
- package/dist/components/RatesDefinition/index.js +4 -25
- package/dist/components/SmartBillProvider/index.js +5 -26
- package/dist/components/StyledAmount/constants.js +0 -3
- package/dist/components/StyledAmount/index.js +18 -38
- package/dist/components/StyledAmount/styles.module.scss +2 -3
- package/dist/components/WithContextApi/index.js +4 -15
- package/dist/components/WithContextApi/layout.js +0 -9
- package/dist/components/WithSeason/index.js +0 -6
- package/dist/constants/deviceSizes.js +4 -16
- package/dist/index.js +0 -18
- package/dist/scss/variables/_colors.scss +0 -6
- package/dist/scss/variables/_colorsExport.scss +0 -6
- package/dist/shared/Context/index.js +1 -5
- package/dist/shared/constants/aliases.js +84 -82
- package/dist/shared/types/assetsTypes.js +0 -3
- package/dist/shared/types/billDataTypes.js +13 -13
- package/dist/shared/types/componentsTypes.js +4 -10
- package/dist/shared/types/formattersTypes.js +0 -2
- package/dist/shared/types/rateStagesTypes.js +0 -2
- package/dist/shared/types/smartBillTypes.js +4 -10
- package/dist/shared/types/textsTypes.js +0 -2
- package/dist/shared/utils/billCalculation.js +0 -6
- package/dist/shared/utils/consumptions.js +1 -32
- package/dist/shared/utils/context.js +0 -6
- package/dist/shared/utils/expirations.js +0 -3
- package/dist/shared/utils/periods.js +0 -15
- package/dist/shared/utils/rates.js +0 -4
- package/dist/shared/utils/readings.js +0 -7
- package/dist/shared/utils/season.js +0 -3
- package/dist/shared/utils/stagesGraph.js +0 -11
- package/dist/utils/hooks.js +0 -2
- package/dist/utils.js +0 -8
- package/package.json +1 -1
|
@@ -4,36 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _smartBillTypes = require("../../../../shared/types/smartBillTypes");
|
|
13
|
-
|
|
14
10
|
var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"));
|
|
15
|
-
|
|
16
11
|
var _aliases = require("../../../../shared/constants/aliases");
|
|
17
|
-
|
|
18
12
|
var _RateAndCategory = _interopRequireDefault(require("../../../RateAndCategory"));
|
|
19
|
-
|
|
20
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
var PurchasedRate = function PurchasedRate(_ref) {
|
|
25
16
|
var contextApiInfo = _ref.contextApiInfo,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
rate = _ref.rate,
|
|
18
|
+
category = _ref.category,
|
|
19
|
+
_ref$classes = _ref.classes,
|
|
20
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
30
21
|
var config = contextApiInfo.config,
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
ExternalLink = contextApiInfo.ExternalLink,
|
|
23
|
+
Label = contextApiInfo.Label;
|
|
33
24
|
var purchasedRateErrorLink = config.externalLinks.purchasedRateErrorLink;
|
|
34
25
|
var _config$texts$ratesDe = config.texts.ratesDefinition,
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
purchasedRateTitle = _config$texts$ratesDe.purchasedRateTitle,
|
|
27
|
+
purchasedRateError = _config$texts$ratesDe.purchasedRateError;
|
|
37
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
29
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
39
30
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -46,14 +37,13 @@ var PurchasedRate = function PurchasedRate(_ref) {
|
|
|
46
37
|
classes: {
|
|
47
38
|
container: _stylesModule.default.rateAndCategoryContainer
|
|
48
39
|
}
|
|
49
|
-
}), purchasedRateErrorLink && /*#__PURE__*/_react.default.createElement(
|
|
50
|
-
url: purchasedRateErrorLink
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
40
|
+
}), purchasedRateErrorLink && /*#__PURE__*/_react.default.createElement(Label, {
|
|
52
41
|
alias: _aliases.REGULAR_LINK,
|
|
53
42
|
className: _stylesModule.default.link
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(ExternalLink, {
|
|
44
|
+
url: purchasedRateErrorLink
|
|
54
45
|
}, purchasedRateError))));
|
|
55
46
|
};
|
|
56
|
-
|
|
57
47
|
PurchasedRate.propTypes = {
|
|
58
48
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
59
49
|
rate: _propTypes.string,
|
|
@@ -62,7 +52,5 @@ PurchasedRate.propTypes = {
|
|
|
62
52
|
container: _propTypes.string
|
|
63
53
|
})
|
|
64
54
|
};
|
|
65
|
-
|
|
66
55
|
var _default = (0, _WithContextApi.default)()(PurchasedRate);
|
|
67
|
-
|
|
68
56
|
exports.default = _default;
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
min-width: 50%;
|
|
13
13
|
padding: 16px;
|
|
14
14
|
|
|
15
|
-
>
|
|
15
|
+
> :first-child {
|
|
16
16
|
margin-bottom: 16px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@media #{$tablet-mobile} {
|
|
20
20
|
border-bottom: 1px solid $borders-gray;
|
|
21
|
-
border-right:
|
|
21
|
+
border-right: 0;
|
|
22
22
|
margin-bottom: 10px;
|
|
23
23
|
min-width: auto;
|
|
24
24
|
}
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.link {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
a {
|
|
42
|
+
text-decoration: underline;
|
|
43
|
+
}
|
|
43
44
|
}
|
|
@@ -4,44 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _seamlessImmutable = require("seamless-immutable");
|
|
11
|
-
|
|
12
9
|
var _consumptions = require("../../shared/utils/consumptions");
|
|
13
|
-
|
|
14
10
|
var _periods = require("../../shared/utils/periods");
|
|
15
|
-
|
|
16
11
|
var _rates = require("../../shared/utils/rates");
|
|
17
|
-
|
|
18
12
|
var _consumptions2 = require("../../shared/constants/consumptions");
|
|
19
|
-
|
|
20
13
|
var _rates2 = require("../../shared/constants/rates");
|
|
21
|
-
|
|
22
14
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
23
|
-
|
|
24
15
|
var _billDataTypes = require("../../shared/types/billDataTypes");
|
|
25
|
-
|
|
26
16
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
27
|
-
|
|
28
17
|
var _Advice = _interopRequireDefault(require("../Advice"));
|
|
29
|
-
|
|
30
18
|
var _aliases = require("../../shared/constants/aliases");
|
|
31
|
-
|
|
32
19
|
var _CategoryByConsumption = _interopRequireDefault(require("./components/CategoryByConsumption"));
|
|
33
|
-
|
|
34
20
|
var _PurchasedRate = _interopRequireDefault(require("./components/PurchasedRate"));
|
|
35
|
-
|
|
36
21
|
var _BillRate = _interopRequireDefault(require("./components/BillRate"));
|
|
37
|
-
|
|
38
22
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
39
|
-
|
|
40
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
|
-
|
|
42
24
|
var RatesDefinition = function RatesDefinition(_ref) {
|
|
43
25
|
var contextApiInfo = _ref.contextApiInfo,
|
|
44
|
-
|
|
26
|
+
billData = _ref.billData;
|
|
45
27
|
var rate = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'purchased']);
|
|
46
28
|
var category = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'category']);
|
|
47
29
|
var description = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'description']);
|
|
@@ -51,9 +33,9 @@ var RatesDefinition = function RatesDefinition(_ref) {
|
|
|
51
33
|
var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
52
34
|
var currentConsumption = (0, _consumptions.getCurrentConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
|
|
53
35
|
var _contextApiInfo$confi = contextApiInfo.config.texts.ratesDefinition,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
36
|
+
adviceTitle = _contextApiInfo$confi.adviceTitle,
|
|
37
|
+
adviceText = _contextApiInfo$confi.adviceText,
|
|
38
|
+
rateDataTitle = _contextApiInfo$confi.rateDataTitle;
|
|
57
39
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
40
|
className: _stylesModule.default.container
|
|
59
41
|
}, /*#__PURE__*/_react.default.createElement(_CategoryByConsumption.default, {
|
|
@@ -85,12 +67,9 @@ var RatesDefinition = function RatesDefinition(_ref) {
|
|
|
85
67
|
contentText: adviceText
|
|
86
68
|
})));
|
|
87
69
|
};
|
|
88
|
-
|
|
89
70
|
RatesDefinition.propTypes = {
|
|
90
71
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
91
72
|
billData: _billDataTypes.billDataTypes
|
|
92
73
|
};
|
|
93
|
-
|
|
94
74
|
var _default = (0, _WithContextApi.default)()(RatesDefinition);
|
|
95
|
-
|
|
96
75
|
exports.default = _default;
|
|
@@ -1,68 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _Context = require("../../shared/Context");
|
|
13
|
-
|
|
14
10
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
15
|
-
|
|
16
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); }
|
|
17
|
-
|
|
18
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; }
|
|
19
|
-
|
|
20
13
|
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
|
-
|
|
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); } }
|
|
24
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; }
|
|
25
|
-
|
|
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); }
|
|
26
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); }
|
|
27
|
-
|
|
28
19
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
-
|
|
30
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); }; }
|
|
31
|
-
|
|
32
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); }
|
|
33
|
-
|
|
34
22
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
-
|
|
36
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; } }
|
|
37
|
-
|
|
38
24
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
-
|
|
40
25
|
var SmartBillProvider = /*#__PURE__*/function (_PureComponent) {
|
|
41
26
|
_inherits(SmartBillProvider, _PureComponent);
|
|
42
|
-
|
|
43
27
|
var _super = _createSuper(SmartBillProvider);
|
|
44
|
-
|
|
45
28
|
function SmartBillProvider() {
|
|
46
29
|
_classCallCheck(this, SmartBillProvider);
|
|
47
|
-
|
|
48
30
|
return _super.apply(this, arguments);
|
|
49
31
|
}
|
|
50
|
-
|
|
51
32
|
_createClass(SmartBillProvider, [{
|
|
52
33
|
key: "render",
|
|
53
34
|
value: function render() {
|
|
54
35
|
var _this$props = this.props,
|
|
55
|
-
|
|
56
|
-
|
|
36
|
+
children = _this$props.children,
|
|
37
|
+
contextApiInfo = _this$props.contextApiInfo;
|
|
57
38
|
return /*#__PURE__*/_react.default.createElement(_Context.SmartBillProvider, {
|
|
58
39
|
value: contextApiInfo
|
|
59
40
|
}, children);
|
|
60
41
|
}
|
|
61
42
|
}]);
|
|
62
|
-
|
|
63
43
|
return SmartBillProvider;
|
|
64
44
|
}(_react.PureComponent);
|
|
65
|
-
|
|
66
45
|
SmartBillProvider.propTypes = {
|
|
67
46
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes
|
|
68
47
|
};
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.VARIANTS = void 0;
|
|
7
|
-
|
|
8
7
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var VARIANTS = {
|
|
13
10
|
small: {
|
|
14
11
|
currencyLabelStyle: _stylesModule.default.smallCurrency,
|
|
@@ -4,58 +4,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _numeral = _interopRequireDefault(require("config/numeral"));
|
|
13
|
-
|
|
14
10
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
15
|
-
|
|
16
11
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
17
|
-
|
|
18
12
|
var _constants = require("./constants");
|
|
19
|
-
|
|
20
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
-
|
|
26
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."); }
|
|
27
|
-
|
|
28
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); }
|
|
29
|
-
|
|
30
|
-
function
|
|
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
|
-
|
|
18
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
19
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
34
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
-
|
|
36
21
|
var StyledAmount = function StyledAmount(_ref) {
|
|
37
22
|
var contextApiInfo = _ref.contextApiInfo,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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;
|
|
49
34
|
var Label = contextApiInfo.Label;
|
|
50
35
|
var _VARIANTS$variant = _constants.VARIANTS[variant],
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
36
|
+
currencyLabelStyle = _VARIANTS$variant.currencyLabelStyle,
|
|
37
|
+
decimalLabelStyle = _VARIANTS$variant.decimalLabelStyle;
|
|
54
38
|
var _ref2 = amount !== null && amount !== undefined && (0, _numeral.default)(amount).format(amountFormat).split(splitChar) || ['-', '-'],
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
|
40
|
+
integerPart = _ref3[0],
|
|
41
|
+
decimalPart = _ref3[1];
|
|
59
42
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
60
43
|
className: _stylesModule.default.container
|
|
61
44
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -68,7 +51,6 @@ var StyledAmount = function StyledAmount(_ref) {
|
|
|
68
51
|
className: decimalLabelStyle
|
|
69
52
|
}, decimalPart));
|
|
70
53
|
};
|
|
71
|
-
|
|
72
54
|
StyledAmount.propTypes = {
|
|
73
55
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
74
56
|
currency: _propTypes.string,
|
|
@@ -79,7 +61,5 @@ StyledAmount.propTypes = {
|
|
|
79
61
|
aliasDecimal: _propTypes.string,
|
|
80
62
|
variant: _propTypes.string
|
|
81
63
|
};
|
|
82
|
-
|
|
83
64
|
var _default = (0, _WithContextApi.default)()(StyledAmount);
|
|
84
|
-
|
|
85
65
|
exports.default = _default;
|
|
@@ -19,8 +19,8 @@ $title-gap: 4px;
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.mediumDecimalPart {
|
|
22
|
-
margin-top: -4px;
|
|
23
22
|
margin-left: 4px;
|
|
23
|
+
margin-top: -4px;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.largeCurrency {
|
|
@@ -28,8 +28,8 @@ $title-gap: 4px;
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.largeDecimalPart {
|
|
31
|
-
margin-top: -4px;
|
|
32
31
|
margin-left: 4px;
|
|
32
|
+
margin-top: -4px;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.titleCurrency {
|
|
@@ -37,6 +37,5 @@ $title-gap: 4px;
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.titleDecimalPart {
|
|
40
|
-
margin-top: 5px;
|
|
41
40
|
margin-left: $title-gap;
|
|
42
41
|
}
|
|
@@ -4,39 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _aliases = require("../../shared/constants/aliases");
|
|
11
|
-
|
|
12
9
|
var _Context = require("../../shared/Context");
|
|
13
|
-
|
|
14
10
|
var _context = require("../../shared/utils/context");
|
|
15
|
-
|
|
16
11
|
var _layout = _interopRequireDefault(require("./layout"));
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
13
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
20
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
|
|
22
15
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
-
|
|
24
16
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
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); }
|
|
28
20
|
var withContextApi = function withContextApi(retrieveStyle) {
|
|
29
21
|
return function (Component) {
|
|
30
22
|
return function (props) {
|
|
31
23
|
return /*#__PURE__*/_react.default.createElement(_Context.SmartBillConsumer, null, function (contextApiInfo) {
|
|
32
24
|
var infoWithUnpackedComponents = _objectSpread(_objectSpread({}, contextApiInfo), (0, _context.unpackComponents)(contextApiInfo));
|
|
33
|
-
|
|
34
25
|
var infoWithDefaultColors = _objectSpread(_objectSpread({}, infoWithUnpackedComponents), {}, {
|
|
35
26
|
config: _objectSpread({
|
|
36
27
|
colors: contextApiInfo.colors || _aliases.DEFAULT_COLORS
|
|
37
28
|
}, contextApiInfo.config)
|
|
38
29
|
});
|
|
39
|
-
|
|
40
30
|
delete infoWithUnpackedComponents.components;
|
|
41
31
|
return /*#__PURE__*/_react.default.createElement(_layout.default, _extends({}, props, {
|
|
42
32
|
Component: Component,
|
|
@@ -47,6 +37,5 @@ var withContextApi = function withContextApi(retrieveStyle) {
|
|
|
47
37
|
};
|
|
48
38
|
};
|
|
49
39
|
};
|
|
50
|
-
|
|
51
40
|
var _default = withContextApi;
|
|
52
41
|
exports.default = _default;
|
|
@@ -4,26 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _reactJss = _interopRequireDefault(require("react-jss"));
|
|
13
|
-
|
|
14
10
|
var _componentsTypes = require("../../shared/types/componentsTypes");
|
|
15
|
-
|
|
16
11
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
13
|
var ThemedComponent = function ThemedComponent(props) {
|
|
21
14
|
var _props$contextApiInfo;
|
|
22
|
-
|
|
23
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;
|
|
24
16
|
return /*#__PURE__*/_react.default.createElement(StyledComponent, props);
|
|
25
17
|
};
|
|
26
|
-
|
|
27
18
|
ThemedComponent.propTypes = {
|
|
28
19
|
Component: _componentsTypes.componentTypes,
|
|
29
20
|
retrieveStyle: _propTypes.func,
|
|
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _season = require("../../shared/utils/season");
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
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); }
|
|
15
|
-
|
|
16
11
|
var withSeason = function withSeason() {
|
|
17
12
|
return function (Component) {
|
|
18
13
|
return function (props) {
|
|
@@ -23,6 +18,5 @@ var withSeason = function withSeason() {
|
|
|
23
18
|
};
|
|
24
19
|
};
|
|
25
20
|
};
|
|
26
|
-
|
|
27
21
|
var _default = withSeason;
|
|
28
22
|
exports.default = _default;
|
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TabletViewport = exports.TabletMobileViewport = exports.TabletBreakpoint = exports.TABLET = exports.MobileViewport = exports.MobileBreakpoint = exports.MOBILE = exports.HDBreakpoint = exports.FullHDBreakpoint = exports.DesktopViewport = exports.DefaultViewport = exports.DESKTOP = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var TabletBreakpoint = 1024;
|
|
15
11
|
exports.TabletBreakpoint = TabletBreakpoint;
|
|
16
12
|
var MobileBreakpoint = 768;
|
|
@@ -23,19 +19,17 @@ var DESKTOP = 'desktop';
|
|
|
23
19
|
exports.DESKTOP = DESKTOP;
|
|
24
20
|
var MOBILE = 'mobile';
|
|
25
21
|
exports.MOBILE = MOBILE;
|
|
26
|
-
var TABLET = 'tablet';
|
|
22
|
+
var TABLET = 'tablet';
|
|
27
23
|
|
|
24
|
+
// For conditional rendering
|
|
28
25
|
exports.TABLET = TABLET;
|
|
29
|
-
|
|
30
26
|
var DesktopViewport = function DesktopViewport(_ref) {
|
|
31
27
|
var children = _ref.children;
|
|
32
28
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
33
29
|
minWidth: TabletBreakpoint
|
|
34
30
|
}, children);
|
|
35
31
|
};
|
|
36
|
-
|
|
37
32
|
exports.DesktopViewport = DesktopViewport;
|
|
38
|
-
|
|
39
33
|
var TabletViewport = function TabletViewport(_ref2) {
|
|
40
34
|
var children = _ref2.children;
|
|
41
35
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
@@ -43,33 +37,27 @@ var TabletViewport = function TabletViewport(_ref2) {
|
|
|
43
37
|
maxWidth: TabletBreakpoint - 1
|
|
44
38
|
}, children);
|
|
45
39
|
};
|
|
46
|
-
|
|
47
40
|
exports.TabletViewport = TabletViewport;
|
|
48
|
-
|
|
49
41
|
var MobileViewport = function MobileViewport(_ref3) {
|
|
50
42
|
var children = _ref3.children;
|
|
51
43
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
52
44
|
maxWidth: MobileBreakpoint - 1
|
|
53
45
|
}, children);
|
|
54
|
-
};
|
|
55
|
-
|
|
46
|
+
};
|
|
56
47
|
|
|
48
|
+
// Group tablet & desktop viewport
|
|
57
49
|
exports.MobileViewport = MobileViewport;
|
|
58
|
-
|
|
59
50
|
var DefaultViewport = function DefaultViewport(_ref4) {
|
|
60
51
|
var children = _ref4.children;
|
|
61
52
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
62
53
|
minWidth: MobileBreakpoint
|
|
63
54
|
}, children);
|
|
64
55
|
};
|
|
65
|
-
|
|
66
56
|
exports.DefaultViewport = DefaultViewport;
|
|
67
|
-
|
|
68
57
|
var TabletMobileViewport = function TabletMobileViewport(_ref5) {
|
|
69
58
|
var children = _ref5.children;
|
|
70
59
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
71
60
|
maxWidth: TabletBreakpoint - 1
|
|
72
61
|
}, children);
|
|
73
62
|
};
|
|
74
|
-
|
|
75
63
|
exports.TabletMobileViewport = TabletMobileViewport;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -79,37 +78,20 @@ Object.defineProperty(exports, "rateStagesTypes", {
|
|
|
79
78
|
return _rateStagesTypes.rateStagesTypes;
|
|
80
79
|
}
|
|
81
80
|
});
|
|
82
|
-
|
|
83
81
|
var _SmartBillProvider = _interopRequireDefault(require("./components/SmartBillProvider"));
|
|
84
|
-
|
|
85
82
|
var _MainBillData = _interopRequireDefault(require("./components/MainBillData"));
|
|
86
|
-
|
|
87
83
|
var _ConsumptionPeriod = _interopRequireDefault(require("./components/ConsumptionPeriod"));
|
|
88
|
-
|
|
89
84
|
var _BillCalculation = _interopRequireDefault(require("./components/BillCalculation"));
|
|
90
|
-
|
|
91
85
|
var _ConsumptionComparison = _interopRequireDefault(require("./components/ConsumptionComparison"));
|
|
92
|
-
|
|
93
86
|
var _ConsumptionIncluded = _interopRequireDefault(require("./components/ConsumptionIncluded"));
|
|
94
|
-
|
|
95
87
|
var _RatesDefinition = _interopRequireDefault(require("./components/RatesDefinition"));
|
|
96
|
-
|
|
97
88
|
var _BillSummary = _interopRequireDefault(require("./components/BillSummary"));
|
|
98
|
-
|
|
99
89
|
var ComponentNames = _interopRequireWildcard(require("./shared/constants/components"));
|
|
100
|
-
|
|
101
90
|
exports.ComponentNames = ComponentNames;
|
|
102
|
-
|
|
103
91
|
var Aliases = _interopRequireWildcard(require("./shared/constants/aliases"));
|
|
104
|
-
|
|
105
92
|
exports.Aliases = Aliases;
|
|
106
|
-
|
|
107
93
|
var _billDataTypes = require("./shared/types/billDataTypes");
|
|
108
|
-
|
|
109
94
|
var _rateStagesTypes = require("./shared/types/rateStagesTypes");
|
|
110
|
-
|
|
111
95
|
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); }
|
|
112
|
-
|
|
113
96
|
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; }
|
|
114
|
-
|
|
115
97
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -12,17 +12,11 @@ $light-primary-hover: #407CCD;
|
|
|
12
12
|
$backgrounds-primary: rgba(56, 122, 201, 0.1);
|
|
13
13
|
$backgrounds-gray: #ECECEC;
|
|
14
14
|
$background-soft-gray: #F7F7F9;
|
|
15
|
-
$with-debts: #FF8B00;
|
|
16
|
-
$with-debts-background: #FFF3E5;
|
|
17
|
-
$adhered-to-automatic-debt: #00C48C;
|
|
18
|
-
$adhered-to-automatic-debt-background: #E5F9F3;
|
|
19
15
|
$bill-calculation-title-and-alert-background: #EBF1F9;
|
|
20
16
|
$current-settlement-card-background: #D3E0F0;
|
|
21
17
|
$adhered-to-digital-bill: #00C48C;
|
|
22
18
|
$title-and-subtitle-included-consumption-card: #3A3A3A;
|
|
23
19
|
$footer-current-included-consumption: #E6ECF4;
|
|
24
|
-
$exceeded-power: #FF3C59;
|
|
25
|
-
$exceeded-power-fine-background: #FFEBEE;
|
|
26
20
|
$pie-chart-gray: #A8A8A8;
|
|
27
21
|
$pie-chart-light-gray: #D3D3D3;
|
|
28
22
|
|
|
@@ -18,14 +18,8 @@
|
|
|
18
18
|
bordersGray: $borders-gray;
|
|
19
19
|
bordersDarkGray: $borders-dark-gray;
|
|
20
20
|
bordersPrimary: $borders-primary;
|
|
21
|
-
withDebts: $with-debts;
|
|
22
|
-
withDebtsBackground: $with-debts-background;
|
|
23
|
-
adheredToAutomaticDebt: $adhered-to-automatic-debt;
|
|
24
|
-
adheredToAutomaticDebtBackground: $adhered-to-automatic-debt-background;
|
|
25
21
|
titleAndSubtitleIncluded: $title-and-subtitle-included-consumption-card;
|
|
26
22
|
footerCurrentIncludedConsumption: $footer-current-included-consumption;
|
|
27
|
-
exceededPower: $exceeded-power;
|
|
28
|
-
exceededPowerFineBackground: $exceeded-power-fine-background;
|
|
29
23
|
pieChartGray: $pie-chart-gray;
|
|
30
24
|
pieChartLightGray: $pie-chart-light-gray;
|
|
31
25
|
|
|
@@ -4,14 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SmartBillProvider = exports.SmartBillConsumer = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var ContextApi = /*#__PURE__*/_react.default.createContext({});
|
|
13
|
-
|
|
14
10
|
var SmartBillProvider = ContextApi.Provider,
|
|
15
|
-
|
|
11
|
+
SmartBillConsumer = ContextApi.Consumer;
|
|
16
12
|
exports.SmartBillConsumer = SmartBillConsumer;
|
|
17
13
|
exports.SmartBillProvider = SmartBillProvider;
|