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