@reltio/components 1.4.1944 → 1.4.1946
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/cjs/AttributeListItem/AttributeListItem.spec.js +4 -4
- package/cjs/AttributesErrorsPanel/components/Error/Error.specs.js +1 -1
- package/cjs/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +8 -8
- package/cjs/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +2 -2
- package/cjs/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +3 -3
- package/cjs/AttributesFiltersButton/AttributesFiltersButton.test.js +1 -1
- package/cjs/AttributesView/AttributesView.d.ts +2 -1
- package/cjs/AttributesView/AttributesView.js +4 -2
- package/cjs/AttributesView/AttributesView.test.js +32 -0
- package/cjs/AutoSizeList/AutoSizeList.test.js +27 -30
- package/cjs/BasicTable/BasicTable.test.js +26 -5
- package/cjs/BasicTable/IntegrationBasicTable.test.js +16 -5
- package/cjs/BasicTable/helpers.test.js +1 -1
- package/cjs/CollapseRowButton/CollapseRowButton.test.js +3 -3
- package/cjs/CommentsContainer/CommentsContainer.test.js +2 -2
- package/cjs/CustomDateRangeEditor/CustomDateRangeEditor.test.js +2 -2
- package/cjs/DataTypeValue/DataTypeValue.test.js +2 -25
- package/cjs/DataTypeValueEditor/useEditorContext.test.js +2 -2
- package/cjs/DependentLookupEditor/DependentLookupEditor.test.js +116 -70
- package/cjs/DropDownEditor/DropDownEditor.test.js +1 -1
- package/cjs/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +4 -27
- package/cjs/EditModeAttributesList/EditModeAttributesList.d.ts +1 -1
- package/cjs/EditModeAttributesList/EditModeAttributesList.js +16 -5
- package/cjs/EditModeAttributesList/EditModeAttributesList.test.js +7 -4
- package/cjs/EditModeAttributesPager/EditModeAttributesPager.js +1 -2
- package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +4 -1
- package/cjs/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +28 -37
- package/cjs/EntitySelector/EntitySelector.test.js +13 -42
- package/cjs/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +1 -1
- package/cjs/EntitySelector/components/EntityOption/EntityOption.test.js +1 -1
- package/cjs/EntitySelector/components/Group/Group.test.js +1 -1
- package/cjs/EntityUriLink/EntityUriLink.test.js +1 -0
- package/cjs/ErrorBoundary/ErrorBoundary.test.js +2 -0
- package/cjs/ExpandedValueTooltip/ExpandedValueTooltip.test.js +4 -1
- package/cjs/FilterButton/FilterButton.test.js +1 -1
- package/cjs/HOCs/withFilter/components/ColumnFilter/ColumnFilter.spec.js +3 -3
- package/cjs/HOCs/withTableContext/withTableContext.test.js +1 -1
- package/cjs/HierarchyNodeTitle/HierarchyNodeTitle.test.js +4 -27
- package/cjs/HierarchyNodeTitle/useEntityDetails.test.js +18 -32
- package/cjs/ImageAttributesGallery/ImageAttributesGallery.test.js +6 -4
- package/cjs/ImageAttributesGallery/components/HeaderRight/HeaderRight.test.js +1 -1
- package/cjs/ImageAttributesLine/ImageAttributesLine.test.js +110 -68
- package/cjs/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +4 -4
- package/cjs/ImageGalleryDialog/ImageGalleryDialog.specs.js +3 -3
- package/cjs/ImportButton/ImportButton.test.js +1 -1
- package/cjs/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +1 -1
- package/cjs/InlineAttributesPager/components/InlineSimpleAttributesBlock/InlineSimpleAttributesBlock.test.js +1 -1
- package/cjs/InlineComplexAttribute/InlineComplexAttribute.test.js +3 -3
- package/cjs/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +31 -22
- package/cjs/LineChart/LineChart.test.js +1 -1
- package/cjs/Link/Link.test.js +1 -0
- package/cjs/LookupEditor/LookupEditor.test.js +3 -3
- package/cjs/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +1 -1
- package/cjs/MapChart/MapChart.test.js +3 -3
- package/cjs/MetadataTypesSelector/MetadataTypesSelector.test.js +3 -3
- package/cjs/MoreAttributesButton/MoreAttributesButton.test.js +1 -1
- package/cjs/MultipleInput/MultipleInput.test.js +11 -11
- package/cjs/MultipliableSelect/MultipliableSelect.test.js +14 -8
- package/cjs/NestedAttributeEditor/NestedAttributeEditor.test.js +4 -27
- package/cjs/NumberEditor/NumberEditor.test.js +4 -4
- package/cjs/PieChart/PieChart.test.js +1 -1
- package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.js +11 -34
- package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +4 -30
- package/cjs/PivotingUriLink/PivotingUriLink.spec.js +1 -0
- package/cjs/ProfileBandNavigation/useSearchNavigation.test.js +3 -3
- package/cjs/ProfilesList/ProfilesList.spec.js +1 -1
- package/cjs/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +1 -1
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +2 -2
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.js +6 -4
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -1
- package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +11 -2
- package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.d.ts +9 -0
- package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.js +20 -0
- package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/index.d.ts +1 -0
- package/cjs/ReadOnlyAttributesPager/components/EmptyRenderer/index.js +5 -0
- package/cjs/ReadOnlyAttributesPager/styles.d.ts +1 -0
- package/cjs/ReadOnlyAttributesPager/styles.js +5 -1
- package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +6 -30
- package/cjs/RelationEditor/IntegrationRelationEditor.test.js +1 -1
- package/cjs/RelationEditor/RelationEditor.test.js +20 -44
- package/cjs/ReltioMap/ReltioMap.spec.js +10 -8
- package/cjs/ReltioMap/components/EntityMarker/EntityMarker.spec.js +2 -26
- package/cjs/ScrollableTabs/ScrollableTabs.test.js +1 -1
- package/cjs/SearchInput/SearchInput.spec.js +2 -2
- package/cjs/SelectionPopup/SelectionPopup.spec.js +9 -12
- package/cjs/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +4 -4
- package/cjs/ShowLess/ShowLess.test.js +1 -1
- package/cjs/ShowMore/ShowMore.test.js +2 -2
- package/cjs/SideButtonsPanel/SideButtonsPanel.spec.js +3 -3
- package/cjs/SimpleAttribute/IntegrationSimpleAttribute.test.js +15 -34
- package/cjs/SimpleDropDownSelector/SimpleDropDownSelector.test.js +1 -1
- package/cjs/TableWithBars/TableWithBars.test.js +1 -1
- package/cjs/TreeChart/TreeChart.test.js +1 -1
- package/cjs/TypeaheadEditor/TypeaheadEditor.test.js +8 -1
- package/cjs/UploadFileButton/UploadFileButton.spec.js +103 -69
- package/cjs/VerticalHeadingsTable/components/TableCellWithDnd/TableCellWithDnd.test.js +4 -1
- package/cjs/VerticalHeadingsTable/components/TableRowWithDnd/TableRowWithDnd.test.js +3 -1
- package/cjs/constants/attributes.d.ts +1 -1
- package/cjs/constants/attributes.js +2 -2
- package/cjs/constants/index.d.ts +1 -1
- package/cjs/constants/index.js +2 -2
- package/cjs/contexts/AllwaysVisibleAttributesContext/index.d.ts +2 -0
- package/cjs/contexts/AllwaysVisibleAttributesContext/index.js +6 -0
- package/cjs/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +2 -2
- package/cjs/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +1 -25
- package/cjs/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +1 -25
- package/cjs/features/activity-log/ActivityLog/ActivityLog.test.js +4 -0
- package/cjs/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +1 -1
- package/cjs/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +1 -2
- package/cjs/features/crosswalks/AttributesTable/AttributesTable.test.js +13 -13
- package/cjs/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +5 -5
- package/cjs/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +4 -4
- package/cjs/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +5 -5
- package/cjs/features/crosswalks/AttributesTable/components/WinnerSourcesRenderer/WinnerSourcesRenderer.test.js +2 -2
- package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.d.ts +2 -2
- package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.js +27 -4
- package/cjs/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +15 -16
- package/cjs/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +1 -1
- package/cjs/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +2 -2
- package/cjs/features/crosswalks/hooks/useAttributeActions.test.js +95 -118
- package/cjs/features/crosswalks/hooks/useCrosswalkActions.test.js +38 -61
- package/cjs/features/crosswalks/hooks/useModifiedEntity.test.js +8 -8
- package/cjs/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +2 -2
- package/cjs/features/history/ContributorsPanel/components/ContributorItem/ContributorItem.specs.js +5 -26
- package/cjs/features/history/HistoryGraph/components/HistoryLink/HistoryLink.specs.js +2 -2
- package/cjs/features/history/HistoryRow/HistoryRow.specs.js +2 -26
- package/cjs/features/history/HistoryTree/HistoryTree.specs.js +1 -1
- package/cjs/features/history/HistoryView/HistoryView.specs.js +1 -1
- package/cjs/features/history/helpers/filters.test.js +6 -6
- package/cjs/features/history/hooks/useHistory.test.js +23 -48
- package/cjs/features/workflow/AddWorkflowDialog/AddWorkflowDialog.spec.js +24 -8
- package/cjs/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -26
- package/cjs/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +4 -30
- package/cjs/features/workflow/hooks/useChangeRequest.specs.js +11 -36
- package/cjs/helpers/attributesView.d.ts +1 -1
- package/cjs/helpers/attributesView.js +2 -2
- package/cjs/helpers/customScript.test.js +19 -19
- package/cjs/hooks/useAPI/useAPI.test.js +12 -12
- package/cjs/hooks/useBasicTableCellRenderer/CellRenderer.test.js +2 -1
- package/cjs/hooks/useCollapsibleTableRows/dataHelpers.test.js +1 -1
- package/cjs/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
- package/cjs/hooks/useConfigPermissions/useConfigPermissions.specs.js +5 -29
- package/cjs/hooks/useCustomScripts/useCustomScripts.test.js +8 -8
- package/cjs/hooks/useLayoutResetter/useLayoutResetter.test.js +8 -8
- package/cjs/hooks/useMarkers/helpers.js +1 -2
- package/cjs/hooks/useReadableSearchState/useReadableSearchState.test.js +14 -44
- package/cjs/hooks/useRelationsLoader/useRelationsLoader.specs.js +3 -4
- package/cjs/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +4 -4
- package/cjs/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
- package/cjs/hooks/useSnackbar/useSnackbar.test.js +24 -17
- package/esm/AttributeListItem/AttributeListItem.spec.js +4 -4
- package/esm/AttributesErrorsPanel/components/Error/Error.specs.js +1 -1
- package/esm/AttributesFiltersBuilder/AttributesFiltersBuilder.test.js +8 -8
- package/esm/AttributesFiltersBuilder/components/AttributeSelector/AttributeSelector.test.js +2 -2
- package/esm/AttributesFiltersBuilder/components/RowActions/RowActions.test.js +3 -3
- package/esm/AttributesFiltersButton/AttributesFiltersButton.test.js +1 -1
- package/esm/AttributesView/AttributesView.d.ts +2 -1
- package/esm/AttributesView/AttributesView.js +4 -2
- package/esm/AttributesView/AttributesView.test.js +32 -0
- package/esm/AutoSizeList/AutoSizeList.test.js +28 -31
- package/esm/BasicTable/BasicTable.test.js +26 -5
- package/esm/BasicTable/IntegrationBasicTable.test.js +17 -6
- package/esm/BasicTable/helpers.test.js +1 -1
- package/esm/CollapseRowButton/CollapseRowButton.test.js +3 -3
- package/esm/CommentsContainer/CommentsContainer.test.js +2 -2
- package/esm/CustomDateRangeEditor/CustomDateRangeEditor.test.js +2 -2
- package/esm/DataTypeValue/DataTypeValue.test.js +2 -2
- package/esm/DataTypeValueEditor/useEditorContext.test.js +2 -2
- package/esm/DependentLookupEditor/DependentLookupEditor.test.js +116 -70
- package/esm/DropDownEditor/DropDownEditor.test.js +1 -1
- package/esm/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.js +4 -4
- package/esm/EditModeAttributesList/EditModeAttributesList.d.ts +1 -1
- package/esm/EditModeAttributesList/EditModeAttributesList.js +17 -6
- package/esm/EditModeAttributesList/EditModeAttributesList.test.js +5 -2
- package/esm/EditModeAttributesPager/EditModeAttributesPager.js +1 -2
- package/esm/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +4 -1
- package/esm/EditModeAttributesView/IntegrationEditModeAttributesView.test.js +30 -16
- package/esm/EntitySelector/EntitySelector.test.js +13 -19
- package/esm/EntitySelector/components/ClearIndicator/ClearIndicator.test.js +1 -1
- package/esm/EntitySelector/components/EntityOption/EntityOption.test.js +1 -1
- package/esm/EntitySelector/components/Group/Group.test.js +1 -1
- package/esm/EntityUriLink/EntityUriLink.test.js +1 -0
- package/esm/ErrorBoundary/ErrorBoundary.test.js +2 -0
- package/esm/ExpandedValueTooltip/ExpandedValueTooltip.test.js +4 -1
- package/esm/FilterButton/FilterButton.test.js +1 -1
- package/esm/HOCs/withFilter/components/ColumnFilter/ColumnFilter.spec.js +3 -3
- package/esm/HOCs/withTableContext/withTableContext.test.js +1 -1
- package/esm/HierarchyNodeTitle/HierarchyNodeTitle.test.js +4 -4
- package/esm/HierarchyNodeTitle/useEntityDetails.test.js +19 -10
- package/esm/ImageAttributesGallery/ImageAttributesGallery.test.js +6 -4
- package/esm/ImageAttributesGallery/components/HeaderRight/HeaderRight.test.js +1 -1
- package/esm/ImageAttributesLine/ImageAttributesLine.test.js +110 -68
- package/esm/ImageAttributesLineEditor/ImageAttributesLineEditor.test.js +4 -4
- package/esm/ImageGalleryDialog/ImageGalleryDialog.specs.js +3 -3
- package/esm/ImportButton/ImportButton.test.js +1 -1
- package/esm/InlineAttributesPager/components/InlineNestedAttributesBlock/InlineNestedAttributesBlock.test.js +1 -1
- package/esm/InlineAttributesPager/components/InlineSimpleAttributesBlock/InlineSimpleAttributesBlock.test.js +1 -1
- package/esm/InlineComplexAttribute/InlineComplexAttribute.test.js +3 -3
- package/esm/InlineSimpleAttribute/InlineSimpleAttribute.spec.js +32 -23
- package/esm/LineChart/LineChart.test.js +1 -1
- package/esm/Link/Link.test.js +1 -0
- package/esm/LookupEditor/LookupEditor.test.js +3 -3
- package/esm/LookupEditor/components/GroupedDropDownEditor/GroupedDropDownEditor.test.js +1 -1
- package/esm/MapChart/MapChart.test.js +3 -3
- package/esm/MetadataTypesSelector/MetadataTypesSelector.test.js +3 -3
- package/esm/MoreAttributesButton/MoreAttributesButton.test.js +1 -1
- package/esm/MultipleInput/MultipleInput.test.js +11 -11
- package/esm/MultipliableSelect/MultipliableSelect.test.js +14 -8
- package/esm/NestedAttributeEditor/NestedAttributeEditor.test.js +4 -4
- package/esm/NumberEditor/NumberEditor.test.js +4 -4
- package/esm/PieChart/PieChart.test.js +1 -1
- package/esm/PivotingTooltip/IntegrationPivotingTooltip.test.js +11 -11
- package/esm/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +4 -7
- package/esm/PivotingUriLink/PivotingUriLink.spec.js +1 -0
- package/esm/ProfileBandNavigation/useSearchNavigation.test.js +3 -3
- package/esm/ProfilesList/ProfilesList.spec.js +1 -1
- package/esm/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +1 -1
- package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +2 -2
- package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.js +7 -5
- package/esm/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +1 -1
- package/esm/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +12 -3
- package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.d.ts +9 -0
- package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/EmptyRenderer.js +13 -0
- package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/index.d.ts +1 -0
- package/esm/ReadOnlyAttributesPager/components/EmptyRenderer/index.js +1 -0
- package/esm/ReadOnlyAttributesPager/styles.d.ts +1 -0
- package/esm/ReadOnlyAttributesPager/styles.js +4 -0
- package/esm/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +7 -8
- package/esm/RelationEditor/IntegrationRelationEditor.test.js +1 -1
- package/esm/RelationEditor/RelationEditor.test.js +21 -22
- package/esm/ReltioMap/ReltioMap.spec.js +11 -9
- package/esm/ReltioMap/components/EntityMarker/EntityMarker.spec.js +3 -4
- package/esm/ScrollableTabs/ScrollableTabs.test.js +1 -1
- package/esm/SearchInput/SearchInput.spec.js +2 -2
- package/esm/SelectionPopup/SelectionPopup.spec.js +9 -12
- package/esm/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +4 -4
- package/esm/ShowLess/ShowLess.test.js +1 -1
- package/esm/ShowMore/ShowMore.test.js +2 -2
- package/esm/SideButtonsPanel/SideButtonsPanel.spec.js +3 -3
- package/esm/SimpleAttribute/IntegrationSimpleAttribute.test.js +16 -12
- package/esm/SimpleDropDownSelector/SimpleDropDownSelector.test.js +1 -1
- package/esm/TableWithBars/TableWithBars.test.js +1 -1
- package/esm/TreeChart/TreeChart.test.js +1 -1
- package/esm/TypeaheadEditor/TypeaheadEditor.test.js +8 -1
- package/esm/UploadFileButton/UploadFileButton.spec.js +103 -69
- package/esm/VerticalHeadingsTable/components/TableCellWithDnd/TableCellWithDnd.test.js +4 -1
- package/esm/VerticalHeadingsTable/components/TableRowWithDnd/TableRowWithDnd.test.js +3 -1
- package/esm/constants/attributes.d.ts +1 -1
- package/esm/constants/attributes.js +1 -1
- package/esm/constants/index.d.ts +1 -1
- package/esm/constants/index.js +1 -1
- package/esm/contexts/AllwaysVisibleAttributesContext/index.d.ts +2 -0
- package/esm/contexts/AllwaysVisibleAttributesContext/index.js +3 -0
- package/esm/features/activity-log/ActivitiesFactory/components/SearchActivity/SearchActivity.test.js +2 -2
- package/esm/features/activity-log/ActivityExportButton/ActivityExportButton.specs.js +1 -2
- package/esm/features/activity-log/ActivityFilterEditor/components/EntityChangedSelectors/EntityChangedSelectors.specs.js +2 -3
- package/esm/features/activity-log/ActivityLog/ActivityLog.test.js +4 -0
- package/esm/features/activity-log/ActivityLog/components/GroupItem/GroupItem.test.js +1 -1
- package/esm/features/activity-log/ActivityLogFilter/ActivityLogFilter.specs.js +1 -2
- package/esm/features/crosswalks/AttributesTable/AttributesTable.test.js +13 -13
- package/esm/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +5 -5
- package/esm/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +4 -4
- package/esm/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +5 -5
- package/esm/features/crosswalks/AttributesTable/components/WinnerSourcesRenderer/WinnerSourcesRenderer.test.js +2 -2
- package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.d.ts +2 -2
- package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.js +4 -3
- package/esm/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +15 -16
- package/esm/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +1 -1
- package/esm/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +2 -2
- package/esm/features/crosswalks/hooks/useAttributeActions.test.js +95 -95
- package/esm/features/crosswalks/hooks/useCrosswalkActions.test.js +38 -38
- package/esm/features/crosswalks/hooks/useModifiedEntity.test.js +8 -8
- package/esm/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.test.js +2 -2
- package/esm/features/history/ContributorsPanel/components/ContributorItem/ContributorItem.specs.js +5 -3
- package/esm/features/history/HistoryGraph/components/HistoryLink/HistoryLink.specs.js +2 -2
- package/esm/features/history/HistoryRow/HistoryRow.specs.js +2 -3
- package/esm/features/history/HistoryTree/HistoryTree.specs.js +1 -1
- package/esm/features/history/HistoryView/HistoryView.specs.js +1 -1
- package/esm/features/history/helpers/filters.test.js +6 -6
- package/esm/features/history/hooks/useHistory.test.js +23 -25
- package/esm/features/workflow/AddWorkflowDialog/AddWorkflowDialog.spec.js +25 -9
- package/esm/features/workflow/AssigneeSelector/AssigneeSelector.spec.js +1 -3
- package/esm/features/workflow/WorkflowTaskCard/components/GenericWorkflowTaskCard/GenericWorkflowTaskCard.spec.js +5 -8
- package/esm/features/workflow/hooks/useChangeRequest.specs.js +11 -13
- package/esm/helpers/attributesView.d.ts +1 -1
- package/esm/helpers/attributesView.js +2 -2
- package/esm/helpers/customScript.test.js +19 -19
- package/esm/hooks/useAPI/useAPI.test.js +12 -12
- package/esm/hooks/useBasicTableCellRenderer/CellRenderer.test.js +2 -1
- package/esm/hooks/useCollapsibleTableRows/dataHelpers.test.js +1 -1
- package/esm/hooks/useCollapsibleTableRows/useCollapsibleTableRows.test.js +1 -1
- package/esm/hooks/useConfigPermissions/useConfigPermissions.specs.js +6 -7
- package/esm/hooks/useCustomScripts/useCustomScripts.test.js +8 -8
- package/esm/hooks/useLayoutResetter/useLayoutResetter.test.js +9 -9
- package/esm/hooks/useMarkers/helpers.js +1 -2
- package/esm/hooks/useReadableSearchState/useReadableSearchState.test.js +8 -15
- package/esm/hooks/useRelationsLoader/useRelationsLoader.specs.js +1 -2
- package/esm/hooks/useSavedStateForEntityType/useSavedStateForEntityType.test.js +4 -4
- package/esm/hooks/useScrollToAttributeError/useScrollToAttributeError.test.js +1 -1
- package/esm/hooks/useSnackbar/useSnackbar.test.js +25 -18
- package/package.json +2 -2
|
@@ -10,29 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -73,7 +50,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
73
50
|
var useCrosswalkActions_1 = require("./useCrosswalkActions");
|
|
74
51
|
var test_utils_1 = require("react-dom/test-utils");
|
|
75
52
|
var react_hooks_1 = require("@testing-library/react-hooks");
|
|
76
|
-
var
|
|
53
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
77
54
|
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { addCrosswalk: jest.fn(), addCrosswalkInContributor: jest.fn(), editCrosswalkAttribute: jest.fn(), deleteCrosswalkAttribute: jest.fn(), deleteCrosswalk: jest.fn() })); });
|
|
78
55
|
describe('useCrosswalkActions tests', function () {
|
|
79
56
|
var initialProps = {
|
|
@@ -88,7 +65,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
88
65
|
uri: 'entities/123',
|
|
89
66
|
type: 'configuration/entityTypes/HCP'
|
|
90
67
|
};
|
|
91
|
-
|
|
68
|
+
mdm_sdk_1.addCrosswalk.mockImplementation(function () {
|
|
92
69
|
return new Promise(function (_resolve) {
|
|
93
70
|
resolveSuccess = function () {
|
|
94
71
|
return _resolve([{ index: 0, object: { uri: 'relation/1', type: 'type', value: '1' }, successful: true }]);
|
|
@@ -98,7 +75,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
98
75
|
};
|
|
99
76
|
});
|
|
100
77
|
});
|
|
101
|
-
|
|
78
|
+
mdm_sdk_1.addCrosswalkInContributor.mockImplementation(function () {
|
|
102
79
|
return new Promise(function (_resolve) {
|
|
103
80
|
resolveSuccess = function () { return _resolve([{ index: 0, object: entity, successful: true }]); };
|
|
104
81
|
resolveError = function () {
|
|
@@ -106,7 +83,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
106
83
|
};
|
|
107
84
|
});
|
|
108
85
|
});
|
|
109
|
-
|
|
86
|
+
mdm_sdk_1.editCrosswalkAttribute.mockImplementation(function () {
|
|
110
87
|
return new Promise(function (_resolve) {
|
|
111
88
|
resolveSuccess = function () { return _resolve([{ index: 0, object: entity, successful: true }]); };
|
|
112
89
|
resolveError = function () {
|
|
@@ -114,7 +91,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
114
91
|
};
|
|
115
92
|
});
|
|
116
93
|
});
|
|
117
|
-
|
|
94
|
+
mdm_sdk_1.deleteCrosswalkAttribute.mockImplementation(function () {
|
|
118
95
|
return new Promise(function (_resolve) {
|
|
119
96
|
resolveSuccess = function () { return _resolve([{ index: 0, object: { status: 'success' }, successful: true }]); };
|
|
120
97
|
resolveError = function () {
|
|
@@ -122,18 +99,18 @@ describe('useCrosswalkActions tests', function () {
|
|
|
122
99
|
};
|
|
123
100
|
});
|
|
124
101
|
});
|
|
125
|
-
|
|
102
|
+
mdm_sdk_1.deleteCrosswalk.mockImplementation(function () {
|
|
126
103
|
return new Promise(function (_resolve, _reject) {
|
|
127
104
|
resolveSuccess = function () { return _resolve({ status: 'success' }); };
|
|
128
105
|
resolveError = function () { return _reject({ errorMessage: 'Operation failed with error' }); };
|
|
129
106
|
});
|
|
130
107
|
});
|
|
131
108
|
it('should return correct add action', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
132
|
-
var
|
|
109
|
+
var addCrosswalkAction, addEvent;
|
|
133
110
|
return __generator(this, function (_a) {
|
|
134
111
|
switch (_a.label) {
|
|
135
112
|
case 0:
|
|
136
|
-
|
|
113
|
+
addCrosswalkAction = getActions().addCrosswalk;
|
|
137
114
|
addEvent = {
|
|
138
115
|
entity: entity,
|
|
139
116
|
crosswalk: {
|
|
@@ -141,8 +118,8 @@ describe('useCrosswalkActions tests', function () {
|
|
|
141
118
|
value: 'test'
|
|
142
119
|
}
|
|
143
120
|
};
|
|
144
|
-
|
|
145
|
-
expect(
|
|
121
|
+
addCrosswalkAction(addEvent);
|
|
122
|
+
expect(mdm_sdk_1.addCrosswalk).toHaveBeenCalledWith({
|
|
146
123
|
entityUri: entity.uri,
|
|
147
124
|
crosswalk: addEvent.crosswalk
|
|
148
125
|
});
|
|
@@ -154,9 +131,9 @@ describe('useCrosswalkActions tests', function () {
|
|
|
154
131
|
}); })];
|
|
155
132
|
case 1:
|
|
156
133
|
_a.sent();
|
|
157
|
-
expect(initialProps.onSuccess).
|
|
158
|
-
|
|
159
|
-
expect(
|
|
134
|
+
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
135
|
+
addCrosswalkAction(addEvent);
|
|
136
|
+
expect(mdm_sdk_1.addCrosswalk).toHaveBeenCalledWith({
|
|
160
137
|
entityUri: entity.uri,
|
|
161
138
|
crosswalk: addEvent.crosswalk
|
|
162
139
|
});
|
|
@@ -168,17 +145,17 @@ describe('useCrosswalkActions tests', function () {
|
|
|
168
145
|
}); })];
|
|
169
146
|
case 2:
|
|
170
147
|
_a.sent();
|
|
171
|
-
expect(initialProps.onError).
|
|
148
|
+
expect(initialProps.onError).toHaveBeenCalledWith({ errorMessage: 'Operation failed with error' });
|
|
172
149
|
return [2 /*return*/];
|
|
173
150
|
}
|
|
174
151
|
});
|
|
175
152
|
}); });
|
|
176
153
|
it('should return correct add in contributor action', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
177
|
-
var
|
|
154
|
+
var addCrosswalkAction, addInContributorEvent;
|
|
178
155
|
return __generator(this, function (_a) {
|
|
179
156
|
switch (_a.label) {
|
|
180
157
|
case 0:
|
|
181
|
-
|
|
158
|
+
addCrosswalkAction = getActions().addCrosswalk;
|
|
182
159
|
addInContributorEvent = {
|
|
183
160
|
entity: entity,
|
|
184
161
|
contributorCrosswalk: {
|
|
@@ -194,8 +171,8 @@ describe('useCrosswalkActions tests', function () {
|
|
|
194
171
|
deleteDate: '123'
|
|
195
172
|
}
|
|
196
173
|
};
|
|
197
|
-
|
|
198
|
-
expect(
|
|
174
|
+
addCrosswalkAction(addInContributorEvent);
|
|
175
|
+
expect(mdm_sdk_1.addCrosswalkInContributor).toHaveBeenCalledWith({
|
|
199
176
|
entityTypeUri: entity.type,
|
|
200
177
|
contributorCrosswalkType: addInContributorEvent.contributorCrosswalk.type,
|
|
201
178
|
contributorCrosswalkValue: addInContributorEvent.contributorCrosswalk.value,
|
|
@@ -213,9 +190,9 @@ describe('useCrosswalkActions tests', function () {
|
|
|
213
190
|
}); })];
|
|
214
191
|
case 1:
|
|
215
192
|
_a.sent();
|
|
216
|
-
expect(initialProps.onSuccess).
|
|
217
|
-
|
|
218
|
-
expect(
|
|
193
|
+
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
194
|
+
addCrosswalkAction(addInContributorEvent);
|
|
195
|
+
expect(mdm_sdk_1.addCrosswalkInContributor).toHaveBeenCalledWith({
|
|
219
196
|
entityTypeUri: entity.type,
|
|
220
197
|
contributorCrosswalkType: addInContributorEvent.contributorCrosswalk.type,
|
|
221
198
|
contributorCrosswalkValue: addInContributorEvent.contributorCrosswalk.value,
|
|
@@ -233,7 +210,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
233
210
|
}); })];
|
|
234
211
|
case 2:
|
|
235
212
|
_a.sent();
|
|
236
|
-
expect(initialProps.onError).
|
|
213
|
+
expect(initialProps.onError).toHaveBeenCalledWith({ errorMessage: 'Operation failed with error' });
|
|
237
214
|
return [2 /*return*/];
|
|
238
215
|
}
|
|
239
216
|
});
|
|
@@ -251,7 +228,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
251
228
|
value: '1631905200000'
|
|
252
229
|
};
|
|
253
230
|
editCrosswalk(editEvent);
|
|
254
|
-
expect(
|
|
231
|
+
expect(mdm_sdk_1.editCrosswalkAttribute).toHaveBeenCalledWith(editEvent);
|
|
255
232
|
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
256
233
|
return __generator(this, function (_a) {
|
|
257
234
|
resolveSuccess();
|
|
@@ -260,9 +237,9 @@ describe('useCrosswalkActions tests', function () {
|
|
|
260
237
|
}); })];
|
|
261
238
|
case 1:
|
|
262
239
|
_a.sent();
|
|
263
|
-
expect(initialProps.onSuccess).
|
|
240
|
+
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
264
241
|
editCrosswalk(editEvent);
|
|
265
|
-
expect(
|
|
242
|
+
expect(mdm_sdk_1.editCrosswalkAttribute).toHaveBeenCalledWith(editEvent);
|
|
266
243
|
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
267
244
|
return __generator(this, function (_a) {
|
|
268
245
|
resolveError();
|
|
@@ -271,7 +248,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
271
248
|
}); })];
|
|
272
249
|
case 2:
|
|
273
250
|
_a.sent();
|
|
274
|
-
expect(initialProps.onError).
|
|
251
|
+
expect(initialProps.onError).toHaveBeenCalledWith({ errorMessage: 'Operation failed with error' });
|
|
275
252
|
return [2 /*return*/];
|
|
276
253
|
}
|
|
277
254
|
});
|
|
@@ -288,7 +265,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
288
265
|
attributeName: 'deleteDate'
|
|
289
266
|
};
|
|
290
267
|
editCrosswalk(deleteAttributeEvent);
|
|
291
|
-
expect(
|
|
268
|
+
expect(mdm_sdk_1.deleteCrosswalkAttribute).toHaveBeenCalledWith(deleteAttributeEvent);
|
|
292
269
|
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
293
270
|
return __generator(this, function (_a) {
|
|
294
271
|
resolveSuccess();
|
|
@@ -297,9 +274,9 @@ describe('useCrosswalkActions tests', function () {
|
|
|
297
274
|
}); })];
|
|
298
275
|
case 1:
|
|
299
276
|
_a.sent();
|
|
300
|
-
expect(initialProps.onSuccess).
|
|
277
|
+
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
301
278
|
editCrosswalk(deleteAttributeEvent);
|
|
302
|
-
expect(
|
|
279
|
+
expect(mdm_sdk_1.deleteCrosswalkAttribute).toHaveBeenCalledWith(deleteAttributeEvent);
|
|
303
280
|
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
304
281
|
return __generator(this, function (_a) {
|
|
305
282
|
resolveError();
|
|
@@ -308,23 +285,23 @@ describe('useCrosswalkActions tests', function () {
|
|
|
308
285
|
}); })];
|
|
309
286
|
case 2:
|
|
310
287
|
_a.sent();
|
|
311
|
-
expect(initialProps.onError).
|
|
288
|
+
expect(initialProps.onError).toHaveBeenCalledWith({ errorMessage: 'Operation failed with error' });
|
|
312
289
|
return [2 /*return*/];
|
|
313
290
|
}
|
|
314
291
|
});
|
|
315
292
|
}); });
|
|
316
293
|
it('should return correct delete crosswalk action', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
317
|
-
var
|
|
294
|
+
var deleteCrosswalkAction, deleteEvent;
|
|
318
295
|
return __generator(this, function (_a) {
|
|
319
296
|
switch (_a.label) {
|
|
320
297
|
case 0:
|
|
321
|
-
|
|
298
|
+
deleteCrosswalkAction = getActions().deleteCrosswalk;
|
|
322
299
|
deleteEvent = {
|
|
323
300
|
entityUri: 'entities/123',
|
|
324
301
|
crosswalkId: '370iIXrRf'
|
|
325
302
|
};
|
|
326
|
-
|
|
327
|
-
expect(
|
|
303
|
+
deleteCrosswalkAction(deleteEvent);
|
|
304
|
+
expect(mdm_sdk_1.deleteCrosswalk).toHaveBeenCalledWith(deleteEvent);
|
|
328
305
|
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
329
306
|
return __generator(this, function (_a) {
|
|
330
307
|
resolveSuccess();
|
|
@@ -333,9 +310,9 @@ describe('useCrosswalkActions tests', function () {
|
|
|
333
310
|
}); })];
|
|
334
311
|
case 1:
|
|
335
312
|
_a.sent();
|
|
336
|
-
expect(initialProps.onSuccess).
|
|
337
|
-
|
|
338
|
-
expect(
|
|
313
|
+
expect(initialProps.onSuccess).toHaveBeenCalled();
|
|
314
|
+
deleteCrosswalkAction(deleteEvent);
|
|
315
|
+
expect(mdm_sdk_1.deleteCrosswalk).toHaveBeenCalledWith(deleteEvent);
|
|
339
316
|
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
340
317
|
return __generator(this, function (_a) {
|
|
341
318
|
resolveError();
|
|
@@ -344,7 +321,7 @@ describe('useCrosswalkActions tests', function () {
|
|
|
344
321
|
}); })];
|
|
345
322
|
case 2:
|
|
346
323
|
_a.sent();
|
|
347
|
-
expect(initialProps.onError).
|
|
324
|
+
expect(initialProps.onError).toHaveBeenCalledWith({ errorMessage: 'Operation failed with error' });
|
|
348
325
|
return [2 /*return*/];
|
|
349
326
|
}
|
|
350
327
|
});
|
|
@@ -141,7 +141,7 @@ describe('useModifiedEntity', function () {
|
|
|
141
141
|
expect(onSuccess).toBe(initialProps.onModify);
|
|
142
142
|
var error = new Error();
|
|
143
143
|
onError === null || onError === void 0 ? void 0 : onError(error);
|
|
144
|
-
expect(initialProps.onError).
|
|
144
|
+
expect(initialProps.onError).toHaveBeenCalledWith(error);
|
|
145
145
|
});
|
|
146
146
|
it('should return unmodified entity on first render', function () {
|
|
147
147
|
var modifiedEntity = getModifiedEntity().modifiedEntity;
|
|
@@ -252,7 +252,7 @@ describe('useModifiedEntity', function () {
|
|
|
252
252
|
(0, react_hooks_1.act)(function () {
|
|
253
253
|
onDeleteAttribute(deleteEvent);
|
|
254
254
|
});
|
|
255
|
-
expect(attributeActions.deleteAttribute).
|
|
255
|
+
expect(attributeActions.deleteAttribute).toHaveBeenCalledWith(deleteEvent);
|
|
256
256
|
});
|
|
257
257
|
it('should return correct delete handler for temporary attribute', function () {
|
|
258
258
|
var _a = getModifiedEntity(), onAddAttribute = _a.onAddAttribute, onDeleteAttribute = _a.onDeleteAttribute, result = _a.result;
|
|
@@ -285,7 +285,7 @@ describe('useModifiedEntity', function () {
|
|
|
285
285
|
crosswalks: [crosswalk]
|
|
286
286
|
});
|
|
287
287
|
});
|
|
288
|
-
expect(attributeActions.deleteAttribute).not.
|
|
288
|
+
expect(attributeActions.deleteAttribute).not.toHaveBeenCalled();
|
|
289
289
|
expect(result.current.modifiedEntity).toEqual(entity);
|
|
290
290
|
expect(result.current.crosswalksMap).toEqual(initCrosswalksMap);
|
|
291
291
|
});
|
|
@@ -304,7 +304,7 @@ describe('useModifiedEntity', function () {
|
|
|
304
304
|
(0, react_hooks_1.act)(function () {
|
|
305
305
|
onEditAttribute(editEvent);
|
|
306
306
|
});
|
|
307
|
-
expect(attributeActions.updateAttribute).
|
|
307
|
+
expect(attributeActions.updateAttribute).toHaveBeenCalledWith(editEvent);
|
|
308
308
|
});
|
|
309
309
|
it('should return correct edit handler for temporary simple attribute', function () {
|
|
310
310
|
var _a, _b;
|
|
@@ -338,8 +338,8 @@ describe('useModifiedEntity', function () {
|
|
|
338
338
|
(0, react_hooks_1.act)(function () {
|
|
339
339
|
onEditAttribute(editEvent);
|
|
340
340
|
});
|
|
341
|
-
expect(attributeActions.updateAttribute).not.
|
|
342
|
-
expect(attributeActions.createAttribute).
|
|
341
|
+
expect(attributeActions.updateAttribute).not.toHaveBeenCalled();
|
|
342
|
+
expect(attributeActions.createAttribute).toHaveBeenCalledWith({
|
|
343
343
|
attributeValue: __assign(__assign({}, (_b = result.current.modifiedEntity.attributes) === null || _b === void 0 ? void 0 : _b.Simple[1]), { value: 'new value' }),
|
|
344
344
|
crosswalk: crosswalk
|
|
345
345
|
});
|
|
@@ -392,8 +392,8 @@ describe('useModifiedEntity', function () {
|
|
|
392
392
|
attributeValue: __assign(__assign({}, (_a = result.current.modifiedEntity.attributes) === null || _a === void 0 ? void 0 : _a.Nested[1].value.SubNested[0]), { value: 'new value' })
|
|
393
393
|
});
|
|
394
394
|
});
|
|
395
|
-
expect(attributeActions.updateAttribute).not.
|
|
396
|
-
expect(attributeActions.createAttribute).
|
|
395
|
+
expect(attributeActions.updateAttribute).not.toHaveBeenCalled();
|
|
396
|
+
expect(attributeActions.createAttribute).toHaveBeenCalledWith({
|
|
397
397
|
attributeValue: __assign(__assign({}, (_a = result.current.modifiedEntity.attributes) === null || _a === void 0 ? void 0 : _a.Nested[1]), { value: {
|
|
398
398
|
SubNested: [
|
|
399
399
|
__assign(__assign({}, (_b = result.current.modifiedEntity.attributes) === null || _b === void 0 ? void 0 : _b.Nested[1].value.SubNested[0]), { value: 'new value' })
|
|
@@ -128,9 +128,9 @@ describe('useEdgeLabelsRenderer tests', function () {
|
|
|
128
128
|
hoversRenderer(hoversCanvasContext);
|
|
129
129
|
});
|
|
130
130
|
expect(getCanvasContextEventTypes(hoversCanvasContext)).toEqual(expect.arrayContaining(['beginPath', 'arc', 'fill']));
|
|
131
|
-
expect(hoversCanvasContext.arc).
|
|
131
|
+
expect(hoversCanvasContext.arc).toHaveBeenCalledTimes(1);
|
|
132
132
|
expect(hoversCanvasContext.arc).toHaveBeenCalledWith(150, 100, 2.8, 0, 2 * Math.PI);
|
|
133
|
-
expect(label_1.drawLabel).
|
|
133
|
+
expect(label_1.drawLabel).toHaveBeenCalledTimes(1);
|
|
134
134
|
expect(label_1.drawLabel).toHaveBeenCalledWith(hoversCanvasContext, { label: '1', size: 4, x: 150, y: 100 }, { labelColor: 'black', labelSize: 12 * 1.2 }, { backgroundColor: 'rgba(250, 250, 250, 1)' });
|
|
135
135
|
});
|
|
136
136
|
it('mousemove event should work correctly if cursor over edge caption', function () {
|
package/cjs/features/history/ContributorsPanel/components/ContributorItem/ContributorItem.specs.js
CHANGED
|
@@ -10,29 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -76,7 +53,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
76
53
|
var react_1 = __importDefault(require("react"));
|
|
77
54
|
var react_2 = require("@testing-library/react");
|
|
78
55
|
var user_event_1 = __importDefault(require("@testing-library/user-event"));
|
|
79
|
-
var
|
|
56
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
80
57
|
var ContributorItem_1 = require("./ContributorItem");
|
|
81
58
|
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getContributorColor: jest.fn() })); });
|
|
82
59
|
describe('ContributorItem tests', function () {
|
|
@@ -85,7 +62,9 @@ describe('ContributorItem tests', function () {
|
|
|
85
62
|
isSelected: true,
|
|
86
63
|
onClick: jest.fn()
|
|
87
64
|
};
|
|
88
|
-
|
|
65
|
+
beforeEach(function () {
|
|
66
|
+
mdm_sdk_1.getContributorColor.mockReturnValue('#FFFFFF');
|
|
67
|
+
});
|
|
89
68
|
var setUp = function (props) {
|
|
90
69
|
if (props === void 0) { props = {}; }
|
|
91
70
|
var user = user_event_1.default.setup();
|
|
@@ -93,7 +72,7 @@ describe('ContributorItem tests', function () {
|
|
|
93
72
|
};
|
|
94
73
|
it('should render correct default state', function () {
|
|
95
74
|
setUp();
|
|
96
|
-
expect(
|
|
75
|
+
expect(mdm_sdk_1.getContributorColor).toHaveBeenCalledWith(defaultProps.value);
|
|
97
76
|
var contributorItem = react_2.screen.getByTestId('reltio-contributor-item');
|
|
98
77
|
expect(contributorItem).toHaveClass('icon', 'active', 'clickable');
|
|
99
78
|
expect(contributorItem).not.toHaveClass('inactive');
|
|
@@ -56,7 +56,7 @@ describe('HistoryLink tests', function () {
|
|
|
56
56
|
});
|
|
57
57
|
it('should render correctly', function () {
|
|
58
58
|
var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(HistoryLink_1.HistoryLink, __assign({}, props)));
|
|
59
|
-
expect(getHistoryLinkCurveSpy).
|
|
59
|
+
expect(getHistoryLinkCurveSpy).toHaveBeenCalledWith(props.x, props.y, props.toX, props.toY);
|
|
60
60
|
expect(wrapper.find('path').length).toBe(1);
|
|
61
61
|
expect(wrapper.find('path').props()).toMatchObject({
|
|
62
62
|
d: getHistoryLinkCurveSpy.mock.results[0].value,
|
|
@@ -68,7 +68,7 @@ describe('HistoryLink tests', function () {
|
|
|
68
68
|
});
|
|
69
69
|
it('should render dashed path if isDashed === true', function () {
|
|
70
70
|
var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(HistoryLink_1.HistoryLink, __assign({}, props, { isDashed: true })));
|
|
71
|
-
expect(getHistoryLinkCurveSpy).
|
|
71
|
+
expect(getHistoryLinkCurveSpy).toHaveBeenCalledWith(props.x, props.y, props.toX, props.toY);
|
|
72
72
|
expect(wrapper.find('path').length).toBe(1);
|
|
73
73
|
expect(wrapper.find('path').prop('strokeDasharray')).toBe('3,3');
|
|
74
74
|
});
|
|
@@ -10,29 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
15
|
};
|
|
@@ -40,9 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
17
|
var react_1 = __importDefault(require("react"));
|
|
41
18
|
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
42
19
|
var enzyme_1 = require("enzyme");
|
|
43
|
-
var mdmSdk = __importStar(require("@reltio/mdm-sdk"));
|
|
44
20
|
var types_1 = require("../types");
|
|
45
21
|
var activity_log_1 = require("../../activity-log");
|
|
22
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
46
23
|
var HistoryRow_1 = require("./HistoryRow");
|
|
47
24
|
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getContributorColor: jest.fn() })); });
|
|
48
25
|
describe('HistoryRow tests', function () {
|
|
@@ -59,13 +36,12 @@ describe('HistoryRow tests', function () {
|
|
|
59
36
|
isSelected: false,
|
|
60
37
|
onClick: onClick
|
|
61
38
|
};
|
|
62
|
-
var getContributorColorMock = jest.spyOn(mdmSdk, 'getContributorColor');
|
|
63
39
|
beforeAll(function () {
|
|
64
40
|
jest.clearAllMocks();
|
|
65
41
|
});
|
|
66
42
|
it('should render correctly', function () {
|
|
67
43
|
var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(HistoryRow_1.HistoryRow, __assign({}, props)));
|
|
68
|
-
expect(
|
|
44
|
+
expect(mdm_sdk_1.getContributorColor).toHaveBeenCalledWith(props.change.uri);
|
|
69
45
|
expect(wrapper.find('.historyRow').length).toBe(1);
|
|
70
46
|
var header = wrapper.find('.rowHeader');
|
|
71
47
|
expect(header.length).toBe(1);
|
|
@@ -144,7 +144,7 @@ describe('HistoryTree tests', function () {
|
|
|
144
144
|
return [4 /*yield*/, user.click(react_2.screen.getByText('Show more'))];
|
|
145
145
|
case 1:
|
|
146
146
|
_a.sent();
|
|
147
|
-
expect(defaultProps.onLoadMore).
|
|
147
|
+
expect(defaultProps.onLoadMore).toHaveBeenCalled();
|
|
148
148
|
return [2 /*return*/];
|
|
149
149
|
}
|
|
150
150
|
});
|
|
@@ -90,7 +90,7 @@ describe('HistoryView tests', function () {
|
|
|
90
90
|
.mockReturnValue({ historyData: historyData, findPreviousChange: findPreviousChange });
|
|
91
91
|
it('should render correct default state', function () {
|
|
92
92
|
var wrapper = (0, enzyme_1.mount)(react_1.default.createElement(HistoryView_1.default, __assign({}, props)));
|
|
93
|
-
expect(useHistoryTreeMock).
|
|
93
|
+
expect(useHistoryTreeMock).toHaveBeenCalledWith({
|
|
94
94
|
entityUri: props.entityUri,
|
|
95
95
|
historyChanges: props.historyWithTotal.changes,
|
|
96
96
|
selectedUris: props.contributorsUris
|
|
@@ -92,26 +92,26 @@ describe('filters helpers tests', function () {
|
|
|
92
92
|
expect((0, filters_1.buildHistoryFilterString)(filter)).toEqual(expectedResult + ' and ' + defaultFilterString);
|
|
93
93
|
});
|
|
94
94
|
it('should build date range within filter correctly', function () {
|
|
95
|
-
|
|
96
|
-
jest.spyOn(Date, 'now').mockReturnValue(1636703406900 - tzOffset);
|
|
95
|
+
jest.spyOn(Date, 'now').mockReturnValue(1636703406900);
|
|
97
96
|
var filter = {
|
|
98
97
|
dateRange: {
|
|
99
98
|
type: 'within',
|
|
100
99
|
period: [4, 'months']
|
|
101
100
|
}
|
|
102
101
|
};
|
|
103
|
-
|
|
102
|
+
var expectedTimestamp = moment_1.default.utc(1636703406900).subtract(4, 'months').valueOf();
|
|
103
|
+
expect((0, filters_1.buildHistoryFilterString)(filter)).toEqual("(gte(timestamp, ".concat(expectedTimestamp, ")) and ").concat(defaultFilterString));
|
|
104
104
|
});
|
|
105
105
|
it('should build date range ago filter correctly', function () {
|
|
106
|
-
|
|
107
|
-
jest.spyOn(Date, 'now').mockReturnValue(1636703406900 - tzOffset);
|
|
106
|
+
jest.spyOn(Date, 'now').mockReturnValue(1636703406900);
|
|
108
107
|
var filter = {
|
|
109
108
|
dateRange: {
|
|
110
109
|
type: 'ago',
|
|
111
110
|
period: [4, 'months']
|
|
112
111
|
}
|
|
113
112
|
};
|
|
114
|
-
|
|
113
|
+
var expectedTimestamp = moment_1.default.utc(1636703406900).subtract(4, 'months').valueOf();
|
|
114
|
+
expect((0, filters_1.buildHistoryFilterString)(filter)).toEqual("(lte(timestamp, ".concat(expectedTimestamp, ")) and ").concat(defaultFilterString));
|
|
115
115
|
});
|
|
116
116
|
it('should build date range between filter correctly', function () {
|
|
117
117
|
var filter = {
|