@reltio/components 1.4.876 → 1.4.880
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/HOCs/index.js +2 -10
- package/HOCs/withAsyncMount/withAsyncMount.js +6 -27
- package/HOCs/withTooltip/propTypes.js +5 -10
- package/HOCs/withTooltip/withTooltip.js +11 -35
- package/components/ArrowExpandButton/ArrowExpandButton.js +8 -13
- package/components/ArrowExpandButton/styles.js +2 -5
- package/components/AttributeListItem/AttrTypeIcon.js +15 -20
- package/components/AttributeListItem/AttributeListItem.js +31 -56
- package/components/AttributeListItem/styles.js +2 -5
- package/components/AttributeSelector/AttributeSelector.js +27 -51
- package/components/AttributeSelector/styles.js +3 -6
- package/components/AutoSizeList/AutoSizeList.js +15 -39
- package/components/AutoSizeList/styles.js +2 -5
- package/components/AvatarWithFallback/AvatarWithFallback.js +7 -31
- package/components/BasicTableView/BasicTable/BasicTable.js +45 -70
- package/components/BasicTableView/BasicTable/HOCs/withFilter.js +10 -15
- package/components/BasicTableView/BasicTable/HOCs/withFilterAtBottom.js +7 -12
- package/components/BasicTableView/BasicTable/HOCs/withTableContext.js +5 -26
- package/components/BasicTableView/BasicTable/cell-value-renderers/BlobRenderer.js +7 -12
- package/components/BasicTableView/BasicTable/cell-value-renderers/DefaultCellValueRenderer.js +17 -22
- package/components/BasicTableView/BasicTable/cell-value-renderers/index.js +1 -8
- package/components/BasicTableView/BasicTable/cell-value-renderers/styles.js +4 -7
- package/components/BasicTableView/BasicTable/contexts/RowCollapseContext.js +3 -9
- package/components/BasicTableView/BasicTable/contexts/TableContext.js +3 -9
- package/components/BasicTableView/BasicTable/contexts/index.js +1 -5
- package/components/BasicTableView/BasicTable/helpers/dataHelpers.js +37 -45
- package/components/BasicTableView/BasicTable/helpers/defaultGetRowCellHeight.js +4 -6
- package/components/BasicTableView/BasicTable/helpers/defaultRenderRowCell.js +3 -8
- package/components/BasicTableView/BasicTable/helpers/nestedHelpers.js +15 -23
- package/components/BasicTableView/BasicTable/hooks/index.js +2 -10
- package/components/BasicTableView/BasicTable/hooks/useBasicTableCellRenderer.js +21 -45
- package/components/BasicTableView/BasicTable/hooks/useCollapsibleTableRows.js +18 -20
- package/components/BasicTableView/BasicTable/hooks/useDynamicRowCellHeight.js +10 -12
- package/components/BasicTableView/BasicTableHeader/ColumnsSettings/ColumnListItem.js +18 -23
- package/components/BasicTableView/BasicTableHeader/ColumnsSettings/ColumnsSettings.js +39 -63
- package/components/BasicTableView/BasicTableHeader/ColumnsSettings/columnHelpers.js +16 -22
- package/components/BasicTableView/BasicTableHeader/ColumnsSettings/styles.js +2 -5
- package/components/BasicTableView/BasicTableHeader/FilterButton/FilterButton.js +16 -21
- package/components/BasicTableView/BasicTableHeader/FilterButton/styles.js +2 -5
- package/components/BasicTableView/BasicTablePagination/BasicTablePagination.js +28 -52
- package/components/BasicTableView/BasicTablePagination/styles.js +2 -5
- package/components/BasicTableView/CollapseRowButton/CollapseRowButton.js +13 -37
- package/components/BasicTableView/CollapseRowButton/styles.js +2 -5
- package/components/BasicTableView/ColumnFilter/ColumnFilter.js +39 -63
- package/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +24 -29
- package/components/BasicTableView/ColumnFilter/FilterChip/styles.js +3 -6
- package/components/BasicTableView/ColumnFilter/helpers.js +6 -11
- package/components/BasicTableView/ColumnFilter/styles.js +4 -7
- package/components/BasicTableView/RowCellAutoSizer/RowCellAutoSizer.js +13 -37
- package/components/BasicTableView/index.js +17 -47
- package/components/BasicTableView/types/index.js +1 -2
- package/components/BasicTableView/viewState/basicTableViewState.js +25 -30
- package/components/BasicView/BasicView.js +10 -34
- package/components/BasicView/styles.js +2 -5
- package/components/BasicViewContent/BasicViewContent.js +6 -11
- package/components/BasicViewContent/styles.js +2 -5
- package/components/BasicViewHeader/BasicViewHeader.js +8 -13
- package/components/BasicViewHeader/styles.js +2 -5
- package/components/ClickAwayProvider/ClickAwayProvider.js +4 -9
- package/components/CollaborationItem/Avatar/Avatar.js +8 -15
- package/components/CollaborationItem/Avatar/styles.js +2 -5
- package/components/CollaborationItem/CollaborationItem.js +16 -41
- package/components/CollaborationItem/Comment/Comment.js +39 -65
- package/components/CollaborationItem/Comment/styles.d.ts +1 -1
- package/components/CollaborationItem/Comment/styles.js +2 -5
- package/components/CollaborationItem/CommentContent/CommentContent.js +13 -39
- package/components/CollaborationItem/CommentContent/styles.js +2 -5
- package/components/CollaborationItem/CommentTarget/CommentTarget.js +49 -75
- package/components/CollaborationItem/CommentTarget/styles.js +2 -5
- package/components/CollaborationItem/RepliedComment/RepliedComment.js +20 -27
- package/components/CollaborationItem/RepliedComment/styles.js +2 -5
- package/components/CollaborationItem/SendMessageArea/SendMessageArea.js +39 -65
- package/components/CollaborationItem/SendMessageArea/styles.js +2 -5
- package/components/CollaborationItem/TextFieldWithMentions/TextFieldWithMentions.js +12 -38
- package/components/CollaborationItem/TextFieldWithMentions/styles.js +2 -5
- package/components/CollaborationItem/styles.js +2 -5
- package/components/CollaborationItem/utils/index.js +5 -15
- package/components/CollaborationPopup/CollaborationPopup.js +24 -50
- package/components/CollaborationPopup/styles.js +2 -5
- package/components/CollapseButton/CollapseButton.js +10 -15
- package/components/CollapseButton/styles.js +2 -5
- package/components/ColorBar/ColorBar.js +9 -33
- package/components/ColorBar/styles.js +2 -5
- package/components/CommentsContainer/CommentsContainer.js +18 -42
- package/components/CommentsContainer/buttons/AddCommentButton.js +11 -16
- package/components/CommentsContainer/buttons/CommentButton.js +12 -17
- package/components/CommentsContainer/buttons/styles.js +2 -5
- package/components/CommentsContainer/styles.js +4 -7
- package/components/ConfigureColumnsPopup/ConfigureColumnsPopup.js +46 -72
- package/components/ConfigureColumnsPopup/styles.js +3 -5
- package/components/ConfirmDeleteDialog/ConfirmDeleteDialog.js +14 -19
- package/components/ConfirmationDialog/ConfirmationDialog.js +21 -26
- package/components/ConfirmationDialog/styles.js +3 -6
- package/components/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js +20 -44
- package/components/DataTypeValue/DataTypeValue.js +18 -23
- package/components/DateIntervalSelector/DateIntervalSelector.js +22 -27
- package/components/DateIntervalSelector/styles.js +2 -5
- package/components/DateRangePicker/DateRangePicker.js +38 -62
- package/components/DateRangePicker/styles.js +2 -5
- package/components/Drawer/Drawer.js +8 -32
- package/components/DropDownMenuButton/DropDownMenuButton.js +19 -43
- package/components/DropDownMenuButton/MenuItemRenderer.js +13 -37
- package/components/DropDownMenuButton/styles.js +4 -7
- package/components/DropDownSelector/DropDownSelector.d.ts +16 -15
- package/components/DropDownSelector/DropDownSelector.js +41 -64
- package/components/DropDownSelector/components/Menu.js +13 -18
- package/components/DropDownSelector/components/SingleValue.js +9 -15
- package/components/DropDownSelector/components/styles.js +3 -6
- package/components/DropDownSelector/styles.d.ts +1 -1
- package/components/DropDownSelector/styles.js +5 -8
- package/components/EmptySearchResult/NoData.js +6 -13
- package/components/EmptySearchResult/NoMessageComponent.js +9 -14
- package/components/EmptySearchResult/NoResults.js +5 -12
- package/components/EmptySearchResult/index.js +2 -7
- package/components/EmptySearchResult/styles.js +2 -5
- package/components/EmptyState/EmptyState.js +23 -29
- package/components/EmptyState/styles.js +2 -5
- package/components/EntityAvatar/EntityAvatar.js +15 -20
- package/components/EntityAvatar/no-photo.svg.js +1 -4
- package/components/EntityTypeBadge/EntityTypeBadge.js +15 -20
- package/components/EntityTypeBadge/styles.js +3 -5
- package/components/EntityTypeIcon/EntityTypeIcon.js +7 -12
- package/components/EntityTypesSelector/EntityTypesSelector.js +54 -78
- package/components/EntityTypesSelector/ListLabel/ListLabel.js +20 -44
- package/components/EntityTypesSelector/ListLabel/helpers.js +3 -8
- package/components/EntityTypesSelector/ListLabel/styles.js +2 -5
- package/components/EntityTypesSelector/SelectEntityTypesList.js +13 -37
- package/components/EntityTypesSelector/styles.js +2 -5
- package/components/EntityUriLink/EntityUriLink.js +14 -35
- package/components/ErrorBoundary/ErrorBoundary.js +3 -8
- package/components/ErrorPopup/ErrorPopup.js +14 -19
- package/components/ErrorPopup/styles.js +2 -5
- package/components/ErrorWrapper/ErrorMessage.js +7 -12
- package/components/ErrorWrapper/ErrorWrapper.js +11 -35
- package/components/ErrorWrapper/styles.js +2 -5
- package/components/ExpandableSearchInput/ExpandableSearchInput.js +19 -45
- package/components/ExpandableSearchInput/styles.js +2 -5
- package/components/ExpandedValueTooltip/ExpandedValueTooltip.js +22 -47
- package/components/FacetViewHeader/FacetViewHeader.js +7 -12
- package/components/FacetViewHeader/styles.js +2 -5
- package/components/FlipCard/FlipCard.js +11 -35
- package/components/FlipCard/styles.js +2 -5
- package/components/FlipCard/types/index.js +1 -2
- package/components/HideOnShrink/HideOnShrink.js +9 -14
- package/components/HierarchicalAttributeTooltip/HierarchicalAttributeTooltip.js +13 -18
- package/components/HierarchicalAttributeTooltip/styles.js +4 -7
- package/components/Highlighter/Highlighter.js +6 -11
- package/components/Highlighter/styles.js +2 -5
- package/components/Image/CheckedIcon/CheckedIcon.js +9 -16
- package/components/Image/CheckedIcon/styles.js +2 -5
- package/components/Image/Image.js +18 -43
- package/components/Image/ImageActionsOverlay/ImageActionsOverlay.js +30 -54
- package/components/Image/ImageActionsOverlay/styles.js +2 -5
- package/components/Image/styles.js +2 -5
- package/components/ImageAttributesGallery/GalleryView/GalleryView.js +13 -39
- package/components/ImageAttributesGallery/GalleryView/styles.js +2 -5
- package/components/ImageAttributesGallery/HeaderLeft/HeaderLeft.js +7 -14
- package/components/ImageAttributesGallery/HeaderLeft/styles.js +2 -5
- package/components/ImageAttributesGallery/HeaderRight/HeaderRight.js +17 -24
- package/components/ImageAttributesGallery/HeaderRight/styles.js +2 -5
- package/components/ImageAttributesGallery/ImageAttributesGallery.js +32 -56
- package/components/ImageDetailsView/ImageDetailsView.js +13 -39
- package/components/ImageDetailsView/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +18 -44
- package/components/ImageDetailsView/ImageDetailsViewCarousel/Thumbnails/Thumbnails.js +23 -49
- package/components/ImageDetailsView/ImageDetailsViewCarousel/Thumbnails/styles.js +2 -5
- package/components/ImageDetailsView/ImageDetailsViewCarousel/styles.js +2 -5
- package/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.js +27 -53
- package/components/ImageDetailsView/ImageDetailsViewSidebar/styles.d.ts +1 -1
- package/components/ImageDetailsView/ImageDetailsViewSidebar/styles.js +2 -5
- package/components/ImageDetailsView/MetaInfo/MetaInfo.js +20 -27
- package/components/ImageDetailsView/MetaInfoForm/MetaInfoForm.js +20 -27
- package/components/ImageDetailsView/MetaInfoForm/styles.js +2 -5
- package/components/ImageDetailsView/MetaInfoHeader/MetaInfoHeader.js +17 -43
- package/components/ImageDetailsView/MetaInfoHeader/styles.js +2 -5
- package/components/ImageDetailsView/MetaInfoList/MetaInfoItem/MetaInfoItem.js +8 -15
- package/components/ImageDetailsView/MetaInfoList/MetaInfoItem/styles.js +2 -5
- package/components/ImageDetailsView/MetaInfoList/MetaInfoList.js +16 -23
- package/components/ImageDetailsView/MetaInfoList/styles.js +2 -5
- package/components/ImageDetailsView/constants/index.js +13 -19
- package/components/ImageDetailsView/helpers/index.js +24 -36
- package/components/ImageDetailsView/hooks/useEditMetaInfo.js +21 -25
- package/components/ImageDetailsView/styles.js +2 -5
- package/components/ImageDetailsView/theme/index.js +4 -7
- package/components/ImageDetailsView/types/index.js +1 -2
- package/components/ImageGalleryDialog/ImageGalleryDialog.js +31 -57
- package/components/ImageGalleryDialog/styles.d.ts +1 -1
- package/components/ImageGalleryDialog/styles.js +2 -5
- package/components/ImportButton/ImportButton.js +17 -23
- package/components/ImportButton/styles.js +2 -5
- package/components/LightArrowTooltip/LightArrowTooltip.js +6 -11
- package/components/LightArrowTooltip/styles.js +2 -5
- package/components/LinearLoadIndicator/LinearLoadIndicator.js +8 -13
- package/components/LinearLoadIndicator/styles.js +2 -5
- package/components/Link/Link.js +5 -10
- package/components/Link/styles.js +2 -5
- package/components/LoadingSpinner/LoadingSpinner.js +6 -13
- package/components/LoadingSpinner/SpinnerSmall.gif.js +1 -4
- package/components/Marginator/Marginator.js +3 -8
- package/components/MatchRulesBlock/MatchRulesBadge/MatchRulesBadge.js +10 -34
- package/components/MatchRulesBlock/MatchRulesBadge/styles.js +3 -5
- package/components/MatchRulesBlock/MatchRulesBlock.js +13 -18
- package/components/MatchRulesBlock/MatchRulesTitle.js +4 -9
- package/components/MatchRulesBlock/MatchRulesTooltip/MatchRulesTooltip.js +9 -14
- package/components/MatchRulesBlock/MatchRulesTooltip/styles.d.ts +1 -1
- package/components/MatchRulesBlock/MatchRulesTooltip/styles.js +3 -5
- package/components/MatchRulesBlock/SimpleMatchRules/SimpleMatchRules.js +10 -15
- package/components/MatchRulesBlock/SimpleMatchRules/styles.js +3 -5
- package/components/MatchRulesBlock/SimpleMatchRulesBlock/SimpleMatchRulesBlock.js +18 -43
- package/components/MatchRulesBlock/SimpleMatchRulesBlock/styles.js +3 -5
- package/components/MatchRulesBlock/SimpleMatchRulesBuilder/SimpleMatchRulesBuilder.js +11 -16
- package/components/MatchRulesBlock/TransitiveMatchBlock/TransitiveMatchBlock.js +15 -40
- package/components/MatchRulesBlock/TransitiveMatchBlock/styles.js +3 -5
- package/components/MatchRulesBlock/TransitiveMatchRules/TransitiveMatchRule.js +14 -38
- package/components/MatchRulesBlock/TransitiveMatchRules/styles.js +3 -5
- package/components/MatchRulesBlock/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.js +9 -14
- package/components/MatchRulesBlock/TransitiveMatchRulesTooltip/styles.js +3 -5
- package/components/MatchRulesBlock/types/index.js +1 -2
- package/components/ModeSwitcher/ModeSwitcher.js +13 -18
- package/components/ModeSwitcher/styles.js +5 -7
- package/components/ModeSwitcherSelect/ModeSwitcherSelect.js +25 -32
- package/components/ModeSwitcherSelect/index.js +1 -5
- package/components/ModeSwitcherSelect/styles.js +2 -5
- package/components/MultipleInput/MultipleInput.js +33 -57
- package/components/MultipleInput/styles.js +2 -5
- package/components/MultipliableSelect/MultipliableSelect.js +24 -29
- package/components/MultipliableSelect/styles.js +2 -5
- package/components/Popper/Popper.js +25 -49
- package/components/Popper/styles.js +2 -5
- package/components/Popper/utils.js +4 -8
- package/components/PopupWithArrow/PopupWithArrow.js +16 -23
- package/components/PopupWithArrow/styles.js +2 -5
- package/components/PotentialMatchReviewCard/PotentialMatchReviewCard.js +31 -55
- package/components/PotentialMatchReviewCard/styles.d.ts +1 -1
- package/components/PotentialMatchReviewCard/styles.js +2 -5
- package/components/ProfileBand/ProfileBand.js +47 -71
- package/components/ProfileBand/styles.js +3 -5
- package/components/ProfileBandNavigation/ProfileBandNavigation.js +8 -14
- package/components/ProfileBandNavigation/ProfileBandNavigationWidget.js +18 -25
- package/components/ProfileBandNavigation/hooks/useSearchNavigation.js +42 -64
- package/components/ProfileBandNavigation/hooks/useSearchNavigationVisibility.js +8 -14
- package/components/ProfileBandNavigation/index.js +1 -5
- package/components/ProfileBandNavigation/searchProviders/GraphSearchProvider.js +6 -9
- package/components/ProfileBandNavigation/searchProviders/MainSearchProvider.js +6 -9
- package/components/ProfileBandNavigation/searchProviders/SearchProvider.js +1 -2
- package/components/ProfileBandNavigation/searchProviders/SearchProviderFactory.js +5 -9
- package/components/ProfileBandNavigation/styles.js +2 -5
- package/components/ProfileBandNavigation/types/index.js +1 -2
- package/components/ProfileCard/ProfileCard.js +35 -59
- package/components/ProfileCard/styles.js +3 -5
- package/components/QueryBuilderRow/QueryBuilderRow.js +39 -63
- package/components/QueryBuilderRow/components/ReadOnlyFilter.js +11 -16
- package/components/QueryBuilderRow/components/ReadOnlyLogicOperator.js +11 -16
- package/components/QueryBuilderRow/components/styles.js +3 -5
- package/components/QueryBuilderRow/styles.js +3 -5
- package/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.js +29 -53
- package/components/ReactSelect/AsyncSelect.js +3 -8
- package/components/ReactSelect/CreatableSelect.js +3 -8
- package/components/ReactSelect/MultiSelect/MultiSelect.js +98 -122
- package/components/ReactSelect/MultiSelect/components/Option.js +30 -36
- package/components/ReactSelect/MultiSelect/components/index.js +3 -8
- package/components/ReactSelect/MultiSelect/index.js +2 -7
- package/components/ReactSelect/Select.js +3 -8
- package/components/ReactSelect/commonComponents/ClearIndicator.js +13 -19
- package/components/ReactSelect/commonComponents/Control.js +22 -28
- package/components/ReactSelect/commonComponents/DropdownIndicator.js +13 -19
- package/components/ReactSelect/commonComponents/GroupHeading.js +10 -16
- package/components/ReactSelect/commonComponents/Menu.js +14 -20
- package/components/ReactSelect/commonComponents/MultiValue.js +14 -20
- package/components/ReactSelect/commonComponents/NoOptionsMessage.js +7 -13
- package/components/ReactSelect/commonComponents/Option.js +29 -35
- package/components/ReactSelect/commonComponents/Placeholder.js +8 -14
- package/components/ReactSelect/commonComponents/SingleValue.js +8 -14
- package/components/ReactSelect/commonComponents/ValueContainer.js +8 -14
- package/components/ReactSelect/commonComponents/index.js +23 -28
- package/components/ReactSelect/optionFilters.js +5 -7
- package/components/ReactSelect/styles.js +2 -4
- package/components/ReactSelect/withMuiSkin.js +51 -57
- package/components/ReactSortableTree/index.js +8 -30
- package/components/ReactSortableTree/node-renderer-default.js +43 -48
- package/components/ReactSortableTree/nodeRendererDefaultStyle.js +2 -5
- package/components/ReactSortableTree/placeholder-renderer-default.js +9 -14
- package/components/ReactSortableTree/placeholderRendererDefaultStyle.js +2 -5
- package/components/ReactSortableTree/react-sortable-tree.js +115 -137
- package/components/ReactSortableTree/reactSortableTreeStyles.js +1 -5
- package/components/ReactSortableTree/tree-node.js +29 -53
- package/components/ReactSortableTree/tree-placeholder.js +13 -37
- package/components/ReactSortableTree/treeNodeStyle.js +2 -5
- package/components/ReactSortableTree/utils/classnames.js +1 -4
- package/components/ReactSortableTree/utils/default-handlers.js +3 -8
- package/components/ReactSortableTree/utils/dnd-manager.js +13 -15
- package/components/ReactSortableTree/utils/generic-utils.js +1 -5
- package/components/ReactSortableTree/utils/memoized-tree-data-utils.js +4 -7
- package/components/ReactSortableTree/utils/tree-data-utils.js +20 -40
- package/components/ReltioGridLayout/ReltioGridLayout.js +40 -64
- package/components/ReltioGridLayout/helpers.js +11 -20
- package/components/ReltioGridLayout/icons/ResizeIcon.svg.js +1 -4
- package/components/ReltioGridLayout/styles.js +5 -8
- package/components/ReltioMap/EntityMarker/EntityMarker.js +28 -52
- package/components/ReltioMap/EntityMarker/icons/marker-hover.inline.svg.js +1 -4
- package/components/ReltioMap/EntityMarker/icons/marker.inline.svg.js +1 -4
- package/components/ReltioMap/EntityMarker/styles.js +2 -5
- package/components/ReltioMap/MapControls/MapControlContainer/MapControlContrainer.js +7 -11
- package/components/ReltioMap/MapControls/TopCenterMapControls/TopCenterMapControls.js +9 -16
- package/components/ReltioMap/MapControls/TopCenterMapControls/styles.js +2 -5
- package/components/ReltioMap/MapControls/TopRightMapControls/TopRightMapControls.js +20 -27
- package/components/ReltioMap/MapControls/TopRightMapControls/styles.js +2 -5
- package/components/ReltioMap/constants.js +3 -6
- package/components/ReltioMap/helpers/index.js +10 -17
- package/components/ReltioMap/index.js +48 -74
- package/components/ReltioMap/styles.js +2 -5
- package/components/ReltioMap/types.js +1 -2
- package/components/RequiredMark/RequiredMark.js +5 -10
- package/components/RequiredMark/styles.js +2 -5
- package/components/ResizablePanes/ResizablePanes.js +24 -48
- package/components/ResizablePanes/styles.js +3 -6
- package/components/Score/DQLabel.js +7 -12
- package/components/Score/Score.js +16 -21
- package/components/Score/ScoreLabel.js +14 -19
- package/components/Score/styles.js +3 -6
- package/components/ScrollableTabs/ScrollableTabs.js +12 -17
- package/components/ScrollableTabs/styles.js +2 -5
- package/components/SearchInput/SearchInput.js +19 -43
- package/components/SearchInput/WhiteSearchInput.js +6 -11
- package/components/SearchInput/styles.js +2 -5
- package/components/SelectionPopup/SelectionPopup.js +26 -31
- package/components/SelectionPopup/SelectionPopupPopper/SelectionPopupPopper.js +26 -31
- package/components/SelectionPopup/helpers.js +14 -17
- package/components/SelectionPopup/styles.js +3 -5
- package/components/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.js +21 -45
- package/components/SelectorWithOnlyOptionAutoSelect/styles.js +2 -5
- package/components/SideIconPanel/SideButtonsPanel.js +8 -15
- package/components/SideIconPanel/styles.js +3 -6
- package/components/SidePanel/SidePanel.js +6 -13
- package/components/SidePanel/SidePanelContentHeader/SidePanelContentHeader.js +14 -21
- package/components/SidePanel/SidePanelContentHeader/styles.js +2 -5
- package/components/SidePanel/styles.js +3 -6
- package/components/SimpleDropDownSelector/DropDownPlaceholder.js +10 -15
- package/components/SimpleDropDownSelector/DropDownValue.js +11 -16
- package/components/SimpleDropDownSelector/SimpleDropDownSelector.js +8 -32
- package/components/SimpleDropDownSelector/styles.js +3 -5
- package/components/SimpleInput/SimpleInput.js +16 -40
- package/components/SmallIconButton/SmallIconButton.js +6 -30
- package/components/SmallIconButton/index.js +4 -11
- package/components/SourceIcon/SourceIcon.js +9 -14
- package/components/Spacer/Spacer.js +3 -8
- package/components/Title/Title.js +17 -22
- package/components/Title/styles.js +2 -5
- package/components/UploadFileButton/UploadFileButton.js +45 -69
- package/components/UploadFileButton/styles.js +2 -5
- package/components/UploadImageDialog/DividerWithText/DividerWithText.js +11 -18
- package/components/UploadImageDialog/DividerWithText/styles.js +2 -5
- package/components/UploadImageDialog/ErrorSnackbar/ErrorSnackbar.js +9 -16
- package/components/UploadImageDialog/ErrorSnackbar/styles.js +2 -5
- package/components/UploadImageDialog/ImageByUrlField/ImageByUrlField.js +18 -44
- package/components/UploadImageDialog/ImageByUrlField/styles.js +2 -5
- package/components/UploadImageDialog/SelectImageButton/SelectImageButton.js +9 -16
- package/components/UploadImageDialog/TargetBox/TargetBox.js +20 -27
- package/components/UploadImageDialog/TargetBox/styles.js +2 -5
- package/components/UploadImageDialog/UploadImageDialog.js +38 -64
- package/components/UploadImageDialog/constants/index.js +2 -5
- package/components/UploadImageDialog/styles.d.ts +1 -1
- package/components/UploadImageDialog/styles.js +2 -5
- package/components/UserSelector/UserSelector.js +24 -48
- package/components/UserSelector/styles.js +3 -6
- package/components/ValueChip/ValueChip.js +16 -21
- package/components/ValueChip/styles.js +3 -6
- package/components/VerticalDivider/VerticalDivider.js +6 -11
- package/components/VerticalHeadingsTable/VerticalHeadingsTable.js +19 -43
- package/components/ViewMoreToggle/ViewMoreToggle.js +15 -20
- package/components/ViewMoreToggle/styles.js +2 -5
- package/components/VirtualGroupedList/VirtualGroupedList.js +41 -66
- package/components/VirtualGroupedList/helpers.js +13 -17
- package/components/VirtualGroupedList/styles.js +2 -5
- package/components/activityLog/ActivityExportButton/ActivityExportButton.js +35 -59
- package/components/activityLog/ActivityExportButton/styles.js +2 -5
- package/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +35 -59
- package/components/activityLog/ActivityFilterEditor/ActivitySelector.js +18 -23
- package/components/activityLog/ActivityFilterEditor/DateRangeSelector.js +41 -65
- package/components/activityLog/ActivityFilterEditor/SourceSelector.js +19 -24
- package/components/activityLog/ActivityFilterEditor/styles.js +3 -6
- package/components/activityLog/ActivityFilterEditor/utils/getSelectorActivityTypes.js +24 -28
- package/components/activityLog/ActivityLog/ActivityLog.js +29 -53
- package/components/activityLog/ActivityLog/helpers.js +9 -16
- package/components/activityLog/ActivityLog/items/ActivityItem/ActivityItem.js +18 -23
- package/components/activityLog/ActivityLog/items/ActivityItem/styles.js +2 -5
- package/components/activityLog/ActivityLog/items/GroupItem/GroupItem.js +14 -19
- package/components/activityLog/ActivityLog/items/GroupItem/styles.js +2 -5
- package/components/activityLog/ActivityLog/styles.js +2 -5
- package/components/activityLog/ActivityLogFilter/ActivityLogFilter.js +15 -39
- package/components/activityLog/ActivityLogFilter/ActivityLogFilterHeader.js +17 -22
- package/components/activityLog/ActivityLogFilter/helpers.js +19 -26
- package/components/activityLog/ActivityLogFilter/styles.js +2 -5
- package/components/activityLog/activities/ActivitiesFactory.js +98 -103
- package/components/activityLog/activities/ActivityTitle/ActivityTitle.js +7 -12
- package/components/activityLog/activities/ActivityTitle/styles.js +2 -5
- package/components/activityLog/activities/CommentActivity.js +4 -9
- package/components/activityLog/activities/EntityObject/EntityObject.js +10 -15
- package/components/activityLog/activities/EntityObject/styles.js +2 -5
- package/components/activityLog/activities/GroupActivity.js +12 -17
- package/components/activityLog/activities/MergeActivity.js +9 -14
- package/components/activityLog/activities/MoreItemsLink/MoreItemsLink.js +7 -14
- package/components/activityLog/activities/PotentialMatchActivity.js +8 -13
- package/components/activityLog/activities/ProfileActivity.js +9 -14
- package/components/activityLog/activities/RelationActivity.js +9 -14
- package/components/activityLog/activities/RelationObject/RelationObject.js +11 -16
- package/components/activityLog/activities/RelationObject/styles.js +2 -5
- package/components/activityLog/activities/SearchActivity.js +18 -42
- package/components/activityLog/activities/SimpleActivity.js +13 -18
- package/components/activityLog/activities/fields/DeltaField.js +25 -30
- package/components/activityLog/activities/fields/PotentialMatchField.js +26 -31
- package/components/activityLog/activities/fields/commonStyles.js +2 -5
- package/components/activityLog/activities/fields/styles.js +2 -5
- package/components/activityLog/activities/records/CollapsibleActivityRecords.js +9 -16
- package/components/activityLog/activities/records/EntityRecord.js +24 -29
- package/components/activityLog/activities/records/PotentialMatchRecord.js +10 -15
- package/components/activityLog/activities/records/RecordUpdates.js +12 -17
- package/components/activityLog/activities/records/RelationRecord.js +13 -18
- package/components/activityLog/activities/records/styles.js +2 -5
- package/components/activityLog/activities/styles.js +2 -5
- package/components/activityLog/contexts/CollapsibleItemsContext/index.js +8 -32
- package/components/activityLog/hooks/useActivitiesLoader.js +8 -12
- package/components/activityLog/hooks/useProfileActivitiesLoader.js +8 -12
- package/components/activityLog/hooks/useReadableSearchState.js +18 -41
- package/components/activityLog/index.js +5 -25
- package/components/activityLog/types/ActivitiesFilter.js +1 -2
- package/components/activityLog/types/ActivityData.js +1 -2
- package/components/activityLog/types/ActivityDelta.js +1 -2
- package/components/activityLog/types/ActivityItem.js +1 -2
- package/components/activityLog/types/ActivityTypes.js +2 -5
- package/components/activityLog/types/DeltaTypes.js +2 -5
- package/components/activityLog/types/DeltaValue.js +1 -2
- package/components/activityLog/types/index.js +2 -7
- package/components/activityLog/utils/activities.js +43 -54
- package/components/activityLog/utils/filters.js +23 -30
- package/components/attributes/AttributesView/AttributesView.js +7 -12
- package/components/attributes/AttributesView/index.js +7 -13
- package/components/attributes/BranchDecorator/BranchDecorator.js +7 -12
- package/components/attributes/BranchDecorator/styles.js +2 -5
- package/components/attributes/ImageAttributesLine/ImageAttributesLine.js +41 -65
- package/components/attributes/ImageAttributesLine/constants.js +6 -9
- package/components/attributes/ImageAttributesLine/index.js +1 -8
- package/components/attributes/ImageAttributesLine/styles.js +4 -7
- package/components/attributes/OvIcon/OvIcon.js +18 -24
- package/components/attributes/OvIcon/index.js +1 -8
- package/components/attributes/OvIcon/styles.js +3 -6
- package/components/attributes/PivotingAttributes/PivotingTooltip.js +24 -50
- package/components/attributes/PivotingAttributes/PivotingTooltipContent.js +31 -57
- package/components/attributes/PivotingAttributes/helpers.js +16 -22
- package/components/attributes/PivotingAttributes/styles.d.ts +1 -1
- package/components/attributes/PivotingAttributes/styles.js +3 -6
- package/components/attributes/editMode/AttributesFactory/Attribute.js +3 -8
- package/components/attributes/editMode/AttributesFactory/AttributesFactory.js +11 -16
- package/components/attributes/editMode/AttributesList/AttributesList.js +37 -61
- package/components/attributes/editMode/AttributesList/helpers.js +9 -13
- package/components/attributes/editMode/AttributesList/index.js +1 -8
- package/components/attributes/editMode/AttributesPager/AttributeRenderer.js +34 -58
- package/components/attributes/editMode/AttributesPager/AttributesPager.js +24 -48
- package/components/attributes/editMode/AttributesPager/CardinalityMessage.js +30 -35
- package/components/attributes/editMode/AttributesPager/SpecialRenderer.js +24 -48
- package/components/attributes/editMode/AttributesPager/index.js +12 -38
- package/components/attributes/editMode/AttributesPager/styles.js +2 -5
- package/components/attributes/editMode/AttributesPager/utils.js +4 -7
- package/components/attributes/editMode/AttributesView/AttributesView.js +27 -51
- package/components/attributes/editMode/AttributesView/index.js +6 -12
- package/components/attributes/editMode/AttributesView/styles.js +2 -5
- package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.js +38 -62
- package/components/attributes/editMode/ComplexAttribute/styles.js +2 -5
- package/components/attributes/editMode/EntityCreator/EntityCreator.js +16 -40
- package/components/attributes/editMode/EntityCreator/index.js +9 -34
- package/components/attributes/editMode/EntitySelector/EntitySelector.js +43 -67
- package/components/attributes/editMode/EntitySelector/components/ClearIndicator.js +10 -15
- package/components/attributes/editMode/EntitySelector/components/EntityOption.js +26 -31
- package/components/attributes/editMode/EntitySelector/components/EntityTypeOption.js +20 -25
- package/components/attributes/editMode/EntitySelector/components/Group.js +18 -23
- package/components/attributes/editMode/EntitySelector/components/SingleValue.js +26 -50
- package/components/attributes/editMode/EntitySelector/components/styles.js +5 -8
- package/components/attributes/editMode/EntitySelector/styles.js +2 -5
- package/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.js +35 -59
- package/components/attributes/editMode/ImageAttributesLine/index.js +2 -7
- package/components/attributes/editMode/ImageAttributesLine/styles.js +2 -5
- package/components/attributes/editMode/MoreAttributesButton/MoreAttributesButton.js +46 -70
- package/components/attributes/editMode/MoreAttributesButton/index.js +1 -8
- package/components/attributes/editMode/MoreAttributesButton/styles.js +2 -5
- package/components/attributes/editMode/NestedAttribute/NestedAttribute.js +7 -31
- package/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.js +46 -70
- package/components/attributes/editMode/ReferenceAttribute/index.js +13 -38
- package/components/attributes/editMode/ReferenceAttribute/styles.js +2 -5
- package/components/attributes/editMode/RelationTypeSelector/RelationTypeSelector.js +18 -42
- package/components/attributes/editMode/RelationTypeSelector/components/RelationOption.js +31 -36
- package/components/attributes/editMode/RelationTypeSelector/components/styles.js +2 -5
- package/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +57 -81
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.js +15 -22
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.js +4 -8
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.js +7 -14
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.js +10 -17
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/types.js +1 -2
- package/components/attributes/editMode/SimpleAttributeEditor/styles.js +2 -5
- package/components/attributes/editMode/SimpleAttributeEditor/utils.js +27 -35
- package/components/attributes/helpers/attributesView.js +6 -11
- package/components/attributes/helpers/imageAttributes.js +1 -5
- package/components/attributes/inline/AttributesList/AttributesList.js +12 -17
- package/components/attributes/inline/AttributesList/styles.js +2 -5
- package/components/attributes/inline/AttributesPager/AttributesPager.js +24 -48
- package/components/attributes/inline/AttributesPager/styles.js +2 -5
- package/components/attributes/inline/ComplexAttribute/ComplexAttribute.js +35 -59
- package/components/attributes/inline/ComplexAttribute/styles.js +2 -5
- package/components/attributes/inline/ImageAttribute/ImageAttribute.js +8 -13
- package/components/attributes/inline/ImageAttribute/styles.js +2 -5
- package/components/attributes/inline/ImageAttributesBlock/ImageAttributesBlock.js +4 -9
- package/components/attributes/inline/NestedAttribute/NestedAttribute.js +7 -12
- package/components/attributes/inline/NestedAttributesBlock/NestedAttributesBlock.js +9 -14
- package/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.js +18 -23
- package/components/attributes/inline/ReferenceAttribute/styles.js +2 -5
- package/components/attributes/inline/ReferenceAttributesBlock/ReferenceAttributesBlock.js +4 -9
- package/components/attributes/inline/SimpleAttribute/CrosswalkMenuItem/CrosswalkMenuItem.js +14 -38
- package/components/attributes/inline/SimpleAttribute/CrosswalkMenuItem/styles.js +2 -5
- package/components/attributes/inline/SimpleAttribute/SimpleAttribute.js +44 -68
- package/components/attributes/inline/SimpleAttribute/index.js +1 -8
- package/components/attributes/inline/SimpleAttribute/styles.js +2 -5
- package/components/attributes/inline/SimpleAttributeEditor/SimpleAttributeEditor.js +23 -49
- package/components/attributes/inline/SimpleAttributeEditor/styles.js +2 -5
- package/components/attributes/inline/SimpleAttributesBlock/SimpleAttributesBlock.js +17 -22
- package/components/attributes/inline/SimpleAttributesBlock/styles.js +2 -5
- package/components/attributes/inline/common/ComplexAttributeLabel.js +6 -13
- package/components/attributes/inline/common/CrosswalkIcon.js +12 -17
- package/components/attributes/inline/common/DeleteButton.js +6 -11
- package/components/attributes/inline/common/IgnoreButton.js +7 -12
- package/components/attributes/inline/common/PinButton.js +7 -12
- package/components/attributes/inline/common/SourceItem.js +23 -28
- package/components/attributes/inline/common/__test__/CrosswalkIcon.spec.js +8 -32
- package/components/attributes/inline/common/__test__/DeleteButton.spec.js +8 -13
- package/components/attributes/inline/common/__test__/IgnoreButton.spec.js +10 -15
- package/components/attributes/inline/common/__test__/PinButton.spec.js +10 -15
- package/components/attributes/inline/common/__test__/SourceItem.spec.js +14 -38
- package/components/attributes/inline/common/styles.js +3 -6
- package/components/attributes/inline/hooks/useAttributeState.js +10 -14
- package/components/attributes/inline/index.js +5 -25
- package/components/attributes/inline/types/AddAttributeEvent.js +1 -2
- package/components/attributes/inline/types/CrosswalksMap.js +1 -2
- package/components/attributes/inline/types/DeleteAttributeEvent.js +1 -2
- package/components/attributes/inline/types/EditAttributeEvent.js +1 -2
- package/components/attributes/inline/types/IgnoreAttributeEvent.js +1 -2
- package/components/attributes/inline/types/PinAttributeEvent.js +1 -2
- package/components/attributes/inline/types/index.js +1 -2
- package/components/attributes/pagersCommon/ShowLess.js +10 -15
- package/components/attributes/pagersCommon/ShowMore.js +11 -16
- package/components/attributes/pagersCommon/styles.js +2 -5
- package/components/attributes/readMode/AttributeValuesBlock/AttributeValuesBlock.js +12 -36
- package/components/attributes/readMode/AttributesFactory/Attribute.js +3 -8
- package/components/attributes/readMode/AttributesFactory/AttributesFactory.js +11 -16
- package/components/attributes/readMode/AttributesList/AttributesList.js +19 -43
- package/components/attributes/readMode/AttributesList/index.js +1 -8
- package/components/attributes/readMode/AttributesPager/AttributesPager.js +29 -53
- package/components/attributes/readMode/AttributesPager/MultiLineRenderer.js +19 -43
- package/components/attributes/readMode/AttributesPager/OneLineRenderer.js +18 -23
- package/components/attributes/readMode/AttributesPager/SpecialRenderer.js +20 -25
- package/components/attributes/readMode/AttributesPager/index.js +7 -32
- package/components/attributes/readMode/AttributesPager/styles.js +4 -7
- package/components/attributes/readMode/AttributesView/AttributesView.js +24 -48
- package/components/attributes/readMode/AttributesView/index.js +6 -12
- package/components/attributes/readMode/AttributesView/styles.js +2 -5
- package/components/attributes/readMode/ComplexAttribute/ComplexAttribute.js +30 -54
- package/components/attributes/readMode/ComplexAttribute/styles.js +2 -5
- package/components/attributes/readMode/ImageAttributesLine/ImageAttributesLine.js +19 -43
- package/components/attributes/readMode/ImageAttributesLine/cross.inline.svg.js +1 -4
- package/components/attributes/readMode/ImageAttributesLine/index.js +1 -8
- package/components/attributes/readMode/ImageAttributesLine/styles.js +11 -14
- package/components/attributes/readMode/NestedAttribute/NestedAttribute.js +20 -44
- package/components/attributes/readMode/NestedAttribute/index.js +1 -8
- package/components/attributes/readMode/NestedAttribute/styles.js +7 -9
- package/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +20 -44
- package/components/attributes/readMode/ReferenceAttribute/index.js +7 -13
- package/components/attributes/readMode/ReferenceAttribute/styles.js +7 -9
- package/components/attributes/readMode/SimpleAttribute/SimpleAttribute.js +23 -47
- package/components/attributes/readMode/SimpleAttribute/index.js +1 -8
- package/components/attributes/readMode/SimpleAttribute/styles.js +6 -9
- package/components/attributes/readMode/SpecialAttributes/Roles/Role.js +14 -38
- package/components/attributes/readMode/SpecialAttributes/Roles/Roles.js +5 -10
- package/components/attributes/readMode/SpecialAttributes/Roles/index.js +1 -8
- package/components/attributes/readMode/SpecialAttributes/SpecialAttributesArray.js +4 -25
- package/components/attributes/readMode/SpecialAttributes/Tags/Tag.js +16 -40
- package/components/attributes/readMode/SpecialAttributes/Tags/Tags.js +5 -10
- package/components/attributes/readMode/SpecialAttributes/Tags/index.js +1 -8
- package/components/attributes/readMode/SpecialAttributes/styles.js +5 -8
- package/components/attributes/readMode/helpers/historyAppearance.js +14 -20
- package/components/attributes/types/attributesView.js +1 -2
- package/components/attributes/types/index.js +1 -13
- package/components/charts/ActiveShape/ActiveShape.js +12 -17
- package/components/charts/BarChart/BarChart.js +14 -19
- package/components/charts/BarChart/getBarChartSettings.js +1 -3
- package/components/charts/BubbleChart/BubbleChart.js +33 -59
- package/components/charts/BubbleChart/helpers.js +1 -4
- package/components/charts/BubbleChart/styles.js +2 -5
- package/components/charts/BubbleChart/useBubbles.js +6 -8
- package/components/charts/ChartsFactory.js +30 -35
- package/components/charts/CloudChart/CloudChart.js +22 -48
- package/components/charts/CloudChart/styles.js +2 -5
- package/components/charts/CloudChart/useCloud.js +5 -10
- package/components/charts/CustomLegend/CustomLegend.js +8 -13
- package/components/charts/CustomLegend/getLegendProps.js +4 -9
- package/components/charts/CustomLegend/styles.js +2 -5
- package/components/charts/CustomTooltip/CustomTooltip.js +10 -17
- package/components/charts/CustomTooltip/styles.js +2 -5
- package/components/charts/HOCs/withPercents.js +7 -28
- package/components/charts/LineChart/LineChart.js +15 -20
- package/components/charts/LineChart/getLineChartSettings.js +1 -3
- package/components/charts/MapChart/Legend/Legend.js +11 -16
- package/components/charts/MapChart/Legend/styles.js +2 -5
- package/components/charts/MapChart/MapChart.js +34 -60
- package/components/charts/MapChart/styles.js +2 -5
- package/components/charts/MapChart/useGeography.js +4 -6
- package/components/charts/PieChart/PieChart.js +17 -43
- package/components/charts/TableWithBars/TableWithBars.js +21 -45
- package/components/charts/TableWithBars/cell-renderers/AttributeCellRenderer.js +13 -20
- package/components/charts/TableWithBars/cell-renderers/HeadCellRenderer.js +10 -15
- package/components/charts/TableWithBars/cell-renderers/NumberCellValueRenderer.js +12 -17
- package/components/charts/TableWithBars/cell-renderers/styles.js +2 -5
- package/components/charts/TableWithBars/styles.js +2 -5
- package/components/charts/TreeChart/TreeChart.js +17 -41
- package/components/charts/TreeChart/styles.js +2 -5
- package/components/charts/hooks/useClickableStyle.js +3 -7
- package/components/charts/hooks/useTooltipState.js +5 -7
- package/components/charts/index.js +7 -20
- package/components/charts/types/BarChartOptions.js +1 -2
- package/components/charts/types/ChartData.js +1 -2
- package/components/charts/types/ChartProps.js +1 -2
- package/components/charts/types/LineChartOptions.js +1 -2
- package/components/charts/types/TableWithBarsOptions.js +1 -2
- package/components/charts/types/index.js +1 -2
- package/components/commonReactSelectComponents/DropdownIndicator.js +14 -19
- package/components/commonReactSelectComponents/DropdownIndicatorWithIconButton.js +14 -19
- package/components/commonReactSelectComponents/MenuWithPopper.js +27 -51
- package/components/commonReactSelectComponents/arrowIndicatorStyles.js +2 -5
- package/components/commonReactSelectComponents/menuStyles.js +2 -5
- package/components/crosswalks/AttributesTable/AddAttributesButton/AddAttributesButton.js +20 -27
- package/components/crosswalks/AttributesTable/AddAttributesButton/styles.js +2 -5
- package/components/crosswalks/AttributesTable/AttributesTable.js +43 -67
- package/components/crosswalks/AttributesTable/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.js +28 -52
- package/components/crosswalks/AttributesTable/cell-renderers/AttributeValuesRenderer.js +6 -13
- package/components/crosswalks/AttributesTable/cell-renderers/AttributesHeadCellRenderer.js +11 -18
- package/components/crosswalks/AttributesTable/cell-renderers/CountRenderer.js +6 -11
- package/components/crosswalks/AttributesTable/cell-renderers/DefaultCellValueRenderer.js +5 -10
- package/components/crosswalks/AttributesTable/cell-renderers/HeadCellRenderer.js +8 -13
- package/components/crosswalks/AttributesTable/cell-renderers/OvValuesRenderer.js +9 -14
- package/components/crosswalks/AttributesTable/cell-renderers/RowCellRenderer.js +6 -11
- package/components/crosswalks/AttributesTable/cell-renderers/RuleTypeInfoButton.js +49 -73
- package/components/crosswalks/AttributesTable/cell-renderers/RuleTypeRenderer.js +9 -14
- package/components/crosswalks/AttributesTable/cell-renderers/WinnerSourcesRenderer.js +21 -26
- package/components/crosswalks/AttributesTable/cell-renderers/attribute-renderers/AttributesFactory.js +14 -19
- package/components/crosswalks/AttributesTable/cell-renderers/attribute-renderers/ImageAttributesRenderer.js +7 -12
- package/components/crosswalks/AttributesTable/cell-renderers/attribute-renderers/NestedAttributesRenderer.js +8 -13
- package/components/crosswalks/AttributesTable/cell-renderers/attribute-renderers/ReferenceAttributesRenderer.js +8 -13
- package/components/crosswalks/AttributesTable/cell-renderers/attribute-renderers/SimpleAttributesRenderer.js +7 -12
- package/components/crosswalks/AttributesTable/cell-renderers/attribute-renderers/styles.js +2 -5
- package/components/crosswalks/AttributesTable/cell-renderers/styles.js +2 -5
- package/components/crosswalks/AttributesTable/helpers.js +58 -68
- package/components/crosswalks/AttributesTable/styles.js +2 -5
- package/components/crosswalks/ColoredBlock/ColoredBlock.js +7 -31
- package/components/crosswalks/ColoredBlock/styles.js +2 -5
- package/components/crosswalks/CopyableValueField/CopyableValueField.js +10 -15
- package/components/crosswalks/CopyableValueField/styles.js +2 -5
- package/components/crosswalks/CrosswalkAttributes/CrosswalkAttributes.js +55 -79
- package/components/crosswalks/CrosswalkAttributes/styles.js +2 -5
- package/components/crosswalks/CrosswalkDateEditor/CrosswalkDateEditor.js +10 -34
- package/components/crosswalks/CrosswalkDateEditor/styles.js +2 -5
- package/components/crosswalks/CrosswalkDragLayer/CrosswalkDragLayer.js +11 -35
- package/components/crosswalks/CrosswalkDragLayer/CrosswalkDragPreview.js +17 -22
- package/components/crosswalks/CrosswalkDragLayer/styles.js +2 -5
- package/components/crosswalks/CrosswalkEditor/CrosswalkEditor.js +18 -42
- package/components/crosswalks/CrosswalkEditor/styles.js +2 -5
- package/components/crosswalks/CrosswalkRow/CrosswalkRow.js +56 -80
- package/components/crosswalks/CrosswalkRow/styles.js +2 -5
- package/components/crosswalks/DummyCrosswalkRow/DummyCrosswalkRow.js +20 -44
- package/components/crosswalks/DummyCrosswalkRow/styles.js +2 -5
- package/components/crosswalks/ShowDependentLink/ShowDependentLink.js +8 -13
- package/components/crosswalks/ShowDependentLink/styles.js +2 -5
- package/components/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.js +19 -43
- package/components/crosswalks/hooks/useAttributeActions.js +22 -26
- package/components/crosswalks/hooks/useCrosswalkActions.js +17 -21
- package/components/crosswalks/hooks/useModifiedEntity.js +39 -43
- package/components/crosswalks/index.js +8 -22
- package/components/crosswalks/types/AddCrosswalkEvent.js +1 -2
- package/components/crosswalks/types/CreateAttributeEvent.js +1 -2
- package/components/crosswalks/types/CrosswalkType.js +2 -5
- package/components/crosswalks/types/CrosswalksByOwnerTypeMap.js +1 -2
- package/components/crosswalks/types/CrosswalksByTypes.js +1 -2
- package/components/crosswalks/types/DeleteCrosswalkEvent.js +1 -2
- package/components/crosswalks/types/EditCrosswalkEvent.js +1 -2
- package/components/crosswalks/types/index.js +1 -5
- package/components/crosswalks/utils/legend.js +23 -26
- package/components/editors/BooleanEditor/BooleanEditor.js +9 -14
- package/components/editors/BooleanRadioEditor/BooleanRadioEditor.js +15 -20
- package/components/editors/BooleanRadioEditor/styles.js +2 -5
- package/components/editors/CustomDateRangeEditor/CustomDateRangeEditor.js +26 -50
- package/components/editors/CustomDateRangeEditor/styles.js +2 -5
- package/components/editors/DataTypeValueEditor/DataTypeValueEditor.js +16 -21
- package/components/editors/DataTypeValueEditor/useEditorContext.js +30 -51
- package/components/editors/DateEditor/DateEditor.d.ts +4 -2
- package/components/editors/DateEditor/DateEditor.js +30 -57
- package/components/editors/DateEditor/styles.js +2 -5
- package/components/editors/DateRangeEditor/DateRangeEditor.js +53 -77
- package/components/editors/DateRangeEditor/styles.js +2 -5
- package/components/editors/DependentLookupEditor/DependentLookupEditor.js +56 -81
- package/components/editors/DependentLookupEditor/OptionWithCheckIcon.js +11 -16
- package/components/editors/DependentLookupEditor/helpers.js +4 -8
- package/components/editors/DependentLookupEditor/styles.js +2 -5
- package/components/editors/DependentLookupEditor/useAutopopulation.js +4 -6
- package/components/editors/DependentLookupEditor/useDefaultOptions.js +8 -10
- package/components/editors/DependentLookupEditor/useLookupsResolver.js +10 -12
- package/components/editors/DependentLookupEditor/useSavingFocus.js +4 -6
- package/components/editors/DropDownEditor/DropDownEditor.js +12 -17
- package/components/editors/EditorsFactory.js +58 -63
- package/components/editors/FileTypeEditor/FileTypeEditor.js +12 -36
- package/components/editors/FileTypeEditor/styles.js +2 -5
- package/components/editors/FilterEditor/FilterEditor.js +21 -26
- package/components/editors/FilterEditor/FilterValueEditor.js +35 -40
- package/components/editors/GroupedDropDownEditor/GroupedDropDownEditor.js +26 -33
- package/components/editors/GroupedDropDownEditor/entriesHelpers.js +7 -11
- package/components/editors/GroupedDropDownEditor/styles.js +2 -5
- package/components/editors/LookupEditor/LookupEditor.js +19 -43
- package/components/editors/LookupEditor/entriesHelpers.js +8 -11
- package/components/editors/NumberEditor/NumberEditor.js +26 -31
- package/components/editors/RangeDataTypeValueEditor/RangeDataTypeValueEditor.js +28 -52
- package/components/editors/RangeDataTypeValueEditor/styles.js +2 -5
- package/components/editors/SelectEditor/SelectEditor.js +11 -16
- package/components/editors/TextEditor/TextEditor.js +14 -19
- package/components/editors/TimestampEditor/TimestampEditor.js +30 -54
- package/components/editors/TimestampEditor/styles.js +2 -5
- package/components/editors/TypeaheadEditor/TypeaheadEditor.js +44 -68
- package/components/editors/TypeaheadEditor/styles.js +2 -5
- package/components/editors/commonComponents/MultiValueChip/MultiValueChip.js +16 -21
- package/components/editors/constants.js +4 -7
- package/components/editors/index.js +10 -26
- package/components/history/ContributorsPanel/ContributorItem.js +8 -13
- package/components/history/ContributorsPanel/ContributorsPanel.js +11 -16
- package/components/history/ContributorsPanel/styles.js +3 -6
- package/components/history/DateRangeSelector/DateRangeSelector.js +27 -51
- package/components/history/DateRangeSelector/styles.js +2 -5
- package/components/history/DateRangeSelector/utils.js +7 -14
- package/components/history/HistoryActivitySelector/HistoryActivitySelector.js +18 -23
- package/components/history/HistoryActivitySelector/styles.js +3 -6
- package/components/history/HistoryActivitySelector/utils.js +10 -17
- package/components/history/HistoryFilterButton/HistoryFilterButton.js +32 -56
- package/components/history/HistoryFilterButton/styles.js +2 -5
- package/components/history/HistoryGraph/HistoryCircle.js +11 -17
- package/components/history/HistoryGraph/HistoryGraph.js +20 -44
- package/components/history/HistoryGraph/HistoryLink.js +5 -10
- package/components/history/HistoryGraph/helpers.js +4 -9
- package/components/history/HistoryHeader/HistoryHeader.js +20 -25
- package/components/history/HistoryHeader/styles.js +2 -5
- package/components/history/HistoryMenuButton/HistoryMenuButton.js +7 -12
- package/components/history/HistoryMenuButton/styles.js +2 -5
- package/components/history/HistoryRow/HistoryRow.js +18 -42
- package/components/history/HistoryRow/styles.js +2 -5
- package/components/history/HistoryTree/HistoryTree.js +25 -49
- package/components/history/HistoryTree/styles.js +2 -5
- package/components/history/HistoryView/HistoryView.js +13 -37
- package/components/history/HistoryView/styles.js +2 -5
- package/components/history/ProfileBandHistory/ProfileBandHistory.js +18 -42
- package/components/history/ProfileBandHistory/styles.js +2 -5
- package/components/history/hooks/useHistoricUris.js +10 -14
- package/components/history/hooks/useHistory.js +10 -14
- package/components/history/hooks/useHistorySlice.js +16 -39
- package/components/history/hooks/useHistoryTree.js +36 -40
- package/components/history/hooks/useHistoryWithTotal.js +12 -16
- package/components/history/index.js +8 -31
- package/components/history/types/HistoryChangeTypes.js +2 -5
- package/components/history/types/HistoryData.js +1 -2
- package/components/history/types/HistoryFilter.js +2 -5
- package/components/history/types/HistoryLane.js +1 -2
- package/components/history/types/HistoryLife.js +1 -2
- package/components/history/types/HistoryRowData.js +1 -2
- package/components/history/types/index.js +2 -7
- package/components/index.d.ts +1 -0
- package/components/index.js +121 -257
- package/components/workflow/cards/DataChangeRequestTaskCard/DataChangeRequestTaskCard.d.ts +7 -0
- package/components/workflow/cards/DataChangeRequestTaskCard/DataChangeRequestTaskCard.js +28 -0
- package/components/workflow/cards/GenericWorkflowTaskCard/GenericWorkflowTaskCard.d.ts +10 -0
- package/components/workflow/cards/GenericWorkflowTaskCard/GenericWorkflowTaskCard.js +76 -0
- package/components/workflow/cards/GenericWorkflowTaskCard/styles.d.ts +3 -0
- package/components/workflow/cards/GenericWorkflowTaskCard/styles.js +110 -0
- package/components/workflow/cards/WorkflowTaskCard.d.ts +3 -0
- package/components/workflow/cards/WorkflowTaskCard.js +5 -0
- package/components/workflow/cards/WorkflowTaskCardsFactory.d.ts +9 -0
- package/components/workflow/cards/WorkflowTaskCardsFactory.js +27 -0
- package/components/workflow/components/AssigneeSelector/AssigneeSelector.d.ts +5 -0
- package/components/workflow/components/AssigneeSelector/AssigneeSelector.js +14 -0
- package/components/workflow/components/DueDateField/DueDateField.d.ts +7 -0
- package/components/workflow/components/DueDateField/DueDateField.js +14 -0
- package/components/workflow/components/DueDateField/styles.d.ts +1 -0
- package/components/workflow/components/DueDateField/styles.js +13 -0
- package/components/workflow/components/LineDecorator/LineDecorator.d.ts +11 -0
- package/components/workflow/components/LineDecorator/LineDecorator.js +14 -0
- package/components/workflow/components/LineDecorator/styles.d.ts +1 -0
- package/components/workflow/components/LineDecorator/styles.js +59 -0
- package/components/workflow/components/PrioritySelector/PrioritySelector.d.ts +7 -0
- package/components/workflow/components/PrioritySelector/PrioritySelector.js +12 -0
- package/components/workflow/components/TaskActions/TaskActions.d.ts +5 -0
- package/components/workflow/components/TaskActions/TaskActions.js +15 -0
- package/components/workflow/components/WorkflowComments/CollapsedComments.d.ts +16 -0
- package/components/workflow/components/WorkflowComments/CollapsedComments.js +34 -0
- package/components/workflow/components/WorkflowComments/Comment.d.ts +20 -0
- package/components/workflow/components/WorkflowComments/Comment.js +29 -0
- package/components/workflow/components/WorkflowComments/ExpandedComments.d.ts +14 -0
- package/components/workflow/components/WorkflowComments/ExpandedComments.js +20 -0
- package/components/workflow/components/WorkflowComments/WorkflowComments.d.ts +16 -0
- package/components/workflow/components/WorkflowComments/WorkflowComments.js +42 -0
- package/components/workflow/components/WorkflowComments/index.d.ts +1 -0
- package/components/workflow/components/WorkflowComments/index.js +1 -0
- package/components/workflow/components/WorkflowComments/styles.d.ts +4 -0
- package/components/workflow/components/WorkflowComments/styles.js +105 -0
- package/components/workflow/helpers/errors.d.ts +2 -0
- package/components/workflow/helpers/errors.js +14 -0
- package/components/workflow/helpers/index.d.ts +3 -0
- package/components/workflow/helpers/index.js +10 -0
- package/components/workflow/hooks/useWorkflowActions.d.ts +10 -0
- package/components/workflow/hooks/useWorkflowActions.js +57 -0
- package/components/workflow/hooks/useWorkflowAssignee.d.ts +13 -0
- package/components/workflow/hooks/useWorkflowAssignee.js +83 -0
- package/components/workflow/hooks/useWorkflowCheckPermission.d.ts +1 -0
- package/components/workflow/hooks/useWorkflowCheckPermission.js +84 -0
- package/components/workflow/hooks/useWorkflowColor.d.ts +3 -0
- package/components/workflow/hooks/useWorkflowColor.js +31 -0
- package/components/workflow/hooks/useWorkflowComments.d.ts +7 -0
- package/components/workflow/hooks/useWorkflowComments.js +50 -0
- package/components/workflow/hooks/useWorkflowDueDate.d.ts +6 -0
- package/components/workflow/hooks/useWorkflowDueDate.js +39 -0
- package/components/workflow/hooks/useWorkflowPriority.d.ts +12 -0
- package/components/workflow/hooks/useWorkflowPriority.js +59 -0
- package/components/workflow/index.d.ts +5 -0
- package/components/workflow/index.js +5 -0
- package/constants/attributes.js +2 -5
- package/constants/classnames.js +1 -4
- package/constants/index.js +4 -17
- package/constants/map.js +3 -6
- package/constants/prop-types.js +52 -69
- package/contexts/AsyncMountContext/index.js +8 -14
- package/contexts/BlockImageGalleryDialogContext/index.js +3 -9
- package/contexts/CollaborationContext/index.js +3 -9
- package/contexts/CrosswalksDisplayContext/index.js +20 -47
- package/contexts/EntitiesMapContext/index.js +3 -9
- package/contexts/EntityMarkerContext/index.js +3 -9
- package/contexts/ExpandedAttributesContext/index.js +8 -32
- package/contexts/HistoryAppearanceContext/index.js +3 -9
- package/contexts/IdContext/index.js +3 -9
- package/contexts/PivotingAttributeContext/index.js +2 -8
- package/contexts/PopupBoundariesContext/index.js +8 -14
- package/contexts/ProfilePerspectiveViewContext/index.js +3 -9
- package/contexts/UsersContext/index.js +3 -9
- package/contexts/ViewIdContext/index.js +3 -9
- package/contexts/WorkflowTasksContext/index.d.ts +9 -0
- package/contexts/WorkflowTasksContext/index.js +3 -0
- package/contexts/index.d.ts +15 -14
- package/contexts/index.js +15 -36
- package/core/index.js +1 -13
- package/core/utils.js +6 -21
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +14 -29
- package/hooks/useActions.js +5 -9
- package/hooks/useAsyncMount.js +8 -12
- package/hooks/useCollaboration.js +37 -44
- package/hooks/useConfigPermissions.js +10 -17
- package/hooks/useDidUpdateEffect.js +4 -8
- package/hooks/usePrevious.js +4 -8
- package/hooks/useRelationTypeSelector.js +17 -21
- package/hooks/useRelationsLoader.js +28 -51
- package/hooks/useRunOnceAfterValueInitialization.js +4 -8
- package/hooks/useSafePromise.js +6 -10
- package/hooks/useSavedState.js +5 -9
- package/hooks/useUsers.js +10 -17
- package/hooks/useWhyDidYouUpdate.js +4 -8
- package/hooks/useWorkflowTasks.d.ts +8 -0
- package/hooks/useWorkflowTasks.js +65 -0
- package/icons/Add.js +4 -9
- package/icons/AddComment.js +4 -9
- package/icons/Calendar.js +4 -9
- package/icons/CollaborationIcon.d.ts +3 -0
- package/icons/CollaborationIcon.js +22 -0
- package/icons/Comment.js +4 -9
- package/icons/CommentBubble.js +4 -9
- package/icons/Copy.js +9 -14
- package/icons/Create.js +4 -9
- package/icons/DcrTaskIcon.d.ts +3 -0
- package/icons/DcrTaskIcon.js +19 -0
- package/icons/DefaultImage.js +6 -11
- package/icons/DefaultTaskIcon.d.ts +3 -0
- package/icons/DefaultTaskIcon.js +19 -0
- package/icons/DeleteRequestTaskIcon.d.ts +3 -0
- package/icons/DeleteRequestTaskIcon.js +19 -0
- package/icons/Details.js +9 -14
- package/icons/Download.js +9 -14
- package/icons/Draw.js +10 -15
- package/icons/EmptySearchResults.js +66 -71
- package/icons/Filter.js +4 -9
- package/icons/Ignored.js +4 -9
- package/icons/IgnoredOutlined.js +4 -9
- package/icons/LogIn.js +5 -10
- package/icons/LogOut.js +5 -10
- package/icons/Merge.js +4 -9
- package/icons/MlMatch.js +44 -49
- package/icons/NestedAttribute.js +4 -9
- package/icons/NoData.js +62 -67
- package/icons/NoDataSearch.js +7 -12
- package/icons/NoMatches.js +4 -9
- package/icons/Pin.js +4 -9
- package/icons/PinOutlined.js +4 -9
- package/icons/PivotingIcon.js +4 -9
- package/icons/PmIcon.js +4 -9
- package/icons/PmTaskIcon.d.ts +3 -0
- package/icons/PmTaskIcon.js +19 -0
- package/icons/Polygon.js +4 -9
- package/icons/PotentialMatch.js +4 -9
- package/icons/Profile.js +4 -9
- package/icons/Radius.js +4 -9
- package/icons/Recommended.js +9 -14
- package/icons/ReferenceAttribute.js +4 -9
- package/icons/Remove.js +4 -9
- package/icons/ResizeIconInline.js +4 -9
- package/icons/Search.js +4 -9
- package/icons/SelectAttributes.js +39 -44
- package/icons/SimpleAttribute.js +4 -9
- package/icons/Table.js +4 -9
- package/icons/UnMerge.js +4 -9
- package/icons/UploadIcon.js +28 -33
- package/icons/index.d.ts +11 -2
- package/icons/index.js +46 -80
- package/index.js +7 -19
- package/package.json +5 -4
- package/types/index.js +2 -5
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,54 +9,30 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
-
if (mod && mod.__esModule) return mod;
|
|
27
|
-
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
-
__setModuleDefault(result, mod);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
-
};
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.PivotingTooltipContent = void 0;
|
|
37
|
-
var react_1 = __importStar(require("react"));
|
|
38
|
-
var react_redux_1 = require("react-redux");
|
|
39
|
-
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
40
|
-
var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
|
|
41
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
42
|
-
var EntityAvatar_1 = __importDefault(require("../../EntityAvatar/EntityAvatar"));
|
|
43
|
-
var EntityUriLink_1 = __importDefault(require("../../EntityUriLink/EntityUriLink"));
|
|
44
|
-
var styles_1 = require("./styles");
|
|
45
|
-
var helpers_1 = require("./helpers");
|
|
46
|
-
var hooks_1 = require("../../../hooks");
|
|
12
|
+
import React, { useEffect, useState } from 'react';
|
|
13
|
+
import { useSelector } from 'react-redux';
|
|
14
|
+
import i18n from 'ui-i18n';
|
|
15
|
+
import mdm from '@reltio/mdm-module';
|
|
16
|
+
import { getEntityUriForLink, getFilteredEntities, getLabel, getTotals } from '@reltio/mdm-sdk';
|
|
17
|
+
import EntityAvatar from '../../EntityAvatar/EntityAvatar';
|
|
18
|
+
import EntityUriLink from '../../EntityUriLink/EntityUriLink';
|
|
19
|
+
import { useStyles } from './styles';
|
|
20
|
+
import { getParamsFilteringEntities } from './helpers';
|
|
21
|
+
import { useSafePromise } from '../../../hooks';
|
|
47
22
|
var MAX_ENTITIES_PIVOTING_TOOLTIP = 6;
|
|
48
|
-
var PivotingTooltipContent = function (_a) {
|
|
23
|
+
export var PivotingTooltipContent = function (_a) {
|
|
49
24
|
var value = _a.value, attributeType = _a.attributeType, _b = _a.config, config = _b === void 0 ? {} : _b;
|
|
50
|
-
var _c =
|
|
51
|
-
var _d =
|
|
52
|
-
var entity =
|
|
53
|
-
var safePromise =
|
|
54
|
-
var styles =
|
|
55
|
-
var globalSearchRequestOptions =
|
|
25
|
+
var _c = useState([]), entities = _c[0], setEntities = _c[1];
|
|
26
|
+
var _d = useState(0), total = _d[0], setTotal = _d[1];
|
|
27
|
+
var entity = useSelector(mdm.selectors.getEntity) || {};
|
|
28
|
+
var safePromise = useSafePromise();
|
|
29
|
+
var styles = useStyles();
|
|
30
|
+
var globalSearchRequestOptions = useSelector(mdm.selectors.getGlobalSearchRequestOptions) || {};
|
|
56
31
|
var entityType = config.entityType || entity.type;
|
|
57
|
-
|
|
58
|
-
var filters =
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
var filters = getParamsFilteringEntities(value, attributeType, entityType);
|
|
59
34
|
var options = __assign({ max: MAX_ENTITIES_PIVOTING_TOOLTIP }, globalSearchRequestOptions);
|
|
60
|
-
safePromise(Promise.all([
|
|
35
|
+
safePromise(Promise.all([getFilteredEntities(filters, options), getTotals(filters, options)]))
|
|
61
36
|
.then(function (results) {
|
|
62
37
|
var entities = results[0], total = results[1].total;
|
|
63
38
|
setEntities(Array.isArray(entities) ? entities : []);
|
|
@@ -69,16 +44,15 @@ var PivotingTooltipContent = function (_a) {
|
|
|
69
44
|
});
|
|
70
45
|
}, []);
|
|
71
46
|
var hasEntityTypeLabel = Boolean(config.label);
|
|
72
|
-
return (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
hasEntityTypeLabel &&
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
47
|
+
return (React.createElement("div", { className: styles.container },
|
|
48
|
+
React.createElement("div", { className: styles.header },
|
|
49
|
+
React.createElement("div", { className: styles.title }, i18n.text('Pivot profiles')),
|
|
50
|
+
React.createElement("div", { className: styles.divider }),
|
|
51
|
+
React.createElement("div", { className: styles.headerCount }, i18n.number(total, '0,0') + ' ' + (total === 1 ? i18n.text('item') : i18n.text('items')))),
|
|
52
|
+
hasEntityTypeLabel && React.createElement("div", { className: styles.entityTypeLabel }, config.label),
|
|
53
|
+
React.createElement("div", { className: styles.body }, entities.map(function (visibleEntity) { return (React.createElement("div", { key: visibleEntity.uri, className: styles.entityContainer },
|
|
54
|
+
React.createElement(EntityAvatar, { entity: visibleEntity, avatarClassName: styles.profileIcon }),
|
|
55
|
+
React.createElement(EntityUriLink, { className: styles.entityLabel, value: getEntityUriForLink(visibleEntity) }, getLabel(visibleEntity.label)))); })),
|
|
56
|
+
React.createElement("div", { className: styles.footer },
|
|
57
|
+
React.createElement("a", null, i18n.text('See all')))));
|
|
83
58
|
};
|
|
84
|
-
exports.PivotingTooltipContent = PivotingTooltipContent;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
5
|
-
var ramda_1 = require("ramda");
|
|
6
|
-
var getParamsFilteringEntities = function (values, attributeType, entityType) {
|
|
1
|
+
import { attributeUriToSearchUri, DataTypes, findAttributeTypeByUri, getAttributeSource, isOv, FilterOptions } from '@reltio/mdm-sdk';
|
|
2
|
+
import { isNil } from 'ramda';
|
|
3
|
+
export var getParamsFilteringEntities = function (values, attributeType, entityType) {
|
|
7
4
|
if (entityType === void 0) { entityType = ''; }
|
|
8
5
|
var params = [
|
|
9
6
|
{
|
|
@@ -20,9 +17,8 @@ var getParamsFilteringEntities = function (values, attributeType, entityType) {
|
|
|
20
17
|
}
|
|
21
18
|
return params;
|
|
22
19
|
};
|
|
23
|
-
exports.getParamsFilteringEntities = getParamsFilteringEntities;
|
|
24
20
|
var getParamsFilteringNested = function (attributeType, values) {
|
|
25
|
-
var attributeSource =
|
|
21
|
+
var attributeSource = getAttributeSource(attributeType);
|
|
26
22
|
return values.reduce(function (acc, value) {
|
|
27
23
|
var _loop_1 = function (uri) {
|
|
28
24
|
var attrType = (attributeType[attributeSource] || []).find(function (attribute) { return attribute.uri === uri; });
|
|
@@ -41,16 +37,16 @@ var getParamsFilteringNested = function (attributeType, values) {
|
|
|
41
37
|
}, []);
|
|
42
38
|
};
|
|
43
39
|
var createSearchParameter = function (value, attributeType) {
|
|
44
|
-
if (value && value.length && !
|
|
40
|
+
if (value && value.length && !isNil(value[0])) {
|
|
45
41
|
return {
|
|
46
|
-
fieldName:
|
|
47
|
-
filter: attributeType.type ===
|
|
42
|
+
fieldName: attributeUriToSearchUri(attributeType.uri),
|
|
43
|
+
filter: attributeType.type === DataTypes.TYPE_BLOB ? FilterOptions.FULL_TEXT : FilterOptions.EQUALS,
|
|
48
44
|
values: value
|
|
49
45
|
};
|
|
50
46
|
}
|
|
51
47
|
else {
|
|
52
48
|
return {
|
|
53
|
-
fieldName:
|
|
49
|
+
fieldName: attributeUriToSearchUri(attributeType.uri),
|
|
54
50
|
filter: 'missing'
|
|
55
51
|
};
|
|
56
52
|
}
|
|
@@ -61,7 +57,7 @@ var getPivotingChildrenUris = function (attributeType, pivotingAttributes) {
|
|
|
61
57
|
});
|
|
62
58
|
return pivotingAttribute && Array.isArray(pivotingAttribute.children) ? pivotingAttribute.children : [];
|
|
63
59
|
};
|
|
64
|
-
var generatePivotingValue = function (attributeType, value, pivotingAttributes, metadata) {
|
|
60
|
+
export var generatePivotingValue = function (attributeType, value, pivotingAttributes, metadata) {
|
|
65
61
|
var pivotingChildrenUris = getPivotingChildrenUris(attributeType, pivotingAttributes);
|
|
66
62
|
var pivotingChildren = (attributeType === null || attributeType === void 0 ? void 0 : attributeType.attributes) || (attributeType === null || attributeType === void 0 ? void 0 : attributeType.analyticsAttributes) || [];
|
|
67
63
|
if (pivotingChildrenUris.length) {
|
|
@@ -81,29 +77,28 @@ var generatePivotingValue = function (attributeType, value, pivotingAttributes,
|
|
|
81
77
|
return acc;
|
|
82
78
|
}, []);
|
|
83
79
|
};
|
|
84
|
-
exports.generatePivotingValue = generatePivotingValue;
|
|
85
80
|
var valueToString = function (values, metadata, pivotingAttributes) {
|
|
86
81
|
if (!values || values.length === 0)
|
|
87
82
|
return;
|
|
88
83
|
return values.reduce(function (acc, valueContainer) {
|
|
89
84
|
if ('type' in valueContainer && valueContainer.type) {
|
|
90
85
|
var value = 'lookupCode' in valueContainer ? valueContainer.lookupCode : valueContainer.value;
|
|
91
|
-
var attributeType =
|
|
92
|
-
if (value && typeof value !== 'object' &&
|
|
93
|
-
acc.push(
|
|
86
|
+
var attributeType = findAttributeTypeByUri(metadata, valueContainer.type);
|
|
87
|
+
if (value && typeof value !== 'object' && isOv(valueContainer)) {
|
|
88
|
+
acc.push(preparePivotingAttributeValue(value, attributeType));
|
|
94
89
|
}
|
|
95
90
|
else if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
96
|
-
acc.push(
|
|
91
|
+
acc.push(generatePivotingValue(attributeType, value, pivotingAttributes, metadata));
|
|
97
92
|
}
|
|
98
93
|
}
|
|
99
94
|
return acc;
|
|
100
95
|
}, []);
|
|
101
96
|
};
|
|
102
|
-
var preparePivotingAttributeValue = function (value, attributeType) {
|
|
97
|
+
export var preparePivotingAttributeValue = function (value, attributeType) {
|
|
103
98
|
switch (attributeType === null || attributeType === void 0 ? void 0 : attributeType.type) {
|
|
104
|
-
case
|
|
99
|
+
case DataTypes.TYPE_DATE:
|
|
105
100
|
return new Date(value).getTime();
|
|
106
|
-
case
|
|
101
|
+
case DataTypes.TYPE_TIMESTAMP: {
|
|
107
102
|
if (!isNaN(Number(value))) {
|
|
108
103
|
return new Date(Number(value)).getTime();
|
|
109
104
|
}
|
|
@@ -115,4 +110,3 @@ var preparePivotingAttributeValue = function (value, attributeType) {
|
|
|
115
110
|
return value;
|
|
116
111
|
}
|
|
117
112
|
};
|
|
118
|
-
exports.preparePivotingAttributeValue = preparePivotingAttributeValue;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"content" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"content" | "body" | "entityTypeLabel" | "title" | "icon" | "footer" | "header" | "entityLabel" | "container" | "divider" | "headerCount" | "profileIcon" | "entityContainer">;
|
|
2
2
|
export declare const usePivotingTooltipStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"tooltip" | "arrow">;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.usePivotingTooltipStyles = exports.useStyles = void 0;
|
|
4
|
-
var styles_1 = require("@material-ui/core/styles");
|
|
5
|
-
exports.useStyles = styles_1.makeStyles(function (theme) { return ({
|
|
1
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
2
|
+
export var useStyles = makeStyles(function (theme) { return ({
|
|
6
3
|
container: {
|
|
7
4
|
backgroundColor: 'white',
|
|
8
5
|
width: '360px',
|
|
@@ -79,7 +76,7 @@ exports.useStyles = styles_1.makeStyles(function (theme) { return ({
|
|
|
79
76
|
color: theme.palette.primary.main
|
|
80
77
|
}
|
|
81
78
|
}); });
|
|
82
|
-
|
|
79
|
+
export var usePivotingTooltipStyles = makeStyles({
|
|
83
80
|
tooltip: {
|
|
84
81
|
backgroundColor: 'white',
|
|
85
82
|
boxShadow: '0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.2)',
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var AttributesFactory_1 = __importDefault(require("./AttributesFactory"));
|
|
1
|
+
import EditModeAttributesFactory from './AttributesFactory';
|
|
7
2
|
var Attribute = function (props) {
|
|
8
3
|
var attributeType = props.attributeType;
|
|
9
|
-
return
|
|
4
|
+
return EditModeAttributesFactory.build(attributeType, props);
|
|
10
5
|
};
|
|
11
|
-
|
|
6
|
+
export default Attribute;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -21,15 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
20
|
}
|
|
22
21
|
return t;
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
30
|
-
var SimpleAttributeEditor_1 = __importDefault(require("../SimpleAttributeEditor/SimpleAttributeEditor"));
|
|
31
|
-
var NestedAttribute_1 = __importDefault(require("../NestedAttribute/NestedAttribute"));
|
|
32
|
-
var ReferenceAttribute_1 = __importDefault(require("../ReferenceAttribute"));
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import { DataTypes, isReltioCrosswalk } from '@reltio/mdm-sdk';
|
|
25
|
+
import SimpleAttributeEditor from '../SimpleAttributeEditor/SimpleAttributeEditor';
|
|
26
|
+
import NestedAttribute from '../NestedAttribute/NestedAttribute';
|
|
27
|
+
import ReferenceAttribute from '../ReferenceAttribute';
|
|
33
28
|
var EditModeAttributesFactory = /** @class */ (function () {
|
|
34
29
|
function EditModeAttributesFactory() {
|
|
35
30
|
}
|
|
@@ -39,14 +34,14 @@ var EditModeAttributesFactory = /** @class */ (function () {
|
|
|
39
34
|
var showEmptyEditors = props.showEmptyEditors, onAddAttributes = props.onAddAttributes, lazy = props.lazy, errors = props.errors, crosswalks = props.crosswalks, showNonOv = props.showNonOv, propsForSimpleAttribute = __rest(props, ["showEmptyEditors", "onAddAttributes", "lazy", "errors", "crosswalks", "showNonOv"]);
|
|
40
35
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
41
36
|
switch (attributeType.type) {
|
|
42
|
-
case
|
|
43
|
-
return
|
|
44
|
-
case
|
|
45
|
-
return
|
|
37
|
+
case DataTypes.TYPE_NESTED:
|
|
38
|
+
return React.createElement(NestedAttribute, __assign({}, props));
|
|
39
|
+
case DataTypes.TYPE_REFERENCE:
|
|
40
|
+
return React.createElement(ReferenceAttribute, __assign({}, props));
|
|
46
41
|
default:
|
|
47
|
-
return (
|
|
42
|
+
return (React.createElement(SimpleAttributeEditor, __assign({ isReltioCrosswalk: isReltioCrosswalk(crosswalks, props.attributeValue) }, propsForSimpleAttribute)));
|
|
48
43
|
}
|
|
49
44
|
};
|
|
50
45
|
return EditModeAttributesFactory;
|
|
51
46
|
}());
|
|
52
|
-
|
|
47
|
+
export default EditModeAttributesFactory;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,76 +9,53 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
-
if (mod && mod.__esModule) return mod;
|
|
27
|
-
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
-
__setModuleDefault(result, mod);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
-
};
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
var react_1 = __importStar(require("react"));
|
|
37
|
-
var prop_types_1 = __importDefault(require("prop-types"));
|
|
38
|
-
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
39
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
40
|
-
var ramda_1 = require("ramda");
|
|
41
|
-
var AttributesPager_1 = __importDefault(require("../AttributesPager"));
|
|
42
|
-
var BranchDecorator_1 = __importDefault(require("../../BranchDecorator/BranchDecorator"));
|
|
43
|
-
var MoreAttributesButton_1 = __importDefault(require("../MoreAttributesButton"));
|
|
44
|
-
var constants_1 = require("../../../../constants");
|
|
45
|
-
var attributesView_1 = require("../../helpers/attributesView");
|
|
46
|
-
var helpers_1 = require("./helpers");
|
|
12
|
+
import React, { memo, useCallback, useMemo } from 'react';
|
|
13
|
+
import PropTypes from 'prop-types';
|
|
14
|
+
import i18n from 'ui-i18n';
|
|
15
|
+
import { getCreatableAttributeTypes, getAttributesListForEditMode, ModeType } from '@reltio/mdm-sdk';
|
|
16
|
+
import { path } from 'ramda';
|
|
17
|
+
import AttributesPager from '../AttributesPager';
|
|
18
|
+
import BranchDecorator from '../../BranchDecorator/BranchDecorator';
|
|
19
|
+
import MoreAttributesButton from '../MoreAttributesButton';
|
|
20
|
+
import { ALWAYS_VISIBLE_TYPE_URIS } from '../../../../constants';
|
|
21
|
+
import { splitPagersData } from '../../helpers/attributesView';
|
|
22
|
+
import { getMoreAttrTypes } from './helpers';
|
|
47
23
|
var AttributesList = function (_a) {
|
|
48
|
-
var attrTypes = _a.attrTypes, entity = _a.entity, parentUri = _a.parentUri, showEmptyEditors = _a.showEmptyEditors, mode = _a.mode, crosswalks = _a.crosswalks, drawLines = _a.drawLines, children = _a.children, className = _a.className, _b = _a.alwaysVisibleTypeUris, alwaysVisibleTypeUris = _b === void 0 ?
|
|
24
|
+
var attrTypes = _a.attrTypes, entity = _a.entity, parentUri = _a.parentUri, showEmptyEditors = _a.showEmptyEditors, mode = _a.mode, crosswalks = _a.crosswalks, drawLines = _a.drawLines, children = _a.children, className = _a.className, _b = _a.alwaysVisibleTypeUris, alwaysVisibleTypeUris = _b === void 0 ? ALWAYS_VISIBLE_TYPE_URIS : _b, onAddAttributes = _a.onAddAttributes, onChangeAttribute = _a.onChangeAttribute, onDeleteAttribute = _a.onDeleteAttribute, additionalControlsRenderer = _a.additionalControlsRenderer, showNonOv = _a.showNonOv;
|
|
49
25
|
var _c = entity.attributes, attributes = _c === void 0 ? {} : _c;
|
|
50
|
-
var creatableAttrTypes =
|
|
51
|
-
var moreAttrTypes =
|
|
52
|
-
var pagersData =
|
|
53
|
-
var _d =
|
|
54
|
-
var onAddMoreAttributes =
|
|
26
|
+
var creatableAttrTypes = useMemo(function () { return getCreatableAttributeTypes(mode, attrTypes); }, [attrTypes, mode]);
|
|
27
|
+
var moreAttrTypes = getMoreAttrTypes(creatableAttrTypes, entity);
|
|
28
|
+
var pagersData = useMemo(function () { return getAttributesListForEditMode(attrTypes, mode, entity, showEmptyEditors, showNonOv); }, [attrTypes, mode, entity, showEmptyEditors, showNonOv]);
|
|
29
|
+
var _d = useMemo(function () { return splitPagersData(alwaysVisibleTypeUris, pagersData); }, [pagersData, alwaysVisibleTypeUris]), alwaysVisiblePagersData = _d[0], regularPagersData = _d[1];
|
|
30
|
+
var onAddMoreAttributes = useCallback(function (attributeTypes) {
|
|
55
31
|
onAddAttributes(attributeTypes.map(function (attributeType) { return ({ attributeType: attributeType, parentUri: parentUri }); }));
|
|
56
32
|
}, [onAddAttributes, parentUri]);
|
|
57
33
|
var decoratorProps = {
|
|
58
34
|
enabled: drawLines
|
|
59
35
|
};
|
|
60
|
-
return (
|
|
61
|
-
children &&
|
|
62
|
-
|
|
36
|
+
return (React.createElement("div", { className: className },
|
|
37
|
+
children && React.createElement(BranchDecorator, __assign({}, decoratorProps), children),
|
|
38
|
+
React.createElement(BranchDecorator, __assign({}, decoratorProps, { plain: true }), creatableAttrTypes.length > 0 && (React.createElement(MoreAttributesButton, { label: i18n.text('More attributes'), onApply: onAddMoreAttributes, dense: drawLines, data: moreAttrTypes }))),
|
|
63
39
|
regularPagersData.concat(alwaysVisiblePagersData).map(function (_a) {
|
|
64
40
|
var attrType = _a.attrType, values = _a.values;
|
|
65
|
-
return (
|
|
41
|
+
return (React.createElement(AttributesPager, { key: attrType.uri, attributeType: attrType, drawLines: drawLines, values: values, paging: path(['paging', attrType.uri], attributes), parentUri: parentUri, showEmptyEditors: showEmptyEditors, mode: mode, crosswalks: crosswalks, onAddAttributes: onAddAttributes, onChangeAttribute: onChangeAttribute, onDeleteAttribute: onDeleteAttribute, additionalControlsRenderer: additionalControlsRenderer, showNonOv: showNonOv }));
|
|
66
42
|
})));
|
|
67
43
|
};
|
|
68
44
|
AttributesList.propTypes = {
|
|
69
|
-
attrTypes:
|
|
70
|
-
entity:
|
|
71
|
-
parentUri:
|
|
72
|
-
children:
|
|
73
|
-
showEmptyEditors:
|
|
74
|
-
mode:
|
|
75
|
-
crosswalks:
|
|
76
|
-
drawLines:
|
|
77
|
-
showNonOv:
|
|
78
|
-
className:
|
|
79
|
-
alwaysVisibleTypeUris:
|
|
80
|
-
onAddAttributes:
|
|
81
|
-
onChangeAttribute:
|
|
82
|
-
onDeleteAttribute:
|
|
83
|
-
additionalControlsRenderer:
|
|
45
|
+
attrTypes: PropTypes.array,
|
|
46
|
+
entity: PropTypes.object,
|
|
47
|
+
parentUri: PropTypes.string,
|
|
48
|
+
children: PropTypes.node,
|
|
49
|
+
showEmptyEditors: PropTypes.bool,
|
|
50
|
+
mode: ModeType,
|
|
51
|
+
crosswalks: PropTypes.array,
|
|
52
|
+
drawLines: PropTypes.bool,
|
|
53
|
+
showNonOv: PropTypes.bool,
|
|
54
|
+
className: PropTypes.string,
|
|
55
|
+
alwaysVisibleTypeUris: PropTypes.array,
|
|
56
|
+
onAddAttributes: PropTypes.func,
|
|
57
|
+
onChangeAttribute: PropTypes.func,
|
|
58
|
+
onDeleteAttribute: PropTypes.func,
|
|
59
|
+
additionalControlsRenderer: PropTypes.func
|
|
84
60
|
};
|
|
85
|
-
|
|
61
|
+
export default memo(AttributesList);
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getMoreAttrTypes = void 0;
|
|
4
|
-
var ramda_1 = require("ramda");
|
|
5
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
1
|
+
import { always, both, cond, has, T } from 'ramda';
|
|
2
|
+
import { isAnalyticAttribute, isSpecialAttribute } from '@reltio/mdm-sdk';
|
|
6
3
|
var getSource = function (attrType, entity) {
|
|
7
4
|
var _a = entity.attributes, attributes = _a === void 0 ? {} : _a, _b = entity.analyticsAttributes, analyticsAttributes = _b === void 0 ? {} : _b;
|
|
8
|
-
return
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
5
|
+
return cond([
|
|
6
|
+
[isSpecialAttribute, always(entity)],
|
|
7
|
+
[both(isAnalyticAttribute, always(analyticsAttributes)), always(analyticsAttributes)],
|
|
8
|
+
[T, always(attributes)]
|
|
12
9
|
])(attrType);
|
|
13
10
|
};
|
|
14
11
|
var getNameProp = function (attrType) {
|
|
15
|
-
return
|
|
12
|
+
return isSpecialAttribute(attrType) ? 'uri' : 'name';
|
|
16
13
|
};
|
|
17
|
-
var getMoreAttrTypes = function (attrTypes, entity) {
|
|
14
|
+
export var getMoreAttrTypes = function (attrTypes, entity) {
|
|
18
15
|
return attrTypes.filter(function (attrType) {
|
|
19
16
|
var source = getSource(attrType, entity);
|
|
20
17
|
var nameProp = getNameProp(attrType);
|
|
21
|
-
return !(attrType.singleValue &&
|
|
18
|
+
return !(attrType.singleValue && has(attrType[nameProp])(source));
|
|
22
19
|
});
|
|
23
20
|
};
|
|
24
|
-
exports.getMoreAttrTypes = getMoreAttrTypes;
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var AttributesList_1 = require("./AttributesList");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(AttributesList_1).default; } });
|
|
1
|
+
export { default } from './AttributesList';
|
|
@@ -1,74 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
var react_1 = __importStar(require("react"));
|
|
26
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
27
|
-
var ramda_1 = require("ramda");
|
|
28
|
-
var BranchDecorator_1 = __importDefault(require("../../BranchDecorator/BranchDecorator"));
|
|
29
|
-
var ErrorMessage_1 = __importDefault(require("../../../ErrorWrapper/ErrorMessage"));
|
|
30
|
-
var Title_1 = __importDefault(require("../../../Title/Title"));
|
|
31
|
-
var ShowLess_1 = __importDefault(require("../../pagersCommon/ShowLess"));
|
|
32
|
-
var ShowMore_1 = __importDefault(require("../../pagersCommon/ShowMore"));
|
|
33
|
-
var Attribute_1 = __importDefault(require("../AttributesFactory/Attribute"));
|
|
34
|
-
var CardinalityMessage_1 = __importDefault(require("./CardinalityMessage"));
|
|
35
|
-
var styles_1 = require("./styles");
|
|
36
|
-
var utils_1 = require("./utils");
|
|
1
|
+
import React, { useCallback, useRef, useState } from 'react';
|
|
2
|
+
import { createNewAttribute, getAttributeOwnError, isComplexAttribute, isEditableMode as checkIsEditableMode, isEmptyValue } from '@reltio/mdm-sdk';
|
|
3
|
+
import { add, always, has, ifElse, min, pipe, prop, T } from 'ramda';
|
|
4
|
+
import BranchDecorator from '../../BranchDecorator/BranchDecorator';
|
|
5
|
+
import ErrorMessage from '../../../ErrorWrapper/ErrorMessage';
|
|
6
|
+
import Title from '../../../Title/Title';
|
|
7
|
+
import ShowLess from '../../pagersCommon/ShowLess';
|
|
8
|
+
import ShowMore from '../../pagersCommon/ShowMore';
|
|
9
|
+
import Attribute from '../AttributesFactory/Attribute';
|
|
10
|
+
import Cardinality from './CardinalityMessage';
|
|
11
|
+
import { useStyles } from './styles';
|
|
12
|
+
import { filterNewValues } from './utils';
|
|
37
13
|
var AttributeRenderer = function (_a) {
|
|
38
14
|
var max = _a.max, values = _a.values, attributeType = _a.attributeType, parentUri = _a.parentUri, mode = _a.mode, drawLines = _a.drawLines, showEmptyEditors = _a.showEmptyEditors, errorMessage = _a.errorMessage, errors = _a.errors, paging = _a.paging, crosswalks = _a.crosswalks, showNonOv = _a.showNonOv, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, onDeactivateError = _a.onDeactivateError, additionalControlsRenderer = _a.additionalControlsRenderer, requestNextPageOfAttributeValues = _a.requestNextPageOfAttributeValues;
|
|
39
|
-
var styles =
|
|
40
|
-
var _b =
|
|
41
|
-
var _c =
|
|
15
|
+
var styles = useStyles();
|
|
16
|
+
var _b = useState(max), visibleValuesCount = _b[0], setVisibleValuesCount = _b[1];
|
|
17
|
+
var _c = useState(false), hadDeletions = _c[0], setHadDeletions = _c[1];
|
|
42
18
|
var label = attributeType.label, isRequired = attributeType.required, cardinality = attributeType.cardinality, name = attributeType.name, attributeTypeUri = attributeType.uri;
|
|
43
|
-
var isEditableMode =
|
|
44
|
-
var isEmptyValues =
|
|
19
|
+
var isEditableMode = checkIsEditableMode(mode);
|
|
20
|
+
var isEmptyValues = isEmptyValue(values);
|
|
45
21
|
var showEmpty = ((!hadDeletions && showEmptyEditors) || isRequired) && isEmptyValues;
|
|
46
|
-
var emptyEditorValue =
|
|
22
|
+
var emptyEditorValue = useRef(createNewAttribute({
|
|
47
23
|
parentUri: parentUri,
|
|
48
24
|
attributeType: attributeType
|
|
49
25
|
}));
|
|
50
|
-
var onAddOneMore =
|
|
26
|
+
var onAddOneMore = useCallback(function () {
|
|
51
27
|
setVisibleValuesCount(visibleValuesCount + 1);
|
|
52
28
|
var attribute = {
|
|
53
29
|
parentUri: parentUri,
|
|
54
30
|
index: visibleValuesCount,
|
|
55
31
|
attributeType: attributeType
|
|
56
32
|
};
|
|
57
|
-
return onAddAttributes(showEmpty && !
|
|
33
|
+
return onAddAttributes(showEmpty && !isComplexAttribute(attributeType.type) ? [attribute, attribute] : [attribute]);
|
|
58
34
|
}, [visibleValuesCount, onAddAttributes, parentUri, attributeType, showEmpty]);
|
|
59
|
-
var onDelete =
|
|
35
|
+
var onDelete = useCallback(pipe(onDeleteAttribute, T, setHadDeletions), [onDeleteAttribute, setHadDeletions]);
|
|
60
36
|
if (isEmptyValues && !showEmpty) {
|
|
61
37
|
return null;
|
|
62
38
|
}
|
|
63
39
|
if (showEmpty && isEmptyValues) {
|
|
64
40
|
values = [emptyEditorValue.current];
|
|
65
41
|
}
|
|
66
|
-
if (
|
|
42
|
+
if (isEmptyValue(values)) {
|
|
67
43
|
return null;
|
|
68
44
|
}
|
|
69
|
-
var newValuesCount = (
|
|
45
|
+
var newValuesCount = (filterNewValues(values) || []).length;
|
|
70
46
|
var totalProp = showNonOv ? 'totalValues' : 'totalOvValues';
|
|
71
|
-
var totalVisibleValues =
|
|
47
|
+
var totalVisibleValues = ifElse(has(totalProp), pipe(prop(totalProp), add(newValuesCount)), always(values.length))(paging);
|
|
72
48
|
var hasPaging = max < totalVisibleValues;
|
|
73
49
|
var showMore = hasPaging && visibleValuesCount < totalVisibleValues;
|
|
74
50
|
var showLess = hasPaging && visibleValuesCount >= totalVisibleValues;
|
|
@@ -90,14 +66,14 @@ var AttributeRenderer = function (_a) {
|
|
|
90
66
|
var shownValues = values.slice(0, visibleValuesCount);
|
|
91
67
|
var lastIndex = shownValues ? shownValues.length - 1 : 0;
|
|
92
68
|
var hiddenValuesCount = totalVisibleValues - visibleValuesCount;
|
|
93
|
-
return (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
isEditableMode &&
|
|
97
|
-
isEditableMode &&
|
|
98
|
-
|
|
99
|
-
shownValues.map(function (value, idx) { return (
|
|
100
|
-
showMore && (
|
|
101
|
-
showLess &&
|
|
69
|
+
return (React.createElement(BranchDecorator, { enabled: drawLines },
|
|
70
|
+
React.createElement("div", { className: styles.wrapper },
|
|
71
|
+
React.createElement(Title, { label: label, isRequired: isRequired, className: styles.title, attributeType: attributeType }),
|
|
72
|
+
isEditableMode && React.createElement(Cardinality, { cardinality: cardinality }),
|
|
73
|
+
isEditableMode && React.createElement(ErrorMessage, { message: errorMessage, className: styles.typeError }),
|
|
74
|
+
React.createElement("div", { className: styles.attributesWrapper },
|
|
75
|
+
shownValues.map(function (value, idx) { return (React.createElement(Attribute, { key: value.uri, attributeValue: value, attributeType: attributeType, lazy: showEmpty && !isRequired, showEmptyEditors: showEmptyEditors, errors: errors, ownError: getAttributeOwnError(value, idx, attributeType.uri, errors), mode: mode, crosswalks: crosswalks, onAddOneMore: lastIndex === idx ? onAddOneMore : null, onAddAttributes: onAddAttributes, onDeleteAttribute: onDelete, onChangeAttribute: onChangeAttribute, onDeactivateError: onDeactivateError, additionalControlsRenderer: additionalControlsRenderer })); }),
|
|
76
|
+
showMore && (React.createElement(ShowMore, { moreNumber: min(max, hiddenValuesCount), valueNumber: hiddenValuesCount, onClick: onShowMore })),
|
|
77
|
+
showLess && React.createElement(ShowLess, { onClick: onShowLess })))));
|
|
102
78
|
};
|
|
103
|
-
|
|
79
|
+
export default AttributeRenderer;
|