@synerise/ds-factors 0.15.9 → 0.15.11
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 +20 -0
- package/dist/FactorValue/Text/Text.js +22 -27
- package/dist/Factors.types.d.ts +1 -1
- package/package.json +10 -10
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.15.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.15.10...@synerise/ds-factors@0.15.11) (2022-11-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **factors:** remove AutoResizeInput, add logic to input, Autocomplete ([f105af7](https://github.com/Synerise/synerise-design/commit/f105af7746300b87b9e21d24589467c6f08c39fa))
|
|
12
|
+
* **factors:** remove suffix icon in default input ([f360b51](https://github.com/Synerise/synerise-design/commit/f360b51c1781e681021ee8ea9f0c0930ec26eb2f))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [0.15.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.15.9...@synerise/ds-factors@0.15.10) (2022-11-08)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @synerise/ds-factors
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [0.15.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.15.8...@synerise/ds-factors@0.15.9) (2022-10-24)
|
|
7
27
|
|
|
8
28
|
**Note:** Version bump only for package @synerise/ds-factors
|
|
@@ -3,8 +3,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import Icon, { FullScreenM } from '@synerise/ds-icon';
|
|
5
5
|
import theme from '@synerise/ds-core/dist/js/DSProvider/ThemeProvider/theme';
|
|
6
|
-
import Autocomplete from '@synerise/ds-autocomplete';
|
|
7
|
-
|
|
6
|
+
import Autocomplete from '@synerise/ds-autocomplete'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
|
|
9
|
+
import { Input } from '@synerise/ds-input';
|
|
8
10
|
import { useState } from 'react';
|
|
9
11
|
import { debounce } from 'lodash';
|
|
10
12
|
import * as S from './Text.styles';
|
|
@@ -47,16 +49,6 @@ var TextInput = function TextInput(_ref) {
|
|
|
47
49
|
React.useEffect(function () {
|
|
48
50
|
setLocalValue(value);
|
|
49
51
|
}, [value]);
|
|
50
|
-
var SuffixIcon = React.useMemo(function () {
|
|
51
|
-
return factorType === 'text' && textType === 'expansible' ? /*#__PURE__*/React.createElement(S.IconWrapper, {
|
|
52
|
-
onClick: function onClick() {
|
|
53
|
-
return setOpenExpanseEditor(true);
|
|
54
|
-
}
|
|
55
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
56
|
-
component: /*#__PURE__*/React.createElement(FullScreenM, null),
|
|
57
|
-
color: theme.palette['grey-600']
|
|
58
|
-
})) : null;
|
|
59
|
-
}, [textType, factorType]);
|
|
60
52
|
var handleChange = React.useCallback(function (event) {
|
|
61
53
|
setLocalValue(event.target.value);
|
|
62
54
|
onChangeDebounce(event.target.value);
|
|
@@ -85,7 +77,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
85
77
|
|
|
86
78
|
var renderInput = function renderInput(typesOfInput, factorsType) {
|
|
87
79
|
if (typesOfInput === 'autocomplete' && factorsType === 'text') {
|
|
88
|
-
return /*#__PURE__*/React.createElement(Autocomplete, {
|
|
80
|
+
return /*#__PURE__*/React.createElement(Autocomplete, _extends({}, inputProps, {
|
|
89
81
|
placeholder: texts.valuePlaceholder,
|
|
90
82
|
value: localValue,
|
|
91
83
|
onChange: handleAutocomplete,
|
|
@@ -93,7 +85,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
93
85
|
error: localError || error,
|
|
94
86
|
handleInputRef: setInputRef,
|
|
95
87
|
defaultOpen: true
|
|
96
|
-
}, autocompleteOptions == null ? void 0 : autocompleteOptions.map(function (option) {
|
|
88
|
+
}), autocompleteOptions == null ? void 0 : autocompleteOptions.map(function (option) {
|
|
97
89
|
return /*#__PURE__*/React.createElement(Autocomplete.Option, {
|
|
98
90
|
key: option,
|
|
99
91
|
value: option
|
|
@@ -105,7 +97,6 @@ var TextInput = function TextInput(_ref) {
|
|
|
105
97
|
return /*#__PURE__*/React.createElement(S.InputWrapper, null, /*#__PURE__*/React.createElement(Input, _extends({}, inputProps, {
|
|
106
98
|
handleInputRef: setInputRef,
|
|
107
99
|
placeholder: texts.valuePlaceholder,
|
|
108
|
-
suffix: SuffixIcon,
|
|
109
100
|
value: localValue,
|
|
110
101
|
onChange: handleChange,
|
|
111
102
|
onBlur: onDeactivate,
|
|
@@ -113,18 +104,22 @@ var TextInput = function TextInput(_ref) {
|
|
|
113
104
|
})));
|
|
114
105
|
}
|
|
115
106
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
107
|
+
return /*#__PURE__*/React.createElement(S.InputWrapper, null, /*#__PURE__*/React.createElement(Input, _extends({}, inputProps, {
|
|
108
|
+
handleInputRef: setInputRef,
|
|
109
|
+
placeholder: texts.valuePlaceholder,
|
|
110
|
+
icon1: /*#__PURE__*/React.createElement(S.IconWrapper, {
|
|
111
|
+
onClick: function onClick() {
|
|
112
|
+
return setOpenExpanseEditor(true);
|
|
113
|
+
}
|
|
114
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
115
|
+
component: /*#__PURE__*/React.createElement(FullScreenM, null),
|
|
116
|
+
color: theme.palette['grey-600']
|
|
117
|
+
})),
|
|
118
|
+
value: localValue,
|
|
119
|
+
onChange: handleChange,
|
|
120
|
+
onBlur: onDeactivate,
|
|
121
|
+
error: localError || error
|
|
122
|
+
})));
|
|
128
123
|
};
|
|
129
124
|
|
|
130
125
|
return /*#__PURE__*/React.createElement(S.TextWrapper, null, renderInput(textType, factorType), /*#__PURE__*/React.createElement(TextModal, {
|
package/dist/Factors.types.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export declare type FactorsProps = {
|
|
|
83
83
|
onDeactivate?: () => void;
|
|
84
84
|
onChangeValue: (value: FactorValueType) => void;
|
|
85
85
|
value: FactorValueType;
|
|
86
|
-
textType?: 'autocomplete' | 'expansible' | 'default' |
|
|
86
|
+
textType?: 'autocomplete' | 'expansible' | 'default' | string;
|
|
87
87
|
autoResize?: boolean | {
|
|
88
88
|
minWidth: string;
|
|
89
89
|
maxWidth: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-factors",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.11",
|
|
4
4
|
"description": "Factors UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-autocomplete": "^0.4.
|
|
35
|
+
"@synerise/ds-autocomplete": "^0.4.30",
|
|
36
36
|
"@synerise/ds-badge": "^0.6.19",
|
|
37
37
|
"@synerise/ds-button": "^0.17.9",
|
|
38
|
-
"@synerise/ds-date-picker": "^0.7.
|
|
39
|
-
"@synerise/ds-date-range-picker": "^0.18.
|
|
40
|
-
"@synerise/ds-dropdown": "^0.17.
|
|
38
|
+
"@synerise/ds-date-picker": "^0.7.1",
|
|
39
|
+
"@synerise/ds-date-range-picker": "^0.18.1",
|
|
40
|
+
"@synerise/ds-dropdown": "^0.17.42",
|
|
41
41
|
"@synerise/ds-icon": "^0.51.0",
|
|
42
|
-
"@synerise/ds-information-card": "^0.1.
|
|
43
|
-
"@synerise/ds-inline-edit": "^0.6.
|
|
44
|
-
"@synerise/ds-input": "^0.18.
|
|
42
|
+
"@synerise/ds-information-card": "^0.1.28",
|
|
43
|
+
"@synerise/ds-inline-edit": "^0.6.38",
|
|
44
|
+
"@synerise/ds-input": "^0.18.25",
|
|
45
45
|
"@synerise/ds-input-number": "^0.6.26",
|
|
46
46
|
"@synerise/ds-menu": "^0.16.0",
|
|
47
47
|
"@synerise/ds-modal": "^0.16.7",
|
|
48
48
|
"@synerise/ds-result": "^0.6.16",
|
|
49
|
-
"@synerise/ds-tabs": "^0.13.
|
|
49
|
+
"@synerise/ds-tabs": "^0.13.37",
|
|
50
50
|
"@synerise/ds-typography": "^0.12.7",
|
|
51
51
|
"@synerise/ds-utils": "^0.19.0",
|
|
52
52
|
"classnames": "^2.2.6",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"@synerise/ds-core": "*",
|
|
57
57
|
"react": ">=16.9.0 < 17.0.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "c1fdb8f769bf8c3a529d877a6bd9942a380c3e17"
|
|
60
60
|
}
|