@memberjunction/ng-search 5.33.0 → 5.34.1

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.
Files changed (34) hide show
  1. package/dist/__tests__/search.service.test.js +101 -0
  2. package/dist/__tests__/search.service.test.js.map +1 -1
  3. package/dist/lib/module.d.ts +6 -4
  4. package/dist/lib/module.d.ts.map +1 -1
  5. package/dist/lib/module.js +14 -4
  6. package/dist/lib/module.js.map +1 -1
  7. package/dist/lib/search-composite.component.d.ts +29 -2
  8. package/dist/lib/search-composite.component.d.ts.map +1 -1
  9. package/dist/lib/search-composite.component.js +72 -7
  10. package/dist/lib/search-composite.component.js.map +1 -1
  11. package/dist/lib/search-overlay.component.d.ts +42 -1
  12. package/dist/lib/search-overlay.component.d.ts.map +1 -1
  13. package/dist/lib/search-overlay.component.js +301 -128
  14. package/dist/lib/search-overlay.component.js.map +1 -1
  15. package/dist/lib/search-scope-child-grid.component.d.ts +166 -0
  16. package/dist/lib/search-scope-child-grid.component.d.ts.map +1 -0
  17. package/dist/lib/search-scope-child-grid.component.js +575 -0
  18. package/dist/lib/search-scope-child-grid.component.js.map +1 -0
  19. package/dist/lib/search-scope-selector.component.d.ts +71 -0
  20. package/dist/lib/search-scope-selector.component.d.ts.map +1 -0
  21. package/dist/lib/search-scope-selector.component.js +354 -0
  22. package/dist/lib/search-scope-selector.component.js.map +1 -0
  23. package/dist/lib/search-types.d.ts +18 -0
  24. package/dist/lib/search-types.d.ts.map +1 -1
  25. package/dist/lib/search-types.js.map +1 -1
  26. package/dist/lib/search.service.d.ts +36 -2
  27. package/dist/lib/search.service.d.ts.map +1 -1
  28. package/dist/lib/search.service.js +81 -2
  29. package/dist/lib/search.service.js.map +1 -1
  30. package/dist/public-api.d.ts +2 -0
  31. package/dist/public-api.d.ts.map +1 -1
  32. package/dist/public-api.js +2 -0
  33. package/dist/public-api.js.map +1 -1
  34. package/package.json +7 -7
@@ -14,63 +14,131 @@ import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';
14
14
  import { SearchService } from './search.service';
15
15
  import * as i0 from "@angular/core";
16
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;
17
+ const _forTrack0 = ($index, $item) => $item.Name;
18
+ const _forTrack1 = ($index, $item) => $item.Category;
19
+ const _forTrack2 = ($index, $item) => $item.Value;
20
+ const _forTrack3 = ($index, $item) => $item.Query;
21
+ const _forTrack4 = ($index, $item) => $item.SourceType;
22
+ const _forTrack5 = ($index, $item) => $item.ID;
22
23
  function SearchOverlayComponent_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
23
24
  i0.ɵɵelementStart(0, "div", 6);
24
- i0.ɵɵelement(1, "i", 12);
25
+ i0.ɵɵelement(1, "i", 13);
25
26
  i0.ɵɵelementEnd();
26
27
  } }
