@mtgame/core 0.0.19 → 0.0.21
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/hockey-game-api.d.ts +2 -0
- package/bundles/mtgame-core.umd.js +29 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/hockey-game-api.js +18 -2
- package/esm2015/models/hockey-game-log.js +10 -1
- package/esm5/api/hockey-game-api.js +22 -2
- package/esm5/models/hockey-game-log.js +10 -1
- package/fesm2015/mtgame-core.js +25 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +29 -0
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/hockey-game-log.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/mtgame-core.js
CHANGED
|
@@ -2351,6 +2351,15 @@ var HockeyGameLog = /** @class */ (function (_super) {
|
|
|
2351
2351
|
HockeyGameLogTypes.penalty_shot, HockeyGameLogTypes.match_penalty
|
|
2352
2352
|
].indexOf(this.logType) > -1;
|
|
2353
2353
|
};
|
|
2354
|
+
HockeyGameLog.prototype.isAfter = function (log) {
|
|
2355
|
+
if (this.time === log.time && this.period === log.period) {
|
|
2356
|
+
return this.id > log.id;
|
|
2357
|
+
}
|
|
2358
|
+
if (this.period === log.period) {
|
|
2359
|
+
return this.time > log.time;
|
|
2360
|
+
}
|
|
2361
|
+
return this.period > log.period;
|
|
2362
|
+
};
|
|
2354
2363
|
HockeyGameLog.toFront = function (value) { };
|
|
2355
2364
|
HockeyGameLog.toBack = function (value) { };
|
|
2356
2365
|
__decorate([
|
|
@@ -2663,6 +2672,26 @@ var HockeyGameApi = /** @class */ (function () {
|
|
|
2663
2672
|
});
|
|
2664
2673
|
});
|
|
2665
2674
|
};
|
|
2675
|
+
HockeyGameApi.prototype.downloadProtocol = function (gameId, format) {
|
|
2676
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2677
|
+
return __generator(this, function (_a) {
|
|
2678
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_hockey_game/" + gameId + "/game_protocol/", {
|
|
2679
|
+
params: new HttpParams().set('file_type', format),
|
|
2680
|
+
responseType: 'blob'
|
|
2681
|
+
}).toPromise()];
|
|
2682
|
+
});
|
|
2683
|
+
});
|
|
2684
|
+
};
|
|
2685
|
+
HockeyGameApi.prototype.downloadApplication = function (gameId, format, type) {
|
|
2686
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2687
|
+
return __generator(this, function (_a) {
|
|
2688
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_hockey_game/" + gameId + "/game_application_file/", {
|
|
2689
|
+
params: new HttpParams().set('file_type', format).set('application_type', type),
|
|
2690
|
+
responseType: 'blob'
|
|
2691
|
+
}).toPromise()];
|
|
2692
|
+
});
|
|
2693
|
+
});
|
|
2694
|
+
};
|
|
2666
2695
|
HockeyGameApi.ctorParameters = function () { return [
|
|
2667
2696
|
{ type: HttpClient },
|
|
2668
2697
|
{ type: ConfigService }
|