@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.
Files changed (228) hide show
  1. package/cjs/UpSetChart/UpSetChart.d.ts +5 -8
  2. package/cjs/UpSetChart/UpSetChart.js +61 -5
  3. package/cjs/UpSetChart/UpSetChart.test.js +198 -0
  4. package/cjs/UpSetChart/components/IntersectionsChart/IntersectionsChart.d.ts +15 -0
  5. package/cjs/UpSetChart/components/IntersectionsChart/IntersectionsChart.js +66 -0
  6. package/cjs/UpSetChart/components/IntersectionsChart/index.d.ts +1 -0
  7. package/cjs/UpSetChart/components/IntersectionsChart/index.js +5 -0
  8. package/cjs/UpSetChart/components/IntersectionsChart/styles.d.ts +1 -0
  9. package/cjs/UpSetChart/components/IntersectionsChart/styles.js +32 -0
  10. package/cjs/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.d.ts +10 -0
  11. package/cjs/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.js +64 -0
  12. package/cjs/UpSetChart/components/IntersectionsChartAxis/index.d.ts +1 -0
  13. package/cjs/UpSetChart/components/IntersectionsChartAxis/index.js +5 -0
  14. package/cjs/UpSetChart/components/IntersectionsChartAxis/styles.d.ts +1 -0
  15. package/cjs/UpSetChart/components/IntersectionsChartAxis/styles.js +32 -0
  16. package/cjs/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.d.ts +13 -0
  17. package/cjs/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.js +56 -0
  18. package/cjs/UpSetChart/components/IntersectionsMatrix/index.d.ts +1 -0
  19. package/cjs/UpSetChart/components/IntersectionsMatrix/index.js +5 -0
  20. package/cjs/UpSetChart/components/IntersectionsMatrix/styles.d.ts +1 -0
  21. package/cjs/UpSetChart/components/IntersectionsMatrix/styles.js +27 -0
  22. package/cjs/UpSetChart/components/SetsChart/SetsChart.d.ts +15 -0
  23. package/cjs/UpSetChart/components/SetsChart/SetsChart.js +58 -0
  24. package/cjs/UpSetChart/components/SetsChart/index.d.ts +1 -0
  25. package/cjs/UpSetChart/components/SetsChart/index.js +5 -0
  26. package/cjs/UpSetChart/components/SetsChart/styles.d.ts +1 -0
  27. package/cjs/UpSetChart/components/SetsChart/styles.js +43 -0
  28. package/cjs/UpSetChart/components/SetsChartAxis/SetsChartAxis.d.ts +6 -0
  29. package/cjs/UpSetChart/components/SetsChartAxis/SetsChartAxis.js +20 -0
  30. package/cjs/UpSetChart/components/SetsChartAxis/index.d.ts +1 -0
  31. package/cjs/UpSetChart/components/SetsChartAxis/index.js +5 -0
  32. package/cjs/UpSetChart/components/SetsChartAxis/styles.d.ts +1 -0
  33. package/cjs/UpSetChart/components/SetsChartAxis/styles.js +17 -0
  34. package/cjs/UpSetChart/constants.d.ts +16 -3
  35. package/cjs/UpSetChart/constants.js +20 -4
  36. package/cjs/UpSetChart/gameOfThrones.test-data.d.ts +4 -0
  37. package/cjs/UpSetChart/gameOfThrones.test-data.js +26 -0
  38. package/cjs/UpSetChart/helpers.d.ts +20 -0
  39. package/cjs/UpSetChart/helpers.js +127 -0
  40. package/cjs/UpSetChart/styles.d.ts +4 -1
  41. package/cjs/UpSetChart/styles.js +11 -12
  42. package/cjs/UpSetChart/types.d.ts +16 -0
  43. package/cjs/UpSetChart/types.js +2 -0
  44. package/cjs/UpSetChart/useUpSetChartSizes.d.ts +20 -0
  45. package/cjs/UpSetChart/useUpSetChartSizes.js +34 -0
  46. package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.d.ts +1 -1
  47. package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +1 -1
  48. package/cjs/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.js +267 -0
  49. package/cjs/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.d.ts +1 -2
  50. package/cjs/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.js +1 -1
  51. package/cjs/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.test.js +5 -23
  52. package/cjs/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.js +2 -2
  53. package/cjs/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.test.js +3 -23
  54. package/cjs/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.js +2 -2
  55. package/cjs/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.test.js +81 -102
  56. package/cjs/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.d.ts +2 -2
  57. package/cjs/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.js +24 -2
  58. package/cjs/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.js +1 -1
  59. package/cjs/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.test.js +69 -48
  60. package/cjs/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.js +2 -2
  61. package/cjs/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.test.js +123 -107
  62. package/cjs/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.js +2 -2
  63. package/cjs/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.test.js +128 -115
  64. package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.js +1 -1
  65. package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +160 -183
  66. package/cjs/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.js +2 -2
  67. package/cjs/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.test.js +44 -28
  68. package/cjs/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.js +4 -5
  69. package/cjs/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.test.js +54 -47
  70. package/cjs/features/activity-log/ActivityLog/ActivityLog.test.js +83 -22
  71. package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.js +1 -1
  72. package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.js +784 -0
  73. package/cjs/features/activity-log/ActivityTitle/ActivityTitle.d.ts +2 -3
  74. package/cjs/features/activity-log/ActivityTitle/ActivityTitle.js +24 -2
  75. package/cjs/features/activity-log/CollapsibleActivityRecords/CollapsibleActivityRecords.test.js +102 -79
  76. package/cjs/features/activity-log/EntityObject/EntityObject.test.js +35 -26
  77. package/cjs/features/activity-log/Field/Field.d.ts +2 -3
  78. package/cjs/features/activity-log/Field/Field.js +24 -2
  79. package/cjs/features/activity-log/PotentialMatchRecord/PotentialMatchRecord.test.js +160 -34
  80. package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.js +1 -1
  81. package/cjs/features/activity-log/RecordUpdates/RecordUpdates.test.js +207 -0
  82. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +1 -1
  83. package/cjs/features/activity-log/RelationObject/RelationObject.test.js +46 -29
  84. package/cjs/features/activity-log/RelationRecord/RelationRecord.test.js +88 -68
  85. package/esm/UpSetChart/UpSetChart.d.ts +5 -8
  86. package/esm/UpSetChart/UpSetChart.js +38 -5
  87. package/esm/UpSetChart/UpSetChart.test.js +193 -0
  88. package/esm/UpSetChart/components/IntersectionsChart/IntersectionsChart.d.ts +15 -0
  89. package/esm/UpSetChart/components/IntersectionsChart/IntersectionsChart.js +39 -0
  90. package/esm/UpSetChart/components/IntersectionsChart/index.d.ts +1 -0
  91. package/esm/UpSetChart/components/IntersectionsChart/index.js +1 -0
  92. package/esm/UpSetChart/components/IntersectionsChart/styles.d.ts +1 -0
  93. package/esm/UpSetChart/components/IntersectionsChart/styles.js +29 -0
  94. package/esm/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.d.ts +10 -0
  95. package/esm/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.js +34 -0
  96. package/esm/UpSetChart/components/IntersectionsChartAxis/index.d.ts +1 -0
  97. package/esm/UpSetChart/components/IntersectionsChartAxis/index.js +1 -0
  98. package/esm/UpSetChart/components/IntersectionsChartAxis/styles.d.ts +1 -0
  99. package/esm/UpSetChart/components/IntersectionsChartAxis/styles.js +29 -0
  100. package/esm/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.d.ts +13 -0
  101. package/esm/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.js +26 -0
  102. package/esm/UpSetChart/components/IntersectionsMatrix/index.d.ts +1 -0
  103. package/esm/UpSetChart/components/IntersectionsMatrix/index.js +1 -0
  104. package/esm/UpSetChart/components/IntersectionsMatrix/styles.d.ts +1 -0
  105. package/esm/UpSetChart/components/IntersectionsMatrix/styles.js +24 -0
  106. package/esm/UpSetChart/components/SetsChart/SetsChart.d.ts +15 -0
  107. package/esm/UpSetChart/components/SetsChart/SetsChart.js +31 -0
  108. package/esm/UpSetChart/components/SetsChart/index.d.ts +1 -0
  109. package/esm/UpSetChart/components/SetsChart/index.js +1 -0
  110. package/esm/UpSetChart/components/SetsChart/styles.d.ts +1 -0
  111. package/esm/UpSetChart/components/SetsChart/styles.js +40 -0
  112. package/esm/UpSetChart/components/SetsChartAxis/SetsChartAxis.d.ts +6 -0
  113. package/esm/UpSetChart/components/SetsChartAxis/SetsChartAxis.js +13 -0
  114. package/esm/UpSetChart/components/SetsChartAxis/index.d.ts +1 -0
  115. package/esm/UpSetChart/components/SetsChartAxis/index.js +1 -0
  116. package/esm/UpSetChart/components/SetsChartAxis/styles.d.ts +1 -0
  117. package/esm/UpSetChart/components/SetsChartAxis/styles.js +14 -0
  118. package/esm/UpSetChart/constants.d.ts +16 -3
  119. package/esm/UpSetChart/constants.js +19 -3
  120. package/esm/UpSetChart/gameOfThrones.test-data.d.ts +4 -0
  121. package/esm/UpSetChart/gameOfThrones.test-data.js +23 -0
  122. package/esm/UpSetChart/helpers.d.ts +20 -0
  123. package/esm/UpSetChart/helpers.js +120 -0
  124. package/esm/UpSetChart/styles.d.ts +4 -1
  125. package/esm/UpSetChart/styles.js +11 -12
  126. package/esm/UpSetChart/types.d.ts +16 -0
  127. package/esm/UpSetChart/useUpSetChartSizes.d.ts +20 -0
  128. package/esm/UpSetChart/useUpSetChartSizes.js +30 -0
  129. package/esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.d.ts +1 -1
  130. package/esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.js +1 -1
  131. package/esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.js +262 -0
  132. package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.d.ts +1 -2
  133. package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.js +1 -1
  134. package/esm/features/activity-log/ActivitiesFactory/components/CommentActivity/CommentActivity.test.js +5 -23
  135. package/esm/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.js +2 -2
  136. package/esm/features/activity-log/ActivitiesFactory/components/GroupActivity/GroupActivity.test.js +3 -23
  137. package/esm/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.js +2 -2
  138. package/esm/features/activity-log/ActivitiesFactory/components/MergeActivity/MergeActivity.test.js +81 -102
  139. package/esm/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.d.ts +2 -2
  140. package/esm/features/activity-log/ActivitiesFactory/components/ObjectLabel/ObjectLabel.js +24 -2
  141. package/esm/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.js +1 -1
  142. package/esm/features/activity-log/ActivitiesFactory/components/PotentialMatchActivity/PotentialMatchActivity.test.js +69 -48
  143. package/esm/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.js +2 -2
  144. package/esm/features/activity-log/ActivitiesFactory/components/ProfileActivity/ProfileActivity.test.js +123 -107
  145. package/esm/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.js +2 -2
  146. package/esm/features/activity-log/ActivitiesFactory/components/RelationActivity/RelationActivity.test.js +128 -115
  147. package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.js +1 -1
  148. package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +160 -183
  149. package/esm/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.js +2 -2
  150. package/esm/features/activity-log/ActivitiesFactory/components/SimpleActivity/SimpleActivity.test.js +44 -28
  151. package/esm/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.js +4 -5
  152. package/esm/features/activity-log/ActivitiesFactory/components/SynchronizationIssuesActivity/SynchronizationIssuesActivity.test.js +54 -47
  153. package/esm/features/activity-log/ActivityLog/ActivityLog.test.js +83 -22
  154. package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.js +1 -1
  155. package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.js +779 -0
  156. package/esm/features/activity-log/ActivityTitle/ActivityTitle.d.ts +2 -3
  157. package/esm/features/activity-log/ActivityTitle/ActivityTitle.js +24 -2
  158. package/esm/features/activity-log/CollapsibleActivityRecords/CollapsibleActivityRecords.test.js +104 -58
  159. package/esm/features/activity-log/EntityObject/EntityObject.test.js +35 -26
  160. package/esm/features/activity-log/Field/Field.d.ts +2 -3
  161. package/esm/features/activity-log/Field/Field.js +24 -2
  162. package/esm/features/activity-log/PotentialMatchRecord/PotentialMatchRecord.test.js +160 -34
  163. package/esm/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.js +1 -1
  164. package/esm/features/activity-log/RecordUpdates/RecordUpdates.test.js +202 -0
  165. package/esm/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.js +1 -1
  166. package/esm/features/activity-log/RelationObject/RelationObject.test.js +46 -29
  167. package/esm/features/activity-log/RelationRecord/RelationRecord.test.js +88 -68
  168. package/package.json +1 -1
  169. package/cjs/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +0 -142
  170. package/cjs/features/activity-log/ActivityFilterButton/ActivityFilterButton.specs.js +0 -131
  171. package/cjs/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +0 -252
  172. package/cjs/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.js +0 -158
  173. package/cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +0 -135
  174. package/cjs/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.js +0 -65
  175. package/cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +0 -119
  176. package/cjs/features/activity-log/ActivityFilterEditor/editor.test-data.d.ts +0 -25
  177. package/cjs/features/activity-log/ActivityFilterEditor/editor.test-data.js +0 -75
  178. package/cjs/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.js +0 -140
  179. package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +0 -41
  180. package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.d.ts +0 -1
  181. package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +0 -87
  182. package/cjs/features/activity-log/ActivityTitle/ActivityTitle.test.d.ts +0 -1
  183. package/cjs/features/activity-log/ActivityTitle/ActivityTitle.test.js +0 -19
  184. package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.d.ts +0 -1
  185. package/cjs/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.js +0 -179
  186. package/cjs/features/activity-log/RecordUpdates/RecordUpdates.specs.d.ts +0 -1
  187. package/cjs/features/activity-log/RecordUpdates/RecordUpdates.specs.js +0 -150
  188. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.d.ts +0 -1
  189. package/cjs/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.js +0 -124
  190. package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.d.ts +0 -1
  191. package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +0 -137
  192. package/esm/features/activity-log/ActivityFilterButton/ActivityFilterButton.specs.d.ts +0 -1
  193. package/esm/features/activity-log/ActivityFilterButton/ActivityFilterButton.specs.js +0 -126
  194. package/esm/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.d.ts +0 -1
  195. package/esm/features/activity-log/ActivityFilterEditor/ActivityFilterEditor.specs.js +0 -247
  196. package/esm/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.d.ts +0 -1
  197. package/esm/features/activity-log/ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.js +0 -153
  198. package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.d.ts +0 -1
  199. package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +0 -130
  200. package/esm/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.d.ts +0 -1
  201. package/esm/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.js +0 -60
  202. package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.d.ts +0 -1
  203. package/esm/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.js +0 -114
  204. package/esm/features/activity-log/ActivityFilterEditor/editor.test-data.d.ts +0 -25
  205. package/esm/features/activity-log/ActivityFilterEditor/editor.test-data.js +0 -72
  206. package/esm/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.d.ts +0 -1
  207. package/esm/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.js +0 -135
  208. package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.d.ts +0 -1
  209. package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +0 -36
  210. package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.d.ts +0 -1
  211. package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +0 -82
  212. package/esm/features/activity-log/ActivityTitle/ActivityTitle.test.d.ts +0 -1
  213. package/esm/features/activity-log/ActivityTitle/ActivityTitle.test.js +0 -14
  214. package/esm/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.d.ts +0 -1
  215. package/esm/features/activity-log/PotentialMatchRecord/components/PotentialMatchField/PotentialMatchField.test.js +0 -151
  216. package/esm/features/activity-log/RecordUpdates/RecordUpdates.specs.d.ts +0 -1
  217. package/esm/features/activity-log/RecordUpdates/RecordUpdates.specs.js +0 -122
  218. package/esm/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.d.ts +0 -1
  219. package/esm/features/activity-log/RecordUpdates/components/DeltaField/DeltaField.test.js +0 -119
  220. /package/cjs/{features/activity-log/ActivityExportButton/ActivityExportButton.specs.d.ts → UpSetChart/UpSetChart.test.d.ts} +0 -0
  221. /package/cjs/features/activity-log/{ActivityFilterButton/ActivityFilterButton.specs.d.ts → ActivitiesFactory/ActivitiesFactory.test.d.ts} +0 -0
  222. /package/cjs/features/activity-log/{ActivityFilterEditor/ActivityFilterEditor.specs.d.ts → ActivityLogFilter/ActivityLogFilter.test.d.ts} +0 -0
  223. /package/cjs/features/activity-log/{ActivityFilterEditor/components/ActivitySelector/ActivitySelector.specs.d.ts → RecordUpdates/RecordUpdates.test.d.ts} +0 -0
  224. /package/{cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.d.ts → esm/UpSetChart/UpSetChart.test.d.ts} +0 -0
  225. /package/{cjs/features/activity-log/ActivityFilterEditor/components/EntityTypesSelector/EntityTypesSelector.specs.d.ts → esm/UpSetChart/types.js} +0 -0
  226. /package/{cjs/features/activity-log/ActivityFilterEditor/components/SourceSelector/SourceSelector.specs.d.ts → esm/features/activity-log/ActivitiesFactory/ActivitiesFactory.test.d.ts} +0 -0
  227. /package/{cjs/features/activity-log/ActivityLog/components/ActivityItem/ActivityItem.test.d.ts → esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.test.d.ts} +0 -0
  228. /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,267 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var react_1 = __importDefault(require("react"));
