@memberjunction/ng-search 5.42.0 → 5.44.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/lib/module.d.ts +2 -1
- package/dist/lib/module.d.ts.map +1 -1
- package/dist/lib/module.js +10 -3
- package/dist/lib/module.js.map +1 -1
- package/dist/lib/search-filter.component.d.ts +6 -2
- package/dist/lib/search-filter.component.d.ts.map +1 -1
- package/dist/lib/search-filter.component.js +66 -70
- package/dist/lib/search-filter.component.js.map +1 -1
- package/dist/lib/search-overlay.component.js +42 -52
- package/dist/lib/search-overlay.component.js.map +1 -1
- package/dist/lib/search-results.component.js +76 -79
- package/dist/lib/search-results.component.js.map +1 -1
- package/package.json +9 -7
- package/dist/__tests__/search-results.component.test.d.ts +0 -2
- package/dist/__tests__/search-results.component.test.d.ts.map +0 -1
- package/dist/__tests__/search-results.component.test.js +0 -263
- package/dist/__tests__/search-results.component.test.js.map +0 -1
- package/dist/__tests__/search-types.test.d.ts +0 -2
- package/dist/__tests__/search-types.test.d.ts.map +0 -1
- package/dist/__tests__/search-types.test.js +0 -111
- package/dist/__tests__/search-types.test.js.map +0 -1
- package/dist/__tests__/search.service.test.d.ts +0 -2
- package/dist/__tests__/search.service.test.d.ts.map +0 -1
- package/dist/__tests__/search.service.test.js +0 -438
- package/dist/__tests__/search.service.test.js.map +0 -1
package/dist/lib/module.d.ts
CHANGED
|
@@ -10,9 +10,10 @@ import * as i8 from "./search-scope-child-grid.component";
|
|
|
10
10
|
import * as i9 from "@angular/common";
|
|
11
11
|
import * as i10 from "@angular/forms";
|
|
12
12
|
import * as i11 from "@memberjunction/ng-shared-generic";
|
|
13
|
+
import * as i12 from "@memberjunction/ng-ui-components";
|
|
13
14
|
export declare class SearchModule {
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<SearchModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SearchModule, [typeof i1.SearchOverlayComponent, typeof i2.SearchResultsComponent, typeof i3.SearchFilterComponent, typeof i4.SearchInputComponent, typeof i5.SearchSuggestComponent, typeof i6.SearchCompositeComponent, typeof i7.SearchScopeSelectorComponent, typeof i8.SearchScopeChildGridComponent], [typeof i9.CommonModule, typeof i10.FormsModule, typeof i11.SharedGenericModule], [typeof i1.SearchOverlayComponent, typeof i2.SearchResultsComponent, typeof i3.SearchFilterComponent, typeof i4.SearchInputComponent, typeof i5.SearchSuggestComponent, typeof i6.SearchCompositeComponent, typeof i7.SearchScopeSelectorComponent, typeof i8.SearchScopeChildGridComponent]>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SearchModule, [typeof i1.SearchOverlayComponent, typeof i2.SearchResultsComponent, typeof i3.SearchFilterComponent, typeof i4.SearchInputComponent, typeof i5.SearchSuggestComponent, typeof i6.SearchCompositeComponent, typeof i7.SearchScopeSelectorComponent, typeof i8.SearchScopeChildGridComponent], [typeof i9.CommonModule, typeof i10.FormsModule, typeof i11.SharedGenericModule, typeof i12.MJEmptyStateComponent, typeof i12.MJAccordionModule], [typeof i1.SearchOverlayComponent, typeof i2.SearchResultsComponent, typeof i3.SearchFilterComponent, typeof i4.SearchInputComponent, typeof i5.SearchSuggestComponent, typeof i6.SearchCompositeComponent, typeof i7.SearchScopeSelectorComponent, typeof i8.SearchScopeChildGridComponent]>;
|
|
16
17
|
static ɵinj: i0.ɵɵInjectorDeclaration<SearchModule>;
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=module.d.ts.map
|
package/dist/lib/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAeA,qBA6Ba,YAAY;yCAAZ,YAAY;0CAAZ,YAAY;0CAAZ,YAAY;CAAI"}
|
package/dist/lib/module.js
CHANGED
|
@@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
4
|
import { SharedGenericModule } from '@memberjunction/ng-shared-generic';
|
|
5
|
+
import { MJAccordionModule, MJEmptyStateComponent } from '@memberjunction/ng-ui-components';
|
|
5
6
|
import { SearchOverlayComponent } from './search-overlay.component';
|
|
6
7
|
import { SearchResultsComponent } from './search-results.component';
|
|
7
8
|
import { SearchFilterComponent } from './search-filter.component';
|
|
@@ -16,7 +17,9 @@ export class SearchModule {
|
|
|
16
17
|
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: SearchModule });
|
|
17
18
|
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
18
19
|
FormsModule,
|
|
19
|
-
SharedGenericModule
|
|
20
|
+
SharedGenericModule,
|
|
21
|
+
MJEmptyStateComponent,
|
|
22
|
+
MJAccordionModule] });
|
|
20
23
|
}
|
|
21
24
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchModule, [{
|
|
22
25
|
type: NgModule,
|
|
@@ -34,7 +37,9 @@ export class SearchModule {
|
|
|
34
37
|
imports: [
|
|
35
38
|
CommonModule,
|
|
36
39
|
FormsModule,
|
|
37
|
-
SharedGenericModule
|
|
40
|
+
SharedGenericModule,
|
|
41
|
+
MJEmptyStateComponent,
|
|
42
|
+
MJAccordionModule
|
|
38
43
|
],
|
|
39
44
|
exports: [
|
|
40
45
|
SearchOverlayComponent,
|
|
@@ -57,7 +62,9 @@ export class SearchModule {
|
|
|
57
62
|
SearchScopeSelectorComponent,
|
|
58
63
|
SearchScopeChildGridComponent], imports: [CommonModule,
|
|
59
64
|
FormsModule,
|
|
60
|
-
SharedGenericModule
|
|
65
|
+
SharedGenericModule,
|
|
66
|
+
MJEmptyStateComponent,
|
|
67
|
+
MJAccordionModule], exports: [SearchOverlayComponent,
|
|
61
68
|
SearchResultsComponent,
|
|
62
69
|
SearchFilterComponent,
|
|
63
70
|
SearchInputComponent,
|
package/dist/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;;AA+BpF,MAAM,OAAO,YAAY;sGAAZ,YAAY;4DAAZ,YAAY;gEAjBjB,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,qBAAqB;YACrB,iBAAiB;;iFAaZ,YAAY;cA7BxB,QAAQ;eAAC;gBACN,YAAY,EAAE;oBACV,sBAAsB;oBACtB,sBAAsB;oBACtB,qBAAqB;oBACrB,oBAAoB;oBACpB,sBAAsB;oBACtB,wBAAwB;oBACxB,4BAA4B;oBAC5B,6BAA6B;iBAChC;gBACD,OAAO,EAAE;oBACL,YAAY;oBACZ,WAAW;oBACX,mBAAmB;oBACnB,qBAAqB;oBACrB,iBAAiB;iBACpB;gBACD,OAAO,EAAE;oBACL,sBAAsB;oBACtB,sBAAsB;oBACtB,qBAAqB;oBACrB,oBAAoB;oBACpB,sBAAsB;oBACtB,wBAAwB;oBACxB,4BAA4B;oBAC5B,6BAA6B;iBAChC;aACJ;;wFACY,YAAY,mBA3BjB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,oBAAoB;QACpB,sBAAsB;QACtB,wBAAwB;QACxB,4BAA4B;QAC5B,6BAA6B,aAG7B,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,qBAAqB;QACrB,iBAAiB,aAGjB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,oBAAoB;QACpB,sBAAsB;QACtB,wBAAwB;QACxB,4BAA4B;QAC5B,6BAA6B","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\nimport { MJAccordionModule, MJEmptyStateComponent } from '@memberjunction/ng-ui-components';\n\nimport { SearchOverlayComponent } from './search-overlay.component';\nimport { SearchResultsComponent } from './search-results.component';\nimport { SearchFilterComponent } from './search-filter.component';\nimport { SearchInputComponent } from './search-input.component';\nimport { SearchSuggestComponent } from './search-suggest.component';\nimport { SearchCompositeComponent } from './search-composite.component';\nimport { SearchScopeSelectorComponent } from './search-scope-selector.component';\nimport { SearchScopeChildGridComponent } from './search-scope-child-grid.component';\n\n@NgModule({\n declarations: [\n SearchOverlayComponent,\n SearchResultsComponent,\n SearchFilterComponent,\n SearchInputComponent,\n SearchSuggestComponent,\n SearchCompositeComponent,\n SearchScopeSelectorComponent,\n SearchScopeChildGridComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n SharedGenericModule,\n MJEmptyStateComponent,\n MJAccordionModule\n ],\n exports: [\n SearchOverlayComponent,\n SearchResultsComponent,\n SearchFilterComponent,\n SearchInputComponent,\n SearchSuggestComponent,\n SearchCompositeComponent,\n SearchScopeSelectorComponent,\n SearchScopeChildGridComponent\n ]\n})\nexport class SearchModule { }\n"]}
|
|
@@ -29,8 +29,12 @@ export declare class SearchFilterComponent {
|
|
|
29
29
|
CollapsedCategories: Set<string>;
|
|
30
30
|
/** Toggle a filter option */
|
|
31
31
|
ToggleOption(category: string, value: string): void;
|
|
32
|
-
/**
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Apply the expand/collapse state emitted by a category's accordion panel.
|
|
34
|
+
* Inverse mapping: an expanded panel means the category is NOT collapsed.
|
|
35
|
+
* No-op when filtering is not collapsible.
|
|
36
|
+
*/
|
|
37
|
+
OnCategoryExpandedChange(category: string, expanded: boolean): void;
|
|
34
38
|
/** Check if a category is collapsed */
|
|
35
39
|
IsCategoryCollapsed(category: string): boolean;
|
|
36
40
|
/** Check if an option is selected */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-filter.component.d.ts","sourceRoot":"","sources":["../../src/lib/search-filter.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEH,YAAY,EAKf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;;AAEvE,qBAMa,qBAAqB;IAC9B,OAAO,CAAC,GAAG,CAA6B;IAExC,mCAAmC;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAM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ACI,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;IAU1E,uCAAuC;IAChC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIrD,qCAAqC;IAC9B,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAIjE,sCAAsC;IAC/B,gBAAgB,IAAI,OAAO;IAIlC,oCAAoC;IAC7B,oBAAoB,IAAI,MAAM;IAIrC,wBAAwB;IACjB,QAAQ,IAAI,IAAI;IAMvB,6EAA6E;IACtE,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAgBxC,sDAAsD;IAC/C,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAO/C,8FAA8F;IACvF,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7C,0FAA0F;IACnF,gBAAgB,IAAI,IAAI;IAI/B,4EAA4E;IACrE,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;yCA1HnC,qBAAqB;2CAArB,qBAAqB;CA8HjC"}
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { Component, EventEmitter, Input, Output, ChangeDetectorRef, inject } from '@angular/core';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@memberjunction/ng-ui-components";
|
|
9
10
|
const _forTrack0 = ($index, $item) => $item.Category;
|
|
10
11
|
const _forTrack1 = ($index, $item) => $item.Value;
|
|
11
12
|
function SearchFilterComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
12
13
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
13
|
-
i0.ɵɵelementStart(0, "button",
|
|
14
|
+
i0.ɵɵelementStart(0, "button", 11);
|
|
14
15
|
i0.ɵɵlistener("click", function SearchFilterComponent_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ClearAll()); });
|
|
15
16
|
i0.ɵɵtext(1);
|
|
16
17
|
i0.ɵɵelementEnd();
|
|
@@ -19,39 +20,48 @@ function SearchFilterComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
19
20
|
i0.ɵɵadvance();
|
|
20
21
|
i0.ɵɵtextInterpolate1(" Clear (", ctx_r1.GetActiveFilterCount(), ") ");
|
|
21
22
|
} }
|
|
22
|
-
function
|
|
23
|
-
i0.ɵɵ
|
|
23
|
+
function SearchFilterComponent_For_10_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵelementStart(0, "span", 16);
|
|
25
|
+
i0.ɵɵtext(1);
|
|
26
|
+
i0.ɵɵelementEnd();
|
|
24
27
|
} if (rf & 2) {
|
|
25
28
|
const filter_r4 = i0.ɵɵnextContext().$implicit;
|
|
26
|
-
|
|
27
|
-
i0.ɵɵ
|
|
29
|
+
i0.ɵɵadvance();
|
|
30
|
+
i0.ɵɵtextInterpolate(filter_r4.Category);
|
|
28
31
|
} }
|
|
29
|
-
function
|
|
32
|
+
function SearchFilterComponent_For_10_ng_template_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
30
33
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
31
34
|
i0.ɵɵelementStart(0, "button", 18);
|
|
32
|
-
i0.ɵɵlistener("click", function
|
|
35
|
+
i0.ɵɵlistener("click", function SearchFilterComponent_For_10_ng_template_2_Conditional_0_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const filter_r4 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.SelectAll(filter_r4.Category); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
33
36
|
i0.ɵɵtext(1);
|
|
34
37
|
i0.ɵɵelementEnd();
|
|
35
38
|
} if (rf & 2) {
|
|
36
|
-
const filter_r4 = i0.ɵɵnextContext().$implicit;
|
|
39
|
+
const filter_r4 = i0.ɵɵnextContext(2).$implicit;
|
|
37
40
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
38
41
|
i0.ɵɵproperty("title", ctx_r1.IsAllSelected(filter_r4.Category) ? "Clear all" : "Select all");
|
|
39
42
|
i0.ɵɵadvance();
|
|
40
43
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.IsAllSelected(filter_r4.Category) ? "Clear" : "All", " ");
|
|
41
44
|
} }
|
|
42
|
-
function
|
|
45
|
+
function SearchFilterComponent_For_10_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
+
i0.ɵɵconditionalCreate(0, SearchFilterComponent_For_10_ng_template_2_Conditional_0_Template, 2, 2, "button", 17);
|
|
47
|
+
} if (rf & 2) {
|
|
48
|
+
const filter_r4 = i0.ɵɵnextContext().$implicit;
|
|
49
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
50
|
+
i0.ɵɵconditional((!ctx_r1.Collapsible || !ctx_r1.IsCategoryCollapsed(filter_r4.Category)) && filter_r4.Options.length > 1 ? 0 : -1);
|
|
51
|
+
} }
|
|
52
|
+
function SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
43
53
|
i0.ɵɵelement(0, "i");
|
|
44
54
|
} if (rf & 2) {
|
|
45
55
|
const option_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
46
56
|
i0.ɵɵclassMap(option_r6.Icon + " filter-option-icon");
|
|
47
57
|
} }
|
|
48
|
-
function
|
|
49
|
-
i0.ɵɵelementStart(0, "div",
|
|
50
|
-
i0.ɵɵconditionalCreate(1,
|
|
51
|
-
i0.ɵɵelementStart(2, "span",
|
|
58
|
+
function SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
+
i0.ɵɵelementStart(0, "div", 20);
|
|
60
|
+
i0.ɵɵconditionalCreate(1, SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_0_Conditional_1_Template, 1, 2, "i", 22);
|
|
61
|
+
i0.ɵɵelementStart(2, "span", 23);
|
|
52
62
|
i0.ɵɵtext(3);
|
|
53
63
|
i0.ɵɵelementEnd();
|
|
54
|
-
i0.ɵɵelementStart(4, "span",
|
|
64
|
+
i0.ɵɵelementStart(4, "span", 24);
|
|
55
65
|
i0.ɵɵtext(5);
|
|
56
66
|
i0.ɵɵelementEnd()();
|
|
57
67
|
} if (rf & 2) {
|
|
@@ -63,27 +73,27 @@ function SearchFilterComponent_For_10_Conditional_7_For_2_Conditional_0_Template
|
|
|
63
73
|
i0.ɵɵadvance(2);
|
|
64
74
|
i0.ɵɵtextInterpolate(option_r6.Count);
|
|
65
75
|
} }
|
|
66
|
-
function
|
|
67
|
-
i0.ɵɵelement(0, "i",
|
|
76
|
+
function SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
77
|
+
i0.ɵɵelement(0, "i", 27);
|
|
68
78
|
} }
|
|
69
|
-
function
|
|
79
|
+
function SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
70
80
|
i0.ɵɵelement(0, "i");
|
|
71
81
|
} if (rf & 2) {
|
|
72
82
|
const option_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
73
83
|
i0.ɵɵclassMap(option_r6.Icon + " filter-option-icon");
|
|
74
84
|
} }
|
|
75
|
-
function
|
|
85
|
+
function SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
76
86
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
77
|
-
i0.ɵɵelementStart(0, "label",
|
|
78
|
-
i0.ɵɵlistener("click", function
|
|
79
|
-
i0.ɵɵelementStart(1, "span",
|
|
80
|
-
i0.ɵɵconditionalCreate(2,
|
|
87
|
+
i0.ɵɵelementStart(0, "label", 25);
|
|
88
|
+
i0.ɵɵlistener("click", function SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_1_Template_label_click_0_listener($event) { i0.ɵɵrestoreView(_r7); const option_r6 = i0.ɵɵnextContext().$implicit; const filter_r4 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.ToggleOption(filter_r4.Category, option_r6.Value); return i0.ɵɵresetView($event.preventDefault()); });
|
|
89
|
+
i0.ɵɵelementStart(1, "span", 26);
|
|
90
|
+
i0.ɵɵconditionalCreate(2, SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_1_Conditional_2_Template, 1, 0, "i", 27);
|
|
81
91
|
i0.ɵɵelementEnd();
|
|
82
|
-
i0.ɵɵconditionalCreate(3,
|
|
83
|
-
i0.ɵɵelementStart(4, "span",
|
|
92
|
+
i0.ɵɵconditionalCreate(3, SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_1_Conditional_3_Template, 1, 2, "i", 22);
|
|
93
|
+
i0.ɵɵelementStart(4, "span", 23);
|
|
84
94
|
i0.ɵɵtext(5);
|
|
85
95
|
i0.ɵɵelementEnd();
|
|
86
|
-
i0.ɵɵelementStart(6, "span",
|
|
96
|
+
i0.ɵɵelementStart(6, "span", 24);
|
|
87
97
|
i0.ɵɵtext(7);
|
|
88
98
|
i0.ɵɵelementEnd()();
|
|
89
99
|
} if (rf & 2) {
|
|
@@ -101,15 +111,15 @@ function SearchFilterComponent_For_10_Conditional_7_For_2_Conditional_1_Template
|
|
|
101
111
|
i0.ɵɵadvance(2);
|
|
102
112
|
i0.ɵɵtextInterpolate(option_r6.Count);
|
|
103
113
|
} }
|
|
104
|
-
function
|
|
105
|
-
i0.ɵɵconditionalCreate(0,
|
|
114
|
+
function SearchFilterComponent_For_10_ng_template_3_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
115
|
+
i0.ɵɵconditionalCreate(0, SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_0_Template, 6, 3, "div", 20)(1, SearchFilterComponent_For_10_ng_template_3_For_2_Conditional_1_Template, 8, 6, "label", 21);
|
|
106
116
|
} if (rf & 2) {
|
|
107
117
|
const filter_r4 = i0.ɵɵnextContext(2).$implicit;
|
|
108
118
|
i0.ɵɵconditional(filter_r4.Options.length === 1 ? 0 : 1);
|
|
109
119
|
} }
|
|
110
|
-
function
|
|
111
|
-
i0.ɵɵelementStart(0, "div",
|
|
112
|
-
i0.ɵɵrepeaterCreate(1,
|
|
120
|
+
function SearchFilterComponent_For_10_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
121
|
+
i0.ɵɵelementStart(0, "div", 19);
|
|
122
|
+
i0.ɵɵrepeaterCreate(1, SearchFilterComponent_For_10_ng_template_3_For_2_Template, 2, 1, null, null, _forTrack1);
|
|
113
123
|
i0.ɵɵelementEnd();
|
|
114
124
|
} if (rf & 2) {
|
|
115
125
|
const filter_r4 = i0.ɵɵnextContext().$implicit;
|
|
@@ -118,42 +128,26 @@ function SearchFilterComponent_For_10_Conditional_7_Template(rf, ctx) { if (rf &
|
|
|
118
128
|
} }
|
|
119
129
|
function SearchFilterComponent_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
120
130
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
121
|
-
i0.ɵɵelementStart(0, "
|
|
122
|
-
i0.ɵɵlistener("
|
|
123
|
-
i0.ɵɵ
|
|
124
|
-
i0.ɵɵtext(4);
|
|
125
|
-
i0.ɵɵelementEnd();
|
|
126
|
-
i0.ɵɵconditionalCreate(5, SearchFilterComponent_For_10_Conditional_5_Template, 1, 4, "i", 14);
|
|
127
|
-
i0.ɵɵelementEnd();
|
|
128
|
-
i0.ɵɵconditionalCreate(6, SearchFilterComponent_For_10_Conditional_6_Template, 2, 2, "button", 15);
|
|
129
|
-
i0.ɵɵelementEnd();
|
|
130
|
-
i0.ɵɵconditionalCreate(7, SearchFilterComponent_For_10_Conditional_7_Template, 3, 0, "div", 16);
|
|
131
|
+
i0.ɵɵelementStart(0, "mj-accordion-panel", 12);
|
|
132
|
+
i0.ɵɵlistener("ExpandedChange", function SearchFilterComponent_For_10_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { const filter_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnCategoryExpandedChange(filter_r4.Category, $event)); });
|
|
133
|
+
i0.ɵɵtemplate(1, SearchFilterComponent_For_10_ng_template_1_Template, 2, 1, "ng-template", 13)(2, SearchFilterComponent_For_10_ng_template_2_Template, 1, 1, "ng-template", 14)(3, SearchFilterComponent_For_10_ng_template_3_Template, 3, 0, "ng-template", 15);
|
|
131
134
|
i0.ɵɵelementEnd();
|
|
132
135
|
} if (rf & 2) {
|
|
133
136
|
const filter_r4 = ctx.$implicit;
|
|
134
137
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
135
|
-
i0.ɵɵ
|
|
136
|
-
i0.ɵɵclassProp("filter-category-collapsed", ctx_r1.IsCategoryCollapsed(filter_r4.Category));
|
|
137
|
-
i0.ɵɵadvance(2);
|
|
138
|
-
i0.ɵɵtextInterpolate(filter_r4.Category);
|
|
139
|
-
i0.ɵɵadvance();
|
|
140
|
-
i0.ɵɵconditional(ctx_r1.Collapsible ? 5 : -1);
|
|
141
|
-
i0.ɵɵadvance();
|
|
142
|
-
i0.ɵɵconditional(!ctx_r1.IsCategoryCollapsed(filter_r4.Category) && filter_r4.Options.length > 1 ? 6 : -1);
|
|
143
|
-
i0.ɵɵadvance();
|
|
144
|
-
i0.ɵɵconditional(!ctx_r1.IsCategoryCollapsed(filter_r4.Category) ? 7 : -1);
|
|
138
|
+
i0.ɵɵproperty("FlushBody", true)("Expanded", ctx_r1.Collapsible ? !ctx_r1.IsCategoryCollapsed(filter_r4.Category) : true);
|
|
145
139
|
} }
|
|
146
140
|
function SearchFilterComponent_Conditional_11_Conditional_9_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
147
|
-
i0.ɵɵelementStart(0, "span",
|
|
148
|
-
i0.ɵɵelement(1, "i",
|
|
141
|
+
i0.ɵɵelementStart(0, "span", 35);
|
|
142
|
+
i0.ɵɵelement(1, "i", 36);
|
|
149
143
|
i0.ɵɵtext(2, " Will re-query ");
|
|
150
144
|
i0.ɵɵelementEnd();
|
|
151
145
|
} }
|
|
152
146
|
function SearchFilterComponent_Conditional_11_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
153
|
-
i0.ɵɵelementStart(0, "div",
|
|
147
|
+
i0.ɵɵelementStart(0, "div", 33)(1, "span", 34);
|
|
154
148
|
i0.ɵɵtext(2);
|
|
155
149
|
i0.ɵɵelementEnd();
|
|
156
|
-
i0.ɵɵconditionalCreate(3, SearchFilterComponent_Conditional_11_Conditional_9_Conditional_3_Template, 3, 0, "span",
|
|
150
|
+
i0.ɵɵconditionalCreate(3, SearchFilterComponent_Conditional_11_Conditional_9_Conditional_3_Template, 3, 0, "span", 35);
|
|
157
151
|
i0.ɵɵelementEnd();
|
|
158
152
|
} if (rf & 2) {
|
|
159
153
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -164,16 +158,16 @@ function SearchFilterComponent_Conditional_11_Conditional_9_Template(rf, ctx) {
|
|
|
164
158
|
} }
|
|
165
159
|
function SearchFilterComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
166
160
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
167
|
-
i0.ɵɵelementStart(0, "div",
|
|
161
|
+
i0.ɵɵelementStart(0, "div", 9)(1, "div", 28)(2, "div", 29)(3, "span", 16);
|
|
168
162
|
i0.ɵɵtext(4, "Min Relevance");
|
|
169
163
|
i0.ɵɵelementEnd()()();
|
|
170
|
-
i0.ɵɵelementStart(5, "div",
|
|
164
|
+
i0.ɵɵelementStart(5, "div", 30)(6, "input", 31);
|
|
171
165
|
i0.ɵɵlistener("input", function SearchFilterComponent_Conditional_11_Template_input_input_6_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnMinScorePreview($event.target.value)); })("mouseup", function SearchFilterComponent_Conditional_11_Template_input_mouseup_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnMinScoreCommit()); })("touchend", function SearchFilterComponent_Conditional_11_Template_input_touchend_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnMinScoreCommit()); });
|
|
172
166
|
i0.ɵɵelementEnd();
|
|
173
|
-
i0.ɵɵelementStart(7, "span",
|
|
167
|
+
i0.ɵɵelementStart(7, "span", 32);
|
|
174
168
|
i0.ɵɵtext(8);
|
|
175
169
|
i0.ɵɵelementEnd()();
|
|
176
|
-
i0.ɵɵconditionalCreate(9, SearchFilterComponent_Conditional_11_Conditional_9_Template, 4, 2, "div",
|
|
170
|
+
i0.ɵɵconditionalCreate(9, SearchFilterComponent_Conditional_11_Conditional_9_Template, 4, 2, "div", 33);
|
|
177
171
|
i0.ɵɵelementEnd();
|
|
178
172
|
} if (rf & 2) {
|
|
179
173
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -185,9 +179,7 @@ function SearchFilterComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
185
179
|
i0.ɵɵconditional(ctx_r1.ServerMinScorePercent > 0 ? 9 : -1);
|
|
186
180
|
} }
|
|
187
181
|
function SearchFilterComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
188
|
-
i0.ɵɵ
|
|
189
|
-
i0.ɵɵtext(2, "No filters available");
|
|
190
|
-
i0.ɵɵelementEnd()();
|
|
182
|
+
i0.ɵɵelement(0, "mj-empty-state", 10);
|
|
191
183
|
} }
|
|
192
184
|
export class SearchFilterComponent {
|
|
193
185
|
cdr = inject(ChangeDetectorRef);
|
|
@@ -224,11 +216,15 @@ export class SearchFilterComponent {
|
|
|
224
216
|
this.FilterChanged.emit({ Category: category, SelectedValues: current });
|
|
225
217
|
this.cdr.detectChanges();
|
|
226
218
|
}
|
|
227
|
-
/**
|
|
228
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Apply the expand/collapse state emitted by a category's accordion panel.
|
|
221
|
+
* Inverse mapping: an expanded panel means the category is NOT collapsed.
|
|
222
|
+
* No-op when filtering is not collapsible.
|
|
223
|
+
*/
|
|
224
|
+
OnCategoryExpandedChange(category, expanded) {
|
|
229
225
|
if (!this.Collapsible)
|
|
230
226
|
return;
|
|
231
|
-
if (
|
|
227
|
+
if (expanded) {
|
|
232
228
|
this.CollapsedCategories.delete(category);
|
|
233
229
|
}
|
|
234
230
|
else {
|
|
@@ -297,7 +293,7 @@ export class SearchFilterComponent {
|
|
|
297
293
|
this.MinScoreChanged.emit(this.MinScorePercent);
|
|
298
294
|
}
|
|
299
295
|
static ɵfac = function SearchFilterComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchFilterComponent)(); };
|
|
300
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchFilterComponent, selectors: [["mj-search-filter"]], inputs: { Filters: "Filters", ActiveFilters: "ActiveFilters", Collapsible: "Collapsible", ShowRelevanceSlider: "ShowRelevanceSlider", MinScorePercent: "MinScorePercent", ServerMinScorePercent: "ServerMinScorePercent" }, outputs: { FilterChanged: "FilterChanged", FiltersCleared: "FiltersCleared", CloseRequested: "CloseRequested", MinScoreChanged: "MinScoreChanged" }, standalone: false, decls: 13, vars: 3, consts: [[1, "filter-panel"], [1, "filter-panel-header"], [1, "filter-panel-title"], [1, "fa-solid", "fa-filter"], [1, "filter-header-actions"], [1, "filter-clear-all"], ["title", "Hide filters", "aria-label", "Hide filters", 1, "filter-close-btn", 3, "click"], [1, "fa-solid", "fa-times"], [
|
|
296
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchFilterComponent, selectors: [["mj-search-filter"]], inputs: { Filters: "Filters", ActiveFilters: "ActiveFilters", Collapsible: "Collapsible", ShowRelevanceSlider: "ShowRelevanceSlider", MinScorePercent: "MinScorePercent", ServerMinScorePercent: "ServerMinScorePercent" }, outputs: { FilterChanged: "FilterChanged", FiltersCleared: "FiltersCleared", CloseRequested: "CloseRequested", MinScoreChanged: "MinScoreChanged" }, standalone: false, decls: 13, vars: 3, consts: [[1, "filter-panel"], [1, "filter-panel-header"], [1, "filter-panel-title"], [1, "fa-solid", "fa-filter"], [1, "filter-header-actions"], [1, "filter-clear-all"], ["title", "Hide filters", "aria-label", "Hide filters", 1, "filter-close-btn", 3, "click"], [1, "fa-solid", "fa-times"], ["Size", "sm", 3, "FlushBody", "Expanded"], [1, "filter-category"], ["Size", "compact", "Icon", "", "Title", "No filters available", 1, "filter-empty"], [1, "filter-clear-all", 3, "click"], ["Size", "sm", 3, "ExpandedChange", "FlushBody", "Expanded"], ["mjAccordionTitle", ""], ["mjAccordionActions", ""], ["mjAccordionBody", ""], [1, "filter-category-name"], [1, "filter-select-all", 3, "title"], [1, "filter-select-all", 3, "click", "title"], [1, "filter-options"], [1, "filter-option", "filter-option-readonly"], [1, "filter-option"], [3, "class"], [1, "filter-option-label"], [1, "filter-option-count"], [1, "filter-option", 3, "click"], [1, "filter-checkbox"], [1, "fa-solid", "fa-check"], [1, "filter-category-header-row"], [1, "filter-category-header"], [1, "filter-relevance-slider"], ["type", "range", "min", "0", "max", "100", "step", "5", 1, "relevance-range", 3, "input", "mouseup", "touchend", "value"], [1, "relevance-value"], [1, "filter-server-threshold"], [1, "server-threshold-label"], [1, "server-threshold-warning"], [1, "fa-solid", "fa-arrow-rotate-right"]], template: function SearchFilterComponent_Template(rf, ctx) { if (rf & 1) {
|
|
301
297
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "span", 2);
|
|
302
298
|
i0.ɵɵelement(3, "i", 3);
|
|
303
299
|
i0.ɵɵtext(4, " Filters ");
|
|
@@ -308,9 +304,9 @@ export class SearchFilterComponent {
|
|
|
308
304
|
i0.ɵɵlistener("click", function SearchFilterComponent_Template_button_click_7_listener() { return ctx.CloseRequested.emit(); });
|
|
309
305
|
i0.ɵɵelement(8, "i", 7);
|
|
310
306
|
i0.ɵɵelementEnd()()();
|
|
311
|
-
i0.ɵɵrepeaterCreate(9, SearchFilterComponent_For_10_Template,
|
|
312
|
-
i0.ɵɵconditionalCreate(11, SearchFilterComponent_Conditional_11_Template, 10, 3, "div",
|
|
313
|
-
i0.ɵɵconditionalCreate(12, SearchFilterComponent_Conditional_12_Template,
|
|
307
|
+
i0.ɵɵrepeaterCreate(9, SearchFilterComponent_For_10_Template, 4, 2, "mj-accordion-panel", 8, _forTrack0);
|
|
308
|
+
i0.ɵɵconditionalCreate(11, SearchFilterComponent_Conditional_11_Template, 10, 3, "div", 9);
|
|
309
|
+
i0.ɵɵconditionalCreate(12, SearchFilterComponent_Conditional_12_Template, 1, 0, "mj-empty-state", 10);
|
|
314
310
|
i0.ɵɵelementEnd();
|
|
315
311
|
} if (rf & 2) {
|
|
316
312
|
i0.ɵɵadvance(6);
|
|
@@ -321,11 +317,11 @@ export class SearchFilterComponent {
|
|
|
321
317
|
i0.ɵɵconditional(ctx.ShowRelevanceSlider ? 11 : -1);
|
|
322
318
|
i0.ɵɵadvance();
|
|
323
319
|
i0.ɵɵconditional(ctx.Filters.length === 0 && !ctx.ShowRelevanceSlider ? 12 : -1);
|
|
324
|
-
} }, styles: ["\n\n\n.filter-panel[_ngcontent-%COMP%] {\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n background: var(--mj-bg-surface);\n overflow: hidden;\n}\n\n.filter-panel-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.75rem 1rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-panel-title[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 0.85rem;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.filter-clear-all[_ngcontent-%COMP%] {\n border: none;\n background: none;\n color: var(--mj-brand-primary);\n font-size: 0.78rem;\n cursor: pointer;\n padding: 0.15rem 0.4rem;\n border-radius: 4px;\n}\n\n.filter-clear-all[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.filter-header-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.filter-close-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n border-radius: 4px;\n background: none;\n color: var(--mj-text-muted);\n font-size: 0.75rem;\n cursor: pointer;\n transition: all 0.15s;\n}\n\n.filter-close-btn[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n\n\n.filter-category[_ngcontent-%COMP%] {\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-category[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.filter-category-header-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n}\n\n.filter-category-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.6rem 1rem;\n cursor: pointer;\n transition: background 0.1s ease;\n flex: 1;\n}\n\n.filter-category-header[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.filter-select-all[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border: 1px solid var(--mj-border-default);\n border-radius: 4px;\n background: none;\n color: var(--mj-text-muted);\n font-size: 0.65rem;\n font-weight: 500;\n cursor: pointer;\n margin-right: 8px;\n transition: color 0.15s ease, border-color 0.15s ease;\n}\n\n.filter-select-all[_ngcontent-%COMP%]:hover {\n color: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n}\n\n.filter-category-name[_ngcontent-%COMP%] {\n font-weight: 500;\n font-size: 0.82rem;\n color: var(--mj-text-primary);\n}\n\n
|
|
320
|
+
} }, dependencies: [i1.MJEmptyStateComponent, i1.MJAccordionPanelComponent, i1.MJAccordionTitleDirective, i1.MJAccordionActionsDirective, i1.MJAccordionBodyDirective], styles: ["\n\n\n.filter-panel[_ngcontent-%COMP%] {\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n background: var(--mj-bg-surface);\n overflow: hidden;\n}\n\n.filter-panel-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.75rem 1rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-panel-title[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 0.85rem;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.filter-clear-all[_ngcontent-%COMP%] {\n border: none;\n background: none;\n color: var(--mj-brand-primary);\n font-size: 0.78rem;\n cursor: pointer;\n padding: 0.15rem 0.4rem;\n border-radius: 4px;\n}\n\n.filter-clear-all[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.filter-header-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.filter-close-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n border-radius: 4px;\n background: none;\n color: var(--mj-text-muted);\n font-size: 0.75rem;\n cursor: pointer;\n transition: all 0.15s;\n}\n\n.filter-close-btn[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n\n\n.filter-category[_ngcontent-%COMP%] {\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-category[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.filter-category-header-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n}\n\n.filter-category-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.6rem 1rem;\n cursor: pointer;\n transition: background 0.1s ease;\n flex: 1;\n}\n\n.filter-category-header[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.filter-select-all[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border: 1px solid var(--mj-border-default);\n border-radius: 4px;\n background: none;\n color: var(--mj-text-muted);\n font-size: 0.65rem;\n font-weight: 500;\n cursor: pointer;\n margin-right: 8px;\n transition: color 0.15s ease, border-color 0.15s ease;\n}\n\n.filter-select-all[_ngcontent-%COMP%]:hover {\n color: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n}\n\n.filter-category-name[_ngcontent-%COMP%] {\n font-weight: 500;\n font-size: 0.82rem;\n color: var(--mj-text-primary);\n}\n\n\n\n\n\n\n\n\n\n.filter-options[_ngcontent-%COMP%] {\n padding: 0.25rem 0;\n}\n\n.filter-option[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.4rem 1rem;\n cursor: pointer;\n transition: background 0.1s ease;\n font-size: 0.82rem;\n}\n\n.filter-option[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.filter-option-readonly[_ngcontent-%COMP%] {\n cursor: default;\n opacity: 0.85;\n}\n.filter-option-readonly[_ngcontent-%COMP%]:hover {\n background: transparent;\n}\n\n.filter-checkbox[_ngcontent-%COMP%] {\n width: 1rem;\n height: 1rem;\n border: 1.5px solid var(--mj-border-strong);\n border-radius: 3px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n font-size: 0.6rem;\n transition: all 0.15s ease;\n}\n\n.filter-checkbox-checked[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.filter-option-icon[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 0.78rem;\n width: 1rem;\n text-align: center;\n}\n\n.filter-option-label[_ngcontent-%COMP%] {\n flex: 1;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.filter-option-count[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 0.72rem;\n flex-shrink: 0;\n}\n\n\n\n.filter-empty[_ngcontent-%COMP%] {\n padding: 1.5rem 1rem;\n text-align: center;\n color: var(--mj-text-muted);\n font-size: 0.82rem;\n}\n\n\n\n.filter-relevance-slider[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 12px;\n}\n.relevance-range[_ngcontent-%COMP%] {\n flex: 1;\n height: 4px;\n -webkit-appearance: none;\n appearance: none;\n background: var(--mj-border-default);\n border-radius: 2px;\n outline: none;\n cursor: pointer;\n}\n.relevance-range[_ngcontent-%COMP%]::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: var(--mj-brand-primary);\n cursor: pointer;\n border: 2px solid var(--mj-bg-surface);\n box-shadow: 0 1px 3px rgba(0,0,0,0.2);\n}\n.relevance-range[_ngcontent-%COMP%]::-moz-range-thumb {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: var(--mj-brand-primary);\n cursor: pointer;\n border: 2px solid var(--mj-bg-surface);\n box-shadow: 0 1px 3px rgba(0,0,0,0.2);\n}\n.relevance-value[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n min-width: 36px;\n text-align: right;\n}\n\n\n\n.filter-server-threshold[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 2px 12px 6px;\n font-size: 10px;\n color: var(--mj-text-muted);\n}\n.server-threshold-warning[_ngcontent-%COMP%] {\n color: var(--mj-status-warning-text, var(--mj-status-warning));\n font-weight: 600;\n}"] });
|
|
325
321
|
}
|
|
326
322
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchFilterComponent, [{
|
|
327
323
|
type: Component,
|
|
328
|
-
args: [{ standalone: false, selector: 'mj-search-filter', template: "<div class=\"filter-panel\">\n <div class=\"filter-panel-header\">\n <span class=\"filter-panel-title\">\n <i class=\"fa-solid fa-filter\"></i> Filters\n </span>\n <div class=\"filter-header-actions\">\n @if (HasActiveFilters()) {\n <button class=\"filter-clear-all\" (click)=\"ClearAll()\">\n Clear ({{ GetActiveFilterCount() }})\n </button>\n }\n <button class=\"filter-close-btn\" (click)=\"CloseRequested.emit()\" title=\"Hide filters\" aria-label=\"Hide filters\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n </div>\n\n @for (filter of Filters; track filter.Category) {\n <div class=\"filter-category\">\n <div class=\"filter-category-header-row\">\n <div\n class=\"filter-category-header\"\n (click)=\"ToggleCategory(filter.Category)\"\n [class.filter-category-collapsed]=\"IsCategoryCollapsed(filter.Category)\"\n >\n <span class=\"filter-category-name\">{{ filter.Category }}</span>\n @if (Collapsible) {\n <i class=\"fa-solid filter-category-chevron\"\n [class.fa-chevron-down]=\"IsCategoryCollapsed(filter.Category)\"\n [class.fa-chevron-up]=\"!IsCategoryCollapsed(filter.Category)\"></i>\n }\n </div>\n @if (!IsCategoryCollapsed(filter.Category) && filter.Options.length > 1) {\n <button class=\"filter-select-all\"\n (click)=\"SelectAll(filter.Category); $event.stopPropagation()\"\n [title]=\"IsAllSelected(filter.Category) ? 'Clear all' : 'Select all'\">\n {{ IsAllSelected(filter.Category) ? 'Clear' : 'All' }}\n </button>\n }\n </div>\n\n @if (!IsCategoryCollapsed(filter.Category)) {\n <div class=\"filter-options\">\n @for (option of filter.Options; track option.Value) {\n @if (filter.Options.length === 1) {\n <!-- Single option: read-only label (no checkbox, not interactive) -->\n <div class=\"filter-option filter-option-readonly\">\n @if (option.Icon) {\n <i [class]=\"option.Icon + ' filter-option-icon'\"></i>\n }\n <span class=\"filter-option-label\">{{ option.Label }}</span>\n <span class=\"filter-option-count\">{{ option.Count }}</span>\n </div>\n } @else {\n <label class=\"filter-option\" (click)=\"ToggleOption(filter.Category, option.Value); $event.preventDefault()\">\n <span class=\"filter-checkbox\" [class.filter-checkbox-checked]=\"IsOptionSelected(filter.Category, option.Value)\">\n @if (IsOptionSelected(filter.Category, option.Value)) {\n <i class=\"fa-solid fa-check\"></i>\n }\n </span>\n @if (option.Icon) {\n <i [class]=\"option.Icon + ' filter-option-icon'\"></i>\n }\n <span class=\"filter-option-label\">{{ option.Label }}</span>\n <span class=\"filter-option-count\">{{ option.Count }}</span>\n </label>\n }\n }\n </div>\n }\n </div>\n }\n\n <!-- Relevance Threshold Slider -->\n @if (ShowRelevanceSlider) {\n <div class=\"filter-category\">\n <div class=\"filter-category-header-row\">\n <div class=\"filter-category-header\">\n <span class=\"filter-category-name\">Min Relevance</span>\n </div>\n </div>\n <div class=\"filter-relevance-slider\">\n <input\n type=\"range\"\n min=\"0\" max=\"100\" step=\"5\"\n [value]=\"MinScorePercent\"\n (input)=\"OnMinScorePreview($any($event.target).value)\"\n (mouseup)=\"OnMinScoreCommit()\"\n (touchend)=\"OnMinScoreCommit()\"\n class=\"relevance-range\" />\n <span class=\"relevance-value\">{{ MinScorePercent }}%</span>\n </div>\n @if (ServerMinScorePercent > 0) {\n <div class=\"filter-server-threshold\">\n <span class=\"server-threshold-label\">Server threshold: {{ ServerMinScorePercent }}%</span>\n @if (MinScorePercent < ServerMinScorePercent) {\n <span class=\"server-threshold-warning\">\n <i class=\"fa-solid fa-arrow-rotate-right\"></i> Will re-query\n </span>\n }\n </div>\n }\n </div>\n }\n\n @if (Filters.length === 0 && !ShowRelevanceSlider) {\n <div class=\"filter-empty\">\n <p>No filters available</p>\n </div>\n }\n</div>\n", styles: ["/* Search Filter Panel */\n\n.filter-panel {\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n background: var(--mj-bg-surface);\n overflow: hidden;\n}\n\n.filter-panel-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.75rem 1rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-panel-title {\n font-weight: 600;\n font-size: 0.85rem;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.filter-clear-all {\n border: none;\n background: none;\n color: var(--mj-brand-primary);\n font-size: 0.78rem;\n cursor: pointer;\n padding: 0.15rem 0.4rem;\n border-radius: 4px;\n}\n\n.filter-clear-all:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.filter-header-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.filter-close-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n border-radius: 4px;\n background: none;\n color: var(--mj-text-muted);\n font-size: 0.75rem;\n cursor: pointer;\n transition: all 0.15s;\n}\n\n.filter-close-btn:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n/* Category */\n.filter-category {\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-category:last-child {\n border-bottom: none;\n}\n\n.filter-category-header-row {\n display: flex;\n align-items: center;\n}\n\n.filter-category-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.6rem 1rem;\n cursor: pointer;\n transition: background 0.1s ease;\n flex: 1;\n}\n\n.filter-category-header:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.filter-select-all {\n padding: 2px 8px;\n border: 1px solid var(--mj-border-default);\n border-radius: 4px;\n background: none;\n color: var(--mj-text-muted);\n font-size: 0.65rem;\n font-weight: 500;\n cursor: pointer;\n margin-right: 8px;\n transition: color 0.15s ease, border-color 0.15s ease;\n}\n\n.filter-select-all:hover {\n color: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n}\n\n.filter-category-name {\n font-weight: 500;\n font-size: 0.82rem;\n color: var(--mj-text-primary);\n}\n\n.filter-category-chevron {\n font-size: 0.65rem;\n color: var(--mj-text-muted);\n}\n\n/* Options */\n.filter-options {\n padding: 0.25rem 0;\n}\n\n.filter-option {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.4rem 1rem;\n cursor: pointer;\n transition: background 0.1s ease;\n font-size: 0.82rem;\n}\n\n.filter-option:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.filter-option-readonly {\n cursor: default;\n opacity: 0.85;\n}\n.filter-option-readonly:hover {\n background: transparent;\n}\n\n.filter-checkbox {\n width: 1rem;\n height: 1rem;\n border: 1.5px solid var(--mj-border-strong);\n border-radius: 3px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n font-size: 0.6rem;\n transition: all 0.15s ease;\n}\n\n.filter-checkbox-checked {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.filter-option-icon {\n color: var(--mj-text-muted);\n font-size: 0.78rem;\n width: 1rem;\n text-align: center;\n}\n\n.filter-option-label {\n flex: 1;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.filter-option-count {\n color: var(--mj-text-muted);\n font-size: 0.72rem;\n flex-shrink: 0;\n}\n\n/* Empty state */\n.filter-empty {\n padding: 1.5rem 1rem;\n text-align: center;\n color: var(--mj-text-muted);\n font-size: 0.82rem;\n}\n\n/* Relevance Slider */\n.filter-relevance-slider {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 12px;\n}\n.relevance-range {\n flex: 1;\n height: 4px;\n -webkit-appearance: none;\n appearance: none;\n background: var(--mj-border-default);\n border-radius: 2px;\n outline: none;\n cursor: pointer;\n}\n.relevance-range::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: var(--mj-brand-primary);\n cursor: pointer;\n border: 2px solid var(--mj-bg-surface);\n box-shadow: 0 1px 3px rgba(0,0,0,0.2);\n}\n.relevance-range::-moz-range-thumb {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: var(--mj-brand-primary);\n cursor: pointer;\n border: 2px solid var(--mj-bg-surface);\n box-shadow: 0 1px 3px rgba(0,0,0,0.2);\n}\n.relevance-value {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n min-width: 36px;\n text-align: right;\n}\n\n/* Server threshold indicator */\n.filter-server-threshold {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 2px 12px 6px;\n font-size: 10px;\n color: var(--mj-text-muted);\n}\n.server-threshold-warning {\n color: var(--mj-status-warning-text, var(--mj-status-warning));\n font-weight: 600;\n}\n"] }]
|
|
324
|
+
args: [{ standalone: false, selector: 'mj-search-filter', template: "<div class=\"filter-panel\">\n <div class=\"filter-panel-header\">\n <span class=\"filter-panel-title\">\n <i class=\"fa-solid fa-filter\"></i> Filters\n </span>\n <div class=\"filter-header-actions\">\n @if (HasActiveFilters()) {\n <button class=\"filter-clear-all\" (click)=\"ClearAll()\">\n Clear ({{ GetActiveFilterCount() }})\n </button>\n }\n <button class=\"filter-close-btn\" (click)=\"CloseRequested.emit()\" title=\"Hide filters\" aria-label=\"Hide filters\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n </div>\n\n @for (filter of Filters; track filter.Category) {\n <mj-accordion-panel Size=\"sm\" [FlushBody]=\"true\"\n [Expanded]=\"Collapsible ? !IsCategoryCollapsed(filter.Category) : true\"\n (ExpandedChange)=\"OnCategoryExpandedChange(filter.Category, $event)\">\n <ng-template mjAccordionTitle>\n <span class=\"filter-category-name\">{{ filter.Category }}</span>\n </ng-template>\n <ng-template mjAccordionActions>\n @if ((!Collapsible || !IsCategoryCollapsed(filter.Category)) && filter.Options.length > 1) {\n <button class=\"filter-select-all\"\n (click)=\"SelectAll(filter.Category); $event.stopPropagation()\"\n [title]=\"IsAllSelected(filter.Category) ? 'Clear all' : 'Select all'\">\n {{ IsAllSelected(filter.Category) ? 'Clear' : 'All' }}\n </button>\n }\n </ng-template>\n <ng-template mjAccordionBody>\n <div class=\"filter-options\">\n @for (option of filter.Options; track option.Value) {\n @if (filter.Options.length === 1) {\n <!-- Single option: read-only label (no checkbox, not interactive) -->\n <div class=\"filter-option filter-option-readonly\">\n @if (option.Icon) {\n <i [class]=\"option.Icon + ' filter-option-icon'\"></i>\n }\n <span class=\"filter-option-label\">{{ option.Label }}</span>\n <span class=\"filter-option-count\">{{ option.Count }}</span>\n </div>\n } @else {\n <label class=\"filter-option\" (click)=\"ToggleOption(filter.Category, option.Value); $event.preventDefault()\">\n <span class=\"filter-checkbox\" [class.filter-checkbox-checked]=\"IsOptionSelected(filter.Category, option.Value)\">\n @if (IsOptionSelected(filter.Category, option.Value)) {\n <i class=\"fa-solid fa-check\"></i>\n }\n </span>\n @if (option.Icon) {\n <i [class]=\"option.Icon + ' filter-option-icon'\"></i>\n }\n <span class=\"filter-option-label\">{{ option.Label }}</span>\n <span class=\"filter-option-count\">{{ option.Count }}</span>\n </label>\n }\n }\n </div>\n </ng-template>\n </mj-accordion-panel>\n }\n\n <!-- Relevance Threshold Slider -->\n @if (ShowRelevanceSlider) {\n <div class=\"filter-category\">\n <div class=\"filter-category-header-row\">\n <div class=\"filter-category-header\">\n <span class=\"filter-category-name\">Min Relevance</span>\n </div>\n </div>\n <div class=\"filter-relevance-slider\">\n <input\n type=\"range\"\n min=\"0\" max=\"100\" step=\"5\"\n [value]=\"MinScorePercent\"\n (input)=\"OnMinScorePreview($any($event.target).value)\"\n (mouseup)=\"OnMinScoreCommit()\"\n (touchend)=\"OnMinScoreCommit()\"\n class=\"relevance-range\" />\n <span class=\"relevance-value\">{{ MinScorePercent }}%</span>\n </div>\n @if (ServerMinScorePercent > 0) {\n <div class=\"filter-server-threshold\">\n <span class=\"server-threshold-label\">Server threshold: {{ ServerMinScorePercent }}%</span>\n @if (MinScorePercent < ServerMinScorePercent) {\n <span class=\"server-threshold-warning\">\n <i class=\"fa-solid fa-arrow-rotate-right\"></i> Will re-query\n </span>\n }\n </div>\n }\n </div>\n }\n\n @if (Filters.length === 0 && !ShowRelevanceSlider) {\n <mj-empty-state class=\"filter-empty\" Size=\"compact\"\n Icon=\"\" Title=\"No filters available\" />\n }\n</div>\n", styles: ["/* Search Filter Panel */\n\n.filter-panel {\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n background: var(--mj-bg-surface);\n overflow: hidden;\n}\n\n.filter-panel-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.75rem 1rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-panel-title {\n font-weight: 600;\n font-size: 0.85rem;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.filter-clear-all {\n border: none;\n background: none;\n color: var(--mj-brand-primary);\n font-size: 0.78rem;\n cursor: pointer;\n padding: 0.15rem 0.4rem;\n border-radius: 4px;\n}\n\n.filter-clear-all:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.filter-header-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.filter-close-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n border-radius: 4px;\n background: none;\n color: var(--mj-text-muted);\n font-size: 0.75rem;\n cursor: pointer;\n transition: all 0.15s;\n}\n\n.filter-close-btn:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n/* Category */\n.filter-category {\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.filter-category:last-child {\n border-bottom: none;\n}\n\n.filter-category-header-row {\n display: flex;\n align-items: center;\n}\n\n.filter-category-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.6rem 1rem;\n cursor: pointer;\n transition: background 0.1s ease;\n flex: 1;\n}\n\n.filter-category-header:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.filter-select-all {\n padding: 2px 8px;\n border: 1px solid var(--mj-border-default);\n border-radius: 4px;\n background: none;\n color: var(--mj-text-muted);\n font-size: 0.65rem;\n font-weight: 500;\n cursor: pointer;\n margin-right: 8px;\n transition: color 0.15s ease, border-color 0.15s ease;\n}\n\n.filter-select-all:hover {\n color: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n}\n\n.filter-category-name {\n font-weight: 500;\n font-size: 0.82rem;\n color: var(--mj-text-primary);\n}\n\n/* .filter-category-chevron removed \u2014 the bespoke disclosure chevron is gone;\n <mj-accordion-panel> now provides the expand/collapse chevron for filter\n categories. (The .filter-category* layout rules above are retained: they're\n still used by the static \"Min Relevance\" section below.) */\n\n/* Options */\n.filter-options {\n padding: 0.25rem 0;\n}\n\n.filter-option {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.4rem 1rem;\n cursor: pointer;\n transition: background 0.1s ease;\n font-size: 0.82rem;\n}\n\n.filter-option:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.filter-option-readonly {\n cursor: default;\n opacity: 0.85;\n}\n.filter-option-readonly:hover {\n background: transparent;\n}\n\n.filter-checkbox {\n width: 1rem;\n height: 1rem;\n border: 1.5px solid var(--mj-border-strong);\n border-radius: 3px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n font-size: 0.6rem;\n transition: all 0.15s ease;\n}\n\n.filter-checkbox-checked {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.filter-option-icon {\n color: var(--mj-text-muted);\n font-size: 0.78rem;\n width: 1rem;\n text-align: center;\n}\n\n.filter-option-label {\n flex: 1;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.filter-option-count {\n color: var(--mj-text-muted);\n font-size: 0.72rem;\n flex-shrink: 0;\n}\n\n/* Empty state */\n.filter-empty {\n padding: 1.5rem 1rem;\n text-align: center;\n color: var(--mj-text-muted);\n font-size: 0.82rem;\n}\n\n/* Relevance Slider */\n.filter-relevance-slider {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 12px;\n}\n.relevance-range {\n flex: 1;\n height: 4px;\n -webkit-appearance: none;\n appearance: none;\n background: var(--mj-border-default);\n border-radius: 2px;\n outline: none;\n cursor: pointer;\n}\n.relevance-range::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: var(--mj-brand-primary);\n cursor: pointer;\n border: 2px solid var(--mj-bg-surface);\n box-shadow: 0 1px 3px rgba(0,0,0,0.2);\n}\n.relevance-range::-moz-range-thumb {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: var(--mj-brand-primary);\n cursor: pointer;\n border: 2px solid var(--mj-bg-surface);\n box-shadow: 0 1px 3px rgba(0,0,0,0.2);\n}\n.relevance-value {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n min-width: 36px;\n text-align: right;\n}\n\n/* Server threshold indicator */\n.filter-server-threshold {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 2px 12px 6px;\n font-size: 10px;\n color: var(--mj-text-muted);\n}\n.server-threshold-warning {\n color: var(--mj-status-warning-text, var(--mj-status-warning));\n font-weight: 600;\n}\n"] }]
|
|
329
325
|
}], null, { Filters: [{
|
|
330
326
|
type: Input
|
|
331
327
|
}], ActiveFilters: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-filter.component.js","sourceRoot":"","sources":["../../src/lib/search-filter.component.ts","../../src/lib/search-filter.component.html"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACH,SAAS,EACT,YAAY,EACZ,KAAK,EACL,MAAM,EACN,iBAAiB,EACjB,MAAM,EACT,MAAM,eAAe,CAAC;;;;;;ICPP,kCAAsD;IAArB,yLAAS,iBAAU,KAAC;IACjD,YACJ;IAAA,iBAAS;;;IADL,cACJ;IADI,sEACJ;;;IAkBQ,wBAEqE;;;;IAAlE,AADA,iFAA8D,kEACD;;;;IAIpE,kCAE8E;IADtE,gOAAS,oCAA0B,wBAAE,wBAAwB,KAAC;IAElE,YACJ;IAAA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;YCrB1B,AADJ,AADJ,8BAA0B,aACW,cACI;YAC7B,uBAAkC;YAAC,yBACvC;YAAA,iBAAO;YACP,8BAAmC;YAC/B,0FAA0B;YAK1B,iCAAgH;YAA/E,kGAAS,yBAAqB,IAAC;YAC5D,uBAAiC;YAG7C,AADI,AADI,iBAAS,EACP,EACJ;YAEN,yFAsDC;YAGD,0FAA2B;YA+B3B,yFAAoD;YAKxD,iBAAM;;YAxGM,eAIC;YAJD,iDAIC;YAOT,eAsDC;YAtDD,0BAsDC;YAGD,eA6BC;YA7BD,mDA6BC;YAED,cAIC;YAJD,gFAIC;;;iFDtFQ,qBAAqB;cANjC,SAAS;6BACM,KAAK,YACP,kBAAkB;;kBAQ3B,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFAxBE,qBAAqB","sourcesContent":["/**\n * @fileoverview Search Filter Component\n *\n * Faceted filter sidebar for narrowing search results.\n * Displays filter categories with checkable options and counts.\n */\n\nimport {\n Component,\n EventEmitter,\n Input,\n Output,\n ChangeDetectorRef,\n inject\n} from '@angular/core';\nimport { SearchFilter, SearchFilterChangeEvent } from './search-types';\n\n@Component({\n standalone: false,\n selector: 'mj-search-filter',\n templateUrl: './search-filter.component.html',\n styleUrls: ['./search-filter.component.css']\n})\nexport class SearchFilterComponent {\n private cdr = inject(ChangeDetectorRef);\n\n /** Available filters to display */\n @Input() Filters: SearchFilter[] = [];\n\n /** Currently active filter selections */\n @Input() ActiveFilters: Record<string, string[]> = {};\n\n /** Whether the filter panel is collapsible */\n @Input() Collapsible = true;\n\n /** Whether to show the min relevance slider */\n @Input() ShowRelevanceSlider = true;\n\n /** Current minimum score as a percentage (0-100) */\n @Input() MinScorePercent = 0;\n\n /** The MinScore that was last sent to the server (for visual indicator) */\n @Input() ServerMinScorePercent = 0;\n\n @Output() FilterChanged = new EventEmitter<SearchFilterChangeEvent>();\n @Output() FiltersCleared = new EventEmitter<void>();\n @Output() CloseRequested = new EventEmitter<void>();\n @Output() MinScoreChanged = new EventEmitter<number>();\n\n /** Collapsed state per category */\n public CollapsedCategories = new Set<string>();\n\n /** Toggle a filter option */\n public ToggleOption(category: string, value: string): void {\n const current = this.ActiveFilters[category] ? [...this.ActiveFilters[category]] : [];\n const index = current.indexOf(value);\n if (index >= 0) {\n current.splice(index, 1);\n } else {\n current.push(value);\n }\n // Update local state to reflect change\n this.ActiveFilters = { ...this.ActiveFilters, [category]: current };\n this.FilterChanged.emit({ Category: category, SelectedValues: current });\n this.cdr.detectChanges();\n }\n\n /** Toggle category collapse */\n public ToggleCategory(category: string): void {\n if (!this.Collapsible) return;\n if (this.CollapsedCategories.has(category)) {\n this.CollapsedCategories.delete(category);\n } else {\n this.CollapsedCategories.add(category);\n }\n this.cdr.detectChanges();\n }\n\n /** Check if a category is collapsed */\n public IsCategoryCollapsed(category: string): boolean {\n return this.CollapsedCategories.has(category);\n }\n\n /** Check if an option is selected */\n public IsOptionSelected(category: string, value: string): boolean {\n return (this.ActiveFilters[category] ?? []).includes(value);\n }\n\n /** Check if any filters are active */\n public HasActiveFilters(): boolean {\n return Object.values(this.ActiveFilters).some(v => v.length > 0);\n }\n\n /** Get total active filter count */\n public GetActiveFilterCount(): number {\n return Object.values(this.ActiveFilters).reduce((sum, v) => sum + v.length, 0);\n }\n\n /** Clear all filters */\n public ClearAll(): void {\n this.ActiveFilters = {};\n this.FiltersCleared.emit();\n this.cdr.detectChanges();\n }\n\n /** Select all options in a category, or clear all if already all selected */\n public SelectAll(category: string): void {\n const filter = this.Filters.find(f => f.Category === category);\n if (!filter) return;\n\n const current = this.ActiveFilters[category] ?? [];\n if (current.length === filter.Options.length) {\n // All selected → clear\n this.ActiveFilters[category] = [];\n } else {\n // Select all\n this.ActiveFilters[category] = filter.Options.map(o => o.Value);\n }\n this.FilterChanged.emit({ Category: category, SelectedValues: this.ActiveFilters[category] });\n this.cdr.detectChanges();\n }\n\n /** Check if all options in a category are selected */\n public IsAllSelected(category: string): boolean {\n const filter = this.Filters.find(f => f.Category === category);\n if (!filter) return false;\n const selection = this.ActiveFilters[category] ?? [];\n return selection.length === filter.Options.length;\n }\n\n /** Handle relevance slider drag (preview only — updates display without triggering search) */\n public OnMinScorePreview(value: string): void {\n this.MinScorePercent = parseInt(value, 10);\n }\n\n /** Handle relevance slider release — commits the value and triggers re-query if needed */\n public OnMinScoreCommit(): void {\n this.MinScoreChanged.emit(this.MinScorePercent);\n }\n\n /** Handle relevance slider change (legacy — used when input event fires) */\n public OnMinScoreChange(value: string): void {\n this.MinScorePercent = parseInt(value, 10);\n this.MinScoreChanged.emit(this.MinScorePercent);\n }\n}\n","<div class=\"filter-panel\">\n <div class=\"filter-panel-header\">\n <span class=\"filter-panel-title\">\n <i class=\"fa-solid fa-filter\"></i> Filters\n </span>\n <div class=\"filter-header-actions\">\n @if (HasActiveFilters()) {\n <button class=\"filter-clear-all\" (click)=\"ClearAll()\">\n Clear ({{ GetActiveFilterCount() }})\n </button>\n }\n <button class=\"filter-close-btn\" (click)=\"CloseRequested.emit()\" title=\"Hide filters\" aria-label=\"Hide filters\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n </div>\n\n @for (filter of Filters; track filter.Category) {\n <div class=\"filter-category\">\n <div class=\"filter-category-header-row\">\n <div\n class=\"filter-category-header\"\n (click)=\"ToggleCategory(filter.Category)\"\n [class.filter-category-collapsed]=\"IsCategoryCollapsed(filter.Category)\"\n >\n <span class=\"filter-category-name\">{{ filter.Category }}</span>\n @if (Collapsible) {\n <i class=\"fa-solid filter-category-chevron\"\n [class.fa-chevron-down]=\"IsCategoryCollapsed(filter.Category)\"\n [class.fa-chevron-up]=\"!IsCategoryCollapsed(filter.Category)\"></i>\n }\n </div>\n @if (!IsCategoryCollapsed(filter.Category) && filter.Options.length > 1) {\n <button class=\"filter-select-all\"\n (click)=\"SelectAll(filter.Category); $event.stopPropagation()\"\n [title]=\"IsAllSelected(filter.Category) ? 'Clear all' : 'Select all'\">\n {{ IsAllSelected(filter.Category) ? 'Clear' : 'All' }}\n </button>\n }\n </div>\n\n @if (!IsCategoryCollapsed(filter.Category)) {\n <div class=\"filter-options\">\n @for (option of filter.Options; track option.Value) {\n @if (filter.Options.length === 1) {\n <!-- Single option: read-only label (no checkbox, not interactive) -->\n <div class=\"filter-option filter-option-readonly\">\n @if (option.Icon) {\n <i [class]=\"option.Icon + ' filter-option-icon'\"></i>\n }\n <span class=\"filter-option-label\">{{ option.Label }}</span>\n <span class=\"filter-option-count\">{{ option.Count }}</span>\n </div>\n } @else {\n <label class=\"filter-option\" (click)=\"ToggleOption(filter.Category, option.Value); $event.preventDefault()\">\n <span class=\"filter-checkbox\" [class.filter-checkbox-checked]=\"IsOptionSelected(filter.Category, option.Value)\">\n @if (IsOptionSelected(filter.Category, option.Value)) {\n <i class=\"fa-solid fa-check\"></i>\n }\n </span>\n @if (option.Icon) {\n <i [class]=\"option.Icon + ' filter-option-icon'\"></i>\n }\n <span class=\"filter-option-label\">{{ option.Label }}</span>\n <span class=\"filter-option-count\">{{ option.Count }}</span>\n </label>\n }\n }\n </div>\n }\n </div>\n }\n\n <!-- Relevance Threshold Slider -->\n @if (ShowRelevanceSlider) {\n <div class=\"filter-category\">\n <div class=\"filter-category-header-row\">\n <div class=\"filter-category-header\">\n <span class=\"filter-category-name\">Min Relevance</span>\n </div>\n </div>\n <div class=\"filter-relevance-slider\">\n <input\n type=\"range\"\n min=\"0\" max=\"100\" step=\"5\"\n [value]=\"MinScorePercent\"\n (input)=\"OnMinScorePreview($any($event.target).value)\"\n (mouseup)=\"OnMinScoreCommit()\"\n (touchend)=\"OnMinScoreCommit()\"\n class=\"relevance-range\" />\n <span class=\"relevance-value\">{{ MinScorePercent }}%</span>\n </div>\n @if (ServerMinScorePercent > 0) {\n <div class=\"filter-server-threshold\">\n <span class=\"server-threshold-label\">Server threshold: {{ ServerMinScorePercent }}%</span>\n @if (MinScorePercent < ServerMinScorePercent) {\n <span class=\"server-threshold-warning\">\n <i class=\"fa-solid fa-arrow-rotate-right\"></i> Will re-query\n </span>\n }\n </div>\n }\n </div>\n }\n\n @if (Filters.length === 0 && !ShowRelevanceSlider) {\n <div class=\"filter-empty\">\n <p>No filters available</p>\n </div>\n }\n</div>\n"]}
|
|
1
|
+
{"version":3,"file":"search-filter.component.js","sourceRoot":"","sources":["../../src/lib/search-filter.component.ts","../../src/lib/search-filter.component.html"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACH,SAAS,EACT,YAAY,EACZ,KAAK,EACL,MAAM,EACN,iBAAiB,EACjB,MAAM,EACT,MAAM,eAAe,CAAC;;;;;;;ICPP,kCAAsD;IAArB,yLAAS,iBAAU,KAAC;IACjD,YACJ;IAAA,iBAAS;;;IADL,cACJ;IADI,sEACJ;;;IAaA,gCAAmC;IAAA,YAAqB;IAAA,iBAAO;;;IAA5B,cAAqB;IAArB,wCAAqB;;;;IAIpD,kCAE8E;IADtE,+OAAS,oCAA0B,wBAAE,wBAAwB,KAAC;IAElE,YACJ;IAAA,iBAAS;;;;IAFD,6FAAqE;IACzE,cACJ;IADI,2FACJ;;;IALJ,gHAA4F;;;;IAA5F,mIAMC;;;IASmB,oBAAqD;;;IAAlD,qDAA6C;;;IAFxD,+BAAkD;IAC9C,+HAAmB;IAGnB,gCAAkC;IAAA,YAAkB;IAAA,iBAAO;IAC3D,gCAAkC;IAAA,YAAkB;IACxD,AADwD,iBAAO,EACzD;;;IALF,cAEC;IAFD,yCAEC;IACiC,eAAkB;IAAlB,qCAAkB;IAClB,eAAkB;IAAlB,qCAAkB;;;IAM5C,wBAAiC;;;IAIrC,oBAAqD;;;IAAlD,qDAA6C;;;;IAPxD,iCAA4G;IAA/E,oSAAS,wDAA2C,wBAAE,uBAAuB,KAAC;IACvG,gCAAgH;IAC5G,+HAAuD;IAG3D,iBAAO;IACP,+HAAmB;IAGnB,gCAAkC;IAAA,YAAkB;IA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,CAAC,KAAa;QAClC,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,0FAA0F;IACnF,gBAAgB;QACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACpD,CAAC;IAED,4EAA4E;IACrE,gBAAgB,CAAC,KAAa;QACjC,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACpD,CAAC;+GA7HQ,qBAAqB;6DAArB,qBAAqB;YCrB1B,AADJ,AADJ,8BAA0B,aACW,cACI;YAC7B,uBAAkC;YAAC,yBACvC;YAAA,iBAAO;YACP,8BAAmC;YAC/B,0FAA0B;YAK1B,iCAAgH;YAA/E,kGAAS,yBAAqB,IAAC;YAC5D,uBAAiC;YAG7C,AADI,AADI,iBAAS,EACP,EACJ;YAEN,wGA8CC;YAGD,0FAA2B;YA+B3B,qGAAoD;YAIxD,iBAAM;;YA/FM,eAIC;YAJD,iDAIC;YAOT,eA8CC;YA9CD,0BA8CC;YAGD,eA6BC;YA7BD,mDA6BC;YAED,cAGC;YAHD,gFAGC;;;iFD7EQ,qBAAqB;cANjC,SAAS;6BACM,KAAK,YACP,kBAAkB;;kBAQ3B,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFAxBE,qBAAqB","sourcesContent":["/**\n * @fileoverview Search Filter Component\n *\n * Faceted filter sidebar for narrowing search results.\n * Displays filter categories with checkable options and counts.\n */\n\nimport {\n Component,\n EventEmitter,\n Input,\n Output,\n ChangeDetectorRef,\n inject\n} from '@angular/core';\nimport { SearchFilter, SearchFilterChangeEvent } from './search-types';\n\n@Component({\n standalone: false,\n selector: 'mj-search-filter',\n templateUrl: './search-filter.component.html',\n styleUrls: ['./search-filter.component.css']\n})\nexport class SearchFilterComponent {\n private cdr = inject(ChangeDetectorRef);\n\n /** Available filters to display */\n @Input() Filters: SearchFilter[] = [];\n\n /** Currently active filter selections */\n @Input() ActiveFilters: Record<string, string[]> = {};\n\n /** Whether the filter panel is collapsible */\n @Input() Collapsible = true;\n\n /** Whether to show the min relevance slider */\n @Input() ShowRelevanceSlider = true;\n\n /** Current minimum score as a percentage (0-100) */\n @Input() MinScorePercent = 0;\n\n /** The MinScore that was last sent to the server (for visual indicator) */\n @Input() ServerMinScorePercent = 0;\n\n @Output() FilterChanged = new EventEmitter<SearchFilterChangeEvent>();\n @Output() FiltersCleared = new EventEmitter<void>();\n @Output() CloseRequested = new EventEmitter<void>();\n @Output() MinScoreChanged = new EventEmitter<number>();\n\n /** Collapsed state per category */\n public CollapsedCategories = new Set<string>();\n\n /** Toggle a filter option */\n public ToggleOption(category: string, value: string): void {\n const current = this.ActiveFilters[category] ? [...this.ActiveFilters[category]] : [];\n const index = current.indexOf(value);\n if (index >= 0) {\n current.splice(index, 1);\n } else {\n current.push(value);\n }\n // Update local state to reflect change\n this.ActiveFilters = { ...this.ActiveFilters, [category]: current };\n this.FilterChanged.emit({ Category: category, SelectedValues: current });\n this.cdr.detectChanges();\n }\n\n /**\n * Apply the expand/collapse state emitted by a category's accordion panel.\n * Inverse mapping: an expanded panel means the category is NOT collapsed.\n * No-op when filtering is not collapsible.\n */\n public OnCategoryExpandedChange(category: string, expanded: boolean): void {\n if (!this.Collapsible) return;\n if (expanded) {\n this.CollapsedCategories.delete(category);\n } else {\n this.CollapsedCategories.add(category);\n }\n this.cdr.detectChanges();\n }\n\n /** Check if a category is collapsed */\n public IsCategoryCollapsed(category: string): boolean {\n return this.CollapsedCategories.has(category);\n }\n\n /** Check if an option is selected */\n public IsOptionSelected(category: string, value: string): boolean {\n return (this.ActiveFilters[category] ?? []).includes(value);\n }\n\n /** Check if any filters are active */\n public HasActiveFilters(): boolean {\n return Object.values(this.ActiveFilters).some(v => v.length > 0);\n }\n\n /** Get total active filter count */\n public GetActiveFilterCount(): number {\n return Object.values(this.ActiveFilters).reduce((sum, v) => sum + v.length, 0);\n }\n\n /** Clear all filters */\n public ClearAll(): void {\n this.ActiveFilters = {};\n this.FiltersCleared.emit();\n this.cdr.detectChanges();\n }\n\n /** Select all options in a category, or clear all if already all selected */\n public SelectAll(category: string): void {\n const filter = this.Filters.find(f => f.Category === category);\n if (!filter) return;\n\n const current = this.ActiveFilters[category] ?? [];\n if (current.length === filter.Options.length) {\n // All selected → clear\n this.ActiveFilters[category] = [];\n } else {\n // Select all\n this.ActiveFilters[category] = filter.Options.map(o => o.Value);\n }\n this.FilterChanged.emit({ Category: category, SelectedValues: this.ActiveFilters[category] });\n this.cdr.detectChanges();\n }\n\n /** Check if all options in a category are selected */\n public IsAllSelected(category: string): boolean {\n const filter = this.Filters.find(f => f.Category === category);\n if (!filter) return false;\n const selection = this.ActiveFilters[category] ?? [];\n return selection.length === filter.Options.length;\n }\n\n /** Handle relevance slider drag (preview only — updates display without triggering search) */\n public OnMinScorePreview(value: string): void {\n this.MinScorePercent = parseInt(value, 10);\n }\n\n /** Handle relevance slider release — commits the value and triggers re-query if needed */\n public OnMinScoreCommit(): void {\n this.MinScoreChanged.emit(this.MinScorePercent);\n }\n\n /** Handle relevance slider change (legacy — used when input event fires) */\n public OnMinScoreChange(value: string): void {\n this.MinScorePercent = parseInt(value, 10);\n this.MinScoreChanged.emit(this.MinScorePercent);\n }\n}\n","<div class=\"filter-panel\">\n <div class=\"filter-panel-header\">\n <span class=\"filter-panel-title\">\n <i class=\"fa-solid fa-filter\"></i> Filters\n </span>\n <div class=\"filter-header-actions\">\n @if (HasActiveFilters()) {\n <button class=\"filter-clear-all\" (click)=\"ClearAll()\">\n Clear ({{ GetActiveFilterCount() }})\n </button>\n }\n <button class=\"filter-close-btn\" (click)=\"CloseRequested.emit()\" title=\"Hide filters\" aria-label=\"Hide filters\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n </div>\n\n @for (filter of Filters; track filter.Category) {\n <mj-accordion-panel Size=\"sm\" [FlushBody]=\"true\"\n [Expanded]=\"Collapsible ? !IsCategoryCollapsed(filter.Category) : true\"\n (ExpandedChange)=\"OnCategoryExpandedChange(filter.Category, $event)\">\n <ng-template mjAccordionTitle>\n <span class=\"filter-category-name\">{{ filter.Category }}</span>\n </ng-template>\n <ng-template mjAccordionActions>\n @if ((!Collapsible || !IsCategoryCollapsed(filter.Category)) && filter.Options.length > 1) {\n <button class=\"filter-select-all\"\n (click)=\"SelectAll(filter.Category); $event.stopPropagation()\"\n [title]=\"IsAllSelected(filter.Category) ? 'Clear all' : 'Select all'\">\n {{ IsAllSelected(filter.Category) ? 'Clear' : 'All' }}\n </button>\n }\n </ng-template>\n <ng-template mjAccordionBody>\n <div class=\"filter-options\">\n @for (option of filter.Options; track option.Value) {\n @if (filter.Options.length === 1) {\n <!-- Single option: read-only label (no checkbox, not interactive) -->\n <div class=\"filter-option filter-option-readonly\">\n @if (option.Icon) {\n <i [class]=\"option.Icon + ' filter-option-icon'\"></i>\n }\n <span class=\"filter-option-label\">{{ option.Label }}</span>\n <span class=\"filter-option-count\">{{ option.Count }}</span>\n </div>\n } @else {\n <label class=\"filter-option\" (click)=\"ToggleOption(filter.Category, option.Value); $event.preventDefault()\">\n <span class=\"filter-checkbox\" [class.filter-checkbox-checked]=\"IsOptionSelected(filter.Category, option.Value)\">\n @if (IsOptionSelected(filter.Category, option.Value)) {\n <i class=\"fa-solid fa-check\"></i>\n }\n </span>\n @if (option.Icon) {\n <i [class]=\"option.Icon + ' filter-option-icon'\"></i>\n }\n <span class=\"filter-option-label\">{{ option.Label }}</span>\n <span class=\"filter-option-count\">{{ option.Count }}</span>\n </label>\n }\n }\n </div>\n </ng-template>\n </mj-accordion-panel>\n }\n\n <!-- Relevance Threshold Slider -->\n @if (ShowRelevanceSlider) {\n <div class=\"filter-category\">\n <div class=\"filter-category-header-row\">\n <div class=\"filter-category-header\">\n <span class=\"filter-category-name\">Min Relevance</span>\n </div>\n </div>\n <div class=\"filter-relevance-slider\">\n <input\n type=\"range\"\n min=\"0\" max=\"100\" step=\"5\"\n [value]=\"MinScorePercent\"\n (input)=\"OnMinScorePreview($any($event.target).value)\"\n (mouseup)=\"OnMinScoreCommit()\"\n (touchend)=\"OnMinScoreCommit()\"\n class=\"relevance-range\" />\n <span class=\"relevance-value\">{{ MinScorePercent }}%</span>\n </div>\n @if (ServerMinScorePercent > 0) {\n <div class=\"filter-server-threshold\">\n <span class=\"server-threshold-label\">Server threshold: {{ ServerMinScorePercent }}%</span>\n @if (MinScorePercent < ServerMinScorePercent) {\n <span class=\"server-threshold-warning\">\n <i class=\"fa-solid fa-arrow-rotate-right\"></i> Will re-query\n </span>\n }\n </div>\n }\n </div>\n }\n\n @if (Filters.length === 0 && !ShowRelevanceSlider) {\n <mj-empty-state class=\"filter-empty\" Size=\"compact\"\n Icon=\"\" Title=\"No filters available\" />\n }\n</div>\n"]}
|