@widergy/utilitygo-smart-bill-web 1.13.3 → 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 +19 -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 +13 -33
- 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 +3 -16
- 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 +17 -34
- 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 +2 -21
- 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 +5 -28
- 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 +7 -28
- 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 +5 -16
- package/dist/components/WithContextApi/layout.js +0 -9
- package/dist/components/WithSeason/index.js +1 -7
- 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 +86 -83
- 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,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getConsumptionSummaryProps = void 0;
|
|
7
|
-
|
|
8
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
9
|
-
|
|
10
8
|
var _consumptions = require("../../shared/utils/consumptions");
|
|
11
|
-
|
|
12
9
|
var _readings = require("../../shared/utils/readings");
|
|
13
|
-
|
|
14
10
|
var _consumptions2 = require("../../shared/constants/consumptions");
|
|
15
|
-
|
|
16
11
|
var getConsumptionSummaryProps = function getConsumptionSummaryProps(currentPeriod, initialReading, finalReading) {
|
|
17
12
|
return {
|
|
18
13
|
periodNumber: currentPeriod.number,
|
|
@@ -28,5 +23,4 @@ var getConsumptionSummaryProps = function getConsumptionSummaryProps(currentPeri
|
|
|
28
23
|
totalConsumptionUnit: (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE).unit
|
|
29
24
|
};
|
|
30
25
|
};
|
|
31
|
-
|
|
32
26
|
exports.getConsumptionSummaryProps = getConsumptionSummaryProps;
|
|
@@ -4,29 +4,21 @@ 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 _dayjs = _interopRequireDefault(require("dayjs"));
|
|
13
|
-
|
|
14
10
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
15
|
-
|
|
16
11
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
17
|
-
|
|
18
12
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
var Date = function Date(_ref) {
|
|
23
15
|
var contextApiInfo = _ref.contextApiInfo,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
date = _ref.date,
|
|
17
|
+
text = _ref.text,
|
|
18
|
+
_ref$classes = _ref.classes,
|
|
19
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
20
|
+
mainAlias = _ref.mainAlias,
|
|
21
|
+
detailAlias = _ref.detailAlias;
|
|
30
22
|
var Label = contextApiInfo.Label;
|
|
31
23
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
24
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
@@ -37,7 +29,6 @@ var Date = function Date(_ref) {
|
|
|
37
29
|
alias: detailAlias
|
|
38
30
|
}, text));
|
|
39
31
|
};
|
|
40
|
-
|
|
41
32
|
Date.propTypes = {
|
|
42
33
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
43
34
|
date: _propTypes.string,
|
|
@@ -49,7 +40,5 @@ Date.propTypes = {
|
|
|
49
40
|
value: _propTypes.string
|
|
50
41
|
})
|
|
51
42
|
};
|
|
52
|
-
|
|
53
43
|
var _default = (0, _WithContextApi.default)()(Date);
|
|
54
|
-
|
|
55
44
|
exports.default = _default;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
@import '../../scss/variables/_mediaQueries';
|
|
2
|
-
|
|
3
1
|
.container {
|
|
4
2
|
display: flex;
|
|
5
3
|
flex-flow: column;
|
|
6
4
|
}
|
|
7
5
|
|
|
8
6
|
.valueContainer {
|
|
9
|
-
display: flex;
|
|
10
7
|
align-items: center;
|
|
11
|
-
|
|
8
|
+
display: flex;
|
|
12
9
|
height: 25px;
|
|
10
|
+
margin-bottom: 3px;
|
|
13
11
|
}
|
|
@@ -4,43 +4,33 @@ 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 _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
var DebtState = function DebtState(_ref) {
|
|
23
15
|
var contextApiInfo = _ref.contextApiInfo,
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
debtStatusLabel = _ref.debtStatusLabel,
|
|
17
|
+
isWarning = _ref.isWarning;
|
|
26
18
|
var assets = contextApiInfo.assets,
|
|
27
|
-
|
|
19
|
+
Label = contextApiInfo.Label;
|
|
28
20
|
var PendingDebtIcon = assets.PendingDebtIcon,
|
|
29
|
-
|
|
21
|
+
AdheredToServiceIcon = assets.AdheredToServiceIcon;
|
|
30
22
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
23
|
className: "".concat(_stylesModule.default.container, " ").concat(isWarning ? _stylesModule.default.withDebtsContainer : _stylesModule.default.adheredToAutomaticDebt, " ")
|
|
32
24
|
}, isWarning ? /*#__PURE__*/_react.default.createElement(PendingDebtIcon, null) : /*#__PURE__*/_react.default.createElement(AdheredToServiceIcon, null), /*#__PURE__*/_react.default.createElement(Label, {
|
|
33
25
|
alias: _aliases.CATEGORY,
|
|
34
|
-
className:
|
|
26
|
+
className: _stylesModule.default.label,
|
|
27
|
+
colorTheme: isWarning ? 'warning' : 'success'
|
|
35
28
|
}, debtStatusLabel));
|
|
36
29
|
};
|
|
37
|
-
|
|
38
30
|
DebtState.propTypes = {
|
|
39
31
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
40
32
|
isWarning: _propTypes.bool,
|
|
41
33
|
debtStatusLabel: _propTypes.string
|
|
42
34
|
};
|
|
43
|
-
|
|
44
35
|
var _default = (0, _WithContextApi.default)()(DebtState);
|
|
45
|
-
|
|
46
36
|
exports.default = _default;
|
|
@@ -10,22 +10,13 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.withDebtsContainer {
|
|
13
|
-
background:
|
|
13
|
+
background: var(--semanticWarning01);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.adheredToAutomaticDebt {
|
|
17
|
-
background:
|
|
17
|
+
background: var(--semanticSuccess01);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.label {
|
|
21
21
|
margin-left: 5px;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
.withDebtsLabel {
|
|
25
|
-
color: $with-debts;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.adheredAutomaticDebtsLabel {
|
|
29
|
-
color: $adhered-to-automatic-debt;
|
|
30
|
-
font-size: 12px;
|
|
31
|
-
}
|
|
@@ -4,41 +4,31 @@ 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 _string = require("@widergy/web-utils/lib/string");
|
|
13
|
-
|
|
14
10
|
var _componentsTypes = require("../../shared/types/componentsTypes");
|
|
15
|
-
|
|
16
11
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
17
|
-
|
|
18
12
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
19
|
-
|
|
20
13
|
var _utils = require("../../utils");
|
|
21
|
-
|
|
22
14
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
16
|
var IconAndDetails = function IconAndDetails(_ref) {
|
|
27
17
|
var children = _ref.children,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
contextApiInfo = _ref.contextApiInfo,
|
|
19
|
+
Icon = _ref.Icon,
|
|
20
|
+
mainText = _ref.mainText,
|
|
21
|
+
secondaryText = _ref.secondaryText,
|
|
22
|
+
descriptionText = _ref.descriptionText,
|
|
23
|
+
tooltip = _ref.tooltip,
|
|
24
|
+
mainAlias = _ref.mainAlias,
|
|
25
|
+
secondaryAlias = _ref.secondaryAlias,
|
|
26
|
+
_ref$tertiaryAlias = _ref.tertiaryAlias,
|
|
27
|
+
tertiaryAlias = _ref$tertiaryAlias === void 0 ? secondaryAlias : _ref$tertiaryAlias,
|
|
28
|
+
_ref$classes = _ref.classes,
|
|
29
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
40
30
|
var Label = contextApiInfo.Label,
|
|
41
|
-
|
|
31
|
+
Tooltip = contextApiInfo.Tooltip;
|
|
42
32
|
var repeatedData = mainText && secondaryText && (0, _string.stringCompare)(mainText, secondaryText);
|
|
43
33
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
34
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
@@ -58,7 +48,6 @@ var IconAndDetails = function IconAndDetails(_ref) {
|
|
|
58
48
|
alias: secondaryAlias
|
|
59
49
|
}, descriptionText)));
|
|
60
50
|
};
|
|
61
|
-
|
|
62
51
|
IconAndDetails.propTypes = {
|
|
63
52
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
64
53
|
Icon: _componentsTypes.componentTypes,
|
|
@@ -73,7 +62,5 @@ IconAndDetails.propTypes = {
|
|
|
73
62
|
container: _propTypes.string
|
|
74
63
|
})
|
|
75
64
|
};
|
|
76
|
-
|
|
77
65
|
var _default = (0, _WithContextApi.default)()(IconAndDetails);
|
|
78
|
-
|
|
79
66
|
exports.default = _default;
|
|
@@ -4,37 +4,25 @@ 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 _componentsTypes = require("../../shared/types/componentsTypes");
|
|
15
|
-
|
|
16
11
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
17
|
-
|
|
18
12
|
var _utils = require("../../utils");
|
|
19
|
-
|
|
20
13
|
var _utils2 = require("./utils");
|
|
21
|
-
|
|
22
14
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
16
|
var Magnitude = function Magnitude(props) {
|
|
29
17
|
var contextApiInfo = props.contextApiInfo,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
numberAlias = props.numberAlias,
|
|
19
|
+
unitAlias = props.unitAlias,
|
|
20
|
+
value = props.value,
|
|
21
|
+
unit = props.unit,
|
|
22
|
+
disableUnit = props.disableUnit,
|
|
23
|
+
Icon = props.Icon,
|
|
24
|
+
_props$classes = props.classes,
|
|
25
|
+
classes = _props$classes === void 0 ? {} : _props$classes;
|
|
38
26
|
var Label = contextApiInfo.Label;
|
|
39
27
|
var variantProps = (0, _utils2.getVariantProps)(props);
|
|
40
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -43,35 +31,26 @@ var Magnitude = function Magnitude(props) {
|
|
|
43
31
|
className: "".concat(_stylesModule.default.icon, " ").concat(classes.icon)
|
|
44
32
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
45
33
|
className: "".concat(_stylesModule.default.numberAndUnit, " ").concat(classes.numberAndUnit)
|
|
46
|
-
}, /*#__PURE__*/_react.default.createElement(Label,
|
|
47
|
-
alias: numberAlias
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}), (0, _utils.numberOrDash)(value)), !disableUnit && /*#__PURE__*/_react.default.createElement(Label, {
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
35
|
+
alias: numberAlias,
|
|
36
|
+
className: variantProps.unitLabelStyles
|
|
37
|
+
}, (0, _utils.numberOrDash)(value)), !disableUnit && /*#__PURE__*/_react.default.createElement(Label, {
|
|
51
38
|
alias: unitAlias,
|
|
52
39
|
className: classes.unitLabel
|
|
53
40
|
}, (0, _utils.stringOrDash)(unit))));
|
|
54
41
|
};
|
|
55
|
-
|
|
56
42
|
Magnitude.propTypes = {
|
|
43
|
+
classes: (0, _propTypes.shape)({
|
|
44
|
+
container: _propTypes.string,
|
|
45
|
+
icon: _propTypes.string
|
|
46
|
+
}),
|
|
57
47
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
58
|
-
primary: _propTypes.bool,
|
|
59
|
-
white: _propTypes.bool,
|
|
60
|
-
gray: _propTypes.bool,
|
|
61
|
-
bold: _propTypes.bool,
|
|
62
|
-
semibold: _propTypes.bool,
|
|
63
|
-
value: (0, _propTypes.oneOfType)([_propTypes.number, _propTypes.string]),
|
|
64
|
-
unit: _propTypes.string,
|
|
65
48
|
disableUnit: _propTypes.bool,
|
|
66
49
|
Icon: _componentsTypes.componentTypes,
|
|
67
50
|
numberAlias: _propTypes.string,
|
|
51
|
+
unit: _propTypes.string,
|
|
68
52
|
unitAlias: _propTypes.string,
|
|
69
|
-
|
|
70
|
-
container: _propTypes.string,
|
|
71
|
-
icon: _propTypes.string
|
|
72
|
-
})
|
|
53
|
+
value: (0, _propTypes.oneOfType)([_propTypes.number, _propTypes.string])
|
|
73
54
|
};
|
|
74
|
-
|
|
75
55
|
var _default = (0, _WithContextApi.default)()(Magnitude);
|
|
76
|
-
|
|
77
56
|
exports.default = _default;
|
|
@@ -4,49 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getVariantProps = 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
|
id: 'small',
|
|
14
|
-
valueLabel: {
|
|
15
|
-
small: true
|
|
16
|
-
},
|
|
17
|
-
unitLabel: {
|
|
18
|
-
xxxsmall: true
|
|
19
|
-
},
|
|
20
11
|
unitLabelStyles: _stylesModule.default.unitSmall
|
|
21
12
|
}, {
|
|
22
13
|
id: 'medium',
|
|
23
|
-
valueLabel: {
|
|
24
|
-
medium: true
|
|
25
|
-
},
|
|
26
|
-
unitLabel: {
|
|
27
|
-
xxsmall: true
|
|
28
|
-
},
|
|
29
14
|
unitLabelStyles: _stylesModule.default.unitMedium
|
|
30
15
|
}, {
|
|
31
16
|
id: 'xxlarge',
|
|
32
|
-
valueLabel: {
|
|
33
|
-
xxlarge: true
|
|
34
|
-
},
|
|
35
|
-
unitLabel: {
|
|
36
|
-
xsmall: true
|
|
37
|
-
},
|
|
38
17
|
unitLabelStyles: _stylesModule.default.unitxxLarge
|
|
39
18
|
}, {
|
|
40
19
|
id: 'xxxlarge',
|
|
41
|
-
valueLabel: {
|
|
42
|
-
xxxlarge: true
|
|
43
|
-
},
|
|
44
|
-
unitLabel: {
|
|
45
|
-
small: true
|
|
46
|
-
},
|
|
47
20
|
unitLabelStyles: _stylesModule.default.unitxxxLarge
|
|
48
21
|
}];
|
|
49
|
-
|
|
50
22
|
var getVariantProps = function getVariantProps(props) {
|
|
51
23
|
return variants.find(function (variant) {
|
|
52
24
|
return props[variant.id];
|
|
@@ -54,5 +26,4 @@ var getVariantProps = function getVariantProps(props) {
|
|
|
54
26
|
return variant.id === 'medium';
|
|
55
27
|
});
|
|
56
28
|
};
|
|
57
|
-
|
|
58
29
|
exports.getVariantProps = getVariantProps;
|
|
@@ -4,29 +4,21 @@ 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 _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
var BillParticularConditions = function BillParticularConditions(_ref) {
|
|
23
15
|
var contextApiInfo = _ref.contextApiInfo,
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
particularConditions = _ref.particularConditions,
|
|
17
|
+
onAcceptPress = _ref.onAcceptPress;
|
|
26
18
|
var assets = contextApiInfo.assets,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
config = contextApiInfo.config,
|
|
20
|
+
Button = contextApiInfo.Button,
|
|
21
|
+
Label = contextApiInfo.Label;
|
|
30
22
|
var texts = config.texts;
|
|
31
23
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
24
|
className: _stylesModule.default.container
|
|
@@ -47,16 +39,13 @@ var BillParticularConditions = function BillParticularConditions(_ref) {
|
|
|
47
39
|
className: _stylesModule.default.item
|
|
48
40
|
}, "* ".concat(particularCondition));
|
|
49
41
|
})), /*#__PURE__*/_react.default.createElement(Button, {
|
|
50
|
-
|
|
42
|
+
onClick: onAcceptPress
|
|
51
43
|
}, texts.commons.accept));
|
|
52
44
|
};
|
|
53
|
-
|
|
54
45
|
BillParticularConditions.propTypes = {
|
|
55
46
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
56
47
|
particularConditions: (0, _propTypes.arrayOf)(_propTypes.string),
|
|
57
48
|
onAcceptPress: _propTypes.func
|
|
58
49
|
};
|
|
59
|
-
|
|
60
50
|
var _default = (0, _WithContextApi.default)()(BillParticularConditions);
|
|
61
|
-
|
|
62
51
|
exports.default = _default;
|
|
@@ -1,72 +1,48 @@
|
|
|
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 _propTypes = require("prop-types");
|
|
13
|
-
|
|
14
10
|
var _smartBillTypes = require("../../../../shared/types/smartBillTypes");
|
|
15
|
-
|
|
16
11
|
var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"));
|
|
17
|
-
|
|
18
12
|
var _aliases = require("../../../../shared/constants/aliases");
|
|
19
|
-
|
|
20
13
|
var _BillParticularConditions = _interopRequireDefault(require("./components/BillParticularConditions"));
|
|
21
|
-
|
|
22
14
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
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); }
|
|
27
|
-
|
|
28
17
|
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; }
|
|
29
|
-
|
|
30
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
-
|
|
32
19
|
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."); }
|
|
33
|
-
|
|
34
20
|
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); }
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
21
|
+
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; }
|
|
22
|
+
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; } }
|
|
40
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
-
|
|
42
24
|
var BillAlert = function BillAlert(_ref) {
|
|
43
25
|
var contextApiInfo = _ref.contextApiInfo,
|
|
44
|
-
|
|
45
|
-
|
|
26
|
+
particularConditions = _ref.particularConditions,
|
|
27
|
+
isDesktopSize = _ref.isDesktopSize;
|
|
46
28
|
var assets = contextApiInfo.assets,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
29
|
+
config = contextApiInfo.config,
|
|
30
|
+
Dialog = contextApiInfo.Dialog,
|
|
31
|
+
Label = contextApiInfo.Label,
|
|
32
|
+
Touchable = contextApiInfo.Touchable;
|
|
52
33
|
var _ref2 = (config === null || config === void 0 ? void 0 : config.stylesConfig) || {},
|
|
53
|
-
|
|
54
|
-
|
|
34
|
+
billAlertContainer = _ref2.billAlertContainer;
|
|
55
35
|
var texts = config.texts;
|
|
56
|
-
|
|
57
36
|
var _useState = (0, _react.useState)(false),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
37
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
+
dialogOpened = _useState2[0],
|
|
39
|
+
setDialogOpened = _useState2[1];
|
|
62
40
|
var handleAlertClick = function handleAlertClick() {
|
|
63
41
|
return setDialogOpened(true);
|
|
64
42
|
};
|
|
65
|
-
|
|
66
43
|
var handleCloseDialog = function handleCloseDialog() {
|
|
67
44
|
return setDialogOpened(false);
|
|
68
45
|
};
|
|
69
|
-
|
|
70
46
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
71
47
|
className: "".concat(_stylesModule.default.container, " ").concat(billAlertContainer)
|
|
72
48
|
}, /*#__PURE__*/_react.default.createElement(Dialog, {
|
|
@@ -89,13 +65,10 @@ var BillAlert = function BillAlert(_ref) {
|
|
|
89
65
|
small: isDesktopSize
|
|
90
66
|
}, texts.mainBillData.particularConditionsAlert)));
|
|
91
67
|
};
|
|
92
|
-
|
|
93
68
|
BillAlert.propTypes = {
|
|
94
69
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
95
70
|
particularConditions: (0, _propTypes.arrayOf)(_propTypes.string),
|
|
96
71
|
isDesktopSize: _propTypes.bool
|
|
97
72
|
};
|
|
98
|
-
|
|
99
73
|
var _default = (0, _WithContextApi.default)()(BillAlert);
|
|
100
|
-
|
|
101
74
|
exports.default = _default;
|
|
@@ -4,36 +4,25 @@ 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 _propTypes = require("prop-types");
|
|
13
|
-
|
|
14
10
|
var _aliases = require("../../../../../../shared/constants/aliases");
|
|
15
|
-
|
|
16
11
|
var _smartBillTypes = require("../../../../../../shared/types/smartBillTypes");
|
|
17
|
-
|
|
18
12
|
var _billDataTypes = require("../../../../../../shared/types/billDataTypes");
|
|
19
|
-
|
|
20
13
|
var _WithContextApi = _interopRequireDefault(require("../../../../../WithContextApi"));
|
|
21
|
-
|
|
22
14
|
var _IconAndDetails = _interopRequireDefault(require("../../../../../IconAndDetails"));
|
|
23
|
-
|
|
24
15
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
25
|
-
|
|
26
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
-
|
|
28
17
|
var ClientData = function ClientData(_ref) {
|
|
29
18
|
var contextApiInfo = _ref.contextApiInfo,
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
billData = _ref.billData,
|
|
20
|
+
multipleSettlements = _ref.multipleSettlements;
|
|
32
21
|
var assets = contextApiInfo.assets,
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
config = contextApiInfo.config,
|
|
23
|
+
Label = contextApiInfo.Label;
|
|
35
24
|
var texts = config.texts,
|
|
36
|
-
|
|
25
|
+
formatters = config.formatters;
|
|
37
26
|
var AdheredToServiceIcon = assets.AdheredToServiceIcon;
|
|
38
27
|
var client = (0, _seamlessImmutable.getIn)(billData, ['client'], {});
|
|
39
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -114,13 +103,10 @@ var ClientData = function ClientData(_ref) {
|
|
|
114
103
|
tertiaryAlias: _aliases.MAIN_LIGHT
|
|
115
104
|
}));
|
|
116
105
|
};
|
|
117
|
-
|
|
118
106
|
ClientData.propTypes = {
|
|
119
107
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
120
108
|
billData: _billDataTypes.billDataTypes,
|
|
121
109
|
multipleSettlements: _propTypes.bool
|
|
122
110
|
};
|
|
123
|
-
|
|
124
111
|
var _default = (0, _WithContextApi.default)()(ClientData);
|
|
125
|
-
|
|
126
112
|
exports.default = _default;
|
package/dist/components/MainBillData/components/BillBody/components/ClientData/styles.module.scss
CHANGED
|
@@ -103,7 +103,7 @@ $margin-bottom-size: 16px;
|
|
|
103
103
|
|
|
104
104
|
.adheredToDigitalBillLabelContainer {
|
|
105
105
|
align-items: center;
|
|
106
|
-
background:
|
|
106
|
+
background: var(--semanticSuccess01);
|
|
107
107
|
border-radius: 15px;
|
|
108
108
|
display: flex;
|
|
109
109
|
height: fit-content;
|
|
@@ -114,7 +114,5 @@ $margin-bottom-size: 16px;
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.label {
|
|
117
|
-
color: $adhered-to-digital-bill;
|
|
118
|
-
font-size: 12px;
|
|
119
117
|
margin-left: 4px;
|
|
120
118
|
}
|