@memberjunction/ng-explorer-core 5.23.0 → 5.25.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/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +15 -22
- package/dist/app-routing.module.js.map +1 -1
- package/dist/generated/lazy-feature-config.d.ts +1 -1
- package/dist/generated/lazy-feature-config.d.ts.map +1 -1
- package/dist/generated/lazy-feature-config.js +6 -4
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.js +1 -0
- package/dist/lib/resource-wrappers/artifact-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts +16 -17
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js +56 -62
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +2 -4
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +9 -13
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts +2 -15
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js +18 -52
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts +2 -3
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +7 -9
- package/dist/lib/resource-wrappers/dashboard-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/list-detail-resource.component.d.ts +3 -1
- package/dist/lib/resource-wrappers/list-detail-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/list-detail-resource.component.js +4 -0
- package/dist/lib/resource-wrappers/list-detail-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/notifications-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/notifications-resource.component.js +2 -0
- package/dist/lib/resource-wrappers/notifications-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/query-resource.component.js +1 -0
- package/dist/lib/resource-wrappers/query-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts +74 -4
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.js +786 -25
- package/dist/lib/resource-wrappers/search-results-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.d.ts +7 -4
- package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +30 -14
- package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
- package/dist/lib/services/startup-validation.service.d.ts.map +1 -1
- package/dist/lib/services/startup-validation.service.js +0 -3
- package/dist/lib/services/startup-validation.service.js.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts +7 -0
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.js +10 -4
- package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
- package/dist/lib/shell/shell.component.d.ts +28 -8
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +416 -219
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/shell/shell.module.d.ts +2 -1
- package/dist/lib/shell/shell.module.d.ts.map +1 -1
- package/dist/lib/shell/shell.module.js +7 -3
- package/dist/lib/shell/shell.module.js.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts +6 -0
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +63 -38
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js +1 -0
- package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
- package/dist/lib/user-menu/base-user-menu.d.ts +7 -7
- package/dist/lib/user-menu/base-user-menu.d.ts.map +1 -1
- package/dist/lib/user-menu/base-user-menu.js +8 -1
- package/dist/lib/user-menu/base-user-menu.js.map +1 -1
- package/dist/lib/user-menu/user-menu.types.d.ts +15 -0
- package/dist/lib/user-menu/user-menu.types.d.ts.map +1 -1
- package/dist/lib/user-menu/user-menu.types.js.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.d.ts +6 -3
- package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +46 -19
- package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
- package/dist/module.d.ts +53 -52
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +11 -7
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +0 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +0 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +40 -37
- package/dist/lib/generic/form-toolbar.d.ts +0 -8
- package/dist/lib/generic/form-toolbar.d.ts.map +0 -1
- package/dist/lib/generic/form-toolbar.js +0 -114
- package/dist/lib/generic/form-toolbar.js.map +0 -1
|
@@ -4,39 +4,666 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { Component } from '@angular/core';
|
|
7
|
+
import { Component, ChangeDetectorRef, inject } from '@angular/core';
|
|
8
8
|
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
9
|
+
import { CompositeKey, Metadata, RunView } from '@memberjunction/core';
|
|
9
10
|
import { RegisterClass } from '@memberjunction/global';
|
|
10
|
-
import {
|
|
11
|
+
import { FileOpenService } from '@memberjunction/ng-file-storage';
|
|
12
|
+
import { SearchService, } from '@memberjunction/ng-search';
|
|
11
13
|
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "
|
|
14
|
+
import * as i1 from "@angular/forms";
|
|
15
|
+
import * as i2 from "@memberjunction/ng-shared-generic";
|
|
16
|
+
import * as i3 from "@memberjunction/ng-search";
|
|
17
|
+
import * as i4 from "@memberjunction/ng-word-cloud";
|
|
18
|
+
function SearchResultsResource_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
20
|
+
i0.ɵɵelementStart(0, "button", 24);
|
|
21
|
+
i0.ɵɵlistener("click", function SearchResultsResource_Conditional_1_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.ToggleFilterPanel()); });
|
|
22
|
+
i0.ɵɵelement(1, "i", 25);
|
|
23
|
+
i0.ɵɵelementEnd();
|
|
24
|
+
} }
|
|
25
|
+
function SearchResultsResource_Conditional_1_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
27
|
+
i0.ɵɵelementStart(0, "button", 26);
|
|
28
|
+
i0.ɵɵlistener("click", function SearchResultsResource_Conditional_1_Conditional_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnClientFilterTextChange("")); });
|
|
29
|
+
i0.ɵɵelement(1, "i", 27);
|
|
30
|
+
i0.ɵɵelementEnd();
|
|
31
|
+
} }
|
|
32
|
+
function SearchResultsResource_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
34
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "div", 5);
|
|
35
|
+
i0.ɵɵconditionalCreate(2, SearchResultsResource_Conditional_1_Conditional_2_Template, 2, 0, "button", 6);
|
|
36
|
+
i0.ɵɵelementStart(3, "span", 7);
|
|
37
|
+
i0.ɵɵtext(4);
|
|
38
|
+
i0.ɵɵelementEnd()();
|
|
39
|
+
i0.ɵɵelementStart(5, "div", 8)(6, "div", 9);
|
|
40
|
+
i0.ɵɵelement(7, "i", 10);
|
|
41
|
+
i0.ɵɵelementStart(8, "input", 11);
|
|
42
|
+
i0.ɵɵlistener("input", function SearchResultsResource_Conditional_1_Template_input_input_8_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnClientFilterTextChange($event.target.value)); });
|
|
43
|
+
i0.ɵɵelementEnd();
|
|
44
|
+
i0.ɵɵconditionalCreate(9, SearchResultsResource_Conditional_1_Conditional_9_Template, 2, 0, "button", 12);
|
|
45
|
+
i0.ɵɵelementEnd();
|
|
46
|
+
i0.ɵɵelementStart(10, "select", 13);
|
|
47
|
+
i0.ɵɵlistener("change", function SearchResultsResource_Conditional_1_Template_select_change_10_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnSortChange($event.target.value)); });
|
|
48
|
+
i0.ɵɵelementStart(11, "option", 14);
|
|
49
|
+
i0.ɵɵtext(12, "Sort: Relevance");
|
|
50
|
+
i0.ɵɵelementEnd();
|
|
51
|
+
i0.ɵɵelementStart(13, "option", 15);
|
|
52
|
+
i0.ɵɵtext(14, "Sort: Name");
|
|
53
|
+
i0.ɵɵelementEnd();
|
|
54
|
+
i0.ɵɵelementStart(15, "option", 16);
|
|
55
|
+
i0.ɵɵtext(16, "Sort: Entity");
|
|
56
|
+
i0.ɵɵelementEnd()();
|
|
57
|
+
i0.ɵɵelementStart(17, "div", 17)(18, "button", 18);
|
|
58
|
+
i0.ɵɵlistener("click", function SearchResultsResource_Conditional_1_Template_button_click_18_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.SetViewMode("list")); });
|
|
59
|
+
i0.ɵɵelement(19, "i", 19);
|
|
60
|
+
i0.ɵɵelementEnd();
|
|
61
|
+
i0.ɵɵelementStart(20, "button", 20);
|
|
62
|
+
i0.ɵɵlistener("click", function SearchResultsResource_Conditional_1_Template_button_click_20_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.SetViewMode("cloud")); });
|
|
63
|
+
i0.ɵɵelement(21, "i", 21);
|
|
64
|
+
i0.ɵɵelementEnd()();
|
|
65
|
+
i0.ɵɵelementStart(22, "button", 22);
|
|
66
|
+
i0.ɵɵlistener("click", function SearchResultsResource_Conditional_1_Template_button_click_22_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnRefresh()); });
|
|
67
|
+
i0.ɵɵelement(23, "i", 23);
|
|
68
|
+
i0.ɵɵelementEnd()()();
|
|
69
|
+
} if (rf & 2) {
|
|
70
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
71
|
+
i0.ɵɵadvance(2);
|
|
72
|
+
i0.ɵɵconditional(!ctx_r2.ShowFilterPanel ? 2 : -1);
|
|
73
|
+
i0.ɵɵadvance(2);
|
|
74
|
+
i0.ɵɵtextInterpolate5(" ", ctx_r2.FilteredResults.length, " of ", ctx_r2.ServerResultCount, " result", ctx_r2.ServerResultCount !== 1 ? "s" : "", " for \"", ctx_r2.CurrentQuery, "\" in ", ctx_r2.ElapsedMs, "ms ");
|
|
75
|
+
i0.ɵɵadvance(4);
|
|
76
|
+
i0.ɵɵproperty("value", ctx_r2.ClientFilterText);
|
|
77
|
+
i0.ɵɵadvance();
|
|
78
|
+
i0.ɵɵconditional(ctx_r2.ClientFilterText ? 9 : -1);
|
|
79
|
+
i0.ɵɵadvance();
|
|
80
|
+
i0.ɵɵproperty("value", ctx_r2.SortField);
|
|
81
|
+
i0.ɵɵadvance(8);
|
|
82
|
+
i0.ɵɵclassProp("sr-view-active", ctx_r2.ViewMode === "list");
|
|
83
|
+
i0.ɵɵadvance(2);
|
|
84
|
+
i0.ɵɵclassProp("sr-view-active", ctx_r2.ViewMode === "cloud");
|
|
85
|
+
i0.ɵɵadvance(2);
|
|
86
|
+
i0.ɵɵproperty("disabled", ctx_r2.IsSearching);
|
|
87
|
+
i0.ɵɵadvance();
|
|
88
|
+
i0.ɵɵclassProp("fa-spin", ctx_r2.IsSearching);
|
|
89
|
+
} }
|
|
90
|
+
function SearchResultsResource_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
91
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
92
|
+
i0.ɵɵelement(1, "mj-loading", 28);
|
|
93
|
+
i0.ɵɵelementEnd();
|
|
94
|
+
} }
|
|
95
|
+
function SearchResultsResource_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
96
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
97
|
+
i0.ɵɵelement(1, "i", 29);
|
|
98
|
+
i0.ɵɵelementStart(2, "h3");
|
|
99
|
+
i0.ɵɵtext(3, "No results found");
|
|
100
|
+
i0.ɵɵelementEnd();
|
|
101
|
+
i0.ɵɵelementStart(4, "p");
|
|
102
|
+
i0.ɵɵtext(5, "Try different keywords or broaden your search.");
|
|
103
|
+
i0.ɵɵelementEnd()();
|
|
104
|
+
} }
|
|
105
|
+
function SearchResultsResource_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
+
i0.ɵɵelementStart(0, "div", 30);
|
|
107
|
+
i0.ɵɵelement(1, "mj-loading", 33);
|
|
108
|
+
i0.ɵɵelementEnd();
|
|
109
|
+
} }
|
|
110
|
+
function SearchResultsResource_Conditional_4_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
+
i0.ɵɵelement(0, "mj-loading", 34);
|
|
112
|
+
} }
|
|
113
|
+
function SearchResultsResource_Conditional_4_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
114
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
115
|
+
i0.ɵɵelementStart(0, "mj-word-cloud", 36);
|
|
116
|
+
i0.ɵɵlistener("ItemClick", function SearchResultsResource_Conditional_4_Conditional_2_Conditional_2_Template_mj_word_cloud_ItemClick_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.OnCloudItemClick($event)); });
|
|
117
|
+
i0.ɵɵelementEnd();
|
|
118
|
+
} if (rf & 2) {
|
|
119
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
120
|
+
i0.ɵɵproperty("Items", ctx_r2.CloudItems)("MaxItems", 80)("Interactive", true);
|
|
121
|
+
} }
|
|
122
|
+
function SearchResultsResource_Conditional_4_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
123
|
+
i0.ɵɵelementStart(0, "div", 31);
|
|
124
|
+
i0.ɵɵconditionalCreate(1, SearchResultsResource_Conditional_4_Conditional_2_Conditional_1_Template, 1, 0, "mj-loading", 34)(2, SearchResultsResource_Conditional_4_Conditional_2_Conditional_2_Template, 1, 3, "mj-word-cloud", 35);
|
|
125
|
+
i0.ɵɵelementEnd();
|
|
126
|
+
} if (rf & 2) {
|
|
127
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
128
|
+
i0.ɵɵadvance();
|
|
129
|
+
i0.ɵɵconditional(ctx_r2.IsLoadingCloud ? 1 : 2);
|
|
130
|
+
} }
|
|
131
|
+
function SearchResultsResource_Conditional_4_Conditional_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
132
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
133
|
+
i0.ɵɵelementStart(0, "mj-search-filter", 40);
|
|
134
|
+
i0.ɵɵlistener("FilterChanged", function SearchResultsResource_Conditional_4_Conditional_3_Conditional_1_Template_mj_search_filter_FilterChanged_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.OnFilterChanged($event)); })("FiltersCleared", function SearchResultsResource_Conditional_4_Conditional_3_Conditional_1_Template_mj_search_filter_FiltersCleared_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.OnFiltersCleared()); })("CloseRequested", function SearchResultsResource_Conditional_4_Conditional_3_Conditional_1_Template_mj_search_filter_CloseRequested_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.ToggleFilterPanel()); })("MinScoreChanged", function SearchResultsResource_Conditional_4_Conditional_3_Conditional_1_Template_mj_search_filter_MinScoreChanged_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.OnMinScoreChanged($event)); });
|
|
135
|
+
i0.ɵɵelementEnd();
|
|
136
|
+
} if (rf & 2) {
|
|
137
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
138
|
+
i0.ɵɵproperty("Filters", ctx_r2.Filters)("ActiveFilters", ctx_r2.ActiveFilters)("ShowRelevanceSlider", true)("MinScorePercent", ctx_r2.MinScorePercent)("ServerMinScorePercent", ctx_r2.serverMinScorePercent);
|
|
139
|
+
} }
|
|
140
|
+
function SearchResultsResource_Conditional_4_Conditional_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
141
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
142
|
+
i0.ɵɵelementStart(0, "mj-search-results", 41);
|
|
143
|
+
i0.ɵɵlistener("ResultSelected", function SearchResultsResource_Conditional_4_Conditional_3_Conditional_2_Template_mj_search_results_ResultSelected_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.OnResultSelected($event)); })("OpenRecordRequested", function SearchResultsResource_Conditional_4_Conditional_3_Conditional_2_Template_mj_search_results_OpenRecordRequested_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.OnOpenRecord($event)); });
|
|
144
|
+
i0.ɵɵelementEnd();
|
|
145
|
+
} if (rf & 2) {
|
|
146
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
147
|
+
i0.ɵɵproperty("FlatResults", ctx_r2.FilteredResults)("HighlightText", ctx_r2.ClientFilterText)("ShowScores", true)("ShowTags", true)("ShowSummary", false)("PageSize", 20);
|
|
148
|
+
} }
|
|
149
|
+
function SearchResultsResource_Conditional_4_Conditional_3_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
150
|
+
i0.ɵɵelementStart(0, "div", 39);
|
|
151
|
+
i0.ɵɵelement(1, "i", 42);
|
|
152
|
+
i0.ɵɵelementStart(2, "p");
|
|
153
|
+
i0.ɵɵtext(3, "No results match current filters. Try lowering the minimum relevance.");
|
|
154
|
+
i0.ɵɵelementEnd()();
|
|
155
|
+
} }
|
|
156
|
+
function SearchResultsResource_Conditional_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
157
|
+
i0.ɵɵelementStart(0, "div", 32);
|
|
158
|
+
i0.ɵɵconditionalCreate(1, SearchResultsResource_Conditional_4_Conditional_3_Conditional_1_Template, 1, 5, "mj-search-filter", 37);
|
|
159
|
+
i0.ɵɵconditionalCreate(2, SearchResultsResource_Conditional_4_Conditional_3_Conditional_2_Template, 1, 6, "mj-search-results", 38)(3, SearchResultsResource_Conditional_4_Conditional_3_Conditional_3_Template, 4, 0, "div", 39);
|
|
160
|
+
i0.ɵɵelementEnd();
|
|
161
|
+
} if (rf & 2) {
|
|
162
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
163
|
+
i0.ɵɵadvance();
|
|
164
|
+
i0.ɵɵconditional(ctx_r2.ShowFilterPanel ? 1 : -1);
|
|
165
|
+
i0.ɵɵadvance();
|
|
166
|
+
i0.ɵɵconditional(ctx_r2.FilteredResults.length > 0 ? 2 : 3);
|
|
167
|
+
} }
|
|
168
|
+
function SearchResultsResource_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
169
|
+
i0.ɵɵelementStart(0, "div", 4);
|
|
170
|
+
i0.ɵɵconditionalCreate(1, SearchResultsResource_Conditional_4_Conditional_1_Template, 2, 0, "div", 30);
|
|
171
|
+
i0.ɵɵconditionalCreate(2, SearchResultsResource_Conditional_4_Conditional_2_Template, 3, 1, "div", 31)(3, SearchResultsResource_Conditional_4_Conditional_3_Template, 4, 2, "div", 32);
|
|
172
|
+
i0.ɵɵelementEnd();
|
|
173
|
+
} if (rf & 2) {
|
|
174
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
175
|
+
i0.ɵɵadvance();
|
|
176
|
+
i0.ɵɵconditional(ctx_r2.IsSearching ? 1 : -1);
|
|
177
|
+
i0.ɵɵadvance();
|
|
178
|
+
i0.ɵɵconditional(ctx_r2.ViewMode === "cloud" ? 2 : 3);
|
|
179
|
+
} }
|
|
13
180
|
let SearchResultsResource = class SearchResultsResource extends BaseResourceComponent {
|
|
14
|
-
|
|
181
|
+
cdr = inject(ChangeDetectorRef);
|
|
182
|
+
searchService = inject(SearchService);
|
|
183
|
+
fileOpenService = inject(FileOpenService);
|
|
184
|
+
CurrentQuery = '';
|
|
185
|
+
IsSearching = false;
|
|
186
|
+
HasSearched = false;
|
|
187
|
+
TotalCount = 0;
|
|
188
|
+
ElapsedMs = 0;
|
|
189
|
+
Filters = [];
|
|
190
|
+
ActiveFilters = {};
|
|
191
|
+
FilteredResults = [];
|
|
192
|
+
MinScorePercent = 30;
|
|
193
|
+
/** The MinScore that was sent to the server on the last search. If the user
|
|
194
|
+
* slides below this, we need to re-query the server to get more results. */
|
|
195
|
+
serverMinScorePercent = 30;
|
|
196
|
+
/** How many results the server returned (before client-side filtering) */
|
|
197
|
+
ServerResultCount = 0;
|
|
198
|
+
ShowFilterPanel = true;
|
|
199
|
+
SortField = 'score';
|
|
200
|
+
ClientFilterText = '';
|
|
201
|
+
ViewMode = 'list';
|
|
202
|
+
CloudItems = [];
|
|
203
|
+
IsLoadingCloud = false;
|
|
204
|
+
/** All results from the last search (before client-side filtering) */
|
|
205
|
+
allResults = [];
|
|
206
|
+
dataLoaded = false;
|
|
207
|
+
// Override Data setter to trigger search when tab container provides the data
|
|
208
|
+
// (ngOnInit fires before Data is set, so we can't rely on it)
|
|
209
|
+
set Data(value) {
|
|
210
|
+
super.Data = value;
|
|
211
|
+
if (!this.dataLoaded) {
|
|
212
|
+
this.dataLoaded = true;
|
|
213
|
+
this.loadFromData();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
get Data() {
|
|
217
|
+
return super.Data;
|
|
218
|
+
}
|
|
219
|
+
async loadFromData() {
|
|
220
|
+
this.registerAgentTools();
|
|
221
|
+
// Load filter panel preference
|
|
222
|
+
try {
|
|
223
|
+
const { UserInfoEngine } = require('@memberjunction/core-entities');
|
|
224
|
+
const pref = UserInfoEngine.Instance.GetSetting('search.showFilterPanel');
|
|
225
|
+
if (pref === 'false')
|
|
226
|
+
this.ShowFilterPanel = false;
|
|
227
|
+
}
|
|
228
|
+
catch { /* ignore */ }
|
|
229
|
+
const config = this.Data?.Configuration;
|
|
230
|
+
if (config?.Query) {
|
|
231
|
+
this.CurrentQuery = config.Query;
|
|
232
|
+
}
|
|
233
|
+
else if (config?.SearchInput) {
|
|
234
|
+
this.CurrentQuery = config.SearchInput;
|
|
235
|
+
}
|
|
236
|
+
// Apply min relevance from the search bar dropdown if provided
|
|
237
|
+
if (config?.MinRelevance != null) {
|
|
238
|
+
const mr = Number(config.MinRelevance);
|
|
239
|
+
if (!isNaN(mr) && mr >= 0 && mr <= 100) {
|
|
240
|
+
this.MinScorePercent = mr;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
// Sync min relevance to URL query param
|
|
244
|
+
this.navigationService.UpdateActiveTabQueryParams({ minRelevance: String(this.MinScorePercent) });
|
|
245
|
+
if (this.CurrentQuery) {
|
|
246
|
+
await this.ExecuteSearch(this.CurrentQuery);
|
|
247
|
+
}
|
|
248
|
+
this.NotifyLoadComplete();
|
|
15
249
|
}
|
|
16
250
|
async GetResourceDisplayName(data) {
|
|
17
|
-
|
|
251
|
+
const query = (data.Configuration?.Query ?? data.Configuration?.SearchInput ?? 'Search');
|
|
252
|
+
return `Search: ${query}`;
|
|
253
|
+
}
|
|
254
|
+
async GetResourceIconClass(_data) {
|
|
255
|
+
return 'fa-solid fa-magnifying-glass';
|
|
256
|
+
}
|
|
257
|
+
async OnRefineSearch(query) {
|
|
258
|
+
const trimmed = query?.trim();
|
|
259
|
+
if (trimmed && trimmed.length >= 2) {
|
|
260
|
+
this.CurrentQuery = trimmed;
|
|
261
|
+
this.ActiveFilters = {};
|
|
262
|
+
await this.ExecuteSearch(trimmed);
|
|
263
|
+
}
|
|
18
264
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
265
|
+
OnFilterChanged(event) {
|
|
266
|
+
this.ActiveFilters = {
|
|
267
|
+
...this.ActiveFilters,
|
|
268
|
+
[event.Category]: event.SelectedValues
|
|
269
|
+
};
|
|
270
|
+
this.applyClientFilters();
|
|
271
|
+
}
|
|
272
|
+
OnFiltersCleared() {
|
|
273
|
+
this.ActiveFilters = {};
|
|
274
|
+
this.MinScorePercent = 30;
|
|
275
|
+
this.navigationService.UpdateActiveTabQueryParams({ minRelevance: '30' });
|
|
276
|
+
this.applyClientFilters();
|
|
277
|
+
}
|
|
278
|
+
OnMinScoreChanged(percent) {
|
|
279
|
+
this.MinScorePercent = percent;
|
|
280
|
+
this.navigationService.UpdateActiveTabQueryParams({ minRelevance: String(percent) });
|
|
281
|
+
if (percent < this.serverMinScorePercent && this.CurrentQuery) {
|
|
282
|
+
// User lowered below what server filtered — need to re-query with lower threshold
|
|
283
|
+
this.ExecuteSearch(this.CurrentQuery);
|
|
22
284
|
}
|
|
23
285
|
else {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
286
|
+
// User raised or stayed at/above server threshold — client-side filter is sufficient
|
|
287
|
+
this.applyClientFilters();
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
OnResultSelected(event) {
|
|
291
|
+
this.navigateToResult(event.Result);
|
|
292
|
+
}
|
|
293
|
+
OnOpenRecord(result) {
|
|
294
|
+
this.navigateToResult(result);
|
|
295
|
+
}
|
|
296
|
+
async OnRefresh() {
|
|
297
|
+
if (this.CurrentQuery) {
|
|
298
|
+
this.ActiveFilters = {};
|
|
299
|
+
this.MinScorePercent = 30;
|
|
300
|
+
this.ClientFilterText = '';
|
|
301
|
+
await this.ExecuteSearch(this.CurrentQuery);
|
|
30
302
|
}
|
|
31
303
|
}
|
|
304
|
+
ToggleFilterPanel() {
|
|
305
|
+
this.ShowFilterPanel = !this.ShowFilterPanel;
|
|
306
|
+
// Persist preference
|
|
307
|
+
try {
|
|
308
|
+
const { UserInfoEngine } = require('@memberjunction/core-entities');
|
|
309
|
+
UserInfoEngine.Instance.SetSettingDebounced('search.showFilterPanel', this.ShowFilterPanel ? 'true' : 'false');
|
|
310
|
+
}
|
|
311
|
+
catch { /* ignore if UserInfoEngine not available */ }
|
|
312
|
+
this.cdr.detectChanges();
|
|
313
|
+
}
|
|
314
|
+
OnSortChange(field) {
|
|
315
|
+
this.SortField = field;
|
|
316
|
+
this.applyClientFilters();
|
|
317
|
+
}
|
|
318
|
+
OnClientFilterTextChange(text) {
|
|
319
|
+
this.ClientFilterText = text;
|
|
320
|
+
this.applyClientFilters();
|
|
321
|
+
}
|
|
322
|
+
SetViewMode(mode) {
|
|
323
|
+
this.ViewMode = mode;
|
|
324
|
+
if (mode === 'cloud') {
|
|
325
|
+
this.buildCloudItems();
|
|
326
|
+
}
|
|
327
|
+
this.emitAgentContext();
|
|
328
|
+
this.cdr.detectChanges();
|
|
329
|
+
}
|
|
330
|
+
OnCloudItemClick(_event) {
|
|
331
|
+
// No-op for now — tag filtering in the filter panel is not yet implemented.
|
|
332
|
+
// Future: clicking a tag could filter results to only those with that tag.
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Navigate to a search result based on its ResultType discriminator.
|
|
336
|
+
* - entity-record: opens the MJ entity record viewer
|
|
337
|
+
* - storage-file: opens the file via pre-authenticated URL in new tab
|
|
338
|
+
* - content-item: opens the MJ entity record viewer (content items are entity records)
|
|
339
|
+
*/
|
|
340
|
+
navigateToResult(result) {
|
|
341
|
+
if (result.ResultType === 'storage-file') {
|
|
342
|
+
// Try preview first (opens in provider's web viewer), fall back to download
|
|
343
|
+
if (!this.fileOpenService.OpenPreviewFromSearchResult(result.RawMetadata)) {
|
|
344
|
+
this.fileOpenService.OpenFileFromSearchResult(result.RawMetadata);
|
|
345
|
+
}
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
if (!result.EntityName || !result.RecordID)
|
|
349
|
+
return;
|
|
350
|
+
// entity-record, content-item, or unset — navigate to entity record
|
|
351
|
+
const pkey = new CompositeKey([{ FieldName: 'ID', Value: result.RecordID }]);
|
|
352
|
+
this.navigationService.OpenEntityRecord(result.EntityName, pkey);
|
|
353
|
+
}
|
|
354
|
+
async ExecuteSearch(query) {
|
|
355
|
+
this.IsSearching = true;
|
|
356
|
+
this.HasSearched = false;
|
|
357
|
+
this.cdr.detectChanges();
|
|
358
|
+
this.serverMinScorePercent = this.MinScorePercent;
|
|
359
|
+
const request = {
|
|
360
|
+
Query: query,
|
|
361
|
+
MaxResults: 50,
|
|
362
|
+
ActiveFilters: {},
|
|
363
|
+
IncludeSources: ['vector', 'fulltext', 'entity', 'storage'],
|
|
364
|
+
MinScore: this.MinScorePercent / 100
|
|
365
|
+
};
|
|
366
|
+
const response = await this.searchService.ExecuteSearch(request);
|
|
367
|
+
this.allResults = [...response.Results].sort((a, b) => b.Score - a.Score);
|
|
368
|
+
this.ServerResultCount = this.allResults.length;
|
|
369
|
+
this.TotalCount = response.TotalCount;
|
|
370
|
+
this.ElapsedMs = response.ElapsedMs;
|
|
371
|
+
this.Filters = response.Filters;
|
|
372
|
+
this.FilteredResults = [...this.allResults];
|
|
373
|
+
this.IsSearching = false;
|
|
374
|
+
this.HasSearched = true;
|
|
375
|
+
this.emitAgentContext();
|
|
376
|
+
this.cdr.detectChanges();
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Apply active filter selections to the full result set.
|
|
380
|
+
*/
|
|
381
|
+
applyClientFilters() {
|
|
382
|
+
let results = this.allResults;
|
|
383
|
+
// Apply min score filter FIRST (this determines what's "available")
|
|
384
|
+
if (this.MinScorePercent > 0) {
|
|
385
|
+
const minScore = this.MinScorePercent / 100;
|
|
386
|
+
results = results.filter(r => r.Score >= minScore);
|
|
387
|
+
}
|
|
388
|
+
// Rebuild filters from score-filtered results so counts are accurate
|
|
389
|
+
this.Filters = this.searchService.BuildFilters(results);
|
|
390
|
+
this.TotalCount = results.length;
|
|
391
|
+
// Apply facet filters
|
|
392
|
+
if (this.hasActiveFilters()) {
|
|
393
|
+
results = results.filter(r => this.matchesActiveFilters(r));
|
|
394
|
+
}
|
|
395
|
+
// Apply client text filter (search within results)
|
|
396
|
+
if (this.ClientFilterText.trim()) {
|
|
397
|
+
const term = this.ClientFilterText.trim().toLowerCase();
|
|
398
|
+
results = results.filter(r => (r.Title?.toLowerCase().includes(term)) ||
|
|
399
|
+
(r.Snippet?.toLowerCase().includes(term)) ||
|
|
400
|
+
(r.EntityName?.toLowerCase().includes(term)) ||
|
|
401
|
+
(r.RecordName?.toLowerCase().includes(term)) ||
|
|
402
|
+
(r.Tags?.some(t => t.toLowerCase().includes(term))));
|
|
403
|
+
}
|
|
404
|
+
// Sort
|
|
405
|
+
switch (this.SortField) {
|
|
406
|
+
case 'title':
|
|
407
|
+
results = [...results].sort((a, b) => (a.Title || '').localeCompare(b.Title || ''));
|
|
408
|
+
break;
|
|
409
|
+
case 'entity':
|
|
410
|
+
results = [...results].sort((a, b) => a.EntityName.localeCompare(b.EntityName) || b.Score - a.Score);
|
|
411
|
+
break;
|
|
412
|
+
case 'score':
|
|
413
|
+
default:
|
|
414
|
+
results = [...results].sort((a, b) => b.Score - a.Score);
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
this.FilteredResults = results;
|
|
418
|
+
this.emitAgentContext();
|
|
419
|
+
this.cdr.detectChanges();
|
|
420
|
+
}
|
|
421
|
+
hasActiveFilters() {
|
|
422
|
+
return Object.values(this.ActiveFilters).some(v => v.length > 0);
|
|
423
|
+
}
|
|
424
|
+
matchesActiveFilters(result) {
|
|
425
|
+
const entityFilter = this.ActiveFilters['Entity'];
|
|
426
|
+
if (entityFilter?.length) {
|
|
427
|
+
const matchesEntity = entityFilter.includes(result.EntityName);
|
|
428
|
+
const matchesFiles = entityFilter.includes('__storage-files__') && result.ResultType === 'storage-file';
|
|
429
|
+
if (!matchesEntity && !matchesFiles)
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
432
|
+
const sourceFilter = this.ActiveFilters['Source'];
|
|
433
|
+
if (sourceFilter?.length && !sourceFilter.includes(result.SourceType)) {
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
const tagFilter = this.ActiveFilters['Tags'];
|
|
437
|
+
if (tagFilter?.length && !tagFilter.some(t => result.Tags.includes(t))) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
const fileTypeFilter = this.ActiveFilters['File Type'];
|
|
441
|
+
if (fileTypeFilter?.length) {
|
|
442
|
+
if (result.ResultType !== 'storage-file')
|
|
443
|
+
return false;
|
|
444
|
+
const ext = result.Title?.split('.').pop()?.toUpperCase() ?? '';
|
|
445
|
+
if (!fileTypeFilter.includes(ext))
|
|
446
|
+
return false;
|
|
447
|
+
}
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Build WordCloudItem[] from search results by extracting entity names and tags,
|
|
452
|
+
* weighted by their frequency across all results.
|
|
453
|
+
*/
|
|
454
|
+
/**
|
|
455
|
+
* Build word cloud items from MJ: Tagged Items linked to the search results.
|
|
456
|
+
* Queries the TaggedItem entity for all records in the result set, aggregates
|
|
457
|
+
* tag names by count and weight, and builds WordCloudItem[] for the cloud.
|
|
458
|
+
*/
|
|
459
|
+
async buildCloudItems() {
|
|
460
|
+
this.IsLoadingCloud = true;
|
|
461
|
+
this.cdr.detectChanges();
|
|
462
|
+
try {
|
|
463
|
+
// Group results by entity to build efficient queries
|
|
464
|
+
const byEntity = new Map();
|
|
465
|
+
for (const result of this.allResults) {
|
|
466
|
+
const md = new Metadata();
|
|
467
|
+
const entity = md.Entities.find(e => e.Name === result.EntityName);
|
|
468
|
+
if (!entity)
|
|
469
|
+
continue;
|
|
470
|
+
const list = byEntity.get(entity.ID) || [];
|
|
471
|
+
list.push(result.RecordID);
|
|
472
|
+
byEntity.set(entity.ID, list);
|
|
473
|
+
}
|
|
474
|
+
// Query Tagged Items for all record IDs across all entities
|
|
475
|
+
const tagAggregates = new Map();
|
|
476
|
+
const rv = new RunView();
|
|
477
|
+
for (const [entityID, recordIDs] of byEntity) {
|
|
478
|
+
if (recordIDs.length === 0)
|
|
479
|
+
continue;
|
|
480
|
+
// Build IN clause (batch in groups of 50 to avoid huge queries)
|
|
481
|
+
for (let i = 0; i < recordIDs.length; i += 50) {
|
|
482
|
+
const batch = recordIDs.slice(i, i + 50);
|
|
483
|
+
const inClause = batch.map(id => `'${id.replace(/'/g, "''")}'`).join(',');
|
|
484
|
+
const result = await rv.RunView({
|
|
485
|
+
EntityName: 'MJ: Tagged Items',
|
|
486
|
+
ExtraFilter: `EntityID = '${entityID}' AND RecordID IN (${inClause})`,
|
|
487
|
+
Fields: ['Tag', 'Weight'],
|
|
488
|
+
ResultType: 'simple'
|
|
489
|
+
});
|
|
490
|
+
if (result.Success && result.Results) {
|
|
491
|
+
for (const row of result.Results) {
|
|
492
|
+
const tagName = row.Tag;
|
|
493
|
+
if (!tagName)
|
|
494
|
+
continue;
|
|
495
|
+
const existing = tagAggregates.get(tagName) || { count: 0, totalWeight: 0 };
|
|
496
|
+
existing.count++;
|
|
497
|
+
existing.totalWeight += (row.Weight ?? 1);
|
|
498
|
+
tagAggregates.set(tagName, existing);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
// Build cloud items from aggregated tags
|
|
504
|
+
if (tagAggregates.size === 0) {
|
|
505
|
+
this.CloudItems = [{ Text: 'No tags found', Weight: 1, Category: 'empty' }];
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
const maxWeight = Math.max(...Array.from(tagAggregates.values()).map(v => v.totalWeight), 1);
|
|
509
|
+
this.CloudItems = Array.from(tagAggregates.entries())
|
|
510
|
+
.sort((a, b) => b[1].totalWeight - a[1].totalWeight)
|
|
511
|
+
.map(([tagName, agg]) => ({
|
|
512
|
+
Text: tagName,
|
|
513
|
+
Weight: agg.totalWeight / maxWeight,
|
|
514
|
+
Category: 'tag',
|
|
515
|
+
Metadata: { type: 'tag', count: agg.count, totalWeight: agg.totalWeight }
|
|
516
|
+
}));
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
catch (err) {
|
|
520
|
+
this.CloudItems = [{ Text: 'Error loading tags', Weight: 1, Category: 'error' }];
|
|
521
|
+
}
|
|
522
|
+
this.IsLoadingCloud = false;
|
|
523
|
+
this.cdr.detectChanges();
|
|
524
|
+
}
|
|
525
|
+
/** Report current search state to the AI agent */
|
|
526
|
+
emitAgentContext() {
|
|
527
|
+
this.navigationService.SetAgentContext(this, {
|
|
528
|
+
CurrentQuery: this.CurrentQuery || null,
|
|
529
|
+
ResultCount: this.TotalCount,
|
|
530
|
+
FilteredCount: this.FilteredResults.length,
|
|
531
|
+
ElapsedMs: this.ElapsedMs,
|
|
532
|
+
HasSearched: this.HasSearched,
|
|
533
|
+
ShowFilterPanel: this.ShowFilterPanel,
|
|
534
|
+
ViewMode: this.ViewMode,
|
|
535
|
+
SortField: this.SortField,
|
|
536
|
+
MinScorePercent: this.MinScorePercent,
|
|
537
|
+
ClientFilterText: this.ClientFilterText,
|
|
538
|
+
ActiveFilterCount: Object.values(this.ActiveFilters).filter(v => v.length > 0).length,
|
|
539
|
+
TopResults: this.FilteredResults.slice(0, 50).map(r => ({
|
|
540
|
+
Title: r.Title || r.RecordName,
|
|
541
|
+
EntityName: r.EntityName,
|
|
542
|
+
RecordID: r.RecordID,
|
|
543
|
+
Score: Math.round(r.Score * 100),
|
|
544
|
+
SourceType: r.SourceType,
|
|
545
|
+
Snippet: r.Snippet?.substring(0, 100)
|
|
546
|
+
})),
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
/** Register client tools the agent can invoke on the search results */
|
|
550
|
+
registerAgentTools() {
|
|
551
|
+
this.navigationService.SetAgentClientTools(this, [
|
|
552
|
+
{
|
|
553
|
+
Name: 'RunSearch',
|
|
554
|
+
Description: 'Execute a search query and display results',
|
|
555
|
+
ParameterSchema: {
|
|
556
|
+
type: 'object',
|
|
557
|
+
properties: {
|
|
558
|
+
query: { type: 'string', description: 'The search query text' }
|
|
559
|
+
},
|
|
560
|
+
required: ['query']
|
|
561
|
+
},
|
|
562
|
+
Handler: async (params) => {
|
|
563
|
+
const query = String(params['query'] ?? '');
|
|
564
|
+
this.CurrentQuery = query;
|
|
565
|
+
await this.ExecuteSearch(query);
|
|
566
|
+
return { Success: true, Data: { ResultCount: this.TotalCount, ElapsedMs: this.ElapsedMs } };
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
Name: 'SortResults',
|
|
571
|
+
Description: 'Change the sort order of search results',
|
|
572
|
+
ParameterSchema: {
|
|
573
|
+
type: 'object',
|
|
574
|
+
properties: {
|
|
575
|
+
field: { type: 'string', enum: ['score', 'title', 'entity'], description: 'Sort field' }
|
|
576
|
+
},
|
|
577
|
+
required: ['field']
|
|
578
|
+
},
|
|
579
|
+
Handler: async (params) => {
|
|
580
|
+
this.OnSortChange(String(params['field']));
|
|
581
|
+
return { Success: true, Data: { SortField: this.SortField } };
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
Name: 'FilterWithinResults',
|
|
586
|
+
Description: 'Filter the current results by a keyword (client-side text filter)',
|
|
587
|
+
ParameterSchema: {
|
|
588
|
+
type: 'object',
|
|
589
|
+
properties: {
|
|
590
|
+
text: { type: 'string', description: 'Filter text (empty string to clear)' }
|
|
591
|
+
},
|
|
592
|
+
required: ['text']
|
|
593
|
+
},
|
|
594
|
+
Handler: async (params) => {
|
|
595
|
+
this.OnClientFilterTextChange(String(params['text'] ?? ''));
|
|
596
|
+
return { Success: true, Data: { FilteredCount: this.FilteredResults.length } };
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
Name: 'SetViewMode',
|
|
601
|
+
Description: 'Switch between list view and tag cloud visualization',
|
|
602
|
+
ParameterSchema: {
|
|
603
|
+
type: 'object',
|
|
604
|
+
properties: {
|
|
605
|
+
mode: { type: 'string', enum: ['list', 'cloud'], description: 'View mode' }
|
|
606
|
+
},
|
|
607
|
+
required: ['mode']
|
|
608
|
+
},
|
|
609
|
+
Handler: async (params) => {
|
|
610
|
+
this.SetViewMode(params['mode'] ?? 'list');
|
|
611
|
+
return { Success: true, Data: { ViewMode: this.ViewMode } };
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
Name: 'ToggleFilterPanel',
|
|
616
|
+
Description: 'Show or hide the filter panel on the left',
|
|
617
|
+
ParameterSchema: { type: 'object', properties: {} },
|
|
618
|
+
Handler: async () => {
|
|
619
|
+
this.ToggleFilterPanel();
|
|
620
|
+
return { Success: true, Data: { ShowFilterPanel: this.ShowFilterPanel } };
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
Name: 'SetMinRelevance',
|
|
625
|
+
Description: 'Set the minimum relevance score filter (0-100 percent)',
|
|
626
|
+
ParameterSchema: {
|
|
627
|
+
type: 'object',
|
|
628
|
+
properties: {
|
|
629
|
+
percent: { type: 'number', description: 'Minimum relevance percentage (0-100)' }
|
|
630
|
+
},
|
|
631
|
+
required: ['percent']
|
|
632
|
+
},
|
|
633
|
+
Handler: async (params) => {
|
|
634
|
+
this.OnMinScoreChanged(Number(params['percent'] ?? 0));
|
|
635
|
+
return { Success: true, Data: { MinScorePercent: this.MinScorePercent, FilteredCount: this.FilteredResults.length } };
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
Name: 'RefreshSearch',
|
|
640
|
+
Description: 'Re-execute the current search query',
|
|
641
|
+
ParameterSchema: { type: 'object', properties: {} },
|
|
642
|
+
Handler: async () => {
|
|
643
|
+
await this.OnRefresh();
|
|
644
|
+
return { Success: true, Data: { ResultCount: this.TotalCount, ElapsedMs: this.ElapsedMs } };
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
]);
|
|
648
|
+
}
|
|
32
649
|
static ɵfac = /*@__PURE__*/ (() => { let ɵSearchResultsResource_BaseFactory; return function SearchResultsResource_Factory(__ngFactoryType__) { return (ɵSearchResultsResource_BaseFactory || (ɵSearchResultsResource_BaseFactory = i0.ɵɵgetInheritedFactory(SearchResultsResource)))(__ngFactoryType__ || SearchResultsResource); }; })();
|
|
33
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchResultsResource, selectors: [["mj-search-results-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
34
|
-
i0.ɵɵelementStart(0, "
|
|
35
|
-
i0.ɵɵ
|
|
650
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchResultsResource, selectors: [["mj-search-results-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 4, consts: [[1, "search-results-page"], [1, "search-header"], [1, "search-loading"], [1, "search-no-results"], [1, "search-results-body-wrapper"], [1, "search-header-left"], ["title", "Show filters", 1, "sr-icon-btn"], [1, "search-meta"], [1, "search-header-right"], [1, "sr-refine-wrapper"], [1, "fa-solid", "fa-filter-list", "sr-refine-icon"], ["placeholder", "Filter within results...", 1, "mj-input", "sr-refine-input", 3, "input", "value"], [1, "sr-refine-clear"], [1, "mj-input", "sr-sort-select", 3, "change", "value"], ["value", "score"], ["value", "title"], ["value", "entity"], [1, "sr-view-toggle"], ["title", "List view", 1, "sr-icon-btn", 3, "click"], [1, "fa-solid", "fa-list"], ["title", "Tag cloud view", 1, "sr-icon-btn", 3, "click"], [1, "fa-solid", "fa-cloud"], ["title", "Refresh search", 1, "sr-icon-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-arrows-rotate"], ["title", "Show filters", 1, "sr-icon-btn", 3, "click"], [1, "fa-solid", "fa-filter"], [1, "sr-refine-clear", 3, "click"], [1, "fa-solid", "fa-xmark"], ["text", "Searching...", "size", "medium"], [1, "fa-solid", "fa-magnifying-glass-minus"], [1, "search-requery-overlay"], [1, "search-cloud-wrapper"], [1, "search-body"], ["text", "Updating results...", "size", "medium"], ["text", "Loading tag cloud...", "size", "medium"], ["ColorMode", "weight-gradient", 3, "Items", "MaxItems", "Interactive"], ["ColorMode", "weight-gradient", 3, "ItemClick", "Items", "MaxItems", "Interactive"], [3, "Filters", "ActiveFilters", "ShowRelevanceSlider", "MinScorePercent", "ServerMinScorePercent"], [3, "FlatResults", "HighlightText", "ShowScores", "ShowTags", "ShowSummary", "PageSize"], [1, "search-no-results-inline"], [3, "FilterChanged", "FiltersCleared", "CloseRequested", "MinScoreChanged", "Filters", "ActiveFilters", "ShowRelevanceSlider", "MinScorePercent", "ServerMinScorePercent"], [3, "ResultSelected", "OpenRecordRequested", "FlatResults", "HighlightText", "ShowScores", "ShowTags", "ShowSummary", "PageSize"], [1, "fa-solid", "fa-filter-circle-xmark"]], template: function SearchResultsResource_Template(rf, ctx) { if (rf & 1) {
|
|
651
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
652
|
+
i0.ɵɵconditionalCreate(1, SearchResultsResource_Conditional_1_Template, 24, 16, "div", 1);
|
|
653
|
+
i0.ɵɵconditionalCreate(2, SearchResultsResource_Conditional_2_Template, 2, 0, "div", 2);
|
|
654
|
+
i0.ɵɵconditionalCreate(3, SearchResultsResource_Conditional_3_Template, 6, 0, "div", 3);
|
|
655
|
+
i0.ɵɵconditionalCreate(4, SearchResultsResource_Conditional_4_Template, 4, 2, "div", 4);
|
|
36
656
|
i0.ɵɵelementEnd();
|
|
37
657
|
} if (rf & 2) {
|
|
38
|
-
i0.ɵɵ
|
|
39
|
-
|
|
658
|
+
i0.ɵɵadvance();
|
|
659
|
+
i0.ɵɵconditional(ctx.HasSearched && ctx.ServerResultCount > 0 ? 1 : -1);
|
|
660
|
+
i0.ɵɵadvance();
|
|
661
|
+
i0.ɵɵconditional(ctx.IsSearching && ctx.ServerResultCount === 0 ? 2 : -1);
|
|
662
|
+
i0.ɵɵadvance();
|
|
663
|
+
i0.ɵɵconditional(!ctx.IsSearching && ctx.ServerResultCount === 0 && ctx.HasSearched ? 3 : -1);
|
|
664
|
+
i0.ɵɵadvance();
|
|
665
|
+
i0.ɵɵconditional(ctx.ServerResultCount > 0 ? 4 : -1);
|
|
666
|
+
} }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i2.LoadingComponent, i3.SearchResultsComponent, i3.SearchFilterComponent, i4.MJWordCloudComponent], styles: [".search-results-page[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-page);\n overflow: hidden;\n }\n .search-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 8px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n flex-shrink: 0;\n }\n .search-header-left[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .search-header-right[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .search-meta[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 13px;\n white-space: nowrap;\n }\n .sr-icon-btn[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: all 0.15s;\n font-size: 13px;\n flex-shrink: 0;\n }\n .sr-icon-btn[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n .sr-icon-btn[_ngcontent-%COMP%]:disabled { opacity: 0.4; cursor: default; }\n .sr-refine-wrapper[_ngcontent-%COMP%] {\n position: relative;\n display: flex;\n align-items: center;\n }\n .sr-refine-icon[_ngcontent-%COMP%] {\n position: absolute;\n left: 8px;\n color: var(--mj-text-muted);\n font-size: 12px;\n pointer-events: none;\n }\n .sr-refine-input[_ngcontent-%COMP%] {\n padding: 5px 28px 5px 26px;\n font-size: 12px;\n width: 180px;\n border-radius: 6px;\n }\n .sr-refine-clear[_ngcontent-%COMP%] {\n position: absolute;\n right: 6px;\n background: none;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n font-size: 11px;\n padding: 2px;\n }\n .sr-refine-clear[_ngcontent-%COMP%]:hover { color: var(--mj-text-primary); }\n .sr-sort-select[_ngcontent-%COMP%] {\n padding: 5px 24px 5px 8px;\n font-size: 12px;\n border-radius: 6px;\n min-width: 130px;\n }\n .search-loading[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n padding: 60px 0;\n }\n .search-body[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n gap: 16px;\n padding: 16px 24px;\n overflow: hidden;\n }\n .search-body[_ngcontent-%COMP%] mj-search-filter[_ngcontent-%COMP%] {\n flex-shrink: 0;\n width: 240px;\n overflow-y: auto;\n }\n .search-body[_ngcontent-%COMP%] mj-search-results[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n overflow-y: auto;\n }\n .search-no-results[_ngcontent-%COMP%] {\n text-align: center;\n padding: 60px 20px;\n color: var(--mj-text-muted);\n }\n .search-no-results[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.4;\n }\n .search-no-results[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n font-size: 18px;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n }\n .search-no-results[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 14px;\n margin: 0;\n }\n .search-results-body-wrapper[_ngcontent-%COMP%] {\n position: relative;\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .search-requery-overlay[_ngcontent-%COMP%] {\n position: absolute;\n inset: 0;\n background: color-mix(in srgb, var(--mj-bg-page) 75%, transparent);\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .search-no-results-inline[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n color: var(--mj-text-muted);\n padding: 40px 20px;\n }\n .search-no-results-inline[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 32px;\n opacity: 0.4;\n }\n .search-no-results-inline[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 13px;\n margin: 0;\n }\n .sr-view-toggle[_ngcontent-%COMP%] {\n display: flex;\n gap: 2px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n padding: 2px;\n background: var(--mj-bg-surface-sunken);\n }\n .sr-view-toggle[_ngcontent-%COMP%] .sr-icon-btn[_ngcontent-%COMP%] {\n border: none;\n border-radius: 4px;\n width: 28px;\n height: 26px;\n font-size: 12px;\n background: transparent;\n }\n .sr-view-toggle[_ngcontent-%COMP%] .sr-icon-btn.sr-view-active[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n box-shadow: 0 1px 2px color-mix(in srgb, var(--mj-text-primary) 10%, transparent);\n }\n .search-cloud-wrapper[_ngcontent-%COMP%] {\n flex: 1;\n padding: 24px;\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .search-cloud-wrapper[_ngcontent-%COMP%] mj-word-cloud[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n max-height: 600px;\n }"] });
|
|
40
667
|
};
|
|
41
668
|
SearchResultsResource = __decorate([
|
|
42
669
|
RegisterClass(BaseResourceComponent, 'SearchResultsResource')
|
|
@@ -44,11 +671,145 @@ SearchResultsResource = __decorate([
|
|
|
44
671
|
export { SearchResultsResource };
|
|
45
672
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultsResource, [{
|
|
46
673
|
type: Component,
|
|
47
|
-
args: [{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
674
|
+
args: [{ standalone: false, selector: 'mj-search-results-resource', template: `
|
|
675
|
+
<div class="search-results-page">
|
|
676
|
+
<!-- Header bar (always visible when we have server results) -->
|
|
677
|
+
@if (HasSearched && ServerResultCount > 0) {
|
|
678
|
+
<div class="search-header">
|
|
679
|
+
<div class="search-header-left">
|
|
680
|
+
@if (!ShowFilterPanel) {
|
|
681
|
+
<button class="sr-icon-btn" title="Show filters" (click)="ToggleFilterPanel()">
|
|
682
|
+
<i class="fa-solid fa-filter"></i>
|
|
683
|
+
</button>
|
|
684
|
+
}
|
|
685
|
+
<span class="search-meta">
|
|
686
|
+
{{ FilteredResults.length }} of {{ ServerResultCount }} result{{ ServerResultCount !== 1 ? 's' : '' }}
|
|
687
|
+
for "{{ CurrentQuery }}" in {{ ElapsedMs }}ms
|
|
688
|
+
</span>
|
|
689
|
+
</div>
|
|
690
|
+
<div class="search-header-right">
|
|
691
|
+
<!-- Search within results -->
|
|
692
|
+
<div class="sr-refine-wrapper">
|
|
693
|
+
<i class="fa-solid fa-filter-list sr-refine-icon"></i>
|
|
694
|
+
<input class="mj-input sr-refine-input"
|
|
695
|
+
placeholder="Filter within results..."
|
|
696
|
+
[value]="ClientFilterText"
|
|
697
|
+
(input)="OnClientFilterTextChange($any($event.target).value)" />
|
|
698
|
+
@if (ClientFilterText) {
|
|
699
|
+
<button class="sr-refine-clear" (click)="OnClientFilterTextChange('')">
|
|
700
|
+
<i class="fa-solid fa-xmark"></i>
|
|
701
|
+
</button>
|
|
702
|
+
}
|
|
703
|
+
</div>
|
|
704
|
+
<!-- Sort -->
|
|
705
|
+
<select class="mj-input sr-sort-select" [value]="SortField" (change)="OnSortChange($any($event.target).value)">
|
|
706
|
+
<option value="score">Sort: Relevance</option>
|
|
707
|
+
<option value="title">Sort: Name</option>
|
|
708
|
+
<option value="entity">Sort: Entity</option>
|
|
709
|
+
</select>
|
|
710
|
+
<!-- View mode toggle -->
|
|
711
|
+
<div class="sr-view-toggle">
|
|
712
|
+
<button class="sr-icon-btn"
|
|
713
|
+
[class.sr-view-active]="ViewMode === 'list'"
|
|
714
|
+
title="List view"
|
|
715
|
+
(click)="SetViewMode('list')">
|
|
716
|
+
<i class="fa-solid fa-list"></i>
|
|
717
|
+
</button>
|
|
718
|
+
<button class="sr-icon-btn"
|
|
719
|
+
[class.sr-view-active]="ViewMode === 'cloud'"
|
|
720
|
+
title="Tag cloud view"
|
|
721
|
+
(click)="SetViewMode('cloud')">
|
|
722
|
+
<i class="fa-solid fa-cloud"></i>
|
|
723
|
+
</button>
|
|
724
|
+
</div>
|
|
725
|
+
<!-- Refresh -->
|
|
726
|
+
<button class="sr-icon-btn" title="Refresh search" (click)="OnRefresh()" [disabled]="IsSearching">
|
|
727
|
+
<i class="fa-solid fa-arrows-rotate" [class.fa-spin]="IsSearching"></i>
|
|
728
|
+
</button>
|
|
729
|
+
</div>
|
|
730
|
+
</div>
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
<!-- Initial loading (first search) -->
|
|
734
|
+
@if (IsSearching && ServerResultCount === 0) {
|
|
735
|
+
<div class="search-loading">
|
|
736
|
+
<mj-loading text="Searching..." size="medium"></mj-loading>
|
|
737
|
+
</div>
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
<!-- No server results -->
|
|
741
|
+
@if (!IsSearching && ServerResultCount === 0 && HasSearched) {
|
|
742
|
+
<div class="search-no-results">
|
|
743
|
+
<i class="fa-solid fa-magnifying-glass-minus"></i>
|
|
744
|
+
<h3>No results found</h3>
|
|
745
|
+
<p>Try different keywords or broaden your search.</p>
|
|
746
|
+
</div>
|
|
747
|
+
}
|
|
748
|
+
<!-- Results body (visible when server returned results) -->
|
|
749
|
+
@if (ServerResultCount > 0) {
|
|
750
|
+
<div class="search-results-body-wrapper">
|
|
751
|
+
<!-- Semi-opaque loading overlay for re-queries (slider lowered, etc.) -->
|
|
752
|
+
@if (IsSearching) {
|
|
753
|
+
<div class="search-requery-overlay">
|
|
754
|
+
<mj-loading text="Updating results..." size="medium"></mj-loading>
|
|
755
|
+
</div>
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
@if (ViewMode === 'cloud') {
|
|
759
|
+
<div class="search-cloud-wrapper">
|
|
760
|
+
@if (IsLoadingCloud) {
|
|
761
|
+
<mj-loading text="Loading tag cloud..." size="medium"></mj-loading>
|
|
762
|
+
} @else {
|
|
763
|
+
<mj-word-cloud
|
|
764
|
+
[Items]="CloudItems"
|
|
765
|
+
[MaxItems]="80"
|
|
766
|
+
ColorMode="weight-gradient"
|
|
767
|
+
[Interactive]="true"
|
|
768
|
+
(ItemClick)="OnCloudItemClick($event)">
|
|
769
|
+
</mj-word-cloud>
|
|
770
|
+
}
|
|
771
|
+
</div>
|
|
772
|
+
} @else {
|
|
773
|
+
<div class="search-body">
|
|
774
|
+
@if (ShowFilterPanel) {
|
|
775
|
+
<mj-search-filter
|
|
776
|
+
[Filters]="Filters"
|
|
777
|
+
[ActiveFilters]="ActiveFilters"
|
|
778
|
+
[ShowRelevanceSlider]="true"
|
|
779
|
+
[MinScorePercent]="MinScorePercent"
|
|
780
|
+
[ServerMinScorePercent]="serverMinScorePercent"
|
|
781
|
+
(FilterChanged)="OnFilterChanged($event)"
|
|
782
|
+
(FiltersCleared)="OnFiltersCleared()"
|
|
783
|
+
(CloseRequested)="ToggleFilterPanel()"
|
|
784
|
+
(MinScoreChanged)="OnMinScoreChanged($any($event))">
|
|
785
|
+
</mj-search-filter>
|
|
786
|
+
}
|
|
787
|
+
@if (FilteredResults.length > 0) {
|
|
788
|
+
<mj-search-results
|
|
789
|
+
[FlatResults]="FilteredResults"
|
|
790
|
+
[HighlightText]="ClientFilterText"
|
|
791
|
+
[ShowScores]="true"
|
|
792
|
+
[ShowTags]="true"
|
|
793
|
+
[ShowSummary]="false"
|
|
794
|
+
[PageSize]="20"
|
|
795
|
+
(ResultSelected)="OnResultSelected($event)"
|
|
796
|
+
(OpenRecordRequested)="OnOpenRecord($event)">
|
|
797
|
+
</mj-search-results>
|
|
798
|
+
} @else {
|
|
799
|
+
<div class="search-no-results-inline">
|
|
800
|
+
<i class="fa-solid fa-filter-circle-xmark"></i>
|
|
801
|
+
<p>No results match current filters. Try lowering the minimum relevance.</p>
|
|
802
|
+
</div>
|
|
803
|
+
}
|
|
804
|
+
</div>
|
|
805
|
+
}
|
|
806
|
+
</div>
|
|
807
|
+
}
|
|
808
|
+
</div>
|
|
809
|
+
`, styles: ["\n .search-results-page {\n height: 100%;\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-page);\n overflow: hidden;\n }\n .search-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 8px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n flex-shrink: 0;\n }\n .search-header-left {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .search-header-right {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .search-meta {\n color: var(--mj-text-muted);\n font-size: 13px;\n white-space: nowrap;\n }\n .sr-icon-btn {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: all 0.15s;\n font-size: 13px;\n flex-shrink: 0;\n }\n .sr-icon-btn:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }\n .sr-icon-btn:disabled { opacity: 0.4; cursor: default; }\n .sr-refine-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n }\n .sr-refine-icon {\n position: absolute;\n left: 8px;\n color: var(--mj-text-muted);\n font-size: 12px;\n pointer-events: none;\n }\n .sr-refine-input {\n padding: 5px 28px 5px 26px;\n font-size: 12px;\n width: 180px;\n border-radius: 6px;\n }\n .sr-refine-clear {\n position: absolute;\n right: 6px;\n background: none;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n font-size: 11px;\n padding: 2px;\n }\n .sr-refine-clear:hover { color: var(--mj-text-primary); }\n .sr-sort-select {\n padding: 5px 24px 5px 8px;\n font-size: 12px;\n border-radius: 6px;\n min-width: 130px;\n }\n .search-loading {\n display: flex;\n justify-content: center;\n padding: 60px 0;\n }\n .search-body {\n flex: 1;\n display: flex;\n gap: 16px;\n padding: 16px 24px;\n overflow: hidden;\n }\n .search-body mj-search-filter {\n flex-shrink: 0;\n width: 240px;\n overflow-y: auto;\n }\n .search-body mj-search-results {\n flex: 1;\n min-width: 0;\n overflow-y: auto;\n }\n .search-no-results {\n text-align: center;\n padding: 60px 20px;\n color: var(--mj-text-muted);\n }\n .search-no-results i {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.4;\n }\n .search-no-results h3 {\n font-size: 18px;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n }\n .search-no-results p {\n font-size: 14px;\n margin: 0;\n }\n .search-results-body-wrapper {\n position: relative;\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .search-requery-overlay {\n position: absolute;\n inset: 0;\n background: color-mix(in srgb, var(--mj-bg-page) 75%, transparent);\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .search-no-results-inline {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n color: var(--mj-text-muted);\n padding: 40px 20px;\n }\n .search-no-results-inline i {\n font-size: 32px;\n opacity: 0.4;\n }\n .search-no-results-inline p {\n font-size: 13px;\n margin: 0;\n }\n .sr-view-toggle {\n display: flex;\n gap: 2px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n padding: 2px;\n background: var(--mj-bg-surface-sunken);\n }\n .sr-view-toggle .sr-icon-btn {\n border: none;\n border-radius: 4px;\n width: 28px;\n height: 26px;\n font-size: 12px;\n background: transparent;\n }\n .sr-view-toggle .sr-icon-btn.sr-view-active {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n box-shadow: 0 1px 2px color-mix(in srgb, var(--mj-text-primary) 10%, transparent);\n }\n .search-cloud-wrapper {\n flex: 1;\n padding: 24px;\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .search-cloud-wrapper mj-word-cloud {\n width: 100%;\n height: 100%;\n max-height: 600px;\n }\n "] }]
|
|
52
810
|
}], null, null); })();
|
|
53
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultsResource, { className: "SearchResultsResource", filePath: "src/lib/resource-wrappers/search-results-resource.component.ts", lineNumber:
|
|
811
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchResultsResource, { className: "SearchResultsResource", filePath: "src/lib/resource-wrappers/search-results-resource.component.ts", lineNumber: 354 }); })();
|
|
812
|
+
export function LoadSearchResultsResource() {
|
|
813
|
+
// Tree-shaking prevention
|
|
814
|
+
}
|
|
54
815
|
//# sourceMappingURL=search-results-resource.component.js.map
|