@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
|
@@ -121,7 +121,6 @@ describe('ProfilesList tests', function () {
|
|
|
121
121
|
entities: entities,
|
|
122
122
|
entitiesImportStatus: {},
|
|
123
123
|
onEntityImportStatusChange: jest.fn(),
|
|
124
|
-
// eslint-disable-next-line react/display-name
|
|
125
124
|
entityButtonsRenderer: function (entity) {
|
|
126
125
|
return React.createElement(EmptyStub, { entity: entity });
|
|
127
126
|
}
|
|
@@ -163,7 +162,7 @@ describe('ProfilesList tests', function () {
|
|
|
163
162
|
expect(item.find(EmptyStub).length).toBe(1);
|
|
164
163
|
expect(item.find(EmptyStub).props()).toEqual({ entity: entity });
|
|
165
164
|
});
|
|
166
|
-
it('should show full entityId when it does not start with "entities/"
|
|
165
|
+
it('should show full entityId when it does not start with "entities/"', function () {
|
|
167
166
|
var entity = entities[2];
|
|
168
167
|
var props = __assign(__assign({}, defaultProps), { entities: [entity] });
|
|
169
168
|
var component = setUp(props);
|
package/esm/RCTree/RCTree.d.ts
CHANGED
|
@@ -3,14 +3,14 @@ import React from 'react';
|
|
|
3
3
|
import { RCTreeNode } from './types';
|
|
4
4
|
type Props = {
|
|
5
5
|
treeData: RCTreeNode[];
|
|
6
|
-
renderNode?: (node: RCTreeNode & Record<string, unknown>) =>
|
|
6
|
+
renderNode?: (node: RCTreeNode & Record<string, unknown>) => React.ReactElement;
|
|
7
7
|
canDrag?: boolean;
|
|
8
8
|
isVirtualized?: boolean;
|
|
9
9
|
canDrop?: (params: unknown) => boolean;
|
|
10
10
|
onLoadChildren?: (treeNode: unknown) => Promise<void>;
|
|
11
11
|
height?: number;
|
|
12
12
|
defaultExpandAll?: boolean;
|
|
13
|
-
SwitchRenderer?: (props: any) =>
|
|
13
|
+
SwitchRenderer?: (props: any) => React.ReactElement;
|
|
14
14
|
className?: string;
|
|
15
15
|
minItemHeight?: number;
|
|
16
16
|
isLeaf?: (node: TreeNodeProps & Record<string, unknown>) => boolean;
|
package/esm/RCTree/RCTree.js
CHANGED
|
@@ -16,19 +16,16 @@ export var RCTree = function (_a) {
|
|
|
16
16
|
treeRef.current.scrollTo({ key: String(scrollToNode.nodeId) });
|
|
17
17
|
}
|
|
18
18
|
}, [scrollToNode]);
|
|
19
|
-
// eslint-disable-next-line no-unused-vars
|
|
20
19
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
20
|
var handleDrop = function (_a) {
|
|
22
21
|
var node = _a.node, dragNode = _a.dragNode, dragNodesKeys = _a.dragNodesKeys;
|
|
23
22
|
// TODO: implement
|
|
24
23
|
};
|
|
25
|
-
// eslint-disable-next-line no-unused-vars
|
|
26
24
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
25
|
var handleDragEnter = function (_a) {
|
|
28
26
|
var event = _a.event, node = _a.node, expandedKeys = _a.expandedKeys;
|
|
29
27
|
// TODO: implement
|
|
30
28
|
};
|
|
31
|
-
// eslint-disable-next-line no-unused-vars
|
|
32
29
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
30
|
var dropIndicatorRender = function (_a) {
|
|
34
31
|
var dropPosition = _a.dropPosition, dropLevelOffset = _a.dropLevelOffset, indent = _a.indent, prefixCls = _a.prefixCls, direction = _a.direction;
|
|
@@ -172,7 +172,7 @@ var ReactSortableTree = /** @class */ (function (_super) {
|
|
|
172
172
|
getNodeKey: _this.props.getNodeKey
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
catch (
|
|
175
|
+
catch (_a) {
|
|
176
176
|
newTree = treeData;
|
|
177
177
|
}
|
|
178
178
|
return newTree;
|
|
@@ -675,7 +675,7 @@ ReactSortableTree.propTypes = {
|
|
|
675
675
|
searchMethod: PropTypes.func,
|
|
676
676
|
// Used by the `searchMethod` to highlight and scroll to matched nodes.
|
|
677
677
|
// Should be a string for the default `searchMethod`, but can be anything when using a custom search.
|
|
678
|
-
searchQuery: PropTypes.any,
|
|
678
|
+
searchQuery: PropTypes.any,
|
|
679
679
|
// Outline the <`searchFocusOffset`>th node and scroll to it.
|
|
680
680
|
searchFocusOffset: PropTypes.number,
|
|
681
681
|
// Get the nodes that match the search criteria. Used for counting total matches, etc.
|
|
@@ -51,9 +51,7 @@ export var NodeRendererDefault = function (_a) {
|
|
|
51
51
|
// Show a loading symbol on the handle when the children are expanded
|
|
52
52
|
// and yet still defined by a function (a callback to fetch the children)
|
|
53
53
|
handle = (React.createElement("div", { className: "rst__loadingHandle" },
|
|
54
|
-
React.createElement("div", { className: "rst__loadingCircle" }, __spreadArray([], new Array(12), true).map(function (_, index) { return (React.createElement("div", {
|
|
55
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
56
|
-
key: index, className: classnames('rst__loadingCirclePoint', rowDirectionClass) })); }))));
|
|
54
|
+
React.createElement("div", { className: "rst__loadingCircle" }, __spreadArray([], new Array(12), true).map(function (_, index) { return (React.createElement("div", { key: index, className: classnames('rst__loadingCirclePoint', rowDirectionClass) })); }))));
|
|
57
55
|
}
|
|
58
56
|
else {
|
|
59
57
|
// Show the handle used to initiate a drag-and-drop
|
|
@@ -120,9 +120,7 @@ export var TreeNode = function (_a) {
|
|
|
120
120
|
left: scaffoldBlockPxWidth * i
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
scaffold.push(React.createElement("div", {
|
|
124
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
125
|
-
key: i, style: style_1, className: classnames('rst__absoluteLineBlock', highlightLineClass, rowDirectionClass) }));
|
|
123
|
+
scaffold.push(React.createElement("div", { key: i, style: style_1, className: classnames('rst__absoluteLineBlock', highlightLineClass, rowDirectionClass) }));
|
|
126
124
|
}
|
|
127
125
|
});
|
|
128
126
|
var style;
|
|
@@ -43,7 +43,6 @@ var TreePlaceholder = /** @class */ (function (_super) {
|
|
|
43
43
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
44
44
|
}
|
|
45
45
|
TreePlaceholder.prototype.render = function () {
|
|
46
|
-
// eslint-disable-next-line no-unused-vars
|
|
47
46
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
48
47
|
var _a = this.props, children = _a.children, connectDropTarget = _a.connectDropTarget, treeId = _a.treeId, drop = _a.drop, otherProps = __rest(_a, ["children", "connectDropTarget", "treeId", "drop"]);
|
|
49
48
|
return connectDropTarget(React.createElement("div", null, Children.map(children, function (child) {
|
|
@@ -9,8 +9,8 @@ type Props = {
|
|
|
9
9
|
attributeType: AttributeType;
|
|
10
10
|
expanded?: boolean;
|
|
11
11
|
valueContainerClassName?: string;
|
|
12
|
-
LabelRenderer?: ({ attributeType, attributeValue }: SlotParams<AttributeValue>) =>
|
|
13
|
-
RightSlot?: ({ attributeType, attributeValue }: SlotParams<AttributeValue>) =>
|
|
12
|
+
LabelRenderer?: ({ attributeType, attributeValue }: SlotParams<AttributeValue>) => React.ReactElement;
|
|
13
|
+
RightSlot?: ({ attributeType, attributeValue }: SlotParams<AttributeValue>) => React.ReactElement;
|
|
14
14
|
showNonOv?: boolean;
|
|
15
15
|
};
|
|
16
16
|
declare const _default: React.MemoExoticComponent<({ expanded, LabelRenderer, RightSlot, ...props }: Props) => React.JSX.Element>;
|
|
@@ -58,8 +58,8 @@ describe('ReadOnlyAttributeValuesBlock test', function () {
|
|
|
58
58
|
attributeType: __assign(__assign({}, attributeType), { type: 'Nested' }),
|
|
59
59
|
values: values,
|
|
60
60
|
expanded: true,
|
|
61
|
-
LabelRenderer: function () { return React.createElement("span", null); },
|
|
62
|
-
RightContent: function () { return React.createElement("div", null); }
|
|
61
|
+
LabelRenderer: function () { return React.createElement("span", null); },
|
|
62
|
+
RightContent: function () { return React.createElement("div", null); }
|
|
63
63
|
};
|
|
64
64
|
var component = shallow(React.createElement(ReadOnlyAttributeValuesBlock, __assign({}, props)));
|
|
65
65
|
var attributes = component.find(ReadOnlyAttribute);
|
|
@@ -76,12 +76,7 @@ describe('ReadOnlyAttributesList tests', function () {
|
|
|
76
76
|
pagers.forEach(function (pager) {
|
|
77
77
|
expect(pager.prop('attributeType').hidden).toBeFalsy();
|
|
78
78
|
var shouldHasPaging = pager.prop('attributeType').uri === 'configuration/relationTypes/knowledge/attributes/Role';
|
|
79
|
-
|
|
80
|
-
expect(pager.prop('paging')).toBe(attributes.paging['configuration/relationTypes/knowledge/attributes/Role']);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
expect(pager.prop('paging')).toBeUndefined();
|
|
84
|
-
}
|
|
79
|
+
expect(pager.prop('paging')).toBe(shouldHasPaging ? attributes.paging['configuration/relationTypes/knowledge/attributes/Role'] : undefined);
|
|
85
80
|
});
|
|
86
81
|
});
|
|
87
82
|
it('should render pagers for attributes and analytics attributes with same name', function () {
|
|
@@ -146,7 +146,7 @@ describe('ReadOnlyAttributesPager tests', function () {
|
|
|
146
146
|
expect(screen.getByText('Simple label')).toBeInTheDocument();
|
|
147
147
|
expect(screen.getByText('123')).toBeInTheDocument();
|
|
148
148
|
expect(screen.queryByText('+ 1')).not.toBeInTheDocument();
|
|
149
|
-
|
|
149
|
+
screen.getByText('Show 1 more of remaining 1 value');
|
|
150
150
|
});
|
|
151
151
|
it('should use ImageLineRenderer for Image attribute', function () {
|
|
152
152
|
var props = __assign(__assign({}, defaultProps), { attributeType: __assign(__assign({}, defaultProps.attributeType), { type: 'Image' }), paging: {}, parentUri: 'parentUri', showNonOv: false });
|
|
@@ -224,7 +224,7 @@ describe('ReadOnlyAttributesPager tests', function () {
|
|
|
224
224
|
var props = __assign(__assign({}, defaultProps), { attributeType: __assign(__assign({}, defaultProps.attributeType), { type: 'Nested' }), values: __spreadArray(__spreadArray([], ovValues, true), [__assign(__assign({}, values[1]), { ov: false })], false), max: 1 });
|
|
225
225
|
setUp({ props: props, mdmValues: { maxValuesInResponse: 20 } });
|
|
226
226
|
expect(screen.getByTestId('show-more')).toBeInTheDocument();
|
|
227
|
-
|
|
227
|
+
screen.getByText('Show 1 more of remaining 2 value');
|
|
228
228
|
});
|
|
229
229
|
it('should use maxValuesInResponse from mdm module context if max prop does not exist', function () {
|
|
230
230
|
var ovValues = [
|
|
@@ -235,7 +235,7 @@ describe('ReadOnlyAttributesPager tests', function () {
|
|
|
235
235
|
var props = __assign(__assign({}, defaultProps), { attributeType: __assign(__assign({}, defaultProps.attributeType), { type: 'Nested' }), values: __spreadArray(__spreadArray([], ovValues, true), [__assign(__assign({}, values[1]), { ov: false })], false) });
|
|
236
236
|
setUp({ props: props, mdmValues: { maxValuesInResponse: 1 } });
|
|
237
237
|
expect(screen.getByTestId('show-more')).toBeInTheDocument();
|
|
238
|
-
|
|
238
|
+
screen.getByText('Show 1 more of remaining 2 value');
|
|
239
239
|
});
|
|
240
240
|
it('should use max value as Infinity if max prop and default max value from mdm module context do not exist', function () {
|
|
241
241
|
var ovValues = [
|
|
@@ -324,7 +324,7 @@ describe('RelationEditor behaviour', function () {
|
|
|
324
324
|
return [4 /*yield*/, user.click(inputs[0])];
|
|
325
325
|
case 1:
|
|
326
326
|
_a.sent();
|
|
327
|
-
expect(typeAheadSearch).
|
|
327
|
+
expect(typeAheadSearch).toHaveBeenCalledWith([{ label: 'Address', uri: 'configuration/entityTypes/Location' }], '', {
|
|
328
328
|
globalFilter: '',
|
|
329
329
|
max: 20,
|
|
330
330
|
searchOptions: '',
|
|
@@ -7,7 +7,7 @@ type Props = {
|
|
|
7
7
|
mapKey: string;
|
|
8
8
|
defaultZoom?: GoogleMapProps['zoom'];
|
|
9
9
|
defaultCenter?: GoogleMapProps['center'];
|
|
10
|
-
loadingElement:
|
|
10
|
+
loadingElement: React.ReactElement;
|
|
11
11
|
isSearchOnMapMove?: boolean;
|
|
12
12
|
isSearchEnabled?: boolean;
|
|
13
13
|
activeOverlay?: Overlay;
|
|
@@ -163,7 +163,6 @@ describe('SimpleAttributeEditor', function () {
|
|
|
163
163
|
it('should render additional control between plus and delete buttons if additionalControlsRenderer prop is specified', function () {
|
|
164
164
|
var AdditionalControls = function () { return React.createElement("div", null); };
|
|
165
165
|
var component = mountComponent({
|
|
166
|
-
//eslint-disable-next-line
|
|
167
166
|
additionalControlsRenderer: function (_a) {
|
|
168
167
|
var attributeValue = _a.attributeValue, attributeType = _a.attributeType;
|
|
169
168
|
return (React.createElement(AdditionalControls, { attributeValue: attributeValue, attributeType: attributeType }));
|
|
@@ -3,7 +3,7 @@ import { BasicTable } from '../BasicTable';
|
|
|
3
3
|
import { ColumnData, RenderRowCellProps } from '../types/basicTable';
|
|
4
4
|
type Props = Omit<React.ComponentProps<typeof BasicTable>, 'rowsData' | 'renderRowCell'> & {
|
|
5
5
|
tableColumnsData: ColumnData[];
|
|
6
|
-
RowCellRenderer?: (props: RenderRowCellProps) =>
|
|
6
|
+
RowCellRenderer?: (props: RenderRowCellProps) => React.ReactElement;
|
|
7
7
|
};
|
|
8
8
|
export declare const TableSkeleton: ({ tableColumnsData, RowCellRenderer, ...props }: Props) => React.JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -169,6 +169,22 @@ describe('TagsEditor tests', function () {
|
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
171
|
}); });
|
|
172
|
+
it('should catch and handle error in getFacetedAttributeData', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
173
|
+
var user;
|
|
174
|
+
return __generator(this, function (_a) {
|
|
175
|
+
switch (_a.label) {
|
|
176
|
+
case 0:
|
|
177
|
+
jest.clearAllMocks();
|
|
178
|
+
getFacetedAttributeData.mockRejectedValue({ errorCode: 403, errorMessage: 'Access is denied' });
|
|
179
|
+
user = setUp().user;
|
|
180
|
+
return [4 /*yield*/, user.type(screen.getByRole('textbox'), 'new value')];
|
|
181
|
+
case 1:
|
|
182
|
+
_a.sent();
|
|
183
|
+
expect(screen.queryByRole('menuitem')).not.toBeInTheDocument();
|
|
184
|
+
return [2 /*return*/];
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}); });
|
|
172
188
|
it('should call onChange with correct params after click to suggestion', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
173
189
|
var onChange, user;
|
|
174
190
|
return __generator(this, function (_a) {
|
|
@@ -29,11 +29,11 @@ describe('TenantLabel behaviour', function () {
|
|
|
29
29
|
it('should render main parts', function () {
|
|
30
30
|
var mdmValues = __assign(__assign({}, defaultMdmValues), { environment: 'tst-01' });
|
|
31
31
|
setUp({ mdmValues: mdmValues });
|
|
32
|
-
expect(screen.getByText('alenat - TST-01')).toBeInTheDocument;
|
|
33
|
-
expect(screen.getByTestId('reltio-tenant-icon')).toBeInTheDocument;
|
|
32
|
+
expect(screen.getByText('alenat - TST-01')).toBeInTheDocument();
|
|
33
|
+
expect(screen.getByTestId('reltio-tenant-icon')).toBeInTheDocument();
|
|
34
34
|
});
|
|
35
35
|
it('should render correct label when environment name is empty', function () {
|
|
36
36
|
setUp();
|
|
37
|
-
expect(screen.getByText('alenat')).toBeInTheDocument;
|
|
37
|
+
expect(screen.getByText('alenat')).toBeInTheDocument();
|
|
38
38
|
});
|
|
39
39
|
});
|
|
@@ -108,13 +108,24 @@ export var TypeaheadEditor = function (_a) {
|
|
|
108
108
|
var value = multiple === true && !isNil(valueProp) ? wrapInArrayIfNeeded(valueProp) : valueProp;
|
|
109
109
|
var isFocused = function () { var _a; return ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('input')) === document.activeElement; };
|
|
110
110
|
var fetchSuggestions = useCallback(function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
111
|
-
var response;
|
|
111
|
+
var response, error_1;
|
|
112
112
|
var value = _b.value;
|
|
113
113
|
return __generator(this, function (_c) {
|
|
114
114
|
switch (_c.label) {
|
|
115
|
-
case 0:
|
|
115
|
+
case 0:
|
|
116
|
+
response = [];
|
|
117
|
+
_c.label = 1;
|
|
116
118
|
case 1:
|
|
119
|
+
_c.trys.push([1, 3, , 4]);
|
|
120
|
+
return [4 /*yield*/, safePromise(getSuggestions(value.trim(), pageSizeForRequest))];
|
|
121
|
+
case 2:
|
|
117
122
|
response = _c.sent();
|
|
123
|
+
return [3 /*break*/, 4];
|
|
124
|
+
case 3:
|
|
125
|
+
error_1 = _c.sent();
|
|
126
|
+
console.warn(error_1);
|
|
127
|
+
return [3 /*break*/, 4];
|
|
128
|
+
case 4:
|
|
118
129
|
setSuggestions(response);
|
|
119
130
|
setPlaceholderVisibility(isEmpty(response) && isFocused());
|
|
120
131
|
return [2 /*return*/];
|
|
@@ -125,24 +136,28 @@ export var TypeaheadEditor = function (_a) {
|
|
|
125
136
|
getSuggestions
|
|
126
137
|
]);
|
|
127
138
|
var handleLoadMoreSuggestions = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
128
|
-
var response_1;
|
|
139
|
+
var response_1, error_2;
|
|
129
140
|
return __generator(this, function (_a) {
|
|
130
141
|
switch (_a.label) {
|
|
131
142
|
case 0:
|
|
132
143
|
setNextPageIsLoading(true);
|
|
133
144
|
_a.label = 1;
|
|
134
145
|
case 1:
|
|
135
|
-
_a.trys.push([1, ,
|
|
146
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
136
147
|
return [4 /*yield*/, getSuggestions(inputValue, pageSizeForRequest, pageNumber + 1)];
|
|
137
148
|
case 2:
|
|
138
149
|
response_1 = _a.sent();
|
|
139
150
|
setSuggestions(function (prevSuggestions) { return __spreadArray(__spreadArray([], prevSuggestions, true), response_1, true); });
|
|
140
151
|
setPageNumber(function (prevPageNumber) { return prevPageNumber + 1; });
|
|
141
|
-
return [3 /*break*/,
|
|
152
|
+
return [3 /*break*/, 5];
|
|
142
153
|
case 3:
|
|
154
|
+
error_2 = _a.sent();
|
|
155
|
+
console.warn(error_2);
|
|
156
|
+
return [3 /*break*/, 5];
|
|
157
|
+
case 4:
|
|
143
158
|
setNextPageIsLoading(false);
|
|
144
159
|
return [7 /*endfinally*/];
|
|
145
|
-
case
|
|
160
|
+
case 5: return [2 /*return*/];
|
|
146
161
|
}
|
|
147
162
|
});
|
|
148
163
|
}); }, [getSuggestions, inputValue, pageNumber, pageSizeForRequest]);
|
|
@@ -217,6 +217,27 @@ describe('TypeaheadEditor', function () {
|
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
}); });
|
|
220
|
+
it('should catch error in getSuggestions', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
221
|
+
var getSuggestions, user, input;
|
|
222
|
+
return __generator(this, function (_a) {
|
|
223
|
+
switch (_a.label) {
|
|
224
|
+
case 0:
|
|
225
|
+
getSuggestions = function () { return Promise.reject({ errorCode: 403, errorMessage: 'Access is denied' }); };
|
|
226
|
+
user = setUp(__assign(__assign({}, defaultSingleProps), { getSuggestions: getSuggestions })).user;
|
|
227
|
+
input = screen.getByRole('textbox');
|
|
228
|
+
return [4 /*yield*/, user.click(input)];
|
|
229
|
+
case 1:
|
|
230
|
+
_a.sent();
|
|
231
|
+
return [4 /*yield*/, user.type(input, 'e')];
|
|
232
|
+
case 2:
|
|
233
|
+
_a.sent();
|
|
234
|
+
return [4 /*yield*/, screen.findByText('No results found')];
|
|
235
|
+
case 3:
|
|
236
|
+
_a.sent();
|
|
237
|
+
return [2 /*return*/];
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}); });
|
|
220
241
|
describe('single mode', function () {
|
|
221
242
|
it('should set input value after click on suggestion item', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
222
243
|
var user, input;
|
|
@@ -58,7 +58,9 @@ export var VirtualGroupedList = function (_a) {
|
|
|
58
58
|
var getItemByIndex = useCallback(function (index) { return items[index]; }, [items]);
|
|
59
59
|
useEffect(function () {
|
|
60
60
|
requestAnimationFrame(function () {
|
|
61
|
-
|
|
61
|
+
if (listRef.current) {
|
|
62
|
+
listRef.current.scrollTo(0);
|
|
63
|
+
}
|
|
62
64
|
});
|
|
63
65
|
}, [items.length]);
|
|
64
66
|
useEffect(function () {
|
|
@@ -73,7 +75,9 @@ export var VirtualGroupedList = function (_a) {
|
|
|
73
75
|
};
|
|
74
76
|
}
|
|
75
77
|
};
|
|
76
|
-
|
|
78
|
+
if (listRef.current) {
|
|
79
|
+
listRef.current.resetAfterIndex(0);
|
|
80
|
+
}
|
|
77
81
|
setTitleWidth();
|
|
78
82
|
var scrollToOffset = calcMoveToOffset(items);
|
|
79
83
|
if (scrollToOffset && scrollToOffset.offset && listRef.current) {
|
|
@@ -81,7 +85,9 @@ export var VirtualGroupedList = function (_a) {
|
|
|
81
85
|
var offset_1 = scrollToOffset.offset - titleHeight_1;
|
|
82
86
|
if (offset_1 < listRef.current.state.scrollOffset || offset_1 > listRef.current.state.scrollOffset + height) {
|
|
83
87
|
requestAnimationFrame(function () {
|
|
84
|
-
|
|
88
|
+
if (listRef.current) {
|
|
89
|
+
listRef.current.scrollTo(offset_1 - (height - titleHeight_1) / 2);
|
|
90
|
+
}
|
|
85
91
|
});
|
|
86
92
|
}
|
|
87
93
|
}
|
|
@@ -118,7 +124,7 @@ export var VirtualGroupedList = function (_a) {
|
|
|
118
124
|
}
|
|
119
125
|
};
|
|
120
126
|
var setTitleByIndex = function (index) {
|
|
121
|
-
titlesRef.current
|
|
127
|
+
if (titlesRef.current) {
|
|
122
128
|
__spreadArray([], titlesRef.current.querySelectorAll('.' + stickyItemClass), true).forEach(function (title) {
|
|
123
129
|
if (title.dataset.index === index.toString()) {
|
|
124
130
|
title.style.visibility = 'visible';
|
|
@@ -127,6 +133,7 @@ export var VirtualGroupedList = function (_a) {
|
|
|
127
133
|
else
|
|
128
134
|
title.style.visibility = 'hidden';
|
|
129
135
|
});
|
|
136
|
+
}
|
|
130
137
|
};
|
|
131
138
|
var getOffsetByIndex = function (index) {
|
|
132
139
|
calcOffsetsToIndex(index);
|
|
@@ -138,7 +145,9 @@ export var VirtualGroupedList = function (_a) {
|
|
|
138
145
|
return;
|
|
139
146
|
var topItem = getItemByOffset(scrollOffset);
|
|
140
147
|
var currentTitleIndex = topItem && getTitleByIndex(topItem.index);
|
|
141
|
-
currentTitleIndex !== null
|
|
148
|
+
if (currentTitleIndex !== null) {
|
|
149
|
+
setTitleByIndex(currentTitleIndex);
|
|
150
|
+
}
|
|
142
151
|
setTitleWidth();
|
|
143
152
|
var titleHeight = currentTitleIndex !== null && getItemSize(currentTitleIndex, getItemByIndex(currentTitleIndex).item);
|
|
144
153
|
var itemAfterTitle = getItemByOffset(scrollOffset + titleHeight + currentTitleParams.topMargin);
|
|
@@ -218,7 +218,7 @@ describe('VirtualGroupedList tests', function () {
|
|
|
218
218
|
expect(scrollToSpy).toHaveBeenCalledWith(0);
|
|
219
219
|
window.requestAnimationFrame.mockRestore();
|
|
220
220
|
});
|
|
221
|
-
it('should change fixed title on forward scroll
|
|
221
|
+
it('should change fixed title on forward scroll', function () {
|
|
222
222
|
var component = mount(React.createElement(VirtualGroupedList, __assign({}, getItems('grouped'), defaultParams, { height: 150 })));
|
|
223
223
|
var fixedTitles = findClassName(component, itemTitleClass);
|
|
224
224
|
var titlesWrapper = findClassName(component, stickyTitlesWrapper);
|
|
@@ -244,7 +244,7 @@ describe('VirtualGroupedList tests', function () {
|
|
|
244
244
|
expect(fixedTitles.at(0).getDOMNode().style).toHaveProperty('visibility', 'visible');
|
|
245
245
|
expect(fixedTitles.at(1).getDOMNode().style).toHaveProperty('visibility', 'hidden');
|
|
246
246
|
});
|
|
247
|
-
it('should change fixed title on backward scroll
|
|
247
|
+
it('should change fixed title on backward scroll', function () {
|
|
248
248
|
var component = mount(React.createElement(VirtualGroupedList, __assign({}, getItems('grouped'), defaultParams, { height: 150 })));
|
|
249
249
|
var fixedTitles = findClassName(component, itemTitleClass);
|
|
250
250
|
var titlesWrapper = findClassName(component, stickyTitlesWrapper);
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { renderHook, act } from '@testing-library/react-hooks';
|
|
13
13
|
import { useScrollToFocusItem } from './useScrollToFocusItem';
|
|
14
14
|
describe('useScrollToFocusItem hook test', function () {
|
|
15
|
-
it('should correctly call scrollToItem when focus move to down of list
|
|
15
|
+
it('should correctly call scrollToItem when focus move to down of list', function () {
|
|
16
16
|
var scrollToItem = jest.fn();
|
|
17
17
|
var initialProps = {
|
|
18
18
|
items: new Array(15).fill(0),
|
|
@@ -26,7 +26,7 @@ describe('useScrollToFocusItem hook test', function () {
|
|
|
26
26
|
rerender(__assign(__assign({}, initialProps), { focusIndex: 4 }));
|
|
27
27
|
expect(scrollToItem).toHaveBeenCalledWith(7, 'end');
|
|
28
28
|
});
|
|
29
|
-
it('should correctly call scrollToItem when focus move to up of list
|
|
29
|
+
it('should correctly call scrollToItem when focus move to up of list', function () {
|
|
30
30
|
var scrollToItem = jest.fn();
|
|
31
31
|
var initialProps = {
|
|
32
32
|
items: new Array(15).fill(0),
|
|
@@ -166,7 +166,7 @@ describe('filter utils tests', function () {
|
|
|
166
166
|
.valueOf(), ")) and (not equals(user, 'collaboration-service'))");
|
|
167
167
|
expect(buildActivitiesFilterString(filter)).toEqual(expectedResult);
|
|
168
168
|
});
|
|
169
|
-
it('should return empty string for invalid dateRange
|
|
169
|
+
it('should return empty string for invalid dateRange', function () {
|
|
170
170
|
var filter = {
|
|
171
171
|
dateRange: {
|
|
172
172
|
type: 'between',
|
|
@@ -69,7 +69,12 @@ var AttributesTable = function (_a) {
|
|
|
69
69
|
var _m = useState(null), pendingDeletion = _m[0], setPendingDeletion = _m[1];
|
|
70
70
|
var _o = useState(null), pendingIgnoredEditing = _o[0], setPendingIgnoredEditing = _o[1];
|
|
71
71
|
var handleEdit = useCallback(function (event) {
|
|
72
|
-
event.attributeValue.ignored
|
|
72
|
+
if (event.attributeValue.ignored) {
|
|
73
|
+
setPendingIgnoredEditing(event);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
onEdit(event);
|
|
77
|
+
}
|
|
73
78
|
}, [onEdit, setPendingIgnoredEditing]);
|
|
74
79
|
var handleReorderAttributeTypes = useCallback(function (oldPosition, newPosition) {
|
|
75
80
|
onSelectAttributeTypes(move(oldPosition, newPosition, selectedAttributeTypes));
|
|
@@ -112,7 +117,8 @@ var AttributesTable = function (_a) {
|
|
|
112
117
|
React.createElement(BasicTable, { fixFirstColumn: true, headRowHeight: 48, defaultColumnWidth: 250, defaultColumnMinWidth: 200, columnsData: visibleColumnsData, dndRowReorderingEnabled: false, dndRowReorderingHandler: handleReorderAttributeTypes, getIdFromRowValue: getIdFromRowValue, rowsData: rowsData, renderRowCell: renderRowCell, getRowCellHeight: getRowCellHeight, context: tableContext })),
|
|
113
118
|
React.createElement(ConfirmDeleteDialog, { open: !!pendingDeletion, onClose: function () { return setPendingDeletion(null); }, onConfirm: handleDelete }),
|
|
114
119
|
React.createElement(ConfirmEditIgnoredDialog, { open: !!pendingIgnoredEditing, onClose: function () { return setPendingIgnoredEditing(null); }, onConfirmEditWithIgnore: function () { return pendingIgnoredEditing && onEdit(pendingIgnoredEditing); }, onConfirmEditWithoutIgnore: function () {
|
|
115
|
-
|
|
120
|
+
if (pendingIgnoredEditing)
|
|
121
|
+
onEdit(__assign(__assign({}, pendingIgnoredEditing), { clearAttributeFlags: true }));
|
|
116
122
|
} })));
|
|
117
123
|
};
|
|
118
124
|
export default memo(AttributesTable);
|
|
@@ -332,7 +332,7 @@ describe('AttributesTable tests', function () {
|
|
|
332
332
|
expect(props.onEdit).not.toHaveBeenCalled();
|
|
333
333
|
expect(wrapper.find(ConfirmEditIgnoredDialog).prop('open')).toBe(true);
|
|
334
334
|
});
|
|
335
|
-
it('should call props.onEdit if confirmed editing attribute with ignored
|
|
335
|
+
it('should call props.onEdit if confirmed editing attribute with ignored', function () {
|
|
336
336
|
var _a, _b;
|
|
337
337
|
var wrapper = mount(React.createElement(AttributesTable, __assign({}, props)));
|
|
338
338
|
var onEdit = wrapper.find('AttributeValuesRenderer').at(0).prop('onEdit');
|
|
@@ -353,7 +353,7 @@ describe('AttributesTable tests', function () {
|
|
|
353
353
|
expect(props.onEdit).toHaveBeenCalledWith(editEvent);
|
|
354
354
|
expect(props.onIgnore).not.toHaveBeenCalled();
|
|
355
355
|
});
|
|
356
|
-
it('should call props.onEdit and props.onIgnore if confirmed editing attribute without ignored
|
|
356
|
+
it('should call props.onEdit and props.onIgnore if confirmed editing attribute without ignored', function () {
|
|
357
357
|
var _a, _b;
|
|
358
358
|
var wrapper = mount(React.createElement(AttributesTable, __assign({}, props)));
|
|
359
359
|
var onEdit = wrapper.find('AttributeValuesRenderer').at(0).prop('onEdit');
|
|
@@ -165,7 +165,7 @@ describe('attribute table tests', function () {
|
|
|
165
165
|
afterEach(function () {
|
|
166
166
|
jest.clearAllMocks();
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
it.skip('should drag and drop rows correctly', function () {
|
|
169
169
|
jest.useFakeTimers();
|
|
170
170
|
var unmockTableSizing = mockBasicTableSizing();
|
|
171
171
|
var onSelectAttributeTypes = jest.fn();
|
|
@@ -28,7 +28,12 @@ export var ConfirmEditIgnoredDialog = function (_a) {
|
|
|
28
28
|
React.createElement(DialogActions, null,
|
|
29
29
|
React.createElement(Button, { onClick: onClose, color: "primary" }, i18n.text('Cancel')),
|
|
30
30
|
React.createElement(Button, { onClick: function () {
|
|
31
|
-
option === 'with'
|
|
31
|
+
if (option === 'with') {
|
|
32
|
+
onConfirmEditWithIgnore();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
onConfirmEditWithoutIgnore();
|
|
36
|
+
}
|
|
32
37
|
onClose();
|
|
33
38
|
}, color: "primary" }, i18n.text('Ok')))));
|
|
34
39
|
};
|
package/esm/features/crosswalks/AttributesTable/components/RuleTypeInfoButton/RuleTypeInfoButton.js
CHANGED
|
@@ -36,7 +36,6 @@ var getInfoTitle = cond([
|
|
|
36
36
|
var getInfoContent = cond([
|
|
37
37
|
[
|
|
38
38
|
prop('sourcesUriOrder'),
|
|
39
|
-
// eslint-disable-next-line react/display-name
|
|
40
39
|
function (_a, metadata) {
|
|
41
40
|
var sourcesUriOrder = _a.sourcesUriOrder;
|
|
42
41
|
return React.createElement(SourcesRenderer, { metadata: metadata, sourcesUriOrder: sourcesUriOrder });
|
|
@@ -44,7 +43,6 @@ var getInfoContent = cond([
|
|
|
44
43
|
],
|
|
45
44
|
[
|
|
46
45
|
prop('primaryAttributeUri'),
|
|
47
|
-
// eslint-disable-next-line react/display-name
|
|
48
46
|
function (_a, metadata) {
|
|
49
47
|
var primaryAttributeUri = _a.primaryAttributeUri;
|
|
50
48
|
return (React.createElement(AttributeRenderer, { metadata: metadata, attributeUri: primaryAttributeUri }));
|
|
@@ -52,7 +50,6 @@ var getInfoContent = cond([
|
|
|
52
50
|
],
|
|
53
51
|
[
|
|
54
52
|
prop('comparisonAttributeUri'),
|
|
55
|
-
// eslint-disable-next-line react/display-name
|
|
56
53
|
function (_a, metadata) {
|
|
57
54
|
var comparisonAttributeUri = _a.comparisonAttributeUri;
|
|
58
55
|
return (React.createElement(AttributeRenderer, { metadata: metadata, attributeUri: comparisonAttributeUri }));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { AttributeType, AttributeValue, Crosswalk, SurvivorStrategy } from '@reltio/mdm-sdk';
|
|
2
3
|
import { AddInlineAttributeEvent, DeleteInlineAttributeEvent, EditInlineAttributeEvent, IgnoreInlineAttributeEvent, PinInlineAttributeEvent } from '../../../types/inlineAttributes';
|
|
3
4
|
import { ColumnData, RenderRowCellProps } from '../../../types/basicTable';
|
|
@@ -43,7 +44,7 @@ type CellValueRendererProps = {
|
|
|
43
44
|
[key: string]: unknown;
|
|
44
45
|
};
|
|
45
46
|
export type RowCellRendererProps = RenderRowCellProps & {
|
|
46
|
-
CellValueRenderer: (props: CellValueRendererProps) =>
|
|
47
|
+
CellValueRenderer: (props: CellValueRendererProps) => React.ReactElement;
|
|
47
48
|
columnData: AttributesTableColumnData;
|
|
48
49
|
rowValue: AttributesTableRowValue;
|
|
49
50
|
};
|
|
@@ -150,7 +150,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
150
150
|
wrapper.find(SmallIconButtonWithTooltip).find('button').simulate('click');
|
|
151
151
|
expect(toggleCrosswalkFocus).toHaveBeenCalledTimes(1);
|
|
152
152
|
});
|
|
153
|
-
it('should render dependent icon if isDependent prop is true
|
|
153
|
+
it('should render dependent icon if isDependent prop is true', function () {
|
|
154
154
|
var dependentProps = {
|
|
155
155
|
crosswalk: crosswalk,
|
|
156
156
|
isDependent: true,
|
|
@@ -204,7 +204,7 @@ describe('SourceCrosswalksRow tests', function () {
|
|
|
204
204
|
expect(row.prop('isColored')).toBe(false);
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
|
-
it('should expand crosswalks if highlighted crosswalks contains dependent crosswalk
|
|
207
|
+
it('should expand crosswalks if highlighted crosswalks contains dependent crosswalk', function () {
|
|
208
208
|
var dependentCrosswalk = {
|
|
209
209
|
uri: 'entities/2/crosswalks/3',
|
|
210
210
|
value: '789',
|
|
@@ -19,8 +19,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
21
|
import { useEffect, useMemo, useState } from 'react';
|
|
22
|
-
import { useSigmaContext } from '@react-sigma/core';
|
|
23
|
-
import { useRegisterEvents, useSetSettings, useSigma } from '@react-sigma/core';
|
|
22
|
+
import { useSigmaContext, useRegisterEvents, useSetSettings, useSigma } from '@react-sigma/core';
|
|
24
23
|
import { svg2Url } from '@reltio/mdm-sdk';
|
|
25
24
|
import { DataModelGraphNodeType } from '../../types/graphDataTypes';
|
|
26
25
|
import { useLoopRenderer } from '../../hooks/useLoopRenderer';
|
|
@@ -86,7 +85,7 @@ export var useDataModelGraphAppearance = function (_a) {
|
|
|
86
85
|
try {
|
|
87
86
|
selectedNodeNeighbours = graph.neighbors(selectedNode);
|
|
88
87
|
}
|
|
89
|
-
catch (
|
|
88
|
+
catch (_a) {
|
|
90
89
|
//do nothing
|
|
91
90
|
}
|
|
92
91
|
setSettings({
|