@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
@@ -26,7 +26,7 @@ import { ReadOnlyAttributesView } from '../ReadOnlyAttributesView';
26
26
  import { EditModeAttributesView } from '../EditModeAttributesView';
27
27
  import { EntityContext } from '../contexts/EntityContext';
28
28
  import { useMdmEntityWithDiff, useMdmMode } from '../contexts/MdmModuleContext';
29
- import { AlwaysVisibleAttributesContext } from '../contexts/AllwaysVisibleAttributesContext';
29
+ import { AlwaysVisibleAttributesContext } from '../contexts/AlwaysVisibleAttributesContext';
30
30
  export var AttributesView = function (_a) {
31
31
  var attributesCount = _a.attributesCount, pinnedAttributes = _a.pinnedAttributes, _b = _a.alwaysVisible, alwaysVisible = _b === void 0 ? [] : _b, restProps = __rest(_a, ["attributesCount", "pinnedAttributes", "alwaysVisible"]);
32
32
  var mdmEntity = useMdmEntityWithDiff();
@@ -1,14 +1,13 @@
1
1
  import React from 'react';
2
2
  import { GroupedColumnsData } from '../../../types/basicTable';
3
+ import { ListItem } from '../../types';
3
4
  type Props = {
4
5
  anchorEl: HTMLElement;
5
6
  onClose: () => void;
6
7
  title?: string;
7
8
  inputPlaceholder?: string;
8
9
  columnsData: GroupedColumnsData[];
9
- onColumnClick: (column: {
10
- id: string;
11
- }) => void;
10
+ onColumnClick: (column: ListItem) => void;
12
11
  selectedColumns: string[];
13
12
  hideCheckBox?: boolean;
14
13
  };
@@ -1,6 +1,8 @@
1
1
  import { ColumnData, GroupedColumnsData } from '../types/basicTable';
2
+ import { VirtualGroupedListItem } from '../VirtualGroupedList/types';
3
+ import { ListItem } from './types';
2
4
  declare const isGroupColumn: (column: ColumnData) => boolean;
3
- declare const buildColumnItems: (columnsData: GroupedColumnsData[], filterText: string) => ColumnData[];
5
+ declare const buildColumnItems: (columnsData: GroupedColumnsData[], filterText: string) => VirtualGroupedListItem<ListItem>[];
4
6
  declare const getChildColumns: (column: ColumnData) => ColumnData[];
5
7
  declare const isColumnSelected: (selectedColumns: string[], column: ColumnData) => boolean;
6
8
  export { buildColumnItems, getChildColumns, isGroupColumn, isColumnSelected };
@@ -0,0 +1,8 @@
1
+ import { DataTypeDefinition } from '@reltio/mdm-sdk';
2
+ export type ListItem = {
3
+ id: string;
4
+ label: string;
5
+ groupId?: string;
6
+ filterText?: string;
7
+ attrType?: DataTypeDefinition;
8
+ };
@@ -53,7 +53,7 @@ export var CommentsContainer = function (_a) {
53
53
  var allRelatedObjectUris = useMemo(function () {
54
54
  return additionalRelatedObjectUris ? __spreadArray(__spreadArray([], relatedObjectUris, true), additionalRelatedObjectUris, true) : relatedObjectUris;
55
55
  }, [additionalRelatedObjectUris, relatedObjectUris]);
56
- return (showComments && (React.createElement("div", { className: classnames(styles.root, className) },
56
+ return (showComments && (React.createElement("div", { "data-reltio-id": "comments-container", className: classnames(styles.root, className) },
57
57
  shouldShowAddCommentButton && (React.createElement(AddCommentButton, { className: classnames(styles.addButton, (_b = {},
58
58
  _b[styles.showAlways] = showAlways || isOpenPopupWithNewComment,
59
59
  _b)), onClick: handleClickAddCommentButton })),
@@ -1,41 +1,24 @@
1
- export function ConfigureColumnsPopup({ open, anchorEl, data, onSearch, onClose, titleText, filterText, onListItemClick, selected, hideCheckBox, renderGroupTitle, ...otherProps }: {
2
- [x: string]: any;
3
- open: any;
4
- anchorEl: any;
5
- data: any;
6
- onSearch: any;
7
- onClose: any;
8
- titleText: any;
9
- filterText: any;
10
- onListItemClick: any;
11
- selected: any;
12
- hideCheckBox: any;
13
- renderGroupTitle: any;
14
- }): React.JSX.Element;
15
- export namespace ConfigureColumnsPopup {
16
- namespace propTypes {
17
- let open: PropTypes.Requireable<boolean>;
18
- let hideCheckBox: PropTypes.Requireable<boolean>;
19
- let anchorEl: PropTypes.Requireable<any>;
20
- let selected: PropTypes.Requireable<any[]>;
21
- let data: PropTypes.Requireable<any[]>;
22
- let filterText: PropTypes.Requireable<string>;
23
- let titleText: PropTypes.Requireable<string>;
24
- let onClose: PropTypes.Requireable<(...args: any[]) => any>;
25
- let onListItemClick: PropTypes.Requireable<(...args: any[]) => any>;
26
- let onSearch: PropTypes.Requireable<(...args: any[]) => any>;
27
- let renderGroupTitle: PropTypes.Requireable<(...args: any[]) => any>;
28
- }
29
- namespace defaultProps {
30
- let data_1: any[];
31
- export { data_1 as data };
32
- let selected_1: any[];
33
- export { selected_1 as selected };
34
- let titleText_1: string;
35
- export { titleText_1 as titleText };
36
- let filterText_1: string;
37
- export { filterText_1 as filterText };
38
- }
39
- }
40
1
  import React from 'react';
41
- import PropTypes from 'prop-types';
2
+ import { SelectionPopup } from '../SelectionPopup';
3
+ import { VirtualGroupedListRenderGroupTitle } from '../VirtualGroupedList';
4
+ import { AttributeOption } from '../types';
5
+ type Item = AttributeOption & {
6
+ id: string;
7
+ groupId: string;
8
+ filterText?: string;
9
+ notSelectable?: boolean;
10
+ LogoIcon?: React.ElementType;
11
+ children?: Item[];
12
+ attributes?: Item[];
13
+ };
14
+ type Props = Omit<React.ComponentProps<typeof SelectionPopup>, 'title'> & {
15
+ hideCheckBox: boolean;
16
+ titleText?: string;
17
+ filterText?: string;
18
+ selected: Item[];
19
+ data: Item[];
20
+ onListItemClick: (item: Item, checked: boolean) => void;
21
+ renderGroupTitle: VirtualGroupedListRenderGroupTitle<Item>;
22
+ };
23
+ export declare const ConfigureColumnsPopup: ({ open, anchorEl, data, onSearch, onClose, titleText, filterText, onListItemClick, selected, hideCheckBox, renderGroupTitle, ...otherProps }: Props) => React.JSX.Element;
24
+ export {};
@@ -30,22 +30,21 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
30
30
  return to.concat(ar || Array.prototype.slice.call(from));
31
31
  };
32
32
  import React, { useCallback, useMemo, useRef } from 'react';
33
- import PropTypes from 'prop-types';
34
33
  import i18n from 'ui-i18n';
35
34
  import classnames from 'classnames';
36
35
  import { chain, curry, map } from 'ramda';
37
36
  import { getMaxItemWidth } from '@reltio/mdm-sdk';
37
+ import { Highlighter } from '../Highlighter';
38
38
  import { SelectionPopup } from '../SelectionPopup';
39
+ import { AttributeListItem } from '../AttributeListItem';
39
40
  import { VirtualGroupedList, flattenGroupedItemsData } from '../VirtualGroupedList';
40
41
  import { useKeyboardNavigation } from '../hooks/useKeyboardNavigation';
41
- import { AttributeListItem } from '../AttributeListItem';
42
- import { Highlighter } from '../Highlighter';
43
42
  import { useStyles } from './styles';
44
43
  var ITEM_HEIGHT = 32;
45
44
  var LIST_CONTAINER_HEIGHT = 300;
46
45
  var DEFAULT_MIN_CONTAINER_WIDTH = 308;
47
46
  export var ConfigureColumnsPopup = function (_a) {
48
- var open = _a.open, anchorEl = _a.anchorEl, data = _a.data, onSearch = _a.onSearch, onClose = _a.onClose, titleText = _a.titleText, filterText = _a.filterText, onListItemClick = _a.onListItemClick, selected = _a.selected, hideCheckBox = _a.hideCheckBox, renderGroupTitle = _a.renderGroupTitle, otherProps = __rest(_a, ["open", "anchorEl", "data", "onSearch", "onClose", "titleText", "filterText", "onListItemClick", "selected", "hideCheckBox", "renderGroupTitle"]);
47
+ var open = _a.open, anchorEl = _a.anchorEl, _b = _a.data, data = _b === void 0 ? [] : _b, onSearch = _a.onSearch, onClose = _a.onClose, _c = _a.titleText, titleText = _c === void 0 ? i18n.text('Show/hide columns') : _c, _d = _a.filterText, filterText = _d === void 0 ? '' : _d, onListItemClick = _a.onListItemClick, _e = _a.selected, selected = _e === void 0 ? [] : _e, hideCheckBox = _a.hideCheckBox, renderGroupTitle = _a.renderGroupTitle, otherProps = __rest(_a, ["open", "anchorEl", "data", "onSearch", "onClose", "titleText", "filterText", "onListItemClick", "selected", "hideCheckBox", "renderGroupTitle"]);
49
48
  var filterItem = useCallback(function (item) {
50
49
  return item.label.toLowerCase().includes(filterText.toLowerCase());
51
50
  }, [filterText]);
@@ -82,12 +81,12 @@ export var ConfigureColumnsPopup = function (_a) {
82
81
  }, [onListItemClick, selected]);
83
82
  var groupedItems = useMemo(function () { return (renderGroupTitle ? getGroupsData : getAttributesData)(data); }, [data, renderGroupTitle, getGroupsData, getAttributesData]);
84
83
  var items = useMemo(function () { return flattenGroupedItemsData(groupedItems); }, [groupedItems]);
85
- var _b = useKeyboardNavigation({
84
+ var _f = useKeyboardNavigation({
86
85
  items: items,
87
86
  open: open,
88
87
  onSelectFocusedItem: handleSearchOnEnter,
89
88
  selectedItems: selected
90
- }), focusIndex = _b.focusIndex, handleKeyDown = _b.handleKeyDown;
89
+ }), focusIndex = _f.focusIndex, handleKeyDown = _f.handleKeyDown;
91
90
  var focusIndexRef = useRef(null);
92
91
  focusIndexRef.current = focusIndex;
93
92
  var renderListItem = useCallback(function (style, _a, index) {
@@ -99,24 +98,5 @@ export var ConfigureColumnsPopup = function (_a) {
99
98
  var containerWidth = getMaxItemWidth('label')(groupedItems) || DEFAULT_MIN_CONTAINER_WIDTH;
100
99
  var classes = useStyles();
101
100
  return (React.createElement(SelectionPopup, __assign({ open: open, className: classnames(classes.container, classes.popupContainer), anchorEl: anchorEl, onClose: onClose, onSearch: onSearch, title: titleText, containerWidth: containerWidth, searchInputOnKeyDown: handleKeyDown }, otherProps),
102
- React.createElement(VirtualGroupedList, { height: LIST_CONTAINER_HEIGHT, renderItem: renderListItem, items: items, hideSubtitles: true, getItemSize: getItemSize, containerWidth: containerWidth, focusIndex: focusIndex, renderGroupTitle: renderGroupTitle })));
103
- };
104
- ConfigureColumnsPopup.propTypes = {
105
- open: PropTypes.bool,
106
- hideCheckBox: PropTypes.bool,
107
- anchorEl: PropTypes.any,
108
- selected: PropTypes.array,
109
- data: PropTypes.array,
110
- filterText: PropTypes.string,
111
- titleText: PropTypes.string,
112
- onClose: PropTypes.func,
113
- onListItemClick: PropTypes.func,
114
- onSearch: PropTypes.func,
115
- renderGroupTitle: PropTypes.func
116
- };
117
- ConfigureColumnsPopup.defaultProps = {
118
- data: [],
119
- selected: [],
120
- titleText: i18n.text('Show/hide columns'),
121
- filterText: ''
101
+ React.createElement(VirtualGroupedList, { height: LIST_CONTAINER_HEIGHT, renderItem: renderListItem, items: items, hideSubtitles: true, getItemSize: getItemSize, focusIndex: focusIndex, renderGroupTitle: renderGroupTitle })));
122
102
  };
@@ -25,7 +25,7 @@ import { withContext } from '../HOCs/withContext';
25
25
  import { ConfigPermissionsContext } from '../contexts/ConfigPermissionsContext';
26
26
  import { ScrollType, ScrollToElementContext } from '../contexts/ScrollToElementContext';
27
27
  import { HiddenAttributesContext } from '../contexts/HiddenAttributesContext';
28
- import { AlwaysVisibleAttributesContext } from '../contexts/AllwaysVisibleAttributesContext';
28
+ import { AlwaysVisibleAttributesContext } from '../contexts/AlwaysVisibleAttributesContext';
29
29
  var EditModeAttributesList = function (_a) {
30
30
  var parentAttributeType = _a.parentAttributeType, attrTypes = _a.attrTypes, entity = _a.entity, parentUri = _a.parentUri, showEmptyEditors = _a.showEmptyEditors, mode = _a.mode, crosswalks = _a.crosswalks, drawLines = _a.drawLines, children = _a.children, className = _a.className, _b = _a.fixedTypeUris, fixedTypeUris = _b === void 0 ? FIXED_TYPE_URIS : _b, onAddAttributes = _a.onAddAttributes, onChangeAttribute = _a.onChangeAttribute, onDeleteAttribute = _a.onDeleteAttribute, additionalControlsRenderer = _a.additionalControlsRenderer, showNonOv = _a.showNonOv, highlightAttribute = _a.highlightAttribute;
31
31
  var hiddenAttributes = useContext(HiddenAttributesContext);
@@ -59,7 +59,7 @@ import React from 'react';
59
59
  import { mockResizeObserver } from 'jsdom-testing-mocks';
60
60
  import { act, render, screen, within } from '@testing-library/react';
61
61
  import userEvent from '@testing-library/user-event';
62
- import { LocalizationProvider } from '@mui/x-date-pickers';
62
+ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
63
63
  import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
64
64
  import { DataTypes, EntityAttrTypes, ErrorSource, ErrorType, Mode } from '@reltio/mdm-sdk';
65
65
  import { MdmModuleProvider } from '../contexts/MdmModuleContext';
@@ -11,7 +11,7 @@ import { ShowMore } from '../../../ShowMore';
11
11
  import { EditModeAttribute } from '../../../EditModeAttributesFactory';
12
12
  import { CardinalityMessage } from '../../../CardinalityMessage';
13
13
  import { PinnedAttributesContext } from '../../../contexts/PinnedAttributesContext';
14
- import { AlwaysVisibleAttributesContext } from '../../../contexts/AllwaysVisibleAttributesContext';
14
+ import { AlwaysVisibleAttributesContext } from '../../../contexts/AlwaysVisibleAttributesContext';
15
15
  import { DescriptionIcon } from '../../../DescriptionIcon';
16
16
  import { ControlAttributeIcon } from '../../../ControlAttributeIcon';
17
17
  import { useScrollToAttribute } from '../../../hooks/useScrollToAttribute';
@@ -5,5 +5,5 @@ import { useStyles } from './styles';
5
5
  export var FacetViewHeader = function (_a) {
6
6
  var className = _a.className, title = _a.title, children = _a.children;
7
7
  var styles = useStyles();
8
- return (React.createElement(BasicViewHeader, { title: title, classes: { root: classnames(styles.container, className), title: styles.title } }, children));
8
+ return (React.createElement(BasicViewHeader, { "data-reltio-id": "facet-view-header", title: title, classes: { root: classnames(styles.container, className), title: styles.title } }, children));
9
9
  };
@@ -46,6 +46,14 @@ export var imageAttributeValues = [
46
46
  value: '/test.jpg',
47
47
  uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv/CdnUrlThumbnail/39V5GWj9T'
48
48
  }
49
+ ],
50
+ UrlPreview: [
51
+ {
52
+ type: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/UrlPreview',
53
+ ov: true,
54
+ value: '/test.jpg',
55
+ uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv/UrlPreview/38Man0dAs'
56
+ }
49
57
  ]
50
58
  },
51
59
  ov: true,
@@ -2,4 +2,4 @@ export { ImageAttributesLine } from './ImageAttributesLine';
2
2
  export type { RenderImage, ImageRenderProps } from './types';
3
3
  export { DEFAULT_IMAGE_SIZE } from './constants';
4
4
  export { downloadImagesByURLs } from './helpers';
5
- export { imageAttributeValues } from './imageAttributeValues.test-data';
5
+ export { imageAttributeValues, attributeType } from './imageAttributeValues.test-data';
@@ -1,4 +1,4 @@
1
1
  export { ImageAttributesLine } from './ImageAttributesLine';
2
2
  export { DEFAULT_IMAGE_SIZE } from './constants';
3
3
  export { downloadImagesByURLs } from './helpers';
4
- export { imageAttributeValues } from './imageAttributeValues.test-data';
4
+ export { imageAttributeValues, attributeType } from './imageAttributeValues.test-data';
@@ -21,7 +21,7 @@ export var ImageDetailsViewCarousel = function (_a) {
21
21
  return (React.createElement("div", { className: classnames(styles.root, className) },
22
22
  React.createElement("div", { className: styles.main },
23
23
  attributeValueIndex > 0 && (React.createElement(SmallIconButton, { "data-reltio-id": "prev-image-button", icon: NavigateBeforeIcon, className: classnames(styles.arrowButton, styles.arrowButtonPrev), onClick: onPrevImageButtonClick, size: "XL" })),
24
- React.createElement(Image, { containerClassName: styles.mainImageContainer, className: styles.mainImage, size: mainImageSrc && ImageSizesStyles.OVERRIDE, src: mainImageSrc }),
24
+ React.createElement(Image, { "data-reltio-id": "main-image", containerClassName: styles.mainImageContainer, className: styles.mainImage, size: mainImageSrc && ImageSizesStyles.OVERRIDE, src: mainImageSrc }),
25
25
  attributeValueIndex !== attributeValues.length - 1 && (React.createElement(SmallIconButton, { "data-reltio-id": "next-image-button", icon: NavigateNextIcon, className: classnames(styles.arrowButton, styles.arrowButtonNext), onClick: onNextImageButtonClick, size: "XL" }))),
26
26
  React.createElement(Thumbnails, { attributeValues: attributeValues, attributeValueIndex: attributeValueIndex, setAttributeValueIndex: setAttributeValueIndex })));
27
27
  };
@@ -55,27 +55,32 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
55
55
  return to.concat(ar || Array.prototype.slice.call(from));
56
56
  };
57
57
  import React from 'react';
58
- import { mount } from 'enzyme';
59
- import { act } from 'react-dom/test-utils';
58
+ import { render, screen, within } from '@testing-library/react';
59
+ import userEvent from '@testing-library/user-event';
60
60
  import { mergeCustomerTenantEntityWithMixedEntities, mergeDataTenantEntity } from '@reltio/mdm-sdk';
61
+ import { MdmModuleProvider } from '../contexts/MdmModuleContext';
61
62
  import { MergeButton } from './MergeButton';
62
- import MergeIcon from '../icons/MergeDark';
63
- import { ActionButton } from '../ActionButton';
64
63
  import { ActionButtonMode } from '../types';
65
- import { MdmModuleProvider } from '../contexts/MdmModuleContext';
66
64
  jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { mergeCustomerTenantEntityWithMixedEntities: jest.fn(), mergeDataTenantEntity: jest.fn() })); });
67
- var mdmValues = {
68
- tenant: { id: 'test', name: 'test' },
69
- dtssPath: 'dtssPath/'
70
- };
71
- var updateSearchNavigationDataOnMerge = jest.fn();
65
+ var mdmValues = { tenant: { id: 'test', name: 'test' }, dtssPath: 'dtssPath/' };
66
+ var mdmActions = { updateSearchNavigationDataOnMerge: jest.fn() };
67
+ var defaultEntity = { uri: 'entities/123', type: 'entityType' };
68
+ var defaultEntities = [
69
+ { uri: 'entities/345', type: 'entityType' },
70
+ { uri: 'entities/567', type: 'entityType' }
71
+ ];
72
+ var defaultProps = { entity: defaultEntity, entities: defaultEntities };
72
73
  var setUp = function (props) {
73
- return mount(React.createElement(MdmModuleProvider, { values: mdmValues, actions: { updateSearchNavigationDataOnMerge: updateSearchNavigationDataOnMerge } },
74
- React.createElement(MergeButton, __assign({}, props))));
74
+ if (props === void 0) { props = defaultProps; }
75
+ var user = userEvent.setup();
76
+ var Providers = function (_a) {
77
+ var children = _a.children;
78
+ return (React.createElement(MdmModuleProvider, { values: mdmValues, actions: mdmActions }, children));
79
+ };
80
+ return __assign(__assign({}, render(React.createElement(MergeButton, __assign({}, props)), { wrapper: Providers })), { user: user });
75
81
  };
76
- describe('MergeButton component test', function () {
82
+ describe('Merge button tests', function () {
77
83
  beforeEach(function () {
78
- jest.clearAllMocks();
79
84
  mergeCustomerTenantEntityWithMixedEntities.mockImplementation(function () {
80
85
  return Promise.all([
81
86
  Promise.resolve(),
@@ -83,89 +88,51 @@ describe('MergeButton component test', function () {
83
88
  Promise.resolve({ uris: ['entities/1234'] })
84
89
  ]);
85
90
  });
86
- mergeDataTenantEntity.mockImplementation(function () { return Promise.resolve({ status: 'success' }); });
91
+ mergeDataTenantEntity.mockResolvedValue({ status: 'success' });
87
92
  });
88
93
  afterEach(function () {
89
94
  jest.clearAllMocks();
90
95
  });
91
- var entity = { uri: 'entities/123', type: 'entityType' };
92
- var entities = [
93
- {
94
- uri: 'entities/345',
95
- type: 'entityType'
96
- },
97
- {
98
- uri: 'entities/567',
99
- type: 'entityType'
100
- }
101
- ];
102
96
  it('should render initial state correctly', function () {
103
- var mode = ActionButtonMode.button;
104
- var wrapper = setUp({ entity: entity, entities: entities, mode: mode });
105
- var button = wrapper.find(ActionButton);
106
- expect(button).toHaveLength(1);
107
- expect(button.props()).toMatchObject({
108
- disabled: false,
109
- mode: mode,
110
- label: 'Merge',
111
- icon: MergeIcon
112
- });
97
+ var props = __assign(__assign({}, defaultProps), { mode: ActionButtonMode.button });
98
+ setUp(props);
99
+ var button = screen.getByRole('button');
100
+ expect(button).not.toBeDisabled();
101
+ within(button).getByTestId('SvgMergeDark');
102
+ within(button).getByText('Merge');
113
103
  });
114
104
  it('should merge entities with customer tenant entity on button click', function () { return __awaiter(void 0, void 0, void 0, function () {
115
- var wrapper, button;
105
+ var user;
116
106
  return __generator(this, function (_a) {
117
107
  switch (_a.label) {
118
108
  case 0:
119
- wrapper = setUp({ entity: entity, entities: entities });
120
- button = wrapper.find(ActionButton);
121
- expect(button).toHaveLength(1);
122
- return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
123
- return __generator(this, function (_a) {
124
- button.prop('onClick')();
125
- return [2 /*return*/];
126
- });
127
- }); })];
109
+ user = setUp().user;
110
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
128
111
  case 1:
129
112
  _a.sent();
130
113
  expect(mergeCustomerTenantEntityWithMixedEntities).toHaveBeenCalledWith({
131
- dtssPath: 'dtssPath/',
132
114
  customerTenant: 'test',
133
- entity: entity,
134
- entities: entities
115
+ dtssPath: 'dtssPath/',
116
+ entities: defaultEntities,
117
+ entity: defaultEntity
135
118
  });
136
119
  return [2 /*return*/];
137
120
  }
138
121
  });
139
122
  }); });
140
123
  it('should merge entities with data tenant entity on button click', function () { return __awaiter(void 0, void 0, void 0, function () {
141
- var entity, entities, wrapper, button;
124
+ var entity, entities, props, user;
142
125
  return __generator(this, function (_a) {
143
126
  switch (_a.label) {
144
127
  case 0:
145
- entity = {
146
- uri: 'entities/dt123',
147
- type: 'entityType',
148
- dataTenant: 'dt1'
149
- };
128
+ entity = { uri: 'entities/dt123', type: 'entityType', dataTenant: 'dt1' };
150
129
  entities = [
151
- {
152
- uri: 'entities/ct345',
153
- type: 'entityType'
154
- },
155
- {
156
- uri: 'entities/ct567',
157
- type: 'entityType'
158
- }
130
+ { uri: 'entities/ct345', type: 'entityType' },
131
+ { uri: 'entities/ct567', type: 'entityType' }
159
132
  ];
160
- wrapper = setUp({ entity: entity, entities: entities });
161
- button = wrapper.find(ActionButton);
162
- expect(button).toHaveLength(1);
163
- return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
164
- return __generator(this, function (_a) {
165
- button.prop('onClick')();
166
- return [2 /*return*/];
167
- });
168
- }); })];
133
+ props = { entity: entity, entities: entities };
134
+ user = setUp(props).user;
135
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
169
136
  case 1:
170
137
  _a.sent();
171
138
  expect(mergeDataTenantEntity).toHaveBeenCalledWith({
@@ -179,70 +146,39 @@ describe('MergeButton component test', function () {
179
146
  });
180
147
  }); });
181
148
  it('should call props.onError on merge error', function () { return __awaiter(void 0, void 0, void 0, function () {
182
- var entity, entities, error, onError, wrapper, button;
149
+ var entity, entities, props, user;
183
150
  return __generator(this, function (_a) {
184
151
  switch (_a.label) {
185
152
  case 0:
186
- entity = {
187
- uri: 'entities/dt123',
188
- type: 'entityType',
189
- dataTenant: 'dt1'
190
- };
153
+ mergeDataTenantEntity.mockRejectedValue({ errorMessage: 'merge failed' });
154
+ entity = { uri: 'entities/dt123', type: 'entityType', dataTenant: 'dt1' };
191
155
  entities = [
192
- {
193
- uri: 'entities/ct345',
194
- type: 'entityType'
195
- },
196
- {
197
- uri: 'entities/ct567',
198
- type: 'entityType'
199
- }
156
+ { uri: 'entities/ct345', type: 'entityType' },
157
+ { uri: 'entities/ct567', type: 'entityType' }
200
158
  ];
201
- error = { errorMessage: 'merge failed' };
202
- mergeDataTenantEntity.mockImplementation(function () { return Promise.reject(error); });
203
- onError = jest.fn();
204
- wrapper = setUp({ entity: entity, entities: entities, onError: onError });
205
- button = wrapper.find(ActionButton);
206
- expect(button).toHaveLength(1);
207
- return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
208
- return __generator(this, function (_a) {
209
- button.prop('onClick')();
210
- return [2 /*return*/];
211
- });
212
- }); })];
159
+ props = { entity: entity, entities: entities, onError: jest.fn() };
160
+ user = setUp(props).user;
161
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
213
162
  case 1:
214
163
  _a.sent();
215
- expect(onError).toHaveBeenCalledWith(error);
164
+ expect(props.onError).toHaveBeenCalledWith({ errorMessage: 'merge failed' });
216
165
  return [2 /*return*/];
217
166
  }
218
167
  });
219
168
  }); });
