x25 5.1.20 → 5.1.22
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 +7 -3
- package/Inputs/DateInput.js +1 -1
- package/Inputs/NumericTemplate.js +6 -0
- package/Inputs/common.js +7 -7
- package/package.json +1 -1
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
|
-
|
|
54
|
+
if (first === "auto") {
|
|
55
|
+
return "auto/" + ID;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return ID + "/" + first + "/list";
|
|
55
59
|
};
|
|
56
60
|
|
|
57
|
-
return "/company/" +
|
|
61
|
+
return "/company/" + getModule();
|
|
58
62
|
};
|
package/Inputs/DateInput.js
CHANGED
|
@@ -124,7 +124,7 @@ var DateInput = exports.DateInput = function DateInput(props) {
|
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
_react2.default.useEffect(function () {
|
|
127
|
-
if ((0, _validation.isValidDate)(input.value)) {
|
|
127
|
+
if ((0, _validation.isValidDate)(input.value) || input.value === "") {
|
|
128
128
|
updateValue(input.value);
|
|
129
129
|
}
|
|
130
130
|
}, [input.value]);
|
|
@@ -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, {
|
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
|
|
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
|
|
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