@saasquatch/squatch-js 2.8.2-17 → 2.8.2-19
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 +17 -22
- package/dist/squatch.cjs.js.map +1 -1
- package/dist/squatch.esm.js +17 -22
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +17 -22
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +1 -1
- package/package.json +1 -1
package/dist/squatch.js
CHANGED
|
@@ -1134,24 +1134,24 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1134
1134
|
// element.style.height = "0";
|
|
1135
1135
|
// element.style["overflow-y"] = "hidden";
|
|
1136
1136
|
// }
|
|
1137
|
-
//
|
|
1138
|
-
//
|
|
1139
|
-
//
|
|
1140
|
-
//
|
|
1141
|
-
// } else {
|
|
1142
|
-
// element.shadowRoot.appendChild(frame);
|
|
1143
|
-
// }
|
|
1144
|
-
// }
|
|
1145
|
-
// // Widget reloaded - replace existing element
|
|
1146
|
-
// else if (element.firstChild) {
|
|
1147
|
-
// element.replaceChild(frame, element.firstChild);
|
|
1148
|
-
// // Add iframe for the first time
|
|
1137
|
+
// if (this.container) {
|
|
1138
|
+
// if (element.shadowRoot) {
|
|
1139
|
+
// if (element.shadowRoot.lastChild?.nodeName === "IFRAME") {
|
|
1140
|
+
// element.shadowRoot.replaceChild(frame, element.shadowRoot.lastChild);
|
|
1149
1141
|
// } else {
|
|
1150
|
-
// element.appendChild(frame);
|
|
1142
|
+
// element.shadowRoot.appendChild(frame);
|
|
1151
1143
|
// }
|
|
1152
|
-
// }
|
|
1144
|
+
// }
|
|
1145
|
+
// // Widget reloaded - replace existing element
|
|
1146
|
+
// else if (element.firstChild) {
|
|
1147
|
+
// element.replaceChild(frame, element.firstChild);
|
|
1148
|
+
// // Add iframe for the first time
|
|
1149
|
+
// } else {
|
|
1153
1150
|
// element.appendChild(frame);
|
|
1154
1151
|
// }
|
|
1152
|
+
// } else if (!element.firstChild || element.firstChild.nodeName === "#text") {
|
|
1153
|
+
// element.appendChild(frame);
|
|
1154
|
+
// }
|
|
1155
1155
|
// const { contentWindow } = frame;
|
|
1156
1156
|
// if (!contentWindow) {
|
|
1157
1157
|
// throw new Error("Frame needs a content window");
|
|
@@ -1207,10 +1207,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1207
1207
|
initialHeight
|
|
1208
1208
|
});
|
|
1209
1209
|
const element = this._findElement();
|
|
1210
|
-
frame.style.display = "none";
|
|
1211
|
-
const injectContents = (target) => {
|
|
1212
|
-
target.appendChild(frame);
|
|
1213
|
-
};
|
|
1214
1210
|
if ((_i = this.context) == null ? void 0 : _i.container) {
|
|
1215
1211
|
element.style.visibility = "hidden";
|
|
1216
1212
|
element.style.height = "0";
|
|
@@ -1221,15 +1217,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1221
1217
|
if (((_j = element.shadowRoot.lastChild) == null ? void 0 : _j.nodeName) === "IFRAME") {
|
|
1222
1218
|
element.shadowRoot.replaceChild(frame, element.shadowRoot.lastChild);
|
|
1223
1219
|
} else {
|
|
1224
|
-
|
|
1220
|
+
element.shadowRoot.appendChild(frame);
|
|
1225
1221
|
}
|
|
1226
1222
|
} else if (element.firstChild) {
|
|
1227
1223
|
element.replaceChild(frame, element.firstChild);
|
|
1228
1224
|
} else {
|
|
1229
|
-
|
|
1225
|
+
element.appendChild(frame);
|
|
1230
1226
|
}
|
|
1231
1227
|
} else if (!element.firstChild || element.firstChild.nodeName === "#text") {
|
|
1232
|
-
|
|
1228
|
+
element.appendChild(frame);
|
|
1233
1229
|
}
|
|
1234
1230
|
const { contentWindow } = frame;
|
|
1235
1231
|
if (!contentWindow) {
|
|
@@ -1237,7 +1233,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1237
1233
|
}
|
|
1238
1234
|
const frameDoc = contentWindow.document;
|
|
1239
1235
|
frameDoc.open();
|
|
1240
|
-
console.log({ content: this.content, context: this.context, this: this });
|
|
1241
1236
|
const domain = this.widgetApi.domain;
|
|
1242
1237
|
frameDoc.write(`
|
|
1243
1238
|
${((_k = brandingConfig == null ? void 0 : brandingConfig.main) == null ? void 0 : _k.brandFont) && `
|