@widergy/utilitygo-smart-bill-web 1.10.1 → 1.13.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 (58) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/BarChart/index.js +1 -1
  3. package/dist/components/BillCalculation/components/Glossary/index.js +133 -0
  4. package/dist/components/BillCalculation/components/Glossary/styles.module.scss +53 -0
  5. package/dist/components/BillCalculation/index.js +22 -4
  6. package/dist/components/BillCalculation/styles.module.scss +2 -1
  7. package/dist/components/BillCalculation/utils.js +16 -2
  8. package/dist/components/BillSummary/components/BilledConcepts/index.js +1 -1
  9. package/dist/components/BillSummary/components/BilledConcepts/utils.js +2 -2
  10. package/dist/components/BillSummary/index.js +1 -1
  11. package/dist/components/ConsumptionComparison/index.js +1 -1
  12. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +1 -1
  13. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +1 -1
  14. package/dist/components/ConsumptionEnergyDetails/index.js +1 -1
  15. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +1 -1
  16. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +1 -1
  17. package/dist/components/ConsumptionIncluded/index.js +1 -1
  18. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +1 -1
  19. package/dist/components/MainBillData/components/BillAlert/index.js +1 -1
  20. package/dist/components/MainBillData/components/BillBody/index.js +1 -1
  21. package/dist/components/Period/index.js +1 -1
  22. package/dist/components/PowerProgresBar/index.js +1 -1
  23. package/dist/components/RateAndCategory/index.js +1 -1
  24. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +8 -11
  25. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +1 -4
  26. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +4 -49
  27. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +50 -0
  28. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/styles.module.scss +34 -0
  29. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +65 -0
  30. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +88 -0
  31. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +6 -37
  32. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +21 -6
  33. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/styles.module.scss +4 -1
  34. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +68 -31
  35. package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +42 -0
  36. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +4 -13
  37. package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +16 -0
  38. package/dist/components/SmartBillProvider/index.js +3 -3
  39. package/dist/components/WithContextApi/index.js +2 -2
  40. package/dist/index.js +1 -1
  41. package/dist/shared/constants/aliases.js +9 -4
  42. package/dist/shared/types/componentsTypes.js +2 -2
  43. package/dist/shared/types/rateStagesTypes.js +1 -1
  44. package/dist/shared/types/smartBillTypes.js +2 -2
  45. package/dist/shared/utils/context.js +1 -1
  46. package/dist/utils/hooks.js +5 -76
  47. package/package.json +2 -1
  48. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/index.js +0 -23
  49. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/styles.module.scss +0 -15
  50. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +0 -63
  51. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/styles.module.scss +0 -5
  52. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/utils.js +0 -14
  53. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/index.js +0 -68
  54. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/styles.module.scss +0 -32
  55. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/index.js +0 -59
  56. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/styles.module.scss +0 -3
  57. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/index.js +0 -80
  58. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/styles.module.scss +0 -57
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # [1.13.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.12.0...v1.13.0) (2022-01-17)
2
+
3
+
4
+ ### Features
5
+
6
+ * glossary modal ([#23](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/23)) ([408df2e](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/408df2ee1f48ba1c5d18e96de6dfee81c3d16f14))
7
+
8
+ # [1.12.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.11.0...v1.12.0) (2022-01-17)
9
+
10
+
11
+ ### Features
12
+
13
+ * rate stages step redesign and refactor ([#24](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/24)) ([3ac585b](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/3ac585b57ce1e426979cac80bcf4980978399339))
14
+
15
+ # [1.11.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.10.2...v1.11.0) (2022-01-04)
16
+
17
+
18
+ ### Features
19
+
20
+ * 🌟 Migrated hooks to library 🌟 ([#17](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/17)) ([464d5c8](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/464d5c8f32de3d1b2255fd8a458a0bee540862bb))
21
+
22
+ ## [1.10.2](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.10.1...v1.10.2) (2022-01-04)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * color priority in rate stages ([#22](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/22)) ([7062efa](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/7062efa3dcc0f6ff792e822e0dabf8fa8cd1b5da))
28
+
1
29
  ## [1.10.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v1.10.0...v1.10.1) (2021-12-10)
2
30
 
3
31
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _propTypes = require("prop-types");
13
+
14
+ var _smartBillTypes = require("../../../../shared/types/smartBillTypes");
15
+
16
+ var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"));
17
+
18
+ var _aliases = require("../../../../shared/constants/aliases");
19
+
20
+ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+
24
+ 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); }
25
+
26
+ 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; }
27
+
28
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
29
+
30
+ 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."); }
31
+
32
+ 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); }
33
+
34
+ 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; }
35
+
36
+ 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; }
37
+
38
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
+
40
+ var Glossary = function Glossary(_ref) {
41
+ var glossaryConcepts = _ref.glossaryConcepts,
42
+ contextApiInfo = _ref.contextApiInfo,
43
+ isDesktopSize = _ref.isDesktopSize;
44
+ var assets = contextApiInfo.assets,
45
+ config = contextApiInfo.config,
46
+ Button = contextApiInfo.Button,
47
+ Label = contextApiInfo.Label,
48
+ Touchable = contextApiInfo.Touchable,
49
+ Dialog = contextApiInfo.Dialog,
50
+ Card = contextApiInfo.Card;
51
+ var texts = config.texts,
52
+ colors = config.colors;
53
+ var _texts$billCalculatio = texts.billCalculation,
54
+ glossaryTitle = _texts$billCalculatio.glossaryTitle,
55
+ seeGlossary = _texts$billCalculatio.seeGlossary;
56
+ var InfoIcon = assets.InfoIcon;
57
+
58
+ var _useState = (0, _react.useState)(),
59
+ _useState2 = _slicedToArray(_useState, 2),
60
+ open = _useState2[0],
61
+ setOpen = _useState2[1];
62
+
63
+ var _useState3 = (0, _react.useState)(),
64
+ _useState4 = _slicedToArray(_useState3, 2),
65
+ openItem = _useState4[0],
66
+ setOpenItem = _useState4[1];
67
+
68
+ var toggleItem = function toggleItem(i) {
69
+ return i === openItem ? setOpenItem() : setOpenItem(i);
70
+ };
71
+
72
+ return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(Dialog, {
73
+ isOpen: open,
74
+ title: glossaryTitle,
75
+ cancelButton: {
76
+ onPress: function onPress() {
77
+ return setOpen(false);
78
+ },
79
+ text: texts.commons.close
80
+ },
81
+ classNames: {
82
+ content: _stylesModule.default.content,
83
+ container: _stylesModule.default.dialogRoot,
84
+ mainTitle: _stylesModule.default.mainTitle
85
+ }
86
+ }, glossaryConcepts.map(function (concept, i) {
87
+ return /*#__PURE__*/_react.default.createElement(Card, {
88
+ horizontal: true,
89
+ isCollapsible: true,
90
+ expandableContentClassName: _stylesModule.default.expandableContent,
91
+ className: _stylesModule.default.itemContainer,
92
+ header: /*#__PURE__*/_react.default.createElement(Label, {
93
+ className: _stylesModule.default.cardTitle
94
+ }, concept.title),
95
+ isOpen: i === openItem,
96
+ onClick: function onClick() {
97
+ return toggleItem(i);
98
+ }
99
+ }, /*#__PURE__*/_react.default.createElement(Label, null, concept.description), /*#__PURE__*/_react.default.createElement("div", {
100
+ className: _stylesModule.default.emptySpace
101
+ }));
102
+ })), isDesktopSize ? /*#__PURE__*/_react.default.createElement(Touchable, {
103
+ onClick: function onClick() {
104
+ return setOpen(true);
105
+ },
106
+ className: _stylesModule.default.desktopContainer,
107
+ style: {
108
+ textDecorationColor: colors.secondary
109
+ }
110
+ }, /*#__PURE__*/_react.default.createElement(InfoIcon, {
111
+ style: {
112
+ fill: colors.tooltipIcon
113
+ },
114
+ className: _stylesModule.default.infoIconTooltip
115
+ }), /*#__PURE__*/_react.default.createElement(Label, {
116
+ alias: _aliases.GLOSSARY_LINK
117
+ }, seeGlossary)) : /*#__PURE__*/_react.default.createElement(Button, {
118
+ onPress: function onPress() {
119
+ return setOpen(true);
120
+ },
121
+ className: _stylesModule.default.button
122
+ }, seeGlossary));
123
+ };
124
+
125
+ Glossary.propTypes = {
126
+ isDesktopSize: _propTypes.bool,
127
+ glossaryConcepts: (0, _propTypes.arrayOf)(_propTypes.any),
128
+ contextApiInfo: _smartBillTypes.contextApiInfoTypes
129
+ };
130
+
131
+ var _default = (0, _WithContextApi.default)()(Glossary);
132
+
133
+ exports.default = _default;
@@ -0,0 +1,53 @@
1
+ @import '../../../../scss/variables/_colors';
2
+
3
+ .infoIconTooltip {
4
+ margin-right: 8px;
5
+ outline: none;
6
+ width: 18px;
7
+ }
8
+
9
+ .button {
10
+ font-size: 16px;
11
+ font-weight: 400;
12
+ margin-top: 16px;
13
+ }
14
+
15
+ .desktopContainer {
16
+ display: flex;
17
+ text-decoration: underline;
18
+ }
19
+
20
+ .content {
21
+ margin: 0;
22
+ overflow: overlay;
23
+ padding: 0;
24
+ }
25
+
26
+ .dialogRoot {
27
+ width: 350px;
28
+
29
+ ::-webkit-scrollbar {
30
+ display: none;
31
+ }
32
+ }
33
+
34
+ .itemContainer {
35
+ border-bottom: 1px solid $borders-gray !important;
36
+ border-radius: none;
37
+ box-shadow: none;
38
+ padding: 0 16px;
39
+ }
40
+
41
+ .emptySpace {
42
+ height: 24px;
43
+ }
44
+
45
+ .cardTitle {
46
+ font-weight: 500;
47
+ }
48
+
49
+ .mainTitle {
50
+ > * {
51
+ font-size: 16px !important;
52
+ }
53
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -19,12 +19,16 @@ var _StyledAmount = _interopRequireDefault(require("../StyledAmount"));
19
19
 
20
20
  var _aliases = require("../../shared/constants/aliases");
21
21
 
22
+ var _hooks = require("../../utils/hooks");
23
+
22
24
  var _utils = require("./utils");
23
25
 
24
26
  var _ConceptCard = _interopRequireDefault(require("./components/ConceptCard"));
25
27
 
26
28
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
27
29
 
30
+ var _Glossary = _interopRequireDefault(require("./components/Glossary"));
31
+
28
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
33
 
30
34
  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); }
