@widergy/utilitygo-smart-bill-web 2.2.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/components/Advice/index.js +10 -6
- package/dist/components/Amount/index.js +26 -21
- package/dist/components/Amount/utils.js +2 -5
- package/dist/components/Banner/index.js +10 -6
- package/dist/components/BarChart/constants.js +3 -3
- package/dist/components/BarChart/index.js +28 -22
- package/dist/components/BarChart/utils.js +17 -16
- package/dist/components/BillCalculation/components/ConceptCard/index.js +52 -45
- package/dist/components/BillCalculation/components/Glossary/index.js +48 -64
- package/dist/components/BillCalculation/components/Glossary/styles.module.scss +1 -0
- package/dist/components/BillCalculation/constants.js +1 -1
- package/dist/components/BillCalculation/index.js +48 -51
- package/dist/components/BillCalculation/utils.js +22 -22
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +25 -22
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +1 -1
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +15 -15
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +3 -3
- package/dist/components/BillSummary/components/BilledConcepts/constants.js +13 -14
- package/dist/components/BillSummary/components/BilledConcepts/index.js +29 -39
- package/dist/components/BillSummary/components/BilledConcepts/utils.js +50 -69
- package/dist/components/BillSummary/index.js +70 -69
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +8 -8
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +17 -10
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +3 -2
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +147 -133
- package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +16 -14
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +88 -89
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +21 -11
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +3 -2
- package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +21 -14
- package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +15 -10
- package/dist/components/ConsumptionComparison/index.js +41 -45
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +27 -22
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/styles.module.scss +1 -1
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +18 -13
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +15 -12
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +21 -15
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +3 -2
- package/dist/components/ConsumptionEnergyDetails/index.js +46 -41
- package/dist/components/ConsumptionEnergyDetails/styles.module.scss +2 -2
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +64 -60
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +12 -13
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +20 -17
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +16 -10
- package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +42 -37
- package/dist/components/ConsumptionIncluded/components/TimelineRow/styles.module.scss +2 -2
- package/dist/components/ConsumptionIncluded/index.js +31 -32
- package/dist/components/ConsumptionIncluded/utils.js +32 -34
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +14 -10
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +23 -20
- package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +18 -26
- package/dist/components/ConsumptionPeriod/components/Reading/index.js +35 -32
- package/dist/components/ConsumptionPeriod/index.js +12 -8
- package/dist/components/ConsumptionPeriod/utils.js +14 -15
- package/dist/components/Date/index.js +12 -9
- package/dist/components/DebtState/index.js +14 -8
- package/dist/components/IconAndDetails/index.js +19 -17
- package/dist/components/Magnitude/index.js +15 -12
- package/dist/components/Magnitude/utils.js +3 -8
- package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +18 -14
- package/dist/components/MainBillData/components/BillAlert/index.js +24 -31
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +19 -11
- package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +14 -11
- package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +2 -3
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +23 -15
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/styles.module.scss +2 -2
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +3 -2
- package/dist/components/MainBillData/components/BillBody/index.js +42 -44
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +16 -11
- package/dist/components/MainBillData/components/BillHeader/index.js +29 -24
- package/dist/components/MainBillData/components/BillHeader/styles.module.scss +1 -1
- package/dist/components/MainBillData/index.js +7 -5
- package/dist/components/MainBillData/theme.js +8 -9
- package/dist/components/MainBillData/utils.js +2 -5
- package/dist/components/Period/index.js +54 -43
- package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +15 -11
- package/dist/components/PowerProgresBar/index.js +31 -30
- package/dist/components/RateAndCategory/index.js +25 -27
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +20 -13
- package/dist/components/RatesDefinition/components/BillRate/index.js +24 -14
- package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +1 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +14 -9
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +26 -21
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +11 -7
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +1 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +11 -10
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +21 -19
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +34 -36
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +2 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +17 -30
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +37 -48
- package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +18 -18
- package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +23 -31
- package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +2 -5
- package/dist/components/RatesDefinition/components/PurchasedRate/index.js +19 -13
- package/dist/components/RatesDefinition/index.js +20 -15
- package/dist/components/RatesDefinition/styles.module.scss +1 -1
- package/dist/components/SmartBillProvider/index.js +12 -34
- package/dist/components/StyledAmount/constants.js +1 -1
- package/dist/components/StyledAmount/index.js +19 -27
- package/dist/components/WithContextApi/index.js +18 -25
- package/dist/components/WithContextApi/layout.js +2 -2
- package/dist/components/WithSeason/index.js +6 -9
- package/dist/constants/deviceSizes.js +33 -18
- package/dist/constants/seasons.js +2 -2
- package/dist/index.js +14 -15
- package/dist/scss/variables/commonColors.module.scss +1 -1
- package/dist/shared/Context/index.js +7 -3
- package/dist/shared/constants/aliases.js +691 -556
- package/dist/shared/constants/consumptions.js +4 -4
- package/dist/shared/constants/periodicities.js +1 -1
- package/dist/shared/constants/rates.js +1 -1
- package/dist/shared/constants/readings.js +2 -2
- package/dist/shared/constants/seasons.js +2 -2
- package/dist/shared/constants/stagesGraph.js +4 -4
- package/dist/shared/types/assetsTypes.js +1 -1
- package/dist/shared/types/billDataTypes.js +5 -5
- package/dist/shared/types/componentsTypes.js +18 -10
- package/dist/shared/types/formattersTypes.js +1 -1
- package/dist/shared/types/rateStagesTypes.js +3 -3
- package/dist/shared/types/smartBillTypes.js +5 -10
- package/dist/shared/types/textsTypes.js +1 -1
- package/dist/shared/utils/billCalculation.js +11 -10
- package/dist/shared/utils/consumptions.js +34 -56
- package/dist/shared/utils/context.js +8 -6
- package/dist/shared/utils/expirations.js +2 -5
- package/dist/shared/utils/periods.js +20 -21
- package/dist/shared/utils/rates.js +2 -5
- package/dist/shared/utils/readings.js +4 -10
- package/dist/shared/utils/season.js +2 -5
- package/dist/shared/utils/stagesGraph.js +15 -15
- package/dist/utils/hooks.js +1 -1
- package/dist/utils.js +7 -8
- package/package.json +26 -63
|
@@ -12,33 +12,25 @@ var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
|
12
12
|
var _constants = require("./constants");
|
|
13
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var Label = contextApiInfo.Label;
|
|
35
|
-
var _VARIANTS$variant = _constants.VARIANTS[variant],
|
|
36
|
-
currencyLabelStyle = _VARIANTS$variant.currencyLabelStyle,
|
|
37
|
-
decimalLabelStyle = _VARIANTS$variant.decimalLabelStyle;
|
|
38
|
-
var _ref2 = amount !== null && amount !== undefined && (0, _numeral.default)(amount).format(amountFormat).split(splitChar) || ['-', '-'],
|
|
39
|
-
_ref3 = _slicedToArray(_ref2, 2),
|
|
40
|
-
integerPart = _ref3[0],
|
|
41
|
-
decimalPart = _ref3[1];
|
|
15
|
+
const StyledAmount = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
contextApiInfo,
|
|
18
|
+
currency = '$',
|
|
19
|
+
amount,
|
|
20
|
+
amountFormat = '0,0.00',
|
|
21
|
+
splitChar = ',',
|
|
22
|
+
variant = 'medium',
|
|
23
|
+
alias,
|
|
24
|
+
aliasDecimal
|
|
25
|
+
} = _ref;
|
|
26
|
+
const {
|
|
27
|
+
Label
|
|
28
|
+
} = contextApiInfo;
|
|
29
|
+
const {
|
|
30
|
+
currencyLabelStyle,
|
|
31
|
+
decimalLabelStyle
|
|
32
|
+
} = _constants.VARIANTS[variant];
|
|
33
|
+
const [integerPart, decimalPart] = amount !== null && amount !== undefined && (0, _numeral.default)(amount).format(amountFormat).split(splitChar) || ['-', '-'];
|
|
42
34
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
43
35
|
className: _stylesModule.default.container
|
|
44
36
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -10,31 +10,24 @@ var _Context = require("../../shared/Context");
|
|
|
10
10
|
var _context = require("../../shared/utils/context");
|
|
11
11
|
var _layout = _interopRequireDefault(require("./layout"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
|
-
var withContextApi = function withContextApi(retrieveStyle) {
|
|
21
|
-
return function (Component) {
|
|
22
|
-
return function (props) {
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(_Context.SmartBillConsumer, null, function (contextApiInfo) {
|
|
24
|
-
var infoWithUnpackedComponents = _objectSpread(_objectSpread({}, contextApiInfo), (0, _context.unpackComponents)(contextApiInfo));
|
|
25
|
-
var infoWithDefaultColors = _objectSpread(_objectSpread({}, infoWithUnpackedComponents), {}, {
|
|
26
|
-
config: _objectSpread({
|
|
27
|
-
colors: contextApiInfo.colors || _aliases.DEFAULT_COLORS
|
|
28
|
-
}, contextApiInfo.config)
|
|
29
|
-
});
|
|
30
|
-
delete infoWithUnpackedComponents.components;
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(_layout.default, _extends({}, props, {
|
|
32
|
-
Component: Component,
|
|
33
|
-
contextApiInfo: infoWithDefaultColors,
|
|
34
|
-
retrieveStyle: retrieveStyle
|
|
35
|
-
}));
|
|
36
|
-
});
|
|
37
|
-
};
|
|
14
|
+
const withContextApi = retrieveStyle => Component => props => /*#__PURE__*/_react.default.createElement(_Context.SmartBillConsumer, null, contextApiInfo => {
|
|
15
|
+
const infoWithUnpackedComponents = {
|
|
16
|
+
...contextApiInfo,
|
|
17
|
+
...(0, _context.unpackComponents)(contextApiInfo)
|
|
38
18
|
};
|
|
39
|
-
|
|
19
|
+
const infoWithDefaultColors = {
|
|
20
|
+
...infoWithUnpackedComponents,
|
|
21
|
+
config: {
|
|
22
|
+
colors: contextApiInfo.colors || _aliases.DEFAULT_COLORS,
|
|
23
|
+
...contextApiInfo.config
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
delete infoWithUnpackedComponents.components;
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement(_layout.default, _extends({}, props, {
|
|
28
|
+
Component: Component,
|
|
29
|
+
contextApiInfo: infoWithDefaultColors,
|
|
30
|
+
retrieveStyle: retrieveStyle
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
40
33
|
var _default = exports.default = withContextApi;
|
|
@@ -10,9 +10,9 @@ var _reactJss = _interopRequireDefault(require("react-jss"));
|
|
|
10
10
|
var _componentsTypes = require("../../shared/types/componentsTypes");
|
|
11
11
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
13
|
+
const ThemedComponent = props => {
|
|
14
14
|
var _props$contextApiInfo;
|
|
15
|
-
|
|
15
|
+
const StyledComponent = props.retrieveStyle && (_props$contextApiInfo = props.contextApiInfo) !== null && _props$contextApiInfo !== void 0 && _props$contextApiInfo.theme ? (0, _reactJss.default)(props.retrieveStyle(props.contextApiInfo.theme))(props.Component) : props.Component;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement(StyledComponent, props);
|
|
17
17
|
};
|
|
18
18
|
ThemedComponent.propTypes = {
|
|
@@ -8,14 +8,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _season = require("../../shared/utils/season");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}, props));
|
|
18
|
-
};
|
|
19
|
-
};
|
|
11
|
+
const withSeason = () => Component => props => {
|
|
12
|
+
// eslint-disable-next-line react/prop-types
|
|
13
|
+
const season = (0, _season.getSeason)(props.monthNumber);
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(Component, _extends({
|
|
15
|
+
season: season
|
|
16
|
+
}, props));
|
|
20
17
|
};
|
|
21
18
|
var _default = exports.default = withSeason;
|
|
@@ -7,45 +7,60 @@ exports.TabletViewport = exports.TabletMobileViewport = exports.TabletBreakpoint
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const TabletBreakpoint = exports.TabletBreakpoint = 1024;
|
|
11
|
+
const MobileBreakpoint = exports.MobileBreakpoint = 768;
|
|
12
|
+
const FullHDBreakpoint = exports.FullHDBreakpoint = 1920;
|
|
13
|
+
const HDBreakpoint = exports.HDBreakpoint = 1380;
|
|
14
|
+
const DESKTOP = exports.DESKTOP = 'desktop';
|
|
15
|
+
const MOBILE = exports.MOBILE = 'mobile';
|
|
16
|
+
const TABLET = exports.TABLET = 'tablet';
|
|
17
17
|
|
|
18
18
|
// For conditional rendering
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const DesktopViewport = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
children
|
|
22
|
+
} = _ref;
|
|
21
23
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
22
24
|
minWidth: TabletBreakpoint
|
|
23
25
|
}, children);
|
|
24
26
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
exports.DesktopViewport = DesktopViewport;
|
|
28
|
+
const TabletViewport = _ref2 => {
|
|
29
|
+
let {
|
|
30
|
+
children
|
|
31
|
+
} = _ref2;
|
|
27
32
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
28
33
|
minWidth: MobileBreakpoint,
|
|
29
34
|
maxWidth: TabletBreakpoint - 1
|
|
30
35
|
}, children);
|
|
31
36
|
};
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
exports.TabletViewport = TabletViewport;
|
|
38
|
+
const MobileViewport = _ref3 => {
|
|
39
|
+
let {
|
|
40
|
+
children
|
|
41
|
+
} = _ref3;
|
|
34
42
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
35
43
|
maxWidth: MobileBreakpoint - 1
|
|
36
44
|
}, children);
|
|
37
45
|
};
|
|
38
46
|
|
|
39
47
|
// Group tablet & desktop viewport
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
exports.MobileViewport = MobileViewport;
|
|
49
|
+
const DefaultViewport = _ref4 => {
|
|
50
|
+
let {
|
|
51
|
+
children
|
|
52
|
+
} = _ref4;
|
|
42
53
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
43
54
|
minWidth: MobileBreakpoint
|
|
44
55
|
}, children);
|
|
45
56
|
};
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
exports.DefaultViewport = DefaultViewport;
|
|
58
|
+
const TabletMobileViewport = _ref5 => {
|
|
59
|
+
let {
|
|
60
|
+
children
|
|
61
|
+
} = _ref5;
|
|
48
62
|
return /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
49
63
|
maxWidth: TabletBreakpoint - 1
|
|
50
64
|
}, children);
|
|
51
|
-
};
|
|
65
|
+
};
|
|
66
|
+
exports.TabletMobileViewport = TabletMobileViewport;
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SEASON_PERIODS = exports.SEASONS = void 0;
|
|
7
|
-
|
|
7
|
+
const SEASONS = exports.SEASONS = {
|
|
8
8
|
SPRING: 'spring',
|
|
9
9
|
SUMMER: 'summer',
|
|
10
10
|
AUTUMN: 'autumn',
|
|
11
11
|
WINTER: 'winter'
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
const SEASON_PERIODS = exports.SEASON_PERIODS = [{
|
|
14
14
|
initMonth: 1,
|
|
15
15
|
endingMonth: 2,
|
|
16
16
|
season: SEASONS.SUMMER
|
package/dist/index.js
CHANGED
|
@@ -1,80 +1,79 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.Aliases = void 0;
|
|
8
7
|
Object.defineProperty(exports, "BillCalculation", {
|
|
9
8
|
enumerable: true,
|
|
10
|
-
get: function
|
|
9
|
+
get: function () {
|
|
11
10
|
return _BillCalculation.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
13
|
Object.defineProperty(exports, "BillSummary", {
|
|
15
14
|
enumerable: true,
|
|
16
|
-
get: function
|
|
15
|
+
get: function () {
|
|
17
16
|
return _BillSummary.default;
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
19
|
Object.defineProperty(exports, "ColorAliases", {
|
|
21
20
|
enumerable: true,
|
|
22
|
-
get: function
|
|
21
|
+
get: function () {
|
|
23
22
|
return _aliases.COLORS;
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
25
|
exports.ComponentNames = void 0;
|
|
27
26
|
Object.defineProperty(exports, "ConsumptionComparison", {
|
|
28
27
|
enumerable: true,
|
|
29
|
-
get: function
|
|
28
|
+
get: function () {
|
|
30
29
|
return _ConsumptionComparison.default;
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
32
|
Object.defineProperty(exports, "ConsumptionIncluded", {
|
|
34
33
|
enumerable: true,
|
|
35
|
-
get: function
|
|
34
|
+
get: function () {
|
|
36
35
|
return _ConsumptionIncluded.default;
|
|
37
36
|
}
|
|
38
37
|
});
|
|
39
38
|
Object.defineProperty(exports, "ConsumptionPeriod", {
|
|
40
39
|
enumerable: true,
|
|
41
|
-
get: function
|
|
40
|
+
get: function () {
|
|
42
41
|
return _ConsumptionPeriod.default;
|
|
43
42
|
}
|
|
44
43
|
});
|
|
45
44
|
Object.defineProperty(exports, "DefaultLabelProps", {
|
|
46
45
|
enumerable: true,
|
|
47
|
-
get: function
|
|
46
|
+
get: function () {
|
|
48
47
|
return _aliases.DEFAULT_PROPS;
|
|
49
48
|
}
|
|
50
49
|
});
|
|
51
50
|
Object.defineProperty(exports, "MainBillData", {
|
|
52
51
|
enumerable: true,
|
|
53
|
-
get: function
|
|
52
|
+
get: function () {
|
|
54
53
|
return _MainBillData.default;
|
|
55
54
|
}
|
|
56
55
|
});
|
|
57
56
|
Object.defineProperty(exports, "RatesDefinition", {
|
|
58
57
|
enumerable: true,
|
|
59
|
-
get: function
|
|
58
|
+
get: function () {
|
|
60
59
|
return _RatesDefinition.default;
|
|
61
60
|
}
|
|
62
61
|
});
|
|
63
62
|
Object.defineProperty(exports, "SmartBillProvider", {
|
|
64
63
|
enumerable: true,
|
|
65
|
-
get: function
|
|
64
|
+
get: function () {
|
|
66
65
|
return _SmartBillProvider.default;
|
|
67
66
|
}
|
|
68
67
|
});
|
|
69
68
|
Object.defineProperty(exports, "billDataTypes", {
|
|
70
69
|
enumerable: true,
|
|
71
|
-
get: function
|
|
70
|
+
get: function () {
|
|
72
71
|
return _billDataTypes.billDataTypes;
|
|
73
72
|
}
|
|
74
73
|
});
|
|
75
74
|
Object.defineProperty(exports, "rateStagesTypes", {
|
|
76
75
|
enumerable: true,
|
|
77
|
-
get: function
|
|
76
|
+
get: function () {
|
|
78
77
|
return _rateStagesTypes.rateStagesTypes;
|
|
79
78
|
}
|
|
80
79
|
});
|
|
@@ -93,6 +92,6 @@ var Aliases = _aliases;
|
|
|
93
92
|
exports.Aliases = _aliases;
|
|
94
93
|
var _billDataTypes = require("./shared/types/billDataTypes");
|
|
95
94
|
var _rateStagesTypes = require("./shared/types/rateStagesTypes");
|
|
96
|
-
function _getRequireWildcardCache(
|
|
97
|
-
function _interopRequireWildcard(
|
|
95
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
96
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
98
97
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -6,6 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.SmartBillProvider = exports.SmartBillConsumer = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const ContextApi = /*#__PURE__*/_react.default.createContext({});
|
|
10
|
+
const {
|
|
11
|
+
Provider: SmartBillProvider,
|
|
12
|
+
Consumer: SmartBillConsumer
|
|
13
|
+
} = ContextApi;
|
|
14
|
+
exports.SmartBillConsumer = SmartBillConsumer;
|
|
15
|
+
exports.SmartBillProvider = SmartBillProvider;
|