27
- function SearchOverlayComponent_Conditional_0_Conditional_11_For_2_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
28
+ function SearchOverlayComponent_Conditional_0_Conditional_11_Conditional_1_Template(rf, ctx) { if (rf & 1) {
29
+ i0.ɵɵelementStart(0, "span", 14);
30
+ i0.ɵɵelement(1, "i", 16);
31
+ i0.ɵɵelementStart(2, "span");
32
+ i0.ɵɵtext(3, "Searching\u2026");
33
+ i0.ɵɵelementEnd()();
34
+ } }
35
+ function SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
36
+ i0.ɵɵelement(0, "i", 18);
37
+ } }
38
+ function SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
39
+ i0.ɵɵelement(0, "i", 19);
40
+ } }
41
+ function SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
42
+ i0.ɵɵelementStart(0, "span", 22);
43
+ i0.ɵɵtext(1);
44
+ i0.ɵɵelementEnd();
45
+ i0.ɵɵelementStart(2, "span", 21);
46
+ i0.ɵɵtext(3);
47
+ i0.ɵɵelementEnd();
48
+ } if (rf & 2) {
49
+ const p_r3 = i0.ɵɵnextContext().$implicit;
50
+ const ctx_r1 = i0.ɵɵnextContext(3);
51
+ i0.ɵɵadvance();
52
+ i0.ɵɵtextInterpolate(p_r3.Count);
53
+ i0.ɵɵadvance(2);
54
+ i0.ɵɵtextInterpolate(ctx_r1.FormatElapsedTime(p_r3.ElapsedMs));
55
+ } }
56
+ function SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
57
+ i0.ɵɵelementStart(0, "span", 21);
58
+ i0.ɵɵtext(1);
59
+ i0.ɵɵelementEnd();
60
+ } if (rf & 2) {
61
+ const p_r3 = i0.ɵɵnextContext().$implicit;
62
+ i0.ɵɵadvance();
63
+ i0.ɵɵtextInterpolate(p_r3.ErrorMessage);
64
+ } }
65
+ function SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Template(rf, ctx) { if (rf & 1) {
66
+ i0.ɵɵelementStart(0, "span", 17);
67
+ i0.ɵɵconditionalCreate(1, SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Conditional_1_Template, 1, 0, "i", 18)(2, SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Conditional_2_Template, 1, 0, "i", 19);
68
+ i0.ɵɵelementStart(3, "span", 20);
69
+ i0.ɵɵtext(4);
70
+ i0.ɵɵelementEnd();
71
+ i0.ɵɵconditionalCreate(5, SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Conditional_5_Template, 4, 2)(6, SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Conditional_6_Template, 2, 1, "span", 21);
72
+ i0.ɵɵelementEnd();
73
+ } if (rf & 2) {
74
+ const p_r3 = ctx.$implicit;
75
+ i0.ɵɵclassProp("streaming-chip-error", p_r3.State === "Error")("streaming-chip-completed", p_r3.State === "Completed");
76
+ i0.ɵɵadvance();
77
+ i0.ɵɵconditional(p_r3.State === "Completed" ? 1 : 2);
78
+ i0.ɵɵadvance(3);
79
+ i0.ɵɵtextInterpolate(p_r3.Name);
80
+ i0.ɵɵadvance();
81
+ i0.ɵɵconditional(p_r3.State === "Completed" ? 5 : p_r3.ErrorMessage ? 6 : -1);
82
+ } }
83
+ function SearchOverlayComponent_Conditional_0_Conditional_11_Template(rf, ctx) { if (rf & 1) {
84
+ i0.ɵɵelementStart(0, "div", 9);
85
+ i0.ɵɵconditionalCreate(1, SearchOverlayComponent_Conditional_0_Conditional_11_Conditional_1_Template, 4, 0, "span", 14);
86
+ i0.ɵɵrepeaterCreate(2, SearchOverlayComponent_Conditional_0_Conditional_11_For_3_Template, 7, 7, "span", 15, _forTrack0);
87
+ i0.ɵɵelementEnd();
88
+ } if (rf & 2) {
89
+ const ctx_r1 = i0.ɵɵnextContext(2);
90
+ i0.ɵɵadvance();
91
+ i0.ɵɵconditional(ctx_r1.StreamingProviders.length === 0 && ctx_r1.IsSearching ? 1 : -1);
92
+ i0.ɵɵadvance();
93
+ i0.ɵɵrepeater(ctx_r1.StreamingProviders);
94
+ } }
95
+ function SearchOverlayComponent_Conditional_0_Conditional_12_For_2_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
28
96
  i0.ɵɵelement(0, "i");
29
97
  } if (rf & 2) {
30
- const option_r4 = i0.ɵɵnextContext().$implicit;
31
- i0.ɵɵclassMap(option_r4.Icon);
98
+ const option_r5 = i0.ɵɵnextContext().$implicit;
99
+ i0.ɵɵclassMap(option_r5.Icon);
32
100
  } }
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);
101
+ function SearchOverlayComponent_Conditional_0_Conditional_12_For_2_For_1_Template(rf, ctx) { if (rf & 1) {
102
+ const _r4 = i0.ɵɵgetCurrentView();
103
+ i0.ɵɵelementStart(0, "button", 25);
104
+ i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_12_For_2_For_1_Template_button_click_0_listener() { const option_r5 = i0.ɵɵrestoreView(_r4).$implicit; const filter_r6 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnFilterToggle(filter_r6.Category, option_r5.Value)); });
105
+ i0.ɵɵconditionalCreate(1, SearchOverlayComponent_Conditional_0_Conditional_12_For_2_For_1_Conditional_1_Template, 1, 2, "i", 26);
38
106
  i0.ɵɵelementStart(2, "span");
39
107
  i0.ɵɵtext(3);
40
108
  i0.ɵɵelementEnd();
41
- i0.ɵɵelementStart(4, "span", 17);
109
+ i0.ɵɵelementStart(4, "span", 27);
42
110
  i0.ɵɵtext(5);
43
111
  i0.ɵɵelementEnd()();
44
112
  } if (rf & 2) {
45
- const option_r4 = ctx.$implicit;
46
- const filter_r5 = i0.ɵɵnextContext().$implicit;
113
+ const option_r5 = ctx.$implicit;
114
+ const filter_r6 = i0.ɵɵnextContext().$implicit;
47
115
  const ctx_r1 = i0.ɵɵnextContext(3);
48
- i0.ɵɵclassProp("filter-chip-active", ctx_r1.IsFilterActive(filter_r5.Category, option_r4.Value));
116
+ i0.ɵɵclassProp("filter-chip-active", ctx_r1.IsFilterActive(filter_r6.Category, option_r5.Value));
49
117
  i0.ɵɵadvance();
50
- i0.ɵɵconditional(option_r4.Icon ? 1 : -1);
118
+ i0.ɵɵconditional(option_r5.Icon ? 1 : -1);
51
119
  i0.ɵɵadvance(2);
52
- i0.ɵɵtextInterpolate(option_r4.Label);
120
+ i0.ɵɵtextInterpolate(option_r5.Label);
53
121
  i0.ɵɵadvance(2);
54
- i0.ɵɵtextInterpolate(option_r4.Count);
122
+ i0.ɵɵtextInterpolate(option_r5.Count);
55
123
  } }
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);
124
+ function SearchOverlayComponent_Conditional_0_Conditional_12_For_2_Template(rf, ctx) { if (rf & 1) {
125
+ i0.ɵɵrepeaterCreate(0, SearchOverlayComponent_Conditional_0_Conditional_12_For_2_For_1_Template, 6, 5, "button", 24, _forTrack2);
58
126
  } if (rf & 2) {
59
- const filter_r5 = ctx.$implicit;
60
- i0.ɵɵrepeater(filter_r5.Options);
127
+ const filter_r6 = ctx.$implicit;
128
+ i0.ɵɵrepeater(filter_r6.Options);
61
129
  } }
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);
130
+ function SearchOverlayComponent_Conditional_0_Conditional_12_Conditional_3_Template(rf, ctx) { if (rf & 1) {
131
+ const _r7 = i0.ɵɵgetCurrentView();
132
+ i0.ɵɵelementStart(0, "button", 28);
133
+ i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_12_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.ClearAllFilters()); });
134
+ i0.ɵɵelement(1, "i", 29);
67
135
  i0.ɵɵtext(2, " Clear ");