@@ -62,14 +66,18 @@ var BillCalculation = function BillCalculation(_ref) {
62
66
  openedConcept = _useState2[0],
63
67
  setOpenedConcept = _useState2[1];
64
68
 
69
+ var _useScreenSize = (0, _hooks.useScreenSize)(),
70
+ isDesktopSize = _useScreenSize.isDesktopSize;
71
+
65
72
  var handleClick = function handleClick(index) {
66
73
  return setOpenedConcept(openedConcept !== index ? index : null);
67
74
  };
68
75
 
76
+ var glossaryConcepts = (0, _utils.filterGlossaryConcepts)(detail.concepts, showZeroConcepts);
69
77
  var title = (0, _utils.periodToTitleMapper)(billData, texts, periodFormatter, withBillCalcTitleDate(billData));
70
78
 
71
79
  var handleRenderConceptCard = function handleRenderConceptCard(concept, index) {
72
- return (concept.total !== 0 || showZeroConcepts) && /*#__PURE__*/_react.default.createElement(_ConceptCard.default, {
80
+ return (0, _utils.shouldShowConcept)(concept, showZeroConcepts) && /*#__PURE__*/_react.default.createElement(_ConceptCard.default, {
73
81
  titleHeader: concept.title,
74
82
  total: concept.total,
75
83
  lines: concept.lines,
@@ -80,12 +88,22 @@ var BillCalculation = function BillCalculation(_ref) {
80
88
  });
81
89
  };
82
90
 
91
+ var GlossaryRenderer = function GlossaryRenderer() {
92
+ return glossaryConcepts.length > 0 && /*#__PURE__*/_react.default.createElement(_Glossary.default, {
93
+ glossaryConcepts: glossaryConcepts,
94
+ isDesktopSize: isDesktopSize,
95
+ showZeroConcepts: showZeroConcepts
96
+ });
97
+ };
98
+
83
99
  return /*#__PURE__*/_react.default.createElement("div", {
84
100
  className: _stylesModule.default.container
101
+ }, /*#__PURE__*/_react.default.createElement("div", {
102
+ className: _stylesModule.default.headerSection
85
103
  }, /*#__PURE__*/_react.default.createElement(Label, {
86
104
  alias: _aliases.BILL_CALC_CONCEPT_TITLE,
87
105
  className: _stylesModule.default.title
88
- }, title), detail.concepts.map(handleRenderConceptCard), /*#__PURE__*/_react.default.createElement("div", {
106
+ }, title), isDesktopSize && /*#__PURE__*/_react.default.createElement(GlossaryRenderer, null)), detail.concepts.map(handleRenderConceptCard), /*#__PURE__*/_react.default.createElement("div", {
89
107
  className: "".concat(_stylesModule.default.totalAmountContainer, " ").concat(stylesConfig === null || stylesConfig === void 0 ? void 0 : stylesConfig.paymentTotal),
90
108
  style: {
91
109
  backgroundColor: colors.primary
@@ -97,7 +115,7 @@ var BillCalculation = function BillCalculation(_ref) {
97
115
  aliasDecimal: _aliases.BILL_CALC_AMOUNT_DECIMAL,
98
116
  variant: "title",
99
117
  amount: detail.total_amount
100
- })));
118
+ })), !isDesktopSize && /*#__PURE__*/_react.default.createElement(GlossaryRenderer, null));
101
119
  };
