@reltio/components 1.4.1988 → 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/DataTypeValueEditor/useEditorContext.test.js +17 -0
- 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/TagsEditor/TagsEditor.test.js +16 -0
- package/cjs/TenantLabel/TenantLabel.spec.js +3 -3
- package/cjs/TypeaheadEditor/TypeaheadEditor.js +21 -6
- package/cjs/TypeaheadEditor/TypeaheadEditor.test.js +21 -0
- 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/HistoryTree/HistoryTree.js +5 -1
- 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/DataTypeValueEditor/useEditorContext.test.js +17 -0
- 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/TagsEditor/TagsEditor.test.js +16 -0
- package/esm/TenantLabel/TenantLabel.spec.js +3 -3
- package/esm/TypeaheadEditor/TypeaheadEditor.js +21 -6
- package/esm/TypeaheadEditor/TypeaheadEditor.test.js +21 -0
- 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/HistoryTree/HistoryTree.js +5 -1
- 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 {};
|
|
@@ -174,6 +174,22 @@ describe('TagsEditor tests', function () {
|
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
176
|
}); });
|
|
177
|
+
it('should catch and handle error in getFacetedAttributeData', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
|
+
var user;
|
|
179
|
+
return __generator(this, function (_a) {
|
|
180
|
+
switch (_a.label) {
|
|
181
|
+
case 0:
|
|
182
|
+
jest.clearAllMocks();
|
|
183
|
+
mdm_sdk_1.getFacetedAttributeData.mockRejectedValue({ errorCode: 403, errorMessage: 'Access is denied' });
|
|
184
|
+
user = setUp().user;
|
|
185
|
+
return [4 /*yield*/, user.type(react_2.screen.getByRole('textbox'), 'new value')];
|
|
186
|
+
case 1:
|
|
187
|
+
_a.sent();
|
|
188
|
+
expect(react_2.screen.queryByRole('menuitem')).not.toBeInTheDocument();
|
|
189
|
+
return [2 /*return*/];
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}); });
|
|
177
193
|
it('should call onChange with correct params after click to suggestion', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
194
|
var onChange, user;
|
|
179
195
|
return __generator(this, function (_a) {
|
|
@@ -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
|
});
|
|
@@ -137,13 +137,24 @@ var TypeaheadEditor = function (_a) {
|
|
|
137
137
|
var value = multiple === true && !(0, ramda_1.isNil)(valueProp) ? (0, mdm_sdk_1.wrapInArrayIfNeeded)(valueProp) : valueProp;
|
|
138
138
|
var isFocused = function () { var _a; return ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('input')) === document.activeElement; };
|
|
139
139
|
var fetchSuggestions = (0, react_1.useCallback)(function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
140
|
-
var response;
|
|
140
|
+
var response, error_1;
|
|
141
141
|
var value = _b.value;
|
|
142
142
|
return __generator(this, function (_c) {
|
|
143
143
|
switch (_c.label) {
|
|
144
|
-
case 0:
|
|
144
|
+
case 0:
|
|
145
|
+
response = [];
|
|
146
|
+
_c.label = 1;
|
|
145
147
|
case 1:
|
|
148
|
+
_c.trys.push([1, 3, , 4]);
|
|
149
|
+
return [4 /*yield*/, safePromise(getSuggestions(value.trim(), pageSizeForRequest))];
|
|
150
|
+
case 2:
|
|
146
151
|
response = _c.sent();
|
|
152
|
+
return [3 /*break*/, 4];
|
|
153
|
+
case 3:
|
|
154
|
+
error_1 = _c.sent();
|
|
155
|
+
console.warn(error_1);
|
|
156
|
+
return [3 /*break*/, 4];
|
|
157
|
+
case 4:
|
|
147
158
|
setSuggestions(response);
|
|
148
159
|
setPlaceholderVisibility((0, ramda_1.isEmpty)(response) && isFocused());
|
|
149
160
|
return [2 /*return*/];
|
|
@@ -154,24 +165,28 @@ var TypeaheadEditor = function (_a) {
|
|
|
154
165
|
getSuggestions
|
|
155
166
|
]);
|
|
156
167
|
var handleLoadMoreSuggestions = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
157
|
-
var response_1;
|
|
168
|
+
var response_1, error_2;
|
|
158
169
|
return __generator(this, function (_a) {
|
|
159
170
|
switch (_a.label) {
|
|
160
171
|
case 0:
|
|
161
172
|
setNextPageIsLoading(true);
|
|
162
173
|
_a.label = 1;
|
|
163
174
|
case 1:
|
|
164
|
-
_a.trys.push([1, ,
|
|
175
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
165
176
|
return [4 /*yield*/, getSuggestions(inputValue, pageSizeForRequest, pageNumber + 1)];
|
|
166
177
|
case 2:
|
|
167
178
|
response_1 = _a.sent();
|
|
168
179
|
setSuggestions(function (prevSuggestions) { return __spreadArray(__spreadArray([], prevSuggestions, true), response_1, true); });
|
|
169
180
|
setPageNumber(function (prevPageNumber) { return prevPageNumber + 1; });
|
|
170
|
-
return [3 /*break*/,
|
|
181
|
+
return [3 /*break*/, 5];
|
|
171
182
|
case 3:
|
|
183
|
+
error_2 = _a.sent();
|
|
184
|
+
console.warn(error_2);
|
|
185
|
+
return [3 /*break*/, 5];
|
|
186
|
+
case 4:
|
|
172
187
|
setNextPageIsLoading(false);
|
|
173
188
|
return [7 /*endfinally*/];
|
|
174
|
-
case
|
|
189
|
+
case 5: return [2 /*return*/];
|
|
175
190
|
}
|
|
176
191
|
});
|
|
177
192
|
}); }, [getSuggestions, inputValue, pageNumber, pageSizeForRequest]);
|
|
@@ -222,6 +222,27 @@ describe('TypeaheadEditor', function () {
|
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
224
|
}); });
|
|
225
|
+
it('should catch error in getSuggestions', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
226
|
+
var getSuggestions, user, input;
|
|
227
|
+
return __generator(this, function (_a) {
|
|
228
|
+
switch (_a.label) {
|
|
229
|
+
case 0:
|
|
230
|
+
getSuggestions = function () { return Promise.reject({ errorCode: 403, errorMessage: 'Access is denied' }); };
|
|
231
|
+
user = setUp(__assign(__assign({}, defaultSingleProps), { getSuggestions: getSuggestions })).user;
|
|
232
|
+
input = react_2.screen.getByRole('textbox');
|
|
233
|
+
return [4 /*yield*/, user.click(input)];
|
|
234
|
+
case 1:
|
|
235
|
+
_a.sent();
|
|
236
|
+
return [4 /*yield*/, user.type(input, 'e')];
|
|
237
|
+
case 2:
|
|
238
|
+
_a.sent();
|
|
239
|
+
return [4 /*yield*/, react_2.screen.findByText('No results found')];
|
|
240
|
+
case 3:
|
|
241
|
+
_a.sent();
|
|
242
|
+
return [2 /*return*/];
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}); });
|
|
225
246
|
describe('single mode', function () {
|
|
226
247
|
it('should set input value after click on suggestion item', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
227
248
|
var user, input;
|
|
@@ -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 () {
|