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