@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.
Files changed (142) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/Advice/index.js +3 -14
  3. package/dist/components/Amount/index.js +11 -29
  4. package/dist/components/Amount/styles.module.scss +1 -2
  5. package/dist/components/Amount/utils.js +0 -3
  6. package/dist/components/Banner/index.js +3 -12
  7. package/dist/components/BarChart/index.js +13 -33
  8. package/dist/components/BarChart/styles.module.scss +5 -5
  9. package/dist/components/BarChart/utils.js +1 -6
  10. package/dist/components/BillCalculation/components/ConceptCard/index.js +31 -36
  11. package/dist/components/BillCalculation/components/Glossary/index.js +30 -50
  12. package/dist/components/BillCalculation/components/Glossary/styles.module.scss +0 -6
  13. package/dist/components/BillCalculation/index.js +13 -46
  14. package/dist/components/BillCalculation/utils.js +3 -15
  15. package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +11 -29
  16. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +3 -16
  17. package/dist/components/BillSummary/components/BilledConcepts/constants.js +0 -4
  18. package/dist/components/BillSummary/components/BilledConcepts/index.js +11 -40
  19. package/dist/components/BillSummary/components/BilledConcepts/styles.module.scss +1 -1
  20. package/dist/components/BillSummary/components/BilledConcepts/utils.js +13 -38
  21. package/dist/components/BillSummary/index.js +7 -42
  22. package/dist/components/BillSummary/styles.module.scss +0 -4
  23. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +0 -8
  24. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +5 -20
  25. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +0 -7
  26. package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +18 -39
  27. package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +2 -16
  28. package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +15 -37
  29. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +8 -16
  30. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +0 -7
  31. package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +12 -25
  32. package/dist/components/ConsumptionComparison/components/PercentageComparison/styles.module.scss +0 -10
  33. package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +4 -11
  34. package/dist/components/ConsumptionComparison/index.js +9 -44
  35. package/dist/components/ConsumptionComparison/styles.module.scss +0 -5
  36. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +13 -38
  37. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +9 -20
  38. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +14 -26
  39. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/styles.module.scss +0 -6
  40. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +10 -24
  41. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +0 -6
  42. package/dist/components/ConsumptionEnergyDetails/index.js +14 -41
  43. package/dist/components/ConsumptionEnergyDetails/styles.module.scss +2 -6
  44. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +39 -55
  45. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/styles.module.scss +2 -8
  46. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +0 -3
  47. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +7 -23
  48. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/styles.module.scss +0 -4
  49. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +4 -15
  50. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +17 -34
  51. package/dist/components/ConsumptionIncluded/index.js +1 -18
  52. package/dist/components/ConsumptionIncluded/utils.js +2 -30
  53. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +7 -19
  54. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +12 -27
  55. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +6 -30
  56. package/dist/components/ConsumptionPeriod/components/Reading/index.js +15 -33
  57. package/dist/components/ConsumptionPeriod/components/Reading/styles.module.scss +0 -1
  58. package/dist/components/ConsumptionPeriod/index.js +2 -21
  59. package/dist/components/ConsumptionPeriod/utils.js +0 -6
  60. package/dist/components/Date/index.js +6 -17
  61. package/dist/components/Date/styles.module.scss +2 -4
  62. package/dist/components/DebtState/index.js +6 -16
  63. package/dist/components/DebtState/styles.module.scss +2 -11
  64. package/dist/components/IconAndDetails/index.js +13 -26
  65. package/dist/components/Magnitude/index.js +18 -39
  66. package/dist/components/Magnitude/utils.js +0 -29
  67. package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +6 -17
  68. package/dist/components/MainBillData/components/BillAlert/index.js +12 -39
  69. package/dist/components/MainBillData/components/BillAlert/styles.module.scss +4 -1
  70. package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +5 -19
  71. package/dist/components/MainBillData/components/BillBody/components/ClientData/styles.module.scss +1 -3
  72. package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +4 -20
  73. package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +0 -2
  74. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +16 -30
  75. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +0 -5
  76. package/dist/components/MainBillData/components/BillBody/index.js +3 -35
  77. package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +7 -19
  78. package/dist/components/MainBillData/components/BillHeader/index.js +5 -28
  79. package/dist/components/MainBillData/index.js +1 -16
  80. package/dist/components/MainBillData/theme.js +0 -3
  81. package/dist/components/MainBillData/utils.js +0 -3
  82. package/dist/components/Period/index.js +18 -44
  83. package/dist/components/Period/styles.module.scss +9 -9
  84. package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +21 -28
  85. package/dist/components/PowerProgresBar/components/PowerConsumption/styles.module.scss +0 -7
  86. package/dist/components/PowerProgresBar/index.js +8 -29
  87. package/dist/components/PowerProgresBar/styles.module.scss +5 -9
  88. package/dist/components/RateAndCategory/index.js +8 -26
  89. package/dist/components/RateAndCategory/styles.module.scss +1 -4
  90. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +11 -23
  91. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/styles.module.scss +0 -1
  92. package/dist/components/RatesDefinition/components/BillRate/index.js +8 -20
  93. package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +1 -2
  94. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +5 -17
  95. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/styles.module.scss +2 -4
  96. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +8 -22
  97. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +4 -18
  98. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +0 -7
  99. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +4 -14
  100. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/styles.module.scss +1 -9
  101. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +8 -16
  102. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +0 -4
  103. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +0 -1
  104. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +12 -39
  105. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +14 -24
  106. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +11 -38
  107. package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +0 -3
  108. package/dist/components/RatesDefinition/components/PurchasedRate/index.js +11 -23
  109. package/dist/components/RatesDefinition/components/PurchasedRate/styles.module.scss +5 -4
  110. package/dist/components/RatesDefinition/index.js +4 -25
  111. package/dist/components/SmartBillProvider/index.js +7 -28
  112. package/dist/components/StyledAmount/constants.js +0 -3
  113. package/dist/components/StyledAmount/index.js +18 -38
  114. package/dist/components/StyledAmount/styles.module.scss +2 -3
  115. package/dist/components/WithContextApi/index.js +5 -16
  116. package/dist/components/WithContextApi/layout.js +0 -9
  117. package/dist/components/WithSeason/index.js +1 -7
  118. package/dist/constants/deviceSizes.js +4 -16
  119. package/dist/index.js +0 -18
  120. package/dist/scss/variables/_colors.scss +0 -6
  121. package/dist/scss/variables/_colorsExport.scss +0 -6
  122. package/dist/shared/Context/index.js +1 -5
  123. package/dist/shared/constants/aliases.js +86 -83
  124. package/dist/shared/types/assetsTypes.js +0 -3
  125. package/dist/shared/types/billDataTypes.js +13 -13
  126. package/dist/shared/types/componentsTypes.js +4 -10
  127. package/dist/shared/types/formattersTypes.js +0 -2
  128. package/dist/shared/types/rateStagesTypes.js +0 -2
  129. package/dist/shared/types/smartBillTypes.js +4 -10
  130. package/dist/shared/types/textsTypes.js +0 -2
  131. package/dist/shared/utils/billCalculation.js +0 -6
  132. package/dist/shared/utils/consumptions.js +1 -32
  133. package/dist/shared/utils/context.js +0 -6
  134. package/dist/shared/utils/expirations.js +0 -3
  135. package/dist/shared/utils/periods.js +0 -15
  136. package/dist/shared/utils/rates.js +0 -4
  137. package/dist/shared/utils/readings.js +0 -7
  138. package/dist/shared/utils/season.js +0 -3
  139. package/dist/shared/utils/stagesGraph.js +0 -11
  140. package/dist/utils/hooks.js +0 -2
  141. package/dist/utils.js +0 -8
  142. 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
