@reltio/components 1.4.2269 → 1.4.2272

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 (305) hide show
  1. package/ActionButton/ActionButton.d.ts +1 -1
  2. package/ActionButton/ActionButton.js +1 -1
  3. package/ActionsPanel/types.d.ts +1 -1
  4. package/AsyncReactSelect/AsyncReactSelect.d.ts +1 -5
  5. package/AttributesFiltersBuilder/AttributesFiltersBuilder.js +2 -1
  6. package/AttributesFiltersButton/AttributesFiltersButton.js +1 -1
  7. package/AttributesValuesEditor/AttributesValuesEditor.js +3 -1
  8. package/AutoSizeList/AutoSizeList.js +1 -1
  9. package/BasicAttributeSelector/BasicAttributeSelector.js +1 -1
  10. package/BasicView/BasicView.d.ts +2 -10
  11. package/BubbleChart/BubbleChart.d.ts +1 -4
  12. package/CloudChart/CloudChart.d.ts +1 -4
  13. package/CollaborationItem/CollaborationItem.js +1 -1
  14. package/CollaborationItem/components/Comment/Comment.js +1 -1
  15. package/CollaborationItem/components/RepliedComment/RepliedComment.js +1 -1
  16. package/ConfigureColumnsPopup/ConfigureColumnsPopup.js +2 -1
  17. package/CreatableReactSelect/CreatableReactSelect.d.ts +1 -5
  18. package/DataTypeValueEditor/useEditorContext.test.js +1 -1
  19. package/DependentLookupEditor/styles.d.ts +1 -1
  20. package/DropDownMenuButton/DropDownMenuButton.d.ts +1 -1
  21. package/DropDownMenuButton/DropDownMenuButton.js +4 -2
  22. package/DropDownSelector/DropDownSelector.js +2 -1
  23. package/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.d.ts +4 -2
  24. package/EditModeAttributesList/EditModeAttributesList.d.ts +3 -2
  25. package/EmptyState/styles.d.ts +1 -1
  26. package/EntitySelector/EntitySelector.js +3 -1
  27. package/EntityUriLink/EntityUriLink.d.ts +4 -2
  28. package/ErrorBoundary/ErrorBoundary.d.ts +1 -0
  29. package/ExpandedValueTooltip/ExpandedValueTooltip.js +1 -1
  30. package/FacetsSelector/components/AttributeSelectorPopup/AttributeSelectorPopup.js +1 -1
  31. package/GaugeChart/GaugeChart.js +1 -1
  32. package/HOCs/withAsyncMount/withAsyncMount.js +2 -1
  33. package/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.js +2 -1
  34. package/HOCs/withReactSelectMuiSkin/styles.d.ts +1 -1
  35. package/HOCs/withReactSelectMuiSkin/withReactSelectMuiSkin.d.ts +1 -5
  36. package/HOCs/withReactSelectMuiSkin/withReactSelectMuiSkin.js +3 -6
  37. package/HierarchyNodeTitle/useEntityDetails.test.js +1 -1
  38. package/ImageActionsOverlay/styles.d.ts +1 -1
  39. package/ImageAttributesLine/ImageAttributesLine.js +1 -1
  40. package/ImageDetailsView/components/MetaInfo/useEditMetaInfo.d.ts +9 -2
  41. package/InlineSimpleAttribute/InlineSimpleAttribute.js +1 -1
  42. package/MapChart/MapChart.d.ts +5 -4
  43. package/MetadataTypesSelector/MetadataTypesSelector.js +1 -1
  44. package/MetadataTypesSelector/components/ListLabel/ListLabel.js +1 -1
  45. package/MoreAttributesButton/MoreAttributesButton.js +1 -1
  46. package/MultiSelect/MultiSelect.d.ts +22 -40
  47. package/MultiSelect/MultiSelect.js +8 -18
  48. package/MultiSelect/styles.d.ts +1 -1
  49. package/MultiValueSelector/MultiValueSelector.js +3 -1
  50. package/PieChart/PieChart.d.ts +1 -5
  51. package/Popper/Popper.d.ts +5 -9
  52. package/Popper/Popper.js +5 -5
  53. package/PopupWithArrow/PopupWithArrow.d.ts +2 -1
  54. package/ProfileBandNavigation/useSearchNavigation.test.js +123 -123
  55. package/ProfilesList/ProfilesList.d.ts +1 -1
  56. package/RCTree/RCTree.d.ts +3 -4
  57. package/RCTree/RCTree.js +10 -2
  58. package/RCTree/RCTreeSwitchRenderer.d.ts +4 -4
  59. package/RCTree/index.d.ts +1 -0
  60. package/RCTree/types.d.ts +2 -0
  61. package/RCTree/useDelayedDragEventCall.d.ts +4 -1
  62. package/RCTree/useDnd.js +20 -9
  63. package/ReactSelect/ReactSelect.d.ts +1 -5
  64. package/ReactSortableTree/ReactSortableTree.js +0 -2
  65. package/ReactSortableTree/components/NodeRendererDefault/NodeRendererDefault.d.ts +36 -64
  66. package/ReactSortableTree/components/NodeRendererDefault/NodeRendererDefault.js +8 -18
  67. package/ReactSortableTree/components/PlaceholderRendererDefault/PlaceholderRendererDefault.d.ts +4 -10
  68. package/ReactSortableTree/components/PlaceholderRendererDefault/PlaceholderRendererDefault.js +1 -5
  69. package/ReactSortableTree/components/TreeNode/TreeNode.d.ts +23 -37
  70. package/ReactSortableTree/components/TreeNode/TreeNode.js +4 -10
  71. package/ReltioGridLayout/ReltioGridLayout.js +1 -1
  72. package/ReltioGridLayout/ReltioGridLayout.test.js +3 -3
  73. package/ResizablePanes/ResizablePanes.js +1 -1
  74. package/RowCellAutoSizer/RowCellAutoSizer.js +1 -1
  75. package/SegmentIdLink/SegmentIdLink.d.ts +4 -2
  76. package/SidePanelEmptyState/styles.d.ts +1 -1
  77. package/SimpleAttributeEditor/SimpleAttributeEditor.d.ts +6 -11
  78. package/SimpleAttributeEditor/styles.d.ts +1 -1
  79. package/SimpleAttributeEditor/useAutopopulationContextValue.test.js +1 -1
  80. package/SimpleDropDownSelector/styles.d.ts +1 -1
  81. package/SmallIconButton/SmallIconButton.d.ts +4 -2
  82. package/SyncedValueHeight/ValueHeightReporter.js +1 -1
  83. package/UploadFileButton/components/UploadMode/UploadMode.js +1 -1
  84. package/UserSelector/UserSelector.js +1 -1
  85. package/VirtualGroupedList/useScrollToFocusItem.d.ts +4 -1
  86. package/VirtualGroupedList/useScrollToFocusItem.test.js +1 -1
  87. package/cjs/ActionButton/ActionButton.d.ts +1 -1
  88. package/cjs/ActionButton/ActionButton.js +1 -1
  89. package/cjs/ActionsPanel/types.d.ts +1 -1
  90. package/cjs/AsyncReactSelect/AsyncReactSelect.d.ts +1 -5
  91. package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.js +2 -1
  92. package/cjs/AttributesFiltersButton/AttributesFiltersButton.js +1 -1
  93. package/cjs/AttributesValuesEditor/AttributesValuesEditor.js +3 -1
  94. package/cjs/AutoSizeList/AutoSizeList.js +1 -1
  95. package/cjs/BasicAttributeSelector/BasicAttributeSelector.js +1 -1
  96. package/cjs/BasicView/BasicView.d.ts +2 -10
  97. package/cjs/BubbleChart/BubbleChart.d.ts +1 -4
  98. package/cjs/CloudChart/CloudChart.d.ts +1 -4
  99. package/cjs/CollaborationItem/CollaborationItem.js +1 -1
  100. package/cjs/CollaborationItem/components/Comment/Comment.js +1 -1
  101. package/cjs/CollaborationItem/components/RepliedComment/RepliedComment.js +1 -1
  102. package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.js +2 -1
  103. package/cjs/CreatableReactSelect/CreatableReactSelect.d.ts +1 -5
  104. package/cjs/DataTypeValueEditor/useEditorContext.test.js +2 -2
  105. package/cjs/DependentLookupEditor/styles.d.ts +1 -1
  106. package/cjs/DropDownMenuButton/DropDownMenuButton.d.ts +1 -1
  107. package/cjs/DropDownMenuButton/DropDownMenuButton.js +4 -2
  108. package/cjs/DropDownSelector/DropDownSelector.js +2 -1
  109. package/cjs/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.d.ts +4 -2
  110. package/cjs/EditModeAttributesList/EditModeAttributesList.d.ts +3 -2
  111. package/cjs/EmptyState/styles.d.ts +1 -1
  112. package/cjs/EntitySelector/EntitySelector.js +3 -1
  113. package/cjs/EntityUriLink/EntityUriLink.d.ts +4 -2
  114. package/cjs/ErrorBoundary/ErrorBoundary.d.ts +1 -0
  115. package/cjs/ExpandedValueTooltip/ExpandedValueTooltip.js +1 -1
  116. package/cjs/FacetsSelector/components/AttributeSelectorPopup/AttributeSelectorPopup.js +1 -1
  117. package/cjs/GaugeChart/GaugeChart.js +1 -1
  118. package/cjs/HOCs/withAsyncMount/withAsyncMount.js +2 -1
  119. package/cjs/HOCs/withReactSelectMuiSkin/components/ReactSelectControl/ReactSelectControl.js +2 -1
  120. package/cjs/HOCs/withReactSelectMuiSkin/styles.d.ts +1 -1
  121. package/cjs/HOCs/withReactSelectMuiSkin/withReactSelectMuiSkin.d.ts +1 -5
  122. package/cjs/HOCs/withReactSelectMuiSkin/withReactSelectMuiSkin.js +3 -6
  123. package/cjs/HierarchyNodeTitle/useEntityDetails.test.js +18 -18
  124. package/cjs/ImageActionsOverlay/styles.d.ts +1 -1
  125. package/cjs/ImageAttributesLine/ImageAttributesLine.js +1 -1
  126. package/cjs/ImageDetailsView/components/MetaInfo/useEditMetaInfo.d.ts +9 -2
  127. package/cjs/InlineSimpleAttribute/InlineSimpleAttribute.js +1 -1
  128. package/cjs/MapChart/MapChart.d.ts +5 -4
  129. package/cjs/MetadataTypesSelector/MetadataTypesSelector.js +1 -1
  130. package/cjs/MetadataTypesSelector/components/ListLabel/ListLabel.js +1 -1
  131. package/cjs/MoreAttributesButton/MoreAttributesButton.js +1 -1
  132. package/cjs/MultiSelect/MultiSelect.d.ts +22 -40
  133. package/cjs/MultiSelect/MultiSelect.js +7 -17
  134. package/cjs/MultiSelect/styles.d.ts +1 -1
  135. package/cjs/MultiValueSelector/MultiValueSelector.js +3 -1
  136. package/cjs/PieChart/PieChart.d.ts +1 -5
  137. package/cjs/Popper/Popper.d.ts +5 -9
  138. package/cjs/Popper/Popper.js +5 -5
  139. package/cjs/PopupWithArrow/PopupWithArrow.d.ts +2 -1
  140. package/cjs/ProfileBandNavigation/useSearchNavigation.test.js +177 -177
  141. package/cjs/ProfilesList/ProfilesList.d.ts +1 -1
  142. package/cjs/RCTree/RCTree.d.ts +3 -4
  143. package/cjs/RCTree/RCTree.js +10 -2
  144. package/cjs/RCTree/RCTreeSwitchRenderer.d.ts +4 -4
  145. package/cjs/RCTree/index.d.ts +1 -0
  146. package/cjs/RCTree/types.d.ts +2 -0
  147. package/cjs/RCTree/useDelayedDragEventCall.d.ts +4 -1
  148. package/cjs/RCTree/useDnd.js +19 -8
  149. package/cjs/ReactSelect/ReactSelect.d.ts +1 -5
  150. package/cjs/ReactSortableTree/ReactSortableTree.js +0 -2
  151. package/cjs/ReactSortableTree/components/NodeRendererDefault/NodeRendererDefault.d.ts +36 -64
  152. package/cjs/ReactSortableTree/components/NodeRendererDefault/NodeRendererDefault.js +8 -18
  153. package/cjs/ReactSortableTree/components/PlaceholderRendererDefault/PlaceholderRendererDefault.d.ts +4 -10
  154. package/cjs/ReactSortableTree/components/PlaceholderRendererDefault/PlaceholderRendererDefault.js +1 -5
  155. package/cjs/ReactSortableTree/components/TreeNode/TreeNode.d.ts +23 -37
  156. package/cjs/ReactSortableTree/components/TreeNode/TreeNode.js +4 -10
  157. package/cjs/ReltioGridLayout/ReltioGridLayout.js +1 -1
  158. package/cjs/ReltioGridLayout/ReltioGridLayout.test.js +3 -3
  159. package/cjs/ResizablePanes/ResizablePanes.js +1 -1
  160. package/cjs/RowCellAutoSizer/RowCellAutoSizer.js +1 -1
  161. package/cjs/SegmentIdLink/SegmentIdLink.d.ts +4 -2
  162. package/cjs/SidePanelEmptyState/styles.d.ts +1 -1
  163. package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.d.ts +6 -11
  164. package/cjs/SimpleAttributeEditor/styles.d.ts +1 -1
  165. package/cjs/SimpleAttributeEditor/useAutopopulationContextValue.test.js +2 -2
  166. package/cjs/SimpleDropDownSelector/styles.d.ts +1 -1
  167. package/cjs/SmallIconButton/SmallIconButton.d.ts +4 -2
  168. package/cjs/SyncedValueHeight/ValueHeightReporter.js +1 -1
  169. package/cjs/UploadFileButton/components/UploadMode/UploadMode.js +1 -1
  170. package/cjs/UserSelector/UserSelector.js +1 -1
  171. package/cjs/VirtualGroupedList/useScrollToFocusItem.d.ts +4 -1
  172. package/cjs/VirtualGroupedList/useScrollToFocusItem.test.js +5 -5
  173. package/cjs/contexts/AutoExpandedAttributesContext/useAttributeAutoExpanded.test.js +2 -2
  174. package/cjs/contexts/ReloadDataContext/ReloadDataContext.spec.js +4 -4
  175. package/cjs/features/activity-log/ActivityFilterButton/ActivityFilterButton.js +1 -1
  176. package/cjs/features/crosswalks/AttributesTable/AttributesTable.test.js +10 -3
  177. package/cjs/features/crosswalks/CrosswalkAttributes/CrosswalkAttributes.test.js +11 -6
  178. package/cjs/features/crosswalks/CrosswalkEditor/CrosswalkEditor.test.js +15 -10
  179. package/cjs/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +11 -6
  180. package/cjs/features/crosswalks/hooks/useAttributeActions.test.js +26 -26
  181. package/cjs/features/crosswalks/hooks/useCrosswalkActions.test.js +12 -12
  182. package/cjs/features/crosswalks/hooks/useModifiedEntity.js +4 -4
  183. package/cjs/features/crosswalks/hooks/useModifiedEntity.test.js +17 -17
  184. package/cjs/features/graph/DataModelGraph/hooks/useDataModelGraphAppearance.test.js +17 -28
  185. package/cjs/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +10 -10
  186. package/cjs/features/graph/DataModelGraph/hooks/useFakeCenterNode.test.js +3 -3
  187. package/cjs/features/graph/DataModelGraph/hooks/useSelectedNodeRenderer.test.js +4 -4
  188. package/cjs/features/graph/hooks/useLoopRenderer.test.js +3 -3
  189. package/cjs/features/graph/hooks/useSigmaCustomRenderers.test.js +28 -28
  190. package/cjs/features/history/HistoryFilterButton/HistoryFilterButton.js +1 -1
  191. package/cjs/features/history/hooks/useHistory.test.js +36 -36
  192. package/cjs/features/history/hooks/useHistoryDiff.test.js +2 -2
  193. package/cjs/features/history/hooks/useHistoryEnabled.test.js +2 -2
  194. package/cjs/features/history/hooks/useHistorySlice.test.js +8 -8
  195. package/cjs/features/history/hooks/useHistoryTree.test.js +2 -2
  196. package/cjs/features/workflow/AddWorkflowDialog/styles.d.ts +1 -1
  197. package/cjs/features/workflow/helpers/dcr.js +15 -14
  198. package/cjs/features/workflow/hooks/useChangeRequest.test.js +7 -7
  199. package/cjs/features/workflow/hooks/useWorkflowCheckPermission.test.js +2 -2
  200. package/cjs/features/workflow/hooks/useWorkflowColor.test.js +2 -2
  201. package/cjs/helpers/customScript.test.js +3 -3
  202. package/cjs/hooks/useAPI/useAPI.js +2 -2
  203. package/cjs/hooks/useAPI/useAPI.test.js +134 -134
  204. package/cjs/hooks/useChangedAttributes/useChangedAttributes.js +2 -2
  205. package/cjs/hooks/useCollaboration/useCollaboration.d.ts +47 -9
  206. package/cjs/hooks/useCollaboration/useCollaboration.js +10 -13
  207. package/cjs/hooks/useCollaboration/useCollaboration.test.js +55 -54
  208. package/cjs/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +8 -8
  209. package/cjs/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +10 -10
  210. package/cjs/hooks/useConfigPermissions/useConfigPermissions.test.js +2 -2
  211. package/cjs/hooks/useCustomScripts/useCustomScripts.test.js +25 -25
  212. package/cjs/hooks/useDndBasicTableScrollModifier/useDndBasicTableScrollModifier.js +1 -1
  213. package/cjs/hooks/useEditableConnection/useEditableConnection.test.js +2 -2
  214. package/cjs/hooks/useFilterAutoFocus/useFilterAutoFocus.d.ts +3 -3
  215. package/cjs/hooks/useHiddenAttributes/useHiddenAttributes.test.js +2 -2
  216. package/cjs/hooks/useHtmlSanitizer/useHtmlSanitizer.test.js +2 -2
  217. package/cjs/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +1 -1
  218. package/cjs/hooks/useKeyboardNavigation/useKeyboardNavigation.test.js +3 -3
  219. package/cjs/hooks/useMatchesLoader/useMatchesLoader.test.js +24 -16
  220. package/cjs/hooks/usePrevious/usePrevious.js +1 -1
  221. package/cjs/hooks/useReadableSearchState/useReadableSearchState.test.js +5 -5
  222. package/cjs/hooks/useRelationsLoader/useRelationsLoader.test.js +50 -50
  223. package/cjs/hooks/useSavedSearchesRequest/useSavedSearchesRequest.test.js +36 -36
  224. package/cjs/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +20 -16
  225. package/cjs/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +3 -3
  226. package/cjs/hooks/useUsers/useUsers.test.js +14 -15
  227. package/cjs/hooks/useWhyDidYouUpdate/useWhyDidYouUpdate.js +1 -1
  228. package/cjs/test-utils/dndKit/DndContextComponent.js +3 -0
  229. package/cjs/test-utils/dndKit/index.d.ts +1 -0
  230. package/cjs/test-utils/dndKit/useDndMonitorProvider.d.ts +4 -1
  231. package/cjs/test-utils/dndKit/useDraggable.d.ts +1 -0
  232. package/cjs/test-utils/dndKit/useDraggable.js +8 -1
  233. package/cjs/test-utils/index.d.ts +1 -1
  234. package/cjs/test-utils/index.js +4 -1
  235. package/cjs/test-utils/mockStoreHooks.d.ts +4 -0
  236. package/cjs/test-utils/mockStoreHooks.js +21 -0
  237. package/cjs/utils/withChildrenProp.d.ts +10 -0
  238. package/cjs/utils/withChildrenProp.js +13 -0
  239. package/contexts/AutoExpandedAttributesContext/useAttributeAutoExpanded.test.js +1 -1
  240. package/contexts/ReloadDataContext/ReloadDataContext.spec.js +1 -1
  241. package/features/activity-log/ActivityFilterButton/ActivityFilterButton.js +1 -1
  242. package/features/crosswalks/AttributesTable/AttributesTable.test.js +11 -4
  243. package/features/crosswalks/CrosswalkAttributes/CrosswalkAttributes.test.js +11 -6
  244. package/features/crosswalks/CrosswalkEditor/CrosswalkEditor.test.js +15 -10
  245. package/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +11 -6
  246. package/features/crosswalks/hooks/useAttributeActions.test.js +1 -1
  247. package/features/crosswalks/hooks/useCrosswalkActions.test.js +1 -1
  248. package/features/crosswalks/hooks/useModifiedEntity.js +4 -4
  249. package/features/crosswalks/hooks/useModifiedEntity.test.js +1 -1
  250. package/features/graph/DataModelGraph/hooks/useDataModelGraphAppearance.test.js +14 -25
  251. package/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +1 -1
  252. package/features/graph/DataModelGraph/hooks/useFakeCenterNode.test.js +1 -1
  253. package/features/graph/DataModelGraph/hooks/useSelectedNodeRenderer.test.js +1 -1
  254. package/features/graph/hooks/useLoopRenderer.test.js +1 -1
  255. package/features/graph/hooks/useSigmaCustomRenderers.test.js +1 -1
  256. package/features/history/HistoryFilterButton/HistoryFilterButton.js +1 -1
  257. package/features/history/hooks/useHistory.test.js +1 -1
  258. package/features/history/hooks/useHistoryDiff.test.js +1 -1
  259. package/features/history/hooks/useHistoryEnabled.test.js +1 -1
  260. package/features/history/hooks/useHistorySlice.test.js +1 -1
  261. package/features/history/hooks/useHistoryTree.test.js +1 -1
  262. package/features/workflow/AddWorkflowDialog/styles.d.ts +1 -1
  263. package/features/workflow/helpers/dcr.js +15 -14
  264. package/features/workflow/hooks/useChangeRequest.test.js +1 -1
  265. package/features/workflow/hooks/useWorkflowCheckPermission.test.js +1 -1
  266. package/features/workflow/hooks/useWorkflowColor.test.js +1 -1
  267. package/helpers/customScript.test.js +1 -1
  268. package/hooks/useAPI/useAPI.js +2 -2
  269. package/hooks/useAPI/useAPI.test.js +44 -44
  270. package/hooks/useChangedAttributes/useChangedAttributes.js +2 -2
  271. package/hooks/useCollaboration/useCollaboration.d.ts +47 -9
  272. package/hooks/useCollaboration/useCollaboration.js +10 -13
  273. package/hooks/useCollaboration/useCollaboration.test.js +3 -2
  274. package/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
  275. package/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +1 -1
  276. package/hooks/useConfigPermissions/useConfigPermissions.test.js +1 -1
  277. package/hooks/useCustomScripts/useCustomScripts.test.js +11 -11
  278. package/hooks/useDndBasicTableScrollModifier/useDndBasicTableScrollModifier.js +1 -1
  279. package/hooks/useEditableConnection/useEditableConnection.test.js +1 -1
  280. package/hooks/useFilterAutoFocus/useFilterAutoFocus.d.ts +3 -3
  281. package/hooks/useHiddenAttributes/useHiddenAttributes.test.js +1 -1
  282. package/hooks/useHtmlSanitizer/useHtmlSanitizer.test.js +1 -1
  283. package/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +1 -1
  284. package/hooks/useKeyboardNavigation/useKeyboardNavigation.test.js +1 -1
  285. package/hooks/useMatchesLoader/useMatchesLoader.test.js +23 -15
  286. package/hooks/usePrevious/usePrevious.js +1 -1
  287. package/hooks/useReadableSearchState/useReadableSearchState.test.js +3 -3
  288. package/hooks/useRelationsLoader/useRelationsLoader.test.js +38 -38
  289. package/hooks/useSavedSearchesRequest/useSavedSearchesRequest.test.js +1 -1
  290. package/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +7 -3
  291. package/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
  292. package/hooks/useUsers/useUsers.test.js +12 -13
  293. package/hooks/useWhyDidYouUpdate/useWhyDidYouUpdate.js +1 -1
  294. package/package.json +5 -6
  295. package/test-utils/dndKit/DndContextComponent.js +3 -0
  296. package/test-utils/dndKit/index.d.ts +1 -0
  297. package/test-utils/dndKit/useDndMonitorProvider.d.ts +4 -1
  298. package/test-utils/dndKit/useDraggable.d.ts +1 -0
  299. package/test-utils/dndKit/useDraggable.js +8 -1
  300. package/test-utils/index.d.ts +1 -1
  301. package/test-utils/index.js +1 -0
  302. package/test-utils/mockStoreHooks.d.ts +4 -0
  303. package/test-utils/mockStoreHooks.js +16 -0
  304. package/utils/withChildrenProp.d.ts +10 -0
  305. package/utils/withChildrenProp.js +9 -0
