fix(ui): restore frontend verification after eslint cleanup
- Reader and metadata typing: - align ebook and cbx reader event, progress, dialog, and helper types with the stricter checks surfaced by the ESLint cleanup - replace unsafe non-null assertions and broad event assumptions with guarded access in reader, metadata, and shelf flows - Template and component compatibility: - tighten menu item typing for Angular template checking and normalize overlay and card click handlers to use explicit DOM event types - repair chart, preferences, and websocket factory typings that broke standalone typecheck and production build validation - Tests: - fix the magic shelf form-array assertion so the frontend test suite compiles cleanly under the stricter checker - Validation: - `just ui check` - `just ui typecheck` - `just ui test`
This commit is contained in:
@@ -15,12 +15,28 @@ import {IconDisplayComponent} from '../../../components/icon-display/icon-displa
|
||||
import {Tooltip} from 'primeng/tooltip';
|
||||
import {IconSelection} from '../../../service/icon-picker.service';
|
||||
import {TranslocoPipe} from '@jsverse/transloco';
|
||||
import {MenuItem, MenuItemCommandEvent} from 'primeng/api';
|
||||
|
||||
type AppMenuItem = MenuItem & {
|
||||
type AppMenuItem = Omit<MenuItem, 'items'> & {
|
||||
items?: AppMenuItem[];
|
||||
label?: string;
|
||||
routerLink?: string[];
|
||||
queryParams?: MenuItem['queryParams'];
|
||||
queryParamsHandling?: MenuItem['queryParamsHandling'];
|
||||
fragment?: string;
|
||||
preserveFragment?: boolean;
|
||||
skipLocationChange?: boolean;
|
||||
replaceUrl?: boolean;
|
||||
state?: MenuItem['state'];
|
||||
target?: string;
|
||||
type?: 'library' | 'magicShelf' | 'shelf' | string;
|
||||
iconType?: string;
|
||||
iconType?: IconSelection['type'];
|
||||
icon?: string;
|
||||
disabled?: boolean;
|
||||
command?: (event: MenuItemCommandEvent) => void;
|
||||
class?: string;
|
||||
menu?: MenuItem[];
|
||||
badgeClass?: string;
|
||||
unhealthy?: boolean;
|
||||
bookCount?: number;
|
||||
hasDropDown?: boolean;
|
||||
@@ -143,7 +159,12 @@ export class AppMenuitemComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
updateActiveStateFromRoute() {
|
||||
const activeRoute = this.router.isActive(this.item.routerLink[0], {
|
||||
const firstRoute = this.item.routerLink?.[0];
|
||||
if (!firstRoute) {
|
||||
return;
|
||||
}
|
||||
|
||||
const activeRoute = this.router.isActive(firstRoute, {
|
||||
paths: 'exact',
|
||||
queryParams: 'ignored',
|
||||
matrixParams: 'ignored',
|
||||
|
||||
@@ -3,7 +3,8 @@ import { createRxStompConfig } from './rx-stomp.config';
|
||||
import {AuthService} from '../service/auth.service';
|
||||
|
||||
export function rxStompServiceFactory(authService: AuthService) {
|
||||
const rxStomp = new RxStompService(authService);
|
||||
void authService;
|
||||
const rxStomp = new RxStompService();
|
||||
const stompConfig = createRxStompConfig(authService);
|
||||
rxStomp.configure(stompConfig);
|
||||
return rxStomp;
|
||||
|
||||
Reference in New Issue
Block a user