x25 5.1.18 → 5.1.21

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.
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.fetchInitialInformation = undefined;
7
7
 
8
+ var _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; };
9
+
8
10
  var _superagent = require("superagent");
9
11
 
10
12
  var _superagent2 = _interopRequireDefault(_superagent);
@@ -19,6 +21,15 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
24
+ var normalizeCompanies = function normalizeCompanies(companies) {
25
+ return companies.map(function (company) {
26
+ return _extends({}, company, {
27
+ CountyID: company.CountyID.Int32,
28
+ CityID: company.CityID.Int32
29
+ });
30
+ });
31
+ };
32
+
22
33
  var normalizeInitialInformation = function normalizeInitialInformation(info) {
23
34
  var Account = info.Account,
24
35
  IsConnected = info.IsConnected,
@@ -31,7 +42,7 @@ var normalizeInitialInformation = function normalizeInitialInformation(info) {
31
42
  IsConnected: IsConnected,
32
43
  Error: IsConnected ? _utility.noError : "Not connected",
33
44
  Counties: typeof Counties === "undefined" ? Immutable.List() : (0, _utility.normalizeArrayByField)(Counties, "Short").entities,
34
- Companies: typeof Companies === "undefined" ? Immutable.List() : (0, _utility.normalizeArray)(Companies).entities
45
+ Companies: typeof Companies === "undefined" ? Immutable.List() : (0, _utility.normalizeArray)(normalizeCompanies(Companies)).entities
35
46
  };
36
47
  };
37
48
 
@@ -123,6 +123,12 @@ var DateInput = exports.DateInput = function DateInput(props) {
123
123
  updateValue(targetValue);
124
124
  };
125
125
 
126
+ _react2.default.useEffect(function () {
127
+ if ((0, _validation.isValidDate)(input.value) || input.value === "") {
128
+ updateValue(input.value);
129
+ }
130
+ }, [input.value]);
131
+
126
132
  return _react2.default.createElement("input", _extends({}, input, {
127
133
  className: (0, _classnames2.default)("form-control " + (customClass || ""), {
128
134
  "is-invalid": touched && error
@@ -126,6 +126,12 @@ var DateTemplate = exports.DateTemplate = function DateTemplate(props) {
126
126
  updateValue(targetValue);
127
127
  };
128
128
 
129
+ _react2.default.useEffect(function () {
130
+ if ((0, _validation.isValidDate)(input.value)) {
131
+ updateValue(input.value);
132
+ }
133
+ }, [input.value]);
134
+
129
135
  return _react2.default.createElement(
130
136
  "div",
131
137
  {
@@ -70,6 +70,12 @@ var NumericTemplate = exports.NumericTemplate = function NumericTemplate(props)
70
70
  classForInput = "form-control " + warningClass + customClass,
71
71
  classForDiv = "form-group row " + (divClass ? divClass : "");
72
72
 
73
+ _react2.default.useEffect(function () {
74
+ // if (isValidDate(input.value) || input.value === "") {
75
+ updateValue(input.value);
76
+ // }
77
+ }, [input.value]);
78
+
73
79
  return _react2.default.createElement(
74
80
  "div",
75
81
  { className: (0, _classnames2.default)(classForDiv, {
@@ -16,7 +16,7 @@ var up = 3;
16
16
  var
17
17
  // in LEI 16.01.2019
18
18
  // in LEI 15.03.2022
19
- pricePerMonth = exports.pricePerMonth = 14.99,
19
+ pricePerMonth = exports.pricePerMonth = 24.99,
20
20
  getPrice = exports.getPrice = function getPrice(months) {
21
21
  return parseFloat(new _big2.default(months).times(new _big2.default(pricePerMonth)).round(0, up));
22
22
  };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.1.18",
2
+ "version": "5.1.21",
3
3
  "name": "x25",
4
4
  "description": "x25",
5
5
  "scripts": {
@@ -142,4 +142,4 @@
142
142
  "reselect": "^4.0.0",
143
143
  "superagent": "^5.1.1"
144
144
  }
145
- }
145
+ }