@saasquatch/squatch-js 2.8.2-6 → 2.8.2-7

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.
@@ -2493,22 +2493,25 @@ class DeclarativeEmbedWidget extends DeclarativeWidget {
2493
2493
  var _a2;
2494
2494
  this.loaded = true;
2495
2495
  this.container = this.getAttribute("container");
2496
- const dynamicContent = `
2497
- <div id="dynamic-content">
2496
+ const skeletonHTML = `
2497
+ <div>
2498
2498
  <h1>Dynamic Content</h1>
2499
2499
  <p>This content was dynamically added to the widget before it loaded.</p>
2500
2500
  </div>
2501
2501
  `;
2502
+ const skeletonContainer = document.createElement("div");
2503
+ skeletonContainer.id = "loading-skeleton";
2504
+ skeletonContainer.innerHTML = skeletonHTML;
2502
2505
  if (!this.shadowRoot) {
2503
2506
  this.attachShadow({ mode: "open" });
2504
2507
  }
2505
2508
  if (this.shadowRoot) {
2506
- this.shadowRoot.innerHTML = dynamicContent;
2509
+ this.shadowRoot.innerHTML = skeletonHTML;
2507
2510
  }
2508
2511
  await this.renderWidget();
2509
- const dynamicElement = (_a2 = this.shadowRoot) == null ? void 0 : _a2.getElementById("dynamic-content");
2510
- if (dynamicElement) {
2511
- dynamicElement.remove();
2512
+ const loadingElement = (_a2 = this.shadowRoot) == null ? void 0 : _a2.getElementById("loading-skeleton");
2513
+ if (loadingElement) {
2514
+ loadingElement.remove();
2512
2515
  }
2513
2516
  if (this.getAttribute("open") !== null) this.open();
2514
2517
  }