@saasquatch/squatch-js 2.8.0-5 → 2.8.0-6

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.
@@ -879,14 +879,17 @@ class Widget {
879
879
  frame["squatchJsApi"] = this;
880
880
  frame.id = "squatchFrame";
881
881
  frame.width = "100%";
882
- if (options == null ? void 0 : options.minWidth) frame.style.minWidth = options.minWidth;
883
- if (options == null ? void 0 : options.maxWidth) frame.style.maxWidth = options.maxWidth;
884
882
  frame.src = "about:blank";
885
883
  frame.scrolling = "no";
886
884
  frame.setAttribute(
887
885
  "style",
888
886
  "border: 0; background-color: none; width: 1px; min-width: 100%;"
889
887
  );
888
+ if (options == null ? void 0 : options.minWidth) frame.style.minWidth = options.minWidth;
889
+ if (options == null ? void 0 : options.maxWidth) frame.style.maxWidth = options.maxWidth;
890
+ if ((options == null ? void 0 : options.maxWidth) || (options == null ? void 0 : options.minWidth)) {
891
+ frame.style.width = "100%";
892
+ }
890
893
  return frame;
891
894
  }
892
895
  _findFrame() {
@@ -1112,6 +1115,7 @@ class EmbedWidget extends Widget {
1112
1115
  async load() {
1113
1116
  var _a2, _b, _c, _d, _e;
1114
1117
  const brandingConfig = (_b = (_a2 = this.context.widgetConfig) == null ? void 0 : _a2.values) == null ? void 0 : _b.brandingConfig;
1118
+ console.log({ brandingConfig });
1115
1119
  const sizes = (_c = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _c.embeddedWidgets;
1116
1120
  const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "";
1117
1121
  const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "";