@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,337 +0,0 @@
|
|
|
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
|
-
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
|
-
};
|
|
48
|
-
import React from 'react';
|
|
49
|
-
import { screen, render } from '@testing-library/react';
|
|
50
|
-
import userEvent from '@testing-library/user-event';
|
|
51
|
-
import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
|
|
52
|
-
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
53
|
-
import { Mode, ScreenType, ProfileViewType, typeAheadSearch } from '@reltio/mdm-sdk';
|
|
54
|
-
import { ScrollToElementContext, ScrollType } from '../contexts/ScrollToElementContext';
|
|
55
|
-
import { MdmModuleProvider } from '../contexts/MdmModuleContext';
|
|
56
|
-
import { HiddenAttributesContext } from '../contexts/HiddenAttributesContext';
|
|
57
|
-
import RelationEditor from './RelationEditor';
|
|
58
|
-
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { typeAheadSearch: jest.fn() })); });
|
|
59
|
-
var mdmActions = {
|
|
60
|
-
setInitialInfo: jest.fn(),
|
|
61
|
-
setRelationType: jest.fn(),
|
|
62
|
-
closeRelationEditor: jest.fn(),
|
|
63
|
-
entityCreated: jest.fn(),
|
|
64
|
-
entityDeleted: jest.fn(),
|
|
65
|
-
setRelationEntity: jest.fn(),
|
|
66
|
-
errorDeactivated: jest.fn(),
|
|
67
|
-
errorsSet: jest.fn(),
|
|
68
|
-
addAttributes: jest.fn(),
|
|
69
|
-
modifyAttribute: jest.fn(),
|
|
70
|
-
removeAttribute: jest.fn(),
|
|
71
|
-
addRelation: jest.fn(),
|
|
72
|
-
editRelation: jest.fn()
|
|
73
|
-
};
|
|
74
|
-
var defaultRelation = {
|
|
75
|
-
relationUri: 'relations/uri$$Qgs4qfvmR3Daksyb1697627670006',
|
|
76
|
-
relationType: 'configuration/relationTypes/HasAddress',
|
|
77
|
-
relationLabel: 'has address',
|
|
78
|
-
object: {
|
|
79
|
-
type: 'configuration/relationTypes/HasAddress',
|
|
80
|
-
attributes: {},
|
|
81
|
-
uri: 'relations/uri$$Qgs4qfvmR3Daksyb1697627670006'
|
|
82
|
-
},
|
|
83
|
-
direction: 'out'
|
|
84
|
-
};
|
|
85
|
-
var defaultEntity = {
|
|
86
|
-
uri: 'entities/uri$$123',
|
|
87
|
-
type: 'configuration/entityTypes/HCP',
|
|
88
|
-
attributes: {}
|
|
89
|
-
};
|
|
90
|
-
var defaultMdmValues = {
|
|
91
|
-
initialConnection: { connection: { relation: defaultRelation, entity: {} } },
|
|
92
|
-
initialModifiedEntity: null,
|
|
93
|
-
modifiedEntity: null,
|
|
94
|
-
entity: defaultEntity,
|
|
95
|
-
dependentLookups: { editors: {}, structure: {}, initedTypeUris: [] },
|
|
96
|
-
uiConfigLayout: [],
|
|
97
|
-
uiConfigProfile: []
|
|
98
|
-
};
|
|
99
|
-
var defaultProps = {
|
|
100
|
-
connection: { relation: defaultRelation, entity: {} },
|
|
101
|
-
config: {
|
|
102
|
-
id: 'relationView',
|
|
103
|
-
component: ProfileViewType.Relations,
|
|
104
|
-
content: {
|
|
105
|
-
entityTypes: ['configuration/entityTypes/Location'],
|
|
106
|
-
outRelations: [{ uri: 'configuration/relationTypes/HasAddress', label: '{directionalLabel}' }]
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
metadata: {
|
|
110
|
-
entityTypes: [
|
|
111
|
-
{
|
|
112
|
-
uri: 'configuration/entityTypes/HCP',
|
|
113
|
-
label: 'HCP'
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
uri: 'configuration/entityTypes/Location',
|
|
117
|
-
label: 'Address'
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
relationTypes: [
|
|
121
|
-
{
|
|
122
|
-
uri: 'configuration/relationTypes/HasAddress',
|
|
123
|
-
label: 'has address',
|
|
124
|
-
startObject: {
|
|
125
|
-
objectTypeURI: 'configuration/entityTypes/HCP',
|
|
126
|
-
uri: 'configuration/relationTypes/HasAddress/startObject'
|
|
127
|
-
},
|
|
128
|
-
endObject: {
|
|
129
|
-
objectTypeURI: 'configuration/entityTypes/Location',
|
|
130
|
-
uri: 'configuration/relationTypes/HasAddress/endObject'
|
|
131
|
-
},
|
|
132
|
-
attributes: [
|
|
133
|
-
{
|
|
134
|
-
label: 'ActiveHiddenAttribute',
|
|
135
|
-
name: 'Active',
|
|
136
|
-
type: 'Boolean',
|
|
137
|
-
uri: 'configuration/relationTypes/HasAddress/attributes/Active'
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
]
|
|
142
|
-
},
|
|
143
|
-
mode: Mode.Editing
|
|
144
|
-
};
|
|
145
|
-
var setUp = function (_a) {
|
|
146
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? defaultProps : _c, _d = _b.mdmValues, mdmValues = _d === void 0 ? defaultMdmValues : _d, _e = _b.contextError, contextError = _e === void 0 ? null : _e, _f = _b.hiddenAttributes, hiddenAttributes = _f === void 0 ? {} : _f;
|
|
147
|
-
var user = userEvent.setup();
|
|
148
|
-
var Providers = function (_a) {
|
|
149
|
-
var children = _a.children;
|
|
150
|
-
return (React.createElement(HiddenAttributesContext.Provider, { value: hiddenAttributes },
|
|
151
|
-
React.createElement(MdmModuleProvider, { actions: mdmActions, values: mdmValues },
|
|
152
|
-
React.createElement(ScrollToElementContext.Provider, { value: {
|
|
153
|
-
element: contextError,
|
|
154
|
-
highlightError: jest.fn(),
|
|
155
|
-
scrollIntoRef: jest.fn(),
|
|
156
|
-
type: ScrollType.Error
|
|
157
|
-
} },
|
|
158
|
-
React.createElement(LocalizationProvider, { dateAdapter: AdapterMoment }, children)))));
|
|
159
|
-
};
|
|
160
|
-
return __assign(__assign({}, render(React.createElement(RelationEditor, __assign({}, props)), { wrapper: Providers })), { user: user });
|
|
161
|
-
};
|
|
162
|
-
describe('RelationEditor behaviour', function () {
|
|
163
|
-
beforeEach(function () {
|
|
164
|
-
typeAheadSearch.mockResolvedValue([]);
|
|
165
|
-
});
|
|
166
|
-
afterEach(function () {
|
|
167
|
-
jest.clearAllMocks();
|
|
168
|
-
});
|
|
169
|
-
it('should show "create entity" button if mode is not suggesting', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
170
|
-
var user, inputs;
|
|
171
|
-
return __generator(this, function (_a) {
|
|
172
|
-
switch (_a.label) {
|
|
173
|
-
case 0:
|
|
174
|
-
user = setUp().user;
|
|
175
|
-
inputs = screen.getAllByRole('combobox');
|
|
176
|
-
return [4 /*yield*/, user.click(inputs[0])];
|
|
177
|
-
case 1:
|
|
178
|
-
_a.sent();
|
|
179
|
-
expect(typeAheadSearch).toHaveBeenCalledWith([{ label: 'Address', uri: 'configuration/entityTypes/Location' }], '', {
|
|
180
|
-
globalFilter: '',
|
|
181
|
-
max: 20,
|
|
182
|
-
searchOptions: '',
|
|
183
|
-
sendMasked: false
|
|
184
|
-
});
|
|
185
|
-
screen.getByText('Create new Address');
|
|
186
|
-
return [2 /*return*/];
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
}); });
|
|
190
|
-
it('should show "create entity" button if mode is suggesting, but main entity uri is not temporary', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
191
|
-
var props, mdmValues, user, inputs;
|
|
192
|
-
return __generator(this, function (_a) {
|
|
193
|
-
switch (_a.label) {
|
|
194
|
-
case 0:
|
|
195
|
-
props = __assign(__assign({}, defaultProps), { mode: Mode.Suggesting });
|
|
196
|
-
mdmValues = __assign(__assign({}, defaultMdmValues), { entity: __assign(__assign({}, defaultEntity), { uri: 'entities/123' }) });
|
|
197
|
-
user = setUp({ props: props, mdmValues: mdmValues }).user;
|
|
198
|
-
inputs = screen.getAllByRole('combobox');
|
|
199
|
-
return [4 /*yield*/, user.click(inputs[0])];
|
|
200
|
-
case 1:
|
|
201
|
-
_a.sent();
|
|
202
|
-
screen.getByText('Create new Address');
|
|
203
|
-
return [2 /*return*/];
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
}); });
|
|
207
|
-
it('should show "create entity" button if mode is suggesting, main entity uri is temporary, but authoring mode is enabled for current entity type', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
208
|
-
var uiConfigProfile, props, mdmValues, user, inputs;
|
|
209
|
-
return __generator(this, function (_a) {
|
|
210
|
-
switch (_a.label) {
|
|
211
|
-
case 0:
|
|
212
|
-
uiConfigProfile = [
|
|
213
|
-
{
|
|
214
|
-
label: 'Profile',
|
|
215
|
-
id: 'com.reltio.plugins.ProfileEntityAction',
|
|
216
|
-
class: ScreenType.Profile,
|
|
217
|
-
entityTypes: {
|
|
218
|
-
'configuration/entityTypes/HCP': {
|
|
219
|
-
views: [],
|
|
220
|
-
layout: [],
|
|
221
|
-
sidePanelViews: [],
|
|
222
|
-
authoring: [
|
|
223
|
-
{
|
|
224
|
-
label: 'Profile details',
|
|
225
|
-
views: [],
|
|
226
|
-
layout: []
|
|
227
|
-
}
|
|
228
|
-
]
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
];
|
|
233
|
-
props = __assign(__assign({}, defaultProps), { mode: Mode.Suggesting });
|
|
234
|
-
mdmValues = __assign(__assign({}, defaultMdmValues), { uiConfigProfile: uiConfigProfile });
|
|
235
|
-
user = setUp({ props: props, mdmValues: mdmValues }).user;
|
|
236
|
-
inputs = screen.getAllByRole('combobox');
|
|
237
|
-
return [4 /*yield*/, user.click(inputs[0])];
|
|
238
|
-
case 1:
|
|
239
|
-
_a.sent();
|
|
240
|
-
screen.getByText('Create new Address');
|
|
241
|
-
return [2 /*return*/];
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
}); });
|
|
245
|
-
it('should not show "create entity" button if mode is "Suggesting", main entity uri is temporary and authoring mode is not enabled for current entity type', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
246
|
-
var props, user, inputs;
|
|
247
|
-
return __generator(this, function (_a) {
|
|
248
|
-
switch (_a.label) {
|
|
249
|
-
case 0:
|
|
250
|
-
props = __assign(__assign({}, defaultProps), { mode: Mode.Suggesting });
|
|
251
|
-
user = setUp({ props: props }).user;
|
|
252
|
-
inputs = screen.getAllByRole('combobox');
|
|
253
|
-
return [4 /*yield*/, user.click(inputs[0])];
|
|
254
|
-
case 1:
|
|
255
|
-
_a.sent();
|
|
256
|
-
expect(screen.queryByText('Create new Address')).not.toBeInTheDocument();
|
|
257
|
-
return [2 /*return*/];
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
}); });
|
|
261
|
-
it('should not hide hidden attributes', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
262
|
-
var hiddenAttributes, user, inputs;
|
|
263
|
-
return __generator(this, function (_a) {
|
|
264
|
-
switch (_a.label) {
|
|
265
|
-
case 0:
|
|
266
|
-
hiddenAttributes = {
|
|
267
|
-
'entities/uri$$123': ['configuration/relationTypes/HasAddress/attributes/Active']
|
|
268
|
-
};
|
|
269
|
-
user = setUp({ hiddenAttributes: hiddenAttributes }).user;
|
|
270
|
-
inputs = screen.getAllByRole('combobox');
|
|
271
|
-
return [4 /*yield*/, user.click(inputs[0])];
|
|
272
|
-
case 1:
|
|
273
|
-
_a.sent();
|
|
274
|
-
expect(screen.getByText('ActiveHiddenAttribute')).toBeInTheDocument();
|
|
275
|
-
return [2 /*return*/];
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
}); });
|
|
279
|
-
it('should add sendMasked option if connection entity has attribute with masked value', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
280
|
-
var props, user, inputs;
|
|
281
|
-
return __generator(this, function (_a) {
|
|
282
|
-
switch (_a.label) {
|
|
283
|
-
case 0:
|
|
284
|
-
props = __assign(__assign({}, defaultProps), { connection: {
|
|
285
|
-
relation: defaultRelation,
|
|
286
|
-
entity: {
|
|
287
|
-
uri: 'entities/uri$$123',
|
|
288
|
-
type: 'configuration/entityTypes/HCP',
|
|
289
|
-
object: {
|
|
290
|
-
uri: 'entities/04B1CqH',
|
|
291
|
-
type: 'configuration/entityTypes/Location',
|
|
292
|
-
attributes: {
|
|
293
|
-
Address: [
|
|
294
|
-
{
|
|
295
|
-
label: 'AcOEvPaVqTfzZCE Josogaf VA',
|
|
296
|
-
relationshipLabel: '',
|
|
297
|
-
value: {
|
|
298
|
-
AddressLine1: [
|
|
299
|
-
{
|
|
300
|
-
type: 'configuration/entityTypes/Location/attributes/AddressLine1',
|
|
301
|
-
ov: true,
|
|
302
|
-
value: 'AcOEvPaVqTfzZCE',
|
|
303
|
-
uri: 'entities/04B1CqH/attributes/Address/03R51aT/AddressLine1/1XFBcmPYm'
|
|
304
|
-
}
|
|
305
|
-
],
|
|
306
|
-
AddressLine2: [
|
|
307
|
-
{
|
|
308
|
-
type: 'configuration/entityTypes/Location/attributes/AddressLine2',
|
|
309
|
-
ov: true,
|
|
310
|
-
masked: true,
|
|
311
|
-
value: 'KBmiSMlqhElLHMH',
|
|
312
|
-
uri: 'entities/04B1CqH/attributes/Address/03R51aT/AddressLine2/1XFBcmTp2'
|
|
313
|
-
}
|
|
314
|
-
]
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
]
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
} });
|
|
322
|
-
user = setUp({ props: props }).user;
|
|
323
|
-
inputs = screen.getAllByRole('textbox');
|
|
324
|
-
return [4 /*yield*/, user.click(inputs[0])];
|
|
325
|
-
case 1:
|
|
326
|
-
_a.sent();
|
|
327
|
-
expect(typeAheadSearch).toHaveBeenCalledWith([{ label: 'Address', uri: 'configuration/entityTypes/Location' }], '', {
|
|
328
|
-
globalFilter: '',
|
|
329
|
-
max: 20,
|
|
330
|
-
searchOptions: '',
|
|
331
|
-
sendMasked: true
|
|
332
|
-
});
|
|
333
|
-
return [2 /*return*/];
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
}); });
|
|
337
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MapInstance } from '../../types';
|
|
3
|
-
type Props = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
position: number;
|
|
7
|
-
map: MapInstance;
|
|
8
|
-
};
|
|
9
|
-
export declare const MapControlContainer: ({ children, className, position, map }: Props) => React.ReactPortal;
|
|
10
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import { createPortal } from 'react-dom';
|
|
3
|
-
export var MapControlContainer = function (_a) {
|
|
4
|
-
var children = _a.children, className = _a.className, position = _a.position, map = _a.map;
|
|
5
|
-
var _b = useState(null), controlElement = _b[0], setControlElement = _b[1];
|
|
6
|
-
useEffect(function () {
|
|
7
|
-
var controlDiv = document.createElement('div');
|
|
8
|
-
var divIndex = map.controls[position].length;
|
|
9
|
-
map.controls[position].push(controlDiv);
|
|
10
|
-
setControlElement(controlDiv);
|
|
11
|
-
return function () {
|
|
12
|
-
map.controls[position].removeAt(divIndex);
|
|
13
|
-
};
|
|
14
|
-
}, [map, position]);
|
|
15
|
-
useEffect(function () {
|
|
16
|
-
if (controlElement && className) {
|
|
17
|
-
controlElement.classList.add(className);
|
|
18
|
-
}
|
|
19
|
-
}, [className, controlElement]);
|
|
20
|
-
if (controlElement) {
|
|
21
|
-
return createPortal(children, controlElement);
|
|
22
|
-
}
|
|
23
|
-
return null;
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import { MapControlContainer } from './MapControlContainer';
|
|
4
|
-
describe('MapControlContainer tests', function () {
|
|
5
|
-
it('should create div and assign it to the map', function () {
|
|
6
|
-
var map = { controls: { 1: [] } };
|
|
7
|
-
mount(React.createElement(MapControlContainer, { position: 1, map: map },
|
|
8
|
-
React.createElement("div", null, "test")));
|
|
9
|
-
var containerElement = map.controls[1][0];
|
|
10
|
-
expect(containerElement.innerHTML.indexOf('<div>test</div>')).not.toBe(-1);
|
|
11
|
-
});
|
|
12
|
-
it('should remove div from map on unmount', function () {
|
|
13
|
-
var arrayStructure = {
|
|
14
|
-
container: [],
|
|
15
|
-
get length() {
|
|
16
|
-
return this.container.length;
|
|
17
|
-
},
|
|
18
|
-
push: function (item) {
|
|
19
|
-
return this.container.push(item);
|
|
20
|
-
},
|
|
21
|
-
removeAt: function (index) {
|
|
22
|
-
return this.container.splice(index);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
var map = { controls: { 1: arrayStructure } };
|
|
26
|
-
var component = mount(React.createElement(MapControlContainer, { position: 1, map: map },
|
|
27
|
-
React.createElement("div", null, "test")));
|
|
28
|
-
var getDivContainer = function (map) { return map.controls[1]; };
|
|
29
|
-
expect(getDivContainer(map).length).toBe(1);
|
|
30
|
-
component.unmount();
|
|
31
|
-
expect(getDivContainer(map).length).toBe(0);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MapControlContainer } from './MapControlContainer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MapControlContainer } from './MapControlContainer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { shallow, ReactWrapper } from 'enzyme';
|
|
3
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
4
|
-
import Checkbox from '@mui/material/Checkbox';
|
|
5
|
-
import { TopCenterMapControls } from './TopCenterMapControls';
|
|
6
|
-
var findCheckbox = function (component) {
|
|
7
|
-
var control = new ReactWrapper(component.find(FormControlLabel).prop('control'));
|
|
8
|
-
return control.find(Checkbox);
|
|
9
|
-
};
|
|
10
|
-
describe('TopCenterMapControls tests', function () {
|
|
11
|
-
it('should render main parts', function () {
|
|
12
|
-
var component = shallow(React.createElement(TopCenterMapControls, { isSearchOnMapMove: false }));
|
|
13
|
-
expect(component.find(FormControlLabel).length).toBe(1);
|
|
14
|
-
var checkbox = findCheckbox(component);
|
|
15
|
-
expect(checkbox.length).toBe(1);
|
|
16
|
-
expect(checkbox.prop('checked')).toBe(false);
|
|
17
|
-
});
|
|
18
|
-
it('should render checked checkbox if "isSearchOnMapMove" prop is true', function () {
|
|
19
|
-
var component = shallow(React.createElement(TopCenterMapControls, { isSearchOnMapMove: true }));
|
|
20
|
-
expect(component.find(FormControlLabel).length).toBe(1);
|
|
21
|
-
var checkbox = findCheckbox(component);
|
|
22
|
-
expect(checkbox.length).toBe(1);
|
|
23
|
-
expect(checkbox.prop('checked')).toBe(true);
|
|
24
|
-
});
|
|
25
|
-
it('should call "onChangeIsSearchOnMapMove" on Checkbox change', function () {
|
|
26
|
-
var onChange = jest.fn();
|
|
27
|
-
var component = shallow(React.createElement(TopCenterMapControls, { onChangeIsSearchOnMapMove: onChange }));
|
|
28
|
-
var checkbox = findCheckbox(component);
|
|
29
|
-
checkbox.prop('onChange')({
|
|
30
|
-
target: {
|
|
31
|
-
checked: true
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
expect(onChange).toHaveBeenCalledWith(true);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
import React from 'react';
|
|
13
|
-
import { shallow } from 'enzyme';
|
|
14
|
-
import { ButtonWithTooltip, TopRightMapControls } from './TopRightMapControls';
|
|
15
|
-
import { MAP_DRAWING_MODES } from '../../../constants';
|
|
16
|
-
import DrawIcon from '../../../icons/Draw';
|
|
17
|
-
import RadiusIcon from '../../../icons/Radius';
|
|
18
|
-
describe('TopRightMapControls tests', function () {
|
|
19
|
-
var defaultProps;
|
|
20
|
-
beforeEach(function () {
|
|
21
|
-
defaultProps = {
|
|
22
|
-
onDrawingModeChanged: jest.fn(),
|
|
23
|
-
onClearOverlay: jest.fn()
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
it('should render nothing by default', function () {
|
|
27
|
-
var component = shallow(React.createElement(TopRightMapControls, __assign({}, defaultProps)));
|
|
28
|
-
expect(component.find(ButtonWithTooltip).length).toBe(0);
|
|
29
|
-
});
|
|
30
|
-
it('should render clear button if "drawingMode" is defined', function () {
|
|
31
|
-
var component = shallow(React.createElement(TopRightMapControls, __assign({}, defaultProps, { drawingMode: MAP_DRAWING_MODES.POLYGON, drawingModes: [MAP_DRAWING_MODES.POLYGON] })));
|
|
32
|
-
var button = component.find(ButtonWithTooltip);
|
|
33
|
-
expect(button.length).toBe(1);
|
|
34
|
-
expect(button.prop('tooltipTitle')).toBe('Clear area');
|
|
35
|
-
button.prop('onClick')();
|
|
36
|
-
expect(defaultProps.onDrawingModeChanged).toHaveBeenCalledWith(null);
|
|
37
|
-
});
|
|
38
|
-
it('should render clear button if "hasActiveOverlay" is defined', function () {
|
|
39
|
-
var component = shallow(React.createElement(TopRightMapControls, __assign({}, defaultProps, { hasActiveOverlay: true, drawingModes: [MAP_DRAWING_MODES.POLYGON] })));
|
|
40
|
-
var button = component.find(ButtonWithTooltip);
|
|
41
|
-
expect(button.length).toBe(1);
|
|
42
|
-
expect(button.prop('tooltipTitle')).toBe('Clear area');
|
|
43
|
-
button.prop('onClick')();
|
|
44
|
-
expect(defaultProps.onClearOverlay).toHaveBeenCalled();
|
|
45
|
-
});
|
|
46
|
-
it('should render button for every drawing mode', function () {
|
|
47
|
-
var component = shallow(React.createElement(TopRightMapControls, __assign({}, defaultProps, { drawingModes: [MAP_DRAWING_MODES.POLYGON, MAP_DRAWING_MODES.CIRCLE] })));
|
|
48
|
-
expect(component.find(ButtonWithTooltip).length).toBe(2);
|
|
49
|
-
var button1 = component.find(ButtonWithTooltip).at(0);
|
|
50
|
-
var button2 = component.find(ButtonWithTooltip).at(1);
|
|
51
|
-
expect(button1.prop('tooltipTitle')).toBe('Draw area');
|
|
52
|
-
expect(button1.find(DrawIcon).length).toBe(1);
|
|
53
|
-
button1.prop('onClick')();
|
|
54
|
-
expect(defaultProps.onDrawingModeChanged).toHaveBeenCalledWith(MAP_DRAWING_MODES.POLYGON);
|
|
55
|
-
expect(button2.prop('tooltipTitle')).toBe('Draw area');
|
|
56
|
-
expect(button2.find(RadiusIcon).length).toBe(1);
|
|
57
|
-
button2.prop('onClick')();
|
|
58
|
-
expect(defaultProps.onDrawingModeChanged).toHaveBeenCalledWith(MAP_DRAWING_MODES.CIRCLE);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
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
|
-
import React from 'react';
|
|
13
|
-
import { screen, render } from '@testing-library/react';
|
|
14
|
-
import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
|
|
15
|
-
import { HistoryDiffContext } from '../../../contexts/HistoryAppearanceContext';
|
|
16
|
-
import { Role } from '../Role';
|
|
17
|
-
var metadata = { roles: [{ uri: 'role1', label: 'Role Label' }] };
|
|
18
|
-
var setUp = function (props, CustomProviders) {
|
|
19
|
-
if (CustomProviders === void 0) { CustomProviders = React.Fragment; }
|
|
20
|
-
var Providers = function (_a) {
|
|
21
|
-
var children = _a.children;
|
|
22
|
-
return (React.createElement(CustomProviders, null,
|
|
23
|
-
React.createElement(MdmModuleProvider, { values: { metadata: metadata } }, children)));
|
|
24
|
-
};
|
|
25
|
-
return render(React.createElement(Role, __assign({}, props)), { wrapper: Providers });
|
|
26
|
-
};
|
|
27
|
-
describe('Role tests', function () {
|
|
28
|
-
var value = 'role1';
|
|
29
|
-
it('should render role label', function () {
|
|
30
|
-
setUp({ value: value });
|
|
31
|
-
screen.getByText('Role Label');
|
|
32
|
-
});
|
|
33
|
-
it('should provide history className', function () {
|
|
34
|
-
var _a;
|
|
35
|
-
var historyDiff = {
|
|
36
|
-
appearance: {
|
|
37
|
-
roles: (_a = {
|
|
38
|
-
otherValue: 'DELETE_ATTRIBUTE'
|
|
39
|
-
},
|
|
40
|
-
_a[value] = 'INSERT_ATTRIBUTE',
|
|
41
|
-
_a)
|
|
42
|
-
},
|
|
43
|
-
attributes: {},
|
|
44
|
-
roles: [],
|
|
45
|
-
tags: []
|
|
46
|
-
};
|
|
47
|
-
var Providers = function (_a) {
|
|
48
|
-
var children = _a.children;
|
|
49
|
-
return (React.createElement(HistoryDiffContext.Provider, { value: historyDiff }, children));
|
|
50
|
-
};
|
|
51
|
-
setUp({ value: value }, Providers);
|
|
52
|
-
var label = screen.getByText('Role Label');
|
|
53
|
-
expect(label).toHaveClass('insertAttribute');
|
|
54
|
-
});
|
|
55
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { shallow } from 'enzyme';
|
|
3
|
-
import { act } from 'react-dom/test-utils';
|
|
4
|
-
import Typography from '@mui/material/Typography';
|
|
5
|
-
import Divider from '@mui/material/Divider';
|
|
6
|
-
import { SmallIconButtonWithTooltip } from '../SmallIconButton';
|
|
7
|
-
import { SidePanelContentHeader } from './SidePanelContentHeader';
|
|
8
|
-
describe('SidePanelContentHeader test', function () {
|
|
9
|
-
var mainTitle = 'mainTitle';
|
|
10
|
-
var secondTitle = 'secondTitle';
|
|
11
|
-
var rightContent = 'rightContent';
|
|
12
|
-
it('should renders all component well', function () {
|
|
13
|
-
var onCloseFn = jest.fn();
|
|
14
|
-
var component = shallow(React.createElement(SidePanelContentHeader, { onClose: onCloseFn, mainTitle: mainTitle, secondTitle: secondTitle, rightContent: rightContent }));
|
|
15
|
-
expect(component.find(SmallIconButtonWithTooltip)).toHaveLength(1);
|
|
16
|
-
var typographies = component.find(Typography);
|
|
17
|
-
expect(typographies).toHaveLength(2);
|
|
18
|
-
expect(typographies.at(0).text()).toContain(mainTitle);
|
|
19
|
-
expect(typographies.at(1).text()).toContain(secondTitle);
|
|
20
|
-
expect(component.find(Divider)).toHaveLength(1);
|
|
21
|
-
expect(component.text()).toContain(rightContent);
|
|
22
|
-
});
|
|
23
|
-
it('should renders component witn content', function () {
|
|
24
|
-
var onCloseFn = jest.fn();
|
|
25
|
-
var textContent = 'Test content';
|
|
26
|
-
var content = React.createElement("div", null, textContent);
|
|
27
|
-
var component = shallow(React.createElement(SidePanelContentHeader, { onClose: onCloseFn, content: content }));
|
|
28
|
-
expect(component.find(SmallIconButtonWithTooltip)).toHaveLength(1);
|
|
29
|
-
expect(component.text()).toEqual(textContent);
|
|
30
|
-
});
|
|
31
|
-
it('should not render Divider with empty secondTitle', function () {
|
|
32
|
-
var onCloseFn = jest.fn();
|
|
33
|
-
var component = shallow(React.createElement(SidePanelContentHeader, { onClose: onCloseFn, mainTitle: mainTitle, rightContent: rightContent }));
|
|
34
|
-
expect(component.find(SmallIconButtonWithTooltip)).toHaveLength(1);
|
|
35
|
-
var typographies = component.find(Typography);
|
|
36
|
-
expect(typographies).toHaveLength(1);
|
|
37
|
-
expect(typographies.at(0).text()).toContain(mainTitle);
|
|
38
|
-
expect(component.find(Divider)).toHaveLength(0);
|
|
39
|
-
expect(component.text()).toContain(rightContent);
|
|
40
|
-
});
|
|
41
|
-
it('should call onClose after button click', function () {
|
|
42
|
-
var onCloseFn = jest.fn();
|
|
43
|
-
var component = shallow(React.createElement(SidePanelContentHeader, { onClose: onCloseFn, mainTitle: mainTitle, secondTitle: secondTitle, rightContent: rightContent }));
|
|
44
|
-
act(function () {
|
|
45
|
-
component.find(SmallIconButtonWithTooltip).prop('onClick')({});
|
|
46
|
-
});
|
|
47
|
-
expect(onCloseFn).toHaveBeenCalled();
|
|
48
|
-
});
|
|
49
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { shallow } from 'enzyme';
|
|
3
|
-
import { SidePanelEmptyState } from './SidePanelEmptyState';
|
|
4
|
-
import { AttributesList as AttributesListIcon, NoData as NoDataIcon } from '../icons';
|
|
5
|
-
describe('SidePanelEmptyState test', function () {
|
|
6
|
-
it('should render correct default state', function () {
|
|
7
|
-
var wrapper = shallow(React.createElement(SidePanelEmptyState, { text: "test" }));
|
|
8
|
-
expect(wrapper.find(AttributesListIcon).length).toBe(1);
|
|
9
|
-
expect(wrapper.find('.textBox')).toHaveLength(1);
|
|
10
|
-
expect(wrapper.find('.text').text()).toBe('test');
|
|
11
|
-
expect(wrapper.find('.secondaryText').length).toBe(0);
|
|
12
|
-
});
|
|
13
|
-
it('should render icon passed in IconRenderer', function () {
|
|
14
|
-
var wrapper = shallow(React.createElement(SidePanelEmptyState, { IconRenderer: NoDataIcon, text: "test" }));
|
|
15
|
-
expect(wrapper.find(NoDataIcon).length).toBe(1);
|
|
16
|
-
expect(wrapper.find('.text').text()).toBe('test');
|
|
17
|
-
});
|
|
18
|
-
it('should render secondary text', function () {
|
|
19
|
-
var wrapper = shallow(React.createElement(SidePanelEmptyState, { text: "test", secondaryText: "secondaryTest" }));
|
|
20
|
-
expect(wrapper.find(AttributesListIcon).length).toBe(1);
|
|
21
|
-
expect(wrapper.find('.text').text()).toBe('test');
|
|
22
|
-
expect(wrapper.find('.secondaryText').text()).toBe('secondaryTest');
|
|
23
|
-
});
|
|
24
|
-
});
|