@interopio/workspaces-api 4.1.1-beta.0 → 4.1.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/LICENSE +21 -21
- package/changelog.md +174 -168
- package/dist/workspaces.es.js +103 -2
- package/dist/workspaces.es.js.map +1 -1
- package/dist/workspaces.umd.js +103 -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 +262 -20
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,43 @@
|
|
|
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
|
+
});
|
|
1572
|
+
const sizeDecoder = object({
|
|
1573
|
+
width: positiveNumberDecoder,
|
|
1574
|
+
height: positiveNumberDecoder
|
|
1575
|
+
});
|
|
1576
|
+
const frameDialogOptionsDecoder = object({
|
|
1577
|
+
mode: optional(oneOf(constant("Global"), constant("WindowContainer"))),
|
|
1578
|
+
type: string(),
|
|
1579
|
+
size: optional(sizeDecoder),
|
|
1580
|
+
message: nonEmptyStringDecoder,
|
|
1581
|
+
messageTitle: optional(nonEmptyStringDecoder),
|
|
1582
|
+
movable: optional(boolean()),
|
|
1583
|
+
transparent: optional(boolean()),
|
|
1584
|
+
title: nonEmptyStringDecoder,
|
|
1585
|
+
context: optional(anyJson()),
|
|
1586
|
+
affirmativeButtonName: optional(nonEmptyStringDecoder),
|
|
1587
|
+
showAffirmativeButton: optional(boolean()),
|
|
1588
|
+
cancelButtonName: optional(nonEmptyStringDecoder),
|
|
1589
|
+
showCancelButton: optional(boolean()),
|
|
1590
|
+
negativeButtonName: optional(nonEmptyStringDecoder),
|
|
1591
|
+
showNegativeButton: optional(boolean()),
|
|
1592
|
+
defaultAction: optional(oneOf(constant("affirmative"), constant("negative"), constant("cancel"))),
|
|
1593
|
+
timerDuration: optional(positiveNumberDecoder),
|
|
1594
|
+
showTimer: optional(boolean()),
|
|
1595
|
+
inputMaxLength: optional(positiveNumberDecoder),
|
|
1596
|
+
inputPattern: optional(nonEmptyStringDecoder),
|
|
1597
|
+
inputPatternErrorMessage: optional(nonEmptyStringDecoder),
|
|
1598
|
+
inputPlaceholder: optional(string())
|
|
1599
|
+
});
|
|
1600
|
+
const showFrameDialogConfigDecoder = object({
|
|
1601
|
+
frameId: nonEmptyStringDecoder,
|
|
1602
|
+
options: frameDialogOptionsDecoder
|
|
1603
|
+
});
|
|
1560
1604
|
|
|
1561
1605
|
const webPlatformMethodName = "T42.Web.Platform.Control";
|
|
1562
1606
|
const webPlatformWspStreamName = "T42.Web.Platform.WSP.Stream";
|
|
@@ -1636,7 +1680,10 @@
|
|
|
1636
1680
|
setLoadingStrategy: { name: "setLoadingStrategy", argsDecoder: setLoadingStrategyDecoder, resultDecoder: voidResultDecoder },
|
|
1637
1681
|
getTaskbarIcon: { name: "getTaskbarIcon", resultDecoder: iconDecoder },
|
|
1638
1682
|
setTaskbarIcon: { name: "setTaskbarIcon", argsDecoder: setIconArgumentsDecoder, resultDecoder: voidResultDecoder },
|
|
1639
|
-
subscribeToFrameClosing: { name: "subscribeToFrameClosing", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder }
|
|
1683
|
+
subscribeToFrameClosing: { name: "subscribeToFrameClosing", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1684
|
+
changeFrameVisibility: { name: "changeFrameVisibility", argsDecoder: changeFrameVisibilityConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1685
|
+
getFrameVisibility: { name: "getFrameVisibility", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameVisibilityResultDecoder },
|
|
1686
|
+
showFrameDialog: { name: "showFrameDialog", argsDecoder: showFrameDialogConfigDecoder, resultDecoder: anyJson() }
|
|
1640
1687
|
};
|
|
1641
1688
|
|
|
1642
1689
|
class PromiseWrapper {
|
|
@@ -3497,6 +3544,13 @@
|
|
|
3497
3544
|
const frameId = this.id;
|
|
3498
3545
|
return getData$1(this).controller.getTaskbarIcon(frameId);
|
|
3499
3546
|
}
|
|
3547
|
+
isVisible() {
|
|
3548
|
+
if (!isDesktop()) {
|
|
3549
|
+
throw new Error("frame.isVisible() is not supported in IO Connect Browser");
|
|
3550
|
+
}
|
|
3551
|
+
const frameId = this.id;
|
|
3552
|
+
return getData$1(this).controller.getFrameVisibility(frameId);
|
|
3553
|
+
}
|
|
3500
3554
|
async minimize() {
|
|
3501
3555
|
if (!isDesktop()) {
|
|
3502
3556
|
throw new Error("State operations are not supported in IO Connect Browser");
|
|
@@ -3553,6 +3607,26 @@
|
|
|
3553
3607
|
}
|
|
3554
3608
|
return getData$1(this).controller.initFrame(this.id, config);
|
|
3555
3609
|
}
|
|
3610
|
+
async show(config) {
|
|
3611
|
+
if (!isDesktop()) {
|
|
3612
|
+
throw new Error("The show operation is not supported in IO Connect Browser");
|
|
3613
|
+
}
|
|
3614
|
+
const validatedConfig = frameShowConfigDecoder.runWithException(config);
|
|
3615
|
+
return getData$1(this).controller.showFrame(this.id, validatedConfig);
|
|
3616
|
+
}
|
|
3617
|
+
async hide() {
|
|
3618
|
+
if (!isDesktop()) {
|
|
3619
|
+
throw new Error("The hide operation is not supported in IO Connect Browser");
|
|
3620
|
+
}
|
|
3621
|
+
return getData$1(this).controller.hideFrame(this.id);
|
|
3622
|
+
}
|
|
3623
|
+
async showDialog(options) {
|
|
3624
|
+
if (!isDesktop()) {
|
|
3625
|
+
throw new Error("The showModal operation is not supported in IO Connect Browser");
|
|
3626
|
+
}
|
|
3627
|
+
frameDialogOptionsDecoder.runWithException(options);
|
|
3628
|
+
return getData$1(this).controller.showFrameDialog(this.id, options);
|
|
3629
|
+
}
|
|
3556
3630
|
async onClosing(callback) {
|
|
3557
3631
|
if (!isDesktop()) {
|
|
3558
3632
|
throw new Error("Frame closing operations are not supported in io.Connect Browser");
|
|
@@ -4478,6 +4552,21 @@
|
|
|
4478
4552
|
await this.isOperationSupported(OPERATIONS.setLoadingStrategy.name);
|
|
4479
4553
|
return this.bridge.send(OPERATIONS.setLoadingStrategy.name, { itemId: workspaceId, strategy });
|
|
4480
4554
|
}
|
|
4555
|
+
async showFrame(frameId, config) {
|
|
4556
|
+
const payload = { frameId, isVisible: true, ...config };
|
|
4557
|
+
return this.bridge.send(OPERATIONS.changeFrameVisibility.name, payload);
|
|
4558
|
+
}
|
|
4559
|
+
async hideFrame(frameId) {
|
|
4560
|
+
return this.bridge.send(OPERATIONS.changeFrameVisibility.name, { frameId, isVisible: false });
|
|
4561
|
+
}
|
|
4562
|
+
async getFrameVisibility(frameId) {
|
|
4563
|
+
const result = await this.bridge.send(OPERATIONS.getFrameVisibility.name, { itemId: frameId });
|
|
4564
|
+
return result.isVisible;
|
|
4565
|
+
}
|
|
4566
|
+
async showFrameDialog(frameId, options) {
|
|
4567
|
+
const result = await this.bridge.send(OPERATIONS.showFrameDialog.name, { frameId, options });
|
|
4568
|
+
return result;
|
|
4569
|
+
}
|
|
4481
4570
|
async isOperationSupported(operation) {
|
|
4482
4571
|
if (isDesktop()) {
|
|
4483
4572
|
return { isSupported: true };
|
|
@@ -4835,6 +4924,18 @@
|
|
|
4835
4924
|
registerFrameOnClosing(frameId, callback) {
|
|
4836
4925
|
return this.closingController.registerFrameOnClosing(frameId, callback);
|
|
4837
4926
|
}
|
|
4927
|
+
async showFrame(frameId, config) {
|
|
4928
|
+
return this.base.showFrame(frameId, config);
|
|
4929
|
+
}
|
|
4930
|
+
async hideFrame(frameId) {
|
|
4931
|
+
return this.base.hideFrame(frameId);
|
|
4932
|
+
}
|
|
4933
|
+
async getFrameVisibility(frameId) {
|
|
4934
|
+
return this.base.getFrameVisibility(frameId);
|
|
4935
|
+
}
|
|
4936
|
+
async showFrameDialog(frameId, options) {
|
|
4937
|
+
return this.base.showFrameDialog(frameId, options);
|
|
4938
|
+
}
|
|
4838
4939
|
async handleCoreLocalSubscription(config, levelId) {
|
|
4839
4940
|
await this.bridge.createCoreEventSubscription();
|
|
4840
4941
|
config.scopeId = config.scopeId || levelId;
|
|
@@ -5139,7 +5240,7 @@
|
|
|
5139
5240
|
}
|
|
5140
5241
|
}
|
|
5141
5242
|
|
|
5142
|
-
var version = "4.1.
|
|
5243
|
+
var version = "4.1.2";
|
|
5143
5244
|
|
|
5144
5245
|
const composeAPI = (glue, ioc) => {
|
|
5145
5246
|
const controller = ioc.controller;
|