@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
@@ -15,129 +15,142 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var react_1 = __importDefault(require("react"));
18
- var enzyme_1 = require("enzyme");
19
- var RelationActivity_1 = require("./RelationActivity");
18
+ var react_2 = require("@testing-library/react");
19
+ var MdmModuleContext_1 = require("../../../../../contexts/MdmModuleContext");
20
20
  var types_1 = require("../../../types");
21
- var CollapsibleActivityRecords_1 = require("../../../CollapsibleActivityRecords");
22
- describe('RelationActivity tests', function () {
23
- var data = {
24
- uri: 'activities/4de656b9-e9c3-451d-8d3d-833c5a268268',
25
- user: 'egorshkov',
26
- timestamp: 1621250955807,
27
- items: [
28
- {
29
- id: '89tO5c5G',
30
- user: 'egorshkov',
31
- method: 'POST',
32
- url: '/reltio/api/alenat/entities/10hy6j0b/_update',
33
- clientType: 'Reltio UI',
34
- timestamp: 1621250955807,
35
- objectUri: 'relations/edEoxDC',
36
- objectType: 'configuration/relationTypes/HasAddress',
37
- startObjectUri: 'entities/10hy6j0b',
38
- startObjectLabel: '- cBtCASwtAeEbTxe Agacati',
39
- endObjectUri: 'entities/1BVkicLG',
40
- endObjectLabel: 'cBtCASwtAeEbTxe Agacati Nash',
41
- data: {
42
- type: 'RELATIONSHIP_CHANGED'
43
- },
44
- deltaCollection: {
45
- ovChanged: true,
46
- delta: [
47
- {
48
- type: 'ATTRIBUTE_CHANGED',
49
- attributeType: 'configuration/relationTypes/HasAddress/attributes/AddressType',
50
- newValue: {
51
- value: 'CLIN',
52
- ov: true,
53
- id: '2BY80NuxW',
54
- sources: ['Reltio']
55
- },
56
- oldValue: {
57
- value: 'BUSI',
58
- ov: true,
59
- id: '2BY80NuxW',
60
- sources: ['Reltio']
61
- }
62
- }
63
- ]
64
- },
65
- eventId: '1621250955807_025tRjR'
66
- },
67
- {
68
- id: '89tO5c5G',
69
- user: 'egorshkov',
70
- method: 'POST',
71
- url: '/reltio/api/alenat/entities/10hy6j0b/_update',
72
- clientType: 'Reltio UI',
73
- timestamp: 1621250955807,
74
- objectUri: 'relations/edEoxDC',
75
- objectType: 'configuration/relationTypes/HasAddress',
76
- startObjectUri: 'entities/10hy6j0b',
77
- startObjectLabel: '- cBtCASwtAeEbTxe Agacati',
78
- endObjectUri: 'entities/1BVkicLG',
79
- endObjectLabel: 'cBtCASwtAeEbTxe Agacati Nash',
80
- data: {
81
- type: 'RELATIONSHIP_CHANGED'
82
- },
83
- deltaCollection: {
84
- ovChanged: true,
85
- delta: [
86
- {
87
- type: 'ATTRIBUTE_CHANGED',
88
- attributeType: 'configuration/relationTypes/HasAddress/attributes/AddressType',
89
- newValue: {
90
- value: 'CLINS',
91
- ov: true,
92
- id: '2BY80NuxW',
93
- sources: ['Reltio']
94
- },
95
- oldValue: {
96
- value: 'BUSIQ',
97
- ov: true,
98
- id: '2BY80NuxW',
99
- sources: ['Reltio']
100
- }
101
- }
102
- ]
103
- },
104
- eventId: '1621250955807_025tRjR'
105
- }
106
- ],
107
- itemsTotal: 2
108
- };
109
- var itemWithoutDelta = {
21
+ var CollapsibleItemsContext_1 = require("../../../contexts/CollapsibleItemsContext");
22
+ var RelationActivity_1 = require("./RelationActivity");
23
+ var defaultItems = [
24
+ {
110
25
  id: '89tO5c5G',
111
- user: 'egorshkov',
112
- method: 'POST',
113
- url: '/reltio/api/alenat/entities/10hy6j0b/_update',
114
- clientType: 'Reltio UI',
115
26
  timestamp: 1621250955807,
116
27
  objectUri: 'relations/edEoxDC',
117
28
  objectType: 'configuration/relationTypes/HasAddress',
118
29
  startObjectUri: 'entities/10hy6j0b',
119
- startObjectLabel: '- cBtCASwtAeEbTxe Agacati',
30
+ startObjectLabel: 'item 1 start object label',
120
31
  endObjectUri: 'entities/1BVkicLG',
121
- endObjectLabel: 'cBtCASwtAeEbTxe Agacati Nash',
122
- data: {
123
- type: 'RELATIONSHIP_CHANGED'
124
- },
32
+ endObjectLabel: 'item 1 end object label',
33
+ data: { type: types_1.ActivityTypes.RELATIONSHIP_CHANGED },
34
+ deltaCollection: {
35
+ ovChanged: true,
36
+ delta: [
37
+ {
38
+ type: 'ATTRIBUTE_CHANGED',
39
+ attributeType: 'configuration/relationTypes/HasAddress/attributes/AddressType',
40
+ newValue: { value: 'CLIN', ov: true, id: 'yTn28IobS', sources: ['Reltio'] },
41
+ oldValue: { value: 'BUSI', ov: true, id: 'yTn28IobS', sources: ['Reltio'] }
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ id: '473Jsm3S',
48
+ timestamp: 1621250955807,
49
+ objectUri: 'relations/dK321SxZ',
50
+ objectType: 'configuration/relationTypes/HasAddress',
51
+ startObjectUri: 'entities/l28Nd2Zx',
52
+ startObjectLabel: 'item 2 start object label',
53
+ endObjectUri: 'entities/oP23Nsm3',
54
+ endObjectLabel: 'item 2 end object label',
55
+ data: { type: types_1.ActivityTypes.RELATIONSHIP_CHANGED },
125
56
  deltaCollection: {
126
- ovChanged: false,
127
- delta: undefined
128
- },
129
- eventId: '1621250955807_025tRjR'
57
+ ovChanged: true,
58
+ delta: [
59
+ {
60
+ type: 'ATTRIBUTE_CHANGED',
61
+ attributeType: 'configuration/relationTypes/HasAddress/attributes/AddressType',
62
+ newValue: { value: 'CLINS', ov: true, id: '2BY80NuxW', sources: ['Reltio'] },
63
+ oldValue: { value: 'BUSIQ', ov: true, id: '2BY80NuxW', sources: ['Reltio'] }
64
+ }
65
+ ]
66
+ }
67
+ }
68
+ ];
69
+ var defaultData = {
70
+ uri: 'activities/f0efd6b4-129b-4379-a37c-ac2c08e3f2a5',
71
+ user: 'alexander.kirsanov',
72
+ timestamp: 1622096971385,
73
+ items: defaultItems,
74
+ itemsTotal: 2
75
+ };
76
+ var defaultProps = {
77
+ data: defaultData,
78
+ type: types_1.ActivityTypes.RELATIONSHIP_CHANGED
79
+ };
80
+ var defaultMdmValues = {
81
+ metadata: {
82
+ entityTypes: [],
83
+ relationTypes: [
84
+ {
85
+ uri: 'configuration/relationTypes/HasAddress',
86
+ label: 'Has address',
87
+ attributes: [
88
+ {
89
+ label: 'Address type',
90
+ name: 'AddressType',
91
+ type: 'String',
92
+ uri: 'configuration/relationTypes/HasAddress/attributes/AddressType'
93
+ }
94
+ ]
95
+ }
96
+ ]
97
+ },
98
+ uiPath: 'https://reltio.com/nui'
99
+ };
100
+ var setUp = function (_a) {
101
+ var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
102
+ var Providers = function (_a) {
103
+ var children = _a.children;
104
+ return (react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues },
105
+ react_1.default.createElement(CollapsibleItemsContext_1.CollapsibleItemsProvider, null, children)));
130
106
  };
131
- it('should render correctly', function () {
132
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(RelationActivity_1.RelationActivity, { type: types_1.ActivityTypes.RELATIONSHIP_CHANGED, data: data }));
133
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(types_1.ActivityTypes.RELATIONSHIP_CHANGED);
134
- expect(wrapper.find('RelationObject').length).toBe(0);
135
- var collapsedActivity = wrapper.find(CollapsibleActivityRecords_1.CollapsibleActivityRecords);
136
- expect(collapsedActivity.prop('activityUri')).toBe(data.uri);
137
- expect(collapsedActivity.prop('items')).toEqual(data.items);
138
- wrapper.setProps({ data: __assign(__assign({}, data), { items: [itemWithoutDelta], itemsTotal: 1 }) });
139
- expect(wrapper.find('ActivityTitle').prop('type')).toBe(types_1.ActivityTypes.RELATIONSHIP_CHANGED);
140
- expect(wrapper.find('RelationObject').length).toBe(1);
141
- expect(wrapper.find(CollapsibleActivityRecords_1.CollapsibleActivityRecords)).toHaveLength(0);
107
+ return (0, react_2.render)(react_1.default.createElement(RelationActivity_1.RelationActivity, __assign({}, props)), { wrapper: Providers });
108
+ };
109
+ describe('Relation activity tests', function () {
110
+ it('should render minimized if itemsTotal is 1 and there is not delta field', function () {
111
+ var props = __assign(__assign({}, defaultProps), { data: __assign(__assign({}, defaultData), { items: [__assign(__assign({}, defaultItems[0]), { deltaCollection: undefined })], itemsTotal: 1 }) });
112
+ setUp({ props: props });
113
+ var title = react_2.screen.getByTestId('relation-activity-title');
114
+ (0, react_2.within)(title).getByText('item 1 start object label');
115
+ (0, react_2.within)(title).getByText('item 1 end object label');
116
+ (0, react_2.within)(title).getByText('Relationship updated');
117
+ expect(react_2.screen.queryByTestId('reltio-activity-log-record')).not.toBeInTheDocument();
118
+ });
119
+ it('should render maximized if itemsTotal is 1 but there is delta field', function () {
120
+ var props = __assign(__assign({}, defaultProps), { data: __assign(__assign({}, defaultData), { items: defaultItems.slice(0, 1), itemsTotal: 1 }) });
121
+ setUp({ props: props });
122
+ var title = react_2.screen.getByTestId('relation-activity-title');
123
+ (0, react_2.within)(title).getByText('Relationship updated');
124
+ expect((0, react_2.within)(title).queryByText('item 1 start object label')).not.toBeInTheDocument();
125
+ expect((0, react_2.within)(title).queryByText('item 1 end object label')).not.toBeInTheDocument();
126
+ var record = react_2.screen.getByTestId('reltio-activity-log-record');
127
+ (0, react_2.within)(record).getByText('item 1 start object label');
128
+ (0, react_2.within)(record).getByText('item 1 end object label');
129
+ expect(record).toHaveTextContent('Address type:');
130
+ expect(record).toHaveTextContent('BUSI');
131
+ expect(record).toHaveTextContent('CLIN');
132
+ expect(record).toHaveTextContent('edited');
133
+ });
134
+ it('should render maximized if itemsTotal is not 1', function () {
135
+ setUp();
136
+ var title = react_2.screen.getByTestId('relation-activity-title');
137
+ (0, react_2.within)(title).getByText('Relationship updated');
138
+ expect((0, react_2.within)(title).queryByText('item 1 start object label')).not.toBeInTheDocument();
139
+ expect((0, react_2.within)(title).queryByText('item 1 end object label')).not.toBeInTheDocument();
140
+ expect((0, react_2.within)(title).queryByText('item 2 start object label')).not.toBeInTheDocument();
141
+ expect((0, react_2.within)(title).queryByText('item 2 end object label')).not.toBeInTheDocument();
142
+ var records = react_2.screen.getAllByTestId('reltio-activity-log-record');
143
+ (0, react_2.within)(records[0]).getByText('item 1 start object label');
144
+ (0, react_2.within)(records[0]).getByText('item 1 end object label');
145
+ expect(records[0]).toHaveTextContent('Address type:');
146
+ expect(records[0]).toHaveTextContent('BUSI');
147
+ expect(records[0]).toHaveTextContent('CLIN');
148
+ expect(records[0]).toHaveTextContent('edited');
149
+ (0, react_2.within)(records[1]).getByText('item 2 start object label');
150
+ (0, react_2.within)(records[1]).getByText('item 2 end object label');
151
+ expect(records[1]).toHaveTextContent('Address type:');
152
+ expect(records[1]).toHaveTextContent('BUSIQ');
153
+ expect(records[1]).toHaveTextContent('CLINS');
154
+ expect(records[1]).toHaveTextContent('edited');
142
155
  });
143
156
  });
@@ -45,7 +45,7 @@ var SearchActivity = function (_a) {
45
45
  }, [data.description]);
46
46
  var handleOpenSearch = (0, ramda_1.pipe)((0, ramda_1.always)(searchState), openSearch);
47
47
  var readableQueryString = (0, useReadableSearchState_1.useReadableSearchState)(searchState).readableQueryString;
48
- return (react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type },
48
+ return (react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type, "data-reltio-id": "search-activity" },
49
49
  react_1.default.createElement("span", { className: styles.link, onClick: handleOpenSearch }, readableQueryString || ui_i18n_1.default.text('all profiles'))));
50
50
  };
