@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.
@@ -2927,7 +2927,7 @@ const ContextMessageReplaySpec = {
2927
2927
  }
2928
2928
  };
2929
2929
 
2930
- var version$1 = "6.4.0";
2930
+ var version$1 = "6.4.1";
2931
2931
 
2932
2932
  function prepareConfig$1 (configuration, ext, glue42gd) {
2933
2933
  let nodeStartingContext;
@@ -13155,6 +13155,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
13155
13155
  let _frameId = options.frameId;
13156
13156
  let _isLocked = options.isLocked;
13157
13157
  let _allowWorkspaceDrop = options.allowWorkspaceDrop;
13158
+ let _isPinned = options.isPinned;
13158
13159
  let _group;
13159
13160
  let _frameButtons = (_d = options.frameButtons) !== null && _d !== void 0 ? _d : [];
13160
13161
  let _zoomFactor = options.zoomFactor;
@@ -13274,6 +13275,12 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
13274
13275
  }
13275
13276
  return executor.setAllowWorkspaceDrop(resultWindow, allowWorkspaceDrop);
13276
13277
  }
13278
+ function pin() {
13279
+ return executor.pin(resultWindow);
13280
+ }
13281
+ function unpin() {
13282
+ return executor.unpin(resultWindow);
13283
+ }
13277
13284
  function moveResize(bounds, success, error) {
13278
13285
  return Utils.callbackifyPromise(() => {
13279
13286
  if (isUndefinedOrNull(bounds)) {
@@ -13641,6 +13648,16 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
13641
13648
  async function clone(cloneOptions) {
13642
13649
  return executor.clone(resultWindow, cloneOptions);
13643
13650
  }
13651
+ async function executeCode(code) {
13652
+ if (!code) {
13653
+ throw new Error("Code argument is missing");
13654
+ }
13655
+ if (typeof code !== "string") {
13656
+ throw new Error("Code argument must be a valid string");
13657
+ }
13658
+ const response = await executor.executeCode(resultWindow, code);
13659
+ return response.result;
13660
+ }
13644
13661
  function onTitleChanged(callback) {
13645
13662
  if (!isFunction(callback)) {
13646
13663
  throw new Error("callback should be a function");
@@ -13753,6 +13770,12 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
13753
13770
  function onTabSelectionChanged(callback) {
13754
13771
  return onEventCore("tab-selection-changed", callback);
13755
13772
  }
13773
+ function onChannelRestrictionsChanged(callback) {
13774
+ if (!isFunction(callback)) {
13775
+ throw new Error("callback must be a function");
13776
+ }
13777
+ return onEventCore("channel-restrictions-changed", callback);
13778
+ }
13756
13779
  function onClosing(callback) {
13757
13780
  if (!isFunction(callback)) {
13758
13781
  throw new Error("callback must be a function");
@@ -13857,6 +13880,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
13857
13880
  _frameId = updated.frameId;
13858
13881
  _isLocked = updated.isLocked;
13859
13882
  _allowWorkspaceDrop = updated.allowWorkspaceDrop;
13883
+ _isPinned = updated.isPinned;
13860
13884
  _zoomFactor = updated.zoomFactor;
13861
13885
  _placementSettings = updated.placementSettings;
13862
13886
  }
@@ -13980,6 +14004,10 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
13980
14004
  _allowWorkspaceDrop = allowWorkspaceDrop;
13981
14005
  _registry.execute("allow-workspace-drop-changed", resultWindow);
13982
14006
  }
14007
+ function handleIsPinnedChanged(isPinned) {
14008
+ _isPinned = isPinned;
14009
+ _registry.execute("is-pinned-changed", resultWindow);
14010
+ }
13983
14011
  function handleGroupHeaderVisibilityChanged(isGroupHeaderVisible) {
13984
14012
  _isGroupHeaderVisible = isGroupHeaderVisible;
13985
14013
  }
@@ -14072,6 +14100,9 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
14072
14100
  claimScreenArea: data.claimScreenArea
14073
14101
  });
14074
14102
  }
14103
+ function handleChannelRestrictionsChanged(data) {
14104
+ _registry.execute("channel-restrictions-changed", data);
14105
+ }
14075
14106
  function handleGroupChanged(newGroup, oldGroup) {
14076
14107
  _group = newGroup;
14077
14108
  _groupId = newGroup === null || newGroup === void 0 ? void 0 : newGroup.id;
@@ -14320,6 +14351,9 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
14320
14351
  get allowWorkspaceDrop() {
14321
14352
  return _allowWorkspaceDrop;
14322
14353
  },
14354
+ get isPinned() {
14355
+ return _isPinned;
14356
+ },
14323
14357
  maximize,
14324
14358
  restore,
14325
14359
  minimize,
@@ -14371,6 +14405,8 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
14371
14405
  flashTab,
14372
14406
  setSticky,
14373
14407
  setAllowWorkspaceDrop,
14408
+ pin,
14409
+ unpin,
14374
14410
  print,
14375
14411
  printToPDF,
14376
14412
  place,
@@ -14384,6 +14420,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
14384
14420
  getDockingPlacement,
14385
14421
  dock,
14386
14422
  clone,
14423
+ executeCode,
14387
14424
  getChannel: async () => {
14388
14425
  var _a;
14389
14426
  const wins = await getChannels().getWindowsWithChannels({ windowIds: [_id] });
@@ -14423,6 +14460,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
14423
14460
  onNeighboursChanged,
14424
14461
  onDockingChanged,
14425
14462
  onNavigating,
14463
+ onChannelRestrictionsChanged,
14426
14464
  get tabs() {
14427
14465
  return getAllTabs();
14428
14466
  },
@@ -14503,6 +14541,7 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
14503
14541
  handleFrameSelectionChanged,
14504
14542
  handleCompositionChanged,
14505
14543
  handleAllowWorkspaceDropChanged,
14544
+ handleIsPinnedChanged,
14506
14545
  handleGroupHeaderVisibilityChanged,
14507
14546
  handleTabHeaderVisibilityChanged,
14508
14547
  handleGroupChanged,
@@ -14513,7 +14552,8 @@ var windowFactory = (id, options, executor, logger, appManagerGetter, displayAPI
14513
14552
  handleZoomFactorChanged,
14514
14553
  handleIsStickyChanged,
14515
14554
  handlePlacementSettingsChanged,
14516
- handleDockingChanged
14555
+ handleDockingChanged,
14556
+ handleChannelRestrictionsChanged
14517
14557
  };
14518
14558
  const groupArgs = {
14519
14559
  get isGroupHibernated() {
@@ -14724,6 +14764,20 @@ class GDExecutor {
14724
14764
  await this.execute("setAllowWorkspaceDrop", options);
14725
14765
  return w;
14726
14766
  }
14767
+ async pin(windowToPin) {
14768
+ const options = {
14769
+ windowId: windowToPin.id
14770
+ };
14771
+ await this.execute("pinTab", options);
14772
+ return windowToPin;
14773
+ }
14774
+ async unpin(pinnedWindow) {
14775
+ const options = {
14776
+ windowId: pinnedWindow.id
14777
+ };
14778
+ await this.execute("unpinTab", options);
14779
+ return pinnedWindow;
14780
+ }
14727
14781
  async moveResize(w, bounds) {
14728
14782
  if (typeof window !== "undefined" && window.glueDesktop.versionNum < 31200) {
14729
14783
  return new Promise(async (res, rej) => {
@@ -15240,6 +15294,15 @@ class GDExecutor {
15240
15294
  const win = await windowStore.waitFor(result.id);
15241
15295
  return win.API;
15242
15296
  }
15297
+ async executeCode(targetWindow, code) {
15298
+ const args = {
15299
+ windowId: targetWindow.id,
15300
+ options: {
15301
+ code
15302
+ }
15303
+ };
15304
+ return this.execute("executeCode", args);
15305
+ }
15243
15306
  async goBack(resultWindow) {
15244
15307
  await this.execute("goBack", { windowId: resultWindow.id });
15245
15308
  }
@@ -15775,6 +15838,12 @@ class GDEnvironment {
15775
15838
  if (windowInfo.type === "AllowWorkspaceDropChanged") {
15776
15839
  theWindowEvents.handleAllowWorkspaceDropChanged(windowInfo.data);
15777
15840
  }
15841
+ if (windowInfo.type === "IsPinnedChanged") {
15842
+ theWindowEvents.handleIsPinnedChanged(windowInfo.data);
15843
+ }
15844
+ if (windowInfo.type === "WindowChannelRestrictionsChanged") {
15845
+ theWindowEvents.handleChannelRestrictionsChanged(windowInfo.data);
15846
+ }
15778
15847
  this._registry.execute("window-event", extendedStreamEvent);
15779
15848
  }
15780
15849
  createWindow(windowId, options) {
@@ -15831,7 +15900,8 @@ class GDEnvironment {
15831
15900
  frameButtons: args.frameButtons,
15832
15901
  jumpListOptions: args.jumpList,
15833
15902
  applicationName: args.applicationName,
15834
- allowWorkspaceDrop: args.allowWorkspaceDrop
15903
+ allowWorkspaceDrop: args.allowWorkspaceDrop,
15904
+ isPinned: args.isPinned
15835
15905
  };
15836
15906
  }
15837
15907
  mapToGroupCreationArgs(args) {
@@ -18350,7 +18420,7 @@ function factory$3(agm) {
18350
18420
  };
18351
18421
  }
18352
18422
 
18353
- var version = "6.6.0";
18423
+ var version = "6.8.0";
18354
18424
 
18355
18425
  var prepareConfig = (options) => {
18356
18426
  function getLibConfig(value, defaultMode, trueMode) {
@@ -18685,12 +18755,26 @@ class Notifications {
18685
18755
  }
18686
18756
  await this.interop.invoke(this.NotificationsExecuteMethod, { command: "clear", data: { id } });
18687
18757
  }
18758
+ async clearMany(notifications) {
18759
+ this.validateNotificationsArr(notifications);
18760
+ await this.interop.invoke(this.NotificationsExecuteMethod, { command: "clearMany", data: { notifications } });
18761
+ }
18688
18762
  async click(id, action, options) {
18689
18763
  await this.interop.invoke(this.NotificationsExecuteMethod, { command: "click", data: { id, action, options } });
18690
18764
  }
18691
18765
  async snooze(id, duration) {
18692
18766
  await this.interop.invoke(this.NotificationsExecuteMethod, { command: "snooze", data: { id, duration } });
18693
18767
  }
18768
+ async snoozeMany(notifications, duration) {
18769
+ if (!duration) {
18770
+ throw new Error("The 'duration' argument cannot be null or undefined");
18771
+ }
18772
+ if (typeof duration !== "number") {
18773
+ throw new Error("The 'duration' argument must be a valid number");
18774
+ }
18775
+ this.validateNotificationsArr(notifications);
18776
+ await this.interop.invoke(this.NotificationsExecuteMethod, { command: "snoozeMany", data: { notifications, duration } });
18777
+ }
18694
18778
  async setState(id, state) {
18695
18779
  if (!id) {
18696
18780
  throw new Error("The 'id' argument cannot be null or undefined");
@@ -18704,6 +18788,16 @@ class Notifications {
18704
18788
  this.validateState(state);
18705
18789
  await this.interop.invoke(this.NotificationsExecuteMethod, { command: "updateState", data: { id, state } });
18706
18790
  }
18791
+ async setStates(notifications, state) {
18792
+ if (!state) {
18793
+ throw new Error("The 'state' argument cannot be null or undefined");
18794
+ }
18795
+ if (typeof state !== "string") {
18796
+ throw new Error("The 'state' argument must be a valid string");
18797
+ }
18798
+ this.validateNotificationsArr(notifications);
18799
+ await this.interop.invoke(this.NotificationsExecuteMethod, { command: "updateStates", data: { notifications, state } });
18800
+ }
18707
18801
  toAPI() {
18708
18802
  return {
18709
18803
  maxActions: this.maxActions,
@@ -18726,7 +18820,10 @@ class Notifications {
18726
18820
  click: this.click.bind(this),
18727
18821
  setState: this.setState.bind(this),
18728
18822
  updateData: this.updateData.bind(this),
18729
- snooze: this.snooze.bind(this)
18823
+ snooze: this.snooze.bind(this),
18824
+ snoozeMany: this.snoozeMany.bind(this),
18825
+ clearMany: this.clearMany.bind(this),
18826
+ setStates: this.setStates.bind(this)
18730
18827
  };
18731
18828
  }
18732
18829
  onStreamEventCore(key, callback) {
@@ -19108,6 +19205,14 @@ class Notifications {
19108
19205
  this.subscriptionForCounter = undefined;
19109
19206
  }
19110
19207
  }
19208
+ validateNotificationsArr(notifications) {
19209
+ if (!Array.isArray(notifications)) {
19210
+ throw new Error("The 'notifications' argument must be an array with valid notification IDs");
19211
+ }
19212
+ if (notifications.some((n) => typeof n !== "string")) {
19213
+ throw new Error("The 'notifications' argument must contain only valid string notification IDs");
19214
+ }
19215
+ }
19111
19216
  }
19112
19217
 
19113
19218
  const ThemesConfigurationMethodName = "T42.Themes.Configuration";