@fluid-topics/ft-reader-topic-metadata 1.2.25 → 1.2.27

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.
@@ -10,6 +10,7 @@ export declare class FtReaderTopicMetadata extends FtReaderTopicMetadata_base im
10
10
  multiLine: boolean;
11
11
  displayLabel: boolean;
12
12
  hierarchicalValueTruncatingLevel?: number;
13
+ forceTooltip: boolean;
13
14
  editorMode: boolean;
14
15
  private metadata?;
15
16
  private flatMetadata?;
@@ -18,6 +18,7 @@ class FtReaderTopicMetadata extends withDateFormat(FtReaderTopicComponent) {
18
18
  this.multiLine = false;
19
19
  this.displayLabel = false;
20
20
  this.hierarchicalValueTruncatingLevel = 3;
21
+ this.forceTooltip = false;
21
22
  this.editorMode = false;
22
23
  }
23
24
  render() {
@@ -28,19 +29,20 @@ class FtReaderTopicMetadata extends withDateFormat(FtReaderTopicComponent) {
28
29
  }
29
30
  renderChip() {
30
31
  var _a, _b, _c, _d;
32
+ let noTooltip = !this.forceTooltip && this.displayLabel && ((_a = this.flatMetadata) === null || _a === void 0 ? void 0 : _a.value) == ((_b = this.flatMetadata) === null || _b === void 0 ? void 0 : _b.displayValue);
31
33
  let chip = html `
32
34
  <ft-chip part="chip"
33
35
  exportpartsPrefix="chip"
34
36
  ?multiLine=${this.multiLine}>
35
37
  ${this.displayLabel ? html `
36
- <span part="label">${(_b = (_a = this.flatMetadata) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : this.key}: </span>
38
+ <span part="label">${(_d = (_c = this.flatMetadata) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : this.key}: </span>
37
39
  ` : nothing}
38
40
  ${this.metadataValue.length === 0 ? nothing : html `
39
41
  <span part="values">${this.metadataValue}</span>
40
42
  `}
41
43
  </ft-chip>
42
44
  `;
43
- return this.displayLabel && ((_c = this.flatMetadata) === null || _c === void 0 ? void 0 : _c.value) == ((_d = this.flatMetadata) === null || _d === void 0 ? void 0 : _d.displayValue) ? chip : html `
45
+ return noTooltip ? chip : html `
44
46
  <ft-tooltip part="tooltip" text="${this.tooltipText}">
45
47
  ${chip}
46
48
  </ft-tooltip>
@@ -111,6 +113,9 @@ __decorate([
111
113
  __decorate([
112
114
  property({ type: Number })
113
115
  ], FtReaderTopicMetadata.prototype, "hierarchicalValueTruncatingLevel", void 0);
116
+ __decorate([
117
+ property({ type: Boolean })
118
+ ], FtReaderTopicMetadata.prototype, "forceTooltip", void 0);
114
119
  __decorate([
115
120
  state()
116
121
  ], FtReaderTopicMetadata.prototype, "editorMode", void 0);