@fluid-topics/ft-wc-utils 1.1.90 → 1.1.91

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.
@@ -3,6 +3,7 @@ import { ScopedRegistryLitElement } from "./ScopedRegistryLitElement";
3
3
  declare const constructorPrototype: unique symbol;
4
4
  declare const constructorName: unique symbol;
5
5
  declare const exportpartsDebouncer: unique symbol;
6
+ declare const dynamicDependenciesLoaded: unique symbol;
6
7
  export declare class FtLitElement extends ScopedRegistryLitElement {
7
8
  exportpartsPrefix?: string;
8
9
  exportpartsPrefixes?: string[];
@@ -13,6 +14,7 @@ export declare class FtLitElement extends ScopedRegistryLitElement {
13
14
  private readonly [constructorName];
14
15
  constructor();
15
16
  adoptedCallback(): void;
17
+ static [dynamicDependenciesLoaded]?: boolean;
16
18
  connectedCallback(): void;
17
19
  protected importDynamicDependencies(): void;
18
20
  protected updated(props: PropertyValues): void;
@@ -12,6 +12,7 @@ import { ScopedRegistryLitElement } from "./ScopedRegistryLitElement";
12
12
  const constructorPrototype = Symbol("constructorPrototype");
13
13
  const constructorName = Symbol("constructorName");
14
14
  const exportpartsDebouncer = Symbol("exportpartsDebouncer");
15
+ const dynamicDependenciesLoaded = Symbol("dynamicDependenciesLoaded");
15
16
  export class FtLitElement extends ScopedRegistryLitElement {
16
17
  constructor() {
17
18
  super();
@@ -38,7 +39,11 @@ export class FtLitElement extends ScopedRegistryLitElement {
38
39
  this.useAdoptedStyleSheets = false;
39
40
  console.error("Cannot use adopted stylesheets", e);
40
41
  }
41
- this.importDynamicDependencies();
42
+ let constructor = this.constructor;
43
+ if (!constructor[dynamicDependenciesLoaded]) {
44
+ constructor[dynamicDependenciesLoaded] = true;
45
+ this.importDynamicDependencies();
46
+ }
42
47
  }
43
48
  importDynamicDependencies() {
44
49
  }