@reltio/components 1.4.2270 → 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 (303) 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/hooks/useChangeRequest.test.js +7 -7
  198. package/cjs/features/workflow/hooks/useWorkflowCheckPermission.test.js +2 -2
  199. package/cjs/features/workflow/hooks/useWorkflowColor.test.js +2 -2
  200. package/cjs/helpers/customScript.test.js +3 -3
  201. package/cjs/hooks/useAPI/useAPI.js +2 -2
  202. package/cjs/hooks/useAPI/useAPI.test.js +134 -134
  203. package/cjs/hooks/useChangedAttributes/useChangedAttributes.js +2 -2
  204. package/cjs/hooks/useCollaboration/useCollaboration.d.ts +47 -9
  205. package/cjs/hooks/useCollaboration/useCollaboration.js +10 -13
  206. package/cjs/hooks/useCollaboration/useCollaboration.test.js +55 -54
  207. package/cjs/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +8 -8
  208. package/cjs/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +10 -10
  209. package/cjs/hooks/useConfigPermissions/useConfigPermissions.test.js +2 -2
  210. package/cjs/hooks/useCustomScripts/useCustomScripts.test.js +25 -25
  211. package/cjs/hooks/useDndBasicTableScrollModifier/useDndBasicTableScrollModifier.js +1 -1
  212. package/cjs/hooks/useEditableConnection/useEditableConnection.test.js +2 -2
  213. package/cjs/hooks/useFilterAutoFocus/useFilterAutoFocus.d.ts +3 -3
  214. package/cjs/hooks/useHiddenAttributes/useHiddenAttributes.test.js +2 -2
  215. package/cjs/hooks/useHtmlSanitizer/useHtmlSanitizer.test.js +2 -2
  216. package/cjs/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +1 -1
  217. package/cjs/hooks/useKeyboardNavigation/useKeyboardNavigation.test.js +3 -3
  218. package/cjs/hooks/useMatchesLoader/useMatchesLoader.test.js +24 -16
  219. package/cjs/hooks/usePrevious/usePrevious.js +1 -1
  220. package/cjs/hooks/useReadableSearchState/useReadableSearchState.test.js +5 -5
  221. package/cjs/hooks/useRelationsLoader/useRelationsLoader.test.js +50 -50
  222. package/cjs/hooks/useSavedSearchesRequest/useSavedSearchesRequest.test.js +36 -36
  223. package/cjs/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +20 -16
  224. package/cjs/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +3 -3
  225. package/cjs/hooks/useUsers/useUsers.test.js +14 -15
  226. package/cjs/hooks/useWhyDidYouUpdate/useWhyDidYouUpdate.js +1 -1
  227. package/cjs/test-utils/dndKit/DndContextComponent.js +3 -0
  228. package/cjs/test-utils/dndKit/index.d.ts +1 -0
  229. package/cjs/test-utils/dndKit/useDndMonitorProvider.d.ts +4 -1
  230. package/cjs/test-utils/dndKit/useDraggable.d.ts +1 -0
  231. package/cjs/test-utils/dndKit/useDraggable.js +8 -1
  232. package/cjs/test-utils/index.d.ts +1 -1
  233. package/cjs/test-utils/index.js +4 -1
  234. package/cjs/test-utils/mockStoreHooks.d.ts +4 -0
  235. package/cjs/test-utils/mockStoreHooks.js +21 -0
  236. package/cjs/utils/withChildrenProp.d.ts +10 -0
  237. package/cjs/utils/withChildrenProp.js +13 -0
  238. package/contexts/AutoExpandedAttributesContext/useAttributeAutoExpanded.test.js +1 -1
  239. package/contexts/ReloadDataContext/ReloadDataContext.spec.js +1 -1
  240. package/features/activity-log/ActivityFilterButton/ActivityFilterButton.js +1 -1
  241. package/features/crosswalks/AttributesTable/AttributesTable.test.js +11 -4
  242. package/features/crosswalks/CrosswalkAttributes/CrosswalkAttributes.test.js +11 -6
  243. package/features/crosswalks/CrosswalkEditor/CrosswalkEditor.test.js +15 -10
  244. package/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +11 -6
  245. package/features/crosswalks/hooks/useAttributeActions.test.js +1 -1
  246. package/features/crosswalks/hooks/useCrosswalkActions.test.js +1 -1
  247. package/features/crosswalks/hooks/useModifiedEntity.js +4 -4
  248. package/features/crosswalks/hooks/useModifiedEntity.test.js +1 -1
  249. package/features/graph/DataModelGraph/hooks/useDataModelGraphAppearance.test.js +14 -25
  250. package/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +1 -1
  251. package/features/graph/DataModelGraph/hooks/useFakeCenterNode.test.js +1 -1
  252. package/features/graph/DataModelGraph/hooks/useSelectedNodeRenderer.test.js +1 -1
  253. package/features/graph/hooks/useLoopRenderer.test.js +1 -1
  254. package/features/graph/hooks/useSigmaCustomRenderers.test.js +1 -1
  255. package/features/history/HistoryFilterButton/HistoryFilterButton.js +1 -1
  256. package/features/history/hooks/useHistory.test.js +1 -1
  257. package/features/history/hooks/useHistoryDiff.test.js +1 -1
  258. package/features/history/hooks/useHistoryEnabled.test.js +1 -1
  259. package/features/history/hooks/useHistorySlice.test.js +1 -1
  260. package/features/history/hooks/useHistoryTree.test.js +1 -1
  261. package/features/workflow/AddWorkflowDialog/styles.d.ts +1 -1
  262. package/features/workflow/hooks/useChangeRequest.test.js +1 -1
  263. package/features/workflow/hooks/useWorkflowCheckPermission.test.js +1 -1
  264. package/features/workflow/hooks/useWorkflowColor.test.js +1 -1
  265. package/helpers/customScript.test.js +1 -1
  266. package/hooks/useAPI/useAPI.js +2 -2
  267. package/hooks/useAPI/useAPI.test.js +44 -44
  268. package/hooks/useChangedAttributes/useChangedAttributes.js +2 -2
  269. package/hooks/useCollaboration/useCollaboration.d.ts +47 -9
  270. package/hooks/useCollaboration/useCollaboration.js +10 -13
  271. package/hooks/useCollaboration/useCollaboration.test.js +3 -2
  272. package/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
  273. package/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +1 -1
  274. package/hooks/useConfigPermissions/useConfigPermissions.test.js +1 -1
  275. package/hooks/useCustomScripts/useCustomScripts.test.js +11 -11
  276. package/hooks/useDndBasicTableScrollModifier/useDndBasicTableScrollModifier.js +1 -1
  277. package/hooks/useEditableConnection/useEditableConnection.test.js +1 -1
  278. package/hooks/useFilterAutoFocus/useFilterAutoFocus.d.ts +3 -3
  279. package/hooks/useHiddenAttributes/useHiddenAttributes.test.js +1 -1
  280. package/hooks/useHtmlSanitizer/useHtmlSanitizer.test.js +1 -1
  281. package/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +1 -1
  282. package/hooks/useKeyboardNavigation/useKeyboardNavigation.test.js +1 -1
  283. package/hooks/useMatchesLoader/useMatchesLoader.test.js +23 -15
  284. package/hooks/usePrevious/usePrevious.js +1 -1
  285. package/hooks/useReadableSearchState/useReadableSearchState.test.js +3 -3
  286. package/hooks/useRelationsLoader/useRelationsLoader.test.js +38 -38
  287. package/hooks/useSavedSearchesRequest/useSavedSearchesRequest.test.js +1 -1
  288. package/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +7 -3
  289. package/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
  290. package/hooks/useUsers/useUsers.test.js +12 -13
  291. package/hooks/useWhyDidYouUpdate/useWhyDidYouUpdate.js +1 -1
  292. package/package.json +5 -6
  293. package/test-utils/dndKit/DndContextComponent.js +3 -0
  294. package/test-utils/dndKit/index.d.ts +1 -0
  295. package/test-utils/dndKit/useDndMonitorProvider.d.ts +4 -1
  296. package/test-utils/dndKit/useDraggable.d.ts +1 -0
  297. package/test-utils/dndKit/useDraggable.js +8 -1
  298. package/test-utils/index.d.ts +1 -1
  299. package/test-utils/index.js +1 -0
  300. package/test-utils/mockStoreHooks.d.ts +4 -0
  301. package/test-utils/mockStoreHooks.js +16 -0
  302. package/utils/withChildrenProp.d.ts +10 -0
  303. package/utils/withChildrenProp.js +9 -0
