@saasquatch/squatch-js 2.8.2-29 → 2.8.2-30
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 +15 -5
- package/dist/squatch.cjs.js.map +1 -1
- package/dist/squatch.esm.js +15 -5
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +15 -5
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +1 -1
- package/dist/widgets/SkeletonTemplate.d.ts +1 -1
- package/dist/widgets/declarative/DeclarativeWidget.d.ts +1 -0
- package/package.json +1 -1
package/dist/squatch.esm.js
CHANGED
|
@@ -1858,7 +1858,7 @@ function _getAutoConfig() {
|
|
|
1858
1858
|
};
|
|
1859
1859
|
}
|
|
1860
1860
|
const getSkeleton = ({
|
|
1861
|
-
type = "
|
|
1861
|
+
type = "verified-access",
|
|
1862
1862
|
height = "500px",
|
|
1863
1863
|
skeletonBackgroundColor = "#e0e0e0",
|
|
1864
1864
|
skeletonShimmerColor = "#f5f5f5"
|
|
@@ -2111,7 +2111,7 @@ const getSkeleton = ({
|
|
|
2111
2111
|
</style>
|
|
2112
2112
|
|
|
2113
2113
|
<div class="widget-container">
|
|
2114
|
-
${type === "
|
|
2114
|
+
${type === "verified-access" ? referrerHTML : instantAccessHTML}
|
|
2115
2115
|
</div>
|
|
2116
2116
|
`;
|
|
2117
2117
|
};
|
|
@@ -2253,6 +2253,12 @@ class DeclarativeWidget extends HTMLElement {
|
|
|
2253
2253
|
domain: (config == null ? void 0 : config.domain) || ((_b = this.config) == null ? void 0 : _b.domain) || DEFAULT_DOMAIN
|
|
2254
2254
|
});
|
|
2255
2255
|
}
|
|
2256
|
+
getWidgetType(widgetType) {
|
|
2257
|
+
if (widgetType && (widgetType.includes("websiteReferralWidget") || widgetType.includes("friendWidget"))) {
|
|
2258
|
+
return "instant-access";
|
|
2259
|
+
}
|
|
2260
|
+
return "verified-access";
|
|
2261
|
+
}
|
|
2256
2262
|
async renderPasswordlessVariant() {
|
|
2257
2263
|
this._setupApis();
|
|
2258
2264
|
_log$1("Rendering as an Instant Access widget");
|
|
@@ -2352,9 +2358,10 @@ class DeclarativeEmbedWidget extends DeclarativeWidget {
|
|
|
2352
2358
|
this.container = this.getAttribute("container");
|
|
2353
2359
|
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2354
2360
|
console.log("widget type", this.widgetType);
|
|
2361
|
+
const skeletonWidgetType = this.getWidgetType(this.widgetType);
|
|
2355
2362
|
const skeletonHTML = getSkeleton({
|
|
2356
2363
|
height: "100%",
|
|
2357
|
-
type:
|
|
2364
|
+
type: skeletonWidgetType
|
|
2358
2365
|
});
|
|
2359
2366
|
const skeletonContainer = document.createElement("div");
|
|
2360
2367
|
skeletonContainer.id = "loading-skeleton";
|
|
@@ -2396,8 +2403,11 @@ class DeclarativePopupWidget extends DeclarativeWidget {
|
|
|
2396
2403
|
this.loaded = true;
|
|
2397
2404
|
this.container = this.getAttribute("container");
|
|
2398
2405
|
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2399
|
-
|
|
2400
|
-
const skeletonHTML = getSkeleton({
|
|
2406
|
+
const skeletonWidgetType = this.getWidgetType(this.widgetType);
|
|
2407
|
+
const skeletonHTML = getSkeleton({
|
|
2408
|
+
height: "100%",
|
|
2409
|
+
type: skeletonWidgetType
|
|
2410
|
+
});
|
|
2401
2411
|
const skeletonContainer = document.createElement("div");
|
|
2402
2412
|
skeletonContainer.id = "loading-skeleton";
|
|
2403
2413
|
skeletonContainer.innerHTML = skeletonHTML;
|