@reltio/components 1.4.2070 → 1.4.2072
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/AttributesView/AttributesView.js +1 -1
- package/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.d.ts +2 -3
- package/ColumnsSettings/helpers.d.ts +3 -1
- package/ColumnsSettings/types.d.ts +8 -0
- package/CommentsContainer/CommentsContainer.js +1 -1
- package/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +23 -40
- package/ConfigureColumnsPopup/ConfigureColumnsPopup.js +6 -26
- package/EditModeAttributesList/EditModeAttributesList.js +1 -1
- package/EditModeAttributesPager/EditModeAttributesPager.test.js +1 -1
- package/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +1 -1
- package/FacetViewHeader/FacetViewHeader.js +1 -1
- package/ImageAttributesLine/imageAttributeValues.test-data.js +8 -0
- package/ImageAttributesLine/index.d.ts +1 -1
- package/ImageAttributesLine/index.js +1 -1
- package/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +1 -1
- package/MergeButton/MergeButton.spec.js +55 -124
- package/MetadataTypesSelector/MetadataTypesSelector.d.ts +2 -1
- package/MetadataTypesSelector/MetadataTypesSelector.js +1 -1
- package/MetadataTypesSelector/MetadataTypesSelector.test.js +193 -190
- package/MetadataTypesSelector/components/SelectMetadataTypesList/SelectMetadataTypesList.d.ts +5 -6
- package/MoreAttributesButton/MoreAttributesButton.test.js +173 -166
- package/MoreAttributesButton/useMoreAttributesItems.d.ts +1 -1
- package/MultiValueSelector/MultiValueSelector.test.js +78 -38
- package/MultipliableSelect/MultipliableSelect.test.js +111 -47
- package/NestedAttribute/NestedAttribute.test.js +121 -42
- package/NestedAttributeEditor/NestedAttributeEditor.test.js +95 -41
- package/NotMatchButton/NotMatchButton.spec.js +51 -100
- package/PieChart/PieChart.test.js +130 -114
- package/PinButton/PinButton.spec.js +89 -22
- package/PivotingTooltip/PivotingTooltip.test.js +338 -174
- package/PotentialMatchReviewCard/PotentialMatchReviewCard.spec.js +94 -29
- package/ProfileBand/ProfileBand.spec.js +60 -53
- package/ProfileCard/ProfileCard.test.js +109 -27
- package/ProfilesList/ProfilesList.d.ts +1 -3
- package/ProfilesList/ProfilesList.js +1 -1
- package/ProfilesList/ProfilesList.spec.js +226 -211
- package/QueryBuilderRow/QueryBuilderRow.spec.js +83 -90
- package/QueryBuilderRowsGroup/QueryBuilderRowsGroup.spec.js +195 -86
- package/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +73 -15
- package/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.test.js +71 -117
- package/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.test.js +128 -61
- package/ReadOnlyAttributesFactory/components/ReadOnlyAttribute/ReadOnlyAttribute.test.js +179 -44
- package/ReadOnlyAttributesList/ReadOnlyAttributesList.js +1 -1
- package/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +254 -211
- package/ReadOnlyAttributesList/attributes.test-data.js +4 -4
- package/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +1 -1
- package/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +75 -18
- package/ReadOnlyAttributesView/ReadOnlyAttributesView.js +1 -1
- package/ReadOnlyAttributesView/ReadOnlyAttributesView.test.js +187 -312
- package/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.test.js +210 -219
- package/ReadOnlyImageAttributesLine/ReadOnlyImageAttributesLine.test.js +89 -89
- package/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +556 -602
- package/ReferenceAttributeEditor/metadata.test-data.d.ts +13 -13
- package/ReferenceAttributeEditor/metadata.test-data.js +2 -2
- package/ReferenceAttributeEditor/styles.d.ts +1 -1
- package/RelationEditor/RelationEditor.test.js +1448 -1392
- package/RelationTypeSelector/RelationTypeSelector.test.js +99 -17
- package/RelationTypesSelector/RelationTypesSelector.test.js +73 -22
- package/ReltioMap/ReltioMap.spec.js +51 -25
- package/Roles/Roles.test.js +54 -10
- package/ScreenProfileBand/ScreenProfileBand.test.js +142 -72
- package/ScrollableTabs/ScrollableTabs.test.js +69 -19
- package/SearchHighlighter/SearchHighlighter.test.js +18 -7
- package/SelectAttributesList/SelectAttributesList.d.ts +11 -6
- package/SelectAttributesList/SelectAttributesList.js +5 -2
- package/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +109 -60
- package/SidePanelContentHeader/SidePanelContentHeader.js +2 -2
- package/SidePanelContentHeader/SidePanelContentHeader.test.js +104 -0
- package/SidePanelEmptyState/SidePanelEmptyState.js +1 -1
- package/SidePanelEmptyState/SidePanelEmptyState.test.js +24 -0
- package/SimpleAttribute/SimpleAttribute.js +1 -1
- package/SimpleAttribute/SimpleAttribute.test.js +155 -80
- package/SimpleAttributeEditor/SimpleAttributeEditor.test.js +339 -330
- package/SimpleAttributeEditor/useAttributeValuePermissions.js +1 -1
- package/SimpleDropDownSelector/SimpleDropDownSelector.test.js +86 -10
- package/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.js +1 -1
- package/SimpleDropDownSelector/components/DropDownValue/DropDownValue.js +1 -1
- package/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +128 -32
- package/SmallIconButton/SmallIconButton.test.js +98 -25
- package/TableWithBars/TableWithBars.test.js +98 -60
- package/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.js +1 -1
- package/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.js +1 -1
- package/Tags/Tags.d.ts +0 -1
- package/Tags/Tags.test.js +8 -7
- package/TransitiveMatchBlock/TransitiveMatchBlock.test.js +78 -22
- package/TransitiveMatchRule/TransitiveMatchRule.test.js +78 -37
- package/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.js +1 -1
- package/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.test.js +12 -18
- package/UploadFileButton/UploadFileButton.d.ts +2 -2
- package/UploadFileButton/UploadFileButton.test.js +199 -0
- package/UploadImageDialog/UploadImageDialog.test.js +1 -0
- package/UploadImageDialog/components/DividerWithText/DividerWithText.js +1 -1
- package/UploadImageDialog/components/ErrorSnackbar/ErrorSnackbar.test.js +80 -22
- package/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.js +1 -1
- package/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.test.js +162 -49
- package/ValueChip/ValueChip.test.js +7 -23
- package/VirtualGroupedList/VirtualGroupedList.d.ts +19 -31
- package/VirtualGroupedList/VirtualGroupedList.js +11 -36
- package/VirtualGroupedList/VirtualGroupedList.test.js +224 -0
- package/VirtualGroupedList/helpers.d.ts +7 -2
- package/VirtualGroupedList/helpers.js +3 -1
- package/VirtualGroupedList/index.d.ts +1 -1
- package/VirtualGroupedList/types.d.ts +10 -6
- package/VirtualGroupedList/useScrollToFocusItem.d.ts +8 -5
- package/WhiteSearchInput/{WhiteSearchInput.spec.js → WhiteSearchInput.test.js} +3 -8
- package/cjs/AttributesView/AttributesView.js +2 -2
- package/cjs/ColumnsSettings/components/ColumnsSettingsPopup/ColumnsSettingsPopup.d.ts +2 -3
- package/cjs/ColumnsSettings/helpers.d.ts +3 -1
- package/cjs/ColumnsSettings/types.d.ts +8 -0
- package/cjs/ColumnsSettings/types.js +2 -0
- package/cjs/CommentsContainer/CommentsContainer.js +1 -1
- package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.d.ts +23 -40
- package/cjs/ConfigureColumnsPopup/ConfigureColumnsPopup.js +6 -26
- package/cjs/EditModeAttributesList/EditModeAttributesList.js +2 -2
- package/cjs/EditModeAttributesPager/EditModeAttributesPager.test.js +2 -2
- package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +2 -2
- package/cjs/FacetViewHeader/FacetViewHeader.js +1 -1
- package/cjs/ImageAttributesLine/imageAttributeValues.test-data.js +8 -0
- package/cjs/ImageAttributesLine/index.d.ts +1 -1
- package/cjs/ImageAttributesLine/index.js +2 -1
- package/cjs/ImageDetailsView/components/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +1 -1
- package/cjs/MergeButton/MergeButton.spec.js +55 -124
- package/cjs/MetadataTypesSelector/MetadataTypesSelector.d.ts +2 -1
- package/cjs/MetadataTypesSelector/MetadataTypesSelector.js +1 -1
- package/cjs/MetadataTypesSelector/MetadataTypesSelector.test.js +193 -190
- package/cjs/MetadataTypesSelector/components/SelectMetadataTypesList/SelectMetadataTypesList.d.ts +5 -6
- package/cjs/MoreAttributesButton/MoreAttributesButton.test.js +172 -165
- package/cjs/MoreAttributesButton/useMoreAttributesItems.d.ts +1 -1
- package/cjs/MultiValueSelector/MultiValueSelector.test.js +78 -38
- package/cjs/MultipliableSelect/MultipliableSelect.test.js +111 -47
- package/cjs/NestedAttribute/NestedAttribute.test.js +121 -42
- package/cjs/NestedAttributeEditor/NestedAttributeEditor.test.js +94 -40
- package/cjs/NotMatchButton/NotMatchButton.spec.js +51 -100
- package/cjs/PieChart/PieChart.test.js +130 -114
- package/cjs/PinButton/PinButton.spec.js +89 -22
- package/cjs/PivotingTooltip/PivotingTooltip.test.js +338 -174
- package/cjs/PotentialMatchReviewCard/PotentialMatchReviewCard.spec.js +94 -29
- package/cjs/ProfileBand/ProfileBand.spec.js +60 -53
- package/cjs/ProfileCard/ProfileCard.test.js +109 -27
- package/cjs/ProfilesList/ProfilesList.d.ts +1 -3
- package/cjs/ProfilesList/ProfilesList.js +1 -1
- package/cjs/ProfilesList/ProfilesList.spec.js +226 -211
- package/cjs/QueryBuilderRow/QueryBuilderRow.spec.js +83 -90
- package/cjs/QueryBuilderRowsGroup/QueryBuilderRowsGroup.spec.js +195 -86
- package/cjs/ReactSelectLoadMoreButton/ReactSelectLoadMoreButton.test.js +73 -15
- package/cjs/ReactSelectMenuWithPopper/ReactSelectMenuWithPopper.test.js +71 -117
- package/cjs/ReadOnlyAttributeValuesBlock/ReadOnlyAttributeValuesBlock.test.js +128 -61
- package/cjs/ReadOnlyAttributesFactory/components/ReadOnlyAttribute/ReadOnlyAttribute.test.js +179 -44
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.js +2 -2
- package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.test.js +254 -211
- package/cjs/ReadOnlyAttributesList/attributes.test-data.js +4 -4
- package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +2 -2
- package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.test.js +75 -18
- package/cjs/ReadOnlyAttributesView/ReadOnlyAttributesView.js +2 -2
- package/cjs/ReadOnlyAttributesView/ReadOnlyAttributesView.test.js +185 -310
- package/cjs/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.test.js +209 -218
- package/cjs/ReadOnlyImageAttributesLine/ReadOnlyImageAttributesLine.test.js +89 -89
- package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.test.js +555 -601
- package/cjs/ReferenceAttributeEditor/metadata.test-data.d.ts +13 -13
- package/cjs/ReferenceAttributeEditor/metadata.test-data.js +2 -2
- package/cjs/ReferenceAttributeEditor/styles.d.ts +1 -1
- package/cjs/RelationEditor/RelationEditor.test.js +1446 -1390
- package/cjs/RelationTypeSelector/RelationTypeSelector.test.js +99 -17
- package/cjs/RelationTypesSelector/RelationTypesSelector.test.js +73 -22
- package/cjs/ReltioMap/ReltioMap.spec.js +51 -25
- package/cjs/Roles/Roles.test.js +54 -10
- package/cjs/ScreenProfileBand/ScreenProfileBand.test.js +141 -71
- package/cjs/ScrollableTabs/ScrollableTabs.test.js +69 -19
- package/cjs/SearchHighlighter/SearchHighlighter.test.js +18 -7
- package/cjs/SelectAttributesList/SelectAttributesList.d.ts +11 -6
- package/cjs/SelectAttributesList/SelectAttributesList.js +5 -2
- package/cjs/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.test.js +109 -60
- package/cjs/SidePanelContentHeader/SidePanelContentHeader.js +2 -2
- package/cjs/SidePanelContentHeader/SidePanelContentHeader.test.js +109 -0
- package/cjs/SidePanelEmptyState/SidePanelEmptyState.js +1 -1
- package/cjs/SidePanelEmptyState/SidePanelEmptyState.test.js +29 -0
- package/cjs/SimpleAttribute/SimpleAttribute.js +1 -1
- package/cjs/SimpleAttribute/SimpleAttribute.test.js +155 -80
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.test.js +338 -352
- package/cjs/SimpleAttributeEditor/useAttributeValuePermissions.js +2 -2
- package/cjs/SimpleDropDownSelector/SimpleDropDownSelector.test.js +86 -10
- package/cjs/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.js +1 -1
- package/cjs/SimpleDropDownSelector/components/DropDownValue/DropDownValue.js +1 -1
- package/cjs/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +127 -31
- package/cjs/SmallIconButton/SmallIconButton.test.js +98 -25
- package/cjs/TableWithBars/TableWithBars.test.js +98 -60
- package/cjs/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.js +1 -1
- package/cjs/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.js +1 -1
- package/cjs/Tags/Tags.d.ts +0 -1
- package/cjs/Tags/Tags.test.js +8 -7
- package/cjs/TransitiveMatchBlock/TransitiveMatchBlock.test.js +77 -21
- package/cjs/TransitiveMatchRule/TransitiveMatchRule.test.js +78 -37
- package/cjs/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.js +1 -1
- package/cjs/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.test.js +12 -18
- package/cjs/UploadFileButton/UploadFileButton.d.ts +2 -2
- package/cjs/UploadFileButton/UploadFileButton.test.js +204 -0
- package/cjs/UploadImageDialog/UploadImageDialog.test.js +1 -0
- package/cjs/UploadImageDialog/components/DividerWithText/DividerWithText.js +1 -1
- package/cjs/UploadImageDialog/components/ErrorSnackbar/ErrorSnackbar.test.js +80 -22
- package/cjs/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.js +1 -1
- package/cjs/UploadImageDialog/components/ImageByUrlField/ImageByUrlField.test.js +162 -49
- package/cjs/ValueChip/ValueChip.test.js +7 -23
- package/cjs/VirtualGroupedList/VirtualGroupedList.d.ts +19 -31
- package/cjs/VirtualGroupedList/VirtualGroupedList.js +11 -36
- package/cjs/VirtualGroupedList/VirtualGroupedList.test.js +252 -0
- package/cjs/VirtualGroupedList/helpers.d.ts +7 -2
- package/cjs/VirtualGroupedList/helpers.js +3 -1
- package/cjs/VirtualGroupedList/index.d.ts +1 -1
- package/cjs/VirtualGroupedList/types.d.ts +10 -6
- package/cjs/VirtualGroupedList/useScrollToFocusItem.d.ts +8 -5
- package/cjs/WhiteSearchInput/{WhiteSearchInput.spec.js → WhiteSearchInput.test.js} +3 -8
- package/cjs/features/crosswalks/hooks/useAttributeActions.test.js +24 -25
- package/cjs/features/crosswalks/hooks/useCrosswalkActions.test.js +10 -11
- package/cjs/features/workflow/hooks/useChangeRequest.test.js +5 -6
- package/cjs/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +8 -9
- package/cjs/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +9 -13
- package/features/crosswalks/hooks/useAttributeActions.test.js +1 -2
- package/features/crosswalks/hooks/useCrosswalkActions.test.js +1 -2
- package/features/workflow/hooks/useChangeRequest.test.js +1 -2
- package/hooks/useCommentsEntitiesMap/useCommentsEntitiesMap.test.js +1 -2
- package/hooks/useKeyboardNavigation/useKeyboardNavigation.d.ts +9 -13
- package/package.json +1 -1
- package/MetadataTypesSelector/components/ListLabel/ListLabel.test.js +0 -24
- package/PivotingTooltip/IntegrationPivotingTooltip.test.js +0 -356
- package/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +0 -201
- package/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.js +0 -43
- package/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.js +0 -31
- package/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.js +0 -31
- package/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.js +0 -45
- package/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.js +0 -114
- package/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.js +0 -107
- package/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +0 -72
- package/RelationEditor/IntegrationRelationEditor.test.js +0 -337
- package/ReltioMap/components/MapControlContainer/MapControlContainer.d.ts +0 -10
- package/ReltioMap/components/MapControlContainer/MapControlContainer.js +0 -24
- package/ReltioMap/components/MapControlContainer/MapControlContainer.spec.d.ts +0 -1
- package/ReltioMap/components/MapControlContainer/MapControlContainer.spec.js +0 -33
- package/ReltioMap/components/MapControlContainer/index.d.ts +0 -1
- package/ReltioMap/components/MapControlContainer/index.js +0 -1
- package/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.d.ts +0 -1
- package/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.js +0 -36
- package/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.d.ts +0 -1
- package/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.js +0 -60
- package/Roles/components/Role/Role.test.d.ts +0 -1
- package/Roles/components/Role/Role.test.js +0 -55
- package/SidePanelContentHeader/SidePanelContentHeader.spec.d.ts +0 -1
- package/SidePanelContentHeader/SidePanelContentHeader.spec.js +0 -49
- package/SidePanelEmptyState/SidePanelEmptyState.spec.d.ts +0 -1
- package/SidePanelEmptyState/SidePanelEmptyState.spec.js +0 -24
- package/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.d.ts +0 -1
- package/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.js +0 -103
- package/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.d.ts +0 -1
- package/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.js +0 -13
- package/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.d.ts +0 -1
- package/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.js +0 -21
- package/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.d.ts +0 -1
- package/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.js +0 -20
- package/UploadFileButton/UploadFileButton.spec.d.ts +0 -1
- package/UploadFileButton/UploadFileButton.spec.js +0 -219
- package/UploadImageDialog/components/DividerWithText/DividerWithText.test.d.ts +0 -1
- package/UploadImageDialog/components/DividerWithText/DividerWithText.test.js +0 -9
- package/VirtualGroupedList/VirtualGroupedList.spec.d.ts +0 -1
- package/VirtualGroupedList/VirtualGroupedList.spec.js +0 -282
- package/WhiteSearchInput/WhiteSearchInput.spec.d.ts +0 -1
- package/cjs/MetadataTypesSelector/components/ListLabel/ListLabel.test.d.ts +0 -1
- package/cjs/MetadataTypesSelector/components/ListLabel/ListLabel.test.js +0 -52
- package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.d.ts +0 -1
- package/cjs/PivotingTooltip/IntegrationPivotingTooltip.test.js +0 -361
- package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.d.ts +0 -1
- package/cjs/PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.js +0 -206
- package/cjs/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.d.ts +0 -1
- package/cjs/ProfileCard/components/ProfileCardContent/ProfileCardContent.test.js +0 -48
- package/cjs/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.d.ts +0 -1
- package/cjs/QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.js +0 -36
- package/cjs/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.d.ts +0 -1
- package/cjs/QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.js +0 -36
- package/cjs/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.d.ts +0 -1
- package/cjs/ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.js +0 -50
- package/cjs/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.d.ts +0 -1
- package/cjs/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.js +0 -119
- package/cjs/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.d.ts +0 -1
- package/cjs/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.js +0 -112
- package/cjs/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.d.ts +0 -1
- package/cjs/ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.js +0 -77
- package/cjs/RelationEditor/IntegrationRelationEditor.test.d.ts +0 -1
- package/cjs/RelationEditor/IntegrationRelationEditor.test.js +0 -342
- package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.d.ts +0 -10
- package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.js +0 -28
- package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.spec.d.ts +0 -1
- package/cjs/ReltioMap/components/MapControlContainer/MapControlContainer.spec.js +0 -38
- package/cjs/ReltioMap/components/MapControlContainer/index.d.ts +0 -1
- package/cjs/ReltioMap/components/MapControlContainer/index.js +0 -5
- package/cjs/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.d.ts +0 -1
- package/cjs/ReltioMap/components/TopCenterMapControls/TopCenterMapControls.spec.js +0 -41
- package/cjs/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.d.ts +0 -1
- package/cjs/ReltioMap/components/TopRightMapControls/TopRightMapControls.spec.js +0 -65
- package/cjs/Roles/components/Role/Role.test.d.ts +0 -1
- package/cjs/Roles/components/Role/Role.test.js +0 -60
- package/cjs/SidePanelContentHeader/SidePanelContentHeader.spec.d.ts +0 -1
- package/cjs/SidePanelContentHeader/SidePanelContentHeader.spec.js +0 -54
- package/cjs/SidePanelEmptyState/SidePanelEmptyState.spec.d.ts +0 -1
- package/cjs/SidePanelEmptyState/SidePanelEmptyState.spec.js +0 -29
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.d.ts +0 -1
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditorWithoutPermissions.test.js +0 -108
- package/cjs/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.d.ts +0 -1
- package/cjs/SimpleDropDownSelector/components/DropDownPlaceholder/DropDownPlaceholder.test.js +0 -18
- package/cjs/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.d.ts +0 -1
- package/cjs/TableWithBars/components/AttributeCellRenderer/AttributeCellRenderer.test.js +0 -26
- package/cjs/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.d.ts +0 -1
- package/cjs/TableWithBars/components/HeadCellRenderer/HeadCellRenderer.test.js +0 -25
- package/cjs/UploadFileButton/UploadFileButton.spec.d.ts +0 -1
- package/cjs/UploadFileButton/UploadFileButton.spec.js +0 -224
- package/cjs/UploadImageDialog/components/DividerWithText/DividerWithText.test.d.ts +0 -1
- package/cjs/UploadImageDialog/components/DividerWithText/DividerWithText.test.js +0 -14
- package/cjs/VirtualGroupedList/VirtualGroupedList.spec.d.ts +0 -1
- package/cjs/VirtualGroupedList/VirtualGroupedList.spec.js +0 -287
- package/cjs/WhiteSearchInput/WhiteSearchInput.spec.d.ts +0 -1
- /package/{MetadataTypesSelector/components/ListLabel/ListLabel.test.d.ts → ColumnsSettings/types.js} +0 -0
- /package/{PivotingTooltip/IntegrationPivotingTooltip.test.d.ts → SidePanelContentHeader/SidePanelContentHeader.test.d.ts} +0 -0
- /package/{PivotingTooltip/components/PivotingTooltipContent/PivotingTooltipContent.test.d.ts → SidePanelEmptyState/SidePanelEmptyState.test.d.ts} +0 -0
- /package/{ProfileCard/components/ProfileCardContent/ProfileCardContent.test.d.ts → UploadFileButton/UploadFileButton.test.d.ts} +0 -0
- /package/{QueryBuilderRow/components/ReadOnlyFilter/ReadOnlyFilter.spec.d.ts → VirtualGroupedList/VirtualGroupedList.test.d.ts} +0 -0
- /package/{QueryBuilderRow/components/ReadOnlyLogicOperator/ReadOnlyLogicOperator.spec.d.ts → WhiteSearchInput/WhiteSearchInput.test.d.ts} +0 -0
- /package/{ReadOnlyAttributesPager/components/ImageLineRenderer/ImageLineRenderer.test.d.ts → cjs/SidePanelContentHeader/SidePanelContentHeader.test.d.ts} +0 -0
- /package/{ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.test.d.ts → cjs/SidePanelEmptyState/SidePanelEmptyState.test.d.ts} +0 -0
- /package/{ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.test.d.ts → cjs/UploadFileButton/UploadFileButton.test.d.ts} +0 -0
- /package/{ReadOnlyAttributesPager/components/SpecialRenderer/SpecialRenderer.test.d.ts → cjs/VirtualGroupedList/VirtualGroupedList.test.d.ts} +0 -0
- /package/{RelationEditor/IntegrationRelationEditor.test.d.ts → cjs/WhiteSearchInput/WhiteSearchInput.test.d.ts} +0 -0
- /package/cjs/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.d.ts +0 -0
- /package/cjs/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.js +0 -0
- /package/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.d.ts +0 -0
- /package/contexts/{AllwaysVisibleAttributesContext → AlwaysVisibleAttributesContext}/index.js +0 -0
|
@@ -44,11 +44,11 @@ var ShowLess_1 = require("../ShowLess");
|
|
|
44
44
|
var constants_1 = require("../constants");
|
|
45
45
|
var attributesView_1 = require("../helpers/attributesView");
|
|
46
46
|
var HiddenAttributesContext_1 = require("../contexts/HiddenAttributesContext");
|
|
47
|
-
var
|
|
47
|
+
var AlwaysVisibleAttributesContext_1 = require("../contexts/AlwaysVisibleAttributesContext");
|
|
48
48
|
var ReadOnlyAttributesList = function (_a) {
|
|
49
49
|
var _b = _a.attrTypes, attrTypes = _b === void 0 ? [] : _b, entity = _a.entity, parentUri = _a.parentUri, drawLines = _a.drawLines, children = _a.children, className = _a.className, max = _a.max, _c = _a.fixedTypeUris, fixedTypeUris = _c === void 0 ? constants_1.FIXED_TYPE_URIS : _c, showNonOv = _a.showNonOv, classes = _a.classes;
|
|
50
50
|
var hiddenAttributes = (0, react_1.useContext)(HiddenAttributesContext_1.HiddenAttributesContext);
|
|
51
|
-
var alwaysVisibleAttributes = (0, react_1.useContext)(
|
|
51
|
+
var alwaysVisibleAttributes = (0, react_1.useContext)(AlwaysVisibleAttributesContext_1.AlwaysVisibleAttributesContext);
|
|
52
52
|
var entityUri = parentUri && (0, mdm_sdk_1.getBaseUri)(parentUri);
|
|
53
53
|
var currentEntityHiddenAttributes = (0, react_1.useMemo)(function () { return hiddenAttributes[entityUri] || []; }, [hiddenAttributes, entityUri]);
|
|
54
54
|
var filteredAttrTypes = (0, react_1.useMemo)(function () { return (attrTypes || []).filter(function (attrType) { return !currentEntityHiddenAttributes.includes(attrType.uri); }); }, [attrTypes, currentEntityHiddenAttributes]);
|
|
@@ -10,6 +10,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
13
49
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
50
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
51
|
if (ar || !(i in from)) {
|
|
@@ -24,95 +60,100 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
60
|
};
|
|
25
61
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
62
|
var react_1 = __importDefault(require("react"));
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var ReadOnlyAttributesPager_1 = require("../ReadOnlyAttributesPager");
|
|
63
|
+
var react_2 = require("@testing-library/react");
|
|
64
|
+
var user_event_1 = __importDefault(require("@testing-library/user-event"));
|
|
30
65
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
31
|
-
var
|
|
32
|
-
var ShowMore_1 = require("../ShowMore");
|
|
33
|
-
var ShowLess_1 = require("../ShowLess");
|
|
66
|
+
var ReadOnlyAttributesList_1 = __importDefault(require("./ReadOnlyAttributesList"));
|
|
34
67
|
var attributes_test_data_1 = require("./attributes.test-data");
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
68
|
+
var MdmModuleContext_1 = require("../contexts/MdmModuleContext");
|
|
69
|
+
var defaultEntity = {
|
|
70
|
+
type: 'configuration/entityTypes/HCP',
|
|
71
|
+
uri: 'entities/xT3HJZ7',
|
|
72
|
+
attributes: {
|
|
38
73
|
Role: [
|
|
39
74
|
{
|
|
40
75
|
ov: true,
|
|
41
|
-
type: 'configuration/
|
|
42
|
-
uri: '
|
|
43
|
-
value: ''
|
|
76
|
+
type: 'configuration/entityTypes/HCP/attributes/Role',
|
|
77
|
+
uri: 'entities/xT3HJZ7/attributes/Role/nAs391Ab',
|
|
78
|
+
value: 'Some role 1'
|
|
44
79
|
},
|
|
45
80
|
{
|
|
46
81
|
ov: true,
|
|
47
|
-
type: 'configuration/
|
|
48
|
-
uri: '
|
|
49
|
-
value: 'Some role'
|
|
82
|
+
type: 'configuration/entityTypes/HCP/attributes/Role',
|
|
83
|
+
uri: 'entities/xT3HJZ7/attributes/Role/8AmySE1',
|
|
84
|
+
value: 'Some role 2'
|
|
50
85
|
}
|
|
51
86
|
],
|
|
52
87
|
Name: [
|
|
53
88
|
{
|
|
54
89
|
ov: true,
|
|
55
|
-
type: 'configuration/
|
|
56
|
-
uri: '
|
|
57
|
-
value: ''
|
|
90
|
+
type: 'configuration/entityTypes/HCP/attributes/Name',
|
|
91
|
+
uri: 'entities/xT3HJZ7/attributes/Name/8Ans02G',
|
|
92
|
+
value: 'Some name'
|
|
58
93
|
}
|
|
59
94
|
],
|
|
60
95
|
LastName: [
|
|
61
96
|
{
|
|
62
97
|
ov: true,
|
|
63
|
-
type: 'configuration/
|
|
64
|
-
uri: '
|
|
65
|
-
value: ''
|
|
98
|
+
type: 'configuration/entityTypes/HCP/attributes/LastName',
|
|
99
|
+
uri: 'entities/xT3HJZ7/attributes/LastName/pZXO45h',
|
|
100
|
+
value: 'Some last name'
|
|
66
101
|
}
|
|
67
102
|
],
|
|
68
103
|
paging: {
|
|
69
|
-
'configuration/
|
|
104
|
+
'configuration/entityTypes/HCP/attributes/Role': {
|
|
70
105
|
totalOvValues: 4,
|
|
71
106
|
totalValues: 4
|
|
72
107
|
}
|
|
73
108
|
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
var defaultMetadata = {
|
|
112
|
+
entityTypes: [{ uri: 'configuration/entityTypes/HCP', label: 'HCP', attributes: attributes_test_data_1.attributesList }]
|
|
113
|
+
};
|
|
114
|
+
var defaultProps = {
|
|
115
|
+
entity: defaultEntity,
|
|
116
|
+
attrTypes: attributes_test_data_1.attributesList,
|
|
117
|
+
parentUri: 'entities/xT3HJZ7'
|
|
118
|
+
};
|
|
119
|
+
var defaultMdmValues = {
|
|
120
|
+
metadata: defaultMetadata,
|
|
121
|
+
entity: defaultEntity
|
|
122
|
+
};
|
|
123
|
+
var setUp = function (_a) {
|
|
124
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d;
|
|
125
|
+
var user = user_event_1.default.setup();
|
|
126
|
+
var Providers = function (_a) {
|
|
127
|
+
var children = _a.children;
|
|
128
|
+
return (react_1.default.createElement(MdmModuleContext_1.MdmModuleProvider, { values: mdmValues }, children));
|
|
74
129
|
};
|
|
75
|
-
|
|
76
|
-
|
|
130
|
+
return __assign(__assign({}, (0, react_2.render)(react_1.default.createElement(ReadOnlyAttributesList_1.default, __assign({}, props)), { wrapper: Providers })), { user: user });
|
|
131
|
+
};
|
|
132
|
+
describe('Read only attributes list tests', function () {
|
|
77
133
|
it('should render pagers for not hidden attribute types and for existing attributes', function () {
|
|
78
|
-
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
134
|
+
setUp();
|
|
135
|
+
var multiLineRenderer = react_2.screen.getByTestId('multi-line-renderer');
|
|
136
|
+
var multiLineRendererLabel = (0, react_2.within)(multiLineRenderer).getByTestId('reltio-attribute-label');
|
|
137
|
+
var multiLineRendererValues = (0, react_2.within)(multiLineRenderer).getAllByTestId('reltio-attribute-value');
|
|
138
|
+
expect(multiLineRendererLabel).toHaveTextContent('Role');
|
|
139
|
+
expect(multiLineRendererValues).toHaveLength(2);
|
|
140
|
+
expect(multiLineRendererValues[0]).toHaveTextContent('Some role 1');
|
|
141
|
+
expect(multiLineRendererValues[1]).toHaveTextContent('Some role 2');
|
|
142
|
+
var oneLineRenderer = react_2.screen.getByTestId('one-line-renderer');
|
|
143
|
+
var oneLineRendererLabel = (0, react_2.within)(oneLineRenderer).getByTestId('reltio-attribute-label');
|
|
144
|
+
var oneLineRendererValues = (0, react_2.within)(oneLineRenderer).getAllByTestId('reltio-attribute-value');
|
|
145
|
+
expect(oneLineRendererLabel).toHaveTextContent('Name');
|
|
146
|
+
expect(oneLineRendererValues).toHaveLength(1);
|
|
147
|
+
expect(oneLineRendererValues[0]).toHaveTextContent('Some name');
|
|
86
148
|
});
|
|
87
149
|
it('should render pagers for attributes and analytics attributes with same name', function () {
|
|
88
|
-
var attributes = {
|
|
89
|
-
Name: [
|
|
90
|
-
{
|
|
91
|
-
ov: true,
|
|
92
|
-
type: 'configuration/relationTypes/knowledge/attributes/Name',
|
|
93
|
-
uri: 'relations/8808/Name',
|
|
94
|
-
value: 'SimpleName'
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
};
|
|
98
|
-
var analyticsAttributes = {
|
|
99
|
-
Name: [
|
|
100
|
-
{
|
|
101
|
-
ov: true,
|
|
102
|
-
type: 'configuration/relationTypes/knowledge/analyticsAttributes/Name',
|
|
103
|
-
uri: 'relations/8808/Name',
|
|
104
|
-
value: 'analyticsName'
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
};
|
|
108
|
-
var entity = { attributes: attributes, analyticsAttributes: analyticsAttributes };
|
|
109
150
|
var attrTypes = [
|
|
110
151
|
{
|
|
111
152
|
label: 'Name',
|
|
112
153
|
name: 'Name',
|
|
113
154
|
type: 'String',
|
|
114
155
|
hidden: false,
|
|
115
|
-
uri: 'configuration/
|
|
156
|
+
uri: 'configuration/entityTypes/HCP/attributes/Name',
|
|
116
157
|
access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
|
|
117
158
|
},
|
|
118
159
|
{
|
|
@@ -120,183 +161,185 @@ describe('ReadOnlyAttributesList tests', function () {
|
|
|
120
161
|
name: 'Name',
|
|
121
162
|
type: 'String',
|
|
122
163
|
hidden: false,
|
|
123
|
-
uri: 'configuration/
|
|
164
|
+
uri: 'configuration/entityTypes/HCP/analyticsAttributes/Name',
|
|
124
165
|
access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
|
|
125
166
|
}
|
|
126
167
|
];
|
|
127
|
-
var
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
168
|
+
var entity = __assign(__assign({}, defaultEntity), { attributes: {
|
|
169
|
+
Name: [
|
|
170
|
+
{
|
|
171
|
+
ov: true,
|
|
172
|
+
type: 'configuration/entityTypes/HCP/attributes/Name',
|
|
173
|
+
uri: 'entities/xT3HJZ7/attributes/Name/8Ans02G',
|
|
174
|
+
value: 'Simple Name value'
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}, analyticsAttributes: {
|
|
178
|
+
Name: [
|
|
179
|
+
{
|
|
180
|
+
ov: true,
|
|
181
|
+
type: 'configuration/entityTypes/HCP/analyticsAttributes/Name',
|
|
182
|
+
uri: 'entities/xT3HJZ7/analyticsAttributes/Name/Bh20IkX',
|
|
183
|
+
value: 'Analytics Name value'
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
} });
|
|
187
|
+
var props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes, entity: entity });
|
|
188
|
+
setUp({ props: props });
|
|
189
|
+
var oneLineRenderers = react_2.screen.getAllByTestId('one-line-renderer');
|
|
190
|
+
(0, react_2.within)(oneLineRenderers[0]).getByText('Name');
|
|
191
|
+
(0, react_2.within)(oneLineRenderers[0]).getByText('Simple Name value');
|
|
192
|
+
(0, react_2.within)(oneLineRenderers[1]).getByText('Analytics Name');
|
|
193
|
+
(0, react_2.within)(oneLineRenderers[1]).getByText('Analytics Name value');
|
|
134
194
|
});
|
|
135
195
|
it('should not render pagers for attribute type without READ permission', function () {
|
|
136
196
|
var attrTypes = __spreadArray([], attributes_test_data_1.attributesList, true);
|
|
137
197
|
attrTypes[0] = __assign({}, attrTypes[0]);
|
|
138
198
|
attrTypes[0].access = ['DELETE', 'UPDATE'];
|
|
139
|
-
var
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
expect(
|
|
199
|
+
var props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes });
|
|
200
|
+
setUp({ props: props });
|
|
201
|
+
react_2.screen.getByText('Name');
|
|
202
|
+
expect(react_2.screen.queryByText('Role')).not.toBeInTheDocument();
|
|
143
203
|
});
|
|
144
204
|
it('should not render pagers for attributes without ov values', function () {
|
|
145
|
-
var
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
expect(
|
|
170
|
-
expect(pager.prop('attributeType').name).toBe('Role');
|
|
205
|
+
var entity = __assign(__assign({}, defaultEntity), { attributes: __assign(__assign({}, defaultEntity.attributes), { Role: [
|
|
206
|
+
{
|
|
207
|
+
//missing 'ov' should be interpreted as ov value
|
|
208
|
+
type: 'configuration/entityTypes/HCP/attributes/Role',
|
|
209
|
+
uri: 'entities/xT3HJZ7/attributes/Role/nAs391Ab',
|
|
210
|
+
value: 'Some role 1'
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
ov: false,
|
|
214
|
+
type: 'configuration/entityTypes/HCP/attributes/Role',
|
|
215
|
+
uri: 'entities/xT3HJZ7/attributes/Role/8AmySE1',
|
|
216
|
+
value: 'Some role 2'
|
|
217
|
+
}
|
|
218
|
+
], Name: [
|
|
219
|
+
{
|
|
220
|
+
ov: false,
|
|
221
|
+
type: 'configuration/entityTypes/HCP/attributes/Name',
|
|
222
|
+
uri: 'entities/xT3HJZ7/attributes/Name/8Ans02G',
|
|
223
|
+
value: 'Some name'
|
|
224
|
+
}
|
|
225
|
+
] }) });
|
|
226
|
+
var props = __assign(__assign({}, defaultProps), { entity: entity });
|
|
227
|
+
setUp({ props: props });
|
|
228
|
+
expect(react_2.screen.getByTestId('reltio-attribute-label')).toHaveTextContent('Role');
|
|
229
|
+
expect(react_2.screen.getByTestId('reltio-attribute-value')).toHaveTextContent('Some role 1');
|
|
171
230
|
});
|
|
172
231
|
it('should render pagers for attributes with ov false if showNonOv is true', function () {
|
|
173
|
-
var
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
232
|
+
var entity = __assign(__assign({}, defaultEntity), { attributes: __assign(__assign({}, defaultEntity.attributes), { Name: [
|
|
233
|
+
{
|
|
234
|
+
ov: false,
|
|
235
|
+
type: 'configuration/entityTypes/HCP/attributes/Name',
|
|
236
|
+
uri: 'entities/xT3HJZ7/attributes/Name/8Ans02G',
|
|
237
|
+
value: 'Some name'
|
|
238
|
+
}
|
|
239
|
+
] }) });
|
|
240
|
+
var props = __assign(__assign({}, defaultProps), { entity: entity, showNonOv: true });
|
|
241
|
+
setUp({ props: props });
|
|
242
|
+
react_2.screen.getByText('Name');
|
|
243
|
+
react_2.screen.getByText('Some name');
|
|
185
244
|
});
|
|
186
245
|
it('should render BranchDecorator for children', function () {
|
|
187
|
-
var
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
expect(decorators.length).toBe(1);
|
|
192
|
-
expect(decorators.at(0).prop('enabled')).toBe(true);
|
|
193
|
-
expect(decorators.at(0).prop('plain')).toBeFalsy();
|
|
194
|
-
expect(decorators.at(0).find(Child).length).toBe(1);
|
|
195
|
-
});
|
|
196
|
-
it('should render ShowMore and ShowLess', function () {
|
|
197
|
-
var component = (0, enzyme_1.shallow)(react_1.default.createElement(ReadOnlyAttributesList_1.default, { attrTypes: attributes_test_data_1.attributesList, entity: entity, parentUri: parentUri, drawLines: true, max: 1 }));
|
|
198
|
-
var pager = component.find(ReadOnlyAttributesPager_1.ReadOnlyAttributesPager);
|
|
199
|
-
expect(pager.length).toBe(1);
|
|
200
|
-
var showMoreButton = component.find(ShowMore_1.ShowMore);
|
|
201
|
-
var showLessButton = component.find(ShowLess_1.ShowLess);
|
|
202
|
-
expect(showMoreButton.length).toBe(1);
|
|
203
|
-
expect(showLessButton.length).toBe(0);
|
|
204
|
-
showMoreButton.prop('onClick')();
|
|
205
|
-
(0, test_utils_1.rerenderWrapper)(component);
|
|
206
|
-
pager = component.find(ReadOnlyAttributesPager_1.ReadOnlyAttributesPager);
|
|
207
|
-
expect(pager.length).toBe(2);
|
|
208
|
-
showLessButton = component.find(ShowLess_1.ShowLess);
|
|
209
|
-
showMoreButton = component.find(ShowMore_1.ShowMore);
|
|
210
|
-
expect(showLessButton.length).toBe(1);
|
|
211
|
-
expect(showMoreButton.length).toBe(0);
|
|
212
|
-
showLessButton.prop('onClick')();
|
|
213
|
-
(0, test_utils_1.rerenderWrapper)(component);
|
|
214
|
-
pager = component.find(ReadOnlyAttributesPager_1.ReadOnlyAttributesPager);
|
|
215
|
-
expect(pager.length).toBe(1);
|
|
246
|
+
var props = __assign(__assign({}, defaultProps), { drawLines: true, children: react_1.default.createElement("span", null, "Children") });
|
|
247
|
+
setUp({ props: props });
|
|
248
|
+
var decorator = react_2.screen.getAllByTestId('branch-decorator')[0];
|
|
249
|
+
expect(decorator).toHaveTextContent('Children');
|
|
216
250
|
});
|
|
217
|
-
it('should
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
251
|
+
it('should render show more and show less', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
252
|
+
var props, user, labels;
|
|
253
|
+
return __generator(this, function (_a) {
|
|
254
|
+
switch (_a.label) {
|
|
255
|
+
case 0:
|
|
256
|
+
props = __assign(__assign({}, defaultProps), { max: 1 });
|
|
257
|
+
user = setUp({ props: props }).user;
|
|
258
|
+
labels = react_2.screen.getAllByTestId('reltio-attribute-label');
|
|
259
|
+
expect(labels).toHaveLength(1);
|
|
260
|
+
expect(labels[0]).toHaveTextContent('Role');
|
|
261
|
+
return [4 /*yield*/, user.click(react_2.screen.getByText('Show more'))];
|
|
262
|
+
case 1:
|
|
263
|
+
_a.sent();
|
|
264
|
+
labels = react_2.screen.getAllByTestId('reltio-attribute-label');
|
|
265
|
+
expect(labels).toHaveLength(2);
|
|
266
|
+
expect(labels[0]).toHaveTextContent('Role');
|
|
267
|
+
expect(labels[1]).toHaveTextContent('Name');
|
|
268
|
+
return [4 /*yield*/, user.click(react_2.screen.getByText('Show less'))];
|
|
269
|
+
case 2:
|
|
270
|
+
_a.sent();
|
|
271
|
+
labels = react_2.screen.getAllByTestId('reltio-attribute-label');
|
|
272
|
+
expect(labels).toHaveLength(1);
|
|
273
|
+
expect(labels[0]).toHaveTextContent('Role');
|
|
274
|
+
return [2 /*return*/];
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
}); });
|
|
278
|
+
it('should not render show more and show less', function () {
|
|
279
|
+
setUp();
|
|
280
|
+
expect(react_2.screen.queryByText('Show more')).not.toBeInTheDocument();
|
|
281
|
+
expect(react_2.screen.queryByText('Show less')).not.toBeInTheDocument();
|
|
225
282
|
});
|
|
226
|
-
it('should not render
|
|
227
|
-
var
|
|
228
|
-
|
|
229
|
-
expect(
|
|
230
|
-
|
|
231
|
-
var showLessButton = component.find(ShowLess_1.ShowLess);
|
|
232
|
-
expect(showMoreButton.length).toBe(0);
|
|
233
|
-
expect(showLessButton.length).toBe(0);
|
|
283
|
+
it('should not render show more and show less when total count of items is lower than max', function () {
|
|
284
|
+
var props = __assign(__assign({}, defaultProps), { max: 4 });
|
|
285
|
+
setUp({ props: props });
|
|
286
|
+
expect(react_2.screen.queryByText('Show more')).not.toBeInTheDocument();
|
|
287
|
+
expect(react_2.screen.queryByText('Show less')).not.toBeInTheDocument();
|
|
234
288
|
});
|
|
235
|
-
describe('
|
|
289
|
+
describe('fixed type uris behavior', function () {
|
|
236
290
|
var attrTypes = __spreadArray(__spreadArray([], attributes_test_data_1.attributesList, true), [mdm_sdk_1.EntityAttrTypes.roles, mdm_sdk_1.EntityAttrTypes.tags], false);
|
|
237
|
-
var
|
|
238
|
-
attributes:
|
|
239
|
-
roles: ['
|
|
240
|
-
tags: ['tag1', 'tag2']
|
|
291
|
+
var metadata = {
|
|
292
|
+
entityTypes: [__assign(__assign({}, defaultMetadata.entityTypes[0]), { attributes: attrTypes })],
|
|
293
|
+
roles: [{ uri: 'configuration/roles/Pharmacy', label: 'Pharmacy', description: '' }]
|
|
241
294
|
};
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
var
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
expect(
|
|
282
|
-
|
|
283
|
-
it('should not render ShowMore and ShowLess', function () {
|
|
284
|
-
var component = (0, enzyme_1.shallow)(react_1.default.createElement(ReadOnlyAttributesList_1.default, { attrTypes: attrTypes, entity: entity, parentUri: parentUri, drawLines: true }));
|
|
285
|
-
var pager = component.find(ReadOnlyAttributesPager_1.ReadOnlyAttributesPager);
|
|
286
|
-
expect(pager.length).toBe(4);
|
|
287
|
-
var showMoreButton = component.find(ShowMore_1.ShowMore);
|
|
288
|
-
var showLessButton = component.find(ShowLess_1.ShowLess);
|
|
289
|
-
expect(showMoreButton.length).toBe(0);
|
|
290
|
-
expect(showLessButton.length).toBe(0);
|
|
295
|
+
var entity = __assign(__assign({}, defaultEntity), { roles: ['configuration/roles/Pharmacy'], tags: ['tag1', 'tag2'] });
|
|
296
|
+
it('should render show more/show less buttons and always show roles/tags if they have values', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
297
|
+
var props, mdmValues, user, labels;
|
|
298
|
+
return __generator(this, function (_a) {
|
|
299
|
+
switch (_a.label) {
|
|
300
|
+
case 0:
|
|
301
|
+
props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes, entity: entity, max: 1 });
|
|
302
|
+
mdmValues = { entity: entity, metadata: metadata };
|
|
303
|
+
user = setUp({ props: props, mdmValues: mdmValues }).user;
|
|
304
|
+
labels = react_2.screen.getAllByTestId('reltio-attribute-label');
|
|
305
|
+
expect(labels).toHaveLength(3);
|
|
306
|
+
expect(labels[0]).toHaveTextContent('Role');
|
|
307
|
+
expect(labels[1]).toHaveTextContent('Roles');
|
|
308
|
+
expect(labels[2]).toHaveTextContent('Tags');
|
|
309
|
+
return [4 /*yield*/, user.click(react_2.screen.getByText('Show more'))];
|
|
310
|
+
case 1:
|
|
311
|
+
_a.sent();
|
|
312
|
+
labels = react_2.screen.getAllByTestId('reltio-attribute-label');
|
|
313
|
+
expect(labels).toHaveLength(4);
|
|
314
|
+
expect(labels[0]).toHaveTextContent('Role');
|
|
315
|
+
expect(labels[1]).toHaveTextContent('Name');
|
|
316
|
+
expect(labels[2]).toHaveTextContent('Roles');
|
|
317
|
+
expect(labels[3]).toHaveTextContent('Tags');
|
|
318
|
+
return [4 /*yield*/, user.click(react_2.screen.getByText('Show less'))];
|
|
319
|
+
case 2:
|
|
320
|
+
_a.sent();
|
|
321
|
+
labels = react_2.screen.getAllByTestId('reltio-attribute-label');
|
|
322
|
+
expect(labels).toHaveLength(3);
|
|
323
|
+
expect(labels[0]).toHaveTextContent('Role');
|
|
324
|
+
expect(labels[1]).toHaveTextContent('Roles');
|
|
325
|
+
expect(labels[2]).toHaveTextContent('Tags');
|
|
326
|
+
return [2 /*return*/];
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}); });
|
|
330
|
+
it('should not render show more and show less', function () {
|
|
331
|
+
var props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes, entity: entity });
|
|
332
|
+
var mdmValues = { entity: entity, metadata: metadata };
|
|
333
|
+
setUp({ props: props, mdmValues: mdmValues });
|
|
334
|
+
expect(react_2.screen.queryByText('Show more')).not.toBeInTheDocument();
|
|
335
|
+
expect(react_2.screen.queryByText('Show less')).not.toBeInTheDocument();
|
|
291
336
|
});
|
|
292
|
-
it('should not render
|
|
293
|
-
var
|
|
294
|
-
var
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
expect(showMoreButton.length).toBe(0);
|
|
299
|
-
expect(showLessButton.length).toBe(0);
|
|
337
|
+
it('should not render show more and show less when total count of items is lower than max', function () {
|
|
338
|
+
var props = __assign(__assign({}, defaultProps), { attrTypes: attrTypes, entity: entity, max: 4 });
|
|
339
|
+
var mdmValues = { entity: entity, metadata: metadata };
|
|
340
|
+
setUp({ props: props, mdmValues: mdmValues });
|
|
341
|
+
expect(react_2.screen.queryByText('Show more')).not.toBeInTheDocument();
|
|
342
|
+
expect(react_2.screen.queryByText('Show less')).not.toBeInTheDocument();
|
|
300
343
|
});
|
|
301
344
|
});
|
|
302
345
|
});
|
|
@@ -8,7 +8,7 @@ exports.attributesList = [
|
|
|
8
8
|
type: 'String',
|
|
9
9
|
hidden: false,
|
|
10
10
|
required: false,
|
|
11
|
-
uri: 'configuration/
|
|
11
|
+
uri: 'configuration/entityTypes/HCP/attributes/Role',
|
|
12
12
|
lookupCode: 'rdm/lookupTypes/Role_knowledge',
|
|
13
13
|
access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
|
|
14
14
|
},
|
|
@@ -18,7 +18,7 @@ exports.attributesList = [
|
|
|
18
18
|
type: 'String',
|
|
19
19
|
hidden: false,
|
|
20
20
|
required: true,
|
|
21
|
-
uri: 'configuration/
|
|
21
|
+
uri: 'configuration/entityTypes/HCP/attributes/Name',
|
|
22
22
|
access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
|
|
23
23
|
},
|
|
24
24
|
{
|
|
@@ -27,14 +27,14 @@ exports.attributesList = [
|
|
|
27
27
|
type: 'String',
|
|
28
28
|
hidden: true,
|
|
29
29
|
required: false,
|
|
30
|
-
uri: 'configuration/
|
|
30
|
+
uri: 'configuration/entityTypes/HCP/attributes/LastName',
|
|
31
31
|
access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
name: 'Required',
|
|
35
35
|
type: 'String',
|
|
36
36
|
required: true,
|
|
37
|
-
uri: 'configuration/
|
|
37
|
+
uri: 'configuration/entityTypes/HCP/attributes/Required',
|
|
38
38
|
access: ['CREATE', 'READ', 'INITIATE_CHANGE_REQUEST', 'UPDATE']
|
|
39
39
|
}
|
|
40
40
|
];
|
|
@@ -48,7 +48,7 @@ var SpecialRenderer_1 = require("./components/SpecialRenderer");
|
|
|
48
48
|
var ImageLineRenderer_1 = require("./components/ImageLineRenderer");
|
|
49
49
|
var EmptyRenderer_1 = require("./components/EmptyRenderer");
|
|
50
50
|
var MdmModuleContext_1 = require("../contexts/MdmModuleContext");
|
|
51
|
-
var
|
|
51
|
+
var AlwaysVisibleAttributesContext_1 = require("../contexts/AlwaysVisibleAttributesContext");
|
|
52
52
|
var styles_1 = require("./styles");
|
|
53
53
|
var RENDERER_TYPES = {
|
|
54
54
|
oneLine: 'oneLine',
|
|
@@ -66,7 +66,7 @@ var ReadOnlyAttributesPager = function (_a) {
|
|
|
66
66
|
var maxValuesInResponse = (0, MdmModuleContext_1.useMdmMaxValuesInResponse)();
|
|
67
67
|
var max = (_f = maxProp !== null && maxProp !== void 0 ? maxProp : maxValuesInResponse) !== null && _f !== void 0 ? _f : Infinity;
|
|
68
68
|
var partitionByOv = (0, ramda_1.partition)(mdm_sdk_1.isOv);
|
|
69
|
-
var alwaysVisibleAttributes = (0, react_1.useContext)(
|
|
69
|
+
var alwaysVisibleAttributes = (0, react_1.useContext)(AlwaysVisibleAttributesContext_1.AlwaysVisibleAttributesContext);
|
|
70
70
|
var isAlwaysVisible = (0, react_1.useMemo)(function () { return alwaysVisibleAttributes === null || alwaysVisibleAttributes === void 0 ? void 0 : alwaysVisibleAttributes.includes(attributeType.uri); }, [attributeType.uri, alwaysVisibleAttributes]);
|
|
71
71
|
if (!values || (!values.length && !isAlwaysVisible)) {
|
|
72
72
|
return null;
|