@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,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ActivityTypes } from '../types';
3
- type Props = {
3
+ type Props = Omit<React.ComponentPropsWithoutRef<'div'>, 'className'> & {
4
4
  type: ActivityTypes;
5
- children?: React.ReactNode;
6
5
  };
7
- export declare const ActivityTitle: ({ type, children }: Props) => React.JSX.Element;
6
+ export declare const ActivityTitle: ({ type, children, ...restProps }: Props) => React.JSX.Element;
8
7
  export {};
@@ -1,10 +1,32 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
1
23
  import React from 'react';
2
24
  import { getActivityLabel } from '../utils/activities';
3
25
  import { useStyles } from './styles';
4
26
  export var ActivityTitle = function (_a) {
5
- var type = _a.type, children = _a.children;
27
+ var type = _a.type, children = _a.children, restProps = __rest(_a, ["type", "children"]);
6
28
  var styles = useStyles();
7
- return (React.createElement("span", { className: styles.activityTitle },
29
+ return (React.createElement("span", __assign({ className: styles.activityTitle }, restProps),
8
30
  React.createElement("span", { className: styles.activityType }, getActivityLabel(type)),
9
31
  children));
10
32
  };
@@ -1,66 +1,112 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
23
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
1
48
  import React from 'react';
2
- import { act } from 'react-dom/test-utils';
3
- import { shallow } from 'enzyme';
4
- import * as collapsibleItemsContext from '../contexts/CollapsibleItemsContext';
49
+ import { render, screen } from '@testing-library/react';
50
+ import userEvent from '@testing-library/user-event';
51
+ import { CollapsibleItemsProvider } from '../contexts/CollapsibleItemsContext';
5
52
  import { CollapsibleActivityRecords } from './CollapsibleActivityRecords';
6
- import { MoreItemsLink } from '../MoreItemsLink';
7
- var Component = function () { return React.createElement(React.Fragment, null); };
8
- describe('CollapsibleActivityRecords tests', function () {
9
- var onExpand = jest.fn();
10
- var useCollapsibleItems = jest.spyOn(collapsibleItemsContext, 'useCollapsibleItems');
11
- beforeEach(function () {
12
- useCollapsibleItems.mockImplementation(function () { return ({ itemsToShow: [], onExpand: onExpand, collapsedItemsCount: 0 }); });
13
- });
53
+ var defaultItems = [
54
+ { id: 'item-1', timestamp: 1234567890 },
55
+ { id: 'item-2', timestamp: 1234567890 },
56
+ { id: 'item-3', timestamp: 1234567890 },
57
+ { id: 'item-4', timestamp: 1234567890 },
58
+ { id: 'item-5', timestamp: 1234567890 }
59
+ ];
60
+ var RecordComponent = function (_a) {
61
+ var item = _a.item;
62
+ return React.createElement("div", { "data-reltio-id": "activity-record" }, item.id);
63
+ };
64
+ var defaultProps = { activityUri: 'activity-uri', items: defaultItems, RecordComponent: RecordComponent };
65
+ var setUp = function (props) {
66
+ if (props === void 0) { props = defaultProps; }
67
+ var user = userEvent.setup();
68
+ var Providers = function (_a) {
69
+ var children = _a.children;
70
+ return (React.createElement(CollapsibleItemsProvider, null, children));
71
+ };
72
+ return __assign(__assign({}, render(React.createElement(CollapsibleActivityRecords, __assign({}, props)), { wrapper: Providers })), { user: user });
73
+ };
74
+ describe('Collapsible activity records tests', function () {
14
75
  it('should not render anything if items empty', function () {
15
- var component = shallow(React.createElement(CollapsibleActivityRecords, { RecordComponent: Component, items: [], activityUri: '11' }));
16
- expect(component.find(Component)).toHaveLength(0);
17
- expect(component.find(MoreItemsLink)).toHaveLength(0);
18
- });
19
- it('should render 3 items without Link', function () {
20
- var items = [
21
- { id: 'string1', timestamp: 123 },
22
- { id: 'string2', timestamp: 123 },
23
- { id: 'string3', timestamp: 123 }
24
- ];
25
- useCollapsibleItems.mockImplementation(function () { return ({ itemsToShow: items, onExpand: onExpand, collapsedItemsCount: 0 }); });
26
- var component = shallow(React.createElement(CollapsibleActivityRecords, { RecordComponent: Component, items: items, activityUri: '11' }));
27
- expect(component.find(Component)).toHaveLength(3);
28
- expect(component.find(MoreItemsLink)).toHaveLength(0);
76
+ var container = setUp(__assign(__assign({}, defaultProps), { items: [] })).container;
77
+ expect(container).toBeEmptyDOMElement();
29
78
  });
30
- it('should render 3 items with Link and call onExpand on click', function () {
31
- var items = [
32
- { id: 'string1', timestamp: 123 },
33
- { id: 'string2', timestamp: 123 },
34
- { id: 'string3', timestamp: 123 },
35
- { id: 'string4', timestamp: 123 },
36
- { id: 'string5', timestamp: 123 }
37
- ];
38
- useCollapsibleItems.mockImplementation(function () { return ({
39
- itemsToShow: items.slice(0, 3),
40
- onExpand: onExpand,
41
- collapsedItemsCount: 2
42
- }); });
43
- var component = shallow(React.createElement(CollapsibleActivityRecords, { RecordComponent: Component, items: items, activityUri: '11' }));
44
- expect(component.find(Component)).toHaveLength(3);
45
- var moreItemsLink = component.find(MoreItemsLink);
46
- expect(moreItemsLink.prop('itemsCount')).toBe(2);
47
- expect(moreItemsLink.prop('itemsLabel')).toBe('records');
48
- act(function () {
49
- moreItemsLink.prop('onClick')();
79
+ it('should render and expand items correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
80
+ var user, activityRecords;
81
+ return __generator(this, function (_a) {
82
+ switch (_a.label) {
83
+ case 0:
84
+ user = setUp().user;
85
+ activityRecords = screen.getAllByTestId('activity-record');
86
+ expect(activityRecords).toHaveLength(3);
87
+ expect(activityRecords[0]).toHaveTextContent('item-1');
88
+ expect(activityRecords[1]).toHaveTextContent('item-2');
89
+ expect(activityRecords[2]).toHaveTextContent('item-3');
90
+ return [4 /*yield*/, user.click(screen.getByRole('button', { name: '2 more records' }))];
91
+ case 1:
92
+ _a.sent();
93
+ activityRecords = screen.getAllByTestId('activity-record');
94
+ expect(activityRecords).toHaveLength(5);
95
+ expect(activityRecords[3]).toHaveTextContent('item-4');
96
+ expect(activityRecords[4]).toHaveTextContent('item-5');
97
+ expect(screen.queryByRole('button')).not.toBeInTheDocument();
98
+ return [2 /*return*/];
99
+ }
50
100
  });
51
- expect(onExpand).toHaveBeenCalled();
101
+ }); });
102
+ it('should not render more items link if items count is 3 or less', function () {
103
+ setUp(__assign(__assign({}, defaultProps), { items: defaultItems.slice(0, 3) }));
104
+ expect(screen.getAllByTestId('activity-record')).toHaveLength(3);
105
+ expect(screen.queryByRole('button')).not.toBeInTheDocument();
52
106
  });
53
- it('should render 5 items without Link', function () {
54
- var items = [
55
- { id: 'string1', timestamp: 123 },
56
- { id: 'string2', timestamp: 123 },
57
- { id: 'string3', timestamp: 123 },
58
- { id: 'string4', timestamp: 123 },
59
- { id: 'string5', timestamp: 123 }
60
- ];
61
- useCollapsibleItems.mockImplementation(function () { return ({ itemsToShow: items, onExpand: onExpand, collapsedItemsCount: 0 }); });
62
- var component = shallow(React.createElement(CollapsibleActivityRecords, { RecordComponent: Component, items: items, activityUri: '11' }));
63
- expect(component.find(Component)).toHaveLength(5);
64
- expect(component.find(MoreItemsLink)).toHaveLength(0);
107
+ it('should render more items link correctly if items count is 4', function () {
108
+ setUp(__assign(__assign({}, defaultProps), { items: defaultItems.slice(0, 4) }));
109
+ expect(screen.getAllByTestId('activity-record')).toHaveLength(3);
110
+ screen.getByRole('button', { name: '1 more record' });
65
111
  });
66
112
  });
@@ -10,32 +10,41 @@ 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';
13
+ import { render, screen } from '@testing-library/react';
14
+ import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
15
+ import { ActivityTypes } from '../types';
14
16
  import { EntityObject } from './EntityObject';
15
- describe('EntityObject tests', function () {
16
- it('should render correctly', function () {
17
- var item = {
18
- id: '3vJgNLSN',
19
- user: 'egorshkov',
20
- method: 'POST',
21
- url: '/reltio/api/alenat/entities/sOoSQYm/_update',
22
- clientType: 'Reltio UI',
23
- timestamp: 1621847085259,
24
- objectUri: 'relations/edEnRRW',
25
- objectType: 'configuration/relationTypes/HasAddress',
26
- objectLabel: '- cBtCASwtAeEbTxe Agacati',
27
- data: {
28
- type: 'ENTITY_CHANGED'
29
- },
30
- eventId: '1621847085259_00qpSyx'
31
- };
32
- var wrapper = shallow(React.createElement(EntityObject, { item: item }));
33
- var objectUri = item.objectUri, objectLabel = item.objectLabel;
34
- var link = wrapper.find('EntityUriLink');
35
- expect(link.length).toBe(1);
36
- expect(link.prop('value')).toBe(objectUri);
37
- expect(link.text()).toBe(objectLabel);
38
- wrapper.setProps({ item: __assign(__assign({}, item), { data: { type: 'ENTITY_REMOVED' } }) });
39
- expect(wrapper.find('.removed').length).toBe(1);
17
+ var defaultItem = {
18
+ id: '3vJgNLSN',
19
+ timestamp: 1621847085259,
20
+ objectUri: 'relations/edEnRRW',
21
+ objectLabel: 'object label',
22
+ data: { type: ActivityTypes.ENTITY_CHANGED }
23
+ };
24
+ var defaultProps = {
25
+ item: defaultItem
26
+ };
27
+ var defaultMdmValues = {
28
+ uiPath: 'https://reltio.com/nui'
29
+ };
30
+ var setUp = function (_a) {
31
+ var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
32
+ var Providers = function (_a) {
33
+ var children = _a.children;
34
+ return (React.createElement(MdmModuleProvider, { values: mdmValues }, children));
35
+ };
36
+ return render(React.createElement(EntityObject, __assign({}, props)), { wrapper: Providers });
37
+ };
38
+ describe('Entity object tests', function () {
39
+ it('should render entity object correctly', function () {
40
+ setUp();
41
+ var link = screen.getByText('object label');
42
+ expect(link).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~relations/edEnRRW');
43
+ expect(link).not.toHaveClass('removed');
44
+ });
45
+ it('should render entity object with ENTITY_REMOVED type correctly', function () {
46
+ var props = __assign(__assign({}, defaultProps), { item: __assign(__assign({}, defaultItem), { data: { type: ActivityTypes.ENTITY_REMOVED } }) });
47
+ setUp({ props: props });
48
+ expect(screen.getByText('object label')).toHaveClass('removed');
40
49
  });
41
50
  });
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- type Props = {
2
+ type Props = Omit<React.ComponentPropsWithoutRef<'div'>, 'className'> & {
3
3
  fieldName: string;
4
- children: React.ReactNode;
5
4
  };
6
- export declare const Field: ({ fieldName, children }: Props) => React.JSX.Element;
5
+ export declare const Field: ({ fieldName, children, ...restProps }: Props) => React.JSX.Element;
7
6
  export {};
@@ -1,9 +1,31 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
1
23
  import React from 'react';
2
24
  import { useStyles } from './styles';
3
25
  export var Field = function (_a) {
4
- var fieldName = _a.fieldName, children = _a.children;
26
+ var fieldName = _a.fieldName, children = _a.children, restProps = __rest(_a, ["fieldName", "children"]);
5
27
  var styles = useStyles();
6
- return (React.createElement("div", { className: styles.field },
28
+ return (React.createElement("div", __assign({ className: styles.field }, restProps),
7
29
  React.createElement("span", { className: styles.fieldName },
8
30
  fieldName,
9
31
  ":"),
@@ -9,44 +9,170 @@ 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 { shallow } from 'enzyme';
49
+ import { render, screen } from '@testing-library/react';
50
+ import userEvent from '@testing-library/user-event';
51
+ import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
52
+ import { CollapsibleItemsProvider } from '../contexts/CollapsibleItemsContext';
53
+ import { ActivityTypes } from '../types';
14
54
  import { PotentialMatchRecord } from './PotentialMatchRecord';
15
- describe('PotentialMatchRecord tests', function () {
16
- var item = {
17
- id: '3LfWvAlI',
18
- user: 'IncrementalMatchThread',
19
- clientType: 'API',
20
- timestamp: 1621847092199,
21
- objectUri: 'entities/11EunumT',
22
- objectType: 'configuration/entityTypes/HCP',
23
- objectLabel: '- cBtCASwtAeEbTxe Agacati',
24
- data: {
25
- potentialMatches: 'entities/sOoSQYm,entities/sOoSQYq,entities/sOoSQYw',
26
- type: 'POTENTIAL_MATCHES_FOUND',
27
- 'entities/sOoSQYm': '- cBtCASwtAeEbTxe Agacati',
28
- 'entities/sOoSQYq': '- cBtCASwtAeEbTxe Test',
29
- 'entities/sOoSQYw': '123'
30
- },
31
- eventId: '1621847092199_00Nr58d'
55
+ var defaultItem = {
56
+ id: '3LfWvAlI',
57
+ timestamp: 1621847092199,
58
+ objectUri: 'entities/11EunumT',
59
+ objectType: 'configuration/entityTypes/HCP',
60
+ objectLabel: 'record label',
61
+ data: {
62
+ potentialMatches: 'entities/sOoSQYm,entities/sOoSQYq,entities/sOoSQYw,entities/p3Js13Nm,entities/zIlemSd09',
63
+ type: ActivityTypes.POTENTIAL_MATCHES_FOUND,
64
+ 'entities/sOoSQYm': 'entity label 1',
65
+ 'entities/sOoSQYq': 'entity label 2',
66
+ 'entities/sOoSQYw': 'entity label 3',
67
+ 'entities/p3Js13Nm': 'entity label 4',
68
+ 'entities/zIlemSd09': 'entity label 5'
69
+ }
70
+ };
71
+ var defaultProps = {
72
+ item: defaultItem
73
+ };
74
+ var defaultMdmValues = {
75
+ uiPath: 'https://reltio.com/nui'
76
+ };
77
+ var setUp = function (_a) {
78
+ var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
79
+ var user = userEvent.setup();
80
+ var Providers = function (_a) {
81
+ var children = _a.children;
82
+ return (React.createElement(MdmModuleProvider, { values: mdmValues },
83
+ React.createElement(CollapsibleItemsProvider, null, children)));
32
84
  };
33
- it('should render correctly', function () {
34
- var wrapper = shallow(React.createElement(PotentialMatchRecord, { item: item }));
35
- expect(wrapper.find('EntityObject').length).toBe(1);
36
- expect(wrapper.find('PotentialMatchField').length).toBe(1);
85
+ return __assign({ user: user }, render(React.createElement(PotentialMatchRecord, __assign({}, props)), { wrapper: Providers }));
86
+ };
87
+ describe('Potential match record tests', function () {
88
+ it('should render nothing if there are not potentialMatches or newUri fields', function () {
89
+ var props = __assign(__assign({}, defaultProps), { item: __assign(__assign({}, defaultItem), { data: { type: ActivityTypes.POTENTIAL_MATCHES_FOUND } }) });
90
+ var container = setUp({ props: props }).container;
91
+ expect(container).toBeEmptyDOMElement();
37
92
  });
38
- it('should render newUri correctly', function () {
39
- var newUriItem = __assign(__assign({}, item), { data: {
40
- 'entities/2eIQy30G': 'HCP DT 2,',
41
- newUri: 'entities/2eIQy30G',
42
- type: 'ENTITIES_SPLITTED'
43
- } });
44
- var wrapper = shallow(React.createElement(PotentialMatchRecord, { item: newUriItem }));
45
- expect(wrapper.find('EntityObject').length).toBe(1);
46
- expect(wrapper.find('PotentialMatchField').length).toBe(1);
93
+ it('should render record label correctly', function () {
94
+ setUp();
95
+ expect(screen.getByText('record label')).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/11EunumT');
47
96
  });
48
- it('should not render if there are not potentialMatches/newUri', function () {
49
- var wrapper = shallow(React.createElement(PotentialMatchRecord, { item: __assign(__assign({}, item), { data: { type: 'POTENTIAL_MATCHES_FOUND' } }) }));
50
- expect(wrapper.isEmptyRender()).toBe(true);
97
+ it('should render matches correctly for potentialMatches field', function () { return __awaiter(void 0, void 0, void 0, function () {
98
+ var user, _a, links, moreItemsLink;
99
+ var _b;
100
+ return __generator(this, function (_c) {
101
+ switch (_c.label) {
102
+ case 0:
103
+ user = setUp().user;
104
+ expect(screen.getByTestId('potential-matches-field')).toHaveTextContent('Matches found:entity label 1, entity label 2, entity label 3 and 2 more matches');
105
+ _a = screen.getAllByRole('link'), links = _a.slice(1);
106
+ expect(links).toHaveLength(3);
107
+ expect(links[0]).toHaveTextContent('entity label 1');
108
+ expect(links[0]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/sOoSQYm');
109
+ expect(links[1]).toHaveTextContent('entity label 2');
110
+ expect(links[1]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/sOoSQYq');
111
+ expect(links[2]).toHaveTextContent('entity label 3');
112
+ expect(links[2]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/sOoSQYw');
113
+ moreItemsLink = screen.getByRole('button', { name: '2 more matches' });
114
+ return [4 /*yield*/, user.click(moreItemsLink)];
115
+ case 1:
116
+ _c.sent();
117
+ expect(screen.getByTestId('potential-matches-field')).toHaveTextContent('Matches found:entity label 1, entity label 2, entity label 3, entity label 4, entity label 5');
118
+ _b = screen.getAllByRole('link'), links = _b.slice(1);
119
+ expect(links).toHaveLength(5);
120
+ expect(links[3]).toHaveTextContent('entity label 4');
121
+ expect(links[3]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/p3Js13Nm');
122
+ expect(links[4]).toHaveTextContent('entity label 5');
123
+ expect(links[4]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/zIlemSd09');
124
+ expect(moreItemsLink).not.toBeInTheDocument();
125
+ return [2 /*return*/];
126
+ }
127
+ });
128
+ }); });
129
+ it('should render matches correctly for newUri field', function () { return __awaiter(void 0, void 0, void 0, function () {
130
+ var props, user, _a, links, moreItemsLink;
131
+ var _b;
132
+ return __generator(this, function (_c) {
133
+ switch (_c.label) {
134
+ case 0:
135
+ props = __assign(__assign({}, defaultProps), { item: __assign(__assign({}, defaultItem), { data: {
136
+ type: ActivityTypes.ENTITIES_SPLITTED,
137
+ newUri: 'entities/sOoSQYm,entities/sOoSQYq,entities/sOoSQYw,entities/p3Js13Nm',
138
+ 'entities/sOoSQYm': 'entity label 1',
139
+ 'entities/sOoSQYq': 'entity label 2',
140
+ 'entities/sOoSQYw': 'entity label 3',
141
+ 'entities/p3Js13Nm': 'entity label 4'
142
+ } }) });
143
+ user = setUp({ props: props }).user;
144
+ expect(screen.getByTestId('potential-matches-field')).toHaveTextContent('Un-merged with:entity label 1, entity label 2, entity label 3 and 1 more match');
145
+ _a = screen.getAllByRole('link'), links = _a.slice(1);
146
+ expect(links).toHaveLength(3);
147
+ expect(links[0]).toHaveTextContent('entity label 1');
148
+ expect(links[0]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/sOoSQYm');
149
+ expect(links[1]).toHaveTextContent('entity label 2');
150
+ expect(links[1]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/sOoSQYq');
151
+ expect(links[2]).toHaveTextContent('entity label 3');
152
+ expect(links[2]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/sOoSQYw');
153
+ moreItemsLink = screen.getByRole('button', { name: '1 more match' });
154
+ return [4 /*yield*/, user.click(moreItemsLink)];
155
+ case 1:
156
+ _c.sent();
157
+ expect(screen.getByTestId('potential-matches-field')).toHaveTextContent('Un-merged with:entity label 1, entity label 2, entity label 3, entity label 4');
158
+ _b = screen.getAllByRole('link'), links = _b.slice(1);
159
+ expect(links).toHaveLength(4);
160
+ expect(links[3]).toHaveTextContent('entity label 4');
161
+ expect(links[3]).toHaveAttribute('href', 'https://reltio.com/nui#p~com.reltio.plugins.entity.default.DefaultPerspective_e~entities/p3Js13Nm');
162
+ expect(moreItemsLink).not.toBeInTheDocument();
163
+ return [2 /*return*/];
164
+ }
165
+ });
166
+ }); });
167
+ it('should not render more items link if items count is 3 or less', function () {
168
+ var props = __assign(__assign({}, defaultProps), { item: __assign(__assign({}, defaultItem), { data: {
169
+ potentialMatches: 'entities/sOoSQYm,entities/sOoSQYq,entities/sOoSQYw',
170
+ type: ActivityTypes.POTENTIAL_MATCHES_FOUND,
171
+ 'entities/sOoSQYm': 'entity label 1',
172
+ 'entities/sOoSQYq': 'entity label 2',
173
+ 'entities/sOoSQYw': 'entity label 3'
174
+ } }) });
175
+ setUp({ props: props });
176
+ expect(screen.queryByRole('button')).not.toBeInTheDocument();
51
177
  });
52
178
  });
@@ -16,7 +16,7 @@ export var PotentialMatchField = function (_a) {
16
16
  items: matches.split(',')
17
17
  }), onExpand = _c.onExpand, collapsedItemsCount = _c.collapsedItemsCount, itemsToShow = _c.itemsToShow;
18
18
  var type = data === null || data === void 0 ? void 0 : data.type;
19
- return (React.createElement(Field, { fieldName: getFieldName(type) },
19
+ return (React.createElement(Field, { fieldName: getFieldName(type), "data-reltio-id": "potential-matches-field" },
20
20
  itemsToShow
21
21
  .map(function (url, index) { return (React.createElement(EntityUriLink, { key: index, value: url, className: styles.link }, getLabel(data[url]))); })
22
22
  .reduce(function (prev, curr) { return [prev, ', ', curr]; }),