7
+ var react_2 = require("@testing-library/react");
8
+ var MdmModuleContext_1 = require("../../../contexts/MdmModuleContext");
9
+ var CollapsibleItemsContext_1 = require("../contexts/CollapsibleItemsContext");
10
+ var types_1 = require("../types");
11
+ var ActivitiesFactory_1 = require("./ActivitiesFactory");
12
+ var defaultMdmValues = {
13
+ metadata: {
14
+ entityTypes: [],
15
+ groupTypes: []
16
+ }
17
+ };
18
+ var setUp = function (_a) {
19
+ var props = _a.props, _b = _a.mdmValues, mdmValues = _b === void 0 ? defaultMdmValues : _b;
20
+ var Providers = function (_a) {
21
+ var children = _a.children;
22
+ return (react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues },
23
+ react_1.default.createElement(CollapsibleItemsContext_1.CollapsibleItemsProvider, null, children)));
24
+ };
25
+ return (0, react_2.render)(ActivitiesFactory_1.ActivitiesFactory.getComponent(props), { wrapper: Providers });
26
+ };
27
+ describe('Activities factory tests', function () {
28
+ describe('comment activity', function () {
29
+ it('should render comment activity for COMMENT_ADDED activity type', function () {
30
+ var props = { type: types_1.ActivityTypes.COMMENT_ADDED };
31
+ setUp({ props: props });
32
+ react_2.screen.getByTestId('comment-activity');
33
+ });
34
+ it('should render comment activity for COMMENT_DELETED activity type', function () {
35
+ var props = { type: types_1.ActivityTypes.COMMENT_DELETED };
36
+ setUp({ props: props });
37
+ react_2.screen.getByTestId('comment-activity');
38
+ });
39
+ it('should render comment activity for COMMENT_UPDATED activity type', function () {
40
+ var props = { type: types_1.ActivityTypes.COMMENT_UPDATED };
41
+ setUp({ props: props });
42
+ react_2.screen.getByTestId('comment-activity');
43
+ });
44
+ });
45
+ describe('merge activity', function () {
46
+ var defaultData = {
47
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
48
+ user: 'marat.ahmetzyanov',
49
+ timestamp: 1620711408828,
50
+ items: [],
51
+ itemsTotal: 0
52
+ };
53
+ it('should render merge activity for ENTITIES_MERGED_MANUALLY activity type', function () {
54
+ var props = { data: defaultData, type: types_1.ActivityTypes.ENTITIES_MERGED_MANUALLY };
55
+ setUp({ props: props });
56
+ react_2.screen.getByTestId('merge-activity');
57
+ });
58
+ it('should render merge activity for ENTITIES_MERGED activity type', function () {
59
+ var props = { data: defaultData, type: types_1.ActivityTypes.ENTITIES_MERGED };
60
+ setUp({ props: props });
61
+ react_2.screen.getByTestId('merge-activity');
62
+ });
63
+ it('should render merge activity for ENTITIES_MERGED_ON_THE_FLY activity type', function () {
64
+ var props = { data: defaultData, type: types_1.ActivityTypes.ENTITIES_MERGED_ON_THE_FLY };
65
+ setUp({ props: props });
66
+ react_2.screen.getByTestId('merge-activity');
67
+ });
68
+ it('should render merge activity for ENTITIES_SPLITTED activity type', function () {
69
+ var props = { data: defaultData, type: types_1.ActivityTypes.ENTITIES_SPLITTED };
70
+ setUp({ props: props });
71
+ react_2.screen.getByTestId('merge-activity');
72
+ });
73
+ it('should render merge activity for ENTITY_LOST_MERGE activity type', function () {
74
+ var props = { data: defaultData, type: types_1.ActivityTypes.ENTITY_LOST_MERGE };
75
+ setUp({ props: props });
76
+ react_2.screen.getByTestId('merge-activity');
77
+ });
78
+ });
79
+ describe('potential match activity', function () {
80
+ var defaultData = {
81
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
82
+ user: 'marat.ahmetzyanov',
83
+ timestamp: 1620711408828,
84
+ items: [],
85
+ itemsTotal: 0
86
+ };
87
+ it('should render potential match activity for POTENTIAL_MATCHES_FOUND activity type', function () {
88
+ var props = { data: defaultData, type: types_1.ActivityTypes.POTENTIAL_MATCHES_FOUND };
89
+ setUp({ props: props });
90
+ react_2.screen.getByTestId('potential-match-activity');
91
+ });
92
+ it('should render potential match activity for POTENTIAL_MATCHES_REMOVED activity type', function () {
93
+ var props = { data: defaultData, type: types_1.ActivityTypes.POTENTIAL_MATCHES_REMOVED };
94
+ setUp({ props: props });
95
+ react_2.screen.getByTestId('potential-match-activity');
96
+ });
97
+ it('should render potential match activity for NOT_MATCHES_SET activity type', function () {
98
+ var props = { data: defaultData, type: types_1.ActivityTypes.NOT_MATCHES_SET };
99
+ setUp({ props: props });
100
+ react_2.screen.getByTestId('potential-match-activity');
101
+ });
102
+ it('should render potential match activity for NOT_MATCHES_RESET activity type', function () {
103
+ var props = { data: defaultData, type: types_1.ActivityTypes.NOT_MATCHES_RESET };
104
+ setUp({ props: props });
105
+ react_2.screen.getByTestId('potential-match-activity');
106
+ });
107
+ });
108
+ describe('profile activity', function () {
109
+ var defaultData = {
110
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
111
+ user: 'marat.ahmetzyanov',
112
+ timestamp: 1620711408828,
113
+ items: [],
114
+ itemsTotal: 0
115
+ };
116
+ it('should render profile activity for ENTITY_CHANGED activity type', function () {
117
+ var props = { data: defaultData, type: types_1.ActivityTypes.ENTITY_CHANGED };
118
+ setUp({ props: props });
119
+ react_2.screen.getByTestId('profile-activity');
120
+ });
121
+ it('should render profile activity for ENTITY_CREATED activity type', function () {
122
+ var props = { data: defaultData, type: types_1.ActivityTypes.ENTITY_CREATED };
123
+ setUp({ props: props });
124
+ react_2.screen.getByTestId('profile-activity');
125
+ });
126
+ it('should render profile activity for ENTITY_REMOVED activity type', function () {
127
+ var props = { data: defaultData, type: types_1.ActivityTypes.ENTITY_REMOVED };
128
+ setUp({ props: props });
129
+ react_2.screen.getByTestId('profile-activity');
130
+ });
131
+ it('should render profile activity for ANALYTICS_ATTRIBUTES_CHANGED activity type', function () {
132
+ var props = { data: defaultData, type: types_1.ActivityTypes.ANALYTICS_ATTRIBUTES_CHANGED };
133
+ setUp({ props: props });
134
+ react_2.screen.getByTestId('profile-activity');
135
+ });
136
+ });
137
+ describe('relation activity', function () {
138
+ var defaultData = {
139
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
140
+ user: 'marat.ahmetzyanov',
141
+ timestamp: 1620711408828,
142
+ items: [],
143
+ itemsTotal: 0
144
+ };
145
+ it('should render relation activity for RELATIONSHIP_CHANGED activity type', function () {
146
+ var props = { data: defaultData, type: types_1.ActivityTypes.RELATIONSHIP_CHANGED };
147
+ setUp({ props: props });
148
+ react_2.screen.getByTestId('relation-activity');
149
+ });
150
+ it('should render relation activity for RELATIONSHIP_CREATED activity type', function () {
151
+ var props = { data: defaultData, type: types_1.ActivityTypes.RELATIONSHIP_CREATED };
152
+ setUp({ props: props });
153
+ react_2.screen.getByTestId('relation-activity');
154
+ });
155
+ it('should render relation activity for RELATIONSHIP_REMOVED activity type', function () {
156
+ var props = { data: defaultData, type: types_1.ActivityTypes.RELATIONSHIP_REMOVED };
157
+ setUp({ props: props });
158
+ react_2.screen.getByTestId('relation-activity');
159
+ });
160
+ });
161
+ describe('search activity', function () {
162
+ it('should render search activity for USER_SEARCH activity type', function () {
163
+ var props = {
164
+ data: {
165
+ uri: 'activities/504c-9876-79bc2a96',
166
+ user: 'polina.arsenteva',
167
+ label: 'USER_SEARCH',
168
+ description: '{"activity":{"query":null,"uiState":{"view":{"searchResultsMode":"table","entityTypeTab":null,"previewPanelMode":null},"facets":{},"advanced":[],"searchOptions":{"searchByOv":true,"ovOnly":true},"keyword":null,"map":null,"version":"2.0"}},"version":"2.0"}',
169
+ timestamp: 1626952820539
170
+ },
171
+ type: types_1.ActivityTypes.USER_SEARCH
172
+ };
173
+ setUp({ props: props });
174
+ react_2.screen.getByTestId('search-activity');
175
+ });
176
+ });
177
+ describe('group activity', function () {
178
+ var defaultData = {
179
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
180
+ user: 'marat.ahmetzyanov',
181
+ timestamp: 1620711408828,
182
+ items: [],
183
+ itemsTotal: 0
184
+ };
185
+ it('should render group activity for GROUP_CHANGED activity type', function () {
186
+ var props = { data: defaultData, type: types_1.ActivityTypes.GROUP_CHANGED };
187
+ setUp({ props: props });
188
+ react_2.screen.getByTestId('group-activity');
189
+ });
190
+ it('should render group activity for GROUP_CREATED activity type', function () {
191
+ var props = { data: defaultData, type: types_1.ActivityTypes.GROUP_CREATED };
192
+ setUp({ props: props });
193
+ react_2.screen.getByTestId('group-activity');
194
+ });
195
+ it('should render group activity for GROUP_REMOVED activity type', function () {
196
+ var props = { data: defaultData, type: types_1.ActivityTypes.GROUP_REMOVED };
197
+ setUp({ props: props });
198
+ react_2.screen.getByTestId('group-activity');
199
+ });
200
+ });
201
+ describe('simple activity', function () {
202
+ var defaultData = {
203
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
204
+ user: 'marat.ahmetzyanov',
205
+ timestamp: 1620711408828,
206
+ description: '{}',
207
+ itemsTotal: 0
208
+ };
209
+ it('should render simple activity for USER_LOGIN activity type', function () {
210
+ var props = { data: defaultData, type: types_1.ActivityTypes.USER_LOGIN };
211
+ setUp({ props: props });
212
+ react_2.screen.getByTestId('simple-activity');
213
+ });
214
+ it('should render simple activity for USER_LOGOUT activity type', function () {
215
+ var props = { data: defaultData, type: types_1.ActivityTypes.USER_LOGOUT };
216
+ setUp({ props: props });
217
+ react_2.screen.getByTestId('simple-activity');
218
+ });
219
+ it('should render simple activity for MODEL_UPDATED activity type', function () {
220
+ var props = { data: defaultData, type: types_1.ActivityTypes.MODEL_UPDATED };
221
+ setUp({ props: props });
222
+ react_2.screen.getByTestId('simple-activity');
223
+ });
224
+ it('should render simple activity for PERIODIC_TASK_SCHEDULED activity type', function () {
225
+ var props = { data: defaultData, type: types_1.ActivityTypes.PERIODIC_TASK_SCHEDULED };
226
+ setUp({ props: props });
227
+ react_2.screen.getByTestId('simple-activity');
228
+ });
229
+ it('should render simple activity for USER_PROFILE_VIEW activity type', function () {
230
+ var props = { data: defaultData, type: types_1.ActivityTypes.USER_PROFILE_VIEW };
231
+ setUp({ props: props });
232
+ react_2.screen.getByTestId('simple-activity');
233
+ });
234
+ });
235
+ describe('synchronization issues activity', function () {
236
+ it('should render synchronization issues activity for SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE activity type', function () {
237
+ var props = {
238
+ data: {
239
+ uri: 'activities/0dcf97d0-5006-46d6-b82f-07579922e2f6',
240
+ user: 'sfdc.connector.admin',
241
+ label: 'label',
242
+ timestamp: 1652374313724,
243
+ items: [
244
+ {
245
+ id: '42uxv5X2',
246
+ timestamp: 1652374313724,
247
+ objectUri: 'entities/15T9kNFk',
248
+ objectType: 'configuration/entityTypes/HCP',
249
+ objectLabel: 'Andy Andy'
250
+ }
251
+ ],
252
+ itemsTotal: 1
253
+ },
254
+ type: types_1.ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE
255
+ };
256
+ setUp({ props: props });
257
+ react_2.screen.getByTestId('synchronization-issues-activity');
258
+ });
259
+ });
260
+ describe('not implemented', function () {
261
+ it('should render not implemented text for unexpected types', function () {
262
+ var props = { type: 'UNEXPECTED_ACTIVITY' };
263
+ setUp({ props: props });
264
+ react_2.screen.getByText('UNEXPECTED_ACTIVITY NOT IMPLEMENTED');
265
+ });
266
+ });
267
+ });
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- import { ActivityData, ActivityTypes } from '../../../types';
2
+ import { ActivityTypes } from '../../../types';
3
3
  type Props = {
4
4
  type: ActivityTypes;
5
- data: ActivityData;
6
5
  };
