Lint fixes
This commit is contained in:
@@ -33,7 +33,7 @@ export class AppComponent implements OnInit {
|
||||
});
|
||||
|
||||
this.rxStompService.watch('/topic/log').subscribe((message: Message) => {
|
||||
let logNotification = parseLogNotification(message.body);
|
||||
const logNotification = parseLogNotification(message.body);
|
||||
this.eventService.handleIncomingLog(logNotification);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ export class BookBrowserComponent implements OnInit {
|
||||
entityType: EntityType | undefined;
|
||||
bookTitle: string = '';
|
||||
entityOptions: MenuItem[] | undefined;
|
||||
selectedBooks: Set<number> = new Set();
|
||||
selectedBooks = new Set<number>();
|
||||
selectedSort: SortOption | null = null;
|
||||
sortOptions: SortOption[] = [];
|
||||
isDrawerVisible: boolean = false;
|
||||
|
||||
@@ -23,7 +23,7 @@ import {SortOption} from '../../../model/sort.model';
|
||||
})
|
||||
export class BookTableComponent implements OnChanges {
|
||||
selectedBooks: Book[] = [];
|
||||
selectedBookIds: Set<number> = new Set();
|
||||
selectedBookIds = new Set<number>();
|
||||
|
||||
@Output() selectedBooksChange = new EventEmitter<Set<number>>();
|
||||
@Input() books: Book[] = [];
|
||||
@@ -34,7 +34,7 @@ export class BookTableComponent implements OnChanges {
|
||||
|
||||
// Hack to set virtual-scroller height
|
||||
ngOnChanges() {
|
||||
let wrapperElements: HTMLCollection = document.getElementsByClassName('p-virtualscroller');
|
||||
const wrapperElements: HTMLCollection = document.getElementsByClassName('p-virtualscroller');
|
||||
Array.prototype.forEach.call(wrapperElements, function (wrapperElement) {
|
||||
wrapperElement.style["height"] = 'calc(100vh - 160px)';
|
||||
});
|
||||
|
||||
@@ -42,7 +42,7 @@ export class ShelfAssignerComponent implements OnInit {
|
||||
selectedShelves: Shelf[] = [];
|
||||
displayShelfDialog: boolean = false;
|
||||
shelfName: string = '';
|
||||
bookIds: Set<number> = new Set();
|
||||
bookIds = new Set<number>();
|
||||
isMultiBooks: boolean = false;
|
||||
selectedIcon: string | null = null;
|
||||
|
||||
@@ -92,7 +92,7 @@ export class ShelfAssignerComponent implements OnInit {
|
||||
}
|
||||
|
||||
updateBooksShelves(): void {
|
||||
const idsToAssign: Set<number | undefined> = new Set(this.selectedShelves.map(shelf => shelf.id));
|
||||
const idsToAssign = new Set<number | undefined>(this.selectedShelves.map(shelf => shelf.id));
|
||||
const idsToUnassign: Set<number> = this.isMultiBooks ? new Set() : this.getIdsToUnAssign(this.book, idsToAssign);
|
||||
const bookIds = this.isMultiBooks ? this.bookIds : new Set([this.book.id]);
|
||||
this.updateBookShelves(bookIds, idsToAssign, idsToUnassign);
|
||||
|
||||
@@ -105,7 +105,7 @@ export class LayoutService {
|
||||
|
||||
changeTheme() {
|
||||
const config = this.config();
|
||||
const themeLink = <HTMLLinkElement>document.getElementById('theme-css');
|
||||
const themeLink = document.getElementById('theme-css') as HTMLLinkElement;
|
||||
const themeLinkHref = themeLink.getAttribute('href')!;
|
||||
const newHref = themeLinkHref
|
||||
.split('/')
|
||||
@@ -122,8 +122,8 @@ export class LayoutService {
|
||||
}
|
||||
replaceThemeLink(href: string) {
|
||||
const id = 'theme-css';
|
||||
let themeLink = <HTMLLinkElement>document.getElementById(id);
|
||||
const cloneLinkElement = <HTMLLinkElement>themeLink.cloneNode(true);
|
||||
const themeLink = document.getElementById(id) as HTMLLinkElement;
|
||||
const cloneLinkElement = themeLink.cloneNode(true) as HTMLLinkElement;
|
||||
|
||||
cloneLinkElement.setAttribute('href', href);
|
||||
cloneLinkElement.setAttribute('id', id + '-clone');
|
||||
|
||||
@@ -116,7 +116,7 @@ export class AppMenuitemComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
updateActiveStateFromRoute() {
|
||||
let activeRoute = this.router.isActive(this.item.routerLink[0], {
|
||||
const activeRoute = this.router.isActive(this.item.routerLink[0], {
|
||||
paths: 'exact',
|
||||
queryParams: 'ignored',
|
||||
matrixParams: 'ignored',
|
||||
|
||||
+3
-5
@@ -1,5 +1,5 @@
|
||||
import {CommonModule, isPlatformBrowser} from '@angular/common';
|
||||
import {Component, computed, inject, PLATFORM_ID} from '@angular/core';
|
||||
import {Component, computed, inject, PLATFORM_ID, OnInit} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {$t, updatePreset, updateSurfacePalette} from '@primeng/themes';
|
||||
import Aura from '@primeng/themes/aura';
|
||||
@@ -14,9 +14,7 @@ import {SelectButton} from 'primeng/selectbutton';
|
||||
import {ToggleSwitchModule} from 'primeng/toggleswitch';
|
||||
import {AppConfigService} from '../../../core/service/app-config.service';
|
||||
|
||||
interface ColorPalette {
|
||||
[key: string]: string;
|
||||
}
|
||||
type ColorPalette = Record<string, string>;
|
||||
|
||||
interface Palette {
|
||||
name: string;
|
||||
@@ -39,7 +37,7 @@ const presets = {
|
||||
},
|
||||
imports: [CommonModule, FormsModule, InputSwitchModule, ButtonModule, RadioButtonModule, SelectButton, ToggleSwitchModule]
|
||||
})
|
||||
export class ThemeConfiguratorComponent {
|
||||
export class ThemeConfiguratorComponent implements OnInit {
|
||||
|
||||
get ripple() {
|
||||
return this.config.ripple();
|
||||
|
||||
+2
-2
@@ -40,8 +40,8 @@ export class MetadataPickerComponent implements OnInit {
|
||||
currentBookId!: number;
|
||||
updateThumbnailUrl: boolean = false;
|
||||
thumbnailSaved: boolean = false;
|
||||
copiedFields: { [key: string]: boolean } = {};
|
||||
savedFields: { [key: string]: boolean } = {};
|
||||
copiedFields: Record<string, boolean> = {};
|
||||
savedFields: Record<string, boolean> = {};
|
||||
|
||||
constructor(private bookService: BookService,
|
||||
private bookInfoService: BookMetadataCenterService,
|
||||
|
||||
@@ -2,8 +2,8 @@ export interface BookMetadataBI {
|
||||
bookId: number;
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
authors: Array<string>;
|
||||
categories: Array<string>;
|
||||
authors: string[];
|
||||
categories: string[];
|
||||
publisher: string;
|
||||
publishedDate: string;
|
||||
isbn10: string;
|
||||
|
||||
Reference in New Issue
Block a user