import { Component, Input, Output, EventEmitter, signal, ChangeDetectionStrategy, ElementRef, ViewChild, HostListener, inject } from '@angular/core'; import { CommonModule } from '@angular/common'; import { SearchHistoryService } from '../../core/search/search-history.service'; import { SearchAssistantService, SearchOption } from '../../core/search/search-assistant.service'; type NavigationItem = | { type: 'option'; index: number; option: SearchOption } | { type: 'suggestion'; index: number; value: string } | { type: 'history'; index: number; value: string }; /** * Search query assistant component * Provides popover with search options, suggestions, and history * Based on Obsidian's search interface */ @Component({ selector: 'app-search-query-assistant', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
OR
Either term-term
Exclude"phrase"
Exact matchterm*
Wildcardtag:#todo OR tag:#urgent