@commercetools-uikit/localized-multiline-text-field 19.1.0 → 19.3.0
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/README.md +3 -1
- package/dist/commercetools-uikit-localized-multiline-text-field.cjs.dev.js +8 -5
- package/dist/commercetools-uikit-localized-multiline-text-field.cjs.prod.js +5 -2
- package/dist/commercetools-uikit-localized-multiline-text-field.esm.js +8 -5
- package/dist/declarations/src/localized-multiline-text-field.d.ts +3 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -67,10 +67,12 @@ export default Example;
|
|
|
67
67
|
| `selectedLanguage` | `string` | ✅ | | Specifies which language will be shown in case the `LocalizedTextInput` is collapsed. |
|
|
68
68
|
| `onBlur` | `FocusEventHandler` | | | Called when input is blurred |
|
|
69
69
|
| `onFocus` | `Function`<br/>[See signature.](#signature-onFocus) | | | Called when input is focused |
|
|
70
|
-
| `defaultExpandMultilineText` | `boolean` | | | Expands input components holding multiline values instead of
|
|
70
|
+
| `defaultExpandMultilineText` | `boolean` | | | Expands input components holding multiline values instead of collapsing them by default. |
|
|
71
|
+
| `cacheMeasurements` | `boolean` | | `true` | Use this property to turn off caching input measurements. |
|
|
71
72
|
| `hideLanguageExpansionControls` | `boolean` | | | Will hide the language expansion controls when set to `true`. All languages will be shown when set to `true`. |
|
|
72
73
|
| `defaultExpandLanguages` | `boolean` | | | Controls whether one or all languages are visible by default. Pass `true` to show all languages by default. |
|
|
73
74
|
| `isAutofocussed` | `boolean` | | | Sets the focus on the first input when `true` is passed. |
|
|
75
|
+
| `isCondensed` | `boolean` | | | Whether the text inputs for each localization should render with condensed paddings. |
|
|
74
76
|
| `isDisabled` | `boolean` | | | Disables all input fields. |
|
|
75
77
|
| `isReadOnly` | `boolean` | | | Disables all input fields and shows them in read-only mode. |
|
|
76
78
|
| `placeholder` | `Object`<br/>[See signature.](#signature-placeholder) | | | Placeholders for each language. Object of the same shape as `value`. |
|
|
@@ -119,6 +119,8 @@ let LocalizedMultilineTextField = /*#__PURE__*/function (_Component) {
|
|
|
119
119
|
hideLanguageExpansionControls: this.props.hideLanguageExpansionControls,
|
|
120
120
|
defaultExpandLanguages: this.props.defaultExpandLanguages,
|
|
121
121
|
isAutofocussed: this.props.isAutofocussed,
|
|
122
|
+
cacheMeasurements: this.props.cacheMeasurements,
|
|
123
|
+
isCondensed: this.props.isCondensed,
|
|
122
124
|
isDisabled: this.props.isDisabled,
|
|
123
125
|
isReadOnly: this.props.isReadOnly,
|
|
124
126
|
errors: this.props.errorsByLanguage,
|
|
@@ -161,7 +163,8 @@ let LocalizedMultilineTextField = /*#__PURE__*/function (_Component) {
|
|
|
161
163
|
}(react.Component);
|
|
162
164
|
LocalizedMultilineTextField.displayName = 'LocalizedMultilineTextField';
|
|
163
165
|
LocalizedMultilineTextField.defaultProps = {
|
|
164
|
-
horizontalConstraint: 'scale'
|
|
166
|
+
horizontalConstraint: 'scale',
|
|
167
|
+
cacheMeasurements: true
|
|
165
168
|
};
|
|
166
169
|
LocalizedMultilineTextField.getDerivedStateFromProps = (props, state) => ({
|
|
167
170
|
id: utils.getFieldId(props, state, sequentialId)
|
|
@@ -186,19 +189,19 @@ LocalizedMultilineTextField.propTypes = process.env.NODE_ENV !== "production" ?
|
|
|
186
189
|
onBlur: _pt__default["default"].func,
|
|
187
190
|
onFocus: _pt__default["default"].func,
|
|
188
191
|
defaultExpandMultilineText: _pt__default["default"].bool,
|
|
192
|
+
cacheMeasurements: _pt__default["default"].bool,
|
|
189
193
|
hideLanguageExpansionControls: _pt__default["default"].bool,
|
|
190
194
|
defaultExpandLanguages: _pt__default["default"].bool,
|
|
191
195
|
isAutofocussed: _pt__default["default"].bool,
|
|
196
|
+
isCondensed: _pt__default["default"].bool,
|
|
192
197
|
isDisabled: _pt__default["default"].bool,
|
|
193
198
|
isReadOnly: _pt__default["default"].bool,
|
|
194
|
-
placeholder: _pt__default["default"].objectOf(_pt__default["default"].string)
|
|
195
|
-
errorsByLanguage: _pt__default["default"].objectOf(_pt__default["default"].node),
|
|
196
|
-
title: _pt__default["default"].oneOfType([_pt__default["default"].string, _pt__default["default"].node]).isRequired
|
|
199
|
+
placeholder: _pt__default["default"].objectOf(_pt__default["default"].string)
|
|
197
200
|
} : {};
|
|
198
201
|
var LocalizedMultilineTextField$1 = LocalizedMultilineTextField;
|
|
199
202
|
|
|
200
203
|
// NOTE: This string will be replaced on build time with the package version.
|
|
201
|
-
var version = "19.
|
|
204
|
+
var version = "19.3.0";
|
|
202
205
|
|
|
203
206
|
exports["default"] = LocalizedMultilineTextField$1;
|
|
204
207
|
exports.version = version;
|
|
@@ -114,6 +114,8 @@ let LocalizedMultilineTextField = /*#__PURE__*/function (_Component) {
|
|
|
114
114
|
hideLanguageExpansionControls: this.props.hideLanguageExpansionControls,
|
|
115
115
|
defaultExpandLanguages: this.props.defaultExpandLanguages,
|
|
116
116
|
isAutofocussed: this.props.isAutofocussed,
|
|
117
|
+
cacheMeasurements: this.props.cacheMeasurements,
|
|
118
|
+
isCondensed: this.props.isCondensed,
|
|
117
119
|
isDisabled: this.props.isDisabled,
|
|
118
120
|
isReadOnly: this.props.isReadOnly,
|
|
119
121
|
errors: this.props.errorsByLanguage,
|
|
@@ -156,7 +158,8 @@ let LocalizedMultilineTextField = /*#__PURE__*/function (_Component) {
|
|
|
156
158
|
}(react.Component);
|
|
157
159
|
LocalizedMultilineTextField.displayName = 'LocalizedMultilineTextField';
|
|
158
160
|
LocalizedMultilineTextField.defaultProps = {
|
|
159
|
-
horizontalConstraint: 'scale'
|
|
161
|
+
horizontalConstraint: 'scale',
|
|
162
|
+
cacheMeasurements: true
|
|
160
163
|
};
|
|
161
164
|
LocalizedMultilineTextField.getDerivedStateFromProps = (props, state) => ({
|
|
162
165
|
id: utils.getFieldId(props, state, sequentialId)
|
|
@@ -165,7 +168,7 @@ LocalizedMultilineTextField.propTypes = {};
|
|
|
165
168
|
var LocalizedMultilineTextField$1 = LocalizedMultilineTextField;
|
|
166
169
|
|
|
167
170
|
// NOTE: This string will be replaced on build time with the package version.
|
|
168
|
-
var version = "19.
|
|
171
|
+
var version = "19.3.0";
|
|
169
172
|
|
|
170
173
|
exports["default"] = LocalizedMultilineTextField$1;
|
|
171
174
|
exports.version = version;
|
|
@@ -94,6 +94,8 @@ let LocalizedMultilineTextField = /*#__PURE__*/function (_Component) {
|
|
|
94
94
|
hideLanguageExpansionControls: this.props.hideLanguageExpansionControls,
|
|
95
95
|
defaultExpandLanguages: this.props.defaultExpandLanguages,
|
|
96
96
|
isAutofocussed: this.props.isAutofocussed,
|
|
97
|
+
cacheMeasurements: this.props.cacheMeasurements,
|
|
98
|
+
isCondensed: this.props.isCondensed,
|
|
97
99
|
isDisabled: this.props.isDisabled,
|
|
98
100
|
isReadOnly: this.props.isReadOnly,
|
|
99
101
|
errors: this.props.errorsByLanguage,
|
|
@@ -136,7 +138,8 @@ let LocalizedMultilineTextField = /*#__PURE__*/function (_Component) {
|
|
|
136
138
|
}(Component);
|
|
137
139
|
LocalizedMultilineTextField.displayName = 'LocalizedMultilineTextField';
|
|
138
140
|
LocalizedMultilineTextField.defaultProps = {
|
|
139
|
-
horizontalConstraint: 'scale'
|
|
141
|
+
horizontalConstraint: 'scale',
|
|
142
|
+
cacheMeasurements: true
|
|
140
143
|
};
|
|
141
144
|
LocalizedMultilineTextField.getDerivedStateFromProps = (props, state) => ({
|
|
142
145
|
id: getFieldId(props, state, sequentialId)
|
|
@@ -161,18 +164,18 @@ LocalizedMultilineTextField.propTypes = process.env.NODE_ENV !== "production" ?
|
|
|
161
164
|
onBlur: _pt.func,
|
|
162
165
|
onFocus: _pt.func,
|
|
163
166
|
defaultExpandMultilineText: _pt.bool,
|
|
167
|
+
cacheMeasurements: _pt.bool,
|
|
164
168
|
hideLanguageExpansionControls: _pt.bool,
|
|
165
169
|
defaultExpandLanguages: _pt.bool,
|
|
166
170
|
isAutofocussed: _pt.bool,
|
|
171
|
+
isCondensed: _pt.bool,
|
|
167
172
|
isDisabled: _pt.bool,
|
|
168
173
|
isReadOnly: _pt.bool,
|
|
169
|
-
placeholder: _pt.objectOf(_pt.string)
|
|
170
|
-
errorsByLanguage: _pt.objectOf(_pt.node),
|
|
171
|
-
title: _pt.oneOfType([_pt.string, _pt.node]).isRequired
|
|
174
|
+
placeholder: _pt.objectOf(_pt.string)
|
|
172
175
|
} : {};
|
|
173
176
|
var LocalizedMultilineTextField$1 = LocalizedMultilineTextField;
|
|
174
177
|
|
|
175
178
|
// NOTE: This string will be replaced on build time with the package version.
|
|
176
|
-
var version = "19.
|
|
179
|
+
var version = "19.3.0";
|
|
177
180
|
|
|
178
181
|
export { LocalizedMultilineTextField$1 as default, version };
|
|
@@ -31,9 +31,11 @@ export type TLocalizedMultilineTextFieldProps = {
|
|
|
31
31
|
onBlur?: FocusEventHandler<HTMLLocalizedTextAreaElement>;
|
|
32
32
|
onFocus?: () => void;
|
|
33
33
|
defaultExpandMultilineText?: boolean;
|
|
34
|
+
cacheMeasurements?: boolean;
|
|
34
35
|
hideLanguageExpansionControls?: boolean;
|
|
35
36
|
defaultExpandLanguages?: boolean;
|
|
36
37
|
isAutofocussed?: boolean;
|
|
38
|
+
isCondensed?: boolean;
|
|
37
39
|
isDisabled?: boolean;
|
|
38
40
|
isReadOnly?: boolean;
|
|
39
41
|
placeholder?: {
|
|
@@ -52,7 +54,7 @@ export type TLocalizedMultilineTextFieldProps = {
|
|
|
52
54
|
type TLocalizedMultilineTextFieldState = Pick<TLocalizedMultilineTextFieldProps, 'id'>;
|
|
53
55
|
declare class LocalizedMultilineTextField extends Component<TLocalizedMultilineTextFieldProps, TLocalizedMultilineTextFieldState> {
|
|
54
56
|
static displayName: string;
|
|
55
|
-
static defaultProps: Pick<TLocalizedMultilineTextFieldProps, 'horizontalConstraint'>;
|
|
57
|
+
static defaultProps: Pick<TLocalizedMultilineTextFieldProps, 'horizontalConstraint' | 'cacheMeasurements'>;
|
|
56
58
|
state: {
|
|
57
59
|
id: string | undefined;
|
|
58
60
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/localized-multiline-text-field",
|
|
3
3
|
"description": "A controlled text input component for localized multi-line strings with validation states.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.3.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/constraints": "19.
|
|
25
|
-
"@commercetools-uikit/design-system": "19.
|
|
26
|
-
"@commercetools-uikit/field-errors": "19.
|
|
27
|
-
"@commercetools-uikit/field-label": "19.
|
|
28
|
-
"@commercetools-uikit/field-warnings": "19.
|
|
29
|
-
"@commercetools-uikit/localized-multiline-text-input": "19.
|
|
30
|
-
"@commercetools-uikit/spacings": "19.
|
|
31
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/constraints": "19.3.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.3.0",
|
|
26
|
+
"@commercetools-uikit/field-errors": "19.3.0",
|
|
27
|
+
"@commercetools-uikit/field-label": "19.3.0",
|
|
28
|
+
"@commercetools-uikit/field-warnings": "19.3.0",
|
|
29
|
+
"@commercetools-uikit/localized-multiline-text-input": "19.3.0",
|
|
30
|
+
"@commercetools-uikit/spacings": "19.3.0",
|
|
31
|
+
"@commercetools-uikit/utils": "19.3.0",
|
|
32
32
|
"@emotion/react": "^11.10.5",
|
|
33
33
|
"@emotion/styled": "^11.10.5",
|
|
34
34
|
"prop-types": "15.8.1",
|