@reltio/components 1.4.1918 → 1.4.1919
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/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.js +1 -3
- package/cjs/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.js +1 -3
- package/cjs/SimpleAttribute/SimpleAttribute.js +1 -3
- package/esm/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.js +2 -4
- package/esm/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.js +2 -4
- package/esm/SimpleAttribute/SimpleAttribute.js +2 -4
- package/package.json +2 -2
|
@@ -45,9 +45,7 @@ var OneLineRenderer = function (_a) {
|
|
|
45
45
|
var label = attributeType.label, description = attributeType.description;
|
|
46
46
|
var controlAttributes = (0, MdmModuleContext_1.useMdmControlAttributes)();
|
|
47
47
|
var isControlAttribute = (0, react_1.useMemo)(function () { return controlAttributes.includes(attributeType.uri); }, [controlAttributes, attributeType.uri]);
|
|
48
|
-
var objectType = (0, mdm_sdk_1.
|
|
49
|
-
? mdm_sdk_1.CollaborationObjectTypes.RELATION_ATTRIBUTE
|
|
50
|
-
: mdm_sdk_1.CollaborationObjectTypes.ENTITY_ATTRIBUTE;
|
|
48
|
+
var objectType = (0, mdm_sdk_1.getObjectTypeByAttributeUri)(value.uri);
|
|
51
49
|
return (react_1.default.createElement("div", { "data-reltio-id": "one-line-renderer", className: (0, classnames_1.default)(styles.collaborationWrapper, constants_1.COMMENTS_CONTAINER_VISIBILITY_AREA) },
|
|
52
50
|
react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.titleRow, styles.wrapper) },
|
|
53
51
|
react_1.default.createElement(AttributeTitle_1.AttributeTitle, { label: label, className: (0, classnames_1.default)(styles.title, classes === null || classes === void 0 ? void 0 : classes.title), "data-reltio-id": "reltio-attribute-label" }),
|
|
@@ -60,9 +60,7 @@ var ReadOnlyComplexAttribute = function (_a) {
|
|
|
60
60
|
}, [expandedProp]);
|
|
61
61
|
var hasAnalyticValue = (attributeTypesList || []).some(function (attributeType) { return (0, mdm_sdk_1.isAnalyticAttribute)(attributeType); });
|
|
62
62
|
var attributeListEntity = (0, react_1.useMemo)(function () { return (__assign({ attributes: hasAnalyticValue ? null : attributeValue.value, analyticsAttributes: hasAnalyticValue ? attributeValue.value : null }, ((0, mdm_sdk_1.isSpecialAttribute)(attributeType) ? attributeValue.value : {}))); }, [attributeValue, hasAnalyticValue, attributeType]);
|
|
63
|
-
var objectType = (0, mdm_sdk_1.
|
|
64
|
-
? mdm_sdk_1.CollaborationObjectTypes.RELATION_ATTRIBUTE
|
|
65
|
-
: mdm_sdk_1.CollaborationObjectTypes.ENTITY_ATTRIBUTE;
|
|
63
|
+
var objectType = (0, mdm_sdk_1.getObjectTypeByAttributeUri)(attributeValue.uri);
|
|
66
64
|
return (react_1.default.createElement("div", { className: styles.complexContainer },
|
|
67
65
|
react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.labelContainer, classnames_2.COMMENTS_CONTAINER_VISIBILITY_AREA) },
|
|
68
66
|
react_1.default.createElement(ArrowExpandButton_1.ArrowExpandButton, { onClick: function () { return setExpanded(function (value) { return !value; }); }, expanded: expanded }),
|
|
@@ -52,9 +52,7 @@ var SimpleAttribute = function (_a) {
|
|
|
52
52
|
var attributeAppearance = (0, mdm_sdk_1.getHistoryAppearanceByUri)(attributeValue.uri, appearance);
|
|
53
53
|
var historyClassName = (0, mdm_sdk_1.getHistoryAttributeClassName)(attributeAppearance);
|
|
54
54
|
var dataTypeValue = (0, react_1.useMemo)(function () { return (react_1.default.createElement(DataTypeValue_1.DataTypeValue, { value: (0, mdm_sdk_1.getAttributeValue)(attributeValue), dataTypeDefinition: (0, mdm_sdk_1.getAttrDataTypeDefinition)(attributeType) })); }, [attributeValue, attributeType]);
|
|
55
|
-
var objectType = (0, mdm_sdk_1.
|
|
56
|
-
? mdm_sdk_1.CollaborationObjectTypes.RELATION_ATTRIBUTE
|
|
57
|
-
: mdm_sdk_1.CollaborationObjectTypes.ENTITY_ATTRIBUTE;
|
|
55
|
+
var objectType = (0, mdm_sdk_1.getObjectTypeByAttributeUri)(attributeValue.uri);
|
|
58
56
|
var unmaskingControl = isUnmaskingNeeded && (react_1.default.createElement(MaskingSwitcher_1.MaskingSwitcher, { isMasked: isMasked, onToggleMasking: toggleMasking, isUnmasking: isUnmasking }));
|
|
59
57
|
return inlined || historyClassName ? (react_1.default.createElement("div", { className: (0, classnames_1.default)(className, (_b = {},
|
|
60
58
|
_b[highlightedClassName] = highlightedValuesUris.includes(attributeValue.uri),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { createRelatedObjectUris, getObjectTypeByAttributeUri } from '@reltio/mdm-sdk';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { COMMENTS_CONTAINER_VISIBILITY_AREA } from '../../../constants';
|
|
5
5
|
import { CommentsContainer } from '../../../CommentsContainer';
|
|
@@ -16,9 +16,7 @@ export var OneLineRenderer = function (_a) {
|
|
|
16
16
|
var label = attributeType.label, description = attributeType.description;
|
|
17
17
|
var controlAttributes = useMdmControlAttributes();
|
|
18
18
|
var isControlAttribute = useMemo(function () { return controlAttributes.includes(attributeType.uri); }, [controlAttributes, attributeType.uri]);
|
|
19
|
-
var objectType =
|
|
20
|
-
? CollaborationObjectTypes.RELATION_ATTRIBUTE
|
|
21
|
-
: CollaborationObjectTypes.ENTITY_ATTRIBUTE;
|
|
19
|
+
var objectType = getObjectTypeByAttributeUri(value.uri);
|
|
22
20
|
return (React.createElement("div", { "data-reltio-id": "one-line-renderer", className: classnames(styles.collaborationWrapper, COMMENTS_CONTAINER_VISIBILITY_AREA) },
|
|
23
21
|
React.createElement("div", { className: classnames(styles.titleRow, styles.wrapper) },
|
|
24
22
|
React.createElement(AttributeTitle, { label: label, className: classnames(styles.title, classes === null || classes === void 0 ? void 0 : classes.title), "data-reltio-id": "reltio-attribute-label" }),
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
13
13
|
import classnames from 'classnames';
|
|
14
|
-
import { isAnalyticAttribute,
|
|
14
|
+
import { isAnalyticAttribute, createRelatedObjectUris, isOv, isSpecialAttribute, getObjectTypeByAttributeUri } from '@reltio/mdm-sdk';
|
|
15
15
|
import Typography from '@mui/material/Typography';
|
|
16
16
|
import { ReadOnlyAttributesList } from '../ReadOnlyAttributesList';
|
|
17
17
|
import { ArrowExpandButton } from '../ArrowExpandButton';
|
|
@@ -31,9 +31,7 @@ export var ReadOnlyComplexAttribute = function (_a) {
|
|
|
31
31
|
}, [expandedProp]);
|
|
32
32
|
var hasAnalyticValue = (attributeTypesList || []).some(function (attributeType) { return isAnalyticAttribute(attributeType); });
|
|
33
33
|
var attributeListEntity = useMemo(function () { return (__assign({ attributes: hasAnalyticValue ? null : attributeValue.value, analyticsAttributes: hasAnalyticValue ? attributeValue.value : null }, (isSpecialAttribute(attributeType) ? attributeValue.value : {}))); }, [attributeValue, hasAnalyticValue, attributeType]);
|
|
34
|
-
var objectType =
|
|
35
|
-
? CollaborationObjectTypes.RELATION_ATTRIBUTE
|
|
36
|
-
: CollaborationObjectTypes.ENTITY_ATTRIBUTE;
|
|
34
|
+
var objectType = getObjectTypeByAttributeUri(attributeValue.uri);
|
|
37
35
|
return (React.createElement("div", { className: styles.complexContainer },
|
|
38
36
|
React.createElement("div", { className: classnames(styles.labelContainer, COMMENTS_CONTAINER_VISIBILITY_AREA) },
|
|
39
37
|
React.createElement(ArrowExpandButton, { onClick: function () { return setExpanded(function (value) { return !value; }); }, expanded: expanded }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useContext, useMemo } from 'react';
|
|
2
|
-
import { getAttrDataTypeDefinition, getHistoryAppearanceByUri, getAttributeValue,
|
|
2
|
+
import { getAttrDataTypeDefinition, getHistoryAppearanceByUri, getAttributeValue, createRelatedObjectUris, isOv, getHistoryAttributeClassName, getObjectTypeByAttributeUri } from '@reltio/mdm-sdk';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { useMaskedAttribute } from '../hooks/useMaskedAttribute';
|
|
5
5
|
import { COMMENTS_CONTAINER_VISIBILITY_AREA } from '../constants/classnames';
|
|
@@ -23,9 +23,7 @@ export var SimpleAttribute = function (_a) {
|
|
|
23
23
|
var attributeAppearance = getHistoryAppearanceByUri(attributeValue.uri, appearance);
|
|
24
24
|
var historyClassName = getHistoryAttributeClassName(attributeAppearance);
|
|
25
25
|
var dataTypeValue = useMemo(function () { return (React.createElement(DataTypeValue, { value: getAttributeValue(attributeValue), dataTypeDefinition: getAttrDataTypeDefinition(attributeType) })); }, [attributeValue, attributeType]);
|
|
26
|
-
var objectType =
|
|
27
|
-
? CollaborationObjectTypes.RELATION_ATTRIBUTE
|
|
28
|
-
: CollaborationObjectTypes.ENTITY_ATTRIBUTE;
|
|
26
|
+
var objectType = getObjectTypeByAttributeUri(attributeValue.uri);
|
|
29
27
|
var unmaskingControl = isUnmaskingNeeded && (React.createElement(MaskingSwitcher, { isMasked: isMasked, onToggleMasking: toggleMasking, isUnmasking: isUnmasking }));
|
|
30
28
|
return inlined || historyClassName ? (React.createElement("div", { className: classnames(className, (_b = {},
|
|
31
29
|
_b[highlightedClassName] = highlightedValuesUris.includes(attributeValue.uri),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1919",
|
|
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
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
10
|
"@react-sigma/core": "3.4.0",
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1842",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|