@smartbit4all/ng-client 3.3.186 → 3.3.187
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/esm2020/lib/view-context/smart-view-context.service.mjs +16 -15
- package/fesm2015/smartbit4all-ng-client.mjs +15 -14
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +15 -14
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/view-context/smart-view-context.service.d.ts +1 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.187.tgz +0 -0
- package/smartbit4all-ng-client-3.3.186.tgz +0 -0
|
@@ -2951,11 +2951,18 @@ class SmartViewContextService {
|
|
|
2951
2951
|
uuid: view.uuid,
|
|
2952
2952
|
};
|
|
2953
2953
|
}
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2954
|
+
sendViewContextUpdates(updatesToSend) {
|
|
2955
|
+
const updates = [];
|
|
2956
|
+
updatesToSend.forEach((update) => {
|
|
2957
|
+
if (update !== undefined && update !== null)
|
|
2958
|
+
updates.push(update);
|
|
2958
2959
|
});
|
|
2960
|
+
if (updates.length > 0) {
|
|
2961
|
+
this.updateViewContext({
|
|
2962
|
+
updates,
|
|
2963
|
+
uuid: this.viewContext?.uuid,
|
|
2964
|
+
});
|
|
2965
|
+
}
|
|
2959
2966
|
}
|
|
2960
2967
|
async restoreViews(uuid) {
|
|
2961
2968
|
const updates = [];
|
|
@@ -2968,25 +2975,19 @@ class SmartViewContextService {
|
|
|
2968
2975
|
updates.push(update);
|
|
2969
2976
|
}
|
|
2970
2977
|
});
|
|
2971
|
-
|
|
2972
|
-
this.updateContext(updates);
|
|
2973
|
-
}
|
|
2978
|
+
this.sendViewContextUpdates(updates);
|
|
2974
2979
|
}
|
|
2975
2980
|
syncView() {
|
|
2976
2981
|
const updates = [];
|
|
2977
2982
|
this.viewContext?.views.map((view) => {
|
|
2978
|
-
let update = undefined;
|
|
2979
2983
|
switch (view.state) {
|
|
2980
2984
|
case ViewState.TO_OPEN:
|
|
2981
|
-
|
|
2985
|
+
updates.push(this.openView(view));
|
|
2982
2986
|
break;
|
|
2983
2987
|
case ViewState.TO_CLOSE:
|
|
2984
|
-
|
|
2988
|
+
updates.push(this.closeView(view));
|
|
2985
2989
|
break;
|
|
2986
2990
|
}
|
|
2987
|
-
if (update) {
|
|
2988
|
-
updates.push(update);
|
|
2989
|
-
}
|
|
2990
2991
|
});
|
|
2991
2992
|
const viewDataToClose = this.openedViewData.filter((viewData) => !this.viewContext?.views
|
|
2992
2993
|
.flatMap((viewData) => viewData.uuid)
|
|
@@ -2996,7 +2997,7 @@ class SmartViewContextService {
|
|
|
2996
2997
|
updates.push(this.closeView(viewData));
|
|
2997
2998
|
});
|
|
2998
2999
|
}
|
|
2999
|
-
this.
|
|
3000
|
+
this.sendViewContextUpdates(updates);
|
|
3000
3001
|
this.viewContext?.links?.map((data) => {
|
|
3001
3002
|
const link = document.createElement('a');
|
|
3002
3003
|
let target = '_blank'; // default
|