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