@interopio/browser 3.5.1 → 3.5.3
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.
- package/browser.d.ts +61 -2
- package/changelog.md +2 -0
- package/dist/browser.es.js +51 -14
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.umd.js +51 -14
- package/dist/browser.umd.js.map +1 -1
- package/dist/browser.umd.min.js +1 -1
- package/package.json +5 -6
package/dist/browser.umd.js
CHANGED
|
@@ -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()),
|
|
@@ -4971,6 +4972,7 @@
|
|
|
4971
4972
|
registry = CallbackRegistryFactory$1();
|
|
4972
4973
|
logger;
|
|
4973
4974
|
contexts;
|
|
4975
|
+
interop;
|
|
4974
4976
|
bridge;
|
|
4975
4977
|
windowsController;
|
|
4976
4978
|
sessionController;
|
|
@@ -4992,6 +4994,7 @@
|
|
|
4992
4994
|
this.logger = coreGlue.logger.subLogger("channels.controller.web");
|
|
4993
4995
|
this.logger.trace("starting the web channels controller");
|
|
4994
4996
|
this.contexts = coreGlue.contexts;
|
|
4997
|
+
this.interop = coreGlue.interop;
|
|
4995
4998
|
this.addOperationsExecutors();
|
|
4996
4999
|
this.bridge = ioc.bridge;
|
|
4997
5000
|
this.windowsController = ioc.windowsController;
|
|
@@ -5037,7 +5040,7 @@
|
|
|
5037
5040
|
const channelNames = this.getAllChannelNames();
|
|
5038
5041
|
runDecoderWithIOError(channelNameDecoder(channelNames), name);
|
|
5039
5042
|
runDecoderWithIOError(optionalNonEmptyStringDecoder, windowId);
|
|
5040
|
-
const forAnotherClient = windowId && windowId !== this.
|
|
5043
|
+
const forAnotherClient = windowId && windowId !== this.interop.instance.instance;
|
|
5041
5044
|
if (forAnotherClient) {
|
|
5042
5045
|
return await this.bridge.send("channels", operations$5.joinChannel, { channel: name, windowId }, undefined, { includeOperationCheck: true });
|
|
5043
5046
|
}
|
|
@@ -5058,7 +5061,8 @@
|
|
|
5058
5061
|
const channelNames = this.getAllChannelNames();
|
|
5059
5062
|
runDecoderWithIOError(channelNameDecoder(channelNames), config.channel);
|
|
5060
5063
|
}
|
|
5061
|
-
|
|
5064
|
+
const forAnotherClient = config.windowId && config.windowId !== this.interop.instance.instance;
|
|
5065
|
+
if (config.windowId && forAnotherClient) {
|
|
5062
5066
|
const leaveData = { windowId: config.windowId, channelName: config.channel };
|
|
5063
5067
|
await this.bridge.send("channels", operations$5.leaveChannel, leaveData, undefined, { includeOperationCheck: true });
|
|
5064
5068
|
return;
|
|
@@ -5398,7 +5402,7 @@
|
|
|
5398
5402
|
runDecoderWithIOError(channelRestrictionsDecoder, config);
|
|
5399
5403
|
const channelNames = this.getAllChannelNames();
|
|
5400
5404
|
runDecoderWithIOError(channelNameDecoder(channelNames), config.name);
|
|
5401
|
-
const forAnotherClient = config.windowId && config.windowId !== this.
|
|
5405
|
+
const forAnotherClient = config.windowId && config.windowId !== this.interop.instance.instance;
|
|
5402
5406
|
if (forAnotherClient) {
|
|
5403
5407
|
return this.bridge.send("channels", operations$5.restrict, { config }, undefined, { includeOperationCheck: true });
|
|
5404
5408
|
}
|
|
@@ -5414,15 +5418,16 @@
|
|
|
5414
5418
|
}
|
|
5415
5419
|
async getRestrictions(windowId) {
|
|
5416
5420
|
runDecoderWithIOError(optionalNonEmptyStringDecoder, windowId);
|
|
5417
|
-
|
|
5418
|
-
|
|
5421
|
+
const forAnotherClient = windowId && windowId !== this.interop.instance.instance;
|
|
5422
|
+
if (windowId && forAnotherClient) {
|
|
5423
|
+
return this.bridge.send("channels", operations$5.getRestrictions, { windowId }, undefined, { includeOperationCheck: true });
|
|
5419
5424
|
}
|
|
5420
|
-
return this.
|
|
5425
|
+
return this.getMyRestrictions();
|
|
5421
5426
|
}
|
|
5422
5427
|
async restrictAll(restrictions) {
|
|
5423
5428
|
runDecoderWithIOError(restrictionsConfigDecoder, restrictions);
|
|
5424
5429
|
const allChannelNames = this.getAllChannelNames();
|
|
5425
|
-
const forAnotherClient = restrictions.windowId && restrictions.windowId !== this.
|
|
5430
|
+
const forAnotherClient = restrictions.windowId && restrictions.windowId !== this.interop.instance.instance;
|
|
5426
5431
|
if (forAnotherClient) {
|
|
5427
5432
|
return this.bridge.send("channels", operations$5.restrictAll, { restrictions }, undefined, { includeOperationCheck: true });
|
|
5428
5433
|
}
|
|
@@ -6813,7 +6818,7 @@
|
|
|
6813
6818
|
async invokeWidgetFactory(io) {
|
|
6814
6819
|
const timeout = this.config?.widget?.timeout || defaultWidgetTimeout;
|
|
6815
6820
|
await this.ioc.eventsDispatcher.widgetReady(timeout);
|
|
6816
|
-
const config = deepmerge$1({ ...this.resources?.widget?.config, enable:
|
|
6821
|
+
const config = deepmerge$1({ ...this.resources?.widget?.config, enable: this.displayWidget }, this.config?.widget || {});
|
|
6817
6822
|
this.logger.trace(`IOBrowserWidget factory is available. Invoking it with config: ${JSON.stringify(config)}`);
|
|
6818
6823
|
await window.IOBrowserWidget(io, config);
|
|
6819
6824
|
}
|
|
@@ -7018,7 +7023,7 @@
|
|
|
7018
7023
|
}
|
|
7019
7024
|
}
|
|
7020
7025
|
|
|
7021
|
-
var version$1 = "3.5.
|
|
7026
|
+
var version$1 = "3.5.3";
|
|
7022
7027
|
|
|
7023
7028
|
const createFactoryFunction = (coreFactoryFunction) => {
|
|
7024
7029
|
let cachedApiPromise;
|
|
@@ -10005,7 +10010,7 @@
|
|
|
10005
10010
|
}
|
|
10006
10011
|
};
|
|
10007
10012
|
|
|
10008
|
-
var version = "6.5.
|
|
10013
|
+
var version = "6.5.1";
|
|
10009
10014
|
|
|
10010
10015
|
function prepareConfig (configuration, ext, glue42gd) {
|
|
10011
10016
|
let nodeStartingContext;
|
|
@@ -15291,18 +15296,27 @@
|
|
|
15291
15296
|
if (_allowTrace) {
|
|
15292
15297
|
_logger.trace(`registering ${name} module`);
|
|
15293
15298
|
}
|
|
15294
|
-
const done = () => {
|
|
15299
|
+
const done = (e) => {
|
|
15295
15300
|
inner.initTime = t.stop();
|
|
15296
15301
|
inner.initEndTime = t.endTime;
|
|
15297
15302
|
inner.marks = t.marks;
|
|
15298
|
-
if (_allowTrace) {
|
|
15299
|
-
|
|
15303
|
+
if (!_allowTrace) {
|
|
15304
|
+
return;
|
|
15300
15305
|
}
|
|
15306
|
+
const traceMessage = e ?
|
|
15307
|
+
`${name} failed - ${e.message}` :
|
|
15308
|
+
`${name} is ready - ${t.endTime - t.startTime}`;
|
|
15309
|
+
_logger.trace(traceMessage);
|
|
15301
15310
|
};
|
|
15302
15311
|
inner.initStartTime = t.startTime;
|
|
15303
15312
|
if (inner.ready) {
|
|
15304
|
-
inner.ready()
|
|
15313
|
+
inner.ready()
|
|
15314
|
+
.then(() => {
|
|
15305
15315
|
done();
|
|
15316
|
+
})
|
|
15317
|
+
.catch((e) => {
|
|
15318
|
+
const error = typeof e === "string" ? new Error(e) : e;
|
|
15319
|
+
done(error);
|
|
15306
15320
|
});
|
|
15307
15321
|
}
|
|
15308
15322
|
else {
|
|
@@ -15591,6 +15605,26 @@
|
|
|
15591
15605
|
IOConnectCoreFactory.version = version;
|
|
15592
15606
|
IOConnectCoreFactory.default = IOConnectCoreFactory;
|
|
15593
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
|
+
|
|
15594
15628
|
const iOConnectBrowserFactory = createFactoryFunction(IOConnectCoreFactory);
|
|
15595
15629
|
if (typeof window !== "undefined") {
|
|
15596
15630
|
const windowAny = window;
|
|
@@ -15603,6 +15637,9 @@
|
|
|
15603
15637
|
if (!legacyGlobal && !ioGlobal) {
|
|
15604
15638
|
window.iobrowser = { webStarted: false };
|
|
15605
15639
|
}
|
|
15640
|
+
if (!window.iobrowser.system) {
|
|
15641
|
+
window.iobrowser.system = setupGlobalSystem();
|
|
15642
|
+
}
|
|
15606
15643
|
iOConnectBrowserFactory.version = version$1;
|
|
15607
15644
|
|
|
15608
15645
|
return iOConnectBrowserFactory;
|