@saasquatch/squatch-js 2.8.2-2 → 2.8.2-4

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.
@@ -1459,7 +1459,9 @@ class EmbedWidget extends Widget {
1459
1459
  super(params);
1460
1460
  __publicField(this, "show", this.open);
1461
1461
  __publicField(this, "hide", this.close);
1462
- if (container) this.container = container;
1462
+ if (container) {
1463
+ this.container = container;
1464
+ }
1463
1465
  }
1464
1466
  async load() {
1465
1467
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
@@ -1490,6 +1492,7 @@ class EmbedWidget extends Widget {
1490
1492
  initialHeight
1491
1493
  });
1492
1494
  const element = this._findElement();
1495
+ element.innerHTML = skeletonHTML;
1493
1496
  frame.style.display = "none";
1494
1497
  const injectContents = (target) => {
1495
1498
  target.appendChild(skeletonContainer);
@@ -1531,7 +1534,7 @@ class EmbedWidget extends Widget {
1531
1534
  <link rel="preconnect" href="https://fonts.googleapis.com">
1532
1535
  <link rel="preload" href="https://fonts.googleapis.com/css2?family=${encodeURIComponent(
1533
1536
  (_l = brandingConfig == null ? void 0 : brandingConfig.main) == null ? void 0 : _l.brandFont
1534
- )}">`}
1537
+ )}" as="style">`}
1535
1538
  <script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"><\/script>
1536
1539
  <style data-styles>
1537
1540
  html { visibility:hidden;}
@@ -2465,6 +2468,18 @@ class DeclarativeEmbedWidget extends DeclarativeWidget {
2465
2468
  var _a2, _b;
2466
2469
  this.loaded = true;
2467
2470
  this.container = this.getAttribute("container");
2471
+ const dynamicContent = `
2472
+ <div>
2473
+ <h1>Dynamic Content</h1>
2474
+ <p>This content was dynamically added to the widget before it loaded.</p>
2475
+ </div>
2476
+ `;
2477
+ if (this.container) {
2478
+ const containerElement = document.querySelector(this.container);
2479
+ if (containerElement) {
2480
+ containerElement.innerHTML = dynamicContent;
2481
+ }
2482
+ }
2468
2483
  await this.renderWidget();
2469
2484
  const slot = (_a2 = this.shadowRoot && Array.from(this.shadowRoot.children)) == null ? void 0 : _a2.find((c) => c.tagName === "SLOT");
2470
2485
  if (slot) (_b = this.shadowRoot) == null ? void 0 : _b.removeChild(slot);