mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-11 18:56:41 +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
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import Component from '@ember/component';
|
|
import { IDynamicLinkNode } from '@datahub/utils/types/vendor/dynamic-link';
|
|
import { noop } from 'lodash';
|
|
import { action } from '@ember/object';
|
|
// @ts-ignore: Ignore import of compiled template
|
|
import template from '../../templates/components/browser/browse-card';
|
|
import { layout } from '@ember-decorators/component';
|
|
|
|
/**
|
|
* Card component. It is used in the home page of the app to
|
|
* show the different types of entity
|
|
*/
|
|
@layout(template)
|
|
export default class BrowseCard extends Component {
|
|
// Title of the card
|
|
title?: string;
|
|
// Description below the title
|
|
description?: string;
|
|
// It will show a pendulum animation when true embedded in the card
|
|
showSpinner?: boolean;
|
|
// Target link for the user when it clicks the card
|
|
link?: IDynamicLinkNode<unknown, unknown>;
|
|
|
|
/**
|
|
* Externally supplied reference to the host components click handler
|
|
*/
|
|
didClickCard: (e: string) => void = noop;
|
|
|
|
/**
|
|
* Handler to pass the current card name to the external event handler
|
|
*/
|
|
@action
|
|
onClick(): void {
|
|
const { didClickCard, title } = this;
|
|
|
|
didClickCard && title && didClickCard(title);
|
|
}
|
|
}
|