@synerise/ds-factors 0.28.5 → 0.28.7

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/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.28.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.28.6...@synerise/ds-factors@0.28.7) (2025-02-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **factors:** dynamic key and number typing glitch ([9ba57b7](https://github.com/Synerise/synerise-design/commit/9ba57b79900d7a77c52d3b13e8a1e4ef0ce1cad1))
12
+ * autosizer fixes ([2c09f50](https://github.com/Synerise/synerise-design/commit/2c09f50c4545e8246f5b4ccfc1b8282c8fa647fd))
13
+
14
+
15
+
16
+
17
+
18
+ ## [0.28.6](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.28.5...@synerise/ds-factors@0.28.6) (2025-02-17)
19
+
20
+ **Note:** Version bump only for package @synerise/ds-factors
21
+
22
+
23
+
24
+
25
+
6
26
  ## [0.28.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.28.4...@synerise/ds-factors@0.28.5) (2025-02-14)
7
27
 
8
28
  **Note:** Version bump only for package @synerise/ds-factors
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { InputProps } from '../../Factors.types';
3
- declare const DynamicKey: React.FC<InputProps>;
3
+ declare const DynamicKey: ({ value, onChange, withoutTypeSelector, texts, opened, onDeactivate, error, readOnly, }: InputProps) => React.JSX.Element;
4
4
  export default DynamicKey;
@@ -1,5 +1,5 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
2
- import React from 'react';
2
+ import React, { useEffect, useRef, useState } from 'react';
3
3
  import { RawInput } from '@synerise/ds-input';
4
4
  import { debounce } from 'lodash';
5
5
  import * as S from './DynamicKey.style';
@@ -14,17 +14,17 @@ var DynamicKey = function DynamicKey(_ref) {
14
14
  error = _ref.error,
15
15
  _ref$readOnly = _ref.readOnly,
16
16
  readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly;
17
- var _React$useState = React.useState({
17
+ var _useState = useState({
18
18
  key: value.key,
19
19
  value: value.value
20
20
  }),
21
- localValue = _React$useState[0],
22
- setLocalValue = _React$useState[1];
23
- var _React$useState2 = React.useState(false),
24
- localError = _React$useState2[0],
25
- setLocalError = _React$useState2[1];
26
- var onChangeRef = React.useRef(onChange);
27
- var debouncedOnChange = React.useRef(debounce(function (inputValue) {
21
+ localValue = _useState[0],
22
+ setLocalValue = _useState[1];
23
+ var _useState2 = useState(false),
24
+ localError = _useState2[0],
25
+ setLocalError = _useState2[1];
26
+ var onChangeRef = useRef(onChange);
27
+ var debouncedOnChange = useRef(debounce(function (inputValue) {
28
28
  onChangeRef.current && onChangeRef.current(inputValue);
29
29
  }, 300)).current;
30
30
  var handleChange = function handleChange(event) {
@@ -38,13 +38,10 @@ var DynamicKey = function DynamicKey(_ref) {
38
38
  setLocalError(false);
39
39
  }
40
40
  };
41
- React.useEffect(function () {
41
+ useEffect(function () {
42
42
  onChangeRef.current = onChange;
43
43
  }, [localValue, onChange]);
44
- React.useEffect(function () {
45
- setLocalValue(value);
46
- }, [value]);
47
- React.useEffect(function () {
44
+ useEffect(function () {
48
45
  return function () {
49
46
  debouncedOnChange.cancel();
50
47
  };
@@ -17,9 +17,6 @@ var NumberInput = function NumberInput(_ref) {
17
17
  useEffect(function () {
18
18
  onChangeRef.current = onChange;
19
19
  }, [localValue, onChange]);
20
- useEffect(function () {
21
- setLocalValue(value);
22
- }, [value]);
23
20
  var debouncedOnChange = useRef(debounce(function (inputValue) {
24
21
  onChangeRef.current && onChangeRef.current(inputValue);
25
22
  }, 300)).current;
@@ -39,9 +39,6 @@ var TextInput = function TextInput(_ref) {
39
39
  inputRef.current.focus();
40
40
  }
41
41
  }, [inputRef, opened]);
42
- useEffect(function () {
43
- setLocalValue(value);
44
- }, [value]);
45
42
  useEffect(function () {
46
43
  onChangeRef.current = onChange;
47
44
  }, [localValue, onChange]);
@@ -12,7 +12,7 @@ export var IconWrapper = styled.span.withConfig({
12
12
  export var InputWrapper = styled.div.withConfig({
13
13
  displayName: "Textstyles__InputWrapper",
14
14
  componentId: "rjr8p0-1"
15
- })(["&{position:relative;display:flex;> *{min-width:0;}input{padding:0;&:before{display:none;}input{max-height:30px;}}}"]);
15
+ })(["&{position:relative;display:flex;> *{min-width:0;}}"]);
16
16
  export var TextWrapper = styled.div.withConfig({
17
17
  displayName: "Textstyles__TextWrapper",
18
18
  componentId: "rjr8p0-2"
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { default, factorTypes } from './Factors';
2
2
  export { ALL_FACTOR_TYPES } from './Factors.types';
3
- export type { FactorsProps, ParameterValueType, ParameterItem, ParameterGroup, InputProps, FactorType, FactorValueType, DynamicKeyValueType, } from './Factors.types';
3
+ export type { FactorType, DefinedFactorTypes, FactorsProps, FactorsTexts, ParameterValueType, ParameterItem, ParameterGroup, InputProps, FactorValueType, FactorValueProps, DynamicKeyValueType, FormulaValueType, FactorTypeSelectorProps, FormulaModalProps, TextModalProps, ParameterDropdownProps, SelectedFactorType, } from './Factors.types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-factors",
3
- "version": "0.28.5",
3
+ "version": "0.28.7",
4
4
  "description": "Factors UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,25 +34,25 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-autocomplete": "^0.9.3",
38
- "@synerise/ds-badge": "^0.9.2",
37
+ "@synerise/ds-autocomplete": "^0.9.5",
38
+ "@synerise/ds-badge": "^0.9.4",
39
39
  "@synerise/ds-button": "^0.23.1",
40
- "@synerise/ds-date-picker": "^0.14.3",
41
- "@synerise/ds-date-range-picker": "^0.32.5",
42
- "@synerise/ds-dropdown": "^0.19.3",
40
+ "@synerise/ds-date-picker": "^0.14.5",
41
+ "@synerise/ds-date-range-picker": "^0.32.7",
42
+ "@synerise/ds-dropdown": "^0.19.5",
43
43
  "@synerise/ds-icon": "^0.71.1",
44
- "@synerise/ds-information-card": "^0.8.4",
45
- "@synerise/ds-inline-edit": "^0.10.4",
46
- "@synerise/ds-input": "^0.25.3",
47
- "@synerise/ds-input-number": "^0.11.4",
48
- "@synerise/ds-list-item": "^0.7.2",
49
- "@synerise/ds-menu": "^0.21.3",
50
- "@synerise/ds-modal": "^0.18.2",
51
- "@synerise/ds-result": "^0.8.2",
52
- "@synerise/ds-scrollbar": "^0.12.2",
53
- "@synerise/ds-skeleton": "^0.7.2",
54
- "@synerise/ds-tabs": "^0.18.4",
55
- "@synerise/ds-tooltip": "^0.15.2",
44
+ "@synerise/ds-information-card": "^0.8.6",
45
+ "@synerise/ds-inline-edit": "^0.10.6",
46
+ "@synerise/ds-input": "^0.25.5",
47
+ "@synerise/ds-input-number": "^0.11.6",
48
+ "@synerise/ds-list-item": "^0.7.4",
49
+ "@synerise/ds-menu": "^0.21.5",
50
+ "@synerise/ds-modal": "^0.18.4",
51
+ "@synerise/ds-result": "^0.8.4",
52
+ "@synerise/ds-scrollbar": "^0.12.4",
53
+ "@synerise/ds-skeleton": "^0.7.4",
54
+ "@synerise/ds-tabs": "^0.18.6",
55
+ "@synerise/ds-tooltip": "^0.16.0",
56
56
  "@synerise/ds-utils": "^0.32.1",
57
57
  "lodash": "^4.17.21",
58
58
  "react-window": "1.8.5",
@@ -65,5 +65,5 @@
65
65
  "react-intl": ">=3.12.0 <= 6.8",
66
66
  "styled-components": "^5.3.3"
67
67
  },
68
- "gitHead": "f03bc22383f0ac3f0b1bde9f80ce190ae49badd1"
68
+ "gitHead": "b04de7b0a6e3d2883275c38c38211d3876328706"
69
69
  }