@@ -55,7 +55,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
55
55
  return to.concat(ar || Array.prototype.slice.call(from));
56
56
  };
57
57
  import React, { useState } from 'react';
58
- import { renderHook, act } from '@testing-library/react-hooks';
58
+ import { renderHook, act, waitFor } from '@testing-library/react';
59
59
  import { CustomAction, CustomScriptPlatform, initializeWebWorker, RequestAction, Mode } from '@reltio/mdm-sdk';
60
60
  import * as request from '@reltio/mdm-sdk/src/network';
61
61
  import { useHtmlSanitizer } from '../useHtmlSanitizer';
@@ -188,7 +188,7 @@ describe('useAPI custom sandbox behavior', function () {
188
188
  act(function () {
189
189
  onmessageFromWorker({ action: CustomAction.SET_HTML, params: { html: child, id: 'testId' } });
190
190
  });
191
- expect(document.body.childNodes[0]).toEqual(childHtmlBlock);
191
+ expect(htmlBlock).toEqual(childHtmlBlock);
192
192
  });
193
193
  it('should allow disabled and checked state for checkbox', function () {
194
194
  var _a;
@@ -321,11 +321,11 @@ describe('useAPI custom sandbox behavior', function () {
321
321
  expect(showSnackbarMessage).toHaveBeenCalledWith(message);
322
322
  });
323
323
  it('should not send api request on action request and name api if url is empty', function () { return __awaiter(void 0, void 0, void 0, function () {
324
- var waitFor, result, params;
324
+ var result, params;
325
325
  return __generator(this, function (_a) {
326
326
  switch (_a.label) {
327
327
  case 0:
328
- waitFor = setUp().waitFor;
328
+ setUp();
329
329
  result = { errorMessage: 'URL is empty' };
330
330
  params = {
331
331
  name: RequestAction.API,
@@ -348,12 +348,12 @@ describe('useAPI custom sandbox behavior', function () {
348
348
  });
349
349
  }); });
350
350
  it('should not send api request on action request and name api if no permissions', function () { return __awaiter(void 0, void 0, void 0, function () {
351
- var config, waitFor, result, params;
351
+ var config, result, params;
352
352
  return __generator(this, function (_a) {
353
353
  switch (_a.label) {
354
354
  case 0:
355
355
  config = createConfig({ permissions: ['/tenant'] });
356
- waitFor = setUp({ config: config }).waitFor;
356
+ setUp({ config: config });
357
357
  result = { errorMessage: 'Not enough permissions' };
358
358
  params = {
359
359
  name: RequestAction.API,
@@ -377,14 +377,14 @@ describe('useAPI custom sandbox behavior', function () {
377
377
  });
378
378
  }); });
379
379
  it('should send api request on action request and name api', function () { return __awaiter(void 0, void 0, void 0, function () {
380
- var result, config, waitFor, params;
380
+ var result, config, params;
381
381
  return __generator(this, function (_a) {
382
382
  switch (_a.label) {
383
383
  case 0:
384
384
  result = { success: 'message' };
385
385
  requestMock.mockResolvedValue(result);
386
386
  config = createConfig({ permissions: ['https://reltio.com'] });
387
- waitFor = setUp({ config: config }).waitFor;
387
+ setUp({ config: config });
388
388
  params = {
389
389
  name: RequestAction.API,
390
390
  id: '1',
@@ -414,7 +414,7 @@ describe('useAPI custom sandbox behavior', function () {
414
414
  });
415
415
  }); });
416
416
  it('should send api request with access token', function () { return __awaiter(void 0, void 0, void 0, function () {
417
- var result, mdmValues, config, waitFor, params;
417
+ var result, mdmValues, config, params;
418
418
  return __generator(this, function (_a) {
419
419
  switch (_a.label) {
420
420
  case 0:
@@ -425,7 +425,7 @@ describe('useAPI custom sandbox behavior', function () {
425
425
  });
426
426
  mdmValues = __assign(__assign({}, defaultMdmValues), { servicesPath: '/nui/services' });
427
427
  config = createConfig({ permissions: ['https://reltio.com'] });
428
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
428
+ setUp({ mdmValues: mdmValues, config: config });
429
429
  params = {
430
430
  name: RequestAction.API,
431
431
  id: '1',
@@ -456,7 +456,7 @@ describe('useAPI custom sandbox behavior', function () {
456
456
  });
457
457
  }); });
458
458
  it('should send api request on action request and name api and handle errors properly', function () { return __awaiter(void 0, void 0, void 0, function () {
459
- var config, waitFor, params;
459
+ var config, params;
460
460
  return __generator(this, function (_a) {
461
461
  switch (_a.label) {
462
462
  case 0:
@@ -467,7 +467,7 @@ describe('useAPI custom sandbox behavior', function () {
467
467
  : Promise.reject({ error: '{"message": "some error"}' });
468
468
  });
469
469
  config = createConfig({ permissions: ['https://reltio.com'] });
470
- waitFor = setUp({ config: config }).waitFor;
470
+ setUp({ config: config });
471
471
  params = {
472
472
  name: RequestAction.API,
473
473
  id: '1',
@@ -504,11 +504,11 @@ describe('useAPI custom sandbox behavior', function () {
504
504
  });
505
505
  }); });
506
506
  it('should not send workflow request on action request and name workflow if url is empty', function () { return __awaiter(void 0, void 0, void 0, function () {
507
- var waitFor, result, params;
507
+ var result, params;
508
508
  return __generator(this, function (_a) {
509
509
  switch (_a.label) {
510
510
  case 0:
511
- waitFor = setUp().waitFor;
511
+ setUp();
512
512
  result = { errorMessage: 'URL is empty' };
513
513
  params = {
514
514
  name: RequestAction.WORKFLOW,
@@ -531,12 +531,12 @@ describe('useAPI custom sandbox behavior', function () {
531
531
  });
532
532
  }); });
533
533
  it('should not send api request on action request and name workflow if no permissions', function () { return __awaiter(void 0, void 0, void 0, function () {
534
- var config, waitFor, result, params;
534
+ var config, result, params;
535
535
  return __generator(this, function (_a) {
536
536
  switch (_a.label) {
537
537
  case 0:
538
538
  config = createConfig({ permissions: ['/tenant'] });
539
- waitFor = setUp({ config: config }).waitFor;
539
+ setUp({ config: config });
540
540
  result = { errorMessage: 'Not enough permissions' };
541
541
  params = {
542
542
  name: RequestAction.WORKFLOW,
@@ -560,13 +560,13 @@ describe('useAPI custom sandbox behavior', function () {
560
560
  });
561
561
  }); });
562
562
  it('should not send api request on action request and name workflow if no workflowPath', function () { return __awaiter(void 0, void 0, void 0, function () {
563
- var mdmValues, config, waitFor, result, params;
563
+ var mdmValues, config, result, params;
564
564
  return __generator(this, function (_a) {
565
565
  switch (_a.label) {
566
566
  case 0:
567
567
  mdmValues = __assign(__assign({}, defaultMdmValues), { workflowPath: undefined });
568
568
  config = createConfig({ permissions: ['/entity'] });
569
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
569
+ setUp({ mdmValues: mdmValues, config: config });
570
570
  result = { errorMessage: 'Workflow path is not defined' };
571
571
  params = {
572
572
  name: RequestAction.WORKFLOW,
@@ -590,14 +590,14 @@ describe('useAPI custom sandbox behavior', function () {
590
590
  });
591
591
  }); });
592
592
  it('should send api request on action request and name workflow', function () { return __awaiter(void 0, void 0, void 0, function () {
593
- var result, config, waitFor, params;
593
+ var result, config, params;
594
594
  return __generator(this, function (_a) {
595
595
  switch (_a.label) {
596
596
  case 0:
597
597
  result = { success: 'message' };
598
598
  requestMock.mockResolvedValue(result);
599
599
  config = createConfig({ permissions: ['/entity'] });
600
- waitFor = setUp({ config: config }).waitFor;
600
+ setUp({ config: config });
601
601
  params = {
602
602
  name: RequestAction.WORKFLOW,
603
603
  id: '1',
@@ -628,7 +628,7 @@ describe('useAPI custom sandbox behavior', function () {
628
628
  });
629
629
  }); });
630
630
  it('should send api request to workflow with access token', function () { return __awaiter(void 0, void 0, void 0, function () {
631
- var result, mdmValues, config, waitFor, params;
631
+ var result, mdmValues, config, params;
632
632
  return __generator(this, function (_a) {
633
633
  switch (_a.label) {
634
634
  case 0:
@@ -639,7 +639,7 @@ describe('useAPI custom sandbox behavior', function () {
639
639
  });
640
640
  mdmValues = __assign(__assign({}, defaultMdmValues), { servicesPath: '/nui/services' });
641
641
  config = createConfig({ permissions: ['/entity'] });
642
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
642
+ setUp({ mdmValues: mdmValues, config: config });
643
643
  params = {
644
644
  name: RequestAction.WORKFLOW,
645
645
  id: '1',
@@ -671,7 +671,7 @@ describe('useAPI custom sandbox behavior', function () {
671
671
  });
672
672
  }); });
673
673
  it('should send api request on action request and name workflow and handle errors properly', function () { return __awaiter(void 0, void 0, void 0, function () {
674
- var config, waitFor, params;
674
+ var config, params;
675
675
  return __generator(this, function (_a) {
676
676
  switch (_a.label) {
677
677
  case 0:
@@ -682,7 +682,7 @@ describe('useAPI custom sandbox behavior', function () {
682
682
  : Promise.reject({ error: 'some error' });
683
683
  });
684
684
  config = createConfig({ permissions: ['https://tst-01-workflow.reltio.com'] });
685
- waitFor = setUp({ config: config }).waitFor;
685
+ setUp({ config: config });
686
686
  params = {
687
687
  name: RequestAction.WORKFLOW,
688
688
  id: '1',
@@ -715,11 +715,11 @@ describe('useAPI custom sandbox behavior', function () {
715
715
  });
716
716
  }); });
717
717
  it('should not start Process From Query on action request and name workflow/startProcessFromQuery if processDefinitionId is empty', function () { return __awaiter(void 0, void 0, void 0, function () {
718
- var waitFor, result, params;
718
+ var result, params;
719
719
  return __generator(this, function (_a) {
720
720
  switch (_a.label) {
721
721
  case 0:
722
- waitFor = setUp().waitFor;
722
+ setUp();
723
723
  result = { errorMessage: 'processDefinitionId is empty' };
724
724
  params = {
725
725
  name: RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
@@ -741,11 +741,11 @@ describe('useAPI custom sandbox behavior', function () {
741
741
  });
742
742
  }); });
743
743
  it('should not start Process From Query on action request and name workflow/startProcessFromQuery if searchString is empty', function () { return __awaiter(void 0, void 0, void 0, function () {
744
- var waitFor, result, params;
744
+ var result, params;
745
745
  return __generator(this, function (_a) {
746
746
  switch (_a.label) {
747
747
  case 0:
748
- waitFor = setUp().waitFor;
748
+ setUp();
749
749
  result = { errorMessage: 'searchString is empty' };
750
750
  params = {
751
751
  name: RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
@@ -768,12 +768,12 @@ describe('useAPI custom sandbox behavior', function () {
768
768
  });
769
769
  }); });
770
770
  it('should not send api request on action request and name workflow/startProcessFromQuery if no permissions', function () { return __awaiter(void 0, void 0, void 0, function () {
771
- var config, waitFor, result, params;
771
+ var config, result, params;
772
772
  return __generator(this, function (_a) {
773
773
  switch (_a.label) {
774
774
  case 0:
775
775
  config = createConfig({ permissions: ['/tenant'] });
776
- waitFor = setUp({ config: config }).waitFor;
776
+ setUp({ config: config });
777
777
  result = { errorMessage: 'Not enough permissions' };
778
778
  params = {
779
779
  name: RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
@@ -798,13 +798,13 @@ describe('useAPI custom sandbox behavior', function () {
798
798
  });
799
799
  }); });
800
800
  it('should not send api request on action request and name workflow/startProcessFromQuery if no workflowPath', function () { return __awaiter(void 0, void 0, void 0, function () {
801
- var mdmValues, config, waitFor, result, params;
801
+ var mdmValues, config, result, params;
802
802
  return __generator(this, function (_a) {
803
803
  switch (_a.label) {
804
804
  case 0:
805
805
  mdmValues = __assign(__assign({}, defaultMdmValues), { workflowPath: undefined });
806
806
  config = createConfig({ permissions: ['/processInstances'] });
807
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
807
+ setUp({ mdmValues: mdmValues, config: config });
808
808
  result = { errorMessage: 'Workflow path is not defined' };
809
809
  params = {
810
810
  name: RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
@@ -829,14 +829,14 @@ describe('useAPI custom sandbox behavior', function () {
829
829
  });
830
830
  }); });
831
831
  it('should send api request on action request and name workflow/startProcessFromQuery', function () { return __awaiter(void 0, void 0, void 0, function () {
832
- var result, config, waitFor, params;
832
+ var result, config, params;
833
833
  return __generator(this, function (_a) {
834
834
  switch (_a.label) {
835
835
  case 0:
836
836
  result = { success: 'message' };
837
837
  requestMock.mockResolvedValue(result);
838
838
  config = createConfig({ permissions: ['/processInstances'] });
839
- waitFor = setUp({ config: config }).waitFor;
839
+ setUp({ config: config });
840
840
  params = {
841
841
  name: RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
842
842
  id: '12',
@@ -1166,11 +1166,11 @@ describe('useAPI custom sandbox behavior', function () {
1166
1166
  expect(interceptors.finishInterceptorInit).toHaveBeenCalledTimes(1);
1167
1167
  });
1168
1168
  it('should not start Process Instance on action request and name workflow/startProcessInstance if processDefinitionId is empty', function () { return __awaiter(void 0, void 0, void 0, function () {
1169
- var waitFor, result, params;
1169
+ var result, params;
1170
1170
  return __generator(this, function (_a) {
1171
1171
  switch (_a.label) {
1172
1172
  case 0:
1173
- waitFor = setUp().waitFor;
1173
+ setUp();
1174
1174
  result = { errorMessage: 'processDefinitionId is empty' };
1175
1175
  params = {
1176
1176
  name: RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
@@ -1192,11 +1192,11 @@ describe('useAPI custom sandbox behavior', function () {
1192
1192
  });
1193
1193
  }); });
1194
1194
  it('should not start Process Instance on action request and name workflow/startProcessInstance if changeRequestURI is empty', function () { return __awaiter(void 0, void 0, void 0, function () {
1195
- var waitFor, result, params;
1195
+ var result, params;
1196
1196
  return __generator(this, function (_a) {
1197
1197
  switch (_a.label) {
1198
1198
  case 0:
1199
- waitFor = setUp().waitFor;
1199
+ setUp();
1200
1200
  result = { errorMessage: 'changeRequestURI is empty' };
1201
1201
  params = {
1202
1202
  name: RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
@@ -1219,12 +1219,12 @@ describe('useAPI custom sandbox behavior', function () {
1219
1219
  });
1220
1220
  }); });
1221
1221
  it('should not send api request on action request and name workflow/startProcessInstance if no permissions', function () { return __awaiter(void 0, void 0, void 0, function () {
1222
- var config, waitFor, result, params;
1222
+ var config, result, params;
1223
1223
  return __generator(this, function (_a) {
1224
1224
  switch (_a.label) {
1225
1225
  case 0:
1226
1226
  config = createConfig({ permissions: ['/tenant'] });
1227
- waitFor = setUp({ config: config }).waitFor;
1227
+ setUp({ config: config });
1228
1228
  result = { errorMessage: 'Not enough permissions' };
1229
1229
  params = {
1230
1230
  name: RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
@@ -1250,13 +1250,13 @@ describe('useAPI custom sandbox behavior', function () {
1250
1250
  });
1251
1251
  }); });
1252
1252
  it('should not send api request on action request and name workflow/startProcessInstance if no workflowPath', function () { return __awaiter(void 0, void 0, void 0, function () {
1253
- var mdmValues, config, waitFor, result, params;
1253
+ var mdmValues, config, result, params;
1254
1254
  return __generator(this, function (_a) {
1255
1255
  switch (_a.label) {
1256
1256
  case 0:
1257
1257
  mdmValues = __assign(__assign({}, defaultMdmValues), { workflowPath: undefined });
1258
1258
  config = createConfig({ permissions: ['/processInstances'] });
1259
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
1259
+ setUp({ mdmValues: mdmValues, config: config });
1260
1260
  result = { errorMessage: 'Workflow path is not defined' };
1261
1261
  params = {
1262
1262
  name: RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
@@ -1282,14 +1282,14 @@ describe('useAPI custom sandbox behavior', function () {
1282
1282
  });
1283
1283
  }); });
1284
1284
  it('should send api request on action request and name workflow/startProcessInstance', function () { return __awaiter(void 0, void 0, void 0, function () {
1285
- var result, config, waitFor, params;
1285
+ var result, config, params;
1286
1286
  return __generator(this, function (_a) {
1287
1287
  switch (_a.label) {
1288
1288
  case 0:
1289
1289
  result = { success: 'message' };
1290
1290
  requestMock.mockResolvedValue(result);
1291
1291
  config = createConfig({ permissions: ['/processInstances'] });
1292
- waitFor = setUp({ config: config }).waitFor;
1292
+ setUp({ config: config });
1293
1293
  params = {
1294
1294
  name: RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
1295
1295
  id: '12',
@@ -9,8 +9,8 @@ var getValues = function (controlAttribute, attributes) {
9
9
  };
10
10
  var getValuesHash = pipe(pluck('value'), join('-'));
11
11
  export var useChangedAttributes = function (entityUri, attributes, controlAttributes) {
12
- var previousEntityUri = useRef();
13
- var previousAttributesValues = useRef();
12
+ var previousEntityUri = useRef(null);
13
+ var previousAttributesValues = useRef(null);
14
14
  var attributeValues = useMemo(function () {
15
15
  return controlAttributes.reduce(function (values, controlAttribute) {
16
16
  values[controlAttribute] = pipe(getValues, getValuesHash)(controlAttribute, attributes);
@@ -12,22 +12,60 @@ export declare const useCollaboration: ({ objectIds, objectTypes, enabled, needs
12
12
  getCommentState: (uri: string, commentUri: string) => any;
13
13
  updateCommentState: (uri: string, commentUri: string, newState: CommentState) => void;
14
14
  clearCommentState: (uri: string, commentUri: string) => void;
15
- createComment: ({ content, namedUsers, objectType, uri, relatedObjectUris }: any) => Promise<void>;
16
- createReply: ({ content, namedUsers, commentId, action, uri }: any) => Promise<void>;
15
+ createComment: ({ content, namedUsers, objectType, uri, relatedObjectUris }: {
16
+ content: any;
17
+ namedUsers: any;
18
+ objectType: any;
19
+ uri: any;
20
+ relatedObjectUris: any;
21
+ }) => Promise<void>;
22
+ createReply: ({ content, namedUsers, commentId, action, uri }: {
23
+ content: any;
24
+ namedUsers: any;
25
+ commentId: any;
26
+ action: any;
27
+ uri: any;
28
+ }) => Promise<void>;
17
29
  currentComment: Comment;
18
- deleteComment: ({ uri, commentId }: any) => void;
19
- editComment: ({ content, namedUsers, objectType, uri, relatedObjectUris, commentId, replies }: any) => Promise<void>;
30
+ deleteComment: ({ uri, commentId }: {
31
+ uri: any;
32
+ commentId: any;
33
+ }) => void;
34
+ editComment: ({ content, namedUsers, objectType, uri, relatedObjectUris, commentId, replies }: {
35
+ content: any;
36
+ namedUsers: any;
37
+ objectType: any;
38
+ uri: any;
39
+ relatedObjectUris: any;
40
+ commentId: any;
41
+ replies: any;
42
+ }) => Promise<void>;
20
43
  getComment: (commentId: string) => void;
21
44
  getComments: (relatedObjectUri: string, pageToken?: string) => void;
22
- getCommentsCount: (objectIds: string[], shouldResetCommentsMap?: any) => void;
45
+ getCommentsCount: (objectIds: string[], shouldResetCommentsMap?: boolean) => void;
23
46
  loading: boolean;
24
47
  objectTypes: CollaborationObjectTypes[];
25
48
  pageToken: string;
26
- reOpenThread: ({ commentId, uri }: any) => void;
27
- resolveThread: ({ commentId, uri }: any) => void;
49
+ reOpenThread: ({ commentId, uri }: {
50
+ commentId: any;
51
+ uri: any;
52
+ }) => void;
53
+ resolveThread: ({ commentId, uri }: {
54
+ commentId: any;
55
+ uri: any;
56
+ }) => void;
28
57
  sending: boolean;
29
- deleteReply: ({ uri, commentId, reply }: any) => void;
30
- editReply: ({ content, namedUsers, commentId, replyId }: any) => Promise<void>;
58
+ deleteReply: ({ uri, commentId, reply }: {
59
+ uri: any;
60
+ commentId: any;
61
+ reply: any;
62
+ }) => void;
63
+ editReply: ({ content, namedUsers, commentId, replyId }: {
64
+ content: any;
65
+ namedUsers: any;
66
+ commentId: any;
67
+ replyId: any;
68
+ }) => Promise<void>;
31
69
  totalCommentsCount: number;
32
70
  };
33
71
  export {};
@@ -123,24 +123,21 @@ export var useCollaboration = function (_a) {
123
123
  setCurrentComment(comment);
124
124
  setComments(map(when(propEq('commentId', comment.commentId), always(comment))));
125
125
  };
126
- var deleteCommentFromState = function (commentId, uri) {
127
- var repliesCountFromComments;
128
- var repliesCountFromCommentsMap;
126
+ var deleteCommentFromState = useCallback(function (commentId, uri) {
127
+ var _a, _b, _c;
128
+ var targetComment = comments.find(function (comment) { return comment.commentId === commentId; });
129
+ var repliesCountFromComments = targetComment === null || targetComment === void 0 ? void 0 : targetComment.replies.length;
130
+ var repliesCountFromCommentsMap = (_b = (_a = commentsMap === null || commentsMap === void 0 ? void 0 : commentsMap[uri]) === null || _a === void 0 ? void 0 : _a.find(function (c) { return c.commentId === commentId; })) === null || _b === void 0 ? void 0 : _b.replies;
131
+ var deletedRepliesCount = (_c = repliesCountFromComments !== null && repliesCountFromComments !== void 0 ? repliesCountFromComments : repliesCountFromCommentsMap) !== null && _c !== void 0 ? _c : 0;
129
132
  setCurrentComment(null);
130
133
  setCommentsMap(function (prevCommentsMap) {
131
134
  var _a;
132
- var _b, _c;
133
- repliesCountFromCommentsMap = (_c = (_b = prevCommentsMap === null || prevCommentsMap === void 0 ? void 0 : prevCommentsMap[uri]) === null || _b === void 0 ? void 0 : _b.find(function (c) { return c.commentId === commentId; })) === null || _c === void 0 ? void 0 : _c.replies;
134
135
  var comments = prevCommentsMap[uri] || [];
135
136
  return __assign(__assign({}, prevCommentsMap), (_a = {}, _a[uri] = comments.filter(function (c) { return c.commentId !== commentId; }), _a));
136
137
  });
137
- setComments(function (prevComments) {
138
- var _a;
139
- repliesCountFromComments = (_a = prevComments.find(function (comment) { return comment.commentId === commentId; })) === null || _a === void 0 ? void 0 : _a.replies.length;
140
- return prevComments.filter(function (comment) { return comment.commentId !== commentId; });
141
- });
142
- setTotalCommentsCount(function (prevCount) { var _a; return Math.max((prevCount || 0) - (1 + ((_a = repliesCountFromComments !== null && repliesCountFromComments !== void 0 ? repliesCountFromComments : repliesCountFromCommentsMap) !== null && _a !== void 0 ? _a : 0)), 0); });
143
- };
138
+ setComments(function (prevComments) { return prevComments.filter(function (comment) { return comment.commentId !== commentId; }); });
139
+ setTotalCommentsCount(function (prevCount) { return Math.max((prevCount || 0) - (1 + deletedRepliesCount), 0); });
140
+ }, [comments, commentsMap]);
144
141
  var createComment = useCallback(function (_a) {
145
142
  var content = _a.content, namedUsers = _a.namedUsers, objectType = _a.objectType, uri = _a.uri, relatedObjectUris = _a.relatedObjectUris;
146
143
  setSending(true);
@@ -186,7 +183,7 @@ export var useCollaboration = function (_a) {
186
183
  .then(function () { return deleteCommentFromState(commentId, uri); })
187
184
  .catch(catchErrorInRequest)
188
185
  .finally(function () { return setSending(false); });
189
- }, [collaborationPath, tenant]);
186
+ }, [collaborationPath, tenant, deleteCommentFromState]);
190
187
  var updateReplyInState = useCallback(function (reply, uri, commentId, isDeleteReply) {
191
188
  var newStatus = reply.action === 'resolve' ? 'resolved' : 'open';
192
189
  var replyId = reply.replyId;
@@ -55,7 +55,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
55
55
  return to.concat(ar || Array.prototype.slice.call(from));
56
56
  };
57
57
  import React from 'react';
58
- import { renderHook, act } from '@testing-library/react-hooks';
58
+ import { renderHook, act } from '@testing-library/react';
59
59
  import { getCommentsCount, getTotalCommentsCount, getComment, createComment, createReply, deleteComment, updateComment, getComments, deleteReply, updateReply } from '@reltio/mdm-sdk';
60
60
  import { MdmModuleProvider } from '../../contexts/MdmModuleContext';
61
61
  import { useCollaboration } from './useCollaboration';
@@ -458,7 +458,8 @@ describe('useCollaboration behaviour', function () {
458
458
  content: 'content',
459
459
  namedUsers: [],
460
460
  objectType: 'entity',
461
- uri: 'uri2'
461
+ uri: 'uri2',
462
+ relatedObjectUris: []
462
463
  });
463
464
  return [2 /*return*/];
464
465
  });
@@ -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 * as dataHelpers from './dataHelpers';
14
14
  import { useCollapsibleTableRows } from './useCollapsibleTableRows';
15
15
  describe('useCollapsibleTableRows tests', function () {
@@ -55,7 +55,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
55
55
  return to.concat(ar || Array.prototype.slice.call(from));
56
56
  };
57
57
  import React from 'react';
58
- import { renderHook, act } from '@testing-library/react-hooks';
58
+ import { renderHook, act } from '@testing-library/react';
59
59
  import { getFilteredEntities, getEntity } from '@reltio/mdm-sdk';
60
60
  import { MdmModuleProvider } from '../../contexts/MdmModuleContext';
61
61
  import { useCommentsEntitiesMap } from './useCommentsEntitiesMap';
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import React from 'react';
13
13
  import { curryN } from 'ramda';
14
- import { renderHook } from '@testing-library/react-hooks';
14
+ import { renderHook } from '@testing-library/react';
15
15
  import { ConfigPermissions, checkConfigPermission } from '@reltio/mdm-sdk';
16
16
  import { MdmModuleProvider } from '../../contexts/MdmModuleContext';
17
17
  import { useConfigPermissions } from './useConfigPermissions';
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  };
48
48
  import React from 'react';
49
49
  import { nanoid } from 'nanoid';
50
- import { act, renderHook } from '@testing-library/react-hooks';
50
+ import { act, renderHook, waitFor } from '@testing-library/react';
51
51
  import * as request from '@reltio/mdm-sdk/src/network';
52
52
  import { CustomAction, CustomScriptPlatform, RequestAction, setRequestProvider, createRequestProvider, initializeWebWorker } from '@reltio/mdm-sdk';
53
53
  import { MdmModuleProvider } from '../../contexts/MdmModuleContext';
@@ -139,11 +139,11 @@ describe('useCustomScripts', function () {
139
139
  jest.clearAllMocks();
140
140
  });
141
141
  it('should intercept request', function () { return __awaiter(void 0, void 0, void 0, function () {
142
- var waitFor, params, response, _a;
142
+ var params, response, _a;
143
143
  return __generator(this, function (_b) {
144
144
  switch (_b.label) {
145
145
  case 0:
146
- waitFor = setUp().waitFor;
146
+ setUp();
147
147
  expect(initializeWebWorker).toHaveBeenCalledTimes(1);
148
148
  params = {
149
149
  name: RequestAction.API,
@@ -210,11 +210,11 @@ describe('useCustomScripts', function () {
210
210
  });
211
211
  }); });
212
212
  it('should not fail if no options passed', function () { return __awaiter(void 0, void 0, void 0, function () {
213
- var waitFor, params;
213
+ var params;
214
214
  return __generator(this, function (_a) {
215
215
  switch (_a.label) {
216
216
  case 0:
217
- waitFor = setUp().waitFor;
217
+ setUp();
218
218
  expect(initializeWebWorker).toHaveBeenCalledTimes(1);
219
219
  params = {
220
220
  name: RequestAction.API,
@@ -242,11 +242,11 @@ describe('useCustomScripts', function () {
242
242
  });
243
243
  }); });
244
244
  it('should intercept request if requestUrl start with apiPath', function () { return __awaiter(void 0, void 0, void 0, function () {
245
- var waitFor, params, response, _a;
245
+ var params, response, _a;
246
246
  return __generator(this, function (_b) {
247
247
  switch (_b.label) {
248
248
  case 0:
249
- waitFor = setUp().waitFor;
249
+ setUp();
250
250
  expect(initializeWebWorker).toHaveBeenCalledTimes(1);
251
251
  params = {
252
252
  name: RequestAction.API,
@@ -324,11 +324,11 @@ describe('useCustomScripts', function () {
324
324
  });
325
325
  }); });
326
326
  it('should intercept response', function () { return __awaiter(void 0, void 0, void 0, function () {
327
- var waitFor, response, _a;
327
+ var response, _a;
328
328
  return __generator(this, function (_b) {
329
329
  switch (_b.label) {
330
330
  case 0:
331
- waitFor = setUp().waitFor;
331
+ setUp();
332
332
  expect(initializeWebWorker).toHaveBeenCalledTimes(1);
333
333
  response = requestProvider.request('/nui/reltioAPI/api/uitest1/entities/1Ms5ANeR/attributes/TextField/3U1mbeNRn?crosswalkValue=entity-FB-add-0.4094314985799944', {
334
334
  method: 'GET'
@@ -413,7 +413,7 @@ describe('useCustomScripts', function () {
413
413
  });
414
414
  }); });
415
415
  it('should change url in request for absolute path in new UI correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
416
- var result, customScriptWithAbsolutePath, waitFor, params;
416
+ var result, customScriptWithAbsolutePath, params;
417
417
  return __generator(this, function (_a) {
418
418
  switch (_a.label) {
419
419
  case 0:
@@ -426,7 +426,7 @@ describe('useCustomScripts', function () {
426
426
  files: ['https://reltio-ui-files.s3.amazonaws.com/custom-scripts/hideAttr.js'],
427
427
  permissions: ['/entities']
428
428
  };
429
- waitFor = setUp({ config: [customScriptWithAbsolutePath] }).waitFor;
429
+ setUp({ config: [customScriptWithAbsolutePath] });
430
430
  expect(initializeWebWorker).toHaveBeenCalledTimes(1);
431
431
  params = {
432
432
  name: RequestAction.API,
@@ -4,7 +4,7 @@ var SCROLL_SPEED = 10;
4
4
  var TRIGGER_SCROLL_DISTANCE = 150;
5
5
  export var useDndBasicTableScrollModifier = function (_a) {
6
6
  var tableRef = _a.tableRef;
7
- var intervalRef = useRef();
7
+ var intervalRef = useRef(null);
8
8
  var stopScroll = useCallback(function () {
9
9
  if (intervalRef.current) {
10
10
  clearInterval(intervalRef.current);
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import React from 'react';
13
13
  import { Directions, isAvailableRelationBetweenEntities } from '@reltio/mdm-sdk';
14
- import { renderHook } from '@testing-library/react-hooks';
14
+ import { renderHook } from '@testing-library/react';
15
15
  import { MdmModuleProvider } from '../../contexts/MdmModuleContext';
16
16
  import { useEditableConnection } from './useEditableConnection';
17
17
  jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getAllUsersForTenant: jest.fn(), getRelationType: jest.fn(), isAvailableRelationBetweenEntities: jest.fn().mockReturnValue(true) })); });
@@ -1,5 +1,5 @@
1
1
  export declare const useFilterAutoFocus: (rowsData: Record<string, unknown>[]) => {
2
- attributeFilterRef: import("react").MutableRefObject<any>;
3
- lastAttributesCountRef: import("react").MutableRefObject<any>;
4
- attributesCountRef: import("react").MutableRefObject<any>;
2
+ attributeFilterRef: import("react").MutableRefObject<HTMLInputElement>;
3
+ lastAttributesCountRef: import("react").MutableRefObject<number>;
4
+ attributesCountRef: import("react").MutableRefObject<number>;
5
5
  };
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { assocPath } from 'ramda';
13
- import { renderHook } from '@testing-library/react-hooks';
13
+ import { renderHook } from '@testing-library/react';
14
14
  import { Mode } from '@reltio/mdm-sdk';
15
15
  import { useMdmAction, useMdmEntity, useMdmMetadata, useMdmModifiedEntity, useMdmMode } from '../../contexts/MdmModuleContext';
16
16
  import { useHiddenAttributes } from './useHiddenAttributes';