wt-front-shared 1.0.86 → 1.0.88
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/core/+state/static-data/static-data.actions.mjs +1 -1
- package/esm2020/lib/core/+state/static-data/static-data.facade.mjs +4 -3
- package/esm2020/lib/core/services/websocket.service.mjs +10 -5
- package/esm2020/lib/models/endpoints/static-data/static-data-sub-routing-get/request/static-data-sub-routing-get-request-config.mjs +1 -1
- package/esm2020/lib/models/endpoints/static-data/static-data-sub-routing-get/request/static-data-sub-routing-get-request.mjs +8 -2
- package/fesm2015/wt-front-shared.mjs +17 -6
- package/fesm2015/wt-front-shared.mjs.map +1 -1
- package/fesm2020/wt-front-shared.mjs +17 -6
- package/fesm2020/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/static-data/static-data.actions.d.ts +1 -0
- package/lib/core/+state/static-data/static-data.facade.d.ts +1 -1
- package/lib/core/services/websocket.service.d.ts +3 -2
- package/lib/models/endpoints/static-data/static-data-sub-routing-get/request/static-data-sub-routing-get-request-config.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1257,7 +1257,13 @@ class StaticDataSubRoutingGetRequest extends GetRequest {
|
|
|
1257
1257
|
this.config = config;
|
|
1258
1258
|
}
|
|
1259
1259
|
get url() {
|
|
1260
|
-
|
|
1260
|
+
let queryString = '';
|
|
1261
|
+
if (this.config.data) {
|
|
1262
|
+
queryString = '?' + Object.keys(this.config.data)
|
|
1263
|
+
.map(field => `${field}=${this.config.data[field]}`)
|
|
1264
|
+
.join('&');
|
|
1265
|
+
}
|
|
1266
|
+
return `${this.domain}/api/static-data/${this.config.contentType}/r/${this.config.routing}/${queryString}`;
|
|
1261
1267
|
}
|
|
1262
1268
|
get headers() {
|
|
1263
1269
|
return this.addAuthHeaders(this.config.headers);
|
|
@@ -6293,11 +6299,12 @@ class StaticDataFacade {
|
|
|
6293
6299
|
}));
|
|
6294
6300
|
});
|
|
6295
6301
|
}
|
|
6296
|
-
loadStaticDataSubRouting(contentType, routing) {
|
|
6302
|
+
loadStaticDataSubRouting(contentType, routing, data) {
|
|
6297
6303
|
this.store.dispatch(StaticDataGetSubRouting({
|
|
6298
6304
|
payload: {
|
|
6299
6305
|
contentType,
|
|
6300
|
-
routing
|
|
6306
|
+
routing,
|
|
6307
|
+
data
|
|
6301
6308
|
}
|
|
6302
6309
|
}));
|
|
6303
6310
|
}
|
|
@@ -6405,7 +6412,7 @@ var WebsocketMessageSubTypes;
|
|
|
6405
6412
|
})(WebsocketMessageSubTypes || (WebsocketMessageSubTypes = {}));
|
|
6406
6413
|
;
|
|
6407
6414
|
class WebsocketService {
|
|
6408
|
-
constructor(config, staticDataFacade, cookieService) {
|
|
6415
|
+
constructor(config, platformId, staticDataFacade, cookieService) {
|
|
6409
6416
|
this.config = config;
|
|
6410
6417
|
this.staticDataFacade = staticDataFacade;
|
|
6411
6418
|
this.cookieService = cookieService;
|
|
@@ -6414,11 +6421,12 @@ class WebsocketService {
|
|
|
6414
6421
|
this.numbersOfReloads = 0;
|
|
6415
6422
|
this.messageQueue = [];
|
|
6416
6423
|
this.storageKey = 'wt-user-key';
|
|
6424
|
+
this.isBrowser = isPlatformBrowser(platformId);
|
|
6417
6425
|
this.connectToWebSocket();
|
|
6418
6426
|
this.sendMessageFromQueueTimer();
|
|
6419
6427
|
}
|
|
6420
6428
|
connectToWebSocket() {
|
|
6421
|
-
if ('WebSocket' in window) {
|
|
6429
|
+
if (this.isBrowser && 'WebSocket' in window) {
|
|
6422
6430
|
this.ws = new WebSocket(this.config.websocketUrl);
|
|
6423
6431
|
const storageData = this.getUserKey();
|
|
6424
6432
|
this.ws.onopen = () => {
|
|
@@ -6516,7 +6524,7 @@ class WebsocketService {
|
|
|
6516
6524
|
}
|
|
6517
6525
|
}
|
|
6518
6526
|
}
|
|
6519
|
-
WebsocketService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, deps: [{ token: CORE_CONFIG }, { token: StaticDataFacade }, { token: i2$1.CookieService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6527
|
+
WebsocketService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, deps: [{ token: CORE_CONFIG }, { token: PLATFORM_ID }, { token: StaticDataFacade }, { token: i2$1.CookieService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6520
6528
|
WebsocketService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, providedIn: 'root' });
|
|
6521
6529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, decorators: [{
|
|
6522
6530
|
type: Injectable,
|
|
@@ -6526,6 +6534,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6526
6534
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
6527
6535
|
type: Inject,
|
|
6528
6536
|
args: [CORE_CONFIG]
|
|
6537
|
+
}] }, { type: Object, decorators: [{
|
|
6538
|
+
type: Inject,
|
|
6539
|
+
args: [PLATFORM_ID]
|
|
6529
6540
|
}] }, { type: StaticDataFacade }, { type: i2$1.CookieService }]; } });
|
|
6530
6541
|
|
|
6531
6542
|
class RouterFacade {
|