@salesforcedevs/docs-components 1.36.0 → 1.37.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/docs-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.0",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"@types/lodash.orderby": "4.6.9",
|
|
26
26
|
"@types/lodash.uniqby": "4.7.9"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "0abdf26134a564b4a943ae4d8a99a1f66dbf6baa"
|
|
29
29
|
}
|
|
@@ -23,7 +23,8 @@ export interface SearchViewModel {
|
|
|
23
23
|
status: SearchStatus;
|
|
24
24
|
query: string;
|
|
25
25
|
locale: string;
|
|
26
|
-
|
|
26
|
+
/** null = none, a string = one type, an array = several (OR'd). */
|
|
27
|
+
selectedType: string | string[] | null;
|
|
27
28
|
sort: SortOption;
|
|
28
29
|
results: SearchResult[];
|
|
29
30
|
contentTypeFacets: FacetBucket[];
|
|
@@ -113,7 +114,9 @@ export class SearchController {
|
|
|
113
114
|
status: this.status,
|
|
114
115
|
query: this.query,
|
|
115
116
|
locale: this.locale,
|
|
116
|
-
selectedType: this.selectedType,
|
|
117
|
+
selectedType: this.selectedType?.includes(",")
|
|
118
|
+
? this.selectedType.split(",")
|
|
119
|
+
: this.selectedType,
|
|
117
120
|
sort: this.sort,
|
|
118
121
|
results: this.results,
|
|
119
122
|
contentTypeFacets: this.contentTypeFacets,
|
|
@@ -234,9 +237,12 @@ export class SearchController {
|
|
|
234
237
|
}
|
|
235
238
|
}
|
|
236
239
|
|
|
237
|
-
setType(type: string | null): void {
|
|
238
|
-
//
|
|
239
|
-
|
|
240
|
+
setType(type: string | string[] | null): void {
|
|
241
|
+
// Several types are held (and sent to the API / URL) as one
|
|
242
|
+
// comma-separated string. An empty array clears the selection.
|
|
243
|
+
const next = Array.isArray(type) ? type.join(",") || null : type;
|
|
244
|
+
// Disjunctive toggle: selecting the active selection clears it.
|
|
245
|
+
this.selectedType = this.selectedType === next ? null : next;
|
|
240
246
|
this.page = 1;
|
|
241
247
|
this.offset = 0;
|
|
242
248
|
this.syncUrl();
|