@reltio/components 1.4.1997 → 1.4.1999
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/UpSetChart/UpSetChart.d.ts +5 -8
- package/cjs/UpSetChart/UpSetChart.js +61 -5
- package/cjs/UpSetChart/UpSetChart.test.js +198 -0
- package/cjs/UpSetChart/components/IntersectionsChart/IntersectionsChart.d.ts +15 -0
- package/cjs/UpSetChart/components/IntersectionsChart/IntersectionsChart.js +66 -0
- package/cjs/UpSetChart/components/IntersectionsChart/index.d.ts +1 -0
- package/cjs/UpSetChart/components/IntersectionsChart/index.js +5 -0
- package/cjs/UpSetChart/components/IntersectionsChart/styles.d.ts +1 -0
- package/cjs/UpSetChart/components/IntersectionsChart/styles.js +32 -0
- package/cjs/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.d.ts +10 -0
- package/cjs/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.js +64 -0
- package/cjs/UpSetChart/components/IntersectionsChartAxis/index.d.ts +1 -0
- package/cjs/UpSetChart/components/IntersectionsChartAxis/index.js +5 -0
- package/cjs/UpSetChart/components/IntersectionsChartAxis/styles.d.ts +1 -0
- package/cjs/UpSetChart/components/IntersectionsChartAxis/styles.js +32 -0
- package/cjs/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.d.ts +13 -0
- package/cjs/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.js +56 -0
- package/cjs/UpSetChart/components/IntersectionsMatrix/index.d.ts +1 -0
- package/cjs/UpSetChart/components/IntersectionsMatrix/index.js +5 -0
- package/cjs/UpSetChart/components/IntersectionsMatrix/styles.d.ts +1 -0
- package/cjs/UpSetChart/components/IntersectionsMatrix/styles.js +27 -0
- package/cjs/UpSetChart/components/SetsChart/SetsChart.d.ts +15 -0
- package/cjs/UpSetChart/components/SetsChart/SetsChart.js +58 -0
- package/cjs/UpSetChart/components/SetsChart/index.d.ts +1 -0
- package/cjs/UpSetChart/components/SetsChart/index.js +5 -0
- package/cjs/UpSetChart/components/SetsChart/styles.d.ts +1 -0
- package/cjs/UpSetChart/components/SetsChart/styles.js +43 -0
- package/cjs/UpSetChart/components/SetsChartAxis/SetsChartAxis.d.ts +6 -0
- package/cjs/UpSetChart/components/SetsChartAxis/SetsChartAxis.js +20 -0
- package/cjs/UpSetChart/components/SetsChartAxis/index.d.ts +1 -0
- package/cjs/UpSetChart/components/SetsChartAxis/index.js +5 -0
- package/cjs/UpSetChart/components/SetsChartAxis/styles.d.ts +1 -0
- package/cjs/UpSetChart/components/SetsChartAxis/styles.js +17 -0
- package/cjs/UpSetChart/constants.d.ts +16 -3
- package/cjs/UpSetChart/constants.js +20 -4
- package/cjs/UpSetChart/gameOfThrones.test-data.d.ts +4 -0
- package/cjs/UpSetChart/gameOfThrones.test-data.js +26 -0
- package/cjs/UpSetChart/helpers.d.ts +20 -0
- package/cjs/UpSetChart/helpers.js +127 -0
- package/cjs/UpSetChart/styles.d.ts +4 -1
- package/cjs/UpSetChart/styles.js +11 -12
- package/cjs/UpSetChart/types.d.ts +16 -0
- package/cjs/UpSetChart/types.js +2 -0
- package/cjs/UpSetChart/useUpSetChartSizes.d.ts +20 -0
- package/cjs/UpSetChart/useUpSetChartSizes.js +34 -0
- package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.d.ts +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.js +267 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.d.ts +1 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.js +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.test.js +5 -23
- package/cjs/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.test.js +3 -23
- package/cjs/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.test.js +81 -102
- package/cjs/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.d.ts +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.js +24 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.js +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.test.js +69 -48
- package/cjs/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.test.js +123 -107
- package/cjs/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.test.js +128 -115
- package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.js +1 -1
- package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +160 -183
- package/cjs/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.js +2 -2
- package/cjs/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.test.js +44 -28
- package/cjs/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.js +4 -5
- package/cjs/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.test.js +54 -47
- package/cjs/features/activity-log/ActivityLog/ActivityLog.test.js +83 -22
- package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.js +1 -1
- package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.js +784 -0
- package/cjs/features/activity-log/ActivityTitle/ActivityTitle.d.ts +2 -3
- package/cjs/features/activity-log/ActivityTitle/ActivityTitle.js +24 -2
- package/cjs/features/activity-log/CollapsibleActivityRecords/CollapsibleActivityRecords.test.js +102 -79
- package/cjs/features/activity-log/EntityObject/EntityObject.test.js +35 -26
- package/cjs/features/activity-log/Field/Field.d.ts +2 -3
- package/cjs/features/activity-log/Field/Field.js +24 -2
- package/cjs/features/activity-log/PotentialMatchRecord/PotentialMatchRecord.test.js +160 -34
- package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.js +1 -1
- package/cjs/features/activity-log/RecordUpdates/RecordUpdates.test.js +207 -0
- package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +1 -1
- package/cjs/features/activity-log/RelationObject/RelationObject.test.js +46 -29
- package/cjs/features/activity-log/RelationRecord/RelationRecord.test.js +88 -68
- package/esm/UpSetChart/UpSetChart.d.ts +5 -8
- package/esm/UpSetChart/UpSetChart.js +38 -5
- package/esm/UpSetChart/UpSetChart.test.js +193 -0
- package/esm/UpSetChart/components/IntersectionsChart/IntersectionsChart.d.ts +15 -0
- package/esm/UpSetChart/components/IntersectionsChart/IntersectionsChart.js +39 -0
- package/esm/UpSetChart/components/IntersectionsChart/index.d.ts +1 -0
- package/esm/UpSetChart/components/IntersectionsChart/index.js +1 -0
- package/esm/UpSetChart/components/IntersectionsChart/styles.d.ts +1 -0
- package/esm/UpSetChart/components/IntersectionsChart/styles.js +29 -0
- package/esm/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.d.ts +10 -0
- package/esm/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.js +34 -0
- package/esm/UpSetChart/components/IntersectionsChartAxis/index.d.ts +1 -0
- package/esm/UpSetChart/components/IntersectionsChartAxis/index.js +1 -0
- package/esm/UpSetChart/components/IntersectionsChartAxis/styles.d.ts +1 -0
- package/esm/UpSetChart/components/IntersectionsChartAxis/styles.js +29 -0
- package/esm/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.d.ts +13 -0
- package/esm/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.js +26 -0
- package/esm/UpSetChart/components/IntersectionsMatrix/index.d.ts +1 -0
- package/esm/UpSetChart/components/IntersectionsMatrix/index.js +1 -0
- package/esm/UpSetChart/components/IntersectionsMatrix/styles.d.ts +1 -0
- package/esm/UpSetChart/components/IntersectionsMatrix/styles.js +24 -0
- package/esm/UpSetChart/components/SetsChart/SetsChart.d.ts +15 -0
- package/esm/UpSetChart/components/SetsChart/SetsChart.js +31 -0
- package/esm/UpSetChart/components/SetsChart/index.d.ts +1 -0
- package/esm/UpSetChart/components/SetsChart/index.js +1 -0
- package/esm/UpSetChart/components/SetsChart/styles.d.ts +1 -0
- package/esm/UpSetChart/components/SetsChart/styles.js +40 -0
- package/esm/UpSetChart/components/SetsChartAxis/SetsChartAxis.d.ts +6 -0
- package/esm/UpSetChart/components/SetsChartAxis/SetsChartAxis.js +13 -0
- package/esm/UpSetChart/components/SetsChartAxis/index.d.ts +1 -0
- package/esm/UpSetChart/components/SetsChartAxis/index.js +1 -0
- package/esm/UpSetChart/components/SetsChartAxis/styles.d.ts +1 -0
- package/esm/UpSetChart/components/SetsChartAxis/styles.js +14 -0
- package/esm/UpSetChart/constants.d.ts +16 -3
- package/esm/UpSetChart/constants.js +19 -3
- package/esm/UpSetChart/gameOfThrones.test-data.d.ts +4 -0
- package/esm/UpSetChart/gameOfThrones.test-data.js +23 -0
- package/esm/UpSetChart/helpers.d.ts +20 -0
- package/esm/UpSetChart/helpers.js +120 -0
- package/esm/UpSetChart/styles.d.ts +4 -1
- package/esm/UpSetChart/styles.js +11 -12
- package/esm/UpSetChart/types.d.ts +16 -0
- package/esm/UpSetChart/useUpSetChartSizes.d.ts +20 -0
- package/esm/UpSetChart/useUpSetChartSizes.js +30 -0
- package/esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.d.ts +1 -1
- package/esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +1 -1
- package/esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.js +262 -0
- package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.d.ts +1 -2
- package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.js +1 -1
- package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.test.js +5 -23
- package/esm/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.test.js +3 -23
- package/esm/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.test.js +81 -102
- package/esm/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.d.ts +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.js +24 -2
- package/esm/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.js +1 -1
- package/esm/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.test.js +69 -48
- package/esm/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.test.js +123 -107
- package/esm/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.test.js +128 -115
- package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.js +1 -1
- package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +160 -183
- package/esm/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.js +2 -2
- package/esm/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.test.js +44 -28
- package/esm/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.js +4 -5
- package/esm/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.test.js +54 -47
- package/esm/features/activity-log/ActivityLog/ActivityLog.test.js +83 -22
- package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.js +1 -1
- package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.js +779 -0
- package/esm/features/activity-log/ActivityTitle/ActivityTitle.d.ts +2 -3
- package/esm/features/activity-log/ActivityTitle/ActivityTitle.js +24 -2
- package/esm/features/activity-log/CollapsibleActivityRecords/CollapsibleActivityRecords.test.js +104 -58
- package/esm/features/activity-log/EntityObject/EntityObject.test.js +35 -26
- package/esm/features/activity-log/Field/Field.d.ts +2 -3
- package/esm/features/activity-log/Field/Field.js +24 -2
- package/esm/features/activity-log/PotentialMatchRecord/PotentialMatchRecord.test.js +160 -34
- package/esm/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.js +1 -1
- package/esm/features/activity-log/RecordUpdates/RecordUpdates.test.js +202 -0
- package/esm/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +1 -1
- package/esm/features/activity-log/RelationObject/RelationObject.test.js +46 -29
- package/esm/features/activity-log/RelationRecord/RelationRecord.test.js +88 -68
- package/package.json +1 -1
- package/cjs/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +0 -142
- package/cjs/features/activity-log/ActivityFilterButton/ActivityFilterButton.specs.js +0 -131
- package/cjs/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +0 -252
- package/cjs/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.js +0 -158
- package/cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +0 -135
- package/cjs/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.js +0 -65
- package/cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +0 -119
- package/cjs/features/activity-log/ActivityFilterEditor/editor.test-data.d.ts +0 -25
- package/cjs/features/activity-log/ActivityFilterEditor/editor.test-data.js +0 -75
- package/cjs/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.js +0 -140
- package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +0 -41
- package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.d.ts +0 -1
- package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +0 -87
- package/cjs/features/activity-log/ActivityTitle/ActivityTitle.test.d.ts +0 -1
- package/cjs/features/activity-log/ActivityTitle/ActivityTitle.test.js +0 -19
- package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.d.ts +0 -1
- package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.js +0 -179
- package/cjs/features/activity-log/RecordUpdates/RecordUpdates.specs.d.ts +0 -1
- package/cjs/features/activity-log/RecordUpdates/RecordUpdates.specs.js +0 -150
- package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.d.ts +0 -1
- package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.js +0 -124
- package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +0 -137
- package/esm/features/activity-log/ActivityFilterButton/ActivityFilterButton.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterButton/ActivityFilterButton.specs.js +0 -126
- package/esm/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +0 -247
- package/esm/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.js +0 -153
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +0 -130
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.js +0 -60
- package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +0 -114
- package/esm/features/activity-log/ActivityFilterEditor/editor.test-data.d.ts +0 -25
- package/esm/features/activity-log/ActivityFilterEditor/editor.test-data.js +0 -72
- package/esm/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.d.ts +0 -1
- package/esm/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.js +0 -135
- package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.d.ts +0 -1
- package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +0 -36
- package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.d.ts +0 -1
- package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +0 -82
- package/esm/features/activity-log/ActivityTitle/ActivityTitle.test.d.ts +0 -1
- package/esm/features/activity-log/ActivityTitle/ActivityTitle.test.js +0 -14
- package/esm/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.d.ts +0 -1
- package/esm/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.js +0 -151
- package/esm/features/activity-log/RecordUpdates/RecordUpdates.specs.d.ts +0 -1
- package/esm/features/activity-log/RecordUpdates/RecordUpdates.specs.js +0 -122
- package/esm/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.d.ts +0 -1
- package/esm/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.js +0 -119
- /package/cjs/{features/activity-log/ActivityExportButton/ActivityExportButton.specs.d.ts → UpSetChart/UpSetChart.test.d.ts} +0 -0
- /package/cjs/features/activity-log/{ActivityFilterButton/ActivityFilterButton.specs.d.ts → ActivitiesFactory/ActivitiesFactory.test.d.ts} +0 -0
- /package/cjs/features/activity-log/{ActivityFilterEditor/ActivityFilterEditor.specs.d.ts → ActivityLogFilter/ActivityLogFilter.test.d.ts} +0 -0
- /package/cjs/features/activity-log/{ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.d.ts → RecordUpdates/RecordUpdates.test.d.ts} +0 -0
- /package/{cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.d.ts → esm/UpSetChart/UpSetChart.test.d.ts} +0 -0
- /package/{cjs/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.d.ts → esm/UpSetChart/types.js} +0 -0
- /package/{cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.d.ts → esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.d.ts} +0 -0
- /package/{cjs/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.d.ts → esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.d.ts} +0 -0
- /package/{cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.d.ts → esm/features/activity-log/RecordUpdates/RecordUpdates.test.d.ts} +0 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
23
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import React from 'react';
|
|
49
|
+
import { render, screen } from '@testing-library/react';
|
|
50
|
+
import userEvent from '@testing-library/user-event';
|
|
51
|
+
import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
|
|
52
|
+
import { CollapsibleItemsProvider } from '../contexts/CollapsibleItemsContext';
|
|
53
|
+
import { RecordUpdates } from './RecordUpdates';
|
|
54
|
+
var defaultUpdates = [
|
|
55
|
+
{
|
|
56
|
+
type: 'ATTRIBUTE_CHANGED',
|
|
57
|
+
attributeType: 'configuration/entityTypes/HCP/attributes/TextField',
|
|
58
|
+
newValue: { value: 'new text field value', ov: true, id: '3UIcE257b', sources: ['Reltio'] },
|
|
59
|
+
oldValue: { value: 'old text field value', ov: true, id: '3UIcE257b', sources: ['Reltio'] }
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'ATTRIBUTE_ADDED',
|
|
63
|
+
attributeType: 'configuration/entityTypes/HCP/attributes/FirstName',
|
|
64
|
+
newValue: { value: 'added first name value', ov: true, id: 'hsJ2b41', sources: ['Reltio'] }
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'ATTRIBUTE_REMOVED',
|
|
68
|
+
attributeType: 'configuration/entityTypes/HCP/attributes/LastName',
|
|
69
|
+
oldValue: { value: 'removed last name value', ov: true, id: 'Js23Ma09Ui', sources: ['Reltio'] }
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: 'ATTRIBUTE_CHANGED',
|
|
73
|
+
attributeType: 'configuration/entityTypes/HCP/attributes/Double',
|
|
74
|
+
newValue: { value: '1234.56789', ov: true, id: '83Ks3pOl2', sources: ['Reltio'] },
|
|
75
|
+
oldValue: { value: '98765.4321', ov: true, id: '83Ks3pOl2', sources: ['Reltio'] }
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: 'ATTRIBUTE_CHANGED',
|
|
79
|
+
attributeType: 'configuration/entityTypes/HCP/attributes/Boolean',
|
|
80
|
+
newValue: { value: 'true', ov: true, id: '3UIcE257b', sources: ['Reltio'] },
|
|
81
|
+
oldValue: { value: 'false', ov: true, id: '3UIcE257b', sources: ['Reltio'] }
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
var defaultProps = {
|
|
85
|
+
recordId: 'record-id',
|
|
86
|
+
updates: defaultUpdates
|
|
87
|
+
};
|
|
88
|
+
var defaultMdmValues = {
|
|
89
|
+
metadata: {
|
|
90
|
+
entityTypes: [
|
|
91
|
+
{
|
|
92
|
+
uri: 'configuration/entityTypes/HCP',
|
|
93
|
+
label: 'HCP',
|
|
94
|
+
attributes: [
|
|
95
|
+
{
|
|
96
|
+
label: 'String',
|
|
97
|
+
name: 'TextField',
|
|
98
|
+
type: 'String',
|
|
99
|
+
uri: 'configuration/entityTypes/HCP/attributes/TextField'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
label: 'First Name',
|
|
103
|
+
name: 'FirstName',
|
|
104
|
+
type: 'String',
|
|
105
|
+
uri: 'configuration/entityTypes/HCP/attributes/FirstName'
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: 'Last Name',
|
|
109
|
+
name: 'LastName',
|
|
110
|
+
type: 'String',
|
|
111
|
+
uri: 'configuration/entityTypes/HCP/attributes/LastName'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
label: 'Double',
|
|
115
|
+
name: 'Double',
|
|
116
|
+
type: 'Double',
|
|
117
|
+
uri: 'configuration/entityTypes/HCP/attributes/Double'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: 'Boolean',
|
|
121
|
+
name: 'Boolean',
|
|
122
|
+
type: 'Boolean',
|
|
123
|
+
uri: 'configuration/entityTypes/HCP/attributes/Boolean'
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
attributesPresentation: {
|
|
130
|
+
'configuration/entityTypes/HCP/attributes/Double': {
|
|
131
|
+
thousandSeparator: '-',
|
|
132
|
+
decimalSeparator: '^',
|
|
133
|
+
prefix: '[',
|
|
134
|
+
suffix: ']'
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var setUp = function (_a) {
|
|
139
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
|
|
140
|
+
var user = userEvent.setup();
|
|
141
|
+
var Providers = function (_a) {
|
|
142
|
+
var children = _a.children;
|
|
143
|
+
return (React.createElement(MdmModuleProvider, { values: mdmValues },
|
|
144
|
+
React.createElement(CollapsibleItemsProvider, null, children)));
|
|
145
|
+
};
|
|
146
|
+
return __assign(__assign({}, render(React.createElement(RecordUpdates, __assign({}, props)), { wrapper: Providers })), { user: user });
|
|
147
|
+
};
|
|
148
|
+
describe('Record updates tests', function () {
|
|
149
|
+
it('should not render anything if items empty', function () {
|
|
150
|
+
var props = __assign(__assign({}, defaultProps), { updates: [] });
|
|
151
|
+
var container = setUp({ props: props }).container;
|
|
152
|
+
expect(container).toBeEmptyDOMElement();
|
|
153
|
+
});
|
|
154
|
+
it('should render and expand items correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
155
|
+
var user, deltaFields;
|
|
156
|
+
return __generator(this, function (_a) {
|
|
157
|
+
switch (_a.label) {
|
|
158
|
+
case 0:
|
|
159
|
+
user = setUp().user;
|
|
160
|
+
deltaFields = screen.getAllByTestId('delta-field');
|
|
161
|
+
expect(deltaFields).toHaveLength(3);
|
|
162
|
+
expect(deltaFields[0]).toHaveTextContent('String:');
|
|
163
|
+
expect(deltaFields[0]).toHaveTextContent('old text field value');
|
|
164
|
+
expect(deltaFields[0]).toHaveTextContent('new text field value');
|
|
165
|
+
expect(deltaFields[0]).toHaveTextContent('edited');
|
|
166
|
+
expect(deltaFields[1]).toHaveTextContent('First Name:');
|
|
167
|
+
expect(deltaFields[1]).toHaveTextContent('added first name value');
|
|
168
|
+
expect(deltaFields[1]).toHaveTextContent('added');
|
|
169
|
+
expect(deltaFields[2]).toHaveTextContent('Last Name:');
|
|
170
|
+
expect(deltaFields[2]).toHaveTextContent('removed last name value');
|
|
171
|
+
expect(deltaFields[2]).toHaveTextContent('deleted');
|
|
172
|
+
return [4 /*yield*/, user.click(screen.getByRole('button', { name: '2 more updates' }))];
|
|
173
|
+
case 1:
|
|
174
|
+
_a.sent();
|
|
175
|
+
deltaFields = screen.getAllByTestId('delta-field');
|
|
176
|
+
expect(deltaFields).toHaveLength(5);
|
|
177
|
+
expect(deltaFields[3]).toHaveTextContent('Double:');
|
|
178
|
+
expect(deltaFields[3]).toHaveTextContent('[98-765^4321]');
|
|
179
|
+
expect(deltaFields[3]).toHaveTextContent('[1-234^56789]');
|
|
180
|
+
expect(deltaFields[3]).toHaveTextContent('edited');
|
|
181
|
+
expect(deltaFields[4]).toHaveTextContent('Boolean:');
|
|
182
|
+
expect(deltaFields[4]).toHaveTextContent('No');
|
|
183
|
+
expect(deltaFields[4]).toHaveTextContent('Yes');
|
|
184
|
+
expect(deltaFields[4]).toHaveTextContent('edited');
|
|
185
|
+
expect(screen.queryByRole('button')).not.toBeInTheDocument();
|
|
186
|
+
return [2 /*return*/];
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}); });
|
|
190
|
+
it('should not render more items link if updates count is 3 or less', function () {
|
|
191
|
+
var props = __assign(__assign({}, defaultProps), { updates: defaultUpdates.slice(0, 3) });
|
|
192
|
+
setUp({ props: props });
|
|
193
|
+
expect(screen.getAllByTestId('delta-field')).toHaveLength(3);
|
|
194
|
+
expect(screen.queryByRole('button')).not.toBeInTheDocument();
|
|
195
|
+
});
|
|
196
|
+
it('should render more items link correctly if updates count is 4', function () {
|
|
197
|
+
var props = __assign(__assign({}, defaultProps), { updates: defaultUpdates.slice(0, 4) });
|
|
198
|
+
setUp({ props: props });
|
|
199
|
+
expect(screen.getAllByTestId('delta-field')).toHaveLength(3);
|
|
200
|
+
screen.getByRole('button', { name: '1 more update' });
|
|
201
|
+
});
|
|
202
|
+
});
|
|
@@ -22,7 +22,7 @@ export var DeltaField = function (_a) {
|
|
|
22
22
|
var converter = function (value) {
|
|
23
23
|
return stringifyDeltaValue(value, delta.attributeType, metadata, attributesPresentation);
|
|
24
24
|
};
|
|
25
|
-
return (React.createElement(Field, { fieldName: (attribute === null || attribute === void 0 ? void 0 : attribute.label) || (attribute === null || attribute === void 0 ? void 0 : attribute.name) },
|
|
25
|
+
return (React.createElement(Field, { fieldName: (attribute === null || attribute === void 0 ? void 0 : attribute.label) || (attribute === null || attribute === void 0 ? void 0 : attribute.name), "data-reltio-id": "delta-field" },
|
|
26
26
|
React.createElement("span", null,
|
|
27
27
|
value && converter(value),
|
|
28
28
|
newValue && oldValue && (React.createElement(React.Fragment, null,
|
|
@@ -1,34 +1,51 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import React from 'react';
|
|
2
|
-
import {
|
|
13
|
+
import { render, screen } from '@testing-library/react';
|
|
14
|
+
import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
|
|
15
|
+
import { ActivityTypes } from '../types';
|
|
3
16
|
import { RelationObject } from './RelationObject';
|
|
4
|
-
|
|
17
|
+
var defaultItem = {
|
|
18
|
+
id: '3vJgNLSN',
|
|
19
|
+
timestamp: 1621847085259,
|
|
20
|
+
objectUri: 'relations/edEnRRW',
|
|
21
|
+
objectType: 'configuration/relationTypes/HasAddress',
|
|
22
|
+
startObjectUri: 'entities/sOoSQYm',
|
|
23
|
+
startObjectLabel: 'start object label',
|
|
24
|
+
endObjectUri: 'entities/1BVkicLG',
|
|
25
|
+
endObjectLabel: 'end object label',
|
|
26
|
+
data: { type: ActivityTypes.RELATIONSHIP_CHANGED }
|
|
27
|
+
};
|
|
28
|
+
var defaultProps = {
|
|
29
|
+
item: defaultItem
|
|
30
|
+
};
|
|
31
|
+
var defaultMdmValues = {
|
|
32
|
+
uiPath: 'https://reltio.com/nui'
|
|
33
|
+
};
|
|
34
|
+
var setUp = function (_a) {
|
|
35
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
|
|
36
|
+
var Providers = function (_a) {
|
|
37
|
+
var children = _a.children;
|
|
38
|
+
return (React.createElement(MdmModuleProvider, { values: mdmValues }, children));
|
|
39
|
+
};
|
|
40
|
+
return render(React.createElement(RelationObject, __assign({}, props)), { wrapper: Providers });
|
|
41
|
+
};
|
|
42
|
+
describe('Relation object tests', function () {
|
|
5
43
|
it('should render correctly', function () {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
timestamp: 1621847085259,
|
|
13
|
-
objectUri: 'relations/edEnRRW',
|
|
14
|
-
objectType: 'configuration/relationTypes/HasAddress',
|
|
15
|
-
startObjectUri: 'entities/sOoSQYm',
|
|
16
|
-
startObjectLabel: '- cBtCASwtAeEbTxe Agacati',
|
|
17
|
-
endObjectUri: 'entities/1BVkicLG',
|
|
18
|
-
endObjectLabel: 'cBtCASwtAeEbTxe Agacati Nash',
|
|
19
|
-
data: {
|
|
20
|
-
type: 'RELATIONSHIP_CHANGED'
|
|
21
|
-
},
|
|
22
|
-
eventId: '1621847085259_00qpSyx'
|
|
23
|
-
};
|
|
24
|
-
var wrapper = shallow(React.createElement(RelationObject, { item: relationItem }));
|
|
25
|
-
var startObjectUri = relationItem.startObjectUri, startObjectLabel = relationItem.startObjectLabel, endObjectUri = relationItem.endObjectUri, endObjectLabel = relationItem.endObjectLabel;
|
|
26
|
-
expect(wrapper.find('.delimiter').length).toBe(1);
|
|
27
|
-
var links = wrapper.find('EntityUriLink');
|
|
28
|
-
expect(links.length).toBe(2);
|
|
29
|
-
expect(links.at(0).prop('value')).toBe(startObjectUri);
|
|
30
|
-
expect(links.at(0).text()).toBe(startObjectLabel);
|
|
31
|
-
expect(links.at(1).prop('value')).toBe(endObjectUri);
|
|
32
|
-
expect(links.at(1).text()).toBe(endObjectLabel);
|
|
44
|
+
setUp();
|
|
45
|
+
var links = screen.getAllByRole('link');
|
|
46
|
+
expect(links[0]).toHaveTextContent('start object label');
|
|
47
|
+
expect(links[0]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/sOoSQYm');
|
|
48
|
+
expect(links[1]).toHaveTextContent('end object label');
|
|
49
|
+
expect(links[1]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/1BVkicLG');
|
|
33
50
|
});
|
|
34
51
|
});
|
|
@@ -10,79 +10,99 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import {
|
|
13
|
+
import { render, screen } from '@testing-library/react';
|
|
14
|
+
import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
|
|
15
|
+
import { CollapsibleItemsProvider } from '../contexts/CollapsibleItemsContext';
|
|
16
|
+
import { ActivityTypes } from '../types';
|
|
14
17
|
import { RelationRecord } from './RelationRecord';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
18
|
+
var defaultDeltaCollection = {
|
|
19
|
+
ovChanged: true,
|
|
20
|
+
delta: [
|
|
21
|
+
{
|
|
22
|
+
type: 'ATTRIBUTE_CHANGED',
|
|
23
|
+
attributeType: 'configuration/relationTypes/HasAddress/attributes/TextField',
|
|
24
|
+
newValue: { value: 'new value', ov: true, id: '3UIcE257b', sources: ['Reltio'] },
|
|
25
|
+
oldValue: { value: 'old value', ov: true, id: '3UIcE257b', sources: ['Reltio'] }
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'ATTRIBUTE_ADDED',
|
|
29
|
+
attributeType: 'configuration/relationTypes/HasAddress/attributes/TextField',
|
|
30
|
+
newValue: { value: 'added value', ov: true, id: 'Sdj23PaS', sources: ['Reltio'] }
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'ATTRIBUTE_REMOVED',
|
|
34
|
+
attributeType: 'configuration/relationTypes/HasAddress/attributes/TextField',
|
|
35
|
+
oldValue: { value: 'removed value', ov: true, id: '9m2Nsm3Pa', sources: ['Reltio'] }
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
var defaultItem = {
|
|
40
|
+
id: '3vJgNLSN',
|
|
41
|
+
timestamp: 1621847085259,
|
|
42
|
+
objectUri: 'relations/edEnRRW',
|
|
43
|
+
objectType: 'configuration/relationTypes/HasAddress',
|
|
44
|
+
startObjectUri: 'entities/sOoSQYm',
|
|
45
|
+
startObjectLabel: 'start object label',
|
|
46
|
+
endObjectUri: 'entities/1BVkicLG',
|
|
47
|
+
endObjectLabel: 'end object label',
|
|
48
|
+
data: { type: ActivityTypes.RELATIONSHIP_CHANGED },
|
|
49
|
+
deltaCollection: defaultDeltaCollection
|
|
50
|
+
};
|
|
51
|
+
var defaultProps = {
|
|
52
|
+
item: defaultItem
|
|
53
|
+
};
|
|
54
|
+
var defaultMdmValues = {
|
|
55
|
+
metadata: {
|
|
56
|
+
entityTypes: [
|
|
45
57
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
uri: 'configuration/relationTypes/HasAddress',
|
|
59
|
+
label: 'Has address',
|
|
60
|
+
attributes: [
|
|
61
|
+
{
|
|
62
|
+
label: 'String',
|
|
63
|
+
name: 'TextField',
|
|
64
|
+
type: 'String',
|
|
65
|
+
uri: 'configuration/relationTypes/HasAddress/attributes/TextField'
|
|
66
|
+
}
|
|
67
|
+
]
|
|
54
68
|
}
|
|
55
69
|
]
|
|
70
|
+
},
|
|
71
|
+
uiPath: 'https://reltio.com/nui'
|
|
72
|
+
};
|
|
73
|
+
var setUp = function (_a) {
|
|
74
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
|
|
75
|
+
var Providers = function (_a) {
|
|
76
|
+
var children = _a.children;
|
|
77
|
+
return (React.createElement(MdmModuleProvider, { values: mdmValues },
|
|
78
|
+
React.createElement(CollapsibleItemsProvider, null, children)));
|
|
56
79
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
61
|
-
var wrapperItem = {
|
|
62
|
-
id: '30Y8UsZr',
|
|
63
|
-
user: 'alexander.kirsanov',
|
|
64
|
-
method: 'PUT',
|
|
65
|
-
url: '/reltio/api/alenat/entities/k5nO0xA/attributes/TextField/3UIcE257b',
|
|
66
|
-
clientType: 'Reltio UI',
|
|
67
|
-
timestamp: 1622096971385,
|
|
68
|
-
objectUri: 'entities/k5nO0xA',
|
|
69
|
-
objectType: 'configuration/entityTypes/HCP',
|
|
70
|
-
objectLabel: 'BulkUpdate_regression_3 Label_test_Long_label_test_long_long_long_long_long - RelationTableViewss - New Address for HCP_Bulk_Update with long_label Londomir',
|
|
71
|
-
data: {
|
|
72
|
-
type: 'ENTITY_CHANGED'
|
|
73
|
-
},
|
|
74
|
-
deltaCollection: deltaCollection,
|
|
75
|
-
eventId: '1622096971385_03DVkNW'
|
|
76
|
-
};
|
|
80
|
+
return render(React.createElement(RelationRecord, __assign({}, props)), { wrapper: Providers });
|
|
81
|
+
};
|
|
82
|
+
describe('Relation record tests', function () {
|
|
77
83
|
it('should render correctly', function () {
|
|
78
|
-
|
|
79
|
-
expect(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
expect(
|
|
85
|
-
expect(
|
|
86
|
-
expect(
|
|
84
|
+
setUp();
|
|
85
|
+
expect(screen.queryByText('Relationship updated')).not.toBeInTheDocument();
|
|
86
|
+
screen.getByText('start object label');
|
|
87
|
+
screen.getByText('end object label');
|
|
88
|
+
var deltaFields = screen.getAllByTestId('delta-field');
|
|
89
|
+
expect(deltaFields[0]).toHaveTextContent('String:');
|
|
90
|
+
expect(deltaFields[0]).toHaveTextContent('old value');
|
|
91
|
+
expect(deltaFields[0]).toHaveTextContent('new value');
|
|
92
|
+
expect(deltaFields[0]).toHaveTextContent('edited');
|
|
93
|
+
expect(deltaFields[1]).toHaveTextContent('String:');
|
|
94
|
+
expect(deltaFields[1]).toHaveTextContent('added value');
|
|
95
|
+
expect(deltaFields[1]).toHaveTextContent('added');
|
|
96
|
+
expect(deltaFields[2]).toHaveTextContent('String:');
|
|
97
|
+
expect(deltaFields[2]).toHaveTextContent('removed value');
|
|
98
|
+
expect(deltaFields[2]).toHaveTextContent('deleted');
|
|
99
|
+
});
|
|
100
|
+
it('should render correctly without delta', function () {
|
|
101
|
+
var props = __assign(__assign({}, defaultProps), { item: __assign(__assign({}, defaultItem), { deltaCollection: undefined }) });
|
|
102
|
+
setUp({ props: props });
|
|
103
|
+
screen.getByText('Relationship updated');
|
|
104
|
+
screen.getByText('start object label');
|
|
105
|
+
screen.getByText('end object label');
|
|
106
|
+
expect(screen.queryByTestId('delta-field')).not.toBeInTheDocument();
|
|
87
107
|
});
|
|
88
108
|
});
|
package/package.json
CHANGED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
-
};
|
|
52
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
var react_1 = __importDefault(require("react"));
|
|
54
|
-
var enzyme_1 = require("enzyme");
|
|
55
|
-
var test_utils_1 = require("react-dom/test-utils");
|
|
56
|
-
var ActivityExportButton_1 = require("./ActivityExportButton");
|
|
57
|
-
var SmallIconButton_1 = require("../../../SmallIconButton");
|
|
58
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
59
|
-
var DropDownMenuButton_1 = require("../../../DropDownMenuButton");
|
|
60
|
-
var Snackbar_1 = __importDefault(require("@mui/material/Snackbar"));
|
|
61
|
-
var MdmModuleContext_1 = require("../../../contexts/MdmModuleContext");
|
|
62
|
-
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { exportActivities: jest.fn() })); });
|
|
63
|
-
var filters = {
|
|
64
|
-
users: [],
|
|
65
|
-
activities: [],
|
|
66
|
-
dateRange: {
|
|
67
|
-
type: mdm_sdk_1.DateRangeTypes.WITHIN,
|
|
68
|
-
period: [4, 'month']
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
var defaultProps = {
|
|
72
|
-
filters: filters,
|
|
73
|
-
exportTypes: ['csv', 'json']
|
|
74
|
-
};
|
|
75
|
-
var defaultExportPath = 'exportPath/';
|
|
76
|
-
var defaultTenant = 'sokol';
|
|
77
|
-
var defaultMdmValues = {
|
|
78
|
-
exportPath: defaultExportPath,
|
|
79
|
-
tenant: { id: defaultTenant, name: defaultTenant }
|
|
80
|
-
};
|
|
81
|
-
var defaultMdmActions = {
|
|
82
|
-
openConsoleApp: jest.fn()
|
|
83
|
-
};
|
|
84
|
-
var setUp = function (_a) {
|
|
85
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmActions, mdmActions = _d === void 0 ? defaultMdmActions : _d, _e = _b.mdmValues, mdmValues = _e === void 0 ? defaultMdmValues : _e;
|
|
86
|
-
return (0, enzyme_1.mount)(react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues, actions: mdmActions },
|
|
87
|
-
react_1.default.createElement(ActivityExportButton_1.ActivityExportButton, __assign({}, props))));
|
|
88
|
-
};
|
|
89
|
-
describe('ActivityExportButton tests', function () {
|
|
90
|
-
beforeAll(function () {
|
|
91
|
-
mdm_sdk_1.exportActivities.mockImplementation(function () { return new Promise(function (resolve) { return resolve({}); }); });
|
|
92
|
-
});
|
|
93
|
-
it('should render correct default state', function () {
|
|
94
|
-
var wrapper = setUp();
|
|
95
|
-
expect(wrapper.find(SmallIconButton_1.SmallIconButton).length).toBe(1);
|
|
96
|
-
expect(wrapper.find(DropDownMenuButton_1.DropDownMenuButton).length).toBe(1);
|
|
97
|
-
});
|
|
98
|
-
it('should not render dropdown menu when exportTypes are empty', function () {
|
|
99
|
-
var props = __assign(__assign({}, defaultProps), { exportTypes: [] });
|
|
100
|
-
var wrapper = setUp({ props: props });
|
|
101
|
-
expect(wrapper.find(SmallIconButton_1.SmallIconButton).length).toBe(1);
|
|
102
|
-
expect(wrapper.find(DropDownMenuButton_1.DropDownMenuButton).length).toBe(0);
|
|
103
|
-
});
|
|
104
|
-
it('should not render dropdown menu when exportTypes are passed and export permitted', function () {
|
|
105
|
-
var wrapper = setUp();
|
|
106
|
-
expect(wrapper.find(SmallIconButton_1.SmallIconButton).length).toBe(1);
|
|
107
|
-
expect(wrapper.find(DropDownMenuButton_1.DropDownMenuButton).length).toBe(1);
|
|
108
|
-
var menuItemsProps = wrapper.find(DropDownMenuButton_1.DropDownMenuButton).prop('menuItems');
|
|
109
|
-
expect(menuItemsProps.map(function (item) { return item.text; })).toEqual(['CSV', 'JSON']);
|
|
110
|
-
});
|
|
111
|
-
it('should open snackbar on export button click', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
112
|
-
var props, wrapper, button;
|
|
113
|
-
return __generator(this, function (_a) {
|
|
114
|
-
switch (_a.label) {
|
|
115
|
-
case 0:
|
|
116
|
-
props = __assign(__assign({}, defaultProps), { exportTypes: [] });
|
|
117
|
-
wrapper = setUp({ props: props });
|
|
118
|
-
button = wrapper.find(SmallIconButton_1.SmallIconButton);
|
|
119
|
-
expect(button.length).toBe(1);
|
|
120
|
-
expect(button.prop('aria-label')).toBe('Export');
|
|
121
|
-
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
122
|
-
return __generator(this, function (_a) {
|
|
123
|
-
button.find('button').simulate('click');
|
|
124
|
-
return [2 /*return*/];
|
|
125
|
-
});
|
|
126
|
-
}); })];
|
|
127
|
-
case 1:
|
|
128
|
-
_a.sent();
|
|
129
|
-
wrapper.update();
|
|
130
|
-
expect(wrapper.find(Snackbar_1.default).prop('open')).toBeTruthy();
|
|
131
|
-
expect(mdm_sdk_1.exportActivities).toHaveBeenCalledWith({
|
|
132
|
-
exportPath: 'exportPath/',
|
|
133
|
-
options: {
|
|
134
|
-
filter: expect.stringMatching(/^\(gte\(timestamp, [0-9]+\)\) and \(not equals\(user, 'collaboration-service'\)\)$/)
|
|
135
|
-
},
|
|
136
|
-
tenant: 'sokol'
|
|
137
|
-
});
|
|
138
|
-
return [2 /*return*/];
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
}); });
|
|
142
|
-
});
|