@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
@@ -12,8 +12,8 @@ var getValues = function (controlAttribute, attributes) {
12
12
  };
13
13
  var getValuesHash = (0, ramda_1.pipe)((0, ramda_1.pluck)('value'), (0, ramda_1.join)('-'));
14
14
  var useChangedAttributes = function (entityUri, attributes, controlAttributes) {
15
- var previousEntityUri = (0, react_1.useRef)();
16
- var previousAttributesValues = (0, react_1.useRef)();
15
+ var previousEntityUri = (0, react_1.useRef)(null);
16
+ var previousAttributesValues = (0, react_1.useRef)(null);
17
17
  var attributeValues = (0, react_1.useMemo)(function () {
18
18
  return controlAttributes.reduce(function (values, controlAttribute) {
19
19
  values[controlAttribute] = (0, ramda_1.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 {};
@@ -126,24 +126,21 @@ var useCollaboration = function (_a) {
126
126
  setCurrentComment(comment);
127
127
  setComments((0, ramda_1.map)((0, ramda_1.when)((0, ramda_1.propEq)('commentId', comment.commentId), (0, ramda_1.always)(comment))));
128
128
  };
129
- var deleteCommentFromState = function (commentId, uri) {
130
- var repliesCountFromComments;
131
- var repliesCountFromCommentsMap;
129
+ var deleteCommentFromState = (0, react_1.useCallback)(function (commentId, uri) {
130
+ var _a, _b, _c;
131
+ var targetComment = comments.find(function (comment) { return comment.commentId === commentId; });
132
+ var repliesCountFromComments = targetComment === null || targetComment === void 0 ? void 0 : targetComment.replies.length;
133
+ 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;
134
+ var deletedRepliesCount = (_c = repliesCountFromComments !== null && repliesCountFromComments !== void 0 ? repliesCountFromComments : repliesCountFromCommentsMap) !== null && _c !== void 0 ? _c : 0;
132
135
  setCurrentComment(null);
133
136
  setCommentsMap(function (prevCommentsMap) {
134
137
  var _a;
135
- var _b, _c;
136
- 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;
137
138
  var comments = prevCommentsMap[uri] || [];
138
139
  return __assign(__assign({}, prevCommentsMap), (_a = {}, _a[uri] = comments.filter(function (c) { return c.commentId !== commentId; }), _a));
139
140
  });
140
- setComments(function (prevComments) {
141
- var _a;
142
- repliesCountFromComments = (_a = prevComments.find(function (comment) { return comment.commentId === commentId; })) === null || _a === void 0 ? void 0 : _a.replies.length;
143
- return prevComments.filter(function (comment) { return comment.commentId !== commentId; });
144
- });
145
- 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); });
146
- };
141
+ setComments(function (prevComments) { return prevComments.filter(function (comment) { return comment.commentId !== commentId; }); });
142
+ setTotalCommentsCount(function (prevCount) { return Math.max((prevCount || 0) - (1 + deletedRepliesCount), 0); });
143
+ }, [comments, commentsMap]);
147
144
  var createComment = (0, react_1.useCallback)(function (_a) {
148
145
  var content = _a.content, namedUsers = _a.namedUsers, objectType = _a.objectType, uri = _a.uri, relatedObjectUris = _a.relatedObjectUris;
149
146
  setSending(true);
@@ -189,7 +186,7 @@ var useCollaboration = function (_a) {
189
186
  .then(function () { return deleteCommentFromState(commentId, uri); })
190
187
  .catch(catchErrorInRequest)
191
188
  .finally(function () { return setSending(false); });
192
- }, [collaborationPath, tenant]);
189
+ }, [collaborationPath, tenant, deleteCommentFromState]);
193
190
  var updateReplyInState = (0, react_1.useCallback)(function (reply, uri, commentId, isDeleteReply) {
194
191
  var newStatus = reply.action === 'resolve' ? 'resolved' : 'open';
195
192
  var replyId = reply.replyId;
@@ -60,7 +60,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
60
60
  };
61
61
  Object.defineProperty(exports, "__esModule", { value: true });
62
62
  var react_1 = __importDefault(require("react"));
63
- var react_hooks_1 = require("@testing-library/react-hooks");
63
+ var react_2 = require("@testing-library/react");
64
64
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
65
65
  var MdmModuleContext_1 = require("../../contexts/MdmModuleContext");
66
66
  var useCollaboration_1 = require("./useCollaboration");
@@ -79,7 +79,7 @@ describe('useCollaboration behaviour', function () {
79
79
  var children = _a.children;
80
80
  return (react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues }, children));
81
81
  };
82
- return (0, react_hooks_1.renderHook)(useCollaboration_1.useCollaboration, { initialProps: props, wrapper: Providers });
82
+ return (0, react_2.renderHook)(useCollaboration_1.useCollaboration, { initialProps: props, wrapper: Providers });
83
83
  };
84
84
  beforeEach(function () {
85
85
  mdm_sdk_1.getComment.mockResolvedValue({ commentId: 'commentId' });
@@ -105,7 +105,7 @@ describe('useCollaboration behaviour', function () {
105
105
  mdm_sdk_1.getCommentsCount.mockResolvedValueOnce([]);
106
106
  mdm_sdk_1.getTotalCommentsCount.mockResolvedValueOnce({ total: 1 });
107
107
  result = setUp().result;
108
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
108
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
109
109
  return __generator(this, function (_a) {
110
110
  switch (_a.label) {
111
111
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -143,7 +143,7 @@ describe('useCollaboration behaviour', function () {
143
143
  tenant: 'alenat',
144
144
  collaborationPath: defaultMdmValues.collaborationPath
145
145
  });
146
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
146
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
147
147
  return __generator(this, function (_a) {
148
148
  switch (_a.label) {
149
149
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -168,7 +168,7 @@ describe('useCollaboration behaviour', function () {
168
168
  mdm_sdk_1.getCommentsCount.mockRejectedValueOnce(null);
169
169
  result = setUp().result;
170
170
  expect(mdm_sdk_1.getCommentsCount).toHaveBeenCalled();
171
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
171
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
172
172
  return __generator(this, function (_a) {
173
173
  switch (_a.label) {
174
174
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -207,7 +207,7 @@ describe('useCollaboration behaviour', function () {
207
207
  tenant: 'alenat',
208
208
  collaborationPath: defaultMdmValues.collaborationPath
209
209
  });
210
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
210
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
211
211
  return __generator(this, function (_a) {
212
212
  result.current.getCommentsCount(['uri2']);
213
213
  return [2 /*return*/];
@@ -247,7 +247,7 @@ describe('useCollaboration behaviour', function () {
247
247
  tenant: 'alenat',
248
248
  collaborationPath: defaultMdmValues.collaborationPath
249
249
  });
250
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
250
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
251
251
  return __generator(this, function (_a) {
252
252
  switch (_a.label) {
253
253
  case 0:
@@ -283,7 +283,7 @@ describe('useCollaboration behaviour', function () {
283
283
  result = setUp().result;
284
284
  expect(result.current.comments).toEqual([]);
285
285
  expect(result.current.pageToken).toBe(null);
286
- (0, react_hooks_1.act)(function () {
286
+ (0, react_2.act)(function () {
287
287
  result.current.getComments('uri');
288
288
  });
289
289
  expect(mdm_sdk_1.getComments).toHaveBeenCalledWith({
@@ -291,7 +291,7 @@ describe('useCollaboration behaviour', function () {
291
291
  tenant: 'alenat',
292
292
  relatedObjectUri: 'uri'
293
293
  });
294
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
294
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
295
295
  return __generator(this, function (_a) {
296
296
  switch (_a.label) {
297
297
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -309,7 +309,7 @@ describe('useCollaboration behaviour', function () {
309
309
  items: [{ commentId: 'commentId2' }, { commentId: 'commentId3' }],
310
310
  nextPageToken: 'token2'
311
311
  });
312
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
312
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
313
313
  return __generator(this, function (_a) {
314
314
  result.current.getComments('uri', 'token');
315
315
  return [2 /*return*/];
@@ -327,7 +327,7 @@ describe('useCollaboration behaviour', function () {
327
327
  items: [{ commentId: 'commentId1' }, { commentId: 'commentId2' }],
328
328
  nextPageToken: 'token'
329
329
  });
330
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
330
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
331
331
  return __generator(this, function (_a) {
332
332
  result.current.getComments('uri');
333
333
  return [2 /*return*/];
@@ -349,7 +349,7 @@ describe('useCollaboration behaviour', function () {
349
349
  result = setUp().result;
350
350
  expect(result.current.currentComment).toBe(null);
351
351
  expect(result.current.loading).toBe(false);
352
- (0, react_hooks_1.act)(function () {
352
+ (0, react_2.act)(function () {
353
353
  result.current.getComment('commentId');
354
354
  });
355
355
  expect(result.current.loading).toBe(true);
@@ -358,7 +358,7 @@ describe('useCollaboration behaviour', function () {
358
358
  tenant: 'alenat',
359
359
  commentId: 'commentId'
360
360
  });
361
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
361
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
362
362
  return __generator(this, function (_a) {
363
363
  switch (_a.label) {
364
364
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -399,7 +399,7 @@ describe('useCollaboration behaviour', function () {
399
399
  mdm_sdk_1.getCommentsCount.mockResolvedValueOnce([{ objectId: 'uri1', comments: comments }]);
400
400
  mdm_sdk_1.createComment.mockResolvedValueOnce([{ commentId: 'commentId' }]);
401
401
  result = setUp().result;
402
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
402
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
403
403
  return __generator(this, function (_a) {
404
404
  switch (_a.label) {
405
405
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -414,7 +414,7 @@ describe('useCollaboration behaviour', function () {
414
414
  expect(result.current.commentsMap).toEqual({ uri1: comments });
415
415
  expect(result.current.currentComment).toBe(null);
416
416
  expect(result.current.sending).toBe(false);
417
- (0, react_hooks_1.act)(function () {
417
+ (0, react_2.act)(function () {
418
418
  result.current.createComment({
419
419
  content: 'content',
420
420
  namedUsers: [],
@@ -437,7 +437,7 @@ describe('useCollaboration behaviour', function () {
437
437
  permanentLink: 'https://tst-01.reltio.com/nui/alenat/profile?entityUri=entities%2F2jWtLtNc&commentId=%7BcommentId%7D'
438
438
  }
439
439
  });
440
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
440
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
441
441
  return __generator(this, function (_a) {
442
442
  switch (_a.label) {
443
443
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -457,13 +457,14 @@ describe('useCollaboration behaviour', function () {
457
457
  uri1: __spreadArray(__spreadArray([], comments, true), [{ commentId: 'commentId', replies: 0, status: 'open' }], false)
458
458
  });
459
459
  mdm_sdk_1.createComment.mockResolvedValueOnce([{ commentId: 'commentId2' }]);
460
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
460
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
461
461
  return __generator(this, function (_a) {
462
462
  result.current.createComment({
463
463
  content: 'content',
464
464
  namedUsers: [],
465
465
  objectType: 'entity',
466
- uri: 'uri2'
466
+ uri: 'uri2',
467
+ relatedObjectUris: []
467
468
  });
468
469
  return [2 /*return*/];
469
470
  });
@@ -502,7 +503,7 @@ describe('useCollaboration behaviour', function () {
502
503
  });
503
504
  mdm_sdk_1.createReply.mockResolvedValueOnce([{ content: 'reply message' }]);
504
505
  result = setUp().result;
505
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
506
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
506
507
  return __generator(this, function (_a) {
507
508
  result.current.getComments('uri');
508
509
  result.current.getComment('commentId');
@@ -518,7 +519,7 @@ describe('useCollaboration behaviour', function () {
518
519
  expect(result.current.commentsMap).toEqual({ uri1: commentsCount });
519
520
  expect(result.current.comments).toEqual(comments);
520
521
  expect(result.current.sending).toBe(false);
521
- (0, react_hooks_1.act)(function () {
522
+ (0, react_2.act)(function () {
522
523
  result.current.createReply({
523
524
  content: 'reply message',
524
525
  namedUsers: [],
@@ -538,7 +539,7 @@ describe('useCollaboration behaviour', function () {
538
539
  namedUsers: []
539
540
  }
540
541
  });
541
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
542
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
542
543
  return __generator(this, function (_a) {
543
544
  switch (_a.label) {
544
545
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -578,7 +579,7 @@ describe('useCollaboration behaviour', function () {
578
579
  action: 'resolve'
579
580
  }
580
581
  ]));
581
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
582
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
582
583
  return __generator(this, function (_a) {
583
584
  result.current.createReply({
584
585
  content: '',
@@ -632,7 +633,7 @@ describe('useCollaboration behaviour', function () {
632
633
  mdm_sdk_1.getComments.mockResolvedValue({ items: comments });
633
634
  mdm_sdk_1.createReply.mockResolvedValueOnce([{ content: '', action: 'resolve' }]);
634
635
  result = setUp().result;
635
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
636
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
636
637
  return __generator(this, function (_a) {
637
638
  result.current.getComments('uri');
638
639
  result.current.getComment('commentId');
@@ -648,7 +649,7 @@ describe('useCollaboration behaviour', function () {
648
649
  });
649
650
  expect(result.current.comments).toEqual(comments);
650
651
  expect(result.current.sending).toBe(false);
651
- (0, react_hooks_1.act)(function () {
652
+ (0, react_2.act)(function () {
652
653
  result.current.resolveThread({ commentId: 'id2', uri: 'uri1' });
653
654
  });
654
655
  expect(result.current.sending).toBe(true);
@@ -662,7 +663,7 @@ describe('useCollaboration behaviour', function () {
662
663
  namedUsers: []
663
664
  }
664
665
  });
665
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
666
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
666
667
  return __generator(this, function (_a) {
667
668
  switch (_a.label) {
668
669
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -707,7 +708,7 @@ describe('useCollaboration behaviour', function () {
707
708
  });
708
709
  mdm_sdk_1.createReply.mockResolvedValueOnce([{ content: '', action: 'reopen' }]);
709
710
  result = setUp().result;
710
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
711
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
711
712
  return __generator(this, function (_a) {
712
713
  result.current.getComments('uri');
713
714
  result.current.getComment('commentId');
@@ -723,7 +724,7 @@ describe('useCollaboration behaviour', function () {
723
724
  });
724
725
  expect(result.current.comments).toEqual(comments);
725
726
  expect(result.current.sending).toBe(false);
726
- (0, react_hooks_1.act)(function () {
727
+ (0, react_2.act)(function () {
727
728
  result.current.reOpenThread({ commentId: 'id2', uri: 'uri1' });
728
729
  });
729
730
  expect(result.current.sending).toBe(true);
@@ -737,7 +738,7 @@ describe('useCollaboration behaviour', function () {
737
738
  namedUsers: []
738
739
  }
739
740
  });
740
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
741
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
741
742
  return __generator(this, function (_a) {
742
743
  switch (_a.label) {
743
744
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -771,7 +772,7 @@ describe('useCollaboration behaviour', function () {
771
772
  switch (_a.label) {
772
773
  case 0:
773
774
  result = setUp().result;
774
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
775
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
775
776
  return __generator(this, function (_a) {
776
777
  result.current.getComment('commentId');
777
778
  return [2 /*return*/];
@@ -782,7 +783,7 @@ describe('useCollaboration behaviour', function () {
782
783
  expect(result.current.currentComment).toEqual({
783
784
  commentId: 'commentId'
784
785
  });
785
- (0, react_hooks_1.act)(function () {
786
+ (0, react_2.act)(function () {
786
787
  result.current.clearCurrentComment();
787
788
  });
788
789
  expect(result.current.currentComment).toBe(null);
@@ -812,7 +813,7 @@ describe('useCollaboration behaviour', function () {
812
813
  mdm_sdk_1.getComment.mockResolvedValue(initialComment);
813
814
  mdm_sdk_1.getComments.mockResolvedValue({ items: initialComments });
814
815
  result = setUp().result;
815
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
816
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
816
817
  return __generator(this, function (_a) {
817
818
  result.current.getComment(initialComment.commentId);
818
819
  result.current.getComments('uri');
@@ -824,7 +825,7 @@ describe('useCollaboration behaviour', function () {
824
825
  expect(result.current.currentComment).toEqual(initialComment);
825
826
  expect(result.current.comments).toEqual(initialComments);
826
827
  expect(result.current.sending).toBe(false);
827
- (0, react_hooks_1.act)(function () {
828
+ (0, react_2.act)(function () {
828
829
  result.current.editComment({
829
830
  commentId: 'id1',
830
831
  content: 'edited comment',
@@ -841,7 +842,7 @@ describe('useCollaboration behaviour', function () {
841
842
  tenant: 'alenat',
842
843
  data: editedComment
843
844
  });
844
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
845
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
845
846
  return __generator(this, function (_a) {
846
847
  switch (_a.label) {
847
848
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -879,7 +880,7 @@ describe('useCollaboration behaviour', function () {
879
880
  mdm_sdk_1.getComments.mockResolvedValueOnce({ items: comments });
880
881
  mdm_sdk_1.deleteComment.mockResolvedValueOnce('');
881
882
  result = setUp().result;
882
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
883
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
883
884
  return __generator(this, function (_a) {
884
885
  result.current.getComments('uri');
885
886
  return [2 /*return*/];
@@ -890,7 +891,7 @@ describe('useCollaboration behaviour', function () {
890
891
  expect(result.current.comments).toEqual(comments);
891
892
  expect(result.current.commentsMap).toEqual({ uri1: commentsCount });
892
893
  expect(result.current.sending).toBe(false);
893
- (0, react_hooks_1.act)(function () {
894
+ (0, react_2.act)(function () {
894
895
  result.current.deleteComment({ commentId: 'id1', uri: 'uri1' });
895
896
  });
896
897
  expect(result.current.sending).toBe(true);
@@ -899,7 +900,7 @@ describe('useCollaboration behaviour', function () {
899
900
  tenant: 'alenat',
900
901
  commentId: 'id1'
901
902
  });
902
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
903
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
903
904
  return __generator(this, function (_a) {
904
905
  switch (_a.label) {
905
906
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -932,7 +933,7 @@ describe('useCollaboration behaviour', function () {
932
933
  mdm_sdk_1.getCommentsCount.mockResolvedValueOnce([{ objectId: 'uri1', comments: commentsCount }]);
933
934
  mdm_sdk_1.createReply.mockResolvedValueOnce([{ content: 'reply message' }]);
934
935
  result = setUp().result;
935
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
936
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
936
937
  return __generator(this, function (_a) {
937
938
  Promise.resolve();
938
939
  return [2 /*return*/];
@@ -941,7 +942,7 @@ describe('useCollaboration behaviour', function () {
941
942
  case 1:
942
943
  _a.sent();
943
944
  expect(result.current.commentsMap).toEqual({ uri1: commentsCount });
944
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
945
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
945
946
  return __generator(this, function (_a) {
946
947
  switch (_a.label) {
947
948
  case 0: return [4 /*yield*/, result.current.createReply({
@@ -982,7 +983,7 @@ describe('useCollaboration behaviour', function () {
982
983
  mdm_sdk_1.getComments.mockResolvedValue({ items: comments });
983
984
  mdm_sdk_1.deleteReply.mockResolvedValueOnce('');
984
985
  result = setUp().result;
985
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
986
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
986
987
  return __generator(this, function (_a) {
987
988
  result.current.getComments('uri');
988
989
  return [2 /*return*/];
@@ -993,7 +994,7 @@ describe('useCollaboration behaviour', function () {
993
994
  expect(result.current.comments).toEqual(comments);
994
995
  expect(result.current.commentsMap).toEqual({ uri1: commentsCount });
995
996
  expect(result.current.sending).toBe(false);
996
- (0, react_hooks_1.act)(function () {
997
+ (0, react_2.act)(function () {
997
998
  result.current.deleteReply({
998
999
  commentId: 'id1',
999
1000
  uri: 'uri1',
@@ -1007,7 +1008,7 @@ describe('useCollaboration behaviour', function () {
1007
1008
  commentId: 'id1',
1008
1009
  replyId: 'replyId1'
1009
1010
  });
1010
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1011
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1011
1012
  return __generator(this, function (_a) {
1012
1013
  switch (_a.label) {
1013
1014
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -1052,7 +1053,7 @@ describe('useCollaboration behaviour', function () {
1052
1053
  mdm_sdk_1.getComment.mockResolvedValueOnce(initialComment);
1053
1054
  mdm_sdk_1.getComments.mockResolvedValueOnce({ items: initialComments });
1054
1055
  result = setUp().result;
1055
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1056
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1056
1057
  return __generator(this, function (_a) {
1057
1058
  result.current.getComment(initialComment.commentId);
1058
1059
  result.current.getComments('uri');
@@ -1064,7 +1065,7 @@ describe('useCollaboration behaviour', function () {
1064
1065
  expect(result.current.currentComment).toEqual(initialComment);
1065
1066
  expect(result.current.comments).toEqual(initialComments);
1066
1067
  expect(result.current.sending).toBe(false);
1067
- (0, react_hooks_1.act)(function () {
1068
+ (0, react_2.act)(function () {
1068
1069
  result.current.editReply({
1069
1070
  commentId: 'id1',
1070
1071
  content: editedReplyContent,
@@ -1083,7 +1084,7 @@ describe('useCollaboration behaviour', function () {
1083
1084
  namedUsers: editedReply.namedUsers
1084
1085
  }
1085
1086
  });
1086
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1087
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1087
1088
  return __generator(this, function (_a) {
1088
1089
  switch (_a.label) {
1089
1090
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -1109,7 +1110,7 @@ describe('useCollaboration behaviour', function () {
1109
1110
  case 0:
1110
1111
  result = setUp().result;
1111
1112
  expect(result.current.getCommentState('attrUri', 'commentUri')).toEqual({});
1112
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1113
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1113
1114
  return __generator(this, function (_a) {
1114
1115
  result.current.updateCommentState('attrUri', 'commentUri', {
1115
1116
  value: 'value',
@@ -1126,7 +1127,7 @@ describe('useCollaboration behaviour', function () {
1126
1127
  plainTextValue: 'value',
1127
1128
  mentions: []
1128
1129
  });
1129
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1130
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1130
1131
  return __generator(this, function (_a) {
1131
1132
  result.current.updateCommentState('attrUri', 'commentUri', { isEditing: true });
1132
1133
  return [2 /*return*/];
@@ -1150,7 +1151,7 @@ describe('useCollaboration behaviour', function () {
1150
1151
  switch (_a.label) {
1151
1152
  case 0:
1152
1153
  result = setUp().result;
1153
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1154
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1154
1155
  return __generator(this, function (_a) {
1155
1156
  result.current.updateCommentState('attrUri', 'commentUri', {
1156
1157
  value: 'value',
@@ -1167,7 +1168,7 @@ describe('useCollaboration behaviour', function () {
1167
1168
  plainTextValue: 'value',
1168
1169
  mentions: []
1169
1170
  });
1170
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1171
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1171
1172
  return __generator(this, function (_a) {
1172
1173
  result.current.clearCommentState('attrUri', 'commentUri');
1173
1174
  return [2 /*return*/];
@@ -1186,7 +1187,7 @@ describe('useCollaboration behaviour', function () {
1186
1187
  switch (_a.label) {
1187
1188
  case 0:
1188
1189
  result = setUp().result;
1189
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1190
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1190
1191
  return __generator(this, function (_a) {
1191
1192
  result.current.updateCommentState('attrUri1', 'commentUri1', {
1192
1193
  value: 'value1',
@@ -1203,7 +1204,7 @@ describe('useCollaboration behaviour', function () {
1203
1204
  plainTextValue: 'value1',
1204
1205
  mentions: []
1205
1206
  });
1206
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1207
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1207
1208
  return __generator(this, function (_a) {
1208
1209
  result.current.updateCommentState('attrUri1', 'commentUri2', {
1209
1210
  value: 'value2',
@@ -1220,7 +1221,7 @@ describe('useCollaboration behaviour', function () {
1220
1221
  plainTextValue: 'value2',
1221
1222
  mentions: []
1222
1223
  });
1223
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1224
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1224
1225
  return __generator(this, function (_a) {
1225
1226
  result.current.updateCommentState('attrUri2', 'commentUri1', {
1226
1227
  value: 'value3',
@@ -1255,7 +1256,7 @@ describe('useCollaboration behaviour', function () {
1255
1256
  mdm_sdk_1.getTotalCommentsCount.mockResolvedValueOnce({ total: 15 });
1256
1257
  setUp();
1257
1258
  expect(mdm_sdk_1.getTotalCommentsCount).not.toHaveBeenCalled();
1258
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1259
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1259
1260
  return __generator(this, function (_a) {
1260
1261
  switch (_a.label) {
1261
1262
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -1284,7 +1285,7 @@ describe('useCollaboration behaviour', function () {
1284
1285
  collaborationPath: '123',
1285
1286
  tenant: 'alenat'
1286
1287
  });
1287
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1288
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1288
1289
  return __generator(this, function (_a) {
1289
1290
  switch (_a.label) {
1290
1291
  case 0: return [4 /*yield*/, Promise.resolve()];
@@ -1309,7 +1310,7 @@ describe('useCollaboration behaviour', function () {
1309
1310
  mdm_sdk_1.getTotalCommentsCount.mockRejectedValueOnce(new Error('Network error'));
1310
1311
  result = setUp({ props: { needsTotalCount: true } }).result;
1311
1312
  expect(mdm_sdk_1.getTotalCommentsCount).toHaveBeenCalled();
1312
- return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1313
+ return [4 /*yield*/, (0, react_2.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
1313
1314
  return __generator(this, function (_a) {
1314
1315
  switch (_a.label) {
1315
1316
  case 0: return [4 /*yield*/, Promise.resolve()];