@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
@@ -80,7 +80,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
80
80
  };
81
81
  Object.defineProperty(exports, "__esModule", { value: true });
82
82
  var react_1 = __importStar(require("react"));
83
- var react_hooks_1 = require("@testing-library/react-hooks");
83
+ var react_2 = require("@testing-library/react");
84
84
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
85
85
  var request = __importStar(require("@reltio/mdm-sdk/src/network"));
86
86
  var useHtmlSanitizer_1 = require("../useHtmlSanitizer");
@@ -164,7 +164,7 @@ var setUp = function (_a) {
164
164
  react_1.default.createElement(SandboxAPIContext_1.SandboxAPIContext.Provider, { value: sandbox },
165
165
  react_1.default.createElement(InterceptHandlersContext_1.InterceptHandlersContext.Provider, { value: interceptors }, children)))));
166
166
  };
167
- return __assign(__assign({}, (0, react_hooks_1.renderHook)(useAPI_1.useAPI, { initialProps: config, wrapper: Providers })), { updateMdmValues: updateMdmValues });
167
+ return __assign(__assign({}, (0, react_2.renderHook)(useAPI_1.useAPI, { initialProps: config, wrapper: Providers })), { updateMdmValues: updateMdmValues });
168
168
  };
169
169
  describe('useAPI custom sandbox behavior', function () {
170
170
  var postMessage = jest.fn();
@@ -205,21 +205,21 @@ describe('useAPI custom sandbox behavior', function () {
205
205
  tooltip: null,
206
206
  customStyles: {}
207
207
  });
208
- (0, react_hooks_1.act)(function () {
208
+ (0, react_2.act)(function () {
209
209
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_HTML, params: { html: html } });
210
210
  });
211
211
  expect(htmlSanitizer).toHaveBeenCalledWith(html);
212
212
  expect(result.current.html).toEqual(htmlBlock);
213
- (0, react_hooks_1.act)(function () {
213
+ (0, react_2.act)(function () {
214
214
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_HTML, params: { html: child, id: 'testId' } });
215
215
  });
216
- expect(document.body.childNodes[0]).toEqual(childHtmlBlock);
216
+ expect(htmlBlock).toEqual(childHtmlBlock);
217
217
  });
