@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
|
@@ -1,123 +1,77 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import Popper from '@mui/material/Popper';
|
|
4
|
-
import Paper from '@mui/material/Paper';
|
|
13
|
+
import { render, screen } from '@testing-library/react';
|
|
5
14
|
import { PopupBoundariesContext } from '../contexts/PopupBoundariesContext';
|
|
6
15
|
import { ReactSelectMenuWithPopper } from './ReactSelectMenuWithPopper';
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
{
|
|
20
|
-
enabled: true,
|
|
21
|
-
name: 'preventOverflow',
|
|
22
|
-
options: {
|
|
23
|
-
altAxis: true,
|
|
24
|
-
altBoundary: true,
|
|
25
|
-
tether: false,
|
|
26
|
-
boundary: document.body,
|
|
27
|
-
padding: 5
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
]);
|
|
31
|
-
var textContext = { element: React.createElement("div", null), priority: ['top'] };
|
|
32
|
-
var componentWithContext = mount(React.createElement(PopupBoundariesContext.Provider, { value: textContext },
|
|
33
|
-
React.createElement(ReactSelectMenuWithPopper, { selectProps: {
|
|
34
|
-
inputRef: testInputRef,
|
|
35
|
-
inputValue: '',
|
|
36
|
-
menuIsOpen: true
|
|
37
|
-
}, innerRef: testInnerRef, innerProps: {} },
|
|
38
|
-
React.createElement("div", null))));
|
|
39
|
-
expect(getPopper(componentWithContext).prop('modifiers')).toEqual([
|
|
40
|
-
{
|
|
41
|
-
enabled: true,
|
|
42
|
-
name: 'preventOverflow',
|
|
43
|
-
options: {
|
|
44
|
-
altAxis: true,
|
|
45
|
-
altBoundary: true,
|
|
46
|
-
tether: false,
|
|
47
|
-
boundary: textContext.element,
|
|
48
|
-
padding: 5
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]);
|
|
16
|
+
var setUp = function (_a) {
|
|
17
|
+
var props = _a.props, _b = _a.popupBoundariesContextValue, popupBoundariesContextValue = _b === void 0 ? null : _b;
|
|
18
|
+
var Providers = function (_a) {
|
|
19
|
+
var children = _a.children;
|
|
20
|
+
return (React.createElement(PopupBoundariesContext.Provider, { value: popupBoundariesContextValue }, children));
|
|
21
|
+
};
|
|
22
|
+
return render(React.createElement(ReactSelectMenuWithPopper, __assign({}, props)), { wrapper: Providers });
|
|
23
|
+
};
|
|
24
|
+
describe('React select menu with popper tests', function () {
|
|
25
|
+
var originalWindowInnerWidth;
|
|
26
|
+
beforeAll(function () {
|
|
27
|
+
originalWindowInnerWidth = window.innerWidth;
|
|
52
28
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
});
|
|
100
|
-
it('should set Paper props style.minWidth as boundaries element width if it is smaller than input width', function () {
|
|
101
|
-
var inputWidth = 450;
|
|
102
|
-
var boundariesElementWidth = 400;
|
|
103
|
-
var windowInnerWidth = 500;
|
|
104
|
-
window.innerWidth = windowInnerWidth;
|
|
105
|
-
var testInputRef = { current: { clientWidth: inputWidth } };
|
|
106
|
-
var boundariesElement = {
|
|
107
|
-
clientWidth: boundariesElementWidth
|
|
108
|
-
};
|
|
109
|
-
var component = mount(React.createElement(PopupBoundariesContext.Provider, { value: { element: boundariesElement } },
|
|
110
|
-
React.createElement(ReactSelectMenuWithPopper, { selectProps: {
|
|
111
|
-
inputRef: testInputRef,
|
|
112
|
-
inputValue: '',
|
|
113
|
-
menuIsOpen: true
|
|
114
|
-
}, innerRef: { current: {} }, innerProps: {} },
|
|
115
|
-
React.createElement("div", null))));
|
|
116
|
-
var paper = getPopper(component).find(Paper);
|
|
117
|
-
expect(paper.prop('style')).toEqual({
|
|
118
|
-
minWidth: boundariesElementWidth,
|
|
119
|
-
maxWidth: boundariesElementWidth
|
|
120
|
-
});
|
|
121
|
-
});
|
|
29
|
+
afterEach(function () {
|
|
30
|
+
window.innerWidth = originalWindowInnerWidth;
|
|
31
|
+
});
|
|
32
|
+
it('should set paper minWidth as input width and maxWidth as boundaries element width', function () {
|
|
33
|
+
var inputEl = document.createElement('input');
|
|
34
|
+
var boundariesEl = document.createElement('div');
|
|
35
|
+
Object.defineProperty(inputEl, 'clientWidth', { value: 200 });
|
|
36
|
+
Object.defineProperty(boundariesEl, 'clientWidth', { value: 400 });
|
|
37
|
+
Object.defineProperty(window, 'innerWidth', { value: 500 });
|
|
38
|
+
var props = {
|
|
39
|
+
innerRef: React.createRef(),
|
|
40
|
+
selectProps: { inputRef: { current: inputEl }, inputValue: '', menuIsOpen: true },
|
|
41
|
+
innerProps: {},
|
|
42
|
+
children: ['Children']
|
|
43
|
+
};
|
|
44
|
+
var popupBoundariesContextValue = { element: boundariesEl };
|
|
45
|
+
setUp({ props: props, popupBoundariesContextValue: popupBoundariesContextValue });
|
|
46
|
+
expect(screen.getByText('Children')).toHaveStyle({ minWidth: '200px', maxWidth: '400px' });
|
|
47
|
+
});
|
|
48
|
+
it('should set paper minWidth as window.innerWidth if there is no boundaries element', function () {
|
|
49
|
+
var inputEl = document.createElement('input');
|
|
50
|
+
Object.defineProperty(inputEl, 'clientWidth', { value: 200 });
|
|
51
|
+
Object.defineProperty(window, 'innerWidth', { value: 500 });
|
|
52
|
+
var props = {
|
|
53
|
+
innerRef: React.createRef(),
|
|
54
|
+
selectProps: { inputRef: { current: inputEl }, inputValue: '', menuIsOpen: true },
|
|
55
|
+
innerProps: {},
|
|
56
|
+
children: ['Children']
|
|
57
|
+
};
|
|
58
|
+
setUp({ props: props });
|
|
59
|
+
expect(screen.getByText('Children')).toHaveStyle({ minWidth: '200px', maxWidth: '500px' });
|
|
60
|
+
});
|
|
61
|
+
it('should set paper minWidth as boundaries element width if it is smaller than input width', function () {
|
|
62
|
+
var inputEl = document.createElement('input');
|
|
63
|
+
var boundariesEl = document.createElement('div');
|
|
64
|
+
Object.defineProperty(inputEl, 'clientWidth', { value: 450 });
|
|
65
|
+
Object.defineProperty(boundariesEl, 'clientWidth', { value: 400 });
|
|
66
|
+
Object.defineProperty(window, 'innerWidth', { value: 500 });
|
|
67
|
+
var props = {
|
|
68
|
+
innerRef: React.createRef(),
|
|
69
|
+
selectProps: { inputRef: { current: inputEl }, inputValue: '', menuIsOpen: true },
|
|
70
|
+
innerProps: {},
|
|
71
|
+
children: ['Children']
|
|
72
|
+
};
|
|
73
|
+
var popupBoundariesContextValue = { element: boundariesEl };
|
|
74
|
+
setUp({ props: props, popupBoundariesContextValue: popupBoundariesContextValue });
|
|
75
|
+
expect(screen.getByText('Children')).toHaveStyle({ minWidth: '400px', maxWidth: '400px' });
|
|
122
76
|
});
|
|
123
77
|
});
|
|
@@ -1,71 +1,138 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import React from 'react';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { ReadOnlyImageAttributesLine } from '../ReadOnlyImageAttributesLine';
|
|
2
|
+
import { mockResizeObserver } from 'jsdom-testing-mocks';
|
|
3
|
+
import { render, screen, act } from '@testing-library/react';
|
|
16
4
|
import ReadOnlyAttributeValuesBlock from './ReadOnlyAttributeValuesBlock';
|
|
17
|
-
describe('
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type: 'configuration/entityTypes/HCP/attributes/CountryCode',
|
|
22
|
-
value: 'Italy',
|
|
23
|
-
lookupCode: 'IT',
|
|
24
|
-
ov: true
|
|
25
|
-
}
|
|
26
|
-
];
|
|
27
|
-
var attributeType = {
|
|
28
|
-
uri: 'configuration/entityTypes/HCP',
|
|
29
|
-
label: 'HCP',
|
|
30
|
-
name: 'HCP',
|
|
31
|
-
type: 'String',
|
|
32
|
-
attributes: [
|
|
5
|
+
describe('Read only attribute values block tests', function () {
|
|
6
|
+
var resizeObserver = mockResizeObserver();
|
|
7
|
+
it('should render read only attribute correctly', function () {
|
|
8
|
+
var values = [
|
|
33
9
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
10
|
+
uri: 'entities/1/attributes/CountryCode/1',
|
|
11
|
+
type: 'configuration/entityTypes/HCP/attributes/CountryCode',
|
|
12
|
+
value: 'Italy',
|
|
13
|
+
lookupCode: 'IT',
|
|
14
|
+
ov: true
|
|
38
15
|
}
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
16
|
+
];
|
|
17
|
+
var attributeType = {
|
|
18
|
+
uri: 'configuration/entityTypes/HCP',
|
|
19
|
+
label: 'HCP',
|
|
20
|
+
name: 'HCP',
|
|
21
|
+
type: 'String',
|
|
22
|
+
attributes: [
|
|
23
|
+
{
|
|
24
|
+
label: 'Country Code',
|
|
25
|
+
name: 'CountryCode',
|
|
26
|
+
type: 'String',
|
|
27
|
+
uri: 'configuration/entityTypes/HCP/attributes/CountryCode'
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
render(React.createElement(ReadOnlyAttributeValuesBlock, { attributeType: attributeType, values: values }));
|
|
32
|
+
screen.getByText('Italy (IT)');
|
|
46
33
|
});
|
|
47
|
-
it('should render
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
it('should render read only image attributes line', function () {
|
|
35
|
+
var attributeType = {
|
|
36
|
+
name: 'ImageGallery',
|
|
37
|
+
type: 'Image',
|
|
38
|
+
uri: 'configuration/entityTypes/Series/attributes/ImageGallery',
|
|
39
|
+
attributes: [
|
|
40
|
+
{
|
|
41
|
+
name: 'Url',
|
|
42
|
+
type: 'String',
|
|
43
|
+
uri: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/Url'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'UrlThumbnail',
|
|
47
|
+
type: 'String',
|
|
48
|
+
uri: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/UrlThumbnail'
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
51
|
};
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
var values = [
|
|
53
|
+
{
|
|
54
|
+
value: {
|
|
55
|
+
Url: [
|
|
56
|
+
{
|
|
57
|
+
type: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/Url',
|
|
58
|
+
ov: true,
|
|
59
|
+
value: '/test.jpg',
|
|
60
|
+
uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv/Url/39V5GWWMh'
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
UrlThumbnail: [
|
|
64
|
+
{
|
|
65
|
+
type: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/UrlThumbnail',
|
|
66
|
+
ov: true,
|
|
67
|
+
value: '/test.jpg',
|
|
68
|
+
uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv/UrlThumbnail/39V5GWWMh'
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
ov: true,
|
|
73
|
+
uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv'
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
var container = render(React.createElement(ReadOnlyAttributeValuesBlock, { attributeType: attributeType, values: values })).container;
|
|
77
|
+
resizeObserver.mockElementSize(container.children[0], { contentBoxSize: { inlineSize: 600 } });
|
|
78
|
+
act(function () {
|
|
79
|
+
resizeObserver.resize();
|
|
80
|
+
});
|
|
81
|
+
expect(screen.getByRole('img')).toHaveAttribute('src', '/test.jpg');
|
|
55
82
|
});
|
|
56
|
-
it('should
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
83
|
+
it('should render nested read only attribute correctly', function () {
|
|
84
|
+
var attributeType = {
|
|
85
|
+
type: 'Nested',
|
|
86
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest',
|
|
87
|
+
name: 'NestedTest',
|
|
88
|
+
label: 'Nested Test',
|
|
89
|
+
attributes: [
|
|
90
|
+
{
|
|
91
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest/attributes/FirstName',
|
|
92
|
+
name: 'FirstName',
|
|
93
|
+
label: 'First Name',
|
|
94
|
+
type: 'String'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest/attributes/LastName',
|
|
98
|
+
name: 'LastName',
|
|
99
|
+
label: 'Last Name',
|
|
100
|
+
type: 'String'
|
|
101
|
+
}
|
|
102
|
+
]
|
|
63
103
|
};
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
104
|
+
var values = [
|
|
105
|
+
{
|
|
106
|
+
label: 'Nested test label 1',
|
|
107
|
+
value: {
|
|
108
|
+
FirstName: [
|
|
109
|
+
{
|
|
110
|
+
value: 'Viktor',
|
|
111
|
+
uri: 'entities/eNt1/attributes/NestedTest/gd42423/FirstName/8fBsP38A'
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
uri: 'entities/eNt1/attributes/NestedTest/gd42423'
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: 'Nested test label 2',
|
|
119
|
+
value: {
|
|
120
|
+
LastName: [
|
|
121
|
+
{
|
|
122
|
+
value: 'Ivanov',
|
|
123
|
+
uri: 'entities/eNt1/attributes/NestedTest/ksApL29/LastName/o7BnD6mJ'
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
uri: 'entities/eNt1/attributes/NestedTest/ksApL29'
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
render(React.createElement(ReadOnlyAttributeValuesBlock, { expanded: true, attributeType: attributeType, values: values }));
|
|
131
|
+
screen.getByText('Nested test label 1');
|
|
132
|
+
screen.getByText('First Name');
|
|
133
|
+
screen.getByText('Viktor');
|
|
134
|
+
screen.getByText('Nested test label 2');
|
|
135
|
+
screen.getByText('Last Name');
|
|
136
|
+
screen.getByText('Ivanov');
|
|
70
137
|
});
|
|
71
138
|
});
|
|
@@ -9,56 +9,191 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
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);
|
|
23
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
+
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;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
12
48
|
import React from 'react';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { NestedAttribute } from '../../../NestedAttribute';
|
|
16
|
-
import { ReferenceAttribute } from '../../../ReferenceAttribute';
|
|
49
|
+
import { render, screen } from '@testing-library/react';
|
|
50
|
+
import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
|
|
17
51
|
import { ReadOnlyAttribute } from './ReadOnlyAttribute';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
52
|
+
var setUp = function (_a) {
|
|
53
|
+
var props = _a.props, _b = _a.mdmValues, mdmValues = _b === void 0 ? {} : _b;
|
|
54
|
+
var Providers = function (_a) {
|
|
55
|
+
var children = _a.children;
|
|
56
|
+
return React.createElement(MdmModuleProvider, { values: mdmValues }, children);
|
|
57
|
+
};
|
|
58
|
+
return render(React.createElement(ReadOnlyAttribute, __assign({}, props)), { wrapper: Providers });
|
|
59
|
+
};
|
|
60
|
+
describe('Read only attribute tests', function () {
|
|
61
|
+
it('should render simple attribute correctly', function () {
|
|
62
|
+
var attributeType = {
|
|
63
|
+
type: 'String',
|
|
64
|
+
uri: 'configuration/entityTypes/HCP/attributes/FirstName',
|
|
65
|
+
name: 'FirstName',
|
|
66
|
+
label: 'First Name'
|
|
27
67
|
};
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
expect(component.find(NestedAttribute).length).toBe(0);
|
|
32
|
-
expect(component.find(ReferenceAttribute).length).toBe(0);
|
|
33
|
-
});
|
|
34
|
-
it('should render Nested attribute', function () {
|
|
35
|
-
var props = {
|
|
36
|
-
attributeType: {
|
|
37
|
-
type: 'Nested'
|
|
38
|
-
},
|
|
39
|
-
attributeValue: {
|
|
40
|
-
uri: '123'
|
|
41
|
-
}
|
|
68
|
+
var attributeValue = {
|
|
69
|
+
value: 'some string',
|
|
70
|
+
uri: 'entities/eNt1/attributes/FirstName/gd42423'
|
|
42
71
|
};
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
expect(component.find(NestedAttribute).length).toBe(1);
|
|
47
|
-
expect(component.find(NestedAttribute).props()).toEqual(props);
|
|
72
|
+
var props = { attributeValue: attributeValue, attributeType: attributeType };
|
|
73
|
+
setUp({ props: props });
|
|
74
|
+
screen.getByText('some string');
|
|
48
75
|
});
|
|
49
|
-
it('should render
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
76
|
+
it('should render nested attribute correctly', function () {
|
|
77
|
+
var attributeType = {
|
|
78
|
+
type: 'Nested',
|
|
79
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest',
|
|
80
|
+
name: 'NestedTest',
|
|
81
|
+
label: 'Nested Test',
|
|
82
|
+
attributes: [
|
|
83
|
+
{
|
|
84
|
+
uri: 'configuration/entityTypes/HCP/attributes/NestedTest/attributes/FirstName',
|
|
85
|
+
name: 'FirstName',
|
|
86
|
+
label: 'First Name',
|
|
87
|
+
type: 'String'
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
var attributeValue = {
|
|
92
|
+
label: 'Nested test label',
|
|
93
|
+
value: {
|
|
94
|
+
FirstName: [
|
|
95
|
+
{
|
|
96
|
+
value: 'some string',
|
|
97
|
+
uri: 'entities/eNt1/attributes/NestedTest/gd42423/FirstName/8fBsP38A'
|
|
98
|
+
}
|
|
99
|
+
]
|
|
53
100
|
},
|
|
54
|
-
|
|
55
|
-
uri: '123'
|
|
56
|
-
}
|
|
101
|
+
uri: 'entities/eNt1/attributes/NestedTest/gd42423'
|
|
57
102
|
};
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
103
|
+
var props = { attributeValue: attributeValue, attributeType: attributeType, expanded: true };
|
|
104
|
+
setUp({ props: props });
|
|
105
|
+
screen.getByText('Nested test label');
|
|
106
|
+
screen.getByText('First Name');
|
|
107
|
+
screen.getByText('some string');
|
|
63
108
|
});
|
|
109
|
+
it('should render reference attribute correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
110
|
+
var attributeType, attributeValue, metadata, props, mdmValues;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
attributeType = {
|
|
113
|
+
label: 'Address',
|
|
114
|
+
name: 'Address',
|
|
115
|
+
type: 'Reference',
|
|
116
|
+
referencedAttributeURIs: [
|
|
117
|
+
'configuration/relationTypes/HasAddress/attributes/AddressType',
|
|
118
|
+
'configuration/entityTypes/Location/attributes/AddressLine1'
|
|
119
|
+
],
|
|
120
|
+
uri: 'configuration/entityTypes/HCO/attributes/Address'
|
|
121
|
+
};
|
|
122
|
+
attributeValue = {
|
|
123
|
+
label: 'Reference Address',
|
|
124
|
+
relationshipLabel: 'Relationship label',
|
|
125
|
+
refEntity: {
|
|
126
|
+
objectURI: 'entities/2EpaVt0k',
|
|
127
|
+
type: 'configuration/entityTypes/Location',
|
|
128
|
+
crosswalks: []
|
|
129
|
+
},
|
|
130
|
+
refRelation: {
|
|
131
|
+
objectURI: 'relations/1GrMXM4O',
|
|
132
|
+
type: 'configuration/relationTypes/HasAddress',
|
|
133
|
+
crosswalks: []
|
|
134
|
+
},
|
|
135
|
+
uri: 'entities/2Vek4DnE/attributes/Address/1GrMXM4O',
|
|
136
|
+
value: {
|
|
137
|
+
AddressLine1: [
|
|
138
|
+
{
|
|
139
|
+
ov: true,
|
|
140
|
+
type: 'configuration/entityTypes/Location/attributes/AddressLine1',
|
|
141
|
+
uri: 'entities/2Vek4DnE/attributes/Address/1GrMXM4O/AddressLine1/2GcBL4K00',
|
|
142
|
+
value: 'Lenina street'
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
AddressType: [
|
|
146
|
+
{
|
|
147
|
+
type: 'configuration/relationTypes/HasAddress/attributes/AddressType',
|
|
148
|
+
uri: 'entities/2Vek4DnE/attributes/Address/1GrMXM4O/AddressType/15sHPBU8',
|
|
149
|
+
value: 'Office',
|
|
150
|
+
ov: 'true'
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
metadata = {
|
|
156
|
+
entityTypes: [
|
|
157
|
+
{
|
|
158
|
+
uri: 'configuration/entityTypes/HCO',
|
|
159
|
+
attributes: [attributeType]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
uri: 'configuration/entityTypes/Location',
|
|
163
|
+
attributes: [
|
|
164
|
+
{
|
|
165
|
+
label: 'Address Line 1',
|
|
166
|
+
name: 'AddressLine1',
|
|
167
|
+
type: 'String',
|
|
168
|
+
uri: 'configuration/entityTypes/Location/attributes/AddressLine1'
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
relationTypes: [
|
|
174
|
+
{
|
|
175
|
+
uri: 'configuration/relationTypes/HasAddress',
|
|
176
|
+
attributes: [
|
|
177
|
+
{
|
|
178
|
+
label: 'Address Type',
|
|
179
|
+
name: 'AddressType',
|
|
180
|
+
type: 'String',
|
|
181
|
+
uri: 'configuration/relationTypes/HasAddress/attributes/AddressType'
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
};
|
|
187
|
+
props = { attributeValue: attributeValue, attributeType: attributeType, expanded: true };
|
|
188
|
+
mdmValues = { metadata: metadata };
|
|
189
|
+
setUp({ props: props, mdmValues: mdmValues });
|
|
190
|
+
screen.getByText('Reference Address');
|
|
191
|
+
screen.getByText('Relationship label');
|
|
192
|
+
screen.getByText('Address Type');
|
|
193
|
+
screen.getByText('Office');
|
|
194
|
+
screen.getByText('Address Line 1');
|
|
195
|
+
screen.getByText('Lenina street');
|
|
196
|
+
return [2 /*return*/];
|
|
197
|
+
});
|
|
198
|
+
}); });
|
|
64
199
|
});
|
|
@@ -19,7 +19,7 @@ import { ShowLess } from '../ShowLess';
|
|
|
19
19
|
import { FIXED_TYPE_URIS } from '../constants';
|
|
20
20
|
import { splitPagersData } from '../helpers/attributesView';
|
|
21
21
|
import { HiddenAttributesContext } from '../contexts/HiddenAttributesContext';
|
|
22
|
-
import { AlwaysVisibleAttributesContext } from '../contexts/
|
|
22
|
+
import { AlwaysVisibleAttributesContext } from '../contexts/AlwaysVisibleAttributesContext';
|
|
23
23
|
var ReadOnlyAttributesList = function (_a) {
|
|
24
24
|
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 ? FIXED_TYPE_URIS : _c, showNonOv = _a.showNonOv, classes = _a.classes;
|
|
25
25
|
var hiddenAttributes = useContext(HiddenAttributesContext);
|