@fluid-topics/ft-search-selected-facets 1.2.1 → 1.2.3

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.
@@ -2,7 +2,7 @@ import { nothing } from "lit";
2
2
  import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
3
3
  import { FtSearchSelectedFacetsProperties } from "./ft-search-selected-facets.properties";
4
4
  import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
5
- import { FtMetadataFilter, FtSearchFacet } from "@fluid-topics/public-api";
5
+ import { FtMetadataFilter, FtSearchFacet, FtSearchScopeKeys } from "@fluid-topics/public-api";
6
6
  declare const FtSearchSelectedFacets_base: typeof FtSearchComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
7
7
  export declare class FtSearchSelectedFacets extends FtSearchSelectedFacets_base implements FtSearchSelectedFacetsProperties {
8
8
  static elementDefinitions: ElementDefinitionsMap;
@@ -10,6 +10,7 @@ export declare class FtSearchSelectedFacets extends FtSearchSelectedFacets_base
10
10
  facets?: Array<FtSearchFacet>;
11
11
  searchInDocumentTitlesOnly?: boolean;
12
12
  filters?: FtMetadataFilter[];
13
+ scope?: FtSearchScopeKeys;
13
14
  get hasSomethingToDisplay(): boolean | undefined;
14
15
  constructor();
15
16
  protected render(): typeof nothing | import("lit").TemplateResult<1>;
@@ -44,6 +44,9 @@ class FtSearchSelectedFacets extends withI18n(FtSearchComponent) {
44
44
  `;
45
45
  }
46
46
  renderFacet(facetKey, facetLabel, selectedValues, value) {
47
+ if (facetKey === "ft:publicationId" && this.scope === "ALL_TOPICS") {
48
+ return nothing;
49
+ }
47
50
  let label = facetLabel + ": " + this.getBreadcrumbFromValue(value);
48
51
  const keyWithNoColumn = facetKey.replace(":", "-");
49
52
  return html `
@@ -139,4 +142,7 @@ __decorate([
139
142
  __decorate([
140
143
  redux({ store: "search", selector: (state) => state.request.metadataFilters })
141
144
  ], FtSearchSelectedFacets.prototype, "filters", void 0);
145
+ __decorate([
146
+ redux({ store: "search", selector: (state) => state.request.scope })
147
+ ], FtSearchSelectedFacets.prototype, "scope", void 0);
142
148
  export { FtSearchSelectedFacets };