@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.esm.js
CHANGED
|
@@ -1117,13 +1117,10 @@ class EmbedWidget extends Widget {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
1119
|
async load() {
|
|
1120
|
-
var _a2, _b, _c, _d, _e, _f, _g
|
|
1120
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
1121
1121
|
const brandingConfig = (_b = (_a2 = this.context.widgetConfig) == null ? void 0 : _a2.values) == null ? void 0 : _b.brandingConfig;
|
|
1122
1122
|
const initialHeight = brandingConfig == null ? void 0 : brandingConfig.loadingHeight;
|
|
1123
|
-
|
|
1124
|
-
(_f = (_e = brandingConfig == null ? void 0 : brandingConfig.color) == null ? void 0 : _e.loadingSkeleton) == null ? void 0 : _f.animationBackground;
|
|
1125
|
-
(_g = brandingConfig == null ? void 0 : brandingConfig.border) == null ? void 0 : _g.borderColor;
|
|
1126
|
-
const sizes = (_h = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _h.embeddedWidgets;
|
|
1123
|
+
const sizes = (_c = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _c.embeddedWidgets;
|
|
1127
1124
|
const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "";
|
|
1128
1125
|
const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "";
|
|
1129
1126
|
const frame = this._createFrame({
|
|
@@ -1132,14 +1129,14 @@ class EmbedWidget extends Widget {
|
|
|
1132
1129
|
initialHeight
|
|
1133
1130
|
});
|
|
1134
1131
|
const element = this._findElement();
|
|
1135
|
-
if ((
|
|
1132
|
+
if ((_d = this.context) == null ? void 0 : _d.container) {
|
|
1136
1133
|
element.style.visibility = "hidden";
|
|
1137
1134
|
element.style.height = "0";
|
|
1138
1135
|
element.style["overflow-y"] = "hidden";
|
|
1139
1136
|
}
|
|
1140
1137
|
if (this.container) {
|
|
1141
1138
|
if (element.shadowRoot) {
|
|
1142
|
-
if (((
|
|
1139
|
+
if (((_e = element.shadowRoot.lastChild) == null ? void 0 : _e.nodeName) === "IFRAME") {
|
|
1143
1140
|
element.shadowRoot.replaceChild(frame, element.shadowRoot.lastChild);
|
|
1144
1141
|
} else {
|
|
1145
1142
|
element.shadowRoot.appendChild(frame);
|
|
@@ -1160,12 +1157,12 @@ class EmbedWidget extends Widget {
|
|
|
1160
1157
|
frameDoc.open();
|
|
1161
1158
|
const domain = this.widgetApi.domain;
|
|
1162
1159
|
frameDoc.write(`
|
|
1163
|
-
${((
|
|
1160
|
+
${((_f = brandingConfig == null ? void 0 : brandingConfig.main) == null ? void 0 : _f.brandFont) ? `
|
|
1164
1161
|
<link rel="preconnect" href="https://fast${domain === "https://staging.referralsaasquatch.com" && "-staging"}.ssqt.io">
|
|
1165
1162
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
|
1166
1163
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
1167
1164
|
<link rel="preload" href="https://fonts.googleapis.com/css2?family=${encodeURIComponent(
|
|
1168
|
-
(
|
|
1165
|
+
(_g = brandingConfig == null ? void 0 : brandingConfig.main) == null ? void 0 : _g.brandFont
|
|
1169
1166
|
)}" as="style">` : ""}
|
|
1170
1167
|
<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"><\/script>
|
|
1171
1168
|
<style data-styles>
|
|
@@ -2353,6 +2350,8 @@ class DeclarativeEmbedWidget extends DeclarativeWidget {
|
|
|
2353
2350
|
async connectedCallback() {
|
|
2354
2351
|
this.loaded = true;
|
|
2355
2352
|
this.container = this.getAttribute("container");
|
|
2353
|
+
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2354
|
+
console.log("widget type", this.widgetType);
|
|
2356
2355
|
const skeletonHTML = getSkeleton({
|
|
2357
2356
|
height: "100%",
|
|
2358
2357
|
type: "instant-access"
|
|
@@ -2396,6 +2395,8 @@ class DeclarativePopupWidget extends DeclarativeWidget {
|
|
|
2396
2395
|
async connectedCallback() {
|
|
2397
2396
|
this.loaded = true;
|
|
2398
2397
|
this.container = this.getAttribute("container");
|
|
2398
|
+
this.widgetType = this.getAttribute("widget") || void 0;
|
|
2399
|
+
console.log("widget type", this.widgetType);
|
|
2399
2400
|
const skeletonHTML = getSkeleton({ height: "100%" });
|
|
2400
2401
|
const skeletonContainer = document.createElement("div");
|
|
2401
2402
|
skeletonContainer.id = "loading-skeleton";
|