@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.
@@ -783,7 +783,7 @@ function formatWidth({
783
783
  unit
784
784
  }) {
785
785
  switch (unit) {
786
- case "PX":
786
+ case "px":
787
787
  return `${value}px`;
788
788
  case "%":
789
789
  return `${value}%`;
@@ -1116,8 +1116,9 @@ class EmbedWidget extends Widget {
1116
1116
  element.style.height = "0";
1117
1117
  element.style["overflow-y"] = "hidden";
1118
1118
  }
1119
- const brandingConfig = (_c = (_b = this.context.widgetConfig) == null ? void 0 : _b.values) == null ? void 0 : _c.brandingConfig;
1120
- const sizes = (_d = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _d.embedWidgets;
1119
+ console.log({ context: this.context });
1120
+ const brandingConfig = (_c = (_b = this.context.widgetConfig) == null ? void 0 : _b.values) == null ? void 0 : _c.SquatchBrandingConfig;
1121
+ const sizes = (_d = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _d.embeddedWidgets;
1121
1122
  const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "100%";
1122
1123
  const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "100%";
1123
1124
  element.style.maxWidth = maxWidth;
@@ -1249,7 +1250,7 @@ class PopupWidget extends Widget {
1249
1250
  _createPopupDialog() {
1250
1251
  var _a2, _b, _c;
1251
1252
  const dialog = document.createElement("dialog");
1252
- const brandingConfig = (_b = (_a2 = this.context.widgetConfig) == null ? void 0 : _a2.values) == null ? void 0 : _b.brandingConfig;
1253
+ const brandingConfig = (_b = (_a2 = this.context.widgetConfig) == null ? void 0 : _a2.values) == null ? void 0 : _b.SquatchBrandingConfig;
1253
1254
  const sizes = (_c = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _c.popupWidgets;
1254
1255
  const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "100%";
1255
1256
  const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "500px";
@@ -1895,7 +1896,7 @@ class DeclarativeWidget extends HTMLElement {
1895
1896
  user: config.user,
1896
1897
  container: this.container || void 0,
1897
1898
  engagementMedium: this.type,
1898
- config: res.widgetConfig
1899
+ widgetConfig: res.widgetConfig
1899
1900
  },
1900
1901
  type: this.widgetType,
1901
1902
  domain: ((_a2 = this.config) == null ? void 0 : _a2.domain) || DEFAULT_DOMAIN,