@fluid-topics/ft-reader-title 1.2.35 → 1.2.36

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.
@@ -6,6 +6,7 @@ export declare class FtReaderTitle extends FtReaderComponent implements FtReader
6
6
  static elementDefinitions: ElementDefinitionsMap;
7
7
  static styles: import("lit").CSSResult;
8
8
  private mapTitle?;
9
+ private translationLoading?;
9
10
  render(): import("lit-html").TemplateResult<1> | typeof nothing;
10
11
  protected contentAvailableCallback(props: PropertyValues): void;
11
12
  }
@@ -8,11 +8,16 @@ import { css, html, nothing } from "lit";
8
8
  import { redux } from "@fluid-topics/ft-wc-utils";
9
9
  import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
10
10
  import { FtTypography } from "@fluid-topics/ft-typography";
11
+ import { FtSkeleton } from "@fluid-topics/ft-skeleton";
11
12
  class FtReaderTitle extends FtReaderComponent {
12
13
  render() {
13
- return this.mapTitle ? html `
14
- <ft-typography variant="title" part="title" element="h1">${this.mapTitle}</ft-typography>
15
- ` : nothing;
14
+ return this.translationLoading
15
+ ? html `
16
+ <ft-skeleton></ft-skeleton>`
17
+ : this.mapTitle
18
+ ? html `
19
+ <ft-typography variant="title" part="title" element="h1">${this.mapTitle}</ft-typography>`
20
+ : nothing;
16
21
  }
17
22
  contentAvailableCallback(props) {
18
23
  super.contentAvailableCallback(props);
@@ -23,14 +28,22 @@ class FtReaderTitle extends FtReaderComponent {
23
28
  }
24
29
  FtReaderTitle.elementDefinitions = {
25
30
  "ft-typography": FtTypography,
31
+ "ft-skeleton": FtSkeleton
26
32
  };
27
33
  //language=css
28
34
  FtReaderTitle.styles = css `
29
35
  [part="title"]::part(text) {
30
36
  margin: unset;
31
37
  }
38
+
39
+ ft-skeleton {
40
+ height: var(--ft-typography-title-font-size);
41
+ }
32
42
  `;
33
43
  __decorate([
34
44
  redux({ selector: (s) => { var _a; return (_a = s.map) === null || _a === void 0 ? void 0 : _a.title; } })
35
45
  ], FtReaderTitle.prototype, "mapTitle", void 0);
46
+ __decorate([
47
+ redux({ selector: (s) => s.translation.isLoading })
48
+ ], FtReaderTitle.prototype, "translationLoading", void 0);
36
49
  export { FtReaderTitle };