@fluid-topics/ft-reader-metadata 1.1.80 → 1.1.82

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 { PropertyValues } from "lit";
2
2
  import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
3
3
  import { FtReaderMetadataProperties } from "./ft-reader-metadata.properties";
4
4
  import { FtReaderComponent, FtReaderStateManager } from "@fluid-topics/ft-reader-context/build/registration";
5
- declare const FtReaderMetadata_base: typeof FtReaderComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
5
+ declare const FtReaderMetadata_base: typeof FtReaderComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface> & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-app-context/build/mixins/withDateFormat").FtLitElementWithDateFormatInterface>;
6
6
  export declare class FtReaderMetadata extends FtReaderMetadata_base implements FtReaderMetadataProperties {
7
7
  static elementDefinitions: ElementDefinitionsMap;
8
8
  static styles: import("lit").CSSResult;
@@ -18,7 +18,8 @@ import { FtRipple } from "@fluid-topics/ft-ripple";
18
18
  import { withI18n } from "@fluid-topics/ft-i18n/build/lit/i18n";
19
19
  import { readerMetadataContext } from "./ReaderMetadataMessages";
20
20
  import { i18n } from "@fluid-topics/ft-i18n";
21
- class FtReaderMetadata extends withI18n(FtReaderComponent) {
21
+ import { withDateFormat } from "@fluid-topics/ft-app-context/build/mixins/withDateFormat";
22
+ class FtReaderMetadata extends withDateFormat(withI18n(FtReaderComponent)) {
22
23
  constructor() {
23
24
  super();
24
25
  this.multiLine = false;
@@ -168,8 +169,8 @@ class FtReaderMetadata extends withI18n(FtReaderComponent) {
168
169
  (_d = this.stateManager) === null || _d === void 0 ? void 0 : _d.unregisterMetadataForSwitchToRelatives(this.key);
169
170
  }
170
171
  }
171
- if (props.has("metadata")) {
172
- this.flatMetadata = ClusteringHelper.flattenMetadata(this.metadata);
172
+ if (props.has("metadata") || this.dateFormatOptionsChanged(props)) {
173
+ this.flatMetadata = ClusteringHelper.flattenMetadata(this.formatDateValues(this.metadata));
173
174
  }
174
175
  }
175
176
  get metadataLabel() {
@@ -206,16 +207,16 @@ __decorate([
206
207
  property({ attribute: false })
207
208
  ], FtReaderMetadata.prototype, "editorMode", void 0);
208
209
  __decorate([
209
- redux({ selector: (s, e) => { var _a, _b; return (_b = (_a = s.map) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.find(m => m.key === e.key); } })
210
+ redux({ store: "reader", selector: (s, e) => { var _a, _b; return (_b = (_a = s.map) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.find(m => m.key === e.key); } })
210
211
  ], FtReaderMetadata.prototype, "metadata", void 0);
211
212
  __decorate([
212
213
  state()
213
214
  ], FtReaderMetadata.prototype, "flatMetadata", void 0);
214
215
  __decorate([
215
- redux()
216
+ redux({ store: "reader" })
216
217
  ], FtReaderMetadata.prototype, "map", void 0);
217
218
  __decorate([
218
- redux({ selector: (s) => { var _a; return (_a = s.configuration) === null || _a === void 0 ? void 0 : _a.relativeTopicPivotMetadata; } })
219
+ redux({ store: "reader", selector: (s) => { var _a; return (_a = s.configuration) === null || _a === void 0 ? void 0 : _a.relativeTopicPivotMetadata; } })
219
220
  ], FtReaderMetadata.prototype, "relativeTopicPivotMetadata", void 0);
220
221
  __decorate([
221
222
  state()