220
169
  it('should call props.onSuccess on merge success', function () { return __awaiter(void 0, void 0, void 0, function () {
221
- var onSuccess, otherEntities, wrapper, button;
170
+ var entities, props, user;
222
171
  return __generator(this, function (_a) {
223
172
  switch (_a.label) {
224
173
  case 0:
225
- onSuccess = jest.fn();
226
- otherEntities = __spreadArray(__spreadArray([], entities, true), [
227
- {
228
- uri: 'entities/1234',
229
- type: 'entityType',
230
- dataTenant: 'dt1'
231
- }
232
- ], false);
233
- wrapper = setUp({ entity: entity, entities: otherEntities, onSuccess: onSuccess });
234
- button = wrapper.find(ActionButton);
235
- expect(button).toHaveLength(1);
236
- return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
237
- return __generator(this, function (_a) {
238
- button.prop('onClick')();
239
- return [2 /*return*/];
240
- });
241
- }); })];
174
+ entities = __spreadArray(__spreadArray([], defaultEntities, true), [{ uri: 'entities/1234', type: 'entityType', dataTenant: 'dt1' }], false);
175
+ props = { entity: defaultEntity, entities: entities, onSuccess: jest.fn() };
176
+ user = setUp(props).user;
177
+ return [4 /*yield*/, user.click(screen.getByRole('button'))];
242
178
  case 1:
243
179
  _a.sent();
244
- expect(onSuccess).toHaveBeenCalled();
245
- expect(updateSearchNavigationDataOnMerge).toHaveBeenCalledWith({
180
+ expect(props.onSuccess).toHaveBeenCalled();
181
+ expect(mdmActions.updateSearchNavigationDataOnMerge).toHaveBeenCalledWith({
246
182
  winnerUri: 'entities/123',
247
183
  losersUris: ['entities/345', 'entities/567']
248
184
  });
@@ -250,9 +186,4 @@ describe('MergeButton component test', function () {
250
186
  }
251
187
  });
252
188
  }); });
