@interopio/workspaces-api 4.1.1 → 4.1.3

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.
@@ -1569,6 +1569,38 @@
1569
1569
  activate: optional(boolean()),
1570
1570
  isVisible: boolean()
1571
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
+ });
1572
1604
 
1573
1605
  const webPlatformMethodName = "T42.Web.Platform.Control";
1574
1606
  const webPlatformWspStreamName = "T42.Web.Platform.WSP.Stream";
@@ -1650,7 +1682,8 @@
1650
1682
  setTaskbarIcon: { name: "setTaskbarIcon", argsDecoder: setIconArgumentsDecoder, resultDecoder: voidResultDecoder },
1651
1683
  subscribeToFrameClosing: { name: "subscribeToFrameClosing", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
1652
1684
  changeFrameVisibility: { name: "changeFrameVisibility", argsDecoder: changeFrameVisibilityConfigDecoder, resultDecoder: voidResultDecoder },
1653
- getFrameVisibility: { name: "getFrameVisibility", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameVisibilityResultDecoder }
1685
+ getFrameVisibility: { name: "getFrameVisibility", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameVisibilityResultDecoder },
1686
+ showFrameDialog: { name: "showFrameDialog", argsDecoder: showFrameDialogConfigDecoder, resultDecoder: anyJson() }
1654
1687
  };
1655
1688
 
1656
1689
  class PromiseWrapper {
@@ -3587,6 +3620,13 @@
3587
3620
  }
3588
3621
  return getData$1(this).controller.hideFrame(this.id);
3589
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
+ }
3590
3630
  async onClosing(callback) {
3591
3631
  if (!isDesktop()) {
3592
3632
  throw new Error("Frame closing operations are not supported in io.Connect Browser");
@@ -4523,6 +4563,10 @@
4523
4563
  const result = await this.bridge.send(OPERATIONS.getFrameVisibility.name, { itemId: frameId });
4524
4564
  return result.isVisible;
4525
4565
  }
4566
+ async showFrameDialog(frameId, options) {
4567
+ const result = await this.bridge.send(OPERATIONS.showFrameDialog.name, { frameId, options });
4568
+ return result;
4569
+ }
4526
4570
  async isOperationSupported(operation) {
4527
4571
  if (isDesktop()) {
4528
4572
  return { isSupported: true };
@@ -4889,6 +4933,9 @@
4889
4933
  async getFrameVisibility(frameId) {
4890
4934
  return this.base.getFrameVisibility(frameId);
4891
4935
  }
4936
+ async showFrameDialog(frameId, options) {
4937
+ return this.base.showFrameDialog(frameId, options);
4938
+ }
4892
4939
  async handleCoreLocalSubscription(config, levelId) {
4893
4940
  await this.bridge.createCoreEventSubscription();
4894
4941
  config.scopeId = config.scopeId || levelId;
@@ -5193,7 +5240,7 @@
5193
5240
  }
5194
5241
  }
5195
5242
 
5196
- var version = "4.1.1";
5243
+ var version = "4.1.3";
5197
5244
 
5198
5245
  const composeAPI = (glue, ioc) => {
5199
5246
  const controller = ioc.controller;