import { OnInit, ElementRef } from '@angular/core'; import { CfCoreBusinessComponent } from '../core-business/core-business.component'; import { NewsCardModel } from '../../models/card/news-card.model'; import { NewsService } from '../../services/news.service'; import { MapModelsService } from '../../services/map-models.service'; import { ListModel } from '../../models/list/list.model'; import { NewsComponentModel } from '../../models/news-component.model'; import { ToolbarModel } from '../../models/toolbar/toolbar.model'; /** *
The news is created based on the news Card class (see /models/card).
*Example of using the component:
***/ export declare class CfNewsComponent extends CfCoreBusinessComponent implements OnInit { elementRef: ElementRef; private newsService; private mappingService; /** *<cf-news></cf-news>*
An array of NewsCardModel to be bound to then News-Card component.
*/ news: NewsCardModel[]; /** *The settings of the news Component passed from the user.
*/ settings: NewsComponentModel; /** *The list object that is bound to the html template.
*/ myList: ListModel; /** *An array of image settings created internally on initialize based on the source channels thta the user passed.
*/ imageSettings: Object[]; toolbarProperties: {}; newsToolbar: ToolbarModel; /** *It is the constructor for the news component.
*It has the news service and the mapping services as injectables.
*/ constructor(elementRef: ElementRef, newsService: NewsService, mappingService: MapModelsService); ngOnInit(): void; /** *This function is activated when the user switch channels in the cf-select component.
*It calls the news service and maps the returned news to the NewsCardModel by calling the mapToNewsCard Method.
*/ changeChannel(newChannel: string): void; /** *This function maps the object sent as a paramter to the NewsCardModel by calling the map method in the mapping service and providing the respective amppings/
*/ mapToNewsCard(newsArticles: Object[], sourceChannel: string): void; /** *This function is called when the user pressed on a list item. It opens a new window with the respective url.
* @param $eventThe name of the channel that the user pressed on.
*/ readMore($event: any): void; getClass(selected: boolean): "selected" | "not-selected"; }