@reltio/components 1.4.2070 → 1.4.2072

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 (332) hide show
  1. package/AttributesView/AttributesView.js +1 -1
  2. package/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.d.ts +2 -3
  3. package/ColumnsSettings/helpers.d.ts +3 -1
  4. package/ColumnsSettings/types.d.ts +8 -0
  5. package/CommentsContainer/CommentsContainer.js +1 -1
  6. package/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +23 -40
  7. package/ConfigureColumnsPopup/ConfigureColumnsPopup.js +6 -26
  8. package/EditModeAttributesList/EditModeAttributesList.js +1 -1
  9. package/EditModeAttributesPager/EditModeAttributesPager.test.js +1 -1
  10. package/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +1 -1
  11. package/FacetViewHeader/FacetViewHeader.js +1 -1
  12. package/ImageAttributesLine/imageAttributeValues.test-data.js +8 -0
  13. package/ImageAttributesLine/index.d.ts +1 -1
  14. package/ImageAttributesLine/index.js +1 -1
  15. package/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +1 -1
  16. package/MergeButton/MergeButton.spec.js +55 -124
  17. package/MetadataTypesSelector/MetadataTypesSelector.d.ts +2 -1
  18. package/MetadataTypesSelector/MetadataTypesSelector.js +1 -1
  19. package/MetadataTypesSelector/MetadataTypesSelector.test.js +193 -190
  20. package/MetadataTypesSelector/components/SelectMetadataTypesList/SelectMetadataTypesList.d.ts +5 -6
  21. package/MoreAttributesButton/MoreAttributesButton.test.js +173 -166
  22. package/MoreAttributesButton/useMoreAttributesItems.d.ts +1 -1
  23. package/MultiValueSelector/MultiValueSelector.test.js +78 -38
  24. package/MultipliableSelect/MultipliableSelect.test.js +111 -47
  25. package/NestedAttribute/NestedAttribute.test.js +121 -42
  26. package/NestedAttributeEditor/NestedAttributeEditor.test.js +95 -41
  27. package/NotMatchButton/NotMatchButton.spec.js +51 -100
  28. package/PieChart/PieChart.test.js +130 -114
  29. package/PinButton/PinButton.spec.js +89 -22
  30. package/PivotingTooltip/PivotingTooltip.test.js +338 -174
  31. package/PotentialMatchReviewCard/PotentialMatchReviewCard.spec.js +94 -29
  32. package/ProfileBand/ProfileBand.spec.js +60 -53
  33. package/ProfileCard/ProfileCard.test.js +109 -27
  34. package/ProfilesList/ProfilesList.d.ts +1 -3
  35. package/ProfilesList/ProfilesList.js +1 -1
  36. package/ProfilesList/ProfilesList.spec.js +226 -211
  37. package/QueryBuilderRow/QueryBuilderRow.spec.js +83 -90
  38. package/QueryBuilderRowsGroup/QueryBuilderRowsGroup.spec.js +195 -86
  39. package/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +73 -15
  40. package/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.test.js +71 -117
  41. package/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.test.js +128 -61
  42. package/ReadOnlyAttributesFactory/components/ReadOnlyAttribute/ReadOnlyAttribute.test.js +179 -44
  43. package/ReadOnlyAttributesList/ReadOnlyAttributesList.js +1 -1
  44. package/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +254 -211
  45. package/ReadOnlyAttributesList/attributes.test-data.js +4 -4
  46. package/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +1 -1
  47. package/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +75 -18
  48. package/ReadOnlyAttributesView/ReadOnlyAttributesView.js +1 -1
  49. package/ReadOnlyAttributesView/ReadOnlyAttributesView.test.js +187 -312
  50. package/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.test.js +210 -219
  51. package/ReadOnlyImageAttributesLine/ReadOnlyImageAttributesLine.test.js +89 -89
  52. package/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +556 -602
  53. package/ReferenceAttributeEditor/metadata.test-data.d.ts +13 -13
  54. package/ReferenceAttributeEditor/metadata.test-data.js +2 -2
  55. package/ReferenceAttributeEditor/styles.d.ts +1 -1
  56. package/RelationEditor/RelationEditor.test.js +1448 -1392
  57. package/RelationTypeSelector/RelationTypeSelector.test.js +99 -17
  58. package/RelationTypesSelector/RelationTypesSelector.test.js +73 -22
  59. package/ReltioMap/ReltioMap.spec.js +51 -25
  60. package/Roles/Roles.test.js +54 -10
  61. package/ScreenProfileBand/ScreenProfileBand.test.js +142 -72
  62. package/ScrollableTabs/ScrollableTabs.test.js +69 -19
  63. package/SearchHighlighter/SearchHighlighter.test.js +18 -7
  64. package/SelectAttributesList/SelectAttributesList.d.ts +11 -6
  65. package/SelectAttributesList/SelectAttributesList.js +5 -2
  66. package/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +109 -60
  67. package/SidePanelContentHeader/SidePanelContentHeader.js +2 -2
  68. package/SidePanelContentHeader/SidePanelContentHeader.test.js +104 -0
  69. package/SidePanelEmptyState/SidePanelEmptyState.js +1 -1
  70. package/SidePanelEmptyState/SidePanelEmptyState.test.js +24 -0
  71. package/SimpleAttribute/SimpleAttribute.js +1 -1
  72. package/SimpleAttribute/SimpleAttribute.test.js +155 -80
  73. package/SimpleAttributeEditor/SimpleAttributeEditor.test.js +339 -330
  74. package/SimpleAttributeEditor/useAttributeValuePermissions.js +1 -1
  75. package/SimpleDropDownSelector/SimpleDropDownSelector.test.js +86 -10
  76. package/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.js +1 -1
  77. package/SimpleDropDownSelector/components/DropDownValue/DropDownValue.js +1 -1
  78. package/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +128 -32
  79. package/SmallIconButton/SmallIconButton.test.js +98 -25
  80. package/TableWithBars/TableWithBars.test.js +98 -60
  81. package/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.js +1 -1
  82. package/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.js +1 -1
  83. package/Tags/Tags.d.ts +0 -1
  84. package/Tags/Tags.test.js +8 -7
  85. package/TransitiveMatchBlock/TransitiveMatchBlock.test.js +78 -22
  86. package/TransitiveMatchRule/TransitiveMatchRule.test.js +78 -37
  87. package/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.js +1 -1
  88. package/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.test.js +12 -18
  89. package/UploadFileButton/UploadFileButton.d.ts +2 -2
  90. package/UploadFileButton/UploadFileButton.test.js +199 -0
  91. package/UploadImageDialog/UploadImageDialog.test.js +1 -0
  92. package/UploadImageDialog/components/DividerWithText/DividerWithText.js +1 -1
  93. package/UploadImageDialog/components/ErrorSnackbar/ErrorSnackbar.test.js +80 -22
  94. package/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.js +1 -1
  95. package/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.test.js +162 -49
  96. package/ValueChip/ValueChip.test.js +7 -23
  97. package/VirtualGroupedList/VirtualGroupedList.d.ts +19 -31
  98. package/VirtualGroupedList/VirtualGroupedList.js +11 -36
  99. package/VirtualGroupedList/VirtualGroupedList.test.js +224 -0
  100. package/VirtualGroupedList/helpers.d.ts +7 -2
  101. package/VirtualGroupedList/helpers.js +3 -1
  102. package/VirtualGroupedList/index.d.ts +1 -1
  103. package/VirtualGroupedList/types.d.ts +10 -6
  104. package/VirtualGroupedList/useScrollToFocusItem.d.ts +8 -5
  105. package/WhiteSearchInput/{WhiteSearchInput.spec.js → WhiteSearchInput.test.js} +3 -8
  106. package/cjs/AttributesView/AttributesView.js +2 -2
  107. package/cjs/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.d.ts +2 -3
  108. package/cjs/ColumnsSettings/helpers.d.ts +3 -1
  109. package/cjs/ColumnsSettings/types.d.ts +8 -0
  110. package/cjs/ColumnsSettings/types.js +2 -0
  111. package/cjs/CommentsContainer/CommentsContainer.js +1 -1
  112. package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +23 -40
  113. package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.js +6 -26
  114. package/cjs/EditModeAttributesList/EditModeAttributesList.js +2 -2
  115. package/cjs/EditModeAttributesPager/EditModeAttributesPager.test.js +2 -2
  116. package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +2 -2
  117. package/cjs/FacetViewHeader/FacetViewHeader.js +1 -1
  118. package/cjs/ImageAttributesLine/imageAttributeValues.test-data.js +8 -0
  119. package/cjs/ImageAttributesLine/index.d.ts +1 -1
  120. package/cjs/ImageAttributesLine/index.js +2 -1
  121. package/cjs/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +1 -1
  122. package/cjs/MergeButton/MergeButton.spec.js +55 -124
  123. package/cjs/MetadataTypesSelector/MetadataTypesSelector.d.ts +2 -1
  124. package/cjs/MetadataTypesSelector/MetadataTypesSelector.js +1 -1
  125. package/cjs/MetadataTypesSelector/MetadataTypesSelector.test.js +193 -190
  126. package/cjs/MetadataTypesSelector/components/SelectMetadataTypesList/SelectMetadataTypesList.d.ts +5 -6
  127. package/cjs/MoreAttributesButton/MoreAttributesButton.test.js +172 -165
  128. package/cjs/MoreAttributesButton/useMoreAttributesItems.d.ts +1 -1
  129. package/cjs/MultiValueSelector/MultiValueSelector.test.js +78 -38
  130. package/cjs/MultipliableSelect/MultipliableSelect.test.js +111 -47
  131. package/cjs/NestedAttribute/NestedAttribute.test.js +121 -42
  132. package/cjs/NestedAttributeEditor/NestedAttributeEditor.test.js +94 -40
  133. package/cjs/NotMatchButton/NotMatchButton.spec.js +51 -100
  134. package/cjs/PieChart/PieChart.test.js +130 -114
  135. package/cjs/PinButton/PinButton.spec.js +89 -22
  136. package/cjs/PivotingTooltip/PivotingTooltip.test.js +338 -174
  137. package/cjs/PotentialMatchReviewCard/PotentialMatchReviewCard.spec.js +94 -29
  138. package/cjs/ProfileBand/ProfileBand.spec.js +60 -53
  139. package/cjs/ProfileCard/ProfileCard.test.js +109 -27
  140. package/cjs/ProfilesList/ProfilesList.d.ts +1 -3
  141. package/cjs/ProfilesList/ProfilesList.js +1 -1
  142. package/cjs/ProfilesList/ProfilesList.spec.js +226 -211
  143. package/cjs/QueryBuilderRow/QueryBuilderRow.spec.js +83 -90
  144. package/cjs/QueryBuilderRowsGroup/QueryBuilderRowsGroup.spec.js +195 -86
  145. package/cjs/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +73 -15
  146. package/cjs/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.test.js +71 -117
  147. package/cjs/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.test.js +128 -61
  148. package/cjs/ReadOnlyAttributesFactory/components/ReadOnlyAttribute/ReadOnlyAttribute.test.js +179 -44
  149. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.js +2 -2
  150. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +254 -211
  151. package/cjs/ReadOnlyAttributesList/attributes.test-data.js +4 -4
  152. package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +2 -2
  153. package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +75 -18
  154. package/cjs/ReadOnlyAttributesView/ReadOnlyAttributesView.js +2 -2
  155. package/cjs/ReadOnlyAttributesView/ReadOnlyAttributesView.test.js +185 -310
  156. package/cjs/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.test.js +209 -218
  157. package/cjs/ReadOnlyImageAttributesLine/ReadOnlyImageAttributesLine.test.js +89 -89
  158. package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +555 -601
  159. package/cjs/ReferenceAttributeEditor/metadata.test-data.d.ts +13 -13
  160. package/cjs/ReferenceAttributeEditor/metadata.test-data.js +2 -2
  161. package/cjs/ReferenceAttributeEditor/styles.d.ts +1 -1
  162. package/cjs/RelationEditor/RelationEditor.test.js +1446 -1390
  163. package/cjs/RelationTypeSelector/RelationTypeSelector.test.js +99 -17
  164. package/cjs/RelationTypesSelector/RelationTypesSelector.test.js +73 -22
  165. package/cjs/ReltioMap/ReltioMap.spec.js +51 -25
  166. package/cjs/Roles/Roles.test.js +54 -10
  167. package/cjs/ScreenProfileBand/ScreenProfileBand.test.js +141 -71
  168. package/cjs/ScrollableTabs/ScrollableTabs.test.js +69 -19
  169. package/cjs/SearchHighlighter/SearchHighlighter.test.js +18 -7
  170. package/cjs/SelectAttributesList/SelectAttributesList.d.ts +11 -6
  171. package/cjs/SelectAttributesList/SelectAttributesList.js +5 -2
  172. package/cjs/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +109 -60
  173. package/cjs/SidePanelContentHeader/SidePanelContentHeader.js +2 -2
  174. package/cjs/SidePanelContentHeader/SidePanelContentHeader.test.js +109 -0
  175. package/cjs/SidePanelEmptyState/SidePanelEmptyState.js +1 -1
  176. package/cjs/SidePanelEmptyState/SidePanelEmptyState.test.js +29 -0
  177. package/cjs/SimpleAttribute/SimpleAttribute.js +1 -1
  178. package/cjs/SimpleAttribute/SimpleAttribute.test.js +155 -80
  179. package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.test.js +338 -352
  180. package/cjs/SimpleAttributeEditor/useAttributeValuePermissions.js +2 -2
  181. package/cjs/SimpleDropDownSelector/SimpleDropDownSelector.test.js +86 -10
  182. package/cjs/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.js +1 -1
  183. package/cjs/SimpleDropDownSelector/components/DropDownValue/DropDownValue.js +1 -1
  184. package/cjs/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +127 -31
  185. package/cjs/SmallIconButton/SmallIconButton.test.js +98 -25
  186. package/cjs/TableWithBars/TableWithBars.test.js +98 -60
  187. package/cjs/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.js +1 -1
  188. package/cjs/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.js +1 -1
  189. package/cjs/Tags/Tags.d.ts +0 -1
  190. package/cjs/Tags/Tags.test.js +8 -7
  191. package/cjs/TransitiveMatchBlock/TransitiveMatchBlock.test.js +77 -21
  192. package/cjs/TransitiveMatchRule/TransitiveMatchRule.test.js +78 -37
  193. package/cjs/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.js +1 -1
  194. package/cjs/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.test.js +12 -18
  195. package/cjs/UploadFileButton/UploadFileButton.d.ts +2 -2
  196. package/cjs/UploadFileButton/UploadFileButton.test.js +204 -0
  197. package/cjs/UploadImageDialog/UploadImageDialog.test.js +1 -0
  198. package/cjs/UploadImageDialog/components/DividerWithText/DividerWithText.js +1 -1
  199. package/cjs/UploadImageDialog/components/ErrorSnackbar/ErrorSnackbar.test.js +80 -22
  200. package/cjs/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.js +1 -1
  201. package/cjs/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.test.js +162 -49
  202. package/cjs/ValueChip/ValueChip.test.js +7 -23
  203. package/cjs/VirtualGroupedList/VirtualGroupedList.d.ts +19 -31
  204. package/cjs/VirtualGroupedList/VirtualGroupedList.js +11 -36
  205. package/cjs/VirtualGroupedList/VirtualGroupedList.test.js +252 -0
  206. package/cjs/VirtualGroupedList/helpers.d.ts +7 -2
  207. package/cjs/VirtualGroupedList/helpers.js +3 -1
  208. package/cjs/VirtualGroupedList/index.d.ts +1 -1
  209. package/cjs/VirtualGroupedList/types.d.ts +10 -6
  210. package/cjs/VirtualGroupedList/useScrollToFocusItem.d.ts +8 -5
  211. package/cjs/WhiteSearchInput/{WhiteSearchInput.spec.js → WhiteSearchInput.test.js} +3 -8
  212. package/cjs/features/crosswalks/hooks/useAttributeActions.test.js +24 -25
  213. package/cjs/features/crosswalks/hooks/useCrosswalkActions.test.js +10 -11
  214. package/cjs/features/workflow/hooks/useChangeRequest.test.js +5 -6
  215. package/cjs/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +8 -9
  216. package/cjs/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +9 -13
  217. package/features/crosswalks/hooks/useAttributeActions.test.js +1 -2
  218. package/features/crosswalks/hooks/useCrosswalkActions.test.js +1 -2
  219. package/features/workflow/hooks/useChangeRequest.test.js +1 -2
  220. package/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +1 -2
  221. package/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +9 -13
  222. package/package.json +1 -1
  223. package/MetadataTypesSelector/components/ListLabel/ListLabel.test.js +0 -24
  224. package/PivotingTooltip/IntegrationPivotingTooltip.test.js +0 -356
  225. package/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +0 -201
  226. package/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.js +0 -43
  227. package/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.js +0 -31
  228. package/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.js +0 -31
  229. package/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.js +0 -45
  230. package/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.js +0 -114
  231. package/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.js +0 -107
  232. package/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +0 -72
  233. package/RelationEditor/IntegrationRelationEditor.test.js +0 -337
  234. package/ReltioMap/components/MapControlContainer/MapControlContainer.d.ts +0 -10
  235. package/ReltioMap/components/MapControlContainer/MapControlContainer.js +0 -24
  236. package/ReltioMap/components/MapControlContainer/MapControlContainer.spec.d.ts +0 -1
  237. package/ReltioMap/components/MapControlContainer/MapControlContainer.spec.js +0 -33
  238. package/ReltioMap/components/MapControlContainer/index.d.ts +0 -1
  239. package/ReltioMap/components/MapControlContainer/index.js +0 -1
  240. package/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.d.ts +0 -1
  241. package/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.js +0 -36
  242. package/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.d.ts +0 -1
  243. package/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.js +0 -60
  244. package/Roles/components/Role/Role.test.d.ts +0 -1
  245. package/Roles/components/Role/Role.test.js +0 -55
  246. package/SidePanelContentHeader/SidePanelContentHeader.spec.d.ts +0 -1
  247. package/SidePanelContentHeader/SidePanelContentHeader.spec.js +0 -49
  248. package/SidePanelEmptyState/SidePanelEmptyState.spec.d.ts +0 -1
  249. package/SidePanelEmptyState/SidePanelEmptyState.spec.js +0 -24
  250. package/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.d.ts +0 -1
  251. package/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.js +0 -103
  252. package/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.d.ts +0 -1
  253. package/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.js +0 -13
  254. package/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.d.ts +0 -1
  255. package/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.js +0 -21
  256. package/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.d.ts +0 -1
  257. package/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.js +0 -20
  258. package/UploadFileButton/UploadFileButton.spec.d.ts +0 -1
  259. package/UploadFileButton/UploadFileButton.spec.js +0 -219
  260. package/UploadImageDialog/components/DividerWithText/DividerWithText.test.d.ts +0 -1
  261. package/UploadImageDialog/components/DividerWithText/DividerWithText.test.js +0 -9
  262. package/VirtualGroupedList/VirtualGroupedList.spec.d.ts +0 -1
  263. package/VirtualGroupedList/VirtualGroupedList.spec.js +0 -282
  264. package/WhiteSearchInput/WhiteSearchInput.spec.d.ts +0 -1
  265. package/cjs/MetadataTypesSelector/components/ListLabel/ListLabel.test.d.ts +0 -1
  266. package/cjs/MetadataTypesSelector/components/ListLabel/ListLabel.test.js +0 -52
  267. package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.d.ts +0 -1
  268. package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.js +0 -361
  269. package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.d.ts +0 -1
  270. package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +0 -206
  271. package/cjs/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.d.ts +0 -1
  272. package/cjs/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.js +0 -48
  273. package/cjs/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.d.ts +0 -1
  274. package/cjs/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.js +0 -36
  275. package/cjs/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.d.ts +0 -1
  276. package/cjs/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.js +0 -36
  277. package/cjs/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.d.ts +0 -1
  278. package/cjs/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.js +0 -50
  279. package/cjs/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.d.ts +0 -1
  280. package/cjs/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.js +0 -119
  281. package/cjs/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.d.ts +0 -1
  282. package/cjs/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.js +0 -112
  283. package/cjs/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.d.ts +0 -1
  284. package/cjs/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +0 -77
  285. package/cjs/RelationEditor/IntegrationRelationEditor.test.d.ts +0 -1
  286. package/cjs/RelationEditor/IntegrationRelationEditor.test.js +0 -342
  287. package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.d.ts +0 -10
  288. package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.js +0 -28
  289. package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.spec.d.ts +0 -1
  290. package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.spec.js +0 -38
  291. package/cjs/ReltioMap/components/MapControlContainer/index.d.ts +0 -1
  292. package/cjs/ReltioMap/components/MapControlContainer/index.js +0 -5
  293. package/cjs/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.d.ts +0 -1
  294. package/cjs/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.js +0 -41
  295. package/cjs/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.d.ts +0 -1
  296. package/cjs/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.js +0 -65
  297. package/cjs/Roles/components/Role/Role.test.d.ts +0 -1
  298. package/cjs/Roles/components/Role/Role.test.js +0 -60
  299. package/cjs/SidePanelContentHeader/SidePanelContentHeader.spec.d.ts +0 -1
  300. package/cjs/SidePanelContentHeader/SidePanelContentHeader.spec.js +0 -54
  301. package/cjs/SidePanelEmptyState/SidePanelEmptyState.spec.d.ts +0 -1
  302. package/cjs/SidePanelEmptyState/SidePanelEmptyState.spec.js +0 -29
  303. package/cjs/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.d.ts +0 -1
  304. package/cjs/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.js +0 -108
  305. package/cjs/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.d.ts +0 -1
  306. package/cjs/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.js +0 -18
  307. package/cjs/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.d.ts +0 -1
  308. package/cjs/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.js +0 -26
  309. package/cjs/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.d.ts +0 -1
  310. package/cjs/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.js +0 -25
  311. package/cjs/UploadFileButton/UploadFileButton.spec.d.ts +0 -1
  312. package/cjs/UploadFileButton/UploadFileButton.spec.js +0 -224
  313. package/cjs/UploadImageDialog/components/DividerWithText/DividerWithText.test.d.ts +0 -1
  314. package/cjs/UploadImageDialog/components/DividerWithText/DividerWithText.test.js +0 -14
  315. package/cjs/VirtualGroupedList/VirtualGroupedList.spec.d.ts +0 -1
  316. package/cjs/VirtualGroupedList/VirtualGroupedList.spec.js +0 -287
  317. package/cjs/WhiteSearchInput/WhiteSearchInput.spec.d.ts +0 -1
  318. /package/{MetadataTypesSelector/components/ListLabel/ListLabel.test.d.ts → ColumnsSettings/types.js} +0 -0
  319. /package/{PivotingTooltip/IntegrationPivotingTooltip.test.d.ts → SidePanelContentHeader/SidePanelContentHeader.test.d.ts} +0 -0
  320. /package/{PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.d.ts → SidePanelEmptyState/SidePanelEmptyState.test.d.ts} +0 -0
  321. /package/{ProfileCard/components/ProfileCardContent/ProfileCardContent.test.d.ts → UploadFileButton/UploadFileButton.test.d.ts} +0 -0
  322. /package/{QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.d.ts → VirtualGroupedList/VirtualGroupedList.test.d.ts} +0 -0
  323. /package/{QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.d.ts → WhiteSearchInput/WhiteSearchInput.test.d.ts} +0 -0
  324. /package/{ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.d.ts → cjs/SidePanelContentHeader/SidePanelContentHeader.test.d.ts} +0 -0
  325. /package/{ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.d.ts → cjs/SidePanelEmptyState/SidePanelEmptyState.test.d.ts} +0 -0
  326. /package/{ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.d.ts → cjs/UploadFileButton/UploadFileButton.test.d.ts} +0 -0
  327. /package/{ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.d.ts → cjs/VirtualGroupedList/VirtualGroupedList.test.d.ts} +0 -0
  328. /package/{RelationEditor/IntegrationRelationEditor.test.d.ts → cjs/WhiteSearchInput/WhiteSearchInput.test.d.ts} +0 -0
  329. /package/cjs/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.d.ts +0 -0
  330. /package/cjs/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.js +0 -0
  331. /package/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.d.ts +0 -0
  332. /package/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.js +0 -0