51
51
  exports.SearchActivity = SearchActivity;
@@ -10,202 +10,179 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
24
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
13
49
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
50
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
51
  };
16
52
  Object.defineProperty(exports, "__esModule", { value: true });
17
53
  var react_1 = __importDefault(require("react"));
18
- var enzyme_1 = require("enzyme");
19
- var SearchActivity_1 = require("./SearchActivity");
20
- var types_1 = require("../../../types");
21
- var useReadableSearchState_1 = require("../../../../../hooks/useReadableSearchState");
54
+ var react_2 = require("@testing-library/react");
55
+ var user_event_1 = __importDefault(require("@testing-library/user-event"));
22
56
  var MdmModuleContext_1 = require("../../../../../contexts/MdmModuleContext");
23
- jest.mock('../../../../../hooks/useReadableSearchState', function () { return (__assign(__assign({}, jest.requireActual('../../../../../hooks/useReadableSearchState')), { useReadableSearchState: jest.fn() })); });
24
- var openSearch = jest.fn();
25
- var setUp = function (props) {
26
- return (0, enzyme_1.mount)(react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { actions: { openSearch: openSearch } },
27
- react_1.default.createElement(SearchActivity_1.SearchActivity, __assign({}, props))));
57
+ var types_1 = require("../../../types");
58
+ var SearchActivity_1 = require("./SearchActivity");
59
+ var defaultMdmValues = {
60
+ metadata: {
61
+ entityTypes: [
62
+ {
63
+ uri: 'configuration/entityTypes/HCP',
64
+ label: 'HCP',
65
+ attributes: [
66
+ {
67
+ uri: 'configuration/entityTypes/HCP/attributes/FirstName',
68
+ name: 'FirstName',
69
+ type: 'String',
70
+ label: 'First Name'
71
+ }
72
+ ]
73
+ }
74
+ ]
75
+ },
76
+ dataTenants: [],
77
+ attributesPresentation: {},
78
+ lookups: {}
79
+ };
80
+ var mdmActions = {
81
+ openSearch: jest.fn(),
82
+ lookupsListResolved: jest.fn()
28
83
  };
