@fluid-topics/ft-reader-metadata 1.2.21 → 1.2.23

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.
@@ -39,7 +39,7 @@ class FtReaderMetadata extends withDateFormat(withI18n(FtReaderComponent)) {
39
39
  updateRelatives() {
40
40
  var _a, _b, _c, _d;
41
41
  if (this.useForSwitchingToRelatives && this.key) {
42
- this.relatives = (_d = (_b = (_a = this.stateManager) === null || _a === void 0 ? void 0 : _a.clusteringHelper) === null || _b === void 0 ? void 0 : _b.computeClustersItemsForMetadata(this.key, ((_c = this.map) === null || _c === void 0 ? void 0 : _c.lang) || "en", this.noValueMessage)) !== null && _d !== void 0 ? _d : [];
42
+ this.relatives = (_d = (_b = (_a = this.stateManager) === null || _a === void 0 ? void 0 : _a.clusteringHelper) === null || _b === void 0 ? void 0 : _b.computeClustersItemsForMetadata(this.key, ((_c = this.map) === null || _c === void 0 ? void 0 : _c.lang) || "en", this.noValueMessage, this.getDateFormatter(this.key))) !== null && _d !== void 0 ? _d : [];
43
43
  }
44
44
  else {
45
45
  this.relatives = [];
@@ -83,7 +83,7 @@ class FtReaderMetadata extends withDateFormat(withI18n(FtReaderComponent)) {
83
83
  <ft-tooltip part="tooltip"
84
84
  slot="${inFloatingMenu ? "toggle" : ""}"
85
85
  class="${this.multiLine ? "ft-reader-metadata-multi-line" : ""}"
86
- text="${`${this.metadataLabel}: ${(_f = (_e = this.flatMetadata) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : this.noValueMessage}`}">
86
+ text="${`${this.metadataLabel}: ${(_f = (_e = this.flatMetadata) === null || _e === void 0 ? void 0 : _e.displayValue) !== null && _f !== void 0 ? _f : this.noValueMessage}`}">
87
87
  ${chip}
88
88
  </ft-tooltip>
89
89
  `;
@@ -171,8 +171,8 @@ class FtReaderMetadata extends withDateFormat(withI18n(FtReaderComponent)) {
171
171
  (_d = this.stateManager) === null || _d === void 0 ? void 0 : _d.unregisterMetadataForSwitchToRelatives(this.key);
172
172
  }
173
173
  }
174
- if (props.has("metadata") || this.dateFormatOptionsChanged(props)) {
175
- this.flatMetadata = ClusteringHelper.flattenMetadata(this.formatDateValues(this.metadata));
174
+ if ((props.has("metadata") || this.dateFormatOptionsChanged(props)) && this.metadata) {
175
+ this.flatMetadata = ClusteringHelper.flattenMetadata(this.metadata, this.getDateFormatter(this.metadata.key));
176
176
  }
177
177
  }
178
178
  get metadataLabel() {