@memberjunction/ng-search 0.0.1 → 5.22.0
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/__tests__/search-types.test.d.ts +2 -0
- package/dist/__tests__/search-types.test.d.ts.map +1 -0
- package/dist/__tests__/search-types.test.js +107 -0
- package/dist/__tests__/search-types.test.js.map +1 -0
- package/dist/__tests__/search.service.test.d.ts +2 -0
- package/dist/__tests__/search.service.test.d.ts.map +1 -0
- package/dist/__tests__/search.service.test.js +183 -0
- package/dist/__tests__/search.service.test.js.map +1 -0
- package/dist/lib/module.d.ts +13 -0
- package/dist/lib/module.d.ts.map +1 -0
- package/dist/lib/module.js +43 -0
- package/dist/lib/module.js.map +1 -0
- package/dist/lib/search-filter.component.d.ts +39 -0
- package/dist/lib/search-filter.component.d.ts.map +1 -0
- package/dist/lib/search-filter.component.js +200 -0
- package/dist/lib/search-filter.component.js.map +1 -0
- package/dist/lib/search-overlay.component.d.ts +103 -0
- package/dist/lib/search-overlay.component.d.ts.map +1 -0
- package/dist/lib/search-overlay.component.js +626 -0
- package/dist/lib/search-overlay.component.js.map +1 -0
- package/dist/lib/search-results.component.d.ts +64 -0
- package/dist/lib/search-results.component.d.ts.map +1 -0
- package/dist/lib/search-results.component.js +378 -0
- package/dist/lib/search-results.component.js.map +1 -0
- package/dist/lib/search-types.d.ts +142 -0
- package/dist/lib/search-types.d.ts.map +1 -0
- package/dist/lib/search-types.js +8 -0
- package/dist/lib/search-types.js.map +1 -0
- package/dist/lib/search.service.d.ts +52 -0
- package/dist/lib/search.service.d.ts.map +1 -0
- package/dist/lib/search.service.js +287 -0
- package/dist/lib/search.service.js.map +1 -0
- package/dist/public-api.d.ts +7 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +10 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +38 -7
- package/README.md +0 -45
|
@@ -0,0 +1,626 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Search Overlay Component
|
|
3
|
+
*
|
|
4
|
+
* A floating search overlay inspired by command palette / Spotlight style.
|
|
5
|
+
* Triggered by Cmd+K (Mac) or Ctrl+K (Windows), appears as a centered
|
|
6
|
+
* floating panel with backdrop blur, search input, and grouped results.
|
|
7
|
+
*
|
|
8
|
+
* Supports keyboard navigation (up/down/enter/escape), filter facets,
|
|
9
|
+
* and responsive mobile layout.
|
|
10
|
+
*/
|
|
11
|
+
import { Component, EventEmitter, HostListener, Input, Output, ChangeDetectorRef, ViewChild, inject } from '@angular/core';
|
|
12
|
+
import { Subject } from 'rxjs';
|
|
13
|
+
import { debounceTime, takeUntil } from 'rxjs/operators';
|
|
14
|
+
import { SearchService } from './search.service';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
const _c0 = ["searchInput"];
|
|
17
|
+
const _forTrack0 = ($index, $item) => $item.Category;
|
|
18
|
+
const _forTrack1 = ($index, $item) => $item.Value;
|
|
19
|
+
const _forTrack2 = ($index, $item) => $item.Query;
|
|
20
|
+
const _forTrack3 = ($index, $item) => $item.SourceType;
|
|
21
|
+
const _forTrack4 = ($index, $item) => $item.ID;
|
|
22
|
+
function SearchOverlayComponent_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
+
i0.ɵɵelementStart(0, "div", 6);
|
|
24
|
+
i0.ɵɵelement(1, "i", 12);
|
|
25
|
+
i0.ɵɵelementEnd();
|
|
26
|
+
} }
|
|
27
|
+
function SearchOverlayComponent_Conditional_0_Conditional_11_For_2_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
28
|
+
i0.ɵɵelement(0, "i");
|
|
29
|
+
} if (rf & 2) {
|
|
30
|
+
const option_r4 = i0.ɵɵnextContext().$implicit;
|
|
31
|
+
i0.ɵɵclassMap(option_r4.Icon);
|
|
32
|
+
} }
|
|
33
|
+
function SearchOverlayComponent_Conditional_0_Conditional_11_For_2_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
35
|
+
i0.ɵɵelementStart(0, "button", 15);
|
|
36
|
+
i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_11_For_2_For_1_Template_button_click_0_listener() { const option_r4 = i0.ɵɵrestoreView(_r3).$implicit; const filter_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnFilterToggle(filter_r5.Category, option_r4.Value)); });
|
|
37
|
+
i0.ɵɵconditionalCreate(1, SearchOverlayComponent_Conditional_0_Conditional_11_For_2_For_1_Conditional_1_Template, 1, 2, "i", 16);
|
|
38
|
+
i0.ɵɵelementStart(2, "span");
|
|
39
|
+
i0.ɵɵtext(3);
|
|
40
|
+
i0.ɵɵelementEnd();
|
|
41
|
+
i0.ɵɵelementStart(4, "span", 17);
|
|
42
|
+
i0.ɵɵtext(5);
|
|
43
|
+
i0.ɵɵelementEnd()();
|
|
44
|
+
} if (rf & 2) {
|
|
45
|
+
const option_r4 = ctx.$implicit;
|
|
46
|
+
const filter_r5 = i0.ɵɵnextContext().$implicit;
|
|
47
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
48
|
+
i0.ɵɵclassProp("filter-chip-active", ctx_r1.IsFilterActive(filter_r5.Category, option_r4.Value));
|
|
49
|
+
i0.ɵɵadvance();
|
|
50
|
+
i0.ɵɵconditional(option_r4.Icon ? 1 : -1);
|
|
51
|
+
i0.ɵɵadvance(2);
|
|
52
|
+
i0.ɵɵtextInterpolate(option_r4.Label);
|
|
53
|
+
i0.ɵɵadvance(2);
|
|
54
|
+
i0.ɵɵtextInterpolate(option_r4.Count);
|
|
55
|
+
} }
|
|
56
|
+
function SearchOverlayComponent_Conditional_0_Conditional_11_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
57
|
+
i0.ɵɵrepeaterCreate(0, SearchOverlayComponent_Conditional_0_Conditional_11_For_2_For_1_Template, 6, 5, "button", 14, _forTrack1);
|
|
58
|
+
} if (rf & 2) {
|
|
59
|
+
const filter_r5 = ctx.$implicit;
|
|
60
|
+
i0.ɵɵrepeater(filter_r5.Options);
|
|
61
|
+
} }
|
|
62
|
+
function SearchOverlayComponent_Conditional_0_Conditional_11_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
63
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
64
|
+
i0.ɵɵelementStart(0, "button", 18);
|
|
65
|
+
i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_11_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.ClearAllFilters()); });
|
|
66
|
+
i0.ɵɵelement(1, "i", 19);
|
|
67
|
+
i0.ɵɵtext(2, " Clear ");
|
|
68
|
+
i0.ɵɵelementEnd();
|
|
69
|
+
} }
|
|
70
|
+
function SearchOverlayComponent_Conditional_0_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
71
|
+
i0.ɵɵelementStart(0, "div", 9);
|
|
72
|
+
i0.ɵɵrepeaterCreate(1, SearchOverlayComponent_Conditional_0_Conditional_11_For_2_Template, 2, 0, null, null, _forTrack0);
|
|
73
|
+
i0.ɵɵconditionalCreate(3, SearchOverlayComponent_Conditional_0_Conditional_11_Conditional_3_Template, 3, 0, "button", 13);
|
|
74
|
+
i0.ɵɵelementEnd();
|
|
75
|
+
} if (rf & 2) {
|
|
76
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
77
|
+
i0.ɵɵadvance();
|
|
78
|
+
i0.ɵɵrepeater(ctx_r1.Filters);
|
|
79
|
+
i0.ɵɵadvance(2);
|
|
80
|
+
i0.ɵɵconditional(ctx_r1.hasActiveFilters() ? 3 : -1);
|
|
81
|
+
} }
|
|
82
|
+
function SearchOverlayComponent_Conditional_0_Conditional_12_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
83
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
84
|
+
i0.ɵɵelementStart(0, "button", 24);
|
|
85
|
+
i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_12_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnAgentCtaClick()); });
|
|
86
|
+
i0.ɵɵelement(1, "i", 25);
|
|
87
|
+
i0.ɵɵtext(2);
|
|
88
|
+
i0.ɵɵelementEnd();
|
|
89
|
+
} if (rf & 2) {
|
|
90
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
91
|
+
i0.ɵɵadvance(2);
|
|
92
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.AgentCtaText, " ");
|
|
93
|
+
} }
|
|
94
|
+
function SearchOverlayComponent_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
95
|
+
i0.ɵɵelementStart(0, "div", 10);
|
|
96
|
+
i0.ɵɵelement(1, "i", 20);
|
|
97
|
+
i0.ɵɵelementStart(2, "p", 21);
|
|
98
|
+
i0.ɵɵtext(3, "No results found");
|
|
99
|
+
i0.ɵɵelementEnd();
|
|
100
|
+
i0.ɵɵelementStart(4, "p", 22);
|
|
101
|
+
i0.ɵɵtext(5, "Try different keywords or remove some filters");
|
|
102
|
+
i0.ɵɵelementEnd();
|
|
103
|
+
i0.ɵɵconditionalCreate(6, SearchOverlayComponent_Conditional_0_Conditional_12_Conditional_6_Template, 3, 1, "button", 23);
|
|
104
|
+
i0.ɵɵelementEnd();
|
|
105
|
+
} if (rf & 2) {
|
|
106
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
107
|
+
i0.ɵɵadvance(6);
|
|
108
|
+
i0.ɵɵconditional(ctx_r1.ShowAgentCta ? 6 : -1);
|
|
109
|
+
} }
|
|
110
|
+
function SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_1_For_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
112
|
+
i0.ɵɵelementStart(0, "div", 30);
|
|
113
|
+
i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_1_For_4_Conditional_0_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r8); const recent_r9 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnQueryInput(recent_r9.Query)); });
|
|
114
|
+
i0.ɵɵelement(1, "i", 31);
|
|
115
|
+
i0.ɵɵelementStart(2, "span");
|
|
116
|
+
i0.ɵɵtext(3);
|
|
117
|
+
i0.ɵɵelementEnd();
|
|
118
|
+
i0.ɵɵelementStart(4, "span", 32);
|
|
119
|
+
i0.ɵɵtext(5);
|
|
120
|
+
i0.ɵɵelementEnd()();
|
|
121
|
+
} if (rf & 2) {
|
|
122
|
+
const recent_r9 = i0.ɵɵnextContext().$implicit;
|
|
123
|
+
i0.ɵɵadvance(3);
|
|
124
|
+
i0.ɵɵtextInterpolate(recent_r9.Query);
|
|
125
|
+
i0.ɵɵadvance(2);
|
|
126
|
+
i0.ɵɵtextInterpolate1("", recent_r9.ResultCount, " results");
|
|
127
|
+
} }
|
|
128
|
+
function SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_1_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
129
|
+
i0.ɵɵconditionalCreate(0, SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_1_For_4_Conditional_0_Template, 6, 2, "div", 29);
|
|
130
|
+
} if (rf & 2) {
|
|
131
|
+
const ɵ$index_72_r10 = ctx.$index;
|
|
132
|
+
i0.ɵɵconditional(ɵ$index_72_r10 < 5 ? 0 : -1);
|
|
133
|
+
} }
|
|
134
|
+
function SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
135
|
+
i0.ɵɵelementStart(0, "div", 27)(1, "span", 28);
|
|
136
|
+
i0.ɵɵtext(2, "Recent Searches");
|
|
137
|
+
i0.ɵɵelementEnd()();
|
|
138
|
+
i0.ɵɵrepeaterCreate(3, SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_1_For_4_Template, 1, 1, null, null, _forTrack2);
|
|
139
|
+
} if (rf & 2) {
|
|
140
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
141
|
+
i0.ɵɵadvance(3);
|
|
142
|
+
i0.ɵɵrepeater(ctx_r1.searchService.RecentSearches$.value);
|
|
143
|
+
} }
|
|
144
|
+
function SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
145
|
+
i0.ɵɵelementStart(0, "div", 26);
|
|
146
|
+
i0.ɵɵelement(1, "i", 33);
|
|
147
|
+
i0.ɵɵelementStart(2, "p", 22);
|
|
148
|
+
i0.ɵɵtext(3, "Start typing to search across all your knowledge");
|
|
149
|
+
i0.ɵɵelementEnd()();
|
|
150
|
+
} }
|
|
151
|
+
function SearchOverlayComponent_Conditional_0_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
152
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
153
|
+
i0.ɵɵconditionalCreate(1, SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_1_Template, 5, 0)(2, SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_2_Template, 4, 0, "div", 26);
|
|
154
|
+
i0.ɵɵelementEnd();
|
|
155
|
+
} if (rf & 2) {
|
|
156
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
157
|
+
i0.ɵɵadvance();
|
|
158
|
+
i0.ɵɵconditional(ctx_r1.searchService.RecentSearches$.value.length > 0 ? 1 : 2);
|
|
159
|
+
} }
|
|
160
|
+
function SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Conditional_8_For_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
161
|
+
i0.ɵɵelementStart(0, "span", 50);
|
|
162
|
+
i0.ɵɵtext(1);
|
|
163
|
+
i0.ɵɵelementEnd();
|
|
164
|
+
} if (rf & 2) {
|
|
165
|
+
const tag_r13 = i0.ɵɵnextContext().$implicit;
|
|
166
|
+
i0.ɵɵadvance();
|
|
167
|
+
i0.ɵɵtextInterpolate(tag_r13);
|
|
168
|
+
} }
|
|
169
|
+
function SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
170
|
+
i0.ɵɵconditionalCreate(0, SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Conditional_8_For_2_Conditional_0_Template, 2, 1, "span", 50);
|
|
171
|
+
} if (rf & 2) {
|
|
172
|
+
const ɵ$index_124_r14 = ctx.$index;
|
|
173
|
+
i0.ɵɵconditional(ɵ$index_124_r14 < 3 ? 0 : -1);
|
|
174
|
+
} }
|
|
175
|
+
function SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
176
|
+
i0.ɵɵelementStart(0, "div", 47);
|
|
177
|
+
i0.ɵɵrepeaterCreate(1, SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Conditional_8_For_2_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIdentity);
|
|
178
|
+
i0.ɵɵelementEnd();
|
|
179
|
+
} if (rf & 2) {
|
|
180
|
+
const result_r12 = i0.ɵɵnextContext().$implicit;
|
|
181
|
+
i0.ɵɵadvance();
|
|
182
|
+
i0.ɵɵrepeater(result_r12.Tags);
|
|
183
|
+
} }
|
|
184
|
+
function SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Template(rf, ctx) { if (rf & 1) {
|
|
185
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
186
|
+
i0.ɵɵelementStart(0, "div", 42);
|
|
187
|
+
i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Template_div_click_0_listener($event) { const result_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnResultClick(result_r12, $event)); })("mouseenter", function SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Template_div_mouseenter_0_listener() { const result_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.HighlightedIndex = ctx_r1.getFlatIndex(result_r12)); });
|
|
188
|
+
i0.ɵɵelementStart(1, "div", 43);
|
|
189
|
+
i0.ɵɵelement(2, "i");
|
|
190
|
+
i0.ɵɵelementEnd();
|
|
191
|
+
i0.ɵɵelementStart(3, "div", 44)(4, "div", 45);
|
|
192
|
+
i0.ɵɵtext(5);
|
|
193
|
+
i0.ɵɵelementEnd();
|
|
194
|
+
i0.ɵɵelementStart(6, "div", 46);
|
|
195
|
+
i0.ɵɵtext(7);
|
|
196
|
+
i0.ɵɵelementEnd();
|
|
197
|
+
i0.ɵɵconditionalCreate(8, SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Conditional_8_Template, 3, 0, "div", 47);
|
|
198
|
+
i0.ɵɵelementEnd();
|
|
199
|
+
i0.ɵɵelementStart(9, "div", 48)(10, "span", 49);
|
|
200
|
+
i0.ɵɵtext(11);
|
|
201
|
+
i0.ɵɵelementEnd()()();
|
|
202
|
+
} if (rf & 2) {
|
|
203
|
+
const result_r12 = ctx.$implicit;
|
|
204
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
205
|
+
i0.ɵɵclassProp("result-item-highlighted", ctx_r1.isResultHighlighted(result_r12));
|
|
206
|
+
i0.ɵɵadvance(2);
|
|
207
|
+
i0.ɵɵclassMap(result_r12.SourceIcon);
|
|
208
|
+
i0.ɵɵadvance(3);
|
|
209
|
+
i0.ɵɵtextInterpolate(result_r12.Title);
|
|
210
|
+
i0.ɵɵadvance(2);
|
|
211
|
+
i0.ɵɵtextInterpolate(result_r12.Snippet);
|
|
212
|
+
i0.ɵɵadvance();
|
|
213
|
+
i0.ɵɵconditional(result_r12.Tags.length > 0 ? 8 : -1);
|
|
214
|
+
i0.ɵɵadvance(3);
|
|
215
|
+
i0.ɵɵtextInterpolate(ctx_r1.FormatScore(result_r12.Score));
|
|
216
|
+
} }
|
|
217
|
+
function SearchOverlayComponent_Conditional_0_Conditional_14_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
218
|
+
i0.ɵɵelementStart(0, "div", 34)(1, "div", 38);
|
|
219
|
+
i0.ɵɵelement(2, "i");
|
|
220
|
+
i0.ɵɵelementStart(3, "span", 39);
|
|
221
|
+
i0.ɵɵtext(4);
|
|
222
|
+
i0.ɵɵelementEnd();
|
|
223
|
+
i0.ɵɵelementStart(5, "span", 40);
|
|
224
|
+
i0.ɵɵtext(6);
|
|
225
|
+
i0.ɵɵelementEnd()();
|
|
226
|
+
i0.ɵɵrepeaterCreate(7, SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Template, 12, 8, "div", 41, _forTrack4);
|
|
227
|
+
i0.ɵɵelementEnd();
|
|
228
|
+
} if (rf & 2) {
|
|
229
|
+
const group_r15 = ctx.$implicit;
|
|
230
|
+
i0.ɵɵadvance(2);
|
|
231
|
+
i0.ɵɵclassMap(group_r15.Icon);
|
|
232
|
+
i0.ɵɵadvance(2);
|
|
233
|
+
i0.ɵɵtextInterpolate(group_r15.Label);
|
|
234
|
+
i0.ɵɵadvance(2);
|
|
235
|
+
i0.ɵɵtextInterpolate(group_r15.TotalCount);
|
|
236
|
+
i0.ɵɵadvance();
|
|
237
|
+
i0.ɵɵrepeater(group_r15.Results);
|
|
238
|
+
} }
|
|
239
|
+
function SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
240
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
241
|
+
i0.ɵɵelementStart(0, "button", 51);
|
|
242
|
+
i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnAgentCtaClick()); });
|
|
243
|
+
i0.ɵɵelement(1, "i", 25);
|
|
244
|
+
i0.ɵɵtext(2);
|
|
245
|
+
i0.ɵɵelementEnd();
|
|
246
|
+
} if (rf & 2) {
|
|
247
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
248
|
+
i0.ɵɵadvance(2);
|
|
249
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.AgentCtaText, " ");
|
|
250
|
+
} }
|
|
251
|
+
function SearchOverlayComponent_Conditional_0_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
252
|
+
i0.ɵɵrepeaterCreate(0, SearchOverlayComponent_Conditional_0_Conditional_14_For_1_Template, 9, 4, "div", 34, _forTrack3);
|
|
253
|
+
i0.ɵɵelementStart(2, "div", 35)(3, "span", 36);
|
|
254
|
+
i0.ɵɵtext(4);
|
|
255
|
+
i0.ɵɵelementEnd();
|
|
256
|
+
i0.ɵɵconditionalCreate(5, SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_5_Template, 3, 1, "button", 37);
|
|
257
|
+
i0.ɵɵelementEnd();
|
|
258
|
+
} if (rf & 2) {
|
|
259
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
260
|
+
i0.ɵɵrepeater(ctx_r1.ResultGroups);
|
|
261
|
+
i0.ɵɵadvance(4);
|
|
262
|
+
i0.ɵɵtextInterpolate2(" ", ctx_r1.TotalCount, " results in ", ctx_r1.FormatElapsedTime(ctx_r1.ElapsedMs), " ");
|
|
263
|
+
i0.ɵɵadvance();
|
|
264
|
+
i0.ɵɵconditional(ctx_r1.ShowAgentCta ? 5 : -1);
|
|
265
|
+
} }
|
|
266
|
+
function SearchOverlayComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
267
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
268
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
269
|
+
i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnBackdropClick()); });
|
|
270
|
+
i0.ɵɵelementEnd();
|
|
271
|
+
i0.ɵɵelementStart(1, "div", 2);
|
|
272
|
+
i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
273
|
+
i0.ɵɵelementStart(2, "div", 3);
|
|
274
|
+
i0.ɵɵelement(3, "i", 4);
|
|
275
|
+
i0.ɵɵelementStart(4, "input", 5, 0);
|
|
276
|
+
i0.ɵɵlistener("input", function SearchOverlayComponent_Conditional_0_Template_input_input_4_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnQueryInput($event.target.value)); });
|
|
277
|
+
i0.ɵɵelementEnd();
|
|
278
|
+
i0.ɵɵconditionalCreate(6, SearchOverlayComponent_Conditional_0_Conditional_6_Template, 2, 0, "div", 6);
|
|
279
|
+
i0.ɵɵelementStart(7, "div", 7)(8, "kbd");
|
|
280
|
+
i0.ɵɵtext(9, "ESC");
|
|
281
|
+
i0.ɵɵelementEnd()()();
|
|
282
|
+
i0.ɵɵelementStart(10, "div", 8);
|
|
283
|
+
i0.ɵɵconditionalCreate(11, SearchOverlayComponent_Conditional_0_Conditional_11_Template, 4, 1, "div", 9);
|
|
284
|
+
i0.ɵɵconditionalCreate(12, SearchOverlayComponent_Conditional_0_Conditional_12_Template, 7, 1, "div", 10);
|
|
285
|
+
i0.ɵɵconditionalCreate(13, SearchOverlayComponent_Conditional_0_Conditional_13_Template, 3, 1, "div", 11);
|
|
286
|
+
i0.ɵɵconditionalCreate(14, SearchOverlayComponent_Conditional_0_Conditional_14_Template, 6, 3);
|
|
287
|
+
i0.ɵɵelementEnd()();
|
|
288
|
+
} if (rf & 2) {
|
|
289
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
290
|
+
i0.ɵɵadvance(4);
|
|
291
|
+
i0.ɵɵproperty("placeholder", ctx_r1.Placeholder)("value", ctx_r1.Query);
|
|
292
|
+
i0.ɵɵadvance(2);
|
|
293
|
+
i0.ɵɵconditional(ctx_r1.IsSearching ? 6 : -1);
|
|
294
|
+
i0.ɵɵadvance(5);
|
|
295
|
+
i0.ɵɵconditional(ctx_r1.ShowFilters && ctx_r1.Filters.length > 0 ? 11 : -1);
|
|
296
|
+
i0.ɵɵadvance();
|
|
297
|
+
i0.ɵɵconditional(ctx_r1.HasSearched && ctx_r1.AllResults.length === 0 && !ctx_r1.IsSearching ? 12 : -1);
|
|
298
|
+
i0.ɵɵadvance();
|
|
299
|
+
i0.ɵɵconditional(!ctx_r1.HasSearched && !ctx_r1.IsSearching ? 13 : -1);
|
|
300
|
+
i0.ɵɵadvance();
|
|
301
|
+
i0.ɵɵconditional(ctx_r1.AllResults.length > 0 ? 14 : -1);
|
|
302
|
+
} }
|
|
303
|
+
export class SearchOverlayComponent {
|
|
304
|
+
cdr = inject(ChangeDetectorRef);
|
|
305
|
+
searchService = inject(SearchService);
|
|
306
|
+
destroy$ = new Subject();
|
|
307
|
+
searchInput$ = new Subject();
|
|
308
|
+
searchInputRef;
|
|
309
|
+
// --- Configuration Inputs ---
|
|
310
|
+
/** Placeholder text for the search input */
|
|
311
|
+
Placeholder = 'Search across all your knowledge...';
|
|
312
|
+
/** Maximum number of results to fetch */
|
|
313
|
+
MaxResults = 25;
|
|
314
|
+
/** Whether the overlay is currently visible */
|
|
315
|
+
_IsOpen = false;
|
|
316
|
+
set IsOpen(value) {
|
|
317
|
+
const prev = this._IsOpen;
|
|
318
|
+
this._IsOpen = value;
|
|
319
|
+
if (value && !prev) {
|
|
320
|
+
this.onOverlayOpened();
|
|
321
|
+
}
|
|
322
|
+
if (!value && prev) {
|
|
323
|
+
this.onOverlayClosed();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
get IsOpen() {
|
|
327
|
+
return this._IsOpen;
|
|
328
|
+
}
|
|
329
|
+
/** Debounce time in ms before search fires */
|
|
330
|
+
DebounceMs = 250;
|
|
331
|
+
/** Which search sources to include */
|
|
332
|
+
IncludeSources = ['vector', 'fulltext', 'entity'];
|
|
333
|
+
/** Whether to show filter facets */
|
|
334
|
+
ShowFilters = true;
|
|
335
|
+
/** Text for the agent CTA button */
|
|
336
|
+
AgentCtaText = 'Ask Knowledge Agent';
|
|
337
|
+
/** Whether to show the agent CTA */
|
|
338
|
+
ShowAgentCta = true;
|
|
339
|
+
// --- Outputs ---
|
|
340
|
+
IsOpenChange = new EventEmitter();
|
|
341
|
+
ResultSelected = new EventEmitter();
|
|
342
|
+
FilterChanged = new EventEmitter();
|
|
343
|
+
SearchExecuted = new EventEmitter();
|
|
344
|
+
AgentCtaClicked = new EventEmitter();
|
|
345
|
+
// --- Component State ---
|
|
346
|
+
Query = '';
|
|
347
|
+
IsSearching = false;
|
|
348
|
+
ResultGroups = [];
|
|
349
|
+
AllResults = [];
|
|
350
|
+
Filters = [];
|
|
351
|
+
ActiveFilters = {};
|
|
352
|
+
TotalCount = 0;
|
|
353
|
+
ElapsedMs = 0;
|
|
354
|
+
HighlightedIndex = -1;
|
|
355
|
+
HasSearched = false;
|
|
356
|
+
/** All results flattened for keyboard navigation */
|
|
357
|
+
get FlatResults() {
|
|
358
|
+
return this.AllResults;
|
|
359
|
+
}
|
|
360
|
+
ngOnInit() {
|
|
361
|
+
this.setupSearchDebounce();
|
|
362
|
+
this.subscribeToSearchState();
|
|
363
|
+
}
|
|
364
|
+
ngOnDestroy() {
|
|
365
|
+
this.destroy$.next();
|
|
366
|
+
this.destroy$.complete();
|
|
367
|
+
}
|
|
368
|
+
// --- Keyboard shortcuts ---
|
|
369
|
+
HandleGlobalKeydown(event) {
|
|
370
|
+
if (this.isToggleShortcut(event)) {
|
|
371
|
+
event.preventDefault();
|
|
372
|
+
this.ToggleOverlay();
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
if (this._IsOpen) {
|
|
376
|
+
this.handleOverlayKeydown(event);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
/** Toggle the overlay open/closed */
|
|
380
|
+
ToggleOverlay() {
|
|
381
|
+
this.IsOpen = !this._IsOpen;
|
|
382
|
+
this.IsOpenChange.emit(this._IsOpen);
|
|
383
|
+
}
|
|
384
|
+
/** Open the overlay */
|
|
385
|
+
Open() {
|
|
386
|
+
if (!this._IsOpen) {
|
|
387
|
+
this.IsOpen = true;
|
|
388
|
+
this.IsOpenChange.emit(true);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/** Close the overlay */
|
|
392
|
+
Close() {
|
|
393
|
+
if (this._IsOpen) {
|
|
394
|
+
this.IsOpen = false;
|
|
395
|
+
this.IsOpenChange.emit(false);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
/** Handle query input changes */
|
|
399
|
+
OnQueryInput(value) {
|
|
400
|
+
this.Query = value;
|
|
401
|
+
this.searchInput$.next(value);
|
|
402
|
+
}
|
|
403
|
+
/** Handle clicking a result */
|
|
404
|
+
OnResultClick(result, event) {
|
|
405
|
+
this.ResultSelected.emit({
|
|
406
|
+
Result: result,
|
|
407
|
+
OpenInNewTab: event.metaKey || event.ctrlKey
|
|
408
|
+
});
|
|
409
|
+
this.Close();
|
|
410
|
+
}
|
|
411
|
+
/** Handle selecting the highlighted result */
|
|
412
|
+
SelectHighlighted() {
|
|
413
|
+
if (this.HighlightedIndex >= 0 && this.HighlightedIndex < this.FlatResults.length) {
|
|
414
|
+
this.ResultSelected.emit({
|
|
415
|
+
Result: this.FlatResults[this.HighlightedIndex],
|
|
416
|
+
OpenInNewTab: false
|
|
417
|
+
});
|
|
418
|
+
this.Close();
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
/** Handle filter option toggle */
|
|
422
|
+
OnFilterToggle(category, value) {
|
|
423
|
+
const current = this.ActiveFilters[category] ?? [];
|
|
424
|
+
const index = current.indexOf(value);
|
|
425
|
+
if (index >= 0) {
|
|
426
|
+
current.splice(index, 1);
|
|
427
|
+
}
|
|
428
|
+
else {
|
|
429
|
+
current.push(value);
|
|
430
|
+
}
|
|
431
|
+
this.ActiveFilters[category] = current;
|
|
432
|
+
this.FilterChanged.emit({ Category: category, SelectedValues: current });
|
|
433
|
+
this.executeSearch();
|
|
434
|
+
}
|
|
435
|
+
/** Clear all active filters */
|
|
436
|
+
ClearAllFilters() {
|
|
437
|
+
this.ActiveFilters = {};
|
|
438
|
+
this.executeSearch();
|
|
439
|
+
}
|
|
440
|
+
/** Handle clicking the agent CTA */
|
|
441
|
+
OnAgentCtaClick() {
|
|
442
|
+
this.AgentCtaClicked.emit(this.Query);
|
|
443
|
+
this.Close();
|
|
444
|
+
}
|
|
445
|
+
/** Handle clicking the backdrop to close */
|
|
446
|
+
OnBackdropClick() {
|
|
447
|
+
this.Close();
|
|
448
|
+
}
|
|
449
|
+
/** Check if a filter option is active */
|
|
450
|
+
IsFilterActive(category, value) {
|
|
451
|
+
return (this.ActiveFilters[category] ?? []).includes(value);
|
|
452
|
+
}
|
|
453
|
+
/** Get a score display value (percentage) */
|
|
454
|
+
FormatScore(score) {
|
|
455
|
+
return `${Math.round(score * 100)}%`;
|
|
456
|
+
}
|
|
457
|
+
/** Format elapsed time display */
|
|
458
|
+
FormatElapsedTime(ms) {
|
|
459
|
+
if (ms < 1000) {
|
|
460
|
+
return `${ms}ms`;
|
|
461
|
+
}
|
|
462
|
+
return `${(ms / 1000).toFixed(1)}s`;
|
|
463
|
+
}
|
|
464
|
+
// --- Private Methods ---
|
|
465
|
+
isToggleShortcut(event) {
|
|
466
|
+
return (event.metaKey || event.ctrlKey) && event.key === 'k';
|
|
467
|
+
}
|
|
468
|
+
handleOverlayKeydown(event) {
|
|
469
|
+
switch (event.key) {
|
|
470
|
+
case 'Escape':
|
|
471
|
+
event.preventDefault();
|
|
472
|
+
this.Close();
|
|
473
|
+
break;
|
|
474
|
+
case 'ArrowDown':
|
|
475
|
+
event.preventDefault();
|
|
476
|
+
this.moveHighlight(1);
|
|
477
|
+
break;
|
|
478
|
+
case 'ArrowUp':
|
|
479
|
+
event.preventDefault();
|
|
480
|
+
this.moveHighlight(-1);
|
|
481
|
+
break;
|
|
482
|
+
case 'Enter':
|
|
483
|
+
event.preventDefault();
|
|
484
|
+
this.SelectHighlighted();
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
moveHighlight(direction) {
|
|
489
|
+
const maxIndex = this.FlatResults.length - 1;
|
|
490
|
+
if (maxIndex < 0)
|
|
491
|
+
return;
|
|
492
|
+
this.HighlightedIndex += direction;
|
|
493
|
+
if (this.HighlightedIndex < 0) {
|
|
494
|
+
this.HighlightedIndex = maxIndex;
|
|
495
|
+
}
|
|
496
|
+
else if (this.HighlightedIndex > maxIndex) {
|
|
497
|
+
this.HighlightedIndex = 0;
|
|
498
|
+
}
|
|
499
|
+
this.cdr.detectChanges();
|
|
500
|
+
}
|
|
501
|
+
setupSearchDebounce() {
|
|
502
|
+
this.searchInput$
|
|
503
|
+
.pipe(debounceTime(this.DebounceMs), takeUntil(this.destroy$))
|
|
504
|
+
.subscribe(() => this.executeSearch());
|
|
505
|
+
}
|
|
506
|
+
subscribeToSearchState() {
|
|
507
|
+
this.searchService.IsSearching$
|
|
508
|
+
.pipe(takeUntil(this.destroy$))
|
|
509
|
+
.subscribe(val => {
|
|
510
|
+
this.IsSearching = val;
|
|
511
|
+
this.cdr.detectChanges();
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
async executeSearch() {
|
|
515
|
+
const query = this.Query.trim();
|
|
516
|
+
if (!query) {
|
|
517
|
+
this.clearResults();
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
const request = {
|
|
521
|
+
Query: query,
|
|
522
|
+
MaxResults: this.MaxResults,
|
|
523
|
+
ActiveFilters: this.ActiveFilters,
|
|
524
|
+
IncludeSources: this.IncludeSources,
|
|
525
|
+
};
|
|
526
|
+
const response = await this.searchService.ExecuteSearch(request);
|
|
527
|
+
this.AllResults = response.Results;
|
|
528
|
+
this.ResultGroups = response.Groups;
|
|
529
|
+
this.Filters = response.Filters;
|
|
530
|
+
this.TotalCount = response.TotalCount;
|
|
531
|
+
this.ElapsedMs = response.ElapsedMs;
|
|
532
|
+
this.HasSearched = true;
|
|
533
|
+
this.HighlightedIndex = response.Results.length > 0 ? 0 : -1;
|
|
534
|
+
this.SearchExecuted.emit({
|
|
535
|
+
Query: query,
|
|
536
|
+
Filters: this.ActiveFilters,
|
|
537
|
+
ResultCount: response.TotalCount,
|
|
538
|
+
ElapsedMs: response.ElapsedMs,
|
|
539
|
+
});
|
|
540
|
+
this.cdr.detectChanges();
|
|
541
|
+
}
|
|
542
|
+
clearResults() {
|
|
543
|
+
this.AllResults = [];
|
|
544
|
+
this.ResultGroups = [];
|
|
545
|
+
this.Filters = [];
|
|
546
|
+
this.TotalCount = 0;
|
|
547
|
+
this.ElapsedMs = 0;
|
|
548
|
+
this.HasSearched = false;
|
|
549
|
+
this.HighlightedIndex = -1;
|
|
550
|
+
this.cdr.detectChanges();
|
|
551
|
+
}
|
|
552
|
+
onOverlayOpened() {
|
|
553
|
+
// Focus input after view updates
|
|
554
|
+
Promise.resolve().then(() => {
|
|
555
|
+
this.searchInputRef?.nativeElement?.focus();
|
|
556
|
+
this.cdr.detectChanges();
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
onOverlayClosed() {
|
|
560
|
+
this.HighlightedIndex = -1;
|
|
561
|
+
}
|
|
562
|
+
/** Check if any filters are active (used by template) */
|
|
563
|
+
hasActiveFilters() {
|
|
564
|
+
return Object.values(this.ActiveFilters).some(v => v.length > 0);
|
|
565
|
+
}
|
|
566
|
+
/** Check if a result is currently keyboard-highlighted */
|
|
567
|
+
isResultHighlighted(result) {
|
|
568
|
+
const flatIndex = this.getFlatIndex(result);
|
|
569
|
+
return flatIndex === this.HighlightedIndex;
|
|
570
|
+
}
|
|
571
|
+
/** Get the flat index of a result for keyboard navigation */
|
|
572
|
+
getFlatIndex(result) {
|
|
573
|
+
return this.FlatResults.indexOf(result);
|
|
574
|
+
}
|
|
575
|
+
static ɵfac = function SearchOverlayComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchOverlayComponent)(); };
|
|
576
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchOverlayComponent, selectors: [["mj-search-overlay"]], viewQuery: function SearchOverlayComponent_Query(rf, ctx) { if (rf & 1) {
|
|
577
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
578
|
+
} if (rf & 2) {
|
|
579
|
+
let _t;
|
|
580
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchInputRef = _t.first);
|
|
581
|
+
} }, hostBindings: function SearchOverlayComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
582
|
+
i0.ɵɵlistener("keydown", function SearchOverlayComponent_keydown_HostBindingHandler($event) { return ctx.HandleGlobalKeydown($event); }, i0.ɵɵresolveDocument);
|
|
583
|
+
} }, inputs: { Placeholder: "Placeholder", MaxResults: "MaxResults", IsOpen: "IsOpen", DebounceMs: "DebounceMs", IncludeSources: "IncludeSources", ShowFilters: "ShowFilters", AgentCtaText: "AgentCtaText", ShowAgentCta: "ShowAgentCta" }, outputs: { IsOpenChange: "IsOpenChange", ResultSelected: "ResultSelected", FilterChanged: "FilterChanged", SearchExecuted: "SearchExecuted", AgentCtaClicked: "AgentCtaClicked" }, standalone: false, decls: 1, vars: 1, consts: [["searchInput", ""], [1, "search-backdrop", 3, "click"], [1, "search-spotlight", 3, "click"], [1, "search-input-wrap"], [1, "fa-solid", "fa-magnifying-glass", "search-icon"], ["type", "text", "autocomplete", "off", "spellcheck", "false", 1, "search-input", 3, "input", "placeholder", "value"], [1, "search-spinner"], [1, "search-shortcut-hint"], [1, "search-results-area"], [1, "search-filter-bar"], [1, "search-empty-state"], [1, "search-recent"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "filter-clear-btn"], [1, "filter-chip", 3, "filter-chip-active"], [1, "filter-chip", 3, "click"], [3, "class"], [1, "filter-chip-count"], [1, "filter-clear-btn", 3, "click"], [1, "fa-solid", "fa-times"], [1, "fa-solid", "fa-search", "search-empty-icon"], [1, "search-empty-title"], [1, "search-empty-text"], [1, "agent-cta-btn"], [1, "agent-cta-btn", 3, "click"], [1, "fa-solid", "fa-robot"], [1, "search-empty-state", "search-empty-state-compact"], [1, "search-recent-header"], [1, "search-recent-title"], [1, "search-recent-item"], [1, "search-recent-item", 3, "click"], [1, "fa-solid", "fa-clock", "search-recent-icon"], [1, "search-recent-count"], [1, "fa-solid", "fa-magnifying-glass", "search-empty-icon"], [1, "result-group"], [1, "search-footer"], [1, "search-footer-count"], [1, "agent-cta-btn", "agent-cta-btn-small"], [1, "result-group-header"], [1, "result-group-label"], [1, "result-group-count"], [1, "result-item", 3, "result-item-highlighted"], [1, "result-item", 3, "click", "mouseenter"], [1, "result-item-icon"], [1, "result-item-content"], [1, "result-item-title"], [1, "result-item-snippet"], [1, "result-item-tags"], [1, "result-item-score"], [1, "score-badge"], [1, "result-tag"], [1, "agent-cta-btn", "agent-cta-btn-small", 3, "click"]], template: function SearchOverlayComponent_Template(rf, ctx) { if (rf & 1) {
|
|
584
|
+
i0.ɵɵconditionalCreate(0, SearchOverlayComponent_Conditional_0_Template, 15, 7);
|
|
585
|
+
} if (rf & 2) {
|
|
586
|
+
i0.ɵɵconditional(ctx.IsOpen ? 0 : -1);
|
|
587
|
+
} }, styles: ["\n\n\n.search-backdrop[_ngcontent-%COMP%] {\n position: fixed;\n inset: 0;\n background: var(--mj-bg-overlay);\n backdrop-filter: blur(8px);\n z-index: 1000;\n animation: _ngcontent-%COMP%_backdropFadeIn 0.2s ease;\n}\n\n@keyframes _ngcontent-%COMP%_backdropFadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.search-spotlight[_ngcontent-%COMP%] {\n position: fixed;\n top: 12%;\n left: 50%;\n transform: translateX(-50%);\n width: 680px;\n max-width: calc(100vw - 2rem);\n max-height: 70vh;\n z-index: 1001;\n display: flex;\n flex-direction: column;\n border-radius: 14px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);\n overflow: hidden;\n animation: _ngcontent-%COMP%_spotlightIn 0.25s ease;\n}\n\n@keyframes _ngcontent-%COMP%_spotlightIn {\n from {\n opacity: 0;\n transform: translateX(-50%) translateY(-10px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateX(-50%) translateY(0) scale(1);\n }\n}\n\n\n\n.search-input-wrap[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n padding: 0.75rem 1rem;\n border-bottom: 1px solid var(--mj-border-default);\n gap: 0.75rem;\n}\n\n.search-icon[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n font-size: 1.1rem;\n flex-shrink: 0;\n}\n\n.search-input[_ngcontent-%COMP%] {\n flex: 1;\n border: none;\n background: transparent;\n font-size: 1.1rem;\n color: var(--mj-text-primary);\n outline: none;\n font-family: inherit;\n}\n\n.search-input[_ngcontent-%COMP%]::placeholder {\n color: var(--mj-text-muted);\n}\n\n.search-spinner[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n font-size: 1rem;\n}\n\n.search-shortcut-hint[_ngcontent-%COMP%] kbd[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 0.15rem 0.5rem;\n border-radius: 4px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n font-size: 0.75rem;\n font-family: inherit;\n}\n\n\n\n.search-results-area[_ngcontent-%COMP%] {\n overflow-y: auto;\n max-height: calc(70vh - 56px);\n}\n\n\n\n.search-filter-bar[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 0.4rem;\n padding: 0.6rem 1rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-chip[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n padding: 0.25rem 0.6rem;\n border-radius: 9999px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: 0.78rem;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.filter-chip[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-primary);\n}\n\n.filter-chip-active[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n\n.filter-chip-count[_ngcontent-%COMP%] {\n opacity: 0.6;\n font-size: 0.72rem;\n}\n\n.filter-clear-btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n padding: 0.25rem 0.6rem;\n border-radius: 9999px;\n border: none;\n background: transparent;\n color: var(--mj-text-muted);\n font-size: 0.78rem;\n cursor: pointer;\n}\n\n.filter-clear-btn[_ngcontent-%COMP%]:hover {\n color: var(--mj-status-error);\n}\n\n\n\n.search-empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 2.5rem 1rem;\n gap: 0.5rem;\n}\n\n.search-empty-state-compact[_ngcontent-%COMP%] {\n padding: 1.5rem 1rem;\n}\n\n.search-empty-icon[_ngcontent-%COMP%] {\n font-size: 2rem;\n color: var(--mj-text-muted);\n margin-bottom: 0.5rem;\n}\n\n.search-empty-title[_ngcontent-%COMP%] {\n color: var(--mj-text-primary);\n font-weight: 600;\n font-size: 0.95rem;\n}\n\n.search-empty-text[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 0.85rem;\n}\n\n\n\n.search-recent[_ngcontent-%COMP%] {\n padding: 0.5rem 0;\n}\n\n.search-recent-header[_ngcontent-%COMP%] {\n padding: 0.5rem 1rem;\n}\n\n.search-recent-title[_ngcontent-%COMP%] {\n font-size: 0.75rem;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n font-weight: 600;\n}\n\n.search-recent-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n padding: 0.5rem 1rem;\n cursor: pointer;\n color: var(--mj-text-secondary);\n font-size: 0.9rem;\n transition: background 0.1s ease;\n}\n\n.search-recent-item[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.search-recent-icon[_ngcontent-%COMP%] {\n font-size: 0.8rem;\n color: var(--mj-text-muted);\n}\n\n.search-recent-count[_ngcontent-%COMP%] {\n margin-left: auto;\n font-size: 0.75rem;\n color: var(--mj-text-muted);\n}\n\n\n\n.result-group[_ngcontent-%COMP%] {\n padding: 0.25rem 0;\n}\n\n.result-group-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--mj-text-muted);\n font-size: 0.75rem;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n font-weight: 600;\n}\n\n.result-group-label[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.result-group-count[_ngcontent-%COMP%] {\n font-size: 0.72rem;\n color: var(--mj-text-disabled);\n}\n\n\n\n.result-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 0.75rem;\n padding: 0.6rem 1rem;\n cursor: pointer;\n transition: background 0.1s ease;\n}\n\n.result-item[_ngcontent-%COMP%]:hover, \n.result-item-highlighted[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-hover);\n}\n\n.result-item-icon[_ngcontent-%COMP%] {\n width: 2rem;\n height: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n font-size: 0.85rem;\n flex-shrink: 0;\n margin-top: 0.1rem;\n}\n\n.result-item-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.result-item-title[_ngcontent-%COMP%] {\n color: var(--mj-text-primary);\n font-weight: 500;\n font-size: 0.9rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.result-item-snippet[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 0.8rem;\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n margin-top: 0.15rem;\n}\n\n.result-item-tags[_ngcontent-%COMP%] {\n display: flex;\n gap: 0.3rem;\n margin-top: 0.3rem;\n}\n\n.result-tag[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 0.1rem 0.4rem;\n border-radius: 4px;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n font-size: 0.7rem;\n}\n\n.result-item-score[_ngcontent-%COMP%] {\n flex-shrink: 0;\n margin-top: 0.2rem;\n}\n\n.score-badge[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 0.15rem 0.45rem;\n border-radius: 9999px;\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 0.72rem;\n font-weight: 600;\n}\n\n\n\n.search-footer[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 1rem;\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.search-footer-count[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 0.78rem;\n}\n\n\n\n.agent-cta-btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.6rem 1.2rem;\n border-radius: 8px;\n border: none;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n font-size: 0.85rem;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.agent-cta-btn[_ngcontent-%COMP%]:hover {\n background: var(--mj-brand-primary-hover);\n}\n\n.agent-cta-btn-small[_ngcontent-%COMP%] {\n padding: 0.35rem 0.8rem;\n font-size: 0.78rem;\n}\n\n\n\n@media (max-width: 640px) {\n .search-spotlight[_ngcontent-%COMP%] {\n top: 0;\n left: 0;\n right: 0;\n transform: none;\n width: 100%;\n max-width: 100%;\n max-height: 100vh;\n border-radius: 0;\n }\n\n .search-results-area[_ngcontent-%COMP%] {\n max-height: calc(100vh - 56px);\n }\n\n .search-filter-bar[_ngcontent-%COMP%] {\n overflow-x: auto;\n flex-wrap: nowrap;\n -webkit-overflow-scrolling: touch;\n }\n}"] });
|
|
588
|
+
}
|
|
589
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchOverlayComponent, [{
|
|
590
|
+
type: Component,
|
|
591
|
+
args: [{ standalone: false, selector: 'mj-search-overlay', template: "@if (IsOpen) {\n <!-- Backdrop -->\n <div class=\"search-backdrop\" (click)=\"OnBackdropClick()\"></div>\n\n <!-- Spotlight container -->\n <div class=\"search-spotlight\" (click)=\"$event.stopPropagation()\">\n <!-- Search input area -->\n <div class=\"search-input-wrap\">\n <i class=\"fa-solid fa-magnifying-glass search-icon\"></i>\n <input\n #searchInput\n type=\"text\"\n class=\"search-input\"\n [placeholder]=\"Placeholder\"\n [value]=\"Query\"\n (input)=\"OnQueryInput($any($event.target).value)\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n />\n @if (IsSearching) {\n <div class=\"search-spinner\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n </div>\n }\n <div class=\"search-shortcut-hint\">\n <kbd>ESC</kbd>\n </div>\n </div>\n\n <!-- Results area -->\n <div class=\"search-results-area\">\n @if (ShowFilters && Filters.length > 0) {\n <!-- Filter chips -->\n <div class=\"search-filter-bar\">\n @for (filter of Filters; track filter.Category) {\n @for (option of filter.Options; track option.Value) {\n <button\n class=\"filter-chip\"\n [class.filter-chip-active]=\"IsFilterActive(filter.Category, option.Value)\"\n (click)=\"OnFilterToggle(filter.Category, option.Value)\"\n >\n @if (option.Icon) {\n <i [class]=\"option.Icon\"></i>\n }\n <span>{{ option.Label }}</span>\n <span class=\"filter-chip-count\">{{ option.Count }}</span>\n </button>\n }\n }\n @if (hasActiveFilters()) {\n <button class=\"filter-clear-btn\" (click)=\"ClearAllFilters()\">\n <i class=\"fa-solid fa-times\"></i> Clear\n </button>\n }\n </div>\n }\n\n @if (HasSearched && AllResults.length === 0 && !IsSearching) {\n <!-- No results -->\n <div class=\"search-empty-state\">\n <i class=\"fa-solid fa-search search-empty-icon\"></i>\n <p class=\"search-empty-title\">No results found</p>\n <p class=\"search-empty-text\">Try different keywords or remove some filters</p>\n @if (ShowAgentCta) {\n <button class=\"agent-cta-btn\" (click)=\"OnAgentCtaClick()\">\n <i class=\"fa-solid fa-robot\"></i>\n {{ AgentCtaText }}\n </button>\n }\n </div>\n }\n\n @if (!HasSearched && !IsSearching) {\n <!-- Recent searches -->\n <div class=\"search-recent\">\n @if (searchService.RecentSearches$.value.length > 0) {\n <div class=\"search-recent-header\">\n <span class=\"search-recent-title\">Recent Searches</span>\n </div>\n @for (recent of searchService.RecentSearches$.value; track recent.Query; let i = $index) {\n @if (i < 5) {\n <div class=\"search-recent-item\" (click)=\"OnQueryInput(recent.Query)\">\n <i class=\"fa-solid fa-clock search-recent-icon\"></i>\n <span>{{ recent.Query }}</span>\n <span class=\"search-recent-count\">{{ recent.ResultCount }} results</span>\n </div>\n }\n }\n } @else {\n <div class=\"search-empty-state search-empty-state-compact\">\n <i class=\"fa-solid fa-magnifying-glass search-empty-icon\"></i>\n <p class=\"search-empty-text\">Start typing to search across all your knowledge</p>\n </div>\n }\n </div>\n }\n\n @if (AllResults.length > 0) {\n <!-- Grouped results -->\n @for (group of ResultGroups; track group.SourceType) {\n <div class=\"result-group\">\n <div class=\"result-group-header\">\n <i [class]=\"group.Icon\"></i>\n <span class=\"result-group-label\">{{ group.Label }}</span>\n <span class=\"result-group-count\">{{ group.TotalCount }}</span>\n </div>\n @for (result of group.Results; track result.ID; let ri = $index) {\n <div\n class=\"result-item\"\n [class.result-item-highlighted]=\"isResultHighlighted(result)\"\n (click)=\"OnResultClick(result, $event)\"\n (mouseenter)=\"HighlightedIndex = getFlatIndex(result)\"\n >\n <div class=\"result-item-icon\">\n <i [class]=\"result.SourceIcon\"></i>\n </div>\n <div class=\"result-item-content\">\n <div class=\"result-item-title\">{{ result.Title }}</div>\n <div class=\"result-item-snippet\">{{ result.Snippet }}</div>\n @if (result.Tags.length > 0) {\n <div class=\"result-item-tags\">\n @for (tag of result.Tags; track tag; let ti = $index) {\n @if (ti < 3) {\n <span class=\"result-tag\">{{ tag }}</span>\n }\n }\n </div>\n }\n </div>\n <div class=\"result-item-score\">\n <span class=\"score-badge\">{{ FormatScore(result.Score) }}</span>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Footer -->\n <div class=\"search-footer\">\n <span class=\"search-footer-count\">\n {{ TotalCount }} results in {{ FormatElapsedTime(ElapsedMs) }}\n </span>\n @if (ShowAgentCta) {\n <button class=\"agent-cta-btn agent-cta-btn-small\" (click)=\"OnAgentCtaClick()\">\n <i class=\"fa-solid fa-robot\"></i>\n {{ AgentCtaText }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n}\n", styles: ["/* Search Overlay - Command Palette / Spotlight Style */\n\n.search-backdrop {\n position: fixed;\n inset: 0;\n background: var(--mj-bg-overlay);\n backdrop-filter: blur(8px);\n z-index: 1000;\n animation: backdropFadeIn 0.2s ease;\n}\n\n@keyframes backdropFadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.search-spotlight {\n position: fixed;\n top: 12%;\n left: 50%;\n transform: translateX(-50%);\n width: 680px;\n max-width: calc(100vw - 2rem);\n max-height: 70vh;\n z-index: 1001;\n display: flex;\n flex-direction: column;\n border-radius: 14px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);\n overflow: hidden;\n animation: spotlightIn 0.25s ease;\n}\n\n@keyframes spotlightIn {\n from {\n opacity: 0;\n transform: translateX(-50%) translateY(-10px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateX(-50%) translateY(0) scale(1);\n }\n}\n\n/* Search Input */\n.search-input-wrap {\n display: flex;\n align-items: center;\n padding: 0.75rem 1rem;\n border-bottom: 1px solid var(--mj-border-default);\n gap: 0.75rem;\n}\n\n.search-icon {\n color: var(--mj-brand-primary);\n font-size: 1.1rem;\n flex-shrink: 0;\n}\n\n.search-input {\n flex: 1;\n border: none;\n background: transparent;\n font-size: 1.1rem;\n color: var(--mj-text-primary);\n outline: none;\n font-family: inherit;\n}\n\n.search-input::placeholder {\n color: var(--mj-text-muted);\n}\n\n.search-spinner {\n color: var(--mj-brand-primary);\n font-size: 1rem;\n}\n\n.search-shortcut-hint kbd {\n display: inline-block;\n padding: 0.15rem 0.5rem;\n border-radius: 4px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n font-size: 0.75rem;\n font-family: inherit;\n}\n\n/* Results Area */\n.search-results-area {\n overflow-y: auto;\n max-height: calc(70vh - 56px);\n}\n\n/* Filter Bar */\n.search-filter-bar {\n display: flex;\n flex-wrap: wrap;\n gap: 0.4rem;\n padding: 0.6rem 1rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-chip {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n padding: 0.25rem 0.6rem;\n border-radius: 9999px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: 0.78rem;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.filter-chip:hover {\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-primary);\n}\n\n.filter-chip-active {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n\n.filter-chip-count {\n opacity: 0.6;\n font-size: 0.72rem;\n}\n\n.filter-clear-btn {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n padding: 0.25rem 0.6rem;\n border-radius: 9999px;\n border: none;\n background: transparent;\n color: var(--mj-text-muted);\n font-size: 0.78rem;\n cursor: pointer;\n}\n\n.filter-clear-btn:hover {\n color: var(--mj-status-error);\n}\n\n/* Empty State */\n.search-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 2.5rem 1rem;\n gap: 0.5rem;\n}\n\n.search-empty-state-compact {\n padding: 1.5rem 1rem;\n}\n\n.search-empty-icon {\n font-size: 2rem;\n color: var(--mj-text-muted);\n margin-bottom: 0.5rem;\n}\n\n.search-empty-title {\n color: var(--mj-text-primary);\n font-weight: 600;\n font-size: 0.95rem;\n}\n\n.search-empty-text {\n color: var(--mj-text-muted);\n font-size: 0.85rem;\n}\n\n/* Recent Searches */\n.search-recent {\n padding: 0.5rem 0;\n}\n\n.search-recent-header {\n padding: 0.5rem 1rem;\n}\n\n.search-recent-title {\n font-size: 0.75rem;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n font-weight: 600;\n}\n\n.search-recent-item {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n padding: 0.5rem 1rem;\n cursor: pointer;\n color: var(--mj-text-secondary);\n font-size: 0.9rem;\n transition: background 0.1s ease;\n}\n\n.search-recent-item:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.search-recent-icon {\n font-size: 0.8rem;\n color: var(--mj-text-muted);\n}\n\n.search-recent-count {\n margin-left: auto;\n font-size: 0.75rem;\n color: var(--mj-text-muted);\n}\n\n/* Result Groups */\n.result-group {\n padding: 0.25rem 0;\n}\n\n.result-group-header {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--mj-text-muted);\n font-size: 0.75rem;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n font-weight: 600;\n}\n\n.result-group-label {\n flex: 1;\n}\n\n.result-group-count {\n font-size: 0.72rem;\n color: var(--mj-text-disabled);\n}\n\n/* Result Items */\n.result-item {\n display: flex;\n align-items: flex-start;\n gap: 0.75rem;\n padding: 0.6rem 1rem;\n cursor: pointer;\n transition: background 0.1s ease;\n}\n\n.result-item:hover,\n.result-item-highlighted {\n background: var(--mj-bg-surface-hover);\n}\n\n.result-item-icon {\n width: 2rem;\n height: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n font-size: 0.85rem;\n flex-shrink: 0;\n margin-top: 0.1rem;\n}\n\n.result-item-content {\n flex: 1;\n min-width: 0;\n}\n\n.result-item-title {\n color: var(--mj-text-primary);\n font-weight: 500;\n font-size: 0.9rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.result-item-snippet {\n color: var(--mj-text-muted);\n font-size: 0.8rem;\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n margin-top: 0.15rem;\n}\n\n.result-item-tags {\n display: flex;\n gap: 0.3rem;\n margin-top: 0.3rem;\n}\n\n.result-tag {\n display: inline-block;\n padding: 0.1rem 0.4rem;\n border-radius: 4px;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n font-size: 0.7rem;\n}\n\n.result-item-score {\n flex-shrink: 0;\n margin-top: 0.2rem;\n}\n\n.score-badge {\n display: inline-block;\n padding: 0.15rem 0.45rem;\n border-radius: 9999px;\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 0.72rem;\n font-weight: 600;\n}\n\n/* Footer */\n.search-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem 1rem;\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.search-footer-count {\n color: var(--mj-text-muted);\n font-size: 0.78rem;\n}\n\n/* Agent CTA Button */\n.agent-cta-btn {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.6rem 1.2rem;\n border-radius: 8px;\n border: none;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n font-size: 0.85rem;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s ease;\n}\n\n.agent-cta-btn:hover {\n background: var(--mj-brand-primary-hover);\n}\n\n.agent-cta-btn-small {\n padding: 0.35rem 0.8rem;\n font-size: 0.78rem;\n}\n\n/* Mobile responsive */\n@media (max-width: 640px) {\n .search-spotlight {\n top: 0;\n left: 0;\n right: 0;\n transform: none;\n width: 100%;\n max-width: 100%;\n max-height: 100vh;\n border-radius: 0;\n }\n\n .search-results-area {\n max-height: calc(100vh - 56px);\n }\n\n .search-filter-bar {\n overflow-x: auto;\n flex-wrap: nowrap;\n -webkit-overflow-scrolling: touch;\n }\n}\n"] }]
|
|
592
|
+
}], null, { searchInputRef: [{
|
|
593
|
+
type: ViewChild,
|
|
594
|
+
args: ['searchInput']
|
|
595
|
+
}], Placeholder: [{
|
|
596
|
+
type: Input
|
|
597
|
+
}], MaxResults: [{
|
|
598
|
+
type: Input
|
|
599
|
+
}], IsOpen: [{
|
|
600
|
+
type: Input
|
|
601
|
+
}], DebounceMs: [{
|
|
602
|
+
type: Input
|
|
603
|
+
}], IncludeSources: [{
|
|
604
|
+
type: Input
|
|
605
|
+
}], ShowFilters: [{
|
|
606
|
+
type: Input
|
|
607
|
+
}], AgentCtaText: [{
|
|
608
|
+
type: Input
|
|
609
|
+
}], ShowAgentCta: [{
|
|
610
|
+
type: Input
|
|
611
|
+
}], IsOpenChange: [{
|
|
612
|
+
type: Output
|
|
613
|
+
}], ResultSelected: [{
|
|
614
|
+
type: Output
|
|
615
|
+
}], FilterChanged: [{
|
|
616
|
+
type: Output
|
|
617
|
+
}], SearchExecuted: [{
|
|
618
|
+
type: Output
|
|
619
|
+
}], AgentCtaClicked: [{
|
|
620
|
+
type: Output
|
|
621
|
+
}], HandleGlobalKeydown: [{
|
|
622
|
+
type: HostListener,
|
|
623
|
+
args: ['document:keydown', ['$event']]
|
|
624
|
+
}] }); })();
|
|
625
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchOverlayComponent, { className: "SearchOverlayComponent", filePath: "src/lib/search-overlay.component.ts", lineNumber: 44 }); })();
|
|
626
|
+
//# sourceMappingURL=search-overlay.component.js.map
|