@interopio/browser 3.4.6 → 3.4.7
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 +42 -5
- package/changelog.md +4 -0
- package/dist/browser.es.js +109 -22
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.umd.js +109 -22
- package/dist/browser.umd.js.map +1 -1
- package/dist/browser.umd.min.js +1 -1
- package/package.json +2 -2
package/browser.d.ts
CHANGED
|
@@ -289,6 +289,12 @@ export namespace IOConnectBrowser {
|
|
|
289
289
|
* Retrieves the current Channel of the window, if any.
|
|
290
290
|
*/
|
|
291
291
|
getChannel(): Promise<string>;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Notifies when the current Channels of the window have changed. Returns a function you can use to unsubscribe from the event.
|
|
295
|
+
* @param callback Callback for handling the event. Receives the names of the current Channels as an argument.
|
|
296
|
+
*/
|
|
297
|
+
onChannelsChanged(callback: (names: string[]) => void): UnsubscribeFunction;
|
|
292
298
|
}
|
|
293
299
|
export interface Settings {
|
|
294
300
|
|
|
@@ -983,10 +989,11 @@ export namespace IOConnectBrowser {
|
|
|
983
989
|
join(name: string, windowId?: string): Promise<void>;
|
|
984
990
|
|
|
985
991
|
/**
|
|
986
|
-
* Leaves the current
|
|
987
|
-
* @
|
|
992
|
+
* Leaves the current channels.
|
|
993
|
+
* @param config Settings for leaving channels.
|
|
994
|
+
* @returns Promise that resolves when the channels has been left.
|
|
988
995
|
*/
|
|
989
|
-
leave(): Promise<void>;
|
|
996
|
+
leave(config?: ChannelsLeaveConfig): Promise<void>;
|
|
990
997
|
|
|
991
998
|
/**
|
|
992
999
|
* Returns the name of the current channel.
|
|
@@ -1081,6 +1088,21 @@ export namespace IOConnectBrowser {
|
|
|
1081
1088
|
contextType?: string;
|
|
1082
1089
|
}
|
|
1083
1090
|
|
|
1091
|
+
/**
|
|
1092
|
+
* Options for leaving the Channels.
|
|
1093
|
+
*/
|
|
1094
|
+
export interface ChannelsLeaveConfig {
|
|
1095
|
+
/**
|
|
1096
|
+
* ID of a window which to leave from a Channel. If not provided, will leave the current window from the current Channel
|
|
1097
|
+
*/
|
|
1098
|
+
windowId?: string;
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* Name of a channel which should be left. If not provided, will leave from all current channels.
|
|
1102
|
+
*/
|
|
1103
|
+
channel?: string;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1084
1106
|
/**
|
|
1085
1107
|
* Options for updating a Channel context with the `publish()` method.
|
|
1086
1108
|
*/
|
|
@@ -1308,6 +1330,16 @@ export namespace IOConnectBrowser {
|
|
|
1308
1330
|
flags: string;
|
|
1309
1331
|
}
|
|
1310
1332
|
|
|
1333
|
+
/**
|
|
1334
|
+
* Settings for the Channel Selector displayed on an io.Connect Window.
|
|
1335
|
+
*/
|
|
1336
|
+
export interface ChannelSelector {
|
|
1337
|
+
/**
|
|
1338
|
+
* If `true`, the Channel Selector will be enabled for the window.
|
|
1339
|
+
*/
|
|
1340
|
+
enabled: boolean;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1311
1343
|
/**
|
|
1312
1344
|
* Configuration for the `allow` attribute of the `<iframe>` element in which the app will be started when opened in a Workspace.
|
|
1313
1345
|
*/
|
|
@@ -1351,6 +1383,11 @@ export namespace IOConnectBrowser {
|
|
|
1351
1383
|
workspacesSandbox?: WorkspacesSandbox;
|
|
1352
1384
|
|
|
1353
1385
|
/**
|
|
1386
|
+
* Settings for the Channel Selector displayed on an io.Connect Window.
|
|
1387
|
+
*/
|
|
1388
|
+
channelSelector?: ChannelSelector;
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1354
1391
|
* Configuration for the `sandbox` attribute of the `<iframe>` element in which the app will be started when opened in a Workspace.
|
|
1355
1392
|
*/
|
|
1356
1393
|
iframePermissionsPolicy?: IFramePermissionsPolicyConfig;
|
|
@@ -2007,7 +2044,7 @@ export namespace IOConnectBrowser {
|
|
|
2007
2044
|
* @param callback Callback function for handling the event.
|
|
2008
2045
|
*/
|
|
2009
2046
|
onHandlerRemoved(callback: (removedHandler: ResolverIntentHandler, intent: IntentInfo) => void): UnsubscribeFunction;
|
|
2010
|
-
|
|
2047
|
+
|
|
2011
2048
|
/**
|
|
2012
2049
|
* Sends the chosen Intent handler to the app which raised the Intent.
|
|
2013
2050
|
* @param response The Intent handler that will be sent to the app which raised the Intent.
|
|
@@ -2065,7 +2102,7 @@ export namespace IOConnectBrowser {
|
|
|
2065
2102
|
/**
|
|
2066
2103
|
* Provides additional information about an Intent (e.g., when an Intent is retrieved with the `getIntents()` method).
|
|
2067
2104
|
*/
|
|
2068
|
-
export interface IntentInfo extends AddIntentListenerRequest {
|
|
2105
|
+
export interface IntentInfo extends AddIntentListenerRequest {}
|
|
2069
2106
|
|
|
2070
2107
|
|
|
2071
2108
|
/**
|
package/changelog.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
3.4.7
|
|
2
|
+
feat: added support for channel leave by windowId
|
|
3
|
+
feat: added support for window.onChannelsChanged
|
|
4
|
+
feat: added support for channels selectors config in appD
|
|
1
5
|
3.4.6
|
|
2
6
|
feat: Enable support for io.CB API Memoization
|
|
3
7
|
feat: Add optional IOConnectBrowser.Channels.Fdc3Options param in get, getMy, subscribe and subscribeFor methods.
|
package/dist/browser.es.js
CHANGED
|
@@ -2027,7 +2027,7 @@ const nonEmptyStringDecoder = string$1().where((s) => s.length > 0, "Expected a
|
|
|
2027
2027
|
const nonNegativeNumberDecoder = number$1().where((num) => num >= 0, "Expected a non-negative number");
|
|
2028
2028
|
const optionalNonEmptyStringDecoder = optional$1(nonEmptyStringDecoder);
|
|
2029
2029
|
const libDomainDecoder = oneOf$1(constant$1("system"), constant$1("windows"), constant$1("appManager"), constant$1("layouts"), constant$1("intents"), constant$1("notifications"), constant$1("channels"), constant$1("extension"), constant$1("themes"), constant$1("prefs"));
|
|
2030
|
-
const windowOperationTypesDecoder = oneOf$1(constant$1("openWindow"), constant$1("windowHello"), constant$1("windowAdded"), constant$1("windowRemoved"), constant$1("getBounds"), constant$1("getFrameBounds"), constant$1("getUrl"), constant$1("moveResize"), constant$1("focus"), constant$1("close"), constant$1("getTitle"), constant$1("setTitle"), constant$1("focusChange"), constant$1("getChannel"));
|
|
2030
|
+
const windowOperationTypesDecoder = oneOf$1(constant$1("openWindow"), constant$1("windowHello"), constant$1("windowAdded"), constant$1("windowRemoved"), constant$1("getBounds"), constant$1("getFrameBounds"), constant$1("getUrl"), constant$1("moveResize"), constant$1("focus"), constant$1("close"), constant$1("getTitle"), constant$1("setTitle"), constant$1("focusChange"), constant$1("getChannel"), constant$1("notifyChannelsChanged"));
|
|
2031
2031
|
const appManagerOperationTypesDecoder = oneOf$1(constant$1("appHello"), constant$1("appDirectoryStateChange"), constant$1("instanceStarted"), constant$1("instanceStopped"), constant$1("applicationStart"), constant$1("instanceStop"), constant$1("clear"));
|
|
2032
2032
|
const layoutsOperationTypesDecoder = oneOf$1(constant$1("layoutAdded"), constant$1("layoutChanged"), constant$1("layoutRemoved"), constant$1("layoutRenamed"), constant$1("get"), constant$1("getAll"), constant$1("export"), constant$1("import"), constant$1("remove"), constant$1("rename"), constant$1("clientSaveRequest"), constant$1("getGlobalPermissionState"), constant$1("checkGlobalActivated"), constant$1("requestGlobalPermission"), constant$1("getDefaultGlobal"), constant$1("setDefaultGlobal"), constant$1("clearDefaultGlobal"), constant$1("updateMetadata"));
|
|
2033
2033
|
const notificationsOperationTypesDecoder = oneOf$1(constant$1("raiseNotification"), constant$1("requestPermission"), constant$1("notificationShow"), constant$1("notificationClick"), constant$1("getPermission"), constant$1("list"), constant$1("notificationRaised"), constant$1("notificationClosed"), constant$1("click"), constant$1("clear"), constant$1("clearAll"), constant$1("configure"), constant$1("getConfiguration"), constant$1("configurationChanged"), constant$1("setState"), constant$1("clearOld"), constant$1("activeCountChange"), constant$1("stateChange"));
|
|
@@ -2117,12 +2117,28 @@ const instanceDataDecoder = object$1({
|
|
|
2117
2117
|
id: nonEmptyStringDecoder,
|
|
2118
2118
|
applicationName: nonEmptyStringDecoder
|
|
2119
2119
|
});
|
|
2120
|
+
const iframePermissionsPolicyConfigDecoder = object$1({
|
|
2121
|
+
flags: string$1()
|
|
2122
|
+
});
|
|
2123
|
+
const workspacesSandboxDecoder = object$1({
|
|
2124
|
+
flags: string$1()
|
|
2125
|
+
});
|
|
2126
|
+
const requestChannelSelectorConfigDecoder = object$1({
|
|
2127
|
+
windowId: nonEmptyStringDecoder,
|
|
2128
|
+
channelsNames: array$1(nonEmptyStringDecoder)
|
|
2129
|
+
});
|
|
2130
|
+
const channelSelectorDecoder = object$1({
|
|
2131
|
+
enabled: boolean$1(),
|
|
2132
|
+
});
|
|
2120
2133
|
const applicationDetailsDecoder = object$1({
|
|
2121
2134
|
url: nonEmptyStringDecoder,
|
|
2122
2135
|
top: optional$1(number$1()),
|
|
2123
2136
|
left: optional$1(number$1()),
|
|
2124
2137
|
width: optional$1(nonNegativeNumberDecoder),
|
|
2125
|
-
height: optional$1(nonNegativeNumberDecoder)
|
|
2138
|
+
height: optional$1(nonNegativeNumberDecoder),
|
|
2139
|
+
workspacesSandbox: optional$1(workspacesSandboxDecoder),
|
|
2140
|
+
channelSelector: optional$1(channelSelectorDecoder),
|
|
2141
|
+
iframePermissionsPolicy: optional$1(iframePermissionsPolicyConfigDecoder)
|
|
2126
2142
|
});
|
|
2127
2143
|
const intentDefinitionDecoder = object$1({
|
|
2128
2144
|
name: nonEmptyStringDecoder,
|
|
@@ -2485,6 +2501,10 @@ const publishOptionsDecoder = optional$1(oneOf$1(nonEmptyStringDecoder, object$1
|
|
|
2485
2501
|
name: optional$1(nonEmptyStringDecoder),
|
|
2486
2502
|
fdc3: optional$1(boolean$1())
|
|
2487
2503
|
})));
|
|
2504
|
+
const leaveChannelsConfig = object$1({
|
|
2505
|
+
windowId: optionalNonEmptyStringDecoder,
|
|
2506
|
+
channel: optionalNonEmptyStringDecoder
|
|
2507
|
+
});
|
|
2488
2508
|
const fdc3ContextDecoder = anyJson$1().where((value) => typeof value.type === "string", "Expected a valid FDC3 Context with compulsory 'type' field");
|
|
2489
2509
|
const interopActionSettingsDecoder = object$1({
|
|
2490
2510
|
method: nonEmptyStringDecoder,
|
|
@@ -2701,7 +2721,7 @@ const getWindowIdsOnChannelDataDecoder = object$1({
|
|
|
2701
2721
|
const getWindowIdsOnChannelResultDecoder = object$1({
|
|
2702
2722
|
windowIds: array$1(nonEmptyStringDecoder)
|
|
2703
2723
|
});
|
|
2704
|
-
const channelsOperationTypesDecoder = oneOf$1(constant$1("addChannel"), constant$1("getMyChannel"), constant$1("getWindowIdsOnChannel"), constant$1("getWindowIdsWithChannels"), constant$1("joinChannel"), constant$1("restrict"), constant$1("getRestrictions"), constant$1("restrictAll"));
|
|
2724
|
+
const channelsOperationTypesDecoder = oneOf$1(constant$1("addChannel"), constant$1("getMyChannel"), constant$1("getWindowIdsOnChannel"), constant$1("getWindowIdsWithChannels"), constant$1("joinChannel"), constant$1("restrict"), constant$1("getRestrictions"), constant$1("restrictAll"), constant$1("notifyChannelsChanged"), constant$1("leaveChannel"));
|
|
2705
2725
|
const getMyChanelResultDecoder = object$1({
|
|
2706
2726
|
channel: optional$1(nonEmptyStringDecoder)
|
|
2707
2727
|
});
|
|
@@ -2736,6 +2756,14 @@ const joinChannelDataDecoder = object$1({
|
|
|
2736
2756
|
channel: nonEmptyStringDecoder,
|
|
2737
2757
|
windowId: nonEmptyStringDecoder
|
|
2738
2758
|
});
|
|
2759
|
+
const leaveChannelDataDecoder = object$1({
|
|
2760
|
+
windowId: nonEmptyStringDecoder,
|
|
2761
|
+
channelName: optional$1(nonEmptyStringDecoder)
|
|
2762
|
+
});
|
|
2763
|
+
const channelsChangedDataDecoder = object$1({
|
|
2764
|
+
windowId: nonEmptyStringDecoder,
|
|
2765
|
+
channelNames: array$1(nonEmptyStringDecoder)
|
|
2766
|
+
});
|
|
2739
2767
|
const windowChannelResultDecoder = object$1({
|
|
2740
2768
|
channel: optional$1(nonEmptyStringDecoder),
|
|
2741
2769
|
});
|
|
@@ -2786,6 +2814,7 @@ const operations$9 = {
|
|
|
2786
2814
|
setTitle: { name: "setTitle", dataDecoder: windowTitleConfigDecoder },
|
|
2787
2815
|
focusChange: { name: "focusChange", dataDecoder: focusEventDataDecoder },
|
|
2788
2816
|
getChannel: { name: "getChannel", dataDecoder: simpleWindowDecoder, resultDecoder: windowChannelResultDecoder },
|
|
2817
|
+
notifyChannelsChanged: { name: "notifyChannelsChanged", dataDecoder: channelsChangedDataDecoder }
|
|
2789
2818
|
};
|
|
2790
2819
|
|
|
2791
2820
|
function getDefaultExportFromCjs$1 (x) {
|
|
@@ -2941,6 +2970,9 @@ class WebWindowModel {
|
|
|
2941
2970
|
this.me.isFocused = hasFocus;
|
|
2942
2971
|
this.registry.execute("focus-change", this.me);
|
|
2943
2972
|
}
|
|
2973
|
+
processChannelsChangedEvent(channelNames) {
|
|
2974
|
+
this.registry.execute("channels-changed", channelNames);
|
|
2975
|
+
}
|
|
2944
2976
|
async toApi() {
|
|
2945
2977
|
this.ctxUnsubscribe = await this._bridge.contextLib.subscribe(this.myCtxKey, (data) => this.registry.execute("context-updated", data));
|
|
2946
2978
|
this.me = {
|
|
@@ -2962,6 +2994,7 @@ class WebWindowModel {
|
|
|
2962
2994
|
onContextUpdated: this.onContextUpdated.bind(this),
|
|
2963
2995
|
onFocusChanged: this.onFocusChanged.bind(this),
|
|
2964
2996
|
getChannel: this.getChannel.bind(this),
|
|
2997
|
+
onChannelsChanged: this.onChannelsChanged.bind(this),
|
|
2965
2998
|
};
|
|
2966
2999
|
return this.me;
|
|
2967
3000
|
}
|
|
@@ -3066,9 +3099,12 @@ class WebWindowModel {
|
|
|
3066
3099
|
const result = await this._bridge.send("windows", operations$9.getChannel, { windowId: this.id }, undefined, { includeOperationCheck: true });
|
|
3067
3100
|
return result.channel;
|
|
3068
3101
|
}
|
|
3102
|
+
onChannelsChanged(callback) {
|
|
3103
|
+
return this.registry.add("channels-changed", callback);
|
|
3104
|
+
}
|
|
3069
3105
|
}
|
|
3070
3106
|
|
|
3071
|
-
const
|
|
3107
|
+
const commonOperations = {
|
|
3072
3108
|
operationCheck: { name: "operationCheck", dataDecoder: operationCheckConfigDecoder, resultDecoder: operationCheckResultDecoder },
|
|
3073
3109
|
getWorkspaceWindowFrameBounds: { name: "getWorkspaceWindowFrameBounds", resultDecoder: workspaceFrameBoundsResultDecoder, dataDecoder: simpleItemIdDecoder }
|
|
3074
3110
|
};
|
|
@@ -3081,7 +3117,7 @@ const PromiseWrap = (promise, timeoutMilliseconds, timeoutMessage) => {
|
|
|
3081
3117
|
return;
|
|
3082
3118
|
}
|
|
3083
3119
|
promiseActive = false;
|
|
3084
|
-
const message = timeoutMessage
|
|
3120
|
+
const message = timeoutMessage;
|
|
3085
3121
|
reject(message);
|
|
3086
3122
|
}, timeoutMilliseconds);
|
|
3087
3123
|
promise()
|
|
@@ -3212,6 +3248,7 @@ class WindowsController {
|
|
|
3212
3248
|
operations$9.moveResize.execute = this.handleMoveResize.bind(this);
|
|
3213
3249
|
operations$9.setTitle.execute = this.handleSetTitle.bind(this);
|
|
3214
3250
|
operations$9.getChannel.execute = this.handleGetChannel.bind(this);
|
|
3251
|
+
operations$9.notifyChannelsChanged.execute = this.handleChannelsChanged.bind(this);
|
|
3215
3252
|
}
|
|
3216
3253
|
my() {
|
|
3217
3254
|
return Object.assign({}, this.me);
|
|
@@ -3345,7 +3382,7 @@ class WindowsController {
|
|
|
3345
3382
|
return;
|
|
3346
3383
|
}
|
|
3347
3384
|
try {
|
|
3348
|
-
await this.bridge.send("windows",
|
|
3385
|
+
await this.bridge.send("windows", commonOperations.operationCheck, { operation: "focusChange" });
|
|
3349
3386
|
}
|
|
3350
3387
|
catch (error) {
|
|
3351
3388
|
this.logger.warn("The platform of this client is outdated and does not support focus tracking, disabling focus events for this client.");
|
|
@@ -3401,6 +3438,10 @@ class WindowsController {
|
|
|
3401
3438
|
...(channel ? { channel } : {}),
|
|
3402
3439
|
};
|
|
3403
3440
|
}
|
|
3441
|
+
async handleChannelsChanged(data) {
|
|
3442
|
+
const windowProjection = this.allWindowProjections.find((projection) => projection.id === data.windowId);
|
|
3443
|
+
windowProjection?.model.processChannelsChangedEvent(data.channelNames);
|
|
3444
|
+
}
|
|
3404
3445
|
}
|
|
3405
3446
|
|
|
3406
3447
|
const GlueWebPlatformControlName = "T42.Web.Platform.Control";
|
|
@@ -3493,7 +3534,7 @@ class GlueBridge {
|
|
|
3493
3534
|
}
|
|
3494
3535
|
async checkOperationSupported(domain, operation) {
|
|
3495
3536
|
try {
|
|
3496
|
-
const result = await this.send(domain,
|
|
3537
|
+
const result = await this.send(domain, commonOperations.operationCheck, { operation: operation.name });
|
|
3497
3538
|
return result;
|
|
3498
3539
|
}
|
|
3499
3540
|
catch (error) {
|
|
@@ -4541,7 +4582,7 @@ class IntentsController {
|
|
|
4541
4582
|
}
|
|
4542
4583
|
async isRaiseOperationSupported() {
|
|
4543
4584
|
try {
|
|
4544
|
-
const { isSupported } = await this.bridge.send("intents",
|
|
4585
|
+
const { isSupported } = await this.bridge.send("intents", commonOperations.operationCheck, { operation: "raise" });
|
|
4545
4586
|
return {
|
|
4546
4587
|
supported: isSupported,
|
|
4547
4588
|
reason: isSupported ? "" : "The platform of this client is outdated and does not support \"raise\" operation"
|
|
@@ -4775,7 +4816,10 @@ const operations$4 = {
|
|
|
4775
4816
|
joinChannel: { name: "joinChannel", dataDecoder: joinChannelDataDecoder },
|
|
4776
4817
|
restrict: { name: "restrict", dataDecoder: restrictionConfigDataDecoder },
|
|
4777
4818
|
getRestrictions: { name: "getRestrictions", dataDecoder: getRestrictionsDataDecoder, resultDecoder: restrictionsDecoder },
|
|
4778
|
-
restrictAll: { name: "restrictAll", dataDecoder: restrictAllDataDecoder }
|
|
4819
|
+
restrictAll: { name: "restrictAll", dataDecoder: restrictAllDataDecoder },
|
|
4820
|
+
notifyChannelsChanged: { name: "notifyChannelsChanged", dataDecoder: channelsChangedDataDecoder },
|
|
4821
|
+
leaveChannel: { name: "leaveChannel", dataDecoder: leaveChannelDataDecoder },
|
|
4822
|
+
requestChannelSelector: { name: "requestChannelSelector", dataDecoder: requestChannelSelectorConfigDecoder }
|
|
4779
4823
|
};
|
|
4780
4824
|
|
|
4781
4825
|
class ChannelsController {
|
|
@@ -4796,6 +4840,7 @@ class ChannelsController {
|
|
|
4796
4840
|
addOperationsExecutors() {
|
|
4797
4841
|
operations$4.getMyChannel.execute = this.handleGetMyChannel.bind(this);
|
|
4798
4842
|
operations$4.joinChannel.execute = this.handleJoinChannel.bind(this);
|
|
4843
|
+
operations$4.leaveChannel.execute = this.handleLeaveChannel.bind(this);
|
|
4799
4844
|
operations$4.restrict.execute = ({ config }) => this.restrict(config);
|
|
4800
4845
|
operations$4.getRestrictions.execute = ({ windowId }) => this.getRestrictions(windowId);
|
|
4801
4846
|
operations$4.restrictAll.execute = ({ restrictions }) => this.restrictAll(restrictions);
|
|
@@ -4812,6 +4857,14 @@ class ChannelsController {
|
|
|
4812
4857
|
const api = this.toApi();
|
|
4813
4858
|
coreGlue.channels = api;
|
|
4814
4859
|
}
|
|
4860
|
+
async postStart(io, ioc) {
|
|
4861
|
+
try {
|
|
4862
|
+
await this.requestChannelSelector(io.appManager.myInstance);
|
|
4863
|
+
}
|
|
4864
|
+
catch (error) {
|
|
4865
|
+
this.logger.warn(`Failed to display channel selector: ${extractErrorMsg(error)}`);
|
|
4866
|
+
}
|
|
4867
|
+
}
|
|
4815
4868
|
async handleBridgeMessage(args) {
|
|
4816
4869
|
const operationName = runDecoderWithIOError(channelsOperationTypesDecoder, args.operation);
|
|
4817
4870
|
const operation = operations$4[operationName];
|
|
@@ -4853,8 +4906,17 @@ class ChannelsController {
|
|
|
4853
4906
|
onChanged(callback) {
|
|
4854
4907
|
return this.changed(callback);
|
|
4855
4908
|
}
|
|
4856
|
-
async leave() {
|
|
4857
|
-
|
|
4909
|
+
async leave(config = {}) {
|
|
4910
|
+
runDecoderWithIOError(leaveChannelsConfig, config);
|
|
4911
|
+
if (!config.windowId || config.windowId === this.windowsController.my().id) {
|
|
4912
|
+
await this.switchToChannel();
|
|
4913
|
+
return;
|
|
4914
|
+
}
|
|
4915
|
+
const leaveData = { windowId: config.windowId, channelName: config.channel };
|
|
4916
|
+
await this.bridge.send("channels", operations$4.leaveChannel, leaveData, undefined, { includeOperationCheck: true });
|
|
4917
|
+
}
|
|
4918
|
+
handleLeaveChannel(data) {
|
|
4919
|
+
return this.leave({ channel: data.channelName });
|
|
4858
4920
|
}
|
|
4859
4921
|
toApi() {
|
|
4860
4922
|
const api = {
|
|
@@ -4907,6 +4969,17 @@ class ChannelsController {
|
|
|
4907
4969
|
}
|
|
4908
4970
|
this.registry.execute(this.ChangedKey, name);
|
|
4909
4971
|
this.sessionController.setWindowData({ currentName: name }, "channels");
|
|
4972
|
+
const windowId = this.windowsController.my().id;
|
|
4973
|
+
if (!windowId) {
|
|
4974
|
+
return;
|
|
4975
|
+
}
|
|
4976
|
+
const channelNames = this.currentChannelName ? [this.currentChannelName] : [];
|
|
4977
|
+
try {
|
|
4978
|
+
await this.bridge.send("channels", operations$4.notifyChannelsChanged, { channelNames: channelNames, windowId }, undefined, { includeOperationCheck: true });
|
|
4979
|
+
}
|
|
4980
|
+
catch (error) {
|
|
4981
|
+
this.logger.warn(`Failed to notify channel changed: ${extractErrorMsg(error)}`);
|
|
4982
|
+
}
|
|
4910
4983
|
}
|
|
4911
4984
|
async updateData(name, data) {
|
|
4912
4985
|
const contextName = this.createContextName(name);
|
|
@@ -5275,6 +5348,25 @@ class ChannelsController {
|
|
|
5275
5348
|
const fdc3Data = { type: searchedType, ...context.data[`fdc3_${latestFdc3TypeEncoded}`] };
|
|
5276
5349
|
callback({ fdc3: fdc3Data }, context, updaterId);
|
|
5277
5350
|
}
|
|
5351
|
+
async requestChannelSelector(myInstance) {
|
|
5352
|
+
if (!myInstance) {
|
|
5353
|
+
return;
|
|
5354
|
+
}
|
|
5355
|
+
const myApplicationData = myInstance.application;
|
|
5356
|
+
const myAppDetails = myApplicationData.userProperties?.details;
|
|
5357
|
+
if (!myAppDetails) {
|
|
5358
|
+
return;
|
|
5359
|
+
}
|
|
5360
|
+
if (!myAppDetails?.channelSelector?.enabled) {
|
|
5361
|
+
return;
|
|
5362
|
+
}
|
|
5363
|
+
const { channels: channelsStorageData } = this.sessionController.getWindowData();
|
|
5364
|
+
const channelName = channelsStorageData?.currentName;
|
|
5365
|
+
const windowId = myInstance.id;
|
|
5366
|
+
const channelsNames = channelName ? [channelName] : [];
|
|
5367
|
+
const requestChannelSelectorConfig = { windowId, channelsNames };
|
|
5368
|
+
await this.bridge.send("channels", operations$4.requestChannelSelector, requestChannelSelectorConfig, undefined, { includeOperationCheck: true });
|
|
5369
|
+
}
|
|
5278
5370
|
}
|
|
5279
5371
|
|
|
5280
5372
|
const operations$3 = {
|
|
@@ -5869,8 +5961,8 @@ class LegacyIntentsHelper {
|
|
|
5869
5961
|
}
|
|
5870
5962
|
async tryGetWorkspaceBasedBounds() {
|
|
5871
5963
|
try {
|
|
5872
|
-
await this.bridge.send("workspaces",
|
|
5873
|
-
const bridgeResponse = await this.bridge.send("workspaces",
|
|
5964
|
+
await this.bridge.send("workspaces", commonOperations.operationCheck, { operation: "getWorkspaceWindowFrameBounds" });
|
|
5965
|
+
const bridgeResponse = await this.bridge.send("workspaces", commonOperations.getWorkspaceWindowFrameBounds, { itemId: this.windowsController.my().id });
|
|
5874
5966
|
const myWorkspaceBounds = bridgeResponse.bounds;
|
|
5875
5967
|
this.logger.trace(`Opening the resolver UI relative to my workspace frame window bounds: ${JSON.stringify(myWorkspaceBounds)}`);
|
|
5876
5968
|
return myWorkspaceBounds;
|
|
@@ -6372,7 +6464,7 @@ class IoC {
|
|
|
6372
6464
|
}
|
|
6373
6465
|
}
|
|
6374
6466
|
|
|
6375
|
-
var version$1 = "3.4.
|
|
6467
|
+
var version$1 = "3.4.7";
|
|
6376
6468
|
|
|
6377
6469
|
const createFactoryFunction = (coreFactoryFunction) => {
|
|
6378
6470
|
let cachedApiPromise;
|
|
@@ -6393,6 +6485,7 @@ const createFactoryFunction = (coreFactoryFunction) => {
|
|
|
6393
6485
|
logger.trace("all libraries were started");
|
|
6394
6486
|
ioc.eventsDispatcher.start(glue);
|
|
6395
6487
|
logger.trace("start event dispatched, glue is ready, returning it");
|
|
6488
|
+
await Promise.all(Object.values(ioc.controllers).map((controller) => controller.postStart ? controller.postStart(glue, ioc) : Promise.resolve()));
|
|
6396
6489
|
return glue;
|
|
6397
6490
|
}
|
|
6398
6491
|
catch (error) {
|
|
@@ -9755,10 +9848,6 @@ lodash_clonedeep.exports;
|
|
|
9755
9848
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
9756
9849
|
var index = -1,
|
|
9757
9850
|
length = array ? array.length : 0;
|
|
9758
|
-
|
|
9759
|
-
if (initAccum && length) {
|
|
9760
|
-
accumulator = array[++index];
|
|
9761
|
-
}
|
|
9762
9851
|
while (++index < length) {
|
|
9763
9852
|
accumulator = iteratee(accumulator, array[index], index, array);
|
|
9764
9853
|
}
|
|
@@ -10344,7 +10433,7 @@ lodash_clonedeep.exports;
|
|
|
10344
10433
|
skipIndexes = !!length;
|
|
10345
10434
|
|
|
10346
10435
|
for (var key in value) {
|
|
10347
|
-
if ((
|
|
10436
|
+
if ((hasOwnProperty.call(value, key)) &&
|
|
10348
10437
|
!(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
|
10349
10438
|
result.push(key);
|
|
10350
10439
|
}
|
|
@@ -10697,9 +10786,7 @@ lodash_clonedeep.exports;
|
|
|
10697
10786
|
while (++index < length) {
|
|
10698
10787
|
var key = props[index];
|
|
10699
10788
|
|
|
10700
|
-
var newValue =
|
|
10701
|
-
? customizer(object[key], source[key], key, object, source)
|
|
10702
|
-
: undefined;
|
|
10789
|
+
var newValue = undefined;
|
|
10703
10790
|
|
|
10704
10791
|
assignValue(object, key, newValue === undefined ? source[key] : newValue);
|
|
10705
10792
|
}
|