@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.js
CHANGED
|
@@ -1862,7 +1862,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1862
1862
|
};
|
|
1863
1863
|
}
|
|
1864
1864
|
const getSkeleton = ({
|
|
1865
|
-
type = "
|
|
1865
|
+
type = "verified-access",
|
|
1866
1866
|
height = "500px",
|
|
1867
1867
|
skeletonBackgroundColor = "#e0e0e0",
|
|
1868
1868
|
skeletonShimmerColor = "#f5f5f5"
|
|
@@ -2115,7 +2115,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2115
2115
|
</style>
|
|
2116
2116
|
|
|
2117
2117
|
<div class="widget-container">
|
|
2118
|
-
${type === "
|
|
2118
|
+
${type === "verified-access" ? referrerHTML : instantAccessHTML}
|
|
2119
2119
|
</div>
|
|
2120
2120
|
`;
|
|
2121
2121
|
};
|
|
@@ -2257,6 +2257,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2257
2257
|
domain: (config == null ? void 0 : config.domain) || ((_b = this.config) == null ? void 0 : _b.domain) || DEFAULT_DOMAIN
|
|
2258
2258
|
});
|
|
2259
2259
|
}
|
|
2260
|
+
getWidgetType(widgetType) {
|
|
2261
|
+
if (widgetType && (widgetType.includes("websiteReferralWidget") || widgetType.includes("friendWidget"))) {
|
|
2262
|
+
return "instant-access";
|
|
2263
|
+
}
|
|
2264
|
+
return "verified-access";
|
|
2265
|
+
}
|
|
2260
2266
|
async renderPasswordlessVariant() {
|
|
2261
2267
|
this._setupApis();
|
|
2262
2268
|
_log$1("Rendering as an Instant Access widget");
|
|
@@ -2356,9 +2362,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2356
2362
|
this.container = this.getAttribute("container");
|
|
2357
2363
|
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2358
2364
|
console.log("widget type", this.widgetType);
|
|
2365
|
+
const skeletonWidgetType = this.getWidgetType(this.widgetType);
|
|
2359
2366
|
const skeletonHTML = getSkeleton({
|
|
2360
2367
|
height: "100%",
|
|
2361
|
-
type:
|
|
2368
|
+
type: skeletonWidgetType
|
|
2362
2369
|
});
|
|
2363
2370
|
const skeletonContainer = document.createElement("div");
|
|
2364
2371
|
skeletonContainer.id = "loading-skeleton";
|
|
@@ -2400,8 +2407,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2400
2407
|
this.loaded = true;
|
|
2401
2408
|
this.container = this.getAttribute("container");
|
|
2402
2409
|
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2403
|
-
|
|
2404
|
-
const skeletonHTML = getSkeleton({
|
|
2410
|
+
const skeletonWidgetType = this.getWidgetType(this.widgetType);
|
|
2411
|
+
const skeletonHTML = getSkeleton({
|
|
2412
|
+
height: "100%",
|
|
2413
|
+
type: skeletonWidgetType
|
|
2414
|
+
});
|
|
2405
2415
|
const skeletonContainer = document.createElement("div");
|
|
2406
2416
|
skeletonContainer.id = "loading-skeleton";
|
|
2407
2417
|
skeletonContainer.innerHTML = skeletonHTML;
|