@interopio/desktop 6.7.0 → 6.8.0
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 +3 -1
- package/desktop.d.ts +58 -1
- package/dist/desktop.browser.js +110 -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 +110 -5
- package/dist/desktop.es.js.map +1 -1
- package/dist/desktop.umd.js +110 -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.umd.js
CHANGED
|
@@ -2933,7 +2933,7 @@
|
|
|
2933
2933
|
}
|
|
2934
2934
|
};
|
|
2935
2935
|
|
|
2936
|
-
var version$1 = "6.4.
|
|
2936
|
+
var version$1 = "6.4.1";
|
|
2937
2937
|
|
|
2938
2938
|
function prepareConfig$1 (configuration, ext, glue42gd) {
|
|
2939
2939
|
let nodeStartingContext;
|
|
@@ -13161,6 +13161,7 @@
|
|
|
13161
13161
|
let _frameId = options.frameId;
|
|
13162
13162
|
let _isLocked = options.isLocked;
|
|
13163
13163
|
let _allowWorkspaceDrop = options.allowWorkspaceDrop;
|
|
13164
|
+
let _isPinned = options.isPinned;
|
|
13164
13165
|
let _group;
|
|
13165
13166
|
let _frameButtons = (_d = options.frameButtons) !== null && _d !== void 0 ? _d : [];
|
|
13166
13167
|
let _zoomFactor = options.zoomFactor;
|
|
@@ -13280,6 +13281,12 @@
|
|
|
13280
13281
|
}
|
|
13281
13282
|
return executor.setAllowWorkspaceDrop(resultWindow, allowWorkspaceDrop);
|
|
13282
13283
|
}
|
|
13284
|
+
function pin() {
|
|
13285
|
+
return executor.pin(resultWindow);
|
|
13286
|
+
}
|
|
13287
|
+
function unpin() {
|
|
13288
|
+
return executor.unpin(resultWindow);
|
|
13289
|
+
}
|
|
13283
13290
|
function moveResize(bounds, success, error) {
|
|
13284
13291
|
return Utils.callbackifyPromise(() => {
|
|
13285
13292
|
if (isUndefinedOrNull(bounds)) {
|
|
@@ -13647,6 +13654,16 @@
|
|
|
13647
13654
|
async function clone(cloneOptions) {
|
|
13648
13655
|
return executor.clone(resultWindow, cloneOptions);
|
|
13649
13656
|
}
|
|
13657
|
+
async function executeCode(code) {
|
|
13658
|
+
if (!code) {
|
|
13659
|
+
throw new Error("Code argument is missing");
|
|
13660
|
+
}
|
|
13661
|
+
if (typeof code !== "string") {
|
|
13662
|
+
throw new Error("Code argument must be a valid string");
|
|
13663
|
+
}
|
|
13664
|
+
const response = await executor.executeCode(resultWindow, code);
|
|
13665
|
+
return response.result;
|
|
13666
|
+
}
|
|
13650
13667
|
function onTitleChanged(callback) {
|
|
13651
13668
|
if (!isFunction(callback)) {
|
|
13652
13669
|
throw new Error("callback should be a function");
|
|
@@ -13759,6 +13776,12 @@
|
|
|
13759
13776
|
function onTabSelectionChanged(callback) {
|
|
13760
13777
|
return onEventCore("tab-selection-changed", callback);
|
|
13761
13778
|
}
|
|
13779
|
+
function onChannelRestrictionsChanged(callback) {
|
|
13780
|
+
if (!isFunction(callback)) {
|
|
13781
|
+
throw new Error("callback must be a function");
|
|
13782
|
+
}
|
|
13783
|
+
return onEventCore("channel-restrictions-changed", callback);
|
|
13784
|
+
}
|
|
13762
13785
|
function onClosing(callback) {
|
|
13763
13786
|
if (!isFunction(callback)) {
|
|
13764
13787
|
throw new Error("callback must be a function");
|
|
@@ -13863,6 +13886,7 @@
|
|
|
13863
13886
|
_frameId = updated.frameId;
|
|
13864
13887
|
_isLocked = updated.isLocked;
|
|
13865
13888
|
_allowWorkspaceDrop = updated.allowWorkspaceDrop;
|
|
13889
|
+
_isPinned = updated.isPinned;
|
|
13866
13890
|
_zoomFactor = updated.zoomFactor;
|
|
13867
13891
|
_placementSettings = updated.placementSettings;
|
|
13868
13892
|
}
|
|
@@ -13986,6 +14010,10 @@
|
|
|
13986
14010
|
_allowWorkspaceDrop = allowWorkspaceDrop;
|
|
13987
14011
|
_registry.execute("allow-workspace-drop-changed", resultWindow);
|
|
13988
14012
|
}
|
|
14013
|
+
function handleIsPinnedChanged(isPinned) {
|
|
14014
|
+
_isPinned = isPinned;
|
|
14015
|
+
_registry.execute("is-pinned-changed", resultWindow);
|
|
14016
|
+
}
|
|
13989
14017
|
function handleGroupHeaderVisibilityChanged(isGroupHeaderVisible) {
|
|
13990
14018
|
_isGroupHeaderVisible = isGroupHeaderVisible;
|
|
13991
14019
|
}
|
|
@@ -14078,6 +14106,9 @@
|
|
|
14078
14106
|
claimScreenArea: data.claimScreenArea
|
|
14079
14107
|
});
|
|
14080
14108
|
}
|
|
14109
|
+
function handleChannelRestrictionsChanged(data) {
|
|
14110
|
+
_registry.execute("channel-restrictions-changed", data);
|
|
14111
|
+
}
|
|
14081
14112
|
function handleGroupChanged(newGroup, oldGroup) {
|
|
14082
14113
|
_group = newGroup;
|
|
14083
14114
|
_groupId = newGroup === null || newGroup === void 0 ? void 0 : newGroup.id;
|
|
@@ -14326,6 +14357,9 @@
|
|
|
14326
14357
|
get allowWorkspaceDrop() {
|
|
14327
14358
|
return _allowWorkspaceDrop;
|
|
14328
14359
|
},
|
|
14360
|
+
get isPinned() {
|
|
14361
|
+
return _isPinned;
|
|
14362
|
+
},
|
|
14329
14363
|
maximize,
|
|
14330
14364
|
restore,
|
|
14331
14365
|
minimize,
|
|
@@ -14377,6 +14411,8 @@
|
|
|
14377
14411
|
flashTab,
|
|
14378
14412
|
setSticky,
|
|
14379
14413
|
setAllowWorkspaceDrop,
|
|
14414
|
+
pin,
|
|
14415
|
+
unpin,
|
|
14380
14416
|
print,
|
|
14381
14417
|
printToPDF,
|
|
14382
14418
|
place,
|
|
@@ -14390,6 +14426,7 @@
|
|
|
14390
14426
|
getDockingPlacement,
|
|
14391
14427
|
dock,
|
|
14392
14428
|
clone,
|
|
14429
|
+
executeCode,
|
|
14393
14430
|
getChannel: async () => {
|
|
14394
14431
|
var _a;
|
|
14395
14432
|
const wins = await getChannels().getWindowsWithChannels({ windowIds: [_id] });
|
|
@@ -14429,6 +14466,7 @@
|
|
|
14429
14466
|
onNeighboursChanged,
|
|
14430
14467
|
onDockingChanged,
|
|
14431
14468
|
onNavigating,
|
|
14469
|
+
onChannelRestrictionsChanged,
|
|
14432
14470
|
get tabs() {
|
|
14433
14471
|
return getAllTabs();
|
|
14434
14472
|
},
|
|
@@ -14509,6 +14547,7 @@
|
|
|
14509
14547
|
handleFrameSelectionChanged,
|
|
14510
14548
|
handleCompositionChanged,
|
|
14511
14549
|
handleAllowWorkspaceDropChanged,
|
|
14550
|
+
handleIsPinnedChanged,
|
|
14512
14551
|
handleGroupHeaderVisibilityChanged,
|
|
14513
14552
|
handleTabHeaderVisibilityChanged,
|
|
14514
14553
|
handleGroupChanged,
|
|
@@ -14519,7 +14558,8 @@
|
|
|
14519
14558
|
handleZoomFactorChanged,
|
|
14520
14559
|
handleIsStickyChanged,
|
|
14521
14560
|
handlePlacementSettingsChanged,
|
|
14522
|
-
handleDockingChanged
|
|
14561
|
+
handleDockingChanged,
|
|
14562
|
+
handleChannelRestrictionsChanged
|
|
14523
14563
|
};
|
|
14524
14564
|
const groupArgs = {
|
|
14525
14565
|
get isGroupHibernated() {
|
|
@@ -14730,6 +14770,20 @@
|
|
|
14730
14770
|
await this.execute("setAllowWorkspaceDrop", options);
|
|
14731
14771
|
return w;
|
|
14732
14772
|
}
|
|
14773
|
+
async pin(windowToPin) {
|
|
14774
|
+
const options = {
|
|
14775
|
+
windowId: windowToPin.id
|
|
14776
|
+
};
|
|
14777
|
+
await this.execute("pinTab", options);
|
|
14778
|
+
return windowToPin;
|
|
14779
|
+
}
|
|
14780
|
+
async unpin(pinnedWindow) {
|
|
14781
|
+
const options = {
|
|
14782
|
+
windowId: pinnedWindow.id
|
|
14783
|
+
};
|
|
14784
|
+
await this.execute("unpinTab", options);
|
|
14785
|
+
return pinnedWindow;
|
|
14786
|
+
}
|
|
14733
14787
|
async moveResize(w, bounds) {
|
|
14734
14788
|
if (typeof window !== "undefined" && window.glueDesktop.versionNum < 31200) {
|
|
14735
14789
|
return new Promise(async (res, rej) => {
|
|
@@ -15246,6 +15300,15 @@
|
|
|
15246
15300
|
const win = await windowStore.waitFor(result.id);
|
|
15247
15301
|
return win.API;
|
|
15248
15302
|
}
|
|
15303
|
+
async executeCode(targetWindow, code) {
|
|
15304
|
+
const args = {
|
|
15305
|
+
windowId: targetWindow.id,
|
|
15306
|
+
options: {
|
|
15307
|
+
code
|
|
15308
|
+
}
|
|
15309
|
+
};
|
|
15310
|
+
return this.execute("executeCode", args);
|
|
15311
|
+
}
|
|
15249
15312
|
async goBack(resultWindow) {
|
|
15250
15313
|
await this.execute("goBack", { windowId: resultWindow.id });
|
|
15251
15314
|
}
|
|
@@ -15781,6 +15844,12 @@
|
|
|
15781
15844
|
if (windowInfo.type === "AllowWorkspaceDropChanged") {
|
|
15782
15845
|
theWindowEvents.handleAllowWorkspaceDropChanged(windowInfo.data);
|
|
15783
15846
|
}
|
|
15847
|
+
if (windowInfo.type === "IsPinnedChanged") {
|
|
15848
|
+
theWindowEvents.handleIsPinnedChanged(windowInfo.data);
|
|
15849
|
+
}
|
|
15850
|
+
if (windowInfo.type === "WindowChannelRestrictionsChanged") {
|
|
15851
|
+
theWindowEvents.handleChannelRestrictionsChanged(windowInfo.data);
|
|
15852
|
+
}
|
|
15784
15853
|
this._registry.execute("window-event", extendedStreamEvent);
|
|
15785
15854
|
}
|
|
15786
15855
|
createWindow(windowId, options) {
|
|
@@ -15837,7 +15906,8 @@
|
|
|
15837
15906
|
frameButtons: args.frameButtons,
|
|
15838
15907
|
jumpListOptions: args.jumpList,
|
|
15839
15908
|
applicationName: args.applicationName,
|
|
15840
|
-
allowWorkspaceDrop: args.allowWorkspaceDrop
|
|
15909
|
+
allowWorkspaceDrop: args.allowWorkspaceDrop,
|
|
15910
|
+
isPinned: args.isPinned
|
|
15841
15911
|
};
|
|
15842
15912
|
}
|
|
15843
15913
|
mapToGroupCreationArgs(args) {
|
|
@@ -18356,7 +18426,7 @@
|
|
|
18356
18426
|
};
|
|
18357
18427
|
}
|
|
18358
18428
|
|
|
18359
|
-
var version = "6.
|
|
18429
|
+
var version = "6.8.0";
|
|
18360
18430
|
|
|
18361
18431
|
var prepareConfig = (options) => {
|
|
18362
18432
|
function getLibConfig(value, defaultMode, trueMode) {
|
|
@@ -18691,12 +18761,26 @@
|
|
|
18691
18761
|
}
|
|
18692
18762
|
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "clear", data: { id } });
|
|
18693
18763
|
}
|
|
18764
|
+
async clearMany(notifications) {
|
|
18765
|
+
this.validateNotificationsArr(notifications);
|
|
18766
|
+
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "clearMany", data: { notifications } });
|
|
18767
|
+
}
|
|
18694
18768
|
async click(id, action, options) {
|
|
18695
18769
|
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "click", data: { id, action, options } });
|
|
18696
18770
|
}
|
|
18697
18771
|
async snooze(id, duration) {
|
|
18698
18772
|
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "snooze", data: { id, duration } });
|
|
18699
18773
|
}
|
|
18774
|
+
async snoozeMany(notifications, duration) {
|
|
18775
|
+
if (!duration) {
|
|
18776
|
+
throw new Error("The 'duration' argument cannot be null or undefined");
|
|
18777
|
+
}
|
|
18778
|
+
if (typeof duration !== "number") {
|
|
18779
|
+
throw new Error("The 'duration' argument must be a valid number");
|
|
18780
|
+
}
|
|
18781
|
+
this.validateNotificationsArr(notifications);
|
|
18782
|
+
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "snoozeMany", data: { notifications, duration } });
|
|
18783
|
+
}
|
|
18700
18784
|
async setState(id, state) {
|
|
18701
18785
|
if (!id) {
|
|
18702
18786
|
throw new Error("The 'id' argument cannot be null or undefined");
|
|
@@ -18710,6 +18794,16 @@
|
|
|
18710
18794
|
this.validateState(state);
|
|
18711
18795
|
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "updateState", data: { id, state } });
|
|
18712
18796
|
}
|
|
18797
|
+
async setStates(notifications, state) {
|
|
18798
|
+
if (!state) {
|
|
18799
|
+
throw new Error("The 'state' argument cannot be null or undefined");
|
|
18800
|
+
}
|
|
18801
|
+
if (typeof state !== "string") {
|
|
18802
|
+
throw new Error("The 'state' argument must be a valid string");
|
|
18803
|
+
}
|
|
18804
|
+
this.validateNotificationsArr(notifications);
|
|
18805
|
+
await this.interop.invoke(this.NotificationsExecuteMethod, { command: "updateStates", data: { notifications, state } });
|
|
18806
|
+
}
|
|
18713
18807
|
toAPI() {
|
|
18714
18808
|
return {
|
|
18715
18809
|
maxActions: this.maxActions,
|
|
@@ -18732,7 +18826,10 @@
|
|
|
18732
18826
|
click: this.click.bind(this),
|
|
18733
18827
|
setState: this.setState.bind(this),
|
|
18734
18828
|
updateData: this.updateData.bind(this),
|
|
18735
|
-
snooze: this.snooze.bind(this)
|
|
18829
|
+
snooze: this.snooze.bind(this),
|
|
18830
|
+
snoozeMany: this.snoozeMany.bind(this),
|
|
18831
|
+
clearMany: this.clearMany.bind(this),
|
|
18832
|
+
setStates: this.setStates.bind(this)
|
|
18736
18833
|
};
|
|
18737
18834
|
}
|
|
18738
18835
|
onStreamEventCore(key, callback) {
|
|
@@ -19114,6 +19211,14 @@
|
|
|
19114
19211
|
this.subscriptionForCounter = undefined;
|
|
19115
19212
|
}
|
|
19116
19213
|
}
|
|
19214
|
+
validateNotificationsArr(notifications) {
|
|
19215
|
+
if (!Array.isArray(notifications)) {
|
|
19216
|
+
throw new Error("The 'notifications' argument must be an array with valid notification IDs");
|
|
19217
|
+
}
|
|
19218
|
+
if (notifications.some((n) => typeof n !== "string")) {
|
|
19219
|
+
throw new Error("The 'notifications' argument must contain only valid string notification IDs");
|
|
19220
|
+
}
|
|
19221
|
+
}
|
|
19117
19222
|
}
|
|
19118
19223
|
|
|
19119
19224
|
const ThemesConfigurationMethodName = "T42.Themes.Configuration";
|