@interopio/browser 3.5.2 → 3.5.4

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.
@@ -2330,6 +2330,7 @@
2330
2330
  const glueLayoutDecoder = object$1({
2331
2331
  name: nonEmptyStringDecoder,
2332
2332
  type: layoutTypeDecoder,
2333
+ token: optional$1(nonEmptyStringDecoder),
2333
2334
  components: array$1(oneOf$1(windowLayoutComponentDecoder, workspaceLayoutComponentDecoder, workspaceFrameComponentDecoder)),
2334
2335
  context: optional$1(anyJson$1()),
2335
2336
  metadata: optional$1(anyJson$1()),
@@ -6817,7 +6818,7 @@
6817
6818
  async invokeWidgetFactory(io) {
6818
6819
  const timeout = this.config?.widget?.timeout || defaultWidgetTimeout;
6819
6820
  await this.ioc.eventsDispatcher.widgetReady(timeout);
6820
- const config = deepmerge$1({ ...this.resources?.widget?.config, enable: true }, this.config?.widget || {});
6821
+ const config = deepmerge$1({ ...this.resources?.widget?.config, enable: this.displayWidget }, this.config?.widget || {});
6821
6822
  this.logger.trace(`IOBrowserWidget factory is available. Invoking it with config: ${JSON.stringify(config)}`);
6822
6823
  await window.IOBrowserWidget(io, config);
6823
6824
  }
@@ -7022,7 +7023,7 @@
7022
7023
  }
7023
7024
  }
7024
7025
 
7025
- var version$1 = "3.5.2";
7026
+ var version$1 = "3.5.4";
7026
7027
 
7027
7028
  const createFactoryFunction = (coreFactoryFunction) => {
7028
7029
  let cachedApiPromise;
@@ -10009,7 +10010,7 @@
10009
10010
  }
10010
10011
  };
10011
10012
 
10012
- var version = "6.5.0";
10013
+ var version = "6.5.1";
10013
10014
 
10014
10015
  function prepareConfig (configuration, ext, glue42gd) {
10015
10016
  let nodeStartingContext;
@@ -15295,18 +15296,27 @@
15295
15296
  if (_allowTrace) {
15296
15297
  _logger.trace(`registering ${name} module`);
15297
15298
  }
15298
- const done = () => {
15299
+ const done = (e) => {
15299
15300
  inner.initTime = t.stop();
15300
15301
  inner.initEndTime = t.endTime;
15301
15302
  inner.marks = t.marks;
15302
- if (_allowTrace) {
15303
- _logger.trace(`${name} is ready - ${t.endTime - t.startTime}`);
15303
+ if (!_allowTrace) {
15304
+ return;
15304
15305
  }
15306
+ const traceMessage = e ?
15307
+ `${name} failed - ${e.message}` :
15308
+ `${name} is ready - ${t.endTime - t.startTime}`;
15309
+ _logger.trace(traceMessage);
15305
15310
  };
15306
15311
  inner.initStartTime = t.startTime;
15307
15312
  if (inner.ready) {
15308
- inner.ready().then(() => {
15313
+ inner.ready()
15314
+ .then(() => {
15309
15315
  done();
15316
+ })
15317
+ .catch((e) => {
15318
+ const error = typeof e === "string" ? new Error(e) : e;
15319
+ done(error);
15310
15320
  });
15311
15321
  }
15312
15322
  else {
@@ -15595,6 +15605,26 @@
15595
15605
  IOConnectCoreFactory.version = version;
15596
15606
  IOConnectCoreFactory.default = IOConnectCoreFactory;
15597
15607
 
15608
+ const setupGlobalSystem = () => {
15609
+ return {
15610
+ getContainerInfo: async () => {
15611
+ if (window === window.parent) {
15612
+ return;
15613
+ }
15614
+ if (window.name.includes("#wsp")) {
15615
+ return {
15616
+ workspaceFrame: {
15617
+ id: "N/A"
15618
+ }
15619
+ };
15620
+ }
15621
+ return window.parent === window.top ?
15622
+ { top: {} } :
15623
+ { parent: {} };
15624
+ }
15625
+ };
15626
+ };
15627
+
15598
15628
  const iOConnectBrowserFactory = createFactoryFunction(IOConnectCoreFactory);
15599
15629
  if (typeof window !== "undefined") {
15600
15630
  const windowAny = window;
@@ -15607,6 +15637,9 @@
15607
15637
  if (!legacyGlobal && !ioGlobal) {
15608
15638
  window.iobrowser = { webStarted: false };
15609
15639
  }
15640
+ if (!window.iodesktop && !window.iobrowser.system) {
15641
+ window.iobrowser.system = setupGlobalSystem();
15642
+ }
15610
15643
  iOConnectBrowserFactory.version = version$1;
15611
15644
 
15612
15645
  return iOConnectBrowserFactory;