@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
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useStyles = void 0;
4
+ var styles_1 = require("@mui/styles");
5
+ var constants_1 = require("../../constants");
6
+ exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
7
+ circle: {
8
+ strokeWidth: '2px',
9
+ fill: '#EEEEEE',
10
+ stroke: '#EEEEEE',
11
+ transition: 'fill ease-in-out 0.3s'
12
+ },
13
+ activeCircle: {
14
+ fill: constants_1.PRIMARY_COLOR
15
+ },
16
+ dimmedCircle: {
17
+ fill: constants_1.DIMMED_COLOR
18
+ },
19
+ link: {
20
+ stroke: constants_1.PRIMARY_COLOR,
21
+ strokeWidth: '2px',
22
+ transition: 'stroke ease-in-out 0.3s'
23
+ },
24
+ dimmedLine: {
25
+ stroke: constants_1.DIMMED_COLOR
26
+ }
27
+ }); });
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { ScaleBand } from 'd3-scale';
3
+ import { DataSet } from '../../types';
4
+ type Props = {
5
+ sets: DataSet[];
6
+ width: number;
7
+ yScale: ScaleBand<string>;
8
+ labels: string[];
9
+ transform?: string;
10
+ hoverAreaWidth: number;
11
+ hoveredElements?: string[];
12
+ onSetHover: (set: DataSet) => void;
13
+ };
14
+ export declare const SetsChart: ({ sets, width, yScale, transform, labels, hoveredElements, hoverAreaWidth, onSetHover }: Props) => React.JSX.Element;
15
+ export {};
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.SetsChart = void 0;
27
+ var react_1 = __importStar(require("react"));
28
+ var d3_scale_1 = require("d3-scale");
29
+ var SetsChartAxis_1 = require("../SetsChartAxis");
30
+ var constants_1 = require("../../constants");
31
+ var styles_1 = require("./styles");
32
+ var SetsChart = function (_a) {
33
+ var sets = _a.sets, width = _a.width, yScale = _a.yScale, transform = _a.transform, labels = _a.labels, hoveredElements = _a.hoveredElements, hoverAreaWidth = _a.hoverAreaWidth, onSetHover = _a.onSetHover;
34
+ var styles = (0, styles_1.useStyles)();
35
+ var containerRef = react_1.default.useRef(null);
36
+ var xScale = (0, react_1.useMemo)(function () {
37
+ var maxSetSize = sets.length > 0 ? Math.max.apply(Math, sets.map(function (set) { return set.size; })) : 0;
38
+ return (0, d3_scale_1.scaleLinear)().domain([0, maxSetSize]).range([0, width]);
39
+ }, [width, sets]);
40
+ return (react_1.default.createElement("g", { ref: containerRef, transform: transform },
41
+ react_1.default.createElement(SetsChartAxis_1.SetsChartAxis, { width: width }),
42
+ sets.map(function (set, i) {
43
+ var name = set.name, size = set.size, elements = set.elements;
44
+ var label = labels[i];
45
+ var height = yScale.bandwidth();
46
+ var y = yScale(name) + height / 2 - constants_1.SET_BAR_HEIGHT / 2;
47
+ var lineY = yScale(name) + height;
48
+ var barSize = hoveredElements ? elements.filter(function (el) { return hoveredElements.includes(el); }).length : size;
49
+ return (react_1.default.createElement("g", { key: "set-group-".concat(i) },
50
+ react_1.default.createElement("rect", { className: styles.setsBarBackground, x: 0, y: y, width: width, height: constants_1.SET_BAR_HEIGHT }),
51
+ react_1.default.createElement("rect", { className: styles.setsBarDimmed, x: width - xScale(size), y: y, width: xScale(size), height: constants_1.SET_BAR_HEIGHT }),
52
+ react_1.default.createElement("rect", { className: styles.setsBar, x: width - xScale(barSize), y: y, width: xScale(barSize), height: constants_1.SET_BAR_HEIGHT }),
53
+ i !== sets.length - 1 && (react_1.default.createElement("line", { className: styles.gridLine, x1: 0, x2: hoverAreaWidth, y1: lineY, y2: lineY })),
54
+ react_1.default.createElement("text", { className: styles.setsLabel, x: width + constants_1.TEXT_GAP, y: yScale(name) + height / 2 }, label),
55
+ react_1.default.createElement("rect", { className: styles.hoverBar, "data-reltio-id": "set-hover-area", x: -constants_1.GAP_BEFORE_LEFT_BAR + 1, y: yScale(name), width: hoverAreaWidth - 2, height: height, onMouseEnter: function () { return onSetHover(set); }, onMouseLeave: function () { return onSetHover(null); } })));
56
+ })));
57
+ };
58
+ exports.SetsChart = SetsChart;
@@ -0,0 +1 @@
1
+ export { SetsChart } from './SetsChart';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetsChart = void 0;
4
+ var SetsChart_1 = require("./SetsChart");
5
+ Object.defineProperty(exports, "SetsChart", { enumerable: true, get: function () { return SetsChart_1.SetsChart; } });
@@ -0,0 +1 @@
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"setsBarBackground" | "setsBarDimmed" | "setsBar" | "hoverBar" | "setsLabel" | "gridLine">;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useStyles = void 0;
4
+ var styles_1 = require("@mui/styles");
5
+ var constants_1 = require("../../constants");
6
+ exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
7
+ setsBarBackground: {
8
+ fill: constants_1.PRIMARY_COLOR,
9
+ opacity: 0.08,
10
+ transition: 'x ease-in-out 0.3s, width ease-in-out 0.3s'
11
+ },
12
+ setsBarDimmed: {
13
+ fill: constants_1.DIMMED_COLOR,
14
+ transition: 'x ease-in-out 0.3s, width ease-in-out 0.3s'
15
+ },
16
+ setsBar: {
17
+ fill: constants_1.PRIMARY_COLOR,
18
+ transition: 'x ease-in-out 0.3s, width ease-in-out 0.3s'
19
+ },
20
+ hoverBar: {
21
+ fill: 'transparent',
22
+ strokeWidth: '1px',
23
+ cursor: 'pointer',
24
+ stroke: constants_1.PRIMARY_COLOR,
25
+ opacity: 0,
26
+ transition: 'opacity ease-in-out 0.3s',
27
+ '&:hover': {
28
+ opacity: 1
29
+ }
30
+ },
31
+ setsLabel: {
32
+ fontSize: constants_1.SET_LABEL_SIZE,
33
+ fill: constants_1.TEXT_COLOR,
34
+ textAnchor: 'start',
35
+ dominantBaseline: 'middle',
36
+ transition: 'all ease-in-out 0.3s'
37
+ },
38
+ gridLine: {
39
+ stroke: '#000000',
40
+ opacity: 0.04,
41
+ strokeWidth: '1px'
42
+ }
43
+ }); });
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ width: number;
4
+ };
5
+ export declare const SetsChartAxis: ({ width }: Props) => React.JSX.Element;
6
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SetsChartAxis = void 0;
7
+ var react_1 = __importDefault(require("react"));
8
+ var styles_1 = require("./styles");
9
+ var SetsChartAxis = function (_a) {
10
+ var width = _a.width;
11
+ var styles = (0, styles_1.useStyles)();
12
+ return (react_1.default.createElement("g", null,
13
+ react_1.default.createElement("g", { transform: "translate(0,0)" },
14
+ react_1.default.createElement("line", { y2: -6, className: styles.axisTick }),
15
+ react_1.default.createElement("text", { x: 0, y: -9, className: styles.axisTickLabel }, "100%")),
16
+ react_1.default.createElement("g", { transform: "translate(".concat(width, ",0)") },
17
+ react_1.default.createElement("line", { y2: -6, className: styles.axisTick }),
18
+ react_1.default.createElement("text", { x: 0, y: -9, className: styles.axisTickLabel }, "0%"))));
19
+ };
20
+ exports.SetsChartAxis = SetsChartAxis;
@@ -0,0 +1 @@
1
+ export { SetsChartAxis } from './SetsChartAxis';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetsChartAxis = void 0;
4
+ var SetsChartAxis_1 = require("./SetsChartAxis");
5
+ Object.defineProperty(exports, "SetsChartAxis", { enumerable: true, get: function () { return SetsChartAxis_1.SetsChartAxis; } });
@@ -0,0 +1 @@
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"axisTick" | "axisTickLabel">;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useStyles = void 0;
4
+ var styles_1 = require("@mui/styles");
5
+ exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
6
+ axisTick: {
7
+ stroke: '#000000',
8
+ strokeWidth: '1px',
9
+ opacity: 0.54
10
+ },
11
+ axisTickLabel: {
12
+ fontSize: '10px',
13
+ fill: '#000000',
14
+ opacity: 0.54,
15
+ textAnchor: 'middle'
16
+ }
17
+ }); });
@@ -1,4 +1,17 @@
1
- export declare const NOT_MEMBER_COLOR = "rgb(238, 238, 238)";
2
- export declare const PRIMARY_COLOR = "rgb(0, 0, 102)";
3
- export declare const SECONDARY_COLOR = "rgba(0, 0, 102, 0.2)";
1
+ export declare const PRIMARY_COLOR = "#000066";
2
+ export declare const DIMMED_COLOR = "#CCCCE0";
4
3
  export declare const TEXT_COLOR = "rgba(0, 0, 0, 0.87)";