@@ -55,35 +55,16 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
55
55
  return to.concat(ar || Array.prototype.slice.call(from));
56
56
  };
57
57
  import React from 'react';
58
- import { shallow, mount } from 'enzyme';
59
58
  import { screen, render, within } from '@testing-library/react';
60
59
  import userEvent from '@testing-library/user-event';
61
- import { act } from 'react-dom/test-utils';
62
- import TextField from '@mui/material/TextField';
63
- import { AttributeListItem } from '../AttributeListItem';
64
- import { Highlighter } from '../Highlighter';
65
- import { SelectionPopup } from '../SelectionPopup';
66
- import { rerenderWrapper } from '../test-utils';
67
- import { ListLabel } from './components/ListLabel';
68
- import { SelectMetadataTypesList } from './components/SelectMetadataTypesList';
60
+ import { countHiddenItems } from './components/ListLabel/helpers';
69
61
  import { MetadataTypesSelector } from './MetadataTypesSelector';
62
+ jest.mock('./components/ListLabel/helpers', function () { return (__assign(__assign({}, jest.requireActual('./components/ListLabel/helpers')), { countHiddenItems: jest.fn() })); });
70
63
  var items = [
71
- {
72
- uri: 'configuration/entityTypes/HCP',
73
- label: 'HCP Label',
74
- attributes: []
75
- },
76
- {
77
- uri: 'configuration/entityTypes/HCA',
78
- attributes: [],
79
- label: 'HCA Label',
80
- analyticsAttributes: []
81
- }
64
+ { uri: 'configuration/entityTypes/HCP', label: 'HCP Label', attributes: [] },
65
+ { uri: 'configuration/entityTypes/HCA', attributes: [], label: 'HCA Label' },
66
+ { uri: 'configuration/entityTypes/Company', attributes: [], label: 'Company Label' }
82
67
  ];
