@reltio/components 1.4.2239 → 1.4.2241

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.
@@ -23,7 +23,8 @@ type Props<T> = {
23
23
  TextFieldProps?: TextFieldProps;
24
24
  height?: number;
25
25
  classes?: Record<string, string>;
26
+ required?: boolean;
26
27
  [key: string]: unknown;
27
28
  };
28
- export declare const DropDownSelector: <T>({ value, label, options, getOptions, createLabel, height, onChange, onCreate, canCreateOption, onClear, components, textFieldInputRef, TextFieldProps, classes, ...otherProps }: Props<T>) => React.JSX.Element;
29
+ export declare const DropDownSelector: <T>({ value, label, options, getOptions, createLabel, height, onChange, onCreate, canCreateOption, onClear, components, textFieldInputRef, TextFieldProps, classes, required, ...otherProps }: Props<T>) => React.JSX.Element;
29
30
  export {};
@@ -33,7 +33,7 @@ import { SingleValue } from './components/SingleValue';
33
33
  import { useStyles, customStyles, overloadMenuListStyle, withoutLabelInputStyle } from './styles';
34
34
  export var DropDownSelector = function (_a) {
35
35
  var _b;
36
- var value = _a.value, label = _a.label, options = _a.options, getOptions = _a.getOptions, createLabel = _a.createLabel, _c = _a.height, height = _c === void 0 ? 46 : _c, _d = _a.onChange, onChange = _d === void 0 ? identity : _d, onCreate = _a.onCreate, _e = _a.canCreateOption, canCreateOption = _e === void 0 ? function () { return Boolean(onCreate); } : _e, _f = _a.onClear, onClear = _f === void 0 ? identity : _f, _g = _a.components, components = _g === void 0 ? {} : _g, textFieldInputRef = _a.textFieldInputRef, TextFieldProps = _a.TextFieldProps, _h = _a.classes, classes = _h === void 0 ? {} : _h, otherProps = __rest(_a, ["value", "label", "options", "getOptions", "createLabel", "height", "onChange", "onCreate", "canCreateOption", "onClear", "components", "textFieldInputRef", "TextFieldProps", "classes"]);
36
+ var value = _a.value, label = _a.label, options = _a.options, getOptions = _a.getOptions, createLabel = _a.createLabel, _c = _a.height, height = _c === void 0 ? 46 : _c, _d = _a.onChange, onChange = _d === void 0 ? identity : _d, onCreate = _a.onCreate, _e = _a.canCreateOption, canCreateOption = _e === void 0 ? function () { return Boolean(onCreate); } : _e, _f = _a.onClear, onClear = _f === void 0 ? identity : _f, _g = _a.components, components = _g === void 0 ? {} : _g, textFieldInputRef = _a.textFieldInputRef, TextFieldProps = _a.TextFieldProps, _h = _a.classes, classes = _h === void 0 ? {} : _h, required = _a.required, otherProps = __rest(_a, ["value", "label", "options", "getOptions", "createLabel", "height", "onChange", "onCreate", "canCreateOption", "onClear", "components", "textFieldInputRef", "TextFieldProps", "classes", "required"]);
37
37
  var styles = useStyles({ height: height });
38
38
  var _j = useState(false), open = _j[0], setOpen = _j[1];
39
39
  var inputRef = useRef(null);
@@ -51,5 +51,5 @@ export var DropDownSelector = function (_a) {
51
51
  var overloadStylesIfNoLabel = isEmpty(label) ? withoutLabelInputStyle : {};
52
52
  var mergedStyles = __assign(__assign(__assign({}, customStyles), overloadStylesIfGroup), overloadStylesIfNoLabel);
53
53
  var mergedClasses = __assign(__assign({}, styles), classes);
54
- return (React.createElement(SelectComponent, __assign({ placeholder: "", defaultOptions: true }, otherProps, { value: defaultTo(null, value), loadOptions: getOptions, options: options, cacheOptions: true, onChange: onChange, onCreate: handleCreate, onClear: onClear, createLabel: createLabel, canCreateOption: canCreateOption, classes: mergedClasses, styles: mergedStyles, components: __assign(__assign({ DropdownIndicator: ReactSelectDropdownIndicator, LoadingIndicator: EmptyStub, SingleValue: SingleValue, Menu: Menu }, showIndicatorSeparator), components), menuPlacement: "auto", TextFieldProps: __assign(__assign({}, TextFieldProps), { label: label, variant: 'filled', size: 'small', classes: __assign(__assign({}, prop('classes', TextFieldProps)), { root: classnames(styles.formControl, path(['classes', 'root'], TextFieldProps)) }), inputProps: __assign({}, prop('inputProps', TextFieldProps)), InputProps: __assign(__assign({}, prop('InputProps', TextFieldProps)), { classes: __assign(__assign({}, path(['InputProps', 'classes'], TextFieldProps)), { root: classnames(styles.filledInputRoot, path(['InputProps', 'classes', 'root'], TextFieldProps)), underline: classnames((_b = {}, _b[styles.filledInputUnderline] = isEmptyValue(value), _b), path(['InputProps', 'classes', 'underline'], TextFieldProps)), focused: classnames('focused', path(['InputProps', 'classes', 'focused'], TextFieldProps)) }) }), InputLabelProps: __assign(__assign({}, prop('InputLabelProps', TextFieldProps)), { classes: __assign(__assign({}, path(['InputLabelProps', 'classes'], TextFieldProps)), { root: classnames(styles.inputLabel, path(['InputLabelProps', 'classes', 'root'], TextFieldProps)), shrink: classnames('shrink', path(['InputLabelProps', 'classes', 'shrink'], TextFieldProps)) }), shrink: !isEmptyValue(value) ? true : undefined }), ref: textFieldInputRef || inputRef }), inputRef: textFieldInputRef || inputRef, menuIsOpen: open, onMenuOpen: function () { return setOpen(true); }, onMenuClose: function () { return setOpen(false); } })));
54
+ return (React.createElement(SelectComponent, __assign({ placeholder: "", defaultOptions: true }, otherProps, { value: defaultTo(null, value), loadOptions: getOptions, options: options, cacheOptions: true, onChange: onChange, onCreate: handleCreate, onClear: onClear, createLabel: createLabel, canCreateOption: canCreateOption, classes: mergedClasses, styles: mergedStyles, components: __assign(__assign({ DropdownIndicator: ReactSelectDropdownIndicator, LoadingIndicator: EmptyStub, SingleValue: SingleValue, Menu: Menu }, showIndicatorSeparator), components), menuPlacement: "auto", TextFieldProps: __assign(__assign({}, TextFieldProps), { label: label, variant: 'filled', size: 'small', required: required, classes: __assign(__assign({}, prop('classes', TextFieldProps)), { root: classnames(styles.formControl, path(['classes', 'root'], TextFieldProps)) }), inputProps: __assign({}, prop('inputProps', TextFieldProps)), InputProps: __assign(__assign({}, prop('InputProps', TextFieldProps)), { classes: __assign(__assign({}, path(['InputProps', 'classes'], TextFieldProps)), { root: classnames(styles.filledInputRoot, path(['InputProps', 'classes', 'root'], TextFieldProps)), underline: classnames((_b = {}, _b[styles.filledInputUnderline] = isEmptyValue(value), _b), path(['InputProps', 'classes', 'underline'], TextFieldProps)), focused: classnames('focused', path(['InputProps', 'classes', 'focused'], TextFieldProps)) }) }), InputLabelProps: __assign(__assign({}, prop('InputLabelProps', TextFieldProps)), { classes: __assign(__assign({}, path(['InputLabelProps', 'classes'], TextFieldProps)), { root: classnames(styles.inputLabel, path(['InputLabelProps', 'classes', 'root'], TextFieldProps)), shrink: classnames('shrink', path(['InputLabelProps', 'classes', 'shrink'], TextFieldProps)) }), shrink: !isEmptyValue(value) ? true : undefined }), ref: textFieldInputRef || inputRef }), inputRef: textFieldInputRef || inputRef, menuIsOpen: open, onMenuOpen: function () { return setOpen(true); }, onMenuClose: function () { return setOpen(false); } })));
55
55
  };
@@ -18,6 +18,7 @@ type Props = {
18
18
  height?: number;
19
19
  isDisabled?: boolean;
20
20
  isMasked?: boolean;
21
+ required?: boolean;
21
22
  };
22
- export declare const EntitySelector: ({ entity, entityTypesUris, mode, max, onChange, onCreate, metadata, globalSearchRequestOptions, attributeTypesSelectionStrategy, disableLinkClick, isMasked, ...otherProps }: Props) => React.JSX.Element;
23
+ export declare const EntitySelector: ({ entity, entityTypesUris, mode, max, onChange, onCreate, metadata, globalSearchRequestOptions, attributeTypesSelectionStrategy, disableLinkClick, isMasked, required, ...otherProps }: Props) => React.JSX.Element;
23
24
  export {};
@@ -35,7 +35,7 @@ import { buildEntityOptions } from './helpers';
35
35
  import { useStyles } from './styles';
36
36
  var DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION = 20;
37
37
  export var EntitySelector = function (_a) {
38
- var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, _d = _a.max, max = _d === void 0 ? DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION : _d, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _e = _a.disableLinkClick, disableLinkClick = _e === void 0 ? false : _e, _f = _a.isMasked, isMasked = _f === void 0 ? false : _f, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick", "isMasked"]);
38
+ var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, _d = _a.max, max = _d === void 0 ? DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION : _d, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _e = _a.disableLinkClick, disableLinkClick = _e === void 0 ? false : _e, _f = _a.isMasked, isMasked = _f === void 0 ? false : _f, required = _a.required, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick", "isMasked", "required"]);
39
39
  var styles = useStyles();
40
40
  var _g = useState(''), inputValue = _g[0], setInputValue = _g[1];
41
41
  var entityTypes = useMemo(function () { return entityTypesUris.map(function (type) { return getEntityType(metadata, type); }).filter(isAvailableEntityType); }, [entityTypesUris, metadata]);
@@ -94,7 +94,7 @@ export var EntitySelector = function (_a) {
94
94
  return (__assign(__assign({}, (TextFieldProps || {})), (_a = {}, _a['data-reltio-id'] = 'reltio-entity-selector', _a)));
95
95
  }, [TextFieldProps]);
96
96
  return (React.createElement(React.Fragment, null,
97
- React.createElement(DropDownSelector, __assign({ key: entityTypesUris.join(','), value: !isEmpty(entity) ? entity : undefined, inputValue: inputValue, onInputChange: handleInputChange, getOptions: getOptions, getOptionLabel: prop('entityLabel'), onChange: handleChange, onCreate: handleCreate, onClear: handleClear, label: label, createLabel: createLabel, canCreateOption: canCreateEntity, components: __assign(__assign({ Option: EntityOption, SingleValue: SingleValue }, groupComponent), clearComponent), currentEntityType: currentEntityType, isClearable: true, disableLinkClick: disableLinkClick, TextFieldProps: textFieldProps }, dropDownSelectorProps)),
97
+ React.createElement(DropDownSelector, __assign({ key: entityTypesUris.join(','), value: !isEmpty(entity) ? entity : undefined, inputValue: inputValue, onInputChange: handleInputChange, getOptions: getOptions, getOptionLabel: prop('entityLabel'), onChange: handleChange, onCreate: handleCreate, onClear: handleClear, label: label, createLabel: createLabel, canCreateOption: canCreateEntity, components: __assign(__assign({ Option: EntityOption, SingleValue: SingleValue }, groupComponent), clearComponent), currentEntityType: currentEntityType, isClearable: true, disableLinkClick: disableLinkClick, TextFieldProps: textFieldProps, required: required }, dropDownSelectorProps)),
98
98
  isTempEntity && (React.createElement("div", { "data-reltio-id": "entity-creator", className: styles.creatorWrapper },
99
99
  React.createElement(EntityCreator, { mode: mode, attributeTypesSelectionStrategy: attributeTypesSelectionStrategy, entityType: currentEntityType, entityUri: entity.entityUri })))));
100
100
  };