@@ -56,7 +56,7 @@ var __rest = (this && this.__rest) || function (s, e) {
56
56
  }
57
57
  return t;
58
58
  };
59
- import { renderHook, act } from '@testing-library/react-hooks';
59
+ import { renderHook, act } from '@testing-library/react';
60
60
  import { last, omit } from 'ramda';
61
61
  import { useSigma, useSetSettings, useRegisterEvents } from '@react-sigma/core';
62
62
  import { DASHED_EDGE_COLOR, EDGE_COLOR, INACTIVE_EDGE_COLOR, INACTIVE_LABEL_COLOR, RELATED_DASHED_EDGE_COLOR, RELATED_EDGE_COLOR, SELECTED_EDGE_COLOR, useDataModelGraphAppearance } from './useDataModelGraphAppearance';
@@ -117,102 +117,91 @@ describe('useDataModelGraphAppearance tests', function () {
117
117
  return (__assign(__assign({}, attributes), { type: 'image', size: 28, color: 'rgba(55, 71, 79, 1)' }));
118
118
  };
119
119
  it('should apply default node style', function () {
120
- var _a = setUp(), result = _a.result, graph = _a.graph;
120
+ var graph = setUp().graph;
121
121
  var nodeReducer = getNodeReducer();
122
122
  expect(nodeReducer('hcp', graph.getNodeAttributes('hcp'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('hcp'))), { image: 'HCP.svg', label: 'HCP', nodeType: DataModelGraphNodeType.entityType }));
123
123
  expect(nodeReducer('hca', graph.getNodeAttributes('hca'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('hca'))), { image: 'HCA.svg', label: 'HCA', nodeType: DataModelGraphNodeType.entityType }));
124
124
  expect(nodeReducer('gpo', graph.getNodeAttributes('gpo'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('gpo'))), { label: 'GPO', nodeType: DataModelGraphNodeType.entityType }));