253
- it('button should have right label', function () {
254
- var wrapper = setUp({ entity: entity, entities: entities });
255
- var button = wrapper.find(ActionButton);
256
- expect(button.prop('label')).toBe('Merge');
257
- });
258
189
  });
@@ -8,8 +8,9 @@ type Classes = {
8
8
  root?: string;
9
9
  label?: string;
10
10
  };
11
+ type Item = TEntityType | TRelationType;
11
12
  type Props = {
12
- items: (TEntityType | TRelationType)[];
13
+ items: Item[];
13
14
  selectedItemsUris: string[];
14
15
  onChange: (values: string[]) => void;
15
16
  label: string;
@@ -73,7 +73,7 @@ export var MetadataTypesSelector = memo(function (_a) {
73
73
  var noTypesSelected = selectedItemsUris.length === 0;
74
74
  return (React.createElement(React.Fragment, null,
75
75
  React.createElement(TextField, { label: label, ref: rootRef, InputProps: {
76
- startAdornment: noTypesSelected && !placeholder ? null : (React.createElement("div", { className: classnames(styles.inputText, classes.inputText) }, noTypesSelected ? (React.createElement("div", null, placeholder)) : (React.createElement(ListLabel, __assign({}, ListLabelProps, { list: selectedLabels }))))),
76
+ startAdornment: noTypesSelected && !placeholder ? null : (React.createElement("div", { "data-reltio-id": "metadata-types-selector-start-adornment", className: classnames(styles.inputText, classes.inputText) }, noTypesSelected ? (React.createElement("div", null, placeholder)) : (React.createElement(ListLabel, __assign({}, ListLabelProps, { list: selectedLabels }))))),
77
77
  classes: {
78
78
  root: styles.inputRoot,
79
79
  input: classnames(styles.input, classes.input, (_b = {},