@reltio/components 1.4.1944 → 1.4.1946

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 (301) hide show
  1. package/cjs/AttributeListItem/AttributeListItem.spec.js +4 -4
  2. package/cjs/AttributesErrorsPanel/components/Error/Error.specs.js +1 -1
  3. package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +8 -8
  4. package/cjs/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +2 -2
  5. package/cjs/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +3 -3
  6. package/cjs/AttributesFiltersButton/AttributesFiltersButton.test.js +1 -1
  7. package/cjs/AttributesView/AttributesView.d.ts +2 -1
  8. package/cjs/AttributesView/AttributesView.js +4 -2
  9. package/cjs/AttributesView/AttributesView.test.js +32 -0
  10. package/cjs/AutoSizeList/AutoSizeList.test.js +27 -30
  11. package/cjs/BasicTable/BasicTable.test.js +26 -5
  12. package/cjs/BasicTable/IntegrationBasicTable.test.js +16 -5
  13. package/cjs/BasicTable/helpers.test.js +1 -1
  14. package/cjs/CollapseRowButton/CollapseRowButton.test.js +3 -3
  15. package/cjs/CommentsContainer/CommentsContainer.test.js +2 -2
  16. package/cjs/CustomDateRangeEditor/CustomDateRangeEditor.test.js +2 -2
  17. package/cjs/DataTypeValue/DataTypeValue.test.js +2 -25
  18. package/cjs/DataTypeValueEditor/useEditorContext.test.js +2 -2
  19. package/cjs/DependentLookupEditor/DependentLookupEditor.test.js +116 -70
  20. package/cjs/DropDownEditor/DropDownEditor.test.js +1 -1
  21. package/cjs/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +4 -27
  22. package/cjs/EditModeAttributesList/EditModeAttributesList.d.ts +1 -1
  23. package/cjs/EditModeAttributesList/EditModeAttributesList.js +16 -5
  24. package/cjs/EditModeAttributesList/EditModeAttributesList.test.js +7 -4
  25. package/cjs/EditModeAttributesPager/EditModeAttributesPager.js +1 -2
  26. package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +4 -1
  27. package/cjs/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +28 -37
  28. package/cjs/EntitySelector/EntitySelector.test.js +13 -42
  29. package/cjs/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +1 -1
  30. package/cjs/EntitySelector/components/EntityOption/EntityOption.test.js +1 -1
  31. package/cjs/EntitySelector/components/Group/Group.test.js +1 -1
  32. package/cjs/EntityUriLink/EntityUriLink.test.js +1 -0
  33. package/cjs/ErrorBoundary/ErrorBoundary.test.js +2 -0
  34. package/cjs/ExpandedValueTooltip/ExpandedValueTooltip.test.js +4 -1
  35. package/cjs/FilterButton/FilterButton.test.js +1 -1
  36. package/cjs/HOCs/withFilter/components/ColumnFilter/ColumnFilter.spec.js +3 -3
  37. package/cjs/HOCs/withTableContext/withTableContext.test.js +1 -1
  38. package/cjs/HierarchyNodeTitle/HierarchyNodeTitle.test.js +4 -27
  39. package/cjs/HierarchyNodeTitle/useEntityDetails.test.js +18 -32
  40. package/cjs/ImageAttributesGallery/ImageAttributesGallery.test.js +6 -4
  41. package/cjs/ImageAttributesGallery/components/HeaderRight/HeaderRight.test.js +1 -1
  42. package/cjs/ImageAttributesLine/ImageAttributesLine.test.js +110 -68
  43. package/cjs/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +4 -4
  44. package/cjs/ImageGalleryDialog/ImageGalleryDialog.specs.js +3 -3
  45. package/cjs/ImportButton/ImportButton.test.js +1 -1
  46. package/cjs/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +1 -1
  47. package/cjs/InlineAttributesPager/components/InlineSimpleAttributesBlock/InlineSimpleAttributesBlock.test.js +1 -1
  48. package/cjs/InlineComplexAttribute/InlineComplexAttribute.test.js +3 -3
  49. package/cjs/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +31 -22
  50. package/cjs/LineChart/LineChart.test.js +1 -1
  51. package/cjs/Link/Link.test.js +1 -0
  52. package/cjs/LookupEditor/LookupEditor.test.js +3 -3
  53. package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +1 -1
  54. package/cjs/MapChart/MapChart.test.js +3 -3
  55. package/cjs/MetadataTypesSelector/MetadataTypesSelector.test.js +3 -3
  56. package/cjs/MoreAttributesButton/MoreAttributesButton.test.js +1 -1
  57. package/cjs/MultipleInput/MultipleInput.test.js +11 -11
  58. package/cjs/MultipliableSelect/MultipliableSelect.test.js +14 -8
  59. package/cjs/NestedAttributeEditor/NestedAttributeEditor.test.js +4 -27
  60. package/cjs/NumberEditor/NumberEditor.test.js +4 -4
  61. package/cjs/PieChart/PieChart.test.js +1 -1
  62. package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.js +11 -34
  63. package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +4 -30
  64. package/cjs/PivotingUriLink/PivotingUriLink.spec.js +1 -0
  65. package/cjs/ProfileBandNavigation/useSearchNavigation.test.js +3 -3
  66. package/cjs/ProfilesList/ProfilesList.spec.js +1 -1
  67. package/cjs/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +1 -1
  68. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +2 -2
  69. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.js +6 -4
  70. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -1
  71. package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +11 -2
  72. package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.d.ts +9 -0
  73. package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.js +20 -0
  74. package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/index.d.ts +1 -0
  75. package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/index.js +5 -0
  76. package/cjs/ReadOnlyAttributesPager/styles.d.ts +1 -0
  77. package/cjs/ReadOnlyAttributesPager/styles.js +5 -1
  78. package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +6 -30
  79. package/cjs/RelationEditor/IntegrationRelationEditor.test.js +1 -1
  80. package/cjs/RelationEditor/RelationEditor.test.js +20 -44
  81. package/cjs/ReltioMap/ReltioMap.spec.js +10 -8
  82. package/cjs/ReltioMap/components/EntityMarker/EntityMarker.spec.js +2 -26
  83. package/cjs/ScrollableTabs/ScrollableTabs.test.js +1 -1
  84. package/cjs/SearchInput/SearchInput.spec.js +2 -2
  85. package/cjs/SelectionPopup/SelectionPopup.spec.js +9 -12
  86. package/cjs/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +4 -4
  87. package/cjs/ShowLess/ShowLess.test.js +1 -1
  88. package/cjs/ShowMore/ShowMore.test.js +2 -2
  89. package/cjs/SideButtonsPanel/SideButtonsPanel.spec.js +3 -3
  90. package/cjs/SimpleAttribute/IntegrationSimpleAttribute.test.js +15 -34
  91. package/cjs/SimpleDropDownSelector/SimpleDropDownSelector.test.js +1 -1
  92. package/cjs/TableWithBars/TableWithBars.test.js +1 -1
  93. package/cjs/TreeChart/TreeChart.test.js +1 -1
  94. package/cjs/TypeaheadEditor/TypeaheadEditor.test.js +8 -1
  95. package/cjs/UploadFileButton/UploadFileButton.spec.js +103 -69
  96. package/cjs/VerticalHeadingsTable/components/TableCellWithDnd/TableCellWithDnd.test.js +4 -1
  97. package/cjs/VerticalHeadingsTable/components/TableRowWithDnd/TableRowWithDnd.test.js +3 -1
  98. package/cjs/constants/attributes.d.ts +1 -1
  99. package/cjs/constants/attributes.js +2 -2
  100. package/cjs/constants/index.d.ts +1 -1
  101. package/cjs/constants/index.js +2 -2
  102. package/cjs/contexts/AllwaysVisibleAttributesContext/index.d.ts +2 -0
  103. package/cjs/contexts/AllwaysVisibleAttributesContext/index.js +6 -0
  104. package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +2 -2
  105. package/cjs/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +1 -25
  106. package/cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +1 -25
  107. package/cjs/features/activity-log/ActivityLog/ActivityLog.test.js +4 -0
  108. package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +1 -1
  109. package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +1 -2
  110. package/cjs/features/crosswalks/AttributesTable/AttributesTable.test.js +13 -13
  111. package/cjs/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +5 -5
  112. package/cjs/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +4 -4
  113. package/cjs/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +5 -5
  114. package/cjs/features/crosswalks/AttributesTable/components/WinnerSourcesRenderer/WinnerSourcesRenderer.test.js +2 -2
  115. package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.d.ts +2 -2
  116. package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.js +27 -4
  117. package/cjs/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +15 -16
  118. package/cjs/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +1 -1
  119. package/cjs/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +2 -2
  120. package/cjs/features/crosswalks/hooks/useAttributeActions.test.js +95 -118
  121. package/cjs/features/crosswalks/hooks/useCrosswalkActions.test.js +38 -61
  122. package/cjs/features/crosswalks/hooks/useModifiedEntity.test.js +8 -8
  123. package/cjs/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +2 -2
  124. package/cjs/features/history/ContributorsPanel/components/ContributorItem/ContributorItem.specs.js +5 -26
  125. package/cjs/features/history/HistoryGraph/components/HistoryLink/HistoryLink.specs.js +2 -2
  126. package/cjs/features/history/HistoryRow/HistoryRow.specs.js +2 -26
  127. package/cjs/features/history/HistoryTree/HistoryTree.specs.js +1 -1
  128. package/cjs/features/history/HistoryView/HistoryView.specs.js +1 -1
  129. package/cjs/features/history/helpers/filters.test.js +6 -6
  130. package/cjs/features/history/hooks/useHistory.test.js +23 -48
  131. package/cjs/features/workflow/AddWorkflowDialog/AddWorkflowDialog.spec.js +24 -8
  132. package/cjs/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -26
  133. package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +4 -30
  134. package/cjs/features/workflow/hooks/useChangeRequest.specs.js +11 -36
  135. package/cjs/helpers/attributesView.d.ts +1 -1
  136. package/cjs/helpers/attributesView.js +2 -2
  137. package/cjs/helpers/customScript.test.js +19 -19
  138. package/cjs/hooks/useAPI/useAPI.test.js +12 -12
  139. package/cjs/hooks/useBasicTableCellRenderer/CellRenderer.test.js +2 -1
  140. package/cjs/hooks/useCollapsibleTableRows/dataHelpers.test.js +1 -1
  141. package/cjs/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
  142. package/cjs/hooks/useConfigPermissions/useConfigPermissions.specs.js +5 -29
  143. package/cjs/hooks/useCustomScripts/useCustomScripts.test.js +8 -8
  144. package/cjs/hooks/useLayoutResetter/useLayoutResetter.test.js +8 -8
  145. package/cjs/hooks/useMarkers/helpers.js +1 -2
  146. package/cjs/hooks/useReadableSearchState/useReadableSearchState.test.js +14 -44
  147. package/cjs/hooks/useRelationsLoader/useRelationsLoader.specs.js +3 -4
  148. package/cjs/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +4 -4
  149. package/cjs/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
  150. package/cjs/hooks/useSnackbar/useSnackbar.test.js +24 -17
  151. package/esm/AttributeListItem/AttributeListItem.spec.js +4 -4
  152. package/esm/AttributesErrorsPanel/components/Error/Error.specs.js +1 -1
  153. package/esm/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +8 -8
  154. package/esm/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +2 -2
  155. package/esm/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +3 -3
  156. package/esm/AttributesFiltersButton/AttributesFiltersButton.test.js +1 -1
  157. package/esm/AttributesView/AttributesView.d.ts +2 -1
  158. package/esm/AttributesView/AttributesView.js +4 -2
  159. package/esm/AttributesView/AttributesView.test.js +32 -0
  160. package/esm/AutoSizeList/AutoSizeList.test.js +28 -31
  161. package/esm/BasicTable/BasicTable.test.js +26 -5
  162. package/esm/BasicTable/IntegrationBasicTable.test.js +17 -6
  163. package/esm/BasicTable/helpers.test.js +1 -1
  164. package/esm/CollapseRowButton/CollapseRowButton.test.js +3 -3
  165. package/esm/CommentsContainer/CommentsContainer.test.js +2 -2
  166. package/esm/CustomDateRangeEditor/CustomDateRangeEditor.test.js +2 -2
  167. package/esm/DataTypeValue/DataTypeValue.test.js +2 -2
  168. package/esm/DataTypeValueEditor/useEditorContext.test.js +2 -2
  169. package/esm/DependentLookupEditor/DependentLookupEditor.test.js +116 -70
  170. package/esm/DropDownEditor/DropDownEditor.test.js +1 -1
  171. package/esm/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +4 -4
  172. package/esm/EditModeAttributesList/EditModeAttributesList.d.ts +1 -1
  173. package/esm/EditModeAttributesList/EditModeAttributesList.js +17 -6
  174. package/esm/EditModeAttributesList/EditModeAttributesList.test.js +5 -2
  175. package/esm/EditModeAttributesPager/EditModeAttributesPager.js +1 -2
  176. package/esm/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +4 -1
  177. package/esm/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +30 -16
  178. package/esm/EntitySelector/EntitySelector.test.js +13 -19
  179. package/esm/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +1 -1
  180. package/esm/EntitySelector/components/EntityOption/EntityOption.test.js +1 -1
  181. package/esm/EntitySelector/components/Group/Group.test.js +1 -1
  182. package/esm/EntityUriLink/EntityUriLink.test.js +1 -0
  183. package/esm/ErrorBoundary/ErrorBoundary.test.js +2 -0
  184. package/esm/ExpandedValueTooltip/ExpandedValueTooltip.test.js +4 -1
  185. package/esm/FilterButton/FilterButton.test.js +1 -1
  186. package/esm/HOCs/withFilter/components/ColumnFilter/ColumnFilter.spec.js +3 -3
  187. package/esm/HOCs/withTableContext/withTableContext.test.js +1 -1
  188. package/esm/HierarchyNodeTitle/HierarchyNodeTitle.test.js +4 -4
  189. package/esm/HierarchyNodeTitle/useEntityDetails.test.js +19 -10
  190. package/esm/ImageAttributesGallery/ImageAttributesGallery.test.js +6 -4
  191. package/esm/ImageAttributesGallery/components/HeaderRight/HeaderRight.test.js +1 -1
  192. package/esm/ImageAttributesLine/ImageAttributesLine.test.js +110 -68
  193. package/esm/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +4 -4
  194. package/esm/ImageGalleryDialog/ImageGalleryDialog.specs.js +3 -3
  195. package/esm/ImportButton/ImportButton.test.js +1 -1
  196. package/esm/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +1 -1
  197. package/esm/InlineAttributesPager/components/InlineSimpleAttributesBlock/InlineSimpleAttributesBlock.test.js +1 -1
  198. package/esm/InlineComplexAttribute/InlineComplexAttribute.test.js +3 -3
  199. package/esm/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +32 -23
  200. package/esm/LineChart/LineChart.test.js +1 -1
  201. package/esm/Link/Link.test.js +1 -0
  202. package/esm/LookupEditor/LookupEditor.test.js +3 -3
  203. package/esm/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +1 -1
  204. package/esm/MapChart/MapChart.test.js +3 -3
  205. package/esm/MetadataTypesSelector/MetadataTypesSelector.test.js +3 -3
  206. package/esm/MoreAttributesButton/MoreAttributesButton.test.js +1 -1
  207. package/esm/MultipleInput/MultipleInput.test.js +11 -11
  208. package/esm/MultipliableSelect/MultipliableSelect.test.js +14 -8
  209. package/esm/NestedAttributeEditor/NestedAttributeEditor.test.js +4 -4
  210. package/esm/NumberEditor/NumberEditor.test.js +4 -4
  211. package/esm/PieChart/PieChart.test.js +1 -1
  212. package/esm/PivotingTooltip/IntegrationPivotingTooltip.test.js +11 -11
  213. package/esm/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +4 -7
  214. package/esm/PivotingUriLink/PivotingUriLink.spec.js +1 -0
  215. package/esm/ProfileBandNavigation/useSearchNavigation.test.js +3 -3
  216. package/esm/ProfilesList/ProfilesList.spec.js +1 -1
  217. package/esm/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +1 -1
  218. package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +2 -2
  219. package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.js +7 -5
  220. package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -1
  221. package/esm/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +12 -3
  222. package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.d.ts +9 -0
  223. package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.js +13 -0
  224. package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/index.d.ts +1 -0
  225. package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/index.js +1 -0
  226. package/esm/ReadOnlyAttributesPager/styles.d.ts +1 -0
  227. package/esm/ReadOnlyAttributesPager/styles.js +4 -0
  228. package/esm/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +7 -8
  229. package/esm/RelationEditor/IntegrationRelationEditor.test.js +1 -1
  230. package/esm/RelationEditor/RelationEditor.test.js +21 -22
  231. package/esm/ReltioMap/ReltioMap.spec.js +11 -9
  232. package/esm/ReltioMap/components/EntityMarker/EntityMarker.spec.js +3 -4
  233. package/esm/ScrollableTabs/ScrollableTabs.test.js +1 -1
  234. package/esm/SearchInput/SearchInput.spec.js +2 -2
  235. package/esm/SelectionPopup/SelectionPopup.spec.js +9 -12
  236. package/esm/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +4 -4
  237. package/esm/ShowLess/ShowLess.test.js +1 -1
  238. package/esm/ShowMore/ShowMore.test.js +2 -2
  239. package/esm/SideButtonsPanel/SideButtonsPanel.spec.js +3 -3
  240. package/esm/SimpleAttribute/IntegrationSimpleAttribute.test.js +16 -12
  241. package/esm/SimpleDropDownSelector/SimpleDropDownSelector.test.js +1 -1
  242. package/esm/TableWithBars/TableWithBars.test.js +1 -1
  243. package/esm/TreeChart/TreeChart.test.js +1 -1
  244. package/esm/TypeaheadEditor/TypeaheadEditor.test.js +8 -1
  245. package/esm/UploadFileButton/UploadFileButton.spec.js +103 -69
  246. package/esm/VerticalHeadingsTable/components/TableCellWithDnd/TableCellWithDnd.test.js +4 -1
  247. package/esm/VerticalHeadingsTable/components/TableRowWithDnd/TableRowWithDnd.test.js +3 -1
  248. package/esm/constants/attributes.d.ts +1 -1
  249. package/esm/constants/attributes.js +1 -1
  250. package/esm/constants/index.d.ts +1 -1
  251. package/esm/constants/index.js +1 -1
  252. package/esm/contexts/AllwaysVisibleAttributesContext/index.d.ts +2 -0
  253. package/esm/contexts/AllwaysVisibleAttributesContext/index.js +3 -0
  254. package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +2 -2
  255. package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +1 -2
  256. package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +2 -3
  257. package/esm/features/activity-log/ActivityLog/ActivityLog.test.js +4 -0
  258. package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +1 -1
  259. package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +1 -2
  260. package/esm/features/crosswalks/AttributesTable/AttributesTable.test.js +13 -13
  261. package/esm/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +5 -5
  262. package/esm/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +4 -4
  263. package/esm/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +5 -5
  264. package/esm/features/crosswalks/AttributesTable/components/WinnerSourcesRenderer/WinnerSourcesRenderer.test.js +2 -2
  265. package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.d.ts +2 -2
  266. package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.js +4 -3
  267. package/esm/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +15 -16
  268. package/esm/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +1 -1
  269. package/esm/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +2 -2
  270. package/esm/features/crosswalks/hooks/useAttributeActions.test.js +95 -95
  271. package/esm/features/crosswalks/hooks/useCrosswalkActions.test.js +38 -38
  272. package/esm/features/crosswalks/hooks/useModifiedEntity.test.js +8 -8
  273. package/esm/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +2 -2
  274. package/esm/features/history/ContributorsPanel/components/ContributorItem/ContributorItem.specs.js +5 -3
  275. package/esm/features/history/HistoryGraph/components/HistoryLink/HistoryLink.specs.js +2 -2
  276. package/esm/features/history/HistoryRow/HistoryRow.specs.js +2 -3
  277. package/esm/features/history/HistoryTree/HistoryTree.specs.js +1 -1
  278. package/esm/features/history/HistoryView/HistoryView.specs.js +1 -1
  279. package/esm/features/history/helpers/filters.test.js +6 -6
  280. package/esm/features/history/hooks/useHistory.test.js +23 -25
  281. package/esm/features/workflow/AddWorkflowDialog/AddWorkflowDialog.spec.js +25 -9
  282. package/esm/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -3
  283. package/esm/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +5 -8
  284. package/esm/features/workflow/hooks/useChangeRequest.specs.js +11 -13
  285. package/esm/helpers/attributesView.d.ts +1 -1
  286. package/esm/helpers/attributesView.js +2 -2
  287. package/esm/helpers/customScript.test.js +19 -19
  288. package/esm/hooks/useAPI/useAPI.test.js +12 -12
  289. package/esm/hooks/useBasicTableCellRenderer/CellRenderer.test.js +2 -1
  290. package/esm/hooks/useCollapsibleTableRows/dataHelpers.test.js +1 -1
  291. package/esm/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
  292. package/esm/hooks/useConfigPermissions/useConfigPermissions.specs.js +6 -7
  293. package/esm/hooks/useCustomScripts/useCustomScripts.test.js +8 -8
  294. package/esm/hooks/useLayoutResetter/useLayoutResetter.test.js +9 -9
  295. package/esm/hooks/useMarkers/helpers.js +1 -2
  296. package/esm/hooks/useReadableSearchState/useReadableSearchState.test.js +8 -15
  297. package/esm/hooks/useRelationsLoader/useRelationsLoader.specs.js +1 -2
  298. package/esm/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +4 -4
  299. package/esm/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
  300. package/esm/hooks/useSnackbar/useSnackbar.test.js +25 -18
  301. package/package.json +2 -2