125
125
  expect(nodeReducer('prescriptions', graph.getNodeAttributes('prescriptions'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('prescriptions'))), { hasBorder: true, image: expect.stringContaining('data:image/svg+xml'), label: 'Prescriptions', nodeType: DataModelGraphNodeType.interactionType }));
126
- expect(result.error).toBeUndefined();
127
126
  });
128
127
  it('should apply hovered node style', function () { return __awaiter(void 0, void 0, void 0, function () {
129
- var _a, graph, result, enterNode, nodeReducer;
130
- return __generator(this, function (_b) {
131
- _a = setUp(), graph = _a.graph, result = _a.result;
128
+ var graph, enterNode, nodeReducer;
129
+ return __generator(this, function (_a) {
130
+ graph = setUp().graph;
132
131
  enterNode = getEnterNode();
133
132
  act(function () {
134
133
  enterNode({ node: 'hcp' });
135
134
  });
136
135
  nodeReducer = getNodeReducer();
137
136
  expect(nodeReducer('hcp', graph.getNodeAttributes('hcp'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('hcp'))), { image: 'HCP.svg', label: 'HCP', secondaryLabel: '12 attributes', nodeType: DataModelGraphNodeType.entityType }));
138
- expect(result.error).toBeUndefined();
139
137
  return [2 /*return*/];
140
138
  });
141
139
  }); });
142
140
  it('should apply correct styles when selectedNode is specified', function () {
143
- var _a = setUp({ selectedNode: 'hcp' }), graph = _a.graph, result = _a.result;
141
+ var graph = setUp({ selectedNode: 'hcp' }).graph;
144
142
  var nodeReducer = getNodeReducer();
145
143
  expect(nodeReducer('hcp', graph.getNodeAttributes('hcp'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('hcp'))), { image: 'HCP.svg', label: 'HCP', secondaryLabel: '12 attributes', selected: true, zIndex: 100, nodeType: DataModelGraphNodeType.entityType }));
146
144
  expect(nodeReducer('hca', graph.getNodeAttributes('hca'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('hca'))), { image: 'HCA.svg', label: 'HCA', nodeType: DataModelGraphNodeType.entityType }));
147
145
  expect(nodeReducer('gpo', graph.getNodeAttributes('gpo'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('gpo'))), { label: 'GPO', nodeType: DataModelGraphNodeType.entityType, inactive: true, labelColor: INACTIVE_LABEL_COLOR, secondaryLabelColor: INACTIVE_LABEL_COLOR }));
