@reltio/components 1.4.1499 → 1.4.1500

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.
@@ -110,8 +110,9 @@ var SimpleAttributeEditor = function (_a) {
110
110
  var showDeleteButton = !deleted && !!onDeleteAttribute && canDelete;
111
111
  var hasError = !!errorMessage;
112
112
  var deletedProps = deleted ? { disabled: true } : {};
113
+ var isProfilePerspectiveView = (0, react_1.useContext)(contexts_1.ProfilePerspectiveViewContext);
113
114
  var autopopulationContextValue = (0, useAutopopulationContextValue_1.useAutopopulationContextValue)({
114
- enabled: Boolean(dependentLookupEditorContext),
115
+ enabled: isProfilePerspectiveView && (0, mdm_sdk_1.isDependentLookupAttrType)(attributeType),
115
116
  attributeTypeUri: attributeType === null || attributeType === void 0 ? void 0 : attributeType.uri,
116
117
  valueUri: attributeValue.uri
117
118
  }).autopopulationContextValue;
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import React, { useCallback, useMemo } from 'react';
23
+ import React, { useCallback, useContext, useMemo } from 'react';
24
24
  import PropTypes from 'prop-types';
25
25
  import { useSelector } from 'react-redux';
26
26
  import classnames from 'classnames';
@@ -38,7 +38,7 @@ import { attributeValueToEditorValue, prepareChangeData } from './utils';
38
38
  import withAsyncMount from '../../../../HOCs/withAsyncMount/withAsyncMount';
39
39
  import { getDependentLookupEditorContext } from './selectors/getDependentLookupEditorContext';
40
40
  import { withContext } from '../../../../HOCs';
41
- import { ScrollToErrorContext, DependentLookupAutopopulationContext } from '../../../../contexts';
41
+ import { ScrollToErrorContext, DependentLookupAutopopulationContext, ProfilePerspectiveViewContext } from '../../../../contexts';
42
42
  import { useScrollToAttributeError } from '../../../../hooks';
43
43
  import { useAutopopulationContextValue } from './useAutopopulationContextValue';
44
44
  import { useStyles } from './styles';
@@ -82,8 +82,9 @@ var SimpleAttributeEditor = function (_a) {
82
82
  var showDeleteButton = !deleted && !!onDeleteAttribute && canDelete;
83
83
  var hasError = !!errorMessage;
84
84
  var deletedProps = deleted ? { disabled: true } : {};
85
+ var isProfilePerspectiveView = useContext(ProfilePerspectiveViewContext);
85
86
  var autopopulationContextValue = useAutopopulationContextValue({
86
- enabled: Boolean(dependentLookupEditorContext),
87
+ enabled: isProfilePerspectiveView && isDependentLookupAttrType(attributeType),
87
88
  attributeTypeUri: attributeType === null || attributeType === void 0 ? void 0 : attributeType.uri,
88
89
  valueUri: attributeValue.uri
89
90
  }).autopopulationContextValue;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1499",
3
+ "version": "1.4.1500",
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.1499",
11
- "@reltio/mdm-sdk": "^1.4.1499",
10
+ "@reltio/mdm-module": "^1.4.1500",
11
+ "@reltio/mdm-sdk": "^1.4.1500",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",