@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/dist/workspaces.umd.js
CHANGED
|
@@ -916,6 +916,9 @@
|
|
|
916
916
|
const isWindowInSwimlaneResultDecoder = object({
|
|
917
917
|
inWorkspace: boolean()
|
|
918
918
|
});
|
|
919
|
+
const frameVisibilityResultDecoder = object({
|
|
920
|
+
isVisible: boolean()
|
|
921
|
+
});
|
|
919
922
|
const iconDecoder = object({
|
|
920
923
|
base64Image: nonEmptyStringDecoder
|
|
921
924
|
});
|
|
@@ -1027,6 +1030,7 @@
|
|
|
1027
1030
|
width: optional(nonNegativeNumberDecoder),
|
|
1028
1031
|
height: optional(nonNegativeNumberDecoder)
|
|
1029
1032
|
})),
|
|
1033
|
+
isVisible: optional(boolean()),
|
|
1030
1034
|
frameId: optional(nonEmptyStringDecoder)
|
|
1031
1035
|
});
|
|
1032
1036
|
const loadingStrategyDecoder = oneOf(constant("direct"), constant("delayed"), constant("lazy"));
|
|
@@ -1525,6 +1529,9 @@
|
|
|
1525
1529
|
const workspacePinOptionsDecoder = optional(object({
|
|
1526
1530
|
icon: optional(nonEmptyStringDecoder)
|
|
1527
1531
|
}));
|
|
1532
|
+
const frameShowConfigDecoder = optional(object({
|
|
1533
|
+
activate: optional(boolean())
|
|
1534
|
+
}));
|
|
1528
1535
|
const shortcutConfigDecoder = object({
|
|
1529
1536
|
shortcut: nonEmptyStringDecoder,
|
|
1530
1537
|
frameId: nonEmptyStringDecoder
|
|
@@ -1557,6 +1564,11 @@
|
|
|
1557
1564
|
const frameClosingResultDecoder = object({
|
|
1558
1565
|
prevent: boolean()
|
|
1559
1566
|
});
|
|
1567
|
+
const changeFrameVisibilityConfigDecoder = object({
|
|
1568
|
+
frameId: nonEmptyStringDecoder,
|
|
1569
|
+
activate: optional(boolean()),
|
|
1570
|
+
isVisible: boolean()
|
|
1571
|
+
});
|
|
1560
1572
|
|
|
1561
1573
|
const webPlatformMethodName = "T42.Web.Platform.Control";
|
|
1562
1574
|
const webPlatformWspStreamName = "T42.Web.Platform.WSP.Stream";
|
|
@@ -1636,7 +1648,9 @@
|
|
|
1636
1648
|
setLoadingStrategy: { name: "setLoadingStrategy", argsDecoder: setLoadingStrategyDecoder, resultDecoder: voidResultDecoder },
|
|
1637
1649
|
getTaskbarIcon: { name: "getTaskbarIcon", resultDecoder: iconDecoder },
|
|
1638
1650
|
setTaskbarIcon: { name: "setTaskbarIcon", argsDecoder: setIconArgumentsDecoder, resultDecoder: voidResultDecoder },
|
|
1639
|
-
subscribeToFrameClosing: { name: "subscribeToFrameClosing", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder }
|
|
1651
|
+
subscribeToFrameClosing: { name: "subscribeToFrameClosing", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1652
|
+
changeFrameVisibility: { name: "changeFrameVisibility", argsDecoder: changeFrameVisibilityConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1653
|
+
getFrameVisibility: { name: "getFrameVisibility", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameVisibilityResultDecoder }
|
|
1640
1654
|
};
|
|
1641
1655
|
|
|
1642
1656
|
class PromiseWrapper {
|
|
@@ -3497,6 +3511,13 @@
|
|
|
3497
3511
|
const frameId = this.id;
|
|
3498
3512
|
return getData$1(this).controller.getTaskbarIcon(frameId);
|
|
3499
3513
|
}
|
|
3514
|
+
isVisible() {
|
|
3515
|
+
if (!isDesktop()) {
|
|
3516
|
+
throw new Error("frame.isVisible() is not supported in IO Connect Browser");
|
|
3517
|
+
}
|
|
3518
|
+
const frameId = this.id;
|
|
3519
|
+
return getData$1(this).controller.getFrameVisibility(frameId);
|
|
3520
|
+
}
|
|
3500
3521
|
async minimize() {
|
|
3501
3522
|
if (!isDesktop()) {
|
|
3502
3523
|
throw new Error("State operations are not supported in IO Connect Browser");
|
|
@@ -3553,6 +3574,19 @@
|
|
|
3553
3574
|
}
|
|
3554
3575
|
return getData$1(this).controller.initFrame(this.id, config);
|
|
3555
3576
|
}
|
|
3577
|
+
async show(config) {
|
|
3578
|
+
if (!isDesktop()) {
|
|
3579
|
+
throw new Error("The show operation is not supported in IO Connect Browser");
|
|
3580
|
+
}
|
|
3581
|
+
const validatedConfig = frameShowConfigDecoder.runWithException(config);
|
|
3582
|
+
return getData$1(this).controller.showFrame(this.id, validatedConfig);
|
|
3583
|
+
}
|
|
3584
|
+
async hide() {
|
|
3585
|
+
if (!isDesktop()) {
|
|
3586
|
+
throw new Error("The hide operation is not supported in IO Connect Browser");
|
|
3587
|
+
}
|
|
3588
|
+
return getData$1(this).controller.hideFrame(this.id);
|
|
3589
|
+
}
|
|
3556
3590
|
async onClosing(callback) {
|
|
3557
3591
|
if (!isDesktop()) {
|
|
3558
3592
|
throw new Error("Frame closing operations are not supported in io.Connect Browser");
|
|
@@ -4478,6 +4512,17 @@
|
|
|
4478
4512
|
await this.isOperationSupported(OPERATIONS.setLoadingStrategy.name);
|
|
4479
4513
|
return this.bridge.send(OPERATIONS.setLoadingStrategy.name, { itemId: workspaceId, strategy });
|
|
4480
4514
|
}
|
|
4515
|
+
async showFrame(frameId, config) {
|
|
4516
|
+
const payload = { frameId, isVisible: true, ...config };
|
|
4517
|
+
return this.bridge.send(OPERATIONS.changeFrameVisibility.name, payload);
|
|
4518
|
+
}
|
|
4519
|
+
async hideFrame(frameId) {
|
|
4520
|
+
return this.bridge.send(OPERATIONS.changeFrameVisibility.name, { frameId, isVisible: false });
|
|
4521
|
+
}
|
|
4522
|
+
async getFrameVisibility(frameId) {
|
|
4523
|
+
const result = await this.bridge.send(OPERATIONS.getFrameVisibility.name, { itemId: frameId });
|
|
4524
|
+
return result.isVisible;
|
|
4525
|
+
}
|
|
4481
4526
|
async isOperationSupported(operation) {
|
|
4482
4527
|
if (isDesktop()) {
|
|
4483
4528
|
return { isSupported: true };
|
|
@@ -4835,6 +4880,15 @@
|
|
|
4835
4880
|
registerFrameOnClosing(frameId, callback) {
|
|
4836
4881
|
return this.closingController.registerFrameOnClosing(frameId, callback);
|
|
4837
4882
|
}
|
|
4883
|
+
async showFrame(frameId, config) {
|
|
4884
|
+
return this.base.showFrame(frameId, config);
|
|
4885
|
+
}
|
|
4886
|
+
async hideFrame(frameId) {
|
|
4887
|
+
return this.base.hideFrame(frameId);
|
|
4888
|
+
}
|
|
4889
|
+
async getFrameVisibility(frameId) {
|
|
4890
|
+
return this.base.getFrameVisibility(frameId);
|
|
4891
|
+
}
|
|
4838
4892
|
async handleCoreLocalSubscription(config, levelId) {
|
|
4839
4893
|
await this.bridge.createCoreEventSubscription();
|
|
4840
4894
|
config.scopeId = config.scopeId || levelId;
|
|
@@ -5139,7 +5193,7 @@
|
|
|
5139
5193
|
}
|
|
5140
5194
|
}
|
|
5141
5195
|
|
|
5142
|
-
var version = "4.1.1
|
|
5196
|
+
var version = "4.1.1";
|
|
5143
5197
|
|
|
5144
5198
|
const composeAPI = (glue, ioc) => {
|
|
5145
5199
|
const controller = ioc.controller;
|