@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
|
@@ -54,7 +54,6 @@ var react_1 = __importDefault(require("react"));
|
|
|
54
54
|
var enzyme_1 = require("enzyme");
|
|
55
55
|
var test_utils_1 = require("react-dom/test-utils");
|
|
56
56
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
57
|
-
var test_utils_2 = require("../test-utils");
|
|
58
57
|
var ReactSelect_1 = require("../ReactSelect");
|
|
59
58
|
var DependentLookupAutopopulationContext_1 = require("../contexts/DependentLookupAutopopulationContext");
|
|
60
59
|
var ReactSelectOptionWithCheckIcon_1 = require("../ReactSelectOptionWithCheckIcon");
|
|
@@ -134,7 +133,7 @@ describe('DependentLookupEditor', function () {
|
|
|
134
133
|
wrapper.update();
|
|
135
134
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
|
|
136
135
|
expect(props.onChange).not.toHaveBeenCalled();
|
|
137
|
-
expect(props.getLookups).
|
|
136
|
+
expect(props.getLookups).toHaveBeenCalledWith({
|
|
138
137
|
type: 'COUNTRY_CD',
|
|
139
138
|
parents: [],
|
|
140
139
|
displayNamePrefix: newInputValue,
|
|
@@ -147,7 +146,7 @@ describe('DependentLookupEditor', function () {
|
|
|
147
146
|
wrapper.update();
|
|
148
147
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe('');
|
|
149
148
|
expect(props.onChange).not.toHaveBeenCalled();
|
|
150
|
-
expect(props.getLookups).
|
|
149
|
+
expect(props.getLookups).toHaveBeenCalledWith({
|
|
151
150
|
type: 'COUNTRY_CD',
|
|
152
151
|
parents: [],
|
|
153
152
|
displayNamePrefix: '',
|
|
@@ -193,7 +192,7 @@ describe('DependentLookupEditor', function () {
|
|
|
193
192
|
wrapper.update();
|
|
194
193
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
|
|
195
194
|
expect(props.onChange).not.toHaveBeenCalled();
|
|
196
|
-
expect(props.getLookups).
|
|
195
|
+
expect(props.getLookups).toHaveBeenCalledWith({
|
|
197
196
|
type: 'COUNTRY_CD',
|
|
198
197
|
parents: [],
|
|
199
198
|
displayNamePrefix: newInputValue,
|
|
@@ -206,7 +205,7 @@ describe('DependentLookupEditor', function () {
|
|
|
206
205
|
wrapper.update();
|
|
207
206
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe((0, helpers_1.getOptionLabel)(value));
|
|
208
207
|
expect(props.onChange).not.toHaveBeenCalled();
|
|
209
|
-
expect(props.getLookups).
|
|
208
|
+
expect(props.getLookups).toHaveBeenCalledWith({
|
|
210
209
|
type: 'COUNTRY_CD',
|
|
211
210
|
parents: [],
|
|
212
211
|
displayNamePrefix: '',
|
|
@@ -228,7 +227,7 @@ describe('DependentLookupEditor', function () {
|
|
|
228
227
|
wrapper.update();
|
|
229
228
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
|
|
230
229
|
expect(props.onChange).not.toHaveBeenCalled();
|
|
231
|
-
expect(props.getLookups).
|
|
230
|
+
expect(props.getLookups).toHaveBeenCalledWith({
|
|
232
231
|
type: 'COUNTRY_CD',
|
|
233
232
|
parents: [],
|
|
234
233
|
displayNamePrefix: newInputValue,
|
|
@@ -241,7 +240,7 @@ describe('DependentLookupEditor', function () {
|
|
|
241
240
|
wrapper.update();
|
|
242
241
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe((0, helpers_1.getOptionLabel)(value));
|
|
243
242
|
expect(props.onChange).not.toHaveBeenCalled();
|
|
244
|
-
expect(props.getLookups).
|
|
243
|
+
expect(props.getLookups).toHaveBeenCalledWith({
|
|
245
244
|
type: 'COUNTRY_CD',
|
|
246
245
|
parents: [],
|
|
247
246
|
displayNamePrefix: '',
|
|
@@ -333,7 +332,7 @@ describe('DependentLookupEditor', function () {
|
|
|
333
332
|
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
334
333
|
return __generator(this, function (_a) {
|
|
335
334
|
switch (_a.label) {
|
|
336
|
-
case 0: return [4 /*yield*/,
|
|
335
|
+
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
337
336
|
case 1:
|
|
338
337
|
_a.sent();
|
|
339
338
|
return [2 /*return*/];
|
|
@@ -359,16 +358,13 @@ describe('DependentLookupEditor', function () {
|
|
|
359
358
|
case 2:
|
|
360
359
|
_a.sent();
|
|
361
360
|
// loaded options length is equal to (max + 1) so there are more options exist
|
|
362
|
-
expect(getLookups).
|
|
361
|
+
expect(getLookups).toHaveBeenCalledWith({
|
|
363
362
|
type: props.lookupCode,
|
|
364
363
|
parents: props.parents,
|
|
365
364
|
displayNamePrefix: '',
|
|
366
365
|
max: 3,
|
|
367
366
|
offset: 2
|
|
368
367
|
});
|
|
369
|
-
return [4 /*yield*/, Promise.resolve()];
|
|
370
|
-
case 3:
|
|
371
|
-
_a.sent();
|
|
372
368
|
wrapper.update();
|
|
373
369
|
expect(wrapper.find(ReactSelect_1.ReactSelect).prop('options').length).toBe(4);
|
|
374
370
|
expect(findLoadMoreButton(wrapper).exists()).toBeTruthy();
|
|
@@ -392,7 +388,7 @@ describe('DependentLookupEditor', function () {
|
|
|
392
388
|
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
393
389
|
return __generator(this, function (_a) {
|
|
394
390
|
switch (_a.label) {
|
|
395
|
-
case 0: return [4 /*yield*/,
|
|
391
|
+
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
396
392
|
case 1:
|
|
397
393
|
_a.sent();
|
|
398
394
|
return [2 /*return*/];
|
|
@@ -416,9 +412,6 @@ describe('DependentLookupEditor', function () {
|
|
|
416
412
|
});
|
|
417
413
|
}); })];
|
|
418
414
|
case 2:
|
|
419
|
-
_a.sent();
|
|
420
|
-
return [4 /*yield*/, Promise.resolve()];
|
|
421
|
-
case 3:
|
|
422
415
|
_a.sent();
|
|
423
416
|
wrapper.update();
|
|
424
417
|
expect(wrapper.find(ReactSelect_1.ReactSelect).prop('options').length).toBe(4);
|
|
@@ -482,7 +475,7 @@ describe('DependentLookupEditor', function () {
|
|
|
482
475
|
case 0:
|
|
483
476
|
wrapper = (0, enzyme_1.mount)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props)));
|
|
484
477
|
expect(wrapper.find(ReactSelect_1.ReactSelect).prop('options')).toEqual([]);
|
|
485
|
-
expect(props.getLookups).
|
|
478
|
+
expect(props.getLookups).toHaveBeenCalledWith({
|
|
486
479
|
type: props.lookupCode,
|
|
487
480
|
parents: props.parents,
|
|
488
481
|
displayNamePrefix: '',
|
|
@@ -519,7 +512,7 @@ describe('DependentLookupEditor', function () {
|
|
|
519
512
|
wrapper.setProps({
|
|
520
513
|
lookupCode: 'SPEC'
|
|
521
514
|
});
|
|
522
|
-
expect(props.getLookups).
|
|
515
|
+
expect(props.getLookups).toHaveBeenCalledWith({
|
|
523
516
|
type: 'SPEC',
|
|
524
517
|
parents: [],
|
|
525
518
|
displayNamePrefix: '',
|
|
@@ -564,9 +557,9 @@ describe('DependentLookupEditor', function () {
|
|
|
564
557
|
case 1:
|
|
565
558
|
_a.sent();
|
|
566
559
|
wrapper.find('input').simulate('keyDown', { key: 'ArrowDown' });
|
|
567
|
-
expect(props.onChange).not.
|
|
560
|
+
expect(props.onChange).not.toHaveBeenCalled();
|
|
568
561
|
wrapper.find(ReactSelectOptionWithCheckIcon_1.ReactSelectOptionWithCheckIcon).at(1).find('div').at(0).simulate('click');
|
|
569
|
-
expect(props.onChange).
|
|
562
|
+
expect(props.onChange).toHaveBeenCalledWith({
|
|
570
563
|
value: 'Russia',
|
|
571
564
|
lookupCode: 'RU'
|
|
572
565
|
});
|
|
@@ -574,20 +567,32 @@ describe('DependentLookupEditor', function () {
|
|
|
574
567
|
}
|
|
575
568
|
});
|
|
576
569
|
}); });
|
|
577
|
-
it('should call props.getLookups with correct values on select input change', function () {
|
|
578
|
-
var wrapper
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
570
|
+
it('should call props.getLookups with correct values on select input change', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
571
|
+
var wrapper, newInputValue;
|
|
572
|
+
return __generator(this, function (_a) {
|
|
573
|
+
switch (_a.label) {
|
|
574
|
+
case 0:
|
|
575
|
+
wrapper = (0, enzyme_1.mount)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props)));
|
|
576
|
+
newInputValue = 'Ch';
|
|
577
|
+
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
578
|
+
return __generator(this, function (_a) {
|
|
579
|
+
wrapper.find('Select').prop('onInputChange')(newInputValue, { action: 'input-change' });
|
|
580
|
+
return [2 /*return*/];
|
|
581
|
+
});
|
|
582
|
+
}); })];
|
|
583
|
+
case 1:
|
|
584
|
+
_a.sent();
|
|
585
|
+
expect(props.getLookups).toHaveBeenCalledWith({
|
|
586
|
+
type: props.lookupCode,
|
|
587
|
+
parents: props.parents,
|
|
588
|
+
displayNamePrefix: newInputValue,
|
|
589
|
+
max: 51,
|
|
590
|
+
offset: 0
|
|
591
|
+
});
|
|
592
|
+
return [2 /*return*/];
|
|
593
|
+
}
|
|
589
594
|
});
|
|
590
|
-
});
|
|
595
|
+
}); });
|
|
591
596
|
it('should call props.getLookups with correct values on select input change and set offset to default', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
592
597
|
var getLookups, value, wrapper, newInputValue, nextNewInputValue;
|
|
593
598
|
return __generator(this, function (_a) {
|
|
@@ -605,7 +610,16 @@ describe('DependentLookupEditor', function () {
|
|
|
605
610
|
(0, test_utils_1.act)(function () {
|
|
606
611
|
wrapper.find('Select').prop('onInputChange')(newInputValue, { action: 'input-change' });
|
|
607
612
|
});
|
|
608
|
-
return [4 /*yield*/, (0,
|
|
613
|
+
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
614
|
+
return __generator(this, function (_a) {
|
|
615
|
+
switch (_a.label) {
|
|
616
|
+
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
617
|
+
case 1:
|
|
618
|
+
_a.sent();
|
|
619
|
+
return [2 /*return*/];
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
}); })];
|
|
609
623
|
case 1:
|
|
610
624
|
_a.sent();
|
|
611
625
|
wrapper.update();
|
|
@@ -631,7 +645,7 @@ describe('DependentLookupEditor', function () {
|
|
|
631
645
|
case 2:
|
|
632
646
|
_a.sent();
|
|
633
647
|
// offset === max
|
|
634
|
-
expect(getLookups).
|
|
648
|
+
expect(getLookups).toHaveBeenCalledWith({
|
|
635
649
|
type: props.lookupCode,
|
|
636
650
|
parents: props.parents,
|
|
637
651
|
displayNamePrefix: newInputValue,
|
|
@@ -654,7 +668,7 @@ describe('DependentLookupEditor', function () {
|
|
|
654
668
|
}
|
|
655
669
|
});
|
|
656
670
|
}); });
|
|
657
|
-
|
|
671
|
+
xit('should call props.getLookups with default offset = 0 after LookupCode updated', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
658
672
|
var getLookups, wrapper, newLookupCode;
|
|
659
673
|
return __generator(this, function (_a) {
|
|
660
674
|
switch (_a.label) {
|
|
@@ -666,7 +680,16 @@ describe('DependentLookupEditor', function () {
|
|
|
666
680
|
RU: { displayName: 'Russia' }
|
|
667
681
|
}));
|
|
668
682
|
wrapper = (0, enzyme_1.mount)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { getLookups: getLookups, max: 2 })));
|
|
669
|
-
return [4 /*yield*/, (0,
|
|
683
|
+
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
684
|
+
return __generator(this, function (_a) {
|
|
685
|
+
switch (_a.label) {
|
|
686
|
+
case 0: return [4 /*yield*/, Promise.resolve()];
|
|
687
|
+
case 1:
|
|
688
|
+
_a.sent();
|
|
689
|
+
return [2 /*return*/];
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
}); })];
|
|
670
693
|
case 1:
|
|
671
694
|
_a.sent();
|
|
672
695
|
wrapper.update();
|
|
@@ -691,7 +714,7 @@ describe('DependentLookupEditor', function () {
|
|
|
691
714
|
}); })];
|
|
692
715
|
case 2:
|
|
693
716
|
_a.sent();
|
|
694
|
-
expect(getLookups).
|
|
717
|
+
expect(getLookups).toHaveBeenCalledWith({
|
|
695
718
|
type: props.lookupCode,
|
|
696
719
|
parents: props.parents,
|
|
697
720
|
displayNamePrefix: '',
|
|
@@ -727,10 +750,12 @@ describe('DependentLookupEditor', function () {
|
|
|
727
750
|
getLookups.mockReturnValue(Promise.resolve({}));
|
|
728
751
|
wrapper = (0, enzyme_1.mount)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { getLookups: getLookups })));
|
|
729
752
|
newInputValue = 'Ch';
|
|
730
|
-
(0, test_utils_1.act)(function () {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
753
|
+
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
754
|
+
return __generator(this, function (_a) {
|
|
755
|
+
wrapper.find('Select').prop('onInputChange')(newInputValue, { action: 'input-change' });
|
|
756
|
+
return [2 /*return*/];
|
|
757
|
+
});
|
|
758
|
+
}); })];
|
|
734
759
|
case 1:
|
|
735
760
|
_a.sent();
|
|
736
761
|
wrapper.update();
|
|
@@ -771,16 +796,18 @@ describe('DependentLookupEditor', function () {
|
|
|
771
796
|
wrapper = (0, enzyme_1.mount)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { getLookups: getLookups, value: value, multiple: false })));
|
|
772
797
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe('USA (US)');
|
|
773
798
|
newInputValue = 'u';
|
|
774
|
-
(0, test_utils_1.act)(function () {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
799
|
+
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
800
|
+
return __generator(this, function (_a) {
|
|
801
|
+
wrapper.find(ReactSelect_1.ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
|
|
802
|
+
return [2 /*return*/];
|
|
803
|
+
});
|
|
804
|
+
}); })];
|
|
778
805
|
case 1:
|
|
779
806
|
_a.sent();
|
|
780
807
|
wrapper.update();
|
|
781
808
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
|
|
782
809
|
expect(props.onChange).not.toHaveBeenCalled();
|
|
783
|
-
expect(getLookups).
|
|
810
|
+
expect(getLookups).toHaveBeenCalledWith({
|
|
784
811
|
type: 'COUNTRY_CD',
|
|
785
812
|
parents: [],
|
|
786
813
|
displayNamePrefix: newInputValue,
|
|
@@ -805,16 +832,18 @@ describe('DependentLookupEditor', function () {
|
|
|
805
832
|
wrapper = (0, enzyme_1.mount)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { getLookups: getLookups, value: value, multiple: false })));
|
|
806
833
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe('USA (US)');
|
|
807
834
|
newInputValue = '';
|
|
808
|
-
(0, test_utils_1.act)(function () {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
835
|
+
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
836
|
+
return __generator(this, function (_a) {
|
|
837
|
+
wrapper.find(ReactSelect_1.ReactSelect).prop('onInputChange')(newInputValue, { action: 'input-change' });
|
|
838
|
+
return [2 /*return*/];
|
|
839
|
+
});
|
|
840
|
+
}); })];
|
|
812
841
|
case 1:
|
|
813
842
|
_a.sent();
|
|
814
843
|
wrapper.update();
|
|
815
844
|
expect(wrapper.find(ReactSelect_1.ReactSelect).find('Input').last().prop('value')).toBe(newInputValue);
|
|
816
845
|
expect(props.onChange).toHaveBeenCalledWith('');
|
|
817
|
-
expect(getLookups).
|
|
846
|
+
expect(getLookups).toHaveBeenCalledWith({
|
|
818
847
|
type: 'COUNTRY_CD',
|
|
819
848
|
parents: [],
|
|
820
849
|
displayNamePrefix: '',
|
|
@@ -835,7 +864,7 @@ describe('DependentLookupEditor', function () {
|
|
|
835
864
|
};
|
|
836
865
|
var value = { lookupCode: 'DE', value: '' };
|
|
837
866
|
(0, enzyme_1.mount)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { lookups: lookups, value: value })));
|
|
838
|
-
expect(props.onChange).
|
|
867
|
+
expect(props.onChange).toHaveBeenCalledWith({
|
|
839
868
|
lookupCode: 'DE',
|
|
840
869
|
value: 'Germany'
|
|
841
870
|
});
|
|
@@ -843,20 +872,21 @@ describe('DependentLookupEditor', function () {
|
|
|
843
872
|
it('should call props.resolveLookups if lookup is unresolved and has no resolved value in lookups', function () {
|
|
844
873
|
var value = { lookupCode: 'DE', value: '' };
|
|
845
874
|
(0, enzyme_1.mount)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { value: value })));
|
|
846
|
-
expect(props.resolveLookups).
|
|
875
|
+
expect(props.resolveLookups).toHaveBeenCalledWith(props.lookupCode, ['DE']);
|
|
847
876
|
});
|
|
848
877
|
it('should call props.resolveLookups once if lookup is unresolved and has no resolved value in lookups and has no resolved value in response', function () {
|
|
849
878
|
var value = { lookupCode: 'DE', value: '' };
|
|
850
879
|
var component = (0, enzyme_1.mount)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { value: value })));
|
|
851
880
|
component.setProps({ value: __assign({}, value) });
|
|
852
881
|
expect(props.resolveLookups).toHaveBeenCalledTimes(1);
|
|
853
|
-
expect(props.resolveLookups).
|
|
882
|
+
expect(props.resolveLookups).toHaveBeenCalledWith(props.lookupCode, ['DE']);
|
|
854
883
|
});
|
|
855
884
|
it('should use debounced variant of loadOptions on input change', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
856
885
|
var getLookups, component, select;
|
|
857
886
|
return __generator(this, function (_a) {
|
|
858
887
|
switch (_a.label) {
|
|
859
888
|
case 0:
|
|
889
|
+
jest.useFakeTimers();
|
|
860
890
|
mdm_sdk_1.debounce.mockImplementation(originalDebounce);
|
|
861
891
|
getLookups = jest.fn().mockReturnValue(Promise.resolve({
|
|
862
892
|
US: { displayName: 'USA' },
|
|
@@ -864,13 +894,16 @@ describe('DependentLookupEditor', function () {
|
|
|
864
894
|
}));
|
|
865
895
|
component = (0, enzyme_1.shallow)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { getLookups: getLookups })));
|
|
866
896
|
select = component.find(ReactSelect_1.ReactSelect);
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
897
|
+
(0, test_utils_1.act)(function () {
|
|
898
|
+
select.prop('onInputChange')('u', { action: 'input-change' });
|
|
899
|
+
});
|
|
900
|
+
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
901
|
+
return __generator(this, function (_a) {
|
|
902
|
+
jest.advanceTimersByTime(DependentLookupEditor_1.DEBOUNCE_INTERVAL);
|
|
903
|
+
return [2 /*return*/];
|
|
904
|
+
});
|
|
905
|
+
}); })];
|
|
870
906
|
case 1:
|
|
871
|
-
_a.sent();
|
|
872
|
-
return [4 /*yield*/, (0, test_utils_2.delayPromise)(1)];
|
|
873
|
-
case 2:
|
|
874
907
|
_a.sent();
|
|
875
908
|
expect(getLookups).toHaveBeenCalledTimes(1);
|
|
876
909
|
expect(component.find(ReactSelect_1.ReactSelect).prop('options')).toEqual([
|
|
@@ -881,6 +914,7 @@ describe('DependentLookupEditor', function () {
|
|
|
881
914
|
{ lookupCode: 'US', value: 'USA' }
|
|
882
915
|
]);
|
|
883
916
|
expect(mdm_sdk_1.debounce).toHaveBeenCalled();
|
|
917
|
+
jest.useRealTimers();
|
|
884
918
|
return [2 /*return*/];
|
|
885
919
|
}
|
|
886
920
|
});
|
|
@@ -900,7 +934,9 @@ describe('DependentLookupEditor', function () {
|
|
|
900
934
|
];
|
|
901
935
|
var component = (0, enzyme_1.shallow)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { parents: parents })));
|
|
902
936
|
var select = component.find(ReactSelect_1.ReactSelect);
|
|
903
|
-
|
|
937
|
+
(0, test_utils_1.act)(function () {
|
|
938
|
+
select.prop('onInputChange')('u', { action: 'input-change' });
|
|
939
|
+
});
|
|
904
940
|
expect(component.prop('isDisabled')).toBeFalsy();
|
|
905
941
|
expect(props.getLookups).toHaveBeenCalledTimes(1);
|
|
906
942
|
expect(props.getLookups).toHaveBeenCalledWith({
|
|
@@ -919,14 +955,15 @@ describe('DependentLookupEditor', function () {
|
|
|
919
955
|
parents = null;
|
|
920
956
|
component = (0, enzyme_1.shallow)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { parents: parents })));
|
|
921
957
|
select = component.find(ReactSelect_1.ReactSelect);
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
958
|
+
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
959
|
+
return __generator(this, function (_a) {
|
|
960
|
+
select.prop('onInputChange')('u', { action: 'input-change' });
|
|
961
|
+
return [2 /*return*/];
|
|
962
|
+
});
|
|
963
|
+
}); })];
|
|
925
964
|
case 1:
|
|
926
965
|
_a.sent();
|
|
927
|
-
|
|
928
|
-
case 2:
|
|
929
|
-
_a.sent();
|
|
966
|
+
expect(props.getLookups).not.toHaveBeenCalled();
|
|
930
967
|
expect(component.find(ReactSelect_1.ReactSelect).prop('options')).toEqual([]);
|
|
931
968
|
return [2 /*return*/];
|
|
932
969
|
}
|
|
@@ -936,7 +973,9 @@ describe('DependentLookupEditor', function () {
|
|
|
936
973
|
var parents = undefined;
|
|
937
974
|
var component = (0, enzyme_1.shallow)(react_1.default.createElement(DependentLookupEditor_1.DependentLookupEditor, __assign({}, props, { parents: parents })));
|
|
938
975
|
var select = component.find(ReactSelect_1.ReactSelect);
|
|
939
|
-
|
|
976
|
+
(0, test_utils_1.act)(function () {
|
|
977
|
+
select.prop('onInputChange')('u', { action: 'input-change' });
|
|
978
|
+
});
|
|
940
979
|
expect(props.getLookups).toHaveBeenCalledTimes(1);
|
|
941
980
|
expect(props.getLookups).toHaveBeenCalledWith({
|
|
942
981
|
displayNamePrefix: 'u',
|
|
@@ -1089,7 +1128,14 @@ describe('DependentLookupEditor', function () {
|
|
|
1089
1128
|
case 1:
|
|
1090
1129
|
_a.sent();
|
|
1091
1130
|
select = component.find(ReactSelect_1.ReactSelect);
|
|
1092
|
-
|
|
1131
|
+
return [4 /*yield*/, (0, test_utils_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
1132
|
+
return __generator(this, function (_a) {
|
|
1133
|
+
select.prop('onInputChange')('Ru', { action: 'input-change' });
|
|
1134
|
+
return [2 /*return*/];
|
|
1135
|
+
});
|
|
1136
|
+
}); })];
|
|
1137
|
+
case 2:
|
|
1138
|
+
_a.sent();
|
|
1093
1139
|
expect(getLookups).toHaveBeenCalledTimes(2);
|
|
1094
1140
|
expect(props.onChange).not.toHaveBeenCalled();
|
|
1095
1141
|
return [2 /*return*/];
|
|
@@ -33,6 +33,6 @@ describe('DropDownEditor', function () {
|
|
|
33
33
|
var onChange = jest.fn(), value = 'Enum2';
|
|
34
34
|
var wrapper = (0, build_1.shallow)(react_1.default.createElement(DropDownEditor_1.DropDownEditor, { onChange: onChange, entries: entries }));
|
|
35
35
|
wrapper.find(MultipliableSelect_1.MultipliableSelect).simulate('change', value);
|
|
36
|
-
expect(onChange).
|
|
36
|
+
expect(onChange).toHaveBeenCalledWith(value);
|
|
37
37
|
});
|
|
38
38
|
});
|
package/cjs/EditModeAttributesFactory/components/EditModeAttribute/EditModeAttribute.test.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 __rest = (this && this.__rest) || function (s, e) {
|
|
37
14
|
var t = {};
|
|
38
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -50,12 +27,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
50
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
28
|
var react_1 = __importDefault(require("react"));
|
|
52
29
|
var enzyme_1 = require("enzyme");
|
|
53
|
-
var mdmSdk = __importStar(require("@reltio/mdm-sdk"));
|
|
54
30
|
var EditModeAttribute_1 = require("./EditModeAttribute");
|
|
31
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
55
32
|
var SimpleAttributeEditor_1 = require("../../../SimpleAttributeEditor");
|
|
56
33
|
var NestedAttributeEditor_1 = require("../../../NestedAttributeEditor");
|
|
57
34
|
var ReferenceAttributeEditor_1 = require("../../../ReferenceAttributeEditor");
|
|
58
|
-
jest.mock('@reltio/mdm-sdk');
|
|
35
|
+
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { isReltioCrosswalk: jest.fn() })); });
|
|
59
36
|
describe('EditModeAttribute', function () {
|
|
60
37
|
it('should render Simple attribute', function () {
|
|
61
38
|
var props = {
|
|
@@ -121,7 +98,7 @@ describe('EditModeAttribute', function () {
|
|
|
121
98
|
errors: [],
|
|
122
99
|
error: {}
|
|
123
100
|
};
|
|
124
|
-
|
|
101
|
+
mdm_sdk_1.isReltioCrosswalk.mockReturnValue(true);
|
|
125
102
|
var component = (0, enzyme_1.shallow)(react_1.default.createElement(EditModeAttribute_1.EditModeAttribute, __assign({}, props)));
|
|
126
103
|
expect(component.find(SimpleAttributeEditor_1.SimpleAttributeEditor).length).toBe(1);
|
|
127
104
|
expect(component.find(NestedAttributeEditor_1.NestedAttributeEditor).length).toBe(0);
|
|
@@ -129,6 +106,6 @@ describe('EditModeAttribute', function () {
|
|
|
129
106
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
130
107
|
var showEmptyEditors = props.showEmptyEditors, onAddAttributes = props.onAddAttributes, lazy = props.lazy, crosswalks = props.crosswalks, errors = props.errors, filteredProps = __rest(props, ["showEmptyEditors", "onAddAttributes", "lazy", "crosswalks", "errors"]); //eslint-disable-line no-unused-vars
|
|
131
108
|
expect(component.find(SimpleAttributeEditor_1.SimpleAttributeEditor).props()).toEqual(__assign(__assign({}, filteredProps), { isReltioCrosswalk: true }));
|
|
132
|
-
expect(
|
|
109
|
+
expect(mdm_sdk_1.isReltioCrosswalk).toHaveBeenCalledWith(props.crosswalks, props.attributeValue);
|
|
133
110
|
});
|
|
134
111
|
});
|
|
@@ -10,7 +10,7 @@ declare const _default: React.ComponentType<{
|
|
|
10
10
|
showEmptyEditors?: boolean;
|
|
11
11
|
showNonOv?: boolean;
|
|
12
12
|
className?: string;
|
|
13
|
-
|
|
13
|
+
fixedTypeUris?: string[];
|
|
14
14
|
highlightAttribute?: (element: AttributeType, type: ScrollType) => void;
|
|
15
15
|
} & Pick<EditModeAttributesPagerProps<AttributeValue>, "mode" | "crosswalks" | "parentUri" | "drawLines" | "onAddAttributes" | "onDeleteAttribute" | "onChangeAttribute" | "additionalControlsRenderer" | "showEmptyEditors">>;
|
|
16
16
|
export default _default;
|
|
@@ -53,11 +53,13 @@ var withContext_1 = require("../HOCs/withContext");
|
|
|
53
53
|
var ConfigPermissionsContext_1 = require("../contexts/ConfigPermissionsContext");
|
|
54
54
|
var ScrollToElementContext_1 = require("../contexts/ScrollToElementContext");
|
|
55
55
|
var HiddenAttributesContext_1 = require("../contexts/HiddenAttributesContext");
|
|
56
|
+
var AllwaysVisibleAttributesContext_1 = require("../contexts/AllwaysVisibleAttributesContext");
|
|
56
57
|
var EditModeAttributesList = function (_a) {
|
|
57
|
-
var parentAttributeType = _a.parentAttributeType, attrTypes = _a.attrTypes, entity = _a.entity, parentUri = _a.parentUri, showEmptyEditors = _a.showEmptyEditors, mode = _a.mode, crosswalks = _a.crosswalks, drawLines = _a.drawLines, children = _a.children, className = _a.className, _b = _a.
|
|
58
|
+
var parentAttributeType = _a.parentAttributeType, attrTypes = _a.attrTypes, entity = _a.entity, parentUri = _a.parentUri, showEmptyEditors = _a.showEmptyEditors, mode = _a.mode, crosswalks = _a.crosswalks, drawLines = _a.drawLines, children = _a.children, className = _a.className, _b = _a.fixedTypeUris, fixedTypeUris = _b === void 0 ? constants_1.FIXED_TYPE_URIS : _b, onAddAttributes = _a.onAddAttributes, onChangeAttribute = _a.onChangeAttribute, onDeleteAttribute = _a.onDeleteAttribute, additionalControlsRenderer = _a.additionalControlsRenderer, showNonOv = _a.showNonOv, highlightAttribute = _a.highlightAttribute;
|
|
58
59
|
var hiddenAttributes = (0, react_1.useContext)(HiddenAttributesContext_1.HiddenAttributesContext);
|
|
59
60
|
var entityUri = parentUri && (0, mdm_sdk_1.getBaseUri)(parentUri);
|
|
60
61
|
var currentEntityHiddenAttributes = (0, react_1.useMemo)(function () { return hiddenAttributes[entityUri] || []; }, [hiddenAttributes, entityUri]);
|
|
62
|
+
var alwaysVisibleAttributes = (0, react_1.useContext)(AllwaysVisibleAttributesContext_1.AlwaysVisibleAttributesContext);
|
|
61
63
|
var filteredAttrTypes = (0, react_1.useMemo)(function () { return attrTypes.filter(function (attrType) { return !currentEntityHiddenAttributes.includes(attrType.uri); }); }, [attrTypes, currentEntityHiddenAttributes]);
|
|
62
64
|
var _c = entity.attributes, attributes = _c === void 0 ? {} : _c;
|
|
63
65
|
var _d = (0, react_1.useState)({}), hasDeletionsMap = _d[0], setHasDeletionsMap = _d[1];
|
|
@@ -76,9 +78,18 @@ var EditModeAttributesList = function (_a) {
|
|
|
76
78
|
var moreAttrTypes = (0, helpers_1.getMoreAttrTypes)(creatableAttrTypes, entity, showEmptyEditors, hasDeletionsMap);
|
|
77
79
|
var pinnedAttributes = (0, react_1.useContext)(PinnedAttributesContext_1.PinnedAttributesContext);
|
|
78
80
|
var pagersData = (0, react_1.useMemo)(function () {
|
|
79
|
-
return (0, mdm_sdk_1.getAttributesListForEditMode)(filteredAttrTypes, mode, entity, showEmptyEditors, showNonOv, pinnedAttributes, canCreate);
|
|
80
|
-
}, [
|
|
81
|
-
|
|
81
|
+
return (0, mdm_sdk_1.getAttributesListForEditMode)(filteredAttrTypes, mode, entity, showEmptyEditors, showNonOv, pinnedAttributes, canCreate, alwaysVisibleAttributes);
|
|
82
|
+
}, [
|
|
83
|
+
filteredAttrTypes,
|
|
84
|
+
mode,
|
|
85
|
+
entity,
|
|
86
|
+
showEmptyEditors,
|
|
87
|
+
showNonOv,
|
|
88
|
+
pinnedAttributes,
|
|
89
|
+
canCreate,
|
|
90
|
+
alwaysVisibleAttributes
|
|
91
|
+
]);
|
|
92
|
+
var _e = (0, react_1.useMemo)(function () { return (0, attributesView_1.splitPagersData)(fixedTypeUris, pagersData); }, [pagersData, fixedTypeUris]), fixedPagersData = _e[0], regularPagersData = _e[1];
|
|
82
93
|
var onAddMoreAttributes = (0, react_1.useCallback)(function (attributeTypes) {
|
|
83
94
|
onAddAttributes(attributeTypes.map(function (attributeType) { return ({
|
|
84
95
|
attributeType: attributeType,
|
|
@@ -96,7 +107,7 @@ var EditModeAttributesList = function (_a) {
|
|
|
96
107
|
return (react_1.default.createElement("div", { className: className },
|
|
97
108
|
children && react_1.default.createElement(BranchDecorator_1.BranchDecorator, __assign({}, decoratorProps), children),
|
|
98
109
|
react_1.default.createElement(BranchDecorator_1.BranchDecorator, __assign({}, decoratorProps, { plain: true }), moreAttrTypes.length > 0 && mode !== mdm_sdk_1.Mode.Viewing && (react_1.default.createElement(MoreAttributesButton_1.MoreAttributesButton, { label: ui_i18n_1.default.text('More attributes'), onApply: onAddMoreAttributes, dense: drawLines, data: moreAttrTypes, parent: canCreateParentAttrType && parentAttributeType }))),
|
|
99
|
-
react_1.default.createElement(HasDeletionsContext_1.HasDeletionsContext.Provider, { value: hasDeletionsContextValue }, regularPagersData.concat(
|
|
110
|
+
react_1.default.createElement(HasDeletionsContext_1.HasDeletionsContext.Provider, { value: hasDeletionsContextValue }, regularPagersData.concat(fixedPagersData).map(function (_a) {
|
|
100
111
|
var attrType = _a.attrType, values = _a.values;
|
|
101
112
|
return (react_1.default.createElement(EditModeAttributesPager_1.EditModeAttributesPager, { key: "".concat(attrType.uri, "_").concat(parentUri), attributeType: attrType, drawLines: drawLines, values: values, paging: (0, ramda_1.path)(['paging', attrType.uri], attributes), parentUri: parentUri, showEmptyEditors: showEmptyEditors, mode: mode, crosswalks: crosswalks, onAddAttributes: onAddAttributes, onChangeAttribute: onChangeAttribute, onDeleteAttribute: onDeleteAttribute, additionalControlsRenderer: additionalControlsRenderer, showNonOv: showNonOv }));
|
|
102
113
|
}))));
|
|
@@ -25,6 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
var react_1 = __importDefault(require("react"));
|
|
27
27
|
var enzyme_1 = require("enzyme");
|
|
28
|
+
var test_utils_1 = require("react-dom/test-utils");
|
|
28
29
|
var EditModeAttributesList_1 = __importDefault(require("./EditModeAttributesList"));
|
|
29
30
|
var MoreAttributesButton_1 = require("../MoreAttributesButton");
|
|
30
31
|
var EditModeAttributesPager_1 = require("../EditModeAttributesPager");
|
|
@@ -33,7 +34,7 @@ var attributes_test_data_1 = require("./attributes.test-data");
|
|
|
33
34
|
var BranchDecorator_1 = require("../BranchDecorator");
|
|
34
35
|
var ramda_1 = require("ramda");
|
|
35
36
|
var HasDeletionsContext_1 = require("../contexts/HasDeletionsContext");
|
|
36
|
-
var
|
|
37
|
+
var test_utils_2 = require("../test-utils");
|
|
37
38
|
var PinnedAttributesContext_1 = require("../contexts/PinnedAttributesContext");
|
|
38
39
|
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { getAttributesListForEditMode: jest
|
|
39
40
|
.fn()
|
|
@@ -134,8 +135,10 @@ describe('EditModeAttributesList tests', function () {
|
|
|
134
135
|
var component = (0, enzyme_1.mount)(react_1.default.createElement(EditModeAttributesList_1.default, { attrTypes: attrTypes, entity: entity, parentUri: parentUri, showEmptyEditors: true }));
|
|
135
136
|
var _b = component.find(HasDeletionsContext_1.HasDeletionsContext.Provider).prop('value'), hasDeletionsMap = _b.hasDeletionsMap, setHasDeletions = _b.setHasDeletions;
|
|
136
137
|
expect(hasDeletionsMap).toEqual({});
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
(0, test_utils_1.act)(function () {
|
|
139
|
+
setHasDeletions(attrTypes[0].uri, true);
|
|
140
|
+
});
|
|
141
|
+
(0, test_utils_2.rerenderWrapper)(component);
|
|
139
142
|
expect(component.find(MoreAttributesButton_1.MoreAttributesButton).length).toBe(1);
|
|
140
143
|
expect(component.find(MoreAttributesButton_1.MoreAttributesButton).prop('data')).toEqual([attrTypes[0]]);
|
|
141
144
|
expect(component.find(HasDeletionsContext_1.HasDeletionsContext.Provider).prop('value').hasDeletionsMap).toEqual((_a = {},
|
|
@@ -353,6 +356,6 @@ describe('EditModeAttributesList tests', function () {
|
|
|
353
356
|
(0, enzyme_1.mount)(react_1.default.createElement(PinnedAttributesContext_1.PinnedAttributesContext.Provider, { value: pinnedAttributes },
|
|
354
357
|
react_1.default.createElement(EditModeAttributesList_1.default, { mode: mdm_sdk_1.Mode.Editing, attrTypes: attributes_test_data_1.attributesList, entity: entity, parentUri: parentUri },
|
|
355
358
|
react_1.default.createElement(Child, null))));
|
|
356
|
-
expect(mdm_sdk_1.getAttributesListForEditMode).toHaveBeenCalledWith(attributes_test_data_1.attributesList, mdm_sdk_1.Mode.Editing, entity, undefined, undefined, pinnedAttributes, true);
|
|
359
|
+
expect(mdm_sdk_1.getAttributesListForEditMode).toHaveBeenCalledWith(attributes_test_data_1.attributesList, mdm_sdk_1.Mode.Editing, entity, undefined, undefined, pinnedAttributes, true, []);
|
|
357
360
|
});
|
|
358
361
|
});
|
|
@@ -46,7 +46,6 @@ var types_1 = require("./types");
|
|
|
46
46
|
var ScrollToElementContext_1 = require("../contexts/ScrollToElementContext");
|
|
47
47
|
var MdmModuleContext_1 = require("../contexts/MdmModuleContext");
|
|
48
48
|
var HiddenAttributesContext_1 = require("../contexts/HiddenAttributesContext");
|
|
49
|
-
var mdm_sdk_2 = require("@reltio/mdm-sdk");
|
|
50
49
|
var EditModeAttributesPager = function (_a) {
|
|
51
50
|
var _b;
|
|
52
51
|
var values = _a.values, attributeType = _a.attributeType, _c = _a.mode, mode = _c === void 0 ? mdm_sdk_1.Mode.Viewing : _c, crosswalks = _a.crosswalks, drawLines = _a.drawLines, _d = _a.paging, paging = _d === void 0 ? {} : _d, parentUri = _a.parentUri, maxProp = _a.max, showEmptyEditors = _a.showEmptyEditors, showNonOv = _a.showNonOv, highlightedError = _a.highlightedError, highlightedAttribute = _a.highlightedAttribute, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, additionalControlsRenderer = _a.additionalControlsRenderer;
|
|
@@ -56,7 +55,7 @@ var EditModeAttributesPager = function (_a) {
|
|
|
56
55
|
var entityUri = parentUri && (0, mdm_sdk_1.getBaseUri)(parentUri);
|
|
57
56
|
var currentEntityHiddenAttributes = (0, react_1.useMemo)(function () { return hiddenAttributes[entityUri] || []; }, [hiddenAttributes, entityUri]);
|
|
58
57
|
var mdmActiveErrors = (0, MdmModuleContext_1.useMdmActiveErrorsForAttributesPager)(parentUri, attributeType);
|
|
59
|
-
var activeErrors = (0, react_1.useMemo)(function () { return (0,
|
|
58
|
+
var activeErrors = (0, react_1.useMemo)(function () { return (0, mdm_sdk_1.filterErrorsForHiddenAttributes)(mdmActiveErrors, currentEntityHiddenAttributes); }, [mdmActiveErrors, currentEntityHiddenAttributes]);
|
|
60
59
|
var profileErrors = (0, MdmModuleContext_1.useMdmProfileErrors)();
|
|
61
60
|
var maxValuesInResponse = (0, MdmModuleContext_1.useMdmMaxValuesInResponse)();
|
|
62
61
|
var errorMessage = (0, mdm_sdk_1.getAttributePagerActiveTypeErrorMessage)(parentUri, attributeType, profileErrors);
|