@fluid-topics/ft-reader-topic-metadata 1.2.23 → 1.2.24

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.
@@ -9,6 +9,7 @@ export declare class FtReaderTopicMetadata extends FtReaderTopicMetadata_base im
9
9
  key?: string;
10
10
  multiLine: boolean;
11
11
  displayLabel: boolean;
12
+ hierarchicalValueTruncatingLevel?: number;
12
13
  editorMode: boolean;
13
14
  private metadata?;
14
15
  private flatMetadata?;
@@ -17,6 +17,7 @@ class FtReaderTopicMetadata extends withDateFormat(FtReaderTopicComponent) {
17
17
  super(...arguments);
18
18
  this.multiLine = false;
19
19
  this.displayLabel = false;
20
+ this.hierarchicalValueTruncatingLevel = 3;
20
21
  this.editorMode = false;
21
22
  }
22
23
  render() {
@@ -70,15 +71,15 @@ class FtReaderTopicMetadata extends withDateFormat(FtReaderTopicComponent) {
70
71
  return nothing;
71
72
  }
72
73
  get tooltipText() {
73
- return this.flatMetadata ? this.flatMetadata.label + ": " + this.flatMetadata.displayValue : "";
74
+ return this.flatMetadata ? this.flatMetadata.label + ": " + this.flatMetadata.displayTooltipValue : "";
74
75
  }
75
76
  update(props) {
76
77
  super.update(props);
77
78
  if (["key", "tocNode"].some(p => props.has(p))) {
78
79
  this.updateContent();
79
80
  }
80
- if ((props.has("metadata") || this.dateFormatOptionsChanged(props)) && this.metadata) {
81
- this.flatMetadata = ClusteringHelper.flattenMetadata(this.metadata, this.getDateFormatter(this.metadata.key));
81
+ if ((props.has("metadata") || props.has("hierarchicalValueTruncatingLevel") || this.dateFormatOptionsChanged(props)) && this.metadata) {
82
+ this.flatMetadata = ClusteringHelper.flattenMetadata(this.metadata, this.hierarchicalValueTruncatingLevel, this.getDateFormatter(this.metadata.key));
82
83
  }
83
84
  }
84
85
  onStoreAvailable() {
@@ -107,6 +108,9 @@ __decorate([
107
108
  __decorate([
108
109
  property({ type: Boolean })
109
110
  ], FtReaderTopicMetadata.prototype, "displayLabel", void 0);
111
+ __decorate([
112
+ property({ type: Number })
113
+ ], FtReaderTopicMetadata.prototype, "hierarchicalValueTruncatingLevel", void 0);
110
114
  __decorate([
111
115
  state()
112
116
  ], FtReaderTopicMetadata.prototype, "editorMode", void 0);