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