feat: update npm packages

This commit is contained in:
Sergey Andrievskiy 2021-08-06 18:48:35 +03:00 committed by d.strigo
parent f6d9ec88ad
commit 7a22737611
321 changed files with 19716 additions and 84 deletions

View file

@ -0,0 +1,29 @@
import { Injectable } from '@angular/core';
export interface NgxTocElement {
fragment: string;
element: any;
y: number;
setInView(val: boolean);
}
@Injectable()
export class NgxTocStateService {
state: NgxTocElement[] = [];
add(el: NgxTocElement) {
this.state.push(el);
}
remove(el: NgxTocElement) {
this.state = this.state.filter(e => e !== el);
}
list(): NgxTocElement[] {
return this.state;
}
clear() {
this.state = [];
}
}