@smartbit4all/ng-client 1.1.21 → 1.1.22
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/session/smart-session.service.mjs +5 -10
- package/esm2020/lib/smart-client/smart-component-api-client.mjs +2 -2
- package/esm2020/lib/view-context/smart-view-context.service.mjs +5 -12
- package/fesm2015/smartbit4all-ng-client.mjs +10 -22
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +9 -21
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-1.1.22.tgz +0 -0
- package/smartbit4all-ng-client-1.1.21.tgz +0 -0
|
@@ -706,8 +706,6 @@ class SmartSessionService {
|
|
|
706
706
|
});
|
|
707
707
|
}
|
|
708
708
|
addHeaderParam(headerParam) {
|
|
709
|
-
console.log('addHeaderParam called ');
|
|
710
|
-
console.log(headerParam);
|
|
711
709
|
if (this.headerParams.find((h) => h.headerName === headerParam.headerName)) {
|
|
712
710
|
let index = this.headerParams.findIndex((h) => h.headerName === headerParam.headerName);
|
|
713
711
|
this.headerParams[index].value = headerParam.value;
|
|
@@ -718,13 +716,10 @@ class SmartSessionService {
|
|
|
718
716
|
this.headersUpdated.next();
|
|
719
717
|
}
|
|
720
718
|
setUpTokenForSessionService() {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
}
|
|
725
|
-
else {
|
|
726
|
-
this.addHeaderParam({ headerName: 'Authorization', value: `Bearer ${this.token}` });
|
|
727
|
-
}
|
|
719
|
+
this.addHeaderParam({
|
|
720
|
+
headerName: 'Authorization',
|
|
721
|
+
value: `Bearer ${this.token}`,
|
|
722
|
+
});
|
|
728
723
|
}
|
|
729
724
|
setUrl(url) {
|
|
730
725
|
this.basePath = url;
|
|
@@ -2114,7 +2109,6 @@ class SmartViewContextService {
|
|
|
2114
2109
|
sessionStorage.clear();
|
|
2115
2110
|
}
|
|
2116
2111
|
setTabId(tabId) {
|
|
2117
|
-
console.log('setTabId ' + tabId);
|
|
2118
2112
|
sessionStorage.setItem(this.tabIdName, tabId);
|
|
2119
2113
|
this.session.addHeaderParam({
|
|
2120
2114
|
headerName: this.tabIdhttpHeaderName,
|
|
@@ -2123,7 +2117,6 @@ class SmartViewContextService {
|
|
|
2123
2117
|
}
|
|
2124
2118
|
startViewContext() {
|
|
2125
2119
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2126
|
-
console.log('startViewContext');
|
|
2127
2120
|
this.clearSessionStorage();
|
|
2128
2121
|
let newViewContext = yield this.view
|
|
2129
2122
|
.createViewContext()
|
|
@@ -2132,7 +2125,6 @@ class SmartViewContextService {
|
|
|
2132
2125
|
throw new Error('No ViewContext was created');
|
|
2133
2126
|
}
|
|
2134
2127
|
this.viewContext = newViewContext;
|
|
2135
|
-
console.log(this.viewContext);
|
|
2136
2128
|
this.setTabId(newViewContext.uuid);
|
|
2137
2129
|
return this.viewContext;
|
|
2138
2130
|
});
|
|
@@ -2145,8 +2137,6 @@ class SmartViewContextService {
|
|
|
2145
2137
|
if (!this.messageDialogname) {
|
|
2146
2138
|
throw new Error('The messageDialogName provided by the backend has not been set.');
|
|
2147
2139
|
}
|
|
2148
|
-
console.log('init viewContext');
|
|
2149
|
-
console.log(uuid);
|
|
2150
2140
|
if (uuid) {
|
|
2151
2141
|
let subscription = this.session.headersUpdated.subscribe(() => __awaiter(this, void 0, void 0, function* () {
|
|
2152
2142
|
subscription.unsubscribe();
|
|
@@ -2172,8 +2162,6 @@ class SmartViewContextService {
|
|
|
2172
2162
|
if (!viewHandler) {
|
|
2173
2163
|
throw new Error(`SmartViewHandlerModel was not found by view name: ${view.viewName}`);
|
|
2174
2164
|
}
|
|
2175
|
-
console.log(view);
|
|
2176
|
-
sessionStorage.setItem(view.viewName, view.uuid);
|
|
2177
2165
|
if (view.type === ViewType.Dialog) {
|
|
2178
2166
|
if (!viewHandler.component) {
|
|
2179
2167
|
throw new Error(`Component is undefined in SmartViewHandlerModel with name: ${view.viewName}`);
|
|
@@ -2201,6 +2189,7 @@ class SmartViewContextService {
|
|
|
2201
2189
|
view.state = ViewState.Opened;
|
|
2202
2190
|
this.openedViewUuids.push(view.uuid);
|
|
2203
2191
|
this.openedViewData.push(view);
|
|
2192
|
+
sessionStorage.setItem(view.viewName, view.uuid);
|
|
2204
2193
|
this.uuidOfPageHasBeenChanged.next(view.viewName);
|
|
2205
2194
|
this.updateViewContext({
|
|
2206
2195
|
updates: [
|
|
@@ -2241,8 +2230,8 @@ class SmartViewContextService {
|
|
|
2241
2230
|
if (index >= 0) {
|
|
2242
2231
|
this.openedViewUuids.splice(index, 1);
|
|
2243
2232
|
this.openedViewData.splice(index, 1);
|
|
2233
|
+
sessionStorage.removeItem(view.viewName);
|
|
2244
2234
|
}
|
|
2245
|
-
sessionStorage.removeItem(view.viewName);
|
|
2246
2235
|
this.updateViewContext({
|
|
2247
2236
|
updates: [
|
|
2248
2237
|
{
|
|
@@ -2255,7 +2244,6 @@ class SmartViewContextService {
|
|
|
2255
2244
|
}
|
|
2256
2245
|
restoreViews(uuid) {
|
|
2257
2246
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2258
|
-
console.log('restoreViews');
|
|
2259
2247
|
if (!this.viewContext) {
|
|
2260
2248
|
yield this.getViewContext(uuid);
|
|
2261
2249
|
}
|
|
@@ -2281,9 +2269,9 @@ class SmartViewContextService {
|
|
|
2281
2269
|
return !((_a = this.viewContext) === null || _a === void 0 ? void 0 : _a.views.flatMap((viewData) => viewData.uuid).includes(viewData.uuid));
|
|
2282
2270
|
});
|
|
2283
2271
|
if (viewDataToClose === null || viewDataToClose === void 0 ? void 0 : viewDataToClose.length) {
|
|
2284
|
-
viewDataToClose.map((viewData) =>
|
|
2285
|
-
|
|
2286
|
-
})
|
|
2272
|
+
viewDataToClose.map((viewData) => {
|
|
2273
|
+
this.closeView(viewData);
|
|
2274
|
+
});
|
|
2287
2275
|
}
|
|
2288
2276
|
this.viewContextHasBeenSynced.next();
|
|
2289
2277
|
}
|
|
@@ -4260,7 +4248,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
4260
4248
|
}
|
|
4261
4249
|
}
|
|
4262
4250
|
catch (error) {
|
|
4263
|
-
console.
|
|
4251
|
+
console.error(error);
|
|
4264
4252
|
this.model = change.value;
|
|
4265
4253
|
}
|
|
4266
4254
|
if (!change.changedWidgets && !change.changes && change.value) {
|