@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
@@ -1,4 +1,20 @@
1
- export var NOT_MEMBER_COLOR = 'rgb(238, 238, 238)';
2
- export var PRIMARY_COLOR = 'rgb(0, 0, 102)';
3
- export var SECONDARY_COLOR = 'rgba(0, 0, 102, 0.2)';
1
+ // Colors
2
+ export var PRIMARY_COLOR = '#000066';
3
+ export var DIMMED_COLOR = '#CCCCE0';
4
4
  export var TEXT_COLOR = 'rgba(0, 0, 0, 0.87)';
5
+ // Gaps
6
+ export var TOP_GAP = 24;
7
+ export var TEXT_GAP = 16;
8
+ export var GAP_BETWEEN_TABLE_AND_CHART = 8;
9
+ export var GAP_BEFORE_LEFT_BAR = 12;
10
+ // Sizes
11
+ export var AXIS_TICK_LABEL_SIZE = '12px';
12
+ export var SET_LABEL_SIZE = '13px';
13
+ export var SET_BAR_HEIGHT = 12;
14
+ export var MATRIX_ROW_HEIGHT = 29;
15
+ export var MIN_MATRIX_COLUMN_WIDTH = 28;
16
+ export var MIN_INTERSECTION_CHART_HEIGHT = 120;
17
+ export var MIN_SETS_CHART_WIDTH = 100;
18
+ export var MAX_SETS_CHART_WIDTH = 200;
19
+ export var MAX_CHARACTERS = 20;
20
+ export var MIN_CHARACTERS = 8;
@@ -0,0 +1,4 @@
1
+ export declare const gameOfThronesData: {
2
+ name: string;
3
+ sets: string[];
4
+ }[];
@@ -0,0 +1,23 @@
1
+ export var gameOfThronesData = [
2
+ { name: 'Alton Lannister', sets: ['was killed', 'Lannister', 'male'] },
3
+ { name: 'Arya Stark', sets: ['Stark', 'female'] },
4
+ { name: 'Bran Stark', sets: ['royal', 'Stark', 'male'] },
5
+ { name: 'Benjen Stark', sets: ['was killed', 'Stark', 'male'] },
6
+ { name: 'Brandon Stark', sets: ['was killed', 'Stark'] },
7
+ { name: 'Catelyn Stark', sets: ['was killed', 'Stark', 'female'] },
8
+ { name: 'Cersei Lannister', sets: ['royal', 'was killed', 'Lannister', 'female'] },
9
+ { name: 'Eddard Stark', sets: ['was killed', 'Stark', 'male'] },
10
+ { name: 'Jaime Lannister', sets: ['was killed', 'Lannister', 'male'] },
11
+ { name: 'Jon Snow', sets: ['royal', 'was killed', 'Stark', 'male'] },
12
+ { name: 'Kevan Lannister', sets: ['was killed', 'Lannister', 'male'] },
13
+ { name: 'Lancel Lannister', sets: ['was killed', 'Lannister', 'male'] },
14
+ { name: 'Lyanna Stark', sets: ['was killed', 'Stark', 'female'] },
15
+ { name: 'Martyn Lannister', sets: ['was killed', 'Lannister', 'male'] },
16
+ { name: 'Rickard Stark', sets: ['was killed', 'Stark', 'male'] },
17
+ { name: 'Rickon Stark', sets: ['was killed', 'Stark', 'male'] },
18
+ { name: 'Robb Stark', sets: ['royal', 'was killed', 'Stark', 'male'] },
19
+ { name: 'Sansa Stark', sets: ['royal', 'Stark', 'female'] },
20
+ { name: 'Tyrion Lannister', sets: ['Lannister', 'male'] },
21
+ { name: 'Tywin Lannister', sets: ['was killed', 'Lannister', 'male'] },
22
+ { name: 'Willem Lannister', sets: ['was killed', 'Lannister', 'male'] }
23
+ ];
@@ -0,0 +1,20 @@
1
+ import { ScaleBand } from 'd3-scale';
2
+ import { DataSet, Intersection, UpSetChartData } from './types';
3
+ export declare const findIntersections: (data: UpSetChartData) => {
4
+ intersections: Intersection[];
5
+ sets: DataSet[];
6
+ };
7
+ export declare const getMatrixData: (xScale: ScaleBand<string>, yScale: ScaleBand<string>, intersections: Intersection[], sets: DataSet[]) => {
8
+ circles: {
9
+ cx: number;
10
+ cy: number;
11
+ isPresent: boolean;
12
+ intersectionIndex: number;
13
+ }[];
14
+ lines: any[];
15
+ };
16
+ export declare const truncateLabels: (sets: DataSet[], maxLabelsWidth: number) => {
17
+ labels: string[];
18
+ maxWidth: number;
19
+ };
20
+ export declare const calculateTicksWidth: (ticks: number[]) => number;
@@ -0,0 +1,120 @@
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
9
+ };
10
+ import { AXIS_TICK_LABEL_SIZE, MAX_CHARACTERS, MIN_CHARACTERS, SET_LABEL_SIZE } from './constants';
11
+ export var findIntersections = function (data) {
12
+ var setsCombinations = {};
13
+ var individualSets = {};
14
+ data.forEach(function (_a) {
15
+ var name = _a.name, sets = _a.sets;
16
+ sets.forEach(function (set) {
17
+ if (!individualSets[set]) {
18
+ individualSets[set] = [];
19
+ }
20
+ individualSets[set].push(name);
21
+ });
22
+ var generateCombinations = function (subset, index) {
23
+ if (index === sets.length) {
24
+ if (subset.length > 0) {
25
+ var key = subset.sort().join(',');
26
+ if (!setsCombinations[key]) {
27
+ setsCombinations[key] = [];
28
+ }
29
+ setsCombinations[key].push(name);
30
+ }
31
+ return;
32
+ }
33
+ generateCombinations(subset, index + 1);
34
+ generateCombinations(__spreadArray(__spreadArray([], subset, true), [sets[index]], false), index + 1);
35
+ };
36
+ generateCombinations([], 0);
37
+ });
38
+ var intersections = Object.entries(setsCombinations)
39
+ .map(function (_a, index) {
40
+ var key = _a[0], elements = _a[1];
41
+ return ({
42
+ index: index,
43
+ sets: key.split(','),
44
+ size: elements.length,
45
+ elements: elements
46
+ });
47
+ })
48
+ .sort(function (a, b) { return b.size - a.size; });
49
+ var sets = Object.entries(individualSets).map(function (_a, index) {
50
+ var name = _a[0], elements = _a[1];
51
+ return ({
52
+ index: index,
53
+ name: name,
54
+ size: elements.length,
55
+ elements: elements
56
+ });
57
+ });
58
+ return { intersections: intersections, sets: sets };
59
+ };
60
+ export var getMatrixData = function (xScale, yScale, intersections, sets) {
61
+ var circles = intersections.flatMap(function (intersection, i) {
62
+ return sets.map(function (set) { return ({
63
+ cx: xScale(String(i)) + xScale.bandwidth() / 2,
64
+ cy: yScale(set.name) + yScale.bandwidth() / 2,
65
+ isPresent: intersection.sets.includes(set.name),
66
+ intersectionIndex: intersection.index
67
+ }); });
68
+ });
69
+ var lines = intersections.reduce(function (acc, intersection, i) {
70
+ var activeSetIndices = intersection.sets
71
+ .map(function (name) { return sets.findIndex(function (set) { return set.name === name; }); })
72
+ .filter(function (i) { return i >= 0; })
73
+ .sort(function (a, b) { return a - b; });
74
+ if (activeSetIndices.length > 1) {
75
+ var firstIdx = activeSetIndices[0];
76
+ var lastIdx = activeSetIndices[activeSetIndices.length - 1];
77
+ var x = xScale(String(i)) + xScale.bandwidth() / 2;
78
+ var y1 = yScale(sets[firstIdx].name) + yScale.bandwidth() / 2;
79
+ var y2 = yScale(sets[lastIdx].name) + yScale.bandwidth() / 2;
80
+ return __spreadArray(__spreadArray([], acc, true), [{ x: x, y1: y1, y2: y2, intersectionIndex: intersection.index }], false);
81
+ }
82
+ return acc;
83
+ }, []);
84
+ return { circles: circles, lines: lines };
85
+ };
86
+ export var truncateLabels = function (sets, maxLabelsWidth) {
87
+ var newTruncatedLabels = [];
88
+ var maxWidth = 0;
89
+ var tempSvgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
90
+ document.body.appendChild(tempSvgElement);
91
+ var tempTextElement = document.createElementNS('http://www.w3.org/2000/svg', 'text');
92
+ tempTextElement.setAttribute('font-size', SET_LABEL_SIZE);
93
+ tempSvgElement.appendChild(tempTextElement);
94
+ sets.forEach(function (_a) {
95
+ var name = _a.name;
96
+ var truncatedText = name.length > MAX_CHARACTERS ? name.slice(0, MAX_CHARACTERS) + '...' : name;
97
+ tempTextElement.textContent = truncatedText;
98
+ while (tempTextElement.getBBox().width > maxLabelsWidth && truncatedText.length > MIN_CHARACTERS) {
99
+ truncatedText = truncatedText.slice(0, -4) + '...';
100
+ tempTextElement.textContent = truncatedText;
101
+ }
102
+ newTruncatedLabels.push(truncatedText);
103
+ maxWidth = Math.max(maxWidth, tempTextElement.getBBox().width);
104
+ });
105
+ document.body.removeChild(tempSvgElement);
106
+ return { labels: newTruncatedLabels, maxWidth: maxWidth };
107
+ };
108
+ export var calculateTicksWidth = function (ticks) {
109
+ var tempSvgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
110
+ var tempTextElement = document.createElementNS('http://www.w3.org/2000/svg', 'text');
111
+ tempTextElement.setAttribute('font-size', AXIS_TICK_LABEL_SIZE);
112
+ tempSvgElement.appendChild(tempTextElement);
113
+ document.body.appendChild(tempSvgElement);
114
+ var maxWidth = ticks.reduce(function (maxWidth, tick) {
115
+ tempTextElement.textContent = String(tick);
116
+ return Math.max(maxWidth, tempTextElement.getBBox().width);
117
+ }, 0);
118
+ document.body.removeChild(tempSvgElement);
119
+ return maxWidth;
120
+ };
@@ -1 +1,4 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"setLabel" | "barLabel" | "axisTick" | "chartLabel">;
1
+ export declare const useStyles: (props: {
2
+ width: number;
3
+ height: number;
4
+ }) => import("@mui/styles").ClassNameMap<"svg" | "wrapper">;
@@ -1,16 +1,15 @@
1
1
  import { makeStyles } from '@mui/styles';
