x25 5.1.21 → 5.1.23

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/Header/util.js CHANGED
@@ -45,14 +45,18 @@ var getDefaultCompanyRoute = exports.getDefaultCompanyRoute = function getDefaul
45
45
  parts = modules.split(",");
46
46
 
47
47
  if (modules === "") {
48
- return "info";
48
+ return ID + "/info";
49
49
  }
50
50
 
51
51
  var _parts = _slicedToArray(parts, 1),
52
52
  first = _parts[0];
53
53
 
54
- return first + "/list";
54
+ if (first === "auto") {
55
+ return "auto/" + ID;
56
+ }
57
+
58
+ return ID + "/" + first + "/list";
55
59
  };
56
60
 
57
- return "/company/" + ID + "/" + getModule();
61
+ return "/company/" + getModule();
58
62
  };
@@ -46,7 +46,14 @@ var NumericInput = exports.NumericInput = function NumericInput(props) {
46
46
  valueToShow = formatValue(value, props.optional),
47
47
  updateValue = function updateValue(targetValue) {
48
48
  setValue(targetValue);
49
- props.input.onChange((0, _common.getFloatValueToStore)(targetValue));
49
+
50
+ var valueToStore = targetValue;
51
+
52
+ if ((0, _common.isFloat)(targetValue)) {
53
+ valueToStore = (0, _common.getFloatValueToStore)(targetValue);
54
+ }
55
+
56
+ input.onChange(valueToStore);
50
57
  },
51
58
  handleBlur = function handleBlur() {
52
59
  var newValue = (0, _common.clearFloatOnBlur)(value),
@@ -50,7 +50,14 @@ var NumericTemplate = exports.NumericTemplate = function NumericTemplate(props)
50
50
  valueToShow = formatValue(value, props.optional),
51
51
  updateValue = function updateValue(targetValue) {
52
52
  setValue(targetValue);
53
- props.input.onChange((0, _common.getFloatValueToStore)(targetValue));
53
+
54
+ var valueToStore = targetValue;
55
+
56
+ if ((0, _common.isFloat)(targetValue)) {
57
+ valueToStore = (0, _common.getFloatValueToStore)(targetValue);
58
+ }
59
+
60
+ input.onChange(valueToStore);
54
61
  },
55
62
  handleBlur = function handleBlur() {
56
63
  var newValue = (0, _common.clearFloatOnBlur)(value),
@@ -104,7 +111,7 @@ var NumericTemplate = exports.NumericTemplate = function NumericTemplate(props)
104
111
  ref: onRegisterRef,
105
112
  tabIndex: tabIndex,
106
113
  type: type,
107
- value: formatValue(valueToShow, props.optional)
114
+ value: valueToShow
108
115
  }),
109
116
  _react2.default.createElement(
110
117
  "div",
package/Inputs/common.js CHANGED
@@ -8,19 +8,19 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = [
8
8
 
9
9
  /* eslint-disable require-unicode-regexp */
10
10
 
11
- var isFloat = function isFloat(raw) {
12
- var floatRegex = /^-?\d+(?:[.]\d*?)?$/;
13
-
14
- return floatRegex.test(raw);
15
- },
16
- floatToEnglishComma = function floatToEnglishComma(raw) {
11
+ var floatToEnglishComma = function floatToEnglishComma(raw) {
17
12
  return String(raw).replace(",", ".");
18
13
  },
19
14
  floatToLocalComma = function floatToLocalComma(raw) {
20
15
  return String(raw).replace(".", ",");
21
16
  };
22
17
 
23
- var getFloatValueToStore = exports.getFloatValueToStore = function getFloatValueToStore(raw) {
18
+ var isFloat = exports.isFloat = function isFloat(raw) {
19
+ var floatRegex = /^-?\d+(?:[.]\d*?)?$/;
20
+
21
+ return floatRegex.test(raw);
22
+ },
23
+ getFloatValueToStore = exports.getFloatValueToStore = function getFloatValueToStore(raw) {
24
24
  var parsedFloat = floatToEnglishComma(raw),
25
25
  parsedValue = parseFloat(parsedFloat),
26
26
  canGetNumericValue = isFloat(parsedFloat) && !isNaN(parsedValue);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.1.21",
2
+ "version": "5.1.23",
3
3
  "name": "x25",
4
4
  "description": "x25",
5
5
  "scripts": {
@@ -135,7 +135,7 @@
135
135
  "react-router-dom": "^5.1.2",
136
136
  "react-select": "^3.0.8",
137
137
  "react-sidebar": "^3.0.2",
138
- "reactstrap": "^9.0.1",
138
+ "reactstrap": "^9.1.4",
139
139
  "redux": "^4.0.4",
140
140
  "redux-form": "^8.2.5",
141
141
  "redux-injector": "^0.1.0",