@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
@@ -9,198 +9,175 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
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
+ };
12
48
  import React from 'react';
13
- import { mount } from 'enzyme';
14
- import { SearchActivity } from './SearchActivity';
15
- import { ActivityTypes } from '../../../types';
16
- import { useReadableSearchState } from '../../../../../hooks/useReadableSearchState';
49
+ import { render, screen } from '@testing-library/react';
50
+ import userEvent from '@testing-library/user-event';
17
51
  import { MdmModuleProvider } from '../../../../../contexts/MdmModuleContext';
18
- jest.mock('../../../../../hooks/useReadableSearchState', function () { return (__assign(__assign({}, jest.requireActual('../../../../../hooks/useReadableSearchState')), { useReadableSearchState: jest.fn() })); });
19
- var openSearch = jest.fn();
20
- var setUp = function (props) {
21
- return mount(React.createElement(MdmModuleProvider, { actions: { openSearch: openSearch } },
22
- React.createElement(SearchActivity, __assign({}, props))));
52
+ import { ActivityTypes } from '../../../types';
53
+ import { SearchActivity } from './SearchActivity';
54
+ var defaultMdmValues = {
55
+ metadata: {
56
+ entityTypes: [
57
+ {
58
+ uri: 'configuration/entityTypes/HCP',
59
+ label: 'HCP',
60
+ attributes: [
61
+ {
62
+ uri: 'configuration/entityTypes/HCP/attributes/FirstName',
63
+ name: 'FirstName',
64
+ type: 'String',
65
+ label: 'First Name'
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ dataTenants: [],
72
+ attributesPresentation: {},
73
+ lookups: {}
74
+ };
75
+ var mdmActions = {
76
+ openSearch: jest.fn(),
77
+ lookupsListResolved: jest.fn()
23
78
  };
24
- describe('SearchActivity tests', function () {
79
+ var setUp = function (_a) {
80
+ var props = _a.props, _b = _a.mdmValues, mdmValues = _b === void 0 ? defaultMdmValues : _b;
81
+ var user = userEvent.setup();
82
+ var Providers = function (_a) {
83
+ var children = _a.children;
84
+ return (React.createElement(MdmModuleProvider, { values: mdmValues, actions: mdmActions }, children));
85
+ };
86
+ return __assign({ user: user }, render(React.createElement(SearchActivity, __assign({}, props)), { wrapper: Providers }));
87
+ };
88
+ describe('Search activity tests', function () {
25
89
  afterEach(function () {
26
90
  jest.clearAllMocks();
27
91
  });
28
- it('should render readable new search state and open it on click correctly', function () {
29
- useReadableSearchState.mockReturnValueOnce({
30
- readableQueryString: 'readable search state',
31
- readableQuery: []
32
- });
33
- var data = {
34
- uri: 'activities/504c-9876-79bc2a96',
35
- user: 'polina.arsenteva',
36
- label: 'USER_SEARCH',
37
- description: '{"activity":{"query":"filter=equals(type%2C\'configuration%2FentityTypes%2FHCP\')&options=searchByOv%2CovOnly","uiState":{"view":{"searchResultsMode":"table","entityTypeTab":"configuration/entityTypes/HCP", "previewPanelMode":null},"facets":{"type":{"fieldName":"type","values":["configuration/entityTypes/HCP"]}},"advanced":[],"searchOptions":{"searchByOv":true,"ovOnly":true},"keyword":null,"map":null,"version":"2.0"}},"version":"2.0"}',
38
- timestamp: 1626952820539,
39
- items: [
40
- {
41
- id: '3ZOMTE6R',
42
- user: 'polina.arsenteva',
43
- method: 'POST',
44
- url: '/reltio/api/sokol/activities',
45
- clientType: 'Reltio UI',
46
- timestamp: 1626952820539
47
- }
48
- ],
49
- itemsTotal: 1
50
- };
51
- var wrapper = setUp({ data: data, type: ActivityTypes.USER_SEARCH });
52
- expect(wrapper.find('.link').text()).toBe('readable search state');
53
- var searchState = {
54
- view: {
55
- searchResultsMode: 'table',
56
- entityTypeTab: 'configuration/entityTypes/HCP',
57
- previewPanelMode: null
58
- },
59
- facets: {
60
- type: {
61
- fieldName: 'type',
62
- values: ['configuration/entityTypes/HCP']
63
- }
64
- },
65
- advanced: [],
66
- searchOptions: {
67
- searchByOv: true,
68
- ovOnly: true
69
- },
70
- keyword: null,
71
- map: null,
72
- version: '2.0'
73
- };
74
- expect(useReadableSearchState).toHaveBeenCalledWith(searchState);
75
- wrapper.find('.link').simulate('click');
76
- expect(openSearch).toHaveBeenCalledWith(searchState);
77
- });
78
- it('should render readable old search state and open it on click correctly', function () {
79
- useReadableSearchState.mockReturnValueOnce({
80
- readableQueryString: 'readable search state',
81
- readableQuery: []
92
+ it('should render readable new search state and open it on click correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
93
+ var props, user;
94
+ return __generator(this, function (_a) {
95
+ switch (_a.label) {
96
+ case 0:
97
+ props = {
98
+ data: {
99
+ uri: 'activities/504c-9876-79bc2a96',
100
+ user: 'polina.arsenteva',
101
+ label: 'USER_SEARCH',
102
+ description: '{"activity":{"query":"filter=equals(type%2C\'configuration%2FentityTypes%2FHCP\')&options=searchByOv%2CovOnly","uiState":{"view":{"searchResultsMode":"table","entityTypeTab":"configuration/entityTypes/HCP", "previewPanelMode":null},"facets":{"type":{"fieldName":"type","values":["configuration/entityTypes/HCP"]}, "attributes.FirstName":{"fieldName":"attributes.FirstName","values":["Alex"],"entityTypeUri":"configuration/entityTypes/HCP"}},"advanced":[],"searchOptions":{"searchByOv":true,"ovOnly":true},"keyword":null,"map":null,"version":"2.0"}},"version":"2.0"}',
103
+ timestamp: 1626952820539
104
+ },
105
+ type: ActivityTypes.USER_SEARCH
106
+ };
107
+ user = setUp({ props: props }).user;
108
+ return [4 /*yield*/, user.click(screen.getByText('HCP: First Name = "Alex"'))];
109
+ case 1:
110
+ _a.sent();
111
+ expect(mdmActions.openSearch).toHaveBeenCalledWith({
112
+ advanced: [],
113
+ facets: {
114
+ 'attributes.FirstName': {
115
+ entityTypeUri: 'configuration/entityTypes/HCP',
116
+ fieldName: 'attributes.FirstName',
117
+ values: ['Alex']
118
+ },
119
+ type: { fieldName: 'type', values: ['configuration/entityTypes/HCP'] }
120
+ },
121
+ keyword: null,
122
+ map: null,
123
+ searchOptions: { ovOnly: true, searchByOv: true },
124
+ version: '2.0',
125
+ view: { entityTypeTab: 'configuration/entityTypes/HCP', previewPanelMode: null, searchResultsMode: 'table' }
126
+ });
127
+ return [2 /*return*/];
128
+ }
82
129
  });
83
- var data = {
84
- uri: 'activities/1763-bf44-daeb9d6e',
85
- user: 'polina.arsenteva',
86
- label: 'USER_SEARCH',
87
- description: '{"keyword":null,"isRawFilter":false,"facets":[{"facetClass":"com.reltio.plugins.search.dev.TenantSearchFacet","title":"Tenants","isCollapsed":false,"isClosable":false,"dataTenant":null,"additional":false,"hideForDataTenant":false,"mainTenant":{"label":"RLT-L-KN01:knesterov:1598853767343","id":"uitest2","name":"uitest2"},"currentTenant":"uitest2","fieldName":"tenants"},{"facetClass":"com.reltio.plugins.search.dev.EntityTypeSearchFacet","title":"Entity Types","isCollapsed":false,"isClosable":false,"dataTenant":null,"additional":false,"hideForDataTenant":false,"values":[],"fieldName":"type","includeFilter":null,"typeAhead":false,"pageSize":100,"showAllEntityTypes":false},{"facetClass":"com.reltio.plugins.search.dev.RoleSearchFacet","title":"Roles","isCollapsed":false,"isClosable":false,"dataTenant":null,"additional":false,"hideForDataTenant":false,"values":[],"fieldName":"roles","includeFilter":[],"typeAhead":true,"pageSize":7},{"facetClass":"com.reltio.plugins.search.dev.SearchFacetWithCheckboxes","title":"Tags","isCollapsed":false,"isClosable":false,"dataTenant":null,"additional":false,"hideForDataTenant":false,"values":["some text"],"fieldName":"tags","includeFilter":null,"typeAhead":true,"pageSize":7}],"forTenant":"uitest2","model":{"tags":{"labels":["some text"],"filter":null}},"view":{"mode":"NoPreview","tabs":[]}}',
88
- timestamp: 1626956152002,
89
- items: [
90
- {
91
- id: '306gpUsj',
92
- user: 'polina.arsenteva',
93
- method: 'POST',
94
- url: '/reltio/api/uitest2/activities',
95
- clientType: 'Reltio UI',
96
- timestamp: 1626956152002
97
- }
98
- ],
99
- itemsTotal: 1
100
- };
101
- var wrapper = setUp({ data: data, type: ActivityTypes.USER_SEARCH });
102
- expect(wrapper.find('.link').text()).toBe('readable search state');
103
- var searchState = {
104
- keyword: null,
105
- isRawFilter: false,
106
- facets: [
107
- {
108
- facetClass: 'com.reltio.plugins.search.dev.TenantSearchFacet',
109
- title: 'Tenants',
110
- isCollapsed: false,
111
- isClosable: false,
112
- dataTenant: null,
113
- additional: false,
114
- hideForDataTenant: false,
115
- mainTenant: {
116
- label: 'RLT-L-KN01:knesterov:1598853767343',
117
- id: 'uitest2',
118
- name: 'uitest2'
119
- },
120
- currentTenant: 'uitest2',
121
- fieldName: 'tenants'
122
- },
123
- {
124
- facetClass: 'com.reltio.plugins.search.dev.EntityTypeSearchFacet',
125
- title: 'Entity Types',
126
- isCollapsed: false,
127
- isClosable: false,
128
- dataTenant: null,
129
- additional: false,
130
- hideForDataTenant: false,
131
- values: [],
132
- fieldName: 'type',
133
- includeFilter: null,
134
- typeAhead: false,
135
- pageSize: 100,
136
- showAllEntityTypes: false
137
- },
138
- {
139
- facetClass: 'com.reltio.plugins.search.dev.RoleSearchFacet',
140
- title: 'Roles',
141
- isCollapsed: false,
142
- isClosable: false,
143
- dataTenant: null,
144
- additional: false,
145
- hideForDataTenant: false,
146
- values: [],
147
- fieldName: 'roles',
148
- includeFilter: [],
149
- typeAhead: true,
150
- pageSize: 7
151
- },
152
- {
153
- facetClass: 'com.reltio.plugins.search.dev.SearchFacetWithCheckboxes',
154
- title: 'Tags',
155
- isCollapsed: false,
156
- isClosable: false,
157
- dataTenant: null,
158
- additional: false,
159
- hideForDataTenant: false,
160
- values: ['some text'],
161
- fieldName: 'tags',
162
- includeFilter: null,
163
- typeAhead: true,
164
- pageSize: 7
165
- }
166
- ],
167
- forTenant: 'uitest2',
168
- model: {
169
- tags: {
170
- labels: ['some text'],
171
- filter: null
172
- }
173
- },
174
- view: {
175
- mode: 'NoPreview',
176
- tabs: []
130
+ }); });
131
+ it('should render readable old search state and open it on click correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
132
+ var props, user;
133
+ return __generator(this, function (_a) {
134
+ switch (_a.label) {
135
+ case 0:
136
+ props = {
137
+ data: {
138
+ uri: 'activities/1763-bf44-daeb9d6e',
139
+ user: 'polina.arsenteva',
140
+ label: 'USER_SEARCH',
141
+ description: '{"keyword":null,"isRawFilter":false,"facets":[{"facetClass":"com.reltio.plugins.search.dev.SearchFacetWithCheckboxes","title":"Tags","values":["tag"],"fieldName":"tags"}],"forTenant":"alenat","model":{"tags":{"labels":["tag"],"filter":null}},"view":{"mode":"NoPreview","tabs":[]}}',
142
+ timestamp: 1626956152002
143
+ },
144
+ type: ActivityTypes.USER_SEARCH
145
+ };
146
+ user = setUp({ props: props }).user;
147
+ return [4 /*yield*/, user.click(screen.getByText('Tags = "tag"'))];
148
+ case 1:
149
+ _a.sent();
150
+ expect(mdmActions.openSearch).toHaveBeenCalledWith({
151
+ facets: [
152
+ {
153
+ facetClass: 'com.reltio.plugins.search.dev.SearchFacetWithCheckboxes',
154
+ fieldName: 'tags',
155
+ title: 'Tags',
156
+ values: ['tag']
157
+ }
158
+ ],
159
+ forTenant: 'alenat',
160
+ isRawFilter: false,
161
+ keyword: null,
162
+ model: { tags: { filter: null, labels: ['tag'] } },
163
+ view: { mode: 'NoPreview', tabs: [] }
164
+ });
165
+ return [2 /*return*/];
177
166
  }
178
- };
179
- expect(useReadableSearchState).toHaveBeenCalledWith(searchState);
180
- wrapper.find('.link').simulate('click');
181
- expect(openSearch).toHaveBeenCalledWith(searchState);
182
- });
167
+ });
168
+ }); });
183
169
  it('should render all profiles if readable search state is empty', function () {
184
- useReadableSearchState.mockReturnValueOnce({ readableQueryString: '', readableQuery: [] });
185
- var data = {
186
- uri: 'activities/504c-9876-79bc2a96',
187
- user: 'polina.arsenteva',
188
- label: 'USER_SEARCH',
189
- description: '{"activity":{"query":"filter=equals(type%2C\'configuration%2FentityTypes%2FHCP\')&options=searchByOv%2CovOnly","uiState":{"view":{"searchResultsMode":"table","entityTypeTab":"configuration/entityTypes/HCP", "previewPanelMode":null},"facets":{"type":{"fieldName":"type","values":["configuration/entityTypes/HCP"]}},"advanced":[],"searchOptions":{"searchByOv":true,"ovOnly":true},"keyword":null,"map":null,"version":"2.0"}},"version":"2.0"}',
190
- timestamp: 1626952820539,
191
- items: [
192
- {
193
- id: '3ZOMTE6R',
194
- user: 'polina.arsenteva',
195
- method: 'POST',
196
- url: '/reltio/api/sokol/activities',
197
- clientType: 'Reltio UI',
198
- timestamp: 1626952820539
199
- }
200
- ],
201
- itemsTotal: 1
170
+ var props = {
171
+ data: {
172
+ uri: 'activities/504c-9876-79bc2a96',
173
+ user: 'polina.arsenteva',
174
+ label: 'USER_SEARCH',
175
+ 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"}',
176
+ timestamp: 1626952820539
177
+ },
178
+ type: ActivityTypes.USER_SEARCH
202
179
  };
203
- var wrapper = setUp({ data: data, type: ActivityTypes.USER_SEARCH });
204
- expect(wrapper.find('.link').text()).toBe('all profiles');
180
+ setUp({ props: props });
181
+ screen.getByText('all profiles');
205
182
  });
206
183
  });
@@ -10,7 +10,7 @@ export var SimpleActivity = function (_a) {
10
10
  var styles = useStyles();
11
11
  var description = parseJSON(data.description);
12
12
  var itemsTotal = data.itemsTotal;
13
- return (React.createElement(ActivityTitle, { type: type },
13
+ return (React.createElement(ActivityTitle, { type: type, "data-reltio-id": "simple-activity" },
14
14
  description && (React.createElement(EntityUriLink, { className: styles.link, value: description.uri }, getLabel(description.label))),
15
- itemsTotal > 1 && React.createElement(ObjectLabel, { label: i18n.text('(${itemsTotal} records)', { itemsTotal: itemsTotal }) })));
15
+ itemsTotal > 1 && (React.createElement(ObjectLabel, { "data-reltio-id": "simple-activity-items-total", label: i18n.text('(${itemsTotal} records)', { itemsTotal: itemsTotal }) }))));
16
16
  };
@@ -10,36 +10,52 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React from 'react';
13
- import { shallow } from 'enzyme';
14
- import { SimpleActivity } from './SimpleActivity';
13
+ import { render, screen } from '@testing-library/react';
14
+ import { MdmModuleProvider } from '../../../../../contexts/MdmModuleContext';
15
15
  import { ActivityTypes } from '../../../types';
16
- describe('SimpleActivity tests', function () {
17
- var data = {
18
- uri: 'activities/de19-08e1-b220b95c',
19
- user: 'polina.arsenteva',
20
- label: 'USER_LOGIN',
21
- description: 'User polina.arsenteva was logged in',
22
- timestamp: 1622625987531,
23
- items: [
24
- {
25
- id: '3Gme7xNf',
26
- user: 'polina.arsenteva',
27
- method: 'POST',
28
- url: '/reltio/api/alenat/activities',
29
- clientType: 'Reltio UI',
30
- timestamp: 1622625987531
31
- }
32
- ],
33
- itemsTotal: 1
16
+ import { SimpleActivity } from './SimpleActivity';
17
+ var defaultMdmValues = {
18
+ uiPath: 'https://reltio.com/nui'
19
+ };
20
+ var setUp = function (_a) {
21
+ var props = _a.props, _b = _a.mdmValues, mdmValues = _b === void 0 ? defaultMdmValues : _b;
22
+ var Providers = function (_a) {
23
+ var children = _a.children;
24
+ return (React.createElement(MdmModuleProvider, { values: mdmValues }, children));
34
25
  };
35
- var description = '{"uri":"entities/k5nO0xA","label":"test"}';
26
+ return render(React.createElement(SimpleActivity, __assign({}, props)), { wrapper: Providers });
27
+ };
28
+ describe('Simple activity tests', function () {
36
29
  it('should render correctly', function () {
37
- var wrapper = shallow(React.createElement(SimpleActivity, { type: ActivityTypes.USER_LOGIN, data: data }));
38
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(ActivityTypes.USER_LOGIN);
39
- expect(wrapper.find('EntityUriLink').length).toBe(0);
40
- wrapper.setProps({ data: __assign(__assign({}, data), { description: description }) });
41
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(ActivityTypes.USER_LOGIN);
42
- expect(wrapper.find('EntityUriLink').prop('value')).toBe('entities/k5nO0xA');
43
- expect(wrapper.find('EntityUriLink').text()).toBe('test');
30
+ var props = {
31
+ type: ActivityTypes.USER_LOGIN,
32
+ data: {
33
+ uri: 'activities/de19-08e1-b220b95c',
34
+ user: 'polina.arsenteva',
35
+ label: 'User login',
36
+ timestamp: 1622625987531,
37
+ description: '{"uri":"entities/k5nO0xA","label":"test"}',
38
+ itemsTotal: 2
39
+ }
40
+ };
41
+ setUp({ props: props });
42
+ screen.getByText('Logged in');
43
+ screen.getByText('(2 records)');
44
+ expect(screen.getByText('test')).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/k5nO0xA');
45
+ });
46
+ it('should render correctly if description is not passed and itemsTotal is 1 or less', function () {
47
+ var props = {
48
+ type: ActivityTypes.USER_LOGIN,
49
+ data: {
50
+ uri: 'activities/de19-08e1-b220b95c',
51
+ user: 'polina.arsenteva',
52
+ label: 'User login',
53
+ timestamp: 1622625987531,
54
+ itemsTotal: 1
55
+ }
56
+ };
57
+ setUp({ props: props });
58
+ expect(screen.queryByRole('link')).not.toBeInTheDocument();
59
+ expect(screen.queryByTestId('simple-activity-items-total')).not.toBeInTheDocument();
44
60
  });
45
61
  });
@@ -11,9 +11,8 @@ export var SynchronizationIssuesActivity = function (_a) {
11
11
  var description = parseJSON(data.description);
12
12
  var itemsTotal = data.itemsTotal;
13
13
  var objectUri = data.items[0].objectUri;
14
- return (React.createElement(ActivityTitle, { type: type },
15
- React.createElement(React.Fragment, null,
16
- isRelationUri(objectUri) ? (React.createElement("span", { className: styles.relationUri }, objectUri)) : (React.createElement(EntityObject, { item: data.items[0] })),
17
- description && React.createElement(ObjectLabel, { label: description.label })),
18
- itemsTotal > 1 && React.createElement(ObjectLabel, { label: i18n.text('(${itemsTotal} records)', { itemsTotal: itemsTotal }) })));
14
+ return (React.createElement(ActivityTitle, { type: type, "data-reltio-id": "synchronization-issues-activity" },
15
+ isRelationUri(objectUri) ? (React.createElement("span", { className: styles.relationUri }, objectUri)) : (React.createElement(EntityObject, { item: data.items[0] })),
16
+ description && (React.createElement(ObjectLabel, { "data-reltio-id": "synchronization-issues-activity-description", label: description.label })),
17
+ itemsTotal > 1 && (React.createElement(ObjectLabel, { "data-reltio-id": "synchronization-issues-activity-items-total", label: i18n.text('(${itemsTotal} records)', { itemsTotal: itemsTotal }) }))));
19
18
  };
@@ -10,56 +10,63 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React from 'react';
13
- import { shallow } from 'enzyme';
14
- import { SynchronizationIssuesActivity } from './SynchronizationIssuesActivity';
13
+ import { render, screen } from '@testing-library/react';
14
+ import { MdmModuleProvider } from '../../../../../contexts/MdmModuleContext';
15
15
  import { ActivityTypes } from '../../../types';
16
- describe('SynchronizationIssuesActivity tests', function () {
17
- var data = {
18
- uri: 'activities/0dcf97d0-5006-46d6-b82f-07579922e2f6',
19
- user: 'sfdc.connector.admin',
20
- label: 'SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE',
21
- timestamp: 1652374313724,
22
- items: [
23
- {
24
- id: '42uxv5X2',
25
- user: 'sfdc.connector.admin',
26
- method: 'POST',
27
- url: '/reltio/api/HGFYOZboMbwGyFP/activities',
28
- clientType: 'SFDC_CONNECTOR',
29
- timestamp: 1652374313724,
30
- objectUri: 'entities/15T9kNFk',
31
- objectType: 'configuration/entityTypes/HCP1',
32
- objectLabel: 'Andy Andy'
33
- }
34
- ],
35
- itemsTotal: 1
16
+ import { SynchronizationIssuesActivity } from './SynchronizationIssuesActivity';
17
+ var defaultItem = {
18
+ id: '42uxv5X2',
19
+ timestamp: 1652374313724,
20
+ objectUri: 'entities/15T9kNFk',
21
+ objectType: 'configuration/entityTypes/HCP',
22
+ objectLabel: 'Andy Andy'
23
+ };
24
+ var defaultData = {
25
+ uri: 'activities/0dcf97d0-5006-46d6-b82f-07579922e2f6',
26
+ user: 'sfdc.connector.admin',
27
+ label: 'label',
28
+ timestamp: 1652374313724,
29
+ items: [defaultItem],
30
+ itemsTotal: 1
31
+ };
32
+ var defaultProps = {
33
+ type: ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE,
34
+ data: defaultData
35
+ };
36
+ var defaultMdmValues = {
37
+ uiPath: 'https://reltio.com/nui'
38
+ };
39
+ var setUp = function (_a) {
40
+ var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
41
+ var Providers = function (_a) {
42
+ var children = _a.children;
43
+ return (React.createElement(MdmModuleProvider, { values: mdmValues }, children));
36
44
  };
37
- var description = '{"label":"test"}';
38
- it('should render main parts correctly', function () {
39
- var wrapper = shallow(React.createElement(SynchronizationIssuesActivity, { type: ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE, data: data }));
40
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE);
41
- wrapper.setProps({ data: __assign(__assign({}, data), { description: description }) });
42
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE);
43
- expect(wrapper.find('EntityObject').prop('item')).toEqual(data.items[0]);
44
- var descriptionDiv = wrapper.find('ObjectLabel');
45
- expect(descriptionDiv.length).toBe(1);
46
- expect(descriptionDiv.prop('label')).toBe('test');
45
+ return render(React.createElement(SynchronizationIssuesActivity, __assign({}, props)), { wrapper: Providers });
46
+ };
47
+ describe('Synchronization issues activity tests', function () {
48
+ it('should render correctly', function () {
49
+ setUp();
50
+ screen.getByText('SFDC connector synchronization issue');
51
+ expect(screen.getByText('Andy Andy')).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/15T9kNFk');
52
+ expect(screen.queryByTestId('synchronization-issues-activity-description')).not.toBeInTheDocument();
53
+ expect(screen.queryByTestId('synchronization-issues-activity-items-total')).not.toBeInTheDocument();
47
54
  });
48
55
  it('should render relation uri correctly', function () {
49
- var items = [
50
- {
51
- id: '42uxv5X2',
52
- user: 'sfdc.connector.admin',
53
- timestamp: 1652374313724,
54
- objectUri: 'relations/15T9kNFk'
55
- }
56
- ];
57
- var wrapper = shallow(React.createElement(SynchronizationIssuesActivity, { type: ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE, data: data }));
58
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE);
59
- wrapper.setProps({ data: __assign(__assign({}, data), { description: description, items: items }) });
60
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE);
61
- var relationUriSpan = wrapper.find('span');
62
- expect(relationUriSpan.length).toBe(1);
63
- expect(relationUriSpan.text()).toBe('relations/15T9kNFk');
56
+ var props = __assign(__assign({}, defaultProps), { data: __assign(__assign({}, defaultData), { items: [
57
+ __assign(__assign({}, defaultItem), { objectUri: 'relations/15T9kNFk', objectType: 'configuration/relationTypes/HasAddress' })
58
+ ] }) });
59
+ setUp({ props: props });
60
+ screen.getByText('relations/15T9kNFk');
61
+ });
62
+ it('should render description if it has been passed', function () {
63
+ var props = __assign(__assign({}, defaultProps), { data: __assign(__assign({}, defaultData), { description: '{"label":"description"}' }) });
64
+ setUp({ props: props });
65
+ screen.getByText('description');
66
+ });
67
+ it('should render items total if itemsTotal is greater than 1', function () {
68
+ var props = __assign(__assign({}, defaultProps), { data: __assign(__assign({}, defaultData), { itemsTotal: 2 }) });
69
+ setUp({ props: props });
70
+ screen.getByText('(2 records)');
64
71
  });
65
72
  });