@reltio/components 1.4.1672 → 1.4.1673
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/cjs/components/editors/TypeaheadEditor/TypeaheadEditor.d.ts +2 -2
- package/cjs/components/editors/TypeaheadEditor/TypeaheadEditor.js +2 -2
- package/esm/components/editors/TypeaheadEditor/TypeaheadEditor.d.ts +2 -2
- package/esm/components/editors/TypeaheadEditor/TypeaheadEditor.js +2 -2
- package/package.json +2 -2
|
@@ -8,12 +8,12 @@ type CommonProps = Omit<TextFieldProps, 'onChange' | 'value'> & {
|
|
|
8
8
|
isCrossedOut?: boolean;
|
|
9
9
|
};
|
|
10
10
|
type MultipleProps = CommonProps & {
|
|
11
|
-
value
|
|
11
|
+
value?: string[];
|
|
12
12
|
onChange: (values: string[]) => void;
|
|
13
13
|
multiple: true;
|
|
14
14
|
};
|
|
15
15
|
type SingleProps = CommonProps & {
|
|
16
|
-
value
|
|
16
|
+
value?: string;
|
|
17
17
|
onChange: (value: string) => void;
|
|
18
18
|
multiple?: false;
|
|
19
19
|
};
|
|
@@ -201,7 +201,7 @@ var TypeaheadEditor = function (_a) {
|
|
|
201
201
|
case ChangeMethod.Enter: {
|
|
202
202
|
if (multiple === true) {
|
|
203
203
|
if (newValue)
|
|
204
|
-
onChange((0, ramda_1.uniq)(__spreadArray(__spreadArray([], value, true), [newValue], false)));
|
|
204
|
+
onChange((0, ramda_1.uniq)(__spreadArray(__spreadArray([], (value || []), true), [newValue], false)));
|
|
205
205
|
setInputValue('');
|
|
206
206
|
}
|
|
207
207
|
else {
|
|
@@ -242,7 +242,7 @@ var TypeaheadEditor = function (_a) {
|
|
|
242
242
|
underline: (0, classnames_1.default)((_b = {}, _b[styles.underline] = (0, mdm_sdk_1.isEmptyValue)(value), _b)),
|
|
243
243
|
input: (0, classnames_1.default)(styles['rawInput'], (0, ramda_1.path)(['classes', 'input'], InputProps))
|
|
244
244
|
};
|
|
245
|
-
return multiple === true ? (react_1.default.createElement(TextField_1.default, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { startAdornment: value.map(function (item, index) { return (react_1.default.createElement(ValueChip_1.default, { key: item, label: item, onDelete: function () { return onChange((0, ramda_1.remove)(index, 1, value)); } })); }), inputComponent: react_input_autosize_1.default, classes: __assign(__assign({ root: (0, classnames_1.default)(styles.multipleTextFieldInput, (0, ramda_1.path)(['classes', 'root'], InputProps)) }, commonClasses), { input: (0, classnames_1.default)(styles.autosizeInput, commonClasses.input), adornedStart: styles.multipleTextFieldAdornedStart }) }), classes: { root: styles.multipleTextField } }))) : (react_1.default.createElement(TextField_1.default, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { classes: __assign({ root: (0, classnames_1.default)(styles.inputRoot, (0, ramda_1.path)(['classes', 'root'], InputProps), (_c = {},
|
|
245
|
+
return multiple === true ? (react_1.default.createElement(TextField_1.default, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { startAdornment: value === null || value === void 0 ? void 0 : value.map(function (item, index) { return (react_1.default.createElement(ValueChip_1.default, { key: item, label: item, onDelete: function () { return onChange((0, ramda_1.remove)(index, 1, value)); } })); }), inputComponent: react_input_autosize_1.default, classes: __assign(__assign({ root: (0, classnames_1.default)(styles.multipleTextFieldInput, (0, ramda_1.path)(['classes', 'root'], InputProps)) }, commonClasses), { input: (0, classnames_1.default)(styles.autosizeInput, commonClasses.input), adornedStart: styles.multipleTextFieldAdornedStart }) }), classes: { root: styles.multipleTextField } }))) : (react_1.default.createElement(TextField_1.default, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { classes: __assign({ root: (0, classnames_1.default)(styles.inputRoot, (0, ramda_1.path)(['classes', 'root'], InputProps), (_c = {},
|
|
246
246
|
_c[styles.isCrossedOut] = isCrossedOut,
|
|
247
247
|
_c)) }, commonClasses) }) })));
|
|
248
248
|
}, renderSuggestionsContainer: function (_a) {
|
|
@@ -8,12 +8,12 @@ type CommonProps = Omit<TextFieldProps, 'onChange' | 'value'> & {
|
|
|
8
8
|
isCrossedOut?: boolean;
|
|
9
9
|
};
|
|
10
10
|
type MultipleProps = CommonProps & {
|
|
11
|
-
value
|
|
11
|
+
value?: string[];
|
|
12
12
|
onChange: (values: string[]) => void;
|
|
13
13
|
multiple: true;
|
|
14
14
|
};
|
|
15
15
|
type SingleProps = CommonProps & {
|
|
16
|
-
value
|
|
16
|
+
value?: string;
|
|
17
17
|
onChange: (value: string) => void;
|
|
18
18
|
multiple?: false;
|
|
19
19
|
};
|
|
@@ -173,7 +173,7 @@ var TypeaheadEditor = function (_a) {
|
|
|
173
173
|
case ChangeMethod.Enter: {
|
|
174
174
|
if (multiple === true) {
|
|
175
175
|
if (newValue)
|
|
176
|
-
onChange(uniq(__spreadArray(__spreadArray([], value, true), [newValue], false)));
|
|
176
|
+
onChange(uniq(__spreadArray(__spreadArray([], (value || []), true), [newValue], false)));
|
|
177
177
|
setInputValue('');
|
|
178
178
|
}
|
|
179
179
|
else {
|
|
@@ -214,7 +214,7 @@ var TypeaheadEditor = function (_a) {
|
|
|
214
214
|
underline: classnames((_b = {}, _b[styles.underline] = isEmptyValue(value), _b)),
|
|
215
215
|
input: classnames(styles['rawInput'], path(['classes', 'input'], InputProps))
|
|
216
216
|
};
|
|
217
|
-
return multiple === true ? (React.createElement(TextField, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { startAdornment: value.map(function (item, index) { return (React.createElement(ValueChip, { key: item, label: item, onDelete: function () { return onChange(remove(index, 1, value)); } })); }), inputComponent: AutosizeInput, classes: __assign(__assign({ root: classnames(styles.multipleTextFieldInput, path(['classes', 'root'], InputProps)) }, commonClasses), { input: classnames(styles.autosizeInput, commonClasses.input), adornedStart: styles.multipleTextFieldAdornedStart }) }), classes: { root: styles.multipleTextField } }))) : (React.createElement(TextField, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { classes: __assign({ root: classnames(styles.inputRoot, path(['classes', 'root'], InputProps), (_c = {},
|
|
217
|
+
return multiple === true ? (React.createElement(TextField, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { startAdornment: value === null || value === void 0 ? void 0 : value.map(function (item, index) { return (React.createElement(ValueChip, { key: item, label: item, onDelete: function () { return onChange(remove(index, 1, value)); } })); }), inputComponent: AutosizeInput, classes: __assign(__assign({ root: classnames(styles.multipleTextFieldInput, path(['classes', 'root'], InputProps)) }, commonClasses), { input: classnames(styles.autosizeInput, commonClasses.input), adornedStart: styles.multipleTextFieldAdornedStart }) }), classes: { root: styles.multipleTextField } }))) : (React.createElement(TextField, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { classes: __assign({ root: classnames(styles.inputRoot, path(['classes', 'root'], InputProps), (_c = {},
|
|
218
218
|
_c[styles.isCrossedOut] = isCrossedOut,
|
|
219
219
|
_c)) }, commonClasses) }) })));
|
|
220
220
|
}, renderSuggestionsContainer: function (_a) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1673",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@date-io/moment": "^1.3.5",
|
|
9
9
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
10
10
|
"@react-google-maps/api": "2.7.0",
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1673",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|