@saasquatch/squatch-js 2.8.2-28 → 2.8.2-29
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 +10 -9
- package/dist/squatch.cjs.js.map +1 -1
- package/dist/squatch.esm.js +10 -9
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +10 -9
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +1 -1
- package/package.json +1 -1
package/dist/squatch.js
CHANGED
|
@@ -1121,13 +1121,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
1123
|
async load() {
|
|
1124
|
-
var _a2, _b, _c, _d, _e, _f, _g
|
|
1124
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
1125
1125
|
const brandingConfig = (_b = (_a2 = this.context.widgetConfig) == null ? void 0 : _a2.values) == null ? void 0 : _b.brandingConfig;
|
|
1126
1126
|
const initialHeight = brandingConfig == null ? void 0 : brandingConfig.loadingHeight;
|
|
1127
|
-
|
|
1128
|
-
(_f = (_e = brandingConfig == null ? void 0 : brandingConfig.color) == null ? void 0 : _e.loadingSkeleton) == null ? void 0 : _f.animationBackground;
|
|
1129
|
-
(_g = brandingConfig == null ? void 0 : brandingConfig.border) == null ? void 0 : _g.borderColor;
|
|
1130
|
-
const sizes = (_h = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _h.embeddedWidgets;
|
|
1127
|
+
const sizes = (_c = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _c.embeddedWidgets;
|
|
1131
1128
|
const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "";
|
|
1132
1129
|
const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "";
|
|
1133
1130
|
const frame = this._createFrame({
|
|
@@ -1136,14 +1133,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1136
1133
|
initialHeight
|
|
1137
1134
|
});
|
|
1138
1135
|
const element = this._findElement();
|
|
1139
|
-
if ((
|
|
1136
|
+
if ((_d = this.context) == null ? void 0 : _d.container) {
|
|
1140
1137
|
element.style.visibility = "hidden";
|
|
1141
1138
|
element.style.height = "0";
|
|
1142
1139
|
element.style["overflow-y"] = "hidden";
|
|
1143
1140
|
}
|
|
1144
1141
|
if (this.container) {
|
|
1145
1142
|
if (element.shadowRoot) {
|
|
1146
|
-
if (((
|
|
1143
|
+
if (((_e = element.shadowRoot.lastChild) == null ? void 0 : _e.nodeName) === "IFRAME") {
|
|
1147
1144
|
element.shadowRoot.replaceChild(frame, element.shadowRoot.lastChild);
|
|
1148
1145
|
} else {
|
|
1149
1146
|
element.shadowRoot.appendChild(frame);
|
|
@@ -1164,12 +1161,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1164
1161
|
frameDoc.open();
|
|
1165
1162
|
const domain = this.widgetApi.domain;
|
|
1166
1163
|
frameDoc.write(`
|
|
1167
|
-
${((
|
|
1164
|
+
${((_f = brandingConfig == null ? void 0 : brandingConfig.main) == null ? void 0 : _f.brandFont) ? `
|
|
1168
1165
|
<link rel="preconnect" href="https://fast${domain === "https://staging.referralsaasquatch.com" && "-staging"}.ssqt.io">
|
|
1169
1166
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
|
1170
1167
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
1171
1168
|
<link rel="preload" href="https://fonts.googleapis.com/css2?family=${encodeURIComponent(
|
|
1172
|
-
(
|
|
1169
|
+
(_g = brandingConfig == null ? void 0 : brandingConfig.main) == null ? void 0 : _g.brandFont
|
|
1173
1170
|
)}" as="style">` : ""}
|
|
1174
1171
|
<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"><\/script>
|
|
1175
1172
|
<style data-styles>
|
|
@@ -2357,6 +2354,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2357
2354
|
async connectedCallback() {
|
|
2358
2355
|
this.loaded = true;
|
|
2359
2356
|
this.container = this.getAttribute("container");
|
|
2357
|
+
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2358
|
+
console.log("widget type", this.widgetType);
|
|
2360
2359
|
const skeletonHTML = getSkeleton({
|
|
2361
2360
|
height: "100%",
|
|
2362
2361
|
type: "instant-access"
|
|
@@ -2400,6 +2399,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2400
2399
|
async connectedCallback() {
|
|
2401
2400
|
this.loaded = true;
|
|
2402
2401
|
this.container = this.getAttribute("container");
|
|
2402
|
+
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2403
|
+
console.log("widget type", this.widgetType);
|
|
2403
2404
|
const skeletonHTML = getSkeleton({ height: "100%" });
|
|
2404
2405
|
const skeletonContainer = document.createElement("div");
|
|
2405
2406
|
skeletonContainer.id = "loading-skeleton";
|