@reltio/components 1.4.701 → 1.4.702
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 +10 -0
- package/HOCs/withAsyncMount/withAsyncMount.js +44 -0
- package/HOCs/withTooltip/propTypes.js +11 -0
- package/HOCs/withTooltip/withTooltip.js +71 -0
- package/components/ArrowExpandButton/ArrowExpandButton.js +39 -0
- package/components/ArrowExpandButton/styles.js +17 -0
- package/components/AttributeListItem/AttrTypeIcon.js +29 -0
- package/components/AttributeListItem/AttributeListItem.js +70 -0
- package/components/AttributeListItem/styles.js +97 -0
- package/components/AutoSizeList/AutoSizeList.js +70 -0
- package/components/AvatarWithFallback/AvatarWithFallback.js +79 -0
- package/components/BasicTableView/BasicTable/BasicTable.js +106 -0
- package/components/BasicTableView/BasicTable/HOCs/withFilter.js +38 -0
- package/components/BasicTableView/BasicTable/HOCs/withFilterAtBottom.js +43 -0
- package/components/BasicTableView/BasicTable/HOCs/withTableContext.js +47 -0
- package/components/BasicTableView/BasicTable/cell-value-renderers/BlobRenderer.js +20 -0
- package/components/BasicTableView/BasicTable/cell-value-renderers/DefaultCellValueRenderer.js +43 -0
- package/components/BasicTableView/BasicTable/cell-value-renderers/index.js +8 -0
- package/components/BasicTableView/BasicTable/cell-value-renderers/styles.js +22 -0
- package/components/BasicTableView/BasicTable/contexts/RowCollapseContext.js +9 -0
- package/components/BasicTableView/BasicTable/contexts/TableContext.js +9 -0
- package/components/BasicTableView/BasicTable/contexts/index.js +5 -0
- package/components/BasicTableView/BasicTable/helpers/dataHelpers.js +122 -0
- package/components/BasicTableView/BasicTable/helpers/defaultGetRowCellHeight.js +20 -0
- package/components/BasicTableView/BasicTable/helpers/defaultRenderRowCell.js +33 -0
- package/components/BasicTableView/BasicTable/helpers/nestedHelpers.js +80 -0
- package/components/BasicTableView/BasicTable/hooks/index.js +10 -0
- package/components/BasicTableView/BasicTable/hooks/useBasicTableCellRenderer.js +94 -0
- package/components/BasicTableView/BasicTable/hooks/useCollapsibleTableRows.js +43 -0
- package/components/BasicTableView/BasicTable/hooks/useDynamicRowCellHeight.js +37 -0
- package/components/BasicTableView/BasicTableHeader/ColumnsSettings/ColumnListItem.js +30 -0
- package/components/BasicTableView/BasicTableHeader/ColumnsSettings/ColumnsSettings.js +91 -0
- package/components/BasicTableView/BasicTableHeader/ColumnsSettings/columnHelpers.js +86 -0
- package/components/BasicTableView/BasicTableHeader/ColumnsSettings/styles.js +12 -0
- package/components/BasicTableView/BasicTableHeader/FilterButton/FilterButton.js +26 -0
- package/components/BasicTableView/BasicTableHeader/FilterButton/styles.js +18 -0
- package/components/BasicTableView/BasicTablePagination/BasicTablePagination.js +80 -0
- package/components/BasicTableView/BasicTablePagination/styles.js +32 -0
- package/components/BasicTableView/CollapseRowButton/CollapseRowButton.js +48 -0
- package/components/BasicTableView/CollapseRowButton/styles.js +9 -0
- package/components/BasicTableView/ColumnFilter/ColumnFilter.js +113 -0
- package/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +40 -0
- package/components/BasicTableView/ColumnFilter/FilterChip/styles.js +27 -0
- package/components/BasicTableView/ColumnFilter/helpers.js +18 -0
- package/components/BasicTableView/ColumnFilter/styles.js +30 -0
- package/components/BasicTableView/RowCellAutoSizer/RowCellAutoSizer.js +56 -0
- package/components/BasicTableView/index.js +45 -0
- package/components/BasicTableView/viewState/basicTableViewState.js +82 -0
- package/components/BasicView/BasicView.js +61 -0
- package/components/BasicView/styles.js +13 -0
- package/components/BasicViewContent/BasicViewContent.js +36 -0
- package/components/BasicViewContent/styles.js +13 -0
- package/components/BasicViewHeader/BasicViewHeader.js +39 -0
- package/components/BasicViewHeader/styles.js +19 -0
- package/components/ClickAwayProvider/ClickAwayProvider.js +22 -0
- package/components/CollaborationItem/Avatar/Avatar.js +39 -0
- package/components/CollaborationItem/Avatar/styles.js +13 -0
- package/components/CollaborationItem/CollaborationItem.js +48 -0
- package/components/CollaborationItem/Comment/Comment.js +78 -0
- package/components/CollaborationItem/Comment/styles.js +51 -0
- package/components/CollaborationItem/CommentContent/CommentContent.js +42 -0
- package/components/CollaborationItem/CommentContent/styles.js +12 -0
- package/components/CollaborationItem/CommentTarget/CommentTarget.js +98 -0
- package/components/CollaborationItem/CommentTarget/styles.js +23 -0
- package/components/CollaborationItem/RepliedComment/RepliedComment.js +30 -0
- package/components/CollaborationItem/RepliedComment/styles.js +44 -0
- package/components/CollaborationItem/SendMessageArea/SendMessageArea.js +113 -0
- package/components/CollaborationItem/SendMessageArea/styles.js +33 -0
- package/components/CollaborationItem/TextFieldWithMentions/TextFieldWithMentions.js +70 -0
- package/components/CollaborationItem/TextFieldWithMentions/styles.js +54 -0
- package/components/CollaborationItem/styles.js +21 -0
- package/components/CollaborationItem/utils/index.js +53 -0
- package/components/CollaborationPopup/CollaborationPopup.js +68 -0
- package/components/CollaborationPopup/styles.js +69 -0
- package/components/CollapseButton/CollapseButton.js +47 -0
- package/components/CollapseButton/styles.js +12 -0
- package/components/ColorBar/ColorBar.js +38 -0
- package/components/ColorBar/styles.js +17 -0
- package/components/CommentsContainer/CommentsContainer.js +70 -0
- package/components/CommentsContainer/buttons/AddCommentButton.js +19 -0
- package/components/CommentsContainer/buttons/CommentButton.js +20 -0
- package/components/CommentsContainer/buttons/styles.js +36 -0
- package/components/CommentsContainer/styles.js +25 -0
- package/components/ConfigureColumnsPopup/ConfigureColumnsPopup.js +121 -0
- package/components/ConfigureColumnsPopup/styles.js +13 -0
- package/components/ConfirmationDialog/ConfirmationDialog.js +28 -0
- package/components/ConfirmationDialog/styles.js +40 -0
- package/components/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js +83 -0
- package/components/DataTypeValue/DataTypeValue.js +28 -0
- package/components/DateRangePicker/DateRangePicker.js +87 -0
- package/components/DateRangePicker/styles.js +43 -0
- package/components/Drawer/Drawer.js +72 -0
- package/components/DropDownMenuButton/DropDownMenuButton.js +74 -0
- package/components/DropDownMenuButton/MenuItemRenderer.js +44 -0
- package/components/DropDownMenuButton/styles.js +28 -0
- package/components/DropDownSelector/DropDownSelector.js +97 -0
- package/components/DropDownSelector/components/Menu.js +36 -0
- package/components/DropDownSelector/components/SingleValue.js +30 -0
- package/components/DropDownSelector/components/styles.js +36 -0
- package/components/DropDownSelector/styles.js +69 -0
- package/components/EmptySearchResult/NoData.js +25 -0
- package/components/EmptySearchResult/NoMessageComponent.js +39 -0
- package/components/EmptySearchResult/NoResults.js +24 -0
- package/components/EmptySearchResult/index.js +7 -0
- package/components/EmptySearchResult/styles.js +26 -0
- package/components/EmptyState/EmptyState.js +36 -0
- package/components/EmptyState/styles.js +68 -0
- package/components/EntityAvatar/EntityAvatar.js +26 -0
- package/components/EntityAvatar/no-photo.svg.js +4 -0
- package/components/EntityTypeBadge/EntityTypeBadge.js +25 -0
- package/components/EntityTypeBadge/styles.js +23 -0
- package/components/EntityTypeIcon/EntityTypeIcon.js +26 -0
- package/components/EntityTypesSelector/EntityTypesSelector.js +141 -0
- package/components/EntityTypesSelector/ListLabel/ListLabel.js +51 -0
- package/components/EntityTypesSelector/ListLabel/helpers.js +49 -0
- package/components/EntityTypesSelector/ListLabel/styles.js +36 -0
- package/components/EntityTypesSelector/SelectEntityTypesList.js +70 -0
- package/components/EntityTypesSelector/styles.js +72 -0
- package/components/EntityUriLink/EntityUriLink.js +43 -0
- package/components/ErrorBoundary/ErrorBoundary.js +46 -0
- package/components/ErrorPopup/ErrorPopup.js +32 -0
- package/components/ErrorPopup/styles.js +11 -0
- package/components/ErrorWrapper/ErrorMessage.js +17 -0
- package/components/ErrorWrapper/ErrorWrapper.js +62 -0
- package/components/ErrorWrapper/styles.js +18 -0
- package/components/ExpandableSearchInput/ExpandableSearchInput.js +50 -0
- package/components/ExpandableSearchInput/styles.js +23 -0
- package/components/ExpandedValueTooltip/ExpandedValueTooltip.js +88 -0
- package/components/FacetViewHeader/FacetViewHeader.js +15 -0
- package/components/FacetViewHeader/styles.js +17 -0
- package/components/FlipCard/FlipCard.js +41 -0
- package/components/FlipCard/styles.js +55 -0
- package/components/FlipCard/types/index.js +2 -0
- package/components/HideOnShrink/HideOnShrink.js +21 -0
- package/components/HierarchicalAttributeTooltip/HierarchicalAttributeTooltip.js +45 -0
- package/components/HierarchicalAttributeTooltip/styles.js +54 -0
- package/components/Highlighter/Highlighter.js +18 -0
- package/components/Highlighter/styles.js +9 -0
- package/components/Image/CheckedIcon/CheckedIcon.js +18 -0
- package/components/Image/CheckedIcon/styles.js +10 -0
- package/components/Image/Image.js +104 -0
- package/components/Image/ImageActionsOverlay/ImageActionsOverlay.js +81 -0
- package/components/Image/ImageActionsOverlay/styles.js +61 -0
- package/components/Image/styles.js +33 -0
- package/components/ImageAttributesGallery/GalleryView/GalleryView.js +45 -0
- package/components/ImageAttributesGallery/GalleryView/styles.js +14 -0
- package/components/ImageAttributesGallery/HeaderLeft/HeaderLeft.js +17 -0
- package/components/ImageAttributesGallery/HeaderLeft/styles.js +12 -0
- package/components/ImageAttributesGallery/HeaderRight/HeaderRight.js +26 -0
- package/components/ImageAttributesGallery/HeaderRight/styles.js +27 -0
- package/components/ImageAttributesGallery/ImageAttributesGallery.js +121 -0
- package/components/ImageDetailsView/ImageDetailsView.js +52 -0
- package/components/ImageDetailsView/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +53 -0
- package/components/ImageDetailsView/ImageDetailsViewCarousel/Thumbnails/Thumbnails.js +72 -0
- package/components/ImageDetailsView/ImageDetailsViewCarousel/Thumbnails/styles.js +26 -0
- package/components/ImageDetailsView/ImageDetailsViewCarousel/styles.js +47 -0
- package/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.js +61 -0
- package/components/ImageDetailsView/ImageDetailsViewSidebar/styles.js +45 -0
- package/components/ImageDetailsView/MetaInfo/MetaInfo.js +29 -0
- package/components/ImageDetailsView/MetaInfoForm/MetaInfoForm.js +32 -0
- package/components/ImageDetailsView/MetaInfoForm/styles.js +24 -0
- package/components/ImageDetailsView/MetaInfoHeader/MetaInfoHeader.js +52 -0
- package/components/ImageDetailsView/MetaInfoHeader/styles.js +21 -0
- package/components/ImageDetailsView/MetaInfoList/MetaInfoItem/MetaInfoItem.js +17 -0
- package/components/ImageDetailsView/MetaInfoList/MetaInfoItem/styles.js +25 -0
- package/components/ImageDetailsView/MetaInfoList/MetaInfoList.js +32 -0
- package/components/ImageDetailsView/MetaInfoList/styles.js +17 -0
- package/components/ImageDetailsView/constants/index.js +42 -0
- package/components/ImageDetailsView/helpers/index.js +97 -0
- package/components/ImageDetailsView/hooks/useEditMetaInfo.js +70 -0
- package/components/ImageDetailsView/styles.js +18 -0
- package/components/ImageDetailsView/theme/index.js +12 -0
- package/components/ImageDetailsView/types/index.js +2 -0
- package/components/ImageGalleryDialog/ImageGalleryDialog.js +70 -0
- package/components/ImageGalleryDialog/styles.js +49 -0
- package/components/ImportButton/ImportButton.js +40 -0
- package/components/ImportButton/styles.js +16 -0
- package/components/LightArrowTooltip/LightArrowTooltip.js +24 -0
- package/components/LightArrowTooltip/styles.js +15 -0
- package/components/LinearLoadIndicator/LinearLoadIndicator.js +17 -0
- package/components/LinearLoadIndicator/styles.js +19 -0
- package/components/Link/Link.js +19 -0
- package/components/Link/styles.js +14 -0
- package/components/LoadingSpinner/LoadingSpinner.js +15 -0
- package/components/LoadingSpinner/SpinnerSmall.gif.js +4 -0
- package/components/Marginator/Marginator.js +16 -0
- package/components/MatchRulesBlock/MatchRulesBadge/MatchRulesBadge.js +59 -0
- package/components/MatchRulesBlock/MatchRulesBadge/styles.js +23 -0
- package/components/MatchRulesBlock/MatchRulesBlock.js +24 -0
- package/components/MatchRulesBlock/MatchRulesTitle.js +12 -0
- package/components/MatchRulesBlock/MatchRulesTooltip/MatchRulesTooltip.js +18 -0
- package/components/MatchRulesBlock/MatchRulesTooltip/styles.js +19 -0
- package/components/MatchRulesBlock/SimpleMatchRules/SimpleMatchRules.js +18 -0
- package/components/MatchRulesBlock/SimpleMatchRules/styles.js +18 -0
- package/components/MatchRulesBlock/SimpleMatchRulesBlock/SimpleMatchRulesBlock.js +46 -0
- package/components/MatchRulesBlock/SimpleMatchRulesBlock/styles.js +19 -0
- package/components/MatchRulesBlock/SimpleMatchRulesBuilder/SimpleMatchRulesBuilder.js +43 -0
- package/components/MatchRulesBlock/TransitiveMatchBlock/TransitiveMatchBlock.js +58 -0
- package/components/MatchRulesBlock/TransitiveMatchBlock/styles.js +14 -0
- package/components/MatchRulesBlock/TransitiveMatchRules/TransitiveMatchRule.js +41 -0
- package/components/MatchRulesBlock/TransitiveMatchRules/styles.js +23 -0
- package/components/MatchRulesBlock/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.js +19 -0
- package/components/MatchRulesBlock/TransitiveMatchRulesTooltip/styles.js +13 -0
- package/components/MatchRulesBlock/types/index.js +2 -0
- package/components/ModeSwitcher/ModeSwitcher.js +25 -0
- package/components/ModeSwitcher/styles.js +36 -0
- package/components/ModeSwitcherSelect/ModeSwitcherSelect.js +87 -0
- package/components/ModeSwitcherSelect/index.js +5 -0
- package/components/ModeSwitcherSelect/styles.js +70 -0
- package/components/MultipleInput/MultipleInput.js +113 -0
- package/components/MultipleInput/styles.js +22 -0
- package/components/MultipliableSelect/MultipliableSelect.js +59 -0
- package/components/MultipliableSelect/styles.js +14 -0
- package/components/Popper/Popper.js +94 -0
- package/components/Popper/styles.js +17 -0
- package/components/Popper/utils.js +45 -0
- package/components/PopupWithArrow/PopupWithArrow.js +34 -0
- package/components/PopupWithArrow/styles.js +75 -0
- package/components/PotentialMatchReviewCard/PotentialMatchReviewCard.js +65 -0
- package/components/PotentialMatchReviewCard/styles.js +65 -0
- package/components/ProfileBand/ProfileBand.js +96 -0
- package/components/ProfileBand/styles.js +92 -0
- package/components/ProfileCard/ProfileCard.js +89 -0
- package/components/ProfileCard/styles.js +64 -0
- package/components/QueryBuilderRow/QueryBuilderRow.js +78 -0
- package/components/QueryBuilderRow/components/ReadOnlyFilter.js +21 -0
- package/components/QueryBuilderRow/components/ReadOnlyLogicOperator.js +21 -0
- package/components/QueryBuilderRow/components/styles.js +25 -0
- package/components/QueryBuilderRow/styles.js +22 -0
- package/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.js +88 -0
- package/components/ReactSelect/AsyncSelect.js +8 -0
- package/components/ReactSelect/CreatableSelect.js +8 -0
- package/components/ReactSelect/MultiSelect/MultiSelect.js +233 -0
- package/components/ReactSelect/MultiSelect/components/Option.js +57 -0
- package/components/ReactSelect/MultiSelect/components/index.js +10 -0
- package/components/ReactSelect/MultiSelect/index.js +7 -0
- package/components/ReactSelect/Select.js +8 -0
- package/components/ReactSelect/commonComponents/ClearIndicator.js +36 -0
- package/components/ReactSelect/commonComponents/Control.js +66 -0
- package/components/ReactSelect/commonComponents/DropdownIndicator.js +36 -0
- package/components/ReactSelect/commonComponents/GroupHeading.js +22 -0
- package/components/ReactSelect/commonComponents/Menu.js +37 -0
- package/components/ReactSelect/commonComponents/MultiValue.js +37 -0
- package/components/ReactSelect/commonComponents/NoOptionsMessage.js +17 -0
- package/components/ReactSelect/commonComponents/Option.js +56 -0
- package/components/ReactSelect/commonComponents/Placeholder.js +29 -0
- package/components/ReactSelect/commonComponents/SingleValue.js +29 -0
- package/components/ReactSelect/commonComponents/ValueContainer.js +19 -0
- package/components/ReactSelect/commonComponents/index.js +30 -0
- package/components/ReactSelect/optionFilters.js +9 -0
- package/components/ReactSelect/styles.js +69 -0
- package/components/ReactSelect/withMuiSkin.js +97 -0
- package/components/ReactSortableTree/index.js +30 -0
- package/components/ReactSortableTree/node-renderer-default.js +148 -0
- package/components/ReactSortableTree/nodeRendererDefaultStyle.js +278 -0
- package/components/ReactSortableTree/placeholder-renderer-default.js +23 -0
- package/components/ReactSortableTree/placeholderRendererDefaultStyle.js +46 -0
- package/components/ReactSortableTree/react-sortable-tree.js +809 -0
- package/components/ReactSortableTree/reactSortableTreeStyles.js +23 -0
- package/components/ReactSortableTree/tree-node.js +200 -0
- package/components/ReactSortableTree/tree-placeholder.js +92 -0
- package/components/ReactSortableTree/treeNodeStyle.js +236 -0
- package/components/ReactSortableTree/utils/classnames.js +28 -0
- package/components/ReactSortableTree/utils/default-handlers.js +45 -0
- package/components/ReactSortableTree/utils/dnd-manager.js +326 -0
- package/components/ReactSortableTree/utils/generic-utils.js +15 -0
- package/components/ReactSortableTree/utils/memoized-tree-data-utils.js +26 -0
- package/components/ReactSortableTree/utils/tree-data-utils.js +960 -0
- package/components/ReltioGridLayout/ReltioGridLayout.js +79 -0
- package/components/ReltioGridLayout/helpers.js +52 -0
- package/components/ReltioGridLayout/icons/ResizeIcon.svg.js +4 -0
- package/components/ReltioGridLayout/styles.js +71 -0
- package/components/RequiredMark/RequiredMark.js +12 -0
- package/components/RequiredMark/styles.js +9 -0
- package/components/ResizablePanes/ResizablePanes.js +75 -0
- package/components/ResizablePanes/styles.js +48 -0
- package/components/Score/DQLabel.js +14 -0
- package/components/Score/Score.js +26 -0
- package/components/Score/ScoreLabel.js +29 -0
- package/components/Score/styles.js +36 -0
- package/components/ScrollableTabs/ScrollableTabs.js +51 -0
- package/components/ScrollableTabs/styles.js +32 -0
- package/components/SearchInput/SearchInput.js +68 -0
- package/components/SearchInput/WhiteSearchInput.js +36 -0
- package/components/SearchInput/styles.js +32 -0
- package/components/SelectionPopup/SelectionPopup.js +70 -0
- package/components/SelectionPopup/SelectionPopupPopper/SelectionPopupPopper.js +60 -0
- package/components/SelectionPopup/helpers.js +70 -0
- package/components/SelectionPopup/styles.js +41 -0
- package/components/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.js +74 -0
- package/components/SelectorWithOnlyOptionAutoSelect/styles.js +31 -0
- package/components/SideIconPanel/SideButtonsPanel.js +42 -0
- package/components/SideIconPanel/styles.js +41 -0
- package/components/SidePanel/SidePanel.js +16 -0
- package/components/SidePanel/SidePanelContentHeader/SidePanelContentHeader.js +24 -0
- package/components/SidePanel/SidePanelContentHeader/styles.js +23 -0
- package/components/SidePanel/styles.js +16 -0
- package/components/SimpleDropDownSelector/DropDownPlaceholder.js +31 -0
- package/components/SimpleDropDownSelector/DropDownValue.js +23 -0
- package/components/SimpleDropDownSelector/SimpleDropDownSelector.js +59 -0
- package/components/SimpleDropDownSelector/styles.js +13 -0
- package/components/SimpleInput/SimpleInput.js +77 -0
- package/components/SmallIconButton/SmallIconButton.js +109 -0
- package/components/SmallIconButton/index.js +11 -0
- package/components/SourceIcon/SourceIcon.js +18 -0
- package/components/Spacer/Spacer.js +8 -0
- package/components/Title/Title.js +27 -0
- package/components/Title/styles.js +11 -0
- package/components/UploadFileButton/UploadFileButton.js +122 -0
- package/components/UploadFileButton/styles.js +20 -0
- package/components/UploadImageDialog/DividerWithText/DividerWithText.js +20 -0
- package/components/UploadImageDialog/DividerWithText/styles.js +24 -0
- package/components/UploadImageDialog/ErrorSnackbar/ErrorSnackbar.js +18 -0
- package/components/UploadImageDialog/ErrorSnackbar/styles.js +9 -0
- package/components/UploadImageDialog/ImageByUrlField/ImageByUrlField.js +63 -0
- package/components/UploadImageDialog/ImageByUrlField/styles.js +32 -0
- package/components/UploadImageDialog/SelectImageButton/SelectImageButton.js +23 -0
- package/components/UploadImageDialog/TargetBox/TargetBox.js +45 -0
- package/components/UploadImageDialog/TargetBox/styles.js +30 -0
- package/components/UploadImageDialog/UploadImageDialog.js +87 -0
- package/components/UploadImageDialog/constants/index.js +5 -0
- package/components/UploadImageDialog/styles.js +32 -0
- package/components/ValueChip/ValueChip.js +48 -0
- package/components/ValueChip/styles.js +37 -0
- package/components/VerticalDivider/VerticalDivider.js +22 -0
- package/components/VerticalHeadingsTable/VerticalHeadingsTable.js +72 -0
- package/components/ViewMoreToggle/ViewMoreToggle.js +26 -0
- package/components/ViewMoreToggle/styles.js +20 -0
- package/components/VirtualGroupedList/VirtualGroupedList.js +223 -0
- package/components/VirtualGroupedList/helpers.js +43 -0
- package/components/VirtualGroupedList/styles.js +17 -0
- package/components/activityLog/ActivityExportButton/ActivityExportButton.js +80 -0
- package/components/activityLog/ActivityExportButton/styles.js +15 -0
- package/components/activityLog/ActivityFilterEditor/ActivityDateRangeEditor.js +85 -0
- package/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +89 -0
- package/components/activityLog/ActivityFilterEditor/ActivitySelector.js +30 -0
- package/components/activityLog/ActivityFilterEditor/AttributeSelector.js +103 -0
- package/components/activityLog/ActivityFilterEditor/DateRangeSelector.js +114 -0
- package/components/activityLog/ActivityFilterEditor/IntervalSelector.js +51 -0
- package/components/activityLog/ActivityFilterEditor/SourceSelector.js +30 -0
- package/components/activityLog/ActivityFilterEditor/UserSelector.js +62 -0
- package/components/activityLog/ActivityFilterEditor/styles.js +103 -0
- package/components/activityLog/ActivityFilterEditor/utils/getSelectorActivityTypes.js +35 -0
- package/components/activityLog/ActivityLog/ActivityLog.js +67 -0
- package/components/activityLog/ActivityLog/helpers.js +33 -0
- package/components/activityLog/ActivityLog/items/ActivityItem/ActivityItem.js +30 -0
- package/components/activityLog/ActivityLog/items/ActivityItem/styles.js +56 -0
- package/components/activityLog/ActivityLog/items/GroupItem/GroupItem.js +22 -0
- package/components/activityLog/ActivityLog/items/GroupItem/styles.js +27 -0
- package/components/activityLog/ActivityLog/styles.js +39 -0
- package/components/activityLog/ActivityLogFilter/ActivityLogFilter.js +63 -0
- package/components/activityLog/ActivityLogFilter/ActivityLogFilterHeader.js +26 -0
- package/components/activityLog/ActivityLogFilter/helpers.js +42 -0
- package/components/activityLog/ActivityLogFilter/styles.js +21 -0
- package/components/activityLog/activities/ActivitiesFactory.js +121 -0
- package/components/activityLog/activities/ActivityTitle/ActivityTitle.js +16 -0
- package/components/activityLog/activities/ActivityTitle/styles.js +20 -0
- package/components/activityLog/activities/CommentActivity.js +12 -0
- package/components/activityLog/activities/EntityObject/EntityObject.js +19 -0
- package/components/activityLog/activities/EntityObject/styles.js +17 -0
- package/components/activityLog/activities/GroupActivity.js +21 -0
- package/components/activityLog/activities/MergeActivity.js +19 -0
- package/components/activityLog/activities/MoreItemsLink/MoreItemsLink.js +40 -0
- package/components/activityLog/activities/PotentialMatchActivity.js +16 -0
- package/components/activityLog/activities/ProfileActivity.js +19 -0
- package/components/activityLog/activities/RelationActivity.js +19 -0
- package/components/activityLog/activities/RelationObject/RelationObject.js +20 -0
- package/components/activityLog/activities/RelationObject/styles.js +20 -0
- package/components/activityLog/activities/SearchActivity.js +47 -0
- package/components/activityLog/activities/SimpleActivity.js +22 -0
- package/components/activityLog/activities/fields/DeltaField.js +39 -0
- package/components/activityLog/activities/fields/PotentialMatchField.js +51 -0
- package/components/activityLog/activities/fields/commonStyles.js +22 -0
- package/components/activityLog/activities/fields/styles.js +42 -0
- package/components/activityLog/activities/records/CollapsibleActivityRecords.js +21 -0
- package/components/activityLog/activities/records/EntityRecord.js +25 -0
- package/components/activityLog/activities/records/PotentialMatchRecord.js +19 -0
- package/components/activityLog/activities/records/RecordUpdates.js +23 -0
- package/components/activityLog/activities/records/RelationRecord.js +23 -0
- package/components/activityLog/activities/records/styles.js +38 -0
- package/components/activityLog/activities/styles.js +17 -0
- package/components/activityLog/contexts/CollapsibleItemsContext/index.js +51 -0
- package/components/activityLog/hooks/useActivitiesLoader.js +62 -0
- package/components/activityLog/hooks/useProfileActivitiesLoader.js +62 -0
- package/components/activityLog/hooks/useReadableSearchState.js +48 -0
- package/components/activityLog/index.js +25 -0
- package/components/activityLog/types/ActivitiesFilter.js +2 -0
- package/components/activityLog/types/ActivityData.js +2 -0
- package/components/activityLog/types/ActivityDelta.js +2 -0
- package/components/activityLog/types/ActivityItem.js +2 -0
- package/components/activityLog/types/ActivityTypes.js +33 -0
- package/components/activityLog/types/AttributeOption.js +2 -0
- package/components/activityLog/types/DateRangeTypes.js +9 -0
- package/components/activityLog/types/DeltaTypes.js +9 -0
- package/components/activityLog/types/DeltaValue.js +2 -0
- package/components/activityLog/types/index.js +9 -0
- package/components/activityLog/utils/activities.js +89 -0
- package/components/activityLog/utils/filters.js +80 -0
- package/components/attributes/AttributesView/AttributesView.js +36 -0
- package/components/attributes/AttributesView/index.js +15 -0
- package/components/attributes/BranchDecorator/BranchDecorator.js +16 -0
- package/components/attributes/BranchDecorator/styles.js +39 -0
- package/components/attributes/ImageAttributesLine/ImageAttributesLine.js +123 -0
- package/components/attributes/ImageAttributesLine/constants.js +9 -0
- package/components/attributes/ImageAttributesLine/index.js +8 -0
- package/components/attributes/ImageAttributesLine/styles.js +49 -0
- package/components/attributes/OvIcon/OvIcon.js +33 -0
- package/components/attributes/OvIcon/index.js +8 -0
- package/components/attributes/OvIcon/styles.js +17 -0
- package/components/attributes/PivotingAttributes/PivotingTooltip.js +62 -0
- package/components/attributes/PivotingAttributes/PivotingTooltipContent.js +82 -0
- package/components/attributes/PivotingAttributes/helpers.js +118 -0
- package/components/attributes/PivotingAttributes/styles.js +95 -0
- package/components/attributes/editMode/AttributesFactory/Attribute.js +11 -0
- package/components/attributes/editMode/AttributesFactory/AttributesFactory.js +50 -0
- package/components/attributes/editMode/AttributesList/AttributesList.js +89 -0
- package/components/attributes/editMode/AttributesList/helpers.js +43 -0
- package/components/attributes/editMode/AttributesList/index.js +8 -0
- package/components/attributes/editMode/AttributesPager/AttributeRenderer.js +99 -0
- package/components/attributes/editMode/AttributesPager/AttributesPager.js +88 -0
- package/components/attributes/editMode/AttributesPager/CardinalityMessage.js +72 -0
- package/components/attributes/editMode/AttributesPager/SpecialRenderer.js +86 -0
- package/components/attributes/editMode/AttributesPager/index.js +54 -0
- package/components/attributes/editMode/AttributesPager/styles.js +33 -0
- package/components/attributes/editMode/AttributesPager/utils.js +7 -0
- package/components/attributes/editMode/AttributesView/AttributesView.js +67 -0
- package/components/attributes/editMode/AttributesView/index.js +14 -0
- package/components/attributes/editMode/AttributesView/styles.js +15 -0
- package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.js +91 -0
- package/components/attributes/editMode/ComplexAttribute/styles.js +31 -0
- package/components/attributes/editMode/EntityCreator/EntityCreator.js +49 -0
- package/components/attributes/editMode/EntityCreator/index.js +38 -0
- package/components/attributes/editMode/EntitySelector/EntitySelector.js +146 -0
- package/components/attributes/editMode/EntitySelector/components/ClearIndicator.js +20 -0
- package/components/attributes/editMode/EntitySelector/components/EntityOption.js +58 -0
- package/components/attributes/editMode/EntitySelector/components/EntityTypeOption.js +45 -0
- package/components/attributes/editMode/EntitySelector/components/Group.js +40 -0
- package/components/attributes/editMode/EntitySelector/components/SingleValue.js +80 -0
- package/components/attributes/editMode/EntitySelector/components/styles.js +89 -0
- package/components/attributes/editMode/EntitySelector/styles.js +9 -0
- package/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.js +107 -0
- package/components/attributes/editMode/ImageAttributesLine/index.js +7 -0
- package/components/attributes/editMode/ImageAttributesLine/styles.js +43 -0
- package/components/attributes/editMode/MoreAttributesButton/MoreAttributesButton.js +111 -0
- package/components/attributes/editMode/MoreAttributesButton/index.js +8 -0
- package/components/attributes/editMode/MoreAttributesButton/styles.js +31 -0
- package/components/attributes/editMode/NestedAttribute/NestedAttribute.js +45 -0
- package/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.js +152 -0
- package/components/attributes/editMode/ReferenceAttribute/index.js +44 -0
- package/components/attributes/editMode/ReferenceAttribute/styles.js +12 -0
- package/components/attributes/editMode/RelationTypeSelector/RelationTypeSelector.js +72 -0
- package/components/attributes/editMode/RelationTypeSelector/components/RelationOption.js +57 -0
- package/components/attributes/editMode/RelationTypeSelector/components/styles.js +55 -0
- package/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +125 -0
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.js +36 -0
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.js +19 -0
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.js +20 -0
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.js +59 -0
- package/components/attributes/editMode/SimpleAttributeEditor/selectors/types.js +2 -0
- package/components/attributes/editMode/SimpleAttributeEditor/styles.js +33 -0
- package/components/attributes/editMode/SimpleAttributeEditor/utils.js +65 -0
- package/components/attributes/helpers/attributesView.js +22 -0
- package/components/attributes/helpers/imageAttributes.js +37 -0
- package/components/attributes/inline/AttributesList/AttributesList.js +42 -0
- package/components/attributes/inline/AttributesList/styles.js +13 -0
- package/components/attributes/inline/AttributesPager/AttributesPager.js +96 -0
- package/components/attributes/inline/AttributesPager/styles.js +14 -0
- package/components/attributes/inline/ComplexAttribute/ComplexAttribute.js +72 -0
- package/components/attributes/inline/ComplexAttribute/styles.js +24 -0
- package/components/attributes/inline/ImageAttribute/ImageAttribute.js +39 -0
- package/components/attributes/inline/ImageAttribute/styles.js +17 -0
- package/components/attributes/inline/ImageAttributesBlock/ImageAttributesBlock.js +34 -0
- package/components/attributes/inline/NestedAttribute/NestedAttribute.js +37 -0
- package/components/attributes/inline/NestedAttributesBlock/NestedAttributesBlock.js +43 -0
- package/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.js +48 -0
- package/components/attributes/inline/ReferenceAttribute/styles.js +14 -0
- package/components/attributes/inline/ReferenceAttributesBlock/ReferenceAttributesBlock.js +34 -0
- package/components/attributes/inline/SimpleAttribute/CrosswalkMenuItem/CrosswalkMenuItem.js +50 -0
- package/components/attributes/inline/SimpleAttribute/CrosswalkMenuItem/styles.js +23 -0
- package/components/attributes/inline/SimpleAttribute/SimpleAttribute.js +99 -0
- package/components/attributes/inline/SimpleAttribute/index.js +8 -0
- package/components/attributes/inline/SimpleAttribute/styles.js +32 -0
- package/components/attributes/inline/SimpleAttributeEditor/SimpleAttributeEditor.js +88 -0
- package/components/attributes/inline/SimpleAttributeEditor/styles.js +24 -0
- package/components/attributes/inline/SimpleAttributesBlock/SimpleAttributesBlock.js +61 -0
- package/components/attributes/inline/SimpleAttributesBlock/styles.js +24 -0
- package/components/attributes/inline/common/ComplexAttributeLabel.js +15 -0
- package/components/attributes/inline/common/CrosswalkIcon.js +20 -0
- package/components/attributes/inline/common/DeleteButton.js +13 -0
- package/components/attributes/inline/common/IgnoreButton.js +14 -0
- package/components/attributes/inline/common/PinButton.js +14 -0
- package/components/attributes/inline/common/SourceItem.js +27 -0
- package/components/attributes/inline/common/__test__/CrosswalkIcon.spec.js +75 -0
- package/components/attributes/inline/common/__test__/IgnoreButton.spec.js +28 -0
- package/components/attributes/inline/common/__test__/PinButton.spec.js +28 -0
- package/components/attributes/inline/common/__test__/SourceItem.spec.js +70 -0
- package/components/attributes/inline/common/styles.js +61 -0
- package/components/attributes/inline/hooks/useAttributeState.js +43 -0
- package/components/attributes/inline/index.js +25 -0
- package/components/attributes/inline/types/AddAttributeEvent.js +2 -0
- package/components/attributes/inline/types/CrosswalksMap.js +2 -0
- package/components/attributes/inline/types/DeleteAttributeEvent.js +2 -0
- package/components/attributes/inline/types/EditAttributeEvent.js +2 -0
- package/components/attributes/inline/types/IgnoreAttributeEvent.js +2 -0
- package/components/attributes/inline/types/PinAttributeEvent.js +2 -0
- package/components/attributes/inline/types/index.js +2 -0
- package/components/attributes/pagersCommon/ShowLess.js +18 -0
- package/components/attributes/pagersCommon/ShowMore.js +20 -0
- package/components/attributes/pagersCommon/styles.js +13 -0
- package/components/attributes/readMode/AttributeValuesBlock/AttributeValuesBlock.js +73 -0
- package/components/attributes/readMode/AttributesFactory/Attribute.js +11 -0
- package/components/attributes/readMode/AttributesFactory/AttributesFactory.js +38 -0
- package/components/attributes/readMode/AttributesList/AttributesList.js +71 -0
- package/components/attributes/readMode/AttributesList/index.js +8 -0
- package/components/attributes/readMode/AttributesPager/AttributesPager.js +76 -0
- package/components/attributes/readMode/AttributesPager/MultiLineRenderer.js +67 -0
- package/components/attributes/readMode/AttributesPager/OneLineRenderer.js +28 -0
- package/components/attributes/readMode/AttributesPager/SpecialRenderer.js +41 -0
- package/components/attributes/readMode/AttributesPager/index.js +15 -0
- package/components/attributes/readMode/AttributesPager/styles.js +92 -0
- package/components/attributes/readMode/AttributesView/AttributesView.js +60 -0
- package/components/attributes/readMode/AttributesView/index.js +14 -0
- package/components/attributes/readMode/AttributesView/styles.js +19 -0
- package/components/attributes/readMode/ComplexAttribute/ComplexAttribute.js +65 -0
- package/components/attributes/readMode/ComplexAttribute/styles.js +23 -0
- package/components/attributes/readMode/ImageAttributesLine/ImageAttributesLine.js +55 -0
- package/components/attributes/readMode/ImageAttributesLine/cross.inline.svg.js +4 -0
- package/components/attributes/readMode/ImageAttributesLine/index.js +8 -0
- package/components/attributes/readMode/ImageAttributesLine/styles.js +90 -0
- package/components/attributes/readMode/NestedAttribute/NestedAttribute.js +72 -0
- package/components/attributes/readMode/NestedAttribute/index.js +8 -0
- package/components/attributes/readMode/NestedAttribute/styles.js +28 -0
- package/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +81 -0
- package/components/attributes/readMode/ReferenceAttribute/index.js +17 -0
- package/components/attributes/readMode/ReferenceAttribute/styles.js +30 -0
- package/components/attributes/readMode/SimpleAttribute/SimpleAttribute.js +52 -0
- package/components/attributes/readMode/SimpleAttribute/index.js +8 -0
- package/components/attributes/readMode/SimpleAttribute/styles.js +37 -0
- package/components/attributes/readMode/SpecialAttributes/Roles/Role.js +41 -0
- package/components/attributes/readMode/SpecialAttributes/Roles/Roles.js +13 -0
- package/components/attributes/readMode/SpecialAttributes/Roles/index.js +8 -0
- package/components/attributes/readMode/SpecialAttributes/SpecialAttributesArray.js +29 -0
- package/components/attributes/readMode/SpecialAttributes/Tags/Tag.js +43 -0
- package/components/attributes/readMode/SpecialAttributes/Tags/Tags.js +13 -0
- package/components/attributes/readMode/SpecialAttributes/Tags/index.js +8 -0
- package/components/attributes/readMode/SpecialAttributes/styles.js +20 -0
- package/components/attributes/readMode/helpers/historyAppearance.js +65 -0
- package/components/attributes/types/attributesView.js +2 -0
- package/components/attributes/types/index.js +13 -0
- package/components/charts/ActiveShape/ActiveShape.js +52 -0
- package/components/charts/BarChart/BarChart.js +37 -0
- package/components/charts/BarChart/getBarChartSettings.js +52 -0
- package/components/charts/BubbleChart/BubbleChart.js +84 -0
- package/components/charts/BubbleChart/helpers.js +28 -0
- package/components/charts/BubbleChart/styles.js +10 -0
- package/components/charts/BubbleChart/useBubbles.js +18 -0
- package/components/charts/ChartsFactory.js +57 -0
- package/components/charts/CloudChart/CloudChart.js +72 -0
- package/components/charts/CloudChart/styles.js +34 -0
- package/components/charts/CloudChart/useCloud.js +36 -0
- package/components/charts/CustomLegend/CustomLegend.js +17 -0
- package/components/charts/CustomLegend/getLegendProps.js +23 -0
- package/components/charts/CustomLegend/styles.js +41 -0
- package/components/charts/CustomTooltip/CustomTooltip.js +29 -0
- package/components/charts/CustomTooltip/styles.js +31 -0
- package/components/charts/HOCs/withPercents.js +60 -0
- package/components/charts/LineChart/LineChart.js +48 -0
- package/components/charts/LineChart/getLineChartSettings.js +60 -0
- package/components/charts/MapChart/Legend/Legend.js +22 -0
- package/components/charts/MapChart/Legend/styles.js +49 -0
- package/components/charts/MapChart/MapChart.js +115 -0
- package/components/charts/MapChart/styles.js +16 -0
- package/components/charts/MapChart/useGeography.js +23 -0
- package/components/charts/PieChart/PieChart.js +67 -0
- package/components/charts/TableWithBars/TableWithBars.js +71 -0
- package/components/charts/TableWithBars/cell-renderers/AttributeCellRenderer.js +30 -0
- package/components/charts/TableWithBars/cell-renderers/HeadCellRenderer.js +40 -0
- package/components/charts/TableWithBars/cell-renderers/NumberCellValueRenderer.js +20 -0
- package/components/charts/TableWithBars/cell-renderers/styles.js +71 -0
- package/components/charts/TableWithBars/styles.js +19 -0
- package/components/charts/TreeChart/TreeChart.js +66 -0
- package/components/charts/TreeChart/styles.js +16 -0
- package/components/charts/hooks/useClickableStyle.js +14 -0
- package/components/charts/hooks/useTooltipState.js +30 -0
- package/components/charts/index.js +18 -0
- package/components/charts/types/BarChartOptions.js +2 -0
- package/components/charts/types/ChartData.js +2 -0
- package/components/charts/types/ChartProps.js +2 -0
- package/components/charts/types/LineChartOptions.js +2 -0
- package/components/charts/types/TableWithBarsOptions.js +2 -0
- package/components/charts/types/index.js +2 -0
- package/components/commonReactSelectComponents/DropdownIndicator.js +38 -0
- package/components/commonReactSelectComponents/DropdownIndicatorWithIconButton.js +38 -0
- package/components/commonReactSelectComponents/MenuWithPopper.js +79 -0
- package/components/commonReactSelectComponents/arrowIndicatorStyles.js +12 -0
- package/components/commonReactSelectComponents/menuStyles.js +13 -0
- package/components/editors/BooleanEditor/BooleanEditor.js +41 -0
- package/components/editors/BooleanRadioEditor/BooleanRadioEditor.js +24 -0
- package/components/editors/BooleanRadioEditor/styles.js +12 -0
- package/components/editors/DataTypeValueEditor/DataTypeValueEditor.js +54 -0
- package/components/editors/DataTypeValueEditor/useEditorContext.js +108 -0
- package/components/editors/DateEditor/DateEditor.js +94 -0
- package/components/editors/DateEditor/styles.js +31 -0
- package/components/editors/DateRangeEditor/DateRangeEditor.js +146 -0
- package/components/editors/DateRangeEditor/styles.js +39 -0
- package/components/editors/DependentLookupEditor/DependentLookupEditor.js +129 -0
- package/components/editors/DependentLookupEditor/OptionWithCheckIcon.js +33 -0
- package/components/editors/DependentLookupEditor/helpers.js +25 -0
- package/components/editors/DependentLookupEditor/styles.js +25 -0
- package/components/editors/DependentLookupEditor/useAutopopulation.js +25 -0
- package/components/editors/DependentLookupEditor/useDefaultOptions.js +25 -0
- package/components/editors/DependentLookupEditor/useLookupsResolver.js +29 -0
- package/components/editors/DropDownEditor/DropDownEditor.js +47 -0
- package/components/editors/EditorsFactory.js +97 -0
- package/components/editors/FileTypeEditor/FileTypeEditor.js +52 -0
- package/components/editors/FileTypeEditor/styles.js +9 -0
- package/components/editors/FilterEditor/FilterEditor.js +46 -0
- package/components/editors/FilterEditor/FilterValueEditor.js +84 -0
- package/components/editors/GroupedDropDownEditor/GroupedDropDownEditor.js +64 -0
- package/components/editors/GroupedDropDownEditor/entriesHelpers.js +32 -0
- package/components/editors/GroupedDropDownEditor/styles.js +14 -0
- package/components/editors/LookupEditor/LookupEditor.js +78 -0
- package/components/editors/LookupEditor/entriesHelpers.js +28 -0
- package/components/editors/NumberEditor/NumberEditor.js +70 -0
- package/components/editors/RangeDataTypeValueEditor/RangeDataTypeValueEditor.js +87 -0
- package/components/editors/RangeDataTypeValueEditor/styles.js +24 -0
- package/components/editors/SelectEditor/SelectEditor.js +44 -0
- package/components/editors/TextEditor/TextEditor.js +47 -0
- package/components/editors/TimestampEditor/TimestampEditor.js +100 -0
- package/components/editors/TimestampEditor/styles.js +25 -0
- package/components/editors/TypeaheadEditor/TypeaheadEditor.js +151 -0
- package/components/editors/TypeaheadEditor/styles.js +55 -0
- package/components/editors/commonComponents/MultiValueChip/MultiValueChip.js +39 -0
- package/components/editors/constants.js +27 -0
- package/components/editors/index.js +24 -0
- package/components/index.js +242 -0
- package/constants/attributes.js +5 -0
- package/constants/classnames.js +4 -0
- package/constants/index.js +13 -0
- package/constants/prop-types.js +82 -0
- package/contexts/AsyncMountContext/index.js +19 -0
- package/contexts/BlockImageGalleryDialogContext/index.js +9 -0
- package/contexts/CollaborationContext/index.js +21 -0
- package/contexts/CrosswalksDisplayContext/index.js +70 -0
- package/contexts/EntitiesMapContext/index.js +9 -0
- package/contexts/HistoryAppearanceContext/index.js +12 -0
- package/contexts/IdContext/index.js +9 -0
- package/contexts/PivotingAttributeContext/index.js +8 -0
- package/contexts/PopupBoundariesContext/index.js +16 -0
- package/contexts/ProfilePerspectiveViewContext/index.js +9 -0
- package/contexts/UsersContext/index.js +9 -0
- package/contexts/ViewIdContext/index.js +9 -0
- package/contexts/index.js +30 -0
- package/core/index.js +13 -0
- package/core/utils.js +54 -0
- package/hooks/index.js +29 -0
- package/hooks/useActions.js +27 -0
- package/hooks/useAsyncMount.js +27 -0
- package/hooks/useCollaboration.js +151 -0
- package/hooks/useConfigPermissions.js +20 -0
- package/hooks/useDidUpdateEffect.js +14 -0
- package/hooks/usePrevious.js +12 -0
- package/hooks/useRelationTypeSelector.js +53 -0
- package/hooks/useRelationsLoader.js +111 -0
- package/hooks/useRunOnceAfterValueInitialization.js +14 -0
- package/hooks/useSafePromise.js +34 -0
- package/hooks/useSavedState.js +18 -0
- package/hooks/useUsers.js +29 -0
- package/hooks/useWhyDidYouUpdate.js +46 -0
- package/icons/Add.js +11 -0
- package/icons/AddComment.js +11 -0
- package/icons/Calendar.js +11 -0
- package/icons/Comment.js +11 -0
- package/icons/CommentBubble.js +11 -0
- package/icons/Create.js +11 -0
- package/icons/DefaultImage.js +13 -0
- package/icons/Details.js +16 -0
- package/icons/Download.js +16 -0
- package/icons/EmptySearchResults.js +73 -0
- package/icons/Eye.js +16 -0
- package/icons/Filter.js +11 -0
- package/icons/Ignored.js +11 -0
- package/icons/IgnoredOutlined.js +11 -0
- package/icons/LogIn.js +12 -0
- package/icons/LogOut.js +12 -0
- package/icons/Merge.js +11 -0
- package/icons/MlMatch.js +51 -0
- package/icons/NestedAttribute.js +11 -0
- package/icons/NoData.js +73 -0
- package/icons/NoDataSearch.js +14 -0
- package/icons/NoMatches.js +11 -0
- package/icons/Pin.js +11 -0
- package/icons/PinOutlined.js +11 -0
- package/icons/PivotingIcon.js +11 -0
- package/icons/PmIcon.js +11 -0
- package/icons/PotentialMatch.js +11 -0
- package/icons/Profile.js +11 -0
- package/icons/Recommended.js +16 -0
- package/icons/ReferenceAttribute.js +11 -0
- package/icons/Remove.js +11 -0
- package/icons/ResizeIconInline.js +11 -0
- package/icons/Search.js +11 -0
- package/icons/SelectAttributes.js +46 -0
- package/icons/SimpleAttribute.js +11 -0
- package/icons/Table.js +11 -0
- package/icons/UnMerge.js +11 -0
- package/icons/UploadIcon.js +35 -0
- package/icons/index.js +82 -0
- package/index.js +19 -0
- package/package.json +8 -5
- package/types/index.js +2 -0
- package/bundle.js +0 -2
- package/bundle.js.LICENSE.txt +0 -25
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
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 ErrorMessage_1 = __importDefault(require("../../../ErrorWrapper/ErrorMessage"));
|
|
29
|
+
var Title_1 = __importDefault(require("../../../Title/Title"));
|
|
30
|
+
var ShowLess_1 = __importDefault(require("../../pagersCommon/ShowLess"));
|
|
31
|
+
var ShowMore_1 = __importDefault(require("../../pagersCommon/ShowMore"));
|
|
32
|
+
var Attribute_1 = __importDefault(require("../AttributesFactory/Attribute"));
|
|
33
|
+
var CardinalityMessage_1 = __importDefault(require("./CardinalityMessage"));
|
|
34
|
+
var styles_1 = require("./styles");
|
|
35
|
+
var utils_1 = require("./utils");
|
|
36
|
+
var AttributeRenderer = function (_a) {
|
|
37
|
+
var max = _a.max, values = _a.values, attributeType = _a.attributeType, parentUri = _a.parentUri, mode = _a.mode, showEmptyEditors = _a.showEmptyEditors, errorMessage = _a.errorMessage, errors = _a.errors, paging = _a.paging, crosswalks = _a.crosswalks, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, onDeactivateError = _a.onDeactivateError, additionalControlsRenderer = _a.additionalControlsRenderer, requestNextPageOfAttributeValues = _a.requestNextPageOfAttributeValues;
|
|
38
|
+
var styles = styles_1.useStyles();
|
|
39
|
+
var _b = react_1.useState(max), visibleValuesCount = _b[0], setVisibleValuesCount = _b[1];
|
|
40
|
+
var _c = react_1.useState(false), hadDeletions = _c[0], setHadDeletions = _c[1];
|
|
41
|
+
var label = attributeType.label, isRequired = attributeType.required, cardinality = attributeType.cardinality, name = attributeType.name, attributeTypeUri = attributeType.uri;
|
|
42
|
+
var isEditableMode = mdm_sdk_1.isEditableMode(mode);
|
|
43
|
+
var isEmptyValues = mdm_sdk_1.isEmptyValue(values);
|
|
44
|
+
var showEmpty = ((!hadDeletions && showEmptyEditors) || isRequired) && isEmptyValues;
|
|
45
|
+
var emptyEditorValue = react_1.useRef(mdm_sdk_1.createNewAttribute({
|
|
46
|
+
parentUri: parentUri,
|
|
47
|
+
attributeType: attributeType
|
|
48
|
+
}));
|
|
49
|
+
var onAddOneMore = react_1.useCallback(function () {
|
|
50
|
+
setVisibleValuesCount(visibleValuesCount + 1);
|
|
51
|
+
var attribute = {
|
|
52
|
+
parentUri: parentUri,
|
|
53
|
+
index: visibleValuesCount,
|
|
54
|
+
attributeType: attributeType
|
|
55
|
+
};
|
|
56
|
+
return onAddAttributes(showEmpty && !mdm_sdk_1.isComplexAttribute(attributeType.type) ? [attribute, attribute] : [attribute]);
|
|
57
|
+
}, [visibleValuesCount, onAddAttributes, parentUri, attributeType, showEmpty]);
|
|
58
|
+
var onDelete = react_1.useCallback(ramda_1.pipe(onDeleteAttribute, ramda_1.T, setHadDeletions), [onDeleteAttribute, setHadDeletions]);
|
|
59
|
+
if (isEmptyValues && !showEmpty) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
if (showEmpty && isEmptyValues) {
|
|
63
|
+
values = [emptyEditorValue.current];
|
|
64
|
+
}
|
|
65
|
+
if (mdm_sdk_1.isEmptyValue(values)) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
var newValuesCount = (utils_1.filterNewValues(values) || []).length;
|
|
69
|
+
var totalOvValues = ramda_1.ifElse(ramda_1.has('totalOvValues'), ramda_1.pipe(ramda_1.prop('totalOvValues'), ramda_1.add(newValuesCount)), ramda_1.always(values.length))(paging);
|
|
70
|
+
var hasPaging = max < totalOvValues;
|
|
71
|
+
var showMore = hasPaging && visibleValuesCount < totalOvValues;
|
|
72
|
+
var showLess = hasPaging && visibleValuesCount >= totalOvValues;
|
|
73
|
+
var onShowMore = function () {
|
|
74
|
+
if (values.length < totalOvValues) {
|
|
75
|
+
requestNextPageOfAttributeValues({
|
|
76
|
+
parentUri: parentUri,
|
|
77
|
+
attributeTypeUri: attributeTypeUri,
|
|
78
|
+
attributeTypeName: name,
|
|
79
|
+
values: values,
|
|
80
|
+
defaultMaxValues: max
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
setVisibleValuesCount(visibleValuesCount + max);
|
|
84
|
+
};
|
|
85
|
+
var onShowLess = function () {
|
|
86
|
+
setVisibleValuesCount(max);
|
|
87
|
+
};
|
|
88
|
+
var shownValues = values.slice(0, visibleValuesCount);
|
|
89
|
+
var lastIndex = shownValues ? shownValues.length - 1 : 0;
|
|
90
|
+
var hiddenValuesCount = totalOvValues - visibleValuesCount;
|
|
91
|
+
return (react_1.default.createElement("div", { className: styles.wrapper },
|
|
92
|
+
react_1.default.createElement(Title_1.default, { label: label, isRequired: isRequired, className: styles.title, attributeType: attributeType }),
|
|
93
|
+
isEditableMode && react_1.default.createElement(CardinalityMessage_1.default, { cardinality: cardinality }),
|
|
94
|
+
isEditableMode && react_1.default.createElement(ErrorMessage_1.default, { message: errorMessage }),
|
|
95
|
+
react_1.default.createElement("div", { className: styles.attributesWrapper }, shownValues.map(function (value, idx) { return (react_1.default.createElement(Attribute_1.default, { key: value.uri, attributeValue: value, attributeType: attributeType, lazy: showEmpty && !isRequired, showEmptyEditors: showEmptyEditors, errors: errors, ownError: mdm_sdk_1.getAttributeOwnError(value, idx, errors), mode: mode, crosswalks: crosswalks, onAddOneMore: lastIndex === idx ? onAddOneMore : null, onAddAttributes: onAddAttributes, onDeleteAttribute: onDelete, onChangeAttribute: onChangeAttribute, onDeactivateError: onDeactivateError, additionalControlsRenderer: additionalControlsRenderer })); })),
|
|
96
|
+
showMore && (react_1.default.createElement(ShowMore_1.default, { moreNumber: ramda_1.min(max, hiddenValuesCount), valueNumber: hiddenValuesCount, onClick: onShowMore })),
|
|
97
|
+
showLess && react_1.default.createElement(ShowLess_1.default, { onClick: onShowLess })));
|
|
98
|
+
};
|
|
99
|
+
exports.default = AttributeRenderer;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
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
|
+
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 mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
38
|
+
var ramda_1 = require("ramda");
|
|
39
|
+
var BranchDecorator_1 = __importDefault(require("../../BranchDecorator/BranchDecorator"));
|
|
40
|
+
var ImageAttributesLine_1 = __importDefault(require("../ImageAttributesLine"));
|
|
41
|
+
var AttributeRenderer_1 = __importDefault(require("./AttributeRenderer"));
|
|
42
|
+
var SpecialRenderer_1 = __importDefault(require("./SpecialRenderer"));
|
|
43
|
+
var styles_1 = require("./styles");
|
|
44
|
+
var Title_1 = __importDefault(require("../../../Title/Title"));
|
|
45
|
+
var RENDERER_TYPES;
|
|
46
|
+
(function (RENDERER_TYPES) {
|
|
47
|
+
RENDERER_TYPES["imageLine"] = "imageLine";
|
|
48
|
+
RENDERER_TYPES["special"] = "special";
|
|
49
|
+
RENDERER_TYPES["default"] = "default";
|
|
50
|
+
})(RENDERER_TYPES || (RENDERER_TYPES = {}));
|
|
51
|
+
var AttributesPager = function (_a) {
|
|
52
|
+
var values = _a.values, //only ov
|
|
53
|
+
attributeType = _a.attributeType, _b = _a.mode, mode = _b === void 0 ? mdm_sdk_1.Mode.Viewing : _b, crosswalks = _a.crosswalks, drawLines = _a.drawLines, _c = _a.paging, paging = _c === void 0 ? {} : _c, parentUri = _a.parentUri, errors = _a.errors, errorMessage = _a.errorMessage, _d = _a.max, max = _d === void 0 ? Infinity : _d, showEmptyEditors = _a.showEmptyEditors, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, onDeactivateError = _a.onDeactivateError, additionalControlsRenderer = _a.additionalControlsRenderer, requestNextPageOfAttributeValues = _a.requestNextPageOfAttributeValues;
|
|
54
|
+
var styles = styles_1.useStyles();
|
|
55
|
+
var partitionByOv = ramda_1.partition(mdm_sdk_1.isOv);
|
|
56
|
+
var ovValues = partitionByOv(values)[0];
|
|
57
|
+
var commonProps = {
|
|
58
|
+
errorMessage: errorMessage,
|
|
59
|
+
errors: errors,
|
|
60
|
+
mode: mode,
|
|
61
|
+
parentUri: parentUri,
|
|
62
|
+
onAddAttributes: onAddAttributes,
|
|
63
|
+
onDeleteAttribute: onDeleteAttribute,
|
|
64
|
+
onChangeAttribute: onChangeAttribute,
|
|
65
|
+
onDeactivateError: onDeactivateError,
|
|
66
|
+
additionalControlsRenderer: additionalControlsRenderer
|
|
67
|
+
};
|
|
68
|
+
var renderAttribute = function () {
|
|
69
|
+
var type = ramda_1.cond([
|
|
70
|
+
[mdm_sdk_1.isSpecialAttribute, ramda_1.always(RENDERER_TYPES.special)],
|
|
71
|
+
[mdm_sdk_1.isImage, ramda_1.always(RENDERER_TYPES.imageLine)],
|
|
72
|
+
[ramda_1.T, ramda_1.always(RENDERER_TYPES.default)]
|
|
73
|
+
])(attributeType);
|
|
74
|
+
switch (type) {
|
|
75
|
+
case RENDERER_TYPES.special: {
|
|
76
|
+
return (react_1.default.createElement(SpecialRenderer_1.default, __assign({ values: ovValues, attributeType: attributeType }, commonProps)));
|
|
77
|
+
}
|
|
78
|
+
case RENDERER_TYPES.imageLine:
|
|
79
|
+
return (react_1.default.createElement("div", { className: styles.wrapper },
|
|
80
|
+
react_1.default.createElement(Title_1.default, { label: attributeType === null || attributeType === void 0 ? void 0 : attributeType.label, attributeType: attributeType }),
|
|
81
|
+
react_1.default.createElement(ImageAttributesLine_1.default, { attributeValues: ovValues, attributeType: attributeType, onDeleteAttribute: onDeleteAttribute, parentUri: parentUri, onChangeAttribute: onChangeAttribute })));
|
|
82
|
+
default:
|
|
83
|
+
return (react_1.default.createElement(AttributeRenderer_1.default, __assign({ values: ovValues, attributeType: attributeType, max: max, paging: paging, crosswalks: crosswalks, showEmptyEditors: showEmptyEditors, requestNextPageOfAttributeValues: requestNextPageOfAttributeValues }, commonProps)));
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
return react_1.default.createElement(BranchDecorator_1.default, { enabled: drawLines }, renderAttribute());
|
|
87
|
+
};
|
|
88
|
+
exports.default = react_1.memo(AttributesPager);
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
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 react_1 = __importDefault(require("react"));
|
|
7
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
8
|
+
var Typography_1 = __importDefault(require("@material-ui/core/Typography"));
|
|
9
|
+
var ramda_1 = require("ramda");
|
|
10
|
+
var styles_1 = require("./styles");
|
|
11
|
+
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
12
|
+
var valueCaption = function (value) {
|
|
13
|
+
return ui_i18n_1.default.text('${value}', {
|
|
14
|
+
value: value === 1 ? ui_i18n_1.default.text('value') : ui_i18n_1.default.text('values')
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var hasMinValue = ramda_1.has('minValue');
|
|
18
|
+
var hasMaxValue = ramda_1.has('maxValue');
|
|
19
|
+
var noMaxValue = ramda_1.pipe(hasMaxValue, ramda_1.not);
|
|
20
|
+
var minValueIsOne = ramda_1.propSatisfies(function (minValue) { return minValue === 1; }, 'minValue');
|
|
21
|
+
var exactCardinality = function (_a) {
|
|
22
|
+
var minValue = _a.minValue, maxValue = _a.maxValue;
|
|
23
|
+
return minValue && minValue === maxValue;
|
|
24
|
+
};
|
|
25
|
+
var generateMinCardinality = function (_a) {
|
|
26
|
+
var minValue = _a.minValue;
|
|
27
|
+
return ui_i18n_1.default.text('This attribute can have minimum ${minValue} ${minValueCaption}', {
|
|
28
|
+
minValue: ui_i18n_1.default.number(minValue, '0'),
|
|
29
|
+
minValueCaption: valueCaption(minValue)
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
var generateMaxCardinality = function (_a) {
|
|
33
|
+
var maxValue = _a.maxValue;
|
|
34
|
+
return ui_i18n_1.default.text('This attribute can have maximum ${maxValue} ${maxValueCaption}', {
|
|
35
|
+
maxValue: ui_i18n_1.default.number(maxValue, '0'),
|
|
36
|
+
maxValueCaption: valueCaption(maxValue)
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var generateExactCardinality = function (_a) {
|
|
40
|
+
var minValue = _a.minValue;
|
|
41
|
+
return ui_i18n_1.default.text('This attribute should have ${minValue} ${minValueCaption}', {
|
|
42
|
+
minValue: ui_i18n_1.default.number(minValue, '0'),
|
|
43
|
+
minValueCaption: valueCaption(minValue)
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var generateMinMaxCardinality = function (_a) {
|
|
47
|
+
var minValue = _a.minValue, maxValue = _a.maxValue;
|
|
48
|
+
return ui_i18n_1.default.text('${minCardinality} and maximum ${maxValue} ${maxValueCaption}', {
|
|
49
|
+
minCardinality: generateMinCardinality({ minValue: minValue }),
|
|
50
|
+
maxValue: ui_i18n_1.default.number(maxValue, '0'),
|
|
51
|
+
maxValueCaption: valueCaption(maxValue)
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
var getCardinalityMessage = ramda_1.cond([
|
|
55
|
+
[ramda_1.isNil, ramda_1.always('')],
|
|
56
|
+
[exactCardinality, generateExactCardinality],
|
|
57
|
+
[ramda_1.allPass([minValueIsOne, hasMaxValue]), generateMaxCardinality],
|
|
58
|
+
[ramda_1.allPass([minValueIsOne, noMaxValue]), ramda_1.always('')],
|
|
59
|
+
[ramda_1.allPass([hasMinValue, hasMaxValue]), generateMinMaxCardinality],
|
|
60
|
+
[hasMaxValue, generateMaxCardinality],
|
|
61
|
+
[hasMinValue, generateMinCardinality],
|
|
62
|
+
[ramda_1.T, ramda_1.always('')]
|
|
63
|
+
]);
|
|
64
|
+
var CardinalityMessage = function (_a) {
|
|
65
|
+
var cardinality = _a.cardinality;
|
|
66
|
+
var styles = styles_1.useStyles();
|
|
67
|
+
return (react_1.default.createElement(Typography_1.default, { variant: "caption", className: styles.caption }, getCardinalityMessage(cardinality)));
|
|
68
|
+
};
|
|
69
|
+
CardinalityMessage.propTypes = {
|
|
70
|
+
cardinality: mdm_sdk_1.CardinalityType
|
|
71
|
+
};
|
|
72
|
+
exports.default = CardinalityMessage;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
+
var t = {};
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
+
t[p[i]] = s[p[i]];
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
};
|
|
43
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
var react_1 = __importStar(require("react"));
|
|
48
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
49
|
+
var Box_1 = __importDefault(require("@material-ui/core/Box"));
|
|
50
|
+
var Title_1 = __importDefault(require("../../../Title/Title"));
|
|
51
|
+
var CardinalityMessage_1 = __importDefault(require("./CardinalityMessage"));
|
|
52
|
+
var ErrorMessage_1 = __importDefault(require("../../../ErrorWrapper/ErrorMessage"));
|
|
53
|
+
var Attribute_1 = __importDefault(require("../AttributesFactory/Attribute"));
|
|
54
|
+
var Tags_1 = __importDefault(require("../../readMode/SpecialAttributes/Tags")); //TODO: should be edit mode
|
|
55
|
+
var Roles_1 = __importDefault(require("../../readMode/SpecialAttributes/Roles")); //TODO: should be edit mode
|
|
56
|
+
var styles_1 = require("./styles");
|
|
57
|
+
var SpecialRenderer = function (_a) {
|
|
58
|
+
var values = _a.values, attributeType = _a.attributeType, parentUri = _a.parentUri, mode = _a.mode, errorMessage = _a.errorMessage, otherProps = __rest(_a, ["values", "attributeType", "parentUri", "mode", "errorMessage"]);
|
|
59
|
+
var styles = styles_1.useStyles();
|
|
60
|
+
var label = attributeType.label, isRequired = attributeType.required, cardinality = attributeType.cardinality;
|
|
61
|
+
var isEditableMode = mdm_sdk_1.isEditableMode(mode);
|
|
62
|
+
var emptyEditorValue = react_1.useRef(mdm_sdk_1.createNewAttribute({
|
|
63
|
+
parentUri: parentUri,
|
|
64
|
+
attributeType: attributeType
|
|
65
|
+
}));
|
|
66
|
+
var renderValue = function () {
|
|
67
|
+
switch (attributeType.uri) {
|
|
68
|
+
case mdm_sdk_1.EntityAttrTypes.tags.uri:
|
|
69
|
+
return react_1.default.createElement(Tags_1.default, { values: values });
|
|
70
|
+
case mdm_sdk_1.EntityAttrTypes.roles.uri: {
|
|
71
|
+
return react_1.default.createElement(Roles_1.default, { values: values });
|
|
72
|
+
}
|
|
73
|
+
default: {
|
|
74
|
+
//startDate, endDate
|
|
75
|
+
var value = __assign(__assign({}, emptyEditorValue.current), { value: values[0] || '' });
|
|
76
|
+
return react_1.default.createElement(Attribute_1.default, __assign({ attributeValue: value, attributeType: attributeType, mode: mode }, otherProps));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
return (react_1.default.createElement(Box_1.default, { className: styles.wrapper },
|
|
81
|
+
react_1.default.createElement(Title_1.default, { label: label, isRequired: isRequired, className: styles.title, attributeType: attributeType }),
|
|
82
|
+
isEditableMode && react_1.default.createElement(CardinalityMessage_1.default, { cardinality: cardinality }),
|
|
83
|
+
isEditableMode && react_1.default.createElement(ErrorMessage_1.default, { message: errorMessage }),
|
|
84
|
+
react_1.default.createElement(Box_1.default, { className: styles.attributesWrapper }, renderValue())));
|
|
85
|
+
};
|
|
86
|
+
exports.default = SpecialRenderer;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
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
|
+
exports.AttributesPager = void 0;
|
|
26
|
+
var react_redux_1 = require("react-redux");
|
|
27
|
+
var re_reselect_1 = __importDefault(require("re-reselect"));
|
|
28
|
+
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
29
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
30
|
+
var AttributesPager_1 = __importDefault(require("./AttributesPager"));
|
|
31
|
+
exports.AttributesPager = AttributesPager_1.default;
|
|
32
|
+
var permanentEmptyArray = [];
|
|
33
|
+
var cachedErrorsSelector = re_reselect_1.default(mdm_module_1.default.selectors.getProfileErrors, function (_, _a) {
|
|
34
|
+
var parentUri = _a.parentUri;
|
|
35
|
+
return parentUri;
|
|
36
|
+
}, function (_, _a) {
|
|
37
|
+
var attributeType = _a.attributeType;
|
|
38
|
+
return attributeType;
|
|
39
|
+
}, function (errors, parentUri, attributeType) {
|
|
40
|
+
var pagerErrors = mdm_sdk_1.getAttributePagerActiveErrors(parentUri, attributeType, errors);
|
|
41
|
+
return pagerErrors.length === 0 ? permanentEmptyArray : pagerErrors;
|
|
42
|
+
})(function (state, _a) {
|
|
43
|
+
var parentUri = _a.parentUri, attributeType = _a.attributeType;
|
|
44
|
+
return parentUri + "-" + attributeType.uri;
|
|
45
|
+
});
|
|
46
|
+
var mapStateToProps = function (state, ownProps) { return ({
|
|
47
|
+
errors: cachedErrorsSelector(state, ownProps),
|
|
48
|
+
errorMessage: mdm_sdk_1.getAttributePagerActiveTypeErrorMessage(ownProps.parentUri, ownProps.attributeType, mdm_module_1.default.selectors.getProfileErrors(state))
|
|
49
|
+
}); };
|
|
50
|
+
var mapDispatchToProps = {
|
|
51
|
+
requestNextPageOfAttributeValues: mdm_module_1.profile.actions.requestNextPageOfAttributeValues,
|
|
52
|
+
onDeactivateError: mdm_module_1.profile.errors.actions.errorDeactivated
|
|
53
|
+
};
|
|
54
|
+
exports.default = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(AttributesPager_1.default);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useStyles = void 0;
|
|
4
|
+
var styles_1 = require("@material-ui/core/styles");
|
|
5
|
+
exports.useStyles = styles_1.makeStyles(function (theme) { return ({
|
|
6
|
+
caption: {
|
|
7
|
+
fontSize: '0.7rem',
|
|
8
|
+
opacity: 0.54
|
|
9
|
+
},
|
|
10
|
+
wrapper: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
flexDirection: 'column',
|
|
13
|
+
alignItems: 'flex-start'
|
|
14
|
+
},
|
|
15
|
+
attributesWrapper: {
|
|
16
|
+
width: '100%',
|
|
17
|
+
marginBottom: '10px'
|
|
18
|
+
},
|
|
19
|
+
link: {
|
|
20
|
+
display: 'flex',
|
|
21
|
+
marginTop: 4
|
|
22
|
+
},
|
|
23
|
+
'svg-icon__root': {
|
|
24
|
+
fontSize: '1rem'
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
fontSize: '12px',
|
|
28
|
+
lineHeight: '14px',
|
|
29
|
+
paddingLeft: '12px',
|
|
30
|
+
paddingBottom: '4px',
|
|
31
|
+
color: theme.palette.text.secondary
|
|
32
|
+
}
|
|
33
|
+
}); });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filterNewValues = void 0;
|
|
4
|
+
var ramda_1 = require("ramda");
|
|
5
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
6
|
+
var filterNewValues = ramda_1.filter(ramda_1.propSatisfies(mdm_sdk_1.isTempUri, 'uri'));
|
|
7
|
+
exports.filterNewValues = filterNewValues;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
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
|
+
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 react_redux_1 = require("react-redux");
|
|
38
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
39
|
+
var ramda_1 = require("ramda");
|
|
40
|
+
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
41
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
42
|
+
var Box_1 = __importDefault(require("@material-ui/core/Box"));
|
|
43
|
+
var BasicView_1 = __importDefault(require("../../../BasicView/BasicView"));
|
|
44
|
+
var FacetViewHeader_1 = __importDefault(require("../../../FacetViewHeader/FacetViewHeader"));
|
|
45
|
+
var AttributesList_1 = __importDefault(require("../AttributesList"));
|
|
46
|
+
var contexts_1 = require("../../../../contexts");
|
|
47
|
+
var attributesView_1 = require("../../helpers/attributesView");
|
|
48
|
+
var styles_1 = require("./styles");
|
|
49
|
+
var AttributesView = function (_a) {
|
|
50
|
+
var _b;
|
|
51
|
+
var className = _a.className, _c = _a.entity, entity = _c === void 0 ? {} : _c, mode = _a.mode, metadata = _a.metadata, _d = _a.caption, caption = _d === void 0 ? '' : _d, _e = _a.excludeUris, excludeUris = _e === void 0 ? [] : _e, _f = _a.includeUris, includeUris = _f === void 0 ? [] : _f;
|
|
52
|
+
var styles = styles_1.useStyles();
|
|
53
|
+
var dispatch = react_redux_1.useDispatch();
|
|
54
|
+
var viewId = react_1.useContext(contexts_1.ViewIdContext);
|
|
55
|
+
var modifiedEntity = react_redux_1.useSelector(function (state) { return mdm_module_1.default.selectors.getModifiedEntity(state, entity.uri) || {}; });
|
|
56
|
+
var filteredAttrTypes = react_1.useMemo(function () { return attributesView_1.getFilteredAttrTypes(metadata, modifiedEntity.type, includeUris, excludeUris); }, [excludeUris, includeUris, metadata, modifiedEntity.type]);
|
|
57
|
+
var onAddAttributes = react_1.useCallback(function (params) {
|
|
58
|
+
return ramda_1.pipe(mdm_module_1.profile.actions.addAttributes, dispatch)(params.map(function (param) { return (__assign(__assign({}, param), { viewId: viewId })); }));
|
|
59
|
+
}, [viewId, dispatch]);
|
|
60
|
+
var onChangeAttribute = react_1.useCallback(function (params) { return ramda_1.pipe(mdm_module_1.profile.actions.modifyAttribute, dispatch)(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, dispatch]);
|
|
61
|
+
var onDeleteAttribute = react_1.useCallback(function (params) { return ramda_1.pipe(mdm_module_1.profile.actions.removeAttribute, dispatch)(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, dispatch]);
|
|
62
|
+
return (react_1.default.createElement(BasicView_1.default, { className: className },
|
|
63
|
+
caption && react_1.default.createElement(FacetViewHeader_1.default, { className: styles.header, title: caption }),
|
|
64
|
+
react_1.default.createElement(Box_1.default, { className: classnames_1.default(styles.attributesContainer, (_b = {}, _b[styles.noCaption] = !caption, _b)) },
|
|
65
|
+
react_1.default.createElement(AttributesList_1.default, { entity: modifiedEntity, attrTypes: filteredAttrTypes, parentUri: modifiedEntity.uri, drawLines: false, mode: mode, showEmptyEditors: mdm_sdk_1.isTempUri(modifiedEntity.uri), crosswalks: modifiedEntity.crosswalks, onAddAttributes: onAddAttributes, onChangeAttribute: onChangeAttribute, onDeleteAttribute: onDeleteAttribute }))));
|
|
66
|
+
};
|
|
67
|
+
exports.default = AttributesView;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
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.AttributesView = void 0;
|
|
7
|
+
var react_redux_1 = require("react-redux");
|
|
8
|
+
var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
|
|
9
|
+
var AttributesView_1 = __importDefault(require("./AttributesView"));
|
|
10
|
+
exports.AttributesView = AttributesView_1.default;
|
|
11
|
+
var mapStateToProps = function (state) { return ({
|
|
12
|
+
metadata: mdm_module_1.default.selectors.getMetadata(state)
|
|
13
|
+
}); };
|
|
14
|
+
exports.default = react_redux_1.connect(mapStateToProps)(AttributesView_1.default);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useStyles = void 0;
|
|
4
|
+
var styles_1 = require("@material-ui/core/styles");
|
|
5
|
+
exports.useStyles = styles_1.makeStyles({
|
|
6
|
+
attributesContainer: {
|
|
7
|
+
padding: '0 16px 16px 16px'
|
|
8
|
+
},
|
|
9
|
+
header: {
|
|
10
|
+
marginBottom: '4px'
|
|
11
|
+
},
|
|
12
|
+
noCaption: {
|
|
13
|
+
paddingTop: '16px'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
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
|
+
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 Button_1 = __importDefault(require("@material-ui/core/Button"));
|
|
39
|
+
var SmallIconButton_1 = __importDefault(require("../../../SmallIconButton/SmallIconButton"));
|
|
40
|
+
var Delete_1 = __importDefault(require("@material-ui/icons/Delete"));
|
|
41
|
+
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
42
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
43
|
+
var styles_1 = require("./styles");
|
|
44
|
+
var ErrorWrapper_1 = __importDefault(require("../../../ErrorWrapper/ErrorWrapper"));
|
|
45
|
+
var AttributesList_1 = __importDefault(require("../AttributesList/AttributesList"));
|
|
46
|
+
var ArrowExpandButton_1 = __importDefault(require("../../../ArrowExpandButton/ArrowExpandButton"));
|
|
47
|
+
var ComplexAttribute = function (_a) {
|
|
48
|
+
var label = _a.label, attributeTypesList = _a.attributeTypesList, attributeType = _a.attributeType, attributeValue = _a.attributeValue, children = _a.children, errors = _a.errors, ownError = _a.ownError, mode = _a.mode, metadata = _a.metadata, crosswalks = _a.crosswalks, lazy = _a.lazy, showEmptyEditors = _a.showEmptyEditors, onAddOneMore = _a.onAddOneMore, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, additionalControlsRenderer = _a.additionalControlsRenderer, hideDeleteButton = _a.hideDeleteButton;
|
|
49
|
+
var styles = styles_1.useStyles();
|
|
50
|
+
var uri = attributeValue.uri;
|
|
51
|
+
var isNew = mdm_sdk_1.isTempUri(uri);
|
|
52
|
+
var _b = react_1.useState(isNew), expanded = _b[0], setExpanded = _b[1];
|
|
53
|
+
var canDelete = react_1.useMemo(function () {
|
|
54
|
+
return mdm_sdk_1.checkCanDeleteAttribute({
|
|
55
|
+
attributeType: attributeType,
|
|
56
|
+
attributeValue: attributeValue,
|
|
57
|
+
mode: mode,
|
|
58
|
+
metadata: metadata,
|
|
59
|
+
isReltioCrosswalk: mdm_sdk_1.isReltioCrosswalk(crosswalks, attributeValue)
|
|
60
|
+
});
|
|
61
|
+
}, [attributeType, attributeValue, mode, metadata, crosswalks]);
|
|
62
|
+
var showDeleteButton = !hideDeleteButton && !!onDeleteAttribute && canDelete;
|
|
63
|
+
var onDeleteThis = function () { return onDeleteAttribute({ uri: uri, attributeType: attributeType, attributeValue: attributeValue }); };
|
|
64
|
+
var hasDescendantsWithErrors = react_1.useMemo(function () { return mdm_sdk_1.hasAttributeDescendantsWithErrors(attributeValue, errors); }, [
|
|
65
|
+
errors,
|
|
66
|
+
attributeValue
|
|
67
|
+
]);
|
|
68
|
+
react_1.useEffect(function () {
|
|
69
|
+
if (hasDescendantsWithErrors) {
|
|
70
|
+
setExpanded(true);
|
|
71
|
+
}
|
|
72
|
+
}, [errors, hasDescendantsWithErrors]);
|
|
73
|
+
var hasAnalyticValue = (attributeTypesList || []).some(function (attributeType) { return mdm_sdk_1.isAnalyticAttribute(attributeType); });
|
|
74
|
+
var attributeListEntity = react_1.useMemo(function () { return ({
|
|
75
|
+
attributes: hasAnalyticValue ? null : attributeValue.value,
|
|
76
|
+
analyticsAttributes: hasAnalyticValue ? attributeValue.value : null
|
|
77
|
+
}); }, [attributeValue, hasAnalyticValue]);
|
|
78
|
+
var errorMessage = mdm_sdk_1.getErrorMessage(ownError) || (hasDescendantsWithErrors && ui_i18n_1.default.text('Has an incorrect value')) || '';
|
|
79
|
+
return lazy ? (react_1.default.createElement(Button_1.default, { variant: "text", color: "primary", onClick: onAddOneMore }, "Create attribute")) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
80
|
+
react_1.default.createElement("div", { className: styles.editor },
|
|
81
|
+
react_1.default.createElement("div", { className: styles.titleContainer },
|
|
82
|
+
react_1.default.createElement(ArrowExpandButton_1.default, { onClick: function () { return setExpanded(function (value) { return !value; }); }, expanded: expanded, className: styles.expandButton }),
|
|
83
|
+
react_1.default.createElement(ErrorWrapper_1.default, { errorMessage: errorMessage },
|
|
84
|
+
react_1.default.createElement("div", { className: styles.label }, label))),
|
|
85
|
+
react_1.default.createElement("div", { className: styles.actions },
|
|
86
|
+
additionalControlsRenderer && additionalControlsRenderer({ attributeType: attributeType, attributeValue: attributeValue }),
|
|
87
|
+
showDeleteButton && react_1.default.createElement(SmallIconButton_1.default, { icon: Delete_1.default, onClick: onDeleteThis, size: "L" }))),
|
|
88
|
+
expanded && (react_1.default.createElement(AttributesList_1.default, { attrTypes: attributeTypesList, entity: attributeListEntity, showEmptyEditors: showEmptyEditors || isNew, drawLines: true, parentUri: uri, mode: mode, crosswalks: crosswalks, onAddAttributes: onAddAttributes, onChangeAttribute: onChangeAttribute, onDeleteAttribute: onDeleteAttribute, additionalControlsRenderer: additionalControlsRenderer }, children))));
|
|
89
|
+
};
|
|
90
|
+
ComplexAttribute.propTypes = __assign({ label: prop_types_1.default.string, children: prop_types_1.default.node, attributeTypesList: prop_types_1.default.arrayOf(mdm_sdk_1.AttributeTypeType), attributeValue: prop_types_1.default.oneOfType([mdm_sdk_1.NestedAttributeValueType, mdm_sdk_1.ReferenceAttributeValueType]) }, mdm_sdk_1.ComplexAttributeType);
|
|
91
|
+
exports.default = ComplexAttribute;
|