29
- describe('SearchActivity tests', function () {
84
+ var setUp = function (_a) {
85
+ var props = _a.props, _b = _a.mdmValues, mdmValues = _b === void 0 ? defaultMdmValues : _b;
86
+ var user = user_event_1.default.setup();
87
+ var Providers = function (_a) {
88
+ var children = _a.children;
89
+ return (react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues, actions: mdmActions }, children));
90
+ };
91
+ return __assign({ user: user }, (0, react_2.render)(react_1.default.createElement(SearchActivity_1.SearchActivity, __assign({}, props)), { wrapper: Providers }));
92
+ };
93
+ describe('Search activity tests', function () {
30
94
  afterEach(function () {
31
95
  jest.clearAllMocks();
32
96
  });
33
- it('should render readable new search state and open it on click correctly', function () {
34
- useReadableSearchState_1.useReadableSearchState.mockReturnValueOnce({
35
- readableQueryString: 'readable search state',
36
- readableQuery: []
37
- });
38
- var data = {
39
- uri: 'activities/504c-9876-79bc2a96',
40
- user: 'polina.arsenteva',
41
- label: 'USER_SEARCH',
42
- description: '{"activity":{"query":"filter=equals(type%2C\'configuration%2FentityTypes%2FHCP\')&options=searchByOv%2CovOnly","uiState":{"view":{"searchResultsMode":"table","entityTypeTab":"configuration/entityTypes/HCP", "previewPanelMode":null},"facets":{"type":{"fieldName":"type","values":["configuration/entityTypes/HCP"]}},"advanced":[],"searchOptions":{"searchByOv":true,"ovOnly":true},"keyword":null,"map":null,"version":"2.0"}},"version":"2.0"}',
43
- timestamp: 1626952820539,
44
- items: [
45
- {
46
- id: '3ZOMTE6R',
47
- user: 'polina.arsenteva',
48
- method: 'POST',
49
- url: '/reltio/api/sokol/activities',
50
- clientType: 'Reltio UI',
51
- timestamp: 1626952820539
52
- }
53
- ],
54
- itemsTotal: 1
55
- };
56
- var wrapper = setUp({ data: data, type: types_1.ActivityTypes.USER_SEARCH });
57
- expect(wrapper.find('.link').text()).toBe('readable search state');
58
- var searchState = {
59
- view: {
60
- searchResultsMode: 'table',
61
- entityTypeTab: 'configuration/entityTypes/HCP',
62
- previewPanelMode: null
63
- },
64
- facets: {
65
- type: {
66
- fieldName: 'type',
67
- values: ['configuration/entityTypes/HCP']
68
- }
69
- },
70
- advanced: [],
71
- searchOptions: {
72
- searchByOv: true,
73
- ovOnly: true
74
- },
75
- keyword: null,
76
- map: null,
77
- version: '2.0'
78
- };
79
- expect(useReadableSearchState_1.useReadableSearchState).toHaveBeenCalledWith(searchState);
80
- wrapper.find('.link').simulate('click');
81
- expect(openSearch).toHaveBeenCalledWith(searchState);
82
- });
83
- it('should render readable old search state and open it on click correctly', function () {
84
- useReadableSearchState_1.useReadableSearchState.mockReturnValueOnce({
85
- readableQueryString: 'readable search state',
86
- readableQuery: []
97
+ it('should render readable new search state and open it on click correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
98
+ var props, user;
99
+ return __generator(this, function (_a) {
100
+ switch (_a.label) {
101
+ case 0:
102
+ props = {
103
+ data: {
104
+ uri: 'activities/504c-9876-79bc2a96',
105
+ user: 'polina.arsenteva',
106
+ label: 'USER_SEARCH',
107
+ description: '{"activity":{"query":"filter=equals(type%2C\'configuration%2FentityTypes%2FHCP\')&options=searchByOv%2CovOnly","uiState":{"view":{"searchResultsMode":"table","entityTypeTab":"configuration/entityTypes/HCP", "previewPanelMode":null},"facets":{"type":{"fieldName":"type","values":["configuration/entityTypes/HCP"]}, "attributes.FirstName":{"fieldName":"attributes.FirstName","values":["Alex"],"entityTypeUri":"configuration/entityTypes/HCP"}},"advanced":[],"searchOptions":{"searchByOv":true,"ovOnly":true},"keyword":null,"map":null,"version":"2.0"}},"version":"2.0"}',
108
+ timestamp: 1626952820539
109
+ },
110
+ type: types_1.ActivityTypes.USER_SEARCH
111
+ };
112
+ user = setUp({ props: props }).user;
113
+ return [4 /*yield*/, user.click(react_2.screen.getByText('HCP: First Name = "Alex"'))];
114
+ case 1:
115
+ _a.sent();
116
+ expect(mdmActions.openSearch).toHaveBeenCalledWith({
117
+ advanced: [],
118
+ facets: {
119
+ 'attributes.FirstName': {
120
+ entityTypeUri: 'configuration/entityTypes/HCP',
121
+ fieldName: 'attributes.FirstName',
122
+ values: ['Alex']
123
+ },
124
+ type: { fieldName: 'type', values: ['configuration/entityTypes/HCP'] }
125
+ },
126
+ keyword: null,
127
+ map: null,
128
+ searchOptions: { ovOnly: true, searchByOv: true },
129
+ version: '2.0',
130
+ view: { entityTypeTab: 'configuration/entityTypes/HCP', previewPanelMode: null, searchResultsMode: 'table' }
131
+ });
132
+ return [2 /*return*/];
133
+ }
87
134
  });
88
- var data = {
89
- uri: 'activities/1763-bf44-daeb9d6e',
90
- user: 'polina.arsenteva',
91
- label: 'USER_SEARCH',
92
- description: '{"keyword":null,"isRawFilter":false,"facets":[{"facetClass":"com.reltio.plugins.search.dev.TenantSearchFacet","title":"Tenants","isCollapsed":false,"isClosable":false,"dataTenant":null,"additional":false,"hideForDataTenant":false,"mainTenant":{"label":"RLT-L-KN01:knesterov:1598853767343","id":"uitest2","name":"uitest2"},"currentTenant":"uitest2","fieldName":"tenants"},{"facetClass":"com.reltio.plugins.search.dev.EntityTypeSearchFacet","title":"Entity Types","isCollapsed":false,"isClosable":false,"dataTenant":null,"additional":false,"hideForDataTenant":false,"values":[],"fieldName":"type","includeFilter":null,"typeAhead":false,"pageSize":100,"showAllEntityTypes":false},{"facetClass":"com.reltio.plugins.search.dev.RoleSearchFacet","title":"Roles","isCollapsed":false,"isClosable":false,"dataTenant":null,"additional":false,"hideForDataTenant":false,"values":[],"fieldName":"roles","includeFilter":[],"typeAhead":true,"pageSize":7},{"facetClass":"com.reltio.plugins.search.dev.SearchFacetWithCheckboxes","title":"Tags","isCollapsed":false,"isClosable":false,"dataTenant":null,"additional":false,"hideForDataTenant":false,"values":["some text"],"fieldName":"tags","includeFilter":null,"typeAhead":true,"pageSize":7}],"forTenant":"uitest2","model":{"tags":{"labels":["some text"],"filter":null}},"view":{"mode":"NoPreview","tabs":[]}}',
93
- timestamp: 1626956152002,
94
- items: [
95
- {
96
- id: '306gpUsj',
97
- user: 'polina.arsenteva',
98
- method: 'POST',
99
- url: '/reltio/api/uitest2/activities',
100
- clientType: 'Reltio UI',
101
- timestamp: 1626956152002
102
- }
103
- ],
104
- itemsTotal: 1
105
- };
106
- var wrapper = setUp({ data: data, type: types_1.ActivityTypes.USER_SEARCH });
107
- expect(wrapper.find('.link').text()).toBe('readable search state');
108
- var searchState = {
109
- keyword: null,
110
- isRawFilter: false,
111
- facets: [
112
- {
113
- facetClass: 'com.reltio.plugins.search.dev.TenantSearchFacet',
114
- title: 'Tenants',
115
- isCollapsed: false,
116
- isClosable: false,
117
- dataTenant: null,
118
- additional: false,
119
- hideForDataTenant: false,
120
- mainTenant: {
121
- label: 'RLT-L-KN01:knesterov:1598853767343',
122
- id: 'uitest2',
123
- name: 'uitest2'
124
- },
125
- currentTenant: 'uitest2',
126
- fieldName: 'tenants'
127
- },
128
- {
129
- facetClass: 'com.reltio.plugins.search.dev.EntityTypeSearchFacet',
130
- title: 'Entity Types',
131
- isCollapsed: false,
132
- isClosable: false,
133
- dataTenant: null,
134
- additional: false,
135
- hideForDataTenant: false,
136
- values: [],
137
- fieldName: 'type',
138
- includeFilter: null,
139
- typeAhead: false,
140
- pageSize: 100,
141
- showAllEntityTypes: false
142
- },
143
- {
144
- facetClass: 'com.reltio.plugins.search.dev.RoleSearchFacet',
145
- title: 'Roles',
146
- isCollapsed: false,
147
- isClosable: false,
148
- dataTenant: null,
149
- additional: false,
150
- hideForDataTenant: false,
151
- values: [],
152
- fieldName: 'roles',
153
- includeFilter: [],
154
- typeAhead: true,
155
- pageSize: 7
156
- },
157
- {
158
- facetClass: 'com.reltio.plugins.search.dev.SearchFacetWithCheckboxes',
159
- title: 'Tags',
160
- isCollapsed: false,
161
- isClosable: false,
162
- dataTenant: null,
163
- additional: false,
164
- hideForDataTenant: false,
165
- values: ['some text'],
166
- fieldName: 'tags',
167
- includeFilter: null,
168
- typeAhead: true,
169
- pageSize: 7
170
- }
171
- ],
172
- forTenant: 'uitest2',
173
- model: {
174
- tags: {
175
- labels: ['some text'],
176
- filter: null
177
- }
178
- },
179
- view: {
180
- mode: 'NoPreview',
181
- tabs: []
135
+ }); });
136
+ it('should render readable old search state and open it on click correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
137
+ var props, user;
138
+ return __generator(this, function (_a) {
139
+ switch (_a.label) {
140
+ case 0:
141
+ props = {
142
+ data: {
143
+ uri: 'activities/1763-bf44-daeb9d6e',
144
+ user: 'polina.arsenteva',
145
+ label: 'USER_SEARCH',
146
+ description: '{"keyword":null,"isRawFilter":false,"facets":[{"facetClass":"com.reltio.plugins.search.dev.SearchFacetWithCheckboxes","title":"Tags","values":["tag"],"fieldName":"tags"}],"forTenant":"alenat","model":{"tags":{"labels":["tag"],"filter":null}},"view":{"mode":"NoPreview","tabs":[]}}',
147
+ timestamp: 1626956152002
148
+ },
149
+ type: types_1.ActivityTypes.USER_SEARCH
150
+ };
151
+ user = setUp({ props: props }).user;
152
+ return [4 /*yield*/, user.click(react_2.screen.getByText('Tags = "tag"'))];
153
+ case 1:
154
+ _a.sent();
155
+ expect(mdmActions.openSearch).toHaveBeenCalledWith({
156
+ facets: [
157
+ {
158
+ facetClass: 'com.reltio.plugins.search.dev.SearchFacetWithCheckboxes',
159
+ fieldName: 'tags',
160
+ title: 'Tags',
161
+ values: ['tag']
162
+ }
163
+ ],
164
+ forTenant: 'alenat',
165
+ isRawFilter: false,
166
+ keyword: null,
167
+ model: { tags: { filter: null, labels: ['tag'] } },
168
+ view: { mode: 'NoPreview', tabs: [] }
169
+ });
170
+ return [2 /*return*/];
182
171
  }
183
- };
184
- expect(useReadableSearchState_1.useReadableSearchState).toHaveBeenCalledWith(searchState);
185
- wrapper.find('.link').simulate('click');
186
- expect(openSearch).toHaveBeenCalledWith(searchState);
187
- });
172
+ });
173
+ }); });
188
174
  it('should render all profiles if readable search state is empty', function () {
189
- useReadableSearchState_1.useReadableSearchState.mockReturnValueOnce({ readableQueryString: '', readableQuery: [] });
190
- var data = {
191
- uri: 'activities/504c-9876-79bc2a96',
192
- user: 'polina.arsenteva',
193
- label: 'USER_SEARCH',
194
- description: '{"activity":{"query":"filter=equals(type%2C\'configuration%2FentityTypes%2FHCP\')&options=searchByOv%2CovOnly","uiState":{"view":{"searchResultsMode":"table","entityTypeTab":"configuration/entityTypes/HCP", "previewPanelMode":null},"facets":{"type":{"fieldName":"type","values":["configuration/entityTypes/HCP"]}},"advanced":[],"searchOptions":{"searchByOv":true,"ovOnly":true},"keyword":null,"map":null,"version":"2.0"}},"version":"2.0"}',
195
- timestamp: 1626952820539,
196
- items: [
197
- {
198
- id: '3ZOMTE6R',
199
- user: 'polina.arsenteva',
200
- method: 'POST',
201
- url: '/reltio/api/sokol/activities',
202
- clientType: 'Reltio UI',
203
- timestamp: 1626952820539
204
- }
205
- ],
206
- itemsTotal: 1
175
+ var props = {
176
+ data: {
177
+ uri: 'activities/504c-9876-79bc2a96',
178
+ user: 'polina.arsenteva',
179
+ label: 'USER_SEARCH',
180
+ 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"}',
181
+ timestamp: 1626952820539
182
+ },
183
+ type: types_1.ActivityTypes.USER_SEARCH
207
184
  };
208
- var wrapper = setUp({ data: data, type: types_1.ActivityTypes.USER_SEARCH });
209
- expect(wrapper.find('.link').text()).toBe('all profiles');
185
+ setUp({ props: props });
186
+ react_2.screen.getByText('all profiles');
210
187
  });
211
188
  });