218
218
  it('should allow disabled and checked state for checkbox', function () {
219
219
  var _a;
220
220
  var html = '<table><tbody><tr><td>Checked:</td><td>UnChecked_enabled: <input type="checkbox" id="myCheck1"></td><td>Checked_disabled: <input type="checkbox" id="myCheck2" checked="true" disabled="true"></td></tr></tbody></table>';
221
221
  var result = setUp().result;
222
- (0, react_hooks_1.act)(function () {
222
+ (0, react_2.act)(function () {
223
223
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_HTML, params: { html: html } });
224
224
  });
225
225
  expect((_a = result.current.html) === null || _a === void 0 ? void 0 : _a.innerHTML).toMatch(html);
@@ -227,7 +227,7 @@ describe('useAPI custom sandbox behavior', function () {
227
227
  it('should not fail on setHtml event with wrong id', function () {
228
228
  var result = setUp().result;
229
229
  var html = '<div>something</div>';
230
- (0, react_hooks_1.act)(function () {
230
+ (0, react_2.act)(function () {
231
231
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_HTML, params: { html: html, id: 'nonExist' } });
232
232
  });
233
233
  expect(htmlSanitizer).toHaveBeenCalledWith(html);
@@ -239,7 +239,7 @@ describe('useAPI custom sandbox behavior', function () {
239
239
  var popupBlock = document.createElement('div');
240
240
  popupBlock.innerHTML = popup;
241
241
  expect(result.current.popup).toBe(undefined);
242
- (0, react_hooks_1.act)(function () {
242
+ (0, react_2.act)(function () {
243
243
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SHOW_POPUP, params: popup });
244
244
  });
245
245
  expect(htmlSanitizer).toHaveBeenCalledWith(popup);
@@ -248,11 +248,11 @@ describe('useAPI custom sandbox behavior', function () {
248
248
  it('should return null popup on event hidePopup', function () {
249
249
  var result = setUp().result;
250
250
  var popup = '<div>something</div>';
251
- (0, react_hooks_1.act)(function () {
251
+ (0, react_2.act)(function () {
252
252
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SHOW_POPUP, params: popup });
253
253
  });
254
254
  expect(result.current.popup).not.toEqual(null);
255
- (0, react_hooks_1.act)(function () {
255
+ (0, react_2.act)(function () {
256
256
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.HIDE_POPUP, params: {} });
257
257
  });
258
258
  expect(result.current.popup).toEqual(null);
@@ -260,18 +260,18 @@ describe('useAPI custom sandbox behavior', function () {
260
260
  it('should change visible props on setVisibility event', function () {
261
261
  var result = setUp().result;
262
262
  var html = '<div>something</div>';
263
- (0, react_hooks_1.act)(function () {
263
+ (0, react_2.act)(function () {
264
264
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_HTML, params: { html: html } });
265
265
  });
266
266
  var htmlBlock = document.createElement('div');
267
267
  htmlBlock.innerHTML = html;
268
268
  expect(result.current.html).toEqual(htmlBlock);
269
269
  expect(result.current.visible).toBe(true);
270
- (0, react_hooks_1.act)(function () {
270
+ (0, react_2.act)(function () {
271
271
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_VISIBILITY, params: 'hidden' });
272
272
  });
273
273
  expect(result.current.visible).toBe(false);
274
- (0, react_hooks_1.act)(function () {
274
+ (0, react_2.act)(function () {
275
275
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_VISIBILITY, params: 'visible' });
276
276
  });
277
277
  expect(result.current.html).toEqual(htmlBlock);
@@ -281,7 +281,7 @@ describe('useAPI custom sandbox behavior', function () {
281
281
  setUp();
282
282
  var message = 'some data to console';
283
283
  var log = jest.spyOn(console, 'log');
284
- (0, react_hooks_1.act)(function () {
284
+ (0, react_2.act)(function () {
285
285
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.LOG, params: message });
286
286
  });
287
287
  expect(log).toHaveBeenCalledWith(message);
@@ -290,7 +290,7 @@ describe('useAPI custom sandbox behavior', function () {
290
290
  it('should change tooltip props on setToolTip event', function () {
291
291
  var result = setUp().result;
292
292
  var html = '<div>something</div>';
293
- (0, react_hooks_1.act)(function () {
293
+ (0, react_2.act)(function () {
294
294
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_HTML, params: { html: html } });
295
295
  });
296
296
  var htmlBlock = document.createElement('div');
@@ -298,7 +298,7 @@ describe('useAPI custom sandbox behavior', function () {
298
298
  expect(result.current.html).toEqual(htmlBlock);
299
299
  expect(result.current.tooltip).toBeNull();
300
300
  var tooltip = 'Tooltip value';
301
- (0, react_hooks_1.act)(function () {
301
+ (0, react_2.act)(function () {
302
302
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_TOOLTIP, params: tooltip });
303
303
  });
304
304
  expect(result.current.tooltip).toBe(tooltip);
@@ -307,7 +307,7 @@ describe('useAPI custom sandbox behavior', function () {
307
307
  it('should change styles on setHeight, setWidth, setEnabled', function () {
308
308
  var result = setUp().result;
309
309
  var html = '<div>something</div>';
310
- (0, react_hooks_1.act)(function () {
310
+ (0, react_2.act)(function () {
311
311
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_HTML, params: { html: html } });
312
312
  });
313
313
  var htmlBlock = document.createElement('div');
@@ -315,23 +315,23 @@ describe('useAPI custom sandbox behavior', function () {
315
315
  expect(result.current.html).toEqual(htmlBlock);
316
316
  expect(result.current.customStyles).toEqual({});
317
317
  var height = '200px';
318
- (0, react_hooks_1.act)(function () {
318
+ (0, react_2.act)(function () {
319
319
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_HEIGHT, params: height });
320
320
  });
321
321
  expect(result.current.customStyles).toEqual({ height: height });
322
322
  expect(result.current.html).toEqual(htmlBlock);
323
323
  var width = '400px';
324
- (0, react_hooks_1.act)(function () {
324
+ (0, react_2.act)(function () {
325
325
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_WIDTH, params: width });
326
326
  });
327
327
  expect(result.current.customStyles).toEqual({ height: height, width: width });
328
328
  expect(result.current.html).toEqual(htmlBlock);
329
- (0, react_hooks_1.act)(function () {
329
+ (0, react_2.act)(function () {
330
330
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_ENABLED, params: false });
331
331
  });
332
332
  expect(result.current.customStyles).toEqual({ height: height, width: width, 'pointer-events': 'none' });
333
333
  expect(result.current.html).toEqual(htmlBlock);
334
- (0, react_hooks_1.act)(function () {
334
+ (0, react_2.act)(function () {
335
335
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_ENABLED, params: true });
336
336
  });
337
337
  expect(result.current.customStyles).toEqual({ height: height, width: width });
@@ -340,17 +340,17 @@ describe('useAPI custom sandbox behavior', function () {
340
340
  it('should set message on message event and clean on close popup', function () {
341
341
  setUp();
342
342
  var message = 'hello';
343
- (0, react_hooks_1.act)(function () {
343
+ (0, react_2.act)(function () {
344
344
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.MESSAGE, params: message });
345
345
  });
346
346
  expect(showSnackbarMessage).toHaveBeenCalledWith(message);
347
347
  });
348
348
  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 () {
349
- var waitFor, result, params;
349
+ var result, params;
350
350
  return __generator(this, function (_a) {
351
351
  switch (_a.label) {
352
352
  case 0:
353
- waitFor = setUp().waitFor;
353
+ setUp();
354
354
  result = { errorMessage: 'URL is empty' };
355
355
  params = {
356
356
  name: mdm_sdk_1.RequestAction.API,
@@ -359,10 +359,10 @@ describe('useAPI custom sandbox behavior', function () {
359
359
  'Content-Type': 'application/json'
360
360
  }
361
361
  };
362
- (0, react_hooks_1.act)(function () {
362
+ (0, react_2.act)(function () {
363
363
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
364
364
  });
365
- return [4 /*yield*/, waitFor(function () {
365
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
366
366
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 0 } }, params));
367
367
  })];
368
368
  case 1:
@@ -373,12 +373,12 @@ describe('useAPI custom sandbox behavior', function () {
373
373
  });
374
374
  }); });
375
375
  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 () {
376
- var config, waitFor, result, params;
376
+ var config, result, params;
377
377
  return __generator(this, function (_a) {
378
378
  switch (_a.label) {
379
379
  case 0:
380
380
  config = (0, config_test_data_1.createConfig)({ permissions: ['/tenant'] });
381
- waitFor = setUp({ config: config }).waitFor;
381
+ setUp({ config: config });
382
382
  result = { errorMessage: 'Not enough permissions' };
383
383
  params = {
384
384
  name: mdm_sdk_1.RequestAction.API,
@@ -388,10 +388,10 @@ describe('useAPI custom sandbox behavior', function () {
388
388
  'Content-Type': 'application/json'
389
389
  }
390
390
  };
391
- (0, react_hooks_1.act)(function () {
391
+ (0, react_2.act)(function () {
392
392
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
393
393
  });
394
- return [4 /*yield*/, waitFor(function () {
394
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
395
395
  return expect(postMessage).toHaveBeenCalledWith(__assign(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 0 }, validationUrl: params.url }, params), { url: '/nui/reltioAPI/api/alenat/entity' }));
396
396
  })];
397
397
  case 1:
@@ -402,14 +402,14 @@ describe('useAPI custom sandbox behavior', function () {
402
402
  });
403
403
  }); });
404
404
  it('should send api request on action request and name api', function () { return __awaiter(void 0, void 0, void 0, function () {
405
- var result, config, waitFor, params;
405
+ var result, config, params;
406
406
  return __generator(this, function (_a) {
407
407
  switch (_a.label) {
408
408
  case 0:
409
409
  result = { success: 'message' };
410
410
  requestMock.mockResolvedValue(result);
411
411
  config = (0, config_test_data_1.createConfig)({ permissions: ['https://reltio.com'] });
412
- waitFor = setUp({ config: config }).waitFor;
412
+ setUp({ config: config });
413
413
  params = {
414
414
  name: mdm_sdk_1.RequestAction.API,
415
415
  id: '1',
@@ -418,10 +418,10 @@ describe('useAPI custom sandbox behavior', function () {
418
418
  'Content-Type': 'application/json'
419
419
  }
420
420
  };
421
- (0, react_hooks_1.act)(function () {
421
+ (0, react_2.act)(function () {
422
422
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
423
423
  });
424
- return [4 /*yield*/, waitFor(function () {
424
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
425
425
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
426
426
  })];
427
427
  case 1:
@@ -439,7 +439,7 @@ describe('useAPI custom sandbox behavior', function () {
439
439
  });
440
440
  }); });
441
441
  it('should send api request with access token', function () { return __awaiter(void 0, void 0, void 0, function () {
442
- var result, mdmValues, config, waitFor, params;
442
+ var result, mdmValues, config, params;
443
443
  return __generator(this, function (_a) {
444
444
  switch (_a.label) {
445
445
  case 0:
@@ -450,7 +450,7 @@ describe('useAPI custom sandbox behavior', function () {
450
450
  });
451
451
  mdmValues = __assign(__assign({}, defaultMdmValues), { servicesPath: '/nui/services' });
452
452
  config = (0, config_test_data_1.createConfig)({ permissions: ['https://reltio.com'] });
453
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
453
+ setUp({ mdmValues: mdmValues, config: config });
454
454
  params = {
455
455
  name: mdm_sdk_1.RequestAction.API,
456
456
  id: '1',
@@ -459,10 +459,10 @@ describe('useAPI custom sandbox behavior', function () {
459
459
  'Content-Type': 'application/json'
460
460
  }
461
461
  };
462
- (0, react_hooks_1.act)(function () {
462
+ (0, react_2.act)(function () {
463
463
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
464
464
  });
465
- return [4 /*yield*/, waitFor(function () {
465
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
466
466
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
467
467
  })];
468
468
  case 1:
@@ -481,7 +481,7 @@ describe('useAPI custom sandbox behavior', function () {
481
481
  });
482
482
  }); });
483
483
  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 () {
484
- var config, waitFor, params;
484
+ var config, params;
485
485
  return __generator(this, function (_a) {
486
486
  switch (_a.label) {
487
487
  case 0:
@@ -492,7 +492,7 @@ describe('useAPI custom sandbox behavior', function () {
492
492
  : Promise.reject({ error: '{"message": "some error"}' });
493
493
  });
494
494
  config = (0, config_test_data_1.createConfig)({ permissions: ['https://reltio.com'] });
495
- waitFor = setUp({ config: config }).waitFor;
495
+ setUp({ config: config });
496
496
  params = {
497
497
  name: mdm_sdk_1.RequestAction.API,
498
498
  id: '1',
@@ -501,10 +501,10 @@ describe('useAPI custom sandbox behavior', function () {
501
501
  'Content-Type': 'application/json'
502
502
  }
503
503
  };
504
- (0, react_hooks_1.act)(function () {
504
+ (0, react_2.act)(function () {
505
505
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
506
506
  });
507
- return [4 /*yield*/, waitFor(function () {
507
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
508
508
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: {
509
509
  data: {
510
510
  error: '{"message": "some error"}'
@@ -529,11 +529,11 @@ describe('useAPI custom sandbox behavior', function () {
529
529
  });
530
530
  }); });
531
531
  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 () {
532
- var waitFor, result, params;
532
+ var result, params;
533
533
  return __generator(this, function (_a) {
534
534
  switch (_a.label) {
535
535
  case 0:
536
- waitFor = setUp().waitFor;
536
+ setUp();
537
537
  result = { errorMessage: 'URL is empty' };
538
538
  params = {
539
539
  name: mdm_sdk_1.RequestAction.WORKFLOW,
@@ -542,10 +542,10 @@ describe('useAPI custom sandbox behavior', function () {
542
542
  'Content-Type': 'application/json'
543
543
  }
544
544
  };
545
- (0, react_hooks_1.act)(function () {
545
+ (0, react_2.act)(function () {
546
546
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
547
547
  });
548
- return [4 /*yield*/, waitFor(function () {
548
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
549
549
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 } }, params));
550
550
  })];
551
551
  case 1:
@@ -556,12 +556,12 @@ describe('useAPI custom sandbox behavior', function () {
556
556
  });
557
557
  }); });
558
558
  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 () {
559
- var config, waitFor, result, params;
559
+ var config, result, params;
560
560
  return __generator(this, function (_a) {
561
561
  switch (_a.label) {
562
562
  case 0:
563
563
  config = (0, config_test_data_1.createConfig)({ permissions: ['/tenant'] });
564
- waitFor = setUp({ config: config }).waitFor;
564
+ setUp({ config: config });
565
565
  result = { errorMessage: 'Not enough permissions' };
566
566
  params = {
567
567
  name: mdm_sdk_1.RequestAction.WORKFLOW,
@@ -571,10 +571,10 @@ describe('useAPI custom sandbox behavior', function () {
571
571
  'Content-Type': 'application/json'
572
572
  }
573
573
  };
574
- (0, react_hooks_1.act)(function () {
574
+ (0, react_2.act)(function () {
575
575
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
576
576
  });
577
- return [4 /*yield*/, waitFor(function () {
577
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
578
578
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
579
579
  })];
580
580
  case 1:
@@ -585,13 +585,13 @@ describe('useAPI custom sandbox behavior', function () {
585
585
  });
586
586
  }); });
587
587
  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 () {
588
- var mdmValues, config, waitFor, result, params;
588
+ var mdmValues, config, result, params;
589
589
  return __generator(this, function (_a) {
590
590
  switch (_a.label) {
591
591
  case 0:
592
592
  mdmValues = __assign(__assign({}, defaultMdmValues), { workflowPath: undefined });
593
593
  config = (0, config_test_data_1.createConfig)({ permissions: ['/entity'] });
594
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
594
+ setUp({ mdmValues: mdmValues, config: config });
595
595
  result = { errorMessage: 'Workflow path is not defined' };
596
596
  params = {
597
597
  name: mdm_sdk_1.RequestAction.WORKFLOW,
@@ -601,10 +601,10 @@ describe('useAPI custom sandbox behavior', function () {
601
601
  'Content-Type': 'application/json'
602
602
  }
603
603
  };
604
- (0, react_hooks_1.act)(function () {
604
+ (0, react_2.act)(function () {
605
605
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
606
606
  });
607
- return [4 /*yield*/, waitFor(function () {
607
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
608
608
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
609
609
  })];
610
610
  case 1:
@@ -615,14 +615,14 @@ describe('useAPI custom sandbox behavior', function () {
615
615
  });
616
616
  }); });
617
617
  it('should send api request on action request and name workflow', function () { return __awaiter(void 0, void 0, void 0, function () {
618
- var result, config, waitFor, params;
618
+ var result, config, params;
619
619
  return __generator(this, function (_a) {
620
620
  switch (_a.label) {
621
621
  case 0:
622
622
  result = { success: 'message' };
623
623
  requestMock.mockResolvedValue(result);
624
624
  config = (0, config_test_data_1.createConfig)({ permissions: ['/entity'] });
625
- waitFor = setUp({ config: config }).waitFor;
625
+ setUp({ config: config });
626
626
  params = {
627
627
  name: mdm_sdk_1.RequestAction.WORKFLOW,
628
628
  id: '1',
@@ -633,10 +633,10 @@ describe('useAPI custom sandbox behavior', function () {
633
633
  },
634
634
  data: { field1: 'some data' }
635
635
  };
636
- (0, react_hooks_1.act)(function () {
636
+ (0, react_2.act)(function () {
637
637
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
638
638
  });
639
- return [4 /*yield*/, waitFor(function () {
639
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
640
640
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
641
641
  })];
642
642
  case 1:
@@ -653,7 +653,7 @@ describe('useAPI custom sandbox behavior', function () {
653
653
  });
654
654
  }); });
655
655
  it('should send api request to workflow with access token', function () { return __awaiter(void 0, void 0, void 0, function () {
656
- var result, mdmValues, config, waitFor, params;
656
+ var result, mdmValues, config, params;
657
657
  return __generator(this, function (_a) {
658
658
  switch (_a.label) {
659
659
  case 0:
@@ -664,7 +664,7 @@ describe('useAPI custom sandbox behavior', function () {
664
664
  });
665
665
  mdmValues = __assign(__assign({}, defaultMdmValues), { servicesPath: '/nui/services' });
666
666
  config = (0, config_test_data_1.createConfig)({ permissions: ['/entity'] });
667
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
667
+ setUp({ mdmValues: mdmValues, config: config });
668
668
  params = {
669
669
  name: mdm_sdk_1.RequestAction.WORKFLOW,
670
670
  id: '1',
@@ -675,10 +675,10 @@ describe('useAPI custom sandbox behavior', function () {
675
675
  },
676
676
  data: { field1: 'some data' }
677
677
  };
678
- (0, react_hooks_1.act)(function () {
678
+ (0, react_2.act)(function () {
679
679
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
680
680
  });
681
- return [4 /*yield*/, waitFor(function () {
681
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
682
682
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
683
683
  })];
684
684
  case 1:
@@ -696,7 +696,7 @@ describe('useAPI custom sandbox behavior', function () {
696
696
  });
697
697
  }); });
698
698
  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 () {
699
- var config, waitFor, params;
699
+ var config, params;
700
700
  return __generator(this, function (_a) {
701
701
  switch (_a.label) {
702
702
  case 0:
@@ -707,7 +707,7 @@ describe('useAPI custom sandbox behavior', function () {
707
707
  : Promise.reject({ error: 'some error' });
708
708
  });
709
709
  config = (0, config_test_data_1.createConfig)({ permissions: ['https://tst-01-workflow.reltio.com'] });
710
- waitFor = setUp({ config: config }).waitFor;
710
+ setUp({ config: config });
711
711
  params = {
712
712
  name: mdm_sdk_1.RequestAction.WORKFLOW,
713
713
  id: '1',
@@ -716,10 +716,10 @@ describe('useAPI custom sandbox behavior', function () {
716
716
  'Content-Type': 'application/json'
717
717
  }
718
718
  };
719
- (0, react_hooks_1.act)(function () {
719
+ (0, react_2.act)(function () {
720
720
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
721
721
  });
722
- return [4 /*yield*/, waitFor(function () {
722
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
723
723
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: {
724
724
  data: { error: 'some error' },
725
725
  headers: params.headers,
@@ -740,11 +740,11 @@ describe('useAPI custom sandbox behavior', function () {
740
740
  });
741
741
  }); });
742
742
  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 () {
743
- var waitFor, result, params;
743
+ var result, params;
744
744
  return __generator(this, function (_a) {
745
745
  switch (_a.label) {
746
746
  case 0:
747
- waitFor = setUp().waitFor;
747
+ setUp();
748
748
  result = { errorMessage: 'processDefinitionId is empty' };
749
749
  params = {
750
750
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
@@ -753,10 +753,10 @@ describe('useAPI custom sandbox behavior', function () {
753
753
  'Content-Type': 'application/json'
754
754
  }
755
755
  };
756
- (0, react_hooks_1.act)(function () {
756
+ (0, react_2.act)(function () {
757
757
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
758
758
  });
759
- return [4 /*yield*/, waitFor(function () {
759
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
760
760
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 } }, params));
761
761
  })];
762
762
  case 1:
@@ -766,11 +766,11 @@ describe('useAPI custom sandbox behavior', function () {
766
766
  });
767
767
  }); });
768
768
  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 () {
769
- var waitFor, result, params;
769
+ var result, params;
770
770
  return __generator(this, function (_a) {
771
771
  switch (_a.label) {
772
772
  case 0:
773
- waitFor = setUp().waitFor;
773
+ setUp();
774
774
  result = { errorMessage: 'searchString is empty' };
775
775
  params = {
776
776
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
@@ -780,10 +780,10 @@ describe('useAPI custom sandbox behavior', function () {
780
780
  'Content-Type': 'application/json'
781
781
  }
782
782
  };
783
- (0, react_hooks_1.act)(function () {
783
+ (0, react_2.act)(function () {
784
784
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
785
785
  });
786
- return [4 /*yield*/, waitFor(function () {
786
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
787
787
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
788
788
  })];
789
789
  case 1:
@@ -793,12 +793,12 @@ describe('useAPI custom sandbox behavior', function () {
793
793
  });
794
794
  }); });
795
795
  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 () {
796
- var config, waitFor, result, params;
796
+ var config, result, params;
797
797
  return __generator(this, function (_a) {
798
798
  switch (_a.label) {
799
799
  case 0:
800
800
  config = (0, config_test_data_1.createConfig)({ permissions: ['/tenant'] });
801
- waitFor = setUp({ config: config }).waitFor;
801
+ setUp({ config: config });
802
802
  result = { errorMessage: 'Not enough permissions' };
803
803
  params = {
804
804
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
@@ -809,10 +809,10 @@ describe('useAPI custom sandbox behavior', function () {
809
809
  'Content-Type': 'application/json'
810
810
  }
811
811
  };
812
- (0, react_hooks_1.act)(function () {
812
+ (0, react_2.act)(function () {
813
813
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
814
814
  });
815
- return [4 /*yield*/, waitFor(function () {
815
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
816
816
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
817
817
  })];
818
818
  case 1:
@@ -823,13 +823,13 @@ describe('useAPI custom sandbox behavior', function () {
823
823
  });
824
824
  }); });
825
825
  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 () {
826
- var mdmValues, config, waitFor, result, params;
826
+ var mdmValues, config, result, params;
827
827
  return __generator(this, function (_a) {
828
828
  switch (_a.label) {
829
829
  case 0:
830
830
  mdmValues = __assign(__assign({}, defaultMdmValues), { workflowPath: undefined });
831
831
  config = (0, config_test_data_1.createConfig)({ permissions: ['/processInstances'] });
832
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
832
+ setUp({ mdmValues: mdmValues, config: config });
833
833
  result = { errorMessage: 'Workflow path is not defined' };
834
834
  params = {
835
835
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
@@ -840,10 +840,10 @@ describe('useAPI custom sandbox behavior', function () {
840
840
  'Content-Type': 'application/json'
841
841
  }
842
842
  };
843
- (0, react_hooks_1.act)(function () {
843
+ (0, react_2.act)(function () {
844
844
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
845
845
  });
846
- return [4 /*yield*/, waitFor(function () {
846
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
847
847
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
848
848
  })];
849
849
  case 1:
@@ -854,14 +854,14 @@ describe('useAPI custom sandbox behavior', function () {
854
854
  });
855
855
  }); });
856
856
  it('should send api request on action request and name workflow/startProcessFromQuery', function () { return __awaiter(void 0, void 0, void 0, function () {
857
- var result, config, waitFor, params;
857
+ var result, config, params;
858
858
  return __generator(this, function (_a) {
859
859
  switch (_a.label) {
860
860
  case 0:
861
861
  result = { success: 'message' };
862
862
  requestMock.mockResolvedValue(result);
863
863
  config = (0, config_test_data_1.createConfig)({ permissions: ['/processInstances'] });
864
- waitFor = setUp({ config: config }).waitFor;
864
+ setUp({ config: config });
865
865
  params = {
866
866
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_FROM_QUERY,
867
867
  id: '12',
@@ -871,10 +871,10 @@ describe('useAPI custom sandbox behavior', function () {
871
871
  'Content-Type': 'application/json'
872
872
  }
873
873
  };
874
- (0, react_hooks_1.act)(function () {
874
+ (0, react_2.act)(function () {
875
875
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
876
876
  });
877
- return [4 /*yield*/, waitFor(function () {
877
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
878
878
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
879
879
  })];
880
880
  case 1:
@@ -896,7 +896,7 @@ describe('useAPI custom sandbox behavior', function () {
896
896
  name: mdm_sdk_1.RequestAction.GET_CONFIGURATION,
897
897
  id: 23
898
898
  };
899
- (0, react_hooks_1.act)(function () {
899
+ (0, react_2.act)(function () {
900
900
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
901
901
  });
902
902
  expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: metadata }, params));
@@ -908,7 +908,7 @@ describe('useAPI custom sandbox behavior', function () {
908
908
  name: mdm_sdk_1.RequestAction.GET_UI_CONFIGURATION,
909
909
  id: 23
910
910
  };
911
- (0, react_hooks_1.act)(function () {
911
+ (0, react_2.act)(function () {
912
912
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
913
913
  });
914
914
  expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: config }, params));
@@ -930,13 +930,13 @@ describe('useAPI custom sandbox behavior', function () {
930
930
  id: 23,
931
931
  entityUri: 'entities/mnGg0XB'
932
932
  };
933
- (0, react_hooks_1.act)(function () {
933
+ (0, react_2.act)(function () {
934
934
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
935
935
  });
936
936
  expect(getResponseCall(postMessage)).toBeUndefined();
937
937
  expect(sandbox.setEntityUri).toHaveBeenCalledTimes(1);
938
938
  expect(sandbox.setEntityUri.mock.calls[0][0]).toBe(params.entityUri);
939
- (0, react_hooks_1.act)(function () {
939
+ (0, react_2.act)(function () {
940
940
  sandbox.setEntityUri.mock.calls[0][1](entity);
941
941
  });
942
942
  expect(getResponseCall(postMessage)).toEqual(__assign({ action: 'response', result: entity }, params));
@@ -950,7 +950,7 @@ describe('useAPI custom sandbox behavior', function () {
950
950
  perspective: 'test_perspective',
951
951
  id: 23
952
952
  };
953
- (0, react_hooks_1.act)(function () {
953
+ (0, react_2.act)(function () {
954
954
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
955
955
  });
956
956
  expect(sandbox.showPerspective).toHaveBeenCalledWith(params.perspective);
@@ -963,7 +963,7 @@ describe('useAPI custom sandbox behavior', function () {
963
963
  name: mdm_sdk_1.RequestAction.GET_PERSPECTIVE,
964
964
  id: 23
965
965
  };
966
- (0, react_hooks_1.act)(function () {
966
+ (0, react_2.act)(function () {
967
967
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
968
968
  });
969
969
  expect(sandbox.getCurrentPerspectiveId).toHaveBeenCalledTimes(1);
@@ -978,7 +978,7 @@ describe('useAPI custom sandbox behavior', function () {
978
978
  id: 23,
979
979
  permission: 'permission'
980
980
  };
981
- (0, react_hooks_1.act)(function () {
981
+ (0, react_2.act)(function () {
982
982
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
983
983
  });
984
984
  expect(workflowCheckPermission).toHaveBeenCalledTimes(1);
@@ -991,7 +991,7 @@ describe('useAPI custom sandbox behavior', function () {
991
991
  name: mdm_sdk_1.RequestAction.GET_SEARCH_QUERY,
992
992
  id: 23
993
993
  };
994
- (0, react_hooks_1.act)(function () {
994
+ (0, react_2.act)(function () {
995
995
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
996
996
  });
997
997
  expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: 'some search' }, params));
@@ -1007,7 +1007,7 @@ describe('useAPI custom sandbox behavior', function () {
1007
1007
  },
1008
1008
  id: 23
1009
1009
  };
1010
- (0, react_hooks_1.act)(function () {
1010
+ (0, react_2.act)(function () {
1011
1011
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1012
1012
  });
1013
1013
  expect(mdmActions.openSearch).toHaveBeenCalledWith({
@@ -1021,7 +1021,7 @@ describe('useAPI custom sandbox behavior', function () {
1021
1021
  searchState: undefined,
1022
1022
  id: 23
1023
1023
  };
1024
- (0, react_hooks_1.act)(function () {
1024
+ (0, react_2.act)(function () {
1025
1025
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1026
1026
  });
1027
1027
  expect(mdmActions.openSearch).toHaveBeenCalledWith({
@@ -1035,7 +1035,7 @@ describe('useAPI custom sandbox behavior', function () {
1035
1035
  name: mdm_sdk_1.RequestAction.GET_ENTITY_URI,
1036
1036
  id: 23
1037
1037
  };
1038
- (0, react_hooks_1.act)(function () {
1038
+ (0, react_2.act)(function () {
1039
1039
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1040
1040
  });
1041
1041
  expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: 'entities/mnGg0XB' }, params));
@@ -1046,7 +1046,7 @@ describe('useAPI custom sandbox behavior', function () {
1046
1046
  name: mdm_sdk_1.RequestAction.GET_ENTITY,
1047
1047
  id: 23
1048
1048
  };
1049
- (0, react_hooks_1.act)(function () {
1049
+ (0, react_2.act)(function () {
1050
1050
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1051
1051
  });
1052
1052
  expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: entity }, params));
@@ -1058,7 +1058,7 @@ describe('useAPI custom sandbox behavior', function () {
1058
1058
  name: mdm_sdk_1.RequestAction.GET_API_PATH,
1059
1059
  id: 23
1060
1060
  };
1061
- (0, react_hooks_1.act)(function () {
1061
+ (0, react_2.act)(function () {
1062
1062
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1063
1063
  });
1064
1064
  expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: 'https://tst-01.reltio.com/reltio' }, params));
@@ -1069,7 +1069,7 @@ describe('useAPI custom sandbox behavior', function () {
1069
1069
  name: mdm_sdk_1.RequestAction.WORKFLOW_GET_WORKFLOW_PATH,
1070
1070
  id: 23
1071
1071
  };
1072
- (0, react_hooks_1.act)(function () {
1072
+ (0, react_2.act)(function () {
1073
1073
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1074
1074
  });
1075
1075
  expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: 'https://tst-01-workflow.reltio.com/workflow-adapter' }, params));
@@ -1080,7 +1080,7 @@ describe('useAPI custom sandbox behavior', function () {
1080
1080
  name: mdm_sdk_1.RequestAction.GET_TENANT,
1081
1081
  id: 23
1082
1082
  };
1083
- (0, react_hooks_1.act)(function () {
1083
+ (0, react_2.act)(function () {
1084
1084
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1085
1085
  });
1086
1086
  expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: 'alenat' }, params));
@@ -1091,7 +1091,7 @@ describe('useAPI custom sandbox behavior', function () {
1091
1091
  name: mdm_sdk_1.RequestAction.GET_USER,
1092
1092
  id: 23
1093
1093
  };
1094
- (0, react_hooks_1.act)(function () {
1094
+ (0, react_2.act)(function () {
1095
1095
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1096
1096
  });
1097
1097
  expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { username: 'alexey.starodubtsev' } }, params));
@@ -1105,7 +1105,7 @@ describe('useAPI custom sandbox behavior', function () {
1105
1105
  text: 'hello',
1106
1106
  id: 23
1107
1107
  };
1108
- (0, react_hooks_1.act)(function () {
1108
+ (0, react_2.act)(function () {
1109
1109
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1110
1110
  });
1111
1111
  expect(alert).toHaveBeenCalledWith(params.text);
@@ -1120,7 +1120,7 @@ describe('useAPI custom sandbox behavior', function () {
1120
1120
  text: 'hello',
1121
1121
  id: 23
1122
1122
  };
1123
- (0, react_hooks_1.act)(function () {
1123
+ (0, react_2.act)(function () {
1124
1124
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1125
1125
  });
1126
1126
  expect(confirm).toHaveBeenCalledWith(params.text);
@@ -1136,7 +1136,7 @@ describe('useAPI custom sandbox behavior', function () {
1136
1136
  defaultText: 'defaultText',
1137
1137
  id: 23
1138
1138
  };
1139
- (0, react_hooks_1.act)(function () {
1139
+ (0, react_2.act)(function () {
1140
1140
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1141
1141
  });
1142
1142
  expect(prompt).toHaveBeenCalledWith(params.text, params.defaultText);
@@ -1151,7 +1151,7 @@ describe('useAPI custom sandbox behavior', function () {
1151
1151
  url: 'https://reltio.com',
1152
1152
  id: 23
1153
1153
  };
1154
- (0, react_hooks_1.act)(function () {
1154
+ (0, react_2.act)(function () {
1155
1155
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1156
1156
  });
1157
1157
  expect(openWindow).toHaveBeenCalledWith(params.url, '_blank');
@@ -1171,7 +1171,7 @@ describe('useAPI custom sandbox behavior', function () {
1171
1171
  var params = {
1172
1172
  name: mdm_sdk_1.RequestAction.RELOAD_PAGE
1173
1173
  };
1174
- (0, react_hooks_1.act)(function () {
1174
+ (0, react_2.act)(function () {
1175
1175
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1176
1176
  });
1177
1177
  expect(window.location.reload).toHaveBeenCalled();
@@ -1191,11 +1191,11 @@ describe('useAPI custom sandbox behavior', function () {
1191
1191
  expect(interceptors.finishInterceptorInit).toHaveBeenCalledTimes(1);
1192
1192
  });
1193
1193
  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 () {
1194
- var waitFor, result, params;
1194
+ var result, params;
1195
1195
  return __generator(this, function (_a) {
1196
1196
  switch (_a.label) {
1197
1197
  case 0:
1198
- waitFor = setUp().waitFor;
1198
+ setUp();
1199
1199
  result = { errorMessage: 'processDefinitionId is empty' };
1200
1200
  params = {
1201
1201
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
@@ -1204,10 +1204,10 @@ describe('useAPI custom sandbox behavior', function () {
1204
1204
  'Content-Type': 'application/json'
1205
1205
  }
1206
1206
  };
1207
- (0, react_hooks_1.act)(function () {
1207
+ (0, react_2.act)(function () {
1208
1208
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1209
1209
  });
1210
- return [4 /*yield*/, waitFor(function () {
1210
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
1211
1211
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 } }, params));
1212
1212
  })];
1213
1213
  case 1:
@@ -1217,11 +1217,11 @@ describe('useAPI custom sandbox behavior', function () {
1217
1217
  });
1218
1218
  }); });
1219
1219
  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 () {
1220
- var waitFor, result, params;
1220
+ var result, params;
1221
1221
  return __generator(this, function (_a) {
1222
1222
  switch (_a.label) {
1223
1223
  case 0:
1224
- waitFor = setUp().waitFor;
1224
+ setUp();
1225
1225
  result = { errorMessage: 'changeRequestURI is empty' };
1226
1226
  params = {
1227
1227
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
@@ -1231,10 +1231,10 @@ describe('useAPI custom sandbox behavior', function () {
1231
1231
  'Content-Type': 'application/json'
1232
1232
  }
1233
1233
  };
1234
- (0, react_hooks_1.act)(function () {
1234
+ (0, react_2.act)(function () {
1235
1235
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1236
1236
  });
1237
- return [4 /*yield*/, waitFor(function () {
1237
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
1238
1238
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
1239
1239
  })];
1240
1240
  case 1:
@@ -1244,12 +1244,12 @@ describe('useAPI custom sandbox behavior', function () {
1244
1244
  });
1245
1245
  }); });
1246
1246
  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 () {
1247
- var config, waitFor, result, params;
1247
+ var config, result, params;
1248
1248
  return __generator(this, function (_a) {
1249
1249
  switch (_a.label) {
1250
1250
  case 0:
1251
1251
  config = (0, config_test_data_1.createConfig)({ permissions: ['/tenant'] });
1252
- waitFor = setUp({ config: config }).waitFor;
1252
+ setUp({ config: config });
1253
1253
  result = { errorMessage: 'Not enough permissions' };
1254
1254
  params = {
1255
1255
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
@@ -1261,10 +1261,10 @@ describe('useAPI custom sandbox behavior', function () {
1261
1261
  'Content-Type': 'application/json'
1262
1262
  }
1263
1263
  };
1264
- (0, react_hooks_1.act)(function () {
1264
+ (0, react_2.act)(function () {
1265
1265
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1266
1266
  });
1267
- return [4 /*yield*/, waitFor(function () {
1267
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
1268
1268
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
1269
1269
  })];
1270
1270
  case 1:
@@ -1275,13 +1275,13 @@ describe('useAPI custom sandbox behavior', function () {
1275
1275
  });
1276
1276
  }); });
1277
1277
  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 () {
1278
- var mdmValues, config, waitFor, result, params;
1278
+ var mdmValues, config, result, params;
1279
1279
  return __generator(this, function (_a) {
1280
1280
  switch (_a.label) {
1281
1281
  case 0:
1282
1282
  mdmValues = __assign(__assign({}, defaultMdmValues), { workflowPath: undefined });
1283
1283
  config = (0, config_test_data_1.createConfig)({ permissions: ['/processInstances'] });
1284
- waitFor = setUp({ mdmValues: mdmValues, config: config }).waitFor;
1284
+ setUp({ mdmValues: mdmValues, config: config });
1285
1285
  result = { errorMessage: 'Workflow path is not defined' };
1286
1286
  params = {
1287
1287
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
@@ -1293,10 +1293,10 @@ describe('useAPI custom sandbox behavior', function () {
1293
1293
  'Content-Type': 'application/json'
1294
1294
  }
1295
1295
  };
1296
- (0, react_hooks_1.act)(function () {
1296
+ (0, react_2.act)(function () {
1297
1297
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1298
1298
  });
1299
- return [4 /*yield*/, waitFor(function () {
1299
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
1300
1300
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
1301
1301
  })];
1302
1302
  case 1:
@@ -1307,14 +1307,14 @@ describe('useAPI custom sandbox behavior', function () {
1307
1307
  });
1308
1308
  }); });
1309
1309
  it('should send api request on action request and name workflow/startProcessInstance', function () { return __awaiter(void 0, void 0, void 0, function () {
1310
- var result, config, waitFor, params;
1310
+ var result, config, params;
1311
1311
  return __generator(this, function (_a) {
1312
1312
  switch (_a.label) {
1313
1313
  case 0:
1314
1314
  result = { success: 'message' };
1315
1315
  requestMock.mockResolvedValue(result);
1316
1316
  config = (0, config_test_data_1.createConfig)({ permissions: ['/processInstances'] });
1317
- waitFor = setUp({ config: config }).waitFor;
1317
+ setUp({ config: config });
1318
1318
  params = {
1319
1319
  name: mdm_sdk_1.RequestAction.WORKFLOW_START_PROCESS_INSTANCE,
1320
1320
  id: '12',
@@ -1325,10 +1325,10 @@ describe('useAPI custom sandbox behavior', function () {
1325
1325
  'Content-Type': 'application/json'
1326
1326
  }
1327
1327
  };
1328
- (0, react_hooks_1.act)(function () {
1328
+ (0, react_2.act)(function () {
1329
1329
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.REQUEST, params: params });
1330
1330
  });
1331
- return [4 /*yield*/, waitFor(function () {
1331
+ return [4 /*yield*/, (0, react_2.waitFor)(function () {
1332
1332
  return expect(postMessage).toHaveBeenCalledWith(__assign({ action: 'response', result: { data: result, headers: params.headers, status: 200 }, validationUrl: params.url }, params));
1333
1333
  })];
1334
1334
  case 1:
@@ -1377,7 +1377,7 @@ describe('useAPI custom sandbox behavior', function () {
1377
1377
  var updateMdmValues = setUp().updateMdmValues;
1378
1378
  expect(postMessage).toHaveBeenCalledWith(getEvent('updateEntity', entity));
1379
1379
  var newEntity = { uri: 'entities/mnG123', type: 'configuration/entityTypes/HCP' };
1380
- (0, react_hooks_1.act)(function () {
1380
+ (0, react_2.act)(function () {
1381
1381
  updateMdmValues(function (prev) { return (__assign(__assign({}, prev), { entity: newEntity })); });
1382
1382
  });
1383
1383
  expect(getLastEventCall(postMessage, 'updateEntity')).toEqual(getEvent('updateEntity', newEntity));
@@ -1385,15 +1385,15 @@ describe('useAPI custom sandbox behavior', function () {
1385
1385
  it('should send editMode event on mode changes', function () {
1386
1386
  var updateMdmValues = setUp().updateMdmValues;
1387
1387
  expect(postMessage).toHaveBeenCalledWith(getEvent('editMode', false));
1388
- (0, react_hooks_1.act)(function () {
1388
+ (0, react_2.act)(function () {
1389
1389
  updateMdmValues(function (prev) { return (__assign(__assign({}, prev), { mode: mdm_sdk_1.Mode.Editing })); });
1390
1390
  });
1391
1391
  expect(getLastEventCall(postMessage, 'editMode')).toEqual(getEvent('editMode', true));
1392
- (0, react_hooks_1.act)(function () {
1392
+ (0, react_2.act)(function () {
1393
1393
  updateMdmValues(function (prev) { return (__assign(__assign({}, prev), { mode: mdm_sdk_1.Mode.Viewing })); });
1394
1394
  });
1395
1395
  expect(getLastEventCall(postMessage, 'editMode')).toEqual(getEvent('editMode', false));
1396
- (0, react_hooks_1.act)(function () {
1396
+ (0, react_2.act)(function () {
1397
1397
  updateMdmValues(function (prev) { return (__assign(__assign({}, prev), { mode: mdm_sdk_1.Mode.Suggesting })); });
1398
1398
  });
1399
1399
  expect(getLastEventCall(postMessage, 'editMode')).toEqual(getEvent('editMode', true));
@@ -1401,7 +1401,7 @@ describe('useAPI custom sandbox behavior', function () {
1401
1401
  it('should send changeSearchQuery event on searchQuery changes', function () {
1402
1402
  var updateMdmValues = setUp().updateMdmValues;
1403
1403
  expect(postMessage).toHaveBeenCalledWith(getEvent('changeSearchQuery', searchProviderData.data.query));
1404
- (0, react_hooks_1.act)(function () {
1404
+ (0, react_2.act)(function () {
1405
1405
  var searchProviderData = { data: { query: 'other' }, type: 'search' };
1406
1406
  updateMdmValues(function (prev) { return (__assign(__assign({}, prev), { searchProviderData: searchProviderData })); });
1407
1407
  });
@@ -1410,11 +1410,11 @@ describe('useAPI custom sandbox behavior', function () {
1410
1410
  it('should send changeVisibility event on visibility changes', function () {
1411
1411
  setUp();
1412
1412
  expect(getLastEventCall(postMessage, 'changeVisibility')).toEqual(getEvent('changeVisibility', true));
1413
- (0, react_hooks_1.act)(function () {
1413
+ (0, react_2.act)(function () {
1414
1414
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_VISIBILITY, params: 'hidden' });
1415
1415
  });
1416
1416
  expect(getLastEventCall(postMessage, 'changeVisibility')).toEqual(getEvent('changeVisibility', false));
1417
- (0, react_hooks_1.act)(function () {
1417
+ (0, react_2.act)(function () {
1418
1418
  onmessageFromWorker({ action: mdm_sdk_1.CustomAction.SET_VISIBILITY, params: 'visible' });
1419
1419
  });
1420
1420
  expect(getLastEventCall(postMessage, 'changeVisibility')).toEqual(getEvent('changeVisibility', true));