@memberjunction/ng-search 6.2.0-edge.0 → 6.2.0-edge.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/search-composite.component.d.ts +10 -2
- package/dist/lib/search-composite.component.d.ts.map +1 -1
- package/dist/lib/search-composite.component.js +33 -17
- package/dist/lib/search-composite.component.js.map +1 -1
- package/dist/lib/search-input.component.d.ts +6 -2
- package/dist/lib/search-input.component.d.ts.map +1 -1
- package/dist/lib/search-input.component.js +19 -11
- package/dist/lib/search-input.component.js.map +1 -1
- package/dist/lib/search-overlay.component.d.ts +12 -2
- package/dist/lib/search-overlay.component.d.ts.map +1 -1
- package/dist/lib/search-overlay.component.js +39 -19
- package/dist/lib/search-overlay.component.js.map +1 -1
- package/dist/lib/search-suggest.component.d.ts +8 -0
- package/dist/lib/search-suggest.component.d.ts.map +1 -1
- package/dist/lib/search-suggest.component.js +30 -14
- package/dist/lib/search-suggest.component.js.map +1 -1
- package/package.json +9 -9
|
@@ -380,7 +380,7 @@ export class SearchSuggestComponent {
|
|
|
380
380
|
SelectHighlighted() {
|
|
381
381
|
if (this.HighlightedIndex < 0)
|
|
382
382
|
return;
|
|
383
|
-
if (this.
|
|
383
|
+
if (this.ShowRecentSection) {
|
|
384
384
|
// Navigating recent searches
|
|
385
385
|
const visibleRecent = this.VisibleRecentSearches;
|
|
386
386
|
if (this.HighlightedIndex < visibleRecent.length) {
|
|
@@ -388,9 +388,9 @@ export class SearchSuggestComponent {
|
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
if (this.
|
|
391
|
+
if (this.ShowRecentRecordsSection) {
|
|
392
392
|
// Navigating recently opened records (indexes continue after recents)
|
|
393
|
-
const offset = this.
|
|
393
|
+
const offset = this.ShowRecentSection ? this.VisibleRecentSearches.length : 0;
|
|
394
394
|
const recordIndex = this.HighlightedIndex - offset;
|
|
395
395
|
const visibleRecords = this.VisibleRecentRecords;
|
|
396
396
|
if (recordIndex >= 0 && recordIndex < visibleRecords.length) {
|
|
@@ -398,9 +398,9 @@ export class SearchSuggestComponent {
|
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
if (this.
|
|
401
|
+
if (this.ShowPreviewSection) {
|
|
402
402
|
// Navigating preview results
|
|
403
|
-
const offset = this.
|
|
403
|
+
const offset = this.ShowRecentSection ? this.VisibleRecentSearches.length : 0;
|
|
404
404
|
const resultIndex = this.HighlightedIndex - offset;
|
|
405
405
|
const visibleResults = this.VisiblePreviewResults;
|
|
406
406
|
if (resultIndex >= 0 && resultIndex < visibleResults.length) {
|
|
@@ -408,7 +408,7 @@ export class SearchSuggestComponent {
|
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
410
410
|
// "See all" footer
|
|
411
|
-
if (resultIndex === visibleResults.length && this.
|
|
411
|
+
if (resultIndex === visibleResults.length && this.ShowSeeAllFooter) {
|
|
412
412
|
this.OnSeeAllClick();
|
|
413
413
|
}
|
|
414
414
|
}
|
|
@@ -425,24 +425,40 @@ export class SearchSuggestComponent {
|
|
|
425
425
|
}
|
|
426
426
|
// --- Template getters ---
|
|
427
427
|
/** Whether to show recent searches section */
|
|
428
|
-
get
|
|
428
|
+
get ShowRecentSection() {
|
|
429
429
|
return this.ShowRecent && this.Query.length < this.MinQueryLength && this.RecentSearches.length > 0;
|
|
430
430
|
}
|
|
431
|
+
/** @deprecated Use {@link ShowRecentSection}. */
|
|
432
|
+
get showRecentSection() {
|
|
433
|
+
return this.ShowRecentSection;
|
|
434
|
+
}
|
|
431
435
|
/** Whether to show preview results section */
|
|
432
|
-
get
|
|
436
|
+
get ShowPreviewSection() {
|
|
433
437
|
return this.Query.length >= this.MinQueryLength;
|
|
434
438
|
}
|
|
439
|
+
/** @deprecated Use {@link ShowPreviewSection}. */
|
|
440
|
+
get showPreviewSection() {
|
|
441
|
+
return this.ShowPreviewSection;
|
|
442
|
+
}
|
|
435
443
|
/** Whether to show the recently-opened-records section (idle state only) */
|
|
436
|
-
get
|
|
444
|
+
get ShowRecentRecordsSection() {
|
|
437
445
|
return this.Query.length < this.MinQueryLength && this.RecentRecords.length > 0;
|
|
438
446
|
}
|
|
447
|
+
/** @deprecated Use {@link ShowRecentRecordsSection}. */
|
|
448
|
+
get showRecentRecordsSection() {
|
|
449
|
+
return this.ShowRecentRecordsSection;
|
|
450
|
+
}
|
|
439
451
|
/** Visible recently opened records (capped at 3) */
|
|
440
452
|
get VisibleRecentRecords() {
|
|
441
453
|
return this.RecentRecords.slice(0, 3);
|
|
442
454
|
}
|
|
443
455
|
/** Whether to show the "See all N results" footer */
|
|
456
|
+
get ShowSeeAllFooter() {
|
|
457
|
+
return this.ShowPreviewSection && this.TotalCount > 0;
|
|
458
|
+
}
|
|
459
|
+
/** @deprecated Use {@link ShowSeeAllFooter}. */
|
|
444
460
|
get showSeeAllFooter() {
|
|
445
|
-
return this.
|
|
461
|
+
return this.ShowSeeAllFooter;
|
|
446
462
|
}
|
|
447
463
|
/** Visible recent searches (capped at 5) */
|
|
448
464
|
get VisibleRecentSearches() {
|
|
@@ -531,15 +547,15 @@ export class SearchSuggestComponent {
|
|
|
531
547
|
// --- Private ---
|
|
532
548
|
getNavigableItemCount() {
|
|
533
549
|
let count = 0;
|
|
534
|
-
if (this.
|
|
550
|
+
if (this.ShowRecentSection) {
|
|
535
551
|
count += this.VisibleRecentSearches.length;
|
|
536
552
|
}
|
|
537
|
-
if (this.
|
|
553
|
+
if (this.ShowRecentRecordsSection) {
|
|
538
554
|
count += this.VisibleRecentRecords.length;
|
|
539
555
|
}
|
|
540
|
-
if (this.
|
|
556
|
+
if (this.ShowPreviewSection) {
|
|
541
557
|
count += this.VisiblePreviewResults.length;
|
|
542
|
-
if (this.
|
|
558
|
+
if (this.ShowSeeAllFooter) {
|
|
543
559
|
count += 1; // "See all" item
|
|
544
560
|
}
|
|
545
561
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-suggest.component.js","sourceRoot":"","sources":["../../src/lib/search-suggest.component.ts","../../src/lib/search-suggest.component.html"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACH,SAAS,EACT,YAAY,EACZ,KAAK,EAEL,MAAM,EACN,iBAAiB,EACjB,MAAM,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;;;;;;IClBnD,8BAA6B;IACzB,uBAAgE;IAChE,4BAAM;IAAA,4BAAY;IACtB,AADsB,iBAAO,EACvB;;;;IAcE,+BAKC;IADG,AADA,gOAAa,+BAAqB,wBAAE,uBAAuB,KAAC,kRACzB;IAEnC,wBAAmD;IACnD,gCAAgC;IAAA,YAAkB;IAAA,iBAAO;IACzD,gCAAgC;IAAA,YAAgC;IACpE,AADoE,iBAAO,EACrE;;;;;IAPF,+EAAmD;IAKnB,eAAkB;IAAlB,qCAAkB;IAClB,eAAgC;IAAhC,4DAAgC;;;;IAhBxE,AADJ,8BAA6B,aACW;IAChC,uBAAsD;IACtD,4BAAM;IAAA,+BAAe;IAAA,iBAAO;IAC5B,iCAEyC;IAArC,AADA,6IAAa,uBAAuB,IAAC,kMAC5B,iCAA0B,KAAC;IAAC,qBAAK;IAClD,AADkD,iBAAS,EACrD;IACN,sHAWC;IACL,iBAAM;;;IAZF,eAWC;IAXD,2CAWC;;;;IAYG,+BAKC;IADG,AADA,gOAAa,qCAA2B,wBAAE,uBAAuB,KAAC,kUACmB,CAAC,sBAAM;IAE5F,wBAAwD;IACxD,gCAAgC;IAAA,YAAuB;IAAA,iBAAO;IAC9D,gCAAgC;IAAA,YAAmD;IACvF,AADuF,iBAAO,EACxF;;;;;IAPF,sJAA4G;IAK5E,eAAuB;IAAvB,0CAAuB;IACvB,eAAmD;IAAnD,yEAA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CAAC,aAAa,EAAE,CAAC;4BAC7B,CAAC;wBACL,CAAC;gBACL,CAAC;YACT,CAAC,CAAC,CAAC;QACP,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,gDAAgD,EAAE,GAAG,CAAC,CAAC;QACzE,CAAC;IACL,CAAC;IAEO,0BAA0B,CAAC,OAAe;QAC9C,IAAI,CAAC;YACD,cAAc,CAAC,QAAQ,CAAC,mBAAmB,CAAC,yBAAyB,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5F,CAAC;QAAC,MAAM,CAAC;YACL,gDAAgD;QACpD,CAAC;IACL,CAAC;gHAjWQ,sBAAsB;6DAAtB,sBAAsB;YCnCnC,wFAAc;;YAAd,qCA4JC;;;iFDzHY,sBAAsB;cANlC,SAAS;6BACM,KAAK,YACP,mBAAmB;;kBAU5B,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAQL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kFA3EE,sBAAsB","sourcesContent":["/**\n * @fileoverview Search Suggest Component\n *\n * Autocomplete dropdown showing preview results and recent searches.\n * Supports keyboard navigation (up/down/enter) for accessibility.\n * Designed to be paired with SearchInputComponent via SearchCompositeComponent.\n */\n\nimport {\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ChangeDetectorRef,\n inject\n} from '@angular/core';\nimport { StartupManager } from '@memberjunction/core';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\nimport { SearchResultItem, RecentRecordItem } from './search-types';\nimport { RecentSearch } from './search.service';\nimport { MJEventType, MJGlobal } from '@memberjunction/global';\n\n/** User setting key for persisting the preview min relevance threshold */\nconst PREVIEW_MIN_RELEVANCE_KEY = 'search.previewMinRelevance';\n\n/** Preset options for the min relevance filter */\nconst MIN_RELEVANCE_OPTIONS = [0, 15, 30, 50, 70];\n\n@Component({\n standalone: false,\n selector: 'mj-search-suggest',\n templateUrl: './search-suggest.component.html',\n styleUrls: ['./search-suggest.component.css']\n})\nexport class SearchSuggestComponent implements OnInit {\n private cdr = inject(ChangeDetectorRef);\n\n // --- Configuration Inputs ---\n\n /** Whether the suggest dropdown is visible */\n @Input() IsOpen = false;\n\n /** Preview search results to display */\n @Input() PreviewResults: SearchResultItem[] = [];\n\n /** Recent search entries to show when query is empty/short */\n @Input() RecentSearches: RecentSearch[] = [];\n\n /** Total count of results for the current query (may exceed PreviewResults.length) */\n @Input() TotalCount = 0;\n\n /** Whether a search is currently loading */\n @Input() IsLoading = false;\n\n /** Current query text — used to determine whether to show recent vs preview */\n @Input() Query = '';\n\n /** Minimum query length before preview results are shown */\n @Input() MinQueryLength = 2;\n\n /** Maximum number of preview results to display */\n @Input() MaxPreviewResults = 8;\n\n /** Whether to show the recent searches section */\n @Input() ShowRecent = true;\n\n /**\n * Recently opened records (host-loaded, e.g. from SearchService\n * .GetRecentlyOpenedRecords). Rendered as a \"Recently Opened\" section in\n * the idle/empty state so users can jump straight back to a record they\n * just had open — the complement to Recent Searches (queries).\n */\n @Input() RecentRecords: RecentRecordItem[] = [];\n\n /**\n * Optional promo row pinned to the dropdown's bottom edge — a host-supplied\n * nudge (e.g. Explorer advertising its command palette). The component is\n * deliberately ignorant of WHAT is being promoted; the host provides the\n * copy and handles both outcomes.\n */\n @Input() ShowPromo = false;\n\n /** Promo copy (one sentence). Required when ShowPromo is true. */\n @Input() PromoText = '';\n\n /** Label for the promo's accept action. */\n @Input() PromoActionLabel = 'Turn on';\n\n // --- Outputs ---\n\n /** Emitted when the user selects a preview result */\n @Output() ResultSelected = new EventEmitter<SearchResultItem>();\n\n /** Emitted when the user selects a recent search */\n @Output() RecentSelected = new EventEmitter<string>();\n\n /** Emitted when the user clicks \"See all N results\" */\n @Output() SeeAllRequested = new EventEmitter<string>();\n\n /** Emitted when the user clicks \"Clear\" on recent searches */\n @Output() ClearRecentRequested = new EventEmitter<void>();\n\n /** Emitted when the user selects a recently opened record */\n @Output() RecentRecordSelected = new EventEmitter<RecentRecordItem>();\n\n /** Promo accept — carries the current query so the host can hand it off. */\n @Output() PromoAccepted = new EventEmitter<string>();\n\n /** Promo dismissed — the host should persist this and stop showing it. */\n @Output() PromoDismissed = new EventEmitter<void>();\n\n // --- Internal state ---\n\n /** Currently keyboard-highlighted index (-1 for none) */\n public HighlightedIndex = -1;\n\n /** Min relevance percentage (0-100) for filtering preview results */\n public MinRelevancePercent = 0;\n\n /** Whether the filter popover is open */\n public IsFilterOpen = false;\n\n /** Available min relevance presets */\n public readonly MinRelevanceOptions = MIN_RELEVANCE_OPTIONS;\n\n // --- Lifecycle ---\n\n async ngOnInit(): Promise<void> {\n await this.loadMinRelevanceSetting();\n }\n\n // --- Public Methods ---\n\n /** Move keyboard highlight up */\n public NavigateUp(): void {\n const maxIndex = this.getNavigableItemCount() - 1;\n if (maxIndex < 0) return;\n\n this.HighlightedIndex--;\n if (this.HighlightedIndex < 0) {\n this.HighlightedIndex = maxIndex;\n }\n this.cdr.detectChanges();\n }\n\n /** Move keyboard highlight down */\n public NavigateDown(): void {\n const maxIndex = this.getNavigableItemCount() - 1;\n if (maxIndex < 0) return;\n\n this.HighlightedIndex++;\n if (this.HighlightedIndex > maxIndex) {\n this.HighlightedIndex = 0;\n }\n this.cdr.detectChanges();\n }\n\n /** Select the currently highlighted item */\n public SelectHighlighted(): void {\n if (this.HighlightedIndex < 0) return;\n\n if (this.showRecentSection) {\n // Navigating recent searches\n const visibleRecent = this.VisibleRecentSearches;\n if (this.HighlightedIndex < visibleRecent.length) {\n this.OnRecentClick(visibleRecent[this.HighlightedIndex]);\n return;\n }\n }\n\n if (this.showRecentRecordsSection) {\n // Navigating recently opened records (indexes continue after recents)\n const offset = this.showRecentSection ? this.VisibleRecentSearches.length : 0;\n const recordIndex = this.HighlightedIndex - offset;\n const visibleRecords = this.VisibleRecentRecords;\n if (recordIndex >= 0 && recordIndex < visibleRecords.length) {\n this.OnRecentRecordClick(visibleRecords[recordIndex]);\n return;\n }\n }\n\n if (this.showPreviewSection) {\n // Navigating preview results\n const offset = this.showRecentSection ? this.VisibleRecentSearches.length : 0;\n const resultIndex = this.HighlightedIndex - offset;\n const visibleResults = this.VisiblePreviewResults;\n if (resultIndex >= 0 && resultIndex < visibleResults.length) {\n this.OnResultClick(visibleResults[resultIndex]);\n return;\n }\n\n // \"See all\" footer\n if (resultIndex === visibleResults.length && this.showSeeAllFooter) {\n this.OnSeeAllClick();\n }\n }\n }\n\n /** Reset the highlighted index */\n public ResetHighlight(): void {\n this.HighlightedIndex = -1;\n }\n\n /** Number of keyboard-navigable rows currently visible (recents + recently\n opened + preview results + see-all). Public so the composite's Tab\n handling knows when the highlight has walked off the end of the list. */\n public get NavigableItemCount(): number {\n return this.getNavigableItemCount();\n }\n\n // --- Template getters ---\n\n /** Whether to show recent searches section */\n public get showRecentSection(): boolean {\n return this.ShowRecent && this.Query.length < this.MinQueryLength && this.RecentSearches.length > 0;\n }\n\n /** Whether to show preview results section */\n public get showPreviewSection(): boolean {\n return this.Query.length >= this.MinQueryLength;\n }\n\n /** Whether to show the recently-opened-records section (idle state only) */\n public get showRecentRecordsSection(): boolean {\n return this.Query.length < this.MinQueryLength && this.RecentRecords.length > 0;\n }\n\n /** Visible recently opened records (capped at 3) */\n public get VisibleRecentRecords(): RecentRecordItem[] {\n return this.RecentRecords.slice(0, 3);\n }\n\n /** Whether to show the \"See all N results\" footer */\n public get showSeeAllFooter(): boolean {\n return this.showPreviewSection && this.TotalCount > 0;\n }\n\n /** Visible recent searches (capped at 5) */\n public get VisibleRecentSearches(): RecentSearch[] {\n return this.RecentSearches.slice(0, 5);\n }\n\n /** Visible preview results filtered by min relevance, sorted by score descending, capped at MaxPreviewResults */\n public get VisiblePreviewResults(): SearchResultItem[] {\n const minScore = this.MinRelevancePercent / 100;\n return [...this.PreviewResults]\n .filter(r => r.Score >= minScore)\n .sort((a, b) => b.Score - a.Score)\n .slice(0, this.MaxPreviewResults);\n }\n\n // --- Template event handlers ---\n\n /** Handle clicking a preview result */\n public OnResultClick(result: SearchResultItem): void {\n this.ResultSelected.emit(result);\n }\n\n /** Handle clicking a recent search */\n public OnRecentClick(recent: RecentSearch): void {\n this.RecentSelected.emit(recent.Query);\n }\n\n /** Handle clicking a recently opened record */\n public OnRecentRecordClick(record: RecentRecordItem): void {\n this.RecentRecordSelected.emit(record);\n }\n\n /** Handle clicking \"See all\" */\n public OnSeeAllClick(): void {\n this.SeeAllRequested.emit(this.Query);\n }\n\n /** Promo accept — fired on click so keyboard Enter/Space work too; the\n template's mousedown-preventDefault keeps the input from blurring first. */\n public OnPromoAccept(): void {\n this.PromoAccepted.emit(this.Query);\n }\n\n /** Promo dismiss. */\n public OnPromoDismiss(): void {\n this.PromoDismissed.emit();\n }\n\n /** \"Clear\" on recent searches — click-driven so keyboard Enter/Space work;\n the template's mousedown-preventDefault keeps the input from blurring. */\n public OnClearRecentClick(event: MouseEvent): void {\n event.stopPropagation();\n this.ClearRecentRequested.emit();\n }\n\n /** Check if an item at the given index is highlighted */\n public IsHighlighted(index: number): boolean {\n return this.HighlightedIndex === index;\n }\n\n /** Format a score value as a percentage */\n public FormatScore(score: number): string {\n return `${Math.round(score * 100)}%`;\n }\n\n /** Get the CSS class for a score value: high (green), medium (amber), low (gray) */\n public GetScoreClass(score: number): string {\n if (score >= 0.40) return 'suggest-score-high';\n if (score >= 0.15) return 'suggest-score-medium';\n return 'suggest-score-low';\n }\n\n /** Toggle the filter popover */\n public ToggleFilter(event: MouseEvent): void {\n event.stopPropagation();\n event.preventDefault();\n this.IsFilterOpen = !this.IsFilterOpen;\n this.cdr.detectChanges();\n }\n\n /** Set the min relevance and persist */\n public SetMinRelevance(percent: number, event: MouseEvent): void {\n event.stopPropagation();\n event.preventDefault();\n this.MinRelevancePercent = percent;\n this.IsFilterOpen = false;\n this.persistMinRelevanceSetting(percent);\n this.cdr.detectChanges();\n }\n\n /** Whether a given option is the currently selected min relevance */\n public IsSelectedRelevance(percent: number): boolean {\n return this.MinRelevancePercent === percent;\n }\n\n /** Format a relevance option for display */\n public FormatRelevanceOption(percent: number): string {\n return percent === 0 ? 'Show all' : `≥ ${percent}%`;\n }\n\n // --- Private ---\n\n private getNavigableItemCount(): number {\n let count = 0;\n if (this.showRecentSection) {\n count += this.VisibleRecentSearches.length;\n }\n if (this.showRecentRecordsSection) {\n count += this.VisibleRecentRecords.length;\n }\n if (this.showPreviewSection) {\n count += this.VisiblePreviewResults.length;\n if (this.showSeeAllFooter) {\n count += 1; // \"See all\" item\n }\n }\n return count;\n }\n\n private async loadMinRelevanceSetting(): Promise<void> {\n try {\n // Wait for all startup engines (including UserInfoEngine) to finish loading\n MJGlobal.Instance.GetEventListener(true).subscribe( async (event) => {\n switch (event.event) {\n case MJEventType.LoggedIn:\n // Wait for StartupManager to complete before refreshing \n await StartupManager.Instance.Startup();\n\n const engine = UserInfoEngine.Instance;\n const saved = engine.GetSetting(PREVIEW_MIN_RELEVANCE_KEY);\n\n if (saved != null) {\n const parsed = parseInt(saved, 10);\n if (!isNaN(parsed) && parsed >= 0 && parsed <= 100) {\n this.MinRelevancePercent = parsed;\n this.cdr.detectChanges();\n }\n }\n }\n });\n } catch (err) {\n console.error('[SearchSuggest] loadMinRelevanceSetting error:', err);\n }\n }\n\n private persistMinRelevanceSetting(percent: number): void {\n try {\n UserInfoEngine.Instance.SetSettingDebounced(PREVIEW_MIN_RELEVANCE_KEY, String(percent));\n } catch {\n // Silently fail if UserInfoEngine not available\n }\n }\n}\n","@if (IsOpen) {\n <div class=\"suggest-dropdown\">\n @if (IsLoading && showPreviewSection) {\n <div class=\"suggest-loading\">\n <i class=\"fa-solid fa-spinner fa-spin suggest-loading-icon\"></i>\n <span>Searching...</span>\n </div>\n }\n\n <!-- Recent searches section -->\n @if (showRecentSection) {\n <div class=\"suggest-section\">\n <div class=\"suggest-section-header\">\n <i class=\"fa-solid fa-clock suggest-section-icon\"></i>\n <span>Recent Searches</span>\n <button type=\"button\" class=\"suggest-clear-link\" aria-label=\"Clear recent searches\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"OnClearRecentClick($event)\">Clear</button>\n </div>\n @for (recent of VisibleRecentSearches; track recent.Query; let i = $index) {\n <div\n class=\"suggest-item suggest-recent-item\"\n [class.suggest-item-highlighted]=\"IsHighlighted(i)\"\n (mousedown)=\"OnRecentClick(recent); $event.preventDefault()\"\n (mouseenter)=\"HighlightedIndex = i\"\n >\n <i class=\"fa-solid fa-clock suggest-item-icon\"></i>\n <span class=\"suggest-item-text\">{{ recent.Query }}</span>\n <span class=\"suggest-item-meta\">{{ recent.ResultCount }} results</span>\n </div>\n }\n </div>\n }\n\n <!-- Recently opened records section (idle state) -->\n @if (showRecentRecordsSection) {\n <div class=\"suggest-section\">\n <div class=\"suggest-section-header\">\n <i class=\"fa-solid fa-clock-rotate-left suggest-section-icon\"></i>\n <span>Recently Opened</span>\n </div>\n @for (record of VisibleRecentRecords; track record.EntityName + record.RecordID; let i = $index) {\n <div\n class=\"suggest-item suggest-recent-item\"\n [class.suggest-item-highlighted]=\"IsHighlighted((showRecentSection ? VisibleRecentSearches.length : 0) + i)\"\n (mousedown)=\"OnRecentRecordClick(record); $event.preventDefault()\"\n (mouseenter)=\"HighlightedIndex = (showRecentSection ? VisibleRecentSearches.length : 0) + i\"\n >\n <i class=\"fa-solid fa-file-lines suggest-item-icon\"></i>\n <span class=\"suggest-item-text\">{{ record.RecordName }}</span>\n <span class=\"suggest-item-meta\">{{ record.EntityDisplayName || record.EntityName }}</span>\n </div>\n }\n </div>\n }\n\n <!-- Preview results section -->\n @if (showPreviewSection && !IsLoading) {\n @if (VisiblePreviewResults.length > 0) {\n <div class=\"suggest-section\">\n @for (result of VisiblePreviewResults; track result.ID; let i = $index) {\n <div\n class=\"suggest-item suggest-result-item\"\n [class.suggest-item-highlighted]=\"IsHighlighted((showRecentSection ? VisibleRecentSearches.length : 0) + i)\"\n (mousedown)=\"OnResultClick(result); $event.preventDefault()\"\n (mouseenter)=\"HighlightedIndex = (showRecentSection ? VisibleRecentSearches.length : 0) + i\"\n >\n <div class=\"suggest-result-icon\">\n <i [class]=\"result.EntityIcon || result.SourceIcon || 'fa-solid fa-database'\"></i>\n </div>\n <div class=\"suggest-result-body\">\n <div class=\"suggest-result-title\">{{ result.RecordName || result.Title }}</div>\n <div class=\"suggest-result-entity\">{{ result.EntityDisplayName || result.EntityName }}</div>\n </div>\n <span class=\"suggest-result-score\" [class]=\"'suggest-result-score ' + GetScoreClass(result.Score)\">{{ FormatScore(result.Score) }}</span>\n </div>\n }\n </div>\n } @else if (!IsLoading) {\n <div class=\"suggest-empty\">\n <span>No results found</span>\n </div>\n }\n\n <!-- See all footer -->\n @if (showSeeAllFooter) {\n <div\n class=\"suggest-see-all\"\n [class.suggest-item-highlighted]=\"IsHighlighted((showRecentSection ? VisibleRecentSearches.length : 0) + VisiblePreviewResults.length)\"\n (mousedown)=\"OnSeeAllClick(); $event.preventDefault()\"\n (mouseenter)=\"HighlightedIndex = (showRecentSection ? VisibleRecentSearches.length : 0) + VisiblePreviewResults.length\"\n >\n <i class=\"fa-solid fa-arrow-right suggest-see-all-icon\"></i>\n <span>See all {{ TotalCount }} results</span>\n </div>\n }\n }\n\n <!-- Min relevance filter bar -->\n @if (showPreviewSection) {\n <div class=\"suggest-filter-bar\">\n <div class=\"suggest-filter-toggle\" (mousedown)=\"ToggleFilter($event)\">\n <i class=\"fa-solid fa-sliders suggest-filter-icon\"></i>\n <span class=\"suggest-filter-label\">\n @if (MinRelevancePercent > 0) {\n Min relevance: {{ MinRelevancePercent }}%\n } @else {\n Showing all results\n }\n </span>\n <i class=\"fa-solid fa-chevron-down suggest-filter-chevron\" [class.suggest-filter-chevron-open]=\"IsFilterOpen\"></i>\n </div>\n\n @if (IsFilterOpen) {\n <div class=\"suggest-filter-popover\">\n <div class=\"suggest-filter-popover-header\">Min Relevance</div>\n @for (option of MinRelevanceOptions; track option) {\n <div\n class=\"suggest-filter-option\"\n [class.suggest-filter-option-active]=\"IsSelectedRelevance(option)\"\n (mousedown)=\"SetMinRelevance(option, $event)\"\n >\n <span>{{ FormatRelevanceOption(option) }}</span>\n @if (IsSelectedRelevance(option)) {\n <i class=\"fa-solid fa-check suggest-filter-check\"></i>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n\n <!-- Empty state when no recents of either kind and query too short -->\n @if (!showRecentSection && !showRecentRecordsSection && !showPreviewSection) {\n <div class=\"suggest-empty\">\n <span>Type at least {{ MinQueryLength }} characters to search</span>\n </div>\n }\n\n <!-- Host-supplied promo row (e.g. command palette nudge) -->\n @if (ShowPromo && PromoText) {\n <div class=\"suggest-promo\">\n <i class=\"fa-solid fa-wand-magic-sparkles suggest-promo-icon\"></i>\n <span class=\"suggest-promo-text\">{{ PromoText }}</span>\n <button type=\"button\" class=\"suggest-promo-action\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"OnPromoAccept()\">{{ PromoActionLabel }}</button>\n <button type=\"button\" class=\"suggest-promo-dismiss\" aria-label=\"Dismiss\" title=\"Dismiss\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"OnPromoDismiss(); $event.stopPropagation()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n </div>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"search-suggest.component.js","sourceRoot":"","sources":["../../src/lib/search-suggest.component.ts","../../src/lib/search-suggest.component.html"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACH,SAAS,EACT,YAAY,EACZ,KAAK,EAEL,MAAM,EACN,iBAAiB,EACjB,MAAM,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAA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AAI,CAAC,mBAAmB,GAAG,MAAM,CAAC;gCAClC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;4BAC7B,CAAC;wBACL,CAAC;gBACL,CAAC;YACT,CAAC,CAAC,CAAC;QACP,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,gDAAgD,EAAE,GAAG,CAAC,CAAC;QACzE,CAAC;IACL,CAAC;IAEO,0BAA0B,CAAC,OAAe;QAC9C,IAAI,CAAC;YACD,cAAc,CAAC,QAAQ,CAAC,mBAAmB,CAAC,yBAAyB,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5F,CAAC;QAAC,MAAM,CAAC;YACL,gDAAgD;QACpD,CAAC;IACL,CAAC;gHArXQ,sBAAsB;6DAAtB,sBAAsB;YCnCnC,wFAAc;;YAAd,qCA4JC;;;iFDzHY,sBAAsB;cANlC,SAAS;6BACM,KAAK,YACP,mBAAmB;;kBAU5B,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAQL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kFA3EE,sBAAsB","sourcesContent":["/**\n * @fileoverview Search Suggest Component\n *\n * Autocomplete dropdown showing preview results and recent searches.\n * Supports keyboard navigation (up/down/enter) for accessibility.\n * Designed to be paired with SearchInputComponent via SearchCompositeComponent.\n */\n\nimport {\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ChangeDetectorRef,\n inject\n} from '@angular/core';\nimport { StartupManager } from '@memberjunction/core';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\nimport { SearchResultItem, RecentRecordItem } from './search-types';\nimport { RecentSearch } from './search.service';\nimport { MJEventType, MJGlobal } from '@memberjunction/global';\n\n/** User setting key for persisting the preview min relevance threshold */\nconst PREVIEW_MIN_RELEVANCE_KEY = 'search.previewMinRelevance';\n\n/** Preset options for the min relevance filter */\nconst MIN_RELEVANCE_OPTIONS = [0, 15, 30, 50, 70];\n\n@Component({\n standalone: false,\n selector: 'mj-search-suggest',\n templateUrl: './search-suggest.component.html',\n styleUrls: ['./search-suggest.component.css']\n})\nexport class SearchSuggestComponent implements OnInit {\n private cdr = inject(ChangeDetectorRef);\n\n // --- Configuration Inputs ---\n\n /** Whether the suggest dropdown is visible */\n @Input() IsOpen = false;\n\n /** Preview search results to display */\n @Input() PreviewResults: SearchResultItem[] = [];\n\n /** Recent search entries to show when query is empty/short */\n @Input() RecentSearches: RecentSearch[] = [];\n\n /** Total count of results for the current query (may exceed PreviewResults.length) */\n @Input() TotalCount = 0;\n\n /** Whether a search is currently loading */\n @Input() IsLoading = false;\n\n /** Current query text — used to determine whether to show recent vs preview */\n @Input() Query = '';\n\n /** Minimum query length before preview results are shown */\n @Input() MinQueryLength = 2;\n\n /** Maximum number of preview results to display */\n @Input() MaxPreviewResults = 8;\n\n /** Whether to show the recent searches section */\n @Input() ShowRecent = true;\n\n /**\n * Recently opened records (host-loaded, e.g. from SearchService\n * .GetRecentlyOpenedRecords). Rendered as a \"Recently Opened\" section in\n * the idle/empty state so users can jump straight back to a record they\n * just had open — the complement to Recent Searches (queries).\n */\n @Input() RecentRecords: RecentRecordItem[] = [];\n\n /**\n * Optional promo row pinned to the dropdown's bottom edge — a host-supplied\n * nudge (e.g. Explorer advertising its command palette). The component is\n * deliberately ignorant of WHAT is being promoted; the host provides the\n * copy and handles both outcomes.\n */\n @Input() ShowPromo = false;\n\n /** Promo copy (one sentence). Required when ShowPromo is true. */\n @Input() PromoText = '';\n\n /** Label for the promo's accept action. */\n @Input() PromoActionLabel = 'Turn on';\n\n // --- Outputs ---\n\n /** Emitted when the user selects a preview result */\n @Output() ResultSelected = new EventEmitter<SearchResultItem>();\n\n /** Emitted when the user selects a recent search */\n @Output() RecentSelected = new EventEmitter<string>();\n\n /** Emitted when the user clicks \"See all N results\" */\n @Output() SeeAllRequested = new EventEmitter<string>();\n\n /** Emitted when the user clicks \"Clear\" on recent searches */\n @Output() ClearRecentRequested = new EventEmitter<void>();\n\n /** Emitted when the user selects a recently opened record */\n @Output() RecentRecordSelected = new EventEmitter<RecentRecordItem>();\n\n /** Promo accept — carries the current query so the host can hand it off. */\n @Output() PromoAccepted = new EventEmitter<string>();\n\n /** Promo dismissed — the host should persist this and stop showing it. */\n @Output() PromoDismissed = new EventEmitter<void>();\n\n // --- Internal state ---\n\n /** Currently keyboard-highlighted index (-1 for none) */\n public HighlightedIndex = -1;\n\n /** Min relevance percentage (0-100) for filtering preview results */\n public MinRelevancePercent = 0;\n\n /** Whether the filter popover is open */\n public IsFilterOpen = false;\n\n /** Available min relevance presets */\n public readonly MinRelevanceOptions = MIN_RELEVANCE_OPTIONS;\n\n // --- Lifecycle ---\n\n async ngOnInit(): Promise<void> {\n await this.loadMinRelevanceSetting();\n }\n\n // --- Public Methods ---\n\n /** Move keyboard highlight up */\n public NavigateUp(): void {\n const maxIndex = this.getNavigableItemCount() - 1;\n if (maxIndex < 0) return;\n\n this.HighlightedIndex--;\n if (this.HighlightedIndex < 0) {\n this.HighlightedIndex = maxIndex;\n }\n this.cdr.detectChanges();\n }\n\n /** Move keyboard highlight down */\n public NavigateDown(): void {\n const maxIndex = this.getNavigableItemCount() - 1;\n if (maxIndex < 0) return;\n\n this.HighlightedIndex++;\n if (this.HighlightedIndex > maxIndex) {\n this.HighlightedIndex = 0;\n }\n this.cdr.detectChanges();\n }\n\n /** Select the currently highlighted item */\n public SelectHighlighted(): void {\n if (this.HighlightedIndex < 0) return;\n\n if (this.ShowRecentSection) {\n // Navigating recent searches\n const visibleRecent = this.VisibleRecentSearches;\n if (this.HighlightedIndex < visibleRecent.length) {\n this.OnRecentClick(visibleRecent[this.HighlightedIndex]);\n return;\n }\n }\n\n if (this.ShowRecentRecordsSection) {\n // Navigating recently opened records (indexes continue after recents)\n const offset = this.ShowRecentSection ? this.VisibleRecentSearches.length : 0;\n const recordIndex = this.HighlightedIndex - offset;\n const visibleRecords = this.VisibleRecentRecords;\n if (recordIndex >= 0 && recordIndex < visibleRecords.length) {\n this.OnRecentRecordClick(visibleRecords[recordIndex]);\n return;\n }\n }\n\n if (this.ShowPreviewSection) {\n // Navigating preview results\n const offset = this.ShowRecentSection ? this.VisibleRecentSearches.length : 0;\n const resultIndex = this.HighlightedIndex - offset;\n const visibleResults = this.VisiblePreviewResults;\n if (resultIndex >= 0 && resultIndex < visibleResults.length) {\n this.OnResultClick(visibleResults[resultIndex]);\n return;\n }\n\n // \"See all\" footer\n if (resultIndex === visibleResults.length && this.ShowSeeAllFooter) {\n this.OnSeeAllClick();\n }\n }\n }\n\n /** Reset the highlighted index */\n public ResetHighlight(): void {\n this.HighlightedIndex = -1;\n }\n\n /** Number of keyboard-navigable rows currently visible (recents + recently\n opened + preview results + see-all). Public so the composite's Tab\n handling knows when the highlight has walked off the end of the list. */\n public get NavigableItemCount(): number {\n return this.getNavigableItemCount();\n }\n\n // --- Template getters ---\n\n /** Whether to show recent searches section */\n public get ShowRecentSection(): boolean {\n return this.ShowRecent && this.Query.length < this.MinQueryLength && this.RecentSearches.length > 0;\n }\n\n /** @deprecated Use {@link ShowRecentSection}. */\n public get showRecentSection(): boolean {\n return this.ShowRecentSection;\n }\n\n /** Whether to show preview results section */\n public get ShowPreviewSection(): boolean {\n return this.Query.length >= this.MinQueryLength;\n }\n\n /** @deprecated Use {@link ShowPreviewSection}. */\n public get showPreviewSection(): boolean {\n return this.ShowPreviewSection;\n }\n\n /** Whether to show the recently-opened-records section (idle state only) */\n public get ShowRecentRecordsSection(): boolean {\n return this.Query.length < this.MinQueryLength && this.RecentRecords.length > 0;\n }\n\n /** @deprecated Use {@link ShowRecentRecordsSection}. */\n public get showRecentRecordsSection(): boolean {\n return this.ShowRecentRecordsSection;\n }\n\n /** Visible recently opened records (capped at 3) */\n public get VisibleRecentRecords(): RecentRecordItem[] {\n return this.RecentRecords.slice(0, 3);\n }\n\n /** Whether to show the \"See all N results\" footer */\n public get ShowSeeAllFooter(): boolean {\n return this.ShowPreviewSection && this.TotalCount > 0;\n }\n\n /** @deprecated Use {@link ShowSeeAllFooter}. */\n public get showSeeAllFooter(): boolean {\n return this.ShowSeeAllFooter;\n }\n\n /** Visible recent searches (capped at 5) */\n public get VisibleRecentSearches(): RecentSearch[] {\n return this.RecentSearches.slice(0, 5);\n }\n\n /** Visible preview results filtered by min relevance, sorted by score descending, capped at MaxPreviewResults */\n public get VisiblePreviewResults(): SearchResultItem[] {\n const minScore = this.MinRelevancePercent / 100;\n return [...this.PreviewResults]\n .filter(r => r.Score >= minScore)\n .sort((a, b) => b.Score - a.Score)\n .slice(0, this.MaxPreviewResults);\n }\n\n // --- Template event handlers ---\n\n /** Handle clicking a preview result */\n public OnResultClick(result: SearchResultItem): void {\n this.ResultSelected.emit(result);\n }\n\n /** Handle clicking a recent search */\n public OnRecentClick(recent: RecentSearch): void {\n this.RecentSelected.emit(recent.Query);\n }\n\n /** Handle clicking a recently opened record */\n public OnRecentRecordClick(record: RecentRecordItem): void {\n this.RecentRecordSelected.emit(record);\n }\n\n /** Handle clicking \"See all\" */\n public OnSeeAllClick(): void {\n this.SeeAllRequested.emit(this.Query);\n }\n\n /** Promo accept — fired on click so keyboard Enter/Space work too; the\n template's mousedown-preventDefault keeps the input from blurring first. */\n public OnPromoAccept(): void {\n this.PromoAccepted.emit(this.Query);\n }\n\n /** Promo dismiss. */\n public OnPromoDismiss(): void {\n this.PromoDismissed.emit();\n }\n\n /** \"Clear\" on recent searches — click-driven so keyboard Enter/Space work;\n the template's mousedown-preventDefault keeps the input from blurring. */\n public OnClearRecentClick(event: MouseEvent): void {\n event.stopPropagation();\n this.ClearRecentRequested.emit();\n }\n\n /** Check if an item at the given index is highlighted */\n public IsHighlighted(index: number): boolean {\n return this.HighlightedIndex === index;\n }\n\n /** Format a score value as a percentage */\n public FormatScore(score: number): string {\n return `${Math.round(score * 100)}%`;\n }\n\n /** Get the CSS class for a score value: high (green), medium (amber), low (gray) */\n public GetScoreClass(score: number): string {\n if (score >= 0.40) return 'suggest-score-high';\n if (score >= 0.15) return 'suggest-score-medium';\n return 'suggest-score-low';\n }\n\n /** Toggle the filter popover */\n public ToggleFilter(event: MouseEvent): void {\n event.stopPropagation();\n event.preventDefault();\n this.IsFilterOpen = !this.IsFilterOpen;\n this.cdr.detectChanges();\n }\n\n /** Set the min relevance and persist */\n public SetMinRelevance(percent: number, event: MouseEvent): void {\n event.stopPropagation();\n event.preventDefault();\n this.MinRelevancePercent = percent;\n this.IsFilterOpen = false;\n this.persistMinRelevanceSetting(percent);\n this.cdr.detectChanges();\n }\n\n /** Whether a given option is the currently selected min relevance */\n public IsSelectedRelevance(percent: number): boolean {\n return this.MinRelevancePercent === percent;\n }\n\n /** Format a relevance option for display */\n public FormatRelevanceOption(percent: number): string {\n return percent === 0 ? 'Show all' : `≥ ${percent}%`;\n }\n\n // --- Private ---\n\n private getNavigableItemCount(): number {\n let count = 0;\n if (this.ShowRecentSection) {\n count += this.VisibleRecentSearches.length;\n }\n if (this.ShowRecentRecordsSection) {\n count += this.VisibleRecentRecords.length;\n }\n if (this.ShowPreviewSection) {\n count += this.VisiblePreviewResults.length;\n if (this.ShowSeeAllFooter) {\n count += 1; // \"See all\" item\n }\n }\n return count;\n }\n\n private async loadMinRelevanceSetting(): Promise<void> {\n try {\n // Wait for all startup engines (including UserInfoEngine) to finish loading\n MJGlobal.Instance.GetEventListener(true).subscribe( async (event) => {\n switch (event.event) {\n case MJEventType.LoggedIn:\n // Wait for StartupManager to complete before refreshing \n await StartupManager.Instance.Startup();\n\n const engine = UserInfoEngine.Instance;\n const saved = engine.GetSetting(PREVIEW_MIN_RELEVANCE_KEY);\n\n if (saved != null) {\n const parsed = parseInt(saved, 10);\n if (!isNaN(parsed) && parsed >= 0 && parsed <= 100) {\n this.MinRelevancePercent = parsed;\n this.cdr.detectChanges();\n }\n }\n }\n });\n } catch (err) {\n console.error('[SearchSuggest] loadMinRelevanceSetting error:', err);\n }\n }\n\n private persistMinRelevanceSetting(percent: number): void {\n try {\n UserInfoEngine.Instance.SetSettingDebounced(PREVIEW_MIN_RELEVANCE_KEY, String(percent));\n } catch {\n // Silently fail if UserInfoEngine not available\n }\n }\n}\n","@if (IsOpen) {\n <div class=\"suggest-dropdown\">\n @if (IsLoading && showPreviewSection) {\n <div class=\"suggest-loading\">\n <i class=\"fa-solid fa-spinner fa-spin suggest-loading-icon\"></i>\n <span>Searching...</span>\n </div>\n }\n\n <!-- Recent searches section -->\n @if (showRecentSection) {\n <div class=\"suggest-section\">\n <div class=\"suggest-section-header\">\n <i class=\"fa-solid fa-clock suggest-section-icon\"></i>\n <span>Recent Searches</span>\n <button type=\"button\" class=\"suggest-clear-link\" aria-label=\"Clear recent searches\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"OnClearRecentClick($event)\">Clear</button>\n </div>\n @for (recent of VisibleRecentSearches; track recent.Query; let i = $index) {\n <div\n class=\"suggest-item suggest-recent-item\"\n [class.suggest-item-highlighted]=\"IsHighlighted(i)\"\n (mousedown)=\"OnRecentClick(recent); $event.preventDefault()\"\n (mouseenter)=\"HighlightedIndex = i\"\n >\n <i class=\"fa-solid fa-clock suggest-item-icon\"></i>\n <span class=\"suggest-item-text\">{{ recent.Query }}</span>\n <span class=\"suggest-item-meta\">{{ recent.ResultCount }} results</span>\n </div>\n }\n </div>\n }\n\n <!-- Recently opened records section (idle state) -->\n @if (showRecentRecordsSection) {\n <div class=\"suggest-section\">\n <div class=\"suggest-section-header\">\n <i class=\"fa-solid fa-clock-rotate-left suggest-section-icon\"></i>\n <span>Recently Opened</span>\n </div>\n @for (record of VisibleRecentRecords; track record.EntityName + record.RecordID; let i = $index) {\n <div\n class=\"suggest-item suggest-recent-item\"\n [class.suggest-item-highlighted]=\"IsHighlighted((showRecentSection ? VisibleRecentSearches.length : 0) + i)\"\n (mousedown)=\"OnRecentRecordClick(record); $event.preventDefault()\"\n (mouseenter)=\"HighlightedIndex = (showRecentSection ? VisibleRecentSearches.length : 0) + i\"\n >\n <i class=\"fa-solid fa-file-lines suggest-item-icon\"></i>\n <span class=\"suggest-item-text\">{{ record.RecordName }}</span>\n <span class=\"suggest-item-meta\">{{ record.EntityDisplayName || record.EntityName }}</span>\n </div>\n }\n </div>\n }\n\n <!-- Preview results section -->\n @if (showPreviewSection && !IsLoading) {\n @if (VisiblePreviewResults.length > 0) {\n <div class=\"suggest-section\">\n @for (result of VisiblePreviewResults; track result.ID; let i = $index) {\n <div\n class=\"suggest-item suggest-result-item\"\n [class.suggest-item-highlighted]=\"IsHighlighted((showRecentSection ? VisibleRecentSearches.length : 0) + i)\"\n (mousedown)=\"OnResultClick(result); $event.preventDefault()\"\n (mouseenter)=\"HighlightedIndex = (showRecentSection ? VisibleRecentSearches.length : 0) + i\"\n >\n <div class=\"suggest-result-icon\">\n <i [class]=\"result.EntityIcon || result.SourceIcon || 'fa-solid fa-database'\"></i>\n </div>\n <div class=\"suggest-result-body\">\n <div class=\"suggest-result-title\">{{ result.RecordName || result.Title }}</div>\n <div class=\"suggest-result-entity\">{{ result.EntityDisplayName || result.EntityName }}</div>\n </div>\n <span class=\"suggest-result-score\" [class]=\"'suggest-result-score ' + GetScoreClass(result.Score)\">{{ FormatScore(result.Score) }}</span>\n </div>\n }\n </div>\n } @else if (!IsLoading) {\n <div class=\"suggest-empty\">\n <span>No results found</span>\n </div>\n }\n\n <!-- See all footer -->\n @if (showSeeAllFooter) {\n <div\n class=\"suggest-see-all\"\n [class.suggest-item-highlighted]=\"IsHighlighted((showRecentSection ? VisibleRecentSearches.length : 0) + VisiblePreviewResults.length)\"\n (mousedown)=\"OnSeeAllClick(); $event.preventDefault()\"\n (mouseenter)=\"HighlightedIndex = (showRecentSection ? VisibleRecentSearches.length : 0) + VisiblePreviewResults.length\"\n >\n <i class=\"fa-solid fa-arrow-right suggest-see-all-icon\"></i>\n <span>See all {{ TotalCount }} results</span>\n </div>\n }\n }\n\n <!-- Min relevance filter bar -->\n @if (showPreviewSection) {\n <div class=\"suggest-filter-bar\">\n <div class=\"suggest-filter-toggle\" (mousedown)=\"ToggleFilter($event)\">\n <i class=\"fa-solid fa-sliders suggest-filter-icon\"></i>\n <span class=\"suggest-filter-label\">\n @if (MinRelevancePercent > 0) {\n Min relevance: {{ MinRelevancePercent }}%\n } @else {\n Showing all results\n }\n </span>\n <i class=\"fa-solid fa-chevron-down suggest-filter-chevron\" [class.suggest-filter-chevron-open]=\"IsFilterOpen\"></i>\n </div>\n\n @if (IsFilterOpen) {\n <div class=\"suggest-filter-popover\">\n <div class=\"suggest-filter-popover-header\">Min Relevance</div>\n @for (option of MinRelevanceOptions; track option) {\n <div\n class=\"suggest-filter-option\"\n [class.suggest-filter-option-active]=\"IsSelectedRelevance(option)\"\n (mousedown)=\"SetMinRelevance(option, $event)\"\n >\n <span>{{ FormatRelevanceOption(option) }}</span>\n @if (IsSelectedRelevance(option)) {\n <i class=\"fa-solid fa-check suggest-filter-check\"></i>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n\n <!-- Empty state when no recents of either kind and query too short -->\n @if (!showRecentSection && !showRecentRecordsSection && !showPreviewSection) {\n <div class=\"suggest-empty\">\n <span>Type at least {{ MinQueryLength }} characters to search</span>\n </div>\n }\n\n <!-- Host-supplied promo row (e.g. command palette nudge) -->\n @if (ShowPromo && PromoText) {\n <div class=\"suggest-promo\">\n <i class=\"fa-solid fa-wand-magic-sparkles suggest-promo-icon\"></i>\n <span class=\"suggest-promo-text\">{{ PromoText }}</span>\n <button type=\"button\" class=\"suggest-promo-action\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"OnPromoAccept()\">{{ PromoActionLabel }}</button>\n <button type=\"button\" class=\"suggest-promo-dismiss\" aria-label=\"Dismiss\" title=\"Dismiss\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"OnPromoDismiss(); $event.stopPropagation()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n </div>\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-search",
|
|
3
|
-
"version": "6.2.0-edge.
|
|
3
|
+
"version": "6.2.0-edge.2",
|
|
4
4
|
"description": "MemberJunction: Reusable search overlay and results components - command palette / Spotlight style search",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@angular/compiler": "21.2.22",
|
|
15
15
|
"@angular/compiler-cli": "21.2.22",
|
|
16
|
-
"@memberjunction/ng-test-utils": "6.2.0-edge.
|
|
16
|
+
"@memberjunction/ng-test-utils": "6.2.0-edge.2",
|
|
17
17
|
"vitest": "^4.0.18"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@angular/forms": "^21.2.22"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@memberjunction/ng-ui-components": "6.2.0-edge.
|
|
26
|
-
"@memberjunction/core": "6.2.0-edge.
|
|
27
|
-
"@memberjunction/ng-base-types": "6.2.0-edge.
|
|
28
|
-
"@memberjunction/global": "6.2.0-edge.
|
|
29
|
-
"@memberjunction/graphql-dataprovider": "6.2.0-edge.
|
|
30
|
-
"@memberjunction/core-entities": "6.2.0-edge.
|
|
31
|
-
"@memberjunction/ng-shared-generic": "6.2.0-edge.
|
|
25
|
+
"@memberjunction/ng-ui-components": "6.2.0-edge.2",
|
|
26
|
+
"@memberjunction/core": "6.2.0-edge.2",
|
|
27
|
+
"@memberjunction/ng-base-types": "6.2.0-edge.2",
|
|
28
|
+
"@memberjunction/global": "6.2.0-edge.2",
|
|
29
|
+
"@memberjunction/graphql-dataprovider": "6.2.0-edge.2",
|
|
30
|
+
"@memberjunction/core-entities": "6.2.0-edge.2",
|
|
31
|
+
"@memberjunction/ng-shared-generic": "6.2.0-edge.2",
|
|
32
32
|
"rxjs": "^7.8.2",
|
|
33
33
|
"tslib": "^2.8.1"
|
|
34
34
|
},
|