mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-10 18:26:24 +00:00

* Releases updated version of datahub-web client UI code * Fix typo in yarn lock * Change yarn lock to match yarn registry directories * Previous commit missed some paths * Even more changes to yarnlock missing in previous commit * Include codegen file for typings * Add files to get parity for datahub-web and current OS datahub-midtier * Add in typo fix from previous commit - change to proper license * Implement proper OS fix for person entity picture url * Workarounds for open source DH issues * Fixes institutional memory api and removes unopensourced tabs for datasets * Fixes search dataset deprecation and user search issue as a result of changes * Remove internal only options in the avatar menu
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import Component from '@glimmer/component';
|
|
import { DataModelEntityInstance } from '@datahub/data-models/constants/entity';
|
|
import { IInsightCarouselCardProps } from '@datahub/shared/types/insight/carousel/card';
|
|
import { IConfigurator } from '@datahub/shared/types/configurator/configurator';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
interface IHealthCarouselInsightArgs {
|
|
// options for this insight passed in from the Insight::Carousel
|
|
options?: IInsightCarouselCardProps['options'];
|
|
// The instance of the related DataModelEntity for which this insight is to be retrieved
|
|
entity?: DataModelEntityInstance;
|
|
}
|
|
|
|
/**
|
|
* Health Insight component for rendering within a carousel component wraps the insight metadata
|
|
* components including the container in a portable self-contained component
|
|
* @export
|
|
* @class HealthCarouselInsight
|
|
* @extends {Component<IHealthCarouselInsightArgs>}
|
|
*/
|
|
export default class HealthCarouselInsight extends Component<IHealthCarouselInsightArgs> {
|
|
/**
|
|
* Temporary reference to the configurator service used here for feature flag
|
|
*/
|
|
@service
|
|
configurator!: IConfigurator;
|
|
|
|
/**
|
|
* Guard for Health insight feature
|
|
* @readonly
|
|
*/
|
|
get isHealthInsightEnabled(): boolean {
|
|
return this.configurator.getConfig('useVersion3Health', { useDefault: true, default: false });
|
|
}
|
|
}
|