4
+ export declare const TOP_GAP = 24;
5
+ export declare const TEXT_GAP = 16;
6
+ export declare const GAP_BETWEEN_TABLE_AND_CHART = 8;
7
+ export declare const GAP_BEFORE_LEFT_BAR = 12;
8
+ export declare const AXIS_TICK_LABEL_SIZE = "12px";
9
+ export declare const SET_LABEL_SIZE = "13px";
10
+ export declare const SET_BAR_HEIGHT = 12;
11
+ export declare const MATRIX_ROW_HEIGHT = 29;
12
+ export declare const MIN_MATRIX_COLUMN_WIDTH = 28;
13
+ export declare const MIN_INTERSECTION_CHART_HEIGHT = 120;
14
+ export declare const MIN_SETS_CHART_WIDTH = 100;
15
+ export declare const MAX_SETS_CHART_WIDTH = 200;
16
+ export declare const MAX_CHARACTERS = 20;
17
+ export declare const MIN_CHARACTERS = 8;
@@ -1,7 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TEXT_COLOR = exports.SECONDARY_COLOR = exports.PRIMARY_COLOR = exports.NOT_MEMBER_COLOR = void 0;
4
- exports.NOT_MEMBER_COLOR = 'rgb(238, 238, 238)';
5
- exports.PRIMARY_COLOR = 'rgb(0, 0, 102)';
6
- exports.SECONDARY_COLOR = 'rgba(0, 0, 102, 0.2)';
3
+ exports.MIN_CHARACTERS = exports.MAX_CHARACTERS = exports.MAX_SETS_CHART_WIDTH = exports.MIN_SETS_CHART_WIDTH = exports.MIN_INTERSECTION_CHART_HEIGHT = exports.MIN_MATRIX_COLUMN_WIDTH = exports.MATRIX_ROW_HEIGHT = exports.SET_BAR_HEIGHT = exports.SET_LABEL_SIZE = exports.AXIS_TICK_LABEL_SIZE = exports.GAP_BEFORE_LEFT_BAR = exports.GAP_BETWEEN_TABLE_AND_CHART = exports.TEXT_GAP = exports.TOP_GAP = exports.TEXT_COLOR = exports.DIMMED_COLOR = exports.PRIMARY_COLOR = void 0;
4
+ // Colors
5
+ exports.PRIMARY_COLOR = '#000066';
6
+ exports.DIMMED_COLOR = '#CCCCE0';
7
7
  exports.TEXT_COLOR = 'rgba(0, 0, 0, 0.87)';
