@fluid-topics/ft-search-period-filter 2.1.18 → 2.1.20

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.
@@ -1,4 +1,4 @@
1
- import { I18nMessageContext } from "@fluid-topics/ft-i18n/build/generator/I18nMessageContext";
1
+ import { I18nMessageContext, } from "@fluid-topics/ft-i18n/build/generator/I18nMessageContext";
2
2
  export const periodFilterContext = I18nMessageContext.build("designedSearchPeriodFilter");
3
3
  export const periodFilterDefaultMessages = {
4
4
  label: "Last update",
@@ -9,5 +9,5 @@ export const periodFilterDefaultMessages = {
9
9
  LAST_YEAR: "Less than a year",
10
10
  CUSTOM: "Custom period",
11
11
  customPeriod: "From {0} to {1}",
12
- period: "Period: {0}"
12
+ period: "Period: {0}",
13
13
  };
@@ -4,17 +4,17 @@ 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 { html, nothing } from "lit";
7
+ import { html, nothing, } from "lit";
8
8
  import { styles } from "./ft-search-period-filter.styles";
9
9
  import { withI18n } from "@fluid-topics/ft-i18n";
10
- import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
11
- import { redux } from "@fluid-topics/ft-wc-utils";
12
- import { periodFilterContext, periodFilterDefaultMessages } from "./SearchPeriodFilterMessages";
10
+ import { FtSearchComponent, } from "@fluid-topics/ft-search-context/build/registration";
11
+ import { redux, } from "@fluid-topics/ft-wc-utils";
12
+ import { periodFilterContext, periodFilterDefaultMessages, } from "./SearchPeriodFilterMessages";
13
13
  import { property } from "lit/decorators.js";
14
- import { FtRadio, FtRadioGroup } from "@fluid-topics/ft-radio";
14
+ import { FtRadio, FtRadioGroup, } from "@fluid-topics/ft-radio";
15
15
  import { FtTypography } from "@fluid-topics/ft-typography";
16
- import { FtDateFilterType } from "@fluid-topics/public-api";
17
- import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
16
+ import { FtDateFilterType, } from "@fluid-topics/public-api";
17
+ import { ftAppInfoStore, } from "@fluid-topics/ft-app-context";
18
18
  export class FtSearchPeriodFilter extends withI18n(FtSearchComponent) {
19
19
  constructor() {
20
20
  super();
@@ -31,7 +31,7 @@ export class FtSearchPeriodFilter extends withI18n(FtSearchComponent) {
31
31
  var _a;
32
32
  super.update(props);
33
33
  if (props.has("filters") || props.has("key")) {
34
- this.dateFilter = (_a = this.filters) === null || _a === void 0 ? void 0 : _a.filter(f => f.key === this.metadataKey).filter(f => f.dateFilter).map(f => f.dateFilter).find(Boolean);
34
+ this.dateFilter = (_a = this.filters) === null || _a === void 0 ? void 0 : _a.filter((f) => f.key === this.metadataKey).filter((f) => f.dateFilter).map((f) => f.dateFilter).find(Boolean);
35
35
  }
36
36
  }
37
37
  render() {
@@ -78,7 +78,7 @@ export class FtSearchPeriodFilter extends withI18n(FtSearchComponent) {
78
78
  if (this.metadataKey === "ft:lastEdition") {
79
79
  return periodFilterContext.messages.label();
80
80
  }
81
- return (_c = (_b = (_a = this.metadataDescriptors) === null || _a === void 0 ? void 0 : _a.find(d => d.key == this.metadataKey)) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : this.metadataKey;
81
+ return (_c = (_b = (_a = this.metadataDescriptors) === null || _a === void 0 ? void 0 : _a.find((d) => d.key == this.metadataKey)) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : this.metadataKey;
82
82
  }
83
83
  }
84
84
  FtSearchPeriodFilter.elementDefinitions = {