@@ -23,7 +23,8 @@ type Props<T> = {
23
23
  TextFieldProps?: TextFieldProps;
24
24
  height?: number;
25
25
  classes?: Record<string, string>;
26
+ required?: boolean;
26
27
  [key: string]: unknown;
27
28
  };
28
- export declare const DropDownSelector: <T>({ value, label, options, getOptions, createLabel, height, onChange, onCreate, canCreateOption, onClear, components, textFieldInputRef, TextFieldProps, classes, ...otherProps }: Props<T>) => React.JSX.Element;
29
+ export declare const DropDownSelector: <T>({ value, label, options, getOptions, createLabel, height, onChange, onCreate, canCreateOption, onClear, components, textFieldInputRef, TextFieldProps, classes, required, ...otherProps }: Props<T>) => React.JSX.Element;
29
30
  export {};
@@ -62,7 +62,7 @@ var SingleValue_1 = require("./components/SingleValue");
62
62
  var styles_1 = require("./styles");
63
63
  var DropDownSelector = function (_a) {
64
64
  var _b;
65
- var value = _a.value, label = _a.label, options = _a.options, getOptions = _a.getOptions, createLabel = _a.createLabel, _c = _a.height, height = _c === void 0 ? 46 : _c, _d = _a.onChange, onChange = _d === void 0 ? ramda_1.identity : _d, onCreate = _a.onCreate, _e = _a.canCreateOption, canCreateOption = _e === void 0 ? function () { return Boolean(onCreate); } : _e, _f = _a.onClear, onClear = _f === void 0 ? ramda_1.identity : _f, _g = _a.components, components = _g === void 0 ? {} : _g, textFieldInputRef = _a.textFieldInputRef, TextFieldProps = _a.TextFieldProps, _h = _a.classes, classes = _h === void 0 ? {} : _h, otherProps = __rest(_a, ["value", "label", "options", "getOptions", "createLabel", "height", "onChange", "onCreate", "canCreateOption", "onClear", "components", "textFieldInputRef", "TextFieldProps", "classes"]);
65
+ var value = _a.value, label = _a.label, options = _a.options, getOptions = _a.getOptions, createLabel = _a.createLabel, _c = _a.height, height = _c === void 0 ? 46 : _c, _d = _a.onChange, onChange = _d === void 0 ? ramda_1.identity : _d, onCreate = _a.onCreate, _e = _a.canCreateOption, canCreateOption = _e === void 0 ? function () { return Boolean(onCreate); } : _e, _f = _a.onClear, onClear = _f === void 0 ? ramda_1.identity : _f, _g = _a.components, components = _g === void 0 ? {} : _g, textFieldInputRef = _a.textFieldInputRef, TextFieldProps = _a.TextFieldProps, _h = _a.classes, classes = _h === void 0 ? {} : _h, required = _a.required, otherProps = __rest(_a, ["value", "label", "options", "getOptions", "createLabel", "height", "onChange", "onCreate", "canCreateOption", "onClear", "components", "textFieldInputRef", "TextFieldProps", "classes", "required"]);
66
66
  var styles = (0, styles_1.useStyles)({ height: height });
67
67
  var _j = (0, react_1.useState)(false), open = _j[0], setOpen = _j[1];
68
68
  var inputRef = (0, react_1.useRef)(null);
@@ -80,6 +80,6 @@ var DropDownSelector = function (_a) {
80
80
  var overloadStylesIfNoLabel = (0, ramda_1.isEmpty)(label) ? styles_1.withoutLabelInputStyle : {};
81
81
  var mergedStyles = __assign(__assign(__assign({}, styles_1.customStyles), overloadStylesIfGroup), overloadStylesIfNoLabel);
82
82
  var mergedClasses = __assign(__assign({}, styles), classes);
83
- return (react_1.default.createElement(SelectComponent, __assign({ placeholder: "", defaultOptions: true }, otherProps, { value: (0, ramda_1.defaultTo)(null, value), loadOptions: getOptions, options: options, cacheOptions: true, onChange: onChange, onCreate: handleCreate, onClear: onClear, createLabel: createLabel, canCreateOption: canCreateOption, classes: mergedClasses, styles: mergedStyles, components: __assign(__assign({ DropdownIndicator: ReactSelectDropdownIndicator_1.ReactSelectDropdownIndicator, LoadingIndicator: EmptyStub_1.EmptyStub, SingleValue: SingleValue_1.SingleValue, Menu: Menu_1.Menu }, showIndicatorSeparator), components), menuPlacement: "auto", TextFieldProps: __assign(__assign({}, TextFieldProps), { label: label, variant: 'filled', size: 'small', classes: __assign(__assign({}, (0, ramda_1.prop)('classes', TextFieldProps)), { root: (0, classnames_1.default)(styles.formControl, (0, ramda_1.path)(['classes', 'root'], TextFieldProps)) }), inputProps: __assign({}, (0, ramda_1.prop)('inputProps', TextFieldProps)), InputProps: __assign(__assign({}, (0, ramda_1.prop)('InputProps', TextFieldProps)), { classes: __assign(__assign({}, (0, ramda_1.path)(['InputProps', 'classes'], TextFieldProps)), { root: (0, classnames_1.default)(styles.filledInputRoot, (0, ramda_1.path)(['InputProps', 'classes', 'root'], TextFieldProps)), underline: (0, classnames_1.default)((_b = {}, _b[styles.filledInputUnderline] = (0, mdm_sdk_1.isEmptyValue)(value), _b), (0, ramda_1.path)(['InputProps', 'classes', 'underline'], TextFieldProps)), focused: (0, classnames_1.default)('focused', (0, ramda_1.path)(['InputProps', 'classes', 'focused'], TextFieldProps)) }) }), InputLabelProps: __assign(__assign({}, (0, ramda_1.prop)('InputLabelProps', TextFieldProps)), { classes: __assign(__assign({}, (0, ramda_1.path)(['InputLabelProps', 'classes'], TextFieldProps)), { root: (0, classnames_1.default)(styles.inputLabel, (0, ramda_1.path)(['InputLabelProps', 'classes', 'root'], TextFieldProps)), shrink: (0, classnames_1.default)('shrink', (0, ramda_1.path)(['InputLabelProps', 'classes', 'shrink'], TextFieldProps)) }), shrink: !(0, mdm_sdk_1.isEmptyValue)(value) ? true : undefined }), ref: textFieldInputRef || inputRef }), inputRef: textFieldInputRef || inputRef, menuIsOpen: open, onMenuOpen: function () { return setOpen(true); }, onMenuClose: function () { return setOpen(false); } })));
83
+ return (react_1.default.createElement(SelectComponent, __assign({ placeholder: "", defaultOptions: true }, otherProps, { value: (0, ramda_1.defaultTo)(null, value), loadOptions: getOptions, options: options, cacheOptions: true, onChange: onChange, onCreate: handleCreate, onClear: onClear, createLabel: createLabel, canCreateOption: canCreateOption, classes: mergedClasses, styles: mergedStyles, components: __assign(__assign({ DropdownIndicator: ReactSelectDropdownIndicator_1.ReactSelectDropdownIndicator, LoadingIndicator: EmptyStub_1.EmptyStub, SingleValue: SingleValue_1.SingleValue, Menu: Menu_1.Menu }, showIndicatorSeparator), components), menuPlacement: "auto", TextFieldProps: __assign(__assign({}, TextFieldProps), { label: label, variant: 'filled', size: 'small', required: required, classes: __assign(__assign({}, (0, ramda_1.prop)('classes', TextFieldProps)), { root: (0, classnames_1.default)(styles.formControl, (0, ramda_1.path)(['classes', 'root'], TextFieldProps)) }), inputProps: __assign({}, (0, ramda_1.prop)('inputProps', TextFieldProps)), InputProps: __assign(__assign({}, (0, ramda_1.prop)('InputProps', TextFieldProps)), { classes: __assign(__assign({}, (0, ramda_1.path)(['InputProps', 'classes'], TextFieldProps)), { root: (0, classnames_1.default)(styles.filledInputRoot, (0, ramda_1.path)(['InputProps', 'classes', 'root'], TextFieldProps)), underline: (0, classnames_1.default)((_b = {}, _b[styles.filledInputUnderline] = (0, mdm_sdk_1.isEmptyValue)(value), _b), (0, ramda_1.path)(['InputProps', 'classes', 'underline'], TextFieldProps)), focused: (0, classnames_1.default)('focused', (0, ramda_1.path)(['InputProps', 'classes', 'focused'], TextFieldProps)) }) }), InputLabelProps: __assign(__assign({}, (0, ramda_1.prop)('InputLabelProps', TextFieldProps)), { classes: __assign(__assign({}, (0, ramda_1.path)(['InputLabelProps', 'classes'], TextFieldProps)), { root: (0, classnames_1.default)(styles.inputLabel, (0, ramda_1.path)(['InputLabelProps', 'classes', 'root'], TextFieldProps)), shrink: (0, classnames_1.default)('shrink', (0, ramda_1.path)(['InputLabelProps', 'classes', 'shrink'], TextFieldProps)) }), shrink: !(0, mdm_sdk_1.isEmptyValue)(value) ? true : undefined }), ref: textFieldInputRef || inputRef }), inputRef: textFieldInputRef || inputRef, menuIsOpen: open, onMenuOpen: function () { return setOpen(true); }, onMenuClose: function () { return setOpen(false); } })));
84
84
  };
85
85
  exports.DropDownSelector = DropDownSelector;
@@ -18,6 +18,7 @@ type Props = {
18
18
  height?: number;
19
19
  isDisabled?: boolean;
20
20
  isMasked?: boolean;
21
+ required?: boolean;
21
22
  };
22
- export declare const EntitySelector: ({ entity, entityTypesUris, mode, max, onChange, onCreate, metadata, globalSearchRequestOptions, attributeTypesSelectionStrategy, disableLinkClick, isMasked, ...otherProps }: Props) => React.JSX.Element;
23
+ export declare const EntitySelector: ({ entity, entityTypesUris, mode, max, onChange, onCreate, metadata, globalSearchRequestOptions, attributeTypesSelectionStrategy, disableLinkClick, isMasked, required, ...otherProps }: Props) => React.JSX.Element;
23
24
  export {};
@@ -64,7 +64,7 @@ var helpers_1 = require("./helpers");
64
64
  var styles_1 = require("./styles");
65
65
  var DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION = 20;
66
66
  var EntitySelector = function (_a) {
67
- var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, _d = _a.max, max = _d === void 0 ? DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION : _d, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _e = _a.disableLinkClick, disableLinkClick = _e === void 0 ? false : _e, _f = _a.isMasked, isMasked = _f === void 0 ? false : _f, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick", "isMasked"]);
67
+ var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, _d = _a.max, max = _d === void 0 ? DEFAULT_MAX_TYPEAHEAD_SEARCH_OPTION : _d, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _e = _a.disableLinkClick, disableLinkClick = _e === void 0 ? false : _e, _f = _a.isMasked, isMasked = _f === void 0 ? false : _f, required = _a.required, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick", "isMasked", "required"]);
68
68
  var styles = (0, styles_1.useStyles)();
69
69
  var _g = (0, react_1.useState)(''), inputValue = _g[0], setInputValue = _g[1];
70
70
  var entityTypes = (0, react_1.useMemo)(function () { return entityTypesUris.map(function (type) { return (0, mdm_sdk_1.getEntityType)(metadata, type); }).filter(mdm_sdk_1.isAvailableEntityType); }, [entityTypesUris, metadata]);
@@ -123,7 +123,7 @@ var EntitySelector = function (_a) {
123
123
  return (__assign(__assign({}, (TextFieldProps || {})), (_a = {}, _a['data-reltio-id'] = 'reltio-entity-selector', _a)));
124
124
  }, [TextFieldProps]);
125
125
  return (react_1.default.createElement(react_1.default.Fragment, null,
126
- react_1.default.createElement(DropDownSelector_1.DropDownSelector, __assign({ key: entityTypesUris.join(','), value: !(0, ramda_1.isEmpty)(entity) ? entity : undefined, inputValue: inputValue, onInputChange: handleInputChange, getOptions: getOptions, getOptionLabel: (0, ramda_1.prop)('entityLabel'), onChange: handleChange, onCreate: handleCreate, onClear: handleClear, label: label, createLabel: createLabel, canCreateOption: canCreateEntity, components: __assign(__assign({ Option: EntityOption_1.EntityOption, SingleValue: SingleValue_1.SingleValue }, groupComponent), clearComponent), currentEntityType: currentEntityType, isClearable: true, disableLinkClick: disableLinkClick, TextFieldProps: textFieldProps }, dropDownSelectorProps)),
126
+ react_1.default.createElement(DropDownSelector_1.DropDownSelector, __assign({ key: entityTypesUris.join(','), value: !(0, ramda_1.isEmpty)(entity) ? entity : undefined, inputValue: inputValue, onInputChange: handleInputChange, getOptions: getOptions, getOptionLabel: (0, ramda_1.prop)('entityLabel'), onChange: handleChange, onCreate: handleCreate, onClear: handleClear, label: label, createLabel: createLabel, canCreateOption: canCreateEntity, components: __assign(__assign({ Option: EntityOption_1.EntityOption, SingleValue: SingleValue_1.SingleValue }, groupComponent), clearComponent), currentEntityType: currentEntityType, isClearable: true, disableLinkClick: disableLinkClick, TextFieldProps: textFieldProps, required: required }, dropDownSelectorProps)),
127
127
  isTempEntity && (react_1.default.createElement("div", { "data-reltio-id": "entity-creator", className: styles.creatorWrapper },
128
128
  react_1.default.createElement(EntityCreator_1.EntityCreator, { mode: mode, attributeTypesSelectionStrategy: attributeTypesSelectionStrategy, entityType: currentEntityType, entityUri: entity.entityUri })))));
129
129
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.2239",
3
+ "version": "1.4.2241",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./index.js",
@@ -11,7 +11,7 @@
11
11
  "@fluentui/react-context-selector": "^9.1.26",
12
12
  "@googlemaps/markerclusterer": "^2.5.3",
13
13
  "@react-sigma/core": "3.4.0",
14
- "@reltio/mdm-sdk": "^1.4.2028",
14
+ "@reltio/mdm-sdk": "^1.4.2030",
15
15
  "@vis.gl/react-google-maps": "^1.3.0",
16
16
  "d3-cloud": "^1.2.5",
17
17
  "d3-geo": "^2.0.1",