@interopio/workspaces-api 3.5.1 → 3.5.2
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 +2 -0
- package/dist/workspaces.es.js +34 -2
- package/dist/workspaces.es.js.map +1 -1
- package/dist/workspaces.umd.js +34 -2
- package/dist/workspaces.umd.js.map +1 -1
- package/dist/workspaces.umd.min.js +1 -1
- package/package.json +2 -2
- package/workspaces.d.ts +22 -0
package/dist/workspaces.umd.js
CHANGED
|
@@ -912,6 +912,7 @@
|
|
|
912
912
|
const nonEmptyStringDecoder = string().where((s) => s.length > 0, "Expected a non-empty string");
|
|
913
913
|
const nonNegativeNumberDecoder = number().where((num) => num >= 0, "Expected a non-negative number");
|
|
914
914
|
const positiveNumberDecoder = number().where((num) => num > 0, "Expected a positive number");
|
|
915
|
+
const windowDragModeDecoder = oneOf(constant("keepInside"), constant("autoEject"));
|
|
915
916
|
const isWindowInSwimlaneResultDecoder = object({
|
|
916
917
|
inWorkspace: boolean()
|
|
917
918
|
});
|
|
@@ -1074,7 +1075,8 @@
|
|
|
1074
1075
|
icon: optional(nonEmptyStringDecoder),
|
|
1075
1076
|
isPinned: optional(boolean()),
|
|
1076
1077
|
isSelected: optional(boolean()),
|
|
1077
|
-
positionIndex: optional(nonNegativeNumberDecoder)
|
|
1078
|
+
positionIndex: optional(nonNegativeNumberDecoder),
|
|
1079
|
+
windowDragMode: optional(windowDragModeDecoder)
|
|
1078
1080
|
})),
|
|
1079
1081
|
frame: optional(object({
|
|
1080
1082
|
activate: optional(boolean()),
|
|
@@ -1168,6 +1170,7 @@
|
|
|
1168
1170
|
widthInPx: optional(number()),
|
|
1169
1171
|
heightInPx: optional(number()),
|
|
1170
1172
|
isPinned: optional(boolean()),
|
|
1173
|
+
windowDragMode: optional(windowDragModeDecoder)
|
|
1171
1174
|
});
|
|
1172
1175
|
const baseChildSnapshotConfigDecoder = object({
|
|
1173
1176
|
frameId: nonEmptyStringDecoder,
|
|
@@ -1523,6 +1526,10 @@
|
|
|
1523
1526
|
const operationCheckConfigDecoder = object({
|
|
1524
1527
|
operation: nonEmptyStringDecoder
|
|
1525
1528
|
});
|
|
1529
|
+
const setWindowDragModeDecoder = object({
|
|
1530
|
+
itemId: nonEmptyStringDecoder,
|
|
1531
|
+
dragMode: windowDragModeDecoder
|
|
1532
|
+
});
|
|
1526
1533
|
|
|
1527
1534
|
const webPlatformMethodName = "T42.Web.Platform.Control";
|
|
1528
1535
|
const webPlatformWspStreamName = "T42.Web.Platform.WSP.Stream";
|
|
@@ -1596,6 +1603,7 @@
|
|
|
1596
1603
|
hideLoadingAnimation: { name: "hideLoadingAnimation", argsDecoder: loadingAnimationConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1597
1604
|
getPlatformFrameId: { name: "getPlatformFrameId", resultDecoder: getPlatformFrameIdResultDecoder },
|
|
1598
1605
|
operationCheck: { name: "operationCheck", argsDecoder: operationCheckConfigDecoder, resultDecoder: operationCheckResultDecoder },
|
|
1606
|
+
setWindowDragMode: { name: "setWindowDragMode", argsDecoder: setWindowDragModeDecoder, resultDecoder: voidResultDecoder }
|
|
1599
1607
|
};
|
|
1600
1608
|
|
|
1601
1609
|
class PromiseWrapper {
|
|
@@ -2560,6 +2568,8 @@
|
|
|
2560
2568
|
}
|
|
2561
2569
|
}
|
|
2562
2570
|
|
|
2571
|
+
const DEFAULT_WINDOW_DRAG_MODE = "keepInside";
|
|
2572
|
+
|
|
2563
2573
|
const data$3 = new WeakMap();
|
|
2564
2574
|
const getData$3 = (model) => {
|
|
2565
2575
|
return data$3.get(model).manager.getWorkspaceData(model);
|
|
@@ -2667,6 +2677,13 @@
|
|
|
2667
2677
|
get isPinned() {
|
|
2668
2678
|
return getData$3(this).config.isPinned;
|
|
2669
2679
|
}
|
|
2680
|
+
get windowDragMode() {
|
|
2681
|
+
const desktopGlobal = isDesktop();
|
|
2682
|
+
if (!desktopGlobal) {
|
|
2683
|
+
return DEFAULT_WINDOW_DRAG_MODE;
|
|
2684
|
+
}
|
|
2685
|
+
return getData$3(this).config.windowDragMode;
|
|
2686
|
+
}
|
|
2670
2687
|
async removeChild(predicate) {
|
|
2671
2688
|
checkThrowCallback(predicate);
|
|
2672
2689
|
const child = this.children.find(predicate);
|
|
@@ -2908,6 +2925,15 @@
|
|
|
2908
2925
|
}
|
|
2909
2926
|
await getData$3(this).controller.hideWorkspaceLoadingAnimation(this.id);
|
|
2910
2927
|
}
|
|
2928
|
+
async setWindowDragMode(mode) {
|
|
2929
|
+
const desktopGlobal = isDesktop();
|
|
2930
|
+
if (!desktopGlobal) {
|
|
2931
|
+
throw new Error("Not supported in IO Connect Browser");
|
|
2932
|
+
}
|
|
2933
|
+
windowDragModeDecoder.runWithException(mode);
|
|
2934
|
+
await getData$3(this).controller.setWindowDragMode(this.id, mode);
|
|
2935
|
+
await this.refreshReference();
|
|
2936
|
+
}
|
|
2911
2937
|
async onClosed(callback) {
|
|
2912
2938
|
checkThrowCallback(callback);
|
|
2913
2939
|
const id = getData$3(this).id;
|
|
@@ -4167,6 +4193,9 @@
|
|
|
4167
4193
|
async hideWorkspaceLoadingAnimation(workspaceId) {
|
|
4168
4194
|
await this.bridge.send(OPERATIONS.hideLoadingAnimation.name, { itemId: workspaceId, type: "workspace" });
|
|
4169
4195
|
}
|
|
4196
|
+
async setWindowDragMode(workspaceId, dragMode) {
|
|
4197
|
+
await this.bridge.send(OPERATIONS.setWindowDragMode.name, { itemId: workspaceId, dragMode });
|
|
4198
|
+
}
|
|
4170
4199
|
async moveFrame(itemId, config) {
|
|
4171
4200
|
await this.bridge.send(OPERATIONS.moveFrame.name, Object.assign({}, { itemId }, config));
|
|
4172
4201
|
}
|
|
@@ -4564,6 +4593,9 @@
|
|
|
4564
4593
|
async hideWorkspaceLoadingAnimation(workspaceId) {
|
|
4565
4594
|
return await this.base.hideWorkspaceLoadingAnimation(workspaceId);
|
|
4566
4595
|
}
|
|
4596
|
+
async setWindowDragMode(workspaceId, dragMode) {
|
|
4597
|
+
return await this.base.setWindowDragMode(workspaceId, dragMode);
|
|
4598
|
+
}
|
|
4567
4599
|
async moveFrame(itemId, config) {
|
|
4568
4600
|
return await this.base.moveFrame(itemId, config);
|
|
4569
4601
|
}
|
|
@@ -4908,7 +4940,7 @@
|
|
|
4908
4940
|
}
|
|
4909
4941
|
}
|
|
4910
4942
|
|
|
4911
|
-
var version = "3.5.
|
|
4943
|
+
var version = "3.5.2";
|
|
4912
4944
|
|
|
4913
4945
|
const composeAPI = (glue, ioc) => {
|
|
4914
4946
|
const controller = ioc.controller;
|