7
6
  export declare const CommentActivity: ({ type }: Props) => React.JSX.Element;
8
7
  export {};
@@ -8,6 +8,6 @@ var react_1 = __importDefault(require("react"));
8
8
  var ActivityTitle_1 = require("../../../ActivityTitle");
9
9
  var CommentActivity = function (_a) {
10
10
  var type = _a.type;
11
- return react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type });
11
+ return react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type, "data-reltio-id": "comment-activity" });
12
12
  };
13
13
  exports.CommentActivity = CommentActivity;
@@ -4,30 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
- var enzyme_1 = require("enzyme");
8
- var CommentActivity_1 = require("./CommentActivity");
7
+ var react_2 = require("@testing-library/react");
9
8
  var types_1 = require("../../../types");
10
- describe('CommentActivity tests', function () {
11
- var data = {
12
- uri: 'activities/6aa6a54a-a41b-49fd-8070-b4900d3e5468',
13
- user: 'denis.tkachev',
14
- label: 'COMMENT_ADDED',
15
- description: '{"commentId":"00005LQ","createdBy":"denis.tkachev","createdTime":1623229206252,"modifiedTime":1623229206252,"deleted":false,"visibility":"public","status":"open","objectId":"entities/1BKYwm2t","objectType":"entity","permanentLink":"https://tst-01.reltio.com/ui/uitest3/#p~com.reltio.plugins.entity.HCPPerspective_e~entities%2F1BKYwm2t_ps~profile_cmt~00005LQ","relatedObjectUris":["entities/1BKYwm2t"]}',
16
- timestamp: 1623229209927,
17
- items: [
18
- {
19
- id: '5pUxeNLr',
20
- user: 'denis.tkachev',
21
- method: 'POST',
22
- url: '/reltio/api/uitest3/activities',
23
- clientType: 'UNKNOWN',
24
- timestamp: 1623229209927
25
- }
26
- ],
27
- itemsTotal: 1
28
- };
9
+ var CommentActivity_1 = require("./CommentActivity");
10
+ describe('Comment activity tests', function () {
29
11
  it('should render correctly', function () {
30
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(CommentActivity_1.CommentActivity, { type: types_1.ActivityTypes.COMMENT_ADDED, data: data }));
31
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(types_1.ActivityTypes.COMMENT_ADDED);
12
+ (0, react_2.render)(react_1.default.createElement(CommentActivity_1.CommentActivity, { type: types_1.ActivityTypes.COMMENT_ADDED }));
13
+ react_2.screen.getByText('Comment added');
32
14
  });
33
15
  });
@@ -5,16 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.GroupActivity = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
- var ActivityTitle_1 = require("../../../ActivityTitle");
9
8
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
10
9
  var MdmModuleContext_1 = require("../../../../../contexts/MdmModuleContext");
10
+ var ActivityTitle_1 = require("../../../ActivityTitle");
11
11
  var ObjectLabel_1 = require("../ObjectLabel");
12
12
  var GroupActivity = function (_a) {
13
13
  var _b, _c;
14
14
  var data = _a.data, type = _a.type;
15
15
  var metadata = (0, MdmModuleContext_1.useMdmMetadata)();
16
16
  var label = (0, mdm_sdk_1.getGroupLabelByTypeUri)(metadata, (_c = (_b = data.items) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.objectType);
17
- return (react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type },
17
+ return (react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type, "data-reltio-id": "group-activity" },
18
18
  react_1.default.createElement(ObjectLabel_1.ObjectLabel, { label: (0, mdm_sdk_1.getLabel)(label) })));
19
19
  };
