@reltio/components 1.4.1989 → 1.4.1991
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.d.ts +1 -3
- package/cjs/DependentLookupEditor/DependentLookupEditor.js +4 -2
- package/cjs/DependentLookupEditor/DependentLookupEditor.test.js +1 -1
- package/cjs/DependentLookupEditor/IntegrationDependentLookupEditor.test.d.ts +1 -0
- package/cjs/DependentLookupEditor/IntegrationDependentLookupEditor.test.js +142 -0
- 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.d.ts +1 -3
- package/esm/DependentLookupEditor/DependentLookupEditor.js +4 -2
- package/esm/DependentLookupEditor/DependentLookupEditor.test.js +1 -1
- package/esm/DependentLookupEditor/IntegrationDependentLookupEditor.test.d.ts +1 -0
- package/esm/DependentLookupEditor/IntegrationDependentLookupEditor.test.js +137 -0
- 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/cjs/RCTree/RCTree.js
CHANGED
|
@@ -45,19 +45,16 @@ var RCTree = function (_a) {
|
|
|
45
45
|
treeRef.current.scrollTo({ key: String(scrollToNode.nodeId) });
|
|
46
46
|
}
|
|
47
47
|
}, [scrollToNode]);
|
|
48
|
-
// eslint-disable-next-line no-unused-vars
|
|
49
48
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
50
49
|
var handleDrop = function (_a) {
|
|
51
50
|
var node = _a.node, dragNode = _a.dragNode, dragNodesKeys = _a.dragNodesKeys;
|
|
52
51
|
// TODO: implement
|
|
53
52
|
};
|
|
54
|
-
// eslint-disable-next-line no-unused-vars
|
|
55
53
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
56
54
|
var handleDragEnter = function (_a) {
|
|
57
55
|
var event = _a.event, node = _a.node, expandedKeys = _a.expandedKeys;
|
|
58
56
|
// TODO: implement
|
|
59
57
|
};
|
|
60
|
-
// eslint-disable-next-line no-unused-vars
|
|
61
58
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
62
59
|
var dropIndicatorRender = function (_a) {
|
|
63
60
|
var dropPosition = _a.dropPosition, dropLevelOffset = _a.dropLevelOffset, indent = _a.indent, prefixCls = _a.prefixCls, direction = _a.direction;
|
|
@@ -200,7 +200,7 @@ var ReactSortableTree = /** @class */ (function (_super) {
|
|
|
200
200
|
getNodeKey: _this.props.getNodeKey
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
catch (
|
|
203
|
+
catch (_a) {
|
|
204
204
|
newTree = treeData;
|
|
205
205
|
}
|
|
206
206
|
return newTree;
|
|
@@ -703,7 +703,7 @@ ReactSortableTree.propTypes = {
|
|
|
703
703
|
searchMethod: prop_types_1.default.func,
|
|
704
704
|
// Used by the `searchMethod` to highlight and scroll to matched nodes.
|
|
705
705
|
// Should be a string for the default `searchMethod`, but can be anything when using a custom search.
|
|
706
|
-
searchQuery: prop_types_1.default.any,
|
|
706
|
+
searchQuery: prop_types_1.default.any,
|
|
707
707
|
// Outline the <`searchFocusOffset`>th node and scroll to it.
|
|
708
708
|
searchFocusOffset: prop_types_1.default.number,
|
|
709
709
|
// Get the nodes that match the search criteria. Used for counting total matches, etc.
|
|
@@ -57,9 +57,7 @@ var NodeRendererDefault = function (_a) {
|
|
|
57
57
|
// Show a loading symbol on the handle when the children are expanded
|
|
58
58
|
// and yet still defined by a function (a callback to fetch the children)
|
|
59
59
|
handle = (react_1.default.createElement("div", { className: "rst__loadingHandle" },
|
|
60
|
-
react_1.default.createElement("div", { className: "rst__loadingCircle" }, __spreadArray([], new Array(12), true).map(function (_, index) { return (react_1.default.createElement("div", {
|
|
61
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
62
|
-
key: index, className: (0, classnames_1.default)('rst__loadingCirclePoint', rowDirectionClass) })); }))));
|
|
60
|
+
react_1.default.createElement("div", { className: "rst__loadingCircle" }, __spreadArray([], new Array(12), true).map(function (_, index) { return (react_1.default.createElement("div", { key: index, className: (0, classnames_1.default)('rst__loadingCirclePoint', rowDirectionClass) })); }))));
|
|
63
61
|
}
|
|
64
62
|
else {
|
|
65
63
|
// Show the handle used to initiate a drag-and-drop
|
|
@@ -149,9 +149,7 @@ var TreeNode = function (_a) {
|
|
|
149
149
|
left: scaffoldBlockPxWidth * i
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
scaffold.push(react_1.default.createElement("div", {
|
|
153
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
154
|
-
key: i, style: style_1, className: (0, classnames_1.default)('rst__absoluteLineBlock', highlightLineClass, rowDirectionClass) }));
|
|
152
|
+
scaffold.push(react_1.default.createElement("div", { key: i, style: style_1, className: (0, classnames_1.default)('rst__absoluteLineBlock', highlightLineClass, rowDirectionClass) }));
|
|
155
153
|
}
|
|
156
154
|
});
|
|
157
155
|
var style;
|
|
@@ -72,7 +72,6 @@ var TreePlaceholder = /** @class */ (function (_super) {
|
|
|
72
72
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
73
73
|
}
|
|
74
74
|
TreePlaceholder.prototype.render = function () {
|
|
75
|
-
// eslint-disable-next-line no-unused-vars
|
|
76
75
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
77
76
|
var _a = this.props, children = _a.children, connectDropTarget = _a.connectDropTarget, treeId = _a.treeId, drop = _a.drop, otherProps = __rest(_a, ["children", "connectDropTarget", "treeId", "drop"]);
|
|
78
77
|
return connectDropTarget(react_1.default.createElement("div", null, react_1.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>;
|
|
@@ -63,8 +63,8 @@ describe('ReadOnlyAttributeValuesBlock test', function () {
|
|
|
63
63
|
attributeType: __assign(__assign({}, attributeType), { type: 'Nested' }),
|
|
64
64
|
values: values,
|
|
65
65
|
expanded: true,
|
|
66
|
-
LabelRenderer: function () { return react_1.default.createElement("span", null); },
|
|
67
|
-
RightContent: function () { return react_1.default.createElement("div", null); }
|
|
66
|
+
LabelRenderer: function () { return react_1.default.createElement("span", null); },
|
|
67
|
+
RightContent: function () { return react_1.default.createElement("div", null); }
|
|
68
68
|
};
|
|
69
69
|
var component = (0, enzyme_1.shallow)(react_1.default.createElement(ReadOnlyAttributeValuesBlock_1.default, __assign({}, props)));
|
|
70
70
|
var attributes = component.find(ReadOnlyAttributesFactory_1.ReadOnlyAttribute);
|
|
@@ -81,12 +81,7 @@ describe('ReadOnlyAttributesList tests', function () {
|
|
|
81
81
|
pagers.forEach(function (pager) {
|
|
82
82
|
expect(pager.prop('attributeType').hidden).toBeFalsy();
|
|
83
83
|
var shouldHasPaging = pager.prop('attributeType').uri === 'configuration/relationTypes/knowledge/attributes/Role';
|
|
84
|
-
|
|
85
|
-
expect(pager.prop('paging')).toBe(attributes.paging['configuration/relationTypes/knowledge/attributes/Role']);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
expect(pager.prop('paging')).toBeUndefined();
|
|
89
|
-
}
|
|
84
|
+
expect(pager.prop('paging')).toBe(shouldHasPaging ? attributes.paging['configuration/relationTypes/knowledge/attributes/Role'] : undefined);
|
|
90
85
|
});
|
|
91
86
|
});
|
|
92
87
|
it('should render pagers for attributes and analytics attributes with same name', function () {
|
|
@@ -151,7 +151,7 @@ describe('ReadOnlyAttributesPager tests', function () {
|
|
|
151
151
|
expect(react_2.screen.getByText('Simple label')).toBeInTheDocument();
|
|
152
152
|
expect(react_2.screen.getByText('123')).toBeInTheDocument();
|
|
153
153
|
expect(react_2.screen.queryByText('+ 1')).not.toBeInTheDocument();
|
|
154
|
-
|
|
154
|
+
react_2.screen.getByText('Show 1 more of remaining 1 value');
|
|
155
155
|
});
|
|
156
156
|
it('should use ImageLineRenderer for Image attribute', function () {
|
|
157
157
|
var props = __assign(__assign({}, defaultProps), { attributeType: __assign(__assign({}, defaultProps.attributeType), { type: 'Image' }), paging: {}, parentUri: 'parentUri', showNonOv: false });
|
|
@@ -229,7 +229,7 @@ describe('ReadOnlyAttributesPager tests', function () {
|
|
|
229
229
|
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 });
|
|
230
230
|
setUp({ props: props, mdmValues: { maxValuesInResponse: 20 } });
|
|
231
231
|
expect(react_2.screen.getByTestId('show-more')).toBeInTheDocument();
|
|
232
|
-
|
|
232
|
+
react_2.screen.getByText('Show 1 more of remaining 2 value');
|
|
233
233
|
});
|
|
234
234
|
it('should use maxValuesInResponse from mdm module context if max prop does not exist', function () {
|
|
235
235
|
var ovValues = [
|
|
@@ -240,7 +240,7 @@ describe('ReadOnlyAttributesPager tests', function () {
|
|
|
240
240
|
var props = __assign(__assign({}, defaultProps), { attributeType: __assign(__assign({}, defaultProps.attributeType), { type: 'Nested' }), values: __spreadArray(__spreadArray([], ovValues, true), [__assign(__assign({}, values[1]), { ov: false })], false) });
|
|
241
241
|
setUp({ props: props, mdmValues: { maxValuesInResponse: 1 } });
|
|
242
242
|
expect(react_2.screen.getByTestId('show-more')).toBeInTheDocument();
|
|
243
|
-
|
|
243
|
+
react_2.screen.getByText('Show 1 more of remaining 2 value');
|
|
244
244
|
});
|
|
245
245
|
it('should use max value as Infinity if max prop and default max value from mdm module context do not exist', function () {
|
|
246
246
|
var ovValues = [
|
|
@@ -329,7 +329,7 @@ describe('RelationEditor behaviour', function () {
|
|
|
329
329
|
return [4 /*yield*/, user.click(inputs[0])];
|
|
330
330
|
case 1:
|
|
331
331
|
_a.sent();
|
|
332
|
-
expect(mdm_sdk_1.typeAheadSearch).
|
|
332
|
+
expect(mdm_sdk_1.typeAheadSearch).toHaveBeenCalledWith([{ label: 'Address', uri: 'configuration/entityTypes/Location' }], '', {
|
|
333
333
|
globalFilter: '',
|
|
334
334
|
max: 20,
|
|
335
335
|
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;
|
|
@@ -191,7 +191,6 @@ describe('SimpleAttributeEditor', function () {
|
|
|
191
191
|
it('should render additional control between plus and delete buttons if additionalControlsRenderer prop is specified', function () {
|
|
192
192
|
var AdditionalControls = function () { return react_1.default.createElement("div", null); };
|
|
193
193
|
var component = mountComponent({
|
|
194
|
-
//eslint-disable-next-line
|
|
195
194
|
additionalControlsRenderer: function (_a) {
|
|
196
195
|
var attributeValue = _a.attributeValue, attributeType = _a.attributeType;
|
|
197
196
|
return (react_1.default.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 {};
|
|
@@ -34,11 +34,11 @@ describe('TenantLabel behaviour', function () {
|
|
|
34
34
|
it('should render main parts', function () {
|
|
35
35
|
var mdmValues = __assign(__assign({}, defaultMdmValues), { environment: 'tst-01' });
|
|
36
36
|
setUp({ mdmValues: mdmValues });
|
|
37
|
-
expect(react_2.screen.getByText('alenat - TST-01')).toBeInTheDocument;
|
|
38
|
-
expect(react_2.screen.getByTestId('reltio-tenant-icon')).toBeInTheDocument;
|
|
37
|
+
expect(react_2.screen.getByText('alenat - TST-01')).toBeInTheDocument();
|
|
38
|
+
expect(react_2.screen.getByTestId('reltio-tenant-icon')).toBeInTheDocument();
|
|
39
39
|
});
|
|
40
40
|
it('should render correct label when environment name is empty', function () {
|
|
41
41
|
setUp();
|
|
42
|
-
expect(react_2.screen.getByText('alenat')).toBeInTheDocument;
|
|
42
|
+
expect(react_2.screen.getByText('alenat')).toBeInTheDocument();
|
|
43
43
|
});
|
|
44
44
|
});
|
|
@@ -87,7 +87,9 @@ var VirtualGroupedList = function (_a) {
|
|
|
87
87
|
var getItemByIndex = (0, react_1.useCallback)(function (index) { return items[index]; }, [items]);
|
|
88
88
|
(0, react_1.useEffect)(function () {
|
|
89
89
|
requestAnimationFrame(function () {
|
|
90
|
-
|
|
90
|
+
if (listRef.current) {
|
|
91
|
+
listRef.current.scrollTo(0);
|
|
92
|
+
}
|
|
91
93
|
});
|
|
92
94
|
}, [items.length]);
|
|
93
95
|
(0, react_1.useEffect)(function () {
|
|
@@ -102,7 +104,9 @@ var VirtualGroupedList = function (_a) {
|
|
|
102
104
|
};
|
|
103
105
|
}
|
|
104
106
|
};
|
|
105
|
-
|
|
107
|
+
if (listRef.current) {
|
|
108
|
+
listRef.current.resetAfterIndex(0);
|
|
109
|
+
}
|
|
106
110
|
setTitleWidth();
|
|
107
111
|
var scrollToOffset = calcMoveToOffset(items);
|
|
108
112
|
if (scrollToOffset && scrollToOffset.offset && listRef.current) {
|
|
@@ -110,7 +114,9 @@ var VirtualGroupedList = function (_a) {
|
|
|
110
114
|
var offset_1 = scrollToOffset.offset - titleHeight_1;
|
|
111
115
|
if (offset_1 < listRef.current.state.scrollOffset || offset_1 > listRef.current.state.scrollOffset + height) {
|
|
112
116
|
requestAnimationFrame(function () {
|
|
113
|
-
|
|
117
|
+
if (listRef.current) {
|
|
118
|
+
listRef.current.scrollTo(offset_1 - (height - titleHeight_1) / 2);
|
|
119
|
+
}
|
|
114
120
|
});
|
|
115
121
|
}
|
|
116
122
|
}
|
|
@@ -147,7 +153,7 @@ var VirtualGroupedList = function (_a) {
|
|
|
147
153
|
}
|
|
148
154
|
};
|
|
149
155
|
var setTitleByIndex = function (index) {
|
|
150
|
-
titlesRef.current
|
|
156
|
+
if (titlesRef.current) {
|
|
151
157
|
__spreadArray([], titlesRef.current.querySelectorAll('.' + stickyItemClass), true).forEach(function (title) {
|
|
152
158
|
if (title.dataset.index === index.toString()) {
|
|
153
159
|
title.style.visibility = 'visible';
|
|
@@ -156,6 +162,7 @@ var VirtualGroupedList = function (_a) {
|
|
|
156
162
|
else
|
|
157
163
|
title.style.visibility = 'hidden';
|
|
158
164
|
});
|
|
165
|
+
}
|
|
159
166
|
};
|
|
160
167
|
var getOffsetByIndex = function (index) {
|
|
161
168
|
calcOffsetsToIndex(index);
|
|
@@ -167,7 +174,9 @@ var VirtualGroupedList = function (_a) {
|
|
|
167
174
|
return;
|
|
168
175
|
var topItem = getItemByOffset(scrollOffset);
|
|
169
176
|
var currentTitleIndex = topItem && getTitleByIndex(topItem.index);
|
|
170
|
-
currentTitleIndex !== null
|
|
177
|
+
if (currentTitleIndex !== null) {
|
|
178
|
+
setTitleByIndex(currentTitleIndex);
|
|
179
|
+
}
|
|
171
180
|
setTitleWidth();
|
|
172
181
|
var titleHeight = currentTitleIndex !== null && getItemSize(currentTitleIndex, getItemByIndex(currentTitleIndex).item);
|
|
173
182
|
var itemAfterTitle = getItemByOffset(scrollOffset + titleHeight + currentTitleParams.topMargin);
|
|
@@ -223,7 +223,7 @@ describe('VirtualGroupedList tests', function () {
|
|
|
223
223
|
expect(scrollToSpy).toHaveBeenCalledWith(0);
|
|
224
224
|
window.requestAnimationFrame.mockRestore();
|
|
225
225
|
});
|
|
226
|
-
it('should change fixed title on forward scroll
|
|
226
|
+
it('should change fixed title on forward scroll', function () {
|
|
227
227
|
var component = (0, enzyme_1.mount)(react_1.default.createElement(VirtualGroupedList_1.VirtualGroupedList, __assign({}, getItems('grouped'), defaultParams, { height: 150 })));
|
|
228
228
|
var fixedTitles = findClassName(component, itemTitleClass);
|
|
229
229
|
var titlesWrapper = findClassName(component, stickyTitlesWrapper);
|
|
@@ -249,7 +249,7 @@ describe('VirtualGroupedList tests', function () {
|
|
|
249
249
|
expect(fixedTitles.at(0).getDOMNode().style).toHaveProperty('visibility', 'visible');
|
|
250
250
|
expect(fixedTitles.at(1).getDOMNode().style).toHaveProperty('visibility', 'hidden');
|
|
251
251
|
});
|
|
252
|
-
it('should change fixed title on backward scroll
|
|
252
|
+
it('should change fixed title on backward scroll', function () {
|
|
253
253
|
var component = (0, enzyme_1.mount)(react_1.default.createElement(VirtualGroupedList_1.VirtualGroupedList, __assign({}, getItems('grouped'), defaultParams, { height: 150 })));
|
|
254
254
|
var fixedTitles = findClassName(component, itemTitleClass);
|
|
255
255
|
var titlesWrapper = findClassName(component, stickyTitlesWrapper);
|
|
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
var react_hooks_1 = require("@testing-library/react-hooks");
|
|
15
15
|
var useScrollToFocusItem_1 = require("./useScrollToFocusItem");
|
|
16
16
|
describe('useScrollToFocusItem hook test', function () {
|
|
17
|
-
it('should correctly call scrollToItem when focus move to down of list
|
|
17
|
+
it('should correctly call scrollToItem when focus move to down of list', function () {
|
|
18
18
|
var scrollToItem = jest.fn();
|
|
19
19
|
var initialProps = {
|
|
20
20
|
items: new Array(15).fill(0),
|
|
@@ -28,7 +28,7 @@ describe('useScrollToFocusItem hook test', function () {
|
|
|
28
28
|
rerender(__assign(__assign({}, initialProps), { focusIndex: 4 }));
|
|
29
29
|
expect(scrollToItem).toHaveBeenCalledWith(7, 'end');
|
|
30
30
|
});
|
|
31
|
-
it('should correctly call scrollToItem when focus move to up of list
|
|
31
|
+
it('should correctly call scrollToItem when focus move to up of list', function () {
|
|
32
32
|
var scrollToItem = jest.fn();
|
|
33
33
|
var initialProps = {
|
|
34
34
|
items: new Array(15).fill(0),
|
|
@@ -171,7 +171,7 @@ describe('filter utils tests', function () {
|
|
|
171
171
|
.valueOf(), ")) and (not equals(user, 'collaboration-service'))");
|
|
172
172
|
expect((0, filters_1.buildActivitiesFilterString)(filter)).toEqual(expectedResult);
|
|
173
173
|
});
|
|
174
|
-
it('should return empty string for invalid dateRange
|
|
174
|
+
it('should return empty string for invalid dateRange', function () {
|
|
175
175
|
var filter = {
|
|
176
176
|
dateRange: {
|
|
177
177
|
type: 'between',
|
|
@@ -97,7 +97,12 @@ var AttributesTable = function (_a) {
|
|
|
97
97
|
var _m = (0, react_1.useState)(null), pendingDeletion = _m[0], setPendingDeletion = _m[1];
|
|
98
98
|
var _o = (0, react_1.useState)(null), pendingIgnoredEditing = _o[0], setPendingIgnoredEditing = _o[1];
|
|
99
99
|
var handleEdit = (0, react_1.useCallback)(function (event) {
|
|
100
|
-
event.attributeValue.ignored
|
|
100
|
+
if (event.attributeValue.ignored) {
|
|
101
|
+
setPendingIgnoredEditing(event);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
onEdit(event);
|
|
105
|
+
}
|
|
101
106
|
}, [onEdit, setPendingIgnoredEditing]);
|
|
102
107
|
var handleReorderAttributeTypes = (0, react_1.useCallback)(function (oldPosition, newPosition) {
|
|
103
108
|
onSelectAttributeTypes((0, ramda_1.move)(oldPosition, newPosition, selectedAttributeTypes));
|
|
@@ -140,7 +145,8 @@ var AttributesTable = function (_a) {
|
|
|
140
145
|
react_1.default.createElement(BasicTable_1.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 })),
|
|
141
146
|
react_1.default.createElement(ConfirmDeleteDialog_1.ConfirmDeleteDialog, { open: !!pendingDeletion, onClose: function () { return setPendingDeletion(null); }, onConfirm: handleDelete }),
|
|
142
147
|
react_1.default.createElement(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog, { open: !!pendingIgnoredEditing, onClose: function () { return setPendingIgnoredEditing(null); }, onConfirmEditWithIgnore: function () { return pendingIgnoredEditing && onEdit(pendingIgnoredEditing); }, onConfirmEditWithoutIgnore: function () {
|
|
143
|
-
|
|
148
|
+
if (pendingIgnoredEditing)
|
|
149
|
+
onEdit(__assign(__assign({}, pendingIgnoredEditing), { clearAttributeFlags: true }));
|
|
144
150
|
} })));
|
|
145
151
|
};
|
|
146
152
|
exports.default = (0, react_1.memo)(AttributesTable);
|
|
@@ -360,7 +360,7 @@ describe('AttributesTable tests', function () {
|
|
|
360
360
|
expect(props.onEdit).not.toHaveBeenCalled();
|
|
361
361
|
expect(wrapper.find(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog).prop('open')).toBe(true);
|
|
362
362
|
});
|
|
363
|
-
it('should call props.onEdit if confirmed editing attribute with ignored
|
|
363
|
+
it('should call props.onEdit if confirmed editing attribute with ignored', function () {
|
|
364
364
|
var _a, _b;
|
|
365
365
|
var wrapper = (0, enzyme_1.mount)(react_1.default.createElement(AttributesTable_1.default, __assign({}, props)));
|
|
366
366
|
var onEdit = wrapper.find('AttributeValuesRenderer').at(0).prop('onEdit');
|
|
@@ -381,7 +381,7 @@ describe('AttributesTable tests', function () {
|
|
|
381
381
|
expect(props.onEdit).toHaveBeenCalledWith(editEvent);
|
|
382
382
|
expect(props.onIgnore).not.toHaveBeenCalled();
|
|
383
383
|
});
|
|
384
|
-
it('should call props.onEdit and props.onIgnore if confirmed editing attribute without ignored
|
|
384
|
+
it('should call props.onEdit and props.onIgnore if confirmed editing attribute without ignored', function () {
|
|
385
385
|
var _a, _b;
|
|
386
386
|
var wrapper = (0, enzyme_1.mount)(react_1.default.createElement(AttributesTable_1.default, __assign({}, props)));
|
|
387
387
|
var onEdit = wrapper.find('AttributeValuesRenderer').at(0).prop('onEdit');
|
|
@@ -170,7 +170,7 @@ describe('attribute table tests', function () {
|
|
|
170
170
|
afterEach(function () {
|
|
171
171
|
jest.clearAllMocks();
|
|
172
172
|
});
|
|
173
|
-
|
|
173
|
+
it.skip('should drag and drop rows correctly', function () {
|
|
174
174
|
jest.useFakeTimers();
|
|
175
175
|
var unmockTableSizing = (0, test_utils_1.mockBasicTableSizing)();
|
|
176
176
|
var onSelectAttributeTypes = jest.fn();
|
|
@@ -57,7 +57,12 @@ var ConfirmEditIgnoredDialog = function (_a) {
|
|
|
57
57
|
react_1.default.createElement(DialogActions_1.default, null,
|
|
58
58
|
react_1.default.createElement(Button_1.default, { onClick: onClose, color: "primary" }, ui_i18n_1.default.text('Cancel')),
|
|
59
59
|
react_1.default.createElement(Button_1.default, { onClick: function () {
|
|
60
|
-
option === 'with'
|
|
60
|
+
if (option === 'with') {
|
|
61
|
+
onConfirmEditWithIgnore();
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
onConfirmEditWithoutIgnore();
|
|
65
|
+
}
|
|
61
66
|
onClose();
|
|
62
67
|
}, color: "primary" }, ui_i18n_1.default.text('Ok')))));
|
|
63
68
|
};
|
package/cjs/features/crosswalks/AttributesTable/components/RuleTypeInfoButton/RuleTypeInfoButton.js
CHANGED
|
@@ -65,7 +65,6 @@ var getInfoTitle = (0, ramda_1.cond)([
|
|
|
65
65
|
var getInfoContent = (0, ramda_1.cond)([
|
|
66
66
|
[
|
|
67
67
|
(0, ramda_1.prop)('sourcesUriOrder'),
|
|
68
|
-
// eslint-disable-next-line react/display-name
|
|
69
68
|
function (_a, metadata) {
|
|
70
69
|
var sourcesUriOrder = _a.sourcesUriOrder;
|
|
71
70
|
return react_1.default.createElement(SourcesRenderer, { metadata: metadata, sourcesUriOrder: sourcesUriOrder });
|
|
@@ -73,7 +72,6 @@ var getInfoContent = (0, ramda_1.cond)([
|
|
|
73
72
|
],
|
|
74
73
|
[
|
|
75
74
|
(0, ramda_1.prop)('primaryAttributeUri'),
|
|
76
|
-
// eslint-disable-next-line react/display-name
|
|
77
75
|
function (_a, metadata) {
|
|
78
76
|
var primaryAttributeUri = _a.primaryAttributeUri;
|
|
79
77
|
return (react_1.default.createElement(AttributeRenderer, { metadata: metadata, attributeUri: primaryAttributeUri }));
|
|
@@ -81,7 +79,6 @@ var getInfoContent = (0, ramda_1.cond)([
|
|
|
81
79
|
],
|
|
82
80
|
[
|
|
83
81
|
(0, ramda_1.prop)('comparisonAttributeUri'),
|
|
84
|
-
// eslint-disable-next-line react/display-name
|
|
85
82
|
function (_a, metadata) {
|
|
86
83
|
var comparisonAttributeUri = _a.comparisonAttributeUri;
|
|
87
84
|
return (react_1.default.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
|
};
|
|
@@ -178,7 +178,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
178
178
|
wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip).find('button').simulate('click');
|
|
179
179
|
expect(toggleCrosswalkFocus).toHaveBeenCalledTimes(1);
|
|
180
180
|
});
|
|
181
|
-
it('should render dependent icon if isDependent prop is true
|
|
181
|
+
it('should render dependent icon if isDependent prop is true', function () {
|
|
182
182
|
var dependentProps = {
|
|
183
183
|
crosswalk: crosswalk,
|
|
184
184
|
isDependent: true,
|
|
@@ -232,7 +232,7 @@ describe('SourceCrosswalksRow tests', function () {
|
|
|
232
232
|
expect(row.prop('isColored')).toBe(false);
|
|
233
233
|
});
|
|
234
234
|
});
|
|
235
|
-
it('should expand crosswalks if highlighted crosswalks contains dependent crosswalk
|
|
235
|
+
it('should expand crosswalks if highlighted crosswalks contains dependent crosswalk', function () {
|
|
236
236
|
var dependentCrosswalk = {
|
|
237
237
|
uri: 'entities/2/crosswalks/3',
|
|
238
238
|
value: '789',
|
|
@@ -23,7 +23,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.useDataModelGraphAppearance = exports.INACTIVE_LABEL_COLOR = exports.RELATED_DASHED_EDGE_COLOR = exports.RELATED_EDGE_COLOR = exports.SELECTED_EDGE_COLOR = exports.INACTIVE_EDGE_COLOR = exports.DASHED_EDGE_COLOR = exports.EDGE_COLOR = void 0;
|
|
24
24
|
var react_1 = require("react");
|
|
25
25
|
var core_1 = require("@react-sigma/core");
|
|
26
|
-
var core_2 = require("@react-sigma/core");
|
|
27
26
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
28
27
|
var graphDataTypes_1 = require("../../types/graphDataTypes");
|
|
29
28
|
var useLoopRenderer_1 = require("../../hooks/useLoopRenderer");
|
|
@@ -48,11 +47,11 @@ exports.INACTIVE_LABEL_COLOR = 'rgba(0, 0, 0, 0.38)';
|
|
|
48
47
|
var RELATION_EDGES_LABELS_AMOUNT_THRESHOLD = 29;
|
|
49
48
|
var useDataModelGraphAppearance = function (_a) {
|
|
50
49
|
var graph = _a.graph, selectedNode = _a.selectedNode, selectedEdges = _a.selectedEdges, onNodeClick = _a.onNodeClick, onEdgeLabelClick = _a.onEdgeLabelClick, hideInteractionTypes = _a.hideInteractionTypes, _b = _a.relationEdgesLabelsAmountThreshold, relationEdgesLabelsAmountThreshold = _b === void 0 ? RELATION_EDGES_LABELS_AMOUNT_THRESHOLD : _b;
|
|
51
|
-
var sigma = (0,
|
|
50
|
+
var sigma = (0, core_1.useSigma)();
|
|
52
51
|
var container = (0, core_1.useSigmaContext)().container;
|
|
53
52
|
var _c = (0, react_1.useState)(null), hoveredNode = _c[0], setHoveredNode = _c[1];
|
|
54
|
-
var registerEvents = (0,
|
|
55
|
-
var setSettings = (0,
|
|
53
|
+
var registerEvents = (0, core_1.useRegisterEvents)();
|
|
54
|
+
var setSettings = (0, core_1.useSetSettings)();
|
|
56
55
|
(0, useLoopRenderer_1.useLoopRenderer)(graph);
|
|
57
56
|
var hoveredEdge = (0, useEdgeLabelsRenderer_1.useEdgeLabelsRenderer)({ graph: graph, onEdgeLabelClick: onEdgeLabelClick });
|
|
58
57
|
(0, useSelectedNodeRenderer_1.useSelectedNodeRenderer)(graph);
|
|
@@ -89,7 +88,7 @@ var useDataModelGraphAppearance = function (_a) {
|
|
|
89
88
|
try {
|
|
90
89
|
selectedNodeNeighbours = graph.neighbors(selectedNode);
|
|
91
90
|
}
|
|
92
|
-
catch (
|
|
91
|
+
catch (_a) {
|
|
93
92
|
//do nothing
|
|
94
93
|
}
|
|
95
94
|
setSettings({
|
|
@@ -80,9 +80,12 @@ var HistoryFilterButton = function (_a) {
|
|
|
80
80
|
setIsOpen(function (open) { return !open; });
|
|
81
81
|
}, []);
|
|
82
82
|
var applyButtonHandler = (0, react_1.useCallback)(function () {
|
|
83
|
-
dateRange && (0, mdm_sdk_1.isDateRangeValid)(dateRange)
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
if (dateRange && (0, mdm_sdk_1.isDateRangeValid)(dateRange)) {
|
|
84
|
+
onApplyFilter(currentValue);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
onApplyFilter((0, ramda_1.dissoc)('dateRange', currentValue));
|
|
88
|
+
}
|
|
86
89
|
togglePopup();
|
|
87
90
|
}, [currentValue, dateRange, onApplyFilter, togglePopup]);
|
|
88
91
|
var clearAllButtonHandler = (0, react_1.useCallback)(function () {
|
|
@@ -68,9 +68,12 @@ var useHistoryTree = function (_a) {
|
|
|
68
68
|
if (!relatedLane)
|
|
69
69
|
return;
|
|
70
70
|
var lifeTimeLength = relatedLane.lifeTime.length;
|
|
71
|
-
lifeTimeLength
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
if (lifeTimeLength) {
|
|
72
|
+
(0, history_1.startNewLife)(relatedLane.lifeTime, change);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
(0, history_1.endLife)(relatedLane.lifeTime, change);
|
|
76
|
+
}
|
|
74
77
|
rows.push({
|
|
75
78
|
uri: uri,
|
|
76
79
|
user: change.user,
|
|
@@ -55,7 +55,7 @@ describe('AddWorkflowButton tests', function () {
|
|
|
55
55
|
} }) });
|
|
56
56
|
var mdmValues = __assign(__assign({}, defaultMdmValues), { user: user });
|
|
57
57
|
var component = setUp(mdmValues);
|
|
58
|
-
expect(component.isEmptyRender());
|
|
58
|
+
expect(component.isEmptyRender()).toBeTruthy();
|
|
59
59
|
});
|
|
60
60
|
it('should not render button if "workflow:config.definition" permission is missing', function () {
|
|
61
61
|
var user = __assign(__assign({}, defaultUser), { userPermissions: __assign(__assign({}, defaultUser.userPermissions), { permissions: {
|
|
@@ -65,7 +65,7 @@ describe('AddWorkflowButton tests', function () {
|
|
|
65
65
|
} }) });
|
|
66
66
|
var mdmValues = __assign(__assign({}, defaultMdmValues), { user: user });
|
|
67
67
|
var component = setUp(mdmValues);
|
|
68
|
-
expect(component.isEmptyRender());
|
|
68
|
+
expect(component.isEmptyRender()).toBeTruthy();
|
|
69
69
|
});
|
|
70
70
|
it('should render main parts correctly if all permissions exists', function () {
|
|
71
71
|
var component = setUp();
|
|
@@ -165,7 +165,7 @@ describe('AssigneeSelector tests', function () {
|
|
|
165
165
|
return [4 /*yield*/, react_2.screen.findByText('user2')];
|
|
166
166
|
case 3:
|
|
167
167
|
_a.sent();
|
|
168
|
-
return [4 /*yield*/, user.
|
|
168
|
+
return [4 /*yield*/, user.paste('USER2')];
|
|
169
169
|
case 4:
|
|
170
170
|
_a.sent();
|
|
171
171
|
expect(react_2.screen.getByText('user2')).toBeInTheDocument();
|
|
@@ -173,9 +173,9 @@ describe('WorkflowTaskCard tests', function () {
|
|
|
173
173
|
return [4 /*yield*/, user.click(react_2.screen.getByRole('button'))];
|
|
174
174
|
case 1:
|
|
175
175
|
_a.sent();
|
|
176
|
-
|
|
176
|
+
react_2.screen.getByText('Data Change Request Review');
|
|
177
177
|
expect(react_2.screen.getByTestId('info-block')).toHaveTextContent('DCR ID: 123Created by: egorshkov on 01/14/2022Step: DCR Review');
|
|
178
|
-
|
|
178
|
+
react_2.screen.getByText('new1 new1 - 123111');
|
|
179
179
|
return [2 /*return*/];
|
|
180
180
|
}
|
|
181
181
|
});
|
|
@@ -183,24 +183,24 @@ describe('WorkflowTaskCard tests', function () {
|
|
|
183
183
|
it('should render card for potentialMatchReview', function () {
|
|
184
184
|
var task = __assign(__assign({}, defaultTask), { processType: mdm_sdk_1.PredefinedWorkflowProcessType.potentialMatchReview, displayName: 'Match Review', processDefinitionDisplayName: 'Potential Match Review' });
|
|
185
185
|
setUp(task);
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
react_2.screen.getByRole('button');
|
|
187
|
+
react_2.screen.getByText('Potential Match Review');
|
|
188
188
|
expect(react_2.screen.getByTestId('info-block')).toHaveTextContent('Created by: egorshkov on 01/14/2022Step: Match Review');
|
|
189
189
|
});
|
|
190
190
|
it('should render card for recommendForDelete', function () {
|
|
191
191
|
var task = __assign(__assign({}, defaultTask), { processType: mdm_sdk_1.PredefinedWorkflowProcessType.recommendForDelete, displayName: 'Delete Review', processDefinitionDisplayName: 'Recommend for Delete' });
|
|
192
192
|
setUp(task);
|
|
193
193
|
expect(react_2.screen.getByTestId('delete-request-task-icon')).toBeInTheDocument();
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
react_2.screen.getByRole('button');
|
|
195
|
+
react_2.screen.getByText('Recommend for Delete');
|
|
196
196
|
expect(react_2.screen.getByTestId('info-block')).toHaveTextContent('Created by: egorshkov on 01/14/2022Step: Delete Review');
|
|
197
197
|
});
|
|
198
198
|
it('should render GenericWorkflowTaskCard for all other cases', function () {
|
|
199
199
|
var task = __assign(__assign({}, defaultTask), { processType: 'some custom type', displayName: 'Some Custom Task', processDefinitionDisplayName: 'Some Custom Task Definition' });
|
|
200
200
|
setUp(task);
|
|
201
201
|
expect(react_2.screen.getByTestId('default-task-icon')).toBeInTheDocument();
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
react_2.screen.getByRole('button');
|
|
203
|
+
react_2.screen.getByText('Some Custom Task Definition');
|
|
204
204
|
expect(react_2.screen.getByTestId('info-block')).toHaveTextContent('Created by: egorshkov on 01/14/2022Step: Some Custom Task');
|
|
205
205
|
});
|
|
206
206
|
});
|
|
@@ -59,7 +59,6 @@ var DcrTaskIcon_1 = __importDefault(require("../../../../../icons/DcrTaskIcon"))
|
|
|
59
59
|
var LineDecorator_1 = require("../../../LineDecorator");
|
|
60
60
|
var AttributesChanges_1 = require("../../../AttributesChanges");
|
|
61
61
|
var DataChangeRequestTaskCard_1 = require("./DataChangeRequestTaskCard");
|
|
62
|
-
//eslint-disable-next-line
|
|
63
62
|
jest.mock('../GenericWorkflowTaskCard', function () { return ({
|
|
64
63
|
// eslint-disable-next-line
|
|
65
64
|
GenericWorkflowTaskCard: function (_a) {
|
|
@@ -124,8 +124,8 @@ describe('PotentialMatchTaskCard tests', function () {
|
|
|
124
124
|
_a = setUp(), user = _a.user, container = _a.container;
|
|
125
125
|
infos = container.querySelectorAll('.info');
|
|
126
126
|
expect(react_2.screen.getByText('Potential Match Review')).toBeInTheDocument();
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
react_2.screen.getByText('01/22/2022');
|
|
128
|
+
react_2.screen.queryByText('Test Entity');
|
|
129
129
|
expect(react_2.screen.queryByTestId('profile-match-card')).not.toBeInTheDocument();
|
|
130
130
|
expect(infos[0]).toHaveTextContent('Created by: egorshkov on 01/14/2022');
|
|
131
131
|
expect(infos[1]).toHaveTextContent('Step: PM review');
|