@reltio/components 1.4.876 → 1.4.877
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.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.js +39 -63
- 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.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.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.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.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.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 +2 -5
- 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.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.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.js +26 -50
- 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.js +120 -257
- 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/index.js +14 -36
- package/core/index.js +1 -13
- package/core/utils.js +6 -21
- package/hooks/index.js +13 -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/icons/Add.js +4 -9
- package/icons/AddComment.js +4 -9
- package/icons/Calendar.js +4 -9
- 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/DefaultImage.js +6 -11
- 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/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.js +37 -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,22 +9,17 @@ 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
|
-
var nestedHelpers_1 = require("./nestedHelpers");
|
|
21
|
-
var ramda_1 = require("ramda");
|
|
22
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
23
|
-
var DefaultHeadCellRenderer_1 = __importDefault(require("react-components/dist/Table/DefaultHeadCellRenderer/DefaultHeadCellRenderer"));
|
|
24
|
-
var withFilterAtBottom_1 = __importDefault(require("../HOCs/withFilterAtBottom"));
|
|
12
|
+
import DefaultCellValueRenderer from '../cell-value-renderers/DefaultCellValueRenderer';
|
|
13
|
+
import withFilter from '../HOCs/withFilter';
|
|
14
|
+
import { calcRowSpansForNestedKeys, flattenNestedColumnValues, getNestedKeyForNestedColumnCell, TOTAL_ROW_SPAN_KEY } from './nestedHelpers';
|
|
15
|
+
import { add, always, assoc, chain, evolve, isEmpty, isNil, map, mapObjIndexed, max, objOf, pipe, pluck, prop, propEq, propOr, reduce, reject, slice, uniq, unless, values } from 'ramda';
|
|
16
|
+
import { wrapInArrayIfNeeded } from '@reltio/mdm-sdk';
|
|
17
|
+
import DefaultHeadCellRenderer from 'react-components/dist/Table/DefaultHeadCellRenderer/DefaultHeadCellRenderer';
|
|
18
|
+
import withFilterAtBottom from '../HOCs/withFilterAtBottom';
|
|
25
19
|
var applyCellRendererToColumnCells = function (columnsData, renderRowCell, rowIndex, rowValue) { return function (cells, columnId) {
|
|
26
|
-
var columnIndex = columnsData.findIndex(
|
|
20
|
+
var columnIndex = columnsData.findIndex(propEq('id', columnId));
|
|
27
21
|
var columnData = columnsData[columnIndex];
|
|
28
|
-
var _a = columnsData[columnIndex].rowCellValueRenderer, CellValueRenderer = _a === void 0 ?
|
|
22
|
+
var _a = columnsData[columnIndex].rowCellValueRenderer, CellValueRenderer = _a === void 0 ? DefaultCellValueRenderer : _a;
|
|
29
23
|
return cells.map(function (cell, cellIndex) { return (__assign(__assign({}, cell), { values: renderRowCell({
|
|
30
24
|
columnIndex: columnIndex,
|
|
31
25
|
columnData: columnData,
|
|
@@ -36,61 +30,60 @@ var applyCellRendererToColumnCells = function (columnsData, renderRowCell, rowIn
|
|
|
36
30
|
CellValueRenderer: CellValueRenderer
|
|
37
31
|
}) })); });
|
|
38
32
|
}; };
|
|
39
|
-
var applyCellRenderer =
|
|
33
|
+
var applyCellRenderer = pipe(applyCellRendererToColumnCells, mapObjIndexed);
|
|
40
34
|
var calcHeightForColumnCells = function (columnsData, getRowCellHeight, rowIndex, rowValue) { return function (cells, columnId) {
|
|
41
|
-
var columnIndex = columnsData.findIndex(
|
|
35
|
+
var columnIndex = columnsData.findIndex(propEq('id', columnId));
|
|
42
36
|
var columnData = columnsData[columnIndex];
|
|
43
37
|
return cells.map(function (cell, cellIndex) { return (__assign(__assign({}, cell), { height: getRowCellHeight({ columnIndex: columnIndex, columnData: columnData, rowIndex: rowIndex, rowValue: rowValue, cellIndex: cellIndex, cell: cell }) })); });
|
|
44
38
|
}; };
|
|
45
39
|
var calcHeights = function (columnsData, getRowCellHeight, rowIndex, rowValue) { return function (rowData) {
|
|
46
40
|
return getRowCellHeight
|
|
47
|
-
?
|
|
41
|
+
? mapObjIndexed(calcHeightForColumnCells(columnsData, getRowCellHeight, rowIndex, rowValue), rowData)
|
|
48
42
|
: rowData;
|
|
49
43
|
}; };
|
|
50
44
|
var addRowSpansToColumnCells = function (rowSpansData) {
|
|
51
|
-
return
|
|
45
|
+
return map(function (cell) { return (__assign(__assign({}, cell), { rowSpan: rowSpansData[cell.nestedKey || TOTAL_ROW_SPAN_KEY] })); });
|
|
52
46
|
};
|
|
53
|
-
var getNestedKeysFromRowCells =
|
|
54
|
-
var calcRowSpansData =
|
|
47
|
+
var getNestedKeysFromRowCells = pipe(chain(pluck('nestedKey')), reject(isNil), uniq);
|
|
48
|
+
var calcRowSpansData = pipe(values, getNestedKeysFromRowCells, calcRowSpansForNestedKeys);
|
|
55
49
|
var calcRowSpans = function (rowData) {
|
|
56
50
|
var rowSpansData = calcRowSpansData(rowData);
|
|
57
|
-
return
|
|
51
|
+
return isEmpty(rowSpansData) ? rowData : map(addRowSpansToColumnCells(rowSpansData), rowData);
|
|
58
52
|
};
|
|
59
53
|
var calcNestedKeys = function (columnNestedPath) {
|
|
60
|
-
return
|
|
54
|
+
return map(function (cell) { return (__assign(__assign({}, cell), { nestedKey: getNestedKeyForNestedColumnCell(columnNestedPath, cell) })); });
|
|
61
55
|
};
|
|
62
56
|
var parseNestedColumnValues = function (columnNestedPath, nestedValues) {
|
|
63
|
-
return
|
|
57
|
+
return pipe(flattenNestedColumnValues, calcNestedKeys(columnNestedPath))(nestedValues);
|
|
64
58
|
};
|
|
65
59
|
var getCellValues = function (columnNestedPath, columnValues) {
|
|
66
|
-
return columnNestedPath && !
|
|
60
|
+
return columnNestedPath && !isEmpty(columnValues)
|
|
67
61
|
? parseNestedColumnValues(columnNestedPath, columnValues)
|
|
68
|
-
: [{ values:
|
|
62
|
+
: [{ values: wrapInArrayIfNeeded(columnValues) }];
|
|
69
63
|
};
|
|
70
64
|
var buildRowValues = function (rowValue) {
|
|
71
|
-
return
|
|
65
|
+
return reduce(function (acc, _a) {
|
|
72
66
|
var id = _a.id, nestedPath = _a.nestedPath;
|
|
73
|
-
return
|
|
67
|
+
return assoc(id, getCellValues(nestedPath, rowValue[id]), acc);
|
|
74
68
|
}, {});
|
|
75
69
|
};
|
|
76
70
|
var applyValuesCountConstraint = function (maxValuesCount) {
|
|
77
|
-
return
|
|
71
|
+
return unless(function () { return maxValuesCount === Infinity; }, map(pipe(reject(function (_a) {
|
|
78
72
|
var indexPath = _a.indexPath;
|
|
79
73
|
return indexPath && indexPath.some(function (index) { return index > maxValuesCount - 1; });
|
|
80
|
-
}),
|
|
81
|
-
values:
|
|
74
|
+
}), map(evolve({
|
|
75
|
+
values: slice(0, maxValuesCount)
|
|
82
76
|
})))));
|
|
83
77
|
};
|
|
84
78
|
var getTableRowsData = function (rowValues, columnsData, renderRowCell, getRowCellHeight, getRowMaxValuesCount) {
|
|
85
|
-
if (getRowMaxValuesCount === void 0) { getRowMaxValuesCount =
|
|
86
|
-
return rowValues.map(
|
|
87
|
-
return
|
|
88
|
-
},
|
|
79
|
+
if (getRowMaxValuesCount === void 0) { getRowMaxValuesCount = always(Infinity); }
|
|
80
|
+
return rowValues.map(pipe(function (rowValue, rowIndex) {
|
|
81
|
+
return pipe(buildRowValues(rowValue), applyValuesCountConstraint(getRowMaxValuesCount(rowIndex)), calcRowSpans, calcHeights(columnsData, getRowCellHeight, rowIndex, rowValue), applyCellRenderer(columnsData, renderRowCell, rowIndex, rowValue))(columnsData);
|
|
82
|
+
}, objOf('data')));
|
|
89
83
|
};
|
|
90
|
-
exports.getTableRowsData = getTableRowsData;
|
|
91
84
|
var getTableHeadData = function (columnsData, filters, onFilter) {
|
|
92
85
|
return columnsData.map(function (_a) {
|
|
93
|
-
var id = _a.id, label = _a.label, sortable = _a.sortable, _b = _a.filterable, filterable = _b === void 0 ? true : _b, resizable = _a.resizable, draggable = _a.draggable, _c = _a.autoResize, autoResize = _c === void 0 ? true : _c, initialWidth = _a.initialWidth, minWidth = _a.minWidth, dataTypeDefinition = _a.dataTypeDefinition, filterOptions = _a.filterOptions, _d = _a.headCellRenderer, headCellRenderer = _d === void 0 ?
|
|
86
|
+
var id = _a.id, label = _a.label, sortable = _a.sortable, _b = _a.filterable, filterable = _b === void 0 ? true : _b, resizable = _a.resizable, draggable = _a.draggable, _c = _a.autoResize, autoResize = _c === void 0 ? true : _c, initialWidth = _a.initialWidth, minWidth = _a.minWidth, dataTypeDefinition = _a.dataTypeDefinition, filterOptions = _a.filterOptions, _d = _a.headCellRenderer, headCellRenderer = _d === void 0 ? withFilterAtBottom(DefaultHeadCellRenderer) : _d;
|
|
94
87
|
return ({
|
|
95
88
|
id: id,
|
|
96
89
|
label: label,
|
|
@@ -100,23 +93,22 @@ var getTableHeadData = function (columnsData, filters, onFilter) {
|
|
|
100
93
|
initialWidth: initialWidth,
|
|
101
94
|
minWidth: minWidth,
|
|
102
95
|
autoResize: autoResize,
|
|
103
|
-
renderer:
|
|
96
|
+
renderer: unless(function () { return isNil(filters); }, withFilter({
|
|
104
97
|
dataTypeDefinition: dataTypeDefinition,
|
|
105
98
|
filterable: filterable,
|
|
106
|
-
filter:
|
|
99
|
+
filter: prop(id, filters),
|
|
107
100
|
filterOptions: filterOptions,
|
|
108
101
|
onFilter: onFilter
|
|
109
102
|
}))(headCellRenderer)
|
|
110
103
|
});
|
|
111
104
|
});
|
|
112
105
|
};
|
|
113
|
-
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var maxPlainValuesCount = ramda_1.pipe(ramda_1.pluck('values'), ramda_1.pluck('length'), ramda_1.reduce(ramda_1.max, 0))(cellValues);
|
|
106
|
+
var calcMaxValuesCount = reduce(function (maxCount, cellValues) {
|
|
107
|
+
var maxSubNestedValuesCount = pipe(chain(propOr([], 'indexPath')), map(add(1)), reduce(max, 0))(cellValues);
|
|
108
|
+
var maxPlainValuesCount = pipe(pluck('values'), pluck('length'), reduce(max, 0))(cellValues);
|
|
117
109
|
return Math.max(maxCount, maxSubNestedValuesCount, maxPlainValuesCount);
|
|
118
110
|
}, 0);
|
|
119
111
|
var getMaxRowValuesCount = function (columnsData, rowValue) {
|
|
120
|
-
return
|
|
112
|
+
return pipe(buildRowValues(rowValue, Infinity), values, calcMaxValuesCount)(columnsData);
|
|
121
113
|
};
|
|
122
|
-
|
|
114
|
+
export { getTableRowsData, getTableHeadData, getMaxRowValuesCount };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
1
|
+
import { DataTypes } from '@reltio/mdm-sdk';
|
|
4
2
|
var BLOB_HEIGHT = 100;
|
|
5
3
|
var IMAGE_HEIGHT = 64;
|
|
6
4
|
var PADDING = 15;
|
|
@@ -9,12 +7,12 @@ var defaultGetRowCellHeight = function (_a) {
|
|
|
9
7
|
var columnData = _a.columnData, cell = _a.cell;
|
|
10
8
|
var valuesCount = cell.values.length;
|
|
11
9
|
switch ((_b = columnData === null || columnData === void 0 ? void 0 : columnData.dataTypeDefinition) === null || _b === void 0 ? void 0 : _b.type) {
|
|
12
|
-
case
|
|
10
|
+
case DataTypes.TYPE_BLOB:
|
|
13
11
|
return BLOB_HEIGHT * valuesCount;
|
|
14
|
-
case
|
|
12
|
+
case DataTypes.TYPE_IMAGE:
|
|
15
13
|
return (PADDING + IMAGE_HEIGHT) * valuesCount + PADDING;
|
|
16
14
|
default:
|
|
17
15
|
return 33 * Math.max(valuesCount, 1) + PADDING;
|
|
18
16
|
}
|
|
19
17
|
};
|
|
20
|
-
|
|
18
|
+
export default defaultGetRowCellHeight;
|
|
@@ -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,13 +20,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
20
|
}
|
|
22
21
|
return t;
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
var react_1 = __importDefault(require("react"));
|
|
23
|
+
import React from 'react';
|
|
29
24
|
var defaultRenderRowCell = function (_a) {
|
|
30
25
|
var cell = _a.cell, CellValueRenderer = _a.CellValueRenderer, otherProps = __rest(_a, ["cell", "CellValueRenderer"]);
|
|
31
|
-
return cell.values.map(function (value, index) { return
|
|
26
|
+
return cell.values.map(function (value, index) { return React.createElement(CellValueRenderer, __assign({ key: index, value: value }, otherProps)); });
|
|
32
27
|
};
|
|
33
|
-
|
|
28
|
+
export default defaultRenderRowCell;
|
|
@@ -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++) {
|
|
@@ -15,26 +14,21 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
15
14
|
to[j] = from[i];
|
|
16
15
|
return to;
|
|
17
16
|
};
|
|
18
|
-
|
|
19
|
-
exports.getNestedKeyForNestedColumnCell = exports.getParentRowKeyBySiblingsSubRowsKey = exports.getSiblingSubRowsKeyBySubRowKey = exports.flattenNestedColumnValues = exports.TOTAL_ROW_SPAN_KEY = exports.calcRowSpansForNestedKeys = void 0;
|
|
20
|
-
var ramda_1 = require("ramda");
|
|
17
|
+
import { __, addIndex, always, assoc, chain, curry, dropLast, groupBy, join, keys, length, omit, pickBy, pipe, propOr, reduce, split, sum, toPairs, unless, unnest, values, zip } from 'ramda';
|
|
21
18
|
var TOTAL_ROW_SPAN_KEY = 'total';
|
|
22
|
-
exports.TOTAL_ROW_SPAN_KEY = TOTAL_ROW_SPAN_KEY;
|
|
23
19
|
var NESTED_KEY_DELIMITER = '.';
|
|
24
|
-
var getSiblingSubRowsKeyBySubRowKey =
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
exports.getParentRowKeyBySiblingsSubRowsKey = getParentRowKeyBySiblingsSubRowsKey;
|
|
28
|
-
var getParentRowKeyBySubRowKey = ramda_1.pipe(getSiblingSubRowsKeyBySubRowKey, getParentRowKeyBySiblingsSubRowsKey);
|
|
20
|
+
var getSiblingSubRowsKeyBySubRowKey = pipe(split(NESTED_KEY_DELIMITER), dropLast(1), join(NESTED_KEY_DELIMITER));
|
|
21
|
+
var getParentRowKeyBySiblingsSubRowsKey = pipe(split(NESTED_KEY_DELIMITER), dropLast(1), join(NESTED_KEY_DELIMITER), unless(length, always(TOTAL_ROW_SPAN_KEY)));
|
|
22
|
+
var getParentRowKeyBySubRowKey = pipe(getSiblingSubRowsKeyBySubRowKey, getParentRowKeyBySiblingsSubRowsKey);
|
|
29
23
|
var countParentSpanByAllSubRows = function (rowSpanData, siblingSubRowsKey) {
|
|
30
|
-
return
|
|
24
|
+
return pipe(pickBy(function (_val, key) { return getSiblingSubRowsKeyBySubRowKey(key) === siblingSubRowsKey; }), values, sum)(rowSpanData);
|
|
31
25
|
};
|
|
32
26
|
var calcParentRowSpan = function (rowSpanData, subRowKey) {
|
|
33
27
|
var parentKey = getParentRowKeyBySubRowKey(subRowKey);
|
|
34
|
-
var currentParentSpan =
|
|
28
|
+
var currentParentSpan = propOr(0, parentKey, rowSpanData);
|
|
35
29
|
var actualParentSpan = countParentSpanByAllSubRows(rowSpanData, getSiblingSubRowsKeyBySubRowKey(subRowKey));
|
|
36
30
|
if (actualParentSpan > currentParentSpan) {
|
|
37
|
-
var nextRowSpanData =
|
|
31
|
+
var nextRowSpanData = assoc(parentKey, actualParentSpan, rowSpanData);
|
|
38
32
|
return parentKey === TOTAL_ROW_SPAN_KEY ? nextRowSpanData : calcParentRowSpan(nextRowSpanData, parentKey);
|
|
39
33
|
}
|
|
40
34
|
else {
|
|
@@ -48,24 +42,23 @@ var addNestedKey = function (rowSpanData, nestedKey) {
|
|
|
48
42
|
var validateParentRowSpan = function (rowSpanData, _a) {
|
|
49
43
|
var siblingSubRowsKey = _a[0], subRowsKeys = _a[1];
|
|
50
44
|
var parentKey = getParentRowKeyBySiblingsSubRowsKey(siblingSubRowsKey);
|
|
51
|
-
var currentParentSpan =
|
|
45
|
+
var currentParentSpan = propOr(0, parentKey, rowSpanData);
|
|
52
46
|
var actualParentSpan = countParentSpanByAllSubRows(rowSpanData, siblingSubRowsKey);
|
|
53
47
|
var spanDiff = currentParentSpan - actualParentSpan;
|
|
54
48
|
if (spanDiff > 0) {
|
|
55
49
|
var lowestSubRowKey = "" + siblingSubRowsKey + NESTED_KEY_DELIMITER + (subRowsKeys.length - 1);
|
|
56
50
|
var lowestSubRowSpan = rowSpanData[lowestSubRowKey];
|
|
57
|
-
return
|
|
51
|
+
return assoc(lowestSubRowKey, lowestSubRowSpan + spanDiff, rowSpanData);
|
|
58
52
|
}
|
|
59
53
|
else {
|
|
60
54
|
return rowSpanData;
|
|
61
55
|
}
|
|
62
56
|
};
|
|
63
57
|
var validateRowSpanData = function (rowSpanData) {
|
|
64
|
-
return
|
|
58
|
+
return pipe(omit([TOTAL_ROW_SPAN_KEY]), keys, groupBy(getSiblingSubRowsKeyBySubRowKey), toPairs, reduce(validateParentRowSpan, rowSpanData))(rowSpanData);
|
|
65
59
|
};
|
|
66
|
-
var calcRowSpansForNestedKeys =
|
|
67
|
-
|
|
68
|
-
var chainWithIndex = ramda_1.addIndex(ramda_1.chain);
|
|
60
|
+
var calcRowSpansForNestedKeys = pipe(reduce(addNestedKey, {}), validateRowSpanData);
|
|
61
|
+
var chainWithIndex = addIndex(chain);
|
|
69
62
|
var flattenNestedColumnValues = function (values, indexPath) {
|
|
70
63
|
if (indexPath === void 0) { indexPath = []; }
|
|
71
64
|
var head = values[0];
|
|
@@ -73,8 +66,7 @@ var flattenNestedColumnValues = function (values, indexPath) {
|
|
|
73
66
|
? chainWithIndex(function (value, index) { return flattenNestedColumnValues(value, __spreadArray(__spreadArray([], indexPath), [index])); }, values)
|
|
74
67
|
: { indexPath: indexPath, values: values };
|
|
75
68
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return ramda_1.pipe(ramda_1.zip(ramda_1.__, cell.indexPath), ramda_1.unnest, ramda_1.join(NESTED_KEY_DELIMITER))(columnNestedPath);
|
|
69
|
+
var getNestedKeyForNestedColumnCell = curry(function (columnNestedPath, cell) {
|
|
70
|
+
return pipe(zip(__, cell.indexPath), unnest, join(NESTED_KEY_DELIMITER))(columnNestedPath);
|
|
79
71
|
});
|
|
80
|
-
|
|
72
|
+
export { calcRowSpansForNestedKeys, TOTAL_ROW_SPAN_KEY, flattenNestedColumnValues, getSiblingSubRowsKeyBySubRowKey, getParentRowKeyBySiblingsSubRowsKey, getNestedKeyForNestedColumnCell };
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useBasicTableCellRenderer = exports.useDynamicRowCellHeight = void 0;
|
|
7
|
-
var useDynamicRowCellHeight_1 = require("./useDynamicRowCellHeight");
|
|
8
|
-
Object.defineProperty(exports, "useDynamicRowCellHeight", { enumerable: true, get: function () { return __importDefault(useDynamicRowCellHeight_1).default; } });
|
|
9
|
-
var useBasicTableCellRenderer_1 = require("./useBasicTableCellRenderer");
|
|
10
|
-
Object.defineProperty(exports, "useBasicTableCellRenderer", { enumerable: true, get: function () { return __importDefault(useBasicTableCellRenderer_1).default; } });
|
|
1
|
+
export { default as useDynamicRowCellHeight } from './useDynamicRowCellHeight';
|
|
2
|
+
export { default as useBasicTableCellRenderer } from './useBasicTableCellRenderer';
|
|
@@ -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,25 +9,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
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
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
13
|
var t = {};
|
|
34
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -40,44 +20,40 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
40
20
|
}
|
|
41
21
|
return t;
|
|
42
22
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
var defaultGetRowCellHeight_1 = __importDefault(require("../helpers/defaultGetRowCellHeight"));
|
|
52
|
-
var ramda_1 = require("ramda");
|
|
53
|
-
var useCollapsibleTableRows_1 = __importDefault(require("./useCollapsibleTableRows"));
|
|
54
|
-
var RowCollapseContext_1 = require("../contexts/RowCollapseContext");
|
|
23
|
+
import React, { useMemo } from 'react';
|
|
24
|
+
import PropTypes from 'prop-types';
|
|
25
|
+
import { calculateRowHeight, getCellContentFromRowsData } from 'react-components/dist/Table/tableUtils';
|
|
26
|
+
import defaultRenderRowCell from '../helpers/defaultRenderRowCell';
|
|
27
|
+
import defaultGetRowCellHeight from '../helpers/defaultGetRowCellHeight';
|
|
28
|
+
import { pathOr, propEq } from 'ramda';
|
|
29
|
+
import useCollapsibleTableRows from './useCollapsibleTableRows';
|
|
30
|
+
import { RowCollapseContext } from '../contexts/RowCollapseContext';
|
|
55
31
|
var useBasicTableCellRenderer = function (_a) {
|
|
56
|
-
var rowsData = _a.rowsData, columnsData = _a.columnsData, _b = _a.renderRowCell, renderRowCell = _b === void 0 ?
|
|
57
|
-
var _f =
|
|
32
|
+
var rowsData = _a.rowsData, columnsData = _a.columnsData, _b = _a.renderRowCell, renderRowCell = _b === void 0 ? defaultRenderRowCell : _b, _c = _a.getRowCellHeight, getRowCellHeight = _c === void 0 ? defaultGetRowCellHeight : _c, _d = _a.defaultRowHeight, defaultRowHeight = _d === void 0 ? 48 : _d, _e = _a.maxRowValuesCount, maxRowValuesCount = _e === void 0 ? Infinity : _e;
|
|
33
|
+
var _f = useCollapsibleTableRows({
|
|
58
34
|
rowsData: rowsData,
|
|
59
35
|
columnsData: columnsData,
|
|
60
36
|
renderRowCell: renderRowCell,
|
|
61
37
|
getRowCellHeight: getRowCellHeight,
|
|
62
38
|
maxRowValuesCount: maxRowValuesCount
|
|
63
39
|
}), tableRowsData = _f.tableRowsData, collapseContextValue = _f.collapseContextValue;
|
|
64
|
-
return
|
|
40
|
+
return useMemo(function () {
|
|
65
41
|
var rowHeightCache = tableRowsData.reduce(function (cache, rowData, rowIndex) {
|
|
66
42
|
var data = rowData.data;
|
|
67
|
-
cache[rowIndex] =
|
|
43
|
+
cache[rowIndex] = calculateRowHeight(data, defaultRowHeight);
|
|
68
44
|
return cache;
|
|
69
45
|
}, {});
|
|
70
46
|
var getHeightForSubRow = function (rowIndex, columnIndex, subRowIndex) {
|
|
71
47
|
var heightPath = [rowIndex, 'subRowHeight', columnIndex, subRowIndex, 'height'];
|
|
72
|
-
return
|
|
48
|
+
return pathOr(0, heightPath, rowHeightCache);
|
|
73
49
|
};
|
|
74
|
-
var getRowHeight = function (rowIndex) { return
|
|
50
|
+
var getRowHeight = function (rowIndex) { return pathOr(0, [rowIndex, 'height'], rowHeightCache); };
|
|
75
51
|
var CellRenderer = function (_a) {
|
|
76
52
|
var columnId = _a.columnId, rowIndex = _a.rowIndex, otherProps = __rest(_a, ["columnId", "rowIndex"]);
|
|
77
|
-
return (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
columnIndex: columnsData.findIndex(
|
|
53
|
+
return (React.createElement(RowCollapseContext.Provider, { value: collapseContextValue },
|
|
54
|
+
React.createElement("div", __assign({}, otherProps, { style: { height: getRowHeight(rowIndex) } }), tableRowsData.length > 0 &&
|
|
55
|
+
getCellContentFromRowsData({
|
|
56
|
+
columnIndex: columnsData.findIndex(propEq('id', columnId)),
|
|
81
57
|
headData: columnsData,
|
|
82
58
|
rowsData: tableRowsData,
|
|
83
59
|
rowIndex: rowIndex,
|
|
@@ -85,10 +61,10 @@ var useBasicTableCellRenderer = function (_a) {
|
|
|
85
61
|
}))));
|
|
86
62
|
};
|
|
87
63
|
CellRenderer.propTypes = {
|
|
88
|
-
columnId:
|
|
89
|
-
rowIndex:
|
|
64
|
+
columnId: PropTypes.string,
|
|
65
|
+
rowIndex: PropTypes.number
|
|
90
66
|
};
|
|
91
67
|
return { getRowHeight: getRowHeight, CellRenderer: CellRenderer };
|
|
92
68
|
}, [tableRowsData, defaultRowHeight, collapseContextValue, columnsData]);
|
|
93
69
|
};
|
|
94
|
-
|
|
70
|
+
export default useBasicTableCellRenderer;
|
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var dataHelpers_1 = require("../helpers/dataHelpers");
|
|
6
|
-
var hooks_1 = require("../../../../hooks");
|
|
1
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
import { equals, filter, remove } from 'ramda';
|
|
3
|
+
import { getTableRowsData, getMaxRowValuesCount } from '../helpers/dataHelpers';
|
|
4
|
+
import { useDidUpdateEffect, usePrevious } from '../../../../hooks';
|
|
7
5
|
var useCollapsibleTableRows = function (_a) {
|
|
8
6
|
var rowsData = _a.rowsData, columnsData = _a.columnsData, renderRowCell = _a.renderRowCell, getRowCellHeight = _a.getRowCellHeight, maxRowValuesCount = _a.maxRowValuesCount;
|
|
9
|
-
var _b =
|
|
10
|
-
var getRowMaxValuesCount =
|
|
7
|
+
var _b = useState([]), expandedIndexes = _b[0], setExpandedIndexes = _b[1];
|
|
8
|
+
var getRowMaxValuesCount = useCallback(function (rowIndex) {
|
|
11
9
|
return expandedIndexes.includes(rowIndex) ? Infinity : maxRowValuesCount;
|
|
12
10
|
}, [expandedIndexes, maxRowValuesCount]);
|
|
13
|
-
var tableRowsData =
|
|
14
|
-
var toggleRowCollapse =
|
|
11
|
+
var tableRowsData = useMemo(function () { return getTableRowsData(rowsData, columnsData, renderRowCell, getRowCellHeight, getRowMaxValuesCount); }, [rowsData, columnsData, renderRowCell, getRowCellHeight, getRowMaxValuesCount]);
|
|
12
|
+
var toggleRowCollapse = useCallback(function (rowIndex) {
|
|
15
13
|
setExpandedIndexes(function (expandedIndexes) {
|
|
16
|
-
var index = expandedIndexes.findIndex(
|
|
17
|
-
return index === -1 ? expandedIndexes.concat(rowIndex) :
|
|
14
|
+
var index = expandedIndexes.findIndex(equals(rowIndex));
|
|
15
|
+
return index === -1 ? expandedIndexes.concat(rowIndex) : remove(index, 1, expandedIndexes);
|
|
18
16
|
});
|
|
19
17
|
}, []);
|
|
20
|
-
var getIsRowCollapsible =
|
|
21
|
-
return
|
|
18
|
+
var getIsRowCollapsible = useCallback(function (rowValue) {
|
|
19
|
+
return getMaxRowValuesCount(columnsData, rowValue) > maxRowValuesCount;
|
|
22
20
|
}, [maxRowValuesCount, columnsData]);
|
|
23
|
-
var getIsRowCollapsed =
|
|
21
|
+
var getIsRowCollapsed = useCallback(function (rowIndex) {
|
|
24
22
|
return !expandedIndexes.includes(rowIndex);
|
|
25
23
|
}, [expandedIndexes]);
|
|
26
|
-
var collapseContextValue =
|
|
24
|
+
var collapseContextValue = useMemo(function () { return ({
|
|
27
25
|
toggleRowCollapse: toggleRowCollapse,
|
|
28
26
|
getIsRowCollapsible: getIsRowCollapsible,
|
|
29
27
|
getIsRowCollapsed: getIsRowCollapsed
|
|
30
28
|
}); }, [toggleRowCollapse, getIsRowCollapsible, getIsRowCollapsed]);
|
|
31
|
-
var prevRowsData =
|
|
32
|
-
|
|
29
|
+
var prevRowsData = usePrevious(rowsData);
|
|
30
|
+
useDidUpdateEffect(function () {
|
|
33
31
|
if (expandedIndexes.length > 0) {
|
|
34
|
-
setExpandedIndexes(
|
|
32
|
+
setExpandedIndexes(filter(function (index) {
|
|
35
33
|
var rowValue = rowsData[index] || {};
|
|
36
34
|
var prevRowValue = prevRowsData[index] || {};
|
|
37
35
|
return rowValue.rawValue === prevRowValue.rawValue && getIsRowCollapsible(rowValue);
|
|
@@ -40,4 +38,4 @@ var useCollapsibleTableRows = function (_a) {
|
|
|
40
38
|
}, [rowsData]);
|
|
41
39
|
return { tableRowsData: tableRowsData, collapseContextValue: collapseContextValue };
|
|
42
40
|
};
|
|
43
|
-
|
|
41
|
+
export default useCollapsibleTableRows;
|
|
@@ -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,28 +9,27 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
12
|
+
import { useCallback, useRef, useState } from 'react';
|
|
13
|
+
import { __, curry, identity, pipe, prop, useWith } from 'ramda';
|
|
14
|
+
import { debounce } from '@reltio/mdm-sdk';
|
|
17
15
|
var getRowCellKey = function (_a) {
|
|
18
16
|
var rowIndex = _a.rowIndex, id = _a.columnData.id, cellIndex = _a.cellIndex;
|
|
19
17
|
return id + "[" + rowIndex + "][" + cellIndex + "]";
|
|
20
18
|
};
|
|
21
19
|
var useDynamicRowCellHeight = function () {
|
|
22
|
-
var _a =
|
|
23
|
-
var rowCellHeightsMapCache =
|
|
20
|
+
var _a = useState({}), rowCellHeightsMap = _a[0], setRowCellHeightsMap = _a[1];
|
|
21
|
+
var rowCellHeightsMapCache = useRef({});
|
|
24
22
|
var batchHeightUpdate = function (key, value) {
|
|
25
23
|
rowCellHeightsMapCache.current[key] = value;
|
|
26
24
|
};
|
|
27
|
-
var flushHeightUpdates =
|
|
25
|
+
var flushHeightUpdates = useCallback(debounce(function () {
|
|
28
26
|
setRowCellHeightsMap(__assign({}, rowCellHeightsMapCache.current));
|
|
29
27
|
}), []);
|
|
30
|
-
var clearHeightsCache =
|
|
28
|
+
var clearHeightsCache = useCallback(function () {
|
|
31
29
|
rowCellHeightsMapCache.current = {};
|
|
32
30
|
}, []);
|
|
33
|
-
var getDynamicRowCellHeight =
|
|
34
|
-
var changeRowCellHeight =
|
|
31
|
+
var getDynamicRowCellHeight = useCallback(pipe(getRowCellKey, prop(__, rowCellHeightsMap)), [rowCellHeightsMap]);
|
|
32
|
+
var changeRowCellHeight = useCallback(curry(useWith(pipe(batchHeightUpdate, flushHeightUpdates), [getRowCellKey, identity])), []);
|
|
35
33
|
return { getDynamicRowCellHeight: getDynamicRowCellHeight, changeRowCellHeight: changeRowCellHeight, clearHeightsCache: clearHeightsCache };
|
|
36
34
|
};
|
|
37
|
-
|
|
35
|
+
export default useDynamicRowCellHeight;
|
|
@@ -1,30 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var prop_types_1 = __importDefault(require("prop-types"));
|
|
8
|
-
var AttributeListItem_1 = __importDefault(require("../../../AttributeListItem/AttributeListItem"));
|
|
9
|
-
var Highlighter_1 = __importDefault(require("../../../Highlighter/Highlighter"));
|
|
10
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
11
|
-
var styles_1 = require("./styles");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import AttributeListItem from '../../../AttributeListItem/AttributeListItem';
|
|
4
|
+
import Highlighter from '../../../Highlighter/Highlighter';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
|
+
import { useStyles } from './styles';
|
|
12
7
|
var ColumnListItem = function (_a) {
|
|
13
8
|
var _b;
|
|
14
9
|
var item = _a.item, onClick = _a.onClick, checked = _a.checked, level = _a.level, style = _a.style, isFocused = _a.isFocused, isGroupItem = _a.isGroupItem;
|
|
15
|
-
var styles =
|
|
16
|
-
return (
|
|
10
|
+
var styles = useStyles();
|
|
11
|
+
return (React.createElement(AttributeListItem, { key: item.id, onClick: onClick, checked: checked, level: level, data: item, label: React.createElement(Highlighter, { text: item.label, highlight: item.filterText }), labelInText: item.label, style: style, isFocused: isFocused, hideIcon: isGroupItem, className: classnames((_b = {}, _b[styles.groupItem] = isGroupItem, _b)) }));
|
|
17
12
|
};
|
|
18
13
|
ColumnListItem.propTypes = {
|
|
19
|
-
item:
|
|
20
|
-
label:
|
|
21
|
-
filterText:
|
|
14
|
+
item: PropTypes.shape({
|
|
15
|
+
label: PropTypes.string,
|
|
16
|
+
filterText: PropTypes.string
|
|
22
17
|
}),
|
|
23
|
-
level:
|
|
24
|
-
onClick:
|
|
25
|
-
checked:
|
|
26
|
-
style:
|
|
27
|
-
isGroupItem:
|
|
28
|
-
isFocused:
|
|
18
|
+
level: PropTypes.number,
|
|
19
|
+
onClick: PropTypes.func,
|
|
20
|
+
checked: PropTypes.bool,
|
|
21
|
+
style: PropTypes.object,
|
|
22
|
+
isGroupItem: PropTypes.bool,
|
|
23
|
+
isFocused: PropTypes.bool
|
|
29
24
|
};
|
|
30
|
-
|
|
25
|
+
export default ColumnListItem;
|