fixes type annotation information

This commit is contained in:
Seyi Adebajo 2020-01-29 18:01:12 -08:00
parent 70abe852fb
commit 67548c1409
3 changed files with 10 additions and 8 deletions

View File

@ -4,9 +4,9 @@
* @interface ITabProperties * @interface ITabProperties
*/ */
export interface ITabProperties { export interface ITabProperties {
id: Tab; id: string;
title: string; title: string;
component: string; component?: string;
contentComponent?: string; contentComponent?: string;
tablistMenuComponent?: string; tablistMenuComponent?: string;
lazyRender?: boolean; lazyRender?: boolean;

View File

@ -1,5 +1,5 @@
import { IEntityRenderProps } from '@datahub/data-models/types/entity/rendering/entity-render-props'; import { IEntityRenderProps } from '@datahub/data-models/types/entity/rendering/entity-render-props';
import { Tab } from '@datahub/data-models/constants/entity/shared/tabs'; import { Tab, ITabProperties } from '@datahub/data-models/constants/entity/shared/tabs';
import { getTabPropertiesFor } from '@datahub/data-models/entity/utils'; import { getTabPropertiesFor } from '@datahub/data-models/entity/utils';
/** /**
@ -13,6 +13,7 @@ export interface IPersonEntitySpecificConfigs {
isConnectedToLinkedin?: boolean; isConnectedToLinkedin?: boolean;
isConnectedToSlack?: boolean; isConnectedToSlack?: boolean;
}; };
tablistMenuProperties: Record<string, Array<ITabProperties>>;
}; };
} }
@ -27,10 +28,10 @@ export const getRenderProps = (): IEntityRenderProps => {
return { return {
entityPage: { entityPage: {
tabIds, tabIds,
route: 'user.profile',
tabProperties: getTabPropertiesFor(tabIds), tabProperties: getTabPropertiesFor(tabIds),
defaultTab: Tab.Metadata, defaultTab: Tab.UserOwnership,
attributePlaceholder: '', attributePlaceholder: ''
route: 'user.profile'
}, },
// Placeholder information // Placeholder information
search: { search: {
@ -81,6 +82,7 @@ export const getPersonEntitySpecificRenderProps = (): IPersonEntitySpecificConfi
userProfilePage: { userProfilePage: {
headerProperties: { headerProperties: {
showExternalProfileLink: false showExternalProfileLink: false
} },
tablistMenuProperties: {}
} }
}); });

View File

@ -3,7 +3,7 @@ import Component from '@ember/component';
import template from '../../../../templates/components/user/containers/tablist/entity-ownership'; import template from '../../../../templates/components/user/containers/tablist/entity-ownership';
import { layout } from '@ember-decorators/component'; import { layout } from '@ember-decorators/component';
import { alias } from '@ember/object/computed'; import { alias } from '@ember/object/computed';
import { ITabProperties } from '@datahub/data-models/types/entity/rendering/entity-render-props'; import { ITabProperties } from '@datahub/data-models/constants/entity/shared/tabs';
/** /**
* This is the tablist menu component that we use to show the tablist items for the user entity * This is the tablist menu component that we use to show the tablist items for the user entity