68
136
  i0.ɵɵelementEnd();
69
137
  } }
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);
138
+ function SearchOverlayComponent_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
139
+ i0.ɵɵelementStart(0, "div", 10);
140
+ i0.ɵɵrepeaterCreate(1, SearchOverlayComponent_Conditional_0_Conditional_12_For_2_Template, 2, 0, null, null, _forTrack1);
141
+ i0.ɵɵconditionalCreate(3, SearchOverlayComponent_Conditional_0_Conditional_12_Conditional_3_Template, 3, 0, "button", 23);
74
142
  i0.ɵɵelementEnd();
75
143
  } if (rf & 2) {
76
144
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -79,11 +147,11 @@ function SearchOverlayComponent_Conditional_0_Conditional_11_Template(rf, ctx) {
79
147
  i0.ɵɵadvance(2);
80
148
  i0.ɵɵconditional(ctx_r1.hasActiveFilters() ? 3 : -1);
81
149
  } }
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);
150
+ function SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_6_Template(rf, ctx) { if (rf & 1) {
151
+ const _r8 = i0.ɵɵgetCurrentView();
152
+ i0.ɵɵelementStart(0, "button", 34);
153
+ i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnAgentCtaClick()); });
154
+ i0.ɵɵelement(1, "i", 35);
87
155
  i0.ɵɵtext(2);
88
156
  i0.ɵɵelementEnd();
89
157
  } if (rf & 2) {
@@ -91,156 +159,156 @@ function SearchOverlayComponent_Conditional_0_Conditional_12_Conditional_6_Templ
91
159
  i0.ɵɵadvance(2);
92
160
  i0.ɵɵtextInterpolate1(" ", ctx_r1.AgentCtaText, " ");
93
161
  } }
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);
162
+ function SearchOverlayComponent_Conditional_0_Conditional_13_Template(rf, ctx) { if (rf & 1) {
163
+ i0.ɵɵelementStart(0, "div", 11);
164
+ i0.ɵɵelement(1, "i", 30);
165
+ i0.ɵɵelementStart(2, "p", 31);
98
166
  i0.ɵɵtext(3, "No results found");
99
167
  i0.ɵɵelementEnd();
100
- i0.ɵɵelementStart(4, "p", 22);
168
+ i0.ɵɵelementStart(4, "p", 32);
101
169
  i0.ɵɵtext(5, "Try different keywords or remove some filters");
102
170
  i0.ɵɵelementEnd();
103
- i0.ɵɵconditionalCreate(6, SearchOverlayComponent_Conditional_0_Conditional_12_Conditional_6_Template, 3, 1, "button", 23);
171
+ i0.ɵɵconditionalCreate(6, SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_6_Template, 3, 1, "button", 33);
104
172
  i0.ɵɵelementEnd();
105
173
  } if (rf & 2) {
106
174
  const ctx_r1 = i0.ɵɵnextContext(2);
107
175
  i0.ɵɵadvance(6);
108
176
  i0.ɵɵconditional(ctx_r1.ShowAgentCta ? 6 : -1);
109
177
  } }
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);
178
+ function SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_1_For_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
179
+ const _r9 = i0.ɵɵgetCurrentView();
180
+ i0.ɵɵelementStart(0, "div", 40);
181
+ i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_1_For_4_Conditional_0_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r9); const recent_r10 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnQueryInput(recent_r10.Query)); });
182
+ i0.ɵɵelement(1, "i", 41);
115
183
  i0.ɵɵelementStart(2, "span");
116
184
  i0.ɵɵtext(3);
117
185
  i0.ɵɵelementEnd();
118
- i0.ɵɵelementStart(4, "span", 32);
186
+ i0.ɵɵelementStart(4, "span", 42);
119
187
  i0.ɵɵtext(5);
120
188
  i0.ɵɵelementEnd()();
121
189
  } if (rf & 2) {
122
- const recent_r9 = i0.ɵɵnextContext().$implicit;
190
+ const recent_r10 = i0.ɵɵnextContext().$implicit;
123
191
  i0.ɵɵadvance(3);
124
- i0.ɵɵtextInterpolate(recent_r9.Query);
192
+ i0.ɵɵtextInterpolate(recent_r10.Query);
125
193
  i0.ɵɵadvance(2);
126
- i0.ɵɵtextInterpolate1("", recent_r9.ResultCount, " results");
194
+ i0.ɵɵtextInterpolate1("", recent_r10.ResultCount, " results");
127
195
  } }
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);
196
+ function SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_1_For_4_Template(rf, ctx) { if (rf & 1) {
197
+ i0.ɵɵconditionalCreate(0, SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_1_For_4_Conditional_0_Template, 6, 2, "div", 39);
130
198
  } if (rf & 2) {
131
- const ɵ$index_72_r10 = ctx.$index;
132
- i0.ɵɵconditional(ɵ$index_72_r10 < 5 ? 0 : -1);
199
+ const ɵ$index_106_r11 = ctx.$index;
200
+ i0.ɵɵconditional(ɵ$index_106_r11 < 5 ? 0 : -1);
133
201
  } }
