@reltio/components 1.4.1710 → 1.4.1711
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/components/attributes/readMode/AttributesView/AttributesView.d.ts +1 -1
- package/cjs/components/attributes/readMode/AttributesView/AttributesView.js +3 -1
- package/esm/components/attributes/readMode/AttributesView/AttributesView.d.ts +1 -1
- package/esm/components/attributes/readMode/AttributesView/AttributesView.js +3 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AttributesViewProps } from '../../types';
|
|
3
3
|
type Props = Omit<AttributesViewProps, 'mode' | 'pinnedAttributes'>;
|
|
4
|
-
declare const AttributesView: ({ className, entity, caption, excludeUris, includeUris, attributesCount }: Props) => JSX.Element;
|
|
4
|
+
declare const AttributesView: ({ className, entity, caption, excludeUris, includeUris, attributesCount: attributesCountProp }: Props) => JSX.Element;
|
|
5
5
|
export default AttributesView;
|
|
@@ -38,13 +38,15 @@ var FacetViewHeader_1 = __importDefault(require("../../../FacetViewHeader/FacetV
|
|
|
38
38
|
var AttributesList_1 = __importDefault(require("../AttributesList"));
|
|
39
39
|
var attributesView_1 = require("../../helpers/attributesView");
|
|
40
40
|
var styles_1 = require("./styles");
|
|
41
|
+
var DEFAULT_ATTRIBUTES_COUNT = 16;
|
|
41
42
|
var AttributesView = function (_a) {
|
|
42
43
|
var _b;
|
|
43
|
-
var className = _a.className, _c = _a.entity, entity = _c === void 0 ? {} : _c, _d = _a.caption, caption = _d === void 0 ? '' : _d, _e = _a.excludeUris, excludeUris = _e === void 0 ? [] : _e, _f = _a.includeUris, includeUris = _f === void 0 ? [] : _f,
|
|
44
|
+
var className = _a.className, _c = _a.entity, entity = _c === void 0 ? {} : _c, _d = _a.caption, caption = _d === void 0 ? '' : _d, _e = _a.excludeUris, excludeUris = _e === void 0 ? [] : _e, _f = _a.includeUris, includeUris = _f === void 0 ? [] : _f, attributesCountProp = _a.attributesCount;
|
|
44
45
|
var styles = (0, styles_1.useStyles)();
|
|
45
46
|
var metadata = (0, contexts_1.useMdmMetadata)();
|
|
46
47
|
var pivotingAttributes = (0, contexts_1.useMdmPivotingAttributes)();
|
|
47
48
|
var filteredAttrTypes = (0, react_1.useMemo)(function () { return (0, attributesView_1.getFilteredAttrTypes)(metadata, entity.type, includeUris, excludeUris); }, [excludeUris, includeUris, metadata, entity.type]);
|
|
49
|
+
var attributesCount = attributesCountProp || DEFAULT_ATTRIBUTES_COUNT;
|
|
48
50
|
var attributesList = (0, mdm_sdk_1.getAttributesListForReadMode)(filteredAttrTypes, entity);
|
|
49
51
|
var isShowAttributeList = attributesList.filter(function (_a) {
|
|
50
52
|
var values = _a.values;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AttributesViewProps } from '../../types';
|
|
3
3
|
type Props = Omit<AttributesViewProps, 'mode' | 'pinnedAttributes'>;
|
|
4
|
-
declare const AttributesView: ({ className, entity, caption, excludeUris, includeUris, attributesCount }: Props) => JSX.Element;
|
|
4
|
+
declare const AttributesView: ({ className, entity, caption, excludeUris, includeUris, attributesCount: attributesCountProp }: Props) => JSX.Element;
|
|
5
5
|
export default AttributesView;
|
|
@@ -10,13 +10,15 @@ import FacetViewHeader from '../../../FacetViewHeader/FacetViewHeader';
|
|
|
10
10
|
import AttributesList from '../AttributesList';
|
|
11
11
|
import { getFilteredAttrTypes } from '../../helpers/attributesView';
|
|
12
12
|
import { useStyles } from './styles';
|
|
13
|
+
var DEFAULT_ATTRIBUTES_COUNT = 16;
|
|
13
14
|
var AttributesView = function (_a) {
|
|
14
15
|
var _b;
|
|
15
|
-
var className = _a.className, _c = _a.entity, entity = _c === void 0 ? {} : _c, _d = _a.caption, caption = _d === void 0 ? '' : _d, _e = _a.excludeUris, excludeUris = _e === void 0 ? [] : _e, _f = _a.includeUris, includeUris = _f === void 0 ? [] : _f,
|
|
16
|
+
var className = _a.className, _c = _a.entity, entity = _c === void 0 ? {} : _c, _d = _a.caption, caption = _d === void 0 ? '' : _d, _e = _a.excludeUris, excludeUris = _e === void 0 ? [] : _e, _f = _a.includeUris, includeUris = _f === void 0 ? [] : _f, attributesCountProp = _a.attributesCount;
|
|
16
17
|
var styles = useStyles();
|
|
17
18
|
var metadata = useMdmMetadata();
|
|
18
19
|
var pivotingAttributes = useMdmPivotingAttributes();
|
|
19
20
|
var filteredAttrTypes = useMemo(function () { return getFilteredAttrTypes(metadata, entity.type, includeUris, excludeUris); }, [excludeUris, includeUris, metadata, entity.type]);
|
|
21
|
+
var attributesCount = attributesCountProp || DEFAULT_ATTRIBUTES_COUNT;
|
|
20
22
|
var attributesList = getAttributesListForReadMode(filteredAttrTypes, entity);
|
|
21
23
|
var isShowAttributeList = attributesList.filter(function (_a) {
|
|
22
24
|
var values = _a.values;
|