@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.cjs.js
CHANGED
|
@@ -1860,7 +1860,7 @@ function _getAutoConfig() {
|
|
|
1860
1860
|
};
|
|
1861
1861
|
}
|
|
1862
1862
|
const getSkeleton = ({
|
|
1863
|
-
type = "
|
|
1863
|
+
type = "verified-access",
|
|
1864
1864
|
height = "500px",
|
|
1865
1865
|
skeletonBackgroundColor = "#e0e0e0",
|
|
1866
1866
|
skeletonShimmerColor = "#f5f5f5"
|
|
@@ -2113,7 +2113,7 @@ const getSkeleton = ({
|
|
|
2113
2113
|
</style>
|
|
2114
2114
|
|
|
2115
2115
|
<div class="widget-container">
|
|
2116
|
-
${type === "
|
|
2116
|
+
${type === "verified-access" ? referrerHTML : instantAccessHTML}
|
|
2117
2117
|
</div>
|
|
2118
2118
|
`;
|
|
2119
2119
|
};
|
|
@@ -2255,6 +2255,12 @@ class DeclarativeWidget extends HTMLElement {
|
|
|
2255
2255
|
domain: (config == null ? void 0 : config.domain) || ((_b = this.config) == null ? void 0 : _b.domain) || DEFAULT_DOMAIN
|
|
2256
2256
|
});
|
|
2257
2257
|
}
|
|
2258
|
+
getWidgetType(widgetType) {
|
|
2259
|
+
if (widgetType && (widgetType.includes("websiteReferralWidget") || widgetType.includes("friendWidget"))) {
|
|
2260
|
+
return "instant-access";
|
|
2261
|
+
}
|
|
2262
|
+
return "verified-access";
|
|
2263
|
+
}
|
|
2258
2264
|
async renderPasswordlessVariant() {
|
|
2259
2265
|
this._setupApis();
|
|
2260
2266
|
_log$1("Rendering as an Instant Access widget");
|
|
@@ -2354,9 +2360,10 @@ class DeclarativeEmbedWidget extends DeclarativeWidget {
|
|
|
2354
2360
|
this.container = this.getAttribute("container");
|
|
2355
2361
|
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2356
2362
|
console.log("widget type", this.widgetType);
|
|
2363
|
+
const skeletonWidgetType = this.getWidgetType(this.widgetType);
|
|
2357
2364
|
const skeletonHTML = getSkeleton({
|
|
2358
2365
|
height: "100%",
|
|
2359
|
-
type:
|
|
2366
|
+
type: skeletonWidgetType
|
|
2360
2367
|
});
|
|
2361
2368
|
const skeletonContainer = document.createElement("div");
|
|
2362
2369
|
skeletonContainer.id = "loading-skeleton";
|
|
@@ -2398,8 +2405,11 @@ class DeclarativePopupWidget extends DeclarativeWidget {
|
|
|
2398
2405
|
this.loaded = true;
|
|
2399
2406
|
this.container = this.getAttribute("container");
|
|
2400
2407
|
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2401
|
-
|
|
2402
|
-
const skeletonHTML = getSkeleton({
|
|
2408
|
+
const skeletonWidgetType = this.getWidgetType(this.widgetType);
|
|
2409
|
+
const skeletonHTML = getSkeleton({
|
|
2410
|
+
height: "100%",
|
|
2411
|
+
type: skeletonWidgetType
|
|
2412
|
+
});
|
|
2403
2413
|
const skeletonContainer = document.createElement("div");
|
|
2404
2414
|
skeletonContainer.id = "loading-skeleton";
|
|
2405
2415
|
skeletonContainer.innerHTML = skeletonHTML;
|