148
146
  expect(nodeReducer('prescriptions', graph.getNodeAttributes('prescriptions'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('prescriptions'))), { hasBorder: true, image: expect.stringContaining('data:image/svg+xml'), label: 'Prescriptions', nodeType: DataModelGraphNodeType.interactionType }));
149
- expect(result.error).toBeUndefined();
150
147
  });
151
148
  it('should apply correct styles when selectedEdges is specified', function () {
152
- var _a = setUp({ selectedEdges: ['hcp->hca'] }), graph = _a.graph, result = _a.result;
149
+ var graph = setUp({ selectedEdges: ['hcp->hca'] }).graph;
153
150
  var nodeReducer = getNodeReducer();
154
151
  expect(nodeReducer('hcp', graph.getNodeAttributes('hcp'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('hcp'))), { image: 'HCP.svg', label: 'HCP', nodeType: DataModelGraphNodeType.entityType }));
155
152
  expect(nodeReducer('hca', graph.getNodeAttributes('hca'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('hca'))), { image: 'HCA.svg', label: 'HCA', nodeType: DataModelGraphNodeType.entityType }));
156
153
  expect(nodeReducer('gpo', graph.getNodeAttributes('gpo'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('gpo'))), { label: 'GPO', nodeType: DataModelGraphNodeType.entityType, inactive: true, labelColor: INACTIVE_LABEL_COLOR, secondaryLabelColor: INACTIVE_LABEL_COLOR }));
