@interopio/workspaces-api 4.1.2 → 4.1.4
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 +47 -5
- package/dist/workspaces.es.js.map +1 -1
- package/dist/workspaces.umd.js +47 -5
- 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 +67 -3
package/changelog.md
CHANGED
package/dist/workspaces.es.js
CHANGED
|
@@ -1558,15 +1558,41 @@ const setLoadingStrategyDecoder = object({
|
|
|
1558
1558
|
const frameClosingResultDecoder = object({
|
|
1559
1559
|
prevent: boolean()
|
|
1560
1560
|
});
|
|
1561
|
+
const sizeDecoder = object({
|
|
1562
|
+
width: nonNegativeNumberDecoder,
|
|
1563
|
+
height: nonNegativeNumberDecoder
|
|
1564
|
+
});
|
|
1565
|
+
const boundsDecoder = object({
|
|
1566
|
+
left: number(),
|
|
1567
|
+
top: number(),
|
|
1568
|
+
width: nonNegativeNumberDecoder,
|
|
1569
|
+
height: nonNegativeNumberDecoder
|
|
1570
|
+
});
|
|
1571
|
+
const popupTargetLocationDecoder = oneOf(constant("none"), constant("left"), constant("right"), constant("top"), constant("bottom"));
|
|
1572
|
+
const popupConfigDecoder = object({
|
|
1573
|
+
size: sizeDecoder,
|
|
1574
|
+
targetBounds: boundsDecoder,
|
|
1575
|
+
targetLocation: popupTargetLocationDecoder,
|
|
1576
|
+
windowId: nonEmptyStringDecoder,
|
|
1577
|
+
horizontalOffset: optional(number()),
|
|
1578
|
+
verticalOffset: optional(number()),
|
|
1579
|
+
focus: optional(boolean()),
|
|
1580
|
+
});
|
|
1581
|
+
const ShowPopupConfigDecoder = object({
|
|
1582
|
+
frameId: nonEmptyStringDecoder,
|
|
1583
|
+
size: sizeDecoder,
|
|
1584
|
+
targetBounds: boundsDecoder,
|
|
1585
|
+
targetLocation: popupTargetLocationDecoder,
|
|
1586
|
+
windowId: nonEmptyStringDecoder,
|
|
1587
|
+
horizontalOffset: optional(number()),
|
|
1588
|
+
verticalOffset: optional(number()),
|
|
1589
|
+
focus: optional(boolean()),
|
|
1590
|
+
});
|
|
1561
1591
|
const changeFrameVisibilityConfigDecoder = object({
|
|
1562
1592
|
frameId: nonEmptyStringDecoder,
|
|
1563
1593
|
activate: optional(boolean()),
|
|
1564
1594
|
isVisible: boolean()
|
|
1565
1595
|
});
|
|
1566
|
-
const sizeDecoder = object({
|
|
1567
|
-
width: positiveNumberDecoder,
|
|
1568
|
-
height: positiveNumberDecoder
|
|
1569
|
-
});
|
|
1570
1596
|
const frameDialogOptionsDecoder = object({
|
|
1571
1597
|
mode: optional(oneOf(constant("Global"), constant("WindowContainer"))),
|
|
1572
1598
|
type: string(),
|
|
@@ -1675,6 +1701,7 @@ const OPERATIONS = {
|
|
|
1675
1701
|
getTaskbarIcon: { name: "getTaskbarIcon", resultDecoder: iconDecoder },
|
|
1676
1702
|
setTaskbarIcon: { name: "setTaskbarIcon", argsDecoder: setIconArgumentsDecoder, resultDecoder: voidResultDecoder },
|
|
1677
1703
|
subscribeToFrameClosing: { name: "subscribeToFrameClosing", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1704
|
+
showPopup: { name: "showPopup", argsDecoder: ShowPopupConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1678
1705
|
changeFrameVisibility: { name: "changeFrameVisibility", argsDecoder: changeFrameVisibilityConfigDecoder, resultDecoder: voidResultDecoder },
|
|
1679
1706
|
getFrameVisibility: { name: "getFrameVisibility", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameVisibilityResultDecoder },
|
|
1680
1707
|
showFrameDialog: { name: "showFrameDialog", argsDecoder: showFrameDialogConfigDecoder, resultDecoder: anyJson() }
|
|
@@ -3601,6 +3628,15 @@ class Frame {
|
|
|
3601
3628
|
}
|
|
3602
3629
|
return getData$1(this).controller.initFrame(this.id, config);
|
|
3603
3630
|
}
|
|
3631
|
+
async showPopup(config) {
|
|
3632
|
+
if (!isDesktop()) {
|
|
3633
|
+
throw new Error("Popup operations are not supported in IO Connect Browser");
|
|
3634
|
+
}
|
|
3635
|
+
const validatedConfig = popupConfigDecoder.runWithException(config);
|
|
3636
|
+
const controller = getData$1(this).controller;
|
|
3637
|
+
await controller.showPopup(validatedConfig, this.id);
|
|
3638
|
+
return controller.getGDWindow(validatedConfig.windowId);
|
|
3639
|
+
}
|
|
3604
3640
|
async show(config) {
|
|
3605
3641
|
if (!isDesktop()) {
|
|
3606
3642
|
throw new Error("The show operation is not supported in IO Connect Browser");
|
|
@@ -4567,6 +4603,9 @@ class BaseController {
|
|
|
4567
4603
|
}
|
|
4568
4604
|
return await this.bridge.send(OPERATIONS.operationCheck.name, { operation });
|
|
4569
4605
|
}
|
|
4606
|
+
async showPopup(config, frameId) {
|
|
4607
|
+
return this.bridge.send(OPERATIONS.showPopup.name, { ...config, frameId });
|
|
4608
|
+
}
|
|
4570
4609
|
}
|
|
4571
4610
|
|
|
4572
4611
|
class MainController {
|
|
@@ -4918,6 +4957,9 @@ class MainController {
|
|
|
4918
4957
|
registerFrameOnClosing(frameId, callback) {
|
|
4919
4958
|
return this.closingController.registerFrameOnClosing(frameId, callback);
|
|
4920
4959
|
}
|
|
4960
|
+
showPopup(config, frameId) {
|
|
4961
|
+
return this.base.showPopup(config, frameId);
|
|
4962
|
+
}
|
|
4921
4963
|
async showFrame(frameId, config) {
|
|
4922
4964
|
return this.base.showFrame(frameId, config);
|
|
4923
4965
|
}
|
|
@@ -5234,7 +5276,7 @@ class IoC {
|
|
|
5234
5276
|
}
|
|
5235
5277
|
}
|
|
5236
5278
|
|
|
5237
|
-
var version = "4.1.
|
|
5279
|
+
var version = "4.1.4";
|
|
5238
5280
|
|
|
5239
5281
|
const composeAPI = (glue, ioc) => {
|
|
5240
5282
|
const controller = ioc.controller;
|