20
20
  exports.GroupActivity = GroupActivity;
@@ -20,12 +20,7 @@ var MdmModuleContext_1 = require("../../../../../contexts/MdmModuleContext");
20
20
  var types_1 = require("../../../types");
21
21
  var GroupActivity_1 = require("./GroupActivity");
22
22
  var metadata = {
23
- groupTypes: [
24
- {
25
- uri: 'configuration/groupTypes/Test',
26
- label: 'Test group'
27
- }
28
- ]
23
+ groupTypes: [{ uri: 'configuration/groupTypes/Test', label: 'Test group' }]
29
24
  };
30
25
  var setUp = function (props) {
31
26
  var Providers = function (_a) {
@@ -34,28 +29,13 @@ var setUp = function (props) {
34
29
  };
35
30
  return (0, react_2.render)(react_1.default.createElement(GroupActivity_1.GroupActivity, __assign({}, props)), { wrapper: Providers });
36
31
  };
37
- describe('GroupActivity tests', function () {
32
+ describe('Group activity tests', function () {
38
33
  it('should render correctly', function () {
39
34
  var data = {
40
35
  uri: 'activities/d6e61e96-6310-434a-99f9-e694e5f35475',
41
36
  user: 'alexander.kirsanov',
42
37
  timestamp: 1621874356842,
43
- items: [
44
- {
45
- id: '7a5l7pc1',
46
- user: 'alexander.kirsanov',
47
- method: 'POST',
48
- url: '/reltio/api/alenat/groups/7a5l7h5V/members',
49
- clientType: 'Reltio UI',
50
- timestamp: 1621874356842,
51
- objectUri: 'groups/7a5l7h5V',
52
- objectType: 'configuration/groupTypes/Test',
53
- data: {
54
- type: 'GROUP_CHANGED'
55
- },
56
- eventId: '1621874356842_1AeizH7'
57
- }
58
- ],
38
+ items: [{ id: 'sh2Ks8AN', timestamp: 1621874356842, objectType: 'configuration/groupTypes/Test' }],
59
39
  itemsTotal: 1
60
40
  };
61
41
  var props = { type: types_1.ActivityTypes.GROUP_CHANGED, data: data };
@@ -13,8 +13,8 @@ var MergeActivity = function (_a) {
13
13
  var type = _a.type, data = _a.data;
14
14
  var itemsTotal = data.itemsTotal, items = data.items, uri = data.uri;
15
15
  var isMinimized = itemsTotal === 1 && !(items[0].data.potentialMatches || items[0].data.newUri);
16
- return (react_1.default.createElement("div", null,
17
- react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type }, isMinimized && react_1.default.createElement(EntityObject_1.EntityObject, { item: items[0] })),
16
+ return (react_1.default.createElement("div", { "data-reltio-id": "merge-activity" },
17
+ react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type, "data-reltio-id": "merge-activity-title" }, isMinimized && react_1.default.createElement(EntityObject_1.EntityObject, { item: items[0] })),
18
18
  !isMinimized && (react_1.default.createElement(CollapsibleActivityRecords_1.CollapsibleActivityRecords, { activityUri: uri, items: items, RecordComponent: PotentialMatchRecord_1.PotentialMatchRecord }))));
19
19
  };
20
20
  exports.MergeActivity = MergeActivity;
@@ -1,113 +1,92 @@
1
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
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
6
17
  var react_1 = __importDefault(require("react"));
7
- var enzyme_1 = require("enzyme");
8
- var MergeActivity_1 = require("./MergeActivity");
18
+ var react_2 = require("@testing-library/react");
19
+ var MdmModuleContext_1 = require("../../../../../contexts/MdmModuleContext");
9
20
  var types_1 = require("../../../types");
10
- var CollapsibleActivityRecords_1 = require("../../../CollapsibleActivityRecords");
11
- describe('MergeActivity tests', function () {
12
- var data = {
13
- uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
14
- user: 'marat.ahmetzyanov',
15
- timestamp: 1620711408828,
16
- items: [
17
- {
18
- id: '5C94p4Yp',
19
- user: 'marat.ahmetzyanov',
20
- method: 'POST',
21
- url: '/reltio/api/uitest2/entities',
22
- clientType: 'Reltio UI',
23
- timestamp: 1620711408828,
24
- objectUri: 'entities/1PN94HrW',
25
- objectType: 'configuration/entityTypes/Product',
26
- objectLabel: 'ONE',
27
- data: {
28
- mergeReason: 'Merge on the fly',
29
- mergeType: 'ON_THE_FLY',
30
- type: 'ENTITIES_MERGED_ON_THE_FLY',
31
- crosswalks: 'configuration/sources/BRM;null;brm202105111036'
32
- },
33
- eventId: '1620711408828_0Cc3sWZ'
34
- }
35
- ],
36
- itemsTotal: 1
37
- };
38
- var dataPotentialMatch = {
39
- uri: 'activities/8dcbdbce-80ac-4a2c-95f3-e75383fbd10e',
40
- user: 'denis.tkachev',
41
- label: '',
42
- description: '',
43
- timestamp: 1623153008977,
44
- items: [
45
- {
46
- id: '3Ldt0URn',
47
- user: 'denis.tkachev',
48
- method: 'POST',
49
- url: '/reltio/api/uitest3/entities/_same',
50
- clientType: 'Reltio UI',
51
- timestamp: 1623153008977,
52
- objectUri: 'entities/1BTrULsq',
53
- objectType: 'configuration/entityTypes/HCP',
54
- objectLabel: 'Long,',
55
- data: {
56
- mergeReason: 'Merge by hand',
57
- mergeType: 'MANUAL',
58
- potentialMatches: 'entities/17U7U95d',
59
- 'entities/17U7U95d': 'Potential match test,',
60
- type: 'ENTITIES_MERGED_MANUALLY'
61
- },
62
- eventId: '1623153008977_03D3dbM'
63
- }
64
- ],
65
- itemsTotal: 1
66
- };
67
- var dataNewUri = {
68
- uri: 'activities/9449a5d7-1c72-4256-b26a-8b0e95c14899',
69
- user: 'marat.ahmetzyanov',
70
- label: '',
71
- description: '',
72
- timestamp: 1623154966758,
73
- items: [
74
- {
75
- id: '30tEIJXx',
76
- user: 'marat.ahmetzyanov',
77
- method: 'POST',
78
- url: '/reltio/api/uitest3/entities/1futW9kc/_unmerge',
79
- clientType: 'Reltio UI',
80
- timestamp: 1623154966758,
81
- objectUri: 'entities/1futW9kc',
82
- objectType: 'configuration/entityTypes/HCP',
83
- objectLabel: 'HCP DT 1,',
84
- data: {
85
- 'entities/2eIQy30G': 'HCP DT 2,',
86
- newUri: 'entities/2eIQy30G',
87
- type: 'ENTITIES_SPLITTED'
88
- },
89
- eventId: '1623154966758_02lA3ja'
90
- }
91
- ],
92
- itemsTotal: 1
21
+ var CollapsibleItemsContext_1 = require("../../../contexts/CollapsibleItemsContext");
22
+ var MergeActivity_1 = require("./MergeActivity");
23
+ var defaultItem = {
24
+ id: '5C94p4Yp',
25
+ objectUri: 'entities/1PN94HrW',
26
+ objectLabel: 'object label',
27
+ timestamp: 1620711408828,
28
+ data: { type: types_1.ActivityTypes.ENTITIES_MERGED_ON_THE_FLY }
29
+ };
30
+ var defaultData = {
31
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
32
+ user: 'marat.ahmetzyanov',
33
+ timestamp: 1620711408828,
34
+ items: [defaultItem],
35
+ itemsTotal: 1
36
+ };
37
+ var defaultProps = {
38
+ data: defaultData,
39
+ type: types_1.ActivityTypes.ENTITIES_MERGED_ON_THE_FLY
40
+ };
41
+ var defaultMdmValues = {
42
+ uiPath: 'https://reltio.com/nui'
43
+ };
44
+ var setUp = function (_a) {
45
+ var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
46
+ var Providers = function (_a) {
47
+ var children = _a.children;
48
+ return (react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues },
49
+ react_1.default.createElement(CollapsibleItemsContext_1.CollapsibleItemsProvider, null, children)));
93
50
  };
94
- it('should render correctly minimized', function () {
95
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(MergeActivity_1.MergeActivity, { type: types_1.ActivityTypes.ENTITIES_MERGED_ON_THE_FLY, data: data }));
96
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(types_1.ActivityTypes.ENTITIES_MERGED_ON_THE_FLY);
97
- expect(wrapper.find('EntityObject').length).toBe(1);
51
+ return (0, react_2.render)(react_1.default.createElement(MergeActivity_1.MergeActivity, __assign({}, props)), { wrapper: Providers });
52
+ };
53
+ describe('Merge activity tests', function () {
54
+ it('should render minimized if itemsTotal is 1 and there are not potentialMatches or newUri fields', function () {
55
+ setUp();
56
+ var title = react_2.screen.getByTestId('merge-activity-title');
57
+ (0, react_2.within)(title).getByText('object label');
58
+ (0, react_2.within)(title).getByText('Profile merged on the fly');
59
+ });
60
+ it('should render maximized if itemsTotal is 1 but there is potentialMatches field', function () {
61
+ var props = __assign(__assign({}, defaultProps), { data: __assign(__assign({}, defaultData), { items: [
62
+ __assign(__assign({}, defaultItem), { data: {
63
+ type: types_1.ActivityTypes.POTENTIAL_MATCHES_FOUND,
64
+ potentialMatches: 'entities/sOoSQYm',
65
+ 'entities/sOoSQYm': 'entity label 1'
66
+ } })
67
+ ] }) });
68
+ setUp({ props: props });
69
+ var title = react_2.screen.getByTestId('merge-activity-title');
70
+ (0, react_2.within)(title).getByText('Profile merged on the fly');
71
+ expect((0, react_2.within)(title).queryByText('object label')).not.toBeInTheDocument();
72
+ var record = react_2.screen.getByTestId('reltio-activity-log-record');
73
+ (0, react_2.within)(record).getByText('object label');
74
+ expect(react_2.screen.getByTestId('potential-matches-field')).toHaveTextContent('Matches found:entity label 1');
98
75
  });
99
- it('should render correctly maximized', function () {
100
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(MergeActivity_1.MergeActivity, { type: types_1.ActivityTypes.ENTITIES_MERGED_MANUALLY, data: dataPotentialMatch }));
101
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(types_1.ActivityTypes.ENTITIES_MERGED_MANUALLY);
102
- expect(wrapper.find('EntityObject').length).toBe(0);
103
- var collapsedActivity = wrapper.find(CollapsibleActivityRecords_1.CollapsibleActivityRecords);
104
- expect(collapsedActivity.prop('activityUri')).toBe(dataPotentialMatch.uri);
105
- expect(collapsedActivity.prop('items')).toEqual(dataPotentialMatch.items);
106
- wrapper.setProps({ data: dataNewUri, type: types_1.ActivityTypes.ENTITIES_SPLITTED });
107
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(types_1.ActivityTypes.ENTITIES_SPLITTED);
108
- expect(wrapper.find('EntityObject').length).toBe(0);
109
- var nextCollapsedActivity = wrapper.find(CollapsibleActivityRecords_1.CollapsibleActivityRecords);
110
- expect(nextCollapsedActivity.prop('activityUri')).toBe(dataNewUri.uri);
111
- expect(nextCollapsedActivity.prop('items')).toEqual(dataNewUri.items);
76
+ it('should render maximized if itemsTotal is 1 but there is newUri field', function () {
77
+ var props = __assign(__assign({}, defaultProps), { data: __assign(__assign({}, defaultData), { items: [
78
+ __assign(__assign({}, defaultItem), { data: {
79
+ type: types_1.ActivityTypes.ENTITIES_SPLITTED,
80
+ newUri: 'entities/sOoSQYm',
81
+ 'entities/sOoSQYm': 'entity label 1'
82
+ } })
83
+ ] }) });
84
+ setUp({ props: props });
85
+ var title = react_2.screen.getByTestId('merge-activity-title');
86
+ (0, react_2.within)(title).getByText('Profile merged on the fly');
87
+ expect((0, react_2.within)(title).queryByText('object label')).not.toBeInTheDocument();
88
+ var record = react_2.screen.getByTestId('reltio-activity-log-record');
89
+ (0, react_2.within)(record).getByText('object label');
90
+ expect(react_2.screen.getByTestId('potential-matches-field')).toHaveTextContent('Un-merged with:entity label 1');
112
91
  });
113
92
  });
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- type Props = {
2
+ type Props = Omit<React.ComponentPropsWithoutRef<'span'>, 'className'> & {
3
3
  label: string;
4
4
  };
5
- export declare const ObjectLabel: ({ label }: Props) => React.JSX.Element;
5
+ export declare const ObjectLabel: ({ label, ...restProps }: Props) => React.JSX.Element;
6
6
  export {};
@@ -1,4 +1,26 @@
1
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 __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
2
24
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
25
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
26
  };
@@ -7,8 +29,8 @@ exports.ObjectLabel = void 0;
7
29
  var react_1 = __importDefault(require("react"));
8
30
  var styles_1 = require("./styles");
9
31
  var ObjectLabel = function (_a) {
10
- var label = _a.label;
32
+ var label = _a.label, restProps = __rest(_a, ["label"]);
11
33
  var styles = (0, styles_1.useStyles)();
12
- return react_1.default.createElement("span", { className: styles.objectLabel }, label);
34
+ return (react_1.default.createElement("span", __assign({ className: styles.objectLabel }, restProps), label));
13
35
  };
14
36
  exports.ObjectLabel = ObjectLabel;