@interopio/workspaces-api 3.0.2 → 3.0.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 +4 -0
- package/dist/workspaces.es.js +5 -18
- package/dist/workspaces.es.js.map +1 -1
- package/dist/workspaces.umd.js +5 -18
- package/dist/workspaces.umd.js.map +1 -1
- package/dist/workspaces.umd.min.js +1 -1
- package/package.json +3 -3
- package/src/communication/bridge.ts +0 -1
- package/src/models/base/base.ts +4 -9
- package/src/shared/privateDataManager.ts +0 -17
- package/workspaces.d.ts +29 -34
package/dist/workspaces.umd.js
CHANGED
|
@@ -3822,15 +3822,9 @@
|
|
|
3822
3822
|
this.workspacesData = new WeakMap();
|
|
3823
3823
|
this.windowsData = new WeakMap();
|
|
3824
3824
|
this.framesData = new WeakMap();
|
|
3825
|
-
this.windowPlacementIdData = {};
|
|
3826
3825
|
}
|
|
3827
3826
|
deleteData(model) {
|
|
3828
3827
|
if (model instanceof Window) {
|
|
3829
|
-
const keyForDeleting = Object.keys(this.windowPlacementIdData)
|
|
3830
|
-
.find((k) => this.windowPlacementIdData[k] === model);
|
|
3831
|
-
if (keyForDeleting) {
|
|
3832
|
-
delete this.windowPlacementIdData[keyForDeleting];
|
|
3833
|
-
}
|
|
3834
3828
|
this.windowsData.delete(model);
|
|
3835
3829
|
}
|
|
3836
3830
|
if (model instanceof Workspace) {
|
|
@@ -3844,7 +3838,6 @@
|
|
|
3844
3838
|
}
|
|
3845
3839
|
}
|
|
3846
3840
|
setWindowData(model, data) {
|
|
3847
|
-
this.windowPlacementIdData[data.id] = model;
|
|
3848
3841
|
this.windowsData.set(model, data);
|
|
3849
3842
|
}
|
|
3850
3843
|
setWorkspaceData(model, data) {
|
|
@@ -3859,9 +3852,6 @@
|
|
|
3859
3852
|
getWindowData(model) {
|
|
3860
3853
|
return this.windowsData.get(model);
|
|
3861
3854
|
}
|
|
3862
|
-
getWindowByPlacementId(placementId) {
|
|
3863
|
-
return this.windowPlacementIdData[placementId];
|
|
3864
|
-
}
|
|
3865
3855
|
getWorkspaceData(model) {
|
|
3866
3856
|
return this.workspacesData.get(model);
|
|
3867
3857
|
}
|
|
@@ -3904,10 +3894,6 @@
|
|
|
3904
3894
|
}
|
|
3905
3895
|
return data.get(base).manager.getParentData(model);
|
|
3906
3896
|
};
|
|
3907
|
-
const getWindowFromPlacementId = (base, placemenId) => {
|
|
3908
|
-
const manager = data.get(base).manager;
|
|
3909
|
-
return manager.getWindowByPlacementId(placemenId);
|
|
3910
|
-
};
|
|
3911
3897
|
class Base {
|
|
3912
3898
|
constructor(dataManager) {
|
|
3913
3899
|
data.set(this, { manager: dataManager });
|
|
@@ -3958,10 +3944,11 @@
|
|
|
3958
3944
|
const operationResult = yield controller.add("window", getData(this, model).id, parentType, validatedDefinition);
|
|
3959
3945
|
if (model instanceof Workspace) {
|
|
3960
3946
|
yield model.refreshReference();
|
|
3961
|
-
return
|
|
3947
|
+
return model.getWindow(w => w.elementId === operationResult.itemId);
|
|
3962
3948
|
}
|
|
3963
|
-
|
|
3964
|
-
|
|
3949
|
+
const myWorkspace = this.getMyWorkspace(model);
|
|
3950
|
+
yield myWorkspace.refreshReference();
|
|
3951
|
+
return myWorkspace.getWindow(w => w.elementId === operationResult.itemId);
|
|
3965
3952
|
});
|
|
3966
3953
|
}
|
|
3967
3954
|
addParent(model, typeToAdd, parentType, definition) {
|
|
@@ -5282,7 +5269,7 @@
|
|
|
5282
5269
|
}
|
|
5283
5270
|
}
|
|
5284
5271
|
|
|
5285
|
-
var version = "3.0.
|
|
5272
|
+
var version = "3.0.4";
|
|
5286
5273
|
|
|
5287
5274
|
const composeAPI = (glue, ioc) => {
|
|
5288
5275
|
const controller = ioc.controller;
|