@widergy/utilitygo-smart-bill-web 3.0.0 → 3.0.2
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 +14 -0
- package/dist/components/Advice/styles.module.scss +1 -0
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +43 -34
- package/dist/components/ConsumptionComparison/components/ComparisonTable/styles.module.scss +2 -0
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +0 -7
- package/dist/components/ConsumptionComparison/components/PercentageComparison/styles.module.scss +1 -0
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/styles.module.scss +1 -0
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/styles.module.scss +1 -0
- package/dist/components/ConsumptionPeriod/styles.module.scss +1 -0
- package/dist/components/Magnitude/index.js +15 -8
- package/dist/components/MainBillData/components/BillAlert/styles.module.scss +2 -1
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/styles.module.scss +1 -0
- package/dist/components/MainBillData/components/BillHeader/styles.module.scss +2 -0
- package/dist/components/Period/styles.module.scss +0 -6
- package/dist/shared/constants/aliases.js +2 -3
- package/dist/utils.js +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.0.2](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.0.1...v3.0.2) (2024-02-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* smartbill responsive and desktop ([#37](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/37)) ([39c822a](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/39c822ade27b2e02ac5ab23d40aba2c97e3cbef6))
|
|
7
|
+
|
|
8
|
+
## [3.0.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.0.0...v3.0.1) (2023-12-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* adjust for responsive inside workflows ([#35](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/35)) ([100e5b6](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/100e5b632cdb876dd6bad756b131f5f67062d5b6))
|
|
14
|
+
|
|
1
15
|
# [3.0.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v2.2.2...v3.0.0) (2023-11-28)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -9,7 +9,6 @@ var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
|
9
9
|
var _consumptions = require("../../../../shared/utils/consumptions");
|
|
10
10
|
var _consumptions2 = require("../../../../shared/constants/consumptions");
|
|
11
11
|
var _Magnitude = _interopRequireDefault(require("../../../Magnitude"));
|
|
12
|
-
var _utils = require("../../../../utils");
|
|
13
12
|
var _aliases = require("../../../../shared/constants/aliases");
|
|
14
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
15
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -93,8 +92,12 @@ const getField = function () {
|
|
|
93
92
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
94
93
|
let contextApiInfo = arguments.length > 1 ? arguments[1] : undefined;
|
|
95
94
|
const {
|
|
96
|
-
Label
|
|
95
|
+
Label,
|
|
96
|
+
config
|
|
97
97
|
} = contextApiInfo;
|
|
98
|
+
const {
|
|
99
|
+
noData
|
|
100
|
+
} = config.texts.commons;
|
|
98
101
|
const {
|
|
99
102
|
isHeader,
|
|
100
103
|
data,
|
|
@@ -112,72 +115,77 @@ const getField = function () {
|
|
|
112
115
|
id: FIELD_PERIOD_COMPARISION,
|
|
113
116
|
Component: !isHeader ? /*#__PURE__*/_react.default.createElement(Label, {
|
|
114
117
|
alias: textAlias
|
|
115
|
-
}, text ||
|
|
118
|
+
}, text || data || noData) : textLabel
|
|
116
119
|
},
|
|
117
120
|
[FIELD_PERIOD_DATES]: {
|
|
118
121
|
id: FIELD_PERIOD_DATES,
|
|
119
122
|
Component: !isHeader ? /*#__PURE__*/_react.default.createElement(Label, {
|
|
120
123
|
alias: textAlias
|
|
121
|
-
}, text ||
|
|
124
|
+
}, text || formatInterval(data) || noData) : textLabel
|
|
122
125
|
},
|
|
123
126
|
[FIELD_SETTLEMENTS_DAYS]: {
|
|
124
127
|
id: FIELD_SETTLEMENTS_DAYS,
|
|
125
128
|
Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
|
|
126
|
-
numberAlias: magnitudeAlias,
|
|
127
|
-
unitAlias: unitAlias,
|
|
128
|
-
value: (_data$period = data.period) === null || _data$period === void 0 || (_data$period = _data$period.settlements) === null || _data$period === void 0 ? void 0 : _data$period.total_settlements_days,
|
|
129
|
-
unit: data.daysUnit,
|
|
130
129
|
classes: {
|
|
131
130
|
numberAndUnit: _stylesModule.default.numberAndUnit
|
|
132
|
-
}
|
|
131
|
+
},
|
|
132
|
+
numberAlias: magnitudeAlias,
|
|
133
|
+
textAlias: textAlias,
|
|
134
|
+
unit: data.daysUnit,
|
|
135
|
+
unitAlias: unitAlias,
|
|
136
|
+
value: (_data$period = data.period) === null || _data$period === void 0 || (_data$period = _data$period.settlements) === null || _data$period === void 0 ? void 0 : _data$period.total_settlements_days
|
|
133
137
|
}) : textLabel
|
|
134
138
|
},
|
|
135
139
|
[FIELD_TOTAL_CONSUMPTIONS]: {
|
|
136
140
|
id: FIELD_TOTAL_CONSUMPTIONS,
|
|
137
141
|
Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
|
|
138
|
-
numberAlias: magnitudeAlias,
|
|
139
|
-
unitAlias: unitAlias,
|
|
140
|
-
value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value,
|
|
141
|
-
unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
|
|
142
142
|
classes: {
|
|
143
143
|
numberAndUnit: _stylesModule.default.numberAndUnit
|
|
144
|
-
}
|
|
144
|
+
},
|
|
145
|
+
numberAlias: magnitudeAlias,
|
|
146
|
+
textAlias: textAlias,
|
|
147
|
+
unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
|
|
148
|
+
unitAlias: unitAlias,
|
|
149
|
+
value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value
|
|
145
150
|
}) : textLabel
|
|
146
151
|
},
|
|
147
152
|
[FIELD_ENERGY_CONSUMPTION]: {
|
|
148
153
|
id: FIELD_ENERGY_CONSUMPTION,
|
|
149
154
|
Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
|
|
150
|
-
numberAlias: magnitudeAlias,
|
|
151
|
-
unitAlias: unitAlias,
|
|
152
|
-
value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value,
|
|
153
|
-
unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
|
|
154
155
|
classes: {
|
|
155
156
|
numberAndUnit: _stylesModule.default.numberAndUnit
|
|
156
|
-
}
|
|
157
|
+
},
|
|
158
|
+
numberAlias: magnitudeAlias,
|
|
159
|
+
textAlias: textAlias,
|
|
160
|
+
unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
|
|
161
|
+
unitAlias: unitAlias,
|
|
162
|
+
value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value
|
|
157
163
|
}) : textLabel
|
|
158
164
|
},
|
|
159
165
|
[FIELD_POWER_CONSUMPTION]: {
|
|
160
166
|
id: FIELD_POWER_CONSUMPTION,
|
|
161
167
|
Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
|
|
162
|
-
numberAlias: magnitudeAlias,
|
|
163
|
-
unitAlias: unitAlias,
|
|
164
|
-
value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.POWER_TYPES.REGISTERED).value,
|
|
165
|
-
unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.POWER_TYPES.REGISTERED).unit,
|
|
166
168
|
classes: {
|
|
167
169
|
numberAndUnit: _stylesModule.default.numberAndUnit
|
|
168
|
-
}
|
|
170
|
+
},
|
|
171
|
+
numberAlias: magnitudeAlias,
|
|
172
|
+
textAlias: textAlias,
|
|
173
|
+
unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.POWER_TYPES.REGISTERED).unit,
|
|
174
|
+
unitAlias: unitAlias,
|
|
175
|
+
value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.POWER_TYPES.REGISTERED).value
|
|
169
176
|
}) : textLabel
|
|
170
177
|
},
|
|
171
178
|
[FIELD_DAILY_CONSUMPTIONS]: {
|
|
172
179
|
id: FIELD_DAILY_CONSUMPTIONS,
|
|
173
180
|
Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
|
|
174
|
-
numberAlias: magnitudeAlias,
|
|
175
|
-
unitAlias: unitAlias,
|
|
176
|
-
value: (_getDailyConsumption$ = (0, _consumptions.getDailyConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value) === null || _getDailyConsumption$ === void 0 ? void 0 : _getDailyConsumption$.toFixed(1).toString().replace(/\./, ','),
|
|
177
|
-
unit: (0, _consumptions.getDailyConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
|
|
178
181
|
classes: {
|
|
179
182
|
numberAndUnit: _stylesModule.default.numberAndUnit
|
|
180
|
-
}
|
|
183
|
+
},
|
|
184
|
+
numberAlias: magnitudeAlias,
|
|
185
|
+
textAlias: textAlias,
|
|
186
|
+
unit: (0, _consumptions.getDailyConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
|
|
187
|
+
unitAlias: unitAlias,
|
|
188
|
+
value: (_getDailyConsumption$ = (0, _consumptions.getDailyConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value) === null || _getDailyConsumption$ === void 0 ? void 0 : _getDailyConsumption$.toFixed(1).toString().replace(/\./, ',')
|
|
181
189
|
}) : /*#__PURE__*/_react.default.createElement(Label, {
|
|
182
190
|
alias: _aliases.DETAIL
|
|
183
191
|
}, text)
|
|
@@ -185,13 +193,14 @@ const getField = function () {
|
|
|
185
193
|
[FIELD_AVERAGE_TEMPERATURE]: {
|
|
186
194
|
id: FIELD_AVERAGE_TEMPERATURE,
|
|
187
195
|
Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
|
|
188
|
-
numberAlias: magnitudeAlias,
|
|
189
|
-
unitAlias: unitAlias,
|
|
190
|
-
value: Math.round(data.periodAverageTemperature || data.period),
|
|
191
|
-
unit: data.temperatureUnit,
|
|
192
196
|
classes: {
|
|
193
197
|
numberAndUnit: _stylesModule.default.numberAndUnit
|
|
194
|
-
}
|
|
198
|
+
},
|
|
199
|
+
numberAlias: magnitudeAlias,
|
|
200
|
+
textAlias: textAlias,
|
|
201
|
+
unit: data.temperatureUnit,
|
|
202
|
+
unitAlias: unitAlias,
|
|
203
|
+
value: Math.round(data.periodAverageTemperature || data.period)
|
|
195
204
|
}) : textLabel
|
|
196
205
|
},
|
|
197
206
|
[NO_DATA_FIELD]: {
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.mobileGetTableLines = exports.getPeriodFields = exports.desktopGetTableLines = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _aliases = require("../../../../shared/constants/aliases");
|
|
9
8
|
var _DataLine = _interopRequireDefault(require("./components/DataLine"));
|
|
10
9
|
var _constants = require("./constants");
|
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -40,12 +39,6 @@ const getPeriodFields = function (contextApiInfo, period, periodAverageTemperatu
|
|
|
40
39
|
const formattedPeriod = period.number && period.year && "".concat(period.number, "/").concat(period.year);
|
|
41
40
|
const mobileLastYearPeriodFormatted = ((_period$lastYearPerio = period.lastYearPeriod) === null || _period$lastYearPerio === void 0 ? void 0 : _period$lastYearPerio.number) && ((_period$lastYearPerio2 = period.lastYearPeriod) === null || _period$lastYearPerio2 === void 0 ? void 0 : _period$lastYearPerio2.year) && "".concat((_period$lastYearPerio3 = period.lastYearPeriod) === null || _period$lastYearPerio3 === void 0 ? void 0 : _period$lastYearPerio3.number, "/").concat((_period$lastYearPerio4 = period.lastYearPeriod) === null || _period$lastYearPerio4 === void 0 ? void 0 : _period$lastYearPerio4.year);
|
|
42
41
|
const mobileCurrentYearPeriodFormatted = ((_period$currentPeriod = period.currentPeriod) === null || _period$currentPeriod === void 0 ? void 0 : _period$currentPeriod.number) && ((_period$currentPeriod2 = period.currentPeriod) === null || _period$currentPeriod2 === void 0 ? void 0 : _period$currentPeriod2.year) && "".concat((_period$currentPeriod3 = period.currentPeriod) === null || _period$currentPeriod3 === void 0 ? void 0 : _period$currentPeriod3.number, "/").concat((_period$currentPeriod4 = period.currentPeriod) === null || _period$currentPeriod4 === void 0 ? void 0 : _period$currentPeriod4.year);
|
|
43
|
-
if (isDesktop && Object.keys(period).length === 0) return [{
|
|
44
|
-
id: 'no_data_cell',
|
|
45
|
-
Component: /*#__PURE__*/_react.default.createElement(Label, {
|
|
46
|
-
alias: _aliases.GET_PERIOD_FIELDS_NO_DATA
|
|
47
|
-
}, noData)
|
|
48
|
-
}];
|
|
49
42
|
let noDataLastYearPeriod = false;
|
|
50
43
|
let noDataCurrentPeriod = false;
|
|
51
44
|
if (!isDesktop && Object.keys(period === null || period === void 0 ? void 0 : period.lastYearPeriod).length === 0) {
|
|
@@ -15,24 +15,29 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
const Magnitude = props => {
|
|
17
17
|
const {
|
|
18
|
+
classes = {},
|
|
18
19
|
contextApiInfo,
|
|
19
|
-
numberAlias,
|
|
20
|
-
unitAlias,
|
|
21
|
-
value,
|
|
22
|
-
unit,
|
|
23
20
|
disableUnit,
|
|
24
21
|
Icon,
|
|
25
|
-
|
|
22
|
+
numberAlias,
|
|
23
|
+
textAlias,
|
|
24
|
+
unit,
|
|
25
|
+
unitAlias,
|
|
26
|
+
value
|
|
26
27
|
} = props;
|
|
27
28
|
const {
|
|
28
|
-
Label
|
|
29
|
+
Label,
|
|
30
|
+
config
|
|
29
31
|
} = contextApiInfo;
|
|
32
|
+
const {
|
|
33
|
+
noData
|
|
34
|
+
} = config.texts.commons;
|
|
30
35
|
const variantProps = (0, _utils2.getVariantProps)(props);
|
|
31
36
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
37
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
33
38
|
}, Icon && /*#__PURE__*/_react.default.createElement(Icon, {
|
|
34
39
|
className: "".concat(_stylesModule.default.icon, " ").concat(classes.icon)
|
|
35
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
}), (value !== null && value !== void 0 ? value : value === 0) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
36
41
|
className: "".concat(_stylesModule.default.numberAndUnit, " ").concat(classes.numberAndUnit)
|
|
37
42
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
38
43
|
alias: numberAlias,
|
|
@@ -40,7 +45,9 @@ const Magnitude = props => {
|
|
|
40
45
|
}, (0, _utils.numberOrDash)(value)), !disableUnit && /*#__PURE__*/_react.default.createElement(Label, {
|
|
41
46
|
alias: unitAlias,
|
|
42
47
|
className: classes.unitLabel
|
|
43
|
-
}, (0, _utils.stringOrDash)(unit)))
|
|
48
|
+
}, (0, _utils.stringOrDash)(unit))) : /*#__PURE__*/_react.default.createElement(Label, {
|
|
49
|
+
alias: textAlias
|
|
50
|
+
}, noData));
|
|
44
51
|
};
|
|
45
52
|
Magnitude.propTypes = {
|
|
46
53
|
classes: (0, _propTypes.shape)({
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
.container {
|
|
6
6
|
align-items: center;
|
|
7
7
|
background-color: $bill-calculation-title-and-alert-background;
|
|
8
|
-
border: 1px solid $borders-primary;
|
|
9
8
|
border-radius: $default-container-border-radius;
|
|
9
|
+
border: 1px solid $borders-primary;
|
|
10
|
+
box-sizing: border-box;
|
|
10
11
|
display: flex;
|
|
11
12
|
justify-content: center;
|
|
12
13
|
margin-bottom: $default-spacing;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
width: 100%;
|
|
12
12
|
|
|
13
13
|
@media #{$desktop} {
|
|
14
|
+
box-sizing: border-box;
|
|
14
15
|
padding: 16px 24px;
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -79,6 +80,7 @@
|
|
|
79
80
|
align-items: flex-end;
|
|
80
81
|
display: flex;
|
|
81
82
|
flex-direction: row;
|
|
83
|
+
justify-content: space-between;
|
|
82
84
|
margin-bottom: 16px;
|
|
83
85
|
width: 100%;
|
|
84
86
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.POWER_CONSUMPTION = exports.PERIOD_RESPONSIVE = exports.PERIOD_RANGE = exports.PERIOD_ISSUED_DATE = exports.PERIOD_COMPARISON_UNIT_PREV = exports.PERIOD_COMPARISON_UNIT = exports.PERIOD_COMPARISON_TEXT_PREV = exports.PERIOD_COMPARISON_TEXT = exports.PERIOD_COMPARISON_NUMBER_PREV = exports.PERIOD_COMPARISON_NUMBER = exports.PERIOD = exports.PERCENTAGE_COMPARISON_TITLE = exports.PERCENTAGE_COMPARISON_SUBTITLE = exports.PERCENTAGE_COMPARISON_DETAIL = exports.PERCENTAGE_COMPARISON = exports.PARTICULAR_CONDITIONS_TITLE = exports.PARTICULAR_CONDITIONS_LIST_TITLE = exports.PARTICULAR_CONDITION = exports.MAIN_SECONDARY = exports.MAIN_LIGHT = exports.MAIN = exports.LINE_DESCRIPTION = exports.ISSUED_DATE = exports.HEADER_SETTLEMENT_REMAINING_DATE = exports.HEADER_SETTLEMENT_REMAINING = exports.HEADER_SETTLEMENT_DATE = exports.HEADER_SETTLEMENT = exports.HEADER_CONSUMPTION = exports.GLOSSARY_LINK = exports.
|
|
7
|
-
exports.WEATHER_PROVIDER_INFORMATION = exports.TYPE_AND_NUMBER_TYPE = exports.TITLE = exports.TINY_DECIMAL = exports.SUMMARY_TITLE = exports.SUMMARY_SUBTITLE = exports.SUMMARY_ROW_NUMBER = exports.SUMMARY_ROW_FOCUSED = exports.SUMMARY_ROW = exports.SUMMARY_RESULT_UNIT = exports.SUMMARY_RESULT_NUMBER = exports.SUMMARY_RESULT = exports.SUMMARY_PERIOD = exports.SUBSTAGE = exports.STAGE_DETAIL = exports.SEASON = exports.REGULAR_LINK = exports.READING_TITLE = exports.READING_STATE_DETAIL = exports.READING_STATE = exports.READING_MAIN = exports.READING_DETAIL = exports.RATE_STAGE_MAGNITUDE = exports.RATE_PRICES_AMOUNT = exports.RATE_MAGNITUDE_UNIT_INDICATOR = exports.RATE_MAGNITUDE_NUMBER_INDICATOR = exports.RATE_LABEL_INDICATOR = exports.RATE_DATA_SUBTITLE = exports.RATE_AND_CATEGORY_MAIN_TEXT = exports.RATE = exports.PURCHASED_RATE_DESCRIPTION = exports.POWER_FACTOR_EXCEEDED_VALUE = exports.POWER_FACTOR_EXCEEDED_MESSAGE = exports.POWER_CONSUMPTION_UNIT_GRAY = exports.POWER_CONSUMPTION_UNIT = exports.POWER_CONSUMPTION_TEXT_GRAY = exports.POWER_CONSUMPTION_TEXT =
|
|
6
|
+
exports.POWER_CONSUMPTION_GRAY = exports.POWER_CONSUMPTION = exports.PERIOD_RESPONSIVE = exports.PERIOD_RANGE = exports.PERIOD_ISSUED_DATE = exports.PERIOD_COMPARISON_UNIT_PREV = exports.PERIOD_COMPARISON_UNIT = exports.PERIOD_COMPARISON_TEXT_PREV = exports.PERIOD_COMPARISON_TEXT = exports.PERIOD_COMPARISON_NUMBER_PREV = exports.PERIOD_COMPARISON_NUMBER = exports.PERIOD = exports.PERCENTAGE_COMPARISON_TITLE = exports.PERCENTAGE_COMPARISON_SUBTITLE = exports.PERCENTAGE_COMPARISON_DETAIL = exports.PERCENTAGE_COMPARISON = exports.PARTICULAR_CONDITIONS_TITLE = exports.PARTICULAR_CONDITIONS_LIST_TITLE = exports.PARTICULAR_CONDITION = exports.MAIN_SECONDARY = exports.MAIN_LIGHT = exports.MAIN = exports.LINE_DESCRIPTION = exports.ISSUED_DATE = exports.HEADER_SETTLEMENT_REMAINING_DATE = exports.HEADER_SETTLEMENT_REMAINING = exports.HEADER_SETTLEMENT_DATE = exports.HEADER_SETTLEMENT = exports.HEADER_CONSUMPTION = exports.GLOSSARY_LINK = exports.EXPIRATION = exports.EXCEEDED_POWER_VALUE = exports.EXCEEDED_POWER_MESSAGE = exports.EXCEEDED_POWER_FINE = exports.ENERGY_TOTAL_CONSUMPTION_UNIT = exports.ENERGY_TOTAL_CONSUMPTION_EXCEEDED_UNIT = exports.ENERGY_TOTAL_CONSUMPTION_EXCEEDED = exports.ENERGY_TOTAL_CONSUMPTION_DETAIL = exports.ENERGY_TOTAL_CONSUMPTION = exports.DETAIL = exports.DEFAULT_PROPS = exports.DEFAULT_COLORS = exports.CONSUMPTION_PERIODICITY = exports.CONSUMPTION_NEXT_DETAIL = exports.CONSUMPTION_DAYS_UNIT_NEXT = exports.CONSUMPTION_DAYS_UNIT_ACTUAL = exports.CONSUMPTION_DAYS_NUMBER_NEXT = exports.CONSUMPTION_DAYS_NUMBER_ACTUAL = exports.CONSUMPTION_DAYS_DAYS_NEXT = exports.CONSUMPTION_DAYS_DAYS_ACTUAL = exports.CONSUMPTION_BIMESTER_UNIT = exports.CONSUMPTION_BIMESTER_NUMBER = exports.CONSUMPTION_BIMESTER_DAYS = exports.CONSUMPTION_ACTUAL_DETAIL = exports.CONCEPT_TITLE = exports.CONCEPT_SECONDARY_NAME = exports.CONCEPT_SECONDARY_AMOUNT_DECIMAL = exports.CONCEPT_SECONDARY_AMOUNT = exports.CONCEPT_LIST_AMOUNT_DECIMAL = exports.CONCEPT_LIST_AMOUNT = exports.CONCEPT_FIRST_NAME = exports.CONCEPT_FIRST_AMOUNT_DECIMAL = exports.CONCEPT_FIRST_AMOUNT = exports.CONCEPT_CARD_AMOUNT_DECIMAL = exports.CONCEPT_CARD_AMOUNT = exports.COLORS = exports.CATEGORY_DEFINITION = exports.CATEGORY = exports.CARD_WHITE_UNIT = exports.CARD_WHITE_MAGNITUDE = exports.CARD_WHITE_CONSUMPTION = exports.CARD_SUBTITLE_REMAINING = exports.CARD_SUBTITLE = exports.CARD_SECONDARY_TITLE = exports.CARD_PRIMARY_UNIT = exports.CARD_PRIMARY_MAGNITUDE = exports.CARD_PRIMARY_CONSUMPTION = exports.CARD_MAIN_TITLE = exports.CARD_GRAY_UNIT = exports.CARD_GRAY_MAGNITUDE = exports.CARD_GRAY_CONSUMPTION = exports.CARD_DESCRIPTION_REMAINING = exports.CARD_DESCRIPTION = exports.CARD_CONSUMPTION_TEXT_REMAINING = exports.CARD_CONSUMPTION_TEXT_CURRENT = exports.CARD_CONSUMPTION_DESCRIPTION_WHITE = exports.CARD_CONSUMPTION_DESCRIPTION_GRAY = exports.BILL_RATE_PRICES_SUBTITLE = exports.BILL_CALC_TOTAL = exports.BILL_CALC_CONCEPT_TITLE = exports.BILL_CALC_CONCEPT = exports.BILL_CALC_AMOUNT_DECIMAL = exports.BILL_CALC_AMOUNT = exports.BILL_ALERT = exports.AMOUNT_DECIMAL = exports.AMOUNT = exports.ADVICE_TITLE = exports.ADVICE_SUBTITLE = exports.ADVICE_CONTENT = exports.ADHERED_DIGITAL_BILL = void 0;
|
|
7
|
+
exports.WEATHER_PROVIDER_INFORMATION = exports.TYPE_AND_NUMBER_TYPE = exports.TITLE = exports.TINY_DECIMAL = exports.SUMMARY_TITLE = exports.SUMMARY_SUBTITLE = exports.SUMMARY_ROW_NUMBER = exports.SUMMARY_ROW_FOCUSED = exports.SUMMARY_ROW = exports.SUMMARY_RESULT_UNIT = exports.SUMMARY_RESULT_NUMBER = exports.SUMMARY_RESULT = exports.SUMMARY_PERIOD = exports.SUBSTAGE = exports.STAGE_DETAIL = exports.SEASON = exports.REGULAR_LINK = exports.READING_TITLE = exports.READING_STATE_DETAIL = exports.READING_STATE = exports.READING_MAIN = exports.READING_DETAIL = exports.RATE_STAGE_MAGNITUDE = exports.RATE_PRICES_AMOUNT = exports.RATE_MAGNITUDE_UNIT_INDICATOR = exports.RATE_MAGNITUDE_NUMBER_INDICATOR = exports.RATE_LABEL_INDICATOR = exports.RATE_DATA_SUBTITLE = exports.RATE_AND_CATEGORY_MAIN_TEXT = exports.RATE = exports.PURCHASED_RATE_DESCRIPTION = exports.POWER_FACTOR_EXCEEDED_VALUE = exports.POWER_FACTOR_EXCEEDED_MESSAGE = exports.POWER_CONSUMPTION_UNIT_GRAY = exports.POWER_CONSUMPTION_UNIT = exports.POWER_CONSUMPTION_TEXT_GRAY = exports.POWER_CONSUMPTION_TEXT = void 0;
|
|
8
8
|
const ADHERED_DIGITAL_BILL = exports.ADHERED_DIGITAL_BILL = 'adheredDigitalBill';
|
|
9
9
|
const ADVICE_CONTENT = exports.ADVICE_CONTENT = 'adviceContent';
|
|
10
10
|
const ADVICE_SUBTITLE = exports.ADVICE_SUBTITLE = 'adviceSubtitle';
|
|
@@ -72,7 +72,6 @@ const EXCEEDED_POWER_FINE = exports.EXCEEDED_POWER_FINE = 'exceededPowerFine';
|
|
|
72
72
|
const EXCEEDED_POWER_MESSAGE = exports.EXCEEDED_POWER_MESSAGE = 'exceededPowerMessage';
|
|
73
73
|
const EXCEEDED_POWER_VALUE = exports.EXCEEDED_POWER_VALUE = 'exceededPowerValue';
|
|
74
74
|
const EXPIRATION = exports.EXPIRATION = 'expiration';
|
|
75
|
-
const GET_PERIOD_FIELDS_NO_DATA = exports.GET_PERIOD_FIELDS_NO_DATA = 'getPeriodFieldsNoData';
|
|
76
75
|
const GLOSSARY_LINK = exports.GLOSSARY_LINK = 'glossaryLink';
|
|
77
76
|
const HEADER_CONSUMPTION = exports.HEADER_CONSUMPTION = 'headerConsumption';
|
|
78
77
|
const HEADER_SETTLEMENT = exports.HEADER_SETTLEMENT = 'headerSettlement';
|
package/dist/utils.js
CHANGED
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.stringOrDash = exports.numberOrDash = exports.formatNumber = void 0;
|
|
7
7
|
var _numeral = _interopRequireDefault(require("config/numeral"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
const
|
|
10
|
-
exports.
|
|
9
|
+
const formatNumber = value => (0, _numeral.default)(value).format('0.[00]');
|
|
10
|
+
exports.formatNumber = formatNumber;
|
|
11
11
|
const numberOrDash = function (number) {
|
|
12
12
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0,0';
|
|
13
13
|
return number !== undefined && number !== null ? (0, _numeral.default)(number).format(format) : '-';
|
|
14
14
|
};
|
|
15
15
|
exports.numberOrDash = numberOrDash;
|
|
16
|
-
const
|
|
17
|
-
exports.
|
|
16
|
+
const stringOrDash = str => str || '-';
|
|
17
|
+
exports.stringOrDash = stringOrDash;
|