8
+ // Gaps
9
+ exports.TOP_GAP = 24;
10
+ exports.TEXT_GAP = 16;
11
+ exports.GAP_BETWEEN_TABLE_AND_CHART = 8;
12
+ exports.GAP_BEFORE_LEFT_BAR = 12;
13
+ // Sizes
14
+ exports.AXIS_TICK_LABEL_SIZE = '12px';
15
+ exports.SET_LABEL_SIZE = '13px';
16
+ exports.SET_BAR_HEIGHT = 12;
17
+ exports.MATRIX_ROW_HEIGHT = 29;
18
+ exports.MIN_MATRIX_COLUMN_WIDTH = 28;
19
+ exports.MIN_INTERSECTION_CHART_HEIGHT = 120;
20
+ exports.MIN_SETS_CHART_WIDTH = 100;
21
+ exports.MAX_SETS_CHART_WIDTH = 200;
22
+ exports.MAX_CHARACTERS = 20;
23
+ exports.MIN_CHARACTERS = 8;
@@ -0,0 +1,4 @@
1
+ export declare const gameOfThronesData: {
2
+ name: string;
3
+ sets: string[];
4
+ }[];
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.gameOfThronesData = void 0;
4
+ exports.gameOfThronesData = [
5
+ { name: 'Alton Lannister', sets: ['was killed', 'Lannister', 'male'] },
6
+ { name: 'Arya Stark', sets: ['Stark', 'female'] },
7
+ { name: 'Bran Stark', sets: ['royal', 'Stark', 'male'] },
8
+ { name: 'Benjen Stark', sets: ['was killed', 'Stark', 'male'] },
9
+ { name: 'Brandon Stark', sets: ['was killed', 'Stark'] },
10
+ { name: 'Catelyn Stark', sets: ['was killed', 'Stark', 'female'] },
11
+ { name: 'Cersei Lannister', sets: ['royal', 'was killed', 'Lannister', 'female'] },
12
+ { name: 'Eddard Stark', sets: ['was killed', 'Stark', 'male'] },
13
+ { name: 'Jaime Lannister', sets: ['was killed', 'Lannister', 'male'] },
14
+ { name: 'Jon Snow', sets: ['royal', 'was killed', 'Stark', 'male'] },
15
+ { name: 'Kevan Lannister', sets: ['was killed', 'Lannister', 'male'] },
16
+ { name: 'Lancel Lannister', sets: ['was killed', 'Lannister', 'male'] },
17
+ { name: 'Lyanna Stark', sets: ['was killed', 'Stark', 'female'] },
18
+ { name: 'Martyn Lannister', sets: ['was killed', 'Lannister', 'male'] },
19
+ { name: 'Rickard Stark', sets: ['was killed', 'Stark', 'male'] },
20
+ { name: 'Rickon Stark', sets: ['was killed', 'Stark', 'male'] },
21
+ { name: 'Robb Stark', sets: ['royal', 'was killed', 'Stark', 'male'] },
22
+ { name: 'Sansa Stark', sets: ['royal', 'Stark', 'female'] },
23
+ { name: 'Tyrion Lannister', sets: ['Lannister', 'male'] },
24
+ { name: 'Tywin Lannister', sets: ['was killed', 'Lannister', 'male'] },
25
+ { name: 'Willem Lannister', sets: ['was killed', 'Lannister', 'male'] }
26
+ ];
@@ -0,0 +1,20 @@
1
+ import { ScaleBand } from 'd3-scale';
2
+ import { DataSet, Intersection, UpSetChartData } from './types';
3
+ export declare const findIntersections: (data: UpSetChartData) => {
4
+ intersections: Intersection[];
5
+ sets: DataSet[];
6
+ };
7
+ export declare const getMatrixData: (xScale: ScaleBand<string>, yScale: ScaleBand<string>, intersections: Intersection[], sets: DataSet[]) => {
8
+ circles: {
9
+ cx: number;
10
+ cy: number;
11
+ isPresent: boolean;
12
+ intersectionIndex: number;
13
+ }[];
14
+ lines: any[];
15
+ };
16
+ export declare const truncateLabels: (sets: DataSet[], maxLabelsWidth: number) => {
17
+ labels: string[];
18
+ maxWidth: number;
19
+ };
20
+ export declare const calculateTicksWidth: (ticks: number[]) => number;
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
+ if (ar || !(i in from)) {
5
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
+ ar[i] = from[i];
7
+ }
8
+ }
9
+ return to.concat(ar || Array.prototype.slice.call(from));
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.calculateTicksWidth = exports.truncateLabels = exports.getMatrixData = exports.findIntersections = void 0;
13
+ var constants_1 = require("./constants");
14
+ var findIntersections = function (data) {
15
+ var setsCombinations = {};
16
+ var individualSets = {};
17
+ data.forEach(function (_a) {
18
+ var name = _a.name, sets = _a.sets;
19
+ sets.forEach(function (set) {
20
+ if (!individualSets[set]) {
21
+ individualSets[set] = [];
22
+ }
23
+ individualSets[set].push(name);
24
+ });
25
+ var generateCombinations = function (subset, index) {
26
+ if (index === sets.length) {
27
+ if (subset.length > 0) {
28
+ var key = subset.sort().join(',');
29
+ if (!setsCombinations[key]) {
30
+ setsCombinations[key] = [];
31
+ }
32
+ setsCombinations[key].push(name);
33
+ }
34
+ return;
35
+ }
36
+ generateCombinations(subset, index + 1);
37
+ generateCombinations(__spreadArray(__spreadArray([], subset, true), [sets[index]], false), index + 1);
38
+ };
39
+ generateCombinations([], 0);
40
+ });
41
+ var intersections = Object.entries(setsCombinations)
42
+ .map(function (_a, index) {
43
+ var key = _a[0], elements = _a[1];
44
+ return ({
45
+ index: index,
46
+ sets: key.split(','),
47
+ size: elements.length,
48
+ elements: elements
49
+ });
50
+ })
51
+ .sort(function (a, b) { return b.size - a.size; });
52
+ var sets = Object.entries(individualSets).map(function (_a, index) {
53
+ var name = _a[0], elements = _a[1];
54
+ return ({
55
+ index: index,
56
+ name: name,
57
+ size: elements.length,
58
+ elements: elements
59
+ });
60
+ });
61
+ return { intersections: intersections, sets: sets };
62
+ };
63
+ exports.findIntersections = findIntersections;
64
+ var getMatrixData = function (xScale, yScale, intersections, sets) {
65
+ var circles = intersections.flatMap(function (intersection, i) {
66
+ return sets.map(function (set) { return ({
67
+ cx: xScale(String(i)) + xScale.bandwidth() / 2,
68
+ cy: yScale(set.name) + yScale.bandwidth() / 2,
69
+ isPresent: intersection.sets.includes(set.name),
70
+ intersectionIndex: intersection.index
71
+ }); });
72
+ });
73
+ var lines = intersections.reduce(function (acc, intersection, i) {
74
+ var activeSetIndices = intersection.sets
75
+ .map(function (name) { return sets.findIndex(function (set) { return set.name === name; }); })
76
+ .filter(function (i) { return i >= 0; })
77
+ .sort(function (a, b) { return a - b; });
78
+ if (activeSetIndices.length > 1) {
79
+ var firstIdx = activeSetIndices[0];
80
+ var lastIdx = activeSetIndices[activeSetIndices.length - 1];
81
+ var x = xScale(String(i)) + xScale.bandwidth() / 2;
82
+ var y1 = yScale(sets[firstIdx].name) + yScale.bandwidth() / 2;
83
+ var y2 = yScale(sets[lastIdx].name) + yScale.bandwidth() / 2;
84
+ return __spreadArray(__spreadArray([], acc, true), [{ x: x, y1: y1, y2: y2, intersectionIndex: intersection.index }], false);
85
+ }
86
+ return acc;
87
+ }, []);
88
+ return { circles: circles, lines: lines };
89
+ };
90
+ exports.getMatrixData = getMatrixData;
91
+ var truncateLabels = function (sets, maxLabelsWidth) {
92
+ var newTruncatedLabels = [];
93
+ var maxWidth = 0;
94
+ var tempSvgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
95
+ document.body.appendChild(tempSvgElement);
96
+ var tempTextElement = document.createElementNS('http://www.w3.org/2000/svg', 'text');
97
+ tempTextElement.setAttribute('font-size', constants_1.SET_LABEL_SIZE);
98
+ tempSvgElement.appendChild(tempTextElement);
99
+ sets.forEach(function (_a) {
100
+ var name = _a.name;
101
+ var truncatedText = name.length > constants_1.MAX_CHARACTERS ? name.slice(0, constants_1.MAX_CHARACTERS) + '...' : name;
102
+ tempTextElement.textContent = truncatedText;
103
+ while (tempTextElement.getBBox().width > maxLabelsWidth && truncatedText.length > constants_1.MIN_CHARACTERS) {
104
+ truncatedText = truncatedText.slice(0, -4) + '...';
105
+ tempTextElement.textContent = truncatedText;
106
+ }
107
+ newTruncatedLabels.push(truncatedText);
108
+ maxWidth = Math.max(maxWidth, tempTextElement.getBBox().width);
109
+ });
110
+ document.body.removeChild(tempSvgElement);
111
+ return { labels: newTruncatedLabels, maxWidth: maxWidth };
112
+ };
113
+ exports.truncateLabels = truncateLabels;
114
+ var calculateTicksWidth = function (ticks) {
115
+ var tempSvgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
116
+ var tempTextElement = document.createElementNS('http://www.w3.org/2000/svg', 'text');
117
+ tempTextElement.setAttribute('font-size', constants_1.AXIS_TICK_LABEL_SIZE);
118
+ tempSvgElement.appendChild(tempTextElement);
119
+ document.body.appendChild(tempSvgElement);
120
+ var maxWidth = ticks.reduce(function (maxWidth, tick) {
121
+ tempTextElement.textContent = String(tick);
122
+ return Math.max(maxWidth, tempTextElement.getBBox().width);
123
+ }, 0);
124
+ document.body.removeChild(tempSvgElement);
125
+ return maxWidth;
126
+ };
127
+ exports.calculateTicksWidth = calculateTicksWidth;
@@ -1 +1,4 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"setLabel" | "barLabel" | "axisTick" | "chartLabel">;
1
+ export declare const useStyles: (props: {
2
+ width: number;
3
+ height: number;
4
+ }) => import("@mui/styles").ClassNameMap<"svg" | "wrapper">;
@@ -2,18 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useStyles = void 0;
4
4
  var styles_1 = require("@mui/styles");
