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