Commits

Samuel authored and Jens Vannerum committed 9ff1a6a6429
taskid 85843 Add a tree to browse hierarchical facets on the search page - overrides
No tags

src/app/shared/vocabulary-treeview/vocabulary-treeview.component.ts

Modified
91 91 @Output() select: EventEmitter<VocabularyEntryDetail> = new EventEmitter<VocabularyEntryDetail>(null);
92 92
93 93 /**
94 94 * A boolean representing if user is authenticated
95 95 */
96 96 private isAuthenticated: Observable<boolean>;
97 97
98 98 /**
99 99 * Array to track all subscriptions and unsubscribe them onDestroy
100 100 */
101 - private subs: Subscription[] = [];
101 + protected subs: Subscription[] = [];
102 102
103 103 /**
104 104 * Initialize instance variables
105 105 *
106 106 * @param {NgbActiveModal} activeModal
107 107 * @param {VocabularyTreeviewService} vocabularyTreeviewService
108 108 * @param {Store<CoreState>} store
109 109 * @param {TranslateService} translate
110 110 */
111 111 constructor(
112 112 public activeModal: NgbActiveModal,
113 - private vocabularyTreeviewService: VocabularyTreeviewService,
114 - private store: Store<CoreState>,
115 - private translate: TranslateService
113 + protected vocabularyTreeviewService: VocabularyTreeviewService,
114 + protected store: Store<CoreState>,
115 + protected translate: TranslateService
116 116 ) {
117 117 this.treeFlattener = new VocabularyTreeFlattener(this.transformer, this.getLevel,
118 118 this.isExpandable, this.getChildren);
119 119
120 120 this.treeControl = new FlatTreeControl<TreeviewFlatNode>(this.getLevel, this.isExpandable);
121 121
122 122 this.dataSource = new VocabularyTreeFlatDataSource(this.treeControl, this.treeFlattener);
123 123 }
124 124
125 125 /**
294 294 ngOnDestroy(): void {
295 295 this.vocabularyTreeviewService.cleanTree();
296 296 this.subs
297 297 .filter((sub) => hasValue(sub))
298 298 .forEach((sub) => sub.unsubscribe());
299 299 }
300 300
301 301 /**
302 302 * Return an id for a given {@link VocabularyEntry}
303 303 */
304 - private getEntryId(entry: VocabularyEntry): string {
304 + protected getEntryId(entry: VocabularyEntry): string {
305 305 return entry.authority || entry.otherInformation.id || undefined;
306 306 }
307 307 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut