@reltio/components 1.4.827 → 1.4.828
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.
|
@@ -4,8 +4,12 @@ exports.buildLookupEntries = void 0;
|
|
|
4
4
|
var ramda_1 = require("ramda");
|
|
5
5
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
6
6
|
var LOOKUP_URI_SEPARATOR = '.';
|
|
7
|
+
var splitOnce = ramda_1.curry(function (separator, string) {
|
|
8
|
+
var _a = string.split(separator), first = _a[0], other = _a.slice(1);
|
|
9
|
+
return [first, other.join(separator)];
|
|
10
|
+
});
|
|
7
11
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
8
|
-
var getLookupByUri = ramda_1.useWith(ramda_1.path, [
|
|
12
|
+
var getLookupByUri = ramda_1.useWith(ramda_1.path, [splitOnce(LOOKUP_URI_SEPARATOR)]);
|
|
9
13
|
var byLabel = ramda_1.ascend(ramda_1.prop('label'));
|
|
10
14
|
var buildLookupEntries = function (lookupTypeCode, lookups) {
|
|
11
15
|
var getLookupPath = function (uri) {
|
|
@@ -15,7 +19,7 @@ var buildLookupEntries = function (lookupTypeCode, lookups) {
|
|
|
15
19
|
var buildEntry = function (_a) {
|
|
16
20
|
var uri = _a[0], value = _a[1];
|
|
17
21
|
var lookup = getLookupByUri(uri, lookups);
|
|
18
|
-
var _b =
|
|
22
|
+
var _b = splitOnce(LOOKUP_URI_SEPARATOR, uri), code = _b[1];
|
|
19
23
|
var label = mdm_sdk_1.getLookupLabel(code, lookup.displayName);
|
|
20
24
|
return lookup === value ? { label: label, value: code } : { label: label, values: buildEntries(value) };
|
|
21
25
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.828",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@date-io/moment": "^1.3.5",
|
|
8
8
|
"@react-google-maps/api": "^2.7.0",
|
|
9
|
-
"@reltio/mdm-module": "^1.4.
|
|
10
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
9
|
+
"@reltio/mdm-module": "^1.4.828",
|
|
10
|
+
"@reltio/mdm-sdk": "^1.4.828",
|
|
11
11
|
"classnames": "^2.2.5",
|
|
12
12
|
"frontend-collective-react-dnd-scrollzone": "^1.0.2",
|
|
13
13
|
"nanoid": "^2.0.0",
|