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
*/
export interface ITabProperties {
id: Tab;
id: string;
title: string;
component: string;
component?: string;
contentComponent?: string;
tablistMenuComponent?: string;
lazyRender?: boolean;

View File

@ -1,5 +1,5 @@
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';
/**
@ -13,6 +13,7 @@ export interface IPersonEntitySpecificConfigs {
isConnectedToLinkedin?: boolean;
isConnectedToSlack?: boolean;
};
tablistMenuProperties: Record<string, Array<ITabProperties>>;
};
}
@ -27,10 +28,10 @@ export const getRenderProps = (): IEntityRenderProps => {
return {
entityPage: {
tabIds,
route: 'user.profile',
tabProperties: getTabPropertiesFor(tabIds),
defaultTab: Tab.Metadata,
attributePlaceholder: '',
route: 'user.profile'
defaultTab: Tab.UserOwnership,
attributePlaceholder: ''
},
// Placeholder information
search: {
@ -81,6 +82,7 @@ export const getPersonEntitySpecificRenderProps = (): IPersonEntitySpecificConfi
userProfilePage: {
headerProperties: {
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 { layout } from '@ember-decorators/component';
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