import * as React from 'react'; import { FolderOutlined } from '@ant-design/icons'; import { Container, EntityType, SearchResult } from '../../../types.generated'; import { Entity, IconStyleType, PreviewType } from '../Entity'; import { Preview } from './preview/Preview'; import { EntityProfile } from '../shared/containers/profile/EntityProfile'; import { DocumentationTab } from '../shared/tabs/Documentation/DocumentationTab'; import { SidebarAboutSection } from '../shared/containers/profile/sidebar/SidebarAboutSection'; import { SidebarOwnerSection } from '../shared/containers/profile/sidebar/Ownership/SidebarOwnerSection'; import { getDataForEntityType } from '../shared/containers/profile/utils'; import { useGetContainerQuery } from '../../../graphql/container.generated'; import { ContainerEntitiesTab } from './ContainerEntitiesTab'; import { SidebarRecommendationsSection } from '../shared/containers/profile/sidebar/Recommendations/SidebarRecommendationsSection'; import { SidebarTagsSection } from '../shared/containers/profile/sidebar/SidebarTagsSection'; import { PropertiesTab } from '../shared/tabs/Properties/PropertiesTab'; import { SidebarDomainSection } from '../shared/containers/profile/sidebar/Domain/SidebarDomainSection'; import { EntityMenuItems } from '../shared/EntityDropdown/EntityDropdown'; /** * Definition of the DataHub Container entity. */ export class ContainerEntity implements Entity { type: EntityType = EntityType.Container; icon = (fontSize: number, styleType: IconStyleType) => { if (styleType === IconStyleType.TAB_VIEW) { return ; } if (styleType === IconStyleType.HIGHLIGHT) { return ; } if (styleType === IconStyleType.SVG) { return ( ); } return ( ); }; isSearchEnabled = () => true; isBrowseEnabled = () => false; isLineageEnabled = () => false; getAutoCompleteFieldName = () => 'name'; getPathName = () => 'container'; getEntityName = () => 'Container'; getCollectionName = () => 'Containers'; renderProfile = (urn: string) => ( ); renderPreview = (_: PreviewType, data: Container) => { return ( ); }; renderSearch = (result: SearchResult) => { const data = result.entity as Container; return ( ); }; displayName = (data: Container) => { return data?.properties?.name || data?.urn; }; getOverridePropertiesFromEntity = (data: Container) => { return { name: this.displayName(data), entityCount: data.entities?.total, }; }; getGenericEntityProperties = (data: Container) => { return getDataForEntityType({ data, entityType: this.type, getOverrideProperties: this.getOverridePropertiesFromEntity, }); }; }