@deepkit/desktop-ui
Version:
Library for desktop UI widgets in Angular 10+
54 lines (53 loc) • 2.24 kB
TypeScript
/**
* @reflection never
*/
import { Observable, Subscription } from 'rxjs';
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
import { ActivatedRoute, Router, UrlTree } from '@angular/router';
import type Hammer from 'hammerjs';
export declare function getHammer(): Promise<typeof Hammer | undefined>;
export declare class Electron {
static getRemote(): any;
static getIpc(): any;
static isAvailable(): any;
static getRemoteOrUndefined(): any;
static getProcess(): any;
}
export declare class AsyncEventEmitter<T> extends EventEmitter<T> {
emit(value?: T): void;
subscribe(generatorOrNext?: any, error?: any, complete?: any): Subscription;
}
export declare class ExecutionState {
protected readonly cd: ChangeDetectorRef;
protected readonly func: (...args: any[]) => Promise<any> | any;
running: boolean;
error: string;
constructor(cd: ChangeDetectorRef, func: (...args: any[]) => Promise<any> | any);
execute(...args: any[]): Promise<any>;
}
/**
* Checks if `target` is children of `parent` or if `target` is `parent`.
*/
export declare function isTargetChildOf(target: HTMLElement | EventTarget | null, parent: HTMLElement): boolean;
export declare function isMacOs(): boolean;
export declare function isWindows(): boolean;
/**
* Checks if `target` is children of `parent` or if `target` is `parent`.
*/
export declare function findParentWithClass(start: HTMLElement, className: string): HTMLElement | undefined;
export declare function triggerResize(): void;
export declare function focusWatcher(target: HTMLElement, allowedFocuses?: HTMLElement[], customChecker?: (currentlyFocused: HTMLElement | null) => boolean): Observable<void>;
interface RouteLike {
routerLink?: string | UrlTree | any[];
routerLinkExact?: boolean;
router?: Router;
activatedRoute?: ActivatedRoute;
queryParams?: {
[name: string]: any;
};
}
export declare function isRouteActive(route: RouteLike): boolean;
export declare function redirectScrollableParentsToWindowResize(node: Element, passive?: boolean): () => void;
export declare function getScrollableParents(node: Element): Element[];
export declare function trackByIndex(index: number): number;
export {};