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