@interopio/workspaces-api 3.5.4 → 3.5.6

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.
@@ -1170,7 +1170,8 @@
1170
1170
  widthInPx: optional(number()),
1171
1171
  heightInPx: optional(number()),
1172
1172
  isPinned: optional(boolean()),
1173
- windowDragMode: optional(windowDragModeDecoder)
1173
+ windowDragMode: optional(windowDragModeDecoder),
1174
+ loadingStrategy: optional(loadingStrategyDecoder)
1174
1175
  });
1175
1176
  const baseChildSnapshotConfigDecoder = object({
1176
1177
  frameId: nonEmptyStringDecoder,
@@ -1423,6 +1424,7 @@
1423
1424
  name: nonEmptyStringDecoder,
1424
1425
  workspaceId: nonEmptyStringDecoder,
1425
1426
  saveContext: optional(boolean()),
1427
+ allowMultiple: optional(boolean()),
1426
1428
  metadata: optional(object())
1427
1429
  });
1428
1430
  const workspaceLockConfigDecoder = object({
@@ -1530,6 +1532,10 @@
1530
1532
  itemId: nonEmptyStringDecoder,
1531
1533
  dragMode: windowDragModeDecoder
1532
1534
  });
1535
+ const setLoadingStrategyDecoder = object({
1536
+ itemId: nonEmptyStringDecoder,
1537
+ strategy: loadingStrategyDecoder
1538
+ });
1533
1539
 
1534
1540
  const webPlatformMethodName = "T42.Web.Platform.Control";
1535
1541
  const webPlatformWspStreamName = "T42.Web.Platform.WSP.Stream";
@@ -1603,7 +1609,8 @@
1603
1609
  hideLoadingAnimation: { name: "hideLoadingAnimation", argsDecoder: loadingAnimationConfigDecoder, resultDecoder: voidResultDecoder },
1604
1610
  getPlatformFrameId: { name: "getPlatformFrameId", resultDecoder: getPlatformFrameIdResultDecoder },
1605
1611
  operationCheck: { name: "operationCheck", argsDecoder: operationCheckConfigDecoder, resultDecoder: operationCheckResultDecoder },
1606
- setWindowDragMode: { name: "setWindowDragMode", argsDecoder: setWindowDragModeDecoder, resultDecoder: voidResultDecoder }
1612
+ setWindowDragMode: { name: "setWindowDragMode", argsDecoder: setWindowDragModeDecoder, resultDecoder: voidResultDecoder },
1613
+ setLoadingStrategy: { name: "setLoadingStrategy", argsDecoder: setLoadingStrategyDecoder, resultDecoder: voidResultDecoder }
1607
1614
  };
1608
1615
 
1609
1616
  class PromiseWrapper {
@@ -2684,6 +2691,20 @@
2684
2691
  }
2685
2692
  return getData$3(this).config.windowDragMode;
2686
2693
  }
2694
+ get loadingStrategy() {
2695
+ if (!isDesktop()) {
2696
+ console.warn("The workspace.loadingStrategy property is not supported in IO Connect Browser");
2697
+ }
2698
+ return getData$3(this).config.loadingStrategy;
2699
+ }
2700
+ async setLoadingStrategy(strategy) {
2701
+ if (!isDesktop()) {
2702
+ throw new Error("Not supported in IO Connect Browser");
2703
+ }
2704
+ const controller = getData$3(this).controller;
2705
+ await controller.setLoadingStrategy(this.id, strategy);
2706
+ await this.refreshReference();
2707
+ }
2687
2708
  async removeChild(predicate) {
2688
2709
  checkThrowCallback(predicate);
2689
2710
  const child = this.children.find(predicate);
@@ -2721,7 +2742,7 @@
2721
2742
  }
2722
2743
  async saveLayout(name, config) {
2723
2744
  nonEmptyStringDecoder.runWithException(name);
2724
- await getData$3(this).controller.saveLayout({ name, workspaceId: this.id, saveContext: config?.saveContext, metadata: config?.metadata });
2745
+ await getData$3(this).controller.saveLayout({ name, workspaceId: this.id, saveContext: config?.saveContext, metadata: config?.metadata, allowMultiple: config?.allowMultiple });
2725
2746
  }
2726
2747
  async setTitle(title) {
2727
2748
  nonEmptyStringDecoder.runWithException(title);
@@ -4363,6 +4384,10 @@
4363
4384
  return {};
4364
4385
  }
4365
4386
  }
4387
+ async setLoadingStrategy(workspaceId, strategy) {
4388
+ await this.isOperationSupported(OPERATIONS.setLoadingStrategy.name);
4389
+ return this.bridge.send(OPERATIONS.setLoadingStrategy.name, { itemId: workspaceId, strategy });
4390
+ }
4366
4391
  async isOperationSupported(operation) {
4367
4392
  if (isDesktop()) {
4368
4393
  return { isSupported: true };
@@ -4681,6 +4706,9 @@
4681
4706
  getPlatformFrameId() {
4682
4707
  return this.base.getPlatformFrameId();
4683
4708
  }
4709
+ setLoadingStrategy(workspaceId, strategy) {
4710
+ return this.base.setLoadingStrategy(workspaceId, strategy);
4711
+ }
4684
4712
  async handleCoreLocalSubscription(config, levelId) {
4685
4713
  await this.bridge.createCoreEventSubscription();
4686
4714
  config.scopeId = config.scopeId || levelId;
@@ -4940,7 +4968,7 @@
4940
4968
  }
4941
4969
  }
4942
4970
 
4943
- var version = "3.5.4";
4971
+ var version = "3.5.6";
4944
4972
 
4945
4973
  const composeAPI = (glue, ioc) => {
4946
4974
  const controller = ioc.controller;