obi-sdk 0.11.0 → 0.11.1

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.
@@ -0,0 +1,6 @@
1
+ import { O } from "./obi-widget-00df4624.js";
2
+ import "./types-e0297e7b.js";
3
+ export {
4
+ O as ObiWidget
5
+ };
6
+ //# sourceMappingURL=index-45f4d445.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-45f4d445.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -17983,7 +17983,7 @@ class ObiWidget extends i$1 {
17983
17983
  };
17984
17984
  this.databaseConfig = null;
17985
17985
  this.configLoaded = false;
17986
- this.configInCode = false;
17986
+ this.configAllInCode = false;
17987
17987
  this.sessionToken = null;
17988
17988
  this.roomToken = null;
17989
17989
  this.roomUrl = null;
@@ -18269,12 +18269,32 @@ class ObiWidget extends i$1 {
18269
18269
  updateFromConfig() {
18270
18270
  if (window.obiWidgetConfig) {
18271
18271
  this.apiKey = window.obiWidgetConfig.apiKey || this.apiKey;
18272
+ if (window.obiWidgetConfig.position !== void 0) {
18273
+ this.position = window.obiWidgetConfig.position;
18274
+ this.setAttribute("position", this.position);
18275
+ }
18276
+ if (window.obiWidgetConfig.primaryColor !== void 0) {
18277
+ this.style.setProperty("--obi-primary", window.obiWidgetConfig.primaryColor);
18278
+ this.generateColorVariables(window.obiWidgetConfig.primaryColor);
18279
+ }
18280
+ if (window.obiWidgetConfig.user !== void 0) {
18281
+ this.user = window.obiWidgetConfig.user;
18282
+ }
18283
+ if (window.obiWidgetConfig.isActive !== void 0) {
18284
+ this.isActive = window.obiWidgetConfig.isActive;
18285
+ }
18286
+ if (window.obiWidgetConfig.linkOnlyAccess !== void 0) {
18287
+ this.linkOnlyAccess = window.obiWidgetConfig.linkOnlyAccess;
18288
+ }
18289
+ if (window.obiWidgetConfig.urlBlacklist !== void 0) {
18290
+ this.urlBlacklist = window.obiWidgetConfig.urlBlacklist;
18291
+ }
18272
18292
  const hasPosition = window.obiWidgetConfig.position !== void 0;
18273
18293
  const hasPrimaryColor = window.obiWidgetConfig.primaryColor !== void 0;
18274
18294
  const hasLinkOnlyAccess = window.obiWidgetConfig.linkOnlyAccess !== void 0;
18275
18295
  const hasUrlBlacklist = window.obiWidgetConfig.urlBlacklist !== void 0;
18276
- this.configInCode = hasPosition && hasPrimaryColor && hasLinkOnlyAccess && hasUrlBlacklist;
18277
- if (this.configInCode) {
18296
+ this.configAllInCode = hasPosition && hasPrimaryColor && hasLinkOnlyAccess && hasUrlBlacklist;
18297
+ if (this.configAllInCode) {
18278
18298
  this.configLoaded = true;
18279
18299
  this.applyFinalConfiguration();
18280
18300
  } else if (!this.configLoaded) {
@@ -18491,9 +18511,6 @@ class ObiWidget extends i$1 {
18491
18511
  const updatedConfig = customEvent.detail;
18492
18512
  const needsInit = updatedConfig.isActive && !this.isActive;
18493
18513
  this.updateFromConfig();
18494
- if (this.position) {
18495
- this.setAttribute("position", this.position);
18496
- }
18497
18514
  if (needsInit && !isCurrentUrlBlacklisted(this.urlBlacklist)) {
18498
18515
  this.sessionConnectionCheck();
18499
18516
  }
@@ -18896,7 +18913,7 @@ __decorateClass([
18896
18913
  ], ObiWidget.prototype, "configLoaded", 2);
18897
18914
  __decorateClass([
18898
18915
  r$1()
18899
- ], ObiWidget.prototype, "configInCode", 2);
18916
+ ], ObiWidget.prototype, "configAllInCode", 2);
18900
18917
  if (!customElements.get("obi-widget")) {
18901
18918
  customElements.define("obi-widget", ObiWidget);
18902
18919
  }
@@ -18927,4 +18944,4 @@ export {
18927
18944
  withSentryAsyncHandler as w,
18928
18945
  x
18929
18946
  };
18930
- //# sourceMappingURL=obi-widget-585f773a.js.map
18947
+ //# sourceMappingURL=obi-widget-00df4624.js.map