134
- function SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_1_Template(rf, ctx) { if (rf & 1) {
135
- i0.ɵɵelementStart(0, "div", 27)(1, "span", 28);
202
+ function SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_1_Template(rf, ctx) { if (rf & 1) {
203
+ i0.ɵɵelementStart(0, "div", 37)(1, "span", 38);
136
204
  i0.ɵɵtext(2, "Recent Searches");
137
205
  i0.ɵɵelementEnd()();
138
- i0.ɵɵrepeaterCreate(3, SearchOverlayComponent_Conditional_0_Conditional_13_Conditional_1_For_4_Template, 1, 1, null, null, _forTrack2);
206
+ i0.ɵɵrepeaterCreate(3, SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_1_For_4_Template, 1, 1, null, null, _forTrack3);
139
207
  } if (rf & 2) {
140
208
  const ctx_r1 = i0.ɵɵnextContext(3);
141
209
  i0.ɵɵadvance(3);
142
210
  i0.ɵɵrepeater(ctx_r1.searchService.RecentSearches$.value);
143
211
  } }
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);
212
+ function SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_2_Template(rf, ctx) { if (rf & 1) {
213
+ i0.ɵɵelementStart(0, "div", 36);
214
+ i0.ɵɵelement(1, "i", 43);
215
+ i0.ɵɵelementStart(2, "p", 32);
148
216
  i0.ɵɵtext(3, "Start typing to search across all your knowledge");
149
217
  i0.ɵɵelementEnd()();
150
218
  } }
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);
219
+ function SearchOverlayComponent_Conditional_0_Conditional_14_Template(rf, ctx) { if (rf & 1) {
220
+ i0.ɵɵelementStart(0, "div", 12);
221
+ i0.ɵɵconditionalCreate(1, SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_1_Template, 5, 0)(2, SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_2_Template, 4, 0, "div", 36);
154
222
  i0.ɵɵelementEnd();
155
223
  } if (rf & 2) {
156
224
  const ctx_r1 = i0.ɵɵnextContext(2);
157
225
  i0.ɵɵadvance();
158
226
  i0.ɵɵconditional(ctx_r1.searchService.RecentSearches$.value.length > 0 ? 1 : 2);
159
227
  } }
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);
228
+ function SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Conditional_8_For_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
229
+ i0.ɵɵelementStart(0, "span", 60);
162
230
  i0.ɵɵtext(1);
163
231
  i0.ɵɵelementEnd();
164
232
  } if (rf & 2) {
165
- const tag_r13 = i0.ɵɵnextContext().$implicit;
233
+ const tag_r14 = i0.ɵɵnextContext().$implicit;
166
234
  i0.ɵɵadvance();
167
- i0.ɵɵtextInterpolate(tag_r13);
235
+ i0.ɵɵtextInterpolate(tag_r14);
168
236
  } }
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);
237
+ function SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
238
+ i0.ɵɵconditionalCreate(0, SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Conditional_8_For_2_Conditional_0_Template, 2, 1, "span", 60);
171
239
  } if (rf & 2) {
172
- const ɵ$index_124_r14 = ctx.$index;
173
- i0.ɵɵconditional(ɵ$index_124_r14 < 3 ? 0 : -1);
240
+ const ɵ$index_158_r15 = ctx.$index;
241
+ i0.ɵɵconditional(ɵ$index_158_r15 < 3 ? 0 : -1);
174
242
  } }
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);
243
+ function SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Conditional_8_Template(rf, ctx) { if (rf & 1) {
244
+ i0.ɵɵelementStart(0, "div", 57);
245
+ i0.ɵɵrepeaterCreate(1, SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Conditional_8_For_2_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIdentity);
178
246
  i0.ɵɵelementEnd();
179
247
  } if (rf & 2) {
180
- const result_r12 = i0.ɵɵnextContext().$implicit;
248
+ const result_r13 = i0.ɵɵnextContext().$implicit;
181
249
  i0.ɵɵadvance();
182
- i0.ɵɵrepeater(result_r12.Tags);
250
+ i0.ɵɵrepeater(result_r13.Tags);
183
251
  } }
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);
252
+ function SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Template(rf, ctx) { if (rf & 1) {
253
+ const _r12 = i0.ɵɵgetCurrentView();
254
+ i0.ɵɵelementStart(0, "div", 52);
255
+ i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Template_div_click_0_listener($event) { const result_r13 = i0.ɵɵrestoreView(_r12).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.OnResultClick(result_r13, $event)); })("mouseenter", function SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Template_div_mouseenter_0_listener() { const result_r13 = i0.ɵɵrestoreView(_r12).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.HighlightedIndex = ctx_r1.getFlatIndex(result_r13)); });
256
+ i0.ɵɵelementStart(1, "div", 53);
189
257
  i0.ɵɵelement(2, "i");
190
258
  i0.ɵɵelementEnd();
191
- i0.ɵɵelementStart(3, "div", 44)(4, "div", 45);
259
+ i0.ɵɵelementStart(3, "div", 54)(4, "div", 55);
192
260
  i0.ɵɵtext(5);
