@interopio/desktop 6.7.0 → 6.8.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.
- package/changelog.md +5 -1
- package/desktop.d.ts +58 -1
- package/dist/desktop.browser.js +114 -5
- package/dist/desktop.browser.js.map +1 -1
- package/dist/desktop.browser.min.js +1 -1
- package/dist/desktop.browser.min.js.map +1 -1
- package/dist/desktop.es.js +114 -5
- package/dist/desktop.es.js.map +1 -1
- package/dist/desktop.umd.js +114 -5
- package/dist/desktop.umd.js.map +1 -1
- package/dist/desktop.umd.min.js +1 -1
- package/dist/desktop.umd.min.js.map +1 -1
- package/package.json +5 -4
package/dist/desktop.es.js
CHANGED
|
@@ -2927,7 +2927,7 @@ const ContextMessageReplaySpec = {
|
|
|
2927
2927
|
}
|
|
2928
2928
|
};
|
|
2929
2929
|
|
|
2930
|
-
var version$1 = "6.4.
|
|
2930
|
+
var version$1 = "6.4.2";
|
|
2931
2931
|
|
|
2932
2932
|
function prepareConfig$1 (configuration, ext, glue42gd) {
|
|
2933
2933
|
let nodeStartingContext;
|
|
@@ -6158,6 +6158,10 @@ class Client {
|
|
|
6158
6158
|
return [];
|
|
6159
6159
|
}
|
|
6160
6160
|
instanceMatch(instanceFilter, instanceDefinition) {
|
|
6161
|
+
if (instanceFilter?.peerId && instanceFilter?.instance) {
|
|
6162
|
+
instanceFilter = { ...instanceFilter };
|
|
6163
|
+
delete instanceFilter.peerId;
|
|
6164
|
+
}
|
|
6161
6165
|
return this.containsProps(instanceFilter, instanceDefinition);
|
|
6162
6166
|
}
|
|
6163
6167
|
methodMatch(methodFilter, methodDefinition) {
|
|
@@ -13155,6 +13159,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
13155
13159
|
let _frameId = options.frameId;
|
|
13156
13160
|
let _isLocked = options.isLocked;
|
|
13157
13161
|
let _allowWorkspaceDrop = options.allowWorkspaceDrop;
|
|
13162
|
+
let _isPinned = options.isPinned;
|
|
13158
13163
|
let _group;
|
|
13159
13164
|
let _frameButtons = (_d = options.frameButtons) !== null && _d !== void 0 ? _d : [];
|
|
13160
13165
|
let _zoomFactor = options.zoomFactor;
|
|
@@ -13274,6 +13279,12 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
13274
13279
|
}
|
|
13275
13280
|
return executor.setAllowWorkspaceDrop(resultWindow, allowWorkspaceDrop);
|
|
13276
13281
|
}
|
|
13282
|
+
function pin() {
|
|
13283
|
+
return executor.pin(resultWindow);
|
|
13284
|
+
}
|
|
13285
|
+
function unpin() {
|
|
13286
|
+
return executor.unpin(resultWindow);
|
|
13287
|
+
}
|
|
13277
13288
|
function moveResize(bounds, success, error) {
|
|
13278
13289
|
return Utils.callbackifyPromise(() => {
|
|
13279
13290
|
if (isUndefinedOrNull(bounds)) {
|
|
@@ -13641,6 +13652,16 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
13641
13652
|
async function clone(cloneOptions) {
|
|
13642
13653
|
return executor.clone(resultWindow, cloneOptions);
|
|
13643
13654
|
}
|
|
13655
|
+
async function executeCode(code) {
|
|
13656
|
+
if (!code) {
|
|
13657
|
+
throw new Error("Code argument is missing");
|
|
13658
|
+
}
|
|
13659
|
+
if (typeof code !== "string") {
|
|
13660
|
+
throw new Error("Code argument must be a valid string");
|
|
13661
|
+
}
|
|
13662
|
+
const response = await executor.executeCode(resultWindow, code);
|
|
13663
|
+
return response.result;
|
|
13664
|
+
}
|
|
13644
13665
|
function onTitleChanged(callback) {
|
|
13645
13666
|
if (!isFunction(callback)) {
|
|
13646
13667
|
throw new Error("callback should be a function");
|
|
@@ -13753,6 +13774,12 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
13753
13774
|
function onTabSelectionChanged(callback) {
|
|
13754
13775
|
return onEventCore("tab-selection-changed", callback);
|
|
13755
13776
|
}
|
|
13777
|
+
function onChannelRestrictionsChanged(callback) {
|
|
13778
|
+
if (!isFunction(callback)) {
|
|
13779
|
+
throw new Error("callback must be a function");
|
|
13780
|
+
}
|
|
13781
|
+
return onEventCore("channel-restrictions-changed", callback);
|
|
13782
|
+
}
|
|
13756
13783
|
function onClosing(callback) {
|
|
13757
13784
|
if (!isFunction(callback)) {
|
|
13758
13785
|
throw new Error("callback must be a function");
|
|
@@ -13857,6 +13884,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
13857
13884
|
_frameId = updated.frameId;
|
|
13858
13885
|
_isLocked = updated.isLocked;
|
|
13859
13886
|
_allowWorkspaceDrop = updated.allowWorkspaceDrop;
|
|
13887
|
+
_isPinned = updated.isPinned;
|
|
13860
13888
|
_zoomFactor = updated.zoomFactor;
|
|
13861
13889
|
_placementSettings = updated.placementSettings;
|
|
13862
13890
|
}
|
|
@@ -13980,6 +14008,10 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
13980
14008
|
_allowWorkspaceDrop = allowWorkspaceDrop;
|
|
13981
14009
|
_registry.execute("allow-workspace-drop-changed", resultWindow);
|
|
13982
14010
|
}
|
|
14011
|
+
function handleIsPinnedChanged(isPinned) {
|
|
14012
|
+
_isPinned = isPinned;
|
|
14013
|
+
_registry.execute("is-pinned-changed", resultWindow);
|
|
14014
|
+
}
|
|
13983
14015
|
function handleGroupHeaderVisibilityChanged(isGroupHeaderVisible) {
|
|
13984
14016
|
_isGroupHeaderVisible = isGroupHeaderVisible;
|
|
13985
14017
|
}
|
|
@@ -14072,6 +14104,9 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
14072
14104
|
claimScreenArea: data.claimScreenArea
|
|
14073
14105
|
});
|
|
14074
14106
|
}
|
|
14107
|
+
function handleChannelRestrictionsChanged(data) {
|
|
14108
|
+
_registry.execute("channel-restrictions-changed", data);
|
|
14109
|
+
}
|
|
14075
14110
|
function handleGroupChanged(newGroup, oldGroup) {
|
|
14076
14111
|
_group = newGroup;
|
|
14077
14112
|
_groupId = newGroup === null || newGroup === void 0 ? void 0 : newGroup.id;
|
|
@@ -14320,6 +14355,9 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
14320
14355
|
get allowWorkspaceDrop() {
|
|
14321
14356
|
return _allowWorkspaceDrop;
|
|
14322
14357
|
},
|
|
14358
|
+
get isPinned() {
|
|
14359
|
+
return _isPinned;
|
|
14360
|
+
},
|
|
14323
14361
|
maximize,
|
|
14324
14362
|
restore,
|
|
14325
14363
|
minimize,
|
|
@@ -14371,6 +14409,8 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
14371
14409
|
flashTab,
|
|
14372
14410
|
setSticky,
|
|
14373
14411
|
setAllowWorkspaceDrop,
|
|
14412
|
+
pin,
|
|
14413
|
+
unpin,
|
|
14374
14414
|
print,
|
|
14375
14415
|
printToPDF,
|
|
14376
14416
|
place,
|
|
@@ -14384,6 +14424,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
14384
14424
|
getDockingPlacement,
|
|
14385
14425
|
dock,
|
|
14386
14426
|
clone,
|
|
14427
|
+
executeCode,
|
|
14387
14428
|
getChannel: async () => {
|
|
14388
14429
|
var _a;
|
|
14389
14430
|
const wins = await getChannels().getWindowsWithChannels({ windowIds: [_id] });
|
|
@@ -14423,6 +14464,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
14423
14464
|
onNeighboursChanged,
|
|
14424
14465
|
onDockingChanged,
|
|
14425
14466
|
onNavigating,
|
|
14467
|
+
onChannelRestrictionsChanged,
|
|
14426
14468
|
get tabs() {
|
|
14427
14469
|
return getAllTabs();
|
|
14428
14470
|
},
|
|
@@ -14503,6 +14545,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
14503
14545
|
handleFrameSelectionChanged,
|
|
14504
14546
|
handleCompositionChanged,
|
|
14505
14547
|
handleAllowWorkspaceDropChanged,
|
|
14548
|
+
handleIsPinnedChanged,
|
|
14506
14549
|
handleGroupHeaderVisibilityChanged,
|
|
14507
14550
|
handleTabHeaderVisibilityChanged,
|
|
14508
14551
|
handleGroupChanged,
|
|
@@ -14513,7 +14556,8 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
|
|
|
14513
14556
|
handleZoomFactorChanged,
|
|
14514
14557
|
handleIsStickyChanged,
|
|
14515
14558
|
handlePlacementSettingsChanged,
|
|
14516
|
-
handleDockingChanged
|
|
14559
|
+
handleDockingChanged,
|
|
14560
|
+
handleChannelRestrictionsChanged
|
|
14517
14561
|
};
|
|
14518
14562
|
const groupArgs = {
|
|
14519
14563
|
get isGroupHibernated() {
|
|
@@ -14724,6 +14768,20 @@ class GDExecutor {
|
|
|
14724
14768
|
await this.execute("setAllowWorkspaceDrop", options);
|
|
14725
14769
|
return w;
|
|
14726
14770
|
}
|
|
14771
|
+
async pin(windowToPin) {
|
|
14772
|
+
const options = {
|
|
14773
|
+
windowId: windowToPin.id
|
|
14774
|
+
};
|
|
14775
|
+
await this.execute("pinTab", options);
|
|
14776
|
+
return windowToPin;
|
|
14777
|
+
}
|
|
14778
|
+
async unpin(pinnedWindow) {
|
|
14779
|
+
const options = {
|
|
14780
|
+
windowId: pinnedWindow.id
|
|
14781
|
+
};
|
|
14782
|
+
await this.execute("unpinTab", options);
|
|
14783
|
+
return pinnedWindow;
|
|
14784
|
+
}
|
|
14727
14785
|
async moveResize(w, bounds) {
|
|
14728
14786
|
if (typeof window !== "undefined" && window.glueDesktop.versionNum < 31200) {
|
|
14729
14787
|
return new Promise(async (res, rej) => {
|
|
@@ -15240,6 +15298,15 @@ class GDExecutor {
|
|
|
15240
15298
|
const win = await windowStore.waitFor(result.id);
|
|
15241
15299
|
return win.API;
|
|
15242
15300
|
}
|
|
15301
|
+
async executeCode(targetWindow, code) {
|
|
15302
|
+
const args = {
|
|
15303
|
+
windowId: targetWindow.id,
|
|
15304
|
+
options: {
|
|
15305
|
+
code
|
|
15306
|
+
}
|
|
15307
|
+
};
|
|
15308
|
+
return this.execute("executeCode", args);
|
|
15309
|
+
}
|
|
15243
15310
|
async goBack(resultWindow) {
|
|
15244
15311
|
await this.execute("goBack", { windowId: resultWindow.id });
|
|
15245
15312
|
}
|
|
@@ -15775,6 +15842,12 @@ class GDEnvironment {
|
|
|
15775
15842
|
if (windowInfo.type === "AllowWorkspaceDropChanged") {
|
|
15776
15843
|
theWindowEvents.handleAllowWorkspaceDropChanged(windowInfo.data);
|
|
15777
15844
|
}
|
|
15845
|
+
if (windowInfo.type === "IsPinnedChanged") {
|
|
15846
|
+
theWindowEvents.handleIsPinnedChanged(windowInfo.data);
|
|
15847
|
+
}
|
|
15848
|
+
if (windowInfo.type === "WindowChannelRestrictionsChanged") {
|
|
15849
|
+
theWindowEvents.handleChannelRestrictionsChanged(windowInfo.data);
|
|
15850
|
+
}
|
|
15778
15851
|
this._registry.execute("window-event", extendedStreamEvent);
|
|
15779
15852
|
}
|
|
15780
15853
|
createWindow(windowId, options) {
|
|
@@ -15831,7 +15904,8 @@ class GDEnvironment {
|
|
|
15831
15904
|
frameButtons: args.frameButtons,
|
|
15832
15905
|
jumpListOptions: args.jumpList,
|
|
15833
15906
|
applicationName: args.applicationName,
|
|
15834
|
-
allowWorkspaceDrop: args.allowWorkspaceDrop
|
|
15907
|
+
allowWorkspaceDrop: args.allowWorkspaceDrop,
|
|
15908
|
+
isPinned: args.isPinned
|
|
15835
15909
|
};
|
|
15836
15910
|
}
|
|
15837
15911
|
mapToGroupCreationArgs(args) {
|
|
@@ -18350,7 +18424,7 @@ function factory$3(agm) {
|
|
|
18350
18424
|
};
|
|
18351
18425
|
}
|
|
18352
18426
|
|
|
18353
|
-
var version = "6.
|
|
18427
|
+
var version = "6.8.1";
|
|
18354
18428
|
|
|
18355
18429
|
var prepareConfig = (options) => {
|
|
18356
18430
|
function getLibConfig(value, defaultMode, trueMode) {
|
|
@@ -18685,12 +18759,26 @@ class Notifications {
|
|
|
18685
18759
|
}
|
|
18686
18760
|
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "clear", data: { id } });
|
|
18687
18761
|
}
|
|
18762
|
+
async clearMany(notifications) {
|
|
18763
|
+
this.validateNotificationsArr(notifications);
|
|
18764
|
+
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "clearMany", data: { notifications } });
|
|
18765
|
+
}
|
|
18688
18766
|
async click(id, action, options) {
|
|
18689
18767
|
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "click", data: { id, action, options } });
|
|
18690
18768
|
}
|
|
18691
18769
|
async snooze(id, duration) {
|
|
18692
18770
|
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "snooze", data: { id, duration } });
|
|
18693
18771
|
}
|
|
18772
|
+
async snoozeMany(notifications, duration) {
|
|
18773
|
+
if (!duration) {
|
|
18774
|
+
throw new Error("The 'duration' argument cannot be null or undefined");
|
|
18775
|
+
}
|
|
18776
|
+
if (typeof duration !== "number") {
|
|
18777
|
+
throw new Error("The 'duration' argument must be a valid number");
|
|
18778
|
+
}
|
|
18779
|
+
this.validateNotificationsArr(notifications);
|
|
18780
|
+
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "snoozeMany", data: { notifications, duration } });
|
|
18781
|
+
}
|
|
18694
18782
|
async setState(id, state) {
|
|
18695
18783
|
if (!id) {
|
|
18696
18784
|
throw new Error("The 'id' argument cannot be null or undefined");
|
|
@@ -18704,6 +18792,16 @@ class Notifications {
|
|
|
18704
18792
|
this.validateState(state);
|
|
18705
18793
|
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "updateState", data: { id, state } });
|
|
18706
18794
|
}
|
|
18795
|
+
async setStates(notifications, state) {
|
|
18796
|
+
if (!state) {
|
|
18797
|
+
throw new Error("The 'state' argument cannot be null or undefined");
|
|
18798
|
+
}
|
|
18799
|
+
if (typeof state !== "string") {
|
|
18800
|
+
throw new Error("The 'state' argument must be a valid string");
|
|
18801
|
+
}
|
|
18802
|
+
this.validateNotificationsArr(notifications);
|
|
18803
|
+
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "updateStates", data: { notifications, state } });
|
|
18804
|
+
}
|
|
18707
18805
|
toAPI() {
|
|
18708
18806
|
return {
|
|
18709
18807
|
maxActions: this.maxActions,
|
|
@@ -18726,7 +18824,10 @@ class Notifications {
|
|
|
18726
18824
|
click: this.click.bind(this),
|
|
18727
18825
|
setState: this.setState.bind(this),
|
|
18728
18826
|
updateData: this.updateData.bind(this),
|
|
18729
|
-
snooze: this.snooze.bind(this)
|
|
18827
|
+
snooze: this.snooze.bind(this),
|
|
18828
|
+
snoozeMany: this.snoozeMany.bind(this),
|
|
18829
|
+
clearMany: this.clearMany.bind(this),
|
|
18830
|
+
setStates: this.setStates.bind(this)
|
|
18730
18831
|
};
|
|
18731
18832
|
}
|
|
18732
18833
|
onStreamEventCore(key, callback) {
|
|
@@ -19108,6 +19209,14 @@ class Notifications {
|
|
|
19108
19209
|
this.subscriptionForCounter = undefined;
|
|
19109
19210
|
}
|
|
19110
19211
|
}
|
|
19212
|
+
validateNotificationsArr(notifications) {
|
|
19213
|
+
if (!Array.isArray(notifications)) {
|
|
19214
|
+
throw new Error("The 'notifications' argument must be an array with valid notification IDs");
|
|
19215
|
+
}
|
|
19216
|
+
if (notifications.some((n) => typeof n !== "string")) {
|
|
19217
|
+
throw new Error("The 'notifications' argument must contain only valid string notification IDs");
|
|
19218
|
+
}
|
|
19219
|
+
}
|
|
19111
19220
|
}
|
|
19112
19221
|
|
|
19113
19222
|
const ThemesConfigurationMethodName = "T42.Themes.Configuration";
|