83
- var setUp = function (method, _a) {
84
- var _b = _a === void 0 ? {} : _a, _c = _b.selectedItemsUris, selectedItemsUris = _c === void 0 ? [] : _c, _d = _b.onChange, onChange = _d === void 0 ? jest.fn() : _d, single = _b.single, placeholder = _b.placeholder, enableEmptyValueUnderline = _b.enableEmptyValueUnderline;
85
- return method(React.createElement(MetadataTypesSelector, { items: items, selectedItemsUris: selectedItemsUris, onChange: onChange, single: single, placeholder: placeholder, enableEmptyValueUnderline: enableEmptyValueUnderline, label: "Entity Type", dataReltioId: "entity-type-selector", selectionPopupTitle: 'Select entity types' }));
86
- };
87
68
  var defaultProps = {
88
69
  items: items,
89
70
  selectedItemsUris: [],
@@ -97,180 +78,202 @@ var setUpRTL = function (props) {
97
78
  var user = userEvent.setup();
98
79
  return __assign({ user: user }, render(React.createElement(MetadataTypesSelector, __assign({}, defaultProps, props))));
99
80
  };
100
- describe('MetadataTypesSelector tests', function () {
101
- it('should render correctly', function () {
102
- var selectedItemsUris = ['configuration/entityTypes/HCP'];
103
- var wrapper = setUp(shallow, { selectedItemsUris: selectedItemsUris });
104
- expect(wrapper.find(TextField)).toHaveLength(1);
105
- expect(wrapper.find(TextField).prop('InputProps').readOnly).toBe(true);
106
- expect(wrapper.find(SelectionPopup).props()).toMatchObject({
107
- title: 'Select entity types',
108
- open: false
109
- });
110
- expect(wrapper.find(SelectMetadataTypesList).props()).toMatchObject({
111
- items: [
112
- {
113
- item: {
114
- item: items[0]
115
- },
116
- index: 0
117
- },
118
- {
119
- item: {
120
- item: items[1]
121
- },
122
- index: 1
123
- }
124
- ],
125
- selectedItems: selectedItemsUris
126
- });
81
+ describe('Metadata types selector tests', function () {
82
+ var originalRange = document.createRange;
83
+ beforeEach(function () {
84
+ countHiddenItems.mockReturnValue(0);
85
+ document.createRange = function () {
86
+ var range = new Range();
87
+ range.getBoundingClientRect = jest.fn(function () { return ({ width: 0 }); });
88
+ return range;
89
+ };
127
90
  });
128
- it('should filter types on search input change and highlight the searchText', function () {
129
- var wrapper = setUp(mount);
130
- act(function () {
131
- wrapper.find(TextField).prop('onClick')();
91
+ afterEach(function () {
92
+ jest.clearAllMocks();
93
+ document.createRange = originalRange;
94
+ });
95
+ it('should render correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
96
+ var user, menuItems;
97
+ return __generator(this, function (_a) {
98
+ switch (_a.label) {
99
+ case 0:
100
+ user = setUpRTL({ selectedItemsUris: ['configuration/entityTypes/HCP'] }).user;
101
+ screen.getByText('Entity Type');
102
+ screen.getAllByText('HCP Label');
103
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
104
+ case 1:
105
+ _a.sent();
106
+ screen.getByText('Select entity types');
107
+ menuItems = screen.getAllByRole('menuitem');
108
+ expect(menuItems).toHaveLength(3);
109
+ expect(menuItems[0]).toHaveTextContent('HCP Label');
110
+ expect(within(menuItems[0]).getByRole('checkbox')).toBeChecked();
111
+ expect(menuItems[1]).toHaveTextContent('HCA Label');
112
+ expect(within(menuItems[1]).getByRole('checkbox')).not.toBeChecked();
113
+ expect(menuItems[2]).toHaveTextContent('Company Label');
114
+ expect(within(menuItems[2]).getByRole('checkbox')).not.toBeChecked();
115
+ return [2 /*return*/];
116
+ }
132
117
  });
133
- wrapper.update();
134
- expect(wrapper.find(SelectionPopup).prop('open')).toBe(true);
135
- wrapper.update();
136
- var filterText = 'HCA';
137
- act(function () {
138
- wrapper.find(SelectionPopup).prop('onSearch')(filterText);
118
+ }); });
119
+ it('should filter types on search input change and highlight the searchText', function () { return __awaiter(void 0, void 0, void 0, function () {
120
+ var user, menuItems;
121
+ return __generator(this, function (_a) {
122
+ switch (_a.label) {
123
+ case 0:
124
+ user = setUpRTL().user;
125
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
126
+ case 1:
127
+ _a.sent();
128
+ return [4 /*yield*/, user.type(screen.getByRole('textbox'), 'HCA')];
129
+ case 2:
130
+ _a.sent();
131
+ menuItems = screen.getAllByRole('menuitem');
132
+ expect(menuItems).toHaveLength(1);
133
+ expect(menuItems[0]).toHaveTextContent('HCA Label');
134
+ expect(within(menuItems[0]).getByText('HCA')).toHaveClass('highlight');
135
+ return [2 /*return*/];
136
+ }
139
137
  });
140
- wrapper.update();
141
- expect(wrapper.find(SelectMetadataTypesList).prop('items')).toEqual([
142
- {
143
- item: {
144
- item: __assign(__assign({}, items[1]), { filterText: filterText })
145
- },
146
- index: 0
138
+ }); });
139
+ it('should toggle popup correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
140
+ var user;
141
+ return __generator(this, function (_a) {
142
+ switch (_a.label) {
143
+ case 0:
144
+ user = setUpRTL().user;
145
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
146
+ case 1:
147
+ _a.sent();
148
+ screen.getByRole('presentation');
149
+ return [4 /*yield*/, user.keyboard('{Escape}')];
150
+ case 2:
151
+ _a.sent();
152
+ expect(screen.queryByRole('presentation')).not.toBeInTheDocument();
153
+ return [2 /*return*/];
147
154
  }
148
- ]);
149
- var attributeListItems = wrapper.find(AttributeListItem);
150
- expect(attributeListItems.length).toBe(1);
151
- var highlighter = attributeListItems.find(Highlighter);
152
- expect(highlighter.prop('text')).toBe(items[1].label);
153
- expect(highlighter.prop('highlight')).toBe(filterText);
154
- });
155
- it('should toggle popup correctly', function () {
156
- var wrapper = setUp(shallow);
157
- wrapper.find(TextField).simulate('click');
158
- rerenderWrapper(wrapper);
159
- expect(wrapper.find(SelectionPopup).prop('open')).toBe(true);
160
- wrapper.find(SelectionPopup).prop('onClose')();
161
- rerenderWrapper(wrapper);
162
- expect(wrapper.find(SelectionPopup).prop('open')).toBe(false);
163
- });
164
- it('should not render startAdornment if no types selected and placeholder prop is not set', function () {
165
- var wrapper = setUp(shallow);
166
- expect(wrapper.find(TextField).prop('value')).toBe('');
167
- expect(wrapper.find(TextField).prop('InputProps').startAdornment).toBe(null);
155
+ });
156
+ }); });
157
+ it('should not render start adornment if no types selected and placeholder prop is not set', function () {
158
+ setUpRTL();
159
+ expect(screen.queryByTestId('metadata-types-selector-start-adornment')).not.toBeInTheDocument();
168
160
  });
169
161
  it('should render placeholder if no types selected and placeholder prop is set', function () {
170
- var wrapper = setUp(shallow, { placeholder: 'All' });
171
- expect(wrapper.find(TextField).prop('value')).toBe('');
172
- expect(wrapper.find(TextField).prop('InputProps').startAdornment).toStrictEqual(React.createElement("div", { className: "inputText" },
173
- React.createElement("div", null, "All")));
174
- });
175
- it('should set InputProps.disableUnderline as true if there are no types selected and enableEmptyValueUnderline prop is unset', function () {
176
- var wrapper = setUp(shallow);
177
- expect(wrapper.find(TextField).prop('InputProps').disableUnderline).toBe(true);
178
- });
179
- it('should set InputProps.disableUnderline as false if there are some selected types', function () {
180
- var wrapper = setUp(shallow, { selectedItemsUris: ['configuration/entityTypes/HCP'] });
181
- expect(wrapper.find(TextField).prop('InputProps').disableUnderline).toBe(false);
182
- });
183
- it('should set InputProps.disableUnderline as false if there are no types selected and enableEmptyValueUnderline prop is true', function () {
184
- var wrapper = setUp(shallow, { enableEmptyValueUnderline: true });
185
- expect(wrapper.find(TextField).prop('InputProps').disableUnderline).toBe(false);
186
- });
187
- it('should render not empty placeholder value prop if no types selected', function () {
188
- var wrapper = setUp(shallow, { placeholder: '123' });
189
- expect(wrapper.find(TextField).prop('value')).toBe('');
190
- expect(wrapper.find(TextField).prop('InputProps').startAdornment).toStrictEqual(React.createElement("div", { className: "inputText" },
191
- React.createElement("div", null, "123")));
162
+ setUpRTL({ placeholder: 'Placeholder' });
163
+ screen.getByText('Placeholder');
164
+ expect(screen.getByRole('textbox')).toHaveValue('');
192
165
  });
193
- it('should render ListLabel if not all types are selected', function () {
194
- var selectedItemsUris = ['configuration/entityTypes/HCP'];
195
- var wrapper = setUp(shallow, { selectedItemsUris: selectedItemsUris });
196
- expect(wrapper.find(TextField).prop('InputProps').startAdornment).toStrictEqual(React.createElement("div", { className: "inputText" },
197
- React.createElement(ListLabel, { list: ['HCP Label'] })));
198
- expect(wrapper.find(TextField).prop('value')).toBe('');
199
- });
200
- it('should call props.onChange correctly on item select', function () {
201
- var onChange = jest.fn();
202
- var wrapper = setUp(shallow, { selectedItemsUris: [], onChange: onChange });
203
- wrapper.find(TextField).simulate('click');
204
- rerenderWrapper(wrapper);
205
- expect(wrapper.find(SelectionPopup).prop('open')).toBe(true);
206
- wrapper.find(SelectMetadataTypesList).prop('onItemClick')(items[0], true);
207
- rerenderWrapper(wrapper);
208
- expect(onChange).toHaveBeenCalledWith([items[0].uri]);
209
- expect(wrapper.find(SelectionPopup).prop('open')).toBe(true);
210
- });
211
- it('should call props.onChange correctly and close popup on item select in single mode', function () {
212
- var onChange = jest.fn();
213
- var wrapper = setUp(shallow, { selectedItemsUris: [], onChange: onChange, single: true });
214
- wrapper.find(TextField).simulate('click');
215
- rerenderWrapper(wrapper);
216
- expect(wrapper.find(SelectionPopup).prop('open')).toBe(true);
217
- wrapper.find(SelectMetadataTypesList).prop('onItemClick')(items[0], true);
218
- rerenderWrapper(wrapper);
219
- expect(onChange).toHaveBeenCalledWith([items[0].uri]);
220
- expect(wrapper.find(SelectionPopup).prop('open')).toBe(false);
221
- });
222
- it('should call props.onChange correctly on item deselect', function () {
223
- var onChange = jest.fn();
224
- var wrapper = setUp(shallow, { selectedItemsUris: [items[0].uri], onChange: onChange });
225
- wrapper.find(SelectMetadataTypesList).prop('onItemClick')(items[0], false);
226
- expect(onChange).toHaveBeenCalledWith([]);
227
- });
228
- describe('MetadataTypesSelector behavior with RTL', function () {
229
- var originalRange = document.createRange;
230
- beforeEach(function () {
231
- document.createRange = function () {
232
- var range = new Range();
233
- range.getBoundingClientRect = jest.fn(function () {
234
- return { width: 0 };
235
- });
236
- return range;
237
- };
166
+ it('should call props.onChange correctly on item select', function () { return __awaiter(void 0, void 0, void 0, function () {
167
+ var onChange, user;
168
+ return __generator(this, function (_a) {
169
+ switch (_a.label) {
170
+ case 0:
171
+ onChange = jest.fn();
172
+ user = setUpRTL({ selectedItemsUris: [], onChange: onChange }).user;
173
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
174
+ case 1:
175
+ _a.sent();
176
+ return [4 /*yield*/, user.click(screen.getByText('HCP Label'))];
177
+ case 2:
178
+ _a.sent();
179
+ expect(onChange).toHaveBeenCalledWith(['configuration/entityTypes/HCP']);
180
+ screen.getByRole('presentation');
181
+ return [2 /*return*/];
182
+ }
183
+ });
184
+ }); });
185
+ it('should call props.onChange correctly and close popup on item select in single mode', function () { return __awaiter(void 0, void 0, void 0, function () {
186
+ var onChange, user;
187
+ return __generator(this, function (_a) {
188
+ switch (_a.label) {
189
+ case 0:
190
+ onChange = jest.fn();
191
+ user = setUpRTL({ selectedItemsUris: [], onChange: onChange, single: true }).user;
192
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
193
+ case 1:
194
+ _a.sent();
195
+ return [4 /*yield*/, user.click(screen.getByText('HCA Label'))];
196
+ case 2:
197
+ _a.sent();
198
+ expect(onChange).toHaveBeenCalledWith(['configuration/entityTypes/HCA']);
199
+ expect(screen.queryByRole('presentation')).not.toBeInTheDocument();
200
+ return [2 /*return*/];
201
+ }
238
202
  });
239
- afterEach(function () {
240
- document.createRange = originalRange;
203
+ }); });
204
+ it('should call props.onChange correctly on item deselect', function () { return __awaiter(void 0, void 0, void 0, function () {
205
+ var onChange, user;
206
+ return __generator(this, function (_a) {
207
+ switch (_a.label) {
208
+ case 0:
209
+ onChange = jest.fn();
210
+ user = setUpRTL({ selectedItemsUris: ['configuration/entityTypes/HCP'], onChange: onChange }).user;
211
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
212
+ case 1:
213
+ _a.sent();
214
+ return [4 /*yield*/, user.click(screen.getByRole('menuitem', { name: 'HCP Label' }))];
215
+ case 2:
216
+ _a.sent();
217
+ expect(onChange).toHaveBeenCalledWith([]);
218
+ return [2 /*return*/];
219
+ }
220
+ });
221
+ }); });
222
+ it('should not throw an error on clicking list item if entity does not have a label', function () { return __awaiter(void 0, void 0, void 0, function () {
223
+ var itemWithoutLabel, selectedItemsUris, user, button, popover, blankListItem, checkbox;
224
+ return __generator(this, function (_a) {
225
+ switch (_a.label) {
226
+ case 0:
227
+ itemWithoutLabel = {
228
+ uri: 'configuration/entityTypes/CompanyUri',
229
+ attributes: []
230
+ };
231
+ selectedItemsUris = [itemWithoutLabel.uri];
232
+ user = setUpRTL({ selectedItemsUris: selectedItemsUris, items: __spreadArray(__spreadArray([], items, true), [itemWithoutLabel], false) }).user;
233
+ expect(screen.getAllByText('CompanyUri')[0]).toBeInTheDocument();
234
+ button = screen.getByRole('button');
235
+ return [4 /*yield*/, user.click(button)];
236
+ case 1:
237
+ _a.sent();
238
+ popover = screen.getByRole('presentation');
239
+ expect(popover).toBeInTheDocument();
240
+ expect(within(popover).getByText('Select entity types')).toBeInTheDocument();
241
+ blankListItem = screen.getAllByRole('menuitem')[3];
242
+ expect(blankListItem).toHaveTextContent('CompanyUri');
243
+ checkbox = within(blankListItem).getByRole('checkbox');
244
+ return [4 /*yield*/, user.click(checkbox)];
245
+ case 2:
246
+ _a.sent();
247
+ return [4 /*yield*/, user.keyboard('[Escape]')];
248
+ case 3:
249
+ _a.sent();
250
+ expect(popover).not.toBeInTheDocument();
251
+ return [2 /*return*/];
252
+ }
253
+ });
254
+ }); });
255
+ it('should render all items if they do not overflow', function () {
256
+ setUpRTL({
257
+ selectedItemsUris: [
258
+ 'configuration/entityTypes/HCP',
259
+ 'configuration/entityTypes/HCA',
260
+ 'configuration/entityTypes/Company'
261
+ ]
262
+ });
263
+ expect(screen.getAllByText('HCP Label, HCA Label, Company Label')).toHaveLength(2);
264
+ });
265
+ it('should render only visible items, hidden count and tooltip if they overflow', function () {
266
+ countHiddenItems.mockReturnValue(1);
267
+ setUpRTL({
268
+ selectedItemsUris: [
269
+ 'configuration/entityTypes/HCP',
270
+ 'configuration/entityTypes/HCA',
271
+ 'configuration/entityTypes/Company'
272
+ ]
241
273
  });
242
- it('should not throw an error on clicking list item if entity does not have a label', function () { return __awaiter(void 0, void 0, void 0, function () {
243
- var itemWithoutLabel, selectedItemsUris, user, button, popover, blankListItem, checkbox;
244
- return __generator(this, function (_a) {
245
- switch (_a.label) {
246
- case 0:
247
- itemWithoutLabel = {
248
- uri: 'configuration/entityTypes/CompanyUri',
249
- attributes: []
250
- };
251
- selectedItemsUris = [itemWithoutLabel.uri];
252
- user = setUpRTL({ selectedItemsUris: selectedItemsUris, items: __spreadArray(__spreadArray([], items, true), [itemWithoutLabel], false) }).user;
253
- expect(screen.getAllByText('CompanyUri')[0]).toBeInTheDocument();
254
- button = screen.getByRole('button');
255
- return [4 /*yield*/, user.click(button)];
256
- case 1:
257
- _a.sent();
258
- popover = screen.getByRole('presentation');
259
- expect(popover).toBeInTheDocument();
260
- expect(within(popover).getByText('Select entity types')).toBeInTheDocument();
261
- blankListItem = screen.getAllByRole('menuitem')[2];
262
- expect(blankListItem).toHaveTextContent('CompanyUri');
263
- checkbox = within(blankListItem).getByRole('checkbox');
264
- return [4 /*yield*/, user.click(checkbox)];
265
- case 2:
266
- _a.sent();
267
- return [4 /*yield*/, user.keyboard('[Escape]')];
268
- case 3:
269
- _a.sent();
270
- expect(popover).not.toBeInTheDocument();
271
- return [2 /*return*/];
272
- }
273
- });
274
- }); });
274
+ screen.getByLabelText('HCP Label, HCA Label, Company Label');
275
+ screen.getByText('HCP Label, HCA Label, Company Label');
276
+ screen.getByText('HCP Label, HCA Label');
277
+ screen.getByText('+1');
275
278
  });
276
279
  });
@@ -1,18 +1,17 @@
1
1
  import React from 'react';
2
2
  import { TEntityType, TRelationType } from '@reltio/mdm-sdk';
3
3
  import { AttributeListItem } from '../../../AttributeListItem';
4
+ import { VirtualGroupedListMainItem } from '../../../VirtualGroupedList';
4
5
  type AttributeListItemProps = React.ComponentPropsWithoutRef<typeof AttributeListItem>;
5
- type Item = {
6
- item: {
7
- item: TEntityType | TRelationType;
8
- };
9
- index: number;
6
+ type Item = (TEntityType | TRelationType) & {
7
+ filterText?: string;
8
+ LogoIcon?: React.ComponentType;
10
9
  };
11
10
  type Props = {
12
11
  selectedItems: string[];
13
12
  onItemClick: AttributeListItemProps['onClick'];
14
13
  focusIndex: number;
15
- items: Item[];
14
+ items: VirtualGroupedListMainItem<Item>[];
16
15
  width: number;
17
16
  height: number;
18
17
  };