193
261
  i0.ɵɵelementEnd();
194
- i0.ɵɵelementStart(6, "div", 46);
262
+ i0.ɵɵelementStart(6, "div", 56);
195
263
  i0.ɵɵtext(7);
196
264
  i0.ɵɵelementEnd();
197
- i0.ɵɵconditionalCreate(8, SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Conditional_8_Template, 3, 0, "div", 47);
265
+ i0.ɵɵconditionalCreate(8, SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Conditional_8_Template, 3, 0, "div", 57);
198
266
  i0.ɵɵelementEnd();
199
- i0.ɵɵelementStart(9, "div", 48)(10, "span", 49);
267
+ i0.ɵɵelementStart(9, "div", 58)(10, "span", 59);
200
268
  i0.ɵɵtext(11);
201
269
  i0.ɵɵelementEnd()()();
202
270
  } if (rf & 2) {
203
- const result_r12 = ctx.$implicit;
271
+ const result_r13 = ctx.$implicit;
204
272
  const ctx_r1 = i0.ɵɵnextContext(4);
205
- i0.ɵɵclassProp("result-item-highlighted", ctx_r1.isResultHighlighted(result_r12));
273
+ i0.ɵɵclassProp("result-item-highlighted", ctx_r1.isResultHighlighted(result_r13));
206
274
  i0.ɵɵadvance(2);
207
- i0.ɵɵclassMap(result_r12.SourceIcon);
275
+ i0.ɵɵclassMap(result_r13.SourceIcon);
208
276
  i0.ɵɵadvance(3);
209
- i0.ɵɵtextInterpolate(result_r12.Title);
277
+ i0.ɵɵtextInterpolate(result_r13.Title);
210
278
  i0.ɵɵadvance(2);
211
- i0.ɵɵtextInterpolate(result_r12.Snippet);
279
+ i0.ɵɵtextInterpolate(result_r13.Snippet);
212
280
  i0.ɵɵadvance();
213
- i0.ɵɵconditional(result_r12.Tags.length > 0 ? 8 : -1);
281
+ i0.ɵɵconditional(result_r13.Tags.length > 0 ? 8 : -1);
214
282
  i0.ɵɵadvance(3);
215
- i0.ɵɵtextInterpolate(ctx_r1.FormatScore(result_r12.Score));
283
+ i0.ɵɵtextInterpolate(ctx_r1.FormatScore(result_r13.Score));
216
284
  } }
