@reltio/components 1.4.1260 → 1.4.1262
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.
|
@@ -96,13 +96,6 @@ var EntitySelector = function (_a) {
|
|
|
96
96
|
entityTypesUris,
|
|
97
97
|
metadata
|
|
98
98
|
]);
|
|
99
|
-
var filters = [
|
|
100
|
-
{
|
|
101
|
-
filter: 'equals',
|
|
102
|
-
fieldName: 'type',
|
|
103
|
-
values: entityTypesUris.map(mdm_sdk_1.getLastUriPart)
|
|
104
|
-
}
|
|
105
|
-
];
|
|
106
99
|
var options = __assign(__assign({}, globalSearchRequestOptions), { max: max });
|
|
107
100
|
var handleCreate = onCreate
|
|
108
101
|
? function (value, entityTypeUri) {
|
|
@@ -124,7 +117,7 @@ var EntitySelector = function (_a) {
|
|
|
124
117
|
};
|
|
125
118
|
var groupMode = react_1.useMemo(function () { return entityTypes.length !== 1; }, [entityTypes]);
|
|
126
119
|
var getOptions = function (value) {
|
|
127
|
-
return mdm_sdk_1.
|
|
120
|
+
return mdm_sdk_1.typeAheadSearch(entityTypes, value, options).then(buildEntityOptions(entityTypes, onCreate));
|
|
128
121
|
};
|
|
129
122
|
var currentEntityType = (ramda_1.isEmpty(entity) ? entityTypes[0] : mdm_sdk_1.getEntityType(metadata, entity.entityType)) || {};
|
|
130
123
|
var createLabel = onCreate && ui_i18n_1.default.text("Create " + (inputValue ? "\"" + inputValue + "\" as " : '') + "new " + currentEntityType.label);
|
|
@@ -24,7 +24,7 @@ import React, { useState, useMemo } from 'react';
|
|
|
24
24
|
import PropTypes from 'prop-types';
|
|
25
25
|
import i18n from 'ui-i18n';
|
|
26
26
|
import { isEmpty, prop } from 'ramda';
|
|
27
|
-
import {
|
|
27
|
+
import { typeAheadSearch, getEntityType, MetadataType, ConnectionEntityType, ModeType, isTempUri, getLabel } from '@reltio/mdm-sdk';
|
|
28
28
|
import DropDownSelector from '../../../DropDownSelector/DropDownSelector';
|
|
29
29
|
import EntityOption from './components/EntityOption';
|
|
30
30
|
import SingleValue from './components/SingleValue';
|
|
@@ -72,13 +72,6 @@ var EntitySelector = function (_a) {
|
|
|
72
72
|
entityTypesUris,
|
|
73
73
|
metadata
|
|
74
74
|
]);
|
|
75
|
-
var filters = [
|
|
76
|
-
{
|
|
77
|
-
filter: 'equals',
|
|
78
|
-
fieldName: 'type',
|
|
79
|
-
values: entityTypesUris.map(getLastUriPart)
|
|
80
|
-
}
|
|
81
|
-
];
|
|
82
75
|
var options = __assign(__assign({}, globalSearchRequestOptions), { max: max });
|
|
83
76
|
var handleCreate = onCreate
|
|
84
77
|
? function (value, entityTypeUri) {
|
|
@@ -100,7 +93,7 @@ var EntitySelector = function (_a) {
|
|
|
100
93
|
};
|
|
101
94
|
var groupMode = useMemo(function () { return entityTypes.length !== 1; }, [entityTypes]);
|
|
102
95
|
var getOptions = function (value) {
|
|
103
|
-
return
|
|
96
|
+
return typeAheadSearch(entityTypes, value, options).then(buildEntityOptions(entityTypes, onCreate));
|
|
104
97
|
};
|
|
105
98
|
var currentEntityType = (isEmpty(entity) ? entityTypes[0] : getEntityType(metadata, entity.entityType)) || {};
|
|
106
99
|
var createLabel = onCreate && i18n.text("Create " + (inputValue ? "\"" + inputValue + "\" as " : '') + "new " + currentEntityType.label);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1262",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@date-io/moment": "^1.3.5",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
|
-
"@reltio/mdm-module": "^1.4.
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
10
|
+
"@reltio/mdm-module": "^1.4.1262",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1262",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|