@smartbit4all/ng-client 1.1.19 → 1.1.20
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 +14 -14
- package/fesm2015/smartbit4all-ng-client.mjs +99 -105
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +13 -13
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/view-context/smart-view-context.service.d.ts +3 -3
- package/package.json +1 -1
- package/smartbit4all-ng-client-1.1.20.tgz +0 -0
- package/smartbit4all-ng-client-1.1.19.tgz +0 -0
|
@@ -2144,8 +2144,8 @@ class SmartViewContextService {
|
|
|
2144
2144
|
if (!uuid) {
|
|
2145
2145
|
uuid = this.getUuidOfPage(this.tabIdName);
|
|
2146
2146
|
}
|
|
2147
|
-
await this.getViewContext(uuid).then(
|
|
2148
|
-
|
|
2147
|
+
await this.getViewContext(uuid).then(() => {
|
|
2148
|
+
this.syncView();
|
|
2149
2149
|
});
|
|
2150
2150
|
}
|
|
2151
2151
|
async getViewContext(uuid) {
|
|
@@ -2221,7 +2221,7 @@ class SmartViewContextService {
|
|
|
2221
2221
|
}
|
|
2222
2222
|
return this.viewContext;
|
|
2223
2223
|
}
|
|
2224
|
-
|
|
2224
|
+
openView(view) {
|
|
2225
2225
|
let viewHandler = this.viewHandlers.find((handler) => handler.name === view.viewName);
|
|
2226
2226
|
if (!viewHandler) {
|
|
2227
2227
|
throw new Error(`SmartViewHandlerModel was not found by view name: ${view.viewName}`);
|
|
@@ -2255,7 +2255,7 @@ class SmartViewContextService {
|
|
|
2255
2255
|
this.openedViewUuids.push(view.uuid);
|
|
2256
2256
|
this.openedViewData.push(view);
|
|
2257
2257
|
this.uuidOfPageHasBeenChanged.next(view.viewName);
|
|
2258
|
-
|
|
2258
|
+
this.updateViewContext({
|
|
2259
2259
|
updates: [
|
|
2260
2260
|
{
|
|
2261
2261
|
state: ViewState.Opened,
|
|
@@ -2265,7 +2265,7 @@ class SmartViewContextService {
|
|
|
2265
2265
|
uuid: this.viewContext?.uuid,
|
|
2266
2266
|
});
|
|
2267
2267
|
}
|
|
2268
|
-
|
|
2268
|
+
closeView(view) {
|
|
2269
2269
|
let viewHandler = this.viewHandlers.find((handler) => handler.name === view.viewName);
|
|
2270
2270
|
if (!viewHandler) {
|
|
2271
2271
|
throw new Error(`SmartViewHandlerModel was not found by view name: ${view.viewName}`);
|
|
@@ -2295,7 +2295,7 @@ class SmartViewContextService {
|
|
|
2295
2295
|
this.openedViewData.splice(index, 1);
|
|
2296
2296
|
}
|
|
2297
2297
|
sessionStorage.removeItem(view.viewName);
|
|
2298
|
-
|
|
2298
|
+
this.updateViewContext({
|
|
2299
2299
|
updates: [
|
|
2300
2300
|
{
|
|
2301
2301
|
state: ViewState.Closed,
|
|
@@ -2309,18 +2309,18 @@ class SmartViewContextService {
|
|
|
2309
2309
|
if (!this.viewContext) {
|
|
2310
2310
|
await this.getViewContext(uuid);
|
|
2311
2311
|
}
|
|
2312
|
-
this.viewContext.views.map(
|
|
2313
|
-
|
|
2312
|
+
this.viewContext.views.map((view) => {
|
|
2313
|
+
this.openView(view);
|
|
2314
2314
|
});
|
|
2315
2315
|
}
|
|
2316
|
-
|
|
2317
|
-
this.viewContext?.views.map(
|
|
2316
|
+
syncView() {
|
|
2317
|
+
this.viewContext?.views.map((view) => {
|
|
2318
2318
|
switch (view.state) {
|
|
2319
2319
|
case ViewState.ToOpen:
|
|
2320
|
-
|
|
2320
|
+
this.openView(view);
|
|
2321
2321
|
break;
|
|
2322
2322
|
case ViewState.ToClose:
|
|
2323
|
-
|
|
2323
|
+
this.closeView(view);
|
|
2324
2324
|
break;
|
|
2325
2325
|
}
|
|
2326
2326
|
});
|
|
@@ -2469,7 +2469,7 @@ class SmartViewContextService {
|
|
|
2469
2469
|
}
|
|
2470
2470
|
async handlePerformActionResponse(viewContextChange) {
|
|
2471
2471
|
this.viewContext = viewContextChange?.viewContext;
|
|
2472
|
-
|
|
2472
|
+
this.syncView();
|
|
2473
2473
|
if (viewContextChange?.changes) {
|
|
2474
2474
|
this.handleChanges(viewContextChange.changes);
|
|
2475
2475
|
}
|