diginet-core-ui 1.4.56-beta.2 → 1.4.56-beta.3

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.
@@ -425,7 +425,6 @@ const Dropdown = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference)
425
425
  data,
426
426
  index
427
427
  }) : jsx(Typography, {
428
- lineClamp: 1,
429
428
  type: 'p1'
430
429
  }, displayText);
431
430
  if (multiple && selectBox) {
@@ -169,11 +169,13 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
169
169
  return number;
170
170
  }, [decimalSymbol]);
171
171
  const _onInput = useCallback((e, flag) => {
172
- var _e$target$value, _valueT$toString$repl, _valueT$toString$repl2, _valueT$toString$repl3, _valueT$toString$repl4, _valueT$toString$repl5, _valueT$toString$repl6;
172
+ var _e$target$value, _limitValueT$toString, _limitValueT$toString2, _limitValueT$toString3, _limitValueT$toString4, _limitValueT$toString5, _limitValueT$toString6;
173
173
  let valueT = (_e$target$value = e.target.value) !== null && _e$target$value !== void 0 ? _e$target$value : e.value;
174
- if (disabledNegative && eval(((_valueT$toString$repl = (_valueT$toString$repl2 = valueT.toString().replaceAll(thousandSymbol, '')).replaceAll) === null || _valueT$toString$repl === void 0 ? void 0 : _valueT$toString$repl.call(_valueT$toString$repl2, decimalSymbol, '.')) || 0) <= 0 || valueT.includes('-')) valueT = 0;
175
- if ((min || min === 0) && eval((_valueT$toString$repl3 = (_valueT$toString$repl4 = valueT.toString().replaceAll(thousandSymbol, '')).replaceAll) === null || _valueT$toString$repl3 === void 0 ? void 0 : _valueT$toString$repl3.call(_valueT$toString$repl4, decimalSymbol, '.')) <= min || min === 0 && valueT.includes('-')) valueT = min;
176
- if ((max || max === 0) && eval((_valueT$toString$repl5 = (_valueT$toString$repl6 = valueT.toString().replaceAll(thousandSymbol, '')).replaceAll) === null || _valueT$toString$repl5 === void 0 ? void 0 : _valueT$toString$repl5.call(_valueT$toString$repl6, decimalSymbol, '.')) >= max) valueT = max;
174
+ // xóa các số "0" đứng trước giá trị dụ: 0100, 0200 để tránh lỗi Octal literals are not allowed in strict mode
175
+ let limitValueT = valueT.split(/([+\-*/])/).map(a => parseFloat(a) || a).join('');
176
+ if (disabledNegative && eval(((_limitValueT$toString = (_limitValueT$toString2 = limitValueT.toString().replaceAll(thousandSymbol, '')).replaceAll) === null || _limitValueT$toString === void 0 ? void 0 : _limitValueT$toString.call(_limitValueT$toString2, decimalSymbol, '.')) || 0) <= 0 || limitValueT.includes('-')) valueT = 0;
177
+ if ((min || min === 0) && eval((_limitValueT$toString3 = (_limitValueT$toString4 = limitValueT.toString().replaceAll(thousandSymbol, '')).replaceAll) === null || _limitValueT$toString3 === void 0 ? void 0 : _limitValueT$toString3.call(_limitValueT$toString4, decimalSymbol, '.')) <= min || min === 0 && limitValueT.includes('-')) valueT = min;
178
+ if ((max || max === 0) && eval((_limitValueT$toString5 = (_limitValueT$toString6 = limitValueT.toString().replaceAll(thousandSymbol, '')).replaceAll) === null || _limitValueT$toString5 === void 0 ? void 0 : _limitValueT$toString5.call(_limitValueT$toString6, decimalSymbol, '.')) >= max) valueT = max;
177
179
  valueT = parseNumberToMoney(valueT);
178
180
  const returnValue = convertMoneyToNumber(valueT);
179
181
  e.value = globalRef.current.value = !isNaN(parseFloat(returnValue)) ? parseFloat(returnValue) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.4.56-beta.2",
3
+ "version": "1.4.56-beta.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "license": "UNLICENSED",