@reltio/components 1.4.2132 → 1.4.2134
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/AttributesFiltersBuilder/AttributesFiltersBuilder.d.ts +2 -2
- package/AttributesFiltersButton/AttributesFiltersButton.d.ts +2 -2
- package/HOCs/withFilter/components/ColumnFilter/ColumnFilter.js +3 -2
- package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.d.ts +2 -2
- package/cjs/AttributesFiltersButton/AttributesFiltersButton.d.ts +2 -2
- package/cjs/HOCs/withFilter/components/ColumnFilter/ColumnFilter.js +2 -1
- package/cjs/helpers/attributesSelector.d.ts +1 -1
- package/cjs/helpers/attributesSelector.js +1 -1
- package/helpers/attributesSelector.d.ts +1 -1
- package/helpers/attributesSelector.js +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SearchFilter } from '@reltio/mdm-sdk';
|
|
3
3
|
import { AttributeSelectionInfo, AttributeSelectorItemsGroup, AttributesFilterComponentsClasses, AttributesTypesGroup } from '../types';
|
|
4
4
|
type Props = {
|
|
5
5
|
classes?: AttributesFilterComponentsClasses;
|
|
6
6
|
filters: SearchFilter[];
|
|
7
7
|
onChange: (filters: SearchFilter[]) => void;
|
|
8
8
|
attributesTypesGroups: AttributesTypesGroup[];
|
|
9
|
-
attributesTypesGroupFilter?: (
|
|
9
|
+
attributesTypesGroupFilter?: (attributeSelectorItemsGroup: AttributeSelectorItemsGroup[]) => AttributeSelectorItemsGroup[];
|
|
10
10
|
components?: {
|
|
11
11
|
ValuesEditor?: React.ElementType;
|
|
12
12
|
FilterSelector?: React.ElementType;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SearchFilter } from '@reltio/mdm-sdk';
|
|
3
3
|
import { AttributeSelectionInfo, AttributeSelectorItemsGroup, AttributesFilterComponentsClasses, AttributesTypesGroup } from '../types';
|
|
4
4
|
type Props = {
|
|
5
5
|
classes?: AttributesFilterComponentsClasses;
|
|
6
6
|
filters: SearchFilter[];
|
|
7
7
|
onChange: (filters: SearchFilter[]) => void;
|
|
8
8
|
attributesTypesGroups: AttributesTypesGroup[];
|
|
9
|
-
attributesTypesGroupFilter?: (
|
|
9
|
+
attributesTypesGroupFilter?: (attributeSelectorItemsGroup: AttributeSelectorItemsGroup[]) => AttributeSelectorItemsGroup[];
|
|
10
10
|
components?: {
|
|
11
11
|
ValuesEditor?: React.ElementType;
|
|
12
12
|
FilterSelector?: React.ElementType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { defaultTo, pipe, prop, propEq } from 'ramda';
|
|
3
|
-
import { getDataTypeDefinitionForFilterValue, getFilterOptionLabel, getFilterOptionsForDataTypeDefinition, validateFilter } from '@reltio/mdm-sdk';
|
|
3
|
+
import { checkBasicMetadataPermission, getDataTypeDefinitionForFilterValue, getFilterOptionLabel, getFilterOptionsForDataTypeDefinition, MetadataPermissions, validateFilter } from '@reltio/mdm-sdk';
|
|
4
4
|
import Popover from '@mui/material/Popover';
|
|
5
5
|
import IconButton from '@mui/material/IconButton';
|
|
6
6
|
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
|
|
@@ -56,9 +56,10 @@ export var ColumnFilter = function (_a) {
|
|
|
56
56
|
};
|
|
57
57
|
var filterOptionValues = (_b = filterOptionsData === null || filterOptionsData === void 0 ? void 0 : filterOptionsData.map(function (filterOption) { return filterOption.value; })) !== null && _b !== void 0 ? _b : getFilterOptionsForDataTypeDefinition(dataTypeDefinition);
|
|
58
58
|
var filterOptions = filterOptionValues.map(function (value) { return ({ value: value, label: getFilterLabel(value) }); });
|
|
59
|
+
var hasReadPermission = checkBasicMetadataPermission(MetadataPermissions.READ, dataTypeDefinition);
|
|
59
60
|
return (React.createElement("div", { ref: containerRef, className: styles.columnFilter, "data-reltio-id": "column-filter" },
|
|
60
61
|
filter && (React.createElement(FilterChip, { filterValue: filter.value, filterOption: filterOptions.find(propEq('value', filter.filter)), onDelete: clearFilter, dataTypeDefinition: getFilterDataTypeDefinition(filter.filter) })),
|
|
61
|
-
|
|
62
|
+
hasReadPermission && (React.createElement(IconButton, { className: styles.dropDownButton, onClick: openFilterPopup, disableFocusRipple: true, size: "large" },
|
|
62
63
|
React.createElement(ArrowDropDownIcon, null))),
|
|
63
64
|
React.createElement(Popover, { PaperProps: {
|
|
64
65
|
style: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SearchFilter } from '@reltio/mdm-sdk';
|
|
3
3
|
import { AttributeSelectionInfo, AttributeSelectorItemsGroup, AttributesFilterComponentsClasses, AttributesTypesGroup } from '../types';
|
|
4
4
|
type Props = {
|
|
5
5
|
classes?: AttributesFilterComponentsClasses;
|
|
6
6
|
filters: SearchFilter[];
|
|
7
7
|
onChange: (filters: SearchFilter[]) => void;
|
|
8
8
|
attributesTypesGroups: AttributesTypesGroup[];
|
|
9
|
-
attributesTypesGroupFilter?: (
|
|
9
|
+
attributesTypesGroupFilter?: (attributeSelectorItemsGroup: AttributeSelectorItemsGroup[]) => AttributeSelectorItemsGroup[];
|
|
10
10
|
components?: {
|
|
11
11
|
ValuesEditor?: React.ElementType;
|
|
12
12
|
FilterSelector?: React.ElementType;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SearchFilter } from '@reltio/mdm-sdk';
|
|
3
3
|
import { AttributeSelectionInfo, AttributeSelectorItemsGroup, AttributesFilterComponentsClasses, AttributesTypesGroup } from '../types';
|
|
4
4
|
type Props = {
|
|
5
5
|
classes?: AttributesFilterComponentsClasses;
|
|
6
6
|
filters: SearchFilter[];
|
|
7
7
|
onChange: (filters: SearchFilter[]) => void;
|
|
8
8
|
attributesTypesGroups: AttributesTypesGroup[];
|
|
9
|
-
attributesTypesGroupFilter?: (
|
|
9
|
+
attributesTypesGroupFilter?: (attributeSelectorItemsGroup: AttributeSelectorItemsGroup[]) => AttributeSelectorItemsGroup[];
|
|
10
10
|
components?: {
|
|
11
11
|
ValuesEditor?: React.ElementType;
|
|
12
12
|
FilterSelector?: React.ElementType;
|
|
@@ -85,9 +85,10 @@ var ColumnFilter = function (_a) {
|
|
|
85
85
|
};
|
|
86
86
|
var filterOptionValues = (_b = filterOptionsData === null || filterOptionsData === void 0 ? void 0 : filterOptionsData.map(function (filterOption) { return filterOption.value; })) !== null && _b !== void 0 ? _b : (0, mdm_sdk_1.getFilterOptionsForDataTypeDefinition)(dataTypeDefinition);
|
|
87
87
|
var filterOptions = filterOptionValues.map(function (value) { return ({ value: value, label: getFilterLabel(value) }); });
|
|
88
|
+
var hasReadPermission = (0, mdm_sdk_1.checkBasicMetadataPermission)(mdm_sdk_1.MetadataPermissions.READ, dataTypeDefinition);
|
|
88
89
|
return (react_1.default.createElement("div", { ref: containerRef, className: styles.columnFilter, "data-reltio-id": "column-filter" },
|
|
89
90
|
filter && (react_1.default.createElement(FilterChip_1.FilterChip, { filterValue: filter.value, filterOption: filterOptions.find((0, ramda_1.propEq)('value', filter.filter)), onDelete: clearFilter, dataTypeDefinition: getFilterDataTypeDefinition(filter.filter) })),
|
|
90
|
-
|
|
91
|
+
hasReadPermission && (react_1.default.createElement(IconButton_1.default, { className: styles.dropDownButton, onClick: openFilterPopup, disableFocusRipple: true, size: "large" },
|
|
91
92
|
react_1.default.createElement(ArrowDropDown_1.default, null))),
|
|
92
93
|
react_1.default.createElement(Popover_1.default, { PaperProps: {
|
|
93
94
|
style: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AttributeType, Metadata } from '@reltio/mdm-sdk';
|
|
2
2
|
import { AttributeSelectorItemsGroup, AttributesTypesGroup } from '../types';
|
|
3
3
|
export declare const getOperationalTypeUriFromAttrTypes: (attributeTypes: AttributeType[]) => any;
|
|
4
|
-
export declare const getAttributeSelectorItems: (metadata: Metadata, attributesTypesGroups: AttributesTypesGroup[], attributesTypesGroupFilter: (
|
|
4
|
+
export declare const getAttributeSelectorItems: (metadata: Metadata, attributesTypesGroups: AttributesTypesGroup[], attributesTypesGroupFilter: (attributeSelectorItemsGroup: AttributeSelectorItemsGroup[]) => AttributeSelectorItemsGroup[]) => AttributeSelectorItemsGroup[];
|
|
@@ -73,7 +73,7 @@ var getAttributeSelectorItems = function (metadata, attributesTypesGroups, attri
|
|
|
73
73
|
};
|
|
74
74
|
});
|
|
75
75
|
return attributesTypesGroupFilter
|
|
76
|
-
? attributesTypesGroupFilter(
|
|
76
|
+
? attributesTypesGroupFilter(attributeSelectorItemsGroup)
|
|
77
77
|
: attributeSelectorItemsGroup;
|
|
78
78
|
};
|
|
79
79
|
exports.getAttributeSelectorItems = getAttributeSelectorItems;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AttributeType, Metadata } from '@reltio/mdm-sdk';
|
|
2
2
|
import { AttributeSelectorItemsGroup, AttributesTypesGroup } from '../types';
|
|
3
3
|
export declare const getOperationalTypeUriFromAttrTypes: (attributeTypes: AttributeType[]) => any;
|
|
4
|
-
export declare const getAttributeSelectorItems: (metadata: Metadata, attributesTypesGroups: AttributesTypesGroup[], attributesTypesGroupFilter: (
|
|
4
|
+
export declare const getAttributeSelectorItems: (metadata: Metadata, attributesTypesGroups: AttributesTypesGroup[], attributesTypesGroupFilter: (attributeSelectorItemsGroup: AttributeSelectorItemsGroup[]) => AttributeSelectorItemsGroup[]) => AttributeSelectorItemsGroup[];
|
|
@@ -69,6 +69,6 @@ export var getAttributeSelectorItems = function (metadata, attributesTypesGroups
|
|
|
69
69
|
};
|
|
70
70
|
});
|
|
71
71
|
return attributesTypesGroupFilter
|
|
72
|
-
? attributesTypesGroupFilter(
|
|
72
|
+
? attributesTypesGroupFilter(attributeSelectorItemsGroup)
|
|
73
73
|
: attributeSelectorItemsGroup;
|
|
74
74
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2134",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
12
12
|
"@googlemaps/markerclusterer": "^2.5.3",
|
|
13
13
|
"@react-sigma/core": "3.4.0",
|
|
14
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
14
|
+
"@reltio/mdm-sdk": "^1.4.1962",
|
|
15
15
|
"@vis.gl/react-google-maps": "^1.3.0",
|
|
16
16
|
"d3-cloud": "^1.2.5",
|
|
17
17
|
"d3-geo": "^2.0.1",
|