@interopio/workspaces-api 4.1.1-beta.0 → 4.1.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 +4 -0
- package/dist/workspaces.es.js +56 -2
- package/dist/workspaces.es.js.map +1 -1
- package/dist/workspaces.umd.js +56 -2
- package/dist/workspaces.umd.js.map +1 -1
- package/dist/workspaces.umd.min.js +1 -1
- package/package.json +3 -3
- package/workspaces.d.ts +60 -13
package/changelog.md
CHANGED
package/dist/workspaces.es.js
CHANGED
|
@@ -910,6 +910,9 @@ const windowDragModeDecoder = oneOf(constant("keepInside"), constant("autoEject"
|
|
|
910
910
|
const isWindowInSwimlaneResultDecoder = object({
|
|
911
911
|
inWorkspace: boolean()
|
|
912
912
|
});
|
|
913
|
+
const frameVisibilityResultDecoder = object({
|
|
914
|
+
isVisible: boolean()
|
|
915
|
+
});
|
|
913
916
|
const iconDecoder = object({
|
|
914
917
|
base64Image: nonEmptyStringDecoder
|
|
915
918
|
});
|
|
@@ -1021,6 +1024,7 @@ const newFrameConfigDecoder = object({
|
|
|
1021
1024
|
width: optional(nonNegativeNumberDecoder),
|
|
1022
1025
|
height: optional(nonNegativeNumberDecoder)
|
|
1023
1026
|
})),
|
|
1027
|
+
isVisible: optional(boolean()),
|
|
1024
1028
|
frameId: optional(nonEmptyStringDecoder)
|
|
1025
1029
|
});
|
|
1026
1030
|
const loadingStrategyDecoder = oneOf(constant("direct"), constant("delayed"), constant("lazy"));
|
|
@@ -1519,6 +1523,9 @@ const setWorkspaceIconDecoder = object({
|
|
|
1519
1523
|
const workspacePinOptionsDecoder = optional(object({
|
|
1520
1524
|
icon: optional(nonEmptyStringDecoder)
|
|
1521
1525
|
}));
|
|
1526
|
+
const frameShowConfigDecoder = optional(object({
|
|
1527
|
+
activate: optional(boolean())
|
|
1528
|
+
}));
|
|
1522
1529
|
const shortcutConfigDecoder = object({
|
|
1523
1530
|
shortcut: nonEmptyStringDecoder,
|
|
1524
1531
|
frameId: nonEmptyStringDecoder
|
|
@@ -1551,6 +1558,11 @@ const setLoadingStrategyDecoder = object({
|
|
|
1551
1558
|
const frameClosingResultDecoder = object({
|
|
1552
1559
|
prevent: boolean()
|
|
1553
1560
|
});
|
|
1561
|
+
const changeFrameVisibilityConfigDecoder = object({
|
|
1562
|
+
frameId: nonEmptyStringDecoder,
|
|
1563
|
+
activate: optional(boolean()),
|
|
1564
|
+
isVisible: boolean()
|
|
1565
|
+
});
|
|
1554
1566
|
|
|
1555
1567
|
const webPlatformMethodName = "T42.Web.Platform.Control";
|
|
1556
1568
|
const webPlatformWspStreamName = "T42.Web.Platform.WSP.Stream";
|
|
@@ -1630,7 +1642,9 @@ const OPERATIONS = {
|
|
|
1630
1642
|
setLoadingStrategy: { name: "setLoadingStrategy", argsDecoder: setLoadingStrategyDecoder, resultDecoder: voidResultDecoder },
|
|
1631
1643
|
getTaskbarIcon: { name: "getTaskbarIcon", resultDecoder: iconDecoder },
|
|
1632
1644
|
setTaskbarIcon: { name: "setTaskbarIcon", argsDecoder: setIconArgumentsDecoder, resultDecoder: voidResultDecoder },
|
|
1633
|
-
subscribeToFrameClosing: { name: "subscribeToFrameClosing", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder }
|
|
1645
|
+
subscribeToFrameClosing: { name: "subscribeToFrameClosing", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1646
|
+
changeFrameVisibility: { name: "changeFrameVisibility", argsDecoder: changeFrameVisibilityConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1647
|
+
getFrameVisibility: { name: "getFrameVisibility", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameVisibilityResultDecoder }
|
|
1634
1648
|
};
|
|
1635
1649
|
|
|
1636
1650
|
class PromiseWrapper {
|
|
@@ -3491,6 +3505,13 @@ class Frame {
|
|
|
3491
3505
|
const frameId = this.id;
|
|
3492
3506
|
return getData$1(this).controller.getTaskbarIcon(frameId);
|
|
3493
3507
|
}
|
|
3508
|
+
isVisible() {
|
|
3509
|
+
if (!isDesktop()) {
|
|
3510
|
+
throw new Error("frame.isVisible() is not supported in IO Connect Browser");
|
|
3511
|
+
}
|
|
3512
|
+
const frameId = this.id;
|
|
3513
|
+
return getData$1(this).controller.getFrameVisibility(frameId);
|
|
3514
|
+
}
|
|
3494
3515
|
async minimize() {
|
|
3495
3516
|
if (!isDesktop()) {
|
|
3496
3517
|
throw new Error("State operations are not supported in IO Connect Browser");
|
|
@@ -3547,6 +3568,19 @@ class Frame {
|
|
|
3547
3568
|
}
|
|
3548
3569
|
return getData$1(this).controller.initFrame(this.id, config);
|
|
3549
3570
|
}
|
|
3571
|
+
async show(config) {
|
|
3572
|
+
if (!isDesktop()) {
|
|
3573
|
+
throw new Error("The show operation is not supported in IO Connect Browser");
|
|
3574
|
+
}
|
|
3575
|
+
const validatedConfig = frameShowConfigDecoder.runWithException(config);
|
|
3576
|
+
return getData$1(this).controller.showFrame(this.id, validatedConfig);
|
|
3577
|
+
}
|
|
3578
|
+
async hide() {
|
|
3579
|
+
if (!isDesktop()) {
|
|
3580
|
+
throw new Error("The hide operation is not supported in IO Connect Browser");
|
|
3581
|
+
}
|
|
3582
|
+
return getData$1(this).controller.hideFrame(this.id);
|
|
3583
|
+
}
|
|
3550
3584
|
async onClosing(callback) {
|
|
3551
3585
|
if (!isDesktop()) {
|
|
3552
3586
|
throw new Error("Frame closing operations are not supported in io.Connect Browser");
|
|
@@ -4472,6 +4506,17 @@ class BaseController {
|
|
|
4472
4506
|
await this.isOperationSupported(OPERATIONS.setLoadingStrategy.name);
|
|
4473
4507
|
return this.bridge.send(OPERATIONS.setLoadingStrategy.name, { itemId: workspaceId, strategy });
|
|
4474
4508
|
}
|
|
4509
|
+
async showFrame(frameId, config) {
|
|
4510
|
+
const payload = { frameId, isVisible: true, ...config };
|
|
4511
|
+
return this.bridge.send(OPERATIONS.changeFrameVisibility.name, payload);
|
|
4512
|
+
}
|
|
4513
|
+
async hideFrame(frameId) {
|
|
4514
|
+
return this.bridge.send(OPERATIONS.changeFrameVisibility.name, { frameId, isVisible: false });
|
|
4515
|
+
}
|
|
4516
|
+
async getFrameVisibility(frameId) {
|
|
4517
|
+
const result = await this.bridge.send(OPERATIONS.getFrameVisibility.name, { itemId: frameId });
|
|
4518
|
+
return result.isVisible;
|
|
4519
|
+
}
|
|
4475
4520
|
async isOperationSupported(operation) {
|
|
4476
4521
|
if (isDesktop()) {
|
|
4477
4522
|
return { isSupported: true };
|
|
@@ -4829,6 +4874,15 @@ class MainController {
|
|
|
4829
4874
|
registerFrameOnClosing(frameId, callback) {
|
|
4830
4875
|
return this.closingController.registerFrameOnClosing(frameId, callback);
|
|
4831
4876
|
}
|
|
4877
|
+
async showFrame(frameId, config) {
|
|
4878
|
+
return this.base.showFrame(frameId, config);
|
|
4879
|
+
}
|
|
4880
|
+
async hideFrame(frameId) {
|
|
4881
|
+
return this.base.hideFrame(frameId);
|
|
4882
|
+
}
|
|
4883
|
+
async getFrameVisibility(frameId) {
|
|
4884
|
+
return this.base.getFrameVisibility(frameId);
|
|
4885
|
+
}
|
|
4832
4886
|
async handleCoreLocalSubscription(config, levelId) {
|
|
4833
4887
|
await this.bridge.createCoreEventSubscription();
|
|
4834
4888
|
config.scopeId = config.scopeId || levelId;
|
|
@@ -5133,7 +5187,7 @@ class IoC {
|
|
|
5133
5187
|
}
|
|
5134
5188
|
}
|
|
5135
5189
|
|
|
5136
|
-
var version = "4.1.1
|
|
5190
|
+
var version = "4.1.1";
|
|
5137
5191
|
|
|
5138
5192
|
const composeAPI = (glue, ioc) => {
|
|
5139
5193
|
const controller = ioc.controller;
|