157
154
  expect(nodeReducer('prescriptions', graph.getNodeAttributes('prescriptions'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('prescriptions'))), { hasBorder: true, image: expect.stringContaining('data:image/svg+xml'), label: 'Prescriptions', nodeType: DataModelGraphNodeType.interactionType, inactive: true, labelColor: INACTIVE_LABEL_COLOR, secondaryLabelColor: INACTIVE_LABEL_COLOR }));
158
- expect(result.error).toBeUndefined();
159
155
  });
160
156
  it('should hide interaction types when hideInteractionTypes is true', function () {
161
- var _a = setUp({ hideInteractionTypes: true }), graph = _a.graph, result = _a.result;
157
+ var graph = setUp({ hideInteractionTypes: true }).graph;
162
158
  var nodeReducer = getNodeReducer();
163
159
  expect(nodeReducer('prescriptions', graph.getNodeAttributes('prescriptions'))).toEqual(__assign(__assign({}, getDefaultNodeAttributes(graph.getNodeAttributes('prescriptions'))), { hasBorder: true, image: expect.stringContaining('data:image/svg+xml'), label: 'Prescriptions', nodeType: DataModelGraphNodeType.interactionType, hidden: true }));
164
- expect(result.error).toBeUndefined();
165
160
  });
166
161
  });
