@interopio/desktop 6.13.1 → 6.14.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 +8 -0
- package/desktop.d.ts +101 -2
- package/dist/desktop.browser.js +64 -21
- 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 +64 -21
- package/dist/desktop.es.js.map +1 -1
- package/dist/desktop.umd.js +64 -21
- 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 +3 -3
package/changelog.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
6.14.0
|
|
2
|
+
- feat: windows - add dragMove method
|
|
3
|
+
- feat: windows - add clearPlacement method
|
|
4
|
+
- feat: windows - configure method now accepts a new option - showInTaskbar
|
|
5
|
+
- feat: layouts - add onDefaultGlobalChanged event
|
|
6
|
+
- feat: layouts - onRenamed event now receives the old name as a second argument
|
|
7
|
+
- feat: layouts - add new options to the save method - ignoreContexts
|
|
8
|
+
- bugfix: appManager - fix hangs on initialization with appManager: "full" outside platform
|
|
1
9
|
6.13.1
|
|
2
10
|
- fix: windows - group.onClosing throws an unhandledrejection error when the group is closed before the event is subscribed
|
|
3
11
|
6.13.0
|
package/desktop.d.ts
CHANGED
|
@@ -1651,6 +1651,8 @@ export declare namespace IOConnectDesktop {
|
|
|
1651
1651
|
activityType?: string;
|
|
1652
1652
|
/** If `true`, multiple instances of the app can be started. */
|
|
1653
1653
|
allowMultiple?: boolean;
|
|
1654
|
+
/** Whether to register the iodesktop object in the global window context. */
|
|
1655
|
+
registerIoDesktop?: boolean;
|
|
1654
1656
|
}
|
|
1655
1657
|
|
|
1656
1658
|
/** @ignore */
|
|
@@ -2116,11 +2118,20 @@ export declare namespace IOConnectDesktop {
|
|
|
2116
2118
|
*/
|
|
2117
2119
|
onChanged(callback: (layout: Layout) => void): UnsubscribeFunction;
|
|
2118
2120
|
|
|
2121
|
+
/**
|
|
2122
|
+
* Notifies when a new default Global Layout has been selected or when the current one has been cleared.
|
|
2123
|
+
* @param callback Callback function for handling the event. Receives as an argument an object with a `name` property
|
|
2124
|
+
* holding the name of the newly selected default Global Layout. If the default Global Layout has been cleared, the argument will be `undefined`.
|
|
2125
|
+
*/
|
|
2126
|
+
onDefaultGlobalChanged(callback: (layout?: { name: string }) => void): UnsubscribeFunction;
|
|
2127
|
+
|
|
2119
2128
|
/**
|
|
2120
2129
|
* Notifies when a Layout is renamed.
|
|
2121
2130
|
* @param callback Callback function for handling the event.
|
|
2131
|
+
* Receives as a first argument the `Layout` object describing the renamed Layout.
|
|
2132
|
+
* Receives as a second argument an object with a `name` property holding the previous Layout name.
|
|
2122
2133
|
*/
|
|
2123
|
-
onRenamed(callback: (layout: Layout) => void): UnsubscribeFunction;
|
|
2134
|
+
onRenamed(callback: (layout: Layout, previous: { name: string }) => void): UnsubscribeFunction;
|
|
2124
2135
|
|
|
2125
2136
|
/**
|
|
2126
2137
|
* Notifies when a Layout is restored.
|
|
@@ -2403,6 +2414,14 @@ export declare namespace IOConnectDesktop {
|
|
|
2403
2414
|
* @ignore
|
|
2404
2415
|
*/
|
|
2405
2416
|
ignoreMyInstance?: boolean;
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* If `true`, the context objects of individual io.Connect Windows and Workspaces participating in the Global Layout won't be saved when the Layout is saved.
|
|
2420
|
+
* You can still use the `context` property to provide context data to be saved for the Global Layout itself.
|
|
2421
|
+
* Valid only for Global Layouts.
|
|
2422
|
+
* *Available since io.Connect Desktop 9.9.*
|
|
2423
|
+
*/
|
|
2424
|
+
ignoreContexts?: boolean;
|
|
2406
2425
|
}
|
|
2407
2426
|
|
|
2408
2427
|
/**
|
|
@@ -3865,6 +3884,24 @@ export declare namespace IOConnectDesktop {
|
|
|
3865
3884
|
* @default "onDemand"
|
|
3866
3885
|
*/
|
|
3867
3886
|
buttonsVisibility?: "off" | "onDemand" | "always" | "onFocus";
|
|
3887
|
+
|
|
3888
|
+
/**
|
|
3889
|
+
* If `true`, the window icon will appear in the taskbar.",
|
|
3890
|
+
* @since io.Connect Desktop 9.9
|
|
3891
|
+
*/
|
|
3892
|
+
showInTaskbar?: boolean;
|
|
3893
|
+
|
|
3894
|
+
/**
|
|
3895
|
+
* Settings for searching in web apps.
|
|
3896
|
+
* @since io.Connect Desktop 9.9
|
|
3897
|
+
*/
|
|
3898
|
+
search?: {
|
|
3899
|
+
/**
|
|
3900
|
+
* If `true`, will enable searching in web apps with `CTRL + F`.
|
|
3901
|
+
* @default true
|
|
3902
|
+
*/
|
|
3903
|
+
enabled?: boolean;
|
|
3904
|
+
};
|
|
3868
3905
|
}
|
|
3869
3906
|
|
|
3870
3907
|
/**
|
|
@@ -4090,6 +4127,13 @@ export declare namespace IOConnectDesktop {
|
|
|
4090
4127
|
*/
|
|
4091
4128
|
snapped: boolean;
|
|
4092
4129
|
|
|
4130
|
+
/**
|
|
4131
|
+
* If `true`, the last known bounds of the io.Connect Window will be saved unless the window has already been snapped.
|
|
4132
|
+
* This allows the window to be restored using these saved bounds when clearing the placement settings for the window via the `clearPlacement()` method.
|
|
4133
|
+
* @since io.Connect Desktop 9.9
|
|
4134
|
+
*/
|
|
4135
|
+
saveBounds?: boolean;
|
|
4136
|
+
|
|
4093
4137
|
/**
|
|
4094
4138
|
* Vertical alignment for the placed window. If `horizontalAlignment` is set, then `verticalAlignment` will default to "stretch".
|
|
4095
4139
|
*/
|
|
@@ -4142,6 +4186,21 @@ export declare namespace IOConnectDesktop {
|
|
|
4142
4186
|
display?: IOConnectDesktop.Displays.Display | "current";
|
|
4143
4187
|
}
|
|
4144
4188
|
|
|
4189
|
+
/**
|
|
4190
|
+
* Settings for clearing the window placement.
|
|
4191
|
+
*/
|
|
4192
|
+
export interface ClearPlacementSettings {
|
|
4193
|
+
/**
|
|
4194
|
+
* If `true`, the io.Connect Window will be restored to its last known bounds saved in the `place()` method if `saveBounds` has been set to `true`.
|
|
4195
|
+
*/
|
|
4196
|
+
restoreBounds?: boolean;
|
|
4197
|
+
|
|
4198
|
+
/**
|
|
4199
|
+
* New bounds for the io.Connect Window. If this is provided, the `restoreBounds` property will be ignored.
|
|
4200
|
+
*/
|
|
4201
|
+
newBounds?: Partial<Bounds>;
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4145
4204
|
/**
|
|
4146
4205
|
* Modes for flashing the window icon in the taskbar:
|
|
4147
4206
|
* - `"auto"` - the icon will flash only if the window isn't on focus and will stop flashing when the window is activated;
|
|
@@ -4661,7 +4720,24 @@ export declare namespace IOConnectDesktop {
|
|
|
4661
4720
|
*/
|
|
4662
4721
|
value?: string;
|
|
4663
4722
|
}
|
|
4664
|
-
|
|
4723
|
+
/**
|
|
4724
|
+
* Options for dragging a window.
|
|
4725
|
+
*/
|
|
4726
|
+
export interface DragMoveOptions {
|
|
4727
|
+
/**
|
|
4728
|
+
* Location of the mouse cursor within the window at the time the dragging operation was initiated.
|
|
4729
|
+
*/
|
|
4730
|
+
location?: {
|
|
4731
|
+
/**
|
|
4732
|
+
* Horizontal coordinate of the mouse cursor within the window in pixels. Relative to the left border of the io.Connect Window.
|
|
4733
|
+
*/
|
|
4734
|
+
x: number;
|
|
4735
|
+
/**
|
|
4736
|
+
* Vertical coordinate of the mouse cursor within the window in pixels. Relative to the top border of the io.Connect Window.
|
|
4737
|
+
*/
|
|
4738
|
+
y: number;
|
|
4739
|
+
}
|
|
4740
|
+
}
|
|
4665
4741
|
/**
|
|
4666
4742
|
* Describes a docked window.
|
|
4667
4743
|
*/
|
|
@@ -5491,6 +5567,16 @@ export declare namespace IOConnectDesktop {
|
|
|
5491
5567
|
*/
|
|
5492
5568
|
snap(target: string | IOConnectWindow, options?: SnappingOptions | RelativeDirection, success?: (window: IOConnectWindow) => void, error?: (error: string) => void): Promise<IOConnectWindow>;
|
|
5493
5569
|
|
|
5570
|
+
/**
|
|
5571
|
+
* This method can be used to start dragging the window with the mouse when the left mouse button is pressed.
|
|
5572
|
+
* @param options Options for dragging the window. Use this argument to optionally provide the location of the mouse cursor within the window
|
|
5573
|
+
* at the time the dragging operation was initiated. The platform will use that location to place the window under the mouse cursor when the mouse is moving
|
|
5574
|
+
* (e.g., in case the mouse has already moved several pixels in any direction before the dragging operation has been initiated by the platform).
|
|
5575
|
+
* If the starting mouse location isn't specified, its current position will be used.
|
|
5576
|
+
* @since io.Connect Desktop 9.9
|
|
5577
|
+
*/
|
|
5578
|
+
dragMove(options?: DragMoveOptions): Promise<void>;
|
|
5579
|
+
|
|
5494
5580
|
/**
|
|
5495
5581
|
* Shows a loader animation for the window or updates the loader properties (animation type, background or text).
|
|
5496
5582
|
* @param options Settings for the loader animation.
|
|
@@ -5728,6 +5814,14 @@ export declare namespace IOConnectDesktop {
|
|
|
5728
5814
|
*/
|
|
5729
5815
|
place(options: PlacementSettings): Promise<void>;
|
|
5730
5816
|
|
|
5817
|
+
/**
|
|
5818
|
+
* Clears the window placement settings.
|
|
5819
|
+
* This means that the window will no longer be automatically snapped to a specific position on the display in case of resolution, scaling, and monitor changes.
|
|
5820
|
+
* @param options Settings for clearing the window placement.
|
|
5821
|
+
* @since io.Connect Desktop 9.9
|
|
5822
|
+
*/
|
|
5823
|
+
clearPlacement(options?: ClearPlacementSettings): Promise<void>;
|
|
5824
|
+
|
|
5731
5825
|
/**
|
|
5732
5826
|
* Makes the window navigate back to the previous web page.
|
|
5733
5827
|
*/
|
|
@@ -7646,6 +7740,11 @@ export declare namespace IOConnectDesktop {
|
|
|
7646
7740
|
* If `true`, will enable showing a notification badge on the tray menu icon, in the "Notifications" section of the io.Connect launcher, and on the taskbar icon of the io.Connect launcher (or your shell app).
|
|
7647
7741
|
*/
|
|
7648
7742
|
showNotificationBadge?: boolean;
|
|
7743
|
+
|
|
7744
|
+
/**
|
|
7745
|
+
* If `true`, the Notification Panel will be hidden automatically when it loses focus.
|
|
7746
|
+
*/
|
|
7747
|
+
autoHidePanel?: boolean;
|
|
7649
7748
|
}
|
|
7650
7749
|
|
|
7651
7750
|
/**
|
package/dist/desktop.browser.js
CHANGED
|
@@ -11702,6 +11702,9 @@
|
|
|
11702
11702
|
height: a.height
|
|
11703
11703
|
};
|
|
11704
11704
|
}
|
|
11705
|
+
static isRunningInIoCdContext() {
|
|
11706
|
+
return typeof window !== "undefined" && (window.glue42gd || window.iodesktop);
|
|
11707
|
+
}
|
|
11705
11708
|
static isNode() {
|
|
11706
11709
|
if (typeof Utils._isNode !== "undefined") {
|
|
11707
11710
|
return Utils._isNode;
|
|
@@ -12689,24 +12692,23 @@
|
|
|
12689
12692
|
.forEach((item) => entitlements.handleBranchesModified(item));
|
|
12690
12693
|
if (!initiated) {
|
|
12691
12694
|
initiated = true;
|
|
12692
|
-
const
|
|
12693
|
-
const
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
resolveFunc(configuration);
|
|
12697
|
-
}
|
|
12698
|
-
else {
|
|
12699
|
-
const un = applications.onInstanceStarted((i) => {
|
|
12700
|
-
if (i.id === agm.instance.instance) {
|
|
12701
|
-
un();
|
|
12702
|
-
resolveFunc(configuration);
|
|
12703
|
-
}
|
|
12704
|
-
});
|
|
12705
|
-
}
|
|
12706
|
-
}
|
|
12707
|
-
else {
|
|
12695
|
+
const myInstance = agm.instance;
|
|
12696
|
+
const hasMyAppInSnapShot = onApplicationAddedEventArgs.some((a) => a.Name === myInstance.application);
|
|
12697
|
+
const hasMyInstanceInSnapShot = onApplicationStartedEventArgs.some((i) => i.Id === myInstance.instance);
|
|
12698
|
+
if (!hasMyAppInSnapShot) {
|
|
12708
12699
|
resolveFunc(configuration);
|
|
12700
|
+
return;
|
|
12701
|
+
}
|
|
12702
|
+
if (!hasMyInstanceInSnapShot && (Utils.isNode() || Utils.isRunningInIoCdContext())) {
|
|
12703
|
+
const un = applications.onInstanceStarted((i) => {
|
|
12704
|
+
if (i.id === myInstance.instance) {
|
|
12705
|
+
un();
|
|
12706
|
+
resolveFunc(configuration);
|
|
12707
|
+
}
|
|
12708
|
+
});
|
|
12709
|
+
return;
|
|
12709
12710
|
}
|
|
12711
|
+
resolveFunc(configuration);
|
|
12710
12712
|
}
|
|
12711
12713
|
});
|
|
12712
12714
|
subscription.onFailed((err) => rejectFunc(err));
|
|
@@ -13511,6 +13513,9 @@
|
|
|
13511
13513
|
return executor.snap(resultWindow, target, direction);
|
|
13512
13514
|
}, success, error);
|
|
13513
13515
|
}
|
|
13516
|
+
function dragMove(dragMoveSettings) {
|
|
13517
|
+
return executor.dragMove(resultWindow, dragMoveSettings);
|
|
13518
|
+
}
|
|
13514
13519
|
function attachTab(tab, opt, success, error) {
|
|
13515
13520
|
return Utils.callbackifyPromise(() => {
|
|
13516
13521
|
var _a;
|
|
@@ -13740,6 +13745,9 @@
|
|
|
13740
13745
|
function place(placementSettings) {
|
|
13741
13746
|
return executor.place(resultWindow, placementSettings);
|
|
13742
13747
|
}
|
|
13748
|
+
function clearPlacement(clearPlacementSettings) {
|
|
13749
|
+
return executor.clearPlacement(resultWindow, clearPlacementSettings);
|
|
13750
|
+
}
|
|
13743
13751
|
function refresh(ignoreCache) {
|
|
13744
13752
|
return executor.refresh(resultWindow, ignoreCache);
|
|
13745
13753
|
}
|
|
@@ -14493,6 +14501,7 @@
|
|
|
14493
14501
|
center,
|
|
14494
14502
|
close,
|
|
14495
14503
|
snap,
|
|
14504
|
+
dragMove,
|
|
14496
14505
|
showLoader,
|
|
14497
14506
|
hideLoader,
|
|
14498
14507
|
updateContext,
|
|
@@ -14523,6 +14532,7 @@
|
|
|
14523
14532
|
print,
|
|
14524
14533
|
printToPDF,
|
|
14525
14534
|
place,
|
|
14535
|
+
clearPlacement,
|
|
14526
14536
|
ungroup,
|
|
14527
14537
|
refresh,
|
|
14528
14538
|
goBack,
|
|
@@ -15006,6 +15016,9 @@
|
|
|
15006
15016
|
await this.execute("snap", { windowId: w.id, options: args }, "CompositionChanged", `CompositionChanged-${targetWindow.id}`);
|
|
15007
15017
|
return w;
|
|
15008
15018
|
}
|
|
15019
|
+
dragMove(window, options) {
|
|
15020
|
+
return this.execute("dragMove", { windowId: window.id, options });
|
|
15021
|
+
}
|
|
15009
15022
|
async attachTab(w, sourceWindow, options) {
|
|
15010
15023
|
await this.execute("attachTab", {
|
|
15011
15024
|
windowId: w.id,
|
|
@@ -15266,6 +15279,9 @@
|
|
|
15266
15279
|
}
|
|
15267
15280
|
return this.execute("place", { windowId: window.id, options: { ...copy } });
|
|
15268
15281
|
}
|
|
15282
|
+
async clearPlacement(window, options) {
|
|
15283
|
+
return this.execute("clearPlacement", { windowId: window.id, options });
|
|
15284
|
+
}
|
|
15269
15285
|
async refresh(resultWindow, ignoreCache) {
|
|
15270
15286
|
await this.execute("refresh", { windowId: resultWindow.id, options: { ignoreCache } });
|
|
15271
15287
|
return resultWindow;
|
|
@@ -16928,7 +16944,8 @@
|
|
|
16928
16944
|
}
|
|
16929
16945
|
registerRequestMethods() {
|
|
16930
16946
|
this.interop.register(SaveContextMethodName, (args) => {
|
|
16931
|
-
const
|
|
16947
|
+
const { ignoreContexts, ...cbArgs } = args;
|
|
16948
|
+
const usersCbs = this.callbacks.execute("saveRequested", cbArgs);
|
|
16932
16949
|
if ((usersCbs === null || usersCbs === void 0 ? void 0 : usersCbs.length) > 1) {
|
|
16933
16950
|
this.logger.warn(`Multiple subscriptions for "glue.layouts.onSaveRequested" - only the first one will be used`);
|
|
16934
16951
|
}
|
|
@@ -16944,7 +16961,7 @@
|
|
|
16944
16961
|
if (this.isActivityOwner()) {
|
|
16945
16962
|
result.activityContext = requestResult === null || requestResult === void 0 ? void 0 : requestResult.activityContext;
|
|
16946
16963
|
}
|
|
16947
|
-
return result;
|
|
16964
|
+
return ignoreContexts ? { windowContext: undefined, activityContext: undefined } : result;
|
|
16948
16965
|
});
|
|
16949
16966
|
}
|
|
16950
16967
|
}
|
|
@@ -17150,6 +17167,9 @@
|
|
|
17150
17167
|
if (typeof layout.setAsCurrent === "boolean") {
|
|
17151
17168
|
layoutObject.options.setAsCurrent = layout.setAsCurrent;
|
|
17152
17169
|
}
|
|
17170
|
+
if (typeof layout.ignoreContexts === "boolean") {
|
|
17171
|
+
layoutObject.options.ignoreContexts = layout.ignoreContexts;
|
|
17172
|
+
}
|
|
17153
17173
|
}
|
|
17154
17174
|
else {
|
|
17155
17175
|
return reject(new Error(`layout type ${layout.type} is not supported`));
|
|
@@ -17401,6 +17421,16 @@
|
|
|
17401
17421
|
onChanged(callback) {
|
|
17402
17422
|
return this.callbacks.add("changed", callback);
|
|
17403
17423
|
}
|
|
17424
|
+
onDefaultGlobalChanged(callback) {
|
|
17425
|
+
if (typeof callback !== "function") {
|
|
17426
|
+
throw new Error("callback must be a function");
|
|
17427
|
+
}
|
|
17428
|
+
this.getDefaultGlobal()
|
|
17429
|
+
.then((layout) => callback(layout ? { name: layout.name } : undefined))
|
|
17430
|
+
.catch(() => {
|
|
17431
|
+
});
|
|
17432
|
+
return this.callbacks.add("default-changed", callback);
|
|
17433
|
+
}
|
|
17404
17434
|
onRestored(callback) {
|
|
17405
17435
|
return this.callbacks.add("restored", callback);
|
|
17406
17436
|
}
|
|
@@ -17586,6 +17616,8 @@
|
|
|
17586
17616
|
this.changeLayouts(transform(data.OnLayoutChanged));
|
|
17587
17617
|
this.renameLayouts(transform(data.OnLayoutRenamed));
|
|
17588
17618
|
this.restoredLayout(transform(data.OnLayoutRestored));
|
|
17619
|
+
this.selectedDefaultLayout(transform(data.OnLayoutSelectedDefault), false);
|
|
17620
|
+
this.selectedDefaultLayout(transform(data.OnLayoutDeselectedDefault), true);
|
|
17589
17621
|
this.callbacks.execute("streamEvent", data);
|
|
17590
17622
|
});
|
|
17591
17623
|
subs.onFailed((err) => {
|
|
@@ -17620,7 +17652,7 @@
|
|
|
17620
17652
|
});
|
|
17621
17653
|
setTimeout(() => {
|
|
17622
17654
|
if (!done) {
|
|
17623
|
-
reject(
|
|
17655
|
+
reject(new Error(`Timeout waiting for token ${token}`));
|
|
17624
17656
|
}
|
|
17625
17657
|
}, timeout);
|
|
17626
17658
|
});
|
|
@@ -17686,7 +17718,7 @@
|
|
|
17686
17718
|
throw Error(`received rename event for unknown layout with type ${renamedLayout.type} and name ${renamedLayout.oldName}`);
|
|
17687
17719
|
}
|
|
17688
17720
|
existingLayout.name = renamedLayout.newName;
|
|
17689
|
-
this.callbacks.execute("renamed", existingLayout);
|
|
17721
|
+
this.callbacks.execute("renamed", existingLayout, { name: renamedLayout.oldName });
|
|
17690
17722
|
});
|
|
17691
17723
|
}
|
|
17692
17724
|
compareLayouts(layout1, layout2) {
|
|
@@ -17707,6 +17739,17 @@
|
|
|
17707
17739
|
this.callbacks.execute("restored", existingLayout);
|
|
17708
17740
|
});
|
|
17709
17741
|
}
|
|
17742
|
+
selectedDefaultLayout(selectedDefaultLayouts, deselected) {
|
|
17743
|
+
if (!selectedDefaultLayouts || selectedDefaultLayouts.length === 0) {
|
|
17744
|
+
return;
|
|
17745
|
+
}
|
|
17746
|
+
if (deselected) {
|
|
17747
|
+
this.callbacks.execute("default-changed", undefined);
|
|
17748
|
+
}
|
|
17749
|
+
else {
|
|
17750
|
+
this.callbacks.execute("default-changed", selectedDefaultLayouts[0]);
|
|
17751
|
+
}
|
|
17752
|
+
}
|
|
17710
17753
|
}
|
|
17711
17754
|
|
|
17712
17755
|
function LayoutsFactory (config) {
|
|
@@ -19183,7 +19226,7 @@
|
|
|
19183
19226
|
};
|
|
19184
19227
|
}
|
|
19185
19228
|
|
|
19186
|
-
var version = "6.
|
|
19229
|
+
var version = "6.14.0";
|
|
19187
19230
|
|
|
19188
19231
|
var prepareConfig = (options) => {
|
|
19189
19232
|
function getLibConfig(value, defaultMode, trueMode) {
|