@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
@@ -46,14 +46,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  }
47
47
  };
48
48
  import React from 'react';
49
- import { mount } from 'enzyme';
50
- import { act } from 'react-dom/test-utils';
51
- import Tooltip from '@mui/material/Tooltip';
52
- import { PivotingTooltip } from './PivotingTooltip';
53
- import { PivotingUriLink } from '../PivotingUriLink';
49
+ import { getFilteredEntities, getTotals } from '@reltio/mdm-sdk';
50
+ import { render, screen, within } from '@testing-library/react';
51
+ import userEvent from '@testing-library/user-event';
54
52
  import { MdmModuleProvider } from '../contexts/MdmModuleContext';
55
53
  import { PivotingAttributeContext } from '../contexts/PivotingAttributeContext';
56
- jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getFilteredEntities: jest.fn() })); });
54
+ import { PivotingTooltip } from './PivotingTooltip';
55
+ jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getFilteredEntities: jest.fn(), getTotals: jest.fn() })); });
56
+ var mdmActions = { openPivotingPerspective: jest.fn() };
57
57
  var attributes = [
58
58
  {
59
59
  name: 'Phone',
@@ -83,17 +83,46 @@ var attributes = [
83
83
  var metadata = {
84
84
  entityTypes: [
85
85
  {
86
- attributes: attributes,
87
86
  uri: 'configuration/entityTypes/HCP',
87
+ attributes: attributes,
88
88
  analyticsAttributes: []
89
+ },
90
+ {
91
+ uri: 'configuration/entityTypes/HCO',
92
+ attributes: []
89
93
  }
90
94
  ]
91
95
  };
92
- var uiPath = 'https://reltio.com/nui';
93
- var openPivotingPerspective = jest.fn();
96
+ var defaultMdmValues = {
97
+ metadata: metadata,
98
+ uiPath: 'https://reltio.com/nui',
99
+ globalFilter: {
100
+ query: "((equals(type,'configuration/entityTypes/HCP') and (range(updatedTime,1622458333452,1622717533451) or range(updatedTime,1622458333452,1622717533451))))",
101
+ savedSearches: [],
102
+ savedSearchesUris: []
103
+ },
104
+ entity: { uri: 'entityUri', type: 'configuration/entityTypes/HCP' }
105
+ };
106
+ var defaultProps = {
107
+ value: {
108
+ value: '8-800-555-35-35',
109
+ ov: true,
110
+ type: 'String',
111
+ lookupCode: '8-800-555-35-35',
112
+ lookupRawValue: '8-800-555-35-35',
113
+ uri: 'configuration/entityTypes/HCP/attributes/Phone'
114
+ },
115
+ attributeType: {
116
+ name: 'Phone',
117
+ uri: 'configuration/entityTypes/HCP/attributes/Phone',
118
+ type: 'String'
119
+ },
120
+ children: '8-800-555-35-35'
121
+ };
94
122
  var defaultPivotingAttributeContextValue = [
95
123
  {
96
- uri: 'configuration/entityTypes/HCP/attributes/Phone'
124
+ uri: 'configuration/entityTypes/HCP/attributes/Phone',
125
+ popup: { label: 'HCOs', entityType: 'configuration/entityTypes/HCO' }
97
126
  },
98
127
  {
99
128
  uri: 'configuration/entityTypes/HCP/attributes/Phone2',
@@ -103,183 +132,318 @@ var defaultPivotingAttributeContextValue = [
103
132
  uri: 'configuration/entityTypes/HCP/attributes/Phone3'
104
133
  }
105
134
  ];
106
- var setUp = function (props, pivotingAttributeContextValue) {
107
- if (pivotingAttributeContextValue === void 0) { pivotingAttributeContextValue = defaultPivotingAttributeContextValue; }
108
- return mount(React.createElement(MdmModuleProvider, { values: { metadata: metadata, uiPath: uiPath }, actions: { openPivotingPerspective: openPivotingPerspective } },
135
+ var setUp = function (_a) {
136
+ var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d, _e = _b.pivotingAttributeContextValue, pivotingAttributeContextValue = _e === void 0 ? defaultPivotingAttributeContextValue : _e;
137
+ var user = userEvent.setup();
138
+ render(React.createElement(MdmModuleProvider, { values: mdmValues, actions: mdmActions },
109
139
  React.createElement(PivotingAttributeContext.Provider, { value: pivotingAttributeContextValue },
110
140
  React.createElement(PivotingTooltip, __assign({}, props)))));
141
+ return { user: user };
111
142
  };
112
- describe('PivotingTooltip tests', function () {
113
- var values = {
114
- value: '8-800-555-35-35',
115
- ov: true,
116
- type: 'String',
117
- lookupCode: '8-800-555-35-35',
118
- lookupRawValue: '8-800-555-35-35'
119
- };
120
- it('should render Tooltip for simple attributes', function () {
121
- var value = __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone' });
122
- var attributeType = {
123
- name: 'Phone',
124
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
125
- type: 'String'
143
+ describe('Pivoting tooltip test', function () {
144
+ beforeEach(function () {
145
+ var allEntities = [
146
+ { uri: 'entities/01Qi9Bv', type: 'configuration/entityTypes/HCP', label: 'hcp entity label 1' },
147
+ { uri: 'entities/ba7sAl2', type: 'configuration/entityTypes/HCP', label: 'hcp entity label 2' },
148
+ { uri: 'entities/Js28AmP', type: 'configuration/entityTypes/HCO', label: 'hco entity label 1' },
149
+ { uri: 'entities/NsmA10S', type: 'configuration/entityTypes/HCO', label: 'hco entity label 2' },
150
+ { uri: 'entities/Lk2Iq09', type: 'configuration/entityTypes/HCO', label: 'hco entity label 3' },
151
+ { uri: 'entities/jsAm291', type: 'configuration/entityTypes/HCO', label: 'hco entity label 4' },
152
+ { uri: 'entities/Nsb30A3', type: 'configuration/entityTypes/HCO', label: 'hco entity label 5' },
153
+ { uri: 'entities/Bsn13La', type: 'configuration/entityTypes/HCO', label: 'hco entity label 6' },
154
+ { uri: 'entities/JamdS14', type: 'configuration/entityTypes/HCO', label: 'hco entity label 7' }
155
+ ];
156
+ var getEntitites = function (_a) {
157
+ var values = _a.filters[0].values;
158
+ var entityType = values[0];
159
+ return allEntities.filter(function (_a) {
160
+ var type = _a.type;
161
+ return type === entityType;
162
+ });
126
163
  };
127
- var props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
128
- var component = setUp(props);
129
- var tooltip = component.find(Tooltip);
130
- expect(tooltip.length).toBe(1);
131
- var title = tooltip.prop('title');
132
- expect(title.props.attributeType).toEqual(attributeType);
133
- expect(tooltip.prop('disableInteractive')).toBe(false);
164
+ getFilteredEntities.mockImplementation(getEntitites);
165
+ getTotals.mockImplementation(function (params) { return ({ total: getEntitites(params).length }); });
134
166
  });
135
- it('should not render Tooltip for simple attributes', function () {
136
- var value = __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone123' });
137
- var attributeType = {
138
- name: 'Phone',
139
- uri: 'configuration/entityTypes/HCP/attributes/Phone123',
140
- type: 'String'
141
- };
142
- var props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
143
- var component = setUp(props);
144
- expect(component.find(Tooltip).length).toBe(0);
167
+ afterEach(function () {
168
+ jest.clearAllMocks();
145
169
  });
146
- it('should render Tooltip for nested attributes', function () {
147
- var value = {
148
- uri: 'configuration/entityTypes/HCP/attributes/Phone2',
149
- ov: true,
150
- value: {
151
- Phone3: [
152
- __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3' })
153
- ]
170
+ it('should render tooltip for simple attributes correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
171
+ var user, tooltip, popper, params;
172
+ return __generator(this, function (_a) {
173
+ switch (_a.label) {
174
+ case 0:
175
+ user = setUp().user;
176
+ return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
177
+ case 1:
178
+ tooltip = _a.sent();
179
+ expect(getTotals).toHaveBeenCalledTimes(0);
180
+ expect(getFilteredEntities).toHaveBeenCalledTimes(0);
181
+ return [4 /*yield*/, user.hover(tooltip)];
182
+ case 2:
183
+ _a.sent();
184
+ popper = screen.getByRole('tooltip');
185
+ within(popper).getByText('Pivot profiles');
186
+ within(popper).getByText('7 items');
187
+ within(popper).getByText('HCOs');
188
+ within(popper).getByText('hco entity label 1');
189
+ within(popper).getByText('hco entity label 2');
190
+ within(popper).getByText('hco entity label 3');
191
+ within(popper).getByText('hco entity label 4');
192
+ within(popper).getByText('hco entity label 5');
193
+ within(popper).getByText('hco entity label 6');
194
+ within(popper).getByText('hco entity label 7');
195
+ within(popper).getByText('See all');
196
+ params = {
197
+ filters: [
198
+ { fieldName: 'type', filter: 'equals', values: ['configuration/entityTypes/HCO'] },
199
+ { fieldName: 'attributes.Phone', filter: 'equals', values: ['8-800-555-35-35'] }
200
+ ],
201
+ options: { globalFilter: defaultMdmValues.globalFilter.query, max: 6, searchOptions: '', sort: 'label' }
202
+ };
203
+ expect(getFilteredEntities).toHaveBeenCalledWith(params);
204
+ expect(getTotals).toHaveBeenCalledWith(params);
205
+ return [2 /*return*/];
154
206
  }
155
- };
156
- var props = { value: value, attributeType: attributes[0], children: '8-800-555-35-35' };
157
- var component = setUp(props);
158
- var tooltip = component.find(Tooltip);
159
- expect(tooltip.length).toBe(1);
160
- var title = tooltip.prop('title');
161
- expect(title.props.attributeType).toEqual(attributes[0]);
162
- });
163
- it('should not render Tooltip for nested attributes', function () {
164
- var value = {
165
- uri: 'configuration/entityTypes/HCP/attributes/Phone2555',
166
- ov: true,
167
- value: {
168
- Phone3: [
169
- __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3' })
170
- ]
207
+ });
208
+ }); });
209
+ it('should not render tooltip for simple attributes if it is not pivoting attribute', function () { return __awaiter(void 0, void 0, void 0, function () {
210
+ var value, attributeType, props, user, _a, _b;
211
+ return __generator(this, function (_c) {
212
+ switch (_c.label) {
213
+ case 0:
214
+ value = __assign(__assign({}, defaultProps.value), { uri: 'configuration/entityTypes/HCP/attributes/Phone123' });
215
+ attributeType = __assign(__assign({}, defaultProps.attributeType), { uri: 'configuration/entityTypes/HCP/attributes/Phone123', name: 'Phone123' });
216
+ props = __assign(__assign({}, defaultProps), { value: value, attributeType: attributeType });
217
+ user = setUp({ props: props }).user;
218
+ _b = (_a = user).hover;
219
+ return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
220
+ case 1: return [4 /*yield*/, _b.apply(_a, [_c.sent()])];
221
+ case 2:
222
+ _c.sent();
223
+ expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
224
+ return [2 /*return*/];
171
225
  }
172
- };
173
- var attributeType = {
174
- name: 'Phone2',
175
- uri: 'configuration/entityTypes/HCP/attributes/Phone2555',
176
- type: 'Nested',
177
- attributes: [
178
- {
179
- uri: 'configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3',
180
- name: 'Phone3',
181
- type: 'String'
182
- }
183
- ]
184
- };
185
- var props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
186
- var component = setUp(props);
187
- expect(component.find(Tooltip).length).toBe(0);
188
- });
189
- it('should render Tooltip for nested attributes if children do not exist in config of pivoting', function () {
190
- var value = {
191
- uri: 'configuration/entityTypes/HCP/attributes/Phone3',
192
- ov: true,
193
- value: {
194
- Phone4: [
195
- __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone3/attributes/Phone4' })
196
- ]
226
+ });
227
+ }); });
228
+ it('should render tooltip for nested attributes correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
229
+ var value, props, user, tooltip, popper, params;
230
+ return __generator(this, function (_a) {
231
+ switch (_a.label) {
232
+ case 0:
233
+ value = {
234
+ uri: 'configuration/entityTypes/HCP/attributes/Phone2',
235
+ ov: true,
236
+ value: {
237
+ Phone3: [
238
+ {
239
+ value: '8-800-555-35-35',
240
+ ov: true,
241
+ type: 'String',
242
+ lookupCode: '8-800-555-35-35',
243
+ lookupRawValue: '8-800-555-35-35',
244
+ uri: 'configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3'
245
+ }
246
+ ]
247
+ }
248
+ };
249
+ props = __assign(__assign({}, defaultProps), { value: value, attributeType: attributes[0] });
250
+ user = setUp({ props: props }).user;
251
+ return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
252
+ case 1:
253
+ tooltip = _a.sent();
254
+ expect(getTotals).toHaveBeenCalledTimes(0);
255
+ expect(getFilteredEntities).toHaveBeenCalledTimes(0);
256
+ return [4 /*yield*/, user.hover(tooltip)];
257
+ case 2:
258
+ _a.sent();
259
+ popper = screen.getByRole('tooltip');
260
+ within(popper).getByText('Pivot profiles');
261
+ within(popper).getByText('2 items');
262
+ within(popper).getByText('hcp entity label 1');
263
+ within(popper).getByText('hcp entity label 2');
264
+ expect(within(popper).queryByText('See all')).not.toBeInTheDocument();
265
+ params = {
266
+ filters: [
267
+ { fieldName: 'type', filter: 'equals', values: ['configuration/entityTypes/HCP'] },
268
+ { fieldName: 'attributes.Phone2.Phone3', filter: 'equals', values: ['8-800-555-35-35'] }
269
+ ],
270
+ options: { globalFilter: defaultMdmValues.globalFilter.query, max: 6, searchOptions: '', sort: 'label' }
271
+ };
272
+ expect(getFilteredEntities).toHaveBeenCalledWith(params);
273
+ expect(getTotals).toHaveBeenCalledWith(params);
274
+ return [2 /*return*/];
197
275
  }
198
- };
199
- var props = { value: value, attributeType: attributes[1], children: '8-800-555-35-35' };
200
- var component = setUp(props);
201
- var tooltip = component.find(Tooltip);
202
- expect(tooltip.length).toBe(1);
203
- var title = tooltip.prop('title');
204
- expect(title.props.attributeType).toEqual(attributes[1]);
205
- });
206
- it('should render PivotingTooltipContent with correct config', function () {
207
- var _a;
208
- var value = {
209
- uri: 'configuration/entityTypes/HCP/attributes/Phone2',
210
- ov: true,
211
- value: {
212
- Phone3: [
213
- __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3' })
214
- ]
276
+ });
277
+ }); });
278
+ it('should not render tooltip for nested attributes if it is not pivoting attribute', function () { return __awaiter(void 0, void 0, void 0, function () {
279
+ var value, attributeType, props, user, _a, _b;
280
+ return __generator(this, function (_c) {
281
+ switch (_c.label) {
282
+ case 0:
283
+ value = {
284
+ uri: 'configuration/entityTypes/HCP/attributes/Phone4',
285
+ ov: true,
286
+ value: {
287
+ Phone3: [
288
+ {
289
+ value: '8-800-555-35-35',
290
+ ov: true,
291
+ type: 'String',
292
+ lookupCode: '8-800-555-35-35',
293
+ lookupRawValue: '8-800-555-35-35',
294
+ uri: 'configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3'
295
+ }
296
+ ]
297
+ }
298
+ };
299
+ attributeType = __assign(__assign({}, attributes[0]), { name: 'Phone4', uri: 'configuration/entityTypes/HCP/attributes/Phone4' });
300
+ props = __assign(__assign({}, defaultProps), { value: value, attributeType: attributeType });
301
+ user = setUp({ props: props }).user;
302
+ _b = (_a = user).hover;
303
+ return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
304
+ case 1: return [4 /*yield*/, _b.apply(_a, [_c.sent()])];
305
+ case 2:
306
+ _c.sent();
307
+ expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
308
+ return [2 /*return*/];
215
309
  }
216
- };
217
- var pivotingAttributeContextValue = [
218
- __assign(__assign({}, defaultPivotingAttributeContextValue[1]), { popup: {
219
- label: 'HCOs',
220
- entityType: 'HCO'
221
- } })
222
- ];
223
- var props = { value: value, attributeType: attributes[0], children: '8-800-555-35-35' };
224
- var component = setUp(props, pivotingAttributeContextValue);
225
- var title = component.find(Tooltip).prop('title');
226
- expect(title.props.label).toEqual((_a = pivotingAttributeContextValue[0].popup) === null || _a === void 0 ? void 0 : _a.label);
227
- });
228
- it('should not fail if pivotingAttributesList is null', function () {
229
- var value = __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone' });
230
- var attributeType = {
231
- name: 'Phone',
232
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
233
- type: 'String'
234
- };
235
- var props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
236
- var component = setUp(props, null);
237
- var tooltip = component.find(Tooltip);
238
- expect(tooltip.length).toBe(0);
239
- });
240
- it('should open pivoting perspective on click for simple attribute', function () { return __awaiter(void 0, void 0, void 0, function () {
241
- var value, attributeType, props, component;
242
- return __generator(this, function (_a) {
243
- value = __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone' });
244
- attributeType = {
245
- name: 'Phone',
246
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
247
- type: 'String'
248
- };
249
- props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
250
- component = setUp(props);
251
- act(function () {
252
- component.find(PivotingUriLink).prop('onClick')();
253
- });
254
- expect(openPivotingPerspective).toHaveBeenCalledWith({ value: [{ Phone: '8-800-555-35-35' }], attributeType: attributeType });
255
- return [2 /*return*/];
256
310
  });
257
311
  }); });
258
- it('should open pivoting perspective on click for nested attribute', function () { return __awaiter(void 0, void 0, void 0, function () {
259
- var value, props, component, generatedValue;
312
+ it('should render tooltip for nested attributes if children do not exist in config of pivoting', function () { return __awaiter(void 0, void 0, void 0, function () {
313
+ var value, props, user, _a, _b, popper, params;
314
+ return __generator(this, function (_c) {
315
+ switch (_c.label) {
316
+ case 0:
317
+ value = {
318
+ uri: 'configuration/entityTypes/HCP/attributes/Phone3',
319
+ ov: true,
320
+ value: {
321
+ Phone4: [
322
+ {
323
+ value: '8-800-555-35-35',
324
+ ov: true,
325
+ type: 'String',
326
+ lookupCode: '8-800-555-35-35',
327
+ lookupRawValue: '8-800-555-35-35',
328
+ uri: 'configuration/entityTypes/HCP/attributes/Phone3/attributes/Phone4'
329
+ }
330
+ ]
331
+ }
332
+ };
333
+ props = __assign(__assign({}, defaultProps), { value: value, attributeType: attributes[1] });
334
+ user = setUp({ props: props }).user;
335
+ _b = (_a = user).hover;
336
+ return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
337
+ case 1: return [4 /*yield*/, _b.apply(_a, [_c.sent()])];
338
+ case 2:
339
+ _c.sent();
340
+ popper = screen.getByRole('tooltip');
341
+ within(popper).getByText('Pivot profiles');
342
+ within(popper).getByText('2 items');
343
+ within(popper).getByText('hcp entity label 1');
344
+ within(popper).getByText('hcp entity label 2');
345
+ expect(within(popper).queryByText('See all')).not.toBeInTheDocument();
346
+ params = {
347
+ filters: [
348
+ { fieldName: 'type', filter: 'equals', values: ['configuration/entityTypes/HCP'] },
349
+ { fieldName: 'attributes.Phone3.Phone4', filter: 'equals', values: ['8-800-555-35-35'] }
350
+ ],
351
+ options: { globalFilter: defaultMdmValues.globalFilter.query, max: 6, searchOptions: '', sort: 'label' }
352
+ };
353
+ expect(getFilteredEntities).toHaveBeenCalledWith(params);
354
+ expect(getTotals).toHaveBeenCalledWith(params);
355
+ return [2 /*return*/];
356
+ }
357
+ });
358
+ }); });
359
+ it('should not fail if pivoting attributes list is null', function () { return __awaiter(void 0, void 0, void 0, function () {
260
360
  return __generator(this, function (_a) {
261
- value = {
262
- uri: 'configuration/entityTypes/HCP/attributes/Phone2',
263
- ov: true,
264
- value: {
265
- Phone3: [
266
- __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3' })
267
- ]
268
- }
269
- };
270
- props = { value: value, attributeType: attributes[0], children: '8-800-555-35-35' };
271
- component = setUp(props);
272
- act(function () {
273
- component.find(PivotingUriLink).prop('onClick')();
274
- });
275
- generatedValue = [{ Phone3: ['8-800-555-35-35'] }];
276
- expect(openPivotingPerspective).toHaveBeenCalledWith({
277
- value: generatedValue,
278
- attributeType: attributes[0]
279
- });
280
- expect(component.find(PivotingUriLink).prop('value')).toEqual(generatedValue);
281
- expect(component.find(PivotingUriLink).prop('attributeType')).toEqual(attributes[0]);
282
- return [2 /*return*/];
361
+ switch (_a.label) {
362
+ case 0:
363
+ setUp({ pivotingAttributeContextValue: null });
364
+ return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
365
+ case 1:
366
+ _a.sent();
367
+ return [2 /*return*/];
368
+ }
369
+ });
370
+ }); });
371
+ it('should open pivoting perspective on simple attribute click correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
372
+ var user, _a, _b;
373
+ return __generator(this, function (_c) {
374
+ switch (_c.label) {
375
+ case 0:
376
+ user = setUp().user;
377
+ _b = (_a = user).click;
378
+ return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
379
+ case 1: return [4 /*yield*/, _b.apply(_a, [_c.sent()])];
380
+ case 2:
381
+ _c.sent();
382
+ expect(mdmActions.openPivotingPerspective).toHaveBeenCalledWith({
383
+ attributeType: defaultProps.attributeType,
384
+ value: [{ Phone: '8-800-555-35-35' }]
385
+ });
386
+ return [2 /*return*/];
387
+ }
388
+ });
389
+ }); });
390
+ it('should open pivoting perspective on nested attribute click correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
391
+ var value, attributeType, props, user, _a, _b;
392
+ return __generator(this, function (_c) {
393
+ switch (_c.label) {
394
+ case 0:
395
+ value = {
396
+ uri: 'configuration/entityTypes/HCP/attributes/Phone2',
397
+ ov: true,
398
+ value: {
399
+ Phone3: [
400
+ {
401
+ value: '8-800-555-35-35',
402
+ ov: true,
403
+ type: 'String',
404
+ lookupCode: '8-800-555-35-35',
405
+ lookupRawValue: '8-800-555-35-35',
406
+ uri: 'configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3'
407
+ }
408
+ ]
409
+ }
410
+ };
411
+ attributeType = attributes[0];
412
+ props = __assign(__assign({}, defaultProps), { value: value, attributeType: attributeType });
413
+ user = setUp({ props: props }).user;
414
+ _b = (_a = user).click;
415
+ return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
416
+ case 1: return [4 /*yield*/, _b.apply(_a, [_c.sent()])];
417
+ case 2:
418
+ _c.sent();
419
+ expect(mdmActions.openPivotingPerspective).toHaveBeenCalledWith({
420
+ attributeType: attributeType,
421
+ value: [{ Phone3: ['8-800-555-35-35'] }]
422
+ });
423
+ return [2 /*return*/];
424
+ }
425
+ });
426
+ }); });
427
+ it('should open pivoting perspective on see all button click correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
428
+ var user, _a, _b;
429
+ return __generator(this, function (_c) {
430
+ switch (_c.label) {
431
+ case 0:
432
+ user = setUp().user;
433
+ _b = (_a = user).hover;
434
+ return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
435
+ case 1: return [4 /*yield*/, _b.apply(_a, [_c.sent()])];
436
+ case 2:
437
+ _c.sent();
438
+ return [4 /*yield*/, user.click(screen.getByText('See all'))];
439
+ case 3:
440
+ _c.sent();
441
+ expect(mdmActions.openPivotingPerspective).toHaveBeenCalledWith({
442
+ attributeType: defaultProps.attributeType,
443
+ value: [{ Phone: '8-800-555-35-35' }]
444
+ });
445
+ return [2 /*return*/];
446
+ }
283
447
  });
284
448
  }); });
285
449
  });