@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,131 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- var react_1 = __importDefault(require("react"));
18
- var enzyme_1 = require("enzyme");
19
- var test_utils_1 = require("react-dom/test-utils");
20
- var mdm_sdk_1 = require("@reltio/mdm-sdk");
21
- var types_1 = require("../types");
22
- var SmallIconButton_1 = require("../../../SmallIconButton");
23
- var ActivityFilterEditor_1 = require("../ActivityFilterEditor");
24
- var ActivityFilterButton_1 = require("./ActivityFilterButton");
25
- describe('ActivityFilterButton tests', function () {
26
- var filter = {
27
- users: [],
28
- activities: [],
29
- dateRange: {
30
- type: mdm_sdk_1.DateRangeTypes.WITHIN,
31
- period: [4, 'month']
32
- }
33
- };
34
- var props = {
35
- filter: filter,
36
- entityType: {
37
- uri: 'configuration/entityTypes/Contact',
38
- label: 'Contact',
39
- attributes: []
40
- },
41
- onChange: jest.fn()
42
- };
43
- it('should render correctly', function () {
44
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivityFilterButton_1.ActivityFilterButton, __assign({}, props)));
45
- var button = wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip);
46
- expect(button).toHaveLength(1);
47
- expect(button.hasClass('activeIcon')).toBe(false);
48
- expect(wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).props()).toMatchObject({
49
- open: false,
50
- value: props.filter,
51
- entityType: props.entityType
52
- });
53
- });
54
- it('should have active filter icon if filter changed', function () {
55
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivityFilterButton_1.ActivityFilterButton, __assign({}, props)));
56
- expect(wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip).hasClass('activeIcon')).toBe(false);
57
- wrapper.setProps({ filter: __assign(__assign({}, filter), { users: ['123'] }) });
58
- expect(wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip).hasClass('activeIcon')).toBe(true);
59
- });
60
- it('should open editor on button click', function () {
61
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivityFilterButton_1.ActivityFilterButton, __assign({}, props)));
62
- expect(wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('open')).toBe(false);
63
- (0, test_utils_1.act)(function () {
64
- wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip).simulate('click');
65
- });
66
- expect(wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('open')).toBe(true);
67
- });
68
- it('should call props.onChange and close editor when ActivityFilterEditor onApply is invoke', function () {
69
- var newFilterValue = {
70
- users: ['ivanov'],
71
- activities: [types_1.ActivityTypes.MODEL_UPDATED],
72
- dateRange: {
73
- type: mdm_sdk_1.DateRangeTypes.AGO,
74
- period: [1, 'day']
75
- }
76
- };
77
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivityFilterButton_1.ActivityFilterButton, __assign({}, props)));
78
- (0, test_utils_1.act)(function () {
79
- wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip).simulate('click');
80
- });
81
- expect(wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('open')).toBe(true);
82
- (0, test_utils_1.act)(function () {
83
- wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('onApply')(newFilterValue);
84
- });
85
- expect(props.onChange).toHaveBeenCalledWith(newFilterValue);
86
- expect(wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('open')).toBe(false);
87
- });
88
- it('should call props.onChange with correct filter if dateRange is not valid', function () {
89
- var newFilterValue = {
90
- users: ['ivanov'],
91
- activities: [types_1.ActivityTypes.MODEL_UPDATED],
92
- dateRange: {
93
- type: mdm_sdk_1.DateRangeTypes.AGO,
94
- period: [null, 'day']
95
- }
96
- };
97
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivityFilterButton_1.ActivityFilterButton, __assign({}, props)));
98
- (0, test_utils_1.act)(function () {
99
- wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip).simulate('click');
100
- });
101
- expect(wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('open')).toBe(true);
102
- (0, test_utils_1.act)(function () {
103
- wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('onApply')(newFilterValue);
104
- });
105
- expect(props.onChange).toHaveBeenCalledWith({
106
- users: ['ivanov'],
107
- activities: [types_1.ActivityTypes.MODEL_UPDATED],
108
- dateRange: props.filter.dateRange
109
- });
110
- expect(wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('open')).toBe(false);
111
- });
112
- it('should close editor when ActivityFilterEditor onCancel is invoke', function () {
113
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivityFilterButton_1.ActivityFilterButton, __assign({}, props)));
114
- (0, test_utils_1.act)(function () {
115
- wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip).simulate('click');
116
- });
117
- expect(wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('open')).toBe(true);
118
- (0, test_utils_1.act)(function () {
119
- wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('onCancel')();
120
- });
121
- expect(wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('open')).toBe(false);
122
- });
123
- it('should clear filter when ActivityFilterEditor onClear is invoke', function () {
124
- var initialFilter = props.filter;
125
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivityFilterButton_1.ActivityFilterButton, __assign({}, props)));
126
- (0, test_utils_1.act)(function () {
127
- wrapper.find(ActivityFilterEditor_1.ActivityFilterEditor).prop('onClear')();
128
- });
129
- expect(props.onChange).toHaveBeenCalledWith(__assign({}, initialFilter));
130
- });
131
- });
@@ -1,252 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __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
- };
49
- var __importDefault = (this && this.__importDefault) || function (mod) {
50
- return (mod && mod.__esModule) ? mod : { "default": mod };
51
- };
52
- Object.defineProperty(exports, "__esModule", { value: true });
53
- var react_1 = __importDefault(require("react"));
54
- var react_2 = require("@testing-library/react");
55
- var user_event_1 = __importDefault(require("@testing-library/user-event"));
56
- var mdm_sdk_1 = require("@reltio/mdm-sdk");
57
- var ActivityFilterEditor_1 = require("./ActivityFilterEditor");
58
- var editor_test_data_1 = require("./editor.test-data");
59
- var MdmModuleContext_1 = require("../../../contexts/MdmModuleContext");
60
- var types_1 = require("../types");
61
- jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getAllUsersForTenant: jest.fn() })); });
62
- describe('ActivityFilterEditor tests', function () {
63
- var defaultProps = {
64
- value: editor_test_data_1.value,
65
- open: true,
66
- anchorEl: document.createElement('div'),
67
- onApply: jest.fn(),
68
- onCancel: jest.fn(),
69
- onClear: jest.fn()
70
- };
71
- var setUp = function (props) {
72
- if (props === void 0) { props = {}; }
73
- var user = user_event_1.default.setup();
74
- var Providers = function (_a) {
75
- var children = _a.children;
76
- return (react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: { metadata: editor_test_data_1.metadata } }, children));
77
- };
78
- return __assign({ user: user }, (0, react_2.render)(react_1.default.createElement(ActivityFilterEditor_1.ActivityFilterEditor, __assign({}, defaultProps, props)), { wrapper: Providers }));
79
- };
80
- beforeAll(function () {
81
- mdm_sdk_1.getAllUsersForTenant.mockResolvedValue(editor_test_data_1.usersResponse);
82
- });
83
- beforeEach(function () {
84
- jest.clearAllMocks();
85
- });
86
- it('should render correct default state', function () {
87
- setUp();
88
- var activitySelector = react_2.screen.getByTestId('activity-selector');
89
- expect((0, react_2.within)(activitySelector).getByText('Activity')).toBeInTheDocument();
90
- expect((0, react_2.within)(activitySelector).getByText('Model was updated')).toBeInTheDocument();
91
- expect((0, react_2.within)(activitySelector).getByText('Comment added')).toBeInTheDocument();
92
- var dateRangeSelector = react_2.screen.getByTestId('date-range-selector');
93
- expect((0, react_2.within)(dateRangeSelector).getByText('Date')).toBeInTheDocument();
94
- expect((0, react_2.within)(dateRangeSelector).getByText('Within the last')).toBeInTheDocument();
95
- expect((0, react_2.within)(dateRangeSelector).getAllByRole('spinbutton')[0]).toHaveValue(4);
96
- var userSelector = react_2.screen.getByTestId('user-selector');
97
- expect((0, react_2.within)(userSelector).getByText('User')).toBeInTheDocument();
98
- expect((0, react_2.within)(userSelector).getByText('username1')).toBeInTheDocument();
99
- expect((0, react_2.within)(userSelector).getByText('username2')).toBeInTheDocument();
100
- expect(react_2.screen.queryByTestId('entity-types-selector')).not.toBeInTheDocument();
101
- expect(react_2.screen.queryByTestId('attribute-selector')).not.toBeInTheDocument();
102
- expect(react_2.screen.queryByTestId('source-selector')).not.toBeInTheDocument();
103
- expect(react_2.screen.getByText('Clear all')).toBeInTheDocument();
104
- expect(react_2.screen.getByText('Cancel')).toBeInTheDocument();
105
- expect(react_2.screen.getByText('Apply')).toBeInTheDocument();
106
- });
107
- it('should render correct default state for ENTITY_CHANGED', function () {
108
- var filterValue = __assign(__assign({}, editor_test_data_1.value), { activities: [types_1.ActivityTypes.ENTITY_CHANGED] });
109
- var entityType = { uri: 'test', attributes: [] };
110
- setUp({ value: filterValue, entityType: entityType });
111
- expect(react_2.screen.getByTestId('activity-selector')).toBeInTheDocument();
112
- expect(react_2.screen.queryByTestId('entity-types-selector')).not.toBeInTheDocument();
113
- expect(react_2.screen.getByTestId('date-range-selector')).toBeInTheDocument();
114
- expect(react_2.screen.getByTestId('user-selector')).toBeInTheDocument();
115
- var attributeSelector = react_2.screen.getByTestId('attribute-selector');
116
- expect((0, react_2.within)(attributeSelector).getByText('Attribute')).toBeInTheDocument();
117
- expect((0, react_2.within)(attributeSelector).getByText('Activity')).toBeInTheDocument();
118
- var sourceSelector = react_2.screen.getByTestId('source-selector');
119
- expect((0, react_2.within)(sourceSelector).getByText('Source')).toBeInTheDocument();
120
- expect((0, react_2.within)(sourceSelector).getByText('Reltio')).toBeInTheDocument();
121
- });
122
- it('should hide filter when props.open = false', function () {
123
- var container = setUp({ open: false }).container;
124
- expect(container).toBeEmptyDOMElement();
125
- });
126
- it('should clear current value and call props.onClear on Clear all button click', function () { return __awaiter(void 0, void 0, void 0, function () {
127
- var user, userSelector, activitySelector;
128
- return __generator(this, function (_a) {
129
- switch (_a.label) {
130
- case 0:
131
- user = setUp().user;
132
- userSelector = react_2.screen.getByTestId('user-selector');
133
- expect((0, react_2.within)(userSelector).getByText('username1')).toBeInTheDocument();
134
- activitySelector = react_2.screen.getByTestId('activity-selector');
135
- expect((0, react_2.within)(activitySelector).getByText('Model was updated')).toBeInTheDocument();
136
- return [4 /*yield*/, user.click(react_2.screen.getByText('Clear all'))];
137
- case 1:
138
- _a.sent();
139
- expect((0, react_2.within)(userSelector).queryByText('username1')).not.toBeInTheDocument();
140
- expect((0, react_2.within)(userSelector).queryByText('username2')).not.toBeInTheDocument();
141
- expect((0, react_2.within)(activitySelector).queryByText('Model was updated')).not.toBeInTheDocument();
142
- expect((0, react_2.within)(activitySelector).queryByText('Comment added')).not.toBeInTheDocument();
143
- expect(defaultProps.onClear).toHaveBeenCalled();
144
- return [2 /*return*/];
145
- }
146
- });
147
- }); });
148
- it('should call onCancel when click on Cancel button', function () { return __awaiter(void 0, void 0, void 0, function () {
149
- var user;
150
- return __generator(this, function (_a) {
151
- switch (_a.label) {
152
- case 0:
153
- user = setUp().user;
154
- return [4 /*yield*/, user.click(react_2.screen.getByText('Cancel'))];
155
- case 1:
156
- _a.sent();
157
- expect(defaultProps.onCancel).toHaveBeenCalled();
158
- return [2 /*return*/];
159
- }
160
- });
161
- }); });
162
- it('should call onApply when click on Apply button', function () { return __awaiter(void 0, void 0, void 0, function () {
163
- var user;
164
- return __generator(this, function (_a) {
165
- switch (_a.label) {
166
- case 0:
167
- user = setUp().user;
168
- return [4 /*yield*/, user.type(react_2.screen.getAllByRole('spinbutton')[0], '5')];
169
- case 1:
170
- _a.sent();
171
- return [4 /*yield*/, user.click(react_2.screen.getByText('Apply'))];
172
- case 2:
173
- _a.sent();
174
- expect(defaultProps.onApply).toHaveBeenCalledWith(__assign(__assign({}, defaultProps.value), { dateRange: {
175
- type: mdm_sdk_1.DateRangeTypes.WITHIN,
176
- period: [45, 'month']
177
- } }));
178
- return [2 /*return*/];
179
- }
180
- });
181
- }); });
182
- it('should correctly change filter onPropChange calls', function () { return __awaiter(void 0, void 0, void 0, function () {
183
- var filterValue, entityType, user, attributeSelector;
184
- return __generator(this, function (_a) {
185
- switch (_a.label) {
186
- case 0:
187
- filterValue = __assign(__assign({}, editor_test_data_1.value), { activities: [types_1.ActivityTypes.ENTITY_CHANGED] });
188
- entityType = editor_test_data_1.metadata.entityTypes[1];
189
- user = setUp({ value: filterValue, entityType: entityType }).user;
190
- attributeSelector = react_2.screen.getByTestId('attribute-selector');
191
- return [4 /*yield*/, user.click((0, react_2.within)(attributeSelector).getByRole('combobox'))];
192
- case 1:
193
- _a.sent();
194
- return [4 /*yield*/, user.click(react_2.screen.getByRole('menuitem', { name: 'Activity' }))];
195
- case 2:
196
- _a.sent();
197
- return [4 /*yield*/, user.click(react_2.screen.getByText('Apply'))];
198
- case 3:
199
- _a.sent();
200
- expect(defaultProps.onApply).toHaveBeenCalledWith(__assign(__assign({}, filterValue), { attributes: [] }));
201
- return [2 /*return*/];
202
- }
203
- });
204
- }); });
205
- it('should clear attributes on entityTypes filter changes', function () { return __awaiter(void 0, void 0, void 0, function () {
206
- var filterValue, user, entityTypeSelector, newEntityTypes;
207
- return __generator(this, function (_a) {
208
- switch (_a.label) {
209
- case 0:
210
- filterValue = __assign(__assign({}, editor_test_data_1.value), { activities: [types_1.ActivityTypes.ENTITY_CHANGED] });
211
- user = setUp({ value: filterValue }).user;
212
- entityTypeSelector = react_2.screen.getByTestId('entity-types-selector');
213
- return [4 /*yield*/, user.click((0, react_2.within)(entityTypeSelector).getByRole('combobox'))];
214
- case 1:
215
- _a.sent();
216
- return [4 /*yield*/, user.click(react_2.screen.getByRole('option', { name: 'HCA' }))];
217
- case 2:
218
- _a.sent();
219
- newEntityTypes = [editor_test_data_1.metadata.entityTypes[1]];
220
- return [4 /*yield*/, user.click(react_2.screen.getByText('Apply'))];
221
- case 3:
222
- _a.sent();
223
- expect(defaultProps.onApply).toHaveBeenCalledWith(__assign(__assign({}, filterValue), { entityTypes: newEntityTypes, attributes: [] }));
224
- return [2 /*return*/];
225
- }
226
- });
227
- }); });
228
- it('should clear attributes, entityTypes, sources on activities filter changes', function () { return __awaiter(void 0, void 0, void 0, function () {
229
- var filterValue, entityType, user, activitySelector, textbox;
230
- return __generator(this, function (_a) {
231
- switch (_a.label) {
232
- case 0:
233
- filterValue = __assign(__assign({}, editor_test_data_1.value), { activities: [] });
234
- entityType = { uri: 'test', attributes: [] };
235
- user = setUp({ value: filterValue, entityType: entityType }).user;
236
- activitySelector = react_2.screen.getByTestId('activity-selector');
237
- textbox = (0, react_2.within)(activitySelector).getByRole('combobox');
238
- return [4 /*yield*/, user.click(textbox)];
239
- case 1:
240
- _a.sent();
241
- return [4 /*yield*/, user.click(react_2.screen.getByText('Profile updated'))];
242
- case 2:
243
- _a.sent();
244
- return [4 /*yield*/, user.click(react_2.screen.getByText('Apply'))];
245
- case 3:
246
- _a.sent();
247
- expect(defaultProps.onApply).toHaveBeenCalledWith(__assign(__assign({}, filterValue), { activities: [types_1.ActivityTypes.ENTITY_CHANGED], attributes: [], sources: [], entityTypes: [] }));
248
- return [2 /*return*/];
249
- }
250
- });
251
- }); });
252
- });
@@ -1,158 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
- if (ar || !(i in from)) {
16
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
- ar[i] = from[i];
18
- }
19
- }
20
- return to.concat(ar || Array.prototype.slice.call(from));
21
- };
22
- var __importDefault = (this && this.__importDefault) || function (mod) {
23
- return (mod && mod.__esModule) ? mod : { "default": mod };
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- var react_1 = __importDefault(require("react"));
27
- var enzyme_1 = require("enzyme");
28
- var ramda_1 = require("ramda");
29
- var react_select_1 = __importDefault(require("react-select"));
30
- var Typography_1 = __importDefault(require("@mui/material/Typography"));
31
- var types_1 = require("../../../types");
32
- var MultiSelect_1 = require("../../../../../MultiSelect");
33
- var helpers_1 = require("../../helpers");
34
- var ActivitySelector_1 = require("./ActivitySelector");
35
- var options = [
36
- { value: 'COMMENT_ADDED', label: 'Comment added' },
37
- { value: 'COMMENT_DELETED', label: 'Comment deleted' },
38
- { value: 'COMMENT_UPDATED', label: 'Comment updated' },
39
- { value: 'ENTITIES_MERGED', label: 'Profile merged' },
40
- { value: 'ENTITIES_MERGED_MANUALLY', label: 'Profile merged manually' },
41
- { value: 'ENTITIES_MERGED_ON_THE_FLY', label: 'Profile merged on the fly' },
42
- { value: 'ENTITIES_SPLITTED', label: 'Profile un-merged' },
43
- { value: 'ENTITY_CHANGED', label: 'Profile updated' },
44
- { value: 'ENTITY_CREATED', label: 'Profile created' },
45
- { value: 'ENTITY_LOST_MERGE', label: 'Profile lost merge' },
46
- { value: 'ENTITY_REMOVED', label: 'Profile removed' },
47
- { value: 'MODEL_UPDATED', label: 'Model was updated' },
48
- { value: 'NOT_MATCHES_RESET', label: 'Not matches reset' },
49
- { value: 'NOT_MATCHES_SET', label: 'Not matches set' },
50
- { value: 'PERIODIC_TASK_SCHEDULED', label: 'Periodic task was scheduled' },
51
- { value: 'POTENTIAL_MATCHES_FOUND', label: 'Potential matches found' },
52
- { value: 'POTENTIAL_MATCHES_REMOVED', label: 'Potential matches removed' },
53
- { value: 'RELATIONSHIP_CHANGED', label: 'Relationship updated' },
54
- { value: 'RELATIONSHIP_CREATED', label: 'Relationship created' },
55
- { value: 'RELATIONSHIP_REMOVED', label: 'Relationship removed' },
56
- { value: 'USER_LOGIN', label: 'Logged in' },
57
- { value: 'USER_LOGOUT', label: 'Logged out' },
58
- { value: 'USER_PROFILE_VIEW', label: 'Profile viewed' },
59
- { value: 'USER_SEARCH', label: 'Searched' },
60
- { value: 'ANALYTICS_ATTRIBUTES_CHANGED', label: 'Analytics attribute changed' },
61
- { value: 'SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE', label: 'SFDC connector synchronization issue' }
62
- ];
63
- var profileOptions = [
64
- { value: 'ENTITIES_MERGED', label: 'Profile merged' },
65
- { value: 'ENTITIES_SPLITTED', label: 'Profile un-merged' },
66
- { value: 'ENTITY_CHANGED', label: 'Profile updated' },
67
- { value: 'ENTITY_CREATED', label: 'Profile created' },
68
- { value: 'NOT_MATCHES_RESET', label: 'Not matches reset' },
69
- { value: 'NOT_MATCHES_SET', label: 'Not matches set' },
70
- { value: 'POTENTIAL_MATCHES_FOUND', label: 'Potential matches found' },
71
- { value: 'POTENTIAL_MATCHES_REMOVED', label: 'Potential matches removed' },
72
- { value: 'RELATIONSHIP_CHANGED', label: 'Relationship updated' },
73
- { value: 'RELATIONSHIP_CREATED', label: 'Relationship created' },
74
- { value: 'RELATIONSHIP_REMOVED', label: 'Relationship removed' },
75
- { value: 'ENTITIES_MERGED_MANUALLY', label: 'Profile merged manually' },
76
- { value: 'ENTITIES_MERGED_ON_THE_FLY', label: 'Profile merged on the fly' },
77
- { value: 'ENTITY_LOST_MERGE', label: 'Profile lost merge' }
78
- ];
79
- var groupOptions = [
80
- { value: 'GROUP_CHANGED', label: 'Group updated' },
81
- { value: 'GROUP_CREATED', label: 'Group created' },
82
- { value: 'GROUP_REMOVED', label: 'Group removed' }
83
- ];
84
- var metadata = { entityTypes: [] };
85
- describe('ActivitySelector tests', function () {
86
- var props = {
87
- activityTypes: (0, helpers_1.getSelectorActivityTypes)(metadata),
88
- selectedActivityTypes: [types_1.ActivityTypes.MODEL_UPDATED, types_1.ActivityTypes.COMMENT_ADDED],
89
- onChange: jest.fn()
90
- };
91
- var sortOptionsByLabel = (0, ramda_1.sortBy)((0, ramda_1.prop)('label'));
92
- it('should render correct default state', function () {
93
- var selectedOptions = [
94
- { value: 'MODEL_UPDATED', label: 'Model was updated' },
95
- { value: 'COMMENT_ADDED', label: 'Comment added' }
96
- ];
97
- var wrapper = (0, enzyme_1.mount)(react_1.default.createElement(ActivitySelector_1.ActivitySelector, __assign({}, props)));
98
- expect(wrapper.find(Typography_1.default).filterWhere(function (component) { return component.text() === 'Activity'; }).length).toBe(1);
99
- expect(wrapper.find('.selectorHint')).toHaveLength(0);
100
- var select = wrapper.find(MultiSelect_1.MultiSelect);
101
- expect(select.length).toBe(1);
102
- expect(sortOptionsByLabel(select.prop('options'))).toEqual(sortOptionsByLabel(options));
103
- var isSearchableProp = wrapper.find(react_select_1.default).prop('isSearchable');
104
- expect((0, ramda_1.isNil)(isSearchableProp) || isSearchableProp).toBe(true);
105
- expect(sortOptionsByLabel(select.prop('value'))).toEqual(sortOptionsByLabel(selectedOptions));
106
- });
107
- it('should render group options if metadata has not empty groupTypes', function () {
108
- var metadata = {
109
- entityTypes: [],
110
- groupTypes: [
111
- {
112
- uri: 'test',
113
- dataLabel: '',
114
- dataLabelPattern: '',
115
- dataTooltipPattern: '',
116
- description: '',
117
- groupElements: {
118
- entityTypeURIs: [],
119
- uri: ''
120
- },
121
- hasPrimaryMember: false,
122
- label: '',
123
- memberTypes: [],
124
- multiplePrimaryMembers: false,
125
- type: ''
126
- }
127
- ]
128
- };
129
- var fullOptions = sortOptionsByLabel(__spreadArray(__spreadArray([], options, true), groupOptions, true));
130
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivitySelector_1.ActivitySelector, __assign({}, props, { activityTypes: (0, helpers_1.getSelectorActivityTypes)(metadata) })));
131
- expect(sortOptionsByLabel(wrapper.find(MultiSelect_1.MultiSelect).prop('options'))).toEqual(fullOptions);
132
- });
133
- it('should render profile options if entityType passed', function () {
134
- var metadata = {
135
- entityTypes: []
136
- };
137
- var activityTypes = (0, helpers_1.getSelectorActivityTypes)(metadata, { attributes: [], uri: '' });
138
- var fullOptions = sortOptionsByLabel(profileOptions);
139
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivitySelector_1.ActivitySelector, __assign({}, props, { activityTypes: activityTypes })));
140
- expect(sortOptionsByLabel(wrapper.find(MultiSelect_1.MultiSelect).prop('options'))).toEqual(fullOptions);
141
- });
142
- it('should call onChange when new option is selected', function () {
143
- var newValues = [
144
- { value: 'COMMENT_UPDATED', label: 'Comment updated' },
145
- { value: 'NOT_MATCHES_RESET', label: 'Not matches reset' }
146
- ];
147
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivitySelector_1.ActivitySelector, __assign({}, props)));
148
- var select = wrapper.find(MultiSelect_1.MultiSelect);
149
- select.prop('onChange')(newValues);
150
- expect(props.onChange).toHaveBeenCalledWith(['COMMENT_UPDATED', 'NOT_MATCHES_RESET']);
151
- });
152
- it('should show hint if activities length more then one and includes ENTITY_CHANGED', function () {
153
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ActivitySelector_1.ActivitySelector, __assign({}, props, { selectedActivityTypes: [types_1.ActivityTypes.ENTITY_CHANGED, types_1.ActivityTypes.NOT_MATCHES_RESET] })));
154
- var hint = wrapper.find('.selectorHint');
155
- expect(hint).toHaveLength(1);
156
- expect(hint.text()).toBe('One at a time! Select a single Activity and any of its filters -OR- multiple Activities with no filters.');
157
- });
158
- });