@saasquatch/squatch-js 2.8.2-8 → 2.8.2-9

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.
@@ -2470,6 +2470,7 @@ class DeclarativeEmbedWidget extends DeclarativeWidget {
2470
2470
  <div>
2471
2471
  <h1>Dynamic Content</h1>
2472
2472
  <p>This content was dynamically added to the widget before it loaded.</p>
2473
+ <p>This content comes from the embeded widget class</p>
2473
2474
  </div>
2474
2475
  `;
2475
2476
  const skeletonContainer = document.createElement("div");
@@ -2512,28 +2513,28 @@ class DeclarativePopupWidget extends DeclarativeWidget {
2512
2513
  }
2513
2514
  }
2514
2515
  async connectedCallback() {
2515
- var _a2;
2516
2516
  this.loaded = true;
2517
2517
  this.container = this.getAttribute("container");
2518
2518
  const skeletonHTML = `
2519
- <div>
2520
- <h1>Dynamic Content</h1>
2521
- <p>This content was dynamically added to the widget before it loaded.</p>
2522
- </div>
2523
- `;
2519
+ <div>
2520
+ <h1>Dynamic Content</h1>
2521
+ <p>This content was dynamically added to the widget before it loaded.</p>
2522
+ <p>This content comes from the embedded widget class</p>
2523
+ </div>
2524
+ `;
2524
2525
  const skeletonContainer = document.createElement("div");
2525
2526
  skeletonContainer.id = "loading-skeleton";
2526
2527
  skeletonContainer.innerHTML = skeletonHTML;
2527
- if (!this.shadowRoot) {
2528
- this.attachShadow({ mode: "open" });
2529
- }
2530
- if (this.shadowRoot) {
2531
- this.shadowRoot.innerHTML = skeletonHTML;
2532
- }
2528
+ const root = this.shadowRoot || this.attachShadow({ mode: "open" });
2529
+ root.innerHTML = "";
2530
+ root.appendChild(skeletonContainer);
2533
2531
  await this.renderWidget();
2534
- const loadingElement = (_a2 = this.shadowRoot) == null ? void 0 : _a2.getElementById("loading-skeleton");
2532
+ const loadingElement = root.getElementById("loading-skeleton");
2535
2533
  if (loadingElement) {
2536
2534
  loadingElement.remove();
2535
+ console.log("Skeleton removed successfully");
2536
+ } else {
2537
+ console.warn("Could not find skeleton to remove");
2537
2538
  }
2538
2539
  if (this.getAttribute("open") !== null) this.open();
2539
2540
  }