@saasquatch/squatch-js 2.8.0-0 → 2.8.0-2
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 +6 -5
- package/dist/squatch.cjs.js.map +1 -1
- package/dist/squatch.esm.js +6 -5
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +6 -5
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/widgetUtils.d.ts +1 -1
- package/package.json +1 -1
package/dist/squatch.esm.js
CHANGED
|
@@ -781,7 +781,7 @@ function formatWidth({
|
|
|
781
781
|
unit
|
|
782
782
|
}) {
|
|
783
783
|
switch (unit) {
|
|
784
|
-
case "
|
|
784
|
+
case "px":
|
|
785
785
|
return `${value}px`;
|
|
786
786
|
case "%":
|
|
787
787
|
return `${value}%`;
|
|
@@ -1114,8 +1114,9 @@ class EmbedWidget extends Widget {
|
|
|
1114
1114
|
element.style.height = "0";
|
|
1115
1115
|
element.style["overflow-y"] = "hidden";
|
|
1116
1116
|
}
|
|
1117
|
-
|
|
1118
|
-
const
|
|
1117
|
+
console.log({ context: this.context });
|
|
1118
|
+
const brandingConfig = (_c = (_b = this.context.widgetConfig) == null ? void 0 : _b.values) == null ? void 0 : _c.SquatchBrandingConfig;
|
|
1119
|
+
const sizes = (_d = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _d.embeddedWidgets;
|
|
1119
1120
|
const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "100%";
|
|
1120
1121
|
const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "100%";
|
|
1121
1122
|
element.style.maxWidth = maxWidth;
|
|
@@ -1247,7 +1248,7 @@ class PopupWidget extends Widget {
|
|
|
1247
1248
|
_createPopupDialog() {
|
|
1248
1249
|
var _a2, _b, _c;
|
|
1249
1250
|
const dialog = document.createElement("dialog");
|
|
1250
|
-
const brandingConfig = (_b = (_a2 = this.context.widgetConfig) == null ? void 0 : _a2.values) == null ? void 0 : _b.
|
|
1251
|
+
const brandingConfig = (_b = (_a2 = this.context.widgetConfig) == null ? void 0 : _a2.values) == null ? void 0 : _b.SquatchBrandingConfig;
|
|
1251
1252
|
const sizes = (_c = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _c.popupWidgets;
|
|
1252
1253
|
const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "100%";
|
|
1253
1254
|
const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "500px";
|
|
@@ -1893,7 +1894,7 @@ class DeclarativeWidget extends HTMLElement {
|
|
|
1893
1894
|
user: config.user,
|
|
1894
1895
|
container: this.container || void 0,
|
|
1895
1896
|
engagementMedium: this.type,
|
|
1896
|
-
|
|
1897
|
+
widgetConfig: res.widgetConfig
|
|
1897
1898
|
},
|
|
1898
1899
|
type: this.widgetType,
|
|
1899
1900
|
domain: ((_a2 = this.config) == null ? void 0 : _a2.domain) || DEFAULT_DOMAIN,
|