40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import { DOCUMENT } from '@angular/common';
|
|
import { Component, EventEmitter, Inject, Input, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
import { BaseComponent } from '@common/base/base.component';
|
|
import { ToCEntry } from '../table-of-contents-entry';
|
|
|
|
|
|
@Component({
|
|
selector: 'app-dataset-profile-table-of-contents-internal-section',
|
|
styleUrls: ['./table-of-contents-internal-section.scss'],
|
|
templateUrl: './table-of-contents-internal-section.html'
|
|
})
|
|
export class DatasetProfileTableOfContentsInternalSection extends BaseComponent implements OnInit {
|
|
|
|
@Input() links: ToCEntry[];
|
|
@Output() itemClick = new EventEmitter<ToCEntry>();
|
|
|
|
constructor(
|
|
@Inject(DOCUMENT) private _document: Document) {
|
|
super();
|
|
}
|
|
|
|
|
|
ngOnInit(): void {
|
|
|
|
}
|
|
|
|
ngOnChanges(changes: SimpleChanges) {
|
|
|
|
}
|
|
|
|
itemClicked(item: ToCEntry) {
|
|
//leaf node
|
|
this.itemClick.emit(item);
|
|
}
|
|
|
|
// propagateClickToParent(childIds: ToCEntry[], currentItem: ToCEntry) {
|
|
// childIds.push(currentItem);
|
|
// this.itemClick.emit(childIds);
|
|
// }
|
|
} |