217
- function SearchOverlayComponent_Conditional_0_Conditional_14_For_1_Template(rf, ctx) { if (rf & 1) {
218
- i0.ɵɵelementStart(0, "div", 34)(1, "div", 38);
285
+ function SearchOverlayComponent_Conditional_0_Conditional_15_For_1_Template(rf, ctx) { if (rf & 1) {
286
+ i0.ɵɵelementStart(0, "div", 44)(1, "div", 48);
219
287
  i0.ɵɵelement(2, "i");
220
- i0.ɵɵelementStart(3, "span", 39);
288
+ i0.ɵɵelementStart(3, "span", 49);
221
289
  i0.ɵɵtext(4);
222
290
  i0.ɵɵelementEnd();
223
- i0.ɵɵelementStart(5, "span", 40);
291
+ i0.ɵɵelementStart(5, "span", 50);
224
292
  i0.ɵɵtext(6);
225
293
  i0.ɵɵelementEnd()();
226
- i0.ɵɵrepeaterCreate(7, SearchOverlayComponent_Conditional_0_Conditional_14_For_1_For_8_Template, 12, 8, "div", 41, _forTrack4);
294
+ i0.ɵɵrepeaterCreate(7, SearchOverlayComponent_Conditional_0_Conditional_15_For_1_For_8_Template, 12, 8, "div", 51, _forTrack5);
227
295
  i0.ɵɵelementEnd();
228
296
  } if (rf & 2) {
229
- const group_r15 = ctx.$implicit;
297
+ const group_r16 = ctx.$implicit;
230
298
  i0.ɵɵadvance(2);
231
- i0.ɵɵclassMap(group_r15.Icon);
299
+ i0.ɵɵclassMap(group_r16.Icon);
232
300
  i0.ɵɵadvance(2);
233
- i0.ɵɵtextInterpolate(group_r15.Label);
301
+ i0.ɵɵtextInterpolate(group_r16.Label);
234
302
  i0.ɵɵadvance(2);
235
- i0.ɵɵtextInterpolate(group_r15.TotalCount);
303
+ i0.ɵɵtextInterpolate(group_r16.TotalCount);
236
304
  i0.ɵɵadvance();
237
- i0.ɵɵrepeater(group_r15.Results);
305
+ i0.ɵɵrepeater(group_r16.Results);
238
306
  } }
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);
307
+ function SearchOverlayComponent_Conditional_0_Conditional_15_Conditional_5_Template(rf, ctx) { if (rf & 1) {
308
+ const _r17 = i0.ɵɵgetCurrentView();
309
+ i0.ɵɵelementStart(0, "button", 61);
310
+ i0.ɵɵlistener("click", function SearchOverlayComponent_Conditional_0_Conditional_15_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnAgentCtaClick()); });
311
+ i0.ɵɵelement(1, "i", 35);
244
312
  i0.ɵɵtext(2);
245
313
  i0.ɵɵelementEnd();
246
314
  } if (rf & 2) {
@@ -248,12 +316,12 @@ function SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_5_Templ
248
316
  i0.ɵɵadvance(2);
249
317
  i0.ɵɵtextInterpolate1(" ", ctx_r1.AgentCtaText, " ");
250
318
  } }
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);
319
+ function SearchOverlayComponent_Conditional_0_Conditional_15_Template(rf, ctx) { if (rf & 1) {
320
+ i0.ɵɵrepeaterCreate(0, SearchOverlayComponent_Conditional_0_Conditional_15_For_1_Template, 9, 4, "div", 44, _forTrack4);
321
+ i0.ɵɵelementStart(2, "div", 45)(3, "span", 46);
254
322
  i0.ɵɵtext(4);
255
323
  i0.ɵɵelementEnd();
256
- i0.ɵɵconditionalCreate(5, SearchOverlayComponent_Conditional_0_Conditional_14_Conditional_5_Template, 3, 1, "button", 37);
324
+ i0.ɵɵconditionalCreate(5, SearchOverlayComponent_Conditional_0_Conditional_15_Conditional_5_Template, 3, 1, "button", 47);
257
325
  i0.ɵɵelementEnd();
258
326
  } if (rf & 2) {
259
327
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -281,9 +349,10 @@ function SearchOverlayComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
281
349
  i0.ɵɵelementEnd()()();
282
350
  i0.ɵɵelementStart(10, "div", 8);
283
351
  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);
352
+ i0.ɵɵconditionalCreate(12, SearchOverlayComponent_Conditional_0_Conditional_12_Template, 4, 1, "div", 10);
353
+ i0.ɵɵconditionalCreate(13, SearchOverlayComponent_Conditional_0_Conditional_13_Template, 7, 1, "div", 11);
354
+ i0.ɵɵconditionalCreate(14, SearchOverlayComponent_Conditional_0_Conditional_14_Template, 3, 1, "div", 12);
355
+ i0.ɵɵconditionalCreate(15, SearchOverlayComponent_Conditional_0_Conditional_15_Template, 6, 3);
287
356
  i0.ɵɵelementEnd()();
288
357
  } if (rf & 2) {
289
358
  const ctx_r1 = i0.ɵɵnextContext();
@@ -292,13 +361,15 @@ function SearchOverlayComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
292
361
  i0.ɵɵadvance(2);
293
362
  i0.ɵɵconditional(ctx_r1.IsSearching ? 6 : -1);
294
363
  i0.ɵɵadvance(5);
295
- i0.ɵɵconditional(ctx_r1.ShowFilters && ctx_r1.Filters.length > 0 ? 11 : -1);
364
+ i0.ɵɵconditional(ctx_r1.EnableStreaming && (ctx_r1.IsSearching || ctx_r1.StreamingProviders.length > 0) ? 11 : -1);
365
+ i0.ɵɵadvance();
366
+ i0.ɵɵconditional(ctx_r1.ShowFilters && ctx_r1.Filters.length > 0 ? 12 : -1);
296
367
  i0.ɵɵadvance();
297
- i0.ɵɵconditional(ctx_r1.HasSearched && ctx_r1.AllResults.length === 0 && !ctx_r1.IsSearching ? 12 : -1);
368
+ i0.ɵɵconditional(ctx_r1.HasSearched && ctx_r1.AllResults.length === 0 && !ctx_r1.IsSearching ? 13 : -1);
298
369
  i0.ɵɵadvance();
299
- i0.ɵɵconditional(!ctx_r1.HasSearched && !ctx_r1.IsSearching ? 13 : -1);
370
+ i0.ɵɵconditional(!ctx_r1.HasSearched && !ctx_r1.IsSearching ? 14 : -1);
300
371
  i0.ɵɵadvance();
301
- i0.ɵɵconditional(ctx_r1.AllResults.length > 0 ? 14 : -1);
372
+ i0.ɵɵconditional(ctx_r1.AllResults.length > 0 ? 15 : -1);
302
373
  } }
