@dotglitch/ngx-common
Version:
Angular components and utilities that are commonly used.
39 lines (38 loc) • 1.67 kB
TypeScript
import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';
import { NgScrollbar } from 'ngx-scrollbar';
import { CommandAction, CommandPaletteService } from './command-palette.service';
import * as i0 from "@angular/core";
export declare class CommandPaletteComponent implements OnInit {
private readonly commandPalette;
private readonly dialog;
private readonly elementRef;
private readonly changeDetector;
scrollbar: NgScrollbar;
textInput: ElementRef<HTMLInputElement>;
contextElement: HTMLElement;
get el(): HTMLElement;
readonly MAT_ICON_REGEX: RegExp;
queryString: string;
activeIndex: number;
readonly rowHeight = 29;
readonly padding = 6;
commands: CommandAction[];
filteredCommands: CommandAction[];
breadcrumbs: {
action: CommandAction;
commands: CommandAction[];
destroying: boolean;
selectedIndex: number;
}[];
constructor(commandPalette: CommandPaletteService, dialog: MatDialogRef<any>, elementRef: ElementRef, changeDetector: ChangeDetectorRef, data: any);
ngOnInit(): void;
onKeyDown(evt: KeyboardEvent): void;
private filterResults;
setCommandList(commands: CommandAction[]): void;
private focusRow;
executeCommand(command: CommandAction): void;
onBlur(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<CommandPaletteComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<CommandPaletteComponent, "ngx-command-palette", never, { "contextElement": { "alias": "contextElement"; "required": false; }; }, {}, never, never, true, never>;
}