- date = _ref.date,
25
- text = _ref.text,
26
- _ref$classes = _ref.classes,
27
- classes = _ref$classes === void 0 ? {} : _ref$classes,
28
- mainAlias = _ref.mainAlias,
29
- detailAlias = _ref.detailAlias;
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
- margin-bottom: 3px;
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
- debtStatusLabel = _ref.debtStatusLabel,
25
- isWarning = _ref.isWarning;
16
+ debtStatusLabel = _ref.debtStatusLabel,
17
+ isWarning = _ref.isWarning;
26
18
  var assets = contextApiInfo.assets,
27
- Label = contextApiInfo.Label;
19
+ Label = contextApiInfo.Label;
28
20
  var PendingDebtIcon = assets.PendingDebtIcon,
29
- AdheredToServiceIcon = assets.AdheredToServiceIcon;
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: "".concat(_stylesModule.default.label, " ").concat(isWarning ? _stylesModule.default.withDebtsLabel : _stylesModule.default.adheredAutomaticDebtsLabel, " ")
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: $with-debts-background;
13
+ background: var(--semanticWarning01);
14
14
  }
15
15
 
16
16
  .adheredToAutomaticDebt {
17
- background: $adhered-to-automatic-debt-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
- contextApiInfo = _ref.contextApiInfo,
29
- Icon = _ref.Icon,
30
- mainText = _ref.mainText,
31
- secondaryText = _ref.secondaryText,
32
- descriptionText = _ref.descriptionText,
33
- tooltip = _ref.tooltip,
34
- mainAlias = _ref.mainAlias,
35
- secondaryAlias = _ref.secondaryAlias,
36
- _ref$tertiaryAlias = _ref.tertiaryAlias,
37
- tertiaryAlias = _ref$tertiaryAlias === void 0 ? secondaryAlias : _ref$tertiaryAlias,
38
- _ref$classes = _ref.classes,
39
- classes = _ref$classes === void 0 ? {} : _ref$classes;
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
- Tooltip = contextApiInfo.Tooltip;
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
- numberAlias = props.numberAlias,
31
- unitAlias = props.unitAlias,
32
- value = props.value,
33
- unit = props.unit,
34
- disableUnit = props.disableUnit,
35
- Icon = props.Icon,
36
- _props$classes = props.classes,
37
- classes = _props$classes === void 0 ? {} : _props$classes;
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, _extends({
47
- alias: numberAlias
48
- }, variantProps.unitLabel, {
49
- className: "".concat(variantProps.unitLabelStyles)
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
- classes: (0, _propTypes.shape)({
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
- particularConditions = _ref.particularConditions,
25
- onAcceptPress = _ref.onAcceptPress;
16
+ particularConditions = _ref.particularConditions,
17
+ onAcceptPress = _ref.onAcceptPress;
26
18
  var assets = contextApiInfo.assets,
27
- config = contextApiInfo.config,
28
- Button = contextApiInfo.Button,
29
- Label = contextApiInfo.Label;
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
- onPress: onAcceptPress
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 _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; }
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
- particularConditions = _ref.particularConditions,
45
- isDesktopSize = _ref.isDesktopSize;
26
+ particularConditions = _ref.particularConditions,
27
+ isDesktopSize = _ref.isDesktopSize;
46
28
  var assets = contextApiInfo.assets,
47
- config = contextApiInfo.config,
48
- Dialog = contextApiInfo.Dialog,
49
- Label = contextApiInfo.Label,
50
- Touchable = contextApiInfo.Touchable;
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
- billAlertContainer = _ref2.billAlertContainer;
54
-
34
+ billAlertContainer = _ref2.billAlertContainer;
55
35
  var texts = config.texts;
56
-
57
36
  var _useState = (0, _react.useState)(false),
58
- _useState2 = _slicedToArray(_useState, 2),
59
- dialogOpened = _useState2[0],
60
- setDialogOpened = _useState2[1];
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;
@@ -31,10 +31,13 @@
31
31
 
32
32
  .iconAndLabelContainer {
33
33
  align-items: center;
34
+
35
+ > svg {
36
+ flex-shrink: 0;
37
+ }
34
38
  }
35
39
 
36
40
  .label {
37
- color: $primary;
38
41
  margin-left: 13px;
39
42
  text-decoration: underline;
40
43
  }
@@ -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
- billData = _ref.billData,
31
- multipleSettlements = _ref.multipleSettlements;
19
+ billData = _ref.billData,
20
+ multipleSettlements = _ref.multipleSettlements;
32
21
  var assets = contextApiInfo.assets,
33
- config = contextApiInfo.config,
34
- Label = contextApiInfo.Label;
22
+ config = contextApiInfo.config,
23
+ Label = contextApiInfo.Label;
35
24
  var texts = config.texts,
36
- formatters = config.formatters;
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;
@@ -103,7 +103,7 @@ $margin-bottom-size: 16px;
103
103
 
104
104
  .adheredToDigitalBillLabelContainer {
105
105
  align-items: center;
106
- background: $adhered-to-automatic-debt-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
  }