303
374
  export class SearchOverlayComponent {
304
375
  cdr = inject(ChangeDetectorRef);
@@ -336,6 +407,13 @@ export class SearchOverlayComponent {
336
407
  AgentCtaText = 'Ask Knowledge Agent';
337
408
  /** Whether to show the agent CTA */
338
409
  ShowAgentCta = true;
410
+ /**
411
+ * When true, the overlay subscribes to `SearchService.StreamSearch` instead of awaiting
412
+ * `ExecuteSearch`. Results render progressively as each provider reports back. The
413
+ * per-provider status chip strip becomes visible while the stream is in flight.
414
+ * Defaults to false to preserve the request-response UX that shipped in Phase 1.
415
+ */
416
+ EnableStreaming = false;
339
417
  // --- Outputs ---
340
418
  IsOpenChange = new EventEmitter();
341
419
  ResultSelected = new EventEmitter();
@@ -354,6 +432,14 @@ export class SearchOverlayComponent {
354
432
  HighlightedIndex = -1;
355
433
  HasSearched = false;
356
434
  searchVersion = 0;
435
+ /**
436
+ * Per-provider status entries shown above the results list while a streaming search
437
+ * is in flight. One entry per provider that has reported back. Empty when the user
438
+ * is not running a streaming search (or when `EnableStreaming` is false).
439
+ */
440
+ StreamingProviders = [];
441
+ /** Active stream subscription so we can cancel on a new search or destroy. */
442
+ currentStream = null;
357
443
  /** All results flattened for keyboard navigation */
358
444
  get FlatResults() {
359
445
  return this.AllResults;
@@ -363,6 +449,8 @@ export class SearchOverlayComponent {
363
449
  this.subscribeToSearchState();
364
450
  }
365
451
  ngOnDestroy() {
452
+ this.currentStream?.unsubscribe();
453
+ this.currentStream = null;
366
454
  this.destroy$.next();
367
455
  this.destroy$.complete();
368
456
  }
@@ -525,6 +613,10 @@ export class SearchOverlayComponent {
525
613
  ActiveFilters: this.ActiveFilters,
526
614
  IncludeSources: this.IncludeSources,
527
615
  };
616
+ if (this.EnableStreaming) {
617
+ this.executeStreamingSearch(query, request, version);
618
+ return;
619
+ }
528
620
  const response = await this.searchService.ExecuteSearch(request);
529
621
  // Discard results if a newer search was triggered while this one was in-flight
530
622
  if (version !== this.searchVersion) {
@@ -545,6 +637,85 @@ export class SearchOverlayComponent {
545
637
  });
546
638
  this.cdr.detectChanges();
547
639
  }
640
+ /**
641
+ * Streaming variant of executeSearch — subscribes to `SearchService.StreamSearch` and
642
+ * progressively updates the result list as each provider reports back. The 'final'
643
+ * event carries the canonical fused/reranked list, which replaces the partials.
644
+ *
645
+ * Cancellation: a new search invocation tears down the in-flight stream via
646
+ * `searchVersion` and `currentStream.unsubscribe()`.
647
+ */
648
+ executeStreamingSearch(query, request, version) {
649
+ // Tear down any prior stream so we don't get cross-talk between consecutive queries.
650
+ this.currentStream?.unsubscribe();
651
+ this.currentStream = null;
652
+ // Reset visible state for a fresh stream.
653
+ this.StreamingProviders = [];
654
+ this.AllResults = [];
655
+ this.ResultGroups = [];
656
+ this.TotalCount = 0;
657
+ this.ElapsedMs = 0;
658
+ this.HasSearched = true;
659
+ this.HighlightedIndex = -1;
660
+ this.cdr.detectChanges();
661
+ this.currentStream = this.searchService.StreamSearch(request).subscribe({
662
+ next: (event) => {
663
+ if (version !== this.searchVersion)
664
+ return;
665
+ if (event.Phase === 'provider' && event.ProviderName) {
666
+ const count = event.Results?.length ?? 0;
667
+ this.StreamingProviders = [
668
+ ...this.StreamingProviders,
669
+ {
670
+ Name: event.ProviderName,
671
+ Count: count,
672
+ ElapsedMs: event.ElapsedMs ?? 0,
673
+ State: 'Completed',
674
+ },
675
+ ];
676
+ if (event.Results && event.Results.length > 0) {
677
+ // Append partials so the user sees the list grow as providers return.
678
+ this.AllResults = [...this.AllResults, ...event.Results];
679
+ this.ResultGroups = this.searchService.GroupResults(this.AllResults);
680
+ this.TotalCount = this.AllResults.length;
681
+ if (this.HighlightedIndex < 0) {
682
+ this.HighlightedIndex = 0;
683
+ }
684
+ }
685
+ }
686
+ else if (event.Phase === 'final' && event.Results) {
687
+ // Replace the appended partials with the canonical fused/reranked list.
688
+ this.AllResults = event.Results;
689
+ this.ResultGroups = this.searchService.GroupResults(this.AllResults);
690
+ this.Filters = this.searchService.BuildFilters(this.AllResults);
691
+ this.TotalCount = event.Results.length;
692
+ this.ElapsedMs = event.ElapsedMs ?? this.ElapsedMs;
693
+ this.HighlightedIndex = event.Results.length > 0 ? 0 : -1;
694
+ }
695
+ this.cdr.detectChanges();
696
+ },
697
+ error: (err) => {
698
+ if (version !== this.searchVersion)
699
+ return;
700
+ this.StreamingProviders = [
701
+ ...this.StreamingProviders,
702
+ { Name: 'stream', Count: 0, ElapsedMs: 0, State: 'Error', ErrorMessage: err.message },
703
+ ];
704
+ this.cdr.detectChanges();
705
+ },
706
+ complete: () => {
707
+ if (version !== this.searchVersion)
708
+ return;
709
+ this.SearchExecuted.emit({
710
+ Query: query,
711
+ Filters: this.ActiveFilters,
712
+ ResultCount: this.TotalCount,
713
+ ElapsedMs: this.ElapsedMs,
714
+ });
715
+ this.cdr.detectChanges();
716
+ },
717
+ });
718
+ }
548
719
  clearResults() {
549
720
  this.AllResults = [];
550
721
  this.ResultGroups = [];
@@ -586,15 +757,15 @@ export class SearchOverlayComponent {
586
757
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchInputRef = _t.first);
587
758
  } }, hostBindings: function SearchOverlayComponent_HostBindings(rf, ctx) { if (rf & 1) {
588
759
  i0.ɵɵlistener("keydown", function SearchOverlayComponent_keydown_HostBindingHandler($event) { return ctx.HandleGlobalKeydown($event); }, i0.ɵɵresolveDocument);
589
- } }, 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) {
590
- i0.ɵɵconditionalCreate(0, SearchOverlayComponent_Conditional_0_Template, 15, 7);
760
+ } }, inputs: { Placeholder: "Placeholder", MaxResults: "MaxResults", IsOpen: "IsOpen", DebounceMs: "DebounceMs", IncludeSources: "IncludeSources", ShowFilters: "ShowFilters", AgentCtaText: "AgentCtaText", ShowAgentCta: "ShowAgentCta", EnableStreaming: "EnableStreaming" }, 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"], ["aria-live", "polite", 1, "streaming-status-strip"], [1, "search-filter-bar"], [1, "search-empty-state"], [1, "search-recent"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "streaming-chip", "streaming-chip-pending"], [1, "streaming-chip", 3, "streaming-chip-error", "streaming-chip-completed"], [1, "fa-solid", "fa-circle-notch", "fa-spin"], [1, "streaming-chip"], [1, "fa-solid", "fa-check"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "streaming-chip-name"], [1, "streaming-chip-time"], [1, "streaming-chip-count"], [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) {
761
+ i0.ɵɵconditionalCreate(0, SearchOverlayComponent_Conditional_0_Template, 16, 8);
591
762
  } if (rf & 2) {
592
763
  i0.ɵɵconditional(ctx.IsOpen ? 0 : -1);
593
- } }, 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: 99998;\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: 99999;\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}"] });
764
+ } }, 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: 99998;\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: 99999;\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.streaming-status-strip[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 0.4rem;\n padding: 0.5rem 1rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.streaming-chip[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n padding: 0.2rem 0.55rem;\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.74rem;\n}\n\n.streaming-chip-pending[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n}\n\n.streaming-chip-completed[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-success) 10%, var(--mj-bg-surface));\n border-color: var(--mj-status-success-border);\n color: var(--mj-status-success-text);\n}\n\n.streaming-chip-error[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error-text);\n}\n\n.streaming-chip-name[_ngcontent-%COMP%] {\n font-weight: 500;\n}\n\n.streaming-chip-count[_ngcontent-%COMP%] {\n opacity: 0.7;\n}\n\n.streaming-chip-time[_ngcontent-%COMP%] {\n opacity: 0.6;\n font-size: 0.7rem;\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}"] });
594
765
  }