2
- export var useStyles = makeStyles(function (theme) { return ({
3
- setLabel: {
4
- fontSize: '13px !important'
2
+ export var useStyles = makeStyles(function () { return ({
3
+ wrapper: function (_a) {
4
+ var width = _a.width, height = _a.height;
5
+ return ({
6
+ width: width,
7
+ height: height,
8
+ display: 'flex',
9
+ overflow: 'auto'
10
+ });
5
11
  },
6
- barLabel: {
7
- fontSize: '12px !important'
8
- },
9
- axisTick: {
10
- fontSize: '12px !important'
11
- },
12
- chartLabel: {
13
- fill: "".concat(theme.palette.text.secondary, " !important"),
14
- fontSize: '10px !important'
12
+ svg: {
13
+ flexShrink: '0'
15
14
  }
16
15
  }); });
@@ -0,0 +1,16 @@
1
+ export type UpSetChartData = {
2
+ name: string;
3
+ sets: string[];
4
+ }[];
5
+ export type Intersection = {
6
+ index: number;
7
+ sets: string[];
8
+ size: number;
9
+ elements: string[];
10
+ };
11
+ export type DataSet = {
12
+ index: number;
13
+ name: string;
14
+ size: number;
15
+ elements: string[];
16
+ };
@@ -0,0 +1,20 @@
1
+ import { DataSet, Intersection } from './types';
2
+ type Props = {
3
+ width: number;
4
+ height: number;
5
+ intersections: Intersection[];
6
+ sets: DataSet[];
7
+ };
8
+ export declare const useUpSetChartSizes: ({ width, height, intersections, sets }: Props) => {
9
+ labels: string[];
10
+ svgWidth: number;
11
+ svgHeight: number;
12
+ intersectionsChartWidth: number;
13
+ intersectionsChartHeight: number;
14
+ matrixY: number;
15
+ matrixHeight: number;
16
+ maxLabelsWidth: number;
17
+ leftPadding: number;
18
+ setsChartWidth: number;
19
+ };
20
+ export {};
@@ -0,0 +1,30 @@
1
+ import { GAP_BEFORE_LEFT_BAR, GAP_BETWEEN_TABLE_AND_CHART, MATRIX_ROW_HEIGHT, MAX_SETS_CHART_WIDTH, MIN_INTERSECTION_CHART_HEIGHT, MIN_MATRIX_COLUMN_WIDTH, MIN_SETS_CHART_WIDTH, TEXT_GAP, TOP_GAP } from './constants';
2
+ import { truncateLabels } from './helpers';
3
+ export var useUpSetChartSizes = function (_a) {
4
+ var width = _a.width, height = _a.height, intersections = _a.intersections, sets = _a.sets;
5
+ var minMatrixWidth = intersections.length * MIN_MATRIX_COLUMN_WIDTH * 1.2;
6
+ var matrixHeight = sets.length * MATRIX_ROW_HEIGHT;
7
+ var availableLabelsWidth = width - minMatrixWidth - TEXT_GAP * 2 - GAP_BEFORE_LEFT_BAR - MIN_SETS_CHART_WIDTH;
8
+ var _b = truncateLabels(sets, availableLabelsWidth), labels = _b.labels, labelsWidth = _b.maxWidth;
9
+ var availableSetsChartWidth = width - minMatrixWidth - TEXT_GAP * 2 - GAP_BEFORE_LEFT_BAR - labelsWidth;
10
+ var setsChartWidth = Math.min(Math.max(availableSetsChartWidth, MIN_SETS_CHART_WIDTH), MAX_SETS_CHART_WIDTH);
11
+ var maxLabelsWidth = width - minMatrixWidth - TEXT_GAP * 2 - GAP_BEFORE_LEFT_BAR - setsChartWidth;
12
+ var leftPadding = setsChartWidth + labelsWidth + TEXT_GAP * 2 + GAP_BEFORE_LEFT_BAR;
13
+ var intersectionsChartWidth = Math.max(minMatrixWidth, width - leftPadding);
14
+ var intersectionsChartHeight = Math.max(MIN_INTERSECTION_CHART_HEIGHT, height - TOP_GAP - matrixHeight - GAP_BETWEEN_TABLE_AND_CHART);
15
+ var svgWidth = leftPadding + intersectionsChartWidth;
16
+ var svgHeight = intersectionsChartHeight + matrixHeight + TOP_GAP + GAP_BETWEEN_TABLE_AND_CHART;
17
+ var matrixY = svgHeight - matrixHeight - 1;
18
+ return {
19
+ labels: labels,
20
+ svgWidth: svgWidth,
21
+ svgHeight: svgHeight,
22
+ intersectionsChartWidth: intersectionsChartWidth,
23
+ intersectionsChartHeight: intersectionsChartHeight,
24
+ matrixY: matrixY,
25
+ matrixHeight: matrixHeight,
26
+ maxLabelsWidth: maxLabelsWidth,
27
+ leftPadding: leftPadding,
28
+ setsChartWidth: setsChartWidth
29
+ };
30
+ };
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { ActivityData, ActivityTypes } from '../types';
3
3
  type FactoryProps = {
4
4
  type: ActivityTypes;
5
- data: ActivityData;
5
+ data?: ActivityData;
6
6
  };
7
7
  export declare class ActivitiesFactory {
8
8
  static getComponent: ({ type, data }: FactoryProps) => React.JSX.Element;
@@ -31,7 +31,7 @@ var ActivitiesFactory = /** @class */ (function () {
31
31
  case ActivityTypes.COMMENT_ADDED:
32
32
  case ActivityTypes.COMMENT_DELETED:
33
33
  case ActivityTypes.COMMENT_UPDATED:
34
- return React.createElement(CommentActivity, { data: data, type: type });
34
+ return React.createElement(CommentActivity, { type: type });
35
35
  case ActivityTypes.ENTITIES_MERGED_MANUALLY:
36
36
  case ActivityTypes.ENTITIES_MERGED:
37
37
  case ActivityTypes.ENTITIES_MERGED_ON_THE_FLY:
@@ -0,0 +1,262 @@
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
4
+ import { CollapsibleItemsProvider } from '../contexts/CollapsibleItemsContext';
5
+ import { ActivityTypes } from '../types';
6
+ import { ActivitiesFactory } from './ActivitiesFactory';
7
+ var defaultMdmValues = {
8
+ metadata: {
9
+ entityTypes: [],
10
+ groupTypes: []
11
+ }
12
+ };
13
+ var setUp = function (_a) {
14
+ var props = _a.props, _b = _a.mdmValues, mdmValues = _b === void 0 ? defaultMdmValues : _b;
15
+ var Providers = function (_a) {
16
+ var children = _a.children;
17
+ return (React.createElement(MdmModuleProvider, { values: mdmValues },
18
+ React.createElement(CollapsibleItemsProvider, null, children)));
19
+ };
20
+ return render(ActivitiesFactory.getComponent(props), { wrapper: Providers });
21
+ };
22
+ describe('Activities factory tests', function () {
23
+ describe('comment activity', function () {
24
+ it('should render comment activity for COMMENT_ADDED activity type', function () {
25
+ var props = { type: ActivityTypes.COMMENT_ADDED };
26
+ setUp({ props: props });
27
+ screen.getByTestId('comment-activity');
28
+ });
29
+ it('should render comment activity for COMMENT_DELETED activity type', function () {
30
+ var props = { type: ActivityTypes.COMMENT_DELETED };
31
+ setUp({ props: props });
32
+ screen.getByTestId('comment-activity');
33
+ });
34
+ it('should render comment activity for COMMENT_UPDATED activity type', function () {
35
+ var props = { type: ActivityTypes.COMMENT_UPDATED };
36
+ setUp({ props: props });
37
+ screen.getByTestId('comment-activity');
38
+ });
39
+ });
40
+ describe('merge activity', function () {
41
+ var defaultData = {
42
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
43
+ user: 'marat.ahmetzyanov',
44
+ timestamp: 1620711408828,
45
+ items: [],
46
+ itemsTotal: 0
47
+ };
48
+ it('should render merge activity for ENTITIES_MERGED_MANUALLY activity type', function () {
49
+ var props = { data: defaultData, type: ActivityTypes.ENTITIES_MERGED_MANUALLY };
50
+ setUp({ props: props });
51
+ screen.getByTestId('merge-activity');
52
+ });
53
+ it('should render merge activity for ENTITIES_MERGED activity type', function () {
54
+ var props = { data: defaultData, type: ActivityTypes.ENTITIES_MERGED };
55
+ setUp({ props: props });
56
+ screen.getByTestId('merge-activity');
57
+ });
58
+ it('should render merge activity for ENTITIES_MERGED_ON_THE_FLY activity type', function () {
59
+ var props = { data: defaultData, type: ActivityTypes.ENTITIES_MERGED_ON_THE_FLY };
60
+ setUp({ props: props });
61
+ screen.getByTestId('merge-activity');
62
+ });
63
+ it('should render merge activity for ENTITIES_SPLITTED activity type', function () {
64
+ var props = { data: defaultData, type: ActivityTypes.ENTITIES_SPLITTED };
65
+ setUp({ props: props });
66
+ screen.getByTestId('merge-activity');
67
+ });
68
+ it('should render merge activity for ENTITY_LOST_MERGE activity type', function () {
69
+ var props = { data: defaultData, type: ActivityTypes.ENTITY_LOST_MERGE };
70
+ setUp({ props: props });
71
+ screen.getByTestId('merge-activity');
72
+ });
73
+ });
74
+ describe('potential match activity', function () {
75
+ var defaultData = {
76
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
77
+ user: 'marat.ahmetzyanov',
78
+ timestamp: 1620711408828,
79
+ items: [],
80
+ itemsTotal: 0
81
+ };
82
+ it('should render potential match activity for POTENTIAL_MATCHES_FOUND activity type', function () {
83
+ var props = { data: defaultData, type: ActivityTypes.POTENTIAL_MATCHES_FOUND };
84
+ setUp({ props: props });
85
+ screen.getByTestId('potential-match-activity');
86
+ });
87
+ it('should render potential match activity for POTENTIAL_MATCHES_REMOVED activity type', function () {
88
+ var props = { data: defaultData, type: ActivityTypes.POTENTIAL_MATCHES_REMOVED };
89
+ setUp({ props: props });
90
+ screen.getByTestId('potential-match-activity');
91
+ });
92
+ it('should render potential match activity for NOT_MATCHES_SET activity type', function () {
93
+ var props = { data: defaultData, type: ActivityTypes.NOT_MATCHES_SET };
94
+ setUp({ props: props });
95
+ screen.getByTestId('potential-match-activity');
96
+ });
97
+ it('should render potential match activity for NOT_MATCHES_RESET activity type', function () {
98
+ var props = { data: defaultData, type: ActivityTypes.NOT_MATCHES_RESET };
99
+ setUp({ props: props });
100
+ screen.getByTestId('potential-match-activity');
101
+ });
102
+ });
103
+ describe('profile activity', function () {
104
+ var defaultData = {
105
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
106
+ user: 'marat.ahmetzyanov',
107
+ timestamp: 1620711408828,
108
+ items: [],
109
+ itemsTotal: 0
110
+ };
111
+ it('should render profile activity for ENTITY_CHANGED activity type', function () {
112
+ var props = { data: defaultData, type: ActivityTypes.ENTITY_CHANGED };
113
+ setUp({ props: props });
114
+ screen.getByTestId('profile-activity');
115
+ });
116
+ it('should render profile activity for ENTITY_CREATED activity type', function () {
117
+ var props = { data: defaultData, type: ActivityTypes.ENTITY_CREATED };
118
+ setUp({ props: props });
119
+ screen.getByTestId('profile-activity');
120
+ });
121
+ it('should render profile activity for ENTITY_REMOVED activity type', function () {
122
+ var props = { data: defaultData, type: ActivityTypes.ENTITY_REMOVED };
123
+ setUp({ props: props });
124
+ screen.getByTestId('profile-activity');
125
+ });
126
+ it('should render profile activity for ANALYTICS_ATTRIBUTES_CHANGED activity type', function () {
127
+ var props = { data: defaultData, type: ActivityTypes.ANALYTICS_ATTRIBUTES_CHANGED };
128
+ setUp({ props: props });
129
+ screen.getByTestId('profile-activity');
130
+ });
131
+ });
132
+ describe('relation activity', function () {
133
+ var defaultData = {
134
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
135
+ user: 'marat.ahmetzyanov',
136
+ timestamp: 1620711408828,
137
+ items: [],
138
+ itemsTotal: 0
139
+ };
140
+ it('should render relation activity for RELATIONSHIP_CHANGED activity type', function () {
141
+ var props = { data: defaultData, type: ActivityTypes.RELATIONSHIP_CHANGED };
142
+ setUp({ props: props });
143
+ screen.getByTestId('relation-activity');
144
+ });
145
+ it('should render relation activity for RELATIONSHIP_CREATED activity type', function () {
146
+ var props = { data: defaultData, type: ActivityTypes.RELATIONSHIP_CREATED };
147
+ setUp({ props: props });
148
+ screen.getByTestId('relation-activity');
149
+ });
150
+ it('should render relation activity for RELATIONSHIP_REMOVED activity type', function () {
151
+ var props = { data: defaultData, type: ActivityTypes.RELATIONSHIP_REMOVED };
152
+ setUp({ props: props });
153
+ screen.getByTestId('relation-activity');
154
+ });
155
+ });
156
+ describe('search activity', function () {
157
+ it('should render search activity for USER_SEARCH activity type', function () {
158
+ var props = {
159
+ data: {
160
+ uri: 'activities/504c-9876-79bc2a96',
161
+ user: 'polina.arsenteva',
162
+ label: 'USER_SEARCH',
163
+ 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"}',
164
+ timestamp: 1626952820539
165
+ },
166
+ type: ActivityTypes.USER_SEARCH
167
+ };
168
+ setUp({ props: props });
169
+ screen.getByTestId('search-activity');
170
+ });
171
+ });
172
+ describe('group activity', function () {
173
+ var defaultData = {
174
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
175
+ user: 'marat.ahmetzyanov',
176
+ timestamp: 1620711408828,
177
+ items: [],
178
+ itemsTotal: 0
179
+ };
180
+ it('should render group activity for GROUP_CHANGED activity type', function () {
181
+ var props = { data: defaultData, type: ActivityTypes.GROUP_CHANGED };
182
+ setUp({ props: props });
183
+ screen.getByTestId('group-activity');
184
+ });
185
+ it('should render group activity for GROUP_CREATED activity type', function () {
186
+ var props = { data: defaultData, type: ActivityTypes.GROUP_CREATED };
187
+ setUp({ props: props });
188
+ screen.getByTestId('group-activity');
189
+ });
190
+ it('should render group activity for GROUP_REMOVED activity type', function () {
191
+ var props = { data: defaultData, type: ActivityTypes.GROUP_REMOVED };
192
+ setUp({ props: props });
193
+ screen.getByTestId('group-activity');
194
+ });
195
+ });
196
+ describe('simple activity', function () {
197
+ var defaultData = {
198
+ uri: 'activities/156a1eda-4c2c-46e3-8550-118c500fb453',
199
+ user: 'marat.ahmetzyanov',
200
+ timestamp: 1620711408828,
201
+ description: '{}',
202
+ itemsTotal: 0
203
+ };
204
+ it('should render simple activity for USER_LOGIN activity type', function () {
205
+ var props = { data: defaultData, type: ActivityTypes.USER_LOGIN };
206
+ setUp({ props: props });
207
+ screen.getByTestId('simple-activity');
208
+ });
209
+ it('should render simple activity for USER_LOGOUT activity type', function () {
210
+ var props = { data: defaultData, type: ActivityTypes.USER_LOGOUT };
211
+ setUp({ props: props });
212
+ screen.getByTestId('simple-activity');
213
+ });
214
+ it('should render simple activity for MODEL_UPDATED activity type', function () {
215
+ var props = { data: defaultData, type: ActivityTypes.MODEL_UPDATED };
216
+ setUp({ props: props });
217
+ screen.getByTestId('simple-activity');
218
+ });
219
+ it('should render simple activity for PERIODIC_TASK_SCHEDULED activity type', function () {
220
+ var props = { data: defaultData, type: ActivityTypes.PERIODIC_TASK_SCHEDULED };
221
+ setUp({ props: props });
222
+ screen.getByTestId('simple-activity');
223
+ });
224
+ it('should render simple activity for USER_PROFILE_VIEW activity type', function () {
225
+ var props = { data: defaultData, type: ActivityTypes.USER_PROFILE_VIEW };
226
+ setUp({ props: props });
227
+ screen.getByTestId('simple-activity');
228
+ });
229
+ });
230
+ describe('synchronization issues activity', function () {
231
+ it('should render synchronization issues activity for SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE activity type', function () {
232
+ var props = {
233
+ data: {
234
+ uri: 'activities/0dcf97d0-5006-46d6-b82f-07579922e2f6',
235
+ user: 'sfdc.connector.admin',
236
+ label: 'label',
237
+ timestamp: 1652374313724,
238
+ items: [
239
+ {
240
+ id: '42uxv5X2',
241
+ timestamp: 1652374313724,
242
+ objectUri: 'entities/15T9kNFk',
243
+ objectType: 'configuration/entityTypes/HCP',
244
+ objectLabel: 'Andy Andy'
245
+ }
246
+ ],
247
+ itemsTotal: 1
248
+ },
249
+ type: ActivityTypes.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE
250
+ };
251
+ setUp({ props: props });
252
+ screen.getByTestId('synchronization-issues-activity');
253
+ });
254
+ });
255
+ describe('not implemented', function () {
256
+ it('should render not implemented text for unexpected types', function () {
257
+ var props = { type: 'UNEXPECTED_ACTIVITY' };
258
+ setUp({ props: props });
259
+ screen.getByText('UNEXPECTED_ACTIVITY NOT IMPLEMENTED');
260
+ });
261
+ });
262
+ });
@@ -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 {};
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { ActivityTitle } from '../../../ActivityTitle';
3
3
  export var CommentActivity = function (_a) {
4
4
  var type = _a.type;
5
- return React.createElement(ActivityTitle, { type: type });
5
+ return React.createElement(ActivityTitle, { type: type, "data-reltio-id": "comment-activity" });
6
6
  };
@@ -1,28 +1,10 @@
1
1
  import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import { CommentActivity } from './CommentActivity';
2
+ import { render, screen } from '@testing-library/react';
4
3
  import { ActivityTypes } from '../../../types';
5
- describe('CommentActivity tests', function () {
6
- var data = {
7
- uri: 'activities/6aa6a54a-a41b-49fd-8070-b4900d3e5468',
8
- user: 'denis.tkachev',
9
- label: 'COMMENT_ADDED',
10
- 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"]}',
11
- timestamp: 1623229209927,
12
- items: [
13
- {
14
- id: '5pUxeNLr',
15
- user: 'denis.tkachev',
16
- method: 'POST',
17
- url: '/reltio/api/uitest3/activities',
18
- clientType: 'UNKNOWN',
19
- timestamp: 1623229209927
20
- }
21
- ],
22
- itemsTotal: 1
23
- };
4
+ import { CommentActivity } from './CommentActivity';
5
+ describe('Comment activity tests', function () {
24
6
  it('should render correctly', function () {
25
- var wrapper = shallow(React.createElement(CommentActivity, { type: ActivityTypes.COMMENT_ADDED, data: data }));
26
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(ActivityTypes.COMMENT_ADDED);
7
+ render(React.createElement(CommentActivity, { type: ActivityTypes.COMMENT_ADDED }));
8
+ screen.getByText('Comment added');
27
9
  });
28
10
  });
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
- import { ActivityTitle } from '../../../ActivityTitle';
3
2
  import { getGroupLabelByTypeUri, getLabel } from '@reltio/mdm-sdk';
4
3
  import { useMdmMetadata } from '../../../../../contexts/MdmModuleContext';
4
+ import { ActivityTitle } from '../../../ActivityTitle';
5
5
  import { ObjectLabel } from '../ObjectLabel';
6
6
  export var GroupActivity = function (_a) {
7
7
  var _b, _c;
8
8
  var data = _a.data, type = _a.type;
9
9
  var metadata = useMdmMetadata();
10
10
  var label = getGroupLabelByTypeUri(metadata, (_c = (_b = data.items) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.objectType);
11
- return (React.createElement(ActivityTitle, { type: type },
11
+ return (React.createElement(ActivityTitle, { type: type, "data-reltio-id": "group-activity" },
12
12
  React.createElement(ObjectLabel, { label: getLabel(label) })));
13
13
  };