@saasquatch/squatch-js 2.8.0-2 → 2.8.0-3
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/coverage/clover.xml +708 -0
- package/coverage/coverage-final.json +16 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +1276 -0
- package/dist/async.d.ts +1 -0
- package/dist/squatch.cjs.js +9 -10
- package/dist/squatch.cjs.js.map +1 -1
- package/dist/squatch.esm.js +9 -10
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +9 -10
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +1 -1
- package/dist/types.d.ts +0 -11
- package/package.json +1 -1
package/dist/squatch.esm.js
CHANGED
|
@@ -1106,7 +1106,7 @@ class EmbedWidget extends Widget {
|
|
|
1106
1106
|
if (container) this.container = container;
|
|
1107
1107
|
}
|
|
1108
1108
|
async load() {
|
|
1109
|
-
var _a2, _b, _c
|
|
1109
|
+
var _a2, _b, _c;
|
|
1110
1110
|
const frame = this._createFrame();
|
|
1111
1111
|
const element = this._findElement();
|
|
1112
1112
|
if ((_a2 = this.context) == null ? void 0 : _a2.container) {
|
|
@@ -1114,16 +1114,15 @@ class EmbedWidget extends Widget {
|
|
|
1114
1114
|
element.style.height = "0";
|
|
1115
1115
|
element.style["overflow-y"] = "hidden";
|
|
1116
1116
|
}
|
|
1117
|
-
|
|
1118
|
-
const
|
|
1119
|
-
const sizes = (_d = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _d.embeddedWidgets;
|
|
1117
|
+
const brandingConfig = window.SquatchBrandingConfig;
|
|
1118
|
+
const sizes = (_b = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _b.embeddedWidgets;
|
|
1120
1119
|
const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "100%";
|
|
1121
1120
|
const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "100%";
|
|
1122
1121
|
element.style.maxWidth = maxWidth;
|
|
1123
1122
|
element.style.minWidth = minWidth;
|
|
1124
1123
|
if (this.container) {
|
|
1125
1124
|
if (element.shadowRoot) {
|
|
1126
|
-
if (((
|
|
1125
|
+
if (((_c = element.shadowRoot.lastChild) == null ? void 0 : _c.nodeName) === "IFRAME") {
|
|
1127
1126
|
element.shadowRoot.replaceChild(frame, element.shadowRoot.lastChild);
|
|
1128
1127
|
} else {
|
|
1129
1128
|
element.shadowRoot.appendChild(frame);
|
|
@@ -1246,10 +1245,10 @@ class PopupWidget extends Widget {
|
|
|
1246
1245
|
}
|
|
1247
1246
|
}
|
|
1248
1247
|
_createPopupDialog() {
|
|
1249
|
-
var _a2
|
|
1248
|
+
var _a2;
|
|
1250
1249
|
const dialog = document.createElement("dialog");
|
|
1251
|
-
const brandingConfig =
|
|
1252
|
-
const sizes = (
|
|
1250
|
+
const brandingConfig = window.SquatchBrandingConfig;
|
|
1251
|
+
const sizes = (_a2 = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _a2.popupWidgets;
|
|
1253
1252
|
const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "100%";
|
|
1254
1253
|
const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "500px";
|
|
1255
1254
|
dialog.id = this.id;
|
|
@@ -1886,6 +1885,7 @@ class DeclarativeWidget extends HTMLElement {
|
|
|
1886
1885
|
__publicField(this, "loaded");
|
|
1887
1886
|
__publicField(this, "_setWidget", (res, config) => {
|
|
1888
1887
|
var _a2;
|
|
1888
|
+
console.log({ res });
|
|
1889
1889
|
const params = {
|
|
1890
1890
|
api: this.widgetApi,
|
|
1891
1891
|
content: res.template,
|
|
@@ -1893,8 +1893,7 @@ class DeclarativeWidget extends HTMLElement {
|
|
|
1893
1893
|
type: config.type,
|
|
1894
1894
|
user: config.user,
|
|
1895
1895
|
container: this.container || void 0,
|
|
1896
|
-
engagementMedium: this.type
|
|
1897
|
-
widgetConfig: res.widgetConfig
|
|
1896
|
+
engagementMedium: this.type
|
|
1898
1897
|
},
|
|
1899
1898
|
type: this.widgetType,
|
|
1900
1899
|
domain: ((_a2 = this.config) == null ? void 0 : _a2.domain) || DEFAULT_DOMAIN,
|