@reltio/components 1.4.1087 → 1.4.1090
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.
|
@@ -12,7 +12,8 @@ var SOURCE_URL = 'https://s3.amazonaws.com/reltio.images/api';
|
|
|
12
12
|
var SourceIcon = function (_a) {
|
|
13
13
|
var sourceType = _a.sourceType, className = _a.className, classes = _a.classes;
|
|
14
14
|
var metadata = react_redux_1.useSelector(mdm_module_1.default.selectors.getMetadata);
|
|
15
|
-
var _b = mdm_sdk_1.findSourceSystemByUri(metadata, sourceType),
|
|
16
|
-
|
|
15
|
+
var _b = mdm_sdk_1.findSourceSystemByUri(metadata, sourceType), uri = _b.uri, icon = _b.icon;
|
|
16
|
+
var avatarText = mdm_sdk_1.getSourceSystemLabel(metadata, uri)[0];
|
|
17
|
+
return (react_1.default.createElement(AvatarWithFallback_1.default, { className: className, avatarText: avatarText, icon: icon ? mdm_sdk_1.getAbsoluteImageUrl(SOURCE_URL, icon) : null, variant: "square", rootClasses: classes }));
|
|
17
18
|
};
|
|
18
19
|
exports.default = SourceIcon;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import mdmModule from '@reltio/mdm-module';
|
|
2
|
-
import { findSourceSystemByUri, getAbsoluteImageUrl } from '@reltio/mdm-sdk';
|
|
2
|
+
import { findSourceSystemByUri, getAbsoluteImageUrl, getSourceSystemLabel } from '@reltio/mdm-sdk';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useSelector } from 'react-redux';
|
|
5
5
|
import AvatarWithFallback from '../AvatarWithFallback/AvatarWithFallback';
|
|
@@ -7,7 +7,8 @@ var SOURCE_URL = 'https://s3.amazonaws.com/reltio.images/api';
|
|
|
7
7
|
var SourceIcon = function (_a) {
|
|
8
8
|
var sourceType = _a.sourceType, className = _a.className, classes = _a.classes;
|
|
9
9
|
var metadata = useSelector(mdmModule.selectors.getMetadata);
|
|
10
|
-
var _b = findSourceSystemByUri(metadata, sourceType),
|
|
11
|
-
|
|
10
|
+
var _b = findSourceSystemByUri(metadata, sourceType), uri = _b.uri, icon = _b.icon;
|
|
11
|
+
var avatarText = getSourceSystemLabel(metadata, uri)[0];
|
|
12
|
+
return (React.createElement(AvatarWithFallback, { className: className, avatarText: avatarText, icon: icon ? getAbsoluteImageUrl(SOURCE_URL, icon) : null, variant: "square", rootClasses: classes }));
|
|
12
13
|
};
|
|
13
14
|
export default SourceIcon;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1090",
|
|
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.1090",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1090",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|