167
162
  describe('edges reducer behavior', function () {
168
163
  var getDefaultEdgeAttributes = function (attributes) { return (__assign(__assign({}, attributes), { size: 1 })); };
169
164
  it('should apply default edge style', function () {
170
- var _a = setUp(), result = _a.result, graph = _a.graph;
165
+ var graph = setUp().graph;
171
166
  var edgeReducer = getEdgeReducer();
172
167
  expect(edgeReducer('hcp->hca', graph.getEdgeAttributes('hcp->hca'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->hca'))), { color: EDGE_COLOR }));
173
168
  expect(edgeReducer('hca->gpo', graph.getEdgeAttributes('hca->gpo'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hca->gpo'))), { color: EDGE_COLOR }));
174
169
  expect(edgeReducer('hcp->prescriptions', graph.getEdgeAttributes('hcp->prescriptions'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->prescriptions'))), { type: 'dashed', color: DASHED_EDGE_COLOR }));
175
- expect(result.error).toBeUndefined();
176
170
  });
177
171
  it('should apply correct styles when selectedNode is specified', function () {
178
- var _a = setUp({ selectedNode: 'hcp' }), graph = _a.graph, result = _a.result;
172
+ var graph = setUp({ selectedNode: 'hcp' }).graph;
179
173
  var edgeReducer = getEdgeReducer();
180
174
  expect(edgeReducer('hcp->hca', graph.getEdgeAttributes('hcp->hca'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->hca'))), { color: RELATED_EDGE_COLOR }));
181
175
  expect(edgeReducer('hca->gpo', graph.getEdgeAttributes('hca->gpo'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hca->gpo'))), { color: INACTIVE_EDGE_COLOR, labelColor: INACTIVE_LABEL_COLOR }));
182
176
  expect(edgeReducer('hcp->prescriptions', graph.getEdgeAttributes('hcp->prescriptions'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->prescriptions'))), { type: 'dashed', color: RELATED_DASHED_EDGE_COLOR }));
183
- expect(result.error).toBeUndefined();
184
177
  });
185
178
  it('should apply correct styles when selectedEdges is specified', function () {
186
- var _a = setUp({ selectedEdges: ['hcp->hca'] }), graph = _a.graph, result = _a.result;
179
+ var graph = setUp({ selectedEdges: ['hcp->hca'] }).graph;
187
180
  var edgeReducer = getEdgeReducer();
188
181
  expect(edgeReducer('hcp->hca', graph.getEdgeAttributes('hcp->hca'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->hca'))), { color: SELECTED_EDGE_COLOR, selected: true }));
189
182
  expect(edgeReducer('hca->gpo', graph.getEdgeAttributes('hca->gpo'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hca->gpo'))), { selected: false, color: INACTIVE_EDGE_COLOR, labelColor: INACTIVE_LABEL_COLOR }));
190
183
  expect(edgeReducer('hcp->prescriptions', graph.getEdgeAttributes('hcp->prescriptions'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->prescriptions'))), { type: 'dashed', selected: false, color: INACTIVE_EDGE_COLOR, labelColor: INACTIVE_LABEL_COLOR }));
191
- expect(result.error).toBeUndefined();
192
184
  });
193
185
  it('should remove edge label prop when relations edges amount bigger than relationEdgesLabelsAmountThreshold', function () {
194
- var _a = setUp({ relationEdgesLabelsAmountThreshold: 1 }), graph = _a.graph, result = _a.result;
186
+ var graph = setUp({ relationEdgesLabelsAmountThreshold: 1 }).graph;
195
187
  var edgeReducer = getEdgeReducer();
196
188
  expect(edgeReducer('hcp->hca', graph.getEdgeAttributes('hcp->hca'))).toEqual(__assign(__assign({}, omit(['label'], getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->hca')))), { color: EDGE_COLOR }));
197
189
  expect(edgeReducer('hca->gpo', graph.getEdgeAttributes('hca->gpo'))).toEqual(__assign(__assign({}, omit(['label'], getDefaultEdgeAttributes(graph.getEdgeAttributes('hca->gpo')))), { color: EDGE_COLOR }));
198
190
  expect(edgeReducer('hcp->prescriptions', graph.getEdgeAttributes('hcp->prescriptions'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->prescriptions'))), { type: 'dashed', color: DASHED_EDGE_COLOR }));
199
- expect(result.error).toBeUndefined();
200
191
  });
201
192
  it('should keep edge label prop for edge related with selected node even if relations edges amount bigger than relationEdgesLabelsAmountThreshold', function () {
202
- var _a = setUp({ relationEdgesLabelsAmountThreshold: 1, selectedNode: 'hcp' }), graph = _a.graph, result = _a.result;
193
+ var graph = setUp({ relationEdgesLabelsAmountThreshold: 1, selectedNode: 'hcp' }).graph;
203
194
  var edgeReducer = getEdgeReducer();
204
195
  expect(edgeReducer('hcp->hca', graph.getEdgeAttributes('hcp->hca'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->hca'))), { color: RELATED_EDGE_COLOR }));
205
196
  expect(edgeReducer('hca->gpo', graph.getEdgeAttributes('hca->gpo'))).toEqual(__assign(__assign({}, omit(['label'], getDefaultEdgeAttributes(graph.getEdgeAttributes('hca->gpo')))), { color: INACTIVE_EDGE_COLOR, labelColor: INACTIVE_LABEL_COLOR }));
206
197
  expect(edgeReducer('hcp->prescriptions', graph.getEdgeAttributes('hcp->prescriptions'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->prescriptions'))), { type: 'dashed', color: RELATED_DASHED_EDGE_COLOR }));
207
- expect(result.error).toBeUndefined();
208
198
  });
209
199
  it('should keep edge label prop for selected edge even if relations edges amount bigger than relationEdgesLabelsAmountThreshold', function () {
210
- var _a = setUp({ relationEdgesLabelsAmountThreshold: 1, selectedEdges: ['hcp->hca'] }), graph = _a.graph, result = _a.result;
200
+ var graph = setUp({ relationEdgesLabelsAmountThreshold: 1, selectedEdges: ['hcp->hca'] }).graph;
211
201
  var edgeReducer = getEdgeReducer();
212
202
  expect(edgeReducer('hcp->hca', graph.getEdgeAttributes('hcp->hca'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->hca'))), { color: SELECTED_EDGE_COLOR, selected: true }));
213
203
  expect(edgeReducer('hca->gpo', graph.getEdgeAttributes('hca->gpo'))).toEqual(__assign(__assign({}, omit(['label'], getDefaultEdgeAttributes(graph.getEdgeAttributes('hca->gpo')))), { selected: false, color: INACTIVE_EDGE_COLOR, labelColor: INACTIVE_LABEL_COLOR }));
214
204
  expect(edgeReducer('hcp->prescriptions', graph.getEdgeAttributes('hcp->prescriptions'))).toEqual(__assign(__assign({}, getDefaultEdgeAttributes(graph.getEdgeAttributes('hcp->prescriptions'))), { type: 'dashed', selected: false, color: INACTIVE_EDGE_COLOR, labelColor: INACTIVE_LABEL_COLOR }));
215
- expect(result.error).toBeUndefined();
216
205
  });
217
206
  });
218
207
  });
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { renderHook, act } from '@testing-library/react-hooks';
12
+ import { renderHook, act } from '@testing-library/react';
13
13
  import { last } from 'ramda';
14
14
  import { useRegisterEvents, useSigma } from '@react-sigma/core';
15
15
  import { useSigmaCustomRenderers } from '../../hooks/useSigmaCustomRenderers';
@@ -1,4 +1,4 @@
1
- import { renderHook, act } from '@testing-library/react-hooks';
1
+ import { renderHook, act } from '@testing-library/react';
2
2
  import { useSigma } from '@react-sigma/core';
3
3
  import { FAKE_CENTER_NODE_ID, useFakeCenterNode } from './useFakeCenterNode';
4
4
  import { createDefaultGraph } from './defaultGraph.test-data';
@@ -1,4 +1,4 @@
1
- import { renderHook, act } from '@testing-library/react-hooks';
1
+ import { renderHook, act } from '@testing-library/react';
2
2
  import { useSigma } from '@react-sigma/core';
3
3
  import { useSigmaCustomRenderers } from '../../hooks/useSigmaCustomRenderers';
4
4
  import { useSelectedNodeRenderer } from './useSelectedNodeRenderer';
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { renderHook, act } from '@testing-library/react-hooks';
12
+ import { renderHook, act } from '@testing-library/react';
13
13
  import { MultiGraph } from 'graphology';
14
14
  import { useSigma } from '@react-sigma/core';
15
15
  import { RelationTypeDirection } from '@reltio/mdm-sdk';
@@ -1,4 +1,4 @@
1
- import { renderHook, act } from '@testing-library/react-hooks';
1
+ import { renderHook, act } from '@testing-library/react';
2
2
  import { useSigmaContext } from '@react-sigma/core';
3
3
  import { pipe, findLast, path, nth, equals } from 'ramda';
4
4
  import { useSigmaCustomRenderers } from './useSigmaCustomRenderers';
@@ -31,7 +31,7 @@ import { useStyles } from './styles';
31
31
  export var HistoryFilterButton = function (_a) {
32
32
  var className = _a.className, filter = _a.filter, onApplyFilter = _a.onApplyFilter, entityType = _a.entityType;
33
33
  var styles = useStyles();
34
- var buttonRef = useRef();
34
+ var buttonRef = useRef(null);
35
35
  var _b = useState(false), isOpen = _b[0], setIsOpen = _b[1];
36
36
  var _c = useState(filter), currentValue = _c[0], setCurrentValue = _c[1];
37
37
  var _d = currentValue || {}, _e = _d.activities, activities = _e === void 0 ? [] : _e, _f = _d.attributes, attributes = _f === void 0 ? [] : _f, _g = _d.dateRange, dateRange = _g === void 0 ? null : _g, _h = _d.users, users = _h === void 0 ? [] : _h;
@@ -54,7 +54,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
54
54
  }
55
55
  return to.concat(ar || Array.prototype.slice.call(from));
56
56
  };
57
- import { renderHook, act } from '@testing-library/react-hooks';
57
+ import { renderHook, act } from '@testing-library/react';
58
58
  import { HistoryActivityType } from '../types';
59
59
  import { getHistoricUris, getHistoryWithTotal } from '@reltio/mdm-sdk';
60
60
  import { buildHistoryFilterString } from '../helpers/filters';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { renderHook } from '@testing-library/react-hooks';
2
+ import { renderHook } from '@testing-library/react';
3
3
  import { HistoryMode } from '@reltio/mdm-sdk';
4
4
  import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
5
5
  import { DEFAULT_HISTORY_DIFF } from '../constants';
@@ -1,4 +1,4 @@
1
- import { renderHook } from '@testing-library/react-hooks';
1
+ import { renderHook } from '@testing-library/react';
2
2
  import * as PerspectivesSettingsContext from '../../../contexts/PerspectivesSettingsContext';
3
3
  import { useHistoryEnabled } from './useHistoryEnabled';
4
4
  describe('useHistoryEnabled behaviour', function () {
@@ -46,7 +46,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  }
47
47
  };
48
48
  import React from 'react';
49
- import { renderHook, act } from '@testing-library/react-hooks';
49
+ import { renderHook, act } from '@testing-library/react';
50
50
  import { Mode, getEntityTimeSlice } from '@reltio/mdm-sdk';
51
51
  import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
52
52
  import { useHistorySlice } from './useHistorySlice';
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
- import { renderHook } from '@testing-library/react-hooks';
48
+ import { renderHook } from '@testing-library/react';
49
49
  import { fullHistoryChanges, halfHistoryChanges, complexUnmergeChanges, complexFakeUnmergeChanges } from './history.test-data';
50
50
  import { deepFreeze } from '../../../test-utils';
51
51
  import { useHistoryTree } from './useHistoryTree';
@@ -1 +1 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "title" | "footer" | "input" | "select" | "inputRoot" | "asterisk" | "cancelButton" | "inputLabelRoot" | "popoverPaper" | "simpleDropDownSelector">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "title" | "input" | "footer" | "select" | "inputRoot" | "asterisk" | "cancelButton" | "inputLabelRoot" | "popoverPaper" | "simpleDropDownSelector">;
@@ -194,22 +194,22 @@ var getOldValueByNewValuePath = function (valuePath, change) {
194
194
  return null;
195
195
  };
196
196
  export var buildDCRSavePlan = function (changes, getLinesByChangeId, metadata) {
197
- var _a, _b;
197
+ var _a, _b, _c;
198
198
  var rejectedChangeIds = [];
199
199
  var updatedChanges = {};
200
200
  var deleteAttributes = {};
201
201
  var insertAttributes = {};
202
- for (var _i = 0, _c = Object.entries(changes); _i < _c.length; _i++) {
203
- var _d = _c[_i], objectUri = _d[0], objectChanges = _d[1];
202
+ for (var _i = 0, _d = Object.entries(changes); _i < _d.length; _i++) {
203
+ var _e = _d[_i], objectUri = _e[0], objectChanges = _e[1];
204
204
  var rawChanges = new Map();
205
205
  var _loop_1 = function (change) {
206
- var _h = pipe(prop('id'), getLinesByChangeId, partition(function (_a) {
206
+ var _j = pipe(prop('id'), getLinesByChangeId, partition(function (_a) {
207
207
  var _b;
208
208
  var key = _a[0], lineData = _a[1];
209
209
  return key.split('/').length === 3 &&
210
210
  (lineData.isRejected ||
211
211
  (isEmptyValue((_b = lineData.value) === null || _b === void 0 ? void 0 : _b.value) && change.type !== DCRTypes.UPDATE_ATTRIBUTE));
212
- }))(change), rejectedRootLines = _h[0], otherLines = _h[1];
212
+ }))(change), rejectedRootLines = _j[0], otherLines = _j[1];
213
213
  var isNew = isAddedChange(change.id);
214
214
  if (!isNew) {
215
215
  rejectedChangeIds.push.apply(rejectedChangeIds, rejectedRootLines.map(function (_a) {
@@ -220,15 +220,16 @@ export var buildDCRSavePlan = function (changes, getLinesByChangeId, metadata) {
220
220
  var newValueObj = change.newValue;
221
221
  var hasNonEmptyNewValue = Array.isArray(change.newValue) ||
222
222
  !isEmptyValue(newValueObj === null || newValueObj === void 0 ? void 0 : newValueObj.value) ||
223
- 'lookupCode' in (newValueObj !== null && newValueObj !== void 0 ? newValueObj : {});
223
+ 'lookupCode' in (newValueObj !== null && newValueObj !== void 0 ? newValueObj : {}) ||
224
+ !isEmptyValue((_a = newValueObj === null || newValueObj === void 0 ? void 0 : newValueObj.refEntity) === null || _a === void 0 ? void 0 : _a.objectURI);
224
225
  if (isNew && otherLines.length === 0 && rejectedRootLines.length === 0 && hasNonEmptyNewValue) {
225
226
  rawChanges.set(change.id, change);
226
227
  }
227
228
  var rejectedRootLinesMap = new Map(rejectedRootLines);
228
- for (var _j = 0, otherLines_1 = otherLines; _j < otherLines_1.length; _j++) {
229
- var _k = otherLines_1[_j], key = _k[0], lineData = _k[1];
229
+ for (var _k = 0, otherLines_1 = otherLines; _k < otherLines_1.length; _k++) {
230
+ var _l = otherLines_1[_k], key = _l[0], lineData = _l[1];
230
231
  var rootId = key.split('/').slice(0, 3).join('/');
231
- var newValue = (_a = lineData.value) === null || _a === void 0 ? void 0 : _a.value;
232
+ var newValue = (_b = lineData.value) === null || _b === void 0 ? void 0 : _b.value;
232
233
  if (!isNew && rootId === key && change.type === DCRTypes.UPDATE_ATTRIBUTE && isEmptyValue(newValue)) {
233
234
  var attributeUri = [objectUri, 'attributes', change.attributePath].join('/');
234
235
  var entry = __assign(__assign({}, createEntryDeleteAttribute({ uri: attributeUri })[0]), (change.crosswalk && { crosswalk: change.crosswalk }));
@@ -269,16 +270,16 @@ export var buildDCRSavePlan = function (changes, getLinesByChangeId, metadata) {
269
270
  }
270
271
  }
271
272
  };
272
- for (var _e = 0, objectChanges_1 = objectChanges; _e < objectChanges_1.length; _e++) {
273
- var change = objectChanges_1[_e];
273
+ for (var _f = 0, objectChanges_1 = objectChanges; _f < objectChanges_1.length; _f++) {
274
+ var change = objectChanges_1[_f];
274
275
  _loop_1(change);
275
276
  }
276
- for (var _f = 0, _g = Array.from(rawChanges.values()); _f < _g.length; _f++) {
277
- var rawChange = _g[_f];
277
+ for (var _g = 0, _h = Array.from(rawChanges.values()); _g < _h.length; _g++) {
278
+ var rawChange = _h[_g];
278
279
  var cleanedChange = cleanChange(rawChange);
279
280
  var isNestedChange = has('attributeType', cleanedChange) &&
280
281
  isNested(findAttributeTypeByUri(metadata, cleanedChange.attributeType));
281
- if (isNestedChange && isEmpty((_b = cleanedChange.newValue) === null || _b === void 0 ? void 0 : _b.value)) {
282
+ if (isNestedChange && isEmpty((_c = cleanedChange.newValue) === null || _c === void 0 ? void 0 : _c.value)) {
282
283
  if (!isAddedChange(cleanedChange.id)) {
283
284
  rejectedChangeIds.push(cleanedChange.id);
284
285
  }
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
- import { renderHook, act } from '@testing-library/react-hooks';
48
+ import { renderHook, act } from '@testing-library/react';
49
49
  import { getDataChangeRequest, getEntitiesByUris } from '@reltio/mdm-sdk';
50
50
  import { ErrorPopup } from '../../../ErrorPopup';
51
51
  import { useChangeRequest } from './useChangeRequest';
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React from 'react';
13
- import { renderHook } from '@testing-library/react-hooks';
13
+ import { renderHook } from '@testing-library/react';
14
14
  import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
15
15
  import { useWorkflowCheckPermission } from './useWorkflowCheckPermission';
16
16
  var createUser = function (permissions) {
@@ -1,4 +1,4 @@
1
- import { renderHook } from '@testing-library/react-hooks';
1
+ import { renderHook } from '@testing-library/react';
2
2
  import { resetTaskToColor, useWorkflowColor } from './useWorkflowColor';
3
3
  describe('useWorkflowColor behaviour', function () {
4
4
  beforeEach(function () {
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
- import { act } from 'react-dom/test-utils';
48
+ import { act } from '@testing-library/react';
49
49
  import { nanoid } from 'nanoid';
50
50
  import { getWorkerURL, resetHtml, getFilesWithArrayBuffer, setUpRequestInterceptor, setUpResponseInterceptor, isValidCustomScript, getRequestFakeUrl, getResponseFakeUrl, getProcessedTask } from './customScript';
51
51
  import { CustomAction, CustomScriptPlatform, RequestAction } from '@reltio/mdm-sdk';
@@ -31,8 +31,8 @@ export var useAPI = function (config) {
31
31
  var _g = useState(), popup = _g[0], setPopup = _g[1];
32
32
  var _h = useState(null), tooltip = _h[0], setTooltip = _h[1];
33
33
  var _j = useState({}), customStyles = _j[0], setCustomStyles = _j[1];
34
- var workerRef = useRef();
35
- var entityRef = useRef();
34
+ var workerRef = useRef(null);
35
+ var entityRef = useRef(null);
36
36
  var requestListeners = useRef({});
37
37
  var responseListeners = useRef({});
38
38
  var sanitizeHtml = useHtmlSanitizer();