5
- exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
6
- setLabel: {
7
- fontSize: '13px !important'
5
+ exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
6
+ wrapper: function (_a) {
7
+ var width = _a.width, height = _a.height;
8
+ return ({
9
+ width: width,
10
+ height: height,
11
+ display: 'flex',
12
+ overflow: 'auto'
13
+ });
8
14
  },
9
- barLabel: {
10
- fontSize: '12px !important'
11
- },
12
- axisTick: {
13
- fontSize: '12px !important'
14
- },
15
- chartLabel: {
16
- fill: "".concat(theme.palette.text.secondary, " !important"),
17
- fontSize: '10px !important'
15
+ svg: {
16
+ flexShrink: '0'
18
17
  }
19
18
  }); });
@@ -0,0 +1,16 @@
1
+ export type UpSetChartData = {
2
+ name: string;
3
+ sets: string[];
4
+ }[];
5
+ export type Intersection = {
6
+ index: number;
7
+ sets: string[];
8
+ size: number;
9
+ elements: string[];
10
+ };
11
+ export type DataSet = {
12
+ index: number;
13
+ name: string;
14
+ size: number;
15
+ elements: string[];
16
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ import { DataSet, Intersection } from './types';
2
+ type Props = {
3
+ width: number;
4
+ height: number;
5
+ intersections: Intersection[];
6
+ sets: DataSet[];
7
+ };
8
+ export declare const useUpSetChartSizes: ({ width, height, intersections, sets }: Props) => {
9
+ labels: string[];
10
+ svgWidth: number;
11
+ svgHeight: number;
12
+ intersectionsChartWidth: number;
13
+ intersectionsChartHeight: number;
14
+ matrixY: number;
15
+ matrixHeight: number;
16
+ maxLabelsWidth: number;
17
+ leftPadding: number;
18
+ setsChartWidth: number;
19
+ };
20
+ export {};
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useUpSetChartSizes = void 0;
4
+ var constants_1 = require("./constants");
5
+ var helpers_1 = require("./helpers");
6
+ var useUpSetChartSizes = function (_a) {
7
+ var width = _a.width, height = _a.height, intersections = _a.intersections, sets = _a.sets;
8
+ var minMatrixWidth = intersections.length * constants_1.MIN_MATRIX_COLUMN_WIDTH * 1.2;
9
+ var matrixHeight = sets.length * constants_1.MATRIX_ROW_HEIGHT;
10
+ var availableLabelsWidth = width - minMatrixWidth - constants_1.TEXT_GAP * 2 - constants_1.GAP_BEFORE_LEFT_BAR - constants_1.MIN_SETS_CHART_WIDTH;
11
+ var _b = (0, helpers_1.truncateLabels)(sets, availableLabelsWidth), labels = _b.labels, labelsWidth = _b.maxWidth;
12
+ var availableSetsChartWidth = width - minMatrixWidth - constants_1.TEXT_GAP * 2 - constants_1.GAP_BEFORE_LEFT_BAR - labelsWidth;
13
+ var setsChartWidth = Math.min(Math.max(availableSetsChartWidth, constants_1.MIN_SETS_CHART_WIDTH), constants_1.MAX_SETS_CHART_WIDTH);
14
+ var maxLabelsWidth = width - minMatrixWidth - constants_1.TEXT_GAP * 2 - constants_1.GAP_BEFORE_LEFT_BAR - setsChartWidth;
15
+ var leftPadding = setsChartWidth + labelsWidth + constants_1.TEXT_GAP * 2 + constants_1.GAP_BEFORE_LEFT_BAR;
16
+ var intersectionsChartWidth = Math.max(minMatrixWidth, width - leftPadding);
17
+ var intersectionsChartHeight = Math.max(constants_1.MIN_INTERSECTION_CHART_HEIGHT, height - constants_1.TOP_GAP - matrixHeight - constants_1.GAP_BETWEEN_TABLE_AND_CHART);
18
+ var svgWidth = leftPadding + intersectionsChartWidth;
19
+ var svgHeight = intersectionsChartHeight + matrixHeight + constants_1.TOP_GAP + constants_1.GAP_BETWEEN_TABLE_AND_CHART;
20
+ var matrixY = svgHeight - matrixHeight - 1;
21
+ return {
22
+ labels: labels,
23
+ svgWidth: svgWidth,
24
+ svgHeight: svgHeight,
25
+ intersectionsChartWidth: intersectionsChartWidth,
26
+ intersectionsChartHeight: intersectionsChartHeight,
27
+ matrixY: matrixY,
28
+ matrixHeight: matrixHeight,
29
+ maxLabelsWidth: maxLabelsWidth,
30
+ leftPadding: leftPadding,
31
+ setsChartWidth: setsChartWidth
32
+ };
33
+ };
34
+ exports.useUpSetChartSizes = useUpSetChartSizes;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { ActivityData, ActivityTypes } from '../types';
3
3
  type FactoryProps = {
4
4
  type: ActivityTypes;
5
- data: ActivityData;
5
+ data?: ActivityData;
6
6
  };
7
7
  export declare class ActivitiesFactory {
8
8
  static getComponent: ({ type, data }: FactoryProps) => React.JSX.Element;
@@ -37,7 +37,7 @@ var ActivitiesFactory = /** @class */ (function () {
37
37
  case types_1.ActivityTypes.COMMENT_ADDED:
38
38
  case types_1.ActivityTypes.COMMENT_DELETED:
39
39
  case types_1.ActivityTypes.COMMENT_UPDATED:
40
- return react_1.default.createElement(CommentActivity_1.CommentActivity, { data: data, type: type });
40
+ return react_1.default.createElement(CommentActivity_1.CommentActivity, { type: type });
41
41
  case types_1.ActivityTypes.ENTITIES_MERGED_MANUALLY:
42
42
  case types_1.ActivityTypes.ENTITIES_MERGED:
43
43
  case types_1.ActivityTypes.ENTITIES_MERGED_ON_THE_FLY: