@symply.io/basic-components 1.5.5-alpha.7 → 1.5.5

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.
@@ -3,7 +3,6 @@ function useInteractions(props) {
3
3
  var value = props.value, _a = props.decimals, decimals = _a === void 0 ? 0 : _a, integerOnly = props.integerOnly, _b = props.minValue, minValue = _b === void 0 ? Number.MIN_SAFE_INTEGER : _b, _c = props.maxValue, maxValue = _c === void 0 ? Number.MAX_SAFE_INTEGER : _c, onChange = props.onChange;
4
4
  var _d = useState(false), tooltipOpen = _d[0], setTooltipOpen = _d[1];
5
5
  var _e = useState(false), typing = _e[0], setTyping = _e[1];
6
- var _f = useState(0), cursorIndex = _f[0], setCursorIndex = _f[1];
7
6
  var roundedValue = useMemo(function () {
8
7
  if (value === null || value === undefined) {
9
8
  return "";
@@ -46,13 +45,7 @@ function useInteractions(props) {
46
45
  var selectionStart = currentTarget.selectionStart;
47
46
  var decimalPointIndex = String(value).lastIndexOf(".");
48
47
  var decimalStrLen = String(value).split(".")[1].length;
49
- console.log({
50
- cursorIndex: cursorIndex,
51
- decimalPointIndex: decimalPointIndex,
52
- decimalStrLen: decimalStrLen,
53
- selectionStart: selectionStart
54
- });
55
- if (selectionStart && decimalPointIndex <= selectionStart) {
48
+ if (selectionStart && decimalPointIndex < selectionStart) {
56
49
  if (![
57
50
  "Backspace",
58
51
  "ArrowUp",
@@ -66,7 +59,7 @@ function useInteractions(props) {
66
59
  }
67
60
  }
68
61
  }
69
- }, [value, minValue, cursorIndex, integerOnly]);
62
+ }, [value, minValue, integerOnly]);
70
63
  var handleChange = useCallback(function (event) {
71
64
  event.preventDefault();
72
65
  var val = event.currentTarget.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.5.5-alpha.7",
3
+ "version": "1.5.5",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",