@reltio/components 1.4.1989 → 1.4.1990
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/ActionsPanel/ActionsPanel.test.js +1 -1
- package/cjs/ActionsPanel/types.d.ts +2 -1
- package/cjs/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.js +1 -1
- package/cjs/AttributesFiltersButton/AttributesFiltersButton.js +3 -3
- package/cjs/AttributesFiltersButton/AttributesFiltersButton.test.js +2 -2
- package/cjs/AutoSizeList/AutoSizeList.js +6 -6
- package/cjs/BooleanRadioEditor/BooleanRadioEditor.test.js +2 -2
- package/cjs/DependentLookupEditor/DependentLookupEditor.js +2 -1
- package/cjs/DependentLookupEditor/DependentLookupEditor.test.js +1 -1
- package/cjs/DropDownMenuButton/DropDownMenuButton.d.ts +1 -1
- package/cjs/DropDownMenuButton/DropDownMenuButton.js +6 -1
- package/cjs/DropDownSelector/DropDownSelector.test.js +0 -5
- package/cjs/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +1 -1
- package/cjs/EditModeAttributesList/EditModeAttributesList.test.js +1 -6
- package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.test.js +2 -0
- package/cjs/EditModeComplexAttribute/EditModeComplexAttribute.test.js +2 -6
- package/cjs/EmptyState/EmptyState.test.js +1 -1
- package/cjs/EntitySelector/EntitySelector.test.js +237 -113
- package/cjs/ErrorBoundary/ErrorBoundary.test.js +2 -2
- package/cjs/HOCs/withFilter/components/ColumnFilter/ColumnFilter.js +6 -1
- package/cjs/ImageAttributesLine/types.d.ts +2 -1
- package/cjs/ImageDetailsView/helpers.test.js +0 -5
- package/cjs/ImportButton/ImportButton.test.js +1 -1
- package/cjs/InlineSimpleAttributeEditor/InlineSimpleAttributeEditor.test.js +1 -1
- package/cjs/MapChart/MapChart.js +1 -0
- package/cjs/Marginator/Marginator.d.ts +1 -1
- package/cjs/MultiSelect/MultiSelect.js +1 -1
- package/cjs/MultipliableSelect/MultipliableSelect.js +1 -3
- package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +1 -1
- package/cjs/ProfileBand/ProfileBand.js +1 -1
- package/cjs/ProfilesList/ProfilesList.spec.js +1 -2
- package/cjs/RCTree/RCTree.d.ts +2 -2
- package/cjs/RCTree/RCTree.js +0 -3
- package/cjs/ReactSortableTree/ReactSortableTree.js +2 -2
- package/cjs/ReactSortableTree/components/NodeRendererDefault/NodeRendererDefault.js +1 -3
- package/cjs/ReactSortableTree/components/TreeNode/TreeNode.js +1 -3
- package/cjs/ReactSortableTree/components/TreePlaceholder/TreePlaceholder.js +0 -1
- package/cjs/ReactSortableTree/helpers/generic.js +0 -1
- package/cjs/ReactSortableTree/helpers/tree.js +1 -1
- package/cjs/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.d.ts +2 -2
- package/cjs/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.test.js +2 -2
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -6
- package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +3 -3
- package/cjs/RelationEditor/IntegrationRelationEditor.test.js +1 -1
- package/cjs/ReltioMap/ReltioMap.d.ts +1 -1
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.test.js +0 -1
- package/cjs/TableSkeleton/TableSkeleton.d.ts +1 -1
- package/cjs/TenantLabel/TenantLabel.spec.js +3 -3
- package/cjs/VirtualGroupedList/VirtualGroupedList.js +14 -5
- package/cjs/VirtualGroupedList/VirtualGroupedList.spec.js +2 -2
- package/cjs/VirtualGroupedList/useScrollToFocusItem.test.js +2 -2
- package/cjs/features/activity-log/utils/filters.test.js +1 -1
- package/cjs/features/crosswalks/AttributesTable/AttributesTable.js +8 -2
- package/cjs/features/crosswalks/AttributesTable/AttributesTable.test.js +2 -2
- package/cjs/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +1 -1
- package/cjs/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.js +6 -1
- package/cjs/features/crosswalks/AttributesTable/components/RuleTypeInfoButton/RuleTypeInfoButton.js +0 -3
- package/cjs/features/crosswalks/AttributesTable/types.d.ts +2 -1
- package/cjs/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +1 -1
- package/cjs/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +1 -1
- package/cjs/features/graph/DataModelGraph/hooks/useDataModelGraphAppearance.js +4 -5
- package/cjs/features/history/HistoryFilterButton/HistoryFilterButton.js +6 -3
- package/cjs/features/history/hooks/useHistoryTree.js +6 -3
- package/cjs/features/workflow/AddWorkflowButton/AddWorkflowButton.spec.js +2 -2
- package/cjs/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -1
- package/cjs/features/workflow/WorkflowTaskCard/WorkflowTaskCard.test.js +8 -8
- package/cjs/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.spec.js +0 -1
- package/cjs/features/workflow/WorkflowTaskCard/components/PotentialMatchTaskCard/PotentialMatchTaskCard.spec.js +2 -2
- package/cjs/features/workflow/hooks/useWorkflowAssignee.js +2 -1
- package/cjs/helpers/customScript.test.js +8 -8
- package/cjs/hooks/useKeyboardNavigation/useKeyboardNavigation.js +5 -3
- package/cjs/hooks/useMarkAsNotMatchRequest/useMarkAsNotMatchRequest.js +2 -1
- package/cjs/hooks/useMatchesColumnsData/helpers.js +3 -4
- package/cjs/hooks/useMergeAllRequest/useMergeAllRequest.js +2 -1
- package/cjs/hooks/usePagingSimulator/helpers.js +0 -1
- package/cjs/hooks/useSavedSearchesRequest/useSavedSearchesRequest.js +7 -2
- package/cjs/icons/AIPowered.d.ts +1 -2
- package/cjs/test-utils/TestStylesProvider.js +1 -2
- package/cjs/types/basicTable.d.ts +2 -2
- package/cjs/types/index.d.ts +1 -1
- package/esm/ActionsPanel/ActionsPanel.test.js +1 -1
- package/esm/ActionsPanel/types.d.ts +2 -1
- package/esm/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.js +1 -1
- package/esm/AttributesFiltersButton/AttributesFiltersButton.js +3 -3
- package/esm/AttributesFiltersButton/AttributesFiltersButton.test.js +2 -2
- package/esm/AutoSizeList/AutoSizeList.js +6 -6
- package/esm/BooleanRadioEditor/BooleanRadioEditor.test.js +2 -2
- package/esm/DependentLookupEditor/DependentLookupEditor.js +2 -1
- package/esm/DependentLookupEditor/DependentLookupEditor.test.js +1 -1
- package/esm/DropDownMenuButton/DropDownMenuButton.d.ts +1 -1
- package/esm/DropDownMenuButton/DropDownMenuButton.js +6 -1
- package/esm/DropDownSelector/DropDownSelector.test.js +0 -5
- package/esm/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +1 -1
- package/esm/EditModeAttributesList/EditModeAttributesList.test.js +1 -6
- package/esm/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.test.js +2 -0
- package/esm/EditModeComplexAttribute/EditModeComplexAttribute.test.js +2 -6
- package/esm/EmptyState/EmptyState.test.js +1 -1
- package/esm/EntitySelector/EntitySelector.test.js +237 -113
- package/esm/ErrorBoundary/ErrorBoundary.test.js +2 -2
- package/esm/HOCs/withFilter/components/ColumnFilter/ColumnFilter.js +6 -1
- package/esm/ImageAttributesLine/types.d.ts +2 -1
- package/esm/ImageDetailsView/helpers.test.js +0 -5
- package/esm/ImportButton/ImportButton.test.js +1 -1
- package/esm/InlineSimpleAttributeEditor/InlineSimpleAttributeEditor.test.js +1 -1
- package/esm/MapChart/MapChart.js +1 -0
- package/esm/Marginator/Marginator.d.ts +1 -1
- package/esm/MultiSelect/MultiSelect.js +1 -1
- package/esm/MultipliableSelect/MultipliableSelect.js +1 -3
- package/esm/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +1 -1
- package/esm/ProfileBand/ProfileBand.js +1 -1
- package/esm/ProfilesList/ProfilesList.spec.js +1 -2
- package/esm/RCTree/RCTree.d.ts +2 -2
- package/esm/RCTree/RCTree.js +0 -3
- package/esm/ReactSortableTree/ReactSortableTree.js +2 -2
- package/esm/ReactSortableTree/components/NodeRendererDefault/NodeRendererDefault.js +1 -3
- package/esm/ReactSortableTree/components/TreeNode/TreeNode.js +1 -3
- package/esm/ReactSortableTree/components/TreePlaceholder/TreePlaceholder.js +0 -1
- package/esm/ReactSortableTree/helpers/generic.js +0 -1
- package/esm/ReactSortableTree/helpers/tree.js +1 -1
- package/esm/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.d.ts +2 -2
- package/esm/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.test.js +2 -2
- package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -6
- package/esm/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +3 -3
- package/esm/RelationEditor/IntegrationRelationEditor.test.js +1 -1
- package/esm/ReltioMap/ReltioMap.d.ts +1 -1
- package/esm/SimpleAttributeEditor/SimpleAttributeEditor.test.js +0 -1
- package/esm/TableSkeleton/TableSkeleton.d.ts +1 -1
- package/esm/TenantLabel/TenantLabel.spec.js +3 -3
- package/esm/VirtualGroupedList/VirtualGroupedList.js +14 -5
- package/esm/VirtualGroupedList/VirtualGroupedList.spec.js +2 -2
- package/esm/VirtualGroupedList/useScrollToFocusItem.test.js +2 -2
- package/esm/features/activity-log/utils/filters.test.js +1 -1
- package/esm/features/crosswalks/AttributesTable/AttributesTable.js +8 -2
- package/esm/features/crosswalks/AttributesTable/AttributesTable.test.js +2 -2
- package/esm/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +1 -1
- package/esm/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.js +6 -1
- package/esm/features/crosswalks/AttributesTable/components/RuleTypeInfoButton/RuleTypeInfoButton.js +0 -3
- package/esm/features/crosswalks/AttributesTable/types.d.ts +2 -1
- package/esm/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +1 -1
- package/esm/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +1 -1
- package/esm/features/graph/DataModelGraph/hooks/useDataModelGraphAppearance.js +2 -3
- package/esm/features/history/HistoryFilterButton/HistoryFilterButton.js +6 -3
- package/esm/features/history/hooks/useHistoryTree.js +6 -3
- package/esm/features/workflow/AddWorkflowButton/AddWorkflowButton.spec.js +2 -2
- package/esm/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -1
- package/esm/features/workflow/WorkflowTaskCard/WorkflowTaskCard.test.js +8 -8
- package/esm/features/workflow/WorkflowTaskCard/components/DataChangeRequestTaskCard/DataChangeRequestTaskCard.spec.js +0 -1
- package/esm/features/workflow/WorkflowTaskCard/components/PotentialMatchTaskCard/PotentialMatchTaskCard.spec.js +2 -2
- package/esm/features/workflow/hooks/useWorkflowAssignee.js +2 -1
- package/esm/helpers/customScript.test.js +8 -8
- package/esm/hooks/useKeyboardNavigation/useKeyboardNavigation.js +5 -3
- package/esm/hooks/useMarkAsNotMatchRequest/useMarkAsNotMatchRequest.js +2 -1
- package/esm/hooks/useMatchesColumnsData/helpers.js +1 -2
- package/esm/hooks/useMergeAllRequest/useMergeAllRequest.js +2 -1
- package/esm/hooks/usePagingSimulator/helpers.js +0 -1
- package/esm/hooks/useSavedSearchesRequest/useSavedSearchesRequest.js +7 -2
- package/esm/icons/AIPowered.d.ts +1 -2
- package/esm/test-utils/TestStylesProvider.js +1 -2
- package/esm/types/basicTable.d.ts +2 -2
- package/esm/types/index.d.ts +1 -1
- package/package.json +2 -2
package/esm/RCTree/RCTree.js
CHANGED
|
@@ -16,19 +16,16 @@ export var RCTree = function (_a) {
|
|
|
16
16
|
treeRef.current.scrollTo({ key: String(scrollToNode.nodeId) });
|
|
17
17
|
}
|
|
18
18
|
}, [scrollToNode]);
|
|
19
|
-
// eslint-disable-next-line no-unused-vars
|
|
20
19
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
20
|
var handleDrop = function (_a) {
|
|
22
21
|
var node = _a.node, dragNode = _a.dragNode, dragNodesKeys = _a.dragNodesKeys;
|
|
23
22
|
// TODO: implement
|
|
24
23
|
};
|
|
25
|
-
// eslint-disable-next-line no-unused-vars
|
|
26
24
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
25
|
var handleDragEnter = function (_a) {
|
|
28
26
|
var event = _a.event, node = _a.node, expandedKeys = _a.expandedKeys;
|
|
29
27
|
// TODO: implement
|
|
30
28
|
};
|
|
31
|
-
// eslint-disable-next-line no-unused-vars
|
|
32
29
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
30
|
var dropIndicatorRender = function (_a) {
|
|
34
31
|
var dropPosition = _a.dropPosition, dropLevelOffset = _a.dropLevelOffset, indent = _a.indent, prefixCls = _a.prefixCls, direction = _a.direction;
|
|
@@ -172,7 +172,7 @@ var ReactSortableTree = /** @class */ (function (_super) {
|
|
|
172
172
|
getNodeKey: _this.props.getNodeKey
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
catch (
|
|
175
|
+
catch (_a) {
|
|
176
176
|
newTree = treeData;
|
|
177
177
|
}
|
|
178
178
|
return newTree;
|
|
@@ -675,7 +675,7 @@ ReactSortableTree.propTypes = {
|
|
|
675
675
|
searchMethod: PropTypes.func,
|
|
676
676
|
// Used by the `searchMethod` to highlight and scroll to matched nodes.
|
|
677
677
|
// Should be a string for the default `searchMethod`, but can be anything when using a custom search.
|
|
678
|
-
searchQuery: PropTypes.any,
|
|
678
|
+
searchQuery: PropTypes.any,
|
|
679
679
|
// Outline the <`searchFocusOffset`>th node and scroll to it.
|
|
680
680
|
searchFocusOffset: PropTypes.number,
|
|
681
681
|
// Get the nodes that match the search criteria. Used for counting total matches, etc.
|
|
@@ -51,9 +51,7 @@ export var NodeRendererDefault = function (_a) {
|
|
|
51
51
|
// Show a loading symbol on the handle when the children are expanded
|
|
52
52
|
// and yet still defined by a function (a callback to fetch the children)
|
|
53
53
|
handle = (React.createElement("div", { className: "rst__loadingHandle" },
|
|
54
|
-
React.createElement("div", { className: "rst__loadingCircle" }, __spreadArray([], new Array(12), true).map(function (_, index) { return (React.createElement("div", {
|
|
55
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
56
|
-
key: index, className: classnames('rst__loadingCirclePoint', rowDirectionClass) })); }))));
|
|
54
|
+
React.createElement("div", { className: "rst__loadingCircle" }, __spreadArray([], new Array(12), true).map(function (_, index) { return (React.createElement("div", { key: index, className: classnames('rst__loadingCirclePoint', rowDirectionClass) })); }))));
|
|
57
55
|
}
|
|
58
56
|
else {
|
|
59
57
|
// Show the handle used to initiate a drag-and-drop
|
|
@@ -120,9 +120,7 @@ export var TreeNode = function (_a) {
|
|
|
120
120
|
left: scaffoldBlockPxWidth * i
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
scaffold.push(React.createElement("div", {
|
|
124
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
125
|
-
key: i, style: style_1, className: classnames('rst__absoluteLineBlock', highlightLineClass, rowDirectionClass) }));
|
|
123
|
+
scaffold.push(React.createElement("div", { key: i, style: style_1, className: classnames('rst__absoluteLineBlock', highlightLineClass, rowDirectionClass) }));
|
|
126
124
|
}
|
|
127
125
|
});
|
|
128
126
|
var style;
|
|
@@ -43,7 +43,6 @@ var TreePlaceholder = /** @class */ (function (_super) {
|
|
|
43
43
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
44
44
|
}
|
|
45
45
|
TreePlaceholder.prototype.render = function () {
|
|
46
|
-
// eslint-disable-next-line no-unused-vars
|
|
47
46
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
48
47
|
var _a = this.props, children = _a.children, connectDropTarget = _a.connectDropTarget, treeId = _a.treeId, drop = _a.drop, otherProps = __rest(_a, ["children", "connectDropTarget", "treeId", "drop"]);
|
|
49
48
|
return connectDropTarget(React.createElement("div", null, Children.map(children, function (child) {
|
|
@@ -9,8 +9,8 @@ type Props = {
|
|
|
9
9
|
attributeType: AttributeType;
|
|
10
10
|
expanded?: boolean;
|
|
11
11
|
valueContainerClassName?: string;
|
|
12
|
-
LabelRenderer?: ({ attributeType, attributeValue }: SlotParams<AttributeValue>) =>
|
|
13
|
-
RightSlot?: ({ attributeType, attributeValue }: SlotParams<AttributeValue>) =>
|
|
12
|
+
LabelRenderer?: ({ attributeType, attributeValue }: SlotParams<AttributeValue>) => React.ReactElement;
|
|
13
|
+
RightSlot?: ({ attributeType, attributeValue }: SlotParams<AttributeValue>) => React.ReactElement;
|
|
14
14
|
showNonOv?: boolean;
|
|
15
15
|
};
|
|
16
16
|
declare const _default: React.MemoExoticComponent<({ expanded, LabelRenderer, RightSlot, ...props }: Props) => React.JSX.Element>;
|
|
@@ -58,8 +58,8 @@ describe('ReadOnlyAttributeValuesBlock test', function () {
|
|
|
58
58
|
attributeType: __assign(__assign({}, attributeType), { type: 'Nested' }),
|
|
59
59
|
values: values,
|
|
60
60
|
expanded: true,
|
|
61
|
-
LabelRenderer: function () { return React.createElement("span", null); },
|
|
62
|
-
RightContent: function () { return React.createElement("div", null); }
|
|
61
|
+
LabelRenderer: function () { return React.createElement("span", null); },
|
|
62
|
+
RightContent: function () { return React.createElement("div", null); }
|
|
63
63
|
};
|
|
64
64
|
var component = shallow(React.createElement(ReadOnlyAttributeValuesBlock, __assign({}, props)));
|
|
65
65
|
var attributes = component.find(ReadOnlyAttribute);
|
|
@@ -76,12 +76,7 @@ describe('ReadOnlyAttributesList tests', function () {
|
|
|
76
76
|
pagers.forEach(function (pager) {
|
|
77
77
|
expect(pager.prop('attributeType').hidden).toBeFalsy();
|
|
78
78
|
var shouldHasPaging = pager.prop('attributeType').uri === 'configuration/relationTypes/knowledge/attributes/Role';
|
|
79
|
-
|
|
80
|
-
expect(pager.prop('paging')).toBe(attributes.paging['configuration/relationTypes/knowledge/attributes/Role']);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
expect(pager.prop('paging')).toBeUndefined();
|
|
84
|
-
}
|
|
79
|
+
expect(pager.prop('paging')).toBe(shouldHasPaging ? attributes.paging['configuration/relationTypes/knowledge/attributes/Role'] : undefined);
|
|
85
80
|
});
|
|
86
81
|
});
|
|
87
82
|
it('should render pagers for attributes and analytics attributes with same name', function () {
|
|
@@ -146,7 +146,7 @@ describe('ReadOnlyAttributesPager tests', function () {
|
|
|
146
146
|
expect(screen.getByText('Simple label')).toBeInTheDocument();
|
|
147
147
|
expect(screen.getByText('123')).toBeInTheDocument();
|
|
148
148
|
expect(screen.queryByText('+ 1')).not.toBeInTheDocument();
|
|
149
|
-
|
|
149
|
+
screen.getByText('Show 1 more of remaining 1 value');
|
|
150
150
|
});
|
|
151
151
|
it('should use ImageLineRenderer for Image attribute', function () {
|
|
152
152
|
var props = __assign(__assign({}, defaultProps), { attributeType: __assign(__assign({}, defaultProps.attributeType), { type: 'Image' }), paging: {}, parentUri: 'parentUri', showNonOv: false });
|
|
@@ -224,7 +224,7 @@ describe('ReadOnlyAttributesPager tests', function () {
|
|
|
224
224
|
var props = __assign(__assign({}, defaultProps), { attributeType: __assign(__assign({}, defaultProps.attributeType), { type: 'Nested' }), values: __spreadArray(__spreadArray([], ovValues, true), [__assign(__assign({}, values[1]), { ov: false })], false), max: 1 });
|
|
225
225
|
setUp({ props: props, mdmValues: { maxValuesInResponse: 20 } });
|
|
226
226
|
expect(screen.getByTestId('show-more')).toBeInTheDocument();
|
|
227
|
-
|
|
227
|
+
screen.getByText('Show 1 more of remaining 2 value');
|
|
228
228
|
});
|
|
229
229
|
it('should use maxValuesInResponse from mdm module context if max prop does not exist', function () {
|
|
230
230
|
var ovValues = [
|
|
@@ -235,7 +235,7 @@ describe('ReadOnlyAttributesPager tests', function () {
|
|
|
235
235
|
var props = __assign(__assign({}, defaultProps), { attributeType: __assign(__assign({}, defaultProps.attributeType), { type: 'Nested' }), values: __spreadArray(__spreadArray([], ovValues, true), [__assign(__assign({}, values[1]), { ov: false })], false) });
|
|
236
236
|
setUp({ props: props, mdmValues: { maxValuesInResponse: 1 } });
|
|
237
237
|
expect(screen.getByTestId('show-more')).toBeInTheDocument();
|
|
238
|
-
|
|
238
|
+
screen.getByText('Show 1 more of remaining 2 value');
|
|
239
239
|
});
|
|
240
240
|
it('should use max value as Infinity if max prop and default max value from mdm module context do not exist', function () {
|
|
241
241
|
var ovValues = [
|
|
@@ -324,7 +324,7 @@ describe('RelationEditor behaviour', function () {
|
|
|
324
324
|
return [4 /*yield*/, user.click(inputs[0])];
|
|
325
325
|
case 1:
|
|
326
326
|
_a.sent();
|
|
327
|
-
expect(typeAheadSearch).
|
|
327
|
+
expect(typeAheadSearch).toHaveBeenCalledWith([{ label: 'Address', uri: 'configuration/entityTypes/Location' }], '', {
|
|
328
328
|
globalFilter: '',
|
|
329
329
|
max: 20,
|
|
330
330
|
searchOptions: '',
|
|
@@ -7,7 +7,7 @@ type Props = {
|
|
|
7
7
|
mapKey: string;
|
|
8
8
|
defaultZoom?: GoogleMapProps['zoom'];
|
|
9
9
|
defaultCenter?: GoogleMapProps['center'];
|
|
10
|
-
loadingElement:
|
|
10
|
+
loadingElement: React.ReactElement;
|
|
11
11
|
isSearchOnMapMove?: boolean;
|
|
12
12
|
isSearchEnabled?: boolean;
|
|
13
13
|
activeOverlay?: Overlay;
|
|
@@ -163,7 +163,6 @@ describe('SimpleAttributeEditor', function () {
|
|
|
163
163
|
it('should render additional control between plus and delete buttons if additionalControlsRenderer prop is specified', function () {
|
|
164
164
|
var AdditionalControls = function () { return React.createElement("div", null); };
|
|
165
165
|
var component = mountComponent({
|
|
166
|
-
//eslint-disable-next-line
|
|
167
166
|
additionalControlsRenderer: function (_a) {
|
|
168
167
|
var attributeValue = _a.attributeValue, attributeType = _a.attributeType;
|
|
169
168
|
return (React.createElement(AdditionalControls, { attributeValue: attributeValue, attributeType: attributeType }));
|
|
@@ -3,7 +3,7 @@ import { BasicTable } from '../BasicTable';
|
|
|
3
3
|
import { ColumnData, RenderRowCellProps } from '../types/basicTable';
|
|
4
4
|
type Props = Omit<React.ComponentProps<typeof BasicTable>, 'rowsData' | 'renderRowCell'> & {
|
|
5
5
|
tableColumnsData: ColumnData[];
|
|
6
|
-
RowCellRenderer?: (props: RenderRowCellProps) =>
|
|
6
|
+
RowCellRenderer?: (props: RenderRowCellProps) => React.ReactElement;
|
|
7
7
|
};
|
|
8
8
|
export declare const TableSkeleton: ({ tableColumnsData, RowCellRenderer, ...props }: Props) => React.JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -29,11 +29,11 @@ describe('TenantLabel behaviour', function () {
|
|
|
29
29
|
it('should render main parts', function () {
|
|
30
30
|
var mdmValues = __assign(__assign({}, defaultMdmValues), { environment: 'tst-01' });
|
|
31
31
|
setUp({ mdmValues: mdmValues });
|
|
32
|
-
expect(screen.getByText('alenat - TST-01')).toBeInTheDocument;
|
|
33
|
-
expect(screen.getByTestId('reltio-tenant-icon')).toBeInTheDocument;
|
|
32
|
+
expect(screen.getByText('alenat - TST-01')).toBeInTheDocument();
|
|
33
|
+
expect(screen.getByTestId('reltio-tenant-icon')).toBeInTheDocument();
|
|
34
34
|
});
|
|
35
35
|
it('should render correct label when environment name is empty', function () {
|
|
36
36
|
setUp();
|
|
37
|
-
expect(screen.getByText('alenat')).toBeInTheDocument;
|
|
37
|
+
expect(screen.getByText('alenat')).toBeInTheDocument();
|
|
38
38
|
});
|
|
39
39
|
});
|
|
@@ -58,7 +58,9 @@ export var VirtualGroupedList = function (_a) {
|
|
|
58
58
|
var getItemByIndex = useCallback(function (index) { return items[index]; }, [items]);
|
|
59
59
|
useEffect(function () {
|
|
60
60
|
requestAnimationFrame(function () {
|
|
61
|
-
|
|
61
|
+
if (listRef.current) {
|
|
62
|
+
listRef.current.scrollTo(0);
|
|
63
|
+
}
|
|
62
64
|
});
|
|
63
65
|
}, [items.length]);
|
|
64
66
|
useEffect(function () {
|
|
@@ -73,7 +75,9 @@ export var VirtualGroupedList = function (_a) {
|
|
|
73
75
|
};
|
|
74
76
|
}
|
|
75
77
|
};
|
|
76
|
-
|
|
78
|
+
if (listRef.current) {
|
|
79
|
+
listRef.current.resetAfterIndex(0);
|
|
80
|
+
}
|
|
77
81
|
setTitleWidth();
|
|
78
82
|
var scrollToOffset = calcMoveToOffset(items);
|
|
79
83
|
if (scrollToOffset && scrollToOffset.offset && listRef.current) {
|
|
@@ -81,7 +85,9 @@ export var VirtualGroupedList = function (_a) {
|
|
|
81
85
|
var offset_1 = scrollToOffset.offset - titleHeight_1;
|
|
82
86
|
if (offset_1 < listRef.current.state.scrollOffset || offset_1 > listRef.current.state.scrollOffset + height) {
|
|
83
87
|
requestAnimationFrame(function () {
|
|
84
|
-
|
|
88
|
+
if (listRef.current) {
|
|
89
|
+
listRef.current.scrollTo(offset_1 - (height - titleHeight_1) / 2);
|
|
90
|
+
}
|
|
85
91
|
});
|
|
86
92
|
}
|
|
87
93
|
}
|
|
@@ -118,7 +124,7 @@ export var VirtualGroupedList = function (_a) {
|
|
|
118
124
|
}
|
|
119
125
|
};
|
|
120
126
|
var setTitleByIndex = function (index) {
|
|
121
|
-
titlesRef.current
|
|
127
|
+
if (titlesRef.current) {
|
|
122
128
|
__spreadArray([], titlesRef.current.querySelectorAll('.' + stickyItemClass), true).forEach(function (title) {
|
|
123
129
|
if (title.dataset.index === index.toString()) {
|
|
124
130
|
title.style.visibility = 'visible';
|
|
@@ -127,6 +133,7 @@ export var VirtualGroupedList = function (_a) {
|
|
|
127
133
|
else
|
|
128
134
|
title.style.visibility = 'hidden';
|
|
129
135
|
});
|
|
136
|
+
}
|
|
130
137
|
};
|
|
131
138
|
var getOffsetByIndex = function (index) {
|
|
132
139
|
calcOffsetsToIndex(index);
|
|
@@ -138,7 +145,9 @@ export var VirtualGroupedList = function (_a) {
|
|
|
138
145
|
return;
|
|
139
146
|
var topItem = getItemByOffset(scrollOffset);
|
|
140
147
|
var currentTitleIndex = topItem && getTitleByIndex(topItem.index);
|
|
141
|
-
currentTitleIndex !== null
|
|
148
|
+
if (currentTitleIndex !== null) {
|
|
149
|
+
setTitleByIndex(currentTitleIndex);
|
|
150
|
+
}
|
|
142
151
|
setTitleWidth();
|
|
143
152
|
var titleHeight = currentTitleIndex !== null && getItemSize(currentTitleIndex, getItemByIndex(currentTitleIndex).item);
|
|
144
153
|
var itemAfterTitle = getItemByOffset(scrollOffset + titleHeight + currentTitleParams.topMargin);
|
|
@@ -218,7 +218,7 @@ describe('VirtualGroupedList tests', function () {
|
|
|
218
218
|
expect(scrollToSpy).toHaveBeenCalledWith(0);
|
|
219
219
|
window.requestAnimationFrame.mockRestore();
|
|
220
220
|
});
|
|
221
|
-
it('should change fixed title on forward scroll
|
|
221
|
+
it('should change fixed title on forward scroll', function () {
|
|
222
222
|
var component = mount(React.createElement(VirtualGroupedList, __assign({}, getItems('grouped'), defaultParams, { height: 150 })));
|
|
223
223
|
var fixedTitles = findClassName(component, itemTitleClass);
|
|
224
224
|
var titlesWrapper = findClassName(component, stickyTitlesWrapper);
|
|
@@ -244,7 +244,7 @@ describe('VirtualGroupedList tests', function () {
|
|
|
244
244
|
expect(fixedTitles.at(0).getDOMNode().style).toHaveProperty('visibility', 'visible');
|
|
245
245
|
expect(fixedTitles.at(1).getDOMNode().style).toHaveProperty('visibility', 'hidden');
|
|
246
246
|
});
|
|
247
|
-
it('should change fixed title on backward scroll
|
|
247
|
+
it('should change fixed title on backward scroll', function () {
|
|
248
248
|
var component = mount(React.createElement(VirtualGroupedList, __assign({}, getItems('grouped'), defaultParams, { height: 150 })));
|
|
249
249
|
var fixedTitles = findClassName(component, itemTitleClass);
|
|
250
250
|
var titlesWrapper = findClassName(component, stickyTitlesWrapper);
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { renderHook, act } from '@testing-library/react-hooks';
|
|
13
13
|
import { useScrollToFocusItem } from './useScrollToFocusItem';
|
|
14
14
|
describe('useScrollToFocusItem hook test', function () {
|
|
15
|
-
it('should correctly call scrollToItem when focus move to down of list
|
|
15
|
+
it('should correctly call scrollToItem when focus move to down of list', function () {
|
|
16
16
|
var scrollToItem = jest.fn();
|
|
17
17
|
var initialProps = {
|
|
18
18
|
items: new Array(15).fill(0),
|
|
@@ -26,7 +26,7 @@ describe('useScrollToFocusItem hook test', function () {
|
|
|
26
26
|
rerender(__assign(__assign({}, initialProps), { focusIndex: 4 }));
|
|
27
27
|
expect(scrollToItem).toHaveBeenCalledWith(7, 'end');
|
|
28
28
|
});
|
|
29
|
-
it('should correctly call scrollToItem when focus move to up of list
|
|
29
|
+
it('should correctly call scrollToItem when focus move to up of list', function () {
|
|
30
30
|
var scrollToItem = jest.fn();
|
|
31
31
|
var initialProps = {
|
|
32
32
|
items: new Array(15).fill(0),
|
|
@@ -166,7 +166,7 @@ describe('filter utils tests', function () {
|
|
|
166
166
|
.valueOf(), ")) and (not equals(user, 'collaboration-service'))");
|
|
167
167
|
expect(buildActivitiesFilterString(filter)).toEqual(expectedResult);
|
|
168
168
|
});
|
|
169
|
-
it('should return empty string for invalid dateRange
|
|
169
|
+
it('should return empty string for invalid dateRange', function () {
|
|
170
170
|
var filter = {
|
|
171
171
|
dateRange: {
|
|
172
172
|
type: 'between',
|
|
@@ -69,7 +69,12 @@ var AttributesTable = function (_a) {
|
|
|
69
69
|
var _m = useState(null), pendingDeletion = _m[0], setPendingDeletion = _m[1];
|
|
70
70
|
var _o = useState(null), pendingIgnoredEditing = _o[0], setPendingIgnoredEditing = _o[1];
|
|
71
71
|
var handleEdit = useCallback(function (event) {
|
|
72
|
-
event.attributeValue.ignored
|
|
72
|
+
if (event.attributeValue.ignored) {
|
|
73
|
+
setPendingIgnoredEditing(event);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
onEdit(event);
|
|
77
|
+
}
|
|
73
78
|
}, [onEdit, setPendingIgnoredEditing]);
|
|
74
79
|
var handleReorderAttributeTypes = useCallback(function (oldPosition, newPosition) {
|
|
75
80
|
onSelectAttributeTypes(move(oldPosition, newPosition, selectedAttributeTypes));
|
|
@@ -112,7 +117,8 @@ var AttributesTable = function (_a) {
|
|
|
112
117
|
React.createElement(BasicTable, { fixFirstColumn: true, headRowHeight: 48, defaultColumnWidth: 250, defaultColumnMinWidth: 200, columnsData: visibleColumnsData, dndRowReorderingEnabled: false, dndRowReorderingHandler: handleReorderAttributeTypes, getIdFromRowValue: getIdFromRowValue, rowsData: rowsData, renderRowCell: renderRowCell, getRowCellHeight: getRowCellHeight, context: tableContext })),
|
|
113
118
|
React.createElement(ConfirmDeleteDialog, { open: !!pendingDeletion, onClose: function () { return setPendingDeletion(null); }, onConfirm: handleDelete }),
|
|
114
119
|
React.createElement(ConfirmEditIgnoredDialog, { open: !!pendingIgnoredEditing, onClose: function () { return setPendingIgnoredEditing(null); }, onConfirmEditWithIgnore: function () { return pendingIgnoredEditing && onEdit(pendingIgnoredEditing); }, onConfirmEditWithoutIgnore: function () {
|
|
115
|
-
|
|
120
|
+
if (pendingIgnoredEditing)
|
|
121
|
+
onEdit(__assign(__assign({}, pendingIgnoredEditing), { clearAttributeFlags: true }));
|
|
116
122
|
} })));
|
|
117
123
|
};
|
|
118
124
|
export default memo(AttributesTable);
|
|
@@ -332,7 +332,7 @@ describe('AttributesTable tests', function () {
|
|
|
332
332
|
expect(props.onEdit).not.toHaveBeenCalled();
|
|
333
333
|
expect(wrapper.find(ConfirmEditIgnoredDialog).prop('open')).toBe(true);
|
|
334
334
|
});
|
|
335
|
-
it('should call props.onEdit if confirmed editing attribute with ignored
|
|
335
|
+
it('should call props.onEdit if confirmed editing attribute with ignored', function () {
|
|
336
336
|
var _a, _b;
|
|
337
337
|
var wrapper = mount(React.createElement(AttributesTable, __assign({}, props)));
|
|
338
338
|
var onEdit = wrapper.find('AttributeValuesRenderer').at(0).prop('onEdit');
|
|
@@ -353,7 +353,7 @@ describe('AttributesTable tests', function () {
|
|
|
353
353
|
expect(props.onEdit).toHaveBeenCalledWith(editEvent);
|
|
354
354
|
expect(props.onIgnore).not.toHaveBeenCalled();
|
|
355
355
|
});
|
|
356
|
-
it('should call props.onEdit and props.onIgnore if confirmed editing attribute without ignored
|
|
356
|
+
it('should call props.onEdit and props.onIgnore if confirmed editing attribute without ignored', function () {
|
|
357
357
|
var _a, _b;
|
|
358
358
|
var wrapper = mount(React.createElement(AttributesTable, __assign({}, props)));
|
|
359
359
|
var onEdit = wrapper.find('AttributeValuesRenderer').at(0).prop('onEdit');
|
|
@@ -165,7 +165,7 @@ describe('attribute table tests', function () {
|
|
|
165
165
|
afterEach(function () {
|
|
166
166
|
jest.clearAllMocks();
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
it.skip('should drag and drop rows correctly', function () {
|
|
169
169
|
jest.useFakeTimers();
|
|
170
170
|
var unmockTableSizing = mockBasicTableSizing();
|
|
171
171
|
var onSelectAttributeTypes = jest.fn();
|
|
@@ -28,7 +28,12 @@ export var ConfirmEditIgnoredDialog = function (_a) {
|
|
|
28
28
|
React.createElement(DialogActions, null,
|
|
29
29
|
React.createElement(Button, { onClick: onClose, color: "primary" }, i18n.text('Cancel')),
|
|
30
30
|
React.createElement(Button, { onClick: function () {
|
|
31
|
-
option === 'with'
|
|
31
|
+
if (option === 'with') {
|
|
32
|
+
onConfirmEditWithIgnore();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
onConfirmEditWithoutIgnore();
|
|
36
|
+
}
|
|
32
37
|
onClose();
|
|
33
38
|
}, color: "primary" }, i18n.text('Ok')))));
|
|
34
39
|
};
|
package/esm/features/crosswalks/AttributesTable/components/RuleTypeInfoButton/RuleTypeInfoButton.js
CHANGED
|
@@ -36,7 +36,6 @@ var getInfoTitle = cond([
|
|
|
36
36
|
var getInfoContent = cond([
|
|
37
37
|
[
|
|
38
38
|
prop('sourcesUriOrder'),
|
|
39
|
-
// eslint-disable-next-line react/display-name
|
|
40
39
|
function (_a, metadata) {
|
|
41
40
|
var sourcesUriOrder = _a.sourcesUriOrder;
|
|
42
41
|
return React.createElement(SourcesRenderer, { metadata: metadata, sourcesUriOrder: sourcesUriOrder });
|
|
@@ -44,7 +43,6 @@ var getInfoContent = cond([
|
|
|
44
43
|
],
|
|
45
44
|
[
|
|
46
45
|
prop('primaryAttributeUri'),
|
|
47
|
-
// eslint-disable-next-line react/display-name
|
|
48
46
|
function (_a, metadata) {
|
|
49
47
|
var primaryAttributeUri = _a.primaryAttributeUri;
|
|
50
48
|
return (React.createElement(AttributeRenderer, { metadata: metadata, attributeUri: primaryAttributeUri }));
|
|
@@ -52,7 +50,6 @@ var getInfoContent = cond([
|
|
|
52
50
|
],
|
|
53
51
|
[
|
|
54
52
|
prop('comparisonAttributeUri'),
|
|
55
|
-
// eslint-disable-next-line react/display-name
|
|
56
53
|
function (_a, metadata) {
|
|
57
54
|
var comparisonAttributeUri = _a.comparisonAttributeUri;
|
|
58
55
|
return (React.createElement(AttributeRenderer, { metadata: metadata, attributeUri: comparisonAttributeUri }));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { AttributeType, AttributeValue, Crosswalk, SurvivorStrategy } from '@reltio/mdm-sdk';
|
|
2
3
|
import { AddInlineAttributeEvent, DeleteInlineAttributeEvent, EditInlineAttributeEvent, IgnoreInlineAttributeEvent, PinInlineAttributeEvent } from '../../../types/inlineAttributes';
|
|
3
4
|
import { ColumnData, RenderRowCellProps } from '../../../types/basicTable';
|
|
@@ -43,7 +44,7 @@ type CellValueRendererProps = {
|
|
|
43
44
|
[key: string]: unknown;
|
|
44
45
|
};
|
|
45
46
|
export type RowCellRendererProps = RenderRowCellProps & {
|
|
46
|
-
CellValueRenderer: (props: CellValueRendererProps) =>
|
|
47
|
+
CellValueRenderer: (props: CellValueRendererProps) => React.ReactElement;
|
|
47
48
|
columnData: AttributesTableColumnData;
|
|
48
49
|
rowValue: AttributesTableRowValue;
|
|
49
50
|
};
|
|
@@ -150,7 +150,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
150
150
|
wrapper.find(SmallIconButtonWithTooltip).find('button').simulate('click');
|
|
151
151
|
expect(toggleCrosswalkFocus).toHaveBeenCalledTimes(1);
|
|
152
152
|
});
|
|
153
|
-
it('should render dependent icon if isDependent prop is true
|
|
153
|
+
it('should render dependent icon if isDependent prop is true', function () {
|
|
154
154
|
var dependentProps = {
|
|
155
155
|
crosswalk: crosswalk,
|
|
156
156
|
isDependent: true,
|
|
@@ -204,7 +204,7 @@ describe('SourceCrosswalksRow tests', function () {
|
|
|
204
204
|
expect(row.prop('isColored')).toBe(false);
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
|
-
it('should expand crosswalks if highlighted crosswalks contains dependent crosswalk
|
|
207
|
+
it('should expand crosswalks if highlighted crosswalks contains dependent crosswalk', function () {
|
|
208
208
|
var dependentCrosswalk = {
|
|
209
209
|
uri: 'entities/2/crosswalks/3',
|
|
210
210
|
value: '789',
|
|
@@ -19,8 +19,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
21
|
import { useEffect, useMemo, useState } from 'react';
|
|
22
|
-
import { useSigmaContext } from '@react-sigma/core';
|
|
23
|
-
import { useRegisterEvents, useSetSettings, useSigma } from '@react-sigma/core';
|
|
22
|
+
import { useSigmaContext, useRegisterEvents, useSetSettings, useSigma } from '@react-sigma/core';
|
|
24
23
|
import { svg2Url } from '@reltio/mdm-sdk';
|
|
25
24
|
import { DataModelGraphNodeType } from '../../types/graphDataTypes';
|
|
26
25
|
import { useLoopRenderer } from '../../hooks/useLoopRenderer';
|
|
@@ -86,7 +85,7 @@ export var useDataModelGraphAppearance = function (_a) {
|
|
|
86
85
|
try {
|
|
87
86
|
selectedNodeNeighbours = graph.neighbors(selectedNode);
|
|
88
87
|
}
|
|
89
|
-
catch (
|
|
88
|
+
catch (_a) {
|
|
90
89
|
//do nothing
|
|
91
90
|
}
|
|
92
91
|
setSettings({
|
|
@@ -51,9 +51,12 @@ export var HistoryFilterButton = function (_a) {
|
|
|
51
51
|
setIsOpen(function (open) { return !open; });
|
|
52
52
|
}, []);
|
|
53
53
|
var applyButtonHandler = useCallback(function () {
|
|
54
|
-
dateRange && isDateRangeValid(dateRange)
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
if (dateRange && isDateRangeValid(dateRange)) {
|
|
55
|
+
onApplyFilter(currentValue);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
onApplyFilter(dissoc('dateRange', currentValue));
|
|
59
|
+
}
|
|
57
60
|
togglePopup();
|
|
58
61
|
}, [currentValue, dateRange, onApplyFilter, togglePopup]);
|
|
59
62
|
var clearAllButtonHandler = useCallback(function () {
|
|
@@ -65,9 +65,12 @@ export var useHistoryTree = function (_a) {
|
|
|
65
65
|
if (!relatedLane)
|
|
66
66
|
return;
|
|
67
67
|
var lifeTimeLength = relatedLane.lifeTime.length;
|
|
68
|
-
lifeTimeLength
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
if (lifeTimeLength) {
|
|
69
|
+
startNewLife(relatedLane.lifeTime, change);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
endLife(relatedLane.lifeTime, change);
|
|
73
|
+
}
|
|
71
74
|
rows.push({
|
|
72
75
|
uri: uri,
|
|
73
76
|
user: change.user,
|
|
@@ -50,7 +50,7 @@ describe('AddWorkflowButton tests', function () {
|
|
|
50
50
|
} }) });
|
|
51
51
|
var mdmValues = __assign(__assign({}, defaultMdmValues), { user: user });
|
|
52
52
|
var component = setUp(mdmValues);
|
|
53
|
-
expect(component.isEmptyRender());
|
|
53
|
+
expect(component.isEmptyRender()).toBeTruthy();
|
|
54
54
|
});
|
|
55
55
|
it('should not render button if "workflow:config.definition" permission is missing', function () {
|
|
56
56
|
var user = __assign(__assign({}, defaultUser), { userPermissions: __assign(__assign({}, defaultUser.userPermissions), { permissions: {
|
|
@@ -60,7 +60,7 @@ describe('AddWorkflowButton tests', function () {
|
|
|
60
60
|
} }) });
|
|
61
61
|
var mdmValues = __assign(__assign({}, defaultMdmValues), { user: user });
|
|
62
62
|
var component = setUp(mdmValues);
|
|
63
|
-
expect(component.isEmptyRender());
|
|
63
|
+
expect(component.isEmptyRender()).toBeTruthy();
|
|
64
64
|
});
|
|
65
65
|
it('should render main parts correctly if all permissions exists', function () {
|
|
66
66
|
var component = setUp();
|
|
@@ -160,7 +160,7 @@ describe('AssigneeSelector tests', function () {
|
|
|
160
160
|
return [4 /*yield*/, screen.findByText('user2')];
|
|
161
161
|
case 3:
|
|
162
162
|
_a.sent();
|
|
163
|
-
return [4 /*yield*/, user.
|
|
163
|
+
return [4 /*yield*/, user.paste('USER2')];
|
|
164
164
|
case 4:
|
|
165
165
|
_a.sent();
|
|
166
166
|
expect(screen.getByText('user2')).toBeInTheDocument();
|
|
@@ -168,9 +168,9 @@ describe('WorkflowTaskCard tests', function () {
|
|
|
168
168
|
return [4 /*yield*/, user.click(screen.getByRole('button'))];
|
|
169
169
|
case 1:
|
|
170
170
|
_a.sent();
|
|
171
|
-
|
|
171
|
+
screen.getByText('Data Change Request Review');
|
|
172
172
|
expect(screen.getByTestId('info-block')).toHaveTextContent('DCR ID: 123Created by: egorshkov on 01/14/2022Step: DCR Review');
|
|
173
|
-
|
|
173
|
+
screen.getByText('new1 new1 - 123111');
|
|
174
174
|
return [2 /*return*/];
|
|
175
175
|
}
|
|
176
176
|
});
|
|
@@ -178,24 +178,24 @@ describe('WorkflowTaskCard tests', function () {
|
|
|
178
178
|
it('should render card for potentialMatchReview', function () {
|
|
179
179
|
var task = __assign(__assign({}, defaultTask), { processType: PredefinedWorkflowProcessType.potentialMatchReview, displayName: 'Match Review', processDefinitionDisplayName: 'Potential Match Review' });
|
|
180
180
|
setUp(task);
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
screen.getByRole('button');
|
|
182
|
+
screen.getByText('Potential Match Review');
|
|
183
183
|
expect(screen.getByTestId('info-block')).toHaveTextContent('Created by: egorshkov on 01/14/2022Step: Match Review');
|
|
184
184
|
});
|
|
185
185
|
it('should render card for recommendForDelete', function () {
|
|
186
186
|
var task = __assign(__assign({}, defaultTask), { processType: PredefinedWorkflowProcessType.recommendForDelete, displayName: 'Delete Review', processDefinitionDisplayName: 'Recommend for Delete' });
|
|
187
187
|
setUp(task);
|
|
188
188
|
expect(screen.getByTestId('delete-request-task-icon')).toBeInTheDocument();
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
screen.getByRole('button');
|
|
190
|
+
screen.getByText('Recommend for Delete');
|
|
191
191
|
expect(screen.getByTestId('info-block')).toHaveTextContent('Created by: egorshkov on 01/14/2022Step: Delete Review');
|
|
192
192
|
});
|
|
193
193
|
it('should render GenericWorkflowTaskCard for all other cases', function () {
|
|
194
194
|
var task = __assign(__assign({}, defaultTask), { processType: 'some custom type', displayName: 'Some Custom Task', processDefinitionDisplayName: 'Some Custom Task Definition' });
|
|
195
195
|
setUp(task);
|
|
196
196
|
expect(screen.getByTestId('default-task-icon')).toBeInTheDocument();
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
screen.getByRole('button');
|
|
198
|
+
screen.getByText('Some Custom Task Definition');
|
|
199
199
|
expect(screen.getByTestId('info-block')).toHaveTextContent('Created by: egorshkov on 01/14/2022Step: Some Custom Task');
|
|
200
200
|
});
|
|
201
201
|
});
|
|
@@ -54,7 +54,6 @@ import DcrTaskIcon from '../../../../../icons/DcrTaskIcon';
|
|
|
54
54
|
import { LineDecorator } from '../../../LineDecorator';
|
|
55
55
|
import { AttributesChanges } from '../../../AttributesChanges';
|
|
56
56
|
import { DataChangeRequestTaskCard } from './DataChangeRequestTaskCard';
|
|
57
|
-
//eslint-disable-next-line
|
|
58
57
|
jest.mock('../GenericWorkflowTaskCard', function () { return ({
|
|
59
58
|
// eslint-disable-next-line
|
|
60
59
|
GenericWorkflowTaskCard: function (_a) {
|
|
@@ -119,8 +119,8 @@ describe('PotentialMatchTaskCard tests', function () {
|
|
|
119
119
|
_a = setUp(), user = _a.user, container = _a.container;
|
|
120
120
|
infos = container.querySelectorAll('.info');
|
|
121
121
|
expect(screen.getByText('Potential Match Review')).toBeInTheDocument();
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
screen.getByText('01/22/2022');
|
|
123
|
+
screen.queryByText('Test Entity');
|
|
124
124
|
expect(screen.queryByTestId('profile-match-card')).not.toBeInTheDocument();
|
|
125
125
|
expect(infos[0]).toHaveTextContent('Created by: egorshkov on 01/14/2022');
|
|
126
126
|
expect(infos[1]).toHaveTextContent('Step: PM review');
|
|
@@ -25,7 +25,8 @@ export var useWorkflowAssignee = function (_a) {
|
|
|
25
25
|
var checkWorkflowPermission = useWorkflowCheckPermission();
|
|
26
26
|
var canUpdateTask = checkWorkflowPermission('UPDATE_TASK') && isOpenTask(isOpen);
|
|
27
27
|
useEffect(function () {
|
|
28
|
-
|
|
28
|
+
if (showCurrentAssignee)
|
|
29
|
+
setCurrentAssignee(assigneeToValue(assignee));
|
|
29
30
|
}, [assignee]);
|
|
30
31
|
var getAssignees = useCallback(function (text) {
|
|
31
32
|
if (workflowPath && canUpdateTask && taskId) {
|