@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
@@ -1,356 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- var __generator = (this && this.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
23
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
- function verb(n) { return function (v) { return step([n, v]); }; }
25
- function step(op) {
26
- if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
- if (y = 0, t) op = [op[0] & 2, t.value];
30
- switch (op[0]) {
31
- case 0: case 1: t = op; break;
32
- case 4: _.label++; return { value: op[1], done: false };
33
- case 5: _.label++; y = op[1]; op = [0]; continue;
34
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
- default:
36
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
- if (t[2]) _.ops.pop();
41
- _.trys.pop(); continue;
42
- }
43
- op = body.call(thisArg, _);
44
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
- }
47
- };
48
- import React from 'react';
49
- import { getFilteredEntities, getTotals } from '@reltio/mdm-sdk';
50
- import { render, screen } from '@testing-library/react';
51
- import userEvent from '@testing-library/user-event';
52
- import { MdmModuleProvider } from '../contexts/MdmModuleContext';
53
- import { PivotingAttributeContext } from '../contexts/PivotingAttributeContext';
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 attributes = [
57
- {
58
- name: 'Phone',
59
- uri: 'configuration/entityTypes/HCP/attributes/Phone2',
60
- type: 'Nested',
61
- attributes: [
62
- {
63
- uri: 'configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3',
64
- name: 'Phone3',
65
- type: 'String'
66
- }
67
- ]
68
- },
69
- {
70
- name: 'Phone3',
71
- uri: 'configuration/entityTypes/HCP/attributes/Phone3',
72
- type: 'Nested',
73
- attributes: [
74
- {
75
- uri: 'configuration/entityTypes/HCP/attributes/Phone3/attributes/Phone4',
76
- name: 'Phone4',
77
- type: 'String'
78
- }
79
- ]
80
- }
81
- ];
82
- var metadata = {
83
- entityTypes: [
84
- {
85
- attributes: attributes,
86
- uri: 'configuration/entityTypes/HCP',
87
- analyticsAttributes: []
88
- }
89
- ]
90
- };
91
- var uiPath = 'https://reltio.com/nui';
92
- var openPivotingPerspective = jest.fn();
93
- var defaultPivotingAttributeContextValue = [
94
- {
95
- uri: 'configuration/entityTypes/HCP/attributes/Phone'
96
- },
97
- {
98
- uri: 'configuration/entityTypes/HCP/attributes/Phone2',
99
- children: ['configuration/entityTypes/HCP/attributes/Phone2/attributes/Phone3']
100
- },
101
- {
102
- uri: 'configuration/entityTypes/HCP/attributes/Phone3'
103
- }
104
- ];
105
- var globalFilter = {
106
- query: "((equals(type,'configuration/entityTypes/HCP') and (range(updatedTime,1622458333452,1622717533451) or range(updatedTime,1622458333452,1622717533451))))",
107
- savedSearches: [],
108
- savedSearchesUris: []
109
- };
110
- var mockGetFilteredEntitiesResponse = [
111
- {
112
- uri: 'entities/01Qi9Bv',
113
- type: 'configuration/entityTypes/HCP',
114
- label: 'entity label'
115
- }
116
- ];
117
- var setUp = function (props, pivotingAttributeContextValue) {
118
- if (pivotingAttributeContextValue === void 0) { pivotingAttributeContextValue = defaultPivotingAttributeContextValue; }
119
- var user = userEvent.setup();
120
- render(React.createElement(MdmModuleProvider, { values: {
121
- metadata: metadata,
122
- uiPath: uiPath,
123
- globalFilter: globalFilter,
124
- entity: {
125
- uri: 'entityUri',
126
- type: 'configuration/entityTypes/HCP'
127
- }
128
- }, actions: { openPivotingPerspective: openPivotingPerspective } },
129
- React.createElement(PivotingAttributeContext.Provider, { value: pivotingAttributeContextValue },
130
- React.createElement(PivotingTooltip, __assign({}, props)))));
131
- return { user: user };
132
- };
133
- describe('PivotingTooltip test', function () {
134
- var values = {
135
- value: '8-800-555-35-35',
136
- ov: true,
137
- type: 'String',
138
- lookupCode: '8-800-555-35-35',
139
- lookupRawValue: '8-800-555-35-35'
140
- };
141
- beforeEach(function () {
142
- getFilteredEntities.mockResolvedValue(mockGetFilteredEntitiesResponse);
143
- getTotals.mockResolvedValue({ total: 5 });
144
- });
145
- it('getTotals should not be called if user do not hover tooltip', function () { return __awaiter(void 0, void 0, void 0, function () {
146
- var value, attributeType, props, tooltip;
147
- return __generator(this, function (_a) {
148
- switch (_a.label) {
149
- case 0:
150
- value = __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone' });
151
- attributeType = {
152
- name: 'Phone',
153
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
154
- type: 'String'
155
- };
156
- props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
157
- setUp(props);
158
- return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
159
- case 1:
160
- tooltip = _a.sent();
161
- expect(tooltip).toBeInTheDocument();
162
- expect(getTotals).toHaveBeenCalledTimes(0);
163
- expect(getFilteredEntities).toHaveBeenCalledTimes(0);
164
- return [2 /*return*/];
165
- }
166
- });
167
- }); });
168
- it('getFilteredEntities should be called with correct params', function () { return __awaiter(void 0, void 0, void 0, function () {
169
- var value, attributeType, props, user, tooltip, tooltipHeader, tooltipContent;
170
- return __generator(this, function (_a) {
171
- switch (_a.label) {
172
- case 0:
173
- value = __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone' });
174
- attributeType = {
175
- name: 'Phone',
176
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
177
- type: 'String'
178
- };
179
- props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
180
- user = setUp(props).user;
181
- return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
182
- case 1:
183
- tooltip = _a.sent();
184
- return [4 /*yield*/, user.hover(tooltip)];
185
- case 2:
186
- _a.sent();
187
- return [4 /*yield*/, screen.findByText('Pivot profiles')];
188
- case 3:
189
- tooltipHeader = _a.sent();
190
- expect(tooltipHeader).toBeInTheDocument();
191
- return [4 /*yield*/, screen.findByText('entity label')];
192
- case 4:
193
- tooltipContent = _a.sent();
194
- expect(tooltipContent).toBeInTheDocument();
195
- expect(getFilteredEntities).toHaveBeenCalledWith({
196
- filters: [
197
- { fieldName: 'type', filter: 'equals', values: ['configuration/entityTypes/HCP'] },
198
- { fieldName: 'attributes.Phone', filter: 'equals', values: ['8-800-555-35-35'] }
199
- ],
200
- options: {
201
- activityFilter: undefined,
202
- globalFilter: "((equals(type,'configuration/entityTypes/HCP') and (range(updatedTime,1622458333452,1622717533451) or range(updatedTime,1622458333452,1622717533451))))",
203
- max: 6,
204
- searchOptions: '',
205
- sort: 'label'
206
- }
207
- });
208
- return [2 /*return*/];
209
- }
210
- });
211
- }); });
212
- it('getFilteredEntities should be called with correct entity type if PivotingAttributeContextValue contain popup', function () { return __awaiter(void 0, void 0, void 0, function () {
213
- var value, attributeType, props, pivotingAttributeContextValue, user, tooltip, tooltipHeader, tooltipContent;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
216
- case 0:
217
- value = __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone' });
218
- attributeType = {
219
- name: 'Phone',
220
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
221
- type: 'String'
222
- };
223
- props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
224
- pivotingAttributeContextValue = [
225
- {
226
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
227
- popup: { entityType: 'configuration/entityTypes/HCP_1', label: 'HCPs status' }
228
- }
229
- ];
230
- user = setUp(props, pivotingAttributeContextValue).user;
231
- return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
232
- case 1:
233
- tooltip = _a.sent();
234
- return [4 /*yield*/, user.hover(tooltip)];
235
- case 2:
236
- _a.sent();
237
- return [4 /*yield*/, screen.findByText('Pivot profiles')];
238
- case 3:
239
- tooltipHeader = _a.sent();
240
- expect(tooltipHeader).toBeInTheDocument();
241
- return [4 /*yield*/, screen.findByText('entity label')];
242
- case 4:
243
- tooltipContent = _a.sent();
244
- expect(tooltipContent).toBeInTheDocument();
245
- expect(getFilteredEntities).toHaveBeenCalledWith({
246
- filters: [
247
- { fieldName: 'type', filter: 'equals', values: ['configuration/entityTypes/HCP_1'] },
248
- { fieldName: 'attributes.Phone', filter: 'equals', values: ['8-800-555-35-35'] }
249
- ],
250
- options: {
251
- activityFilter: undefined,
252
- globalFilter: "((equals(type,'configuration/entityTypes/HCP') and (range(updatedTime,1622458333452,1622717533451) or range(updatedTime,1622458333452,1622717533451))))",
253
- max: 6,
254
- searchOptions: '',
255
- sort: 'label'
256
- }
257
- });
258
- return [2 /*return*/];
259
- }
260
- });
261
- }); });
262
- it('getTotals should be called with correct params', function () { return __awaiter(void 0, void 0, void 0, function () {
263
- var value, attributeType, props, user, tooltip, tooltipHeader, tooltipContent;
264
- return __generator(this, function (_a) {
265
- switch (_a.label) {
266
- case 0:
267
- value = __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone' });
268
- attributeType = {
269
- name: 'Phone',
270
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
271
- type: 'String'
272
- };
273
- props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
274
- user = setUp(props).user;
275
- return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
276
- case 1:
277
- tooltip = _a.sent();
278
- return [4 /*yield*/, user.hover(tooltip)];
279
- case 2:
280
- _a.sent();
281
- return [4 /*yield*/, screen.findByText('Pivot profiles')];
282
- case 3:
283
- tooltipHeader = _a.sent();
284
- expect(tooltipHeader).toBeInTheDocument();
285
- return [4 /*yield*/, screen.findByText('entity label')];
286
- case 4:
287
- tooltipContent = _a.sent();
288
- expect(tooltipContent).toBeInTheDocument();
289
- expect(getTotals).toHaveBeenCalledWith({
290
- filters: [
291
- { fieldName: 'type', filter: 'equals', values: ['configuration/entityTypes/HCP'] },
292
- { fieldName: 'attributes.Phone', filter: 'equals', values: ['8-800-555-35-35'] }
293
- ],
294
- options: {
295
- activityFilter: undefined,
296
- globalFilter: "((equals(type,'configuration/entityTypes/HCP') and (range(updatedTime,1622458333452,1622717533451) or range(updatedTime,1622458333452,1622717533451))))",
297
- max: 6,
298
- searchOptions: '',
299
- sort: 'label'
300
- }
301
- });
302
- return [2 /*return*/];
303
- }
304
- });
305
- }); });
306
- it('getTotals should be called with correct entity type if PivotingAttributeContextValue contain popup', function () { return __awaiter(void 0, void 0, void 0, function () {
307
- var value, attributeType, props, pivotingAttributeContextValue, user, tooltip, tooltipHeader, tooltipContent;
308
- return __generator(this, function (_a) {
309
- switch (_a.label) {
310
- case 0:
311
- value = __assign(__assign({}, values), { uri: 'configuration/entityTypes/HCP/attributes/Phone' });
312
- attributeType = {
313
- name: 'Phone',
314
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
315
- type: 'String'
316
- };
317
- props = { value: value, attributeType: attributeType, children: '8-800-555-35-35' };
318
- pivotingAttributeContextValue = [
319
- {
320
- uri: 'configuration/entityTypes/HCP/attributes/Phone',
321
- popup: { entityType: 'configuration/entityTypes/HCP_1', label: 'HCPs status' }
322
- }
323
- ];
324
- user = setUp(props, pivotingAttributeContextValue).user;
325
- return [4 /*yield*/, screen.findByText('8-800-555-35-35')];
326
- case 1:
327
- tooltip = _a.sent();
328
- return [4 /*yield*/, user.hover(tooltip)];
329
- case 2:
330
- _a.sent();
331
- return [4 /*yield*/, screen.findByText('Pivot profiles')];
332
- case 3:
333
- tooltipHeader = _a.sent();
334
- expect(tooltipHeader).toBeInTheDocument();
335
- return [4 /*yield*/, screen.findByText('entity label')];
336
- case 4:
337
- tooltipContent = _a.sent();
338
- expect(tooltipContent).toBeInTheDocument();
339
- expect(getTotals).toHaveBeenCalledWith({
340
- filters: [
341
- { fieldName: 'type', filter: 'equals', values: ['configuration/entityTypes/HCP_1'] },
342
- { fieldName: 'attributes.Phone', filter: 'equals', values: ['8-800-555-35-35'] }
343
- ],
344
- options: {
345
- activityFilter: undefined,
346
- globalFilter: "((equals(type,'configuration/entityTypes/HCP') and (range(updatedTime,1622458333452,1622717533451) or range(updatedTime,1622458333452,1622717533451))))",
347
- max: 6,
348
- searchOptions: '',
349
- sort: 'label'
350
- }
351
- });
352
- return [2 /*return*/];
353
- }
354
- });
355
- }); });
356
- });
@@ -1,201 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- var __generator = (this && this.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
23
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
- function verb(n) { return function (v) { return step([n, v]); }; }
25
- function step(op) {
26
- if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
- if (y = 0, t) op = [op[0] & 2, t.value];
30
- switch (op[0]) {
31
- case 0: case 1: t = op; break;
32
- case 4: _.label++; return { value: op[1], done: false };
33
- case 5: _.label++; y = op[1]; op = [0]; continue;
34
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
- default:
36
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
- if (t[2]) _.ops.pop();
41
- _.trys.pop(); continue;
42
- }
43
- op = body.call(thisArg, _);
44
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
- }
47
- };
48
- import React from 'react';
49
- import { mount } from 'enzyme';
50
- import { act } from 'react-dom/test-utils';
51
- import { getTotals } from '@reltio/mdm-sdk';
52
- import { PivotingUriLink } from '../../../PivotingUriLink';
53
- import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
54
- import { PivotingTooltipContent } from './PivotingTooltipContent';
55
- jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getFilteredEntities: jest.fn(), getTotals: jest.fn() })); });
56
- jest.mock('../../../EntityAvatar', function () { return ({
57
- EntityAvatar: function () { return React.createElement("div", null); }
58
- }); });
59
- var entityType = 'configuration/entityTypes/HCP';
60
- var entity = {
61
- uri: 'entities/13JKIKAz',
62
- type: entityType,
63
- attributes: {},
64
- label: 'Active'
65
- };
66
- var mdmValues = {
67
- activityFilter: undefined,
68
- globalFilter: {
69
- query: "((equals(type,'configuration/entityTypes/HCP') and (range(updatedTime,1622458333452,1622717533451) or range(updatedTime,1622458333452,1622717533451))))",
70
- savedSearches: [],
71
- savedSearchesUris: []
72
- },
73
- searchOptions: {},
74
- entity: entity,
75
- uiPath: 'https://reltio.com/nui'
76
- };
77
- var defaultProps = {
78
- generatedValue: [{ CountryCode: 'IT' }],
79
- value: '123 456',
80
- attributeType: {
81
- label: 'Country Code',
82
- name: 'CountryCode',
83
- type: 'String',
84
- uri: 'configuration/entityTypes/HCP/attributes/CountryCode'
85
- },
86
- config: {},
87
- onSeeAllClick: jest.fn(),
88
- entities: [
89
- {
90
- uri: 'entities/1',
91
- type: 'configuration/entityTypes/HCP',
92
- label: 'BulkUpdate_regression_12',
93
- secondaryLabel: 'UKyFCjjugYimtXm Ihmetwet'
94
- }
95
- ],
96
- total: 2
97
- };
98
- var setUp = function (props) {
99
- if (props === void 0) { props = defaultProps; }
100
- return mount(React.createElement(MdmModuleProvider, { values: mdmValues },
101
- React.createElement(PivotingTooltipContent, __assign({}, props))));
102
- };
103
- describe('PivotingTooltipContent test', function () {
104
- it('EntityUriLink should be rendered', function () { return __awaiter(void 0, void 0, void 0, function () {
105
- var component, entityContainer;
106
- return __generator(this, function (_a) {
107
- component = setUp();
108
- expect(component).not.toBeNull();
109
- entityContainer = component.find('.entityContainer');
110
- expect(entityContainer.length).toBe(1);
111
- return [2 /*return*/];
112
- });
113
- }); });
114
- it('EntityUriLink should be rendered with to many entities', function () { return __awaiter(void 0, void 0, void 0, function () {
115
- var component, entityContainer;
116
- return __generator(this, function (_a) {
117
- component = setUp(__assign(__assign({}, defaultProps), { entities: [
118
- {
119
- uri: 'entities/1',
120
- type: 'configuration/entityTypes/HCP',
121
- label: 'BulkUpdate_regression_12',
122
- secondaryLabel: 'UKyFCjjugYimtXm Ihmetwet'
123
- },
124
- {
125
- uri: 'entities/2',
126
- type: 'configuration/entityTypes/HCP',
127
- label: 'BulkUpdate_regression_12',
128
- secondaryLabel: 'UKyFCjjugYimtXm Ihmetwet'
129
- },
130
- {
131
- uri: 'entities/3',
132
- type: 'configuration/entityTypes/HCP',
133
- label: 'BulkUpdate_regression_12',
134
- secondaryLabel: 'UKyFCjjugYimtXm Ihmetwet'
135
- },
136
- {
137
- uri: 'entities/4',
138
- type: 'configuration/entityTypes/HCP',
139
- label: 'BulkUpdate_regression_12',
140
- secondaryLabel: 'UKyFCjjugYimtXm Ihmetwet'
141
- },
142
- {
143
- uri: 'entities/5',
144
- type: 'configuration/entityTypes/HCP',
145
- label: 'BulkUpdate_regression_12',
146
- secondaryLabel: 'UKyFCjjugYimtXm Ihmetwet'
147
- },
148
- {
149
- uri: 'entities/6',
150
- type: 'configuration/entityTypes/HCP',
151
- label: 'BulkUpdate_regression_12',
152
- secondaryLabel: 'UKyFCjjugYimtXm Ihmetwet'
153
- }
154
- ] }));
155
- expect(component).not.toBeNull();
156
- entityContainer = component.find('.entityContainer');
157
- expect(entityContainer.length).toBe(6);
158
- return [2 /*return*/];
159
- });
160
- }); });
161
- it('should show number of items correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
162
- var component;
163
- return __generator(this, function (_a) {
164
- component = setUp();
165
- expect(component.find('.headerCount').text()).toBe('2 items');
166
- return [2 /*return*/];
167
- });
168
- }); });
169
- it('should not show footer with see all button if total count less than 6', function () { return __awaiter(void 0, void 0, void 0, function () {
170
- var component;
171
- return __generator(this, function (_a) {
172
- getTotals.mockImplementation(function () { return Promise.resolve({ total: 4 }); });
173
- component = setUp();
174
- expect(component.find('.footer')).toHaveLength(0);
175
- return [2 /*return*/];
176
- });
177
- }); });
178
- it('should show footer with see all button if total count more than 6', function () { return __awaiter(void 0, void 0, void 0, function () {
179
- var component;
180
- return __generator(this, function (_a) {
181
- getTotals.mockImplementation(function () { return Promise.resolve({ total: 10 }); });
182
- component = setUp(__assign(__assign({}, defaultProps), { total: 7 }));
183
- expect(component.find('.footer')).toHaveLength(1);
184
- return [2 /*return*/];
185
- });
186
- }); });
187
- it('handleClickSeeAll handler should work and the properties are passed correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
188
- var generatedValue, attributeType, onSeeAllClick, component;
189
- return __generator(this, function (_a) {
190
- generatedValue = defaultProps.generatedValue, attributeType = defaultProps.attributeType, onSeeAllClick = defaultProps.onSeeAllClick;
191
- component = setUp(__assign(__assign({}, defaultProps), { total: 7 }));
192
- act(function () {
193
- component.find(PivotingUriLink).prop('onClick')();
194
- });
195
- expect(onSeeAllClick).toHaveBeenCalled();
196
- expect(component.find(PivotingUriLink).prop('value')).toEqual(generatedValue);
197
- expect(component.find(PivotingUriLink).prop('attributeType')).toEqual(attributeType);
198
- return [2 /*return*/];
199
- });
200
- }); });
201
- });
@@ -1,43 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import { ProfileCardContent } from './ProfileCardContent';
4
- import { EntityAvatar } from '../../../EntityAvatar';
5
- import { ExpandedValueTooltip } from '../../../ExpandedValueTooltip';
6
- import { EntityTypeBadge } from '../../../EntityTypeBadge';
7
- import { EntityUriLink } from '../../../EntityUriLink';
8
- describe('ProfileCardContent tests', function () {
9
- var entity = {
10
- uri: 'entities/123',
11
- label: 'Main label',
12
- secondaryLabel: 'secondary label',
13
- type: 'configuration/entityTypes/HCP'
14
- };
15
- var writeTextFn = jest.fn();
16
- beforeAll(function () {
17
- Object.assign(navigator, {
18
- clipboard: {
19
- writeText: writeTextFn
20
- }
21
- });
22
- });
23
- it('should render main parts', function () {
24
- var component = shallow(React.createElement(ProfileCardContent, { entity: entity }));
25
- expect(component.find(EntityAvatar).length).toBe(1);
26
- expect(component.find(EntityAvatar).prop('entity')).toBe(entity);
27
- var link = component.find(EntityUriLink);
28
- expect(link.length).toBe(1);
29
- expect(link.prop('value')).toBe('entities/123');
30
- var expandedValueTooltip = link.find(ExpandedValueTooltip);
31
- expect(expandedValueTooltip.length).toBe(1);
32
- expect(expandedValueTooltip.prop('value')).toBe(entity.label);
33
- expect(component.find(ExpandedValueTooltip).at(1).prop('value')).toBe(entity.secondaryLabel);
34
- expect(component.find(EntityTypeBadge).length).toBe(1);
35
- expect(component.find(EntityTypeBadge).prop('entity')).toBe(entity);
36
- expect(component.find('.entityIdValue').text()).toBe(entity.uri.split('/')[1]);
37
- });
38
- it('should copy entity ID on click', function () {
39
- var component = shallow(React.createElement(ProfileCardContent, { entity: entity }));
40
- component.find('.entityId').simulate('click');
41
- expect(writeTextFn).toHaveBeenCalledWith('123');
42
- });
43
- });
@@ -1,31 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import React from 'react';
13
- import { shallow } from 'enzyme';
14
- import { ReadOnlyFilter } from './ReadOnlyFilter';
15
- describe('ReadOnlyFilter tests', function () {
16
- it('should render filter if rowData.filter is defined', function () {
17
- var props = {
18
- rowData: { filter: 'exists' },
19
- rowContext: {}
20
- };
21
- var component = shallow(React.createElement(ReadOnlyFilter, __assign({}, props)));
22
- expect(component.text()).toBe('exists');
23
- });
24
- it('should render "equals" if rowData is undefined', function () {
25
- var props = {
26
- rowContext: {}
27
- };
28
- var component = shallow(React.createElement(ReadOnlyFilter, __assign({}, props)));
29
- expect(component.text()).toBe('equals');
30
- });
31
- });
@@ -1,31 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import React from 'react';
13
- import { shallow } from 'enzyme';
14
- import { ReadOnlyLogicOperator } from './ReadOnlyLogicOperator';
15
- describe('ReadOnlyLogicOperator tests', function () {
16
- it('should show capitalized logic operator when operator is defined', function () {
17
- var props = {
18
- rowData: { operator: 'and' },
19
- rowContext: {}
20
- };
21
- var component = shallow(React.createElement(ReadOnlyLogicOperator, __assign({}, props)));
22
- expect(component.text()).toBe('And');
23
- });
24
- it('should show "Where" caption when operator is undefined', function () {
25
- var props = {
26
- rowContext: {}
27
- };
28
- var component = shallow(React.createElement(ReadOnlyLogicOperator, __assign({}, props)));
29
- expect(component.text()).toBe('Where');
30
- });
31
- });