@mtgame/core 0.2.21 → 0.2.23
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/bundles/mtgame-core.umd.js +26 -7
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/models/tournament-team-user.js +3 -1
- package/esm2015/services/centrifugo.service.js +24 -6
- package/fesm2015/mtgame-core.js +25 -6
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/tournament-team-user.d.ts +2 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
- package/services/centrifugo.service.d.ts +2 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('centrifuge'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@mtgame/core', ['exports', '@angular/core', '@angular/common/http', 'rxjs/operators', 'rxjs', 'centrifuge', 'rxjs/internal/Subject', '@sentry/angular', '@angular/forms'
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.mtgame = global.mtgame || {}, global.mtgame.core = {}), global.ng.core, global.ng.common.http, global.rxjs.operators, global.rxjs, global.centrifuge, global.rxjs['internal/Subject'], global.angular, global.ng.forms
|
|
5
|
-
}(this, (function (exports, i0, i1, operators, rxjs, centrifuge, Subject, angular, forms
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('centrifuge'), require('@angular/common'), require('rxjs/internal/Subject'), require('@sentry/angular'), require('@angular/forms')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@mtgame/core', ['exports', '@angular/core', '@angular/common/http', 'rxjs/operators', 'rxjs', 'centrifuge', '@angular/common', 'rxjs/internal/Subject', '@sentry/angular', '@angular/forms'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.mtgame = global.mtgame || {}, global.mtgame.core = {}), global.ng.core, global.ng.common.http, global.rxjs.operators, global.rxjs, global.centrifuge, global.ng.common, global.rxjs['internal/Subject'], global.angular, global.ng.forms));
|
|
5
|
+
}(this, (function (exports, i0, i1, operators, rxjs, centrifuge, common, Subject, angular, forms) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -3471,6 +3471,8 @@
|
|
|
3471
3471
|
disqualified: 'disqualified',
|
|
3472
3472
|
disqualification: 'disqualification',
|
|
3473
3473
|
league_player: 'leaguePlayer',
|
|
3474
|
+
games_count: 'gamesCount',
|
|
3475
|
+
mvp_count: 'mvpCount',
|
|
3474
3476
|
},
|
|
3475
3477
|
relation: {
|
|
3476
3478
|
tournamentTeam: exports.TournamentTeam,
|
|
@@ -13418,9 +13420,10 @@
|
|
|
13418
13420
|
], exports.OrganizationStatistic);
|
|
13419
13421
|
|
|
13420
13422
|
var CentrifugoService = /** @class */ (function () {
|
|
13421
|
-
function CentrifugoService(httpClient, configService) {
|
|
13423
|
+
function CentrifugoService(httpClient, configService, platformId) {
|
|
13422
13424
|
this.httpClient = httpClient;
|
|
13423
13425
|
this.configService = configService;
|
|
13426
|
+
this.platformId = platformId;
|
|
13424
13427
|
this.channels$ = {};
|
|
13425
13428
|
this.subscriptions = {};
|
|
13426
13429
|
this.connectedSubject = new rxjs.BehaviorSubject(false);
|
|
@@ -13434,6 +13437,11 @@
|
|
|
13434
13437
|
});
|
|
13435
13438
|
CentrifugoService.prototype.listen = function (channel) {
|
|
13436
13439
|
var _this = this;
|
|
13440
|
+
if (!common.isPlatformBrowser(this.platformId)) {
|
|
13441
|
+
return new rxjs.Observable(function (observer) {
|
|
13442
|
+
observer.error('Centrifugo is not available in ssr mode');
|
|
13443
|
+
});
|
|
13444
|
+
}
|
|
13437
13445
|
if (channel in this.channels$) {
|
|
13438
13446
|
return this.channels$[channel];
|
|
13439
13447
|
}
|
|
@@ -13455,6 +13463,11 @@
|
|
|
13455
13463
|
};
|
|
13456
13464
|
CentrifugoService.prototype.connect = function () {
|
|
13457
13465
|
var _this = this;
|
|
13466
|
+
if (!common.isPlatformBrowser(this.platformId)) {
|
|
13467
|
+
return new rxjs.Observable(function (observer) {
|
|
13468
|
+
observer.error('Centrifugo is not available in ssr mode');
|
|
13469
|
+
});
|
|
13470
|
+
}
|
|
13458
13471
|
if (!this.initializeEngineSubject) {
|
|
13459
13472
|
this.initializeEngineSubject = new rxjs.ReplaySubject(1);
|
|
13460
13473
|
this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/centrifugo_v2/")
|
|
@@ -13479,6 +13492,11 @@
|
|
|
13479
13492
|
};
|
|
13480
13493
|
CentrifugoService.prototype.publish = function (channel, message) {
|
|
13481
13494
|
var _this = this;
|
|
13495
|
+
if (!common.isPlatformBrowser(this.platformId)) {
|
|
13496
|
+
return new rxjs.Observable(function (observer) {
|
|
13497
|
+
observer.error('Centrifugo is not available in ssr mode');
|
|
13498
|
+
});
|
|
13499
|
+
}
|
|
13482
13500
|
return this.connect().pipe(operators.tap(function () { return _this.centrifuge.publish(channel, message); }));
|
|
13483
13501
|
};
|
|
13484
13502
|
CentrifugoService.prototype.disconnect = function () {
|
|
@@ -13523,13 +13541,14 @@
|
|
|
13523
13541
|
};
|
|
13524
13542
|
return CentrifugoService;
|
|
13525
13543
|
}());
|
|
13526
|
-
CentrifugoService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CentrifugoService_Factory() { return new CentrifugoService(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(ConfigService)); }, token: CentrifugoService, providedIn: "root" });
|
|
13544
|
+
CentrifugoService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CentrifugoService_Factory() { return new CentrifugoService(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(ConfigService), i0__namespace.ɵɵinject(i0__namespace.PLATFORM_ID)); }, token: CentrifugoService, providedIn: "root" });
|
|
13527
13545
|
CentrifugoService.decorators = [
|
|
13528
13546
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
13529
13547
|
];
|
|
13530
13548
|
CentrifugoService.ctorParameters = function () { return [
|
|
13531
13549
|
{ type: i1.HttpClient },
|
|
13532
|
-
{ type: ConfigService }
|
|
13550
|
+
{ type: ConfigService },
|
|
13551
|
+
{ type: String, decorators: [{ type: i0.Inject, args: [i0.PLATFORM_ID,] }] }
|
|
13533
13552
|
]; };
|
|
13534
13553
|
|
|
13535
13554
|
var StorageEngineField = /** @class */ (function () {
|