595
766
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchOverlayComponent, [{
596
767
  type: Component,
597
- 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: 99998;\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: 99999;\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"] }]
768
+ 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 (EnableStreaming && (IsSearching || StreamingProviders.length > 0)) {\n <!-- Streaming status strip \u2014 one chip per provider that has reported -->\n <div class=\"streaming-status-strip\" aria-live=\"polite\">\n @if (StreamingProviders.length === 0 && IsSearching) {\n <span class=\"streaming-chip streaming-chip-pending\">\n <i class=\"fa-solid fa-circle-notch fa-spin\"></i>\n <span>Searching\u2026</span>\n </span>\n }\n @for (p of StreamingProviders; track p.Name) {\n <span class=\"streaming-chip\"\n [class.streaming-chip-error]=\"p.State === 'Error'\"\n [class.streaming-chip-completed]=\"p.State === 'Completed'\">\n @if (p.State === 'Completed') {\n <i class=\"fa-solid fa-check\"></i>\n } @else {\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n }\n <span class=\"streaming-chip-name\">{{ p.Name }}</span>\n @if (p.State === 'Completed') {\n <span class=\"streaming-chip-count\">{{ p.Count }}</span>\n <span class=\"streaming-chip-time\">{{ FormatElapsedTime(p.ElapsedMs) }}</span>\n } @else if (p.ErrorMessage) {\n <span class=\"streaming-chip-time\">{{ p.ErrorMessage }}</span>\n }\n </span>\n }\n </div>\n }\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: 99998;\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: 99999;\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.streaming-status-strip {\n display: flex;\n flex-wrap: wrap;\n gap: 0.4rem;\n padding: 0.5rem 1rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.streaming-chip {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n padding: 0.2rem 0.55rem;\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.74rem;\n}\n\n.streaming-chip-pending {\n color: var(--mj-text-muted);\n}\n\n.streaming-chip-completed {\n background: color-mix(in srgb, var(--mj-status-success) 10%, var(--mj-bg-surface));\n border-color: var(--mj-status-success-border);\n color: var(--mj-status-success-text);\n}\n\n.streaming-chip-error {\n background: color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface));\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error-text);\n}\n\n.streaming-chip-name {\n font-weight: 500;\n}\n\n.streaming-chip-count {\n opacity: 0.7;\n}\n\n.streaming-chip-time {\n opacity: 0.6;\n font-size: 0.7rem;\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"] }]
598
769
  }], null, { searchInputRef: [{
599
770
  type: ViewChild,
600
771
  args: ['searchInput']
@@ -614,6 +785,8 @@ export class SearchOverlayComponent {
614
785
  type: Input
615
786
  }], ShowAgentCta: [{
616
787
  type: Input
788
+ }], EnableStreaming: [{
789
+ type: Input
617
790
  }], IsOpenChange: [{
618
791
  type: Output
619
792
  }], ResultSelected: [{
@@ -628,5 +801,5 @@ export class SearchOverlayComponent {
628
801
  type: HostListener,
629
802
  args: ['document:keydown', ['$event']]
630
803
  }] }); })();
631
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchOverlayComponent, { className: "SearchOverlayComponent", filePath: "src/lib/search-overlay.component.ts", lineNumber: 44 }); })();
804
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchOverlayComponent, { className: "SearchOverlayComponent", filePath: "src/lib/search-overlay.component.ts", lineNumber: 62 }); })();
632
805
  //# sourceMappingURL=search-overlay.component.js.map