@interopio/workspaces-api 3.0.3 → 3.1.0

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 CHANGED
@@ -1,3 +1,5 @@
1
+ 3.1.0
2
+ fix: workspaces leaking transition indicators and memory leak in workspaces api
1
3
  3.0.3
2
4
  chore: updated .d.ts information
3
5
  3.0.2
@@ -3816,15 +3816,9 @@ class PrivateDataManager {
3816
3816
  this.workspacesData = new WeakMap();
3817
3817
  this.windowsData = new WeakMap();
3818
3818
  this.framesData = new WeakMap();
3819
- this.windowPlacementIdData = {};
3820
3819
  }
3821
3820
  deleteData(model) {
3822
3821
  if (model instanceof Window) {
3823
- const keyForDeleting = Object.keys(this.windowPlacementIdData)
3824
- .find((k) => this.windowPlacementIdData[k] === model);
3825
- if (keyForDeleting) {
3826
- delete this.windowPlacementIdData[keyForDeleting];
3827
- }
3828
3822
  this.windowsData.delete(model);
3829
3823
  }
3830
3824
  if (model instanceof Workspace) {
@@ -3838,7 +3832,6 @@ class PrivateDataManager {
3838
3832
  }
3839
3833
  }
3840
3834
  setWindowData(model, data) {
3841
- this.windowPlacementIdData[data.id] = model;
3842
3835
  this.windowsData.set(model, data);
3843
3836
  }
3844
3837
  setWorkspaceData(model, data) {
@@ -3853,9 +3846,6 @@ class PrivateDataManager {
3853
3846
  getWindowData(model) {
3854
3847
  return this.windowsData.get(model);
3855
3848
  }
3856
- getWindowByPlacementId(placementId) {
3857
- return this.windowPlacementIdData[placementId];
3858
- }
3859
3849
  getWorkspaceData(model) {
3860
3850
  return this.workspacesData.get(model);
3861
3851
  }
@@ -3898,10 +3888,6 @@ const getData = (base, model) => {
3898
3888
  }
3899
3889
  return data.get(base).manager.getParentData(model);
3900
3890
  };
3901
- const getWindowFromPlacementId = (base, placemenId) => {
3902
- const manager = data.get(base).manager;
3903
- return manager.getWindowByPlacementId(placemenId);
3904
- };
3905
3891
  class Base {
3906
3892
  constructor(dataManager) {
3907
3893
  data.set(this, { manager: dataManager });
@@ -3952,10 +3938,11 @@ class Base {
3952
3938
  const operationResult = yield controller.add("window", getData(this, model).id, parentType, validatedDefinition);
3953
3939
  if (model instanceof Workspace) {
3954
3940
  yield model.refreshReference();
3955
- return getWindowFromPlacementId(this, operationResult.itemId);
3941
+ return model.getWindow(w => w.elementId === operationResult.itemId);
3956
3942
  }
3957
- yield this.getMyWorkspace(model).refreshReference();
3958
- return getWindowFromPlacementId(this, operationResult.itemId);
3943
+ const myWorkspace = this.getMyWorkspace(model);
3944
+ yield myWorkspace.refreshReference();
3945
+ return myWorkspace.getWindow(w => w.elementId === operationResult.itemId);
3959
3946
  });
3960
3947
  }
3961
3948
  addParent(model, typeToAdd, parentType, definition) {
@@ -5276,7 +5263,7 @@ class IoC {
5276
5263
  }
5277
5264
  }
5278
5265
 
5279
- var version = "3.0.3";
5266
+ var version = "3.1.0";
5280
5267
 
5281
5268
  const composeAPI = (glue, ioc) => {
5282
5269
  const controller = ioc.controller;