@@ -49,7 +49,6 @@ import React from 'react';
49
49
  import { mount, ReactWrapper, shallow } from 'enzyme';
50
50
  import { act } from 'react-dom/test-utils';
51
51
  import { debounce } from '@reltio/mdm-sdk';
52
- import { delayPromise } from '../test-utils';
53
52
  import { ReactSelect } from '../ReactSelect';
54
53
  import { DependentLookupAutopopulationContext } from '../contexts/DependentLookupAutopopulationContext';
55
54
  import { ReactSelectOptionWithCheckIcon } from '../ReactSelectOptionWithCheckIcon';
@@ -129,7 +128,7 @@ describe('DependentLookupEditor', function () {
129
128
  wrapper.update();
130
129
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
131
130
  expect(props.onChange).not.toHaveBeenCalled();
132
- expect(props.getLookups).toBeCalledWith({
131
+ expect(props.getLookups).toHaveBeenCalledWith({
133
132
  type: 'COUNTRY_CD',
134
133
  parents: [],
135
134
  displayNamePrefix: newInputValue,
@@ -142,7 +141,7 @@ describe('DependentLookupEditor', function () {
142
141
  wrapper.update();
143
142
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe('');
144
143
  expect(props.onChange).not.toHaveBeenCalled();
145
- expect(props.getLookups).toBeCalledWith({
144
+ expect(props.getLookups).toHaveBeenCalledWith({
146
145
  type: 'COUNTRY_CD',
147
146
  parents: [],
148
147
  displayNamePrefix: '',
@@ -188,7 +187,7 @@ describe('DependentLookupEditor', function () {
188
187
  wrapper.update();
189
188
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
190
189
  expect(props.onChange).not.toHaveBeenCalled();
191
- expect(props.getLookups).toBeCalledWith({
190
+ expect(props.getLookups).toHaveBeenCalledWith({
192
191
  type: 'COUNTRY_CD',
193
192
  parents: [],
194
193
  displayNamePrefix: newInputValue,
@@ -201,7 +200,7 @@ describe('DependentLookupEditor', function () {
201
200
  wrapper.update();
202
201
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(getOptionLabel(value));
203
202
  expect(props.onChange).not.toHaveBeenCalled();
204
- expect(props.getLookups).toBeCalledWith({
203
+ expect(props.getLookups).toHaveBeenCalledWith({
205
204
  type: 'COUNTRY_CD',
206
205
  parents: [],
207
206
  displayNamePrefix: '',
@@ -223,7 +222,7 @@ describe('DependentLookupEditor', function () {
223
222
  wrapper.update();
224
223
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
225
224
  expect(props.onChange).not.toHaveBeenCalled();
226
- expect(props.getLookups).toBeCalledWith({
225
+ expect(props.getLookups).toHaveBeenCalledWith({
227
226
  type: 'COUNTRY_CD',
228
227
  parents: [],
229
228
  displayNamePrefix: newInputValue,
@@ -236,7 +235,7 @@ describe('DependentLookupEditor', function () {
236
235
  wrapper.update();
237
236
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(getOptionLabel(value));
238
237
  expect(props.onChange).not.toHaveBeenCalled();
239
- expect(props.getLookups).toBeCalledWith({
238
+ expect(props.getLookups).toHaveBeenCalledWith({
240
239
  type: 'COUNTRY_CD',
241
240
  parents: [],
242
241
  displayNamePrefix: '',
@@ -328,7 +327,7 @@ describe('DependentLookupEditor', function () {
328
327
  return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
329
328
  return __generator(this, function (_a) {
330
329
  switch (_a.label) {
331
- case 0: return [4 /*yield*/, delayPromise(1)];
330
+ case 0: return [4 /*yield*/, Promise.resolve()];
332
331
  case 1:
333
332
  _a.sent();
334
333
  return [2 /*return*/];
@@ -354,16 +353,13 @@ describe('DependentLookupEditor', function () {
354
353
  case 2:
355
354
  _a.sent();
356
355
  // loaded options length is equal to (max + 1) so there are more options exist
357
- expect(getLookups).toBeCalledWith({
356
+ expect(getLookups).toHaveBeenCalledWith({
358
357
  type: props.lookupCode,
359
358
  parents: props.parents,
360
359
  displayNamePrefix: '',
361
360
  max: 3,
362
361
  offset: 2
363
362
  });
364
- return [4 /*yield*/, Promise.resolve()];
365
- case 3:
366
- _a.sent();
367
363
  wrapper.update();
368
364
  expect(wrapper.find(ReactSelect).prop('options').length).toBe(4);
369
365
  expect(findLoadMoreButton(wrapper).exists()).toBeTruthy();
@@ -387,7 +383,7 @@ describe('DependentLookupEditor', function () {
387
383
  return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
388
384
  return __generator(this, function (_a) {
389
385
  switch (_a.label) {
390
- case 0: return [4 /*yield*/, delayPromise(1)];
386
+ case 0: return [4 /*yield*/, Promise.resolve()];
391
387
  case 1:
392
388
  _a.sent();
393
389
  return [2 /*return*/];
@@ -411,9 +407,6 @@ describe('DependentLookupEditor', function () {
411
407
  });
412
408
  }); })];
413
409
  case 2:
414
- _a.sent();
415
- return [4 /*yield*/, Promise.resolve()];
416
- case 3:
417
410
  _a.sent();
418
411
  wrapper.update();
419
412
  expect(wrapper.find(ReactSelect).prop('options').length).toBe(4);
@@ -477,7 +470,7 @@ describe('DependentLookupEditor', function () {
477
470
  case 0:
478
471
  wrapper = mount(React.createElement(DependentLookupEditor, __assign({}, props)));
479
472
  expect(wrapper.find(ReactSelect).prop('options')).toEqual([]);
480
- expect(props.getLookups).toBeCalledWith({
473
+ expect(props.getLookups).toHaveBeenCalledWith({
481
474
  type: props.lookupCode,
482
475
  parents: props.parents,
483
476
  displayNamePrefix: '',
@@ -514,7 +507,7 @@ describe('DependentLookupEditor', function () {
514
507
  wrapper.setProps({
515
508
  lookupCode: 'SPEC'
516
509
  });
517
- expect(props.getLookups).toBeCalledWith({
510
+ expect(props.getLookups).toHaveBeenCalledWith({
518
511
  type: 'SPEC',
519
512
  parents: [],
520
513
  displayNamePrefix: '',
@@ -559,9 +552,9 @@ describe('DependentLookupEditor', function () {
559
552
  case 1:
560
553
  _a.sent();
561
554
  wrapper.find('input').simulate('keyDown', { key: 'ArrowDown' });
562
- expect(props.onChange).not.toBeCalled();
555
+ expect(props.onChange).not.toHaveBeenCalled();
563
556
  wrapper.find(ReactSelectOptionWithCheckIcon).at(1).find('div').at(0).simulate('click');
564
- expect(props.onChange).toBeCalledWith({
557
+ expect(props.onChange).toHaveBeenCalledWith({
565
558
  value: 'Russia',
566
559
  lookupCode: 'RU'
567
560
  });
@@ -569,20 +562,32 @@ describe('DependentLookupEditor', function () {
569
562
  }
570
563
  });
571
564
  }); });
572
- it('should call props.getLookups with correct values on select input change', function () {
573
- var wrapper = mount(React.createElement(DependentLookupEditor, __assign({}, props)));
574
- var newInputValue = 'Ch';
575
- act(function () {
576
- wrapper.find('Select').prop('onInputChange')(newInputValue, { action: 'input-change' });
577
- });
578
- expect(props.getLookups).toHaveBeenCalledWith({
579
- type: props.lookupCode,
580
- parents: props.parents,
581
- displayNamePrefix: newInputValue,
582
- max: 51,
583
- offset: 0
565
+ it('should call props.getLookups with correct values on select input change', function () { return __awaiter(void 0, void 0, void 0, function () {
566
+ var wrapper, newInputValue;
567
+ return __generator(this, function (_a) {
568
+ switch (_a.label) {
569
+ case 0:
570
+ wrapper = mount(React.createElement(DependentLookupEditor, __assign({}, props)));
571
+ newInputValue = 'Ch';
572
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
573
+ return __generator(this, function (_a) {
574
+ wrapper.find('Select').prop('onInputChange')(newInputValue, { action: 'input-change' });
575
+ return [2 /*return*/];
576
+ });
577
+ }); })];
578
+ case 1:
579
+ _a.sent();
580
+ expect(props.getLookups).toHaveBeenCalledWith({
581
+ type: props.lookupCode,
582
+ parents: props.parents,
583
+ displayNamePrefix: newInputValue,
584
+ max: 51,
585
+ offset: 0
586
+ });
587
+ return [2 /*return*/];
588
+ }
584
589
  });
585
- });
590
+ }); });
586
591
  it('should call props.getLookups with correct values on select input change and set offset to default', function () { return __awaiter(void 0, void 0, void 0, function () {
587
592
  var getLookups, value, wrapper, newInputValue, nextNewInputValue;
588
593
  return __generator(this, function (_a) {
@@ -600,7 +605,16 @@ describe('DependentLookupEditor', function () {
600
605
  act(function () {
601
606
  wrapper.find('Select').prop('onInputChange')(newInputValue, { action: 'input-change' });
602
607
  });
603
- return [4 /*yield*/, delayPromise(1)];
608
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
609
+ return __generator(this, function (_a) {
610
+ switch (_a.label) {
611
+ case 0: return [4 /*yield*/, Promise.resolve()];
612
+ case 1:
613
+ _a.sent();
614
+ return [2 /*return*/];
615
+ }
616
+ });
617
+ }); })];
604
618
  case 1:
605
619
  _a.sent();
606
620
  wrapper.update();
@@ -626,7 +640,7 @@ describe('DependentLookupEditor', function () {
626
640
  case 2:
627
641
  _a.sent();
628
642
  // offset === max
629
- expect(getLookups).toBeCalledWith({
643
+ expect(getLookups).toHaveBeenCalledWith({
630
644
  type: props.lookupCode,
631
645
  parents: props.parents,
632
646
  displayNamePrefix: newInputValue,
@@ -649,7 +663,7 @@ describe('DependentLookupEditor', function () {
649
663
  }
650
664
  });
651
665
  }); });
652
- it('should call props.getLookups with default offset = 0 after LookupCode updated', function () { return __awaiter(void 0, void 0, void 0, function () {
666
+ xit('should call props.getLookups with default offset = 0 after LookupCode updated', function () { return __awaiter(void 0, void 0, void 0, function () {
653
667
  var getLookups, wrapper, newLookupCode;
654
668
  return __generator(this, function (_a) {
655
669
  switch (_a.label) {
@@ -661,7 +675,16 @@ describe('DependentLookupEditor', function () {
661
675
  RU: { displayName: 'Russia' }
662
676
  }));
663
677
  wrapper = mount(React.createElement(DependentLookupEditor, __assign({}, props, { getLookups: getLookups, max: 2 })));
664
- return [4 /*yield*/, delayPromise(1)];
678
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
679
+ return __generator(this, function (_a) {
680
+ switch (_a.label) {
681
+ case 0: return [4 /*yield*/, Promise.resolve()];
682
+ case 1:
683
+ _a.sent();
684
+ return [2 /*return*/];
685
+ }
686
+ });
687
+ }); })];
665
688
  case 1:
666
689
  _a.sent();
667
690
  wrapper.update();
@@ -686,7 +709,7 @@ describe('DependentLookupEditor', function () {
686
709
  }); })];
687
710
  case 2:
688
711
  _a.sent();
689
- expect(getLookups).toBeCalledWith({
712
+ expect(getLookups).toHaveBeenCalledWith({
690
713
  type: props.lookupCode,
691
714
  parents: props.parents,
692
715
  displayNamePrefix: '',
@@ -722,10 +745,12 @@ describe('DependentLookupEditor', function () {
722
745
  getLookups.mockReturnValue(Promise.resolve({}));
723
746
  wrapper = mount(React.createElement(DependentLookupEditor, __assign({}, props, { getLookups: getLookups })));
724
747
  newInputValue = 'Ch';
725
- act(function () {
726
- wrapper.find('Select').prop('onInputChange')(newInputValue, { action: 'input-change' });
727
- });
728
- return [4 /*yield*/, delayPromise(1)];
748
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
749
+ return __generator(this, function (_a) {
750
+ wrapper.find('Select').prop('onInputChange')(newInputValue, { action: 'input-change' });
751
+ return [2 /*return*/];
752
+ });
753
+ }); })];
729
754
  case 1:
730
755
  _a.sent();
731
756
  wrapper.update();
@@ -766,16 +791,18 @@ describe('DependentLookupEditor', function () {
766
791
  wrapper = mount(React.createElement(DependentLookupEditor, __assign({}, props, { getLookups: getLookups, value: value, multiple: false })));
767
792
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe('USA (US)');
768
793
  newInputValue = 'u';
769
- act(function () {
770
- wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
771
- });
772
- return [4 /*yield*/, delayPromise(1)];
794
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
795
+ return __generator(this, function (_a) {
796
+ wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
797
+ return [2 /*return*/];
798
+ });
799
+ }); })];
773
800
  case 1:
774
801
  _a.sent();
775
802
  wrapper.update();
776
803
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
777
804
  expect(props.onChange).not.toHaveBeenCalled();
778
- expect(getLookups).toBeCalledWith({
805
+ expect(getLookups).toHaveBeenCalledWith({
779
806
  type: 'COUNTRY_CD',
780
807
  parents: [],
781
808
  displayNamePrefix: newInputValue,
@@ -800,16 +827,18 @@ describe('DependentLookupEditor', function () {
800
827
  wrapper = mount(React.createElement(DependentLookupEditor, __assign({}, props, { getLookups: getLookups, value: value, multiple: false })));
801
828
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe('USA (US)');
802
829
  newInputValue = '';
803
- act(function () {
804
- wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
805
- });
806
- return [4 /*yield*/, delayPromise(1)];
830
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
831
+ return __generator(this, function (_a) {
832
+ wrapper.find(ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
833
+ return [2 /*return*/];
834
+ });
835
+ }); })];
807
836
  case 1:
808
837
  _a.sent();
809
838
  wrapper.update();
810
839
  expect(wrapper.find(ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
811
840
  expect(props.onChange).toHaveBeenCalledWith('');
812
- expect(getLookups).toBeCalledWith({
841
+ expect(getLookups).toHaveBeenCalledWith({
813
842
  type: 'COUNTRY_CD',
814
843
  parents: [],
815
844
  displayNamePrefix: '',
@@ -830,7 +859,7 @@ describe('DependentLookupEditor', function () {
830
859
  };
831
860
  var value = { lookupCode: 'DE', value: '' };
832
861
  mount(React.createElement(DependentLookupEditor, __assign({}, props, { lookups: lookups, value: value })));
833
- expect(props.onChange).toBeCalledWith({
862
+ expect(props.onChange).toHaveBeenCalledWith({
834
863
  lookupCode: 'DE',
835
864
  value: 'Germany'
836
865
  });
@@ -838,20 +867,21 @@ describe('DependentLookupEditor', function () {
838
867
  it('should call props.resolveLookups if lookup is unresolved and has no resolved value in lookups', function () {
839
868
  var value = { lookupCode: 'DE', value: '' };
840
869
  mount(React.createElement(DependentLookupEditor, __assign({}, props, { value: value })));
841
- expect(props.resolveLookups).toBeCalledWith(props.lookupCode, ['DE']);
870
+ expect(props.resolveLookups).toHaveBeenCalledWith(props.lookupCode, ['DE']);
842
871
  });
843
872
  it('should call props.resolveLookups once if lookup is unresolved and has no resolved value in lookups and has no resolved value in response', function () {
844
873
  var value = { lookupCode: 'DE', value: '' };
845
874
  var component = mount(React.createElement(DependentLookupEditor, __assign({}, props, { value: value })));
846
875
  component.setProps({ value: __assign({}, value) });
847
876
  expect(props.resolveLookups).toHaveBeenCalledTimes(1);
848
- expect(props.resolveLookups).toBeCalledWith(props.lookupCode, ['DE']);
877
+ expect(props.resolveLookups).toHaveBeenCalledWith(props.lookupCode, ['DE']);
849
878
  });
850
879
  it('should use debounced variant of loadOptions on input change', function () { return __awaiter(void 0, void 0, void 0, function () {
851
880
  var getLookups, component, select;
852
881
  return __generator(this, function (_a) {
853
882
  switch (_a.label) {
854
883
  case 0:
884
+ jest.useFakeTimers();
855
885
  debounce.mockImplementation(originalDebounce);
856
886
  getLookups = jest.fn().mockReturnValue(Promise.resolve({
857
887
  US: { displayName: 'USA' },
@@ -859,13 +889,16 @@ describe('DependentLookupEditor', function () {
859
889
  }));
860
890
  component = shallow(React.createElement(DependentLookupEditor, __assign({}, props, { getLookups: getLookups })));
861
891
  select = component.find(ReactSelect);
862
- select.prop('onInputChange')('u', { action: 'input-change' });
863
- select.prop('onInputChange')('u', { action: 'input-change' });
864
- return [4 /*yield*/, delayPromise(DEBOUNCE_INTERVAL)];
892
+ act(function () {
893
+ select.prop('onInputChange')('u', { action: 'input-change' });
894
+ });
895
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
896
+ return __generator(this, function (_a) {
897
+ jest.advanceTimersByTime(DEBOUNCE_INTERVAL);
898
+ return [2 /*return*/];
899
+ });
900
+ }); })];
865
901
  case 1:
866
- _a.sent();
867
- return [4 /*yield*/, delayPromise(1)];
868
- case 2:
869
902
  _a.sent();
870
903
  expect(getLookups).toHaveBeenCalledTimes(1);
871
904
  expect(component.find(ReactSelect).prop('options')).toEqual([
@@ -876,6 +909,7 @@ describe('DependentLookupEditor', function () {
876
909
  { lookupCode: 'US', value: 'USA' }
877
910
  ]);
878
911
  expect(debounce).toHaveBeenCalled();
912
+ jest.useRealTimers();
879
913
  return [2 /*return*/];
880
914
  }
881
915
  });
@@ -895,7 +929,9 @@ describe('DependentLookupEditor', function () {
895
929
  ];
896
930
  var component = shallow(React.createElement(DependentLookupEditor, __assign({}, props, { parents: parents })));
897
931
  var select = component.find(ReactSelect);
898
- select.prop('onInputChange')('u', { action: 'input-change' });
932
+ act(function () {
933
+ select.prop('onInputChange')('u', { action: 'input-change' });
934
+ });
899
935
  expect(component.prop('isDisabled')).toBeFalsy();
900
936
  expect(props.getLookups).toHaveBeenCalledTimes(1);
901
937
  expect(props.getLookups).toHaveBeenCalledWith({
@@ -914,14 +950,15 @@ describe('DependentLookupEditor', function () {
914
950
  parents = null;
915
951
  component = shallow(React.createElement(DependentLookupEditor, __assign({}, props, { parents: parents })));
916
952
  select = component.find(ReactSelect);
917
- select.prop('onInputChange')('u', { action: 'input-change' });
918
- expect(props.getLookups).not.toHaveBeenCalled();
919
- return [4 /*yield*/, delayPromise(DEBOUNCE_INTERVAL)];
953
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
954
+ return __generator(this, function (_a) {
955
+ select.prop('onInputChange')('u', { action: 'input-change' });
956
+ return [2 /*return*/];
957
+ });
958
+ }); })];
920
959
  case 1:
921
960
  _a.sent();
922
- return [4 /*yield*/, delayPromise(1)];
923
- case 2:
924
- _a.sent();
961
+ expect(props.getLookups).not.toHaveBeenCalled();
925
962
  expect(component.find(ReactSelect).prop('options')).toEqual([]);
926
963
  return [2 /*return*/];
927
964
  }
@@ -931,7 +968,9 @@ describe('DependentLookupEditor', function () {
931
968
  var parents = undefined;
932
969
  var component = shallow(React.createElement(DependentLookupEditor, __assign({}, props, { parents: parents })));
933
970
  var select = component.find(ReactSelect);
934
- select.prop('onInputChange')('u', { action: 'input-change' });
971
+ act(function () {
972
+ select.prop('onInputChange')('u', { action: 'input-change' });
973
+ });
935
974
  expect(props.getLookups).toHaveBeenCalledTimes(1);
936
975
  expect(props.getLookups).toHaveBeenCalledWith({
937
976
  displayNamePrefix: 'u',
@@ -1084,7 +1123,14 @@ describe('DependentLookupEditor', function () {
1084
1123
  case 1:
1085
1124
  _a.sent();
1086
1125
  select = component.find(ReactSelect);
1087
- select.prop('onInputChange')('Ru', { action: 'input-change' });
1126
+ return [4 /*yield*/, act(function () { return __awaiter(void 0, void 0, void 0, function () {
1127
+ return __generator(this, function (_a) {
1128
+ select.prop('onInputChange')('Ru', { action: 'input-change' });
1129
+ return [2 /*return*/];
1130
+ });
1131
+ }); })];
1132
+ case 2:
1133
+ _a.sent();
1088
1134
  expect(getLookups).toHaveBeenCalledTimes(2);
1089
1135
  expect(props.onChange).not.toHaveBeenCalled();
1090
1136
  return [2 /*return*/];
@@ -28,6 +28,6 @@ describe('DropDownEditor', function () {
28
28
  var onChange = jest.fn(), value = 'Enum2';
29
29
  var wrapper = shallow(React.createElement(DropDownEditor, { onChange: onChange, entries: entries }));
30
30
  wrapper.find(MultipliableSelect).simulate('change', value);
31
- expect(onChange).toBeCalledWith(value);
31
+ expect(onChange).toHaveBeenCalledWith(value);
32
32
  });
33
33
  });
@@ -22,12 +22,12 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React from 'react';
24
24
  import { shallow } from 'enzyme';
25
- import * as mdmSdk from '@reltio/mdm-sdk';
26
25
  import { EditModeAttribute } from './EditModeAttribute';
26
+ import { isReltioCrosswalk } from '@reltio/mdm-sdk';
27
27
  import { SimpleAttributeEditor } from '../../../SimpleAttributeEditor';
28
28
  import { NestedAttributeEditor } from '../../../NestedAttributeEditor';
29
29
  import { ReferenceAttributeEditor } from '../../../ReferenceAttributeEditor';
30
- jest.mock('@reltio/mdm-sdk');
30
+ jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { isReltioCrosswalk: jest.fn() })); });
31
31
  describe('EditModeAttribute', function () {
32
32
  it('should render Simple attribute', function () {
33
33
  var props = {
@@ -93,7 +93,7 @@ describe('EditModeAttribute', function () {
93
93
  errors: [],
94
94
  error: {}
95
95
  };
96
- var isReltioCrosswalkSpy = jest.spyOn(mdmSdk, 'isReltioCrosswalk').mockReturnValue(true);
96
+ isReltioCrosswalk.mockReturnValue(true);
97
97
  var component = shallow(React.createElement(EditModeAttribute, __assign({}, props)));
98
98
  expect(component.find(SimpleAttributeEditor).length).toBe(1);
99
99
  expect(component.find(NestedAttributeEditor).length).toBe(0);
@@ -101,6 +101,6 @@ describe('EditModeAttribute', function () {
101
101
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
102
102
  var showEmptyEditors = props.showEmptyEditors, onAddAttributes = props.onAddAttributes, lazy = props.lazy, crosswalks = props.crosswalks, errors = props.errors, filteredProps = __rest(props, ["showEmptyEditors", "onAddAttributes", "lazy", "crosswalks", "errors"]); //eslint-disable-line no-unused-vars
103
103
  expect(component.find(SimpleAttributeEditor).props()).toEqual(__assign(__assign({}, filteredProps), { isReltioCrosswalk: true }));
104
- expect(isReltioCrosswalkSpy).toHaveBeenCalledWith(props.crosswalks, props.attributeValue);
104
+ expect(isReltioCrosswalk).toHaveBeenCalledWith(props.crosswalks, props.attributeValue);
105
105
  });
106
106
  });
@@ -10,7 +10,7 @@ declare const _default: React.ComponentType<{
10
10
  showEmptyEditors?: boolean;
11
11
  showNonOv?: boolean;
12
12
  className?: string;
13
- alwaysVisibleTypeUris?: string[];
13
+ fixedTypeUris?: string[];
14
14
  highlightAttribute?: (element: AttributeType, type: ScrollType) => void;
15
15
  } & Pick<EditModeAttributesPagerProps<AttributeValue>, "mode" | "crosswalks" | "parentUri" | "drawLines" | "onAddAttributes" | "onDeleteAttribute" | "onChangeAttribute" | "additionalControlsRenderer" | "showEmptyEditors">>;
16
16
  export default _default;
@@ -16,7 +16,7 @@ import { last, path } from 'ramda';
16
16
  import { EditModeAttributesPager } from '../EditModeAttributesPager';
17
17
  import { BranchDecorator } from '../BranchDecorator';
18
18
  import { MoreAttributesButton } from '../MoreAttributesButton';
19
- import { ALWAYS_VISIBLE_TYPE_URIS } from '../constants';
19
+ import { FIXED_TYPE_URIS } from '../constants';
20
20
  import { splitPagersData } from '../helpers/attributesView';
21
21
  import { getMoreAttrTypes } from './helpers';
22
22
  import { PinnedAttributesContext } from '../contexts/PinnedAttributesContext';
@@ -25,11 +25,13 @@ 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
29
  var EditModeAttributesList = function (_a) {
29
- 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.alwaysVisibleTypeUris, alwaysVisibleTypeUris = _b === void 0 ? ALWAYS_VISIBLE_TYPE_URIS : _b, onAddAttributes = _a.onAddAttributes, onChangeAttribute = _a.onChangeAttribute, onDeleteAttribute = _a.onDeleteAttribute, additionalControlsRenderer = _a.additionalControlsRenderer, showNonOv = _a.showNonOv, highlightAttribute = _a.highlightAttribute;
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;
30
31
  var hiddenAttributes = useContext(HiddenAttributesContext);
31
32
  var entityUri = parentUri && getBaseUri(parentUri);
32
33
  var currentEntityHiddenAttributes = useMemo(function () { return hiddenAttributes[entityUri] || []; }, [hiddenAttributes, entityUri]);
34
+ var alwaysVisibleAttributes = useContext(AlwaysVisibleAttributesContext);
33
35
  var filteredAttrTypes = useMemo(function () { return attrTypes.filter(function (attrType) { return !currentEntityHiddenAttributes.includes(attrType.uri); }); }, [attrTypes, currentEntityHiddenAttributes]);
34
36
  var _c = entity.attributes, attributes = _c === void 0 ? {} : _c;
35
37
  var _d = useState({}), hasDeletionsMap = _d[0], setHasDeletionsMap = _d[1];
@@ -48,9 +50,18 @@ var EditModeAttributesList = function (_a) {
48
50
  var moreAttrTypes = getMoreAttrTypes(creatableAttrTypes, entity, showEmptyEditors, hasDeletionsMap);
49
51
  var pinnedAttributes = useContext(PinnedAttributesContext);
50
52
  var pagersData = useMemo(function () {
51
- return getAttributesListForEditMode(filteredAttrTypes, mode, entity, showEmptyEditors, showNonOv, pinnedAttributes, canCreate);
52
- }, [filteredAttrTypes, mode, entity, showEmptyEditors, showNonOv, pinnedAttributes, canCreate]);
53
- var _e = useMemo(function () { return splitPagersData(alwaysVisibleTypeUris, pagersData); }, [pagersData, alwaysVisibleTypeUris]), alwaysVisiblePagersData = _e[0], regularPagersData = _e[1];
53
+ return getAttributesListForEditMode(filteredAttrTypes, mode, entity, showEmptyEditors, showNonOv, pinnedAttributes, canCreate, alwaysVisibleAttributes);
54
+ }, [
55
+ filteredAttrTypes,
56
+ mode,
57
+ entity,
58
+ showEmptyEditors,
59
+ showNonOv,
60
+ pinnedAttributes,
61
+ canCreate,
62
+ alwaysVisibleAttributes
63
+ ]);
64
+ var _e = useMemo(function () { return splitPagersData(fixedTypeUris, pagersData); }, [pagersData, fixedTypeUris]), fixedPagersData = _e[0], regularPagersData = _e[1];
54
65
  var onAddMoreAttributes = useCallback(function (attributeTypes) {
55
66
  onAddAttributes(attributeTypes.map(function (attributeType) { return ({
56
67
  attributeType: attributeType,
@@ -68,7 +79,7 @@ var EditModeAttributesList = function (_a) {
68
79
  return (React.createElement("div", { className: className },
69
80
  children && React.createElement(BranchDecorator, __assign({}, decoratorProps), children),
70
81
  React.createElement(BranchDecorator, __assign({}, decoratorProps, { plain: true }), moreAttrTypes.length > 0 && mode !== Mode.Viewing && (React.createElement(MoreAttributesButton, { label: i18n.text('More attributes'), onApply: onAddMoreAttributes, dense: drawLines, data: moreAttrTypes, parent: canCreateParentAttrType && parentAttributeType }))),
71
- React.createElement(HasDeletionsContext.Provider, { value: hasDeletionsContextValue }, regularPagersData.concat(alwaysVisiblePagersData).map(function (_a) {
82
+ React.createElement(HasDeletionsContext.Provider, { value: hasDeletionsContextValue }, regularPagersData.concat(fixedPagersData).map(function (_a) {
72
83
  var attrType = _a.attrType, values = _a.values;
73
84
  return (React.createElement(EditModeAttributesPager, { key: "".concat(attrType.uri, "_").concat(parentUri), attributeType: attrType, drawLines: drawLines, values: values, paging: path(['paging', attrType.uri], attributes), parentUri: parentUri, showEmptyEditors: showEmptyEditors, mode: mode, crosswalks: crosswalks, onAddAttributes: onAddAttributes, onChangeAttribute: onChangeAttribute, onDeleteAttribute: onDeleteAttribute, additionalControlsRenderer: additionalControlsRenderer, showNonOv: showNonOv }));
74
85
  }))));
@@ -20,6 +20,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
20
20
  };
21
21
  import React from 'react';
22
22
  import { mount } from 'enzyme';
23
+ import { act } from 'react-dom/test-utils';
23
24
  import EditModeAttributesList from './EditModeAttributesList';
24
25
  import { MoreAttributesButton } from '../MoreAttributesButton';
25
26
  import { EditModeAttributesPager } from '../EditModeAttributesPager';
@@ -129,7 +130,9 @@ describe('EditModeAttributesList tests', function () {
129
130
  var component = mount(React.createElement(EditModeAttributesList, { attrTypes: attrTypes, entity: entity, parentUri: parentUri, showEmptyEditors: true }));
130
131
  var _b = component.find(HasDeletionsContext.Provider).prop('value'), hasDeletionsMap = _b.hasDeletionsMap, setHasDeletions = _b.setHasDeletions;
131
132
  expect(hasDeletionsMap).toEqual({});
132
- setHasDeletions(attrTypes[0].uri, true);
133
+ act(function () {
134
+ setHasDeletions(attrTypes[0].uri, true);
135
+ });
133
136
  rerenderWrapper(component);
134
137
  expect(component.find(MoreAttributesButton).length).toBe(1);
135
138
  expect(component.find(MoreAttributesButton).prop('data')).toEqual([attrTypes[0]]);
@@ -348,6 +351,6 @@ describe('EditModeAttributesList tests', function () {
348
351
  mount(React.createElement(PinnedAttributesContext.Provider, { value: pinnedAttributes },
349
352
  React.createElement(EditModeAttributesList, { mode: Mode.Editing, attrTypes: attributesList, entity: entity, parentUri: parentUri },
350
353
  React.createElement(Child, null))));
351
- expect(getAttributesListForEditMode).toHaveBeenCalledWith(attributesList, Mode.Editing, entity, undefined, undefined, pinnedAttributes, true);
354
+ expect(getAttributesListForEditMode).toHaveBeenCalledWith(attributesList, Mode.Editing, entity, undefined, undefined, pinnedAttributes, true, []);
352
355
  });
353
356
  });
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React, { useContext, useMemo } from 'react';
13
- import { getAttributeErrorByTypeUri, getAttributePagerActiveTypeErrorMessage, getBaseUri, isAttributeTypeError, isImage, isOv, isSpecialAttribute, Mode } from '@reltio/mdm-sdk';
13
+ import { getAttributeErrorByTypeUri, getAttributePagerActiveTypeErrorMessage, getBaseUri, isAttributeTypeError, isImage, isOv, isSpecialAttribute, Mode, filterErrorsForHiddenAttributes } from '@reltio/mdm-sdk';
14
14
  import { always, cond, T, partition } from 'ramda';
15
15
  import { BranchDecorator } from '../BranchDecorator';
16
16
  import { AttributeRenderer } from './components/AttributeRenderer';
@@ -21,7 +21,6 @@ import { RENDERER_TYPES } from './types';
21
21
  import { isHighlightedAttributeType, isHighlightedErrorType, ScrollToElementContext } from '../contexts/ScrollToElementContext';
22
22
  import { useMdmAction, useMdmActiveErrorsForAttributesPager, useMdmMaxValuesInResponse, useMdmProfileErrors } from '../contexts/MdmModuleContext';
23
23
  import { HiddenAttributesContext } from '../contexts/HiddenAttributesContext';
24
- import { filterErrorsForHiddenAttributes } from '@reltio/mdm-sdk';
25
24
  var EditModeAttributesPager = function (_a) {
26
25
  var _b;
27
26
  var values = _a.values, attributeType = _a.attributeType, _c = _a.mode, mode = _c === void 0 ? Mode.Viewing : _c, crosswalks = _a.crosswalks, drawLines = _a.drawLines, _d = _a.paging, paging = _d === void 0 ? {} : _d, parentUri = _a.parentUri, maxProp = _a.max, showEmptyEditors = _a.showEmptyEditors, showNonOv = _a.showNonOv, highlightedError = _a.highlightedError, highlightedAttribute = _a.highlightedAttribute, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, additionalControlsRenderer = _a.additionalControlsRenderer;
@@ -11,6 +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
15
  import { DescriptionIcon } from '../../../DescriptionIcon';
15
16
  import { ControlAttributeIcon } from '../../../ControlAttributeIcon';
16
17
  import { useScrollToAttribute } from '../../../hooks/useScrollToAttribute';
@@ -28,9 +29,11 @@ var AttributeRenderer = function (_a) {
28
29
  var _d = useScrollToAttributeError({ highlightedError: highlightedError }), errorRef = _d.ref, errorClassName = _d.errorClassName;
29
30
  var _e = useScrollToAttribute(highlightedAttribute), attributeRef = _e.ref, highlightedClassName = _e.highlightedClassName;
30
31
  var pinnedAttributes = useContext(PinnedAttributesContext);
32
+ var alwaysVisibleAttributes = useContext(AlwaysVisibleAttributesContext);
31
33
  var isPinned = useMemo(function () { return pinnedAttributes === null || pinnedAttributes === void 0 ? void 0 : pinnedAttributes.includes(attributeTypeUri); }, [attributeTypeUri, pinnedAttributes]);
34
+ var isAlwaysVisible = useMemo(function () { return alwaysVisibleAttributes === null || alwaysVisibleAttributes === void 0 ? void 0 : alwaysVisibleAttributes.includes(attributeTypeUri); }, [attributeTypeUri, alwaysVisibleAttributes]);
32
35
  var isEmptyValues = isEmptyValue(values);
33
- var showEmpty = ((!hadDeletions && showEmptyEditors) || isRequired || isPinned) && isEmptyValues;
36
+ var showEmpty = ((!hadDeletions && showEmptyEditors) || isRequired || isPinned || isAlwaysVisible) && isEmptyValues;
34
37
  var controlAttributes = useMdmControlAttributes();
35
38
  var isControlAttribute = useMemo(function () { return controlAttributes.includes(attributeType.uri); }, [controlAttributes, attributeType.uri]);
36
39
  var emptyEditorValue = useRef(createNewAttribute({