102
120
 
103
121
  BillCalculation.propTypes = {
@@ -7,13 +7,14 @@
7
7
  flex-flow: column;
8
8
  }
9
9
 
10
- .title {
10
+ .headerSection {
11
11
  align-items: center;
12
12
  background: $white;
13
13
  border: 1px solid $borders-gray;
14
14
  border-bottom: 0;
15
15
  border-radius: $default-container-border-radius $default-container-border-radius 0 0;
16
16
  display: flex;
17
+ justify-content: space-between;
17
18
  min-height: 37px;
18
19
  padding: $default-spacing calc(2 * #{$default-spacing});
19
20
  @media #{$tablet-mobile} {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.periodToTitleMapper = void 0;
6
+ exports.shouldShowConcept = exports.periodToTitleMapper = exports.filterGlossaryConcepts = void 0;
7
7
 
8
8
  var _string = require("@widergy/web-utils/lib/string");
9
9
 
@@ -40,4 +40,18 @@ var periodToTitleMapper = function periodToTitleMapper(billData, texts, periodFo
40
40
  return '-';
41
41
  };
42
42
 
43
- exports.periodToTitleMapper = periodToTitleMapper;
43
+ exports.periodToTitleMapper = periodToTitleMapper;
44
+
45
+ var shouldShowConcept = function shouldShowConcept(concept, showZeroConcepts) {
46
+ return concept.total !== 0 || showZeroConcepts;
47
+ };
48
+
49
+ exports.shouldShowConcept = shouldShowConcept;
50
+
51
+ var filterGlossaryConcepts = function filterGlossaryConcepts(concepts, showZeroConcepts) {
52
+ return concepts.filter(function (concept) {
53
+ return concept.description && shouldShowConcept(concept, showZeroConcepts);
54
+ });
55
+ };
56
+
57
+ exports.filterGlossaryConcepts = filterGlossaryConcepts;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -13,9 +13,9 @@ var _Concept = _interopRequireDefault(require("./components/Concept"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
16
+ 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; }
17
17
 
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
18
+ 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; }
19
19
 
20
20
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
21
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -15,6 +15,8 @@ var _WithContextApi = _interopRequireDefault(require("../../../../../../../WithC
15
15
 
16
16
  var _smartBillTypes = require("../../../../../../../../shared/types/smartBillTypes");
17
17
 
18
+ var _constants = require("../../../../constants");
19
+
18
20
  var _IndicatorLabel = _interopRequireDefault(require("./components/IndicatorLabel"));
19
21
 
20
22
  var _utils = require("./utils");
@@ -24,22 +26,17 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
28
  var Indicator = function Indicator(_ref) {
27
- var value = _ref.value,
29
+ var indicatorPosition = _ref.indicatorPosition,
30
+ value = _ref.value,
28
31
  unit = _ref.unit,
29
32
  rateStages = _ref.rateStages,
30
- isDesktop = _ref.isDesktop,
31
33
  contextApiInfo = _ref.contextApiInfo;
32
34
  var primary = contextApiInfo.config.colors.primary;
33
-
34
- var _getIndicatorPosition = (0, _utils.getIndicatorPosition)(value, rateStages, isDesktop),
35
- containerLeft = _getIndicatorPosition.containerLeft,
36
- labelOffset = _getIndicatorPosition.labelOffset;
37
-
38
35
  return /*#__PURE__*/_react.default.createElement("div", {
39
36
  className: _stylesModule.default.container
40
37
  }, /*#__PURE__*/_react.default.createElement("div", {
41
38
  style: {
42
- left: containerLeft
39
+ left: "calc(".concat(indicatorPosition * 100, "% + ").concat(_constants.INITIAL_INDICATOR_POSITION, ")")
43
40
  },
44
41
  className: _stylesModule.default.indicator
45
42
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -50,16 +47,16 @@ var Indicator = function Indicator(_ref) {
50
47
  }), /*#__PURE__*/_react.default.createElement(_IndicatorLabel.default, {
51
48
  value: value,
52
49
  unit: unit,
53
- labelOffset: labelOffset
50
+ labelOffset: (0, _utils.getLabelOffset)(value, rateStages)
54
51
  })));
55
52
  };
56
53
 
57
54
  Indicator.propTypes = {
58
55
  value: _propTypes.number,
56
+ indicatorPosition: _propTypes.number,
59
57
  unit: _propTypes.string,
60
58
  contextApiInfo: _smartBillTypes.contextApiInfoTypes,
61
- rateStages: _rateStagesTypes.rateStagesTypes,
62
- isDesktop: _propTypes.bool
59
+ rateStages: _rateStagesTypes.rateStagesTypes
63
60
  };
64
61
 
65
62
  var _default = (0, _WithContextApi.default)()(Indicator);
@@ -1,12 +1,9 @@
1
- @import '../../../../../../../../scss/variables/_colorsExport.scss';
2
- @import '../../../../../../../../scss/variables/_mediaQueries';
3
- @import '../../../../../../../../scss/variables/_sizes.scss';
4
-
5
1
  $arrow-width: 12px;
6
2
  $arrow-height: 8px;
7
3
 
8
4
  .container {
9
5
  display: flex;
6
+ padding-top: 0 !important;
10
7
  width: 100%;
11
8
  }
12
9