@mtgame/core 0.0.45 → 0.0.47
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/api/tournament-api.d.ts +1 -0
- package/bundles/mtgame-core.umd.js +22 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +2 -2
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/tournament-api.js +8 -1
- package/esm2015/models/tournament.js +2 -1
- package/esm2015/services/centrifugo.service.js +10 -2
- package/esm5/api/tournament-api.js +10 -1
- package/esm5/models/tournament.js +2 -1
- package/esm5/services/centrifugo.service.js +14 -2
- package/fesm2015/mtgame-core.js +16 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +22 -0
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/tournament.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
- package/services/centrifugo.service.d.ts +2 -0
package/fesm5/mtgame-core.js
CHANGED
|
@@ -1008,6 +1008,7 @@ var TournamentSettings = /** @class */ (function (_super) {
|
|
|
1008
1008
|
volleyball_statistic_type: 'volleyballStatisticType',
|
|
1009
1009
|
shot_clock_enabled: 'shotClockEnabled',
|
|
1010
1010
|
game_time_type: 'gameTimeType',
|
|
1011
|
+
with_result_table: 'withResultTable'
|
|
1011
1012
|
},
|
|
1012
1013
|
relation: {
|
|
1013
1014
|
type: enumField(TournamentTypes),
|
|
@@ -5103,6 +5104,15 @@ var TournamentApi = /** @class */ (function () {
|
|
|
5103
5104
|
this.httpClient = httpClient;
|
|
5104
5105
|
this.configService = configService;
|
|
5105
5106
|
}
|
|
5107
|
+
TournamentApi.prototype.getById = function (tournamentId) {
|
|
5108
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5109
|
+
return __generator(this, function (_a) {
|
|
5110
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/")
|
|
5111
|
+
.pipe(map(function (result) { return Tournament.toFront(result); }))
|
|
5112
|
+
.toPromise()];
|
|
5113
|
+
});
|
|
5114
|
+
});
|
|
5115
|
+
};
|
|
5106
5116
|
TournamentApi.prototype.getByAlias = function (leagueId, alias) {
|
|
5107
5117
|
return __awaiter(this, void 0, void 0, function () {
|
|
5108
5118
|
return __generator(this, function (_a) {
|
|
@@ -6514,7 +6524,15 @@ var CentrifugoService = /** @class */ (function () {
|
|
|
6514
6524
|
this.configService = configService;
|
|
6515
6525
|
this.channels$ = {};
|
|
6516
6526
|
this.subscriptions = {};
|
|
6527
|
+
this.connectedSubject = new BehaviorSubject(false);
|
|
6517
6528
|
}
|
|
6529
|
+
Object.defineProperty(CentrifugoService.prototype, "connected$", {
|
|
6530
|
+
get: function () {
|
|
6531
|
+
return this.connectedSubject;
|
|
6532
|
+
},
|
|
6533
|
+
enumerable: true,
|
|
6534
|
+
configurable: true
|
|
6535
|
+
});
|
|
6518
6536
|
CentrifugoService.prototype.listen = function (channel) {
|
|
6519
6537
|
var _this = this;
|
|
6520
6538
|
if (channel in this.channels$) {
|
|
@@ -6555,6 +6573,10 @@ var CentrifugoService = /** @class */ (function () {
|
|
|
6555
6573
|
_this.centrifuge.connect();
|
|
6556
6574
|
_this.centrifuge.on('connect', function () {
|
|
6557
6575
|
_this.initializeEngineSubject.next(true);
|
|
6576
|
+
_this.connectedSubject.next(true);
|
|
6577
|
+
});
|
|
6578
|
+
_this.centrifuge.on('disconnect', function () {
|
|
6579
|
+
_this.connectedSubject.next(false);
|
|
6558
6580
|
});
|
|
6559
6581
|
});
|
|
6560
6582
|
}
|